@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 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;
@@ -16,6 +16,7 @@ export interface SelectProps extends BaseProps {
16
16
  onChange?: (event: React.FormEvent) => void;
17
17
  }
18
18
  export interface TextInputProps extends BaseProps {
19
+ isClearable?: boolean;
19
20
  placeholder?: string;
20
21
  }
21
22
  export interface SearchBarProps {
@@ -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. */