@rocket.chat/fuselage 0.83.0 → 0.85.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/Theme.d.ts.map +1 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts +5 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +13 -1
- package/dist/components/Button/Button.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/Contextualbar/ContextualbarAction.d.ts +3 -4
- package/dist/components/Contextualbar/ContextualbarAction.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts +3 -4
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts +1 -1
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarHeader.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarSection.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarTitle.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.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/Message/helpers.d.ts +2 -3
- package/dist/components/Message/helpers.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Sidebar/Item.d.ts +74 -0
- package/dist/components/Sidebar/Item.d.ts.map +1 -1
- package/dist/components/Sidebar/Section.d.ts +12 -0
- package/dist/components/Sidebar/Section.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +6 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarActions.d.ts +12 -0
- package/dist/components/Sidebar/SidebarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarBanner.d.ts +9 -0
- package/dist/components/Sidebar/SidebarBanner.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarDivider.d.ts +3 -0
- package/dist/components/Sidebar/SidebarDivider.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarFooter.d.ts +12 -0
- package/dist/components/Sidebar/SidebarFooter.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBar.d.ts +5 -0
- package/dist/components/Sidebar/TopBar/TopBar.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarAction.d.ts +3 -0
- package/dist/components/Sidebar/TopBar/TopBarAction.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarActions.d.ts +3 -0
- package/dist/components/Sidebar/TopBar/TopBarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarSection.d.ts +6 -0
- package/dist/components/Sidebar/TopBar/TopBarSection.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarTitle.d.ts +6 -0
- package/dist/components/Sidebar/TopBar/TopBarTitle.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarToolBox.d.ts +6 -0
- package/dist/components/Sidebar/TopBar/TopBarToolBox.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarV2.d.ts +6 -0
- package/dist/components/Sidebar/TopBar/TopBarV2.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarWrapper.d.ts +6 -0
- package/dist/components/Sidebar/TopBar/TopBarWrapper.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/index.d.ts +3 -0
- package/dist/components/Sidebar/TopBar/index.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/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/fuselage.css +4 -4
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +466 -444
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +13 -13
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +24 -25
- package/dist/components/ContextualbarV2/Contextualbar.d.ts +0 -10
- package/dist/components/ContextualbarV2/Contextualbar.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarAction.d.ts +0 -7
- package/dist/components/ContextualbarV2/ContextualbarAction.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarActions.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarActions.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarButton.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarButton.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarContent.d.ts +0 -7
- package/dist/components/ContextualbarV2/ContextualbarContent.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarEmptyContent.d.ts +0 -11
- package/dist/components/ContextualbarV2/ContextualbarEmptyContent.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarFooter.d.ts +0 -7
- package/dist/components/ContextualbarV2/ContextualbarFooter.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarHeader.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarHeader.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarIcon.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarIcon.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarSection.d.ts +0 -7
- package/dist/components/ContextualbarV2/ContextualbarSection.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarSkeleton.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarSkeleton.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/ContextualbarTitle.d.ts +0 -5
- package/dist/components/ContextualbarV2/ContextualbarTitle.d.ts.map +0 -1
- package/dist/components/ContextualbarV2/index.d.ts +0 -13
- package/dist/components/ContextualbarV2/index.d.ts.map +0 -1
|
@@ -67,7 +67,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
67
67
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
68
68
|
exports.Palette = exports.isShadowColor = exports.isStatusColor = exports.isStatusBackgroundColor = exports.isBadgeColor = exports.isTextIconColor = exports.isStrokeColor = exports.isSurfaceColor = exports.shadowColors = exports.badgeBackgroundColors = exports.statusColors = exports.statusBackgroundColors = exports.textIconColors = exports.strokeColors = exports.surfaceColors = exports.neutral = exports.__setThrowErrorOnInvalidToken__ = exports.throwErrorOnInvalidToken = exports.Var = void 0;
|
|
69
69
|
const colors_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/colors.json */ "@rocket.chat/fuselage-tokens/colors.json"));
|
|
70
|
-
const
|
|
70
|
+
const badge_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/badge.json */ "@rocket.chat/fuselage-tokens/dist/badge.json"));
|
|
71
|
+
const font_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/font.json */ "@rocket.chat/fuselage-tokens/dist/font.json"));
|
|
72
|
+
const shadow_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/shadow.json */ "@rocket.chat/fuselage-tokens/dist/shadow.json"));
|
|
73
|
+
const status_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/status.json */ "@rocket.chat/fuselage-tokens/dist/status.json"));
|
|
74
|
+
const stroke_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/stroke.json */ "@rocket.chat/fuselage-tokens/dist/stroke.json"));
|
|
75
|
+
const surface_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/dist/surface.json */ "@rocket.chat/fuselage-tokens/dist/surface.json"));
|
|
71
76
|
const toCSSValue_1 = __webpack_require__(/*! ./helpers/toCSSValue */ "./src/helpers/toCSSValue.ts");
|
|
72
77
|
class Var {
|
|
73
78
|
name;
|
|
@@ -84,7 +89,6 @@ class Var {
|
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
exports.Var = Var;
|
|
87
|
-
const white = new Var('white', '#ffffff');
|
|
88
92
|
exports.throwErrorOnInvalidToken = false;
|
|
89
93
|
const __setThrowErrorOnInvalidToken__ = (value) => {
|
|
90
94
|
exports.throwErrorOnInvalidToken = value;
|
|
@@ -103,143 +107,92 @@ exports.neutral = {
|
|
|
103
107
|
800: new Var('neutral-800', colors_json_1.default.n800),
|
|
104
108
|
900: new Var('neutral-900', colors_json_1.default.n900),
|
|
105
109
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
700: new Var('primary-700', colors_json_1.default.b700),
|
|
114
|
-
800: new Var('primary-800', colors_json_1.default.b800),
|
|
115
|
-
900: new Var('primary-900', colors_json_1.default.b900),
|
|
116
|
-
};
|
|
117
|
-
const green = {
|
|
118
|
-
100: new Var('success-100', colors_json_1.default.g100),
|
|
119
|
-
200: new Var('success-200', colors_json_1.default.g200),
|
|
120
|
-
300: new Var('success-300', colors_json_1.default.g300),
|
|
121
|
-
400: new Var('success-400', colors_json_1.default.g400),
|
|
122
|
-
500: new Var('success-500', colors_json_1.default.g500),
|
|
123
|
-
600: new Var('success-600', colors_json_1.default.g600),
|
|
124
|
-
700: new Var('success-700', colors_json_1.default.g700),
|
|
125
|
-
800: new Var('success-800', colors_json_1.default.g800),
|
|
126
|
-
900: new Var('success-900', colors_json_1.default.g900),
|
|
127
|
-
};
|
|
128
|
-
const yellow = {
|
|
129
|
-
100: new Var('warning-100', colors_json_1.default.y100),
|
|
130
|
-
200: new Var('warning-200', colors_json_1.default.y200),
|
|
131
|
-
300: new Var('warning-300', colors_json_1.default.y300),
|
|
132
|
-
400: new Var('warning-400', colors_json_1.default.y400),
|
|
133
|
-
500: new Var('warning-500', colors_json_1.default.y500),
|
|
134
|
-
600: new Var('warning-600', colors_json_1.default.y600),
|
|
135
|
-
700: new Var('warning-700', colors_json_1.default.y700),
|
|
136
|
-
800: new Var('warning-800', colors_json_1.default.y800),
|
|
137
|
-
900: new Var('warning-900', colors_json_1.default.y900),
|
|
138
|
-
};
|
|
139
|
-
const red = {
|
|
140
|
-
100: new Var('danger-100', colors_json_1.default.r100),
|
|
141
|
-
200: new Var('danger-200', colors_json_1.default.r200),
|
|
142
|
-
300: new Var('danger-300', colors_json_1.default.r300),
|
|
143
|
-
400: new Var('danger-400', colors_json_1.default.r400),
|
|
144
|
-
500: new Var('danger-500', colors_json_1.default.r500),
|
|
145
|
-
600: new Var('danger-600', colors_json_1.default.r600),
|
|
146
|
-
700: new Var('danger-700', colors_json_1.default.r700),
|
|
147
|
-
800: new Var('danger-800', colors_json_1.default.r800),
|
|
148
|
-
900: new Var('danger-900', colors_json_1.default.r900),
|
|
149
|
-
};
|
|
150
|
-
const orange = {
|
|
151
|
-
100: new Var('service-1-100', colors_json_1.default.o100),
|
|
152
|
-
200: new Var('service-1-200', colors_json_1.default.o200),
|
|
153
|
-
300: new Var('service-1-300', colors_json_1.default.o300),
|
|
154
|
-
400: new Var('service-1-400', colors_json_1.default.o400),
|
|
155
|
-
500: new Var('service-1-500', colors_json_1.default.o500),
|
|
156
|
-
600: new Var('service-1-600', colors_json_1.default.o600),
|
|
157
|
-
700: new Var('service-1-700', colors_json_1.default.o700),
|
|
158
|
-
800: new Var('service-1-800', colors_json_1.default.o800),
|
|
159
|
-
900: new Var('service-1-900', colors_json_1.default.o900),
|
|
160
|
-
};
|
|
161
|
-
const purple = {
|
|
162
|
-
100: new Var('service-2-100', colors_json_1.default.p100),
|
|
163
|
-
200: new Var('service-2-200', colors_json_1.default.p200),
|
|
164
|
-
300: new Var('service-2-300', colors_json_1.default.p300),
|
|
165
|
-
400: new Var('service-2-400', colors_json_1.default.p400),
|
|
166
|
-
500: new Var('service-2-500', colors_json_1.default.p500),
|
|
167
|
-
600: new Var('service-2-600', colors_json_1.default.p600),
|
|
168
|
-
700: new Var('service-2-700', colors_json_1.default.p700),
|
|
169
|
-
800: new Var('service-2-800', colors_json_1.default.p800),
|
|
170
|
-
900: new Var('service-2-900', colors_json_1.default.p900),
|
|
171
|
-
};
|
|
110
|
+
// fuselage-tokens doesn't expose semantic tokens for these yet:
|
|
111
|
+
// - status-font "on-warning" (diverges from the token's yellow-900; see TODO
|
|
112
|
+
// below)
|
|
113
|
+
// Falls back to the primitive palette directly. TODO(fuselage-tokens):
|
|
114
|
+
// remove `primitive()` and its call sites below once resolved.
|
|
115
|
+
const primitive = (ref, name) => new Var(name, colors_json_1.default[ref]);
|
|
116
|
+
const surfaceTokens = surface_json_1.default.surface.light;
|
|
172
117
|
exports.surfaceColors = {
|
|
173
|
-
'surface-light':
|
|
174
|
-
'surface-tint':
|
|
175
|
-
'surface-room':
|
|
176
|
-
'surface-neutral':
|
|
177
|
-
'surface-disabled':
|
|
178
|
-
'surface-hover':
|
|
179
|
-
'surface-selected':
|
|
180
|
-
'surface-dark':
|
|
181
|
-
'surface-featured':
|
|
182
|
-
'surface-featured-hover':
|
|
183
|
-
'surface-overlay':
|
|
118
|
+
'surface-light': new Var('surface-light', surfaceTokens.light),
|
|
119
|
+
'surface-tint': new Var('surface-tint', surfaceTokens.tint),
|
|
120
|
+
'surface-room': new Var('surface-room', surfaceTokens.room),
|
|
121
|
+
'surface-neutral': new Var('surface-neutral', surfaceTokens.neutral),
|
|
122
|
+
'surface-disabled': new Var('surface-disabled', surfaceTokens.disabled),
|
|
123
|
+
'surface-hover': new Var('surface-hover', surfaceTokens.hover),
|
|
124
|
+
'surface-selected': new Var('surface-selected', surfaceTokens.selected),
|
|
125
|
+
'surface-dark': new Var('surface-dark', surfaceTokens.dark),
|
|
126
|
+
'surface-featured': new Var('surface-featured', surfaceTokens.featured),
|
|
127
|
+
'surface-featured-hover': new Var('surface-featured-hover', surfaceTokens.featuredHover),
|
|
128
|
+
'surface-overlay': new Var('surface-overlay', surfaceTokens.overlay),
|
|
184
129
|
'surface-transparent': 'transparent',
|
|
185
|
-
'surface-sidebar':
|
|
130
|
+
'surface-sidebar': new Var('surface-sidebar', surfaceTokens.sidebar),
|
|
186
131
|
};
|
|
132
|
+
const strokeTokens = stroke_json_1.default.stroke.light;
|
|
187
133
|
exports.strokeColors = {
|
|
188
|
-
'stroke-extra-light':
|
|
189
|
-
'stroke-light':
|
|
190
|
-
'stroke-medium':
|
|
191
|
-
'stroke-dark':
|
|
192
|
-
'stroke-extra-dark':
|
|
193
|
-
'stroke-extra-light-highlight':
|
|
194
|
-
'stroke-highlight':
|
|
195
|
-
'stroke-extra-light-error':
|
|
196
|
-
'stroke-error':
|
|
197
|
-
};
|
|
134
|
+
'stroke-extra-light': new Var('stroke-extra-light', strokeTokens.extraLight),
|
|
135
|
+
'stroke-light': new Var('stroke-light', strokeTokens.light),
|
|
136
|
+
'stroke-medium': new Var('stroke-medium', strokeTokens.medium),
|
|
137
|
+
'stroke-dark': new Var('stroke-dark', strokeTokens.dark),
|
|
138
|
+
'stroke-extra-dark': new Var('stroke-extra-dark', strokeTokens.extraDark),
|
|
139
|
+
'stroke-extra-light-highlight': new Var('stroke-extra-light-highlight', strokeTokens.extraLightHighlight),
|
|
140
|
+
'stroke-highlight': new Var('stroke-highlight', strokeTokens.highlight),
|
|
141
|
+
'stroke-extra-light-error': new Var('stroke-extra-light-error', strokeTokens.extraLightError),
|
|
142
|
+
'stroke-error': new Var('stroke-error', strokeTokens.error),
|
|
143
|
+
};
|
|
144
|
+
const fontTokens = font_json_1.default.font.light;
|
|
198
145
|
exports.textIconColors = {
|
|
199
|
-
'font-white':
|
|
200
|
-
'font-disabled':
|
|
201
|
-
'font-annotation':
|
|
202
|
-
'font-hint':
|
|
203
|
-
'font-secondary-info':
|
|
204
|
-
'font-default':
|
|
205
|
-
'font-titles-labels':
|
|
206
|
-
'font-info':
|
|
207
|
-
'font-danger':
|
|
208
|
-
'font-pure-black':
|
|
209
|
-
'font-pure-white':
|
|
210
|
-
};
|
|
146
|
+
'font-white': new Var('font-white', fontTokens.white),
|
|
147
|
+
'font-disabled': new Var('font-disabled', fontTokens.disabled),
|
|
148
|
+
'font-annotation': new Var('font-annotation', fontTokens.annotation),
|
|
149
|
+
'font-hint': new Var('font-hint', fontTokens.hint),
|
|
150
|
+
'font-secondary-info': new Var('font-secondary-info', fontTokens.secondaryInfo),
|
|
151
|
+
'font-default': new Var('font-default', fontTokens.default),
|
|
152
|
+
'font-titles-labels': new Var('font-titles-labels', fontTokens.titlesLabels),
|
|
153
|
+
'font-info': new Var('font-info', fontTokens.info),
|
|
154
|
+
'font-danger': new Var('font-danger', fontTokens.danger),
|
|
155
|
+
'font-pure-black': new Var('font-pure-black', fontTokens.pureBlack),
|
|
156
|
+
'font-pure-white': new Var('font-pure-white', fontTokens.pureWhite),
|
|
157
|
+
};
|
|
158
|
+
const statusTokens = status_json_1.default.status.light;
|
|
211
159
|
exports.statusBackgroundColors = {
|
|
212
|
-
'status-background-info':
|
|
213
|
-
'status-background-success':
|
|
214
|
-
'status-background-danger':
|
|
215
|
-
'status-background-warning':
|
|
216
|
-
'status-background-warning-2':
|
|
217
|
-
'status-background-service-1':
|
|
218
|
-
'status-background-service-2':
|
|
160
|
+
'status-background-info': new Var('status-background-info', statusTokens.info),
|
|
161
|
+
'status-background-success': new Var('status-background-success', statusTokens.success),
|
|
162
|
+
'status-background-danger': new Var('status-background-danger', statusTokens.danger),
|
|
163
|
+
'status-background-warning': new Var('status-background-warning', statusTokens.warning),
|
|
164
|
+
'status-background-warning-2': new Var('status-background-warning-2', statusTokens['warning-2']),
|
|
165
|
+
'status-background-service-1': new Var('status-background-service-1', statusTokens['service-1']),
|
|
166
|
+
'status-background-service-2': new Var('status-background-service-2', statusTokens['service-2']),
|
|
219
167
|
};
|
|
220
168
|
exports.statusColors = {
|
|
221
|
-
'status-font-on-info':
|
|
222
|
-
'status-font-on-success':
|
|
223
|
-
|
|
224
|
-
'
|
|
225
|
-
|
|
226
|
-
'status-font-on-
|
|
227
|
-
'status-font-on-
|
|
228
|
-
|
|
169
|
+
'status-font-on-info': new Var('status-font-on-info', statusTokens['font-on-info']),
|
|
170
|
+
'status-font-on-success': new Var('status-font-on-success', statusTokens['font-on-success']),
|
|
171
|
+
// TODO(design): token value (font-on-warning, yellow-900, #8E6300)
|
|
172
|
+
// diverges from fuselage's current yellow-800. Keeping the current value
|
|
173
|
+
// until design confirms which is correct.
|
|
174
|
+
'status-font-on-warning': primitive('y800', 'status-font-on-warning'),
|
|
175
|
+
'status-font-on-warning-2': new Var('status-font-on-warning-2', statusTokens['font-on-warning-2']),
|
|
176
|
+
'status-font-on-danger': new Var('status-font-on-danger', statusTokens['font-on-danger']),
|
|
177
|
+
'status-font-on-service-1': new Var('status-font-on-service-1', statusTokens['font-on-service-1']),
|
|
178
|
+
'status-font-on-service-2': new Var('status-font-on-service-2', statusTokens['font-on-service-2']),
|
|
179
|
+
};
|
|
180
|
+
const badgeTokens = badge_json_1.default.badge.light;
|
|
229
181
|
exports.badgeBackgroundColors = {
|
|
230
|
-
'badge-background-level-0':
|
|
231
|
-
'badge-background-level-1':
|
|
232
|
-
'badge-background-level-2':
|
|
233
|
-
'badge-background-level-3':
|
|
234
|
-
'badge-background-level-4':
|
|
182
|
+
'badge-background-level-0': new Var('badge-background-level-0', badgeTokens['level-0']),
|
|
183
|
+
'badge-background-level-1': new Var('badge-background-level-1', badgeTokens['level-1']),
|
|
184
|
+
'badge-background-level-2': new Var('badge-background-level-2', badgeTokens['level-2']),
|
|
185
|
+
'badge-background-level-3': new Var('badge-background-level-3', badgeTokens['level-3']),
|
|
186
|
+
'badge-background-level-4': new Var('badge-background-level-4', badgeTokens['level-4']),
|
|
235
187
|
};
|
|
188
|
+
const shadowTokens = shadow_json_1.default.shadow.light;
|
|
236
189
|
exports.shadowColors = {
|
|
237
|
-
'shadow-elevation-border':
|
|
238
|
-
'shadow-elevation-1': new Var('shadow-elevation-1',
|
|
239
|
-
'shadow-elevation-2x': new Var('shadow-elevation-2x',
|
|
240
|
-
'shadow-elevation-2y': new Var('shadow-elevation-2y',
|
|
241
|
-
'shadow-highlight':
|
|
242
|
-
'shadow-danger':
|
|
190
|
+
'shadow-elevation-border': new Var('shadow-elevation-border', shadowTokens['elevation-border']),
|
|
191
|
+
'shadow-elevation-1': new Var('shadow-elevation-1', shadowTokens['elevation-1']),
|
|
192
|
+
'shadow-elevation-2x': new Var('shadow-elevation-2x', shadowTokens['elevation-2x']),
|
|
193
|
+
'shadow-elevation-2y': new Var('shadow-elevation-2y', shadowTokens['elevation-2y']),
|
|
194
|
+
'shadow-highlight': new Var('shadow-highlight', shadowTokens.highlight),
|
|
195
|
+
'shadow-danger': new Var('shadow-danger', shadowTokens.danger),
|
|
243
196
|
};
|
|
244
197
|
const isSurfaceColor = (color) => typeof color === 'string' && color in exports.surfaceColors;
|
|
245
198
|
exports.isSurfaceColor = isSurfaceColor;
|
|
@@ -685,6 +638,8 @@ const isSelectedValid = (value) => (selected) => {
|
|
|
685
638
|
};
|
|
686
639
|
/**
|
|
687
640
|
* An input for selection of options.
|
|
641
|
+
*
|
|
642
|
+
* @deprecated Use `SelectFiltered` or `MultiSelectFiltered` instead.
|
|
688
643
|
*/
|
|
689
644
|
function AutoComplete({ ref, value, filter, setFilter, options = [], renderItem, renderSelected: RenderSelected, onChange, renderEmpty, placeholder, error, disabled, multiple, onBlur: onBlurAction = () => { }, ...props }) {
|
|
690
645
|
const innerRef = (0, react_1.useRef)(null);
|
|
@@ -1535,7 +1490,7 @@ const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.t
|
|
|
1535
1490
|
/**
|
|
1536
1491
|
* Indicates an actionable user action.
|
|
1537
1492
|
*/
|
|
1538
|
-
function Button({ ref, primary, secondary, danger, warning, success, external, icon, is = 'button', rel: _rel, tiny, mini, small, medium, large, square, loading, disabled, children, ...props }) {
|
|
1493
|
+
function Button({ ref, variant, primary, secondary, danger, warning, success, external, icon, is = 'button', rel: _rel, size, tiny, mini, small, medium, large, square, loading, disabled, children, ...props }) {
|
|
1539
1494
|
const extraProps = (is === 'a' && {
|
|
1540
1495
|
rel: external ? 'noopener noreferrer' : undefined,
|
|
1541
1496
|
target: external ? '_blank' : undefined,
|
|
@@ -1545,7 +1500,8 @@ function Button({ ref, primary, secondary, danger, warning, success, external, i
|
|
|
1545
1500
|
}) ||
|
|
1546
1501
|
{};
|
|
1547
1502
|
const kindAndVariantProps = (0, react_1.useMemo)(() => {
|
|
1548
|
-
const
|
|
1503
|
+
const kind = variant ||
|
|
1504
|
+
(primary && 'primary') ||
|
|
1549
1505
|
(secondary && success && 'secondary-success') ||
|
|
1550
1506
|
(secondary && warning && 'secondary-warning') ||
|
|
1551
1507
|
(secondary && danger && 'secondary-danger') ||
|
|
@@ -1553,14 +1509,21 @@ function Button({ ref, primary, secondary, danger, warning, success, external, i
|
|
|
1553
1509
|
(warning && 'warning') ||
|
|
1554
1510
|
(danger && 'danger') ||
|
|
1555
1511
|
(secondary && 'secondary');
|
|
1556
|
-
if (
|
|
1512
|
+
if (kind) {
|
|
1557
1513
|
return {
|
|
1558
|
-
[`rcx-button--${
|
|
1514
|
+
[`rcx-button--${kind}`]: true,
|
|
1559
1515
|
};
|
|
1560
1516
|
}
|
|
1561
1517
|
return {};
|
|
1562
|
-
}, [primary, secondary, danger, warning, success]);
|
|
1563
|
-
|
|
1518
|
+
}, [variant, primary, secondary, danger, warning, success]);
|
|
1519
|
+
const effectiveSize = size ||
|
|
1520
|
+
(mini && 'mini') ||
|
|
1521
|
+
(tiny && 'tiny') ||
|
|
1522
|
+
(small && 'small') ||
|
|
1523
|
+
(medium && 'medium') ||
|
|
1524
|
+
(large && 'large') ||
|
|
1525
|
+
undefined;
|
|
1526
|
+
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { is: is, type: 'button', "rcx-button": true, ...kindAndVariantProps, "rcx-button--small": effectiveSize === 'small', "rcx-button--medium": effectiveSize === 'medium', "rcx-button--large": effectiveSize === 'large', "rcx-button--square": square, "rcx-button--tiny-square": effectiveSize === 'tiny' && square, "rcx-button--mini-square": effectiveSize === 'mini' && square, "rcx-button--small-square": effectiveSize === 'small' && square, "rcx-button--medium-square": effectiveSize === 'medium' && square, "rcx-button--large-square": effectiveSize === '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] }) }));
|
|
1564
1527
|
}
|
|
1565
1528
|
exports["default"] = Button;
|
|
1566
1529
|
|
|
@@ -2165,12 +2128,12 @@ Object.defineProperty(exports, "CodeSnippet", ({ enumerable: true, get: function
|
|
|
2165
2128
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2166
2129
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2167
2130
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2168
|
-
const
|
|
2131
|
+
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2169
2132
|
/**
|
|
2170
2133
|
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2171
2134
|
*/
|
|
2172
2135
|
function Contextualbar({ width, position, backgroundColor = 'room', ...props }) {
|
|
2173
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
2136
|
+
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 }));
|
|
2174
2137
|
}
|
|
2175
2138
|
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2176
2139
|
|
|
@@ -2187,8 +2150,8 @@ exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
|
2187
2150
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2188
2151
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2189
2152
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2190
|
-
const
|
|
2191
|
-
const ContextualbarAction = ({ name, ...props }) => ((0, jsx_runtime_1.jsx)(
|
|
2153
|
+
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
2154
|
+
const ContextualbarAction = ({ name, ...props }) => ((0, jsx_runtime_1.jsx)(Button_1.IconButton, { ...props, small: true, flexShrink: 0, icon: name }));
|
|
2192
2155
|
exports["default"] = (0, react_1.memo)(ContextualbarAction);
|
|
2193
2156
|
|
|
2194
2157
|
|
|
@@ -2260,10 +2223,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
2260
2223
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2261
2224
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2262
2225
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2263
|
-
const
|
|
2226
|
+
const States_1 = __webpack_require__(/*! ../States */ "./src/components/States/index.ts");
|
|
2264
2227
|
const ContextualbarContent_1 = __importDefault(__webpack_require__(/*! ./ContextualbarContent */ "./src/components/Contextualbar/ContextualbarContent.tsx"));
|
|
2265
2228
|
function ContextualbarEmptyContent({ icon = 'magnifier', title = 'Nothing Found', subtitle, ...props }) {
|
|
2266
|
-
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props, children: (0, jsx_runtime_1.jsxs)(
|
|
2229
|
+
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props, children: (0, jsx_runtime_1.jsxs)(States_1.States, { children: [(0, jsx_runtime_1.jsx)(States_1.StatesIcon, { name: icon }), (0, jsx_runtime_1.jsx)(States_1.StatesTitle, { children: title }), subtitle && (0, jsx_runtime_1.jsx)(States_1.StatesSubtitle, { children: subtitle })] }) }));
|
|
2267
2230
|
}
|
|
2268
2231
|
exports["default"] = (0, react_1.memo)(ContextualbarEmptyContent);
|
|
2269
2232
|
|
|
@@ -2280,9 +2243,9 @@ exports["default"] = (0, react_1.memo)(ContextualbarEmptyContent);
|
|
|
2280
2243
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2281
2244
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2282
2245
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2283
|
-
const
|
|
2246
|
+
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2284
2247
|
function ContextualbarFooter(props) {
|
|
2285
|
-
return (0, jsx_runtime_1.jsx)(
|
|
2248
|
+
return (0, jsx_runtime_1.jsx)(Box_1.Box, { paddingInline: 16, paddingBlock: 20, ...props });
|
|
2286
2249
|
}
|
|
2287
2250
|
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2288
2251
|
|
|
@@ -2298,10 +2261,12 @@ exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
|
2298
2261
|
|
|
2299
2262
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2300
2263
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2264
|
+
const css_in_js_1 = __webpack_require__(/*! @rocket.chat/css-in-js */ "@rocket.chat/css-in-js");
|
|
2301
2265
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2302
2266
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2267
|
+
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) `
|
|
2268
|
+
gap: 8px;
|
|
2269
|
+
`, children: children }) }));
|
|
2305
2270
|
exports["default"] = (0, react_1.memo)(ContextualbarHeader);
|
|
2306
2271
|
|
|
2307
2272
|
|
|
@@ -2318,7 +2283,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2318
2283
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2319
2284
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2320
2285
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
2321
|
-
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, paddingInline: 2, size: '
|
|
2286
|
+
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, paddingInline: 2, size: 'x20' }));
|
|
2322
2287
|
exports["default"] = (0, react_1.memo)(ContextualbarIcon);
|
|
2323
2288
|
|
|
2324
2289
|
|
|
@@ -2336,7 +2301,7 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
2336
2301
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2337
2302
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2338
2303
|
function ContextualbarSection(props) {
|
|
2339
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__section": true,
|
|
2304
|
+
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 }));
|
|
2340
2305
|
}
|
|
2341
2306
|
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2342
2307
|
|
|
@@ -2379,7 +2344,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2379
2344
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2380
2345
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2381
2346
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2382
|
-
const ContextualbarTitle = (props) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexShrink: 1, flexGrow: 1, fontScale: '
|
|
2347
|
+
const ContextualbarTitle = (props) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexShrink: 1, flexGrow: 1, fontScale: 'h5', withTruncatedText: true, is: 'h5', ...props }));
|
|
2383
2348
|
exports["default"] = (0, react_1.memo)(ContextualbarTitle);
|
|
2384
2349
|
|
|
2385
2350
|
|
|
@@ -2423,278 +2388,6 @@ var ContextualbarTitle_1 = __webpack_require__(/*! ./ContextualbarTitle */ "./sr
|
|
|
2423
2388
|
Object.defineProperty(exports, "ContextualbarTitle", ({ enumerable: true, get: function () { return __importDefault(ContextualbarTitle_1).default; } }));
|
|
2424
2389
|
|
|
2425
2390
|
|
|
2426
|
-
/***/ },
|
|
2427
|
-
|
|
2428
|
-
/***/ "./src/components/ContextualbarV2/Contextualbar.tsx"
|
|
2429
|
-
/*!**********************************************************!*\
|
|
2430
|
-
!*** ./src/components/ContextualbarV2/Contextualbar.tsx ***!
|
|
2431
|
-
\**********************************************************/
|
|
2432
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2436
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2437
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2438
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2439
|
-
/**
|
|
2440
|
-
* The `Contextualbar` has the purpose to persist and input information about the scope of the related page.
|
|
2441
|
-
*/
|
|
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 }));
|
|
2444
|
-
}
|
|
2445
|
-
exports["default"] = (0, react_1.memo)(Contextualbar);
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
/***/ },
|
|
2449
|
-
|
|
2450
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarAction.tsx"
|
|
2451
|
-
/*!****************************************************************!*\
|
|
2452
|
-
!*** ./src/components/ContextualbarV2/ContextualbarAction.tsx ***!
|
|
2453
|
-
\****************************************************************/
|
|
2454
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2458
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2459
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2460
|
-
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
2461
|
-
const ContextualbarAction = ({ name, ...props }) => ((0, jsx_runtime_1.jsx)(Button_1.IconButton, { ...props, small: true, flexShrink: 0, icon: name }));
|
|
2462
|
-
exports["default"] = (0, react_1.memo)(ContextualbarAction);
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
/***/ },
|
|
2466
|
-
|
|
2467
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarActions.tsx"
|
|
2468
|
-
/*!*****************************************************************!*\
|
|
2469
|
-
!*** ./src/components/ContextualbarV2/ContextualbarActions.tsx ***!
|
|
2470
|
-
\*****************************************************************/
|
|
2471
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2475
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2476
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2477
|
-
const ButtonGroup_1 = __webpack_require__(/*! ../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
2478
|
-
const ContextualbarActions = (props) => ((0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { ...props }));
|
|
2479
|
-
exports["default"] = (0, react_1.memo)(ContextualbarActions);
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
/***/ },
|
|
2483
|
-
|
|
2484
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarButton.tsx"
|
|
2485
|
-
/*!****************************************************************!*\
|
|
2486
|
-
!*** ./src/components/ContextualbarV2/ContextualbarButton.tsx ***!
|
|
2487
|
-
\****************************************************************/
|
|
2488
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2492
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2493
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2494
|
-
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
2495
|
-
const ContextualbarButton = (props) => ((0, jsx_runtime_1.jsx)(Button_1.Button, { ...props }));
|
|
2496
|
-
exports["default"] = (0, react_1.memo)(ContextualbarButton);
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
/***/ },
|
|
2500
|
-
|
|
2501
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarContent.tsx"
|
|
2502
|
-
/*!*****************************************************************!*\
|
|
2503
|
-
!*** ./src/components/ContextualbarV2/ContextualbarContent.tsx ***!
|
|
2504
|
-
\*****************************************************************/
|
|
2505
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2509
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2510
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2511
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2512
|
-
function ContextualbarContent(props) {
|
|
2513
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-vertical-bar__content": true, paddingInline: 24, display: 'flex', flexDirection: 'column', overflowY: 'hidden', height: 'full', ...props }));
|
|
2514
|
-
}
|
|
2515
|
-
exports["default"] = (0, react_1.memo)(ContextualbarContent);
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
/***/ },
|
|
2519
|
-
|
|
2520
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarEmptyContent.tsx"
|
|
2521
|
-
/*!**********************************************************************!*\
|
|
2522
|
-
!*** ./src/components/ContextualbarV2/ContextualbarEmptyContent.tsx ***!
|
|
2523
|
-
\**********************************************************************/
|
|
2524
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2528
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2529
|
-
};
|
|
2530
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2531
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2532
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2533
|
-
const States_1 = __webpack_require__(/*! ../States */ "./src/components/States/index.ts");
|
|
2534
|
-
const ContextualbarContent_1 = __importDefault(__webpack_require__(/*! ./ContextualbarContent */ "./src/components/ContextualbarV2/ContextualbarContent.tsx"));
|
|
2535
|
-
function ContextualbarEmptyContent({ icon = 'magnifier', title = 'Nothing Found', subtitle, ...props }) {
|
|
2536
|
-
return ((0, jsx_runtime_1.jsx)(ContextualbarContent_1.default, { justifyContent: 'center', ...props, children: (0, jsx_runtime_1.jsxs)(States_1.States, { children: [(0, jsx_runtime_1.jsx)(States_1.StatesIcon, { name: icon }), (0, jsx_runtime_1.jsx)(States_1.StatesTitle, { children: title }), subtitle && (0, jsx_runtime_1.jsx)(States_1.StatesSubtitle, { children: subtitle })] }) }));
|
|
2537
|
-
}
|
|
2538
|
-
exports["default"] = (0, react_1.memo)(ContextualbarEmptyContent);
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
/***/ },
|
|
2542
|
-
|
|
2543
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarFooter.tsx"
|
|
2544
|
-
/*!****************************************************************!*\
|
|
2545
|
-
!*** ./src/components/ContextualbarV2/ContextualbarFooter.tsx ***!
|
|
2546
|
-
\****************************************************************/
|
|
2547
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2551
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2552
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2553
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2554
|
-
function ContextualbarFooter(props) {
|
|
2555
|
-
return (0, jsx_runtime_1.jsx)(Box_1.Box, { paddingInline: 16, paddingBlock: 20, ...props });
|
|
2556
|
-
}
|
|
2557
|
-
exports["default"] = (0, react_1.memo)(ContextualbarFooter);
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
/***/ },
|
|
2561
|
-
|
|
2562
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarHeader.tsx"
|
|
2563
|
-
/*!****************************************************************!*\
|
|
2564
|
-
!*** ./src/components/ContextualbarV2/ContextualbarHeader.tsx ***!
|
|
2565
|
-
\****************************************************************/
|
|
2566
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2570
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2571
|
-
const css_in_js_1 = __webpack_require__(/*! @rocket.chat/css-in-js */ "@rocket.chat/css-in-js");
|
|
2572
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2573
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
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) `
|
|
2575
|
-
gap: 8px;
|
|
2576
|
-
`, children: children }) }));
|
|
2577
|
-
exports["default"] = (0, react_1.memo)(ContextualbarHeader);
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
/***/ },
|
|
2581
|
-
|
|
2582
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarIcon.tsx"
|
|
2583
|
-
/*!**************************************************************!*\
|
|
2584
|
-
!*** ./src/components/ContextualbarV2/ContextualbarIcon.tsx ***!
|
|
2585
|
-
\**************************************************************/
|
|
2586
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2590
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2591
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2592
|
-
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
2593
|
-
const ContextualbarIcon = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { ...props, paddingInline: 2, size: 'x20' }));
|
|
2594
|
-
exports["default"] = (0, react_1.memo)(ContextualbarIcon);
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
/***/ },
|
|
2598
|
-
|
|
2599
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarSection.tsx"
|
|
2600
|
-
/*!*****************************************************************!*\
|
|
2601
|
-
!*** ./src/components/ContextualbarV2/ContextualbarSection.tsx ***!
|
|
2602
|
-
\*****************************************************************/
|
|
2603
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2607
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2608
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2609
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2610
|
-
function ContextualbarSection(props) {
|
|
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 }));
|
|
2612
|
-
}
|
|
2613
|
-
exports["default"] = (0, react_1.memo)(ContextualbarSection);
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
/***/ },
|
|
2617
|
-
|
|
2618
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarSkeleton.tsx"
|
|
2619
|
-
/*!******************************************************************!*\
|
|
2620
|
-
!*** ./src/components/ContextualbarV2/ContextualbarSkeleton.tsx ***!
|
|
2621
|
-
\******************************************************************/
|
|
2622
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2626
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2627
|
-
};
|
|
2628
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2629
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2630
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2631
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2632
|
-
const Skeleton_1 = __webpack_require__(/*! ../Skeleton */ "./src/components/Skeleton/index.ts");
|
|
2633
|
-
const Contextualbar_1 = __importDefault(__webpack_require__(/*! ./Contextualbar */ "./src/components/ContextualbarV2/Contextualbar.tsx"));
|
|
2634
|
-
const ContextualbarHeader_1 = __importDefault(__webpack_require__(/*! ./ContextualbarHeader */ "./src/components/ContextualbarV2/ContextualbarHeader.tsx"));
|
|
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)
|
|
2636
|
-
.fill(5)
|
|
2637
|
-
.map((_, index) => ((0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {}, index)))] })] }));
|
|
2638
|
-
exports["default"] = (0, react_1.memo)(ContextualbarSkeleton);
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
/***/ },
|
|
2642
|
-
|
|
2643
|
-
/***/ "./src/components/ContextualbarV2/ContextualbarTitle.tsx"
|
|
2644
|
-
/*!***************************************************************!*\
|
|
2645
|
-
!*** ./src/components/ContextualbarV2/ContextualbarTitle.tsx ***!
|
|
2646
|
-
\***************************************************************/
|
|
2647
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2651
|
-
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
2652
|
-
const react_1 = __webpack_require__(/*! react */ "react");
|
|
2653
|
-
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
2654
|
-
const ContextualbarTitle = (props) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { flexShrink: 1, flexGrow: 1, fontScale: 'h5', withTruncatedText: true, is: 'h5', ...props }));
|
|
2655
|
-
exports["default"] = (0, react_1.memo)(ContextualbarTitle);
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
/***/ },
|
|
2659
|
-
|
|
2660
|
-
/***/ "./src/components/ContextualbarV2/index.ts"
|
|
2661
|
-
/*!*************************************************!*\
|
|
2662
|
-
!*** ./src/components/ContextualbarV2/index.ts ***!
|
|
2663
|
-
\*************************************************/
|
|
2664
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2668
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2669
|
-
};
|
|
2670
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2671
|
-
exports.ContextualbarV2Title = exports.ContextualbarV2Skeleton = exports.ContextualbarV2Section = exports.ContextualbarV2Icon = exports.ContextualbarV2Header = exports.ContextualbarV2Footer = exports.ContextualbarV2EmptyContent = exports.ContextualbarV2Content = exports.ContextualbarV2Button = exports.ContextualbarV2Actions = exports.ContextualbarV2Action = exports.ContextualbarV2 = void 0;
|
|
2672
|
-
var Contextualbar_1 = __webpack_require__(/*! ./Contextualbar */ "./src/components/ContextualbarV2/Contextualbar.tsx");
|
|
2673
|
-
Object.defineProperty(exports, "ContextualbarV2", ({ enumerable: true, get: function () { return __importDefault(Contextualbar_1).default; } }));
|
|
2674
|
-
var ContextualbarAction_1 = __webpack_require__(/*! ./ContextualbarAction */ "./src/components/ContextualbarV2/ContextualbarAction.tsx");
|
|
2675
|
-
Object.defineProperty(exports, "ContextualbarV2Action", ({ enumerable: true, get: function () { return __importDefault(ContextualbarAction_1).default; } }));
|
|
2676
|
-
var ContextualbarActions_1 = __webpack_require__(/*! ./ContextualbarActions */ "./src/components/ContextualbarV2/ContextualbarActions.tsx");
|
|
2677
|
-
Object.defineProperty(exports, "ContextualbarV2Actions", ({ enumerable: true, get: function () { return __importDefault(ContextualbarActions_1).default; } }));
|
|
2678
|
-
var ContextualbarButton_1 = __webpack_require__(/*! ./ContextualbarButton */ "./src/components/ContextualbarV2/ContextualbarButton.tsx");
|
|
2679
|
-
Object.defineProperty(exports, "ContextualbarV2Button", ({ enumerable: true, get: function () { return __importDefault(ContextualbarButton_1).default; } }));
|
|
2680
|
-
var ContextualbarContent_1 = __webpack_require__(/*! ./ContextualbarContent */ "./src/components/ContextualbarV2/ContextualbarContent.tsx");
|
|
2681
|
-
Object.defineProperty(exports, "ContextualbarV2Content", ({ enumerable: true, get: function () { return __importDefault(ContextualbarContent_1).default; } }));
|
|
2682
|
-
var ContextualbarEmptyContent_1 = __webpack_require__(/*! ./ContextualbarEmptyContent */ "./src/components/ContextualbarV2/ContextualbarEmptyContent.tsx");
|
|
2683
|
-
Object.defineProperty(exports, "ContextualbarV2EmptyContent", ({ enumerable: true, get: function () { return __importDefault(ContextualbarEmptyContent_1).default; } }));
|
|
2684
|
-
var ContextualbarFooter_1 = __webpack_require__(/*! ./ContextualbarFooter */ "./src/components/ContextualbarV2/ContextualbarFooter.tsx");
|
|
2685
|
-
Object.defineProperty(exports, "ContextualbarV2Footer", ({ enumerable: true, get: function () { return __importDefault(ContextualbarFooter_1).default; } }));
|
|
2686
|
-
var ContextualbarHeader_1 = __webpack_require__(/*! ./ContextualbarHeader */ "./src/components/ContextualbarV2/ContextualbarHeader.tsx");
|
|
2687
|
-
Object.defineProperty(exports, "ContextualbarV2Header", ({ enumerable: true, get: function () { return __importDefault(ContextualbarHeader_1).default; } }));
|
|
2688
|
-
var ContextualbarIcon_1 = __webpack_require__(/*! ./ContextualbarIcon */ "./src/components/ContextualbarV2/ContextualbarIcon.tsx");
|
|
2689
|
-
Object.defineProperty(exports, "ContextualbarV2Icon", ({ enumerable: true, get: function () { return __importDefault(ContextualbarIcon_1).default; } }));
|
|
2690
|
-
var ContextualbarSection_1 = __webpack_require__(/*! ./ContextualbarSection */ "./src/components/ContextualbarV2/ContextualbarSection.tsx");
|
|
2691
|
-
Object.defineProperty(exports, "ContextualbarV2Section", ({ enumerable: true, get: function () { return __importDefault(ContextualbarSection_1).default; } }));
|
|
2692
|
-
var ContextualbarSkeleton_1 = __webpack_require__(/*! ./ContextualbarSkeleton */ "./src/components/ContextualbarV2/ContextualbarSkeleton.tsx");
|
|
2693
|
-
Object.defineProperty(exports, "ContextualbarV2Skeleton", ({ enumerable: true, get: function () { return __importDefault(ContextualbarSkeleton_1).default; } }));
|
|
2694
|
-
var ContextualbarTitle_1 = __webpack_require__(/*! ./ContextualbarTitle */ "./src/components/ContextualbarV2/ContextualbarTitle.tsx");
|
|
2695
|
-
Object.defineProperty(exports, "ContextualbarV2Title", ({ enumerable: true, get: function () { return __importDefault(ContextualbarTitle_1).default; } }));
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
2391
|
/***/ },
|
|
2699
2392
|
|
|
2700
2393
|
/***/ "./src/components/Divider/Divider.tsx"
|
|
@@ -3769,7 +3462,7 @@ const Menu = ({ icon = 'kebab', placement = 'bottom-start', title, is: MenuButto
|
|
|
3769
3462
|
const sizes = { large, medium, tiny, mini };
|
|
3770
3463
|
const defaultSmall = !large && !medium && !tiny && !mini;
|
|
3771
3464
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
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 }) }));
|
|
3465
|
+
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 }) }));
|
|
3773
3466
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [button ? ((0, react_1.cloneElement)(button, {
|
|
3774
3467
|
...buttonProps,
|
|
3775
3468
|
ref,
|
|
@@ -3803,11 +3496,21 @@ const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
|
3803
3496
|
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
3804
3497
|
const MenuItem_1 = __importDefault(__webpack_require__(/*! ./MenuItem */ "./src/components/Menu/MenuItem.tsx"));
|
|
3805
3498
|
const MenuSection_1 = __importDefault(__webpack_require__(/*! ./MenuSection */ "./src/components/Menu/MenuSection.tsx"));
|
|
3806
|
-
|
|
3499
|
+
const MenuSubmenu_1 = __importDefault(__webpack_require__(/*! ./MenuSubmenu */ "./src/components/Menu/MenuSubmenu.tsx"));
|
|
3500
|
+
function MenuDropDown({ rootMenuTriggerState, menuRef, ...props }) {
|
|
3807
3501
|
const state = (0, react_stately_1.useTreeState)(props);
|
|
3808
|
-
const
|
|
3502
|
+
const fallbackRef = (0, react_1.useRef)(null);
|
|
3503
|
+
const ref = menuRef ?? fallbackRef;
|
|
3809
3504
|
const { menuProps } = (0, react_aria_1.useMenu)(props, state, ref);
|
|
3810
|
-
return ((0, jsx_runtime_1.jsx)("div", { ...menuProps, ref: ref, children: [...state.collection].map((item) =>
|
|
3505
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...menuProps, ref: ref, children: [...state.collection].map((item) => {
|
|
3506
|
+
if (item.type === 'section') {
|
|
3507
|
+
return ((0, jsx_runtime_1.jsx)(MenuSection_1.default, { section: item, state: state, rootMenuTriggerState: rootMenuTriggerState, parentMenuRef: ref, onAction: props.onAction }, item.key));
|
|
3508
|
+
}
|
|
3509
|
+
if (item.hasChildNodes) {
|
|
3510
|
+
return ((0, jsx_runtime_1.jsx)(MenuSubmenu_1.default, { item: item, state: state, rootMenuTriggerState: rootMenuTriggerState, parentMenuRef: ref, onAction: props.onAction }, item.key));
|
|
3511
|
+
}
|
|
3512
|
+
return (0, jsx_runtime_1.jsx)(MenuItem_1.default, { item: item, state: state }, item.key);
|
|
3513
|
+
}) }));
|
|
3811
3514
|
}
|
|
3812
3515
|
exports["default"] = MenuDropDown;
|
|
3813
3516
|
|
|
@@ -3886,19 +3589,79 @@ exports["default"] = (0, react_2.memo)(MenuOption);
|
|
|
3886
3589
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3887
3590
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3888
3591
|
const fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
3592
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3593
|
+
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
3889
3594
|
const DropdownDesktop_1 = __webpack_require__(/*! ../Dropdown/DropdownDesktop */ "./src/components/Dropdown/DropdownDesktop.tsx");
|
|
3890
3595
|
const DropdownMobile_1 = __webpack_require__(/*! ../Dropdown/DropdownMobile */ "./src/components/Dropdown/DropdownMobile.tsx");
|
|
3891
3596
|
const Popover_1 = __webpack_require__(/*! ../Popover */ "./src/components/Popover/index.ts");
|
|
3597
|
+
const MenuPortalContext_1 = __webpack_require__(/*! ./MenuPortalContext */ "./src/components/Menu/MenuPortalContext.ts");
|
|
3892
3598
|
function MenuPopover({ children, state, offset = 4, maxWidth, ...props }) {
|
|
3893
3599
|
const isMobile = !(0, fuselage_hooks_1.useBreakpoints)().includes('sm');
|
|
3894
|
-
|
|
3895
|
-
|
|
3600
|
+
// The root popover (no container above it) renders a `display: contents`
|
|
3601
|
+
// mount point and shares it with the rest of the tree. Submenu popovers
|
|
3602
|
+
// portal into it, so their DOM nests under the root popover and the whole
|
|
3603
|
+
// tree behaves as one for focus/`aria-hidden` purposes — matching how
|
|
3604
|
+
// `react-aria-components` groups submenu popovers via `PopoverGroupContext`.
|
|
3605
|
+
const groupContainer = (0, MenuPortalContext_1.useMenuPortalContainer)();
|
|
3606
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
3607
|
+
const isSubmenu = groupContainer !== null;
|
|
3608
|
+
const popoverRef = (0, react_1.useRef)(null);
|
|
3609
|
+
// react-aria only lets the *topmost* overlay dismiss on an outside click.
|
|
3610
|
+
// While a submenu is open it is topmost, but submenus are non-modal (hence
|
|
3611
|
+
// non-dismissable), so neither the submenu nor the root closes. Since every
|
|
3612
|
+
// open submenu portals into the root popover, the root popover element
|
|
3613
|
+
// contains the entire menu tree — so we close the whole menu on any
|
|
3614
|
+
// interaction outside it (ignoring the trigger, which toggles on its own).
|
|
3615
|
+
(0, react_aria_1.useInteractOutside)({
|
|
3616
|
+
ref: popoverRef,
|
|
3617
|
+
isDisabled: isSubmenu,
|
|
3618
|
+
onInteractOutside: (event) => {
|
|
3619
|
+
const trigger = props.triggerRef?.current;
|
|
3620
|
+
if (trigger && trigger.contains(event.target)) {
|
|
3621
|
+
return;
|
|
3622
|
+
}
|
|
3623
|
+
state.close();
|
|
3624
|
+
},
|
|
3625
|
+
});
|
|
3626
|
+
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' } }))] }));
|
|
3627
|
+
if (isSubmenu) {
|
|
3628
|
+
return popover;
|
|
3896
3629
|
}
|
|
3897
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
3630
|
+
return ((0, jsx_runtime_1.jsx)(MenuPortalContext_1.MenuPortalContext.Provider, { value: containerRef, children: popover }));
|
|
3898
3631
|
}
|
|
3899
3632
|
exports["default"] = MenuPopover;
|
|
3900
3633
|
|
|
3901
3634
|
|
|
3635
|
+
/***/ },
|
|
3636
|
+
|
|
3637
|
+
/***/ "./src/components/Menu/MenuPortalContext.ts"
|
|
3638
|
+
/*!**************************************************!*\
|
|
3639
|
+
!*** ./src/components/Menu/MenuPortalContext.ts ***!
|
|
3640
|
+
\**************************************************/
|
|
3641
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3645
|
+
exports.useMenuPortalContainer = exports.MenuPortalContext = void 0;
|
|
3646
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3647
|
+
/**
|
|
3648
|
+
* Ref to the root menu popover's portal container.
|
|
3649
|
+
*
|
|
3650
|
+
* Submenu popovers portal into this container instead of straight into
|
|
3651
|
+
* `document.body`, so the whole menu tree lives in a single DOM subtree nested
|
|
3652
|
+
* under the root popover. This mirrors `react-aria-components`'
|
|
3653
|
+
* `PopoverGroupContext` and is what keeps focus tracking and `aria-hidden`
|
|
3654
|
+
* scoping correct across submenu levels — without it each portaled submenu
|
|
3655
|
+
* looks like "outside" to the root popover and close-on-blur tears the tree
|
|
3656
|
+
* down.
|
|
3657
|
+
*
|
|
3658
|
+
* `null` means there is no root yet, i.e. the consuming popover IS the root.
|
|
3659
|
+
*/
|
|
3660
|
+
exports.MenuPortalContext = (0, react_1.createContext)(null);
|
|
3661
|
+
const useMenuPortalContainer = () => (0, react_1.useContext)(exports.MenuPortalContext);
|
|
3662
|
+
exports.useMenuPortalContainer = useMenuPortalContainer;
|
|
3663
|
+
|
|
3664
|
+
|
|
3902
3665
|
/***/ },
|
|
3903
3666
|
|
|
3904
3667
|
/***/ "./src/components/Menu/MenuSection.tsx"
|
|
@@ -3918,7 +3681,8 @@ const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts")
|
|
|
3918
3681
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
3919
3682
|
const Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
3920
3683
|
const MenuItem_1 = __importDefault(__webpack_require__(/*! ./MenuItem */ "./src/components/Menu/MenuItem.tsx"));
|
|
3921
|
-
|
|
3684
|
+
const MenuSubmenu_1 = __importDefault(__webpack_require__(/*! ./MenuSubmenu */ "./src/components/Menu/MenuSubmenu.tsx"));
|
|
3685
|
+
function MenuSection({ section, state, rootMenuTriggerState, parentMenuRef, onAction, }) {
|
|
3922
3686
|
const { itemProps, headingProps, groupProps } = (0, react_aria_1.useMenuSection)({
|
|
3923
3687
|
'heading': section.rendered,
|
|
3924
3688
|
'aria-label': section['aria-label'],
|
|
@@ -3927,11 +3691,85 @@ function MenuSection({ section, state, }) {
|
|
|
3927
3691
|
elementType: 'span',
|
|
3928
3692
|
});
|
|
3929
3693
|
// If the section is not the first, add a separator element.
|
|
3930
|
-
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) => ((0, jsx_runtime_1.jsx)(MenuItem_1.default, { item: node, state: state }, node.key))) })] })] }));
|
|
3694
|
+
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))) })] })] }));
|
|
3931
3695
|
}
|
|
3932
3696
|
exports["default"] = MenuSection;
|
|
3933
3697
|
|
|
3934
3698
|
|
|
3699
|
+
/***/ },
|
|
3700
|
+
|
|
3701
|
+
/***/ "./src/components/Menu/MenuSubmenu.tsx"
|
|
3702
|
+
/*!*********************************************!*\
|
|
3703
|
+
!*** ./src/components/Menu/MenuSubmenu.tsx ***!
|
|
3704
|
+
\*********************************************/
|
|
3705
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3706
|
+
|
|
3707
|
+
|
|
3708
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3709
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3710
|
+
};
|
|
3711
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3712
|
+
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
3713
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3714
|
+
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
3715
|
+
const react_stately_1 = __webpack_require__(/*! react-stately */ "react-stately");
|
|
3716
|
+
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
3717
|
+
const MenuDropdown_1 = __importDefault(__webpack_require__(/*! ./MenuDropdown */ "./src/components/Menu/MenuDropdown.tsx"));
|
|
3718
|
+
const MenuOption_1 = __importDefault(__webpack_require__(/*! ./MenuOption */ "./src/components/Menu/MenuOption.tsx"));
|
|
3719
|
+
const MenuPopover_1 = __importDefault(__webpack_require__(/*! ./MenuPopover */ "./src/components/Menu/MenuPopover.tsx"));
|
|
3720
|
+
/**
|
|
3721
|
+
* Renders a menu item that opens a nested submenu.
|
|
3722
|
+
*
|
|
3723
|
+
* The trigger item belongs to the parent menu's tree state (so arrow-key
|
|
3724
|
+
* navigation keeps working), while the submenu renders its own `MenuDropDown`
|
|
3725
|
+
* built from the trigger's children — giving it an isolated collection and
|
|
3726
|
+
* focus scope, mirroring how `react-aria-components` handles `SubmenuTrigger`.
|
|
3727
|
+
*/
|
|
3728
|
+
function MenuSubmenu({ item, state, rootMenuTriggerState, parentMenuRef, onAction, }) {
|
|
3729
|
+
const triggerRef = (0, react_1.useRef)(null);
|
|
3730
|
+
const submenuRef = (0, react_1.useRef)(null);
|
|
3731
|
+
const submenuTriggerState = (0, react_stately_1.useSubmenuTriggerState)({ triggerKey: item.key }, rootMenuTriggerState);
|
|
3732
|
+
const { submenuTriggerProps, submenuProps, popoverProps } = (0, react_aria_1.useSubmenuTrigger)({ parentMenuRef, submenuRef }, submenuTriggerState, triggerRef);
|
|
3733
|
+
/** 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.
|
|
3734
|
+
**/
|
|
3735
|
+
const closeSubmenu = () => {
|
|
3736
|
+
// 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.
|
|
3737
|
+
triggerRef.current?.focus();
|
|
3738
|
+
submenuTriggerState.close();
|
|
3739
|
+
};
|
|
3740
|
+
/** Fires when focus is inside the submenu (keyboard navigation). */
|
|
3741
|
+
const onSubmenuKeyDown = (event) => {
|
|
3742
|
+
if (event.key === 'Escape') {
|
|
3743
|
+
event.stopPropagation();
|
|
3744
|
+
closeSubmenu();
|
|
3745
|
+
return;
|
|
3746
|
+
}
|
|
3747
|
+
submenuProps.onKeyDown?.(event);
|
|
3748
|
+
};
|
|
3749
|
+
/** 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.
|
|
3750
|
+
**/
|
|
3751
|
+
const onTriggerKeyDown = (event) => {
|
|
3752
|
+
if (event.key === 'Escape') {
|
|
3753
|
+
if (submenuTriggerState.isOpen) {
|
|
3754
|
+
closeSubmenu();
|
|
3755
|
+
return;
|
|
3756
|
+
}
|
|
3757
|
+
event.continuePropagation();
|
|
3758
|
+
return;
|
|
3759
|
+
}
|
|
3760
|
+
submenuTriggerProps.onKeyDown?.(event);
|
|
3761
|
+
};
|
|
3762
|
+
const { menuItemProps, isFocused, isDisabled } = (0, react_aria_1.useMenuItem)({ ...submenuTriggerProps, onKeyDown: onTriggerKeyDown, key: item.key }, state, triggerRef);
|
|
3763
|
+
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, {
|
|
3764
|
+
'id': submenuTriggerProps.id,
|
|
3765
|
+
'aria-haspopup': submenuTriggerProps['aria-haspopup'],
|
|
3766
|
+
'aria-expanded': submenuTriggerProps['aria-expanded'],
|
|
3767
|
+
'aria-controls': submenuTriggerProps['aria-controls'],
|
|
3768
|
+
}), 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 }) }))] }));
|
|
3769
|
+
}
|
|
3770
|
+
exports["default"] = MenuSubmenu;
|
|
3771
|
+
|
|
3772
|
+
|
|
3935
3773
|
/***/ },
|
|
3936
3774
|
|
|
3937
3775
|
/***/ "./src/components/Menu/helpers/helpers.ts"
|
|
@@ -3990,11 +3828,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3990
3828
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3991
3829
|
};
|
|
3992
3830
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3993
|
-
exports.MenuItemDescription = exports.MenuItemTitle = exports.MenuItemSkeleton = exports.MenuItemInput = exports.MenuItemIcon = exports.MenuItemContent = exports.MenuItemColumn = exports.MenuItemAvatar = exports.MenuSection = exports.MenuItem = exports.Menu = void 0;
|
|
3831
|
+
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;
|
|
3994
3832
|
var Menu_1 = __webpack_require__(/*! ./Menu */ "./src/components/Menu/Menu.tsx");
|
|
3995
3833
|
Object.defineProperty(exports, "Menu", ({ enumerable: true, get: function () { return __importDefault(Menu_1).default; } }));
|
|
3996
3834
|
var MenuItem_1 = __webpack_require__(/*! ./stately/MenuItem */ "./src/components/Menu/stately/MenuItem.tsx");
|
|
3997
3835
|
Object.defineProperty(exports, "MenuItem", ({ enumerable: true, get: function () { return __importDefault(MenuItem_1).default; } }));
|
|
3836
|
+
var MenuSubmenuTrigger_1 = __webpack_require__(/*! ./stately/MenuSubmenuTrigger */ "./src/components/Menu/stately/MenuSubmenuTrigger.tsx");
|
|
3837
|
+
Object.defineProperty(exports, "MenuSubmenuTrigger", ({ enumerable: true, get: function () { return __importDefault(MenuSubmenuTrigger_1).default; } }));
|
|
3998
3838
|
var MenuSection_1 = __webpack_require__(/*! ./stately/MenuSection */ "./src/components/Menu/stately/MenuSection.tsx");
|
|
3999
3839
|
Object.defineProperty(exports, "MenuSection", ({ enumerable: true, get: function () { return __importDefault(MenuSection_1).default; } }));
|
|
4000
3840
|
var Option_1 = __webpack_require__(/*! ../Option */ "./src/components/Option/index.ts");
|
|
@@ -4127,6 +3967,74 @@ MenuSection.getCollectionNode = function* getCollectionNode(props) {
|
|
|
4127
3967
|
exports["default"] = MenuSection;
|
|
4128
3968
|
|
|
4129
3969
|
|
|
3970
|
+
/***/ },
|
|
3971
|
+
|
|
3972
|
+
/***/ "./src/components/Menu/stately/MenuSubmenuTrigger.tsx"
|
|
3973
|
+
/*!************************************************************!*\
|
|
3974
|
+
!*** ./src/components/Menu/stately/MenuSubmenuTrigger.tsx ***!
|
|
3975
|
+
\************************************************************/
|
|
3976
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3977
|
+
|
|
3978
|
+
|
|
3979
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3980
|
+
const react_1 = __webpack_require__(/*! react */ "react");
|
|
3981
|
+
function MenuSubmenuTrigger(_props) {
|
|
3982
|
+
return null;
|
|
3983
|
+
}
|
|
3984
|
+
const toElementArray = (children) => {
|
|
3985
|
+
const result = [];
|
|
3986
|
+
const visit = (node) => {
|
|
3987
|
+
if (Array.isArray(node)) {
|
|
3988
|
+
node.forEach(visit);
|
|
3989
|
+
return;
|
|
3990
|
+
}
|
|
3991
|
+
if ((0, react_1.isValidElement)(node)) {
|
|
3992
|
+
result.push(node);
|
|
3993
|
+
}
|
|
3994
|
+
};
|
|
3995
|
+
visit(children);
|
|
3996
|
+
return result;
|
|
3997
|
+
};
|
|
3998
|
+
MenuSubmenuTrigger.getCollectionNode = function* getCollectionNode(props, context) {
|
|
3999
|
+
const [trigger, ...submenuItems] = toElementArray(props.children);
|
|
4000
|
+
if (!trigger || submenuItems.length === 0) {
|
|
4001
|
+
throw new Error('A <MenuSubmenuTrigger> must have at least two children: the trigger item followed by one or more submenu items.');
|
|
4002
|
+
}
|
|
4003
|
+
const rendered = trigger.props.children;
|
|
4004
|
+
const textValue = props.textValue ||
|
|
4005
|
+
trigger.props.textValue ||
|
|
4006
|
+
(typeof rendered === 'string' ? rendered : '') ||
|
|
4007
|
+
props['aria-label'] ||
|
|
4008
|
+
trigger.props['aria-label'] ||
|
|
4009
|
+
'';
|
|
4010
|
+
if (!textValue && !context?.suppressTextValueWarning) {
|
|
4011
|
+
console.warn('<MenuSubmenuTrigger> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop.');
|
|
4012
|
+
}
|
|
4013
|
+
yield {
|
|
4014
|
+
'type': 'item',
|
|
4015
|
+
// Only the submenu items are forwarded as children — the trigger element is
|
|
4016
|
+
// consumed here and rendered separately by `MenuSubmenu`.
|
|
4017
|
+
'props': { ...props, children: submenuItems },
|
|
4018
|
+
rendered,
|
|
4019
|
+
textValue,
|
|
4020
|
+
'aria-label': props['aria-label'] || trigger.props['aria-label'],
|
|
4021
|
+
'value': (props.variant
|
|
4022
|
+
? { variant: props.variant }
|
|
4023
|
+
: undefined),
|
|
4024
|
+
'hasChildNodes': true,
|
|
4025
|
+
*'childNodes'() {
|
|
4026
|
+
for (const item of submenuItems) {
|
|
4027
|
+
yield {
|
|
4028
|
+
type: 'item',
|
|
4029
|
+
element: item,
|
|
4030
|
+
};
|
|
4031
|
+
}
|
|
4032
|
+
},
|
|
4033
|
+
};
|
|
4034
|
+
};
|
|
4035
|
+
exports["default"] = MenuSubmenuTrigger;
|
|
4036
|
+
|
|
4037
|
+
|
|
4130
4038
|
/***/ },
|
|
4131
4039
|
|
|
4132
4040
|
/***/ "./src/components/Message/Message.tsx"
|
|
@@ -7749,8 +7657,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
7749
7657
|
const react_1 = __webpack_require__(/*! react */ "react");
|
|
7750
7658
|
const react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
|
|
7751
7659
|
const contexts_1 = __webpack_require__(/*! ../../contexts */ "./src/contexts/index.ts");
|
|
7752
|
-
function Popover({ portalContainer, ...props }) {
|
|
7753
|
-
const
|
|
7660
|
+
function Popover({ portalContainer, popoverRef: popoverRefProp, ...props }) {
|
|
7661
|
+
const fallbackRef = (0, react_1.useRef)(null);
|
|
7662
|
+
const popoverRef = popoverRefProp ?? fallbackRef;
|
|
7754
7663
|
const { state, children, isNonModal } = props;
|
|
7755
7664
|
const { document: ownerDocument } = (0, contexts_1.useOwnerDocument)();
|
|
7756
7665
|
const { popoverProps, underlayProps } = (0, react_aria_1.usePopover)({
|
|
@@ -7758,7 +7667,7 @@ function Popover({ portalContainer, ...props }) {
|
|
|
7758
7667
|
popoverRef,
|
|
7759
7668
|
boundaryElement: ownerDocument?.body,
|
|
7760
7669
|
}, state);
|
|
7761
|
-
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 })] })] }));
|
|
7670
|
+
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 })] })] }));
|
|
7762
7671
|
}
|
|
7763
7672
|
exports["default"] = Popover;
|
|
7764
7673
|
|
|
@@ -8475,22 +8384,49 @@ exports.SidebarItem = exports.SidebarItemAction = exports.SidebarItemActions = e
|
|
|
8475
8384
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8476
8385
|
const Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
8477
8386
|
const SidebarActions_1 = __webpack_require__(/*! ./SidebarActions */ "./src/components/Sidebar/SidebarActions.tsx");
|
|
8387
|
+
/**
|
|
8388
|
+
* @deprecated Use the `SidebarV2` component family instead.
|
|
8389
|
+
*/
|
|
8478
8390
|
const SidebarItemContainer = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rc-box rcx-box--full rcx-sidebar-item__container', ...props }));
|
|
8479
8391
|
exports.SidebarItemContainer = SidebarItemContainer;
|
|
8392
|
+
/**
|
|
8393
|
+
* @deprecated Use `SidebarV2ItemMenu` instead.
|
|
8394
|
+
*/
|
|
8480
8395
|
const SidebarItemMenu = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rc-box rcx-box--full rcx-box--animated rcx-sidebar-item__menu-wrapper', ...props }));
|
|
8481
8396
|
exports.SidebarItemMenu = SidebarItemMenu;
|
|
8397
|
+
/**
|
|
8398
|
+
* @deprecated Use `SidebarV2ItemContent` instead.
|
|
8399
|
+
*/
|
|
8482
8400
|
const SidebarItemContent = ({ className = '', ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__container rcx-sidebar-item__content ${className}`, ...props }));
|
|
8483
8401
|
exports.SidebarItemContent = SidebarItemContent;
|
|
8402
|
+
/**
|
|
8403
|
+
* @deprecated Use `SidebarV2ItemTitle` instead.
|
|
8404
|
+
*/
|
|
8484
8405
|
const SidebarItemTitle = ({ className = '', ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__title ${className}`, ...props }));
|
|
8485
8406
|
exports.SidebarItemTitle = SidebarItemTitle;
|
|
8407
|
+
/**
|
|
8408
|
+
* @deprecated Use `SidebarV2ItemTimestamp` instead.
|
|
8409
|
+
*/
|
|
8486
8410
|
const SidebarItemTime = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__time ${className}`, ...props }));
|
|
8487
8411
|
exports.SidebarItemTime = SidebarItemTime;
|
|
8412
|
+
/**
|
|
8413
|
+
* @deprecated Use `SidebarV2ItemBadge` instead.
|
|
8414
|
+
*/
|
|
8488
8415
|
const SidebarItemBadge = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__badge ${className}`, ...props }));
|
|
8489
8416
|
exports.SidebarItemBadge = SidebarItemBadge;
|
|
8417
|
+
/**
|
|
8418
|
+
* @deprecated Use the `SidebarV2` component family instead.
|
|
8419
|
+
*/
|
|
8490
8420
|
const SidebarItemSubtitle = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__subtitle ${className}`, ...props }));
|
|
8491
8421
|
exports.SidebarItemSubtitle = SidebarItemSubtitle;
|
|
8422
|
+
/**
|
|
8423
|
+
* @deprecated Use the `SidebarV2` component family instead.
|
|
8424
|
+
*/
|
|
8492
8425
|
const SidebarItemWrapper = ({ className = '', ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: `rc-box rcx-box--full rcx-sidebar-item__wrapper ${className}`, ...props }));
|
|
8493
8426
|
exports.SidebarItemWrapper = SidebarItemWrapper;
|
|
8427
|
+
/**
|
|
8428
|
+
* @deprecated Use `SidebarV2ItemIcon` instead.
|
|
8429
|
+
*/
|
|
8494
8430
|
const SidebarItemIcon = ({ highlighted, children, icon, className: _className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
8495
8431
|
'rc-box rcx-box--full rcx-sidebar-item__icon',
|
|
8496
8432
|
highlighted && 'rcx-sidebar-item__icon--highlighted',
|
|
@@ -8498,13 +8434,24 @@ const SidebarItemIcon = ({ highlighted, children, icon, className: _className, .
|
|
|
8498
8434
|
.filter(Boolean)
|
|
8499
8435
|
.join(' '), ...props, children: children || (0, jsx_runtime_1.jsx)(Icon_1.Icon, { size: 'x16', name: icon, ...props }) }));
|
|
8500
8436
|
exports.SidebarItemIcon = SidebarItemIcon;
|
|
8437
|
+
/**
|
|
8438
|
+
* @deprecated Use `SidebarV2ItemAvatarWrapper` instead.
|
|
8439
|
+
*/
|
|
8501
8440
|
const SidebarItemAvatar = ({ ...props }) => ((0, jsx_runtime_1.jsx)(exports.SidebarItemContainer, { children: (0, jsx_runtime_1.jsx)("div", { className: 'rc-box rcx-box--full rcx-sidebar-item__avatar', ...props }) }));
|
|
8502
8441
|
exports.SidebarItemAvatar = SidebarItemAvatar;
|
|
8442
|
+
/**
|
|
8443
|
+
* @deprecated Use `SidebarV2ItemMenu` instead.
|
|
8444
|
+
*/
|
|
8503
8445
|
exports.SidebarItemActions = SidebarActions_1.SidebarActions;
|
|
8446
|
+
/**
|
|
8447
|
+
* @deprecated Use `SidebarV2ItemAction` instead.
|
|
8448
|
+
*/
|
|
8504
8449
|
const SidebarItemAction = (props) => ((0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarAction, { ...props }));
|
|
8505
8450
|
exports.SidebarItemAction = SidebarItemAction;
|
|
8506
8451
|
/**
|
|
8507
8452
|
* Item component to be used inside Sidebar.
|
|
8453
|
+
*
|
|
8454
|
+
* @deprecated Use `SidebarV2Item` instead.
|
|
8508
8455
|
*/
|
|
8509
8456
|
const SidebarItem = ({ selected, highlighted, clickable, featured, is: Tag = 'div', children, ...props }) => ((0, jsx_runtime_1.jsx)(Tag, { className: [
|
|
8510
8457
|
'rc-box rcx-box--full rcx-sidebar-item',
|
|
@@ -8530,8 +8477,14 @@ exports.SidebarItem = SidebarItem;
|
|
|
8530
8477
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8531
8478
|
exports.SidebarSection = exports.SidebarSectionTitle = void 0;
|
|
8532
8479
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8480
|
+
/**
|
|
8481
|
+
* @deprecated Use `SidebarV2GroupTitle` instead.
|
|
8482
|
+
*/
|
|
8533
8483
|
const SidebarSectionTitle = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-title', ...props }));
|
|
8534
8484
|
exports.SidebarSectionTitle = SidebarSectionTitle;
|
|
8485
|
+
/**
|
|
8486
|
+
* @deprecated Use `SidebarV2Section` instead.
|
|
8487
|
+
*/
|
|
8535
8488
|
const SidebarSection = (props) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-section', ...props }));
|
|
8536
8489
|
exports.SidebarSection = SidebarSection;
|
|
8537
8490
|
|
|
@@ -8548,6 +8501,9 @@ exports.SidebarSection = SidebarSection;
|
|
|
8548
8501
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8549
8502
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8550
8503
|
const Box_1 = __webpack_require__(/*! ../Box */ "./src/components/Box/index.ts");
|
|
8504
|
+
/**
|
|
8505
|
+
* @deprecated Use `SidebarV2` instead.
|
|
8506
|
+
*/
|
|
8551
8507
|
const Sidebar = (props) => (0, jsx_runtime_1.jsx)(Box_1.Box, { "rcx-sidebar": true, ...props });
|
|
8552
8508
|
exports["default"] = Sidebar;
|
|
8553
8509
|
|
|
@@ -8567,9 +8523,15 @@ exports.SidebarAction = SidebarAction;
|
|
|
8567
8523
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8568
8524
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
8569
8525
|
const ButtonGroup_1 = __webpack_require__(/*! ../ButtonGroup */ "./src/components/ButtonGroup/index.ts");
|
|
8526
|
+
/**
|
|
8527
|
+
* @deprecated Use `SidebarV2Actions` instead.
|
|
8528
|
+
*/
|
|
8570
8529
|
function SidebarActions(props) {
|
|
8571
8530
|
return (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { ...props });
|
|
8572
8531
|
}
|
|
8532
|
+
/**
|
|
8533
|
+
* @deprecated Use `SidebarV2Action` instead.
|
|
8534
|
+
*/
|
|
8573
8535
|
function SidebarAction(props) {
|
|
8574
8536
|
return (0, jsx_runtime_1.jsx)(Button_1.IconButton, { small: true, ...props });
|
|
8575
8537
|
}
|
|
@@ -8587,6 +8549,9 @@ function SidebarAction(props) {
|
|
|
8587
8549
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8588
8550
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8589
8551
|
const Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
8552
|
+
/**
|
|
8553
|
+
* @deprecated Use `SidebarV2Banner` instead.
|
|
8554
|
+
*/
|
|
8590
8555
|
const SidebarBanner = ({ text, description, onClick, variant = 'default', addon, onClose, children, }) => ((0, jsx_runtime_1.jsxs)("div", { className: `rcx-box rcx-box--full rcx-sidebar-banner rcx-sidebar-banner--${variant}`, children: [(0, jsx_runtime_1.jsxs)("div", { children: [text && (0, jsx_runtime_1.jsx)("div", { className: 'rcx-sidebar-banner--text', children: text }), description && ((0, jsx_runtime_1.jsx)("div", { role: onClick ? 'link' : undefined, tabIndex: 0, className: [
|
|
8591
8556
|
'rcx-sidebar-banner--description',
|
|
8592
8557
|
onClick && 'rcx-sidebar-banner--description--clickable',
|
|
@@ -8608,6 +8573,9 @@ exports["default"] = SidebarBanner;
|
|
|
8608
8573
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8609
8574
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8610
8575
|
const Divider_1 = __webpack_require__(/*! ../Divider */ "./src/components/Divider/index.ts");
|
|
8576
|
+
/**
|
|
8577
|
+
* @deprecated Use `SidebarV2Divider` instead.
|
|
8578
|
+
*/
|
|
8611
8579
|
const SidebarDivider = () => ((0, jsx_runtime_1.jsx)(Divider_1.Divider, { "rcx-sidebar--divider": true, marginBlockStart: -2, marginBlockEnd: 0 }));
|
|
8612
8580
|
exports["default"] = SidebarDivider;
|
|
8613
8581
|
|
|
@@ -8624,6 +8592,9 @@ exports["default"] = SidebarDivider;
|
|
|
8624
8592
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8625
8593
|
exports.SidebarFooterHighlight = exports.SidebarFooter = void 0;
|
|
8626
8594
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8595
|
+
/**
|
|
8596
|
+
* @deprecated Use `SidebarV2Footer` instead.
|
|
8597
|
+
*/
|
|
8627
8598
|
const SidebarFooter = ({ elevated, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
8628
8599
|
'rcx-box rcx-box--full rcx-sidebar-footer',
|
|
8629
8600
|
elevated && 'rcx-sidebar-footer--elevated',
|
|
@@ -8631,6 +8602,9 @@ const SidebarFooter = ({ elevated, ...props }) => ((0, jsx_runtime_1.jsx)("div",
|
|
|
8631
8602
|
.filter(Boolean)
|
|
8632
8603
|
.join(' '), ...props }));
|
|
8633
8604
|
exports.SidebarFooter = SidebarFooter;
|
|
8605
|
+
/**
|
|
8606
|
+
* @deprecated Use `SidebarV2FooterContent` instead.
|
|
8607
|
+
*/
|
|
8634
8608
|
const SidebarFooterHighlight = ({ ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: 'rcx-box rcx-box--full rcx-sidebar-footer__highlights', ...props }));
|
|
8635
8609
|
exports.SidebarFooterHighlight = SidebarFooterHighlight;
|
|
8636
8610
|
|
|
@@ -8649,6 +8623,8 @@ exports.TopBar = void 0;
|
|
|
8649
8623
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8650
8624
|
/**
|
|
8651
8625
|
* Sidebar TopBar and ToolBox.
|
|
8626
|
+
*
|
|
8627
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8652
8628
|
*/
|
|
8653
8629
|
const TopBar = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: ['rc-box rc-box--full rcx-sidebar-topbar', className]
|
|
8654
8630
|
.filter(Boolean)
|
|
@@ -8669,6 +8645,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8669
8645
|
exports.TopBarAction = TopBarAction;
|
|
8670
8646
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8671
8647
|
const SidebarActions_1 = __webpack_require__(/*! ../SidebarActions */ "./src/components/Sidebar/SidebarActions.tsx");
|
|
8648
|
+
/**
|
|
8649
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8650
|
+
*/
|
|
8672
8651
|
function TopBarAction(props) {
|
|
8673
8652
|
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarAction, { ...props });
|
|
8674
8653
|
}
|
|
@@ -8687,6 +8666,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8687
8666
|
exports.TopBarActions = TopBarActions;
|
|
8688
8667
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8689
8668
|
const SidebarActions_1 = __webpack_require__(/*! ../SidebarActions */ "./src/components/Sidebar/SidebarActions.tsx");
|
|
8669
|
+
/**
|
|
8670
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8671
|
+
*/
|
|
8690
8672
|
function TopBarActions(props) {
|
|
8691
8673
|
return (0, jsx_runtime_1.jsx)(SidebarActions_1.SidebarActions, { ...props });
|
|
8692
8674
|
}
|
|
@@ -8710,6 +8692,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
8710
8692
|
const SidebarDivider_1 = __importDefault(__webpack_require__(/*! ../SidebarDivider */ "./src/components/Sidebar/SidebarDivider.tsx"));
|
|
8711
8693
|
const TopBar_1 = __webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/TopBar.tsx");
|
|
8712
8694
|
const TopBarWrapper_1 = __webpack_require__(/*! ./TopBarWrapper */ "./src/components/Sidebar/TopBar/TopBarWrapper.tsx");
|
|
8695
|
+
/**
|
|
8696
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8697
|
+
*/
|
|
8713
8698
|
const TopBarSection = ({ className, children, ...props }) => ((0, jsx_runtime_1.jsxs)(TopBar_1.TopBar, { className: ['rcx-sidebar-topbar--section', className]
|
|
8714
8699
|
.filter(Boolean)
|
|
8715
8700
|
.join(' '), ...props, children: [(0, jsx_runtime_1.jsx)(TopBarWrapper_1.TopBarWrapper, { children: children }), (0, jsx_runtime_1.jsx)(SidebarDivider_1.default, {})] }));
|
|
@@ -8729,6 +8714,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8729
8714
|
exports.TopBarTitle = void 0;
|
|
8730
8715
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8731
8716
|
const Box_1 = __webpack_require__(/*! ../../Box */ "./src/components/Box/index.ts");
|
|
8717
|
+
/**
|
|
8718
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8719
|
+
*/
|
|
8732
8720
|
const TopBarTitle = (props) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { className: 'rcx-sidebar-topbar__title', withTruncatedText: true, ...props }));
|
|
8733
8721
|
exports.TopBarTitle = TopBarTitle;
|
|
8734
8722
|
|
|
@@ -8751,6 +8739,9 @@ const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-ru
|
|
|
8751
8739
|
const SidebarDivider_1 = __importDefault(__webpack_require__(/*! ../SidebarDivider */ "./src/components/Sidebar/SidebarDivider.tsx"));
|
|
8752
8740
|
const TopBar_1 = __webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/TopBar.tsx");
|
|
8753
8741
|
const TopBarWrapper_1 = __webpack_require__(/*! ./TopBarWrapper */ "./src/components/Sidebar/TopBar/TopBarWrapper.tsx");
|
|
8742
|
+
/**
|
|
8743
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8744
|
+
*/
|
|
8754
8745
|
const TopBarToolBox = ({ children, className, ...props }) => ((0, jsx_runtime_1.jsxs)(TopBar_1.TopBar, { className: ['rcx-sidebar-topbar--toolbox', className]
|
|
8755
8746
|
.filter(Boolean)
|
|
8756
8747
|
.join(' '), ...props, children: [(0, jsx_runtime_1.jsx)(TopBarWrapper_1.TopBarWrapper, { children: children }), (0, jsx_runtime_1.jsx)(SidebarDivider_1.default, {})] }));
|
|
@@ -8769,6 +8760,9 @@ exports.TopBarToolBox = TopBarToolBox;
|
|
|
8769
8760
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8770
8761
|
exports.TopBarV2 = void 0;
|
|
8771
8762
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8763
|
+
/**
|
|
8764
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8765
|
+
*/
|
|
8772
8766
|
const TopBarV2 = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
8773
8767
|
'rc-box rc-box--full rcx-sidebar-topbar-v2 rcx-sidebar-topbar-v2',
|
|
8774
8768
|
className,
|
|
@@ -8790,6 +8784,9 @@ exports.TopBarV2 = TopBarV2;
|
|
|
8790
8784
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8791
8785
|
exports.TopBarWrapper = void 0;
|
|
8792
8786
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
8787
|
+
/**
|
|
8788
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8789
|
+
*/
|
|
8793
8790
|
const TopBarWrapper = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { className: 'rc-box rc-box--full rcx-sidebar-topbar__wrapper', children: children }));
|
|
8794
8791
|
exports.TopBarWrapper = TopBarWrapper;
|
|
8795
8792
|
|
|
@@ -8819,6 +8816,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
8819
8816
|
};
|
|
8820
8817
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8821
8818
|
exports.TopBarAvatar = void 0;
|
|
8819
|
+
/**
|
|
8820
|
+
* @deprecated Use `NavBar` for app-level navigation instead.
|
|
8821
|
+
*/
|
|
8822
8822
|
exports.TopBarAvatar = { size: 'x24' };
|
|
8823
8823
|
__exportStar(__webpack_require__(/*! ./TopBar */ "./src/components/Sidebar/TopBar/TopBar.tsx"), exports);
|
|
8824
8824
|
__exportStar(__webpack_require__(/*! ./TopBarV2 */ "./src/components/Sidebar/TopBar/TopBarV2.tsx"), exports);
|
|
@@ -9042,13 +9042,13 @@ exports.SidebarCollapseGroup = SidebarCollapseGroup;
|
|
|
9042
9042
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9043
9043
|
const SidebarGroupTitle_1 = __webpack_require__(/*! ./SidebarGroupTitle */ "./src/components/SidebarV2/SidebarGroupTitle.tsx");
|
|
9044
9044
|
const useCollapse_1 = __webpack_require__(/*! ./hooks/useCollapse */ "./src/components/SidebarV2/hooks/useCollapse.tsx");
|
|
9045
|
-
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, title, ...props }) {
|
|
9045
|
+
function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, tabIndex, children, badge, menu, title, ...props }) {
|
|
9046
9046
|
const { barProps, expanded, panelExpanded, panelId, titleId } = (0, useCollapse_1.useCollapse)({
|
|
9047
9047
|
expanded: propExpanded,
|
|
9048
9048
|
defaultExpanded,
|
|
9049
9049
|
tabIndex,
|
|
9050
9050
|
});
|
|
9051
|
-
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: [
|
|
9051
|
+
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: [
|
|
9052
9052
|
'rcx-box rcx-box--full rcx-sidebar-v2-collapse-group__panel rcx-box--animated',
|
|
9053
9053
|
panelExpanded && 'rcx-sidebar-v2-collapse-group__panel--expanded',
|
|
9054
9054
|
]
|
|
@@ -9057,6 +9057,26 @@ function SidebarCollapseGroup({ ref, expanded: propExpanded, defaultExpanded, ta
|
|
|
9057
9057
|
}
|
|
9058
9058
|
|
|
9059
9059
|
|
|
9060
|
+
/***/ },
|
|
9061
|
+
|
|
9062
|
+
/***/ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx"
|
|
9063
|
+
/*!***************************************************************!*\
|
|
9064
|
+
!*** ./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx ***!
|
|
9065
|
+
\***************************************************************/
|
|
9066
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
9067
|
+
|
|
9068
|
+
|
|
9069
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9070
|
+
exports.SidebarCollapseGroupMenu = void 0;
|
|
9071
|
+
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9072
|
+
const appendClassName_1 = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
9073
|
+
const patchChildren_1 = __webpack_require__(/*! ../../helpers/patchChildren */ "./src/helpers/patchChildren.ts");
|
|
9074
|
+
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) => ({
|
|
9075
|
+
className: (0, appendClassName_1.appendClassName)(childProps.className, 'rcx-sidebar-v2-collapse-group__menu'),
|
|
9076
|
+
})) }));
|
|
9077
|
+
exports.SidebarCollapseGroupMenu = SidebarCollapseGroupMenu;
|
|
9078
|
+
|
|
9079
|
+
|
|
9060
9080
|
/***/ },
|
|
9061
9081
|
|
|
9062
9082
|
/***/ "./src/components/SidebarV2/SidebarDivider.tsx"
|
|
@@ -9137,12 +9157,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
9137
9157
|
exports.SidebarGroupTitle = void 0;
|
|
9138
9158
|
const jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
9139
9159
|
const Chevron_1 = __webpack_require__(/*! ../Chevron */ "./src/components/Chevron/index.ts");
|
|
9140
|
-
const
|
|
9160
|
+
const SidebarCollapseGroupMenu_1 = __webpack_require__(/*! ./SidebarCollapseGroupMenu */ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx");
|
|
9161
|
+
const SidebarGroupTitle = ({ title, titleId, badge, menu, barProps, expanded, role, ...props }) => ((0, jsx_runtime_1.jsxs)("div", { className: [
|
|
9141
9162
|
'rcx-box rcx-box--full',
|
|
9142
9163
|
'rcx-sidebar-v2-collapse-group__bar rcx-box--animated',
|
|
9143
9164
|
]
|
|
9144
9165
|
.filter(Boolean)
|
|
9145
|
-
.join(' '), ...
|
|
9166
|
+
.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 })] }));
|
|
9146
9167
|
exports.SidebarGroupTitle = SidebarGroupTitle;
|
|
9147
9168
|
|
|
9148
9169
|
|
|
@@ -9653,7 +9674,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9653
9674
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9654
9675
|
};
|
|
9655
9676
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9656
|
-
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;
|
|
9677
|
+
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;
|
|
9657
9678
|
var Sidebar_1 = __webpack_require__(/*! ./Sidebar */ "./src/components/SidebarV2/Sidebar.tsx");
|
|
9658
9679
|
Object.defineProperty(exports, "SidebarV2", ({ enumerable: true, get: function () { return Sidebar_1.Sidebar; } }));
|
|
9659
9680
|
var SidebarAccordion_1 = __webpack_require__(/*! ./SidebarAccordion */ "./src/components/SidebarV2/SidebarAccordion.tsx");
|
|
@@ -9669,6 +9690,8 @@ Object.defineProperty(exports, "SidebarV2Link", ({ enumerable: true, get: functi
|
|
|
9669
9690
|
__exportStar(__webpack_require__(/*! ./SidebarItem */ "./src/components/SidebarV2/SidebarItem/index.ts"), exports);
|
|
9670
9691
|
var SidebarCollapseGroup_1 = __webpack_require__(/*! ./SidebarCollapseGroup */ "./src/components/SidebarV2/SidebarCollapseGroup.tsx");
|
|
9671
9692
|
Object.defineProperty(exports, "SidebarV2CollapseGroup", ({ enumerable: true, get: function () { return SidebarCollapseGroup_1.SidebarCollapseGroup; } }));
|
|
9693
|
+
var SidebarCollapseGroupMenu_1 = __webpack_require__(/*! ./SidebarCollapseGroupMenu */ "./src/components/SidebarV2/SidebarCollapseGroupMenu.tsx");
|
|
9694
|
+
Object.defineProperty(exports, "SidebarV2CollapseGroupMenu", ({ enumerable: true, get: function () { return SidebarCollapseGroupMenu_1.SidebarCollapseGroupMenu; } }));
|
|
9672
9695
|
var SidebarBanner_1 = __webpack_require__(/*! ./SidebarBanner */ "./src/components/SidebarV2/SidebarBanner.tsx");
|
|
9673
9696
|
Object.defineProperty(exports, "SidebarV2Banner", ({ enumerable: true, get: function () { return SidebarBanner_1.SidebarBanner; } }));
|
|
9674
9697
|
__exportStar(__webpack_require__(/*! ./SidebarFooter */ "./src/components/SidebarV2/SidebarFooter/index.ts"), exports);
|
|
@@ -11224,7 +11247,6 @@ __exportStar(__webpack_require__(/*! ./Chevron */ "./src/components/Chevron/inde
|
|
|
11224
11247
|
__exportStar(__webpack_require__(/*! ./Chip */ "./src/components/Chip/index.ts"), exports);
|
|
11225
11248
|
__exportStar(__webpack_require__(/*! ./CodeSnippet */ "./src/components/CodeSnippet/index.ts"), exports);
|
|
11226
11249
|
__exportStar(__webpack_require__(/*! ./Contextualbar */ "./src/components/Contextualbar/index.ts"), exports);
|
|
11227
|
-
__exportStar(__webpack_require__(/*! ./ContextualbarV2 */ "./src/components/ContextualbarV2/index.ts"), exports);
|
|
11228
11250
|
__exportStar(__webpack_require__(/*! ./Divider */ "./src/components/Divider/index.ts"), exports);
|
|
11229
11251
|
__exportStar(__webpack_require__(/*! ./Dropdown */ "./src/components/Dropdown/index.ts"), exports);
|
|
11230
11252
|
__exportStar(__webpack_require__(/*! ./EmailInput */ "./src/components/EmailInput/index.ts"), exports);
|
|
@@ -12349,17 +12371,17 @@ module.exports = require("react/jsx-runtime");
|
|
|
12349
12371
|
/******/ });
|
|
12350
12372
|
/************************************************************************/
|
|
12351
12373
|
/******/ // The module cache
|
|
12352
|
-
/******/
|
|
12374
|
+
/******/ const __webpack_module_cache__ = {};
|
|
12353
12375
|
/******/
|
|
12354
12376
|
/******/ // The require function
|
|
12355
12377
|
/******/ function __webpack_require__(moduleId) {
|
|
12356
12378
|
/******/ // Check if module is in cache
|
|
12357
|
-
/******/
|
|
12379
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
12358
12380
|
/******/ if (cachedModule !== undefined) {
|
|
12359
12381
|
/******/ return cachedModule.exports;
|
|
12360
12382
|
/******/ }
|
|
12361
12383
|
/******/ // Create a new module (and put it into the cache)
|
|
12362
|
-
/******/
|
|
12384
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
12363
12385
|
/******/ // no module.id needed
|
|
12364
12386
|
/******/ // no module.loaded needed
|
|
12365
12387
|
/******/ exports: {}
|
|
@@ -12368,7 +12390,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12368
12390
|
/******/ // Execute the module function
|
|
12369
12391
|
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
12370
12392
|
/******/ delete __webpack_module_cache__[moduleId];
|
|
12371
|
-
/******/
|
|
12393
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
12372
12394
|
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
12373
12395
|
/******/ throw e;
|
|
12374
12396
|
/******/ }
|
|
@@ -12383,7 +12405,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12383
12405
|
/******/ (() => {
|
|
12384
12406
|
/******/ // define __esModule on exports
|
|
12385
12407
|
/******/ __webpack_require__.r = (exports) => {
|
|
12386
|
-
/******/ if(
|
|
12408
|
+
/******/ if(Symbol.toStringTag) {
|
|
12387
12409
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
12388
12410
|
/******/ }
|
|
12389
12411
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -12395,7 +12417,7 @@ module.exports = require("react/jsx-runtime");
|
|
|
12395
12417
|
/******/ // startup
|
|
12396
12418
|
/******/ // Load entry module and return exports
|
|
12397
12419
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
12398
|
-
/******/
|
|
12420
|
+
/******/ let __webpack_exports__ = __webpack_require__("./src/index.ts");
|
|
12399
12421
|
/******/ module.exports = __webpack_exports__;
|
|
12400
12422
|
/******/
|
|
12401
12423
|
/******/ })()
|