@moneyforward/mfui-components 3.7.0 → 3.8.0

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 (119) hide show
  1. package/dist/src/DataGrid/index.d.ts +16 -8
  2. package/dist/src/DataGrid/index.js +9 -1
  3. package/dist/src/{DataGrid/DataGrid.d.ts → DataTable/DataTable.d.ts} +94 -82
  4. package/dist/src/{DataGrid/DataGrid.js → DataTable/DataTable.js} +120 -97
  5. package/dist/src/{DataGrid/DataGrid.types.d.ts → DataTable/DataTable.types.d.ts} +11 -11
  6. package/dist/src/DataTable/DataTableBody/DataTableBody.d.ts +1 -0
  7. package/dist/src/DataTable/DataTableBody/DataTableBody.js +19 -0
  8. package/dist/src/{DataGrid/DataGridBody/DataGridBody.types.d.ts → DataTable/DataTableBody/DataTableBody.types.d.ts} +2 -2
  9. package/dist/src/DataTable/DataTableBody/index.d.ts +2 -0
  10. package/dist/src/DataTable/DataTableBody/index.js +1 -0
  11. package/dist/src/DataTable/DataTableCell/DataTableCell.d.ts +2 -0
  12. package/dist/src/{DataGrid/DataGridCell/DataGridCell.js → DataTable/DataTableCell/DataTableCell.js} +20 -13
  13. package/dist/src/{DataGrid/DataGridCell/DataGridCell.types.d.ts → DataTable/DataTableCell/DataTableCell.types.d.ts} +8 -8
  14. package/dist/src/DataTable/DataTableCell/index.d.ts +2 -0
  15. package/dist/src/DataTable/DataTableCell/index.js +1 -0
  16. package/dist/src/DataTable/DataTableHeader/DataTableHeader.d.ts +1 -0
  17. package/dist/src/DataTable/DataTableHeader/DataTableHeader.js +12 -0
  18. package/dist/src/{DataGrid/DataGridHeader/DataGridHeader.types.d.ts → DataTable/DataTableHeader/DataTableHeader.types.d.ts} +2 -2
  19. package/dist/src/DataTable/DataTableHeader/index.d.ts +2 -0
  20. package/dist/src/DataTable/DataTableHeader/index.js +1 -0
  21. package/dist/src/DataTable/DataTableHeaderCell/DataTableHeaderCell.d.ts +2 -0
  22. package/dist/src/DataTable/DataTableHeaderCell/DataTableHeaderCell.js +58 -0
  23. package/dist/src/{DataGrid/DataGridHeaderCell/DataGridHeaderCell.types.d.ts → DataTable/DataTableHeaderCell/DataTableHeaderCell.types.d.ts} +6 -6
  24. package/dist/src/DataTable/DataTableHeaderCell/index.d.ts +2 -0
  25. package/dist/src/DataTable/DataTableHeaderCell/index.js +1 -0
  26. package/dist/src/DataTable/DataTableHeaderRow/DataTableHeaderRow.d.ts +2 -0
  27. package/dist/src/DataTable/DataTableHeaderRow/DataTableHeaderRow.js +31 -0
  28. package/dist/src/{DataGrid/DataGridHeaderRow/DataGridHeaderRow.types.d.ts → DataTable/DataTableHeaderRow/DataTableHeaderRow.types.d.ts} +3 -3
  29. package/dist/src/DataTable/DataTableHeaderRow/index.d.ts +2 -0
  30. package/dist/src/DataTable/DataTableHeaderRow/index.js +1 -0
  31. package/dist/src/DataTable/DataTableProvider.d.ts +27 -0
  32. package/dist/src/{DataGrid/DataGridProvider.js → DataTable/DataTableProvider.js} +9 -9
  33. package/dist/src/DataTable/DataTableRow/DataTableRow.d.ts +2 -0
  34. package/dist/src/{DataGrid/DataGridRow/DataGridRow.js → DataTable/DataTableRow/DataTableRow.js} +11 -10
  35. package/dist/src/{DataGrid/DataGridRow/DataGridRow.types.d.ts → DataTable/DataTableRow/DataTableRow.types.d.ts} +5 -5
  36. package/dist/src/DataTable/DataTableRow/index.d.ts +2 -0
  37. package/dist/src/DataTable/DataTableRow/index.js +1 -0
  38. package/dist/src/DataTable/index.d.ts +8 -0
  39. package/dist/src/DataTable/index.js +1 -0
  40. package/dist/src/MainNavigation/BaseMainNavigation.js +25 -10
  41. package/dist/src/MainNavigation/MainNavigation.types.d.ts +49 -1
  42. package/dist/src/MainNavigation/NarrowViewportMainNavigation.js +17 -2
  43. package/dist/src/index.d.ts +1 -0
  44. package/dist/src/index.js +1 -0
  45. package/dist/src/utilities/dom/useFixedColumns.d.ts +1 -1
  46. package/dist/src/utilities/dom/useFixedColumns.js +1 -1
  47. package/dist/src/utilities/react/isComponentOrWrapped.d.ts +7 -7
  48. package/dist/src/utilities/react/isComponentOrWrapped.js +7 -7
  49. package/dist/styled-system/recipes/base-main-navigation-slot-recipe.d.ts +1 -1
  50. package/dist/styled-system/recipes/base-main-navigation-slot-recipe.js +12 -0
  51. package/dist/styled-system/recipes/data-table-body-slot-recipe.d.ts +33 -0
  52. package/dist/styled-system/recipes/data-table-body-slot-recipe.js +28 -0
  53. package/dist/styled-system/recipes/data-table-cell-slot-recipe.d.ts +38 -0
  54. package/dist/styled-system/recipes/data-table-cell-slot-recipe.js +77 -0
  55. package/dist/styled-system/recipes/data-table-header-cell-slot-recipe.d.ts +37 -0
  56. package/dist/styled-system/recipes/data-table-header-cell-slot-recipe.js +73 -0
  57. package/dist/styled-system/recipes/data-table-header-row-slot-recipe.d.ts +33 -0
  58. package/dist/styled-system/recipes/data-table-header-row-slot-recipe.js +28 -0
  59. package/dist/styled-system/recipes/data-table-header-slot-recipe.d.ts +33 -0
  60. package/dist/styled-system/recipes/data-table-header-slot-recipe.js +35 -0
  61. package/dist/styled-system/recipes/data-table-row-slot-recipe.d.ts +36 -0
  62. package/dist/styled-system/recipes/{data-grid-row-slot-recipe.js → data-table-row-slot-recipe.js} +13 -13
  63. package/dist/styled-system/recipes/data-table-slot-recipe.d.ts +36 -0
  64. package/dist/styled-system/recipes/data-table-slot-recipe.js +45 -0
  65. package/dist/styled-system/recipes/index.d.ts +7 -7
  66. package/dist/styled-system/recipes/index.js +7 -7
  67. package/dist/styled-system/recipes/narrow-viewport-main-navigation-slot-recipe.d.ts +1 -1
  68. package/dist/styled-system/recipes/narrow-viewport-main-navigation-slot-recipe.js +12 -0
  69. package/dist/styled-system/tokens/index.js +117 -117
  70. package/dist/styled-system/tokens/tokens.d.ts +2 -2
  71. package/dist/styles.css +131 -102
  72. package/dist/theme-orange.css +3 -0
  73. package/dist/tsconfig.build.tsbuildinfo +1 -1
  74. package/package.json +3 -3
  75. package/dist/src/DataGrid/DataGridBody/DataGridBody.d.ts +0 -1
  76. package/dist/src/DataGrid/DataGridBody/DataGridBody.js +0 -17
  77. package/dist/src/DataGrid/DataGridBody/index.d.ts +0 -2
  78. package/dist/src/DataGrid/DataGridBody/index.js +0 -1
  79. package/dist/src/DataGrid/DataGridCell/DataGridCell.d.ts +0 -2
  80. package/dist/src/DataGrid/DataGridCell/index.d.ts +0 -2
  81. package/dist/src/DataGrid/DataGridCell/index.js +0 -1
  82. package/dist/src/DataGrid/DataGridHeader/DataGridHeader.d.ts +0 -1
  83. package/dist/src/DataGrid/DataGridHeader/DataGridHeader.js +0 -11
  84. package/dist/src/DataGrid/DataGridHeader/index.d.ts +0 -2
  85. package/dist/src/DataGrid/DataGridHeader/index.js +0 -1
  86. package/dist/src/DataGrid/DataGridHeaderCell/DataGridHeaderCell.d.ts +0 -2
  87. package/dist/src/DataGrid/DataGridHeaderCell/DataGridHeaderCell.js +0 -50
  88. package/dist/src/DataGrid/DataGridHeaderCell/index.d.ts +0 -2
  89. package/dist/src/DataGrid/DataGridHeaderCell/index.js +0 -1
  90. package/dist/src/DataGrid/DataGridHeaderRow/DataGridHeaderRow.d.ts +0 -2
  91. package/dist/src/DataGrid/DataGridHeaderRow/DataGridHeaderRow.js +0 -30
  92. package/dist/src/DataGrid/DataGridHeaderRow/index.d.ts +0 -2
  93. package/dist/src/DataGrid/DataGridHeaderRow/index.js +0 -1
  94. package/dist/src/DataGrid/DataGridProvider.d.ts +0 -27
  95. package/dist/src/DataGrid/DataGridRow/DataGridRow.d.ts +0 -2
  96. package/dist/src/DataGrid/DataGridRow/index.d.ts +0 -2
  97. package/dist/src/DataGrid/DataGridRow/index.js +0 -1
  98. package/dist/styled-system/recipes/data-grid-body-slot-recipe.d.ts +0 -33
  99. package/dist/styled-system/recipes/data-grid-body-slot-recipe.js +0 -28
  100. package/dist/styled-system/recipes/data-grid-cell-slot-recipe.d.ts +0 -38
  101. package/dist/styled-system/recipes/data-grid-cell-slot-recipe.js +0 -77
  102. package/dist/styled-system/recipes/data-grid-header-cell-slot-recipe.d.ts +0 -37
  103. package/dist/styled-system/recipes/data-grid-header-cell-slot-recipe.js +0 -73
  104. package/dist/styled-system/recipes/data-grid-header-row-slot-recipe.d.ts +0 -33
  105. package/dist/styled-system/recipes/data-grid-header-row-slot-recipe.js +0 -28
  106. package/dist/styled-system/recipes/data-grid-header-slot-recipe.d.ts +0 -33
  107. package/dist/styled-system/recipes/data-grid-header-slot-recipe.js +0 -35
  108. package/dist/styled-system/recipes/data-grid-row-slot-recipe.d.ts +0 -36
  109. package/dist/styled-system/recipes/data-grid-slot-recipe.d.ts +0 -36
  110. package/dist/styled-system/recipes/data-grid-slot-recipe.js +0 -45
  111. /package/dist/src/{DataGrid/DataGrid.types.js → DataTable/DataTable.types.js} +0 -0
  112. /package/dist/src/{DataGrid/DataGridBody/DataGridBody.types.js → DataTable/DataTableBody/DataTableBody.types.js} +0 -0
  113. /package/dist/src/{DataGrid/DataGridCell/DataGridCell.types.js → DataTable/DataTableCell/DataTableCell.types.js} +0 -0
  114. /package/dist/src/{DataGrid/DataGridHeader/DataGridHeader.types.js → DataTable/DataTableHeader/DataTableHeader.types.js} +0 -0
  115. /package/dist/src/{DataGrid/DataGridHeaderCell/DataGridHeaderCell.types.js → DataTable/DataTableHeaderCell/DataTableHeaderCell.types.js} +0 -0
  116. /package/dist/src/{DataGrid/DataGridHeaderRow/DataGridHeaderRow.types.js → DataTable/DataTableHeaderRow/DataTableHeaderRow.types.js} +0 -0
  117. /package/dist/src/{DataGrid/DataGridRow/DataGridRow.types.js → DataTable/DataTableRow/DataTableRow.types.js} +0 -0
  118. /package/dist/src/{DataGrid → DataTable}/utils/handleCheckbox.d.ts +0 -0
  119. /package/dist/src/{DataGrid → DataTable}/utils/handleCheckbox.js +0 -0
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { DisclosureBasicCollapsed, DisclosureBasicExpanded, Lock } from '@moneyforward/mfui-icons-react';
4
- import { forwardRef, useImperativeHandle, useRef, useState, useEffect } from 'react';
4
+ import { forwardRef, useImperativeHandle, useRef, useState, useEffect, useId } from 'react';
5
5
  import { cx } from '../../styled-system/css';
6
6
  import { FocusIndicator } from '../FocusIndicator';
7
7
  import { Typography } from '../Typography';
@@ -16,6 +16,7 @@ import { Portal } from '../Portal';
16
16
  export const NarrowViewportMainNavigation = forwardRef(({ className, featureShortcut, navigationItems, width = 'normal', customLinkComponent }, ref) => {
17
17
  const classes = narrowViewportMainNavigationSlotRecipe({ width });
18
18
  const InternalLinkTag = customLinkComponent ?? 'a';
19
+ const navId = useId();
19
20
  const hasCurrentNavigationInChildren = (children) => children?.some((child) => child.isCurrent);
20
21
  const dialogRef = useRef(null);
21
22
  const [openState, setOpenState] = useState(false);
@@ -47,5 +48,19 @@ export const NarrowViewportMainNavigation = forwardRef(({ className, featureShor
47
48
  }
48
49
  return (_jsx(Portal, { children: _jsxs("div", { ref: dialogRef, role: "dialog", className: cx(classes.root, 'mfui-NarrowViewportMainNavigation__root', className), tabIndex: -1, onKeyDown: handleOnKeyDown, children: [_jsx("div", { "data-mfui-content": "backdrop", className: cx(classes.backdrop, 'mfui-NarrowViewportMainNavigation__backdrop'), onClick: handleCloseMainNavigation }), _jsxs("div", { "data-mfui-content": "inside", className: cx(classes.container, 'mfui-NarrowViewportMainNavigation__container'), onClick: (event) => {
49
50
  event.stopPropagation();
50
- }, children: [featureShortcut ? (_jsx("div", { className: cx(classes.featureShortcut, 'mfui-NarrowViewportMainNavigation__featureShortcut'), children: _jsx(FocusIndicator, { children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: featureShortcut.isExternal, href: featureShortcut.href, className: cx(classes.featureShortcutAnchor, 'mfui-NarrowViewportMainNavigation__featureShortcutAnchor'), onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: featureShortcut.label }) }) }) })) : null, _jsx("nav", { className: cx(classes.nav, 'mfui-NarrowViewportMainNavigation__nav'), children: _jsx("ul", { className: cx(classes.list, 'mfui-NarrowViewportMainNavigation__list'), children: navigationItems.map((navigation, index) => (_jsx("li", { className: cx(classes.listItem, 'mfui-NarrowViewportMainNavigation__listItem'), children: navigation.children ? (_jsxs("details", { open: navigation.isOpenByDefault || hasCurrentNavigationInChildren(navigation.children), className: cx(classes.parentDetails, 'mfui-NarrowViewportMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-NarrowViewportMainNavigation__parentSummary'), children: [_jsx("div", { className: cx(classes.parentSummaryIcon, 'mfui-NarrowViewportMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-NarrowViewportMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-NarrowViewportMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-NarrowViewportMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) : (_jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": navigation.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null] }) }) })) }, index))) }) })] })] }) }));
51
+ }, children: [featureShortcut ? (_jsx("div", { className: cx(classes.featureShortcut, 'mfui-NarrowViewportMainNavigation__featureShortcut'), children: _jsx(FocusIndicator, { children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: featureShortcut.isExternal, href: featureShortcut.href, className: cx(classes.featureShortcutAnchor, 'mfui-NarrowViewportMainNavigation__featureShortcutAnchor'), onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: featureShortcut.label }) }) }) })) : null, _jsxs("nav", { className: cx(classes.nav, 'mfui-NarrowViewportMainNavigation__nav'), children: [_jsx("ul", { className: cx(classes.list, 'mfui-NarrowViewportMainNavigation__list'), children: navigationItems.map((navigation, index) => {
52
+ const isGroupLabel = navigation.children && 'isGroupLabel' in navigation && navigation.isGroupLabel;
53
+ if (isGroupLabel) {
54
+ return null;
55
+ }
56
+ return (_jsx("li", { className: cx(classes.listItem, 'mfui-NarrowViewportMainNavigation__listItem'), children: navigation.children ? (_jsxs("details", { open: ('isOpenByDefault' in navigation && navigation.isOpenByDefault) ||
57
+ hasCurrentNavigationInChildren(navigation.children), className: cx(classes.parentDetails, 'mfui-NarrowViewportMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-NarrowViewportMainNavigation__parentSummary'), children: [_jsx("div", { className: cx(classes.parentSummaryIcon, 'mfui-NarrowViewportMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-NarrowViewportMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-NarrowViewportMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-NarrowViewportMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) : (_jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": navigation.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null] }) }) })) }, index));
58
+ }) }), navigationItems.map((navigation, index) => {
59
+ const isGroupLabel = navigation.children && 'isGroupLabel' in navigation && navigation.isGroupLabel;
60
+ if (!isGroupLabel) {
61
+ return null;
62
+ }
63
+ const groupLabelId = `${navId}-group-label-${String(index)}`;
64
+ return (_jsxs("div", { className: cx(classes.groupLabelSection, 'mfui-NarrowViewportMainNavigation__groupLabelSection'), children: [_jsx("div", { className: cx(classes.groupLabel, 'mfui-NarrowViewportMainNavigation__groupLabel'), children: _jsx(Typography, { id: groupLabelId, variant: "condensedControlLabel", className: cx(classes.groupLabelText, 'mfui-NarrowViewportMainNavigation__groupLabelText'), children: navigation.label }) }), _jsx("ul", { "aria-labelledby": groupLabelId, className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: child.icon }), _jsx(Typography, { variant: "controlLabel", children: child.label })] }), child.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": child.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, child.statusSlot && child.locked !== true ? child.statusSlot : null] }) }) }) }, childIndex))) })] }, index));
65
+ })] })] })] }) }));
51
66
  });
@@ -25,6 +25,7 @@ export * from './ToggleSwitch';
25
25
  export * from './Pagination';
26
26
  export * from './Tag';
27
27
  export * from './ProgressIndicator';
28
+ export * from './DataTable';
28
29
  export * from './DataGrid';
29
30
  export * from './SubNavigation';
30
31
  export * from './Tabs';
package/dist/src/index.js CHANGED
@@ -25,6 +25,7 @@ export * from './ToggleSwitch';
25
25
  export * from './Pagination';
26
26
  export * from './Tag';
27
27
  export * from './ProgressIndicator';
28
+ export * from './DataTable';
28
29
  export * from './DataGrid';
29
30
  export * from './SubNavigation';
30
31
  export * from './Tabs';
@@ -41,7 +41,7 @@ type UseFixedColumnsReturn = {
41
41
  };
42
42
  };
43
43
  /**
44
- * A hook to calculate the position of fixed columns in the DataGrid component.
44
+ * A hook to calculate the position of fixed columns in the DataTable component.
45
45
  */
46
46
  export declare const useFixedColumns: ({ enableRowSelection, columnIndex, leftFixedColumnIndex, rightFixedColumnIndex, }: UseFixedColumnsProps) => UseFixedColumnsReturn;
47
47
  export {};
@@ -1,6 +1,6 @@
1
1
  import { useLayoutEffect, useMemo, useRef, useState } from 'react';
2
2
  /**
3
- * A hook to calculate the position of fixed columns in the DataGrid component.
3
+ * A hook to calculate the position of fixed columns in the DataTable component.
4
4
  */
5
5
  export const useFixedColumns = ({ enableRowSelection = false, columnIndex, leftFixedColumnIndex, rightFixedColumnIndex, }) => {
6
6
  const cellRef = useRef(null);
@@ -31,24 +31,24 @@
31
31
  * // In Children.map
32
32
  * Children.map(children, (child) => {
33
33
  * if (!isValidElement(child)) return child;
34
- * if (isComponentOrWrapped(child, DataGridCell)) {
34
+ * if (isComponentOrWrapped(child, DataTableCell)) {
35
35
  * return cloneElement(child, { ...additionalProps });
36
36
  * }
37
37
  * return child;
38
38
  * });
39
39
  *
40
40
  * // Creating a wrapper component (recommended approach)
41
- * const WrappedDataGridCell = (props) => {
42
- * return <DataGridCell {...props} customProp="value" />;
41
+ * const WrappedDataTableCell = (props) => {
42
+ * return <DataTableCell {...props} customProp="value" />;
43
43
  * };
44
- * WrappedDataGridCell.displayName = 'DataGridCell'; // Recommended for detection
44
+ * WrappedDataTableCell.displayName = 'DataTableCell'; // Recommended for detection
45
45
  *
46
46
  * // Wrapper with hooks (displayName is required)
47
- * const WrappedDataGridCellWithHooks = (props) => {
47
+ * const WrappedDataTableCellWithHooks = (props) => {
48
48
  * const [state, setState] = useState(initialState);
49
- * return <DataGridCell {...props} state={state} />;
49
+ * return <DataTableCell {...props} state={state} />;
50
50
  * };
51
- * WrappedDataGridCellWithHooks.displayName = 'DataGridCell'; // Required to avoid hooks error
51
+ * WrappedDataTableCellWithHooks.displayName = 'DataTableCell'; // Required to avoid hooks error
52
52
  * ```
53
53
  */
54
54
  export declare function isComponentOrWrapped<P = unknown>(element: React.ReactElement, targetComponent: React.ComponentType<P>): boolean;
@@ -32,24 +32,24 @@ import { isValidElement } from 'react';
32
32
  * // In Children.map
33
33
  * Children.map(children, (child) => {
34
34
  * if (!isValidElement(child)) return child;
35
- * if (isComponentOrWrapped(child, DataGridCell)) {
35
+ * if (isComponentOrWrapped(child, DataTableCell)) {
36
36
  * return cloneElement(child, { ...additionalProps });
37
37
  * }
38
38
  * return child;
39
39
  * });
40
40
  *
41
41
  * // Creating a wrapper component (recommended approach)
42
- * const WrappedDataGridCell = (props) => {
43
- * return <DataGridCell {...props} customProp="value" />;
42
+ * const WrappedDataTableCell = (props) => {
43
+ * return <DataTableCell {...props} customProp="value" />;
44
44
  * };
45
- * WrappedDataGridCell.displayName = 'DataGridCell'; // Recommended for detection
45
+ * WrappedDataTableCell.displayName = 'DataTableCell'; // Recommended for detection
46
46
  *
47
47
  * // Wrapper with hooks (displayName is required)
48
- * const WrappedDataGridCellWithHooks = (props) => {
48
+ * const WrappedDataTableCellWithHooks = (props) => {
49
49
  * const [state, setState] = useState(initialState);
50
- * return <DataGridCell {...props} state={state} />;
50
+ * return <DataTableCell {...props} state={state} />;
51
51
  * };
52
- * WrappedDataGridCellWithHooks.displayName = 'DataGridCell'; // Required to avoid hooks error
52
+ * WrappedDataTableCellWithHooks.displayName = 'DataTableCell'; // Required to avoid hooks error
53
53
  * ```
54
54
  */
55
55
  export function isComponentOrWrapped(element, targetComponent) {
@@ -11,7 +11,7 @@ type BaseMainNavigationSlotRecipeVariantMap = {
11
11
  [key in keyof BaseMainNavigationSlotRecipeVariant]: Array<BaseMainNavigationSlotRecipeVariant[key]>
12
12
  }
13
13
 
14
- type BaseMainNavigationSlotRecipeSlot = "root" | "nav" | "list" | "featureShortcut" | "featureShortcutAnchor" | "labelGroup" | "iconAndLabel" | "lockIcon" | "listItem" | "listItemTooltip" | "listItemAnchor" | "listItemAnchorIcon" | "parentDetails" | "parentSummary" | "parentSummaryIcon" | "childrenList" | "childrenListItem" | "childrenListItemAnchor" | "popoverChildrenList" | "footer" | "toggleButton" | "toggleButtonIcon"
14
+ type BaseMainNavigationSlotRecipeSlot = "root" | "nav" | "list" | "featureShortcut" | "featureShortcutAnchor" | "labelGroup" | "iconAndLabel" | "lockIcon" | "listItem" | "listItemTooltip" | "listItemAnchor" | "listItemAnchorIcon" | "parentDetails" | "parentSummary" | "parentSummaryIcon" | "groupLabelSection" | "groupLabel" | "groupLabelText" | "childrenList" | "childrenListItem" | "childrenListItemAnchor" | "popoverChildrenList" | "footer" | "toggleButton" | "toggleButtonIcon"
15
15
 
16
16
  export type BaseMainNavigationSlotRecipeVariantProps = {
17
17
  [key in keyof BaseMainNavigationSlotRecipeVariant]?: ConditionalValue<BaseMainNavigationSlotRecipeVariant[key]> | undefined
@@ -63,6 +63,18 @@ const baseMainNavigationSlotRecipeSlotNames = [
63
63
  "parentSummaryIcon",
64
64
  "BaseMainNavigation__parentSummaryIcon"
65
65
  ],
66
+ [
67
+ "groupLabelSection",
68
+ "BaseMainNavigation__groupLabelSection"
69
+ ],
70
+ [
71
+ "groupLabel",
72
+ "BaseMainNavigation__groupLabel"
73
+ ],
74
+ [
75
+ "groupLabelText",
76
+ "BaseMainNavigation__groupLabelText"
77
+ ],
66
78
  [
67
79
  "childrenList",
68
80
  "BaseMainNavigation__childrenList"
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DataTableBodySlotRecipeVariant {
6
+
7
+ }
8
+
9
+ type DataTableBodySlotRecipeVariantMap = {
10
+ [key in keyof DataTableBodySlotRecipeVariant]: Array<DataTableBodySlotRecipeVariant[key]>
11
+ }
12
+
13
+ type DataTableBodySlotRecipeSlot = "root"
14
+
15
+ export type DataTableBodySlotRecipeVariantProps = {
16
+ [key in keyof DataTableBodySlotRecipeVariant]?: ConditionalValue<DataTableBodySlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface DataTableBodySlotRecipeRecipe {
20
+ __slot: DataTableBodySlotRecipeSlot
21
+ __type: DataTableBodySlotRecipeVariantProps
22
+ (props?: DataTableBodySlotRecipeVariantProps): Pretty<Record<DataTableBodySlotRecipeSlot, string>>
23
+ raw: (props?: DataTableBodySlotRecipeVariantProps) => DataTableBodySlotRecipeVariantProps
24
+ variantMap: DataTableBodySlotRecipeVariantMap
25
+ variantKeys: Array<keyof DataTableBodySlotRecipeVariant>
26
+ splitVariantProps<Props extends DataTableBodySlotRecipeVariantProps>(props: Props): [DataTableBodySlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DataTableBodySlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: DataTableBodySlotRecipeVariantProps) => DataTableBodySlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI DataTableBody component.
32
+ */
33
+ export declare const dataTableBodySlotRecipe: DataTableBodySlotRecipeRecipe
@@ -0,0 +1,28 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const dataTableBodySlotRecipeDefaultVariants = {};
4
+ const dataTableBodySlotRecipeCompoundVariants = [];
5
+ const dataTableBodySlotRecipeSlotNames = [
6
+ [
7
+ "root",
8
+ "DataTableBody__root"
9
+ ]
10
+ ];
11
+ const dataTableBodySlotRecipeSlotFns = /* @__PURE__ */ dataTableBodySlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dataTableBodySlotRecipeDefaultVariants, getSlotCompoundVariant(dataTableBodySlotRecipeCompoundVariants, slotName))]);
12
+ const dataTableBodySlotRecipeFn = memo((props = {}) => {
13
+ return Object.fromEntries(dataTableBodySlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
14
+ });
15
+ const dataTableBodySlotRecipeVariantKeys = [];
16
+ const getVariantProps = (variants) => ({ ...dataTableBodySlotRecipeDefaultVariants, ...compact(variants) });
17
+ export const dataTableBodySlotRecipe = /* @__PURE__ */ Object.assign(dataTableBodySlotRecipeFn, {
18
+ __recipe__: false,
19
+ __name__: 'dataTableBodySlotRecipe',
20
+ raw: (props) => props,
21
+ classNameMap: {},
22
+ variantKeys: dataTableBodySlotRecipeVariantKeys,
23
+ variantMap: {},
24
+ splitVariantProps(props) {
25
+ return splitProps(props, dataTableBodySlotRecipeVariantKeys);
26
+ },
27
+ getVariantProps
28
+ });
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DataTableCellSlotRecipeVariant {
6
+ size: "small" | "medium"
7
+ isCheckboxCell: boolean
8
+ rowHighlighted: boolean
9
+ fixedColumn: boolean
10
+ edgeFixedColumn: "left" | "right"
11
+ type: "text" | "amount"
12
+ }
13
+
14
+ type DataTableCellSlotRecipeVariantMap = {
15
+ [key in keyof DataTableCellSlotRecipeVariant]: Array<DataTableCellSlotRecipeVariant[key]>
16
+ }
17
+
18
+ type DataTableCellSlotRecipeSlot = "root" | "defaultCell" | "interactiveCell" | "disclosureIconWrapper" | "disclosureSpacing" | "skeletonCell"
19
+
20
+ export type DataTableCellSlotRecipeVariantProps = {
21
+ [key in keyof DataTableCellSlotRecipeVariant]?: ConditionalValue<DataTableCellSlotRecipeVariant[key]> | undefined
22
+ }
23
+
24
+ export interface DataTableCellSlotRecipeRecipe {
25
+ __slot: DataTableCellSlotRecipeSlot
26
+ __type: DataTableCellSlotRecipeVariantProps
27
+ (props?: DataTableCellSlotRecipeVariantProps): Pretty<Record<DataTableCellSlotRecipeSlot, string>>
28
+ raw: (props?: DataTableCellSlotRecipeVariantProps) => DataTableCellSlotRecipeVariantProps
29
+ variantMap: DataTableCellSlotRecipeVariantMap
30
+ variantKeys: Array<keyof DataTableCellSlotRecipeVariant>
31
+ splitVariantProps<Props extends DataTableCellSlotRecipeVariantProps>(props: Props): [DataTableCellSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DataTableCellSlotRecipeVariantProps>>]
32
+ getVariantProps: (props?: DataTableCellSlotRecipeVariantProps) => DataTableCellSlotRecipeVariantProps
33
+ }
34
+
35
+ /**
36
+ * Slot class created for the MFUI DataTableCell component.
37
+ */
38
+ export declare const dataTableCellSlotRecipe: DataTableCellSlotRecipeRecipe
@@ -0,0 +1,77 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const dataTableCellSlotRecipeDefaultVariants = {};
4
+ const dataTableCellSlotRecipeCompoundVariants = [];
5
+ const dataTableCellSlotRecipeSlotNames = [
6
+ [
7
+ "root",
8
+ "DataTableCell__root"
9
+ ],
10
+ [
11
+ "defaultCell",
12
+ "DataTableCell__defaultCell"
13
+ ],
14
+ [
15
+ "interactiveCell",
16
+ "DataTableCell__interactiveCell"
17
+ ],
18
+ [
19
+ "disclosureIconWrapper",
20
+ "DataTableCell__disclosureIconWrapper"
21
+ ],
22
+ [
23
+ "disclosureSpacing",
24
+ "DataTableCell__disclosureSpacing"
25
+ ],
26
+ [
27
+ "skeletonCell",
28
+ "DataTableCell__skeletonCell"
29
+ ]
30
+ ];
31
+ const dataTableCellSlotRecipeSlotFns = /* @__PURE__ */ dataTableCellSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dataTableCellSlotRecipeDefaultVariants, getSlotCompoundVariant(dataTableCellSlotRecipeCompoundVariants, slotName))]);
32
+ const dataTableCellSlotRecipeFn = memo((props = {}) => {
33
+ return Object.fromEntries(dataTableCellSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
34
+ });
35
+ const dataTableCellSlotRecipeVariantKeys = [
36
+ "size",
37
+ "isCheckboxCell",
38
+ "rowHighlighted",
39
+ "fixedColumn",
40
+ "edgeFixedColumn",
41
+ "type"
42
+ ];
43
+ const getVariantProps = (variants) => ({ ...dataTableCellSlotRecipeDefaultVariants, ...compact(variants) });
44
+ export const dataTableCellSlotRecipe = /* @__PURE__ */ Object.assign(dataTableCellSlotRecipeFn, {
45
+ __recipe__: false,
46
+ __name__: 'dataTableCellSlotRecipe',
47
+ raw: (props) => props,
48
+ classNameMap: {},
49
+ variantKeys: dataTableCellSlotRecipeVariantKeys,
50
+ variantMap: {
51
+ "size": [
52
+ "small",
53
+ "medium"
54
+ ],
55
+ "isCheckboxCell": [
56
+ "true"
57
+ ],
58
+ "rowHighlighted": [
59
+ "true"
60
+ ],
61
+ "fixedColumn": [
62
+ "true"
63
+ ],
64
+ "edgeFixedColumn": [
65
+ "left",
66
+ "right"
67
+ ],
68
+ "type": [
69
+ "text",
70
+ "amount"
71
+ ]
72
+ },
73
+ splitVariantProps(props) {
74
+ return splitProps(props, dataTableCellSlotRecipeVariantKeys);
75
+ },
76
+ getVariantProps
77
+ });
@@ -0,0 +1,37 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DataTableHeaderCellSlotRecipeVariant {
6
+ size: "small" | "medium"
7
+ fixedColumn: boolean
8
+ edgeFixedColumn: "left" | "right"
9
+ isCheckboxCell: boolean
10
+ type: "text" | "amount"
11
+ }
12
+
13
+ type DataTableHeaderCellSlotRecipeVariantMap = {
14
+ [key in keyof DataTableHeaderCellSlotRecipeVariant]: Array<DataTableHeaderCellSlotRecipeVariant[key]>
15
+ }
16
+
17
+ type DataTableHeaderCellSlotRecipeSlot = "root" | "headerCell" | "sortButton" | "sortIconContainer" | "sortIcon" | "unsortedIcon"
18
+
19
+ export type DataTableHeaderCellSlotRecipeVariantProps = {
20
+ [key in keyof DataTableHeaderCellSlotRecipeVariant]?: ConditionalValue<DataTableHeaderCellSlotRecipeVariant[key]> | undefined
21
+ }
22
+
23
+ export interface DataTableHeaderCellSlotRecipeRecipe {
24
+ __slot: DataTableHeaderCellSlotRecipeSlot
25
+ __type: DataTableHeaderCellSlotRecipeVariantProps
26
+ (props?: DataTableHeaderCellSlotRecipeVariantProps): Pretty<Record<DataTableHeaderCellSlotRecipeSlot, string>>
27
+ raw: (props?: DataTableHeaderCellSlotRecipeVariantProps) => DataTableHeaderCellSlotRecipeVariantProps
28
+ variantMap: DataTableHeaderCellSlotRecipeVariantMap
29
+ variantKeys: Array<keyof DataTableHeaderCellSlotRecipeVariant>
30
+ splitVariantProps<Props extends DataTableHeaderCellSlotRecipeVariantProps>(props: Props): [DataTableHeaderCellSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DataTableHeaderCellSlotRecipeVariantProps>>]
31
+ getVariantProps: (props?: DataTableHeaderCellSlotRecipeVariantProps) => DataTableHeaderCellSlotRecipeVariantProps
32
+ }
33
+
34
+ /**
35
+ * Slot class created for the MFUI DataTableHeaderCell component.
36
+ */
37
+ export declare const dataTableHeaderCellSlotRecipe: DataTableHeaderCellSlotRecipeRecipe
@@ -0,0 +1,73 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const dataTableHeaderCellSlotRecipeDefaultVariants = {};
4
+ const dataTableHeaderCellSlotRecipeCompoundVariants = [];
5
+ const dataTableHeaderCellSlotRecipeSlotNames = [
6
+ [
7
+ "root",
8
+ "DataTableHeaderCell__root"
9
+ ],
10
+ [
11
+ "headerCell",
12
+ "DataTableHeaderCell__headerCell"
13
+ ],
14
+ [
15
+ "sortButton",
16
+ "DataTableHeaderCell__sortButton"
17
+ ],
18
+ [
19
+ "sortIconContainer",
20
+ "DataTableHeaderCell__sortIconContainer"
21
+ ],
22
+ [
23
+ "sortIcon",
24
+ "DataTableHeaderCell__sortIcon"
25
+ ],
26
+ [
27
+ "unsortedIcon",
28
+ "DataTableHeaderCell__unsortedIcon"
29
+ ]
30
+ ];
31
+ const dataTableHeaderCellSlotRecipeSlotFns = /* @__PURE__ */ dataTableHeaderCellSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dataTableHeaderCellSlotRecipeDefaultVariants, getSlotCompoundVariant(dataTableHeaderCellSlotRecipeCompoundVariants, slotName))]);
32
+ const dataTableHeaderCellSlotRecipeFn = memo((props = {}) => {
33
+ return Object.fromEntries(dataTableHeaderCellSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
34
+ });
35
+ const dataTableHeaderCellSlotRecipeVariantKeys = [
36
+ "size",
37
+ "fixedColumn",
38
+ "edgeFixedColumn",
39
+ "isCheckboxCell",
40
+ "type"
41
+ ];
42
+ const getVariantProps = (variants) => ({ ...dataTableHeaderCellSlotRecipeDefaultVariants, ...compact(variants) });
43
+ export const dataTableHeaderCellSlotRecipe = /* @__PURE__ */ Object.assign(dataTableHeaderCellSlotRecipeFn, {
44
+ __recipe__: false,
45
+ __name__: 'dataTableHeaderCellSlotRecipe',
46
+ raw: (props) => props,
47
+ classNameMap: {},
48
+ variantKeys: dataTableHeaderCellSlotRecipeVariantKeys,
49
+ variantMap: {
50
+ "size": [
51
+ "small",
52
+ "medium"
53
+ ],
54
+ "fixedColumn": [
55
+ "true"
56
+ ],
57
+ "edgeFixedColumn": [
58
+ "left",
59
+ "right"
60
+ ],
61
+ "isCheckboxCell": [
62
+ "true"
63
+ ],
64
+ "type": [
65
+ "text",
66
+ "amount"
67
+ ]
68
+ },
69
+ splitVariantProps(props) {
70
+ return splitProps(props, dataTableHeaderCellSlotRecipeVariantKeys);
71
+ },
72
+ getVariantProps
73
+ });
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DataTableHeaderRowSlotRecipeVariant {
6
+
7
+ }
8
+
9
+ type DataTableHeaderRowSlotRecipeVariantMap = {
10
+ [key in keyof DataTableHeaderRowSlotRecipeVariant]: Array<DataTableHeaderRowSlotRecipeVariant[key]>
11
+ }
12
+
13
+ type DataTableHeaderRowSlotRecipeSlot = "root"
14
+
15
+ export type DataTableHeaderRowSlotRecipeVariantProps = {
16
+ [key in keyof DataTableHeaderRowSlotRecipeVariant]?: ConditionalValue<DataTableHeaderRowSlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface DataTableHeaderRowSlotRecipeRecipe {
20
+ __slot: DataTableHeaderRowSlotRecipeSlot
21
+ __type: DataTableHeaderRowSlotRecipeVariantProps
22
+ (props?: DataTableHeaderRowSlotRecipeVariantProps): Pretty<Record<DataTableHeaderRowSlotRecipeSlot, string>>
23
+ raw: (props?: DataTableHeaderRowSlotRecipeVariantProps) => DataTableHeaderRowSlotRecipeVariantProps
24
+ variantMap: DataTableHeaderRowSlotRecipeVariantMap
25
+ variantKeys: Array<keyof DataTableHeaderRowSlotRecipeVariant>
26
+ splitVariantProps<Props extends DataTableHeaderRowSlotRecipeVariantProps>(props: Props): [DataTableHeaderRowSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DataTableHeaderRowSlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: DataTableHeaderRowSlotRecipeVariantProps) => DataTableHeaderRowSlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI DataTableHeaderRow component.
32
+ */
33
+ export declare const dataTableHeaderRowSlotRecipe: DataTableHeaderRowSlotRecipeRecipe
@@ -0,0 +1,28 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const dataTableHeaderRowSlotRecipeDefaultVariants = {};
4
+ const dataTableHeaderRowSlotRecipeCompoundVariants = [];
5
+ const dataTableHeaderRowSlotRecipeSlotNames = [
6
+ [
7
+ "root",
8
+ "DataTableHeaderRow__root"
9
+ ]
10
+ ];
11
+ const dataTableHeaderRowSlotRecipeSlotFns = /* @__PURE__ */ dataTableHeaderRowSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dataTableHeaderRowSlotRecipeDefaultVariants, getSlotCompoundVariant(dataTableHeaderRowSlotRecipeCompoundVariants, slotName))]);
12
+ const dataTableHeaderRowSlotRecipeFn = memo((props = {}) => {
13
+ return Object.fromEntries(dataTableHeaderRowSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
14
+ });
15
+ const dataTableHeaderRowSlotRecipeVariantKeys = [];
16
+ const getVariantProps = (variants) => ({ ...dataTableHeaderRowSlotRecipeDefaultVariants, ...compact(variants) });
17
+ export const dataTableHeaderRowSlotRecipe = /* @__PURE__ */ Object.assign(dataTableHeaderRowSlotRecipeFn, {
18
+ __recipe__: false,
19
+ __name__: 'dataTableHeaderRowSlotRecipe',
20
+ raw: (props) => props,
21
+ classNameMap: {},
22
+ variantKeys: dataTableHeaderRowSlotRecipeVariantKeys,
23
+ variantMap: {},
24
+ splitVariantProps(props) {
25
+ return splitProps(props, dataTableHeaderRowSlotRecipeVariantKeys);
26
+ },
27
+ getVariantProps
28
+ });
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface DataTableHeaderSlotRecipeVariant {
6
+ fixedHeader: boolean
7
+ }
8
+
9
+ type DataTableHeaderSlotRecipeVariantMap = {
10
+ [key in keyof DataTableHeaderSlotRecipeVariant]: Array<DataTableHeaderSlotRecipeVariant[key]>
11
+ }
12
+
13
+ type DataTableHeaderSlotRecipeSlot = "root"
14
+
15
+ export type DataTableHeaderSlotRecipeVariantProps = {
16
+ [key in keyof DataTableHeaderSlotRecipeVariant]?: ConditionalValue<DataTableHeaderSlotRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface DataTableHeaderSlotRecipeRecipe {
20
+ __slot: DataTableHeaderSlotRecipeSlot
21
+ __type: DataTableHeaderSlotRecipeVariantProps
22
+ (props?: DataTableHeaderSlotRecipeVariantProps): Pretty<Record<DataTableHeaderSlotRecipeSlot, string>>
23
+ raw: (props?: DataTableHeaderSlotRecipeVariantProps) => DataTableHeaderSlotRecipeVariantProps
24
+ variantMap: DataTableHeaderSlotRecipeVariantMap
25
+ variantKeys: Array<keyof DataTableHeaderSlotRecipeVariant>
26
+ splitVariantProps<Props extends DataTableHeaderSlotRecipeVariantProps>(props: Props): [DataTableHeaderSlotRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof DataTableHeaderSlotRecipeVariantProps>>]
27
+ getVariantProps: (props?: DataTableHeaderSlotRecipeVariantProps) => DataTableHeaderSlotRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Slot class created for the MFUI DataTableHeader component.
32
+ */
33
+ export declare const dataTableHeaderSlotRecipe: DataTableHeaderSlotRecipeRecipe
@@ -0,0 +1,35 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+ const dataTableHeaderSlotRecipeDefaultVariants = {};
4
+ const dataTableHeaderSlotRecipeCompoundVariants = [];
5
+ const dataTableHeaderSlotRecipeSlotNames = [
6
+ [
7
+ "root",
8
+ "DataTableHeader__root"
9
+ ]
10
+ ];
11
+ const dataTableHeaderSlotRecipeSlotFns = /* @__PURE__ */ dataTableHeaderSlotRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, dataTableHeaderSlotRecipeDefaultVariants, getSlotCompoundVariant(dataTableHeaderSlotRecipeCompoundVariants, slotName))]);
12
+ const dataTableHeaderSlotRecipeFn = memo((props = {}) => {
13
+ return Object.fromEntries(dataTableHeaderSlotRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
14
+ });
15
+ const dataTableHeaderSlotRecipeVariantKeys = [
16
+ "fixedHeader"
17
+ ];
18
+ const getVariantProps = (variants) => ({ ...dataTableHeaderSlotRecipeDefaultVariants, ...compact(variants) });
19
+ export const dataTableHeaderSlotRecipe = /* @__PURE__ */ Object.assign(dataTableHeaderSlotRecipeFn, {
20
+ __recipe__: false,
21
+ __name__: 'dataTableHeaderSlotRecipe',
22
+ raw: (props) => props,
23
+ classNameMap: {},
24
+ variantKeys: dataTableHeaderSlotRecipeVariantKeys,
25
+ variantMap: {
26
+ "fixedHeader": [
27
+ "true",
28
+ "false"
29
+ ]
30
+ },
31
+ splitVariantProps(props) {
32
+ return splitProps(props, dataTableHeaderSlotRecipeVariantKeys);
33
+ },
34
+ getVariantProps
35
+ });