@dmsi/wedgekit-react 0.0.46 → 0.0.48

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 (40) hide show
  1. package/dist/{chunk-XIEG2XMD.js → chunk-4EPPG7SE.js} +1 -1
  2. package/dist/{chunk-KXUUKAQM.js → chunk-K27465U2.js} +6 -0
  3. package/dist/{chunk-INYI65WW.js → chunk-S3CQ5VFT.js} +7 -1
  4. package/dist/components/AccessChangerTabItem.cjs +329 -0
  5. package/dist/components/AccessChangerTabItem.js +72 -0
  6. package/dist/components/ContentTab.cjs +7 -1
  7. package/dist/components/ContentTab.js +1 -1
  8. package/dist/components/ContentTabs.cjs +9 -2
  9. package/dist/components/ContentTabs.js +3 -2
  10. package/dist/components/DataGrid.js +11 -11
  11. package/dist/components/DataGridCell.js +3 -3
  12. package/dist/components/DateInput.cjs +5 -1
  13. package/dist/components/DateInput.js +5 -1
  14. package/dist/components/FilterGroup.js +4 -4
  15. package/dist/components/MenuOption.js +2 -2
  16. package/dist/components/MobileDataGrid.cjs +6 -0
  17. package/dist/components/MobileDataGrid.js +4 -4
  18. package/dist/components/Modal.js +3 -3
  19. package/dist/components/NestedMenu.js +2 -2
  20. package/dist/components/Notification.cjs +6 -0
  21. package/dist/components/Notification.js +4 -4
  22. package/dist/components/SideMenuGroup.cjs +6 -0
  23. package/dist/components/SideMenuGroup.js +1 -1
  24. package/dist/components/SideMenuItem.cjs +6 -0
  25. package/dist/components/SideMenuItem.js +1 -1
  26. package/dist/components/Stack.cjs +6 -0
  27. package/dist/components/Stack.js +1 -1
  28. package/dist/components/Swatch.cjs +6 -0
  29. package/dist/components/Swatch.js +1 -1
  30. package/dist/components/Time.cjs +6 -0
  31. package/dist/components/Time.js +1 -1
  32. package/dist/components/Toast.js +3 -3
  33. package/dist/index.css +24 -0
  34. package/package.json +1 -1
  35. package/src/components/AccessChangerTabItem.tsx +56 -0
  36. package/src/components/ContentTab.tsx +7 -1
  37. package/src/components/ContentTabs.tsx +3 -1
  38. package/src/components/DateInput.tsx +19 -14
  39. package/src/components/Stack.tsx +14 -0
  40. package/dist/{chunk-S46RZBT4.js → chunk-T22EH3MG.js} +3 -3
@@ -75,7 +75,7 @@ export const DateInput = ({
75
75
  if (visible) {
76
76
  updatePosition();
77
77
  }
78
- }, [visible])
78
+ }, [visible]);
79
79
 
80
80
  const updatePosition = () => {
81
81
  if (triggerRef.current) {
@@ -148,27 +148,31 @@ export const DateInput = ({
148
148
 
149
149
  const handleClick = () => {
150
150
  handleFocus();
151
- }
151
+ };
152
152
 
153
153
  const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
154
154
  if (readOnly) return;
155
-
155
+
156
156
  const rawValue = event.target.value;
157
157
  const cursorPosition = event.target.selectionStart || 0;
158
158
  setIsTyping(true);
159
-
159
+
160
160
  // Format the input as user types (add slashes automatically)
161
161
  const formattedValue = formatInputValue(rawValue);
162
162
  setInputValue(formattedValue);
163
-
163
+
164
164
  // Restore cursor position after formatting
165
165
  requestAnimationFrame(() => {
166
166
  if (triggerRef.current) {
167
- const newPosition = calculateCursorPosition(rawValue, formattedValue, cursorPosition);
167
+ const newPosition = calculateCursorPosition(
168
+ rawValue,
169
+ formattedValue,
170
+ cursorPosition,
171
+ );
168
172
  triggerRef.current.setSelectionRange(newPosition, newPosition);
169
173
  }
170
174
  });
171
-
175
+
172
176
  // Try to parse and validate the date
173
177
  const parsedDate = parseInputDate(formattedValue);
174
178
  if (parsedDate && isValidDate(parsedDate)) {
@@ -190,14 +194,15 @@ export const DateInput = ({
190
194
  const input = event.target as HTMLInputElement;
191
195
  const cursorPosition = input.selectionStart || 0;
192
196
  const value = input.value;
193
-
197
+
194
198
  // If cursor is right after a slash, move it before the slash
195
199
  if (cursorPosition > 0 && value[cursorPosition - 1] === "/") {
196
200
  event.preventDefault();
197
- const newValue = value.slice(0, cursorPosition - 2) + value.slice(cursorPosition);
201
+ const newValue =
202
+ value.slice(0, cursorPosition - 2) + value.slice(cursorPosition);
198
203
  const formattedValue = formatInputValue(newValue);
199
204
  setInputValue(formattedValue);
200
-
205
+
201
206
  // Set cursor position after the deletion
202
207
  requestAnimationFrame(() => {
203
208
  if (triggerRef.current) {
@@ -205,12 +210,12 @@ export const DateInput = ({
205
210
  triggerRef.current.setSelectionRange(newPosition, newPosition);
206
211
  }
207
212
  });
208
-
213
+
209
214
  setIsTyping(true);
210
215
  return;
211
216
  }
212
217
  }
213
-
218
+
214
219
  if (event.key === "Enter") {
215
220
  const parsedDate = parseInputDate(inputValue);
216
221
  if (parsedDate && isValidDate(parsedDate)) {
@@ -280,6 +285,6 @@ function formatDisplayValue(from?: string): string {
280
285
  if (!isValidDate(from)) {
281
286
  return "";
282
287
  }
283
-
288
+
284
289
  return formatDate(from);
285
- }
290
+ }
@@ -15,6 +15,7 @@ type StackProps = {
15
15
  horizontalMobile?: boolean;
16
16
  padding?: boolean;
17
17
  paddingX?: boolean;
18
+ paddingY?: boolean;
18
19
  margin?: boolean;
19
20
  marginX?: boolean;
20
21
  marginY?: boolean;
@@ -89,6 +90,7 @@ export const Stack = ({
89
90
  grow,
90
91
  padding,
91
92
  paddingX,
93
+ paddingY,
92
94
  margin,
93
95
  marginX,
94
96
  marginY,
@@ -188,6 +190,18 @@ export const Stack = ({
188
190
  paddingX &&
189
191
  sizing === "component" &&
190
192
  "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
193
+ paddingY &&
194
+ sizing === "container" &&
195
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
196
+ paddingY &&
197
+ sizing === "layout" &&
198
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
199
+ paddingY &&
200
+ sizing === "layout-group" &&
201
+ "py-mobile-layout-group-padding desktop:py-desktop-layout-group-padding compact:py-desktop-compact-layout-group-padding",
202
+ paddingY &&
203
+ sizing === "component" &&
204
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
191
205
  margin &&
192
206
  sizing === "container" &&
193
207
  "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useMatchesMobile
3
3
  } from "./chunk-SEKKGFM6.js";
4
- import {
5
- Label
6
- } from "./chunk-S5K22XTH.js";
7
4
  import {
8
5
  Paragraph
9
6
  } from "./chunk-VG4EPHJA.js";
7
+ import {
8
+ Label
9
+ } from "./chunk-S5K22XTH.js";
10
10
  import {
11
11
  Icon
12
12
  } from "./chunk-IGQVA7SC.js";