@dmsi/wedgekit-react 2.0.0 → 2.0.2

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 (235) hide show
  1. package/dist/classNames.js +150 -0
  2. package/dist/components/AccessCard.js +63 -0
  3. package/dist/components/AccessCardGroup.js +73 -0
  4. package/dist/components/AccessChangerTabItem.js +51 -0
  5. package/dist/components/Accordion.js +99 -0
  6. package/dist/components/Alert.js +78 -0
  7. package/dist/components/Breadcrumbs.js +111 -0
  8. package/dist/components/Button.js +137 -0
  9. package/dist/components/CalendarRange.d.ts.map +1 -1
  10. package/dist/components/CalendarRange.js +406 -0
  11. package/dist/components/Caption.js +99 -0
  12. package/dist/components/Card.js +50 -0
  13. package/dist/components/Checkbox.js +108 -0
  14. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  15. package/dist/components/CompactImagesPreview.js +121 -0
  16. package/dist/components/ContentTab.js +68 -0
  17. package/dist/components/ContentTabs.js +96 -0
  18. package/dist/components/DMSiLogo.js +54 -0
  19. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.d.ts.map +1 -1
  20. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +28 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.d.ts.map +1 -1
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +80 -0
  23. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  24. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  25. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  26. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  27. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  28. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  29. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  30. package/dist/components/DataGrid/TableBody/index.js +161 -0
  31. package/dist/components/DataGrid/index.js +696 -0
  32. package/dist/components/DataGrid/utils.js +20 -0
  33. package/dist/components/DataGridCell.js +412 -0
  34. package/dist/components/DataTable.js +700 -0
  35. package/dist/components/DateInput.d.ts.map +1 -1
  36. package/dist/components/DateInput.js +194 -0
  37. package/dist/components/DateRangeInput.d.ts.map +1 -1
  38. package/dist/components/DateRangeInput.js +369 -0
  39. package/dist/components/DebugJson.js +28 -0
  40. package/dist/components/Display.js +46 -0
  41. package/dist/components/EditingContext.js +34 -0
  42. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  43. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  44. package/dist/components/EmblaCarousel/index.d.ts.map +1 -1
  45. package/dist/components/EmblaCarousel/index.js +154 -0
  46. package/dist/components/EmblaCarousel/usePrevNextButtons.d.ts.map +1 -1
  47. package/dist/components/EmblaCarousel/usePrevNextButtons.js +22 -0
  48. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.d.ts.map +1 -1
  49. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +16 -0
  50. package/dist/components/EmptyCartIcon.js +25 -0
  51. package/dist/components/FilterGroup.js +198 -0
  52. package/dist/components/FullViewportBox.js +19 -0
  53. package/dist/components/Grid.js +54 -0
  54. package/dist/components/Heading.js +50 -0
  55. package/dist/components/HorizontalDivider.js +20 -0
  56. package/dist/components/Icon.js +73 -0
  57. package/dist/components/ImagePlaceholder.d.ts.map +1 -1
  58. package/dist/components/ImagePlaceholder.js +23 -0
  59. package/dist/components/Input.js +469 -0
  60. package/dist/components/InputGroup.js +45 -0
  61. package/dist/components/Label.js +37 -0
  62. package/dist/components/Link.js +69 -0
  63. package/dist/components/List.js +12 -0
  64. package/dist/components/ListGroup.d.ts.map +1 -1
  65. package/dist/components/ListGroup.js +55 -0
  66. package/dist/components/LiveChatComponent.js +25 -0
  67. package/dist/components/LoadingScrim.js +22 -0
  68. package/dist/components/LogoAgilityTopBar.js +90 -0
  69. package/dist/components/LogoDMSiTopBar.js +54 -0
  70. package/dist/components/LogoMillworkTopBar.js +196 -0
  71. package/dist/components/MainBar.js +58 -0
  72. package/dist/components/MaxViewportBox.js +19 -0
  73. package/dist/components/Menu.js +202 -0
  74. package/dist/components/MenuOption.js +161 -0
  75. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  76. package/dist/components/MobileDataGrid/ColumnSelector/index.d.ts.map +1 -1
  77. package/dist/components/MobileDataGrid/ColumnSelector/index.js +101 -0
  78. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  79. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  80. package/dist/components/MobileDataGrid/GridContextProvider/index.d.ts.map +1 -1
  81. package/dist/components/MobileDataGrid/GridContextProvider/index.js +81 -0
  82. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.d.ts.map +1 -1
  83. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +12 -0
  84. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  85. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  86. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  87. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  88. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  89. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  90. package/dist/components/MobileDataGrid/index.js +78 -0
  91. package/dist/components/MobileNavMenu.js +173 -0
  92. package/dist/components/Modal.js +201 -0
  93. package/dist/components/ModalButtons.js +57 -0
  94. package/dist/components/ModalContent.js +24 -0
  95. package/dist/components/ModalHeader.js +74 -0
  96. package/dist/components/ModalScrim.js +32 -0
  97. package/dist/components/NavigationTab.js +72 -0
  98. package/dist/components/NavigationTabs.js +45 -0
  99. package/dist/components/NestedMenu.js +119 -0
  100. package/dist/components/Notification.js +91 -0
  101. package/dist/components/OptionPill.js +103 -0
  102. package/dist/components/OrderCheckIcon.js +28 -0
  103. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  104. package/dist/components/PDFViewer/PDFElement.js +77 -0
  105. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  106. package/dist/components/PDFViewer/PDFPage.js +28 -0
  107. package/dist/components/PDFViewer/index.js +124 -0
  108. package/dist/components/Pagination.js +117 -0
  109. package/dist/components/Paragraph.js +43 -0
  110. package/dist/components/Password.js +47 -0
  111. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  112. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  113. package/dist/components/ProductImagePreview/MobileImageCarousel.js +147 -0
  114. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  115. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +139 -0
  116. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  117. package/dist/components/ProductImagePreview/Thumbnail.js +47 -0
  118. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  119. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  120. package/dist/components/ProductImagePreview/index.js +190 -0
  121. package/dist/components/ProductImagePreview/useProductImagePreview.d.ts.map +1 -1
  122. package/dist/components/ProductImagePreview/useProductImagePreview.js +86 -0
  123. package/dist/components/ProjectBar.js +54 -0
  124. package/dist/components/Radio.js +113 -0
  125. package/dist/components/Search.js +89 -0
  126. package/dist/components/SearchResultImage/index.d.ts.map +1 -1
  127. package/dist/components/SearchResultImage/index.js +27 -0
  128. package/dist/components/Select.js +122 -0
  129. package/dist/components/SideMenu.js +24 -0
  130. package/dist/components/SideMenuGroup.js +80 -0
  131. package/dist/components/SideMenuItem.js +79 -0
  132. package/dist/components/SimpleTable.js +60 -0
  133. package/dist/components/SkeletonParagraph.js +24 -0
  134. package/dist/components/Spinner.js +30 -0
  135. package/dist/components/Stack.js +174 -0
  136. package/dist/components/StatusPill.js +44 -0
  137. package/dist/components/Stepper.js +138 -0
  138. package/dist/components/Subheader.js +41 -0
  139. package/dist/components/Surface.js +30 -0
  140. package/dist/components/Swatch.js +1498 -0
  141. package/dist/components/Textarea.js +106 -0
  142. package/dist/components/Theme.js +25 -0
  143. package/dist/components/Time.d.ts.map +1 -1
  144. package/dist/components/Time.js +226 -0
  145. package/dist/components/Toast.js +170 -0
  146. package/dist/components/Tooltip.js +102 -0
  147. package/dist/components/TopBar.js +119 -0
  148. package/dist/components/Upload.js +107 -0
  149. package/dist/components/WorldpayIframe.js +19 -0
  150. package/dist/hooks/useEditCell.d.ts.map +1 -1
  151. package/dist/hooks/useEditCell.js +24 -0
  152. package/dist/hooks/useInfiniteScroll.js +25 -0
  153. package/dist/hooks/useKeydown.d.ts.map +1 -1
  154. package/dist/hooks/useKeydown.js +21 -0
  155. package/dist/hooks/useMatchesMedia.d.ts.map +1 -1
  156. package/dist/hooks/useMatchesMedia.js +16 -0
  157. package/dist/hooks/useMenuSystem.js +186 -0
  158. package/dist/hooks/useMounted.js +9 -0
  159. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  160. package/dist/hooks/useTableLayout/storage.js +64 -0
  161. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  162. package/dist/index.js +249 -53839
  163. package/dist/lib/loadFonts.js +11 -0
  164. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  165. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  166. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  167. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  168. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  169. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  170. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  171. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  172. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  173. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  174. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  175. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  176. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  177. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  178. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  179. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  180. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  181. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  182. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  183. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  184. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  185. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  186. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  187. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  188. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  189. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  190. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  191. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  192. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  193. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  194. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  195. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  196. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  197. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  198. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  199. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  200. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  201. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  202. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  203. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  204. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  205. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  206. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  207. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  208. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  209. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  210. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  211. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  212. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  213. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  214. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  215. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  216. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  217. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  218. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  219. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  220. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  221. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  222. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  223. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  224. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  225. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  226. package/dist/static/no-results-image.png.js +4 -0
  227. package/dist/utils/date-patch-dashes.js +28 -0
  228. package/dist/utils/date.js +95 -0
  229. package/dist/utils/formatting.js +22 -0
  230. package/dist/utils/index.d.ts +1 -1
  231. package/dist/utils/index.js +4 -0
  232. package/dist/utils/mergeObjectArrays.js +18 -0
  233. package/dist/utils.js +20 -0
  234. package/package.json +1 -1
  235. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,119 @@
1
+ import { jsx as e, jsxs as t, Fragment as x } from "react/jsx-runtime";
2
+ import { clsx as i } from "../node_modules/clsx/dist/clsx.js";
3
+ import { gapUsingContainerPadding as g, layoutGap as s, layoutGroupGap as c, containerPaddingX as k, layoutPaddingY as v } from "../classNames.js";
4
+ import { LogoDMSiTopBar as h } from "./LogoDMSiTopBar.js";
5
+ function y({
6
+ left: d,
7
+ right: a,
8
+ topNavLinks: r,
9
+ mobileLeft: n,
10
+ mobileRight: l,
11
+ brandLogo: o = /* @__PURE__ */ e(h, {}),
12
+ id: p,
13
+ testid: m,
14
+ ...f
15
+ }) {
16
+ const u = i("bg-background-primary-normal");
17
+ return /* @__PURE__ */ t(
18
+ "div",
19
+ {
20
+ id: p,
21
+ "data-testid": m,
22
+ className: i(
23
+ "flex items-center justify-between",
24
+ k,
25
+ v,
26
+ s,
27
+ u
28
+ ),
29
+ ...f,
30
+ children: [
31
+ d && /* @__PURE__ */ e(
32
+ "div",
33
+ {
34
+ className: i(
35
+ "hidden desktop:flex items-center",
36
+ g
37
+ ),
38
+ children: d
39
+ }
40
+ ),
41
+ (a || r) && /* @__PURE__ */ t(
42
+ "div",
43
+ {
44
+ className: i(
45
+ "hidden desktop:flex items-center shrink-0 ml-auto",
46
+ "[&>a]:leading-6",
47
+ s
48
+ ),
49
+ children: [
50
+ r,
51
+ r && a && /* @__PURE__ */ e("div", { className: "h-6 border-r border-border-primary-normal" }),
52
+ a
53
+ ]
54
+ }
55
+ ),
56
+ n && /* @__PURE__ */ t(
57
+ "div",
58
+ {
59
+ className: i("flex items-center desktop:hidden", c),
60
+ children: [
61
+ n,
62
+ /* @__PURE__ */ e(
63
+ "a",
64
+ {
65
+ href: "/",
66
+ "data-testid": m ? `${m}-mobile-brand-logo-link` : "main-nav-mobile-logo",
67
+ className: "grow max-w-100 h-auto max-h-18 *:max-h-[inherit]",
68
+ children: o && o
69
+ }
70
+ )
71
+ ]
72
+ }
73
+ ),
74
+ l && /* @__PURE__ */ e(
75
+ "div",
76
+ {
77
+ className: i("flex items-center desktop:hidden", c),
78
+ children: l
79
+ }
80
+ )
81
+ ]
82
+ }
83
+ );
84
+ }
85
+ function j({
86
+ left: d,
87
+ brandLogo: a = /* @__PURE__ */ e(h, {}),
88
+ id: r,
89
+ testid: n,
90
+ brandHref: l = "/",
91
+ ...o
92
+ }) {
93
+ return /* @__PURE__ */ e(
94
+ y,
95
+ {
96
+ ...o,
97
+ id: r,
98
+ testid: n,
99
+ brandLogo: a,
100
+ left: /* @__PURE__ */ t(x, { children: [
101
+ /* @__PURE__ */ e(
102
+ "a",
103
+ {
104
+ id: r ? `${r}-brand-logo-link` : void 0,
105
+ "data-testid": n ? `${n}-brand-logo-link` : "main-nav-desktop-logo",
106
+ href: l,
107
+ className: "grow w-full h-18 *:max-h-[inherit]",
108
+ children: a && a
109
+ }
110
+ ),
111
+ d
112
+ ] })
113
+ }
114
+ );
115
+ }
116
+ export {
117
+ j as TopBar,
118
+ y as TopBarBase
119
+ };
@@ -0,0 +1,107 @@
1
+ import { jsxs as i, jsx as t, Fragment as l } from "react/jsx-runtime";
2
+ import { clsx as x } from "../node_modules/clsx/dist/clsx.js";
3
+ import { forwardRef as y } from "react";
4
+ import { componentGap as h } from "../classNames.js";
5
+ import { Icon as s } from "./Icon.js";
6
+ import { Paragraph as g } from "./Paragraph.js";
7
+ import { Button as v } from "./Button.js";
8
+ import { Stack as b } from "./Stack.js";
9
+ import { Spinner as j } from "./Spinner.js";
10
+ const B = y(
11
+ function(d, m) {
12
+ const {
13
+ isLoading: a,
14
+ style: c,
15
+ errorText: r,
16
+ text: p = "Upload your file",
17
+ value: o,
18
+ onRemove: f,
19
+ testid: e,
20
+ ...u
21
+ } = d;
22
+ return /* @__PURE__ */ i(
23
+ "label",
24
+ {
25
+ style: {
26
+ ...c
27
+ },
28
+ className: x(
29
+ "border border-dashed border-border-primary-normal",
30
+ "flex flex-col items-center justify-center",
31
+ "p-6",
32
+ "cursor-pointer",
33
+ "relative",
34
+ "w-full h-[166px] desktop:w-[340px] desktop:h-[190px]",
35
+ h
36
+ ),
37
+ "data-testid": e,
38
+ children: [
39
+ /* @__PURE__ */ t(
40
+ "input",
41
+ {
42
+ ...u,
43
+ ref: m,
44
+ type: "file",
45
+ className: "sr-only",
46
+ "data-testid": e ? `${e}-file-input` : void 0
47
+ }
48
+ ),
49
+ a && /* @__PURE__ */ t(
50
+ b,
51
+ {
52
+ centered: !0,
53
+ items: "center",
54
+ justify: "center",
55
+ sizing: "container",
56
+ padding: !0,
57
+ children: /* @__PURE__ */ t(j, { size: "large" })
58
+ }
59
+ ),
60
+ !o && !a && /* @__PURE__ */ i(l, { children: [
61
+ /* @__PURE__ */ t(
62
+ s,
63
+ {
64
+ testid: e ? `${e}-icon` : void 0,
65
+ name: "cloud_upload",
66
+ className: "text-icon-primary-normal"
67
+ }
68
+ ),
69
+ /* @__PURE__ */ t(
70
+ g,
71
+ {
72
+ testid: e ? `${e}-text` : void 0,
73
+ color: r ? "text-primary-error" : "text-secondary-normal",
74
+ children: r || p
75
+ }
76
+ )
77
+ ] }),
78
+ o && /* @__PURE__ */ i(l, { children: [
79
+ /* @__PURE__ */ t(
80
+ "img",
81
+ {
82
+ "data-testid": e ? `${e}-uploaded-image` : void 0,
83
+ src: o,
84
+ alt: "",
85
+ className: "absolute inset-0 object-contain object-center max-h-full max-w-full self-center justify-self-center"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ t("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ t(
89
+ v,
90
+ {
91
+ testid: e ? `${e}-remove-image-button` : void 0,
92
+ onClick: (n) => {
93
+ n.preventDefault(), n.stopPropagation(), f?.();
94
+ },
95
+ iconOnly: !0,
96
+ leftIcon: /* @__PURE__ */ t(s, { name: "delete" })
97
+ }
98
+ ) })
99
+ ] })
100
+ ]
101
+ }
102
+ );
103
+ }
104
+ );
105
+ export {
106
+ B as Upload
107
+ };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as l } from "react/jsx-runtime";
3
+ function r({
4
+ url: o,
5
+ testid: a
6
+ }) {
7
+ return /* @__PURE__ */ l(
8
+ "iframe",
9
+ {
10
+ "data-testid": a,
11
+ src: o,
12
+ sandbox: "allow-same-origin allow-forms allow-scripts allow-popups allow-top-navigation",
13
+ style: { width: "100%", height: "100%", flex: 1 }
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ r as WorldpayIframe
19
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"useEditCell.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditCell.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM;;;;;;;EA0B/C"}
1
+ {"version":3,"file":"useEditCell.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditCell.tsx"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM;;;;;;;EA0B/C"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { useState as n, useRef as a } from "react";
3
+ function l(o) {
4
+ const [u, s] = n(o), [i, e] = n(!1), t = a(null);
5
+ function c() {
6
+ e(!0), requestAnimationFrame(() => {
7
+ t.current?.focus();
8
+ });
9
+ }
10
+ function r() {
11
+ e(!1);
12
+ }
13
+ return {
14
+ value: u,
15
+ setValue: s,
16
+ isEdit: i,
17
+ inputRef: t,
18
+ changeToEditMode: c,
19
+ changeToViewMode: r
20
+ };
21
+ }
22
+ export {
23
+ l as useEditCell
24
+ };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { useEffect as m } from "react";
3
+ function v({
4
+ containerRef: r,
5
+ onLoadMore: e,
6
+ isLoading: l,
7
+ offset: c = 50,
8
+ enabled: o = !0
9
+ }) {
10
+ m(() => {
11
+ if (!o) return;
12
+ const n = () => {
13
+ const s = r.current;
14
+ if (!s || l) return;
15
+ const { scrollTop: i, scrollHeight: u, clientHeight: f } = s;
16
+ i + f >= u - c && e();
17
+ }, t = r.current;
18
+ return t && t.addEventListener("scroll", n), () => {
19
+ t && t.removeEventListener("scroll", n);
20
+ };
21
+ }, [r, e, l, c, o]);
22
+ }
23
+ export {
24
+ v as useInfiniteScroll
25
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"useKeydown.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeydown.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAEjD,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAChC,QAAQ,CAAC,EAAE,OAAO,GACjB,IAAI,CAkCN"}
1
+ {"version":3,"file":"useKeydown.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeydown.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAEjD,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAChC,QAAQ,CAAC,EAAE,OAAO,GACjB,IAAI,CAkCN"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { useEffect as o } from "react";
3
+ function d(r, u) {
4
+ function t(e) {
5
+ !Object.keys(r).includes(e.key) && !Object.keys(r).join("").includes("/") || Object.entries(r).forEach(([n, i]) => {
6
+ if (!(e.key !== n && !n.includes("/"))) {
7
+ if (n.includes("/") && n.replace("Space", " ").split("/").includes(e.key)) {
8
+ e.preventDefault(), i(e);
9
+ return;
10
+ }
11
+ e.key === n && (e.preventDefault(), i(e));
12
+ }
13
+ });
14
+ }
15
+ o(() => u ? (document.addEventListener("keydown", t), () => {
16
+ document.removeEventListener("keydown", t);
17
+ }) : document.removeEventListener("keydown", t), [r, u]);
18
+ }
19
+ export {
20
+ d as useKeydown
21
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"useMatchesMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMatchesMedia.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,uBAY5C;AAED,wBAAgB,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAEtD"}
1
+ {"version":3,"file":"useMatchesMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMatchesMedia.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,uBAY5C;AAED,wBAAgB,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAEtD"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { useState as c, useLayoutEffect as r } from "react";
3
+ function i(n) {
4
+ const [s, a] = c();
5
+ return r(() => {
6
+ const e = window.matchMedia(n), t = () => a(e.matches);
7
+ return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
8
+ }, [n]), s;
9
+ }
10
+ function u() {
11
+ return i("(width < 48rem)");
12
+ }
13
+ export {
14
+ i as useMatchesMedia,
15
+ u as useMatchesMobile
16
+ };
@@ -0,0 +1,186 @@
1
+ "use client";
2
+ import { useState as O, useCallback as y, useEffect as L, useRef as M } from "react";
3
+ import { useMatchesMobile as P } from "./useMatchesMedia.js";
4
+ function Y(l) {
5
+ const [o, n] = O(
6
+ {}
7
+ ), [g, A] = O(""), [w, m] = O(
8
+ null
9
+ ), u = M(null), a = M({}), i = M(null), c = M(null), h = M(null), d = M(!1), f = M(null), E = M(null), v = P(), R = (t, e) => {
10
+ c.current && (clearTimeout(c.current), c.current = null), A(t), m(e), n((r) => {
11
+ const s = { ...r };
12
+ return s[e] === t ? delete s[e] : s[e] = t, Object.keys(s).forEach((b) => {
13
+ Number(b) > e && delete s[Number(b)];
14
+ }), s;
15
+ });
16
+ }, T = (t, e) => {
17
+ c.current && (clearTimeout(c.current), c.current = null), n((r) => {
18
+ const s = { ...r };
19
+ return s[e] = t, Object.keys(s).forEach((b) => {
20
+ Number(b) > e && delete s[Number(b)];
21
+ }), s;
22
+ });
23
+ }, p = y(() => {
24
+ E.current && (E.current(), E.current = null), f.current && (f.current(), f.current = null);
25
+ }, []), C = (t, e, r = 150) => {
26
+ v || (f.current = () => {
27
+ i.current && clearTimeout(i.current), i.current = setTimeout(() => {
28
+ T(t, e);
29
+ }, r);
30
+ }, d.current || p());
31
+ }, j = (t, e = 500) => {
32
+ v || (E.current = () => {
33
+ i.current && (clearTimeout(i.current), i.current = null), c.current = setTimeout(() => {
34
+ S(t);
35
+ }, e);
36
+ }, d.current || p());
37
+ }, W = () => {
38
+ d.current = !0, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
39
+ d.current = !1, p();
40
+ }, 200);
41
+ }, I = () => {
42
+ v || h.current && (clearTimeout(h.current), h.current = null, d.current = !1);
43
+ }, S = (t) => {
44
+ n((e) => {
45
+ const r = { ...e };
46
+ if (delete r[t], Object.keys(r).forEach((s) => {
47
+ Number(s) >= t && delete r[Number(s)];
48
+ }), v) {
49
+ const s = t - 1;
50
+ m(s);
51
+ const b = r[s];
52
+ Object.keys(r).length > 0 && b && A(b);
53
+ }
54
+ return r;
55
+ });
56
+ }, k = (t, e) => {
57
+ a.current[t] = e;
58
+ }, N = (t, e) => o[e] === t;
59
+ return L(() => {
60
+ const t = (e) => {
61
+ if (Object.keys(o).length === 0) return;
62
+ const r = e.target;
63
+ if (u.current?.contains(r)) return;
64
+ Object.values(o).some((b) => a.current[b]?.contains(r)) || n({});
65
+ };
66
+ return document.addEventListener("mousedown", t), () => {
67
+ document.removeEventListener("mousedown", t);
68
+ };
69
+ }, [o]), L(() => () => {
70
+ i.current && clearTimeout(i.current), c.current && clearTimeout(c.current);
71
+ }, []), {
72
+ menuRootRef: u,
73
+ activeMenus: o,
74
+ openMenu: T,
75
+ isMenuActive: N,
76
+ registerSubMenu: k,
77
+ closeSubMenuLevel: S,
78
+ getAllFocusableMenuElements: () => {
79
+ const t = [];
80
+ return u.current && t.push(
81
+ ...Array.from(u.current.children)
82
+ ), Object.values(o).forEach((e) => {
83
+ const r = a.current[e];
84
+ r && t.push(...Array.from(r.children));
85
+ }), t;
86
+ },
87
+ findCurrentMenuLevel: (t) => {
88
+ let e = t.parentElement;
89
+ for (; e; ) {
90
+ const r = e.getAttribute("data-menu-level");
91
+ if (r !== null)
92
+ return parseInt(r, 10);
93
+ e = e.parentElement;
94
+ }
95
+ return 0;
96
+ },
97
+ getMenuElementsAtLevel: (t) => {
98
+ if (t === 0 && u.current)
99
+ return Array.from(u.current.children);
100
+ const e = Object.entries(o).find(([, r]) => {
101
+ const s = a.current[r];
102
+ return s && s.getAttribute("data-menu-level") === t.toString();
103
+ })?.[1];
104
+ if (e) {
105
+ const r = a.current[e];
106
+ if (r)
107
+ return Array.from(r.children);
108
+ }
109
+ return [];
110
+ },
111
+ mobileHide: v && Object.keys(o).length > 0,
112
+ listeners: {
113
+ onSubMenuHover: C,
114
+ onSubMenuLeave: j,
115
+ onSubMenuEnter: I,
116
+ onMouseMove: W,
117
+ toggleMenu: R,
118
+ mobilePositionTo: l,
119
+ activeMenu: g,
120
+ currentSubMenuLevel: w,
121
+ closeSubMenuLevel: S
122
+ }
123
+ };
124
+ }
125
+ function q(l, o = "bottom", n) {
126
+ const [g, A] = O({
127
+ top: 0,
128
+ left: 0,
129
+ minWidth: 0
130
+ }), w = n?.isMobile, m = y(() => {
131
+ if (!l?.current) return;
132
+ const u = l.current.getBoundingClientRect(), a = n?.menuRef?.current?.getBoundingClientRect(), i = window.innerWidth, c = a?.width || u.width, h = n?.topOffset ?? 4;
133
+ let d = 0, f = 0;
134
+ if (o === "bottom" || o === "bottom-right" ? d = u.top + u.height + h : d = u.top, o === "bottom" ? f = u.left : o === "bottom-right" ? f = u.right - c : o === "right" && (w ? f = u.left : f = u.right), f + c > i) {
135
+ const v = u.left - c;
136
+ v < 0 ? f = (i - c) / 2 : f = v;
137
+ }
138
+ w && o === "right" && (d = u.top + u.height + h), w && c > i && (f = 0), A({
139
+ top: d,
140
+ left: f,
141
+ minWidth: u.width
142
+ });
143
+ }, [l, o, n?.menuRef, n?.topOffset, w]);
144
+ return L(() => {
145
+ if (!n?.isOpen || !n?.setIsOpen) return;
146
+ const u = (a) => {
147
+ const i = a.target;
148
+ l.current?.contains(i) || n.menuRef?.current?.contains(i) || n.additionalRefs?.some((c) => c.current?.contains(i)) || n.setIsOpen?.(!1);
149
+ };
150
+ return document.addEventListener("mousedown", u), () => {
151
+ document.removeEventListener("mousedown", u);
152
+ };
153
+ }, [
154
+ n,
155
+ l,
156
+ n?.isOpen,
157
+ n?.setIsOpen,
158
+ n?.menuRef,
159
+ n?.additionalRefs
160
+ ]), L(() => {
161
+ m();
162
+ const u = new ResizeObserver(m);
163
+ l?.current && u.observe(l.current), window.addEventListener("scroll", m);
164
+ const a = () => {
165
+ n?.setIsOpen?.(!1);
166
+ }, i = z(l.current);
167
+ return i.forEach((c) => c.addEventListener("scroll", a)), window.addEventListener("resize", m), () => {
168
+ u.disconnect(), window.removeEventListener("scroll", m), i.forEach((c) => c.removeEventListener("scroll", a)), window.removeEventListener("resize", m);
169
+ };
170
+ }, [l, m]), { menuPosition: g, updatePosition: m };
171
+ }
172
+ function z(l) {
173
+ if (!l)
174
+ return [];
175
+ const o = [];
176
+ let n = l.parentElement;
177
+ for (; n; ) {
178
+ const g = window.getComputedStyle(n).overflowY;
179
+ (g === "auto" || g === "scroll") && o.push(n), n = n.parentElement;
180
+ }
181
+ return o;
182
+ }
183
+ export {
184
+ q as useMenuPosition,
185
+ Y as useSubMenuSystem
186
+ };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { useState as u, useEffect as s } from "react";
3
+ function o() {
4
+ const [t, e] = u(!1);
5
+ return s(() => (e(!0), () => e(!1)), []), t;
6
+ }
7
+ export {
8
+ o as useMounted
9
+ };
@@ -0,0 +1,59 @@
1
+ function m(r, t) {
2
+ const n = r.id;
3
+ if (!n) return !0;
4
+ const i = r.meta?.visible ?? !0;
5
+ if (!(r.meta?.inVisibilityMenu ?? !0))
6
+ return i;
7
+ if (t) {
8
+ if (t.hiddenByUser?.includes(n))
9
+ return !1;
10
+ if (t.shownByUser?.includes(n))
11
+ return !0;
12
+ }
13
+ return i;
14
+ }
15
+ function l(r, t) {
16
+ let n = r.map((i) => ({
17
+ ...i,
18
+ meta: {
19
+ ...i.meta,
20
+ // Compute visibility based on system + user preferences
21
+ visible: m(i, t)
22
+ }
23
+ }));
24
+ if (t?.columnOrder?.length) {
25
+ const i = new Map(
26
+ t.columnOrder.map((e, s) => [e, s])
27
+ );
28
+ n = n.sort((e, s) => {
29
+ const u = i.get(e.id) ?? Number.MAX_SAFE_INTEGER, o = i.get(s.id) ?? Number.MAX_SAFE_INTEGER;
30
+ return u === Number.MAX_SAFE_INTEGER && o === Number.MAX_SAFE_INTEGER ? 0 : u - o;
31
+ });
32
+ }
33
+ return t?.columnWidths && (n = n.map((i) => {
34
+ const e = i.id ? t.columnWidths?.[i.id] : void 0;
35
+ return e !== void 0 ? {
36
+ ...i,
37
+ size: e
38
+ } : i;
39
+ })), n;
40
+ }
41
+ function f(r) {
42
+ return r.filter((t) => t.id).map((t) => t.id);
43
+ }
44
+ function c(r, t) {
45
+ const n = [], i = [];
46
+ return r.forEach((e) => {
47
+ if (!e.id) return;
48
+ const s = t.find((d) => d.id === e.id);
49
+ if (!s) return;
50
+ const u = s.meta?.visible ?? !0, o = e.meta?.visible ?? !0;
51
+ (s.meta?.inVisibilityMenu ?? !0) && (u && !o ? n.push(e.id) : !u && o && s.meta?.inVisibilityMenu !== !1 && i.push(e.id));
52
+ }), { hiddenByUser: n, shownByUser: i };
53
+ }
54
+ export {
55
+ l as applyPreferencesToColumns,
56
+ m as computeColumnVisibility,
57
+ f as extractColumnOrder,
58
+ c as extractVisibilityChanges
59
+ };
@@ -0,0 +1,64 @@
1
+ import { LocalStoragePrefixVersion as g } from "../../utils/index.js";
2
+ const r = `${g}-tablePrefs`, u = `${g}-tableLayout`, s = 2;
3
+ function n(t) {
4
+ return `${r}__${t}`;
5
+ }
6
+ function i(t) {
7
+ return `${u}__${t}-tableLayout`;
8
+ }
9
+ function m(t) {
10
+ const e = n(t), o = i(t), a = localStorage.getItem(e);
11
+ if (a)
12
+ try {
13
+ const l = JSON.parse(a);
14
+ if (l.version === s)
15
+ return l;
16
+ localStorage.removeItem(e);
17
+ } catch {
18
+ localStorage.removeItem(e);
19
+ }
20
+ return localStorage.getItem(o) && localStorage.removeItem(o), null;
21
+ }
22
+ function y(t, e) {
23
+ const o = n(t);
24
+ if (!((e.columnOrder?.length ?? 0) > 0 || (e.hiddenByUser?.length ?? 0) > 0 || (e.shownByUser?.length ?? 0) > 0 || Object.keys(e.columnWidths ?? {}).length > 0)) {
25
+ localStorage.removeItem(o);
26
+ return;
27
+ }
28
+ const c = {
29
+ ...e,
30
+ version: s
31
+ };
32
+ localStorage.setItem(o, JSON.stringify(c));
33
+ }
34
+ function S(t) {
35
+ const e = n(t), o = i(t);
36
+ localStorage.removeItem(e), localStorage.removeItem(o);
37
+ }
38
+ function d() {
39
+ if (typeof window > "u") return;
40
+ const t = [];
41
+ for (let e = 0; e < localStorage.length; e++) {
42
+ const o = localStorage.key(e);
43
+ o?.includes("-tableLayout__") && o.endsWith("-tableLayout") && t.push(o);
44
+ }
45
+ t.forEach((e) => {
46
+ localStorage.removeItem(e);
47
+ });
48
+ }
49
+ function h() {
50
+ return typeof window > "u" ? !0 : localStorage.getItem(`${r}__migrated`) === "true";
51
+ }
52
+ function I() {
53
+ typeof window > "u" || localStorage.setItem(`${r}__migrated`, "true");
54
+ }
55
+ export {
56
+ d as clearAllLegacyData,
57
+ S as clearPreferences,
58
+ i as getLegacyStorageKey,
59
+ n as getStorageKey,
60
+ h as hasPerformedLegacyMigration,
61
+ m as loadPreferences,
62
+ I as markLegacyMigrationComplete,
63
+ y as savePreferences
64
+ };