@nypl/design-system-react-components 4.0.0-remove-matchMedia-test → 4.0.1-rc
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 +125 -201
- package/dist/design-system-react-components.cjs +58 -58
- package/dist/design-system-react-components.js +17467 -18102
- package/dist/readme/componentheader.png +0 -0
- package/dist/src/components/Accordion/Accordion.d.ts +7 -9
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +2 -6
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +4 -13
- package/dist/src/components/Banner/Banner.d.ts +9 -16
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +7 -11
- package/dist/src/components/Button/Button.d.ts +10 -17
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -6
- package/dist/src/components/ButtonGroup/ButtonGroupContext.d.ts +3 -0
- package/dist/src/components/Card/Card.d.ts +3 -7
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -12
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +4 -8
- package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +10 -0
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +2 -7
- package/dist/src/components/DatePicker/DatePicker.d.ts +4 -8
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +3 -7
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -6
- package/dist/src/components/Fieldset/Fieldset.d.ts +2 -6
- package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +2 -6
- package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +2 -6
- package/dist/src/components/Form/Form.d.ts +10 -15
- package/dist/src/components/Grid/SimpleGrid.d.ts +2 -6
- package/dist/src/components/Heading/Heading.d.ts +2 -9
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +2 -7
- package/dist/src/components/Hero/Hero.d.ts +11 -13
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -6
- package/dist/src/components/Icons/Icon.d.ts +5 -9
- package/dist/src/components/Icons/IconSvgs.d.ts +3 -0
- package/dist/src/components/Icons/iconVariables.d.ts +3 -3
- package/dist/src/components/Image/Image.d.ts +2 -14
- package/dist/src/components/Label/Label.d.ts +3 -9
- package/dist/src/components/Link/Link.d.ts +8 -18
- package/dist/src/components/List/List.d.ts +5 -14
- package/dist/src/components/Logo/Logo.d.ts +2 -6
- package/dist/src/components/Menu/Menu.d.ts +2 -6
- package/dist/src/components/Modal/Modal.d.ts +8 -11
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +9 -10
- package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +2 -5
- package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +2 -6
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +6 -11
- package/dist/src/components/Notification/Notification.d.ts +9 -13
- package/dist/src/components/Pagination/Pagination.d.ts +2 -6
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +3 -5
- package/dist/src/components/Radio/Radio.d.ts +4 -13
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +6 -9
- package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +5 -15
- package/dist/src/components/Select/Select.d.ts +6 -18
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -6
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +2 -6
- package/dist/src/components/Slider/Slider.d.ts +3 -7
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +4 -8
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +5 -9
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +2 -6
- package/dist/src/components/StyledList/StyledList.d.ts +2 -8
- package/dist/src/components/SubNav/SubNav.d.ts +4 -13
- package/dist/src/components/Table/Table.d.ts +2 -10
- package/dist/src/components/Tabs/Tabs.d.ts +2 -4
- package/dist/src/components/TagSet/TagSet.d.ts +2 -9
- package/dist/src/components/TagSet/TagSetExplore.d.ts +3 -2
- package/dist/src/components/TagSet/TagSetFilter.d.ts +3 -4
- package/dist/src/components/Template/Template.d.ts +31 -41
- package/dist/src/components/Text/Text.d.ts +3 -11
- package/dist/src/components/TextInput/TextInput.d.ts +9 -34
- package/dist/src/components/Toggle/Toggle.d.ts +3 -10
- package/dist/src/components/Tooltip/Tooltip.d.ts +2 -8
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +2 -6
- package/dist/src/hooks/useMultiSelect.d.ts +5 -1
- package/dist/src/hooks/useSafeId.d.ts +6 -0
- package/dist/src/index.d.ts +14 -16
- package/dist/src/theme/components/breadcrumb.d.ts +13 -5
- package/dist/src/theme/components/button.d.ts +12 -0
- package/dist/src/theme/components/datePicker.d.ts +4 -0
- package/dist/src/theme/components/feedbackBox.d.ts +15 -3
- package/dist/src/theme/components/fieldset.d.ts +1 -1
- package/dist/src/theme/components/global.d.ts +18 -5
- package/dist/src/theme/components/heading.d.ts +6 -72
- package/dist/src/theme/components/helperErrorText.d.ts +5 -14
- package/dist/src/theme/components/hero.d.ts +19 -16
- package/dist/src/theme/components/horizontalRule.d.ts +0 -2
- package/dist/src/theme/components/icon.d.ts +2 -5
- package/dist/src/theme/components/label.d.ts +0 -1
- package/dist/src/theme/components/list.d.ts +1 -11
- package/dist/src/theme/components/newsletterSignup.d.ts +4 -4
- package/dist/src/theme/components/notification.d.ts +3 -3
- package/dist/src/theme/components/notificationContent.d.ts +3 -3
- package/dist/src/theme/components/notificationHeading.d.ts +3 -3
- package/dist/src/theme/components/radioGroup.d.ts +1 -1
- package/dist/src/theme/components/searchBar.d.ts +3 -3
- package/dist/src/theme/components/select.d.ts +7 -3
- package/dist/src/theme/components/slider.d.ts +5 -1
- package/dist/src/theme/components/socialmedialinks.d.ts +2 -2
- package/dist/src/theme/components/structuredContent.d.ts +2 -69
- package/dist/src/theme/components/styledList.d.ts +0 -1
- package/dist/src/theme/components/subnav.d.ts +3 -2
- package/dist/src/theme/components/{customTable.d.ts → table.d.ts} +7 -13
- package/dist/src/theme/components/template.d.ts +92 -45
- package/dist/src/theme/components/text.d.ts +1 -3
- package/dist/src/theme/foundations/colors.d.ts +1 -1
- package/dist/src/theme/foundations/global.d.ts +0 -12
- package/dist/src/theme/foundations/spacing.d.ts +16 -0
- package/dist/src/theme/sharedStyles.d.ts +4 -0
- package/dist/src/theme/sharedTypes.d.ts +4 -0
- package/dist/src/utils/utils.d.ts +9 -3
- package/dist/styles.css +1 -1
- package/dist/template/templateChildBreakout.png +0 -0
- package/dist/template/templateChildContent.png +0 -0
- package/dist/template/templateChildFullContent.png +0 -0
- package/dist/template/templateChildFullContentBottom.png +0 -0
- package/dist/template/templateChildFullContentTop.png +0 -0
- package/dist/template/templateChildFullFooter.png +0 -0
- package/dist/template/templateChildFullHeader.png +0 -0
- package/dist/template/templateChildFullInside.png +0 -0
- package/dist/template/templateChildFullOutside.png +0 -0
- package/dist/template/templateChildSidebar.png +0 -0
- package/dist/template/templateFluidColumns1.png +0 -0
- package/dist/template/templateFluidColumns2.png +0 -0
- package/dist/template/templateFluidColumns3.png +0 -0
- package/dist/template/templateFluidColumns4.png +0 -0
- package/dist/template/templateFullPageLayout.png +0 -0
- package/dist/template/templateRegions.png +0 -0
- package/dist/template/templateRegionsFooter.png +0 -0
- package/dist/template/templateRegionsHeader.png +0 -0
- package/dist/template/templateRegionsMain.png +0 -0
- package/dist/template/templateSidebarNone.png +0 -0
- package/dist/template/templateVariantFull.png +0 -0
- package/dist/template/templateVariantNarrow.png +0 -0
- package/dist/template/templateVariantSidebarLeft.png +0 -0
- package/dist/template/templateVariantSidebarRight.png +0 -0
- package/dist/useNextjsImage/aspectRatio.png +0 -0
- package/dist/useNextjsImage/containedImageExamples.png +0 -0
- package/dist/useNextjsImage/croppedImageExamples.png +0 -0
- package/dist/useNextjsImage/customWidth.png +0 -0
- package/dist/useNextjsImage/fallbackImageDark.png +0 -0
- package/dist/useNextjsImage/fallbackImageLight.png +0 -0
- package/dist/useNextjsImage/focalPointExamples01.png +0 -0
- package/dist/useNextjsImage/focalPointExamples02.png +0 -0
- package/package.json +14 -18
- package/dist/src/hooks/useCarouselStyles.d.ts +0 -17
- package/dist/src/hooks/useWindowSize.d.ts +0 -10
- package/dist/src/theme/components/filterBar.d.ts +0 -46
- package/dist/template/templateBottom.png +0 -0
- package/dist/template/templateBreakout.png +0 -0
- package/dist/template/templateMain.png +0 -0
- package/dist/template/templateMainNarrow.png +0 -0
- package/dist/template/templateMainWide.png +0 -0
- package/dist/template/templateSidebarLeft.png +0 -0
- package/dist/template/templateSidebarRight.png +0 -0
- package/dist/template/templateTop.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nypl/design-system-react-components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1-rc",
|
|
4
4
|
"description": "NYPL Reservoir Design System React Components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint": "eslint src --ext=ts,tsx --cache",
|
|
36
36
|
"prepare": "npm run build && husky install",
|
|
37
37
|
"storybook": "storybook dev -p 6006",
|
|
38
|
-
"build-storybook:
|
|
38
|
+
"build-storybook:v4": "storybook build -c .storybook -o ./reservoir/v4",
|
|
39
39
|
"prebuild:storybook": "npm run test:generate-output",
|
|
40
40
|
"build-storybook": "storybook build"
|
|
41
41
|
},
|
|
@@ -79,16 +79,12 @@
|
|
|
79
79
|
"@jest/core": "29.7.0",
|
|
80
80
|
"@rollup/plugin-commonjs": "24.0.1",
|
|
81
81
|
"@rollup/plugin-typescript": "11.0.0",
|
|
82
|
-
"@storybook/addon-a11y": "
|
|
83
|
-
"@storybook/addon-designs": "
|
|
84
|
-
"@storybook/addon-
|
|
85
|
-
"@storybook/addon-
|
|
86
|
-
"@storybook/addon-
|
|
87
|
-
"@storybook/
|
|
88
|
-
"@storybook/blocks": "8.3.6",
|
|
89
|
-
"@storybook/react": "8.3.6",
|
|
90
|
-
"@storybook/react-vite": "8.3.6",
|
|
91
|
-
"@storybook/test": "8.3.6",
|
|
82
|
+
"@storybook/addon-a11y": "9.0.16",
|
|
83
|
+
"@storybook/addon-designs": "10.0.1",
|
|
84
|
+
"@storybook/addon-docs": "9.0.16",
|
|
85
|
+
"@storybook/addon-jest": "9.0.16",
|
|
86
|
+
"@storybook/addon-links": "9.0.16",
|
|
87
|
+
"@storybook/react-vite": "9.0.16",
|
|
92
88
|
"@testing-library/dom": "9.2.0",
|
|
93
89
|
"@testing-library/jest-dom": "5.14.1",
|
|
94
90
|
"@testing-library/react": "12.0.0",
|
|
@@ -101,7 +97,7 @@
|
|
|
101
97
|
"@types/testing-library__jest-dom": "5.14.1",
|
|
102
98
|
"@typescript-eslint/eslint-plugin": "5.57.0",
|
|
103
99
|
"@typescript-eslint/parser": "5.57.0",
|
|
104
|
-
"@vitejs/plugin-react": "4.
|
|
100
|
+
"@vitejs/plugin-react": "4.4.1",
|
|
105
101
|
"eslint": "7.31.0",
|
|
106
102
|
"eslint-config-prettier": "8.8.0",
|
|
107
103
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
@@ -113,23 +109,23 @@
|
|
|
113
109
|
"jest-axe": "9.0.0",
|
|
114
110
|
"jest-environment-jsdom": "29.7.0",
|
|
115
111
|
"jest-transformer-svg": "2.0.2",
|
|
116
|
-
"js-cookie": "
|
|
112
|
+
"js-cookie": "3.0.5",
|
|
117
113
|
"lint-staged": "10.5.4",
|
|
118
114
|
"normalize.css": "8.0.1",
|
|
119
115
|
"prettier": "2.4.1",
|
|
120
116
|
"prop-types": "15.8.1",
|
|
121
117
|
"react": "18.2.0",
|
|
122
|
-
"react-autosuggest": "10.0.2",
|
|
123
118
|
"react-dom": "18.2.0",
|
|
124
119
|
"react-test-renderer": "18.2.0",
|
|
125
120
|
"remark-gfm": "4.0.0",
|
|
121
|
+
"rollup": "3.29.5",
|
|
126
122
|
"sass": "1.60.0",
|
|
127
|
-
"storybook": "
|
|
123
|
+
"storybook": "9.0.16",
|
|
128
124
|
"ts-jest": "29.1.5",
|
|
129
125
|
"tslib": "2.3.0",
|
|
130
126
|
"typescript": "4.9.5",
|
|
131
|
-
"vite": "5.
|
|
127
|
+
"vite": "5.4.18",
|
|
132
128
|
"vite-plugin-dts": "2.1.0",
|
|
133
|
-
"vite-plugin-svgr": "4.
|
|
129
|
+
"vite-plugin-svgr": "4.3.0"
|
|
134
130
|
}
|
|
135
131
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook that controls the sliding function for the carousel wrapper.
|
|
3
|
-
* This returns functions to use for the "previous" and "next" buttons as well
|
|
4
|
-
* as a CSS style object that should be use to transition between slides. There
|
|
5
|
-
* is also a function to programmatically slide to the first slide.
|
|
6
|
-
* Inspired by: https://codesandbox.io/s/fxjeo
|
|
7
|
-
*/
|
|
8
|
-
export declare const useCarouselStyles: (slidesCount?: number, slideWidth?: number) => {
|
|
9
|
-
prevSlide: () => void;
|
|
10
|
-
nextSlide: () => void;
|
|
11
|
-
carouselStyle: {
|
|
12
|
-
transition: string;
|
|
13
|
-
marginStart: string;
|
|
14
|
-
};
|
|
15
|
-
goToStart: () => void;
|
|
16
|
-
};
|
|
17
|
-
export default useCarouselStyles;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface WindowSize {
|
|
2
|
-
width: number;
|
|
3
|
-
height: number;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* React hook used to get the window size on device resizing.
|
|
7
|
-
* Based on https://usehooks-typescript.com/react-hook/use-window-size
|
|
8
|
-
*/
|
|
9
|
-
declare function useWindowSize(): WindowSize;
|
|
10
|
-
export default useWindowSize;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const filterBarWidth: {
|
|
2
|
-
default: {
|
|
3
|
-
width: {
|
|
4
|
-
base: string;
|
|
5
|
-
md: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
full: {
|
|
9
|
-
width: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
declare const FilterBar: {
|
|
13
|
-
parts: string[];
|
|
14
|
-
baseStyle: ({ width }: {
|
|
15
|
-
width: any;
|
|
16
|
-
}) => {
|
|
17
|
-
width: string;
|
|
18
|
-
modalBody: {
|
|
19
|
-
_dark: {
|
|
20
|
-
background: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
modalHeader: {
|
|
24
|
-
bg: string;
|
|
25
|
-
_dark: {
|
|
26
|
-
background: string;
|
|
27
|
-
borderBottom: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
modalFooter: {
|
|
32
|
-
bg: string;
|
|
33
|
-
_dark: {
|
|
34
|
-
background: string;
|
|
35
|
-
borderTop: string;
|
|
36
|
-
borderColor: string;
|
|
37
|
-
color: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
modalCloseButton: {
|
|
41
|
-
mt: string;
|
|
42
|
-
};
|
|
43
|
-
globalButtonGroupWrapper: any;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export default FilterBar;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|