@rocket.chat/fuselage 0.75.0 → 0.77.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/components/Avatar/Avatar.d.ts +2 -2
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Box/stylingProps.d.ts +1 -0
- package/dist/components/Box/stylingProps.d.ts.map +1 -1
- package/dist/components/Button/ActionButton.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectAnchor.d.ts +6 -4
- package/dist/components/MultiSelect/MultiSelectAnchor.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectAnchorParams.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelectAnchorParams.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts +20 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts +6 -4
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +3 -4
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/fuselage.css +1 -1
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +35 -17
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +4 -4
- package/package.json +2 -3
|
@@ -745,12 +745,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
745
745
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
746
746
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
747
747
|
const AvatarContainer_1 = __importDefault(__webpack_require__(/*! ./AvatarContainer */ "./src/components/Avatar/AvatarContainer.tsx"));
|
|
748
|
-
const Avatar = ({ size = 'x36', rounded = false, objectFit
|
|
748
|
+
const Avatar = ({ size = 'x36', rounded = false, objectFit, url, className, alt, ...props }) => {
|
|
749
749
|
const innerClass = [
|
|
750
750
|
'rcx-avatar__element',
|
|
751
|
-
objectFit && 'rcx-avatar__element--object-fit',
|
|
752
751
|
size && `rcx-avatar__element--${size}`,
|
|
753
752
|
rounded && 'rcx-avatar__element--rounded',
|
|
753
|
+
objectFit && `rcx-avatar__element--object-fit-${objectFit}`,
|
|
754
754
|
]
|
|
755
755
|
.filter(Boolean)
|
|
756
756
|
.join(' ');
|
|
@@ -1188,6 +1188,7 @@ exports.propDefs = {
|
|
|
1188
1188
|
overflow: stringProp,
|
|
1189
1189
|
overflowX: stringProp,
|
|
1190
1190
|
overflowY: stringProp,
|
|
1191
|
+
objectFit: stringProp,
|
|
1191
1192
|
position: stringProp,
|
|
1192
1193
|
zIndex: numberOrStringProp,
|
|
1193
1194
|
inset: insetProp,
|
|
@@ -3058,7 +3059,7 @@ const WithErrorWrapper_1 = __importDefault(__webpack_require__(/*! ../../helpers
|
|
|
3058
3059
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3059
3060
|
const Field_1 = __webpack_require__(/*! ./Field */ "./src/components/Field/Field.tsx");
|
|
3060
3061
|
const FieldLink = (props) => {
|
|
3061
|
-
const component = (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'a',
|
|
3062
|
+
const component = (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'a', "rcx-field__link": true, ...props });
|
|
3062
3063
|
if (true) {
|
|
3063
3064
|
return ((0, jsx_runtime_1.jsx)(WithErrorWrapper_1.default, { context: Field_1.FieldContext, parentComponent: 'Field', componentName: FieldLink.name, children: component }));
|
|
3064
3065
|
}
|
|
@@ -5923,7 +5924,9 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5923
5924
|
innerRef.current?.focus();
|
|
5924
5925
|
return show();
|
|
5925
5926
|
});
|
|
5926
|
-
|
|
5927
|
+
const listboxId = props.id ? `${props.id}-listbox` : undefined;
|
|
5928
|
+
const { id, name, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, ...containerProps } = props;
|
|
5929
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'div', "rcx-select": true, className: [error && 'invalid', disabled && 'disabled'], ref: containerRef, onClick: handleClick, disabled: disabled, ...containerProps, children: [(0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(Margins_1.Margins, { inline: 'x4', children: (0, jsx_runtime_1.jsx)(Flex_1.FlexContainer, { children: (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', children: (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', display: 'flex', alignItems: 'center', flexWrap: 'wrap', margin: '-x8', children: (0, jsx_runtime_1.jsxs)(Margins_1.Margins, { all: 'x4', children: [renderAnchor({
|
|
5927
5930
|
'ref': anchorRef,
|
|
5928
5931
|
'children': internalValue.length === 0 ? placeholder : null,
|
|
5929
5932
|
'disabled': disabled ?? false,
|
|
@@ -5931,8 +5934,17 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5931
5934
|
'onBlur': hide,
|
|
5932
5935
|
'onKeyDown': handleKeyDown,
|
|
5933
5936
|
'onKeyUp': handleKeyUp,
|
|
5937
|
+
'role': 'combobox',
|
|
5934
5938
|
'aria-expanded': visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE,
|
|
5935
|
-
'aria-
|
|
5939
|
+
'aria-haspopup': 'listbox',
|
|
5940
|
+
'aria-controls': listboxId,
|
|
5941
|
+
id,
|
|
5942
|
+
name,
|
|
5943
|
+
'aria-label': ariaLabel,
|
|
5944
|
+
'aria-labelledby': ariaLabelledBy,
|
|
5945
|
+
'aria-describedby': ariaDescribedBy,
|
|
5946
|
+
'aria-invalid': ariaInvalid,
|
|
5947
|
+
'aria-required': ariaRequired,
|
|
5936
5948
|
}), internalValue.map((value) => {
|
|
5937
5949
|
const currentOption = options.find(([val]) => val === value);
|
|
5938
5950
|
return RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { value: value, label: getLabel(currentOption), onMouseDown: (e) => {
|
|
@@ -5946,7 +5958,7 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5946
5958
|
}, children: getLabel(currentOption) }, String(value)));
|
|
5947
5959
|
})] }) }) }) }) }) }), (0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 0, shrink: 0, children: (0, jsx_runtime_1.jsx)(Margins_1.Margins, { inline: 'x4', children: (0, jsx_runtime_1.jsx)(SelectAddon_1.default, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE
|
|
5948
5960
|
? 'chevron-up'
|
|
5949
|
-
: addonIcon || 'chevron-down', size: 'x20' }) }) }) }), (0, jsx_runtime_1.jsx)(AnimatedVisibility_1.AnimatedVisibility, { visibility: visible, children: (0, jsx_runtime_1.jsx)(Position_1.Position, { anchor: containerRef, children: (0, jsx_runtime_1.jsx)(_Options, { width: borderBoxSize.inlineSize, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, renderItem: renderItem || Option_1.CheckOption,
|
|
5961
|
+
: addonIcon || 'chevron-down', size: 'x20' }) }) }) }), (0, jsx_runtime_1.jsx)(AnimatedVisibility_1.AnimatedVisibility, { visibility: visible, children: (0, jsx_runtime_1.jsx)(Position_1.Position, { anchor: containerRef, children: (0, jsx_runtime_1.jsx)(_Options, { width: borderBoxSize.inlineSize, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, renderItem: renderItem || Option_1.CheckOption, id: listboxId, options: filteredOptions, onSelect: internalChanged, cursor: cursor, customEmpty: customEmpty }) }) })] }));
|
|
5950
5962
|
});
|
|
5951
5963
|
exports["default"] = MultiSelect;
|
|
5952
5964
|
|
|
@@ -5967,8 +5979,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5967
5979
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5968
5980
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5969
5981
|
const SelectFocus_1 = __importDefault(__webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx"));
|
|
5970
|
-
const MultiSelectAnchor = (0, react_1.forwardRef)(function MultiSelectAnchor(props, ref) {
|
|
5971
|
-
return ((0, jsx_runtime_1.jsx)(SelectFocus_1.default, { "rcx-input-box--undecorated": true, ref: ref,
|
|
5982
|
+
const MultiSelectAnchor = (0, react_1.forwardRef)(function MultiSelectAnchor({ children, ...props }, ref) {
|
|
5983
|
+
return ((0, jsx_runtime_1.jsx)(SelectFocus_1.default, { "rcx-input-box--undecorated": true, ref: ref, order: 1, ...props, children: children }));
|
|
5972
5984
|
});
|
|
5973
5985
|
exports["default"] = MultiSelectAnchor;
|
|
5974
5986
|
|
|
@@ -5990,10 +6002,10 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
5990
6002
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5991
6003
|
const MultiSelect_1 = __importDefault(__webpack_require__(/*! ./MultiSelect */ "./src/components/MultiSelect/MultiSelect.tsx"));
|
|
5992
6004
|
const MultiSelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectFilteredAnchor */ "./src/components/MultiSelect/MultiSelectFilteredAnchor.tsx"));
|
|
5993
|
-
const MultiSelectFiltered = ({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) => {
|
|
6005
|
+
const MultiSelectFiltered = (0, react_1.forwardRef)(({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }, ref) => {
|
|
5994
6006
|
const [filter, setFilter] = (0, react_1.useState)('');
|
|
5995
|
-
return ((0, jsx_runtime_1.jsx)(MultiSelect_1.default, { ...props, filter: propFilter || filter, setFilter: propSetFilter || setFilter, options: options, anchor: (params) => ((0, jsx_runtime_1.jsx)(MultiSelectFilteredAnchor_1.default, { placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter, ...params })) }));
|
|
5996
|
-
};
|
|
6007
|
+
return ((0, jsx_runtime_1.jsx)(MultiSelect_1.default, { ...props, ref: ref, filter: propFilter || filter, setFilter: propSetFilter || setFilter, options: options, anchor: (params) => ((0, jsx_runtime_1.jsx)(MultiSelectFilteredAnchor_1.default, { placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter, ...params })) }));
|
|
6008
|
+
});
|
|
5997
6009
|
exports["default"] = MultiSelectFiltered;
|
|
5998
6010
|
|
|
5999
6011
|
|
|
@@ -6012,7 +6024,7 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
6012
6024
|
const Flex_1 = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
6013
6025
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6014
6026
|
const MultiSelectFilteredAnchor = (0, react_1.forwardRef)(function MultiSelectFilteredAnchor({ children: _children, filter, onChangeFilter, placeholder, ...props }, ref) {
|
|
6015
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(InputBox_1.Input, { ref: ref, placeholder: placeholder, value: filter, onInput: (e) => onChangeFilter(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true,
|
|
6027
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(InputBox_1.Input, { ref: ref, placeholder: placeholder, value: filter, onInput: (e) => onChangeFilter(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true, order: 1 }) }));
|
|
6016
6028
|
});
|
|
6017
6029
|
exports["default"] = MultiSelectFilteredAnchor;
|
|
6018
6030
|
|
|
@@ -6570,7 +6582,7 @@ const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/i
|
|
|
6570
6582
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
6571
6583
|
const Tile_1 = __webpack_require__(/*! ../Tile */ "./src/components/Tile/index.ts");
|
|
6572
6584
|
const OptionsEmpty_1 = __importDefault(__webpack_require__(/*! ./OptionsEmpty */ "./src/components/Options/OptionsEmpty.tsx"));
|
|
6573
|
-
const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', multiple, renderEmpty: EmptyComponent = OptionsEmpty_1.default, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, customEmpty, ...props }, ref) {
|
|
6585
|
+
const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', multiple, renderEmpty: EmptyComponent = OptionsEmpty_1.default, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, customEmpty, id, ...props }, ref) {
|
|
6574
6586
|
const liRef = (0, react_1.useRef)(null);
|
|
6575
6587
|
(0, react_1.useLayoutEffect)(() => {
|
|
6576
6588
|
if (!liRef.current) {
|
|
@@ -6604,7 +6616,7 @@ const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', m
|
|
|
6604
6616
|
}, value: value, selected: selected || (multiple !== true && undefined), disabled: disabled, focus: cursor === i || undefined }, value));
|
|
6605
6617
|
}
|
|
6606
6618
|
}), [options, multiple, cursor, onSelect, OptionComponent]);
|
|
6607
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, ...props, ref: ref, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, { padding: 0, paddingBlock: 'x12', paddingInline: 0, elevation: '2', children: (0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, smooth: true, children: (0, jsx_runtime_1.jsxs)(Tile_1.Tile, { ref: liRef, elevation: '0', padding: 'none', maxHeight: maxHeight, onMouseDown: prevent_1.prevent, onClick: prevent_1.prevent, is: 'ol', "aria-multiselectable": multiple || true, role: 'listbox', "aria-activedescendant": options?.[cursor]?.[0]
|
|
6619
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, ...props, ref: ref, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, { padding: 0, paddingBlock: 'x12', paddingInline: 0, elevation: '2', children: (0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, smooth: true, children: (0, jsx_runtime_1.jsxs)(Tile_1.Tile, { ref: liRef, elevation: '0', padding: 'none', maxHeight: maxHeight, onMouseDown: prevent_1.prevent, onClick: prevent_1.prevent, is: 'ol', "aria-multiselectable": multiple || true, role: 'listbox', id: id, "aria-activedescendant": options?.[cursor]?.[0]
|
|
6608
6620
|
? String(options?.[cursor]?.[0])
|
|
6609
6621
|
: undefined, children: [!options.length && (0, jsx_runtime_1.jsx)(EmptyComponent, { customEmpty: customEmpty }), optionsMemoized] }) }) }) }));
|
|
6610
6622
|
});
|
|
@@ -7112,12 +7124,13 @@ Object.defineProperty(exports, "PaginatedMultiSelectFiltered", ({ enumerable: tr
|
|
|
7112
7124
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7113
7125
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7114
7126
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7115
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
7116
7127
|
const Chevron_1 = __webpack_require__(/*! ../Chevron */ "./src/components/Chevron/index.ts");
|
|
7117
7128
|
const defaultItemsPerPageLabel = () => 'Items per page:';
|
|
7118
7129
|
const defaultShowingResultsLabel = ({ count, current, itemsPerPage, }) => `Showing results ${current + 1} - ${Math.min(current + itemsPerPage, count)} of ${count}`;
|
|
7119
7130
|
const itemsPerPageOptions = [25, 50, 100];
|
|
7120
7131
|
const Pagination = ({ count, current = 0, itemsPerPage = 25, itemsPerPageLabel = defaultItemsPerPageLabel, showingResultsLabel = defaultShowingResultsLabel, onSetItemsPerPage, onSetCurrent, divider, ...props }) => {
|
|
7132
|
+
const paginationResultLabelId = (0, react_1.useId)();
|
|
7133
|
+
const itemsPerPageLabelId = (0, react_1.useId)();
|
|
7121
7134
|
const hasItemsPerPageSelection = itemsPerPageOptions.length > 1;
|
|
7122
7135
|
const currentPage = Math.floor(current / itemsPerPage);
|
|
7123
7136
|
const pages = Math.ceil(count / itemsPerPage);
|
|
@@ -7148,7 +7161,12 @@ const Pagination = ({ count, current = 0, itemsPerPage = 25, itemsPerPageLabel =
|
|
|
7148
7161
|
const handleSetPageLinkClick = (page) => () => {
|
|
7149
7162
|
onSetCurrent?.(page * itemsPerPage);
|
|
7150
7163
|
};
|
|
7151
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
7164
|
+
return ((0, jsx_runtime_1.jsxs)("nav", { className: [
|
|
7165
|
+
'rcx-box rcx-box--full rcx-pagination',
|
|
7166
|
+
divider && 'rcx-pagination--divider',
|
|
7167
|
+
]
|
|
7168
|
+
.filter(Boolean)
|
|
7169
|
+
.join(' '), "aria-label": 'Pagination Navigation', ...props, children: [hasItemsPerPageSelection && ((0, jsx_runtime_1.jsxs)("div", { className: 'rcx-pagination__left', children: [(0, jsx_runtime_1.jsx)("span", { className: 'rcx-pagination__label', id: itemsPerPageLabelId, children: itemsPerPageLabel(renderingContext) }), (0, jsx_runtime_1.jsx)("ol", { className: 'rcx-box rcx-box--full rcx-pagination__list', "aria-labelledby": itemsPerPageLabelId, children: itemsPerPageOptions.map((itemsPerPageOption) => ((0, jsx_runtime_1.jsx)("li", { className: 'rcx-pagination__list-item', children: (0, jsx_runtime_1.jsx)("button", { className: 'rcx-box rcx-box--full rcx-pagination__link', tabIndex: itemsPerPage === itemsPerPageOption ? -1 : 0, disabled: itemsPerPage === itemsPerPageOption, "aria-label": `Show ${itemsPerPageOption} items per page`, onClick: handleSetItemsPerPageLinkClick(itemsPerPageOption), children: itemsPerPageOption }) }, itemsPerPageOption))) })] })), (0, jsx_runtime_1.jsxs)("div", { className: 'rcx-pagination__right', children: [(0, jsx_runtime_1.jsx)("span", { className: 'rcx-pagination__label', id: paginationResultLabelId, children: showingResultsLabel(renderingContext) }), (0, jsx_runtime_1.jsxs)("ol", { className: 'rcx-box rcx-box--full rcx-pagination__list', "aria-labelledby": paginationResultLabelId, children: [(0, jsx_runtime_1.jsx)("li", { className: 'rcx-pagination__list-item', children: (0, jsx_runtime_1.jsx)("button", { className: 'rcx-box rcx-box--full rcx-pagination__back', disabled: currentPage === 0, "aria-label": 'Previous page', onClick: handleSetPageLinkClick(currentPage - 1), children: (0, jsx_runtime_1.jsx)(Chevron_1.Chevron, { left: true, size: 'x16' }) }) }), displayedPages.map((page, i) => ((0, jsx_runtime_1.jsx)("li", { className: 'rcx-pagination__list-item', children: page === '⋯' ? ('⋯') : ((0, jsx_runtime_1.jsx)("button", { className: 'rcx-box rcx-box--full rcx-pagination__link', disabled: currentPage === page, "aria-label": `Page ${Number(page) + 1}`, onClick: handleSetPageLinkClick(Number(page)), children: Number(page) + 1 })) }, i))), (0, jsx_runtime_1.jsx)("li", { className: 'rcx-pagination__list-item', children: (0, jsx_runtime_1.jsx)("button", { className: 'rcx-box rcx-box--full rcx-pagination__forward', disabled: currentPage === pages - 1, "aria-label": 'Next page', onClick: handleSetPageLinkClick(currentPage + 1), children: (0, jsx_runtime_1.jsx)(Chevron_1.Chevron, { right: true, size: 'x16' }) }) })] })] })] }));
|
|
7152
7170
|
};
|
|
7153
7171
|
exports["default"] = Pagination;
|
|
7154
7172
|
|
|
@@ -8204,7 +8222,7 @@ exports.SelectAria = (0, react_1.forwardRef)(function SelectAria({ error, placeh
|
|
|
8204
8222
|
const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(outerRef, ref);
|
|
8205
8223
|
const { triggerProps, valueProps, menuProps } = (0, react_aria_1.useSelect)({ isDisabled, ...props }, state, ref);
|
|
8206
8224
|
const { focusProps, isFocusVisible } = (0, react_aria_1.useFocusRing)();
|
|
8207
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(SelectTrigger_1.SelectTrigger, { ...(0, react_aria_1.mergeProps)(focusProps, triggerProps), ref: mergedRef, small: small, focus: isFocusVisible || state.isOpen, error: error, id: id, children: [(0, jsx_runtime_1.jsx)(
|
|
8225
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_aria_1.HiddenSelect, { state: state, triggerRef: ref, label: props.label, name: props.name, isDisabled: isDisabled }), (0, jsx_runtime_1.jsxs)(SelectTrigger_1.SelectTrigger, { ...(0, react_aria_1.mergeProps)(focusProps, triggerProps), ref: mergedRef, small: small, focus: isFocusVisible || state.isOpen, error: error, id: id, children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', color: state.selectedItem ? 'default' : 'hint', ...valueProps, ...(small && { fontScale: 'c1' }), children: state.selectedItem ? state.selectedItem.rendered : placeholder }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { color: 'default', name: state.isOpen ? 'chevron-up' : 'chevron-down', size: 'x20' })] }), state.isOpen && ((0, jsx_runtime_1.jsx)(Popover_1.Popover, { state: state, triggerRef: ref, placement: 'bottom', offset: 4, containerPadding: 8, children: (0, jsx_runtime_1.jsx)(Options_1.OptionContainer, { style: {
|
|
8208
8226
|
width: borderBoxSize?.inlineSize,
|
|
8209
8227
|
}, children: (0, jsx_runtime_1.jsx)(Listbox_1.ListBox, { ...menuProps, state: state }) }) }))] }));
|
|
8210
8228
|
});
|