@moneyforward/mfui-components 3.13.1 → 3.14.1
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/Button/Button.d.ts +1 -1
- package/dist/src/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/src/DateTimeSelection/DateRangePicker/DateRangePickerProvider/DateRangePickerProvider.d.ts +2 -2
- package/dist/src/DateTimeSelection/shared/BaseRangePicker/BaseRangePickerProvider/BaseRangePickerProvider.d.ts +2 -2
- package/dist/src/IconButton/IconButton.d.ts +3 -3
- package/dist/src/MultipleSelectBox/MultipleSelectBox.d.ts +1 -1
- package/dist/src/MultipleSelectBox/MultipleSelectBox.js +29 -28
- package/dist/src/MultipleSelectBox/MultipleSelectBox.types.d.ts +78 -1
- package/dist/src/RadioButton/RadioButton.d.ts +1 -1
- package/dist/src/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/src/Stack/Stack.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/index.d.ts +42 -42
- package/dist/src/index.js +42 -42
- package/package.json +1 -1
|
@@ -20,4 +20,4 @@ export declare const Button: import("react").ForwardRefExoticComponent<{
|
|
|
20
20
|
rightIcon?: React.ReactElement;
|
|
21
21
|
href?: string;
|
|
22
22
|
customLinkComponent?: import("react").ElementType;
|
|
23
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "
|
|
23
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "type" | "rel" | "download" | "hrefLang" | "ping" | "target" | "referrerPolicy"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
@@ -14,4 +14,4 @@ export declare const CheckboxGroup: import("react").ForwardRefExoticComponent<{
|
|
|
14
14
|
defaultValues?: (string | number | readonly string[] | undefined)[];
|
|
15
15
|
values?: (string | number | readonly string[] | undefined)[];
|
|
16
16
|
onChange?: (selectedValue: (string | number | readonly string[] | undefined)[]) => void;
|
|
17
|
-
} & Pick<import("..").CheckboxProps, "
|
|
17
|
+
} & Pick<import("..").CheckboxProps, "disabled" | "name"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -31,7 +31,7 @@ export declare function useDateRangePickerContext(): {
|
|
|
31
31
|
handleClear: () => void;
|
|
32
32
|
handleApply: () => void;
|
|
33
33
|
handleCancel: () => void;
|
|
34
|
-
selecting: "
|
|
34
|
+
selecting: "start" | "end";
|
|
35
35
|
temporaryStart: Date | undefined;
|
|
36
36
|
temporaryEnd: Date | undefined;
|
|
37
37
|
previewDate: Date | undefined;
|
|
@@ -43,7 +43,7 @@ export declare function useDateRangePickerContext(): {
|
|
|
43
43
|
isRangeEnd: (date: Date) => boolean;
|
|
44
44
|
setTemporaryStart: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
|
|
45
45
|
setTemporaryEnd: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
|
|
46
|
-
setSelecting: import("react").Dispatch<import("react").SetStateAction<"
|
|
46
|
+
setSelecting: import("react").Dispatch<import("react").SetStateAction<"start" | "end">>;
|
|
47
47
|
disableAutoOpen: boolean | undefined;
|
|
48
48
|
pendingFocusDate: string | null;
|
|
49
49
|
setPendingFocusDate: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
@@ -31,7 +31,7 @@ export declare function useBaseRangePickerContext(): {
|
|
|
31
31
|
handleClear: () => void;
|
|
32
32
|
handleApply: () => void;
|
|
33
33
|
handleCancel: () => void;
|
|
34
|
-
selecting: "
|
|
34
|
+
selecting: "start" | "end";
|
|
35
35
|
temporaryStart: Date | undefined;
|
|
36
36
|
temporaryEnd: Date | undefined;
|
|
37
37
|
previewDate: Date | undefined;
|
|
@@ -43,7 +43,7 @@ export declare function useBaseRangePickerContext(): {
|
|
|
43
43
|
isRangeEnd: (date: Date) => boolean;
|
|
44
44
|
setTemporaryStart: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
|
|
45
45
|
setTemporaryEnd: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
|
|
46
|
-
setSelecting: import("react").Dispatch<import("react").SetStateAction<"
|
|
46
|
+
setSelecting: import("react").Dispatch<import("react").SetStateAction<"start" | "end">>;
|
|
47
47
|
disableAutoOpen: boolean | undefined;
|
|
48
48
|
pendingFocusDate: string | null;
|
|
49
49
|
setPendingFocusDate: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
@@ -4,13 +4,13 @@ export declare const InternalIconButton: import("react").ForwardRefExoticCompone
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
href?: string;
|
|
6
6
|
customLinkComponent?: import("react").ElementType;
|
|
7
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "
|
|
7
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "type" | "rel" | "download" | "hrefLang" | "ping" | "target" | "referrerPolicy"> & {
|
|
8
8
|
size?: import("../../styled-system/recipes").IconButtonSlotRecipeVariant["size"];
|
|
9
|
-
} & import("react").RefAttributes<
|
|
9
|
+
} & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
10
10
|
export declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
11
11
|
outlined?: import("../../styled-system/recipes").IconButtonSlotRecipeVariant["outlined"];
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
href?: string;
|
|
15
15
|
customLinkComponent?: import("react").ElementType;
|
|
16
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "
|
|
16
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "type" | "rel" | "download" | "hrefLang" | "ping" | "target" | "referrerPolicy"> & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
@@ -4,4 +4,4 @@ import { type MultipleSelectBoxProps, type AllowedValueTypes } from './MultipleS
|
|
|
4
4
|
* This component is separated from the SelectBox component because it has a different behavior.
|
|
5
5
|
* This component switches the variants of looks and behaviors depends on the props: size, invalid, disabled.
|
|
6
6
|
*/
|
|
7
|
-
export declare function MultipleSelectBox<T extends AllowedValueTypes = string, AdditionalProps extends Record<string, unknown> = Record<string, never>>({ id, triggerProps, triggerWrapperProps, size, options, defaultValue, placeholder, emptyMessage, disabled, invalid, targetDOMNode, name, onChange, value, showDisplayValueAsTag, renderDisplayValue, enableSearchOptions, notFoundMessage, searchBoxProps, loading, onSearchOptions, clearButtonProps, disableClearButton, optionPanelProps, popoverWrapperProps, enableAllOptionsControls, enableApplyControls, showSelectedCount, selectAllButtonProps, clearAllButtonProps, selectedCountProps, cancelButtonProps, applyButtonProps, renderOption, onOpenStateChanged, enableAutoUnmount, onBlur, showGroupOptionDivider, enableVirtualization, virtualizationOptions, infiniteScroll, }: MultipleSelectBoxProps<T, AdditionalProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function MultipleSelectBox<T extends AllowedValueTypes = string, AdditionalProps extends Record<string, unknown> = Record<string, never>>({ id, triggerProps, triggerWrapperProps, size, options, defaultValue, placeholder, emptyMessage, disabled, invalid, targetDOMNode, name, onChange, value, showDisplayValueAsTag, renderDisplayValue, enableSearchOptions, notFoundMessage, searchBoxProps, loading, onSearchOptions, clearButtonProps, disableClearButton, optionPanelProps, popoverWrapperProps, enableAllOptionsControls, enableApplyControls, showSelectedCount, selectAllButtonProps, clearAllButtonProps, selectedCountProps, cancelButtonProps, applyButtonProps, renderOption, renderPopoverHeader, renderOptionList, renderPopoverFooter, onOpenStateChanged, enableAutoUnmount, onBlur, showGroupOptionDivider, enableVirtualization, virtualizationOptions, infiniteScroll, }: MultipleSelectBoxProps<T, AdditionalProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -34,7 +34,7 @@ const SKELETON_ITEM_COUNT = 4;
|
|
|
34
34
|
*/
|
|
35
35
|
export function MultipleSelectBox({ id, triggerProps, triggerWrapperProps, size, options = [], defaultValue,
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
37
|
-
placeholder, emptyMessage, disabled, invalid, targetDOMNode, name, onChange, value, showDisplayValueAsTag, renderDisplayValue, enableSearchOptions = false, notFoundMessage, searchBoxProps, loading = false, onSearchOptions, clearButtonProps, disableClearButton = false, optionPanelProps, popoverWrapperProps, enableAllOptionsControls = false, enableApplyControls = false, showSelectedCount = false, selectAllButtonProps, clearAllButtonProps, selectedCountProps, cancelButtonProps, applyButtonProps, renderOption, onOpenStateChanged, enableAutoUnmount = true, onBlur, showGroupOptionDivider, enableVirtualization = false, virtualizationOptions, infiniteScroll, }) {
|
|
37
|
+
placeholder, emptyMessage, disabled, invalid, targetDOMNode, name, onChange, value, showDisplayValueAsTag, renderDisplayValue, enableSearchOptions = false, notFoundMessage, searchBoxProps, loading = false, onSearchOptions, clearButtonProps, disableClearButton = false, optionPanelProps, popoverWrapperProps, enableAllOptionsControls = false, enableApplyControls = false, showSelectedCount = false, selectAllButtonProps, clearAllButtonProps, selectedCountProps, cancelButtonProps, applyButtonProps, renderOption, renderPopoverHeader, renderOptionList, renderPopoverFooter, onOpenStateChanged, enableAutoUnmount = true, onBlur, showGroupOptionDivider, enableVirtualization = false, virtualizationOptions, infiniteScroll, }) {
|
|
38
38
|
const classes = multipleSelectBoxSlotRecipe({ showGroupOptionDivider });
|
|
39
39
|
const triggerRef = useRef(null);
|
|
40
40
|
const listBoxId = useId();
|
|
@@ -301,33 +301,34 @@ placeholder, emptyMessage, disabled, invalid, targetDOMNode, name, onChange, val
|
|
|
301
301
|
]);
|
|
302
302
|
// Render infinite scroll loading indicator
|
|
303
303
|
const renderInfiniteScrollLoading = useCallback(() => isInfiniteScrollLoading && enableInfiniteScroll ? (_jsx("div", { className: cx(classes.infiniteScrollLoading, 'mfui-MultipleSelectBox__infiniteScrollLoading'), children: _jsx(ProgressIndicator, {}) })) : null, [isInfiniteScrollLoading, enableInfiniteScroll, classes.infiniteScrollLoading]);
|
|
304
|
+
const searchNode = enableSearchOptions ? (_jsx(SearchBox, { ref: searchInputRef, enableClearButton: true, value: searchText, textBoxSize: "small", autoComplete: "off", onChange: onSearchTextChange, ...searchBoxProps })) : null;
|
|
305
|
+
const allOptionsControlsNode = enableAllOptionsControls ? (_jsxs(HStack, { justifyContent: "space-between", children: [_jsx(Button, { ref: selectAllButtonRef, size: "small", onClick: handleSelectAll, children: selectAllButtonProps?.label ?? 'すべて選択' }), _jsx(Button, { ref: clearAllButtonRef, size: "small", onClick: handleClearAll, children: clearAllButtonProps?.label ?? 'すべて解除' })] })) : null;
|
|
306
|
+
const selectedCountNode = enableApplyControls || showSelectedCount ? (_jsx(Typography, { variant: "body", color: "neutral.600", children: enableApplyControls
|
|
307
|
+
? (selectedCountProps?.render?.(temporaryValues.size) ?? `${String(temporaryValues.size)}件選択中`)
|
|
308
|
+
: (selectedCountProps?.render?.(localSelectedValuesSet.size) ??
|
|
309
|
+
`${String(localSelectedValuesSet.size)}件選択中`) })) : null;
|
|
310
|
+
const applyControlsNode = enableApplyControls ? (_jsxs(HStack, { gap: "horizontal.0-1of2", children: [_jsx(Button, { ref: cancelButtonRef, size: "small", priority: "secondary", onClick: handleCancelButtonClick, children: cancelButtonProps?.label ?? 'キャンセル' }), _jsx(Button, { ref: applyButtonRef, size: "small", priority: "primary", onClick: handleApplyButtonClick, children: applyButtonProps?.label ?? '適用' })] })) : null;
|
|
311
|
+
const optionsNode = (_jsx("div", { ref: scrollWrapperRef, className: cx(classes.scrollWrapper, 'mfui-MultipleSelectBox__scrollWrapper'), onScroll: enableInfiniteScroll ? handleInfiniteScroll : undefined, children: _jsx("ul", { ref: listBoxRef, role: "listbox", id: listBoxId, className: cx(classes.listBox, 'mfui-MultipleSelectBox__listBox'), tabIndex: -1, style: isVirtualized && totalSize > 0
|
|
312
|
+
? {
|
|
313
|
+
height: `${String(totalSize)}px`,
|
|
314
|
+
position: 'relative',
|
|
315
|
+
}
|
|
316
|
+
: undefined, children: loading
|
|
317
|
+
? Array.from({ length: SKELETON_ITEM_COUNT }).map((_, index) => (_jsx("li", { className: cx(classes.skeletonItem, 'mfui-MultipleSelectBox__skeletonItem'), children: _jsx(Skeleton, {}) }, index)))
|
|
318
|
+
: isVirtualized && virtualItems.length > 0
|
|
319
|
+
? // Virtualized rendering with group support
|
|
320
|
+
[...renderVirtualizedItems(), renderInfiniteScrollLoading(), renderInfiniteScrollError()].filter(Boolean)
|
|
321
|
+
: filteredOptions.length > 0
|
|
322
|
+
? [...renderNonVirtualizedItems(), renderInfiniteScrollLoading(), renderInfiniteScrollError()].filter(Boolean)
|
|
323
|
+
: [
|
|
324
|
+
_jsx("li", { className: cx(classes.emptyMessage, 'mfui-MultipleSelectBox__emptyMessage'), children: _jsx(Typography, { variant: "body", children: enableSearchOptions && searchText && notFoundMessage
|
|
325
|
+
? notFoundMessage
|
|
326
|
+
: options.length > 0
|
|
327
|
+
? notFoundMessage
|
|
328
|
+
: emptyMessage }) }, "empty"),
|
|
329
|
+
renderInfiniteScrollError(),
|
|
330
|
+
].filter(Boolean) }) }));
|
|
304
331
|
return (_jsx(Popover, { renderTrigger: ({ setTriggerRef, togglePopover, handleTriggerKeyDown, handleTriggerBlur }) => (_jsx(MultipleSelectBoxTrigger, { ref: triggerRef, wrapperRef: setTriggerRef, selectedOptions: localSelectedOptions, id: id, disabled: disabled, triggerProps: triggerProps, triggerWrapperProps: triggerWrapperProps, name: name,
|
|
305
332
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
306
|
-
placeholder: placeholder, size: size, listBoxId: listBoxId, isOptionPanelOpen: isOptionPanelOpen, invalid: invalid, showDisplayValueAsTag: showDisplayValueAsTag, renderDisplayValue: renderDisplayValue, clearButtonProps: clearButtonProps, disableClearButton: disableClearButton, updateSelectedValues: updateSelectedValues, onClick: togglePopover, onKeyDown: handleTriggerKeyDown, onBlur: handleTriggerBlur })), contentProps: { className: classes.popover }, minWidth: optionPanelProps?.minWidth, maxHeight: popoverWrapperProps?.maxHeight, allowedPlacements: optionPanelProps?.allowedPlacements, renderContent: () => (_jsxs("div", { ref: optionPanelRef, className: cx(classes.optionPanel, 'mfui-MultipleSelectBox__optionPanel', optionPanelProps?.className), tabIndex: -1, onKeyDown: handleKeyDownMenu, children: [enableSearchOptions || enableAllOptionsControls ? (
|
|
307
|
-
? {
|
|
308
|
-
height: `${String(totalSize)}px`,
|
|
309
|
-
position: 'relative',
|
|
310
|
-
}
|
|
311
|
-
: undefined, children: loading
|
|
312
|
-
? Array.from({ length: SKELETON_ITEM_COUNT }).map((_, index) => (_jsx("li", { className: cx(classes.skeletonItem, 'mfui-MultipleSelectBox__skeletonItem'), children: _jsx(Skeleton, {}) }, index)))
|
|
313
|
-
: isVirtualized && virtualItems.length > 0
|
|
314
|
-
? // Virtualized rendering with group support
|
|
315
|
-
[...renderVirtualizedItems(), renderInfiniteScrollLoading(), renderInfiniteScrollError()].filter(Boolean)
|
|
316
|
-
: filteredOptions.length > 0
|
|
317
|
-
? [
|
|
318
|
-
...renderNonVirtualizedItems(),
|
|
319
|
-
renderInfiniteScrollLoading(),
|
|
320
|
-
renderInfiniteScrollError(),
|
|
321
|
-
].filter(Boolean)
|
|
322
|
-
: [
|
|
323
|
-
_jsx("li", { className: cx(classes.emptyMessage, 'mfui-MultipleSelectBox__emptyMessage'), children: _jsx(Typography, { variant: "body", children: enableSearchOptions && searchText && notFoundMessage
|
|
324
|
-
? notFoundMessage
|
|
325
|
-
: options.length > 0
|
|
326
|
-
? notFoundMessage
|
|
327
|
-
: emptyMessage }) }, "empty"),
|
|
328
|
-
renderInfiniteScrollError(),
|
|
329
|
-
].filter(Boolean) }) }), enableApplyControls || showSelectedCount ? (_jsxs(HStack, { className: cx(classes.menuFooter, 'mfui-MultipleSelectBox__menuFooter'), justifyContent: "space-between", alignItems: "center", children: [_jsx(Typography, { variant: "body", color: "neutral.600", children: enableApplyControls
|
|
330
|
-
? (selectedCountProps?.render?.(temporaryValues.size) ?? `${String(temporaryValues.size)}件選択中`)
|
|
331
|
-
: (selectedCountProps?.render?.(localSelectedValuesSet.size) ??
|
|
332
|
-
`${String(localSelectedValuesSet.size)}件選択中`) }), enableApplyControls ? (_jsxs(HStack, { gap: "horizontal.0-1of2", children: [_jsx(Button, { ref: cancelButtonRef, size: "small", priority: "secondary", onClick: handleCancelButtonClick, children: cancelButtonProps?.label ?? 'キャンセル' }), _jsx(Button, { ref: applyButtonRef, size: "small", priority: "primary", onClick: handleApplyButtonClick, children: applyButtonProps?.label ?? '適用' })] })) : null] })) : null] })), open: isOptionPanelOpen, targetDOMNode: targetDOMNode, enableAutoUnmount: enableAutoUnmount, onOpenStateChanged: toggleOptionPanel, onBlur: onBlur }));
|
|
333
|
+
placeholder: placeholder, size: size, listBoxId: listBoxId, isOptionPanelOpen: isOptionPanelOpen, invalid: invalid, showDisplayValueAsTag: showDisplayValueAsTag, renderDisplayValue: renderDisplayValue, clearButtonProps: clearButtonProps, disableClearButton: disableClearButton, updateSelectedValues: updateSelectedValues, onClick: togglePopover, onKeyDown: handleTriggerKeyDown, onBlur: handleTriggerBlur })), contentProps: { className: classes.popover }, minWidth: optionPanelProps?.minWidth, maxHeight: popoverWrapperProps?.maxHeight, allowedPlacements: optionPanelProps?.allowedPlacements, renderContent: () => (_jsxs("div", { ref: optionPanelRef, className: cx(classes.optionPanel, 'mfui-MultipleSelectBox__optionPanel', optionPanelProps?.className), tabIndex: -1, onKeyDown: handleKeyDownMenu, children: [enableSearchOptions || enableAllOptionsControls ? (_jsx(VStack, { className: cx(classes.menuHeader, 'mfui-MultipleSelectBox__menuHeader'), gap: "8px", children: renderPopoverHeader ? (renderPopoverHeader({ searchNode, allOptionsControlsNode })) : (_jsxs(_Fragment, { children: [searchNode, allOptionsControlsNode] })) })) : null, renderOptionList ? renderOptionList({ optionsNode }) : optionsNode, enableApplyControls || showSelectedCount ? (_jsx(HStack, { className: cx(classes.menuFooter, 'mfui-MultipleSelectBox__menuFooter'), justifyContent: "space-between", alignItems: "center", children: renderPopoverFooter ? (renderPopoverFooter({ selectedCountNode, applyControlsNode })) : (_jsxs(_Fragment, { children: [selectedCountNode, applyControlsNode] })) })) : null] })), open: isOptionPanelOpen, targetDOMNode: targetDOMNode, enableAutoUnmount: enableAutoUnmount, onOpenStateChanged: toggleOptionPanel, onBlur: onBlur }));
|
|
333
334
|
}
|
|
@@ -290,6 +290,83 @@ export type MultipleSelectBoxProps<T extends AllowedValueTypes = string, Additio
|
|
|
290
290
|
* ```
|
|
291
291
|
*/
|
|
292
292
|
renderOption?: (option: MultipleSelectBoxOption<T, AdditionalProps>, isSelected: boolean) => React.ReactNode;
|
|
293
|
+
/**
|
|
294
|
+
* Customize the popover header content.
|
|
295
|
+
*
|
|
296
|
+
* The component always renders the `mfui-MultipleSelectBox__menuHeader` wrapper (when
|
|
297
|
+
* `enableSearchOptions` or `enableAllOptionsControls` is `true`) — this function controls
|
|
298
|
+
* the content rendered inside it.
|
|
299
|
+
*
|
|
300
|
+
* - `searchNode` is the search input. Available only when `enableSearchOptions` is `true`, otherwise `null`.
|
|
301
|
+
* - `allOptionsControlsNode` is the "Select All" / "Clear All" buttons row. Available only when `enableAllOptionsControls` is `true`, otherwise `null`.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```tsx
|
|
305
|
+
* <MultipleSelectBox
|
|
306
|
+
* enableSearchOptions
|
|
307
|
+
* enableAllOptionsControls
|
|
308
|
+
* renderPopoverHeader={({ searchNode, allOptionsControlsNode }) => (
|
|
309
|
+
* <>
|
|
310
|
+
* {searchNode}
|
|
311
|
+
* {allOptionsControlsNode}
|
|
312
|
+
* <Button size="small">+ Add Option</Button>
|
|
313
|
+
* </>
|
|
314
|
+
* )}
|
|
315
|
+
* />
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
renderPopoverHeader?: (nodes: {
|
|
319
|
+
searchNode: React.ReactNode | null;
|
|
320
|
+
allOptionsControlsNode: React.ReactNode | null;
|
|
321
|
+
}) => React.ReactNode;
|
|
322
|
+
/**
|
|
323
|
+
* Customize the popover body content.
|
|
324
|
+
*
|
|
325
|
+
* - `optionsNode` is the scrollable list of options (includes the scroll wrapper and listbox).
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```tsx
|
|
329
|
+
* <MultipleSelectBox
|
|
330
|
+
* renderOptionList={({ optionsNode }) => (
|
|
331
|
+
* <>
|
|
332
|
+
* {optionsNode}
|
|
333
|
+
* <div>Custom content below the list</div>
|
|
334
|
+
* </>
|
|
335
|
+
* )}
|
|
336
|
+
* />
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
renderOptionList?: (nodes: {
|
|
340
|
+
optionsNode: React.ReactNode;
|
|
341
|
+
}) => React.ReactNode;
|
|
342
|
+
/**
|
|
343
|
+
* Customize the popover footer content.
|
|
344
|
+
*
|
|
345
|
+
* The component always renders the `mfui-MultipleSelectBox__menuFooter` wrapper (when
|
|
346
|
+
* `enableApplyControls` or `showSelectedCount` is `true`) — this function controls
|
|
347
|
+
* the content rendered inside it.
|
|
348
|
+
*
|
|
349
|
+
* - `selectedCountNode` is the selected count text. Available when `enableApplyControls` or `showSelectedCount` is `true`, otherwise `null`.
|
|
350
|
+
* - `applyControlsNode` is the Cancel / Apply buttons row. Available only when `enableApplyControls` is `true`, otherwise `null`.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```tsx
|
|
354
|
+
* <MultipleSelectBox
|
|
355
|
+
* enableApplyControls
|
|
356
|
+
* renderPopoverFooter={({ selectedCountNode, applyControlsNode }) => (
|
|
357
|
+
* <>
|
|
358
|
+
* {selectedCountNode}
|
|
359
|
+
* <Button size="small">Custom action</Button>
|
|
360
|
+
* {applyControlsNode}
|
|
361
|
+
* </>
|
|
362
|
+
* )}
|
|
363
|
+
* />
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
renderPopoverFooter?: (nodes: {
|
|
367
|
+
selectedCountNode: React.ReactNode | null;
|
|
368
|
+
applyControlsNode: React.ReactNode | null;
|
|
369
|
+
}) => React.ReactNode;
|
|
293
370
|
/**
|
|
294
371
|
* Whether to enable search options functionality
|
|
295
372
|
*/
|
|
@@ -301,7 +378,7 @@ export type MultipleSelectBoxProps<T extends AllowedValueTypes = string, Additio
|
|
|
301
378
|
/**
|
|
302
379
|
* The properties for the SearchBox component.
|
|
303
380
|
*/
|
|
304
|
-
searchBoxProps?: Pick<SearchBoxProps, 'clearButtonProps' | 'placeholder'>;
|
|
381
|
+
searchBoxProps?: Pick<SearchBoxProps, 'clearButtonProps' | 'placeholder' | 'invalid'>;
|
|
305
382
|
/**
|
|
306
383
|
* The properties for the option panel element.
|
|
307
384
|
*
|
|
@@ -10,4 +10,4 @@ export declare const RadioButton: import("react").ForwardRefExoticComponent<{
|
|
|
10
10
|
label?: string;
|
|
11
11
|
checked?: boolean | undefined;
|
|
12
12
|
disabled?: boolean | undefined;
|
|
13
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
13
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "disabled" | "checked"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
|
|
12
12
|
*/
|
|
13
|
-
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<import("..").RadioButtonProps, "
|
|
13
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<import("..").RadioButtonProps, "disabled" | "name" | "value" | "defaultValue" | "onChange"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -21,7 +21,7 @@ export declare const GRID_TOKEN_VALUES: Record<string, string>;
|
|
|
21
21
|
export declare const Stack: import("react").ForwardRefExoticComponent<{
|
|
22
22
|
children?: import("react").ReactNode;
|
|
23
23
|
direction?: import("react").CSSProperties["flexDirection"];
|
|
24
|
-
gap?: ("horizontal.1" | "horizontal.2" | "horizontal.
|
|
24
|
+
gap?: ("horizontal.1" | "horizontal.2" | "horizontal.3" | "horizontal.8" | "horizontal.4" | "horizontal.5" | "horizontal.6" | "horizontal.7" | "horizontal.20" | "horizontal.0-1of8" | "horizontal.0-1of4" | "horizontal.0-1of2" | "horizontal.1-1of2" | "horizontal.2-1of2" | "horizontal.3-1of7" | "horizontal.3-1of2" | "horizontal.4-1of2" | "horizontal.5-1of2" | "horizontal.6-1of2" | "horizontal.7-1of2" | "vertical.1" | "vertical.2" | "vertical.3" | "vertical.0-1of8" | "vertical.0-1of4" | "vertical.0-1of2" | "vertical.1-1of2" | "vertical.2-1of2" | "vertical.0-1of6" | "vertical.0-1of3" | "vertical.0-2of3" | "vertical.0-3of4" | "vertical.0-5of6" | "vertical.0-7of8" | "vertical.1-1of8" | "vertical.1-1of4" | "vertical.1-1of3" | "vertical.1-2of3") | `${number}px` | number;
|
|
25
25
|
wrap?: import("react").CSSProperties["flexWrap"];
|
|
26
26
|
alignItems?: import("react").CSSProperties["alignItems"];
|
|
27
27
|
justifyContent?: import("react").CSSProperties["justifyContent"];
|
|
@@ -43,4 +43,4 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<{
|
|
|
43
43
|
hideFromScreenReader?: boolean;
|
|
44
44
|
maxWidth?: import("react").CSSProperties["maxWidth"];
|
|
45
45
|
contentProps?: Pick<import("react").ComponentPropsWithoutRef<"div">, "className">;
|
|
46
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "
|
|
46
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "disabled" | "content"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Badge';
|
|
1
3
|
export * from './Breadcrumbs';
|
|
2
4
|
export * from './Button';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './CheckboxCard';
|
|
7
|
+
export * from './CheckboxGroup';
|
|
8
|
+
export * from './DataGrid';
|
|
9
|
+
export * from './DataTable';
|
|
10
|
+
export * from './DateTimeSelection';
|
|
3
11
|
export * from './Dialog';
|
|
12
|
+
export * from './Disclosure';
|
|
13
|
+
export * from './DisplayTable';
|
|
4
14
|
export * from './DropdownMenu';
|
|
15
|
+
export * from './EmbeddedSidePane';
|
|
16
|
+
export * from './FileBox';
|
|
17
|
+
export * from './FileDropZone';
|
|
18
|
+
export * from './FilterSelectBox';
|
|
19
|
+
export * from './FilterTrigger';
|
|
5
20
|
export * from './FocusIndicator';
|
|
21
|
+
export * from './FormFooter';
|
|
6
22
|
export * from './GlobalHeader';
|
|
23
|
+
export * from './Heading';
|
|
7
24
|
export * from './HelpMessage';
|
|
8
25
|
export * from './IconButton';
|
|
26
|
+
export * from './KeyValue';
|
|
27
|
+
export * from './MainNavigation';
|
|
9
28
|
export * from './MultilineTextBox';
|
|
29
|
+
export * from './MultipleFilterSelectBox';
|
|
30
|
+
export * from './MultipleSelectBox';
|
|
31
|
+
export * from './NavigationList';
|
|
32
|
+
export * from './NumberBox';
|
|
33
|
+
export * from './PageHeader';
|
|
34
|
+
export * from './Pagination';
|
|
10
35
|
export * from './Panel';
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './Tooltip';
|
|
15
|
-
export * from './Typography';
|
|
16
|
-
export * from './Checkbox';
|
|
17
|
-
export * from './Heading';
|
|
36
|
+
export * from './Popover';
|
|
37
|
+
export * from './Portal';
|
|
38
|
+
export * from './ProgressIndicator';
|
|
18
39
|
export * from './RadioButton';
|
|
40
|
+
export * from './RadioButtonCard';
|
|
19
41
|
export * from './RadioGroup';
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
42
|
+
export * from './SearchBox';
|
|
43
|
+
export * from './SectionMessage';
|
|
22
44
|
export * from './SelectBox';
|
|
23
45
|
export * from './SidePane';
|
|
24
|
-
export * from './Toast';
|
|
25
|
-
export * from './ToggleSwitch';
|
|
26
|
-
export * from './Pagination';
|
|
27
|
-
export * from './Tag';
|
|
28
|
-
export * from './ProgressIndicator';
|
|
29
|
-
export * from './DataTable';
|
|
30
|
-
export * from './DataGrid';
|
|
31
|
-
export * from './SubNavigation';
|
|
32
|
-
export * from './Tabs';
|
|
33
|
-
export * from './DateTimeSelection';
|
|
34
|
-
export * from './Stack';
|
|
35
|
-
export * from './MultipleSelectBox';
|
|
36
|
-
export * from './SearchBox';
|
|
37
|
-
export * from './CheckboxCard';
|
|
38
|
-
export * from './PageHeader';
|
|
39
|
-
export * from './RadioButtonCard';
|
|
40
|
-
export * from './Disclosure';
|
|
41
|
-
export * from './StatusLabel';
|
|
42
|
-
export * from './FileBox';
|
|
43
|
-
export * from './FilterSelectBox';
|
|
44
|
-
export * from './FilterTrigger';
|
|
45
46
|
export * from './Skeleton';
|
|
46
|
-
export * from './CheckboxGroup';
|
|
47
|
-
export * from './MultipleFilterSelectBox';
|
|
48
|
-
export * from './Popover';
|
|
49
|
-
export * from './Portal';
|
|
50
|
-
export * from './KeyValue';
|
|
51
|
-
export * from './FileDropZone';
|
|
52
|
-
export * from './EmbeddedSidePane';
|
|
53
|
-
export * from './DisplayTable';
|
|
54
|
-
export * from './Accordion';
|
|
55
47
|
export * from './SplitView';
|
|
56
|
-
export * from './
|
|
57
|
-
export * from './
|
|
58
|
-
export * from './
|
|
48
|
+
export * from './Stack';
|
|
49
|
+
export * from './StatusLabel';
|
|
50
|
+
export * from './SubNavigation';
|
|
51
|
+
export * from './Tabs';
|
|
52
|
+
export * from './Tag';
|
|
53
|
+
export * from './TextBox';
|
|
54
|
+
export * from './TextLink';
|
|
55
|
+
export * from './Toast';
|
|
56
|
+
export * from './ToggleSwitch';
|
|
57
|
+
export * from './Tooltip';
|
|
58
|
+
export * from './Typography';
|
package/dist/src/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Badge';
|
|
1
3
|
export * from './Breadcrumbs';
|
|
2
4
|
export * from './Button';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './CheckboxCard';
|
|
7
|
+
export * from './CheckboxGroup';
|
|
8
|
+
export * from './DataGrid';
|
|
9
|
+
export * from './DataTable';
|
|
10
|
+
export * from './DateTimeSelection';
|
|
3
11
|
export * from './Dialog';
|
|
12
|
+
export * from './Disclosure';
|
|
13
|
+
export * from './DisplayTable';
|
|
4
14
|
export * from './DropdownMenu';
|
|
15
|
+
export * from './EmbeddedSidePane';
|
|
16
|
+
export * from './FileBox';
|
|
17
|
+
export * from './FileDropZone';
|
|
18
|
+
export * from './FilterSelectBox';
|
|
19
|
+
export * from './FilterTrigger';
|
|
5
20
|
export * from './FocusIndicator';
|
|
21
|
+
export * from './FormFooter';
|
|
6
22
|
export * from './GlobalHeader';
|
|
23
|
+
export * from './Heading';
|
|
7
24
|
export * from './HelpMessage';
|
|
8
25
|
export * from './IconButton';
|
|
26
|
+
export * from './KeyValue';
|
|
27
|
+
export * from './MainNavigation';
|
|
9
28
|
export * from './MultilineTextBox';
|
|
29
|
+
export * from './MultipleFilterSelectBox';
|
|
30
|
+
export * from './MultipleSelectBox';
|
|
31
|
+
export * from './NavigationList';
|
|
32
|
+
export * from './NumberBox';
|
|
33
|
+
export * from './PageHeader';
|
|
34
|
+
export * from './Pagination';
|
|
10
35
|
export * from './Panel';
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './Tooltip';
|
|
15
|
-
export * from './Typography';
|
|
16
|
-
export * from './Checkbox';
|
|
17
|
-
export * from './Heading';
|
|
36
|
+
export * from './Popover';
|
|
37
|
+
export * from './Portal';
|
|
38
|
+
export * from './ProgressIndicator';
|
|
18
39
|
export * from './RadioButton';
|
|
40
|
+
export * from './RadioButtonCard';
|
|
19
41
|
export * from './RadioGroup';
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
42
|
+
export * from './SearchBox';
|
|
43
|
+
export * from './SectionMessage';
|
|
22
44
|
export * from './SelectBox';
|
|
23
45
|
export * from './SidePane';
|
|
24
|
-
export * from './Toast';
|
|
25
|
-
export * from './ToggleSwitch';
|
|
26
|
-
export * from './Pagination';
|
|
27
|
-
export * from './Tag';
|
|
28
|
-
export * from './ProgressIndicator';
|
|
29
|
-
export * from './DataTable';
|
|
30
|
-
export * from './DataGrid';
|
|
31
|
-
export * from './SubNavigation';
|
|
32
|
-
export * from './Tabs';
|
|
33
|
-
export * from './DateTimeSelection';
|
|
34
|
-
export * from './Stack';
|
|
35
|
-
export * from './MultipleSelectBox';
|
|
36
|
-
export * from './SearchBox';
|
|
37
|
-
export * from './CheckboxCard';
|
|
38
|
-
export * from './PageHeader';
|
|
39
|
-
export * from './RadioButtonCard';
|
|
40
|
-
export * from './Disclosure';
|
|
41
|
-
export * from './StatusLabel';
|
|
42
|
-
export * from './FileBox';
|
|
43
|
-
export * from './FilterSelectBox';
|
|
44
|
-
export * from './FilterTrigger';
|
|
45
46
|
export * from './Skeleton';
|
|
46
|
-
export * from './CheckboxGroup';
|
|
47
|
-
export * from './MultipleFilterSelectBox';
|
|
48
|
-
export * from './Popover';
|
|
49
|
-
export * from './Portal';
|
|
50
|
-
export * from './KeyValue';
|
|
51
|
-
export * from './FileDropZone';
|
|
52
|
-
export * from './EmbeddedSidePane';
|
|
53
|
-
export * from './DisplayTable';
|
|
54
|
-
export * from './Accordion';
|
|
55
47
|
export * from './SplitView';
|
|
56
|
-
export * from './
|
|
57
|
-
export * from './
|
|
58
|
-
export * from './
|
|
48
|
+
export * from './Stack';
|
|
49
|
+
export * from './StatusLabel';
|
|
50
|
+
export * from './SubNavigation';
|
|
51
|
+
export * from './Tabs';
|
|
52
|
+
export * from './Tag';
|
|
53
|
+
export * from './TextBox';
|
|
54
|
+
export * from './TextLink';
|
|
55
|
+
export * from './Toast';
|
|
56
|
+
export * from './ToggleSwitch';
|
|
57
|
+
export * from './Tooltip';
|
|
58
|
+
export * from './Typography';
|