framepexls-ui-lib 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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 +1 -2
- package/dist/Sidebar.d.ts +1 -2
- package/dist/Sidebar.js +492 -335
- package/dist/Sidebar.mjs +492 -335
- 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/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 +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +24 -0
- package/dist/index.mjs +163 -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 +7 -8
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" })
|
|
@@ -1836,84 +1826,129 @@ function SidebarInner({
|
|
|
1836
1826
|
const skShowTopPanel = (_c = skeleton == null ? void 0 : skeleton.showTopPanel) != null ? _c : true;
|
|
1837
1827
|
const skShowFooter = (_d = skeleton == null ? void 0 : skeleton.showFooter) != null ? _d : true;
|
|
1838
1828
|
const hasQuickActions = Boolean(quickActions == null ? void 0 : quickActions.length);
|
|
1839
|
-
const
|
|
1829
|
+
const topPanelClass = cx("overflow-hidden rounded-[1.4rem]", TOP_PANEL_SURFACE);
|
|
1830
|
+
const calmFadeEase = [0.22, 1, 0.36, 1];
|
|
1831
|
+
const calmFadeTransition = { duration: 0.26, ease: calmFadeEase };
|
|
1832
|
+
const calmFadeInitial = { opacity: 0, y: 4, filter: "blur(6px)" };
|
|
1833
|
+
const calmFadeAnimate = { opacity: 1, y: 0, filter: "blur(0px)" };
|
|
1834
|
+
const calmFadeExit = { opacity: 0, y: 2, filter: "blur(6px)" };
|
|
1835
|
+
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
1836
|
const QuickActionsSection = () => {
|
|
1841
1837
|
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
|
-
|
|
1838
|
+
return /* @__PURE__ */ jsxs(
|
|
1839
|
+
motion.div,
|
|
1840
|
+
{
|
|
1841
|
+
className: "pt-5",
|
|
1842
|
+
initial: calmFadeInitial,
|
|
1843
|
+
animate: calmFadeAnimate,
|
|
1844
|
+
transition: calmFadeTransition,
|
|
1845
|
+
children: [
|
|
1846
|
+
/* @__PURE__ */ jsx("div", { className: ["flex items-center justify-between gap-2 px-2", collapsed ? "justify-center" : ""].join(" "), children: !collapsed ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1847
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] font-semibold uppercase tracking-[0.18em] text-[var(--muted)]", children: quickActionsTitle != null ? quickActionsTitle : "Accesos r\xE1pidos" }),
|
|
1848
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_72%,transparent),transparent)]" })
|
|
1849
|
+
] }) : null }),
|
|
1850
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: (quickActions != null ? quickActions : []).map((a, index) => {
|
|
1851
|
+
var _a2;
|
|
1852
|
+
const disabled = Boolean(a.disabled);
|
|
1853
|
+
const base = [
|
|
1854
|
+
"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]",
|
|
1855
|
+
disabled ? "opacity-60 cursor-not-allowed" : ITEM_IDLE,
|
|
1856
|
+
collapsed ? "justify-center" : ""
|
|
1857
|
+
].join(" ");
|
|
1858
|
+
const button = /* @__PURE__ */ jsxs(
|
|
1859
|
+
Button,
|
|
1860
|
+
{
|
|
1861
|
+
unstyled: true,
|
|
1862
|
+
type: "button",
|
|
1863
|
+
onClick: () => {
|
|
1864
|
+
if (disabled) return;
|
|
1865
|
+
onQuickAction == null ? void 0 : onQuickAction(a);
|
|
1866
|
+
},
|
|
1867
|
+
className: base,
|
|
1868
|
+
title: void 0,
|
|
1869
|
+
children: [
|
|
1870
|
+
/* @__PURE__ */ jsx(QuickIcon, { children: (_a2 = a.icon) != null ? _a2 : /* @__PURE__ */ jsx(PlusIcon, { className: "h-4 w-4", "aria-hidden": true }) }),
|
|
1871
|
+
!collapsed ? /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1872
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-[0.9375rem] font-medium text-[var(--foreground)]", children: a.label }),
|
|
1873
|
+
a.description ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-xs text-[var(--muted)] text-left", children: a.description }) : null
|
|
1874
|
+
] }) : null,
|
|
1875
|
+
!collapsed && a.badge ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: a.badge }) : null
|
|
1876
|
+
]
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
if (!collapsed) {
|
|
1880
|
+
return /* @__PURE__ */ jsx(
|
|
1881
|
+
motion.div,
|
|
1882
|
+
{
|
|
1883
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1884
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1885
|
+
transition: { duration: 0.22, delay: index * 0.025, ease: calmFadeEase },
|
|
1886
|
+
children: button
|
|
1887
|
+
},
|
|
1888
|
+
a.id
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
return /* @__PURE__ */ jsx(
|
|
1892
|
+
Tooltip,
|
|
1893
|
+
{
|
|
1894
|
+
content: /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1895
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-[0.75rem] font-semibold", children: a.label }),
|
|
1896
|
+
a.description ? /* @__PURE__ */ jsx("div", { className: "mt-0.5 truncate text-[0.6875rem] text-white/70", children: a.description }) : null
|
|
1897
|
+
] }),
|
|
1898
|
+
placement: "right",
|
|
1899
|
+
offset: 12,
|
|
1900
|
+
children: /* @__PURE__ */ jsx(
|
|
1901
|
+
motion.div,
|
|
1902
|
+
{
|
|
1903
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
1904
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
1905
|
+
transition: { duration: 0.2, delay: index * 0.025, ease: calmFadeEase },
|
|
1906
|
+
children: button
|
|
1907
|
+
}
|
|
1908
|
+
)
|
|
1909
|
+
},
|
|
1910
|
+
a.id
|
|
1911
|
+
);
|
|
1912
|
+
}) })
|
|
1913
|
+
]
|
|
1914
|
+
}
|
|
1915
|
+
);
|
|
1889
1916
|
};
|
|
1890
1917
|
const showNavTools = Boolean(navEditable && onNavConfigure);
|
|
1891
1918
|
const showQuickTools = Boolean(quickActionsEditable && onQuickActionsConfigure);
|
|
1892
1919
|
const showSidebarTools = showNavTools || showQuickTools;
|
|
1893
1920
|
const showCollapseToggle = !mobile && typeof toggleCollapsed === "function";
|
|
1894
1921
|
const renderCollapseToggle = (opts) => {
|
|
1895
|
-
var _a2;
|
|
1896
1922
|
if (!showCollapseToggle) return null;
|
|
1897
1923
|
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(
|
|
1924
|
+
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
1925
|
Button,
|
|
1901
1926
|
{
|
|
1927
|
+
unstyled: true,
|
|
1902
1928
|
noPaddingX: true,
|
|
1903
1929
|
"aria-label": collapsed ? "Expandir barra lateral" : "Contraer barra lateral",
|
|
1904
1930
|
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
1931
|
className: cx(
|
|
1909
|
-
"
|
|
1910
|
-
|
|
1911
|
-
"
|
|
1912
|
-
|
|
1932
|
+
"inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-visible rounded-[1.1rem] p-0 transition-all duration-300",
|
|
1933
|
+
"border border-[color-mix(in_oklab,var(--border)_82%,transparent)]",
|
|
1934
|
+
"bg-[color-mix(in_oklab,var(--card)_96%,var(--surface))] text-[var(--foreground)]",
|
|
1935
|
+
"backdrop-blur-sm",
|
|
1936
|
+
"shadow-[0_14px_30px_-24px_color-mix(in_oklab,var(--foreground)_38%,transparent)]",
|
|
1937
|
+
"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)]",
|
|
1938
|
+
"active:translate-y-0 active:scale-95"
|
|
1913
1939
|
),
|
|
1914
|
-
title: void 0
|
|
1940
|
+
title: void 0,
|
|
1941
|
+
children: /* @__PURE__ */ jsx(
|
|
1942
|
+
motion.span,
|
|
1943
|
+
{
|
|
1944
|
+
className: "grid place-items-center text-[color-mix(in_oklab,var(--foreground)_92%,var(--muted))]",
|
|
1945
|
+
animate: { x: collapsed ? 0.5 : -0.5, scale: collapsed ? 0.98 : 1 },
|
|
1946
|
+
transition: { type: "spring", stiffness: 420, damping: 30 },
|
|
1947
|
+
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 })
|
|
1948
|
+
}
|
|
1949
|
+
)
|
|
1915
1950
|
}
|
|
1916
|
-
) });
|
|
1951
|
+
) }) });
|
|
1917
1952
|
};
|
|
1918
1953
|
const SidebarTools = ({ condensed }) => {
|
|
1919
1954
|
if (!showSidebarTools) return null;
|
|
@@ -1959,9 +1994,9 @@ function SidebarInner({
|
|
|
1959
1994
|
}, []);
|
|
1960
1995
|
if (!condensedMode) {
|
|
1961
1996
|
const btnClass = cx(
|
|
1962
|
-
"h-9 w-9 rounded-
|
|
1963
|
-
|
|
1964
|
-
"hover:
|
|
1997
|
+
"h-9 w-9 rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
1998
|
+
SOFT_BUTTON_SURFACE,
|
|
1999
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
1965
2000
|
);
|
|
1966
2001
|
return /* @__PURE__ */ jsxs("div", { className: cx("flex items-center gap-2"), children: [
|
|
1967
2002
|
showNavTools ? /* @__PURE__ */ jsx(Tooltip, { content: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar", placement: "bottom", offset: 12, children: /* @__PURE__ */ jsx(
|
|
@@ -1995,9 +2030,9 @@ function SidebarInner({
|
|
|
1995
2030
|
] });
|
|
1996
2031
|
}
|
|
1997
2032
|
const iconBtnClass = cx(
|
|
1998
|
-
"grid place-items-center
|
|
1999
|
-
|
|
2000
|
-
"hover:
|
|
2033
|
+
"grid h-9 w-9 place-items-center rounded-2xl p-0 !gap-0 text-[var(--foreground)]",
|
|
2034
|
+
SOFT_BUTTON_SURFACE,
|
|
2035
|
+
"hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]"
|
|
2001
2036
|
);
|
|
2002
2037
|
const menuItemClass = cx(
|
|
2003
2038
|
"w-full flex items-center gap-3 rounded-2xl px-3 py-2 text-left text-sm",
|
|
@@ -2012,7 +2047,7 @@ function SidebarInner({
|
|
|
2012
2047
|
className: "fixed z-[200] w-[240px]",
|
|
2013
2048
|
role: "menu",
|
|
2014
2049
|
"aria-label": "Opciones del sidebar",
|
|
2015
|
-
children: /* @__PURE__ */ jsx("div", { className: "rounded-3xl
|
|
2050
|
+
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
2051
|
showNavTools ? /* @__PURE__ */ jsxs(
|
|
2017
2052
|
"button",
|
|
2018
2053
|
{
|
|
@@ -2024,7 +2059,7 @@ function SidebarInner({
|
|
|
2024
2059
|
onNavConfigure == null ? void 0 : onNavConfigure();
|
|
2025
2060
|
},
|
|
2026
2061
|
children: [
|
|
2027
|
-
/* @__PURE__ */ jsx("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2062
|
+
/* @__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
2063
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
2029
2064
|
/* @__PURE__ */ jsx("span", { className: "block font-semibold text-[var(--foreground)]", children: navCustomizeLabel != null ? navCustomizeLabel : "Personalizar" }),
|
|
2030
2065
|
/* @__PURE__ */ jsx("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ordena y ajusta la navegaci\xF3n" })
|
|
@@ -2043,7 +2078,7 @@ function SidebarInner({
|
|
|
2043
2078
|
onQuickActionsConfigure == null ? void 0 : onQuickActionsConfigure();
|
|
2044
2079
|
},
|
|
2045
2080
|
children: [
|
|
2046
|
-
/* @__PURE__ */ jsx("span", { className: "grid h-9 w-9 place-items-center rounded-2xl
|
|
2081
|
+
/* @__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
2082
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
2048
2083
|
/* @__PURE__ */ jsx("span", { className: "block font-semibold text-[var(--foreground)]", children: "Accesos r\xE1pidos" }),
|
|
2049
2084
|
/* @__PURE__ */ jsx("span", { className: "block text-xs text-[var(--muted)] text-left", children: "Ancla tus acciones favoritas" })
|
|
@@ -2079,7 +2114,7 @@ function SidebarInner({
|
|
|
2079
2114
|
] });
|
|
2080
2115
|
};
|
|
2081
2116
|
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-
|
|
2117
|
+
/* @__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
2118
|
/* @__PURE__ */ jsxs("div", { className: ["flex min-w-0 flex-1 items-center gap-3", collapsed ? "justify-center" : ""].join(" "), children: [
|
|
2084
2119
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: collapsed ? 44 : 40, height: collapsed ? 44 : 40, borderRadius: 16 } }),
|
|
2085
2120
|
!collapsed ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -2088,60 +2123,77 @@ function SidebarInner({
|
|
|
2088
2123
|
] }) : null
|
|
2089
2124
|
] }),
|
|
2090
2125
|
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
|
-
|
|
2126
|
+
] }) : showBrand ? /* @__PURE__ */ jsxs(
|
|
2127
|
+
motion.div,
|
|
2128
|
+
{
|
|
2129
|
+
layout: true,
|
|
2130
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2131
|
+
className: "relative flex items-center gap-2",
|
|
2132
|
+
children: [
|
|
2133
|
+
/* @__PURE__ */ jsxs(
|
|
2134
|
+
Button,
|
|
2135
|
+
{
|
|
2136
|
+
unstyled: true,
|
|
2137
|
+
type: "button",
|
|
2138
|
+
onClick: onBrandClick,
|
|
2139
|
+
className: cx(
|
|
2140
|
+
"flex items-center gap-3",
|
|
2141
|
+
"min-w-0 flex-1 justify-start py-2",
|
|
2142
|
+
collapsed ? "px-1" : "px-2"
|
|
2143
|
+
),
|
|
2144
|
+
title: "Ir al inicio",
|
|
2145
|
+
children: [
|
|
2146
|
+
/* @__PURE__ */ jsx(
|
|
2147
|
+
motion.div,
|
|
2112
2148
|
{
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2149
|
+
layout: "size",
|
|
2150
|
+
transition: { type: "spring", stiffness: 520, damping: 46, mass: 0.9 },
|
|
2151
|
+
className: "shrink-0",
|
|
2152
|
+
children: /* @__PURE__ */ jsx(
|
|
2153
|
+
AvatarSquare,
|
|
2154
|
+
{
|
|
2155
|
+
size: collapsed ? 44 : 40,
|
|
2156
|
+
src: brandLogoSrc != null ? brandLogoSrc : void 0,
|
|
2157
|
+
alt: brandTitle,
|
|
2158
|
+
initials: brandInitials,
|
|
2159
|
+
imageFit: brandLogoSrc ? "contain" : "cover",
|
|
2160
|
+
radiusClass: "rounded-2xl",
|
|
2161
|
+
color,
|
|
2162
|
+
className: "ring-0"
|
|
2163
|
+
}
|
|
2164
|
+
)
|
|
2121
2165
|
}
|
|
2122
|
-
)
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2166
|
+
),
|
|
2167
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed && /* @__PURE__ */ jsxs(
|
|
2168
|
+
motion.div,
|
|
2169
|
+
{
|
|
2170
|
+
initial: calmFadeInitial,
|
|
2171
|
+
animate: calmFadeAnimate,
|
|
2172
|
+
exit: calmFadeExit,
|
|
2173
|
+
transition: calmFadeTransition,
|
|
2174
|
+
className: "leading-tight",
|
|
2175
|
+
children: [
|
|
2176
|
+
/* @__PURE__ */ jsx("div", { className: "text-lg font-semibold tracking-tight text-left", children: brandTitle }),
|
|
2177
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] uppercase tracking-wide text-[var(--muted)] text-left", children: brandSubtitle })
|
|
2178
|
+
]
|
|
2179
|
+
},
|
|
2180
|
+
"brand-meta"
|
|
2181
|
+
) })
|
|
2182
|
+
]
|
|
2183
|
+
}
|
|
2184
|
+
),
|
|
2185
|
+
/* @__PURE__ */ jsx(
|
|
2186
|
+
motion.div,
|
|
2187
|
+
{
|
|
2188
|
+
layout: true,
|
|
2189
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2190
|
+
className: "shrink-0 self-start",
|
|
2191
|
+
children: renderCollapseToggle({ size: collapsed ? "sm" : "md" })
|
|
2192
|
+
}
|
|
2193
|
+
)
|
|
2194
|
+
]
|
|
2195
|
+
}
|
|
2196
|
+
) : hasWorkspace ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2145
2197
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2146
2198
|
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx(
|
|
2147
2199
|
WorkspaceSwitcher,
|
|
@@ -2164,7 +2216,7 @@ function SidebarInner({
|
|
|
2164
2216
|
/* @__PURE__ */ jsx("div", { className: ["min-w-0 flex-1 text-sm font-semibold text-[var(--muted)]", collapsed ? "text-center" : ""].join(" "), children: "Navegaci\xF3n" }),
|
|
2165
2217
|
renderCollapseToggle()
|
|
2166
2218
|
] }) }),
|
|
2167
|
-
showTopPanel || loading && skShowTopPanel ? /* @__PURE__ */ jsx("div", { className: cx("mt-
|
|
2219
|
+
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
2220
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: 44, height: 44, borderRadius: 16 } }),
|
|
2169
2221
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: 56, height: 12, borderRadius: 10 } })
|
|
2170
2222
|
] }) : /* @__PURE__ */ jsxs("div", { className: "px-2 py-2", children: [
|
|
@@ -2184,7 +2236,7 @@ function SidebarInner({
|
|
|
2184
2236
|
/* @__PURE__ */ jsx("div", { className: "fx-skeleton", style: { width: "66%", height: 10, borderRadius: 10, opacity: 0.9 } })
|
|
2185
2237
|
] })
|
|
2186
2238
|
] }) })
|
|
2187
|
-
] }) }) : collapsed ? /* @__PURE__ */ jsx("div", { className: "rounded-3xl
|
|
2239
|
+
] }) }) : 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
2240
|
showWorkspaceInTopPanel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2189
2241
|
/* @__PURE__ */ jsx(
|
|
2190
2242
|
WorkspaceSwitcher,
|
|
@@ -2217,7 +2269,7 @@ function SidebarInner({
|
|
|
2217
2269
|
userMenuSlot ? /* @__PURE__ */ jsx("div", { children: userMenuSlot }) : null
|
|
2218
2270
|
] }) : null,
|
|
2219
2271
|
sidebarSlotCollapsed ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: sidebarSlotCollapsed }) : null
|
|
2220
|
-
] }) }) : /* @__PURE__ */ jsxs("div", { className:
|
|
2272
|
+
] }) }) : /* @__PURE__ */ jsxs("div", { className: topPanelClass, children: [
|
|
2221
2273
|
showWorkspaceInTopPanel ? /* @__PURE__ */ jsxs("div", { className: "px-3 py-3", children: [
|
|
2222
2274
|
/* @__PURE__ */ jsx(
|
|
2223
2275
|
WorkspaceSwitcher,
|
|
@@ -2232,10 +2284,10 @@ function SidebarInner({
|
|
|
2232
2284
|
color
|
|
2233
2285
|
}
|
|
2234
2286
|
),
|
|
2235
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2.5
|
|
2287
|
+
/* @__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
2288
|
] }) : 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-
|
|
2289
|
+
showWorkspaceInTopPanel ? /* @__PURE__ */ jsx("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }) : null,
|
|
2290
|
+
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
2291
|
/* @__PURE__ */ jsx(
|
|
2240
2292
|
AvatarSquare,
|
|
2241
2293
|
{
|
|
@@ -2254,7 +2306,7 @@ function SidebarInner({
|
|
|
2254
2306
|
userMenuSlot ? /* @__PURE__ */ jsx("div", { className: "ml-auto", children: userMenuSlot }) : null
|
|
2255
2307
|
] }) }) : null,
|
|
2256
2308
|
sidebarSlot ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2257
|
-
/* @__PURE__ */ jsx("div", { className: "h-px bg-[var(--border)]
|
|
2309
|
+
/* @__PURE__ */ jsx("div", { className: "h-px bg-[color-mix(in_oklab,var(--border)_58%,transparent)]" }),
|
|
2258
2310
|
/* @__PURE__ */ jsx("div", { className: "px-3 py-3", children: sidebarSlot })
|
|
2259
2311
|
] }) : null
|
|
2260
2312
|
] }) }) : null,
|
|
@@ -2263,8 +2315,8 @@ function SidebarInner({
|
|
|
2263
2315
|
{
|
|
2264
2316
|
ref: navRef,
|
|
2265
2317
|
className: cx(
|
|
2266
|
-
"mt-
|
|
2267
|
-
|
|
2318
|
+
"mt-5 flex-1 space-y-6 overflow-y-auto overflow-x-hidden py-2",
|
|
2319
|
+
"px-5"
|
|
2268
2320
|
),
|
|
2269
2321
|
children: loading ? /* @__PURE__ */ jsx("div", { className: "space-y-7", children: Array.from({ length: skGroups }).map((_, g) => /* @__PURE__ */ jsxs("div", { children: [
|
|
2270
2322
|
!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 +2342,49 @@ function SidebarInner({
|
|
|
2290
2342
|
});
|
|
2291
2343
|
return visibles.length > 0;
|
|
2292
2344
|
})) == null ? void 0 : _a2[0]) != null ? _b2 : null;
|
|
2293
|
-
const renderedGroups = groups.map(([groupName, items]) => {
|
|
2345
|
+
const renderedGroups = groups.map(([groupName, items], groupIndex) => {
|
|
2294
2346
|
const visibles = items.filter((i) => {
|
|
2295
2347
|
var _a3;
|
|
2296
2348
|
return ((_a3 = i.children) == null ? void 0 : _a3.length) ? i.children.some((c) => c) : true;
|
|
2297
2349
|
});
|
|
2298
2350
|
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
|
-
|
|
2351
|
+
return /* @__PURE__ */ jsxs(
|
|
2352
|
+
motion.div,
|
|
2353
|
+
{
|
|
2354
|
+
layout: true,
|
|
2355
|
+
initial: calmFadeInitial,
|
|
2356
|
+
animate: calmFadeAnimate,
|
|
2357
|
+
transition: { duration: 0.24, delay: groupIndex * 0.03, ease: calmFadeEase },
|
|
2358
|
+
children: [
|
|
2359
|
+
!collapsed ? /* @__PURE__ */ jsx(GroupHeader, { title: groupName }) : null,
|
|
2360
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: visibles.map((item, itemIndex) => /* @__PURE__ */ jsx(
|
|
2361
|
+
motion.div,
|
|
2362
|
+
{
|
|
2363
|
+
layout: true,
|
|
2364
|
+
initial: { opacity: 0, filter: "blur(6px)" },
|
|
2365
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2366
|
+
transition: { duration: 0.2, delay: itemIndex * 0.02, ease: calmFadeEase },
|
|
2367
|
+
children: /* @__PURE__ */ jsx(
|
|
2368
|
+
RenderItem,
|
|
2369
|
+
{
|
|
2370
|
+
item,
|
|
2371
|
+
collapsed: collapsed != null ? collapsed : false,
|
|
2372
|
+
activeKey,
|
|
2373
|
+
go,
|
|
2374
|
+
color
|
|
2375
|
+
}
|
|
2376
|
+
)
|
|
2377
|
+
},
|
|
2378
|
+
item.key
|
|
2379
|
+
)) }),
|
|
2380
|
+
!inserted && quick && firstGroupNameWithItems === groupName ? /* @__PURE__ */ jsx(React.Fragment, { children: (() => {
|
|
2381
|
+
inserted = true;
|
|
2382
|
+
return quick;
|
|
2383
|
+
})() }) : null
|
|
2384
|
+
]
|
|
2385
|
+
},
|
|
2386
|
+
groupName
|
|
2387
|
+
);
|
|
2317
2388
|
});
|
|
2318
2389
|
if (!inserted && quick) {
|
|
2319
2390
|
renderedGroups.push(
|
|
@@ -2338,7 +2409,9 @@ function RenderItem({
|
|
|
2338
2409
|
const Icon = (_a = item.icon) != null ? _a : (() => null);
|
|
2339
2410
|
const hasChildren = !!((_b = item.children) == null ? void 0 : _b.length);
|
|
2340
2411
|
const children = ((_c = item.children) != null ? _c : []).filter(Boolean);
|
|
2341
|
-
const
|
|
2412
|
+
const isDirectActive = item.key === activeKey;
|
|
2413
|
+
const hasActiveChild = hasChildren && children.some((ch) => ch.key === activeKey);
|
|
2414
|
+
const isActive = isDirectActive || hasActiveChild;
|
|
2342
2415
|
const [open, setOpen] = useState(false);
|
|
2343
2416
|
useEffect(() => {
|
|
2344
2417
|
if (!hasChildren) return;
|
|
@@ -2362,46 +2435,23 @@ function RenderItem({
|
|
|
2362
2435
|
} catch {
|
|
2363
2436
|
}
|
|
2364
2437
|
}, [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
2438
|
if (hasChildren) {
|
|
2392
|
-
|
|
2439
|
+
const content = /* @__PURE__ */ jsxs(motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: [
|
|
2393
2440
|
/* @__PURE__ */ jsxs(
|
|
2394
|
-
|
|
2441
|
+
motion.div,
|
|
2395
2442
|
{
|
|
2443
|
+
layout: true,
|
|
2444
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2396
2445
|
className: [
|
|
2397
|
-
"relative flex w-full min-w-0 items-center rounded-
|
|
2398
|
-
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` :
|
|
2446
|
+
"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]",
|
|
2447
|
+
isActive ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2399
2448
|
].join(" "),
|
|
2400
2449
|
children: [
|
|
2450
|
+
!collapsed && isActive ? /* @__PURE__ */ jsx("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2401
2451
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isActive && /* @__PURE__ */ jsx(
|
|
2402
2452
|
motion.span,
|
|
2403
2453
|
{
|
|
2404
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2454
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2405
2455
|
initial: { opacity: 0 },
|
|
2406
2456
|
animate: { opacity: 1 },
|
|
2407
2457
|
exit: { opacity: 0 },
|
|
@@ -2410,75 +2460,148 @@ function RenderItem({
|
|
|
2410
2460
|
},
|
|
2411
2461
|
`active-${item.key}`
|
|
2412
2462
|
) }),
|
|
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
2463
|
/* @__PURE__ */ jsx(
|
|
2427
2464
|
Button,
|
|
2428
2465
|
{
|
|
2429
|
-
|
|
2430
|
-
noPaddingX: true,
|
|
2466
|
+
unstyled: true,
|
|
2431
2467
|
type: "button",
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2468
|
+
onClick: () => go(item.key),
|
|
2469
|
+
"data-fx-sidebar-key": item.key,
|
|
2470
|
+
className: "relative z-[1] flex min-w-0 flex-1 items-center",
|
|
2471
|
+
children: /* @__PURE__ */ jsxs(
|
|
2472
|
+
motion.span,
|
|
2473
|
+
{
|
|
2474
|
+
layout: true,
|
|
2475
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2476
|
+
className: cx(
|
|
2477
|
+
"flex min-w-0 items-center",
|
|
2478
|
+
collapsed ? "w-full justify-start" : "w-full gap-3"
|
|
2479
|
+
),
|
|
2480
|
+
children: [
|
|
2481
|
+
/* @__PURE__ */ jsx(
|
|
2482
|
+
"span",
|
|
2483
|
+
{
|
|
2484
|
+
className: [
|
|
2485
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2486
|
+
isActive ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2487
|
+
].join(" "),
|
|
2488
|
+
children: /* @__PURE__ */ jsx(
|
|
2489
|
+
Icon,
|
|
2490
|
+
{
|
|
2491
|
+
className: "h-5 w-5",
|
|
2492
|
+
...isActive ? {
|
|
2493
|
+
fill: "var(--primary)",
|
|
2494
|
+
color: "var(--primary)",
|
|
2495
|
+
style: { color: "var(--primary)" }
|
|
2496
|
+
} : void 0
|
|
2497
|
+
}
|
|
2498
|
+
)
|
|
2499
|
+
}
|
|
2500
|
+
),
|
|
2501
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2502
|
+
motion.span,
|
|
2503
|
+
{
|
|
2504
|
+
"data-fx-sidebar-key": item.key,
|
|
2505
|
+
initial: { opacity: 0, width: 0 },
|
|
2506
|
+
animate: { opacity: 1, width: "auto" },
|
|
2507
|
+
exit: { opacity: 0, width: 0 },
|
|
2508
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2509
|
+
className: "overflow-hidden",
|
|
2510
|
+
children: /* @__PURE__ */ jsx("span", { className: "block truncate", children: item.label })
|
|
2511
|
+
},
|
|
2512
|
+
`label-${item.key}`
|
|
2513
|
+
) : null })
|
|
2514
|
+
]
|
|
2515
|
+
}
|
|
2516
|
+
)
|
|
2444
2517
|
}
|
|
2445
|
-
)
|
|
2518
|
+
),
|
|
2519
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2520
|
+
motion.div,
|
|
2521
|
+
{
|
|
2522
|
+
initial: { opacity: 0, width: 0 },
|
|
2523
|
+
animate: { opacity: 1, width: "auto" },
|
|
2524
|
+
exit: { opacity: 0, width: 0 },
|
|
2525
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2526
|
+
className: "overflow-hidden",
|
|
2527
|
+
children: /* @__PURE__ */ jsx(
|
|
2528
|
+
Button,
|
|
2529
|
+
{
|
|
2530
|
+
iconOnly: true,
|
|
2531
|
+
noPaddingX: true,
|
|
2532
|
+
type: "button",
|
|
2533
|
+
"aria-label": open ? "Contraer submen\xFA" : "Expandir submen\xFA",
|
|
2534
|
+
onClick: (e) => {
|
|
2535
|
+
e.stopPropagation();
|
|
2536
|
+
setOpen(!open);
|
|
2537
|
+
},
|
|
2538
|
+
variant: "ghost",
|
|
2539
|
+
size: "sm",
|
|
2540
|
+
leftIcon: /* @__PURE__ */ jsx(ChevronDownIcon, { className: `h-4 w-4 transition-transform ${open ? "rotate-180" : ""}`, "aria-hidden": true }),
|
|
2541
|
+
className: [
|
|
2542
|
+
"relative z-[1] h-8 w-8 shrink-0 rounded-xl p-0 !gap-0 hover:text-[var(--foreground)]",
|
|
2543
|
+
isActive ? `${SOFT_BUTTON_SURFACE} ${TOGGLE_BORDER_ACTIVE[color]} ${hasActiveChild ? "text-[var(--primary)]" : "text-[var(--muted)]"}` : "border-transparent bg-transparent text-[var(--muted)]"
|
|
2544
|
+
].join(" ")
|
|
2545
|
+
}
|
|
2546
|
+
)
|
|
2547
|
+
},
|
|
2548
|
+
`toggle-${item.key}`
|
|
2549
|
+
) : null })
|
|
2446
2550
|
]
|
|
2447
2551
|
}
|
|
2448
2552
|
),
|
|
2449
|
-
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: open && /* @__PURE__ */ jsx(
|
|
2553
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: open && !collapsed && /* @__PURE__ */ jsx(
|
|
2450
2554
|
motion.div,
|
|
2451
2555
|
{
|
|
2452
|
-
initial: { height: 0, opacity: 0,
|
|
2453
|
-
animate: { height: "auto", opacity: 1,
|
|
2454
|
-
exit: { height: 0, opacity: 0,
|
|
2455
|
-
transition: { type: "tween", duration: 0.
|
|
2556
|
+
initial: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2557
|
+
animate: { height: "auto", opacity: 1, filter: "blur(0px)" },
|
|
2558
|
+
exit: { height: 0, opacity: 0, filter: "blur(6px)" },
|
|
2559
|
+
transition: { type: "tween", duration: 0.24, ease: [0.22, 1, 0.36, 1] },
|
|
2456
2560
|
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
|
-
|
|
2561
|
+
style: { willChange: "height, opacity, filter" },
|
|
2562
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative pl-4", children: [
|
|
2563
|
+
/* @__PURE__ */ jsx("div", { className: SUBMENU_GUIDE_BAR }),
|
|
2564
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1 pl-3", children: children.map((ch, index) => {
|
|
2565
|
+
const active2 = ch.key === activeKey;
|
|
2566
|
+
return /* @__PURE__ */ jsxs(
|
|
2567
|
+
motion.div,
|
|
2568
|
+
{
|
|
2569
|
+
className: "relative",
|
|
2570
|
+
initial: { opacity: 0, filter: "blur(5px)" },
|
|
2571
|
+
animate: { opacity: 1, filter: "blur(0px)" },
|
|
2572
|
+
transition: { duration: 0.18, delay: index * 0.02, ease: [0.22, 1, 0.36, 1] },
|
|
2573
|
+
children: [
|
|
2574
|
+
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,
|
|
2575
|
+
/* @__PURE__ */ jsx(
|
|
2576
|
+
Button,
|
|
2577
|
+
{
|
|
2578
|
+
unstyled: true,
|
|
2579
|
+
onClick: () => go(ch.key),
|
|
2580
|
+
"data-fx-sidebar-key": ch.key,
|
|
2581
|
+
className: [
|
|
2582
|
+
"relative isolate block w-full rounded-xl px-3 py-2.5 text-left text-[0.875rem] transition-all duration-300",
|
|
2583
|
+
active2 ? SUBITEM_ACTIVE[color] : ITEM_IDLE
|
|
2584
|
+
].join(" "),
|
|
2585
|
+
children: /* @__PURE__ */ jsx("span", { className: "relative z-[1] block truncate", children: ch.label })
|
|
2586
|
+
}
|
|
2587
|
+
)
|
|
2588
|
+
]
|
|
2589
|
+
},
|
|
2590
|
+
ch.key
|
|
2591
|
+
);
|
|
2592
|
+
}) })
|
|
2593
|
+
] })
|
|
2475
2594
|
},
|
|
2476
2595
|
`submenu-${item.key}`
|
|
2477
2596
|
) })
|
|
2478
2597
|
] });
|
|
2598
|
+
if (collapsed) {
|
|
2599
|
+
return /* @__PURE__ */ jsx(Tooltip, { content: item.label, placement: "right", offset: 12, children: content });
|
|
2600
|
+
}
|
|
2601
|
+
return content;
|
|
2479
2602
|
}
|
|
2480
2603
|
const active = item.key === activeKey;
|
|
2481
|
-
const node = /* @__PURE__ */ jsxs(
|
|
2604
|
+
const node = /* @__PURE__ */ jsx(motion.div, { layout: true, transition: SIDEBAR_COLLAPSE_TRANSITION, children: /* @__PURE__ */ jsxs(
|
|
2482
2605
|
Button,
|
|
2483
2606
|
{
|
|
2484
2607
|
unstyled: true,
|
|
@@ -2487,15 +2610,15 @@ function RenderItem({
|
|
|
2487
2610
|
title: void 0,
|
|
2488
2611
|
"data-fx-sidebar-key": item.key,
|
|
2489
2612
|
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" : ""
|
|
2613
|
+
"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]",
|
|
2614
|
+
active ? `${WRAP_ACTIVE[color]} text-[var(--foreground)]` : ITEM_IDLE
|
|
2493
2615
|
].join(" "),
|
|
2494
2616
|
children: [
|
|
2617
|
+
!collapsed && active ? /* @__PURE__ */ jsx("span", { className: ACTIVE_ROW_BAR }) : null,
|
|
2495
2618
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: active && /* @__PURE__ */ jsx(
|
|
2496
2619
|
motion.span,
|
|
2497
2620
|
{
|
|
2498
|
-
className: `pointer-events-none absolute inset-0 rounded-
|
|
2621
|
+
className: `pointer-events-none absolute inset-0 rounded-[1.2rem] ${WRAP_ACTIVE[color]}`,
|
|
2499
2622
|
initial: { opacity: 0 },
|
|
2500
2623
|
animate: { opacity: 1 },
|
|
2501
2624
|
exit: { opacity: 0 },
|
|
@@ -2504,20 +2627,54 @@ function RenderItem({
|
|
|
2504
2627
|
},
|
|
2505
2628
|
`active-${item.key}`
|
|
2506
2629
|
) }),
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
|
|
2630
|
+
/* @__PURE__ */ jsxs(
|
|
2631
|
+
motion.span,
|
|
2509
2632
|
{
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2633
|
+
layout: true,
|
|
2634
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2635
|
+
className: cx(
|
|
2636
|
+
"relative z-[1] flex min-w-0 items-center",
|
|
2637
|
+
collapsed ? "w-full justify-start" : "w-full gap-3.5"
|
|
2638
|
+
),
|
|
2639
|
+
children: [
|
|
2640
|
+
/* @__PURE__ */ jsx(
|
|
2641
|
+
"span",
|
|
2642
|
+
{
|
|
2643
|
+
className: [
|
|
2644
|
+
"grid h-10 w-10 shrink-0 place-items-center rounded-2xl transition-all duration-300 group-hover:scale-[1.04]",
|
|
2645
|
+
active ? ITEM_ICON_ACTIVE : ITEM_ICON_IDLE
|
|
2646
|
+
].join(" "),
|
|
2647
|
+
children: /* @__PURE__ */ jsx(
|
|
2648
|
+
Icon,
|
|
2649
|
+
{
|
|
2650
|
+
className: "h-5 w-5",
|
|
2651
|
+
...active ? {
|
|
2652
|
+
fill: "var(--primary)",
|
|
2653
|
+
color: "var(--primary)",
|
|
2654
|
+
style: { color: "var(--primary)" }
|
|
2655
|
+
} : void 0
|
|
2656
|
+
}
|
|
2657
|
+
)
|
|
2658
|
+
}
|
|
2659
|
+
),
|
|
2660
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !collapsed ? /* @__PURE__ */ jsx(
|
|
2661
|
+
motion.span,
|
|
2662
|
+
{
|
|
2663
|
+
initial: { opacity: 0, width: 0 },
|
|
2664
|
+
animate: { opacity: 1, width: "auto" },
|
|
2665
|
+
exit: { opacity: 0, width: 0 },
|
|
2666
|
+
transition: SIDEBAR_COLLAPSE_TRANSITION,
|
|
2667
|
+
className: "relative z-[1] overflow-hidden",
|
|
2668
|
+
children: /* @__PURE__ */ jsx("span", { className: "block truncate", children: item.label })
|
|
2669
|
+
},
|
|
2670
|
+
`label-${item.key}`
|
|
2671
|
+
) : null })
|
|
2672
|
+
]
|
|
2515
2673
|
}
|
|
2516
|
-
)
|
|
2517
|
-
!collapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
|
|
2674
|
+
)
|
|
2518
2675
|
]
|
|
2519
2676
|
}
|
|
2520
|
-
);
|
|
2677
|
+
) });
|
|
2521
2678
|
if (!collapsed) return node;
|
|
2522
2679
|
return /* @__PURE__ */ jsx(Tooltip, { content: item.label, placement: "right", offset: 12, children: node });
|
|
2523
2680
|
}
|