@ndlib/component-library 1.0.45 → 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 (175) hide show
  1. package/dist/components/composites/Card/Card.stories.js +7 -7
  2. package/dist/components/composites/Card/Card.test.js +1 -1
  3. package/dist/components/composites/Card/index.js +10 -10
  4. package/dist/components/composites/CardV2/CardV2.stories.js +14 -14
  5. package/dist/components/composites/CardV2/CardV2.test.js +1 -1
  6. package/dist/components/composites/CardV2/index.js +11 -11
  7. package/dist/components/composites/DragDropList/DragDrop.test.js +1 -1
  8. package/dist/components/composites/DragDropList/DragDropList.stories.d.ts +2 -3
  9. package/dist/components/composites/DragDropList/DragDropList.stories.js +2 -2
  10. package/dist/components/composites/DragDropList/index.d.ts +1 -2
  11. package/dist/components/composites/DragDropList/index.js +5 -5
  12. package/dist/components/composites/DropdownLinks/DropdownLinks.stories.js +3 -3
  13. package/dist/components/composites/DropdownLinks/DropdownLinks.test.js +1 -1
  14. package/dist/components/composites/DropdownLinks/index.js +2 -2
  15. package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +3 -3
  16. package/dist/components/composites/DropdownLinksV2/index.js +2 -2
  17. package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
  18. package/dist/components/composites/EmptyState/index.js +2 -2
  19. package/dist/components/composites/Modal/Modal.stories.js +2 -2
  20. package/dist/components/composites/Modal/Modal.test.js +4 -4
  21. package/dist/components/composites/Modal/index.js +5 -5
  22. package/dist/components/composites/ModalV2/ModalV2.stories.js +2 -2
  23. package/dist/components/composites/ModalV2/ModalV2.test.js +4 -4
  24. package/dist/components/composites/ModalV2/index.js +5 -5
  25. package/dist/components/composites/NavMenu/demo.js +1 -1
  26. package/dist/components/composites/NavMenu/index.js +6 -6
  27. package/dist/components/composites/NavMenuV2/demoV2.js +2 -2
  28. package/dist/components/composites/NavMenuV2/index.js +3 -3
  29. package/dist/components/composites/Seo/SeoDataDisplay/index.js +1 -1
  30. package/dist/components/composites/Seo/index.js +1 -1
  31. package/dist/components/composites/SnackBar/examples.js +7 -7
  32. package/dist/components/composites/SnackBar/index.js +4 -4
  33. package/dist/components/composites/StructuredData/index.d.ts +0 -1
  34. package/dist/components/composites/StructuredData/index.js +1 -1
  35. package/dist/components/elements/Alerts/Alerts.stories.js +2 -2
  36. package/dist/components/elements/Alerts/index.js +2 -2
  37. package/dist/components/elements/AlertsV2/AlertsV2.stories.js +2 -2
  38. package/dist/components/elements/AlertsV2/index.js +1 -1
  39. package/dist/components/elements/ArrowLink/ArrowLink.stories.js +1 -1
  40. package/dist/components/elements/ArrowLink/ArrowLink.test.js +5 -5
  41. package/dist/components/elements/ArrowLink/index.d.ts +0 -1
  42. package/dist/components/elements/ArrowLink/index.js +3 -3
  43. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +1 -1
  44. package/dist/components/elements/ArrowLinkV2/index.d.ts +0 -1
  45. package/dist/components/elements/ArrowLinkV2/index.js +1 -1
  46. package/dist/components/elements/AutoComplete/AutoComplete.stories.js +1 -1
  47. package/dist/components/elements/BoxV2/BoxV2.stories.js +1 -1
  48. package/dist/components/elements/BoxV2/index.d.ts +2 -2
  49. package/dist/components/elements/BrandingBar/index.d.ts +0 -1
  50. package/dist/components/elements/BrandingBar/index.js +4 -4
  51. package/dist/components/elements/BrandingBarV2/index.js +1 -1
  52. package/dist/components/elements/Button/Button.stories.js +9 -9
  53. package/dist/components/elements/Button/Button.test.js +1 -1
  54. package/dist/components/elements/Button/index.d.ts +14 -14
  55. package/dist/components/elements/Button/index.js +4 -4
  56. package/dist/components/elements/ButtonV2/ButtonV2.stories.js +9 -9
  57. package/dist/components/elements/ButtonV2/ButtonV2.test.js +1 -1
  58. package/dist/components/elements/ButtonV2/index.d.ts +15 -15
  59. package/dist/components/elements/ButtonV2/index.js +2 -2
  60. package/dist/components/elements/CheckboxGroup/index.js +2 -2
  61. package/dist/components/elements/CheckboxGroupV2/index.js +2 -2
  62. package/dist/components/elements/ColumnV2/index.d.ts +2 -2
  63. package/dist/components/elements/ColumnV2/index.js +1 -1
  64. package/dist/components/elements/ConsentBanner/ConsentBanner.stories.js +1 -1
  65. package/dist/components/elements/ConsentBanner/index.js +4 -4
  66. package/dist/components/elements/DatePicker/DatePicker.stories.js +3 -3
  67. package/dist/components/elements/DatePicker/index.d.ts +3 -3
  68. package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +3 -3
  69. package/dist/components/elements/DatePickerV2/index.d.ts +3 -3
  70. package/dist/components/elements/Dropdown/Dropdown.stories.js +3 -3
  71. package/dist/components/elements/Dropdown/index.js +2 -2
  72. package/dist/components/elements/DropdownV2/DropdownV2.stories.js +3 -3
  73. package/dist/components/elements/DropdownV2/index.js +2 -2
  74. package/dist/components/elements/Group/index.js +1 -1
  75. package/dist/components/elements/GroupV2/index.js +1 -1
  76. package/dist/components/elements/Heading/Heading.stories.js +3 -3
  77. package/dist/components/elements/Heading/Heading.test.js +2 -2
  78. package/dist/components/elements/HeadingV2/HeadingV2.stories.js +3 -3
  79. package/dist/components/elements/HeadingV2/HeadingV2.test.js +2 -2
  80. package/dist/components/elements/Icon/Icon.stories.js +1 -1
  81. package/dist/components/elements/IconV2/IconV2.stories.js +1 -1
  82. package/dist/components/elements/Label/Label.stories.js +1 -1
  83. package/dist/components/elements/Label/Label.test.js +5 -5
  84. package/dist/components/elements/LabelV2/LabelV2.stories.js +1 -1
  85. package/dist/components/elements/LabelV2/LabelV2.test.js +5 -5
  86. package/dist/components/elements/Link/Link.stories.js +1 -1
  87. package/dist/components/elements/Link/Link.test.js +7 -7
  88. package/dist/components/elements/List/List.stories.js +5 -5
  89. package/dist/components/elements/List/List.test.js +2 -2
  90. package/dist/components/elements/List/index.js +5 -5
  91. package/dist/components/elements/ListBox/index.d.ts +2 -17
  92. package/dist/components/elements/ListBox/index.js +3 -3
  93. package/dist/components/elements/ListBoxV2/index.d.ts +2 -18
  94. package/dist/components/elements/ListBoxV2/index.js +2 -2
  95. package/dist/components/elements/ListV2/ListV2.stories.js +5 -5
  96. package/dist/components/elements/ListV2/index.js +5 -5
  97. package/dist/components/elements/Markdown/index.d.ts +0 -1
  98. package/dist/components/elements/Markdown/index.js +2 -2
  99. package/dist/components/elements/MarkdownV2/index.d.ts +0 -1
  100. package/dist/components/elements/MarkdownV2/index.js +2 -2
  101. package/dist/components/elements/MonthPicker/MonthPicker.stories.js +2 -2
  102. package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +2 -2
  103. package/dist/components/elements/Paragraph/Paragraph.stories.js +2 -2
  104. package/dist/components/elements/ParagraphV2/ParagraphV2.stories.js +2 -2
  105. package/dist/components/elements/Pill/Pill.stories.js +3 -3
  106. package/dist/components/elements/Pill/index.d.ts +6 -6
  107. package/dist/components/elements/Pill/index.js +2 -2
  108. package/dist/components/elements/PillV2/PillV2.stories.js +3 -3
  109. package/dist/components/elements/PillV2/index.d.ts +6 -6
  110. package/dist/components/elements/PillV2/index.js +1 -1
  111. package/dist/components/elements/RadioGroup/index.js +2 -2
  112. package/dist/components/elements/RadioGroupV2/index.js +2 -2
  113. package/dist/components/elements/RawHtml/index.d.ts +0 -1
  114. package/dist/components/elements/ReadMore/ReadMore.stories.js +4 -4
  115. package/dist/components/elements/ReadMore/index.js +3 -3
  116. package/dist/components/elements/ReadMoreV2/ReadMoreV2.stories.js +4 -4
  117. package/dist/components/elements/ReadMoreV2/index.js +3 -3
  118. package/dist/components/elements/RowV2/index.d.ts +4 -4
  119. package/dist/components/elements/RowV2/index.js +1 -1
  120. package/dist/components/elements/Select/Select.stories.js +3 -3
  121. package/dist/components/elements/Select/index.js +7 -7
  122. package/dist/components/elements/SelectV2/SelectV2.stories.js +3 -3
  123. package/dist/components/elements/SelectV2/index.js +4 -4
  124. package/dist/components/elements/Spinner/Spinner.stories.js +1 -1
  125. package/dist/components/elements/Spinner/index.d.ts +0 -1
  126. package/dist/components/elements/SpinnerV2/SpinnerV2.stories.js +1 -1
  127. package/dist/components/elements/SpinnerV2/index.d.ts +0 -1
  128. package/dist/components/elements/TabList/example.js +2 -2
  129. package/dist/components/elements/TabList/index.js +2 -2
  130. package/dist/components/elements/TabListV2/example.js +2 -2
  131. package/dist/components/elements/TabListV2/index.js +2 -2
  132. package/dist/components/elements/Table/Table.stories.js +18 -18
  133. package/dist/components/elements/Table/Table.test.js +1 -1
  134. package/dist/components/elements/Table/index.d.ts +0 -1
  135. package/dist/components/elements/Table/index.js +8 -8
  136. package/dist/components/elements/TextInput/TextInput.stories.js +4 -4
  137. package/dist/components/elements/TextInput/TextInput.test.js +2 -2
  138. package/dist/components/elements/TextInput/index.d.ts +10 -10
  139. package/dist/components/elements/TextInput/index.js +7 -7
  140. package/dist/components/elements/TextInputV2/TextInputV2.stories.js +4 -4
  141. package/dist/components/elements/TextInputV2/TextInputV2.test.js +1 -1
  142. package/dist/components/elements/TextInputV2/index.d.ts +11 -11
  143. package/dist/components/elements/TextInputV2/index.js +4 -4
  144. package/dist/components/elements/layout/Box.d.ts +2 -2
  145. package/dist/components/elements/layout/Box.stories.js +1 -1
  146. package/dist/components/elements/layout/Column.d.ts +2 -2
  147. package/dist/components/elements/layout/Column.js +1 -1
  148. package/dist/components/elements/layout/Flex.stories.js +4 -4
  149. package/dist/components/elements/layout/Flex.test.js +2 -2
  150. package/dist/components/elements/layout/Row.d.ts +3 -3
  151. package/dist/components/elements/layout/Row.js +1 -1
  152. package/dist/components/elements/option.d.ts +0 -1
  153. package/dist/components/providers/alerts.js +1 -1
  154. package/dist/components/providers/componentConfig.js +1 -1
  155. package/dist/components/providers/componentConfigV2.js +1 -1
  156. package/dist/components/providers/dialogs.js +2 -2
  157. package/dist/components/providers/env.js +2 -2
  158. package/dist/components/providers/media.js +2 -2
  159. package/dist/components/providers/mediaV2.js +2 -2
  160. package/dist/components/providers/menu.js +1 -1
  161. package/dist/components/providers/snackBar.d.ts +0 -1
  162. package/dist/components/providers/snackBar.js +2 -2
  163. package/dist/components/providers/ui.js +1 -1
  164. package/dist/components/providers/uiV2.js +1 -1
  165. package/dist/components/providers/uniqueIds.js +1 -1
  166. package/dist/theme/Color.stories.js +1 -1
  167. package/dist/theme/Typography.stories.js +1 -1
  168. package/dist/theme/colors.d.ts +2 -2
  169. package/dist/theme/colors.js +4 -2
  170. package/dist/theme/css-variables.css +2 -2
  171. package/dist/theme/index.d.ts +7 -90
  172. package/dist/theme/index.js +2 -2
  173. package/dist/theme/typography.d.ts +1 -1
  174. package/dist/utils/test.js +2 -2
  175. package/package.json +5 -5
@@ -82,21 +82,21 @@ const horizontalCards = [
82
82
  headline: 'Exhibit — Printing the Nation: A Century of Irish Book Arts',
83
83
  image: 'https://images.ctfassets.net/cfblb1f7i85j/7aCd5Sm86JdtQepGBKDUfy/dcb4d97dd3a1d3ee810e8bcaa82dc715/Spring_Exhibit_2023-Rep.jpg?w=296',
84
84
  size: CARD_SIZE.SM,
85
- children: (_jsxs(_Fragment, { children: [_jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
85
+ children: (_jsxs(_Fragment, { children: [_jsxs(Label, { color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
86
86
  display: 'flex',
87
- } }, { children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
87
+ }, children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] }), _jsxs(Label, { color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
88
88
  display: 'flex',
89
- } }, { children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(Paragraph, { children: "This exhibit demonstrates the art and craft of the Irish book since 1900." })] })),
89
+ }, children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] }), _jsx(Paragraph, { children: "This exhibit demonstrates the art and craft of the Irish book since 1900." })] })),
90
90
  },
91
91
  {
92
92
  headline: 'One Book, One Michiana Digital Exhibit — Papers Alight: Contextualizing Mike Curato’s Flamer',
93
93
  image: 'https://images.ctfassets.net/cfblb1f7i85j/2sGpdDbNkl6MPnlem6wq1R/995c786624613b5ff07228e481996385/One.Book.2023-Rep.png?w=296',
94
94
  size: CARD_SIZE.SM,
95
- children: ({ activeBackground }) => (_jsxs(_Fragment, { children: [_jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
95
+ children: ({ activeBackground }) => (_jsxs(_Fragment, { children: [_jsxs(Label, { color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
96
96
  display: 'flex',
97
- } }, { children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
97
+ }, children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] }), _jsxs(Label, { color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
98
98
  display: 'flex',
99
- } }, { children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(ReadMore, Object.assign({ typography: TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM, lines: 2, sx: { bg: activeBackground } }, { children: "This online exhibition displays rare materials from Hesburgh Libraries collections that place Mike Curato\u2019s teen graphic novel into a historical and social context." }))] })),
99
+ }, children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] }), _jsx(ReadMore, { typography: TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM, lines: 2, sx: { bg: activeBackground }, children: "This online exhibition displays rare materials from Hesburgh Libraries collections that place Mike Curato\u2019s teen graphic novel into a historical and social context." })] })),
100
100
  },
101
101
  ];
102
102
  export const Default = {
@@ -134,7 +134,7 @@ export const Raised = {
134
134
  args: {},
135
135
  };
136
136
  export const Heading = {
137
- render: () => (_jsx(Column, { children: basicCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { key: i, heading: "Heading", headingIcon: BookmarkIcon, headingAction: _jsx(Button, Object.assign({ type: BUTTON_TYPE.TEXT, color: COLOR.WHITE, onClick: () => { } }, { children: "Click Me" })) })))) })),
137
+ render: () => (_jsx(Column, { children: basicCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { key: i, heading: "Heading", headingIcon: BookmarkIcon, headingAction: _jsx(Button, { type: BUTTON_TYPE.TEXT, color: COLOR.WHITE, onClick: () => { }, children: "Click Me" }) })))) })),
138
138
  args: {},
139
139
  };
140
140
  export const CustomImageHeading = {
@@ -13,7 +13,7 @@ describe('Card', () => {
13
13
  vi.resetAllMocks();
14
14
  });
15
15
  it('renders contents', () => {
16
- const { getByText } = render(_jsx(Card, Object.assign({ headline: MOCK_HEADLINE }, { children: MOCK_BODY })));
16
+ const { getByText } = render(_jsx(Card, { headline: MOCK_HEADLINE, children: MOCK_BODY }));
17
17
  expect(getByText(MOCK_HEADLINE)).toBeDefined();
18
18
  expect(getByText(MOCK_BODY)).toBeDefined();
19
19
  });
@@ -39,18 +39,18 @@ const DateDisplay = ({ date: dateString }) => {
39
39
  const date = React.useMemo(() => {
40
40
  return new Date(dateString);
41
41
  }, [dateString]);
42
- return (_jsxs(Column, Object.assign({ sx: {
42
+ return (_jsxs(Column, { sx: {
43
43
  alignItems: 'center',
44
44
  justifyContent: 'center',
45
45
  p: 3,
46
46
  fontFamily: FONT.BRANDED2,
47
47
  backgroundColor: COLOR.ND_GOLD_LIGHT,
48
- } }, { children: [_jsx(Box, Object.assign({ sx: {
48
+ }, children: [_jsx(Box, { sx: {
49
49
  fontSize: FONT_SIZE.LG,
50
- } }, { children: date.getDate() })), _jsx(Box, Object.assign({ sx: {
50
+ }, children: date.getDate() }), _jsx(Box, { sx: {
51
51
  fontSize: FONT_SIZE.MD,
52
52
  mt: 1,
53
- } }, { children: MONTH_LABELS[date.getMonth()] }))] })));
53
+ }, children: MONTH_LABELS[date.getMonth()] })] }));
54
54
  };
55
55
  export const Card = ({ size, displayDate, headline, image, alt, layout, onClick, raised, truncateHeadlineAfter, heading, headlineStyles, headingStyles, headingIcon, headingAction, backgroundColor, sx, imageHeight: imageHeightProp, imageWidth: imageWidthProp, containImage, containerWidth, containerHeight, children, }) => {
56
56
  var _a;
@@ -93,25 +93,25 @@ export const Card = ({ size, displayDate, headline, image, alt, layout, onClick,
93
93
  borderColor: COLOR.ND_SKY_BLUE_DARK,
94
94
  backgroundColor: COLOR.ND_SKY_BLUE,
95
95
  }
96
- : {} }, sx) }, { children: [image && !containImage && (_jsx("img", { src: image, alt: alt, style: {
96
+ : {} }, sx), children: [image && !containImage && (_jsx("img", { src: image, alt: alt, style: {
97
97
  width: imageWidth,
98
98
  height: imageHeight,
99
- } })), image && containImage && (_jsx(Box, Object.assign({ sx: {
99
+ } })), image && containImage && (_jsx(Box, { sx: {
100
100
  width: containerWidth || '500px',
101
101
  height: containerHeight || '280px',
102
102
  backgroundColor: COLOR.ND_SKY_BLUE,
103
103
  display: 'flex',
104
104
  justifyContent: 'center',
105
105
  alignItems: 'center',
106
- } }, { children: _jsx("img", { src: image, alt: alt, style: {
106
+ }, children: _jsx("img", { src: image, alt: alt, style: {
107
107
  width: imageWidth,
108
108
  height: imageHeight,
109
109
  objectFit: objectFit,
110
- } }) }))), displayDate && _jsx(DateDisplay, { date: displayDate }), heading && (_jsxs(Row, Object.assign({ sx: Object.assign({ bg: COLOR.PRIMARY, color: COLOR.WHITE, width: '100%', px: contentPaddingX, py: 3, justifyContent: 'space-between', alignItems: 'center' }, headingStyles) }, { children: [_jsxs(Row, { children: [headingIcon && (_jsx(Icon, { icon: headingIcon, size: FONT_SIZE.LG, color: COLOR.WHITE, sx: { mr: 2 } })), _jsx(Heading, Object.assign({ size: HEADING_SIZE.SM, sx: {
110
+ } }) })), displayDate && _jsx(DateDisplay, { date: displayDate }), heading && (_jsxs(Row, { sx: Object.assign({ bg: COLOR.PRIMARY, color: COLOR.WHITE, width: '100%', px: contentPaddingX, py: 3, justifyContent: 'space-between', alignItems: 'center' }, headingStyles), children: [_jsxs(Row, { children: [headingIcon && (_jsx(Icon, { icon: headingIcon, size: FONT_SIZE.LG, color: COLOR.WHITE, sx: { mr: 2 } })), _jsx(Heading, { size: HEADING_SIZE.SM, sx: {
111
111
  color: COLOR.WHITE,
112
112
  mt: 0,
113
113
  whiteSpace: 'nowrap',
114
- } }, { children: heading }))] }), _jsx(Row, { children: headingAction && headingAction })] }))), _jsx(Row, Object.assign({ sx: { px: contentPaddingX, py: contentPaddingY } }, { children: _jsxs(Column, Object.assign({ justify: "center" }, { children: [headline && (_jsx(Heading, Object.assign({ typography: typography, sx: Object.assign({ mt: 0 }, headlineStyles) }, { children: truncateHeadlineAfter ? (_jsx(ReadMore, Object.assign({ lines: truncateHeadlineAfter, typography: typography, sx: { bg: activeBackground } }, { children: headline }))) : (headline) }))), children && (_jsx(Box, Object.assign({ sx: { mt: headline && !heading ? 2 : 0 } }, { children: typeof children === 'function'
114
+ }, children: heading })] }), _jsx(Row, { children: headingAction && headingAction })] })), _jsx(Row, { sx: { px: contentPaddingX, py: contentPaddingY }, children: _jsxs(Column, { justify: "center", children: [headline && (_jsx(Heading, { typography: typography, sx: Object.assign({ mt: 0 }, headlineStyles), children: truncateHeadlineAfter ? (_jsx(ReadMore, { lines: truncateHeadlineAfter, typography: typography, sx: { bg: activeBackground }, children: headline })) : (headline) })), children && (_jsx(Box, { sx: { mt: headline && !heading ? 2 : 0 }, children: typeof children === 'function'
115
115
  ? children({ isHovered, activeBackground })
116
- : children })))] })) }))] })));
116
+ : children }))] }) })] })));
117
117
  };
@@ -84,24 +84,24 @@ const horizontalCards = [
84
84
  headline: 'Exhibit — Printing the Nation: A Century of Irish Book Arts',
85
85
  image: 'https://images.ctfassets.net/cfblb1f7i85j/7aCd5Sm86JdtQepGBKDUfy/dcb4d97dd3a1d3ee810e8bcaa82dc715/Spring_Exhibit_2023-Rep.jpg?w=296',
86
86
  size: CARDV2_SIZE.SM,
87
- children: (_jsxs(_Fragment, { children: [_jsxs(LabelV2, Object.assign({ color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
87
+ children: (_jsxs(_Fragment, { children: [_jsxs(LabelV2, { color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
88
88
  display: 'flex',
89
- } }, { children: [_jsx(IconV2, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(LabelV2, Object.assign({ color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
89
+ }, children: [_jsx(IconV2, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] }), _jsxs(LabelV2, { color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
90
90
  display: 'flex',
91
- } }, { children: [_jsx(IconV2, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(ParagraphV2, { children: "This exhibit demonstrates the art and craft of the Irish book since 1900." })] })),
91
+ }, children: [_jsx(IconV2, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] }), _jsx(ParagraphV2, { children: "This exhibit demonstrates the art and craft of the Irish book since 1900." })] })),
92
92
  },
93
93
  {
94
94
  headline: 'One Book, One Michiana Digital Exhibit — Papers Alight: Contextualizing Mike Curato’s Flamer',
95
95
  image: 'https://images.ctfassets.net/cfblb1f7i85j/2sGpdDbNkl6MPnlem6wq1R/995c786624613b5ff07228e481996385/One.Book.2023-Rep.png?w=296',
96
96
  size: CARDV2_SIZE.SM,
97
- children: (_jsxs(_Fragment, { children: [_jsxs(LabelV2, Object.assign({ color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
97
+ children: (_jsxs(_Fragment, { children: [_jsxs(LabelV2, { color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
98
98
  display: 'flex',
99
- } }, { children: [_jsx(IconV2, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(LabelV2, Object.assign({ color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
99
+ }, children: [_jsx(IconV2, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] }), _jsxs(LabelV2, { color: COLOR.PRIMARY, size: LABELV2_SIZE.SM, sx: {
100
100
  display: 'flex',
101
- } }, { children: [_jsx(IconV2, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(ReadMoreV2, Object.assign({ typography: TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM, lines: 2 }, { children: "This online exhibition displays rare materials from Hesburgh Libraries collections that place Mike Curato\u2019s teen graphic novel into a historical and social context." }))] })),
101
+ }, children: [_jsx(IconV2, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] }), _jsx(ReadMoreV2, { typography: TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM, lines: 2, children: "This online exhibition displays rare materials from Hesburgh Libraries collections that place Mike Curato\u2019s teen graphic novel into a historical and social context." })] })),
102
102
  },
103
103
  ];
104
- const leftBadge = (_jsx(BoxV2, Object.assign({ sx: {
104
+ const leftBadge = (_jsx(BoxV2, { sx: {
105
105
  width: '40px',
106
106
  height: '40px',
107
107
  borderRadius: '50%',
@@ -109,8 +109,8 @@ const leftBadge = (_jsx(BoxV2, Object.assign({ sx: {
109
109
  alignItems: 'center',
110
110
  justifyContent: 'center',
111
111
  bg: COLOR.ND_BLUE,
112
- } }, { children: _jsx(IconV2, { icon: CollectionsBookmark, size: FONT_SIZE.MD, color: COLOR.WHITE }) })));
113
- const rightBadge = (_jsx(BoxV2, Object.assign({ sx: {
112
+ }, children: _jsx(IconV2, { icon: CollectionsBookmark, size: FONT_SIZE.MD, color: COLOR.WHITE }) }));
113
+ const rightBadge = (_jsx(BoxV2, { sx: {
114
114
  width: '40px',
115
115
  height: '40px',
116
116
  borderRadius: '4px',
@@ -121,7 +121,7 @@ const rightBadge = (_jsx(BoxV2, Object.assign({ sx: {
121
121
  borderColor: COLOR.ND_BLUE,
122
122
  borderWidth: '1px',
123
123
  borderStyle: 'solid',
124
- } }, { children: _jsx(IconV2, { icon: Bookmark, size: FONT_SIZE.MD, color: COLOR.ND_BLUE }) })));
124
+ }, children: _jsx(IconV2, { icon: Bookmark, size: FONT_SIZE.MD, color: COLOR.ND_BLUE }) }));
125
125
  export const Default = {
126
126
  render: () => (_jsx(ColumnV2, { children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({}, props, { key: i })))) })),
127
127
  args: {},
@@ -161,7 +161,7 @@ export const Raised = {
161
161
  args: {},
162
162
  };
163
163
  export const Heading = {
164
- render: () => (_jsx(ColumnV2, { children: basicCards.map((props, i) => (_createElement(CardV2, Object.assign({}, props, { key: i, heading: "Heading", headingIcon: BookmarkIcon, headingAction: _jsx(ButtonV2, Object.assign({ type: BUTTONV2_TYPE.TEXT, color: COLOR.WHITE, onClick: () => { } }, { children: "Click Me" })) })))) })),
164
+ render: () => (_jsx(ColumnV2, { children: basicCards.map((props, i) => (_createElement(CardV2, Object.assign({}, props, { key: i, heading: "Heading", headingIcon: BookmarkIcon, headingAction: _jsx(ButtonV2, { type: BUTTONV2_TYPE.TEXT, color: COLOR.WHITE, onClick: () => { }, children: "Click Me" }) })))) })),
165
165
  args: {},
166
166
  };
167
167
  export const CustomImageHeading = {
@@ -174,14 +174,14 @@ export const CustomImageHeading = {
174
174
  args: {},
175
175
  };
176
176
  export const LeftBadge = {
177
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { ml: '1.5rem' } }, { children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', leftBadge: leftBadge }, props, { key: i })))) }))),
177
+ render: () => (_jsx(ColumnV2, { sx: { ml: '1.5rem' }, children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', leftBadge: leftBadge }, props, { key: i })))) })),
178
178
  args: {},
179
179
  };
180
180
  export const RightBadge = {
181
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { ml: '1.5rem' } }, { children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', rightBadge: rightBadge }, props, { key: i })))) }))),
181
+ render: () => (_jsx(ColumnV2, { sx: { ml: '1.5rem' }, children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', rightBadge: rightBadge }, props, { key: i })))) })),
182
182
  args: {},
183
183
  };
184
184
  export const LeftAndRightBadges = {
185
- render: () => (_jsx(ColumnV2, Object.assign({ sx: { ml: '1.5rem' } }, { children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', leftBadge: leftBadge, rightBadge: rightBadge }, props, { key: i })))) }))),
185
+ render: () => (_jsx(ColumnV2, { sx: { ml: '1.5rem' }, children: headlinedCards.map((props, i) => (_createElement(CardV2, Object.assign({ containImage: true, containerHeight: '280px', leftBadge: leftBadge, rightBadge: rightBadge }, props, { key: i })))) })),
186
186
  args: {},
187
187
  };
@@ -12,7 +12,7 @@ describe('CardV2', () => {
12
12
  vi.resetAllMocks();
13
13
  });
14
14
  it('renders contents', () => {
15
- const { getByText } = render(_jsx(CardV2, Object.assign({ headline: MOCK_HEADLINE }, { children: MOCK_BODY })));
15
+ const { getByText } = render(_jsx(CardV2, { headline: MOCK_HEADLINE, children: MOCK_BODY }));
16
16
  expect(getByText(MOCK_HEADLINE)).toBeDefined();
17
17
  expect(getByText(MOCK_BODY)).toBeDefined();
18
18
  });
@@ -40,15 +40,15 @@ const DateDisplay = ({ date: dateString }) => {
40
40
  const date = React.useMemo(() => {
41
41
  return new Date(dateString);
42
42
  }, [dateString]);
43
- return (_jsxs(ColumnV2, Object.assign({ className: typeSafeStyles.dateWrapper, sx: {
43
+ return (_jsxs(ColumnV2, { className: typeSafeStyles.dateWrapper, sx: {
44
44
  fontFamily: FONT.BRANDED2,
45
45
  boxShadow: BOX_SHADOW.EMPHASIZED,
46
- } }, { children: [_jsx(BoxV2, Object.assign({ sx: {
46
+ }, children: [_jsx(BoxV2, { sx: {
47
47
  fontSize: FONT_SIZE.LG,
48
- } }, { children: date.getDate() })), _jsx(BoxV2, Object.assign({ sx: {
48
+ }, children: date.getDate() }), _jsx(BoxV2, { sx: {
49
49
  fontSize: FONT_SIZE.MD,
50
50
  marginTop: '0.25rem',
51
- } }, { children: MONTH_LABELS[date.getMonth()] }))] })));
51
+ }, children: MONTH_LABELS[date.getMonth()] })] }));
52
52
  };
53
53
  export const CardV2 = ({ size, displayDate, headline, image, alt, layout, onClick, raised, truncateHeadlineAfter, heading, headlineStyles, headingStyles, headingIcon, headingAction, backgroundColor, leftBadge, rightBadge, className, shouldShowHoverStyle, imageHeight: imageHeightProp, imageWidth: imageWidthProp, containImage, containerWidth, containerHeight, inlineStyles, children, }) => {
54
54
  const contentPaddingX = size === CARDV2_SIZE.SM ? 3 : 4;
@@ -77,23 +77,23 @@ export const CardV2 = ({ size, displayDate, headline, image, alt, layout, onClic
77
77
  const baseCardClass = onClick || shouldShowHoverStyle
78
78
  ? typeSafeStyles.groupCardWrapperWithHover
79
79
  : typeSafeStyles.groupCardWrapper;
80
- return (_jsxs(GroupV2, Object.assign({ type: headline || heading ? GROUPV2_TYPE.REGION : GROUPV2_TYPE.GROUP, role: onClick ? 'button' : 'group', onClick: onClick, onKeyDown: (e) => {
80
+ return (_jsxs(GroupV2, { type: headline || heading ? GROUPV2_TYPE.REGION : GROUPV2_TYPE.GROUP, role: onClick ? 'button' : 'group', onClick: onClick, onKeyDown: (e) => {
81
81
  if (onClick && e.key === KEY_CODES.ENTER) {
82
82
  onClick();
83
83
  }
84
- }, tabIndex: onClick ? 0 : undefined, className: clsx(baseCardClass, className), sx: Object.assign({ boxShadow: raised || heading ? BOX_SHADOW.NORMAL : undefined, width: !isVertical && '100%', backgroundColor: backgroundColor ? backgroundColor : '', flexDirection: layout === CARDV2_LAYOUT.HORIZONTAL ? 'row' : 'column' }, inlineStyles) }, { children: [leftBadge && (_jsx(BoxV2, Object.assign({ className: typeSafeStyles.leftBadge }, { children: leftBadge }))), rightBadge && (_jsx(BoxV2, Object.assign({ className: typeSafeStyles.rightBadge }, { children: rightBadge }))), image && !containImage && (_jsx("img", { src: image, alt: alt, style: {
84
+ }, tabIndex: onClick ? 0 : undefined, className: clsx(baseCardClass, className), sx: Object.assign({ boxShadow: raised || heading ? BOX_SHADOW.NORMAL : undefined, width: !isVertical && '100%', backgroundColor: backgroundColor ? backgroundColor : '', flexDirection: layout === CARDV2_LAYOUT.HORIZONTAL ? 'row' : 'column' }, inlineStyles), children: [leftBadge && (_jsx(BoxV2, { className: typeSafeStyles.leftBadge, children: leftBadge })), rightBadge && (_jsx(BoxV2, { className: typeSafeStyles.rightBadge, children: rightBadge })), image && !containImage && (_jsx("img", { src: image, alt: alt, style: {
85
85
  width: imageWidth,
86
86
  height: imageHeight,
87
- } })), image && containImage && (_jsx(BoxV2, Object.assign({ className: typeSafeStyles.containImageContainer, sx: {
87
+ } })), image && containImage && (_jsx(BoxV2, { className: typeSafeStyles.containImageContainer, sx: {
88
88
  width: containerWidth ? containerWidth : '',
89
89
  height: containerHeight ? containerHeight : '',
90
- } }, { children: _jsx("img", { src: image, alt: alt, style: {
90
+ }, children: _jsx("img", { src: image, alt: alt, style: {
91
91
  width: imageWidth,
92
92
  height: imageHeight,
93
93
  objectFit: objectFit,
94
- } }) }))), displayDate && _jsx(DateDisplay, { date: displayDate }), heading && (_jsxs(RowV2, Object.assign({ className: typeSafeStyles.headingOuterWrapper, sx: Object.assign({}, headingStyles) }, { children: [_jsxs(RowV2, Object.assign({ align: "center", sx: { px: contentPaddingX } }, { children: [headingIcon && (_jsx(IconV2, { icon: headingIcon, size: FONT_SIZE.LG, color: COLOR.WHITE, className: typeSafeStyles.icon })), _jsx(HeadingV2, Object.assign({ size: HEADINGV2_SIZE.SM, className: typeSafeStyles.heading, sx: {
94
+ } }) })), displayDate && _jsx(DateDisplay, { date: displayDate }), heading && (_jsxs(RowV2, { className: typeSafeStyles.headingOuterWrapper, sx: Object.assign({}, headingStyles), children: [_jsxs(RowV2, { align: "center", sx: { px: contentPaddingX }, children: [headingIcon && (_jsx(IconV2, { icon: headingIcon, size: FONT_SIZE.LG, color: COLOR.WHITE, className: typeSafeStyles.icon })), _jsx(HeadingV2, { size: HEADINGV2_SIZE.SM, className: typeSafeStyles.heading, sx: {
95
95
  mt: 0,
96
- } }, { children: heading }))] })), _jsx(RowV2, Object.assign({ align: "center", sx: { px: contentPaddingX } }, { children: headingAction && headingAction }))] }))), _jsx(RowV2, Object.assign({ sx: { px: contentPaddingX, py: contentPaddingY } }, { children: _jsxs(ColumnV2, Object.assign({ justify: "center" }, { children: [headline && (_jsx(HeadingV2, Object.assign({ typography: typography, sx: Object.assign({ mt: 0, display: '-webkit-box', WebkitBoxOrient: 'vertical', overflow: 'hidden', WebkitLineClamp: truncateHeadlineAfter
96
+ }, children: heading })] }), _jsx(RowV2, { align: "center", sx: { px: contentPaddingX }, children: headingAction && headingAction })] })), _jsx(RowV2, { sx: { px: contentPaddingX, py: contentPaddingY }, children: _jsxs(ColumnV2, { justify: "center", children: [headline && (_jsx(HeadingV2, { typography: typography, sx: Object.assign({ mt: 0, display: '-webkit-box', WebkitBoxOrient: 'vertical', overflow: 'hidden', WebkitLineClamp: truncateHeadlineAfter
97
97
  ? truncateHeadlineAfter
98
- : 0 }, headlineStyles) }, { children: headline }))), children && (_jsx(BoxV2, Object.assign({ sx: { mt: headline && !heading ? 2 : 0 } }, { children: children })))] })) }))] })));
98
+ : 0 }, headlineStyles), children: headline })), children && (_jsx(BoxV2, { sx: { mt: headline && !heading ? 2 : 0 }, children: children }))] }) })] }));
99
99
  };
@@ -12,7 +12,7 @@ describe('DragDropList component', () => {
12
12
  expect(container).toBeInTheDocument();
13
13
  });
14
14
  it('should render items correctly', () => {
15
- const { getByText } = render(_jsx(DragDropList, { items: items, onReorder: () => { }, children: ({ item }) => _jsx("div", { children: item.accessibleLabel }) }));
15
+ const { getByText } = render(_jsx(DragDropList, { items: items, onReorder: () => { }, children: ({ item }) => (_jsx("div", { children: item.accessibleLabel })) }));
16
16
  items.forEach((item) => {
17
17
  expect(getByText(item.accessibleLabel)).toBeInTheDocument();
18
18
  });
@@ -1,7 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { DragDropList } from './index';
3
- declare const meta: Meta<typeof DragDropList>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
- type Story = StoryObj<typeof DragDropList>;
4
+ type Story = StoryObj;
6
5
  export declare const Default: Story;
7
6
  export declare const Disabled: Story;
@@ -27,8 +27,8 @@ const StateManager = ({ children }) => {
27
27
  return _jsx(_Fragment, { children: children({ items, setItems }) });
28
28
  };
29
29
  export const Default = {
30
- render: () => (_jsx(StateManager, { children: ({ items, setItems }) => (_jsx(DragDropList, Object.assign({ items: items, onReorder: ({ reorderedList }) => setItems(reorderedList) }, { children: ({ item }) => (_jsx(_Fragment, { children: _jsx(Paragraph, Object.assign({ sx: { ml: 2 } }, { children: item.label })) })) }))) })),
30
+ render: () => (_jsx(StateManager, { children: ({ items, setItems }) => (_jsx(DragDropList, { items: items, onReorder: ({ reorderedList }) => setItems(reorderedList), children: ({ item }) => (_jsx(_Fragment, { children: _jsx(Paragraph, { sx: { ml: 2 }, children: item.label }) })) })) })),
31
31
  };
32
32
  export const Disabled = {
33
- render: () => (_jsx(DragDropList, Object.assign({ disabled: true, items: _items, onReorder: () => { } }, { children: ({ item }) => (_jsxs(_Fragment, { children: [_jsx(DragHandle, {}), _jsx(Paragraph, Object.assign({ sx: { ml: 2 } }, { children: item.label }))] })) }))),
33
+ render: () => (_jsx(DragDropList, { disabled: true, items: _items, onReorder: () => { }, children: ({ item }) => (_jsxs(_Fragment, { children: [_jsx(DragHandle, {}), _jsx(Paragraph, { sx: { ml: 2 }, children: item.label })] })) })),
34
34
  };
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { DropResult } from 'react-beautiful-dnd';
1
+ import { DropResult } from '@hello-pangea/dnd';
3
2
  import { StylesProp } from '../../../theme';
4
3
  import { ButtonProps } from '../../elements/Button';
5
4
  type DraggableItem = {
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { DragDropContext, Droppable, Draggable, } from 'react-beautiful-dnd';
13
+ import { DragDropContext, Droppable, Draggable, } from '@hello-pangea/dnd';
14
14
  import _DragIndicator from '@mui/icons-material/DragIndicator';
15
15
  import { BUTTON_TYPE, Button } from '../../elements/Button';
16
16
  import { Column } from '../../elements/layout/Column';
@@ -24,7 +24,7 @@ export const DragHandle = (_a) => {
24
24
  };
25
25
  export function DragDropList({ items, itemIdKey = 'id', wrapperStyles, itemStyles, children: renderChild, onReorder, disabled, }) {
26
26
  const id = useUniqueId('dnd-list');
27
- return (_jsx(DragDropContext, Object.assign({ onDragStart: (start, provided) => {
27
+ return (_jsx(DragDropContext, { onDragStart: (start, provided) => {
28
28
  const selectedItem = items.find((item) => String(item[itemIdKey]) === start.draggableId);
29
29
  provided.announce(`Selected item: ${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.accessibleLabel}`);
30
30
  }, onDragEnd: (e) => {
@@ -39,10 +39,10 @@ export function DragDropList({ items, itemIdKey = 'id', wrapperStyles, itemStyle
39
39
  dropEvent: e,
40
40
  });
41
41
  }
42
- } }, { children: _jsx(Droppable, Object.assign({ droppableId: id }, { children: (droppable) => (_jsx(Column, Object.assign({}, droppable.droppableProps, { sx: wrapperStyles, ref: droppable.innerRef }, { children: _jsxs(_Fragment, { children: [items.map((item, index) => (_jsx(Draggable, Object.assign({ draggableId: String(item[itemIdKey]), isDragDisabled: disabled, index: index }, { children: (draggable) => {
42
+ }, children: _jsx(Droppable, { droppableId: id, children: (droppable) => (_jsx(Column, Object.assign({}, droppable.droppableProps, { sx: wrapperStyles, ref: droppable.innerRef, children: _jsxs(_Fragment, { children: [items.map((item, index) => (_jsx(Draggable, { draggableId: String(item[itemIdKey]), isDragDisabled: disabled, index: index, children: (draggable) => {
43
43
  return (_jsx(Row, Object.assign({ sx: {
44
44
  alignItems: 'center',
45
45
  itemStyles,
46
- }, ref: draggable.innerRef }, draggable.draggableProps, draggable.dragHandleProps, { "aria-describedby": `item-${index}` }, { children: _jsx(Row, Object.assign({ sx: { mt: 1 }, id: `item-${index}` }, { children: renderChild({ item, index }) })) })));
47
- } }), String(item[itemIdKey])))), droppable.placeholder] }) }))) })) })));
46
+ }, ref: draggable.innerRef }, draggable.draggableProps, draggable.dragHandleProps, { "aria-describedby": `item-${index}`, children: _jsx(Row, { sx: { mt: 1 }, id: `item-${index}`, children: renderChild({ item, index }) }) })));
47
+ } }, String(item[itemIdKey])))), droppable.placeholder] }) }))) }) }));
48
48
  }
@@ -17,11 +17,11 @@ const options = [
17
17
  { value: 'https://facebook.com', label: 'This is intentionally long' },
18
18
  ];
19
19
  export const Default = {
20
- render: () => (_jsx(Box, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownLinks, Object.assign({ options: options }, { children: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Links" }))) })) }))),
20
+ render: () => (_jsx(Box, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownLinks, { options: options, children: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Links" }))) }) })),
21
21
  };
22
22
  export const Right = {
23
- render: () => (_jsx(Row, Object.assign({ sx: { width: '90vw', height: '200px' }, justify: "flex-end" }, { children: _jsx(DropdownLinks, Object.assign({ options: options }, { children: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Links" }))) })) }))),
23
+ render: () => (_jsx(Row, { sx: { width: '90vw', height: '200px' }, justify: "flex-end", children: _jsx(DropdownLinks, { options: options, children: ({ anchorProps }) => (_jsx(Button, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Links" }))) }) })),
24
24
  };
25
25
  export const OpenInNewTab = {
26
- render: () => (_jsx(Box, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownLinks, Object.assign({ options: options, openNewTab: true }, { children: ({ anchorProps }) => _jsx(Button, Object.assign({}, anchorProps, { children: "Links" })) })) }))),
26
+ render: () => (_jsx(Box, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownLinks, { options: options, openNewTab: true, children: ({ anchorProps }) => _jsx(Button, Object.assign({}, anchorProps, { children: "Links" })) }) })),
27
27
  };
@@ -7,7 +7,7 @@ const options = [
7
7
  { value: 'https://google.com', label: 'Google' },
8
8
  { value: 'https://facebook.com', label: 'Facebook' },
9
9
  ];
10
- const DropdownExample = (_jsx(DropdownLinks, Object.assign({ options: options }, { children: ({ anchorProps }) => _jsx(Button, Object.assign({}, anchorProps, { children: "Links" })) })));
10
+ const DropdownExample = (_jsx(DropdownLinks, { options: options, children: ({ anchorProps }) => _jsx(Button, Object.assign({}, anchorProps, { children: "Links" })) }));
11
11
  describe('DropdownLinks', () => {
12
12
  it('toggle links when button is clicked', () => {
13
13
  const { getByRole, getAllByRole } = render(DropdownExample);
@@ -7,9 +7,9 @@ export const DropdownLinks = ({ children, options: optionsParam, renderOption: r
7
7
  const { navigate } = useComponentConfig().link;
8
8
  const renderOption = renderOptionParam
9
9
  ? renderOptionParam
10
- : (params) => (_jsx(Link, Object.assign({ to: params.option.value, target: openNewTab ? '_blank' : undefined, onClick: (e) => {
10
+ : (params) => (_jsx(Link, { to: params.option.value, target: openNewTab ? '_blank' : undefined, onClick: (e) => {
11
11
  e.preventDefault();
12
- } }, { children: params.option.label })));
12
+ }, children: params.option.label }));
13
13
  return (_jsx(Dropdown, { shouldRenderDropdownContainer: false, renderAnchor: children, renderDropdown: ({ ref, styles, id, setIsOpen }) => {
14
14
  const options = optionsParam.map((option) => (Object.assign(Object.assign({}, option), { onClick: () => {
15
15
  if (option.onClick) {
@@ -17,11 +17,11 @@ const options = [
17
17
  { value: 'https://facebook.com', label: 'This is intentionally long' },
18
18
  ];
19
19
  export const Default = {
20
- render: () => (_jsx(BoxV2, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownLinksV2, Object.assign({ options: options }, { children: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Links" }))) })) }))),
20
+ render: () => (_jsx(BoxV2, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownLinksV2, { options: options, children: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Links" }))) }) })),
21
21
  };
22
22
  export const Right = {
23
- render: () => (_jsx(RowV2, Object.assign({ sx: { width: '90vw', height: '200px' }, justify: "flex-end" }, { children: _jsx(DropdownLinksV2, Object.assign({ options: options }, { children: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon }, { children: "Links" }))) })) }))),
23
+ render: () => (_jsx(RowV2, { sx: { width: '90vw', height: '200px' }, justify: "flex-end", children: _jsx(DropdownLinksV2, { options: options, children: ({ anchorProps }) => (_jsx(ButtonV2, Object.assign({}, anchorProps, { rightIcon: ArrowDropDownIcon, children: "Links" }))) }) })),
24
24
  };
25
25
  export const OpenInNewTab = {
26
- render: () => (_jsx(BoxV2, Object.assign({ sx: { width: '200px', height: '200px' } }, { children: _jsx(DropdownLinksV2, Object.assign({ options: options, openNewTab: true }, { children: ({ anchorProps }) => _jsx(ButtonV2, Object.assign({}, anchorProps, { children: "Links" })) })) }))),
26
+ render: () => (_jsx(BoxV2, { sx: { width: '200px', height: '200px' }, children: _jsx(DropdownLinksV2, { options: options, openNewTab: true, children: ({ anchorProps }) => _jsx(ButtonV2, Object.assign({}, anchorProps, { children: "Links" })) }) })),
27
27
  };
@@ -6,9 +6,9 @@ export const DropdownLinksV2 = ({ children, options: optionsParam, renderOption:
6
6
  const { navigate } = useComponentConfigV2().link;
7
7
  const renderOption = renderOptionParam
8
8
  ? renderOptionParam
9
- : (params) => (_jsx("a", Object.assign({ href: params.option.value, target: openNewTab ? '_blank' : undefined, style: { textDecoration: 'none', fontWeight: 700 }, onClick: (e) => {
9
+ : (params) => (_jsx("a", { href: params.option.value, target: openNewTab ? '_blank' : undefined, style: { textDecoration: 'none', fontWeight: 700 }, onClick: (e) => {
10
10
  e.preventDefault();
11
- } }, { children: params.option.label })));
11
+ }, children: params.option.label }));
12
12
  return (_jsx(DropdownV2, { shouldRenderDropdownContainer: false, renderAnchor: children, renderDropdown: ({ ref, styles, id, setIsOpen }) => {
13
13
  const options = optionsParam.map((option) => (Object.assign(Object.assign({}, option), { onClick: () => {
14
14
  if (option.onClick) {
@@ -24,7 +24,7 @@ export const CustomMessage = {
24
24
  args: {},
25
25
  };
26
26
  export const JsxMessage = {
27
- render: () => (_jsxs(EmptyState, { children: ["Something is wrong.", ' ', _jsx(Link, Object.assign({ to: "/", sx: { fontSize: FONT_SIZE.MD } }, { children: "Click here to fix." }))] })),
27
+ render: () => (_jsxs(EmptyState, { children: ["Something is wrong.", ' ', _jsx(Link, { to: "/", sx: { fontSize: FONT_SIZE.MD }, children: "Click here to fix." })] })),
28
28
  args: {},
29
29
  };
30
30
  export const CustomIcon = {
@@ -28,8 +28,8 @@ export const DEFAULT_MESSAGE = 'No results found.';
28
28
  export const EmptyState = (_a) => {
29
29
  var { omitIcon, icon, children, size: sizeProp, sx } = _a, rest = __rest(_a, ["omitIcon", "icon", "children", "size", "sx"]);
30
30
  const size = sizeProp || EMPTY_STATE_SIZE.LG;
31
- return (_jsxs(Column, Object.assign({ sx: Object.assign({ width: '100%', alignItems: 'center', justifyContent: 'center', mt: size === EMPTY_STATE_SIZE.SM ? 3 : 5 }, sx) }, rest, { children: [_jsx(Row, { children: omitIcon ? null : (_jsx(Icon, { icon: icon || SearchOffIcon, size: size === EMPTY_STATE_SIZE.SM ? FONT_SIZE.ML : FONT_SIZE.XL, color: COLOR.GRAY })) }), _jsx(Row, Object.assign({ sx: { mt: size === EMPTY_STATE_SIZE.SM ? 0 : 1 } }, { children: _jsx(Paragraph, Object.assign({ sx: {
31
+ return (_jsxs(Column, Object.assign({ sx: Object.assign({ width: '100%', alignItems: 'center', justifyContent: 'center', mt: size === EMPTY_STATE_SIZE.SM ? 3 : 5 }, sx) }, rest, { children: [_jsx(Row, { children: omitIcon ? null : (_jsx(Icon, { icon: icon || SearchOffIcon, size: size === EMPTY_STATE_SIZE.SM ? FONT_SIZE.ML : FONT_SIZE.XL, color: COLOR.GRAY })) }), _jsx(Row, { sx: { mt: size === EMPTY_STATE_SIZE.SM ? 0 : 1 }, children: _jsx(Paragraph, { sx: {
32
32
  color: COLOR.GRAY,
33
33
  mt: 0,
34
- }, size: size === EMPTY_STATE_SIZE.SM ? PARAGRAPH_SIZE.MD : PARAGRAPH_SIZE.LG }, { children: children || DEFAULT_MESSAGE })) }))] })));
34
+ }, size: size === EMPTY_STATE_SIZE.SM ? PARAGRAPH_SIZE.MD : PARAGRAPH_SIZE.LG, children: children || DEFAULT_MESSAGE }) })] })));
35
35
  };
@@ -17,7 +17,7 @@ const ModalExample = () => {
17
17
  const modalId = 'modal-example';
18
18
  const { open, close, state } = useDialog(modalId);
19
19
  const theme = useTheme();
20
- return (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ onClick: open, sx: { position: 'relative', zIndex: (_a = theme.zIndex) === null || _a === void 0 ? void 0 : _a.DIALOG } }, { children: "Open Modal" })), _jsx(Modal, Object.assign({ isOpen: state.isOpen, heading: "Heading", close: close, actions: [
20
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: open, sx: { position: 'relative', zIndex: (_a = theme.zIndex) === null || _a === void 0 ? void 0 : _a.DIALOG }, children: "Open Modal" }), _jsx(Modal, { isOpen: state.isOpen, heading: "Heading", close: close, actions: [
21
21
  {
22
22
  label: 'Secondary',
23
23
  isPrimary: false,
@@ -35,7 +35,7 @@ const ModalExample = () => {
35
35
  isPrimary: true,
36
36
  onClick: () => { },
37
37
  },
38
- ] }, { children: _jsx(Paragraph, { children: "Modal body goes here" }) }))] }));
38
+ ], children: _jsx(Paragraph, { children: "Modal body goes here" }) })] }));
39
39
  };
40
40
  export const Default = {
41
41
  render: () => _jsx(ModalExample, {}),
@@ -10,23 +10,23 @@ describe('Modal', () => {
10
10
  { label: 'Action 2', onClick: vi.fn() },
11
11
  ];
12
12
  it('renders modal with heading and content', () => {
13
- const { getByText } = render(_jsx(Modal, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading" }, { children: _jsx("div", { children: "Modal Content" }) })));
13
+ const { getByText } = render(_jsx(Modal, { isOpen: true, close: handleClose, heading: "Test Heading", children: _jsx("div", { children: "Modal Content" }) }));
14
14
  expect(getByText('Test Heading')).toBeInTheDocument();
15
15
  expect(getByText('Modal Content')).toBeInTheDocument();
16
16
  });
17
17
  it('calls close handler when close button is clicked', () => {
18
- const { getByText } = render(_jsx(Modal, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading" }, { children: _jsx("div", { children: "Modal Content" }) })));
18
+ const { getByText } = render(_jsx(Modal, { isOpen: true, close: handleClose, heading: "Test Heading", children: _jsx("div", { children: "Modal Content" }) }));
19
19
  const closeButton = getByText('Close');
20
20
  fireEvent.click(closeButton);
21
21
  expect(handleClose).toHaveBeenCalledTimes(1);
22
22
  });
23
23
  it('renders actions correctly', () => {
24
- const { getByText } = render(_jsx(Modal, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions }, { children: _jsx("div", { children: "Modal Content" }) })));
24
+ const { getByText } = render(_jsx(Modal, { isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions, children: _jsx("div", { children: "Modal Content" }) }));
25
25
  expect(getByText('Action 1')).toBeInTheDocument();
26
26
  expect(getByText('Action 2')).toBeInTheDocument();
27
27
  });
28
28
  it('calls action handler when action button is clicked', () => {
29
- const { getByText } = render(_jsx(Modal, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions }, { children: _jsx("div", { children: "Modal Content" }) })));
29
+ const { getByText } = render(_jsx(Modal, { isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions, children: _jsx("div", { children: "Modal Content" }) }));
30
30
  const actionButton1 = getByText('Action 1');
31
31
  fireEvent.click(actionButton1);
32
32
  expect(mockActions[0].onClick).toHaveBeenCalledTimes(1);
@@ -29,19 +29,19 @@ export const Modal = (_a) => {
29
29
  const { modal } = useComponentConfig();
30
30
  const theme = useTheme();
31
31
  const shouldShowFooter = footer !== undefined || (actions !== undefined && actions.length > 0);
32
- const modalBody = (_jsxs(Group, Object.assign({ type: GROUP_TYPE.REGION, sx: { my: 0 } }, { children: [!hideHeading && (_jsxs(Row, Object.assign({ justify: "space-between", align: "center", sx: {
32
+ const modalBody = (_jsxs(Group, { type: GROUP_TYPE.REGION, sx: { my: 0 }, children: [!hideHeading && (_jsxs(Row, { justify: "space-between", align: "center", sx: {
33
33
  p: 3,
34
34
  borderBottom: 'solid 1px',
35
35
  borderColor: COLOR.LIGHT_GRAY,
36
- } }, { children: [_jsx(Heading, Object.assign({ size: HEADING_SIZE.SM, typography: TYPOGRAPHY_TYPE.CONTROL_MEDIUM, sx: { mt: 0 } }, { children: heading })), _jsx(Button, Object.assign({ type: BUTTON_TYPE.TEXT, onClick: (e) => {
36
+ }, children: [_jsx(Heading, { size: HEADING_SIZE.SM, typography: TYPOGRAPHY_TYPE.CONTROL_MEDIUM, sx: { mt: 0 }, children: heading }), _jsx(Button, { type: BUTTON_TYPE.TEXT, onClick: (e) => {
37
37
  e.preventDefault();
38
38
  e.stopPropagation();
39
39
  close(e);
40
- } }, { children: "Close" }))] }))), _jsx(Row, Object.assign({ sx: Object.assign({ p: 3 }, bodyStyles) }, { children: children })), shouldShowFooter && (_jsxs(Row, Object.assign({ sx: { borderTop: 'solid 1px', borderColor: COLOR.LIGHT_GRAY, p: 3 } }, { children: [footer, actions !== undefined && (_jsx(Row, Object.assign({ sx: { width: '100%', justifyContent: 'flex-end' } }, { children: actions.map((action, index) => (_jsx(Button, Object.assign({ type: action.isPrimary ? BUTTON_TYPE.DEFAULT : BUTTON_TYPE.OUTLINE, onClick: (e) => {
40
+ }, children: "Close" })] })), _jsx(Row, { sx: Object.assign({ p: 3 }, bodyStyles), children: children }), shouldShowFooter && (_jsxs(Row, { sx: { borderTop: 'solid 1px', borderColor: COLOR.LIGHT_GRAY, p: 3 }, children: [footer, actions !== undefined && (_jsx(Row, { sx: { width: '100%', justifyContent: 'flex-end' }, children: actions.map((action, index) => (_jsx(Button, Object.assign({ type: action.isPrimary ? BUTTON_TYPE.DEFAULT : BUTTON_TYPE.OUTLINE, onClick: (e) => {
41
41
  action.onClick(e);
42
42
  }, sx: {
43
43
  mr: index < actions.length - 1 ? 1 : 0,
44
- } }, action.buttonProps, { children: action.label }), index))) })))] })))] })));
44
+ } }, action.buttonProps, { children: action.label }), index))) }))] }))] }));
45
45
  return (_jsx(ReactModal, Object.assign({ isOpen: isOpen, shouldFocusAfterRender: true, appElement: modal.appElement, onRequestClose: (e) => {
46
46
  e.preventDefault();
47
47
  e.stopPropagation();
@@ -61,5 +61,5 @@ export const Modal = (_a) => {
61
61
  marginRight: '-50%',
62
62
  transform: 'translate(-50%, -50%)',
63
63
  },
64
- } }, { children: wrapWithTheme ? _jsx(ThemeProvider, { children: modalBody }) : modalBody })));
64
+ }, children: wrapWithTheme ? _jsx(ThemeProvider, { children: modalBody }) : modalBody })));
65
65
  };
@@ -15,7 +15,7 @@ export default meta;
15
15
  const ModalV2Example = () => {
16
16
  const modalId = 'modal-example';
17
17
  const { open, close, state } = useDialog(modalId);
18
- return (_jsxs(_Fragment, { children: [_jsx(ButtonV2, Object.assign({ onClick: open, sx: { position: 'relative', zIndex: Z_INDEX.DIALOG } }, { children: "Open Modal" })), _jsx(ModalV2, Object.assign({ isOpen: state.isOpen, heading: "Heading", close: close, actions: [
18
+ return (_jsxs(_Fragment, { children: [_jsx(ButtonV2, { onClick: open, sx: { position: 'relative', zIndex: Z_INDEX.DIALOG }, children: "Open Modal" }), _jsx(ModalV2, { isOpen: state.isOpen, heading: "Heading", close: close, actions: [
19
19
  {
20
20
  label: 'Secondary',
21
21
  isPrimary: false,
@@ -33,7 +33,7 @@ const ModalV2Example = () => {
33
33
  isPrimary: true,
34
34
  onClick: () => { },
35
35
  },
36
- ] }, { children: _jsx(ParagraphV2, { children: "Modal body goes here" }) }))] }));
36
+ ], children: _jsx(ParagraphV2, { children: "Modal body goes here" }) })] }));
37
37
  };
38
38
  export const Default = {
39
39
  render: () => _jsx(ModalV2Example, {}),
@@ -10,23 +10,23 @@ describe('ModalV2', () => {
10
10
  { label: 'Action 2', onClick: vi.fn() },
11
11
  ];
12
12
  it('renders modal with heading and content', () => {
13
- const { getByText } = render(_jsx(ModalV2, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading" }, { children: _jsx("div", { children: "Modal Content" }) })));
13
+ const { getByText } = render(_jsx(ModalV2, { isOpen: true, close: handleClose, heading: "Test Heading", children: _jsx("div", { children: "Modal Content" }) }));
14
14
  expect(getByText('Test Heading')).toBeInTheDocument();
15
15
  expect(getByText('Modal Content')).toBeInTheDocument();
16
16
  });
17
17
  it('calls close handler when close button is clicked', () => {
18
- const { getByText } = render(_jsx(ModalV2, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading" }, { children: _jsx("div", { children: "Modal Content" }) })));
18
+ const { getByText } = render(_jsx(ModalV2, { isOpen: true, close: handleClose, heading: "Test Heading", children: _jsx("div", { children: "Modal Content" }) }));
19
19
  const closeButton = getByText('Close');
20
20
  fireEvent.click(closeButton);
21
21
  expect(handleClose).toHaveBeenCalledTimes(1);
22
22
  });
23
23
  it('renders actions correctly', () => {
24
- const { getByText } = render(_jsx(ModalV2, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions }, { children: _jsx("div", { children: "Modal Content" }) })));
24
+ const { getByText } = render(_jsx(ModalV2, { isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions, children: _jsx("div", { children: "Modal Content" }) }));
25
25
  expect(getByText('Action 1')).toBeInTheDocument();
26
26
  expect(getByText('Action 2')).toBeInTheDocument();
27
27
  });
28
28
  it('calls action handler when action button is clicked', () => {
29
- const { getByText } = render(_jsx(ModalV2, Object.assign({ isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions }, { children: _jsx("div", { children: "Modal Content" }) })));
29
+ const { getByText } = render(_jsx(ModalV2, { isOpen: true, close: handleClose, heading: "Test Heading", actions: mockActions, children: _jsx("div", { children: "Modal Content" }) }));
30
30
  const actionButton1 = getByText('Action 1');
31
31
  fireEvent.click(actionButton1);
32
32
  expect(mockActions[0].onClick).toHaveBeenCalledTimes(1);