@dmsi/wedgekit-react 0.0.257 → 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-2MZ5WKCL.js → chunk-5LMXR6AJ.js} +4 -4
- package/dist/{chunk-7PWT532Y.js → chunk-6DPFKSCT.js} +1 -1
- package/dist/{chunk-PEB3BNN6.js → chunk-AEHXCKEP.js} +1 -1
- package/dist/{chunk-FQRSSPFV.js → chunk-ALDZAM7B.js} +2 -2
- package/dist/{chunk-SYN5FFHV.js → chunk-J5V2JRIK.js} +1 -1
- package/dist/{chunk-KIAURU7N.js → chunk-T3TT3SVX.js} +18 -18
- package/dist/{chunk-5NIAGAA7.js → chunk-ZL5X7KP6.js} +12 -5
- package/dist/components/CalendarRange.cjs +9 -2
- package/dist/components/CalendarRange.js +11 -11
- package/dist/components/DataGridCell.cjs +9 -2
- package/dist/components/DataGridCell.js +6 -6
- package/dist/components/DateInput.cjs +15 -6
- package/dist/components/DateInput.js +19 -17
- package/dist/components/DateRangeInput.cjs +15 -6
- package/dist/components/DateRangeInput.js +19 -17
- package/dist/components/FilterGroup.cjs +9 -2
- package/dist/components/FilterGroup.js +11 -11
- package/dist/components/Input.cjs +9 -2
- package/dist/components/Input.js +2 -2
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid.js +3 -3
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalHeader.js +2 -2
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.js +2 -2
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/Notification.js +3 -3
- package/dist/components/OptionPill.js +2 -2
- package/dist/components/PDFViewer.js +6 -6
- package/dist/components/Password.cjs +9 -2
- package/dist/components/Password.js +2 -2
- package/dist/components/Search.cjs +9 -2
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.cjs +9 -2
- package/dist/components/Select.js +3 -3
- package/dist/components/Stepper.cjs +9 -2
- package/dist/components/Stepper.js +5 -5
- package/dist/components/Time.cjs +9 -2
- package/dist/components/Time.js +4 -4
- package/dist/components/Toast.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +9 -2
- package/dist/components/index.js +17 -17
- 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
- package/dist/{chunk-6CPGOW6J.js → chunk-3C2U4FKR.js} +3 -3
- package/dist/{chunk-KKESN5SF.js → chunk-4XTTJOQA.js} +3 -3
- package/dist/{chunk-XM7IQHBU.js → chunk-5OPI4GTJ.js} +3 -3
- package/dist/{chunk-FLVYV4T4.js → chunk-7CA54V6U.js} +3 -3
- package/dist/{chunk-FHQL42YP.js → chunk-YUBQJQ75.js} +3 -3
|
@@ -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
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading2
|
|
3
3
|
} from "./chunk-EU73QPW7.js";
|
|
4
|
-
import {
|
|
5
|
-
Icon
|
|
6
|
-
} from "./chunk-NKUETCDA.js";
|
|
7
4
|
import {
|
|
8
5
|
Button
|
|
9
6
|
} from "./chunk-WWAPK5PH.js";
|
|
7
|
+
import {
|
|
8
|
+
Icon
|
|
9
|
+
} from "./chunk-NKUETCDA.js";
|
|
10
10
|
import {
|
|
11
11
|
layoutGroupGap,
|
|
12
12
|
layoutPaddding
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label
|
|
3
3
|
} from "./chunk-7CS736EF.js";
|
|
4
|
-
import {
|
|
5
|
-
Icon
|
|
6
|
-
} from "./chunk-NKUETCDA.js";
|
|
7
4
|
import {
|
|
8
5
|
Button
|
|
9
6
|
} from "./chunk-WWAPK5PH.js";
|
|
7
|
+
import {
|
|
8
|
+
Icon
|
|
9
|
+
} from "./chunk-NKUETCDA.js";
|
|
10
10
|
import {
|
|
11
11
|
baseTransition,
|
|
12
12
|
componentGap,
|