@nypl/design-system-react-components 1.0.0 → 1.0.3-beta
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/README.md +3 -5
- package/dist/components/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +8 -0
- package/dist/components/Heading/Heading.d.ts +2 -0
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logo/LogoSvgs.d.ts +4 -0
- package/dist/components/Slider/Slider.d.ts +1 -2
- package/dist/components/TextInput/TextInput.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +1038 -674
- 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 +1039 -675
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/hooks/{tests → __tests__}/useCarouselStyles.test.d.ts +0 -0
- package/dist/theme/components/button.d.ts +1 -0
- package/dist/theme/components/card.d.ts +98 -13
- package/dist/theme/components/checkboxGroup.d.ts +1 -1
- package/dist/theme/components/global.d.ts +2 -2
- package/dist/theme/components/heading.d.ts +4 -16
- package/dist/theme/components/image.d.ts +6 -0
- package/dist/theme/components/radio.d.ts +8 -0
- package/dist/theme/components/radioGroup.d.ts +1 -1
- package/dist/theme/components/skipNavigation.d.ts +3 -0
- package/dist/theme/components/structuredContent.d.ts +0 -5
- package/dist/theme/components/template.d.ts +4 -1
- package/dist/utils/utils.d.ts +15 -0
- package/package.json +6 -7
- package/CHANGELOG.md +0 -1399
- package/src/__tests__/fileMock.ts +0 -6
- package/src/__tests__/setup.ts +0 -27
- package/src/__tests__/utils/utils.test.ts +0 -18
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +0 -42
- package/src/components/Accordion/Accordion.stories.mdx +0 -361
- package/src/components/Accordion/Accordion.test.tsx +0 -237
- package/src/components/Accordion/Accordion.tsx +0 -136
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +0 -734
- package/src/components/Autosuggest/Autosuggest.stories.mdx +0 -75
- package/src/components/Autosuggest/Autosuggest.stories.tsx +0 -211
- package/src/components/Autosuggest/_Autosuggest.scss +0 -51
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +0 -231
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +0 -144
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -98
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +0 -695
- package/src/components/Button/Button.stories.mdx +0 -320
- package/src/components/Button/Button.test.tsx +0 -184
- package/src/components/Button/Button.tsx +0 -95
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +0 -106
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +0 -147
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +0 -141
- package/src/components/ButtonGroup/ButtonGroup.tsx +0 -99
- package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +0 -117
- package/src/components/Card/Card.stories.mdx +0 -1043
- package/src/components/Card/Card.test.tsx +0 -388
- package/src/components/Card/Card.tsx +0 -345
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +0 -568
- package/src/components/Chakra/Box.stories.mdx +0 -52
- package/src/components/Chakra/Center.stories.mdx +0 -96
- package/src/components/Chakra/Flex.stories.mdx +0 -111
- package/src/components/Chakra/Grid.stories.mdx +0 -89
- package/src/components/Chakra/Stack.stories.mdx +0 -109
- package/src/components/Checkbox/Checkbox.stories.mdx +0 -243
- package/src/components/Checkbox/Checkbox.test.tsx +0 -319
- package/src/components/Checkbox/Checkbox.tsx +0 -166
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -616
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +0 -462
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +0 -492
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +0 -173
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -1722
- package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +0 -163
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +0 -67
- package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +0 -98
- package/src/components/DatePicker/DatePicker.stories.mdx +0 -452
- package/src/components/DatePicker/DatePicker.test.tsx +0 -940
- package/src/components/DatePicker/DatePicker.tsx +0 -450
- package/src/components/DatePicker/_DatePicker.scss +0 -100
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +0 -889
- package/src/components/Fieldset/Fieldset.stories.mdx +0 -96
- package/src/components/Fieldset/Fieldset.test.tsx +0 -155
- package/src/components/Fieldset/Fieldset.tsx +0 -55
- package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +0 -89
- package/src/components/Form/Form.stories.mdx +0 -426
- package/src/components/Form/Form.test.tsx +0 -234
- package/src/components/Form/Form.tsx +0 -124
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +0 -115
- package/src/components/Grid/SimpleGrid.stories.mdx +0 -338
- package/src/components/Grid/SimpleGrid.test.tsx +0 -79
- package/src/components/Grid/SimpleGrid.tsx +0 -49
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +0 -23
- package/src/components/Heading/Heading.stories.mdx +0 -184
- package/src/components/Heading/Heading.test.tsx +0 -171
- package/src/components/Heading/Heading.tsx +0 -101
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +0 -90
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +0 -172
- package/src/components/HelperErrorText/HelperErrorText.test.tsx +0 -114
- package/src/components/HelperErrorText/HelperErrorText.tsx +0 -62
- package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +0 -93
- package/src/components/Hero/Hero.stories.mdx +0 -378
- package/src/components/Hero/Hero.test.tsx +0 -611
- package/src/components/Hero/Hero.tsx +0 -203
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +0 -379
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +0 -73
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +0 -54
- package/src/components/HorizontalRule/HorizontalRule.tsx +0 -27
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +0 -44
- package/src/components/Icons/Icon.stories.mdx +0 -413
- package/src/components/Icons/Icon.test.tsx +0 -120
- package/src/components/Icons/Icon.tsx +0 -187
- package/src/components/Icons/IconSvgs.tsx +0 -64
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +0 -129
- package/src/components/Image/Image.stories.mdx +0 -332
- package/src/components/Image/Image.test.tsx +0 -155
- package/src/components/Image/Image.tsx +0 -171
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +0 -269
- package/src/components/Label/Label.stories.mdx +0 -100
- package/src/components/Label/Label.test.tsx +0 -116
- package/src/components/Label/Label.tsx +0 -55
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +0 -45
- package/src/components/Link/Link.stories.mdx +0 -249
- package/src/components/Link/Link.test.tsx +0 -224
- package/src/components/Link/Link.tsx +0 -178
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +0 -286
- package/src/components/List/List.stories.mdx +0 -393
- package/src/components/List/List.test.tsx +0 -265
- package/src/components/List/List.tsx +0 -156
- package/src/components/List/__snapshots__/List.test.tsx.snap +0 -213
- package/src/components/Logo/Logo.stories.mdx +0 -290
- package/src/components/Logo/Logo.test.tsx +0 -116
- package/src/components/Logo/Logo.tsx +0 -147
- package/src/components/Logo/LogoSvgs.tsx +0 -82
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +0 -142
- package/src/components/Modal/Modal.stories.mdx +0 -301
- package/src/components/Modal/Modal.test.tsx +0 -157
- package/src/components/Modal/Modal.tsx +0 -154
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +0 -25
- package/src/components/Notification/Notification.stories.mdx +0 -358
- package/src/components/Notification/Notification.test.tsx +0 -279
- package/src/components/Notification/Notification.tsx +0 -224
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +0 -525
- package/src/components/Pagination/Pagination.stories.mdx +0 -184
- package/src/components/Pagination/Pagination.test.tsx +0 -419
- package/src/components/Pagination/Pagination.tsx +0 -269
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +0 -544
- package/src/components/Placeholder/Placeholder.tsx +0 -19
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +0 -360
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +0 -298
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +0 -132
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -434
- package/src/components/Radio/Radio.stories.mdx +0 -216
- package/src/components/Radio/Radio.test.tsx +0 -247
- package/src/components/Radio/Radio.tsx +0 -128
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +0 -411
- package/src/components/RadioGroup/RadioGroup.stories.mdx +0 -478
- package/src/components/RadioGroup/RadioGroup.test.tsx +0 -471
- package/src/components/RadioGroup/RadioGroup.tsx +0 -170
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +0 -1430
- package/src/components/SearchBar/SearchBar.stories.mdx +0 -518
- package/src/components/SearchBar/SearchBar.test.tsx +0 -435
- package/src/components/SearchBar/SearchBar.tsx +0 -210
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +0 -1027
- package/src/components/Select/Select.stories.mdx +0 -439
- package/src/components/Select/Select.test.tsx +0 -358
- package/src/components/Select/Select.tsx +0 -181
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +0 -885
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +0 -142
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +0 -116
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +0 -123
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +0 -898
- package/src/components/SkipNavigation/SkipNavigation.stories.mdx +0 -90
- package/src/components/SkipNavigation/SkipNavigation.test.tsx +0 -63
- package/src/components/SkipNavigation/SkipNavigation.tsx +0 -51
- package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +0 -130
- package/src/components/Slider/Slider.stories.mdx +0 -628
- package/src/components/Slider/Slider.test.tsx +0 -736
- package/src/components/Slider/Slider.tsx +0 -322
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +0 -2153
- package/src/components/StatusBadge/StatusBadge.stories.mdx +0 -109
- package/src/components/StatusBadge/StatusBadge.test.tsx +0 -70
- package/src/components/StatusBadge/StatusBadge.tsx +0 -35
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +0 -47
- package/src/components/StructuredContent/StructuredContent.stories.mdx +0 -567
- package/src/components/StructuredContent/StructuredContent.test.tsx +0 -435
- package/src/components/StructuredContent/StructuredContent.tsx +0 -139
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +0 -368
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +0 -206
- package/src/components/StyleGuide/Breakpoints.stories.mdx +0 -55
- package/src/components/StyleGuide/Buttons.stories.mdx +0 -194
- package/src/components/StyleGuide/ColorCard.tsx +0 -43
- package/src/components/StyleGuide/Colors.stories.mdx +0 -201
- package/src/components/StyleGuide/DesignTokens.stories.mdx +0 -193
- package/src/components/StyleGuide/Forms.stories.mdx +0 -94
- package/src/components/StyleGuide/Iconography.stories.mdx +0 -142
- package/src/components/StyleGuide/Spacing.stories.mdx +0 -116
- package/src/components/StyleGuide/Typography.stories.mdx +0 -419
- package/src/components/Table/Table.stories.mdx +0 -276
- package/src/components/Table/Table.test.tsx +0 -208
- package/src/components/Table/Table.tsx +0 -131
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +0 -1703
- package/src/components/Tabs/Tabs.stories.mdx +0 -338
- package/src/components/Tabs/Tabs.test.tsx +0 -298
- package/src/components/Tabs/Tabs.tsx +0 -264
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +0 -584
- package/src/components/Template/Template.stories.mdx +0 -691
- package/src/components/Template/Template.test.tsx +0 -309
- package/src/components/Template/Template.tsx +0 -326
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +0 -342
- package/src/components/Text/Text.stories.mdx +0 -103
- package/src/components/Text/Text.test.tsx +0 -63
- package/src/components/Text/Text.tsx +0 -50
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +0 -50
- package/src/components/TextInput/TextInput.stories.mdx +0 -268
- package/src/components/TextInput/TextInput.test.tsx +0 -451
- package/src/components/TextInput/TextInput.tsx +0 -240
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +0 -264
- package/src/components/Toggle/Toggle.stories.mdx +0 -237
- package/src/components/Toggle/Toggle.test.tsx +0 -170
- package/src/components/Toggle/Toggle.tsx +0 -126
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +0 -442
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +0 -211
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +0 -308
- package/src/components/VideoPlayer/VideoPlayer.tsx +0 -188
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +0 -187
- package/src/docs/Chakra.stories.mdx +0 -563
- package/src/docs/Welcome.stories.mdx +0 -148
- package/src/helpers/types.ts +0 -1
- package/src/hooks/tests/useCarouselStyles.test.ts +0 -140
- package/src/hooks/tests/useNYPLTheme.test.tsx +0 -36
- package/src/hooks/useCarouselStyles.stories.mdx +0 -30
- package/src/hooks/useCarouselStyles.ts +0 -35
- package/src/hooks/useNYPLTheme.stories.mdx +0 -98
- package/src/hooks/useNYPLTheme.ts +0 -91
- package/src/hooks/useWindowSize.stories.mdx +0 -23
- package/src/hooks/useWindowSize.ts +0 -40
- package/src/index.ts +0 -136
- package/src/resources.scss +0 -6
- package/src/styles/base/_01-breakpoints.scss +0 -27
- package/src/styles/base/_02-mixins.scss +0 -103
- package/src/styles/base/_place-holder.scss +0 -33
- package/src/styles/space/_space-inline.scss +0 -79
- package/src/styles/space/_space-inset.scss +0 -57
- package/src/styles/space/_space-stack.scss +0 -116
- package/src/styles.scss +0 -23
- package/src/theme/components/accordion.ts +0 -25
- package/src/theme/components/breadcrumb.ts +0 -94
- package/src/theme/components/button.ts +0 -132
- package/src/theme/components/buttonGroup.ts +0 -10
- package/src/theme/components/card.ts +0 -231
- package/src/theme/components/checkbox.ts +0 -110
- package/src/theme/components/checkboxGroup.ts +0 -10
- package/src/theme/components/componentWrapper.ts +0 -14
- package/src/theme/components/customTable.ts +0 -77
- package/src/theme/components/datePicker.ts +0 -17
- package/src/theme/components/fieldset.ts +0 -23
- package/src/theme/components/global.ts +0 -91
- package/src/theme/components/globalMixins.ts +0 -24
- package/src/theme/components/heading.ts +0 -79
- package/src/theme/components/helperErrorText.ts +0 -14
- package/src/theme/components/hero.ts +0 -238
- package/src/theme/components/horizontalRule.ts +0 -17
- package/src/theme/components/icon.ts +0 -88
- package/src/theme/components/image.ts +0 -135
- package/src/theme/components/label.ts +0 -15
- package/src/theme/components/link.ts +0 -63
- package/src/theme/components/list.ts +0 -88
- package/src/theme/components/logo.ts +0 -58
- package/src/theme/components/notification.ts +0 -132
- package/src/theme/components/pagination.ts +0 -17
- package/src/theme/components/progressIndicator.ts +0 -67
- package/src/theme/components/radio.ts +0 -103
- package/src/theme/components/radioGroup.ts +0 -10
- package/src/theme/components/searchBar.ts +0 -19
- package/src/theme/components/select.ts +0 -72
- package/src/theme/components/skeletonLoader.ts +0 -113
- package/src/theme/components/skipNavigation.ts +0 -26
- package/src/theme/components/slider.ts +0 -95
- package/src/theme/components/statusBadge.ts +0 -26
- package/src/theme/components/structuredContent.ts +0 -149
- package/src/theme/components/tabs.ts +0 -109
- package/src/theme/components/template.ts +0 -114
- package/src/theme/components/text.ts +0 -38
- package/src/theme/components/textInput.ts +0 -65
- package/src/theme/components/toggle.ts +0 -109
- package/src/theme/components/videoPlayer.ts +0 -47
- package/src/theme/foundations/breakpoints.ts +0 -24
- package/src/theme/foundations/colors.ts +0 -212
- package/src/theme/foundations/global.ts +0 -43
- package/src/theme/foundations/radii.ts +0 -7
- package/src/theme/foundations/shadows.ts +0 -5
- package/src/theme/foundations/spacing.ts +0 -136
- package/src/theme/foundations/typography.ts +0 -107
- package/src/theme/index.ts +0 -131
- package/src/theme/provider.tsx +0 -9
- package/src/theme/types.ts +0 -1
- package/src/utils/componentCategories.ts +0 -152
- package/src/utils/interfaces.ts +0 -5
- package/src/utils/utils.ts +0 -44
|
File without changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface CardBaseStyleProps {
|
|
2
2
|
hasImage: boolean;
|
|
3
3
|
imageIsAtEnd: boolean;
|
|
4
|
+
isAlignedRightActions: boolean;
|
|
4
5
|
isBordered: boolean;
|
|
5
6
|
isCentered: boolean;
|
|
6
7
|
layout: string;
|
|
@@ -50,7 +51,7 @@ declare const imageSizes: {
|
|
|
50
51
|
declare const _default: {
|
|
51
52
|
Card: {
|
|
52
53
|
parts: string[];
|
|
53
|
-
baseStyle: ({ hasImage, imageIsAtEnd, isBordered, isCentered, layout, mainActionLink, }: CardBaseStyleProps) => {
|
|
54
|
+
baseStyle: ({ hasImage, imageIsAtEnd, isAlignedRightActions, isBordered, isCentered, layout, mainActionLink, }: CardBaseStyleProps) => {
|
|
54
55
|
display: string;
|
|
55
56
|
flexFlow: {
|
|
56
57
|
base: string;
|
|
@@ -62,19 +63,40 @@ declare const _default: {
|
|
|
62
63
|
border: string;
|
|
63
64
|
borderColor: string;
|
|
64
65
|
actions: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
flexShrink: {
|
|
67
|
+
base: string;
|
|
68
|
+
md: string;
|
|
69
|
+
};
|
|
70
|
+
marginLeft: {
|
|
71
|
+
base: string;
|
|
72
|
+
md: string;
|
|
73
|
+
};
|
|
74
|
+
marginTop: {
|
|
75
|
+
base: string;
|
|
76
|
+
md: string;
|
|
77
|
+
};
|
|
78
|
+
maxWidth: {
|
|
79
|
+
base: string;
|
|
80
|
+
md: string;
|
|
81
|
+
};
|
|
82
|
+
width: string;
|
|
68
83
|
};
|
|
69
84
|
body: {
|
|
70
85
|
display: {
|
|
71
86
|
md: string;
|
|
72
87
|
};
|
|
88
|
+
flexBasis: {
|
|
89
|
+
sm: string;
|
|
90
|
+
};
|
|
73
91
|
flexFlow: {
|
|
74
92
|
md: string;
|
|
75
93
|
};
|
|
76
94
|
margin: any;
|
|
77
95
|
padding: any;
|
|
96
|
+
width: {
|
|
97
|
+
base: string;
|
|
98
|
+
md: string;
|
|
99
|
+
};
|
|
78
100
|
};
|
|
79
101
|
heading: {
|
|
80
102
|
marginBottom: string;
|
|
@@ -91,19 +113,40 @@ declare const _default: {
|
|
|
91
113
|
border: string;
|
|
92
114
|
borderColor: string;
|
|
93
115
|
actions: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
flexShrink: {
|
|
117
|
+
base: string;
|
|
118
|
+
md: string;
|
|
119
|
+
};
|
|
120
|
+
marginLeft: {
|
|
121
|
+
base: string;
|
|
122
|
+
md: string;
|
|
123
|
+
};
|
|
124
|
+
marginTop: {
|
|
125
|
+
base: string;
|
|
126
|
+
md: string;
|
|
127
|
+
};
|
|
128
|
+
maxWidth: {
|
|
129
|
+
base: string;
|
|
130
|
+
md: string;
|
|
131
|
+
};
|
|
132
|
+
width: string;
|
|
97
133
|
};
|
|
98
134
|
body: {
|
|
99
135
|
display: {
|
|
100
136
|
md: string;
|
|
101
137
|
};
|
|
138
|
+
flexBasis: {
|
|
139
|
+
sm: string;
|
|
140
|
+
};
|
|
102
141
|
flexFlow: {
|
|
103
142
|
md: string;
|
|
104
143
|
};
|
|
105
144
|
margin: any;
|
|
106
145
|
padding: any;
|
|
146
|
+
width: {
|
|
147
|
+
base: string;
|
|
148
|
+
md: string;
|
|
149
|
+
};
|
|
107
150
|
};
|
|
108
151
|
heading: {
|
|
109
152
|
marginBottom: string;
|
|
@@ -123,19 +166,40 @@ declare const _default: {
|
|
|
123
166
|
border?: undefined;
|
|
124
167
|
borderColor?: undefined;
|
|
125
168
|
actions: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
169
|
+
flexShrink: {
|
|
170
|
+
base: string;
|
|
171
|
+
md: string;
|
|
172
|
+
};
|
|
173
|
+
marginLeft: {
|
|
174
|
+
base: string;
|
|
175
|
+
md: string;
|
|
176
|
+
};
|
|
177
|
+
marginTop: {
|
|
178
|
+
base: string;
|
|
179
|
+
md: string;
|
|
180
|
+
};
|
|
181
|
+
maxWidth: {
|
|
182
|
+
base: string;
|
|
183
|
+
md: string;
|
|
184
|
+
};
|
|
185
|
+
width: string;
|
|
129
186
|
};
|
|
130
187
|
body: {
|
|
131
188
|
display: {
|
|
132
189
|
md: string;
|
|
133
190
|
};
|
|
191
|
+
flexBasis: {
|
|
192
|
+
sm: string;
|
|
193
|
+
};
|
|
134
194
|
flexFlow: {
|
|
135
195
|
md: string;
|
|
136
196
|
};
|
|
137
197
|
margin: any;
|
|
138
198
|
padding: any;
|
|
199
|
+
width: {
|
|
200
|
+
base: string;
|
|
201
|
+
md: string;
|
|
202
|
+
};
|
|
139
203
|
};
|
|
140
204
|
heading: {
|
|
141
205
|
marginBottom: string;
|
|
@@ -152,19 +216,40 @@ declare const _default: {
|
|
|
152
216
|
border?: undefined;
|
|
153
217
|
borderColor?: undefined;
|
|
154
218
|
actions: {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
219
|
+
flexShrink: {
|
|
220
|
+
base: string;
|
|
221
|
+
md: string;
|
|
222
|
+
};
|
|
223
|
+
marginLeft: {
|
|
224
|
+
base: string;
|
|
225
|
+
md: string;
|
|
226
|
+
};
|
|
227
|
+
marginTop: {
|
|
228
|
+
base: string;
|
|
229
|
+
md: string;
|
|
230
|
+
};
|
|
231
|
+
maxWidth: {
|
|
232
|
+
base: string;
|
|
233
|
+
md: string;
|
|
234
|
+
};
|
|
235
|
+
width: string;
|
|
158
236
|
};
|
|
159
237
|
body: {
|
|
160
238
|
display: {
|
|
161
239
|
md: string;
|
|
162
240
|
};
|
|
241
|
+
flexBasis: {
|
|
242
|
+
sm: string;
|
|
243
|
+
};
|
|
163
244
|
flexFlow: {
|
|
164
245
|
md: string;
|
|
165
246
|
};
|
|
166
247
|
margin: any;
|
|
167
248
|
padding: any;
|
|
249
|
+
width: {
|
|
250
|
+
base: string;
|
|
251
|
+
md: string;
|
|
252
|
+
};
|
|
168
253
|
};
|
|
169
254
|
heading: {
|
|
170
255
|
marginBottom: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Export "mixin" styles. */
|
|
2
|
-
export { wrapperStyles } from "./globalMixins";
|
|
2
|
+
export { screenreaderOnly, wrapperStyles } from "./globalMixins";
|
|
3
3
|
/** Reusable component styles. */
|
|
4
4
|
declare const activeFocus: (darkMode?: boolean) => {
|
|
5
5
|
boxShadow: string;
|
|
@@ -38,7 +38,7 @@ declare const checkboxRadioGroupStyles: (isFullWidth?: boolean) => {
|
|
|
38
38
|
helperErrorText: {
|
|
39
39
|
marginTop: string;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
label: {
|
|
42
42
|
width: string;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
@@ -4,7 +4,6 @@ export declare const headings: {
|
|
|
4
4
|
marginTop: string;
|
|
5
5
|
marginLeft: string;
|
|
6
6
|
marginRight: string;
|
|
7
|
-
marginBottom: string;
|
|
8
7
|
fontSize: string;
|
|
9
8
|
fontWeight: string;
|
|
10
9
|
letterSpacing: string;
|
|
@@ -15,7 +14,6 @@ export declare const headings: {
|
|
|
15
14
|
marginTop: string;
|
|
16
15
|
marginLeft: string;
|
|
17
16
|
marginRight: string;
|
|
18
|
-
marginBottom: string;
|
|
19
17
|
fontSize: string;
|
|
20
18
|
fontWeight: string;
|
|
21
19
|
lineHeight: string;
|
|
@@ -25,7 +23,6 @@ export declare const headings: {
|
|
|
25
23
|
marginTop: string;
|
|
26
24
|
marginLeft: string;
|
|
27
25
|
marginRight: string;
|
|
28
|
-
marginBottom: string;
|
|
29
26
|
fontSize: string;
|
|
30
27
|
fontWeight: string;
|
|
31
28
|
lineHeight: string;
|
|
@@ -35,7 +32,6 @@ export declare const headings: {
|
|
|
35
32
|
marginTop: string;
|
|
36
33
|
marginLeft: string;
|
|
37
34
|
marginRight: string;
|
|
38
|
-
marginBottom: string;
|
|
39
35
|
fontSize: string;
|
|
40
36
|
fontWeight: string;
|
|
41
37
|
lineHeight: string;
|
|
@@ -45,14 +41,15 @@ export declare const headings: {
|
|
|
45
41
|
marginTop: string;
|
|
46
42
|
marginLeft: string;
|
|
47
43
|
marginRight: string;
|
|
48
|
-
marginBottom: string;
|
|
49
44
|
fontSize: string;
|
|
50
45
|
fontWeight: string;
|
|
51
46
|
lineHeight: string;
|
|
52
47
|
};
|
|
53
48
|
};
|
|
54
49
|
declare const Heading: {
|
|
55
|
-
baseStyle: {
|
|
50
|
+
baseStyle: ({ noSpace }: {
|
|
51
|
+
noSpace: any;
|
|
52
|
+
}) => {
|
|
56
53
|
a: {
|
|
57
54
|
color: string;
|
|
58
55
|
textDecoration: string;
|
|
@@ -60,6 +57,7 @@ declare const Heading: {
|
|
|
60
57
|
color: string;
|
|
61
58
|
};
|
|
62
59
|
};
|
|
60
|
+
marginBottom: string;
|
|
63
61
|
};
|
|
64
62
|
variants: {
|
|
65
63
|
h1: {
|
|
@@ -67,7 +65,6 @@ declare const Heading: {
|
|
|
67
65
|
marginTop: string;
|
|
68
66
|
marginLeft: string;
|
|
69
67
|
marginRight: string;
|
|
70
|
-
marginBottom: string;
|
|
71
68
|
fontSize: string;
|
|
72
69
|
fontWeight: string;
|
|
73
70
|
letterSpacing: string;
|
|
@@ -78,7 +75,6 @@ declare const Heading: {
|
|
|
78
75
|
marginTop: string;
|
|
79
76
|
marginLeft: string;
|
|
80
77
|
marginRight: string;
|
|
81
|
-
marginBottom: string;
|
|
82
78
|
fontSize: string;
|
|
83
79
|
fontWeight: string;
|
|
84
80
|
lineHeight: string;
|
|
@@ -88,7 +84,6 @@ declare const Heading: {
|
|
|
88
84
|
marginTop: string;
|
|
89
85
|
marginLeft: string;
|
|
90
86
|
marginRight: string;
|
|
91
|
-
marginBottom: string;
|
|
92
87
|
fontSize: string;
|
|
93
88
|
fontWeight: string;
|
|
94
89
|
lineHeight: string;
|
|
@@ -98,7 +93,6 @@ declare const Heading: {
|
|
|
98
93
|
marginTop: string;
|
|
99
94
|
marginLeft: string;
|
|
100
95
|
marginRight: string;
|
|
101
|
-
marginBottom: string;
|
|
102
96
|
fontSize: string;
|
|
103
97
|
fontWeight: string;
|
|
104
98
|
lineHeight: string;
|
|
@@ -108,7 +102,6 @@ declare const Heading: {
|
|
|
108
102
|
marginTop: string;
|
|
109
103
|
marginLeft: string;
|
|
110
104
|
marginRight: string;
|
|
111
|
-
marginBottom: string;
|
|
112
105
|
fontSize: string;
|
|
113
106
|
fontWeight: string;
|
|
114
107
|
lineHeight: string;
|
|
@@ -118,7 +111,6 @@ declare const Heading: {
|
|
|
118
111
|
marginTop: string;
|
|
119
112
|
marginLeft: string;
|
|
120
113
|
marginRight: string;
|
|
121
|
-
marginBottom: string;
|
|
122
114
|
fontSize: string;
|
|
123
115
|
fontWeight: string;
|
|
124
116
|
lineHeight: string;
|
|
@@ -128,7 +120,6 @@ declare const Heading: {
|
|
|
128
120
|
marginTop: string;
|
|
129
121
|
marginLeft: string;
|
|
130
122
|
marginRight: string;
|
|
131
|
-
marginBottom: string;
|
|
132
123
|
fontSize: string;
|
|
133
124
|
fontWeight: string;
|
|
134
125
|
letterSpacing: string;
|
|
@@ -139,7 +130,6 @@ declare const Heading: {
|
|
|
139
130
|
marginTop: string;
|
|
140
131
|
marginLeft: string;
|
|
141
132
|
marginRight: string;
|
|
142
|
-
marginBottom: string;
|
|
143
133
|
fontSize: string;
|
|
144
134
|
fontWeight: string;
|
|
145
135
|
lineHeight: string;
|
|
@@ -149,7 +139,6 @@ declare const Heading: {
|
|
|
149
139
|
marginTop: string;
|
|
150
140
|
marginLeft: string;
|
|
151
141
|
marginRight: string;
|
|
152
|
-
marginBottom: string;
|
|
153
142
|
fontSize: string;
|
|
154
143
|
fontWeight: string;
|
|
155
144
|
lineHeight: string;
|
|
@@ -159,7 +148,6 @@ declare const Heading: {
|
|
|
159
148
|
marginTop: string;
|
|
160
149
|
marginLeft: string;
|
|
161
150
|
marginRight: string;
|
|
162
|
-
marginBottom: string;
|
|
163
151
|
fontSize: string;
|
|
164
152
|
fontWeight: string;
|
|
165
153
|
lineHeight: string;
|
|
@@ -108,6 +108,7 @@ declare const CustomImage: {
|
|
|
108
108
|
};
|
|
109
109
|
maxWidth: string;
|
|
110
110
|
margin: string;
|
|
111
|
+
width: string;
|
|
111
112
|
} | {
|
|
112
113
|
img: {
|
|
113
114
|
marginBottom: string;
|
|
@@ -116,6 +117,7 @@ declare const CustomImage: {
|
|
|
116
117
|
marginLeft: string;
|
|
117
118
|
marginRight: string;
|
|
118
119
|
margin: string;
|
|
120
|
+
width: string;
|
|
119
121
|
} | {
|
|
120
122
|
img: {
|
|
121
123
|
marginBottom: string;
|
|
@@ -124,6 +126,7 @@ declare const CustomImage: {
|
|
|
124
126
|
marginLeft: string;
|
|
125
127
|
marginRight: string;
|
|
126
128
|
margin: string;
|
|
129
|
+
width: string;
|
|
127
130
|
} | {
|
|
128
131
|
img: {
|
|
129
132
|
marginBottom: string;
|
|
@@ -132,6 +135,7 @@ declare const CustomImage: {
|
|
|
132
135
|
marginLeft: string;
|
|
133
136
|
marginRight: string;
|
|
134
137
|
margin: string;
|
|
138
|
+
width: string;
|
|
135
139
|
} | {
|
|
136
140
|
img: {
|
|
137
141
|
marginBottom: string;
|
|
@@ -140,6 +144,7 @@ declare const CustomImage: {
|
|
|
140
144
|
marginLeft: string;
|
|
141
145
|
marginRight: string;
|
|
142
146
|
margin: string;
|
|
147
|
+
width: string;
|
|
143
148
|
} | {
|
|
144
149
|
img: {
|
|
145
150
|
marginBottom: string;
|
|
@@ -148,6 +153,7 @@ declare const CustomImage: {
|
|
|
148
153
|
marginLeft: string;
|
|
149
154
|
marginRight: string;
|
|
150
155
|
margin: string;
|
|
156
|
+
width: string;
|
|
151
157
|
};
|
|
152
158
|
figcaption: {
|
|
153
159
|
fontStyle: string;
|
|
@@ -11,7 +11,6 @@ declare const StructuredContent: {
|
|
|
11
11
|
marginTop: string;
|
|
12
12
|
marginLeft: string;
|
|
13
13
|
marginRight: string;
|
|
14
|
-
marginBottom: string;
|
|
15
14
|
fontSize: string;
|
|
16
15
|
fontWeight: string;
|
|
17
16
|
letterSpacing: string;
|
|
@@ -22,7 +21,6 @@ declare const StructuredContent: {
|
|
|
22
21
|
marginTop: string;
|
|
23
22
|
marginLeft: string;
|
|
24
23
|
marginRight: string;
|
|
25
|
-
marginBottom: string;
|
|
26
24
|
fontSize: string;
|
|
27
25
|
fontWeight: string;
|
|
28
26
|
lineHeight: string;
|
|
@@ -32,7 +30,6 @@ declare const StructuredContent: {
|
|
|
32
30
|
marginTop: string;
|
|
33
31
|
marginLeft: string;
|
|
34
32
|
marginRight: string;
|
|
35
|
-
marginBottom: string;
|
|
36
33
|
fontSize: string;
|
|
37
34
|
fontWeight: string;
|
|
38
35
|
lineHeight: string;
|
|
@@ -42,7 +39,6 @@ declare const StructuredContent: {
|
|
|
42
39
|
marginTop: string;
|
|
43
40
|
marginLeft: string;
|
|
44
41
|
marginRight: string;
|
|
45
|
-
marginBottom: string;
|
|
46
42
|
fontSize: string;
|
|
47
43
|
fontWeight: string;
|
|
48
44
|
lineHeight: string;
|
|
@@ -52,7 +48,6 @@ declare const StructuredContent: {
|
|
|
52
48
|
marginTop: string;
|
|
53
49
|
marginLeft: string;
|
|
54
50
|
marginRight: string;
|
|
55
|
-
marginBottom: string;
|
|
56
51
|
fontSize: string;
|
|
57
52
|
fontWeight: string;
|
|
58
53
|
lineHeight: string;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HelperErrorTextType } from "../components/HelperErrorText/HelperErrorText";
|
|
2
|
+
import { AriaAttributes } from "./interfaces";
|
|
1
3
|
/**
|
|
2
4
|
* range
|
|
3
5
|
* Get an array of values from `start` to `stop` - 1 with an optional
|
|
@@ -14,3 +16,16 @@ export declare const getStorybookHrefProps: (pageCount: number) => {
|
|
|
14
16
|
computedCurrentPage: number;
|
|
15
17
|
getPageHref: (selectedPage: number) => string;
|
|
16
18
|
};
|
|
19
|
+
interface GetAriaAttrsProps {
|
|
20
|
+
footnote: HelperErrorTextType;
|
|
21
|
+
id: string;
|
|
22
|
+
labelText: HelperErrorTextType;
|
|
23
|
+
name: string;
|
|
24
|
+
showLabel: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get aria-* attributes for input components. This sets the `aria-label` and
|
|
28
|
+
* `aria-describedby` attributes, based on the label and footnote values.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getAriaAttrs: ({ footnote, id, labelText, name, showLabel, }: GetAriaAttrsProps) => AriaAttributes;
|
|
31
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nypl/design-system-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-beta",
|
|
4
4
|
"description": "NYPL Reservoir Design System React Components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"module": "dist/design-system-react-components.esm.js",
|
|
12
12
|
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
"src"
|
|
13
|
+
"dist"
|
|
15
14
|
],
|
|
16
15
|
"engines": {
|
|
17
16
|
"node": ">10"
|
|
@@ -57,8 +56,8 @@
|
|
|
57
56
|
}
|
|
58
57
|
],
|
|
59
58
|
"dependencies": {
|
|
60
|
-
"@chakra-ui/react": ">=1.8.5",
|
|
61
|
-
"@chakra-ui/system": ">=1.11.0",
|
|
59
|
+
"@chakra-ui/react": ">=1.8.5 <=1.8.8",
|
|
60
|
+
"@chakra-ui/system": ">=1.11.0 <=1.12.1",
|
|
62
61
|
"@emotion/react": ">=11.4.1",
|
|
63
62
|
"@emotion/styled": ">=11.3.0",
|
|
64
63
|
"framer-motion": "^4.1.17",
|
|
@@ -68,8 +67,8 @@
|
|
|
68
67
|
"typescript": "4.3.5"
|
|
69
68
|
},
|
|
70
69
|
"peerDependencies": {
|
|
71
|
-
"@chakra-ui/react": ">=1.8.
|
|
72
|
-
"@chakra-ui/system": ">=1.
|
|
70
|
+
"@chakra-ui/react": ">=1.8.5 <=1.8.8",
|
|
71
|
+
"@chakra-ui/system": ">=1.11.0 <=1.12.1",
|
|
73
72
|
"@emotion/react": ">=11.4.1",
|
|
74
73
|
"@emotion/styled": ">=11.3.0",
|
|
75
74
|
"framer-motion": "^4.1.17",
|