@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,24 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
3
+ function l({
4
+ children: o,
5
+ cardStyle: a = !1,
6
+ id: d,
7
+ testid: t
8
+ }) {
9
+ return /* @__PURE__ */ p(
10
+ "div",
11
+ {
12
+ id: d,
13
+ "data-testid": t,
14
+ className: e(
15
+ "flex flex-col",
16
+ a && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding rounded shadow-4 bg-background-primary-normal"
17
+ ),
18
+ children: o
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ l as SideMenu
24
+ };
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { jsxs as l, Fragment as x, jsx as t } from "react/jsx-runtime";
3
+ import { clsx as o } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useState as b, useEffect as g } from "react";
5
+ import { Label as h } from "./Label.js";
6
+ import { baseTransition as k } from "../classNames.js";
7
+ import { Stack as y } from "./Stack.js";
8
+ import { Icon as N } from "./Icon.js";
9
+ function A({
10
+ id: e,
11
+ testid: a,
12
+ label: d,
13
+ groupIndentLevel: r = 1,
14
+ collapsed: n = !1,
15
+ disabled: i = !1,
16
+ children: m
17
+ }) {
18
+ const [s, c] = b(n);
19
+ g(() => {
20
+ c(n);
21
+ }, [n]);
22
+ const p = () => {
23
+ i || c((f) => !f);
24
+ }, u = i ? o("text-text-action-disabled pointer-events-none") : o("text-text-primary-normal"), v = {
25
+ "data-disabled": i || null
26
+ };
27
+ return /* @__PURE__ */ l(x, { children: [
28
+ /* @__PURE__ */ t(
29
+ "div",
30
+ {
31
+ id: e,
32
+ "data-testid": a,
33
+ className: o(
34
+ "group/sm-group flex rounded cursor-pointer",
35
+ "bg-transparent",
36
+ "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
37
+ "active:bg-background-action-secondary-active active:text-text-action-active",
38
+ k,
39
+ u
40
+ ),
41
+ onClick: p,
42
+ ...v,
43
+ children: /* @__PURE__ */ l(
44
+ y,
45
+ {
46
+ id: e ? `${e}-stack` : void 0,
47
+ horizontal: !0,
48
+ items: "center",
49
+ sizing: "component",
50
+ padding: !0,
51
+ children: [
52
+ r === 2 && /* @__PURE__ */ t("div", { className: "pl-6" }),
53
+ r === 3 && /* @__PURE__ */ t("div", { className: "pl-13" }),
54
+ r === 4 && /* @__PURE__ */ t("div", { className: "pl-20" }),
55
+ /* @__PURE__ */ t(
56
+ N,
57
+ {
58
+ name: "keyboard_arrow_down",
59
+ className: o(
60
+ "transition duration-100 ease-in-out",
61
+ "pointer-events-none",
62
+ {
63
+ "rotate-180": !s
64
+ }
65
+ ),
66
+ size: 24
67
+ }
68
+ ),
69
+ /* @__PURE__ */ t(h, { id: e ? `${e}-label` : void 0, testid: a ? `${a}-label` : void 0, padded: !0, children: d })
70
+ ]
71
+ }
72
+ )
73
+ }
74
+ ),
75
+ !s && m
76
+ ] });
77
+ }
78
+ export {
79
+ A as SideMenuGroup
80
+ };
@@ -0,0 +1,79 @@
1
+ import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
+ import { clsx as t } from "../node_modules/clsx/dist/clsx.js";
3
+ import { baseTransition as y, componentPaddingMinus2pxBorder as g } from "../classNames.js";
4
+ import { Stack as f } from "./Stack.js";
5
+ import { Paragraph as N } from "./Paragraph.js";
6
+ function E({
7
+ id: a,
8
+ as: d = "a",
9
+ testid: s,
10
+ label: l,
11
+ leftIcon: c,
12
+ rightIcon: i,
13
+ href: m,
14
+ groupIndentLevel: r,
15
+ selected: n = !1,
16
+ disabled: o = !1,
17
+ onClick: b
18
+ }) {
19
+ const p = !n && !o && t("border-transparent"), v = !n && o && t("bg-transparent border-transparent"), x = n && !o && t(
20
+ "bg-background-action-secondary-hover border-border-action-normal",
21
+ "hover:border-border-action-hover",
22
+ "active:border-border-action-active"
23
+ ), u = n && o && t(
24
+ "bg-background-action-secondary-disabled border-border-action-disabled"
25
+ ), h = o ? t("text-text-action-disabled pointer-events-none") : t("text-text-primary-normal");
26
+ return /* @__PURE__ */ e(
27
+ d,
28
+ {
29
+ id: a,
30
+ "data-testid": s,
31
+ href: m,
32
+ className: t(
33
+ "group flex w-full rounded border-2 cursor-pointer",
34
+ "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
35
+ "active:bg-background-action-secondary-active active:text-text-action-active",
36
+ y,
37
+ g,
38
+ p,
39
+ v,
40
+ x,
41
+ u,
42
+ h
43
+ ),
44
+ onClick: b,
45
+ children: /* @__PURE__ */ S(
46
+ f,
47
+ {
48
+ id: a ? `${a}-stack` : void 0,
49
+ horizontal: !0,
50
+ items: "center",
51
+ sizing: "component",
52
+ children: [
53
+ r === 2 && /* @__PURE__ */ e("div", { className: "pl-6" }),
54
+ r === 3 && /* @__PURE__ */ e("div", { className: "pl-13" }),
55
+ r === 4 && /* @__PURE__ */ e("div", { className: "pl-20" }),
56
+ r === 5 && /* @__PURE__ */ e("div", { className: "pl-27" }),
57
+ c && c,
58
+ !c && r && /* @__PURE__ */ e("div", { className: "w-6 h-6" }),
59
+ /* @__PURE__ */ e(
60
+ N,
61
+ {
62
+ id: a ? `${a}-label` : void 0,
63
+ testid: s ? `${s}-label` : void 0,
64
+ as: "span",
65
+ padded: !0,
66
+ className: "mr-auto !leading-6",
67
+ children: l
68
+ }
69
+ ),
70
+ i && i
71
+ ]
72
+ }
73
+ )
74
+ }
75
+ );
76
+ }
77
+ export {
78
+ E as SideMenuItem
79
+ };
@@ -0,0 +1,60 @@
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { Subheader as c } from "./Subheader.js";
3
+ import { clsx as n } from "../node_modules/clsx/dist/clsx.js";
4
+ import { Stack as b } from "./Stack.js";
5
+ function v({
6
+ columns: l,
7
+ data: i,
8
+ additionalRows: t,
9
+ testid: m
10
+ }) {
11
+ const p = t && t.length > 0 ? [...i, ...t] : i;
12
+ return /* @__PURE__ */ e(
13
+ b,
14
+ {
15
+ elevation: 4,
16
+ rounded: !0,
17
+ overflowX: "hidden",
18
+ overflowY: "hidden",
19
+ testid: m,
20
+ children: /* @__PURE__ */ h("table", { className: "w-full border-collapse text-left text-sm border overflow-hidden rounded border-border-primary-normal", children: [
21
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-background-primary-normal divide-x divide-border-primary-normal", children: l.map((d, o) => /* @__PURE__ */ e(
22
+ "th",
23
+ {
24
+ scope: "col",
25
+ className: n(
26
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding font-semibold text-text-primary-normal",
27
+ d.meta?.headerWidth ? d.meta.headerWidth : "w-2/3"
28
+ ),
29
+ children: /* @__PURE__ */ e(c, { children: d.header?.toString() })
30
+ },
31
+ o
32
+ )) }) }),
33
+ /* @__PURE__ */ e("tbody", { children: p.map((d, o) => /* @__PURE__ */ e(
34
+ "tr",
35
+ {
36
+ className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
37
+ children: l.map((a, s) => {
38
+ const r = (a.id ? d[a.id] : null) ?? null;
39
+ return /* @__PURE__ */ e(
40
+ "td",
41
+ {
42
+ className: n(
43
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding align-middle text-text-primary-normal",
44
+ a.meta?.headerWidth
45
+ ),
46
+ children: r != null ? typeof r == "string" || typeof r == "number" ? r.toString() : r : ""
47
+ },
48
+ s
49
+ );
50
+ })
51
+ },
52
+ o
53
+ )) })
54
+ ] })
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ v as SimpleTable
60
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ function i({
3
+ className: a = "",
4
+ heightClassName: e = "h-6",
5
+ size: s = "large",
6
+ testid: l
7
+ }) {
8
+ return /* @__PURE__ */ r(
9
+ "div",
10
+ {
11
+ "aria-label": "Loading content",
12
+ role: "status",
13
+ className: `skeleton-paragraph ${e} ${{
14
+ small: "min-w-10 w-1/4",
15
+ medium: "min-w-20 w-1/2",
16
+ large: "min-w-32 w-full"
17
+ }[s]} rounded-xs ${a}`,
18
+ "data-testid": l
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ i as SkeletonParagraph
24
+ };
@@ -0,0 +1,30 @@
1
+ import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
+ function e({ size: r = "small", testid: a }) {
3
+ const i = r === "large" ? 48 : 24;
4
+ return /* @__PURE__ */ o(
5
+ "svg",
6
+ {
7
+ "data-testid": a,
8
+ width: i,
9
+ height: i,
10
+ viewBox: "0 0 24 24",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ fill: "var(--color-icon-action-primary-normal)",
13
+ className: "spinner",
14
+ "aria-label": "Loading",
15
+ children: [
16
+ /* @__PURE__ */ c("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
17
+ /* @__PURE__ */ c("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
18
+ /* @__PURE__ */ c("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
19
+ /* @__PURE__ */ c("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
20
+ /* @__PURE__ */ c("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
21
+ /* @__PURE__ */ c("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
22
+ /* @__PURE__ */ c("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
23
+ /* @__PURE__ */ c("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
24
+ ]
25
+ }
26
+ );
27
+ }
28
+ export {
29
+ e as Spinner
30
+ };
@@ -0,0 +1,174 @@
1
+ import { jsx as z } from "react/jsx-runtime";
2
+ import { clsx as f } from "../node_modules/clsx/dist/clsx.js";
3
+ import { paddingYUsingLayoutGroupGap as oo } from "../classNames.js";
4
+ const po = ({ items: p, justify: a, grow: y }) => f(
5
+ "flex",
6
+ p === "start" && "items-start",
7
+ y && "grow",
8
+ p === "start" && "items-start",
9
+ p === "center" && "items-center",
10
+ p === "end" && "items-end",
11
+ p === "start-center" && "items-start desktop:items-center",
12
+ a === "start" && "justify-start",
13
+ a === "center" && "justify-center",
14
+ a === "end" && "justify-end",
15
+ a === "end" && "justify-end",
16
+ a === "between" && "justify-between",
17
+ a === "around" && "justify-around"
18
+ ), to = (p) => f(
19
+ p === "layout-group" && "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-compact-layout-group-gap",
20
+ p === "layout" && "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-compact-layout-gap",
21
+ p === "container" && "gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-compact-container-gap",
22
+ p === "component" && "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-compact-component-gap"
23
+ );
24
+ function no({
25
+ children: p,
26
+ items: a,
27
+ justify: y,
28
+ grow: K,
29
+ padding: e,
30
+ paddingX: c,
31
+ paddingY: n,
32
+ paddingBottom: m,
33
+ paddingTop: l,
34
+ paddingLeft: i,
35
+ paddingRight: r,
36
+ margin: M,
37
+ marginX: O,
38
+ marginY: P,
39
+ horizontal: Q,
40
+ horizontalMobile: V,
41
+ elevation: s = 0,
42
+ rounded: Z,
43
+ centered: _,
44
+ width: d,
45
+ minHeight: u,
46
+ maxWidth: k,
47
+ minWidth: $,
48
+ height: b,
49
+ maxHeight: g,
50
+ borderColor: w,
51
+ borderTopColor: N,
52
+ borderRightColor: I,
53
+ borderBottomColor: G,
54
+ borderLeftColor: j,
55
+ backgroundColor: F,
56
+ sizing: o = "none",
57
+ overflowY: x = "inherit",
58
+ overflowX: v = "inherit",
59
+ flexShrink: S,
60
+ flexGrow: U,
61
+ position: q,
62
+ top: A,
63
+ left: D,
64
+ id: h,
65
+ noGap: B,
66
+ marginTop: C,
67
+ marginBottom: W,
68
+ testid: H,
69
+ bottom: E,
70
+ zIndex: J,
71
+ flexWrap: L,
72
+ className: R,
73
+ unclipEdges: T,
74
+ ...t
75
+ }) {
76
+ const Y = po({ items: a, justify: y, grow: K }), X = to(o);
77
+ return /* @__PURE__ */ z(
78
+ "div",
79
+ {
80
+ id: h,
81
+ "data-testid": H,
82
+ ...t,
83
+ style: {
84
+ height: b === "full" ? "100%" : b !== void 0 ? `${b}px` : void 0,
85
+ maxHeight: g !== void 0 ? isNaN(+g) ? g : `${g}px` : t.style?.maxHeight,
86
+ maxWidth: k !== void 0 ? isNaN(+k) ? k : `${k}px` : t.style?.maxWidth,
87
+ minHeight: u !== void 0 ? isNaN(+u) ? u : `${u}px` : t.style?.minHeight,
88
+ width: d !== void 0 && typeof d == "number" ? `${d}px` : void 0,
89
+ minWidth: $ !== void 0 ? `${$}px` : void 0,
90
+ border: w ? `1px solid var(--color-${w})` : void 0,
91
+ borderTop: N ? `1px solid var(--color-${N})` : void 0,
92
+ borderRight: I ? `1px solid var(--color-${I})` : void 0,
93
+ borderBottom: G ? `1px solid var(--color-${G})` : void 0,
94
+ borderLeft: j ? `1px solid var(--color-${j})` : void 0,
95
+ backgroundColor: F ? `var(--color-${F})` : void 0,
96
+ flexGrow: U !== void 0 ? U : void 0,
97
+ flexShrink: S !== void 0 ? S : void 0,
98
+ position: q !== void 0 ? q : void 0,
99
+ top: A !== void 0 ? `${A}px` : void 0,
100
+ bottom: E !== void 0 ? `${E}px` : void 0,
101
+ left: D !== void 0 ? `${D}px` : void 0,
102
+ borderBlock: t.style?.borderBlock,
103
+ marginInline: t.style?.marginInline,
104
+ zIndex: J !== void 0 ? J : void 0,
105
+ flexWrap: L,
106
+ paddingInline: t.style?.paddingInline,
107
+ gap: t.style?.gap,
108
+ ...t.style
109
+ },
110
+ className: f(
111
+ "scrollbar-thin",
112
+ "max-w-screen",
113
+ d !== "fit" && "w-full",
114
+ d === "full" && "w-full",
115
+ d === "max" && "w-max",
116
+ _ && "mx-auto",
117
+ x == "auto" && "overflow-y-auto",
118
+ x == "hidden" && "overflow-y-hidden",
119
+ x == "scroll" && "overflow-y-scroll",
120
+ v == "auto" && "overflow-x-auto",
121
+ v == "hidden" && "overflow-x-hidden",
122
+ v == "scroll" && "overflow-x-scroll",
123
+ e && o === "container" && "p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding",
124
+ e && o === "layout" && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
125
+ e && o === "layout-group" && "p-mobile-layout-group-padding desktop:p-desktop-layout-group-padding compact:p-desktop-compact-layout-group-padding",
126
+ e && o === "component" && "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
127
+ c && o === "container" && "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
128
+ c && o === "layout" && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
129
+ c && o === "layout-group" && "px-mobile-layout-group-padding desktop:px-desktop-layout-group-padding compact:px-desktop-compact-layout-group-padding",
130
+ c && o === "component" && "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
131
+ n && o === "container" && "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
132
+ n && o === "layout" && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
133
+ n && o === "layout-group" && oo,
134
+ n && o === "component" && "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
135
+ m && o === "container" && "pb-mobile-container-padding desktop:pb-desktop-container-padding compact:pb-desktop-compact-container-padding",
136
+ m && o === "layout" && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
137
+ m && o === "layout-group" && "pb-mobile-layout-group-padding desktop:pb-desktop-layout-group-padding compact:pb-desktop-compact-layout-group-padding",
138
+ m && o === "component" && "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
139
+ l && o === "container" && "pt-mobile-container-padding desktop:pt-desktop-container-padding compact:pt-desktop-compact-container-padding",
140
+ l && o === "layout" && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
141
+ l && o === "layout-group" && "pt-mobile-layout-group-padding desktop:pt-desktop-layout-group-padding compact:pt-desktop-compact-layout-group-padding",
142
+ l && o === "component" && "pt-mobile-component-padding desktop:pt-desktop-component-padding compact:pt-desktop-compact-component-padding",
143
+ i && o === "container" && "pl-mobile-container-padding desktop:pl-desktop-container-padding compact:pl-desktop-compact-container-padding",
144
+ i && o === "layout" && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
145
+ i && o === "layout-group" && "pl-mobile-layout-group-padding desktop:pl-desktop-layout-group-padding compact:pl-desktop-compact-layout-group-padding",
146
+ i && o === "component" && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding",
147
+ r && o === "container" && "pr-mobile-container-padding desktop:pr-desktop-container-padding compact:pr-desktop-compact-container-padding",
148
+ r && o === "layout" && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
149
+ r && o === "layout-group" && "pr-mobile-layout-group-padding desktop:pr-desktop-layout-group-padding compact:pr-desktop-compact-layout-group-padding",
150
+ r && o === "component" && "pr-mobile-component-padding desktop:pr-desktop-component-padding compact:pr-desktop-compact-component-padding",
151
+ M && o === "container" && "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
152
+ O && o === "container" && "mx-mobile-container-padding desktop:mx-desktop-container-padding compact:mx-compact-container-padding",
153
+ C && o === "container" && "mt-mobile-container-padding desktop:mt-desktop-container-padding compact:mt-compact-container-padding",
154
+ W && o === "container" && "mb-mobile-container-padding desktop:mb-desktop-container-padding compact:mb-compact-container-padding",
155
+ P && o === "container" && "my-mobile-container-padding desktop:my-desktop-container-padding compact:my-compact-container-padding",
156
+ Q ? "desktop:flex-row" : "desktop:flex-col",
157
+ V ? "flex-row" : "flex-col",
158
+ Y,
159
+ !B && X,
160
+ s === 0 && "shadow-none",
161
+ s === 2 && "shadow-2",
162
+ s === 4 && "shadow-4",
163
+ s === 16 && "shadow-16",
164
+ Z && "rounded",
165
+ T && "-m-0.75 p-1",
166
+ R
167
+ ),
168
+ children: p
169
+ }
170
+ );
171
+ }
172
+ export {
173
+ no as Stack
174
+ };
@@ -0,0 +1,44 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Label as m } from "./Label.js";
3
+ import { clsx as a } from "../node_modules/clsx/dist/clsx.js";
4
+ import { paddingXUsingLayoutGroupGap as p, componentPaddingYUsingComponentGap as u } from "../classNames.js";
5
+ function f({
6
+ children: e,
7
+ state: r = "in-progress",
8
+ intent: o = "neutral",
9
+ id: c,
10
+ testid: l,
11
+ ...i
12
+ }) {
13
+ const g = a(
14
+ r === "completed" && ["neutral", "critical"].includes(o) ? "text-text-on-action-primary-normal" : "text-neutral-500"
15
+ ), s = a({
16
+ "bg-neutral-200": o === "neutral" && r === "in-progress",
17
+ "bg-text-primary-normal": o === "neutral" && r === "completed",
18
+ "bg-warning-200": o === "warning" && r === "in-progress",
19
+ "bg-background-warning-normal": o === "warning" && r === "completed",
20
+ "bg-success-200": o === "success" && r === "in-progress",
21
+ "bg-background-success-normal": o === "success" && r === "completed",
22
+ "bg-critical-200": o === "critical" && r === "in-progress",
23
+ "bg-background-critical-normal": o === "critical" && r === "completed"
24
+ });
25
+ return /* @__PURE__ */ n(
26
+ "div",
27
+ {
28
+ id: c,
29
+ "data-testid": l,
30
+ ...i,
31
+ className: a(
32
+ "rounded flex items-center",
33
+ g,
34
+ s,
35
+ p,
36
+ u
37
+ ),
38
+ children: /* @__PURE__ */ n(m, { id: c ? `${c}-label` : void 0, testid: l ? `${l}-label` : void 0, children: e })
39
+ }
40
+ );
41
+ }
42
+ export {
43
+ f as StatusPill
44
+ };
@@ -0,0 +1,138 @@
1
+ "use client";
2
+ import { jsxs as T, jsx as e } from "react/jsx-runtime";
3
+ import { useState as x, useEffect as j } from "react";
4
+ import { Button as b } from "./Button.js";
5
+ import { InputBase as w } from "./Input.js";
6
+ import { Icon as I } from "./Icon.js";
7
+ import { clsx as p } from "../node_modules/clsx/dist/clsx.js";
8
+ import { componentGap as B } from "../classNames.js";
9
+ import { Tooltip as $ } from "./Tooltip.js";
10
+ function J({
11
+ error: v,
12
+ disabled: r,
13
+ hideButtons: d = !1,
14
+ value: n,
15
+ setValue: s,
16
+ onDecrease: M,
17
+ onIncrease: N,
18
+ onBlur: S,
19
+ id: i,
20
+ testid: t,
21
+ min: a,
22
+ max: o,
23
+ step: u = 1,
24
+ ...k
25
+ }) {
26
+ const [f, y] = x(!1), [C, l] = x(String(n));
27
+ j(() => {
28
+ f || l(String(n));
29
+ }, [n, f]);
30
+ function D() {
31
+ o != null && n >= o || (s((c) => Math.min(c + u, o ?? 1 / 0)), N?.());
32
+ }
33
+ function E() {
34
+ a != null && n <= a || (s((c) => Math.max(c - u, a ?? -1 / 0)), M?.());
35
+ }
36
+ return /* @__PURE__ */ T(
37
+ "div",
38
+ {
39
+ id: i,
40
+ "data-testid": t,
41
+ className: p("flex items-center", B),
42
+ children: [
43
+ !d && /* @__PURE__ */ e(
44
+ $,
45
+ {
46
+ message: "Decrease Quantity",
47
+ testid: t ? `${t}-decrease-tooltip` : void 0,
48
+ children: /* @__PURE__ */ e(
49
+ b,
50
+ {
51
+ id: i ? `${i}-decrease-button` : void 0,
52
+ testid: t ? `${t}-decrease-button` : void 0,
53
+ iconOnly: !0,
54
+ variant: "tertiary",
55
+ leftIcon: /* @__PURE__ */ e(
56
+ "span",
57
+ {
58
+ className: p(
59
+ !r || n > 0 && "text-icon-action-primary-normal",
60
+ r || n === 0 && "text-icon-action-primary-disabled",
61
+ "contents"
62
+ ),
63
+ children: /* @__PURE__ */ e(I, { name: "remove" })
64
+ }
65
+ ),
66
+ onClick: E,
67
+ disabled: r || n <= 0 || a != null && n <= a
68
+ }
69
+ )
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
73
+ w,
74
+ {
75
+ ...k,
76
+ id: i ? `${i}-input` : void 0,
77
+ testid: t ? `${t}-input` : void 0,
78
+ type: "text",
79
+ inputMode: "numeric",
80
+ pattern: "[0-9]*",
81
+ align: "center",
82
+ value: C,
83
+ onFocus: () => y(!0),
84
+ onChange: (c) => {
85
+ const m = c.target.value;
86
+ if (m === "") {
87
+ l(""), s(0);
88
+ return;
89
+ }
90
+ if (!/^\d*$/.test(m))
91
+ return;
92
+ const g = m.replace(/^0+/, "") || "0", h = parseInt(g, 10);
93
+ o != null && h > o || (l(g), s(h));
94
+ },
95
+ onBlur: () => {
96
+ y(!1), l(String(n)), S?.();
97
+ },
98
+ error: v,
99
+ disabled: r,
100
+ className: "!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
101
+ }
102
+ ) }),
103
+ !d && /* @__PURE__ */ e(
104
+ $,
105
+ {
106
+ message: "Increase Quantity",
107
+ testid: t ? `${t}-increase-tooltip` : void 0,
108
+ children: /* @__PURE__ */ e(
109
+ b,
110
+ {
111
+ id: i ? `${i}-increase-button` : void 0,
112
+ testid: t ? `${t}-increase-button` : void 0,
113
+ iconOnly: !0,
114
+ variant: "tertiary",
115
+ leftIcon: /* @__PURE__ */ e(
116
+ "span",
117
+ {
118
+ className: p(
119
+ !r && "text-icon-action-primary-normal",
120
+ r && "text-icon-action-primary-disabled",
121
+ "contents"
122
+ ),
123
+ children: /* @__PURE__ */ e(I, { name: "add" })
124
+ }
125
+ ),
126
+ onClick: D,
127
+ disabled: r || o != null && n >= o
128
+ }
129
+ )
130
+ }
131
+ )
132
+ ]
133
+ }
134
+ );
135
+ }
136
+ export {
137
+ J as Stepper
138
+ };