@dmsi/wedgekit-react 0.0.256 → 0.0.258
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-LR44WRGD.js → chunk-5LMXR6AJ.js} +1 -1
- package/dist/{chunk-U2UQVMIF.js → chunk-6DPFKSCT.js} +1 -1
- package/dist/{chunk-TF6H5RZB.js → chunk-J5V2JRIK.js} +1 -1
- package/dist/{chunk-IKPM5LCD.js → chunk-T3TT3SVX.js} +4 -4
- package/dist/{chunk-OG26RVXY.js → chunk-ZL5X7KP6.js} +9 -2
- package/dist/components/CalendarRange.cjs +9 -2
- package/dist/components/CalendarRange.js +5 -5
- package/dist/components/DataGridCell.cjs +9 -2
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DateInput.cjs +15 -6
- package/dist/components/DateInput.js +11 -9
- package/dist/components/DateRangeInput.cjs +15 -6
- package/dist/components/DateRangeInput.js +11 -9
- package/dist/components/FilterGroup.cjs +9 -2
- package/dist/components/FilterGroup.js +2 -2
- package/dist/components/Input.cjs +9 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/Password.cjs +9 -2
- package/dist/components/Password.js +1 -1
- package/dist/components/Search.cjs +9 -2
- package/dist/components/Search.js +2 -2
- package/dist/components/Select.cjs +9 -2
- package/dist/components/Select.js +2 -2
- package/dist/components/Stepper.cjs +9 -2
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Time.cjs +9 -2
- package/dist/components/Time.js +1 -1
- package/dist/components/index.cjs +9 -2
- package/dist/components/index.js +5 -5
- package/package.json +1 -1
- package/src/components/DateInput.tsx +6 -4
- package/src/components/DateRangeInput.tsx +6 -4
- package/src/components/Input.tsx +7 -0
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-QQ5G773N.js";
|
|
4
4
|
import {
|
|
5
5
|
Select
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J5V2JRIK.js";
|
|
7
7
|
import {
|
|
8
8
|
DataCellHeader,
|
|
9
9
|
DataGridCell,
|
|
10
10
|
DragAlongCell,
|
|
11
11
|
DraggableCellHeader
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5LMXR6AJ.js";
|
|
13
13
|
import {
|
|
14
14
|
Menu
|
|
15
15
|
} from "./chunk-PGSDEGBP.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
} from "./chunk-7CA54V6U.js";
|
|
19
19
|
import {
|
|
20
20
|
Search
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6DPFKSCT.js";
|
|
22
22
|
import {
|
|
23
23
|
Input
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZL5X7KP6.js";
|
|
25
25
|
import {
|
|
26
26
|
Label
|
|
27
27
|
} from "./chunk-7CS736EF.js";
|
|
@@ -50,7 +50,8 @@ var InputBase = (_a) => {
|
|
|
50
50
|
wrapperClassName,
|
|
51
51
|
focus,
|
|
52
52
|
secondaryIconColor,
|
|
53
|
-
fullWidth = true
|
|
53
|
+
fullWidth = true,
|
|
54
|
+
wrapperRef
|
|
54
55
|
} = _b, props = __objRest(_b, [
|
|
55
56
|
"id",
|
|
56
57
|
"testid",
|
|
@@ -70,7 +71,8 @@ var InputBase = (_a) => {
|
|
|
70
71
|
"wrapperClassName",
|
|
71
72
|
"focus",
|
|
72
73
|
"secondaryIconColor",
|
|
73
|
-
"fullWidth"
|
|
74
|
+
"fullWidth",
|
|
75
|
+
"wrapperRef"
|
|
74
76
|
]);
|
|
75
77
|
const attributes = {
|
|
76
78
|
"data-error": error && !focus || null,
|
|
@@ -161,6 +163,11 @@ var InputBase = (_a) => {
|
|
|
161
163
|
inputReadOnlyClass,
|
|
162
164
|
wrapperClassName
|
|
163
165
|
),
|
|
166
|
+
ref: (el) => {
|
|
167
|
+
if (wrapperRef) {
|
|
168
|
+
wrapperRef.current = el;
|
|
169
|
+
}
|
|
170
|
+
},
|
|
164
171
|
children: [
|
|
165
172
|
before,
|
|
166
173
|
/* @__PURE__ */ jsx(
|
|
@@ -1404,7 +1404,8 @@ var InputBase = (_a) => {
|
|
|
1404
1404
|
wrapperClassName,
|
|
1405
1405
|
focus,
|
|
1406
1406
|
secondaryIconColor,
|
|
1407
|
-
fullWidth = true
|
|
1407
|
+
fullWidth = true,
|
|
1408
|
+
wrapperRef
|
|
1408
1409
|
} = _b, props = __objRest(_b, [
|
|
1409
1410
|
"id",
|
|
1410
1411
|
"testid",
|
|
@@ -1424,7 +1425,8 @@ var InputBase = (_a) => {
|
|
|
1424
1425
|
"wrapperClassName",
|
|
1425
1426
|
"focus",
|
|
1426
1427
|
"secondaryIconColor",
|
|
1427
|
-
"fullWidth"
|
|
1428
|
+
"fullWidth",
|
|
1429
|
+
"wrapperRef"
|
|
1428
1430
|
]);
|
|
1429
1431
|
const attributes = {
|
|
1430
1432
|
"data-error": error && !focus || null,
|
|
@@ -1515,6 +1517,11 @@ var InputBase = (_a) => {
|
|
|
1515
1517
|
inputReadOnlyClass,
|
|
1516
1518
|
wrapperClassName
|
|
1517
1519
|
),
|
|
1520
|
+
ref: (el) => {
|
|
1521
|
+
if (wrapperRef) {
|
|
1522
|
+
wrapperRef.current = el;
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1518
1525
|
children: [
|
|
1519
1526
|
before,
|
|
1520
1527
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
CalendarRange_default,
|
|
4
4
|
isWeekend
|
|
5
5
|
} from "../chunk-AEHXCKEP.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-T3TT3SVX.js";
|
|
7
7
|
import "../chunk-QQ5G773N.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-J5V2JRIK.js";
|
|
9
|
+
import "../chunk-5LMXR6AJ.js";
|
|
10
10
|
import "../chunk-PGSDEGBP.js";
|
|
11
11
|
import "../chunk-CCOQOO23.js";
|
|
12
12
|
import "../chunk-7CA54V6U.js";
|
|
13
13
|
import "../chunk-WVUIIBRR.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-6DPFKSCT.js";
|
|
15
|
+
import "../chunk-ZL5X7KP6.js";
|
|
16
16
|
import "../chunk-7CS736EF.js";
|
|
17
17
|
import "../chunk-NO5BIKWS.js";
|
|
18
18
|
import "../chunk-WWAPK5PH.js";
|
|
@@ -1271,7 +1271,8 @@ var InputBase = (_a) => {
|
|
|
1271
1271
|
wrapperClassName,
|
|
1272
1272
|
focus,
|
|
1273
1273
|
secondaryIconColor,
|
|
1274
|
-
fullWidth = true
|
|
1274
|
+
fullWidth = true,
|
|
1275
|
+
wrapperRef
|
|
1275
1276
|
} = _b, props = __objRest(_b, [
|
|
1276
1277
|
"id",
|
|
1277
1278
|
"testid",
|
|
@@ -1291,7 +1292,8 @@ var InputBase = (_a) => {
|
|
|
1291
1292
|
"wrapperClassName",
|
|
1292
1293
|
"focus",
|
|
1293
1294
|
"secondaryIconColor",
|
|
1294
|
-
"fullWidth"
|
|
1295
|
+
"fullWidth",
|
|
1296
|
+
"wrapperRef"
|
|
1295
1297
|
]);
|
|
1296
1298
|
const attributes = {
|
|
1297
1299
|
"data-error": error && !focus || null,
|
|
@@ -1382,6 +1384,11 @@ var InputBase = (_a) => {
|
|
|
1382
1384
|
inputReadOnlyClass,
|
|
1383
1385
|
wrapperClassName
|
|
1384
1386
|
),
|
|
1387
|
+
ref: (el) => {
|
|
1388
|
+
if (wrapperRef) {
|
|
1389
|
+
wrapperRef.current = el;
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1385
1392
|
children: [
|
|
1386
1393
|
before,
|
|
1387
1394
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
DataGridCell,
|
|
5
5
|
DragAlongCell,
|
|
6
6
|
DraggableCellHeader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-5LMXR6AJ.js";
|
|
8
8
|
import "../chunk-PGSDEGBP.js";
|
|
9
9
|
import "../chunk-CCOQOO23.js";
|
|
10
10
|
import "../chunk-7CA54V6U.js";
|
|
11
11
|
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6DPFKSCT.js";
|
|
13
|
+
import "../chunk-ZL5X7KP6.js";
|
|
14
14
|
import "../chunk-7CS736EF.js";
|
|
15
15
|
import "../chunk-HIVPC3T4.js";
|
|
16
16
|
import "../chunk-VXWSAIB5.js";
|
|
@@ -334,7 +334,8 @@ var InputBase = (_a) => {
|
|
|
334
334
|
wrapperClassName,
|
|
335
335
|
focus,
|
|
336
336
|
secondaryIconColor,
|
|
337
|
-
fullWidth = true
|
|
337
|
+
fullWidth = true,
|
|
338
|
+
wrapperRef
|
|
338
339
|
} = _b, props = __objRest(_b, [
|
|
339
340
|
"id",
|
|
340
341
|
"testid",
|
|
@@ -354,7 +355,8 @@ var InputBase = (_a) => {
|
|
|
354
355
|
"wrapperClassName",
|
|
355
356
|
"focus",
|
|
356
357
|
"secondaryIconColor",
|
|
357
|
-
"fullWidth"
|
|
358
|
+
"fullWidth",
|
|
359
|
+
"wrapperRef"
|
|
358
360
|
]);
|
|
359
361
|
const attributes = {
|
|
360
362
|
"data-error": error && !focus || null,
|
|
@@ -445,6 +447,11 @@ var InputBase = (_a) => {
|
|
|
445
447
|
inputReadOnlyClass,
|
|
446
448
|
wrapperClassName
|
|
447
449
|
),
|
|
450
|
+
ref: (el) => {
|
|
451
|
+
if (wrapperRef) {
|
|
452
|
+
wrapperRef.current = el;
|
|
453
|
+
}
|
|
454
|
+
},
|
|
448
455
|
children: [
|
|
449
456
|
before,
|
|
450
457
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -4546,6 +4553,7 @@ var DateInput = (_a) => {
|
|
|
4546
4553
|
const [isTyping, setIsTyping] = (0, import_react20.useState)(false);
|
|
4547
4554
|
const popoverRef = (0, import_react20.useRef)(null);
|
|
4548
4555
|
const triggerRef = (0, import_react20.useRef)(null);
|
|
4556
|
+
const rootRef = (0, import_react20.useRef)(null);
|
|
4549
4557
|
const [calendarPosition, setCalendarPosition] = (0, import_react20.useState)({
|
|
4550
4558
|
top: 0,
|
|
4551
4559
|
left: 0,
|
|
@@ -4563,8 +4571,8 @@ var DateInput = (_a) => {
|
|
|
4563
4571
|
}
|
|
4564
4572
|
}, [visible]);
|
|
4565
4573
|
const updatePosition = () => {
|
|
4566
|
-
if (
|
|
4567
|
-
const rect =
|
|
4574
|
+
if (rootRef.current) {
|
|
4575
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
4568
4576
|
setCalendarPosition({
|
|
4569
4577
|
top: rect.bottom + window.scrollY,
|
|
4570
4578
|
left: rect.left + window.scrollX,
|
|
@@ -4688,6 +4696,7 @@ var DateInput = (_a) => {
|
|
|
4688
4696
|
triggerRef.current = el;
|
|
4689
4697
|
}
|
|
4690
4698
|
}, props), {
|
|
4699
|
+
wrapperRef: rootRef,
|
|
4691
4700
|
value: inputValue,
|
|
4692
4701
|
placeholder,
|
|
4693
4702
|
disabled,
|
|
@@ -4711,8 +4720,8 @@ var DateInput = (_a) => {
|
|
|
4711
4720
|
},
|
|
4712
4721
|
className: "absolute z-40 bg-white",
|
|
4713
4722
|
style: {
|
|
4714
|
-
top: `${calendarPosition.top +
|
|
4715
|
-
left: `${calendarPosition.left
|
|
4723
|
+
top: `${calendarPosition.top + 4}px`,
|
|
4724
|
+
left: `${calendarPosition.left}px`,
|
|
4716
4725
|
minWidth: `${calendarPosition.width}px`
|
|
4717
4726
|
},
|
|
4718
4727
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
3
|
} from "../chunk-AEHXCKEP.js";
|
|
4
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-T3TT3SVX.js";
|
|
5
5
|
import "../chunk-QQ5G773N.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-J5V2JRIK.js";
|
|
7
|
+
import "../chunk-5LMXR6AJ.js";
|
|
8
8
|
import "../chunk-PGSDEGBP.js";
|
|
9
9
|
import "../chunk-CCOQOO23.js";
|
|
10
10
|
import "../chunk-7CA54V6U.js";
|
|
11
11
|
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6DPFKSCT.js";
|
|
13
13
|
import {
|
|
14
14
|
InputBase
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-ZL5X7KP6.js";
|
|
16
16
|
import "../chunk-7CS736EF.js";
|
|
17
17
|
import "../chunk-NO5BIKWS.js";
|
|
18
18
|
import "../chunk-WWAPK5PH.js";
|
|
@@ -72,6 +72,7 @@ var DateInput = (_a) => {
|
|
|
72
72
|
const [isTyping, setIsTyping] = useState(false);
|
|
73
73
|
const popoverRef = useRef(null);
|
|
74
74
|
const triggerRef = useRef(null);
|
|
75
|
+
const rootRef = useRef(null);
|
|
75
76
|
const [calendarPosition, setCalendarPosition] = useState({
|
|
76
77
|
top: 0,
|
|
77
78
|
left: 0,
|
|
@@ -89,8 +90,8 @@ var DateInput = (_a) => {
|
|
|
89
90
|
}
|
|
90
91
|
}, [visible]);
|
|
91
92
|
const updatePosition = () => {
|
|
92
|
-
if (
|
|
93
|
-
const rect =
|
|
93
|
+
if (rootRef.current) {
|
|
94
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
94
95
|
setCalendarPosition({
|
|
95
96
|
top: rect.bottom + window.scrollY,
|
|
96
97
|
left: rect.left + window.scrollX,
|
|
@@ -214,6 +215,7 @@ var DateInput = (_a) => {
|
|
|
214
215
|
triggerRef.current = el;
|
|
215
216
|
}
|
|
216
217
|
}, props), {
|
|
218
|
+
wrapperRef: rootRef,
|
|
217
219
|
value: inputValue,
|
|
218
220
|
placeholder,
|
|
219
221
|
disabled,
|
|
@@ -237,8 +239,8 @@ var DateInput = (_a) => {
|
|
|
237
239
|
},
|
|
238
240
|
className: "absolute z-40 bg-white",
|
|
239
241
|
style: {
|
|
240
|
-
top: `${calendarPosition.top +
|
|
241
|
-
left: `${calendarPosition.left
|
|
242
|
+
top: `${calendarPosition.top + 4}px`,
|
|
243
|
+
left: `${calendarPosition.left}px`,
|
|
242
244
|
minWidth: `${calendarPosition.width}px`
|
|
243
245
|
},
|
|
244
246
|
children: /* @__PURE__ */ jsx(
|
|
@@ -334,7 +334,8 @@ var InputBase = (_a) => {
|
|
|
334
334
|
wrapperClassName,
|
|
335
335
|
focus,
|
|
336
336
|
secondaryIconColor,
|
|
337
|
-
fullWidth = true
|
|
337
|
+
fullWidth = true,
|
|
338
|
+
wrapperRef
|
|
338
339
|
} = _b, props = __objRest(_b, [
|
|
339
340
|
"id",
|
|
340
341
|
"testid",
|
|
@@ -354,7 +355,8 @@ var InputBase = (_a) => {
|
|
|
354
355
|
"wrapperClassName",
|
|
355
356
|
"focus",
|
|
356
357
|
"secondaryIconColor",
|
|
357
|
-
"fullWidth"
|
|
358
|
+
"fullWidth",
|
|
359
|
+
"wrapperRef"
|
|
358
360
|
]);
|
|
359
361
|
const attributes = {
|
|
360
362
|
"data-error": error && !focus || null,
|
|
@@ -445,6 +447,11 @@ var InputBase = (_a) => {
|
|
|
445
447
|
inputReadOnlyClass,
|
|
446
448
|
wrapperClassName
|
|
447
449
|
),
|
|
450
|
+
ref: (el) => {
|
|
451
|
+
if (wrapperRef) {
|
|
452
|
+
wrapperRef.current = el;
|
|
453
|
+
}
|
|
454
|
+
},
|
|
448
455
|
children: [
|
|
449
456
|
before,
|
|
450
457
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -4557,6 +4564,7 @@ var DateRangeInput = (_a) => {
|
|
|
4557
4564
|
const [inputValue, setInputValue] = (0, import_react20.useState)("");
|
|
4558
4565
|
const [isTyping, setIsTyping] = (0, import_react20.useState)(false);
|
|
4559
4566
|
const popoverRef = (0, import_react20.useRef)(null);
|
|
4567
|
+
const rootRef = (0, import_react20.useRef)(null);
|
|
4560
4568
|
const triggerRef = (0, import_react20.useRef)(null);
|
|
4561
4569
|
const [calendarPosition, setCalendarPosition] = (0, import_react20.useState)({
|
|
4562
4570
|
top: 0,
|
|
@@ -4575,8 +4583,8 @@ var DateRangeInput = (_a) => {
|
|
|
4575
4583
|
}
|
|
4576
4584
|
}, [visible]);
|
|
4577
4585
|
const updatePosition = () => {
|
|
4578
|
-
if (
|
|
4579
|
-
const rect =
|
|
4586
|
+
if (rootRef.current) {
|
|
4587
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
4580
4588
|
setCalendarPosition({
|
|
4581
4589
|
top: rect.bottom + window.scrollY,
|
|
4582
4590
|
left: rect.left + window.scrollX,
|
|
@@ -4954,6 +4962,7 @@ var DateRangeInput = (_a) => {
|
|
|
4954
4962
|
triggerRef.current = el;
|
|
4955
4963
|
}
|
|
4956
4964
|
}, props), {
|
|
4965
|
+
wrapperRef: rootRef,
|
|
4957
4966
|
value: inputValue,
|
|
4958
4967
|
placeholder: disableRange ? "MM/DD/YYYY" : placeholder,
|
|
4959
4968
|
disabled,
|
|
@@ -4977,8 +4986,8 @@ var DateRangeInput = (_a) => {
|
|
|
4977
4986
|
},
|
|
4978
4987
|
className: "absolute z-40 bg-white",
|
|
4979
4988
|
style: {
|
|
4980
|
-
top: `${calendarPosition.top +
|
|
4981
|
-
left: `${calendarPosition.left
|
|
4989
|
+
top: `${calendarPosition.top + 4}px`,
|
|
4990
|
+
left: `${calendarPosition.left}px`,
|
|
4982
4991
|
minWidth: `${calendarPosition.width}px`
|
|
4983
4992
|
},
|
|
4984
4993
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
3
|
} from "../chunk-AEHXCKEP.js";
|
|
4
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-T3TT3SVX.js";
|
|
5
5
|
import "../chunk-QQ5G773N.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-J5V2JRIK.js";
|
|
7
|
+
import "../chunk-5LMXR6AJ.js";
|
|
8
8
|
import "../chunk-PGSDEGBP.js";
|
|
9
9
|
import "../chunk-CCOQOO23.js";
|
|
10
10
|
import "../chunk-7CA54V6U.js";
|
|
11
11
|
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6DPFKSCT.js";
|
|
13
13
|
import {
|
|
14
14
|
InputBase
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-ZL5X7KP6.js";
|
|
16
16
|
import "../chunk-7CS736EF.js";
|
|
17
17
|
import "../chunk-NO5BIKWS.js";
|
|
18
18
|
import "../chunk-WWAPK5PH.js";
|
|
@@ -76,6 +76,7 @@ var DateRangeInput = (_a) => {
|
|
|
76
76
|
const [inputValue, setInputValue] = useState("");
|
|
77
77
|
const [isTyping, setIsTyping] = useState(false);
|
|
78
78
|
const popoverRef = useRef(null);
|
|
79
|
+
const rootRef = useRef(null);
|
|
79
80
|
const triggerRef = useRef(null);
|
|
80
81
|
const [calendarPosition, setCalendarPosition] = useState({
|
|
81
82
|
top: 0,
|
|
@@ -94,8 +95,8 @@ var DateRangeInput = (_a) => {
|
|
|
94
95
|
}
|
|
95
96
|
}, [visible]);
|
|
96
97
|
const updatePosition = () => {
|
|
97
|
-
if (
|
|
98
|
-
const rect =
|
|
98
|
+
if (rootRef.current) {
|
|
99
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
99
100
|
setCalendarPosition({
|
|
100
101
|
top: rect.bottom + window.scrollY,
|
|
101
102
|
left: rect.left + window.scrollX,
|
|
@@ -473,6 +474,7 @@ var DateRangeInput = (_a) => {
|
|
|
473
474
|
triggerRef.current = el;
|
|
474
475
|
}
|
|
475
476
|
}, props), {
|
|
477
|
+
wrapperRef: rootRef,
|
|
476
478
|
value: inputValue,
|
|
477
479
|
placeholder: disableRange ? "MM/DD/YYYY" : placeholder,
|
|
478
480
|
disabled,
|
|
@@ -496,8 +498,8 @@ var DateRangeInput = (_a) => {
|
|
|
496
498
|
},
|
|
497
499
|
className: "absolute z-40 bg-white",
|
|
498
500
|
style: {
|
|
499
|
-
top: `${calendarPosition.top +
|
|
500
|
-
left: `${calendarPosition.left
|
|
501
|
+
top: `${calendarPosition.top + 4}px`,
|
|
502
|
+
left: `${calendarPosition.left}px`,
|
|
501
503
|
minWidth: `${calendarPosition.width}px`
|
|
502
504
|
},
|
|
503
505
|
children: /* @__PURE__ */ jsx(
|
|
@@ -854,7 +854,8 @@ var InputBase = (_a) => {
|
|
|
854
854
|
wrapperClassName,
|
|
855
855
|
focus,
|
|
856
856
|
secondaryIconColor,
|
|
857
|
-
fullWidth = true
|
|
857
|
+
fullWidth = true,
|
|
858
|
+
wrapperRef
|
|
858
859
|
} = _b, props = __objRest(_b, [
|
|
859
860
|
"id",
|
|
860
861
|
"testid",
|
|
@@ -874,7 +875,8 @@ var InputBase = (_a) => {
|
|
|
874
875
|
"wrapperClassName",
|
|
875
876
|
"focus",
|
|
876
877
|
"secondaryIconColor",
|
|
877
|
-
"fullWidth"
|
|
878
|
+
"fullWidth",
|
|
879
|
+
"wrapperRef"
|
|
878
880
|
]);
|
|
879
881
|
const attributes = {
|
|
880
882
|
"data-error": error && !focus || null,
|
|
@@ -965,6 +967,11 @@ var InputBase = (_a) => {
|
|
|
965
967
|
inputReadOnlyClass,
|
|
966
968
|
wrapperClassName
|
|
967
969
|
),
|
|
970
|
+
ref: (el) => {
|
|
971
|
+
if (wrapperRef) {
|
|
972
|
+
wrapperRef.current = el;
|
|
973
|
+
}
|
|
974
|
+
},
|
|
968
975
|
children: [
|
|
969
976
|
before,
|
|
970
977
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -336,7 +336,8 @@ var InputBase = (_a) => {
|
|
|
336
336
|
wrapperClassName,
|
|
337
337
|
focus,
|
|
338
338
|
secondaryIconColor,
|
|
339
|
-
fullWidth = true
|
|
339
|
+
fullWidth = true,
|
|
340
|
+
wrapperRef
|
|
340
341
|
} = _b, props = __objRest(_b, [
|
|
341
342
|
"id",
|
|
342
343
|
"testid",
|
|
@@ -356,7 +357,8 @@ var InputBase = (_a) => {
|
|
|
356
357
|
"wrapperClassName",
|
|
357
358
|
"focus",
|
|
358
359
|
"secondaryIconColor",
|
|
359
|
-
"fullWidth"
|
|
360
|
+
"fullWidth",
|
|
361
|
+
"wrapperRef"
|
|
360
362
|
]);
|
|
361
363
|
const attributes = {
|
|
362
364
|
"data-error": error && !focus || null,
|
|
@@ -447,6 +449,11 @@ var InputBase = (_a) => {
|
|
|
447
449
|
inputReadOnlyClass,
|
|
448
450
|
wrapperClassName
|
|
449
451
|
),
|
|
452
|
+
ref: (el) => {
|
|
453
|
+
if (wrapperRef) {
|
|
454
|
+
wrapperRef.current = el;
|
|
455
|
+
}
|
|
456
|
+
},
|
|
450
457
|
children: [
|
|
451
458
|
before,
|
|
452
459
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
package/dist/components/Input.js
CHANGED
|
@@ -334,7 +334,8 @@ var InputBase = (_a) => {
|
|
|
334
334
|
wrapperClassName,
|
|
335
335
|
focus,
|
|
336
336
|
secondaryIconColor,
|
|
337
|
-
fullWidth = true
|
|
337
|
+
fullWidth = true,
|
|
338
|
+
wrapperRef
|
|
338
339
|
} = _b, props = __objRest(_b, [
|
|
339
340
|
"id",
|
|
340
341
|
"testid",
|
|
@@ -354,7 +355,8 @@ var InputBase = (_a) => {
|
|
|
354
355
|
"wrapperClassName",
|
|
355
356
|
"focus",
|
|
356
357
|
"secondaryIconColor",
|
|
357
|
-
"fullWidth"
|
|
358
|
+
"fullWidth",
|
|
359
|
+
"wrapperRef"
|
|
358
360
|
]);
|
|
359
361
|
const attributes = {
|
|
360
362
|
"data-error": error && !focus || null,
|
|
@@ -445,6 +447,11 @@ var InputBase = (_a) => {
|
|
|
445
447
|
inputReadOnlyClass,
|
|
446
448
|
wrapperClassName
|
|
447
449
|
),
|
|
450
|
+
ref: (el) => {
|
|
451
|
+
if (wrapperRef) {
|
|
452
|
+
wrapperRef.current = el;
|
|
453
|
+
}
|
|
454
|
+
},
|
|
448
455
|
children: [
|
|
449
456
|
before,
|
|
450
457
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -334,7 +334,8 @@ var InputBase = (_a) => {
|
|
|
334
334
|
wrapperClassName,
|
|
335
335
|
focus,
|
|
336
336
|
secondaryIconColor,
|
|
337
|
-
fullWidth = true
|
|
337
|
+
fullWidth = true,
|
|
338
|
+
wrapperRef
|
|
338
339
|
} = _b, props = __objRest(_b, [
|
|
339
340
|
"id",
|
|
340
341
|
"testid",
|
|
@@ -354,7 +355,8 @@ var InputBase = (_a) => {
|
|
|
354
355
|
"wrapperClassName",
|
|
355
356
|
"focus",
|
|
356
357
|
"secondaryIconColor",
|
|
357
|
-
"fullWidth"
|
|
358
|
+
"fullWidth",
|
|
359
|
+
"wrapperRef"
|
|
358
360
|
]);
|
|
359
361
|
const attributes = {
|
|
360
362
|
"data-error": error && !focus || null,
|
|
@@ -445,6 +447,11 @@ var InputBase = (_a) => {
|
|
|
445
447
|
inputReadOnlyClass,
|
|
446
448
|
wrapperClassName
|
|
447
449
|
),
|
|
450
|
+
ref: (el) => {
|
|
451
|
+
if (wrapperRef) {
|
|
452
|
+
wrapperRef.current = el;
|
|
453
|
+
}
|
|
454
|
+
},
|
|
448
455
|
children: [
|
|
449
456
|
before,
|
|
450
457
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Search
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-6DPFKSCT.js";
|
|
5
|
+
import "../chunk-ZL5X7KP6.js";
|
|
6
6
|
import "../chunk-7CS736EF.js";
|
|
7
7
|
import "../chunk-5UH6QUFB.js";
|
|
8
8
|
import "../chunk-NKUETCDA.js";
|
|
@@ -334,7 +334,8 @@ var InputBase = (_a) => {
|
|
|
334
334
|
wrapperClassName,
|
|
335
335
|
focus,
|
|
336
336
|
secondaryIconColor,
|
|
337
|
-
fullWidth = true
|
|
337
|
+
fullWidth = true,
|
|
338
|
+
wrapperRef
|
|
338
339
|
} = _b, props = __objRest(_b, [
|
|
339
340
|
"id",
|
|
340
341
|
"testid",
|
|
@@ -354,7 +355,8 @@ var InputBase = (_a) => {
|
|
|
354
355
|
"wrapperClassName",
|
|
355
356
|
"focus",
|
|
356
357
|
"secondaryIconColor",
|
|
357
|
-
"fullWidth"
|
|
358
|
+
"fullWidth",
|
|
359
|
+
"wrapperRef"
|
|
358
360
|
]);
|
|
359
361
|
const attributes = {
|
|
360
362
|
"data-error": error && !focus || null,
|
|
@@ -445,6 +447,11 @@ var InputBase = (_a) => {
|
|
|
445
447
|
inputReadOnlyClass,
|
|
446
448
|
wrapperClassName
|
|
447
449
|
),
|
|
450
|
+
ref: (el) => {
|
|
451
|
+
if (wrapperRef) {
|
|
452
|
+
wrapperRef.current = el;
|
|
453
|
+
}
|
|
454
|
+
},
|
|
448
455
|
children: [
|
|
449
456
|
before,
|
|
450
457
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Select
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-J5V2JRIK.js";
|
|
5
|
+
import "../chunk-ZL5X7KP6.js";
|
|
6
6
|
import "../chunk-7CS736EF.js";
|
|
7
7
|
import "../chunk-5UH6QUFB.js";
|
|
8
8
|
import "../chunk-NKUETCDA.js";
|
|
@@ -474,7 +474,8 @@ var InputBase = (_a) => {
|
|
|
474
474
|
wrapperClassName,
|
|
475
475
|
focus,
|
|
476
476
|
secondaryIconColor,
|
|
477
|
-
fullWidth = true
|
|
477
|
+
fullWidth = true,
|
|
478
|
+
wrapperRef
|
|
478
479
|
} = _b, props = __objRest(_b, [
|
|
479
480
|
"id",
|
|
480
481
|
"testid",
|
|
@@ -494,7 +495,8 @@ var InputBase = (_a) => {
|
|
|
494
495
|
"wrapperClassName",
|
|
495
496
|
"focus",
|
|
496
497
|
"secondaryIconColor",
|
|
497
|
-
"fullWidth"
|
|
498
|
+
"fullWidth",
|
|
499
|
+
"wrapperRef"
|
|
498
500
|
]);
|
|
499
501
|
const attributes = {
|
|
500
502
|
"data-error": error && !focus || null,
|
|
@@ -585,6 +587,11 @@ var InputBase = (_a) => {
|
|
|
585
587
|
inputReadOnlyClass,
|
|
586
588
|
wrapperClassName
|
|
587
589
|
),
|
|
590
|
+
ref: (el) => {
|
|
591
|
+
if (wrapperRef) {
|
|
592
|
+
wrapperRef.current = el;
|
|
593
|
+
}
|
|
594
|
+
},
|
|
588
595
|
children: [
|
|
589
596
|
before,
|
|
590
597
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
package/dist/components/Time.cjs
CHANGED
|
@@ -333,7 +333,8 @@ var InputBase = (_a) => {
|
|
|
333
333
|
wrapperClassName,
|
|
334
334
|
focus,
|
|
335
335
|
secondaryIconColor,
|
|
336
|
-
fullWidth = true
|
|
336
|
+
fullWidth = true,
|
|
337
|
+
wrapperRef
|
|
337
338
|
} = _b, props = __objRest(_b, [
|
|
338
339
|
"id",
|
|
339
340
|
"testid",
|
|
@@ -353,7 +354,8 @@ var InputBase = (_a) => {
|
|
|
353
354
|
"wrapperClassName",
|
|
354
355
|
"focus",
|
|
355
356
|
"secondaryIconColor",
|
|
356
|
-
"fullWidth"
|
|
357
|
+
"fullWidth",
|
|
358
|
+
"wrapperRef"
|
|
357
359
|
]);
|
|
358
360
|
const attributes = {
|
|
359
361
|
"data-error": error && !focus || null,
|
|
@@ -444,6 +446,11 @@ var InputBase = (_a) => {
|
|
|
444
446
|
inputReadOnlyClass,
|
|
445
447
|
wrapperClassName
|
|
446
448
|
),
|
|
449
|
+
ref: (el) => {
|
|
450
|
+
if (wrapperRef) {
|
|
451
|
+
wrapperRef.current = el;
|
|
452
|
+
}
|
|
453
|
+
},
|
|
447
454
|
children: [
|
|
448
455
|
before,
|
|
449
456
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
package/dist/components/Time.js
CHANGED
|
@@ -1415,7 +1415,8 @@ var InputBase = (_a) => {
|
|
|
1415
1415
|
wrapperClassName,
|
|
1416
1416
|
focus,
|
|
1417
1417
|
secondaryIconColor,
|
|
1418
|
-
fullWidth = true
|
|
1418
|
+
fullWidth = true,
|
|
1419
|
+
wrapperRef
|
|
1419
1420
|
} = _b, props = __objRest(_b, [
|
|
1420
1421
|
"id",
|
|
1421
1422
|
"testid",
|
|
@@ -1435,7 +1436,8 @@ var InputBase = (_a) => {
|
|
|
1435
1436
|
"wrapperClassName",
|
|
1436
1437
|
"focus",
|
|
1437
1438
|
"secondaryIconColor",
|
|
1438
|
-
"fullWidth"
|
|
1439
|
+
"fullWidth",
|
|
1440
|
+
"wrapperRef"
|
|
1439
1441
|
]);
|
|
1440
1442
|
const attributes = {
|
|
1441
1443
|
"data-error": error && !focus || null,
|
|
@@ -1526,6 +1528,11 @@ var InputBase = (_a) => {
|
|
|
1526
1528
|
inputReadOnlyClass,
|
|
1527
1529
|
wrapperClassName
|
|
1528
1530
|
),
|
|
1531
|
+
ref: (el) => {
|
|
1532
|
+
if (wrapperRef) {
|
|
1533
|
+
wrapperRef.current = el;
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1529
1536
|
children: [
|
|
1530
1537
|
before,
|
|
1531
1538
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
package/dist/components/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataGrid
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-T3TT3SVX.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
6
|
} from "../chunk-QQ5G773N.js";
|
|
7
7
|
import {
|
|
8
8
|
Select
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-J5V2JRIK.js";
|
|
10
10
|
import {
|
|
11
11
|
DataCellHeader,
|
|
12
12
|
DataGridCell,
|
|
13
13
|
DragAlongCell,
|
|
14
14
|
DraggableCellHeader
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-5LMXR6AJ.js";
|
|
16
16
|
import {
|
|
17
17
|
Menu
|
|
18
18
|
} from "../chunk-PGSDEGBP.js";
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
import "../chunk-WVUIIBRR.js";
|
|
24
24
|
import {
|
|
25
25
|
Search
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-6DPFKSCT.js";
|
|
27
27
|
import {
|
|
28
28
|
Input
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-ZL5X7KP6.js";
|
|
30
30
|
import {
|
|
31
31
|
Label
|
|
32
32
|
} from "../chunk-7CS736EF.js";
|
package/package.json
CHANGED
|
@@ -57,6 +57,7 @@ export const DateInput = ({
|
|
|
57
57
|
const [isTyping, setIsTyping] = useState(false);
|
|
58
58
|
const popoverRef = useRef<HTMLDivElement | null>(null);
|
|
59
59
|
const triggerRef = useRef<HTMLInputElement | null>(null);
|
|
60
|
+
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
60
61
|
const [calendarPosition, setCalendarPosition] = useState({
|
|
61
62
|
top: 0,
|
|
62
63
|
left: 0,
|
|
@@ -80,8 +81,8 @@ export const DateInput = ({
|
|
|
80
81
|
}, [visible]);
|
|
81
82
|
|
|
82
83
|
const updatePosition = () => {
|
|
83
|
-
if (
|
|
84
|
-
const rect =
|
|
84
|
+
if (rootRef.current) {
|
|
85
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
85
86
|
setCalendarPosition({
|
|
86
87
|
top: rect.bottom + window.scrollY,
|
|
87
88
|
left: rect.left + window.scrollX,
|
|
@@ -237,6 +238,7 @@ export const DateInput = ({
|
|
|
237
238
|
triggerRef.current = el;
|
|
238
239
|
}}
|
|
239
240
|
{...props}
|
|
241
|
+
wrapperRef={rootRef}
|
|
240
242
|
value={inputValue}
|
|
241
243
|
placeholder={placeholder}
|
|
242
244
|
disabled={disabled}
|
|
@@ -259,8 +261,8 @@ export const DateInput = ({
|
|
|
259
261
|
}}
|
|
260
262
|
className="absolute z-40 bg-white"
|
|
261
263
|
style={{
|
|
262
|
-
top: `${calendarPosition.top +
|
|
263
|
-
left: `${calendarPosition.left
|
|
264
|
+
top: `${calendarPosition.top + 4}px`,
|
|
265
|
+
left: `${calendarPosition.left}px`,
|
|
264
266
|
minWidth: `${calendarPosition.width}px`,
|
|
265
267
|
}}
|
|
266
268
|
>
|
|
@@ -61,6 +61,7 @@ export const DateRangeInput = ({
|
|
|
61
61
|
const [inputValue, setInputValue] = useState("");
|
|
62
62
|
const [isTyping, setIsTyping] = useState(false);
|
|
63
63
|
const popoverRef = useRef<HTMLDivElement | null>(null);
|
|
64
|
+
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
64
65
|
const triggerRef = useRef<HTMLInputElement | null>(null);
|
|
65
66
|
const [calendarPosition, setCalendarPosition] = useState({
|
|
66
67
|
top: 0,
|
|
@@ -84,8 +85,8 @@ export const DateRangeInput = ({
|
|
|
84
85
|
}, [visible]);
|
|
85
86
|
|
|
86
87
|
const updatePosition = () => {
|
|
87
|
-
if (
|
|
88
|
-
const rect =
|
|
88
|
+
if (rootRef.current) {
|
|
89
|
+
const rect = rootRef.current.getBoundingClientRect();
|
|
89
90
|
setCalendarPosition({
|
|
90
91
|
top: rect.bottom + window.scrollY,
|
|
91
92
|
left: rect.left + window.scrollX,
|
|
@@ -583,6 +584,7 @@ export const DateRangeInput = ({
|
|
|
583
584
|
triggerRef.current = el;
|
|
584
585
|
}}
|
|
585
586
|
{...props}
|
|
587
|
+
wrapperRef={rootRef}
|
|
586
588
|
value={inputValue}
|
|
587
589
|
placeholder={disableRange ? "MM/DD/YYYY" : placeholder}
|
|
588
590
|
disabled={disabled}
|
|
@@ -605,8 +607,8 @@ export const DateRangeInput = ({
|
|
|
605
607
|
}}
|
|
606
608
|
className="absolute z-40 bg-white"
|
|
607
609
|
style={{
|
|
608
|
-
top: `${calendarPosition.top +
|
|
609
|
-
left: `${calendarPosition.left
|
|
610
|
+
top: `${calendarPosition.top + 4}px`,
|
|
611
|
+
left: `${calendarPosition.left}px`,
|
|
610
612
|
minWidth: `${calendarPosition.width}px`,
|
|
611
613
|
}}
|
|
612
614
|
>
|
package/src/components/Input.tsx
CHANGED
|
@@ -58,6 +58,7 @@ export type InputBaseProps = {
|
|
|
58
58
|
focus?: boolean;
|
|
59
59
|
secondaryIconColor?: boolean;
|
|
60
60
|
fullWidth?: boolean; // If true, input takes full width of the container
|
|
61
|
+
wrapperRef?: RefObject<HTMLDivElement | null>;
|
|
61
62
|
} & InputFormatting &
|
|
62
63
|
Omit<ComponentProps<"input">, "align" | "id">;
|
|
63
64
|
|
|
@@ -81,6 +82,7 @@ export const InputBase = ({
|
|
|
81
82
|
focus,
|
|
82
83
|
secondaryIconColor,
|
|
83
84
|
fullWidth = true,
|
|
85
|
+
wrapperRef,
|
|
84
86
|
...props
|
|
85
87
|
}: InputBaseProps) => {
|
|
86
88
|
const attributes = {
|
|
@@ -182,6 +184,11 @@ export const InputBase = ({
|
|
|
182
184
|
inputReadOnlyClass,
|
|
183
185
|
wrapperClassName,
|
|
184
186
|
)}
|
|
187
|
+
ref={(el) => {
|
|
188
|
+
if (wrapperRef) {
|
|
189
|
+
wrapperRef.current = el;
|
|
190
|
+
}
|
|
191
|
+
}}
|
|
185
192
|
>
|
|
186
193
|
{before}
|
|
187
194
|
|