@dmsi/wedgekit-react 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,113 @@
1
+ "use client";
2
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
3
+ import { clsx as r } from "../node_modules/clsx/dist/clsx.js";
4
+ import { baseTransition as x, componentGap as g } from "../classNames.js";
5
+ import { Paragraph as f } from "./Paragraph.js";
6
+ function $({
7
+ className: i,
8
+ label: s,
9
+ error: c,
10
+ disabled: e,
11
+ checked: l,
12
+ readOnly: n,
13
+ id: p,
14
+ testid: a,
15
+ ...v
16
+ }) {
17
+ const t = p, b = e ? "text-primary-disabled" : c ? "text-primary-error" : "text-primary-normal", h = r(
18
+ !c && !e && "border-border-primary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-focus:border-border-action-hover peer-focus:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active peer-checked:border-0 peer-checked:bg-background-action-secondary-hover"
19
+ ), y = r(
20
+ c && !e && "border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-focus:border-border-action-critical-hover peer-focus:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active peer-checked:bg-background-action-critical-secondary-hover peer-checked:border-0 "
21
+ ), m = r(
22
+ e && "peer-disabled:bg-background-action-secondary-disabled peer-disabled:border-border-primary-normal peer-checked:border-0"
23
+ ), u = r(
24
+ n && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
25
+ );
26
+ return /* @__PURE__ */ d(
27
+ "label",
28
+ {
29
+ htmlFor: t,
30
+ "data-testid": a,
31
+ className: r(
32
+ "flex items-center",
33
+ g,
34
+ e ? "cursor-default" : "cursor-pointer",
35
+ i
36
+ ),
37
+ children: [
38
+ /* @__PURE__ */ d("div", { className: "relative", children: [
39
+ /* @__PURE__ */ o(
40
+ "input",
41
+ {
42
+ id: t,
43
+ "data-testid": a ? `${a}-input` : void 0,
44
+ type: "radio",
45
+ className: "sr-only peer",
46
+ disabled: e,
47
+ checked: l,
48
+ readOnly: n,
49
+ ...v
50
+ }
51
+ ),
52
+ /* @__PURE__ */ o(
53
+ "div",
54
+ {
55
+ className: r(
56
+ "size-6 rounded-full border flex items-center justify-center",
57
+ x,
58
+ h,
59
+ y,
60
+ m,
61
+ u
62
+ ),
63
+ children: l && /* @__PURE__ */ o(
64
+ k,
65
+ {
66
+ className: r(
67
+ "transition-colors",
68
+ !c && !e && "text-icon-on-action-secondary-normal hover:text-icon-on-action-secondary-hover active:text-icon-on-action-secondary-active peer-hover:text-icon-on-action-secondary-hover peer-focus:text-icon-on-action-secondary-hover peer-active:text-icon-on-action-secondary-active",
69
+ c && !e && "text-icon-action-critical-secondary-normal hover:text-icon-action-critical-secondary-hover active:text-icon-action-critical-secondary-active peer-hover:text-icon-action-critical-secondary-hover peer-focus:text-icon-action-critical-secondary-hover peer-active:text-icon-action-critical-secondary-active",
70
+ e && "text-icon-on-action-secondary-disabled",
71
+ n && "text-icon-on-action-secondary-disabled"
72
+ )
73
+ }
74
+ )
75
+ }
76
+ )
77
+ ] }),
78
+ s && /* @__PURE__ */ o(f, { id: t ? `${t}-label` : void 0, testid: a ? `${a}-label` : void 0, padded: !0, color: b, children: s })
79
+ ]
80
+ }
81
+ );
82
+ }
83
+ function k({ className: i }) {
84
+ return /* @__PURE__ */ d(
85
+ "svg",
86
+ {
87
+ className: i,
88
+ xmlns: "http://www.w3.org/2000/svg",
89
+ width: "24",
90
+ height: "24",
91
+ viewBox: "0 0 24 24",
92
+ fill: "none",
93
+ children: [
94
+ /* @__PURE__ */ o(
95
+ "rect",
96
+ {
97
+ x: "1",
98
+ y: "1",
99
+ width: "22",
100
+ height: "22",
101
+ rx: "11",
102
+ stroke: "currentColor",
103
+ strokeWidth: "2"
104
+ }
105
+ ),
106
+ /* @__PURE__ */ o("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
107
+ ]
108
+ }
109
+ );
110
+ }
111
+ export {
112
+ $ as Radio
113
+ };
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsxs as k, Fragment as C, jsx as R } from "react/jsx-runtime";
3
+ import { useRef as a, useState as S, useId as $, useEffect as M } from "react";
4
+ import { Input as j } from "./Input.js";
5
+ function T({
6
+ id: r,
7
+ testid: u,
8
+ label: q,
9
+ error: v,
10
+ children: A,
11
+ readOnly: f,
12
+ renderMenu: s,
13
+ onClick: F,
14
+ wrapperClassName: I,
15
+ removeRoundness: g,
16
+ autocompletePadding: x = !1,
17
+ ...n
18
+ }) {
19
+ const m = a(null), d = a(null), p = a(!0), [c, l] = S(!1), [D, w] = S(!1), h = `search-menu-${$()}`;
20
+ return M(() => {
21
+ if (p.current) {
22
+ p.current = !1;
23
+ return;
24
+ }
25
+ m.current?.focus();
26
+ }, [n.value]), /* @__PURE__ */ k(C, { children: [
27
+ /* @__PURE__ */ R(
28
+ j,
29
+ {
30
+ id: r,
31
+ testid: u,
32
+ variant: "search",
33
+ inputContainerRef: d,
34
+ ref: m,
35
+ label: q,
36
+ wrapperClassName: I,
37
+ autocompletePadding: x,
38
+ onClick: (t) => {
39
+ if (!(n.disabled || f)) {
40
+ if (D) {
41
+ w(!1);
42
+ return;
43
+ }
44
+ F?.(t), l(!c);
45
+ }
46
+ },
47
+ onClear: () => {
48
+ w(!0);
49
+ },
50
+ onKeyDown: (t) => {
51
+ if (l(!0), ["ArrowUp", "ArrowDown"].includes(t.key)) {
52
+ t.preventDefault();
53
+ const o = document.querySelector(
54
+ `[data-menu="${h}"]`
55
+ ), y = o?.querySelector("[data-selected]");
56
+ if (y) {
57
+ const e = Array.from(
58
+ o?.querySelectorAll('[role="menuitem"]') || []
59
+ ), O = e.indexOf(y);
60
+ let i;
61
+ t.key === "ArrowDown" ? i = e[O + 1] || e[0] : i = e[O - 1] || e[e.length - 1], i?.focus();
62
+ } else
63
+ (t.key === "ArrowDown" ? o?.querySelector('[role="menuitem"]') : o?.querySelector(
64
+ '[role="menuitem"]:last-child'
65
+ ))?.focus();
66
+ }
67
+ },
68
+ error: v,
69
+ readOnly: f,
70
+ removeRoundness: g,
71
+ isFocused: s && c,
72
+ ...n
73
+ }
74
+ ),
75
+ s ? s({
76
+ id: r ? `${r}-menu` : void 0,
77
+ testid: u ? `${u}-menu` : void 0,
78
+ positionTo: d,
79
+ show: c,
80
+ setShow: l,
81
+ topOffset: n.caption ? -16 : null,
82
+ autoFocusOff: !0,
83
+ menuName: h
84
+ }) : A
85
+ ] });
86
+ }
87
+ export {
88
+ T as Search
89
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as r, Fragment as n } from "react/jsx-runtime";
2
+ import { useState as s } from "react";
3
+ import { ImagePlaceholder as g } from "../ImagePlaceholder.js";
4
+ function u({
5
+ width: e = 20,
6
+ height: o = 20,
7
+ src: a,
8
+ alt: l
9
+ }) {
10
+ const [m, t] = s(!1);
11
+ return /* @__PURE__ */ r(n, { children: m || !a ? /* @__PURE__ */ r(g, { width: e, height: o }) : /* @__PURE__ */ r(
12
+ "img",
13
+ {
14
+ src: a,
15
+ alt: l,
16
+ width: e,
17
+ height: o,
18
+ draggable: !1,
19
+ loading: "lazy",
20
+ onError: () => t(!0)
21
+ }
22
+ ) });
23
+ }
24
+ export {
25
+ u as SearchResultImage
26
+ };
@@ -0,0 +1,122 @@
1
+ "use client";
2
+ import { jsxs as L, Fragment as U, jsx as p } from "react/jsx-runtime";
3
+ import { useRef as f, useState as w, useId as _, useEffect as z, useCallback as G } from "react";
4
+ import { InputBase as H } from "./Input.js";
5
+ import { Icon as J } from "./Icon.js";
6
+ import { clsx as x } from "../node_modules/clsx/dist/clsx.js";
7
+ function b({
8
+ id: l,
9
+ testid: I,
10
+ label: Q,
11
+ error: T,
12
+ children: C,
13
+ readOnly: m,
14
+ renderMenu: k,
15
+ onClick: R,
16
+ className: F,
17
+ wrapperClassName: K,
18
+ removeRoundness: N,
19
+ displayValue: B,
20
+ value: O,
21
+ searchable: r,
22
+ onChange: A,
23
+ ...a
24
+ }) {
25
+ const S = f(null), y = f(null), [t, $] = w(!1), [h, v] = w(""), g = `select-menu-${_()}`, u = f(""), c = f(null), [j, d] = w("");
26
+ z(() => {
27
+ r && t && S.current?.focus();
28
+ }, [r, t]);
29
+ const E = G(() => {
30
+ y.current?.querySelector("input")?.focus();
31
+ }, []);
32
+ function i(e) {
33
+ $(e), e || (v(""), d(""), u.current = "", c.current && clearTimeout(c.current), r && requestAnimationFrame(E));
34
+ }
35
+ const s = r && t;
36
+ return /* @__PURE__ */ L(U, { children: [
37
+ /* @__PURE__ */ p(
38
+ H,
39
+ {
40
+ id: l,
41
+ testid: I,
42
+ inputContainerRef: y,
43
+ ref: S,
44
+ label: Q,
45
+ after: !m && /* @__PURE__ */ p(
46
+ "span",
47
+ {
48
+ className: x(
49
+ a.disabled ? "text-icon-action-primary-disabled" : "text-icon-action-primary-normal",
50
+ "contents"
51
+ ),
52
+ children: /* @__PURE__ */ p(J, { name: "keyboard_arrow_down" })
53
+ }
54
+ ),
55
+ maxLength: s ? void 0 : 0,
56
+ className: x(!s && "!caret-transparent !cursor-default", F),
57
+ wrapperClassName: K,
58
+ onKeyDown: (e) => {
59
+ if (s && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
60
+ e.preventDefault();
61
+ const n = document.querySelector(
62
+ `[data-menu="${g}"]`
63
+ ), D = n?.querySelector("[data-selected]");
64
+ if (D) {
65
+ const o = Array.from(
66
+ n?.querySelectorAll('[role="menuitem"]') ?? []
67
+ ), q = o.indexOf(D);
68
+ (e.key === "ArrowDown" ? o[q + 1] ?? o[0] : o[q - 1] ?? o[o.length - 1])?.focus();
69
+ } else
70
+ (e.key === "ArrowDown" ? n?.querySelector('[role="menuitem"]') : n?.querySelector('[role="menuitem"]:last-child'))?.focus();
71
+ return;
72
+ }
73
+ if (!t && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
74
+ e.preventDefault(), i(!0);
75
+ return;
76
+ }
77
+ if (!t && (e.key === " " || e.key === "Enter")) {
78
+ e.preventDefault(), e.target.click();
79
+ return;
80
+ }
81
+ if (t && !r && e.key === " " && !u.current) {
82
+ e.preventDefault(), i(!1);
83
+ return;
84
+ }
85
+ if (!r && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
86
+ e.preventDefault(), c.current && clearTimeout(c.current);
87
+ const n = u.current + e.key.toLowerCase();
88
+ u.current = n, c.current = setTimeout(() => {
89
+ u.current = "", d("");
90
+ }, 1e3), d(n), t || i(!0);
91
+ }
92
+ },
93
+ onClick: (e) => {
94
+ a.disabled || m || (i(!t), R?.(e));
95
+ },
96
+ error: T,
97
+ readOnly: m,
98
+ removeRoundness: N,
99
+ isFocused: t,
100
+ ...a,
101
+ onChange: (e) => {
102
+ s && v(e.target.value), A?.(e);
103
+ },
104
+ value: s ? h : B ?? O ?? (A ? "" : void 0)
105
+ }
106
+ ),
107
+ k ? k({
108
+ id: l ? `${l}-menu` : void 0,
109
+ positionTo: y,
110
+ show: t,
111
+ setShow: i,
112
+ topOffset: a.caption ? -16 : null,
113
+ searchQuery: r ? h : void 0,
114
+ autoFocusOff: r ? !0 : void 0,
115
+ menuName: g,
116
+ typeAheadQuery: r ? void 0 : j || void 0
117
+ }) : C
118
+ ] });
119
+ }
120
+ export {
121
+ b as Select
122
+ };
@@ -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
+ };
@@ -1,5 +1,5 @@
1
1
  type SpinnerProps = {
2
- size?: "small" | "large";
2
+ size?: 'small' | 'large';
3
3
  testid?: string;
4
4
  };
5
5
  export declare function Spinner({ size, testid }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,OAAO,CAAE,EAAE,IAAc,EAAE,MAAM,EAAE,EAAE,YAAY,2CAuBhE"}
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,IAAc,EAAE,MAAM,EAAE,EAAE,YAAY,2CAuB/D"}
@@ -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
+ };