@dmsi/wedgekit-react 0.0.1277 → 1.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 (645) hide show
  1. package/README.md +4 -32
  2. package/dist/classNames.d.ts +41 -0
  3. package/dist/classNames.d.ts.map +1 -0
  4. package/dist/components/AccessCard.d.ts +14 -0
  5. package/dist/components/AccessCard.d.ts.map +1 -0
  6. package/dist/components/AccessCardGroup.d.ts +15 -0
  7. package/dist/components/AccessCardGroup.d.ts.map +1 -0
  8. package/dist/components/AccessChangerTabItem.d.ts +11 -0
  9. package/dist/components/AccessChangerTabItem.d.ts.map +1 -0
  10. package/dist/components/Accordion.d.ts +15 -0
  11. package/dist/components/Accordion.d.ts.map +1 -0
  12. package/dist/components/Alert.d.ts +13 -0
  13. package/dist/components/Alert.d.ts.map +1 -0
  14. package/dist/components/Breadcrumbs.d.ts +19 -0
  15. package/dist/components/Breadcrumbs.d.ts.map +1 -0
  16. package/dist/components/Button.d.ts +46 -0
  17. package/dist/components/Button.d.ts.map +1 -0
  18. package/dist/components/CalendarRange.d.ts +28 -0
  19. package/dist/components/CalendarRange.d.ts.map +1 -0
  20. package/dist/components/Caption.d.ts +15 -0
  21. package/dist/components/Caption.d.ts.map +1 -0
  22. package/dist/components/Card.d.ts +28 -0
  23. package/dist/components/Card.d.ts.map +1 -0
  24. package/dist/components/Checkbox.d.ts +12 -0
  25. package/dist/components/Checkbox.d.ts.map +1 -0
  26. package/dist/components/CompactImagesPreview.d.ts +25 -0
  27. package/dist/components/CompactImagesPreview.d.ts.map +1 -0
  28. package/dist/components/ContentTab.d.ts +12 -0
  29. package/dist/components/ContentTab.d.ts.map +1 -0
  30. package/dist/components/ContentTabs.d.ts +23 -0
  31. package/dist/components/ContentTabs.d.ts.map +1 -0
  32. package/dist/components/DMSiLogo.d.ts +2 -0
  33. package/dist/components/DMSiLogo.d.ts.map +1 -0
  34. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.d.ts +8 -0
  35. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.d.ts.map +1 -0
  36. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.d.ts +9 -0
  37. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.d.ts.map +1 -0
  38. package/dist/components/DataGrid/PinnedColumns.d.ts +26 -0
  39. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -0
  40. package/dist/components/DataGrid/TableBody/LoadingCell.d.ts +7 -0
  41. package/dist/components/DataGrid/TableBody/LoadingCell.d.ts.map +1 -0
  42. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +22 -0
  43. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -0
  44. package/dist/components/DataGrid/TableBody/index.d.ts +26 -0
  45. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -0
  46. package/dist/components/DataGrid/index.d.ts +5 -0
  47. package/dist/components/DataGrid/index.d.ts.map +1 -0
  48. package/dist/components/DataGrid/types.d.ts +74 -0
  49. package/dist/components/DataGrid/types.d.ts.map +1 -0
  50. package/dist/components/DataGrid/utils.d.ts +3 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -0
  52. package/dist/components/DataGridCell.d.ts +46 -0
  53. package/dist/components/DataGridCell.d.ts.map +1 -0
  54. package/dist/components/DataTable.d.ts +36 -0
  55. package/dist/components/DataTable.d.ts.map +1 -0
  56. package/dist/components/DateInput.d.ts +38 -0
  57. package/dist/components/DateInput.d.ts.map +1 -0
  58. package/dist/components/DateRangeInput.d.ts +36 -0
  59. package/dist/components/DateRangeInput.d.ts.map +1 -0
  60. package/dist/components/DebugJson.d.ts +5 -0
  61. package/dist/components/DebugJson.d.ts.map +1 -0
  62. package/dist/components/Display.d.ts +14 -0
  63. package/dist/components/Display.d.ts.map +1 -0
  64. package/dist/components/EditingContext.d.ts +14 -0
  65. package/dist/components/EditingContext.d.ts.map +1 -0
  66. package/dist/components/EmblaCarousel/ArrowButtons.d.ts +9 -0
  67. package/dist/components/EmblaCarousel/ArrowButtons.d.ts.map +1 -0
  68. package/dist/components/EmblaCarousel/SelectedSnapDisplay.d.ts +7 -0
  69. package/dist/components/EmblaCarousel/SelectedSnapDisplay.d.ts.map +1 -0
  70. package/dist/components/EmblaCarousel/index.d.ts +20 -0
  71. package/dist/components/EmblaCarousel/index.d.ts.map +1 -0
  72. package/dist/components/EmblaCarousel/usePrevNextButtons.d.ts +10 -0
  73. package/dist/components/EmblaCarousel/usePrevNextButtons.d.ts.map +1 -0
  74. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.d.ts +8 -0
  75. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.d.ts.map +1 -0
  76. package/dist/components/EmptyCartIcon.d.ts +2 -0
  77. package/dist/components/EmptyCartIcon.d.ts.map +1 -0
  78. package/dist/components/FilterGroup.d.ts +29 -0
  79. package/dist/components/FilterGroup.d.ts.map +1 -0
  80. package/dist/components/FullViewportBox.d.ts +6 -0
  81. package/dist/components/FullViewportBox.d.ts.map +1 -0
  82. package/dist/components/Grid.d.ts +22 -0
  83. package/dist/components/Grid.d.ts.map +1 -0
  84. package/dist/components/Heading.d.ts +15 -0
  85. package/dist/components/Heading.d.ts.map +1 -0
  86. package/dist/components/HorizontalDivider.d.ts +8 -0
  87. package/dist/components/HorizontalDivider.d.ts.map +1 -0
  88. package/dist/components/Icon.d.ts +11 -0
  89. package/dist/components/Icon.d.ts.map +1 -0
  90. package/dist/components/ImagePlaceholder.d.ts +3 -0
  91. package/dist/components/ImagePlaceholder.d.ts.map +1 -0
  92. package/dist/components/Input.d.ts +50 -0
  93. package/dist/components/Input.d.ts.map +1 -0
  94. package/dist/components/InputGroup.d.ts +12 -0
  95. package/dist/components/InputGroup.d.ts.map +1 -0
  96. package/dist/components/Label.d.ts +10 -0
  97. package/dist/components/Label.d.ts.map +1 -0
  98. package/dist/components/Link.d.ts +16 -0
  99. package/dist/components/Link.d.ts.map +1 -0
  100. package/dist/components/List.d.ts +7 -0
  101. package/dist/components/List.d.ts.map +1 -0
  102. package/dist/components/ListGroup.d.ts +26 -0
  103. package/dist/components/ListGroup.d.ts.map +1 -0
  104. package/dist/components/LiveChatComponent.d.ts +17 -0
  105. package/dist/components/LiveChatComponent.d.ts.map +1 -0
  106. package/dist/components/LoadingScrim.d.ts +14 -0
  107. package/dist/components/LoadingScrim.d.ts.map +1 -0
  108. package/dist/components/LogoAgilityTopBar.d.ts +2 -0
  109. package/dist/components/LogoAgilityTopBar.d.ts.map +1 -0
  110. package/dist/components/LogoDMSiTopBar.d.ts +2 -0
  111. package/dist/components/LogoDMSiTopBar.d.ts.map +1 -0
  112. package/dist/components/LogoMillworkTopBar.d.ts +2 -0
  113. package/dist/components/LogoMillworkTopBar.d.ts.map +1 -0
  114. package/dist/components/MainBar.d.ts +14 -0
  115. package/dist/components/MainBar.d.ts.map +1 -0
  116. package/dist/components/MaxViewportBox.d.ts +6 -0
  117. package/dist/components/MaxViewportBox.d.ts.map +1 -0
  118. package/dist/components/Menu.d.ts +23 -0
  119. package/dist/components/Menu.d.ts.map +1 -0
  120. package/dist/components/MenuOption.d.ts +65 -0
  121. package/dist/components/MenuOption.d.ts.map +1 -0
  122. package/dist/components/MobileDataGrid/ColumnList.d.ts +13 -0
  123. package/dist/components/MobileDataGrid/ColumnList.d.ts.map +1 -0
  124. package/dist/components/MobileDataGrid/ColumnSelector/index.d.ts +2 -0
  125. package/dist/components/MobileDataGrid/ColumnSelector/index.d.ts.map +1 -0
  126. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts +24 -0
  127. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -0
  128. package/dist/components/MobileDataGrid/GridContextProvider/index.d.ts +15 -0
  129. package/dist/components/MobileDataGrid/GridContextProvider/index.d.ts.map +1 -0
  130. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.d.ts +3 -0
  131. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.d.ts.map +1 -0
  132. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.d.ts +6 -0
  133. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.d.ts.map +1 -0
  134. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +10 -0
  135. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -0
  136. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts +7 -0
  137. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -0
  138. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.d.ts +2 -0
  139. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.d.ts.map +1 -0
  140. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts +2 -0
  141. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -0
  142. package/dist/components/MobileDataGrid/dataGridReducer.d.ts +21 -0
  143. package/dist/components/MobileDataGrid/dataGridReducer.d.ts.map +1 -0
  144. package/dist/components/MobileDataGrid/index.d.ts +26 -0
  145. package/dist/components/MobileDataGrid/index.d.ts.map +1 -0
  146. package/dist/components/MobileDataGrid/types.d.ts +4 -0
  147. package/dist/components/MobileDataGrid/types.d.ts.map +1 -0
  148. package/dist/components/MobileNavMenu.d.ts +36 -0
  149. package/dist/components/MobileNavMenu.d.ts.map +1 -0
  150. package/dist/components/Modal.d.ts +30 -0
  151. package/dist/components/Modal.d.ts.map +1 -0
  152. package/dist/components/ModalButtons.d.ts +13 -0
  153. package/dist/components/ModalButtons.d.ts.map +1 -0
  154. package/dist/components/ModalContent.d.ts +7 -0
  155. package/dist/components/ModalContent.d.ts.map +1 -0
  156. package/dist/components/ModalHeader.d.ts +17 -0
  157. package/dist/components/ModalHeader.d.ts.map +1 -0
  158. package/dist/components/ModalScrim.d.ts +13 -0
  159. package/dist/components/ModalScrim.d.ts.map +1 -0
  160. package/dist/components/NavigationTab.d.ts +13 -0
  161. package/dist/components/NavigationTab.d.ts.map +1 -0
  162. package/dist/components/NavigationTabs.d.ts +18 -0
  163. package/dist/components/NavigationTabs.d.ts.map +1 -0
  164. package/dist/components/NestedMenu.d.ts +35 -0
  165. package/dist/components/NestedMenu.d.ts.map +1 -0
  166. package/dist/components/Notification.d.ts +17 -0
  167. package/dist/components/Notification.d.ts.map +1 -0
  168. package/dist/components/OptionPill.d.ts +14 -0
  169. package/dist/components/OptionPill.d.ts.map +1 -0
  170. package/dist/components/OrderCheckIcon.d.ts +5 -0
  171. package/dist/components/OrderCheckIcon.d.ts.map +1 -0
  172. package/dist/components/PDFViewer/DownloadIcon.d.ts +7 -0
  173. package/dist/components/PDFViewer/DownloadIcon.d.ts.map +1 -0
  174. package/dist/components/PDFViewer/PDFElement.d.ts +7 -0
  175. package/dist/components/PDFViewer/PDFElement.d.ts.map +1 -0
  176. package/dist/components/PDFViewer/PDFNavigation.d.ts +12 -0
  177. package/dist/components/PDFViewer/PDFNavigation.d.ts.map +1 -0
  178. package/dist/components/PDFViewer/PDFPage.d.ts +7 -0
  179. package/dist/components/PDFViewer/PDFPage.d.ts.map +1 -0
  180. package/dist/components/PDFViewer/index.d.ts +20 -0
  181. package/dist/components/PDFViewer/index.d.ts.map +1 -0
  182. package/dist/components/Pagination.d.ts +14 -0
  183. package/dist/components/Pagination.d.ts.map +1 -0
  184. package/dist/components/Paragraph.d.ts +10 -0
  185. package/dist/components/Paragraph.d.ts.map +1 -0
  186. package/dist/components/Password.d.ts +4 -0
  187. package/dist/components/Password.d.ts.map +1 -0
  188. package/dist/components/ProductImagePreview/CarouselPagination.d.ts +9 -0
  189. package/dist/components/ProductImagePreview/CarouselPagination.d.ts.map +1 -0
  190. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +11 -0
  191. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -0
  192. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +22 -0
  193. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -0
  194. package/dist/components/ProductImagePreview/Thumbnail.d.ts +11 -0
  195. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -0
  196. package/dist/components/ProductImagePreview/ZoomWindow.d.ts +22 -0
  197. package/dist/components/ProductImagePreview/ZoomWindow.d.ts.map +1 -0
  198. package/dist/components/ProductImagePreview/index.d.ts +23 -0
  199. package/dist/components/ProductImagePreview/index.d.ts.map +1 -0
  200. package/dist/components/ProductImagePreview/useProductImagePreview.d.ts +42 -0
  201. package/dist/components/ProductImagePreview/useProductImagePreview.d.ts.map +1 -0
  202. package/dist/components/ProjectBar.d.ts +12 -0
  203. package/dist/components/ProjectBar.d.ts.map +1 -0
  204. package/dist/components/Radio.d.ts +10 -0
  205. package/dist/components/Radio.d.ts.map +1 -0
  206. package/dist/components/Search.d.ts +20 -0
  207. package/dist/components/Search.d.ts.map +1 -0
  208. package/dist/components/SearchResultImage/index.d.ts +9 -0
  209. package/dist/components/SearchResultImage/index.d.ts.map +1 -0
  210. package/dist/components/Select.d.ts +22 -0
  211. package/dist/components/Select.d.ts.map +1 -0
  212. package/dist/components/SideMenu.d.ts +9 -0
  213. package/dist/components/SideMenu.d.ts.map +1 -0
  214. package/dist/components/SideMenuGroup.d.ts +11 -0
  215. package/dist/components/SideMenuGroup.d.ts.map +1 -0
  216. package/dist/components/SideMenuItem.d.ts +15 -0
  217. package/dist/components/SideMenuItem.d.ts.map +1 -0
  218. package/dist/components/SimpleTable.d.ts +11 -0
  219. package/dist/components/SimpleTable.d.ts.map +1 -0
  220. package/dist/components/SkeletonParagraph.d.ts +16 -0
  221. package/dist/components/SkeletonParagraph.d.ts.map +1 -0
  222. package/dist/components/Spinner.d.ts +7 -0
  223. package/dist/components/Spinner.d.ts.map +1 -0
  224. package/dist/components/Stack.d.ts +64 -0
  225. package/dist/components/Stack.d.ts.map +1 -0
  226. package/dist/components/StatusPill.d.ts +10 -0
  227. package/dist/components/StatusPill.d.ts.map +1 -0
  228. package/dist/components/Stepper.d.ts +26 -0
  229. package/dist/components/Stepper.d.ts.map +1 -0
  230. package/dist/components/Subheader.d.ts +10 -0
  231. package/dist/components/Subheader.d.ts.map +1 -0
  232. package/dist/components/Surface.d.ts +9 -0
  233. package/dist/components/Surface.d.ts.map +1 -0
  234. package/dist/components/Swatch.d.ts +13 -0
  235. package/dist/components/Swatch.d.ts.map +1 -0
  236. package/dist/components/Textarea.d.ts +12 -0
  237. package/dist/components/Textarea.d.ts.map +1 -0
  238. package/dist/components/Theme.d.ts +8 -0
  239. package/dist/components/Theme.d.ts.map +1 -0
  240. package/dist/components/Time.d.ts +13 -0
  241. package/dist/components/Time.d.ts.map +1 -0
  242. package/dist/components/Toast.d.ts +20 -0
  243. package/dist/components/Toast.d.ts.map +1 -0
  244. package/dist/components/Tooltip.d.ts +13 -0
  245. package/dist/components/Tooltip.d.ts.map +1 -0
  246. package/dist/components/TopBar.d.ts +20 -0
  247. package/dist/components/TopBar.d.ts.map +1 -0
  248. package/dist/components/Upload.d.ts +10 -0
  249. package/dist/components/Upload.d.ts.map +1 -0
  250. package/dist/components/WorldpayIframe.d.ts +5 -0
  251. package/dist/components/WorldpayIframe.d.ts.map +1 -0
  252. package/dist/hooks/index.d.ts +9 -0
  253. package/dist/hooks/index.d.ts.map +1 -0
  254. package/dist/hooks/useEditCell.d.ts +9 -0
  255. package/dist/hooks/useEditCell.d.ts.map +1 -0
  256. package/dist/hooks/useInfiniteScroll.d.ts +9 -0
  257. package/dist/hooks/useInfiniteScroll.d.ts.map +1 -0
  258. package/dist/hooks/useKeydown.d.ts +4 -0
  259. package/dist/hooks/useKeydown.d.ts.map +1 -0
  260. package/dist/hooks/useMatchesMedia.d.ts +3 -0
  261. package/dist/hooks/useMatchesMedia.d.ts.map +1 -0
  262. package/dist/hooks/useMenuSystem.d.ts +44 -0
  263. package/dist/hooks/useMenuSystem.d.ts.map +1 -0
  264. package/dist/hooks/useMounted.d.ts +2 -0
  265. package/dist/hooks/useMounted.d.ts.map +1 -0
  266. package/dist/hooks/useTableLayout/computeColumns.d.ts +49 -0
  267. package/dist/hooks/useTableLayout/computeColumns.d.ts.map +1 -0
  268. package/dist/hooks/useTableLayout/index.d.ts +3 -0
  269. package/dist/hooks/useTableLayout/index.d.ts.map +1 -0
  270. package/dist/hooks/useTableLayout/storage.d.ts +41 -0
  271. package/dist/hooks/useTableLayout/storage.d.ts.map +1 -0
  272. package/dist/hooks/useTableLayout/types.d.ts +56 -0
  273. package/dist/hooks/useTableLayout/types.d.ts.map +1 -0
  274. package/dist/hooks/useTableLayout/useTableLayout.d.ts +23 -0
  275. package/dist/hooks/useTableLayout/useTableLayout.d.ts.map +1 -0
  276. package/dist/index.d.ts +94 -0
  277. package/dist/index.d.ts.map +1 -0
  278. package/dist/index.js +52866 -0
  279. package/dist/lib/design-system.d.ts +3 -0
  280. package/dist/lib/design-system.d.ts.map +1 -0
  281. package/dist/lib/loadFonts.d.ts +2 -0
  282. package/dist/lib/loadFonts.d.ts.map +1 -0
  283. package/dist/pdf-l6QfMa5e.js +17649 -0
  284. package/dist/styles.css +1 -0
  285. package/dist/types.d.ts +33 -0
  286. package/dist/types.d.ts.map +1 -0
  287. package/dist/utils/date-patch-dashes.d.ts +17 -0
  288. package/dist/utils/date-patch-dashes.d.ts.map +1 -0
  289. package/dist/utils/date.d.ts +60 -0
  290. package/dist/utils/date.d.ts.map +1 -0
  291. package/dist/utils/formatting.d.ts +36 -0
  292. package/dist/utils/formatting.d.ts.map +1 -0
  293. package/dist/utils/index.d.ts +6 -0
  294. package/dist/utils/index.d.ts.map +1 -0
  295. package/dist/utils/mergeObjectArrays.d.ts +12 -0
  296. package/dist/utils/mergeObjectArrays.d.ts.map +1 -0
  297. package/dist/utils.d.ts +3 -0
  298. package/dist/utils.d.ts.map +1 -0
  299. package/package.json +17 -83
  300. package/dist/chunk-3DJWSTPS.js +0 -134
  301. package/dist/chunk-3JUIYULW.js +0 -231
  302. package/dist/chunk-3PIDINTF.js +0 -52
  303. package/dist/chunk-3UPUZBP5.js +0 -149
  304. package/dist/chunk-3V5OMIYB.js +0 -2376
  305. package/dist/chunk-4FUZDLWX.js +0 -112
  306. package/dist/chunk-4RJKB7LC.js +0 -14
  307. package/dist/chunk-4UGMSWWA.js +0 -57
  308. package/dist/chunk-5IFPG6TS.js +0 -17
  309. package/dist/chunk-5N32SQ3R.js +0 -99
  310. package/dist/chunk-5UH6QUFB.js +0 -38
  311. package/dist/chunk-6YUQCRMX.js +0 -32
  312. package/dist/chunk-75USUR3I.js +0 -27
  313. package/dist/chunk-7IPESTQS.js +0 -93
  314. package/dist/chunk-7MBRCM3M.js +0 -66
  315. package/dist/chunk-7WDYXRMW.js +0 -110
  316. package/dist/chunk-7YA3TF73.js +0 -32
  317. package/dist/chunk-7Z3WINQ3.js +0 -59
  318. package/dist/chunk-7ZJIGTFN.js +0 -78
  319. package/dist/chunk-AJ5M6MVX.js +0 -7
  320. package/dist/chunk-AT4AWD6B.js +0 -44
  321. package/dist/chunk-BQNPOGD5.js +0 -105
  322. package/dist/chunk-BWPNXY7T.js +0 -78
  323. package/dist/chunk-CIYLALYO.js +0 -72
  324. package/dist/chunk-DNNX5EYX.js +0 -274
  325. package/dist/chunk-E3FOCECQ.js +0 -61
  326. package/dist/chunk-E7LGUC2B.js +0 -35
  327. package/dist/chunk-EWGHVZL5.js +0 -27
  328. package/dist/chunk-F4VE3THQ.js +0 -71
  329. package/dist/chunk-FXXRXLOL.js +0 -329
  330. package/dist/chunk-G242RHWI.js +0 -139
  331. package/dist/chunk-GOGNV5TF.js +0 -68
  332. package/dist/chunk-GYT5CL7R.js +0 -159
  333. package/dist/chunk-H36XCZ3O.js +0 -140
  334. package/dist/chunk-H5SHC4XZ.js +0 -586
  335. package/dist/chunk-HRPW6VXG.js +0 -110
  336. package/dist/chunk-J3HNYUSG.js +0 -34
  337. package/dist/chunk-J4IMVWT5.js +0 -183
  338. package/dist/chunk-JYECZBCJ.js +0 -154
  339. package/dist/chunk-K6RPFIMB.js +0 -77
  340. package/dist/chunk-KBIEWFQS.js +0 -27
  341. package/dist/chunk-KESCXOG3.js +0 -82
  342. package/dist/chunk-MBZ55T2D.js +0 -51
  343. package/dist/chunk-MVDGHWKO.js +0 -238
  344. package/dist/chunk-NAWP246H.js +0 -65
  345. package/dist/chunk-NKUETCDA.js +0 -44
  346. package/dist/chunk-NSZTJ5R4.js +0 -38
  347. package/dist/chunk-NT26ZKSI.js +0 -82
  348. package/dist/chunk-NW75QACN.js +0 -91
  349. package/dist/chunk-OM7QLLI2.js +0 -277
  350. package/dist/chunk-ORMEWXMH.js +0 -37
  351. package/dist/chunk-PE3EZP56.js +0 -373
  352. package/dist/chunk-QBIEU25R.js +0 -61
  353. package/dist/chunk-QG6NWMGA.js +0 -138
  354. package/dist/chunk-QVWYTQKL.js +0 -29
  355. package/dist/chunk-QW4AJ5FK.js +0 -483
  356. package/dist/chunk-RN465M4S.js +0 -142
  357. package/dist/chunk-SATCWGO7.js +0 -166
  358. package/dist/chunk-SBRRNFOP.js +0 -33
  359. package/dist/chunk-SJZNVG4N.js +0 -47
  360. package/dist/chunk-TBZ243DS.js +0 -173
  361. package/dist/chunk-UARCWLMD.js +0 -66
  362. package/dist/chunk-UFX5XIJL.js +0 -178
  363. package/dist/chunk-UZHBKSXJ.js +0 -87
  364. package/dist/chunk-VEEZ7VRJ.js +0 -137
  365. package/dist/chunk-VJVY6NPF.js +0 -32
  366. package/dist/chunk-VUKYIERA.js +0 -89
  367. package/dist/chunk-VXWSAIB5.js +0 -26
  368. package/dist/chunk-W5NXOJ4L.js +0 -104
  369. package/dist/chunk-WVGXD7HT.js +0 -19
  370. package/dist/chunk-WVUIIBRR.js +0 -51
  371. package/dist/chunk-X7BKBBIH.js +0 -114
  372. package/dist/chunk-XB2S2QMB.js +0 -67
  373. package/dist/chunk-Y5GD2FJA.js +0 -32
  374. package/dist/chunk-YKEPPS2I.js +0 -192
  375. package/dist/chunk-YULGJORA.js +0 -259
  376. package/dist/chunk-Z2HPSFEQ.js +0 -14
  377. package/dist/chunk-Z5YP2GI6.js +0 -142
  378. package/dist/chunk-ZRFXUER3.js +0 -468
  379. package/dist/components/AccessCard.cjs +0 -661
  380. package/dist/components/AccessCard.js +0 -13
  381. package/dist/components/AccessCardGroup.cjs +0 -365
  382. package/dist/components/AccessCardGroup.js +0 -11
  383. package/dist/components/AccessChangerTabItem.cjs +0 -352
  384. package/dist/components/AccessChangerTabItem.js +0 -75
  385. package/dist/components/Accordion.cjs +0 -680
  386. package/dist/components/Accordion.js +0 -13
  387. package/dist/components/Alert.cjs +0 -850
  388. package/dist/components/Alert.js +0 -14
  389. package/dist/components/Breadcrumbs.cjs +0 -456
  390. package/dist/components/Breadcrumbs.js +0 -125
  391. package/dist/components/Button.cjs +0 -401
  392. package/dist/components/Button.js +0 -9
  393. package/dist/components/CalendarRange.cjs +0 -6576
  394. package/dist/components/CalendarRange.css +0 -5549
  395. package/dist/components/CalendarRange.js +0 -78
  396. package/dist/components/Caption.cjs +0 -365
  397. package/dist/components/Caption.js +0 -9
  398. package/dist/components/Card.cjs +0 -128
  399. package/dist/components/Card.js +0 -7
  400. package/dist/components/Checkbox.cjs +0 -421
  401. package/dist/components/Checkbox.js +0 -11
  402. package/dist/components/CompactImagesPreview.cjs +0 -604
  403. package/dist/components/CompactImagesPreview.js +0 -14
  404. package/dist/components/ContentTab.cjs +0 -483
  405. package/dist/components/ContentTab.js +0 -11
  406. package/dist/components/ContentTabs.cjs +0 -599
  407. package/dist/components/ContentTabs.js +0 -125
  408. package/dist/components/DMSiLogo.cjs +0 -97
  409. package/dist/components/DMSiLogo.js +0 -60
  410. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +0 -6565
  411. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +0 -5549
  412. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +0 -74
  413. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +0 -6565
  414. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +0 -5549
  415. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +0 -74
  416. package/dist/components/DataGrid/PinnedColumns.cjs +0 -6565
  417. package/dist/components/DataGrid/PinnedColumns.css +0 -5549
  418. package/dist/components/DataGrid/PinnedColumns.js +0 -74
  419. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +0 -6567
  420. package/dist/components/DataGrid/TableBody/LoadingCell.css +0 -5549
  421. package/dist/components/DataGrid/TableBody/LoadingCell.js +0 -74
  422. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +0 -6567
  423. package/dist/components/DataGrid/TableBody/TableBodyRow.css +0 -5549
  424. package/dist/components/DataGrid/TableBody/TableBodyRow.js +0 -74
  425. package/dist/components/DataGrid/TableBody/index.cjs +0 -6567
  426. package/dist/components/DataGrid/TableBody/index.css +0 -5549
  427. package/dist/components/DataGrid/TableBody/index.js +0 -74
  428. package/dist/components/DataGrid/index.cjs +0 -6570
  429. package/dist/components/DataGrid/index.css +0 -5549
  430. package/dist/components/DataGrid/index.js +0 -77
  431. package/dist/components/DataGrid/utils.cjs +0 -6565
  432. package/dist/components/DataGrid/utils.css +0 -5549
  433. package/dist/components/DataGrid/utils.js +0 -74
  434. package/dist/components/DataGridCell.cjs +0 -2538
  435. package/dist/components/DataGridCell.js +0 -30
  436. package/dist/components/DataTable.cjs +0 -847
  437. package/dist/components/DataTable.js +0 -775
  438. package/dist/components/DateInput.cjs +0 -6567
  439. package/dist/components/DateInput.css +0 -5549
  440. package/dist/components/DateInput.js +0 -74
  441. package/dist/components/DateRangeInput.cjs +0 -7158
  442. package/dist/components/DateRangeInput.css +0 -5549
  443. package/dist/components/DateRangeInput.js +0 -652
  444. package/dist/components/DebugJson.cjs +0 -58
  445. package/dist/components/DebugJson.js +0 -35
  446. package/dist/components/Display.cjs +0 -263
  447. package/dist/components/Display.js +0 -12
  448. package/dist/components/EditingContext.cjs +0 -86
  449. package/dist/components/EditingContext.js +0 -12
  450. package/dist/components/EmblaCarousel/ArrowButtons.cjs +0 -151
  451. package/dist/components/EmblaCarousel/ArrowButtons.js +0 -9
  452. package/dist/components/EmblaCarousel/SelectedSnapDisplay.cjs +0 -38
  453. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +0 -7
  454. package/dist/components/EmblaCarousel/index.cjs +0 -420
  455. package/dist/components/EmblaCarousel/index.js +0 -12
  456. package/dist/components/EmptyCartIcon.cjs +0 -51
  457. package/dist/components/EmptyCartIcon.js +0 -7
  458. package/dist/components/FilterGroup.cjs +0 -1808
  459. package/dist/components/FilterGroup.js +0 -267
  460. package/dist/components/FooterBar.cjs +0 -64
  461. package/dist/components/FooterBar.js +0 -31
  462. package/dist/components/FullViewportBox.cjs +0 -60
  463. package/dist/components/FullViewportBox.js +0 -27
  464. package/dist/components/Grid.cjs +0 -135
  465. package/dist/components/Grid.js +0 -7
  466. package/dist/components/Heading.cjs +0 -267
  467. package/dist/components/Heading.js +0 -14
  468. package/dist/components/HorizontalDivider.cjs +0 -82
  469. package/dist/components/HorizontalDivider.js +0 -26
  470. package/dist/components/Icon.cjs +0 -101
  471. package/dist/components/Icon.js +0 -7
  472. package/dist/components/ImagePlaceholder.cjs +0 -65
  473. package/dist/components/ImagePlaceholder.js +0 -7
  474. package/dist/components/Input.cjs +0 -930
  475. package/dist/components/Input.js +0 -23
  476. package/dist/components/InputGroup.cjs +0 -307
  477. package/dist/components/InputGroup.js +0 -68
  478. package/dist/components/Label.cjs +0 -252
  479. package/dist/components/Label.js +0 -8
  480. package/dist/components/Link.cjs +0 -304
  481. package/dist/components/Link.js +0 -8
  482. package/dist/components/List.cjs +0 -39
  483. package/dist/components/List.js +0 -16
  484. package/dist/components/ListGroup.cjs +0 -568
  485. package/dist/components/ListGroup.js +0 -11
  486. package/dist/components/LiveChatComponent.cjs +0 -63
  487. package/dist/components/LiveChatComponent.js +0 -40
  488. package/dist/components/LoadingScrim.cjs +0 -90
  489. package/dist/components/LoadingScrim.js +0 -28
  490. package/dist/components/LogoAgilityTopBar.cjs +0 -133
  491. package/dist/components/LogoAgilityTopBar.js +0 -96
  492. package/dist/components/LogoDMSiTopBar.cjs +0 -97
  493. package/dist/components/LogoDMSiTopBar.js +0 -7
  494. package/dist/components/LogoMillworkTopBar.cjs +0 -239
  495. package/dist/components/LogoMillworkTopBar.js +0 -202
  496. package/dist/components/MainBar.cjs +0 -234
  497. package/dist/components/MainBar.js +0 -66
  498. package/dist/components/MaxViewportBox.cjs +0 -45
  499. package/dist/components/MaxViewportBox.js +0 -22
  500. package/dist/components/Menu.cjs +0 -505
  501. package/dist/components/Menu.js +0 -14
  502. package/dist/components/MenuOption.cjs +0 -695
  503. package/dist/components/MenuOption.js +0 -18
  504. package/dist/components/MobileDataGrid/ColumnList.cjs +0 -991
  505. package/dist/components/MobileDataGrid/ColumnList.css +0 -5549
  506. package/dist/components/MobileDataGrid/ColumnList.js +0 -20
  507. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +0 -6675
  508. package/dist/components/MobileDataGrid/ColumnSelector/index.css +0 -5549
  509. package/dist/components/MobileDataGrid/ColumnSelector/index.js +0 -74
  510. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.cjs +0 -31
  511. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +0 -7
  512. package/dist/components/MobileDataGrid/GridContextProvider/index.cjs +0 -186
  513. package/dist/components/MobileDataGrid/GridContextProvider/index.js +0 -8
  514. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.cjs +0 -333
  515. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +0 -12
  516. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +0 -907
  517. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +0 -19
  518. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +0 -6985
  519. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +0 -5549
  520. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +0 -74
  521. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +0 -620
  522. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +0 -16
  523. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +0 -1457
  524. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +0 -29
  525. package/dist/components/MobileDataGrid/index.cjs +0 -7496
  526. package/dist/components/MobileDataGrid/index.css +0 -5549
  527. package/dist/components/MobileDataGrid/index.js +0 -74
  528. package/dist/components/Modal.cjs +0 -995
  529. package/dist/components/Modal.js +0 -23
  530. package/dist/components/ModalButtons.cjs +0 -491
  531. package/dist/components/ModalButtons.js +0 -11
  532. package/dist/components/ModalContent.cjs +0 -204
  533. package/dist/components/ModalContent.js +0 -8
  534. package/dist/components/ModalHeader.cjs +0 -563
  535. package/dist/components/ModalHeader.js +0 -12
  536. package/dist/components/ModalScrim.cjs +0 -69
  537. package/dist/components/ModalScrim.js +0 -7
  538. package/dist/components/NavigationTab.cjs +0 -522
  539. package/dist/components/NavigationTab.js +0 -11
  540. package/dist/components/NavigationTabs.cjs +0 -572
  541. package/dist/components/NavigationTabs.js +0 -61
  542. package/dist/components/NestedMenu.cjs +0 -1275
  543. package/dist/components/NestedMenu.js +0 -164
  544. package/dist/components/Notification.cjs +0 -871
  545. package/dist/components/Notification.js +0 -126
  546. package/dist/components/OptionPill.cjs +0 -597
  547. package/dist/components/OptionPill.js +0 -12
  548. package/dist/components/OrderCheckIcon.cjs +0 -85
  549. package/dist/components/OrderCheckIcon.js +0 -7
  550. package/dist/components/PDFViewer/DownloadIcon.cjs +0 -618
  551. package/dist/components/PDFViewer/DownloadIcon.js +0 -17
  552. package/dist/components/PDFViewer/PDFElement.cjs +0 -571
  553. package/dist/components/PDFViewer/PDFElement.js +0 -11
  554. package/dist/components/PDFViewer/PDFNavigation.cjs +0 -828
  555. package/dist/components/PDFViewer/PDFNavigation.js +0 -14
  556. package/dist/components/PDFViewer/PDFPage.cjs +0 -56
  557. package/dist/components/PDFViewer/PDFPage.js +0 -7
  558. package/dist/components/PDFViewer/index.cjs +0 -1941
  559. package/dist/components/PDFViewer/index.js +0 -182
  560. package/dist/components/Pagination.cjs +0 -436
  561. package/dist/components/Pagination.js +0 -10
  562. package/dist/components/Paragraph.cjs +0 -261
  563. package/dist/components/Paragraph.js +0 -8
  564. package/dist/components/Password.cjs +0 -1130
  565. package/dist/components/Password.js +0 -75
  566. package/dist/components/ProductImagePreview/CarouselPagination.cjs +0 -75
  567. package/dist/components/ProductImagePreview/CarouselPagination.js +0 -7
  568. package/dist/components/ProductImagePreview/MobileImageCarousel.cjs +0 -216
  569. package/dist/components/ProductImagePreview/MobileImageCarousel.js +0 -7
  570. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +0 -214
  571. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +0 -7
  572. package/dist/components/ProductImagePreview/Thumbnail.cjs +0 -112
  573. package/dist/components/ProductImagePreview/Thumbnail.js +0 -8
  574. package/dist/components/ProductImagePreview/ZoomWindow.cjs +0 -198
  575. package/dist/components/ProductImagePreview/ZoomWindow.js +0 -8
  576. package/dist/components/ProductImagePreview/index.cjs +0 -1447
  577. package/dist/components/ProductImagePreview/index.js +0 -22
  578. package/dist/components/ProjectBar.cjs +0 -279
  579. package/dist/components/ProjectBar.js +0 -71
  580. package/dist/components/Radio.cjs +0 -386
  581. package/dist/components/Radio.js +0 -10
  582. package/dist/components/Search.cjs +0 -1040
  583. package/dist/components/Search.js +0 -14
  584. package/dist/components/SearchResultImage/index.cjs +0 -92
  585. package/dist/components/SearchResultImage/index.js +0 -8
  586. package/dist/components/Select.cjs +0 -1019
  587. package/dist/components/Select.js +0 -14
  588. package/dist/components/SideMenu.cjs +0 -61
  589. package/dist/components/SideMenu.js +0 -28
  590. package/dist/components/SideMenuGroup.cjs +0 -593
  591. package/dist/components/SideMenuGroup.js +0 -97
  592. package/dist/components/SideMenuItem.cjs +0 -568
  593. package/dist/components/SideMenuItem.js +0 -95
  594. package/dist/components/SimpleTable.cjs +0 -547
  595. package/dist/components/SimpleTable.js +0 -10
  596. package/dist/components/SkeletonParagraph.cjs +0 -51
  597. package/dist/components/SkeletonParagraph.js +0 -7
  598. package/dist/components/Spinner.cjs +0 -57
  599. package/dist/components/Spinner.js +0 -7
  600. package/dist/components/Stack.cjs +0 -434
  601. package/dist/components/Stack.js +0 -8
  602. package/dist/components/StatusPill.cjs +0 -303
  603. package/dist/components/StatusPill.js +0 -64
  604. package/dist/components/Stepper.cjs +0 -1485
  605. package/dist/components/Stepper.js +0 -239
  606. package/dist/components/Subheader.cjs +0 -255
  607. package/dist/components/Subheader.js +0 -8
  608. package/dist/components/Surface.cjs +0 -101
  609. package/dist/components/Surface.js +0 -7
  610. package/dist/components/Swatch.cjs +0 -2089
  611. package/dist/components/Swatch.js +0 -1513
  612. package/dist/components/Textarea.cjs +0 -330
  613. package/dist/components/Textarea.js +0 -136
  614. package/dist/components/Theme.cjs +0 -51
  615. package/dist/components/Theme.js +0 -7
  616. package/dist/components/Time.cjs +0 -1518
  617. package/dist/components/Time.js +0 -373
  618. package/dist/components/Toast.cjs +0 -764
  619. package/dist/components/Toast.js +0 -243
  620. package/dist/components/Tooltip.cjs +0 -337
  621. package/dist/components/Tooltip.js +0 -14
  622. package/dist/components/TopBar.cjs +0 -392
  623. package/dist/components/TopBar.js +0 -148
  624. package/dist/components/Upload.cjs +0 -823
  625. package/dist/components/Upload.js +0 -132
  626. package/dist/components/WorldpayIframe.cjs +0 -45
  627. package/dist/components/WorldpayIframe.js +0 -22
  628. package/dist/components/index.cjs +0 -9461
  629. package/dist/components/index.css +0 -5549
  630. package/dist/components/index.js +0 -174
  631. package/dist/components/useMenuSystem.cjs +0 -442
  632. package/dist/components/useMenuSystem.js +0 -15
  633. package/dist/components/useMounted.cjs +0 -39
  634. package/dist/components/useMounted.js +0 -8
  635. package/dist/fonts.css +0 -21
  636. package/dist/hooks/index.cjs +0 -523
  637. package/dist/hooks/index.js +0 -22
  638. package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
  639. package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
  640. package/dist/index.css +0 -5527
  641. package/dist/open-sans-55T6A4JE.woff2 +0 -0
  642. package/dist/types.cjs +0 -18
  643. package/dist/types.js +0 -0
  644. package/dist/utils/index.cjs +0 -264
  645. package/dist/utils/index.js +0 -43
@@ -1,1518 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
- var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
48
- };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
-
59
- // src/components/Time.tsx
60
- var Time_exports = {};
61
- __export(Time_exports, {
62
- Time: () => Time
63
- });
64
- module.exports = __toCommonJS(Time_exports);
65
- var import_react2 = require("react");
66
-
67
- // src/components/Input.tsx
68
- var import_react = require("react");
69
- var import_clsx5 = __toESM(require("clsx"), 1);
70
-
71
- // src/classNames.ts
72
- var import_clsx = __toESM(require("clsx"), 1);
73
- var typography = {
74
- display1: (0, import_clsx.default)(
75
- "font-sans font-semibold",
76
- "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
77
- "leading-display-1-mobile desktop:leading-display-1-desktop"
78
- ),
79
- display2: (0, import_clsx.default)(
80
- "font-sans font-bold",
81
- "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
82
- "leading-display-2-mobile desktop:leading-display-2-desktop"
83
- ),
84
- heading1: (0, import_clsx.default)(
85
- "font-sans font-semibold",
86
- "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
87
- "leading-heading-1-mobile desktop:leading-heading-1-desktop"
88
- ),
89
- heading2: (0, import_clsx.default)(
90
- "font-sans font-normal",
91
- "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
92
- "leading-heading-2-mobile desktop:leading-heading-2-desktop"
93
- ),
94
- heading3: (0, import_clsx.default)(
95
- "font-sans font-semibold",
96
- "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
97
- "leading-heading-3-mobile desktop:leading-heading-3-desktop"
98
- ),
99
- subheader: (0, import_clsx.default)(
100
- "font-sans font-semibold",
101
- "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
102
- "leading-subheader-mobile desktop:leading-subheader-desktop"
103
- ),
104
- link: (0, import_clsx.default)(
105
- "font-sans font-normal",
106
- "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
107
- "leading-link-mobile desktop:leading-link-desktop"
108
- ),
109
- buttonLabel: (0, import_clsx.default)(
110
- "font-sans font-semibold",
111
- "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
112
- "leading-label-mobile desktop:leading-label-desktop"
113
- ),
114
- label: (0, import_clsx.default)(
115
- "font-sans font-semibold",
116
- "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
117
- "leading-label-mobile desktop:leading-label-desktop"
118
- ),
119
- paragraph: (0, import_clsx.default)(
120
- "font-sans font-normal",
121
- "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
122
- "leading-paragraph-mobile desktop:leading-paragraph-desktop"
123
- ),
124
- caption: (0, import_clsx.default)(
125
- "font-sans font-normal",
126
- "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
127
- "leading-caption-mobile desktop:leading-caption-desktop"
128
- ),
129
- breadcrumb: (0, import_clsx.default)(
130
- "font-sans font-normal",
131
- "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
132
- "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
133
- )
134
- };
135
- var baseTransition = (0, import_clsx.default)(
136
- "transition-colors duration-100 ease-in-out"
137
- );
138
- var componentGap = (0, import_clsx.default)(
139
- "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
140
- );
141
- var paddingUsingComponentGap = (0, import_clsx.default)(
142
- "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
143
- );
144
- var paddingXUsingLayoutGroupGap = (0, import_clsx.default)(
145
- "px-mobile-layout-group-gap desktop:px-desktop-layout-group-gap compact:px-desktop-compact-layout-group-gap"
146
- );
147
- var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
148
- "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
149
- );
150
- var componentPadding = (0, import_clsx.default)(
151
- "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
152
- );
153
- var componentPaddingBottom = (0, import_clsx.default)(
154
- "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
155
- );
156
- var componentPaddingX = (0, import_clsx.default)(
157
- "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding"
158
- );
159
- var componentPaddingY = (0, import_clsx.default)(
160
- "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
161
- );
162
- var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
163
- "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
164
- );
165
- var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
166
- "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
167
- );
168
- var componentPaddingYUsingComponentGap2xMobile = (0, import_clsx.default)(
169
- "py-[calc(var(--spacing-mobile-component-gap)_+_8px)] desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
170
- );
171
- var componentPaddingMinusBorder = (0, import_clsx.default)(
172
- "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
173
- );
174
- var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
175
- "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
176
- );
177
- var componentPaddingMinusBorderDesktop = (0, import_clsx.default)(
178
- "p-[calc(var(--spacing-desktop-component-padding)_-_1px)]"
179
- );
180
- var layoutPaddding = (0, import_clsx.default)(
181
- "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding"
182
- );
183
- var layoutPaddingBottom = (0, import_clsx.default)(
184
- "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
185
- );
186
- var layoutPaddingY = (0, import_clsx.default)(
187
- "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
188
- );
189
- var layoutPaddingX = (0, import_clsx.default)(
190
- "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding"
191
- );
192
- var containerPaddingX = (0, import_clsx.default)(
193
- "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
194
- );
195
- var containerPaddingY = (0, import_clsx.default)(
196
- "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
197
- );
198
- var layoutGroupGapPaddingY = (0, import_clsx.default)(
199
- "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
200
- );
201
- var layoutGroupGap = (0, import_clsx.default)(
202
- "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
203
- );
204
- var layoutGap = (0, import_clsx.default)(
205
- "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
206
- );
207
- var gapUsingContainerPadding = (0, import_clsx.default)(
208
- "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
209
- );
210
-
211
- // src/components/Label.tsx
212
- var import_clsx2 = __toESM(require("clsx"), 1);
213
- var import_jsx_runtime = require("react/jsx-runtime");
214
- var Label = (_a) => {
215
- var _b = _a, {
216
- as = "span",
217
- padded,
218
- className,
219
- color,
220
- align,
221
- id,
222
- testid
223
- } = _b, props = __objRest(_b, [
224
- "as",
225
- "padded",
226
- "className",
227
- "color",
228
- "align",
229
- "id",
230
- "testid"
231
- ]);
232
- const Element = as;
233
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
234
- Element,
235
- __spreadProps(__spreadValues({
236
- id,
237
- "data-testid": testid,
238
- className: (0, import_clsx2.default)(
239
- typography.label,
240
- align === "left" && "text-left",
241
- align === "center" && "text-center",
242
- align === "right" && "text-right",
243
- className,
244
- padded && componentPaddingXUsingComponentGap
245
- )
246
- }, props), {
247
- style: __spreadProps(__spreadValues({}, props.style), {
248
- color: color ? `var(--color-${color})` : void 0
249
- })
250
- })
251
- );
252
- };
253
- Label.displayName = "Label";
254
-
255
- // src/components/Icon.tsx
256
- var import_clsx3 = __toESM(require("clsx"), 1);
257
- var import_jsx_runtime2 = require("react/jsx-runtime");
258
- function Icon(_a) {
259
- var _b = _a, {
260
- name,
261
- size = 24,
262
- variant = "outline",
263
- testid
264
- } = _b, props = __objRest(_b, [
265
- "name",
266
- "size",
267
- "variant",
268
- "testid"
269
- ]);
270
- const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
271
- const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
272
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
273
- "span",
274
- __spreadProps(__spreadValues({}, props), {
275
- "data-testid": testid,
276
- className: (0, import_clsx3.default)(
277
- "icon",
278
- `icon-${size}`,
279
- // size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
280
- props.className
281
- ),
282
- style: __spreadValues({
283
- fontVariationSettings: variantStyle + `, ${weightStyle}`
284
- }, props.style),
285
- children: name
286
- })
287
- );
288
- }
289
-
290
- // src/utils/formatting.tsx
291
- function getDecimalPlaceholder(decimals) {
292
- if (!decimals || decimals <= 0) {
293
- return {};
294
- }
295
- return {
296
- placeholder: `0.${"0".repeat(decimals)}`
297
- };
298
- }
299
- function formatDecimalValue(value, decimals) {
300
- if (!value || value === "") {
301
- return "";
302
- }
303
- const numValue = typeof value === "string" ? parseFloat(value) : value;
304
- if (isNaN(numValue)) {
305
- return "";
306
- }
307
- if (!decimals || decimals <= 0) {
308
- return String(Math.round(numValue));
309
- }
310
- return numValue.toFixed(decimals);
311
- }
312
- function formatCurrencyDisplay(value) {
313
- if (!value || value === "") {
314
- return "";
315
- }
316
- const parts = value.split(".");
317
- const integerPart = parts[0];
318
- const decimalPart = parts[1];
319
- const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
320
- return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
321
- }
322
-
323
- // src/components/Paragraph.tsx
324
- var import_clsx4 = __toESM(require("clsx"), 1);
325
- var import_jsx_runtime3 = require("react/jsx-runtime");
326
- var Paragraph = (_a) => {
327
- var _b = _a, {
328
- className,
329
- color,
330
- padded,
331
- align = "left",
332
- tall,
333
- addOverflow,
334
- children,
335
- as = "p",
336
- id,
337
- testid
338
- } = _b, props = __objRest(_b, [
339
- "className",
340
- "color",
341
- "padded",
342
- "align",
343
- "tall",
344
- "addOverflow",
345
- "children",
346
- "as",
347
- "id",
348
- "testid"
349
- ]);
350
- const Element = as;
351
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
352
- Element,
353
- __spreadProps(__spreadValues({
354
- id,
355
- "data-testid": testid
356
- }, props), {
357
- className: (0, import_clsx4.default)(
358
- typography.paragraph,
359
- className,
360
- padded && componentPaddingXUsingComponentGap,
361
- align === "left" && "text-left",
362
- align === "center" && "text-center",
363
- align === "right" && "text-right",
364
- tall && "!leading-6",
365
- addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
366
- ),
367
- style: __spreadProps(__spreadValues({}, props.style), {
368
- color: color ? `var(--color-${color})` : void 0
369
- }),
370
- children
371
- })
372
- );
373
- };
374
- Paragraph.displayName = "Paragraph";
375
-
376
- // src/components/Input.tsx
377
- var import_jsx_runtime4 = require("react/jsx-runtime");
378
- function hasEquivalentNumericValue(currentValue, nextValue) {
379
- if (!currentValue || !nextValue) {
380
- return false;
381
- }
382
- const currentNumericValue = Number(currentValue.replace(/,/g, ""));
383
- const nextNumericValue = Number(nextValue.replace(/,/g, ""));
384
- return !Number.isNaN(currentNumericValue) && !Number.isNaN(nextNumericValue) && currentNumericValue === nextNumericValue;
385
- }
386
- var InputBase = (_a) => {
387
- var _b = _a, {
388
- id,
389
- testid,
390
- before,
391
- after,
392
- rightAdornment,
393
- type,
394
- label,
395
- error,
396
- className,
397
- align = "left",
398
- caption,
399
- required,
400
- selectOnFocus,
401
- removeRoundness,
402
- inputContainerRef,
403
- removeBorder,
404
- wrapperClassName,
405
- focus,
406
- secondaryIconColor,
407
- fullWidth = true,
408
- width,
409
- wrapperRef,
410
- autocompletePadding = false
411
- } = _b, props = __objRest(_b, [
412
- "id",
413
- "testid",
414
- "before",
415
- "after",
416
- "rightAdornment",
417
- "type",
418
- "label",
419
- "error",
420
- "className",
421
- "align",
422
- "caption",
423
- "required",
424
- "selectOnFocus",
425
- "removeRoundness",
426
- "inputContainerRef",
427
- "removeBorder",
428
- "wrapperClassName",
429
- "focus",
430
- "secondaryIconColor",
431
- "fullWidth",
432
- "width",
433
- "wrapperRef",
434
- "autocompletePadding"
435
- ]);
436
- const attributes = {
437
- "data-error": error && !focus || null,
438
- "data-focus": focus || null
439
- };
440
- const inputRef = (0, import_react.useRef)(null);
441
- const inputId = id ? `${id}-input` : void 0;
442
- (0, import_react.useEffect)(() => {
443
- var _a2;
444
- const input = inputRef.current;
445
- const focusHandler = () => {
446
- input == null ? void 0 : input.select();
447
- };
448
- if (selectOnFocus) {
449
- (_a2 = inputRef.current) == null ? void 0 : _a2.addEventListener("focus", focusHandler);
450
- return () => {
451
- input == null ? void 0 : input.removeEventListener("focus", focusHandler);
452
- };
453
- }
454
- }, [selectOnFocus]);
455
- const inputBaseClass = (0, import_clsx5.default)(
456
- fullWidth ? "w-full" : "w-fit",
457
- "flex flex-row items-center",
458
- "bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
459
- componentGap,
460
- baseTransition,
461
- "outline-transparent outline-2 -outline-offset-2",
462
- !autocompletePadding && componentPaddingMinusBorder,
463
- autocompletePadding && componentPaddingMinusBorderDesktop,
464
- !removeRoundness && "rounded-base",
465
- !removeBorder && "border border-border-primary-normal",
466
- "relative"
467
- );
468
- const inputFocusClass = (0, import_clsx5.default)(
469
- "has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
470
- );
471
- const inputDisabledClass = (0, import_clsx5.default)(
472
- "has-disabled:bg-background-action-secondary-disabled"
473
- );
474
- const inputReadOnlyClass = (0, import_clsx5.default)(
475
- "has-[input:not(:disabled):read-only]:outline-none has-[input:not(:disabled):read-only]:bg-transparent has-[input:not(:disabled):read-only]:border-transparent has-[input:not(:disabled):read-only]:pl-0"
476
- );
477
- const inputInvalidClass = (0, import_clsx5.default)(
478
- "has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
479
- );
480
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
481
- "label",
482
- {
483
- id,
484
- "data-testid": testid,
485
- htmlFor: inputId,
486
- ref: inputContainerRef,
487
- className: (0, import_clsx5.default)(
488
- "w-full flex flex-col",
489
- "block",
490
- "text-text-primary-normal has-disabled:text-text-primary-disabled",
491
- componentGap
492
- ),
493
- style: __spreadValues({}, props.style),
494
- children: [
495
- label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx5.default)("flex items-center", componentGap), children: [
496
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
497
- Label,
498
- {
499
- id: id ? `${id}-label` : void 0,
500
- color: error ? "text-primary-error" : void 0,
501
- className: (0, import_clsx5.default)(
502
- props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
503
- ),
504
- children: label
505
- }
506
- ),
507
- required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
508
- "span",
509
- {
510
- className: (0, import_clsx5.default)(typography.label, "text-text-critical-normal"),
511
- children: "*"
512
- }
513
- )
514
- ] }),
515
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
516
- "div",
517
- {
518
- className: (0, import_clsx5.default)(
519
- inputBaseClass,
520
- !props.disabled && inputInvalidClass,
521
- inputFocusClass,
522
- inputDisabledClass,
523
- inputReadOnlyClass,
524
- wrapperClassName
525
- ),
526
- ref: (el) => {
527
- if (wrapperRef) {
528
- wrapperRef.current = el;
529
- }
530
- },
531
- children: [
532
- before,
533
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
534
- "input",
535
- __spreadProps(__spreadValues(__spreadValues({
536
- ref: (el) => {
537
- inputRef.current = el;
538
- },
539
- type,
540
- required
541
- }, props), attributes), {
542
- id: inputId,
543
- "data-testid": testid ? `${testid}-input` : void 0,
544
- className: (0, import_clsx5.default)(
545
- "flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
546
- "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
547
- "placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
548
- align === "right" && "text-right",
549
- align === "center" && "text-center",
550
- componentPaddingXUsingComponentGap,
551
- typography.paragraph,
552
- className,
553
- props.readOnly && !props.disabled && "!px-0"
554
- ),
555
- style: __spreadProps(__spreadValues({}, props.style), { width })
556
- })
557
- ),
558
- secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after,
559
- rightAdornment
560
- ]
561
- }
562
- ),
563
- caption && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
564
- "div",
565
- {
566
- id: id ? `${id}-caption` : void 0,
567
- "data-testid": testid ? `${testid}-caption` : void 0,
568
- children: caption
569
- }
570
- )
571
- ]
572
- }
573
- );
574
- };
575
- var Input = (_a) => {
576
- var _b = _a, {
577
- variant = "default",
578
- decimals,
579
- uom,
580
- currencyFormat = false,
581
- formatOnBlur = false,
582
- removeSearchIcon,
583
- value: propValue,
584
- onChange,
585
- onBlur,
586
- onClear,
587
- id,
588
- testid,
589
- rightAdornment
590
- } = _b, props = __objRest(_b, [
591
- "variant",
592
- "decimals",
593
- "uom",
594
- "currencyFormat",
595
- "formatOnBlur",
596
- "removeSearchIcon",
597
- "value",
598
- "onChange",
599
- "onBlur",
600
- "onClear",
601
- "id",
602
- "testid",
603
- "rightAdornment"
604
- ]);
605
- const [internalValue, setInternalValue] = (0, import_react.useState)("");
606
- const [displayValue, setDisplayValue] = (0, import_react.useState)("");
607
- const [isFocused, setIsFocused] = (0, import_react.useState)(false);
608
- const internalValueRef = (0, import_react.useRef)("");
609
- const setInputValues = (nextInternalValue, nextDisplayValue) => {
610
- internalValueRef.current = nextInternalValue;
611
- setInternalValue(nextInternalValue);
612
- setDisplayValue(nextDisplayValue);
613
- };
614
- (0, import_react.useEffect)(() => {
615
- var _a2;
616
- const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
617
- const shouldUseThousandsFormatting = variant === "currency" || variant === "uom" && currencyFormat;
618
- if (!stringValue) {
619
- setInputValues("", "");
620
- return;
621
- }
622
- if (!shouldUseThousandsFormatting) {
623
- setInputValues(stringValue, stringValue);
624
- return;
625
- }
626
- if (isFocused && hasEquivalentNumericValue(internalValueRef.current, stringValue)) {
627
- return;
628
- }
629
- if (formatOnBlur && isFocused) {
630
- setInputValues(stringValue, stringValue);
631
- return;
632
- }
633
- const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
634
- setInputValues(formatted, formatCurrencyDisplay(formatted));
635
- }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
636
- const getInputProps = () => {
637
- var _a2;
638
- const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
639
- id
640
- }), getDecimalPlaceholder(decimals)), {
641
- value: propValue
642
- });
643
- switch (variant) {
644
- case "search":
645
- return __spreadProps(__spreadValues({}, baseProps), {
646
- placeholder: (_a2 = props.placeholder) != null ? _a2 : "Search",
647
- className: "!mr-6",
648
- value: displayValue
649
- });
650
- case "finder":
651
- return baseProps;
652
- case "currency":
653
- return __spreadProps(__spreadValues({}, baseProps), {
654
- align: "right",
655
- type: "text",
656
- inputMode: "decimal",
657
- value: displayValue
658
- });
659
- case "percentage":
660
- case "uom":
661
- return __spreadProps(__spreadValues({}, baseProps), {
662
- type: currencyFormat ? "text" : "number",
663
- align: "right",
664
- inputMode: currencyFormat ? "decimal" : void 0,
665
- value: currencyFormat ? displayValue : propValue
666
- });
667
- default:
668
- return baseProps;
669
- }
670
- };
671
- const getBeforeElement = () => {
672
- if (props.before) return props.before;
673
- switch (variant) {
674
- case "search":
675
- return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "search" }) }) : null;
676
- case "currency":
677
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "attach_money" }) });
678
- case "uom":
679
- return currencyFormat ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "attach_money" }) }) : null;
680
- default:
681
- return null;
682
- }
683
- };
684
- const getAfterElement = () => {
685
- if (props.after) return props.after;
686
- switch (variant) {
687
- case "search": {
688
- const hasValue = displayValue.length > 0;
689
- return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
690
- Icon,
691
- {
692
- id: id ? `${id}-clear-button` : void 0,
693
- testid: testid ? `${testid}-clear-button` : void 0,
694
- name: "close",
695
- onClick: handleSearchReset,
696
- className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
697
- }
698
- ) : null;
699
- }
700
- case "finder":
701
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "search" });
702
- case "uom":
703
- return uom ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { color: "text-secondary-normal", children: uom.toUpperCase() }) : null;
704
- case "percentage":
705
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "percent" }) });
706
- default:
707
- return null;
708
- }
709
- };
710
- const handleSearchReset = () => {
711
- setInputValues("", "");
712
- if (onChange) {
713
- const syntheticEvent = {
714
- target: { value: "" }
715
- };
716
- if (typeof onChange === "function") {
717
- onChange(syntheticEvent);
718
- }
719
- }
720
- onClear == null ? void 0 : onClear();
721
- };
722
- const handleChange = (e) => {
723
- const rawValue = e.target.value;
724
- const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
725
- if (variant === "currency") {
726
- const raw = rawValue.replace(/,/g, "");
727
- if (raw === "") {
728
- setInputValues("", "");
729
- if (onChange) {
730
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
731
- target: __spreadProps(__spreadValues({}, e.target), { value: "" })
732
- });
733
- onChange(syntheticEvent);
734
- }
735
- return;
736
- }
737
- const regex = /^\d*\.?\d*$/;
738
- if (!regex.test(raw)) return;
739
- const parts = raw.split(".");
740
- const currentDecimals = decimals != null ? decimals : 2;
741
- if (parts.length === 2 && parts[1].length > currentDecimals) return;
742
- const asNumber = Number(raw);
743
- if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
744
- const clamped = maxNumber;
745
- const formattedClamped = formatDecimalValue(
746
- clamped.toString(),
747
- currentDecimals
748
- );
749
- setInputValues(
750
- formattedClamped,
751
- formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
752
- );
753
- if (onChange) {
754
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
755
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
756
- });
757
- onChange(syntheticEvent);
758
- }
759
- return;
760
- }
761
- setInputValues(raw, formatOnBlur ? raw : formatCurrencyDisplay(raw));
762
- if (!isNaN(asNumber) && onChange) {
763
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
764
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
765
- });
766
- onChange(syntheticEvent);
767
- }
768
- return;
769
- }
770
- if (variant === "uom" && currencyFormat) {
771
- const raw = rawValue.replace(/,/g, "");
772
- if (raw === "") {
773
- setInputValues("", "");
774
- if (onChange) {
775
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
776
- target: __spreadProps(__spreadValues({}, e.target), { value: "" })
777
- });
778
- onChange(syntheticEvent);
779
- }
780
- return;
781
- }
782
- const regex = /^\d*\.?\d*$/;
783
- if (!regex.test(raw)) return;
784
- const parts = raw.split(".");
785
- const currentDecimals = decimals != null ? decimals : 2;
786
- if (parts.length === 2 && parts[1].length > currentDecimals) return;
787
- const asNumber = Number(raw);
788
- if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
789
- const clamped = maxNumber;
790
- const formattedClamped = formatDecimalValue(
791
- clamped.toString(),
792
- currentDecimals
793
- );
794
- setInputValues(
795
- formattedClamped,
796
- formatCurrencyDisplay(formattedClamped)
797
- );
798
- if (onChange) {
799
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
800
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
801
- });
802
- onChange(syntheticEvent);
803
- }
804
- return;
805
- }
806
- setInputValues(raw, formatCurrencyDisplay(raw));
807
- if (!isNaN(asNumber) && onChange) {
808
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
809
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
810
- });
811
- onChange(syntheticEvent);
812
- }
813
- return;
814
- }
815
- if (variant === "uom" && e.target.type === "number") {
816
- const numeric = Number(rawValue);
817
- if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
818
- const clamped = maxNumber;
819
- const formattedClamped = formatDecimalValue(
820
- clamped.toString(),
821
- decimals != null ? decimals : 0
822
- );
823
- setInputValues(formattedClamped, formattedClamped);
824
- if (typeof onChange === "function") {
825
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
826
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
827
- });
828
- onChange(syntheticEvent);
829
- }
830
- return;
831
- }
832
- setInputValues(rawValue, rawValue);
833
- if (typeof onChange === "function") {
834
- onChange(e);
835
- }
836
- return;
837
- }
838
- setInputValues(rawValue, rawValue);
839
- if (typeof onChange === "function") {
840
- onChange(e);
841
- }
842
- };
843
- const handleBlur = (e) => {
844
- setIsFocused(false);
845
- if (!internalValue) {
846
- onBlur == null ? void 0 : onBlur(e);
847
- return;
848
- }
849
- if (variant === "currency") {
850
- const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
851
- setInputValues(formatted, formatCurrencyDisplay(formatted));
852
- const asNumber = Number(formatted);
853
- if (!isNaN(asNumber) && onChange) {
854
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
855
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
856
- });
857
- onChange(syntheticEvent);
858
- }
859
- } else if (variant === "uom") {
860
- if (currencyFormat) {
861
- const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
862
- setInputValues(formatted, formatCurrencyDisplay(formatted));
863
- const asNumber = Number(formatted);
864
- if (!isNaN(asNumber) && onChange) {
865
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
866
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
867
- });
868
- onChange(syntheticEvent);
869
- }
870
- } else {
871
- const formattedValue = formatDecimalValue(e.target.value, decimals);
872
- e.target.value = formattedValue;
873
- }
874
- }
875
- onBlur == null ? void 0 : onBlur(e);
876
- };
877
- const handleFocus = (e) => {
878
- var _a2;
879
- setIsFocused(true);
880
- (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
881
- };
882
- const inputProps = getInputProps();
883
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
884
- InputBase,
885
- __spreadProps(__spreadValues({}, inputProps), {
886
- before: getBeforeElement(),
887
- after: getAfterElement(),
888
- onFocus: handleFocus,
889
- onChange: handleChange,
890
- onBlur: handleBlur,
891
- testid,
892
- rightAdornment
893
- })
894
- );
895
- };
896
- Input.displayName = "Input";
897
- var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
898
- var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
899
- var Currency = (props) => {
900
- var _a;
901
- const handleCurrencyChange = (e) => {
902
- var _a2;
903
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
904
- };
905
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
906
- Input,
907
- __spreadProps(__spreadValues({}, props), {
908
- variant: "currency",
909
- decimals: (_a = props.decimals) != null ? _a : 2,
910
- onChange: handleCurrencyChange
911
- })
912
- );
913
- };
914
- var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
915
- Finder.displayName = "Finder";
916
- UOM.displayName = "UOM";
917
- Currency.displayName = "Currency";
918
- Percentage.displayName = "Percentage";
919
-
920
- // src/components/Time.tsx
921
- var import_react_dom = require("react-dom");
922
- var import_clsx7 = __toESM(require("clsx"), 1);
923
-
924
- // src/utils.ts
925
- function findDocumentRoot(element) {
926
- if (typeof window === "undefined" || typeof document === "undefined") {
927
- throw new Error(
928
- "findDocumentRoot can only be used in a browser environment."
929
- );
930
- }
931
- if (!element || !(element instanceof Node)) {
932
- return window.document.body;
933
- }
934
- let currentElement = element;
935
- while (currentElement && currentElement.parentNode) {
936
- if (currentElement.parentNode === document) {
937
- return document.body;
938
- } else if (currentElement.parentNode instanceof DocumentFragment) {
939
- return currentElement.parentNode;
940
- } else {
941
- currentElement = currentElement.parentNode;
942
- }
943
- }
944
- return window.document.body;
945
- }
946
-
947
- // src/components/Stack.tsx
948
- var import_clsx6 = __toESM(require("clsx"), 1);
949
- var import_jsx_runtime5 = require("react/jsx-runtime");
950
- var getFlexClassNames = ({ items, justify, grow }) => (0, import_clsx6.default)(
951
- "flex",
952
- items === "start" && "items-start",
953
- grow && "grow",
954
- items === "start" && "items-start",
955
- items === "center" && "items-center",
956
- items === "end" && "items-end",
957
- items === "start-center" && "items-start desktop:items-center",
958
- justify === "start" && "justify-start",
959
- justify === "center" && "justify-center",
960
- justify === "end" && "justify-end",
961
- justify === "end" && "justify-end",
962
- justify === "between" && "justify-between",
963
- justify === "around" && "justify-around"
964
- );
965
- var useGapClassNames = (sizing) => {
966
- return (0, import_clsx6.default)(
967
- sizing === "layout-group" && "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-compact-layout-group-gap",
968
- sizing === "layout" && "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-compact-layout-gap",
969
- sizing === "container" && "gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-compact-container-gap",
970
- sizing === "component" && "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-compact-component-gap"
971
- );
972
- };
973
- var Stack = (_a) => {
974
- var _b = _a, {
975
- children,
976
- items,
977
- justify,
978
- grow,
979
- padding,
980
- paddingX,
981
- paddingY,
982
- paddingBottom,
983
- paddingTop,
984
- paddingLeft,
985
- paddingRight,
986
- margin,
987
- marginX,
988
- marginY,
989
- horizontal,
990
- horizontalMobile,
991
- elevation = 0,
992
- rounded,
993
- centered,
994
- width,
995
- minHeight,
996
- maxWidth,
997
- minWidth,
998
- height,
999
- maxHeight,
1000
- borderColor,
1001
- borderTopColor,
1002
- borderRightColor,
1003
- borderBottomColor,
1004
- borderLeftColor,
1005
- backgroundColor,
1006
- sizing = "none",
1007
- overflowY = "inherit",
1008
- overflowX = "inherit",
1009
- flexShrink,
1010
- flexGrow,
1011
- position,
1012
- top,
1013
- left,
1014
- id,
1015
- noGap,
1016
- marginTop,
1017
- marginBottom,
1018
- testid,
1019
- bottom,
1020
- zIndex,
1021
- flexWrap,
1022
- className,
1023
- unclipEdges
1024
- } = _b, props = __objRest(_b, [
1025
- "children",
1026
- "items",
1027
- "justify",
1028
- "grow",
1029
- "padding",
1030
- "paddingX",
1031
- "paddingY",
1032
- "paddingBottom",
1033
- "paddingTop",
1034
- "paddingLeft",
1035
- "paddingRight",
1036
- "margin",
1037
- "marginX",
1038
- "marginY",
1039
- "horizontal",
1040
- "horizontalMobile",
1041
- "elevation",
1042
- "rounded",
1043
- "centered",
1044
- "width",
1045
- "minHeight",
1046
- "maxWidth",
1047
- "minWidth",
1048
- "height",
1049
- "maxHeight",
1050
- "borderColor",
1051
- "borderTopColor",
1052
- "borderRightColor",
1053
- "borderBottomColor",
1054
- "borderLeftColor",
1055
- "backgroundColor",
1056
- "sizing",
1057
- "overflowY",
1058
- "overflowX",
1059
- "flexShrink",
1060
- "flexGrow",
1061
- "position",
1062
- "top",
1063
- "left",
1064
- "id",
1065
- "noGap",
1066
- "marginTop",
1067
- "marginBottom",
1068
- "testid",
1069
- "bottom",
1070
- "zIndex",
1071
- "flexWrap",
1072
- "className",
1073
- "unclipEdges"
1074
- ]);
1075
- var _a2, _b2, _c, _d, _e, _f, _g;
1076
- const flexClassNames = getFlexClassNames({ items, justify, grow });
1077
- const gapClassNames = useGapClassNames(sizing);
1078
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1079
- "div",
1080
- __spreadProps(__spreadValues({
1081
- id,
1082
- "data-testid": testid
1083
- }, props), {
1084
- style: __spreadValues({
1085
- height: height === "screen" ? "100vh" : height === "full" ? "100%" : height === void 0 ? void 0 : height === "fit" ? "fit-content" : typeof height === "string" && isNaN(+height) ? height : `${height}px`,
1086
- maxHeight: maxHeight !== void 0 ? isNaN(+maxHeight) ? maxHeight : `${maxHeight}px` : (_a2 = props.style) == null ? void 0 : _a2.maxHeight,
1087
- maxWidth: maxWidth !== void 0 ? isNaN(+maxWidth) ? maxWidth : `${maxWidth}px` : (_b2 = props.style) == null ? void 0 : _b2.maxWidth,
1088
- minHeight: minHeight !== void 0 ? isNaN(+minHeight) ? minHeight : `${minHeight}px` : (_c = props.style) == null ? void 0 : _c.minHeight,
1089
- width: width !== void 0 && typeof width === "number" ? `${width}px` : void 0,
1090
- minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
1091
- border: borderColor ? `1px solid var(--color-${borderColor})` : void 0,
1092
- borderTop: borderTopColor ? `1px solid var(--color-${borderTopColor})` : void 0,
1093
- borderRight: borderRightColor ? `1px solid var(--color-${borderRightColor})` : void 0,
1094
- borderBottom: borderBottomColor ? `1px solid var(--color-${borderBottomColor})` : void 0,
1095
- borderLeft: borderLeftColor ? `1px solid var(--color-${borderLeftColor})` : void 0,
1096
- backgroundColor: backgroundColor ? `var(--color-${backgroundColor})` : void 0,
1097
- flexGrow: flexGrow !== void 0 ? flexGrow : void 0,
1098
- flexShrink: flexShrink !== void 0 ? flexShrink : void 0,
1099
- position: position !== void 0 ? position : void 0,
1100
- top: top !== void 0 ? `${top}px` : void 0,
1101
- bottom: bottom !== void 0 ? `${bottom}px` : void 0,
1102
- left: left !== void 0 ? `${left}px` : void 0,
1103
- borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
1104
- marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
1105
- zIndex: zIndex !== void 0 ? zIndex : void 0,
1106
- flexWrap,
1107
- paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
1108
- gap: (_g = props.style) == null ? void 0 : _g.gap
1109
- }, props.style),
1110
- className: (0, import_clsx6.default)(
1111
- "scrollbar-thin",
1112
- "max-w-screen",
1113
- width !== "fit" && "w-full",
1114
- width === "full" && "w-full",
1115
- width === "max" && "w-max",
1116
- centered && "mx-auto",
1117
- overflowY == "auto" && "overflow-y-auto",
1118
- overflowY == "hidden" && "overflow-y-hidden",
1119
- overflowY == "scroll" && "overflow-y-scroll",
1120
- overflowX == "auto" && "overflow-x-auto",
1121
- overflowX == "hidden" && "overflow-x-hidden",
1122
- overflowX == "scroll" && "overflow-x-scroll",
1123
- padding && sizing === "container" && "p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding",
1124
- padding && sizing === "layout" && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
1125
- padding && sizing === "layout-group" && "p-mobile-layout-group-padding desktop:p-desktop-layout-group-padding compact:p-desktop-compact-layout-group-padding",
1126
- padding && sizing === "component" && "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
1127
- paddingX && sizing === "container" && "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
1128
- paddingX && sizing === "layout" && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
1129
- paddingX && sizing === "layout-group" && "px-mobile-layout-group-padding desktop:px-desktop-layout-group-padding compact:px-desktop-compact-layout-group-padding",
1130
- paddingX && sizing === "component" && "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
1131
- paddingY && sizing === "container" && "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
1132
- paddingY && sizing === "layout" && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
1133
- paddingY && sizing === "layout-group" && paddingYUsingLayoutGroupGap,
1134
- paddingY && sizing === "component" && "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
1135
- paddingBottom && sizing === "container" && "pb-mobile-container-padding desktop:pb-desktop-container-padding compact:pb-desktop-compact-container-padding",
1136
- paddingBottom && sizing === "layout" && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
1137
- paddingBottom && sizing === "layout-group" && "pb-mobile-layout-group-padding desktop:pb-desktop-layout-group-padding compact:pb-desktop-compact-layout-group-padding",
1138
- paddingBottom && sizing === "component" && "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
1139
- paddingTop && sizing === "container" && "pt-mobile-container-padding desktop:pt-desktop-container-padding compact:pt-desktop-compact-container-padding",
1140
- paddingTop && sizing === "layout" && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
1141
- paddingTop && sizing === "layout-group" && "pt-mobile-layout-group-padding desktop:pt-desktop-layout-group-padding compact:pt-desktop-compact-layout-group-padding",
1142
- paddingTop && sizing === "component" && "pt-mobile-component-padding desktop:pt-desktop-component-padding compact:pt-desktop-compact-component-padding",
1143
- paddingLeft && sizing === "container" && "pl-mobile-container-padding desktop:pl-desktop-container-padding compact:pl-desktop-compact-container-padding",
1144
- paddingLeft && sizing === "layout" && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
1145
- paddingLeft && sizing === "layout-group" && "pl-mobile-layout-group-padding desktop:pl-desktop-layout-group-padding compact:pl-desktop-compact-layout-group-padding",
1146
- paddingLeft && sizing === "component" && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding",
1147
- paddingRight && sizing === "container" && "pr-mobile-container-padding desktop:pr-desktop-container-padding compact:pr-desktop-compact-container-padding",
1148
- paddingRight && sizing === "layout" && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
1149
- paddingRight && sizing === "layout-group" && "pr-mobile-layout-group-padding desktop:pr-desktop-layout-group-padding compact:pr-desktop-compact-layout-group-padding",
1150
- paddingRight && sizing === "component" && "pr-mobile-component-padding desktop:pr-desktop-component-padding compact:pr-desktop-compact-component-padding",
1151
- margin && sizing === "container" && "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
1152
- marginX && sizing === "container" && "mx-mobile-container-padding desktop:mx-desktop-container-padding compact:mx-compact-container-padding",
1153
- marginTop && sizing === "container" && "mt-mobile-container-padding desktop:mt-desktop-container-padding compact:mt-compact-container-padding",
1154
- marginBottom && sizing === "container" && "mb-mobile-container-padding desktop:mb-desktop-container-padding compact:mb-compact-container-padding",
1155
- marginY && sizing === "container" && "my-mobile-container-padding desktop:my-desktop-container-padding compact:my-compact-container-padding",
1156
- horizontal ? "desktop:flex-row" : "desktop:flex-col",
1157
- horizontalMobile ? "flex-row" : "flex-col",
1158
- flexClassNames,
1159
- !noGap && gapClassNames,
1160
- elevation === 0 && "shadow-none",
1161
- elevation === 2 && "shadow-2",
1162
- elevation === 4 && "shadow-4",
1163
- elevation === 16 && "shadow-16",
1164
- rounded && "rounded",
1165
- unclipEdges && "-m-0.75 p-1",
1166
- className
1167
- ),
1168
- children
1169
- })
1170
- );
1171
- };
1172
-
1173
- // src/components/Time.tsx
1174
- var import_jsx_runtime6 = require("react/jsx-runtime");
1175
- var timePickerScrollableStyle = "overflow-auto max-h-full py-4 no-scrollbar";
1176
- var Time = (_a) => {
1177
- var _b = _a, { onChange, format = "12h", id, testid } = _b, props = __objRest(_b, ["onChange", "format", "id", "testid"]);
1178
- const [showTimePicker, setShowTimePicker] = (0, import_react2.useState)(false);
1179
- const [hasInteracted, setHasInteracted] = (0, import_react2.useState)(false);
1180
- const inputRef = (0, import_react2.useRef)(null);
1181
- const inputContainerRef = (0, import_react2.useRef)(null);
1182
- const timeRef = (0, import_react2.useRef)(null);
1183
- const [timePosition, setTimePosition] = (0, import_react2.useState)({
1184
- top: 0,
1185
- left: 0,
1186
- width: 0
1187
- });
1188
- const [hour, setHour] = (0, import_react2.useState)(null);
1189
- const [minute, setMinute] = (0, import_react2.useState)(null);
1190
- const [meridiem, setMeridiem] = (0, import_react2.useState)(null);
1191
- const [inputValue, setInputValue] = (0, import_react2.useState)("");
1192
- const is12HourFormat = format === "12h";
1193
- const formattedTime = hour && minute ? is12HourFormat ? meridiem ? `${hour}:${minute} ${meridiem}` : `${hour}:${minute}` : `${hour}:${minute}` : "";
1194
- const updatePosition = () => {
1195
- if (inputContainerRef.current) {
1196
- const rect = inputContainerRef.current.getBoundingClientRect();
1197
- setTimePosition({
1198
- top: rect.bottom + window.scrollY + 6,
1199
- left: rect.left + window.scrollX,
1200
- width: rect.width
1201
- });
1202
- }
1203
- };
1204
- (0, import_react2.useEffect)(() => {
1205
- if (showTimePicker) {
1206
- updatePosition();
1207
- }
1208
- }, [showTimePicker, is12HourFormat]);
1209
- (0, import_react2.useEffect)(() => {
1210
- const handleClickOutside = (event) => {
1211
- if (inputRef.current && timeRef.current && !inputRef.current.contains(event.target) && !timeRef.current.contains(event.target)) {
1212
- setShowTimePicker(false);
1213
- }
1214
- };
1215
- if (showTimePicker) {
1216
- document.addEventListener("mousedown", handleClickOutside);
1217
- }
1218
- return () => {
1219
- document.removeEventListener("mousedown", handleClickOutside);
1220
- };
1221
- }, [showTimePicker, is12HourFormat]);
1222
- (0, import_react2.useEffect)(() => {
1223
- if (formattedTime && hasInteracted) {
1224
- setInputValue(formattedTime);
1225
- onChange == null ? void 0 : onChange({
1226
- target: { value: formattedTime }
1227
- });
1228
- }
1229
- }, [formattedTime, hasInteracted, onChange]);
1230
- const handleFocus = () => {
1231
- if (!props.disabled && !props.readOnly) {
1232
- setHasInteracted(true);
1233
- setShowTimePicker(true);
1234
- if (is12HourFormat && meridiem === null) {
1235
- setMeridiem("AM");
1236
- }
1237
- }
1238
- };
1239
- const handleSelect = (type, value) => {
1240
- if (type === "hour") setHour(value);
1241
- if (type === "minute") setMinute(value);
1242
- if (type === "meridiem") setMeridiem(value);
1243
- setTimeout(() => {
1244
- const allSet = (type === "hour" ? value : hour) && (type === "minute" ? value : minute) && (is12HourFormat ? type === "meridiem" ? value : meridiem : true);
1245
- if (allSet) {
1246
- setShowTimePicker(false);
1247
- }
1248
- }, 100);
1249
- };
1250
- (0, import_react2.useEffect)(() => {
1251
- if (!showTimePicker && formattedTime) {
1252
- setInputValue(formattedTime);
1253
- }
1254
- }, [showTimePicker, formattedTime]);
1255
- const handleInputChange = (e) => {
1256
- const value = e.target.value.toUpperCase().replace(/[^0-9:APM ]/gi, "").trim();
1257
- setInputValue(value);
1258
- if (value === "") {
1259
- setHour(null);
1260
- setMinute(null);
1261
- setMeridiem(null);
1262
- setShowTimePicker(true);
1263
- }
1264
- const match = value.match(
1265
- is12HourFormat ? /^(\d{1,2}):(\d{2})(?:\s*(AM|PM))?$/ : /^(\d{1,2}):(\d{2})$/
1266
- );
1267
- if (match) {
1268
- const [, hRaw, mRaw, mer] = match;
1269
- const h = parseInt(hRaw, 10);
1270
- const m = parseInt(mRaw, 10);
1271
- if (h >= 0 && h <= 23 && m >= 0 && m <= 59) {
1272
- let hStr;
1273
- const mStr = m.toString().padStart(2, "0");
1274
- let meridiemValue = mer;
1275
- if (is12HourFormat) {
1276
- hStr = (h % 12 || 12).toString().padStart(2, "0");
1277
- if (h > 12) {
1278
- meridiemValue = "PM";
1279
- }
1280
- setHour(hStr);
1281
- setMinute(mStr);
1282
- if (meridiemValue) {
1283
- setMeridiem(meridiemValue);
1284
- }
1285
- } else {
1286
- hStr = h.toString().padStart(2, "0");
1287
- setHour(hStr);
1288
- setMinute(mStr);
1289
- }
1290
- }
1291
- }
1292
- onChange == null ? void 0 : onChange(e);
1293
- };
1294
- const selectedRefs = {
1295
- hour: (0, import_react2.useRef)(null),
1296
- minute: (0, import_react2.useRef)(null),
1297
- meridiem: (0, import_react2.useRef)(null)
1298
- };
1299
- const handleKeyDown = (e) => {
1300
- if (e.key === "Enter") {
1301
- setShowTimePicker(false);
1302
- return;
1303
- }
1304
- if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
1305
- e.preventDefault();
1306
- let h;
1307
- let m;
1308
- let mer;
1309
- if (hour === null || minute === null || is12HourFormat && meridiem === null) {
1310
- const now = /* @__PURE__ */ new Date();
1311
- h = now.getHours();
1312
- m = Math.round(now.getMinutes() / 5) * 5;
1313
- if (m === 60) {
1314
- m = 0;
1315
- h += 1;
1316
- }
1317
- if (is12HourFormat) {
1318
- mer = h >= 12 ? "PM" : "AM";
1319
- h = h % 12 || 12;
1320
- } else {
1321
- mer = "AM";
1322
- }
1323
- } else {
1324
- h = parseInt(hour, 10);
1325
- m = parseInt(minute, 10);
1326
- mer = meridiem || "AM";
1327
- }
1328
- const step = 5;
1329
- const remainder = m % step;
1330
- m += e.key === "ArrowDown" ? remainder === 0 ? step : step - remainder : -(remainder === 0 ? step : remainder);
1331
- if (m >= 60) {
1332
- m -= 60;
1333
- h += 1;
1334
- } else if (m < 0) {
1335
- m += 60;
1336
- h -= 1;
1337
- }
1338
- if (is12HourFormat) {
1339
- if (h > 12) {
1340
- h = 1;
1341
- mer = mer === "AM" ? "PM" : "AM";
1342
- } else if (h <= 0) {
1343
- h = 12;
1344
- mer = mer === "AM" ? "PM" : "AM";
1345
- }
1346
- } else {
1347
- h = (h + 24) % 24;
1348
- }
1349
- setHour(h.toString().padStart(2, "0"));
1350
- setMinute(m.toString().padStart(2, "0"));
1351
- if (is12HourFormat) setMeridiem(mer);
1352
- };
1353
- (0, import_react2.useEffect)(() => {
1354
- if (showTimePicker) {
1355
- setTimeout(() => {
1356
- var _a2, _b2, _c;
1357
- (_a2 = selectedRefs.hour.current) == null ? void 0 : _a2.scrollIntoView({
1358
- block: "nearest",
1359
- behavior: "instant"
1360
- });
1361
- (_b2 = selectedRefs.minute.current) == null ? void 0 : _b2.scrollIntoView({
1362
- block: "nearest",
1363
- behavior: "instant"
1364
- });
1365
- if (is12HourFormat) {
1366
- (_c = selectedRefs.meridiem.current) == null ? void 0 : _c.scrollIntoView({
1367
- block: "nearest",
1368
- behavior: "instant"
1369
- });
1370
- }
1371
- }, 0);
1372
- }
1373
- }, [
1374
- showTimePicker,
1375
- is12HourFormat,
1376
- selectedRefs.hour,
1377
- selectedRefs.minute,
1378
- selectedRefs.meridiem
1379
- ]);
1380
- const renderOptions = (items, type) => items.map((val) => {
1381
- const isSelected = type === "hour" && val === hour || type === "minute" && val === minute || type === "meridiem" && val === meridiem;
1382
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1383
- TimeCell,
1384
- {
1385
- id: id ? `${id}-${type}-${val}` : void 0,
1386
- testid: testid ? `${testid}-${type}-${val}` : void 0,
1387
- selected: isSelected,
1388
- ref: isSelected ? (el) => {
1389
- selectedRefs[type].current = el;
1390
- } : null,
1391
- onClick: () => handleSelect(type, val),
1392
- className: (0, import_clsx7.default)("!size-10 cursor-pointer", typography.caption),
1393
- children: val
1394
- },
1395
- val
1396
- );
1397
- });
1398
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative max-w-38", children: [
1399
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1400
- InputBase,
1401
- __spreadProps(__spreadValues({}, props), {
1402
- id,
1403
- testid,
1404
- ref: inputRef,
1405
- inputContainerRef,
1406
- value: inputValue,
1407
- placeholder: is12HourFormat ? "hh:mm am" : "hh:mm",
1408
- after: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "schedule" }) }),
1409
- onFocus: handleFocus,
1410
- caption: props.caption,
1411
- onChange: handleInputChange,
1412
- onKeyDown: handleKeyDown,
1413
- type: "text"
1414
- })
1415
- ),
1416
- showTimePicker && (0, import_react_dom.createPortal)(
1417
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1418
- Stack,
1419
- {
1420
- id: id ? `${id}-timepicker` : void 0,
1421
- elevation: 4,
1422
- height: 240,
1423
- position: "absolute",
1424
- backgroundColor: "background-grouped-primary-normal",
1425
- overflowX: "hidden",
1426
- overflowY: "hidden",
1427
- zIndex: 50,
1428
- top: timePosition.top,
1429
- left: timePosition.left,
1430
- minWidth: timePosition.width,
1431
- maxWidth: 0,
1432
- rounded: true,
1433
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref: timeRef, className: "px-4 flex h-60", children: [
1434
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_clsx7.default)(timePickerScrollableStyle), children: renderOptions(
1435
- Array.from(
1436
- { length: is12HourFormat ? 12 : 24 },
1437
- (_, i) => (i + (is12HourFormat ? 1 : 0)).toString().padStart(2, "0")
1438
- ),
1439
- "hour"
1440
- ) }),
1441
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_clsx7.default)(timePickerScrollableStyle), children: renderOptions(
1442
- Array.from(
1443
- { length: 12 },
1444
- (_, i) => (i * 5).toString().padStart(2, "0")
1445
- ),
1446
- "minute"
1447
- ) }),
1448
- is12HourFormat && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "py-4", children: renderOptions(["AM", "PM"], "meridiem") })
1449
- ] })
1450
- }
1451
- ),
1452
- findDocumentRoot(timeRef.current)
1453
- )
1454
- ] });
1455
- };
1456
- function TimeCell(_a) {
1457
- var _b = _a, {
1458
- id,
1459
- testid,
1460
- selected = false,
1461
- start = false,
1462
- intermediate = false,
1463
- end = false,
1464
- today = false,
1465
- disabled = false,
1466
- onClick,
1467
- onHover,
1468
- onKeyDown,
1469
- children,
1470
- className,
1471
- ref
1472
- } = _b, props = __objRest(_b, [
1473
- "id",
1474
- "testid",
1475
- "selected",
1476
- "start",
1477
- "intermediate",
1478
- "end",
1479
- "today",
1480
- "disabled",
1481
- "onClick",
1482
- "onHover",
1483
- "onKeyDown",
1484
- "children",
1485
- "className",
1486
- "ref"
1487
- ]);
1488
- const isDefault = !selected && !start && !intermediate && !end && !today;
1489
- const isToday = today && !selected && !start && !intermediate && !end;
1490
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1491
- "button",
1492
- __spreadProps(__spreadValues({
1493
- id,
1494
- "data-testid": testid,
1495
- onPointerOver: onHover,
1496
- onClick,
1497
- onKeyDown,
1498
- disabled,
1499
- ref,
1500
- className: (0, import_clsx7.default)(
1501
- "w-full h-full aspect-square flex items-center justify-center ",
1502
- isDefault && "text-neutral-500 hover:bg-action-100 hover:text-action-500 active:text-action-300 disabled:text-neutral-300 disabled:pointer-events-none rounded",
1503
- isToday && "rounded-full border border-neutral-300 hover:bg-action-100 hover:text-action-500 active:text-action-300 disabled:text-neutral-300 ",
1504
- selected && "text-white bg-action-400 hover:bg-action-500 active:bg-action-300 disabled:text-neutral-400 disabled:bg-neutral-200 rounded",
1505
- start && "bg-action-400 hover:bg-action-500 active:bg-action-300 disabled:text-neutral-400 disabled:bg-neutral-200 rounded-l",
1506
- end && "bg-action-400 hover:bg-action-500 active:bg-action-300 disabled:text-neutral-400 disabled:bg-neutral-200 rounded-r",
1507
- intermediate && "bg-action-100 border-y border-action-400",
1508
- className
1509
- )
1510
- }, props), {
1511
- children
1512
- })
1513
- );
1514
- }
1515
- // Annotate the CommonJS export names for ESM import in node:
1516
- 0 && (module.exports = {
1517
- Time
1518
- });