@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.
Files changed (53) hide show
  1. package/dist/{chunk-2MZ5WKCL.js → chunk-5LMXR6AJ.js} +4 -4
  2. package/dist/{chunk-7PWT532Y.js → chunk-6DPFKSCT.js} +1 -1
  3. package/dist/{chunk-PEB3BNN6.js → chunk-AEHXCKEP.js} +1 -1
  4. package/dist/{chunk-FQRSSPFV.js → chunk-ALDZAM7B.js} +2 -2
  5. package/dist/{chunk-SYN5FFHV.js → chunk-J5V2JRIK.js} +1 -1
  6. package/dist/{chunk-KIAURU7N.js → chunk-T3TT3SVX.js} +18 -18
  7. package/dist/{chunk-5NIAGAA7.js → chunk-ZL5X7KP6.js} +12 -5
  8. package/dist/components/CalendarRange.cjs +9 -2
  9. package/dist/components/CalendarRange.js +11 -11
  10. package/dist/components/DataGridCell.cjs +9 -2
  11. package/dist/components/DataGridCell.js +6 -6
  12. package/dist/components/DateInput.cjs +15 -6
  13. package/dist/components/DateInput.js +19 -17
  14. package/dist/components/DateRangeInput.cjs +15 -6
  15. package/dist/components/DateRangeInput.js +19 -17
  16. package/dist/components/FilterGroup.cjs +9 -2
  17. package/dist/components/FilterGroup.js +11 -11
  18. package/dist/components/Input.cjs +9 -2
  19. package/dist/components/Input.js +2 -2
  20. package/dist/components/MenuOption.js +2 -2
  21. package/dist/components/MobileDataGrid.js +3 -3
  22. package/dist/components/Modal.js +4 -4
  23. package/dist/components/ModalButtons.js +2 -2
  24. package/dist/components/ModalHeader.js +2 -2
  25. package/dist/components/NavigationTab.js +2 -2
  26. package/dist/components/NavigationTabs.js +2 -2
  27. package/dist/components/NestedMenu.js +2 -2
  28. package/dist/components/Notification.js +3 -3
  29. package/dist/components/OptionPill.js +2 -2
  30. package/dist/components/PDFViewer.js +6 -6
  31. package/dist/components/Password.cjs +9 -2
  32. package/dist/components/Password.js +2 -2
  33. package/dist/components/Search.cjs +9 -2
  34. package/dist/components/Search.js +3 -3
  35. package/dist/components/Select.cjs +9 -2
  36. package/dist/components/Select.js +3 -3
  37. package/dist/components/Stepper.cjs +9 -2
  38. package/dist/components/Stepper.js +5 -5
  39. package/dist/components/Time.cjs +9 -2
  40. package/dist/components/Time.js +4 -4
  41. package/dist/components/Toast.js +3 -3
  42. package/dist/components/Upload.js +3 -3
  43. package/dist/components/index.cjs +9 -2
  44. package/dist/components/index.js +17 -17
  45. package/package.json +1 -1
  46. package/src/components/DateInput.tsx +6 -4
  47. package/src/components/DateRangeInput.tsx +6 -4
  48. package/src/components/Input.tsx +7 -0
  49. package/dist/{chunk-6CPGOW6J.js → chunk-3C2U4FKR.js} +3 -3
  50. package/dist/{chunk-KKESN5SF.js → chunk-4XTTJOQA.js} +3 -3
  51. package/dist/{chunk-XM7IQHBU.js → chunk-5OPI4GTJ.js} +3 -3
  52. package/dist/{chunk-FLVYV4T4.js → chunk-7CA54V6U.js} +3 -3
  53. 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 (triggerRef.current) {
84
- const rect = triggerRef.current.getBoundingClientRect();
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 + 16}px`,
263
- left: `${calendarPosition.left - 4}px`,
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 (triggerRef.current) {
88
- const rect = triggerRef.current.getBoundingClientRect();
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 + 16}px`,
609
- left: `${calendarPosition.left - 4}px`,
610
+ top: `${calendarPosition.top + 4}px`,
611
+ left: `${calendarPosition.left}px`,
610
612
  minWidth: `${calendarPosition.width}px`,
611
613
  }}
612
614
  >
@@ -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,
@@ -1,9 +1,9 @@
1
- import {
2
- Icon
3
- } from "./chunk-NKUETCDA.js";
4
1
  import {
5
2
  Button
6
3
  } from "./chunk-WWAPK5PH.js";
4
+ import {
5
+ Icon
6
+ } from "./chunk-NKUETCDA.js";
7
7
  import {
8
8
  layoutGroupGap,
9
9
  layoutPaddding
@@ -1,9 +1,9 @@
1
- import {
2
- useMatchesMobile
3
- } from "./chunk-HIVPC3T4.js";
4
1
  import {
5
2
  Label
6
3
  } from "./chunk-7CS736EF.js";
4
+ import {
5
+ useMatchesMobile
6
+ } from "./chunk-HIVPC3T4.js";
7
7
  import {
8
8
  Paragraph
9
9
  } from "./chunk-OGIFIPKH.js";
@@ -1,9 +1,9 @@
1
- import {
2
- Icon
3
- } from "./chunk-NKUETCDA.js";
4
1
  import {
5
2
  Button
6
3
  } from "./chunk-WWAPK5PH.js";
4
+ import {
5
+ Icon
6
+ } from "./chunk-NKUETCDA.js";
7
7
  import {
8
8
  __objRest,
9
9
  __spreadProps,