@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,50 @@
1
+ import { jsx as k } from "react/jsx-runtime";
2
+ import { clsx as l } from "../node_modules/clsx/dist/clsx.js";
3
+ function h(o) {
4
+ const {
5
+ children: g,
6
+ selected: m,
7
+ testid: r,
8
+ padding: p,
9
+ paddingX: a,
10
+ paddingY: t,
11
+ paddingBottom: i,
12
+ paddingTop: e,
13
+ paddingLeft: n,
14
+ paddingRight: s,
15
+ elevation: d = 4,
16
+ ...c
17
+ } = o, y = o.as || "div", u = l(
18
+ // Backward compatibility: if no new padding props provided keep existing class.
19
+ !(p !== void 0 || a !== void 0 || t !== void 0 || i !== void 0 || e !== void 0 || n !== void 0 || s !== void 0) && "p-desktop-layout-padding",
20
+ // New responsive spacing tokens (mirrors Stack for layout sizing)
21
+ p && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
22
+ a && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
23
+ t && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
24
+ i && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
25
+ e && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
26
+ n && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
27
+ s && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding"
28
+ );
29
+ return /* @__PURE__ */ k(
30
+ y,
31
+ {
32
+ ...c,
33
+ "data-testid": r,
34
+ className: l(
35
+ "rounded-sm",
36
+ u,
37
+ m ? "border-2 border-border-primary-focus" : "border border-border-primary-normal",
38
+ d === 0 && "shadow-none",
39
+ d === 2 && "shadow-2",
40
+ d === 4 && "shadow-4",
41
+ d === 16 && "shadow-16",
42
+ c.className
43
+ ),
44
+ children: g
45
+ }
46
+ );
47
+ }
48
+ export {
49
+ h as Card
50
+ };
@@ -0,0 +1,108 @@
1
+ "use client";
2
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
+ import { clsx as a } from "../node_modules/clsx/dist/clsx.js";
4
+ import { baseTransition as j, componentGap as q } from "../classNames.js";
5
+ import { Icon as t } from "./Icon.js";
6
+ import { Paragraph as w } from "./Paragraph.js";
7
+ function I({
8
+ label: p,
9
+ error: o,
10
+ disabled: c,
11
+ readOnly: r,
12
+ checked: v,
13
+ onChange: l,
14
+ indeterminate: m,
15
+ paragraphClassName: b,
16
+ id: i,
17
+ testid: s,
18
+ ...h
19
+ }) {
20
+ const n = m || v, u = a(
21
+ !n && !o && !c && !r && "border-border-primary-normal bg-background-action-secondary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active"
22
+ ), g = a(
23
+ n && !o && !c && !r && "bg-background-action-primary-normal border-background-action-primary-normal peer-hover:bg-background-action-primary-hover peer-hover:border-background-action-primary-hover peer-active:bg-background-action-primary-active peer-active:border-background-action-primary-active"
24
+ ), k = a(
25
+ o && !n && "bg-background-action-critical-secondary-normal border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active"
26
+ ), x = a(
27
+ o && n && "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal peer-hover:bg-background-action-critical-primary-hover peer-hover:border-background-action-critical-primary-hover peer-active:bg-background-action-critical-primary-active peer-active:border-background-action-critical-primary-active"
28
+ ), y = a(
29
+ c && !r && "border-border-primary-normal bg-background-action-secondary-disabled peer-checked:bg-icon-on-action-primary-disabled peer-checked:border-icon-on-action-primary-disabled"
30
+ ), N = a(
31
+ r && "border-transparent bg-transparent peer-checked:bg-transparent peer-checked:border-transparent"
32
+ ), f = a(
33
+ n && !c && !r && "color-icon-on-action-primary-normal peer-hover:color-icon-on-action-primary-hover peer-active:color-icon-on-action-primary-active",
34
+ n && c && "color-background-action-primary-disabled"
35
+ );
36
+ return /* @__PURE__ */ d(
37
+ "label",
38
+ {
39
+ id: i,
40
+ "data-testid": s,
41
+ htmlFor: i ? `${i}-input` : void 0,
42
+ className: a(
43
+ "flex items-center",
44
+ q,
45
+ (c || r && o || r) && "cursor-default",
46
+ !(r && o) && !c && !r && "cursor-pointer"
47
+ ),
48
+ children: [
49
+ /* @__PURE__ */ d("div", { className: "relative", children: [
50
+ /* @__PURE__ */ e(
51
+ "input",
52
+ {
53
+ id: i ? `${i}-input` : void 0,
54
+ "data-testid": s ? `${s}-input` : void 0,
55
+ type: "checkbox",
56
+ className: "sr-only peer",
57
+ disabled: c,
58
+ checked: n,
59
+ onChange: C,
60
+ "data-indeterminate": m,
61
+ ...h
62
+ }
63
+ ),
64
+ o && (r || c) ? /* @__PURE__ */ e("div", { className: a("size-6", "flex items-center justify-center"), children: n ? m ? /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "question_mark" }) }) : r ? /* @__PURE__ */ e("span", { className: "text-success-400 contents", children: /* @__PURE__ */ e(t, { name: "check" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "check", className: "pointer-events-none" }) }) : r && /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "close" }) }) }) : /* @__PURE__ */ e(
65
+ "div",
66
+ {
67
+ className: a(
68
+ "size-6 border rounded-base",
69
+ "flex items-center justify-center",
70
+ j,
71
+ u,
72
+ g,
73
+ k,
74
+ x,
75
+ y,
76
+ N,
77
+ f
78
+ ),
79
+ children: n ? m ? r ? /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "question_mark" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "remove", className: "pointer-events-none" }) }) : r ? /* @__PURE__ */ e("span", { className: "text-success-400 contents", children: /* @__PURE__ */ e(t, { name: "check" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "check", className: "pointer-events-none" }) }) : r && /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "close" }) })
80
+ }
81
+ )
82
+ ] }),
83
+ p && /* @__PURE__ */ e(
84
+ w,
85
+ {
86
+ id: i ? `${i}-label` : void 0,
87
+ testid: s ? `${s}-label` : void 0,
88
+ as: "span",
89
+ padded: !0,
90
+ className: a(
91
+ !b?.includes("text-wrap") && "text-nowrap",
92
+ c && !o && "!text-text-primary-disabled",
93
+ o && !c && !r && "!text-text-primary-error",
94
+ b
95
+ ),
96
+ children: p
97
+ }
98
+ )
99
+ ]
100
+ }
101
+ );
102
+ function C($) {
103
+ c || r || r && o || !l || l($);
104
+ }
105
+ }
106
+ export {
107
+ I as Checkbox
108
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CompactImagesPreview.d.ts","sourceRoot":"","sources":["../../src/components/CompactImagesPreview.tsx"],"names":[],"mappings":"AAKA,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAgBF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA2IpE"}
1
+ {"version":3,"file":"CompactImagesPreview.d.ts","sourceRoot":"","sources":["../../src/components/CompactImagesPreview.tsx"],"names":[],"mappings":"AAOA,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAgBF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA2IpE"}
@@ -0,0 +1,121 @@
1
+ "use client";
2
+ import { jsx as a, jsxs as F } from "react/jsx-runtime";
3
+ import { useState as P, useMemo as x, useEffect as T, useCallback as y } from "react";
4
+ import { Stack as W } from "./Stack.js";
5
+ import { clsx as $ } from "../node_modules/clsx/dist/clsx.js";
6
+ import { useMatchesMobile as z } from "../hooks/useMatchesMedia.js";
7
+ function H(u, c) {
8
+ const t = u?.trim();
9
+ return !!t && t !== c && !t.endsWith("/placeholder.svg") && !t.includes("/placeholder.svg?");
10
+ }
11
+ function U(u) {
12
+ const {
13
+ sources: c,
14
+ currentSourceIndex: t = 0,
15
+ activeImageHeight: b = 243,
16
+ activeImageWidth: p = 242,
17
+ thumbnailWidth: w = 30.5,
18
+ thumbnailHeight: E = 30,
19
+ enableThumbnailBorder: I = !1,
20
+ placeholderImageUri: o,
21
+ placeholderAlt: m = "placeholder image",
22
+ onChangeSource: j,
23
+ onMainImageClick: d,
24
+ testid: n
25
+ } = u, v = z(), [C, S] = P([]), M = x(
26
+ () => c.map((e) => e.uri).join("|"),
27
+ [c]
28
+ ), l = x(
29
+ () => c.filter(
30
+ (e) => H(e.uri, o) && C.indexOf(e.uri) === -1
31
+ ),
32
+ [C, o, c]
33
+ ), s = l.length, k = t >= 0 && t < s ? t : 0;
34
+ T(() => {
35
+ S([]);
36
+ }, [M]);
37
+ const h = y(
38
+ (e, r) => {
39
+ if (r && S(
40
+ (g) => g.indexOf(r) >= 0 ? g : [...g, r]
41
+ ), !o) return;
42
+ const i = e.currentTarget;
43
+ i.src !== o && (i.src = o, i.alt || (i.alt = m));
44
+ },
45
+ [o, m]
46
+ ), N = y(
47
+ (e) => {
48
+ e !== t && (e < 0 || e >= s || j(e));
49
+ },
50
+ [t, j, s]
51
+ );
52
+ if (!l.length || typeof v > "u")
53
+ return /* @__PURE__ */ a("div", { className: "flex flex-row justify-center w-full", children: /* @__PURE__ */ a(
54
+ "img",
55
+ {
56
+ "data-testid": n ? `${n}-placeholder` : void 0,
57
+ className: "object-center",
58
+ style: {
59
+ width: p,
60
+ height: b,
61
+ objectPosition: "center",
62
+ objectFit: "contain"
63
+ },
64
+ src: o,
65
+ alt: m,
66
+ onError: (e) => h(e),
67
+ onClick: d
68
+ }
69
+ ) });
70
+ const f = l[k];
71
+ return /* @__PURE__ */ F(W, { "data-testid": n, sizing: "layout", children: [
72
+ /* @__PURE__ */ a(
73
+ "img",
74
+ {
75
+ "data-testid": n ? `${n}-main-image` : void 0,
76
+ className: $("object-center", d && "cursor-pointer"),
77
+ style: {
78
+ width: v ? "100%" : p,
79
+ height: b,
80
+ objectPosition: "center",
81
+ objectFit: "contain"
82
+ },
83
+ src: f.uri,
84
+ alt: f.name,
85
+ onError: (e) => h(e, f.uri),
86
+ onClick: d
87
+ }
88
+ ),
89
+ s > 1 && /* @__PURE__ */ a("div", { className: "flex flex-row flex-wrap items-center gap-3", children: l.slice(0, 4).map((e, r) => /* @__PURE__ */ a(
90
+ "button",
91
+ {
92
+ "data-testid": n ? `${n}-thumbnail-${r}` : void 0,
93
+ onClick: (i) => {
94
+ i.preventDefault(), N(r);
95
+ },
96
+ className: $(
97
+ "cursor-pointer",
98
+ k === r && I ? "ring-2 ring-offset-2 ring-brand-400 transition-discrete duration-300" : "ring-brand-400/0"
99
+ ),
100
+ children: /* @__PURE__ */ a(
101
+ "img",
102
+ {
103
+ src: e.uri,
104
+ alt: e.name,
105
+ style: {
106
+ width: w,
107
+ height: E,
108
+ objectPosition: "center",
109
+ objectFit: "cover"
110
+ },
111
+ onError: (i) => h(i, e.uri)
112
+ }
113
+ )
114
+ },
115
+ `compact-image-${e.uri}-${r}`
116
+ )) })
117
+ ] });
118
+ }
119
+ export {
120
+ U as CompactImagesPreview
121
+ };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { jsxs as d, jsx as c } from "react/jsx-runtime";
3
+ import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useCallback as u } from "react";
5
+ import { Button as f } from "./Button.js";
6
+ function N({
7
+ label: m,
8
+ selected: a = !1,
9
+ className: l,
10
+ disabled: t = !1,
11
+ onClick: i,
12
+ ref: s,
13
+ fullWidth: n,
14
+ id: o,
15
+ testid: r,
16
+ ...v
17
+ }) {
18
+ const p = u(
19
+ (b) => {
20
+ t || i?.(b);
21
+ },
22
+ [i, t]
23
+ ), x = e(
24
+ "absolute left-0 right-0 bottom-0 transition-colors duration-200 ease-in-out z-10",
25
+ "rounded-px ",
26
+ "h-0.5",
27
+ !t && "bg-text-action-primary-normal peer-hover:bg-border-action-hover peer-active:bg-border-action-active",
28
+ t && "bg-text-action-primary-disabled",
29
+ l
30
+ );
31
+ return /* @__PURE__ */ d("div", { id: o, "data-testid": r, className: e(
32
+ "relative",
33
+ n && "flex-1"
34
+ ), children: [
35
+ /* @__PURE__ */ c(
36
+ f,
37
+ {
38
+ id: o ? `${o}-button` : void 0,
39
+ testid: r ? `${r}-button` : void 0,
40
+ block: n,
41
+ ref: s,
42
+ variant: "tertiary",
43
+ disabled: t,
44
+ onClick: p,
45
+ role: "tab",
46
+ "aria-selected": a,
47
+ className: e(
48
+ "peer",
49
+ !a && "!text-text-secondary-normal hover:!text-text-action-primary-hover active:!text-text-action-primary-active"
50
+ ),
51
+ ...v,
52
+ children: m
53
+ }
54
+ ),
55
+ a && /* @__PURE__ */ c(
56
+ "div",
57
+ {
58
+ id: o ? `${o}-indicator` : void 0,
59
+ "data-testid": r ? `${r}-indicator` : void 0,
60
+ className: x,
61
+ children: " "
62
+ }
63
+ )
64
+ ] });
65
+ }
66
+ export {
67
+ N as ContentTab
68
+ };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import { jsxs as N, jsx as d } from "react/jsx-runtime";
3
+ import { clsx as $ } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useState as I, useRef as R, useCallback as w, useEffect as S } from "react";
5
+ import { ContentTab as j } from "./ContentTab.js";
6
+ const y = "after:absolute after:bottom-0 after:left-0 after:w-full after:h-0.5 after:bg-border-primary-normal z-0";
7
+ function g({
8
+ tabs: n,
9
+ onTabChange: a,
10
+ fullWidthTabs: h,
11
+ id: r,
12
+ testid: o,
13
+ selectedTab: f,
14
+ contentPadding: k = !0,
15
+ disabledWithColor: i
16
+ }) {
17
+ const [c, u] = I(n[0]?.id || ""), [s, m] = I(0), v = R([]), p = w(
18
+ (e, t, l) => {
19
+ i && !l || (u(e), m(t), a?.(e));
20
+ },
21
+ [i, a]
22
+ );
23
+ S(() => {
24
+ f && p(f.id, f.index, !0);
25
+ }, [f, p]);
26
+ const b = w(
27
+ (e) => {
28
+ if (i) return;
29
+ let t = s;
30
+ if (e.key === "ArrowRight")
31
+ e.preventDefault(), t = (s + 1) % n.length;
32
+ else if (e.key === "ArrowLeft")
33
+ e.preventDefault(), t = (s - 1 + n.length) % n.length;
34
+ else
35
+ return;
36
+ const l = n[t].id;
37
+ u(l), a?.(l), v.current[t]?.focus(), m(t);
38
+ },
39
+ [i, s, a, n]
40
+ ), x = n.find((e) => e.id === c)?.content;
41
+ return /* @__PURE__ */ N("div", { id: r, "data-testid": o, children: [
42
+ /* @__PURE__ */ d("div", { className: $("overflow-x-auto", k && "pb-2"), children: /* @__PURE__ */ d(
43
+ "div",
44
+ {
45
+ id: r ? `${r}-tablist` : void 0,
46
+ "data-testid": o ? `${o}-tablist` : void 0,
47
+ role: "tablist",
48
+ "aria-orientation": "horizontal",
49
+ className: $("flex relative", y),
50
+ onKeyDown: b,
51
+ children: n.map((e, t) => {
52
+ const l = c === e.id;
53
+ return /* @__PURE__ */ d(
54
+ j,
55
+ {
56
+ disabled: e.disabled,
57
+ fullWidth: h,
58
+ id: r ? `${r}-tab-${e.id}` : void 0,
59
+ testid: o ? `${o}-tab-${e.id}` : void 0,
60
+ label: e.label,
61
+ selected: l,
62
+ onClick: () => p(e.id, t),
63
+ onFocus: () => {
64
+ i || (u(e.id), m(t), a?.(e.id));
65
+ },
66
+ className: $(!l && y),
67
+ role: "tab",
68
+ "aria-selected": l,
69
+ "aria-controls": `${r ? `${r}-` : ""}panel-${e.id}`,
70
+ tabIndex: l ? 0 : -1,
71
+ ref: (D) => {
72
+ v.current[t] = D;
73
+ }
74
+ },
75
+ e.id
76
+ );
77
+ })
78
+ }
79
+ ) }),
80
+ x && /* @__PURE__ */ d(
81
+ "div",
82
+ {
83
+ id: (r ? `${r}-` : "") + `panel-${c}`,
84
+ "data-testid": (o ? `${o}-` : "") + `panel-${c}`,
85
+ className: "mt-2",
86
+ role: "tabpanel",
87
+ "aria-labelledby": `tab-${c}`,
88
+ tabIndex: 0,
89
+ children: x
90
+ }
91
+ )
92
+ ] });
93
+ }
94
+ export {
95
+ g as ContentTabs
96
+ };
@@ -0,0 +1,54 @@
1
+ import { jsxs as l, jsx as C } from "react/jsx-runtime";
2
+ function i(L) {
3
+ return /* @__PURE__ */ l(
4
+ "svg",
5
+ {
6
+ width: "107",
7
+ height: "24",
8
+ viewBox: "0 0 107 24",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ...L,
12
+ children: [
13
+ /* @__PURE__ */ C(
14
+ "path",
15
+ {
16
+ d: "M10.1472 5.86855H22.261C24.0328 5.86855 25.2192 5.79792 26.2514 7.25517C27.1489 8.60833 27.4185 9.79792 27.2105 11.4336C27.0025 13.0693 26.5596 14.2291 25.4926 15.6529C24.9996 16.3295 24.3795 16.8648 23.6284 17.2552C22.6077 17.7533 21.9529 17.6827 20.9206 17.6827H8.69893V17.6381L8.00562 23.2589H20.7704C24.2755 23.2589 27.6496 22.5228 30.4807 19.9949C33.0999 17.6827 34.6444 14.8128 35.0489 11.612C35.4918 8.12506 34.6406 5.72357 32.2948 3.3035C29.8875 0.775615 26.8793 0.362976 23.2278 0.362976H10.8328L10.1472 5.92803V5.86855Z",
17
+ fill: "#1D1E1E"
18
+ }
19
+ ),
20
+ /* @__PURE__ */ C(
21
+ "path",
22
+ {
23
+ d: "M45.7143 0.960477L45.3484 3.9233L45.437 3.64077C46.9276 1.46605 49.2772 0.618469 51.8771 0.618469C54.6042 0.618469 56.3567 1.62219 57.4082 3.91958C59.2263 1.53668 61.5527 0.618469 64.4531 0.618469C66.3135 0.618469 67.9544 1.16122 69.0868 2.45862C70.485 4.04598 70.2192 6.1352 69.9342 8.3917L68.0083 23.2356H60.5705L62.3462 9.28018C62.5234 7.901 62.5041 6.35453 60.5128 6.35453C58.0862 6.35453 57.6085 8.52925 57.389 10.2393L55.7366 23.2319H48.2025L49.9782 9.27646C50.1477 7.93817 49.9897 6.22442 48.1255 6.22442C46.0918 6.22442 45.4408 7.6891 45.2367 9.27646L43.461 23.2319H35.3453L38.2072 0.960477H45.7143Z",
24
+ fill: "#1D1E1E"
25
+ }
26
+ ),
27
+ /* @__PURE__ */ C(
28
+ "path",
29
+ {
30
+ d: "M97.4234 0.336578L96.6954 6.39234H103.474L96.2755 9.54104L94.5076 23.2734H103.255L106.175 0.336578H97.4234Z",
31
+ fill: "#1D1E1E"
32
+ }
33
+ ),
34
+ /* @__PURE__ */ C(
35
+ "path",
36
+ {
37
+ d: "M91.03 10.4126C89.3545 9.34573 86.6082 9.04833 84.6092 8.79182C83.9158 8.70632 83.1339 8.49814 82.4059 8.29368C82.1286 8.23792 81.8705 8.16729 81.6317 8.07807C81.5431 8.05204 81.443 8.02231 81.3583 8C81.1618 7.95539 80.9461 7.81041 80.7535 7.61338C80.353 7.30855 80.1141 6.94424 80.1141 6.54647C80.1141 6.35688 80.1835 6.17844 80.2836 6.00372C80.2952 5.98513 80.3029 5.97026 80.3144 5.95167C80.7921 5.20446 82.1248 4.66543 83.7117 4.66543C85.626 4.66543 87.1821 5.44981 87.29 6.43866H94.7393C93.7571 2.34572 89.0772 0 84.8326 0C82.3135 0 79.1204 0.342007 76.7439 1.66171C74.4598 2.94052 72.8228 4.66914 72.5069 7.14126C71.7674 12.9405 77.1945 14.026 81.8436 14.6654C82.1017 14.6952 82.6062 14.8141 83.157 15.0037C84.5976 15.2974 85.6183 16.026 85.6183 16.8848C85.6183 17.8773 84.2509 18.6989 82.4522 18.8699C82.2442 18.9145 82.0593 18.9368 81.9168 18.9368C80.7689 18.9368 79.987 18.8625 79.4131 18.487C78.689 18.197 78.1613 17.777 77.9726 17.29H70.165C71.205 22.3234 75.8387 24 80.534 24C85.6145 24 92.6747 22.2491 93.4412 16.2342C93.6801 14.3494 93.0099 11.7286 91.0378 10.4089L91.03 10.4126Z",
38
+ fill: "#1D1E1E"
39
+ }
40
+ ),
41
+ /* @__PURE__ */ C(
42
+ "path",
43
+ {
44
+ d: "M1.85771 9.54941H16.9027L0.825439 16.9174L1.85771 9.54941Z",
45
+ fill: "#0077C8"
46
+ }
47
+ )
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ i as DMSiLogo
54
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnSelectorMenuOption.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAK/C,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,MAAM,EACN,MAAM,EACN,sBAAsB,GACvB,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAClE,2CAoBA"}
1
+ {"version":3,"file":"ColumnSelectorMenuOption.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAK/C,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,MAAM,EACN,MAAM,EACN,sBAAsB,GACvB,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAClE,2CAoBA"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { useState as s } from "react";
4
+ import { Checkbox as a } from "../../Checkbox.js";
5
+ import { MenuOption as d } from "../../MenuOption.js";
6
+ function p({
7
+ id: o,
8
+ testid: t,
9
+ column: e,
10
+ toggleColumnVisibility: c
11
+ }) {
12
+ const [r, l] = s(e.getIsVisible()), h = typeof e.columnDef.header == "string" ? e.columnDef.header : null;
13
+ return /* @__PURE__ */ n(d, { id: o, testid: t, defaultChecked: r, children: /* @__PURE__ */ n(
14
+ a,
15
+ {
16
+ id: o ? `${o}-checkbox` : void 0,
17
+ testid: t ? `${t}-checkbox` : void 0,
18
+ label: h ?? "Unknown",
19
+ checked: r,
20
+ onChange: (i) => {
21
+ l(i.target.checked), c(e.id, i.target.checked);
22
+ }
23
+ }
24
+ ) });
25
+ }
26
+ export {
27
+ p as ColumnSelectorMenuOption
28
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ9C,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,qBAAqB,GACtB,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC,2CAwDA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ9C,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,qBAAqB,GACtB,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC,2CAwDA"}
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { jsxs as l, jsx as n } from "react/jsx-runtime";
3
+ import { useRef as c, useState as s } from "react";
4
+ import { Button as a } from "../../Button.js";
5
+ import { DataGridCell as d } from "../../DataGridCell.js";
6
+ import { Icon as v } from "../../Icon.js";
7
+ import { Menu as $ } from "../../Menu.js";
8
+ import { ColumnSelectorMenuOption as h } from "./ColumnSelectorMenuOption.js";
9
+ function w({
10
+ id: o,
11
+ testid: t,
12
+ table: m,
13
+ toggleColumnVisibility: u,
14
+ resetColumnVisibility: f
15
+ }) {
16
+ const r = c(null), [p, i] = s(!1);
17
+ return /* @__PURE__ */ l(
18
+ d,
19
+ {
20
+ id: o,
21
+ testid: t,
22
+ width: "48px",
23
+ type: "header",
24
+ color: "text-secondary-normal",
25
+ ref: r,
26
+ children: [
27
+ /* @__PURE__ */ n(
28
+ a,
29
+ {
30
+ id: o ? `${o}-button` : void 0,
31
+ testid: t ? `${t}-button` : void 0,
32
+ onClick: () => i((e) => !e),
33
+ variant: "navigation",
34
+ iconOnly: !0,
35
+ leftIcon: /* @__PURE__ */ n(v, { name: "tune" })
36
+ }
37
+ ),
38
+ /* @__PURE__ */ l(
39
+ $,
40
+ {
41
+ id: o ? `${o}-menu` : void 0,
42
+ testid: t ? `${t}-menu` : void 0,
43
+ positionTo: r,
44
+ position: "bottom-right",
45
+ show: p,
46
+ setShow: i,
47
+ calculateMinMaxHeight: !0,
48
+ children: [
49
+ /* @__PURE__ */ n(
50
+ a,
51
+ {
52
+ id: o ? `${o}-reset-button` : void 0,
53
+ testid: t ? `${t}-reset-button` : void 0,
54
+ variant: "tertiary",
55
+ onClick: () => {
56
+ f(), i(!1);
57
+ },
58
+ children: "Reset to default"
59
+ }
60
+ ),
61
+ m.getAllColumns().filter((e) => e.columnDef.meta?.inVisibilityMenu).map((e) => /* @__PURE__ */ n(
62
+ h,
63
+ {
64
+ id: o ? `${o}-option-${e.id}` : void 0,
65
+ testid: t ? `${t}-option-${e.id}` : void 0,
66
+ column: e,
67
+ toggleColumnVisibility: u
68
+ },
69
+ e.id
70
+ ))
71
+ ]
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ );
77
+ }
78
+ export {
79
+ w as ColumnSelectorHeaderCell
80
+ };