@snksergio/design-system 0.53.0 → 0.55.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-lib/chunks/{avatar-DAmZ7fBZ.cjs → avatar-CMWPg3A3.cjs} +157 -70
- package/dist-lib/chunks/avatar-CMWPg3A3.cjs.map +1 -0
- package/dist-lib/chunks/{avatar-FPbG1TRy.mjs → avatar-CZRLkTxt.mjs} +214 -127
- package/dist-lib/chunks/avatar-CZRLkTxt.mjs.map +1 -0
- package/dist-lib/chunks/{input-tjIT8HNE.mjs → input-BQABJR2N.mjs} +2 -2
- package/dist-lib/chunks/{input-tjIT8HNE.mjs.map → input-BQABJR2N.mjs.map} +1 -1
- package/dist-lib/chunks/{input-Ci_2-5Te.cjs → input-DqaLFxER.cjs} +2 -2
- package/dist-lib/chunks/{input-Ci_2-5Te.cjs.map → input-DqaLFxER.cjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-BRTgTaO1.mjs → kpi-delta-Bfs_oVpq.mjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-BRTgTaO1.mjs.map → kpi-delta-Bfs_oVpq.mjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-1-gsPFvU.cjs → kpi-delta-wEzw5zSu.cjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-1-gsPFvU.cjs.map → kpi-delta-wEzw5zSu.cjs.map} +1 -1
- package/dist-lib/chunks/{page-header-DrKDiVFN.cjs → page-header-sValhWca.cjs} +2 -2
- package/dist-lib/chunks/{page-header-DrKDiVFN.cjs.map → page-header-sValhWca.cjs.map} +1 -1
- package/dist-lib/chunks/{page-header-DdWp9c-r.mjs → page-header-t5hFIp7o.mjs} +2 -2
- package/dist-lib/chunks/{page-header-DdWp9c-r.mjs.map → page-header-t5hFIp7o.mjs.map} +1 -1
- package/dist-lib/chunks/{panel-DsOKm4Im.mjs → panel-C3puLY_V.mjs} +5 -5
- package/dist-lib/chunks/{panel-DsOKm4Im.mjs.map → panel-C3puLY_V.mjs.map} +1 -1
- package/dist-lib/chunks/{panel-CTbiCa0_.cjs → panel-DmnK2n5_.cjs} +5 -5
- package/dist-lib/chunks/{panel-CTbiCa0_.cjs.map → panel-DmnK2n5_.cjs.map} +1 -1
- package/dist-lib/chunks/{sheet-DIpYkRYS.mjs → sheet-Bjjo4ZaT.mjs} +2 -2
- package/dist-lib/chunks/{sheet-DIpYkRYS.mjs.map → sheet-Bjjo4ZaT.mjs.map} +1 -1
- package/dist-lib/chunks/{sheet-rg6uupt1.cjs → sheet-BrYriaDN.cjs} +2 -2
- package/dist-lib/chunks/{sheet-rg6uupt1.cjs.map → sheet-BrYriaDN.cjs.map} +1 -1
- package/dist-lib/chunks/{toggle-group-C9rrkkmh.cjs → toggle-group-DeoBmogo.cjs} +24 -111
- package/dist-lib/chunks/toggle-group-DeoBmogo.cjs.map +1 -0
- package/dist-lib/chunks/{toggle-group-mXbG8_Jm.mjs → toggle-group-XMgZgL-H.mjs} +111 -198
- package/dist-lib/chunks/toggle-group-XMgZgL-H.mjs.map +1 -0
- package/dist-lib/chunks/{useTheme-Dh3POjCr.cjs → useTheme-BTjHuaT2.cjs} +225 -84
- package/dist-lib/chunks/useTheme-BTjHuaT2.cjs.map +1 -0
- package/dist-lib/chunks/{useTheme-Bk8AYqLr.mjs → useTheme-caPM-I73.mjs} +267 -126
- package/dist-lib/chunks/useTheme-caPM-I73.mjs.map +1 -0
- package/dist-lib/index.cjs +647 -8
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.mjs +1041 -402
- package/dist-lib/index.mjs.map +1 -1
- package/dist-lib/preview/chat.cjs +3 -3
- package/dist-lib/preview/chat.mjs +3 -3
- package/dist-lib/preview/clientes.cjs +6 -6
- package/dist-lib/preview/clientes.mjs +6 -6
- package/dist-lib/preview/dashboard.cjs +4 -4
- package/dist-lib/preview/dashboard.mjs +4 -4
- package/dist-lib/shadcn.cjs +11 -11
- package/dist-lib/shadcn.mjs +153 -153
- package/dist-lib/src/components/index.d.ts +2 -0
- package/dist-lib/src/components/index.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.d.ts +35 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.styles.d.ts +94 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.types.d.ts +50 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.d.ts +32 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.styles.d.ts +111 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.types.d.ts +40 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/index.d.ts +21 -0
- package/dist-lib/src/components/ui/Breadcrumb/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DataTable/parts/data-table-cell-addons.styles.d.ts +3 -3
- package/dist-lib/src/components/ui/Header/header-breadcrumb.d.ts +13 -3
- package/dist-lib/src/components/ui/Header/header-breadcrumb.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Header/header.styles.d.ts +12 -33
- package/dist-lib/src/components/ui/Header/header.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Header/header.types.d.ts +17 -0
- package/dist-lib/src/components/ui/Header/header.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/TabsNavigation/index.d.ts +5 -0
- package/dist-lib/src/components/ui/TabsNavigation/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation-context.d.ts +19 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation-context.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.d.ts +84 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.styles.d.ts +393 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.types.d.ts +99 -0
- package/dist-lib/src/components/ui/TabsNavigation/tabs-navigation.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TabsNavigation/use-arrastar-para-rolar.d.ts +26 -0
- package/dist-lib/src/components/ui/TabsNavigation/use-arrastar-para-rolar.d.ts.map +1 -0
- package/dist-lib/theme.css +15 -0
- package/package.json +1 -1
- package/dist-lib/chunks/avatar-DAmZ7fBZ.cjs.map +0 -1
- package/dist-lib/chunks/avatar-FPbG1TRy.mjs.map +0 -1
- package/dist-lib/chunks/toggle-group-C9rrkkmh.cjs.map +0 -1
- package/dist-lib/chunks/toggle-group-mXbG8_Jm.mjs.map +0 -1
- package/dist-lib/chunks/useTheme-Bk8AYqLr.mjs.map +0 -1
- package/dist-lib/chunks/useTheme-Dh3POjCr.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ChevronRight, Search, Bell, CheckCheck, MoreHorizontal, MessageSquare, PenLine, Maximize2, Sun, Moon,
|
|
1
|
+
import { jsxs, jsx, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, useMemo, Fragment, useEffect, createContext, useContext, useCallback, useRef } from "react";
|
|
3
|
+
import { af as tv, a0 as Popover, a4 as PopoverTrigger, a3 as PopoverContent, l as Command, p as CommandInput, r as CommandList, n as CommandEmpty, o as CommandGroup, q as CommandItem, c as cn, B as Breadcrumb$1, g as BreadcrumbList, i as BreadcrumbSeparator, e as BreadcrumbItem, f as BreadcrumbLink, h as BreadcrumbPage, ae as Button, m as CommandDialog, t as CommandShortcut, s as CommandSeparator, W as InputGroup, X as InputGroupAddon, Z as InputGroupInput, H as DropdownMenu, V as DropdownMenuTrigger, J as DropdownMenuContent, L as DropdownMenuItem, a5 as Tooltip, a8 as TooltipTrigger, a6 as TooltipContent, C as Collapsible, k as CollapsibleTrigger, j as CollapsibleContent, K as DropdownMenuGroup, M as DropdownMenuLabel, Q as DropdownMenuSeparator, a7 as TooltipProvider, A as Avatar, b as AvatarImage, a as AvatarFallback, S as DropdownMenuSub, U as DropdownMenuSubTrigger, T as DropdownMenuSubContent, O as DropdownMenuRadioGroup, P as DropdownMenuRadioItem } from "./avatar-CZRLkTxt.mjs";
|
|
4
|
+
import { ChevronsUpDown, Check, ChevronRight, Search, Bell, CheckCheck, MoreHorizontal, MessageSquare, PenLine, Maximize2, Sun, Moon, PanelLeftOpen, PanelLeftClose, Menu, Plus, ChevronDown, X, User, LayoutGrid, SunMoon, Settings, LogOut } from "lucide-react";
|
|
5
5
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6
6
|
const headerRoot = tv({
|
|
7
7
|
base: [
|
|
@@ -45,27 +45,6 @@ const headerIconBtnBadge = tv({
|
|
|
45
45
|
},
|
|
46
46
|
defaultVariants: { kind: "brand" }
|
|
47
47
|
});
|
|
48
|
-
const breadcrumbRoot = tv({
|
|
49
|
-
base: "flex items-center gap-gp-sm min-w-0"
|
|
50
|
-
});
|
|
51
|
-
const breadcrumbItem = tv({
|
|
52
|
-
base: "font-medium truncate transition-colors leading-none",
|
|
53
|
-
variants: {
|
|
54
|
-
current: {
|
|
55
|
-
true: "text-fg-default font-semibold",
|
|
56
|
-
false: "text-fg-muted hover:text-fg-default cursor-pointer"
|
|
57
|
-
},
|
|
58
|
-
/** Quando único item no breadcrumb (= título da página), font-size sobe pra 16px */
|
|
59
|
-
standalone: {
|
|
60
|
-
true: "text-body-lg",
|
|
61
|
-
false: "text-body-sm font-normal"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
defaultVariants: { current: false, standalone: false }
|
|
65
|
-
});
|
|
66
|
-
const breadcrumbSeparator = tv({
|
|
67
|
-
base: "text-fg-subtle shrink-0"
|
|
68
|
-
});
|
|
69
48
|
const searchFakeInput = tv({
|
|
70
49
|
base: [
|
|
71
50
|
"inline-flex items-center gap-gp-md h-form-md w-[180px]",
|
|
@@ -249,81 +228,239 @@ const hdFooterLink = tv({
|
|
|
249
228
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-brand"
|
|
250
229
|
]
|
|
251
230
|
});
|
|
231
|
+
const breadcrumbSwitcher = tv({
|
|
232
|
+
slots: {
|
|
233
|
+
trigger: [
|
|
234
|
+
"inline-flex max-w-[240px] items-center gap-gp-xs rounded-radius-sm",
|
|
235
|
+
"px-pad-xs py-pad-2xs -mx-pad-xs",
|
|
236
|
+
"font-medium text-fg-default",
|
|
237
|
+
"transition-colors hover:bg-bg-muted",
|
|
238
|
+
"focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring-brand",
|
|
239
|
+
"disabled:pointer-events-none disabled:opacity-60",
|
|
240
|
+
// aberto fica marcado: sem isso, com o dropdown na tela, o gatilho some do olhar
|
|
241
|
+
"data-[state=open]:bg-bg-muted"
|
|
242
|
+
],
|
|
243
|
+
/** O rótulo trunca; o chevron nunca — ele é o que anuncia que dá pra trocar. */
|
|
244
|
+
label: "truncate",
|
|
245
|
+
chevron: "size-icon-xs shrink-0 text-fg-muted",
|
|
246
|
+
content: "w-[300px] p-0",
|
|
247
|
+
title: "px-pad-xl pt-pad-lg pb-pad-sm text-caption-md font-semibold text-fg-subtle",
|
|
248
|
+
/** O rodapé fica FORA da área que rola — “ver todos” não pode fugir com a lista. */
|
|
249
|
+
footer: "border-t border-border-default p-pad-sm",
|
|
250
|
+
item: "flex items-center gap-gp-md",
|
|
251
|
+
itemTexto: "flex min-w-0 flex-1 flex-col",
|
|
252
|
+
itemLabel: "truncate",
|
|
253
|
+
itemDescricao: "truncate text-caption-md text-fg-subtle"
|
|
254
|
+
},
|
|
255
|
+
variants: {
|
|
256
|
+
/**
|
|
257
|
+
* Acompanha o tamanho do caminho. Sem isto o gatilho ficava 13px fixo no meio de irmãos de
|
|
258
|
+
* 14px (medido na doc) — o item que troca é o MESMO item do caminho, não pode ter corpo
|
|
259
|
+
* próprio.
|
|
260
|
+
*/
|
|
261
|
+
size: {
|
|
262
|
+
sm: { trigger: "text-body-sm" },
|
|
263
|
+
md: { trigger: "text-body-md" }
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
defaultVariants: { size: "md" }
|
|
267
|
+
});
|
|
268
|
+
const BreadcrumbSwitcher = forwardRef(
|
|
269
|
+
function BreadcrumbSwitcher2({
|
|
270
|
+
value,
|
|
271
|
+
onValueChange,
|
|
272
|
+
options,
|
|
273
|
+
placeholder,
|
|
274
|
+
title,
|
|
275
|
+
searchPlaceholder = "Buscar…",
|
|
276
|
+
emptyMessage = "Nada encontrado.",
|
|
277
|
+
footer,
|
|
278
|
+
open: openProp,
|
|
279
|
+
onOpenChange,
|
|
280
|
+
align = "start",
|
|
281
|
+
size = "md",
|
|
282
|
+
disabled,
|
|
283
|
+
className,
|
|
284
|
+
contentClassName,
|
|
285
|
+
"aria-label": ariaLabel = "Trocar registro aberto"
|
|
286
|
+
}, ref) {
|
|
287
|
+
const [openInterno, setOpenInterno] = useState(false);
|
|
288
|
+
const open = openProp ?? openInterno;
|
|
289
|
+
const setOpen = (proximo) => {
|
|
290
|
+
setOpenInterno(proximo);
|
|
291
|
+
onOpenChange?.(proximo);
|
|
292
|
+
};
|
|
293
|
+
const estilos = breadcrumbSwitcher({ size });
|
|
294
|
+
const atual = options.find((o) => o.value === value);
|
|
295
|
+
const grupos = useMemo(() => {
|
|
296
|
+
const mapa = /* @__PURE__ */ new Map();
|
|
297
|
+
for (const opcao of options) {
|
|
298
|
+
const chave = opcao.group ?? "";
|
|
299
|
+
const atual2 = mapa.get(chave);
|
|
300
|
+
if (atual2) atual2.push(opcao);
|
|
301
|
+
else mapa.set(chave, [opcao]);
|
|
302
|
+
}
|
|
303
|
+
return [...mapa.entries()];
|
|
304
|
+
}, [options]);
|
|
305
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
306
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
307
|
+
"button",
|
|
308
|
+
{
|
|
309
|
+
ref,
|
|
310
|
+
type: "button",
|
|
311
|
+
"aria-label": ariaLabel,
|
|
312
|
+
"aria-expanded": open,
|
|
313
|
+
disabled,
|
|
314
|
+
className: estilos.trigger({ className }),
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ jsx("span", { className: estilos.label(), children: atual?.label ?? placeholder ?? value }),
|
|
317
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: estilos.chevron(), "aria-hidden": true })
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
) }),
|
|
321
|
+
/* @__PURE__ */ jsx(
|
|
322
|
+
PopoverContent,
|
|
323
|
+
{
|
|
324
|
+
align,
|
|
325
|
+
className: estilos.content({ className: contentClassName }),
|
|
326
|
+
children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
327
|
+
title ? /* @__PURE__ */ jsx("div", { className: estilos.title(), children: title }) : null,
|
|
328
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder }),
|
|
329
|
+
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
330
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }),
|
|
331
|
+
grupos.map(([nomeGrupo, opcoes]) => /* @__PURE__ */ jsx(CommandGroup, { heading: nomeGrupo || void 0, children: opcoes.map((opcao) => {
|
|
332
|
+
const selecionada = opcao.value === value;
|
|
333
|
+
return /* @__PURE__ */ jsx(
|
|
334
|
+
CommandItem,
|
|
335
|
+
{
|
|
336
|
+
"data-atual": selecionada || void 0,
|
|
337
|
+
value: opcao.label,
|
|
338
|
+
keywords: [opcao.value, ...opcao.keywords ?? []],
|
|
339
|
+
onSelect: () => {
|
|
340
|
+
onValueChange(opcao.value);
|
|
341
|
+
setOpen(false);
|
|
342
|
+
},
|
|
343
|
+
className: cn(selecionada && "font-medium text-fg-default"),
|
|
344
|
+
children: /* @__PURE__ */ jsxs("span", { className: estilos.item(), children: [
|
|
345
|
+
opcao.leading,
|
|
346
|
+
/* @__PURE__ */ jsxs("span", { className: estilos.itemTexto(), children: [
|
|
347
|
+
/* @__PURE__ */ jsx("span", { className: estilos.itemLabel(), children: opcao.label }),
|
|
348
|
+
opcao.description ? /* @__PURE__ */ jsx("span", { className: estilos.itemDescricao(), children: opcao.description }) : null
|
|
349
|
+
] }),
|
|
350
|
+
selecionada ? /* @__PURE__ */ jsx(Check, { className: "size-icon-sm shrink-0 text-fg-brand", "aria-hidden": true }) : null
|
|
351
|
+
] })
|
|
352
|
+
},
|
|
353
|
+
opcao.value
|
|
354
|
+
);
|
|
355
|
+
}) }, nomeGrupo || "_"))
|
|
356
|
+
] }),
|
|
357
|
+
footer ? /* @__PURE__ */ jsx("div", { className: estilos.footer(), children: footer }) : null
|
|
358
|
+
] })
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
] });
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
BreadcrumbSwitcher.displayName = "BreadcrumbSwitcher";
|
|
365
|
+
const breadcrumbCaminho = tv({
|
|
366
|
+
slots: {
|
|
367
|
+
lista: "gap-gp-sm sm:gap-gp-sm",
|
|
368
|
+
separador: "shrink-0 text-fg-subtle [&>svg]:size-[14px]",
|
|
369
|
+
item: "truncate transition-colors leading-none"
|
|
370
|
+
},
|
|
371
|
+
variants: {
|
|
372
|
+
size: {
|
|
373
|
+
sm: { item: "text-body-sm font-normal" },
|
|
374
|
+
md: { item: "text-body-md font-normal" }
|
|
375
|
+
},
|
|
376
|
+
/**
|
|
377
|
+
* Item único = título da página. O `HeaderBreadcrumb` fazia isso e é o que mantém o Header
|
|
378
|
+
* pixel a pixel: 16px/600 em vez do 13px da cadeia.
|
|
379
|
+
*/
|
|
380
|
+
sozinho: {
|
|
381
|
+
true: { item: "text-body-lg font-semibold" },
|
|
382
|
+
false: {}
|
|
383
|
+
},
|
|
384
|
+
atual: {
|
|
385
|
+
true: { item: "text-fg-default" },
|
|
386
|
+
false: { item: "text-fg-muted hover:text-fg-default" }
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
defaultVariants: { size: "md", sozinho: false, atual: false }
|
|
390
|
+
});
|
|
391
|
+
function ehSwitcher(item) {
|
|
392
|
+
return Array.isArray(item.switcher) && item.switcher.length > 0 && typeof item.value === "string" && typeof item.onValueChange === "function";
|
|
393
|
+
}
|
|
394
|
+
const Breadcrumb = forwardRef(function Breadcrumb2({ items, size = "md", separator, className, children, ...rest }, ref) {
|
|
395
|
+
if (!items) {
|
|
396
|
+
return /* @__PURE__ */ jsx(Breadcrumb$1, { ref, className, ...rest, children });
|
|
397
|
+
}
|
|
398
|
+
if (items.length === 0) return null;
|
|
399
|
+
const sozinho = items.length === 1;
|
|
400
|
+
const estilos = breadcrumbCaminho({ size, sozinho });
|
|
401
|
+
return /* @__PURE__ */ jsx(Breadcrumb$1, { ref, className, ...rest, children: /* @__PURE__ */ jsx(BreadcrumbList, { className: estilos.lista(), children: items.map((item, i) => {
|
|
402
|
+
const ultimo = i === items.length - 1;
|
|
403
|
+
const clicavel = !ultimo && (item.href !== void 0 || item.onClick !== void 0);
|
|
404
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
405
|
+
i > 0 ? /* @__PURE__ */ jsx(BreadcrumbSeparator, { className: estilos.separador(), children: separator ?? /* @__PURE__ */ jsx(ChevronRight, { strokeWidth: 1.7 }) }) : null,
|
|
406
|
+
/* @__PURE__ */ jsx(BreadcrumbItem, { className: "min-w-0", children: ehSwitcher(item) ? (
|
|
407
|
+
/* Vem ANTES do teste de link: um seletor com `href` continua sendo seletor —
|
|
408
|
+
o clique abre a lista. */
|
|
409
|
+
/* @__PURE__ */ jsx(
|
|
410
|
+
BreadcrumbSwitcher,
|
|
411
|
+
{
|
|
412
|
+
value: item.value,
|
|
413
|
+
onValueChange: item.onValueChange,
|
|
414
|
+
options: item.switcher,
|
|
415
|
+
size,
|
|
416
|
+
title: item.switcherTitle,
|
|
417
|
+
searchPlaceholder: item.switcherSearchPlaceholder,
|
|
418
|
+
emptyMessage: item.switcherEmptyMessage,
|
|
419
|
+
footer: item.switcherFooter,
|
|
420
|
+
"aria-label": item.switcherAriaLabel ?? `Trocar: ${item.label}`
|
|
421
|
+
}
|
|
422
|
+
)
|
|
423
|
+
) : clicavel ? /* @__PURE__ */ jsx(
|
|
424
|
+
BreadcrumbLink,
|
|
425
|
+
{
|
|
426
|
+
href: item.href ?? "#",
|
|
427
|
+
className: estilos.item({ atual: false }),
|
|
428
|
+
onClick: (e) => {
|
|
429
|
+
if (!item.href) e.preventDefault();
|
|
430
|
+
item.onClick?.(e);
|
|
431
|
+
},
|
|
432
|
+
children: item.label
|
|
433
|
+
}
|
|
434
|
+
) : ultimo ? /* @__PURE__ */ jsx(BreadcrumbPage, { className: estilos.item({ atual: true }), children: item.label }) : /* @__PURE__ */ jsx("span", { className: cn(estilos.item({ atual: false }), "cursor-default"), children: item.label }) })
|
|
435
|
+
] }, `${item.label}-${i}`);
|
|
436
|
+
}) }) });
|
|
437
|
+
});
|
|
438
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
252
439
|
function HeaderBreadcrumb({
|
|
253
440
|
items,
|
|
254
441
|
mobileShowLastOnly,
|
|
255
442
|
className
|
|
256
443
|
}) {
|
|
257
444
|
if (items.length === 0) return null;
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
445
|
+
const ultimo = items[items.length - 1];
|
|
446
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
261
447
|
/* @__PURE__ */ jsx(
|
|
262
|
-
|
|
448
|
+
Breadcrumb,
|
|
263
449
|
{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
className
|
|
268
|
-
),
|
|
269
|
-
"aria-label": "Breadcrumb",
|
|
270
|
-
children: items.map((item, idx) => {
|
|
271
|
-
const isLast = idx === items.length - 1;
|
|
272
|
-
const isClickable = !isLast && (item.href !== void 0 || item.onClick !== void 0);
|
|
273
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
274
|
-
idx > 0 && /* @__PURE__ */ jsx(
|
|
275
|
-
ChevronRight,
|
|
276
|
-
{
|
|
277
|
-
size: 14,
|
|
278
|
-
strokeWidth: 1.7,
|
|
279
|
-
className: breadcrumbSeparator(),
|
|
280
|
-
"aria-hidden": "true"
|
|
281
|
-
}
|
|
282
|
-
),
|
|
283
|
-
isClickable ? /* @__PURE__ */ jsx(
|
|
284
|
-
"a",
|
|
285
|
-
{
|
|
286
|
-
href: item.href ?? "#",
|
|
287
|
-
className: breadcrumbItem({
|
|
288
|
-
current: false,
|
|
289
|
-
standalone: isStandalone
|
|
290
|
-
}),
|
|
291
|
-
onClick: (e) => {
|
|
292
|
-
if (!item.href) e.preventDefault();
|
|
293
|
-
item.onClick?.(e);
|
|
294
|
-
},
|
|
295
|
-
children: item.label
|
|
296
|
-
}
|
|
297
|
-
) : /* @__PURE__ */ jsx(
|
|
298
|
-
"span",
|
|
299
|
-
{
|
|
300
|
-
className: breadcrumbItem({
|
|
301
|
-
current: isLast,
|
|
302
|
-
standalone: isStandalone
|
|
303
|
-
}),
|
|
304
|
-
"aria-current": isLast ? "page" : void 0,
|
|
305
|
-
children: item.label
|
|
306
|
-
}
|
|
307
|
-
)
|
|
308
|
-
] }, `${item.label}-${idx}`);
|
|
309
|
-
})
|
|
450
|
+
items,
|
|
451
|
+
size: "sm",
|
|
452
|
+
className: cn("min-w-0", mobileShowLastOnly && "hidden md:block", className)
|
|
310
453
|
}
|
|
311
454
|
),
|
|
312
|
-
mobileShowLastOnly
|
|
313
|
-
|
|
455
|
+
mobileShowLastOnly ? /* @__PURE__ */ jsx(
|
|
456
|
+
Breadcrumb,
|
|
314
457
|
{
|
|
315
|
-
|
|
458
|
+
items: [ultimo],
|
|
459
|
+
size: "sm",
|
|
316
460
|
"aria-label": "Seção atual",
|
|
317
|
-
|
|
318
|
-
"span",
|
|
319
|
-
{
|
|
320
|
-
className: breadcrumbItem({ current: true, standalone: true }),
|
|
321
|
-
"aria-current": "page",
|
|
322
|
-
children: lastItem.label
|
|
323
|
-
}
|
|
324
|
-
)
|
|
461
|
+
className: cn("min-w-0 md:hidden", className)
|
|
325
462
|
}
|
|
326
|
-
)
|
|
463
|
+
) : null
|
|
327
464
|
] });
|
|
328
465
|
}
|
|
329
466
|
function HeaderSearch({
|
|
@@ -349,7 +486,7 @@ function HeaderSearch({
|
|
|
349
486
|
window.addEventListener("keydown", handler);
|
|
350
487
|
return () => window.removeEventListener("keydown", handler);
|
|
351
488
|
}, [hotkey.key, hotkey.meta, hotkey.ctrl]);
|
|
352
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
489
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
353
490
|
/* @__PURE__ */ jsxs(
|
|
354
491
|
"button",
|
|
355
492
|
{
|
|
@@ -399,7 +536,7 @@ function CommandGroupBlock({
|
|
|
399
536
|
isLast,
|
|
400
537
|
onSelect
|
|
401
538
|
}) {
|
|
402
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
539
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
403
540
|
/* @__PURE__ */ jsx(CommandGroup, { heading: group.heading, children: group.items.map((item) => {
|
|
404
541
|
const Icon = item.icon;
|
|
405
542
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1116,7 +1253,7 @@ function Header({
|
|
|
1116
1253
|
}) {
|
|
1117
1254
|
return /* @__PURE__ */ jsxs("header", { className: cn(headerRoot(), className), children: [
|
|
1118
1255
|
/* @__PURE__ */ jsxs("div", { className: headerLeft(), children: [
|
|
1119
|
-
onCollapseMenu && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1256
|
+
onCollapseMenu && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1120
1257
|
/* @__PURE__ */ jsx(
|
|
1121
1258
|
"button",
|
|
1122
1259
|
{
|
|
@@ -1660,7 +1797,7 @@ function SidebarBrandLink({
|
|
|
1660
1797
|
"aria-label": "Home",
|
|
1661
1798
|
children
|
|
1662
1799
|
};
|
|
1663
|
-
if (renderLink) return /* @__PURE__ */ jsx(Fragment, { children: renderLink(linkProps) });
|
|
1800
|
+
if (renderLink) return /* @__PURE__ */ jsx(Fragment$1, { children: renderLink(linkProps) });
|
|
1664
1801
|
return /* @__PURE__ */ jsx("a", { ...linkProps });
|
|
1665
1802
|
}
|
|
1666
1803
|
const SidebarItem = forwardRef(
|
|
@@ -1676,7 +1813,7 @@ const SidebarItem = forwardRef(
|
|
|
1676
1813
|
}, ref) => {
|
|
1677
1814
|
const Icon = item.icon;
|
|
1678
1815
|
const classes = cn(sidebarItem({ active, subitem }), className);
|
|
1679
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1816
|
+
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1680
1817
|
Icon && /* @__PURE__ */ jsx(
|
|
1681
1818
|
Icon,
|
|
1682
1819
|
{
|
|
@@ -1711,7 +1848,7 @@ const SidebarItem = forwardRef(
|
|
|
1711
1848
|
ref,
|
|
1712
1849
|
children: content
|
|
1713
1850
|
};
|
|
1714
|
-
if (renderLink) return /* @__PURE__ */ jsx(Fragment, { children: renderLink(linkProps) });
|
|
1851
|
+
if (renderLink) return /* @__PURE__ */ jsx(Fragment$1, { children: renderLink(linkProps) });
|
|
1715
1852
|
return /* @__PURE__ */ jsx("a", { ...linkProps });
|
|
1716
1853
|
}
|
|
1717
1854
|
return /* @__PURE__ */ jsx(
|
|
@@ -1961,7 +2098,7 @@ function SidebarSectionLink({
|
|
|
1961
2098
|
title,
|
|
1962
2099
|
children
|
|
1963
2100
|
};
|
|
1964
|
-
if (renderLink && href && href !== "#") return /* @__PURE__ */ jsx(Fragment, { children: renderLink(linkProps) });
|
|
2101
|
+
if (renderLink && href && href !== "#") return /* @__PURE__ */ jsx(Fragment$1, { children: renderLink(linkProps) });
|
|
1965
2102
|
return /* @__PURE__ */ jsx("a", { ...linkProps });
|
|
1966
2103
|
}
|
|
1967
2104
|
function SidebarPanel({
|
|
@@ -2025,7 +2162,7 @@ function SidebarPanel({
|
|
|
2025
2162
|
}
|
|
2026
2163
|
)
|
|
2027
2164
|
] }) }),
|
|
2028
|
-
/* @__PURE__ */ jsx("div", { className: sidebarPanelBody(), children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2165
|
+
/* @__PURE__ */ jsx("div", { className: sidebarPanelBody(), children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2029
2166
|
/* @__PURE__ */ jsx("div", { className: sidebarPanelGroup(), children: context.items.map((item) => {
|
|
2030
2167
|
if (item.subitems && item.subitems.length > 0) {
|
|
2031
2168
|
return /* @__PURE__ */ jsx(
|
|
@@ -2159,7 +2296,7 @@ function MenuSidebar({
|
|
|
2159
2296
|
onItemClick?.(item, event);
|
|
2160
2297
|
if (isMobile && item.href) setOpenMobile(false);
|
|
2161
2298
|
};
|
|
2162
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2299
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2163
2300
|
isMobile && openMobile && /* @__PURE__ */ jsx(
|
|
2164
2301
|
"div",
|
|
2165
2302
|
{
|
|
@@ -2568,7 +2705,7 @@ function SingleMenuModuleSelector({
|
|
|
2568
2705
|
onModuleChange
|
|
2569
2706
|
}) {
|
|
2570
2707
|
const s = styles.module;
|
|
2571
|
-
const triggerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2708
|
+
const triggerContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2572
2709
|
/* @__PURE__ */ jsx("div", { className: s.iconContainer, children: icon }),
|
|
2573
2710
|
/* @__PURE__ */ jsxs("div", { className: s.textContainer, children: [
|
|
2574
2711
|
/* @__PURE__ */ jsx("span", { className: s.title, children: title }),
|
|
@@ -2635,7 +2772,7 @@ function SingleMenuCommand({
|
|
|
2635
2772
|
/* @__PURE__ */ jsx(CommandInput, { placeholder }),
|
|
2636
2773
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
2637
2774
|
/* @__PURE__ */ jsx(CommandEmpty, { children: "Nenhum resultado." }),
|
|
2638
|
-
custom ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2775
|
+
custom ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2639
2776
|
leaves.length > 0 && /* @__PURE__ */ jsx(CommandGroup, { heading: "Menu", children: leaves.map((c) => /* @__PURE__ */ jsxs(
|
|
2640
2777
|
CommandItem,
|
|
2641
2778
|
{
|
|
@@ -2672,7 +2809,7 @@ function SingleMenuItem({
|
|
|
2672
2809
|
interceptNavigation
|
|
2673
2810
|
}) {
|
|
2674
2811
|
const s = menuItem({ selected });
|
|
2675
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2812
|
+
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2676
2813
|
/* @__PURE__ */ jsx("div", { className: s.border() }),
|
|
2677
2814
|
/* @__PURE__ */ jsx("span", { className: s.text(), children: label })
|
|
2678
2815
|
] });
|
|
@@ -2697,7 +2834,7 @@ function SingleMenuItem({
|
|
|
2697
2834
|
"aria-current": selected ? "page" : void 0,
|
|
2698
2835
|
children: content
|
|
2699
2836
|
};
|
|
2700
|
-
if (renderLink) return /* @__PURE__ */ jsx(Fragment, { children: renderLink(linkProps) });
|
|
2837
|
+
if (renderLink) return /* @__PURE__ */ jsx(Fragment$1, { children: renderLink(linkProps) });
|
|
2701
2838
|
return /* @__PURE__ */ jsx("a", { ...linkProps });
|
|
2702
2839
|
}
|
|
2703
2840
|
return /* @__PURE__ */ jsx("button", { type: "button", onClick: handleClick, className: s.root(), children: content });
|
|
@@ -2755,7 +2892,7 @@ function SingleMenuCategory({
|
|
|
2755
2892
|
] });
|
|
2756
2893
|
}
|
|
2757
2894
|
if (!hasItems) {
|
|
2758
|
-
const conteudo = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2895
|
+
const conteudo = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2759
2896
|
/* @__PURE__ */ jsx("span", { className: s.icon(), children: icon }),
|
|
2760
2897
|
/* @__PURE__ */ jsx("span", { className: cn(s.text(), styles.textFadeIn), children: label })
|
|
2761
2898
|
] });
|
|
@@ -2773,7 +2910,7 @@ function SingleMenuCategory({
|
|
|
2773
2910
|
"aria-current": selected ? "page" : void 0,
|
|
2774
2911
|
children: conteudo
|
|
2775
2912
|
};
|
|
2776
|
-
if (renderLink) return /* @__PURE__ */ jsx(Fragment, { children: renderLink(linkProps) });
|
|
2913
|
+
if (renderLink) return /* @__PURE__ */ jsx(Fragment$1, { children: renderLink(linkProps) });
|
|
2777
2914
|
return /* @__PURE__ */ jsx("a", { ...linkProps });
|
|
2778
2915
|
}
|
|
2779
2916
|
return /* @__PURE__ */ jsx("button", { type: "button", onClick: handleToggle, className: s.root(), children: conteudo });
|
|
@@ -2818,9 +2955,9 @@ function SingleMenuFooter({
|
|
|
2818
2955
|
}) {
|
|
2819
2956
|
const { expanded } = useSingleMenuSidebar();
|
|
2820
2957
|
const s = styles.footer;
|
|
2821
|
-
const triggerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2958
|
+
const triggerContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2822
2959
|
/* @__PURE__ */ jsx("div", { className: s.avatar, children: avatar ?? /* @__PURE__ */ jsx(User, { className: s.avatarIcon }) }),
|
|
2823
|
-
expanded && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2960
|
+
expanded && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2824
2961
|
/* @__PURE__ */ jsxs("div", { className: s.textContainer, children: [
|
|
2825
2962
|
/* @__PURE__ */ jsx("span", { className: s.name, children: name }),
|
|
2826
2963
|
/* @__PURE__ */ jsx("span", { className: s.email, children: email })
|
|
@@ -3159,7 +3296,7 @@ function UserMenu({
|
|
|
3159
3296
|
/* @__PURE__ */ jsx(Settings, {}),
|
|
3160
3297
|
/* @__PURE__ */ jsx("span", { children: "Configurações" })
|
|
3161
3298
|
] }),
|
|
3162
|
-
onLogout && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3299
|
+
onLogout && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3163
3300
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
3164
3301
|
/* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: onLogout, children: [
|
|
3165
3302
|
/* @__PURE__ */ jsx(LogOut, {}),
|
|
@@ -3467,6 +3604,7 @@ function useTheme() {
|
|
|
3467
3604
|
}
|
|
3468
3605
|
export {
|
|
3469
3606
|
AppShell as A,
|
|
3607
|
+
Breadcrumb as B,
|
|
3470
3608
|
Chip as C,
|
|
3471
3609
|
Header as H,
|
|
3472
3610
|
MenuSidebar as M,
|
|
@@ -3474,26 +3612,29 @@ export {
|
|
|
3474
3612
|
UserMenu as U,
|
|
3475
3613
|
ChipGroup as a,
|
|
3476
3614
|
ChipGroupItem as b,
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3615
|
+
BreadcrumbSwitcher as c,
|
|
3616
|
+
HeaderBreadcrumb as d,
|
|
3617
|
+
HeaderMessages as e,
|
|
3618
|
+
HeaderNotifications as f,
|
|
3619
|
+
HeaderSearch as g,
|
|
3620
|
+
HeaderThemeSwitcher as h,
|
|
3621
|
+
SidebarItem as i,
|
|
3622
|
+
SidebarPanel as j,
|
|
3623
|
+
SidebarPill as k,
|
|
3624
|
+
SidebarRail as l,
|
|
3625
|
+
SidebarSection as m,
|
|
3626
|
+
SidebarSubgroup as n,
|
|
3627
|
+
SingleMenuSidebar as o,
|
|
3628
|
+
breadcrumbCaminho as p,
|
|
3629
|
+
breadcrumbSwitcher as q,
|
|
3630
|
+
chipCount as r,
|
|
3631
|
+
chipVariants as s,
|
|
3632
|
+
isExternalHref as t,
|
|
3495
3633
|
useTheme as u,
|
|
3496
|
-
|
|
3497
|
-
|
|
3634
|
+
isHashHref as v,
|
|
3635
|
+
isModifiedClick as w,
|
|
3636
|
+
shouldPreventNavigation as x,
|
|
3637
|
+
useControllable as y,
|
|
3638
|
+
useMediaQuery as z
|
|
3498
3639
|
};
|
|
3499
|
-
//# sourceMappingURL=useTheme-
|
|
3640
|
+
//# sourceMappingURL=useTheme-caPM-I73.mjs.map
|