@rocket.chat/fuselage 0.81.0 → 0.82.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/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/dist/components/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/components/AudioPlayer/AudioPlayerControls.d.ts +7 -0
- package/dist/components/AudioPlayer/AudioPlayerControls.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts +3 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +3 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts +3 -0
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/StylingBox.d.ts +6 -0
- package/dist/components/Box/StylingBox.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/Callout/Callout.d.ts +3 -0
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +7 -0
- package/dist/components/CodeSnippet/CodeSnippet.d.ts.map +1 -1
- package/dist/components/Contextualbar/Contextualbar.d.ts +3 -0
- package/dist/components/Contextualbar/Contextualbar.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/Contextualbar.d.ts +3 -0
- package/dist/components/ContextualbarV2/Contextualbar.d.ts.map +1 -1
- package/dist/components/EmailInput/EmailInput.d.ts +3 -0
- package/dist/components/EmailInput/EmailInput.d.ts.map +1 -1
- package/dist/components/Field/Field.d.ts +3 -0
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/FieldGroup/FieldGroup.d.ts +3 -0
- package/dist/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/dist/components/Flex/index.d.ts +0 -6
- package/dist/components/Flex/index.d.ts.map +1 -1
- package/dist/components/InputBox/InputBox.d.ts +7 -2
- package/dist/components/InputBox/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox/InputBoxAddon.d.ts +3 -0
- package/dist/components/InputBox/InputBoxAddon.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts +3 -0
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Margins/Margins.d.ts +3 -0
- package/dist/components/Margins/Margins.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +3 -0
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +6 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts +3 -16
- package/dist/components/MultiSelect/MultiSelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFilteredContext.d.ts +7 -0
- package/dist/components/MultiSelect/MultiSelectFilteredContext.d.ts.map +1 -0
- package/dist/components/NavBar/NavBarSection.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Option/Option.d.ts +3 -0
- package/dist/components/Option/Option.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts +3 -0
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts +3 -0
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts.map +1 -1
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts +19 -0
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts.map +1 -1
- package/dist/components/{Position → PositionAnimated}/Position.d.ts +2 -2
- package/dist/components/PositionAnimated/Position.d.ts.map +1 -0
- package/dist/components/PositionAnimated/PositionAnimated.d.ts +9 -3
- package/dist/components/PositionAnimated/PositionAnimated.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/Scrollable/Scrollable.d.ts +3 -0
- package/dist/components/Scrollable/Scrollable.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +3 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/SelectFiltered.d.ts +2 -2
- package/dist/components/Select/SelectFiltered.d.ts.map +1 -1
- package/dist/components/Select/SelectFilteredAnchor.d.ts +3 -13
- package/dist/components/Select/SelectFilteredAnchor.d.ts.map +1 -1
- package/dist/components/Select/SelectFilteredContext.d.ts +7 -0
- package/dist/components/Select/SelectFilteredContext.d.ts.map +1 -0
- package/dist/components/Select/SelectLegacy.d.ts +1 -1
- package/dist/components/Select/SelectLegacy.d.ts.map +1 -1
- package/dist/components/Sidebar/Item.d.ts +4 -14
- package/dist/components/Sidebar/Item.d.ts.map +1 -1
- package/dist/components/Sidebar/Section.d.ts +1 -3
- package/dist/components/Sidebar/Section.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -33
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBar.d.ts +3 -0
- package/dist/components/Sidebar/TopBar/TopBar.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/index.d.ts +0 -15
- package/dist/components/Sidebar/TopBar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Slider/Slider.d.ts +16 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/StatusBullet/StatusBullet.d.ts +3 -0
- package/dist/components/StatusBullet/StatusBullet.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +3 -4
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.d.ts +3 -0
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextInput/TextInput.d.ts +4 -5
- package/dist/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/Throbber/Throbber.d.ts +3 -0
- package/dist/components/Throbber/Throbber.d.ts.map +1 -1
- package/dist/components/ToastBar/ToastBar.d.ts +3 -0
- package/dist/components/ToastBar/ToastBar.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +330 -324
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +19 -19
- package/dist/helpers/composeClassNames.d.ts +32 -0
- package/dist/helpers/composeClassNames.d.ts.map +1 -1
- package/dist/helpers/exhaustiveCheck.d.ts +27 -0
- package/dist/helpers/exhaustiveCheck.d.ts.map +1 -1
- package/dist/styleTokens.d.ts +1 -0
- package/dist/styleTokens.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/components/Button/ActionButton.d.ts +0 -13
- package/dist/components/Button/ActionButton.d.ts.map +0 -1
- package/dist/components/Position/Position.d.ts.map +0 -1
- package/dist/components/Position/index.d.ts +0 -2
- package/dist/components/Position/index.d.ts.map +0 -1
- package/dist/components/SelectInput/SelectInput.d.ts +0 -5
- package/dist/components/SelectInput/SelectInput.d.ts.map +0 -1
- package/dist/components/SelectInput/SelectInputOption.d.ts +0 -6
- package/dist/components/SelectInput/SelectInputOption.d.ts.map +0 -1
- package/dist/components/SelectInput/SelectInputPlaceholder.d.ts +0 -6
- package/dist/components/SelectInput/SelectInputPlaceholder.d.ts.map +0 -1
- package/dist/components/SelectInput/index.d.ts +0 -3
- package/dist/components/SelectInput/index.d.ts.map +0 -1
- package/dist/components/TelephoneInput/TelephoneInput.d.ts +0 -5
- package/dist/components/TelephoneInput/TelephoneInput.d.ts.map +0 -1
- package/dist/components/TelephoneInput/index.d.ts +0 -2
- package/dist/components/TelephoneInput/index.d.ts.map +0 -1
|
@@ -2,17 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
if (process.env.NODE_ENV !== "production") {
|
|
4
4
|
(function() {
|
|
5
|
-
|
|
6
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
7
|
-
module.exports = factory(require("@rocket.chat/css-in-js"), require("@rocket.chat/fuselage-hooks"), require("@rocket.chat/fuselage-tokens/colors.json"), require("@rocket.chat/fuselage-tokens/dist/badge.json"), require("@rocket.chat/fuselage-tokens/dist/button.json"), require("@rocket.chat/fuselage-tokens/dist/font.json"), require("@rocket.chat/fuselage-tokens/dist/shadow.json"), require("@rocket.chat/fuselage-tokens/dist/status.json"), require("@rocket.chat/fuselage-tokens/dist/statusBullet.json"), require("@rocket.chat/fuselage-tokens/dist/stroke.json"), require("@rocket.chat/fuselage-tokens/dist/surface.json"), require("@rocket.chat/fuselage-tokens/typography.json"), require("@rocket.chat/icons"), require("@rocket.chat/memo"), require("invariant"), require("react"), require("react-aria"), require("react-dom"), require("react-is"), require("react-keyed-flatten-children"), require("react-stately"), require("react-virtuoso"), require("react/jsx-runtime"));
|
|
8
|
-
else if(typeof define === 'function' && define.amd)
|
|
9
|
-
define("RocketChatFuselage", ["@rocket.chat/css-in-js", "@rocket.chat/fuselage-hooks", "@rocket.chat/fuselage-tokens/colors.json", "@rocket.chat/fuselage-tokens/dist/badge.json", "@rocket.chat/fuselage-tokens/dist/button.json", "@rocket.chat/fuselage-tokens/dist/font.json", "@rocket.chat/fuselage-tokens/dist/shadow.json", "@rocket.chat/fuselage-tokens/dist/status.json", "@rocket.chat/fuselage-tokens/dist/statusBullet.json", "@rocket.chat/fuselage-tokens/dist/stroke.json", "@rocket.chat/fuselage-tokens/dist/surface.json", "@rocket.chat/fuselage-tokens/typography.json", "@rocket.chat/icons", "@rocket.chat/memo", "invariant", "react", "react-aria", "react-dom", "react-is", "react-keyed-flatten-children", "react-stately", "react-virtuoso", "react/jsx-runtime"], factory);
|
|
10
|
-
else if(typeof exports === 'object')
|
|
11
|
-
exports["RocketChatFuselage"] = factory(require("@rocket.chat/css-in-js"), require("@rocket.chat/fuselage-hooks"), require("@rocket.chat/fuselage-tokens/colors.json"), require("@rocket.chat/fuselage-tokens/dist/badge.json"), require("@rocket.chat/fuselage-tokens/dist/button.json"), require("@rocket.chat/fuselage-tokens/dist/font.json"), require("@rocket.chat/fuselage-tokens/dist/shadow.json"), require("@rocket.chat/fuselage-tokens/dist/status.json"), require("@rocket.chat/fuselage-tokens/dist/statusBullet.json"), require("@rocket.chat/fuselage-tokens/dist/stroke.json"), require("@rocket.chat/fuselage-tokens/dist/surface.json"), require("@rocket.chat/fuselage-tokens/typography.json"), require("@rocket.chat/icons"), require("@rocket.chat/memo"), require("invariant"), require("react"), require("react-aria"), require("react-dom"), require("react-is"), require("react-keyed-flatten-children"), require("react-stately"), require("react-virtuoso"), require("react/jsx-runtime"));
|
|
12
|
-
else
|
|
13
|
-
root["RocketChatFuselage"] = factory(root["@rocket.chat/css-in-js"], root["@rocket.chat/fuselage-hooks"], root["@rocket.chat/fuselage-tokens/colors.json"], root["@rocket.chat/fuselage-tokens/dist/badge.json"], root["@rocket.chat/fuselage-tokens/dist/button.json"], root["@rocket.chat/fuselage-tokens/dist/font.json"], root["@rocket.chat/fuselage-tokens/dist/shadow.json"], root["@rocket.chat/fuselage-tokens/dist/status.json"], root["@rocket.chat/fuselage-tokens/dist/statusBullet.json"], root["@rocket.chat/fuselage-tokens/dist/stroke.json"], root["@rocket.chat/fuselage-tokens/dist/surface.json"], root["@rocket.chat/fuselage-tokens/typography.json"], root["@rocket.chat/icons"], root["@rocket.chat/memo"], root["invariant"], root["react"], root["react-aria"], root["react-dom"], root["react-is"], root["react-keyed-flatten-children"], root["react-stately"], root["react-virtuoso"], root["react/jsx-runtime"]);
|
|
14
|
-
})(self, (__WEBPACK_EXTERNAL_MODULE__rocket_chat_css_in_js__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_hooks__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_colors_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_badge_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_button_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_font_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_shadow_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_status_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_statusBullet_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_stroke_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_surface_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_typography_json__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_icons__, __WEBPACK_EXTERNAL_MODULE__rocket_chat_memo__, __WEBPACK_EXTERNAL_MODULE_invariant__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_aria__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_react_is__, __WEBPACK_EXTERNAL_MODULE_react_keyed_flatten_children__, __WEBPACK_EXTERNAL_MODULE_react_stately__, __WEBPACK_EXTERNAL_MODULE_react_virtuoso__, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__) => {
|
|
15
|
-
return /******/ (() => { // webpackBootstrap
|
|
5
|
+
/******/ (() => { // webpackBootstrap
|
|
16
6
|
/******/ "use strict";
|
|
17
7
|
/******/ var __webpack_modules__ = ({
|
|
18
8
|
|
|
@@ -289,6 +279,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
289
279
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
290
280
|
const composeClassNames_1 = __webpack_require__(/*! ../../helpers/composeClassNames */ "./src/helpers/composeClassNames.ts");
|
|
291
281
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
282
|
+
/**
|
|
283
|
+
* An `Accordion` allows users to toggle the display of sections of content.
|
|
284
|
+
*/
|
|
292
285
|
const Accordion = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.StylingBox, { ...props, children: (0, jsx_runtime_1.jsx)("div", { className: (0, composeClassNames_1.cx)((0, composeClassNames_1.cxx)('rcx-box')('full', 'animated'), 'rcx-accordion'), children: children }) }));
|
|
293
286
|
exports["default"] = Accordion;
|
|
294
287
|
|
|
@@ -620,6 +613,13 @@ const Slider_1 = __webpack_require__(/*! ../Slider */ "./src/components/Slider/i
|
|
|
620
613
|
const getMaskTime = (durationTime) => new Date(durationTime * 1000)
|
|
621
614
|
.toISOString()
|
|
622
615
|
.slice(durationTime > 60 * 60 ? 11 : 14, 19);
|
|
616
|
+
/**
|
|
617
|
+
* Presentational, fully controlled audio controls (play/pause, seek, elapsed
|
|
618
|
+
* time, playback speed and optional download). It owns no `<audio>` element and
|
|
619
|
+
* no playback state, so it can be driven by any source — a local element or a
|
|
620
|
+
* shared/persistent one. `AudioPlayer` wraps this with its own element for the
|
|
621
|
+
* common self-contained case.
|
|
622
|
+
*/
|
|
623
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
624
|
? getMaskTime(currentTime)
|
|
625
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 }))] }));
|
|
@@ -683,12 +683,16 @@ const isSelectedValid = (value) => (selected) => {
|
|
|
683
683
|
? selected.value === value
|
|
684
684
|
: value.includes(selected.value);
|
|
685
685
|
};
|
|
686
|
+
/**
|
|
687
|
+
* An input for selection of options.
|
|
688
|
+
*/
|
|
686
689
|
function AutoComplete({ ref, value, filter, setFilter, options = [], renderItem, renderSelected: RenderSelected, onChange, renderEmpty, placeholder, error, disabled, multiple, onBlur: onBlurAction = () => { }, ...props }) {
|
|
687
690
|
const innerRef = (0, react_1.useRef)(null);
|
|
688
691
|
const mergedRefs = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
689
692
|
const { ref: containerRef, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
690
693
|
const [selected, setSelected] = (0, react_1.useState)(() => getSelected(value, options) || []);
|
|
691
694
|
(0, react_1.useEffect)(() => {
|
|
695
|
+
// Validates if selected items are still valid after value changes
|
|
692
696
|
setSelected((selected) => {
|
|
693
697
|
return !selected.every(isSelectedValid(value))
|
|
694
698
|
? selected.filter(isSelectedValid(value))
|
|
@@ -864,6 +868,9 @@ Object.defineProperty(exports, "AvatarStack", ({ enumerable: true, get: function
|
|
|
864
868
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
865
869
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
866
870
|
const prependClassName_1 = __webpack_require__(/*! ../../helpers/prependClassName */ "./src/helpers/prependClassName.ts");
|
|
871
|
+
/**
|
|
872
|
+
* Communicates notification’s amount and types.
|
|
873
|
+
*/
|
|
867
874
|
function Badge({ is: Tag = 'span', variant = 'secondary', small, className, disabled, ...props }) {
|
|
868
875
|
const modifiers = [variant, small && 'small', disabled && 'disabled']
|
|
869
876
|
.filter(Boolean)
|
|
@@ -1035,6 +1042,12 @@ exports.StylingBox = void 0;
|
|
|
1035
1042
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
1036
1043
|
const useArrayLikeClassNameProp_1 = __webpack_require__(/*! ../../hooks/useArrayLikeClassNameProp */ "./src/hooks/useArrayLikeClassNameProp.ts");
|
|
1037
1044
|
const useStylingProps_1 = __webpack_require__(/*! ./useStylingProps */ "./src/components/Box/useStylingProps.ts");
|
|
1045
|
+
/**
|
|
1046
|
+
* Merges its `StylingProps` props into a `className` prop passed to a child element.
|
|
1047
|
+
*
|
|
1048
|
+
* This is intended to be used as a wrapper for components that accept styling props but don't need the weight of the
|
|
1049
|
+
* `Box` component prop handling internally.
|
|
1050
|
+
*/
|
|
1038
1051
|
const StylingBox = ({ children, ...props }) => {
|
|
1039
1052
|
const propsWithStringClassName = (0, useArrayLikeClassNameProp_1.useArrayLikeClassNameProp)(props);
|
|
1040
1053
|
propsWithStringClassName.className = [
|
|
@@ -1538,34 +1551,6 @@ var Bubble_1 = __webpack_require__(/*! ./Bubble */ "./src/components/Bubble/Bubb
|
|
|
1538
1551
|
Object.defineProperty(exports, "Bubble", ({ enumerable: true, get: function () { return __importDefault(Bubble_1).default; } }));
|
|
1539
1552
|
|
|
1540
1553
|
|
|
1541
|
-
/***/ },
|
|
1542
|
-
|
|
1543
|
-
/***/ "./src/components/Button/ActionButton.tsx"
|
|
1544
|
-
/*!************************************************!*\
|
|
1545
|
-
!*** ./src/components/Button/ActionButton.tsx ***!
|
|
1546
|
-
\************************************************/
|
|
1547
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1551
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1552
|
-
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1553
|
-
const _1 = __webpack_require__(/*! . */ "./src/components/Button/index.ts");
|
|
1554
|
-
const getSize = ({ tiny, mini, small }) => {
|
|
1555
|
-
if (mini) {
|
|
1556
|
-
return 'x16';
|
|
1557
|
-
}
|
|
1558
|
-
if (tiny || small) {
|
|
1559
|
-
return 'x20';
|
|
1560
|
-
}
|
|
1561
|
-
return 'x20';
|
|
1562
|
-
};
|
|
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
|
-
}
|
|
1566
|
-
exports["default"] = ActionButton;
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
1554
|
/***/ },
|
|
1570
1555
|
|
|
1571
1556
|
/***/ "./src/components/Button/Button.tsx"
|
|
@@ -1580,6 +1565,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
1580
1565
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
1581
1566
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
1582
1567
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1568
|
+
/**
|
|
1569
|
+
* Indicates an actionable user action.
|
|
1570
|
+
*/
|
|
1583
1571
|
function Button({ ref, primary, secondary, danger, warning, success, external, icon, is = 'button', rel: _rel, tiny, mini, small, medium, large, square, loading, disabled, children, ...props }) {
|
|
1584
1572
|
const extraProps = (is === 'a' && {
|
|
1585
1573
|
rel: external ? 'noopener noreferrer' : undefined,
|
|
@@ -1692,11 +1680,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1692
1680
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1693
1681
|
};
|
|
1694
1682
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1695
|
-
exports.IconButton = exports.
|
|
1683
|
+
exports.IconButton = exports.Button = void 0;
|
|
1696
1684
|
var Button_1 = __webpack_require__(/*! ./Button */ "./src/components/Button/Button.tsx");
|
|
1697
1685
|
Object.defineProperty(exports, "Button", ({ enumerable: true, get: function () { return __importDefault(Button_1).default; } }));
|
|
1698
|
-
var ActionButton_1 = __webpack_require__(/*! ./ActionButton */ "./src/components/Button/ActionButton.tsx");
|
|
1699
|
-
Object.defineProperty(exports, "ActionButton", ({ enumerable: true, get: function () { return __importDefault(ActionButton_1).default; } }));
|
|
1700
1686
|
var IconButton_1 = __webpack_require__(/*! ./IconButton */ "./src/components/Button/IconButton.tsx");
|
|
1701
1687
|
Object.defineProperty(exports, "IconButton", ({ enumerable: true, get: function () { return __importDefault(IconButton_1).default; } }));
|
|
1702
1688
|
|
|
@@ -1712,6 +1698,9 @@ Object.defineProperty(exports, "IconButton", ({ enumerable: true, get: function
|
|
|
1712
1698
|
|
|
1713
1699
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1714
1700
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1701
|
+
/**
|
|
1702
|
+
* A container for grouping buttons that semantically share a common action context.
|
|
1703
|
+
*/
|
|
1715
1704
|
function ButtonGroup({ align = 'start', children, stretch, vertical, wrap, small, large, className, ...props }) {
|
|
1716
1705
|
return ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
1717
1706
|
'rcx-button-group',
|
|
@@ -1762,6 +1751,9 @@ const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */
|
|
|
1762
1751
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
1763
1752
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1764
1753
|
const WRAPPER_LIMIT_SIZE = 420;
|
|
1754
|
+
/**
|
|
1755
|
+
* The `Callout` is used to get the user's attention explaining something important in the content of the current page.
|
|
1756
|
+
*/
|
|
1765
1757
|
const Callout = ({ type, title, children, icon, className, actions, ...props }) => {
|
|
1766
1758
|
const { ref, borderBoxSize } = (0, fuselage_hooks_1.useResizeObserver)();
|
|
1767
1759
|
const isLarge = borderBoxSize.inlineSize && borderBoxSize.inlineSize >= WRAPPER_LIMIT_SIZE;
|
|
@@ -2160,6 +2152,13 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2160
2152
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2161
2153
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
2162
2154
|
const Skeleton_1 = __webpack_require__(/*! ../Skeleton */ "./src/components/Skeleton/index.ts");
|
|
2155
|
+
/**
|
|
2156
|
+
* The `CodeSnippet` is used to show code or commands and make easier to copy them.
|
|
2157
|
+
*
|
|
2158
|
+
* The default button text is `Copy` but you can use the `buttonText` prop to handle translations in your project.
|
|
2159
|
+
*
|
|
2160
|
+
* Please check the `useClipBoard` hook in `fuselage-hooks` package, to handle the copy behaviour.
|
|
2161
|
+
*/
|
|
2163
2162
|
const CodeSnippet = ({ children, onClick, buttonText = 'Copy', buttonDisabled = false, ...props }) => {
|
|
2164
2163
|
if (!children) {
|
|
2165
2164
|
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'pre', "rcx-code-snippet": true, ...props, children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { w: '100%', "aria-hidden": true, "aria-busy": true }) }));
|
|
@@ -2200,6 +2199,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2200
2199
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2201
2200
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2202
2201
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2202
|
+
/**
|
|
2203
|
+
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2204
|
+
*/
|
|
2203
2205
|
function Contextualbar({ width, position, bg = 'room', ...props }) {
|
|
2204
2206
|
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
2207
|
}
|
|
@@ -2467,6 +2469,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2467
2469
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2468
2470
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2469
2471
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2472
|
+
/**
|
|
2473
|
+
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2474
|
+
*/
|
|
2470
2475
|
function Contextualbar({ width, position, bg = 'room', ...props }) {
|
|
2471
2476
|
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
2477
|
}
|
|
@@ -2871,6 +2876,9 @@ Object.defineProperty(exports, "Dropdown", ({ enumerable: true, get: function ()
|
|
|
2871
2876
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2872
2877
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2873
2878
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
2879
|
+
/**
|
|
2880
|
+
* An input for email addresses.
|
|
2881
|
+
*/
|
|
2874
2882
|
function EmailInput(props) {
|
|
2875
2883
|
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'email', ...props });
|
|
2876
2884
|
}
|
|
@@ -2910,6 +2918,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2910
2918
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2911
2919
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2912
2920
|
exports.FieldContext = (0, react_1.createContext)(false);
|
|
2921
|
+
/**
|
|
2922
|
+
* A `Field` is a wrapper representing an entry in a form.
|
|
2923
|
+
*/
|
|
2913
2924
|
function Field(props) {
|
|
2914
2925
|
return ((0, jsx_runtime_1.jsx)(exports.FieldContext.Provider, { value: true, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-field": true, ...props }) }));
|
|
2915
2926
|
}
|
|
@@ -3158,6 +3169,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
3158
3169
|
const appendClassName_1 = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
3159
3170
|
const patchChildren_1 = __webpack_require__(/*! ../../helpers/patchChildren */ "./src/helpers/patchChildren.ts");
|
|
3160
3171
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3172
|
+
/**
|
|
3173
|
+
* A container for grouping fields that semantically share a common data context.
|
|
3174
|
+
*/
|
|
3161
3175
|
const FieldGroup = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'fieldset', "rcx-field-group": true, role: 'group', ...props, children: (0, patchChildren_1.patchChildren)(children, (childProps) => ({
|
|
3162
3176
|
className: (0, appendClassName_1.appendClassName)(childProps.className, 'rcx-field-group__item'),
|
|
3163
3177
|
})) }));
|
|
@@ -3284,17 +3298,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3284
3298
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3285
3299
|
};
|
|
3286
3300
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3287
|
-
exports.
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
var
|
|
3291
|
-
Object.defineProperty(exports, "
|
|
3292
|
-
var FlexItem_2 = __webpack_require__(/*! ./FlexItem */ "./src/components/Flex/FlexItem.tsx");
|
|
3293
|
-
Object.defineProperty(exports, "FlexItem", ({ enumerable: true, get: function () { return __importDefault(FlexItem_2).default; } }));
|
|
3294
|
-
exports.Flex = {
|
|
3295
|
-
Container: FlexContainer_1.default,
|
|
3296
|
-
Item: FlexItem_1.default,
|
|
3297
|
-
};
|
|
3301
|
+
exports.FlexItem = exports.FlexContainer = void 0;
|
|
3302
|
+
var FlexContainer_1 = __webpack_require__(/*! ./FlexContainer */ "./src/components/Flex/FlexContainer.tsx");
|
|
3303
|
+
Object.defineProperty(exports, "FlexContainer", ({ enumerable: true, get: function () { return __importDefault(FlexContainer_1).default; } }));
|
|
3304
|
+
var FlexItem_1 = __webpack_require__(/*! ./FlexItem */ "./src/components/Flex/FlexItem.tsx");
|
|
3305
|
+
Object.defineProperty(exports, "FlexItem", ({ enumerable: true, get: function () { return __importDefault(FlexItem_1).default; } }));
|
|
3298
3306
|
|
|
3299
3307
|
|
|
3300
3308
|
/***/ },
|
|
@@ -3466,10 +3474,17 @@ const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.t
|
|
|
3466
3474
|
const Input_1 = __importDefault(__webpack_require__(/*! ./Input */ "./src/components/InputBox/Input.tsx"));
|
|
3467
3475
|
const InputBoxAddon_1 = __importDefault(__webpack_require__(/*! ./InputBoxAddon */ "./src/components/InputBox/InputBoxAddon.tsx"));
|
|
3468
3476
|
const InputBoxWrapper_1 = __importDefault(__webpack_require__(/*! ./InputBoxWrapper */ "./src/components/InputBox/InputBoxWrapper.tsx"));
|
|
3469
|
-
|
|
3477
|
+
/**
|
|
3478
|
+
* A decorated input control with support for addons.
|
|
3479
|
+
*
|
|
3480
|
+
* Usually you'll perfer to use `-Input` (e.g. <LinkTo kind='Forms/TextInput' story='Default'>`TextInput`</LinkTo>)
|
|
3481
|
+
* components over this one because it works as a construction block for them.
|
|
3482
|
+
*/
|
|
3483
|
+
// eslint-disable-next-line complexity
|
|
3484
|
+
function InputBox({ ref, className, startAddon, endAddon, error, hidden, invisible, multiple, placeholderVisible, type = 'text', small, onChange, ...props }) {
|
|
3470
3485
|
const innerRef = (0, react_1.useRef)(null);
|
|
3471
3486
|
const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, innerRef);
|
|
3472
|
-
let defaultAddon = endAddon
|
|
3487
|
+
let defaultAddon = endAddon;
|
|
3473
3488
|
(0, react_1.useLayoutEffect)(() => {
|
|
3474
3489
|
if (innerRef.current && innerRef.current.setCustomValidity) {
|
|
3475
3490
|
innerRef.current.setCustomValidity(error || '');
|
|
@@ -3520,6 +3535,9 @@ exports["default"] = InputBox;
|
|
|
3520
3535
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3521
3536
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3522
3537
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3538
|
+
/**
|
|
3539
|
+
* An addon for the input box.
|
|
3540
|
+
*/
|
|
3523
3541
|
function InputBoxAddon(props) {
|
|
3524
3542
|
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-input-box__addon": true, ...props });
|
|
3525
3543
|
}
|
|
@@ -3596,6 +3614,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
3596
3614
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3597
3615
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3598
3616
|
const LabelContext = (0, react_1.createContext)(false);
|
|
3617
|
+
/**
|
|
3618
|
+
* A caption for an input component.
|
|
3619
|
+
*/
|
|
3599
3620
|
function Label({ disabled, is, required, children, ...props }) {
|
|
3600
3621
|
const isInsideLabel = (0, react_1.useContext)(LabelContext);
|
|
3601
3622
|
const component = is || (isInsideLabel && 'span') || 'label';
|
|
@@ -3658,6 +3679,9 @@ const patchChildren_1 = __webpack_require__(/*! ../../helpers/patchChildren */ "
|
|
|
3658
3679
|
const useStyle_1 = __webpack_require__(/*! ../../hooks/useStyle */ "./src/hooks/useStyle.ts");
|
|
3659
3680
|
const styleTokens_1 = __webpack_require__(/*! ../../styleTokens */ "./src/styleTokens.ts");
|
|
3660
3681
|
const BoxTransforms_1 = __webpack_require__(/*! ../Box/BoxTransforms */ "./src/components/Box/BoxTransforms.ts");
|
|
3682
|
+
/**
|
|
3683
|
+
* Add margins to the wrapped component.
|
|
3684
|
+
*/
|
|
3661
3685
|
const Margins = (props) => {
|
|
3662
3686
|
const { children, className, all, block, blockStart, blockEnd, inline, inlineStart, inlineEnd, } = props;
|
|
3663
3687
|
const transformFn = (0, react_1.useCallback)((props) => {
|
|
@@ -3842,6 +3866,8 @@ const MenuOption_1 = __importDefault(__webpack_require__(/*! ./MenuOption */ "./
|
|
|
3842
3866
|
function MenuItem({ item, state }) {
|
|
3843
3867
|
const ref = (0, react_1.useRef)(null);
|
|
3844
3868
|
const { menuItemProps: { onPointerUp, ...menuItemProps }, isFocused, isDisabled, } = (0, react_aria_1.useMenuItem)({ key: item.key }, state, ref);
|
|
3869
|
+
// There's an issue caused by conflicting event handlers. The popover opens on onPointerDown and the selection event for both, the menu (listbox), happens on onPointerUp.
|
|
3870
|
+
// As a workaround, we are overwriting `onPointerDown` event with `onPointerUp`
|
|
3845
3871
|
return ((0, jsx_runtime_1.jsxs)(MenuOption_1.default, { ...(0, react_aria_1.mergeProps)(menuItemProps, { onPointerDown: onPointerUp }), ref: ref, focus: isFocused, disabled: isDisabled, is: 'label', variant: item.value?.variant, children: [(0, jsx_runtime_1.jsx)("div", { className: 'rcx-option__wrapper', children: item.rendered }), item.value && item.value.description && ((0, jsx_runtime_1.jsx)(_1.MenuItemDescription, { children: item.value.description }))] }));
|
|
3846
3872
|
}
|
|
3847
3873
|
exports["default"] = MenuItem;
|
|
@@ -3933,6 +3959,7 @@ function MenuSection({ section, state, }) {
|
|
|
3933
3959
|
const { separatorProps } = (0, react_aria_1.useSeparator)({
|
|
3934
3960
|
elementType: 'span',
|
|
3935
3961
|
});
|
|
3962
|
+
// If the section is not the first, add a separator element.
|
|
3936
3963
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [section.key !== state.collection.getFirstKey() && ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { ...separatorProps })), (0, jsx_runtime_1.jsxs)("div", { ...itemProps, children: [section.rendered && ((0, jsx_runtime_1.jsx)(Option_1.OptionTitle, { ...headingProps, children: section.rendered })), (0, jsx_runtime_1.jsx)(Box_1.Box, { ...groupProps, p: '0', children: [...section.childNodes].map((node) => ((0, jsx_runtime_1.jsx)(MenuItem_1.default, { item: node, state: state }, node.key))) })] })] }));
|
|
3937
3964
|
}
|
|
3938
3965
|
exports["default"] = MenuSection;
|
|
@@ -3950,6 +3977,7 @@ exports["default"] = MenuSection;
|
|
|
3950
3977
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3951
3978
|
exports.getPlacement = void 0;
|
|
3952
3979
|
const getPlacement = (placement) => {
|
|
3980
|
+
// switch case for placement from usePosition placement to react-aria
|
|
3953
3981
|
switch (placement) {
|
|
3954
3982
|
case 'bottom':
|
|
3955
3983
|
return 'bottom';
|
|
@@ -5878,10 +5906,13 @@ const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.t
|
|
|
5878
5906
|
const Margins_1 = __webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts");
|
|
5879
5907
|
const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
5880
5908
|
const Options_1 = __webpack_require__(/*! ../Options */ "./src/components/Options/index.ts");
|
|
5881
|
-
const
|
|
5909
|
+
const PositionAnimated_1 = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
5882
5910
|
const SelectAddon_1 = __importDefault(__webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx"));
|
|
5883
5911
|
const MultiSelectAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectAnchor */ "./src/components/MultiSelect/MultiSelectAnchor.tsx"));
|
|
5884
5912
|
const SelectedOptions_1 = __webpack_require__(/*! ./SelectedOptions */ "./src/components/MultiSelect/SelectedOptions.tsx");
|
|
5913
|
+
/**
|
|
5914
|
+
* An input for selection of options.
|
|
5915
|
+
*/
|
|
5885
5916
|
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 }) {
|
|
5886
5917
|
const [internalValue, setInternalValue] = (0, react_1.useState)(value || []);
|
|
5887
5918
|
(0, react_1.useEffect)(() => setInternalValue(value || []), [value]);
|
|
@@ -5939,7 +5970,7 @@ function MultiSelect({ ref, value, filter, setFilter, options = [], error, disab
|
|
|
5939
5970
|
}, children: getLabel(currentOption) }, String(value)));
|
|
5940
5971
|
})] }) }) }) }) }) }), (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
|
|
5941
5972
|
? 'chevron-up'
|
|
5942
|
-
: addonIcon || 'chevron-down', size: 'x20' }) }) }) }), (0, jsx_runtime_1.jsx)(
|
|
5973
|
+
: 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, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, renderItem: renderItem || Option_1.CheckOption, id: listboxId, options: filteredOptions, onSelect: internalChanged, cursor: cursor, customEmpty: customEmpty }) })] }));
|
|
5943
5974
|
}
|
|
5944
5975
|
exports["default"] = MultiSelect;
|
|
5945
5976
|
|
|
@@ -5982,9 +6013,14 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
5982
6013
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
5983
6014
|
const MultiSelect_1 = __importDefault(__webpack_require__(/*! ./MultiSelect */ "./src/components/MultiSelect/MultiSelect.tsx"));
|
|
5984
6015
|
const MultiSelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./MultiSelectFilteredAnchor */ "./src/components/MultiSelect/MultiSelectFilteredAnchor.tsx"));
|
|
6016
|
+
const MultiSelectFilteredContext_1 = __webpack_require__(/*! ./MultiSelectFilteredContext */ "./src/components/MultiSelect/MultiSelectFilteredContext.ts");
|
|
5985
6017
|
function MultiSelectFiltered({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) {
|
|
5986
6018
|
const [filter, setFilter] = (0, react_1.useState)('');
|
|
5987
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
6019
|
+
return ((0, jsx_runtime_1.jsx)(MultiSelectFilteredContext_1.MultiSelectFilteredContext.Provider, { value: {
|
|
6020
|
+
placeholder,
|
|
6021
|
+
filter: propFilter || filter,
|
|
6022
|
+
setFilter: propSetFilter || setFilter,
|
|
6023
|
+
}, children: (0, jsx_runtime_1.jsx)(MultiSelect_1.default, { ...props, filter: propFilter || filter, setFilter: propSetFilter || setFilter, options: options, anchor: MultiSelectFilteredAnchor_1.default }) }));
|
|
5988
6024
|
}
|
|
5989
6025
|
exports["default"] = MultiSelectFiltered;
|
|
5990
6026
|
|
|
@@ -6000,14 +6036,32 @@ exports["default"] = MultiSelectFiltered;
|
|
|
6000
6036
|
|
|
6001
6037
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6002
6038
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6039
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6003
6040
|
const Flex_1 = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
6004
6041
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6005
|
-
|
|
6006
|
-
|
|
6042
|
+
const MultiSelectFilteredContext_1 = __webpack_require__(/*! ./MultiSelectFilteredContext */ "./src/components/MultiSelect/MultiSelectFilteredContext.ts");
|
|
6043
|
+
function MultiSelectFilteredAnchor({ children: _children, ...props }) {
|
|
6044
|
+
const { placeholder, filter, setFilter } = (0, react_1.use)(MultiSelectFilteredContext_1.MultiSelectFilteredContext);
|
|
6045
|
+
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) => setFilter?.(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true, order: 1, autoComplete: 'off' }) }));
|
|
6007
6046
|
}
|
|
6008
6047
|
exports["default"] = MultiSelectFilteredAnchor;
|
|
6009
6048
|
|
|
6010
6049
|
|
|
6050
|
+
/***/ },
|
|
6051
|
+
|
|
6052
|
+
/***/ "./src/components/MultiSelect/MultiSelectFilteredContext.ts"
|
|
6053
|
+
/*!******************************************************************!*\
|
|
6054
|
+
!*** ./src/components/MultiSelect/MultiSelectFilteredContext.ts ***!
|
|
6055
|
+
\******************************************************************/
|
|
6056
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6057
|
+
|
|
6058
|
+
|
|
6059
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6060
|
+
exports.MultiSelectFilteredContext = void 0;
|
|
6061
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6062
|
+
exports.MultiSelectFilteredContext = (0, react_1.createContext)({});
|
|
6063
|
+
|
|
6064
|
+
|
|
6011
6065
|
/***/ },
|
|
6012
6066
|
|
|
6013
6067
|
/***/ "./src/components/MultiSelect/SelectedOptions.tsx"
|
|
@@ -6134,17 +6188,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6134
6188
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6135
6189
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6136
6190
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
6191
|
+
const react_is_1 = __webpack_require__(/*! react-is */ "react-is");
|
|
6192
|
+
const react_keyed_flatten_children_1 = __importDefault(__webpack_require__(/*! react-keyed-flatten-children */ "react-keyed-flatten-children"));
|
|
6137
6193
|
const NavBarDivider_1 = __importDefault(__webpack_require__(/*! ./NavBarDivider */ "./src/components/NavBar/NavBarDivider.tsx"));
|
|
6138
|
-
const NavBarGroup_1 = __importDefault(__webpack_require__(/*! ./NavBarGroup */ "./src/components/NavBar/NavBarGroup.tsx"));
|
|
6139
|
-
const isNavBarGroup = (child) => {
|
|
6140
|
-
if (!(0, react_1.isValidElement)(child))
|
|
6141
|
-
return false;
|
|
6142
|
-
const component = child.type;
|
|
6143
|
-
return component.name === NavBarGroup_1.default.name;
|
|
6144
|
-
};
|
|
6145
6194
|
const NavBarSection = ({ children, ...props }) => {
|
|
6146
|
-
const
|
|
6147
|
-
return ((0, jsx_runtime_1.jsx)("span", { className: 'rcx-navbar-section', ...props, children:
|
|
6195
|
+
const groups = (0, react_keyed_flatten_children_1.default)(children).filter(react_is_1.isElement);
|
|
6196
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: 'rcx-navbar-section', ...props, children: groups.map((child, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [child, index < groups.length - 1 && (0, jsx_runtime_1.jsx)(NavBarDivider_1.default, {})] }, index))) }));
|
|
6148
6197
|
};
|
|
6149
6198
|
exports["default"] = NavBarSection;
|
|
6150
6199
|
|
|
@@ -6187,6 +6236,9 @@ Object.defineProperty(exports, "NavBarSection", ({ enumerable: true, get: functi
|
|
|
6187
6236
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6188
6237
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
6189
6238
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
6239
|
+
/**
|
|
6240
|
+
* An input for numbers.
|
|
6241
|
+
*/
|
|
6190
6242
|
function NumberInput(props) {
|
|
6191
6243
|
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'number', ...props });
|
|
6192
6244
|
}
|
|
@@ -6255,6 +6307,9 @@ const OptionAvatar_1 = __importDefault(__webpack_require__(/*! ./OptionAvatar */
|
|
|
6255
6307
|
const OptionColumn_1 = __importDefault(__webpack_require__(/*! ./OptionColumn */ "./src/components/Option/OptionColumn.tsx"));
|
|
6256
6308
|
const OptionContent_1 = __importDefault(__webpack_require__(/*! ./OptionContent */ "./src/components/Option/OptionContent.tsx"));
|
|
6257
6309
|
const OptionIcon_1 = __importDefault(__webpack_require__(/*! ./OptionIcon */ "./src/components/Option/OptionIcon.tsx"));
|
|
6310
|
+
/**
|
|
6311
|
+
* The generic `Option` item of options. Can be freely used or inside the `Options` as well.
|
|
6312
|
+
*/
|
|
6258
6313
|
function Option({ is: Tag = 'li', id, children, label, focus, selected, className, icon, gap, avatar, title, disabled, variant, onClick, description, ...props }) {
|
|
6259
6314
|
return ((0, react_1.createElement)(Tag, { ...props, key: id, id: id, "aria-selected": !!selected, "aria-disabled": !!disabled, title: title, onClick: (e) => {
|
|
6260
6315
|
if (disabled) {
|
|
@@ -6558,6 +6613,9 @@ const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/i
|
|
|
6558
6613
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
6559
6614
|
const Tile_1 = __webpack_require__(/*! ../Tile */ "./src/components/Tile/index.ts");
|
|
6560
6615
|
const OptionsEmpty_1 = __importDefault(__webpack_require__(/*! ./OptionsEmpty */ "./src/components/Options/OptionsEmpty.tsx"));
|
|
6616
|
+
/**
|
|
6617
|
+
* An input for selection of options.
|
|
6618
|
+
*/
|
|
6561
6619
|
function Options({ maxHeight = 'x144', multiple, renderEmpty: EmptyComponent = OptionsEmpty_1.default, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, customEmpty, id, ...props }) {
|
|
6562
6620
|
const liRef = (0, react_1.useRef)(null);
|
|
6563
6621
|
(0, react_1.useLayoutEffect)(() => {
|
|
@@ -6727,7 +6785,7 @@ const useCursor = (initial, options, onChange) => {
|
|
|
6727
6785
|
e.preventDefault();
|
|
6728
6786
|
if (visibility === AnimatedVisibility_1.AnimatedVisibility.VISIBLE) {
|
|
6729
6787
|
e.persist();
|
|
6730
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
6788
|
+
e.nativeEvent.stopImmediatePropagation(); // TODO
|
|
6731
6789
|
e.stopPropagation();
|
|
6732
6790
|
}
|
|
6733
6791
|
hide();
|
|
@@ -6739,7 +6797,7 @@ const useCursor = (initial, options, onChange) => {
|
|
|
6739
6797
|
hide();
|
|
6740
6798
|
if (visibility === AnimatedVisibility_1.AnimatedVisibility.VISIBLE) {
|
|
6741
6799
|
e.persist();
|
|
6742
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
6800
|
+
e.nativeEvent.stopImmediatePropagation(); // TODO
|
|
6743
6801
|
e.stopPropagation();
|
|
6744
6802
|
return false;
|
|
6745
6803
|
}
|
|
@@ -6812,6 +6870,9 @@ exports.Empty = (0, react_2.memo)(() => (0, jsx_runtime_1.jsx)(Option_1.Option,
|
|
|
6812
6870
|
exports.CheckOption = (0, react_2.memo)(function CheckOption({ selected, children: label, ...options }) {
|
|
6813
6871
|
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 }) }));
|
|
6814
6872
|
});
|
|
6873
|
+
/**
|
|
6874
|
+
* An input for selection of options.
|
|
6875
|
+
*/
|
|
6815
6876
|
function OptionsPaginated({ ref, withTitle, multiple, renderEmpty: EmptyComponent = exports.Empty, options, cursor, renderItem: OptionComponent = Option_1.Option, onSelect, endReached, ...props }) {
|
|
6816
6877
|
const OptionsComponentWithData = ({ index, data, }) => {
|
|
6817
6878
|
const { value, label, selected } = data;
|
|
@@ -6821,7 +6882,10 @@ function OptionsPaginated({ ref, withTitle, multiple, renderEmpty: EmptyComponen
|
|
|
6821
6882
|
return false;
|
|
6822
6883
|
}, key: value, value: value, selected: selected || (multiple !== true && undefined), focus: cursor === index || undefined }));
|
|
6823
6884
|
};
|
|
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,
|
|
6885
|
+
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,
|
|
6886
|
+
// TODO Add a scroller element
|
|
6887
|
+
// components={{ Scroller: ScrollableContentWrapper }}
|
|
6888
|
+
itemContent: (index, data) => ((0, jsx_runtime_1.jsx)(OptionsComponentWithData, { index: index, data: data })) })) }) }));
|
|
6825
6889
|
}
|
|
6826
6890
|
const useVisible = (initialVisibility = AnimatedVisibility_1.AnimatedVisibility.HIDDEN) => {
|
|
6827
6891
|
const [visible, setVisible] = (0, fuselage_hooks_1.useDebouncedState)(initialVisibility, 10);
|
|
@@ -6885,7 +6949,7 @@ const Margins_1 = __webpack_require__(/*! ../Margins */ "./src/components/Margin
|
|
|
6885
6949
|
const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
6886
6950
|
const useVisible_1 = __webpack_require__(/*! ../Options/useVisible */ "./src/components/Options/useVisible.ts");
|
|
6887
6951
|
const OptionsPaginated_1 = __webpack_require__(/*! ../OptionsPaginated */ "./src/components/OptionsPaginated/index.ts");
|
|
6888
|
-
const
|
|
6952
|
+
const PositionAnimated_1 = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
6889
6953
|
const SelectAddon_1 = __importDefault(__webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx"));
|
|
6890
6954
|
const SelectFocus_1 = __importDefault(__webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx"));
|
|
6891
6955
|
const PaginatedMultiSelect = ({ withTitle, value, filter, options = [], error, disabled, anchor: Anchor = SelectFocus_1.default, onChange = () => { }, placeholder, renderOptions: OptionsComponent = OptionsPaginated_1.OptionsPaginated, renderItem = Option_1.Option, endReached, ...props }) => {
|
|
@@ -6930,9 +6994,9 @@ const PaginatedMultiSelect = ({ withTitle, value, filter, options = [], error, d
|
|
|
6930
6994
|
removeOption(value);
|
|
6931
6995
|
}, children: label }, value ?? index)))] }) }) }) }) }) }), (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
|
|
6932
6996
|
? 'cross'
|
|
6933
|
-
: 'chevron-down', size: 'x20' }) }) }) }), (0, jsx_runtime_1.jsx)(
|
|
6934
|
-
|
|
6935
|
-
|
|
6997
|
+
: 'chevron-down', size: 'x20' }) }) }) }), (0, jsx_runtime_1.jsx)(PositionAnimated_1.PositionAnimated, { visible: visible, anchor: containerRef, children: (0, jsx_runtime_1.jsx)(OptionsComponent, { width: borderBoxSize.inlineSize, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, role: 'listbox', options: options, cursor: -1, endReached: endReached, renderItem: renderItem, onSelect: ([value]) => {
|
|
6998
|
+
toggleOption(value);
|
|
6999
|
+
} }) })] }));
|
|
6936
7000
|
};
|
|
6937
7001
|
exports["default"] = PaginatedMultiSelect;
|
|
6938
7002
|
|
|
@@ -6998,7 +7062,7 @@ const PaginatedSelect = ({ value, withTitle, filter, setFilter: _setFilter, erro
|
|
|
6998
7062
|
const [visible, hide, show] = (0, useVisible_1.useVisible)();
|
|
6999
7063
|
const internalChangedByClick = (0, fuselage_hooks_1.useStableCallback)(([value]) => {
|
|
7000
7064
|
setInternalValue(value);
|
|
7001
|
-
onChange(value);
|
|
7065
|
+
onChange(value); // FIXME
|
|
7002
7066
|
hide();
|
|
7003
7067
|
});
|
|
7004
7068
|
const ref = (0, react_1.useRef)(null);
|
|
@@ -7109,14 +7173,18 @@ const Pagination = ({ count, current = 0, itemsPerPage = 25, itemsPerPageLabel =
|
|
|
7109
7173
|
const pages = Math.ceil(count / itemsPerPage);
|
|
7110
7174
|
const displayedPages = (0, react_1.useMemo)(() => {
|
|
7111
7175
|
if (pages <= 7) {
|
|
7176
|
+
// 0 1 2 3 4 5 6
|
|
7112
7177
|
return Array.from({ length: pages }, (_, i) => i);
|
|
7113
7178
|
}
|
|
7114
7179
|
if (currentPage < 5) {
|
|
7180
|
+
// 0 1 2 3 4 ... N
|
|
7115
7181
|
return [0, 1, 2, 3, 4, '⋯', pages - 1];
|
|
7116
7182
|
}
|
|
7117
7183
|
if (currentPage > pages - 5) {
|
|
7184
|
+
// 0 ... N-4 N-3 N-2 N-1 N
|
|
7118
7185
|
return [0, '⋯', pages - 5, pages - 4, pages - 3, pages - 2, pages - 1];
|
|
7119
7186
|
}
|
|
7187
|
+
// 0 ... x-1 x x-2 ... N
|
|
7120
7188
|
return [
|
|
7121
7189
|
0,
|
|
7122
7190
|
'⋯',
|
|
@@ -7183,6 +7251,13 @@ const themes = {
|
|
|
7183
7251
|
dark: themePalettes_1.dark,
|
|
7184
7252
|
'high-contrast': themePalettes_1.highContrast,
|
|
7185
7253
|
};
|
|
7254
|
+
/**
|
|
7255
|
+
* Style tag to handle the theme of the application.
|
|
7256
|
+
*
|
|
7257
|
+
* Import `PaletteStyleTag` and use it on the application informing the desired theme.
|
|
7258
|
+
*
|
|
7259
|
+
* Toggle the theme on Storybook's Control panel to see the color changes.
|
|
7260
|
+
*/
|
|
7186
7261
|
function PaletteStyleTag({ theme = 'light', tagId = 'main-palette', prefix = '--rcx-color', selector, palette, }) {
|
|
7187
7262
|
const themePalette = palette || (0, convertToCss_1.convertToCss)(themes[theme], prefix, selector);
|
|
7188
7263
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, react_dom_1.createPortal)(themePalette, (0, useCreateStyleContainer_1.useCreateStyleContainer)(tagId)) });
|
|
@@ -7741,10 +7816,10 @@ Object.defineProperty(exports, "Popover", ({ enumerable: true, get: function ()
|
|
|
7741
7816
|
|
|
7742
7817
|
/***/ },
|
|
7743
7818
|
|
|
7744
|
-
/***/ "./src/components/
|
|
7745
|
-
|
|
7746
|
-
!*** ./src/components/
|
|
7747
|
-
|
|
7819
|
+
/***/ "./src/components/PositionAnimated/Position.tsx"
|
|
7820
|
+
/*!******************************************************!*\
|
|
7821
|
+
!*** ./src/components/PositionAnimated/Position.tsx ***!
|
|
7822
|
+
\******************************************************/
|
|
7748
7823
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
7749
7824
|
|
|
7750
7825
|
|
|
@@ -7783,24 +7858,6 @@ const Position = ({ anchor, children, placement, margin, className: _className,
|
|
|
7783
7858
|
exports["default"] = Position;
|
|
7784
7859
|
|
|
7785
7860
|
|
|
7786
|
-
/***/ },
|
|
7787
|
-
|
|
7788
|
-
/***/ "./src/components/Position/index.ts"
|
|
7789
|
-
/*!******************************************!*\
|
|
7790
|
-
!*** ./src/components/Position/index.ts ***!
|
|
7791
|
-
\******************************************/
|
|
7792
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7796
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7797
|
-
};
|
|
7798
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7799
|
-
exports.Position = void 0;
|
|
7800
|
-
var Position_1 = __webpack_require__(/*! ./Position */ "./src/components/Position/Position.tsx");
|
|
7801
|
-
Object.defineProperty(exports, "Position", ({ enumerable: true, get: function () { return __importDefault(Position_1).default; } }));
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
7861
|
/***/ },
|
|
7805
7862
|
|
|
7806
7863
|
/***/ "./src/components/PositionAnimated/PositionAnimated.tsx"
|
|
@@ -7810,11 +7867,14 @@ Object.defineProperty(exports, "Position", ({ enumerable: true, get: function ()
|
|
|
7810
7867
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
7811
7868
|
|
|
7812
7869
|
|
|
7870
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7871
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7872
|
+
};
|
|
7813
7873
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7814
7874
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
7815
7875
|
const AnimatedVisibility_1 = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
7816
|
-
const Position_1 = __webpack_require__(/*!
|
|
7817
|
-
const PositionAnimated = ({ width: _width, visible, children, ...props }) => ((0, jsx_runtime_1.jsx)(AnimatedVisibility_1.AnimatedVisibility, { visibility: visible, children: (0, jsx_runtime_1.jsx)(Position_1.
|
|
7876
|
+
const Position_1 = __importDefault(__webpack_require__(/*! ./Position */ "./src/components/PositionAnimated/Position.tsx"));
|
|
7877
|
+
const PositionAnimated = ({ width: _width, visible, children, ...props }) => ((0, jsx_runtime_1.jsx)(AnimatedVisibility_1.AnimatedVisibility, { visibility: visible, children: (0, jsx_runtime_1.jsx)(Position_1.default, { ...props, children: children }) }));
|
|
7818
7878
|
exports["default"] = PositionAnimated;
|
|
7819
7879
|
|
|
7820
7880
|
|
|
@@ -7867,6 +7927,9 @@ const getColor = (isLight, variant, error) => {
|
|
|
7867
7927
|
}
|
|
7868
7928
|
return isLight ? lightColors[variant] : colors[variant];
|
|
7869
7929
|
};
|
|
7930
|
+
/**
|
|
7931
|
+
* The `ProgressBar` is used to inform the user the progress of an operation.
|
|
7932
|
+
*/
|
|
7870
7933
|
function ProgressBar({ percentage, variant = 'info', error, animated, light = false, ...props }) {
|
|
7871
7934
|
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
7935
|
}
|
|
@@ -7963,6 +8026,9 @@ const pollTouchingEdges = (element, touchingEdgesRef, onScrollContent) => {
|
|
|
7963
8026
|
onScrollContent?.(newTouchingEdges);
|
|
7964
8027
|
}
|
|
7965
8028
|
};
|
|
8029
|
+
/**
|
|
8030
|
+
* Add scroll capability to the wrapped component.
|
|
8031
|
+
*/
|
|
7966
8032
|
const Scrollable = ({ children, horizontal, vertical, smooth, onScrollContent, }) => {
|
|
7967
8033
|
const scrollTimeoutRef = (0, react_1.useRef)(undefined);
|
|
7968
8034
|
const touchingEdgesRef = (0, react_1.useRef)({});
|
|
@@ -8065,6 +8131,9 @@ Object.defineProperty(exports, "Scrollable", ({ enumerable: true, get: function
|
|
|
8065
8131
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8066
8132
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8067
8133
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8134
|
+
/**
|
|
8135
|
+
* An input for search queries.
|
|
8136
|
+
*/
|
|
8068
8137
|
function SearchInput(props) {
|
|
8069
8138
|
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'search', ...props });
|
|
8070
8139
|
}
|
|
@@ -8139,6 +8208,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8139
8208
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8140
8209
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
8141
8210
|
const SelectAria_1 = __webpack_require__(/*! ./SelectAria */ "./src/components/Select/SelectAria.tsx");
|
|
8211
|
+
/**
|
|
8212
|
+
* An input for selection of options.
|
|
8213
|
+
*/
|
|
8142
8214
|
function Select({ options, ref, ...props }) {
|
|
8143
8215
|
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]))) }));
|
|
8144
8216
|
}
|
|
@@ -8220,11 +8292,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8220
8292
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8221
8293
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8222
8294
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8223
|
-
const _1 = __webpack_require__(/*! . */ "./src/components/Select/index.ts");
|
|
8224
8295
|
const SelectFilteredAnchor_1 = __importDefault(__webpack_require__(/*! ./SelectFilteredAnchor */ "./src/components/Select/SelectFilteredAnchor.tsx"));
|
|
8296
|
+
const SelectFilteredContext_1 = __webpack_require__(/*! ./SelectFilteredContext */ "./src/components/Select/SelectFilteredContext.ts");
|
|
8297
|
+
const SelectLegacy_1 = __importDefault(__webpack_require__(/*! ./SelectLegacy */ "./src/components/Select/SelectLegacy.tsx"));
|
|
8225
8298
|
function SelectFiltered({ options, placeholder, filter: propFilter, setFilter: propSetFilter, ...props }) {
|
|
8226
8299
|
const [filter, setFilter] = (0, react_1.useState)('');
|
|
8227
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
8300
|
+
return ((0, jsx_runtime_1.jsx)(SelectFilteredContext_1.SelectFilteredContext.Provider, { value: {
|
|
8301
|
+
placeholder,
|
|
8302
|
+
filter: propFilter || filter,
|
|
8303
|
+
setFilter: propSetFilter || setFilter,
|
|
8304
|
+
}, children: (0, jsx_runtime_1.jsx)(SelectLegacy_1.default, { placeholder: placeholder, filter: propFilter || filter, options: options, ...props, anchor: SelectFilteredAnchor_1.default }) }));
|
|
8228
8305
|
}
|
|
8229
8306
|
exports["default"] = SelectFiltered;
|
|
8230
8307
|
|
|
@@ -8240,13 +8317,31 @@ exports["default"] = SelectFiltered;
|
|
|
8240
8317
|
|
|
8241
8318
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8242
8319
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8320
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8243
8321
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8244
|
-
|
|
8245
|
-
|
|
8322
|
+
const SelectFilteredContext_1 = __webpack_require__(/*! ./SelectFilteredContext */ "./src/components/Select/SelectFilteredContext.ts");
|
|
8323
|
+
function SelectFilteredAnchor({ children: _children, ...props }) {
|
|
8324
|
+
const { placeholder, filter, setFilter } = (0, react_1.use)(SelectFilteredContext_1.SelectFilteredContext);
|
|
8325
|
+
return ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { mi: 4, flexGrow: 1, className: 'rcx-select__focus', placeholder: placeholder, value: filter, onInput: (e) => setFilter?.(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true }));
|
|
8246
8326
|
}
|
|
8247
8327
|
exports["default"] = SelectFilteredAnchor;
|
|
8248
8328
|
|
|
8249
8329
|
|
|
8330
|
+
/***/ },
|
|
8331
|
+
|
|
8332
|
+
/***/ "./src/components/Select/SelectFilteredContext.ts"
|
|
8333
|
+
/*!********************************************************!*\
|
|
8334
|
+
!*** ./src/components/Select/SelectFilteredContext.ts ***!
|
|
8335
|
+
\********************************************************/
|
|
8336
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8337
|
+
|
|
8338
|
+
|
|
8339
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8340
|
+
exports.SelectFilteredContext = void 0;
|
|
8341
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8342
|
+
exports.SelectFilteredContext = (0, react_1.createContext)({});
|
|
8343
|
+
|
|
8344
|
+
|
|
8250
8345
|
/***/ },
|
|
8251
8346
|
|
|
8252
8347
|
/***/ "./src/components/Select/SelectFocus.tsx"
|
|
@@ -8300,11 +8395,11 @@ const useDidUpdate = (func, deps) => {
|
|
|
8300
8395
|
didMount.current = true;
|
|
8301
8396
|
}, deps || []);
|
|
8302
8397
|
};
|
|
8303
|
-
|
|
8398
|
+
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 }) {
|
|
8304
8399
|
const [internalValue, setInternalValue] = (0, react_1.useState)(value || '');
|
|
8305
8400
|
const internalChangedByKeyboard = (0, fuselage_hooks_1.useStableCallback)(([value]) => {
|
|
8306
8401
|
setInternalValue(value);
|
|
8307
|
-
onChange(value);
|
|
8402
|
+
onChange(value); // FIXME
|
|
8308
8403
|
});
|
|
8309
8404
|
const option = options.find((option) => getValue(option) === internalValue);
|
|
8310
8405
|
const index = options.indexOf(option);
|
|
@@ -8324,7 +8419,7 @@ const SelectLegacy = function SelectLegacy({ ref, value, filter, error, disabled
|
|
|
8324
8419
|
const removeFocusClass = () => innerRef.current?.classList.remove('focus-visible');
|
|
8325
8420
|
const internalChangedByClick = (0, fuselage_hooks_1.useStableCallback)(([value]) => {
|
|
8326
8421
|
setInternalValue(value);
|
|
8327
|
-
onChange(value);
|
|
8422
|
+
onChange(value); // FIXME
|
|
8328
8423
|
removeFocusClass();
|
|
8329
8424
|
hide();
|
|
8330
8425
|
});
|
|
@@ -8347,7 +8442,7 @@ const SelectLegacy = function SelectLegacy({ ref, value, filter, error, disabled
|
|
|
8347
8442
|
(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
|
|
8348
8443
|
? 'chevron-up'
|
|
8349
8444
|
: 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 }) })] }));
|
|
8350
|
-
}
|
|
8445
|
+
}
|
|
8351
8446
|
exports["default"] = SelectLegacy;
|
|
8352
8447
|
|
|
8353
8448
|
|
|
@@ -8399,94 +8494,6 @@ var SelectFiltered_1 = __webpack_require__(/*! ./SelectFiltered */ "./src/compon
|
|
|
8399
8494
|
Object.defineProperty(exports, "SelectFiltered", ({ enumerable: true, get: function () { return __importDefault(SelectFiltered_1).default; } }));
|
|
8400
8495
|
|
|
8401
8496
|
|
|
8402
|
-
/***/ },
|
|
8403
|
-
|
|
8404
|
-
/***/ "./src/components/SelectInput/SelectInput.tsx"
|
|
8405
|
-
/*!****************************************************!*\
|
|
8406
|
-
!*** ./src/components/SelectInput/SelectInput.tsx ***!
|
|
8407
|
-
\****************************************************/
|
|
8408
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8412
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8413
|
-
};
|
|
8414
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8415
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8416
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
8417
|
-
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
8418
|
-
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
8419
|
-
const SelectInputPlaceholder_1 = __importDefault(__webpack_require__(/*! ./SelectInputPlaceholder */ "./src/components/SelectInput/SelectInputPlaceholder.tsx"));
|
|
8420
|
-
function SelectInput({ ref, children, multiple, placeholder, onChange, ...props }) {
|
|
8421
|
-
const [isPlaceholderVisible, setPlaceholderVisible] = (0, react_1.useState)(!props.value && !props.defaultValue);
|
|
8422
|
-
const handleChange = (0, react_1.useCallback)((event) => {
|
|
8423
|
-
setPlaceholderVisible(!event.currentTarget.value);
|
|
8424
|
-
onChange?.call(event.currentTarget, event);
|
|
8425
|
-
}, [onChange]);
|
|
8426
|
-
if (multiple) {
|
|
8427
|
-
return ((0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { children: children, ...props, multiple: true, type: 'select', onChange: handleChange }));
|
|
8428
|
-
}
|
|
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
|
-
}
|
|
8431
|
-
exports["default"] = SelectInput;
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
/***/ },
|
|
8435
|
-
|
|
8436
|
-
/***/ "./src/components/SelectInput/SelectInputOption.tsx"
|
|
8437
|
-
/*!**********************************************************!*\
|
|
8438
|
-
!*** ./src/components/SelectInput/SelectInputOption.tsx ***!
|
|
8439
|
-
\**********************************************************/
|
|
8440
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8444
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8445
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8446
|
-
function SelectInputOption(props) {
|
|
8447
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__option": true, ...props });
|
|
8448
|
-
}
|
|
8449
|
-
exports["default"] = SelectInputOption;
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
/***/ },
|
|
8453
|
-
|
|
8454
|
-
/***/ "./src/components/SelectInput/SelectInputPlaceholder.tsx"
|
|
8455
|
-
/*!***************************************************************!*\
|
|
8456
|
-
!*** ./src/components/SelectInput/SelectInputPlaceholder.tsx ***!
|
|
8457
|
-
\***************************************************************/
|
|
8458
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8462
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8463
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8464
|
-
function SelectInputPlaceholder(props) {
|
|
8465
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'option', "rcx-input-box__placeholder": true, ...props });
|
|
8466
|
-
}
|
|
8467
|
-
exports["default"] = SelectInputPlaceholder;
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
/***/ },
|
|
8471
|
-
|
|
8472
|
-
/***/ "./src/components/SelectInput/index.ts"
|
|
8473
|
-
/*!*********************************************!*\
|
|
8474
|
-
!*** ./src/components/SelectInput/index.ts ***!
|
|
8475
|
-
\*********************************************/
|
|
8476
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8480
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8481
|
-
};
|
|
8482
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8483
|
-
exports.SelectInputOption = exports.SelectInput = void 0;
|
|
8484
|
-
var SelectInput_1 = __webpack_require__(/*! ./SelectInput */ "./src/components/SelectInput/SelectInput.tsx");
|
|
8485
|
-
Object.defineProperty(exports, "SelectInput", ({ enumerable: true, get: function () { return __importDefault(SelectInput_1).default; } }));
|
|
8486
|
-
var SelectInputOption_1 = __webpack_require__(/*! ./SelectInputOption */ "./src/components/SelectInput/SelectInputOption.tsx");
|
|
8487
|
-
Object.defineProperty(exports, "SelectInputOption", ({ enumerable: true, get: function () { return __importDefault(SelectInputOption_1).default; } }));
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
8497
|
/***/ },
|
|
8491
8498
|
|
|
8492
8499
|
/***/ "./src/components/Sidebar/Item.tsx"
|
|
@@ -8529,7 +8536,10 @@ exports.SidebarItemAvatar = SidebarItemAvatar;
|
|
|
8529
8536
|
exports.SidebarItemActions = SidebarActions_1.SidebarActions;
|
|
8530
8537
|
const SidebarItemAction = (props) => ((0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarAction, { ...props }));
|
|
8531
8538
|
exports.SidebarItemAction = SidebarItemAction;
|
|
8532
|
-
|
|
8539
|
+
/**
|
|
8540
|
+
* Item component to be used inside Sidebar.
|
|
8541
|
+
*/
|
|
8542
|
+
const SidebarItem = ({ selected, highlighted, clickable, featured, is: Tag = 'div', children, ...props }) => ((0, jsx_runtime_1.jsx)(Tag, { className: [
|
|
8533
8543
|
'rc-box rcx-box--full rcx-sidebar-item',
|
|
8534
8544
|
highlighted && 'rcx-sidebar-item--highlighted',
|
|
8535
8545
|
(clickable || Tag === 'a') && 'rcx-sidebar-item--clickable',
|
|
@@ -8537,20 +8547,8 @@ exports.SidebarItem = Object.assign(({ selected, highlighted, clickable, feature
|
|
|
8537
8547
|
featured && 'rcx-sidebar-item--featured',
|
|
8538
8548
|
]
|
|
8539
8549
|
.filter(Boolean)
|
|
8540
|
-
.join(' '), ...props, children: (0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-item__wrapper', children: children }) }))
|
|
8541
|
-
|
|
8542
|
-
Container: exports.SidebarItemContainer,
|
|
8543
|
-
Content: exports.SidebarItemContent,
|
|
8544
|
-
Title: exports.SidebarItemTitle,
|
|
8545
|
-
Subtitle: exports.SidebarItemSubtitle,
|
|
8546
|
-
Time: exports.SidebarItemTime,
|
|
8547
|
-
Wrapper: exports.SidebarItemWrapper,
|
|
8548
|
-
Icon: exports.SidebarItemIcon,
|
|
8549
|
-
Avatar: exports.SidebarItemAvatar,
|
|
8550
|
-
Actions: exports.SidebarItemActions,
|
|
8551
|
-
Action: exports.SidebarItemAction,
|
|
8552
|
-
Badge: exports.SidebarItemBadge,
|
|
8553
|
-
});
|
|
8550
|
+
.join(' '), ...props, children: (0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-item__wrapper', children: children }) }));
|
|
8551
|
+
exports.SidebarItem = SidebarItem;
|
|
8554
8552
|
|
|
8555
8553
|
|
|
8556
8554
|
/***/ },
|
|
@@ -8567,9 +8565,8 @@ exports.SidebarSection = exports.SidebarSectionTitle = void 0;
|
|
|
8567
8565
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8568
8566
|
const SidebarSectionTitle = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-title', ...props }));
|
|
8569
8567
|
exports.SidebarSectionTitle = SidebarSectionTitle;
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
});
|
|
8568
|
+
const SidebarSection = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-section', ...props }));
|
|
8569
|
+
exports.SidebarSection = SidebarSection;
|
|
8573
8570
|
|
|
8574
8571
|
|
|
8575
8572
|
/***/ },
|
|
@@ -8581,24 +8578,10 @@ exports.SidebarSection = Object.assign((props) => ((0, jsx_runtime_1.jsx)("div",
|
|
|
8581
8578
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
8582
8579
|
|
|
8583
8580
|
|
|
8584
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8585
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8586
|
-
};
|
|
8587
8581
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8588
8582
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8589
8583
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8590
|
-
const
|
|
8591
|
-
const Section_1 = __webpack_require__(/*! ./Section */ "./src/components/Sidebar/Section.tsx");
|
|
8592
|
-
const SidebarBanner_1 = __importDefault(__webpack_require__(/*! ./SidebarBanner */ "./src/components/Sidebar/SidebarBanner.tsx"));
|
|
8593
|
-
const SidebarDivider_1 = __importDefault(__webpack_require__(/*! ./SidebarDivider */ "./src/components/Sidebar/SidebarDivider.tsx"));
|
|
8594
|
-
const TopBar_1 = __importDefault(__webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/index.ts"));
|
|
8595
|
-
const Sidebar = Object.assign((props) => (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-sidebar": true, ...props }), {
|
|
8596
|
-
TopBar: TopBar_1.default,
|
|
8597
|
-
Item: Item_1.SidebarItem,
|
|
8598
|
-
Section: Section_1.SidebarSection,
|
|
8599
|
-
Divider: SidebarDivider_1.default,
|
|
8600
|
-
Banner: SidebarBanner_1.default,
|
|
8601
|
-
});
|
|
8584
|
+
const Sidebar = (props) => (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-sidebar": true, ...props });
|
|
8602
8585
|
exports["default"] = Sidebar;
|
|
8603
8586
|
|
|
8604
8587
|
|
|
@@ -8697,6 +8680,9 @@ exports.SidebarFooterHighlight = SidebarFooterHighlight;
|
|
|
8697
8680
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8698
8681
|
exports.TopBar = void 0;
|
|
8699
8682
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8683
|
+
/**
|
|
8684
|
+
* Sidebar TopBar and ToolBox.
|
|
8685
|
+
*/
|
|
8700
8686
|
const TopBar = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: ['rc-box rc-box--full rcx-sidebar-topbar', className]
|
|
8701
8687
|
.filter(Boolean)
|
|
8702
8688
|
.join(' '), ...props }));
|
|
@@ -8864,31 +8850,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
8864
8850
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
8865
8851
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8866
8852
|
};
|
|
8867
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8868
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8869
|
-
};
|
|
8870
8853
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8871
8854
|
exports.TopBarAvatar = void 0;
|
|
8872
|
-
|
|
8873
|
-
const TopBar_1 = __webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/TopBar.tsx");
|
|
8874
|
-
const TopBarAction_1 = __webpack_require__(/*! ./TopBarAction */ "./src/components/Sidebar/TopBar/TopBarAction.tsx");
|
|
8875
|
-
const TopBarActions_1 = __webpack_require__(/*! ./TopBarActions */ "./src/components/Sidebar/TopBar/TopBarActions.tsx");
|
|
8876
|
-
const TopBarSection_1 = __webpack_require__(/*! ./TopBarSection */ "./src/components/Sidebar/TopBar/TopBarSection.tsx");
|
|
8877
|
-
const TopBarTitle_1 = __webpack_require__(/*! ./TopBarTitle */ "./src/components/Sidebar/TopBar/TopBarTitle.tsx");
|
|
8878
|
-
const TopBarToolBox_1 = __webpack_require__(/*! ./TopBarToolBox */ "./src/components/Sidebar/TopBar/TopBarToolBox.tsx");
|
|
8879
|
-
const TopBarWrapper_1 = __webpack_require__(/*! ./TopBarWrapper */ "./src/components/Sidebar/TopBar/TopBarWrapper.tsx");
|
|
8880
|
-
const Avatar = { size: 'x24' };
|
|
8881
|
-
exports.TopBarAvatar = Avatar;
|
|
8882
|
-
exports["default"] = Object.assign(TopBar_1.TopBar, {
|
|
8883
|
-
Section: TopBarSection_1.TopBarSection,
|
|
8884
|
-
ToolBox: TopBarToolBox_1.TopBarToolBox,
|
|
8885
|
-
Wrapper: TopBarWrapper_1.TopBarWrapper,
|
|
8886
|
-
Avatar: exports.TopBarAvatar,
|
|
8887
|
-
Actions: TopBarActions_1.TopBarActions,
|
|
8888
|
-
Action: TopBarAction_1.TopBarAction,
|
|
8889
|
-
Divider: SidebarDivider_1.default,
|
|
8890
|
-
Title: TopBarTitle_1.TopBarTitle,
|
|
8891
|
-
});
|
|
8855
|
+
exports.TopBarAvatar = { size: 'x24' };
|
|
8892
8856
|
__exportStar(__webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/TopBar.tsx"), exports);
|
|
8893
8857
|
__exportStar(__webpack_require__(/*! ./TopBarV2 */ "./src/components/Sidebar/TopBar/TopBarV2.tsx"), exports);
|
|
8894
8858
|
__exportStar(__webpack_require__(/*! ./TopBarAction */ "./src/components/Sidebar/TopBar/TopBarAction.tsx"), exports);
|
|
@@ -8926,14 +8890,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8926
8890
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8927
8891
|
};
|
|
8928
8892
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8929
|
-
exports.SidebarDivider = exports.SidebarBanner = exports.SidebarTopBar = exports.Sidebar = void 0;
|
|
8893
|
+
exports.SidebarDivider = exports.SidebarBanner = exports.SidebarTopBarToolBox = exports.SidebarTopBarAvatar = exports.SidebarTopBarActions = exports.SidebarTopBarAction = exports.SidebarTopBarTitle = exports.SidebarTopBar = exports.Sidebar = void 0;
|
|
8930
8894
|
var Sidebar_1 = __webpack_require__(/*! ./Sidebar */ "./src/components/Sidebar/Sidebar.tsx");
|
|
8931
8895
|
Object.defineProperty(exports, "Sidebar", ({ enumerable: true, get: function () { return __importDefault(Sidebar_1).default; } }));
|
|
8932
8896
|
__exportStar(__webpack_require__(/*! ./Item */ "./src/components/Sidebar/Item.tsx"), exports);
|
|
8933
8897
|
__exportStar(__webpack_require__(/*! ./Section */ "./src/components/Sidebar/Section.tsx"), exports);
|
|
8934
8898
|
__exportStar(__webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/index.ts"), exports);
|
|
8935
8899
|
var TopBar_1 = __webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/index.ts");
|
|
8936
|
-
Object.defineProperty(exports, "SidebarTopBar", ({ enumerable: true, get: function () { return
|
|
8900
|
+
Object.defineProperty(exports, "SidebarTopBar", ({ enumerable: true, get: function () { return TopBar_1.TopBar; } }));
|
|
8901
|
+
Object.defineProperty(exports, "SidebarTopBarTitle", ({ enumerable: true, get: function () { return TopBar_1.TopBarTitle; } }));
|
|
8902
|
+
Object.defineProperty(exports, "SidebarTopBarAction", ({ enumerable: true, get: function () { return TopBar_1.TopBarAction; } }));
|
|
8903
|
+
Object.defineProperty(exports, "SidebarTopBarActions", ({ enumerable: true, get: function () { return TopBar_1.TopBarActions; } }));
|
|
8904
|
+
Object.defineProperty(exports, "SidebarTopBarAvatar", ({ enumerable: true, get: function () { return TopBar_1.TopBarAvatar; } }));
|
|
8905
|
+
Object.defineProperty(exports, "SidebarTopBarToolBox", ({ enumerable: true, get: function () { return TopBar_1.TopBarToolBox; } }));
|
|
8937
8906
|
var SidebarBanner_1 = __webpack_require__(/*! ./SidebarBanner */ "./src/components/Sidebar/SidebarBanner.tsx");
|
|
8938
8907
|
Object.defineProperty(exports, "SidebarBanner", ({ enumerable: true, get: function () { return __importDefault(SidebarBanner_1).default; } }));
|
|
8939
8908
|
__exportStar(__webpack_require__(/*! ./SidebarFooter */ "./src/components/Sidebar/SidebarFooter.tsx"), exports);
|
|
@@ -9974,6 +9943,7 @@ const SliderThumb_1 = __webpack_require__(/*! ./SliderThumb */ "./src/components
|
|
|
9974
9943
|
const SliderTrack_1 = __webpack_require__(/*! ./SliderTrack */ "./src/components/Slider/SliderTrack.tsx");
|
|
9975
9944
|
function Slider({ ref, ...props }) {
|
|
9976
9945
|
const { label, formatOptions, showOutput = true, multiThumb, maxValue, minValue, } = props;
|
|
9946
|
+
// Get a defaultValue in the range for multiThumb
|
|
9977
9947
|
const getMultiThumbDefaultValue = () => {
|
|
9978
9948
|
if (multiThumb && !props.defaultValue) {
|
|
9979
9949
|
if (minValue && maxValue) {
|
|
@@ -10426,6 +10396,9 @@ const Disabled_1 = __importDefault(__webpack_require__(/*! ./icons/Disabled */ "
|
|
|
10426
10396
|
const Loading_1 = __importDefault(__webpack_require__(/*! ./icons/Loading */ "./src/components/StatusBullet/icons/Loading.tsx"));
|
|
10427
10397
|
const Offline_1 = __importDefault(__webpack_require__(/*! ./icons/Offline */ "./src/components/StatusBullet/icons/Offline.tsx"));
|
|
10428
10398
|
const Online_1 = __importDefault(__webpack_require__(/*! ./icons/Online */ "./src/components/StatusBullet/icons/Online.tsx"));
|
|
10399
|
+
/**
|
|
10400
|
+
* The `StatusBullet` is used to inform the user status.
|
|
10401
|
+
*/
|
|
10429
10402
|
const StatusBullet = ({ status = 'loading', ...props }) => {
|
|
10430
10403
|
switch (status) {
|
|
10431
10404
|
case 'online':
|
|
@@ -10781,17 +10754,15 @@ __exportStar(__webpack_require__(/*! ./TableSelection */ "./src/components/Table
|
|
|
10781
10754
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
10782
10755
|
|
|
10783
10756
|
|
|
10784
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10785
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10786
|
-
};
|
|
10787
10757
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10788
10758
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10789
10759
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
10790
|
-
|
|
10760
|
+
/**
|
|
10761
|
+
* Tabs is a component to navigate around the UI using buttons arranged together with the selected tab highlighted.
|
|
10762
|
+
*/
|
|
10791
10763
|
function Tabs({ children, divider = true, ...props }) {
|
|
10792
10764
|
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-tabs": true, "rcx-tabs--with-divider": divider, ...props, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-tabs__scroll-box": true, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'div', "rcx-tabs__wrapper": true, children: children, role: 'tablist' }) }) }));
|
|
10793
10765
|
}
|
|
10794
|
-
Tabs.Item = TabsItem_1.default;
|
|
10795
10766
|
exports["default"] = Tabs;
|
|
10796
10767
|
|
|
10797
10768
|
|
|
@@ -10846,6 +10817,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
10846
10817
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10847
10818
|
const prependClassName_1 = __webpack_require__(/*! ../../helpers/prependClassName */ "./src/helpers/prependClassName.ts");
|
|
10848
10819
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
10820
|
+
/**
|
|
10821
|
+
* Used for mentions
|
|
10822
|
+
*/
|
|
10849
10823
|
const Tag = ({ large, medium, className, disabled, onClick, variant, children, icon, href, ...props }) => {
|
|
10850
10824
|
const modifiers = [
|
|
10851
10825
|
variant,
|
|
@@ -10881,42 +10855,6 @@ var Tag_1 = __webpack_require__(/*! ./Tag */ "./src/components/Tag/Tag.tsx");
|
|
|
10881
10855
|
Object.defineProperty(exports, "Tag", ({ enumerable: true, get: function () { return __importDefault(Tag_1).default; } }));
|
|
10882
10856
|
|
|
10883
10857
|
|
|
10884
|
-
/***/ },
|
|
10885
|
-
|
|
10886
|
-
/***/ "./src/components/TelephoneInput/TelephoneInput.tsx"
|
|
10887
|
-
/*!**********************************************************!*\
|
|
10888
|
-
!*** ./src/components/TelephoneInput/TelephoneInput.tsx ***!
|
|
10889
|
-
\**********************************************************/
|
|
10890
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10894
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10895
|
-
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
10896
|
-
function TelephoneInput(props) {
|
|
10897
|
-
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'tel', ...props });
|
|
10898
|
-
}
|
|
10899
|
-
exports["default"] = TelephoneInput;
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
/***/ },
|
|
10903
|
-
|
|
10904
|
-
/***/ "./src/components/TelephoneInput/index.ts"
|
|
10905
|
-
/*!************************************************!*\
|
|
10906
|
-
!*** ./src/components/TelephoneInput/index.ts ***!
|
|
10907
|
-
\************************************************/
|
|
10908
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10912
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10913
|
-
};
|
|
10914
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10915
|
-
exports.TelephoneInput = void 0;
|
|
10916
|
-
var TelephoneInput_1 = __webpack_require__(/*! ./TelephoneInput */ "./src/components/TelephoneInput/TelephoneInput.tsx");
|
|
10917
|
-
Object.defineProperty(exports, "TelephoneInput", ({ enumerable: true, get: function () { return __importDefault(TelephoneInput_1).default; } }));
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
10858
|
/***/ },
|
|
10921
10859
|
|
|
10922
10860
|
/***/ "./src/components/TextAreaInput/TextAreaInput.tsx"
|
|
@@ -10929,6 +10867,9 @@ Object.defineProperty(exports, "TelephoneInput", ({ enumerable: true, get: funct
|
|
|
10929
10867
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10930
10868
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10931
10869
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
10870
|
+
/**
|
|
10871
|
+
* An input for multi-line plain-text editing.
|
|
10872
|
+
*/
|
|
10932
10873
|
function TextAreaInput(props) {
|
|
10933
10874
|
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'textarea', ...props });
|
|
10934
10875
|
}
|
|
@@ -10965,6 +10906,9 @@ Object.defineProperty(exports, "TextAreaInput", ({ enumerable: true, get: functi
|
|
|
10965
10906
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10966
10907
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10967
10908
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
10909
|
+
/**
|
|
10910
|
+
* An input for any kind of single-line text.
|
|
10911
|
+
*/
|
|
10968
10912
|
function TextInput(props) {
|
|
10969
10913
|
return (0, jsx_runtime_1.jsx)(InputBox_1.InputBox, { type: 'text', ...props });
|
|
10970
10914
|
}
|
|
@@ -11008,6 +10952,9 @@ function Circle({ disabled, circleCount, iteration, inheritColor, ...props }) {
|
|
|
11008
10952
|
animation-delay: ${iteration * 0.16}s;
|
|
11009
10953
|
`, "rcx-throbber__circle": true, "rcx-throbber__circle--disabled": disabled, "rcx-throbber__circle--inherit-color": inheritColor, ...props }));
|
|
11010
10954
|
}
|
|
10955
|
+
/**
|
|
10956
|
+
* Indicates content that has not loaded yet.
|
|
10957
|
+
*/
|
|
11011
10958
|
function Throbber({ disabled, size = 'x16', circleCount = 3, inheritColor, ...props }) {
|
|
11012
10959
|
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
10960
|
}
|
|
@@ -11084,6 +11031,9 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
11084
11031
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
11085
11032
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
11086
11033
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
11034
|
+
/**
|
|
11035
|
+
* Shows alerts in a toast component.
|
|
11036
|
+
*/
|
|
11087
11037
|
function ToastBar({ children, className = '', variant = 'info', time = 5, isPaused, id, onClose, buttonLabel = 'Dismiss alert', ...props }) {
|
|
11088
11038
|
const iconName = (variant === 'success' && 'circle-check') ||
|
|
11089
11039
|
(variant === 'error' && 'ban') ||
|
|
@@ -11333,14 +11283,12 @@ __exportStar(__webpack_require__(/*! ./Pagination */ "./src/components/Paginatio
|
|
|
11333
11283
|
__exportStar(__webpack_require__(/*! ./PaletteStyleTag */ "./src/components/PaletteStyleTag/index.ts"), exports);
|
|
11334
11284
|
__exportStar(__webpack_require__(/*! ./PasswordInput */ "./src/components/PasswordInput/index.ts"), exports);
|
|
11335
11285
|
__exportStar(__webpack_require__(/*! ./Popover */ "./src/components/Popover/index.ts"), exports);
|
|
11336
|
-
__exportStar(__webpack_require__(/*! ./Position */ "./src/components/Position/index.ts"), exports);
|
|
11337
11286
|
__exportStar(__webpack_require__(/*! ./PositionAnimated */ "./src/components/PositionAnimated/index.ts"), exports);
|
|
11338
11287
|
__exportStar(__webpack_require__(/*! ./ProgressBar */ "./src/components/ProgressBar/index.ts"), exports);
|
|
11339
11288
|
__exportStar(__webpack_require__(/*! ./RadioButton */ "./src/components/RadioButton/index.ts"), exports);
|
|
11340
11289
|
__exportStar(__webpack_require__(/*! ./Scrollable */ "./src/components/Scrollable/index.ts"), exports);
|
|
11341
11290
|
__exportStar(__webpack_require__(/*! ./SearchInput */ "./src/components/SearchInput/index.ts"), exports);
|
|
11342
11291
|
__exportStar(__webpack_require__(/*! ./Select */ "./src/components/Select/index.ts"), exports);
|
|
11343
|
-
__exportStar(__webpack_require__(/*! ./SelectInput */ "./src/components/SelectInput/index.ts"), exports);
|
|
11344
11292
|
__exportStar(__webpack_require__(/*! ./Sidebar */ "./src/components/Sidebar/index.ts"), exports);
|
|
11345
11293
|
__exportStar(__webpack_require__(/*! ./SidebarV2 */ "./src/components/SidebarV2/index.ts"), exports);
|
|
11346
11294
|
__exportStar(__webpack_require__(/*! ./Sidepanel */ "./src/components/Sidepanel/index.ts"), exports);
|
|
@@ -11351,7 +11299,6 @@ __exportStar(__webpack_require__(/*! ./StatusBullet */ "./src/components/StatusB
|
|
|
11351
11299
|
__exportStar(__webpack_require__(/*! ./Table */ "./src/components/Table/index.ts"), exports);
|
|
11352
11300
|
__exportStar(__webpack_require__(/*! ./Tabs */ "./src/components/Tabs/index.ts"), exports);
|
|
11353
11301
|
__exportStar(__webpack_require__(/*! ./Tag */ "./src/components/Tag/index.ts"), exports);
|
|
11354
|
-
__exportStar(__webpack_require__(/*! ./TelephoneInput */ "./src/components/TelephoneInput/index.ts"), exports);
|
|
11355
11302
|
__exportStar(__webpack_require__(/*! ./TextAreaInput */ "./src/components/TextAreaInput/index.ts"), exports);
|
|
11356
11303
|
__exportStar(__webpack_require__(/*! ./TextInput */ "./src/components/TextInput/index.ts"), exports);
|
|
11357
11304
|
__exportStar(__webpack_require__(/*! ./Throbber */ "./src/components/Throbber/index.ts"), exports);
|
|
@@ -11544,6 +11491,24 @@ const composeClassNames = (prefix) => (...args) => {
|
|
|
11544
11491
|
return [prefix, classNames].filter(Boolean).join(' ');
|
|
11545
11492
|
};
|
|
11546
11493
|
exports.composeClassNames = composeClassNames;
|
|
11494
|
+
/**
|
|
11495
|
+
* Composes class names into a single string based on flags.
|
|
11496
|
+
*
|
|
11497
|
+
* Any falsy value passed as an argument will be ignored.
|
|
11498
|
+
*
|
|
11499
|
+
* If a string is passed, it will be used as a class name.
|
|
11500
|
+
*
|
|
11501
|
+
* If a dictionary object is passed, its keys will be used as class names and its values will be used as modifiers --
|
|
11502
|
+
* unless the value is a boolean, in which case the key will be used as a class name if the value is `true`.
|
|
11503
|
+
*
|
|
11504
|
+
* @example
|
|
11505
|
+
* ```ts
|
|
11506
|
+
* cx('a', false, 'b', null, { c: true, d: false, e: 'f', f: 1 }); // 'a b c e-f f-1'
|
|
11507
|
+
* ```
|
|
11508
|
+
*
|
|
11509
|
+
* @param args a sequence of falsy values, strings and dictionary objects containing the class names
|
|
11510
|
+
* @returns a space-separated string of class names
|
|
11511
|
+
*/
|
|
11547
11512
|
const cx = (...args) => args
|
|
11548
11513
|
.flatMap((arg) => {
|
|
11549
11514
|
if (!arg) {
|
|
@@ -11564,6 +11529,20 @@ const cx = (...args) => args
|
|
|
11564
11529
|
})
|
|
11565
11530
|
.join(' ');
|
|
11566
11531
|
exports.cx = cx;
|
|
11532
|
+
/**
|
|
11533
|
+
* Composes class name modifiers under a class name into a single class names' string based on flags.
|
|
11534
|
+
*
|
|
11535
|
+
* This function returns a function similar to `cx`, with the difference it handles the arguments as class name
|
|
11536
|
+
* modifiers (based on BEM CSS conventions). However, it's recommended to use `cxx` as a curried function.
|
|
11537
|
+
*
|
|
11538
|
+
* @example
|
|
11539
|
+
* ```ts
|
|
11540
|
+
* cxx('z')('a', false, 'b', null, { c: true, d: false, e: 'f', f: 1 }); // 'z z--a z--b z--c z--e-f z--f-1'
|
|
11541
|
+
* ```
|
|
11542
|
+
* @param className the class name
|
|
11543
|
+
* @param args a sequence of falsy values, strings and dictionary objects containing the modifiers
|
|
11544
|
+
* @returns a space-separated string of class names
|
|
11545
|
+
*/
|
|
11567
11546
|
const cxx = (className) => (...args) => {
|
|
11568
11547
|
const classNames = args.flatMap((arg) => {
|
|
11569
11548
|
if (!arg) {
|
|
@@ -11599,6 +11578,33 @@ exports.cxx = cxx;
|
|
|
11599
11578
|
|
|
11600
11579
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11601
11580
|
exports.exhaustiveCheck = void 0;
|
|
11581
|
+
/**
|
|
11582
|
+
* Utility function to check exhaustiveness of a switch statement or if-else statements.
|
|
11583
|
+
*
|
|
11584
|
+
* In TypeScript, variables going through a sequence of conditionals, like cases in switch statements or if-else
|
|
11585
|
+
* statements, the variable type is incrementally narrowed as the conditionals are evaluated until it reaches the
|
|
11586
|
+
* `never` type, meaning all possible cases have been covered. This function is used to check, at compilation time, that
|
|
11587
|
+
* all possible cases have been covered (i.e. if the conditional checks were exhaustive) and should only be called in
|
|
11588
|
+
* unreachable blocks of code.
|
|
11589
|
+
*
|
|
11590
|
+
* @example
|
|
11591
|
+
* ```ts
|
|
11592
|
+
* declare const value: 'foo' | 'bar';
|
|
11593
|
+
* switch (value) {
|
|
11594
|
+
* case 'foo':
|
|
11595
|
+
* // ...
|
|
11596
|
+
* break;
|
|
11597
|
+
* case 'bar':
|
|
11598
|
+
* // ...
|
|
11599
|
+
* break;
|
|
11600
|
+
* default: // should be unreachable
|
|
11601
|
+
* exhaustiveCheck(value); // `value` type should be `never`, otherwise the compilation fails
|
|
11602
|
+
* }
|
|
11603
|
+
* ```
|
|
11604
|
+
*
|
|
11605
|
+
* @param _ the value which type should be `never`
|
|
11606
|
+
* @throws {Error} will always throw an error if it's reached
|
|
11607
|
+
*/
|
|
11602
11608
|
const exhaustiveCheck = (_) => {
|
|
11603
11609
|
throw new Error('Exhaustive check failed');
|
|
11604
11610
|
};
|
|
@@ -12043,6 +12049,7 @@ exports.fontColor = (0, memo_1.memoize)((value) => {
|
|
|
12043
12049
|
}
|
|
12044
12050
|
return (0, exports.color)(value);
|
|
12045
12051
|
});
|
|
12052
|
+
/** @deprecated **/
|
|
12046
12053
|
exports.color = (0, memo_1.memoize)((value) => {
|
|
12047
12054
|
if (typeof value !== 'string') {
|
|
12048
12055
|
return;
|
|
@@ -12148,7 +12155,7 @@ exports.fontScale = (0, memo_1.memoize)((value) => {
|
|
|
12148
12155
|
\*****************************************/
|
|
12149
12156
|
(module) {
|
|
12150
12157
|
|
|
12151
|
-
module.exports =
|
|
12158
|
+
module.exports = require("@rocket.chat/css-in-js");
|
|
12152
12159
|
|
|
12153
12160
|
/***/ },
|
|
12154
12161
|
|
|
@@ -12158,7 +12165,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_css_in_js__;
|
|
|
12158
12165
|
\**********************************************/
|
|
12159
12166
|
(module) {
|
|
12160
12167
|
|
|
12161
|
-
module.exports =
|
|
12168
|
+
module.exports = require("@rocket.chat/fuselage-hooks");
|
|
12162
12169
|
|
|
12163
12170
|
/***/ },
|
|
12164
12171
|
|
|
@@ -12168,7 +12175,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_hooks__;
|
|
|
12168
12175
|
\***********************************************************/
|
|
12169
12176
|
(module) {
|
|
12170
12177
|
|
|
12171
|
-
module.exports =
|
|
12178
|
+
module.exports = require("@rocket.chat/fuselage-tokens/colors.json");
|
|
12172
12179
|
|
|
12173
12180
|
/***/ },
|
|
12174
12181
|
|
|
@@ -12178,7 +12185,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_colors_j
|
|
|
12178
12185
|
\***************************************************************/
|
|
12179
12186
|
(module) {
|
|
12180
12187
|
|
|
12181
|
-
module.exports =
|
|
12188
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/badge.json");
|
|
12182
12189
|
|
|
12183
12190
|
/***/ },
|
|
12184
12191
|
|
|
@@ -12188,7 +12195,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_bad
|
|
|
12188
12195
|
\****************************************************************/
|
|
12189
12196
|
(module) {
|
|
12190
12197
|
|
|
12191
|
-
module.exports =
|
|
12198
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/button.json");
|
|
12192
12199
|
|
|
12193
12200
|
/***/ },
|
|
12194
12201
|
|
|
@@ -12198,7 +12205,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_but
|
|
|
12198
12205
|
\**************************************************************/
|
|
12199
12206
|
(module) {
|
|
12200
12207
|
|
|
12201
|
-
module.exports =
|
|
12208
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/font.json");
|
|
12202
12209
|
|
|
12203
12210
|
/***/ },
|
|
12204
12211
|
|
|
@@ -12208,7 +12215,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_fon
|
|
|
12208
12215
|
\****************************************************************/
|
|
12209
12216
|
(module) {
|
|
12210
12217
|
|
|
12211
|
-
module.exports =
|
|
12218
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/shadow.json");
|
|
12212
12219
|
|
|
12213
12220
|
/***/ },
|
|
12214
12221
|
|
|
@@ -12218,7 +12225,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_sha
|
|
|
12218
12225
|
\****************************************************************/
|
|
12219
12226
|
(module) {
|
|
12220
12227
|
|
|
12221
|
-
module.exports =
|
|
12228
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/status.json");
|
|
12222
12229
|
|
|
12223
12230
|
/***/ },
|
|
12224
12231
|
|
|
@@ -12228,7 +12235,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_sta
|
|
|
12228
12235
|
\**********************************************************************/
|
|
12229
12236
|
(module) {
|
|
12230
12237
|
|
|
12231
|
-
module.exports =
|
|
12238
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/statusBullet.json");
|
|
12232
12239
|
|
|
12233
12240
|
/***/ },
|
|
12234
12241
|
|
|
@@ -12238,7 +12245,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_sta
|
|
|
12238
12245
|
\****************************************************************/
|
|
12239
12246
|
(module) {
|
|
12240
12247
|
|
|
12241
|
-
module.exports =
|
|
12248
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/stroke.json");
|
|
12242
12249
|
|
|
12243
12250
|
/***/ },
|
|
12244
12251
|
|
|
@@ -12248,7 +12255,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_str
|
|
|
12248
12255
|
\*****************************************************************/
|
|
12249
12256
|
(module) {
|
|
12250
12257
|
|
|
12251
|
-
module.exports =
|
|
12258
|
+
module.exports = require("@rocket.chat/fuselage-tokens/dist/surface.json");
|
|
12252
12259
|
|
|
12253
12260
|
/***/ },
|
|
12254
12261
|
|
|
@@ -12258,7 +12265,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_dist_sur
|
|
|
12258
12265
|
\***************************************************************/
|
|
12259
12266
|
(module) {
|
|
12260
12267
|
|
|
12261
|
-
module.exports =
|
|
12268
|
+
module.exports = require("@rocket.chat/fuselage-tokens/typography.json");
|
|
12262
12269
|
|
|
12263
12270
|
/***/ },
|
|
12264
12271
|
|
|
@@ -12268,7 +12275,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_fuselage_tokens_typograp
|
|
|
12268
12275
|
\*************************************/
|
|
12269
12276
|
(module) {
|
|
12270
12277
|
|
|
12271
|
-
module.exports =
|
|
12278
|
+
module.exports = require("@rocket.chat/icons");
|
|
12272
12279
|
|
|
12273
12280
|
/***/ },
|
|
12274
12281
|
|
|
@@ -12278,7 +12285,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_icons__;
|
|
|
12278
12285
|
\************************************/
|
|
12279
12286
|
(module) {
|
|
12280
12287
|
|
|
12281
|
-
module.exports =
|
|
12288
|
+
module.exports = require("@rocket.chat/memo");
|
|
12282
12289
|
|
|
12283
12290
|
/***/ },
|
|
12284
12291
|
|
|
@@ -12288,7 +12295,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__rocket_chat_memo__;
|
|
|
12288
12295
|
\****************************/
|
|
12289
12296
|
(module) {
|
|
12290
12297
|
|
|
12291
|
-
module.exports =
|
|
12298
|
+
module.exports = require("invariant");
|
|
12292
12299
|
|
|
12293
12300
|
/***/ },
|
|
12294
12301
|
|
|
@@ -12298,7 +12305,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_invariant__;
|
|
|
12298
12305
|
\************************/
|
|
12299
12306
|
(module) {
|
|
12300
12307
|
|
|
12301
|
-
module.exports =
|
|
12308
|
+
module.exports = require("react");
|
|
12302
12309
|
|
|
12303
12310
|
/***/ },
|
|
12304
12311
|
|
|
@@ -12308,7 +12315,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
|
12308
12315
|
\*****************************/
|
|
12309
12316
|
(module) {
|
|
12310
12317
|
|
|
12311
|
-
module.exports =
|
|
12318
|
+
module.exports = require("react-aria");
|
|
12312
12319
|
|
|
12313
12320
|
/***/ },
|
|
12314
12321
|
|
|
@@ -12318,7 +12325,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_aria__;
|
|
|
12318
12325
|
\****************************/
|
|
12319
12326
|
(module) {
|
|
12320
12327
|
|
|
12321
|
-
module.exports =
|
|
12328
|
+
module.exports = require("react-dom");
|
|
12322
12329
|
|
|
12323
12330
|
/***/ },
|
|
12324
12331
|
|
|
@@ -12328,7 +12335,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;
|
|
|
12328
12335
|
\***************************/
|
|
12329
12336
|
(module) {
|
|
12330
12337
|
|
|
12331
|
-
module.exports =
|
|
12338
|
+
module.exports = require("react-is");
|
|
12332
12339
|
|
|
12333
12340
|
/***/ },
|
|
12334
12341
|
|
|
@@ -12338,7 +12345,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_is__;
|
|
|
12338
12345
|
\***********************************************/
|
|
12339
12346
|
(module) {
|
|
12340
12347
|
|
|
12341
|
-
module.exports =
|
|
12348
|
+
module.exports = require("react-keyed-flatten-children");
|
|
12342
12349
|
|
|
12343
12350
|
/***/ },
|
|
12344
12351
|
|
|
@@ -12348,7 +12355,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_keyed_flatten_children__;
|
|
|
12348
12355
|
\********************************/
|
|
12349
12356
|
(module) {
|
|
12350
12357
|
|
|
12351
|
-
module.exports =
|
|
12358
|
+
module.exports = require("react-stately");
|
|
12352
12359
|
|
|
12353
12360
|
/***/ },
|
|
12354
12361
|
|
|
@@ -12358,7 +12365,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_stately__;
|
|
|
12358
12365
|
\*********************************/
|
|
12359
12366
|
(module) {
|
|
12360
12367
|
|
|
12361
|
-
module.exports =
|
|
12368
|
+
module.exports = require("react-virtuoso");
|
|
12362
12369
|
|
|
12363
12370
|
/***/ },
|
|
12364
12371
|
|
|
@@ -12368,7 +12375,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_virtuoso__;
|
|
|
12368
12375
|
\************************************/
|
|
12369
12376
|
(module) {
|
|
12370
12377
|
|
|
12371
|
-
module.exports =
|
|
12378
|
+
module.exports = require("react/jsx-runtime");
|
|
12372
12379
|
|
|
12373
12380
|
/***/ }
|
|
12374
12381
|
|
|
@@ -12422,11 +12429,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__;
|
|
|
12422
12429
|
/******/ // Load entry module and return exports
|
|
12423
12430
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
12424
12431
|
/******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
|
|
12432
|
+
/******/ module.exports = __webpack_exports__;
|
|
12425
12433
|
/******/
|
|
12426
|
-
/******/ return __webpack_exports__;
|
|
12427
12434
|
/******/ })()
|
|
12428
12435
|
;
|
|
12429
|
-
});
|
|
12430
12436
|
})();
|
|
12431
12437
|
}
|
|
12432
12438
|
//# sourceMappingURL=fuselage.development.js.map
|