@dmsi/wedgekit-react 0.0.500 → 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 (221) hide show
  1. package/dist/{chunk-ZQJMNPCF.js → chunk-25RZP3VR.js} +4 -4
  2. package/dist/{chunk-PIBHG6DH.js → chunk-2TNHD4MQ.js} +1 -1
  3. package/dist/{chunk-3DEYCNUE.js → chunk-3UUCDNX3.js} +4 -4
  4. package/dist/{chunk-LPY6PMAY.js → chunk-45AHDOAU.js} +1 -1
  5. package/dist/{chunk-JUFBGNWW.js → chunk-5DQVYX6H.js} +3 -3
  6. package/dist/{chunk-XIXQUEYC.js → chunk-5YNEY3WO.js} +19 -8
  7. package/dist/{chunk-IXR65MOU.js → chunk-7KWFEH56.js} +4 -0
  8. package/dist/{chunk-4LBQSSGH.js → chunk-B2O4TEOI.js} +4 -4
  9. package/dist/{chunk-4UH72JT2.js → chunk-BWBSDSA7.js} +6 -6
  10. package/dist/{chunk-UCJUC5AZ.js → chunk-BYC6QID5.js} +1 -1
  11. package/dist/{chunk-YD3HWIUJ.js → chunk-D4TFZ2WM.js} +7 -7
  12. package/dist/{chunk-HIKWIY5Q.js → chunk-F6RZ7MUE.js} +3 -3
  13. package/dist/{chunk-XHQOTLG6.js → chunk-FJRYHJUV.js} +1 -1
  14. package/dist/{chunk-2F3R3WXW.js → chunk-GYEXSNFP.js} +5 -5
  15. package/dist/{chunk-5MLYAQQO.js → chunk-HK4S6TRH.js} +1 -1
  16. package/dist/{chunk-AL5QIRY3.js → chunk-HXGJVYGQ.js} +1 -1
  17. package/dist/{chunk-KHIJYWZ7.js → chunk-KIAF4N7M.js} +1 -1
  18. package/dist/{chunk-G4AWTFBQ.js → chunk-KPBG7D3V.js} +3 -3
  19. package/dist/{chunk-GRGDX7JC.js → chunk-LB7UT6F3.js} +2 -2
  20. package/dist/{chunk-TOKS63IK.js → chunk-LJLHGLTS.js} +5 -5
  21. package/dist/{chunk-5R4C5F63.js → chunk-LKKFQLWD.js} +20 -10
  22. package/dist/{chunk-WEAVZEE4.js → chunk-M7WHWZ2J.js} +2 -2
  23. package/dist/{chunk-7GHD74J3.js → chunk-MDB26F6T.js} +1 -1
  24. package/dist/{chunk-Z6HIIJK3.js → chunk-MO52RSXV.js} +1 -1
  25. package/dist/{chunk-IY7SXEVY.js → chunk-MUOYLXBF.js} +3 -3
  26. package/dist/{chunk-PCQXSYTH.js → chunk-MV6W7OMC.js} +3 -3
  27. package/dist/{chunk-H2KC5XUY.js → chunk-MXSJF6TW.js} +1 -1
  28. package/dist/{chunk-7BVUTFZ5.js → chunk-OWHPPZZA.js} +2 -2
  29. package/dist/{chunk-G7EOLHST.js → chunk-PJL5XESN.js} +1 -1
  30. package/dist/{chunk-QMSPTD6L.js → chunk-PRN2EQBX.js} +1 -1
  31. package/dist/{chunk-BTKWHCUE.js → chunk-PS6UJZVH.js} +1 -1
  32. package/dist/{chunk-TWDH7ZDS.js → chunk-QV3NANQC.js} +19 -18
  33. package/dist/{chunk-6TYWM26K.js → chunk-SUSUNSVZ.js} +2 -2
  34. package/dist/{chunk-X4UK7HE2.js → chunk-TAPYQBQU.js} +5 -5
  35. package/dist/{chunk-OZBB6RFM.js → chunk-TMHOK37S.js} +1 -1
  36. package/dist/{chunk-DORD2EBO.js → chunk-TPXH53SA.js} +3 -3
  37. package/dist/{chunk-KW6V7O3H.js → chunk-UI7P5J5S.js} +15 -5
  38. package/dist/{chunk-YEZBNQZI.js → chunk-VOSQMHNF.js} +1 -1
  39. package/dist/{chunk-B53XDCLO.js → chunk-VS53C5ZD.js} +6 -6
  40. package/dist/{chunk-ZSETMD4A.js → chunk-WMPWWFUJ.js} +1 -1
  41. package/dist/{chunk-FG7GNGE3.js → chunk-WVVEOCEH.js} +1 -1
  42. package/dist/components/AccessChangerTabItem.cjs +3 -0
  43. package/dist/components/AccessChangerTabItem.js +2 -2
  44. package/dist/components/Accordion.cjs +5 -2
  45. package/dist/components/Accordion.js +4 -4
  46. package/dist/components/Alert.cjs +5 -2
  47. package/dist/components/Alert.js +6 -6
  48. package/dist/components/Breadcrumbs.cjs +4 -1
  49. package/dist/components/Breadcrumbs.js +3 -3
  50. package/dist/components/Button.cjs +3 -0
  51. package/dist/components/Button.js +2 -2
  52. package/dist/components/CalendarRange.cjs +18 -5
  53. package/dist/components/CalendarRange.css +28 -5
  54. package/dist/components/CalendarRange.js +38 -38
  55. package/dist/components/Caption.cjs +3 -0
  56. package/dist/components/Caption.js +2 -2
  57. package/dist/components/Checkbox.cjs +3 -0
  58. package/dist/components/Checkbox.js +3 -3
  59. package/dist/components/CompactImagesPreview.cjs +5 -2
  60. package/dist/components/CompactImagesPreview.js +3 -3
  61. package/dist/components/ContentTab.cjs +3 -0
  62. package/dist/components/ContentTab.js +3 -3
  63. package/dist/components/ContentTabs.cjs +3 -0
  64. package/dist/components/ContentTabs.js +3 -3
  65. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +18 -5
  66. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +28 -5
  67. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +38 -38
  68. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +18 -5
  69. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +28 -5
  70. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +38 -38
  71. package/dist/components/DataGrid/PinnedColumns.cjs +18 -5
  72. package/dist/components/DataGrid/PinnedColumns.css +28 -5
  73. package/dist/components/DataGrid/PinnedColumns.js +38 -38
  74. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +18 -5
  75. package/dist/components/DataGrid/TableBody/LoadingCell.css +28 -5
  76. package/dist/components/DataGrid/TableBody/LoadingCell.js +38 -38
  77. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +18 -5
  78. package/dist/components/DataGrid/TableBody/TableBodyRow.css +28 -5
  79. package/dist/components/DataGrid/TableBody/TableBodyRow.js +38 -38
  80. package/dist/components/DataGrid/TableBody/index.cjs +18 -5
  81. package/dist/components/DataGrid/TableBody/index.css +28 -5
  82. package/dist/components/DataGrid/TableBody/index.js +38 -38
  83. package/dist/components/DataGrid/index.cjs +18 -5
  84. package/dist/components/DataGrid/index.css +28 -5
  85. package/dist/components/DataGrid/index.js +38 -38
  86. package/dist/components/DataGrid/utils.cjs +18 -5
  87. package/dist/components/DataGrid/utils.css +28 -5
  88. package/dist/components/DataGrid/utils.js +38 -38
  89. package/dist/components/DataGridCell.cjs +18 -5
  90. package/dist/components/DataGridCell.js +8 -8
  91. package/dist/components/DateInput.cjs +18 -5
  92. package/dist/components/DateInput.css +28 -5
  93. package/dist/components/DateInput.js +38 -38
  94. package/dist/components/DateRangeInput.cjs +18 -5
  95. package/dist/components/DateRangeInput.css +28 -5
  96. package/dist/components/DateRangeInput.js +38 -38
  97. package/dist/components/Display.cjs +3 -0
  98. package/dist/components/Display.js +2 -2
  99. package/dist/components/FilterGroup.cjs +3 -0
  100. package/dist/components/FilterGroup.js +11 -11
  101. package/dist/components/Heading.cjs +3 -0
  102. package/dist/components/Heading.js +2 -2
  103. package/dist/components/HorizontalDivider.cjs +40 -3
  104. package/dist/components/HorizontalDivider.js +18 -4
  105. package/dist/components/Input.cjs +3 -0
  106. package/dist/components/Input.js +4 -4
  107. package/dist/components/InputGroup.cjs +3 -0
  108. package/dist/components/InputGroup.js +2 -2
  109. package/dist/components/Label.cjs +3 -0
  110. package/dist/components/Label.js +2 -2
  111. package/dist/components/Link.cjs +3 -0
  112. package/dist/components/Link.js +2 -2
  113. package/dist/components/ListGroup.cjs +5 -2
  114. package/dist/components/ListGroup.js +4 -4
  115. package/dist/components/MainBar.cjs +3 -0
  116. package/dist/components/MainBar.js +1 -1
  117. package/dist/components/MenuOption.cjs +18 -5
  118. package/dist/components/MenuOption.js +5 -5
  119. package/dist/components/MobileDataGrid/ColumnList.cjs +73 -9
  120. package/dist/components/MobileDataGrid/ColumnList.js +11 -8
  121. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +18 -5
  122. package/dist/components/MobileDataGrid/ColumnSelector/index.css +28 -5
  123. package/dist/components/MobileDataGrid/ColumnSelector/index.js +38 -38
  124. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.cjs +62 -4
  125. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +6 -3
  126. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +73 -9
  127. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +10 -7
  128. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +21 -7
  129. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +28 -5
  130. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +38 -38
  131. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +65 -7
  132. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +8 -5
  133. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +65 -7
  134. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +12 -12
  135. package/dist/components/MobileDataGrid/index.cjs +42 -15
  136. package/dist/components/MobileDataGrid/index.css +28 -5
  137. package/dist/components/MobileDataGrid/index.js +38 -38
  138. package/dist/components/Modal.cjs +3 -0
  139. package/dist/components/Modal.js +7 -7
  140. package/dist/components/ModalButtons.cjs +3 -0
  141. package/dist/components/ModalButtons.js +3 -3
  142. package/dist/components/ModalContent.cjs +3 -0
  143. package/dist/components/ModalContent.js +2 -2
  144. package/dist/components/ModalHeader.cjs +3 -0
  145. package/dist/components/ModalHeader.js +4 -4
  146. package/dist/components/NavigationTab.cjs +3 -0
  147. package/dist/components/NavigationTab.js +3 -3
  148. package/dist/components/NavigationTabs.cjs +3 -0
  149. package/dist/components/NavigationTabs.js +3 -3
  150. package/dist/components/NestedMenu.cjs +18 -5
  151. package/dist/components/NestedMenu.js +8 -8
  152. package/dist/components/Notification.cjs +5 -2
  153. package/dist/components/Notification.js +7 -7
  154. package/dist/components/OptionPill.cjs +3 -0
  155. package/dist/components/OptionPill.js +4 -4
  156. package/dist/components/PDFViewer/DownloadIcon.cjs +3 -0
  157. package/dist/components/PDFViewer/DownloadIcon.js +3 -3
  158. package/dist/components/PDFViewer/PDFElement.cjs +5 -2
  159. package/dist/components/PDFViewer/PDFElement.js +3 -3
  160. package/dist/components/PDFViewer/PDFNavigation.cjs +5 -2
  161. package/dist/components/PDFViewer/PDFNavigation.js +6 -6
  162. package/dist/components/PDFViewer/index.cjs +5 -2
  163. package/dist/components/PDFViewer/index.js +13 -13
  164. package/dist/components/Pagination.cjs +3 -0
  165. package/dist/components/Pagination.js +3 -3
  166. package/dist/components/Paragraph.cjs +3 -0
  167. package/dist/components/Paragraph.js +2 -2
  168. package/dist/components/Password.cjs +3 -0
  169. package/dist/components/Password.js +4 -4
  170. package/dist/components/ProductImagePreview/index.cjs +5 -2
  171. package/dist/components/ProductImagePreview/index.js +4 -4
  172. package/dist/components/ProjectBar.cjs +3 -0
  173. package/dist/components/ProjectBar.js +1 -1
  174. package/dist/components/Radio.cjs +3 -0
  175. package/dist/components/Radio.js +2 -2
  176. package/dist/components/Search.cjs +3 -0
  177. package/dist/components/Search.js +5 -5
  178. package/dist/components/Select.cjs +3 -0
  179. package/dist/components/Select.js +5 -5
  180. package/dist/components/SideMenuGroup.cjs +5 -2
  181. package/dist/components/SideMenuGroup.js +3 -3
  182. package/dist/components/SideMenuItem.cjs +5 -2
  183. package/dist/components/SideMenuItem.js +3 -3
  184. package/dist/components/SimpleTable.cjs +5 -2
  185. package/dist/components/SimpleTable.js +4 -4
  186. package/dist/components/Stack.cjs +5 -2
  187. package/dist/components/Stack.js +2 -2
  188. package/dist/components/StatusPill.cjs +3 -0
  189. package/dist/components/StatusPill.js +2 -2
  190. package/dist/components/Stepper.cjs +3 -0
  191. package/dist/components/Stepper.js +7 -7
  192. package/dist/components/Subheader.cjs +3 -0
  193. package/dist/components/Subheader.js +2 -2
  194. package/dist/components/Swatch.cjs +5 -2
  195. package/dist/components/Swatch.js +5 -5
  196. package/dist/components/Textarea.cjs +3 -0
  197. package/dist/components/Textarea.js +1 -1
  198. package/dist/components/Time.cjs +5 -2
  199. package/dist/components/Time.js +5 -5
  200. package/dist/components/Toast.cjs +3 -0
  201. package/dist/components/Toast.js +6 -6
  202. package/dist/components/Tooltip.cjs +3 -0
  203. package/dist/components/Tooltip.js +2 -2
  204. package/dist/components/TopBar.cjs +3 -0
  205. package/dist/components/TopBar.js +1 -1
  206. package/dist/components/Upload.cjs +5 -2
  207. package/dist/components/Upload.js +6 -6
  208. package/dist/components/index.cjs +42 -15
  209. package/dist/components/index.css +28 -5
  210. package/dist/components/index.js +45 -45
  211. package/dist/index.css +28 -5
  212. package/package.json +1 -1
  213. package/src/classNames.ts +4 -0
  214. package/src/components/Breadcrumbs.tsx +1 -1
  215. package/src/components/HorizontalDivider.tsx +16 -3
  216. package/src/components/MenuOption.tsx +16 -4
  217. package/src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx +12 -5
  218. package/src/components/MobileDataGrid/MobileDataGridCard/index.tsx +11 -2
  219. package/src/components/MobileDataGrid/MobileDataGridHeader.tsx +1 -0
  220. package/src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx +1 -1
  221. package/src/components/Stack.tsx +1 -0
@@ -267,6 +267,9 @@ var layoutPaddingBottom = (0, import_clsx.default)(
267
267
  var layoutPaddingY = (0, import_clsx.default)(
268
268
  "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
269
269
  );
270
+ var layoutPaddingX = (0, import_clsx.default)(
271
+ "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding"
272
+ );
270
273
  var containerPaddingX = (0, import_clsx.default)(
271
274
  "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
272
275
  );
@@ -874,6 +877,7 @@ var MenuOption = ({
874
877
  const actualRef = ref || internalRef;
875
878
  const menuId = (0, import_react6.useRef)(`menu-${uniqueId}`);
876
879
  const isMobile = useMatchesMobile();
880
+ const [isSubMenuHovered, setIsSubMenuHovered] = (0, import_react6.useState)(false);
877
881
  const handleMouseEnter = () => {
878
882
  if (subMenu && onSubMenuHover && !disabled) {
879
883
  onSubMenuHover(menuId.current, subMenuLevel);
@@ -883,6 +887,7 @@ var MenuOption = ({
883
887
  if (subMenu && onSubMenuLeave && !disabled) {
884
888
  onSubMenuLeave(subMenuLevel);
885
889
  }
890
+ setIsSubMenuHovered(false);
886
891
  };
887
892
  const handleMouseMove = () => {
888
893
  if (subMenu && onMouseMove && !disabled) {
@@ -893,9 +898,11 @@ var MenuOption = ({
893
898
  if (onSubMenuEnter) {
894
899
  onSubMenuEnter();
895
900
  }
901
+ setIsSubMenuHovered(true);
896
902
  };
897
903
  const additionalAttributes = {
898
- "data-selected": selected || null
904
+ "data-selected": selected || null,
905
+ "data-submenu-hovered": isSubMenuHovered || null
899
906
  };
900
907
  const svgStyles = (0, import_clsx6.default)(
901
908
  "[&>svg]:shrink-0 [&>svg]:fill-icon-action-primary-normal"
@@ -904,16 +911,18 @@ var MenuOption = ({
904
911
  const normalStyles = variant === "normal" && !disabled && (0, import_clsx6.default)(
905
912
  "bg-transparent text-text-primary-normal",
906
913
  "hover:bg-background-action-secondary-hover",
907
- "focus:bg-background-action-secondary-hover",
914
+ "focus-visible:bg-background-action-secondary-hover",
908
915
  "data-selected:bg-background-action-secondary-hover",
916
+ "data-submenu-hovered:bg-background-action-secondary-hover",
909
917
  "active:bg-background-action-secondary-active"
910
918
  );
911
919
  const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx6.default)("text-text-primary-disabled");
912
920
  const actionStyles = variant === "action" && !disabled && (0, import_clsx6.default)(
913
921
  "text-action-400 bg-transparent",
914
922
  "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
915
- "focus:bg-background-action-secondary-hover focus:text-text-action-hover",
923
+ "focus-visible:bg-background-action-secondary-hover focus-visible:text-text-action-hover",
916
924
  "data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
925
+ "data-submenu-hovered:bg-background-action-secondary-active data-submenu-hovered:text-text-action-active",
917
926
  "active:bg-background-action-secondary-active active:text-text-action-active"
918
927
  );
919
928
  const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx6.default)("text-text-action-disabled");
@@ -965,7 +974,10 @@ var MenuOption = ({
965
974
  "div",
966
975
  {
967
976
  onMouseEnter: handleSubMenuEnter,
968
- onMouseLeave: handleMouseLeave,
977
+ onMouseLeave: () => {
978
+ handleMouseLeave();
979
+ setIsSubMenuHovered(false);
980
+ },
969
981
  "data-submenu-parent": menuId.current,
970
982
  "data-menu-level": subMenuLevel + 1,
971
983
  children: subMenu({
@@ -975,7 +987,8 @@ var MenuOption = ({
975
987
  position: "right",
976
988
  subMenuLevel,
977
989
  mobileBackMenuOption,
978
- mobileHide: isMobile && activeMenu !== menuId.current
990
+ mobileHide: isMobile && activeMenu !== menuId.current,
991
+ autoFocusOff: true
979
992
  })
980
993
  }
981
994
  )
@@ -5176,7 +5189,7 @@ var Stack = (_a) => {
5176
5189
  id,
5177
5190
  "data-testid": testid
5178
5191
  }, props), {
5179
- style: {
5192
+ style: __spreadValues({
5180
5193
  height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
5181
5194
  maxHeight: maxHeight !== void 0 ? isNaN(+maxHeight) ? maxHeight : `${maxHeight}px` : (_a2 = props.style) == null ? void 0 : _a2.maxHeight,
5182
5195
  maxWidth: maxWidth !== void 0 ? isNaN(+maxWidth) ? maxWidth : `${maxWidth}px` : (_b2 = props.style) == null ? void 0 : _b2.maxWidth,
@@ -5201,7 +5214,7 @@ var Stack = (_a) => {
5201
5214
  flexWrap,
5202
5215
  paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
5203
5216
  gap: (_g = props.style) == null ? void 0 : _g.gap
5204
- },
5217
+ }, props.style),
5205
5218
  className: (0, import_clsx22.default)(
5206
5219
  "scrollbar-thin",
5207
5220
  "max-w-screen",
@@ -5592,6 +5605,7 @@ function MobileDataGridHeader({
5592
5605
  items: "center",
5593
5606
  justify: "between",
5594
5607
  backgroundColor: "background-primary-normal",
5608
+ style: { borderTopRightRadius: 4, borderTopLeftRadius: 4 },
5595
5609
  children: [
5596
5610
  enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5597
5611
  Checkbox,
@@ -6181,15 +6195,22 @@ Modal.displayName = "Modal";
6181
6195
  // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
6182
6196
  var import_jsx_runtime38 = require("react/jsx-runtime");
6183
6197
  function MobileDataGridColumn(props) {
6184
- var _a;
6198
+ var _a, _b;
6185
6199
  const { column, data } = props;
6186
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-2 gap-2 px-3 flex-1", children: [
6200
+ let value;
6201
+ if (column.id) {
6202
+ value = data[column.id];
6203
+ if (((_a = column.meta) == null ? void 0 : _a.format) === "date" && typeof value === "string") {
6204
+ value = formatDate(value);
6205
+ }
6206
+ }
6207
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-2 gap-2 flex-1", children: [
6187
6208
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
6188
- (_a = column.header) == null ? void 0 : _a.toString(),
6209
+ (_b = column.header) == null ? void 0 : _b.toString(),
6189
6210
  ":"
6190
6211
  ] }),
6191
6212
  " ",
6192
- column.id && data[column.id] ? data[column.id] : null
6213
+ value ? value : null
6193
6214
  ] });
6194
6215
  }
6195
6216
 
@@ -6208,7 +6229,7 @@ function ModalContent2() {
6208
6229
  return ((_a = column.meta) == null ? void 0 : _a.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6209
6230
  "div",
6210
6231
  {
6211
- className: "grid grid-cols-2 gap-2 px-3 items-center flex-1",
6232
+ className: "grid grid-cols-2 gap-2 items-center flex-1",
6212
6233
  children: [
6213
6234
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
6214
6235
  (_b = column.header) == null ? void 0 : _b.toString(),
@@ -6314,8 +6335,12 @@ function MobileDataGridCard({
6314
6335
  id: id ? `${id}-card-${getId(data)}` : void 0,
6315
6336
  "data-testid": testid ? `${testid}-card-${getId(data)}` : void 0,
6316
6337
  className: (0, import_clsx30.default)(
6338
+ "flex flex-col",
6317
6339
  "hover:bg-action-100 cursor-pointer list-none",
6318
- selected ? "bg-action-100" : "bg-background-grouped-primary-normal"
6340
+ selected ? "bg-action-100" : "bg-background-grouped-primary-normal",
6341
+ layoutGroupGap,
6342
+ layoutPaddingX,
6343
+ paddingYUsingLayoutGroupGap
6319
6344
  ),
6320
6345
  onClick: () => openRowDetail(data),
6321
6346
  children: [
@@ -6327,6 +6352,7 @@ function MobileDataGridCard({
6327
6352
  sizing: "component",
6328
6353
  padding: true,
6329
6354
  width: "fit",
6355
+ style: { paddingLeft: 0, paddingRight: 8 },
6330
6356
  onClick: (e) => e.stopPropagation(),
6331
6357
  children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6332
6358
  Checkbox,
@@ -6345,6 +6371,7 @@ function MobileDataGridCard({
6345
6371
  sizing: "component",
6346
6372
  padding: true,
6347
6373
  onClick: (e) => e.stopPropagation(),
6374
+ style: { paddingInline: 0 },
6348
6375
  children: renderLink ? renderLink(data) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Subheader, { children: String((_a = data[context.primaryKey]) != null ? _a : "") })
6349
6376
  }
6350
6377
  ),
@@ -6370,7 +6397,7 @@ function MobileDataGridCard({
6370
6397
  return ((_a2 = column.meta) == null ? void 0 : _a2.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6371
6398
  "div",
6372
6399
  {
6373
- className: "grid grid-cols-2 gap-2 px-3 items-center flex-1",
6400
+ className: "grid grid-cols-2 gap-2 items-center flex-1",
6374
6401
  children: [
6375
6402
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6376
6403
  Paragraph,
@@ -6406,7 +6433,7 @@ function MobileDataGridCard({
6406
6433
  }
6407
6434
  ) })
6408
6435
  ] }),
6409
- renderChevron && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "keyboard_arrow_down" }) })
6436
+ renderChevron && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-icon-primary-normal", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "keyboard_arrow_down" }) }) })
6410
6437
  ]
6411
6438
  }
6412
6439
  );
@@ -2102,6 +2102,9 @@
2102
2102
  .font-sans {
2103
2103
  font-family: var(--font-sans);
2104
2104
  }
2105
+ .\!text-caption-desktop {
2106
+ font-size: var(--text-caption-desktop) !important;
2107
+ }
2105
2108
  .text-\[0\.6rem\] {
2106
2109
  font-size: 0.6rem;
2107
2110
  }
@@ -3293,11 +3296,6 @@
3293
3296
  color: var(--color-text-action-critical-hover);
3294
3297
  }
3295
3298
  }
3296
- .focus\:text-text-action-hover {
3297
- &:focus {
3298
- color: var(--color-text-action-hover);
3299
- }
3300
- }
3301
3299
  .focus\:text-text-action-primary-hover {
3302
3300
  &:focus {
3303
3301
  color: var(--color-text-action-primary-hover);
@@ -3341,6 +3339,16 @@
3341
3339
  outline-style: none;
3342
3340
  }
3343
3341
  }
3342
+ .focus-visible\:bg-background-action-secondary-hover {
3343
+ &:focus-visible {
3344
+ background-color: var(--color-background-action-secondary-hover);
3345
+ }
3346
+ }
3347
+ .focus-visible\:text-text-action-hover {
3348
+ &:focus-visible {
3349
+ color: var(--color-text-action-hover);
3350
+ }
3351
+ }
3344
3352
  .focus-visible\:ring-2 {
3345
3353
  &:focus-visible {
3346
3354
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -3793,6 +3801,21 @@
3793
3801
  }
3794
3802
  }
3795
3803
  }
3804
+ .data-submenu-hovered\:bg-background-action-secondary-active {
3805
+ &[data-submenu-hovered] {
3806
+ background-color: var(--color-background-action-secondary-active);
3807
+ }
3808
+ }
3809
+ .data-submenu-hovered\:bg-background-action-secondary-hover {
3810
+ &[data-submenu-hovered] {
3811
+ background-color: var(--color-background-action-secondary-hover);
3812
+ }
3813
+ }
3814
+ .data-submenu-hovered\:text-text-action-active {
3815
+ &[data-submenu-hovered] {
3816
+ color: var(--color-text-action-active);
3817
+ }
3818
+ }
3796
3819
  .data-\[focus\]\:outline-1 {
3797
3820
  &[data-focus] {
3798
3821
  outline-style: var(--tw-outline-style);
@@ -2,41 +2,44 @@ import {
2
2
  DataGrid,
3
3
  DateInput,
4
4
  MobileDataGrid
5
- } from "../chunk-TWDH7ZDS.js";
5
+ } from "../chunk-QV3NANQC.js";
6
6
  import "../chunk-M7INAUAJ.js";
7
- import "../chunk-YD3HWIUJ.js";
8
- import "../chunk-3DEYCNUE.js";
7
+ import "../chunk-D4TFZ2WM.js";
8
+ import "../chunk-3UUCDNX3.js";
9
9
  import {
10
10
  ProductImagePreview
11
- } from "../chunk-XHQOTLG6.js";
11
+ } from "../chunk-FJRYHJUV.js";
12
12
  import "../chunk-BQNPOGD5.js";
13
13
  import {
14
14
  SearchResultImage
15
15
  } from "../chunk-Y5GD2FJA.js";
16
16
  import {
17
17
  PDFViewer
18
- } from "../chunk-4LBQSSGH.js";
19
- import "../chunk-YEZBNQZI.js";
20
- import "../chunk-B53XDCLO.js";
18
+ } from "../chunk-B2O4TEOI.js";
19
+ import "../chunk-VOSQMHNF.js";
20
+ import "../chunk-VS53C5ZD.js";
21
21
  import "../chunk-S5ZJ3Q7P.js";
22
22
  import "../chunk-MBZ55T2D.js";
23
23
  import "../chunk-2IKT6IHB.js";
24
24
  import "../chunk-YCDDBSVU.js";
25
25
  import "../chunk-3X3Y4TMS.js";
26
- import "../chunk-QMSPTD6L.js";
27
- import "../chunk-XIXQUEYC.js";
26
+ import "../chunk-PRN2EQBX.js";
27
+ import "../chunk-5YNEY3WO.js";
28
28
  import "../chunk-5IFPG6TS.js";
29
29
  import "../chunk-AJ5M6MVX.js";
30
- import "../chunk-KW6V7O3H.js";
31
- import "../chunk-JUFBGNWW.js";
30
+ import "../chunk-UI7P5J5S.js";
31
+ import "../chunk-5DQVYX6H.js";
32
32
  import {
33
33
  Tooltip
34
- } from "../chunk-7GHD74J3.js";
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
- } from "../chunk-7BVUTFZ5.js";
42
+ } from "../chunk-OWHPPZZA.js";
40
43
  import {
41
44
  SkeletonParagraph
42
45
  } from "../chunk-L3BXRDLP.js";
@@ -45,83 +48,80 @@ import {
45
48
  } from "../chunk-34VEVX5H.js";
46
49
  import {
47
50
  Pagination
48
- } from "../chunk-GRGDX7JC.js";
49
- import {
50
- Select
51
- } from "../chunk-PIBHG6DH.js";
52
- import "../chunk-TOKS63IK.js";
51
+ } from "../chunk-LB7UT6F3.js";
52
+ import "../chunk-LJLHGLTS.js";
53
53
  import "../chunk-4RJKB7LC.js";
54
- import "../chunk-FG7GNGE3.js";
55
- import "../chunk-X4UK7HE2.js";
54
+ import "../chunk-25RZP3VR.js";
55
+ import "../chunk-WVVEOCEH.js";
56
+ import "../chunk-TAPYQBQU.js";
56
57
  import "../chunk-AG43RS4Q.js";
57
- import "../chunk-ZQJMNPCF.js";
58
+ import "../chunk-SBRRNFOP.js";
59
+ import "../chunk-QVWYTQKL.js";
58
60
  import {
59
61
  ListGroup
60
- } from "../chunk-6TYWM26K.js";
61
- import "../chunk-SBRRNFOP.js";
62
+ } from "../chunk-SUSUNSVZ.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-HIKWIY5Q.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-5R4C5F63.js";
79
+ } from "../chunk-LKKFQLWD.js";
77
80
  import {
78
81
  Search
79
- } from "../chunk-5MLYAQQO.js";
82
+ } from "../chunk-HK4S6TRH.js";
80
83
  import {
81
84
  Input
82
- } from "../chunk-G4AWTFBQ.js";
85
+ } from "../chunk-KPBG7D3V.js";
83
86
  import {
84
87
  Label
85
- } from "../chunk-AL5QIRY3.js";
88
+ } from "../chunk-HXGJVYGQ.js";
86
89
  import "../chunk-WVUIIBRR.js";
87
- import {
88
- EmptyCartIcon
89
- } from "../chunk-75USUR3I.js";
90
- import "../chunk-BTKWHCUE.js";
90
+ import "../chunk-PS6UJZVH.js";
91
91
  import {
92
92
  Checkbox
93
- } from "../chunk-WEAVZEE4.js";
93
+ } from "../chunk-M7WHWZ2J.js";
94
94
  import {
95
95
  CompactImagesPreview
96
- } from "../chunk-OZBB6RFM.js";
96
+ } from "../chunk-TMHOK37S.js";
97
97
  import "../chunk-URYQ24NF.js";
98
98
  import "../chunk-VXWSAIB5.js";
99
99
  import "../chunk-R3EQIDBX.js";
100
100
  import "../chunk-5UH6QUFB.js";
101
101
  import {
102
102
  Subheader
103
- } from "../chunk-UCJUC5AZ.js";
103
+ } from "../chunk-BYC6QID5.js";
104
104
  import {
105
105
  Accordion
106
- } from "../chunk-IY7SXEVY.js";
106
+ } from "../chunk-MUOYLXBF.js";
107
107
  import {
108
108
  Card
109
109
  } from "../chunk-KBJZUVLM.js";
110
110
  import {
111
111
  Alert
112
- } from "../chunk-4UH72JT2.js";
113
- import "../chunk-H2KC5XUY.js";
112
+ } from "../chunk-BWBSDSA7.js";
113
+ import "../chunk-MXSJF6TW.js";
114
+ import {
115
+ Button
116
+ } from "../chunk-45AHDOAU.js";
114
117
  import {
115
118
  Paragraph
116
- } from "../chunk-ZSETMD4A.js";
117
- import "../chunk-DORD2EBO.js";
119
+ } from "../chunk-WMPWWFUJ.js";
120
+ import "../chunk-TPXH53SA.js";
118
121
  import {
119
122
  Icon
120
123
  } from "../chunk-NKUETCDA.js";
121
- import {
122
- Button
123
- } from "../chunk-LPY6PMAY.js";
124
- import "../chunk-IXR65MOU.js";
124
+ import "../chunk-7KWFEH56.js";
125
125
  import "../chunk-ORMEWXMH.js";
126
126
  export {
127
127
  Accordion,
package/dist/index.css CHANGED
@@ -2080,6 +2080,9 @@
2080
2080
  .font-sans {
2081
2081
  font-family: var(--font-sans);
2082
2082
  }
2083
+ .\!text-caption-desktop {
2084
+ font-size: var(--text-caption-desktop) !important;
2085
+ }
2083
2086
  .text-\[0\.6rem\] {
2084
2087
  font-size: 0.6rem;
2085
2088
  }
@@ -3271,11 +3274,6 @@
3271
3274
  color: var(--color-text-action-critical-hover);
3272
3275
  }
3273
3276
  }
3274
- .focus\:text-text-action-hover {
3275
- &:focus {
3276
- color: var(--color-text-action-hover);
3277
- }
3278
- }
3279
3277
  .focus\:text-text-action-primary-hover {
3280
3278
  &:focus {
3281
3279
  color: var(--color-text-action-primary-hover);
@@ -3319,6 +3317,16 @@
3319
3317
  outline-style: none;
3320
3318
  }
3321
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
+ }
3322
3330
  .focus-visible\:ring-2 {
3323
3331
  &:focus-visible {
3324
3332
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -3771,6 +3779,21 @@
3771
3779
  }
3772
3780
  }
3773
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
+ }
3774
3797
  .data-\[focus\]\:outline-1 {
3775
3798
  &[data-focus] {
3776
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.500",
4
+ "version": "0.0.502",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
package/src/classNames.ts CHANGED
@@ -145,6 +145,10 @@ export const layoutPaddingY = clsx(
145
145
  "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
146
146
  );
147
147
 
148
+ export const layoutPaddingX = clsx(
149
+ "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
150
+ );
151
+
148
152
  export const containerPaddingX = clsx(
149
153
  "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
150
154
  );
@@ -40,7 +40,7 @@ export const Breadcrumb = ({
40
40
  <Link
41
41
  id={id ? `${id}-link` : undefined}
42
42
  data-testid={testid ? `${testid}-link` : undefined}
43
- className={linkPadding}
43
+ className={clsx(linkPadding, "!text-caption-desktop")}
44
44
  href={href}
45
45
  typographyStyle="breadcrumb"
46
46
  onClick={onClick}
@@ -1,9 +1,22 @@
1
1
  import clsx from "clsx";
2
+ import type { HTMLAttributes } from "react";
2
3
 
3
- export function HorizontalDivider({ id, testid, hideOnMobile }: { id?: string, testid?: string, hideOnMobile?: boolean }) {
4
- const hideOnMobileStyle = clsx(hideOnMobile && "hidden desktop:block")
4
+ type HorizontalDividerProps = HTMLAttributes<HTMLHRElement> & {
5
+ testid?: string;
6
+ hideOnMobile?: boolean;
7
+ };
5
8
 
9
+ export function HorizontalDivider({ id, testid, hideOnMobile, className, ...rest }: HorizontalDividerProps) {
6
10
  return (
7
- <hr id={id} data-testid={testid} className={clsx("w-full border-t border-border-primary-normal", hideOnMobileStyle)} />
11
+ <hr
12
+ id={id}
13
+ data-testid={testid}
14
+ className={clsx(
15
+ "w-full border-t border-border-primary-normal",
16
+ hideOnMobile && "hidden desktop:block",
17
+ className
18
+ )}
19
+ {...rest}
20
+ />
8
21
  );
9
22
  }
@@ -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,5 +1,6 @@
1
1
  import { Paragraph } from "../../Paragraph";
2
2
  import { ColumnDef } from "@tanstack/react-table";
3
+ import { formatDate } from "../../../utils";
3
4
 
4
5
  export function MobileDataGridColumn<T extends Record<string, unknown>>(props: {
5
6
  column: ColumnDef<T>;
@@ -7,14 +8,20 @@ export function MobileDataGridColumn<T extends Record<string, unknown>>(props: {
7
8
  }) {
8
9
  const { column, data } = props;
9
10
 
11
+ let value: unknown;
12
+ if (column.id) {
13
+ value = data[column.id];
14
+ if (column.meta?.format === "date" && typeof value === "string") {
15
+ value = formatDate(value);
16
+ }
17
+ }
18
+
10
19
  return (
11
- <div className="grid grid-cols-2 gap-2 px-3 flex-1">
20
+ <div className="grid grid-cols-2 gap-2 flex-1">
12
21
  <Paragraph color="text-secondary-normal" className="text-left">
13
22
  {column.header?.toString()}:
14
23
  </Paragraph>{" "}
15
- {column.id && data[column.id]
16
- ? (data[column.id] as React.ReactNode)
17
- : null}
24
+ {value ? (value as React.ReactNode) : null}
18
25
  </div>
19
26
  );
20
- }
27
+ }