@dmsi/wedgekit-react 0.0.498 → 0.0.500
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-3WCLGTYP.js → chunk-4LBQSSGH.js} +1 -1
- package/dist/{chunk-RQRR4FEF.js → chunk-5MLYAQQO.js} +1 -1
- package/dist/{chunk-44TH3VC7.js → chunk-G4AWTFBQ.js} +15 -6
- package/dist/{chunk-ZKTHUXKS.js → chunk-HIKWIY5Q.js} +1 -1
- package/dist/{chunk-HVNHTM3P.js → chunk-PIBHG6DH.js} +1 -1
- package/dist/{chunk-X67L3NZI.js → chunk-TOKS63IK.js} +5 -3
- package/dist/{chunk-7LKGHCVT.js → chunk-TWDH7ZDS.js} +5 -5
- package/dist/{chunk-G7KIKHER.js → chunk-X4UK7HE2.js} +4 -2
- package/dist/{chunk-4Q7T4GJ2.js → chunk-YD3HWIUJ.js} +1 -1
- package/dist/components/CalendarRange.cjs +20 -10
- package/dist/components/CalendarRange.js +9 -9
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +20 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +9 -9
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +20 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +9 -9
- package/dist/components/DataGrid/PinnedColumns.cjs +20 -10
- package/dist/components/DataGrid/PinnedColumns.js +9 -9
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +20 -10
- package/dist/components/DataGrid/TableBody/LoadingCell.js +9 -9
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +20 -10
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +9 -9
- package/dist/components/DataGrid/TableBody/index.cjs +20 -10
- package/dist/components/DataGrid/TableBody/index.js +9 -9
- package/dist/components/DataGrid/index.cjs +20 -10
- package/dist/components/DataGrid/index.js +9 -9
- package/dist/components/DataGrid/utils.cjs +20 -10
- package/dist/components/DataGrid/utils.js +9 -9
- package/dist/components/DataGridCell.cjs +12 -6
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DateInput.cjs +102 -92
- package/dist/components/DateInput.js +9 -9
- package/dist/components/DateRangeInput.cjs +102 -92
- package/dist/components/DateRangeInput.js +9 -9
- package/dist/components/FilterGroup.cjs +12 -6
- package/dist/components/FilterGroup.js +2 -2
- package/dist/components/Input.cjs +94 -35
- package/dist/components/Input.js +2 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +20 -10
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +9 -9
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +20 -10
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +9 -9
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +8 -4
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +3 -3
- package/dist/components/MobileDataGrid/index.cjs +20 -10
- package/dist/components/MobileDataGrid/index.js +9 -9
- package/dist/components/Modal.cjs +8 -4
- package/dist/components/Modal.js +2 -2
- package/dist/components/ModalHeader.cjs +4 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/PDFViewer/index.cjs +8 -4
- package/dist/components/PDFViewer/index.js +3 -3
- package/dist/components/Password.cjs +99 -40
- package/dist/components/Password.js +2 -1
- package/dist/components/Search.cjs +97 -38
- package/dist/components/Search.js +3 -2
- package/dist/components/Select.cjs +102 -43
- package/dist/components/Select.js +3 -2
- package/dist/components/Stepper.cjs +107 -48
- package/dist/components/Stepper.js +2 -1
- package/dist/components/Time.cjs +114 -55
- package/dist/components/Time.js +2 -1
- package/dist/components/index.cjs +20 -10
- package/dist/components/index.js +9 -9
- package/package.json +1 -1
- package/src/components/Input.tsx +10 -4
- package/src/components/Modal.tsx +3 -0
- package/src/components/ModalHeader.tsx +6 -2
|
@@ -344,7 +344,7 @@ Button.displayName = "Button";
|
|
|
344
344
|
|
|
345
345
|
// src/components/Input.tsx
|
|
346
346
|
var import_react = require("react");
|
|
347
|
-
var
|
|
347
|
+
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
348
348
|
|
|
349
349
|
// src/components/Label.tsx
|
|
350
350
|
var import_clsx3 = __toESM(require("clsx"), 1);
|
|
@@ -458,14 +458,68 @@ function formatCurrencyDisplay(value) {
|
|
|
458
458
|
return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
-
// src/components/
|
|
461
|
+
// src/components/Paragraph.tsx
|
|
462
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
462
463
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
464
|
+
var Paragraph = (_a) => {
|
|
465
|
+
var _b = _a, {
|
|
466
|
+
className,
|
|
467
|
+
color,
|
|
468
|
+
padded,
|
|
469
|
+
align = "left",
|
|
470
|
+
tall,
|
|
471
|
+
addOverflow,
|
|
472
|
+
children,
|
|
473
|
+
as = "p",
|
|
474
|
+
id,
|
|
475
|
+
testid
|
|
476
|
+
} = _b, props = __objRest(_b, [
|
|
477
|
+
"className",
|
|
478
|
+
"color",
|
|
479
|
+
"padded",
|
|
480
|
+
"align",
|
|
481
|
+
"tall",
|
|
482
|
+
"addOverflow",
|
|
483
|
+
"children",
|
|
484
|
+
"as",
|
|
485
|
+
"id",
|
|
486
|
+
"testid"
|
|
487
|
+
]);
|
|
488
|
+
const Element = as;
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
490
|
+
Element,
|
|
491
|
+
__spreadProps(__spreadValues({
|
|
492
|
+
id,
|
|
493
|
+
"data-testid": testid
|
|
494
|
+
}, props), {
|
|
495
|
+
className: (0, import_clsx5.default)(
|
|
496
|
+
typography.paragraph,
|
|
497
|
+
className,
|
|
498
|
+
padded && componentPaddingXUsingComponentGap,
|
|
499
|
+
align === "left" && "text-left",
|
|
500
|
+
align === "center" && "text-center",
|
|
501
|
+
align === "right" && "text-right",
|
|
502
|
+
tall && "!leading-6",
|
|
503
|
+
addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
|
|
504
|
+
),
|
|
505
|
+
style: __spreadProps(__spreadValues({}, props.style), {
|
|
506
|
+
color: color ? `var(--color-${color})` : void 0
|
|
507
|
+
}),
|
|
508
|
+
children
|
|
509
|
+
})
|
|
510
|
+
);
|
|
511
|
+
};
|
|
512
|
+
Paragraph.displayName = "Paragraph";
|
|
513
|
+
|
|
514
|
+
// src/components/Input.tsx
|
|
515
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
463
516
|
var InputBase = (_a) => {
|
|
464
517
|
var _b = _a, {
|
|
465
518
|
id,
|
|
466
519
|
testid,
|
|
467
520
|
before,
|
|
468
521
|
after,
|
|
522
|
+
rightAdornment,
|
|
469
523
|
type,
|
|
470
524
|
label,
|
|
471
525
|
error,
|
|
@@ -489,6 +543,7 @@ var InputBase = (_a) => {
|
|
|
489
543
|
"testid",
|
|
490
544
|
"before",
|
|
491
545
|
"after",
|
|
546
|
+
"rightAdornment",
|
|
492
547
|
"type",
|
|
493
548
|
"label",
|
|
494
549
|
"error",
|
|
@@ -527,7 +582,7 @@ var InputBase = (_a) => {
|
|
|
527
582
|
};
|
|
528
583
|
}
|
|
529
584
|
}, [selectOnFocus]);
|
|
530
|
-
const inputBaseClass = (0,
|
|
585
|
+
const inputBaseClass = (0, import_clsx6.default)(
|
|
531
586
|
fullWidth ? "w-full" : "w-fit",
|
|
532
587
|
"flex flex-row items-center",
|
|
533
588
|
"bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
|
|
@@ -540,26 +595,26 @@ var InputBase = (_a) => {
|
|
|
540
595
|
!removeBorder && "border border-border-primary-normal",
|
|
541
596
|
"relative"
|
|
542
597
|
);
|
|
543
|
-
const inputFocusClass = (0,
|
|
598
|
+
const inputFocusClass = (0, import_clsx6.default)(
|
|
544
599
|
"has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
|
|
545
600
|
);
|
|
546
|
-
const inputDisabledClass = (0,
|
|
601
|
+
const inputDisabledClass = (0, import_clsx6.default)(
|
|
547
602
|
"has-disabled:bg-background-action-secondary-disabled"
|
|
548
603
|
);
|
|
549
|
-
const inputReadOnlyClass = (0,
|
|
604
|
+
const inputReadOnlyClass = (0, import_clsx6.default)(
|
|
550
605
|
"has-[input:not(:disabled):read-only]:outline-none has-[input:not(:disabled):read-only]:bg-transparent has-[input:not(:disabled):read-only]:border-transparent has-[input:not(:disabled):read-only]:pl-0"
|
|
551
606
|
);
|
|
552
|
-
const inputInvalidClass = (0,
|
|
607
|
+
const inputInvalidClass = (0, import_clsx6.default)(
|
|
553
608
|
"has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
|
|
554
609
|
);
|
|
555
|
-
return /* @__PURE__ */ (0,
|
|
610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
556
611
|
"label",
|
|
557
612
|
{
|
|
558
613
|
id,
|
|
559
614
|
"data-testid": testid,
|
|
560
615
|
htmlFor: inputId,
|
|
561
616
|
ref: inputContainerRef,
|
|
562
|
-
className: (0,
|
|
617
|
+
className: (0, import_clsx6.default)(
|
|
563
618
|
"w-full flex flex-col",
|
|
564
619
|
"block",
|
|
565
620
|
"text-text-primary-normal has-disabled:text-text-primary-disabled",
|
|
@@ -567,30 +622,30 @@ var InputBase = (_a) => {
|
|
|
567
622
|
),
|
|
568
623
|
style: __spreadValues({}, props.style),
|
|
569
624
|
children: [
|
|
570
|
-
label && /* @__PURE__ */ (0,
|
|
571
|
-
/* @__PURE__ */ (0,
|
|
625
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx6.default)("flex items-center", componentGap), children: [
|
|
626
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
572
627
|
Label,
|
|
573
628
|
{
|
|
574
629
|
id: id ? `${id}-label` : void 0,
|
|
575
630
|
color: error ? "text-primary-error" : void 0,
|
|
576
|
-
className: (0,
|
|
631
|
+
className: (0, import_clsx6.default)(
|
|
577
632
|
props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
|
|
578
633
|
),
|
|
579
634
|
children: label
|
|
580
635
|
}
|
|
581
636
|
),
|
|
582
|
-
required && /* @__PURE__ */ (0,
|
|
637
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
583
638
|
"span",
|
|
584
639
|
{
|
|
585
|
-
className: (0,
|
|
640
|
+
className: (0, import_clsx6.default)(typography.label, "text-text-critical-normal"),
|
|
586
641
|
children: "*"
|
|
587
642
|
}
|
|
588
643
|
)
|
|
589
644
|
] }),
|
|
590
|
-
/* @__PURE__ */ (0,
|
|
645
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
591
646
|
"div",
|
|
592
647
|
{
|
|
593
|
-
className: (0,
|
|
648
|
+
className: (0, import_clsx6.default)(
|
|
594
649
|
inputBaseClass,
|
|
595
650
|
!props.disabled && inputInvalidClass,
|
|
596
651
|
inputFocusClass,
|
|
@@ -605,7 +660,7 @@ var InputBase = (_a) => {
|
|
|
605
660
|
},
|
|
606
661
|
children: [
|
|
607
662
|
before,
|
|
608
|
-
/* @__PURE__ */ (0,
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
609
664
|
"input",
|
|
610
665
|
__spreadProps(__spreadValues(__spreadValues({
|
|
611
666
|
ref: (el) => {
|
|
@@ -616,7 +671,7 @@ var InputBase = (_a) => {
|
|
|
616
671
|
}, props), attributes), {
|
|
617
672
|
id: inputId,
|
|
618
673
|
"data-testid": testid ? `${testid}-input` : void 0,
|
|
619
|
-
className: (0,
|
|
674
|
+
className: (0, import_clsx6.default)(
|
|
620
675
|
"flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
|
|
621
676
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
622
677
|
"placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
|
|
@@ -630,11 +685,12 @@ var InputBase = (_a) => {
|
|
|
630
685
|
style: __spreadProps(__spreadValues({}, props.style), { width })
|
|
631
686
|
})
|
|
632
687
|
),
|
|
633
|
-
secondaryIconColor ? /* @__PURE__ */ (0,
|
|
688
|
+
secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after,
|
|
689
|
+
rightAdornment
|
|
634
690
|
]
|
|
635
691
|
}
|
|
636
692
|
),
|
|
637
|
-
caption && /* @__PURE__ */ (0,
|
|
693
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
638
694
|
"div",
|
|
639
695
|
{
|
|
640
696
|
id: id ? `${id}-caption` : void 0,
|
|
@@ -657,7 +713,8 @@ var Input = (_a) => {
|
|
|
657
713
|
onBlur,
|
|
658
714
|
onClear,
|
|
659
715
|
id,
|
|
660
|
-
testid
|
|
716
|
+
testid,
|
|
717
|
+
rightAdornment
|
|
661
718
|
} = _b, props = __objRest(_b, [
|
|
662
719
|
"variant",
|
|
663
720
|
"decimals",
|
|
@@ -668,7 +725,8 @@ var Input = (_a) => {
|
|
|
668
725
|
"onBlur",
|
|
669
726
|
"onClear",
|
|
670
727
|
"id",
|
|
671
|
-
"testid"
|
|
728
|
+
"testid",
|
|
729
|
+
"rightAdornment"
|
|
672
730
|
]);
|
|
673
731
|
const [internalValue, setInternalValue] = (0, import_react.useState)("");
|
|
674
732
|
const [displayValue, setDisplayValue] = (0, import_react.useState)("");
|
|
@@ -690,7 +748,7 @@ var Input = (_a) => {
|
|
|
690
748
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
691
749
|
setInternalValue(formatted);
|
|
692
750
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
693
|
-
}, []);
|
|
751
|
+
}, [variant, propValue, decimals]);
|
|
694
752
|
const getInputProps = () => {
|
|
695
753
|
var _a2;
|
|
696
754
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -727,9 +785,9 @@ var Input = (_a) => {
|
|
|
727
785
|
if (props.before) return props.before;
|
|
728
786
|
switch (variant) {
|
|
729
787
|
case "search":
|
|
730
|
-
return !removeSearchIcon ? /* @__PURE__ */ (0,
|
|
788
|
+
return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "search" }) }) : null;
|
|
731
789
|
case "currency":
|
|
732
|
-
return /* @__PURE__ */ (0,
|
|
790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "attach_money" }) });
|
|
733
791
|
default:
|
|
734
792
|
return null;
|
|
735
793
|
}
|
|
@@ -739,7 +797,7 @@ var Input = (_a) => {
|
|
|
739
797
|
switch (variant) {
|
|
740
798
|
case "search": {
|
|
741
799
|
const hasValue = displayValue.length > 0;
|
|
742
|
-
return hasValue && !props.readOnly ? /* @__PURE__ */ (0,
|
|
800
|
+
return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
743
801
|
Icon,
|
|
744
802
|
{
|
|
745
803
|
id: id ? `${id}-clear-button` : void 0,
|
|
@@ -751,11 +809,11 @@ var Input = (_a) => {
|
|
|
751
809
|
) : null;
|
|
752
810
|
}
|
|
753
811
|
case "finder":
|
|
754
|
-
return /* @__PURE__ */ (0,
|
|
812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "search" });
|
|
755
813
|
case "uom":
|
|
756
|
-
return uom ? /* @__PURE__ */ (0,
|
|
814
|
+
return uom ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Paragraph, { color: "text-secondary-normal", children: uom.toUpperCase() }) : null;
|
|
757
815
|
case "percentage":
|
|
758
|
-
return /* @__PURE__ */ (0,
|
|
816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "percent" }) });
|
|
759
817
|
default:
|
|
760
818
|
return null;
|
|
761
819
|
}
|
|
@@ -832,27 +890,28 @@ var Input = (_a) => {
|
|
|
832
890
|
onBlur == null ? void 0 : onBlur(e);
|
|
833
891
|
};
|
|
834
892
|
const inputProps = getInputProps();
|
|
835
|
-
return /* @__PURE__ */ (0,
|
|
893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
836
894
|
InputBase,
|
|
837
895
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
838
896
|
before: getBeforeElement(),
|
|
839
897
|
after: getAfterElement(),
|
|
840
898
|
onChange: handleChange,
|
|
841
899
|
onBlur: handleBlur,
|
|
842
|
-
testid
|
|
900
|
+
testid,
|
|
901
|
+
rightAdornment
|
|
843
902
|
})
|
|
844
903
|
);
|
|
845
904
|
};
|
|
846
905
|
Input.displayName = "Input";
|
|
847
|
-
var Finder = (props) => /* @__PURE__ */ (0,
|
|
848
|
-
var UOM = (props) => /* @__PURE__ */ (0,
|
|
906
|
+
var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
|
|
907
|
+
var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
|
|
849
908
|
var Currency = (props) => {
|
|
850
909
|
var _a;
|
|
851
910
|
const handleCurrencyChange = (e) => {
|
|
852
911
|
var _a2;
|
|
853
912
|
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
|
|
854
913
|
};
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
856
915
|
Input,
|
|
857
916
|
__spreadProps(__spreadValues({}, props), {
|
|
858
917
|
variant: "currency",
|
|
@@ -861,15 +920,15 @@ var Currency = (props) => {
|
|
|
861
920
|
})
|
|
862
921
|
);
|
|
863
922
|
};
|
|
864
|
-
var Percentage = (props) => /* @__PURE__ */ (0,
|
|
923
|
+
var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
|
|
865
924
|
Finder.displayName = "Finder";
|
|
866
925
|
UOM.displayName = "UOM";
|
|
867
926
|
Currency.displayName = "Currency";
|
|
868
927
|
Percentage.displayName = "Percentage";
|
|
869
928
|
|
|
870
929
|
// src/components/Stepper.tsx
|
|
871
|
-
var
|
|
872
|
-
var
|
|
930
|
+
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
931
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
873
932
|
var Stepper = (_a) => {
|
|
874
933
|
var _b = _a, {
|
|
875
934
|
error,
|
|
@@ -898,36 +957,36 @@ var Stepper = (_a) => {
|
|
|
898
957
|
setValue((prevVal) => prevVal - 1);
|
|
899
958
|
onDecrease == null ? void 0 : onDecrease();
|
|
900
959
|
}
|
|
901
|
-
return /* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
902
961
|
"div",
|
|
903
962
|
{
|
|
904
963
|
id,
|
|
905
964
|
"data-testid": testid,
|
|
906
|
-
className: (0,
|
|
965
|
+
className: (0, import_clsx7.default)("flex items-center", componentGap),
|
|
907
966
|
children: [
|
|
908
|
-
/* @__PURE__ */ (0,
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
909
968
|
Button,
|
|
910
969
|
{
|
|
911
970
|
id: id ? `${id}-decrease-button` : void 0,
|
|
912
971
|
testid: testid ? `${testid}-decrease-button` : void 0,
|
|
913
972
|
iconOnly: true,
|
|
914
973
|
variant: "tertiary",
|
|
915
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
974
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
916
975
|
"span",
|
|
917
976
|
{
|
|
918
|
-
className: (0,
|
|
977
|
+
className: (0, import_clsx7.default)(
|
|
919
978
|
!disabled || value > 0 && "text-icon-action-primary-normal",
|
|
920
979
|
disabled || value === 0 && "text-icon-action-primary-disabled",
|
|
921
980
|
"contents"
|
|
922
981
|
),
|
|
923
|
-
children: /* @__PURE__ */ (0,
|
|
982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "remove" })
|
|
924
983
|
}
|
|
925
984
|
),
|
|
926
985
|
onClick: handleDecrease,
|
|
927
986
|
disabled: disabled || value === 0
|
|
928
987
|
}
|
|
929
988
|
),
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
931
990
|
InputBase,
|
|
932
991
|
__spreadProps(__spreadValues({}, props), {
|
|
933
992
|
id: id ? `${id}-input` : void 0,
|
|
@@ -941,22 +1000,22 @@ var Stepper = (_a) => {
|
|
|
941
1000
|
className: "!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
|
|
942
1001
|
})
|
|
943
1002
|
) }),
|
|
944
|
-
/* @__PURE__ */ (0,
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
945
1004
|
Button,
|
|
946
1005
|
{
|
|
947
1006
|
id: id ? `${id}-increase-button` : void 0,
|
|
948
1007
|
testid: testid ? `${testid}-increase-button` : void 0,
|
|
949
1008
|
iconOnly: true,
|
|
950
1009
|
variant: "tertiary",
|
|
951
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
1010
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
952
1011
|
"span",
|
|
953
1012
|
{
|
|
954
|
-
className: (0,
|
|
1013
|
+
className: (0, import_clsx7.default)(
|
|
955
1014
|
!disabled && "text-icon-action-primary-normal",
|
|
956
1015
|
disabled && "text-icon-action-primary-disabled",
|
|
957
1016
|
"contents"
|
|
958
1017
|
),
|
|
959
|
-
children: /* @__PURE__ */ (0,
|
|
1018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "add" })
|
|
960
1019
|
}
|
|
961
1020
|
),
|
|
962
1021
|
onClick: handleIncrease,
|