@dmsi/wedgekit-react 0.0.1242 → 1.0.0

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 (643) 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 +52855 -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/pdf-l6QfMa5e.js +17649 -0
  282. package/dist/styles.css +1 -0
  283. package/dist/types.d.ts +33 -0
  284. package/dist/types.d.ts.map +1 -0
  285. package/dist/utils/date-patch-dashes.d.ts +17 -0
  286. package/dist/utils/date-patch-dashes.d.ts.map +1 -0
  287. package/dist/utils/date.d.ts +60 -0
  288. package/dist/utils/date.d.ts.map +1 -0
  289. package/dist/utils/formatting.d.ts +36 -0
  290. package/dist/utils/formatting.d.ts.map +1 -0
  291. package/dist/utils/index.d.ts +6 -0
  292. package/dist/utils/index.d.ts.map +1 -0
  293. package/dist/utils/mergeObjectArrays.d.ts +12 -0
  294. package/dist/utils/mergeObjectArrays.d.ts.map +1 -0
  295. package/dist/utils.d.ts +3 -0
  296. package/dist/utils.d.ts.map +1 -0
  297. package/package.json +17 -83
  298. package/dist/chunk-3JUIYULW.js +0 -231
  299. package/dist/chunk-3PIDINTF.js +0 -52
  300. package/dist/chunk-3UPUZBP5.js +0 -149
  301. package/dist/chunk-4RJKB7LC.js +0 -14
  302. package/dist/chunk-4UGMSWWA.js +0 -57
  303. package/dist/chunk-5IFPG6TS.js +0 -17
  304. package/dist/chunk-5N32SQ3R.js +0 -99
  305. package/dist/chunk-5UH6QUFB.js +0 -38
  306. package/dist/chunk-5UPADXVU.js +0 -2376
  307. package/dist/chunk-6YUQCRMX.js +0 -32
  308. package/dist/chunk-75USUR3I.js +0 -27
  309. package/dist/chunk-7IPESTQS.js +0 -93
  310. package/dist/chunk-7MBRCM3M.js +0 -66
  311. package/dist/chunk-7WDYXRMW.js +0 -110
  312. package/dist/chunk-7YA3TF73.js +0 -32
  313. package/dist/chunk-7Z3WINQ3.js +0 -59
  314. package/dist/chunk-7ZJIGTFN.js +0 -78
  315. package/dist/chunk-AJ5M6MVX.js +0 -7
  316. package/dist/chunk-AT4AWD6B.js +0 -44
  317. package/dist/chunk-BQNPOGD5.js +0 -105
  318. package/dist/chunk-BWPNXY7T.js +0 -78
  319. package/dist/chunk-CIYLALYO.js +0 -72
  320. package/dist/chunk-DNNX5EYX.js +0 -274
  321. package/dist/chunk-E3FOCECQ.js +0 -61
  322. package/dist/chunk-E7LGUC2B.js +0 -35
  323. package/dist/chunk-EA6Y4HXQ.js +0 -112
  324. package/dist/chunk-EWGHVZL5.js +0 -27
  325. package/dist/chunk-F4VE3THQ.js +0 -71
  326. package/dist/chunk-FXXRXLOL.js +0 -329
  327. package/dist/chunk-G242RHWI.js +0 -139
  328. package/dist/chunk-GOGNV5TF.js +0 -68
  329. package/dist/chunk-GYT5CL7R.js +0 -159
  330. package/dist/chunk-I3W5K76C.js +0 -142
  331. package/dist/chunk-J3HNYUSG.js +0 -34
  332. package/dist/chunk-J4IMVWT5.js +0 -183
  333. package/dist/chunk-K6RPFIMB.js +0 -77
  334. package/dist/chunk-KBIEWFQS.js +0 -27
  335. package/dist/chunk-KESCXOG3.js +0 -82
  336. package/dist/chunk-MAEVKATN.js +0 -110
  337. package/dist/chunk-MBZ55T2D.js +0 -51
  338. package/dist/chunk-MOBFZ672.js +0 -134
  339. package/dist/chunk-MVDGHWKO.js +0 -238
  340. package/dist/chunk-NAWP246H.js +0 -65
  341. package/dist/chunk-NKUETCDA.js +0 -44
  342. package/dist/chunk-NSZTJ5R4.js +0 -38
  343. package/dist/chunk-NT26ZKSI.js +0 -82
  344. package/dist/chunk-NW75QACN.js +0 -91
  345. package/dist/chunk-OG2PGA3X.js +0 -154
  346. package/dist/chunk-OM7QLLI2.js +0 -277
  347. package/dist/chunk-ORMEWXMH.js +0 -37
  348. package/dist/chunk-PABII472.js +0 -579
  349. package/dist/chunk-PBJ2MEHM.js +0 -483
  350. package/dist/chunk-PE3EZP56.js +0 -373
  351. package/dist/chunk-QBIEU25R.js +0 -61
  352. package/dist/chunk-QG6NWMGA.js +0 -138
  353. package/dist/chunk-QVWYTQKL.js +0 -29
  354. package/dist/chunk-SATCWGO7.js +0 -166
  355. package/dist/chunk-SBRRNFOP.js +0 -33
  356. package/dist/chunk-SJZNVG4N.js +0 -47
  357. package/dist/chunk-TBZ243DS.js +0 -173
  358. package/dist/chunk-UARCWLMD.js +0 -66
  359. package/dist/chunk-UFX5XIJL.js +0 -178
  360. package/dist/chunk-UZHBKSXJ.js +0 -87
  361. package/dist/chunk-VEEZ7VRJ.js +0 -137
  362. package/dist/chunk-VJVY6NPF.js +0 -32
  363. package/dist/chunk-VUKYIERA.js +0 -89
  364. package/dist/chunk-VXWSAIB5.js +0 -26
  365. package/dist/chunk-W5NXOJ4L.js +0 -104
  366. package/dist/chunk-WVGXD7HT.js +0 -19
  367. package/dist/chunk-WVUIIBRR.js +0 -51
  368. package/dist/chunk-X4OKKRN5.js +0 -140
  369. package/dist/chunk-X7BKBBIH.js +0 -114
  370. package/dist/chunk-XB2S2QMB.js +0 -67
  371. package/dist/chunk-Y5GD2FJA.js +0 -32
  372. package/dist/chunk-YKEPPS2I.js +0 -192
  373. package/dist/chunk-YULGJORA.js +0 -259
  374. package/dist/chunk-Z2HPSFEQ.js +0 -14
  375. package/dist/chunk-Z5YP2GI6.js +0 -142
  376. package/dist/chunk-ZRFXUER3.js +0 -468
  377. package/dist/components/AccessCard.cjs +0 -661
  378. package/dist/components/AccessCard.js +0 -13
  379. package/dist/components/AccessCardGroup.cjs +0 -365
  380. package/dist/components/AccessCardGroup.js +0 -11
  381. package/dist/components/AccessChangerTabItem.cjs +0 -352
  382. package/dist/components/AccessChangerTabItem.js +0 -75
  383. package/dist/components/Accordion.cjs +0 -680
  384. package/dist/components/Accordion.js +0 -13
  385. package/dist/components/Alert.cjs +0 -850
  386. package/dist/components/Alert.js +0 -14
  387. package/dist/components/Breadcrumbs.cjs +0 -456
  388. package/dist/components/Breadcrumbs.js +0 -125
  389. package/dist/components/Button.cjs +0 -401
  390. package/dist/components/Button.js +0 -9
  391. package/dist/components/CalendarRange.cjs +0 -6569
  392. package/dist/components/CalendarRange.css +0 -5546
  393. package/dist/components/CalendarRange.js +0 -78
  394. package/dist/components/Caption.cjs +0 -365
  395. package/dist/components/Caption.js +0 -9
  396. package/dist/components/Card.cjs +0 -128
  397. package/dist/components/Card.js +0 -7
  398. package/dist/components/Checkbox.cjs +0 -421
  399. package/dist/components/Checkbox.js +0 -11
  400. package/dist/components/CompactImagesPreview.cjs +0 -604
  401. package/dist/components/CompactImagesPreview.js +0 -14
  402. package/dist/components/ContentTab.cjs +0 -483
  403. package/dist/components/ContentTab.js +0 -11
  404. package/dist/components/ContentTabs.cjs +0 -599
  405. package/dist/components/ContentTabs.js +0 -125
  406. package/dist/components/DMSiLogo.cjs +0 -97
  407. package/dist/components/DMSiLogo.js +0 -60
  408. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +0 -6558
  409. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +0 -5546
  410. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +0 -74
  411. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +0 -6558
  412. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +0 -5546
  413. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +0 -74
  414. package/dist/components/DataGrid/PinnedColumns.cjs +0 -6558
  415. package/dist/components/DataGrid/PinnedColumns.css +0 -5546
  416. package/dist/components/DataGrid/PinnedColumns.js +0 -74
  417. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +0 -6560
  418. package/dist/components/DataGrid/TableBody/LoadingCell.css +0 -5546
  419. package/dist/components/DataGrid/TableBody/LoadingCell.js +0 -74
  420. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +0 -6560
  421. package/dist/components/DataGrid/TableBody/TableBodyRow.css +0 -5546
  422. package/dist/components/DataGrid/TableBody/TableBodyRow.js +0 -74
  423. package/dist/components/DataGrid/TableBody/index.cjs +0 -6560
  424. package/dist/components/DataGrid/TableBody/index.css +0 -5546
  425. package/dist/components/DataGrid/TableBody/index.js +0 -74
  426. package/dist/components/DataGrid/index.cjs +0 -6563
  427. package/dist/components/DataGrid/index.css +0 -5546
  428. package/dist/components/DataGrid/index.js +0 -77
  429. package/dist/components/DataGrid/utils.cjs +0 -6558
  430. package/dist/components/DataGrid/utils.css +0 -5546
  431. package/dist/components/DataGrid/utils.js +0 -74
  432. package/dist/components/DataGridCell.cjs +0 -2531
  433. package/dist/components/DataGridCell.js +0 -30
  434. package/dist/components/DataTable.cjs +0 -847
  435. package/dist/components/DataTable.js +0 -775
  436. package/dist/components/DateInput.cjs +0 -6560
  437. package/dist/components/DateInput.css +0 -5546
  438. package/dist/components/DateInput.js +0 -74
  439. package/dist/components/DateRangeInput.cjs +0 -7151
  440. package/dist/components/DateRangeInput.css +0 -5546
  441. package/dist/components/DateRangeInput.js +0 -652
  442. package/dist/components/DebugJson.cjs +0 -58
  443. package/dist/components/DebugJson.js +0 -35
  444. package/dist/components/Display.cjs +0 -263
  445. package/dist/components/Display.js +0 -12
  446. package/dist/components/EditingContext.cjs +0 -86
  447. package/dist/components/EditingContext.js +0 -12
  448. package/dist/components/EmblaCarousel/ArrowButtons.cjs +0 -151
  449. package/dist/components/EmblaCarousel/ArrowButtons.js +0 -9
  450. package/dist/components/EmblaCarousel/SelectedSnapDisplay.cjs +0 -38
  451. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +0 -7
  452. package/dist/components/EmblaCarousel/index.cjs +0 -420
  453. package/dist/components/EmblaCarousel/index.js +0 -12
  454. package/dist/components/EmptyCartIcon.cjs +0 -51
  455. package/dist/components/EmptyCartIcon.js +0 -7
  456. package/dist/components/FilterGroup.cjs +0 -1801
  457. package/dist/components/FilterGroup.js +0 -267
  458. package/dist/components/FooterBar.cjs +0 -64
  459. package/dist/components/FooterBar.js +0 -31
  460. package/dist/components/FullViewportBox.cjs +0 -60
  461. package/dist/components/FullViewportBox.js +0 -27
  462. package/dist/components/Grid.cjs +0 -135
  463. package/dist/components/Grid.js +0 -7
  464. package/dist/components/Heading.cjs +0 -267
  465. package/dist/components/Heading.js +0 -14
  466. package/dist/components/HorizontalDivider.cjs +0 -82
  467. package/dist/components/HorizontalDivider.js +0 -26
  468. package/dist/components/Icon.cjs +0 -101
  469. package/dist/components/Icon.js +0 -7
  470. package/dist/components/ImagePlaceholder.cjs +0 -65
  471. package/dist/components/ImagePlaceholder.js +0 -7
  472. package/dist/components/Input.cjs +0 -923
  473. package/dist/components/Input.js +0 -23
  474. package/dist/components/InputGroup.cjs +0 -307
  475. package/dist/components/InputGroup.js +0 -68
  476. package/dist/components/Label.cjs +0 -252
  477. package/dist/components/Label.js +0 -8
  478. package/dist/components/Link.cjs +0 -304
  479. package/dist/components/Link.js +0 -8
  480. package/dist/components/List.cjs +0 -39
  481. package/dist/components/List.js +0 -16
  482. package/dist/components/ListGroup.cjs +0 -568
  483. package/dist/components/ListGroup.js +0 -11
  484. package/dist/components/LiveChatComponent.cjs +0 -63
  485. package/dist/components/LiveChatComponent.js +0 -40
  486. package/dist/components/LoadingScrim.cjs +0 -90
  487. package/dist/components/LoadingScrim.js +0 -28
  488. package/dist/components/LogoAgilityTopBar.cjs +0 -133
  489. package/dist/components/LogoAgilityTopBar.js +0 -96
  490. package/dist/components/LogoDMSiTopBar.cjs +0 -97
  491. package/dist/components/LogoDMSiTopBar.js +0 -7
  492. package/dist/components/LogoMillworkTopBar.cjs +0 -239
  493. package/dist/components/LogoMillworkTopBar.js +0 -202
  494. package/dist/components/MainBar.cjs +0 -234
  495. package/dist/components/MainBar.js +0 -66
  496. package/dist/components/MaxViewportBox.cjs +0 -45
  497. package/dist/components/MaxViewportBox.js +0 -22
  498. package/dist/components/Menu.cjs +0 -505
  499. package/dist/components/Menu.js +0 -14
  500. package/dist/components/MenuOption.cjs +0 -695
  501. package/dist/components/MenuOption.js +0 -18
  502. package/dist/components/MobileDataGrid/ColumnList.cjs +0 -991
  503. package/dist/components/MobileDataGrid/ColumnList.css +0 -5546
  504. package/dist/components/MobileDataGrid/ColumnList.js +0 -20
  505. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +0 -6668
  506. package/dist/components/MobileDataGrid/ColumnSelector/index.css +0 -5546
  507. package/dist/components/MobileDataGrid/ColumnSelector/index.js +0 -74
  508. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.cjs +0 -31
  509. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +0 -7
  510. package/dist/components/MobileDataGrid/GridContextProvider/index.cjs +0 -186
  511. package/dist/components/MobileDataGrid/GridContextProvider/index.js +0 -8
  512. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.cjs +0 -333
  513. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +0 -12
  514. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +0 -907
  515. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +0 -19
  516. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +0 -6978
  517. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +0 -5546
  518. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +0 -74
  519. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +0 -620
  520. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +0 -16
  521. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +0 -1457
  522. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +0 -29
  523. package/dist/components/MobileDataGrid/index.cjs +0 -7489
  524. package/dist/components/MobileDataGrid/index.css +0 -5546
  525. package/dist/components/MobileDataGrid/index.js +0 -74
  526. package/dist/components/Modal.cjs +0 -995
  527. package/dist/components/Modal.js +0 -23
  528. package/dist/components/ModalButtons.cjs +0 -491
  529. package/dist/components/ModalButtons.js +0 -11
  530. package/dist/components/ModalContent.cjs +0 -204
  531. package/dist/components/ModalContent.js +0 -8
  532. package/dist/components/ModalHeader.cjs +0 -563
  533. package/dist/components/ModalHeader.js +0 -12
  534. package/dist/components/ModalScrim.cjs +0 -69
  535. package/dist/components/ModalScrim.js +0 -7
  536. package/dist/components/NavigationTab.cjs +0 -522
  537. package/dist/components/NavigationTab.js +0 -11
  538. package/dist/components/NavigationTabs.cjs +0 -572
  539. package/dist/components/NavigationTabs.js +0 -61
  540. package/dist/components/NestedMenu.cjs +0 -1275
  541. package/dist/components/NestedMenu.js +0 -164
  542. package/dist/components/Notification.cjs +0 -871
  543. package/dist/components/Notification.js +0 -126
  544. package/dist/components/OptionPill.cjs +0 -597
  545. package/dist/components/OptionPill.js +0 -12
  546. package/dist/components/OrderCheckIcon.cjs +0 -85
  547. package/dist/components/OrderCheckIcon.js +0 -7
  548. package/dist/components/PDFViewer/DownloadIcon.cjs +0 -618
  549. package/dist/components/PDFViewer/DownloadIcon.js +0 -17
  550. package/dist/components/PDFViewer/PDFElement.cjs +0 -571
  551. package/dist/components/PDFViewer/PDFElement.js +0 -11
  552. package/dist/components/PDFViewer/PDFNavigation.cjs +0 -828
  553. package/dist/components/PDFViewer/PDFNavigation.js +0 -14
  554. package/dist/components/PDFViewer/PDFPage.cjs +0 -56
  555. package/dist/components/PDFViewer/PDFPage.js +0 -7
  556. package/dist/components/PDFViewer/index.cjs +0 -1941
  557. package/dist/components/PDFViewer/index.js +0 -182
  558. package/dist/components/Pagination.cjs +0 -436
  559. package/dist/components/Pagination.js +0 -10
  560. package/dist/components/Paragraph.cjs +0 -261
  561. package/dist/components/Paragraph.js +0 -8
  562. package/dist/components/Password.cjs +0 -1123
  563. package/dist/components/Password.js +0 -75
  564. package/dist/components/ProductImagePreview/CarouselPagination.cjs +0 -75
  565. package/dist/components/ProductImagePreview/CarouselPagination.js +0 -7
  566. package/dist/components/ProductImagePreview/MobileImageCarousel.cjs +0 -216
  567. package/dist/components/ProductImagePreview/MobileImageCarousel.js +0 -7
  568. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +0 -214
  569. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +0 -7
  570. package/dist/components/ProductImagePreview/Thumbnail.cjs +0 -112
  571. package/dist/components/ProductImagePreview/Thumbnail.js +0 -8
  572. package/dist/components/ProductImagePreview/ZoomWindow.cjs +0 -198
  573. package/dist/components/ProductImagePreview/ZoomWindow.js +0 -8
  574. package/dist/components/ProductImagePreview/index.cjs +0 -1447
  575. package/dist/components/ProductImagePreview/index.js +0 -22
  576. package/dist/components/ProjectBar.cjs +0 -279
  577. package/dist/components/ProjectBar.js +0 -71
  578. package/dist/components/Radio.cjs +0 -386
  579. package/dist/components/Radio.js +0 -10
  580. package/dist/components/Search.cjs +0 -1033
  581. package/dist/components/Search.js +0 -14
  582. package/dist/components/SearchResultImage/index.cjs +0 -92
  583. package/dist/components/SearchResultImage/index.js +0 -8
  584. package/dist/components/Select.cjs +0 -1012
  585. package/dist/components/Select.js +0 -14
  586. package/dist/components/SideMenu.cjs +0 -61
  587. package/dist/components/SideMenu.js +0 -28
  588. package/dist/components/SideMenuGroup.cjs +0 -593
  589. package/dist/components/SideMenuGroup.js +0 -97
  590. package/dist/components/SideMenuItem.cjs +0 -568
  591. package/dist/components/SideMenuItem.js +0 -95
  592. package/dist/components/SimpleTable.cjs +0 -547
  593. package/dist/components/SimpleTable.js +0 -10
  594. package/dist/components/SkeletonParagraph.cjs +0 -51
  595. package/dist/components/SkeletonParagraph.js +0 -7
  596. package/dist/components/Spinner.cjs +0 -57
  597. package/dist/components/Spinner.js +0 -7
  598. package/dist/components/Stack.cjs +0 -434
  599. package/dist/components/Stack.js +0 -8
  600. package/dist/components/StatusPill.cjs +0 -303
  601. package/dist/components/StatusPill.js +0 -64
  602. package/dist/components/Stepper.cjs +0 -1478
  603. package/dist/components/Stepper.js +0 -239
  604. package/dist/components/Subheader.cjs +0 -255
  605. package/dist/components/Subheader.js +0 -8
  606. package/dist/components/Surface.cjs +0 -101
  607. package/dist/components/Surface.js +0 -7
  608. package/dist/components/Swatch.cjs +0 -2089
  609. package/dist/components/Swatch.js +0 -1513
  610. package/dist/components/Textarea.cjs +0 -330
  611. package/dist/components/Textarea.js +0 -136
  612. package/dist/components/Theme.cjs +0 -51
  613. package/dist/components/Theme.js +0 -7
  614. package/dist/components/Time.cjs +0 -1511
  615. package/dist/components/Time.js +0 -373
  616. package/dist/components/Toast.cjs +0 -764
  617. package/dist/components/Toast.js +0 -243
  618. package/dist/components/Tooltip.cjs +0 -337
  619. package/dist/components/Tooltip.js +0 -14
  620. package/dist/components/TopBar.cjs +0 -392
  621. package/dist/components/TopBar.js +0 -148
  622. package/dist/components/Upload.cjs +0 -823
  623. package/dist/components/Upload.js +0 -132
  624. package/dist/components/WorldpayIframe.cjs +0 -45
  625. package/dist/components/WorldpayIframe.js +0 -22
  626. package/dist/components/index.cjs +0 -9454
  627. package/dist/components/index.css +0 -5546
  628. package/dist/components/index.js +0 -174
  629. package/dist/components/useMenuSystem.cjs +0 -442
  630. package/dist/components/useMenuSystem.js +0 -15
  631. package/dist/components/useMounted.cjs +0 -39
  632. package/dist/components/useMounted.js +0 -8
  633. package/dist/fonts.css +0 -21
  634. package/dist/hooks/index.cjs +0 -523
  635. package/dist/hooks/index.js +0 -22
  636. package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
  637. package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
  638. package/dist/index.css +0 -5524
  639. package/dist/open-sans-55T6A4JE.woff2 +0 -0
  640. package/dist/types.cjs +0 -18
  641. package/dist/types.js +0 -0
  642. package/dist/utils/index.cjs +0 -264
  643. package/dist/utils/index.js +0 -43
@@ -1,1478 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __defProps = Object.defineProperties;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropNames = Object.getOwnPropertyNames;
9
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
- var __getProtoOf = Object.getPrototypeOf;
11
- var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
- var __spreadValues = (a, b) => {
15
- for (var prop in b || (b = {}))
16
- if (__hasOwnProp.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- if (__getOwnPropSymbols)
19
- for (var prop of __getOwnPropSymbols(b)) {
20
- if (__propIsEnum.call(b, prop))
21
- __defNormalProp(a, prop, b[prop]);
22
- }
23
- return a;
24
- };
25
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
- var __objRest = (source, exclude) => {
27
- var target = {};
28
- for (var prop in source)
29
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
- target[prop] = source[prop];
31
- if (source != null && __getOwnPropSymbols)
32
- for (var prop of __getOwnPropSymbols(source)) {
33
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
- target[prop] = source[prop];
35
- }
36
- return target;
37
- };
38
- var __export = (target, all) => {
39
- for (var name in all)
40
- __defProp(target, name, { get: all[name], enumerable: true });
41
- };
42
- var __copyProps = (to, from, except, desc) => {
43
- if (from && typeof from === "object" || typeof from === "function") {
44
- for (let key of __getOwnPropNames(from))
45
- if (!__hasOwnProp.call(to, key) && key !== except)
46
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
- }
48
- return to;
49
- };
50
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
- // If the importer is in node compatibility mode or this is not an ESM
52
- // file that has been converted to a CommonJS file using a Babel-
53
- // compatible transform (i.e. "__esModule" has not been set), then set
54
- // "default" to the CommonJS "module.exports" for node compatibility.
55
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
- mod
57
- ));
58
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
-
60
- // src/components/Stepper.tsx
61
- var Stepper_exports = {};
62
- __export(Stepper_exports, {
63
- Stepper: () => Stepper
64
- });
65
- module.exports = __toCommonJS(Stepper_exports);
66
- var import_react8 = require("react");
67
-
68
- // src/components/Button.tsx
69
- var import_clsx2 = __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/Spinner.tsx
212
- var import_jsx_runtime = require("react/jsx-runtime");
213
- var Spinner = ({ size = "small", testid }) => {
214
- const dimension = size === "large" ? 48 : 24;
215
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
216
- "svg",
217
- {
218
- "data-testid": testid,
219
- width: dimension,
220
- height: dimension,
221
- viewBox: "0 0 24 24",
222
- xmlns: "http://www.w3.org/2000/svg",
223
- fill: "#1D1E1E",
224
- className: "spinner",
225
- "aria-label": "Loading",
226
- children: [
227
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
228
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
229
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
231
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
232
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
233
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
234
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
235
- ]
236
- }
237
- );
238
- };
239
- Spinner.displayName = "Spinner";
240
-
241
- // src/components/Button.tsx
242
- var import_jsx_runtime2 = require("react/jsx-runtime");
243
- var Button = (_a) => {
244
- var _b = _a, {
245
- variant = "primary",
246
- as = "button",
247
- block,
248
- leftIcon,
249
- rightIcon,
250
- className,
251
- classNameLabel,
252
- disabled = false,
253
- children,
254
- iconOnly = false,
255
- colorClassName,
256
- href,
257
- id,
258
- testid,
259
- isLoading,
260
- fontNormal = false
261
- } = _b, props = __objRest(_b, [
262
- "variant",
263
- "as",
264
- "block",
265
- "leftIcon",
266
- "rightIcon",
267
- "className",
268
- "classNameLabel",
269
- "disabled",
270
- "children",
271
- "iconOnly",
272
- "colorClassName",
273
- "href",
274
- "id",
275
- "testid",
276
- "isLoading",
277
- "fontNormal"
278
- ]);
279
- const primaryVariantStyles = variant === "primary" && (0, import_clsx2.default)(
280
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
281
- "bg-background-action-primary-normal border-background-action-primary-normal",
282
- "hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
283
- "focus:bg-background-action-primary-hover focus:border-background-action-primary-hover focus:outline-0",
284
- "active:bg-background-action-primary-active active:border-background-action-primary-active",
285
- "disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
286
- );
287
- const secondaryVariantStyles = variant === "secondary" && (0, import_clsx2.default)(
288
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
289
- "bg-background-action-secondary-normal border-border-action-normal",
290
- "hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
291
- "focus:bg-background-action-secondary-hover focus:border-border-action-hover focus:text-text-action-primary-hover focus:outline-0",
292
- "active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
293
- "disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
294
- );
295
- const tertiaryVariantStyles = variant === "tertiary" && (0, import_clsx2.default)(
296
- "bg-transparent border-transparent",
297
- iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
298
- "bg-transparent border-transparent",
299
- "hover:bg-background-action-secondary-hover hover:border-background-action-secondary-hover hover:text-text-action-primary-hover",
300
- "focus:bg-background-action-secondary-hover focus:border-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
301
- "active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
302
- "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
303
- );
304
- const quarternaryOutlinedVariantStyles = variant === "quarternary-outlined" && (0, import_clsx2.default)(
305
- "bg-transparent border-transparent",
306
- iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-primary-normal",
307
- "bg-transparent border-transparent",
308
- "hover:bg-transparent hover:border-border-primary-normal hover:text-text-primary-normal",
309
- "focus:bg-transparent focus:border-border-primary-normal focus:text-text-primary-normal focus:outline-0",
310
- "active:bg-transparent active:border-transparent active:text-text-primary-active",
311
- "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
312
- );
313
- const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx2.default)(
314
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
315
- "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
316
- "hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
317
- "focus:bg-background-action-critical-primary-hover focus:border-background-action-critical-primary-hover focus:outline-0",
318
- "active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
319
- "disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
320
- );
321
- const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0, import_clsx2.default)(
322
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
323
- "bg-background-action-critical-secondary-normal border-border-action-critical-normal",
324
- "hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
325
- "focus:bg-background-action-critical-secondary-hover focus:border-border-action-critical-hover focus:text-text-action-critical-hover focus:outline-0",
326
- "active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
327
- "disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
328
- );
329
- const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0, import_clsx2.default)(
330
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
331
- "bg-transparent border-transparent text-text-action-critical-normal",
332
- "hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
333
- "focus:bg-background-action-critical-secondary-hover focus:border-background-action-critical-secondary-hover focus:text-text-action-critical-hover focus:outline-0",
334
- "active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
335
- "disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
336
- );
337
- const navigationVarianStyles = variant === "navigation" && (0, import_clsx2.default)(
338
- (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
339
- "bg-transparent",
340
- "hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover",
341
- "focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
342
- "active:bg-background-action-secondary-active active:text-text-action-primary-active",
343
- "disabled:bg-transparent disabled:text-text-action-primary-normal",
344
- "flex-col",
345
- paddingUsingComponentGap
346
- );
347
- const notNavigationVariantStyles = variant !== "navigation" && (0, import_clsx2.default)("border-2 flex-row", componentPaddingMinus2pxBorder, componentGap);
348
- const buttonClasses = (0, import_clsx2.default)(
349
- disabled ? "cursor-default" : "cursor-pointer",
350
- block ? "w-full" : "w-fit",
351
- baseTransition,
352
- "rounded-sm whitespace-nowrap inline-flex items-center justify-center group/btn",
353
- primaryVariantStyles,
354
- secondaryVariantStyles,
355
- tertiaryVariantStyles,
356
- quarternaryOutlinedVariantStyles,
357
- primaryCriticalVariantStyles,
358
- secondaryCriticalVariantStyles,
359
- tertiaryCriticalVariantStyles,
360
- navigationVarianStyles,
361
- notNavigationVariantStyles,
362
- className
363
- );
364
- const labelClasses = (0, import_clsx2.default)(
365
- "min-h-6 flex items-center justify-center",
366
- classNameLabel,
367
- fontNormal && "font-normal!",
368
- componentPaddingXUsingComponentGap,
369
- typography.buttonLabel
370
- );
371
- const Element = href && !as ? "a" : as;
372
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
373
- Element,
374
- __spreadProps(__spreadValues({
375
- id,
376
- "data-testid": testid,
377
- type: Element === "button" ? "button" : void 0,
378
- className: buttonClasses
379
- }, props), {
380
- onClick: props.onClick,
381
- disabled,
382
- href,
383
- "data-theme": variant === "navigation" ? "brand" : void 0,
384
- children: [
385
- leftIcon && leftIcon,
386
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, { size: "small" }),
387
- !iconOnly && !isLoading && children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
388
- "span",
389
- {
390
- id: id ? `${id}-label` : void 0,
391
- "data-testid": testid ? `${testid}-label` : void 0,
392
- className: labelClasses,
393
- children
394
- }
395
- ),
396
- rightIcon && rightIcon
397
- ]
398
- })
399
- );
400
- };
401
- Button.displayName = "Button";
402
-
403
- // src/components/Input.tsx
404
- var import_react = require("react");
405
- var import_clsx6 = __toESM(require("clsx"), 1);
406
-
407
- // src/components/Label.tsx
408
- var import_clsx3 = __toESM(require("clsx"), 1);
409
- var import_jsx_runtime3 = require("react/jsx-runtime");
410
- var Label = (_a) => {
411
- var _b = _a, {
412
- as = "span",
413
- padded,
414
- className,
415
- color,
416
- align,
417
- id,
418
- testid
419
- } = _b, props = __objRest(_b, [
420
- "as",
421
- "padded",
422
- "className",
423
- "color",
424
- "align",
425
- "id",
426
- "testid"
427
- ]);
428
- const Element = as;
429
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
430
- Element,
431
- __spreadProps(__spreadValues({
432
- id,
433
- "data-testid": testid,
434
- className: (0, import_clsx3.default)(
435
- typography.label,
436
- align === "left" && "text-left",
437
- align === "center" && "text-center",
438
- align === "right" && "text-right",
439
- className,
440
- padded && componentPaddingXUsingComponentGap
441
- )
442
- }, props), {
443
- style: __spreadProps(__spreadValues({}, props.style), {
444
- color: color ? `var(--color-${color})` : void 0
445
- })
446
- })
447
- );
448
- };
449
- Label.displayName = "Label";
450
-
451
- // src/components/Icon.tsx
452
- var import_clsx4 = __toESM(require("clsx"), 1);
453
- var import_jsx_runtime4 = require("react/jsx-runtime");
454
- function Icon(_a) {
455
- var _b = _a, {
456
- name,
457
- size = 24,
458
- variant = "outline",
459
- testid
460
- } = _b, props = __objRest(_b, [
461
- "name",
462
- "size",
463
- "variant",
464
- "testid"
465
- ]);
466
- const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
467
- const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
468
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
469
- "span",
470
- __spreadProps(__spreadValues({}, props), {
471
- "data-testid": testid,
472
- className: (0, import_clsx4.default)(
473
- "icon",
474
- `icon-${size}`,
475
- // size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
476
- props.className
477
- ),
478
- style: __spreadValues({
479
- fontVariationSettings: variantStyle + `, ${weightStyle}`
480
- }, props.style),
481
- children: name
482
- })
483
- );
484
- }
485
-
486
- // src/utils/formatting.tsx
487
- function getDecimalPlaceholder(decimals) {
488
- if (!decimals || decimals <= 0) {
489
- return {};
490
- }
491
- return {
492
- placeholder: `0.${"0".repeat(decimals)}`
493
- };
494
- }
495
- function formatDecimalValue(value, decimals) {
496
- if (!value || value === "") {
497
- return "";
498
- }
499
- const numValue = typeof value === "string" ? parseFloat(value) : value;
500
- if (isNaN(numValue)) {
501
- return "";
502
- }
503
- if (!decimals || decimals <= 0) {
504
- return String(Math.round(numValue));
505
- }
506
- return numValue.toFixed(decimals);
507
- }
508
- function formatCurrencyDisplay(value) {
509
- if (!value || value === "") {
510
- return "";
511
- }
512
- const parts = value.split(".");
513
- const integerPart = parts[0];
514
- const decimalPart = parts[1];
515
- const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
516
- return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
517
- }
518
-
519
- // src/components/Paragraph.tsx
520
- var import_clsx5 = __toESM(require("clsx"), 1);
521
- var import_jsx_runtime5 = require("react/jsx-runtime");
522
- var Paragraph = (_a) => {
523
- var _b = _a, {
524
- className,
525
- color,
526
- padded,
527
- align = "left",
528
- tall,
529
- addOverflow,
530
- children,
531
- as = "p",
532
- id,
533
- testid
534
- } = _b, props = __objRest(_b, [
535
- "className",
536
- "color",
537
- "padded",
538
- "align",
539
- "tall",
540
- "addOverflow",
541
- "children",
542
- "as",
543
- "id",
544
- "testid"
545
- ]);
546
- const Element = as;
547
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
548
- Element,
549
- __spreadProps(__spreadValues({
550
- id,
551
- "data-testid": testid
552
- }, props), {
553
- className: (0, import_clsx5.default)(
554
- typography.paragraph,
555
- className,
556
- padded && componentPaddingXUsingComponentGap,
557
- align === "left" && "text-left",
558
- align === "center" && "text-center",
559
- align === "right" && "text-right",
560
- tall && "!leading-6",
561
- addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
562
- ),
563
- style: __spreadProps(__spreadValues({}, props.style), {
564
- color: color ? `var(--color-${color})` : void 0
565
- }),
566
- children
567
- })
568
- );
569
- };
570
- Paragraph.displayName = "Paragraph";
571
-
572
- // src/components/Input.tsx
573
- var import_jsx_runtime6 = require("react/jsx-runtime");
574
- var InputBase = (_a) => {
575
- var _b = _a, {
576
- id,
577
- testid,
578
- before,
579
- after,
580
- rightAdornment,
581
- type,
582
- label,
583
- error,
584
- className,
585
- align = "left",
586
- caption,
587
- required,
588
- selectOnFocus,
589
- removeRoundness,
590
- inputContainerRef,
591
- removeBorder,
592
- wrapperClassName,
593
- focus,
594
- secondaryIconColor,
595
- fullWidth = true,
596
- width,
597
- wrapperRef,
598
- autocompletePadding = false
599
- } = _b, props = __objRest(_b, [
600
- "id",
601
- "testid",
602
- "before",
603
- "after",
604
- "rightAdornment",
605
- "type",
606
- "label",
607
- "error",
608
- "className",
609
- "align",
610
- "caption",
611
- "required",
612
- "selectOnFocus",
613
- "removeRoundness",
614
- "inputContainerRef",
615
- "removeBorder",
616
- "wrapperClassName",
617
- "focus",
618
- "secondaryIconColor",
619
- "fullWidth",
620
- "width",
621
- "wrapperRef",
622
- "autocompletePadding"
623
- ]);
624
- const attributes = {
625
- "data-error": error && !focus || null,
626
- "data-focus": focus || null
627
- };
628
- const inputRef = (0, import_react.useRef)(null);
629
- const inputId = id ? `${id}-input` : void 0;
630
- (0, import_react.useEffect)(() => {
631
- var _a2;
632
- const input = inputRef.current;
633
- const focusHandler = () => {
634
- input == null ? void 0 : input.select();
635
- };
636
- if (selectOnFocus) {
637
- (_a2 = inputRef.current) == null ? void 0 : _a2.addEventListener("focus", focusHandler);
638
- return () => {
639
- input == null ? void 0 : input.removeEventListener("focus", focusHandler);
640
- };
641
- }
642
- }, [selectOnFocus]);
643
- const inputBaseClass = (0, import_clsx6.default)(
644
- fullWidth ? "w-full" : "w-fit",
645
- "flex flex-row items-center",
646
- "bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
647
- componentGap,
648
- baseTransition,
649
- "outline-transparent outline-2 -outline-offset-2",
650
- !autocompletePadding && componentPaddingMinusBorder,
651
- autocompletePadding && componentPaddingMinusBorderDesktop,
652
- !removeRoundness && "rounded-base",
653
- !removeBorder && "border border-border-primary-normal",
654
- "relative"
655
- );
656
- const inputFocusClass = (0, import_clsx6.default)(
657
- "has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
658
- );
659
- const inputDisabledClass = (0, import_clsx6.default)(
660
- "has-disabled:bg-background-action-secondary-disabled"
661
- );
662
- const inputReadOnlyClass = (0, import_clsx6.default)(
663
- "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"
664
- );
665
- const inputInvalidClass = (0, import_clsx6.default)(
666
- "has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
667
- );
668
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
669
- "label",
670
- {
671
- id,
672
- "data-testid": testid,
673
- htmlFor: inputId,
674
- ref: inputContainerRef,
675
- className: (0, import_clsx6.default)(
676
- "w-full flex flex-col",
677
- "block",
678
- "text-text-primary-normal has-disabled:text-text-primary-disabled",
679
- componentGap
680
- ),
681
- style: __spreadValues({}, props.style),
682
- children: [
683
- label && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx6.default)("flex items-center", componentGap), children: [
684
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
685
- Label,
686
- {
687
- id: id ? `${id}-label` : void 0,
688
- color: error ? "text-primary-error" : void 0,
689
- className: (0, import_clsx6.default)(
690
- props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
691
- ),
692
- children: label
693
- }
694
- ),
695
- required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
696
- "span",
697
- {
698
- className: (0, import_clsx6.default)(typography.label, "text-text-critical-normal"),
699
- children: "*"
700
- }
701
- )
702
- ] }),
703
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
704
- "div",
705
- {
706
- className: (0, import_clsx6.default)(
707
- inputBaseClass,
708
- !props.disabled && inputInvalidClass,
709
- inputFocusClass,
710
- inputDisabledClass,
711
- inputReadOnlyClass,
712
- wrapperClassName
713
- ),
714
- ref: (el) => {
715
- if (wrapperRef) {
716
- wrapperRef.current = el;
717
- }
718
- },
719
- children: [
720
- before,
721
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
722
- "input",
723
- __spreadProps(__spreadValues(__spreadValues({
724
- ref: (el) => {
725
- inputRef.current = el;
726
- },
727
- type,
728
- required
729
- }, props), attributes), {
730
- id: inputId,
731
- "data-testid": testid ? `${testid}-input` : void 0,
732
- className: (0, import_clsx6.default)(
733
- "flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
734
- "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
735
- "placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
736
- align === "right" && "text-right",
737
- align === "center" && "text-center",
738
- componentPaddingXUsingComponentGap,
739
- typography.paragraph,
740
- className,
741
- props.readOnly && !props.disabled && "!px-0"
742
- ),
743
- style: __spreadProps(__spreadValues({}, props.style), { width })
744
- })
745
- ),
746
- secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after,
747
- rightAdornment
748
- ]
749
- }
750
- ),
751
- caption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
752
- "div",
753
- {
754
- id: id ? `${id}-caption` : void 0,
755
- "data-testid": testid ? `${testid}-caption` : void 0,
756
- children: caption
757
- }
758
- )
759
- ]
760
- }
761
- );
762
- };
763
- var Input = (_a) => {
764
- var _b = _a, {
765
- variant = "default",
766
- decimals,
767
- uom,
768
- currencyFormat = false,
769
- formatOnBlur = false,
770
- removeSearchIcon,
771
- value: propValue,
772
- onChange,
773
- onBlur,
774
- onClear,
775
- id,
776
- testid,
777
- rightAdornment
778
- } = _b, props = __objRest(_b, [
779
- "variant",
780
- "decimals",
781
- "uom",
782
- "currencyFormat",
783
- "formatOnBlur",
784
- "removeSearchIcon",
785
- "value",
786
- "onChange",
787
- "onBlur",
788
- "onClear",
789
- "id",
790
- "testid",
791
- "rightAdornment"
792
- ]);
793
- const [internalValue, setInternalValue] = (0, import_react.useState)("");
794
- const [displayValue, setDisplayValue] = (0, import_react.useState)("");
795
- const [isFocused, setIsFocused] = (0, import_react.useState)(false);
796
- (0, import_react.useEffect)(() => {
797
- var _a2;
798
- const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
799
- const shouldUseThousandsFormatting = variant === "currency" || variant === "uom" && currencyFormat;
800
- if (!stringValue) {
801
- setInternalValue("");
802
- setDisplayValue("");
803
- return;
804
- }
805
- if (!shouldUseThousandsFormatting) {
806
- setInternalValue(stringValue);
807
- setDisplayValue(stringValue);
808
- return;
809
- }
810
- const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
811
- if (formatOnBlur && isFocused) {
812
- setInternalValue(stringValue);
813
- setDisplayValue(stringValue);
814
- return;
815
- }
816
- setInternalValue(formatted);
817
- setDisplayValue(formatCurrencyDisplay(formatted));
818
- }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
819
- const getInputProps = () => {
820
- var _a2;
821
- const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
822
- id
823
- }), getDecimalPlaceholder(decimals)), {
824
- value: propValue
825
- });
826
- switch (variant) {
827
- case "search":
828
- return __spreadProps(__spreadValues({}, baseProps), {
829
- placeholder: (_a2 = props.placeholder) != null ? _a2 : "Search",
830
- className: "!mr-6",
831
- value: displayValue
832
- });
833
- case "finder":
834
- return baseProps;
835
- case "currency":
836
- return __spreadProps(__spreadValues({}, baseProps), {
837
- align: "right",
838
- type: "text",
839
- value: displayValue
840
- });
841
- case "percentage":
842
- case "uom":
843
- return __spreadProps(__spreadValues({}, baseProps), {
844
- type: currencyFormat ? "text" : "number",
845
- align: "right",
846
- value: currencyFormat ? displayValue : propValue
847
- });
848
- default:
849
- return baseProps;
850
- }
851
- };
852
- const getBeforeElement = () => {
853
- if (props.before) return props.before;
854
- switch (variant) {
855
- case "search":
856
- return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "search" }) }) : null;
857
- case "currency":
858
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "attach_money" }) });
859
- case "uom":
860
- return currencyFormat ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "attach_money" }) }) : null;
861
- default:
862
- return null;
863
- }
864
- };
865
- const getAfterElement = () => {
866
- if (props.after) return props.after;
867
- switch (variant) {
868
- case "search": {
869
- const hasValue = displayValue.length > 0;
870
- return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
871
- Icon,
872
- {
873
- id: id ? `${id}-clear-button` : void 0,
874
- testid: testid ? `${testid}-clear-button` : void 0,
875
- name: "close",
876
- onClick: handleSearchReset,
877
- className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
878
- }
879
- ) : null;
880
- }
881
- case "finder":
882
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "search" });
883
- case "uom":
884
- return uom ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Paragraph, { color: "text-secondary-normal", children: uom.toUpperCase() }) : null;
885
- case "percentage":
886
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "percent" }) });
887
- default:
888
- return null;
889
- }
890
- };
891
- const handleSearchReset = () => {
892
- setInternalValue("");
893
- setDisplayValue("");
894
- if (onChange) {
895
- const syntheticEvent = {
896
- target: { value: "" }
897
- };
898
- if (typeof onChange === "function") {
899
- onChange(syntheticEvent);
900
- }
901
- }
902
- onClear == null ? void 0 : onClear();
903
- };
904
- const handleChange = (e) => {
905
- const rawValue = e.target.value;
906
- const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
907
- if (variant === "currency") {
908
- const raw = rawValue.replace(/,/g, "");
909
- if (raw === "") {
910
- setInternalValue("");
911
- setDisplayValue("");
912
- if (onChange) {
913
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
914
- target: __spreadProps(__spreadValues({}, e.target), { value: "" })
915
- });
916
- onChange(syntheticEvent);
917
- }
918
- return;
919
- }
920
- const regex = /^\d*\.?\d*$/;
921
- if (!regex.test(raw)) return;
922
- const parts = raw.split(".");
923
- const currentDecimals = decimals != null ? decimals : 2;
924
- if (parts.length === 2 && parts[1].length > currentDecimals) return;
925
- const asNumber = Number(raw);
926
- if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
927
- const clamped = maxNumber;
928
- const formattedClamped = formatDecimalValue(
929
- clamped.toString(),
930
- currentDecimals
931
- );
932
- setInternalValue(formattedClamped);
933
- setDisplayValue(
934
- formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
935
- );
936
- if (onChange) {
937
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
938
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
939
- });
940
- onChange(syntheticEvent);
941
- }
942
- return;
943
- }
944
- setInternalValue(raw);
945
- setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
946
- if (!isNaN(asNumber) && onChange) {
947
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
948
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
949
- });
950
- onChange(syntheticEvent);
951
- }
952
- return;
953
- }
954
- if (variant === "uom" && currencyFormat) {
955
- const raw = rawValue.replace(/,/g, "");
956
- if (raw === "") {
957
- setInternalValue("");
958
- setDisplayValue("");
959
- if (onChange) {
960
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
961
- target: __spreadProps(__spreadValues({}, e.target), { value: "" })
962
- });
963
- onChange(syntheticEvent);
964
- }
965
- return;
966
- }
967
- const regex = /^\d*\.?\d*$/;
968
- if (!regex.test(raw)) return;
969
- const parts = raw.split(".");
970
- const currentDecimals = decimals != null ? decimals : 2;
971
- if (parts.length === 2 && parts[1].length > currentDecimals) return;
972
- const asNumber = Number(raw);
973
- if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
974
- const clamped = maxNumber;
975
- const formattedClamped = formatDecimalValue(
976
- clamped.toString(),
977
- currentDecimals
978
- );
979
- setInternalValue(formattedClamped);
980
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
981
- if (onChange) {
982
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
983
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
984
- });
985
- onChange(syntheticEvent);
986
- }
987
- return;
988
- }
989
- setInternalValue(raw);
990
- setDisplayValue(formatCurrencyDisplay(raw));
991
- if (!isNaN(asNumber) && onChange) {
992
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
993
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
994
- });
995
- onChange(syntheticEvent);
996
- }
997
- return;
998
- }
999
- if (variant === "uom" && e.target.type === "number") {
1000
- const numeric = Number(rawValue);
1001
- if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
1002
- const clamped = maxNumber;
1003
- const formattedClamped = formatDecimalValue(
1004
- clamped.toString(),
1005
- decimals != null ? decimals : 0
1006
- );
1007
- setInternalValue(formattedClamped);
1008
- setDisplayValue(formattedClamped);
1009
- if (typeof onChange === "function") {
1010
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1011
- target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1012
- });
1013
- onChange(syntheticEvent);
1014
- }
1015
- return;
1016
- }
1017
- setInternalValue(rawValue);
1018
- setDisplayValue(rawValue);
1019
- if (typeof onChange === "function") {
1020
- onChange(e);
1021
- }
1022
- return;
1023
- }
1024
- setInternalValue(rawValue);
1025
- setDisplayValue(rawValue);
1026
- if (typeof onChange === "function") {
1027
- onChange(e);
1028
- }
1029
- };
1030
- const handleBlur = (e) => {
1031
- setIsFocused(false);
1032
- if (!internalValue) {
1033
- onBlur == null ? void 0 : onBlur(e);
1034
- return;
1035
- }
1036
- if (variant === "currency") {
1037
- const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
1038
- setInternalValue(formatted);
1039
- setDisplayValue(formatCurrencyDisplay(formatted));
1040
- const asNumber = Number(formatted);
1041
- if (!isNaN(asNumber) && onChange) {
1042
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1043
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1044
- });
1045
- onChange(syntheticEvent);
1046
- }
1047
- } else if (variant === "uom") {
1048
- if (currencyFormat) {
1049
- const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
1050
- setInternalValue(formatted);
1051
- setDisplayValue(formatCurrencyDisplay(formatted));
1052
- const asNumber = Number(formatted);
1053
- if (!isNaN(asNumber) && onChange) {
1054
- const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1055
- target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
1056
- });
1057
- onChange(syntheticEvent);
1058
- }
1059
- } else {
1060
- const formattedValue = formatDecimalValue(e.target.value, decimals);
1061
- e.target.value = formattedValue;
1062
- }
1063
- }
1064
- onBlur == null ? void 0 : onBlur(e);
1065
- };
1066
- const handleFocus = (e) => {
1067
- var _a2;
1068
- setIsFocused(true);
1069
- (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
1070
- };
1071
- const inputProps = getInputProps();
1072
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1073
- InputBase,
1074
- __spreadProps(__spreadValues({}, inputProps), {
1075
- before: getBeforeElement(),
1076
- after: getAfterElement(),
1077
- onFocus: handleFocus,
1078
- onChange: handleChange,
1079
- onBlur: handleBlur,
1080
- testid,
1081
- rightAdornment
1082
- })
1083
- );
1084
- };
1085
- Input.displayName = "Input";
1086
- var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
1087
- var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
1088
- var Currency = (props) => {
1089
- var _a;
1090
- const handleCurrencyChange = (e) => {
1091
- var _a2;
1092
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
1093
- };
1094
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1095
- Input,
1096
- __spreadProps(__spreadValues({}, props), {
1097
- variant: "currency",
1098
- decimals: (_a = props.decimals) != null ? _a : 2,
1099
- onChange: handleCurrencyChange
1100
- })
1101
- );
1102
- };
1103
- var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
1104
- Finder.displayName = "Finder";
1105
- UOM.displayName = "UOM";
1106
- Currency.displayName = "Currency";
1107
- Percentage.displayName = "Percentage";
1108
-
1109
- // src/components/Stepper.tsx
1110
- var import_clsx8 = __toESM(require("clsx"), 1);
1111
-
1112
- // src/components/Tooltip.tsx
1113
- var import_clsx7 = __toESM(require("clsx"), 1);
1114
- var import_react7 = require("react");
1115
- var import_react_dom = require("react-dom");
1116
-
1117
- // src/hooks/useKeydown.ts
1118
- var import_react2 = require("react");
1119
-
1120
- // src/hooks/useInfiniteScroll.tsx
1121
- var import_react3 = require("react");
1122
-
1123
- // src/hooks/useMatchesMedia.ts
1124
- var import_react4 = require("react");
1125
- var useMatchesMedia = (query) => {
1126
- const [matches, setMatches] = (0, import_react4.useState)();
1127
- (0, import_react4.useLayoutEffect)(() => {
1128
- const mediaQueryList = window.matchMedia(query);
1129
- const listener = () => setMatches(mediaQueryList.matches);
1130
- listener();
1131
- mediaQueryList.addEventListener("change", listener);
1132
- return () => mediaQueryList.removeEventListener("change", listener);
1133
- }, [query]);
1134
- return matches;
1135
- };
1136
- var useMatchesMobile = () => useMatchesMedia("(width < 48rem)");
1137
-
1138
- // src/hooks/useTableLayout/useTableLayout.ts
1139
- var import_react5 = require("react");
1140
-
1141
- // src/utils/index.ts
1142
- var LocalStoragePrefixVersion = `dmsi-acc-v1.1.5`;
1143
-
1144
- // src/hooks/useTableLayout/storage.ts
1145
- var STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tablePrefs`;
1146
- var LEGACY_STORAGE_PREFIX = `${LocalStoragePrefixVersion}-tableLayout`;
1147
-
1148
- // src/hooks/useEditCell.tsx
1149
- var import_react6 = require("react");
1150
-
1151
- // src/components/Tooltip.tsx
1152
- var import_jsx_runtime7 = require("react/jsx-runtime");
1153
- var Tooltip = ({
1154
- id,
1155
- testid,
1156
- message,
1157
- position = "top",
1158
- children,
1159
- showOnTruncation = false,
1160
- offset = 8,
1161
- keepHidden = false
1162
- }) => {
1163
- const ref = (0, import_react7.useRef)(null);
1164
- const tooltipRef = (0, import_react7.useRef)(null);
1165
- const [tooltipPosition, setTooltipPosition] = (0, import_react7.useState)({ top: 0, left: 0 });
1166
- const [isVisible, setIsVisible] = (0, import_react7.useState)(false);
1167
- const [removeOpacity, setRemoveOpacity] = (0, import_react7.useState)(false);
1168
- const updatePosition = () => {
1169
- if (!ref.current || !tooltipRef.current) return;
1170
- const rect = ref.current.getBoundingClientRect();
1171
- const tooltipRect = tooltipRef.current.getBoundingClientRect();
1172
- let top = 0;
1173
- let left = 0;
1174
- switch (position) {
1175
- case "top":
1176
- top = rect.top - tooltipRect.height - offset;
1177
- left = rect.left + rect.width / 2 - tooltipRect.width / 2;
1178
- break;
1179
- case "bottom":
1180
- top = rect.bottom + offset;
1181
- left = rect.left + rect.width / 2 - tooltipRect.width / 2;
1182
- break;
1183
- case "left":
1184
- top = rect.top + rect.height / 2 - tooltipRect.height / 2;
1185
- left = rect.left - tooltipRect.width - offset;
1186
- break;
1187
- case "right":
1188
- top = rect.top + rect.height / 2 - tooltipRect.height / 2;
1189
- left = rect.right + offset;
1190
- break;
1191
- }
1192
- setTooltipPosition({ top, left });
1193
- requestAnimationFrame(() => {
1194
- setRemoveOpacity(true);
1195
- });
1196
- };
1197
- const handleMouseEnter = () => {
1198
- if (!showOnTruncation || checkForTextTruncation()) {
1199
- setIsVisible(true);
1200
- }
1201
- };
1202
- const handleMouseLeave = () => {
1203
- setIsVisible(false);
1204
- setRemoveOpacity(false);
1205
- };
1206
- (0, import_react7.useEffect)(() => {
1207
- if (isVisible && tooltipRef.current) {
1208
- requestAnimationFrame(() => {
1209
- updatePosition();
1210
- });
1211
- }
1212
- }, [isVisible]);
1213
- (0, import_react7.useEffect)(() => {
1214
- if (isVisible) {
1215
- window.addEventListener("resize", updatePosition);
1216
- return () => window.removeEventListener("resize", updatePosition);
1217
- }
1218
- }, [isVisible]);
1219
- const isMobile = useMatchesMobile();
1220
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1221
- "div",
1222
- {
1223
- id,
1224
- "data-testid": testid,
1225
- ref,
1226
- className: "relative inline-grid grid-cols-[auto_1fr] items-center cursor-pointer",
1227
- onMouseEnter: handleMouseEnter,
1228
- onMouseLeave: handleMouseLeave,
1229
- children: [
1230
- children,
1231
- !keepHidden && isVisible && !isMobile && typeof document !== "undefined" && (0, import_react_dom.createPortal)(
1232
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1233
- "div",
1234
- {
1235
- id: id ? `${id}-message` : void 0,
1236
- "data-testid": testid ? `${testid}-message` : void 0,
1237
- ref: tooltipRef,
1238
- style: {
1239
- position: "fixed",
1240
- top: `${tooltipPosition.top}px`,
1241
- left: `${tooltipPosition.left}px`,
1242
- zIndex: 9999
1243
- },
1244
- className: (0, import_clsx7.default)(
1245
- typography.caption,
1246
- "bg-neutral-500 text-neutral-100 rounded whitespace-nowrap shadow-2 pointer-events-none transition-opacity duration-100 ease-in-out",
1247
- componentPadding,
1248
- !removeOpacity && "opacity-0"
1249
- ),
1250
- children: message
1251
- }
1252
- ),
1253
- document.body
1254
- )
1255
- ]
1256
- }
1257
- );
1258
- function checkForTextTruncation() {
1259
- if (showOnTruncation && ref.current) {
1260
- const element = ref.current.querySelector("p, a");
1261
- if (element) {
1262
- const isTruncated = element.scrollWidth > element.clientWidth;
1263
- return isTruncated;
1264
- }
1265
- }
1266
- return false;
1267
- }
1268
- };
1269
- Tooltip.displayName = "Tooltip";
1270
-
1271
- // src/components/Stepper.tsx
1272
- var import_jsx_runtime8 = require("react/jsx-runtime");
1273
- var Stepper = (_a) => {
1274
- var _b = _a, {
1275
- error,
1276
- disabled,
1277
- hideButtons = false,
1278
- value,
1279
- setValue,
1280
- onDecrease,
1281
- onIncrease,
1282
- onBlur,
1283
- id,
1284
- testid,
1285
- min,
1286
- max,
1287
- step = 1,
1288
- allowDecimals = false
1289
- } = _b, props = __objRest(_b, [
1290
- "error",
1291
- "disabled",
1292
- "hideButtons",
1293
- "value",
1294
- "setValue",
1295
- "onDecrease",
1296
- "onIncrease",
1297
- "onBlur",
1298
- "id",
1299
- "testid",
1300
- "min",
1301
- "max",
1302
- "step",
1303
- "allowDecimals"
1304
- ]);
1305
- const maxInputCharacters = 15;
1306
- const userInputRef = (0, import_react8.useRef)(false);
1307
- const [displayValue, setDisplayValue] = (0, import_react8.useState)(String(value));
1308
- const inputCharacterWidth = Math.min(
1309
- Math.max(displayValue.length, 1),
1310
- maxInputCharacters
1311
- );
1312
- const buttonMin = Math.max(step, min != null ? min : step);
1313
- (0, import_react8.useEffect)(() => {
1314
- if (userInputRef.current) {
1315
- userInputRef.current = false;
1316
- return;
1317
- }
1318
- setDisplayValue(String(value));
1319
- }, [value]);
1320
- function handleIncrease() {
1321
- if (max != null && value >= max) {
1322
- return;
1323
- }
1324
- setValue(() => {
1325
- const prec = String(step).includes(".") ? String(step).split(".")[1].length : 0;
1326
- const next = Number(
1327
- Math.min(
1328
- Number((value + step).toFixed(prec + 6)),
1329
- max != null ? max : Infinity
1330
- ).toFixed(prec)
1331
- );
1332
- onIncrease == null ? void 0 : onIncrease(next);
1333
- return next;
1334
- });
1335
- }
1336
- function handleDecrease() {
1337
- if (min != null && value <= min) {
1338
- return;
1339
- }
1340
- setValue(() => {
1341
- const prec = String(step).includes(".") ? String(step).split(".")[1].length : 0;
1342
- const next = Number(
1343
- Math.max(
1344
- Number((value - step).toFixed(prec + 6)),
1345
- min != null ? min : -Infinity
1346
- ).toFixed(prec)
1347
- );
1348
- onDecrease == null ? void 0 : onDecrease(next);
1349
- return next;
1350
- });
1351
- }
1352
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1353
- "div",
1354
- {
1355
- id,
1356
- "data-testid": testid,
1357
- className: (0, import_clsx8.default)("flex items-center", componentGap),
1358
- children: [
1359
- !hideButtons && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1360
- Tooltip,
1361
- {
1362
- message: "Decrease Quantity",
1363
- testid: testid ? `${testid}-decrease-tooltip` : void 0,
1364
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1365
- Button,
1366
- {
1367
- id: id ? `${id}-decrease-button` : void 0,
1368
- testid: testid ? `${testid}-decrease-button` : void 0,
1369
- iconOnly: true,
1370
- variant: "tertiary",
1371
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1372
- "span",
1373
- {
1374
- className: (0, import_clsx8.default)(
1375
- !disabled || value > 0 && "text-icon-action-primary-normal",
1376
- disabled || value === 0 && "text-icon-action-primary-disabled",
1377
- "contents"
1378
- ),
1379
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "remove" })
1380
- }
1381
- ),
1382
- onClick: handleDecrease,
1383
- disabled: disabled || value <= buttonMin
1384
- }
1385
- )
1386
- }
1387
- ),
1388
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1389
- InputBase,
1390
- __spreadProps(__spreadValues({}, props), {
1391
- id: id ? `${id}-input` : void 0,
1392
- testid: testid ? `${testid}-input` : void 0,
1393
- type: "text",
1394
- inputMode: allowDecimals ? "decimal" : "numeric",
1395
- pattern: allowDecimals ? "[0-9]*\\.?[0-9]*" : "[0-9]*",
1396
- align: "center",
1397
- maxLength: maxInputCharacters,
1398
- size: inputCharacterWidth,
1399
- value: displayValue,
1400
- onChange: (e) => {
1401
- const rawValue = e.target.value;
1402
- if (rawValue === "") {
1403
- setDisplayValue("");
1404
- userInputRef.current = true;
1405
- setValue(0);
1406
- return;
1407
- }
1408
- if (allowDecimals) {
1409
- if (!/^\d*\.?\d*$/.test(rawValue)) {
1410
- return;
1411
- }
1412
- const cleanedValue2 = rawValue === "." ? "0." : rawValue.replace(/^0+(\d)/, "$1");
1413
- const nextValue2 = parseFloat(cleanedValue2) || 0;
1414
- const isIntermediate = rawValue.includes(".") && (rawValue.endsWith(".") || /0$/.test(rawValue));
1415
- setDisplayValue(
1416
- isIntermediate ? cleanedValue2 : String(nextValue2)
1417
- );
1418
- userInputRef.current = true;
1419
- setValue(nextValue2);
1420
- return;
1421
- }
1422
- if (!/^\d*$/.test(rawValue)) {
1423
- return;
1424
- }
1425
- const cleanedValue = rawValue.replace(/^0+/, "") || "0";
1426
- const nextValue = parseInt(cleanedValue, 10);
1427
- setDisplayValue(cleanedValue);
1428
- userInputRef.current = true;
1429
- setValue(nextValue);
1430
- },
1431
- onBlur: () => {
1432
- setDisplayValue(String(value));
1433
- userInputRef.current = false;
1434
- onBlur == null ? void 0 : onBlur();
1435
- },
1436
- error,
1437
- disabled,
1438
- className: "!w-auto !min-w-6 !max-w-[15ch] !h-4.5 !px-0 !overflow-x-auto disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
1439
- })
1440
- ) }),
1441
- !hideButtons && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1442
- Tooltip,
1443
- {
1444
- message: "Increase Quantity",
1445
- testid: testid ? `${testid}-increase-tooltip` : void 0,
1446
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1447
- Button,
1448
- {
1449
- id: id ? `${id}-increase-button` : void 0,
1450
- testid: testid ? `${testid}-increase-button` : void 0,
1451
- iconOnly: true,
1452
- variant: "tertiary",
1453
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1454
- "span",
1455
- {
1456
- className: (0, import_clsx8.default)(
1457
- !disabled && "text-icon-action-primary-normal",
1458
- disabled && "text-icon-action-primary-disabled",
1459
- "contents"
1460
- ),
1461
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "add" })
1462
- }
1463
- ),
1464
- onClick: handleIncrease,
1465
- disabled: disabled || max != null && value >= max
1466
- }
1467
- )
1468
- }
1469
- )
1470
- ]
1471
- }
1472
- );
1473
- };
1474
- Stepper.displayName = "Stepper";
1475
- // Annotate the CommonJS export names for ESM import in node:
1476
- 0 && (module.exports = {
1477
- Stepper
1478
- });