@nypl/design-system-react-components 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -0
- package/dist/components/TextInput/TextInput.d.ts +5 -3
- package/dist/design-system-react-components.cjs.development.js +1692 -2767
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +1692 -2767
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/theme/components/button.d.ts +42 -0
- package/dist/theme/components/checkbox.d.ts +16 -0
- package/dist/theme/components/global.d.ts +19 -1
- package/dist/theme/components/hero.d.ts +14 -2
- package/dist/theme/components/link.d.ts +6 -0
- package/dist/theme/components/radio.d.ts +22 -2
- package/dist/theme/components/textInput.d.ts +28 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,49 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
|
|
|
8
8
|
|
|
9
9
|
## Prerelease
|
|
10
10
|
|
|
11
|
+
## 1.2.2 (November 10, 2022)
|
|
12
|
+
|
|
13
|
+
### Adds
|
|
14
|
+
|
|
15
|
+
- Adds an `isClearable` prop to the `TextInput` component. When set to `true`, a close `Button` component will render on top of the input element. Once clicked, any text value in the input field will be cleared and focus will return to the input element.
|
|
16
|
+
- Adds the `isClearable` property to the `textInputProps` prop object in the `SearchBar` component. This allows the `isClearable` prop to be passed to the `TextInput` component to render the close `Button` component.
|
|
17
|
+
|
|
18
|
+
### Updates
|
|
19
|
+
|
|
20
|
+
- Updates the `Icon` and `Logo` documentation to include size values in px.
|
|
21
|
+
- Updates the spacing within the `tertiary` variant of the `Hero` component.
|
|
22
|
+
- Updates the `Buttons Style Guide` to extend the information about button sizes.
|
|
23
|
+
|
|
24
|
+
### Fixes
|
|
25
|
+
|
|
26
|
+
- Fixes an invalid TOC link on the `Card` component Storybook page.
|
|
27
|
+
- Fixes the sizing of the `errorFilled` and `errorOutline` icons in the `Icon` component.
|
|
28
|
+
- Adds new props to Chakra's `ToolTip` to more forcefully close the DS `ToolTip`. New props include `closeDelay`, `closeOnClick`, `closeOnEsc`, and `closeOnMouseDown`.
|
|
29
|
+
|
|
30
|
+
## 1.2.1 (October 27, 2022)
|
|
31
|
+
|
|
32
|
+
### Adds
|
|
33
|
+
|
|
34
|
+
- Adds the `"buttonPrimary"`, `"buttonSecondary"`, `"buttonPill"`, `"buttonCallout"`, `"buttonNoBrand"`, `"buttonDisabled"` variants for the the `Link` component, set through the `type` prop.
|
|
35
|
+
|
|
36
|
+
### Deprecates
|
|
37
|
+
|
|
38
|
+
- Deprecates the `"button"` `type` variant for the `Link` component. Use any of the new `"buttonX"` variants instead.
|
|
39
|
+
|
|
40
|
+
### Updates
|
|
41
|
+
|
|
42
|
+
- Updates the `AlphabetFilter` component by adding `aria-label=“Filter by letter"` attribute
|
|
43
|
+
and removing the `role` attribute on the `<nav>` element.
|
|
44
|
+
- Updates `AlphabetFilter` border color for the `active letter` indicator from
|
|
45
|
+
`ui.gray.medium` to `ui.gray.dark`.
|
|
46
|
+
- Updates background styles for `Hero` component's `primary` and `campaign` variants.
|
|
47
|
+
- Updates the hover styles for the `Checkbox` and `Radio` components.
|
|
48
|
+
- Improves `TagSet` `"filter"` type accessibility by adding an `aria-label` that includes `"click to remove filter"`, when `isDismissible` is true.
|
|
49
|
+
|
|
50
|
+
### Fixes
|
|
51
|
+
|
|
52
|
+
- Updates Storybook npm packages to fix copying documentation and table of contents heading linking.
|
|
53
|
+
|
|
11
54
|
## 1.2.0 (October 17, 2022)
|
|
12
55
|
|
|
13
56
|
### Adds
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare type LinkTypes = "action" | "backwards" | "button" | "default" | "external" | "forwards";
|
|
2
|
+
export declare type LinkTypes = "action" | "backwards" | "button" | "buttonPrimary" | "buttonSecondary" | "buttonPill" | "buttonCallout" | "buttonNoBrand" | "buttonDisabled" | "default" | "external" | "forwards";
|
|
3
3
|
export interface LinkProps {
|
|
4
4
|
/** Any child node passed to the component. */
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -22,6 +22,8 @@ export interface InputProps {
|
|
|
22
22
|
id: string;
|
|
23
23
|
/** Populates the HelperErrorText for the error state */
|
|
24
24
|
invalidText?: HelperErrorTextType;
|
|
25
|
+
/** Adds a button to clear existing text in the input field. */
|
|
26
|
+
isClearable?: boolean;
|
|
25
27
|
/** Adds the `disabled` and `aria-disabled` prop to the input when true */
|
|
26
28
|
isDisabled?: boolean;
|
|
27
29
|
/** Adds errored styling to the input/textarea and helper text elements */
|
|
@@ -48,6 +50,9 @@ export interface InputProps {
|
|
|
48
50
|
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
49
51
|
/** Populates the placeholder for the input/textarea elements */
|
|
50
52
|
placeholder?: string;
|
|
53
|
+
/** Allows the '(Required)' text to be changed for language purposes
|
|
54
|
+
* Note: Parenthesis will be added automatically by the component */
|
|
55
|
+
requiredLabelText?: string;
|
|
51
56
|
/** Offers the ability to hide the helper/invalid text. */
|
|
52
57
|
showHelperInvalidText?: boolean;
|
|
53
58
|
/** Offers the ability to show the label onscreen or hide it. Refer to the
|
|
@@ -56,9 +61,6 @@ export interface InputProps {
|
|
|
56
61
|
/** Whether or not to display the "(Required)" text in the label text.
|
|
57
62
|
* True by default. */
|
|
58
63
|
showRequiredLabel?: boolean;
|
|
59
|
-
/** Allows the '(Required)' text to be changed for language purposes
|
|
60
|
-
* Note: Parenthesis will be added automatically by the component */
|
|
61
|
-
requiredLabelText?: string;
|
|
62
64
|
/** The amount to increase or decrease when using the number type. */
|
|
63
65
|
step?: number;
|
|
64
66
|
/** FOR INTERNAL DS USE ONLY: the input variant to display. */
|