@dmsi/wedgekit-react 0.0.25 → 0.0.27
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/{chunk-KDEPZ6I7.js → chunk-2S2Z3L56.js} +5 -1
- package/dist/{chunk-TU55CHXU.js → chunk-4JLU7TAC.js} +3 -1
- package/dist/{chunk-Z2LOGSGE.js → chunk-4N2PED4P.js} +15 -3
- package/dist/{chunk-U42SKNR6.js → chunk-57WRM337.js} +68 -30
- package/dist/{chunk-ZFGGZXB6.js → chunk-AY7ELVQY.js} +5 -2
- package/dist/{chunk-I2UVVKQI.js → chunk-CHTO7PW4.js} +3 -2
- package/dist/{chunk-WIDBAFBU.js → chunk-FWPJ73IK.js} +3 -1
- package/dist/{chunk-5TLFMKSR.js → chunk-INYI65WW.js} +15 -5
- package/dist/{chunk-TJ44JJCB.js → chunk-J6LETUNM.js} +5 -2
- package/dist/{chunk-T6HZARR7.js → chunk-MZJS2ZAU.js} +6 -3
- package/dist/{chunk-ZCBSLV7U.js → chunk-O4M2GISS.js} +5 -2
- package/dist/{chunk-OUTEIXV4.js → chunk-OUSNH76S.js} +11 -3
- package/dist/{chunk-YDREJNAS.js → chunk-PDDZ5PMY.js} +18 -4
- package/dist/{chunk-4RD5ZF2V.js → chunk-QBIEU25R.js} +10 -4
- package/dist/chunk-QUPHLL7D.js +61 -0
- package/dist/{chunk-OISE6NMA.js → chunk-QV2EFOYF.js} +17 -6
- package/dist/{chunk-YZQNTOIF.js → chunk-QZGUMB7T.js} +10 -5
- package/dist/{chunk-S7R37IUP.js → chunk-S5K22XTH.js} +5 -2
- package/dist/{chunk-GCPJH5R6.js → chunk-S5KPS4IQ.js} +22 -7
- package/dist/{chunk-VELXLFMJ.js → chunk-SAMX4YGM.js} +4 -1
- package/dist/{chunk-TWP6YSFO.js → chunk-SKHSGGO3.js} +14 -6
- package/dist/chunk-TVDFTRGL.js +57 -0
- package/dist/{chunk-N32PXOA5.js → chunk-UT7XCBZF.js} +9 -4
- package/dist/{chunk-L4UM372R.js → chunk-VC3R5EUH.js} +3 -0
- package/dist/{chunk-UIQ733QP.js → chunk-VG4EPHJA.js} +7 -3
- package/dist/components/Breadcrumbs.cjs +29 -9
- package/dist/components/Breadcrumbs.js +29 -9
- package/dist/components/Button.cjs +6 -3
- package/dist/components/Button.js +1 -1
- package/dist/components/CalendarRange.cjs +11 -3
- package/dist/components/CalendarRange.js +1 -1
- package/dist/components/Caption.cjs +53 -9
- package/dist/components/Caption.js +53 -9
- package/dist/components/Checkbox.cjs +15 -6
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/ContentTab.cjs +20 -7
- package/dist/components/ContentTab.js +2 -2
- package/dist/components/ContentTabs.cjs +32 -18
- package/dist/components/ContentTabs.js +14 -13
- package/dist/components/DMSiLogo.cjs +22 -4
- package/dist/components/DMSiLogo.js +9 -5
- package/dist/components/DataGrid.cjs +374 -243
- package/dist/components/DataGrid.js +283 -226
- package/dist/components/DataGridCell.cjs +79 -21
- package/dist/components/DataGridCell.js +7 -7
- package/dist/components/DataTable.cjs +197 -139
- package/dist/components/DataTable.js +197 -139
- package/dist/components/DateInput.cjs +36 -10
- package/dist/components/DateInput.js +7 -3
- package/dist/components/DateRangeInput.cjs +36 -10
- package/dist/components/DateRangeInput.js +7 -3
- package/dist/components/DebugJson.cjs +21 -13
- package/dist/components/DebugJson.js +21 -13
- package/dist/components/Display.cjs +5 -2
- package/dist/components/Display.js +1 -1
- package/dist/components/EditingContext.cjs +4 -1
- package/dist/components/EditingContext.js +4 -1
- package/dist/components/FilterGroup.cjs +102 -32
- package/dist/components/FilterGroup.js +41 -17
- package/dist/components/FullViewportBox.cjs +10 -2
- package/dist/components/FullViewportBox.js +10 -2
- package/dist/components/Grid.cjs +3 -1
- package/dist/components/Grid.js +3 -1
- package/dist/components/Heading.cjs +5 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/HorizontalDivider.cjs +2 -2
- package/dist/components/HorizontalDivider.js +2 -2
- package/dist/components/Input.cjs +21 -7
- package/dist/components/Input.js +2 -2
- package/dist/components/InputGroup.cjs +13 -6
- package/dist/components/InputGroup.js +9 -5
- package/dist/components/Label.cjs +5 -2
- package/dist/components/Label.js +1 -1
- package/dist/components/List.cjs +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/LogoAgilityTopBar.cjs +22 -4
- package/dist/components/LogoAgilityTopBar.js +9 -5
- package/dist/components/LogoDMSiTopBar.cjs +22 -4
- package/dist/components/LogoDMSiTopBar.js +1 -1
- package/dist/components/LogoMillworkTopBar.cjs +22 -4
- package/dist/components/LogoMillworkTopBar.js +9 -5
- package/dist/components/MainBar.cjs +2 -0
- package/dist/components/MainBar.js +2 -0
- package/dist/components/Menu.cjs +3 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/MenuOption.cjs +28 -7
- package/dist/components/MenuOption.js +3 -3
- package/dist/components/MobileDataGrid.cjs +101 -46
- package/dist/components/MobileDataGrid.js +23 -11
- package/dist/components/Modal.cjs +96 -51
- package/dist/components/Modal.js +19 -7
- package/dist/components/ModalButtons.cjs +43 -26
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalContent.cjs +3 -1
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.cjs +40 -25
- package/dist/components/ModalHeader.js +3 -3
- package/dist/components/ModalScrim.cjs +3 -1
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/NavigationTab.cjs +9 -3
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.cjs +15 -7
- package/dist/components/NavigationTabs.js +8 -6
- package/dist/components/NestedMenu.cjs +28 -7
- package/dist/components/NestedMenu.js +3 -3
- package/dist/components/Notification.cjs +84 -38
- package/dist/components/Notification.js +8 -4
- package/dist/components/OptionPill.cjs +24 -6
- package/dist/components/OptionPill.js +3 -3
- package/dist/components/Paragraph.cjs +7 -3
- package/dist/components/Paragraph.js +1 -1
- package/dist/components/Password.cjs +33 -11
- package/dist/components/Password.js +14 -6
- package/dist/components/ProjectBar.cjs +3 -1
- package/dist/components/ProjectBar.js +3 -1
- package/dist/components/Radio.cjs +13 -7
- package/dist/components/Radio.js +7 -5
- package/dist/components/Search.cjs +34 -12
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.cjs +25 -7
- package/dist/components/Select.js +3 -3
- package/dist/components/SideMenu.cjs +6 -1
- package/dist/components/SideMenu.js +6 -1
- package/dist/components/SideMenuGroup.cjs +96 -49
- package/dist/components/SideMenuGroup.js +31 -19
- package/dist/components/SideMenuItem.cjs +99 -43
- package/dist/components/SideMenuItem.js +32 -12
- package/dist/components/Stack.cjs +91 -30
- package/dist/components/Stack.js +1 -1
- package/dist/components/StatusPill.cjs +13 -6
- package/dist/components/StatusPill.js +9 -5
- package/dist/components/Stepper.cjs +35 -17
- package/dist/components/Stepper.js +11 -10
- package/dist/components/Subheader.cjs +5 -2
- package/dist/components/Subheader.js +1 -1
- package/dist/components/Surface.cjs +5 -2
- package/dist/components/Surface.js +5 -2
- package/dist/components/Swatch.cjs +1544 -1308
- package/dist/components/Swatch.js +1469 -1275
- package/dist/components/Textarea.cjs +5 -2
- package/dist/components/Textarea.js +5 -2
- package/dist/components/Theme.cjs +3 -2
- package/dist/components/Theme.js +1 -1
- package/dist/components/Time.cjs +98 -40
- package/dist/components/Time.js +18 -6
- package/dist/components/Toast.cjs +38 -15
- package/dist/components/Toast.js +23 -10
- package/dist/components/Tooltip.cjs +5 -4
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/TopBar.cjs +16 -8
- package/dist/components/TopBar.js +12 -5
- package/package.json +1 -1
- package/src/components/Breadcrumbs.tsx +24 -15
- package/src/components/Button.tsx +7 -3
- package/src/components/CalendarRange.tsx +9 -0
- package/src/components/Caption.tsx +36 -6
- package/src/components/Checkbox.tsx +7 -2
- package/src/components/ContentTab.tsx +13 -3
- package/src/components/ContentTabs.tsx +11 -8
- package/src/components/DMSiLogo.tsx +2 -1
- package/src/components/DataGrid.tsx +85 -23
- package/src/components/DataGridCell.tsx +15 -2
- package/src/components/DataTable.tsx +64 -14
- package/src/components/DateInput.tsx +5 -1
- package/src/components/DateRangeInput.tsx +5 -1
- package/src/components/DebugJson.tsx +7 -3
- package/src/components/Display.tsx +3 -0
- package/src/components/EditingContext.tsx +8 -6
- package/src/components/FilterGroup.tsx +23 -3
- package/src/components/FullViewportBox.tsx +6 -1
- package/src/components/Grid.tsx +3 -0
- package/src/components/Heading.tsx +3 -0
- package/src/components/HorizontalDivider.tsx +4 -2
- package/src/components/Input.tsx +19 -10
- package/src/components/InputGroup.tsx +8 -4
- package/src/components/Label.tsx +3 -0
- package/src/components/Link.tsx +1 -0
- package/src/components/List.tsx +7 -1
- package/src/components/LogoAgilityTopBar.tsx +2 -1
- package/src/components/LogoDMSiTopBar.tsx +2 -1
- package/src/components/LogoMillworkTopBar.tsx +2 -1
- package/src/components/MainBar.tsx +3 -0
- package/src/components/Menu.tsx +3 -0
- package/src/components/MenuOption.tsx +72 -58
- package/src/components/MobileDataGrid.tsx +15 -4
- package/src/components/Modal.tsx +10 -1
- package/src/components/ModalButtons.tsx +12 -1
- package/src/components/ModalContent.tsx +3 -0
- package/src/components/ModalHeader.tsx +16 -6
- package/src/components/ModalScrim.tsx +3 -0
- package/src/components/NavigationTab.tsx +6 -3
- package/src/components/NavigationTabs.tsx +5 -2
- package/src/components/Notification.tsx +4 -0
- package/src/components/OptionPill.tsx +9 -1
- package/src/components/Paragraph.tsx +3 -0
- package/src/components/Password.tsx +9 -3
- package/src/components/ProjectBar.tsx +3 -0
- package/src/components/Radio.tsx +3 -2
- package/src/components/Search.tsx +56 -41
- package/src/components/Select.tsx +6 -1
- package/src/components/SideMenu.tsx +7 -1
- package/src/components/SideMenuGroup.tsx +13 -2
- package/src/components/SideMenuItem.tsx +15 -2
- package/src/components/Stack.tsx +8 -3
- package/src/components/StatusPill.tsx +4 -2
- package/src/components/Stepper.tsx +5 -5
- package/src/components/Subheader.tsx +3 -0
- package/src/components/Surface.tsx +3 -0
- package/src/components/Swatch.tsx +415 -140
- package/src/components/Textarea.tsx +6 -3
- package/src/components/Theme.tsx +3 -1
- package/src/components/Time.tsx +21 -5
- package/src/components/Toast.tsx +29 -14
- package/src/components/Tooltip.tsx +46 -32
- package/src/components/TopBar.tsx +7 -3
- package/dist/chunk-DBYSGYST.js +0 -47
- package/dist/chunk-UK3WG7HQ.js +0 -48
|
@@ -12,25 +12,35 @@ import "../chunk-ORMEWXMH.js";
|
|
|
12
12
|
import React, { useLayoutEffect, useState } from "react";
|
|
13
13
|
import clsx from "clsx";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
var Breadcrumb = ({
|
|
15
|
+
var Breadcrumb = ({
|
|
16
|
+
href,
|
|
17
|
+
children,
|
|
18
|
+
onClick,
|
|
19
|
+
id
|
|
20
|
+
}) => {
|
|
16
21
|
const linkPadding = clsx(
|
|
17
22
|
"!text-text-link-normal whitespace-nowrap",
|
|
18
23
|
"py-[calc(var(--spacing-mobile-component-padding)_+_3px)]",
|
|
19
24
|
"desktop:py-[calc(var(--spacing-desktop-component-padding)_+_3px)]",
|
|
20
25
|
"compact:py-[calc(var(--spacing-desktop-compact-component-padding)_+_3px)]"
|
|
21
26
|
);
|
|
22
|
-
return /* @__PURE__ */ jsx("li", { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
27
|
+
return /* @__PURE__ */ jsx("li", { id, className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
28
|
+
Link,
|
|
29
|
+
{
|
|
30
|
+
id: id ? `${id}-link` : void 0,
|
|
31
|
+
className: linkPadding,
|
|
32
|
+
href,
|
|
33
|
+
onClick,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
) }, href);
|
|
23
37
|
};
|
|
24
|
-
var Chevron = () => /* @__PURE__ */ jsx("li", { className: "flex items-center", children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right", size: 16 }) });
|
|
25
|
-
var Breadcrumbs = ({
|
|
26
|
-
asCardStyle,
|
|
27
|
-
crumbs
|
|
28
|
-
}) => {
|
|
38
|
+
var Chevron = () => /* @__PURE__ */ jsx("li", { className: "flex items-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right", size: 16 }) });
|
|
39
|
+
var Breadcrumbs = ({ asCardStyle, id, crumbs }) => {
|
|
29
40
|
const scrollableElement = React.useRef(null);
|
|
30
41
|
const [isOverflow, setIsOverflow] = useState(false);
|
|
31
42
|
useLayoutEffect(() => {
|
|
32
43
|
var _a, _b, _c;
|
|
33
|
-
console.log(scrollableElement.current);
|
|
34
44
|
(_c = scrollableElement.current) == null ? void 0 : _c.scrollTo({
|
|
35
45
|
left: (_b = (_a = scrollableElement.current) == null ? void 0 : _a.scrollWidth) != null ? _b : 0,
|
|
36
46
|
behavior: "instant"
|
|
@@ -46,6 +56,7 @@ var Breadcrumbs = ({
|
|
|
46
56
|
return /* @__PURE__ */ jsxs(
|
|
47
57
|
"nav",
|
|
48
58
|
{
|
|
59
|
+
id,
|
|
49
60
|
className: clsx(
|
|
50
61
|
"relative select-none flex items-center max-w-full w-full",
|
|
51
62
|
{
|
|
@@ -67,6 +78,7 @@ var Breadcrumbs = ({
|
|
|
67
78
|
/* @__PURE__ */ jsx(
|
|
68
79
|
"ol",
|
|
69
80
|
{
|
|
81
|
+
id: id ? `${id}-list` : void 0,
|
|
70
82
|
className: "flex items-center overflow-x-scroll",
|
|
71
83
|
style: { scrollbarWidth: "none" },
|
|
72
84
|
onScroll: updateOverflow,
|
|
@@ -77,7 +89,15 @@ var Breadcrumbs = ({
|
|
|
77
89
|
const { href, children, onClick } = crumb;
|
|
78
90
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
79
91
|
index > 0 && /* @__PURE__ */ jsx(Chevron, {}),
|
|
80
|
-
/* @__PURE__ */ jsx(
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
Breadcrumb,
|
|
94
|
+
{
|
|
95
|
+
href,
|
|
96
|
+
onClick,
|
|
97
|
+
id: id ? `${id}-crumb-${index}` : void 0,
|
|
98
|
+
children
|
|
99
|
+
}
|
|
100
|
+
)
|
|
81
101
|
] }, index);
|
|
82
102
|
})
|
|
83
103
|
}
|
|
@@ -205,7 +205,8 @@ var Button = (_a) => {
|
|
|
205
205
|
children,
|
|
206
206
|
iconOnly = false,
|
|
207
207
|
colorClassName,
|
|
208
|
-
href
|
|
208
|
+
href,
|
|
209
|
+
id
|
|
209
210
|
} = _b, props = __objRest(_b, [
|
|
210
211
|
"variant",
|
|
211
212
|
"as",
|
|
@@ -218,7 +219,8 @@ var Button = (_a) => {
|
|
|
218
219
|
"children",
|
|
219
220
|
"iconOnly",
|
|
220
221
|
"colorClassName",
|
|
221
|
-
"href"
|
|
222
|
+
"href",
|
|
223
|
+
"id"
|
|
222
224
|
]);
|
|
223
225
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx2.default)(
|
|
224
226
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -308,6 +310,7 @@ var Button = (_a) => {
|
|
|
308
310
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
309
311
|
Element,
|
|
310
312
|
__spreadProps(__spreadValues({
|
|
313
|
+
id,
|
|
311
314
|
type: Element === "button" ? "button" : void 0,
|
|
312
315
|
className: buttonClasses
|
|
313
316
|
}, props), {
|
|
@@ -315,7 +318,7 @@ var Button = (_a) => {
|
|
|
315
318
|
href,
|
|
316
319
|
children: [
|
|
317
320
|
leftIcon && leftIcon,
|
|
318
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: labelClasses, children }),
|
|
321
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
319
322
|
rightIcon && rightIcon
|
|
320
323
|
]
|
|
321
324
|
})
|
|
@@ -245,7 +245,8 @@ function DateCell(_a) {
|
|
|
245
245
|
onMouseEnter,
|
|
246
246
|
onMouseLeave,
|
|
247
247
|
cellPadding = "",
|
|
248
|
-
isRangeDisabled = false
|
|
248
|
+
isRangeDisabled = false,
|
|
249
|
+
id
|
|
249
250
|
} = _b, props = __objRest(_b, [
|
|
250
251
|
"date",
|
|
251
252
|
"isInMonth",
|
|
@@ -259,11 +260,13 @@ function DateCell(_a) {
|
|
|
259
260
|
"onMouseEnter",
|
|
260
261
|
"onMouseLeave",
|
|
261
262
|
"cellPadding",
|
|
262
|
-
"isRangeDisabled"
|
|
263
|
+
"isRangeDisabled",
|
|
264
|
+
"id"
|
|
263
265
|
]);
|
|
264
266
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
265
267
|
"span",
|
|
266
268
|
__spreadProps(__spreadValues({}, props), {
|
|
269
|
+
id,
|
|
267
270
|
className: (0, import_clsx3.default)(
|
|
268
271
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
269
272
|
typography.caption,
|
|
@@ -309,7 +312,8 @@ function CalendarRange({
|
|
|
309
312
|
isDateAvailable,
|
|
310
313
|
mode = "double",
|
|
311
314
|
cardStyle = false,
|
|
312
|
-
disableRange = false
|
|
315
|
+
disableRange = false,
|
|
316
|
+
id
|
|
313
317
|
}) {
|
|
314
318
|
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
315
319
|
const parseDate = (d) => {
|
|
@@ -378,6 +382,7 @@ function CalendarRange({
|
|
|
378
382
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
379
383
|
"div",
|
|
380
384
|
{
|
|
385
|
+
id,
|
|
381
386
|
className: (0, import_clsx3.default)(
|
|
382
387
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
383
388
|
layoutPaddding,
|
|
@@ -417,6 +422,7 @@ function CalendarRange({
|
|
|
417
422
|
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
418
423
|
"button",
|
|
419
424
|
{
|
|
425
|
+
id: id ? `${id}-prev-month-button` : void 0,
|
|
420
426
|
type: "button",
|
|
421
427
|
className: (0, import_clsx3.default)(
|
|
422
428
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -434,6 +440,7 @@ function CalendarRange({
|
|
|
434
440
|
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
435
441
|
"button",
|
|
436
442
|
{
|
|
443
|
+
id: id ? `${id}-next-month-button` : void 0,
|
|
437
444
|
type: "button",
|
|
438
445
|
className: (0, import_clsx3.default)(
|
|
439
446
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -476,6 +483,7 @@ function CalendarRange({
|
|
|
476
483
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
477
484
|
DateCell,
|
|
478
485
|
{
|
|
486
|
+
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
479
487
|
date,
|
|
480
488
|
isInMonth: !!isInMonth,
|
|
481
489
|
isToday: !!isToday,
|
|
@@ -231,21 +231,32 @@ var Caption = (_a) => {
|
|
|
231
231
|
as = "span",
|
|
232
232
|
style = "default",
|
|
233
233
|
color,
|
|
234
|
-
align
|
|
234
|
+
align,
|
|
235
|
+
id
|
|
235
236
|
} = _b, props = __objRest(_b, [
|
|
236
237
|
"className",
|
|
237
238
|
"children",
|
|
238
239
|
"as",
|
|
239
240
|
"style",
|
|
240
241
|
"color",
|
|
241
|
-
"align"
|
|
242
|
+
"align",
|
|
243
|
+
"id"
|
|
242
244
|
]);
|
|
243
245
|
const Element = as;
|
|
244
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex gap-1", children: [
|
|
245
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id, className: "flex gap-1", children: [
|
|
247
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
248
|
+
WhichIcon,
|
|
249
|
+
{
|
|
250
|
+
id,
|
|
251
|
+
style,
|
|
252
|
+
size: 16,
|
|
253
|
+
className: "mt-[3px] desktop:mt-0"
|
|
254
|
+
}
|
|
255
|
+
),
|
|
246
256
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
247
257
|
Element,
|
|
248
258
|
__spreadProps(__spreadValues({
|
|
259
|
+
id: id ? `${id}-text` : void 0,
|
|
249
260
|
className: (0, import_clsx3.default)(
|
|
250
261
|
typography.caption.replace("text-text-primary-normal", ""),
|
|
251
262
|
(style === "default" || style === "info") && "text-text-secondary-normal",
|
|
@@ -269,19 +280,52 @@ var Caption = (_a) => {
|
|
|
269
280
|
var WhichIcon = ({
|
|
270
281
|
style,
|
|
271
282
|
size,
|
|
272
|
-
className
|
|
283
|
+
className,
|
|
284
|
+
id
|
|
273
285
|
}) => {
|
|
274
286
|
if (style === "success") {
|
|
275
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
288
|
+
Icon,
|
|
289
|
+
{
|
|
290
|
+
id: id ? `${id}-icon` : void 0,
|
|
291
|
+
className,
|
|
292
|
+
name: "check_circle",
|
|
293
|
+
size
|
|
294
|
+
}
|
|
295
|
+
) });
|
|
276
296
|
}
|
|
277
297
|
if (style === "warning") {
|
|
278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
299
|
+
Icon,
|
|
300
|
+
{
|
|
301
|
+
id: id ? `${id}-icon` : void 0,
|
|
302
|
+
className,
|
|
303
|
+
name: "warning",
|
|
304
|
+
size
|
|
305
|
+
}
|
|
306
|
+
) });
|
|
279
307
|
}
|
|
280
308
|
if (style === "error") {
|
|
281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
310
|
+
Icon,
|
|
311
|
+
{
|
|
312
|
+
id: id ? `${id}-icon` : void 0,
|
|
313
|
+
className,
|
|
314
|
+
name: "info",
|
|
315
|
+
size
|
|
316
|
+
}
|
|
317
|
+
) });
|
|
282
318
|
}
|
|
283
319
|
if (style === "info") {
|
|
284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
321
|
+
Icon,
|
|
322
|
+
{
|
|
323
|
+
id: id ? `${id}-icon` : void 0,
|
|
324
|
+
className,
|
|
325
|
+
name: "info",
|
|
326
|
+
size
|
|
327
|
+
}
|
|
328
|
+
) });
|
|
285
329
|
}
|
|
286
330
|
return null;
|
|
287
331
|
};
|
|
@@ -20,21 +20,32 @@ var Caption = (_a) => {
|
|
|
20
20
|
as = "span",
|
|
21
21
|
style = "default",
|
|
22
22
|
color,
|
|
23
|
-
align
|
|
23
|
+
align,
|
|
24
|
+
id
|
|
24
25
|
} = _b, props = __objRest(_b, [
|
|
25
26
|
"className",
|
|
26
27
|
"children",
|
|
27
28
|
"as",
|
|
28
29
|
"style",
|
|
29
30
|
"color",
|
|
30
|
-
"align"
|
|
31
|
+
"align",
|
|
32
|
+
"id"
|
|
31
33
|
]);
|
|
32
34
|
const Element = as;
|
|
33
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", { id, className: "flex gap-1", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
WhichIcon,
|
|
38
|
+
{
|
|
39
|
+
id,
|
|
40
|
+
style,
|
|
41
|
+
size: 16,
|
|
42
|
+
className: "mt-[3px] desktop:mt-0"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
35
45
|
/* @__PURE__ */ jsx(
|
|
36
46
|
Element,
|
|
37
47
|
__spreadProps(__spreadValues({
|
|
48
|
+
id: id ? `${id}-text` : void 0,
|
|
38
49
|
className: clsx(
|
|
39
50
|
typography.caption.replace("text-text-primary-normal", ""),
|
|
40
51
|
(style === "default" || style === "info") && "text-text-secondary-normal",
|
|
@@ -58,19 +69,52 @@ var Caption = (_a) => {
|
|
|
58
69
|
var WhichIcon = ({
|
|
59
70
|
style,
|
|
60
71
|
size,
|
|
61
|
-
className
|
|
72
|
+
className,
|
|
73
|
+
id
|
|
62
74
|
}) => {
|
|
63
75
|
if (style === "success") {
|
|
64
|
-
return /* @__PURE__ */ jsx("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ jsx(
|
|
76
|
+
return /* @__PURE__ */ jsx("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ jsx(
|
|
77
|
+
Icon,
|
|
78
|
+
{
|
|
79
|
+
id: id ? `${id}-icon` : void 0,
|
|
80
|
+
className,
|
|
81
|
+
name: "check_circle",
|
|
82
|
+
size
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
65
85
|
}
|
|
66
86
|
if (style === "warning") {
|
|
67
|
-
return /* @__PURE__ */ jsx("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ jsx(
|
|
87
|
+
return /* @__PURE__ */ jsx("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ jsx(
|
|
88
|
+
Icon,
|
|
89
|
+
{
|
|
90
|
+
id: id ? `${id}-icon` : void 0,
|
|
91
|
+
className,
|
|
92
|
+
name: "warning",
|
|
93
|
+
size
|
|
94
|
+
}
|
|
95
|
+
) });
|
|
68
96
|
}
|
|
69
97
|
if (style === "error") {
|
|
70
|
-
return /* @__PURE__ */ jsx("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ jsx(
|
|
98
|
+
return /* @__PURE__ */ jsx("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ jsx(
|
|
99
|
+
Icon,
|
|
100
|
+
{
|
|
101
|
+
id: id ? `${id}-icon` : void 0,
|
|
102
|
+
className,
|
|
103
|
+
name: "info",
|
|
104
|
+
size
|
|
105
|
+
}
|
|
106
|
+
) });
|
|
71
107
|
}
|
|
72
108
|
if (style === "info") {
|
|
73
|
-
return /* @__PURE__ */ jsx("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ jsx(
|
|
109
|
+
return /* @__PURE__ */ jsx("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ jsx(
|
|
110
|
+
Icon,
|
|
111
|
+
{
|
|
112
|
+
id: id ? `${id}-icon` : void 0,
|
|
113
|
+
className,
|
|
114
|
+
name: "info",
|
|
115
|
+
size
|
|
116
|
+
}
|
|
117
|
+
) });
|
|
74
118
|
}
|
|
75
119
|
return null;
|
|
76
120
|
};
|
|
@@ -235,7 +235,8 @@ var Paragraph = (_a) => {
|
|
|
235
235
|
tall,
|
|
236
236
|
addOverflow,
|
|
237
237
|
children,
|
|
238
|
-
as = "p"
|
|
238
|
+
as = "p",
|
|
239
|
+
id
|
|
239
240
|
} = _b, props = __objRest(_b, [
|
|
240
241
|
"className",
|
|
241
242
|
"color",
|
|
@@ -244,12 +245,15 @@ var Paragraph = (_a) => {
|
|
|
244
245
|
"tall",
|
|
245
246
|
"addOverflow",
|
|
246
247
|
"children",
|
|
247
|
-
"as"
|
|
248
|
+
"as",
|
|
249
|
+
"id"
|
|
248
250
|
]);
|
|
249
251
|
const Element = as;
|
|
250
252
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
251
253
|
Element,
|
|
252
|
-
__spreadProps(__spreadValues({
|
|
254
|
+
__spreadProps(__spreadValues({
|
|
255
|
+
id
|
|
256
|
+
}, props), {
|
|
253
257
|
className: (0, import_clsx3.default)(
|
|
254
258
|
typography.paragraph,
|
|
255
259
|
className,
|
|
@@ -280,7 +284,8 @@ var Checkbox = (_a) => {
|
|
|
280
284
|
checked,
|
|
281
285
|
onChange,
|
|
282
286
|
indeterminate,
|
|
283
|
-
paragraphClassName
|
|
287
|
+
paragraphClassName,
|
|
288
|
+
id
|
|
284
289
|
} = _b, props = __objRest(_b, [
|
|
285
290
|
"label",
|
|
286
291
|
"error",
|
|
@@ -289,7 +294,8 @@ var Checkbox = (_a) => {
|
|
|
289
294
|
"checked",
|
|
290
295
|
"onChange",
|
|
291
296
|
"indeterminate",
|
|
292
|
-
"paragraphClassName"
|
|
297
|
+
"paragraphClassName",
|
|
298
|
+
"id"
|
|
293
299
|
]);
|
|
294
300
|
const selected = indeterminate || checked;
|
|
295
301
|
const normalClassName = (0, import_clsx4.default)(
|
|
@@ -317,6 +323,8 @@ var Checkbox = (_a) => {
|
|
|
317
323
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
318
324
|
"label",
|
|
319
325
|
{
|
|
326
|
+
id,
|
|
327
|
+
htmlFor: `${id}-input`,
|
|
320
328
|
className: (0, import_clsx4.default)(
|
|
321
329
|
"flex items-center",
|
|
322
330
|
componentGap,
|
|
@@ -328,12 +336,12 @@ var Checkbox = (_a) => {
|
|
|
328
336
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
329
337
|
"input",
|
|
330
338
|
__spreadValues({
|
|
339
|
+
id: id ? `${id}-input` : void 0,
|
|
331
340
|
type: "checkbox",
|
|
332
341
|
className: "sr-only peer",
|
|
333
342
|
disabled,
|
|
334
343
|
checked: selected,
|
|
335
344
|
onChange: handleOnChange,
|
|
336
|
-
id: props.id,
|
|
337
345
|
"data-indeterminate": indeterminate
|
|
338
346
|
}, props)
|
|
339
347
|
),
|
|
@@ -359,6 +367,7 @@ var Checkbox = (_a) => {
|
|
|
359
367
|
label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
360
368
|
Paragraph,
|
|
361
369
|
{
|
|
370
|
+
id: id ? `${id}-label` : void 0,
|
|
362
371
|
as: "span",
|
|
363
372
|
padded: true,
|
|
364
373
|
className: (0, import_clsx4.default)(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Checkbox
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-UT7XCBZF.js";
|
|
5
|
+
import "../chunk-VG4EPHJA.js";
|
|
6
6
|
import "../chunk-IGQVA7SC.js";
|
|
7
7
|
import "../chunk-RDLEIAQU.js";
|
|
8
8
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -210,7 +210,8 @@ var Button = (_a) => {
|
|
|
210
210
|
children,
|
|
211
211
|
iconOnly = false,
|
|
212
212
|
colorClassName,
|
|
213
|
-
href
|
|
213
|
+
href,
|
|
214
|
+
id
|
|
214
215
|
} = _b, props = __objRest(_b, [
|
|
215
216
|
"variant",
|
|
216
217
|
"as",
|
|
@@ -223,7 +224,8 @@ var Button = (_a) => {
|
|
|
223
224
|
"children",
|
|
224
225
|
"iconOnly",
|
|
225
226
|
"colorClassName",
|
|
226
|
-
"href"
|
|
227
|
+
"href",
|
|
228
|
+
"id"
|
|
227
229
|
]);
|
|
228
230
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx2.default)(
|
|
229
231
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -313,6 +315,7 @@ var Button = (_a) => {
|
|
|
313
315
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
314
316
|
Element,
|
|
315
317
|
__spreadProps(__spreadValues({
|
|
318
|
+
id,
|
|
316
319
|
type: Element === "button" ? "button" : void 0,
|
|
317
320
|
className: buttonClasses
|
|
318
321
|
}, props), {
|
|
@@ -320,7 +323,7 @@ var Button = (_a) => {
|
|
|
320
323
|
href,
|
|
321
324
|
children: [
|
|
322
325
|
leftIcon && leftIcon,
|
|
323
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: labelClasses, children }),
|
|
326
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
324
327
|
rightIcon && rightIcon
|
|
325
328
|
]
|
|
326
329
|
})
|
|
@@ -337,14 +340,16 @@ var ContentTab = (_a) => {
|
|
|
337
340
|
className,
|
|
338
341
|
disabled = false,
|
|
339
342
|
onClick,
|
|
340
|
-
ref
|
|
343
|
+
ref,
|
|
344
|
+
id
|
|
341
345
|
} = _b, props = __objRest(_b, [
|
|
342
346
|
"label",
|
|
343
347
|
"selected",
|
|
344
348
|
"className",
|
|
345
349
|
"disabled",
|
|
346
350
|
"onClick",
|
|
347
|
-
"ref"
|
|
351
|
+
"ref",
|
|
352
|
+
"id"
|
|
348
353
|
]);
|
|
349
354
|
const [active, setActive] = (0, import_react.useState)(false);
|
|
350
355
|
const handleClick = (0, import_react.useCallback)(
|
|
@@ -364,10 +369,11 @@ var ContentTab = (_a) => {
|
|
|
364
369
|
!active && disabled && "bg-text-action-primary-disabled",
|
|
365
370
|
className
|
|
366
371
|
);
|
|
367
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative", children: [
|
|
372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { id, className: "relative", children: [
|
|
368
373
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
369
374
|
Button,
|
|
370
375
|
__spreadProps(__spreadValues({
|
|
376
|
+
id: id ? `${id}-button` : void 0,
|
|
371
377
|
ref,
|
|
372
378
|
variant: "tertiary",
|
|
373
379
|
disabled,
|
|
@@ -381,7 +387,14 @@ var ContentTab = (_a) => {
|
|
|
381
387
|
children: label
|
|
382
388
|
})
|
|
383
389
|
),
|
|
384
|
-
selected && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
390
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
391
|
+
"div",
|
|
392
|
+
{
|
|
393
|
+
id: id ? `${id}-indicator` : void 0,
|
|
394
|
+
className: computedClassName,
|
|
395
|
+
children: " "
|
|
396
|
+
}
|
|
397
|
+
)
|
|
385
398
|
] });
|
|
386
399
|
};
|
|
387
400
|
ContentTab.displayName = "ContentTab";
|