@dmsi/wedgekit-react 0.0.501 → 0.0.502

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 (84) hide show
  1. package/dist/{chunk-6XLESQ2U.js → chunk-B2O4TEOI.js} +3 -3
  2. package/dist/{chunk-ELXVDRWS.js → chunk-D4TFZ2WM.js} +4 -4
  3. package/dist/{chunk-CHUKGR7S.js → chunk-F6RZ7MUE.js} +1 -1
  4. package/dist/{chunk-BMPL6LCR.js → chunk-LJLHGLTS.js} +4 -4
  5. package/dist/{chunk-KOU2TO3N.js → chunk-LKKFQLWD.js} +16 -6
  6. package/dist/{chunk-LJWQEZUS.js → chunk-QV3NANQC.js} +6 -6
  7. package/dist/components/Alert.js +2 -2
  8. package/dist/components/CalendarRange.cjs +15 -5
  9. package/dist/components/CalendarRange.css +25 -5
  10. package/dist/components/CalendarRange.js +16 -16
  11. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +15 -5
  12. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +25 -5
  13. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +16 -16
  14. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +15 -5
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +25 -5
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +16 -16
  17. package/dist/components/DataGrid/PinnedColumns.cjs +15 -5
  18. package/dist/components/DataGrid/PinnedColumns.css +25 -5
  19. package/dist/components/DataGrid/PinnedColumns.js +16 -16
  20. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +15 -5
  21. package/dist/components/DataGrid/TableBody/LoadingCell.css +25 -5
  22. package/dist/components/DataGrid/TableBody/LoadingCell.js +16 -16
  23. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +15 -5
  24. package/dist/components/DataGrid/TableBody/TableBodyRow.css +25 -5
  25. package/dist/components/DataGrid/TableBody/TableBodyRow.js +16 -16
  26. package/dist/components/DataGrid/TableBody/index.cjs +15 -5
  27. package/dist/components/DataGrid/TableBody/index.css +25 -5
  28. package/dist/components/DataGrid/TableBody/index.js +16 -16
  29. package/dist/components/DataGrid/index.cjs +15 -5
  30. package/dist/components/DataGrid/index.css +25 -5
  31. package/dist/components/DataGrid/index.js +16 -16
  32. package/dist/components/DataGrid/utils.cjs +15 -5
  33. package/dist/components/DataGrid/utils.css +25 -5
  34. package/dist/components/DataGrid/utils.js +16 -16
  35. package/dist/components/DataGridCell.cjs +15 -5
  36. package/dist/components/DataGridCell.js +2 -2
  37. package/dist/components/DateInput.cjs +15 -5
  38. package/dist/components/DateInput.css +25 -5
  39. package/dist/components/DateInput.js +16 -16
  40. package/dist/components/DateRangeInput.cjs +15 -5
  41. package/dist/components/DateRangeInput.css +25 -5
  42. package/dist/components/DateRangeInput.js +16 -16
  43. package/dist/components/FilterGroup.js +5 -5
  44. package/dist/components/MenuOption.cjs +15 -5
  45. package/dist/components/MenuOption.js +1 -1
  46. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +15 -5
  47. package/dist/components/MobileDataGrid/ColumnSelector/index.css +25 -5
  48. package/dist/components/MobileDataGrid/ColumnSelector/index.js +16 -16
  49. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +15 -5
  50. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +25 -5
  51. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +16 -16
  52. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
  53. package/dist/components/MobileDataGrid/index.cjs +15 -5
  54. package/dist/components/MobileDataGrid/index.css +25 -5
  55. package/dist/components/MobileDataGrid/index.js +16 -16
  56. package/dist/components/Modal.js +4 -4
  57. package/dist/components/ModalButtons.js +2 -2
  58. package/dist/components/ModalHeader.js +2 -2
  59. package/dist/components/NavigationTab.js +2 -2
  60. package/dist/components/NavigationTabs.js +2 -2
  61. package/dist/components/NestedMenu.cjs +15 -5
  62. package/dist/components/NestedMenu.js +4 -4
  63. package/dist/components/Notification.js +3 -3
  64. package/dist/components/OptionPill.js +2 -2
  65. package/dist/components/PDFViewer/DownloadIcon.js +2 -2
  66. package/dist/components/PDFViewer/PDFNavigation.js +2 -2
  67. package/dist/components/PDFViewer/index.js +7 -7
  68. package/dist/components/ProductImagePreview/index.js +1 -1
  69. package/dist/components/Stepper.js +3 -3
  70. package/dist/components/Toast.js +3 -3
  71. package/dist/components/Upload.js +3 -3
  72. package/dist/components/index.cjs +15 -5
  73. package/dist/components/index.css +25 -5
  74. package/dist/components/index.js +22 -22
  75. package/dist/index.css +25 -5
  76. package/package.json +1 -1
  77. package/src/components/MenuOption.tsx +16 -4
  78. package/dist/{chunk-AKJUBFJK.js → chunk-25RZP3VR.js} +3 -3
  79. package/dist/{chunk-56RPZLV7.js → chunk-5DQVYX6H.js} +3 -3
  80. package/dist/{chunk-SPJ6V6WJ.js → chunk-BWBSDSA7.js} +3 -3
  81. package/dist/{chunk-FWCVZWE6.js → chunk-GYEXSNFP.js} +3 -3
  82. package/dist/{chunk-QMMPHXVE.js → chunk-MV6W7OMC.js} +3 -3
  83. package/dist/{chunk-CMMQTIVM.js → chunk-TAPYQBQU.js} +3 -3
  84. package/dist/{chunk-YJGDVWTH.js → chunk-VS53C5ZD.js} +3 -3
@@ -2,9 +2,9 @@ import {
2
2
  DataGrid,
3
3
  DateInput,
4
4
  MobileDataGrid
5
- } from "../chunk-LJWQEZUS.js";
5
+ } from "../chunk-QV3NANQC.js";
6
6
  import "../chunk-M7INAUAJ.js";
7
- import "../chunk-ELXVDRWS.js";
7
+ import "../chunk-D4TFZ2WM.js";
8
8
  import "../chunk-3UUCDNX3.js";
9
9
  import {
10
10
  ProductImagePreview
@@ -15,9 +15,9 @@ import {
15
15
  } from "../chunk-Y5GD2FJA.js";
16
16
  import {
17
17
  PDFViewer
18
- } from "../chunk-6XLESQ2U.js";
18
+ } from "../chunk-B2O4TEOI.js";
19
19
  import "../chunk-VOSQMHNF.js";
20
- import "../chunk-YJGDVWTH.js";
20
+ import "../chunk-VS53C5ZD.js";
21
21
  import "../chunk-S5ZJ3Q7P.js";
22
22
  import "../chunk-MBZ55T2D.js";
23
23
  import "../chunk-2IKT6IHB.js";
@@ -28,12 +28,15 @@ import "../chunk-5YNEY3WO.js";
28
28
  import "../chunk-5IFPG6TS.js";
29
29
  import "../chunk-AJ5M6MVX.js";
30
30
  import "../chunk-UI7P5J5S.js";
31
- import "../chunk-56RPZLV7.js";
31
+ import "../chunk-5DQVYX6H.js";
32
32
  import {
33
33
  Tooltip
34
34
  } from "../chunk-MDB26F6T.js";
35
35
  import "../chunk-AT4AWD6B.js";
36
36
  import "../chunk-EWGHVZL5.js";
37
+ import {
38
+ Select
39
+ } from "../chunk-2TNHD4MQ.js";
37
40
  import {
38
41
  SimpleTable
39
42
  } from "../chunk-OWHPPZZA.js";
@@ -46,34 +49,34 @@ import {
46
49
  import {
47
50
  Pagination
48
51
  } from "../chunk-LB7UT6F3.js";
49
- import {
50
- Select
51
- } from "../chunk-2TNHD4MQ.js";
52
- import "../chunk-BMPL6LCR.js";
52
+ import "../chunk-LJLHGLTS.js";
53
53
  import "../chunk-4RJKB7LC.js";
54
+ import "../chunk-25RZP3VR.js";
54
55
  import "../chunk-WVVEOCEH.js";
55
- import "../chunk-CMMQTIVM.js";
56
+ import "../chunk-TAPYQBQU.js";
56
57
  import "../chunk-AG43RS4Q.js";
57
- import "../chunk-AKJUBFJK.js";
58
+ import "../chunk-SBRRNFOP.js";
59
+ import "../chunk-QVWYTQKL.js";
58
60
  import {
59
61
  ListGroup
60
62
  } from "../chunk-SUSUNSVZ.js";
61
- import "../chunk-SBRRNFOP.js";
63
+ import {
64
+ EmptyCartIcon
65
+ } from "../chunk-75USUR3I.js";
62
66
  import "../chunk-Y2GK27RX.js";
63
- import "../chunk-QVWYTQKL.js";
64
67
  import {
65
68
  DataCellHeader,
66
69
  DataGridCell,
67
70
  DragAlongCell,
68
71
  DraggableCellHeader
69
- } from "../chunk-CHUKGR7S.js";
72
+ } from "../chunk-F6RZ7MUE.js";
70
73
  import {
71
74
  Menu
72
75
  } from "../chunk-TCMOGTPB.js";
73
76
  import "../chunk-DVU5XV7L.js";
74
77
  import {
75
78
  MenuOption
76
- } from "../chunk-KOU2TO3N.js";
79
+ } from "../chunk-LKKFQLWD.js";
77
80
  import {
78
81
  Search
79
82
  } from "../chunk-HK4S6TRH.js";
@@ -84,9 +87,6 @@ import {
84
87
  Label
85
88
  } from "../chunk-HXGJVYGQ.js";
86
89
  import "../chunk-WVUIIBRR.js";
87
- import {
88
- EmptyCartIcon
89
- } from "../chunk-75USUR3I.js";
90
90
  import "../chunk-PS6UJZVH.js";
91
91
  import {
92
92
  Checkbox
@@ -109,8 +109,11 @@ import {
109
109
  } from "../chunk-KBJZUVLM.js";
110
110
  import {
111
111
  Alert
112
- } from "../chunk-SPJ6V6WJ.js";
112
+ } from "../chunk-BWBSDSA7.js";
113
113
  import "../chunk-MXSJF6TW.js";
114
+ import {
115
+ Button
116
+ } from "../chunk-45AHDOAU.js";
114
117
  import {
115
118
  Paragraph
116
119
  } from "../chunk-WMPWWFUJ.js";
@@ -118,9 +121,6 @@ import "../chunk-TPXH53SA.js";
118
121
  import {
119
122
  Icon
120
123
  } from "../chunk-NKUETCDA.js";
121
- import {
122
- Button
123
- } from "../chunk-45AHDOAU.js";
124
124
  import "../chunk-7KWFEH56.js";
125
125
  import "../chunk-ORMEWXMH.js";
126
126
  export {
package/dist/index.css CHANGED
@@ -3274,11 +3274,6 @@
3274
3274
  color: var(--color-text-action-critical-hover);
3275
3275
  }
3276
3276
  }
3277
- .focus\:text-text-action-hover {
3278
- &:focus {
3279
- color: var(--color-text-action-hover);
3280
- }
3281
- }
3282
3277
  .focus\:text-text-action-primary-hover {
3283
3278
  &:focus {
3284
3279
  color: var(--color-text-action-primary-hover);
@@ -3322,6 +3317,16 @@
3322
3317
  outline-style: none;
3323
3318
  }
3324
3319
  }
3320
+ .focus-visible\:bg-background-action-secondary-hover {
3321
+ &:focus-visible {
3322
+ background-color: var(--color-background-action-secondary-hover);
3323
+ }
3324
+ }
3325
+ .focus-visible\:text-text-action-hover {
3326
+ &:focus-visible {
3327
+ color: var(--color-text-action-hover);
3328
+ }
3329
+ }
3325
3330
  .focus-visible\:ring-2 {
3326
3331
  &:focus-visible {
3327
3332
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -3774,6 +3779,21 @@
3774
3779
  }
3775
3780
  }
3776
3781
  }
3782
+ .data-submenu-hovered\:bg-background-action-secondary-active {
3783
+ &[data-submenu-hovered] {
3784
+ background-color: var(--color-background-action-secondary-active);
3785
+ }
3786
+ }
3787
+ .data-submenu-hovered\:bg-background-action-secondary-hover {
3788
+ &[data-submenu-hovered] {
3789
+ background-color: var(--color-background-action-secondary-hover);
3790
+ }
3791
+ }
3792
+ .data-submenu-hovered\:text-text-action-active {
3793
+ &[data-submenu-hovered] {
3794
+ color: var(--color-text-action-active);
3795
+ }
3796
+ }
3777
3797
  .data-\[focus\]\:outline-1 {
3778
3798
  &[data-focus] {
3779
3799
  outline-style: var(--tw-outline-style);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.501",
4
+ "version": "0.0.502",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import clsx from "clsx";
4
- import { PropsWithChildren, ReactNode, RefObject, useId, useRef } from "react";
4
+ import { PropsWithChildren, ReactNode, RefObject, useId, useRef, useState } from "react";
5
5
  import { baseTransition, componentGap, componentPadding, layoutGroupGap } from "../classNames";
6
6
  import { AsProps } from "../types";
7
7
  import { Label, Tags } from "./Label";
@@ -35,6 +35,7 @@ type BaseProps = PropsWithChildren<{
35
35
  subMenuLevel: number;
36
36
  mobileBackMenuOption?: () => ReactNode;
37
37
  mobileHide?: boolean;
38
+ autoFocusOff?: boolean;
38
39
  }) => ReactNode;
39
40
  subMenuLevel?: number;
40
41
  onSubMenuHover: (menuId: string, level: number) => void;
@@ -110,6 +111,7 @@ export const MenuOption = ({
110
111
  const actualRef = (ref || internalRef) as RefObject<HTMLDivElement>;
111
112
  const menuId = useRef(`menu-${uniqueId}`);
112
113
  const isMobile = useMatchesMobile();
114
+ const [isSubMenuHovered, setIsSubMenuHovered] = useState(false);
113
115
 
114
116
  const handleMouseEnter = () => {
115
117
  if (subMenu && onSubMenuHover && !disabled) {
@@ -121,6 +123,8 @@ export const MenuOption = ({
121
123
  if (subMenu && onSubMenuLeave && !disabled) {
122
124
  onSubMenuLeave(subMenuLevel);
123
125
  }
126
+
127
+ setIsSubMenuHovered(false);
124
128
  };
125
129
 
126
130
  const handleMouseMove = () => {
@@ -133,10 +137,12 @@ export const MenuOption = ({
133
137
  if (onSubMenuEnter) {
134
138
  onSubMenuEnter();
135
139
  }
140
+ setIsSubMenuHovered(true);
136
141
  };
137
142
 
138
143
  const additionalAttributes = {
139
144
  "data-selected": selected || null,
145
+ "data-submenu-hovered": isSubMenuHovered || null,
140
146
  };
141
147
 
142
148
  const svgStyles = clsx(
@@ -151,8 +157,9 @@ export const MenuOption = ({
151
157
  clsx(
152
158
  "bg-transparent text-text-primary-normal",
153
159
  "hover:bg-background-action-secondary-hover",
154
- "focus:bg-background-action-secondary-hover",
160
+ "focus-visible:bg-background-action-secondary-hover",
155
161
  "data-selected:bg-background-action-secondary-hover",
162
+ "data-submenu-hovered:bg-background-action-secondary-hover",
156
163
  "active:bg-background-action-secondary-active",
157
164
  );
158
165
 
@@ -165,8 +172,9 @@ export const MenuOption = ({
165
172
  clsx(
166
173
  "text-action-400 bg-transparent",
167
174
  "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
168
- "focus:bg-background-action-secondary-hover focus:text-text-action-hover",
175
+ "focus-visible:bg-background-action-secondary-hover focus-visible:text-text-action-hover",
169
176
  "data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
177
+ "data-submenu-hovered:bg-background-action-secondary-active data-submenu-hovered:text-text-action-active",
170
178
  "active:bg-background-action-secondary-active active:text-text-action-active",
171
179
  );
172
180
 
@@ -244,7 +252,10 @@ export const MenuOption = ({
244
252
  {subMenu && (
245
253
  <div
246
254
  onMouseEnter={handleSubMenuEnter}
247
- onMouseLeave={handleMouseLeave}
255
+ onMouseLeave={() => {
256
+ handleMouseLeave();
257
+ setIsSubMenuHovered(false);
258
+ }}
248
259
  data-submenu-parent={menuId.current}
249
260
  data-menu-level={subMenuLevel + 1}
250
261
  >
@@ -256,6 +267,7 @@ export const MenuOption = ({
256
267
  subMenuLevel,
257
268
  mobileBackMenuOption,
258
269
  mobileHide: isMobile && activeMenu !== menuId.current,
270
+ autoFocusOff: true,
259
271
  })}
260
272
  </div>
261
273
  )}
@@ -1,9 +1,9 @@
1
- import {
2
- Icon
3
- } from "./chunk-NKUETCDA.js";
4
1
  import {
5
2
  Button
6
3
  } from "./chunk-45AHDOAU.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
- Icon
3
- } from "./chunk-NKUETCDA.js";
4
1
  import {
5
2
  Button
6
3
  } from "./chunk-45AHDOAU.js";
4
+ import {
5
+ Icon
6
+ } from "./chunk-NKUETCDA.js";
7
7
 
8
8
  // src/components/PDFViewer/DownloadIcon.tsx
9
9
  import { jsx } from "react/jsx-runtime";
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  Heading2
3
3
  } from "./chunk-MXSJF6TW.js";
4
+ import {
5
+ Button
6
+ } from "./chunk-45AHDOAU.js";
4
7
  import {
5
8
  Paragraph
6
9
  } from "./chunk-WMPWWFUJ.js";
@@ -10,9 +13,6 @@ import {
10
13
  import {
11
14
  Icon
12
15
  } from "./chunk-NKUETCDA.js";
13
- import {
14
- Button
15
- } from "./chunk-45AHDOAU.js";
16
16
  import {
17
17
  __objRest,
18
18
  __spreadProps,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Label
3
3
  } from "./chunk-HXGJVYGQ.js";
4
- import {
5
- Icon
6
- } from "./chunk-NKUETCDA.js";
7
4
  import {
8
5
  Button
9
6
  } from "./chunk-45AHDOAU.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-45AHDOAU.js";
4
+ import {
5
+ Icon
6
+ } from "./chunk-NKUETCDA.js";
7
7
  import {
8
8
  __objRest,
9
9
  __spreadProps,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Heading2
3
3
  } from "./chunk-MXSJF6TW.js";
4
- import {
5
- Icon
6
- } from "./chunk-NKUETCDA.js";
7
4
  import {
8
5
  Button
9
6
  } from "./chunk-45AHDOAU.js";
7
+ import {
8
+ Icon
9
+ } from "./chunk-NKUETCDA.js";
10
10
  import {
11
11
  layoutGroupGap,
12
12
  layoutPaddding
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  Heading3
3
3
  } from "./chunk-MXSJF6TW.js";
4
+ import {
5
+ Button
6
+ } from "./chunk-45AHDOAU.js";
4
7
  import {
5
8
  Paragraph
6
9
  } from "./chunk-WMPWWFUJ.js";
@@ -10,9 +13,6 @@ import {
10
13
  import {
11
14
  Icon
12
15
  } from "./chunk-NKUETCDA.js";
13
- import {
14
- Button
15
- } from "./chunk-45AHDOAU.js";
16
16
 
17
17
  // src/components/PDFViewer/PDFNavigation.tsx
18
18
  import { jsx, jsxs } from "react/jsx-runtime";