@rocket.chat/fuselage 0.80.0 → 0.81.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 +3 -3
- package/dist/components/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayerControls.d.ts +21 -0
- package/dist/components/AudioPlayer/AudioPlayerControls.d.ts.map +1 -0
- package/dist/components/AudioPlayer/index.d.ts +1 -0
- package/dist/components/AudioPlayer/index.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts +3 -4
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts +3 -3
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Button/ActionButton.d.ts +1 -19
- package/dist/components/Button/ActionButton.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +4 -20
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/IconButton.d.ts +1 -10
- package/dist/components/Button/IconButton.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +3 -10
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.d.ts +3 -6
- package/dist/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/dist/components/Contextualbar/Contextualbar.d.ts +4 -2
- package/dist/components/Contextualbar/Contextualbar.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarContent.d.ts +4 -2
- package/dist/components/Contextualbar/ContextualbarContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts +4 -6
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts +4 -2
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarSection.d.ts +4 -2
- package/dist/components/Contextualbar/ContextualbarSection.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/Contextualbar.d.ts +4 -2
- package/dist/components/ContextualbarV2/Contextualbar.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarContent.d.ts +4 -2
- package/dist/components/ContextualbarV2/ContextualbarContent.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarEmptyContent.d.ts +2 -5
- package/dist/components/ContextualbarV2/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarFooter.d.ts +4 -2
- package/dist/components/ContextualbarV2/ContextualbarFooter.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarSection.d.ts +4 -2
- package/dist/components/ContextualbarV2/ContextualbarSection.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +3 -3
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownDesktop.d.ts +3 -3
- package/dist/components/Dropdown/DropdownDesktop.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownDesktopWrapper.d.ts +3 -3
- package/dist/components/Dropdown/DropdownDesktopWrapper.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownMobile.d.ts +3 -3
- package/dist/components/Dropdown/DropdownMobile.d.ts.map +1 -1
- package/dist/components/EmailInput/EmailInput.d.ts +2 -9
- package/dist/components/EmailInput/EmailInput.d.ts.map +1 -1
- package/dist/components/Field/FieldLabel.d.ts +1 -5
- package/dist/components/Field/FieldLabel.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts +3 -5
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/InputBox/Input.d.ts +3 -2
- package/dist/components/InputBox/Input.d.ts.map +1 -1
- package/dist/components/InputBox/InputBox.d.ts +3 -14
- package/dist/components/InputBox/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox/InputBoxAddon.d.ts +3 -2
- package/dist/components/InputBox/InputBoxAddon.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts +3 -8
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Menu/MenuOption.d.ts +4 -4
- package/dist/components/Menu/MenuOption.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts +3 -11
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/MessageBlock.d.ts +4 -5
- package/dist/components/Message/MessageBlock.d.ts.map +1 -1
- package/dist/components/Message/MessageNameContainer.d.ts +3 -3
- package/dist/components/Message/MessageNameContainer.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReaction.d.ts +3 -8
- package/dist/components/Message/MessageReactions/MessageReaction.d.ts.map +1 -1
- package/dist/components/Message/MessageReactions/MessageReactions.d.ts +3 -3
- package/dist/components/Message/MessageReactions/MessageReactions.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicator.d.ts +3 -3
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicator.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbar.d.ts +1 -8
- package/dist/components/Message/MessageToolbar/MessageToolbar.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbarItem.d.ts +3 -11
- package/dist/components/Message/MessageToolbar/MessageToolbarItem.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/MessageToolbarWrapper.d.ts +3 -5
- package/dist/components/Message/MessageToolbar/MessageToolbarWrapper.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +4 -7
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +3 -22
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectAnchor.d.ts +4 -3
- package/dist/components/MultiSelect/MultiSelectAnchor.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts +1 -25
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts +4 -3
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarGroup.d.ts +1 -8
- package/dist/components/NavBar/NavBarGroup.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarItem.d.ts +3 -3
- package/dist/components/NavBar/NavBarItem.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +2 -2
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Option/Option.d.ts +6 -6
- package/dist/components/Option/Option.d.ts.map +1 -1
- package/dist/components/Options/OptionContainer.d.ts +3 -2
- package/dist/components/Options/OptionContainer.d.ts.map +1 -1
- package/dist/components/Options/OptionType.d.ts +15 -1
- package/dist/components/Options/OptionType.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts +5 -5
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts +6 -26
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts +2 -1
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts +3 -1
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +2 -2
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -9
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +3 -5
- package/dist/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +2 -9
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +3 -10
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/SelectAddon.d.ts +3 -1
- package/dist/components/Select/SelectAddon.d.ts.map +1 -1
- package/dist/components/Select/SelectAria.d.ts +3 -9
- package/dist/components/Select/SelectAria.d.ts.map +1 -1
- package/dist/components/Select/SelectFiltered.d.ts +1 -18
- package/dist/components/Select/SelectFiltered.d.ts.map +1 -1
- package/dist/components/Select/SelectFilteredAnchor.d.ts +3 -3
- package/dist/components/Select/SelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/Select/SelectFocus.d.ts +3 -1
- package/dist/components/Select/SelectFocus.d.ts.map +1 -1
- package/dist/components/Select/SelectLegacy.d.ts +3 -16
- package/dist/components/Select/SelectLegacy.d.ts.map +1 -1
- package/dist/components/Select/SelectTrigger.d.ts +5 -3
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInput.d.ts +2 -14
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputOption.d.ts +3 -2
- package/dist/components/SelectInput/SelectInputOption.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInputPlaceholder.d.ts +3 -2
- package/dist/components/SelectInput/SelectInputPlaceholder.d.ts.map +1 -1
- package/dist/components/SelectInput/index.d.ts +1 -1
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/Sidebar/Item.d.ts +3 -16
- package/dist/components/Sidebar/Item.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +3 -26
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarActions.d.ts +4 -19
- package/dist/components/Sidebar/SidebarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarAction.d.ts +4 -10
- package/dist/components/Sidebar/TopBar/TopBarAction.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarActions.d.ts +4 -8
- package/dist/components/Sidebar/TopBar/TopBarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/index.d.ts +4 -18
- package/dist/components/Sidebar/TopBar/index.d.ts.map +1 -1
- package/dist/components/SidebarV2/Sidebar.d.ts +4 -6
- package/dist/components/SidebarV2/Sidebar.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarAction.d.ts +3 -11
- package/dist/components/SidebarV2/SidebarAction.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarActions.d.ts +1 -8
- package/dist/components/SidebarV2/SidebarActions.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarCollapseGroup.d.ts +5 -3
- package/dist/components/SidebarV2/SidebarCollapseGroup.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarItem/SidebarListItem.d.ts +5 -3
- package/dist/components/SidebarV2/SidebarItem/SidebarListItem.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelList.d.ts +3 -3
- package/dist/components/Sidepanel/SidepanelList.d.ts.map +1 -1
- package/dist/components/Sidepanel/SidepanelListItem.d.ts +3 -3
- package/dist/components/Sidepanel/SidepanelListItem.d.ts.map +1 -1
- package/dist/components/Slider/Slider.d.ts +4 -4
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +2 -4
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/TabsItem.d.ts +3 -5
- package/dist/components/Tabs/TabsItem.d.ts.map +1 -1
- package/dist/components/TelephoneInput/TelephoneInput.d.ts +2 -11
- package/dist/components/TelephoneInput/TelephoneInput.d.ts.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.d.ts +2 -9
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextInput/TextInput.d.ts +3 -6
- package/dist/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/Throbber/Throbber.d.ts +3 -6
- package/dist/components/Throbber/Throbber.d.ts.map +1 -1
- package/dist/components/Tile/Tile.d.ts +3 -2
- package/dist/components/Tile/Tile.d.ts.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +3 -5
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -5
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/UrlInput/UrlInput.d.ts +2 -2
- package/dist/components/UrlInput/UrlInput.d.ts.map +1 -1
- package/dist/fuselage.development.js +326 -421
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +18 -18
- package/package.json +2 -2
- package/dist/helpers/isForwardRefType.d.ts +0 -3
- package/dist/helpers/isForwardRefType.d.ts.map +0 -1
|
@@ -495,16 +495,16 @@ Object.defineProperty(exports, "AnimatedVisibility", ({ enumerable: true, get: f
|
|
|
495
495
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
496
496
|
|
|
497
497
|
|
|
498
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
499
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
500
|
+
};
|
|
498
501
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
499
502
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
500
503
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
501
504
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
502
505
|
const __1 = __webpack_require__(/*! ../.. */ "./src/index.ts");
|
|
503
506
|
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
504
|
-
const
|
|
505
|
-
const getMaskTime = (durationTime) => new Date(durationTime * 1000)
|
|
506
|
-
.toISOString()
|
|
507
|
-
.slice(durationTime > 60 * 60 ? 11 : 14, 19);
|
|
507
|
+
const AudioPlayerControls_1 = __importDefault(__webpack_require__(/*! ./AudioPlayerControls */ "./src/components/AudioPlayer/AudioPlayerControls.tsx"));
|
|
508
508
|
function forceDownload(ownerDocument, url, fileName) {
|
|
509
509
|
const xhr = new XMLHttpRequest();
|
|
510
510
|
xhr.open('GET', url, true);
|
|
@@ -542,7 +542,7 @@ const getDurationForInfinityDurationAudioFile = (src, callback) => {
|
|
|
542
542
|
audioElement.remove();
|
|
543
543
|
});
|
|
544
544
|
};
|
|
545
|
-
const AudioPlayer = (
|
|
545
|
+
const AudioPlayer = ({ ref, src, type = 'audio/mpeg', maxPlaybackSpeed = 2, minPlaybackSpeed = 0.5, playbackSpeedStep = 0.25, download = false, playLabel = 'Play', pauseLabel = 'Pause', audioPlaybackRangeLabel = 'Audio Playback Range', changePlaybackSpeedLabel = 'Change Playback Speed', downloadAudioFileLabel = 'Download Audio File', trackProps, }) => {
|
|
546
546
|
const audioRef = (0, react_1.useRef)(null);
|
|
547
547
|
const refs = (0, fuselage_hooks_1.useMergedRefs)(ref, audioRef);
|
|
548
548
|
const [isPlaying, setIsPlaying] = (0, react_1.useState)(false);
|
|
@@ -575,19 +575,17 @@ const AudioPlayer = (0, react_1.forwardRef)(({ src, type = 'audio/mpeg', maxPlay
|
|
|
575
575
|
handlePlaybackSpeed(1);
|
|
576
576
|
};
|
|
577
577
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
578
|
-
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)(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
584
|
-
} }) }), (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) => {
|
|
578
|
+
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)(AudioPlayerControls_1.default, { isPlaying: isPlaying, currentTime: currentTime, durationTime: durationTime, playbackSpeed: playbackSpeed, onTogglePlay: handlePlay, onSeek: (time) => {
|
|
579
|
+
if (audioRef.current) {
|
|
580
|
+
audioRef.current.currentTime = time;
|
|
581
|
+
}
|
|
582
|
+
}, onChangePlaybackSpeed: handlePlaybackSpeedSingleControl, download: download, downloadHref: src, onDownload: (e) => {
|
|
585
583
|
const { host } = new URL(src);
|
|
586
584
|
if (host !== ownerDocument.defaultView?.location.host) {
|
|
587
585
|
e.preventDefault();
|
|
588
586
|
forceDownload(ownerDocument, src);
|
|
589
587
|
}
|
|
590
|
-
} })
|
|
588
|
+
}, playLabel: playLabel, pauseLabel: pauseLabel, audioPlaybackRangeLabel: audioPlaybackRangeLabel, changePlaybackSpeedLabel: changePlaybackSpeedLabel, downloadAudioFileLabel: downloadAudioFileLabel }), (0, jsx_runtime_1.jsxs)("audio", { style: { display: 'none' }, onTimeUpdate: (e) => {
|
|
591
589
|
setCurrentTime(e.target.currentTime);
|
|
592
590
|
}, onLoadedMetadata: (e) => {
|
|
593
591
|
const { duration } = e.target;
|
|
@@ -602,10 +600,32 @@ const AudioPlayer = (0, react_1.forwardRef)(({ src, type = 'audio/mpeg', maxPlay
|
|
|
602
600
|
}, onPause: () => {
|
|
603
601
|
setIsPlaying(false);
|
|
604
602
|
}, controls: true, children: [(0, jsx_runtime_1.jsx)("source", { src: src, type: type }), (0, jsx_runtime_1.jsx)("track", { kind: 'captions', ...trackProps })] })] }));
|
|
605
|
-
}
|
|
603
|
+
};
|
|
606
604
|
exports["default"] = AudioPlayer;
|
|
607
605
|
|
|
608
606
|
|
|
607
|
+
/***/ },
|
|
608
|
+
|
|
609
|
+
/***/ "./src/components/AudioPlayer/AudioPlayerControls.tsx"
|
|
610
|
+
/*!************************************************************!*\
|
|
611
|
+
!*** ./src/components/AudioPlayer/AudioPlayerControls.tsx ***!
|
|
612
|
+
\************************************************************/
|
|
613
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
617
|
+
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
618
|
+
const __1 = __webpack_require__(/*! ../.. */ "./src/index.ts");
|
|
619
|
+
const Slider_1 = __webpack_require__(/*! ../Slider */ "./src/components/Slider/index.ts");
|
|
620
|
+
const getMaskTime = (durationTime) => new Date(durationTime * 1000)
|
|
621
|
+
.toISOString()
|
|
622
|
+
.slice(durationTime > 60 * 60 ? 11 : 14, 19);
|
|
623
|
+
const AudioPlayerControls = ({ isPlaying, currentTime, durationTime, playbackSpeed, onTogglePlay, onSeek, onChangePlaybackSpeed, download = false, downloadHref, onDownload, playLabel = 'Play', pauseLabel = 'Pause', audioPlaybackRangeLabel = 'Audio Playback Range', changePlaybackSpeedLabel = 'Change Playback Speed', downloadAudioFileLabel = 'Download Audio File', }) => ((0, jsx_runtime_1.jsxs)(__1.Box, { display: 'flex', alignItems: 'center', w: 'full', children: [(0, jsx_runtime_1.jsx)(__1.IconButton, { primary: true, medium: true, onClick: onTogglePlay, "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
|
|
624
|
+
? getMaskTime(currentTime)
|
|
625
|
+
: 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) => onSeek(Array.isArray(value) ? value[0] : value) }) }), (0, jsx_runtime_1.jsxs)(__1.Button, { secondary: true, small: true, onClick: onChangePlaybackSpeed, "aria-label": changePlaybackSpeedLabel, children: [playbackSpeed, "x"] })] }), download && ((0, jsx_runtime_1.jsx)(__1.IconButton, { primary: true, medium: true, is: 'a', href: downloadHref, download: true, icon: 'download', "aria-label": downloadAudioFileLabel, onClick: onDownload }))] }));
|
|
626
|
+
exports["default"] = AudioPlayerControls;
|
|
627
|
+
|
|
628
|
+
|
|
609
629
|
/***/ },
|
|
610
630
|
|
|
611
631
|
/***/ "./src/components/AudioPlayer/index.ts"
|
|
@@ -619,9 +639,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
619
639
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
620
640
|
};
|
|
621
641
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
622
|
-
exports.AudioPlayer = void 0;
|
|
642
|
+
exports.AudioPlayerControls = exports.AudioPlayer = void 0;
|
|
623
643
|
var AudioPlayer_1 = __webpack_require__(/*! ./AudioPlayer */ "./src/components/AudioPlayer/AudioPlayer.tsx");
|
|
624
644
|
Object.defineProperty(exports, "AudioPlayer", ({ enumerable: true, get: function () { return __importDefault(AudioPlayer_1).default; } }));
|
|
645
|
+
var AudioPlayerControls_1 = __webpack_require__(/*! ./AudioPlayerControls */ "./src/components/AudioPlayer/AudioPlayerControls.tsx");
|
|
646
|
+
Object.defineProperty(exports, "AudioPlayerControls", ({ enumerable: true, get: function () { return __importDefault(AudioPlayerControls_1).default; } }));
|
|
625
647
|
|
|
626
648
|
|
|
627
649
|
/***/ },
|
|
@@ -661,7 +683,7 @@ const isSelectedValid = (value) => (selected) => {
|
|
|
661
683
|
? selected.value === value
|
|
662
684
|
: value.includes(selected.value);
|
|
663
685
|
};
|
|
664
|
-
|
|
686
|
+
function AutoComplete({ ref, value, filter, setFilter, options = [], renderItem, renderSelected: RenderSelected, onChange, renderEmpty, placeholder, error, disabled, multiple, onBlur: onBlurAction = () => { }, ...props }) {
|
|
665
687
|
const innerRef = (0, react_1.useRef)(null);
|
|
666
688
|
const mergedRefs = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
667
689
|
const { ref: containerRef, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
@@ -713,7 +735,7 @@ const AutoComplete = (0, react_1.forwardRef)(function AutoComplete({ value, filt
|
|
|
713
735
|
: 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
|
|
714
736
|
? 'cross'
|
|
715
737
|
: '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 }) })] }));
|
|
716
|
-
}
|
|
738
|
+
}
|
|
717
739
|
exports["default"] = AutoComplete;
|
|
718
740
|
|
|
719
741
|
|
|
@@ -946,32 +968,27 @@ Object.defineProperty(exports, "Banner", ({ enumerable: true, get: function () {
|
|
|
946
968
|
|
|
947
969
|
|
|
948
970
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
949
|
-
exports.Box = void 0;
|
|
950
971
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
951
972
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
952
973
|
const useArrayLikeClassNameProp_1 = __webpack_require__(/*! ../../hooks/useArrayLikeClassNameProp */ "./src/hooks/useArrayLikeClassNameProp.ts");
|
|
953
974
|
const useBoxOnlyProps_1 = __webpack_require__(/*! ../../hooks/useBoxOnlyProps */ "./src/hooks/useBoxOnlyProps.ts");
|
|
954
975
|
const BoxTransforms_1 = __webpack_require__(/*! ./BoxTransforms */ "./src/components/Box/BoxTransforms.ts");
|
|
955
976
|
const useStylingProps_1 = __webpack_require__(/*! ./useStylingProps */ "./src/components/Box/useStylingProps.ts");
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
if (ref) {
|
|
959
|
-
propsWithRef.ref = ref;
|
|
960
|
-
}
|
|
961
|
-
let propsWithStringClassName = (0, useArrayLikeClassNameProp_1.useArrayLikeClassNameProp)(propsWithRef);
|
|
977
|
+
function Box({ is = 'div', ...props }) {
|
|
978
|
+
let propsWithStringClassName = (0, useArrayLikeClassNameProp_1.useArrayLikeClassNameProp)(props);
|
|
962
979
|
const transformFn = (0, BoxTransforms_1.useBoxTransform)();
|
|
963
980
|
if (transformFn) {
|
|
964
981
|
propsWithStringClassName = transformFn(propsWithStringClassName);
|
|
965
982
|
}
|
|
966
983
|
const propsWithoutStylingProps = (0, useStylingProps_1.useStylingProps)(propsWithStringClassName);
|
|
967
984
|
const propsWithoutBoxOnlyProps = (0, useBoxOnlyProps_1.useBoxOnlyProps)(propsWithoutStylingProps);
|
|
968
|
-
const element = (0, react_1.createElement)(is, propsWithoutBoxOnlyProps
|
|
985
|
+
const element = (0, react_1.createElement)(is, propsWithoutBoxOnlyProps);
|
|
969
986
|
if (transformFn) {
|
|
970
987
|
return (0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { children: element, value: null });
|
|
971
988
|
}
|
|
972
989
|
return element;
|
|
973
|
-
}
|
|
974
|
-
exports["default"] = (0, react_1.memo)(
|
|
990
|
+
}
|
|
991
|
+
exports["default"] = (0, react_1.memo)(Box);
|
|
975
992
|
|
|
976
993
|
|
|
977
994
|
/***/ },
|
|
@@ -1532,7 +1549,6 @@ Object.defineProperty(exports, "Bubble", ({ enumerable: true, get: function () {
|
|
|
1532
1549
|
|
|
1533
1550
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1534
1551
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1535
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
1536
1552
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1537
1553
|
const _1 = __webpack_require__(/*! . */ "./src/components/Button/index.ts");
|
|
1538
1554
|
const getSize = ({ tiny, mini, small }) => {
|
|
@@ -1544,7 +1560,9 @@ const getSize = ({ tiny, mini, small }) => {
|
|
|
1544
1560
|
}
|
|
1545
1561
|
return 'x20';
|
|
1546
1562
|
};
|
|
1547
|
-
|
|
1563
|
+
function ActionButton({ icon, children, ...props }) {
|
|
1564
|
+
return ((0, jsx_runtime_1.jsxs)(_1.Button, { square: true, flexShrink: 0, ...props, children: [children, (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, size: getSize(props) })] }));
|
|
1565
|
+
}
|
|
1548
1566
|
exports["default"] = ActionButton;
|
|
1549
1567
|
|
|
1550
1568
|
|
|
@@ -1562,7 +1580,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
1562
1580
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
1563
1581
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
1564
1582
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1565
|
-
|
|
1583
|
+
function Button({ ref, primary, secondary, danger, warning, success, external, icon, is = 'button', rel: _rel, tiny, mini, small, medium, large, square, loading, disabled, children, ...props }) {
|
|
1566
1584
|
const extraProps = (is === 'a' && {
|
|
1567
1585
|
rel: external ? 'noopener noreferrer' : undefined,
|
|
1568
1586
|
target: external ? '_blank' : undefined,
|
|
@@ -1588,7 +1606,7 @@ const Button = (0, react_1.forwardRef)(function Button({ primary, secondary, dan
|
|
|
1588
1606
|
return {};
|
|
1589
1607
|
}, [primary, secondary, danger, warning, success]);
|
|
1590
1608
|
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: is, type: 'button', "rcx-button": true, ...kindAndVariantProps, "rcx-button--small": small, "rcx-button--medium": medium, "rcx-button--large": large, "rcx-button--square": square, "rcx-button--tiny-square": tiny && square, "rcx-button--mini-square": mini && square, "rcx-button--small-square": small && square, "rcx-button--medium-square": medium && square, "rcx-button--large-square": large && square, "rcx-button--loading": loading, disabled: disabled || loading, ref: ref, ...extraProps, ...props, children: (0, jsx_runtime_1.jsxs)("span", { className: 'rcx-button--content', children: [icon && !loading && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: icon, mie: 4 }), loading && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: 'loading', mie: 4 }), children] }) }));
|
|
1591
|
-
}
|
|
1609
|
+
}
|
|
1592
1610
|
exports["default"] = Button;
|
|
1593
1611
|
|
|
1594
1612
|
|
|
@@ -1621,7 +1639,7 @@ const getPressedClass = (variant) => {
|
|
|
1621
1639
|
];
|
|
1622
1640
|
return variantClass;
|
|
1623
1641
|
};
|
|
1624
|
-
|
|
1642
|
+
function IconButton({ icon, primary, info, secondary, danger, warning, success, mini, large, tiny, small, medium, pressed, children, ...props }) {
|
|
1625
1643
|
const variant = (0, react_1.useMemo)(() => (secondary && danger && 'secondary-danger') ||
|
|
1626
1644
|
(secondary && warning && 'secondary-warning') ||
|
|
1627
1645
|
(secondary && success && 'secondary-success') ||
|
|
@@ -1656,8 +1674,8 @@ const IconButton = (0, react_1.forwardRef)(({ icon, primary, info, secondary, da
|
|
|
1656
1674
|
(tiny && 'x16') ||
|
|
1657
1675
|
(mini && 'x12') ||
|
|
1658
1676
|
'x28';
|
|
1659
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'button', type: 'button', "rcx-button": true, "rcx-button--icon": true, "rcx-button--square": true, ...kindAndVariantProps, ...getSizeClass(), "rcx-button--icon-pressed": pressed,
|
|
1660
|
-
}
|
|
1677
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'button', type: 'button', "rcx-button": true, "rcx-button--icon": true, "rcx-button--square": true, ...kindAndVariantProps, ...getSizeClass(), "rcx-button--icon-pressed": pressed, ...props, children: [(0, react_1.isValidElement)(icon) ? (icon) : ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, size: getIconSize() })), children] }));
|
|
1678
|
+
}
|
|
1661
1679
|
exports["default"] = IconButton;
|
|
1662
1680
|
|
|
1663
1681
|
|
|
@@ -1694,9 +1712,8 @@ Object.defineProperty(exports, "IconButton", ({ enumerable: true, get: function
|
|
|
1694
1712
|
|
|
1695
1713
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1696
1714
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: [
|
|
1715
|
+
function ButtonGroup({ align = 'start', children, stretch, vertical, wrap, small, large, className, ...props }) {
|
|
1716
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
1700
1717
|
'rcx-button-group',
|
|
1701
1718
|
stretch && 'rcx-button-group--stretch',
|
|
1702
1719
|
vertical && 'rcx-button-group--vertical',
|
|
@@ -1708,7 +1725,7 @@ const ButtonGroup = (0, react_1.forwardRef)(function ButtonGroup({ align = 'star
|
|
|
1708
1725
|
]
|
|
1709
1726
|
.filter(Boolean)
|
|
1710
1727
|
.join(' '), role: 'group', ...props, children: children }));
|
|
1711
|
-
}
|
|
1728
|
+
}
|
|
1712
1729
|
exports["default"] = ButtonGroup;
|
|
1713
1730
|
|
|
1714
1731
|
|
|
@@ -2009,7 +2026,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2009
2026
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
2010
2027
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2011
2028
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2012
|
-
|
|
2029
|
+
function CheckBox({ ref, indeterminate, onChange, className, labelChildren, ...props }) {
|
|
2013
2030
|
const innerRef = (0, react_1.useRef)(null);
|
|
2014
2031
|
const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
2015
2032
|
(0, react_1.useLayoutEffect)(() => {
|
|
@@ -2024,7 +2041,7 @@ const CheckBox = (0, react_1.forwardRef)(function CheckBox({ indeterminate, onCh
|
|
|
2024
2041
|
onChange?.call(innerRef.current, event);
|
|
2025
2042
|
}, [innerRef, indeterminate, onChange]);
|
|
2026
2043
|
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'label', className: className, "rcx-check-box": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', type: 'checkbox', "rcx-check-box__input": true, ref: mergedRef, onChange: handleChange, ...props }), (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-check-box__fake": true, "aria-hidden": 'true' })] }));
|
|
2027
|
-
}
|
|
2044
|
+
}
|
|
2028
2045
|
exports["default"] = CheckBox;
|
|
2029
2046
|
|
|
2030
2047
|
|
|
@@ -2183,9 +2200,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2183
2200
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2184
2201
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2185
2202
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2186
|
-
|
|
2187
|
-
return ((0, jsx_runtime_1.jsx)(__1.Box, {
|
|
2188
|
-
}
|
|
2203
|
+
function Contextualbar({ width, position, bg = 'room', ...props }) {
|
|
2204
|
+
return ((0, jsx_runtime_1.jsx)(__1.Box, { "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 10, ...props }));
|
|
2205
|
+
}
|
|
2189
2206
|
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2190
2207
|
|
|
2191
2208
|
|
|
@@ -2253,9 +2270,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2253
2270
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2254
2271
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2255
2272
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2256
|
-
|
|
2257
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2258
|
-
}
|
|
2273
|
+
function ContextualbarContent(props) {
|
|
2274
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__content": true, paddingInline: 24, display: 'flex', flexDirection: 'column', overflowY: 'hidden', height: 'full', ...props }));
|
|
2275
|
+
}
|
|
2259
2276
|
exports["default"] = (0, react_1.memo)(ContextualbarContent);
|
|
2260
2277
|
|
|
2261
2278
|
|
|
@@ -2276,9 +2293,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2276
2293
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2277
2294
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2278
2295
|
const ContextualbarContent_1 = __importDefault(__webpack_require__(/*! ./ContextualbarContent */ "./src/components/Contextualbar/ContextualbarContent.tsx"));
|
|
2279
|
-
|
|
2280
|
-
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props,
|
|
2281
|
-
}
|
|
2296
|
+
function ContextualbarEmptyContent({ icon = 'magnifier', title = 'Nothing Found', subtitle, ...props }) {
|
|
2297
|
+
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props, children: (0, jsx_runtime_1.jsxs)(__1.States, { children: [(0, jsx_runtime_1.jsx)(__1.StatesIcon, { name: icon }), (0, jsx_runtime_1.jsx)(__1.StatesTitle, { children: title }), subtitle && (0, jsx_runtime_1.jsx)(__1.StatesSubtitle, { children: subtitle })] }) }));
|
|
2298
|
+
}
|
|
2282
2299
|
exports["default"] = (0, react_1.memo)(ContextualbarEmptyContent);
|
|
2283
2300
|
|
|
2284
2301
|
|
|
@@ -2295,9 +2312,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2295
2312
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2296
2313
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2297
2314
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2298
|
-
|
|
2299
|
-
return (
|
|
2300
|
-
}
|
|
2315
|
+
function ContextualbarFooter(props) {
|
|
2316
|
+
return (0, jsx_runtime_1.jsx)(__1.Box, { p: 24, ...props });
|
|
2317
|
+
}
|
|
2301
2318
|
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2302
2319
|
|
|
2303
2320
|
|
|
@@ -2349,9 +2366,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2349
2366
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2350
2367
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2351
2368
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2352
|
-
|
|
2353
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2354
|
-
}
|
|
2369
|
+
function ContextualbarSection(props) {
|
|
2370
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true, pi: 24, pb: 16, display: 'flex', alignItems: 'center', flexGrow: 1, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', ...props }));
|
|
2371
|
+
}
|
|
2355
2372
|
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2356
2373
|
|
|
2357
2374
|
|
|
@@ -2450,9 +2467,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2450
2467
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2451
2468
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2452
2469
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2453
|
-
|
|
2454
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2455
|
-
}
|
|
2470
|
+
function Contextualbar({ width, position, bg = 'room', ...props }) {
|
|
2471
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 10, ...props }));
|
|
2472
|
+
}
|
|
2456
2473
|
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2457
2474
|
|
|
2458
2475
|
|
|
@@ -2520,9 +2537,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2520
2537
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2521
2538
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2522
2539
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2523
|
-
|
|
2524
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2525
|
-
}
|
|
2540
|
+
function ContextualbarContent(props) {
|
|
2541
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__content": true, paddingInline: 24, display: 'flex', flexDirection: 'column', overflowY: 'hidden', height: 'full', ...props }));
|
|
2542
|
+
}
|
|
2526
2543
|
exports["default"] = (0, react_1.memo)(ContextualbarContent);
|
|
2527
2544
|
|
|
2528
2545
|
|
|
@@ -2543,9 +2560,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2543
2560
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2544
2561
|
const States_1 = __webpack_require__(/*! ../States */ "./src/components/States/index.ts");
|
|
2545
2562
|
const ContextualbarContent_1 = __importDefault(__webpack_require__(/*! ./ContextualbarContent */ "./src/components/ContextualbarV2/ContextualbarContent.tsx"));
|
|
2546
|
-
|
|
2547
|
-
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props,
|
|
2548
|
-
}
|
|
2563
|
+
function ContextualbarEmptyContent({ icon = 'magnifier', title = 'Nothing Found', subtitle, ...props }) {
|
|
2564
|
+
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props, children: (0, jsx_runtime_1.jsxs)(States_1.States, { children: [(0, jsx_runtime_1.jsx)(States_1.StatesIcon, { name: icon }), (0, jsx_runtime_1.jsx)(States_1.StatesTitle, { children: title }), subtitle && (0, jsx_runtime_1.jsx)(States_1.StatesSubtitle, { children: subtitle })] }) }));
|
|
2565
|
+
}
|
|
2549
2566
|
exports["default"] = (0, react_1.memo)(ContextualbarEmptyContent);
|
|
2550
2567
|
|
|
2551
2568
|
|
|
@@ -2562,9 +2579,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2562
2579
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2563
2580
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2564
2581
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2565
|
-
|
|
2566
|
-
return (
|
|
2567
|
-
}
|
|
2582
|
+
function ContextualbarFooter(props) {
|
|
2583
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { pi: 16, pb: 20, ...props });
|
|
2584
|
+
}
|
|
2568
2585
|
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2569
2586
|
|
|
2570
2587
|
|
|
@@ -2618,9 +2635,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2618
2635
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2619
2636
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2620
2637
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2621
|
-
|
|
2622
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2623
|
-
}
|
|
2638
|
+
function ContextualbarSection(props) {
|
|
2639
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true, p: 16, display: 'flex', alignItems: 'center', flexGrow: 1, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', ...props }));
|
|
2640
|
+
}
|
|
2624
2641
|
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2625
2642
|
|
|
2626
2643
|
|
|
@@ -2757,13 +2774,12 @@ Object.defineProperty(exports, "Divider", ({ enumerable: true, get: function ()
|
|
|
2757
2774
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2758
2775
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2759
2776
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
2760
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2761
2777
|
const DropdownDesktopWrapper_1 = __webpack_require__(/*! ./DropdownDesktopWrapper */ "./src/components/Dropdown/DropdownDesktopWrapper.tsx");
|
|
2762
2778
|
const DropdownMobile_1 = __webpack_require__(/*! ./DropdownMobile */ "./src/components/Dropdown/DropdownMobile.tsx");
|
|
2763
|
-
|
|
2779
|
+
function Dropdown({ ref, children, reference, placement = 'bottom-start', }) {
|
|
2764
2780
|
const notSmall = (0, fuselage_hooks_1.useMediaQuery)('(min-width: 500px)');
|
|
2765
2781
|
return notSmall ? ((0, jsx_runtime_1.jsx)(DropdownDesktopWrapper_1.DropdownDesktopWrapper, { reference: reference, children: children, placement: placement, ref: ref })) : ((0, jsx_runtime_1.jsx)(DropdownMobile_1.DropdownMobile, { children: children, ref: ref }));
|
|
2766
|
-
}
|
|
2782
|
+
}
|
|
2767
2783
|
exports["default"] = Dropdown;
|
|
2768
2784
|
|
|
2769
2785
|
|
|
@@ -2777,13 +2793,12 @@ exports["default"] = Dropdown;
|
|
|
2777
2793
|
|
|
2778
2794
|
|
|
2779
2795
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2780
|
-
exports.DropdownDesktop =
|
|
2796
|
+
exports.DropdownDesktop = DropdownDesktop;
|
|
2781
2797
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2782
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2783
2798
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2784
|
-
|
|
2785
|
-
return ((0, jsx_runtime_1.jsx)(__1.Tile, { style: style,
|
|
2786
|
-
}
|
|
2799
|
+
function DropdownDesktop({ children, style, ...props }) {
|
|
2800
|
+
return ((0, jsx_runtime_1.jsx)(__1.Tile, { style: style, elevation: '2', pi: '0', pb: '0', display: 'flex', flexDirection: 'column', overflow: 'auto', "data-testid": 'dropdown', ...props, children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, pb: 12, children: style?.visibility === 'hidden' ? null : children }) }));
|
|
2801
|
+
}
|
|
2787
2802
|
|
|
2788
2803
|
|
|
2789
2804
|
/***/ },
|
|
@@ -2796,17 +2811,16 @@ exports.DropdownDesktop = (0, react_1.forwardRef)(function DropdownDesktop({ chi
|
|
|
2796
2811
|
|
|
2797
2812
|
|
|
2798
2813
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2799
|
-
exports.DropdownDesktopWrapper =
|
|
2814
|
+
exports.DropdownDesktopWrapper = DropdownDesktopWrapper;
|
|
2800
2815
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2801
2816
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
2802
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2803
2817
|
const DropdownDesktop_1 = __webpack_require__(/*! ./DropdownDesktop */ "./src/components/Dropdown/DropdownDesktop.tsx");
|
|
2804
|
-
|
|
2818
|
+
function DropdownDesktopWrapper({ ref, reference, placement = 'bottom-start', ...props }) {
|
|
2805
2819
|
const { style } = (0, fuselage_hooks_1.usePosition)(reference, ref, {
|
|
2806
2820
|
placement,
|
|
2807
2821
|
});
|
|
2808
|
-
return (
|
|
2809
|
-
}
|
|
2822
|
+
return (0, jsx_runtime_1.jsx)(DropdownDesktop_1.DropdownDesktop, { style: style, ref: ref, ...props });
|
|
2823
|
+
}
|
|
2810
2824
|
|
|
2811
2825
|
|
|
2812
2826
|
/***/ },
|
|
@@ -2819,13 +2833,12 @@ exports.DropdownDesktopWrapper = (0, react_1.forwardRef)(function DropdownDeskto
|
|
|
2819
2833
|
|
|
2820
2834
|
|
|
2821
2835
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2822
|
-
exports.DropdownMobile =
|
|
2836
|
+
exports.DropdownMobile = DropdownMobile;
|
|
2823
2837
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2824
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2825
2838
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2826
|
-
|
|
2827
|
-
return ((0, jsx_runtime_1.jsx)(__1.Tile, {
|
|
2828
|
-
}
|
|
2839
|
+
function DropdownMobile({ children, ...props }) {
|
|
2840
|
+
return ((0, jsx_runtime_1.jsx)(__1.Tile, { elevation: '2', pi: '0', pb: '0', w: '100vw', maxHeight: '80%', position: 'fixed', display: 'flex', flexDirection: 'column', overflow: 'auto', style: { bottom: 0, left: 0 }, zIndex: 2, "data-testid": 'dropdown', ...props, children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, pb: 16, children: children }) }));
|
|
2841
|
+
}
|
|
2829
2842
|
|
|
2830
2843
|
|
|
2831
2844
|
/***/ },
|
|
@@ -2857,12 +2870,10 @@ Object.defineProperty(exports, "Dropdown", ({ enumerable: true, get: function ()
|
|
|
2857
2870
|
|
|
2858
2871
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2859
2872
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2860
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2861
2873
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
});
|
|
2874
|
+
function EmailInput(props) {
|
|
2875
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'email', ...props });
|
|
2876
|
+
}
|
|
2866
2877
|
exports["default"] = EmailInput;
|
|
2867
2878
|
|
|
2868
2879
|
|
|
@@ -3003,18 +3014,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3003
3014
|
};
|
|
3004
3015
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3005
3016
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3006
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3007
3017
|
const WithErrorWrapper_1 = __importDefault(__webpack_require__(/*! ../../helpers/WithErrorWrapper */ "./src/helpers/WithErrorWrapper.tsx"));
|
|
3008
3018
|
const Label_1 = __webpack_require__(/*! ../Label */ "./src/components/Label/index.ts");
|
|
3009
3019
|
const Field_1 = __webpack_require__(/*! ./Field */ "./src/components/Field/Field.tsx");
|
|
3010
|
-
|
|
3011
|
-
const component = (0, jsx_runtime_1.jsx)(Label_1.Label, { "rcx-field__label": true, ...props
|
|
3020
|
+
function FieldLabel(props) {
|
|
3021
|
+
const component = (0, jsx_runtime_1.jsx)(Label_1.Label, { "rcx-field__label": true, ...props });
|
|
3012
3022
|
if (true) {
|
|
3013
3023
|
return ((0, jsx_runtime_1.jsx)(WithErrorWrapper_1.default, { context: Field_1.FieldContext, parentComponent: 'Field', componentName: FieldLabel.name, children: component }));
|
|
3014
3024
|
}
|
|
3015
3025
|
// removed by dead control flow
|
|
3016
3026
|
|
|
3017
|
-
}
|
|
3027
|
+
}
|
|
3018
3028
|
exports["default"] = FieldLabel;
|
|
3019
3029
|
|
|
3020
3030
|
|
|
@@ -3393,11 +3403,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3393
3403
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3394
3404
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3395
3405
|
const icons_1 = __importDefault(__webpack_require__(/*! @rocket.chat/icons */ "@rocket.chat/icons"));
|
|
3396
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3397
3406
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3398
|
-
|
|
3399
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-icon": true, "rcx-icon--name": name, children: icons_1.default[name], "aria-hidden": 'true', fontSize: size,
|
|
3400
|
-
}
|
|
3407
|
+
function Icon({ name, size, ...props }) {
|
|
3408
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-icon": true, "rcx-icon--name": name, children: icons_1.default[name], "aria-hidden": 'true', fontSize: size, ...props }));
|
|
3409
|
+
}
|
|
3401
3410
|
exports["default"] = Icon;
|
|
3402
3411
|
|
|
3403
3412
|
|
|
@@ -3430,11 +3439,10 @@ Object.defineProperty(exports, "Icon", ({ enumerable: true, get: function () { r
|
|
|
3430
3439
|
|
|
3431
3440
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3432
3441
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3433
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3434
3442
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3435
|
-
|
|
3436
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', animated: true, "rcx-input-box": true,
|
|
3437
|
-
}
|
|
3443
|
+
function Input(props) {
|
|
3444
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', animated: true, "rcx-input-box": true, ...props });
|
|
3445
|
+
}
|
|
3438
3446
|
exports["default"] = Input;
|
|
3439
3447
|
|
|
3440
3448
|
|
|
@@ -3458,7 +3466,7 @@ const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.t
|
|
|
3458
3466
|
const Input_1 = __importDefault(__webpack_require__(/*! ./Input */ "./src/components/InputBox/Input.tsx"));
|
|
3459
3467
|
const InputBoxAddon_1 = __importDefault(__webpack_require__(/*! ./InputBoxAddon */ "./src/components/InputBox/InputBoxAddon.tsx"));
|
|
3460
3468
|
const InputBoxWrapper_1 = __importDefault(__webpack_require__(/*! ./InputBoxWrapper */ "./src/components/InputBox/InputBoxWrapper.tsx"));
|
|
3461
|
-
|
|
3469
|
+
function InputBox({ ref, className, addon, startAddon, endAddon, error, hidden, invisible, multiple, placeholderVisible, type = 'text', small, onChange, ...props }) {
|
|
3462
3470
|
const innerRef = (0, react_1.useRef)(null);
|
|
3463
3471
|
const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
3464
3472
|
let defaultAddon = endAddon ?? addon;
|
|
@@ -3496,7 +3504,7 @@ const InputBox = (0, react_1.forwardRef)(function InputBox({ className, addon, s
|
|
|
3496
3504
|
], hidden: hidden, invisible: invisible, children: [startAddon && (0, jsx_runtime_1.jsx)(InputBoxAddon_1.default, { children: startAddon }), (0, jsx_runtime_1.jsx)(Input_1.default, { is: (type === 'textarea' && 'textarea') ||
|
|
3497
3505
|
(type === 'select' && 'select') ||
|
|
3498
3506
|
'input', className: className, cols: (type === 'textarea' && 1) || (type === 'select' && 0) || 0, multiple: multiple, ref: mergedRef, htmlSize: (type === 'textarea' && undefined) || (type === 'select' && 1) || 1, type: type === 'textarea' || type === 'select' ? undefined : type, onChange: handleChange, "rcx-input-box--multiple": multiple, "rcx-input-box--placeholder-visible": placeholderVisible, "rcx-input-box--type": type, "rcx-input-box--undecorated": true, "rcx-input-box--small": small, ...props }), defaultAddon && (0, jsx_runtime_1.jsx)(InputBoxAddon_1.default, { children: defaultAddon })] }));
|
|
3499
|
-
}
|
|
3507
|
+
}
|
|
3500
3508
|
exports["default"] = InputBox;
|
|
3501
3509
|
|
|
3502
3510
|
|
|
@@ -3511,11 +3519,10 @@ exports["default"] = InputBox;
|
|
|
3511
3519
|
|
|
3512
3520
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3513
3521
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3514
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3515
3522
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3516
|
-
|
|
3517
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-input-box__addon": true,
|
|
3518
|
-
}
|
|
3523
|
+
function InputBoxAddon(props) {
|
|
3524
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-input-box__addon": true, ...props });
|
|
3525
|
+
}
|
|
3519
3526
|
exports["default"] = InputBoxAddon;
|
|
3520
3527
|
|
|
3521
3528
|
|
|
@@ -3589,11 +3596,11 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
3589
3596
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3590
3597
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3591
3598
|
const LabelContext = (0, react_1.createContext)(false);
|
|
3592
|
-
|
|
3599
|
+
function Label({ disabled, is, required, children, ...props }) {
|
|
3593
3600
|
const isInsideLabel = (0, react_1.useContext)(LabelContext);
|
|
3594
3601
|
const component = is || (isInsideLabel && 'span') || 'label';
|
|
3595
|
-
return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.Box, { is: component, "rcx-label": true, "rcx-label--disabled": disabled, ...props,
|
|
3596
|
-
}
|
|
3602
|
+
return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.Box, { is: component, "rcx-label": true, "rcx-label--disabled": disabled, ...props, children: [children, required && ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-label__required": true, mis: 'x4', "aria-hidden": 'true', children: "*" }))] }) }));
|
|
3603
|
+
}
|
|
3597
3604
|
exports["default"] = Label;
|
|
3598
3605
|
|
|
3599
3606
|
|
|
@@ -3853,8 +3860,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
3853
3860
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3854
3861
|
const react_2 = __webpack_require__(/*! react */ "react");
|
|
3855
3862
|
const prevent_1 = __webpack_require__(/*! ../../helpers/prevent */ "./src/helpers/prevent.ts");
|
|
3856
|
-
|
|
3857
|
-
return ((0, react_1.createElement)(Tag, { ...props, key: id, id: id,
|
|
3863
|
+
function MenuOption({ is: Tag = 'li', id, children, focus, selected, className, title, disabled, variant, onClick, ...props }) {
|
|
3864
|
+
return ((0, react_1.createElement)(Tag, { ...props, key: id, id: id, "aria-selected": !!selected, "aria-disabled": !!disabled, title: title, onClick: (e) => {
|
|
3858
3865
|
if (disabled) {
|
|
3859
3866
|
(0, prevent_1.prevent)(e);
|
|
3860
3867
|
return;
|
|
@@ -3870,7 +3877,7 @@ const MenuOption = (0, react_2.forwardRef)(function MenuOption({ is: Tag = 'li',
|
|
|
3870
3877
|
]
|
|
3871
3878
|
.filter(Boolean)
|
|
3872
3879
|
.join(' ') }, children));
|
|
3873
|
-
}
|
|
3880
|
+
}
|
|
3874
3881
|
exports["default"] = (0, react_2.memo)(MenuOption);
|
|
3875
3882
|
|
|
3876
3883
|
|
|
@@ -4136,10 +4143,9 @@ exports["default"] = MenuSection;
|
|
|
4136
4143
|
|
|
4137
4144
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4138
4145
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4139
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4140
4146
|
const prependClassName_1 = __webpack_require__(/*! ../../helpers/prependClassName */ "./src/helpers/prependClassName.ts");
|
|
4141
|
-
|
|
4142
|
-
return ((0, jsx_runtime_1.jsx)("div", {
|
|
4147
|
+
function Message({ className, clickable, sequential, isSelected, isEditing, isPending, highlight, ...props }) {
|
|
4148
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, prependClassName_1.prependClassName)(className, [
|
|
4143
4149
|
'rcx-message',
|
|
4144
4150
|
(clickable || props.onClick) && 'rcx-message--clickable',
|
|
4145
4151
|
sequential && 'rcx-message--sequential',
|
|
@@ -4150,7 +4156,7 @@ const Message = (0, react_1.forwardRef)(function Message({ className, clickable,
|
|
|
4150
4156
|
]
|
|
4151
4157
|
.filter(Boolean)
|
|
4152
4158
|
.join(' ')), ...props }));
|
|
4153
|
-
}
|
|
4159
|
+
}
|
|
4154
4160
|
exports["default"] = Message;
|
|
4155
4161
|
|
|
4156
4162
|
|
|
@@ -4165,9 +4171,10 @@ exports["default"] = Message;
|
|
|
4165
4171
|
|
|
4166
4172
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4167
4173
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4168
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4169
4174
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
4170
|
-
|
|
4175
|
+
function MessageBlock({ className: _className, fixedWidth, ...props }) {
|
|
4176
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-message-block": true, "rcx-message-block--width-fixed": fixedWidth, ...props }));
|
|
4177
|
+
}
|
|
4171
4178
|
exports["default"] = MessageBlock;
|
|
4172
4179
|
|
|
4173
4180
|
|
|
@@ -4767,10 +4774,9 @@ exports["default"] = MessageName;
|
|
|
4767
4774
|
|
|
4768
4775
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4769
4776
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
});
|
|
4777
|
+
function MessageNameContainer(props) {
|
|
4778
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: 'rcx-box rcx-box--full rcx-message-header__name-container', ...props }));
|
|
4779
|
+
}
|
|
4774
4780
|
exports["default"] = MessageNameContainer;
|
|
4775
4781
|
|
|
4776
4782
|
|
|
@@ -4788,18 +4794,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4788
4794
|
};
|
|
4789
4795
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4790
4796
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4791
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4792
4797
|
const MessageReactionCounter_1 = __importDefault(__webpack_require__(/*! ./MessageReactionCounter */ "./src/components/Message/MessageReactions/MessageReactionCounter.tsx"));
|
|
4793
4798
|
const MessageReactionEmoji_1 = __importDefault(__webpack_require__(/*! ./MessageReactionEmoji */ "./src/components/Message/MessageReactions/MessageReactionEmoji.tsx"));
|
|
4794
|
-
|
|
4799
|
+
function MessageReaction({ name, counter, mine, children, className, ...props }) {
|
|
4795
4800
|
return ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
4796
4801
|
`rcx-message-reactions__reaction`,
|
|
4797
4802
|
mine && 'rcx-message-reactions__reaction--mine',
|
|
4798
4803
|
className,
|
|
4799
4804
|
]
|
|
4800
4805
|
.filter(Boolean)
|
|
4801
|
-
.join(' '),
|
|
4802
|
-
}
|
|
4806
|
+
.join(' '), role: 'button', tabIndex: 0, ...props, children: children || ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [name && (0, jsx_runtime_1.jsx)(MessageReactionEmoji_1.default, { name: name }), counter && (0, jsx_runtime_1.jsx)(MessageReactionCounter_1.default, { counter: counter })] })) }));
|
|
4807
|
+
}
|
|
4803
4808
|
exports["default"] = MessageReaction;
|
|
4804
4809
|
|
|
4805
4810
|
|
|
@@ -4872,11 +4877,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4872
4877
|
};
|
|
4873
4878
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4874
4879
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4875
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4876
4880
|
const MessageBlock_1 = __importDefault(__webpack_require__(/*! ../MessageBlock */ "./src/components/Message/MessageBlock.tsx"));
|
|
4877
|
-
|
|
4878
|
-
return ((0, jsx_runtime_1.jsx)(MessageBlock_1.default, { className: 'rcx-message-reactions', children: (0, jsx_runtime_1.jsx)("div", {
|
|
4879
|
-
}
|
|
4881
|
+
function MessageReactions(props) {
|
|
4882
|
+
return ((0, jsx_runtime_1.jsx)(MessageBlock_1.default, { className: 'rcx-message-reactions', children: (0, jsx_runtime_1.jsx)("div", { className: 'rcx-message-reactions__container', ...props }) }));
|
|
4883
|
+
}
|
|
4880
4884
|
exports["default"] = MessageReactions;
|
|
4881
4885
|
|
|
4882
4886
|
|
|
@@ -4949,11 +4953,10 @@ exports["default"] = MessageRoles;
|
|
|
4949
4953
|
|
|
4950
4954
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4951
4955
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4952
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4953
4956
|
__webpack_require__(/*! ./MessageStatusIndicator.styles.scss */ "./src/components/Message/MessageStatusIndicator/MessageStatusIndicator.styles.scss");
|
|
4954
|
-
|
|
4955
|
-
return (0, jsx_runtime_1.jsx)("div", {
|
|
4956
|
-
}
|
|
4957
|
+
function MessageStatusIndicator(props) {
|
|
4958
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'rcx-message-status-indicator', ...props });
|
|
4959
|
+
}
|
|
4957
4960
|
exports["default"] = MessageStatusIndicator;
|
|
4958
4961
|
|
|
4959
4962
|
|
|
@@ -5189,11 +5192,10 @@ exports["default"] = MessageTimestamp;
|
|
|
5189
5192
|
|
|
5190
5193
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5191
5194
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5192
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5193
5195
|
const ButtonGroup_1 = __webpack_require__(/*! ../../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
5194
|
-
|
|
5195
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-message-toolbar', children: (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { role: 'toolbar',
|
|
5196
|
-
}
|
|
5196
|
+
function MessageToolbar(props) {
|
|
5197
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-message-toolbar', children: (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { role: 'toolbar', small: true, ...props }) }));
|
|
5198
|
+
}
|
|
5197
5199
|
exports["default"] = MessageToolbar;
|
|
5198
5200
|
|
|
5199
5201
|
|
|
@@ -5208,11 +5210,10 @@ exports["default"] = MessageToolbar;
|
|
|
5208
5210
|
|
|
5209
5211
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5210
5212
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5211
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5212
5213
|
const Button_1 = __webpack_require__(/*! ../../Button */ "./src/components/Button/index.ts");
|
|
5213
|
-
|
|
5214
|
-
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, {
|
|
5215
|
-
}
|
|
5214
|
+
function MessageToolbarItem(props) {
|
|
5215
|
+
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true, ...props });
|
|
5216
|
+
}
|
|
5216
5217
|
exports["default"] = MessageToolbarItem;
|
|
5217
5218
|
|
|
5218
5219
|
|
|
@@ -5227,16 +5228,15 @@ exports["default"] = MessageToolbarItem;
|
|
|
5227
5228
|
|
|
5228
5229
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5229
5230
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: [
|
|
5231
|
+
function MessageToolbarWrapper({ className, visible, ...props }) {
|
|
5232
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
5233
5233
|
'rcx-box rcx-box--full rcx-message-toolbar__wrapper',
|
|
5234
5234
|
visible && 'rcx-message-toolbar__wrapper--visible',
|
|
5235
5235
|
className,
|
|
5236
5236
|
]
|
|
5237
5237
|
.filter(Boolean)
|
|
5238
5238
|
.join(' '), ...props }));
|
|
5239
|
-
}
|
|
5239
|
+
}
|
|
5240
5240
|
exports["default"] = MessageToolbarWrapper;
|
|
5241
5241
|
|
|
5242
5242
|
|
|
@@ -5585,16 +5585,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5585
5585
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5586
5586
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5587
5587
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
5588
|
-
const Modal = (
|
|
5588
|
+
const Modal = ({ children, wrapper = Box_1.Box, wrapperFunction, ...props }) => {
|
|
5589
5589
|
const wrapperProps = {
|
|
5590
5590
|
children,
|
|
5591
5591
|
className: 'rcx-modal__inner',
|
|
5592
5592
|
elevation: '2',
|
|
5593
5593
|
};
|
|
5594
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'dialog', open: true, "aria-modal": 'true', "rcx-modal": true,
|
|
5594
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'dialog', open: true, "aria-modal": 'true', "rcx-modal": true, ...props, children: wrapperFunction
|
|
5595
5595
|
? wrapperFunction(wrapperProps)
|
|
5596
5596
|
: (0, react_1.createElement)(wrapper, wrapperProps) }));
|
|
5597
|
-
}
|
|
5597
|
+
};
|
|
5598
5598
|
exports["default"] = Modal;
|
|
5599
5599
|
|
|
5600
5600
|
|
|
@@ -5870,7 +5870,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5870
5870
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5871
5871
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
5872
5872
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5873
|
-
const isForwardRefType_1 = __webpack_require__(/*! ../../helpers/isForwardRefType */ "./src/helpers/isForwardRefType.ts");
|
|
5874
5873
|
const prevent_1 = __webpack_require__(/*! ../../helpers/prevent */ "./src/helpers/prevent.ts");
|
|
5875
5874
|
const AnimatedVisibility_1 = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
5876
5875
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
@@ -5883,7 +5882,7 @@ const Position_1 = __webpack_require__(/*! ../Position */ "./src/components/Posi
|
|
|
5883
5882
|
const SelectAddon_1 = __importDefault(__webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx"));
|
|
5884
5883
|
const MultiSelectAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectAnchor */ "./src/components/MultiSelect/MultiSelectAnchor.tsx"));
|
|
5885
5884
|
const SelectedOptions_1 = __webpack_require__(/*! ./SelectedOptions */ "./src/components/MultiSelect/SelectedOptions.tsx");
|
|
5886
|
-
|
|
5885
|
+
function MultiSelect({ ref, value, filter, setFilter, options = [], error, disabled, anchor: Anchor = MultiSelectAnchor_1.default, onChange = () => { }, getLabel = ([, label] = ['', '']) => label, getValue = ([value]) => value, placeholder, renderOptions: _Options = Options_1.Options, renderItem, customEmpty, renderSelected: RenderSelected, addonIcon, ...props }) {
|
|
5887
5886
|
const [internalValue, setInternalValue] = (0, react_1.useState)(value || []);
|
|
5888
5887
|
(0, react_1.useEffect)(() => setInternalValue(value || []), [value]);
|
|
5889
5888
|
const [currentOptionValue, setCurrentOption] = (0, react_1.useState)();
|
|
@@ -5918,15 +5917,6 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5918
5917
|
const anchorRef = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
5919
5918
|
const { ref: containerRef, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
5920
5919
|
(0, fuselage_hooks_1.useOutsideClick)([containerRef], removeFocusClass);
|
|
5921
|
-
const renderAnchor = (params) => {
|
|
5922
|
-
if ((0, isForwardRefType_1.isForwardRefType)(Anchor)) {
|
|
5923
|
-
return (0, jsx_runtime_1.jsx)(Anchor, { ...params });
|
|
5924
|
-
}
|
|
5925
|
-
if (typeof Anchor === 'function') {
|
|
5926
|
-
return Anchor(params);
|
|
5927
|
-
}
|
|
5928
|
-
return null;
|
|
5929
|
-
};
|
|
5930
5920
|
const handleClick = (0, fuselage_hooks_1.useStableCallback)(() => {
|
|
5931
5921
|
if (visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE) {
|
|
5932
5922
|
return hide();
|
|
@@ -5936,26 +5926,7 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5936
5926
|
});
|
|
5937
5927
|
const listboxId = props.id ? `${props.id}-listbox` : undefined;
|
|
5938
5928
|
const { id, name, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, ...containerProps } = props;
|
|
5939
|
-
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: [
|
|
5940
|
-
'ref': anchorRef,
|
|
5941
|
-
'children': internalValue.length === 0 ? placeholder : null,
|
|
5942
|
-
'disabled': disabled ?? false,
|
|
5943
|
-
'onClick': show,
|
|
5944
|
-
'onBlur': hide,
|
|
5945
|
-
'onKeyDown': handleKeyDown,
|
|
5946
|
-
'onKeyUp': handleKeyUp,
|
|
5947
|
-
'role': 'combobox',
|
|
5948
|
-
'aria-expanded': visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE,
|
|
5949
|
-
'aria-haspopup': 'listbox',
|
|
5950
|
-
'aria-controls': listboxId,
|
|
5951
|
-
id,
|
|
5952
|
-
name,
|
|
5953
|
-
'aria-label': ariaLabel,
|
|
5954
|
-
'aria-labelledby': ariaLabelledBy,
|
|
5955
|
-
'aria-describedby': ariaDescribedBy,
|
|
5956
|
-
'aria-invalid': ariaInvalid,
|
|
5957
|
-
'aria-required': ariaRequired,
|
|
5958
|
-
}), internalValue.map((value) => {
|
|
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: [(0, jsx_runtime_1.jsx)(Anchor, { ref: anchorRef, disabled: disabled ?? false, onClick: show, onBlur: hide, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, role: 'combobox', "aria-expanded": visible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE, "aria-haspopup": 'listbox', "aria-controls": listboxId, id: id, name: name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, children: internalValue.length === 0 ? placeholder : null }), internalValue.map((value) => {
|
|
5959
5930
|
const currentOption = options.find(([val]) => val === value);
|
|
5960
5931
|
return RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { value: value, label: getLabel(currentOption), onMouseDown: (e) => {
|
|
5961
5932
|
(0, prevent_1.prevent)(e);
|
|
@@ -5969,7 +5940,7 @@ const MultiSelect = (0, react_1.forwardRef)(({ value, filter, setFilter, options
|
|
|
5969
5940
|
})] }) }) }) }) }) }), (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
|
|
5970
5941
|
? 'chevron-up'
|
|
5971
5942
|
: 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 }) }) })] }));
|
|
5972
|
-
}
|
|
5943
|
+
}
|
|
5973
5944
|
exports["default"] = MultiSelect;
|
|
5974
5945
|
|
|
5975
5946
|
|
|
@@ -5987,11 +5958,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5987
5958
|
};
|
|
5988
5959
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5989
5960
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5990
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5991
5961
|
const SelectFocus_1 = __importDefault(__webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx"));
|
|
5992
|
-
|
|
5993
|
-
return (
|
|
5994
|
-
}
|
|
5962
|
+
function MultiSelectAnchor(props) {
|
|
5963
|
+
return (0, jsx_runtime_1.jsx)(SelectFocus_1.default, { "rcx-input-box--undecorated": true, order: 1, ...props });
|
|
5964
|
+
}
|
|
5995
5965
|
exports["default"] = MultiSelectAnchor;
|
|
5996
5966
|
|
|
5997
5967
|
|
|
@@ -6012,10 +5982,10 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
6012
5982
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6013
5983
|
const MultiSelect_1 = __importDefault(__webpack_require__(/*! ./MultiSelect */ "./src/components/MultiSelect/MultiSelect.tsx"));
|
|
6014
5984
|
const MultiSelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectFilteredAnchor */ "./src/components/MultiSelect/MultiSelectFilteredAnchor.tsx"));
|
|
6015
|
-
|
|
5985
|
+
function MultiSelectFiltered({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) {
|
|
6016
5986
|
const [filter, setFilter] = (0, react_1.useState)('');
|
|
6017
|
-
return ((0, jsx_runtime_1.jsx)(MultiSelect_1.default, { ...props,
|
|
6018
|
-
}
|
|
5987
|
+
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 })) }));
|
|
5988
|
+
}
|
|
6019
5989
|
exports["default"] = MultiSelectFiltered;
|
|
6020
5990
|
|
|
6021
5991
|
|
|
@@ -6030,12 +6000,11 @@ exports["default"] = MultiSelectFiltered;
|
|
|
6030
6000
|
|
|
6031
6001
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6032
6002
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6033
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6034
6003
|
const Flex_1 = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
6035
6004
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6036
|
-
|
|
6037
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(InputBox_1.Input, {
|
|
6038
|
-
}
|
|
6005
|
+
function MultiSelectFilteredAnchor({ children: _children, filter, onChangeFilter, placeholder, ...props }) {
|
|
6006
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(InputBox_1.Input, { placeholder: placeholder, value: filter, onInput: (e) => onChangeFilter(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true, order: 1, autoComplete: 'off' }) }));
|
|
6007
|
+
}
|
|
6039
6008
|
exports["default"] = MultiSelectFilteredAnchor;
|
|
6040
6009
|
|
|
6041
6010
|
|
|
@@ -6120,9 +6089,10 @@ exports["default"] = NavBarDivider;
|
|
|
6120
6089
|
|
|
6121
6090
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6122
6091
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6123
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6124
6092
|
const ButtonGroup_1 = __webpack_require__(/*! ../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
6125
|
-
|
|
6093
|
+
function NavBarGroup(props) {
|
|
6094
|
+
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { className: 'rcx-navbar-group', ...props });
|
|
6095
|
+
}
|
|
6126
6096
|
exports["default"] = NavBarGroup;
|
|
6127
6097
|
|
|
6128
6098
|
|
|
@@ -6137,17 +6107,15 @@ exports["default"] = NavBarGroup;
|
|
|
6137
6107
|
|
|
6138
6108
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6139
6109
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6140
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6141
6110
|
const appendClassName_1 = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
6142
6111
|
const patchChildren_1 = __webpack_require__(/*! ../../helpers/patchChildren */ "./src/helpers/patchChildren.ts");
|
|
6143
6112
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
6144
|
-
|
|
6145
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: icon ? ((0, jsx_runtime_1.jsx)(Button_1.IconButton, {
|
|
6113
|
+
function NavBarItem({ children, icon, ...props }) {
|
|
6114
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: icon ? ((0, jsx_runtime_1.jsx)(Button_1.IconButton, { "rcx-navbar-item": true, icon: icon, small: true, ...props })) : ((0, patchChildren_1.patchChildren)(children, (childProps) => ({
|
|
6146
6115
|
className: (0, appendClassName_1.appendClassName)(childProps.className, 'rcx-navbar-item'),
|
|
6147
|
-
ref,
|
|
6148
6116
|
...props,
|
|
6149
6117
|
}))) }));
|
|
6150
|
-
}
|
|
6118
|
+
}
|
|
6151
6119
|
exports["default"] = NavBarItem;
|
|
6152
6120
|
|
|
6153
6121
|
|
|
@@ -6172,7 +6140,7 @@ const isNavBarGroup = (child) => {
|
|
|
6172
6140
|
if (!(0, react_1.isValidElement)(child))
|
|
6173
6141
|
return false;
|
|
6174
6142
|
const component = child.type;
|
|
6175
|
-
return component.
|
|
6143
|
+
return component.name === NavBarGroup_1.default.name;
|
|
6176
6144
|
};
|
|
6177
6145
|
const NavBarSection = ({ children, ...props }) => {
|
|
6178
6146
|
const validChildren = react_1.Children.toArray(children).filter(isNavBarGroup);
|
|
@@ -6218,11 +6186,10 @@ Object.defineProperty(exports, "NavBarSection", ({ enumerable: true, get: functi
|
|
|
6218
6186
|
|
|
6219
6187
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6220
6188
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6221
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6222
6189
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6223
|
-
|
|
6224
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'number',
|
|
6225
|
-
}
|
|
6190
|
+
function NumberInput(props) {
|
|
6191
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'number', ...props });
|
|
6192
|
+
}
|
|
6226
6193
|
exports["default"] = NumberInput;
|
|
6227
6194
|
|
|
6228
6195
|
|
|
@@ -6288,8 +6255,8 @@ const OptionAvatar_1 = __importDefault(__webpack_require__(/*! ./OptionAvatar */
|
|
|
6288
6255
|
const OptionColumn_1 = __importDefault(__webpack_require__(/*! ./OptionColumn */ "./src/components/Option/OptionColumn.tsx"));
|
|
6289
6256
|
const OptionContent_1 = __importDefault(__webpack_require__(/*! ./OptionContent */ "./src/components/Option/OptionContent.tsx"));
|
|
6290
6257
|
const OptionIcon_1 = __importDefault(__webpack_require__(/*! ./OptionIcon */ "./src/components/Option/OptionIcon.tsx"));
|
|
6291
|
-
|
|
6292
|
-
return ((0, react_1.createElement)(Tag, { ...props, key: id, id: id,
|
|
6258
|
+
function Option({ is: Tag = 'li', id, children, label, focus, selected, className, icon, gap, avatar, title, disabled, variant, onClick, description, ...props }) {
|
|
6259
|
+
return ((0, react_1.createElement)(Tag, { ...props, key: id, id: id, "aria-selected": !!selected, "aria-disabled": !!disabled, title: title, onClick: (e) => {
|
|
6293
6260
|
if (disabled) {
|
|
6294
6261
|
(0, prevent_1.prevent)(e);
|
|
6295
6262
|
return;
|
|
@@ -6311,7 +6278,7 @@ const Option = (0, react_2.forwardRef)(function Option({ is: Tag = 'li', id, chi
|
|
|
6311
6278
|
]
|
|
6312
6279
|
.filter(Boolean)
|
|
6313
6280
|
.join(' '), children: [avatar && (0, jsx_runtime_1.jsx)(OptionAvatar_1.default, { children: avatar }), icon && (0, jsx_runtime_1.jsx)(OptionIcon_1.default, { name: icon }), gap && (0, jsx_runtime_1.jsx)(OptionColumn_1.default, {}), label && (0, jsx_runtime_1.jsx)(OptionContent_1.default, { children: label }), label !== children && children] })));
|
|
6314
|
-
}
|
|
6281
|
+
}
|
|
6315
6282
|
exports["default"] = (0, react_2.memo)(Option);
|
|
6316
6283
|
|
|
6317
6284
|
|
|
@@ -6561,13 +6528,12 @@ Object.defineProperty(exports, "OptionHeader", ({ enumerable: true, get: functio
|
|
|
6561
6528
|
|
|
6562
6529
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6563
6530
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6564
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6565
6531
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
6566
6532
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
6567
6533
|
const Tile_1 = __webpack_require__(/*! ../Tile */ "./src/components/Tile/index.ts");
|
|
6568
|
-
|
|
6569
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, { padding: 0, paddingBlock: 'x12', paddingInline: 0, children: (0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, smooth: true, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, {
|
|
6570
|
-
}
|
|
6534
|
+
function OptionContainer(props) {
|
|
6535
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, { padding: 0, paddingBlock: 'x12', paddingInline: 0, children: (0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, smooth: true, children: (0, jsx_runtime_1.jsx)(Tile_1.Tile, { elevation: '0', padding: 'none', maxHeight: 'x240', ...props }) }) }) }));
|
|
6536
|
+
}
|
|
6571
6537
|
exports["default"] = OptionContainer;
|
|
6572
6538
|
|
|
6573
6539
|
|
|
@@ -6592,7 +6558,7 @@ const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/i
|
|
|
6592
6558
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
6593
6559
|
const Tile_1 = __webpack_require__(/*! ../Tile */ "./src/components/Tile/index.ts");
|
|
6594
6560
|
const OptionsEmpty_1 = __importDefault(__webpack_require__(/*! ./OptionsEmpty */ "./src/components/Options/OptionsEmpty.tsx"));
|
|
6595
|
-
|
|
6561
|
+
function Options({ maxHeight = 'x144', multiple, renderEmpty: EmptyComponent = OptionsEmpty_1.default, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, customEmpty, id, ...props }) {
|
|
6596
6562
|
const liRef = (0, react_1.useRef)(null);
|
|
6597
6563
|
(0, react_1.useLayoutEffect)(() => {
|
|
6598
6564
|
if (!liRef.current) {
|
|
@@ -6609,7 +6575,7 @@ const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', m
|
|
|
6609
6575
|
current.scrollTop = li.offsetTop;
|
|
6610
6576
|
}
|
|
6611
6577
|
}, [cursor]);
|
|
6612
|
-
const optionsMemoized = (0, react_1.useMemo)(() => options
|
|
6578
|
+
const optionsMemoized = (0, react_1.useMemo)(() => options.map(([value, label, selected, disabled, type, url], i) => {
|
|
6613
6579
|
switch (type) {
|
|
6614
6580
|
case 'heading':
|
|
6615
6581
|
return (0, jsx_runtime_1.jsx)(Option_1.OptionHeader, { children: label }, value);
|
|
@@ -6617,19 +6583,17 @@ const Options = (0, react_1.forwardRef)(function Options({ maxHeight = 'x144', m
|
|
|
6617
6583
|
return (0, jsx_runtime_1.jsx)(Option_1.OptionDivider, {}, value);
|
|
6618
6584
|
default:
|
|
6619
6585
|
return ((0, jsx_runtime_1.jsx)(OptionComponent, { role: 'option', label: label, onMouseDown: (e) => {
|
|
6620
|
-
if (disabled)
|
|
6586
|
+
if (disabled)
|
|
6621
6587
|
return;
|
|
6622
|
-
}
|
|
6623
6588
|
(0, prevent_1.prevent)(e);
|
|
6624
6589
|
onSelect([value, label, selected, disabled, type, url]);
|
|
6625
|
-
|
|
6626
|
-
}, value: value, selected: selected || (multiple !== true && undefined), disabled: disabled, focus: cursor === i || undefined }, value));
|
|
6590
|
+
}, value: value, selected: selected, disabled: disabled, focus: cursor === i }, value));
|
|
6627
6591
|
}
|
|
6628
|
-
}), [options,
|
|
6629
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, ...props,
|
|
6592
|
+
}), [options, cursor, onSelect, OptionComponent]);
|
|
6593
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-options": true, ...props, 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]
|
|
6630
6594
|
? String(options?.[cursor]?.[0])
|
|
6631
6595
|
: undefined, children: [!options.length && (0, jsx_runtime_1.jsx)(EmptyComponent, { customEmpty: customEmpty }), optionsMemoized] }) }) }) }));
|
|
6632
|
-
}
|
|
6596
|
+
}
|
|
6633
6597
|
exports["default"] = Options;
|
|
6634
6598
|
|
|
6635
6599
|
|
|
@@ -6831,7 +6795,8 @@ exports.useVisible = useVisible;
|
|
|
6831
6795
|
|
|
6832
6796
|
|
|
6833
6797
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6834
|
-
exports.useVisible = exports.
|
|
6798
|
+
exports.useVisible = exports.CheckOption = exports.Empty = void 0;
|
|
6799
|
+
exports.OptionsPaginated = OptionsPaginated;
|
|
6835
6800
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6836
6801
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6837
6802
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
@@ -6847,7 +6812,7 @@ exports.Empty = (0, react_2.memo)(() => (0, jsx_runtime_1.jsx)(Option_1.Option,
|
|
|
6847
6812
|
exports.CheckOption = (0, react_2.memo)(function CheckOption({ selected, children: label, ...options }) {
|
|
6848
6813
|
return ((0, jsx_runtime_1.jsx)(Option_1.Option, { label: label, selected: selected, ...options, children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: selected }) }));
|
|
6849
6814
|
});
|
|
6850
|
-
|
|
6815
|
+
function OptionsPaginated({ ref, withTitle, multiple, renderEmpty: EmptyComponent = exports.Empty, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, endReached, ...props }) {
|
|
6851
6816
|
const OptionsComponentWithData = ({ index, data, }) => {
|
|
6852
6817
|
const { value, label, selected } = data;
|
|
6853
6818
|
return ((0, react_1.createElement)(OptionComponent, { ...(withTitle && { title: label }), index: index, role: 'option', label: label, onMouseDown: (e) => {
|
|
@@ -6857,7 +6822,7 @@ exports.OptionsPaginated = (0, react_2.forwardRef)(({ withTitle, multiple, rende
|
|
|
6857
6822
|
}, key: value, value: value, selected: selected || (multiple !== true && undefined), focus: cursor === index || undefined }));
|
|
6858
6823
|
};
|
|
6859
6824
|
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: !options.length ? ((0, jsx_runtime_1.jsx)(EmptyComponent, {})) : ((0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { endReached: endReached, style: { height: '144px' }, totalCount: options.length, data: options, itemContent: (index, data) => ((0, jsx_runtime_1.jsx)(OptionsComponentWithData, { index: index, data: data })) })) }) }));
|
|
6860
|
-
}
|
|
6825
|
+
}
|
|
6861
6826
|
const useVisible = (initialVisibility = AnimatedVisibility_1.AnimatedVisibility.HIDDEN) => {
|
|
6862
6827
|
const [visible, setVisible] = (0, fuselage_hooks_1.useDebouncedState)(initialVisibility, 10);
|
|
6863
6828
|
const hide = (0, fuselage_hooks_1.useStableCallback)(() => setVisible(AnimatedVisibility_1.AnimatedVisibility.HIDDEN));
|
|
@@ -6986,12 +6951,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6986
6951
|
};
|
|
6987
6952
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6988
6953
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6989
|
-
const
|
|
6954
|
+
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
6990
6955
|
const Flex_1 = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
6991
6956
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6992
6957
|
const PaginatedMultiSelect_1 = __importDefault(__webpack_require__(/*! ./PaginatedMultiSelect */ "./src/components/PaginatedSelect/PaginatedMultiSelect.tsx"));
|
|
6993
6958
|
const PaginatedMultiSelectFiltered = ({ filter, setFilter, options, placeholder, ...props }) => {
|
|
6994
|
-
const anchor = (0,
|
|
6959
|
+
const anchor = (0, fuselage_hooks_1.useStableCallback)(({ children: _children, filter, ...props }) => ((0, jsx_runtime_1.jsx)(Flex_1.FlexItem, { grow: 1, children: (0, jsx_runtime_1.jsx)(InputBox_1.Input, { placeholder: placeholder, value: filter, onInput: (e) => setFilter?.(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true }) })));
|
|
6995
6960
|
return ((0, jsx_runtime_1.jsx)(PaginatedMultiSelect_1.default, { filter: filter, options: options, anchor: anchor, ...props }));
|
|
6996
6961
|
};
|
|
6997
6962
|
exports["default"] = PaginatedMultiSelectFiltered;
|
|
@@ -7070,14 +7035,13 @@ exports.PaginatedSelect = PaginatedSelect;
|
|
|
7070
7035
|
|
|
7071
7036
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7072
7037
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7073
|
-
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
7074
7038
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7075
7039
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
7076
7040
|
const PaginatedSelect_1 = __webpack_require__(/*! ./PaginatedSelect */ "./src/components/PaginatedSelect/PaginatedSelect.tsx");
|
|
7077
7041
|
const PaginatedSelectFiltered = ({ filter, setFilter, options, placeholder, ...props }) => {
|
|
7078
|
-
const anchor = (0, react_1.useMemo)(() => (
|
|
7042
|
+
const anchor = (0, react_1.useMemo)(() => ({ filter, onChange: _onChange, ...props }) => ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { mi: 4, flexGrow: 1, className: 'rcx-select__focus', placeholder: placeholder, value: filter, onChange: (e) => {
|
|
7079
7043
|
setFilter(e.currentTarget.value);
|
|
7080
|
-
}
|
|
7044
|
+
}, ...props, "rcx-input-box--undecorated": true })), [placeholder, setFilter]);
|
|
7081
7045
|
return ((0, jsx_runtime_1.jsx)(PaginatedSelect_1.PaginatedSelect, { placeholder: undefined, filter: filter, options: options, ...props, anchor: anchor }));
|
|
7082
7046
|
};
|
|
7083
7047
|
exports["default"] = PaginatedSelectFiltered;
|
|
@@ -7094,11 +7058,10 @@ exports["default"] = PaginatedSelectFiltered;
|
|
|
7094
7058
|
|
|
7095
7059
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7096
7060
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7097
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7098
7061
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
7099
|
-
|
|
7100
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-select__wrapper": true,
|
|
7101
|
-
}
|
|
7062
|
+
function PaginatedSelectWrapper(props) {
|
|
7063
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-select__wrapper": true, ...props });
|
|
7064
|
+
}
|
|
7102
7065
|
exports["default"] = PaginatedSelectWrapper;
|
|
7103
7066
|
|
|
7104
7067
|
|
|
@@ -7700,16 +7663,15 @@ exports.dark = (0, getPalette_1.getThemePalette)('dark');
|
|
|
7700
7663
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7701
7664
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7702
7665
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
7703
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7704
7666
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
7705
7667
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
7706
|
-
|
|
7668
|
+
function PasswordInput(props) {
|
|
7707
7669
|
const [hidden, toggle] = (0, fuselage_hooks_1.useToggle)(true);
|
|
7708
7670
|
const handleAddonClick = () => {
|
|
7709
7671
|
toggle();
|
|
7710
7672
|
};
|
|
7711
|
-
return ((0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: hidden ? 'password' : 'text',
|
|
7712
|
-
}
|
|
7673
|
+
return ((0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: hidden ? 'password' : 'text', endAddon: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: hidden ? 'eye-off' : 'eye', size: 20, onClick: handleAddonClick }), ...props }));
|
|
7674
|
+
}
|
|
7713
7675
|
exports["default"] = PasswordInput;
|
|
7714
7676
|
|
|
7715
7677
|
|
|
@@ -7885,7 +7847,6 @@ Object.defineProperty(exports, "PositionAnimated", ({ enumerable: true, get: fun
|
|
|
7885
7847
|
|
|
7886
7848
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7887
7849
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7888
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7889
7850
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
7890
7851
|
const getWidth = (percentage) => `${Math.min(Math.max(0, percentage), 100).toFixed(1)}%`;
|
|
7891
7852
|
const colors = {
|
|
@@ -7906,9 +7867,9 @@ const getColor = (isLight, variant, error) => {
|
|
|
7906
7867
|
}
|
|
7907
7868
|
return isLight ? lightColors[variant] : colors[variant];
|
|
7908
7869
|
};
|
|
7909
|
-
|
|
7910
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
7911
|
-
}
|
|
7870
|
+
function ProgressBar({ percentage, variant = 'info', error, animated, light = false, ...props }) {
|
|
7871
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-progress-bar": true, title: error || undefined, overflow: 'hidden', ...props, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { bg: getColor(light, variant, error), "rcx-progress-bar__fill--animated": animated, "rcx-progress-bar__fill": true, width: getWidth(percentage) }) }));
|
|
7872
|
+
}
|
|
7912
7873
|
exports["default"] = ProgressBar;
|
|
7913
7874
|
|
|
7914
7875
|
|
|
@@ -7941,11 +7902,10 @@ Object.defineProperty(exports, "ProgressBar", ({ enumerable: true, get: function
|
|
|
7941
7902
|
|
|
7942
7903
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7943
7904
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7944
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7945
7905
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
7946
|
-
|
|
7947
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'label', className: className, "rcx-radio-button": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', "rcx-radio-button__input": true, type: 'radio',
|
|
7948
|
-
}
|
|
7906
|
+
function RadioButton({ className, labelChildren, ...props }) {
|
|
7907
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'label', className: className, "rcx-radio-button": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', "rcx-radio-button__input": true, type: 'radio', ...props }), (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-radio-button__fake": true, "aria-hidden": 'true' })] }));
|
|
7908
|
+
}
|
|
7949
7909
|
exports["default"] = RadioButton;
|
|
7950
7910
|
|
|
7951
7911
|
|
|
@@ -8104,11 +8064,10 @@ Object.defineProperty(exports, "Scrollable", ({ enumerable: true, get: function
|
|
|
8104
8064
|
|
|
8105
8065
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8106
8066
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8107
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8108
8067
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8109
|
-
|
|
8110
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'search',
|
|
8111
|
-
}
|
|
8068
|
+
function SearchInput(props) {
|
|
8069
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'search', ...props });
|
|
8070
|
+
}
|
|
8112
8071
|
exports["default"] = SearchInput;
|
|
8113
8072
|
|
|
8114
8073
|
|
|
@@ -8178,12 +8137,11 @@ function OptionAria({ item, state }) {
|
|
|
8178
8137
|
|
|
8179
8138
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8180
8139
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8181
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8182
8140
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
8183
8141
|
const SelectAria_1 = __webpack_require__(/*! ./SelectAria */ "./src/components/Select/SelectAria.tsx");
|
|
8184
|
-
|
|
8142
|
+
function Select({ options, ref, ...props }) {
|
|
8185
8143
|
return ((0, jsx_runtime_1.jsx)(SelectAria_1.SelectAria, { ref: ref, ...props, children: options.map((option) => ((0, jsx_runtime_1.jsx)(react_stately_1.Item, { title: option[1] ?? option[0], textValue: option[0], children: option[1] ?? option[0] }, option[0]))) }));
|
|
8186
|
-
}
|
|
8144
|
+
}
|
|
8187
8145
|
exports["default"] = Select;
|
|
8188
8146
|
|
|
8189
8147
|
|
|
@@ -8198,11 +8156,10 @@ exports["default"] = Select;
|
|
|
8198
8156
|
|
|
8199
8157
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8200
8158
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8201
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8202
8159
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8203
|
-
|
|
8204
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-select__addon": true,
|
|
8205
|
-
}
|
|
8160
|
+
function SelectAddon(props) {
|
|
8161
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-select__addon": true, ...props });
|
|
8162
|
+
}
|
|
8206
8163
|
exports["default"] = SelectAddon;
|
|
8207
8164
|
|
|
8208
8165
|
|
|
@@ -8216,10 +8173,10 @@ exports["default"] = SelectAddon;
|
|
|
8216
8173
|
|
|
8217
8174
|
|
|
8218
8175
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8219
|
-
exports.
|
|
8176
|
+
exports.Item = void 0;
|
|
8177
|
+
exports.SelectAria = SelectAria;
|
|
8220
8178
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8221
8179
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
8222
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8223
8180
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
8224
8181
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
8225
8182
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
@@ -8230,7 +8187,7 @@ const Listbox_1 = __webpack_require__(/*! ./Listbox */ "./src/components/Select/
|
|
|
8230
8187
|
const SelectTrigger_1 = __webpack_require__(/*! ./SelectTrigger */ "./src/components/Select/SelectTrigger.tsx");
|
|
8231
8188
|
var react_stately_2 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
8232
8189
|
Object.defineProperty(exports, "Item", ({ enumerable: true, get: function () { return react_stately_2.Item; } }));
|
|
8233
|
-
|
|
8190
|
+
function SelectAria({ ref: outerRef, error, placeholder, value, onChange, small, isDisabled: isDisabledProps, disabled, id, ...props }) {
|
|
8234
8191
|
const isDisabled = isDisabledProps || disabled;
|
|
8235
8192
|
const state = (0, react_stately_1.useSelectState)({
|
|
8236
8193
|
isDisabled,
|
|
@@ -8245,7 +8202,7 @@ exports.SelectAria = (0, react_1.forwardRef)(function SelectAria({ error, placeh
|
|
|
8245
8202
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { position: 'relative', size: 0, 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: {
|
|
8246
8203
|
width: borderBoxSize?.inlineSize,
|
|
8247
8204
|
}, children: (0, jsx_runtime_1.jsx)(Listbox_1.ListBox, { ...menuProps, state: state }) }) }))] }));
|
|
8248
|
-
}
|
|
8205
|
+
}
|
|
8249
8206
|
|
|
8250
8207
|
|
|
8251
8208
|
/***/ },
|
|
@@ -8265,10 +8222,10 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
8265
8222
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8266
8223
|
const _1 = __webpack_require__(/*! . */ "./src/components/Select/index.ts");
|
|
8267
8224
|
const SelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./SelectFilteredAnchor */ "./src/components/Select/SelectFilteredAnchor.tsx"));
|
|
8268
|
-
|
|
8225
|
+
function SelectFiltered({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) {
|
|
8269
8226
|
const [filter, setFilter] = (0, react_1.useState)('');
|
|
8270
|
-
return ((0, jsx_runtime_1.jsx)(_1.SelectLegacy, {
|
|
8271
|
-
}
|
|
8227
|
+
return ((0, jsx_runtime_1.jsx)(_1.SelectLegacy, { placeholder: placeholder, filter: propFilter || filter, options: options, ...props, anchor: (params) => ((0, jsx_runtime_1.jsx)(SelectFilteredAnchor_1.default, { placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter, ...params })) }));
|
|
8228
|
+
}
|
|
8272
8229
|
exports["default"] = SelectFiltered;
|
|
8273
8230
|
|
|
8274
8231
|
|
|
@@ -8283,11 +8240,10 @@ exports["default"] = SelectFiltered;
|
|
|
8283
8240
|
|
|
8284
8241
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8285
8242
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8286
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8287
8243
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8288
|
-
|
|
8289
|
-
return ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { mi: 4, flexGrow: 1, className: 'rcx-select__focus',
|
|
8290
|
-
}
|
|
8244
|
+
function SelectFilteredAnchor({ children: _children, filter, onChangeFilter, placeholder, ...props }) {
|
|
8245
|
+
return ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { mi: 4, flexGrow: 1, className: 'rcx-select__focus', placeholder: placeholder, value: filter, onInput: (e) => onChangeFilter(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true }));
|
|
8246
|
+
}
|
|
8291
8247
|
exports["default"] = SelectFilteredAnchor;
|
|
8292
8248
|
|
|
8293
8249
|
|
|
@@ -8302,11 +8258,10 @@ exports["default"] = SelectFilteredAnchor;
|
|
|
8302
8258
|
|
|
8303
8259
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8304
8260
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8305
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8306
8261
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8307
|
-
|
|
8308
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
8309
|
-
}
|
|
8262
|
+
function SelectFocus(props) {
|
|
8263
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { fontScale: 'p2m', color: 'hint', "rcx-select__focus": true, is: 'button', type: 'button', ...props }));
|
|
8264
|
+
}
|
|
8310
8265
|
exports["default"] = SelectFocus;
|
|
8311
8266
|
|
|
8312
8267
|
|
|
@@ -8326,7 +8281,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8326
8281
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8327
8282
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
8328
8283
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8329
|
-
const isForwardRefType_1 = __webpack_require__(/*! ../../helpers/isForwardRefType */ "./src/helpers/isForwardRefType.ts");
|
|
8330
8284
|
const AnimatedVisibility_1 = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
8331
8285
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8332
8286
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
@@ -8335,7 +8289,7 @@ const Options_1 = __webpack_require__(/*! ../Options */ "./src/components/Option
|
|
|
8335
8289
|
const PositionAnimated_1 = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
8336
8290
|
const SelectAddon_1 = __importDefault(__webpack_require__(/*! ./SelectAddon */ "./src/components/Select/SelectAddon.tsx"));
|
|
8337
8291
|
const SelectFocus_1 = __importDefault(__webpack_require__(/*! ./SelectFocus */ "./src/components/Select/SelectFocus.tsx"));
|
|
8338
|
-
const Wrapper = (
|
|
8292
|
+
const Wrapper = (props) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-select__wrapper": true, ...props }));
|
|
8339
8293
|
const useDidUpdate = (func, deps) => {
|
|
8340
8294
|
const didMount = (0, react_1.useRef)(false);
|
|
8341
8295
|
const fn = (0, fuselage_hooks_1.useStableCallback)(func);
|
|
@@ -8346,7 +8300,7 @@ const useDidUpdate = (func, deps) => {
|
|
|
8346
8300
|
didMount.current = true;
|
|
8347
8301
|
}, deps || []);
|
|
8348
8302
|
};
|
|
8349
|
-
const SelectLegacy =
|
|
8303
|
+
const SelectLegacy = function SelectLegacy({ ref, value, filter, error, disabled, options = [], anchor: Anchor = SelectFocus_1.default, onChange = () => { }, getValue = ([value] = ['', '']) => value, getLabel = ([, label] = ['', '']) => label, placeholder = '', renderItem, renderSelected: RenderSelected, renderOptions: _Options = Options_1.Options, addonIcon, customEmpty, ...props }) {
|
|
8350
8304
|
const [internalValue, setInternalValue] = (0, react_1.useState)(value || '');
|
|
8351
8305
|
const internalChangedByKeyboard = (0, fuselage_hooks_1.useStableCallback)(([value]) => {
|
|
8352
8306
|
setInternalValue(value);
|
|
@@ -8374,15 +8328,6 @@ const SelectLegacy = (0, react_1.forwardRef)(function SelectLegacy({ value, filt
|
|
|
8374
8328
|
removeFocusClass();
|
|
8375
8329
|
hide();
|
|
8376
8330
|
});
|
|
8377
|
-
const renderAnchor = (params) => {
|
|
8378
|
-
if ((0, isForwardRefType_1.isForwardRefType)(Anchor)) {
|
|
8379
|
-
return (0, jsx_runtime_1.jsx)(Anchor, { ...params });
|
|
8380
|
-
}
|
|
8381
|
-
if (typeof Anchor === 'function') {
|
|
8382
|
-
return Anchor(params);
|
|
8383
|
-
}
|
|
8384
|
-
return null;
|
|
8385
|
-
};
|
|
8386
8331
|
const { ref: containerRef, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
8387
8332
|
useDidUpdate(reset, [filter, internalValue]);
|
|
8388
8333
|
(0, fuselage_hooks_1.useOutsideClick)([containerRef], removeFocusClass);
|
|
@@ -8399,18 +8344,10 @@ const SelectLegacy = (0, react_1.forwardRef)(function SelectLegacy({ value, filt
|
|
|
8399
8344
|
return show();
|
|
8400
8345
|
});
|
|
8401
8346
|
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), ...props, children: [(0, jsx_runtime_1.jsxs)(Wrapper, { display: 'flex', mi: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText, children: [visibleText &&
|
|
8402
|
-
(RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { role: 'option', value: getValue(option), label: valueLabel, onClick: internalChangedByClick }, getValue(option))) : ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexGrow: 1, is: 'span', mi: 4, "rcx-select__item": true, fontScale: 'p2', color: valueLabel ? 'default' : 'hint', children: visibleText }))),
|
|
8403
|
-
ref: anchorRef,
|
|
8404
|
-
children: !value ? option || placeholder : null,
|
|
8405
|
-
disabled: disabled ?? false,
|
|
8406
|
-
onClick: show,
|
|
8407
|
-
onBlur: hide,
|
|
8408
|
-
onKeyDown: handleKeyDown,
|
|
8409
|
-
onKeyUp: handleKeyUp,
|
|
8410
|
-
}), (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
|
|
8347
|
+
(RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { role: 'option', value: getValue(option), label: valueLabel, onClick: internalChangedByClick }, getValue(option))) : ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexGrow: 1, is: 'span', mi: 4, "rcx-select__item": true, fontScale: 'p2', color: valueLabel ? 'default' : 'hint', children: visibleText }))), (0, jsx_runtime_1.jsx)(Anchor, { ref: anchorRef, disabled: disabled ?? false, onClick: show, onBlur: hide, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: !value ? option || placeholder : null }), (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
|
|
8411
8348
|
? 'chevron-up'
|
|
8412
8349
|
: addonIcon || 'chevron-down', size: 'x20' }) }) })] }), (0, jsx_runtime_1.jsx)(PositionAnimated_1.PositionAnimated, { visible: visible, anchor: containerRef, children: (0, jsx_runtime_1.jsx)(_Options, { width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: filteredOptions, onSelect: internalChangedByClick, renderItem: renderItem, cursor: cursor, customEmpty: customEmpty }) })] }));
|
|
8413
|
-
}
|
|
8350
|
+
};
|
|
8414
8351
|
exports["default"] = SelectLegacy;
|
|
8415
8352
|
|
|
8416
8353
|
|
|
@@ -8424,12 +8361,11 @@ exports["default"] = SelectLegacy;
|
|
|
8424
8361
|
|
|
8425
8362
|
|
|
8426
8363
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8427
|
-
exports.SelectTrigger =
|
|
8364
|
+
exports.SelectTrigger = SelectTrigger;
|
|
8428
8365
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8429
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8430
8366
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
8431
8367
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8432
|
-
|
|
8368
|
+
function SelectTrigger({ ref, small, error, isDisabled, focus, id, ...props }) {
|
|
8433
8369
|
const { buttonProps } = (0, react_aria_1.useButton)(props, ref);
|
|
8434
8370
|
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { ...buttonProps, id: id, "rcx-select": true, ref: ref, is: 'button', display: 'flex', flexDirection: 'row', fontScale: 'p2', justifyContent: 'space-between', "rcx-input-box--small": small, className: [
|
|
8435
8371
|
error && 'invalid',
|
|
@@ -8438,7 +8374,7 @@ exports.SelectTrigger = (0, react_1.forwardRef)(({ small, error, isDisabled, foc
|
|
|
8438
8374
|
]
|
|
8439
8375
|
.filter(Boolean)
|
|
8440
8376
|
.join(' '), children: props.children }));
|
|
8441
|
-
}
|
|
8377
|
+
}
|
|
8442
8378
|
|
|
8443
8379
|
|
|
8444
8380
|
/***/ },
|
|
@@ -8481,7 +8417,7 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
8481
8417
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
8482
8418
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8483
8419
|
const SelectInputPlaceholder_1 = __importDefault(__webpack_require__(/*! ./SelectInputPlaceholder */ "./src/components/SelectInput/SelectInputPlaceholder.tsx"));
|
|
8484
|
-
|
|
8420
|
+
function SelectInput({ ref, children, multiple, placeholder, onChange, ...props }) {
|
|
8485
8421
|
const [isPlaceholderVisible, setPlaceholderVisible] = (0, react_1.useState)(!props.value && !props.defaultValue);
|
|
8486
8422
|
const handleChange = (0, react_1.useCallback)((event) => {
|
|
8487
8423
|
setPlaceholderVisible(!event.currentTarget.value);
|
|
@@ -8490,8 +8426,8 @@ const SelectInput = (0, react_1.forwardRef)(function SelectInput({ children, mul
|
|
|
8490
8426
|
if (multiple) {
|
|
8491
8427
|
return ((0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { children: children, ...props, multiple: true, type: 'select', onChange: handleChange }));
|
|
8492
8428
|
}
|
|
8493
|
-
return ((0, jsx_runtime_1.jsxs)(InputBox_1.InputBox, { placeholderVisible: isPlaceholderVisible ? !!placeholder : undefined, ref: ref, ...props,
|
|
8494
|
-
}
|
|
8429
|
+
return ((0, jsx_runtime_1.jsxs)(InputBox_1.InputBox, { placeholderVisible: isPlaceholderVisible ? !!placeholder : undefined, ref: ref, ...props, endAddon: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: 'chevron-down', size: 'x20' }), type: 'select', onChange: handleChange, children: [placeholder && ((0, jsx_runtime_1.jsx)(SelectInputPlaceholder_1.default, { value: '', children: placeholder })), children] }));
|
|
8430
|
+
}
|
|
8495
8431
|
exports["default"] = SelectInput;
|
|
8496
8432
|
|
|
8497
8433
|
|
|
@@ -8506,11 +8442,10 @@ exports["default"] = SelectInput;
|
|
|
8506
8442
|
|
|
8507
8443
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8508
8444
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8509
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8510
8445
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8511
|
-
|
|
8512
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__option": true,
|
|
8513
|
-
}
|
|
8446
|
+
function SelectInputOption(props) {
|
|
8447
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__option": true, ...props });
|
|
8448
|
+
}
|
|
8514
8449
|
exports["default"] = SelectInputOption;
|
|
8515
8450
|
|
|
8516
8451
|
|
|
@@ -8525,11 +8460,10 @@ exports["default"] = SelectInputOption;
|
|
|
8525
8460
|
|
|
8526
8461
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8527
8462
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8528
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8529
8463
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8530
|
-
|
|
8531
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__placeholder": true,
|
|
8532
|
-
}
|
|
8464
|
+
function SelectInputPlaceholder(props) {
|
|
8465
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__placeholder": true, ...props });
|
|
8466
|
+
}
|
|
8533
8467
|
exports["default"] = SelectInputPlaceholder;
|
|
8534
8468
|
|
|
8535
8469
|
|
|
@@ -8678,17 +8612,17 @@ exports["default"] = Sidebar;
|
|
|
8678
8612
|
|
|
8679
8613
|
|
|
8680
8614
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8681
|
-
exports.
|
|
8615
|
+
exports.SidebarActions = SidebarActions;
|
|
8616
|
+
exports.SidebarAction = SidebarAction;
|
|
8682
8617
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8683
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8684
8618
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
8685
8619
|
const ButtonGroup_1 = __webpack_require__(/*! ../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
8686
|
-
|
|
8687
|
-
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, {
|
|
8688
|
-
}
|
|
8689
|
-
|
|
8690
|
-
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true,
|
|
8691
|
-
}
|
|
8620
|
+
function SidebarActions(props) {
|
|
8621
|
+
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { ...props });
|
|
8622
|
+
}
|
|
8623
|
+
function SidebarAction(props) {
|
|
8624
|
+
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true, ...props });
|
|
8625
|
+
}
|
|
8692
8626
|
|
|
8693
8627
|
|
|
8694
8628
|
/***/ },
|
|
@@ -8779,13 +8713,12 @@ exports.TopBar = TopBar;
|
|
|
8779
8713
|
|
|
8780
8714
|
|
|
8781
8715
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8782
|
-
exports.TopBarAction =
|
|
8716
|
+
exports.TopBarAction = TopBarAction;
|
|
8783
8717
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8784
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8785
8718
|
const SidebarActions_1 = __webpack_require__(/*! ../SidebarActions */ "./src/components/Sidebar/SidebarActions.tsx");
|
|
8786
|
-
|
|
8787
|
-
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarAction, {
|
|
8788
|
-
}
|
|
8719
|
+
function TopBarAction(props) {
|
|
8720
|
+
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarAction, { ...props });
|
|
8721
|
+
}
|
|
8789
8722
|
|
|
8790
8723
|
|
|
8791
8724
|
/***/ },
|
|
@@ -8798,13 +8731,12 @@ exports.TopBarAction = (0, react_1.forwardRef)(function TopBarAction(props, ref)
|
|
|
8798
8731
|
|
|
8799
8732
|
|
|
8800
8733
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8801
|
-
exports.TopBarActions =
|
|
8734
|
+
exports.TopBarActions = TopBarActions;
|
|
8802
8735
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8803
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8804
8736
|
const SidebarActions_1 = __webpack_require__(/*! ../SidebarActions */ "./src/components/Sidebar/SidebarActions.tsx");
|
|
8805
|
-
|
|
8806
|
-
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarActions, {
|
|
8807
|
-
}
|
|
8737
|
+
function TopBarActions(props) {
|
|
8738
|
+
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarActions, { ...props });
|
|
8739
|
+
}
|
|
8808
8740
|
|
|
8809
8741
|
|
|
8810
8742
|
/***/ },
|
|
@@ -9019,17 +8951,18 @@ Object.defineProperty(exports, "SidebarDivider", ({ enumerable: true, get: funct
|
|
|
9019
8951
|
|
|
9020
8952
|
|
|
9021
8953
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9022
|
-
exports.Sidebar =
|
|
8954
|
+
exports.Sidebar = Sidebar;
|
|
9023
8955
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
8956
|
+
function Sidebar({ collapsed, className, ...props }) {
|
|
8957
|
+
return ((0, jsx_runtime_1.jsx)("nav", { className: [
|
|
8958
|
+
'rcx-box rcx-box--full rcx-sidebar-v2',
|
|
8959
|
+
'rcx-box--animated',
|
|
8960
|
+
collapsed && 'rcx-sidebar-v2--collapsed',
|
|
8961
|
+
className,
|
|
8962
|
+
]
|
|
8963
|
+
.filter(Boolean)
|
|
8964
|
+
.join(' '), ...props }));
|
|
8965
|
+
}
|
|
9033
8966
|
|
|
9034
8967
|
|
|
9035
8968
|
/***/ },
|
|
@@ -9100,11 +9033,10 @@ exports["default"] = SidebarAccordionItem;
|
|
|
9100
9033
|
|
|
9101
9034
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9102
9035
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9103
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
9104
9036
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
9105
|
-
|
|
9106
|
-
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true,
|
|
9107
|
-
}
|
|
9037
|
+
function SidebarAction(props) {
|
|
9038
|
+
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true, ...props });
|
|
9039
|
+
}
|
|
9108
9040
|
exports["default"] = SidebarAction;
|
|
9109
9041
|
|
|
9110
9042
|
|
|
@@ -9119,11 +9051,10 @@ exports["default"] = SidebarAction;
|
|
|
9119
9051
|
|
|
9120
9052
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9121
9053
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9122
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
9123
9054
|
const ButtonGroup_1 = __webpack_require__(/*! ../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
9124
|
-
|
|
9125
|
-
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, {
|
|
9126
|
-
}
|
|
9055
|
+
function SidebarActions(props) {
|
|
9056
|
+
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { ...props });
|
|
9057
|
+
}
|
|
9127
9058
|
exports["default"] = SidebarActions;
|
|
9128
9059
|
|
|
9129
9060
|
|
|
@@ -9171,12 +9102,11 @@ exports.SidebarButtonGroup = SidebarButtonGroup;
|
|
|
9171
9102
|
|
|
9172
9103
|
|
|
9173
9104
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9174
|
-
exports.SidebarCollapseGroup =
|
|
9105
|
+
exports.SidebarCollapseGroup = SidebarCollapseGroup;
|
|
9175
9106
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9176
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
9177
9107
|
const SidebarGroupTitle_1 = __webpack_require__(/*! ./SidebarGroupTitle */ "./src/components/SidebarV2/SidebarGroupTitle.tsx");
|
|
9178
9108
|
const useCollapse_1 = __webpack_require__(/*! ./hooks/useCollapse */ "./src/components/SidebarV2/hooks/useCollapse.tsx");
|
|
9179
|
-
|
|
9109
|
+
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, title, ...props }) {
|
|
9180
9110
|
const { barProps, expanded, panelExpanded, panelId, titleId } = (0, useCollapse_1.useCollapse)({
|
|
9181
9111
|
expanded: propExpanded,
|
|
9182
9112
|
defaultExpanded,
|
|
@@ -9188,7 +9118,7 @@ exports.SidebarCollapseGroup = (0, react_1.forwardRef)(({ expanded: propExpanded
|
|
|
9188
9118
|
]
|
|
9189
9119
|
.filter(Boolean)
|
|
9190
9120
|
.join(' '), id: panelId, children: children })] }));
|
|
9191
|
-
}
|
|
9121
|
+
}
|
|
9192
9122
|
|
|
9193
9123
|
|
|
9194
9124
|
/***/ },
|
|
@@ -9535,15 +9465,16 @@ exports.SidebarItemTitle = SidebarItemTitle;
|
|
|
9535
9465
|
|
|
9536
9466
|
|
|
9537
9467
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9538
|
-
exports.SidebarListItem =
|
|
9468
|
+
exports.SidebarListItem = SidebarListItem;
|
|
9539
9469
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9470
|
+
function SidebarListItem({ className, children, ...props }) {
|
|
9471
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: 'listitem', className: [
|
|
9472
|
+
'rcx-box rcx-box--full rcx-sidebar-item__list-item',
|
|
9473
|
+
className,
|
|
9474
|
+
]
|
|
9475
|
+
.filter(Boolean)
|
|
9476
|
+
.join(' '), ...props, children: children }));
|
|
9477
|
+
}
|
|
9547
9478
|
|
|
9548
9479
|
|
|
9549
9480
|
/***/ },
|
|
@@ -9894,10 +9825,9 @@ exports["default"] = SidepanelHeaderTitle;
|
|
|
9894
9825
|
|
|
9895
9826
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9896
9827
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
});
|
|
9828
|
+
function SidepanelList({ className, ...props }) {
|
|
9829
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: 'list', className: ['rcx-sidepanel-list', className].filter(Boolean).join(' '), ...props }));
|
|
9830
|
+
}
|
|
9901
9831
|
exports["default"] = SidepanelList;
|
|
9902
9832
|
|
|
9903
9833
|
|
|
@@ -9912,12 +9842,11 @@ exports["default"] = SidepanelList;
|
|
|
9912
9842
|
|
|
9913
9843
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9914
9844
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
return ((0, jsx_runtime_1.jsx)("div", { role: 'listitem', ref: ref, className: ['rcx-sidepanel-list__item', className]
|
|
9845
|
+
function SidepanelListItem({ className, ...props }) {
|
|
9846
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: 'listitem', className: ['rcx-sidepanel-list__item', className]
|
|
9918
9847
|
.filter(Boolean)
|
|
9919
9848
|
.join(' '), ...props }));
|
|
9920
|
-
}
|
|
9849
|
+
}
|
|
9921
9850
|
exports["default"] = SidepanelListItem;
|
|
9922
9851
|
|
|
9923
9852
|
|
|
@@ -10043,7 +9972,7 @@ const useStyle_1 = __webpack_require__(/*! ../../hooks/useStyle */ "./src/hooks/
|
|
|
10043
9972
|
const SliderHead_1 = __webpack_require__(/*! ./SliderHead */ "./src/components/Slider/SliderHead.tsx");
|
|
10044
9973
|
const SliderThumb_1 = __webpack_require__(/*! ./SliderThumb */ "./src/components/Slider/SliderThumb.tsx");
|
|
10045
9974
|
const SliderTrack_1 = __webpack_require__(/*! ./SliderTrack */ "./src/components/Slider/SliderTrack.tsx");
|
|
10046
|
-
function Slider(
|
|
9975
|
+
function Slider({ ref, ...props }) {
|
|
10047
9976
|
const { label, formatOptions, showOutput = true, multiThumb, maxValue, minValue, } = props;
|
|
10048
9977
|
const getMultiThumbDefaultValue = () => {
|
|
10049
9978
|
if (multiThumb && !props.defaultValue) {
|
|
@@ -10090,7 +10019,7 @@ function Slider(props, ref) {
|
|
|
10090
10019
|
`, sliderState);
|
|
10091
10020
|
return ((0, jsx_runtime_1.jsxs)("div", { ...groupProps, ref: ref, className: slider, children: [(0, jsx_runtime_1.jsx)(SliderHead_1.SliderHead, { labelProps: labelProps, outputProps: outputProps, state: sliderState, showOutput: showOutput, label: label, multiThumb: multiThumb }), (0, jsx_runtime_1.jsxs)(SliderTrack_1.SliderTrack, { state: sliderState, trackProps: trackProps, trackRef: trackRef, multiThumb: multiThumb, children: [(0, jsx_runtime_1.jsx)(SliderThumb_1.SliderThumb, { index: 0, state: sliderState, trackRef: trackRef }), multiThumb && ((0, jsx_runtime_1.jsx)(SliderThumb_1.SliderThumb, { index: 1, state: sliderState, trackRef: trackRef }))] })] }));
|
|
10092
10021
|
}
|
|
10093
|
-
exports["default"] =
|
|
10022
|
+
exports["default"] = Slider;
|
|
10094
10023
|
|
|
10095
10024
|
|
|
10096
10025
|
/***/ },
|
|
@@ -10877,11 +10806,10 @@ exports["default"] = Tabs;
|
|
|
10877
10806
|
|
|
10878
10807
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10879
10808
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10880
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
10881
10809
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
10882
|
-
|
|
10883
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'button', "rcx-tabs__item": true, "rcx-tabs__item--selected": selected, "rcx-tabs__item--disabled": disabled, "rcx-tabs__item--selected--disabled": selected && disabled, "aria-selected": selected ? 'true' : 'false',
|
|
10884
|
-
}
|
|
10810
|
+
function TabsItem({ selected, disabled, ...props }) {
|
|
10811
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'button', "rcx-tabs__item": true, "rcx-tabs__item--selected": selected, "rcx-tabs__item--disabled": disabled, "rcx-tabs__item--selected--disabled": selected && disabled, "aria-selected": selected ? 'true' : 'false', role: 'tab', ...props }));
|
|
10812
|
+
}
|
|
10885
10813
|
exports["default"] = TabsItem;
|
|
10886
10814
|
|
|
10887
10815
|
|
|
@@ -10964,11 +10892,10 @@ Object.defineProperty(exports, "Tag", ({ enumerable: true, get: function () { re
|
|
|
10964
10892
|
|
|
10965
10893
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10966
10894
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10967
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
10968
10895
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
10969
|
-
|
|
10970
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'tel',
|
|
10971
|
-
}
|
|
10896
|
+
function TelephoneInput(props) {
|
|
10897
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'tel', ...props });
|
|
10898
|
+
}
|
|
10972
10899
|
exports["default"] = TelephoneInput;
|
|
10973
10900
|
|
|
10974
10901
|
|
|
@@ -11001,11 +10928,10 @@ Object.defineProperty(exports, "TelephoneInput", ({ enumerable: true, get: funct
|
|
|
11001
10928
|
|
|
11002
10929
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11003
10930
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11004
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11005
10931
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
11006
|
-
|
|
11007
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'textarea',
|
|
11008
|
-
}
|
|
10932
|
+
function TextAreaInput(props) {
|
|
10933
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'textarea', ...props });
|
|
10934
|
+
}
|
|
11009
10935
|
exports["default"] = TextAreaInput;
|
|
11010
10936
|
|
|
11011
10937
|
|
|
@@ -11038,11 +10964,10 @@ Object.defineProperty(exports, "TextAreaInput", ({ enumerable: true, get: functi
|
|
|
11038
10964
|
|
|
11039
10965
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11040
10966
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11041
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11042
10967
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
11043
|
-
|
|
11044
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'text',
|
|
11045
|
-
}
|
|
10968
|
+
function TextInput(props) {
|
|
10969
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'text', ...props });
|
|
10970
|
+
}
|
|
11046
10971
|
exports["default"] = TextInput;
|
|
11047
10972
|
|
|
11048
10973
|
|
|
@@ -11076,7 +11001,6 @@ Object.defineProperty(exports, "TextInput", ({ enumerable: true, get: function (
|
|
|
11076
11001
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11077
11002
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11078
11003
|
const css_in_js_1 = __webpack_require__(/*! @rocket.chat/css-in-js */ "@rocket.chat/css-in-js");
|
|
11079
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11080
11004
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
11081
11005
|
function Circle({ disabled, circleCount, iteration, inheritColor, ...props }) {
|
|
11082
11006
|
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', className: (0, css_in_js_1.css) `
|
|
@@ -11084,9 +11008,9 @@ function Circle({ disabled, circleCount, iteration, inheritColor, ...props }) {
|
|
|
11084
11008
|
animation-delay: ${iteration * 0.16}s;
|
|
11085
11009
|
`, "rcx-throbber__circle": true, "rcx-throbber__circle--disabled": disabled, "rcx-throbber__circle--inherit-color": inheritColor, ...props }));
|
|
11086
11010
|
}
|
|
11087
|
-
|
|
11088
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-throbber": true,
|
|
11089
|
-
}
|
|
11011
|
+
function Throbber({ disabled, size = 'x16', circleCount = 3, inheritColor, ...props }) {
|
|
11012
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-throbber": true, ...props, children: Array.from({ length: circleCount || 3 }, (_, iteration) => ((0, jsx_runtime_1.jsx)(Circle, { circleCount: circleCount, iteration: iteration, disabled: !!disabled, size: size, inheritColor: !!inheritColor }, iteration))) }));
|
|
11013
|
+
}
|
|
11090
11014
|
exports["default"] = Throbber;
|
|
11091
11015
|
|
|
11092
11016
|
|
|
@@ -11119,11 +11043,10 @@ Object.defineProperty(exports, "Throbber", ({ enumerable: true, get: function ()
|
|
|
11119
11043
|
|
|
11120
11044
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11121
11045
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11122
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11123
11046
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
11124
|
-
|
|
11125
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
11126
|
-
}
|
|
11047
|
+
function Tile({ elevation = '1', padding = 16, ...props }) {
|
|
11048
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-tile": true, "rcx-tile--elevation": elevation, padding: padding, ...props }));
|
|
11049
|
+
}
|
|
11127
11050
|
exports["default"] = Tile;
|
|
11128
11051
|
|
|
11129
11052
|
|
|
@@ -11233,11 +11156,10 @@ Object.defineProperty(exports, "ToastBar", ({ enumerable: true, get: function ()
|
|
|
11233
11156
|
|
|
11234
11157
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11235
11158
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11236
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11237
11159
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
11238
|
-
|
|
11239
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'label', className: className, "rcx-toggle-switch": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input',
|
|
11240
|
-
}
|
|
11160
|
+
function ToggleSwitch({ className, labelChildren, ...props }) {
|
|
11161
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'label', className: className, "rcx-toggle-switch": true, children: [labelChildren, (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'input', "rcx-toggle-switch__input": true, type: 'checkbox', ...props }), (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-toggle-switch__fake": true, "aria-hidden": 'true' })] }));
|
|
11162
|
+
}
|
|
11241
11163
|
exports["default"] = ToggleSwitch;
|
|
11242
11164
|
|
|
11243
11165
|
|
|
@@ -11270,7 +11192,6 @@ Object.defineProperty(exports, "ToggleSwitch", ({ enumerable: true, get: functio
|
|
|
11270
11192
|
|
|
11271
11193
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11272
11194
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11273
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11274
11195
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
11275
11196
|
const parsePlacement = (placement) => {
|
|
11276
11197
|
const [direction, position] = placement
|
|
@@ -11281,10 +11202,10 @@ const parsePlacement = (placement) => {
|
|
|
11281
11202
|
}
|
|
11282
11203
|
return [direction, position];
|
|
11283
11204
|
};
|
|
11284
|
-
|
|
11205
|
+
function Tooltip({ variation = 'dark', placement, ...props }) {
|
|
11285
11206
|
const [direction, position] = parsePlacement(placement);
|
|
11286
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div',
|
|
11287
|
-
}
|
|
11207
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-tooltip": true, "rcx-tooltip--dir": direction, "rcx-tooltip--pos": position, "rcx-tooltip--light": variation === 'light', "rcx-tooltip--dark": variation === 'dark', ...props }));
|
|
11208
|
+
}
|
|
11288
11209
|
exports["default"] = Tooltip;
|
|
11289
11210
|
|
|
11290
11211
|
|
|
@@ -11317,11 +11238,10 @@ Object.defineProperty(exports, "Tooltip", ({ enumerable: true, get: function ()
|
|
|
11317
11238
|
|
|
11318
11239
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11319
11240
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
11320
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
11321
11241
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
11322
|
-
|
|
11323
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'url',
|
|
11324
|
-
}
|
|
11242
|
+
function UrlInput(props) {
|
|
11243
|
+
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'url', ...props });
|
|
11244
|
+
}
|
|
11325
11245
|
exports["default"] = UrlInput;
|
|
11326
11246
|
|
|
11327
11247
|
|
|
@@ -11718,21 +11638,6 @@ const fromCamelToKebab = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])
|
|
|
11718
11638
|
exports.fromCamelToKebab = fromCamelToKebab;
|
|
11719
11639
|
|
|
11720
11640
|
|
|
11721
|
-
/***/ },
|
|
11722
|
-
|
|
11723
|
-
/***/ "./src/helpers/isForwardRefType.ts"
|
|
11724
|
-
/*!*****************************************!*\
|
|
11725
|
-
!*** ./src/helpers/isForwardRefType.ts ***!
|
|
11726
|
-
\*****************************************/
|
|
11727
|
-
(__unused_webpack_module, exports) {
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11731
|
-
exports.isForwardRefType = void 0;
|
|
11732
|
-
const isForwardRefType = (type) => type.$$typeof === Symbol.for('react.forward_ref');
|
|
11733
|
-
exports.isForwardRefType = isForwardRefType;
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
11641
|
/***/ },
|
|
11737
11642
|
|
|
11738
11643
|
/***/ "./src/helpers/patchChildren.ts"
|