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.mjs
CHANGED
|
@@ -44,7 +44,10 @@ function groupItems(items) {
|
|
|
44
44
|
return Array.from(byGroup.entries());
|
|
45
45
|
}
|
|
46
46
|
function GroupHeader({ title }) {
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-3 px-2 select-none", children: [
|
|
48
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-[0.18em] text-[var(--muted)] text-left", children: title }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_72%,transparent),transparent)]" })
|
|
50
|
+
] });
|
|
48
51
|
}
|
|
49
52
|
function safeParseSidebarNavLayout(raw) {
|
|
50
53
|
if (!raw) return null;
|
|
@@ -148,54 +151,29 @@ function pickWorkspaceId(workspaces, preferred) {
|
|
|
148
151
|
return (primary != null ? primary : list[0]).id;
|
|
149
152
|
}
|
|
150
153
|
const WRAP_ACTIVE = {
|
|
151
|
-
accent: "bg-
|
|
152
|
-
slate: "bg-
|
|
153
|
-
gray: "bg-
|
|
154
|
-
zinc: "bg-
|
|
155
|
-
neutral: "bg-
|
|
156
|
-
stone: "bg-
|
|
157
|
-
red: "bg-
|
|
158
|
-
orange: "bg-
|
|
159
|
-
amber: "bg-
|
|
160
|
-
yellow: "bg-
|
|
161
|
-
lime: "bg-
|
|
162
|
-
green: "bg-
|
|
163
|
-
emerald: "bg-
|
|
164
|
-
teal: "bg-
|
|
165
|
-
cyan: "bg-
|
|
166
|
-
sky: "bg-
|
|
167
|
-
blue: "bg-
|
|
168
|
-
indigo: "bg-
|
|
169
|
-
violet: "bg-
|
|
170
|
-
purple: "bg-
|
|
171
|
-
fuchsia: "bg-
|
|
172
|
-
pink: "bg-
|
|
173
|
-
rose: "bg-
|
|
174
|
-
};
|
|
175
|
-
const ICON_BORDER_ACTIVE = {
|
|
176
|
-
accent: "border-[color-mix(in_oklab,var(--ring)_32%,transparent)] dark:border-[color-mix(in_oklab,var(--ring)_26%,transparent)]",
|
|
177
|
-
slate: "border-slate-300/60 dark:border-slate-700/40",
|
|
178
|
-
gray: "border-gray-300/60 dark:border-gray-700/40",
|
|
179
|
-
zinc: "border-zinc-300/60 dark:border-zinc-700/40",
|
|
180
|
-
neutral: "border-neutral-300/60 dark:border-neutral-700/40",
|
|
181
|
-
stone: "border-stone-300/60 dark:border-stone-700/40",
|
|
182
|
-
red: "border-red-300/60 dark:border-red-700/40",
|
|
183
|
-
orange: "border-orange-300/60 dark:border-orange-700/40",
|
|
184
|
-
amber: "border-amber-300/60 dark:border-amber-700/40",
|
|
185
|
-
yellow: "border-yellow-300/60 dark:border-yellow-700/40",
|
|
186
|
-
lime: "border-lime-300/60 dark:border-lime-700/40",
|
|
187
|
-
green: "border-green-300/60 dark:border-green-700/40",
|
|
188
|
-
emerald: "border-emerald-300/60 dark:border-emerald-700/40",
|
|
189
|
-
teal: "border-teal-300/60 dark:border-teal-700/40",
|
|
190
|
-
cyan: "border-cyan-300/60 dark:border-cyan-700/40",
|
|
191
|
-
sky: "border-sky-300/60 dark:border-sky-700/40",
|
|
192
|
-
blue: "border-blue-300/60 dark:border-blue-700/40",
|
|
193
|
-
indigo: "border-indigo-300/60 dark:border-indigo-700/40",
|
|
194
|
-
violet: "border-violet-300/60 dark:border-violet-700/40",
|
|
195
|
-
purple: "border-purple-300/60 dark:border-purple-700/40",
|
|
196
|
-
fuchsia: "border-fuchsia-300/60 dark:border-fuchsia-700/40",
|
|
197
|
-
pink: "border-pink-300/60 dark:border-pink-700/40",
|
|
198
|
-
rose: "border-rose-300/60 dark:border-rose-700/40"
|
|
154
|
+
accent: "bg-transparent ring-0",
|
|
155
|
+
slate: "bg-transparent ring-0",
|
|
156
|
+
gray: "bg-transparent ring-0",
|
|
157
|
+
zinc: "bg-transparent ring-0",
|
|
158
|
+
neutral: "bg-transparent ring-0",
|
|
159
|
+
stone: "bg-transparent ring-0",
|
|
160
|
+
red: "bg-transparent ring-0",
|
|
161
|
+
orange: "bg-transparent ring-0",
|
|
162
|
+
amber: "bg-transparent ring-0",
|
|
163
|
+
yellow: "bg-transparent ring-0",
|
|
164
|
+
lime: "bg-transparent ring-0",
|
|
165
|
+
green: "bg-transparent ring-0",
|
|
166
|
+
emerald: "bg-transparent ring-0",
|
|
167
|
+
teal: "bg-transparent ring-0",
|
|
168
|
+
cyan: "bg-transparent ring-0",
|
|
169
|
+
sky: "bg-transparent ring-0",
|
|
170
|
+
blue: "bg-transparent ring-0",
|
|
171
|
+
indigo: "bg-transparent ring-0",
|
|
172
|
+
violet: "bg-transparent ring-0",
|
|
173
|
+
purple: "bg-transparent ring-0",
|
|
174
|
+
fuchsia: "bg-transparent ring-0",
|
|
175
|
+
pink: "bg-transparent ring-0",
|
|
176
|
+
rose: "bg-transparent ring-0"
|
|
199
177
|
};
|
|
200
178
|
const TOGGLE_BORDER_ACTIVE = {
|
|
201
179
|
accent: "border-[color-mix(in_oklab,var(--ring)_28%,transparent)] dark:border-[color-mix(in_oklab,var(--ring)_22%,transparent)]",
|
|
@@ -223,30 +201,41 @@ const TOGGLE_BORDER_ACTIVE = {
|
|
|
223
201
|
rose: "border-rose-200 dark:border-rose-700/40"
|
|
224
202
|
};
|
|
225
203
|
const SUBITEM_ACTIVE = {
|
|
226
|
-
accent: "bg-
|
|
227
|
-
slate: "bg-
|
|
228
|
-
gray: "bg-
|
|
229
|
-
zinc: "bg-
|
|
230
|
-
neutral: "bg-
|
|
231
|
-
stone: "bg-
|
|
232
|
-
red: "bg-
|
|
233
|
-
orange: "bg-
|
|
234
|
-
amber: "bg-
|
|
235
|
-
yellow: "bg-
|
|
236
|
-
lime: "bg-
|
|
237
|
-
green: "bg-
|
|
238
|
-
emerald: "bg-
|
|
239
|
-
teal: "bg-
|
|
240
|
-
cyan: "bg-
|
|
241
|
-
sky: "bg-
|
|
242
|
-
blue: "bg-
|
|
243
|
-
indigo: "bg-
|
|
244
|
-
violet: "bg-
|
|
245
|
-
purple: "bg-
|
|
246
|
-
fuchsia: "bg-
|
|
247
|
-
pink: "bg-
|
|
248
|
-
rose: "bg-
|
|
204
|
+
accent: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
205
|
+
slate: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
206
|
+
gray: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
207
|
+
zinc: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
208
|
+
neutral: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
209
|
+
stone: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
210
|
+
red: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
211
|
+
orange: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
212
|
+
amber: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
213
|
+
yellow: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
214
|
+
lime: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
215
|
+
green: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
216
|
+
emerald: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
217
|
+
teal: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
218
|
+
cyan: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
219
|
+
sky: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
220
|
+
blue: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
221
|
+
indigo: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
222
|
+
violet: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
223
|
+
purple: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
224
|
+
fuchsia: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
225
|
+
pink: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl",
|
|
226
|
+
rose: "bg-transparent text-[var(--foreground)] ring-0 rounded-xl"
|
|
249
227
|
};
|
|
228
|
+
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";
|
|
229
|
+
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)]";
|
|
230
|
+
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)]";
|
|
231
|
+
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)]";
|
|
232
|
+
const SOFT_BUTTON_SURFACE = "border border-[color-mix(in_oklab,var(--border)_70%,transparent)] bg-[color-mix(in_oklab,var(--foreground)_3.5%,transparent)]";
|
|
233
|
+
const ITEM_ICON_IDLE = "text-[color-mix(in_oklab,var(--foreground)_78%,var(--muted))] group-hover:text-[var(--foreground)]";
|
|
234
|
+
const ITEM_ICON_ACTIVE = "text-[var(--primary)] drop-shadow-[0_8px_20px_color-mix(in_oklab,var(--primary)_28%,transparent)]";
|
|
235
|
+
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)]";
|
|
236
|
+
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%)]";
|
|
237
|
+
const SIDEBAR_COLLAPSE_EASE = [0.22, 1, 0.36, 1];
|
|
238
|
+
const SIDEBAR_COLLAPSE_TRANSITION = { duration: 0.24, ease: SIDEBAR_COLLAPSE_EASE };
|
|
250
239
|
function Sidebar({
|
|
251
240
|
items,
|
|
252
241
|
activeKey,
|
|
@@ -597,25 +586,25 @@ function Sidebar({
|
|
|
597
586
|
activeWorkspace ? /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: activeWorkspace.name }) : null
|
|
598
587
|
] })
|
|
599
588
|
] }),
|
|
600
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ jsx(
|
|
601
590
|
motion.aside,
|
|
602
591
|
{
|
|
603
592
|
className: [
|
|
604
|
-
"hidden xl:fixed xl:inset-y-0 xl:
|
|
605
|
-
collapsed ? "xl:px-2" : "xl:px-4"
|
|
593
|
+
"relative z-40 hidden overflow-hidden xl:fixed xl:inset-y-0 xl:left-0 xl:flex xl:flex-col"
|
|
606
594
|
].join(" "),
|
|
607
595
|
initial: false,
|
|
608
596
|
animate: { width: sidebarWidth },
|
|
609
597
|
transition: sidebarWidthTransition,
|
|
610
598
|
style: { width: sidebarWidth, willChange: motionEnabled ? "width" : void 0 },
|
|
611
|
-
children: [
|
|
599
|
+
children: /* @__PURE__ */ jsxs("div", { className: cx("relative z-10 flex h-full min-h-0 flex-1 overflow-hidden", PANEL_SURFACE), children: [
|
|
612
600
|
/* @__PURE__ */ jsx(
|
|
613
601
|
"div",
|
|
614
602
|
{
|
|
615
603
|
"aria-hidden": "true",
|
|
616
|
-
className: "pointer-events-none absolute inset-
|
|
604
|
+
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%)]"
|
|
617
605
|
}
|
|
618
606
|
),
|
|
607
|
+
/* @__PURE__ */ 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)]" }),
|
|
619
608
|
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex-1 min-h-0", children: /* @__PURE__ */ jsx(
|
|
620
609
|
SidebarInner,
|
|
621
610
|
{
|
|
@@ -662,7 +651,7 @@ function Sidebar({
|
|
|
662
651
|
skeleton
|
|
663
652
|
}
|
|
664
653
|
) })
|
|
665
|
-
]
|
|
654
|
+
] })
|
|
666
655
|
}
|
|
667
656
|
),
|
|
668
657
|
/* @__PURE__ */ jsx(
|
|
@@ -676,26 +665,27 @@ function Sidebar({
|
|
|
676
665
|
}
|
|
677
666
|
),
|
|
678
667
|
/* @__PURE__ */ jsx(AnimatePresence, { children: drawerOpen && /* @__PURE__ */ jsxs(motion.div, { className: "fixed inset-0 z-40 xl:hidden", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: [
|
|
679
|
-
/* @__PURE__ */ jsx(
|
|
668
|
+
/* @__PURE__ */ jsx(motion.div, { className: "absolute inset-0 bg-black/42 backdrop-blur-[2px]", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }),
|
|
680
669
|
/* @__PURE__ */ jsxs(
|
|
681
670
|
motion.div,
|
|
682
671
|
{
|
|
683
672
|
role: "dialog",
|
|
684
673
|
"aria-modal": "true",
|
|
685
|
-
initial: { x: -340 },
|
|
686
|
-
animate: { x: 0 },
|
|
687
|
-
exit: { x: -340 },
|
|
688
|
-
transition: { type: "tween", duration: 0.
|
|
689
|
-
className: "relative h-full w-[88%] max-w-80 overflow-hidden bg-[var(--card)]
|
|
690
|
-
style: { willChange: "transform" },
|
|
674
|
+
initial: { x: -340, opacity: 0.84, scale: 0.98 },
|
|
675
|
+
animate: { x: 0, opacity: 1, scale: 1 },
|
|
676
|
+
exit: { x: -340, opacity: 0.84, scale: 0.985 },
|
|
677
|
+
transition: { type: "tween", duration: 0.26, ease: [0.22, 1, 0.36, 1] },
|
|
678
|
+
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"),
|
|
679
|
+
style: { willChange: "transform, opacity" },
|
|
691
680
|
children: [
|
|
692
681
|
/* @__PURE__ */ jsx(
|
|
693
682
|
"div",
|
|
694
683
|
{
|
|
695
684
|
"aria-hidden": "true",
|
|
696
|
-
className: "pointer-events-none absolute inset-
|
|
685
|
+
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%)]"
|
|
697
686
|
}
|
|
698
687
|
),
|
|
688
|
+
/* @__PURE__ */ 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)]" }),
|
|
699
689
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
700
690
|
/* @__PURE__ */ jsx(
|
|
701
691
|
Button,
|
|
@@ -705,7 +695,7 @@ function Sidebar({
|
|
|
705
695
|
variant: "ghost",
|
|
706
696
|
size: "sm",
|
|
707
697
|
leftIcon: /* @__PURE__ */ jsx(CloseIcon, {}),
|
|
708
|
-
className: "h-9 w-9 p-0 !gap-0
|
|
698
|
+
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)
|
|
709
699
|
}
|
|
710
700
|
),
|
|
711
701
|
/* @__PURE__ */ jsx("div", { className: "text-sm text-[var(--muted)]", children: "Men\xFA" })
|
|
@@ -1484,13 +1474,20 @@ function WorkspaceSwitcher({
|
|
|
1484
1474
|
variant = "standalone",
|
|
1485
1475
|
color = "accent"
|
|
1486
1476
|
}) {
|
|
1487
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1477
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1488
1478
|
const [open, setOpen] = useState(false);
|
|
1479
|
+
const [workspaceQuery, setWorkspaceQuery] = useState("");
|
|
1489
1480
|
const triggerRef = useRef(null);
|
|
1481
|
+
const searchRef = useRef(null);
|
|
1490
1482
|
const popoverRef = useRef(null);
|
|
1491
1483
|
const [mounted, setMounted] = useState(false);
|
|
1492
1484
|
const portalRoot = typeof document !== "undefined" ? document.body : null;
|
|
1493
|
-
const [menuPos, setMenuPos] = useState({
|
|
1485
|
+
const [menuPos, setMenuPos] = useState({
|
|
1486
|
+
top: 0,
|
|
1487
|
+
left: 0,
|
|
1488
|
+
width: 0,
|
|
1489
|
+
maxHeight: 420
|
|
1490
|
+
});
|
|
1494
1491
|
const current = useMemo(() => {
|
|
1495
1492
|
var _a2, _b2;
|
|
1496
1493
|
const list = (workspaces != null ? workspaces : []).filter((w) => !w.disabled);
|
|
@@ -1506,6 +1503,17 @@ function WorkspaceSwitcher({
|
|
|
1506
1503
|
}
|
|
1507
1504
|
return { primary: p, secondary: s };
|
|
1508
1505
|
}, [workspaces]);
|
|
1506
|
+
const normalizedWorkspaceQuery = workspaceQuery.trim().toLocaleLowerCase();
|
|
1507
|
+
const matchesWorkspaceQuery = React.useCallback(
|
|
1508
|
+
(workspace) => {
|
|
1509
|
+
if (!normalizedWorkspaceQuery) return true;
|
|
1510
|
+
return [workspace.name, workspace.subtitle, workspace.badge, workspace.initials].filter(Boolean).some((value) => String(value).toLocaleLowerCase().includes(normalizedWorkspaceQuery));
|
|
1511
|
+
},
|
|
1512
|
+
[normalizedWorkspaceQuery]
|
|
1513
|
+
);
|
|
1514
|
+
const filteredPrimary = useMemo(() => primary.filter(matchesWorkspaceQuery), [matchesWorkspaceQuery, primary]);
|
|
1515
|
+
const filteredSecondary = useMemo(() => secondary.filter(matchesWorkspaceQuery), [matchesWorkspaceQuery, secondary]);
|
|
1516
|
+
const hasFilteredWorkspaces = filteredPrimary.length > 0 || filteredSecondary.length > 0;
|
|
1509
1517
|
useEffect(() => {
|
|
1510
1518
|
if (!open) return;
|
|
1511
1519
|
const onDown = (e) => {
|
|
@@ -1528,6 +1536,17 @@ function WorkspaceSwitcher({
|
|
|
1528
1536
|
useEffect(() => {
|
|
1529
1537
|
if (collapsed) setOpen(false);
|
|
1530
1538
|
}, [collapsed]);
|
|
1539
|
+
useEffect(() => {
|
|
1540
|
+
if (!open) {
|
|
1541
|
+
setWorkspaceQuery("");
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
const id = window.setTimeout(() => {
|
|
1545
|
+
var _a2;
|
|
1546
|
+
return (_a2 = searchRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
1547
|
+
}, 40);
|
|
1548
|
+
return () => window.clearTimeout(id);
|
|
1549
|
+
}, [open]);
|
|
1531
1550
|
useEffect(() => {
|
|
1532
1551
|
setMounted(true);
|
|
1533
1552
|
}, []);
|
|
@@ -1536,21 +1555,29 @@ function WorkspaceSwitcher({
|
|
|
1536
1555
|
if (!el) return;
|
|
1537
1556
|
const r = el.getBoundingClientRect();
|
|
1538
1557
|
const viewportPad = 12;
|
|
1539
|
-
const w = Math.
|
|
1558
|
+
const w = Math.min(380, Math.max(180, window.innerWidth - viewportPad * 2));
|
|
1559
|
+
const maxPreferredHeight = Math.min(520, Math.max(120, window.innerHeight - viewportPad * 2));
|
|
1540
1560
|
if (collapsed) {
|
|
1541
1561
|
let left2 = r.right + 12;
|
|
1542
1562
|
if (left2 + w > window.innerWidth - viewportPad) left2 = Math.max(viewportPad, window.innerWidth - viewportPad - w);
|
|
1543
|
-
let
|
|
1544
|
-
const maxTop = Math.max(viewportPad, window.innerHeight - viewportPad -
|
|
1545
|
-
if (
|
|
1546
|
-
if (
|
|
1547
|
-
setMenuPos({ left: left2, top
|
|
1563
|
+
let top = r.top;
|
|
1564
|
+
const maxTop = Math.max(viewportPad, window.innerHeight - viewportPad - maxPreferredHeight);
|
|
1565
|
+
if (top > maxTop) top = maxTop;
|
|
1566
|
+
if (top < viewportPad) top = viewportPad;
|
|
1567
|
+
setMenuPos({ left: left2, top, width: w, maxHeight: maxPreferredHeight });
|
|
1548
1568
|
return;
|
|
1549
1569
|
}
|
|
1550
1570
|
let left = r.left;
|
|
1551
1571
|
if (left + w > window.innerWidth - viewportPad) left = Math.max(viewportPad, window.innerWidth - viewportPad - w);
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1572
|
+
const belowTop = r.bottom + 8;
|
|
1573
|
+
const belowSpace = Math.max(80, window.innerHeight - belowTop - viewportPad);
|
|
1574
|
+
const aboveSpace = Math.max(80, r.top - viewportPad - 8);
|
|
1575
|
+
if (belowSpace < 260 && aboveSpace > belowSpace) {
|
|
1576
|
+
const maxHeight = Math.min(maxPreferredHeight, aboveSpace);
|
|
1577
|
+
setMenuPos({ left, top: Math.max(viewportPad, r.top - 8 - maxHeight), width: w, maxHeight });
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
setMenuPos({ left, top: belowTop, width: w, maxHeight: Math.min(maxPreferredHeight, belowSpace) });
|
|
1554
1581
|
}, [collapsed]);
|
|
1555
1582
|
useLayoutEffect(() => {
|
|
1556
1583
|
if (!open) return;
|
|
@@ -1573,9 +1600,11 @@ function WorkspaceSwitcher({
|
|
|
1573
1600
|
const labelSecondary = (_c = labels == null ? void 0 : labels.secondary) != null ? _c : "Secundarios";
|
|
1574
1601
|
const labelManage = (_d = labels == null ? void 0 : labels.manage) != null ? _d : "Administrar espacios";
|
|
1575
1602
|
const labelManageHint = (_e = labels == null ? void 0 : labels.manageHint) != null ? _e : "Agrega slots para sub-empresas.";
|
|
1603
|
+
const labelSearchPlaceholder = (_f = labels == null ? void 0 : labels.searchPlaceholder) != null ? _f : "Buscar empresa o workspace...";
|
|
1604
|
+
const labelEmpty = (_g = labels == null ? void 0 : labels.empty) != null ? _g : "No hay espacios que coincidan.";
|
|
1576
1605
|
const tooltipContent = /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1577
1606
|
/* @__PURE__ */ jsx("div", { className: "truncate text-[0.75rem] font-semibold", children: current.name }),
|
|
1578
|
-
/* @__PURE__ */ jsx("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: (
|
|
1607
|
+
/* @__PURE__ */ jsx("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: (_h = current.subtitle) != null ? _h : labelTitle })
|
|
1579
1608
|
] });
|
|
1580
1609
|
const renderRow = (w) => {
|
|
1581
1610
|
var _a2, _b2, _c2;
|
|
@@ -1591,7 +1620,7 @@ function WorkspaceSwitcher({
|
|
|
1591
1620
|
},
|
|
1592
1621
|
disabled: w.disabled,
|
|
1593
1622
|
className: [
|
|
1594
|
-
"
|
|
1623
|
+
"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",
|
|
1595
1624
|
w.disabled ? "cursor-not-allowed opacity-50" : "hover:bg-[color-mix(in_oklab,var(--surface)_70%,transparent)]",
|
|
1596
1625
|
active ? "bg-[color-mix(in_oklab,var(--primary)_10%,transparent)] ring-1 ring-inset ring-[color-mix(in_oklab,var(--ring)_22%,transparent)]" : ""
|
|
1597
1626
|
].join(" "),
|
|
@@ -1604,13 +1633,14 @@ function WorkspaceSwitcher({
|
|
|
1604
1633
|
alt: w.name,
|
|
1605
1634
|
initials: (_b2 = w.initials) != null ? _b2 : computeInitials(w.name),
|
|
1606
1635
|
radiusClass: "rounded-2xl",
|
|
1607
|
-
color: (_c2 = w.color) != null ? _c2 : color
|
|
1636
|
+
color: (_c2 = w.color) != null ? _c2 : color,
|
|
1637
|
+
className: "shrink-0"
|
|
1608
1638
|
}
|
|
1609
1639
|
),
|
|
1610
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1611
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1612
|
-
/* @__PURE__ */ jsx("div", { className: "min-w-0
|
|
1613
|
-
w.badge ? /* @__PURE__ */ 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
|
|
1640
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
1641
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1642
|
+
/* @__PURE__ */ 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 }),
|
|
1643
|
+
w.badge ? /* @__PURE__ */ 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
|
|
1614
1644
|
] }),
|
|
1615
1645
|
w.subtitle ? /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: w.subtitle }) : null
|
|
1616
1646
|
] }),
|
|
@@ -1635,7 +1665,8 @@ function WorkspaceSwitcher({
|
|
|
1635
1665
|
"aria-expanded": open,
|
|
1636
1666
|
title: void 0,
|
|
1637
1667
|
className: [
|
|
1638
|
-
"group
|
|
1668
|
+
"group w-full min-w-0 items-center gap-3 rounded-2xl",
|
|
1669
|
+
collapsed ? "flex" : "grid grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1639
1670
|
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)]",
|
|
1640
1671
|
collapsed ? "justify-center p-2" : "px-2.5 py-2",
|
|
1641
1672
|
"active:scale-[0.99]"
|
|
@@ -1645,20 +1676,21 @@ function WorkspaceSwitcher({
|
|
|
1645
1676
|
AvatarSquare,
|
|
1646
1677
|
{
|
|
1647
1678
|
size: collapsed ? 44 : 34,
|
|
1648
|
-
src: (
|
|
1679
|
+
src: (_i = current.avatarUrl) != null ? _i : void 0,
|
|
1649
1680
|
alt: current.name,
|
|
1650
|
-
initials: (
|
|
1681
|
+
initials: (_j = current.initials) != null ? _j : computeInitials(current.name),
|
|
1651
1682
|
radiusClass: collapsed ? "rounded-2xl" : "rounded-2xl",
|
|
1652
|
-
color: (
|
|
1683
|
+
color: (_k = current.color) != null ? _k : color,
|
|
1684
|
+
className: "shrink-0"
|
|
1653
1685
|
}
|
|
1654
1686
|
),
|
|
1655
1687
|
!collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1656
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1657
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1658
|
-
/* @__PURE__ */ jsx("div", { className: "min-w-0
|
|
1659
|
-
current.badge ? /* @__PURE__ */ 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
|
|
1688
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
1689
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1690
|
+
/* @__PURE__ */ 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 }),
|
|
1691
|
+
current.badge ? /* @__PURE__ */ 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
|
|
1660
1692
|
] }),
|
|
1661
|
-
/* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: (
|
|
1693
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--muted)] text-left", children: (_l = current.subtitle) != null ? _l : labelTitle })
|
|
1662
1694
|
] }),
|
|
1663
1695
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 text-[var(--muted)] group-hover:text-[var(--foreground)]", children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: `transition-transform ${open ? "rotate-180" : ""}`, "aria-hidden": true }) })
|
|
1664
1696
|
] })
|
|
@@ -1676,23 +1708,37 @@ function WorkspaceSwitcher({
|
|
|
1676
1708
|
exit: { opacity: 0, y: 6, scale: 0.985 },
|
|
1677
1709
|
transition: { duration: 0.14, ease: "easeOut" },
|
|
1678
1710
|
className: [
|
|
1679
|
-
"fixed z-50 overflow-hidden rounded-3xl border border-[var(--border)] bg-[var(--card)] shadow-2xl",
|
|
1711
|
+
"fixed z-50 flex flex-col overflow-hidden rounded-3xl border border-[var(--border)] bg-[var(--card)] shadow-2xl",
|
|
1680
1712
|
mobile ? "max-w-[18rem]" : ""
|
|
1681
1713
|
].join(" "),
|
|
1682
|
-
style: { top: menuPos.top, left: menuPos.left, width: menuPos.width },
|
|
1714
|
+
style: { top: menuPos.top, left: menuPos.left, width: menuPos.width, maxHeight: menuPos.maxHeight },
|
|
1683
1715
|
children: [
|
|
1684
|
-
/* @__PURE__ */ jsx("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-wider text-[var(--muted)]", children: labelTitle }) }),
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
|
|
1716
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-3 py-2", children: /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-wider text-[var(--muted)]", children: labelTitle }) }),
|
|
1717
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-3 pb-2", children: /* @__PURE__ */ jsx(
|
|
1718
|
+
Input,
|
|
1719
|
+
{
|
|
1720
|
+
ref: searchRef,
|
|
1721
|
+
type: "search",
|
|
1722
|
+
value: workspaceQuery,
|
|
1723
|
+
onChange: (event) => setWorkspaceQuery(event.currentTarget.value),
|
|
1724
|
+
placeholder: labelSearchPlaceholder,
|
|
1725
|
+
leftSlot: /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "size-4", "aria-hidden": true }),
|
|
1726
|
+
clearable: true,
|
|
1727
|
+
onClear: () => setWorkspaceQuery(""),
|
|
1728
|
+
className: "h-9 rounded-2xl py-2 text-xs shadow-none"
|
|
1729
|
+
}
|
|
1730
|
+
) }),
|
|
1731
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-2 pb-2 [scrollbar-width:thin]", children: hasFilteredWorkspaces ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1732
|
+
filteredPrimary.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1687
1733
|
/* @__PURE__ */ jsx("div", { className: "px-2 pb-1 pt-1 text-[0.6875rem] font-semibold uppercase tracking-wider text-slate-400", children: labelPrimary }),
|
|
1688
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1", children:
|
|
1734
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: filteredPrimary.map(renderRow) })
|
|
1689
1735
|
] }) : null,
|
|
1690
|
-
|
|
1736
|
+
filteredSecondary.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1691
1737
|
/* @__PURE__ */ jsx("div", { className: "mt-3 px-2 pb-1 pt-1 text-[0.6875rem] font-semibold uppercase tracking-wider text-slate-400", children: labelSecondary }),
|
|
1692
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1", children:
|
|
1738
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: filteredSecondary.map(renderRow) })
|
|
1693
1739
|
] }) : null
|
|
1694
|
-
] }),
|
|
1695
|
-
onManageWorkspaces ? /* @__PURE__ */ jsx("div", { className: "border-t border-[var(--border)] px-2 py-2", children: /* @__PURE__ */ jsxs(
|
|
1740
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "px-3 py-8 text-center text-sm text-[var(--muted)]", children: labelEmpty }) }),
|
|
1741
|
+
onManageWorkspaces ? /* @__PURE__ */ jsx("div", { className: "shrink-0 border-t border-[var(--border)] px-2 py-2", children: /* @__PURE__ */ jsxs(
|
|
1696
1742
|
Button,
|
|
1697
1743
|
{
|
|
1698
1744
|
unstyled: true,
|
|
@@ -1701,13 +1747,13 @@ function WorkspaceSwitcher({
|
|
|
1701
1747
|
setOpen(false);
|
|
1702
1748
|
onManageWorkspaces();
|
|
1703
1749
|
},
|
|
1704
|
-
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)]",
|
|
1750
|
+
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)]",
|
|
1705
1751
|
children: [
|
|
1706
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1707
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-[var(--foreground)]", children: labelManage }),
|
|
1708
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-[var(--muted)]", children: labelManageHint })
|
|
1752
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 overflow-hidden", children: [
|
|
1753
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-semibold text-[var(--foreground)]", children: labelManage }),
|
|
1754
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--muted)]", children: labelManageHint })
|
|
1709
1755
|
] }),
|
|
1710
|
-
/* @__PURE__ */ jsx(PlusIcon, { className: "text-[var(--muted)]", "aria-hidden": true })
|
|
1756
|
+
/* @__PURE__ */ jsx(PlusIcon, { className: "shrink-0 text-[var(--muted)]", "aria-hidden": true })
|
|
1711
1757
|
]
|
|
1712
1758
|
}
|
|
1713
1759
|
) }) : null
|
|
@@ -1836,84 +1882,129 @@ function SidebarInner({
|
|
|
1836
1882
|
const skShowTopPanel = (_c = skeleton == null ? void 0 : skeleton.showTopPanel) != null ? _c : true;
|
|
1837
1883
|
const skShowFooter = (_d = skeleton == null ? void 0 : skeleton.showFooter) != null ? _d : true;
|
|
1838
1884
|
const hasQuickActions = Boolean(quickActions == null ? void 0 : quickActions.length);
|
|
1839
|
-
const
|
|
1885
|
+
const topPanelClass = cx("overflow-hidden rounded-[1.4rem]", TOP_PANEL_SURFACE);
|
|
1886
|
+
const calmFadeEase = [0.22, 1, 0.36, 1];
|
|
1887
|
+
const calmFadeTransition = { duration: 0.26, ease: calmFadeEase };
|
|
1888
|
+
const calmFadeInitial = { opacity: 0, y: 4, filter: "blur(6px)" };
|
|
1889
|
+
const calmFadeAnimate = { opacity: 1, y: 0, filter: "blur(0px)" };
|
|
1890
|
+
const calmFadeExit = { opacity: 0, y: 2, filter: "blur(6px)" };
|
|
1891
|
+
const QuickIcon = ({ children }) => /* @__PURE__ */ 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__ */ jsx("span", { className: "text-[var(--foreground)]", children }) });
|
|
1840
1892
|
const QuickActionsSection = () => {
|
|
1841
1893
|
if (!hasQuickActions) return null;
|
|
1842
|
-
return /* @__PURE__ */ jsxs(
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
collapsed ? "justify-center" : ""
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
{
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1894
|
+
return /* @__PURE__ */ jsxs(
|
|
1895
|
+
motion.div,
|
|
1896
|
+
{
|
|
1897
|
+
className: "pt-5",
|
|
1898
|
+
initial: calmFadeInitial,
|
|
1899
|
+
animate: calmFadeAnimate,
|
|
1900
|
+
transition: calmFadeTransition,
|
|
1901
|
+
children: [
|
|
1902
|
+
/* @__PURE__ */ jsx("div", { className: ["flex items-center justify-between gap-2 px-2", collapsed ? "justify-center" : ""].join(" "), children: !collapsed ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1903
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-[0.18em] text-[var(--muted)]", children: quickActionsTitle != null ? quickActionsTitle : "Accesos r\xE1pidos" }),
|
|
1904
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_72%,transparent),transparent)]" })
|
|
1905
|
+
] }) : null }),
|
|
1906
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: (quickActions != null ? quickActions : []).map((a, index) => {
|
|
1907
|
+
var _a2;
|
|
1908
|
+
const disabled = Boolean(a.disabled);
|
|
1909
|
+
const base = [
|
|
1910
|
+
"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]",
|
|
1911
|
+
disabled ? "opacity-60 cursor-not-allowed" : ITEM_IDLE,
|
|
1912
|
+
collapsed ? "justify-center" : ""
|
|
1913
|
+
].join(" ");
|
|
1914
|
+
const button = /* @__PURE__ */ jsxs(
|
|
1915
|
+
Button,
|
|
1916
|
+
{
|
|
1917
|
+
unstyled: true,
|
|
1918
|
+
type: "button",
|
|
1919
|
+
onClick: () => {
|
|
1920
|
+
if (disabled) return;
|
|
1921
|
+
onQuickAction == null ? void 0 : onQuickAction(a);
|
|
1922
|
+
},
|
|
1923
|
+
className: base,
|
|
1924
|
+
title: void 0,
|
|
1925
|
+
children: [
|
|
1926
|
+
/* @__PURE__ */ jsx(QuickIcon, { children: (_a2 = a.icon) != null ? _a2 : /* @__PURE__ */ jsx(PlusIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
1927
|
+
!collapsed ? /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1928
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-[0.9375rem] font-medium text-[var(--foreground)]", children: a.label }),
|
|
1929
|
+
a.description ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-xs text-[var(--muted)] text-left", children: a.description }) : null
|
|
1930
|
+
] }) : null,
|
|
1931
|
+
!collapsed && a.badge ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: a.badge }) : null
|
|
1932
|
+
]
|
|
1933
|
+
}
|
|
1934
|
+
);
|
|
1935
|
+
if (!collapsed) {
|
|
1936
|
+
return /* @__PURE__ */ jsx(
|
|
1937
|
+
motion.div,
|
|
1938
|
+
{
|
|
1939
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1940
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1941
|
+
transition: { duration: 0.22, delay: index * 0.025, ease: calmFadeEase },
|
|
1942
|
+
children: button
|
|
1943
|
+
},
|
|
1944
|
+
a.id
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
return /* @__PURE__ */ jsx(
|
|
1948
|
+
Tooltip,
|
|
1949
|
+
{
|
|
1950
|
+
content: /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1951
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-[0.75rem] font-semibold", children: a.label }),
|
|
1952
|
+
a.description ? /* @__PURE__ */ jsx("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: a.description }) : null
|
|
1953
|
+
] }),
|
|
1954
|
+
placement: "right",
|
|
1955
|
+
offset: 12,
|
|
1956
|
+
children: /* @__PURE__ */ jsx(
|
|
1957
|
+
motion.div,
|
|
1958
|
+
{
|
|
1959
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1960
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1961
|
+
transition: { duration: 0.2, delay: index * 0.025, ease: calmFadeEase },
|
|
1962
|
+
children: button
|
|
1963
|
+
}
|
|
1964
|
+
)
|
|
1965
|
+
},
|
|
1966
|
+
a.id
|
|
1967
|
+
);
|
|
1968
|
+
}) })
|
|
1969
|
+
]
|
|
1970
|
+
}
|
|
1971
|
+
);
|
|
1889
1972
|
};
|
|
1890
1973
|
const showNavTools = Boolean(navEditable && onNavConfigure);
|
|
1891
1974
|
const showQuickTools = Boolean(quickActionsEditable && onQuickActionsConfigure);
|
|
1892
1975
|
const showSidebarTools = showNavTools || showQuickTools;
|
|
1893
1976
|
const showCollapseToggle = !mobile && typeof toggleCollapsed === "function";
|
|
1894
1977
|
const renderCollapseToggle = (opts) => {
|
|
1895
|
-
var _a2;
|
|
1896
1978
|
if (!showCollapseToggle) return null;
|
|
1897
1979
|
if (loading) return /* @__PURE__ */ jsx("div", { className: "fx-skeleton shrink-0", style: { width: 40, height: 40, borderRadius: 16 } });
|
|
1898
|
-
|
|
1899
|
-
return /* @__PURE__ */ jsx(Tooltip, { content: collapsed ? "Expandir barra lateral" : "Contraer barra lateral", placement: "right", offset: 10, children: /* @__PURE__ */ jsx(
|
|
1980
|
+
return /* @__PURE__ */ jsx(motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: /* @__PURE__ */ jsx(Tooltip, { content: collapsed ? "Expandir barra lateral" : "Contraer barra lateral", placement: "right", offset: 10, children: /* @__PURE__ */ jsx(
|
|
1900
1981
|
Button,
|
|
1901
1982
|
{
|
|
1983
|
+
unstyled: true,
|
|
1902
1984
|
noPaddingX: true,
|
|
1903
1985
|
"aria-label": collapsed ? "Expandir barra lateral" : "Contraer barra lateral",
|
|
1904
1986
|
onClick: toggleCollapsed,
|
|
1905
|
-
variant: "ghost",
|
|
1906
|
-
size: "sm",
|
|
1907
|
-
leftIcon: collapsed ? /* @__PURE__ */ jsx(CaretLineRightIcon, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ jsx(CaretLineLeftIcon, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1908
1987
|
className: cx(
|
|
1909
|
-
"
|
|
1910
|
-
|
|
1911
|
-
"
|
|
1912
|
-
|
|
1988
|
+
"inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-visible rounded-[1.1rem] p-0 transition-all duration-300",
|
|
1989
|
+
"border border-[color-mix(in_oklab,var(--border)_82%,transparent)]",
|
|
1990
|
+
"bg-[color-mix(in_oklab,var(--card)_96%,var(--surface))] text-[var(--foreground)]",
|
|
1991
|
+
"backdrop-blur-sm",
|
|
1992
|
+
"shadow-[0_14px_30px_-24px_color-mix(in_oklab,var(--foreground)_38%,transparent)]",
|
|
1993
|
+
"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)]",
|
|
1994
|
+
"active:translate-y-0 active:scale-95"
|
|
1913
1995
|
),
|
|
1914
|
-
title: void 0
|
|
1996
|
+
title: void 0,
|
|
1997
|
+
children: /* @__PURE__ */ jsx(
|
|
1998
|
+
motion.span,
|
|
1999
|
+
{
|
|
2000
|
+
className: "grid place-items-center text-[color-mix(in_oklab,var(--foreground)_92%,var(--muted))]",
|
|
2001
|
+
animate: { x: collapsed ? 0.5 : -0.5, scale: collapsed ? 0.98 : 1 },
|
|
2002
|
+
transition: { type: "spring", stiffness: 420, damping: 30 },
|
|
2003
|
+
children: collapsed ? /* @__PURE__ */ jsx(CaretLineRightIcon, { className: "h-[1.1rem] w-[1.1rem]", "aria-hidden": true }) : /* @__PURE__ */ jsx(CaretLineLeftIcon, { className: "h-[1.1rem] w-[1.1rem]", "aria-hidden": true })
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
1915
2006
|
}
|
|
1916
|
-
) });
|
|
2007
|
+
) }) });
|
|
1917
2008
|
};
|
|
1918
2009
|
const SidebarTools = ({ condensed }) => {
|
|
1919
2010
|
if (!showSidebarTools) return null;
|
|
@@ -1959,9 +2050,9 @@ function SidebarInner({
|
|
|
1959
2050
|
}, []);
|
|
1960
2051
|
if (!condensedMode) {
|
|
1961
2052
|
const btnClass = cx(
|
|
1962
|
-
"h-9 w-9 rounded-
|
|
1963
|
-
|
|
1964
|
-
"hover:
|
|
2053
|
+
"h-9 w-9 rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
2054
|
+
SOFT_BUTTON_SURFACE,
|
|
2055
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
1965
2056
|
);
|
|
1966
2057
|
return /* @__PURE__ */ jsxs("div", { className: cx("flex items-center gap-2"), children: [
|
|
1967
2058
|
showNavTools ? /* @__PURE__ */ jsx(Tooltip, { content: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar", placement: "bottom", offset: 12, children: /* @__PURE__ */ jsx(
|
|
@@ -1995,9 +2086,9 @@ function SidebarInner({
|
|
|
1995
2086
|
] });
|
|
1996
2087
|
}
|
|
1997
2088
|
const iconBtnClass = cx(
|
|
1998
|
-
"grid place-items-center
|
|
1999
|
-
|
|
2000
|
-
"hover:
|
|
2089
|
+
"grid h-9 w-9 place-items-center rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
2090
|
+
SOFT_BUTTON_SURFACE,
|
|
2091
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
2001
2092
|
);
|
|
2002
2093
|
const menuItemClass = cx(
|
|
2003
2094
|
"w-full flex items-center gap-3 rounded-2xl px-3 py-2 text-left text-sm",
|
|
@@ -2012,7 +2103,7 @@ function SidebarInner({
|
|
|
2012
2103
|
className: "fixed z-[200] w-[240px]",
|
|
2013
2104
|
role: "menu",
|
|
2014
2105
|
"aria-label": "Opciones del sidebar",
|
|
2015
|
-
children: /* @__PURE__ */ jsx("div", { className: "rounded-3xl
|
|
2106
|
+
children: /* @__PURE__ */ jsx("div", { className: cx("overflow-hidden rounded-3xl", TOP_PANEL_SURFACE, "bg-[var(--card)] shadow-xl backdrop-blur-xl"), children: /* @__PURE__ */ jsxs("div", { className: "p-1.5", children: [
|
|
2016
2107
|
showNavTools ? /* @__PURE__ */ jsxs(
|
|
2017
2108
|
"button",
|
|
2018
2109
|
{
|
|
@@ -2024,7 +2115,7 @@ function SidebarInner({
|
|
|
2024
2115
|
onNavConfigure == null ? void 0 : onNavConfigure();
|
|
2025
2116
|
},
|
|
2026
2117
|
children: [
|
|
2027
|
-
/* @__PURE__ */ jsx("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2118
|
+
/* @__PURE__ */ jsx("span", { className: cx("grid h-9 w-9 place-items-center rounded-2xl", SOFT_BUTTON_SURFACE), children: /* @__PURE__ */ jsx(PencilIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
2028
2119
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
2029
2120
|
/* @__PURE__ */ jsx("span", { className: "block font-semibold text-[var(--foreground)]", children: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar" }),
|
|
2030
2121
|
/* @__PURE__ */ jsx("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ordena y ajusta la navegaci\xF3n" })
|
|
@@ -2043,7 +2134,7 @@ function SidebarInner({
|
|
|
2043
2134
|
onQuickActionsConfigure == null ? void 0 : onQuickActionsConfigure();
|
|
2044
2135
|
},
|
|
2045
2136
|
children: [
|
|
2046
|
-
/* @__PURE__ */ jsx("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2137
|
+
/* @__PURE__ */ jsx("span", { className: cx("grid h-9 w-9 place-items-center rounded-2xl", SOFT_BUTTON_SURFACE), children: /* @__PURE__ */ jsx(ListStarIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
2047
2138
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
2048
2139
|
/* @__PURE__ */ jsx("span", { className: "block font-semibold text-[var(--foreground)]", children: "Accesos r\xE1pidos" }),
|
|
2049
2140
|
/* @__PURE__ */ jsx("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ancla tus acciones favoritas" })
|
|
@@ -2079,7 +2170,7 @@ function SidebarInner({
|
|
|
2079
2170
|
] });
|
|
2080
2171
|
};
|
|
2081
2172
|
return /* @__PURE__ */ jsxs("div", { className: ["flex h-full flex-col", loading ? "pointer-events-none select-none" : ""].join(" "), "aria-busy": loading ? "true" : void 0, children: [
|
|
2082
|
-
/* @__PURE__ */ jsx("div", { className: collapsed ? "px-
|
|
2173
|
+
/* @__PURE__ */ jsx("div", { className: collapsed ? "px-3 pt-4" : "px-5 pt-5", children: loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2083
2174
|
/* @__PURE__ */ jsxs("div", { className: ["flex min-w-0 flex-1 items-center gap-3", collapsed ? "justify-center" : ""].join(" "), children: [
|
|
2084
2175
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: collapsed ? 44 : 40, height: collapsed ? 44 : 40, borderRadius: 16 } }),
|
|
2085
2176
|
!collapsed ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -2088,60 +2179,77 @@ function SidebarInner({
|
|
|
2088
2179
|
] }) : null
|
|
2089
2180
|
] }),
|
|
2090
2181
|
renderCollapseToggle()
|
|
2091
|
-
] }) : showBrand ? /* @__PURE__ */ jsxs(
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2182
|
+
] }) : showBrand ? /* @__PURE__ */ jsxs(
|
|
2183
|
+
motion.div,
|
|
2184
|
+
{
|
|
2185
|
+
layout: true,
|
|
2186
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2187
|
+
className: "relative flex items-center gap-2",
|
|
2188
|
+
children: [
|
|
2189
|
+
/* @__PURE__ */ jsxs(
|
|
2190
|
+
Button,
|
|
2191
|
+
{
|
|
2192
|
+
unstyled: true,
|
|
2193
|
+
type: "button",
|
|
2194
|
+
onClick: onBrandClick,
|
|
2195
|
+
className: cx(
|
|
2196
|
+
"flex items-center gap-3",
|
|
2197
|
+
"min-w-0 flex-1 justify-start py-2",
|
|
2198
|
+
collapsed ? "px-1" : "px-2"
|
|
2199
|
+
),
|
|
2200
|
+
title: "Ir al inicio",
|
|
2201
|
+
children: [
|
|
2202
|
+
/* @__PURE__ */ jsx(
|
|
2203
|
+
motion.div,
|
|
2112
2204
|
{
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2205
|
+
layout: "size",
|
|
2206
|
+
transition: { type: "spring", stiffness: 520, damping: 46, mass: 0.9 },
|
|
2207
|
+
className: "shrink-0",
|
|
2208
|
+
children: /* @__PURE__ */ jsx(
|
|
2209
|
+
AvatarSquare,
|
|
2210
|
+
{
|
|
2211
|
+
size: collapsed ? 44 : 40,
|
|
2212
|
+
src: brandLogoSrc != null ? brandLogoSrc : void 0,
|
|
2213
|
+
alt: brandTitle,
|
|
2214
|
+
initials: brandInitials,
|
|
2215
|
+
imageFit: brandLogoSrc ? "contain" : "cover",
|
|
2216
|
+
radiusClass: "rounded-2xl",
|
|
2217
|
+
color,
|
|
2218
|
+
className: "ring-0"
|
|
2219
|
+
}
|
|
2220
|
+
)
|
|
2121
2221
|
}
|
|
2122
|
-
)
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2222
|
+
),
|
|
2223
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed && /* @__PURE__ */ jsxs(
|
|
2224
|
+
motion.div,
|
|
2225
|
+
{
|
|
2226
|
+
initial: calmFadeInitial,
|
|
2227
|
+
animate: calmFadeAnimate,
|
|
2228
|
+
exit: calmFadeExit,
|
|
2229
|
+
transition: calmFadeTransition,
|
|
2230
|
+
className: "leading-tight",
|
|
2231
|
+
children: [
|
|
2232
|
+
/* @__PURE__ */ jsx("div", { className: "text-lg font-semibold tracking-tight text-left", children: brandTitle }),
|
|
2233
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] uppercase tracking-wide text-[var(--muted)] text-left", children: brandSubtitle })
|
|
2234
|
+
]
|
|
2235
|
+
},
|
|
2236
|
+
"brand-meta"
|
|
2237
|
+
) })
|
|
2238
|
+
]
|
|
2239
|
+
}
|
|
2240
|
+
),
|
|
2241
|
+
/* @__PURE__ */ jsx(
|
|
2242
|
+
motion.div,
|
|
2243
|
+
{
|
|
2244
|
+
layout: true,
|
|
2245
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2246
|
+
className: "shrink-0 self-start",
|
|
2247
|
+
children: renderCollapseToggle({ size: collapsed ? "sm" : "md" })
|
|
2248
|
+
}
|
|
2249
|
+
)
|
|
2250
|
+
]
|
|
2251
|
+
}
|
|
2252
|
+
) : hasWorkspace ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2145
2253
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2146
2254
|
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx(
|
|
2147
2255
|
WorkspaceSwitcher,
|
|
@@ -2164,7 +2272,7 @@ function SidebarInner({
|
|
|
2164
2272
|
/* @__PURE__ */ jsx("div", { className: ["min-w-0 flex-1 text-sm font-semibold text-[var(--muted)]", collapsed ? "text-center" : ""].join(" "), children: "Navegaci\xF3n" }),
|
|
2165
2273
|
renderCollapseToggle()
|
|
2166
2274
|
] }) }),
|
|
2167
|
-
showTopPanel || loading && skShowTopPanel ? /* @__PURE__ */ jsx("div", { className: cx("mt-
|
|
2275
|
+
showTopPanel || loading && skShowTopPanel ? /* @__PURE__ */ jsx("div", { className: cx("mt-4", collapsed ? "px-4" : "px-5"), children: loading ? /* @__PURE__ */ jsx("div", { className: collapsed ? cx("rounded-3xl p-2", TOP_PANEL_SURFACE) : topPanelClass, children: collapsed ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
2168
2276
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: 44, height: 44, borderRadius: 16 } }),
|
|
2169
2277
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: 56, height: 12, borderRadius: 10 } })
|
|
2170
2278
|
] }) : /* @__PURE__ */ jsxs("div", { className: "px-2 py-2", children: [
|
|
@@ -2184,7 +2292,7 @@ function SidebarInner({
|
|
|
2184
2292
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: "66%", height: 10, borderRadius: 10, opacity: 0.9 } })
|
|
2185
2293
|
] })
|
|
2186
2294
|
] }) })
|
|
2187
|
-
] }) }) : collapsed ? /* @__PURE__ */ jsx("div", { className: "rounded-3xl
|
|
2295
|
+
] }) }) : collapsed ? /* @__PURE__ */ jsx("div", { className: cx("rounded-3xl p-1.5", TOP_PANEL_SURFACE), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
2188
2296
|
showWorkspaceInTopPanel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2189
2297
|
/* @__PURE__ */ jsx(
|
|
2190
2298
|
WorkspaceSwitcher,
|
|
@@ -2217,8 +2325,8 @@ function SidebarInner({
|
|
|
2217
2325
|
userMenuSlot ? /* @__PURE__ */ jsx("div", { children: userMenuSlot }) : null
|
|
2218
2326
|
] }) : null,
|
|
2219
2327
|
sidebarSlotCollapsed ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: sidebarSlotCollapsed }) : null
|
|
2220
|
-
] }) }) : /* @__PURE__ */ jsxs("div", { className:
|
|
2221
|
-
showWorkspaceInTopPanel ? /* @__PURE__ */ jsxs("div", { className: "px-3 py-3", children: [
|
|
2328
|
+
] }) }) : /* @__PURE__ */ jsxs("div", { className: topPanelClass, children: [
|
|
2329
|
+
showWorkspaceInTopPanel ? /* @__PURE__ */ jsxs("div", { className: "min-w-0 overflow-hidden px-3 py-3", children: [
|
|
2222
2330
|
/* @__PURE__ */ jsx(
|
|
2223
2331
|
WorkspaceSwitcher,
|
|
2224
2332
|
{
|
|
@@ -2232,10 +2340,10 @@ function SidebarInner({
|
|
|
2232
2340
|
color
|
|
2233
2341
|
}
|
|
2234
2342
|
),
|
|
2235
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2.5
|
|
2343
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2.5 border-t border-[color-mix(in_oklab,var(--border)_58%,transparent)] pt-2.5", children: /* @__PURE__ */ jsx(SidebarTools, {}) })
|
|
2236
2344
|
] }) : null,
|
|
2237
|
-
showWorkspaceInTopPanel ? /* @__PURE__ */ jsx("div", { className: "h-px bg-[var(--border)]
|
|
2238
|
-
showUser ? /* @__PURE__ */ jsx("div", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3.5 rounded-2xl px-
|
|
2345
|
+
showWorkspaceInTopPanel ? /* @__PURE__ */ jsx("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }) : null,
|
|
2346
|
+
showUser ? /* @__PURE__ */ jsx("div", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3.5 rounded-2xl px-1 py-1", children: [
|
|
2239
2347
|
/* @__PURE__ */ jsx(
|
|
2240
2348
|
AvatarSquare,
|
|
2241
2349
|
{
|
|
@@ -2254,7 +2362,7 @@ function SidebarInner({
|
|
|
2254
2362
|
userMenuSlot ? /* @__PURE__ */ jsx("div", { className: "ml-auto", children: userMenuSlot }) : null
|
|
2255
2363
|
] }) }) : null,
|
|
2256
2364
|
sidebarSlot ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2257
|
-
/* @__PURE__ */ jsx("div", { className: "h-px bg-[var(--border)]
|
|
2365
|
+
/* @__PURE__ */ jsx("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }),
|
|
2258
2366
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-3", children: sidebarSlot })
|
|
2259
2367
|
] }) : null
|
|
2260
2368
|
] }) }) : null,
|
|
@@ -2263,8 +2371,8 @@ function SidebarInner({
|
|
|
2263
2371
|
{
|
|
2264
2372
|
ref: navRef,
|
|
2265
2373
|
className: cx(
|
|
2266
|
-
"mt-
|
|
2267
|
-
|
|
2374
|
+
"mt-5 flex-1 space-y-6 overflow-y-auto overflow-x-hidden py-2",
|
|
2375
|
+
"px-5"
|
|
2268
2376
|
),
|
|
2269
2377
|
children: loading ? /* @__PURE__ */ jsx("div", { className: "space-y-7", children: Array.from({ length: skGroups }).map((_, g) => /* @__PURE__ */ jsxs("div", { children: [
|
|
2270
2378
|
!collapsed ? /* @__PURE__ */ jsx("div", { className: "mb-3 px-1", children: /* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: g % 2 === 0 ? "6.5rem" : "7.5rem", height: 10, borderRadius: 10 } }) }) : null,
|
|
@@ -2290,30 +2398,49 @@ function SidebarInner({
|
|
|
2290
2398
|
});
|
|
2291
2399
|
return visibles.length > 0;
|
|
2292
2400
|
})) == null ? void 0 : _a2[0]) != null ? _b2 : null;
|
|
2293
|
-
const renderedGroups = groups.map(([groupName, items]) => {
|
|
2401
|
+
const renderedGroups = groups.map(([groupName, items], groupIndex) => {
|
|
2294
2402
|
const visibles = items.filter((i) => {
|
|
2295
2403
|
var _a3;
|
|
2296
2404
|
return ((_a3 = i.children) == null ? void 0 : _a3.length) ? i.children.some((c) => c) : true;
|
|
2297
2405
|
});
|
|
2298
2406
|
if (visibles.length === 0) return null;
|
|
2299
|
-
return /* @__PURE__ */ jsxs(
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2407
|
+
return /* @__PURE__ */ jsxs(
|
|
2408
|
+
motion.div,
|
|
2409
|
+
{
|
|
2410
|
+
layout: true,
|
|
2411
|
+
initial: calmFadeInitial,
|
|
2412
|
+
animate: calmFadeAnimate,
|
|
2413
|
+
transition: { duration: 0.24, delay: groupIndex * 0.03, ease: calmFadeEase },
|
|
2414
|
+
children: [
|
|
2415
|
+
!collapsed ? /* @__PURE__ */ jsx(GroupHeader, { title: groupName }) : null,
|
|
2416
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: visibles.map((item, itemIndex) => /* @__PURE__ */ jsx(
|
|
2417
|
+
motion.div,
|
|
2418
|
+
{
|
|
2419
|
+
layout: true,
|
|
2420
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
2421
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2422
|
+
transition: { duration: 0.2, delay: itemIndex * 0.02, ease: calmFadeEase },
|
|
2423
|
+
children: /* @__PURE__ */ jsx(
|
|
2424
|
+
RenderItem,
|
|
2425
|
+
{
|
|
2426
|
+
item,
|
|
2427
|
+
collapsed: collapsed != null ? collapsed : false,
|
|
2428
|
+
activeKey,
|
|
2429
|
+
go,
|
|
2430
|
+
color
|
|
2431
|
+
}
|
|
2432
|
+
)
|
|
2433
|
+
},
|
|
2434
|
+
item.key
|
|
2435
|
+
)) }),
|
|
2436
|
+
!inserted && quick && firstGroupNameWithItems === groupName ? /* @__PURE__ */ jsx(React.Fragment, { children: (() => {
|
|
2437
|
+
inserted = true;
|
|
2438
|
+
return quick;
|
|
2439
|
+
})() }) : null
|
|
2440
|
+
]
|
|
2441
|
+
},
|
|
2442
|
+
groupName
|
|
2443
|
+
);
|
|
2317
2444
|
});
|
|
2318
2445
|
if (!inserted && quick) {
|
|
2319
2446
|
renderedGroups.push(
|
|
@@ -2338,7 +2465,9 @@ function RenderItem({
|
|
|
2338
2465
|
const Icon = (_a = item.icon) != null ? _a : (() => null);
|
|
2339
2466
|
const hasChildren = !!((_b = item.children) == null ? void 0 : _b.length);
|
|
2340
2467
|
const children = ((_c = item.children) != null ? _c : []).filter(Boolean);
|
|
2341
|
-
const
|
|
2468
|
+
const isDirectActive = item.key === activeKey;
|
|
2469
|
+
const hasActiveChild = hasChildren && children.some((ch) => ch.key === activeKey);
|
|
2470
|
+
const isActive = isDirectActive || hasActiveChild;
|
|
2342
2471
|
const [open, setOpen] = useState(false);
|
|
2343
2472
|
useEffect(() => {
|
|
2344
2473
|
if (!hasChildren) return;
|
|
@@ -2362,46 +2491,23 @@ function RenderItem({
|
|
|
2362
2491
|
} catch {
|
|
2363
2492
|
}
|
|
2364
2493
|
}, [hasChildren, open, item.key]);
|
|
2365
|
-
if (hasChildren && collapsed) {
|
|
2366
|
-
return /* @__PURE__ */ jsx(Tooltip, { content: item.label, placement: "right", offset: 12, children: /* @__PURE__ */ jsx(
|
|
2367
|
-
Button,
|
|
2368
|
-
{
|
|
2369
|
-
unstyled: true,
|
|
2370
|
-
type: "button",
|
|
2371
|
-
onClick: () => go(item.key),
|
|
2372
|
-
title: void 0,
|
|
2373
|
-
"data-fx-sidebar-key": item.key,
|
|
2374
|
-
className: [
|
|
2375
|
-
"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]",
|
|
2376
|
-
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : "text-[var(--foreground)] hover:bg-[color-mix(in_oklab,var(--surface)_65%,transparent)]"
|
|
2377
|
-
].join(" "),
|
|
2378
|
-
children: /* @__PURE__ */ jsx(
|
|
2379
|
-
"span",
|
|
2380
|
-
{
|
|
2381
|
-
className: [
|
|
2382
|
-
"grid h-10 w-10 place-items-center rounded-2xl border transition",
|
|
2383
|
-
isActive ? `${ICON_BORDER_ACTIVE[color]} bg-[var(--card)] shadow-sm` : "border-[var(--border)] bg-[var(--card)] shadow-sm"
|
|
2384
|
-
].join(" "),
|
|
2385
|
-
children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5" })
|
|
2386
|
-
}
|
|
2387
|
-
)
|
|
2388
|
-
}
|
|
2389
|
-
) });
|
|
2390
|
-
}
|
|
2391
2494
|
if (hasChildren) {
|
|
2392
|
-
|
|
2495
|
+
const content = /* @__PURE__ */ jsxs(motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: [
|
|
2393
2496
|
/* @__PURE__ */ jsxs(
|
|
2394
|
-
|
|
2497
|
+
motion.div,
|
|
2395
2498
|
{
|
|
2499
|
+
layout: true,
|
|
2500
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2396
2501
|
className: [
|
|
2397
|
-
"relative flex w-full min-w-0 items-center rounded-
|
|
2398
|
-
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` :
|
|
2502
|
+
"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]",
|
|
2503
|
+
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2399
2504
|
].join(" "),
|
|
2400
2505
|
children: [
|
|
2506
|
+
!collapsed && isActive ? /* @__PURE__ */ jsx("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2401
2507
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isActive && /* @__PURE__ */ jsx(
|
|
2402
2508
|
motion.span,
|
|
2403
2509
|
{
|
|
2404
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2510
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2405
2511
|
initial: { opacity: 0 },
|
|
2406
2512
|
animate: { opacity: 1 },
|
|
2407
2513
|
exit: { opacity: 0 },
|
|
@@ -2410,75 +2516,148 @@ function RenderItem({
|
|
|
2410
2516
|
},
|
|
2411
2517
|
`active-${item.key}`
|
|
2412
2518
|
) }),
|
|
2413
|
-
/* @__PURE__ */ jsxs(Button, { unstyled: true, type: "button", onClick: () => go(item.key), className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2414
|
-
/* @__PURE__ */ jsx(
|
|
2415
|
-
"span",
|
|
2416
|
-
{
|
|
2417
|
-
className: [
|
|
2418
|
-
"grid h-10 w-10 place-items-center rounded-2xl border transition",
|
|
2419
|
-
isActive ? `${ICON_BORDER_ACTIVE[color]} bg-[var(--card)] shadow-sm` : "border-[var(--border)] bg-[var(--card)] shadow-sm"
|
|
2420
|
-
].join(" "),
|
|
2421
|
-
children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5" })
|
|
2422
|
-
}
|
|
2423
|
-
),
|
|
2424
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", "data-fx-sidebar-key": item.key, children: item.label })
|
|
2425
|
-
] }),
|
|
2426
2519
|
/* @__PURE__ */ jsx(
|
|
2427
2520
|
Button,
|
|
2428
2521
|
{
|
|
2429
|
-
|
|
2430
|
-
noPaddingX: true,
|
|
2522
|
+
unstyled: true,
|
|
2431
2523
|
type: "button",
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2524
|
+
onClick: () => go(item.key),
|
|
2525
|
+
"data-fx-sidebar-key": item.key,
|
|
2526
|
+
className: "relative z-[1] flex min-w-0 flex-1 items-center",
|
|
2527
|
+
children: /* @__PURE__ */ jsxs(
|
|
2528
|
+
motion.span,
|
|
2529
|
+
{
|
|
2530
|
+
layout: true,
|
|
2531
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2532
|
+
className: cx(
|
|
2533
|
+
"flex min-w-0 items-center",
|
|
2534
|
+
collapsed ? "w-full justify-start" : "w-full gap-3"
|
|
2535
|
+
),
|
|
2536
|
+
children: [
|
|
2537
|
+
/* @__PURE__ */ jsx(
|
|
2538
|
+
"span",
|
|
2539
|
+
{
|
|
2540
|
+
className: [
|
|
2541
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2542
|
+
isActive ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2543
|
+
].join(" "),
|
|
2544
|
+
children: /* @__PURE__ */ jsx(
|
|
2545
|
+
Icon,
|
|
2546
|
+
{
|
|
2547
|
+
className: "h-5 w-5",
|
|
2548
|
+
...isActive ? {
|
|
2549
|
+
fill: "var(--primary)",
|
|
2550
|
+
color: "var(--primary)",
|
|
2551
|
+
style: { color: "var(--primary)" }
|
|
2552
|
+
} : void 0
|
|
2553
|
+
}
|
|
2554
|
+
)
|
|
2555
|
+
}
|
|
2556
|
+
),
|
|
2557
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2558
|
+
motion.span,
|
|
2559
|
+
{
|
|
2560
|
+
"data-fx-sidebar-key": item.key,
|
|
2561
|
+
initial: { opacity: 0, width: 0 },
|
|
2562
|
+
animate: { opacity: 1, width: "auto" },
|
|
2563
|
+
exit: { opacity: 0, width: 0 },
|
|
2564
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2565
|
+
className: "overflow-hidden",
|
|
2566
|
+
children: /* @__PURE__ */ jsx("span", { className: "block truncate", children: item.label })
|
|
2567
|
+
},
|
|
2568
|
+
`label-${item.key}`
|
|
2569
|
+
) : null })
|
|
2570
|
+
]
|
|
2571
|
+
}
|
|
2572
|
+
)
|
|
2444
2573
|
}
|
|
2445
|
-
)
|
|
2574
|
+
),
|
|
2575
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2576
|
+
motion.div,
|
|
2577
|
+
{
|
|
2578
|
+
initial: { opacity: 0, width: 0 },
|
|
2579
|
+
animate: { opacity: 1, width: "auto" },
|
|
2580
|
+
exit: { opacity: 0, width: 0 },
|
|
2581
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2582
|
+
className: "overflow-hidden",
|
|
2583
|
+
children: /* @__PURE__ */ jsx(
|
|
2584
|
+
Button,
|
|
2585
|
+
{
|
|
2586
|
+
iconOnly: true,
|
|
2587
|
+
noPaddingX: true,
|
|
2588
|
+
type: "button",
|
|
2589
|
+
"aria-label": open ? "Contraer submen\xFA" : "Expandir submen\xFA",
|
|
2590
|
+
onClick: (e) => {
|
|
2591
|
+
e.stopPropagation();
|
|
2592
|
+
setOpen(!open);
|
|
2593
|
+
},
|
|
2594
|
+
variant: "ghost",
|
|
2595
|
+
size: "sm",
|
|
2596
|
+
leftIcon: /* @__PURE__ */ jsx(ChevronDownIcon, { className: `h-4 w-4 transition-transform ${open ? "rotate-180" : ""}`, "aria-hidden": true }),
|
|
2597
|
+
className: [
|
|
2598
|
+
"relative z-[1] h-8 w-8 shrink-0 rounded-xl p-0 !gap-0 hover:text-[var(--foreground)]",
|
|
2599
|
+
isActive ? `${SOFT_BUTTON_SURFACE} ${TOGGLE_BORDER_ACTIVE[color]} ${hasActiveChild ? "text-[var(--primary)]" : "text-[var(--muted)]"}` : "border-transparent bg-transparent text-[var(--muted)]"
|
|
2600
|
+
].join(" ")
|
|
2601
|
+
}
|
|
2602
|
+
)
|
|
2603
|
+
},
|
|
2604
|
+
`toggle-${item.key}`
|
|
2605
|
+
) : null })
|
|
2446
2606
|
]
|
|
2447
2607
|
}
|
|
2448
2608
|
),
|
|
2449
|
-
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: open && /* @__PURE__ */ jsx(
|
|
2609
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: open && !collapsed && /* @__PURE__ */ jsx(
|
|
2450
2610
|
motion.div,
|
|
2451
2611
|
{
|
|
2452
|
-
initial: { height: 0, opacity: 0,
|
|
2453
|
-
animate: { height: "auto", opacity: 1,
|
|
2454
|
-
exit: { height: 0, opacity: 0,
|
|
2455
|
-
transition: { type: "tween", duration: 0.
|
|
2612
|
+
initial: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2613
|
+
animate: { height: "auto", opacity: 1, filter: "blur(0px)" },
|
|
2614
|
+
exit: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2615
|
+
transition: { type: "tween", duration: 0.24, ease: [0.22, 1, 0.36, 1] },
|
|
2456
2616
|
className: "mt-1 overflow-hidden",
|
|
2457
|
-
style: { willChange: "height, opacity,
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2617
|
+
style: { willChange: "height, opacity, filter" },
|
|
2618
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative pl-4", children: [
|
|
2619
|
+
/* @__PURE__ */ jsx("div", { className: SUBMENU_GUIDE_BAR }),
|
|
2620
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1 pl-3", children: children.map((ch, index) => {
|
|
2621
|
+
const active2 = ch.key === activeKey;
|
|
2622
|
+
return /* @__PURE__ */ jsxs(
|
|
2623
|
+
motion.div,
|
|
2624
|
+
{
|
|
2625
|
+
className: "relative",
|
|
2626
|
+
initial: { opacity: 0, filter: "blur(5px)" },
|
|
2627
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2628
|
+
transition: { duration: 0.18, delay: index * 0.02, ease: [0.22, 1, 0.36, 1] },
|
|
2629
|
+
children: [
|
|
2630
|
+
active2 ? /* @__PURE__ */ 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,
|
|
2631
|
+
/* @__PURE__ */ jsx(
|
|
2632
|
+
Button,
|
|
2633
|
+
{
|
|
2634
|
+
unstyled: true,
|
|
2635
|
+
onClick: () => go(ch.key),
|
|
2636
|
+
"data-fx-sidebar-key": ch.key,
|
|
2637
|
+
className: [
|
|
2638
|
+
"relative isolate block w-full rounded-xl px-3 py-2.5 text-left text-[0.875rem] transition-all duration-300",
|
|
2639
|
+
active2 ? SUBITEM_ACTIVE[color] : ITEM_IDLE
|
|
2640
|
+
].join(" "),
|
|
2641
|
+
children: /* @__PURE__ */ jsx("span", { className: "relative z-[1] block truncate", children: ch.label })
|
|
2642
|
+
}
|
|
2643
|
+
)
|
|
2644
|
+
]
|
|
2645
|
+
},
|
|
2646
|
+
ch.key
|
|
2647
|
+
);
|
|
2648
|
+
}) })
|
|
2649
|
+
] })
|
|
2475
2650
|
},
|
|
2476
2651
|
`submenu-${item.key}`
|
|
2477
2652
|
) })
|
|
2478
2653
|
] });
|
|
2654
|
+
if (collapsed) {
|
|
2655
|
+
return /* @__PURE__ */ jsx(Tooltip, { content: item.label, placement: "right", offset: 12, children: content });
|
|
2656
|
+
}
|
|
2657
|
+
return content;
|
|
2479
2658
|
}
|
|
2480
2659
|
const active = item.key === activeKey;
|
|
2481
|
-
const node = /* @__PURE__ */ jsxs(
|
|
2660
|
+
const node = /* @__PURE__ */ jsx(motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: /* @__PURE__ */ jsxs(
|
|
2482
2661
|
Button,
|
|
2483
2662
|
{
|
|
2484
2663
|
unstyled: true,
|
|
@@ -2487,15 +2666,15 @@ function RenderItem({
|
|
|
2487
2666
|
title: void 0,
|
|
2488
2667
|
"data-fx-sidebar-key": item.key,
|
|
2489
2668
|
className: [
|
|
2490
|
-
"group relative flex w-full min-w-0 items-center gap-3.5 rounded-
|
|
2491
|
-
active ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` :
|
|
2492
|
-
collapsed ? "justify-center" : ""
|
|
2669
|
+
"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]",
|
|
2670
|
+
active ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2493
2671
|
].join(" "),
|
|
2494
2672
|
children: [
|
|
2673
|
+
!collapsed && active ? /* @__PURE__ */ jsx("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2495
2674
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: active && /* @__PURE__ */ jsx(
|
|
2496
2675
|
motion.span,
|
|
2497
2676
|
{
|
|
2498
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2677
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2499
2678
|
initial: { opacity: 0 },
|
|
2500
2679
|
animate: { opacity: 1 },
|
|
2501
2680
|
exit: { opacity: 0 },
|
|
@@ -2504,20 +2683,54 @@ function RenderItem({
|
|
|
2504
2683
|
},
|
|
2505
2684
|
`active-${item.key}`
|
|
2506
2685
|
) }),
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
|
|
2686
|
+
/* @__PURE__ */ jsxs(
|
|
2687
|
+
motion.span,
|
|
2509
2688
|
{
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2689
|
+
layout: true,
|
|
2690
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2691
|
+
className: cx(
|
|
2692
|
+
"relative z-[1] flex min-w-0 items-center",
|
|
2693
|
+
collapsed ? "w-full justify-start" : "w-full gap-3.5"
|
|
2694
|
+
),
|
|
2695
|
+
children: [
|
|
2696
|
+
/* @__PURE__ */ jsx(
|
|
2697
|
+
"span",
|
|
2698
|
+
{
|
|
2699
|
+
className: [
|
|
2700
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2701
|
+
active ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2702
|
+
].join(" "),
|
|
2703
|
+
children: /* @__PURE__ */ jsx(
|
|
2704
|
+
Icon,
|
|
2705
|
+
{
|
|
2706
|
+
className: "h-5 w-5",
|
|
2707
|
+
...active ? {
|
|
2708
|
+
fill: "var(--primary)",
|
|
2709
|
+
color: "var(--primary)",
|
|
2710
|
+
style: { color: "var(--primary)" }
|
|
2711
|
+
} : void 0
|
|
2712
|
+
}
|
|
2713
|
+
)
|
|
2714
|
+
}
|
|
2715
|
+
),
|
|
2716
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2717
|
+
motion.span,
|
|
2718
|
+
{
|
|
2719
|
+
initial: { opacity: 0, width: 0 },
|
|
2720
|
+
animate: { opacity: 1, width: "auto" },
|
|
2721
|
+
exit: { opacity: 0, width: 0 },
|
|
2722
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2723
|
+
className: "relative z-[1] overflow-hidden",
|
|
2724
|
+
children: /* @__PURE__ */ jsx("span", { className: "block truncate", children: item.label })
|
|
2725
|
+
},
|
|
2726
|
+
`label-${item.key}`
|
|
2727
|
+
) : null })
|
|
2728
|
+
]
|
|
2515
2729
|
}
|
|
2516
|
-
)
|
|
2517
|
-
!collapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
|
|
2730
|
+
)
|
|
2518
2731
|
]
|
|
2519
2732
|
}
|
|
2520
|
-
);
|
|
2733
|
+
) });
|
|
2521
2734
|
if (!collapsed) return node;
|
|
2522
2735
|
return /* @__PURE__ */ jsx(Tooltip, { content: item.label, placement: "right", offset: 12, children: node });
|
|
2523
2736
|
}
|