Skip to content

Commit 2363786

Browse files
Merge pull request #1952 from NYPL/development
Release v4.1.3
2 parents f03d8a4 + 1fd1ed7 commit 2363786

File tree

15 files changed

+1215
-223
lines changed

15 files changed

+1215
-223
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
88

99
## Prerelease
1010

11+
## 4.1.3 (February 12, 2026)
12+
13+
### Updates
14+
15+
- Updates the `TagSet` component to add semantic color variants.
16+
- Updates the hex color value for `ui.warning.tertiary` for better accessibility compliance.
17+
- Updates the `Hero` component to alter the validation of the background props in the `"campaign"` variant.
18+
19+
### Fixes
20+
21+
- Fixes the hex color value for `dark.ui.warning.secondary`.
22+
1123
## 4.1.2 (January 29, 2026)
1224

1325
### Updates

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nypl/design-system-react-components",
3-
"version": "4.1.2",
3+
"version": "4.1.3",
44
"description": "NYPL Reservoir Design System React Components",
55
"repository": {
66
"type": "git",

src/components/Hero/Hero.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { changelogData } from "./heroChangelogData";
2121
componentName="Hero"
2222
summary="A full-width banner at the top of a page"
2323
versionAdded="0.2.0"
24-
versionLatest="4.0.2"
24+
versionLatest="4.1.3"
2525
/>
2626

2727
<Canvas of={HeroStories.WithControls} />

src/components/Hero/Hero.test.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ describe("Hero", () => {
261261
const heading = (
262262
<Heading level="h1" id="hero-errors" text="Hero with Error Warnings" />
263263
);
264-
const { rerender } = render(
264+
render(
265265
<Hero
266266
variant="campaign"
267267
heading={heading}
@@ -270,22 +270,8 @@ describe("Hero", () => {
270270
/>
271271
);
272272
expect(warn).toHaveBeenCalledWith(
273-
"NYPL Reservoir Hero: It is recommended to use either the " +
274-
"`backdropBackgroundColor`, `backgroundImageSrc`, or `imageProps.src` " +
275-
"prop for the `'campaign'` variant."
276-
);
277-
278-
rerender(
279-
<Hero
280-
variant="campaign"
281-
heading={heading}
282-
subHeaderText={otherSubHeaderText}
283-
backgroundImageSrc={getPlaceholderImage("smaller", 0)}
284-
/>
285-
);
286-
expect(warn).toHaveBeenCalledWith(
287-
"NYPL Reservoir Hero: It is recommended to use either the " +
288-
"`backdropBackgroundColor`, `backgroundImageSrc`, or `imageProps.src` " +
273+
"NYPL Reservoir Hero: It is recommended to use either the" +
274+
"`backdropBackgroundColor` prop or the `backgroundImageSrc` " +
289275
"prop for the `'campaign'` variant."
290276
);
291277
});

src/components/Hero/Hero.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,13 @@ export const Hero: ChakraComponent<
162162
}
163163
if (
164164
variant === "campaign" &&
165-
(!backdropBackgroundColor || !backgroundImageSrc || !imageProps.src)
165+
!backdropBackgroundColor &&
166+
!backgroundImageSrc
166167
) {
167168
console.warn(
168-
"NYPL Reservoir Hero: It is recommended to use either the " +
169-
"`backdropBackgroundColor`, `backgroundImageSrc`, or " +
170-
"`imageProps.src` prop for the `'campaign'` variant."
169+
"NYPL Reservoir Hero: It is recommended to use either the" +
170+
"`backdropBackgroundColor` prop or the `backgroundImageSrc` " +
171+
"prop for the `'campaign'` variant."
171172
);
172173
}
173174
if (variant !== "campaign" && backdropBackgroundColor) {

src/components/Hero/heroChangelogData.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
import { ChangelogData } from "../../utils/ComponentChangelogTable";
1010

1111
export const changelogData: ChangelogData[] = [
12+
{
13+
date: "2026-02-12",
14+
version: "4.1.3",
15+
type: "Update",
16+
affects: ["Functionality"],
17+
notes: [
18+
'Updates the validation of the background props in the "campaign" variant.',
19+
],
20+
},
1221
{
1322
date: "2025-09-30",
1423
version: "4.0.2",

src/components/TagSet/TagSet.mdx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import {
44
Description,
55
Meta,
66
Source,
7+
Unstyled,
78
} from "@storybook/addon-docs/blocks";
89

10+
import Banner from "../Banner/Banner";
911
import ComponentChangelogTable from "../../utils/ComponentChangelogTable";
1012
import * as TagSetStories from "./TagSet.stories";
1113
import Link from "../Link/Link";
@@ -19,7 +21,7 @@ import ComponentDocsHeader from "../../utils/components/ComponentDocsHeader";
1921
componentName="TagSet"
2022
summary="Group of tags that allow content to be explored or filtered"
2123
versionAdded="1.2.0"
22-
versionLatest="4.0.0"
24+
versionLatest="4.1.3"
2325
/>
2426

2527
<Canvas of={TagSetStories.ExploreVariant} />
@@ -31,6 +33,7 @@ import ComponentDocsHeader from "../../utils/components/ComponentDocsHeader";
3133
- [Accessibility](#accessibility)
3234
- [Explore variant](#explore-variant)
3335
- [Filter variant](#filter-variant)
36+
- [Semantic variants](#semantic-variants)
3437
- [Examples](#examples)
3538
- [Changelog](#changelog)
3639

@@ -200,7 +203,7 @@ consuming application may need for logic filtering.
200203
<Source
201204
code={`
202205
const tagSetData = [
203-
{ iconName: "utilityAccountFilled", label: "Abbey Road", id: "abby-road" },
206+
{ iconName: "utilityAccountFilled", label: "Abbey Road", id: "abbey-road" },
204207
{ iconName: "actionLaunch", label: "The Beatles", id: "the-beatles" },
205208
{ iconName: "alertWarningOutline", label: "Revolver", id: "revolver" },
206209
{ iconName: "check", label: "Sgt. Pepper's Lonely Hearts Club Band", id: "sgt-pepper" },
@@ -213,6 +216,26 @@ Resources:
213216

214217
- [W3C WAI-ARIA Button](https://www.w3.org/WAI/ARIA/apg/patterns/button/)
215218

219+
## Semantic variants
220+
221+
Semantic variants align with specific uses.
222+
223+
<Unstyled>
224+
<Banner
225+
content={
226+
<>
227+
<strong>RECOMMENDATION:</strong> Avoid using the "informative" variant
228+
for "filter" tags as the colors are similar to the default colors of
229+
"explore" tags and imply that tags are links.
230+
</>
231+
}
232+
my="s"
233+
variant="recommendation"
234+
/>
235+
</Unstyled>
236+
237+
<Canvas of={TagSetStories.SemanticVariants} />
238+
216239
## Examples
217240

218241
<Canvas of={TagSetStories.FormattingExamples} />

0 commit comments

Comments
 (0)