@rocket.chat/fuselage 0.76.0 → 0.78.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/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts +7 -4
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- 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/Menu/Menu.d.ts.map +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/PaletteStyleTag/hooks/useCreateStyleContainer.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +2 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Position/Position.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Away.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Busy.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Disabled.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Loading.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Offline.d.ts.map +1 -1
- package/dist/components/StatusBullet/icons/Online.d.ts.map +1 -1
- package/dist/contexts/OwnerDocument.d.ts +7 -0
- package/dist/contexts/OwnerDocument.d.ts.map +1 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/fuselage.css +2 -2
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +130 -52
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +6 -6
- package/dist/hooks/useStyle.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -3
|
@@ -500,25 +500,26 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
500
500
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
501
501
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
502
502
|
const __1 = __webpack_require__(/*! ../.. */ "./src/index.ts");
|
|
503
|
+
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
503
504
|
const Slider_1 = __webpack_require__(/*! ../Slider */ "./src/components/Slider/index.ts");
|
|
504
505
|
const getMaskTime = (durationTime) => new Date(durationTime * 1000)
|
|
505
506
|
.toISOString()
|
|
506
507
|
.slice(durationTime > 60 * 60 ? 11 : 14, 19);
|
|
507
|
-
function forceDownload(url, fileName) {
|
|
508
|
+
function forceDownload(ownerDocument, url, fileName) {
|
|
508
509
|
const xhr = new XMLHttpRequest();
|
|
509
510
|
xhr.open('GET', url, true);
|
|
510
511
|
xhr.responseType = 'blob';
|
|
511
512
|
xhr.onload = function () {
|
|
512
513
|
const urlCreator = window.URL || window.webkitURL;
|
|
513
514
|
const imageUrl = urlCreator.createObjectURL(this.response);
|
|
514
|
-
const tag =
|
|
515
|
+
const tag = ownerDocument.createElement('a');
|
|
515
516
|
tag.href = imageUrl;
|
|
516
517
|
if (fileName) {
|
|
517
518
|
tag.download = fileName;
|
|
518
519
|
}
|
|
519
|
-
|
|
520
|
+
ownerDocument.body.appendChild(tag);
|
|
520
521
|
tag.click();
|
|
521
|
-
|
|
522
|
+
ownerDocument.body.removeChild(tag);
|
|
522
523
|
};
|
|
523
524
|
xhr.send();
|
|
524
525
|
}
|
|
@@ -571,6 +572,7 @@ const AudioPlayer = (0, react_1.forwardRef)(({ src, type = 'audio/mpeg', maxPlay
|
|
|
571
572
|
}
|
|
572
573
|
handlePlaybackSpeed(1);
|
|
573
574
|
};
|
|
575
|
+
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
574
576
|
return ((0, jsx_runtime_1.jsxs)(__1.Box, { borderWidth: 'default', bg: 'tint', borderColor: 'extra-light', pb: 12, pie: 8, pis: 16, borderRadius: 'x4', w: '100%', maxWidth: 'x300', ref: containerRef, display: 'flex', alignItems: 'center', children: [(0, jsx_runtime_1.jsx)(__1.IconButton, { primary: true, medium: true, onClick: handlePlay, "aria-label": isPlaying ? pauseLabel : playLabel, icon: isPlaying ? 'pause-shape-filled' : 'play-shape-filled' }), (0, jsx_runtime_1.jsxs)(__1.Margins, { inline: 8, children: [(0, jsx_runtime_1.jsx)(__1.Box, { fontScale: 'p2', color: 'secondary-info', children: isPlaying || currentTime > 0
|
|
575
577
|
? getMaskTime(currentTime)
|
|
576
578
|
: getMaskTime(durationTime) }), (0, jsx_runtime_1.jsx)(__1.Box, { mi: 16, w: 'full', children: (0, jsx_runtime_1.jsx)(Slider_1.Slider, { "aria-label": audioPlaybackRangeLabel, showOutput: false, value: currentTime, maxValue: durationTime, onChange: (value) => {
|
|
@@ -579,9 +581,9 @@ const AudioPlayer = (0, react_1.forwardRef)(({ src, type = 'audio/mpeg', maxPlay
|
|
|
579
581
|
}
|
|
580
582
|
} }) }), (0, jsx_runtime_1.jsxs)(__1.Button, { secondary: true, small: true, onClick: handlePlaybackSpeedSingleControl, "aria-label": changePlaybackSpeedLabel, children: [playbackSpeed, "x"] })] }), download && ((0, jsx_runtime_1.jsx)(__1.IconButton, { primary: true, "aria-label": downloadAudioFileLabel, is: 'a', href: src, download: true, icon: 'download', medium: true, onClick: (e) => {
|
|
581
583
|
const { host } = new URL(src);
|
|
582
|
-
if (host !==
|
|
584
|
+
if (host !== ownerDocument.defaultView?.location.host) {
|
|
583
585
|
e.preventDefault();
|
|
584
|
-
forceDownload(src);
|
|
586
|
+
forceDownload(ownerDocument, src);
|
|
585
587
|
}
|
|
586
588
|
} })), (0, jsx_runtime_1.jsxs)("audio", { style: { display: 'none' }, onTimeUpdate: (e) => {
|
|
587
589
|
setCurrentTime(e.target.currentTime);
|
|
@@ -657,8 +659,9 @@ const isSelectedValid = (value) => (selected) => {
|
|
|
657
659
|
? selected.value === value
|
|
658
660
|
: value.includes(selected.value);
|
|
659
661
|
};
|
|
660
|
-
function AutoComplete({ value, filter, setFilter, options = [], renderItem, renderSelected: RenderSelected, onChange, renderEmpty, placeholder, error, disabled, multiple, onBlur: onBlurAction = () => { }, ...props }) {
|
|
661
|
-
const
|
|
662
|
+
function AutoComplete({ value, filter, setFilter, options = [], renderItem, renderSelected: RenderSelected, onChange, renderEmpty, placeholder, error, disabled, multiple, onBlur: onBlurAction = () => { }, ...props }, ref) {
|
|
663
|
+
const innerRef = (0, react_1.useRef)(null);
|
|
664
|
+
const mergedRefs = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
662
665
|
const { ref: containerRef, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
663
666
|
const [selected, setSelected] = (0, react_1.useState)(() => getSelected(value, options) || []);
|
|
664
667
|
(0, react_1.useEffect)(() => {
|
|
@@ -703,13 +706,13 @@ function AutoComplete({ value, filter, setFilter, options = [], renderItem, rend
|
|
|
703
706
|
onBlurAction(event);
|
|
704
707
|
});
|
|
705
708
|
(0, react_1.useEffect)(reset, [filter, reset]);
|
|
706
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-autocomplete": true, ref: containerRef, onClick: (0, fuselage_hooks_1.useStableCallback)(() =>
|
|
709
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-autocomplete": true, ref: containerRef, onClick: (0, fuselage_hooks_1.useStableCallback)(() => innerRef.current?.focus()), flexGrow: 1, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', flexGrow: 1, alignItems: 'center', flexWrap: 'wrap', margin: 'neg-x4', role: 'group', children: (0, jsx_runtime_1.jsxs)(Margins_1.Margins, { all: 'x4', children: [(0, jsx_runtime_1.jsx)(InputBox_1.Input, { ref: mergedRefs, onChange: (0, fuselage_hooks_1.useStableCallback)((e) => setFilter?.(e.currentTarget.value)), onBlur: handleOnBlur, onFocus: show, onKeyDown: handleKeyDown, placeholder: optionsAreVisible === AnimatedVisibility_1.AnimatedVisibility.HIDDEN || !value
|
|
707
710
|
? placeholder
|
|
708
711
|
: undefined, order: 1, "rcx-input-box--undecorated": true, value: filter, disabled: disabled, ...props }), selected.map((itemSelected) => RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { selected: itemSelected, onRemove: handleRemove }, itemSelected.value)) : ((0, jsx_runtime_1.jsx)(Chip_1.Chip, { value: itemSelected.value, children: itemSelected.label, onClick: handleRemove }, itemSelected.value)))] }) }), (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-autocomplete__addon": true, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: optionsAreVisible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE
|
|
709
712
|
? 'cross'
|
|
710
713
|
: 'magnifier', size: 'x20', color: 'default' }) }), (0, jsx_runtime_1.jsx)(PositionAnimated_1.PositionAnimated, { visible: optionsAreVisible, anchor: containerRef, children: (0, jsx_runtime_1.jsx)(Options_1.Options, { width: borderBoxSize.inlineSize, onSelect: handleSelect, renderItem: renderItem, renderEmpty: renderEmpty, cursor: cursor, value: value, options: memoizedOptions }) })] }));
|
|
711
714
|
}
|
|
712
|
-
exports["default"] = AutoComplete;
|
|
715
|
+
exports["default"] = (0, react_1.forwardRef)(AutoComplete);
|
|
713
716
|
|
|
714
717
|
|
|
715
718
|
/***/ },
|
|
@@ -745,12 +748,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
745
748
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
746
749
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
747
750
|
const AvatarContainer_1 = __importDefault(__webpack_require__(/*! ./AvatarContainer */ "./src/components/Avatar/AvatarContainer.tsx"));
|
|
748
|
-
const Avatar = ({ size = 'x36', rounded = false, objectFit
|
|
751
|
+
const Avatar = ({ size = 'x36', rounded = false, objectFit, url, className, alt, ...props }) => {
|
|
749
752
|
const innerClass = [
|
|
750
753
|
'rcx-avatar__element',
|
|
751
|
-
objectFit && 'rcx-avatar__element--object-fit',
|
|
752
754
|
size && `rcx-avatar__element--${size}`,
|
|
753
755
|
rounded && 'rcx-avatar__element--rounded',
|
|
756
|
+
objectFit && `rcx-avatar__element--object-fit-${objectFit}`,
|
|
754
757
|
]
|
|
755
758
|
.filter(Boolean)
|
|
756
759
|
.join(' ');
|
|
@@ -1188,6 +1191,7 @@ exports.propDefs = {
|
|
|
1188
1191
|
overflow: stringProp,
|
|
1189
1192
|
overflowX: stringProp,
|
|
1190
1193
|
overflowY: stringProp,
|
|
1194
|
+
objectFit: stringProp,
|
|
1191
1195
|
position: stringProp,
|
|
1192
1196
|
zIndex: numberOrStringProp,
|
|
1193
1197
|
inset: insetProp,
|
|
@@ -3746,6 +3750,7 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
3746
3750
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
3747
3751
|
const react_dom_1 = __webpack_require__(/*! react-dom */ "react-dom");
|
|
3748
3752
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
3753
|
+
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
3749
3754
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
3750
3755
|
const MenuDropdown_1 = __importDefault(__webpack_require__(/*! ./MenuDropdown */ "./src/components/Menu/MenuDropdown.tsx"));
|
|
3751
3756
|
const MenuPopover_1 = __importDefault(__webpack_require__(/*! ./MenuPopover */ "./src/components/Menu/MenuPopover.tsx"));
|
|
@@ -3762,6 +3767,7 @@ const Menu = ({ icon = 'kebab', placement = 'bottom-start', title, is: MenuButto
|
|
|
3762
3767
|
const { large, medium, tiny, mini } = props;
|
|
3763
3768
|
const sizes = { large, medium, tiny, mini };
|
|
3764
3769
|
const defaultSmall = !large && !medium && !tiny && !mini;
|
|
3770
|
+
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
3765
3771
|
const popover = state.isOpen && ((0, jsx_runtime_1.jsx)(MenuPopover_1.default, { state: state, triggerRef: ref, placement: (0, helpers_1.getPlacement)(placement), maxWidth: maxWidth, children: (0, jsx_runtime_1.jsx)(MenuDropdown_1.default, { ...props, ...menuProps }) }));
|
|
3766
3772
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [button ? ((0, react_1.cloneElement)(button, {
|
|
3767
3773
|
...buttonProps,
|
|
@@ -3770,7 +3776,9 @@ const Menu = ({ icon = 'kebab', placement = 'bottom-start', title, is: MenuButto
|
|
|
3770
3776
|
className,
|
|
3771
3777
|
title,
|
|
3772
3778
|
pressed: pressed || state.isOpen,
|
|
3773
|
-
})) : ((0, jsx_runtime_1.jsx)(MenuButton, { ...buttonProps, ref: ref, icon: icon, className: className, title: title, pressed: pressed || state.isOpen, small: defaultSmall, ...sizes })), detached
|
|
3779
|
+
})) : ((0, jsx_runtime_1.jsx)(MenuButton, { ...buttonProps, ref: ref, icon: icon, className: className, title: title, pressed: pressed || state.isOpen, small: defaultSmall, ...sizes })), detached
|
|
3780
|
+
? (0, react_dom_1.createPortal)(popover, ownerDocument?.body || document.body)
|
|
3781
|
+
: popover] }));
|
|
3774
3782
|
};
|
|
3775
3783
|
exports["default"] = Menu;
|
|
3776
3784
|
|
|
@@ -5923,7 +5931,9 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5923
5931
|
innerRef.current?.focus();
|
|
5924
5932
|
return show();
|
|
5925
5933
|
});
|
|
5926
|
-
|
|
5934
|
+
const listboxId = props.id ? `${props.id}-listbox` : undefined;
|
|
5935
|
+
const { id, name, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, ...containerProps } = props;
|
|
5936
|
+
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
5937
|
'ref': anchorRef,
|
|
5928
5938
|
'children': internalValue.length === 0 ? placeholder : null,
|
|
5929
5939
|
'disabled': disabled ?? false,
|
|
@@ -5931,8 +5941,17 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5931
5941
|
'onBlur': hide,
|
|
5932
5942
|
'onKeyDown': handleKeyDown,
|
|
5933
5943
|
'onKeyUp': handleKeyUp,
|
|
5944
|
+
'role': 'combobox',
|
|
5934
5945
|
'aria-expanded': visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE,
|
|
5935
|
-
'aria-
|
|
5946
|
+
'aria-haspopup': 'listbox',
|
|
5947
|
+
'aria-controls': listboxId,
|
|
5948
|
+
id,
|
|
5949
|
+
name,
|
|
5950
|
+
'aria-label': ariaLabel,
|
|
5951
|
+
'aria-labelledby': ariaLabelledBy,
|
|
5952
|
+
'aria-describedby': ariaDescribedBy,
|
|
5953
|
+
'aria-invalid': ariaInvalid,
|
|
5954
|
+
'aria-required': ariaRequired,
|
|
5936
5955
|
}), internalValue.map((value) => {
|
|
5937
5956
|
const currentOption = options.find(([val]) => val === value);
|
|
5938
5957
|
return RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { value: value, label: getLabel(currentOption), onMouseDown: (e) => {
|
|
@@ -5946,7 +5965,7 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5946
5965
|
}, children: getLabel(currentOption) }, String(value)));
|
|
5947
5966
|
})] }) }) }) }) }) }), (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
5967
|
? '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,
|
|
5968
|
+
: 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
5969
|
});
|
|
5951
5970
|
exports["default"] = MultiSelect;
|
|
5952
5971
|
|
|
@@ -5967,8 +5986,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5967
5986
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5968
5987
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5969
5988
|
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,
|
|
5989
|
+
const MultiSelectAnchor = (0, react_1.forwardRef)(function MultiSelectAnchor({ children, ...props }, ref) {
|
|
5990
|
+
return ((0, jsx_runtime_1.jsx)(SelectFocus_1.default, { "rcx-input-box--undecorated": true, ref: ref, order: 1, ...props, children: children }));
|
|
5972
5991
|
});
|
|
5973
5992
|
exports["default"] = MultiSelectAnchor;
|
|
5974
5993
|
|
|
@@ -5990,10 +6009,10 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
5990
6009
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5991
6010
|
const MultiSelect_1 = __importDefault(__webpack_require__(/*! ./MultiSelect */ "./src/components/MultiSelect/MultiSelect.tsx"));
|
|
5992
6011
|
const MultiSelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectFilteredAnchor */ "./src/components/MultiSelect/MultiSelectFilteredAnchor.tsx"));
|
|
5993
|
-
const MultiSelectFiltered = ({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) => {
|
|
6012
|
+
const MultiSelectFiltered = (0, react_1.forwardRef)(({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }, ref) => {
|
|
5994
6013
|
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
|
-
};
|
|
6014
|
+
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 })) }));
|
|
6015
|
+
});
|
|
5997
6016
|
exports["default"] = MultiSelectFiltered;
|
|
5998
6017
|
|
|
5999
6018
|
|
|
@@ -6012,7 +6031,7 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
6012
6031
|
const Flex_1 = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
6013
6032
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6014
6033
|
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,
|
|
6034
|
+
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
6035
|
});
|
|
6017
6036
|
exports["default"] = MultiSelectFilteredAnchor;
|
|
6018
6037
|
|
|
@@ -6570,7 +6589,7 @@ const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/i
|
|
|
6570
6589
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
6571
6590
|
const Tile_1 = __webpack_require__(/*! ../Tile */ "./src/components/Tile/index.ts");
|
|
6572
6591
|
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) {
|
|
6592
|
+
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
6593
|
const liRef = (0, react_1.useRef)(null);
|
|
6575
6594
|
(0, react_1.useLayoutEffect)(() => {
|
|
6576
6595
|
if (!liRef.current) {
|
|
@@ -6604,7 +6623,7 @@ const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', m
|
|
|
6604
6623
|
}, value: value, selected: selected || (multiple !== true && undefined), disabled: disabled, focus: cursor === i || undefined }, value));
|
|
6605
6624
|
}
|
|
6606
6625
|
}), [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]
|
|
6626
|
+
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
6627
|
? String(options?.[cursor]?.[0])
|
|
6609
6628
|
: undefined, children: [!options.length && (0, jsx_runtime_1.jsx)(EmptyComponent, { customEmpty: customEmpty }), optionsMemoized] }) }) }) }));
|
|
6610
6629
|
});
|
|
@@ -7611,18 +7630,23 @@ exports.getThemePalette = getThemePalette;
|
|
|
7611
7630
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7612
7631
|
exports.useCreateStyleContainer = void 0;
|
|
7613
7632
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7614
|
-
const
|
|
7615
|
-
|
|
7616
|
-
const
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7633
|
+
const contexts_1 = __webpack_require__(/*! ../../../contexts */ "./src/contexts/index.ts");
|
|
7634
|
+
const useCreateStyleContainer = (id) => {
|
|
7635
|
+
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
7636
|
+
return (0, react_1.useMemo)(() => {
|
|
7637
|
+
const refElement = ownerDocument.getElementById('rcx-styles') ||
|
|
7638
|
+
ownerDocument.head.lastChild;
|
|
7639
|
+
const el = ownerDocument.getElementById(id);
|
|
7640
|
+
if (el) {
|
|
7641
|
+
return el;
|
|
7642
|
+
}
|
|
7643
|
+
const styleElement = ownerDocument.createElement('style');
|
|
7644
|
+
styleElement.setAttribute('id', id);
|
|
7645
|
+
ownerDocument.head.insertBefore(styleElement, refElement);
|
|
7646
|
+
ownerDocument.head.appendChild(ownerDocument.createElement('style'));
|
|
7647
|
+
return styleElement;
|
|
7648
|
+
}, [id, ownerDocument]);
|
|
7649
|
+
};
|
|
7626
7650
|
exports.useCreateStyleContainer = useCreateStyleContainer;
|
|
7627
7651
|
|
|
7628
7652
|
|
|
@@ -7717,14 +7741,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7717
7741
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7718
7742
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7719
7743
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
7720
|
-
|
|
7744
|
+
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
7745
|
+
function Popover({ portalContainer, ...props }) {
|
|
7721
7746
|
const popoverRef = (0, react_1.useRef)(null);
|
|
7722
7747
|
const { state, children, isNonModal } = props;
|
|
7748
|
+
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
7723
7749
|
const { popoverProps, underlayProps } = (0, react_aria_1.usePopover)({
|
|
7724
7750
|
...props,
|
|
7725
7751
|
popoverRef,
|
|
7752
|
+
boundaryElement: ownerDocument?.body,
|
|
7726
7753
|
}, state);
|
|
7727
|
-
return ((0, jsx_runtime_1.jsxs)(react_aria_1.Overlay, { children: [!isNonModal && (0, jsx_runtime_1.jsx)("div", { ...underlayProps }), (0, jsx_runtime_1.jsxs)("div", { ...popoverProps, ref: popoverRef, children: [!isNonModal && (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close }), children, (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close })] })] }));
|
|
7754
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_1.Overlay, { portalContainer: ownerDocument?.body, children: [!isNonModal && (0, jsx_runtime_1.jsx)("div", { ...underlayProps }), (0, jsx_runtime_1.jsxs)("div", { ...popoverProps, ref: popoverRef, children: [!isNonModal && (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close }), children, (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close })] })] }));
|
|
7728
7755
|
}
|
|
7729
7756
|
exports["default"] = Popover;
|
|
7730
7757
|
|
|
@@ -7760,25 +7787,27 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7760
7787
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
7761
7788
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7762
7789
|
const react_dom_1 = __webpack_require__(/*! react-dom */ "react-dom");
|
|
7790
|
+
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
7763
7791
|
const Position = ({ anchor, children, placement, margin, className: _className, ...props }) => {
|
|
7764
7792
|
const target = (0, react_1.useRef)(null);
|
|
7765
7793
|
const { style: positionStyle, placement: positionPlacement } = (0, fuselage_hooks_1.usePosition)(anchor, target, (0, react_1.useMemo)(() => ({ placement, margin }), [placement, margin])) || {};
|
|
7766
7794
|
const style = (0, react_1.useMemo)(() => ({ position: 'fixed', ...positionStyle }), [positionStyle]);
|
|
7795
|
+
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
7767
7796
|
const [portalContainer] = (0, react_1.useState)(() => {
|
|
7768
|
-
const prev =
|
|
7797
|
+
const prev = ownerDocument.getElementById('position-container');
|
|
7769
7798
|
if (prev) {
|
|
7770
7799
|
return prev;
|
|
7771
7800
|
}
|
|
7772
|
-
const element =
|
|
7801
|
+
const element = ownerDocument.createElement('div');
|
|
7773
7802
|
element.id = 'position-container';
|
|
7774
|
-
|
|
7803
|
+
ownerDocument.body.appendChild(element);
|
|
7775
7804
|
return element;
|
|
7776
7805
|
});
|
|
7777
7806
|
(0, react_1.useEffect)(() => () => {
|
|
7778
7807
|
if (portalContainer.childNodes.length === 0) {
|
|
7779
|
-
|
|
7808
|
+
ownerDocument.body.removeChild(portalContainer);
|
|
7780
7809
|
}
|
|
7781
|
-
}, [portalContainer]);
|
|
7810
|
+
}, [portalContainer, ownerDocument]);
|
|
7782
7811
|
return (0, react_dom_1.createPortal)((0, react_1.cloneElement)(children, {
|
|
7783
7812
|
ref: target,
|
|
7784
7813
|
style,
|
|
@@ -8210,7 +8239,7 @@ exports.SelectAria = (0, react_1.forwardRef)(function SelectAria({ error, placeh
|
|
|
8210
8239
|
const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(outerRef, ref);
|
|
8211
8240
|
const { triggerProps, valueProps, menuProps } = (0, react_aria_1.useSelect)({ isDisabled, ...props }, state, ref);
|
|
8212
8241
|
const { focusProps, isFocusVisible } = (0, react_aria_1.useFocusRing)();
|
|
8213
|
-
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)(
|
|
8242
|
+
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: {
|
|
8214
8243
|
width: borderBoxSize?.inlineSize,
|
|
8215
8244
|
}, children: (0, jsx_runtime_1.jsx)(Listbox_1.ListBox, { ...menuProps, state: state }) }) }))] }));
|
|
8216
8245
|
});
|
|
@@ -10495,7 +10524,7 @@ exports["default"] = StatusBullet;
|
|
|
10495
10524
|
|
|
10496
10525
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10497
10526
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10498
|
-
const Away = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '10', height: '10', viewBox: '0 0 10 10', className: `rcx-status-bullet rcx-status-bullet--away ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM5.80004 2.33325C5.80004 1.96506 5.50156 1.66659 5.13337 1.66659C4.76518 1.66659 4.46671 1.96506 4.46671 2.33325V5.13325V5.45367L4.71691 5.65383L6.71691 7.25383C7.00442 7.48384 7.42395 7.43722 7.65395 7.14972C7.88396 6.86221 7.83735 6.44268 7.54984 6.21267L5.80004 4.81284V2.33325Z' }) }));
|
|
10527
|
+
const Away = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '10', height: '10', viewBox: '0 0 10 10', "aria-hidden": 'true', className: `rcx-status-bullet rcx-status-bullet--away ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM5.80004 2.33325C5.80004 1.96506 5.50156 1.66659 5.13337 1.66659C4.76518 1.66659 4.46671 1.96506 4.46671 2.33325V5.13325V5.45367L4.71691 5.65383L6.71691 7.25383C7.00442 7.48384 7.42395 7.43722 7.65395 7.14972C7.88396 6.86221 7.83735 6.44268 7.54984 6.21267L5.80004 4.81284V2.33325Z' }) }));
|
|
10499
10528
|
exports["default"] = Away;
|
|
10500
10529
|
|
|
10501
10530
|
|
|
@@ -10510,7 +10539,7 @@ exports["default"] = Away;
|
|
|
10510
10539
|
|
|
10511
10540
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10512
10541
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10513
|
-
const Busy = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '10', height: '10', viewBox: '0 0 10 10', className: `rcx-status-bullet rcx-status-bullet--busy ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM3.53338 4.46655C3.16519 4.46655 2.86671 4.76503 2.86671 5.13322C2.86671 5.50141 3.16519 5.79989 3.53338 5.79989H6.73338C7.10157 5.79989 7.40004 5.50141 7.40004 5.13322C7.40004 4.76503 7.10157 4.46655 6.73338 4.46655H3.53338Z' }) }));
|
|
10542
|
+
const Busy = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '10', height: '10', viewBox: '0 0 10 10', "aria-hidden": 'true', className: `rcx-status-bullet rcx-status-bullet--busy ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.13337 9.93325C7.78434 9.93325 9.93338 7.78422 9.93338 5.13325C9.93338 2.48229 7.78434 0.333252 5.13337 0.333252C2.48241 0.333252 0.333374 2.48229 0.333374 5.13325C0.333374 7.78422 2.48241 9.93325 5.13337 9.93325ZM3.53338 4.46655C3.16519 4.46655 2.86671 4.76503 2.86671 5.13322C2.86671 5.50141 3.16519 5.79989 3.53338 5.79989H6.73338C7.10157 5.79989 7.40004 5.50141 7.40004 5.13322C7.40004 4.76503 7.10157 4.46655 6.73338 4.46655H3.53338Z' }) }));
|
|
10514
10543
|
exports["default"] = Busy;
|
|
10515
10544
|
|
|
10516
10545
|
|
|
@@ -10525,7 +10554,7 @@ exports["default"] = Busy;
|
|
|
10525
10554
|
|
|
10526
10555
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10527
10556
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10528
|
-
const Disabled = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '24', height: '24', viewBox: '0 0 24 24', className: `rcx-status-bullet rcx-status-bullet--disabled ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM13.3367 5.33333C13.3367 4.59695 12.7398 4 12.0034 4C11.267 4 10.67 4.59695 10.67 5.33333V14.6667C10.67 15.403 11.267 16 12.0034 16C12.7398 16 13.3367 15.403 13.3367 14.6667V5.33333ZM13.3367 18.6667C13.3367 17.9303 12.7398 17.3333 12.0034 17.3333C11.267 17.3333 10.67 17.9303 10.67 18.6667C10.67 19.403 11.267 20 12.0034 20C12.7398 20 13.3367 19.403 13.3367 18.6667Z' }) }));
|
|
10557
|
+
const Disabled = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '24', height: '24', viewBox: '0 0 24 24', "aria-hidden": 'true', className: `rcx-status-bullet rcx-status-bullet--disabled ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM13.3367 5.33333C13.3367 4.59695 12.7398 4 12.0034 4C11.267 4 10.67 4.59695 10.67 5.33333V14.6667C10.67 15.403 11.267 16 12.0034 16C12.7398 16 13.3367 15.403 13.3367 14.6667V5.33333ZM13.3367 18.6667C13.3367 17.9303 12.7398 17.3333 12.0034 17.3333C11.267 17.3333 10.67 17.9303 10.67 18.6667C10.67 19.403 11.267 20 12.0034 20C12.7398 20 13.3367 19.403 13.3367 18.6667Z' }) }));
|
|
10529
10558
|
exports["default"] = Disabled;
|
|
10530
10559
|
|
|
10531
10560
|
|
|
@@ -10540,7 +10569,7 @@ exports["default"] = Disabled;
|
|
|
10540
10569
|
|
|
10541
10570
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10542
10571
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10543
|
-
const Loading = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', className: `rcx-status-bullet rcx-status-bullet--loading ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, children: (0, jsx_runtime_1.jsx)("circle", { cx: '6', cy: '6', r: '5', className: 'rcx-status-bullet rcx-status-bullet--loading', strokeWidth: '2', strokeDasharray: '2 2' }) }));
|
|
10572
|
+
const Loading = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none', "aria-hidden": 'true', xmlns: 'http://www.w3.org/2000/svg', className: `rcx-status-bullet rcx-status-bullet--loading ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, children: (0, jsx_runtime_1.jsx)("circle", { cx: '6', cy: '6', r: '5', className: 'rcx-status-bullet rcx-status-bullet--loading', strokeWidth: '2', strokeDasharray: '2 2' }) }));
|
|
10544
10573
|
exports["default"] = Loading;
|
|
10545
10574
|
|
|
10546
10575
|
|
|
@@ -10555,7 +10584,7 @@ exports["default"] = Loading;
|
|
|
10555
10584
|
|
|
10556
10585
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10557
10586
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10558
|
-
const Offline = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', className: `rcx-status-bullet rcx-status-bullet--offline ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, children: (0, jsx_runtime_1.jsx)("circle", { cx: '6', cy: '6', r: '5', className: `rcx-status-bullet rcx-status-bullet--offline`, strokeWidth: '2' }) }));
|
|
10587
|
+
const Offline = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none', "aria-hidden": 'true', xmlns: 'http://www.w3.org/2000/svg', className: `rcx-status-bullet rcx-status-bullet--offline ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, children: (0, jsx_runtime_1.jsx)("circle", { cx: '6', cy: '6', r: '5', className: `rcx-status-bullet rcx-status-bullet--offline`, strokeWidth: '2' }) }));
|
|
10559
10588
|
exports["default"] = Offline;
|
|
10560
10589
|
|
|
10561
10590
|
|
|
@@ -10570,7 +10599,7 @@ exports["default"] = Offline;
|
|
|
10570
10599
|
|
|
10571
10600
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10572
10601
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10573
|
-
const Online = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '24', height: '24', viewBox: '0 0 24 24', className: `rcx-status-bullet rcx-status-bullet--online ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { d: 'M24 12.0001C24 18.6275 18.6274 24.0001 12 24.0001C5.37255 24.0001 -3.05176e-05 18.6275 -3.05176e-05 12.0001C-3.05176e-05 5.37271 5.37255 0.00012207 12 0.00012207C18.6274 0.00012207 24 5.37271 24 12.0001Z' }) }));
|
|
10602
|
+
const Online = ({ size, className, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { ...props, width: '24', height: '24', viewBox: '0 0 24 24', "aria-hidden": 'true', className: `rcx-status-bullet rcx-status-bullet--online ${className} ${size === 'small' ? 'rcx-status-bullet--small' : ''}`, xmlns: 'http://www.w3.org/2000/svg', children: (0, jsx_runtime_1.jsx)("path", { d: 'M24 12.0001C24 18.6275 18.6274 24.0001 12 24.0001C5.37255 24.0001 -3.05176e-05 18.6275 -3.05176e-05 12.0001C-3.05176e-05 5.37271 5.37255 0.00012207 12 0.00012207C18.6274 0.00012207 24 5.37271 24 12.0001Z' }) }));
|
|
10574
10603
|
exports["default"] = Online;
|
|
10575
10604
|
|
|
10576
10605
|
|
|
@@ -11410,6 +11439,52 @@ __exportStar(__webpack_require__(/*! ./Tooltip */ "./src/components/Tooltip/inde
|
|
|
11410
11439
|
__exportStar(__webpack_require__(/*! ./UrlInput */ "./src/components/UrlInput/index.ts"), exports);
|
|
11411
11440
|
|
|
11412
11441
|
|
|
11442
|
+
/***/ },
|
|
11443
|
+
|
|
11444
|
+
/***/ "./src/contexts/OwnerDocument.ts"
|
|
11445
|
+
/*!***************************************!*\
|
|
11446
|
+
!*** ./src/contexts/OwnerDocument.ts ***!
|
|
11447
|
+
\***************************************/
|
|
11448
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
11449
|
+
|
|
11450
|
+
|
|
11451
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11452
|
+
exports.useOwnerDocument = exports.OwnerDocument = void 0;
|
|
11453
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11454
|
+
exports.OwnerDocument = (0, react_1.createContext)({ document: window.document });
|
|
11455
|
+
const useOwnerDocument = () => {
|
|
11456
|
+
return (0, react_1.useContext)(exports.OwnerDocument);
|
|
11457
|
+
};
|
|
11458
|
+
exports.useOwnerDocument = useOwnerDocument;
|
|
11459
|
+
|
|
11460
|
+
|
|
11461
|
+
/***/ },
|
|
11462
|
+
|
|
11463
|
+
/***/ "./src/contexts/index.ts"
|
|
11464
|
+
/*!*******************************!*\
|
|
11465
|
+
!*** ./src/contexts/index.ts ***!
|
|
11466
|
+
\*******************************/
|
|
11467
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
11468
|
+
|
|
11469
|
+
|
|
11470
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11471
|
+
if (k2 === undefined) k2 = k;
|
|
11472
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11473
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11474
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11475
|
+
}
|
|
11476
|
+
Object.defineProperty(o, k2, desc);
|
|
11477
|
+
}) : (function(o, m, k, k2) {
|
|
11478
|
+
if (k2 === undefined) k2 = k;
|
|
11479
|
+
o[k2] = m[k];
|
|
11480
|
+
}));
|
|
11481
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
11482
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11483
|
+
};
|
|
11484
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11485
|
+
__exportStar(__webpack_require__(/*! ./OwnerDocument */ "./src/contexts/OwnerDocument.ts"), exports);
|
|
11486
|
+
|
|
11487
|
+
|
|
11413
11488
|
/***/ },
|
|
11414
11489
|
|
|
11415
11490
|
/***/ "./src/getPaletteColor.ts"
|
|
@@ -11882,6 +11957,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
11882
11957
|
exports.useStyle = void 0;
|
|
11883
11958
|
const css_in_js_1 = __webpack_require__(/*! @rocket.chat/css-in-js */ "@rocket.chat/css-in-js");
|
|
11884
11959
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11960
|
+
const contexts_1 = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
|
|
11885
11961
|
const useStyle = (cssFn, arg) => {
|
|
11886
11962
|
const content = (0, react_1.useMemo)(() => (cssFn ? cssFn(arg) : undefined), [arg, cssFn]);
|
|
11887
11963
|
const className = (0, react_1.useMemo)(() => {
|
|
@@ -11891,17 +11967,18 @@ const useStyle = (cssFn, arg) => {
|
|
|
11891
11967
|
return content ? (0, css_in_js_1.createClassName)(content) : undefined;
|
|
11892
11968
|
}, [content]);
|
|
11893
11969
|
(0, react_1.useDebugValue)(className);
|
|
11970
|
+
const { document } = (0, contexts_1.useOwnerDocument)();
|
|
11894
11971
|
(0, react_1.useInsertionEffect)(() => {
|
|
11895
11972
|
if (!content || !className) {
|
|
11896
11973
|
return;
|
|
11897
11974
|
}
|
|
11898
11975
|
const escapedClassName = (0, css_in_js_1.escapeName)(className);
|
|
11899
11976
|
const transpiledContent = (0, css_in_js_1.transpile)(`.${escapedClassName}`, content);
|
|
11900
|
-
const detach = (0, css_in_js_1.attachRules)(transpiledContent);
|
|
11977
|
+
const detach = (0, css_in_js_1.attachRules)(transpiledContent, { document });
|
|
11901
11978
|
return () => {
|
|
11902
11979
|
setTimeout(detach, 1000);
|
|
11903
11980
|
};
|
|
11904
|
-
}, [className, content]);
|
|
11981
|
+
}, [className, content, document]);
|
|
11905
11982
|
return className;
|
|
11906
11983
|
};
|
|
11907
11984
|
exports.useStyle = useStyle;
|
|
@@ -11935,6 +12012,7 @@ exports.useArrayLikeClassNameProp = exports.__setThrowErrorOnInvalidToken__ = ex
|
|
|
11935
12012
|
__webpack_require__(/*! ./index.scss */ "./src/index.scss");
|
|
11936
12013
|
__exportStar(__webpack_require__(/*! ./components */ "./src/components/index.ts"), exports);
|
|
11937
12014
|
__exportStar(__webpack_require__(/*! ./styleTokens */ "./src/styleTokens.ts"), exports);
|
|
12015
|
+
__exportStar(__webpack_require__(/*! ./contexts */ "./src/contexts/index.ts"), exports);
|
|
11938
12016
|
var Theme_1 = __webpack_require__(/*! ./Theme */ "./src/Theme.ts");
|
|
11939
12017
|
Object.defineProperty(exports, "Palette", ({ enumerable: true, get: function () { return Theme_1.Palette; } }));
|
|
11940
12018
|
Object.defineProperty(exports, "__setThrowErrorOnInvalidToken__", ({ enumerable: true, get: function () { return Theme_1.__setThrowErrorOnInvalidToken__; } }));
|