@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,137 @@
1
+ import { jsxs as $, jsx as g } from "react/jsx-runtime";
2
+ import { clsx as t } from "../node_modules/clsx/dist/clsx.js";
3
+ import { paddingUsingComponentGap as z, componentPaddingMinus2pxBorder as E, componentGap as M, baseTransition as T, componentPaddingXUsingComponentGap as X, typography as A } from "../classNames.js";
4
+ import { Spinner as D } from "./Spinner.js";
5
+ function L({
6
+ variant: a = "primary",
7
+ as: c = "button",
8
+ block: v,
9
+ leftIcon: n,
10
+ rightIcon: d,
11
+ className: m,
12
+ classNameLabel: x,
13
+ disabled: b = !1,
14
+ children: s,
15
+ iconOnly: i = !1,
16
+ colorClassName: r,
17
+ href: l,
18
+ id: e,
19
+ testid: o,
20
+ isLoading: u,
21
+ fontNormal: h = !1,
22
+ ...p
23
+ }) {
24
+ const k = a === "primary" && t(
25
+ r?.trim() ? r : "text-text-on-action-primary-normal",
26
+ "bg-background-action-primary-normal border-background-action-primary-normal",
27
+ "hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
28
+ "focus:bg-background-action-primary-hover focus:border-background-action-primary-hover focus:outline-0",
29
+ "active:bg-background-action-primary-active active:border-background-action-primary-active",
30
+ "disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
31
+ ), f = a === "secondary" && t(
32
+ r?.trim() ? r : "text-text-action-primary-normal",
33
+ "bg-background-action-secondary-normal border-border-action-normal",
34
+ "hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
35
+ "focus:bg-background-action-secondary-hover focus:border-border-action-hover focus:text-text-action-primary-hover focus:outline-0",
36
+ "active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
37
+ "disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
38
+ ), S = a === "tertiary" && t(
39
+ "bg-transparent border-transparent",
40
+ i ? r?.trim() ? r : "text-icon-action-primary-normal" : r?.trim() ? r : "text-text-action-primary-normal",
41
+ "bg-transparent border-transparent",
42
+ "hover:bg-background-action-secondary-hover hover:border-background-action-secondary-hover hover:text-text-action-primary-hover",
43
+ "focus:bg-background-action-secondary-hover focus:border-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
44
+ "active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
45
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
46
+ ), V = a === "quarternary-outlined" && t(
47
+ "bg-transparent border-transparent",
48
+ i ? r?.trim() ? r : "text-icon-action-primary-normal" : r?.trim() ? r : "text-text-primary-normal",
49
+ "bg-transparent border-transparent",
50
+ "hover:bg-transparent hover:border-border-primary-normal hover:text-text-primary-normal",
51
+ "focus:bg-transparent focus:border-border-primary-normal focus:text-text-primary-normal focus:outline-0",
52
+ "active:bg-transparent active:border-transparent active:text-text-primary-active",
53
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
54
+ ), w = a === "primary-critical" && t(
55
+ r?.trim() ? r : "text-text-on-action-primary-normal",
56
+ "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
57
+ "hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
58
+ "focus:bg-background-action-critical-primary-hover focus:border-background-action-critical-primary-hover focus:outline-0",
59
+ "active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
60
+ "disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
61
+ ), j = a === "secondary-critical" && t(
62
+ r?.trim() ? r : "text-text-action-critical-normal",
63
+ "bg-background-action-critical-secondary-normal border-border-action-critical-normal",
64
+ "hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
65
+ "focus:bg-background-action-critical-secondary-hover focus:border-border-action-critical-hover focus:text-text-action-critical-hover focus:outline-0",
66
+ "active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
67
+ "disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
68
+ ), G = a === "tertiary-critical" && t(
69
+ r?.trim() ? r : "text-text-action-critical-normal",
70
+ "bg-transparent border-transparent text-text-action-critical-normal",
71
+ "hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
72
+ "focus:bg-background-action-critical-secondary-hover focus:border-background-action-critical-secondary-hover focus:text-text-action-critical-hover focus:outline-0",
73
+ "active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
74
+ "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
75
+ ), q = a === "navigation" && t(
76
+ r?.trim() ? r : "text-text-action-primary-normal",
77
+ "bg-transparent",
78
+ "hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover",
79
+ "focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
80
+ "active:bg-background-action-secondary-active active:text-text-action-primary-active",
81
+ "disabled:bg-transparent disabled:text-text-action-primary-normal",
82
+ "flex-col",
83
+ z
84
+ ), B = a !== "navigation" && t("border-2 flex-row", E, M), P = t(
85
+ b ? "cursor-default" : "cursor-pointer",
86
+ v ? "w-full" : "w-fit",
87
+ T,
88
+ "rounded-sm whitespace-nowrap inline-flex items-center justify-center group/btn",
89
+ k,
90
+ f,
91
+ S,
92
+ V,
93
+ w,
94
+ j,
95
+ G,
96
+ q,
97
+ B,
98
+ m
99
+ ), U = t(
100
+ "min-h-6 flex items-center justify-center",
101
+ x,
102
+ h && "font-normal!",
103
+ X,
104
+ A.buttonLabel
105
+ ), y = l && !c ? "a" : c;
106
+ return /* @__PURE__ */ $(
107
+ y,
108
+ {
109
+ id: e,
110
+ "data-testid": o,
111
+ type: y === "button" ? "button" : void 0,
112
+ className: P,
113
+ ...p,
114
+ onClick: p.onClick,
115
+ disabled: b,
116
+ href: l,
117
+ "data-theme": a === "navigation" ? "brand" : void 0,
118
+ children: [
119
+ n && n,
120
+ u && /* @__PURE__ */ g(D, { size: "small" }),
121
+ !i && !u && s && /* @__PURE__ */ g(
122
+ "span",
123
+ {
124
+ id: e ? `${e}-label` : void 0,
125
+ "data-testid": o ? `${o}-label` : void 0,
126
+ className: U,
127
+ children: s
128
+ }
129
+ ),
130
+ d && d
131
+ ]
132
+ }
133
+ );
134
+ }
135
+ export {
136
+ L as Button
137
+ };
@@ -0,0 +1,405 @@
1
+ import { jsx as r, jsxs as U } from "react/jsx-runtime";
2
+ import { clsx as u } from "../node_modules/clsx/dist/clsx.js";
3
+ import { layoutGap as B, layoutPaddding as at, componentPadding as _, typography as Y } from "../classNames.js";
4
+ import { Icon as H } from "./Icon.js";
5
+ import ot, { useState as $, useEffect as J, useRef as K } from "react";
6
+ import { Temporal as f } from "../node_modules/@js-temporal/polyfill/dist/index.esm.js";
7
+ import { Menu as Q } from "./Menu.js";
8
+ import { MenuOption as R } from "./MenuOption.js";
9
+ import { Button as z } from "./Button.js";
10
+ function ht(h) {
11
+ return h.dayOfWeek === 6 || h.dayOfWeek === 7;
12
+ }
13
+ function it({
14
+ date: h,
15
+ isInMonth: y,
16
+ isToday: x,
17
+ isSelected: o,
18
+ inRange: n,
19
+ isDisabled: i,
20
+ isRangeStart: d,
21
+ isRangeEnd: p,
22
+ onClick: b,
23
+ onMouseEnter: c,
24
+ onMouseLeave: j,
25
+ cellPadding: k = "",
26
+ isRangeDisabled: l = !1,
27
+ id: v,
28
+ testid: N,
29
+ ...g
30
+ }) {
31
+ return /* @__PURE__ */ r(
32
+ "span",
33
+ {
34
+ ...g,
35
+ id: v,
36
+ "data-testid": N,
37
+ className: u(
38
+ "flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
39
+ Y.caption,
40
+ k,
41
+ !x && !o && !n && !i && !d && !p && "border-transparent active:bg-background-primary-normal",
42
+ !y && "border-transparent",
43
+ // Today: subtle border ring
44
+ x && !o && !n && "rounded-full border-border-primary-normal hover:rounded-base hover:border-transparent active:rounded-full active:bg-transparent active:border-border-primary-normal",
45
+ // Selected: Figma blue, white text, strong shadow
46
+ o && "bg-background-action-primary-normal text-text-on-action-primary-normal border-border-action-normal z-10",
47
+ !o && !n && "rounded-base",
48
+ // When range is disabled OR when only 'from' is selected (no range yet), apply rounded corners
49
+ (l || !n && o) && "rounded-base",
50
+ n && o && "hover:border-border-action-hover hover:bg-background-action-primary-hover active:text-text-on-action-primary-active active:bg-background-action-primary-active",
51
+ // In range: Figma light blue background
52
+ n && !o && "bg-background-action-secondary-hover text-text-primary-normal border-border-action-normal border-x-0 active:bg-background-action-secondary-hover active:border-border-action-active active:text-text-action-primary-active hover:border-border-action-hover",
53
+ // Disabled: Figma gray, no pointer, no hover
54
+ i && !n ? "text-text-primary-disabled bg-transparent pointer-events-none opacity-40 border-transparent" : [
55
+ !o && "text-text-primary-normal",
56
+ !o && "hover:bg-background-action-secondary-hover",
57
+ "cursor-pointer",
58
+ // Figma hover: blue bg, blue text (or red text if selected)
59
+ !o && "hover:bg-action-100 hover:text-text-action-primary-hover",
60
+ // Figma active: darker blue bg, white text
61
+ !o && !n && "active:bg-transparent active:text-text-action-primary-active",
62
+ // Figma focus: ring
63
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-400"
64
+ ],
65
+ d && "rounded-l",
66
+ p && "rounded-r"
67
+ ),
68
+ tabIndex: i ? -1 : 0,
69
+ "aria-disabled": i,
70
+ onClick: () => !i && y && b(),
71
+ onMouseEnter: () => y && c(),
72
+ onMouseLeave: () => y && j(),
73
+ children: y ? h.day : ""
74
+ }
75
+ );
76
+ }
77
+ function bt({
78
+ from: h,
79
+ to: y,
80
+ onChange: x,
81
+ onPendingFromChange: o,
82
+ isDateAvailable: n,
83
+ mode: i = "double",
84
+ cardStyle: d = !1,
85
+ disableRange: p = !1,
86
+ id: b,
87
+ testid: c
88
+ }) {
89
+ const j = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], k = (t) => {
90
+ if (t)
91
+ try {
92
+ return typeof t == "number" ? f.PlainDate.from(new Date(t).toISOString().slice(0, 10)) : typeof t == "string" ? f.PlainDate.from(t) : void 0;
93
+ } catch (e) {
94
+ return console.error("Invalid date format:", t, e), f.Now.plainDateISO();
95
+ }
96
+ }, l = k(h), v = k(y), N = f.Now.plainDateISO(), [g, W] = $(
97
+ l ?? N.with({ day: 1 })
98
+ ), [E, S] = $("from"), [m, T] = $(void 0), [O, q] = $(void 0);
99
+ J(() => {
100
+ l ? W(l.with({ day: 1 })) : v && W(v.with({ day: 1 }));
101
+ }, [h, y]), J(() => {
102
+ l && v && (S("from"), T(void 0), q(void 0));
103
+ }, [h, y]);
104
+ function C(t) {
105
+ const e = g.add({ months: t }).with({ day: 1 }), w = e.daysInMonth, M = e.dayOfWeek % 7;
106
+ return {
107
+ name: e.toLocaleString("en-US", { month: "long" }),
108
+ year: e.year,
109
+ days: w,
110
+ firstDayOffset: M,
111
+ date: e
112
+ };
113
+ }
114
+ function G(t) {
115
+ const e = g.with({ month: t }).with({ day: 1 }), w = e.daysInMonth, M = e.dayOfWeek % 7;
116
+ return {
117
+ name: e.toLocaleString("en-US", { month: "long" }),
118
+ year: e.year,
119
+ days: w,
120
+ firstDayOffset: M,
121
+ date: e
122
+ };
123
+ }
124
+ function I(t) {
125
+ if (!(n && !n(t))) {
126
+ if (i === "single" && p) {
127
+ x && x(t.toString(), t.toString());
128
+ return;
129
+ }
130
+ if (E === "from")
131
+ T(t), S("to"), q(void 0), o?.(t.toString());
132
+ else if (m) {
133
+ if (x) {
134
+ const [e, w] = f.PlainDate.compare(t, m) < 0 ? [t, m] : [m, t];
135
+ x(e.toString(), w.toString());
136
+ }
137
+ T(void 0), S("from"), q(void 0);
138
+ }
139
+ }
140
+ }
141
+ function L(t) {
142
+ if (i === "single" && p)
143
+ return !1;
144
+ if (m && E === "to" && O) {
145
+ const [e, w] = f.PlainDate.compare(O, m) < 0 ? [O, m] : [m, O];
146
+ return f.PlainDate.compare(t, e) >= 0 && f.PlainDate.compare(t, w) <= 0;
147
+ }
148
+ return !m && l && v ? f.PlainDate.compare(t, l) >= 0 && f.PlainDate.compare(t, v) <= 0 : !1;
149
+ }
150
+ return /* @__PURE__ */ r(
151
+ "div",
152
+ {
153
+ id: b,
154
+ "data-testid": c,
155
+ className: u(
156
+ "relative rounded-base w-fit",
157
+ d ? "bg-background-grouped-primary-normal" : "bg-background-transparent",
158
+ at,
159
+ B,
160
+ d && "shadow-4",
161
+ // baseTransition,
162
+ "overflow-hidden"
163
+ ),
164
+ children: /* @__PURE__ */ r(
165
+ "div",
166
+ {
167
+ className: u(
168
+ "flex flex-row items-start justify-start bg-background-transparent overflow-clip",
169
+ B
170
+ ),
171
+ children: (i === "double" ? [0, 1] : [0]).map((t, e) => /* @__PURE__ */ r(
172
+ ct,
173
+ {
174
+ getMonthData: C,
175
+ getMonthDataWith: G,
176
+ offset: t,
177
+ idx: e,
178
+ id: b,
179
+ testid: c,
180
+ baseMonth: g,
181
+ setBaseMonth: W,
182
+ mode: i,
183
+ pendingFrom: m,
184
+ weekDays: j,
185
+ fromDate: l,
186
+ toDate: v,
187
+ isDateAvailable: n,
188
+ disableRange: p,
189
+ hoveredDate: O,
190
+ isInRange: L,
191
+ today: N,
192
+ setHoveredDate: q,
193
+ handleDayClick: I
194
+ },
195
+ e
196
+ ))
197
+ }
198
+ )
199
+ }
200
+ );
201
+ }
202
+ function ct({
203
+ getMonthData: h,
204
+ getMonthDataWith: y,
205
+ offset: x,
206
+ idx: o,
207
+ id: n,
208
+ testid: i,
209
+ baseMonth: d,
210
+ setBaseMonth: p,
211
+ mode: b,
212
+ pendingFrom: c,
213
+ weekDays: j,
214
+ fromDate: k,
215
+ toDate: l,
216
+ isDateAvailable: v,
217
+ disableRange: N,
218
+ hoveredDate: g,
219
+ isInRange: W,
220
+ today: E,
221
+ setHoveredDate: S,
222
+ handleDayClick: m
223
+ }) {
224
+ const T = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], O = Array.from({ length: 100 }).map(
225
+ (a, P) => d.year - 50 + P
226
+ ), [q, C] = $(!1), [G, I] = $(!1), L = K(null), t = K(null), e = h(x), w = 42, M = e.firstDayOffset;
227
+ return /* @__PURE__ */ U(ot.Fragment, { children: [
228
+ /* @__PURE__ */ U(
229
+ "div",
230
+ {
231
+ className: u("flex flex-col"),
232
+ children: [
233
+ /* @__PURE__ */ U(
234
+ "div",
235
+ {
236
+ className: u(
237
+ "flex flex-row items-center justify-between",
238
+ Y.label,
239
+ "text-text-action-primary-normal"
240
+ ),
241
+ children: [
242
+ o === 0 ? /* @__PURE__ */ r(
243
+ z,
244
+ {
245
+ iconOnly: !0,
246
+ leftIcon: /* @__PURE__ */ r(H, { name: "chevron_left" }),
247
+ variant: "quarternary-outlined",
248
+ id: n ? `${n}-prev-month-button` : void 0,
249
+ "data-testid": i ? `${i}-prev-month-button` : void 0,
250
+ type: "button",
251
+ className: u(
252
+ "flex items-center justify-center text-icon-action-primary-normal hover:bg-background-action-secondary-hover! hover:border-transparent! hover:text-icon-action-secondary-hover! active:bg-background-action-secondary-active! active:text-icon-action-secondary-active!",
253
+ _
254
+ ),
255
+ "aria-label": "Previous month",
256
+ onClick: () => p(d.subtract({ months: 1 }))
257
+ }
258
+ ) : /* @__PURE__ */ r("span", { className: u(_, "mr-1") }),
259
+ /* @__PURE__ */ U("div", { children: [
260
+ /* @__PURE__ */ r(
261
+ z,
262
+ {
263
+ variant: "tertiary",
264
+ ref: (a) => {
265
+ L.current = a;
266
+ },
267
+ type: "button",
268
+ onClick: () => {
269
+ C(!0), I(!1);
270
+ },
271
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] pr-0!",
272
+ children: e.name
273
+ }
274
+ ),
275
+ /* @__PURE__ */ r(
276
+ Q,
277
+ {
278
+ show: q,
279
+ positionTo: L,
280
+ setShow: () => C(!1),
281
+ children: T.map((a) => [a, y(a + 1)]).map(([a, P]) => /* @__PURE__ */ r(
282
+ R,
283
+ {
284
+ selected: d.month === a + 1,
285
+ onClick: () => {
286
+ p(d.with({ month: a + 1 })), C(!1);
287
+ },
288
+ children: P.name
289
+ },
290
+ P.name
291
+ ))
292
+ }
293
+ ),
294
+ /* @__PURE__ */ r(
295
+ z,
296
+ {
297
+ variant: "tertiary",
298
+ ref: (a) => {
299
+ t.current = a;
300
+ },
301
+ type: "button",
302
+ onClick: () => {
303
+ I(!0), C(!1);
304
+ },
305
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate pl-0!",
306
+ children: e.year
307
+ }
308
+ ),
309
+ /* @__PURE__ */ r(
310
+ Q,
311
+ {
312
+ show: G,
313
+ positionTo: t,
314
+ setShow: () => I(!1),
315
+ children: O.map((a) => /* @__PURE__ */ r(
316
+ R,
317
+ {
318
+ selected: d.year === a,
319
+ onClick: () => {
320
+ p(d.with({ year: a })), I(!1);
321
+ },
322
+ children: a
323
+ },
324
+ a
325
+ ))
326
+ }
327
+ )
328
+ ] }),
329
+ b !== "double" || o === 1 ? /* @__PURE__ */ r(
330
+ z,
331
+ {
332
+ iconOnly: !0,
333
+ rightIcon: /* @__PURE__ */ r(H, { name: "chevron_right" }),
334
+ variant: "quarternary-outlined",
335
+ id: n ? `${n}-next-month-button` : void 0,
336
+ "data-testid": i ? `${i}-next-month-button` : void 0,
337
+ type: "button",
338
+ className: u(
339
+ "flex items-center justify-center text-icon-action-primary-normal hover:bg-background-action-secondary-hover! hover:border-transparent! hover:text-icon-action-secondary-hover! active:bg-background-action-secondary-active! active:text-icon-action-secondary-active!",
340
+ _
341
+ ),
342
+ "aria-label": "Next month",
343
+ onClick: () => p(d.add({ months: 1 }))
344
+ }
345
+ ) : /* @__PURE__ */ r("span", { className: u(_, "ml-1") })
346
+ ]
347
+ }
348
+ ),
349
+ /* @__PURE__ */ r("div", { className: u("grid grid-cols-7"), children: j.map((a) => /* @__PURE__ */ r(
350
+ "span",
351
+ {
352
+ className: u(
353
+ Y.caption,
354
+ "text-text-secondary-normal text-center",
355
+ "w-10"
356
+ ),
357
+ children: a
358
+ },
359
+ a
360
+ )) }),
361
+ /* @__PURE__ */ r("div", { className: u("grid grid-cols-7"), children: Array.from({ length: w }).map((a, P) => {
362
+ const A = P - M + 1, s = e.date.with({ day: 1 }).add({
363
+ days: P - M
364
+ }), D = A > 0 && A <= e.days, V = D && s.equals(E), X = D && (!c && k && s.equals(k) || !c && l && s.equals(l) || c && s.equals(c)), Z = D && W(s), F = !D || (v ? !v(s) : !1), tt = g && c && f.PlainDate.compare(g, c) < 0, et = g && c && f.PlainDate.compare(g, c) >= 0, rt = b === "single" && N ? !1 : !c && D && k && s.equals(k) || et && s.equals(c), nt = b === "single" && N ? !1 : !c && D && l && s.equals(l) || tt && s.equals(c);
365
+ return /* @__PURE__ */ r(
366
+ it,
367
+ {
368
+ id: n ? `${n}-date-${s.toString()}` : void 0,
369
+ testid: i ? `${i}-date-${s.toString()}` : void 0,
370
+ date: s,
371
+ isInMonth: !!D,
372
+ isToday: !!V,
373
+ isSelected: !!X,
374
+ inRange: !!Z,
375
+ isDisabled: !!F,
376
+ onClick: () => m(s),
377
+ onMouseEnter: () => S(s),
378
+ onMouseLeave: () => S(void 0),
379
+ isRangeStart: !!rt,
380
+ isRangeEnd: !!nt,
381
+ isRangeDisabled: b === "single" && N,
382
+ cellPadding: _
383
+ },
384
+ P
385
+ );
386
+ }) })
387
+ ]
388
+ }
389
+ ),
390
+ b === "double" && o === 0 && /* @__PURE__ */ r(
391
+ "div",
392
+ {
393
+ className: u(
394
+ "self-stretch bg-border-primary-normal rounded-base",
395
+ // 1px width, full height, matches Figma divider
396
+ "w-px"
397
+ )
398
+ }
399
+ )
400
+ ] }, e.name + e.year);
401
+ }
402
+ export {
403
+ bt as CalendarRange,
404
+ ht as isWeekend
405
+ };
@@ -0,0 +1,99 @@
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import { clsx as f } from "../node_modules/clsx/dist/clsx.js";
3
+ import { typography as d } from "../classNames.js";
4
+ import { Icon as m } from "./Icon.js";
5
+ function N({
6
+ className: r,
7
+ children: e,
8
+ as: c = "span",
9
+ style: n = "default",
10
+ color: t,
11
+ align: x,
12
+ id: a,
13
+ testid: i,
14
+ marginTopDesktop: s,
15
+ ...l
16
+ }) {
17
+ return /* @__PURE__ */ p("div", { id: a, "data-testid": i, className: "flex gap-1", children: [
18
+ /* @__PURE__ */ o(
19
+ u,
20
+ {
21
+ id: a,
22
+ testid: i,
23
+ style: n,
24
+ size: 16,
25
+ className: "mt-[3px] desktop:mt-0"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ o(
29
+ c,
30
+ {
31
+ id: a ? `${a}-text` : void 0,
32
+ "data-testid": i ? `${i}-text` : void 0,
33
+ className: f(
34
+ d.caption.replace("text-text-primary-normal", ""),
35
+ (n === "default" || n === "info") && "text-text-secondary-normal",
36
+ n === "success" && "text-text-success-normal",
37
+ n === "warning" && "text-text-warning-normal",
38
+ n === "error" && "text-text-critical-normal",
39
+ x === "left" && "text-left",
40
+ x === "center" && "text-center",
41
+ x === "right" && "text-right",
42
+ r,
43
+ s && "desktop:mt-px"
44
+ ),
45
+ ...l,
46
+ style: {
47
+ color: t ? `var(--color-${t})` : void 0
48
+ },
49
+ children: e
50
+ }
51
+ )
52
+ ] });
53
+ }
54
+ const u = ({
55
+ style: r,
56
+ size: e,
57
+ className: c,
58
+ id: n,
59
+ testid: t
60
+ }) => r === "success" ? /* @__PURE__ */ o("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ o(
61
+ m,
62
+ {
63
+ id: n ? `${n}-icon` : void 0,
64
+ testid: t ? `${t}-icon` : void 0,
65
+ className: c,
66
+ name: "check_circle",
67
+ size: e
68
+ }
69
+ ) }) : r === "warning" ? /* @__PURE__ */ o("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ o(
70
+ m,
71
+ {
72
+ id: n ? `${n}-icon` : void 0,
73
+ testid: t ? `${t}-icon` : void 0,
74
+ className: c,
75
+ name: "warning",
76
+ size: e
77
+ }
78
+ ) }) : r === "error" ? /* @__PURE__ */ o("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ o(
79
+ m,
80
+ {
81
+ id: n ? `${n}-icon` : void 0,
82
+ testid: t ? `${t}-icon` : void 0,
83
+ className: c,
84
+ name: "info",
85
+ size: e
86
+ }
87
+ ) }) : r === "info" ? /* @__PURE__ */ o("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ o(
88
+ m,
89
+ {
90
+ id: n ? `${n}-icon` : void 0,
91
+ testid: t ? `${t}-icon` : void 0,
92
+ className: c,
93
+ name: "info",
94
+ size: e
95
+ }
96
+ ) }) : null;
97
+ export {
98
+ N as Caption
99
+ };
@@ -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
+ };