@dmsi/wedgekit-react 0.0.1277 → 1.0.1

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