@moneyforward/mfui-components 3.7.0 → 3.9.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.
- package/dist/src/DataGrid/index.d.ts +16 -8
- package/dist/src/DataGrid/index.js +9 -1
- package/dist/src/{DataGrid/DataGrid.d.ts → DataTable/DataTable.d.ts} +94 -82
- package/dist/src/{DataGrid/DataGrid.js → DataTable/DataTable.js} +120 -97
- package/dist/src/{DataGrid/DataGrid.types.d.ts → DataTable/DataTable.types.d.ts} +11 -11
- package/dist/src/DataTable/DataTableBody/DataTableBody.d.ts +1 -0
- package/dist/src/DataTable/DataTableBody/DataTableBody.js +19 -0
- package/dist/src/{DataGrid/DataGridBody/DataGridBody.types.d.ts → DataTable/DataTableBody/DataTableBody.types.d.ts} +2 -2
- package/dist/src/DataTable/DataTableBody/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableBody/index.js +1 -0
- package/dist/src/DataTable/DataTableCell/DataTableCell.d.ts +2 -0
- package/dist/src/{DataGrid/DataGridCell/DataGridCell.js → DataTable/DataTableCell/DataTableCell.js} +20 -13
- package/dist/src/{DataGrid/DataGridCell/DataGridCell.types.d.ts → DataTable/DataTableCell/DataTableCell.types.d.ts} +8 -8
- package/dist/src/DataTable/DataTableCell/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableCell/index.js +1 -0
- package/dist/src/DataTable/DataTableHeader/DataTableHeader.d.ts +1 -0
- package/dist/src/DataTable/DataTableHeader/DataTableHeader.js +12 -0
- package/dist/src/{DataGrid/DataGridHeader/DataGridHeader.types.d.ts → DataTable/DataTableHeader/DataTableHeader.types.d.ts} +2 -2
- package/dist/src/DataTable/DataTableHeader/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableHeader/index.js +1 -0
- package/dist/src/DataTable/DataTableHeaderCell/DataTableHeaderCell.d.ts +2 -0
- package/dist/src/DataTable/DataTableHeaderCell/DataTableHeaderCell.js +58 -0
- package/dist/src/{DataGrid/DataGridHeaderCell/DataGridHeaderCell.types.d.ts → DataTable/DataTableHeaderCell/DataTableHeaderCell.types.d.ts} +6 -6
- package/dist/src/DataTable/DataTableHeaderCell/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableHeaderCell/index.js +1 -0
- package/dist/src/DataTable/DataTableHeaderRow/DataTableHeaderRow.d.ts +2 -0
- package/dist/src/DataTable/DataTableHeaderRow/DataTableHeaderRow.js +31 -0
- package/dist/src/{DataGrid/DataGridHeaderRow/DataGridHeaderRow.types.d.ts → DataTable/DataTableHeaderRow/DataTableHeaderRow.types.d.ts} +3 -3
- package/dist/src/DataTable/DataTableHeaderRow/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableHeaderRow/index.js +1 -0
- package/dist/src/DataTable/DataTableProvider.d.ts +27 -0
- package/dist/src/{DataGrid/DataGridProvider.js → DataTable/DataTableProvider.js} +9 -9
- package/dist/src/DataTable/DataTableRow/DataTableRow.d.ts +2 -0
- package/dist/src/{DataGrid/DataGridRow/DataGridRow.js → DataTable/DataTableRow/DataTableRow.js} +11 -10
- package/dist/src/{DataGrid/DataGridRow/DataGridRow.types.d.ts → DataTable/DataTableRow/DataTableRow.types.d.ts} +5 -5
- package/dist/src/DataTable/DataTableRow/index.d.ts +2 -0
- package/dist/src/DataTable/DataTableRow/index.js +1 -0
- package/dist/src/DataTable/index.d.ts +8 -0
- package/dist/src/DataTable/index.js +1 -0
- package/dist/src/MainNavigation/BaseMainNavigation.js +25 -10
- package/dist/src/MainNavigation/MainNavigation.types.d.ts +49 -1
- package/dist/src/MainNavigation/NarrowViewportMainNavigation.js +17 -2
- package/dist/src/MultipleSelectBox/index.d.ts +1 -1
- package/dist/src/SelectBox/SelectBox.js +3 -3
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/utilities/dom/useFixedColumns.d.ts +1 -1
- package/dist/src/utilities/dom/useFixedColumns.js +1 -1
- package/dist/src/utilities/react/isComponentOrWrapped.d.ts +7 -7
- package/dist/src/utilities/react/isComponentOrWrapped.js +7 -7
- package/dist/styled-system/recipes/base-main-navigation-slot-recipe.d.ts +1 -1
- package/dist/styled-system/recipes/base-main-navigation-slot-recipe.js +12 -0
- package/dist/styled-system/recipes/data-table-body-slot-recipe.d.ts +33 -0
- package/dist/styled-system/recipes/data-table-body-slot-recipe.js +28 -0
- package/dist/styled-system/recipes/data-table-cell-slot-recipe.d.ts +38 -0
- package/dist/styled-system/recipes/data-table-cell-slot-recipe.js +77 -0
- package/dist/styled-system/recipes/data-table-header-cell-slot-recipe.d.ts +37 -0
- package/dist/styled-system/recipes/data-table-header-cell-slot-recipe.js +73 -0
- package/dist/styled-system/recipes/data-table-header-row-slot-recipe.d.ts +33 -0
- package/dist/styled-system/recipes/data-table-header-row-slot-recipe.js +28 -0
- package/dist/styled-system/recipes/data-table-header-slot-recipe.d.ts +33 -0
- package/dist/styled-system/recipes/data-table-header-slot-recipe.js +35 -0
- package/dist/styled-system/recipes/data-table-row-slot-recipe.d.ts +36 -0
- package/dist/styled-system/recipes/{data-grid-row-slot-recipe.js → data-table-row-slot-recipe.js} +13 -13
- package/dist/styled-system/recipes/data-table-slot-recipe.d.ts +36 -0
- package/dist/styled-system/recipes/data-table-slot-recipe.js +45 -0
- package/dist/styled-system/recipes/index.d.ts +7 -7
- package/dist/styled-system/recipes/index.js +7 -7
- package/dist/styled-system/recipes/narrow-viewport-main-navigation-slot-recipe.d.ts +1 -1
- package/dist/styled-system/recipes/narrow-viewport-main-navigation-slot-recipe.js +12 -0
- package/dist/styled-system/tokens/index.js +117 -117
- package/dist/styled-system/tokens/tokens.d.ts +2 -2
- package/dist/styles.css +131 -102
- package/dist/theme-orange.css +3 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/src/DataGrid/DataGridBody/DataGridBody.d.ts +0 -1
- package/dist/src/DataGrid/DataGridBody/DataGridBody.js +0 -17
- package/dist/src/DataGrid/DataGridBody/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridBody/index.js +0 -1
- package/dist/src/DataGrid/DataGridCell/DataGridCell.d.ts +0 -2
- package/dist/src/DataGrid/DataGridCell/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridCell/index.js +0 -1
- package/dist/src/DataGrid/DataGridHeader/DataGridHeader.d.ts +0 -1
- package/dist/src/DataGrid/DataGridHeader/DataGridHeader.js +0 -11
- package/dist/src/DataGrid/DataGridHeader/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridHeader/index.js +0 -1
- package/dist/src/DataGrid/DataGridHeaderCell/DataGridHeaderCell.d.ts +0 -2
- package/dist/src/DataGrid/DataGridHeaderCell/DataGridHeaderCell.js +0 -50
- package/dist/src/DataGrid/DataGridHeaderCell/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridHeaderCell/index.js +0 -1
- package/dist/src/DataGrid/DataGridHeaderRow/DataGridHeaderRow.d.ts +0 -2
- package/dist/src/DataGrid/DataGridHeaderRow/DataGridHeaderRow.js +0 -30
- package/dist/src/DataGrid/DataGridHeaderRow/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridHeaderRow/index.js +0 -1
- package/dist/src/DataGrid/DataGridProvider.d.ts +0 -27
- package/dist/src/DataGrid/DataGridRow/DataGridRow.d.ts +0 -2
- package/dist/src/DataGrid/DataGridRow/index.d.ts +0 -2
- package/dist/src/DataGrid/DataGridRow/index.js +0 -1
- package/dist/styled-system/recipes/data-grid-body-slot-recipe.d.ts +0 -33
- package/dist/styled-system/recipes/data-grid-body-slot-recipe.js +0 -28
- package/dist/styled-system/recipes/data-grid-cell-slot-recipe.d.ts +0 -38
- package/dist/styled-system/recipes/data-grid-cell-slot-recipe.js +0 -77
- package/dist/styled-system/recipes/data-grid-header-cell-slot-recipe.d.ts +0 -37
- package/dist/styled-system/recipes/data-grid-header-cell-slot-recipe.js +0 -73
- package/dist/styled-system/recipes/data-grid-header-row-slot-recipe.d.ts +0 -33
- package/dist/styled-system/recipes/data-grid-header-row-slot-recipe.js +0 -28
- package/dist/styled-system/recipes/data-grid-header-slot-recipe.d.ts +0 -33
- package/dist/styled-system/recipes/data-grid-header-slot-recipe.js +0 -35
- package/dist/styled-system/recipes/data-grid-row-slot-recipe.d.ts +0 -36
- package/dist/styled-system/recipes/data-grid-slot-recipe.d.ts +0 -36
- package/dist/styled-system/recipes/data-grid-slot-recipe.js +0 -45
- /package/dist/src/{DataGrid/DataGrid.types.js → DataTable/DataTable.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridBody/DataGridBody.types.js → DataTable/DataTableBody/DataTableBody.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridCell/DataGridCell.types.js → DataTable/DataTableCell/DataTableCell.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridHeader/DataGridHeader.types.js → DataTable/DataTableHeader/DataTableHeader.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridHeaderCell/DataGridHeaderCell.types.js → DataTable/DataTableHeaderCell/DataTableHeaderCell.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridHeaderRow/DataGridHeaderRow.types.js → DataTable/DataTableHeaderRow/DataTableHeaderRow.types.js} +0 -0
- /package/dist/src/{DataGrid/DataGridRow/DataGridRow.types.js → DataTable/DataTableRow/DataTableRow.types.js} +0 -0
- /package/dist/src/{DataGrid → DataTable}/utils/handleCheckbox.d.ts +0 -0
- /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,
|
|
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
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MultipleSelectBox } from './MultipleSelectBox';
|
|
2
|
-
export type { MultipleSelectBoxProps, MultipleSelectBoxOption } from './MultipleSelectBox.types';
|
|
2
|
+
export type { MultipleSelectBoxProps, MultipleSelectBoxOption, InfiniteScrollDirection, } from './MultipleSelectBox.types';
|
|
@@ -287,12 +287,12 @@ export const SelectBox = forwardRef((props, ref) => {
|
|
|
287
287
|
? notFoundMessage
|
|
288
288
|
: options.length > 0
|
|
289
289
|
? notFoundMessage
|
|
290
|
-
: emptyMessage }) })), [classes.emptyMessage, enableSearchOptions, searchText, notFoundMessage, options.length, emptyMessage]);
|
|
290
|
+
: emptyMessage }) }, "empty-message")), [classes.emptyMessage, enableSearchOptions, searchText, notFoundMessage, options.length, emptyMessage]);
|
|
291
291
|
// Render infinite scroll error message with retry button
|
|
292
292
|
const renderInfiniteScrollError = useCallback(() => infiniteScrollError ? (_jsxs("li", { className: cx(classes.infiniteScrollError, 'mfui-SelectBox__infiniteScrollError'), role: "alert", children: [_jsxs("div", { className: cx(classes.infiniteScrollErrorMessage, 'mfui-SelectBox__infiniteScrollErrorMessage'), "aria-live": "polite", children: [_jsx(Error, { "aria-hidden": true, className: cx(classes.infiniteScrollErrorIcon, 'mfui-SelectBox__infiniteScrollErrorIcon') }), _jsx(Typography, { variant: "body", children: infiniteScrollErrorMessage })] }), _jsx("div", { className: cx(classes.infiniteScrollErrorButton, 'mfui-SelectBox__infiniteScrollErrorButton'), children: _jsx(Button, { size: "small", onClick: (event) => {
|
|
293
293
|
event.stopPropagation();
|
|
294
294
|
retryInfiniteScroll();
|
|
295
|
-
}, children: infiniteScrollRetryButtonText }) })] })) : null, [
|
|
295
|
+
}, children: infiniteScrollRetryButtonText }) })] }, "infinite-scroll-error")) : null, [
|
|
296
296
|
infiniteScrollError,
|
|
297
297
|
classes.infiniteScrollError,
|
|
298
298
|
classes.infiniteScrollErrorIcon,
|
|
@@ -303,7 +303,7 @@ export const SelectBox = forwardRef((props, ref) => {
|
|
|
303
303
|
infiniteScrollRetryButtonText,
|
|
304
304
|
]);
|
|
305
305
|
// Render infinite scroll loading indicator
|
|
306
|
-
const renderInfiniteScrollLoading = useCallback(() => isInfiniteScrollLoading && enableInfiniteScroll ? (_jsx("div", { className: cx(classes.infiniteScrollLoading, 'mfui-SelectBox__infiniteScrollLoading'), children: _jsx(ProgressIndicator, {}) })) : null, [isInfiniteScrollLoading, enableInfiniteScroll, classes.infiniteScrollLoading]);
|
|
306
|
+
const renderInfiniteScrollLoading = useCallback(() => isInfiniteScrollLoading && enableInfiniteScroll ? (_jsx("div", { className: cx(classes.infiniteScrollLoading, 'mfui-SelectBox__infiniteScrollLoading'), children: _jsx(ProgressIndicator, {}) }, "infinite-scroll-loading")) : null, [isInfiniteScrollLoading, enableInfiniteScroll, classes.infiniteScrollLoading]);
|
|
307
307
|
const optionsNode = (_jsx("div", { ref: scrollWrapperRef, className: cx(classes.scrollWrapper, 'mfui-SelectBox__scrollWrapper'), onScroll: enableInfiniteScroll ? handleInfiniteScroll : undefined, children: _jsx("ul", { role: "listbox", id: listBoxId, className: cx(classes.listBox, 'mfui-SelectBox__listBox'), tabIndex: -1, style: isVirtualized
|
|
308
308
|
? {
|
|
309
309
|
height: `${String(totalSize)}px`,
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -41,7 +41,7 @@ type UseFixedColumnsReturn = {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
|
-
* A hook to calculate the position of fixed columns in the
|
|
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
|
|
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,
|
|
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
|
|
42
|
-
* return <
|
|
41
|
+
* const WrappedDataTableCell = (props) => {
|
|
42
|
+
* return <DataTableCell {...props} customProp="value" />;
|
|
43
43
|
* };
|
|
44
|
-
*
|
|
44
|
+
* WrappedDataTableCell.displayName = 'DataTableCell'; // Recommended for detection
|
|
45
45
|
*
|
|
46
46
|
* // Wrapper with hooks (displayName is required)
|
|
47
|
-
* const
|
|
47
|
+
* const WrappedDataTableCellWithHooks = (props) => {
|
|
48
48
|
* const [state, setState] = useState(initialState);
|
|
49
|
-
* return <
|
|
49
|
+
* return <DataTableCell {...props} state={state} />;
|
|
50
50
|
* };
|
|
51
|
-
*
|
|
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,
|
|
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
|
|
43
|
-
* return <
|
|
42
|
+
* const WrappedDataTableCell = (props) => {
|
|
43
|
+
* return <DataTableCell {...props} customProp="value" />;
|
|
44
44
|
* };
|
|
45
|
-
*
|
|
45
|
+
* WrappedDataTableCell.displayName = 'DataTableCell'; // Recommended for detection
|
|
46
46
|
*
|
|
47
47
|
* // Wrapper with hooks (displayName is required)
|
|
48
|
-
* const
|
|
48
|
+
* const WrappedDataTableCellWithHooks = (props) => {
|
|
49
49
|
* const [state, setState] = useState(initialState);
|
|
50
|
-
* return <
|
|
50
|
+
* return <DataTableCell {...props} state={state} />;
|
|
51
51
|
* };
|
|
52
|
-
*
|
|
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
|