@moneyforward/mfui-components 3.8.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.
|
@@ -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`,
|