@dmsi/wedgekit-react 0.0.494 → 0.0.496
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-BYY2NTJH.js → chunk-2A7H5GVB.js} +2 -2
- package/dist/{chunk-IPAKWF2V.js → chunk-5R4C5F63.js} +13 -7
- package/dist/chunk-BTKWHCUE.js +137 -0
- package/dist/{chunk-ETAEB3TA.js → chunk-L3BXRDLP.js} +8 -2
- package/dist/chunk-Y5GD2FJA.js +32 -0
- package/dist/{chunk-QBSEKZWX.js → chunk-ZKTHUXKS.js} +1 -1
- package/dist/components/CalendarRange.cjs +526 -398
- package/dist/components/CalendarRange.css +26 -3
- package/dist/components/CalendarRange.js +7 -5
- package/dist/components/Caption.cjs +6 -3
- package/dist/components/Caption.js +5 -129
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +517 -389
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +26 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +7 -5
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +520 -392
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +26 -3
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +7 -5
- package/dist/components/DataGrid/PinnedColumns.cjs +521 -393
- package/dist/components/DataGrid/PinnedColumns.css +26 -3
- package/dist/components/DataGrid/PinnedColumns.js +7 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +515 -387
- package/dist/components/DataGrid/TableBody/LoadingCell.css +26 -3
- package/dist/components/DataGrid/TableBody/LoadingCell.js +7 -5
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +516 -388
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +26 -3
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +7 -5
- package/dist/components/DataGrid/TableBody/index.cjs +516 -388
- package/dist/components/DataGrid/TableBody/index.css +26 -3
- package/dist/components/DataGrid/TableBody/index.js +7 -5
- package/dist/components/DataGrid/index.cjs +536 -408
- package/dist/components/DataGrid/index.css +26 -3
- package/dist/components/DataGrid/index.js +7 -5
- package/dist/components/DataGrid/utils.cjs +515 -387
- package/dist/components/DataGrid/utils.css +26 -3
- package/dist/components/DataGrid/utils.js +7 -5
- package/dist/components/DataGridCell.cjs +212 -88
- package/dist/components/DataGridCell.js +3 -2
- package/dist/components/DateInput.cjs +508 -380
- package/dist/components/DateInput.css +26 -3
- package/dist/components/DateInput.js +7 -5
- package/dist/components/DateRangeInput.cjs +514 -386
- package/dist/components/DateRangeInput.css +26 -3
- package/dist/components/DateRangeInput.js +7 -5
- package/dist/components/MenuOption.cjs +147 -23
- package/dist/components/MenuOption.js +2 -1
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +526 -398
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +26 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +7 -5
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +505 -377
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +26 -3
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +7 -5
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
- package/dist/components/MobileDataGrid/index.cjs +560 -432
- package/dist/components/MobileDataGrid/index.css +26 -3
- package/dist/components/MobileDataGrid/index.js +7 -5
- package/dist/components/NestedMenu.cjs +170 -46
- package/dist/components/NestedMenu.js +2 -1
- package/dist/components/SearchResultImage/index.cjs +92 -0
- package/dist/components/SearchResultImage/index.js +8 -0
- package/dist/components/SkeletonParagraph.cjs +8 -2
- package/dist/components/SkeletonParagraph.js +1 -1
- package/dist/components/index.cjs +715 -558
- package/dist/components/index.css +26 -3
- package/dist/components/index.js +10 -5
- package/dist/index.css +26 -3
- package/package.json +1 -1
- package/src/components/Caption.tsx +3 -0
- package/src/components/MenuOption.tsx +16 -6
- package/src/components/SearchResultImage/index.tsx +39 -0
- package/src/components/SkeletonParagraph.tsx +9 -1
- package/src/components/index.ts +1 -0
- package/src/index.css +4 -3
|
@@ -838,6 +838,12 @@
|
|
|
838
838
|
.\!w-20 {
|
|
839
839
|
width: calc(var(--spacing) * 20) !important;
|
|
840
840
|
}
|
|
841
|
+
.w-1\/2 {
|
|
842
|
+
width: calc(1/2 * 100%);
|
|
843
|
+
}
|
|
844
|
+
.w-1\/4 {
|
|
845
|
+
width: calc(1/4 * 100%);
|
|
846
|
+
}
|
|
841
847
|
.w-2\/3 {
|
|
842
848
|
width: calc(2/3 * 100%);
|
|
843
849
|
}
|
|
@@ -922,6 +928,9 @@
|
|
|
922
928
|
.min-w-0 {
|
|
923
929
|
min-width: calc(var(--spacing) * 0);
|
|
924
930
|
}
|
|
931
|
+
.min-w-10 {
|
|
932
|
+
min-width: calc(var(--spacing) * 10);
|
|
933
|
+
}
|
|
925
934
|
.min-w-20 {
|
|
926
935
|
min-width: calc(var(--spacing) * 20);
|
|
927
936
|
}
|
|
@@ -4091,6 +4100,11 @@
|
|
|
4091
4100
|
margin-top: var(--spacing-desktop-container-padding);
|
|
4092
4101
|
}
|
|
4093
4102
|
}
|
|
4103
|
+
.desktop\:mt-px {
|
|
4104
|
+
@container root (width >= 48rem) {
|
|
4105
|
+
margin-top: 1px;
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4094
4108
|
.desktop\:mb-desktop-container-padding {
|
|
4095
4109
|
@container root (width >= 48rem) {
|
|
4096
4110
|
margin-bottom: var(--spacing-desktop-container-padding);
|
|
@@ -4673,6 +4687,7 @@
|
|
|
4673
4687
|
position: relative;
|
|
4674
4688
|
overflow: hidden;
|
|
4675
4689
|
background-color: #f7f7f7;
|
|
4690
|
+
opacity: 0.85;
|
|
4676
4691
|
}
|
|
4677
4692
|
.skeleton-paragraph::after {
|
|
4678
4693
|
content: "";
|
|
@@ -4682,9 +4697,17 @@
|
|
|
4682
4697
|
background-image:
|
|
4683
4698
|
linear-gradient(
|
|
4684
4699
|
90deg,
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4700
|
+
transparent 0%,
|
|
4701
|
+
color-mix(in srgb, #ffffff 60%, transparent) 50%,
|
|
4702
|
+
transparent 100%);
|
|
4703
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4704
|
+
background-image:
|
|
4705
|
+
linear-gradient(
|
|
4706
|
+
90deg,
|
|
4707
|
+
transparent 0%,
|
|
4708
|
+
color-mix(in srgb, var(--color-neutral-000) 60%, transparent) 50%,
|
|
4709
|
+
transparent 100%);
|
|
4710
|
+
}
|
|
4688
4711
|
animation: skeleton-shimmer 1.4s ease-in-out infinite;
|
|
4689
4712
|
}
|
|
4690
4713
|
@keyframes skeleton-shimmer {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MobileDataGrid
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-2A7H5GVB.js";
|
|
4
4
|
import "../../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../../chunk-4Q7T4GJ2.js";
|
|
6
6
|
import "../../chunk-3DEYCNUE.js";
|
|
7
7
|
import "../../chunk-DYBJUTGK.js";
|
|
8
|
+
import "../../chunk-Y5GD2FJA.js";
|
|
8
9
|
import "../../chunk-TPBEID5X.js";
|
|
9
10
|
import "../../chunk-B53XDCLO.js";
|
|
10
11
|
import "../../chunk-MBZ55T2D.js";
|
|
@@ -15,8 +16,8 @@ import "../../chunk-BQNPOGD5.js";
|
|
|
15
16
|
import "../../chunk-QMSPTD6L.js";
|
|
16
17
|
import "../../chunk-XIXQUEYC.js";
|
|
17
18
|
import "../../chunk-5IFPG6TS.js";
|
|
18
|
-
import "../../chunk-KW6V7O3H.js";
|
|
19
19
|
import "../../chunk-AJ5M6MVX.js";
|
|
20
|
+
import "../../chunk-KW6V7O3H.js";
|
|
20
21
|
import "../../chunk-JUFBGNWW.js";
|
|
21
22
|
import "../../chunk-YEZBNQZI.js";
|
|
22
23
|
import "../../chunk-S5ZJ3Q7P.js";
|
|
@@ -24,7 +25,7 @@ import "../../chunk-AT4AWD6B.js";
|
|
|
24
25
|
import "../../chunk-EWGHVZL5.js";
|
|
25
26
|
import "../../chunk-7GHD74J3.js";
|
|
26
27
|
import "../../chunk-7BVUTFZ5.js";
|
|
27
|
-
import "../../chunk-
|
|
28
|
+
import "../../chunk-L3BXRDLP.js";
|
|
28
29
|
import "../../chunk-GRGDX7JC.js";
|
|
29
30
|
import "../../chunk-HVNHTM3P.js";
|
|
30
31
|
import "../../chunk-X67L3NZI.js";
|
|
@@ -37,15 +38,16 @@ import "../../chunk-6TYWM26K.js";
|
|
|
37
38
|
import "../../chunk-SBRRNFOP.js";
|
|
38
39
|
import "../../chunk-Y2GK27RX.js";
|
|
39
40
|
import "../../chunk-QVWYTQKL.js";
|
|
40
|
-
import "../../chunk-
|
|
41
|
+
import "../../chunk-ZKTHUXKS.js";
|
|
41
42
|
import "../../chunk-TCMOGTPB.js";
|
|
42
43
|
import "../../chunk-DVU5XV7L.js";
|
|
43
|
-
import "../../chunk-
|
|
44
|
+
import "../../chunk-5R4C5F63.js";
|
|
44
45
|
import "../../chunk-RQRR4FEF.js";
|
|
45
46
|
import "../../chunk-44TH3VC7.js";
|
|
46
47
|
import "../../chunk-AL5QIRY3.js";
|
|
47
48
|
import "../../chunk-WVUIIBRR.js";
|
|
48
49
|
import "../../chunk-75USUR3I.js";
|
|
50
|
+
import "../../chunk-BTKWHCUE.js";
|
|
49
51
|
import "../../chunk-WEAVZEE4.js";
|
|
50
52
|
import "../../chunk-OZBB6RFM.js";
|
|
51
53
|
import "../../chunk-URYQ24NF.js";
|
|
@@ -101,7 +101,7 @@ function Icon(_a) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
// src/components/MenuOption.tsx
|
|
104
|
-
var
|
|
104
|
+
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
105
105
|
var import_react5 = require("react");
|
|
106
106
|
|
|
107
107
|
// src/classNames.ts
|
|
@@ -392,8 +392,130 @@ var LocalStoragePrefixVersion = `dmsi-acc-v1.1`;
|
|
|
392
392
|
var import_react4 = require("react");
|
|
393
393
|
var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
|
|
394
394
|
|
|
395
|
-
// src/components/
|
|
395
|
+
// src/components/Caption.tsx
|
|
396
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
396
397
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
398
|
+
var Caption = (_a) => {
|
|
399
|
+
var _b = _a, {
|
|
400
|
+
className,
|
|
401
|
+
children,
|
|
402
|
+
as = "span",
|
|
403
|
+
style = "default",
|
|
404
|
+
color,
|
|
405
|
+
align,
|
|
406
|
+
id,
|
|
407
|
+
testid,
|
|
408
|
+
marginTopDesktop
|
|
409
|
+
} = _b, props = __objRest(_b, [
|
|
410
|
+
"className",
|
|
411
|
+
"children",
|
|
412
|
+
"as",
|
|
413
|
+
"style",
|
|
414
|
+
"color",
|
|
415
|
+
"align",
|
|
416
|
+
"id",
|
|
417
|
+
"testid",
|
|
418
|
+
"marginTopDesktop"
|
|
419
|
+
]);
|
|
420
|
+
const Element = as;
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id, "data-testid": testid, className: "flex gap-1", children: [
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
423
|
+
WhichIcon,
|
|
424
|
+
{
|
|
425
|
+
id,
|
|
426
|
+
testid,
|
|
427
|
+
style,
|
|
428
|
+
size: 16,
|
|
429
|
+
className: "mt-[3px] desktop:mt-0"
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
433
|
+
Element,
|
|
434
|
+
__spreadProps(__spreadValues({
|
|
435
|
+
id: id ? `${id}-text` : void 0,
|
|
436
|
+
"data-testid": testid ? `${testid}-text` : void 0,
|
|
437
|
+
className: (0, import_clsx5.default)(
|
|
438
|
+
typography.caption.replace("text-text-primary-normal", ""),
|
|
439
|
+
(style === "default" || style === "info") && "text-text-secondary-normal",
|
|
440
|
+
style === "success" && "text-text-success-normal",
|
|
441
|
+
style === "warning" && "text-text-warning-normal",
|
|
442
|
+
style === "error" && "text-text-critical-normal",
|
|
443
|
+
align === "left" && "text-left",
|
|
444
|
+
align === "center" && "text-center",
|
|
445
|
+
align === "right" && "text-right",
|
|
446
|
+
className,
|
|
447
|
+
marginTopDesktop && `desktop:mt-px`
|
|
448
|
+
)
|
|
449
|
+
}, props), {
|
|
450
|
+
style: {
|
|
451
|
+
color: color ? `var(--color-${color})` : void 0
|
|
452
|
+
},
|
|
453
|
+
children
|
|
454
|
+
})
|
|
455
|
+
)
|
|
456
|
+
] });
|
|
457
|
+
};
|
|
458
|
+
var WhichIcon = ({
|
|
459
|
+
style,
|
|
460
|
+
size,
|
|
461
|
+
className,
|
|
462
|
+
id,
|
|
463
|
+
testid
|
|
464
|
+
}) => {
|
|
465
|
+
if (style === "success") {
|
|
466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
467
|
+
Icon,
|
|
468
|
+
{
|
|
469
|
+
id: id ? `${id}-icon` : void 0,
|
|
470
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
471
|
+
className,
|
|
472
|
+
name: "check_circle",
|
|
473
|
+
size
|
|
474
|
+
}
|
|
475
|
+
) });
|
|
476
|
+
}
|
|
477
|
+
if (style === "warning") {
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
479
|
+
Icon,
|
|
480
|
+
{
|
|
481
|
+
id: id ? `${id}-icon` : void 0,
|
|
482
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
483
|
+
className,
|
|
484
|
+
name: "warning",
|
|
485
|
+
size
|
|
486
|
+
}
|
|
487
|
+
) });
|
|
488
|
+
}
|
|
489
|
+
if (style === "error") {
|
|
490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
491
|
+
Icon,
|
|
492
|
+
{
|
|
493
|
+
id: id ? `${id}-icon` : void 0,
|
|
494
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
495
|
+
className,
|
|
496
|
+
name: "info",
|
|
497
|
+
size
|
|
498
|
+
}
|
|
499
|
+
) });
|
|
500
|
+
}
|
|
501
|
+
if (style === "info") {
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
503
|
+
Icon,
|
|
504
|
+
{
|
|
505
|
+
id: id ? `${id}-icon` : void 0,
|
|
506
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
507
|
+
className,
|
|
508
|
+
name: "info",
|
|
509
|
+
size
|
|
510
|
+
}
|
|
511
|
+
) });
|
|
512
|
+
}
|
|
513
|
+
return null;
|
|
514
|
+
};
|
|
515
|
+
Caption.displayName = "Caption";
|
|
516
|
+
|
|
517
|
+
// src/components/MenuOption.tsx
|
|
518
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
397
519
|
var MenuOption = ({
|
|
398
520
|
id,
|
|
399
521
|
testid,
|
|
@@ -418,7 +540,8 @@ var MenuOption = ({
|
|
|
418
540
|
mobilePositionTo,
|
|
419
541
|
highlightMatchingText = false,
|
|
420
542
|
menuValue,
|
|
421
|
-
onMouseMove
|
|
543
|
+
onMouseMove,
|
|
544
|
+
small = false
|
|
422
545
|
}) => {
|
|
423
546
|
const uniqueId = (0, import_react5.useId)();
|
|
424
547
|
const internalRef = (0, import_react5.useRef)(null);
|
|
@@ -448,47 +571,48 @@ var MenuOption = ({
|
|
|
448
571
|
const additionalAttributes = {
|
|
449
572
|
"data-selected": selected || null
|
|
450
573
|
};
|
|
451
|
-
const svgStyles = (0,
|
|
574
|
+
const svgStyles = (0, import_clsx6.default)(
|
|
452
575
|
"[&>svg]:shrink-0 [&>svg]:fill-icon-action-primary-normal"
|
|
453
576
|
);
|
|
454
|
-
const textLabelStyles = (0,
|
|
455
|
-
const normalStyles = variant === "normal" && !disabled && (0,
|
|
577
|
+
const textLabelStyles = (0, import_clsx6.default)("w-full whitespace-nowrap !leading-6");
|
|
578
|
+
const normalStyles = variant === "normal" && !disabled && (0, import_clsx6.default)(
|
|
456
579
|
"bg-transparent text-text-primary-normal",
|
|
457
580
|
"hover:bg-background-action-secondary-hover",
|
|
458
581
|
"focus:bg-background-action-secondary-hover",
|
|
459
582
|
"data-selected:bg-background-action-secondary-hover",
|
|
460
583
|
"active:bg-background-action-secondary-active"
|
|
461
584
|
);
|
|
462
|
-
const normalDisabledStyles = variant === "normal" && disabled && (0,
|
|
463
|
-
const actionStyles = variant === "action" && !disabled && (0,
|
|
585
|
+
const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx6.default)("text-text-primary-disabled");
|
|
586
|
+
const actionStyles = variant === "action" && !disabled && (0, import_clsx6.default)(
|
|
464
587
|
"text-action-400 bg-transparent",
|
|
465
588
|
"hover:bg-background-action-secondary-hover hover:text-text-action-hover",
|
|
466
589
|
"focus:bg-background-action-secondary-hover focus:text-text-action-hover",
|
|
467
590
|
"data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
|
|
468
591
|
"active:bg-background-action-secondary-active active:text-text-action-active"
|
|
469
592
|
);
|
|
470
|
-
const actionDisabledStyles = variant === "action" && disabled && (0,
|
|
471
|
-
const disabledStyles = disabled && (0,
|
|
593
|
+
const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx6.default)("text-text-action-disabled");
|
|
594
|
+
const disabledStyles = disabled && (0, import_clsx6.default)("bg-transparent cursor-default pointer-events-none");
|
|
472
595
|
const processChildren = typeof children === "string" && highlightMatchingText ? highlightMatch(children, menuValue) : children;
|
|
473
|
-
const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ (0,
|
|
474
|
-
return /* @__PURE__ */ (0,
|
|
475
|
-
/* @__PURE__ */ (0,
|
|
596
|
+
const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label, { padded: true, className: textLabelStyles, children: processChildren }) : !small ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Paragraph, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Caption, { padded: true, className: textLabelStyles, children: processChildren });
|
|
597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
476
599
|
"div",
|
|
477
600
|
__spreadProps(__spreadValues({
|
|
478
601
|
id,
|
|
479
602
|
"data-testid": testid,
|
|
480
603
|
ref: actualRef,
|
|
481
|
-
className: (0,
|
|
482
|
-
"flex
|
|
604
|
+
className: (0, import_clsx6.default)(
|
|
605
|
+
"flex cursor-pointer w-full text-left relative outline-none",
|
|
483
606
|
svgStyles,
|
|
484
|
-
componentGap,
|
|
607
|
+
small ? layoutGroupGap : componentGap,
|
|
485
608
|
componentPadding,
|
|
486
609
|
baseTransition,
|
|
487
610
|
normalStyles,
|
|
488
611
|
normalDisabledStyles,
|
|
489
612
|
actionStyles,
|
|
490
613
|
actionDisabledStyles,
|
|
491
|
-
disabledStyles
|
|
614
|
+
disabledStyles,
|
|
615
|
+
{ "items-center": !small }
|
|
492
616
|
),
|
|
493
617
|
"data-value": value || children,
|
|
494
618
|
onClick: () => {
|
|
@@ -505,13 +629,13 @@ var MenuOption = ({
|
|
|
505
629
|
role: "menuitem",
|
|
506
630
|
"aria-haspopup": subMenu ? "menu" : void 0,
|
|
507
631
|
children: [
|
|
508
|
-
before && /* @__PURE__ */ (0,
|
|
632
|
+
before && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_clsx6.default)("shrink-0", { "items-center flex": !small }), children: before }),
|
|
509
633
|
renderChildren,
|
|
510
634
|
renderAfterProp()
|
|
511
635
|
]
|
|
512
636
|
})
|
|
513
637
|
),
|
|
514
|
-
subMenu && /* @__PURE__ */ (0,
|
|
638
|
+
subMenu && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
515
639
|
"div",
|
|
516
640
|
{
|
|
517
641
|
onMouseEnter: handleSubMenuEnter,
|
|
@@ -535,14 +659,14 @@ var MenuOption = ({
|
|
|
535
659
|
return after;
|
|
536
660
|
}
|
|
537
661
|
if (subMenu && after !== null) {
|
|
538
|
-
return /* @__PURE__ */ (0,
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "chevron_right" });
|
|
539
663
|
}
|
|
540
664
|
}
|
|
541
665
|
function mobileBackMenuOption() {
|
|
542
666
|
if (!isMobile) {
|
|
543
667
|
return;
|
|
544
668
|
}
|
|
545
|
-
return /* @__PURE__ */ (0,
|
|
669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
546
670
|
MenuOption,
|
|
547
671
|
{
|
|
548
672
|
id: id ? `${id}-back` : void 0,
|
|
@@ -551,7 +675,7 @@ var MenuOption = ({
|
|
|
551
675
|
closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
|
|
552
676
|
},
|
|
553
677
|
variant: "action",
|
|
554
|
-
before: /* @__PURE__ */ (0,
|
|
678
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "chevron_left" }),
|
|
555
679
|
children: "Back"
|
|
556
680
|
}
|
|
557
681
|
);
|
|
@@ -568,13 +692,13 @@ function highlightMatch(text, searchValue) {
|
|
|
568
692
|
);
|
|
569
693
|
const parts = text.split(regex);
|
|
570
694
|
return parts.map(
|
|
571
|
-
(part, index) => regex.test(part) ? /* @__PURE__ */ (0,
|
|
695
|
+
(part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-bold", children: part }, index) : part
|
|
572
696
|
);
|
|
573
697
|
}
|
|
574
698
|
|
|
575
699
|
// src/components/Button.tsx
|
|
576
|
-
var
|
|
577
|
-
var
|
|
700
|
+
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
701
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
578
702
|
var Button = (_a) => {
|
|
579
703
|
var _b = _a, {
|
|
580
704
|
variant = "primary",
|
|
@@ -607,7 +731,7 @@ var Button = (_a) => {
|
|
|
607
731
|
"id",
|
|
608
732
|
"testid"
|
|
609
733
|
]);
|
|
610
|
-
const primaryVariantStyles = variant === "primary" && (0,
|
|
734
|
+
const primaryVariantStyles = variant === "primary" && (0, import_clsx7.default)(
|
|
611
735
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
612
736
|
"bg-background-action-primary-normal border-background-action-primary-normal",
|
|
613
737
|
"hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
|
|
@@ -615,7 +739,7 @@ var Button = (_a) => {
|
|
|
615
739
|
"active:bg-background-action-primary-active active:border-background-action-primary-active",
|
|
616
740
|
"disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
|
|
617
741
|
);
|
|
618
|
-
const secondaryVariantStyles = variant === "secondary" && (0,
|
|
742
|
+
const secondaryVariantStyles = variant === "secondary" && (0, import_clsx7.default)(
|
|
619
743
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
620
744
|
"bg-background-action-secondary-normal border-border-action-normal",
|
|
621
745
|
"hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
|
|
@@ -623,7 +747,7 @@ var Button = (_a) => {
|
|
|
623
747
|
"active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
|
|
624
748
|
"disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
|
|
625
749
|
);
|
|
626
|
-
const tertiaryVariantStyles = variant === "tertiary" && (0,
|
|
750
|
+
const tertiaryVariantStyles = variant === "tertiary" && (0, import_clsx7.default)(
|
|
627
751
|
"bg-transparent border-transparent",
|
|
628
752
|
iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
629
753
|
"bg-transparent border-transparent",
|
|
@@ -632,7 +756,7 @@ var Button = (_a) => {
|
|
|
632
756
|
"active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
|
|
633
757
|
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
634
758
|
);
|
|
635
|
-
const primaryCriticalVariantStyles = variant === "primary-critical" && (0,
|
|
759
|
+
const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx7.default)(
|
|
636
760
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
637
761
|
"bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
|
|
638
762
|
"hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
|
|
@@ -640,7 +764,7 @@ var Button = (_a) => {
|
|
|
640
764
|
"active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
|
|
641
765
|
"disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
|
|
642
766
|
);
|
|
643
|
-
const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0,
|
|
767
|
+
const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0, import_clsx7.default)(
|
|
644
768
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
|
|
645
769
|
"bg-background-action-critical-secondary-normal border-border-action-critical-normal",
|
|
646
770
|
"hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
|
|
@@ -648,7 +772,7 @@ var Button = (_a) => {
|
|
|
648
772
|
"active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
|
|
649
773
|
"disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
|
|
650
774
|
);
|
|
651
|
-
const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0,
|
|
775
|
+
const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0, import_clsx7.default)(
|
|
652
776
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
|
|
653
777
|
"bg-transparent border-transparent text-text-action-critical-normal",
|
|
654
778
|
"hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
|
|
@@ -656,7 +780,7 @@ var Button = (_a) => {
|
|
|
656
780
|
"active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
|
|
657
781
|
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
|
|
658
782
|
);
|
|
659
|
-
const navigationVarianStyles = variant === "navigation" && (0,
|
|
783
|
+
const navigationVarianStyles = variant === "navigation" && (0, import_clsx7.default)(
|
|
660
784
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
661
785
|
"bg-transparent",
|
|
662
786
|
"hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover",
|
|
@@ -666,8 +790,8 @@ var Button = (_a) => {
|
|
|
666
790
|
"flex-col",
|
|
667
791
|
paddingUsingComponentGap
|
|
668
792
|
);
|
|
669
|
-
const notNavigationVariantStyles = variant !== "navigation" && (0,
|
|
670
|
-
const buttonClasses = (0,
|
|
793
|
+
const notNavigationVariantStyles = variant !== "navigation" && (0, import_clsx7.default)("border-2 flex-row", componentPaddingMinus2pxBorder, componentGap);
|
|
794
|
+
const buttonClasses = (0, import_clsx7.default)(
|
|
671
795
|
disabled ? "cursor-default" : "cursor-pointer",
|
|
672
796
|
block ? "w-full" : "w-fit",
|
|
673
797
|
baseTransition,
|
|
@@ -682,14 +806,14 @@ var Button = (_a) => {
|
|
|
682
806
|
notNavigationVariantStyles,
|
|
683
807
|
className
|
|
684
808
|
);
|
|
685
|
-
const labelClasses = (0,
|
|
809
|
+
const labelClasses = (0, import_clsx7.default)(
|
|
686
810
|
"min-h-6 flex items-center justify-center",
|
|
687
811
|
classNameLabel,
|
|
688
812
|
componentPaddingXUsingComponentGap,
|
|
689
813
|
typography.buttonLabel
|
|
690
814
|
);
|
|
691
815
|
const Element = href && !as ? "a" : as;
|
|
692
|
-
return /* @__PURE__ */ (0,
|
|
816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
693
817
|
Element,
|
|
694
818
|
__spreadProps(__spreadValues({
|
|
695
819
|
id,
|
|
@@ -703,7 +827,7 @@ var Button = (_a) => {
|
|
|
703
827
|
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
704
828
|
children: [
|
|
705
829
|
leftIcon && leftIcon,
|
|
706
|
-
!iconOnly && children && /* @__PURE__ */ (0,
|
|
830
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
707
831
|
rightIcon && rightIcon
|
|
708
832
|
]
|
|
709
833
|
})
|
|
@@ -712,7 +836,7 @@ var Button = (_a) => {
|
|
|
712
836
|
Button.displayName = "Button";
|
|
713
837
|
|
|
714
838
|
// src/components/NestedMenu.tsx
|
|
715
|
-
var
|
|
839
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
716
840
|
function NestedMenu(props) {
|
|
717
841
|
var _a;
|
|
718
842
|
const { onMenuClick, currentMenu, testid } = props;
|
|
@@ -758,13 +882,13 @@ function NestedMenu(props) {
|
|
|
758
882
|
item && __spreadValues(__spreadValues({}, item), !isPrevious && { previousMenu: currentMenu })
|
|
759
883
|
);
|
|
760
884
|
}
|
|
761
|
-
return /* @__PURE__ */ (0,
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
886
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
763
887
|
MenuOption,
|
|
764
888
|
{
|
|
765
889
|
testid: testid ? `${testid}-back` : void 0,
|
|
766
890
|
variant: "normal",
|
|
767
|
-
before: /* @__PURE__ */ (0,
|
|
891
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
768
892
|
Icon,
|
|
769
893
|
{
|
|
770
894
|
name: "chevron_left",
|
|
@@ -777,10 +901,10 @@ function NestedMenu(props) {
|
|
|
777
901
|
return handleMenuClick((_a2 = currentMenu.previousMenu) != null ? _a2 : null, true);
|
|
778
902
|
},
|
|
779
903
|
selected: selectedIndex === -1,
|
|
780
|
-
children: /* @__PURE__ */ (0,
|
|
904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label, { color: "text-action-normal", children: currentMenu.previousMenu ? currentMenu.previousMenu.label : "Main Menu" })
|
|
781
905
|
}
|
|
782
906
|
),
|
|
783
|
-
/* @__PURE__ */ (0,
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
784
908
|
MenuOption,
|
|
785
909
|
{
|
|
786
910
|
variant: "action",
|
|
@@ -790,13 +914,13 @@ function NestedMenu(props) {
|
|
|
790
914
|
),
|
|
791
915
|
(currentMenu.subEntries || []).map((item, idx) => {
|
|
792
916
|
var _a2;
|
|
793
|
-
return /* @__PURE__ */ (0,
|
|
917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
794
918
|
MenuOption,
|
|
795
919
|
{
|
|
796
920
|
testid: testid ? `${testid}-${item.label}` : void 0,
|
|
797
921
|
variant: "normal",
|
|
798
922
|
onClick: () => handleMenuClick(item),
|
|
799
|
-
after: ((_a2 = item.subEntries) == null ? void 0 : _a2.length) && /* @__PURE__ */ (0,
|
|
923
|
+
after: ((_a2 = item.subEntries) == null ? void 0 : _a2.length) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
800
924
|
Button,
|
|
801
925
|
{
|
|
802
926
|
iconOnly: true,
|
|
@@ -807,7 +931,7 @@ function NestedMenu(props) {
|
|
|
807
931
|
onMenuClick(item, "subEntry");
|
|
808
932
|
},
|
|
809
933
|
className: "!p-0 w-full justify-end",
|
|
810
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
934
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron_right", className: "icon", size: 24 })
|
|
811
935
|
}
|
|
812
936
|
),
|
|
813
937
|
selected: selectedIndex === idx,
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/components/SearchResultImage/index.tsx
|
|
38
|
+
var SearchResultImage_exports = {};
|
|
39
|
+
__export(SearchResultImage_exports, {
|
|
40
|
+
SearchResultImage: () => SearchResultImage
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(SearchResultImage_exports);
|
|
43
|
+
var import_react2 = require("react");
|
|
44
|
+
|
|
45
|
+
// src/components/ImagePlaceholder.tsx
|
|
46
|
+
var import_react = require("react");
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
function ImagePlaceholder(props) {
|
|
49
|
+
const clipId = (0, import_react.useId)();
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
51
|
+
"svg",
|
|
52
|
+
__spreadProps(__spreadValues({
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
width: 242,
|
|
55
|
+
height: 243,
|
|
56
|
+
fill: "none"
|
|
57
|
+
}, props), {
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { clipPath: `url(#${clipId})`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: props.width, height: props.width, fill: "#F7F7F7", rx: 2 }) }),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: props.width, height: props.width, fill: "#fff", rx: 2 }) }) })
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/components/SearchResultImage/index.tsx
|
|
67
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
68
|
+
function SearchResultImage({
|
|
69
|
+
width = 20,
|
|
70
|
+
height = 20,
|
|
71
|
+
src,
|
|
72
|
+
alt
|
|
73
|
+
}) {
|
|
74
|
+
const [imageError, setImageError] = (0, import_react2.useState)(false);
|
|
75
|
+
const showPlaceholder = imageError || !src;
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: showPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ImagePlaceholder, { width, height }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
77
|
+
"img",
|
|
78
|
+
{
|
|
79
|
+
src,
|
|
80
|
+
alt,
|
|
81
|
+
width,
|
|
82
|
+
height,
|
|
83
|
+
draggable: false,
|
|
84
|
+
loading: "lazy",
|
|
85
|
+
onError: () => setImageError(true)
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
88
|
+
}
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
SearchResultImage
|
|
92
|
+
});
|