@nypl/design-system-react-components 0.28.0 → 1.0.0
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 +8 -0
- package/README.md +7 -7
- package/dist/design-system-react-components.cjs.development.js +6 -9
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +6 -9
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +1 -1
- package/src/components/Card/Card.stories.mdx +1 -1
- package/src/components/Chakra/Box.stories.mdx +1 -1
- package/src/components/Chakra/Center.stories.mdx +1 -1
- package/src/components/Chakra/Flex.stories.mdx +1 -1
- package/src/components/Chakra/Grid.stories.mdx +1 -1
- package/src/components/Chakra/Stack.stories.mdx +1 -1
- package/src/components/SearchBar/SearchBar.stories.mdx +3 -3
- package/src/components/StyleGuide/Buttons.stories.mdx +1 -1
- package/src/components/StyleGuide/Colors.stories.mdx +2 -2
- package/src/components/StyleGuide/Forms.stories.mdx +2 -1
- package/src/components/StyleGuide/Iconography.stories.mdx +2 -2
- package/src/components/StyleGuide/Spacing.stories.mdx +1 -1
- package/src/components/StyleGuide/Typography.stories.mdx +1 -1
- package/src/theme/foundations/colors.ts +6 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nypl/design-system-react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "NYPL Reservoir Design System React Components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"analyze": "size-limit --why",
|
|
34
34
|
"generate-sass-resources": "gulp",
|
|
35
35
|
"storybook": "start-storybook -p 6006 -s ./.storybook/public",
|
|
36
|
-
"build-storybook:
|
|
36
|
+
"build-storybook:v1": "npm run prebuild:storybook && build-storybook -c .storybook -o ./reservoir/v1",
|
|
37
37
|
"prebuild:storybook": "npm run test:generate-output"
|
|
38
38
|
},
|
|
39
39
|
"lint-staged": {
|
|
@@ -83,7 +83,7 @@ width.
|
|
|
83
83
|
|
|
84
84
|
This component is a wrapper around the `Button` component. For accessibility
|
|
85
85
|
information on the `Button` component, see the
|
|
86
|
-
[Button Accessibility](https://nypl.github.io/nypl-design-system/reservoir/
|
|
86
|
+
[Button Accessibility](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-button--button-with-controls#accessibility)
|
|
87
87
|
documentation.
|
|
88
88
|
|
|
89
89
|
## Button Width
|
|
@@ -107,7 +107,7 @@ grouped together and displayed in some type of grid layout.
|
|
|
107
107
|
### CardHeading
|
|
108
108
|
|
|
109
109
|
The `CardHeading` component mirrors the standard Reservoir Design System (DS)
|
|
110
|
-
`Heading` component and accepts the [same props](https://nypl.github.io/nypl-design-system/
|
|
110
|
+
`Heading` component and accepts the [same props](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/components-typography-styles-heading--heading-with-controls).
|
|
111
111
|
|
|
112
112
|
### CardActions
|
|
113
113
|
|
|
@@ -14,7 +14,7 @@ import DSProvider from "../../theme/provider";
|
|
|
14
14
|
| Added | `0.24.0` |
|
|
15
15
|
|
|
16
16
|
Note: This needs the use of the `DSProvider` component. See the
|
|
17
|
-
[README](https://nypl.github.io/nypl-design-system/
|
|
17
|
+
[README](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page#dsprovider)
|
|
18
18
|
for more information.
|
|
19
19
|
|
|
20
20
|
This component is directly exported from Chakra UI. The `Box` is a simple and
|
|
@@ -15,7 +15,7 @@ import DSProvider from "../../theme/provider";
|
|
|
15
15
|
| Added | `0.24.0` |
|
|
16
16
|
|
|
17
17
|
Note: This needs the use of the `DSProvider` component. See the
|
|
18
|
-
[README](https://nypl.github.io/nypl-design-system/
|
|
18
|
+
[README](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page#dsprovider)
|
|
19
19
|
for more information.
|
|
20
20
|
|
|
21
21
|
These components are directly exported from Chakra UI. The `Center`, `Circle`,
|
|
@@ -16,7 +16,7 @@ import DSProvider from "../../theme/provider";
|
|
|
16
16
|
| Latest | `0.25.10` |
|
|
17
17
|
|
|
18
18
|
Note: This needs the use of the `DSProvider` component. See the
|
|
19
|
-
[README](https://nypl.github.io/nypl-design-system/
|
|
19
|
+
[README](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page#dsprovider)
|
|
20
20
|
for more information.
|
|
21
21
|
|
|
22
22
|
This component is directly exported from Chakra UI. The `Flex` component is
|
|
@@ -14,7 +14,7 @@ import DSProvider from "../../theme/provider";
|
|
|
14
14
|
| Latest | `0.25.1` |
|
|
15
15
|
|
|
16
16
|
Note: This needs the use of the `DSProvider` component. See the
|
|
17
|
-
[README](https://nypl.github.io/nypl-design-system/
|
|
17
|
+
[README](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page#dsprovider)
|
|
18
18
|
for more information.
|
|
19
19
|
|
|
20
20
|
This component is directly exported from Chakra UI. The `Grid` component is
|
|
@@ -14,7 +14,7 @@ import DSProvider from "../../theme/provider";
|
|
|
14
14
|
| Added | `0.24.0` |
|
|
15
15
|
|
|
16
16
|
Note: This needs the use of the `DSProvider` component. See the
|
|
17
|
-
[README](https://nypl.github.io/nypl-design-system/
|
|
17
|
+
[README](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page#dsprovider)
|
|
18
18
|
for more information.
|
|
19
19
|
|
|
20
20
|
These components are directly exported from Chakra UI. The `Stack`, `HStack`,
|
|
@@ -164,8 +164,8 @@ screenreaders to pick up this entire search form.
|
|
|
164
164
|
|
|
165
165
|
Resources:
|
|
166
166
|
|
|
167
|
-
- [Reservoir Select](https://nypl.github.io/nypl-design-system/
|
|
168
|
-
- [Reservoir TextInput](https://nypl.github.io/nypl-design-system/
|
|
167
|
+
- [Reservoir Select](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-select--select-with-controls)
|
|
168
|
+
- [Reservoir TextInput](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-textinput--text-input-with-controls)
|
|
169
169
|
- [a11ymatters Accessible Search Form](https://www.a11ymatters.com/pattern/accessible-search/)
|
|
170
170
|
- [MDN ARIA: search role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/search_role)
|
|
171
171
|
|
|
@@ -310,7 +310,7 @@ const helperText = "";
|
|
|
310
310
|
While the Design System does not implement an `Autosuggest` or `Autocomplete`
|
|
311
311
|
component, it does show a pattern for using the `react-autosuggest` package.
|
|
312
312
|
In this example, we're using the `react-autosuggest` example found in the
|
|
313
|
-
[Basic Autosuggest story](https://nypl.github.io/nypl-design-system/
|
|
313
|
+
[Basic Autosuggest story](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/development-guide-autosuggest--autosuggest-library)
|
|
314
314
|
as the main component inside the `SearchBar` component.
|
|
315
315
|
|
|
316
316
|
In order to render this custom input element in the `SearchBar` component, pass
|
|
@@ -21,7 +21,7 @@ import DSProvider from "../../theme/provider";
|
|
|
21
21
|
|
|
22
22
|
## General Information
|
|
23
23
|
|
|
24
|
-
Use the [Button](https://nypl.github.io/nypl-design-system/
|
|
24
|
+
Use the [Button](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-button--button-with-controls)
|
|
25
25
|
component to render form buttons.
|
|
26
26
|
|
|
27
27
|
```jsx
|
|
@@ -197,5 +197,5 @@ Section colors are branding colors only in use at NYPL.
|
|
|
197
197
|
|
|
198
198
|
For additional spacing information, please refer to the Figma Main file.
|
|
199
199
|
|
|
200
|
-
- [NYPL Brand Colors](https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/
|
|
201
|
-
- [NYPL UI Colors](https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/
|
|
200
|
+
- [NYPL Brand Colors](https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=15454%3A47007)
|
|
201
|
+
- [NYPL UI Colors](https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=47083%3A27674)
|
|
@@ -18,7 +18,8 @@ import { getCategory } from "../../utils/componentCategories";
|
|
|
18
18
|
|
|
19
19
|
## General Information
|
|
20
20
|
|
|
21
|
-
Use the [Form](https://nypl.github.io/nypl-design-system/
|
|
21
|
+
Use the [Form](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-form--form-with-controls)
|
|
22
|
+
component to control the placement and spacing for standard HTML forms.
|
|
22
23
|
|
|
23
24
|
## Form Layout
|
|
24
25
|
|
|
@@ -20,7 +20,7 @@ import DSProvider from "../../theme/provider";
|
|
|
20
20
|
|
|
21
21
|
## General Information
|
|
22
22
|
|
|
23
|
-
Use the Reservoir Design System (DS) [Icon](https://nypl.github.io/nypl-design-system/
|
|
23
|
+
Use the Reservoir Design System (DS) [Icon](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-media-icons-icon--icon-with-controls)
|
|
24
24
|
component to render and control icons as `<svg>` elements within consuming apps.
|
|
25
25
|
|
|
26
26
|
The DS utilizes the `Filled` icons available in the [Material UI Design System](https://material-ui.com/components/material-icons/).
|
|
@@ -28,7 +28,7 @@ The DS utilizes the `Filled` icons available in the [Material UI Design System](
|
|
|
28
28
|
## Icon Examples
|
|
29
29
|
|
|
30
30
|
The graphic of the `Icon` component is handled through the `name` prop. To see
|
|
31
|
-
all graphic options for `Icon`, please refer to the [Icon](https://nypl.github.io/nypl-design-system/
|
|
31
|
+
all graphic options for `Icon`, please refer to the [Icon](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-media-icons-icon--icon-with-controls)
|
|
32
32
|
Storybook page.
|
|
33
33
|
|
|
34
34
|
<Canvas>
|
|
@@ -68,7 +68,7 @@ between elements, both horizontal and vertical, should be `2rem`.
|
|
|
68
68
|
|
|
69
69
|
Form input components should have a `2rem` space between each form input
|
|
70
70
|
component. This includes both vertical (column) and horizontal (row) stacking.
|
|
71
|
-
The DS [Form](https://nypl.github.io/nypl-design-system/
|
|
71
|
+
The DS [Form](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-form--form-with-controls)
|
|
72
72
|
component has correct spacing incorporated into its UI structure and should
|
|
73
73
|
always be used when building forms. Please note that the spacing in the `Form`
|
|
74
74
|
component is identical to the spacing in the `Grid` component.
|
|
@@ -205,7 +205,7 @@ black on a white background.
|
|
|
205
205
|
|
|
206
206
|
In cases where specific colors must be applied to text elements, the DS
|
|
207
207
|
provides CSS variables for the full NYPL color palette. Refer to the
|
|
208
|
-
[Colors](https://nypl.github.io/nypl-design-system/
|
|
208
|
+
[Colors](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/style-guide-colors--page)
|
|
209
209
|
section of the Style Guide for details.
|
|
210
210
|
|
|
211
211
|
## Font Weight
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { Colors } from "@chakra-ui/react";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* All colors can be found in Storybook:
|
|
5
|
+
* https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/style-guide-colors--page
|
|
5
6
|
*
|
|
6
|
-
* All UI colors can be found in
|
|
7
|
-
* https://
|
|
8
|
-
* and in Figma:
|
|
9
|
-
* https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=14989%3A37
|
|
7
|
+
* All UI colors can be found in Figma:
|
|
8
|
+
* https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=47083%3A27674
|
|
10
9
|
*
|
|
11
|
-
* All Brand colors can be found in
|
|
12
|
-
* https://
|
|
13
|
-
* and in Figma:
|
|
14
|
-
* https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=15454%3A47007
|
|
10
|
+
* All Brand colors can be found in Figma:
|
|
11
|
+
* https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=15454%3A47007
|
|
15
12
|
*
|
|
16
13
|
* At the end of this file, there are objects that extend Chakra's default
|
|
17
14
|
* color shade palette for individual colors. WE DO NOT RECOMMEND to use them
|