@dmsi/wedgekit-react 0.0.498 → 0.0.499
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
|
@@ -67,7 +67,7 @@ var import_react_dom5 = require("react-dom");
|
|
|
67
67
|
|
|
68
68
|
// src/components/Input.tsx
|
|
69
69
|
var import_react = require("react");
|
|
70
|
-
var
|
|
70
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
71
71
|
|
|
72
72
|
// src/classNames.ts
|
|
73
73
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -318,14 +318,68 @@ function formatCurrencyDisplay(value) {
|
|
|
318
318
|
return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
// src/components/
|
|
321
|
+
// src/components/Paragraph.tsx
|
|
322
|
+
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
322
323
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
324
|
+
var Paragraph = (_a) => {
|
|
325
|
+
var _b = _a, {
|
|
326
|
+
className,
|
|
327
|
+
color,
|
|
328
|
+
padded,
|
|
329
|
+
align = "left",
|
|
330
|
+
tall,
|
|
331
|
+
addOverflow,
|
|
332
|
+
children,
|
|
333
|
+
as = "p",
|
|
334
|
+
id,
|
|
335
|
+
testid
|
|
336
|
+
} = _b, props = __objRest(_b, [
|
|
337
|
+
"className",
|
|
338
|
+
"color",
|
|
339
|
+
"padded",
|
|
340
|
+
"align",
|
|
341
|
+
"tall",
|
|
342
|
+
"addOverflow",
|
|
343
|
+
"children",
|
|
344
|
+
"as",
|
|
345
|
+
"id",
|
|
346
|
+
"testid"
|
|
347
|
+
]);
|
|
348
|
+
const Element = as;
|
|
349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
350
|
+
Element,
|
|
351
|
+
__spreadProps(__spreadValues({
|
|
352
|
+
id,
|
|
353
|
+
"data-testid": testid
|
|
354
|
+
}, props), {
|
|
355
|
+
className: (0, import_clsx4.default)(
|
|
356
|
+
typography.paragraph,
|
|
357
|
+
className,
|
|
358
|
+
padded && componentPaddingXUsingComponentGap,
|
|
359
|
+
align === "left" && "text-left",
|
|
360
|
+
align === "center" && "text-center",
|
|
361
|
+
align === "right" && "text-right",
|
|
362
|
+
tall && "!leading-6",
|
|
363
|
+
addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
|
|
364
|
+
),
|
|
365
|
+
style: __spreadProps(__spreadValues({}, props.style), {
|
|
366
|
+
color: color ? `var(--color-${color})` : void 0
|
|
367
|
+
}),
|
|
368
|
+
children
|
|
369
|
+
})
|
|
370
|
+
);
|
|
371
|
+
};
|
|
372
|
+
Paragraph.displayName = "Paragraph";
|
|
373
|
+
|
|
374
|
+
// src/components/Input.tsx
|
|
375
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
323
376
|
var InputBase = (_a) => {
|
|
324
377
|
var _b = _a, {
|
|
325
378
|
id,
|
|
326
379
|
testid,
|
|
327
380
|
before,
|
|
328
381
|
after,
|
|
382
|
+
rightAdornment,
|
|
329
383
|
type,
|
|
330
384
|
label,
|
|
331
385
|
error,
|
|
@@ -349,6 +403,7 @@ var InputBase = (_a) => {
|
|
|
349
403
|
"testid",
|
|
350
404
|
"before",
|
|
351
405
|
"after",
|
|
406
|
+
"rightAdornment",
|
|
352
407
|
"type",
|
|
353
408
|
"label",
|
|
354
409
|
"error",
|
|
@@ -387,7 +442,7 @@ var InputBase = (_a) => {
|
|
|
387
442
|
};
|
|
388
443
|
}
|
|
389
444
|
}, [selectOnFocus]);
|
|
390
|
-
const inputBaseClass = (0,
|
|
445
|
+
const inputBaseClass = (0, import_clsx5.default)(
|
|
391
446
|
fullWidth ? "w-full" : "w-fit",
|
|
392
447
|
"flex flex-row items-center",
|
|
393
448
|
"bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
|
|
@@ -400,26 +455,26 @@ var InputBase = (_a) => {
|
|
|
400
455
|
!removeBorder && "border border-border-primary-normal",
|
|
401
456
|
"relative"
|
|
402
457
|
);
|
|
403
|
-
const inputFocusClass = (0,
|
|
458
|
+
const inputFocusClass = (0, import_clsx5.default)(
|
|
404
459
|
"has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
|
|
405
460
|
);
|
|
406
|
-
const inputDisabledClass = (0,
|
|
461
|
+
const inputDisabledClass = (0, import_clsx5.default)(
|
|
407
462
|
"has-disabled:bg-background-action-secondary-disabled"
|
|
408
463
|
);
|
|
409
|
-
const inputReadOnlyClass = (0,
|
|
464
|
+
const inputReadOnlyClass = (0, import_clsx5.default)(
|
|
410
465
|
"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"
|
|
411
466
|
);
|
|
412
|
-
const inputInvalidClass = (0,
|
|
467
|
+
const inputInvalidClass = (0, import_clsx5.default)(
|
|
413
468
|
"has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
|
|
414
469
|
);
|
|
415
|
-
return /* @__PURE__ */ (0,
|
|
470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
416
471
|
"label",
|
|
417
472
|
{
|
|
418
473
|
id,
|
|
419
474
|
"data-testid": testid,
|
|
420
475
|
htmlFor: inputId,
|
|
421
476
|
ref: inputContainerRef,
|
|
422
|
-
className: (0,
|
|
477
|
+
className: (0, import_clsx5.default)(
|
|
423
478
|
"w-full flex flex-col",
|
|
424
479
|
"block",
|
|
425
480
|
"text-text-primary-normal has-disabled:text-text-primary-disabled",
|
|
@@ -427,30 +482,30 @@ var InputBase = (_a) => {
|
|
|
427
482
|
),
|
|
428
483
|
style: __spreadValues({}, props.style),
|
|
429
484
|
children: [
|
|
430
|
-
label && /* @__PURE__ */ (0,
|
|
431
|
-
/* @__PURE__ */ (0,
|
|
485
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx5.default)("flex items-center", componentGap), children: [
|
|
486
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
432
487
|
Label,
|
|
433
488
|
{
|
|
434
489
|
id: id ? `${id}-label` : void 0,
|
|
435
490
|
color: error ? "text-primary-error" : void 0,
|
|
436
|
-
className: (0,
|
|
491
|
+
className: (0, import_clsx5.default)(
|
|
437
492
|
props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
|
|
438
493
|
),
|
|
439
494
|
children: label
|
|
440
495
|
}
|
|
441
496
|
),
|
|
442
|
-
required && /* @__PURE__ */ (0,
|
|
497
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
443
498
|
"span",
|
|
444
499
|
{
|
|
445
|
-
className: (0,
|
|
500
|
+
className: (0, import_clsx5.default)(typography.label, "text-text-critical-normal"),
|
|
446
501
|
children: "*"
|
|
447
502
|
}
|
|
448
503
|
)
|
|
449
504
|
] }),
|
|
450
|
-
/* @__PURE__ */ (0,
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
451
506
|
"div",
|
|
452
507
|
{
|
|
453
|
-
className: (0,
|
|
508
|
+
className: (0, import_clsx5.default)(
|
|
454
509
|
inputBaseClass,
|
|
455
510
|
!props.disabled && inputInvalidClass,
|
|
456
511
|
inputFocusClass,
|
|
@@ -465,7 +520,7 @@ var InputBase = (_a) => {
|
|
|
465
520
|
},
|
|
466
521
|
children: [
|
|
467
522
|
before,
|
|
468
|
-
/* @__PURE__ */ (0,
|
|
523
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
469
524
|
"input",
|
|
470
525
|
__spreadProps(__spreadValues(__spreadValues({
|
|
471
526
|
ref: (el) => {
|
|
@@ -476,7 +531,7 @@ var InputBase = (_a) => {
|
|
|
476
531
|
}, props), attributes), {
|
|
477
532
|
id: inputId,
|
|
478
533
|
"data-testid": testid ? `${testid}-input` : void 0,
|
|
479
|
-
className: (0,
|
|
534
|
+
className: (0, import_clsx5.default)(
|
|
480
535
|
"flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
|
|
481
536
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
482
537
|
"placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
|
|
@@ -490,11 +545,12 @@ var InputBase = (_a) => {
|
|
|
490
545
|
style: __spreadProps(__spreadValues({}, props.style), { width })
|
|
491
546
|
})
|
|
492
547
|
),
|
|
493
|
-
secondaryIconColor ? /* @__PURE__ */ (0,
|
|
548
|
+
secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after,
|
|
549
|
+
rightAdornment
|
|
494
550
|
]
|
|
495
551
|
}
|
|
496
552
|
),
|
|
497
|
-
caption && /* @__PURE__ */ (0,
|
|
553
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
498
554
|
"div",
|
|
499
555
|
{
|
|
500
556
|
id: id ? `${id}-caption` : void 0,
|
|
@@ -517,7 +573,8 @@ var Input = (_a) => {
|
|
|
517
573
|
onBlur,
|
|
518
574
|
onClear,
|
|
519
575
|
id,
|
|
520
|
-
testid
|
|
576
|
+
testid,
|
|
577
|
+
rightAdornment
|
|
521
578
|
} = _b, props = __objRest(_b, [
|
|
522
579
|
"variant",
|
|
523
580
|
"decimals",
|
|
@@ -528,7 +585,8 @@ var Input = (_a) => {
|
|
|
528
585
|
"onBlur",
|
|
529
586
|
"onClear",
|
|
530
587
|
"id",
|
|
531
|
-
"testid"
|
|
588
|
+
"testid",
|
|
589
|
+
"rightAdornment"
|
|
532
590
|
]);
|
|
533
591
|
const [internalValue, setInternalValue] = (0, import_react.useState)("");
|
|
534
592
|
const [displayValue, setDisplayValue] = (0, import_react.useState)("");
|
|
@@ -550,7 +608,7 @@ var Input = (_a) => {
|
|
|
550
608
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
551
609
|
setInternalValue(formatted);
|
|
552
610
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
553
|
-
}, []);
|
|
611
|
+
}, [variant, propValue, decimals]);
|
|
554
612
|
const getInputProps = () => {
|
|
555
613
|
var _a2;
|
|
556
614
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -587,9 +645,9 @@ var Input = (_a) => {
|
|
|
587
645
|
if (props.before) return props.before;
|
|
588
646
|
switch (variant) {
|
|
589
647
|
case "search":
|
|
590
|
-
return !removeSearchIcon ? /* @__PURE__ */ (0,
|
|
648
|
+
return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "search" }) }) : null;
|
|
591
649
|
case "currency":
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "attach_money" }) });
|
|
593
651
|
default:
|
|
594
652
|
return null;
|
|
595
653
|
}
|
|
@@ -599,7 +657,7 @@ var Input = (_a) => {
|
|
|
599
657
|
switch (variant) {
|
|
600
658
|
case "search": {
|
|
601
659
|
const hasValue = displayValue.length > 0;
|
|
602
|
-
return hasValue && !props.readOnly ? /* @__PURE__ */ (0,
|
|
660
|
+
return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
603
661
|
Icon,
|
|
604
662
|
{
|
|
605
663
|
id: id ? `${id}-clear-button` : void 0,
|
|
@@ -611,11 +669,11 @@ var Input = (_a) => {
|
|
|
611
669
|
) : null;
|
|
612
670
|
}
|
|
613
671
|
case "finder":
|
|
614
|
-
return /* @__PURE__ */ (0,
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "search" });
|
|
615
673
|
case "uom":
|
|
616
|
-
return uom ? /* @__PURE__ */ (0,
|
|
674
|
+
return uom ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { color: "text-secondary-normal", children: uom.toUpperCase() }) : null;
|
|
617
675
|
case "percentage":
|
|
618
|
-
return /* @__PURE__ */ (0,
|
|
676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "percent" }) });
|
|
619
677
|
default:
|
|
620
678
|
return null;
|
|
621
679
|
}
|
|
@@ -692,27 +750,28 @@ var Input = (_a) => {
|
|
|
692
750
|
onBlur == null ? void 0 : onBlur(e);
|
|
693
751
|
};
|
|
694
752
|
const inputProps = getInputProps();
|
|
695
|
-
return /* @__PURE__ */ (0,
|
|
753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
696
754
|
InputBase,
|
|
697
755
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
698
756
|
before: getBeforeElement(),
|
|
699
757
|
after: getAfterElement(),
|
|
700
758
|
onChange: handleChange,
|
|
701
759
|
onBlur: handleBlur,
|
|
702
|
-
testid
|
|
760
|
+
testid,
|
|
761
|
+
rightAdornment
|
|
703
762
|
})
|
|
704
763
|
);
|
|
705
764
|
};
|
|
706
765
|
Input.displayName = "Input";
|
|
707
|
-
var Finder = (props) => /* @__PURE__ */ (0,
|
|
708
|
-
var UOM = (props) => /* @__PURE__ */ (0,
|
|
766
|
+
var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
|
|
767
|
+
var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
|
|
709
768
|
var Currency = (props) => {
|
|
710
769
|
var _a;
|
|
711
770
|
const handleCurrencyChange = (e) => {
|
|
712
771
|
var _a2;
|
|
713
772
|
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
|
|
714
773
|
};
|
|
715
|
-
return /* @__PURE__ */ (0,
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
716
775
|
Input,
|
|
717
776
|
__spreadProps(__spreadValues({}, props), {
|
|
718
777
|
variant: "currency",
|
|
@@ -721,7 +780,7 @@ var Currency = (props) => {
|
|
|
721
780
|
})
|
|
722
781
|
);
|
|
723
782
|
};
|
|
724
|
-
var Percentage = (props) => /* @__PURE__ */ (0,
|
|
783
|
+
var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
|
|
725
784
|
Finder.displayName = "Finder";
|
|
726
785
|
UOM.displayName = "UOM";
|
|
727
786
|
Currency.displayName = "Currency";
|
|
@@ -791,59 +850,6 @@ var import_react11 = require("react");
|
|
|
791
850
|
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
792
851
|
var import_react7 = require("react");
|
|
793
852
|
|
|
794
|
-
// src/components/Paragraph.tsx
|
|
795
|
-
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
796
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
797
|
-
var Paragraph = (_a) => {
|
|
798
|
-
var _b = _a, {
|
|
799
|
-
className,
|
|
800
|
-
color,
|
|
801
|
-
padded,
|
|
802
|
-
align = "left",
|
|
803
|
-
tall,
|
|
804
|
-
addOverflow,
|
|
805
|
-
children,
|
|
806
|
-
as = "p",
|
|
807
|
-
id,
|
|
808
|
-
testid
|
|
809
|
-
} = _b, props = __objRest(_b, [
|
|
810
|
-
"className",
|
|
811
|
-
"color",
|
|
812
|
-
"padded",
|
|
813
|
-
"align",
|
|
814
|
-
"tall",
|
|
815
|
-
"addOverflow",
|
|
816
|
-
"children",
|
|
817
|
-
"as",
|
|
818
|
-
"id",
|
|
819
|
-
"testid"
|
|
820
|
-
]);
|
|
821
|
-
const Element = as;
|
|
822
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
823
|
-
Element,
|
|
824
|
-
__spreadProps(__spreadValues({
|
|
825
|
-
id,
|
|
826
|
-
"data-testid": testid
|
|
827
|
-
}, props), {
|
|
828
|
-
className: (0, import_clsx5.default)(
|
|
829
|
-
typography.paragraph,
|
|
830
|
-
className,
|
|
831
|
-
padded && componentPaddingXUsingComponentGap,
|
|
832
|
-
align === "left" && "text-left",
|
|
833
|
-
align === "center" && "text-center",
|
|
834
|
-
align === "right" && "text-right",
|
|
835
|
-
tall && "!leading-6",
|
|
836
|
-
addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
|
|
837
|
-
),
|
|
838
|
-
style: __spreadProps(__spreadValues({}, props.style), {
|
|
839
|
-
color: color ? `var(--color-${color})` : void 0
|
|
840
|
-
}),
|
|
841
|
-
children
|
|
842
|
-
})
|
|
843
|
-
);
|
|
844
|
-
};
|
|
845
|
-
Paragraph.displayName = "Paragraph";
|
|
846
|
-
|
|
847
853
|
// src/hooks/useKeydown.ts
|
|
848
854
|
var import_react3 = require("react");
|
|
849
855
|
|
|
@@ -4600,8 +4606,10 @@ var ModalHeader = ({
|
|
|
4600
4606
|
onClose,
|
|
4601
4607
|
id,
|
|
4602
4608
|
testid,
|
|
4603
|
-
headerClassname
|
|
4609
|
+
headerClassname,
|
|
4610
|
+
titleAs: TitleComponent
|
|
4604
4611
|
}) => {
|
|
4612
|
+
const Title = TitleComponent || Heading2;
|
|
4605
4613
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4606
4614
|
"div",
|
|
4607
4615
|
{
|
|
@@ -4620,7 +4628,7 @@ var ModalHeader = ({
|
|
|
4620
4628
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_clsx24.default)("flex items-center flex-1", layoutGroupGap), children: [
|
|
4621
4629
|
headerIcon,
|
|
4622
4630
|
title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4623
|
-
|
|
4631
|
+
Title,
|
|
4624
4632
|
{
|
|
4625
4633
|
id: id ? `${id}-title` : void 0,
|
|
4626
4634
|
testid: testid ? `${testid}-title` : void 0,
|
|
@@ -4850,7 +4858,8 @@ var Modal = ({
|
|
|
4850
4858
|
customActions,
|
|
4851
4859
|
headerClassname,
|
|
4852
4860
|
customFooter,
|
|
4853
|
-
noWrapper
|
|
4861
|
+
noWrapper,
|
|
4862
|
+
titleAs: TitleComponent
|
|
4854
4863
|
}) => {
|
|
4855
4864
|
var _a;
|
|
4856
4865
|
const mounted = useMounted();
|
|
@@ -4976,7 +4985,8 @@ var Modal = ({
|
|
|
4976
4985
|
hideCloseIcon,
|
|
4977
4986
|
headerIcon,
|
|
4978
4987
|
headerIconAlign,
|
|
4979
|
-
headerClassname
|
|
4988
|
+
headerClassname,
|
|
4989
|
+
titleAs: TitleComponent
|
|
4980
4990
|
}
|
|
4981
4991
|
),
|
|
4982
4992
|
children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TWDH7ZDS.js";
|
|
4
4
|
import "../chunk-M7INAUAJ.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-YD3HWIUJ.js";
|
|
6
6
|
import "../chunk-3DEYCNUE.js";
|
|
7
7
|
import "../chunk-XHQOTLG6.js";
|
|
8
8
|
import "../chunk-BQNPOGD5.js";
|
|
9
9
|
import "../chunk-Y5GD2FJA.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-4LBQSSGH.js";
|
|
11
11
|
import "../chunk-YEZBNQZI.js";
|
|
12
12
|
import "../chunk-B53XDCLO.js";
|
|
13
13
|
import "../chunk-S5ZJ3Q7P.js";
|
|
@@ -28,25 +28,25 @@ import "../chunk-7BVUTFZ5.js";
|
|
|
28
28
|
import "../chunk-L3BXRDLP.js";
|
|
29
29
|
import "../chunk-34VEVX5H.js";
|
|
30
30
|
import "../chunk-GRGDX7JC.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-PIBHG6DH.js";
|
|
32
|
+
import "../chunk-TOKS63IK.js";
|
|
33
33
|
import "../chunk-4RJKB7LC.js";
|
|
34
34
|
import "../chunk-FG7GNGE3.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-X4UK7HE2.js";
|
|
36
36
|
import "../chunk-AG43RS4Q.js";
|
|
37
37
|
import "../chunk-ZQJMNPCF.js";
|
|
38
38
|
import "../chunk-6TYWM26K.js";
|
|
39
39
|
import "../chunk-SBRRNFOP.js";
|
|
40
40
|
import "../chunk-Y2GK27RX.js";
|
|
41
41
|
import "../chunk-QVWYTQKL.js";
|
|
42
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-HIKWIY5Q.js";
|
|
43
43
|
import "../chunk-TCMOGTPB.js";
|
|
44
44
|
import "../chunk-DVU5XV7L.js";
|
|
45
45
|
import "../chunk-5R4C5F63.js";
|
|
46
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-5MLYAQQO.js";
|
|
47
47
|
import {
|
|
48
48
|
InputBase
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-G4AWTFBQ.js";
|
|
50
50
|
import "../chunk-AL5QIRY3.js";
|
|
51
51
|
import "../chunk-WVUIIBRR.js";
|
|
52
52
|
import "../chunk-75USUR3I.js";
|
|
@@ -855,6 +855,7 @@ var InputBase = (_a) => {
|
|
|
855
855
|
testid,
|
|
856
856
|
before,
|
|
857
857
|
after,
|
|
858
|
+
rightAdornment,
|
|
858
859
|
type,
|
|
859
860
|
label,
|
|
860
861
|
error,
|
|
@@ -878,6 +879,7 @@ var InputBase = (_a) => {
|
|
|
878
879
|
"testid",
|
|
879
880
|
"before",
|
|
880
881
|
"after",
|
|
882
|
+
"rightAdornment",
|
|
881
883
|
"type",
|
|
882
884
|
"label",
|
|
883
885
|
"error",
|
|
@@ -1019,7 +1021,8 @@ var InputBase = (_a) => {
|
|
|
1019
1021
|
style: __spreadProps(__spreadValues({}, props.style), { width })
|
|
1020
1022
|
})
|
|
1021
1023
|
),
|
|
1022
|
-
secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after
|
|
1024
|
+
secondaryIconColor ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "contents text-text-secondary-normal", children: after }) : after,
|
|
1025
|
+
rightAdornment
|
|
1023
1026
|
]
|
|
1024
1027
|
}
|
|
1025
1028
|
),
|
|
@@ -1046,7 +1049,8 @@ var Input = (_a) => {
|
|
|
1046
1049
|
onBlur,
|
|
1047
1050
|
onClear,
|
|
1048
1051
|
id,
|
|
1049
|
-
testid
|
|
1052
|
+
testid,
|
|
1053
|
+
rightAdornment
|
|
1050
1054
|
} = _b, props = __objRest(_b, [
|
|
1051
1055
|
"variant",
|
|
1052
1056
|
"decimals",
|
|
@@ -1057,7 +1061,8 @@ var Input = (_a) => {
|
|
|
1057
1061
|
"onBlur",
|
|
1058
1062
|
"onClear",
|
|
1059
1063
|
"id",
|
|
1060
|
-
"testid"
|
|
1064
|
+
"testid",
|
|
1065
|
+
"rightAdornment"
|
|
1061
1066
|
]);
|
|
1062
1067
|
const [internalValue, setInternalValue] = (0, import_react.useState)("");
|
|
1063
1068
|
const [displayValue, setDisplayValue] = (0, import_react.useState)("");
|
|
@@ -1079,7 +1084,7 @@ var Input = (_a) => {
|
|
|
1079
1084
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1080
1085
|
setInternalValue(formatted);
|
|
1081
1086
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1082
|
-
}, []);
|
|
1087
|
+
}, [variant, propValue, decimals]);
|
|
1083
1088
|
const getInputProps = () => {
|
|
1084
1089
|
var _a2;
|
|
1085
1090
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1142,7 +1147,7 @@ var Input = (_a) => {
|
|
|
1142
1147
|
case "finder":
|
|
1143
1148
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "search" });
|
|
1144
1149
|
case "uom":
|
|
1145
|
-
return uom ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1150
|
+
return uom ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Paragraph, { color: "text-secondary-normal", children: uom.toUpperCase() }) : null;
|
|
1146
1151
|
case "percentage":
|
|
1147
1152
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "percent" }) });
|
|
1148
1153
|
default:
|
|
@@ -1228,7 +1233,8 @@ var Input = (_a) => {
|
|
|
1228
1233
|
after: getAfterElement(),
|
|
1229
1234
|
onChange: handleChange,
|
|
1230
1235
|
onBlur: handleBlur,
|
|
1231
|
-
testid
|
|
1236
|
+
testid,
|
|
1237
|
+
rightAdornment
|
|
1232
1238
|
})
|
|
1233
1239
|
);
|
|
1234
1240
|
};
|