@nypl/design-system-react-components 1.1.1 → 1.1.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 +26 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/design-system-react-components.cjs.development.js +244 -116
- 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 +244 -116
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/theme/components/button.d.ts +24 -102
- package/dist/theme/components/customTable.d.ts +8 -0
- package/dist/theme/components/header/headerSearchButton.d.ts +1 -2
- package/dist/theme/components/header/headerSearchForm.d.ts +5 -0
- package/dist/theme/components/tooltip.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +14 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,32 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
|
|
|
8
8
|
|
|
9
9
|
## Prerelease
|
|
10
10
|
|
|
11
|
+
## 1.1.2 (September 29, 2022)
|
|
12
|
+
|
|
13
|
+
### Adds
|
|
14
|
+
|
|
15
|
+
- Adds the `size` prop to the `Button` component. The accepted values are "small",
|
|
16
|
+
"medium", and "large". The default size value is "medium".
|
|
17
|
+
- Adds the `value` prop to the `Slider` component to programmatically update the
|
|
18
|
+
values of the `Slider` component.
|
|
19
|
+
- Adds the `value` prop to the `CheckboxGroup` component to programmatically
|
|
20
|
+
update the values of the `Checkbox`es within it.
|
|
21
|
+
|
|
22
|
+
### Updates
|
|
23
|
+
|
|
24
|
+
- Updates the colors for the `secondary` and `iconOnly` variants of the `Button` component.
|
|
25
|
+
- Updates the `Tooltip` component to remove the dropshadow effect.
|
|
26
|
+
- Updates whether the content inside of an `Accordion` is always rendered through the `isAlwaysRendered` prop.
|
|
27
|
+
- Updates the spacing of the icon and text in the `Notification` component.
|
|
28
|
+
- Updates the padding and placement of the links in the `Footer` component.
|
|
29
|
+
- Updates how content in the `Table` component is aligned.
|
|
30
|
+
- Updates the `Button` styles in the `Header`, `Notification`, `SearchBar`, and
|
|
31
|
+
`Tabs` components based on the new `size` prop.
|
|
32
|
+
|
|
33
|
+
### Removals
|
|
34
|
+
|
|
35
|
+
- Removed the `data-testid` attribute from the `Button` component.
|
|
36
|
+
|
|
11
37
|
## 1.1.1 (September 19, 2022)
|
|
12
38
|
|
|
13
39
|
### Adds
|
|
@@ -12,6 +12,9 @@ export interface AccordionProps {
|
|
|
12
12
|
id?: string;
|
|
13
13
|
/** Whether the accordion is open by default only on its initial rendering */
|
|
14
14
|
isDefaultOpen?: boolean;
|
|
15
|
+
/** Whether the contents of the Accordion should always be rendered.
|
|
16
|
+
* Useful for form-components. `false` by default. */
|
|
17
|
+
isAlwaysRendered?: boolean;
|
|
15
18
|
/** Sets max height of accordion panel. This value should be entered with the
|
|
16
19
|
* formatting of a CSS height attribute (ex. 100px, 8rem). If height of content
|
|
17
20
|
* within accordion panel is greater than height set by panelMaxHeight, a
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare type ButtonElementType = "submit" | "button" | "reset";
|
|
3
|
+
export declare type ButtonSizes = "small" | "medium" | "large";
|
|
3
4
|
export declare type ButtonTypes = "primary" | "secondary" | "text" | "callout" | "pill" | "noBrand" | "link";
|
|
4
5
|
interface ButtonProps {
|
|
5
6
|
/** The button variation to render based on the `ButtonTypes` type.*/
|
|
@@ -15,6 +16,8 @@ interface ButtonProps {
|
|
|
15
16
|
mouseDown?: boolean;
|
|
16
17
|
/** The action to perform on the `<button>`'s onClick function. */
|
|
17
18
|
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
19
|
+
/** The size of the `Button`. */
|
|
20
|
+
size?: ButtonSizes;
|
|
18
21
|
/** The HTML button type attribute. */
|
|
19
22
|
type?: ButtonElementType;
|
|
20
23
|
}
|
|
@@ -38,6 +38,8 @@ export interface CheckboxGroupProps {
|
|
|
38
38
|
/** Whether or not to display the "(Required)" text in the label text.
|
|
39
39
|
* True by default. */
|
|
40
40
|
showRequiredLabel?: boolean;
|
|
41
|
+
/** The values to programmatically update the selected `Checkbox`es. */
|
|
42
|
+
value?: string[];
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
43
45
|
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
@@ -49,6 +49,8 @@ export interface SliderProps {
|
|
|
49
49
|
showValues?: boolean;
|
|
50
50
|
/** The amount to increase or decrease when using the slider thumb(s). */
|
|
51
51
|
step?: number;
|
|
52
|
+
/** The value(s) to programmatically update the Slider or RangeSlider. */
|
|
53
|
+
value?: number | number[];
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
56
|
* The `Slider` component renders a singular value slider or a range slider
|