@nypl/design-system-react-components 0.28.0 → 1.0.2

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 (99) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +10 -10
  3. package/dist/components/Checkbox/Checkbox.d.ts +0 -1
  4. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +8 -0
  5. package/dist/components/Heading/Heading.d.ts +2 -0
  6. package/dist/components/Logo/Logo.d.ts +1 -1
  7. package/dist/components/Logo/LogoSvgs.d.ts +4 -0
  8. package/dist/design-system-react-components.cjs.development.js +1021 -683
  9. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  10. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  11. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  12. package/dist/design-system-react-components.esm.js +1022 -684
  13. package/dist/design-system-react-components.esm.js.map +1 -1
  14. package/dist/theme/components/button.d.ts +1 -0
  15. package/dist/theme/components/card.d.ts +98 -13
  16. package/dist/theme/components/checkboxGroup.d.ts +1 -1
  17. package/dist/theme/components/global.d.ts +1 -1
  18. package/dist/theme/components/heading.d.ts +4 -16
  19. package/dist/theme/components/image.d.ts +6 -0
  20. package/dist/theme/components/radioGroup.d.ts +1 -1
  21. package/dist/theme/components/skipNavigation.d.ts +3 -0
  22. package/dist/theme/components/structuredContent.d.ts +0 -5
  23. package/dist/utils/utils.d.ts +15 -0
  24. package/package.json +6 -6
  25. package/src/components/Accordion/Accordion.stories.mdx +18 -46
  26. package/src/components/Accordion/Accordion.tsx +3 -2
  27. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +12 -12
  28. package/src/components/Button/Button.stories.mdx +1 -1
  29. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +33 -2
  30. package/src/components/ButtonGroup/ButtonGroup.tsx +2 -1
  31. package/src/components/Card/Card.stories.mdx +2 -4
  32. package/src/components/Card/Card.tsx +2 -1
  33. package/src/components/Chakra/Box.stories.mdx +1 -1
  34. package/src/components/Chakra/Center.stories.mdx +1 -1
  35. package/src/components/Chakra/Flex.stories.mdx +1 -1
  36. package/src/components/Chakra/Grid.stories.mdx +1 -1
  37. package/src/components/Chakra/Stack.stories.mdx +1 -1
  38. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  39. package/src/components/Checkbox/Checkbox.test.tsx +42 -11
  40. package/src/components/Checkbox/Checkbox.tsx +25 -39
  41. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +589 -544
  42. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
  43. package/src/components/CheckboxGroup/CheckboxGroup.tsx +1 -1
  44. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1540 -1420
  45. package/src/components/ComponentWrapper/ComponentWrapper.tsx +12 -3
  46. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +5 -0
  47. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +36 -17
  48. package/src/components/Grid/SimpleGrid.stories.mdx +1 -3
  49. package/src/components/Heading/Heading.stories.mdx +4 -1
  50. package/src/components/Heading/Heading.tsx +4 -1
  51. package/src/components/Image/Image.stories.mdx +1 -1
  52. package/src/components/Logo/Logo.stories.mdx +10 -5
  53. package/src/components/Logo/Logo.tsx +4 -0
  54. package/src/components/Logo/LogoSvgs.tsx +8 -0
  55. package/src/components/Modal/Modal.stories.mdx +83 -90
  56. package/src/components/Pagination/Pagination.stories.mdx +1 -1
  57. package/src/components/Radio/Radio.stories.mdx +1 -1
  58. package/src/components/Radio/Radio.tsx +22 -31
  59. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +405 -365
  60. package/src/components/RadioGroup/RadioGroup.stories.mdx +2 -1
  61. package/src/components/RadioGroup/RadioGroup.tsx +2 -1
  62. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1236 -1116
  63. package/src/components/SearchBar/SearchBar.stories.mdx +3 -3
  64. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +32 -10
  65. package/src/components/Select/Select.stories.mdx +1 -1
  66. package/src/components/Select/Select.tsx +24 -22
  67. package/src/components/Select/__snapshots__/Select.test.tsx.snap +21 -11
  68. package/src/components/SkipNavigation/SkipNavigation.stories.mdx +2 -2
  69. package/src/components/Slider/Slider.stories.mdx +1 -1
  70. package/src/components/Slider/Slider.tsx +14 -14
  71. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +66 -33
  72. package/src/components/StyleGuide/Buttons.stories.mdx +1 -1
  73. package/src/components/StyleGuide/Colors.stories.mdx +2 -2
  74. package/src/components/StyleGuide/Forms.stories.mdx +2 -1
  75. package/src/components/StyleGuide/Iconography.stories.mdx +2 -2
  76. package/src/components/StyleGuide/Spacing.stories.mdx +1 -1
  77. package/src/components/StyleGuide/Typography.stories.mdx +1 -1
  78. package/src/components/Table/Table.stories.mdx +1 -5
  79. package/src/components/Table/Table.test.tsx +33 -0
  80. package/src/components/Table/Table.tsx +21 -0
  81. package/src/components/Template/Template.stories.mdx +9 -5
  82. package/src/components/TextInput/TextInput.stories.mdx +1 -1
  83. package/src/components/TextInput/TextInput.tsx +21 -21
  84. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +19 -9
  85. package/src/components/Toggle/Toggle.stories.mdx +1 -1
  86. package/src/components/Toggle/Toggle.tsx +22 -20
  87. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +400 -372
  88. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +1 -0
  89. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +5 -0
  90. package/src/docs/Chakra.stories.mdx +2 -2
  91. package/src/theme/components/button.ts +1 -0
  92. package/src/theme/components/card.ts +9 -3
  93. package/src/theme/components/componentWrapper.ts +1 -1
  94. package/src/theme/components/global.ts +1 -1
  95. package/src/theme/components/heading.ts +3 -3
  96. package/src/theme/components/image.ts +1 -0
  97. package/src/theme/components/skipNavigation.ts +3 -0
  98. package/src/theme/foundations/colors.ts +6 -9
  99. package/src/utils/utils.ts +40 -0
@@ -9,12 +9,16 @@ import Text from "../Text/Text";
9
9
  export interface ComponentWrapperProps {
10
10
  /** The UI elements that will be wrapped by this component */
11
11
  children: React.ReactNode;
12
+ /** A class name for the `div` parent element. */
13
+ className?: string;
12
14
  /** Optional string to set the text for the component's description */
13
15
  descriptionText?: string;
14
16
  /** Optional string to set the text for a `Heading` component */
15
17
  headingText?: string;
16
18
  /** Optional string to set the text for a `HelperErrorText` component */
17
19
  helperText?: HelperErrorTextType;
20
+ /** Styles that target the helper text. */
21
+ helperTextStyles?: { [key: string]: any };
18
22
  /** ID that other components can cross reference for accessibility purposes */
19
23
  id?: string;
20
24
  /** Optional string to populate the `HelperErrorText` for the error state
@@ -22,18 +26,23 @@ export interface ComponentWrapperProps {
22
26
  invalidText?: HelperErrorTextType;
23
27
  /** Sets invalid text in the error state. */
24
28
  isInvalid?: boolean;
29
+ /** Offers the ability to hide the helper/invalid text. */
30
+ showHelperInvalidText?: boolean;
25
31
  }
26
32
 
27
33
  export const ComponentWrapper = chakra(
28
34
  (props: React.PropsWithChildren<ComponentWrapperProps>) => {
29
35
  const {
30
36
  children,
37
+ className,
31
38
  descriptionText,
32
39
  headingText,
33
40
  helperText,
41
+ helperTextStyles = {},
34
42
  id,
35
43
  invalidText,
36
44
  isInvalid = false,
45
+ showHelperInvalidText = true,
37
46
  ...rest
38
47
  } = props;
39
48
  const hasChildren = !!children;
@@ -47,16 +56,16 @@ export const ComponentWrapper = chakra(
47
56
  }
48
57
 
49
58
  return (
50
- <Box __css={styles} {...rest}>
59
+ <Box className={className} id={`${id}-wrapper`} __css={styles} {...rest}>
51
60
  {headingText && <Heading id={`${id}-heading`} text={headingText} />}
52
61
  {descriptionText && <Text>{descriptionText}</Text>}
53
62
  {children}
54
- {footnote && (
63
+ {footnote && showHelperInvalidText && (
55
64
  <HelperErrorText
56
65
  id={`${id}-helperText`}
57
66
  isInvalid={isInvalid}
58
67
  text={footnote}
59
- __css={styles.helperErrorText}
68
+ __css={{ ...styles.helperErrorText, ...helperTextStyles }}
60
69
  />
61
70
  )}
62
71
  </Box>
@@ -3,6 +3,7 @@
3
3
  exports[`ComponentWrapper Renders the UI snapshot correctly 1`] = `
4
4
  <div
5
5
  className="css-1xdhyk6"
6
+ id="id-wrapper"
6
7
  >
7
8
  <h2
8
9
  className="chakra-heading css-1xdhyk6"
@@ -36,6 +37,7 @@ exports[`ComponentWrapper Renders the UI snapshot correctly 1`] = `
36
37
  exports[`ComponentWrapper Renders the UI snapshot correctly 2`] = `
37
38
  <div
38
39
  className="css-1xdhyk6"
40
+ id="id-wrapper"
39
41
  >
40
42
  <div>
41
43
  children elements
@@ -46,6 +48,7 @@ exports[`ComponentWrapper Renders the UI snapshot correctly 2`] = `
46
48
  exports[`ComponentWrapper Renders the UI snapshot correctly 3`] = `
47
49
  <div
48
50
  className="css-1xdhyk6"
51
+ id="id-wrapper"
49
52
  >
50
53
  <h2
51
54
  className="chakra-heading css-1xdhyk6"
@@ -79,6 +82,7 @@ exports[`ComponentWrapper Renders the UI snapshot correctly 3`] = `
79
82
  exports[`ComponentWrapper Renders the UI snapshot correctly 4`] = `
80
83
  <div
81
84
  className="css-kle7zy"
85
+ id="chakra-wrapper"
82
86
  >
83
87
  <div>
84
88
  children elements
@@ -90,6 +94,7 @@ exports[`ComponentWrapper Renders the UI snapshot correctly 5`] = `
90
94
  <div
91
95
  className="css-1xdhyk6"
92
96
  data-testid="props"
97
+ id="props-wrapper"
93
98
  >
94
99
  <div>
95
100
  children elements
@@ -27,7 +27,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 1`] = `
27
27
  className="react-datepicker__input-container"
28
28
  >
29
29
  <div
30
- className="css-1xdhyk6"
30
+ className="css-1u8qly9"
31
+ id="basic-start-wrapper"
31
32
  >
32
33
  <label
33
34
  className="css-1xdhyk6"
@@ -64,7 +65,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 1`] = `
64
65
  className="react-datepicker__input-container"
65
66
  >
66
67
  <div
67
- className="css-1xdhyk6"
68
+ className="css-1u8qly9"
69
+ id="basic-end-wrapper"
68
70
  >
69
71
  <label
70
72
  className="css-1xdhyk6"
@@ -122,7 +124,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 2`] = `
122
124
  className="react-datepicker__input-container"
123
125
  >
124
126
  <div
125
- className="css-1xdhyk6"
127
+ className="css-1u8qly9"
128
+ id="no-label-start-wrapper"
126
129
  >
127
130
  <label
128
131
  className="css-1xdhyk6"
@@ -159,7 +162,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 2`] = `
159
162
  className="react-datepicker__input-container"
160
163
  >
161
164
  <div
162
- className="css-1xdhyk6"
165
+ className="css-1u8qly9"
166
+ id="no-label-end-wrapper"
163
167
  >
164
168
  <label
165
169
  className="css-1xdhyk6"
@@ -217,7 +221,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 3`] = `
217
221
  className="react-datepicker__input-container"
218
222
  >
219
223
  <div
220
- className="css-1xdhyk6"
224
+ className="css-1u8qly9"
225
+ id="custom-format-start-wrapper"
221
226
  >
222
227
  <label
223
228
  className="css-1xdhyk6"
@@ -254,7 +259,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 3`] = `
254
259
  className="react-datepicker__input-container"
255
260
  >
256
261
  <div
257
- className="css-1xdhyk6"
262
+ className="css-1u8qly9"
263
+ id="custom-format-end-wrapper"
258
264
  >
259
265
  <label
260
266
  className="css-1xdhyk6"
@@ -312,7 +318,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 4`] = `
312
318
  className="react-datepicker__input-container"
313
319
  >
314
320
  <div
315
- className="css-1xdhyk6"
321
+ className="css-1u8qly9"
322
+ id="invalid-start-wrapper"
316
323
  >
317
324
  <label
318
325
  className="css-1xdhyk6"
@@ -322,6 +329,7 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 4`] = `
322
329
  From
323
330
  </label>
324
331
  <input
332
+ aria-describedby="invalid-start-helperText"
325
333
  aria-invalid={true}
326
334
  className="chakra-input css-0"
327
335
  disabled={false}
@@ -362,7 +370,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 4`] = `
362
370
  className="react-datepicker__input-container"
363
371
  >
364
372
  <div
365
- className="css-1xdhyk6"
373
+ className="css-1u8qly9"
374
+ id="invalid-end-wrapper"
366
375
  >
367
376
  <label
368
377
  className="css-1xdhyk6"
@@ -372,6 +381,7 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 4`] = `
372
381
  To
373
382
  </label>
374
383
  <input
384
+ aria-describedby="invalid-end-helperText"
375
385
  aria-invalid={true}
376
386
  className="chakra-input css-0"
377
387
  disabled={false}
@@ -445,7 +455,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 5`] = `
445
455
  className="react-datepicker__input-container"
446
456
  >
447
457
  <div
448
- className="css-1xdhyk6"
458
+ className="css-1u8qly9"
459
+ id="disabled-start-wrapper"
449
460
  >
450
461
  <label
451
462
  className="css-1xdhyk6"
@@ -482,7 +493,8 @@ exports[`DatePicker Date Range renders the UI snapshot correctly 5`] = `
482
493
  className="react-datepicker__input-container"
483
494
  >
484
495
  <div
485
- className="css-1xdhyk6"
496
+ className="css-1u8qly9"
497
+ id="disabled-end-wrapper"
486
498
  >
487
499
  <label
488
500
  className="css-1xdhyk6"
@@ -541,7 +553,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 1`] = `
541
553
  className="react-datepicker__input-container"
542
554
  >
543
555
  <div
544
- className="css-1xdhyk6"
556
+ className="css-1u8qly9"
557
+ id="basic-start-wrapper"
545
558
  >
546
559
  <label
547
560
  className="css-1xdhyk6"
@@ -586,7 +599,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 2`] = `
586
599
  className="react-datepicker__input-container"
587
600
  >
588
601
  <div
589
- className="css-1xdhyk6"
602
+ className="css-1u8qly9"
603
+ id="no-label-start-wrapper"
590
604
  >
591
605
  <input
592
606
  aria-label="Select the date you want to visit NYPL"
@@ -625,7 +639,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 3`] = `
625
639
  className="react-datepicker__input-container"
626
640
  >
627
641
  <div
628
- className="css-1xdhyk6"
642
+ className="css-1u8qly9"
643
+ id="custom-format-start-wrapper"
629
644
  >
630
645
  <label
631
646
  className="css-1xdhyk6"
@@ -670,7 +685,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 4`] = `
670
685
  className="react-datepicker__input-container"
671
686
  >
672
687
  <div
673
- className="css-1xdhyk6"
688
+ className="css-1u8qly9"
689
+ id="invalid-start-wrapper"
674
690
  >
675
691
  <label
676
692
  className="css-1xdhyk6"
@@ -729,7 +745,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 5`] = `
729
745
  className="react-datepicker__input-container"
730
746
  >
731
747
  <div
732
- className="css-1xdhyk6"
748
+ className="css-1u8qly9"
749
+ id="disabled-start-wrapper"
733
750
  >
734
751
  <label
735
752
  className="css-1xdhyk6"
@@ -787,7 +804,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 6`] = `
787
804
  className="react-datepicker__input-container"
788
805
  >
789
806
  <div
790
- className="css-1xdhyk6"
807
+ className="css-1u8qly9"
808
+ id="chakra-start-wrapper"
791
809
  >
792
810
  <label
793
811
  className="css-1xdhyk6"
@@ -846,7 +864,8 @@ exports[`DatePicker Single input renders the UI snapshot correctly 7`] = `
846
864
  className="react-datepicker__input-container"
847
865
  >
848
866
  <div
849
- className="css-1xdhyk6"
867
+ className="css-1u8qly9"
868
+ id="props-start-wrapper"
850
869
  >
851
870
  <label
852
871
  className="css-1xdhyk6"
@@ -226,9 +226,7 @@ export const iconNames = [
226
226
  ];
227
227
  for (const name in iconNames) {
228
228
  const iname = `Example icon: ${iconNames[name]}`;
229
- const iconRender = (
230
- <Icon key={name} name={iconNames[name]} size="xxxlarge" title={iname} />
231
- );
229
+ const iconRender = <Icon key={name} name={iconNames[name]} size="xxxlarge" />;
232
230
  icons.push(iconRender);
233
231
  }
234
232
 
@@ -27,6 +27,7 @@ import { getCategory } from "../../utils/componentCategories";
27
27
  level: {
28
28
  table: { defaultValue: { summary: "two" } },
29
29
  },
30
+ noSpace: { table: { defaultValue: { summary: false } } },
30
31
  }}
31
32
  />
32
33
 
@@ -35,7 +36,7 @@ import { getCategory } from "../../utils/componentCategories";
35
36
  | Component Version | DS Version |
36
37
  | ----------------- | ---------- |
37
38
  | Added | `0.0.4` |
38
- | Latest | `0.28.0` |
39
+ | Latest | `1.0.2` |
39
40
 
40
41
  ## Table of Contents
41
42
 
@@ -63,6 +64,8 @@ semantic elements can be overwritten using the `size` prop.
63
64
  args={{
64
65
  className: undefined,
65
66
  id: "heading-id",
67
+ level: "HeadingLevels.Two",
68
+ noSpace: false,
66
69
  level: "two",
67
70
  size: undefined,
68
71
  text: "Default Heading",
@@ -20,6 +20,8 @@ export interface HeadingProps {
20
20
  /** Optional size used to override the default styles of the semantic HTM
21
21
  * `<h>` elements */
22
22
  size?: HeadingSizes;
23
+ /** Optional prop used to remove default spacing */
24
+ noSpace?: boolean;
23
25
  /** Inner text of the `<h*>` element */
24
26
  text?: string;
25
27
  /** Optional URL that header points to; when `url` prop is passed to
@@ -50,6 +52,7 @@ export const Heading = chakra(
50
52
  id,
51
53
  level = "two",
52
54
  size,
55
+ noSpace,
53
56
  text,
54
57
  url,
55
58
  urlClass,
@@ -57,7 +60,7 @@ export const Heading = chakra(
57
60
  } = props;
58
61
  const finalLevel = getMappedLevel(level);
59
62
  const variant = size ? size : `h${finalLevel}`;
60
- const styles = useStyleConfig("Heading", { variant });
63
+ const styles = useStyleConfig("Heading", { variant, noSpace });
61
64
  // Combine native base styles with any additional styles.
62
65
  // This is used in the `Hero` and `Notification` components.
63
66
  const asHeading: any = `h${finalLevel}`;
@@ -66,7 +66,7 @@ export const imageBlockStyles = {
66
66
  | Component Version | DS Version |
67
67
  | ----------------- | ---------- |
68
68
  | Added | `0.0.6` |
69
- | Latest | `0.28.0` |
69
+ | Latest | `1.0.2` |
70
70
 
71
71
  ## Table of Contents
72
72
 
@@ -44,7 +44,7 @@ import { getCategory } from "../../utils/componentCategories";
44
44
  | Component Version | DS Version |
45
45
  | ----------------- | ---------- |
46
46
  | Added | `0.25.9` |
47
- | Latest | `0.28.0` |
47
+ | Latest | `1.0.2` |
48
48
 
49
49
  ## Table of Contents
50
50
 
@@ -120,12 +120,16 @@ export const logoRow = (logo, opts = {}) => {
120
120
  export const logos = [];
121
121
  export const sizes = [];
122
122
  export const logoNameValues = [
123
+ "appleAppStoreBlack",
124
+ "appleAppStoreWhite",
123
125
  "bplBlack",
124
126
  "bplWhite",
127
+ "cleverBadgeColor",
125
128
  "cleverColor",
126
129
  "cleverWhite",
127
130
  "firstbookColor",
128
131
  "firstbookColorNegative",
132
+ "googlePlayBlack",
129
133
  "lpaColor",
130
134
  "lpaBlack",
131
135
  "lpaWhite",
@@ -226,8 +230,9 @@ fill the full width of the parent element.
226
230
  ## All Logos
227
231
 
228
232
  Update the icon of the `Logo` component by passing the `name` prop with a value
229
- from the `LogoNames` type. The values are `"bplBlack"`, `"bplWhite"`,
230
- `"cleverColor"`, `"cleverWhite"`, `"firstbookColor"`, `"firstbookColorNegative"`,
233
+ from the `LogoNames` type. The values are `"appleAppStoreBlack"`,
234
+ `"appleAppStoreWhite"`,`"bplBlack"`, `"bplWhite"`, `"cleverBadgeColor"`, `"cleverColor"`,
235
+ `"cleverWhite"`, `"firstbookColor"`, `"firstbookColorNegative"`, `"googlePlayBlack"`,
231
236
  `"lpaBlack"`, `"lpaColor"`, `"lpaWhite"`, `"mlnBlack"`, `"mlnWhite"`,
232
237
  `"nyplFullBlack"`, `"nyplFullWhite"`, `"nyplLionBlack"`, `"nyplLionWhite"`,
233
238
  `"openebooksColor"`, `"openebooksNegative"`, `"openebooksWithTextColor"`,
@@ -253,7 +258,7 @@ child to the `Logo` component.
253
258
  ```jsx
254
259
  <Logo {...props}>
255
260
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192.756 192.756">
256
- <g fill-rule="evenodd" clip-rule="evenodd">
261
+ <g fillRule="evenodd" clipRule="evenodd">
257
262
  <path fill="#fff" d="M0 0h192.756v192.756H0V0z" />
258
263
  <path
259
264
  d="M59.73 117.578c-9.859-4.912-23.261-15.887-23.413-27.06C36.149 78.129 44.451 75.087 50 75.087c5.701 0 8.286 3.345 10.637 5.777 2.352-2.433 4.936-5.777 10.637-5.777 5.549 0 13.851 3.042 13.682 15.431-.151 11.173-13.553 22.148-23.412 27.06-.35.174-.629.262-.907.262s-.557-.088-.907-.262z"
@@ -275,7 +280,7 @@ child to the `Logo` component.
275
280
  {(args) => (
276
281
  <Logo {...args}>
277
282
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192.756 192.756">
278
- <g fill-rule="evenodd" clip-rule="evenodd">
283
+ <g fillRule="evenodd" clipRule="evenodd">
279
284
  <path fill="#fff" d="M0 0h192.756v192.756H0V0z" />
280
285
  <path
281
286
  d="M59.73 117.578c-9.859-4.912-23.261-15.887-23.413-27.06C36.149 78.129 44.451 75.087 50 75.087c5.701 0 8.286 3.345 10.637 5.777 2.352-2.433 4.936-5.777 10.637-5.777 5.549 0 13.851 3.042 13.682 15.431-.151 11.173-13.553 22.148-23.412 27.06-.35.174-.629.262-.907.262s-.557-.088-.907-.262z"
@@ -9,12 +9,16 @@ import * as React from "react";
9
9
  import logoSvgs from "./LogoSvgs";
10
10
 
11
11
  export type LogoNames =
12
+ | "appleAppStoreBlack"
13
+ | "appleAppStoreWhite"
12
14
  | "bplBlack"
13
15
  | "bplWhite"
16
+ | "cleverBadgeColor"
14
17
  | "cleverColor"
15
18
  | "cleverWhite"
16
19
  | "firstbookColor"
17
20
  | "firstbookColorNegative"
21
+ | "googlePlayBlack"
18
22
  | "lpaBlack"
19
23
  | "lpaColor"
20
24
  | "lpaWhite"
@@ -1,10 +1,14 @@
1
1
  /* eslint-disable camelcase */
2
+ import appleAppStoreBlack from "../../../icons/svg/logo-apple-app-store-black.svg";
3
+ import appleAppStoreWhite from "../../../icons/svg/logo-apple-app-store-white.svg";
2
4
  import bplBlack from "../../../icons/svg/logo-bpl-black.svg";
3
5
  import bplWhite from "../../../icons/svg/logo-bpl-white.svg";
6
+ import cleverBadgeColor from "../../../icons/svg/logo-clever-badge-color.svg";
4
7
  import cleverColor from "../../../icons/svg/logo-clever-color.svg";
5
8
  import cleverWhite from "../../../icons/svg/logo-clever-white.svg";
6
9
  import firstbookColor from "../../../icons/svg/logo-firstbook-color.svg";
7
10
  import firstbookColorNegative from "../../../icons/svg/logo-firstbook-color-negative.svg";
11
+ import googlePlayBlack from "../../../icons/svg/logo-google-play-black.svg";
8
12
  import lpaColor from "../../../icons/svg/logo-lpa-color.svg";
9
13
  import lpaBlack from "../../../icons/svg/logo-lpa-black.svg";
10
14
  import lpaWhite from "../../../icons/svg/logo-lpa-white.svg";
@@ -40,12 +44,16 @@ import treasuresColor from "../../../icons/svg/logo-treasures-color.svg";
40
44
  import treasuresColorNegative from "../../../icons/svg/logo-treasures-color-negative.svg";
41
45
 
42
46
  export default {
47
+ appleAppStoreBlack,
48
+ appleAppStoreWhite,
43
49
  bplBlack,
44
50
  bplWhite,
51
+ cleverBadgeColor,
45
52
  cleverColor,
46
53
  cleverWhite,
47
54
  firstbookColor,
48
55
  firstbookColorNegative,
56
+ googlePlayBlack,
49
57
  lpaBlack,
50
58
  lpaColor,
51
59
  lpaWhite,
@@ -206,96 +206,89 @@ In either `Modal` pattern, the main content inside the `Modal` component will
206
206
  scroll while the `Modal`'s header and footer still stay static. Check the
207
207
  example below with a lot of content inside the `Modal`.
208
208
 
209
+ export const scrollModalProps = {
210
+ bodyContent: (
211
+ <>
212
+ <Heading text="Content Title" />
213
+ <p>
214
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
215
+ tempor incididunt ut labore et dolore magna aliqua. Pellentesque massa
216
+ placerat duis ultricies lacus sed turpis tincidunt.
217
+ <Link href="http://nypl.org">Porttitor eget dolor</Link> morbi non arcu risus
218
+ quis varius. Faucibus in ornare quam viverra orci sagittis.
219
+ </p>
220
+ <p>
221
+ Nisl vel pretium lectus quam id leo in. Etiam dignissim diam quis enim
222
+ lobortis scelerisque fermentum. Diam maecenas sed enim ut sem viverra.
223
+ Diam quam nulla porttitor massa id neque. Sed faucibus turpis in eu mi.
224
+ </p>
225
+ <p>
226
+ Ornare lectus sit amet est placerat in. Quis blandit turpis cursus in.
227
+ Aliquam ut porttitor leo a diam sollicitudin tempor id eu. Pellentesque
228
+ eu tincidunt tortor aliquam nulla facilisi cras fermentum. Porttitor leo
229
+ a diam sollicitudin tempor id eu nisl nunc. Feugiat nisl pretium fusce
230
+ id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl
231
+ nunc.
232
+ </p>
233
+ <p>
234
+ Mauris nunc congue nisi vitae suscipit tellus mauris a diam. Purus
235
+ gravida quis blandit turpis cursus in hac. Morbi tempus iaculis urna id
236
+ volutpat. Lectus nulla at volutpat diam ut venenatis. Donec ac odio
237
+ tempor orci dapibus ultrices in iaculis. Dui vivamus arcu felis bibendum
238
+ ut tristique. Cras semper auctor neque vitae tempus quam pellentesque.
239
+ Placerat orci nulla pellentesque dignissim enim sit amet. Feugiat
240
+ pretium nibh ipsum consequat. Placerat orci nulla pellentesque
241
+ dignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisi
242
+ est sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at
243
+ risus 'viverra adipiscing at. Eu augue ut lectus arcu bibendum at varius
244
+ vel' pharetra.
245
+ </p>
246
+ <Heading text="Another Title" />
247
+ <p>
248
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
249
+ tempor incididunt ut labore et dolore magna aliqua. Pellentesque massa
250
+ placerat duis ultricies lacus sed turpis tincidunt.
251
+ <Link href="http://nypl.org">Porttitor eget dolor</Link> morbi non arcu risus
252
+ quis varius. Faucibus in ornare quam viverra orci sagittis.
253
+ </p>
254
+ <p>
255
+ Nisl vel pretium lectus quam id leo in. Etiam dignissim diam quis enim
256
+ lobortis scelerisque fermentum. Diam maecenas sed enim ut sem viverra.
257
+ Diam quam nulla porttitor massa id neque. Sed faucibus turpis in eu mi.
258
+ </p>
259
+ <p>
260
+ Ornare lectus sit amet est placerat in. Quis blandit turpis cursus in.
261
+ Aliquam ut porttitor leo a diam sollicitudin tempor id eu. Pellentesque
262
+ eu tincidunt tortor aliquam nulla facilisi cras fermentum. Porttitor leo
263
+ a diam sollicitudin tempor id eu nisl nunc. Feugiat nisl pretium fusce
264
+ id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl
265
+ nunc.
266
+ </p>
267
+ <p>
268
+ Mauris nunc congue nisi vitae suscipit tellus mauris a diam. Purus
269
+ gravida quis blandit turpis cursus in hac. Morbi tempus iaculis urna id
270
+ volutpat. Lectus nulla at volutpat diam ut venenatis. Donec ac odio
271
+ tempor orci dapibus ultrices in iaculis. Dui vivamus arcu felis bibendum
272
+ ut tristique. Cras semper auctor neque vitae tempus quam pellentesque.
273
+ Placerat orci nulla pellentesque dignissim enim sit amet. Feugiat
274
+ pretium nibh ipsum consequat. Placerat orci nulla pellentesque
275
+ dignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisi
276
+ est sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at
277
+ risus 'viverra adipiscing at. Eu augue ut lectus arcu bibendum at varius
278
+ vel' pharetra.
279
+ </p>
280
+ </>
281
+ ),
282
+ closeButtonLabel: "Close Button",
283
+ headingText: "Modal Heading Text",
284
+ };
285
+
209
286
  <Canvas withToolbar>
210
- <Story
211
- name="Content Window Scrolling"
212
- args={{
213
- buttonText: "Button Text",
214
- id: "modal-scrolling",
215
- modalProps: {
216
- bodyContent: (
217
- <>
218
- <Heading text="Content Title" />
219
- <p>
220
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
221
- eiusmod tempor incididunt ut labore et dolore magna aliqua.
222
- Pellentesque massa placerat duis ultricies lacus sed turpis
223
- tincidunt.
224
- <Link href="http://nypl.org">Porttitor eget dolor</Link> morbi non
225
- arcu risus quis varius. Faucibus in ornare quam viverra orci sagittis.
226
- </p>
227
- <p>
228
- Nisl vel pretium lectus quam id leo in. Etiam dignissim diam quis
229
- enim lobortis scelerisque fermentum. Diam maecenas sed enim ut sem
230
- viverra. Diam quam nulla porttitor massa id neque. Sed faucibus
231
- turpis in eu mi.
232
- </p>
233
- <p>
234
- Ornare lectus sit amet est placerat in. Quis blandit turpis cursus
235
- in. Aliquam ut porttitor leo a diam sollicitudin tempor id eu.
236
- Pellentesque eu tincidunt tortor aliquam nulla facilisi cras
237
- fermentum. Porttitor leo a diam sollicitudin tempor id eu nisl
238
- nunc. Feugiat nisl pretium fusce id velit ut tortor. Porttitor leo
239
- a diam sollicitudin tempor id eu nisl nunc.
240
- </p>
241
- <p>
242
- Mauris nunc congue nisi vitae suscipit tellus mauris a diam. Purus
243
- gravida quis blandit turpis cursus in hac. Morbi tempus iaculis
244
- urna id volutpat. Lectus nulla at volutpat diam ut venenatis.
245
- Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamus
246
- arcu felis bibendum ut tristique. Cras semper auctor neque vitae
247
- tempus quam pellentesque. Placerat orci nulla pellentesque
248
- dignissim enim sit amet. Feugiat pretium nibh ipsum consequat.
249
- Placerat orci nulla pellentesque dignissim. Suspendisse faucibus
250
- interdum posuere lorem. Nullam non nisi est sit. Turpis egestas
251
- integer eget aliquet nibh praesent. Tortor at risus 'viverra
252
- adipiscing at. Eu augue ut lectus arcu bibendum at varius vel'
253
- pharetra.
254
- </p>
255
- <Heading text="Another Title" />
256
- <p>
257
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
258
- eiusmod tempor incididunt ut labore et dolore magna aliqua.
259
- Pellentesque massa placerat duis ultricies lacus sed turpis
260
- tincidunt.
261
- <Link href="http://nypl.org">Porttitor eget dolor</Link> morbi non
262
- arcu risus quis varius. Faucibus in ornare quam viverra orci sagittis.
263
- </p>
264
- <p>
265
- Nisl vel pretium lectus quam id leo in. Etiam dignissim diam quis
266
- enim lobortis scelerisque fermentum. Diam maecenas sed enim ut sem
267
- viverra. Diam quam nulla porttitor massa id neque. Sed faucibus
268
- turpis in eu mi.
269
- </p>
270
- <p>
271
- Ornare lectus sit amet est placerat in. Quis blandit turpis cursus
272
- in. Aliquam ut porttitor leo a diam sollicitudin tempor id eu.
273
- Pellentesque eu tincidunt tortor aliquam nulla facilisi cras
274
- fermentum. Porttitor leo a diam sollicitudin tempor id eu nisl
275
- nunc. Feugiat nisl pretium fusce id velit ut tortor. Porttitor leo
276
- a diam sollicitudin tempor id eu nisl nunc.
277
- </p>
278
- <p>
279
- Mauris nunc congue nisi vitae suscipit tellus mauris a diam. Purus
280
- gravida quis blandit turpis cursus in hac. Morbi tempus iaculis
281
- urna id volutpat. Lectus nulla at volutpat diam ut venenatis.
282
- Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamus
283
- arcu felis bibendum ut tristique. Cras semper auctor neque vitae
284
- tempus quam pellentesque. Placerat orci nulla pellentesque
285
- dignissim enim sit amet. Feugiat pretium nibh ipsum consequat.
286
- Placerat orci nulla pellentesque dignissim. Suspendisse faucibus
287
- interdum posuere lorem. Nullam non nisi est sit. Turpis egestas
288
- integer eget aliquet nibh praesent. Tortor at risus 'viverra
289
- adipiscing at. Eu augue ut lectus arcu bibendum at varius vel'
290
- pharetra.
291
- </p>
292
- </>
293
- ),
294
- closeButtonLabel: "Close Button",
295
- headingText: "Modal Heading Text",
296
- },
297
- }}
298
- >
299
- {(args) => <ModalTrigger {...args} />}
287
+ <Story name="Content Window Scrolling">
288
+ <ModalTrigger
289
+ buttonText="Button Text"
290
+ id="modal-scrolling"
291
+ modalProps={scrollModalProps}
292
+ />
300
293
  </Story>
301
294
  </Canvas>
@@ -170,7 +170,7 @@ export function CurrentPagePaginationExample() {
170
170
  currentPage={page}
171
171
  onPageChange={(selectedPage) => handleSelection(selectedPage)}
172
172
  />
173
- <Button type="button" onClick={handleClick}>
173
+ <Button id="go-to-btn" type="button" onClick={handleClick}>
174
174
  Go to Page 1
175
175
  </Button>
176
176
  </VStack>
@@ -53,7 +53,7 @@ import DSProvider from "../../theme/provider";
53
53
  | Component Version | DS Version |
54
54
  | ----------------- | ---------- |
55
55
  | Added | `0.22.0` |
56
- | Latest | `0.28.0` |
56
+ | Latest | `1.0.2` |
57
57
 
58
58
  ## Table of Contents
59
59