@rocket.chat/fuselage 0.82.0 → 0.84.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/AnimatedVisibility/AnimatedVisibility.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts +2 -2
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/stylingProps.d.ts +0 -19
- package/dist/components/Box/stylingProps.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/CardDivider.d.ts.map +1 -1
- package/dist/components/Chevron/Chevron.d.ts.map +1 -1
- package/dist/components/Contextualbar/Contextualbar.d.ts +1 -1
- package/dist/components/Contextualbar/Contextualbar.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/Contextualbar.d.ts +1 -1
- package/dist/components/ContextualbarV2/Contextualbar.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Flex/FlexContainer.d.ts.map +1 -1
- package/dist/components/Flex/FlexItem.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Margins/Margins.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/MenuDropdown.d.ts +23 -1
- package/dist/components/Menu/MenuDropdown.d.ts.map +1 -1
- package/dist/components/Menu/MenuPopover.d.ts +2 -2
- package/dist/components/Menu/MenuPopover.d.ts.map +1 -1
- package/dist/components/Menu/MenuPortalContext.d.ts +17 -0
- package/dist/components/Menu/MenuPortalContext.d.ts.map +1 -0
- package/dist/components/Menu/MenuSection.d.ts +7 -3
- package/dist/components/Menu/MenuSection.d.ts.map +1 -1
- package/dist/components/Menu/MenuSubmenu.d.ts +24 -0
- package/dist/components/Menu/MenuSubmenu.d.ts.map +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/stately/MenuSubmenuTrigger.d.ts +20 -0
- package/dist/components/Menu/stately/MenuSubmenuTrigger.d.ts.map +1 -0
- package/dist/components/Menu/stately/PartialNode.d.ts +2 -2
- package/dist/components/Menu/stately/PartialNode.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +5 -4
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Scrollable/Scrollable.d.ts.map +1 -1
- package/dist/components/Select/Listbox.d.ts +2 -2
- package/dist/components/Select/Listbox.d.ts.map +1 -1
- package/dist/components/Select/SelectLegacy.d.ts.map +1 -1
- package/dist/components/Sidebar/Item.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarDivider.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarWrapper.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarCollapseGroup.d.ts +2 -1
- package/dist/components/SidebarV2/SidebarCollapseGroup.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarCollapseGroupMenu.d.ts +3 -0
- package/dist/components/SidebarV2/SidebarCollapseGroupMenu.d.ts.map +1 -0
- package/dist/components/SidebarV2/SidebarGroupTitle.d.ts +2 -1
- package/dist/components/SidebarV2/SidebarGroupTitle.d.ts.map +1 -1
- package/dist/components/SidebarV2/helpers.d.ts.map +1 -1
- package/dist/components/SidebarV2/index.d.ts +1 -0
- package/dist/components/SidebarV2/index.d.ts.map +1 -1
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/fuselage.css +4 -4
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +312 -106
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +51 -51
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +20 -21
|
@@ -452,7 +452,7 @@ const AnimatedVisibility = (props) => {
|
|
|
452
452
|
if (visibility === AnimatedVisibility.HIDDEN) {
|
|
453
453
|
return null;
|
|
454
454
|
}
|
|
455
|
-
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { children: props.children
|
|
455
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: composedFn, children: props.children }));
|
|
456
456
|
};
|
|
457
457
|
AnimatedVisibility.HIDDEN = 'hidden';
|
|
458
458
|
AnimatedVisibility.VISIBLE = 'visible';
|
|
@@ -568,7 +568,7 @@ const AudioPlayer = ({ ref, src, type = 'audio/mpeg', maxPlaybackSpeed = 2, minP
|
|
|
568
568
|
handlePlaybackSpeed(1);
|
|
569
569
|
};
|
|
570
570
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
571
|
-
return ((0, jsx_runtime_1.jsxs)(__1.Box, { borderWidth: 'default',
|
|
571
|
+
return ((0, jsx_runtime_1.jsxs)(__1.Box, { borderWidth: 'default', backgroundColor: 'tint', borderColor: 'extra-light', paddingBlock: 12, paddingInlineEnd: 8, paddingInlineStart: 16, borderRadius: 'x4', width: '100%', maxWidth: 'x300', ref: containerRef, display: 'flex', alignItems: 'center', children: [(0, jsx_runtime_1.jsx)(AudioPlayerControls_1.default, { isPlaying: isPlaying, currentTime: currentTime, durationTime: durationTime, playbackSpeed: playbackSpeed, onTogglePlay: handlePlay, onSeek: (time) => {
|
|
572
572
|
if (audioRef.current) {
|
|
573
573
|
audioRef.current.currentTime = time;
|
|
574
574
|
}
|
|
@@ -620,9 +620,9 @@ const getMaskTime = (durationTime) => new Date(durationTime * 1000)
|
|
|
620
620
|
* shared/persistent one. `AudioPlayer` wraps this with its own element for the
|
|
621
621
|
* common self-contained case.
|
|
622
622
|
*/
|
|
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',
|
|
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', width: '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
|
-
: getMaskTime(durationTime) }), (0, jsx_runtime_1.jsx)(__1.Box, {
|
|
625
|
+
: getMaskTime(durationTime) }), (0, jsx_runtime_1.jsx)(__1.Box, { width: 'full', children: (0, jsx_runtime_1.jsx)(Slider_1.Slider, { "aria-label": audioPlaybackRangeLabel, showOutput: false, value: currentTime, maxValue: durationTime, onChange: (value) => onSeek(Array.isArray(value) ? value[0] : value) }) }), (0, jsx_runtime_1.jsxs)(__1.Button, { secondary: true, small: true, onClick: onChangePlaybackSpeed, "aria-label": changePlaybackSpeedLabel, children: [playbackSpeed, "x"] })] }), download && ((0, jsx_runtime_1.jsx)(__1.IconButton, { primary: true, medium: true, is: 'a', href: downloadHref, download: true, icon: 'download', "aria-label": downloadAudioFileLabel, onClick: onDownload }))] }));
|
|
626
626
|
exports["default"] = AudioPlayerControls;
|
|
627
627
|
|
|
628
628
|
|
|
@@ -736,7 +736,7 @@ function AutoComplete({ ref, value, filter, setFilter, options = [], renderItem,
|
|
|
736
736
|
(0, react_1.useEffect)(reset, [filter, reset]);
|
|
737
737
|
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-autocomplete": true, ref: containerRef, onClick: (0, fuselage_hooks_1.useStableCallback)(() => innerRef.current?.focus()), flexGrow: 1, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', flexGrow: 1, alignItems: 'center', flexWrap: 'wrap', margin: 'neg-x4', role: 'group', children: (0, jsx_runtime_1.jsxs)(Margins_1.Margins, { all: 'x4', children: [(0, jsx_runtime_1.jsx)(InputBox_1.Input, { ref: mergedRefs, onChange: (0, fuselage_hooks_1.useStableCallback)((e) => setFilter?.(e.currentTarget.value)), onBlur: handleOnBlur, onFocus: show, onKeyDown: handleKeyDown, placeholder: optionsAreVisible === AnimatedVisibility_1.AnimatedVisibility.HIDDEN || !value
|
|
738
738
|
? placeholder
|
|
739
|
-
: undefined, order: 1, "rcx-input-box--undecorated": true, value: filter, disabled: disabled, ...props }), selected.map((itemSelected) => RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { selected: itemSelected, onRemove: handleRemove }, itemSelected.value)) : ((0, jsx_runtime_1.jsx)(Chip_1.Chip, { value: itemSelected.value, children: itemSelected.label
|
|
739
|
+
: undefined, order: 1, "rcx-input-box--undecorated": true, value: filter, disabled: disabled, ...props }), selected.map((itemSelected) => RenderSelected ? ((0, jsx_runtime_1.jsx)(RenderSelected, { selected: itemSelected, onRemove: handleRemove }, itemSelected.value)) : ((0, jsx_runtime_1.jsx)(Chip_1.Chip, { value: itemSelected.value, onClick: handleRemove, children: itemSelected.label }, itemSelected.value)))] }) }), (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-autocomplete__addon": true, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: optionsAreVisible === AnimatedVisibility_1.AnimatedVisibility.VISIBLE
|
|
740
740
|
? 'cross'
|
|
741
741
|
: 'magnifier', size: 'x20', color: 'default' }) }), (0, jsx_runtime_1.jsx)(PositionAnimated_1.PositionAnimated, { visible: optionsAreVisible, anchor: containerRef, children: (0, jsx_runtime_1.jsx)(Options_1.Options, { width: borderBoxSize.inlineSize, onSelect: handleSelect, renderItem: renderItem, renderEmpty: renderEmpty, cursor: cursor, value: value, options: memoizedOptions }) })] }));
|
|
742
742
|
}
|
|
@@ -991,7 +991,7 @@ function Box({ is = 'div', ...props }) {
|
|
|
991
991
|
const propsWithoutBoxOnlyProps = (0, useBoxOnlyProps_1.useBoxOnlyProps)(propsWithoutStylingProps);
|
|
992
992
|
const element = (0, react_1.createElement)(is, propsWithoutBoxOnlyProps);
|
|
993
993
|
if (transformFn) {
|
|
994
|
-
return (0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, {
|
|
994
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: null, children: element }));
|
|
995
995
|
}
|
|
996
996
|
return element;
|
|
997
997
|
}
|
|
@@ -1154,9 +1154,6 @@ const lineHeightProp = {
|
|
|
1154
1154
|
const letterSpacingProp = {
|
|
1155
1155
|
toCSSValue: (value) => value ? String((0, styleTokens_1.fontScale)(value)?.letterSpacing || value) : undefined,
|
|
1156
1156
|
};
|
|
1157
|
-
const aliasOf = (propName) => ({
|
|
1158
|
-
aliasOf: propName,
|
|
1159
|
-
});
|
|
1160
1157
|
exports.propDefs = {
|
|
1161
1158
|
border: stringProp,
|
|
1162
1159
|
borderBlock: stringProp,
|
|
@@ -1193,7 +1190,6 @@ exports.propDefs = {
|
|
|
1193
1190
|
borderEndEndRadius: borderRadiusProp,
|
|
1194
1191
|
color: fontColorProp,
|
|
1195
1192
|
backgroundColor: backgroundColorProp,
|
|
1196
|
-
bg: aliasOf('backgroundColor'),
|
|
1197
1193
|
opacity: numberOrStringProp,
|
|
1198
1194
|
alignItems: stringProp,
|
|
1199
1195
|
alignContent: stringProp,
|
|
@@ -1210,11 +1206,9 @@ exports.propDefs = {
|
|
|
1210
1206
|
gap: gapProp,
|
|
1211
1207
|
rowGap: gapProp,
|
|
1212
1208
|
columnGap: gapProp,
|
|
1213
|
-
w: aliasOf('width'),
|
|
1214
1209
|
width: sizeProp,
|
|
1215
1210
|
minWidth: sizeProp,
|
|
1216
1211
|
maxWidth: sizeProp,
|
|
1217
|
-
h: aliasOf('height'),
|
|
1218
1212
|
height: sizeProp,
|
|
1219
1213
|
minHeight: sizeProp,
|
|
1220
1214
|
maxHeight: sizeProp,
|
|
@@ -1233,33 +1227,19 @@ exports.propDefs = {
|
|
|
1233
1227
|
insetInline: insetProp,
|
|
1234
1228
|
insetInlineStart: insetProp,
|
|
1235
1229
|
insetInlineEnd: insetProp,
|
|
1236
|
-
m: aliasOf('margin'),
|
|
1237
1230
|
margin: marginProp,
|
|
1238
|
-
mb: aliasOf('marginBlock'),
|
|
1239
1231
|
marginBlock: marginProp,
|
|
1240
|
-
mbs: aliasOf('marginBlockStart'),
|
|
1241
1232
|
marginBlockStart: marginProp,
|
|
1242
|
-
mbe: aliasOf('marginBlockEnd'),
|
|
1243
1233
|
marginBlockEnd: marginProp,
|
|
1244
|
-
mi: aliasOf('marginInline'),
|
|
1245
1234
|
marginInline: marginProp,
|
|
1246
|
-
mis: aliasOf('marginInlineStart'),
|
|
1247
1235
|
marginInlineStart: marginProp,
|
|
1248
|
-
mie: aliasOf('marginInlineEnd'),
|
|
1249
1236
|
marginInlineEnd: marginProp,
|
|
1250
|
-
p: aliasOf('padding'),
|
|
1251
1237
|
padding: paddingProp,
|
|
1252
|
-
pb: aliasOf('paddingBlock'),
|
|
1253
1238
|
paddingBlock: paddingProp,
|
|
1254
|
-
pbs: aliasOf('paddingBlockStart'),
|
|
1255
1239
|
paddingBlockStart: paddingProp,
|
|
1256
|
-
pbe: aliasOf('paddingBlockEnd'),
|
|
1257
1240
|
paddingBlockEnd: paddingProp,
|
|
1258
|
-
pi: aliasOf('paddingInline'),
|
|
1259
1241
|
paddingInline: paddingProp,
|
|
1260
|
-
pis: aliasOf('paddingInlineStart'),
|
|
1261
1242
|
paddingInlineStart: paddingProp,
|
|
1262
|
-
pie: aliasOf('paddingInlineEnd'),
|
|
1263
1243
|
paddingInlineEnd: paddingProp,
|
|
1264
1244
|
fontFamily: fontFamilyProp,
|
|
1265
1245
|
fontSize: fontSizeProp,
|
|
@@ -1358,19 +1338,6 @@ exports.propDefs = {
|
|
|
1358
1338
|
},
|
|
1359
1339
|
};
|
|
1360
1340
|
const compiledPropDefs = new Map(Object.entries(exports.propDefs).map(([propName, propDef]) => {
|
|
1361
|
-
if ('aliasOf' in propDef) {
|
|
1362
|
-
const { aliasOf: effectivePropName } = propDef;
|
|
1363
|
-
return [
|
|
1364
|
-
propName,
|
|
1365
|
-
(value, stylingProps) => {
|
|
1366
|
-
if (stylingProps.has(effectivePropName)) {
|
|
1367
|
-
return;
|
|
1368
|
-
}
|
|
1369
|
-
const inject = compiledPropDefs.get(effectivePropName);
|
|
1370
|
-
inject?.(value, stylingProps);
|
|
1371
|
-
},
|
|
1372
|
-
];
|
|
1373
|
-
}
|
|
1374
1341
|
if ('toCSSValue' in propDef) {
|
|
1375
1342
|
const cssProperty = (0, fromCamelToKebab_1.fromCamelToKebab)(propName);
|
|
1376
1343
|
const { toCSSValue } = propDef;
|
|
@@ -1529,7 +1496,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
1529
1496
|
exports.BubbleItem = void 0;
|
|
1530
1497
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1531
1498
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
1532
|
-
const BubbleItem = ({ secondary, label, icon, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { className: `rcx-bubble__item ${secondary ? 'rcx-bubble__item--secondary' : 'rcx-bubble__item--primary'}`, ...props, children: [icon && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, size: 'x16',
|
|
1499
|
+
const BubbleItem = ({ secondary, label, icon, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { className: `rcx-bubble__item ${secondary ? 'rcx-bubble__item--secondary' : 'rcx-bubble__item--primary'}`, ...props, children: [icon && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, size: 'x16', marginInlineEnd: 8 }), label && (0, jsx_runtime_1.jsx)("span", { children: label })] }));
|
|
1533
1500
|
exports.BubbleItem = BubbleItem;
|
|
1534
1501
|
|
|
1535
1502
|
|
|
@@ -1593,7 +1560,7 @@ function Button({ ref, primary, secondary, danger, warning, success, external, i
|
|
|
1593
1560
|
}
|
|
1594
1561
|
return {};
|
|
1595
1562
|
}, [primary, secondary, danger, warning, success]);
|
|
1596
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: is, type: 'button', "rcx-button": true, ...kindAndVariantProps, "rcx-button--small": small, "rcx-button--medium": medium, "rcx-button--large": large, "rcx-button--square": square, "rcx-button--tiny-square": tiny && square, "rcx-button--mini-square": mini && square, "rcx-button--small-square": small && square, "rcx-button--medium-square": medium && square, "rcx-button--large-square": large && square, "rcx-button--loading": loading, disabled: disabled || loading, ref: ref, ...extraProps, ...props, children: (0, jsx_runtime_1.jsxs)("span", { className: 'rcx-button--content', children: [icon && !loading && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: icon,
|
|
1563
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: is, type: 'button', "rcx-button": true, ...kindAndVariantProps, "rcx-button--small": small, "rcx-button--medium": medium, "rcx-button--large": large, "rcx-button--square": square, "rcx-button--tiny-square": tiny && square, "rcx-button--mini-square": mini && square, "rcx-button--small-square": small && square, "rcx-button--medium-square": medium && square, "rcx-button--large-square": large && square, "rcx-button--loading": loading, disabled: disabled || loading, ref: ref, ...extraProps, ...props, children: (0, jsx_runtime_1.jsxs)("span", { className: 'rcx-button--content', children: [icon && !loading && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: icon, marginInlineEnd: 4 })), loading && (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: 'loading', marginInlineEnd: 4 }), children] }) }));
|
|
1597
1564
|
}
|
|
1598
1565
|
exports["default"] = Button;
|
|
1599
1566
|
|
|
@@ -1944,7 +1911,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
1944
1911
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
1945
1912
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
1946
1913
|
const Grid_1 = __webpack_require__(/*! ../Grid */ "./src/components/Grid/index.ts");
|
|
1947
|
-
const CardGrid = ({ children, breakpoints, ...props }) => ((0, jsx_runtime_1.jsx)(Grid_1.Grid, { "rcx-card-grid": true,
|
|
1914
|
+
const CardGrid = ({ children, breakpoints, ...props }) => ((0, jsx_runtime_1.jsx)(Grid_1.Grid, { "rcx-card-grid": true, margin: -8, ...props, children: react_1.Children.map(children, (child) => ((0, jsx_runtime_1.jsx)(Grid_1.GridItem, { "rcx-card-grid__item": true, padding: 8, ...breakpoints, children: child }))) }));
|
|
1948
1915
|
exports["default"] = CardGrid;
|
|
1949
1916
|
|
|
1950
1917
|
|
|
@@ -2071,7 +2038,7 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
2071
2038
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
2072
2039
|
function Chevron({ up, right, down, left, size, ...props }) {
|
|
2073
2040
|
const children = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: 'chevron-down', size: size }), [size]);
|
|
2074
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span',
|
|
2041
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-chevron": true, "rcx-chevron--up": up, "rcx-chevron--right": right, "rcx-chevron--down": down, "rcx-chevron--left": left, ...props, children: children }));
|
|
2075
2042
|
}
|
|
2076
2043
|
exports["default"] = Chevron;
|
|
2077
2044
|
|
|
@@ -2161,7 +2128,7 @@ const Skeleton_1 = __webpack_require__(/*! ../Skeleton */ "./src/components/Skel
|
|
|
2161
2128
|
*/
|
|
2162
2129
|
const CodeSnippet = ({ children, onClick, buttonText = 'Copy', buttonDisabled = false, ...props }) => {
|
|
2163
2130
|
if (!children) {
|
|
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, {
|
|
2131
|
+
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, { width: '100%', "aria-hidden": true, "aria-busy": true }) }));
|
|
2165
2132
|
}
|
|
2166
2133
|
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'pre', "rcx-code-snippet": true, ...props, children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { role: 'code', "rcx-code-snippet__codebox": true, children: children }), onClick && children && ((0, jsx_runtime_1.jsx)(Box_1.Box, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { small: true, primary: true, onClick: onClick, disabled: buttonDisabled, children: buttonText }) }))] }));
|
|
2167
2134
|
};
|
|
@@ -2202,8 +2169,8 @@ const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
|
2202
2169
|
/**
|
|
2203
2170
|
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2204
2171
|
*/
|
|
2205
|
-
function Contextualbar({ width, position,
|
|
2206
|
-
return ((0, jsx_runtime_1.jsx)(__1.Box, { "rcx-vertical-bar": true,
|
|
2172
|
+
function Contextualbar({ width, position, backgroundColor = 'room', ...props }) {
|
|
2173
|
+
return ((0, jsx_runtime_1.jsx)(__1.Box, { "rcx-vertical-bar": true, backgroundColor: backgroundColor, 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 }));
|
|
2207
2174
|
}
|
|
2208
2175
|
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2209
2176
|
|
|
@@ -2315,7 +2282,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2315
2282
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2316
2283
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2317
2284
|
function ContextualbarFooter(props) {
|
|
2318
|
-
return (0, jsx_runtime_1.jsx)(__1.Box, {
|
|
2285
|
+
return (0, jsx_runtime_1.jsx)(__1.Box, { padding: 24, ...props });
|
|
2319
2286
|
}
|
|
2320
2287
|
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2321
2288
|
|
|
@@ -2334,7 +2301,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2334
2301
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2335
2302
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2336
2303
|
const Margins_1 = __webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts");
|
|
2337
|
-
const ContextualbarHeader = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', alignItems: 'center', height: 'x56',
|
|
2304
|
+
const ContextualbarHeader = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', alignItems: 'center', height: 'x56', paddingInline: 24, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', flexShrink: 0, ...props, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { marginInline: 'neg-x4', display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexGrow: 1, height: '100%', overflow: 'hidden', children: (0, jsx_runtime_1.jsx)(Margins_1.Margins, { inline: 'x4', children: children }) }) }));
|
|
2338
2305
|
exports["default"] = (0, react_1.memo)(ContextualbarHeader);
|
|
2339
2306
|
|
|
2340
2307
|
|
|
@@ -2351,7 +2318,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2351
2318
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2352
2319
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2353
2320
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
2354
|
-
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props,
|
|
2321
|
+
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, paddingInline: 2, size: 'x24' }));
|
|
2355
2322
|
exports["default"] = (0, react_1.memo)(ContextualbarIcon);
|
|
2356
2323
|
|
|
2357
2324
|
|
|
@@ -2369,7 +2336,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2369
2336
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2370
2337
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2371
2338
|
function ContextualbarSection(props) {
|
|
2372
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true,
|
|
2339
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true, paddingInline: 24, paddingBlock: 16, display: 'flex', alignItems: 'center', flexGrow: 1, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', ...props }));
|
|
2373
2340
|
}
|
|
2374
2341
|
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2375
2342
|
|
|
@@ -2393,7 +2360,7 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
2393
2360
|
const Skeleton_1 = __webpack_require__(/*! ../Skeleton */ "./src/components/Skeleton/index.ts");
|
|
2394
2361
|
const Contextualbar_1 = __importDefault(__webpack_require__(/*! ./Contextualbar */ "./src/components/Contextualbar/Contextualbar.tsx"));
|
|
2395
2362
|
const ContextualbarHeader_1 = __importDefault(__webpack_require__(/*! ./ContextualbarHeader */ "./src/components/Contextualbar/ContextualbarHeader.tsx"));
|
|
2396
|
-
const ContextualbarSkeleton = (props) => ((0, jsx_runtime_1.jsxs)(Contextualbar_1.default, { ...props, children: [(0, jsx_runtime_1.jsx)(ContextualbarHeader_1.default, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: '100%' }) }), (0, jsx_runtime_1.jsxs)(Box_1.Box, {
|
|
2363
|
+
const ContextualbarSkeleton = (props) => ((0, jsx_runtime_1.jsxs)(Contextualbar_1.default, { ...props, children: [(0, jsx_runtime_1.jsx)(ContextualbarHeader_1.default, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: '100%' }) }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { padding: 24, children: [(0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { marginBlockEnd: 4, width: '32px', height: '32px', variant: 'rect' }), Array(5)
|
|
2397
2364
|
.fill(5)
|
|
2398
2365
|
.map((_, index) => ((0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {}, index)))] })] }));
|
|
2399
2366
|
exports["default"] = (0, react_1.memo)(ContextualbarSkeleton);
|
|
@@ -2472,8 +2439,8 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
2472
2439
|
/**
|
|
2473
2440
|
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2474
2441
|
*/
|
|
2475
|
-
function Contextualbar({ width, position,
|
|
2476
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar": true,
|
|
2442
|
+
function Contextualbar({ width, position, backgroundColor = 'room', ...props }) {
|
|
2443
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar": true, backgroundColor: backgroundColor, 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 }));
|
|
2477
2444
|
}
|
|
2478
2445
|
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2479
2446
|
|
|
@@ -2585,7 +2552,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2585
2552
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2586
2553
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2587
2554
|
function ContextualbarFooter(props) {
|
|
2588
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, {
|
|
2555
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { paddingInline: 16, paddingBlock: 20, ...props });
|
|
2589
2556
|
}
|
|
2590
2557
|
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2591
2558
|
|
|
@@ -2604,7 +2571,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2604
2571
|
const css_in_js_1 = __webpack_require__(/*! @rocket.chat/css-in-js */ "@rocket.chat/css-in-js");
|
|
2605
2572
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2606
2573
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2607
|
-
const ContextualbarHeader = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', alignItems: 'center', height: 'x44',
|
|
2574
|
+
const ContextualbarHeader = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', alignItems: 'center', height: 'x44', paddingInline: 16, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', flexShrink: 0, ...props, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexGrow: 1, height: '100%', overflow: 'hidden', marginInline: -4, paddingInline: 4, className: (0, css_in_js_1.css) `
|
|
2608
2575
|
gap: 8px;
|
|
2609
2576
|
`, children: children }) }));
|
|
2610
2577
|
exports["default"] = (0, react_1.memo)(ContextualbarHeader);
|
|
@@ -2623,7 +2590,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2623
2590
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2624
2591
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2625
2592
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
2626
|
-
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props,
|
|
2593
|
+
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, paddingInline: 2, size: 'x20' }));
|
|
2627
2594
|
exports["default"] = (0, react_1.memo)(ContextualbarIcon);
|
|
2628
2595
|
|
|
2629
2596
|
|
|
@@ -2641,7 +2608,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2641
2608
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2642
2609
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2643
2610
|
function ContextualbarSection(props) {
|
|
2644
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true,
|
|
2611
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true, padding: 16, display: 'flex', alignItems: 'center', flexGrow: 1, borderBlockEndWidth: 'default', borderBlockColor: 'extra-light', ...props }));
|
|
2645
2612
|
}
|
|
2646
2613
|
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2647
2614
|
|
|
@@ -2665,7 +2632,7 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
2665
2632
|
const Skeleton_1 = __webpack_require__(/*! ../Skeleton */ "./src/components/Skeleton/index.ts");
|
|
2666
2633
|
const Contextualbar_1 = __importDefault(__webpack_require__(/*! ./Contextualbar */ "./src/components/ContextualbarV2/Contextualbar.tsx"));
|
|
2667
2634
|
const ContextualbarHeader_1 = __importDefault(__webpack_require__(/*! ./ContextualbarHeader */ "./src/components/ContextualbarV2/ContextualbarHeader.tsx"));
|
|
2668
|
-
const ContextualbarSkeleton = (props) => ((0, jsx_runtime_1.jsxs)(Contextualbar_1.default, { ...props, children: [(0, jsx_runtime_1.jsx)(ContextualbarHeader_1.default, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: '100%' }) }), (0, jsx_runtime_1.jsxs)(Box_1.Box, {
|
|
2635
|
+
const ContextualbarSkeleton = (props) => ((0, jsx_runtime_1.jsxs)(Contextualbar_1.default, { ...props, children: [(0, jsx_runtime_1.jsx)(ContextualbarHeader_1.default, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { width: '100%' }) }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { padding: 24, children: [(0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { marginBlockEnd: 4, width: '32px', height: '32px', variant: 'rect' }), Array(5)
|
|
2669
2636
|
.fill(5)
|
|
2670
2637
|
.map((_, index) => ((0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {}, index)))] })] }));
|
|
2671
2638
|
exports["default"] = (0, react_1.memo)(ContextualbarSkeleton);
|
|
@@ -2783,7 +2750,7 @@ const DropdownDesktopWrapper_1 = __webpack_require__(/*! ./DropdownDesktopWrappe
|
|
|
2783
2750
|
const DropdownMobile_1 = __webpack_require__(/*! ./DropdownMobile */ "./src/components/Dropdown/DropdownMobile.tsx");
|
|
2784
2751
|
function Dropdown({ ref, children, reference, placement = 'bottom-start', }) {
|
|
2785
2752
|
const notSmall = (0, fuselage_hooks_1.useMediaQuery)('(min-width: 500px)');
|
|
2786
|
-
return notSmall ? ((0, jsx_runtime_1.jsx)(DropdownDesktopWrapper_1.DropdownDesktopWrapper, { reference: reference,
|
|
2753
|
+
return notSmall ? ((0, jsx_runtime_1.jsx)(DropdownDesktopWrapper_1.DropdownDesktopWrapper, { reference: reference, placement: placement, ref: ref, children: children })) : ((0, jsx_runtime_1.jsx)(DropdownMobile_1.DropdownMobile, { ref: ref, children: children }));
|
|
2787
2754
|
}
|
|
2788
2755
|
exports["default"] = Dropdown;
|
|
2789
2756
|
|
|
@@ -2802,7 +2769,7 @@ exports.DropdownDesktop = DropdownDesktop;
|
|
|
2802
2769
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2803
2770
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2804
2771
|
function DropdownDesktop({ children, style, ...props }) {
|
|
2805
|
-
return ((0, jsx_runtime_1.jsx)(__1.Tile, { style: style, elevation: '2',
|
|
2772
|
+
return ((0, jsx_runtime_1.jsx)(__1.Tile, { style: style, elevation: '2', paddingInline: '0', paddingBlock: '0', display: 'flex', flexDirection: 'column', overflow: 'auto', "data-testid": 'dropdown', ...props, children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, paddingBlock: 12, children: style?.visibility === 'hidden' ? null : children }) }));
|
|
2806
2773
|
}
|
|
2807
2774
|
|
|
2808
2775
|
|
|
@@ -2842,7 +2809,7 @@ exports.DropdownMobile = DropdownMobile;
|
|
|
2842
2809
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2843
2810
|
const __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
|
|
2844
2811
|
function DropdownMobile({ children, ...props }) {
|
|
2845
|
-
return ((0, jsx_runtime_1.jsx)(__1.Tile, { elevation: '2',
|
|
2812
|
+
return ((0, jsx_runtime_1.jsx)(__1.Tile, { elevation: '2', paddingInline: '0', paddingBlock: '0', width: '100vw', maxHeight: '80%', position: 'fixed', display: 'flex', flexDirection: 'column', overflow: 'auto', style: { bottom: 0, left: 0 }, zIndex: 2, "data-testid": 'dropdown', ...props, children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, paddingBlock: 16, children: children }) }));
|
|
2846
2813
|
}
|
|
2847
2814
|
|
|
2848
2815
|
|
|
@@ -3240,7 +3207,7 @@ function FlexContainer({ inline = false, children, direction, wrap, alignItems,
|
|
|
3240
3207
|
}
|
|
3241
3208
|
return props;
|
|
3242
3209
|
}, [alignContent, alignItems, direction, inline, justifyContent, wrap]);
|
|
3243
|
-
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, {
|
|
3210
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: (0, BoxTransforms_1.useComposedBoxTransform)(transformFn), children: children }));
|
|
3244
3211
|
}
|
|
3245
3212
|
exports["default"] = FlexContainer;
|
|
3246
3213
|
|
|
@@ -3280,7 +3247,7 @@ function FlexItem({ children, order, grow, shrink, basis, align, }) {
|
|
|
3280
3247
|
}
|
|
3281
3248
|
return props;
|
|
3282
3249
|
}, [align, basis, grow, order, shrink]);
|
|
3283
|
-
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, {
|
|
3250
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: (0, BoxTransforms_1.useComposedBoxTransform)(transformFn), children: children }));
|
|
3284
3251
|
}
|
|
3285
3252
|
exports["default"] = FlexItem;
|
|
3286
3253
|
|
|
@@ -3413,7 +3380,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
3413
3380
|
const icons_1 = __importDefault(__webpack_require__(/*! @rocket.chat/icons */ "@rocket.chat/icons"));
|
|
3414
3381
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3415
3382
|
function Icon({ name, size, ...props }) {
|
|
3416
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-icon": true, "rcx-icon--name": name,
|
|
3383
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'i', "rcx-icon": true, "rcx-icon--name": name, "aria-hidden": 'true', fontSize: size, ...props, children: icons_1.default[name] }));
|
|
3417
3384
|
}
|
|
3418
3385
|
exports["default"] = Icon;
|
|
3419
3386
|
|
|
@@ -3620,7 +3587,7 @@ const LabelContext = (0, react_1.createContext)(false);
|
|
|
3620
3587
|
function Label({ disabled, is, required, children, ...props }) {
|
|
3621
3588
|
const isInsideLabel = (0, react_1.useContext)(LabelContext);
|
|
3622
3589
|
const component = is || (isInsideLabel && 'span') || 'label';
|
|
3623
|
-
return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.Box, { is: component, "rcx-label": true, "rcx-label--disabled": disabled, ...props, children: [children, required && ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-label__required": true,
|
|
3590
|
+
return ((0, jsx_runtime_1.jsx)(LabelContext.Provider, { value: true, children: (0, jsx_runtime_1.jsxs)(Box_1.Box, { is: component, "rcx-label": true, "rcx-label--disabled": disabled, ...props, children: [children, required && ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: 'span', "rcx-label__required": true, marginInlineStart: 'x4', "aria-hidden": 'true', children: "*" }))] }) }));
|
|
3624
3591
|
}
|
|
3625
3592
|
exports["default"] = Label;
|
|
3626
3593
|
|
|
@@ -3639,7 +3606,7 @@ exports.LabelInfo = void 0;
|
|
|
3639
3606
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3640
3607
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
3641
3608
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
3642
|
-
const LabelInfo = ({ title, id, ...props }) => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'span',
|
|
3609
|
+
const LabelInfo = ({ title, id, ...props }) => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { is: 'span', marginInline: 2, "rcx-label__info": true, children: [(0, jsx_runtime_1.jsx)("span", { hidden: true, id: id, children: title }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, name: 'info-circled', title: title })] }));
|
|
3643
3610
|
exports.LabelInfo = LabelInfo;
|
|
3644
3611
|
|
|
3645
3612
|
|
|
@@ -3743,7 +3710,7 @@ const Margins = (props) => {
|
|
|
3743
3710
|
const patchedChildren = (0, patchChildren_1.patchChildren)(children, (childProps) => ({
|
|
3744
3711
|
className: (0, appendClassName_1.appendClassName)(childProps.className, (0, appendClassName_1.appendClassName)(className, marginsClassName)),
|
|
3745
3712
|
}));
|
|
3746
|
-
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, {
|
|
3713
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: (0, BoxTransforms_1.useComposedBoxTransform)(transformFn), children: patchedChildren }));
|
|
3747
3714
|
};
|
|
3748
3715
|
exports["default"] = Margins;
|
|
3749
3716
|
|
|
@@ -3802,7 +3769,7 @@ const Menu = ({ icon = 'kebab', placement = 'bottom-start', title, is: MenuButto
|
|
|
3802
3769
|
const sizes = { large, medium, tiny, mini };
|
|
3803
3770
|
const defaultSmall = !large && !medium && !tiny && !mini;
|
|
3804
3771
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
3805
|
-
const popover = state.isOpen && ((0, jsx_runtime_1.jsx)(MenuPopover_1.default, { state: state, triggerRef: ref, placement: (0, helpers_1.getPlacement)(placement), maxWidth: maxWidth, children: (0, jsx_runtime_1.jsx)(MenuDropdown_1.default, { ...props, ...menuProps }) }));
|
|
3772
|
+
const popover = state.isOpen && ((0, jsx_runtime_1.jsx)(MenuPopover_1.default, { state: state, triggerRef: ref, placement: (0, helpers_1.getPlacement)(placement), maxWidth: maxWidth, children: (0, jsx_runtime_1.jsx)(MenuDropdown_1.default, { ...props, ...menuProps, rootMenuTriggerState: state }) }));
|
|
3806
3773
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [button ? ((0, react_1.cloneElement)(button, {
|
|
3807
3774
|
...buttonProps,
|
|
3808
3775
|
ref,
|
|
@@ -3836,11 +3803,21 @@ const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
|
3836
3803
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
3837
3804
|
const MenuItem_1 = __importDefault(__webpack_require__(/*! ./MenuItem */ "./src/components/Menu/MenuItem.tsx"));
|
|
3838
3805
|
const MenuSection_1 = __importDefault(__webpack_require__(/*! ./MenuSection */ "./src/components/Menu/MenuSection.tsx"));
|
|
3839
|
-
|
|
3806
|
+
const MenuSubmenu_1 = __importDefault(__webpack_require__(/*! ./MenuSubmenu */ "./src/components/Menu/MenuSubmenu.tsx"));
|
|
3807
|
+
function MenuDropDown({ rootMenuTriggerState, menuRef, ...props }) {
|
|
3840
3808
|
const state = (0, react_stately_1.useTreeState)(props);
|
|
3841
|
-
const
|
|
3809
|
+
const fallbackRef = (0, react_1.useRef)(null);
|
|
3810
|
+
const ref = menuRef ?? fallbackRef;
|
|
3842
3811
|
const { menuProps } = (0, react_aria_1.useMenu)(props, state, ref);
|
|
3843
|
-
return ((0, jsx_runtime_1.jsx)("div", { ...menuProps, ref: ref, children: [...state.collection].map((item) =>
|
|
3812
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...menuProps, ref: ref, children: [...state.collection].map((item) => {
|
|
3813
|
+
if (item.type === 'section') {
|
|
3814
|
+
return ((0, jsx_runtime_1.jsx)(MenuSection_1.default, { section: item, state: state, rootMenuTriggerState: rootMenuTriggerState, parentMenuRef: ref, onAction: props.onAction }, item.key));
|
|
3815
|
+
}
|
|
3816
|
+
if (item.hasChildNodes) {
|
|
3817
|
+
return ((0, jsx_runtime_1.jsx)(MenuSubmenu_1.default, { item: item, state: state, rootMenuTriggerState: rootMenuTriggerState, parentMenuRef: ref, onAction: props.onAction }, item.key));
|
|
3818
|
+
}
|
|
3819
|
+
return (0, jsx_runtime_1.jsx)(MenuItem_1.default, { item: item, state: state }, item.key);
|
|
3820
|
+
}) }));
|
|
3844
3821
|
}
|
|
3845
3822
|
exports["default"] = MenuDropDown;
|
|
3846
3823
|
|
|
@@ -3919,19 +3896,79 @@ exports["default"] = (0, react_2.memo)(MenuOption);
|
|
|
3919
3896
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3920
3897
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3921
3898
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
3899
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3900
|
+
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
3922
3901
|
const DropdownDesktop_1 = __webpack_require__(/*! ../Dropdown/DropdownDesktop */ "./src/components/Dropdown/DropdownDesktop.tsx");
|
|
3923
3902
|
const DropdownMobile_1 = __webpack_require__(/*! ../Dropdown/DropdownMobile */ "./src/components/Dropdown/DropdownMobile.tsx");
|
|
3924
3903
|
const Popover_1 = __webpack_require__(/*! ../Popover */ "./src/components/Popover/index.ts");
|
|
3904
|
+
const MenuPortalContext_1 = __webpack_require__(/*! ./MenuPortalContext */ "./src/components/Menu/MenuPortalContext.ts");
|
|
3925
3905
|
function MenuPopover({ children, state, offset = 4, maxWidth, ...props }) {
|
|
3926
3906
|
const isMobile = !(0, fuselage_hooks_1.useBreakpoints)().includes('sm');
|
|
3927
|
-
|
|
3928
|
-
|
|
3907
|
+
// The root popover (no container above it) renders a `display: contents`
|
|
3908
|
+
// mount point and shares it with the rest of the tree. Submenu popovers
|
|
3909
|
+
// portal into it, so their DOM nests under the root popover and the whole
|
|
3910
|
+
// tree behaves as one for focus/`aria-hidden` purposes — matching how
|
|
3911
|
+
// `react-aria-components` groups submenu popovers via `PopoverGroupContext`.
|
|
3912
|
+
const groupContainer = (0, MenuPortalContext_1.useMenuPortalContainer)();
|
|
3913
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
3914
|
+
const isSubmenu = groupContainer !== null;
|
|
3915
|
+
const popoverRef = (0, react_1.useRef)(null);
|
|
3916
|
+
// react-aria only lets the *topmost* overlay dismiss on an outside click.
|
|
3917
|
+
// While a submenu is open it is topmost, but submenus are non-modal (hence
|
|
3918
|
+
// non-dismissable), so neither the submenu nor the root closes. Since every
|
|
3919
|
+
// open submenu portals into the root popover, the root popover element
|
|
3920
|
+
// contains the entire menu tree — so we close the whole menu on any
|
|
3921
|
+
// interaction outside it (ignoring the trigger, which toggles on its own).
|
|
3922
|
+
(0, react_aria_1.useInteractOutside)({
|
|
3923
|
+
ref: popoverRef,
|
|
3924
|
+
isDisabled: isSubmenu,
|
|
3925
|
+
onInteractOutside: (event) => {
|
|
3926
|
+
const trigger = props.triggerRef?.current;
|
|
3927
|
+
if (trigger && trigger.contains(event.target)) {
|
|
3928
|
+
return;
|
|
3929
|
+
}
|
|
3930
|
+
state.close();
|
|
3931
|
+
},
|
|
3932
|
+
});
|
|
3933
|
+
const popover = ((0, jsx_runtime_1.jsxs)(Popover_1.Popover, { state: state, offset: offset, popoverRef: popoverRef, ...props, portalContainer: isSubmenu ? (groupContainer?.current ?? undefined) : undefined, children: [isMobile ? ((0, jsx_runtime_1.jsx)(DropdownMobile_1.DropdownMobile, { children: children })) : ((0, jsx_runtime_1.jsx)(DropdownDesktop_1.DropdownDesktop, { maxHeight: '80vh', overflowY: 'auto', maxWidth: maxWidth, children: children })), !isSubmenu && ((0, jsx_runtime_1.jsx)("span", { ref: containerRef, style: { display: 'contents' } }))] }));
|
|
3934
|
+
if (isSubmenu) {
|
|
3935
|
+
return popover;
|
|
3929
3936
|
}
|
|
3930
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
3937
|
+
return ((0, jsx_runtime_1.jsx)(MenuPortalContext_1.MenuPortalContext.Provider, { value: containerRef, children: popover }));
|
|
3931
3938
|
}
|
|
3932
3939
|
exports["default"] = MenuPopover;
|
|
3933
3940
|
|
|
3934
3941
|
|
|
3942
|
+
/***/ },
|
|
3943
|
+
|
|
3944
|
+
/***/ "./src/components/Menu/MenuPortalContext.ts"
|
|
3945
|
+
/*!**************************************************!*\
|
|
3946
|
+
!*** ./src/components/Menu/MenuPortalContext.ts ***!
|
|
3947
|
+
\**************************************************/
|
|
3948
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3952
|
+
exports.useMenuPortalContainer = exports.MenuPortalContext = void 0;
|
|
3953
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3954
|
+
/**
|
|
3955
|
+
* Ref to the root menu popover's portal container.
|
|
3956
|
+
*
|
|
3957
|
+
* Submenu popovers portal into this container instead of straight into
|
|
3958
|
+
* `document.body`, so the whole menu tree lives in a single DOM subtree nested
|
|
3959
|
+
* under the root popover. This mirrors `react-aria-components`'
|
|
3960
|
+
* `PopoverGroupContext` and is what keeps focus tracking and `aria-hidden`
|
|
3961
|
+
* scoping correct across submenu levels — without it each portaled submenu
|
|
3962
|
+
* looks like "outside" to the root popover and close-on-blur tears the tree
|
|
3963
|
+
* down.
|
|
3964
|
+
*
|
|
3965
|
+
* `null` means there is no root yet, i.e. the consuming popover IS the root.
|
|
3966
|
+
*/
|
|
3967
|
+
exports.MenuPortalContext = (0, react_1.createContext)(null);
|
|
3968
|
+
const useMenuPortalContainer = () => (0, react_1.useContext)(exports.MenuPortalContext);
|
|
3969
|
+
exports.useMenuPortalContainer = useMenuPortalContainer;
|
|
3970
|
+
|
|
3971
|
+
|
|
3935
3972
|
/***/ },
|
|
3936
3973
|
|
|
3937
3974
|
/***/ "./src/components/Menu/MenuSection.tsx"
|
|
@@ -3951,7 +3988,8 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
3951
3988
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
3952
3989
|
const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
3953
3990
|
const MenuItem_1 = __importDefault(__webpack_require__(/*! ./MenuItem */ "./src/components/Menu/MenuItem.tsx"));
|
|
3954
|
-
|
|
3991
|
+
const MenuSubmenu_1 = __importDefault(__webpack_require__(/*! ./MenuSubmenu */ "./src/components/Menu/MenuSubmenu.tsx"));
|
|
3992
|
+
function MenuSection({ section, state, rootMenuTriggerState, parentMenuRef, onAction, }) {
|
|
3955
3993
|
const { itemProps, headingProps, groupProps } = (0, react_aria_1.useMenuSection)({
|
|
3956
3994
|
'heading': section.rendered,
|
|
3957
3995
|
'aria-label': section['aria-label'],
|
|
@@ -3960,11 +3998,85 @@ function MenuSection({ section, state, }) {
|
|
|
3960
3998
|
elementType: 'span',
|
|
3961
3999
|
});
|
|
3962
4000
|
// If the section is not the first, add a separator element.
|
|
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,
|
|
4001
|
+
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, padding: '0', children: [...section.childNodes].map((node) => node.hasChildNodes ? ((0, jsx_runtime_1.jsx)(MenuSubmenu_1.default, { item: node, state: state, rootMenuTriggerState: rootMenuTriggerState, parentMenuRef: parentMenuRef, onAction: onAction }, node.key)) : ((0, jsx_runtime_1.jsx)(MenuItem_1.default, { item: node, state: state }, node.key))) })] })] }));
|
|
3964
4002
|
}
|
|
3965
4003
|
exports["default"] = MenuSection;
|
|
3966
4004
|
|
|
3967
4005
|
|
|
4006
|
+
/***/ },
|
|
4007
|
+
|
|
4008
|
+
/***/ "./src/components/Menu/MenuSubmenu.tsx"
|
|
4009
|
+
/*!*********************************************!*\
|
|
4010
|
+
!*** ./src/components/Menu/MenuSubmenu.tsx ***!
|
|
4011
|
+
\*********************************************/
|
|
4012
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4013
|
+
|
|
4014
|
+
|
|
4015
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4016
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4017
|
+
};
|
|
4018
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4019
|
+
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
4020
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4021
|
+
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
4022
|
+
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
4023
|
+
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
4024
|
+
const MenuDropdown_1 = __importDefault(__webpack_require__(/*! ./MenuDropdown */ "./src/components/Menu/MenuDropdown.tsx"));
|
|
4025
|
+
const MenuOption_1 = __importDefault(__webpack_require__(/*! ./MenuOption */ "./src/components/Menu/MenuOption.tsx"));
|
|
4026
|
+
const MenuPopover_1 = __importDefault(__webpack_require__(/*! ./MenuPopover */ "./src/components/Menu/MenuPopover.tsx"));
|
|
4027
|
+
/**
|
|
4028
|
+
* Renders a menu item that opens a nested submenu.
|
|
4029
|
+
*
|
|
4030
|
+
* The trigger item belongs to the parent menu's tree state (so arrow-key
|
|
4031
|
+
* navigation keeps working), while the submenu renders its own `MenuDropDown`
|
|
4032
|
+
* built from the trigger's children — giving it an isolated collection and
|
|
4033
|
+
* focus scope, mirroring how `react-aria-components` handles `SubmenuTrigger`.
|
|
4034
|
+
*/
|
|
4035
|
+
function MenuSubmenu({ item, state, rootMenuTriggerState, parentMenuRef, onAction, }) {
|
|
4036
|
+
const triggerRef = (0, react_1.useRef)(null);
|
|
4037
|
+
const submenuRef = (0, react_1.useRef)(null);
|
|
4038
|
+
const submenuTriggerState = (0, react_stately_1.useSubmenuTriggerState)({ triggerKey: item.key }, rootMenuTriggerState);
|
|
4039
|
+
const { submenuTriggerProps, submenuProps, popoverProps } = (0, react_aria_1.useSubmenuTrigger)({ parentMenuRef, submenuRef }, submenuTriggerState, triggerRef);
|
|
4040
|
+
/** react-aria's submenu hooks bind Escape to `state.closeAll()`, tearing down the whole menu tree. We override Escape so it dismisses only this submenu level — keeping its ancestors open — matching react-aria-components, where Escape closes the latest open submenu one level at a time.
|
|
4041
|
+
**/
|
|
4042
|
+
const closeSubmenu = () => {
|
|
4043
|
+
// Mirror the ArrowLeft behavior: move focus back to the trigger so the parent menu stays keyboard-navigable and a subsequent Escape closes the next level up.
|
|
4044
|
+
triggerRef.current?.focus();
|
|
4045
|
+
submenuTriggerState.close();
|
|
4046
|
+
};
|
|
4047
|
+
/** Fires when focus is inside the submenu (keyboard navigation). */
|
|
4048
|
+
const onSubmenuKeyDown = (event) => {
|
|
4049
|
+
if (event.key === 'Escape') {
|
|
4050
|
+
event.stopPropagation();
|
|
4051
|
+
closeSubmenu();
|
|
4052
|
+
return;
|
|
4053
|
+
}
|
|
4054
|
+
submenuProps.onKeyDown?.(event);
|
|
4055
|
+
};
|
|
4056
|
+
/** Fires when focus is on the trigger itself (e.g. a hover/press-opened submenu). When this submenu is open, close just it; once it's closed, let Escape bubble so the parent menu handles the next level up.
|
|
4057
|
+
**/
|
|
4058
|
+
const onTriggerKeyDown = (event) => {
|
|
4059
|
+
if (event.key === 'Escape') {
|
|
4060
|
+
if (submenuTriggerState.isOpen) {
|
|
4061
|
+
closeSubmenu();
|
|
4062
|
+
return;
|
|
4063
|
+
}
|
|
4064
|
+
event.continuePropagation();
|
|
4065
|
+
return;
|
|
4066
|
+
}
|
|
4067
|
+
submenuTriggerProps.onKeyDown?.(event);
|
|
4068
|
+
};
|
|
4069
|
+
const { menuItemProps, isFocused, isDisabled } = (0, react_aria_1.useMenuItem)({ ...submenuTriggerProps, onKeyDown: onTriggerKeyDown, key: item.key }, state, triggerRef);
|
|
4070
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MenuOption_1.default, { ...(0, react_aria_1.mergeProps)(menuItemProps, {
|
|
4071
|
+
'id': submenuTriggerProps.id,
|
|
4072
|
+
'aria-haspopup': submenuTriggerProps['aria-haspopup'],
|
|
4073
|
+
'aria-expanded': submenuTriggerProps['aria-expanded'],
|
|
4074
|
+
'aria-controls': submenuTriggerProps['aria-controls'],
|
|
4075
|
+
}), ref: triggerRef, focus: isFocused, disabled: isDisabled, is: 'div', variant: item.value?.variant, children: (0, jsx_runtime_1.jsxs)("div", { className: 'rcx-option__wrapper', children: [item.rendered, (0, jsx_runtime_1.jsx)("div", { className: 'rcx-option__input', children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: 'chevron-left', size: 'x16' }) })] }) }), submenuTriggerState.isOpen && ((0, jsx_runtime_1.jsx)(MenuPopover_1.default, { ...popoverProps, state: submenuTriggerState, triggerRef: triggerRef, placement: 'right top', children: (0, jsx_runtime_1.jsx)(MenuDropdown_1.default, { ...submenuProps, onKeyDown: onSubmenuKeyDown, rootMenuTriggerState: rootMenuTriggerState, menuRef: submenuRef, onAction: onAction, children: item.props?.children }) }))] }));
|
|
4076
|
+
}
|
|
4077
|
+
exports["default"] = MenuSubmenu;
|
|
4078
|
+
|
|
4079
|
+
|
|
3968
4080
|
/***/ },
|
|
3969
4081
|
|
|
3970
4082
|
/***/ "./src/components/Menu/helpers/helpers.ts"
|
|
@@ -4023,11 +4135,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4023
4135
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4024
4136
|
};
|
|
4025
4137
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4026
|
-
exports.MenuItemDescription = exports.MenuItemTitle = exports.MenuItemSkeleton = exports.MenuItemInput = exports.MenuItemIcon = exports.MenuItemContent = exports.MenuItemColumn = exports.MenuItemAvatar = exports.MenuSection = exports.MenuItem = exports.Menu = void 0;
|
|
4138
|
+
exports.MenuItemDescription = exports.MenuItemTitle = exports.MenuItemSkeleton = exports.MenuItemInput = exports.MenuItemIcon = exports.MenuItemContent = exports.MenuItemColumn = exports.MenuItemAvatar = exports.MenuSection = exports.MenuSubmenuTrigger = exports.MenuItem = exports.Menu = void 0;
|
|
4027
4139
|
var Menu_1 = __webpack_require__(/*! ./Menu */ "./src/components/Menu/Menu.tsx");
|
|
4028
4140
|
Object.defineProperty(exports, "Menu", ({ enumerable: true, get: function () { return __importDefault(Menu_1).default; } }));
|
|
4029
4141
|
var MenuItem_1 = __webpack_require__(/*! ./stately/MenuItem */ "./src/components/Menu/stately/MenuItem.tsx");
|
|
4030
4142
|
Object.defineProperty(exports, "MenuItem", ({ enumerable: true, get: function () { return __importDefault(MenuItem_1).default; } }));
|
|
4143
|
+
var MenuSubmenuTrigger_1 = __webpack_require__(/*! ./stately/MenuSubmenuTrigger */ "./src/components/Menu/stately/MenuSubmenuTrigger.tsx");
|
|
4144
|
+
Object.defineProperty(exports, "MenuSubmenuTrigger", ({ enumerable: true, get: function () { return __importDefault(MenuSubmenuTrigger_1).default; } }));
|
|
4031
4145
|
var MenuSection_1 = __webpack_require__(/*! ./stately/MenuSection */ "./src/components/Menu/stately/MenuSection.tsx");
|
|
4032
4146
|
Object.defineProperty(exports, "MenuSection", ({ enumerable: true, get: function () { return __importDefault(MenuSection_1).default; } }));
|
|
4033
4147
|
var Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
@@ -4160,6 +4274,74 @@ MenuSection.getCollectionNode = function* getCollectionNode(props) {
|
|
|
4160
4274
|
exports["default"] = MenuSection;
|
|
4161
4275
|
|
|
4162
4276
|
|
|
4277
|
+
/***/ },
|
|
4278
|
+
|
|
4279
|
+
/***/ "./src/components/Menu/stately/MenuSubmenuTrigger.tsx"
|
|
4280
|
+
/*!************************************************************!*\
|
|
4281
|
+
!*** ./src/components/Menu/stately/MenuSubmenuTrigger.tsx ***!
|
|
4282
|
+
\************************************************************/
|
|
4283
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4284
|
+
|
|
4285
|
+
|
|
4286
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4287
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
4288
|
+
function MenuSubmenuTrigger(_props) {
|
|
4289
|
+
return null;
|
|
4290
|
+
}
|
|
4291
|
+
const toElementArray = (children) => {
|
|
4292
|
+
const result = [];
|
|
4293
|
+
const visit = (node) => {
|
|
4294
|
+
if (Array.isArray(node)) {
|
|
4295
|
+
node.forEach(visit);
|
|
4296
|
+
return;
|
|
4297
|
+
}
|
|
4298
|
+
if ((0, react_1.isValidElement)(node)) {
|
|
4299
|
+
result.push(node);
|
|
4300
|
+
}
|
|
4301
|
+
};
|
|
4302
|
+
visit(children);
|
|
4303
|
+
return result;
|
|
4304
|
+
};
|
|
4305
|
+
MenuSubmenuTrigger.getCollectionNode = function* getCollectionNode(props, context) {
|
|
4306
|
+
const [trigger, ...submenuItems] = toElementArray(props.children);
|
|
4307
|
+
if (!trigger || submenuItems.length === 0) {
|
|
4308
|
+
throw new Error('A <MenuSubmenuTrigger> must have at least two children: the trigger item followed by one or more submenu items.');
|
|
4309
|
+
}
|
|
4310
|
+
const rendered = trigger.props.children;
|
|
4311
|
+
const textValue = props.textValue ||
|
|
4312
|
+
trigger.props.textValue ||
|
|
4313
|
+
(typeof rendered === 'string' ? rendered : '') ||
|
|
4314
|
+
props['aria-label'] ||
|
|
4315
|
+
trigger.props['aria-label'] ||
|
|
4316
|
+
'';
|
|
4317
|
+
if (!textValue && !context?.suppressTextValueWarning) {
|
|
4318
|
+
console.warn('<MenuSubmenuTrigger> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop.');
|
|
4319
|
+
}
|
|
4320
|
+
yield {
|
|
4321
|
+
'type': 'item',
|
|
4322
|
+
// Only the submenu items are forwarded as children — the trigger element is
|
|
4323
|
+
// consumed here and rendered separately by `MenuSubmenu`.
|
|
4324
|
+
'props': { ...props, children: submenuItems },
|
|
4325
|
+
rendered,
|
|
4326
|
+
textValue,
|
|
4327
|
+
'aria-label': props['aria-label'] || trigger.props['aria-label'],
|
|
4328
|
+
'value': (props.variant
|
|
4329
|
+
? { variant: props.variant }
|
|
4330
|
+
: undefined),
|
|
4331
|
+
'hasChildNodes': true,
|
|
4332
|
+
*'childNodes'() {
|
|
4333
|
+
for (const item of submenuItems) {
|
|
4334
|
+
yield {
|
|
4335
|
+
type: 'item',
|
|
4336
|
+
element: item,
|
|
4337
|
+
};
|
|
4338
|
+
}
|
|
4339
|
+
},
|
|
4340
|
+
};
|
|
4341
|
+
};
|
|
4342
|
+
exports["default"] = MenuSubmenuTrigger;
|
|
4343
|
+
|
|
4344
|
+
|
|
4163
4345
|
/***/ },
|
|
4164
4346
|
|
|
4165
4347
|
/***/ "./src/components/Message/Message.tsx"
|
|
@@ -5671,7 +5853,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5671
5853
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5672
5854
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
5673
5855
|
const Scrollable_1 = __webpack_require__(/*! ../Scrollable */ "./src/components/Scrollable/index.ts");
|
|
5674
|
-
const ModalContent = ({ children, onScrollContent, ...props }) => ((0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, onScrollContent: onScrollContent, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-modal__content": true, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-modal__content-wrapper": true,
|
|
5856
|
+
const ModalContent = ({ children, onScrollContent, ...props }) => ((0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { vertical: true, onScrollContent: onScrollContent, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-modal__content": true, children: (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-modal__content-wrapper": true, marginInline: 24, ...props, children: children }) }) }));
|
|
5675
5857
|
exports["default"] = ModalContent;
|
|
5676
5858
|
|
|
5677
5859
|
|
|
@@ -5785,7 +5967,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5785
5967
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
5786
5968
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
5787
5969
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
5788
|
-
const ModalIcon = ({ size = 'x20', name, alignItems = 'center', ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { ...props, display: 'flex', alignItems: alignItems, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, {
|
|
5970
|
+
const ModalIcon = ({ size = 'x20', name, alignItems = 'center', ...props }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { ...props, display: 'flex', alignItems: alignItems, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { marginBlock: 4, name: name, size: size }) }));
|
|
5789
5971
|
exports["default"] = ModalIcon;
|
|
5790
5972
|
|
|
5791
5973
|
|
|
@@ -7081,7 +7263,7 @@ const PaginatedSelect = ({ value, withTitle, filter, setFilter: _setFilter, erro
|
|
|
7081
7263
|
return show();
|
|
7082
7264
|
}
|
|
7083
7265
|
});
|
|
7084
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), ...props, children: [(0, jsx_runtime_1.jsxs)(PaginatedSelectWrapper_1.default, { display: 'flex',
|
|
7266
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), ...props, children: [(0, jsx_runtime_1.jsxs)(PaginatedSelectWrapper_1.default, { display: 'flex', marginInline: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText, children: [visibleText && ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexGrow: 1, is: 'span', marginInline: 4, "rcx-select__item": true, fontScale: 'p2m', color: valueLabel ? 'default' : 'hint', children: visibleText })), (0, jsx_runtime_1.jsx)(Anchor, { disabled: disabled, "rcx-input-box--undecorated": true, filter: filter, ref: ref, "aria-haspopup": 'listbox', onClick: show, onBlur: hide }), (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
|
|
7085
7267
|
? 'chevron-up'
|
|
7086
7268
|
: 'chevron-down', size: 'x20' }) }) })] }), (0, jsx_runtime_1.jsx)(PositionAnimated_1.PositionAnimated, { visible: visible, anchor: containerRef, children: (0, jsx_runtime_1.jsx)(_Options, { withTitle: withTitle, width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: options, onSelect: internalChangedByClick, endReached: endReached, onMouseDown: prevent_1.prevent, renderItem: renderItem }) })] }));
|
|
7087
7269
|
};
|
|
@@ -7103,7 +7285,7 @@ const react_1 = __webpack_require__(/*! react */ "react");
|
|
|
7103
7285
|
const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
7104
7286
|
const PaginatedSelect_1 = __webpack_require__(/*! ./PaginatedSelect */ "./src/components/PaginatedSelect/PaginatedSelect.tsx");
|
|
7105
7287
|
const PaginatedSelectFiltered = ({ filter, setFilter, options, placeholder, ...props }) => {
|
|
7106
|
-
const anchor = (0, react_1.useMemo)(() => ({ filter, onChange: _onChange, ...props }) => ((0, jsx_runtime_1.jsx)(InputBox_1.Input, {
|
|
7288
|
+
const anchor = (0, react_1.useMemo)(() => ({ filter, onChange: _onChange, ...props }) => ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { marginInline: 4, flexGrow: 1, className: 'rcx-select__focus', placeholder: placeholder, value: filter, onChange: (e) => {
|
|
7107
7289
|
setFilter(e.currentTarget.value);
|
|
7108
7290
|
}, ...props, "rcx-input-box--undecorated": true })), [placeholder, setFilter]);
|
|
7109
7291
|
return ((0, jsx_runtime_1.jsx)(PaginatedSelect_1.PaginatedSelect, { placeholder: undefined, filter: filter, options: options, ...props, anchor: anchor }));
|
|
@@ -7782,8 +7964,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
7782
7964
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7783
7965
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
7784
7966
|
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
7785
|
-
function Popover({ portalContainer, ...props }) {
|
|
7786
|
-
const
|
|
7967
|
+
function Popover({ portalContainer, popoverRef: popoverRefProp, ...props }) {
|
|
7968
|
+
const fallbackRef = (0, react_1.useRef)(null);
|
|
7969
|
+
const popoverRef = popoverRefProp ?? fallbackRef;
|
|
7787
7970
|
const { state, children, isNonModal } = props;
|
|
7788
7971
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
7789
7972
|
const { popoverProps, underlayProps } = (0, react_aria_1.usePopover)({
|
|
@@ -7791,7 +7974,7 @@ function Popover({ portalContainer, ...props }) {
|
|
|
7791
7974
|
popoverRef,
|
|
7792
7975
|
boundaryElement: ownerDocument?.body,
|
|
7793
7976
|
}, state);
|
|
7794
|
-
return ((0, jsx_runtime_1.jsxs)(react_aria_1.Overlay, { portalContainer: ownerDocument?.body, children: [!isNonModal && (0, jsx_runtime_1.jsx)("div", { ...underlayProps }), (0, jsx_runtime_1.jsxs)("div", { ...popoverProps, ref: popoverRef, children: [!isNonModal && (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close }), children, (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close })] })] }));
|
|
7977
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_1.Overlay, { portalContainer: portalContainer ?? ownerDocument?.body, children: [!isNonModal && (0, jsx_runtime_1.jsx)("div", { ...underlayProps }), (0, jsx_runtime_1.jsxs)("div", { ...popoverProps, ref: popoverRef, children: [!isNonModal && (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close }), children, (0, jsx_runtime_1.jsx)(react_aria_1.DismissButton, { onDismiss: state.close })] })] }));
|
|
7795
7978
|
}
|
|
7796
7979
|
exports["default"] = Popover;
|
|
7797
7980
|
|
|
@@ -7931,7 +8114,7 @@ const getColor = (isLight, variant, error) => {
|
|
|
7931
8114
|
* The `ProgressBar` is used to inform the user the progress of an operation.
|
|
7932
8115
|
*/
|
|
7933
8116
|
function ProgressBar({ percentage, variant = 'info', error, animated, light = false, ...props }) {
|
|
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, {
|
|
8117
|
+
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, { backgroundColor: getColor(light, variant, error), "rcx-progress-bar__fill--animated": animated, "rcx-progress-bar__fill": true, width: getWidth(percentage) }) }));
|
|
7935
8118
|
}
|
|
7936
8119
|
exports["default"] = ProgressBar;
|
|
7937
8120
|
|
|
@@ -8096,7 +8279,7 @@ const Scrollable = ({ children, horizontal, vertical, smooth, onScrollContent, }
|
|
|
8096
8279
|
}
|
|
8097
8280
|
return props;
|
|
8098
8281
|
}, [className, handleScroll, onScrollContent]);
|
|
8099
|
-
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, {
|
|
8282
|
+
return ((0, jsx_runtime_1.jsx)(BoxTransforms_1.BoxTransforms.Provider, { value: (0, BoxTransforms_1.useComposedBoxTransform)(transformFn), children: children }));
|
|
8100
8283
|
};
|
|
8101
8284
|
exports["default"] = Scrollable;
|
|
8102
8285
|
|
|
@@ -8322,7 +8505,7 @@ const InputBox_1 = __webpack_require__(/*! ../InputBox */ "./src/components/Inpu
|
|
|
8322
8505
|
const SelectFilteredContext_1 = __webpack_require__(/*! ./SelectFilteredContext */ "./src/components/Select/SelectFilteredContext.ts");
|
|
8323
8506
|
function SelectFilteredAnchor({ children: _children, ...props }) {
|
|
8324
8507
|
const { placeholder, filter, setFilter } = (0, react_1.use)(SelectFilteredContext_1.SelectFilteredContext);
|
|
8325
|
-
return ((0, jsx_runtime_1.jsx)(InputBox_1.Input, {
|
|
8508
|
+
return ((0, jsx_runtime_1.jsx)(InputBox_1.Input, { marginInline: 4, flexGrow: 1, className: 'rcx-select__focus', placeholder: placeholder, value: filter, onInput: (e) => setFilter?.(e.currentTarget.value), ...props, "rcx-input-box--undecorated": true }));
|
|
8326
8509
|
}
|
|
8327
8510
|
exports["default"] = SelectFilteredAnchor;
|
|
8328
8511
|
|
|
@@ -8438,8 +8621,8 @@ function SelectLegacy({ ref, value, filter, error, disabled, options = [], ancho
|
|
|
8438
8621
|
innerRef.current?.focus();
|
|
8439
8622
|
return show();
|
|
8440
8623
|
});
|
|
8441
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), ...props, children: [(0, jsx_runtime_1.jsxs)(Wrapper, { display: 'flex',
|
|
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',
|
|
8624
|
+
return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0, react_1.useMemo)(() => [error && 'invalid', disabled && 'disabled'], [error, disabled]), ...props, children: [(0, jsx_runtime_1.jsxs)(Wrapper, { display: 'flex', marginInline: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText, children: [visibleText &&
|
|
8625
|
+
(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', marginInline: 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
|
|
8443
8626
|
? 'chevron-up'
|
|
8444
8627
|
: 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 }) })] }));
|
|
8445
8628
|
}
|
|
@@ -8641,7 +8824,7 @@ exports["default"] = SidebarBanner;
|
|
|
8641
8824
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8642
8825
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8643
8826
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
8644
|
-
const SidebarDivider = () => (0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidebar--divider": true,
|
|
8827
|
+
const SidebarDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidebar--divider": true, marginBlockStart: -2, marginBlockEnd: 0 }));
|
|
8645
8828
|
exports["default"] = SidebarDivider;
|
|
8646
8829
|
|
|
8647
8830
|
|
|
@@ -9075,13 +9258,13 @@ exports.SidebarCollapseGroup = SidebarCollapseGroup;
|
|
|
9075
9258
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9076
9259
|
const SidebarGroupTitle_1 = __webpack_require__(/*! ./SidebarGroupTitle */ "./src/components/SidebarV2/SidebarGroupTitle.tsx");
|
|
9077
9260
|
const useCollapse_1 = __webpack_require__(/*! ./hooks/useCollapse */ "./src/components/SidebarV2/hooks/useCollapse.tsx");
|
|
9078
|
-
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, title, ...props }) {
|
|
9261
|
+
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, menu, title, ...props }) {
|
|
9079
9262
|
const { barProps, expanded, panelExpanded, panelId, titleId } = (0, useCollapse_1.useCollapse)({
|
|
9080
9263
|
expanded: propExpanded,
|
|
9081
9264
|
defaultExpanded,
|
|
9082
9265
|
tabIndex,
|
|
9083
9266
|
});
|
|
9084
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: 'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group', ...props, children: [(0, jsx_runtime_1.jsx)(SidebarGroupTitle_1.SidebarGroupTitle, { expanded: expanded, title: title, titleId: titleId, badge: badge, barProps: barProps, role: 'button' }), (0, jsx_runtime_1.jsx)("div", { role: 'list', ref: ref, className: [
|
|
9267
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: 'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group', ...props, children: [(0, jsx_runtime_1.jsx)(SidebarGroupTitle_1.SidebarGroupTitle, { expanded: expanded, title: title, titleId: titleId, badge: badge, menu: menu, barProps: barProps, role: 'button' }), (0, jsx_runtime_1.jsx)("div", { role: 'list', ref: ref, className: [
|
|
9085
9268
|
'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group__panel rcx-box--animated',
|
|
9086
9269
|
panelExpanded && 'rcx-sidebar-v2-collapse-group__panel--expanded',
|
|
9087
9270
|
]
|
|
@@ -9090,6 +9273,26 @@ function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, ta
|
|
|
9090
9273
|
}
|
|
9091
9274
|
|
|
9092
9275
|
|
|
9276
|
+
/***/ },
|
|
9277
|
+
|
|
9278
|
+
/***/ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx"
|
|
9279
|
+
/*!***************************************************************!*\
|
|
9280
|
+
!*** ./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx ***!
|
|
9281
|
+
\***************************************************************/
|
|
9282
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
9283
|
+
|
|
9284
|
+
|
|
9285
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9286
|
+
exports.SidebarCollapseGroupMenu = void 0;
|
|
9287
|
+
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9288
|
+
const appendClassName_1 = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
9289
|
+
const patchChildren_1 = __webpack_require__(/*! ../../helpers/patchChildren */ "./src/helpers/patchChildren.ts");
|
|
9290
|
+
const SidebarCollapseGroupMenu = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group__menu-wrapper rcx-box--animated', ...props, children: (0, patchChildren_1.patchChildren)((0, jsx_runtime_1.jsx)("span", { className: 'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group__menu', children: children }), (childProps) => ({
|
|
9291
|
+
className: (0, appendClassName_1.appendClassName)(childProps.className, 'rcx-sidebar-v2-collapse-group__menu'),
|
|
9292
|
+
})) }));
|
|
9293
|
+
exports.SidebarCollapseGroupMenu = SidebarCollapseGroupMenu;
|
|
9294
|
+
|
|
9295
|
+
|
|
9093
9296
|
/***/ },
|
|
9094
9297
|
|
|
9095
9298
|
/***/ "./src/components/SidebarV2/SidebarDivider.tsx"
|
|
@@ -9103,7 +9306,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
9103
9306
|
exports.SidebarDivider = void 0;
|
|
9104
9307
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9105
9308
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
9106
|
-
const SidebarDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidebar-v2--divider": true,
|
|
9309
|
+
const SidebarDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidebar-v2--divider": true, marginBlockStart: -2, marginBlockEnd: 0 }));
|
|
9107
9310
|
exports.SidebarDivider = SidebarDivider;
|
|
9108
9311
|
|
|
9109
9312
|
|
|
@@ -9170,12 +9373,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
9170
9373
|
exports.SidebarGroupTitle = void 0;
|
|
9171
9374
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9172
9375
|
const Chevron_1 = __webpack_require__(/*! ../Chevron */ "./src/components/Chevron/index.ts");
|
|
9173
|
-
const
|
|
9376
|
+
const SidebarCollapseGroupMenu_1 = __webpack_require__(/*! ./SidebarCollapseGroupMenu */ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx");
|
|
9377
|
+
const SidebarGroupTitle = ({ title, titleId, badge, menu, barProps, expanded, role, ...props }) => ((0, jsx_runtime_1.jsxs)("div", { className: [
|
|
9174
9378
|
'rcx-box rcx-box--full',
|
|
9175
9379
|
'rcx-sidebar-v2-collapse-group__bar rcx-box--animated',
|
|
9176
9380
|
]
|
|
9177
9381
|
.filter(Boolean)
|
|
9178
|
-
.join(' '), ...
|
|
9382
|
+
.join(' '), ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'rcx-box rcx-sidebar-v2-collapse-group__bar-button', role: role, ...barProps, children: [expanded !== undefined && (0, jsx_runtime_1.jsx)(Chevron_1.Chevron, { size: 'x20', right: !expanded }), title && ((0, jsx_runtime_1.jsx)("h4", { className: 'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group__title', id: titleId, children: title })), !expanded && badge && badge] }), menu && (0, jsx_runtime_1.jsx)(SidebarCollapseGroupMenu_1.SidebarCollapseGroupMenu, { children: menu })] }));
|
|
9179
9383
|
exports.SidebarGroupTitle = SidebarGroupTitle;
|
|
9180
9384
|
|
|
9181
9385
|
|
|
@@ -9686,7 +9890,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9686
9890
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9687
9891
|
};
|
|
9688
9892
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9689
|
-
exports.SidebarV2GroupTitle = exports.SidebarV2Divider = exports.SidebarV2Section = exports.SidebarV2ButtonGroup = exports.SidebarV2Banner = exports.SidebarV2CollapseGroup = exports.SidebarV2Link = exports.SidebarV2Actions = exports.SidebarV2Action = exports.SidebarV2AccordionItem = exports.SidebarV2Accordion = exports.SidebarV2 = void 0;
|
|
9893
|
+
exports.SidebarV2GroupTitle = exports.SidebarV2Divider = exports.SidebarV2Section = exports.SidebarV2ButtonGroup = exports.SidebarV2Banner = exports.SidebarV2CollapseGroupMenu = exports.SidebarV2CollapseGroup = exports.SidebarV2Link = exports.SidebarV2Actions = exports.SidebarV2Action = exports.SidebarV2AccordionItem = exports.SidebarV2Accordion = exports.SidebarV2 = void 0;
|
|
9690
9894
|
var Sidebar_1 = __webpack_require__(/*! ./Sidebar */ "./src/components/SidebarV2/Sidebar.tsx");
|
|
9691
9895
|
Object.defineProperty(exports, "SidebarV2", ({ enumerable: true, get: function () { return Sidebar_1.Sidebar; } }));
|
|
9692
9896
|
var SidebarAccordion_1 = __webpack_require__(/*! ./SidebarAccordion */ "./src/components/SidebarV2/SidebarAccordion.tsx");
|
|
@@ -9702,6 +9906,8 @@ Object.defineProperty(exports, "SidebarV2Link", ({ enumerable: true, get: functi
|
|
|
9702
9906
|
__exportStar(__webpack_require__(/*! ./SidebarItem */ "./src/components/SidebarV2/SidebarItem/index.ts"), exports);
|
|
9703
9907
|
var SidebarCollapseGroup_1 = __webpack_require__(/*! ./SidebarCollapseGroup */ "./src/components/SidebarV2/SidebarCollapseGroup.tsx");
|
|
9704
9908
|
Object.defineProperty(exports, "SidebarV2CollapseGroup", ({ enumerable: true, get: function () { return SidebarCollapseGroup_1.SidebarCollapseGroup; } }));
|
|
9909
|
+
var SidebarCollapseGroupMenu_1 = __webpack_require__(/*! ./SidebarCollapseGroupMenu */ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx");
|
|
9910
|
+
Object.defineProperty(exports, "SidebarV2CollapseGroupMenu", ({ enumerable: true, get: function () { return SidebarCollapseGroupMenu_1.SidebarCollapseGroupMenu; } }));
|
|
9705
9911
|
var SidebarBanner_1 = __webpack_require__(/*! ./SidebarBanner */ "./src/components/SidebarV2/SidebarBanner.tsx");
|
|
9706
9912
|
Object.defineProperty(exports, "SidebarV2Banner", ({ enumerable: true, get: function () { return SidebarBanner_1.SidebarBanner; } }));
|
|
9707
9913
|
__exportStar(__webpack_require__(/*! ./SidebarFooter */ "./src/components/SidebarV2/SidebarFooter/index.ts"), exports);
|
|
@@ -9743,7 +9949,7 @@ exports["default"] = Sidepanel;
|
|
|
9743
9949
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9744
9950
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9745
9951
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
9746
|
-
const SidepanelDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidepanel--divider": true,
|
|
9952
|
+
const SidepanelDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidepanel--divider": true, marginBlockStart: -2, marginBlockEnd: 0 }));
|
|
9747
9953
|
exports["default"] = SidepanelDivider;
|
|
9748
9954
|
|
|
9749
9955
|
|
|
@@ -10576,7 +10782,7 @@ const TableCell = ({ align, clickable, children, ...props }) => {
|
|
|
10576
10782
|
const isInsideHead = (0, react_1.useContext)(TableHead_1.TableHeadContext);
|
|
10577
10783
|
const innerElement = children ??
|
|
10578
10784
|
(!isInsideHead ? ((0, jsx_runtime_1.jsx)(Box_1.Box, { display: 'inline-block', is: 'hr', width: 'x14', borderWidth: 1 })) : undefined);
|
|
10579
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: isInsideHead ? 'th' : 'td', "rcx-table__cell": true, "rcx-table__cell--align": align, "rcx-table__cell--header": isInsideHead, "rcx-table__cell--clickable": clickable, children: innerElement
|
|
10785
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: isInsideHead ? 'th' : 'td', "rcx-table__cell": true, "rcx-table__cell--align": align, "rcx-table__cell--header": isInsideHead, "rcx-table__cell--clickable": clickable, ...props, children: innerElement }));
|
|
10580
10786
|
};
|
|
10581
10787
|
exports["default"] = TableCell;
|
|
10582
10788
|
|
|
@@ -10644,7 +10850,7 @@ exports["default"] = TableRow;
|
|
|
10644
10850
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10645
10851
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
10646
10852
|
const Box_1 = __webpack_require__(/*! ../../Box */ "./src/components/Box/index.ts");
|
|
10647
|
-
const TableSelection = ({ children, text, ...props }) => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-table__selection": true, display: 'flex', alignItems: 'center', justifyContent: 'space-between',
|
|
10853
|
+
const TableSelection = ({ children, text, ...props }) => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { "rcx-table__selection": true, display: 'flex', alignItems: 'center', justifyContent: 'space-between', paddingInline: 24, elevation: '2', ...props, children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { fontScale: 'p2b', marginBlock: 16, flexShrink: 1, withTruncatedText: true, children: text }), children && ((0, jsx_runtime_1.jsx)(Box_1.Box, { marginInline: 'neg-x8', fontScale: 'p2m', flexShrink: 0, children: children }))] }));
|
|
10648
10854
|
exports["default"] = TableSelection;
|
|
10649
10855
|
|
|
10650
10856
|
|
|
@@ -10761,7 +10967,7 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
10761
10967
|
* Tabs is a component to navigate around the UI using buttons arranged together with the selected tab highlighted.
|
|
10762
10968
|
*/
|
|
10763
10969
|
function Tabs({ children, divider = true, ...props }) {
|
|
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,
|
|
10970
|
+
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, role: 'tablist', children: children }) }) }));
|
|
10765
10971
|
}
|
|
10766
10972
|
exports["default"] = Tabs;
|
|
10767
10973
|
|
|
@@ -12382,17 +12588,17 @@ module.exports = require("react/jsx-runtime");
|
|
|
12382
12588
|
/******/ });
|
|
12383
12589
|
/************************************************************************/
|
|
12384
12590
|
/******/ // The module cache
|
|
12385
|
-
/******/
|
|
12591
|
+
/******/ const __webpack_module_cache__ = {};
|
|
12386
12592
|
/******/
|
|
12387
12593
|
/******/ // The require function
|
|
12388
12594
|
/******/ function __webpack_require__(moduleId) {
|
|
12389
12595
|
/******/ // Check if module is in cache
|
|
12390
|
-
/******/
|
|
12596
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
12391
12597
|
/******/ if (cachedModule !== undefined) {
|
|
12392
12598
|
/******/ return cachedModule.exports;
|
|
12393
12599
|
/******/ }
|
|
12394
12600
|
/******/ // Create a new module (and put it into the cache)
|
|
12395
|
-
/******/
|
|
12601
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
12396
12602
|
/******/ // no module.id needed
|
|
12397
12603
|
/******/ // no module.loaded needed
|
|
12398
12604
|
/******/ exports: {}
|
|
@@ -12401,7 +12607,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12401
12607
|
/******/ // Execute the module function
|
|
12402
12608
|
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
12403
12609
|
/******/ delete __webpack_module_cache__[moduleId];
|
|
12404
|
-
/******/
|
|
12610
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
12405
12611
|
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
12406
12612
|
/******/ throw e;
|
|
12407
12613
|
/******/ }
|
|
@@ -12416,7 +12622,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12416
12622
|
/******/ (() => {
|
|
12417
12623
|
/******/ // define __esModule on exports
|
|
12418
12624
|
/******/ __webpack_require__.r = (exports) => {
|
|
12419
|
-
/******/ if(
|
|
12625
|
+
/******/ if(Symbol.toStringTag) {
|
|
12420
12626
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
12421
12627
|
/******/ }
|
|
12422
12628
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -12428,7 +12634,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12428
12634
|
/******/ // startup
|
|
12429
12635
|
/******/ // Load entry module and return exports
|
|
12430
12636
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
12431
|
-
/******/
|
|
12637
|
+
/******/ let __webpack_exports__ = __webpack_require__("./src/index.ts");
|
|
12432
12638
|
/******/ module.exports = __webpack_exports__;
|
|
12433
12639
|
/******/
|
|
12434
12640
|
/******/ })()
|