@dmsi/wedgekit-react 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
3
+ import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useState as h } from "react";
5
+ import { NavigationTab as p } from "./NavigationTab.js";
6
+ import { componentGap as x } from "../classNames.js";
7
+ function g({
8
+ id: d,
9
+ testid: t,
10
+ tabs: i,
11
+ onTabChange: l,
12
+ colorPrimitives: c = "dmsi"
13
+ }) {
14
+ const [n, s] = h(i[0]?.id ?? ""), a = (e) => {
15
+ s(e), l?.(e);
16
+ }, r = i.find((e) => e.id === n)?.content, m = i.find((e) => e.id === n)?.href;
17
+ return /* @__PURE__ */ f("div", { id: d, "data-testid": t, children: [
18
+ /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
19
+ "div",
20
+ {
21
+ className: v(
22
+ "flex items-center relative overflow-x-auto overflow-y-hidden",
23
+ x
24
+ ),
25
+ children: i.map((e) => /* @__PURE__ */ o(
26
+ p,
27
+ {
28
+ id: d ? `${d}-tab-${e.id}` : void 0,
29
+ testid: t ? `${t}-tab-${e.id}` : void 0,
30
+ label: e.label,
31
+ selected: n === e.id,
32
+ onClick: () => a(e.id),
33
+ colorPrimitives: c,
34
+ href: e.href
35
+ },
36
+ e.id
37
+ ))
38
+ }
39
+ ) }),
40
+ r && !m && /* @__PURE__ */ o("div", { className: "mt-2", children: r })
41
+ ] });
42
+ }
43
+ export {
44
+ g as NavigationTabs
45
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"NestedMenu.d.ts","sourceRoot":"","sources":["../../src/components/NestedMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,CACX,KAAK,EAAE,eAAe,GAAG,IAAI,EAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,KACpC,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CA6IhD"}
1
+ {"version":3,"file":"NestedMenu.d.ts","sourceRoot":"","sources":["../../src/components/NestedMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,CACX,KAAK,EAAE,eAAe,GAAG,IAAI,EAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,KACpC,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAwKhD"}
@@ -0,0 +1,119 @@
1
+ "use client";
2
+ import { jsxs as x, jsx as o } from "react/jsx-runtime";
3
+ import C, { useMemo as g, useState as _, useEffect as y } from "react";
4
+ import { Icon as E } from "./Icon.js";
5
+ import { MenuOption as d } from "./MenuOption.js";
6
+ import { useKeydown as w } from "../hooks/useKeydown.js";
7
+ function O(m) {
8
+ const { onMenuClick: h, currentMenu: n, testid: t, pinnedEntry: i, disabled: r = !1 } = m, s = g(() => {
9
+ const e = [];
10
+ return n.removeBackOption || e.push("back"), i && e.push("pinned"), (n.subEntries || []).forEach((l, v) => {
11
+ l.children == null && e.push(v);
12
+ }), e;
13
+ }, [n, i]), b = s.findIndex((e) => typeof e == "number"), c = b >= 0 ? b : 0, [f, a] = _(c);
14
+ y(() => {
15
+ a(c);
16
+ }, [n.id, c]);
17
+ const p = (e) => f >= 0 && s[f] === e;
18
+ function k() {
19
+ i && (i.onClick ? i.onClick() : i.url && h(
20
+ { id: "__pinned__", label: i.label, url: i.url },
21
+ "url"
22
+ ));
23
+ }
24
+ w(
25
+ {
26
+ Escape: () => {
27
+ r || (a(c), u(null, !0));
28
+ },
29
+ ArrowUp: () => {
30
+ r || s.length === 0 || a(
31
+ (e) => e <= 0 ? s.length - 1 : e - 1
32
+ );
33
+ },
34
+ ArrowDown: () => {
35
+ r || s.length === 0 || a(
36
+ (e) => e >= s.length - 1 ? 0 : e + 1
37
+ );
38
+ },
39
+ // "Space" is replaced with " " to handle spacebar.
40
+ "Enter/Space": () => {
41
+ if (r) return;
42
+ const e = s[f];
43
+ if (e === "back") {
44
+ u(n.previousMenu ?? null, !0), n.previousMenu?.previousMenu || a(c);
45
+ return;
46
+ }
47
+ if (e === "pinned") {
48
+ k();
49
+ return;
50
+ }
51
+ const l = (n.subEntries || [])[e];
52
+ l && M(l);
53
+ },
54
+ Backspace: () => {
55
+ r || (u(n.previousMenu ?? null, !0), n.previousMenu?.previousMenu || a(c));
56
+ }
57
+ },
58
+ !0
59
+ );
60
+ function u(e, l = !1, v) {
61
+ h(
62
+ e && { ...e, ...!l && { previousMenu: n } },
63
+ v
64
+ );
65
+ }
66
+ function M(e) {
67
+ e.subEntries?.length ? u(e, !1, "subEntry") : e.onClick ? u(e, !1, "onClick") : u(e);
68
+ }
69
+ return /* @__PURE__ */ x("div", { className: "flex flex-col w-full", children: [
70
+ !n.removeBackOption && /* @__PURE__ */ o(
71
+ d,
72
+ {
73
+ testid: t ? `${t}-back` : void 0,
74
+ variant: "action",
75
+ disabled: r,
76
+ before: /* @__PURE__ */ o(E, { name: "chevron_left", className: "icon", size: 24 }),
77
+ onClick: () => u(n.previousMenu ?? null, !0),
78
+ selected: p("back"),
79
+ children: n.previousMenu ? n.previousMenu.label : "Main Menu"
80
+ }
81
+ ),
82
+ n.title && /* @__PURE__ */ o(
83
+ d,
84
+ {
85
+ variant: "action",
86
+ disabled: r,
87
+ testid: t ? `${t}-title` : void 0,
88
+ children: n.title
89
+ }
90
+ ),
91
+ i && /* @__PURE__ */ o(
92
+ d,
93
+ {
94
+ testid: t ? `${t}-pinned-entry` : void 0,
95
+ variant: "action",
96
+ disabled: r,
97
+ selected: p("pinned"),
98
+ onClick: k,
99
+ children: i.label
100
+ }
101
+ ),
102
+ (n.subEntries || []).map((e, l) => e.children == null ? /* @__PURE__ */ o(
103
+ d,
104
+ {
105
+ testid: t ? `${t}-${e.label}` : void 0,
106
+ variant: "normal",
107
+ disabled: r || e.disabled,
108
+ onClick: () => M(e),
109
+ after: e.subEntries?.length ? /* @__PURE__ */ o(E, { name: "chevron_right", className: "icon", size: 24 }) : void 0,
110
+ selected: p(l),
111
+ children: e.label
112
+ },
113
+ e.id
114
+ ) : /* @__PURE__ */ o(C.Fragment, { children: e.children }, e.id))
115
+ ] });
116
+ }
117
+ export {
118
+ O as NestedMenu
119
+ };
@@ -0,0 +1,91 @@
1
+ "use client";
2
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
3
+ import { clsx as w } from "../node_modules/clsx/dist/clsx.js";
4
+ import { useState as z } from "react";
5
+ import { Button as v } from "./Button.js";
6
+ import { Paragraph as s } from "./Paragraph.js";
7
+ import { Heading3 as j } from "./Heading.js";
8
+ import { Icon as o } from "./Icon.js";
9
+ import { Stack as m } from "./Stack.js";
10
+ const p = {
11
+ success: {
12
+ className: "border-success-400",
13
+ icon: /* @__PURE__ */ e("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ e(o, { name: "check_circle", size: 24 }) })
14
+ },
15
+ warning: {
16
+ className: "border-warning-400",
17
+ icon: /* @__PURE__ */ e("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ e(o, { name: "warning", size: 24 }) })
18
+ },
19
+ error: {
20
+ className: "border-critical-400",
21
+ icon: /* @__PURE__ */ e("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ e(o, { name: "error", size: 24 }) })
22
+ },
23
+ info: {
24
+ className: "border-action-400",
25
+ icon: /* @__PURE__ */ e("span", { className: "text-icon-on-action-secondary-normal contents", children: /* @__PURE__ */ e(o, { name: "info", size: 24 }) })
26
+ }
27
+ };
28
+ function O({
29
+ id: t,
30
+ testid: a,
31
+ variant: d = "success",
32
+ title: i,
33
+ message: c,
34
+ enableMessage: u = !0,
35
+ description: r,
36
+ enableDescription: f = !1,
37
+ disclaimer: l,
38
+ enableDisclaimer: h = !1,
39
+ card: g = !1,
40
+ ...b
41
+ }) {
42
+ const [y, N] = z(!0), { className: x, icon: k } = p[d] ?? p.success;
43
+ return y ? /* @__PURE__ */ n(
44
+ "div",
45
+ {
46
+ id: t,
47
+ "data-testid": a,
48
+ className: w(
49
+ "flex gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap justify-between items-center border-2 rounded-sm w-full p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding bg-white max-w-240",
50
+ x,
51
+ g && "shadow-4"
52
+ ),
53
+ ...b,
54
+ children: [
55
+ /* @__PURE__ */ n(
56
+ m,
57
+ {
58
+ horizontal: !0,
59
+ horizontalMobile: !0,
60
+ items: "start",
61
+ justify: "start",
62
+ sizing: "layout",
63
+ children: [
64
+ k,
65
+ /* @__PURE__ */ n(m, { elevation: 0, items: "start", justify: "start", sizing: "component", children: [
66
+ i && /* @__PURE__ */ e(j, { as: "h3", children: i }),
67
+ c && u && /* @__PURE__ */ e(s, { as: "p", children: c }),
68
+ r && f && /* @__PURE__ */ e(s, { as: "p", children: r }),
69
+ l && h && /* @__PURE__ */ e(s, { as: "p", children: l })
70
+ ] })
71
+ ]
72
+ }
73
+ ),
74
+ /* @__PURE__ */ e(
75
+ v,
76
+ {
77
+ id: t ? `${t}-close-button` : void 0,
78
+ testid: a ? `${a}-close-button` : void 0,
79
+ iconOnly: !0,
80
+ variant: "tertiary",
81
+ onClick: () => N(!1),
82
+ leftIcon: /* @__PURE__ */ e(o, { name: "close", size: 24 })
83
+ }
84
+ )
85
+ ]
86
+ }
87
+ ) : null;
88
+ }
89
+ export {
90
+ O as Notification
91
+ };
@@ -8,7 +8,8 @@ type OptionPillProps = {
8
8
  removable?: boolean;
9
9
  disabled?: boolean;
10
10
  active?: boolean;
11
+ nowrap?: boolean;
11
12
  };
12
- export declare function OptionPill({ id, testid, selected, onClick, onRemove, removable, active, disabled, children, className, ...props }: ComponentProps<"div"> & OptionPillProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function OptionPill({ id, testid, selected, onClick, onRemove, removable, active, disabled, nowrap, children, className, ...props }: ComponentProps<"div"> & OptionPillProps): import("react/jsx-runtime").JSX.Element;
13
14
  export {};
14
15
  //# sourceMappingURL=OptionPill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OptionPill.d.ts","sourceRoot":"","sources":["../../src/components/OptionPill.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAYvC,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,MAAM,EACN,QAAgB,EAChB,OAAO,EACP,QAAQ,EACR,SAAiB,EACjB,MAAc,EACd,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,eAAe,2CAoGzC"}
1
+ {"version":3,"file":"OptionPill.d.ts","sourceRoot":"","sources":["../../src/components/OptionPill.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAYvC,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,MAAM,EACN,QAAgB,EAChB,OAAO,EACP,QAAQ,EACR,SAAiB,EACjB,MAAc,EACd,QAAgB,EAChB,MAAc,EACd,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,eAAe,2CAqGzC"}
@@ -0,0 +1,103 @@
1
+ import { jsxs as h, jsx as d } from "react/jsx-runtime";
2
+ import { clsx as n } from "../node_modules/clsx/dist/clsx.js";
3
+ import { componentPadding as y, componentPaddingYUsingComponentGap as k, componentPaddingMinusBorder as w, componentGap as C, baseTransition as N } from "../classNames.js";
4
+ import { Button as O } from "./Button.js";
5
+ import { Label as P } from "./Label.js";
6
+ import { Icon as $ } from "./Icon.js";
7
+ function L({
8
+ id: e,
9
+ testid: o,
10
+ selected: a = !1,
11
+ onClick: l,
12
+ onRemove: i,
13
+ removable: r = !1,
14
+ active: c = !1,
15
+ disabled: t = !1,
16
+ nowrap: s = !1,
17
+ children: p,
18
+ className: m,
19
+ ...b
20
+ }) {
21
+ const u = {
22
+ "data-disabled": t || null,
23
+ "data-selected": a || null,
24
+ "data-active": c || null
25
+ }, f = n(
26
+ {
27
+ // Base interactive (only when not disabled)
28
+ "hover:border-border-action-hover active:border-border-action-active": !t,
29
+ // Disabled base
30
+ "data-disabled:cursor-default data-disabled:border-border-primary-normal": t,
31
+ // Active (Figma: filled blue background, white text)
32
+ "data-active:bg-background-action-primary-normal data-active:text-white data-active:border-transparent": c && !a,
33
+ // Selected (filled style) overrides background & border, but keeps outline interaction chain.
34
+ "data-selected:border-transparent data-selected:bg-background-action-secondary-hover data-selected:outline-border-action-normal data-selected:hover:outline-border-action-hover data-selected:active:outline-border-action-active": a,
35
+ // Disabled + Selected combination
36
+ "data-selected:data-disabled:bg-background-action-secondary-disabled data-selected:data-disabled:border-border-action-disabled data-selected:data-disabled:outline-transparent": t && a
37
+ },
38
+ !r && y,
39
+ r && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding"
40
+ ), v = n(
41
+ !t && "text-text-primary-normal",
42
+ t && !a && "text-text-primary-disabled",
43
+ t && a && "text-text-on-action-primary-disabled"
44
+ );
45
+ return /* @__PURE__ */ h(
46
+ "div",
47
+ {
48
+ id: e,
49
+ "data-testid": o,
50
+ onClick: x,
51
+ ...b,
52
+ ...u,
53
+ className: n(
54
+ "flex items-center justify-between cursor-pointer w-fit",
55
+ s && "shrink-0 whitespace-nowrap",
56
+ "border border-border-primary-normal rounded-base",
57
+ "outline-2 outline-transparent -outline-offset-2",
58
+ C,
59
+ N,
60
+ f,
61
+ m,
62
+ v
63
+ ),
64
+ children: [
65
+ /* @__PURE__ */ d(
66
+ P,
67
+ {
68
+ id: e ? `${e}-label` : void 0,
69
+ testid: o ? `${o}-label` : void 0,
70
+ padded: !0,
71
+ className: k,
72
+ children: p
73
+ }
74
+ ),
75
+ r && /* @__PURE__ */ d(
76
+ O,
77
+ {
78
+ id: e ? `${e}-remove-button` : void 0,
79
+ testid: o ? `${o}-remove-button` : void 0,
80
+ onClick: g,
81
+ disabled: t,
82
+ className: n(
83
+ "mx-0 h-full w-10 !border-0",
84
+ w
85
+ ),
86
+ iconOnly: !0,
87
+ variant: "tertiary",
88
+ leftIcon: /* @__PURE__ */ d($, { name: "close", size: 16 })
89
+ }
90
+ )
91
+ ]
92
+ }
93
+ );
94
+ function x() {
95
+ t || l?.();
96
+ }
97
+ function g() {
98
+ !r || !i || i();
99
+ }
100
+ }
101
+ export {
102
+ L as OptionPill
103
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ function r({
3
+ testid: t,
4
+ ...e
5
+ }) {
6
+ return /* @__PURE__ */ C(
7
+ "svg",
8
+ {
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ viewBox: "0 0 37 36",
11
+ fill: "none",
12
+ width: 37,
13
+ height: 36,
14
+ "data-testid": t,
15
+ ...e,
16
+ children: /* @__PURE__ */ C(
17
+ "path",
18
+ {
19
+ d: "M18.457 3.00024C19.6493 3.01827 20.8644 3.13827 22.0283 3.41724C22.8321 3.61234 23.3287 4.42237 23.1337 5.22778C22.9402 6.03178 22.1252 6.5272 21.3242 6.33521C20.3928 6.11026 19.4046 6.01526 18.4658 6.00024C15.2603 6.00924 12.2492 7.26586 9.99018 9.53833C7.72976 11.8108 6.49103 14.829 6.49995 18.0344C6.50895 21.2399 7.7656 24.2495 10.038 26.51C12.303 28.7615 15.3065 30.0002 18.4999 30.0002H18.5341C21.7396 29.9912 24.7507 28.7346 27.0097 26.4622C29.2701 24.1882 30.5089 21.1714 30.4999 17.9661C30.4984 17.1382 31.1673 16.4629 31.9951 16.4612H31.9999C32.8263 16.4612 33.4982 17.13 33.4999 17.9563C33.5119 21.9627 31.9625 25.7354 29.1367 28.5764C26.3123 31.4173 22.5503 32.9881 18.5439 33.0002H18.4999C14.5086 33.0002 10.7542 31.4523 7.92378 28.637C5.08288 25.8126 3.51206 22.0505 3.49995 18.0442C3.48795 14.0363 5.03742 10.265 7.86323 7.42407C10.6877 4.58307 14.4505 3.01224 18.457 3.00024ZM27.872 9.51196C28.418 8.89248 29.3642 8.82637 29.9882 9.37231C30.6107 9.91681 30.6739 10.8645 30.1279 11.4885L19.6279 23.4885C19.3549 23.8004 18.9652 23.9852 18.5498 24.0002H18.4999C18.1025 24.0002 17.7214 23.8428 17.4394 23.5608L12.9394 19.0608C12.3529 18.4743 12.353 17.5262 12.9394 16.9397C13.5259 16.3532 14.474 16.3532 15.0605 16.9397L18.4267 20.3059L27.872 9.51196Z",
20
+ fill: "#1D1E1E"
21
+ }
22
+ )
23
+ }
24
+ );
25
+ }
26
+ export {
27
+ r as OrderCheckIcon
28
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Button as m } from "../Button.js";
3
+ import { Icon as e } from "../Icon.js";
4
+ import { Tooltip as a } from "../Tooltip.js";
5
+ function f({
6
+ onClick: t,
7
+ isDownloading: n,
8
+ testid: r,
9
+ colorClassName: i
10
+ }) {
11
+ return /* @__PURE__ */ o(a, { message: "Download", position: "bottom", children: /* @__PURE__ */ o(
12
+ m,
13
+ {
14
+ testid: r,
15
+ iconOnly: !0,
16
+ variant: "tertiary",
17
+ colorClassName: i,
18
+ leftIcon: /* @__PURE__ */ o(e, { name: n ? "cached" : "download" }),
19
+ onClick: t
20
+ }
21
+ ) });
22
+ }
23
+ export {
24
+ f as DownloadIcon
25
+ };
@@ -0,0 +1,77 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { usePdf as p } from "../../node_modules/@mikecousins/react-pdf/dist/index.js";
3
+ import { useRef as c } from "react";
4
+ import { Spinner as s } from "../Spinner.js";
5
+ import { Stack as f } from "../Stack.js";
6
+ import { PdfPage as u } from "./PDFPage.js";
7
+ import { clsx as m } from "../../node_modules/clsx/dist/clsx.js";
8
+ function w({
9
+ b64: n,
10
+ testid: r,
11
+ isMobile: a,
12
+ error: o
13
+ }) {
14
+ const i = c(null), { pdfDocument: d } = p({
15
+ file: `data:application/pdf;base64,${n}`,
16
+ workerSrc: "/scripts/pdf.worker.min.mjs",
17
+ scale: a ? 1 : 1.3,
18
+ canvasRef: i
19
+ }), l = new Array(d?.numPages ?? 1).fill(null);
20
+ return /* @__PURE__ */ e(
21
+ "div",
22
+ {
23
+ className: "flex flex-col space-y-4",
24
+ style: a ? void 0 : {
25
+ minHeight: 871,
26
+ minWidth: 654
27
+ },
28
+ children: d && n && !o ? /* @__PURE__ */ e(f, { sizing: "layout-group", children: l.length > 1 ? l.map((g, t) => /* @__PURE__ */ e(
29
+ "div",
30
+ {
31
+ className: m(
32
+ "flex justify-center border-border-primary-normal",
33
+ a ? "border-0" : "border"
34
+ ),
35
+ children: /* @__PURE__ */ e(
36
+ u,
37
+ {
38
+ testid: r ? `${r}-pdf_page_${t + 1}` : void 0,
39
+ file: `data:application/pdf;base64,${n}`,
40
+ pageNumber: t + 1
41
+ }
42
+ )
43
+ },
44
+ `${r}-pdf-page-${t + 1}`
45
+ )) : /* @__PURE__ */ e(
46
+ "div",
47
+ {
48
+ className: m(
49
+ "flex justify-center border-border-primary-normal",
50
+ a ? "border-0" : "border"
51
+ ),
52
+ children: /* @__PURE__ */ e(
53
+ "canvas",
54
+ {
55
+ "data-testid": r ? `${r}-pdf-content` : void 0,
56
+ ref: i,
57
+ style: { width: "100%", height: "auto" }
58
+ }
59
+ )
60
+ }
61
+ ) }) : /* @__PURE__ */ e(
62
+ f,
63
+ {
64
+ justify: "center",
65
+ items: "center",
66
+ height: "full",
67
+ flexGrow: 1,
68
+ "data-testid": r ? `${r}-pdf-${o ? "error" : "loading"}` : void 0,
69
+ children: o || /* @__PURE__ */ e(s, { size: "large" })
70
+ }
71
+ )
72
+ }
73
+ );
74
+ }
75
+ export {
76
+ w as PDFElement
77
+ };
@@ -0,0 +1,64 @@
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { Button as o } from "../Button.js";
3
+ import { Heading3 as h } from "../Heading.js";
4
+ import { Icon as a } from "../Icon.js";
5
+ import { Paragraph as u } from "../Paragraph.js";
6
+ import { Stack as c } from "../Stack.js";
7
+ function k({
8
+ currentIndex: d,
9
+ total: l,
10
+ onPrev: m,
11
+ onNext: p,
12
+ disablePrev: f,
13
+ disableNext: s,
14
+ extraActions: e,
15
+ testid: i,
16
+ fileName: t
17
+ }) {
18
+ return /* @__PURE__ */ r("div", { className: "w-full", children: /* @__PURE__ */ n(
19
+ c,
20
+ {
21
+ horizontal: !0,
22
+ items: "center",
23
+ justify: "between",
24
+ sizing: "layout-group",
25
+ testid: i ? `${i}-pdf-navigation` : void 0,
26
+ children: [
27
+ /* @__PURE__ */ n(c, { horizontal: !0, items: "center", children: [
28
+ /* @__PURE__ */ r(
29
+ o,
30
+ {
31
+ iconOnly: !0,
32
+ variant: "tertiary",
33
+ onClick: m,
34
+ leftIcon: /* @__PURE__ */ r(a, { name: "chevron_backward" }),
35
+ disabled: f,
36
+ testid: i ? `${i}-pdf-file-previous-button` : void 0
37
+ }
38
+ ),
39
+ /* @__PURE__ */ n(h, { className: "text-text-primary-normal whitespace-nowrap", children: [
40
+ d + 1,
41
+ " / ",
42
+ l
43
+ ] }),
44
+ /* @__PURE__ */ r(
45
+ o,
46
+ {
47
+ iconOnly: !0,
48
+ variant: "tertiary",
49
+ onClick: p,
50
+ rightIcon: /* @__PURE__ */ r(a, { name: "chevron_forward" }),
51
+ disabled: s,
52
+ testid: i ? `${i}-pdf-file-next-button` : void 0
53
+ }
54
+ ),
55
+ /* @__PURE__ */ r(u, { children: t?.endsWith(".pdf") ? t : `${t}.pdf` })
56
+ ] }),
57
+ e && /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: e })
58
+ ]
59
+ }
60
+ ) });
61
+ }
62
+ export {
63
+ k as PdfNavigation
64
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { usePdf as a } from "../../node_modules/@mikecousins/react-pdf/dist/index.js";
3
+ import { useRef as i } from "react";
4
+ function p({
5
+ file: t,
6
+ pageNumber: e,
7
+ testid: o,
8
+ isMobile: s
9
+ }) {
10
+ const r = i(null), { pdfDocument: f } = a({
11
+ file: t,
12
+ page: e,
13
+ canvasRef: r,
14
+ workerSrc: "/scripts/pdf.worker.min.mjs",
15
+ scale: s ? 1 : 1.3
16
+ });
17
+ return f ? /* @__PURE__ */ n(
18
+ "canvas",
19
+ {
20
+ ref: r,
21
+ "data-testid": o,
22
+ style: { width: "100%", height: "auto" }
23
+ }
24
+ ) : null;
25
+ }
26
+ export {
27
+ p as PdfPage
28
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PDFViewer/index.tsx"],"names":[],"mappings":"AAWA,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,kDAgK9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PDFViewer/index.tsx"],"names":[],"mappings":"AAWA,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,kDA+J9C"}