@ndlib/component-library 1.0.45 → 1.0.47

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 (182) hide show
  1. package/dist/components/composites/Card/Card.stories.js +7 -7
  2. package/dist/components/composites/Card/Card.test.js +1 -1
  3. package/dist/components/composites/Card/index.js +10 -10
  4. package/dist/components/composites/CardV2/CardV2.stories.js +14 -14
  5. package/dist/components/composites/CardV2/CardV2.test.js +1 -1
  6. package/dist/components/composites/CardV2/index.js +11 -11
  7. package/dist/components/composites/DragDropList/DragDrop.test.js +1 -1
  8. package/dist/components/composites/DragDropList/DragDropList.stories.d.ts +2 -3
  9. package/dist/components/composites/DragDropList/DragDropList.stories.js +2 -2
  10. package/dist/components/composites/DragDropList/index.d.ts +1 -2
  11. package/dist/components/composites/DragDropList/index.js +5 -5
  12. package/dist/components/composites/DropdownLinks/DropdownLinks.stories.js +3 -3
  13. package/dist/components/composites/DropdownLinks/DropdownLinks.test.js +1 -1
  14. package/dist/components/composites/DropdownLinks/index.js +2 -2
  15. package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +3 -3
  16. package/dist/components/composites/DropdownLinksV2/index.js +2 -2
  17. package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
  18. package/dist/components/composites/EmptyState/index.js +2 -2
  19. package/dist/components/composites/EmptyStateV2/EmptyStateV2.module.css +10 -0
  20. package/dist/components/composites/EmptyStateV2/EmptyStateV2.stories.d.ts +10 -0
  21. package/dist/components/composites/EmptyStateV2/EmptyStateV2.stories.js +33 -0
  22. package/dist/components/composites/EmptyStateV2/index.d.ts +15 -0
  23. package/dist/components/composites/EmptyStateV2/index.js +36 -0
  24. package/dist/components/composites/Modal/Modal.stories.js +2 -2
  25. package/dist/components/composites/Modal/Modal.test.js +4 -4
  26. package/dist/components/composites/Modal/index.js +5 -5
  27. package/dist/components/composites/ModalV2/ModalV2.stories.js +2 -2
  28. package/dist/components/composites/ModalV2/ModalV2.test.js +4 -4
  29. package/dist/components/composites/ModalV2/index.js +5 -5
  30. package/dist/components/composites/NavMenu/demo.js +1 -1
  31. package/dist/components/composites/NavMenu/index.js +6 -6
  32. package/dist/components/composites/NavMenuV2/demoV2.js +2 -2
  33. package/dist/components/composites/NavMenuV2/index.js +3 -3
  34. package/dist/components/composites/Seo/SeoDataDisplay/index.js +1 -1
  35. package/dist/components/composites/Seo/index.js +1 -1
  36. package/dist/components/composites/SnackBar/examples.js +7 -7
  37. package/dist/components/composites/SnackBar/index.js +4 -4
  38. package/dist/components/composites/StructuredData/index.d.ts +0 -1
  39. package/dist/components/composites/StructuredData/index.js +1 -1
  40. package/dist/components/elements/Alerts/Alerts.stories.js +2 -2
  41. package/dist/components/elements/Alerts/index.js +2 -2
  42. package/dist/components/elements/AlertsV2/AlertsV2.stories.js +2 -2
  43. package/dist/components/elements/AlertsV2/index.js +1 -1
  44. package/dist/components/elements/ArrowLink/ArrowLink.stories.js +1 -1
  45. package/dist/components/elements/ArrowLink/ArrowLink.test.js +5 -5
  46. package/dist/components/elements/ArrowLink/index.d.ts +0 -1
  47. package/dist/components/elements/ArrowLink/index.js +3 -3
  48. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +1 -1
  49. package/dist/components/elements/ArrowLinkV2/index.d.ts +0 -1
  50. package/dist/components/elements/ArrowLinkV2/index.js +1 -1
  51. package/dist/components/elements/AutoComplete/AutoComplete.stories.js +1 -1
  52. package/dist/components/elements/BoxV2/BoxV2.stories.js +1 -1
  53. package/dist/components/elements/BoxV2/index.d.ts +2 -2
  54. package/dist/components/elements/BrandingBar/index.d.ts +0 -1
  55. package/dist/components/elements/BrandingBar/index.js +4 -4
  56. package/dist/components/elements/BrandingBarV2/index.js +1 -1
  57. package/dist/components/elements/Button/Button.stories.js +9 -9
  58. package/dist/components/elements/Button/Button.test.js +1 -1
  59. package/dist/components/elements/Button/index.d.ts +14 -14
  60. package/dist/components/elements/Button/index.js +4 -4
  61. package/dist/components/elements/ButtonV2/ButtonV2.stories.js +9 -9
  62. package/dist/components/elements/ButtonV2/ButtonV2.test.js +1 -1
  63. package/dist/components/elements/ButtonV2/index.d.ts +15 -15
  64. package/dist/components/elements/ButtonV2/index.js +2 -2
  65. package/dist/components/elements/CheckboxGroup/index.js +2 -2
  66. package/dist/components/elements/CheckboxGroupV2/index.js +2 -2
  67. package/dist/components/elements/ColumnV2/index.d.ts +2 -2
  68. package/dist/components/elements/ColumnV2/index.js +1 -1
  69. package/dist/components/elements/ConsentBanner/ConsentBanner.stories.js +1 -1
  70. package/dist/components/elements/ConsentBanner/index.js +4 -4
  71. package/dist/components/elements/DatePicker/DatePicker.stories.js +3 -3
  72. package/dist/components/elements/DatePicker/index.d.ts +3 -3
  73. package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +3 -3
  74. package/dist/components/elements/DatePickerV2/index.d.ts +3 -3
  75. package/dist/components/elements/Dropdown/Dropdown.stories.js +3 -3
  76. package/dist/components/elements/Dropdown/index.js +2 -2
  77. package/dist/components/elements/DropdownV2/DropdownV2.stories.js +3 -3
  78. package/dist/components/elements/DropdownV2/index.js +2 -2
  79. package/dist/components/elements/Group/index.js +1 -1
  80. package/dist/components/elements/GroupV2/index.js +1 -1
  81. package/dist/components/elements/Heading/Heading.stories.js +3 -3
  82. package/dist/components/elements/Heading/Heading.test.js +2 -2
  83. package/dist/components/elements/HeadingV2/HeadingV2.stories.js +3 -3
  84. package/dist/components/elements/HeadingV2/HeadingV2.test.js +2 -2
  85. package/dist/components/elements/Icon/Icon.stories.js +1 -1
  86. package/dist/components/elements/IconV2/IconV2.stories.js +1 -1
  87. package/dist/components/elements/Label/Label.stories.js +1 -1
  88. package/dist/components/elements/Label/Label.test.js +5 -5
  89. package/dist/components/elements/LabelV2/LabelV2.stories.js +1 -1
  90. package/dist/components/elements/LabelV2/LabelV2.test.js +5 -5
  91. package/dist/components/elements/Link/Link.stories.js +1 -1
  92. package/dist/components/elements/Link/Link.test.js +7 -7
  93. package/dist/components/elements/List/List.stories.js +5 -5
  94. package/dist/components/elements/List/List.test.js +2 -2
  95. package/dist/components/elements/List/index.js +5 -5
  96. package/dist/components/elements/ListBox/index.d.ts +2 -17
  97. package/dist/components/elements/ListBox/index.js +3 -3
  98. package/dist/components/elements/ListBoxV2/index.d.ts +2 -18
  99. package/dist/components/elements/ListBoxV2/index.js +2 -2
  100. package/dist/components/elements/ListV2/ListV2.stories.js +5 -5
  101. package/dist/components/elements/ListV2/index.js +5 -5
  102. package/dist/components/elements/Markdown/index.d.ts +0 -1
  103. package/dist/components/elements/Markdown/index.js +2 -2
  104. package/dist/components/elements/MarkdownV2/index.d.ts +0 -1
  105. package/dist/components/elements/MarkdownV2/index.js +2 -2
  106. package/dist/components/elements/MonthPicker/MonthPicker.stories.js +2 -2
  107. package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +2 -2
  108. package/dist/components/elements/Paragraph/Paragraph.stories.js +2 -2
  109. package/dist/components/elements/ParagraphV2/ParagraphV2.stories.js +2 -2
  110. package/dist/components/elements/Pill/Pill.stories.js +3 -3
  111. package/dist/components/elements/Pill/index.d.ts +6 -6
  112. package/dist/components/elements/Pill/index.js +2 -2
  113. package/dist/components/elements/PillV2/PillV2.stories.js +3 -3
  114. package/dist/components/elements/PillV2/index.d.ts +6 -6
  115. package/dist/components/elements/PillV2/index.js +1 -1
  116. package/dist/components/elements/RadioGroup/index.js +2 -2
  117. package/dist/components/elements/RadioGroupV2/index.js +2 -2
  118. package/dist/components/elements/RawHtml/index.d.ts +0 -1
  119. package/dist/components/elements/ReadMore/ReadMore.stories.js +4 -4
  120. package/dist/components/elements/ReadMore/index.js +3 -3
  121. package/dist/components/elements/ReadMoreV2/ReadMoreV2.stories.js +4 -4
  122. package/dist/components/elements/ReadMoreV2/index.js +3 -3
  123. package/dist/components/elements/RowV2/index.d.ts +4 -4
  124. package/dist/components/elements/RowV2/index.js +1 -1
  125. package/dist/components/elements/Select/Select.stories.js +3 -3
  126. package/dist/components/elements/Select/index.js +7 -7
  127. package/dist/components/elements/SelectV2/SelectV2.stories.js +3 -3
  128. package/dist/components/elements/SelectV2/index.js +4 -4
  129. package/dist/components/elements/Spinner/Spinner.stories.js +1 -1
  130. package/dist/components/elements/Spinner/index.d.ts +0 -1
  131. package/dist/components/elements/SpinnerV2/SpinnerV2.stories.js +1 -1
  132. package/dist/components/elements/SpinnerV2/index.d.ts +0 -1
  133. package/dist/components/elements/TabList/example.js +2 -2
  134. package/dist/components/elements/TabList/index.js +2 -2
  135. package/dist/components/elements/TabListV2/example.js +2 -2
  136. package/dist/components/elements/TabListV2/index.js +2 -2
  137. package/dist/components/elements/Table/Table.stories.js +18 -18
  138. package/dist/components/elements/Table/Table.test.js +1 -1
  139. package/dist/components/elements/Table/index.d.ts +0 -1
  140. package/dist/components/elements/Table/index.js +8 -8
  141. package/dist/components/elements/TextInput/TextInput.stories.js +4 -4
  142. package/dist/components/elements/TextInput/TextInput.test.js +2 -2
  143. package/dist/components/elements/TextInput/index.d.ts +10 -10
  144. package/dist/components/elements/TextInput/index.js +7 -7
  145. package/dist/components/elements/TextInputV2/TextInputV2.stories.js +4 -4
  146. package/dist/components/elements/TextInputV2/TextInputV2.test.js +1 -1
  147. package/dist/components/elements/TextInputV2/index.d.ts +11 -11
  148. package/dist/components/elements/TextInputV2/index.js +4 -4
  149. package/dist/components/elements/layout/Box.d.ts +2 -2
  150. package/dist/components/elements/layout/Box.stories.js +1 -1
  151. package/dist/components/elements/layout/Column.d.ts +2 -2
  152. package/dist/components/elements/layout/Column.js +1 -1
  153. package/dist/components/elements/layout/Flex.stories.js +4 -4
  154. package/dist/components/elements/layout/Flex.test.js +2 -2
  155. package/dist/components/elements/layout/Row.d.ts +3 -3
  156. package/dist/components/elements/layout/Row.js +1 -1
  157. package/dist/components/elements/option.d.ts +0 -1
  158. package/dist/components/providers/alerts.js +1 -1
  159. package/dist/components/providers/componentConfig.js +1 -1
  160. package/dist/components/providers/componentConfigV2.js +1 -1
  161. package/dist/components/providers/dialogs.js +2 -2
  162. package/dist/components/providers/env.js +2 -2
  163. package/dist/components/providers/media.js +2 -2
  164. package/dist/components/providers/mediaV2.js +2 -2
  165. package/dist/components/providers/menu.js +1 -1
  166. package/dist/components/providers/snackBar.d.ts +0 -1
  167. package/dist/components/providers/snackBar.js +2 -2
  168. package/dist/components/providers/ui.js +1 -1
  169. package/dist/components/providers/uiV2.js +1 -1
  170. package/dist/components/providers/uniqueIds.js +1 -1
  171. package/dist/index.d.ts +1 -0
  172. package/dist/index.js +1 -0
  173. package/dist/theme/Color.stories.js +1 -1
  174. package/dist/theme/Typography.stories.js +1 -1
  175. package/dist/theme/colors.d.ts +2 -2
  176. package/dist/theme/colors.js +4 -2
  177. package/dist/theme/css-variables.css +2 -2
  178. package/dist/theme/index.d.ts +7 -90
  179. package/dist/theme/index.js +2 -2
  180. package/dist/theme/typography.d.ts +1 -1
  181. package/dist/utils/test.js +2 -2
  182. package/package.json +5 -5
@@ -18,19 +18,19 @@ const sizes = [
18
18
  { size: HEADING_SIZE.SM, label: 'Small (Default Level 4-6)' },
19
19
  ];
20
20
  export const Default = {
21
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, Object.assign({ type: GROUP_TYPE.REGION }, { children: _jsx(Heading, Object.assign({ size: size.size }, { children: size.label })) })))) })),
21
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, { type: GROUP_TYPE.REGION, children: _jsx(Heading, { size: size.size, children: size.label }) }))) })),
22
22
  args: {
23
23
  children: 'Heading',
24
24
  },
25
25
  };
26
26
  export const Color = {
27
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, Object.assign({ type: GROUP_TYPE.REGION }, { children: _jsx(Heading, Object.assign({ size: size.size, sx: { color: COLOR.TEXT } }, { children: size.label })) })))) })),
27
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, { type: GROUP_TYPE.REGION, children: _jsx(Heading, { size: size.size, sx: { color: COLOR.TEXT }, children: size.label }) }))) })),
28
28
  args: {
29
29
  children: 'Heading',
30
30
  },
31
31
  };
32
32
  export const Underline = {
33
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, Object.assign({ type: GROUP_TYPE.REGION }, { children: _jsx(Heading, Object.assign({ size: size.size, underline: true }, { children: size.label })) })))) })),
33
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, { type: GROUP_TYPE.REGION, children: _jsx(Heading, { size: size.size, underline: true, children: size.label }) }))) })),
34
34
  args: {
35
35
  children: 'Heading',
36
36
  },
@@ -26,7 +26,7 @@ describe('Heading', () => {
26
26
  vi.useRealTimers();
27
27
  });
28
28
  it('renders without an error if passed standalone prop', () => {
29
- const { getByText } = render(_jsx(Heading, Object.assign({ standalone: true }, { children: "Foo" })));
29
+ const { getByText } = render(_jsx(Heading, { standalone: true, children: "Foo" }));
30
30
  expect(getByText('Foo')).toBeInTheDocument();
31
31
  });
32
32
  it('renders without an error if used within region Group component', () => {
@@ -37,7 +37,7 @@ describe('Heading', () => {
37
37
  expect(() => render(_jsx(Heading, { children: "Foo" }))).toThrow();
38
38
  }));
39
39
  it('throws if used within non-region Group component', () => __awaiter(void 0, void 0, void 0, function* () {
40
- expect(() => render(_jsx(Group, Object.assign({ type: GROUP_TYPE.GROUP }, { children: _jsx(Heading, { children: "Foo" }) })))).toThrow();
40
+ expect(() => render(_jsx(Group, { type: GROUP_TYPE.GROUP, children: _jsx(Heading, { children: "Foo" }) }))).toThrow();
41
41
  }));
42
42
  it('labels group target automatically', () => {
43
43
  const { getByText } = render(_jsx(Group, { children: _jsx(Heading, { children: "Foo" }) }));
@@ -18,19 +18,19 @@ const sizes = [
18
18
  { size: HEADINGV2_SIZE.SM, label: 'Small (Default Level 4-6)' },
19
19
  ];
20
20
  export const Default = {
21
- render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION }, { children: _jsx(HeadingV2, Object.assign({ size: size.size }, { children: size.label })) })))) })),
21
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, { type: GROUPV2_TYPE.REGION, children: _jsx(HeadingV2, { size: size.size, children: size.label }) }))) })),
22
22
  args: {
23
23
  children: 'Heading V2',
24
24
  },
25
25
  };
26
26
  export const Color = {
27
- render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION }, { children: _jsx(HeadingV2, Object.assign({ size: size.size, sx: { color: COLOR.TEXT } }, { children: size.label })) })))) })),
27
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, { type: GROUPV2_TYPE.REGION, children: _jsx(HeadingV2, { size: size.size, sx: { color: COLOR.TEXT }, children: size.label }) }))) })),
28
28
  args: {
29
29
  children: 'Heading V2',
30
30
  },
31
31
  };
32
32
  export const Underline = {
33
- render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION }, { children: _jsx(HeadingV2, Object.assign({ size: size.size, underline: true }, { children: size.label })) })))) })),
33
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, { type: GROUPV2_TYPE.REGION, children: _jsx(HeadingV2, { size: size.size, underline: true, children: size.label }) }))) })),
34
34
  args: {
35
35
  children: 'Heading V2',
36
36
  },
@@ -26,7 +26,7 @@ describe('HeadingV2', () => {
26
26
  vi.useRealTimers();
27
27
  });
28
28
  it('renders without an error if passed standalone prop', () => {
29
- const { getByText } = render(_jsx(HeadingV2, Object.assign({ standalone: true }, { children: "Foo" })));
29
+ const { getByText } = render(_jsx(HeadingV2, { standalone: true, children: "Foo" }));
30
30
  expect(getByText('Foo')).toBeInTheDocument();
31
31
  });
32
32
  it('renders without an error if used within region Group component', () => {
@@ -37,7 +37,7 @@ describe('HeadingV2', () => {
37
37
  expect(() => render(_jsx(HeadingV2, { children: "Foo" }))).toThrow();
38
38
  }));
39
39
  it('throws if used within non-region Group component', () => __awaiter(void 0, void 0, void 0, function* () {
40
- expect(() => render(_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.GROUP }, { children: _jsx(HeadingV2, { children: "Foo" }) })))).toThrow();
40
+ expect(() => render(_jsx(GroupV2, { type: GROUPV2_TYPE.GROUP, children: _jsx(HeadingV2, { children: "Foo" }) }))).toThrow();
41
41
  }));
42
42
  it('labels group target automatically', () => {
43
43
  const { getByText } = render(_jsx(GroupV2, { children: _jsx(HeadingV2, { children: "Foo" }) }));
@@ -24,7 +24,7 @@ const sizes = [
24
24
  { size: FONT_SIZE.XS, label: 'X Small' },
25
25
  ];
26
26
  export const Default = {
27
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsxs(Group, Object.assign({ type: GROUP_TYPE.REGION }, { children: [_jsx(Heading, Object.assign({ size: HEADING_SIZE.MD }, { children: size.label })), _jsx(Icon, { icon: AccessAlarmIcon, size: size.size })] })))) })),
27
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsxs(Group, { type: GROUP_TYPE.REGION, children: [_jsx(Heading, { size: HEADING_SIZE.MD, children: size.label }), _jsx(Icon, { icon: AccessAlarmIcon, size: size.size })] }))) })),
28
28
  };
29
29
  export const CustomColor = {
30
30
  render: () => (_jsx(Icon, { icon: AccessAlarmIcon, color: COLOR.SECONDARY, size: FONT_SIZE.LG })),
@@ -24,7 +24,7 @@ const sizes = [
24
24
  { size: FONT_SIZE.XS, label: 'X Small' },
25
25
  ];
26
26
  export const Default = {
27
- render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION }, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD }, { children: size.label })), _jsx(IconV2, { icon: AccessAlarmIcon, size: size.size })] })))) })),
27
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(IconV2, { icon: AccessAlarmIcon, size: size.size })] }))) })),
28
28
  };
29
29
  export const CustomColor = {
30
30
  render: () => (_jsx(IconV2, { icon: AccessAlarmIcon, color: COLOR.SECONDARY, size: FONT_SIZE.LG })),
@@ -15,7 +15,7 @@ const sizes = [
15
15
  { size: LABEL_SIZE.SM, label: 'Small' },
16
16
  ];
17
17
  export const Default = {
18
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, Object.assign({ type: GROUP_TYPE.GROUP }, { children: _jsx(Label, Object.assign({ size: size.size }, { children: size.label })) })))) })),
18
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsx(Group, { type: GROUP_TYPE.GROUP, children: _jsx(Label, { size: size.size, children: size.label }) }))) })),
19
19
  args: {
20
20
  children: 'Label',
21
21
  },
@@ -28,26 +28,26 @@ describe('Label', () => {
28
28
  vi.useRealTimers();
29
29
  });
30
30
  it('renders without an error if passed standalone prop', () => {
31
- const { getByText } = render(_jsx(Label, Object.assign({ standalone: true }, { children: "Foo" })));
31
+ const { getByText } = render(_jsx(Label, { standalone: true, children: "Foo" }));
32
32
  expect(getByText('Foo')).toBeInTheDocument();
33
33
  });
34
34
  it('renders without an error if used within region Group component', () => {
35
- const { getByText } = render(_jsx(Group, Object.assign({ type: GROUP_TYPE.GROUP }, { children: _jsx(Label, { children: "Foo" }) })));
35
+ const { getByText } = render(_jsx(Group, { type: GROUP_TYPE.GROUP, children: _jsx(Label, { children: "Foo" }) }));
36
36
  expect(getByText('Foo')).toBeInTheDocument();
37
37
  });
38
38
  it('throws if used outside a Group component', () => __awaiter(void 0, void 0, void 0, function* () {
39
39
  expect(() => render(_jsx(Label, { children: "Foo" }))).toThrow();
40
40
  }));
41
41
  it('throws if used within non-group-type Group component', () => __awaiter(void 0, void 0, void 0, function* () {
42
- expect(() => render(_jsx(Group, Object.assign({ type: GROUP_TYPE.REGION }, { children: _jsx(Label, { children: "Foo" }) })))).toThrow();
42
+ expect(() => render(_jsx(Group, { type: GROUP_TYPE.REGION, children: _jsx(Label, { children: "Foo" }) }))).toThrow();
43
43
  }));
44
44
  it('labels group target automatically', () => {
45
- const { getByLabelText } = render(_jsx(Group, Object.assign({ type: GROUP_TYPE.GROUP }, { children: _jsx(Label, { children: "Foo" }) })));
45
+ const { getByLabelText } = render(_jsx(Group, { type: GROUP_TYPE.GROUP, children: _jsx(Label, { children: "Foo" }) }));
46
46
  expect(getByLabelText('Foo')).toBeDefined();
47
47
  });
48
48
  it('can send focus to label target', () => __awaiter(void 0, void 0, void 0, function* () {
49
49
  const INPUT_TEST_ID = 'input-test-id';
50
- const { getByText, getByTestId } = render(_jsx(Group, Object.assign({ type: GROUP_TYPE.GROUP }, { children: ({ labelTargetId }) => (_jsxs(_Fragment, { children: [_jsx(Label, { children: "Foo" }), _jsx("input", { id: labelTargetId, "data-testid": INPUT_TEST_ID })] })) })));
50
+ const { getByText, getByTestId } = render(_jsx(Group, { type: GROUP_TYPE.GROUP, children: ({ labelTargetId }) => (_jsxs(_Fragment, { children: [_jsx(Label, { children: "Foo" }), _jsx("input", { id: labelTargetId, "data-testid": INPUT_TEST_ID })] })) }));
51
51
  userEvent.click(getByText('Foo'));
52
52
  yield waitFor(() => {
53
53
  expect(getByTestId(INPUT_TEST_ID)).toHaveFocus();
@@ -15,7 +15,7 @@ const sizes = [
15
15
  { size: LABELV2_SIZE.SM, label: 'Small' },
16
16
  ];
17
17
  export const Default = {
18
- render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.GROUP }, { children: _jsx(LabelV2, Object.assign({ size: size.size }, { children: size.label })) })))) })),
18
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsx(GroupV2, { type: GROUPV2_TYPE.GROUP, children: _jsx(LabelV2, { size: size.size, children: size.label }) }))) })),
19
19
  args: {
20
20
  children: 'Label',
21
21
  },
@@ -28,26 +28,26 @@ describe('LabelV2', () => {
28
28
  vi.useRealTimers();
29
29
  });
30
30
  it('renders without an error if passed standalone prop', () => {
31
- const { getByText } = render(_jsx(LabelV2, Object.assign({ standalone: true }, { children: "Foo" })));
31
+ const { getByText } = render(_jsx(LabelV2, { standalone: true, children: "Foo" }));
32
32
  expect(getByText('Foo')).toBeInTheDocument();
33
33
  });
34
34
  it('renders without an error if used within region Group component', () => {
35
- const { getByText } = render(_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.GROUP }, { children: _jsx(LabelV2, { children: "Foo" }) })));
35
+ const { getByText } = render(_jsx(GroupV2, { type: GROUPV2_TYPE.GROUP, children: _jsx(LabelV2, { children: "Foo" }) }));
36
36
  expect(getByText('Foo')).toBeInTheDocument();
37
37
  });
38
38
  it('throws if used outside a Group component', () => __awaiter(void 0, void 0, void 0, function* () {
39
39
  expect(() => render(_jsx(LabelV2, { children: "Foo" }))).toThrow();
40
40
  }));
41
41
  it('throws if used within non-group-type Group component', () => __awaiter(void 0, void 0, void 0, function* () {
42
- expect(() => render(_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION }, { children: _jsx(LabelV2, { children: "Foo" }) })))).toThrow();
42
+ expect(() => render(_jsx(GroupV2, { type: GROUPV2_TYPE.REGION, children: _jsx(LabelV2, { children: "Foo" }) }))).toThrow();
43
43
  }));
44
44
  it('labels group target automatically', () => {
45
- const { getByLabelText } = render(_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.GROUP }, { children: _jsx(LabelV2, { children: "Foo" }) })));
45
+ const { getByLabelText } = render(_jsx(GroupV2, { type: GROUPV2_TYPE.GROUP, children: _jsx(LabelV2, { children: "Foo" }) }));
46
46
  expect(getByLabelText('Foo')).toBeDefined();
47
47
  });
48
48
  it('can send focus to label target', () => __awaiter(void 0, void 0, void 0, function* () {
49
49
  const INPUT_TEST_ID = 'input-test-id';
50
- const { getByText, getByTestId } = render(_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.GROUP }, { children: ({ labelTargetId }) => (_jsxs(_Fragment, { children: [_jsx(LabelV2, { children: "Foo" }), _jsx("input", { id: labelTargetId, "data-testid": INPUT_TEST_ID })] })) })));
50
+ const { getByText, getByTestId } = render(_jsx(GroupV2, { type: GROUPV2_TYPE.GROUP, children: ({ labelTargetId }) => (_jsxs(_Fragment, { children: [_jsx(LabelV2, { children: "Foo" }), _jsx("input", { id: labelTargetId, "data-testid": INPUT_TEST_ID })] })) }));
51
51
  userEvent.click(getByText('Foo'));
52
52
  yield waitFor(() => {
53
53
  expect(getByTestId(INPUT_TEST_ID)).toHaveFocus();
@@ -16,7 +16,7 @@ const sizes = [
16
16
  { size: LINK_SIZE.SM, label: 'Small' },
17
17
  ];
18
18
  export const Default = {
19
- render: () => (_jsx(Column, { children: sizes.map((size) => (_jsxs(Group, { children: [_jsx(Heading, Object.assign({ size: HEADING_SIZE.MD }, { children: size.label })), _jsx(Link, Object.assign({ size: size.size, to: "/" }, { children: "Click Me" }))] }))) })),
19
+ render: () => (_jsx(Column, { children: sizes.map((size) => (_jsxs(Group, { children: [_jsx(Heading, { size: HEADING_SIZE.MD, children: size.label }), _jsx(Link, { size: size.size, to: "/", children: "Click Me" })] }))) })),
20
20
  args: {
21
21
  children: 'Click Me',
22
22
  },
@@ -12,15 +12,15 @@ const CustomExternalLink = (props) => {
12
12
  };
13
13
  describe('Link', () => {
14
14
  it('renders default external link component without throwing', () => {
15
- const { getByRole } = render(_jsx(Link, Object.assign({ to: "https://google.com" }, { children: "Foo" })));
15
+ const { getByRole } = render(_jsx(Link, { to: "https://google.com", children: "Foo" }));
16
16
  expect(getByRole('link')).toBeInTheDocument();
17
17
  });
18
18
  it('renders default internal link component without throwing', () => {
19
- const { getByRole } = render(_jsx(Link, Object.assign({ to: "/test/path" }, { children: "Foo" })));
19
+ const { getByRole } = render(_jsx(Link, { to: "/test/path", children: "Foo" }));
20
20
  expect(getByRole('link')).toBeInTheDocument();
21
21
  });
22
22
  it('renders custom external component if passed', () => {
23
- const { getByTestId } = render(_jsx(Link, Object.assign({ to: "https://google.com" }, { children: "Foo" })), {
23
+ const { getByTestId } = render(_jsx(Link, { to: "https://google.com", children: "Foo" }), {
24
24
  components: {
25
25
  link: {
26
26
  externalLinkComponent: CustomExternalLink,
@@ -32,7 +32,7 @@ describe('Link', () => {
32
32
  expect(() => getByTestId(CUSTOM_INTERNAL_TEST_ID)).toThrow();
33
33
  });
34
34
  it('renders custom internal component if passed', () => {
35
- const { getByTestId } = render(_jsx(Link, Object.assign({ to: "/test/route" }, { children: "Foo" })), {
35
+ const { getByTestId } = render(_jsx(Link, { to: "/test/route", children: "Foo" }), {
36
36
  components: {
37
37
  link: {
38
38
  externalLinkComponent: CustomExternalLink,
@@ -44,7 +44,7 @@ describe('Link', () => {
44
44
  expect(() => getByTestId(CUSTOM_EXTERNAL_TEST_ID)).toThrow();
45
45
  });
46
46
  it('passes styles to custom component', () => {
47
- const { getByTestId } = render(_jsxs(_Fragment, { children: [_jsx(Link, Object.assign({ to: "https://google.com", sx: { mt: 1 } }, { children: "Foo" })), _jsx(Link, Object.assign({ to: "/test/route", sx: { mt: 1 } }, { children: "Foo" }))] }), {
47
+ const { getByTestId } = render(_jsxs(_Fragment, { children: [_jsx(Link, { to: "https://google.com", sx: { mt: 1 }, children: "Foo" }), _jsx(Link, { to: "/test/route", sx: { mt: 1 }, children: "Foo" })] }), {
48
48
  components: {
49
49
  link: {
50
50
  externalLinkComponent: CustomExternalLink,
@@ -52,7 +52,7 @@ describe('Link', () => {
52
52
  },
53
53
  },
54
54
  });
55
- expect(getByTestId(CUSTOM_EXTERNAL_TEST_ID)).toHaveStyle(`margin-top: 0.25rem`);
56
- expect(getByTestId(CUSTOM_INTERNAL_TEST_ID)).toHaveStyle(`margin-top: 0.25rem`);
55
+ expect(getByTestId(CUSTOM_EXTERNAL_TEST_ID)).toHaveStyle(`margin-top: 4px`);
56
+ expect(getByTestId(CUSTOM_INTERNAL_TEST_ID)).toHaveStyle(`margin-top: 4px`);
57
57
  });
58
58
  });
@@ -18,7 +18,7 @@ const meta = {
18
18
  };
19
19
  export default meta;
20
20
  export const Default = {
21
- render: () => (_jsx(Row, { children: _jsxs(List, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsxs(ListItem, Object.assign({ index: 2 }, { children: ["List Item 3", _jsxs(List, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "List Item 3.1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "List Item 3.2" }))] })] }))] }) })),
21
+ render: () => (_jsx(Row, { children: _jsxs(List, { children: [_jsx(ListItem, { index: 0, children: "List Item 1" }), _jsx(ListItem, { index: 1, children: "List Item 2" }), _jsxs(ListItem, { index: 2, children: ["List Item 3", _jsxs(List, { children: [_jsx(ListItem, { index: 0, children: "List Item 3.1" }), _jsx(ListItem, { index: 1, children: "List Item 3.2" })] })] })] }) })),
22
22
  };
23
23
  const sizes = [
24
24
  { size: LIST_SIZE.LG, label: 'Large' },
@@ -26,14 +26,14 @@ const sizes = [
26
26
  { size: LIST_SIZE.SM, label: 'Small' },
27
27
  ];
28
28
  export const Sizes = {
29
- render: () => (_jsx(Column, { children: sizes.map((size, i) => (_jsxs(Group, Object.assign({ type: GROUP_TYPE.REGION, sx: { mt: 3 } }, { children: [_jsx(Heading, Object.assign({ size: HEADING_SIZE.MD }, { children: size.label })), _jsx(Row, Object.assign({ sx: { mt: 2 } }, { children: _jsxs(List, Object.assign({ size: size.size }, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItem, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) }))] }), i))) })),
29
+ render: () => (_jsx(Column, { children: sizes.map((size, i) => (_jsxs(Group, { type: GROUP_TYPE.REGION, sx: { mt: 3 }, children: [_jsx(Heading, { size: HEADING_SIZE.MD, children: size.label }), _jsx(Row, { sx: { mt: 2 }, children: _jsxs(List, { size: size.size, children: [_jsx(ListItem, { index: 0, children: "List Item 1" }), _jsx(ListItem, { index: 1, children: "List Item 2" }), _jsx(ListItem, { index: 2, children: "List Item 3" })] }) })] }, i))) })),
30
30
  };
31
31
  export const Ordered = {
32
- render: () => (_jsx(Row, { children: _jsxs(List, Object.assign({ icon: ChevronRightIcon, ordered: true }, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItem, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) })),
32
+ render: () => (_jsx(Row, { children: _jsxs(List, { icon: ChevronRightIcon, ordered: true, children: [_jsx(ListItem, { index: 0, children: "List Item 1" }), _jsx(ListItem, { index: 1, children: "List Item 2" }), _jsx(ListItem, { index: 2, children: "List Item 3" })] }) })),
33
33
  };
34
34
  export const CustomIcon = {
35
- render: () => (_jsx(Row, { children: _jsxs(List, Object.assign({ icon: ChevronRightIcon, iconColor: COLOR.PRIMARY }, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItem, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) })),
35
+ render: () => (_jsx(Row, { children: _jsxs(List, { icon: ChevronRightIcon, iconColor: COLOR.PRIMARY, children: [_jsx(ListItem, { index: 0, children: "List Item 1" }), _jsx(ListItem, { index: 1, children: "List Item 2" }), _jsx(ListItem, { index: 2, children: "List Item 3" })] }) })),
36
36
  };
37
37
  export const CustomIconPerItem = {
38
- render: () => (_jsx(Row, { children: _jsxs(List, Object.assign({ iconSize: FONT_SIZE.ML }, { children: [_jsx(ListItem, Object.assign({ index: 0, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Unfavorite" }, { children: "Favorite 1" })), _jsx(ListItem, Object.assign({ index: 1, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Favorite" }, { children: "Favorited 2" })), _jsx(ListItem, Object.assign({ index: 2, icon: BookmarkBorderIcon, onIconClick: () => { }, iconLabel: "Favorite" }, { children: "Not Favorited" }))] })) })),
38
+ render: () => (_jsx(Row, { children: _jsxs(List, { iconSize: FONT_SIZE.ML, children: [_jsx(ListItem, { index: 0, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Unfavorite", children: "Favorite 1" }), _jsx(ListItem, { index: 1, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Favorite", children: "Favorited 2" }), _jsx(ListItem, { index: 2, icon: BookmarkBorderIcon, onIconClick: () => { }, iconLabel: "Favorite", children: "Not Favorited" })] }) })),
39
39
  };
@@ -13,12 +13,12 @@ import { List, ListItem } from '.';
13
13
  const MockIcon = () => _jsx("div", { "data-testid": "mock-icon" });
14
14
  describe('List', () => {
15
15
  it('renders children inside list', () => {
16
- const { getByRole, getAllByRole } = render(_jsxs(List, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "Item 2" }))] }));
16
+ const { getByRole, getAllByRole } = render(_jsxs(List, { children: [_jsx(ListItem, { index: 0, children: "Item 1" }), _jsx(ListItem, { index: 1, children: "Item 2" })] }));
17
17
  expect(getByRole('list')).toBeDefined();
18
18
  expect(getAllByRole('listitem')).toHaveLength(2);
19
19
  });
20
20
  it('renders custom component if provided', () => __awaiter(void 0, void 0, void 0, function* () {
21
- const { getAllByTestId } = render(_jsxs(List, Object.assign({ icon: MockIcon }, { children: [_jsx(ListItem, Object.assign({ index: 0 }, { children: "Item 1" })), _jsx(ListItem, Object.assign({ index: 1 }, { children: "Item 2" }))] })));
21
+ const { getAllByTestId } = render(_jsxs(List, { icon: MockIcon, children: [_jsx(ListItem, { index: 0, children: "Item 1" }), _jsx(ListItem, { index: 1, children: "Item 2" })] }));
22
22
  expect(getAllByTestId('mock-icon')).toHaveLength(2);
23
23
  }));
24
24
  });
@@ -70,14 +70,14 @@ export const List = ({ sx, size: sizeParam, ordered, icon, iconSize: iconSizePar
70
70
  const size = sizeParam || parentSize || LIST_SIZE.MD;
71
71
  const iconSize = iconSizeParam || parentIconSize || iconSizeMap[size];
72
72
  const iconColor = iconColorParam || parentIconColor || COLOR.TEXT;
73
- return (_jsx(ListConfigContext.Provider, Object.assign({ value: {
73
+ return (_jsx(ListConfigContext.Provider, { value: {
74
74
  size,
75
75
  icon: icon || defaultIcon,
76
76
  iconColor,
77
77
  iconSize,
78
78
  ordered: ordered || false,
79
79
  depth,
80
- } }, { children: ordered ? (_jsx("ul", Object.assign({ sx: Object.assign(Object.assign({}, defaultStyles), sx) }, { children: children }))) : (_jsx("ol", Object.assign({ sx: Object.assign(Object.assign({}, defaultStyles), sx) }, { children: children }))) })));
80
+ }, children: ordered ? (_jsx("ul", { sx: Object.assign(Object.assign({}, defaultStyles), sx), children: children })) : (_jsx("ol", { sx: Object.assign(Object.assign({}, defaultStyles), sx), children: children })) }));
81
81
  };
82
82
  export const ListItem = (_a) => {
83
83
  var { index, sx, icon: iconParam, iconSize: iconSizeParam, iconColor: iconColorParam, onIconClick, onClick, children, iconLabel, tabIndex: tabIndexParam } = _a, rest = __rest(_a, ["index", "sx", "icon", "iconSize", "iconColor", "onIconClick", "onClick", "children", "iconLabel", "tabIndex"]);
@@ -93,10 +93,10 @@ export const ListItem = (_a) => {
93
93
  const typographyStyles = getTypographyStyles(sizeTypographyMap[size]);
94
94
  const lineHeight = useLinesHeight({ typography, lines: 1 });
95
95
  const tabIndex = tabIndexParam || (onClick ? 0 : undefined);
96
- return (_jsxs("li", Object.assign({ sx: Object.assign(Object.assign({ depth, display: 'flex', mt: index === 0 && depth === 0 ? 0 : marginSizeMap[size], ml: 1 }, typographyStyles), sx), tabIndex: tabIndex }, rest, { children: [ordered ? (_jsxs(Label, Object.assign({ standalone: true, sx: { mr: 2 } }, { children: [index + 1, "."] }))) : (_jsx(Column, Object.assign({ sx: { height: lineHeight }, justify: "center" }, { children: _jsx(Icon, { icon: icon, color: iconColor, size: iconSize, onClick: onIconClick, "aria-label": iconLabel, sx: {
96
+ return (_jsxs("li", Object.assign({ sx: Object.assign(Object.assign({ depth, display: 'flex', mt: index === 0 && depth === 0 ? 0 : marginSizeMap[size], ml: 1 }, typographyStyles), sx), tabIndex: tabIndex }, rest, { children: [ordered ? (_jsxs(Label, { standalone: true, sx: { mr: 2 }, children: [index + 1, "."] })) : (_jsx(Column, { sx: { height: lineHeight }, justify: "center", children: _jsx(Icon, { icon: icon, color: iconColor, size: iconSize, onClick: onIconClick, "aria-label": iconLabel, sx: {
97
97
  mr: 3,
98
98
  alignItems: 'flex-start',
99
- } }) }))), _jsx("div", Object.assign({ sx: {
99
+ } }) })), _jsx("div", { sx: {
100
100
  cursor: onClick ? 'pointer' : 'default',
101
- } }, { children: children }))] })));
101
+ }, children: children })] })));
102
102
  };
@@ -12,22 +12,7 @@ type ListBoxProps<Value extends Key, Option extends BasicOption<Value>> = Styled
12
12
  onSelect?: () => void;
13
13
  onBlur?: () => void;
14
14
  }>;
15
- export declare const ListBox: <Value extends React.Key = string, Option extends BasicOption<Value> = any>(props: {
16
- sx?: import("../../..").StylesProp | undefined;
17
- children?: React.ReactNode;
18
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & {
19
- options: Option[];
20
- renderOption?: RenderOption<Value, Option> | undefined;
21
- selected?: Value | undefined;
22
- focused?: Value | undefined;
23
- selectOption?: ((option: Option) => void) | undefined;
24
- onDownPress?: (() => void) | undefined;
25
- onUpPress?: (() => void) | undefined;
26
- onSelect?: (() => void) | undefined;
27
- onBlur?: (() => void) | undefined;
28
- } & {
29
- htmlFor?: string | undefined;
30
- } & {
31
- ref?: React.ForwardedRef<HTMLDivElement> | undefined;
15
+ export declare const ListBox: <Value extends Key = string, Option extends BasicOption<Value> = any>(props: ListBoxProps<Value, Option> & {
16
+ ref?: React.ForwardedRef<HTMLDivElement>;
32
17
  }) => any;
33
18
  export {};
@@ -20,7 +20,7 @@ function ListBoxInner(_a, ref) {
20
20
  const typography = getTypographyStyles(TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM);
21
21
  return (_jsx("div", Object.assign({ role: "listbox", ref: ref, sx: Object.assign(Object.assign({ border: 'solid 1px', borderRadius: '4px', borderColor: COLOR.LIGHT_GRAY, backgroundColor: COLOR.BACKGROUND, boxShadow: '0px 0px 8px 2px #dddddd' }, typography), sx), onKeyDown: (e) => {
22
22
  console.log(e);
23
- } }, rest, { children: options.map((option) => (_jsx("div", Object.assign({ id: getOptionId(option.value), "aria-selected": selected === option.value, role: "option", onClick: option.onClick, onMouseDown: () => selectOption && selectOption(option), sx: {
23
+ } }, rest, { children: options.map((option) => (_jsx("div", { id: getOptionId(option.value), "aria-selected": selected === option.value, role: "option", onClick: option.onClick, onMouseDown: () => selectOption && selectOption(option), sx: {
24
24
  px: 4,
25
25
  py: 3,
26
26
  backgroundColor: focused === option.value
@@ -42,10 +42,10 @@ function ListBoxInner(_a, ref) {
42
42
  ':hover': {
43
43
  backgroundColor: COLOR.EXTRA_EXTRA_LIGHT_GRAY,
44
44
  },
45
- } }, { children: renderOption({
45
+ }, children: renderOption({
46
46
  option,
47
47
  selected: selected === option.value,
48
48
  focused: focused === option.value,
49
- }) }), option.value))) })));
49
+ }) }, option.value))) })));
50
50
  }
51
51
  export const ListBox = React.forwardRef(ListBoxInner);
@@ -13,23 +13,7 @@ type ListBoxV2Props<Value extends Key, Option extends BasicOption<Value>> = Styl
13
13
  onSelect?: () => void;
14
14
  onBlur?: () => void;
15
15
  }>;
16
- export declare const ListBoxV2: <Value extends React.Key = string, Option extends BasicOption<Value> = any>(props: {
17
- sx?: import("../../../theme").StylesPropV2 | undefined;
18
- children?: React.ReactNode;
19
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & {
20
- options: Option[];
21
- className?: string | undefined;
22
- renderOption?: RenderOption<Value, Option> | undefined;
23
- selected?: Value | undefined;
24
- focused?: Value | undefined;
25
- selectOption?: ((option: Option) => void) | undefined;
26
- onDownPress?: (() => void) | undefined;
27
- onUpPress?: (() => void) | undefined;
28
- onSelect?: (() => void) | undefined;
29
- onBlur?: (() => void) | undefined;
30
- } & {
31
- htmlFor?: string | undefined;
32
- } & {
33
- ref?: React.ForwardedRef<HTMLDivElement> | undefined;
16
+ export declare const ListBoxV2: <Value extends Key = string, Option extends BasicOption<Value> = any>(props: ListBoxV2Props<Value, Option> & {
17
+ ref?: React.ForwardedRef<HTMLDivElement>;
34
18
  }) => any;
35
19
  export {};
@@ -18,11 +18,11 @@ import * as styles from './ListBoxV2.module.css';
18
18
  import clsx from 'clsx';
19
19
  const typeSafeStyles = styles;
20
20
  function ListBoxOption({ option, selected, focused, selectOption, renderOption, }) {
21
- return (_jsx("div", Object.assign({ id: getOptionId(option.value), "aria-selected": selected === option.value, role: "option", onClick: option.onClick, onMouseDown: () => selectOption && selectOption(option), className: typeSafeStyles.listBoxOption }, { children: renderOption({
21
+ return (_jsx("div", { id: getOptionId(option.value), "aria-selected": selected === option.value, role: "option", onClick: option.onClick, onMouseDown: () => selectOption && selectOption(option), className: typeSafeStyles.listBoxOption, children: renderOption({
22
22
  option,
23
23
  selected: selected === option.value,
24
24
  focused: focused === option.value,
25
- }) }), option.value));
25
+ }) }, option.value));
26
26
  }
27
27
  function ListBoxInnerV2(_a, ref) {
28
28
  var { options, renderOption: renderOptionParam, selected, focused, selectOption, className, sx, style } = _a, rest = __rest(_a, ["options", "renderOption", "selected", "focused", "selectOption", "className", "sx", "style"]);
@@ -18,7 +18,7 @@ const meta = {
18
18
  };
19
19
  export default meta;
20
20
  export const Default = {
21
- render: () => (_jsx(RowV2, { children: _jsxs(ListV2, { children: [_jsx(ListItemV2, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItemV2, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsxs(ListItemV2, Object.assign({ index: 2 }, { children: ["List Item 3", _jsxs(ListV2, { children: [_jsx(ListItemV2, Object.assign({ index: 0 }, { children: "List Item 3.1" })), _jsx(ListItemV2, Object.assign({ index: 1 }, { children: "List Item 3.2" }))] })] }))] }) })),
21
+ render: () => (_jsx(RowV2, { children: _jsxs(ListV2, { children: [_jsx(ListItemV2, { index: 0, children: "List Item 1" }), _jsx(ListItemV2, { index: 1, children: "List Item 2" }), _jsxs(ListItemV2, { index: 2, children: ["List Item 3", _jsxs(ListV2, { children: [_jsx(ListItemV2, { index: 0, children: "List Item 3.1" }), _jsx(ListItemV2, { index: 1, children: "List Item 3.2" })] })] })] }) })),
22
22
  };
23
23
  const sizes = [
24
24
  { size: LISTV2_SIZE.LG, label: 'Large' },
@@ -26,14 +26,14 @@ const sizes = [
26
26
  { size: LISTV2_SIZE.SM, label: 'Small' },
27
27
  ];
28
28
  export const Sizes = {
29
- render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, Object.assign({ type: GROUPV2_TYPE.REGION, sx: { mt: 3 } }, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD }, { children: size.label })), _jsx(RowV2, Object.assign({ sx: { mt: 2 } }, { children: _jsxs(ListV2, Object.assign({ size: size.size }, { children: [_jsx(ListItemV2, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItemV2, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItemV2, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) }))] }), i))) })),
29
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, sx: { mt: 3 }, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(RowV2, { sx: { mt: 2 }, children: _jsxs(ListV2, { size: size.size, children: [_jsx(ListItemV2, { index: 0, children: "List Item 1" }), _jsx(ListItemV2, { index: 1, children: "List Item 2" }), _jsx(ListItemV2, { index: 2, children: "List Item 3" })] }) })] }, i))) })),
30
30
  };
31
31
  export const Ordered = {
32
- render: () => (_jsx(RowV2, { children: _jsxs(ListV2, Object.assign({ icon: ChevronRightIcon, ordered: true }, { children: [_jsx(ListItemV2, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItemV2, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItemV2, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) })),
32
+ render: () => (_jsx(RowV2, { children: _jsxs(ListV2, { icon: ChevronRightIcon, ordered: true, children: [_jsx(ListItemV2, { index: 0, children: "List Item 1" }), _jsx(ListItemV2, { index: 1, children: "List Item 2" }), _jsx(ListItemV2, { index: 2, children: "List Item 3" })] }) })),
33
33
  };
34
34
  export const CustomIcon = {
35
- render: () => (_jsx(RowV2, { children: _jsxs(ListV2, Object.assign({ icon: ChevronRightIcon, iconColor: COLOR.PRIMARY }, { children: [_jsx(ListItemV2, Object.assign({ index: 0 }, { children: "List Item 1" })), _jsx(ListItemV2, Object.assign({ index: 1 }, { children: "List Item 2" })), _jsx(ListItemV2, Object.assign({ index: 2 }, { children: "List Item 3" }))] })) })),
35
+ render: () => (_jsx(RowV2, { children: _jsxs(ListV2, { icon: ChevronRightIcon, iconColor: COLOR.PRIMARY, children: [_jsx(ListItemV2, { index: 0, children: "List Item 1" }), _jsx(ListItemV2, { index: 1, children: "List Item 2" }), _jsx(ListItemV2, { index: 2, children: "List Item 3" })] }) })),
36
36
  };
37
37
  export const CustomIconPerItem = {
38
- render: () => (_jsx(RowV2, { children: _jsxs(ListV2, Object.assign({ iconSize: FONT_SIZE.ML }, { children: [_jsx(ListItemV2, Object.assign({ index: 0, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Unfavorite" }, { children: "Favorite 1" })), _jsx(ListItemV2, Object.assign({ index: 1, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Favorite" }, { children: "Favorited 2" })), _jsx(ListItemV2, Object.assign({ index: 2, icon: BookmarkBorderIcon, onIconClick: () => { }, iconLabel: "Favorite" }, { children: "Not Favorited" }))] })) })),
38
+ render: () => (_jsx(RowV2, { children: _jsxs(ListV2, { iconSize: FONT_SIZE.ML, children: [_jsx(ListItemV2, { index: 0, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Unfavorite", children: "Favorite 1" }), _jsx(ListItemV2, { index: 1, icon: BookmarkIcon, onIconClick: () => { }, iconLabel: "Favorite", children: "Favorited 2" }), _jsx(ListItemV2, { index: 2, icon: BookmarkBorderIcon, onIconClick: () => { }, iconLabel: "Favorite", children: "Not Favorited" })] }) })),
39
39
  };
@@ -73,14 +73,14 @@ export const ListV2 = ({ sx, size: sizeParam, ordered, icon, iconSize: iconSizeP
73
73
  const iconSize = iconSizeParam || parentIconSize || iconSizeMap[size];
74
74
  const iconColor = iconColorParam || parentIconColor || COLOR.TEXT;
75
75
  const processedStyles = processSx(Object.assign(Object.assign({}, defaultStyles), sx));
76
- return (_jsx(ListConfigContext.Provider, Object.assign({ value: {
76
+ return (_jsx(ListConfigContext.Provider, { value: {
77
77
  size,
78
78
  icon: icon || defaultIcon,
79
79
  iconColor,
80
80
  iconSize,
81
81
  ordered: ordered || false,
82
82
  depth,
83
- } }, { children: ordered ? (_jsx("ul", Object.assign({ style: processedStyles }, { children: children }))) : (_jsx("ol", Object.assign({ style: processedStyles }, { children: children }))) })));
83
+ }, children: ordered ? (_jsx("ul", { style: processedStyles, children: children })) : (_jsx("ol", { style: processedStyles, children: children })) }));
84
84
  };
85
85
  export const ListItemV2 = (_a) => {
86
86
  var { index, sx, icon: iconParam, iconSize: iconSizeParam, iconColor: iconColorParam, onIconClick, onClick, children, iconLabel, tabIndex: tabIndexParam } = _a, rest = __rest(_a, ["index", "sx", "icon", "iconSize", "iconColor", "onIconClick", "onClick", "children", "iconLabel", "tabIndex"]);
@@ -93,10 +93,10 @@ export const ListItemV2 = (_a) => {
93
93
  const lineHeight = useLinesHeightV2({ typography, lines: 1 });
94
94
  const tabIndex = tabIndexParam || (onClick ? 0 : undefined);
95
95
  const processedStyles = processSx(Object.assign(Object.assign({}, sx), typographyStyles));
96
- return (_jsxs("li", Object.assign({ style: Object.assign({ display: 'flex', marginTop: index === 0 && depth === 0 ? 0 : marginSizeMap[size], marginLeft: '0.25rem' }, processedStyles), tabIndex: tabIndex }, rest, { children: [ordered ? (_jsxs(LabelV2, Object.assign({ standalone: true, sx: { mr: 2 } }, { children: [index + 1, "."] }))) : (_jsx(ColumnV2, Object.assign({ sx: { height: lineHeight }, justify: "center" }, { children: _jsx(IconV2, { icon: icon, color: iconColor, size: iconSize, onClick: onIconClick, "aria-label": iconLabel, sx: {
96
+ return (_jsxs("li", Object.assign({ style: Object.assign({ display: 'flex', marginTop: index === 0 && depth === 0 ? 0 : marginSizeMap[size], marginLeft: '0.25rem' }, processedStyles), tabIndex: tabIndex }, rest, { children: [ordered ? (_jsxs(LabelV2, { standalone: true, sx: { mr: 2 }, children: [index + 1, "."] })) : (_jsx(ColumnV2, { sx: { height: lineHeight }, justify: "center", children: _jsx(IconV2, { icon: icon, color: iconColor, size: iconSize, onClick: onIconClick, "aria-label": iconLabel, sx: {
97
97
  mr: 3,
98
98
  alignItems: 'flex-start',
99
- } }) }))), _jsx(BoxV2, Object.assign({ style: {
99
+ } }) })), _jsx(BoxV2, { style: {
100
100
  cursor: onClick ? 'pointer' : 'default',
101
- } }, { children: children }))] })));
101
+ }, children: children })] })));
102
102
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyledElementProps, StylesProp } from '../../../theme';
3
2
  type MarkdownProps = StyledElementProps<HTMLDivElement, {
4
3
  content: string;
@@ -98,7 +98,7 @@ export const Markdown = (_a) => {
98
98
  .replace(/^-+/, '')
99
99
  .replace(/-+$/, ''));
100
100
  };
101
- return (_jsx("div", Object.assign({}, rest, { children: _jsx(ReactMarkdown, Object.assign({ rehypePlugins: enableHtml ? [rehypeRaw, remarkGfm] : [remarkGfm], components: {
101
+ return (_jsx("div", Object.assign({}, rest, { children: _jsx(ReactMarkdown, { rehypePlugins: enableHtml ? [rehypeRaw, remarkGfm] : [remarkGfm], components: {
102
102
  h1: (props) => (_jsx(Heading, Object.assign({ size: HEADING_SIZE.XL }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: Object.assign(Object.assign({}, dynamicTopMarginStyles), customStyles.h1) }))),
103
103
  h2: (props) => (_jsx(Heading, Object.assign({ size: HEADING_SIZE.LG }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: Object.assign(Object.assign({}, dynamicTopMarginStyles), customStyles.h2) }))),
104
104
  h3: (props) => (_jsx(Heading, Object.assign({ size: HEADING_SIZE.MD }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: Object.assign(Object.assign({}, dynamicTopMarginStyles), customStyles.h3) }))),
@@ -122,5 +122,5 @@ export const Markdown = (_a) => {
122
122
  return _jsx("img", Object.assign({}, props, { style: styles, alt: alt }));
123
123
  },
124
124
  blockquote: (props) => (_jsx(BlockQuote, Object.assign({}, props, { sx: Object.assign(Object.assign(Object.assign({}, dynamicTopMarginStyles), { my: 5 }), customStyles.blockquote) }))),
125
- } }, { children: sanitizedContent })) })));
125
+ }, children: sanitizedContent }) })));
126
126
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyledElementPropsV2, StylesPropV2 } from '../../../theme';
3
2
  type MarkdownV2Props = StyledElementPropsV2<HTMLDivElement, {
4
3
  content: string;
@@ -95,7 +95,7 @@ export const MarkdownV2 = (_a) => {
95
95
  .replace(/^-+/, '')
96
96
  .replace(/-+$/, ''));
97
97
  };
98
- return (_jsx("div", Object.assign({ className: clsx(typeSafeStyles.markdownWrapper, className) }, rest, { children: _jsx(ReactMarkdown, Object.assign({ rehypePlugins: enableHtml ? [rehypeRaw, remarkGfm] : [remarkGfm], components: {
98
+ return (_jsx("div", Object.assign({ className: clsx(typeSafeStyles.markdownWrapper, className) }, rest, { children: _jsx(ReactMarkdown, { rehypePlugins: enableHtml ? [rehypeRaw, remarkGfm] : [remarkGfm], components: {
99
99
  h1: (props) => (_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.XL }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: customStyles.h1 }))),
100
100
  h2: (props) => (_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.LG }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: customStyles.h2 }))),
101
101
  h3: (props) => (_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD }, props, { level: props.level + headingLevelOffset, standalone: true, id: slugify(props.children.toString()), sx: customStyles.h3 }))),
@@ -119,5 +119,5 @@ export const MarkdownV2 = (_a) => {
119
119
  return _jsx("img", Object.assign({}, props, { style: styles, alt: alt }));
120
120
  },
121
121
  blockquote: (props) => (_jsx(BlockQuoteV2, Object.assign({}, props, { sx: Object.assign({ my: 5 }, customStyles.blockquote) }))),
122
- } }, { children: sanitizedContent })) })));
122
+ }, children: sanitizedContent }) })));
123
123
  };
@@ -15,7 +15,7 @@ const StatefulMonthPicker = (props) => {
15
15
  return _jsx(MonthPicker, Object.assign({}, props, { value: date, onChange: setDate }));
16
16
  };
17
17
  export const Default = {
18
- render: () => (_jsx(Box, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulMonthPicker, {}) }))),
18
+ render: () => (_jsx(Box, { sx: { height: '500px' }, children: _jsx(StatefulMonthPicker, {}) })),
19
19
  };
20
20
  export const Inline = {
21
21
  argTypes: {
@@ -28,6 +28,6 @@ export const Inline = {
28
28
  },
29
29
  render: (args) => {
30
30
  const { backgroundColor } = args;
31
- return (_jsx(Box, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulMonthPicker, { backgroundColor: backgroundColor, inline: true }) })));
31
+ return (_jsx(Box, { sx: { height: '500px' }, children: _jsx(StatefulMonthPicker, { backgroundColor: backgroundColor, inline: true }) }));
32
32
  },
33
33
  };
@@ -15,7 +15,7 @@ const StatefulMonthPickerV2 = (props) => {
15
15
  return _jsx(MonthPickerV2, Object.assign({}, props, { value: date, onChange: setDate }));
16
16
  };
17
17
  export const Default = {
18
- render: () => (_jsx(BoxV2, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulMonthPickerV2, {}) }))),
18
+ render: () => (_jsx(BoxV2, { sx: { height: '500px' }, children: _jsx(StatefulMonthPickerV2, {}) })),
19
19
  };
20
20
  export const Inline = {
21
21
  argTypes: {
@@ -28,6 +28,6 @@ export const Inline = {
28
28
  },
29
29
  render: (args) => {
30
30
  const { backgroundColor } = args;
31
- return (_jsx(BoxV2, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulMonthPickerV2, { backgroundColor: backgroundColor, inline: true }) })));
31
+ return (_jsx(BoxV2, { sx: { height: '500px' }, children: _jsx(StatefulMonthPickerV2, { backgroundColor: backgroundColor, inline: true }) }));
32
32
  },
33
33
  };