@dmsi/wedgekit-react 1.0.1 → 2.0.1

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 (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,173 @@
1
+ "use client";
2
+ import { jsxs as a, Fragment as N, jsx as n } from "react/jsx-runtime";
3
+ import { useState as g, useRef as $, useLayoutEffect as I, useEffect as w } from "react";
4
+ import { createPortal as j } from "react-dom";
5
+ import { NestedMenu as A } from "./NestedMenu.js";
6
+ import { MenuOption as D } from "./MenuOption.js";
7
+ import { Icon as m } from "./Icon.js";
8
+ import { Stack as k } from "./Stack.js";
9
+ import { Button as H } from "./Button.js";
10
+ import { Heading1 as L } from "./Heading.js";
11
+ import { Theme as R } from "./Theme.js";
12
+ import { useMounted as X } from "../hooks/useMounted.js";
13
+ import { useKeydown as Y } from "../hooks/useKeydown.js";
14
+ import { findDocumentRoot as K } from "../utils.js";
15
+ import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
16
+ function te({
17
+ id: c,
18
+ testid: o,
19
+ currentMenu: i,
20
+ open: r,
21
+ onClose: l,
22
+ onNavigate: h,
23
+ direction: b = "left",
24
+ footer: E,
25
+ hideFooterOnSubMenu: x = !1,
26
+ theme: C = "brand",
27
+ pinnedSubMenuEntry: M
28
+ }) {
29
+ const [s, d] = g(
30
+ null
31
+ ), [y, u] = g(0), z = X(), p = $(null), S = {
32
+ transform: r ? "translateX(0)" : b === "right" ? "translateX(100%)" : "translateX(-100%)"
33
+ };
34
+ I(() => {
35
+ r && (d(null), u(0));
36
+ }, [r]), Y(
37
+ {
38
+ ArrowUp: () => {
39
+ const e = i.subEntries?.length || 0;
40
+ e !== 0 && u((t) => t <= 0 ? e - 1 : t - 1);
41
+ },
42
+ ArrowDown: () => {
43
+ const e = i.subEntries?.length || 0;
44
+ e !== 0 && u((t) => t >= e - 1 ? 0 : t + 1);
45
+ },
46
+ "Enter/Space": () => {
47
+ const e = (i.subEntries || [])[y];
48
+ e && f(
49
+ e,
50
+ e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
51
+ );
52
+ }
53
+ },
54
+ r && !s
55
+ ), w(() => {
56
+ if (!r) return;
57
+ const e = window.scrollY, t = document.body;
58
+ return t.style.position = "fixed", t.style.top = `-${e}px`, t.style.left = "0", t.style.right = "0", t.style.overflow = "hidden", t.style.width = "100%", () => {
59
+ t.style.position = "", t.style.top = "", t.style.left = "", t.style.right = "", t.style.overflow = "", t.style.width = "", window.scrollTo(0, e);
60
+ };
61
+ }, [r]), w(() => {
62
+ const e = (t) => {
63
+ t.key === "Escape" && l();
64
+ };
65
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
66
+ }, [l]);
67
+ function f(e, t) {
68
+ if (!e) {
69
+ d(null);
70
+ return;
71
+ }
72
+ if (e.subEntries?.length && t !== "onClick") {
73
+ d(e);
74
+ return;
75
+ }
76
+ if (e.onClick && t === "onClick") {
77
+ h?.(e), e.onClick();
78
+ return;
79
+ }
80
+ e.url && (h?.(e), l());
81
+ }
82
+ return z ? j(
83
+ /* @__PURE__ */ a(N, { children: [
84
+ /* @__PURE__ */ n(
85
+ "div",
86
+ {
87
+ className: v(
88
+ "fixed inset-0 z-40 bg-black/50",
89
+ "transition-opacity duration-300",
90
+ r ? "opacity-100" : "opacity-0 pointer-events-none"
91
+ ),
92
+ onClick: l,
93
+ "aria-hidden": "true"
94
+ }
95
+ ),
96
+ /* @__PURE__ */ a(
97
+ "div",
98
+ {
99
+ id: c,
100
+ "data-testid": o,
101
+ ref: p,
102
+ role: "dialog",
103
+ "aria-modal": "true",
104
+ className: v(
105
+ "fixed top-0 z-50 h-dvh w-full max-w-sm flex flex-col",
106
+ "bg-background-grouped-primary-normal overflow-hidden",
107
+ "transition-transform duration-300 ease-in-out",
108
+ b === "right" ? "right-0" : "left-0"
109
+ ),
110
+ style: S,
111
+ children: [
112
+ /* @__PURE__ */ n(R, { theme: C, children: /* @__PURE__ */ a(
113
+ k,
114
+ {
115
+ horizontal: !0,
116
+ horizontalMobile: !0,
117
+ padding: !0,
118
+ sizing: "layout",
119
+ items: "center",
120
+ justify: "between",
121
+ backgroundColor: "background-primary-normal",
122
+ children: [
123
+ /* @__PURE__ */ n(L, { color: "text-primary-normal", children: s?.label ?? i.label }),
124
+ /* @__PURE__ */ n(
125
+ H,
126
+ {
127
+ id: c ? `${c}-close-button` : void 0,
128
+ testid: o ? `${o}-close-button` : void 0,
129
+ iconOnly: !0,
130
+ leftIcon: /* @__PURE__ */ n(m, { className: "icon", name: "close", size: 24 }),
131
+ variant: "tertiary",
132
+ onClick: l
133
+ }
134
+ )
135
+ ]
136
+ }
137
+ ) }),
138
+ /* @__PURE__ */ a(k, { justify: "between", overflowY: "auto", grow: !0, children: [
139
+ /* @__PURE__ */ n("div", { className: "my-4", children: s ? /* @__PURE__ */ n(
140
+ A,
141
+ {
142
+ testid: o ? `${o}-nested-menu` : void 0,
143
+ currentMenu: s,
144
+ onMenuClick: f,
145
+ pinnedEntry: M
146
+ }
147
+ ) : (i.subEntries ?? []).map((e, t) => /* @__PURE__ */ n(
148
+ D,
149
+ {
150
+ testid: o ? `${o}-${e.id}` : void 0,
151
+ selected: y === t,
152
+ onClick: () => f(
153
+ e,
154
+ e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
155
+ ),
156
+ before: e.icon ? /* @__PURE__ */ n(m, { name: e.icon }) : void 0,
157
+ after: e.subEntries?.length ? /* @__PURE__ */ n(m, { name: "chevron_right", className: "icon", size: 24 }) : void 0,
158
+ children: e.label
159
+ },
160
+ e.id
161
+ )) }),
162
+ (!x || !s) && E
163
+ ] })
164
+ ]
165
+ }
166
+ )
167
+ ] }),
168
+ K(p.current)
169
+ ) : null;
170
+ }
171
+ export {
172
+ te as MobileNavMenu
173
+ };
@@ -14,7 +14,6 @@ type ModalProps = PropsWithChildren<{
14
14
  headerIcon?: React.ReactNode;
15
15
  headerIconAlign?: "left" | "center" | "right";
16
16
  headerIconClassname?: string;
17
- fixedHeightScrolling?: boolean;
18
17
  customActions?: React.ReactNode;
19
18
  headerClassname?: string;
20
19
  backgroundColor?: string;
@@ -25,6 +24,6 @@ type ModalProps = PropsWithChildren<{
25
24
  }>;
26
25
  mobileButtonStack?: boolean;
27
26
  }>;
28
- export declare function Modal({ id, testid, title, open, size, className, children, onClose, onContinue, closeOnBackdropClick, showButtons, hideCloseIcon, headerIcon, headerIconAlign, headerIconClassname, fixedHeightScrolling, customActions, headerClassname, customFooter, noWrapper, titleAs: TitleComponent, mobileButtonStack, }: ModalProps): import('react').ReactPortal | null;
27
+ export declare function Modal({ id, testid, title, open, size, className, children, onClose, onContinue, closeOnBackdropClick, showButtons, hideCloseIcon, headerIcon, headerIconAlign, headerIconClassname, customActions, headerClassname, customFooter, noWrapper, titleAs: TitleComponent, mobileButtonStack, }: ModalProps): import('react').ReactPortal | null;
29
28
  export {};
30
29
  //# sourceMappingURL=Modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAkC,MAAM,OAAO,CAAC;AAW1E,KAAK,UAAU,GAAG,iBAAiB,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC,CAAC;AA+EH,wBAAgB,KAAK,CAAC,EACpB,EAAE,EACF,MAAM,EACN,KAAK,EACL,IAAY,EACZ,IAAc,EACd,SAAS,EACT,QAAQ,EACR,OAAO,EACP,UAAU,EACV,oBAA2B,EAC3B,WAAmB,EACnB,aAAqB,EACrB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,oBAA4B,EAC5B,aAAa,EACb,eAAe,EACf,YAAY,EACZ,SAAS,EACT,OAAO,EAAE,cAAc,EACvB,iBAAyB,GAC1B,EAAE,UAAU,sCAgLZ"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAkC,MAAM,OAAO,CAAC;AAU1E,KAAK,UAAU,GAAG,iBAAiB,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC,CAAC;AA+EH,wBAAgB,KAAK,CAAC,EACpB,EAAE,EACF,MAAM,EACN,KAAK,EACL,IAAY,EACZ,IAAc,EACd,SAAS,EACT,QAAQ,EACR,OAAO,EACP,UAAU,EACV,oBAA2B,EAC3B,WAAmB,EACnB,aAAqB,EACrB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,SAAS,EACT,OAAO,EAAE,cAAc,EACvB,iBAAyB,GAC1B,EAAE,UAAU,sCA0KZ"}
@@ -0,0 +1,201 @@
1
+ "use client";
2
+ import { jsx as m, jsxs as I } from "react/jsx-runtime";
3
+ import { clsx as L } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useRef as x, useEffect as w, useCallback as y } from "react";
5
+ import { ModalHeader as O } from "./ModalHeader.js";
6
+ import { ModalContent as Y } from "./ModalContent.js";
7
+ import { ModalButtons as K } from "./ModalButtons.js";
8
+ import { ModalScrim as q } from "./ModalScrim.js";
9
+ import { createPortal as B } from "react-dom";
10
+ import { findDocumentRoot as G } from "../utils.js";
11
+ import { useMounted as J } from "../hooks/useMounted.js";
12
+ import N from "../node_modules/react-use/esm/usePrevious.js";
13
+ const Q = (e, t = 300) => e.animate(
14
+ [
15
+ { opacity: 0, transform: "scale(0.95)" },
16
+ { opacity: 1, transform: "scale(1)" }
17
+ ],
18
+ {
19
+ duration: t,
20
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
21
+ fill: "both"
22
+ }
23
+ ), U = (e, t = 200) => e.animate(
24
+ [
25
+ { opacity: 1, transform: "scale(1)" },
26
+ { opacity: 0, transform: "scale(0.95)" }
27
+ ],
28
+ {
29
+ duration: t,
30
+ easing: "ease-in-out",
31
+ fill: "both"
32
+ }
33
+ ), V = (e, t = 300) => e.animate([{ opacity: 0 }, { opacity: 1 }], {
34
+ duration: t,
35
+ easing: "cubic-bezier(0.4, 0, 0.2, 1)",
36
+ fill: "both"
37
+ }), W = (e, t = 200) => e.animate([{ opacity: 1 }, { opacity: 0 }], {
38
+ duration: t,
39
+ easing: "ease-in-out",
40
+ fill: "both"
41
+ }), X = (e, t) => {
42
+ let a = 0;
43
+ e.forEach((r) => {
44
+ r.onfinish = () => {
45
+ a += 1, a === e.length && t();
46
+ };
47
+ });
48
+ }, $ = {
49
+ small: {
50
+ sizeClass: "h-fit max-h-dvh desktop:max-w-120 rounded-sm"
51
+ },
52
+ medium: {
53
+ sizeClass: "desktop:max-w-180 w-screen desktop:h-fit h-dvh desktop:w-full max-w-240 desktop:rounded-sm"
54
+ },
55
+ large: {
56
+ sizeClass: "desktop:max-w-240 w-screen desktop:h-fit h-dvh desktop:w-full max-w-240 desktop:rounded-sm"
57
+ },
58
+ "x-large": {
59
+ sizeClass: "desktop:max-w-300 w-screen desktop:h-fit h-dvh desktop:w-full max-w-240 desktop:rounded-sm"
60
+ },
61
+ screen: {
62
+ sizeClass: "w-screen h-dvh max-w-screen !rounded-none"
63
+ }
64
+ };
65
+ function ce({
66
+ id: e,
67
+ testid: t,
68
+ title: a,
69
+ open: r = !1,
70
+ size: l = "small",
71
+ className: g,
72
+ children: u,
73
+ onClose: n,
74
+ onContinue: M,
75
+ closeOnBackdropClick: v = !0,
76
+ showButtons: z = !1,
77
+ hideCloseIcon: C = !1,
78
+ headerIcon: A,
79
+ headerIconAlign: E,
80
+ headerIconClassname: P,
81
+ customActions: k,
82
+ headerClassname: R,
83
+ customFooter: D,
84
+ noWrapper: F,
85
+ titleAs: S,
86
+ mobileButtonStack: T = !1
87
+ }) {
88
+ const p = J(), c = x(null), i = x(null), d = N(r);
89
+ w(() => {
90
+ if (p) {
91
+ if (!c.current || !i.current) {
92
+ console.error("Modal or background reference is not set.");
93
+ return;
94
+ }
95
+ if (d !== void 0)
96
+ if (d && !r) {
97
+ const s = U(c.current), o = W(i.current);
98
+ X([s, o], () => {
99
+ n && n();
100
+ });
101
+ } else !d && r && (Q(c.current), V(i.current));
102
+ }
103
+ }, [p, n, r, d]);
104
+ const h = y(
105
+ (s) => {
106
+ s.key === "Escape" && n && (s.preventDefault(), n());
107
+ },
108
+ [n]
109
+ ), f = y(() => {
110
+ n && n();
111
+ }, [n]);
112
+ w(() => (r && document.addEventListener("keyup", h), () => {
113
+ document.removeEventListener("keyup", h);
114
+ }), [r, h]), w(() => {
115
+ if (!r) return;
116
+ const s = window.scrollY, o = document.body;
117
+ return o.style.position = "fixed", o.style.top = `-${s}px`, o.style.left = "0", o.style.right = "0", o.style.overflow = "hidden", o.style.width = "100%", () => {
118
+ o.style.position = "", o.style.top = "", o.style.left = "", o.style.right = "", o.style.overflow = "", o.style.width = "", window.scrollTo(0, s);
119
+ };
120
+ }, [r]);
121
+ const { sizeClass: j } = $[l] ?? $.small, H = y(
122
+ (s) => {
123
+ const o = s.target, b = s.currentTarget;
124
+ if (b.contains(o) && b !== o) {
125
+ s.stopPropagation();
126
+ return;
127
+ }
128
+ r && v && f();
129
+ },
130
+ [r, v, f]
131
+ );
132
+ return p ? B(
133
+ /* @__PURE__ */ m(
134
+ q,
135
+ {
136
+ id: e ? `${e}-scrim` : void 0,
137
+ testid: t ? `${t}-scrim` : void 0,
138
+ size: l,
139
+ ref: i,
140
+ show: r,
141
+ onClick: H,
142
+ children: /* @__PURE__ */ I(
143
+ "div",
144
+ {
145
+ id: e,
146
+ "data-testid": t,
147
+ ref: c,
148
+ className: L(
149
+ "shadow-md flex flex-col overflow-hidden w-full opacity-0",
150
+ l !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
151
+ g,
152
+ !g?.includes("bg-") && "bg-background-grouped-primary-normal",
153
+ j
154
+ ),
155
+ onClick: (s) => s.stopPropagation(),
156
+ children: [
157
+ /* @__PURE__ */ m(
158
+ O,
159
+ {
160
+ id: e ? `${e}-header` : void 0,
161
+ testid: t ? `${t}-header` : void 0,
162
+ title: a,
163
+ onClose: f,
164
+ hideCloseIcon: C,
165
+ headerIcon: A,
166
+ headerIconAlign: E,
167
+ headerClassname: R,
168
+ headerIconClassname: P,
169
+ titleAs: S
170
+ }
171
+ ),
172
+ u && (l !== "screen" || F) ? /* @__PURE__ */ m(
173
+ Y,
174
+ {
175
+ id: e ? `${e}-content` : void 0,
176
+ testid: t ? `${t}-content` : void 0,
177
+ children: u
178
+ }
179
+ ) : u,
180
+ z ? D ? k : /* @__PURE__ */ m(
181
+ K,
182
+ {
183
+ id: e ? `${e}-buttons` : void 0,
184
+ testid: t ? `${t}-buttons` : void 0,
185
+ onClose: f,
186
+ onContinue: M,
187
+ customActions: k,
188
+ mobileButtonStack: T
189
+ }
190
+ ) : null
191
+ ]
192
+ }
193
+ )
194
+ }
195
+ ),
196
+ G(i.current)
197
+ ) : null;
198
+ }
199
+ export {
200
+ ce as Modal
201
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ModalButtons.d.ts","sourceRoot":"","sources":["../../src/components/ModalButtons.tsx"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,EACb,EAAE,EACF,MAAM,EACN,iBAAyB,GAC1B,EAAE,iBAAiB,2CAuCnB"}
1
+ {"version":3,"file":"ModalButtons.d.ts","sourceRoot":"","sources":["../../src/components/ModalButtons.tsx"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,EACb,EAAE,EACF,MAAM,EACN,iBAAyB,GAC1B,EAAE,iBAAiB,2CAwCnB"}
@@ -0,0 +1,57 @@
1
+ import { jsx as e, jsxs as m, Fragment as s } from "react/jsx-runtime";
2
+ import { clsx as u } from "../node_modules/clsx/dist/clsx.js";
3
+ import { Button as r } from "./Button.js";
4
+ import { Icon as l } from "./Icon.js";
5
+ import { layoutPaddding as d, layoutGroupGap as f } from "../classNames.js";
6
+ function y({
7
+ onClose: a,
8
+ onContinue: i,
9
+ customActions: t,
10
+ id: o,
11
+ testid: n,
12
+ mobileButtonStack: c = !1
13
+ }) {
14
+ return /* @__PURE__ */ e(
15
+ "div",
16
+ {
17
+ id: o,
18
+ "data-testid": n,
19
+ className: u(
20
+ "border-t border-neutral-300 flex",
21
+ !t && "justify-end",
22
+ c && "flex-col",
23
+ d,
24
+ f
25
+ ),
26
+ children: t ?? /* @__PURE__ */ m(s, { children: [
27
+ /* @__PURE__ */ e(
28
+ r,
29
+ {
30
+ id: o ? `${o}-close-button` : void 0,
31
+ testid: n ? `${n}-close-button` : void 0,
32
+ variant: "secondary",
33
+ leftIcon: /* @__PURE__ */ e(l, { name: "close", size: 24 }),
34
+ onClick: a,
35
+ className: "max-sm:w-full",
36
+ children: "Close"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ e(
40
+ r,
41
+ {
42
+ id: o ? `${o}-continue-button` : void 0,
43
+ testid: n ? `${n}-continue-button` : void 0,
44
+ variant: "primary",
45
+ leftIcon: /* @__PURE__ */ e(l, { name: "check", size: 24 }),
46
+ className: "max-sm:w-full",
47
+ onClick: i,
48
+ children: "Continue"
49
+ }
50
+ )
51
+ ] })
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ y as ModalButtons
57
+ };
@@ -1,7 +1,6 @@
1
1
  export interface ModalContentProps {
2
- fixedHeightScrolling?: boolean;
3
2
  id?: string;
4
3
  testid?: string;
5
4
  }
6
- export declare function ModalContent({ fixedHeightScrolling, children, id, testid }: React.PropsWithChildren<ModalContentProps>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function ModalContent({ children, id, testid }: React.PropsWithChildren<ModalContentProps>): import("react/jsx-runtime").JSX.Element;
7
6
  //# sourceMappingURL=ModalContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../src/components/ModalContent.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,EAC3B,oBAAoB,EACpB,QAAQ,EACR,EAAE,EACF,MAAM,EACP,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,2CAc5C"}
1
+ {"version":3,"file":"ModalContent.d.ts","sourceRoot":"","sources":["../../src/components/ModalContent.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,EAAE,EACF,MAAM,EACP,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,2CAa5C"}
@@ -0,0 +1,24 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { clsx as i } from "../node_modules/clsx/dist/clsx.js";
3
+ import { layoutPaddding as m } from "../classNames.js";
4
+ function f({
5
+ children: o,
6
+ id: t,
7
+ testid: r
8
+ }) {
9
+ return /* @__PURE__ */ a(
10
+ "div",
11
+ {
12
+ id: t,
13
+ "data-testid": r,
14
+ className: i(
15
+ "flex-grow min-h-0 overflow-y-auto",
16
+ m
17
+ ),
18
+ children: o
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ f as ModalContent
24
+ };
@@ -0,0 +1,74 @@
1
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
+ import { Heading2 as y } from "./Heading.js";
3
+ import { Button as v } from "./Button.js";
4
+ import { Icon as x } from "./Icon.js";
5
+ import { layoutGroupGap as l, layoutPaddding as j } from "../classNames.js";
6
+ import { clsx as r } from "../node_modules/clsx/dist/clsx.js";
7
+ function k({
8
+ title: n,
9
+ hideCloseIcon: a,
10
+ headerIcon: c,
11
+ headerIconAlign: o,
12
+ onClose: m,
13
+ id: t,
14
+ testid: e,
15
+ headerClassname: f,
16
+ titleAs: d,
17
+ headerIconClassname: u
18
+ }) {
19
+ const p = d || y;
20
+ return /* @__PURE__ */ s(
21
+ "div",
22
+ {
23
+ id: t,
24
+ "data-testid": e,
25
+ className: r(
26
+ "flex items-center",
27
+ o === void 0 && "justify-between",
28
+ o === "center" && "justify-center",
29
+ o === "right" && "justify-end",
30
+ o === "left" && "justify-start",
31
+ j,
32
+ l,
33
+ f
34
+ ),
35
+ children: [
36
+ /* @__PURE__ */ s("div", { className: r("flex items-center flex-1", l), children: [
37
+ c,
38
+ n && /* @__PURE__ */ i(
39
+ p,
40
+ {
41
+ id: t ? `${t}-title` : void 0,
42
+ testid: e ? `${e}-title` : void 0,
43
+ as: "p",
44
+ children: n
45
+ }
46
+ )
47
+ ] }),
48
+ !a && /* @__PURE__ */ i(
49
+ v,
50
+ {
51
+ id: t ? `${t}-close-button` : void 0,
52
+ testid: e ? `${e}-close-button` : void 0,
53
+ iconOnly: !0,
54
+ variant: "tertiary",
55
+ onClick: m,
56
+ leftIcon: /* @__PURE__ */ i(
57
+ "span",
58
+ {
59
+ className: r(
60
+ "contents",
61
+ u ?? "text-icon-primary-normal"
62
+ ),
63
+ children: /* @__PURE__ */ i(x, { name: "close", size: 24 })
64
+ }
65
+ )
66
+ }
67
+ )
68
+ ]
69
+ }
70
+ );
71
+ }
72
+ export {
73
+ k as ModalHeader
74
+ };
@@ -0,0 +1,32 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { clsx as p } from "../node_modules/clsx/dist/clsx.js";
3
+ function d({
4
+ show: t = !1,
5
+ size: o = "small",
6
+ children: e,
7
+ onClick: n,
8
+ ref: i,
9
+ id: r,
10
+ testid: a
11
+ }) {
12
+ return /* @__PURE__ */ s(
13
+ "div",
14
+ {
15
+ id: r,
16
+ "data-testid": a,
17
+ className: p(
18
+ "overflow-y-auto h-dvh transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center group bg-neutral-600/50 fixed opacity-0",
19
+ !t && " pointer-events-none",
20
+ o === "small" && "p-4",
21
+ o === "screen" ? "desktop:p-0" : "desktop:p-4",
22
+ "inset-0 z-50"
23
+ ),
24
+ onMouseDown: n,
25
+ ref: i,
26
+ children: e
27
+ }
28
+ );
29
+ }
30
+ export {
31
+ d as ModalScrim
32
+ };
@@ -0,0 +1,72 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { clsx as a } from "../node_modules/clsx/dist/clsx.js";
3
+ import { Button as y } from "./Button.js";
4
+ import { Icon as u } from "./Icon.js";
5
+ function C({
6
+ id: r,
7
+ testid: e,
8
+ label: i,
9
+ onClick: c,
10
+ selected: o = !1,
11
+ className: d,
12
+ disabled: s = !1,
13
+ href: t,
14
+ ...m
15
+ }) {
16
+ const l = a(
17
+ // "!text-text-on-action-primary-hover", // use this once semantic tokens are available
18
+ "!text-brand-text-on-action-primary-hover",
19
+ // "hover:!text-text-on-action-primary-hover", // use this once semantic tokens are available
20
+ "hover:!text-brand-text-on-action-primary-hover",
21
+ // "active:!text-text-on-action-primary-active", // use this once semantic tokens are available
22
+ "active:!text-brand-text-on-action-primary-active",
23
+ "disabled:!text-brand-text-on-action-primary-disabled"
24
+ ), p = a(
25
+ "disabled:!bg-background-on-action-primary-disabled disabled:pointer-events-none"
26
+ ), b = a(
27
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
28
+ ), v = a(
29
+ "!bg-brand-200",
30
+ "hover:!bg-background-on-action-primary-normal",
31
+ // "hover:!bg-background-action-primary-normal", // use this once semantic tokens are available
32
+ "active:!bg-background-on-action-primary-active",
33
+ // "active:!bg-background-action-primary-active", // use this once semantic tokens are available
34
+ "shadow-nav-tab"
35
+ ), g = a(
36
+ "!bg-neutral-000",
37
+ "hover:!bg-background-on-action-primary-normal",
38
+ "active:!bg-background-on-action-primary-active"
39
+ ), x = {
40
+ "--color-text-on-action-primary-hover": "var(--color-brand-500)",
41
+ "--color-text-on-action-primary-active": "var(--color-brand-300)"
42
+ };
43
+ return /* @__PURE__ */ n(
44
+ y,
45
+ {
46
+ id: r,
47
+ testid: e,
48
+ variant: "tertiary-critical",
49
+ colorClassName: l,
50
+ className: a(
51
+ "!border-0 !rounded-b-none h-10 min-w-20 relative",
52
+ b,
53
+ p,
54
+ !o && v,
55
+ o && g,
56
+ d
57
+ ),
58
+ style: x,
59
+ classNameLabel: "px-1",
60
+ rightIcon: /* @__PURE__ */ n(u, { name: "close", size: 16 }),
61
+ onClick: c,
62
+ disabled: s,
63
+ ...m,
64
+ as: t ? "a" : void 0,
65
+ href: t,
66
+ children: i
67
+ }
68
+ );
69
+ }
70
+ export {
71
+ C as NavigationTab
72
+ };