@ndlib/component-library 1.0.44 → 1.0.46

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 (179) 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.d.ts +8 -0
  16. package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +27 -0
  17. package/dist/components/composites/DropdownLinksV2/index.d.ts +15 -0
  18. package/dist/components/composites/DropdownLinksV2/index.js +27 -0
  19. package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
  20. package/dist/components/composites/EmptyState/index.js +2 -2
  21. package/dist/components/composites/Modal/Modal.stories.js +2 -2
  22. package/dist/components/composites/Modal/Modal.test.js +4 -4
  23. package/dist/components/composites/Modal/index.js +5 -5
  24. package/dist/components/composites/ModalV2/ModalV2.stories.js +2 -2
  25. package/dist/components/composites/ModalV2/ModalV2.test.js +4 -4
  26. package/dist/components/composites/ModalV2/index.js +5 -5
  27. package/dist/components/composites/NavMenu/demo.js +1 -1
  28. package/dist/components/composites/NavMenu/index.js +6 -6
  29. package/dist/components/composites/NavMenuV2/demoV2.js +2 -2
  30. package/dist/components/composites/NavMenuV2/index.js +4 -4
  31. package/dist/components/composites/Seo/SeoDataDisplay/index.js +1 -1
  32. package/dist/components/composites/Seo/index.js +1 -1
  33. package/dist/components/composites/SnackBar/examples.js +7 -7
  34. package/dist/components/composites/SnackBar/index.js +4 -4
  35. package/dist/components/composites/StructuredData/index.d.ts +0 -1
  36. package/dist/components/composites/StructuredData/index.js +1 -1
  37. package/dist/components/elements/Alerts/Alerts.stories.js +2 -2
  38. package/dist/components/elements/Alerts/index.js +2 -2
  39. package/dist/components/elements/AlertsV2/AlertsV2.stories.js +2 -2
  40. package/dist/components/elements/AlertsV2/index.js +1 -1
  41. package/dist/components/elements/ArrowLink/ArrowLink.stories.js +1 -1
  42. package/dist/components/elements/ArrowLink/ArrowLink.test.js +5 -5
  43. package/dist/components/elements/ArrowLink/index.d.ts +0 -1
  44. package/dist/components/elements/ArrowLink/index.js +3 -3
  45. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +1 -1
  46. package/dist/components/elements/ArrowLinkV2/index.d.ts +0 -1
  47. package/dist/components/elements/ArrowLinkV2/index.js +1 -1
  48. package/dist/components/elements/AutoComplete/AutoComplete.stories.js +1 -1
  49. package/dist/components/elements/BoxV2/BoxV2.stories.js +1 -1
  50. package/dist/components/elements/BoxV2/index.d.ts +2 -2
  51. package/dist/components/elements/BrandingBar/index.d.ts +0 -1
  52. package/dist/components/elements/BrandingBar/index.js +4 -4
  53. package/dist/components/elements/BrandingBarV2/index.js +1 -1
  54. package/dist/components/elements/Button/Button.stories.js +9 -9
  55. package/dist/components/elements/Button/Button.test.js +1 -1
  56. package/dist/components/elements/Button/index.d.ts +14 -14
  57. package/dist/components/elements/Button/index.js +4 -4
  58. package/dist/components/elements/ButtonV2/ButtonV2.stories.js +9 -9
  59. package/dist/components/elements/ButtonV2/ButtonV2.test.js +1 -1
  60. package/dist/components/elements/ButtonV2/index.d.ts +15 -15
  61. package/dist/components/elements/ButtonV2/index.js +2 -2
  62. package/dist/components/elements/CheckboxGroup/index.js +2 -2
  63. package/dist/components/elements/CheckboxGroupV2/index.js +2 -2
  64. package/dist/components/elements/ColumnV2/index.d.ts +2 -2
  65. package/dist/components/elements/ColumnV2/index.js +1 -1
  66. package/dist/components/elements/ConsentBanner/ConsentBanner.stories.js +1 -1
  67. package/dist/components/elements/ConsentBanner/index.js +4 -4
  68. package/dist/components/elements/DatePicker/DatePicker.stories.js +3 -3
  69. package/dist/components/elements/DatePicker/index.d.ts +3 -3
  70. package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +3 -3
  71. package/dist/components/elements/DatePickerV2/index.d.ts +3 -3
  72. package/dist/components/elements/Dropdown/Dropdown.stories.js +3 -3
  73. package/dist/components/elements/Dropdown/index.js +2 -2
  74. package/dist/components/elements/DropdownV2/DropdownV2.stories.js +3 -3
  75. package/dist/components/elements/DropdownV2/index.js +2 -2
  76. package/dist/components/elements/Group/index.js +1 -1
  77. package/dist/components/elements/GroupV2/index.js +1 -1
  78. package/dist/components/elements/Heading/Heading.stories.js +3 -3
  79. package/dist/components/elements/Heading/Heading.test.js +2 -2
  80. package/dist/components/elements/HeadingV2/HeadingV2.stories.js +3 -3
  81. package/dist/components/elements/HeadingV2/HeadingV2.test.js +2 -2
  82. package/dist/components/elements/Icon/Icon.stories.js +1 -1
  83. package/dist/components/elements/IconV2/IconV2.stories.js +1 -1
  84. package/dist/components/elements/Label/Label.stories.js +1 -1
  85. package/dist/components/elements/Label/Label.test.js +5 -5
  86. package/dist/components/elements/LabelV2/LabelV2.stories.js +1 -1
  87. package/dist/components/elements/LabelV2/LabelV2.test.js +5 -5
  88. package/dist/components/elements/Link/Link.stories.js +1 -1
  89. package/dist/components/elements/Link/Link.test.js +7 -7
  90. package/dist/components/elements/List/List.stories.js +5 -5
  91. package/dist/components/elements/List/List.test.js +2 -2
  92. package/dist/components/elements/List/index.js +5 -5
  93. package/dist/components/elements/ListBox/index.d.ts +2 -17
  94. package/dist/components/elements/ListBox/index.js +3 -3
  95. package/dist/components/elements/ListBoxV2/index.d.ts +2 -18
  96. package/dist/components/elements/ListBoxV2/index.js +2 -2
  97. package/dist/components/elements/ListV2/ListV2.stories.js +5 -5
  98. package/dist/components/elements/ListV2/index.js +5 -5
  99. package/dist/components/elements/Markdown/index.d.ts +0 -1
  100. package/dist/components/elements/Markdown/index.js +2 -2
  101. package/dist/components/elements/MarkdownV2/index.d.ts +0 -1
  102. package/dist/components/elements/MarkdownV2/index.js +2 -2
  103. package/dist/components/elements/MonthPicker/MonthPicker.stories.js +2 -2
  104. package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +2 -2
  105. package/dist/components/elements/Paragraph/Paragraph.stories.js +2 -2
  106. package/dist/components/elements/ParagraphV2/ParagraphV2.stories.js +2 -2
  107. package/dist/components/elements/Pill/Pill.stories.js +3 -3
  108. package/dist/components/elements/Pill/index.d.ts +6 -6
  109. package/dist/components/elements/Pill/index.js +2 -2
  110. package/dist/components/elements/PillV2/PillV2.stories.js +3 -3
  111. package/dist/components/elements/PillV2/index.d.ts +6 -6
  112. package/dist/components/elements/PillV2/index.js +1 -1
  113. package/dist/components/elements/RadioGroup/index.js +2 -2
  114. package/dist/components/elements/RadioGroupV2/index.js +2 -2
  115. package/dist/components/elements/RawHtml/index.d.ts +0 -1
  116. package/dist/components/elements/ReadMore/ReadMore.stories.js +4 -4
  117. package/dist/components/elements/ReadMore/index.js +3 -3
  118. package/dist/components/elements/ReadMoreV2/ReadMoreV2.stories.js +4 -4
  119. package/dist/components/elements/ReadMoreV2/index.js +3 -3
  120. package/dist/components/elements/RowV2/index.d.ts +4 -4
  121. package/dist/components/elements/RowV2/index.js +1 -1
  122. package/dist/components/elements/Select/Select.stories.js +3 -3
  123. package/dist/components/elements/Select/index.js +7 -7
  124. package/dist/components/elements/SelectV2/SelectV2.stories.js +3 -3
  125. package/dist/components/elements/SelectV2/index.js +4 -4
  126. package/dist/components/elements/Spinner/Spinner.stories.js +1 -1
  127. package/dist/components/elements/Spinner/index.d.ts +0 -1
  128. package/dist/components/elements/SpinnerV2/SpinnerV2.stories.js +1 -1
  129. package/dist/components/elements/SpinnerV2/index.d.ts +0 -1
  130. package/dist/components/elements/TabList/example.js +2 -2
  131. package/dist/components/elements/TabList/index.js +2 -2
  132. package/dist/components/elements/TabListV2/example.js +2 -2
  133. package/dist/components/elements/TabListV2/index.js +2 -2
  134. package/dist/components/elements/Table/Table.stories.js +18 -18
  135. package/dist/components/elements/Table/Table.test.js +1 -1
  136. package/dist/components/elements/Table/index.d.ts +0 -1
  137. package/dist/components/elements/Table/index.js +8 -8
  138. package/dist/components/elements/TextInput/TextInput.stories.js +4 -4
  139. package/dist/components/elements/TextInput/TextInput.test.js +2 -2
  140. package/dist/components/elements/TextInput/index.d.ts +10 -10
  141. package/dist/components/elements/TextInput/index.js +7 -7
  142. package/dist/components/elements/TextInputV2/TextInputV2.stories.js +4 -4
  143. package/dist/components/elements/TextInputV2/TextInputV2.test.js +1 -1
  144. package/dist/components/elements/TextInputV2/index.d.ts +11 -11
  145. package/dist/components/elements/TextInputV2/index.js +4 -4
  146. package/dist/components/elements/layout/Box.d.ts +2 -2
  147. package/dist/components/elements/layout/Box.stories.js +1 -1
  148. package/dist/components/elements/layout/Column.d.ts +2 -2
  149. package/dist/components/elements/layout/Column.js +1 -1
  150. package/dist/components/elements/layout/Flex.stories.js +4 -4
  151. package/dist/components/elements/layout/Flex.test.js +2 -2
  152. package/dist/components/elements/layout/Row.d.ts +3 -3
  153. package/dist/components/elements/layout/Row.js +1 -1
  154. package/dist/components/elements/option.d.ts +0 -1
  155. package/dist/components/providers/alerts.js +1 -1
  156. package/dist/components/providers/componentConfig.js +1 -1
  157. package/dist/components/providers/componentConfigV2.js +1 -1
  158. package/dist/components/providers/dialogs.js +2 -2
  159. package/dist/components/providers/env.js +2 -2
  160. package/dist/components/providers/media.js +2 -2
  161. package/dist/components/providers/mediaV2.js +2 -2
  162. package/dist/components/providers/menu.js +1 -1
  163. package/dist/components/providers/snackBar.d.ts +0 -1
  164. package/dist/components/providers/snackBar.js +2 -2
  165. package/dist/components/providers/ui.js +1 -1
  166. package/dist/components/providers/uiV2.js +1 -1
  167. package/dist/components/providers/uniqueIds.js +1 -1
  168. package/dist/index.d.ts +1 -0
  169. package/dist/index.js +1 -0
  170. package/dist/theme/Color.stories.js +1 -1
  171. package/dist/theme/Typography.stories.js +1 -1
  172. package/dist/theme/colors.d.ts +2 -2
  173. package/dist/theme/colors.js +4 -2
  174. package/dist/theme/css-variables.css +2 -2
  175. package/dist/theme/index.d.ts +7 -90
  176. package/dist/theme/index.js +2 -2
  177. package/dist/theme/typography.d.ts +1 -1
  178. package/dist/utils/test.js +2 -2
  179. package/package.json +5 -5
@@ -11,7 +11,7 @@ vi.mock('../../../providers/uniqueIds', () => ({
11
11
  describe('TextInput Component', () => {
12
12
  const setup = (props = {}) => {
13
13
  const initialProps = Object.assign({ value: '', onChange: vi.fn(), onChangeRaw: vi.fn(), size: INPUT_SIZE.MD }, props);
14
- return render(_jsx(ThemeProvider, Object.assign({ theme: theme }, { children: _jsx(TextInput, Object.assign({}, initialProps)) })));
14
+ return render(_jsx(ThemeProvider, { theme: theme, children: _jsx(TextInput, Object.assign({}, initialProps)) }));
15
15
  };
16
16
  it('renders with the correct initial value', () => {
17
17
  setup({ value: 'Initial value' });
@@ -34,7 +34,7 @@ describe('TextInput Component', () => {
34
34
  expect(value).toBe('New value');
35
35
  });
36
36
  it('renders the left icon if provided', () => {
37
- const MockIcon = () => _jsx("span", Object.assign({ "data-testid": "mock-icon" }, { children: "Icon" }));
37
+ const MockIcon = () => _jsx("span", { "data-testid": "mock-icon", children: "Icon" });
38
38
  setup({ leftIcon: MockIcon });
39
39
  expect(screen.getByTestId('mock-icon')).toBeInTheDocument();
40
40
  });
@@ -28,18 +28,18 @@ export type TextInputProps = StyledElementProps<HTMLInputElement, {
28
28
  onChangeRaw?: (e: string | React.ChangeEvent) => void;
29
29
  }, string>;
30
30
  export declare const TextInput: React.ForwardRefExoticComponent<{
31
- sx?: import("../../../theme").StylesProp | undefined;
31
+ sx?: import("../../../theme").StylesProp;
32
32
  children?: string | undefined;
33
33
  } & Omit<React.HTMLAttributes<HTMLInputElement>, "children" | "onChange"> & {
34
- size?: INPUT_SIZE | undefined;
35
- leftIcon?: React.FC<any> | undefined;
36
- inline?: boolean | undefined;
37
- inverted?: boolean | undefined;
38
- label?: string | undefined;
39
- disabled?: boolean | undefined;
34
+ size?: INPUT_SIZE;
35
+ leftIcon?: React.FC<any>;
36
+ inline?: boolean;
37
+ inverted?: boolean;
38
+ label?: string;
39
+ disabled?: boolean;
40
40
  value: string;
41
- onChange?: ((value: string) => void) | undefined;
42
- onChangeRaw?: ((e: string | React.ChangeEvent) => void) | undefined;
41
+ onChange?: (value: string) => void;
42
+ onChangeRaw?: (e: string | React.ChangeEvent) => void;
43
43
  } & {
44
- htmlFor?: string | undefined;
44
+ htmlFor?: string;
45
45
  } & React.RefAttributes<any>>;
@@ -65,8 +65,8 @@ export const TextInput = React.forwardRef((_a, ref) => {
65
65
  : {
66
66
  boxShadow: inverted ? BOX_SHADOW.INVERTED : BOX_SHADOW.NORMAL,
67
67
  };
68
- return (_jsxs("div", Object.assign({ ref: ref, onClick: onClick, id: id, sx: Object.assign(Object.assign({ height,
69
- display, px: paddingX, backgroundColor: inverted ? COLOR.DARK_GRAY : COLOR.WHITE, borderRadius: '4px', flexDirection: 'row', position: 'relative', alignItems: 'center', ':hover': focusStyles, ':focus': focusStyles }, typographyStyles), sx) }, { children: [_jsx("fieldset", Object.assign({ sx: {
68
+ return (_jsxs("div", { ref: ref, onClick: onClick, id: id, sx: Object.assign(Object.assign({ height,
69
+ display, px: paddingX, backgroundColor: inverted ? COLOR.DARK_GRAY : COLOR.WHITE, borderRadius: '4px', flexDirection: 'row', position: 'relative', alignItems: 'center', ':hover': focusStyles, ':focus': focusStyles }, typographyStyles), sx), children: [_jsx("fieldset", { sx: {
70
70
  textAlign: 'left',
71
71
  position: 'absolute',
72
72
  inset: '-4px 0px 0px 0px',
@@ -80,7 +80,7 @@ export const TextInput = React.forwardRef((_a, ref) => {
80
80
  minWidth: '0%',
81
81
  borderColor: inverted ? COLOR.GRAY : COLOR.LIGHT_GRAY,
82
82
  zIndex: Z_INDEX.ELEVATED,
83
- } }, { children: _jsx("legend", Object.assign({ style: {
83
+ }, children: _jsx("legend", { style: {
84
84
  width: 'auto',
85
85
  float: 'unset',
86
86
  overflow: 'hidden',
@@ -91,13 +91,13 @@ export const TextInput = React.forwardRef((_a, ref) => {
91
91
  fontSize: '0.75em',
92
92
  visibility: 'hidden',
93
93
  whiteSpace: 'nowrap',
94
- } }, { children: label && (_jsx(Label, Object.assign({ standalone: true, "aria-hidden": "true", sx: {
94
+ }, children: label && (_jsx(Label, { standalone: true, "aria-hidden": "true", sx: {
95
95
  px: 1,
96
96
  position: 'relative',
97
97
  display: 'inline-flex',
98
98
  opacity: '0',
99
99
  visibility: 'hidden',
100
- }, typography: labelTypographyMap[size] }, { children: label }))) })) })), leftIcon && (_jsx(Icon, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
100
+ }, typography: labelTypographyMap[size], children: label })) }) }), leftIcon && (_jsx(Icon, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
101
101
  mr: 2,
102
102
  fontSize: getIconSize(typographyStyles.fontSize),
103
103
  } })), _jsx("input", Object.assign({ value: value, onChange: (event) => {
@@ -107,7 +107,7 @@ export const TextInput = React.forwardRef((_a, ref) => {
107
107
  color: inverted ? COLOR.LIGHT_GRAY : COLOR.GRAY,
108
108
  }, ':focus': {
109
109
  outline: 'none',
110
- } }), disabled: disabled }, rest)), label && (_jsx(Label, Object.assign({ htmlFor: id, typography: labelTypographyMap[size], sx: {
110
+ } }), disabled: disabled }, rest)), label && (_jsx(Label, { htmlFor: id, typography: labelTypographyMap[size], sx: {
111
111
  position: 'absolute',
112
112
  color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.ND_PROVOST_BLUE,
113
113
  left: '0.5rem',
@@ -115,5 +115,5 @@ export const TextInput = React.forwardRef((_a, ref) => {
115
115
  zIndex: (_b = theme.zIndex) === null || _b === void 0 ? void 0 : _b.ELEVATED,
116
116
  px: 1,
117
117
  top: labelOffsetMap[size],
118
- } }, { children: label })))] })));
118
+ }, children: label }))] }));
119
119
  });
@@ -24,14 +24,14 @@ const StatefulInput = (props) => {
24
24
  return _jsx(TextInputV2, Object.assign({ value: value, onChange: setValue }, props));
25
25
  };
26
26
  export const Default = {
27
- render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD }, { children: size.label })), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
27
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
28
28
  };
29
29
  export const WithLabel = {
30
- render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD }, { children: size.label })), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, label: "Search", placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
30
+ render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, label: "Search", placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
31
31
  };
32
32
  export const Inverted = {
33
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { backgroundColor: COLOR.BLACK, p: 2 } }, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE } }, { children: size.label })), _jsx(StatefulInput, { inverted: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) }))),
33
+ render: () => (_jsx(ColumnV2, { sx: { backgroundColor: COLOR.BLACK, p: 2 }, children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE }, children: size.label }), _jsx(StatefulInput, { inverted: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) })),
34
34
  };
35
35
  export const Disabled = {
36
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { p: 2 } }, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE } }, { children: size.label })), _jsx(StatefulInput, { disabled: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) }))),
36
+ render: () => (_jsx(ColumnV2, { sx: { p: 2 }, children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE }, children: size.label }), _jsx(StatefulInput, { disabled: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) })),
37
37
  };
@@ -32,7 +32,7 @@ describe('TextInputV2 Component', () => {
32
32
  expect(value).toBe('New value');
33
33
  });
34
34
  it('renders the left icon if provided', () => {
35
- const MockIcon = () => _jsx("span", Object.assign({ "data-testid": "mock-icon" }, { children: "Icon" }));
35
+ const MockIcon = () => _jsx("span", { "data-testid": "mock-icon", children: "Icon" });
36
36
  setup({ leftIcon: MockIcon });
37
37
  expect(screen.getByTestId('mock-icon')).toBeInTheDocument();
38
38
  });
@@ -29,19 +29,19 @@ export type TextInputV2Props = StyledElementPropsV2<HTMLInputElement, {
29
29
  className?: string;
30
30
  }, string>;
31
31
  export declare const TextInputV2: React.ForwardRefExoticComponent<{
32
- sx?: import("../../../theme").StylesPropV2 | undefined;
32
+ sx?: import("../../../theme").StylesPropV2;
33
33
  children?: string | undefined;
34
34
  } & Omit<React.HTMLAttributes<HTMLInputElement>, "children" | "onChange"> & {
35
- size?: INPUTV2_SIZE | undefined;
36
- leftIcon?: React.FC<any> | undefined;
37
- inline?: boolean | undefined;
38
- inverted?: boolean | undefined;
39
- label?: string | undefined;
40
- disabled?: boolean | undefined;
35
+ size?: INPUTV2_SIZE;
36
+ leftIcon?: React.FC<any>;
37
+ inline?: boolean;
38
+ inverted?: boolean;
39
+ label?: string;
40
+ disabled?: boolean;
41
41
  value: string;
42
- onChange?: ((value: string) => void) | undefined;
43
- onChangeRaw?: ((e: string | React.ChangeEvent) => void) | undefined;
44
- className?: string | undefined;
42
+ onChange?: (value: string) => void;
43
+ onChangeRaw?: (e: string | React.ChangeEvent) => void;
44
+ className?: string;
45
45
  } & {
46
- htmlFor?: string | undefined;
46
+ htmlFor?: string;
47
47
  } & React.RefAttributes<any>>;
@@ -74,19 +74,19 @@ export const TextInputV2 = React.forwardRef((_a, ref) => {
74
74
  const appliedHoverStyles = isHovered ? focusStyles : {};
75
75
  const appliedFocusStyles = isFocused ? focusStyles : {};
76
76
  return (_jsxs("div", Object.assign({}, anchorElementProps, { ref: ref, onClick: onClick, id: id, className: clsx(`${typeSafeStyles.wrapper} ${inverted ? typeSafeStyles.inverted : ''}`, className), style: Object.assign(Object.assign(Object.assign({ height,
77
- display, paddingLeft: paddingX, paddingRight: paddingX }, appliedHoverStyles), appliedFocusStyles), processedStyles) }, { children: [_jsx("fieldset", Object.assign({ className: `${typeSafeStyles.fieldset} ${inverted ? typeSafeStyles.inverted : ''}` }, { children: _jsx("legend", Object.assign({ className: typeSafeStyles.legend }, { children: label && (_jsx(LabelV2, Object.assign({ standalone: true, "aria-hidden": "true", sx: {
77
+ display, paddingLeft: paddingX, paddingRight: paddingX }, appliedHoverStyles), appliedFocusStyles), processedStyles), children: [_jsx("fieldset", { className: `${typeSafeStyles.fieldset} ${inverted ? typeSafeStyles.inverted : ''}`, children: _jsx("legend", { className: typeSafeStyles.legend, children: label && (_jsx(LabelV2, { standalone: true, "aria-hidden": "true", sx: {
78
78
  px: 1,
79
79
  position: 'relative',
80
80
  display: 'inline-flex',
81
81
  opacity: '0',
82
82
  visibility: 'hidden',
83
- }, typography: labelTypographyMapV2[size] }, { children: label }))) })) })), leftIcon && (_jsx(IconV2, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
83
+ }, typography: labelTypographyMapV2[size], children: label })) }) }), leftIcon && (_jsx(IconV2, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
84
84
  mr: 2,
85
85
  fontSize: getIconSize(typographyStyles.fontSize),
86
86
  } })), _jsx("input", Object.assign({ value: value, onChange: (event) => {
87
87
  onChange && onChange(event.target.value);
88
88
  onChangeRaw && onChangeRaw(event.target.value);
89
- }, className: `${typeSafeStyles.input} ${inverted ? typeSafeStyles.inverted : ''}`, style: Object.assign({}, processSx(Object.assign({}, typographyStyles))), disabled: disabled }, rest)), label && (_jsx(LabelV2, Object.assign({ htmlFor: id, typography: labelTypographyMapV2[size], sx: {
89
+ }, className: `${typeSafeStyles.input} ${inverted ? typeSafeStyles.inverted : ''}`, style: Object.assign({}, processSx(Object.assign({}, typographyStyles))), disabled: disabled }, rest)), label && (_jsx(LabelV2, { htmlFor: id, typography: labelTypographyMapV2[size], sx: {
90
90
  position: 'absolute',
91
91
  color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.ND_PROVOST_BLUE,
92
92
  left: '0.5rem',
@@ -94,5 +94,5 @@ export const TextInputV2 = React.forwardRef((_a, ref) => {
94
94
  zIndex: Z_INDEX.ELEVATED,
95
95
  px: 1,
96
96
  top: labelOffsetMapV2[size],
97
- } }, { children: label })))] })));
97
+ }, children: label }))] })));
98
98
  });
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { StyledElementProps } from '../../../theme';
3
3
  export type BoxProps = StyledElementProps<HTMLDivElement>;
4
4
  export declare const Box: React.ForwardRefExoticComponent<{
5
- sx?: import("../../../theme").StylesProp | undefined;
5
+ sx?: import("../../../theme").StylesProp;
6
6
  children?: React.ReactNode;
7
7
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & object & {
8
- htmlFor?: string | undefined;
8
+ htmlFor?: string;
9
9
  } & React.RefAttributes<HTMLDivElement>>;
@@ -10,5 +10,5 @@ const meta = {
10
10
  };
11
11
  export default meta;
12
12
  export const Box = {
13
- render: () => (_jsx(BoxComponent, Object.assign({ sx: { p: 1, bg: COLOR.PRIMARY } }, { children: _jsx(BoxComponent, { sx: { p: 1, bg: COLOR.SECONDARY } }) }))),
13
+ render: () => (_jsx(BoxComponent, { sx: { p: 1, bg: COLOR.PRIMARY }, children: _jsx(BoxComponent, { sx: { p: 1, bg: COLOR.SECONDARY } }) })),
14
14
  };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { FlexHelperProps } from './Row';
3
3
  export declare const Column: React.ForwardRefExoticComponent<{
4
- sx?: import("../../../theme").StylesProp | undefined;
4
+ sx?: import("../../../theme").StylesProp;
5
5
  children?: React.ReactNode;
6
6
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & FlexHelperProps & {
7
- htmlFor?: string | undefined;
7
+ htmlFor?: string;
8
8
  } & React.RefAttributes<HTMLDivElement>>;
@@ -15,5 +15,5 @@ import { convertFlexHelperProps } from './Row';
15
15
  export const Column = React.forwardRef((_a, ref) => {
16
16
  var { sx, children } = _a, rest = __rest(_a, ["sx", "children"]);
17
17
  const flexStyles = convertFlexHelperProps(rest);
18
- return (_jsx("div", Object.assign({ ref: ref }, rest, { sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { display: 'flex', flexDirection: 'column' }) }, { children: children })));
18
+ return (_jsx("div", Object.assign({ ref: ref }, rest, { sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { display: 'flex', flexDirection: 'column' }), children: children })));
19
19
  });
@@ -12,17 +12,17 @@ const meta = {
12
12
  };
13
13
  export default meta;
14
14
  export const Columns = {
15
- render: () => (_jsxs(Row, Object.assign({ justify: "space-between" }, { children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] }))),
15
+ render: () => (_jsxs(Row, { justify: "space-between", children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] })),
16
16
  };
17
17
  export const Rows = {
18
18
  render: () => (_jsxs(Column, { children: [_jsx(Row, { children: _jsx(Paragraph, { children: "Row 1" }) }), _jsx(Row, { children: _jsx(Paragraph, { children: "Row 2" }) }), _jsx(Row, { children: _jsx(Paragraph, { children: "Row 3" }) })] })),
19
19
  };
20
20
  export const ResponsiveRow = {
21
- render: () => (_jsxs(Row, Object.assign({ justify: "space-between", breakpoint: 0 }, { children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] }))),
21
+ render: () => (_jsxs(Row, { justify: "space-between", breakpoint: 0, children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] })),
22
22
  };
23
23
  export const FlexHelpers = {
24
- render: () => (_jsxs(Row, Object.assign({ justify: "space-between" }, { children: [_jsx(Column, Object.assign({ align: "flex-end", grow: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY } }, { children: _jsx(Row, { children: _jsx(Paragraph, { children: "Right-aligned" }) }) })), _jsx(Column, Object.assign({ grow: 1 }, { children: _jsx(Paragraph, { children: "Growing Column...................................................." }) })), _jsx(Column, Object.assign({ shrink: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY } }, { children: _jsx(Paragraph, { children: "Shrinking Column" }) }))] }))),
24
+ render: () => (_jsxs(Row, { justify: "space-between", children: [_jsx(Column, { align: "flex-end", grow: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY }, children: _jsx(Row, { children: _jsx(Paragraph, { children: "Right-aligned" }) }) }), _jsx(Column, { grow: 1, children: _jsx(Paragraph, { children: "Growing Column...................................................." }) }), _jsx(Column, { shrink: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY }, children: _jsx(Paragraph, { children: "Shrinking Column" }) })] })),
25
25
  };
26
26
  export const Centered = {
27
- render: () => (_jsx(Row, Object.assign({ centered: true, sx: { width: '100%', height: '100px', border: 'solid black 1px' } }, { children: _jsx(Paragraph, { children: "Hello World" }) }))),
27
+ render: () => (_jsx(Row, { centered: true, sx: { width: '100%', height: '100px', border: 'solid black 1px' }, children: _jsx(Paragraph, { children: "Hello World" }) })),
28
28
  };
@@ -8,7 +8,7 @@ describe('Row', () => {
8
8
  expect(getByText('Foo')).toBeInTheDocument();
9
9
  });
10
10
  it('converts helper props to styles', () => {
11
- const { getByText } = render(_jsx(Row, Object.assign({ grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start" }, { children: "Foo" })));
11
+ const { getByText } = render(_jsx(Row, { grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start", children: "Foo" }));
12
12
  const rendered = getByText('Foo');
13
13
  expect(rendered).toHaveStyle('flex-grow: 1');
14
14
  expect(rendered).toHaveStyle('flex-shrink: 1');
@@ -23,7 +23,7 @@ describe('Column', () => {
23
23
  expect(getByText('Foo')).toBeInTheDocument();
24
24
  });
25
25
  it('converts helper props to styles', () => {
26
- const { getByText } = render(_jsx(Column, Object.assign({ grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start" }, { children: "Foo" })));
26
+ const { getByText } = render(_jsx(Column, { grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start", children: "Foo" }));
27
27
  const rendered = getByText('Foo');
28
28
  expect(rendered).toHaveStyle('flex-grow: 1');
29
29
  expect(rendered).toHaveStyle('flex-shrink: 1');
@@ -11,10 +11,10 @@ export type FlexHelperProps = {
11
11
  centered?: boolean;
12
12
  };
13
13
  export declare const Row: React.ForwardRefExoticComponent<{
14
- sx?: import("../../../theme").StylesProp | undefined;
14
+ sx?: import("../../../theme").StylesProp;
15
15
  children?: React.ReactNode;
16
16
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & FlexHelperProps & {
17
- breakpoint?: number | undefined;
17
+ breakpoint?: number;
18
18
  } & {
19
- htmlFor?: string | undefined;
19
+ htmlFor?: string;
20
20
  } & React.RefAttributes<HTMLDivElement>>;
@@ -48,5 +48,5 @@ export const Row = React.forwardRef((_a, ref) => {
48
48
  }
49
49
  flexDirection.push('row');
50
50
  }
51
- return (_jsx("div", Object.assign({}, rest, { ref: ref, sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { flexDirection, display: 'flex' }) }, { children: children })));
51
+ return (_jsx("div", Object.assign({}, rest, { ref: ref, sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { flexDirection, display: 'flex' }), children: children })));
52
52
  });
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Key = string | number;
3
2
  export interface BasicOption<Value extends Key> {
4
3
  value: Value;
@@ -113,7 +113,7 @@ export const AlertsProvider = ({ domain = ALERT_DOMAIN.LIBRARY, endpoint, startT
113
113
  const filteredAlerts = alerts
114
114
  .filter((alert) => !dismissedAlerts.includes(alert.id))
115
115
  .filter((alert) => { var _a; return (_a = alert === null || alert === void 0 ? void 0 : alert.domains) === null || _a === void 0 ? void 0 : _a.includes(domain); });
116
- return (_jsx(AlertsContext.Provider, Object.assign({ value: { alerts: filteredAlerts, dismiss } }, { children: children })));
116
+ return (_jsx(AlertsContext.Provider, { value: { alerts: filteredAlerts, dismiss }, children: children }));
117
117
  };
118
118
  export const useAlerts = (pageAlerts = []) => {
119
119
  const { alerts: allAlerts, dismiss } = React.useContext(AlertsContext);
@@ -33,5 +33,5 @@ export const ComponentConfigContext = createContext(defaultComponentConfig);
33
33
  export const useComponentConfig = () => useContext(ComponentConfigContext);
34
34
  export const ComponentConfigProvider = ({ config: configParam, children }) => {
35
35
  const config = useMemo(() => (Object.assign(Object.assign(Object.assign({}, defaultComponentConfig), configParam), { link: Object.assign(Object.assign({}, defaultComponentConfig.link), configParam.link) })), []);
36
- return (_jsx(ComponentConfigContext.Provider, Object.assign({ value: config }, { children: children })));
36
+ return (_jsx(ComponentConfigContext.Provider, { value: config, children: children }));
37
37
  };
@@ -33,5 +33,5 @@ export const ComponentConfigContextV2 = createContext(defaultComponentConfig);
33
33
  export const useComponentConfigV2 = () => useContext(ComponentConfigContextV2);
34
34
  export const ComponentConfigProviderV2 = ({ config: configParam, children }) => {
35
35
  const config = useMemo(() => (Object.assign(Object.assign(Object.assign({}, defaultComponentConfig), configParam), { link: Object.assign(Object.assign({}, defaultComponentConfig.link), configParam.link) })), []);
36
- return (_jsx(ComponentConfigContextV2.Provider, Object.assign({ value: config }, { children: children })));
36
+ return (_jsx(ComponentConfigContextV2.Provider, { value: config, children: children }));
37
37
  };
@@ -13,11 +13,11 @@ export const DialogsProvider = ({ children }) => {
13
13
  const close = (key) => {
14
14
  setDialogs(Object.assign(Object.assign({}, dialogs), { [key]: { isOpen: false } }));
15
15
  };
16
- return (_jsx(DialogContext.Provider, Object.assign({ value: {
16
+ return (_jsx(DialogContext.Provider, { value: {
17
17
  dialogs,
18
18
  open,
19
19
  close,
20
- } }, { children: children })));
20
+ }, children: children }));
21
21
  };
22
22
  export const useDialog = (id) => {
23
23
  const dialogs = React.useContext(DialogContext);
@@ -17,8 +17,8 @@ export const EnvironmentProvider = ({ env, children }) => {
17
17
  else {
18
18
  }
19
19
  };
20
- return (_jsx(EnvironmentContext.Provider, Object.assign({ value: {
20
+ return (_jsx(EnvironmentContext.Provider, { value: {
21
21
  env,
22
22
  flagInDevelopment,
23
- } }, { children: children })));
23
+ }, children: children }));
24
24
  };
@@ -40,9 +40,9 @@ export const MediaSizeProvider = ({ useHydrationPatch, ssrBreakpoint: ssrBreakpo
40
40
  window.removeEventListener('resize', rerenderOnResize);
41
41
  };
42
42
  }, []);
43
- return (_jsx(MediaContext.Provider, Object.assign({ value: {
43
+ return (_jsx(MediaContext.Provider, { value: {
44
44
  breakpoint,
45
45
  screenSize,
46
- } }, { children: children })));
46
+ }, children: children }));
47
47
  };
48
48
  export const useMediaQuery = () => useContext(MediaContext);
@@ -40,9 +40,9 @@ export const MediaSizeProviderV2 = ({ useHydrationPatch, ssrBreakpoint: ssrBreak
40
40
  window.removeEventListener('resize', rerenderOnResize);
41
41
  };
42
42
  }, []);
43
- return (_jsx(MediaContextV2.Provider, Object.assign({ value: {
43
+ return (_jsx(MediaContextV2.Provider, { value: {
44
44
  breakpoint,
45
45
  screenSize,
46
- } }, { children: children })));
46
+ }, children: children }));
47
47
  };
48
48
  export const useMediaQueryV2 = () => useContext(MediaContextV2);
@@ -300,5 +300,5 @@ export const MenuProvider = ({ menu, children, }) => {
300
300
  getMenuProps,
301
301
  getMenuItemProps,
302
302
  };
303
- return (_jsx(MenuContext.Provider, Object.assign({ value: contextValue }, { children: typeof children === 'function' ? children(contextValue) : children })));
303
+ return (_jsx(MenuContext.Provider, { value: contextValue, children: typeof children === 'function' ? children(contextValue) : children }));
304
304
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type SnackBarMessage = {
3
2
  message: string;
4
3
  content?: JSX.Element;
@@ -41,12 +41,12 @@ export const SnackBarProvider = ({ children, }) => {
41
41
  removeMessageTimeouts.current.forEach((timeout) => clearTimeout(timeout));
42
42
  };
43
43
  }, []);
44
- return (_jsx(SnackBarContext.Provider, Object.assign({ value: {
44
+ return (_jsx(SnackBarContext.Provider, { value: {
45
45
  messages,
46
46
  removeMessage,
47
47
  previousMessageCount: previousMessageCount.current,
48
48
  addMessage,
49
- } }, { children: children })));
49
+ }, children: children }));
50
50
  };
51
51
  export const useSnackBar = () => {
52
52
  return useContext(SnackBarContext);
@@ -11,6 +11,6 @@ import StructuredData from '../composites/StructuredData';
11
11
  import { SnackBarProvider } from './snackBar';
12
12
  import { UniqueIdProvider } from './uniqueIds';
13
13
  export const UiProvider = ({ structuredData, env, components, alertsConfig, children, includeTheme = true, loadFonts, loadGlobalStyles, useHydrationPatch, ssrBreakpoint, }) => {
14
- const core = (_jsxs(EnvironmentProvider, Object.assign({ env: env }, { children: [_jsx(MediaSizeProvider, Object.assign({ ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch }, { children: _jsx(ComponentConfigProvider, Object.assign({ config: components || {} }, { children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) })) })), loadGlobalStyles && _jsx(GlobalStyles, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] })));
14
+ const core = (_jsxs(EnvironmentProvider, { env: env, children: [_jsx(MediaSizeProvider, { ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch, children: _jsx(ComponentConfigProvider, { config: components || {}, children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) }) }), loadGlobalStyles && _jsx(GlobalStyles, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] }));
15
15
  return includeTheme ? _jsx(ThemeProvider, { children: core }) : core;
16
16
  };
@@ -11,6 +11,6 @@ import StructuredData from '../composites/StructuredData';
11
11
  import { SnackBarProvider } from './snackBar';
12
12
  import { UniqueIdProvider } from './uniqueIds';
13
13
  export const UiProviderV2 = ({ structuredData, env, components, alertsConfig, children, includeTheme = true, loadFonts, loadGlobalStyles, useHydrationPatch, ssrBreakpoint, }) => {
14
- const core = (_jsxs(EnvironmentProvider, Object.assign({ env: env }, { children: [_jsx(MediaSizeProviderV2, Object.assign({ ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch }, { children: _jsx(ComponentConfigProviderV2, Object.assign({ config: components || {} }, { children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) })) })), loadGlobalStyles && _jsx(GlobalStylesV2, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] })));
14
+ const core = (_jsxs(EnvironmentProvider, { env: env, children: [_jsx(MediaSizeProviderV2, { ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch, children: _jsx(ComponentConfigProviderV2, { config: components || {}, children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) }) }), loadGlobalStyles && _jsx(GlobalStylesV2, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] }));
15
15
  return includeTheme ? _jsx(ThemeProviderV2, { children: core }) : core;
16
16
  };
@@ -3,7 +3,7 @@ import { createContext, useContext, useMemo, useRef } from 'react';
3
3
  const UniqueIdContext = createContext({});
4
4
  export const UniqueIdProvider = ({ children, }) => {
5
5
  const countIndexRef = useRef({});
6
- return (_jsx(UniqueIdContext.Provider, Object.assign({ value: countIndexRef.current }, { children: children })));
6
+ return (_jsx(UniqueIdContext.Provider, { value: countIndexRef.current, children: children }));
7
7
  };
8
8
  export const useUniqueId = (prefix) => {
9
9
  const countIndex = useContext(UniqueIdContext);
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ export { NavMenu } from './components/composites/NavMenu';
70
70
  export { NavMenuV2 } from './components/composites/NavMenuV2';
71
71
  export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
72
72
  export { DropdownLinks } from './components/composites/DropdownLinks';
73
+ export { DropdownLinksV2 } from './components/composites/DropdownLinksV2';
73
74
  export { Modal } from './components/composites/Modal';
74
75
  export { ModalV2 } from './components/composites/ModalV2';
75
76
  export { DragDropList, DragHandle } from './components/composites/DragDropList';
package/dist/index.js CHANGED
@@ -69,6 +69,7 @@ export { NavMenu } from './components/composites/NavMenu';
69
69
  export { NavMenuV2 } from './components/composites/NavMenuV2';
70
70
  export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
71
71
  export { DropdownLinks } from './components/composites/DropdownLinks';
72
+ export { DropdownLinksV2 } from './components/composites/DropdownLinksV2';
72
73
  export { Modal } from './components/composites/Modal';
73
74
  export { ModalV2 } from './components/composites/ModalV2';
74
75
  export { DragDropList, DragHandle } from './components/composites/DragDropList';
@@ -70,5 +70,5 @@ const colors = [
70
70
  { color: COLOR.ALERT_WARNING_BORDER, label: 'ALERT_WARNING_BORDER' },
71
71
  ];
72
72
  export const Default = {
73
- render: () => (_jsx(Row, Object.assign({ sx: { flexWrap: 'wrap' } }, { children: colors.map((color) => (_jsxs(Group, Object.assign({ type: GROUP_TYPE.GROUP, sx: { mr: 3, mt: 0, flexBasis: '100px' } }, { children: [_jsx(Label, Object.assign({ size: LABEL_SIZE.SM }, { children: color.label })), _jsx(ColorSquare, { color: color.color })] }), color.label))) }))),
73
+ render: () => (_jsx(Row, { sx: { flexWrap: 'wrap' }, children: colors.map((color) => (_jsxs(Group, { type: GROUP_TYPE.GROUP, sx: { mr: 3, mt: 0, flexBasis: '100px' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: color.label }), _jsx(ColorSquare, { color: color.color })] }, color.label))) })),
74
74
  };
@@ -41,6 +41,6 @@ const randomElement = (arr) => {
41
41
  export const Default = {
42
42
  render: () => (_jsx(Group, { children: types.map((t) => {
43
43
  const style = getTypographyStyles(t.type);
44
- return (_jsxs(Group, Object.assign({ sx: { mb: '1rem' } }, { children: [_jsx(Label, Object.assign({ size: LABEL_SIZE.SM }, { children: t.label })), _jsx(Box, Object.assign({ sx: { p: 3, boxShadow: '0px 0px 8px 1px #dddddd' } }, { children: _jsx("div", Object.assign({ sx: style }, { children: randomElement(pangrams) })) }))] })));
44
+ return (_jsxs(Group, { sx: { mb: '1rem' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: t.label }), _jsx(Box, { sx: { p: 3, boxShadow: '0px 0px 8px 1px #dddddd' }, children: _jsx("div", { sx: style, children: randomElement(pangrams) }) })] }));
45
45
  }) })),
46
46
  };
@@ -18,7 +18,7 @@ export declare enum COLOR {
18
18
  LIGHT_GRAY = "lightGray",
19
19
  EXTRA_LIGHT_GRAY = "extraLightGray",
20
20
  EXTRA_EXTRA_LIGHT_GRAY = "extraExtraLightGray",
21
- SUCCESS = "ndTertiary1",
21
+ SUCCESS = "success",
22
22
  ND_BLUE = "ndBlue",
23
23
  ND_BLUE_DARK = "ndBlueDark",
24
24
  ND_BLUE_LIGHT = "ndBlueLight",
@@ -53,7 +53,7 @@ export declare enum COLOR {
53
53
  ALERT_WARNING_BG = "alertWarningBg",
54
54
  ALERT_WARNING_BORDER = "alertWarningBorder",
55
55
  ALERT_SUCCESS_BG = "alertSuccessBg",
56
- ALERT_SUCCESS_BORDER = "ndTertiary1"
56
+ ALERT_SUCCESS_BORDER = "alertSuccessBorder"
57
57
  }
58
58
  export declare const colors: {
59
59
  [key in COLOR]: string;
@@ -19,7 +19,7 @@ export var COLOR;
19
19
  COLOR["LIGHT_GRAY"] = "lightGray";
20
20
  COLOR["EXTRA_LIGHT_GRAY"] = "extraLightGray";
21
21
  COLOR["EXTRA_EXTRA_LIGHT_GRAY"] = "extraExtraLightGray";
22
- COLOR["SUCCESS"] = "ndTertiary1";
22
+ COLOR["SUCCESS"] = "success";
23
23
  COLOR["ND_BLUE"] = "ndBlue";
24
24
  COLOR["ND_BLUE_DARK"] = "ndBlueDark";
25
25
  COLOR["ND_BLUE_LIGHT"] = "ndBlueLight";
@@ -54,7 +54,7 @@ export var COLOR;
54
54
  COLOR["ALERT_WARNING_BG"] = "alertWarningBg";
55
55
  COLOR["ALERT_WARNING_BORDER"] = "alertWarningBorder";
56
56
  COLOR["ALERT_SUCCESS_BG"] = "alertSuccessBg";
57
- COLOR["ALERT_SUCCESS_BORDER"] = "ndTertiary1";
57
+ COLOR["ALERT_SUCCESS_BORDER"] = "alertSuccessBorder";
58
58
  })(COLOR || (COLOR = {}));
59
59
  export const colors = {
60
60
  [COLOR.TEXT]: '#333333',
@@ -76,6 +76,7 @@ export const colors = {
76
76
  [COLOR.LIGHT_GRAY]: '#d2d2d2',
77
77
  [COLOR.EXTRA_LIGHT_GRAY]: '#e2e2e2',
78
78
  [COLOR.EXTRA_EXTRA_LIGHT_GRAY]: '#f2f2f2',
79
+ [COLOR.SUCCESS]: '#00823E',
79
80
  [COLOR.ND_GOLD]: '#ae9142',
80
81
  [COLOR.ND_GOLD_LIGHT]: '#d39f10',
81
82
  [COLOR.ND_GOLD_DARK]: '#8c7535',
@@ -110,4 +111,5 @@ export const colors = {
110
111
  [COLOR.ALERT_WARNING_BG]: '#fc7279',
111
112
  [COLOR.ALERT_WARNING_BORDER]: '#ad5458',
112
113
  [COLOR.ALERT_SUCCESS_BG]: '#edffea',
114
+ [COLOR.ALERT_SUCCESS_BORDER]: '#00823E',
113
115
  };
@@ -18,7 +18,7 @@
18
18
  --lightGray: #d2d2d2;
19
19
  --extraLightGray: #e2e2e2;
20
20
  --extraExtraLightGray: #f2f2f2;
21
- --ndTertiary1: #00823E;
21
+ --success: #00823E;
22
22
  --ndBlue: #0c2340;
23
23
  --ndBlueDark: #081629;
24
24
  --ndBlueLight: #143865;
@@ -53,5 +53,5 @@
53
53
  --alertWarningBg: #fc7279;
54
54
  --alertWarningBorder: #ad5458;
55
55
  --alertSuccessBg: #edffea;
56
- --ndTertiary1: #00823E;
56
+ --alertSuccessBorder: #00823E;
57
57
  }