framepexls-ui-lib 2.1.0 → 2.2.1
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/AnalyticsCharts.d.mts +4 -4
- package/dist/AnalyticsCharts.d.ts +4 -4
- package/dist/AppTopbar.d.mts +1 -2
- package/dist/AppTopbar.d.ts +1 -2
- package/dist/AssetPerformanceCard.d.mts +50 -0
- package/dist/AssetPerformanceCard.d.ts +50 -0
- package/dist/AssetPerformanceCard.js +342 -0
- package/dist/AssetPerformanceCard.mjs +319 -0
- package/dist/AssetTickerRow.d.mts +26 -0
- package/dist/AssetTickerRow.d.ts +26 -0
- package/dist/AssetTickerRow.js +255 -0
- package/dist/AssetTickerRow.mjs +225 -0
- package/dist/AuthTopbar.d.mts +2 -2
- package/dist/AuthTopbar.d.ts +2 -2
- package/dist/AuthTopbar.js +2 -1
- package/dist/AuthTopbar.mjs +2 -1
- package/dist/AvatarGroup.d.mts +2 -2
- package/dist/AvatarGroup.d.ts +2 -2
- package/dist/AvatarSquare.d.mts +2 -2
- package/dist/AvatarSquare.d.ts +2 -2
- package/dist/AvatarSquare.js +29 -27
- package/dist/AvatarSquare.mjs +29 -27
- package/dist/Badge.d.mts +1 -2
- package/dist/Badge.d.ts +1 -2
- package/dist/BadgeCluster.d.mts +2 -3
- package/dist/BadgeCluster.d.ts +2 -3
- package/dist/Breadcrumb.d.mts +1 -2
- package/dist/Breadcrumb.d.ts +1 -2
- package/dist/CalendarPanel.d.mts +2 -2
- package/dist/CalendarPanel.d.ts +2 -2
- package/dist/Carousel.d.mts +1 -2
- package/dist/Carousel.d.ts +1 -2
- package/dist/ChangeHistory.d.mts +1 -2
- package/dist/ChangeHistory.d.ts +1 -2
- package/dist/ChartCard.d.mts +1 -2
- package/dist/ChartCard.d.ts +1 -2
- package/dist/ChatCenter.d.mts +2 -2
- package/dist/ChatCenter.d.ts +2 -2
- package/dist/ChatbotCenter.d.mts +1 -2
- package/dist/ChatbotCenter.d.ts +1 -2
- package/dist/CheckboxPillsGroup.d.mts +1 -2
- package/dist/CheckboxPillsGroup.d.ts +1 -2
- package/dist/ColorPicker.d.mts +2 -2
- package/dist/ColorPicker.d.ts +2 -2
- package/dist/ColumnSelector.d.mts +1 -2
- package/dist/ColumnSelector.d.ts +1 -2
- package/dist/ComboSelect.d.mts +1 -2
- package/dist/ComboSelect.d.ts +1 -2
- package/dist/DataPageLayout.d.mts +64 -0
- package/dist/DataPageLayout.d.ts +64 -0
- package/dist/DataPageLayout.js +191 -0
- package/dist/DataPageLayout.mjs +157 -0
- package/dist/DataTable.d.mts +1 -2
- package/dist/DataTable.d.ts +1 -2
- package/dist/DataTableCard.d.mts +1 -2
- package/dist/DataTableCard.d.ts +1 -2
- package/dist/DataTableCardFooter.d.mts +2 -2
- package/dist/DataTableCardFooter.d.ts +2 -2
- package/dist/DateTimeField.d.mts +1 -2
- package/dist/DateTimeField.d.ts +1 -2
- package/dist/Dialog.d.mts +6 -7
- package/dist/Dialog.d.ts +6 -7
- package/dist/DocumentEditor.d.mts +3 -3
- package/dist/DocumentEditor.d.ts +3 -3
- package/dist/Drawer.d.mts +4 -5
- package/dist/Drawer.d.ts +4 -5
- package/dist/Dropdown.d.mts +7 -8
- package/dist/Dropdown.d.ts +7 -8
- package/dist/EmptyState.d.mts +1 -2
- package/dist/EmptyState.d.ts +1 -2
- package/dist/FiltersMultiSelect.d.mts +1 -2
- package/dist/FiltersMultiSelect.d.ts +1 -2
- package/dist/HeliipLoader.d.mts +2 -2
- package/dist/HeliipLoader.d.ts +2 -2
- package/dist/ImpersonationDialog.d.mts +2 -2
- package/dist/ImpersonationDialog.d.ts +2 -2
- package/dist/ImpersonationSwitcher.d.mts +2 -2
- package/dist/ImpersonationSwitcher.d.ts +2 -2
- package/dist/InfoGrid.d.mts +1 -2
- package/dist/InfoGrid.d.ts +1 -2
- package/dist/KnowledgeBase.d.mts +1 -2
- package/dist/KnowledgeBase.d.ts +1 -2
- package/dist/KpiCard.d.mts +2 -3
- package/dist/KpiCard.d.ts +2 -3
- package/dist/LanguageSwitcher.d.mts +2 -2
- package/dist/LanguageSwitcher.d.ts +2 -2
- package/dist/LicenseStatus.d.mts +1 -2
- package/dist/LicenseStatus.d.ts +1 -2
- package/dist/Link.d.mts +1 -2
- package/dist/Link.d.ts +1 -2
- package/dist/Login.d.mts +1 -2
- package/dist/Login.d.ts +1 -2
- package/dist/LoginCarousel.d.mts +2 -3
- package/dist/LoginCarousel.d.ts +2 -3
- package/dist/LoginGallery.d.mts +2 -3
- package/dist/LoginGallery.d.ts +2 -3
- package/dist/LoginTools.d.mts +1 -2
- package/dist/LoginTools.d.ts +1 -2
- package/dist/Map.d.mts +4 -5
- package/dist/Map.d.ts +4 -5
- package/dist/MarkdownEditor.d.mts +2 -2
- package/dist/MarkdownEditor.d.ts +2 -2
- package/dist/MediaCard.d.mts +2 -2
- package/dist/MediaCard.d.ts +2 -2
- package/dist/MediaLibraryLayout.d.mts +89 -0
- package/dist/MediaLibraryLayout.d.ts +89 -0
- package/dist/MediaLibraryLayout.js +369 -0
- package/dist/MediaLibraryLayout.mjs +348 -0
- package/dist/MediaSelector.d.mts +2 -2
- package/dist/MediaSelector.d.ts +2 -2
- package/dist/MediaTile.d.mts +2 -2
- package/dist/MediaTile.d.ts +2 -2
- package/dist/Money.d.mts +2 -2
- package/dist/Money.d.ts +2 -2
- package/dist/MotionProvider.d.mts +1 -2
- package/dist/MotionProvider.d.ts +1 -2
- package/dist/MultiComboSelect.d.mts +2 -3
- package/dist/MultiComboSelect.d.ts +2 -3
- package/dist/NotificationsCenter.d.mts +1 -2
- package/dist/NotificationsCenter.d.ts +1 -2
- package/dist/Numeric.d.mts +2 -2
- package/dist/Numeric.d.ts +2 -2
- package/dist/OmniSearch.d.mts +2 -3
- package/dist/OmniSearch.d.ts +2 -3
- package/dist/OrderButton.d.mts +2 -2
- package/dist/OrderButton.d.ts +2 -2
- package/dist/PageScaffold.d.mts +1 -2
- package/dist/PageScaffold.d.ts +1 -2
- package/dist/PageScaffold.js +1 -1
- package/dist/PageScaffold.mjs +1 -1
- package/dist/PageTransition.d.mts +1 -2
- package/dist/PageTransition.d.ts +1 -2
- package/dist/PageTransition.js +33 -27
- package/dist/PageTransition.mjs +33 -27
- package/dist/Pagination.d.mts +2 -2
- package/dist/Pagination.d.ts +2 -2
- package/dist/PasswordField.d.mts +1 -2
- package/dist/PasswordField.d.ts +1 -2
- package/dist/ProductCatalog.d.mts +2 -3
- package/dist/ProductCatalog.d.ts +2 -3
- package/dist/PromotionsCatalog.d.mts +2 -3
- package/dist/PromotionsCatalog.d.ts +2 -3
- package/dist/QrCode.d.mts +2 -2
- package/dist/QrCode.d.ts +2 -2
- package/dist/QuickActionsDock.d.mts +26 -0
- package/dist/QuickActionsDock.d.ts +26 -0
- package/dist/QuickActionsDock.js +99 -0
- package/dist/QuickActionsDock.mjs +79 -0
- package/dist/QuoteEditor.d.mts +2 -2
- package/dist/QuoteEditor.d.ts +2 -2
- package/dist/RechartsBarCard.d.mts +1 -2
- package/dist/RechartsBarCard.d.ts +1 -2
- package/dist/RechartsDonutCard.d.mts +1 -2
- package/dist/RechartsDonutCard.d.ts +1 -2
- package/dist/RechartsTimeSeriesCard.d.mts +1 -2
- package/dist/RechartsTimeSeriesCard.d.ts +1 -2
- package/dist/ReviewHistory.d.mts +3 -3
- package/dist/ReviewHistory.d.ts +3 -3
- package/dist/Reviews.d.mts +1 -2
- package/dist/Reviews.d.ts +1 -2
- package/dist/SearchInput.d.mts +2 -2
- package/dist/SearchInput.d.ts +2 -2
- package/dist/SegmentedTabs.d.mts +1 -2
- package/dist/SegmentedTabs.d.ts +1 -2
- package/dist/Select.d.mts +2 -2
- package/dist/Select.d.ts +2 -2
- package/dist/ShareAccess.d.mts +1 -2
- package/dist/ShareAccess.d.ts +1 -2
- package/dist/Sidebar.d.mts +3 -2
- package/dist/Sidebar.d.ts +3 -2
- package/dist/Sidebar.js +590 -377
- package/dist/Sidebar.mjs +590 -377
- package/dist/StatCard.d.mts +1 -2
- package/dist/StatCard.d.ts +1 -2
- package/dist/Steps.d.mts +3 -3
- package/dist/Steps.d.ts +3 -3
- package/dist/StorageUsage.d.mts +1 -2
- package/dist/StorageUsage.d.ts +1 -2
- package/dist/SupportChatWidget.d.mts +128 -0
- package/dist/SupportChatWidget.d.ts +128 -0
- package/dist/SupportChatWidget.js +696 -0
- package/dist/SupportChatWidget.mjs +678 -0
- package/dist/Table.d.mts +4 -5
- package/dist/Table.d.ts +4 -5
- package/dist/TableRecordButton.d.mts +1 -2
- package/dist/TableRecordButton.d.ts +1 -2
- package/dist/TimeAgo.d.mts +2 -2
- package/dist/TimeAgo.d.ts +2 -2
- package/dist/TimePanel.d.mts +1 -2
- package/dist/TimePanel.d.ts +1 -2
- package/dist/TimeRangeField.d.mts +2 -2
- package/dist/TimeRangeField.d.ts +2 -2
- package/dist/Toast.d.mts +1 -2
- package/dist/Toast.d.ts +1 -2
- package/dist/Tooltip.d.mts +1 -2
- package/dist/Tooltip.d.ts +1 -2
- package/dist/UploadCard.d.mts +1 -2
- package/dist/UploadCard.d.ts +1 -2
- package/dist/WordEditor.d.mts +3 -3
- package/dist/WordEditor.d.ts +3 -3
- package/dist/WorkflowDiagram.d.mts +1 -2
- package/dist/WorkflowDiagram.d.ts +1 -2
- package/dist/{animations-CHrNeawW.d.mts → animations-Di5tQRLw.d.mts} +2 -2
- package/dist/{animations-CHrNeawW.d.ts → animations-Di5tQRLw.d.ts} +2 -2
- package/dist/animations.d.mts +1 -1
- package/dist/animations.d.ts +1 -1
- package/dist/charts.d.mts +2 -1
- package/dist/charts.d.ts +2 -1
- package/dist/charts.js +6 -0
- package/dist/charts.mjs +6 -2
- package/dist/i18n.d.mts +1 -2
- package/dist/i18n.d.ts +1 -2
- package/dist/iconos/WorkflowEdgesSvg.d.mts +1 -2
- package/dist/iconos/WorkflowEdgesSvg.d.ts +1 -2
- package/dist/iconos/index.d.mts +1546 -1547
- package/dist/iconos/index.d.ts +1546 -1547
- package/dist/iconos/regular-icons.js +2 -2
- package/dist/iconos/regular-icons.mjs +2 -2
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +30 -0
- package/dist/index.mjs +167 -148
- package/dist/internal/AutoSize.d.mts +1 -2
- package/dist/internal/AutoSize.d.ts +1 -2
- package/dist/map.css +1 -1
- package/dist/theme/FontSizeController.d.mts +2 -2
- package/dist/theme/FontSizeController.d.ts +2 -2
- package/dist/theme/FontSizeController.js +1 -1
- package/dist/theme/FontSizeController.mjs +1 -1
- package/dist/theme/ThemeController.d.mts +2 -3
- package/dist/theme/ThemeController.d.ts +2 -3
- package/dist/theme/ThemeProvider.d.mts +1 -2
- package/dist/theme/ThemeProvider.d.ts +1 -2
- package/dist/theme/ThemeScript.d.mts +2 -2
- package/dist/theme/ThemeScript.d.ts +2 -2
- package/dist/theme/ThemeToggle.d.mts +2 -2
- package/dist/theme/ThemeToggle.d.ts +2 -2
- package/dist/theme/ThemeToggle.js +4 -4
- package/dist/theme/ThemeToggle.mjs +4 -4
- package/package.json +1 -1
package/dist/Sidebar.js
CHANGED
|
@@ -65,7 +65,10 @@ function groupItems(items) {
|
|
|
65
65
|
return Array.from(byGroup.entries());
|
|
66
66
|
}
|
|
67
67
|
function GroupHeader({ title }) {
|
|
68
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-3 flex items-center gap-3 px-2 select-none", children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-[0.18em] text-[var(--muted)] text-left", children: title }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px flex-1 bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_72%,transparent),transparent)]" })
|
|
71
|
+
] });
|
|
69
72
|
}
|
|
70
73
|
function safeParseSidebarNavLayout(raw) {
|
|
71
74
|
if (!raw) return null;
|
|
@@ -169,54 +172,29 @@ function pickWorkspaceId(workspaces, preferred) {
|
|
|
169
172
|
return (primary != null ? primary : list[0]).id;
|
|
170
173
|
}
|
|
171
174
|
const WRAP_ACTIVE = {
|
|
172
|
-
accent: "bg-
|
|
173
|
-
slate: "bg-
|
|
174
|
-
gray: "bg-
|
|
175
|
-
zinc: "bg-
|
|
176
|
-
neutral: "bg-
|
|
177
|
-
stone: "bg-
|
|
178
|
-
red: "bg-
|
|
179
|
-
orange: "bg-
|
|
180
|
-
amber: "bg-
|
|
181
|
-
yellow: "bg-
|
|
182
|
-
lime: "bg-
|
|
183
|
-
green: "bg-
|
|
184
|
-
emerald: "bg-
|
|
185
|
-
teal: "bg-
|
|
186
|
-
cyan: "bg-
|
|
187
|
-
sky: "bg-
|
|
188
|
-
blue: "bg-
|
|
189
|
-
indigo: "bg-
|
|
190
|
-
violet: "bg-
|
|
191
|
-
purple: "bg-
|
|
192
|
-
fuchsia: "bg-
|
|
193
|
-
pink: "bg-
|
|
194
|
-
rose: "bg-
|
|
195
|
-
};
|
|
196
|
-
const ICON_BORDER_ACTIVE = {
|
|
197
|
-
accent: "border-[color-mix(in_oklab,var(--ring)_32%,transparent)] dark:border-[color-mix(in_oklab,var(--ring)_26%,transparent)]",
|
|
198
|
-
slate: "border-slate-300/60 dark:border-slate-700/40",
|
|
199
|
-
gray: "border-gray-300/60 dark:border-gray-700/40",
|
|
200
|
-
zinc: "border-zinc-300/60 dark:border-zinc-700/40",
|
|
201
|
-
neutral: "border-neutral-300/60 dark:border-neutral-700/40",
|
|
202
|
-
stone: "border-stone-300/60 dark:border-stone-700/40",
|
|
203
|
-
red: "border-red-300/60 dark:border-red-700/40",
|
|
204
|
-
orange: "border-orange-300/60 dark:border-orange-700/40",
|
|
205
|
-
amber: "border-amber-300/60 dark:border-amber-700/40",
|
|
206
|
-
yellow: "border-yellow-300/60 dark:border-yellow-700/40",
|
|
207
|
-
lime: "border-lime-300/60 dark:border-lime-700/40",
|
|
208
|
-
green: "border-green-300/60 dark:border-green-700/40",
|
|
209
|
-
emerald: "border-emerald-300/60 dark:border-emerald-700/40",
|
|
210
|
-
teal: "border-teal-300/60 dark:border-teal-700/40",
|
|
211
|
-
cyan: "border-cyan-300/60 dark:border-cyan-700/40",
|
|
212
|
-
sky: "border-sky-300/60 dark:border-sky-700/40",
|
|
213
|
-
blue: "border-blue-300/60 dark:border-blue-700/40",
|
|
214
|
-
indigo: "border-indigo-300/60 dark:border-indigo-700/40",
|
|
215
|
-
violet: "border-violet-300/60 dark:border-violet-700/40",
|
|
216
|
-
purple: "border-purple-300/60 dark:border-purple-700/40",
|
|
217
|
-
fuchsia: "border-fuchsia-300/60 dark:border-fuchsia-700/40",
|
|
218
|
-
pink: "border-pink-300/60 dark:border-pink-700/40",
|
|
219
|
-
rose: "border-rose-300/60 dark:border-rose-700/40"
|
|
175
|
+
accent: "bg-transparent ring-0",
|
|
176
|
+
slate: "bg-transparent ring-0",
|
|
177
|
+
gray: "bg-transparent ring-0",
|
|
178
|
+
zinc: "bg-transparent ring-0",
|
|
179
|
+
neutral: "bg-transparent ring-0",
|
|
180
|
+
stone: "bg-transparent ring-0",
|
|
181
|
+
red: "bg-transparent ring-0",
|
|
182
|
+
orange: "bg-transparent ring-0",
|
|
183
|
+
amber: "bg-transparent ring-0",
|
|
184
|
+
yellow: "bg-transparent ring-0",
|
|
185
|
+
lime: "bg-transparent ring-0",
|
|
186
|
+
green: "bg-transparent ring-0",
|
|
187
|
+
emerald: "bg-transparent ring-0",
|
|
188
|
+
teal: "bg-transparent ring-0",
|
|
189
|
+
cyan: "bg-transparent ring-0",
|
|
190
|
+
sky: "bg-transparent ring-0",
|
|
191
|
+
blue: "bg-transparent ring-0",
|
|
192
|
+
indigo: "bg-transparent ring-0",
|
|
193
|
+
violet: "bg-transparent ring-0",
|
|
194
|
+
purple: "bg-transparent ring-0",
|
|
195
|
+
fuchsia: "bg-transparent ring-0",
|
|
196
|
+
pink: "bg-transparent ring-0",
|
|
197
|
+
rose: "bg-transparent ring-0"
|
|
220
198
|
};
|
|
221
199
|
const TOGGLE_BORDER_ACTIVE = {
|
|
222
200
|
accent: "border-[color-mix(in_oklab,var(--ring)_28%,transparent)] dark:border-[color-mix(in_oklab,var(--ring)_22%,transparent)]",
|
|
@@ -244,30 +222,41 @@ const TOGGLE_BORDER_ACTIVE = {
|
|
|
244
222
|
rose: "border-rose-200 dark:border-rose-700/40"
|
|
245
223
|
};
|
|
246
224
|
const SUBITEM_ACTIVE = {
|
|
247
|
-
accent: "bg-
|
|
248
|
-
slate: "bg-
|
|
249
|
-
gray: "bg-
|
|
250
|
-
zinc: "bg-
|
|
251
|
-
neutral: "bg-
|
|
252
|
-
stone: "bg-
|
|
253
|
-
red: "bg-
|
|
254
|
-
orange: "bg-
|
|
255
|
-
amber: "bg-
|
|
256
|
-
yellow: "bg-
|
|
257
|
-
lime: "bg-
|
|
258
|
-
green: "bg-
|
|
259
|
-
emerald: "bg-
|
|
260
|
-
teal: "bg-
|
|
261
|
-
cyan: "bg-
|
|
262
|
-
sky: "bg-
|
|
263
|
-
blue: "bg-
|
|
264
|
-
indigo: "bg-
|
|
265
|
-
violet: "bg-
|
|
266
|
-
purple: "bg-
|
|
267
|
-
fuchsia: "bg-
|
|
268
|
-
pink: "bg-
|
|
269
|
-
rose: "bg-
|
|
225
|
+
accent: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
226
|
+
slate: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
227
|
+
gray: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
228
|
+
zinc: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
229
|
+
neutral: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
230
|
+
stone: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
231
|
+
red: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
232
|
+
orange: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
233
|
+
amber: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
234
|
+
yellow: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
235
|
+
lime: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
236
|
+
green: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
237
|
+
emerald: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
238
|
+
teal: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
239
|
+
cyan: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
240
|
+
sky: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
241
|
+
blue: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
242
|
+
indigo: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
243
|
+
violet: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
244
|
+
purple: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
245
|
+
fuchsia: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
246
|
+
pink: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
247
|
+
rose: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl"
|
|
270
248
|
};
|
|
249
|
+
const PANEL_SURFACE = "border-r border-[color-mix(in_oklab,var(--border)_76%,transparent)] bg-[linear-gradient(180deg,color-mix(in_oklab,var(--card)_98.5%,transparent)_0%,color-mix(in_oklab,var(--surface)_90%,transparent)_100%)] shadow-[18px_0_42px_-38px_color-mix(in_oklab,var(--foreground)_16%,transparent)] backdrop-blur-lg";
|
|
250
|
+
const TILE_SURFACE = "border border-[color-mix(in_oklab,var(--border)_74%,transparent)] bg-[linear-gradient(180deg,color-mix(in_oklab,var(--card)_98%,transparent)_0%,color-mix(in_oklab,var(--surface)_84%,transparent)_100%)] shadow-[0_12px_28px_-26px_color-mix(in_oklab,var(--foreground)_18%,transparent)]";
|
|
251
|
+
const ITEM_IDLE = "text-[color-mix(in_oklab,var(--foreground)_86%,var(--muted))] hover:text-[var(--foreground)] hover:bg-[color-mix(in_oklab,var(--foreground)_4%,transparent)]";
|
|
252
|
+
const TOP_PANEL_SURFACE = "rounded-[1.4rem] border border-[color-mix(in_oklab,var(--border)_62%,transparent)] bg-[color-mix(in_oklab,var(--foreground)_1.5%,transparent)]";
|
|
253
|
+
const SOFT_BUTTON_SURFACE = "border border-[color-mix(in_oklab,var(--border)_70%,transparent)] bg-[color-mix(in_oklab,var(--foreground)_3.5%,transparent)]";
|
|
254
|
+
const ITEM_ICON_IDLE = "text-[color-mix(in_oklab,var(--foreground)_78%,var(--muted))] group-hover:text-[var(--foreground)]";
|
|
255
|
+
const ITEM_ICON_ACTIVE = "text-[var(--primary)] drop-shadow-[0_8px_20px_color-mix(in_oklab,var(--primary)_28%,transparent)]";
|
|
256
|
+
const ACTIVE_ROW_BAR = "pointer-events-none absolute bottom-2 left-0 top-2 z-[1] w-[3px] rounded-full bg-[var(--primary)] shadow-[0_0_0_1px_color-mix(in_oklab,var(--primary)_14%,transparent),0_10px_24px_-14px_color-mix(in_oklab,var(--primary)_72%,transparent)]";
|
|
257
|
+
const SUBMENU_GUIDE_BAR = "pointer-events-none absolute bottom-2 left-4 top-2 w-px bg-[color-mix(in_oklab,var(--muted)_72%,var(--foreground)_28%)]";
|
|
258
|
+
const SIDEBAR_COLLAPSE_EASE = [0.22, 1, 0.36, 1];
|
|
259
|
+
const SIDEBAR_COLLAPSE_TRANSITION = { duration: 0.24, ease: SIDEBAR_COLLAPSE_EASE };
|
|
271
260
|
function Sidebar({
|
|
272
261
|
items,
|
|
273
262
|
activeKey,
|
|
@@ -618,25 +607,25 @@ function Sidebar({
|
|
|
618
607
|
activeWorkspace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: activeWorkspace.name }) : null
|
|
619
608
|
] })
|
|
620
609
|
] }),
|
|
621
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
622
611
|
import_framer_motion.motion.aside,
|
|
623
612
|
{
|
|
624
613
|
className: [
|
|
625
|
-
"hidden xl:fixed xl:inset-y-0 xl:
|
|
626
|
-
collapsed ? "xl:px-2" : "xl:px-4"
|
|
614
|
+
"relative z-40 hidden overflow-hidden xl:fixed xl:inset-y-0 xl:left-0 xl:flex xl:flex-col"
|
|
627
615
|
].join(" "),
|
|
628
616
|
initial: false,
|
|
629
617
|
animate: { width: sidebarWidth },
|
|
630
618
|
transition: sidebarWidthTransition,
|
|
631
619
|
style: { width: sidebarWidth, willChange: motionEnabled ? "width" : void 0 },
|
|
632
|
-
children: [
|
|
620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cx("relative z-10 flex h-full min-h-0 flex-1 overflow-hidden", PANEL_SURFACE), children: [
|
|
633
621
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
634
622
|
"div",
|
|
635
623
|
{
|
|
636
624
|
"aria-hidden": "true",
|
|
637
|
-
className: "pointer-events-none absolute inset-
|
|
625
|
+
className: "pointer-events-none absolute inset-0 z-0 bg-[radial-gradient(720px_420px_at_14%_0%,color-mix(in_oklab,var(--primary)_5%,transparent)_0%,transparent_44%),radial-gradient(860px_540px_at_20%_118%,color-mix(in_oklab,var(--primary)_8%,transparent)_0%,transparent_56%),radial-gradient(700px_460px_at_86%_114%,color-mix(in_oklab,var(--ring)_6%,transparent)_0%,transparent_60%)]"
|
|
638
626
|
}
|
|
639
627
|
),
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-10 right-0 z-0 w-px bg-[linear-gradient(180deg,transparent,color-mix(in_oklab,var(--ring)_30%,transparent),transparent)]" }),
|
|
640
629
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative z-10 flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
641
630
|
SidebarInner,
|
|
642
631
|
{
|
|
@@ -683,7 +672,7 @@ function Sidebar({
|
|
|
683
672
|
skeleton
|
|
684
673
|
}
|
|
685
674
|
) })
|
|
686
|
-
]
|
|
675
|
+
] })
|
|
687
676
|
}
|
|
688
677
|
),
|
|
689
678
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -697,26 +686,27 @@ function Sidebar({
|
|
|
697
686
|
}
|
|
698
687
|
),
|
|
699
688
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: drawerOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_framer_motion.motion.div, { className: "fixed inset-0 z-40 xl:hidden", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: [
|
|
700
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
689
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.div, { className: "absolute inset-0 bg-black/42 backdrop-blur-[2px]", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }),
|
|
701
690
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
702
691
|
import_framer_motion.motion.div,
|
|
703
692
|
{
|
|
704
693
|
role: "dialog",
|
|
705
694
|
"aria-modal": "true",
|
|
706
|
-
initial: { x: -340 },
|
|
707
|
-
animate: { x: 0 },
|
|
708
|
-
exit: { x: -340 },
|
|
709
|
-
transition: { type: "tween", duration: 0.
|
|
710
|
-
className: "relative h-full w-[88%] max-w-80 overflow-hidden bg-[var(--card)]
|
|
711
|
-
style: { willChange: "transform" },
|
|
695
|
+
initial: { x: -340, opacity: 0.84, scale: 0.98 },
|
|
696
|
+
animate: { x: 0, opacity: 1, scale: 1 },
|
|
697
|
+
exit: { x: -340, opacity: 0.84, scale: 0.985 },
|
|
698
|
+
transition: { type: "tween", duration: 0.26, ease: [0.22, 1, 0.36, 1] },
|
|
699
|
+
className: cx("relative h-full w-[88%] max-w-80 overflow-hidden px-5 py-6", TOP_PANEL_SURFACE, "bg-[linear-gradient(180deg,color-mix(in_oklab,var(--card)_98%,transparent)_0%,color-mix(in_oklab,var(--surface)_82%,transparent)_100%)] shadow-2xl backdrop-blur-xl"),
|
|
700
|
+
style: { willChange: "transform, opacity" },
|
|
712
701
|
children: [
|
|
713
702
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
714
703
|
"div",
|
|
715
704
|
{
|
|
716
705
|
"aria-hidden": "true",
|
|
717
|
-
className: "pointer-events-none absolute inset-
|
|
706
|
+
className: "pointer-events-none absolute inset-0 z-0 bg-[radial-gradient(720px_420px_at_14%_0%,color-mix(in_oklab,var(--primary)_5%,transparent)_0%,transparent_44%),radial-gradient(860px_540px_at_20%_118%,color-mix(in_oklab,var(--primary)_8%,transparent)_0%,transparent_56%),radial-gradient(700px_460px_at_86%_114%,color-mix(in_oklab,var(--ring)_6%,transparent)_0%,transparent_60%)]"
|
|
718
707
|
}
|
|
719
708
|
),
|
|
709
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-x-8 top-0 z-0 h-px bg-[linear-gradient(90deg,transparent,color-mix(in_oklab,var(--ring)_30%,transparent),transparent)]" }),
|
|
720
710
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
721
711
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
722
712
|
import_Button.default,
|
|
@@ -726,7 +716,7 @@ function Sidebar({
|
|
|
726
716
|
variant: "ghost",
|
|
727
717
|
size: "sm",
|
|
728
718
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.CloseIcon, {}),
|
|
729
|
-
className: "h-9 w-9 p-0 !gap-0
|
|
719
|
+
className: cx("h-9 w-9 rounded-2xl p-0 !gap-0 text-[var(--foreground)] transition-transform hover:-translate-y-0.5 active:translate-y-0", TILE_SURFACE)
|
|
730
720
|
}
|
|
731
721
|
),
|
|
732
722
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm text-[var(--muted)]", children: "Men\xFA" })
|
|
@@ -1505,13 +1495,20 @@ function WorkspaceSwitcher({
|
|
|
1505
1495
|
variant = "standalone",
|
|
1506
1496
|
color = "accent"
|
|
1507
1497
|
}) {
|
|
1508
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1498
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1509
1499
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
1500
|
+
const [workspaceQuery, setWorkspaceQuery] = (0, import_react.useState)("");
|
|
1510
1501
|
const triggerRef = (0, import_react.useRef)(null);
|
|
1502
|
+
const searchRef = (0, import_react.useRef)(null);
|
|
1511
1503
|
const popoverRef = (0, import_react.useRef)(null);
|
|
1512
1504
|
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
1513
1505
|
const portalRoot = typeof document !== "undefined" ? document.body : null;
|
|
1514
|
-
const [menuPos, setMenuPos] = (0, import_react.useState)({
|
|
1506
|
+
const [menuPos, setMenuPos] = (0, import_react.useState)({
|
|
1507
|
+
top: 0,
|
|
1508
|
+
left: 0,
|
|
1509
|
+
width: 0,
|
|
1510
|
+
maxHeight: 420
|
|
1511
|
+
});
|
|
1515
1512
|
const current = (0, import_react.useMemo)(() => {
|
|
1516
1513
|
var _a2, _b2;
|
|
1517
1514
|
const list = (workspaces != null ? workspaces : []).filter((w) => !w.disabled);
|
|
@@ -1527,6 +1524,17 @@ function WorkspaceSwitcher({
|
|
|
1527
1524
|
}
|
|
1528
1525
|
return { primary: p, secondary: s };
|
|
1529
1526
|
}, [workspaces]);
|
|
1527
|
+
const normalizedWorkspaceQuery = workspaceQuery.trim().toLocaleLowerCase();
|
|
1528
|
+
const matchesWorkspaceQuery = import_react.default.useCallback(
|
|
1529
|
+
(workspace) => {
|
|
1530
|
+
if (!normalizedWorkspaceQuery) return true;
|
|
1531
|
+
return [workspace.name, workspace.subtitle, workspace.badge, workspace.initials].filter(Boolean).some((value) => String(value).toLocaleLowerCase().includes(normalizedWorkspaceQuery));
|
|
1532
|
+
},
|
|
1533
|
+
[normalizedWorkspaceQuery]
|
|
1534
|
+
);
|
|
1535
|
+
const filteredPrimary = (0, import_react.useMemo)(() => primary.filter(matchesWorkspaceQuery), [matchesWorkspaceQuery, primary]);
|
|
1536
|
+
const filteredSecondary = (0, import_react.useMemo)(() => secondary.filter(matchesWorkspaceQuery), [matchesWorkspaceQuery, secondary]);
|
|
1537
|
+
const hasFilteredWorkspaces = filteredPrimary.length > 0 || filteredSecondary.length > 0;
|
|
1530
1538
|
(0, import_react.useEffect)(() => {
|
|
1531
1539
|
if (!open) return;
|
|
1532
1540
|
const onDown = (e) => {
|
|
@@ -1549,6 +1557,17 @@ function WorkspaceSwitcher({
|
|
|
1549
1557
|
(0, import_react.useEffect)(() => {
|
|
1550
1558
|
if (collapsed) setOpen(false);
|
|
1551
1559
|
}, [collapsed]);
|
|
1560
|
+
(0, import_react.useEffect)(() => {
|
|
1561
|
+
if (!open) {
|
|
1562
|
+
setWorkspaceQuery("");
|
|
1563
|
+
return;
|
|
1564
|
+
}
|
|
1565
|
+
const id = window.setTimeout(() => {
|
|
1566
|
+
var _a2;
|
|
1567
|
+
return (_a2 = searchRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
1568
|
+
}, 40);
|
|
1569
|
+
return () => window.clearTimeout(id);
|
|
1570
|
+
}, [open]);
|
|
1552
1571
|
(0, import_react.useEffect)(() => {
|
|
1553
1572
|
setMounted(true);
|
|
1554
1573
|
}, []);
|
|
@@ -1557,21 +1576,29 @@ function WorkspaceSwitcher({
|
|
|
1557
1576
|
if (!el) return;
|
|
1558
1577
|
const r = el.getBoundingClientRect();
|
|
1559
1578
|
const viewportPad = 12;
|
|
1560
|
-
const w = Math.
|
|
1579
|
+
const w = Math.min(380, Math.max(180, window.innerWidth - viewportPad * 2));
|
|
1580
|
+
const maxPreferredHeight = Math.min(520, Math.max(120, window.innerHeight - viewportPad * 2));
|
|
1561
1581
|
if (collapsed) {
|
|
1562
1582
|
let left2 = r.right + 12;
|
|
1563
1583
|
if (left2 + w > window.innerWidth - viewportPad) left2 = Math.max(viewportPad, window.innerWidth - viewportPad - w);
|
|
1564
|
-
let
|
|
1565
|
-
const maxTop = Math.max(viewportPad, window.innerHeight - viewportPad -
|
|
1566
|
-
if (
|
|
1567
|
-
if (
|
|
1568
|
-
setMenuPos({ left: left2, top
|
|
1584
|
+
let top = r.top;
|
|
1585
|
+
const maxTop = Math.max(viewportPad, window.innerHeight - viewportPad - maxPreferredHeight);
|
|
1586
|
+
if (top > maxTop) top = maxTop;
|
|
1587
|
+
if (top < viewportPad) top = viewportPad;
|
|
1588
|
+
setMenuPos({ left: left2, top, width: w, maxHeight: maxPreferredHeight });
|
|
1569
1589
|
return;
|
|
1570
1590
|
}
|
|
1571
1591
|
let left = r.left;
|
|
1572
1592
|
if (left + w > window.innerWidth - viewportPad) left = Math.max(viewportPad, window.innerWidth - viewportPad - w);
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1593
|
+
const belowTop = r.bottom + 8;
|
|
1594
|
+
const belowSpace = Math.max(80, window.innerHeight - belowTop - viewportPad);
|
|
1595
|
+
const aboveSpace = Math.max(80, r.top - viewportPad - 8);
|
|
1596
|
+
if (belowSpace < 260 && aboveSpace > belowSpace) {
|
|
1597
|
+
const maxHeight = Math.min(maxPreferredHeight, aboveSpace);
|
|
1598
|
+
setMenuPos({ left, top: Math.max(viewportPad, r.top - 8 - maxHeight), width: w, maxHeight });
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
setMenuPos({ left, top: belowTop, width: w, maxHeight: Math.min(maxPreferredHeight, belowSpace) });
|
|
1575
1602
|
}, [collapsed]);
|
|
1576
1603
|
(0, import_react.useLayoutEffect)(() => {
|
|
1577
1604
|
if (!open) return;
|
|
@@ -1594,9 +1621,11 @@ function WorkspaceSwitcher({
|
|
|
1594
1621
|
const labelSecondary = (_c = labels == null ? void 0 : labels.secondary) != null ? _c : "Secundarios";
|
|
1595
1622
|
const labelManage = (_d = labels == null ? void 0 : labels.manage) != null ? _d : "Administrar espacios";
|
|
1596
1623
|
const labelManageHint = (_e = labels == null ? void 0 : labels.manageHint) != null ? _e : "Agrega slots para sub-empresas.";
|
|
1624
|
+
const labelSearchPlaceholder = (_f = labels == null ? void 0 : labels.searchPlaceholder) != null ? _f : "Buscar empresa o workspace...";
|
|
1625
|
+
const labelEmpty = (_g = labels == null ? void 0 : labels.empty) != null ? _g : "No hay espacios que coincidan.";
|
|
1597
1626
|
const tooltipContent = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
1598
1627
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-[0.75rem] font-semibold", children: current.name }),
|
|
1599
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: (
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: (_h = current.subtitle) != null ? _h : labelTitle })
|
|
1600
1629
|
] });
|
|
1601
1630
|
const renderRow = (w) => {
|
|
1602
1631
|
var _a2, _b2, _c2;
|
|
@@ -1612,7 +1641,7 @@ function WorkspaceSwitcher({
|
|
|
1612
1641
|
},
|
|
1613
1642
|
disabled: w.disabled,
|
|
1614
1643
|
className: [
|
|
1615
|
-
"
|
|
1644
|
+
"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 rounded-2xl px-2.5 py-2 text-left",
|
|
1616
1645
|
w.disabled ? "cursor-not-allowed opacity-50" : "hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]",
|
|
1617
1646
|
active ? "bg-[color-mix(in_oklab,var(--primary)_10%,transparent)] ring-1 ring-inset ring-[color-mix(in_oklab,var(--ring)_22%,transparent)]" : ""
|
|
1618
1647
|
].join(" "),
|
|
@@ -1625,13 +1654,14 @@ function WorkspaceSwitcher({
|
|
|
1625
1654
|
alt: w.name,
|
|
1626
1655
|
initials: (_b2 = w.initials) != null ? _b2 : computeInitials(w.name),
|
|
1627
1656
|
radiusClass: "rounded-2xl",
|
|
1628
|
-
color: (_c2 = w.color) != null ? _c2 : color
|
|
1657
|
+
color: (_c2 = w.color) != null ? _c2 : color,
|
|
1658
|
+
className: "shrink-0"
|
|
1629
1659
|
}
|
|
1630
1660
|
),
|
|
1631
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1632
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1633
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-w-0
|
|
1634
|
-
w.badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 rounded-full border border-[var(--border)] bg-[color-mix(in_oklab,var(--surface)_70%,transparent)] px-2 py-0.5 text-[0.6875rem] font-semibold text-[var(--muted)]", children: w.badge }) : null
|
|
1661
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block min-w-0 max-w-full flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold text-[var(--foreground)]", children: w.name }),
|
|
1664
|
+
w.badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "max-w-[5.75rem] shrink-0 truncate rounded-full border border-[var(--border)] bg-[color-mix(in_oklab,var(--surface)_70%,transparent)] px-2 py-0.5 text-[0.6875rem] font-semibold text-[var(--muted)]", children: w.badge }) : null
|
|
1635
1665
|
] }),
|
|
1636
1666
|
w.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: w.subtitle }) : null
|
|
1637
1667
|
] }),
|
|
@@ -1656,7 +1686,8 @@ function WorkspaceSwitcher({
|
|
|
1656
1686
|
"aria-expanded": open,
|
|
1657
1687
|
title: void 0,
|
|
1658
1688
|
className: [
|
|
1659
|
-
"group
|
|
1689
|
+
"group w-full min-w-0 items-center gap-3 rounded-2xl",
|
|
1690
|
+
collapsed ? "flex" : "grid grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1660
1691
|
variant === "panel" ? "border-0 bg-transparent shadow-none hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]" : "border border-[var(--border)] bg-[var(--card)] shadow-sm hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]",
|
|
1661
1692
|
collapsed ? "justify-center p-2" : "px-2.5 py-2",
|
|
1662
1693
|
"active:scale-[0.99]"
|
|
@@ -1666,20 +1697,21 @@ function WorkspaceSwitcher({
|
|
|
1666
1697
|
import_AvatarSquare.default,
|
|
1667
1698
|
{
|
|
1668
1699
|
size: collapsed ? 44 : 34,
|
|
1669
|
-
src: (
|
|
1700
|
+
src: (_i = current.avatarUrl) != null ? _i : void 0,
|
|
1670
1701
|
alt: current.name,
|
|
1671
|
-
initials: (
|
|
1702
|
+
initials: (_j = current.initials) != null ? _j : computeInitials(current.name),
|
|
1672
1703
|
radiusClass: collapsed ? "rounded-2xl" : "rounded-2xl",
|
|
1673
|
-
color: (
|
|
1704
|
+
color: (_k = current.color) != null ? _k : color,
|
|
1705
|
+
className: "shrink-0"
|
|
1674
1706
|
}
|
|
1675
1707
|
),
|
|
1676
1708
|
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1677
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1678
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1679
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-w-0
|
|
1680
|
-
current.badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 rounded-full border border-[var(--border)] bg-[color-mix(in_oklab,var(--surface)_70%,transparent)] px-2 py-0.5 text-[0.6875rem] font-semibold text-[var(--muted)]", children: current.badge }) : null
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block min-w-0 max-w-full flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-sm font-semibold", children: current.name }),
|
|
1712
|
+
current.badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "max-w-[5.75rem] shrink-0 truncate rounded-full border border-[var(--border)] bg-[color-mix(in_oklab,var(--surface)_70%,transparent)] px-2 py-0.5 text-[0.6875rem] font-semibold text-[var(--muted)]", children: current.badge }) : null
|
|
1681
1713
|
] }),
|
|
1682
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: (
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: (_l = current.subtitle) != null ? _l : labelTitle })
|
|
1683
1715
|
] }),
|
|
1684
1716
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 text-[var(--muted)] group-hover:text-[var(--foreground)]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.ChevronDownIcon, { className: `transition-transform ${open ? "rotate-180" : ""}`, "aria-hidden": true }) })
|
|
1685
1717
|
] })
|
|
@@ -1697,23 +1729,37 @@ function WorkspaceSwitcher({
|
|
|
1697
1729
|
exit: { opacity: 0, y: 6, scale: 0.985 },
|
|
1698
1730
|
transition: { duration: 0.14, ease: "easeOut" },
|
|
1699
1731
|
className: [
|
|
1700
|
-
"fixed z-50 overflow-hidden rounded-3xl border border-[var(--border)] bg-[var(--card)] shadow-2xl",
|
|
1732
|
+
"fixed z-50 flex flex-col overflow-hidden rounded-3xl border border-[var(--border)] bg-[var(--card)] shadow-2xl",
|
|
1701
1733
|
mobile ? "max-w-[18rem]" : ""
|
|
1702
1734
|
].join(" "),
|
|
1703
|
-
style: { top: menuPos.top, left: menuPos.left, width: menuPos.width },
|
|
1735
|
+
style: { top: menuPos.top, left: menuPos.left, width: menuPos.width, maxHeight: menuPos.maxHeight },
|
|
1704
1736
|
children: [
|
|
1705
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-wider text-[var(--muted)]", children: labelTitle }) }),
|
|
1706
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
1707
|
-
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-wider text-[var(--muted)]", children: labelTitle }) }),
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 px-3 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1739
|
+
import_Input.default,
|
|
1740
|
+
{
|
|
1741
|
+
ref: searchRef,
|
|
1742
|
+
type: "search",
|
|
1743
|
+
value: workspaceQuery,
|
|
1744
|
+
onChange: (event) => setWorkspaceQuery(event.currentTarget.value),
|
|
1745
|
+
placeholder: labelSearchPlaceholder,
|
|
1746
|
+
leftSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.MagnifyingGlassIcon, { className: "size-4", "aria-hidden": true }),
|
|
1747
|
+
clearable: true,
|
|
1748
|
+
onClear: () => setWorkspaceQuery(""),
|
|
1749
|
+
className: "h-9 rounded-2xl py-2 text-xs shadow-none"
|
|
1750
|
+
}
|
|
1751
|
+
) }),
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-2 pb-2 [scrollbar-width:thin]", children: hasFilteredWorkspaces ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1753
|
+
filteredPrimary.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1708
1754
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-2 pb-1 pt-1 text-[0.6875rem] font-semibold uppercase tracking-wider text-slate-400", children: labelPrimary }),
|
|
1709
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1", children:
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1", children: filteredPrimary.map(renderRow) })
|
|
1710
1756
|
] }) : null,
|
|
1711
|
-
|
|
1757
|
+
filteredSecondary.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1712
1758
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-3 px-2 pb-1 pt-1 text-[0.6875rem] font-semibold uppercase tracking-wider text-slate-400", children: labelSecondary }),
|
|
1713
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1", children:
|
|
1759
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1", children: filteredSecondary.map(renderRow) })
|
|
1714
1760
|
] }) : null
|
|
1715
|
-
] }),
|
|
1716
|
-
onManageWorkspaces ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-[var(--border)] px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1761
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-8 text-center text-sm text-[var(--muted)]", children: labelEmpty }) }),
|
|
1762
|
+
onManageWorkspaces ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 border-t border-[var(--border)] px-2 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1717
1763
|
import_Button.default,
|
|
1718
1764
|
{
|
|
1719
1765
|
unstyled: true,
|
|
@@ -1722,13 +1768,13 @@ function WorkspaceSwitcher({
|
|
|
1722
1768
|
setOpen(false);
|
|
1723
1769
|
onManageWorkspaces();
|
|
1724
1770
|
},
|
|
1725
|
-
className: "flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]",
|
|
1771
|
+
className: "flex w-full min-w-0 items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]",
|
|
1726
1772
|
children: [
|
|
1727
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
1728
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: labelManage }),
|
|
1729
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-[var(--muted)]", children: labelManageHint })
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 overflow-hidden", children: [
|
|
1774
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-sm font-semibold text-[var(--foreground)]", children: labelManage }),
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-xs text-[var(--muted)]", children: labelManageHint })
|
|
1730
1776
|
] }),
|
|
1731
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.PlusIcon, { className: "text-[var(--muted)]", "aria-hidden": true })
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.PlusIcon, { className: "shrink-0 text-[var(--muted)]", "aria-hidden": true })
|
|
1732
1778
|
]
|
|
1733
1779
|
}
|
|
1734
1780
|
) }) : null
|
|
@@ -1857,84 +1903,129 @@ function SidebarInner({
|
|
|
1857
1903
|
const skShowTopPanel = (_c = skeleton == null ? void 0 : skeleton.showTopPanel) != null ? _c : true;
|
|
1858
1904
|
const skShowFooter = (_d = skeleton == null ? void 0 : skeleton.showFooter) != null ? _d : true;
|
|
1859
1905
|
const hasQuickActions = Boolean(quickActions == null ? void 0 : quickActions.length);
|
|
1860
|
-
const
|
|
1906
|
+
const topPanelClass = cx("overflow-hidden rounded-[1.4rem]", TOP_PANEL_SURFACE);
|
|
1907
|
+
const calmFadeEase = [0.22, 1, 0.36, 1];
|
|
1908
|
+
const calmFadeTransition = { duration: 0.26, ease: calmFadeEase };
|
|
1909
|
+
const calmFadeInitial = { opacity: 0, y: 4, filter: "blur(6px)" };
|
|
1910
|
+
const calmFadeAnimate = { opacity: 1, y: 0, filter: "blur(0px)" };
|
|
1911
|
+
const calmFadeExit = { opacity: 0, y: 2, filter: "blur(6px)" };
|
|
1912
|
+
const QuickIcon = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "grid h-9 w-9 place-items-center rounded-2xl text-[var(--muted)] transition-all duration-300 group-hover:scale-[1.04] group-hover:text-[var(--foreground)]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[var(--foreground)]", children }) });
|
|
1861
1913
|
const QuickActionsSection = () => {
|
|
1862
1914
|
if (!hasQuickActions) return null;
|
|
1863
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
collapsed ? "justify-center" : ""
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
{
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1916
|
+
import_framer_motion.motion.div,
|
|
1917
|
+
{
|
|
1918
|
+
className: "pt-5",
|
|
1919
|
+
initial: calmFadeInitial,
|
|
1920
|
+
animate: calmFadeAnimate,
|
|
1921
|
+
transition: calmFadeTransition,
|
|
1922
|
+
children: [
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: ["flex items-center justify-between gap-2 px-2", collapsed ? "justify-center" : ""].join(" "), children: !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-[0.18em] text-[var(--muted)]", children: quickActionsTitle != null ? quickActionsTitle : "Accesos r\xE1pidos" }),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px flex-1 bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_72%,transparent),transparent)]" })
|
|
1926
|
+
] }) : null }),
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: (quickActions != null ? quickActions : []).map((a, index) => {
|
|
1928
|
+
var _a2;
|
|
1929
|
+
const disabled = Boolean(a.disabled);
|
|
1930
|
+
const base = [
|
|
1931
|
+
"group flex w-full items-center gap-3.5 rounded-[1.35rem] px-3.5 py-2.5 text-left transition-all duration-300 active:scale-[0.99]",
|
|
1932
|
+
disabled ? "opacity-60 cursor-not-allowed" : ITEM_IDLE,
|
|
1933
|
+
collapsed ? "justify-center" : ""
|
|
1934
|
+
].join(" ");
|
|
1935
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1936
|
+
import_Button.default,
|
|
1937
|
+
{
|
|
1938
|
+
unstyled: true,
|
|
1939
|
+
type: "button",
|
|
1940
|
+
onClick: () => {
|
|
1941
|
+
if (disabled) return;
|
|
1942
|
+
onQuickAction == null ? void 0 : onQuickAction(a);
|
|
1943
|
+
},
|
|
1944
|
+
className: base,
|
|
1945
|
+
title: void 0,
|
|
1946
|
+
children: [
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(QuickIcon, { children: (_a2 = a.icon) != null ? _a2 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.PlusIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
1948
|
+
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block truncate text-[0.9375rem] font-medium text-[var(--foreground)]", children: a.label }),
|
|
1950
|
+
a.description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mt-0.5 block truncate text-xs text-[var(--muted)] text-left", children: a.description }) : null
|
|
1951
|
+
] }) : null,
|
|
1952
|
+
!collapsed && a.badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0", children: a.badge }) : null
|
|
1953
|
+
]
|
|
1954
|
+
}
|
|
1955
|
+
);
|
|
1956
|
+
if (!collapsed) {
|
|
1957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1958
|
+
import_framer_motion.motion.div,
|
|
1959
|
+
{
|
|
1960
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1961
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1962
|
+
transition: { duration: 0.22, delay: index * 0.025, ease: calmFadeEase },
|
|
1963
|
+
children: button
|
|
1964
|
+
},
|
|
1965
|
+
a.id
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1969
|
+
import_Tooltip.default,
|
|
1970
|
+
{
|
|
1971
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-[0.75rem] font-semibold", children: a.label }),
|
|
1973
|
+
a.description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: a.description }) : null
|
|
1974
|
+
] }),
|
|
1975
|
+
placement: "right",
|
|
1976
|
+
offset: 12,
|
|
1977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1978
|
+
import_framer_motion.motion.div,
|
|
1979
|
+
{
|
|
1980
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1981
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1982
|
+
transition: { duration: 0.2, delay: index * 0.025, ease: calmFadeEase },
|
|
1983
|
+
children: button
|
|
1984
|
+
}
|
|
1985
|
+
)
|
|
1986
|
+
},
|
|
1987
|
+
a.id
|
|
1988
|
+
);
|
|
1989
|
+
}) })
|
|
1990
|
+
]
|
|
1991
|
+
}
|
|
1992
|
+
);
|
|
1910
1993
|
};
|
|
1911
1994
|
const showNavTools = Boolean(navEditable && onNavConfigure);
|
|
1912
1995
|
const showQuickTools = Boolean(quickActionsEditable && onQuickActionsConfigure);
|
|
1913
1996
|
const showSidebarTools = showNavTools || showQuickTools;
|
|
1914
1997
|
const showCollapseToggle = !mobile && typeof toggleCollapsed === "function";
|
|
1915
1998
|
const renderCollapseToggle = (opts) => {
|
|
1916
|
-
var _a2;
|
|
1917
1999
|
if (!showCollapseToggle) return null;
|
|
1918
2000
|
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton shrink-0", style: { width: 40, height: 40, borderRadius: 16 } });
|
|
1919
|
-
|
|
1920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: collapsed ? "Expandir barra lateral" : "Contraer barra lateral", placement: "right", offset: 10, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: collapsed ? "Expandir barra lateral" : "Contraer barra lateral", placement: "right", offset: 10, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1921
2002
|
import_Button.default,
|
|
1922
2003
|
{
|
|
2004
|
+
unstyled: true,
|
|
1923
2005
|
noPaddingX: true,
|
|
1924
2006
|
"aria-label": collapsed ? "Expandir barra lateral" : "Contraer barra lateral",
|
|
1925
2007
|
onClick: toggleCollapsed,
|
|
1926
|
-
variant: "ghost",
|
|
1927
|
-
size: "sm",
|
|
1928
|
-
leftIcon: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.CaretLineRightIcon, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.CaretLineLeftIcon, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1929
2008
|
className: cx(
|
|
1930
|
-
"
|
|
1931
|
-
|
|
1932
|
-
"
|
|
1933
|
-
|
|
2009
|
+
"inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-visible rounded-[1.1rem] p-0 transition-all duration-300",
|
|
2010
|
+
"border border-[color-mix(in_oklab,var(--border)_82%,transparent)]",
|
|
2011
|
+
"bg-[color-mix(in_oklab,var(--card)_96%,var(--surface))] text-[var(--foreground)]",
|
|
2012
|
+
"backdrop-blur-sm",
|
|
2013
|
+
"shadow-[0_14px_30px_-24px_color-mix(in_oklab,var(--foreground)_38%,transparent)]",
|
|
2014
|
+
"hover:-translate-y-0.5 hover:bg-[color-mix(in_oklab,var(--card)_94%,var(--surface))] hover:shadow-[0_18px_36px_-24px_color-mix(in_oklab,var(--foreground)_44%,transparent)]",
|
|
2015
|
+
"active:translate-y-0 active:scale-95"
|
|
1934
2016
|
),
|
|
1935
|
-
title: void 0
|
|
2017
|
+
title: void 0,
|
|
2018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2019
|
+
import_framer_motion.motion.span,
|
|
2020
|
+
{
|
|
2021
|
+
className: "grid place-items-center text-[color-mix(in_oklab,var(--foreground)_92%,var(--muted))]",
|
|
2022
|
+
animate: { x: collapsed ? 0.5 : -0.5, scale: collapsed ? 0.98 : 1 },
|
|
2023
|
+
transition: { type: "spring", stiffness: 420, damping: 30 },
|
|
2024
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.CaretLineRightIcon, { className: "h-[1.1rem] w-[1.1rem]", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.CaretLineLeftIcon, { className: "h-[1.1rem] w-[1.1rem]", "aria-hidden": true })
|
|
2025
|
+
}
|
|
2026
|
+
)
|
|
1936
2027
|
}
|
|
1937
|
-
) });
|
|
2028
|
+
) }) });
|
|
1938
2029
|
};
|
|
1939
2030
|
const SidebarTools = ({ condensed }) => {
|
|
1940
2031
|
if (!showSidebarTools) return null;
|
|
@@ -1980,9 +2071,9 @@ function SidebarInner({
|
|
|
1980
2071
|
}, []);
|
|
1981
2072
|
if (!condensedMode) {
|
|
1982
2073
|
const btnClass = cx(
|
|
1983
|
-
"h-9 w-9 rounded-
|
|
1984
|
-
|
|
1985
|
-
"hover:
|
|
2074
|
+
"h-9 w-9 rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
2075
|
+
SOFT_BUTTON_SURFACE,
|
|
2076
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
1986
2077
|
);
|
|
1987
2078
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cx("flex items-center gap-2"), children: [
|
|
1988
2079
|
showNavTools ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar", placement: "bottom", offset: 12, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -2016,9 +2107,9 @@ function SidebarInner({
|
|
|
2016
2107
|
] });
|
|
2017
2108
|
}
|
|
2018
2109
|
const iconBtnClass = cx(
|
|
2019
|
-
"grid place-items-center
|
|
2020
|
-
|
|
2021
|
-
"hover:
|
|
2110
|
+
"grid h-9 w-9 place-items-center rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
2111
|
+
SOFT_BUTTON_SURFACE,
|
|
2112
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
2022
2113
|
);
|
|
2023
2114
|
const menuItemClass = cx(
|
|
2024
2115
|
"w-full flex items-center gap-3 rounded-2xl px-3 py-2 text-left text-sm",
|
|
@@ -2033,7 +2124,7 @@ function SidebarInner({
|
|
|
2033
2124
|
className: "fixed z-[200] w-[240px]",
|
|
2034
2125
|
role: "menu",
|
|
2035
2126
|
"aria-label": "Opciones del sidebar",
|
|
2036
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-3xl
|
|
2127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cx("overflow-hidden rounded-3xl", TOP_PANEL_SURFACE, "bg-[var(--card)] shadow-xl backdrop-blur-xl"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-1.5", children: [
|
|
2037
2128
|
showNavTools ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2038
2129
|
"button",
|
|
2039
2130
|
{
|
|
@@ -2045,7 +2136,7 @@ function SidebarInner({
|
|
|
2045
2136
|
onNavConfigure == null ? void 0 : onNavConfigure();
|
|
2046
2137
|
},
|
|
2047
2138
|
children: [
|
|
2048
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cx("grid h-9 w-9 place-items-center rounded-2xl", SOFT_BUTTON_SURFACE), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.PencilIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
2049
2140
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0", children: [
|
|
2050
2141
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block font-semibold text-[var(--foreground)]", children: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar" }),
|
|
2051
2142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ordena y ajusta la navegaci\xF3n" })
|
|
@@ -2064,7 +2155,7 @@ function SidebarInner({
|
|
|
2064
2155
|
onQuickActionsConfigure == null ? void 0 : onQuickActionsConfigure();
|
|
2065
2156
|
},
|
|
2066
2157
|
children: [
|
|
2067
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cx("grid h-9 w-9 place-items-center rounded-2xl", SOFT_BUTTON_SURFACE), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.ListStarIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
2068
2159
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0", children: [
|
|
2069
2160
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block font-semibold text-[var(--foreground)]", children: "Accesos r\xE1pidos" }),
|
|
2070
2161
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ancla tus acciones favoritas" })
|
|
@@ -2100,7 +2191,7 @@ function SidebarInner({
|
|
|
2100
2191
|
] });
|
|
2101
2192
|
};
|
|
2102
2193
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: ["flex h-full flex-col", loading ? "pointer-events-none select-none" : ""].join(" "), "aria-busy": loading ? "true" : void 0, children: [
|
|
2103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: collapsed ? "px-
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: collapsed ? "px-3 pt-4" : "px-5 pt-5", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2104
2195
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: ["flex min-w-0 flex-1 items-center gap-3", collapsed ? "justify-center" : ""].join(" "), children: [
|
|
2105
2196
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton", style: { width: collapsed ? 44 : 40, height: collapsed ? 44 : 40, borderRadius: 16 } }),
|
|
2106
2197
|
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
@@ -2109,60 +2200,77 @@ function SidebarInner({
|
|
|
2109
2200
|
] }) : null
|
|
2110
2201
|
] }),
|
|
2111
2202
|
renderCollapseToggle()
|
|
2112
|
-
] }) : showBrand ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2203
|
+
] }) : showBrand ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2204
|
+
import_framer_motion.motion.div,
|
|
2205
|
+
{
|
|
2206
|
+
layout: true,
|
|
2207
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2208
|
+
className: "relative flex items-center gap-2",
|
|
2209
|
+
children: [
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2211
|
+
import_Button.default,
|
|
2212
|
+
{
|
|
2213
|
+
unstyled: true,
|
|
2214
|
+
type: "button",
|
|
2215
|
+
onClick: onBrandClick,
|
|
2216
|
+
className: cx(
|
|
2217
|
+
"flex items-center gap-3",
|
|
2218
|
+
"min-w-0 flex-1 justify-start py-2",
|
|
2219
|
+
collapsed ? "px-1" : "px-2"
|
|
2220
|
+
),
|
|
2221
|
+
title: "Ir al inicio",
|
|
2222
|
+
children: [
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2224
|
+
import_framer_motion.motion.div,
|
|
2133
2225
|
{
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2226
|
+
layout: "size",
|
|
2227
|
+
transition: { type: "spring", stiffness: 520, damping: 46, mass: 0.9 },
|
|
2228
|
+
className: "shrink-0",
|
|
2229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2230
|
+
import_AvatarSquare.default,
|
|
2231
|
+
{
|
|
2232
|
+
size: collapsed ? 44 : 40,
|
|
2233
|
+
src: brandLogoSrc != null ? brandLogoSrc : void 0,
|
|
2234
|
+
alt: brandTitle,
|
|
2235
|
+
initials: brandInitials,
|
|
2236
|
+
imageFit: brandLogoSrc ? "contain" : "cover",
|
|
2237
|
+
radiusClass: "rounded-2xl",
|
|
2238
|
+
color,
|
|
2239
|
+
className: "ring-0"
|
|
2240
|
+
}
|
|
2241
|
+
)
|
|
2142
2242
|
}
|
|
2143
|
-
)
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2243
|
+
),
|
|
2244
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: !collapsed && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2245
|
+
import_framer_motion.motion.div,
|
|
2246
|
+
{
|
|
2247
|
+
initial: calmFadeInitial,
|
|
2248
|
+
animate: calmFadeAnimate,
|
|
2249
|
+
exit: calmFadeExit,
|
|
2250
|
+
transition: calmFadeTransition,
|
|
2251
|
+
className: "leading-tight",
|
|
2252
|
+
children: [
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-lg font-semibold tracking-tight text-left", children: brandTitle }),
|
|
2254
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[0.6875rem] uppercase tracking-wide text-[var(--muted)] text-left", children: brandSubtitle })
|
|
2255
|
+
]
|
|
2256
|
+
},
|
|
2257
|
+
"brand-meta"
|
|
2258
|
+
) })
|
|
2259
|
+
]
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2263
|
+
import_framer_motion.motion.div,
|
|
2264
|
+
{
|
|
2265
|
+
layout: true,
|
|
2266
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2267
|
+
className: "shrink-0 self-start",
|
|
2268
|
+
children: renderCollapseToggle({ size: collapsed ? "sm" : "md" })
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2271
|
+
]
|
|
2272
|
+
}
|
|
2273
|
+
) : hasWorkspace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
2166
2274
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2167
2275
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2168
2276
|
WorkspaceSwitcher,
|
|
@@ -2185,7 +2293,7 @@ function SidebarInner({
|
|
|
2185
2293
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: ["min-w-0 flex-1 text-sm font-semibold text-[var(--muted)]", collapsed ? "text-center" : ""].join(" "), children: "Navegaci\xF3n" }),
|
|
2186
2294
|
renderCollapseToggle()
|
|
2187
2295
|
] }) }),
|
|
2188
|
-
showTopPanel || loading && skShowTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cx("mt-
|
|
2296
|
+
showTopPanel || loading && skShowTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cx("mt-4", collapsed ? "px-4" : "px-5"), children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: collapsed ? cx("rounded-3xl p-2", TOP_PANEL_SURFACE) : topPanelClass, children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
2189
2297
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton", style: { width: 44, height: 44, borderRadius: 16 } }),
|
|
2190
2298
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton", style: { width: 56, height: 12, borderRadius: 10 } })
|
|
2191
2299
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-2 py-2", children: [
|
|
@@ -2205,7 +2313,7 @@ function SidebarInner({
|
|
|
2205
2313
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton", style: { width: "66%", height: 10, borderRadius: 10, opacity: 0.9 } })
|
|
2206
2314
|
] })
|
|
2207
2315
|
] }) })
|
|
2208
|
-
] }) }) : collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-3xl
|
|
2316
|
+
] }) }) : collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cx("rounded-3xl p-1.5", TOP_PANEL_SURFACE), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
2209
2317
|
showWorkspaceInTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
2210
2318
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2211
2319
|
WorkspaceSwitcher,
|
|
@@ -2238,8 +2346,8 @@ function SidebarInner({
|
|
|
2238
2346
|
userMenuSlot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: userMenuSlot }) : null
|
|
2239
2347
|
] }) : null,
|
|
2240
2348
|
sidebarSlotCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center justify-center", children: sidebarSlotCollapsed }) : null
|
|
2241
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
2242
|
-
showWorkspaceInTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-3 py-3", children: [
|
|
2349
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: topPanelClass, children: [
|
|
2350
|
+
showWorkspaceInTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 overflow-hidden px-3 py-3", children: [
|
|
2243
2351
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2244
2352
|
WorkspaceSwitcher,
|
|
2245
2353
|
{
|
|
@@ -2253,10 +2361,10 @@ function SidebarInner({
|
|
|
2253
2361
|
color
|
|
2254
2362
|
}
|
|
2255
2363
|
),
|
|
2256
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-2.5
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-2.5 border-t border-[color-mix(in_oklab,var(--border)_58%,transparent)] pt-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTools, {}) })
|
|
2257
2365
|
] }) : null,
|
|
2258
|
-
showWorkspaceInTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px bg-[var(--border)]
|
|
2259
|
-
showUser ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3.5 rounded-2xl px-
|
|
2366
|
+
showWorkspaceInTopPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }) : null,
|
|
2367
|
+
showUser ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3.5 rounded-2xl px-1 py-1", children: [
|
|
2260
2368
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2261
2369
|
import_AvatarSquare.default,
|
|
2262
2370
|
{
|
|
@@ -2275,7 +2383,7 @@ function SidebarInner({
|
|
|
2275
2383
|
userMenuSlot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ml-auto", children: userMenuSlot }) : null
|
|
2276
2384
|
] }) }) : null,
|
|
2277
2385
|
sidebarSlot ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
2278
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px bg-[var(--border)]
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }),
|
|
2279
2387
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-3", children: sidebarSlot })
|
|
2280
2388
|
] }) : null
|
|
2281
2389
|
] }) }) : null,
|
|
@@ -2284,8 +2392,8 @@ function SidebarInner({
|
|
|
2284
2392
|
{
|
|
2285
2393
|
ref: navRef,
|
|
2286
2394
|
className: cx(
|
|
2287
|
-
"mt-
|
|
2288
|
-
|
|
2395
|
+
"mt-5 flex-1 space-y-6 overflow-y-auto overflow-x-hidden py-2",
|
|
2396
|
+
"px-5"
|
|
2289
2397
|
),
|
|
2290
2398
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-7", children: Array.from({ length: skGroups }).map((_, g) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
2291
2399
|
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-3 px-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fx-skeleton", style: { width: g % 2 === 0 ? "6.5rem" : "7.5rem", height: 10, borderRadius: 10 } }) }) : null,
|
|
@@ -2311,30 +2419,49 @@ function SidebarInner({
|
|
|
2311
2419
|
});
|
|
2312
2420
|
return visibles.length > 0;
|
|
2313
2421
|
})) == null ? void 0 : _a2[0]) != null ? _b2 : null;
|
|
2314
|
-
const renderedGroups = groups.map(([groupName, items]) => {
|
|
2422
|
+
const renderedGroups = groups.map(([groupName, items], groupIndex) => {
|
|
2315
2423
|
const visibles = items.filter((i) => {
|
|
2316
2424
|
var _a3;
|
|
2317
2425
|
return ((_a3 = i.children) == null ? void 0 : _a3.length) ? i.children.some((c) => c) : true;
|
|
2318
2426
|
});
|
|
2319
2427
|
if (visibles.length === 0) return null;
|
|
2320
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2429
|
+
import_framer_motion.motion.div,
|
|
2430
|
+
{
|
|
2431
|
+
layout: true,
|
|
2432
|
+
initial: calmFadeInitial,
|
|
2433
|
+
animate: calmFadeAnimate,
|
|
2434
|
+
transition: { duration: 0.24, delay: groupIndex * 0.03, ease: calmFadeEase },
|
|
2435
|
+
children: [
|
|
2436
|
+
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GroupHeader, { title: groupName }) : null,
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: visibles.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2438
|
+
import_framer_motion.motion.div,
|
|
2439
|
+
{
|
|
2440
|
+
layout: true,
|
|
2441
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
2442
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2443
|
+
transition: { duration: 0.2, delay: itemIndex * 0.02, ease: calmFadeEase },
|
|
2444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2445
|
+
RenderItem,
|
|
2446
|
+
{
|
|
2447
|
+
item,
|
|
2448
|
+
collapsed: collapsed != null ? collapsed : false,
|
|
2449
|
+
activeKey,
|
|
2450
|
+
go,
|
|
2451
|
+
color
|
|
2452
|
+
}
|
|
2453
|
+
)
|
|
2454
|
+
},
|
|
2455
|
+
item.key
|
|
2456
|
+
)) }),
|
|
2457
|
+
!inserted && quick && firstGroupNameWithItems === groupName ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: (() => {
|
|
2458
|
+
inserted = true;
|
|
2459
|
+
return quick;
|
|
2460
|
+
})() }) : null
|
|
2461
|
+
]
|
|
2462
|
+
},
|
|
2463
|
+
groupName
|
|
2464
|
+
);
|
|
2338
2465
|
});
|
|
2339
2466
|
if (!inserted && quick) {
|
|
2340
2467
|
renderedGroups.push(
|
|
@@ -2359,7 +2486,9 @@ function RenderItem({
|
|
|
2359
2486
|
const Icon = (_a = item.icon) != null ? _a : (() => null);
|
|
2360
2487
|
const hasChildren = !!((_b = item.children) == null ? void 0 : _b.length);
|
|
2361
2488
|
const children = ((_c = item.children) != null ? _c : []).filter(Boolean);
|
|
2362
|
-
const
|
|
2489
|
+
const isDirectActive = item.key === activeKey;
|
|
2490
|
+
const hasActiveChild = hasChildren && children.some((ch) => ch.key === activeKey);
|
|
2491
|
+
const isActive = isDirectActive || hasActiveChild;
|
|
2363
2492
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
2364
2493
|
(0, import_react.useEffect)(() => {
|
|
2365
2494
|
if (!hasChildren) return;
|
|
@@ -2383,46 +2512,23 @@ function RenderItem({
|
|
|
2383
2512
|
} catch {
|
|
2384
2513
|
}
|
|
2385
2514
|
}, [hasChildren, open, item.key]);
|
|
2386
|
-
if (hasChildren && collapsed) {
|
|
2387
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: item.label, placement: "right", offset: 12, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2388
|
-
import_Button.default,
|
|
2389
|
-
{
|
|
2390
|
-
unstyled: true,
|
|
2391
|
-
type: "button",
|
|
2392
|
-
onClick: () => go(item.key),
|
|
2393
|
-
title: void 0,
|
|
2394
|
-
"data-fx-sidebar-key": item.key,
|
|
2395
|
-
className: [
|
|
2396
|
-
"group flex w-full items-center gap-3.5 rounded-2xl px-3.5 py-2.5 text-left text-[0.9375rem] transition justify-center active:scale-[0.99]",
|
|
2397
|
-
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : "text-[var(--foreground)] hover:bg-[color-mix(in_oklab,var(--surface)_65%,transparent)]"
|
|
2398
|
-
].join(" "),
|
|
2399
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2400
|
-
"span",
|
|
2401
|
-
{
|
|
2402
|
-
className: [
|
|
2403
|
-
"grid h-10 w-10 place-items-center rounded-2xl border transition",
|
|
2404
|
-
isActive ? `${ICON_BORDER_ACTIVE[color]} bg-[var(--card)] shadow-sm` : "border-[var(--border)] bg-[var(--card)] shadow-sm"
|
|
2405
|
-
].join(" "),
|
|
2406
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-5 w-5" })
|
|
2407
|
-
}
|
|
2408
|
-
)
|
|
2409
|
-
}
|
|
2410
|
-
) });
|
|
2411
|
-
}
|
|
2412
2515
|
if (hasChildren) {
|
|
2413
|
-
|
|
2516
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_framer_motion.motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: [
|
|
2414
2517
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2415
|
-
|
|
2518
|
+
import_framer_motion.motion.div,
|
|
2416
2519
|
{
|
|
2520
|
+
layout: true,
|
|
2521
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2417
2522
|
className: [
|
|
2418
|
-
"relative flex w-full min-w-0 items-center rounded-
|
|
2419
|
-
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` :
|
|
2523
|
+
"relative isolate flex w-full min-w-0 items-center gap-2.5 rounded-[1.2rem] px-3 py-2.5 text-[0.9375rem] transition-all duration-300 active:scale-[0.99]",
|
|
2524
|
+
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2420
2525
|
].join(" "),
|
|
2421
2526
|
children: [
|
|
2527
|
+
!collapsed && isActive ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2422
2528
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: isActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2423
2529
|
import_framer_motion.motion.span,
|
|
2424
2530
|
{
|
|
2425
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2531
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2426
2532
|
initial: { opacity: 0 },
|
|
2427
2533
|
animate: { opacity: 1 },
|
|
2428
2534
|
exit: { opacity: 0 },
|
|
@@ -2431,75 +2537,148 @@ function RenderItem({
|
|
|
2431
2537
|
},
|
|
2432
2538
|
`active-${item.key}`
|
|
2433
2539
|
) }),
|
|
2434
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Button.default, { unstyled: true, type: "button", onClick: () => go(item.key), className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2435
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2436
|
-
"span",
|
|
2437
|
-
{
|
|
2438
|
-
className: [
|
|
2439
|
-
"grid h-10 w-10 place-items-center rounded-2xl border transition",
|
|
2440
|
-
isActive ? `${ICON_BORDER_ACTIVE[color]} bg-[var(--card)] shadow-sm` : "border-[var(--border)] bg-[var(--card)] shadow-sm"
|
|
2441
|
-
].join(" "),
|
|
2442
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-5 w-5" })
|
|
2443
|
-
}
|
|
2444
|
-
),
|
|
2445
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate", "data-fx-sidebar-key": item.key, children: item.label })
|
|
2446
|
-
] }),
|
|
2447
2540
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2448
2541
|
import_Button.default,
|
|
2449
2542
|
{
|
|
2450
|
-
|
|
2451
|
-
noPaddingX: true,
|
|
2543
|
+
unstyled: true,
|
|
2452
2544
|
type: "button",
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2545
|
+
onClick: () => go(item.key),
|
|
2546
|
+
"data-fx-sidebar-key": item.key,
|
|
2547
|
+
className: "relative z-[1] flex min-w-0 flex-1 items-center",
|
|
2548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2549
|
+
import_framer_motion.motion.span,
|
|
2550
|
+
{
|
|
2551
|
+
layout: true,
|
|
2552
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2553
|
+
className: cx(
|
|
2554
|
+
"flex min-w-0 items-center",
|
|
2555
|
+
collapsed ? "w-full justify-start" : "w-full gap-3"
|
|
2556
|
+
),
|
|
2557
|
+
children: [
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2559
|
+
"span",
|
|
2560
|
+
{
|
|
2561
|
+
className: [
|
|
2562
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2563
|
+
isActive ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2564
|
+
].join(" "),
|
|
2565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2566
|
+
Icon,
|
|
2567
|
+
{
|
|
2568
|
+
className: "h-5 w-5",
|
|
2569
|
+
...isActive ? {
|
|
2570
|
+
fill: "var(--primary)",
|
|
2571
|
+
color: "var(--primary)",
|
|
2572
|
+
style: { color: "var(--primary)" }
|
|
2573
|
+
} : void 0
|
|
2574
|
+
}
|
|
2575
|
+
)
|
|
2576
|
+
}
|
|
2577
|
+
),
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2579
|
+
import_framer_motion.motion.span,
|
|
2580
|
+
{
|
|
2581
|
+
"data-fx-sidebar-key": item.key,
|
|
2582
|
+
initial: { opacity: 0, width: 0 },
|
|
2583
|
+
animate: { opacity: 1, width: "auto" },
|
|
2584
|
+
exit: { opacity: 0, width: 0 },
|
|
2585
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2586
|
+
className: "overflow-hidden",
|
|
2587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block truncate", children: item.label })
|
|
2588
|
+
},
|
|
2589
|
+
`label-${item.key}`
|
|
2590
|
+
) : null })
|
|
2591
|
+
]
|
|
2592
|
+
}
|
|
2593
|
+
)
|
|
2465
2594
|
}
|
|
2466
|
-
)
|
|
2595
|
+
),
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2597
|
+
import_framer_motion.motion.div,
|
|
2598
|
+
{
|
|
2599
|
+
initial: { opacity: 0, width: 0 },
|
|
2600
|
+
animate: { opacity: 1, width: "auto" },
|
|
2601
|
+
exit: { opacity: 0, width: 0 },
|
|
2602
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2603
|
+
className: "overflow-hidden",
|
|
2604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2605
|
+
import_Button.default,
|
|
2606
|
+
{
|
|
2607
|
+
iconOnly: true,
|
|
2608
|
+
noPaddingX: true,
|
|
2609
|
+
type: "button",
|
|
2610
|
+
"aria-label": open ? "Contraer submen\xFA" : "Expandir submen\xFA",
|
|
2611
|
+
onClick: (e) => {
|
|
2612
|
+
e.stopPropagation();
|
|
2613
|
+
setOpen(!open);
|
|
2614
|
+
},
|
|
2615
|
+
variant: "ghost",
|
|
2616
|
+
size: "sm",
|
|
2617
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_iconos.ChevronDownIcon, { className: `h-4 w-4 transition-transform ${open ? "rotate-180" : ""}`, "aria-hidden": true }),
|
|
2618
|
+
className: [
|
|
2619
|
+
"relative z-[1] h-8 w-8 shrink-0 rounded-xl p-0 !gap-0 hover:text-[var(--foreground)]",
|
|
2620
|
+
isActive ? `${SOFT_BUTTON_SURFACE} ${TOGGLE_BORDER_ACTIVE[color]} ${hasActiveChild ? "text-[var(--primary)]" : "text-[var(--muted)]"}` : "border-transparent bg-transparent text-[var(--muted)]"
|
|
2621
|
+
].join(" ")
|
|
2622
|
+
}
|
|
2623
|
+
)
|
|
2624
|
+
},
|
|
2625
|
+
`toggle-${item.key}`
|
|
2626
|
+
) : null })
|
|
2467
2627
|
]
|
|
2468
2628
|
}
|
|
2469
2629
|
),
|
|
2470
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: open && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2471
2631
|
import_framer_motion.motion.div,
|
|
2472
2632
|
{
|
|
2473
|
-
initial: { height: 0, opacity: 0,
|
|
2474
|
-
animate: { height: "auto", opacity: 1,
|
|
2475
|
-
exit: { height: 0, opacity: 0,
|
|
2476
|
-
transition: { type: "tween", duration: 0.
|
|
2633
|
+
initial: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2634
|
+
animate: { height: "auto", opacity: 1, filter: "blur(0px)" },
|
|
2635
|
+
exit: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2636
|
+
transition: { type: "tween", duration: 0.24, ease: [0.22, 1, 0.36, 1] },
|
|
2477
2637
|
className: "mt-1 overflow-hidden",
|
|
2478
|
-
style: { willChange: "height, opacity,
|
|
2479
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2638
|
+
style: { willChange: "height, opacity, filter" },
|
|
2639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative pl-4", children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: SUBMENU_GUIDE_BAR }),
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1 pl-3", children: children.map((ch, index) => {
|
|
2642
|
+
const active2 = ch.key === activeKey;
|
|
2643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2644
|
+
import_framer_motion.motion.div,
|
|
2645
|
+
{
|
|
2646
|
+
className: "relative",
|
|
2647
|
+
initial: { opacity: 0, filter: "blur(5px)" },
|
|
2648
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2649
|
+
transition: { duration: 0.18, delay: index * 0.02, ease: [0.22, 1, 0.36, 1] },
|
|
2650
|
+
children: [
|
|
2651
|
+
active2 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute bottom-2 -left-3 top-2 z-[1] w-px bg-[var(--primary)] shadow-[0_0_0_1px_color-mix(in_oklab,var(--primary)_14%,transparent),0_10px_24px_-14px_color-mix(in_oklab,var(--primary)_72%,transparent)]" }) : null,
|
|
2652
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2653
|
+
import_Button.default,
|
|
2654
|
+
{
|
|
2655
|
+
unstyled: true,
|
|
2656
|
+
onClick: () => go(ch.key),
|
|
2657
|
+
"data-fx-sidebar-key": ch.key,
|
|
2658
|
+
className: [
|
|
2659
|
+
"relative isolate block w-full rounded-xl px-3 py-2.5 text-left text-[0.875rem] transition-all duration-300",
|
|
2660
|
+
active2 ? SUBITEM_ACTIVE[color] : ITEM_IDLE
|
|
2661
|
+
].join(" "),
|
|
2662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "relative z-[1] block truncate", children: ch.label })
|
|
2663
|
+
}
|
|
2664
|
+
)
|
|
2665
|
+
]
|
|
2666
|
+
},
|
|
2667
|
+
ch.key
|
|
2668
|
+
);
|
|
2669
|
+
}) })
|
|
2670
|
+
] })
|
|
2496
2671
|
},
|
|
2497
2672
|
`submenu-${item.key}`
|
|
2498
2673
|
) })
|
|
2499
2674
|
] });
|
|
2675
|
+
if (collapsed) {
|
|
2676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: item.label, placement: "right", offset: 12, children: content });
|
|
2677
|
+
}
|
|
2678
|
+
return content;
|
|
2500
2679
|
}
|
|
2501
2680
|
const active = item.key === activeKey;
|
|
2502
|
-
const node = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2681
|
+
const node = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2503
2682
|
import_Button.default,
|
|
2504
2683
|
{
|
|
2505
2684
|
unstyled: true,
|
|
@@ -2508,15 +2687,15 @@ function RenderItem({
|
|
|
2508
2687
|
title: void 0,
|
|
2509
2688
|
"data-fx-sidebar-key": item.key,
|
|
2510
2689
|
className: [
|
|
2511
|
-
"group relative flex w-full min-w-0 items-center gap-3.5 rounded-
|
|
2512
|
-
active ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` :
|
|
2513
|
-
collapsed ? "justify-center" : ""
|
|
2690
|
+
"group relative isolate flex w-full min-w-0 items-center gap-3.5 rounded-[1.2rem] px-3 py-2.5 text-left text-[0.9375rem] transition-all duration-300 active:scale-[0.99]",
|
|
2691
|
+
active ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2514
2692
|
].join(" "),
|
|
2515
2693
|
children: [
|
|
2694
|
+
!collapsed && active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2516
2695
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: active && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2517
2696
|
import_framer_motion.motion.span,
|
|
2518
2697
|
{
|
|
2519
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2698
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2520
2699
|
initial: { opacity: 0 },
|
|
2521
2700
|
animate: { opacity: 1 },
|
|
2522
2701
|
exit: { opacity: 0 },
|
|
@@ -2525,20 +2704,54 @@ function RenderItem({
|
|
|
2525
2704
|
},
|
|
2526
2705
|
`active-${item.key}`
|
|
2527
2706
|
) }),
|
|
2528
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
2529
|
-
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2708
|
+
import_framer_motion.motion.span,
|
|
2530
2709
|
{
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2710
|
+
layout: true,
|
|
2711
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2712
|
+
className: cx(
|
|
2713
|
+
"relative z-[1] flex min-w-0 items-center",
|
|
2714
|
+
collapsed ? "w-full justify-start" : "w-full gap-3.5"
|
|
2715
|
+
),
|
|
2716
|
+
children: [
|
|
2717
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2718
|
+
"span",
|
|
2719
|
+
{
|
|
2720
|
+
className: [
|
|
2721
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2722
|
+
active ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2723
|
+
].join(" "),
|
|
2724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2725
|
+
Icon,
|
|
2726
|
+
{
|
|
2727
|
+
className: "h-5 w-5",
|
|
2728
|
+
...active ? {
|
|
2729
|
+
fill: "var(--primary)",
|
|
2730
|
+
color: "var(--primary)",
|
|
2731
|
+
style: { color: "var(--primary)" }
|
|
2732
|
+
} : void 0
|
|
2733
|
+
}
|
|
2734
|
+
)
|
|
2735
|
+
}
|
|
2736
|
+
),
|
|
2737
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2738
|
+
import_framer_motion.motion.span,
|
|
2739
|
+
{
|
|
2740
|
+
initial: { opacity: 0, width: 0 },
|
|
2741
|
+
animate: { opacity: 1, width: "auto" },
|
|
2742
|
+
exit: { opacity: 0, width: 0 },
|
|
2743
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2744
|
+
className: "relative z-[1] overflow-hidden",
|
|
2745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block truncate", children: item.label })
|
|
2746
|
+
},
|
|
2747
|
+
`label-${item.key}`
|
|
2748
|
+
) : null })
|
|
2749
|
+
]
|
|
2536
2750
|
}
|
|
2537
|
-
)
|
|
2538
|
-
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate", children: item.label })
|
|
2751
|
+
)
|
|
2539
2752
|
]
|
|
2540
2753
|
}
|
|
2541
|
-
);
|
|
2754
|
+
) });
|
|
2542
2755
|
if (!collapsed) return node;
|
|
2543
2756
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { content: item.label, placement: "right", offset: 12, children: node });
|
|
2544
2757
|
}
|