@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
|
@@ -204,18 +204,21 @@ var Label = (_a) => {
|
|
|
204
204
|
padded,
|
|
205
205
|
className,
|
|
206
206
|
color,
|
|
207
|
-
align
|
|
207
|
+
align,
|
|
208
|
+
id
|
|
208
209
|
} = _b, props = __objRest(_b, [
|
|
209
210
|
"as",
|
|
210
211
|
"padded",
|
|
211
212
|
"className",
|
|
212
213
|
"color",
|
|
213
|
-
"align"
|
|
214
|
+
"align",
|
|
215
|
+
"id"
|
|
214
216
|
]);
|
|
215
217
|
const Element = as;
|
|
216
218
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
217
219
|
Element,
|
|
218
220
|
__spreadProps(__spreadValues({
|
|
221
|
+
id,
|
|
219
222
|
className: (0, import_clsx2.default)(
|
|
220
223
|
typography.label,
|
|
221
224
|
align === "left" && "text-left",
|
|
@@ -302,6 +305,7 @@ function formatCurrencyDisplay(value) {
|
|
|
302
305
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
303
306
|
var InputBase = (_a) => {
|
|
304
307
|
var _b = _a, {
|
|
308
|
+
id,
|
|
305
309
|
before,
|
|
306
310
|
after,
|
|
307
311
|
type,
|
|
@@ -318,6 +322,7 @@ var InputBase = (_a) => {
|
|
|
318
322
|
wrapperClassName,
|
|
319
323
|
focus
|
|
320
324
|
} = _b, props = __objRest(_b, [
|
|
325
|
+
"id",
|
|
321
326
|
"before",
|
|
322
327
|
"after",
|
|
323
328
|
"type",
|
|
@@ -339,6 +344,7 @@ var InputBase = (_a) => {
|
|
|
339
344
|
"data-focus": focus || null
|
|
340
345
|
};
|
|
341
346
|
const inputRef = (0, import_react.useRef)(null);
|
|
347
|
+
const inputId = `${id}-input`;
|
|
342
348
|
(0, import_react.useEffect)(() => {
|
|
343
349
|
var _a2;
|
|
344
350
|
const input = inputRef.current;
|
|
@@ -379,6 +385,8 @@ var InputBase = (_a) => {
|
|
|
379
385
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
380
386
|
"label",
|
|
381
387
|
{
|
|
388
|
+
id,
|
|
389
|
+
htmlFor: inputId,
|
|
382
390
|
ref: inputContainerRef,
|
|
383
391
|
className: (0, import_clsx4.default)(
|
|
384
392
|
"w-full flex flex-col",
|
|
@@ -392,6 +400,7 @@ var InputBase = (_a) => {
|
|
|
392
400
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
393
401
|
Label,
|
|
394
402
|
{
|
|
403
|
+
id: id ? `${id}-label` : void 0,
|
|
395
404
|
className: (0, import_clsx4.default)(
|
|
396
405
|
props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
|
|
397
406
|
),
|
|
@@ -428,7 +437,7 @@ var InputBase = (_a) => {
|
|
|
428
437
|
type,
|
|
429
438
|
required
|
|
430
439
|
}, props), attributes), {
|
|
431
|
-
id:
|
|
440
|
+
id: inputId,
|
|
432
441
|
className: (0, import_clsx4.default)(
|
|
433
442
|
"flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
|
|
434
443
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
@@ -446,7 +455,7 @@ var InputBase = (_a) => {
|
|
|
446
455
|
]
|
|
447
456
|
}
|
|
448
457
|
),
|
|
449
|
-
caption
|
|
458
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: id ? `${id}-caption` : void 0, children: caption })
|
|
450
459
|
]
|
|
451
460
|
}
|
|
452
461
|
);
|
|
@@ -460,7 +469,8 @@ var Input = (_a) => {
|
|
|
460
469
|
value: propValue,
|
|
461
470
|
onChange,
|
|
462
471
|
onBlur,
|
|
463
|
-
onClear
|
|
472
|
+
onClear,
|
|
473
|
+
id
|
|
464
474
|
} = _b, props = __objRest(_b, [
|
|
465
475
|
"variant",
|
|
466
476
|
"decimals",
|
|
@@ -469,7 +479,8 @@ var Input = (_a) => {
|
|
|
469
479
|
"value",
|
|
470
480
|
"onChange",
|
|
471
481
|
"onBlur",
|
|
472
|
-
"onClear"
|
|
482
|
+
"onClear",
|
|
483
|
+
"id"
|
|
473
484
|
]);
|
|
474
485
|
const [internalValue, setInternalValue] = (0, import_react.useState)("");
|
|
475
486
|
const [displayValue, setDisplayValue] = (0, import_react.useState)("");
|
|
@@ -495,7 +506,9 @@ var Input = (_a) => {
|
|
|
495
506
|
}, [propValue, decimals, variant]);
|
|
496
507
|
const getInputProps = () => {
|
|
497
508
|
var _a2;
|
|
498
|
-
const baseProps = __spreadProps(__spreadValues(__spreadValues({}, props),
|
|
509
|
+
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
510
|
+
id
|
|
511
|
+
}), getDecimalPlaceholder(decimals)), {
|
|
499
512
|
value: propValue
|
|
500
513
|
});
|
|
501
514
|
switch (variant) {
|
|
@@ -542,6 +555,7 @@ var Input = (_a) => {
|
|
|
542
555
|
return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
543
556
|
Icon,
|
|
544
557
|
{
|
|
558
|
+
id: id ? `${id}-clear-button` : void 0,
|
|
545
559
|
name: "close",
|
|
546
560
|
onClick: handleSearchReset,
|
|
547
561
|
className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
|
|
@@ -688,7 +702,8 @@ function DateCell(_a) {
|
|
|
688
702
|
onMouseEnter,
|
|
689
703
|
onMouseLeave,
|
|
690
704
|
cellPadding = "",
|
|
691
|
-
isRangeDisabled = false
|
|
705
|
+
isRangeDisabled = false,
|
|
706
|
+
id
|
|
692
707
|
} = _b, props = __objRest(_b, [
|
|
693
708
|
"date",
|
|
694
709
|
"isInMonth",
|
|
@@ -702,11 +717,13 @@ function DateCell(_a) {
|
|
|
702
717
|
"onMouseEnter",
|
|
703
718
|
"onMouseLeave",
|
|
704
719
|
"cellPadding",
|
|
705
|
-
"isRangeDisabled"
|
|
720
|
+
"isRangeDisabled",
|
|
721
|
+
"id"
|
|
706
722
|
]);
|
|
707
723
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
708
724
|
"span",
|
|
709
725
|
__spreadProps(__spreadValues({}, props), {
|
|
726
|
+
id,
|
|
710
727
|
className: (0, import_clsx5.default)(
|
|
711
728
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
712
729
|
typography.caption,
|
|
@@ -752,7 +769,8 @@ function CalendarRange({
|
|
|
752
769
|
isDateAvailable,
|
|
753
770
|
mode = "double",
|
|
754
771
|
cardStyle = false,
|
|
755
|
-
disableRange = false
|
|
772
|
+
disableRange = false,
|
|
773
|
+
id
|
|
756
774
|
}) {
|
|
757
775
|
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
758
776
|
const parseDate = (d) => {
|
|
@@ -821,6 +839,7 @@ function CalendarRange({
|
|
|
821
839
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
822
840
|
"div",
|
|
823
841
|
{
|
|
842
|
+
id,
|
|
824
843
|
className: (0, import_clsx5.default)(
|
|
825
844
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
826
845
|
layoutPaddding,
|
|
@@ -860,6 +879,7 @@ function CalendarRange({
|
|
|
860
879
|
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
861
880
|
"button",
|
|
862
881
|
{
|
|
882
|
+
id: id ? `${id}-prev-month-button` : void 0,
|
|
863
883
|
type: "button",
|
|
864
884
|
className: (0, import_clsx5.default)(
|
|
865
885
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -877,6 +897,7 @@ function CalendarRange({
|
|
|
877
897
|
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
878
898
|
"button",
|
|
879
899
|
{
|
|
900
|
+
id: id ? `${id}-next-month-button` : void 0,
|
|
880
901
|
type: "button",
|
|
881
902
|
className: (0, import_clsx5.default)(
|
|
882
903
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -919,6 +940,7 @@ function CalendarRange({
|
|
|
919
940
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
920
941
|
DateCell,
|
|
921
942
|
{
|
|
943
|
+
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
922
944
|
date,
|
|
923
945
|
isInMonth: !!isInMonth,
|
|
924
946
|
isToday: !!isToday,
|
|
@@ -984,6 +1006,7 @@ function findDocumentRoot(element) {
|
|
|
984
1006
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
985
1007
|
var DateInput = (_a) => {
|
|
986
1008
|
var _b = _a, {
|
|
1009
|
+
id,
|
|
987
1010
|
value,
|
|
988
1011
|
onChange,
|
|
989
1012
|
placeholder = "MM/DD/YYYY",
|
|
@@ -991,6 +1014,7 @@ var DateInput = (_a) => {
|
|
|
991
1014
|
readOnly = false,
|
|
992
1015
|
label
|
|
993
1016
|
} = _b, props = __objRest(_b, [
|
|
1017
|
+
"id",
|
|
994
1018
|
"value",
|
|
995
1019
|
"onChange",
|
|
996
1020
|
"placeholder",
|
|
@@ -1079,6 +1103,7 @@ var DateInput = (_a) => {
|
|
|
1079
1103
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1080
1104
|
InputBase,
|
|
1081
1105
|
__spreadProps(__spreadValues({
|
|
1106
|
+
id,
|
|
1082
1107
|
ref: (el) => {
|
|
1083
1108
|
triggerRef.current = el;
|
|
1084
1109
|
}
|
|
@@ -1110,6 +1135,7 @@ var DateInput = (_a) => {
|
|
|
1110
1135
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1111
1136
|
CalendarRange,
|
|
1112
1137
|
{
|
|
1138
|
+
id: id ? `${id}-calendar` : void 0,
|
|
1113
1139
|
from,
|
|
1114
1140
|
to: to || from,
|
|
1115
1141
|
onChange: handleDateChange,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-4T7F5BZZ.js";
|
|
4
4
|
import {
|
|
5
5
|
InputBase
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-QV2EFOYF.js";
|
|
7
|
+
import "../chunk-S5K22XTH.js";
|
|
8
8
|
import {
|
|
9
9
|
CalendarRange
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OUSNH76S.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon
|
|
13
13
|
} from "../chunk-IGQVA7SC.js";
|
|
@@ -24,6 +24,7 @@ import { createPortal } from "react-dom";
|
|
|
24
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
25
|
var DateInput = (_a) => {
|
|
26
26
|
var _b = _a, {
|
|
27
|
+
id,
|
|
27
28
|
value,
|
|
28
29
|
onChange,
|
|
29
30
|
placeholder = "MM/DD/YYYY",
|
|
@@ -31,6 +32,7 @@ var DateInput = (_a) => {
|
|
|
31
32
|
readOnly = false,
|
|
32
33
|
label
|
|
33
34
|
} = _b, props = __objRest(_b, [
|
|
35
|
+
"id",
|
|
34
36
|
"value",
|
|
35
37
|
"onChange",
|
|
36
38
|
"placeholder",
|
|
@@ -119,6 +121,7 @@ var DateInput = (_a) => {
|
|
|
119
121
|
/* @__PURE__ */ jsx(
|
|
120
122
|
InputBase,
|
|
121
123
|
__spreadProps(__spreadValues({
|
|
124
|
+
id,
|
|
122
125
|
ref: (el) => {
|
|
123
126
|
triggerRef.current = el;
|
|
124
127
|
}
|
|
@@ -150,6 +153,7 @@ var DateInput = (_a) => {
|
|
|
150
153
|
children: /* @__PURE__ */ jsx(
|
|
151
154
|
CalendarRange,
|
|
152
155
|
{
|
|
156
|
+
id: id ? `${id}-calendar` : void 0,
|
|
153
157
|
from,
|
|
154
158
|
to: to || from,
|
|
155
159
|
onChange: handleDateChange,
|
|
@@ -204,18 +204,21 @@ var Label = (_a) => {
|
|
|
204
204
|
padded,
|
|
205
205
|
className,
|
|
206
206
|
color,
|
|
207
|
-
align
|
|
207
|
+
align,
|
|
208
|
+
id
|
|
208
209
|
} = _b, props = __objRest(_b, [
|
|
209
210
|
"as",
|
|
210
211
|
"padded",
|
|
211
212
|
"className",
|
|
212
213
|
"color",
|
|
213
|
-
"align"
|
|
214
|
+
"align",
|
|
215
|
+
"id"
|
|
214
216
|
]);
|
|
215
217
|
const Element = as;
|
|
216
218
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
217
219
|
Element,
|
|
218
220
|
__spreadProps(__spreadValues({
|
|
221
|
+
id,
|
|
219
222
|
className: (0, import_clsx2.default)(
|
|
220
223
|
typography.label,
|
|
221
224
|
align === "left" && "text-left",
|
|
@@ -302,6 +305,7 @@ function formatCurrencyDisplay(value) {
|
|
|
302
305
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
303
306
|
var InputBase = (_a) => {
|
|
304
307
|
var _b = _a, {
|
|
308
|
+
id,
|
|
305
309
|
before,
|
|
306
310
|
after,
|
|
307
311
|
type,
|
|
@@ -318,6 +322,7 @@ var InputBase = (_a) => {
|
|
|
318
322
|
wrapperClassName,
|
|
319
323
|
focus
|
|
320
324
|
} = _b, props = __objRest(_b, [
|
|
325
|
+
"id",
|
|
321
326
|
"before",
|
|
322
327
|
"after",
|
|
323
328
|
"type",
|
|
@@ -339,6 +344,7 @@ var InputBase = (_a) => {
|
|
|
339
344
|
"data-focus": focus || null
|
|
340
345
|
};
|
|
341
346
|
const inputRef = (0, import_react.useRef)(null);
|
|
347
|
+
const inputId = `${id}-input`;
|
|
342
348
|
(0, import_react.useEffect)(() => {
|
|
343
349
|
var _a2;
|
|
344
350
|
const input = inputRef.current;
|
|
@@ -379,6 +385,8 @@ var InputBase = (_a) => {
|
|
|
379
385
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
380
386
|
"label",
|
|
381
387
|
{
|
|
388
|
+
id,
|
|
389
|
+
htmlFor: inputId,
|
|
382
390
|
ref: inputContainerRef,
|
|
383
391
|
className: (0, import_clsx4.default)(
|
|
384
392
|
"w-full flex flex-col",
|
|
@@ -392,6 +400,7 @@ var InputBase = (_a) => {
|
|
|
392
400
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
393
401
|
Label,
|
|
394
402
|
{
|
|
403
|
+
id: id ? `${id}-label` : void 0,
|
|
395
404
|
className: (0, import_clsx4.default)(
|
|
396
405
|
props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
|
|
397
406
|
),
|
|
@@ -428,7 +437,7 @@ var InputBase = (_a) => {
|
|
|
428
437
|
type,
|
|
429
438
|
required
|
|
430
439
|
}, props), attributes), {
|
|
431
|
-
id:
|
|
440
|
+
id: inputId,
|
|
432
441
|
className: (0, import_clsx4.default)(
|
|
433
442
|
"flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
|
|
434
443
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
@@ -446,7 +455,7 @@ var InputBase = (_a) => {
|
|
|
446
455
|
]
|
|
447
456
|
}
|
|
448
457
|
),
|
|
449
|
-
caption
|
|
458
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: id ? `${id}-caption` : void 0, children: caption })
|
|
450
459
|
]
|
|
451
460
|
}
|
|
452
461
|
);
|
|
@@ -460,7 +469,8 @@ var Input = (_a) => {
|
|
|
460
469
|
value: propValue,
|
|
461
470
|
onChange,
|
|
462
471
|
onBlur,
|
|
463
|
-
onClear
|
|
472
|
+
onClear,
|
|
473
|
+
id
|
|
464
474
|
} = _b, props = __objRest(_b, [
|
|
465
475
|
"variant",
|
|
466
476
|
"decimals",
|
|
@@ -469,7 +479,8 @@ var Input = (_a) => {
|
|
|
469
479
|
"value",
|
|
470
480
|
"onChange",
|
|
471
481
|
"onBlur",
|
|
472
|
-
"onClear"
|
|
482
|
+
"onClear",
|
|
483
|
+
"id"
|
|
473
484
|
]);
|
|
474
485
|
const [internalValue, setInternalValue] = (0, import_react.useState)("");
|
|
475
486
|
const [displayValue, setDisplayValue] = (0, import_react.useState)("");
|
|
@@ -495,7 +506,9 @@ var Input = (_a) => {
|
|
|
495
506
|
}, [propValue, decimals, variant]);
|
|
496
507
|
const getInputProps = () => {
|
|
497
508
|
var _a2;
|
|
498
|
-
const baseProps = __spreadProps(__spreadValues(__spreadValues({}, props),
|
|
509
|
+
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
510
|
+
id
|
|
511
|
+
}), getDecimalPlaceholder(decimals)), {
|
|
499
512
|
value: propValue
|
|
500
513
|
});
|
|
501
514
|
switch (variant) {
|
|
@@ -542,6 +555,7 @@ var Input = (_a) => {
|
|
|
542
555
|
return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
543
556
|
Icon,
|
|
544
557
|
{
|
|
558
|
+
id: id ? `${id}-clear-button` : void 0,
|
|
545
559
|
name: "close",
|
|
546
560
|
onClick: handleSearchReset,
|
|
547
561
|
className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
|
|
@@ -688,7 +702,8 @@ function DateCell(_a) {
|
|
|
688
702
|
onMouseEnter,
|
|
689
703
|
onMouseLeave,
|
|
690
704
|
cellPadding = "",
|
|
691
|
-
isRangeDisabled = false
|
|
705
|
+
isRangeDisabled = false,
|
|
706
|
+
id
|
|
692
707
|
} = _b, props = __objRest(_b, [
|
|
693
708
|
"date",
|
|
694
709
|
"isInMonth",
|
|
@@ -702,11 +717,13 @@ function DateCell(_a) {
|
|
|
702
717
|
"onMouseEnter",
|
|
703
718
|
"onMouseLeave",
|
|
704
719
|
"cellPadding",
|
|
705
|
-
"isRangeDisabled"
|
|
720
|
+
"isRangeDisabled",
|
|
721
|
+
"id"
|
|
706
722
|
]);
|
|
707
723
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
708
724
|
"span",
|
|
709
725
|
__spreadProps(__spreadValues({}, props), {
|
|
726
|
+
id,
|
|
710
727
|
className: (0, import_clsx5.default)(
|
|
711
728
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
712
729
|
typography.caption,
|
|
@@ -752,7 +769,8 @@ function CalendarRange({
|
|
|
752
769
|
isDateAvailable,
|
|
753
770
|
mode = "double",
|
|
754
771
|
cardStyle = false,
|
|
755
|
-
disableRange = false
|
|
772
|
+
disableRange = false,
|
|
773
|
+
id
|
|
756
774
|
}) {
|
|
757
775
|
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
758
776
|
const parseDate = (d) => {
|
|
@@ -821,6 +839,7 @@ function CalendarRange({
|
|
|
821
839
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
822
840
|
"div",
|
|
823
841
|
{
|
|
842
|
+
id,
|
|
824
843
|
className: (0, import_clsx5.default)(
|
|
825
844
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
826
845
|
layoutPaddding,
|
|
@@ -860,6 +879,7 @@ function CalendarRange({
|
|
|
860
879
|
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
861
880
|
"button",
|
|
862
881
|
{
|
|
882
|
+
id: id ? `${id}-prev-month-button` : void 0,
|
|
863
883
|
type: "button",
|
|
864
884
|
className: (0, import_clsx5.default)(
|
|
865
885
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -877,6 +897,7 @@ function CalendarRange({
|
|
|
877
897
|
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
878
898
|
"button",
|
|
879
899
|
{
|
|
900
|
+
id: id ? `${id}-next-month-button` : void 0,
|
|
880
901
|
type: "button",
|
|
881
902
|
className: (0, import_clsx5.default)(
|
|
882
903
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -919,6 +940,7 @@ function CalendarRange({
|
|
|
919
940
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
920
941
|
DateCell,
|
|
921
942
|
{
|
|
943
|
+
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
922
944
|
date,
|
|
923
945
|
isInMonth: !!isInMonth,
|
|
924
946
|
isToday: !!isToday,
|
|
@@ -984,6 +1006,7 @@ function findDocumentRoot(element) {
|
|
|
984
1006
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
985
1007
|
var DateRangeInput = (_a) => {
|
|
986
1008
|
var _b = _a, {
|
|
1009
|
+
id,
|
|
987
1010
|
value,
|
|
988
1011
|
onChange,
|
|
989
1012
|
placeholder = "MM/DD/YYYY - MM/DD/YYYY",
|
|
@@ -992,6 +1015,7 @@ var DateRangeInput = (_a) => {
|
|
|
992
1015
|
single = false,
|
|
993
1016
|
label: label
|
|
994
1017
|
} = _b, props = __objRest(_b, [
|
|
1018
|
+
"id",
|
|
995
1019
|
"value",
|
|
996
1020
|
"onChange",
|
|
997
1021
|
"placeholder",
|
|
@@ -1081,6 +1105,7 @@ var DateRangeInput = (_a) => {
|
|
|
1081
1105
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1082
1106
|
InputBase,
|
|
1083
1107
|
__spreadProps(__spreadValues({
|
|
1108
|
+
id,
|
|
1084
1109
|
ref: (el) => {
|
|
1085
1110
|
triggerRef.current = el;
|
|
1086
1111
|
}
|
|
@@ -1112,6 +1137,7 @@ var DateRangeInput = (_a) => {
|
|
|
1112
1137
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1113
1138
|
CalendarRange,
|
|
1114
1139
|
{
|
|
1140
|
+
id: id ? `${id}-calendar` : void 0,
|
|
1115
1141
|
from,
|
|
1116
1142
|
to,
|
|
1117
1143
|
onChange: handleRangeChange,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-4T7F5BZZ.js";
|
|
4
4
|
import {
|
|
5
5
|
InputBase
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-QV2EFOYF.js";
|
|
7
|
+
import "../chunk-S5K22XTH.js";
|
|
8
8
|
import {
|
|
9
9
|
CalendarRange
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OUSNH76S.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon
|
|
13
13
|
} from "../chunk-IGQVA7SC.js";
|
|
@@ -24,6 +24,7 @@ import { createPortal } from "react-dom";
|
|
|
24
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
25
|
var DateRangeInput = (_a) => {
|
|
26
26
|
var _b = _a, {
|
|
27
|
+
id,
|
|
27
28
|
value,
|
|
28
29
|
onChange,
|
|
29
30
|
placeholder = "MM/DD/YYYY - MM/DD/YYYY",
|
|
@@ -32,6 +33,7 @@ var DateRangeInput = (_a) => {
|
|
|
32
33
|
single = false,
|
|
33
34
|
label: label
|
|
34
35
|
} = _b, props = __objRest(_b, [
|
|
36
|
+
"id",
|
|
35
37
|
"value",
|
|
36
38
|
"onChange",
|
|
37
39
|
"placeholder",
|
|
@@ -121,6 +123,7 @@ var DateRangeInput = (_a) => {
|
|
|
121
123
|
/* @__PURE__ */ jsx(
|
|
122
124
|
InputBase,
|
|
123
125
|
__spreadProps(__spreadValues({
|
|
126
|
+
id,
|
|
124
127
|
ref: (el) => {
|
|
125
128
|
triggerRef.current = el;
|
|
126
129
|
}
|
|
@@ -152,6 +155,7 @@ var DateRangeInput = (_a) => {
|
|
|
152
155
|
children: /* @__PURE__ */ jsx(
|
|
153
156
|
CalendarRange,
|
|
154
157
|
{
|
|
158
|
+
id: id ? `${id}-calendar` : void 0,
|
|
155
159
|
from,
|
|
156
160
|
to,
|
|
157
161
|
onChange: handleRangeChange,
|
|
@@ -26,24 +26,32 @@ __export(DebugJson_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(DebugJson_exports);
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function DebugJson({ data }) {
|
|
29
|
+
function DebugJson({ data, id }) {
|
|
30
30
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
31
31
|
if (process.env.NODE_ENV !== "development") {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
id,
|
|
38
|
+
className: "p-2 rounded bg-neutral-100 border border-red-500 my-4",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
id: id ? `${id}-toggle-button` : void 0,
|
|
44
|
+
onClick: () => setOpen((prev) => !prev),
|
|
45
|
+
className: "px-4 py-2 border rounded bg-white",
|
|
46
|
+
children: open ? "Hide JSON" : "Show JSON"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "mt-4", children: JSON.stringify(data, null, 4) })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
45
53
|
}
|
|
46
|
-
DebugJson.displayName = "
|
|
54
|
+
DebugJson.displayName = "DebugJson";
|
|
47
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
56
|
0 && (module.exports = {
|
|
49
57
|
DebugJson
|
|
@@ -4,24 +4,32 @@ import "../chunk-ORMEWXMH.js";
|
|
|
4
4
|
// src/components/DebugJson.tsx
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
function DebugJson({ data }) {
|
|
7
|
+
function DebugJson({ data, id }) {
|
|
8
8
|
const [open, setOpen] = useState(false);
|
|
9
9
|
if (process.env.NODE_ENV !== "development") {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */ jsxs(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
id,
|
|
16
|
+
className: "p-2 rounded bg-neutral-100 border border-red-500 my-4",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
id: id ? `${id}-toggle-button` : void 0,
|
|
22
|
+
onClick: () => setOpen((prev) => !prev),
|
|
23
|
+
className: "px-4 py-2 border rounded bg-white",
|
|
24
|
+
children: open ? "Hide JSON" : "Show JSON"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
open && /* @__PURE__ */ jsx("pre", { className: "mt-4", children: JSON.stringify(data, null, 4) })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
23
31
|
}
|
|
24
|
-
DebugJson.displayName = "
|
|
32
|
+
DebugJson.displayName = "DebugJson";
|
|
25
33
|
export {
|
|
26
34
|
DebugJson
|
|
27
35
|
};
|
|
@@ -201,20 +201,23 @@ var Display = (_a) => {
|
|
|
201
201
|
as,
|
|
202
202
|
color,
|
|
203
203
|
align,
|
|
204
|
-
variant = "display1"
|
|
204
|
+
variant = "display1",
|
|
205
|
+
id
|
|
205
206
|
} = _b, props = __objRest(_b, [
|
|
206
207
|
"className",
|
|
207
208
|
"children",
|
|
208
209
|
"as",
|
|
209
210
|
"color",
|
|
210
211
|
"align",
|
|
211
|
-
"variant"
|
|
212
|
+
"variant",
|
|
213
|
+
"id"
|
|
212
214
|
]);
|
|
213
215
|
const defaultElement = variant === "display1" ? "h1" : "h2";
|
|
214
216
|
const Element = as != null ? as : defaultElement;
|
|
215
217
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
218
|
Element,
|
|
217
219
|
__spreadProps(__spreadValues({
|
|
220
|
+
id,
|
|
218
221
|
className: (0, import_clsx2.default)(
|
|
219
222
|
typography[variant],
|
|
220
223
|
className,
|
|
@@ -50,7 +50,10 @@ var EditingContext = (0, import_react.createContext)({
|
|
|
50
50
|
console.log(row, key, value);
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
var EditingProvider = ({
|
|
53
|
+
var EditingProvider = ({
|
|
54
|
+
data,
|
|
55
|
+
children
|
|
56
|
+
}) => {
|
|
54
57
|
const [actual, setData] = (0, import_react.useState)(data);
|
|
55
58
|
const context = {
|
|
56
59
|
data: actual,
|
|
@@ -13,7 +13,10 @@ var EditingContext = createContext({
|
|
|
13
13
|
console.log(row, key, value);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
var EditingProvider = ({
|
|
16
|
+
var EditingProvider = ({
|
|
17
|
+
data,
|
|
18
|
+
children
|
|
19
|
+
}) => {
|
|
17
20
|
const [actual, setData] = useState(data);
|
|
18
21
|
const context = {
|
|
19
22
|
data: actual,
|