@nypl/design-system-react-components 1.0.3 → 1.0.6

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +171 -133
  3. package/dist/__tests__/mediaMatchMock.d.ts +79 -0
  4. package/dist/components/Accordion/Accordion.d.ts +2 -2
  5. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  6. package/dist/components/Button/Button.d.ts +4 -2
  7. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -2
  8. package/dist/components/Card/Card.d.ts +7 -3
  9. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  10. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
  11. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +4 -2
  12. package/dist/components/Fieldset/Fieldset.d.ts +3 -1
  13. package/dist/components/Form/Form.d.ts +4 -2
  14. package/dist/components/Grid/SimpleGrid.d.ts +4 -2
  15. package/dist/components/Heading/Heading.d.ts +10 -2
  16. package/dist/components/HelperErrorText/HelperErrorText.d.ts +2 -2
  17. package/dist/components/Hero/Hero.d.ts +4 -2
  18. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -2
  19. package/dist/components/Icons/Icon.d.ts +5 -3
  20. package/dist/components/Icons/IconSvgs.d.ts +23 -0
  21. package/dist/components/Image/Image.d.ts +6 -2
  22. package/dist/components/Label/Label.d.ts +4 -2
  23. package/dist/components/Link/Link.d.ts +2 -2
  24. package/dist/components/List/List.d.ts +4 -2
  25. package/dist/components/Logo/Logo.d.ts +5 -3
  26. package/dist/components/Logo/LogoSvgs.d.ts +1 -0
  27. package/dist/components/Modal/Modal.d.ts +4 -2
  28. package/dist/components/Notification/Notification.d.ts +1 -1
  29. package/dist/components/Pagination/Pagination.d.ts +2 -2
  30. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
  31. package/dist/components/Radio/Radio.d.ts +1 -1
  32. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  33. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  34. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -2
  35. package/dist/components/SkipNavigation/SkipNavigation.d.ts +4 -2
  36. package/dist/components/Slider/Slider.d.ts +4 -2
  37. package/dist/components/StatusBadge/StatusBadge.d.ts +4 -2
  38. package/dist/components/StructuredContent/StructuredContent.d.ts +4 -2
  39. package/dist/components/StyleGuide/ColorCard.d.ts +25 -7
  40. package/dist/components/Table/Table.d.ts +4 -2
  41. package/dist/components/Tabs/Tabs.d.ts +4 -2
  42. package/dist/components/Template/Template.d.ts +7 -3
  43. package/dist/components/Text/Text.d.ts +10 -2
  44. package/dist/components/TextInput/TextInput.d.ts +1 -1
  45. package/dist/components/Toggle/Toggle.d.ts +1 -1
  46. package/dist/components/VideoPlayer/VideoPlayer.d.ts +4 -2
  47. package/dist/design-system-react-components.cjs.development.js +2929 -1863
  48. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  49. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  50. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  51. package/dist/design-system-react-components.esm.js +2839 -1805
  52. package/dist/design-system-react-components.esm.js.map +1 -1
  53. package/dist/hooks/__tests__/useNYPLBreakpoints.test.d.ts +1 -0
  54. package/dist/hooks/useCarouselStyles.d.ts +1 -1
  55. package/dist/hooks/useNYPLBreakpoints.d.ts +13 -0
  56. package/dist/index.d.ts +3 -1
  57. package/dist/resources.scss +0 -4
  58. package/dist/styles.css +3 -2
  59. package/dist/theme/components/breadcrumb.d.ts +3 -3
  60. package/dist/theme/components/button.d.ts +7 -2
  61. package/dist/theme/components/card.d.ts +4 -4
  62. package/dist/theme/components/checkbox.d.ts +3 -3
  63. package/dist/theme/components/customTable.d.ts +43 -43
  64. package/dist/theme/components/datePicker.d.ts +1 -0
  65. package/dist/theme/components/global.d.ts +6 -3
  66. package/dist/theme/components/globalMixins.d.ts +1 -4
  67. package/dist/theme/components/heading.d.ts +35 -31
  68. package/dist/theme/components/hero.d.ts +30 -40
  69. package/dist/theme/components/horizontalRule.d.ts +2 -2
  70. package/dist/theme/components/icon.d.ts +4762 -4762
  71. package/dist/theme/components/image.d.ts +60 -42
  72. package/dist/theme/components/list.d.ts +11 -11
  73. package/dist/theme/components/notification.d.ts +4 -4
  74. package/dist/theme/components/radio.d.ts +5 -2
  75. package/dist/theme/components/searchBar.d.ts +6 -0
  76. package/dist/theme/components/select.d.ts +6 -2
  77. package/dist/theme/components/skeletonLoader.d.ts +1 -1
  78. package/dist/theme/components/slider.d.ts +6 -6
  79. package/dist/theme/components/structuredContent.d.ts +33 -33
  80. package/dist/theme/components/tabs.d.ts +9 -9
  81. package/dist/theme/components/template.d.ts +7 -7
  82. package/dist/theme/components/text.d.ts +5 -1
  83. package/dist/theme/components/textInput.d.ts +4 -0
  84. package/dist/theme/components/toggle.d.ts +2 -2
  85. package/dist/theme/provider.d.ts +2 -1
  86. package/package.json +17 -17
@@ -9,8 +9,8 @@ declare const StructuredContent: {
9
9
  h1: {
10
10
  width: string;
11
11
  marginTop: string;
12
- marginLeft: string;
13
- marginRight: string;
12
+ marginStart: string;
13
+ marginEnd: string;
14
14
  fontSize: string;
15
15
  fontWeight: string;
16
16
  letterSpacing: string;
@@ -19,8 +19,8 @@ declare const StructuredContent: {
19
19
  h2: {
20
20
  width: string;
21
21
  marginTop: string;
22
- marginLeft: string;
23
- marginRight: string;
22
+ marginStart: string;
23
+ marginEnd: string;
24
24
  fontSize: string;
25
25
  fontWeight: string;
26
26
  lineHeight: string;
@@ -28,8 +28,8 @@ declare const StructuredContent: {
28
28
  h3: {
29
29
  width: string;
30
30
  marginTop: string;
31
- marginLeft: string;
32
- marginRight: string;
31
+ marginStart: string;
32
+ marginEnd: string;
33
33
  fontSize: string;
34
34
  fontWeight: string;
35
35
  lineHeight: string;
@@ -37,8 +37,8 @@ declare const StructuredContent: {
37
37
  h4: {
38
38
  width: string;
39
39
  marginTop: string;
40
- marginLeft: string;
41
- marginRight: string;
40
+ marginStart: string;
41
+ marginEnd: string;
42
42
  fontSize: string;
43
43
  fontWeight: string;
44
44
  lineHeight: string;
@@ -46,8 +46,8 @@ declare const StructuredContent: {
46
46
  fallback: {
47
47
  width: string;
48
48
  marginTop: string;
49
- marginLeft: string;
50
- marginRight: string;
49
+ marginStart: string;
50
+ marginEnd: string;
51
51
  fontSize: string;
52
52
  fontWeight: string;
53
53
  lineHeight: string;
@@ -56,23 +56,23 @@ declare const StructuredContent: {
56
56
  marginBottom: string;
57
57
  maxWidth?: string;
58
58
  float: string[];
59
- marginLeft: string[];
60
- marginRight: string[];
59
+ marginStart: string[];
60
+ marginEnd: string[];
61
61
  width: string;
62
62
  };
63
63
  imageWrapper: {
64
64
  marginBottom: string;
65
65
  maxWidth?: string;
66
66
  float: string[];
67
- marginLeft: string[];
68
- marginRight: string[];
67
+ marginStart: string[];
68
+ marginEnd: string[];
69
69
  width: string;
70
70
  };
71
71
  image: {
72
72
  maxWidth?: string;
73
73
  float: string[];
74
- marginLeft: string[];
75
- marginRight: string[];
74
+ marginStart: string[];
75
+ marginEnd: string[];
76
76
  marginBottom: string;
77
77
  };
78
78
  /** The following styles are meant to target HTML elements that are
@@ -102,14 +102,14 @@ declare const StructuredContent: {
102
102
  fontWeight: string;
103
103
  fontSize: string;
104
104
  lineHeight: string;
105
- marginLeft: string;
105
+ marginStart: string;
106
106
  width: string;
107
107
  };
108
108
  };
109
109
  margin: string;
110
110
  marginBottom: string;
111
111
  marginInlineStart: string;
112
- paddingLeft: string;
112
+ paddingStart: string;
113
113
  padding: string;
114
114
  display: string;
115
115
  };
@@ -118,11 +118,11 @@ declare const StructuredContent: {
118
118
  marginBottom: string;
119
119
  listStyle: string;
120
120
  marginInlineStart: string;
121
- paddingLeft: string;
121
+ paddingStart: string;
122
122
  padding: string;
123
123
  display: string;
124
124
  li: {
125
- marginRight: string;
125
+ marginEnd: string;
126
126
  listStyleType: string;
127
127
  _notFirst: {
128
128
  marginTop: string;
@@ -132,7 +132,7 @@ declare const StructuredContent: {
132
132
  section: {
133
133
  borderBottom: string;
134
134
  borderColor: string;
135
- paddingLeft: string;
135
+ paddingStart: string;
136
136
  h2: {
137
137
  borderTop: string;
138
138
  borderColor: string;
@@ -158,7 +158,7 @@ declare const StructuredContent: {
158
158
  md: string;
159
159
  };
160
160
  paddingTop: string;
161
- paddingRight: {
161
+ paddingEnd: {
162
162
  md: string;
163
163
  };
164
164
  };
@@ -183,7 +183,7 @@ declare const StructuredContent: {
183
183
  fontWeight: string;
184
184
  textTransform: string;
185
185
  _first: {
186
- paddingLeft: {
186
+ paddingStart: {
187
187
  base: string;
188
188
  md: string;
189
189
  };
@@ -209,8 +209,8 @@ declare const StructuredContent: {
209
209
  base: string;
210
210
  md: string;
211
211
  };
212
- paddingLeft: number;
213
- paddingRight: {
212
+ paddingStart: number;
213
+ paddingEnd: {
214
214
  base: string;
215
215
  md: string;
216
216
  };
@@ -219,7 +219,7 @@ declare const StructuredContent: {
219
219
  md: string;
220
220
  };
221
221
  _last: {
222
- paddingRight: {
222
+ paddingEnd: {
223
223
  base: string;
224
224
  md: string;
225
225
  };
@@ -235,7 +235,7 @@ declare const StructuredContent: {
235
235
  base: string;
236
236
  md: string;
237
237
  };
238
- paddingRight: string;
238
+ paddingEnd: string;
239
239
  paddingTop: {
240
240
  base: string;
241
241
  md: string;
@@ -244,7 +244,7 @@ declare const StructuredContent: {
244
244
  bg: string;
245
245
  color: string;
246
246
  fontWeight: string;
247
- paddingLeft: string;
247
+ paddingStart: string;
248
248
  };
249
249
  };
250
250
  textAlign: string;
@@ -253,7 +253,7 @@ declare const StructuredContent: {
253
253
  };
254
254
  td: {
255
255
  _first: {
256
- paddingLeft: {
256
+ paddingStart: {
257
257
  base: string;
258
258
  md: string;
259
259
  };
@@ -289,8 +289,8 @@ declare const StructuredContent: {
289
289
  base: string;
290
290
  md: string;
291
291
  };
292
- paddingLeft: number;
293
- paddingRight: {
292
+ paddingStart: number;
293
+ paddingEnd: {
294
294
  base: string;
295
295
  md: string;
296
296
  };
@@ -304,7 +304,7 @@ declare const StructuredContent: {
304
304
  base: string;
305
305
  md: string;
306
306
  };
307
- paddingRight: string;
307
+ paddingEnd: string;
308
308
  paddingTop: {
309
309
  base: string;
310
310
  md: string;
@@ -313,7 +313,7 @@ declare const StructuredContent: {
313
313
  bg: string;
314
314
  color: string;
315
315
  fontWeight: string;
316
- paddingLeft: string;
316
+ paddingStart: string;
317
317
  };
318
318
  };
319
319
  textAlign: string;
@@ -7,7 +7,7 @@ declare const CustomTabs: {
7
7
  tab: {
8
8
  color: string;
9
9
  paddingInlineStart: string;
10
- paddingLeft: string;
10
+ paddingStart: string;
11
11
  background: string;
12
12
  border: string;
13
13
  borderBottom: string;
@@ -15,11 +15,11 @@ declare const CustomTabs: {
15
15
  height: {
16
16
  base: string;
17
17
  };
18
- marginRight: {
18
+ marginEnd: {
19
19
  base: string;
20
20
  md: string;
21
21
  };
22
- paddingRight: {
22
+ paddingEnd: {
23
23
  base: string;
24
24
  md: string;
25
25
  lg: string;
@@ -53,8 +53,8 @@ declare const CustomTabs: {
53
53
  height: string;
54
54
  width: string;
55
55
  top: string;
56
- marginLeft: string;
57
- marginRight: string;
56
+ marginStart: string;
57
+ marginEnd: string;
58
58
  pos: string;
59
59
  transition: string;
60
60
  zIndex: string;
@@ -79,11 +79,11 @@ declare const CustomTabs: {
79
79
  base: string;
80
80
  md: string;
81
81
  };
82
- paddingLeft: {
82
+ paddingStart: {
83
83
  base: string;
84
84
  md: string;
85
85
  };
86
- paddingRight: {
86
+ paddingEnd: {
87
87
  base: string;
88
88
  md: string;
89
89
  };
@@ -109,11 +109,11 @@ declare const CustomTabs: {
109
109
  base: string;
110
110
  md: string;
111
111
  };
112
- paddingLeft: {
112
+ paddingStart: {
113
113
  base: string;
114
114
  md: string;
115
115
  };
116
- paddingRight: string;
116
+ paddingEnd: string;
117
117
  paddingTop: {
118
118
  base: string;
119
119
  md: string;
@@ -26,8 +26,8 @@ declare const _default: {
26
26
  baseStyle: {
27
27
  width: string;
28
28
  marginBottom: string;
29
- marginLeft: string;
30
- marginRight: string;
29
+ marginEnd: string;
30
+ marginStart: string;
31
31
  };
32
32
  };
33
33
  TemplateContent: {
@@ -39,8 +39,8 @@ declare const _default: {
39
39
  maxWidth: string;
40
40
  paddingTop: number;
41
41
  paddingBottom: number;
42
- paddingRight: string;
43
- paddingLeft: string;
42
+ paddingEnd: string;
43
+ paddingStart: string;
44
44
  width: string;
45
45
  };
46
46
  variants: {
@@ -69,7 +69,7 @@ declare const _default: {
69
69
  display: string;
70
70
  flexFlow: string;
71
71
  order: string;
72
- marginRight: {
72
+ marginEnd: {
73
73
  md: number;
74
74
  };
75
75
  minWidth: {
@@ -91,13 +91,13 @@ declare const _default: {
91
91
  };
92
92
  variants: {
93
93
  left: {
94
- marginRight: {
94
+ marginEnd: {
95
95
  base: number;
96
96
  md: string;
97
97
  };
98
98
  };
99
99
  right: {
100
- marginLeft: {
100
+ marginStart: {
101
101
  base: number;
102
102
  md: string;
103
103
  };
@@ -1,13 +1,17 @@
1
1
  interface TextBaseStyle {
2
2
  isBold: boolean;
3
3
  isItalic: boolean;
4
+ isCapitalized: boolean;
5
+ isUppercase: boolean;
6
+ isLowercase: boolean;
4
7
  noSpace: boolean;
5
8
  variant: string;
6
9
  }
7
10
  declare const Text: {
8
- baseStyle: ({ isBold, isItalic, noSpace, variant }: TextBaseStyle) => {
11
+ baseStyle: ({ isBold, isItalic, isCapitalized, isUppercase, isLowercase, noSpace, variant, }: TextBaseStyle) => {
9
12
  fontStyle: string;
10
13
  fontWeight: string;
14
+ textTransform: string;
11
15
  marginBottom: string;
12
16
  };
13
17
  variants: {
@@ -7,6 +7,10 @@ declare const TextInput: {
7
7
  borderColor: string;
8
8
  borderRadius: string;
9
9
  fontSize: string;
10
+ minHeight: {
11
+ base: string;
12
+ md: string;
13
+ };
10
14
  py: string;
11
15
  px: string;
12
16
  _hover: {
@@ -13,7 +13,7 @@ declare const _default: {
13
13
  width: string;
14
14
  };
15
15
  helperErrorText: {
16
- marginLeft: string;
16
+ marginStart: string;
17
17
  fontStyle: string;
18
18
  };
19
19
  };
@@ -60,7 +60,7 @@ declare const _default: {
60
60
  };
61
61
  label: {
62
62
  fontSize: string;
63
- marginLeft: string;
63
+ marginStart: string;
64
64
  marginTop: string;
65
65
  _disabled: {
66
66
  color: string;
@@ -1,3 +1,4 @@
1
1
  import React from "react";
2
- declare const DSProvider: ({ children }: React.PropsWithChildren<{}>) => JSX.Element;
2
+ import { ChakraProviderProps } from "@chakra-ui/react";
3
+ declare const DSProvider: ({ children, colorModeManager, }: React.PropsWithChildren<ChakraProviderProps>) => JSX.Element;
3
4
  export default DSProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "NYPL Reservoir Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,12 +58,14 @@
58
58
  "dependencies": {
59
59
  "@chakra-ui/react": ">=1.8.5 <=1.8.8",
60
60
  "@chakra-ui/system": ">=1.11.0 <=1.12.1",
61
+ "@charlietango/use-native-lazy-loading": "1.10.0",
61
62
  "@emotion/react": ">=11.4.1",
62
63
  "@emotion/styled": ">=11.3.0",
63
64
  "framer-motion": "^4.1.17",
64
65
  "react-datepicker": "4.1.1",
66
+ "react-intersection-observer": "9.2.2",
65
67
  "system-font-css": "2.0.2",
66
- "typescript": "4.3.5"
68
+ "typescript": "*"
67
69
  },
68
70
  "peerDependencies": {
69
71
  "@chakra-ui/react": ">=1.8.5 <=1.8.8",
@@ -78,17 +80,17 @@
78
80
  "devDependencies": {
79
81
  "@babel/core": "7.14.6",
80
82
  "@chakra-ui/storybook-addon": "1.0.3",
81
- "@mdx-js/react": "1.6.22",
83
+ "@jest/core": "27.3.1",
82
84
  "@size-limit/preset-small-lib": "5.0.1",
83
- "@storybook/addon-a11y": "6.4.19",
84
- "@storybook/addon-actions": "6.4.19",
85
- "@storybook/addon-docs": "6.4.19",
86
- "@storybook/addon-essentials": "6.4.19",
87
- "@storybook/addon-jest": "6.4.19",
88
- "@storybook/addon-links": "6.4.19",
89
- "@storybook/addons": "6.4.19",
90
- "@storybook/react": "6.4.19",
91
- "@svgr/rollup": "5.5.0",
85
+ "@storybook/addon-a11y": "6.5.9",
86
+ "@storybook/addon-actions": "6.5.9",
87
+ "@storybook/addon-docs": "6.5.9",
88
+ "@storybook/addon-essentials": "6.5.9",
89
+ "@storybook/addon-jest": "6.5.9",
90
+ "@storybook/addon-links": "6.5.9",
91
+ "@storybook/addons": "6.5.9",
92
+ "@storybook/react": "6.5.9",
93
+ "@svgr/rollup": "6.2.1",
92
94
  "@svgr/webpack": "5.5.0",
93
95
  "@testing-library/jest-dom": "5.14.1",
94
96
  "@testing-library/react": "12.0.0",
@@ -96,14 +98,13 @@
96
98
  "@testing-library/user-event": "13.2.1",
97
99
  "@types/jest": "26.0.20",
98
100
  "@types/jest-axe": "3.5.3",
99
- "@types/jsdom": "12.2.4",
101
+ "@types/jsdom": "16.2.4",
100
102
  "@types/node": "12.7.12",
101
103
  "@types/react": "16.14.21",
102
104
  "@types/testing-library__jest-dom": "5.14.1",
103
105
  "@typescript-eslint/eslint-plugin": "4.33.0",
104
106
  "@typescript-eslint/parser": "4.33.0",
105
107
  "autoprefixer": "9.8.8",
106
- "babel-loader": "8.2.2",
107
108
  "breakpoint-sass": "2.7.1",
108
109
  "css-loader": "5.2.7",
109
110
  "cssnano": "5.0.7",
@@ -111,14 +112,14 @@
111
112
  "eslint-config-react-app": "6.0.0",
112
113
  "eslint-plugin-flowtype": "5.8.2",
113
114
  "eslint-plugin-react-hooks": "4.2.0",
114
- "eslint-plugin-storybook": "^0.5.6",
115
+ "eslint-plugin-storybook": "0.5.12",
115
116
  "gulp": "4.0.2",
116
117
  "gulp-concat": "^2.6.1",
117
118
  "husky": "^7.0.4",
118
119
  "import-glob-loader": "1.1.0",
119
120
  "jest": "27.3.1",
120
121
  "jest-axe": "5.0.1",
121
- "jsdom": "15.2.1",
122
+ "jsdom": "16.5.0",
122
123
  "lint-staged": "10.5.4",
123
124
  "node-sass-glob-importer": "5.3.2",
124
125
  "normalize.css": "8.0.1",
@@ -132,7 +133,6 @@
132
133
  "rollup-plugin-svg": "2.0.0",
133
134
  "sass": "1.35.1",
134
135
  "sass-loader": "10.0.0",
135
- "semantic-release-slack-bot": "2.1.0",
136
136
  "size-limit": "5.0.1",
137
137
  "storybook-addon-designs": "6.2.1",
138
138
  "style-loader": "2.0.0",