@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
@@ -26,23 +26,23 @@ export type ButtonProps = StyledElementProps<HTMLButtonElement, {
26
26
  disableFocusStyles?: boolean;
27
27
  }>;
28
28
  export declare const Button: React.ForwardRefExoticComponent<{
29
- sx?: import("../../../theme").StylesProp | undefined;
29
+ sx?: import("../../../theme").StylesProp;
30
30
  children?: React.ReactNode;
31
31
  } & Omit<React.HTMLAttributes<HTMLButtonElement>, "children" | "onChange"> & {
32
- size?: BUTTON_SIZE | undefined;
33
- type?: BUTTON_TYPE | undefined;
34
- color?: COLOR | undefined;
35
- textColor?: COLOR | undefined;
36
- customColor?: string | undefined;
37
- primaryIcon?: React.FC<any> | undefined;
38
- leftIcon?: React.FC<any> | undefined;
39
- rightIcon?: React.FC<any> | undefined;
40
- accessibleLabel?: string | undefined;
41
- loading?: boolean | undefined;
42
- disabled?: boolean | undefined;
43
- disableFocusStyles?: boolean | undefined;
32
+ size?: BUTTON_SIZE;
33
+ type?: BUTTON_TYPE;
34
+ color?: COLOR;
35
+ textColor?: COLOR;
36
+ customColor?: string;
37
+ primaryIcon?: React.FC<any>;
38
+ leftIcon?: React.FC<any>;
39
+ rightIcon?: React.FC<any>;
40
+ accessibleLabel?: string;
41
+ loading?: boolean;
42
+ disabled?: boolean;
43
+ disableFocusStyles?: boolean;
44
44
  } & {
45
- htmlFor?: string | undefined;
45
+ htmlFor?: string;
46
46
  } & React.RefAttributes<HTMLButtonElement>>;
47
47
  type LinkButtonProps = Omit<ButtonProps, 'type' | 'color' | 'textColor'>;
48
48
  export declare const LinkButton: React.FC<LinkButtonProps>;
@@ -107,12 +107,12 @@ export const Button = React.forwardRef((_a, ref) => {
107
107
  body = (_jsx(Icon, { icon: primaryIcon, size: getIconSize(typographyStyles.fontSize), color: textColor }));
108
108
  }
109
109
  if (loading) {
110
- body = (_jsxs("div", Object.assign({ sx: {
110
+ body = (_jsxs("div", { sx: {
111
111
  position: 'relative',
112
112
  display: 'flex',
113
113
  alignItems: 'center',
114
114
  justifyContent: 'center',
115
- } }, { children: [_jsx(Spinner, { size: SPINNER_SIZE.SM, color: textColor, sx: { position: 'absolute' } }), _jsx("div", Object.assign({ sx: { visibility: 'hidden' } }, { children: body }))] })));
115
+ }, children: [_jsx(Spinner, { size: SPINNER_SIZE.SM, color: textColor, sx: { position: 'absolute' } }), _jsx("div", { sx: { visibility: 'hidden' }, children: body })] }));
116
116
  }
117
117
  const hoverStyles = !disabled
118
118
  ? {
@@ -123,14 +123,14 @@ export const Button = React.forwardRef((_a, ref) => {
123
123
  : undefined;
124
124
  return (_jsxs("button", Object.assign({ ref: ref, tabIndex: disabled ? -1 : 0, disabled: disabled, css: {
125
125
  backgroundColor: customColor,
126
- }, sx: Object.assign(Object.assign({ cursor, bg: customColor ? undefined : bg, color: textColor, px: paddingX, width: width, height: height, border: 'solid 1px', borderRadius: '4px', borderColor, display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', ':hover': !disableFocusStyles ? hoverStyles : {}, ':focus': !disableFocusStyles ? hoverStyles : {} }, typographyStyles), sx) }, rest, { children: [leftIcon && (_jsx(Icon, { icon: leftIcon, size: typographyStyles.fontSize, sx: { mr: iconMargin[size] }, color: textColor })), _jsx("div", Object.assign({ css: {
126
+ }, sx: Object.assign(Object.assign({ cursor, bg: customColor ? undefined : bg, color: textColor, px: paddingX, width: width, height: height, border: 'solid 1px', borderRadius: '4px', borderColor, display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', ':hover': !disableFocusStyles ? hoverStyles : {}, ':focus': !disableFocusStyles ? hoverStyles : {} }, typographyStyles), sx) }, rest, { children: [leftIcon && (_jsx(Icon, { icon: leftIcon, size: typographyStyles.fontSize, sx: { mr: iconMargin[size] }, color: textColor })), _jsx("div", { css: {
127
127
  flexGrow: 1,
128
128
  justifyContent: 'flex-start',
129
129
  textOverflow: 'ellipsis',
130
130
  whiteSpace: 'nowrap',
131
131
  overflow: 'hidden',
132
132
  textAlign: 'start',
133
- } }, { children: body })), rightIcon && (_jsx(Icon, { icon: rightIcon, size: typographyStyles.fontSize, sx: { ml: iconMargin[size] }, color: textColor }))] })));
133
+ }, children: body }), rightIcon && (_jsx(Icon, { icon: rightIcon, size: typographyStyles.fontSize, sx: { ml: iconMargin[size] }, color: textColor }))] })));
134
134
  });
135
135
  export const LinkButton = (props) => {
136
136
  return (_jsx(Button, Object.assign({}, props, { color: COLOR.ND_BLUE_BRIGHT, textColor: COLOR.WHITE })));
@@ -23,7 +23,7 @@ const sizes = [
23
23
  { size: BUTTONV2_SIZE.SM, label: 'Small' },
24
24
  ];
25
25
  export const Default = {
26
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] })))) })),
26
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] }))) })),
27
27
  args: {
28
28
  type: BUTTONV2_TYPE.DEFAULT,
29
29
  children: 'Click Me',
@@ -38,14 +38,14 @@ export const CustomColor = {
38
38
  },
39
39
  };
40
40
  export const Link = {
41
- render: (args) => (_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(LinkButtonV2, Object.assign({}, args, { sx: { mt: 1 } }))] })))) })),
41
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(LinkButtonV2, Object.assign({}, args, { sx: { mt: 1 } }))] }))) })),
42
42
  args: {
43
43
  type: BUTTONV2_TYPE.DEFAULT,
44
44
  children: 'Click Me',
45
45
  },
46
46
  };
47
47
  export const OutlineButton = {
48
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] })))) })),
48
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] }))) })),
49
49
  args: {
50
50
  type: BUTTONV2_TYPE.OUTLINE,
51
51
  children: 'Click Me',
@@ -53,7 +53,7 @@ export const OutlineButton = {
53
53
  },
54
54
  };
55
55
  export const TextButton = {
56
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] })))) })),
56
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 } }))] }))) })),
57
57
  args: {
58
58
  type: BUTTONV2_TYPE.TEXT,
59
59
  onClick: () => { },
@@ -61,7 +61,7 @@ export const TextButton = {
61
61
  },
62
62
  };
63
63
  export const IconButton = {
64
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, primaryIcon: SettingsIcon }))] })))) })),
64
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, primaryIcon: SettingsIcon }))] }))) })),
65
65
  args: {
66
66
  type: BUTTONV2_TYPE.TEXT,
67
67
  children: 'Click Me',
@@ -69,22 +69,22 @@ export const IconButton = {
69
69
  },
70
70
  };
71
71
  export const LeftIcon = {
72
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, leftIcon: SearchIcon }))] })))) })),
72
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, leftIcon: SearchIcon }))] }))) })),
73
73
  args: {
74
74
  onClick: () => { },
75
75
  children: 'Search',
76
76
  },
77
77
  };
78
78
  export const RightIcon = {
79
- render: (args) => (_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(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, rightIcon: ArrowDropDownIcon }))] })))) })),
79
+ render: (args) => (_jsx(ColumnV2, { children: sizes.map((size) => (_jsxs(GroupV2, { type: GROUPV2_TYPE.REGION, children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(ButtonV2, Object.assign({}, args, { size: size.size, sx: { mt: 1 }, rightIcon: ArrowDropDownIcon }))] }))) })),
80
80
  args: {
81
81
  onClick: () => { },
82
82
  children: 'Select',
83
83
  },
84
84
  };
85
85
  export const Loading = {
86
- render: () => (_jsxs(ColumnV2, { children: [_jsx(RowV2, { children: _jsx(ButtonV2, Object.assign({ loading: true }, { children: "Click Me" })) }), _jsx(RowV2, Object.assign({ sx: { mt: 1 } }, { children: _jsx(ButtonV2, Object.assign({ type: BUTTONV2_TYPE.OUTLINE, loading: true }, { children: "Click Me" })) })), _jsx(RowV2, Object.assign({ sx: { mt: 1 } }, { children: _jsx(ButtonV2, Object.assign({ type: BUTTONV2_TYPE.TEXT, loading: true }, { children: "Click Me" })) }))] })),
86
+ render: () => (_jsxs(ColumnV2, { children: [_jsx(RowV2, { children: _jsx(ButtonV2, { loading: true, children: "Click Me" }) }), _jsx(RowV2, { sx: { mt: 1 }, children: _jsx(ButtonV2, { type: BUTTONV2_TYPE.OUTLINE, loading: true, children: "Click Me" }) }), _jsx(RowV2, { sx: { mt: 1 }, children: _jsx(ButtonV2, { type: BUTTONV2_TYPE.TEXT, loading: true, children: "Click Me" }) })] })),
87
87
  };
88
88
  export const Disabled = {
89
- render: () => (_jsxs(ColumnV2, { children: [_jsx(RowV2, { children: _jsx(ButtonV2, Object.assign({ disabled: true }, { children: "Click Me" })) }), _jsx(RowV2, Object.assign({ sx: { mt: 1 } }, { children: _jsx(ButtonV2, Object.assign({ type: BUTTONV2_TYPE.OUTLINE, disabled: true }, { children: "Click Me" })) })), _jsx(RowV2, Object.assign({ sx: { mt: 1 } }, { children: _jsx(ButtonV2, Object.assign({ type: BUTTONV2_TYPE.TEXT, disabled: true }, { children: "Click Me" })) }))] })),
89
+ render: () => (_jsxs(ColumnV2, { children: [_jsx(RowV2, { children: _jsx(ButtonV2, { disabled: true, children: "Click Me" }) }), _jsx(RowV2, { sx: { mt: 1 }, children: _jsx(ButtonV2, { type: BUTTONV2_TYPE.OUTLINE, disabled: true, children: "Click Me" }) }), _jsx(RowV2, { sx: { mt: 1 }, children: _jsx(ButtonV2, { type: BUTTONV2_TYPE.TEXT, disabled: true, children: "Click Me" }) })] })),
90
90
  };
@@ -16,7 +16,7 @@ describe('Button', () => {
16
16
  expect(getByText('Foo')).toBeInTheDocument();
17
17
  });
18
18
  it('renders icon component passed to it', () => {
19
- const { getByText } = render(_jsxs(_Fragment, { children: [_jsx(ButtonV2, Object.assign({ leftIcon: MockLeftIcon }, { children: "Click Me" })), _jsx(ButtonV2, Object.assign({ primaryIcon: MockPrimaryIcon }, { children: "Click Me" })), _jsx(ButtonV2, Object.assign({ rightIcon: MockRightIcon }, { children: "Click Me" }))] }));
19
+ const { getByText } = render(_jsxs(_Fragment, { children: [_jsx(ButtonV2, { leftIcon: MockLeftIcon, children: "Click Me" }), _jsx(ButtonV2, { primaryIcon: MockPrimaryIcon, children: "Click Me" }), _jsx(ButtonV2, { rightIcon: MockRightIcon, children: "Click Me" })] }));
20
20
  expect(getByText('Mock Primary Icon')).toBeDefined();
21
21
  expect(getByText('Mock Left Icon')).toBeDefined();
22
22
  expect(getByText('Mock Right Icon')).toBeDefined();
@@ -27,24 +27,24 @@ export type ButtonV2Props = StyledElementPropsV2<HTMLButtonElement, {
27
27
  className?: string;
28
28
  }>;
29
29
  export declare const ButtonV2: React.ForwardRefExoticComponent<{
30
- sx?: import("../../../theme").StylesPropV2 | undefined;
30
+ sx?: import("../../../theme").StylesPropV2;
31
31
  children?: React.ReactNode;
32
32
  } & Omit<React.HTMLAttributes<HTMLButtonElement>, "children" | "onChange"> & {
33
- size?: BUTTONV2_SIZE | undefined;
34
- type?: BUTTONV2_TYPE | undefined;
35
- color?: COLOR | undefined;
36
- textColor?: COLOR | undefined;
37
- customColor?: string | undefined;
38
- primaryIcon?: React.FC<any> | undefined;
39
- leftIcon?: React.FC<any> | undefined;
40
- rightIcon?: React.FC<any> | undefined;
41
- accessibleLabel?: string | undefined;
42
- loading?: boolean | undefined;
43
- disabled?: boolean | undefined;
44
- disableFocusStyles?: boolean | undefined;
45
- className?: string | undefined;
33
+ size?: BUTTONV2_SIZE;
34
+ type?: BUTTONV2_TYPE;
35
+ color?: COLOR;
36
+ textColor?: COLOR;
37
+ customColor?: string;
38
+ primaryIcon?: React.FC<any>;
39
+ leftIcon?: React.FC<any>;
40
+ rightIcon?: React.FC<any>;
41
+ accessibleLabel?: string;
42
+ loading?: boolean;
43
+ disabled?: boolean;
44
+ disableFocusStyles?: boolean;
45
+ className?: string;
46
46
  } & {
47
- htmlFor?: string | undefined;
47
+ htmlFor?: string;
48
48
  } & React.RefAttributes<HTMLButtonElement>>;
49
49
  type LinkButtonV2Props = Omit<ButtonV2Props, 'type' | 'color' | 'textColor'>;
50
50
  export declare const LinkButtonV2: React.FC<LinkButtonV2Props>;
@@ -115,7 +115,7 @@ export const ButtonV2 = React.forwardRef((_a, ref) => {
115
115
  body = (_jsx(IconV2, { icon: primaryIcon, size: getIconSize(typographyStyles.fontSize), color: textColor }));
116
116
  }
117
117
  if (loading) {
118
- body = (_jsxs("div", Object.assign({ className: typeSafeStyles.spinnerWrapper }, { children: [_jsx(SpinnerV2, { size: SPINNERV2_SIZE.SM, color: textColor, sx: { position: 'absolute' } }), _jsx("div", Object.assign({ style: { visibility: 'hidden' } }, { children: body }))] })));
118
+ body = (_jsxs("div", { className: typeSafeStyles.spinnerWrapper, children: [_jsx(SpinnerV2, { size: SPINNERV2_SIZE.SM, color: textColor, sx: { position: 'absolute' } }), _jsx("div", { style: { visibility: 'hidden' }, children: body })] }));
119
119
  }
120
120
  const processedStyles = processSx(Object.assign(Object.assign({ bg: customColor ? customColor : bg }, typographyStyles), sx));
121
121
  const hoverStyles = !disabled
@@ -130,7 +130,7 @@ export const ButtonV2 = React.forwardRef((_a, ref) => {
130
130
  return (_jsxs("button", Object.assign({}, anchorElementProps, { ref: ref, tabIndex: disabled ? -1 : 0, disabled: disabled, className: clsx(typeSafeStyles.button, className), style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ cursor }, processSx({
131
131
  color: textColor,
132
132
  borderColor,
133
- })), { paddingLeft: paddingX, paddingRight: paddingX, width: width, height: height }), appliedHoverStyles), appliedFocusStyles), processedStyles) }, rest, { children: [leftIcon && (_jsx(IconV2, { icon: leftIcon, size: typographyStyles.fontSize, sx: { mr: iconMargin[size] }, color: textColor })), _jsx("div", Object.assign({ className: typeSafeStyles.bodyWrapper }, { children: body })), rightIcon && (_jsx(IconV2, { icon: rightIcon, size: typographyStyles.fontSize, sx: { ml: iconMargin[size] }, color: textColor }))] })));
133
+ })), { paddingLeft: paddingX, paddingRight: paddingX, width: width, height: height }), appliedHoverStyles), appliedFocusStyles), processedStyles) }, rest, { children: [leftIcon && (_jsx(IconV2, { icon: leftIcon, size: typographyStyles.fontSize, sx: { mr: iconMargin[size] }, color: textColor })), _jsx("div", { className: typeSafeStyles.bodyWrapper, children: body }), rightIcon && (_jsx(IconV2, { icon: rightIcon, size: typographyStyles.fontSize, sx: { ml: iconMargin[size] }, color: textColor }))] })));
134
134
  });
135
135
  export const LinkButtonV2 = (props) => {
136
136
  return (_jsx(ButtonV2, Object.assign({}, props, { color: COLOR.ND_BLUE_BRIGHT, textColor: COLOR.WHITE })));
@@ -34,7 +34,7 @@ export function CheckboxGroup(_a) {
34
34
  }
35
35
  return optionsByColumn;
36
36
  }, [options, columns]);
37
- return (_jsx(Row, Object.assign({}, rest, { children: optionsByColumn.map((options, index) => (_jsx(Column, Object.assign({ grow: 1, sx: Object.assign({ mr: 4 }, columnStyles) }, { children: options.map((option) => (_jsx(Group, Object.assign({ type: GROUP_TYPE.RAW }, { children: ({ labelTargetId }) => (_jsxs(Row, Object.assign({ sx: Object.assign({ mb: 2, alignItems: 'center' }, rowStyles) }, { children: [_jsx(Checkbox, { onChange: (checked) => {
37
+ return (_jsx(Row, Object.assign({}, rest, { children: optionsByColumn.map((options, index) => (_jsx(Column, { grow: 1, sx: Object.assign({ mr: 4 }, columnStyles), children: options.map((option) => (_jsx(Group, { type: GROUP_TYPE.RAW, children: ({ labelTargetId }) => (_jsxs(Row, { sx: Object.assign({ mb: 2, alignItems: 'center' }, rowStyles), children: [_jsx(Checkbox, { onChange: (checked) => {
38
38
  const updatedSet = new Set(checkedOptions || []);
39
39
  if (checked) {
40
40
  updatedSet.add(option.value);
@@ -46,5 +46,5 @@ export function CheckboxGroup(_a) {
46
46
  }, checked: !!(checkedOptions === null || checkedOptions === void 0 ? void 0 : checkedOptions.has(option.value)), id: labelTargetId, disabled: option.disabled, sx: {
47
47
  mr: 2,
48
48
  flexShrink: 0,
49
- } }), _jsx(Label, Object.assign({ sx: Object.assign(Object.assign({ cursor: option.disabled ? 'not-allowed' : 'pointer' }, getTypographyStyles(TYPOGRAPHY_TYPE.CONDENSED_TEXT_MEDIUM)), { color: option.disabled ? COLOR.GRAY : undefined }) }, { children: option.label }))] }))) }), option.value))) }), index))) })));
49
+ } }), _jsx(Label, { sx: Object.assign(Object.assign({ cursor: option.disabled ? 'not-allowed' : 'pointer' }, getTypographyStyles(TYPOGRAPHY_TYPE.CONDENSED_TEXT_MEDIUM)), { color: option.disabled ? COLOR.GRAY : undefined }), children: option.label })] })) }, option.value))) }, index))) })));
50
50
  }
@@ -34,7 +34,7 @@ export function CheckboxGroupV2(_a) {
34
34
  }
35
35
  return optionsByColumn;
36
36
  }, [options, columns]);
37
- return (_jsx(RowV2, Object.assign({}, rest, { children: optionsByColumn.map((options, index) => (_jsx(ColumnV2, Object.assign({ grow: 1, sx: Object.assign({ mr: 4 }, columnStyles) }, { children: options.map((option) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.RAW }, { children: ({ labelTargetId }) => (_jsxs(RowV2, Object.assign({ sx: Object.assign({ mb: 2, alignItems: 'center' }, rowStyles) }, { children: [_jsx(CheckboxV2, { onChange: (checked) => {
37
+ return (_jsx(RowV2, Object.assign({}, rest, { children: optionsByColumn.map((options, index) => (_jsx(ColumnV2, { grow: 1, sx: Object.assign({ mr: 4 }, columnStyles), children: options.map((option) => (_jsx(GroupV2, { type: GROUPV2_TYPE.RAW, children: ({ labelTargetId }) => (_jsxs(RowV2, { sx: Object.assign({ mb: 2, alignItems: 'center' }, rowStyles), children: [_jsx(CheckboxV2, { onChange: (checked) => {
38
38
  const updatedSet = new Set(checkedOptions || []);
39
39
  if (checked) {
40
40
  updatedSet.add(option.value);
@@ -46,5 +46,5 @@ export function CheckboxGroupV2(_a) {
46
46
  }, checked: !!(checkedOptions === null || checkedOptions === void 0 ? void 0 : checkedOptions.has(option.value)), id: labelTargetId, disabled: option.disabled, sx: {
47
47
  mr: 2,
48
48
  flexShrink: 0,
49
- } }), _jsx(LabelV2, Object.assign({ sx: Object.assign(Object.assign({ cursor: option.disabled ? 'not-allowed' : 'pointer' }, getTypographyStyles(TYPOGRAPHY_TYPE.CONDENSED_TEXT_MEDIUM)), { color: option.disabled ? COLOR.GRAY : undefined }) }, { children: option.label }))] }))) }), option.value))) }), index))) })));
49
+ } }), _jsx(LabelV2, { sx: Object.assign(Object.assign({ cursor: option.disabled ? 'not-allowed' : 'pointer' }, getTypographyStyles(TYPOGRAPHY_TYPE.CONDENSED_TEXT_MEDIUM)), { color: option.disabled ? COLOR.GRAY : undefined }), children: option.label })] })) }, option.value))) }, index))) })));
50
50
  }
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { FlexHelperPropsV2 } from '../RowV2';
3
3
  export declare const ColumnV2: React.ForwardRefExoticComponent<{
4
- sx?: import("../../../theme").StylesPropV2 | undefined;
4
+ sx?: import("../../../theme").StylesPropV2;
5
5
  children?: React.ReactNode;
6
6
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & FlexHelperPropsV2 & {
7
- htmlFor?: string | undefined;
7
+ htmlFor?: string;
8
8
  } & React.RefAttributes<HTMLDivElement>>;
@@ -17,5 +17,5 @@ export const ColumnV2 = React.forwardRef((_a, ref) => {
17
17
  var { sx, children } = _a, rest = __rest(_a, ["sx", "children"]);
18
18
  const flexStyles = convertFlexHelperPropsV2(rest);
19
19
  const processedStyles = processSx(sx);
20
- return (_jsx("div", Object.assign({ ref: ref }, rest, { style: Object.assign(Object.assign(Object.assign({}, flexStyles), processedStyles), { display: 'flex', flexDirection: 'column' }) }, { children: children })));
20
+ return (_jsx("div", Object.assign({ ref: ref }, rest, { style: Object.assign(Object.assign(Object.assign({}, flexStyles), processedStyles), { display: 'flex', flexDirection: 'column' }), children: children })));
21
21
  });
@@ -45,7 +45,7 @@ const meta = {
45
45
  padding: 16,
46
46
  position: 'relative',
47
47
  };
48
- return (_jsxs("div", Object.assign({ style: containerStyle }, { children: [_jsx("p", Object.assign({ style: { marginTop: 0 } }, { children: "The banner (if shown) is fixed to the bottom of the viewport." })), _jsx(Story, {})] })));
48
+ return (_jsxs("div", { style: containerStyle, children: [_jsx("p", { style: { marginTop: 0 }, children: "The banner (if shown) is fixed to the bottom of the viewport." }), _jsx(Story, {})] }));
49
49
  },
50
50
  ],
51
51
  parameters: {
@@ -174,13 +174,13 @@ export const ConsentBanner = ({ clarityProjectId, countryCode = null, autoDetect
174
174
  };
175
175
  if (!shouldShow)
176
176
  return null;
177
- return (_jsxs("div", Object.assign({ role: "dialog", "aria-live": "polite", "aria-label": "Consent for analytics", className: className, style: Object.assign({ position: 'fixed', bottom: 0, left: 0, right: 0, zIndex: 99999, display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '0.75rem', padding: '0.9rem 1rem', background: 'rgba(17, 24, 39, 0.98)', color: 'white', boxShadow: '0 -6px 24px rgba(0,0,0,0.25)', flexWrap: 'wrap' }, style) }, { children: [_jsx("p", Object.assign({ style: {
177
+ return (_jsxs("div", { role: "dialog", "aria-live": "polite", "aria-label": "Consent for analytics", className: className, style: Object.assign({ position: 'fixed', bottom: 0, left: 0, right: 0, zIndex: 99999, display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '0.75rem', padding: '0.9rem 1rem', background: 'rgba(17, 24, 39, 0.98)', color: 'white', boxShadow: '0 -6px 24px rgba(0,0,0,0.25)', flexWrap: 'wrap' }, style), children: [_jsx("p", { style: {
178
178
  fontFamily: 'Arial, sans-serif',
179
179
  textAlign: 'center',
180
180
  margin: 0,
181
181
  lineHeight: 1.4,
182
182
  flex: '1 1 420px',
183
- } }, { children: "We use Microsoft Clarity to improve our site. Do you consent to analytics cookies?" })), _jsxs("div", Object.assign({ style: { display: 'flex', gap: '0.5rem', flexShrink: 0 } }, { children: [_jsx("button", Object.assign({ onClick: handleDeny, type: "button", style: {
183
+ }, children: "We use Microsoft Clarity to improve our site. Do you consent to analytics cookies?" }), _jsxs("div", { style: { display: 'flex', gap: '0.5rem', flexShrink: 0 }, children: [_jsx("button", { onClick: handleDeny, type: "button", style: {
184
184
  border: '1px solid rgba(255,255,255,0.65)',
185
185
  background: 'transparent',
186
186
  color: 'white',
@@ -188,7 +188,7 @@ export const ConsentBanner = ({ clarityProjectId, countryCode = null, autoDetect
188
188
  borderRadius: 8,
189
189
  cursor: 'pointer',
190
190
  fontWeight: 600,
191
- } }, { children: "Deny" })), _jsx("button", Object.assign({ onClick: handleAccept, type: "button", style: {
191
+ }, children: "Deny" }), _jsx("button", { onClick: handleAccept, type: "button", style: {
192
192
  border: 'none',
193
193
  background: 'white',
194
194
  color: '#111827',
@@ -196,6 +196,6 @@ export const ConsentBanner = ({ clarityProjectId, countryCode = null, autoDetect
196
196
  borderRadius: 8,
197
197
  cursor: 'pointer',
198
198
  fontWeight: 700,
199
- } }, { children: "Accept" }))] }))] })));
199
+ }, children: "Accept" })] })] }));
200
200
  };
201
201
  export default ConsentBanner;
@@ -17,7 +17,7 @@ const StatefulDatePicker = (props) => {
17
17
  } })));
18
18
  };
19
19
  export const Default = {
20
- render: () => (_jsx(Box, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePicker, { placeholder: "test" }) }))),
20
+ render: () => (_jsx(Box, { sx: { height: '500px' }, children: _jsx(StatefulDatePicker, { placeholder: "test" }) })),
21
21
  };
22
22
  export const Inline = {
23
23
  argTypes: {
@@ -30,7 +30,7 @@ export const Inline = {
30
30
  },
31
31
  render: (args) => {
32
32
  const { backgroundColor } = args;
33
- return (_jsx(Box, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePicker, { backgroundColor: backgroundColor, inline: true }) })));
33
+ return (_jsx(Box, { sx: { height: '500px' }, children: _jsx(StatefulDatePicker, { backgroundColor: backgroundColor, inline: true }) }));
34
34
  },
35
35
  };
36
36
  export const HighlightedDates = {
@@ -48,6 +48,6 @@ export const HighlightedDates = {
48
48
  highlightedDate1.setDate(highlightedDate1.getDate() + 1);
49
49
  const highlightedDate2 = new Date();
50
50
  highlightedDate2.setDate(highlightedDate2.getDate() - 1);
51
- return (_jsx(Box, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePicker, { inline: true, backgroundColor: backgroundColor, highlightDates: [highlightedDate1, highlightedDate2] }) })));
51
+ return (_jsx(Box, { sx: { height: '500px' }, children: _jsx(StatefulDatePicker, { inline: true, backgroundColor: backgroundColor, highlightDates: [highlightedDate1, highlightedDate2] }) }));
52
52
  },
53
53
  };
@@ -3,9 +3,9 @@ import 'react-datepicker/dist/react-datepicker.css';
3
3
  import { TextInputProps } from '../TextInput';
4
4
  import { BoxProps } from '../layout/Box';
5
5
  export declare const InputWrapper: React.ForwardRefExoticComponent<{
6
- onChange?: ((e: React.ChangeEvent) => void) | undefined;
7
- onClick?: ((e: React.MouseEvent) => void) | undefined;
8
- value?: string | undefined;
6
+ onChange?: (e: React.ChangeEvent) => void;
7
+ onClick?: (e: React.MouseEvent) => void;
8
+ value?: string;
9
9
  children: React.ReactElement;
10
10
  } & React.RefAttributes<any>>;
11
11
  export declare const areDatesEqual: (d1: Date, d2: Date) => boolean;
@@ -17,7 +17,7 @@ const StatefulDatePickerV2 = (props) => {
17
17
  } })));
18
18
  };
19
19
  export const Default = {
20
- render: () => (_jsx(BoxV2, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePickerV2, { placeholder: "test" }) }))),
20
+ render: () => (_jsx(BoxV2, { sx: { height: '500px' }, children: _jsx(StatefulDatePickerV2, { placeholder: "test" }) })),
21
21
  };
22
22
  export const Inline = {
23
23
  argTypes: {
@@ -30,7 +30,7 @@ export const Inline = {
30
30
  },
31
31
  render: (args) => {
32
32
  const { backgroundColor } = args;
33
- return (_jsx(BoxV2, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePickerV2, { backgroundColor: backgroundColor, inline: true }) })));
33
+ return (_jsx(BoxV2, { sx: { height: '500px' }, children: _jsx(StatefulDatePickerV2, { backgroundColor: backgroundColor, inline: true }) }));
34
34
  },
35
35
  };
36
36
  export const HighlightedDates = {
@@ -48,6 +48,6 @@ export const HighlightedDates = {
48
48
  highlightedDate1.setDate(highlightedDate1.getDate() + 1);
49
49
  const highlightedDate2 = new Date();
50
50
  highlightedDate2.setDate(highlightedDate2.getDate() - 1);
51
- return (_jsx(BoxV2, Object.assign({ sx: { height: '500px' } }, { children: _jsx(StatefulDatePickerV2, { inline: true, backgroundColor: backgroundColor, highlightDates: [highlightedDate1, highlightedDate2] }) })));
51
+ return (_jsx(BoxV2, { sx: { height: '500px' }, children: _jsx(StatefulDatePickerV2, { inline: true, backgroundColor: backgroundColor, highlightDates: [highlightedDate1, highlightedDate2] }) }));
52
52
  },
53
53
  };
@@ -3,9 +3,9 @@ import 'react-datepicker/dist/react-datepicker.css';
3
3
  import { TextInputV2Props } from '../TextInputV2';
4
4
  import { BoxV2Props } from '../BoxV2';
5
5
  export declare const InputWrapperV2: React.ForwardRefExoticComponent<{
6
- onChange?: ((e: React.ChangeEvent) => void) | undefined;
7
- onClick?: ((e: React.MouseEvent) => void) | undefined;
8
- value?: string | undefined;
6
+ onChange?: (e: React.ChangeEvent) => void;
7
+ onClick?: (e: React.MouseEvent) => void;
8
+ value?: string;
9
9
  children: React.ReactElement;
10
10
  } & React.RefAttributes<any>>;
11
11
  export declare const areDatesEqual: (d1: Date, d2: Date) => boolean;
@@ -16,11 +16,11 @@ export default meta;
16
16
  const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit.
17
17
  Nullam id nunc vitae magna aliquam aliquet. In hac habitasse platea dictumst.`;
18
18
  export const Default = {
19
- render: () => (_jsx(Box, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(Dropdown, { renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) }))),
19
+ render: () => (_jsx(Box, { sx: { width: '200px', height: '200px' }, children: _jsx(Dropdown, { renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) })),
20
20
  };
21
21
  export const MatchWidth = {
22
- render: () => (_jsx(Box, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(Dropdown, { matchWidth: true, renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) }))),
22
+ render: () => (_jsx(Box, { sx: { width: '200px', height: '200px' }, children: _jsx(Dropdown, { matchWidth: true, renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) })),
23
23
  };
24
24
  export const ForcePlacement = {
25
- render: () => (_jsx(Column, Object.assign({ sx: { width: '200x', height: '100vh' }, justify: "flex-end" }, { children: _jsx(Dropdown, { allowedPlacements: ['bottom-start'], renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) }))),
25
+ render: () => (_jsx(Column, { sx: { width: '200x', height: '100vh' }, justify: "flex-end", children: _jsx(Dropdown, { allowedPlacements: ['bottom-start'], renderAnchor: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(Paragraph, { children: lorem }) }) })),
26
26
  };
@@ -66,13 +66,13 @@ export const Dropdown = (_a) => {
66
66
  anchorProps: dropdownAnchorProps,
67
67
  isOpen,
68
68
  setIsOpen,
69
- }), isOpen && (_jsxs(_Fragment, { children: [shouldRenderDropdownContainer ? (_jsx(Box, Object.assign({ id: dropdownId, ref: refs.setFloating, style: dropdownBoxStyles }, { children: renderDropdown({
69
+ }), isOpen && (_jsxs(_Fragment, { children: [shouldRenderDropdownContainer ? (_jsx(Box, { id: dropdownId, ref: refs.setFloating, style: dropdownBoxStyles, children: renderDropdown({
70
70
  styles: dropdownBoxStyles,
71
71
  ref: refs.setFloating,
72
72
  setIsOpen,
73
73
  isOpen,
74
74
  id: dropdownId,
75
- }) }))) : (renderDropdown({
75
+ }) })) : (renderDropdown({
76
76
  styles: dropdownBoxStyles,
77
77
  ref: refs.setFloating,
78
78
  isOpen,
@@ -16,11 +16,11 @@ export default meta;
16
16
  const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit.
17
17
  Nullam id nunc vitae magna aliquam aliquet. In hac habitasse platea dictumst.`;
18
18
  export const Default = {
19
- render: () => (_jsx(BoxV2, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownV2, { renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) }))),
19
+ render: () => (_jsx(BoxV2, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownV2, { renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) })),
20
20
  };
21
21
  export const MatchWidth = {
22
- render: () => (_jsx(BoxV2, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownV2, { matchWidth: true, renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) }))),
22
+ render: () => (_jsx(BoxV2, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownV2, { matchWidth: true, renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) })),
23
23
  };
24
24
  export const ForcePlacement = {
25
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { width: '200x', height: '100vh' }, justify: "flex-end" }, { children: _jsx(DropdownV2, { allowedPlacements: ['bottom-start'], renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) }))),
25
+ render: () => (_jsx(ColumnV2, { sx: { width: '200x', height: '100vh' }, justify: "flex-end", children: _jsx(DropdownV2, { allowedPlacements: ['bottom-start'], renderAnchor: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Open Dropdown" }))), renderDropdown: () => _jsx(ParagraphV2, { children: lorem }) }) })),
26
26
  };
@@ -65,13 +65,13 @@ export const DropdownV2 = (_a) => {
65
65
  anchorProps: dropdownAnchorProps,
66
66
  isOpen,
67
67
  setIsOpen,
68
- }), isOpen && (_jsxs(_Fragment, { children: [shouldRenderDropdownContainer ? (_jsx("div", Object.assign({ id: dropdownId, ref: refs.setFloating, style: dropdownBoxStyles }, { children: renderDropdown({
68
+ }), isOpen && (_jsxs(_Fragment, { children: [shouldRenderDropdownContainer ? (_jsx("div", { id: dropdownId, ref: refs.setFloating, style: dropdownBoxStyles, children: renderDropdown({
69
69
  styles: dropdownBoxStyles,
70
70
  ref: refs.setFloating,
71
71
  setIsOpen,
72
72
  isOpen,
73
73
  id: dropdownId,
74
- }) }))) : (renderDropdown({
74
+ }) })) : (renderDropdown({
75
75
  styles: dropdownBoxStyles,
76
76
  ref: refs.setFloating,
77
77
  isOpen,
@@ -61,7 +61,7 @@ export const Group = (_a) => {
61
61
  labelId,
62
62
  labelTargetId,
63
63
  };
64
- const Main = (_jsx(GroupContext.Provider, Object.assign({ value: contextValue }, { children: typeof children === 'function' ? children(contextValue) : children })));
64
+ const Main = (_jsx(GroupContext.Provider, { value: contextValue, children: typeof children === 'function' ? children(contextValue) : children }));
65
65
  if (type === GROUP_TYPE.RAW) {
66
66
  return Main;
67
67
  }
@@ -63,7 +63,7 @@ export const GroupV2 = (_a) => {
63
63
  labelId,
64
64
  labelTargetId,
65
65
  };
66
- const Main = (_jsx(GroupV2Context.Provider, Object.assign({ value: contextValue }, { children: typeof children === 'function' ? children(contextValue) : children })));
66
+ const Main = (_jsx(GroupV2Context.Provider, { value: contextValue, children: typeof children === 'function' ? children(contextValue) : children }));
67
67
  if (type === GROUPV2_TYPE.RAW) {
68
68
  return Main;
69
69
  }
@@ -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 })),