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

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 (129) hide show
  1. package/CHANGELOG.md +1452 -3
  2. package/README.md +389 -3
  3. package/dist/__tests__/fileMock.d.ts +4 -0
  4. package/dist/__tests__/setup.d.ts +2 -0
  5. package/{lib/stories/0-Welcome.stories.d.ts → dist/__tests__/utils/utils.test.d.ts} +1 -1
  6. package/dist/components/Accordion/Accordion.d.ts +21 -0
  7. package/dist/components/Autosuggest/Autosuggest.stories.d.ts +4 -0
  8. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  9. package/dist/components/Button/Button.d.ts +25 -0
  10. package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
  11. package/dist/components/Card/Card.d.ts +51 -0
  12. package/dist/components/Checkbox/Checkbox.d.ts +47 -0
  13. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +49 -0
  14. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +29 -0
  15. package/dist/components/DatePicker/DatePicker.d.ts +81 -0
  16. package/dist/components/Fieldset/Fieldset.d.ts +22 -0
  17. package/dist/components/Form/Form.d.ts +29 -0
  18. package/dist/components/Grid/SimpleGrid.d.ts +17 -0
  19. package/dist/components/Heading/Heading.d.ts +27 -0
  20. package/dist/components/HelperErrorText/HelperErrorText.d.ts +29 -0
  21. package/dist/components/Hero/Hero.d.ts +40 -0
  22. package/dist/components/HorizontalRule/HorizontalRule.d.ts +11 -0
  23. package/dist/components/Icons/Icon.d.ts +37 -0
  24. package/dist/components/Icons/IconSvgs.d.ts +33 -0
  25. package/dist/components/Image/Image.d.ts +61 -0
  26. package/dist/components/Label/Label.d.ts +20 -0
  27. package/dist/components/Link/Link.d.ts +20 -0
  28. package/dist/components/List/List.d.ts +35 -0
  29. package/dist/components/Logo/Logo.d.ts +26 -0
  30. package/dist/components/Logo/LogoSvgs.d.ts +48 -0
  31. package/dist/components/Modal/Modal.d.ts +33 -0
  32. package/dist/components/Notification/Notification.d.ts +50 -0
  33. package/dist/components/Pagination/Pagination.d.ts +27 -0
  34. package/dist/components/Placeholder/Placeholder.d.ts +10 -0
  35. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +30 -0
  36. package/dist/components/Radio/Radio.d.ts +43 -0
  37. package/dist/components/RadioGroup/RadioGroup.d.ts +51 -0
  38. package/dist/components/SearchBar/SearchBar.d.ts +61 -0
  39. package/dist/components/Select/Select.d.ts +57 -0
  40. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +39 -0
  41. package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
  42. package/dist/components/Slider/Slider.d.ts +59 -0
  43. package/dist/components/StatusBadge/StatusBadge.d.ts +16 -0
  44. package/dist/components/StructuredContent/StructuredContent.d.ts +28 -0
  45. package/dist/components/StyleGuide/ColorCard.d.ts +12 -0
  46. package/dist/components/Table/Table.d.ts +30 -0
  47. package/dist/components/Tabs/Tabs.d.ts +26 -0
  48. package/dist/components/Template/Template.d.ts +126 -0
  49. package/dist/components/Text/Text.d.ts +16 -0
  50. package/dist/components/TextInput/TextInput.d.ts +79 -0
  51. package/dist/components/Toggle/Toggle.d.ts +42 -0
  52. package/dist/components/VideoPlayer/VideoPlayer.d.ts +38 -0
  53. package/dist/design-system-react-components.cjs.development.js +11648 -0
  54. package/dist/design-system-react-components.cjs.development.js.map +1 -0
  55. package/dist/design-system-react-components.cjs.production.min.js +2 -0
  56. package/dist/design-system-react-components.cjs.production.min.js.map +1 -0
  57. package/dist/design-system-react-components.esm.js +11493 -0
  58. package/dist/design-system-react-components.esm.js.map +1 -0
  59. package/dist/helpers/types.d.ts +1 -0
  60. package/dist/hooks/__tests__/useCarouselStyles.test.d.ts +1 -0
  61. package/dist/hooks/useCarouselStyles.d.ts +17 -0
  62. package/dist/hooks/useNYPLTheme.d.ts +66 -0
  63. package/dist/hooks/useWindowSize.d.ts +10 -0
  64. package/dist/index.d.ts +48 -0
  65. package/dist/index.js +8 -0
  66. package/dist/resources.scss +386 -0
  67. package/dist/styles.css +3 -0
  68. package/dist/theme/components/accordion.d.ts +20 -0
  69. package/dist/theme/components/breadcrumb.d.ts +105 -0
  70. package/dist/theme/components/button.d.ts +120 -0
  71. package/dist/theme/components/buttonGroup.d.ts +11 -0
  72. package/dist/theme/components/card.d.ts +381 -0
  73. package/dist/theme/components/checkbox.d.ts +95 -0
  74. package/dist/theme/components/checkboxGroup.d.ts +14 -0
  75. package/dist/theme/components/componentWrapper.d.ts +12 -0
  76. package/dist/theme/components/customTable.d.ts +624 -0
  77. package/dist/theme/components/datePicker.d.ts +16 -0
  78. package/dist/theme/components/fieldset.d.ts +20 -0
  79. package/dist/theme/components/global.d.ts +73 -0
  80. package/dist/theme/components/globalMixins.d.ts +23 -0
  81. package/dist/theme/components/heading.d.ts +160 -0
  82. package/dist/theme/components/helperErrorText.d.ts +12 -0
  83. package/dist/theme/components/hero.d.ts +499 -0
  84. package/dist/theme/components/horizontalRule.d.ts +15 -0
  85. package/dist/theme/components/icon.d.ts +47755 -0
  86. package/dist/theme/components/image.d.ts +590 -0
  87. package/dist/theme/components/label.d.ts +18 -0
  88. package/dist/theme/components/link.d.ts +62 -0
  89. package/dist/theme/components/list.d.ts +182 -0
  90. package/dist/theme/components/logo.d.ts +477 -0
  91. package/dist/theme/components/notification.d.ts +95 -0
  92. package/dist/theme/components/pagination.d.ts +16 -0
  93. package/dist/theme/components/progressIndicator.d.ts +52 -0
  94. package/dist/theme/components/radio.d.ts +107 -0
  95. package/dist/theme/components/radioGroup.d.ts +14 -0
  96. package/dist/theme/components/searchBar.d.ts +18 -0
  97. package/dist/theme/components/select.d.ts +82 -0
  98. package/dist/theme/components/skeletonLoader.d.ts +102 -0
  99. package/dist/theme/components/skipNavigation.d.ts +25 -0
  100. package/dist/theme/components/slider.d.ts +59 -0
  101. package/dist/theme/components/statusBadge.d.ts +25 -0
  102. package/dist/theme/components/structuredContent.d.ts +326 -0
  103. package/dist/theme/components/tabs.d.ts +136 -0
  104. package/dist/theme/components/template.d.ts +108 -0
  105. package/dist/theme/components/text.d.ts +26 -0
  106. package/dist/theme/components/textInput.d.ts +124 -0
  107. package/dist/theme/components/toggle.d.ts +93 -0
  108. package/dist/theme/components/videoPlayer.d.ts +40 -0
  109. package/dist/theme/foundations/breakpoints.d.ts +23 -0
  110. package/dist/theme/foundations/colors.d.ts +3 -0
  111. package/dist/theme/foundations/global.d.ts +58 -0
  112. package/dist/theme/foundations/radii.d.ts +6 -0
  113. package/dist/theme/foundations/shadows.d.ts +4 -0
  114. package/dist/theme/foundations/spacing.d.ts +82 -0
  115. package/dist/theme/foundations/typography.d.ts +8 -0
  116. package/dist/theme/index.d.ts +20 -0
  117. package/dist/theme/provider.d.ts +3 -0
  118. package/dist/theme/types.d.ts +1 -0
  119. package/dist/utils/componentCategories.d.ts +1 -0
  120. package/dist/utils/interfaces.d.ts +5 -0
  121. package/dist/utils/utils.d.ts +31 -0
  122. package/package.json +132 -20
  123. package/lib/components/Button/Button.d.ts +0 -17
  124. package/lib/components/Button/Button.js +0 -42
  125. package/lib/index.d.ts +0 -1
  126. package/lib/index.js +0 -6
  127. package/lib/stories/0-Welcome.stories.js +0 -19
  128. package/lib/stories/1-Button.stories.d.ts +0 -6
  129. package/lib/stories/1-Button.stories.js +0 -20
@@ -0,0 +1,95 @@
1
+ import { NotificationTypes } from "../../components/Notification/Notification";
2
+ interface NotificationBaseStyle {
3
+ dismissible: boolean;
4
+ isCentered: boolean;
5
+ noMargin: boolean;
6
+ notificationType: NotificationTypes;
7
+ }
8
+ interface NotificationContentBaseStyle {
9
+ alignText: boolean;
10
+ icon: boolean;
11
+ notificationType: NotificationTypes;
12
+ }
13
+ interface NotificationHeadingBaseStyle {
14
+ icon: boolean;
15
+ isCentered: boolean;
16
+ notificationType: NotificationTypes;
17
+ }
18
+ declare const _default: {
19
+ Notification: {
20
+ parts: string[];
21
+ baseStyle: ({ dismissible, isCentered, noMargin, notificationType, }: NotificationBaseStyle) => {
22
+ bg: string;
23
+ display: string;
24
+ fontSize: string;
25
+ position: string;
26
+ textAlign: string;
27
+ borderRadius: string;
28
+ margin: string;
29
+ container: {
30
+ margin: string;
31
+ maxWidth: string;
32
+ padding: string;
33
+ paddingRight: string;
34
+ paddingLeft: string;
35
+ width: string;
36
+ };
37
+ dismissibleButton: {
38
+ border: string;
39
+ bgColor: string;
40
+ alignItems: string;
41
+ color: string;
42
+ display: string;
43
+ height: string;
44
+ width: string;
45
+ minWidth: string;
46
+ position: string;
47
+ right: string;
48
+ top: string;
49
+ svg: {
50
+ marginTop: string;
51
+ };
52
+ _hover: {
53
+ bg: string;
54
+ };
55
+ };
56
+ icon: {
57
+ flexShrink: string;
58
+ marginRight: string;
59
+ };
60
+ };
61
+ };
62
+ NotificationContent: {
63
+ parts: string[];
64
+ baseStyle: ({ alignText, icon, notificationType, }: NotificationContentBaseStyle) => {
65
+ display: string;
66
+ justifyContent: string;
67
+ content: {
68
+ color: string;
69
+ marginTop: string;
70
+ paddingLeft: string;
71
+ width: string;
72
+ a: {
73
+ color: string;
74
+ _hover: {
75
+ color: string;
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
81
+ NotificationHeading: {
82
+ parts: string[];
83
+ baseStyle: ({ icon, isCentered, notificationType, }: NotificationHeadingBaseStyle) => {
84
+ display: string;
85
+ marginBottom: string;
86
+ justifyContent: string;
87
+ heading: {
88
+ marginBottom: string;
89
+ marginTop: string;
90
+ color: string;
91
+ };
92
+ };
93
+ };
94
+ };
95
+ export default _default;
@@ -0,0 +1,16 @@
1
+ declare const Pagination: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ alignItems: string;
5
+ display: string;
6
+ width: string;
7
+ link: {
8
+ lineHeight: string;
9
+ textDecoration: string;
10
+ };
11
+ ul: {
12
+ marginBottom: string;
13
+ };
14
+ };
15
+ };
16
+ export default Pagination;
@@ -0,0 +1,52 @@
1
+ import { ProgressIndicatorSizes } from "../../components/ProgressIndicator/ProgressIndicator";
2
+ interface ProgressIndicatorBaseStyle {
3
+ darkMode: boolean;
4
+ size: ProgressIndicatorSizes;
5
+ }
6
+ declare const ProgressIndicator: {
7
+ parts: string[];
8
+ baseStyle: ({ darkMode, size }: ProgressIndicatorBaseStyle) => {
9
+ color: string;
10
+ circular: {
11
+ svg: {
12
+ height: string;
13
+ width: string;
14
+ display: string;
15
+ circle: {
16
+ _first: {
17
+ stroke: string;
18
+ };
19
+ _last: {
20
+ stroke: string;
21
+ };
22
+ };
23
+ };
24
+ };
25
+ circularContainer: {
26
+ alignItems: string;
27
+ display: string;
28
+ flexDirection: string;
29
+ width: string;
30
+ };
31
+ linear: {
32
+ "> div": {
33
+ bg: string;
34
+ };
35
+ flex: number;
36
+ bg: string;
37
+ height: {
38
+ base: string;
39
+ md: string;
40
+ };
41
+ };
42
+ linearContainer: {
43
+ display: string;
44
+ alignItems: string;
45
+ };
46
+ linearPercentage: {
47
+ padding: string;
48
+ flex: number;
49
+ };
50
+ };
51
+ };
52
+ export default ProgressIndicator;
@@ -0,0 +1,107 @@
1
+ declare const Radio: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ control: {
5
+ verticalAlign: string;
6
+ transitionProperty: string;
7
+ transitionDuration: string;
8
+ border: string;
9
+ borderRadius: string;
10
+ borderColor: string;
11
+ color: string;
12
+ outline: string;
13
+ _checked: {
14
+ bg: string;
15
+ borderColor: string;
16
+ color: string;
17
+ _disabled: {
18
+ borderColor: string;
19
+ bg: string;
20
+ _before: {
21
+ bg: string;
22
+ };
23
+ };
24
+ _invalid: {
25
+ _hover: {
26
+ borderColor: string;
27
+ };
28
+ _before: {
29
+ borderColor: string;
30
+ bg: string;
31
+ };
32
+ };
33
+ _hover: {
34
+ bg: string;
35
+ };
36
+ _before: {
37
+ content: string;
38
+ display: string;
39
+ w: string;
40
+ h: string;
41
+ borderRadius: string;
42
+ bg: string;
43
+ };
44
+ };
45
+ _disabled: {
46
+ borderColor: string;
47
+ bg: string;
48
+ };
49
+ _focus: {
50
+ boxShadow: string;
51
+ borderColor: string;
52
+ outline: string;
53
+ outlineOffset: string;
54
+ outlineColor: string;
55
+ zIndex: string;
56
+ };
57
+ _invalid: {
58
+ borderColor: string;
59
+ };
60
+ };
61
+ label: {
62
+ userSelect: string;
63
+ fontWeight: string;
64
+ marginBottom: string;
65
+ marginLeft: string;
66
+ width: string;
67
+ _disabled: {
68
+ color: string;
69
+ opacity: number;
70
+ fontStyle: string;
71
+ };
72
+ _invalid: {
73
+ color: string;
74
+ };
75
+ };
76
+ helperErrorText: {
77
+ marginLeft: string;
78
+ _disabled: {
79
+ color: string;
80
+ fontStyle: string;
81
+ };
82
+ };
83
+ hiddenLabel: {
84
+ clip: string;
85
+ height: string;
86
+ overflow: string;
87
+ position: string;
88
+ width: string;
89
+ wordWrap: string;
90
+ };
91
+ };
92
+ sizes: {
93
+ md: {
94
+ control: {
95
+ h: string;
96
+ w: string;
97
+ };
98
+ label: {
99
+ fontSize: string;
100
+ };
101
+ };
102
+ };
103
+ defaultProps: {
104
+ size: string;
105
+ };
106
+ };
107
+ export default Radio;
@@ -0,0 +1,14 @@
1
+ declare const RadioGroup: {
2
+ parts: string[];
3
+ baseStyle: ({ isFullWidth }: {
4
+ isFullWidth?: boolean;
5
+ }) => {
6
+ helperErrorText: {
7
+ marginTop: string;
8
+ };
9
+ label: {
10
+ width: string;
11
+ };
12
+ };
13
+ };
14
+ export default RadioGroup;
@@ -0,0 +1,18 @@
1
+ declare const SearchBar: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ display: string;
5
+ marginBottom: {
6
+ base: string;
7
+ md: string;
8
+ };
9
+ flexFlow: {
10
+ base: string;
11
+ md: string;
12
+ };
13
+ select: {
14
+ marginBottom: string;
15
+ };
16
+ };
17
+ };
18
+ export default SearchBar;
@@ -0,0 +1,82 @@
1
+ interface SelectBaseStyle {
2
+ labelPosition: string;
3
+ }
4
+ declare const Select: {
5
+ parts: string[];
6
+ baseStyle: ({ labelPosition }: SelectBaseStyle) => {
7
+ ".chakra-select__icon-wrapper": {
8
+ zIndex: string;
9
+ };
10
+ inline: {
11
+ display: {
12
+ md: string;
13
+ };
14
+ gap: {
15
+ md: string;
16
+ };
17
+ alignItems: {
18
+ md: string;
19
+ };
20
+ };
21
+ select: {
22
+ flex: {
23
+ md: string;
24
+ };
25
+ backgroundColor: string;
26
+ borderRadius: string;
27
+ borderColor: string;
28
+ fontSize: string;
29
+ paddingTop: string;
30
+ paddingRight: string;
31
+ paddingBottom: string;
32
+ paddingLeft: string;
33
+ _hover: {
34
+ borderColor: string;
35
+ };
36
+ _active: {
37
+ borderColor: string;
38
+ boxShadow: string;
39
+ outline: string;
40
+ outlineOffset: string;
41
+ outlineColor: string;
42
+ zIndex: string;
43
+ };
44
+ _disabled: {
45
+ bg: string;
46
+ borderColor: string;
47
+ color: string;
48
+ opacity: string;
49
+ };
50
+ _focus: {
51
+ borderColor: string;
52
+ boxShadow: string;
53
+ outline: string;
54
+ outlineOffset: string;
55
+ outlineColor: string;
56
+ zIndex: string;
57
+ };
58
+ _invalid: {
59
+ border: string;
60
+ borderColor: string;
61
+ boxShadow: string;
62
+ };
63
+ };
64
+ };
65
+ variants: {
66
+ searchbar: {
67
+ select: {
68
+ flex: string;
69
+ borderRightColor: {
70
+ md: string;
71
+ };
72
+ borderRightRadius: {
73
+ md: string;
74
+ };
75
+ };
76
+ };
77
+ };
78
+ defaultProps: {
79
+ size: string;
80
+ };
81
+ };
82
+ export default Select;
@@ -0,0 +1,102 @@
1
+ interface SkeletonLoaderBaseStyle {
2
+ imageAspectRatio: keyof typeof imagePaddingBottomStyles;
3
+ isBordered: boolean;
4
+ showImage?: boolean;
5
+ }
6
+ declare const imagePaddingBottomStyles: {
7
+ landscape: string;
8
+ portrait: string;
9
+ square: string;
10
+ };
11
+ declare const SkeletonLoader: {
12
+ parts: string[];
13
+ baseStyle: ({ imageAspectRatio, isBordered }: SkeletonLoaderBaseStyle) => {
14
+ section: {
15
+ marginBottom: string;
16
+ _last: {
17
+ marginBottom: string;
18
+ };
19
+ };
20
+ image: {
21
+ boxSizing: string;
22
+ flexShrink: string;
23
+ height: string;
24
+ overflow: string;
25
+ paddingBottom: string;
26
+ position: string;
27
+ width: string;
28
+ borderRadius: string;
29
+ marginBottom: string;
30
+ };
31
+ container: {
32
+ marginTop: string;
33
+ width: string;
34
+ };
35
+ heading: {
36
+ height: string;
37
+ borderRadius: string;
38
+ boxSizing: string;
39
+ marginBottom: string;
40
+ };
41
+ content: {
42
+ height: string;
43
+ borderRadius: string;
44
+ boxSizing: string;
45
+ marginBottom: string;
46
+ };
47
+ button: {
48
+ height: string;
49
+ margin: string;
50
+ maxWidth: string;
51
+ width: string;
52
+ };
53
+ margin: string;
54
+ width: string;
55
+ };
56
+ variants: {
57
+ row: ({ imageAspectRatio, showImage }: SkeletonLoaderBaseStyle) => {
58
+ alignItems: string;
59
+ display: {
60
+ md: string;
61
+ };
62
+ image: {
63
+ overflow: {
64
+ md: string;
65
+ };
66
+ paddingBottom: {
67
+ md: string;
68
+ };
69
+ position: {
70
+ md: string;
71
+ };
72
+ width: {
73
+ md: string;
74
+ };
75
+ height: {
76
+ md: string;
77
+ };
78
+ };
79
+ container: {
80
+ marginLeft: {
81
+ md: string;
82
+ };
83
+ marginTop: {
84
+ md: string;
85
+ };
86
+ };
87
+ button: {
88
+ margin: {
89
+ md: string;
90
+ };
91
+ };
92
+ };
93
+ };
94
+ };
95
+ declare const Skeleton: {
96
+ baseStyle: {
97
+ borderRadius: string;
98
+ background: string;
99
+ animation: string;
100
+ };
101
+ };
102
+ export { Skeleton, SkeletonLoader };
@@ -0,0 +1,25 @@
1
+ declare const SkipNavigation: {
2
+ baseStyle: {
3
+ ul: {
4
+ margin: string;
5
+ };
6
+ a: {
7
+ backgroundColor: string;
8
+ height: string;
9
+ left: string;
10
+ overflow: string;
11
+ position: string;
12
+ top: string;
13
+ width: string;
14
+ _focus: {
15
+ border: string;
16
+ height: string;
17
+ left: string;
18
+ padding: string;
19
+ top: string;
20
+ width: string;
21
+ };
22
+ };
23
+ };
24
+ };
25
+ export default SkipNavigation;
@@ -0,0 +1,59 @@
1
+ interface CustomSliderBaseStyle {
2
+ isDisabled: boolean;
3
+ isInvalid: boolean;
4
+ showBoxes: boolean;
5
+ showValues: boolean;
6
+ }
7
+ declare const CustomSlider: {
8
+ parts: string[];
9
+ baseStyle: ({ isDisabled, isInvalid, showBoxes, showValues, }: CustomSliderBaseStyle) => {
10
+ container: {
11
+ display: string;
12
+ alignItems: string;
13
+ };
14
+ leftValue: {
15
+ color: string;
16
+ marginTop: string;
17
+ marginBottom: string;
18
+ marginRight: string;
19
+ marginLeft: string;
20
+ };
21
+ rightValue: {
22
+ marginLeft: string;
23
+ marginRight: string;
24
+ color: string;
25
+ marginTop: string;
26
+ marginBottom: string;
27
+ };
28
+ textInput: {
29
+ minWidth: string;
30
+ color: string;
31
+ };
32
+ sliderContainer: {
33
+ marginLeft: string;
34
+ marginRight: string;
35
+ };
36
+ filledTrack: {
37
+ bgColor: string;
38
+ };
39
+ track: {
40
+ bgColor: string;
41
+ _disabled: {
42
+ bgColor: string;
43
+ };
44
+ };
45
+ thumb: {
46
+ border: string;
47
+ borderColor: string;
48
+ boxShadow: string;
49
+ _active: {
50
+ transform: string;
51
+ };
52
+ _disabled: {
53
+ bgColor: string;
54
+ borderColor: string;
55
+ };
56
+ };
57
+ };
58
+ };
59
+ export default CustomSlider;
@@ -0,0 +1,25 @@
1
+ declare const StatusBadge: {
2
+ baseStyle: {
3
+ borderRadius: string;
4
+ color: string;
5
+ display: string;
6
+ fontSize: string;
7
+ fontStyle: string;
8
+ py: string;
9
+ px: string;
10
+ textAlign: string;
11
+ width: string;
12
+ };
13
+ variants: {
14
+ low: {
15
+ bg: string;
16
+ };
17
+ medium: {
18
+ bg: string;
19
+ };
20
+ high: {
21
+ bg: string;
22
+ };
23
+ };
24
+ };
25
+ export default StatusBadge;