@dmsi/wedgekit-react 2.0.0 → 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.
- package/dist/classNames.js +150 -0
- package/dist/components/AccessCard.js +63 -0
- package/dist/components/AccessCardGroup.js +73 -0
- package/dist/components/AccessChangerTabItem.js +51 -0
- package/dist/components/Accordion.js +99 -0
- package/dist/components/Alert.js +78 -0
- package/dist/components/Breadcrumbs.js +111 -0
- package/dist/components/Button.js +137 -0
- package/dist/components/CalendarRange.js +405 -0
- package/dist/components/Caption.js +99 -0
- package/dist/components/Card.js +50 -0
- package/dist/components/Checkbox.js +108 -0
- package/dist/components/CompactImagesPreview.js +120 -0
- package/dist/components/ContentTab.js +68 -0
- package/dist/components/ContentTabs.js +96 -0
- package/dist/components/DMSiLogo.js +54 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
- package/dist/components/DataGrid/PinnedColumns.js +165 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
- package/dist/components/DataGrid/SummaryRow/index.js +86 -0
- package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
- package/dist/components/DataGrid/TableBody/index.js +161 -0
- package/dist/components/DataGrid/index.js +696 -0
- package/dist/components/DataGrid/utils.js +20 -0
- package/dist/components/DataGridCell.js +412 -0
- package/dist/components/DataTable.js +700 -0
- package/dist/components/DateInput.js +193 -0
- package/dist/components/DateRangeInput.js +368 -0
- package/dist/components/DebugJson.js +28 -0
- package/dist/components/Display.js +46 -0
- package/dist/components/EditingContext.js +34 -0
- package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
- package/dist/components/EmblaCarousel/index.js +153 -0
- package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
- package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
- package/dist/components/EmptyCartIcon.js +25 -0
- package/dist/components/FilterGroup.js +198 -0
- package/dist/components/FullViewportBox.js +19 -0
- package/dist/components/Grid.js +54 -0
- package/dist/components/Heading.js +50 -0
- package/dist/components/HorizontalDivider.js +20 -0
- package/dist/components/Icon.js +73 -0
- package/dist/components/ImagePlaceholder.js +22 -0
- package/dist/components/Input.js +469 -0
- package/dist/components/InputGroup.js +45 -0
- package/dist/components/Label.js +37 -0
- package/dist/components/Link.js +69 -0
- package/dist/components/List.js +12 -0
- package/dist/components/ListGroup.js +54 -0
- package/dist/components/LiveChatComponent.js +25 -0
- package/dist/components/LoadingScrim.js +22 -0
- package/dist/components/LogoAgilityTopBar.js +90 -0
- package/dist/components/LogoDMSiTopBar.js +54 -0
- package/dist/components/LogoMillworkTopBar.js +196 -0
- package/dist/components/MainBar.js +58 -0
- package/dist/components/MaxViewportBox.js +19 -0
- package/dist/components/Menu.js +202 -0
- package/dist/components/MenuOption.js +161 -0
- package/dist/components/MobileDataGrid/ColumnList.js +85 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
- package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
- package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
- package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
- package/dist/components/MobileDataGrid/index.js +78 -0
- package/dist/components/MobileNavMenu.js +173 -0
- package/dist/components/Modal.js +201 -0
- package/dist/components/ModalButtons.js +57 -0
- package/dist/components/ModalContent.js +24 -0
- package/dist/components/ModalHeader.js +74 -0
- package/dist/components/ModalScrim.js +32 -0
- package/dist/components/NavigationTab.js +72 -0
- package/dist/components/NavigationTabs.js +45 -0
- package/dist/components/NestedMenu.js +119 -0
- package/dist/components/Notification.js +91 -0
- package/dist/components/OptionPill.js +103 -0
- package/dist/components/OrderCheckIcon.js +28 -0
- package/dist/components/PDFViewer/DownloadIcon.js +25 -0
- package/dist/components/PDFViewer/PDFElement.js +77 -0
- package/dist/components/PDFViewer/PDFNavigation.js +64 -0
- package/dist/components/PDFViewer/PDFPage.js +28 -0
- package/dist/components/PDFViewer/index.js +124 -0
- package/dist/components/Pagination.js +117 -0
- package/dist/components/Paragraph.js +43 -0
- package/dist/components/Password.js +47 -0
- package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
- package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
- package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
- package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
- package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
- package/dist/components/ProductImagePreview/index.js +189 -0
- package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
- package/dist/components/ProjectBar.js +54 -0
- package/dist/components/Radio.js +113 -0
- package/dist/components/Search.js +89 -0
- package/dist/components/SearchResultImage/index.js +26 -0
- package/dist/components/Select.js +122 -0
- package/dist/components/SideMenu.js +24 -0
- package/dist/components/SideMenuGroup.js +80 -0
- package/dist/components/SideMenuItem.js +79 -0
- package/dist/components/SimpleTable.js +60 -0
- package/dist/components/SkeletonParagraph.js +24 -0
- package/dist/components/Spinner.js +30 -0
- package/dist/components/Stack.js +174 -0
- package/dist/components/StatusPill.js +44 -0
- package/dist/components/Stepper.js +138 -0
- package/dist/components/Subheader.js +41 -0
- package/dist/components/Surface.js +30 -0
- package/dist/components/Swatch.js +1498 -0
- package/dist/components/Textarea.js +106 -0
- package/dist/components/Theme.js +25 -0
- package/dist/components/Time.js +225 -0
- package/dist/components/Toast.js +170 -0
- package/dist/components/Tooltip.js +102 -0
- package/dist/components/TopBar.js +119 -0
- package/dist/components/Upload.js +107 -0
- package/dist/components/WorldpayIframe.js +19 -0
- package/dist/hooks/useEditCell.js +23 -0
- package/dist/hooks/useInfiniteScroll.js +25 -0
- package/dist/hooks/useKeydown.js +20 -0
- package/dist/hooks/useMatchesMedia.js +15 -0
- package/dist/hooks/useMenuSystem.js +186 -0
- package/dist/hooks/useMounted.js +9 -0
- package/dist/hooks/useTableLayout/computeColumns.js +59 -0
- package/dist/hooks/useTableLayout/storage.js +64 -0
- package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
- package/dist/index.js +249 -53839
- package/dist/lib/loadFonts.js +11 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
- package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
- package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
- package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
- package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
- package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
- package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
- package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
- package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
- package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
- package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
- package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
- package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
- package/dist/static/no-results-image.png.js +4 -0
- package/dist/utils/date-patch-dashes.js +28 -0
- package/dist/utils/date.js +95 -0
- package/dist/utils/formatting.js +22 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/mergeObjectArrays.js +18 -0
- package/dist/utils.js +20 -0
- package/package.json +1 -1
- /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as a } from "../node_modules/clsx/dist/clsx.js";
|
|
4
|
+
import { baseTransition as j, componentGap as q } from "../classNames.js";
|
|
5
|
+
import { Icon as t } from "./Icon.js";
|
|
6
|
+
import { Paragraph as w } from "./Paragraph.js";
|
|
7
|
+
function I({
|
|
8
|
+
label: p,
|
|
9
|
+
error: o,
|
|
10
|
+
disabled: c,
|
|
11
|
+
readOnly: r,
|
|
12
|
+
checked: v,
|
|
13
|
+
onChange: l,
|
|
14
|
+
indeterminate: m,
|
|
15
|
+
paragraphClassName: b,
|
|
16
|
+
id: i,
|
|
17
|
+
testid: s,
|
|
18
|
+
...h
|
|
19
|
+
}) {
|
|
20
|
+
const n = m || v, u = a(
|
|
21
|
+
!n && !o && !c && !r && "border-border-primary-normal bg-background-action-secondary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active"
|
|
22
|
+
), g = a(
|
|
23
|
+
n && !o && !c && !r && "bg-background-action-primary-normal border-background-action-primary-normal peer-hover:bg-background-action-primary-hover peer-hover:border-background-action-primary-hover peer-active:bg-background-action-primary-active peer-active:border-background-action-primary-active"
|
|
24
|
+
), k = a(
|
|
25
|
+
o && !n && "bg-background-action-critical-secondary-normal border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active"
|
|
26
|
+
), x = a(
|
|
27
|
+
o && n && "bg-background-action-critical-primary-normal border-background-action-critical-primary-normal peer-hover:bg-background-action-critical-primary-hover peer-hover:border-background-action-critical-primary-hover peer-active:bg-background-action-critical-primary-active peer-active:border-background-action-critical-primary-active"
|
|
28
|
+
), y = a(
|
|
29
|
+
c && !r && "border-border-primary-normal bg-background-action-secondary-disabled peer-checked:bg-icon-on-action-primary-disabled peer-checked:border-icon-on-action-primary-disabled"
|
|
30
|
+
), N = a(
|
|
31
|
+
r && "border-transparent bg-transparent peer-checked:bg-transparent peer-checked:border-transparent"
|
|
32
|
+
), f = a(
|
|
33
|
+
n && !c && !r && "color-icon-on-action-primary-normal peer-hover:color-icon-on-action-primary-hover peer-active:color-icon-on-action-primary-active",
|
|
34
|
+
n && c && "color-background-action-primary-disabled"
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ d(
|
|
37
|
+
"label",
|
|
38
|
+
{
|
|
39
|
+
id: i,
|
|
40
|
+
"data-testid": s,
|
|
41
|
+
htmlFor: i ? `${i}-input` : void 0,
|
|
42
|
+
className: a(
|
|
43
|
+
"flex items-center",
|
|
44
|
+
q,
|
|
45
|
+
(c || r && o || r) && "cursor-default",
|
|
46
|
+
!(r && o) && !c && !r && "cursor-pointer"
|
|
47
|
+
),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
"input",
|
|
52
|
+
{
|
|
53
|
+
id: i ? `${i}-input` : void 0,
|
|
54
|
+
"data-testid": s ? `${s}-input` : void 0,
|
|
55
|
+
type: "checkbox",
|
|
56
|
+
className: "sr-only peer",
|
|
57
|
+
disabled: c,
|
|
58
|
+
checked: n,
|
|
59
|
+
onChange: C,
|
|
60
|
+
"data-indeterminate": m,
|
|
61
|
+
...h
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
o && (r || c) ? /* @__PURE__ */ e("div", { className: a("size-6", "flex items-center justify-center"), children: n ? m ? /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "question_mark" }) }) : r ? /* @__PURE__ */ e("span", { className: "text-success-400 contents", children: /* @__PURE__ */ e(t, { name: "check" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "check", className: "pointer-events-none" }) }) : r && /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "close" }) }) }) : /* @__PURE__ */ e(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: a(
|
|
68
|
+
"size-6 border rounded-base",
|
|
69
|
+
"flex items-center justify-center",
|
|
70
|
+
j,
|
|
71
|
+
u,
|
|
72
|
+
g,
|
|
73
|
+
k,
|
|
74
|
+
x,
|
|
75
|
+
y,
|
|
76
|
+
N,
|
|
77
|
+
f
|
|
78
|
+
),
|
|
79
|
+
children: n ? m ? r ? /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "question_mark" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "remove", className: "pointer-events-none" }) }) : r ? /* @__PURE__ */ e("span", { className: "text-success-400 contents", children: /* @__PURE__ */ e(t, { name: "check" }) }) : /* @__PURE__ */ e("span", { className: "text-icon-on-action-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "check", className: "pointer-events-none" }) }) : r && /* @__PURE__ */ e("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ e(t, { name: "close" }) })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }),
|
|
83
|
+
p && /* @__PURE__ */ e(
|
|
84
|
+
w,
|
|
85
|
+
{
|
|
86
|
+
id: i ? `${i}-label` : void 0,
|
|
87
|
+
testid: s ? `${s}-label` : void 0,
|
|
88
|
+
as: "span",
|
|
89
|
+
padded: !0,
|
|
90
|
+
className: a(
|
|
91
|
+
!b?.includes("text-wrap") && "text-nowrap",
|
|
92
|
+
c && !o && "!text-text-primary-disabled",
|
|
93
|
+
o && !c && !r && "!text-text-primary-error",
|
|
94
|
+
b
|
|
95
|
+
),
|
|
96
|
+
children: p
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
function C($) {
|
|
103
|
+
c || r || r && o || !l || l($);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
I as Checkbox
|
|
108
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx as a, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useMemo as x, useEffect as T, useCallback as y } from "react";
|
|
3
|
+
import { Stack as W } from "./Stack.js";
|
|
4
|
+
import { clsx as $ } from "../node_modules/clsx/dist/clsx.js";
|
|
5
|
+
import { useMatchesMobile as z } from "../hooks/useMatchesMedia.js";
|
|
6
|
+
function H(u, c) {
|
|
7
|
+
const t = u?.trim();
|
|
8
|
+
return !!t && t !== c && !t.endsWith("/placeholder.svg") && !t.includes("/placeholder.svg?");
|
|
9
|
+
}
|
|
10
|
+
function U(u) {
|
|
11
|
+
const {
|
|
12
|
+
sources: c,
|
|
13
|
+
currentSourceIndex: t = 0,
|
|
14
|
+
activeImageHeight: b = 243,
|
|
15
|
+
activeImageWidth: p = 242,
|
|
16
|
+
thumbnailWidth: w = 30.5,
|
|
17
|
+
thumbnailHeight: E = 30,
|
|
18
|
+
enableThumbnailBorder: I = !1,
|
|
19
|
+
placeholderImageUri: o,
|
|
20
|
+
placeholderAlt: m = "placeholder image",
|
|
21
|
+
onChangeSource: j,
|
|
22
|
+
onMainImageClick: d,
|
|
23
|
+
testid: n
|
|
24
|
+
} = u, v = z(), [C, S] = P([]), M = x(
|
|
25
|
+
() => c.map((e) => e.uri).join("|"),
|
|
26
|
+
[c]
|
|
27
|
+
), l = x(
|
|
28
|
+
() => c.filter(
|
|
29
|
+
(e) => H(e.uri, o) && C.indexOf(e.uri) === -1
|
|
30
|
+
),
|
|
31
|
+
[C, o, c]
|
|
32
|
+
), s = l.length, k = t >= 0 && t < s ? t : 0;
|
|
33
|
+
T(() => {
|
|
34
|
+
S([]);
|
|
35
|
+
}, [M]);
|
|
36
|
+
const h = y(
|
|
37
|
+
(e, r) => {
|
|
38
|
+
if (r && S(
|
|
39
|
+
(g) => g.indexOf(r) >= 0 ? g : [...g, r]
|
|
40
|
+
), !o) return;
|
|
41
|
+
const i = e.currentTarget;
|
|
42
|
+
i.src !== o && (i.src = o, i.alt || (i.alt = m));
|
|
43
|
+
},
|
|
44
|
+
[o, m]
|
|
45
|
+
), N = y(
|
|
46
|
+
(e) => {
|
|
47
|
+
e !== t && (e < 0 || e >= s || j(e));
|
|
48
|
+
},
|
|
49
|
+
[t, j, s]
|
|
50
|
+
);
|
|
51
|
+
if (!l.length || typeof v > "u")
|
|
52
|
+
return /* @__PURE__ */ a("div", { className: "flex flex-row justify-center w-full", children: /* @__PURE__ */ a(
|
|
53
|
+
"img",
|
|
54
|
+
{
|
|
55
|
+
"data-testid": n ? `${n}-placeholder` : void 0,
|
|
56
|
+
className: "object-center",
|
|
57
|
+
style: {
|
|
58
|
+
width: p,
|
|
59
|
+
height: b,
|
|
60
|
+
objectPosition: "center",
|
|
61
|
+
objectFit: "contain"
|
|
62
|
+
},
|
|
63
|
+
src: o,
|
|
64
|
+
alt: m,
|
|
65
|
+
onError: (e) => h(e),
|
|
66
|
+
onClick: d
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
const f = l[k];
|
|
70
|
+
return /* @__PURE__ */ F(W, { "data-testid": n, sizing: "layout", children: [
|
|
71
|
+
/* @__PURE__ */ a(
|
|
72
|
+
"img",
|
|
73
|
+
{
|
|
74
|
+
"data-testid": n ? `${n}-main-image` : void 0,
|
|
75
|
+
className: $("object-center", d && "cursor-pointer"),
|
|
76
|
+
style: {
|
|
77
|
+
width: v ? "100%" : p,
|
|
78
|
+
height: b,
|
|
79
|
+
objectPosition: "center",
|
|
80
|
+
objectFit: "contain"
|
|
81
|
+
},
|
|
82
|
+
src: f.uri,
|
|
83
|
+
alt: f.name,
|
|
84
|
+
onError: (e) => h(e, f.uri),
|
|
85
|
+
onClick: d
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
s > 1 && /* @__PURE__ */ a("div", { className: "flex flex-row flex-wrap items-center gap-3", children: l.slice(0, 4).map((e, r) => /* @__PURE__ */ a(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
"data-testid": n ? `${n}-thumbnail-${r}` : void 0,
|
|
92
|
+
onClick: (i) => {
|
|
93
|
+
i.preventDefault(), N(r);
|
|
94
|
+
},
|
|
95
|
+
className: $(
|
|
96
|
+
"cursor-pointer",
|
|
97
|
+
k === r && I ? "ring-2 ring-offset-2 ring-brand-400 transition-discrete duration-300" : "ring-brand-400/0"
|
|
98
|
+
),
|
|
99
|
+
children: /* @__PURE__ */ a(
|
|
100
|
+
"img",
|
|
101
|
+
{
|
|
102
|
+
src: e.uri,
|
|
103
|
+
alt: e.name,
|
|
104
|
+
style: {
|
|
105
|
+
width: w,
|
|
106
|
+
height: E,
|
|
107
|
+
objectPosition: "center",
|
|
108
|
+
objectFit: "cover"
|
|
109
|
+
},
|
|
110
|
+
onError: (i) => h(i, e.uri)
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
},
|
|
114
|
+
`compact-image-${e.uri}-${r}`
|
|
115
|
+
)) })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
U as CompactImagesPreview
|
|
120
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
|
|
4
|
+
import { useCallback as u } from "react";
|
|
5
|
+
import { Button as f } from "./Button.js";
|
|
6
|
+
function N({
|
|
7
|
+
label: m,
|
|
8
|
+
selected: a = !1,
|
|
9
|
+
className: l,
|
|
10
|
+
disabled: t = !1,
|
|
11
|
+
onClick: i,
|
|
12
|
+
ref: s,
|
|
13
|
+
fullWidth: n,
|
|
14
|
+
id: o,
|
|
15
|
+
testid: r,
|
|
16
|
+
...v
|
|
17
|
+
}) {
|
|
18
|
+
const p = u(
|
|
19
|
+
(b) => {
|
|
20
|
+
t || i?.(b);
|
|
21
|
+
},
|
|
22
|
+
[i, t]
|
|
23
|
+
), x = e(
|
|
24
|
+
"absolute left-0 right-0 bottom-0 transition-colors duration-200 ease-in-out z-10",
|
|
25
|
+
"rounded-px ",
|
|
26
|
+
"h-0.5",
|
|
27
|
+
!t && "bg-text-action-primary-normal peer-hover:bg-border-action-hover peer-active:bg-border-action-active",
|
|
28
|
+
t && "bg-text-action-primary-disabled",
|
|
29
|
+
l
|
|
30
|
+
);
|
|
31
|
+
return /* @__PURE__ */ d("div", { id: o, "data-testid": r, className: e(
|
|
32
|
+
"relative",
|
|
33
|
+
n && "flex-1"
|
|
34
|
+
), children: [
|
|
35
|
+
/* @__PURE__ */ c(
|
|
36
|
+
f,
|
|
37
|
+
{
|
|
38
|
+
id: o ? `${o}-button` : void 0,
|
|
39
|
+
testid: r ? `${r}-button` : void 0,
|
|
40
|
+
block: n,
|
|
41
|
+
ref: s,
|
|
42
|
+
variant: "tertiary",
|
|
43
|
+
disabled: t,
|
|
44
|
+
onClick: p,
|
|
45
|
+
role: "tab",
|
|
46
|
+
"aria-selected": a,
|
|
47
|
+
className: e(
|
|
48
|
+
"peer",
|
|
49
|
+
!a && "!text-text-secondary-normal hover:!text-text-action-primary-hover active:!text-text-action-primary-active"
|
|
50
|
+
),
|
|
51
|
+
...v,
|
|
52
|
+
children: m
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
a && /* @__PURE__ */ c(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
id: o ? `${o}-indicator` : void 0,
|
|
59
|
+
"data-testid": r ? `${r}-indicator` : void 0,
|
|
60
|
+
className: x,
|
|
61
|
+
children: " "
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
N as ContentTab
|
|
68
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as N, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as $ } from "../node_modules/clsx/dist/clsx.js";
|
|
4
|
+
import { useState as I, useRef as R, useCallback as w, useEffect as S } from "react";
|
|
5
|
+
import { ContentTab as j } from "./ContentTab.js";
|
|
6
|
+
const y = "after:absolute after:bottom-0 after:left-0 after:w-full after:h-0.5 after:bg-border-primary-normal z-0";
|
|
7
|
+
function g({
|
|
8
|
+
tabs: n,
|
|
9
|
+
onTabChange: a,
|
|
10
|
+
fullWidthTabs: h,
|
|
11
|
+
id: r,
|
|
12
|
+
testid: o,
|
|
13
|
+
selectedTab: f,
|
|
14
|
+
contentPadding: k = !0,
|
|
15
|
+
disabledWithColor: i
|
|
16
|
+
}) {
|
|
17
|
+
const [c, u] = I(n[0]?.id || ""), [s, m] = I(0), v = R([]), p = w(
|
|
18
|
+
(e, t, l) => {
|
|
19
|
+
i && !l || (u(e), m(t), a?.(e));
|
|
20
|
+
},
|
|
21
|
+
[i, a]
|
|
22
|
+
);
|
|
23
|
+
S(() => {
|
|
24
|
+
f && p(f.id, f.index, !0);
|
|
25
|
+
}, [f, p]);
|
|
26
|
+
const b = w(
|
|
27
|
+
(e) => {
|
|
28
|
+
if (i) return;
|
|
29
|
+
let t = s;
|
|
30
|
+
if (e.key === "ArrowRight")
|
|
31
|
+
e.preventDefault(), t = (s + 1) % n.length;
|
|
32
|
+
else if (e.key === "ArrowLeft")
|
|
33
|
+
e.preventDefault(), t = (s - 1 + n.length) % n.length;
|
|
34
|
+
else
|
|
35
|
+
return;
|
|
36
|
+
const l = n[t].id;
|
|
37
|
+
u(l), a?.(l), v.current[t]?.focus(), m(t);
|
|
38
|
+
},
|
|
39
|
+
[i, s, a, n]
|
|
40
|
+
), x = n.find((e) => e.id === c)?.content;
|
|
41
|
+
return /* @__PURE__ */ N("div", { id: r, "data-testid": o, children: [
|
|
42
|
+
/* @__PURE__ */ d("div", { className: $("overflow-x-auto", k && "pb-2"), children: /* @__PURE__ */ d(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
id: r ? `${r}-tablist` : void 0,
|
|
46
|
+
"data-testid": o ? `${o}-tablist` : void 0,
|
|
47
|
+
role: "tablist",
|
|
48
|
+
"aria-orientation": "horizontal",
|
|
49
|
+
className: $("flex relative", y),
|
|
50
|
+
onKeyDown: b,
|
|
51
|
+
children: n.map((e, t) => {
|
|
52
|
+
const l = c === e.id;
|
|
53
|
+
return /* @__PURE__ */ d(
|
|
54
|
+
j,
|
|
55
|
+
{
|
|
56
|
+
disabled: e.disabled,
|
|
57
|
+
fullWidth: h,
|
|
58
|
+
id: r ? `${r}-tab-${e.id}` : void 0,
|
|
59
|
+
testid: o ? `${o}-tab-${e.id}` : void 0,
|
|
60
|
+
label: e.label,
|
|
61
|
+
selected: l,
|
|
62
|
+
onClick: () => p(e.id, t),
|
|
63
|
+
onFocus: () => {
|
|
64
|
+
i || (u(e.id), m(t), a?.(e.id));
|
|
65
|
+
},
|
|
66
|
+
className: $(!l && y),
|
|
67
|
+
role: "tab",
|
|
68
|
+
"aria-selected": l,
|
|
69
|
+
"aria-controls": `${r ? `${r}-` : ""}panel-${e.id}`,
|
|
70
|
+
tabIndex: l ? 0 : -1,
|
|
71
|
+
ref: (D) => {
|
|
72
|
+
v.current[t] = D;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
e.id
|
|
76
|
+
);
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
80
|
+
x && /* @__PURE__ */ d(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
id: (r ? `${r}-` : "") + `panel-${c}`,
|
|
84
|
+
"data-testid": (o ? `${o}-` : "") + `panel-${c}`,
|
|
85
|
+
className: "mt-2",
|
|
86
|
+
role: "tabpanel",
|
|
87
|
+
"aria-labelledby": `tab-${c}`,
|
|
88
|
+
tabIndex: 0,
|
|
89
|
+
children: x
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
g as ContentTabs
|
|
96
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as l, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
function i(L) {
|
|
3
|
+
return /* @__PURE__ */ l(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
width: "107",
|
|
7
|
+
height: "24",
|
|
8
|
+
viewBox: "0 0 107 24",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
...L,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ C(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
d: "M10.1472 5.86855H22.261C24.0328 5.86855 25.2192 5.79792 26.2514 7.25517C27.1489 8.60833 27.4185 9.79792 27.2105 11.4336C27.0025 13.0693 26.5596 14.2291 25.4926 15.6529C24.9996 16.3295 24.3795 16.8648 23.6284 17.2552C22.6077 17.7533 21.9529 17.6827 20.9206 17.6827H8.69893V17.6381L8.00562 23.2589H20.7704C24.2755 23.2589 27.6496 22.5228 30.4807 19.9949C33.0999 17.6827 34.6444 14.8128 35.0489 11.612C35.4918 8.12506 34.6406 5.72357 32.2948 3.3035C29.8875 0.775615 26.8793 0.362976 23.2278 0.362976H10.8328L10.1472 5.92803V5.86855Z",
|
|
17
|
+
fill: "#1D1E1E"
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ C(
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "M45.7143 0.960477L45.3484 3.9233L45.437 3.64077C46.9276 1.46605 49.2772 0.618469 51.8771 0.618469C54.6042 0.618469 56.3567 1.62219 57.4082 3.91958C59.2263 1.53668 61.5527 0.618469 64.4531 0.618469C66.3135 0.618469 67.9544 1.16122 69.0868 2.45862C70.485 4.04598 70.2192 6.1352 69.9342 8.3917L68.0083 23.2356H60.5705L62.3462 9.28018C62.5234 7.901 62.5041 6.35453 60.5128 6.35453C58.0862 6.35453 57.6085 8.52925 57.389 10.2393L55.7366 23.2319H48.2025L49.9782 9.27646C50.1477 7.93817 49.9897 6.22442 48.1255 6.22442C46.0918 6.22442 45.4408 7.6891 45.2367 9.27646L43.461 23.2319H35.3453L38.2072 0.960477H45.7143Z",
|
|
24
|
+
fill: "#1D1E1E"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ C(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
d: "M97.4234 0.336578L96.6954 6.39234H103.474L96.2755 9.54104L94.5076 23.2734H103.255L106.175 0.336578H97.4234Z",
|
|
31
|
+
fill: "#1D1E1E"
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ C(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
d: "M91.03 10.4126C89.3545 9.34573 86.6082 9.04833 84.6092 8.79182C83.9158 8.70632 83.1339 8.49814 82.4059 8.29368C82.1286 8.23792 81.8705 8.16729 81.6317 8.07807C81.5431 8.05204 81.443 8.02231 81.3583 8C81.1618 7.95539 80.9461 7.81041 80.7535 7.61338C80.353 7.30855 80.1141 6.94424 80.1141 6.54647C80.1141 6.35688 80.1835 6.17844 80.2836 6.00372C80.2952 5.98513 80.3029 5.97026 80.3144 5.95167C80.7921 5.20446 82.1248 4.66543 83.7117 4.66543C85.626 4.66543 87.1821 5.44981 87.29 6.43866H94.7393C93.7571 2.34572 89.0772 0 84.8326 0C82.3135 0 79.1204 0.342007 76.7439 1.66171C74.4598 2.94052 72.8228 4.66914 72.5069 7.14126C71.7674 12.9405 77.1945 14.026 81.8436 14.6654C82.1017 14.6952 82.6062 14.8141 83.157 15.0037C84.5976 15.2974 85.6183 16.026 85.6183 16.8848C85.6183 17.8773 84.2509 18.6989 82.4522 18.8699C82.2442 18.9145 82.0593 18.9368 81.9168 18.9368C80.7689 18.9368 79.987 18.8625 79.4131 18.487C78.689 18.197 78.1613 17.777 77.9726 17.29H70.165C71.205 22.3234 75.8387 24 80.534 24C85.6145 24 92.6747 22.2491 93.4412 16.2342C93.6801 14.3494 93.0099 11.7286 91.0378 10.4089L91.03 10.4126Z",
|
|
38
|
+
fill: "#1D1E1E"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ C(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: "M1.85771 9.54941H16.9027L0.825439 16.9174L1.85771 9.54941Z",
|
|
45
|
+
fill: "#0077C8"
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
i as DMSiLogo
|
|
54
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s } from "react";
|
|
3
|
+
import { Checkbox as a } from "../../Checkbox.js";
|
|
4
|
+
import { MenuOption as d } from "../../MenuOption.js";
|
|
5
|
+
function p({
|
|
6
|
+
id: o,
|
|
7
|
+
testid: t,
|
|
8
|
+
column: e,
|
|
9
|
+
toggleColumnVisibility: c
|
|
10
|
+
}) {
|
|
11
|
+
const [r, l] = s(e.getIsVisible()), h = typeof e.columnDef.header == "string" ? e.columnDef.header : null;
|
|
12
|
+
return /* @__PURE__ */ n(d, { id: o, testid: t, defaultChecked: r, children: /* @__PURE__ */ n(
|
|
13
|
+
a,
|
|
14
|
+
{
|
|
15
|
+
id: o ? `${o}-checkbox` : void 0,
|
|
16
|
+
testid: t ? `${t}-checkbox` : void 0,
|
|
17
|
+
label: h ?? "Unknown",
|
|
18
|
+
checked: r,
|
|
19
|
+
onChange: (i) => {
|
|
20
|
+
l(i.target.checked), c(e.id, i.target.checked);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
p as ColumnSelectorMenuOption
|
|
27
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useState as s } from "react";
|
|
3
|
+
import { Button as a } from "../../Button.js";
|
|
4
|
+
import { DataGridCell as d } from "../../DataGridCell.js";
|
|
5
|
+
import { Icon as v } from "../../Icon.js";
|
|
6
|
+
import { Menu as $ } from "../../Menu.js";
|
|
7
|
+
import { ColumnSelectorMenuOption as h } from "./ColumnSelectorMenuOption.js";
|
|
8
|
+
function w({
|
|
9
|
+
id: o,
|
|
10
|
+
testid: t,
|
|
11
|
+
table: m,
|
|
12
|
+
toggleColumnVisibility: u,
|
|
13
|
+
resetColumnVisibility: f
|
|
14
|
+
}) {
|
|
15
|
+
const r = c(null), [p, i] = s(!1);
|
|
16
|
+
return /* @__PURE__ */ l(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
id: o,
|
|
20
|
+
testid: t,
|
|
21
|
+
width: "48px",
|
|
22
|
+
type: "header",
|
|
23
|
+
color: "text-secondary-normal",
|
|
24
|
+
ref: r,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ n(
|
|
27
|
+
a,
|
|
28
|
+
{
|
|
29
|
+
id: o ? `${o}-button` : void 0,
|
|
30
|
+
testid: t ? `${t}-button` : void 0,
|
|
31
|
+
onClick: () => i((e) => !e),
|
|
32
|
+
variant: "navigation",
|
|
33
|
+
iconOnly: !0,
|
|
34
|
+
leftIcon: /* @__PURE__ */ n(v, { name: "tune" })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ l(
|
|
38
|
+
$,
|
|
39
|
+
{
|
|
40
|
+
id: o ? `${o}-menu` : void 0,
|
|
41
|
+
testid: t ? `${t}-menu` : void 0,
|
|
42
|
+
positionTo: r,
|
|
43
|
+
position: "bottom-right",
|
|
44
|
+
show: p,
|
|
45
|
+
setShow: i,
|
|
46
|
+
calculateMinMaxHeight: !0,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ n(
|
|
49
|
+
a,
|
|
50
|
+
{
|
|
51
|
+
id: o ? `${o}-reset-button` : void 0,
|
|
52
|
+
testid: t ? `${t}-reset-button` : void 0,
|
|
53
|
+
variant: "tertiary",
|
|
54
|
+
onClick: () => {
|
|
55
|
+
f(), i(!1);
|
|
56
|
+
},
|
|
57
|
+
children: "Reset to default"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
m.getAllColumns().filter((e) => e.columnDef.meta?.inVisibilityMenu).map((e) => /* @__PURE__ */ n(
|
|
61
|
+
h,
|
|
62
|
+
{
|
|
63
|
+
id: o ? `${o}-option-${e.id}` : void 0,
|
|
64
|
+
testid: t ? `${t}-option-${e.id}` : void 0,
|
|
65
|
+
column: e,
|
|
66
|
+
toggleColumnVisibility: u
|
|
67
|
+
},
|
|
68
|
+
e.id
|
|
69
|
+
))
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
w as ColumnSelectorHeaderCell
|
|
79
|
+
};
|