@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 @@
1
+ export declare type LayoutTypes = "column" | "row";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
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
+ marginLeft: string;
14
+ };
15
+ goToStart: () => void;
16
+ };
17
+ export default useCarouselStyles;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * A custom hook that returns the Chakra-based NYPL theme object. This must be
3
+ * used inside a component that is wrapped in the `DSProvider` component, so
4
+ * that the theme object can be available to use.
5
+ */
6
+ declare function useNYPLTheme(): {
7
+ breakpoints?: undefined;
8
+ colors?: undefined;
9
+ fontSizes?: undefined;
10
+ fontWeights?: undefined;
11
+ fonts?: undefined;
12
+ radii?: undefined;
13
+ space?: undefined;
14
+ } | {
15
+ breakpoints: any;
16
+ colors: {
17
+ brand: any;
18
+ section: any;
19
+ transparent: any;
20
+ ui: any;
21
+ };
22
+ fontSizes: {
23
+ "-3": any;
24
+ "-2": any;
25
+ "-1": any;
26
+ 0: any;
27
+ 1: any;
28
+ 2: any;
29
+ 3: any;
30
+ 4: any;
31
+ breadcrumbs: any;
32
+ button: any;
33
+ heading: any;
34
+ helper: any;
35
+ label: any;
36
+ text: any;
37
+ };
38
+ fontWeights: {
39
+ light: any;
40
+ regular: any;
41
+ medium: any;
42
+ bold: any;
43
+ breadcrumbs: any;
44
+ button: any;
45
+ heading: any;
46
+ helper: any;
47
+ label: any;
48
+ text: any;
49
+ };
50
+ fonts: {
51
+ body: any;
52
+ heading: any;
53
+ };
54
+ radii: any;
55
+ space: {
56
+ xxs: any;
57
+ xs: any;
58
+ s: any;
59
+ m: any;
60
+ l: any;
61
+ xl: any;
62
+ xxl: any;
63
+ xxxl: any;
64
+ };
65
+ };
66
+ export default useNYPLTheme;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,48 @@
1
+ import "./styles.scss";
2
+ export { Box, Center, Circle, Flex, Grid, GridItem, HStack, Spacer, Square, Stack, VStack, } from "@chakra-ui/react";
3
+ export { default as Accordion, AccordionTypes, } from "./components/Accordion/Accordion";
4
+ export { default as Breadcrumbs, BreadcrumbsTypes, } from "./components/Breadcrumbs/Breadcrumbs";
5
+ export { default as Button, ButtonTypes } from "./components/Button/Button";
6
+ export { default as ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
7
+ export { default as Card, CardActions, CardContent, CardHeading, } from "./components/Card/Card";
8
+ export { default as Checkbox } from "./components/Checkbox/Checkbox";
9
+ export { default as CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
10
+ export { default as DatePicker, DatePickerTypes, FullDateType, } from "./components/DatePicker/DatePicker";
11
+ export { default as DSProvider } from "./theme/provider";
12
+ export { default as Fieldset } from "./components/Fieldset/Fieldset";
13
+ export { default as Form, FormField, FormRow } from "./components/Form/Form";
14
+ export { default as Heading, HeadingSizes, HeadingLevels, } from "./components/Heading/Heading";
15
+ export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
16
+ export { default as Hero, HeroTypes } from "./components/Hero/Hero";
17
+ export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
18
+ export { default as Icon, IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes, } from "./components/Icons/Icon";
19
+ export { default as Image, ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/Image";
20
+ export { default as Label } from "./components/Label/Label";
21
+ export { LayoutTypes } from "./helpers/types";
22
+ export { default as Link, LinkTypes } from "./components/Link/Link";
23
+ export { default as List, ListTypes } from "./components/List/List";
24
+ export { default as Logo, LogoNames, LogoSizes } from "./components/Logo/Logo";
25
+ export { ModalTrigger, useModal } from "./components/Modal/Modal";
26
+ export { default as Notification, NotificationTypes, } from "./components/Notification/Notification";
27
+ export { default as Pagination } from "./components/Pagination/Pagination";
28
+ export { default as ProgressIndicator, ProgressIndicatorSizes, ProgressIndicatorTypes, } from "./components/ProgressIndicator/ProgressIndicator";
29
+ export { default as Radio } from "./components/Radio/Radio";
30
+ export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
31
+ export { default as SearchBar } from "./components/SearchBar/SearchBar";
32
+ export { default as Select, LabelPositions } from "./components/Select/Select";
33
+ export { default as SimpleGrid, GridGaps } from "./components/Grid/SimpleGrid";
34
+ export { default as SkeletonLoader, SkeletonLoaderImageRatios, } from "./components/SkeletonLoader/SkeletonLoader";
35
+ export { default as SkipNavigation } from "./components/SkipNavigation/SkipNavigation";
36
+ export { default as Slider } from "./components/Slider/Slider";
37
+ export { default as StatusBadge, StatusBadgeTypes, } from "./components/StatusBadge/StatusBadge";
38
+ export { default as StructuredContent, StructuredContentImagePosition, } from "./components/StructuredContent/StructuredContent";
39
+ export { default as Tabs, TabList, Tab, TabPanels, TabPanel, } from "./components/Tabs/Tabs";
40
+ export { TemplateAppContainer, Template, TemplateAboveHeader, TemplateHeader, TemplateBreakout, TemplateContent, TemplateContentTop, TemplateContentPrimary, TemplateContentSidebar, TemplateFooter, } from "./components/Template/Template";
41
+ export { default as Text, TextSizes } from "./components/Text/Text";
42
+ export { default as TextInput, TextInputRefType, TextInputTypes, } from "./components/TextInput/TextInput";
43
+ export { default as Toggle, ToggleSizes } from "./components/Toggle/Toggle";
44
+ export { default as useCarouselStyles } from "./hooks/useCarouselStyles";
45
+ export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
46
+ export { default as useWindowSize } from "./hooks/useWindowSize";
47
+ export { default as VideoPlayer, VideoPlayerAspectRatios, VideoPlayerTypes, } from "./components/VideoPlayer/VideoPlayer";
48
+ export { default as Table } from "./components/Table/Table";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./design-system-react-components.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./design-system-react-components.cjs.development.js')
8
+ }
@@ -0,0 +1,386 @@
1
+ /**
2
+ * Breakpoint Configuration
3
+ * @see https://github.com/Team-Sass/breakpoint/wiki
4
+ */
5
+
6
+ // Global Breakpoints
7
+
8
+ // Avoid using in favor of atomic, content-specific, breakpoints.
9
+ // These should be used for generic code, like layouts and typography, only.
10
+ // The CSS variables and the Sass variables below need to stay in sync.
11
+ // Sass' breakpoint() mixin doesn't work without Sass variables.
12
+ // CSS variables expose the breakpoint variables to consumers.
13
+ :root {
14
+ --nypl-breakpoint-small: 320px;
15
+ --nypl-breakpoint-medium: 600px;
16
+ --nypl-breakpoint-large: 960px;
17
+ --nypl-breakpoint-xl: 1280px;
18
+ }
19
+
20
+ $nypl-breakpoint-small: 320px;
21
+ $nypl-breakpoint-medium: 600px;
22
+ $nypl-breakpoint-large: 960px;
23
+ $nypl-breakpoint-xl: 1280px;
24
+ // The max-width breakpoint is used when the design should be applied at
25
+ // whatever the largest breakpoint is regardless of actual pixel value,
26
+ // e.g. removing outer margin on body wrapper.
27
+ $nypl-max-width: $nypl-breakpoint-xl;
28
+
29
+ /////////////////////
30
+ // General Mixins (put specific ones in component files where applicable)
31
+
32
+ /// Mixin - Clearfix.
33
+ /// Adds clearfix based on http://bourbon.io/docs/#clearfix
34
+ /// use example = @include clearfix
35
+
36
+ @mixin clearfix {
37
+ &::after {
38
+ clear: both;
39
+ content: "";
40
+ display: table;
41
+ }
42
+ }
43
+
44
+ @mixin list-reset {
45
+ list-style: none;
46
+ margin: 0;
47
+ padding: 0;
48
+ }
49
+
50
+ @mixin fieldset-reset {
51
+ border: none;
52
+ margin: 0;
53
+ padding: 0;
54
+ }
55
+
56
+ /// Mixin - Wrapper
57
+ /// Outer container mixin for large screens
58
+ @mixin wrapper(
59
+ $container-max-width: $max-width,
60
+ $outer-container-break: $nypl-breakpoint-small,
61
+ $v-margin: 0,
62
+ $v-padding: 0,
63
+ $h-padding: var(--nypl-space-s)
64
+ ) {
65
+ margin: #{$v-margin} auto;
66
+ max-width: #{$container-max-width};
67
+ padding: #{$v-padding} #{$h-padding};
68
+ width: 100%;
69
+ }
70
+
71
+ .container {
72
+ padding: var(--nypl-space-s);
73
+ }
74
+
75
+ /// Use the breakout mixin for elements that should be edge-to-edge
76
+ /// Even when a parent container uses the wrapper mixin
77
+ @mixin breakout($v-padding: var(--nypl-space-s)) {
78
+ margin-left: calc(-50vw + 50%);
79
+ margin-right: calc(-50vw + 50%);
80
+ }
81
+
82
+ // Use the screenreader-only mixin for elements that you want to be visually hidden, but still want screenreaders to read out
83
+ @mixin screenreader-only() {
84
+ clip: rect(1px, 1px, 1px, 1px);
85
+ height: 1px;
86
+ overflow: hidden;
87
+ position: absolute !important;
88
+ width: 1px;
89
+ word-wrap: normal;
90
+ }
91
+
92
+ // Focus state mixin
93
+ @mixin focus-outline($darkBackground: false) {
94
+ outline: 2px solid var(--nypl-colors-ui-focus);
95
+ outline-offset: 2px;
96
+ z-index: 9999;
97
+
98
+ @if $darkBackground {
99
+ outline-color: var(--nypl-colors-ui-white);
100
+ }
101
+ }
102
+
103
+ //Convert pixel values to rem
104
+ @function to-rem($size) {
105
+ @return $size / 16px * 1rem;
106
+ }
107
+
108
+ //Process a color variable so that it can be used in a data URI/URL
109
+ @function url-friendly-colour($colour) {
110
+ @return "%23" + str-slice("#{$colour}", 2, -1);
111
+ }
112
+
113
+ @mixin placeholder {
114
+ &::-webkit-input-placeholder {
115
+ @content;
116
+ }
117
+
118
+ &::-moz-placeholder {
119
+ @content;
120
+
121
+ opacity: 1;
122
+ }
123
+
124
+ &:-moz-placeholder {
125
+ @content;
126
+ }
127
+
128
+ &:-ms-input-placeholder {
129
+ @content;
130
+ }
131
+ }
132
+
133
+ /**
134
+ * --nypl-space-xxs: --nypl-space-s / 4 // 4px or 0.25rem
135
+ * --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
136
+ * --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
137
+ * --nypl-space-m: --nypl-space * 1.5; // 24px or 1.5rem
138
+ * --nypl-space-l: --nypl-space * 2; // 32px or 2rem
139
+ * --nypl-space-xl: --nypl-space * 3; // 48px or 3rem
140
+ * --nypl-space-xxl: --nypl-space * 4; // 64px or 4rem
141
+ */
142
+
143
+ @mixin space-inline-none {
144
+ margin-right: 0;
145
+ }
146
+
147
+ @mixin space-inline-xxs {
148
+ margin-right: var(--nypl-space-xxs);
149
+ }
150
+
151
+ @mixin space-inline-xs {
152
+ margin-right: var(--nypl-space-xs);
153
+ }
154
+
155
+ @mixin space-inline-s {
156
+ margin-right: var(--nypl-space-s);
157
+ }
158
+
159
+ @mixin space-inline-m {
160
+ margin-right: var(--nypl-space-m);
161
+ }
162
+
163
+ @mixin space-inline-l {
164
+ margin-right: var(--nypl-space-l);
165
+ }
166
+
167
+ @mixin space-inline-xl {
168
+ margin-right: var(--nypl-space-xl);
169
+ }
170
+
171
+ @mixin space-inline-xxl {
172
+ margin-right: var(--nypl-space-xxl);
173
+ }
174
+
175
+ @mixin get-space-inline($id) {
176
+ @if $id == "none" {
177
+ @include space-inline-none;
178
+ }
179
+
180
+ @if $id == "xxs" {
181
+ @include space-inline-xxs;
182
+ }
183
+
184
+ @if $id == "xs" {
185
+ @include space-inline-xs;
186
+ }
187
+
188
+ @if $id == "s" {
189
+ @include space-inline-s;
190
+ }
191
+
192
+ @if $id == "m" {
193
+ @include space-inline-m;
194
+ }
195
+
196
+ @if $id == "l" {
197
+ @include space-inline-l;
198
+ }
199
+
200
+ @if $id == "xl" {
201
+ @include space-inline-xl;
202
+ }
203
+
204
+ @if $id == "xxl" {
205
+ @include space-inline-xxl;
206
+ }
207
+
208
+ @if $id == "xxxl" {
209
+ @include space-inline-xxxl;
210
+ }
211
+ }
212
+
213
+ /**
214
+ * --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
215
+ * --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
216
+ * --nypl-space-m: --nypl-space * 1.5; // 24px or 1.5rem
217
+ * --nypl-space-l: --nypl-space * 2; // 32px or 2rem
218
+ * --nypl-space-xl: --nypl-space * 3; // 48px or 3rem
219
+ */
220
+
221
+ @mixin space-inset-none {
222
+ padding: 0;
223
+ }
224
+
225
+ @mixin space-inset-xs {
226
+ padding: var(--nypl-space-xs);
227
+ }
228
+
229
+ @mixin space-inset-s {
230
+ padding: var(--nypl-space-s);
231
+ }
232
+
233
+ @mixin space-inset-m {
234
+ padding: var(--nypl-space-m);
235
+ }
236
+
237
+ @mixin space-inset-l {
238
+ padding: var(--nypl-space-l);
239
+ }
240
+
241
+ @mixin space-inset-xl {
242
+ padding: var(--nypl-space-xl);
243
+ }
244
+
245
+ @mixin get-space-inset($id) {
246
+ @if $id == "none" {
247
+ @include space-inset-none;
248
+ }
249
+
250
+ @if $id == "xs" {
251
+ @include space-inset-xs;
252
+ }
253
+
254
+ @if $id == "s" {
255
+ @include space-inset-s;
256
+ }
257
+
258
+ @if $id == "m" {
259
+ @include space-inset-m;
260
+ }
261
+
262
+ @if $id == "l" {
263
+ @include space-inset-l;
264
+ }
265
+
266
+ @if $id == "xl" {
267
+ @include space-inset-xl;
268
+ }
269
+ }
270
+
271
+ /**
272
+ * --nypl-space-xxs: --nypl-space-s / 4 // 4px or 0.25rem
273
+ * --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
274
+ * --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
275
+ * --nypl-space-m: --nypl-space-s * 1.5; // 24px or 1.5rem
276
+ * --nypl-space-l: --nypl-space-s * 2; // 32px or 2rem
277
+ * --nypl-space-xl: --nypl-space-s * 3; // 48px or 3rem
278
+ * --nypl-space-xxl: --nypl-space-s * 4; // 64px or 4rem
279
+ * --nypl-space-xxxl: --nypl-space-s * 6; // 96px or 6rem
280
+ */
281
+
282
+ @mixin space-stack-none {
283
+ margin-bottom: 0;
284
+ }
285
+
286
+ @mixin space-stack-xxs {
287
+ margin-bottom: var(--nypl-space-xxs);
288
+ }
289
+
290
+ @mixin space-stack-xs {
291
+ margin-bottom: var(--nypl-space-xs);
292
+ }
293
+
294
+ @mixin space-stack-s {
295
+ margin-bottom: var(--nypl-space-s);
296
+ }
297
+
298
+ @mixin space-stack-m {
299
+ margin-bottom: var(--nypl-space-m);
300
+ }
301
+
302
+ @mixin space-stack-l {
303
+ margin-bottom: var(--nypl-space-l);
304
+ }
305
+
306
+ @mixin space-stack-xl {
307
+ margin-bottom: var(--nypl-space-xl);
308
+ }
309
+
310
+ @mixin space-stack-xxl {
311
+ margin-bottom: var(--nypl-space-xxl);
312
+ }
313
+
314
+ @mixin space-stack-xxxl {
315
+ margin-bottom: var(--nypl-space-xxxl);
316
+ }
317
+
318
+ @mixin space-stack-page {
319
+ @include space-stack-l;
320
+
321
+ @include breakpoint($nypl-breakpoint-large) {
322
+ @include space-stack-xl;
323
+ }
324
+
325
+ &--full {
326
+ @include space-stack-xxl;
327
+
328
+ @include breakpoint($nypl-breakpoint-large) {
329
+ @include space-stack-xxxl;
330
+ }
331
+ }
332
+ }
333
+
334
+ @mixin remove-stack-page {
335
+ margin-top: calc(-1 * 32px);
336
+
337
+ @include breakpoint($nypl-breakpoint-large) {
338
+ margin-top: calc(-1 * 48px);
339
+ }
340
+
341
+ &--full {
342
+ margin-top: calc(-1 * 64px);
343
+
344
+ @include breakpoint($nypl-breakpoint-large) {
345
+ margin-top: calc(-1 * 96px);
346
+ }
347
+ }
348
+ }
349
+
350
+ @mixin get-space-stack($id) {
351
+ @if $id == "none" {
352
+ @include space-stack-none;
353
+ }
354
+
355
+ @if $id == "xxs" {
356
+ @include space-stack-xxs;
357
+ }
358
+
359
+ @if $id == "xs" {
360
+ @include space-stack-xs;
361
+ }
362
+
363
+ @if $id == "s" {
364
+ @include space-stack-s;
365
+ }
366
+
367
+ @if $id == "m" {
368
+ @include space-stack-m;
369
+ }
370
+
371
+ @if $id == "l" {
372
+ @include space-stack-l;
373
+ }
374
+
375
+ @if $id == "xl" {
376
+ @include space-stack-xl;
377
+ }
378
+
379
+ @if $id == "xxl" {
380
+ @include space-stack-xxl;
381
+ }
382
+
383
+ @if $id == "xxxl" {
384
+ @include space-stack-xxxl;
385
+ }
386
+ }
@@ -0,0 +1,3 @@
1
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */@import "~react-datepicker/dist/react-datepicker.css";html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}
2
+
3
+ /*! system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */@font-face{font-family:system-ui;font-style:normal;font-weight:300;src:local(".SFNSText-Light"),local(".HelveticaNeueDeskInterface-Light"),local(".LucidaGrandeUI"),local("Segoe UI Light"),local("Ubuntu Light"),local("Roboto-Light"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:300;src:local(".SFNSText-LightItalic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Light Italic"),local("Ubuntu Light Italic"),local("Roboto-LightItalic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:400;src:local(".SFNSText-Regular"),local(".HelveticaNeueDeskInterface-Regular"),local(".LucidaGrandeUI"),local("Segoe UI"),local("Ubuntu"),local("Roboto-Regular"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:400;src:local(".SFNSText-Italic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Italic"),local("Ubuntu Italic"),local("Roboto-Italic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:500;src:local(".SFNSText-Medium"),local(".HelveticaNeueDeskInterface-MediumP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold"),local("Ubuntu Medium"),local("Roboto-Medium"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:500;src:local(".SFNSText-MediumItalic"),local(".HelveticaNeueDeskInterface-MediumItalicP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold Italic"),local("Ubuntu Medium Italic"),local("Roboto-MediumItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:normal;font-weight:700;src:local(".SFNSText-Bold"),local(".HelveticaNeueDeskInterface-Bold"),local(".LucidaGrandeUI"),local("Segoe UI Bold"),local("Ubuntu Bold"),local("Roboto-Bold"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:700;src:local(".SFNSText-BoldItalic"),local(".HelveticaNeueDeskInterface-BoldItalic"),local(".LucidaGrandeUI"),local("Segoe UI Bold Italic"),local("Ubuntu Bold Italic"),local("Roboto-BoldItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}:root{--nypl-breakpoint-small:320px;--nypl-breakpoint-medium:600px;--nypl-breakpoint-large:960px;--nypl-breakpoint-xl:1280px}.container{padding:var(--nypl-space-s)}.placeholder{--color-place-holder:var(--nypl-colors-ui-gray-dark);align-items:center;border:4px dashed var(--color-place-holder);color:var(--color-place-holder);display:flex;font-size:3rem;justify-content:center;line-height:1.4;margin-bottom:var(--nypl-space-l);padding:4rem 1rem;width:100%}@media (min-width:960px){.placeholder{margin-bottom:var(--nypl-space-l)}}.placeholder--full{margin-bottom:var(--nypl-space-xxl)}@media (min-width:960px){.placeholder--full{margin-bottom:var(--nypl-space-xxxl)}}.placeholder--short{padding:1rem}.react-autosuggest__container{display:inline;position:relative;width:100%}.react-autosuggest__input--focused{outline:none}.react-autosuggest__input--open{border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.react-autosuggest__suggestions-container{display:none;width:100%}.react-autosuggest__suggestions-container--open{background-color:var(--nypl-colors-ui-white);display:block;font-weight:300;margin-top:1px;outline:1px solid var(--nypl-colors-ui-gray-light-cool);position:relative;width:100%;z-index:2}.react-autosuggest__suggestions-list{list-style-type:none;margin:0;padding:0}.react-autosuggest__suggestion{cursor:pointer;padding:var(--nypl-space-xs)}.react-autosuggest__suggestion--highlighted{background-color:var(--nypl-colors-ui-gray-light-cool)}.auto-suggest-bottom{padding:var(--nypl-space-xs)}.date-picker-calendar{font-family:var(--nypl-fonts-body)}.date-picker-calendar .react-datepicker{border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__triangle{transform:translate(32px)!important}.date-picker-calendar .react-datepicker__triangle:before{border-bottom-color:var(--nypl-colors-ui-gray-medium)!important}.date-picker-calendar .react-datepicker__triangle:after{border-bottom-color:var(--nypl-colors-ui-gray-x-light-cool)!important}.date-picker-calendar .react-datepicker__navigation-icon{top:5px;width:0}.date-picker-calendar .react-datepicker__navigation-icon:before{border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__navigation:hover .react-datepicker__navigation-icon:before{border-color:var(--nypl-colors-ui-gray-dark)}.date-picker-calendar .react-datepicker__header{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__year-wrapper{max-width:220px}.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__day:hover,.date-picker-calendar .react-datepicker__month-text:hover,.date-picker-calendar .react-datepicker__year-text:not(.react-datepicker__year-text--disabled):hover{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-radius:0;color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__month--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__year--in-range.react-datepicker__day--in-range{opacity:1}.date-picker-calendar .react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__day--in-selecting-range,.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__day-text--keyboard-selected,.date-picker-calendar .react-datepicker__month--in-range,.date-picker-calendar .react-datepicker__month--in-selecting-range,.date-picker-calendar .react-datepicker__month--keyboard-selected,.date-picker-calendar .react-datepicker__month-text--keyboard-selected,.date-picker-calendar .react-datepicker__year--in-range,.date-picker-calendar .react-datepicker__year--in-selecting-range,.date-picker-calendar .react-datepicker__year--keyboard-selected,.date-picker-calendar .react-datepicker__year-text--keyboard-selected{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-radius:0;color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--today,.date-picker-calendar .react-datepicker__day--today:hover,.date-picker-calendar .react-datepicker__day-text--today,.date-picker-calendar .react-datepicker__day-text--today:hover,.date-picker-calendar .react-datepicker__month--today,.date-picker-calendar .react-datepicker__month--today:hover,.date-picker-calendar .react-datepicker__month-text--today,.date-picker-calendar .react-datepicker__month-text--today:hover,.date-picker-calendar .react-datepicker__year--today,.date-picker-calendar .react-datepicker__year--today:hover,.date-picker-calendar .react-datepicker__year-text--today,.date-picker-calendar .react-datepicker__year-text--today:hover{background-color:var(--nypl-colors-ui-gray-light-cool);color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--selected,.date-picker-calendar .react-datepicker__day-text--selected,.date-picker-calendar .react-datepicker__month--selected,.date-picker-calendar .react-datepicker__month-text--selected,.date-picker-calendar .react-datepicker__year--selected,.date-picker-calendar .react-datepicker__year-text--selected{background-color:var(--nypl-colors-ui-focus);border-radius:0;color:var(--nypl-colors-ui-white);font-weight:700;opacity:1}.date-picker-calendar .react-datepicker__day--selected:hover,.date-picker-calendar .react-datepicker__day-text--selected:hover,.date-picker-calendar .react-datepicker__month--selected:hover,.date-picker-calendar .react-datepicker__month-text--selected:hover,.date-picker-calendar .react-datepicker__year--selected:hover,.date-picker-calendar .react-datepicker__year-text--selected:hover{background-color:var(--nypl-colors-ui-focus);color:var(--nypl-colors-ui-white)}
@@ -0,0 +1,20 @@
1
+ declare const Accordion: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ container: {
5
+ border: string;
6
+ width: string;
7
+ };
8
+ button: {
9
+ borderWidth: string;
10
+ fontWeight: string;
11
+ };
12
+ panel: {
13
+ padding: string;
14
+ borderLeftWidth: string;
15
+ borderRightWidth: string;
16
+ borderBottomWidth: string;
17
+ };
18
+ };
19
+ };
20
+ export default Accordion;
@@ -0,0 +1,105 @@
1
+ declare const Breadcrumb: {
2
+ baseStyle: {
3
+ bg: string;
4
+ color: string;
5
+ fontSize: string;
6
+ fontWeight: string;
7
+ paddingBottom: string;
8
+ paddingTop: string;
9
+ ol: {
10
+ alignItems: {
11
+ base: string;
12
+ md: string;
13
+ };
14
+ display: {
15
+ base: string;
16
+ md: string;
17
+ };
18
+ margin: string;
19
+ maxWidth: string;
20
+ paddingLeft: string;
21
+ paddingRight: string;
22
+ };
23
+ a: {
24
+ _hover: {
25
+ color: string;
26
+ };
27
+ };
28
+ "li:last-child": {
29
+ fontWeight: {
30
+ base: string;
31
+ md: string;
32
+ };
33
+ ".chakra-breadcrumb__link": {
34
+ _hover: {
35
+ cursor: string;
36
+ textDecoration: string;
37
+ };
38
+ };
39
+ ".icon": {
40
+ display: string;
41
+ };
42
+ };
43
+ "li:not(:last-child)": {
44
+ display: {
45
+ base: string;
46
+ md: string;
47
+ };
48
+ a: {
49
+ marginRight: {
50
+ base: string;
51
+ md: string;
52
+ };
53
+ };
54
+ ".icon": {
55
+ display: {
56
+ base: string;
57
+ md: string;
58
+ };
59
+ };
60
+ "span:not(.breadcrumb-label)": {
61
+ marginInlineEnd: string;
62
+ marginInlineStart: string;
63
+ };
64
+ };
65
+ "li:nth-last-of-type(2)": {
66
+ display: string;
67
+ span: {
68
+ display: {
69
+ base: string;
70
+ md: string;
71
+ };
72
+ };
73
+ };
74
+ };
75
+ variants: {
76
+ blogs: {
77
+ bg: string;
78
+ color: string;
79
+ a: {
80
+ _hover: {
81
+ color: string;
82
+ };
83
+ };
84
+ svg: {
85
+ fill: string;
86
+ };
87
+ };
88
+ booksAndMore: {
89
+ bg: string;
90
+ };
91
+ education: {
92
+ bg: string;
93
+ };
94
+ locations: {
95
+ bg: string;
96
+ };
97
+ research: {
98
+ bg: string;
99
+ };
100
+ whatsOn: {
101
+ bg: string;
102
+ };
103
+ };
104
+ };
105
+ export default Breadcrumb;