@fayz-ai/ui 0.22.0 → 0.23.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/analytics/AnalyticsCard.d.ts.map +1 -1
- package/dist/analytics/AnalyticsControls.d.ts.map +1 -1
- package/dist/analytics/DateRangeControl.d.ts +14 -0
- package/dist/analytics/DateRangeControl.d.ts.map +1 -0
- package/dist/analytics/StatementTable.d.ts +22 -0
- package/dist/analytics/StatementTable.d.ts.map +1 -0
- package/dist/analytics/context.d.ts +8 -0
- package/dist/analytics/context.d.ts.map +1 -1
- package/dist/analytics/derive.d.ts +13 -0
- package/dist/analytics/derive.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +7 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/statement.d.ts +58 -0
- package/dist/analytics/statement.d.ts.map +1 -0
- package/dist/{chunk-E44WOPCR.js → chunk-HO2P2XB4.js} +428 -58
- package/dist/chunk-HO2P2XB4.js.map +1 -0
- package/dist/{chunk-7G3O54CC.js → chunk-L4TXDKMN.js} +5 -5
- package/dist/chunk-L4TXDKMN.js.map +1 -0
- package/dist/{chunk-DHNUZF2X.js → chunk-OWN3GFDG.js} +4 -3
- package/dist/chunk-OWN3GFDG.js.map +1 -0
- package/dist/{chunk-PQUS22JE.js → chunk-RRNMNFLF.js} +483 -794
- package/dist/chunk-RRNMNFLF.js.map +1 -0
- package/dist/chunk-UP7WVKSU.js +631 -0
- package/dist/chunk-UP7WVKSU.js.map +1 -0
- package/dist/{chunk-ZSOT7KTE.js → chunk-XEUIYSW2.js} +321 -361
- package/dist/chunk-XEUIYSW2.js.map +1 -0
- package/dist/{chunk-SUSW4LSW.js → chunk-XKFYX3DG.js} +5 -5
- package/dist/{chunk-SUSW4LSW.js.map → chunk-XKFYX3DG.js.map} +1 -1
- package/dist/dashboard/index.js +4 -4
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +672 -87
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.d.ts +7 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/ShellSearch.d.ts +53 -0
- package/dist/layout/ShellSearch.d.ts.map +1 -0
- package/dist/layout/Sidebar.d.ts +10 -6
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Takeover.d.ts.map +1 -1
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +4 -4
- package/dist/primitives/data-table.d.ts.map +1 -1
- package/dist/primitives/date-range-chip.d.ts +32 -0
- package/dist/primitives/date-range-chip.d.ts.map +1 -0
- package/dist/primitives/header-tabs.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +2 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +5 -5
- package/dist/primitives/list-view.d.ts +43 -1
- package/dist/primitives/list-view.d.ts.map +1 -1
- package/dist/primitives/modal.d.ts +2 -0
- package/dist/primitives/modal.d.ts.map +1 -1
- package/dist/primitives/page-actions.d.ts +14 -0
- package/dist/primitives/page-actions.d.ts.map +1 -1
- package/dist/primitives/page-toolbar.d.ts +16 -1
- package/dist/primitives/page-toolbar.d.ts.map +1 -1
- package/dist/primitives/segmented-control.d.ts.map +1 -1
- package/dist/stores/layout.store.d.ts +20 -1
- package/dist/stores/layout.store.d.ts.map +1 -1
- package/dist/styles.css +58 -0
- package/package.json +2 -2
- package/dist/chunk-7G3O54CC.js.map +0 -1
- package/dist/chunk-DHNUZF2X.js.map +0 -1
- package/dist/chunk-E44WOPCR.js.map +0 -1
- package/dist/chunk-HKGTF2YA.js +0 -117
- package/dist/chunk-HKGTF2YA.js.map +0 -1
- package/dist/chunk-PQUS22JE.js.map +0 -1
- package/dist/chunk-ZSOT7KTE.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -1007,6 +1007,32 @@ html {
|
|
|
1007
1007
|
height: 100dvh;
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
|
+
/* A cor da superfície onde a PÁGINA é desenhada, publicada como variável.
|
|
1011
|
+
Quem repinta essa superfície — uma faixa `sticky` que passa por cima do
|
|
1012
|
+
conteúdo, e por isso precisa ser opaca — não pode escolher entre `background`
|
|
1013
|
+
e `content` por conta: isso depende de a shell estar emoldurada ou não, e
|
|
1014
|
+
só a shell sabe. Ela marca a coluna do conteúdo e todo mundo lê daqui. */
|
|
1015
|
+
.fz-page-surface { --page-surface: hsl(var(--background)); }
|
|
1016
|
+
@media (min-width: 768px) {
|
|
1017
|
+
.fz-page-surface[data-frame='true'] { --page-surface: hsl(var(--content)); }
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/* A faixa do cabeçalho não é um cartão.
|
|
1021
|
+
O segmented nasce com o chrome de botão — contorno fino + bevel sobre
|
|
1022
|
+
superfície de cartão — e isso é certo NA PÁGINA. Na faixa escura da shell o
|
|
1023
|
+
mesmo contorno vira um risco branco em volta da pastilha, e o bevel um
|
|
1024
|
+
segundo risco logo abaixo: duas linhas claras desenhando uma caixa que não
|
|
1025
|
+
existe. Mesma peça, chrome de faixa: a trilha ganha a superfície do trilho e
|
|
1026
|
+
dispensa moldura, e quem marca a opção ativa continua sendo o contraste.
|
|
1027
|
+
Só no desktop — no celular esta barra volta a ser cartão. */
|
|
1028
|
+
@media (min-width: 768px) {
|
|
1029
|
+
.fz-on-band .fz-segmented {
|
|
1030
|
+
border-color: transparent;
|
|
1031
|
+
background-color: hsl(var(--sidebar-accent));
|
|
1032
|
+
box-shadow: none;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1010
1036
|
/* How much of the bottom of the screen the tab bar owns. Anything that floats
|
|
1011
1037
|
above the fold — the save bar, toasts, a sheet handle — offsets by this
|
|
1012
1038
|
instead of hardcoding the bar's height, so it still sits right on a layout
|
|
@@ -1197,3 +1223,35 @@ html {
|
|
|
1197
1223
|
@media (prefers-reduced-motion: reduce) {
|
|
1198
1224
|
.saas-takeover-in, .saas-takeover-out { animation-duration: 1ms; }
|
|
1199
1225
|
}
|
|
1226
|
+
|
|
1227
|
+
/* O esqueleto do rail entra por opacidade, não por montagem.
|
|
1228
|
+
Ele ocupa a altura da coluna desde o primeiro quadro da espera; o atraso
|
|
1229
|
+
aqui é o que faz uma resposta rápida nunca mostrar barra cinza nenhuma.
|
|
1230
|
+
Ver packages/ui/src/layout/Sidebar.tsx. */
|
|
1231
|
+
@keyframes fz-rail-skeleton {
|
|
1232
|
+
from { opacity: 0; }
|
|
1233
|
+
to { opacity: 1; }
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/* Classe escrita a mao de proposito. A forma utilitaria
|
|
1237
|
+
(`motion-safe:animate-[fz-rail-skeleton_...]`) so existe se o Tailwind do
|
|
1238
|
+
APP varrer packages/ui/src — e os apps nao varrem. O esqueleto montava com
|
|
1239
|
+
animation:none e ficava preso em opacity:0: presente no DOM, invisivel na
|
|
1240
|
+
tela. Sem animacao disponivel, a regra abaixo garante que ele apareca. */
|
|
1241
|
+
.fz-rail-skeleton {
|
|
1242
|
+
opacity: 0;
|
|
1243
|
+
animation: fz-rail-skeleton 240ms ease-out 140ms forwards;
|
|
1244
|
+
}
|
|
1245
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1246
|
+
.fz-rail-skeleton { opacity: 1; animation: none; }
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/* As barras, pelo mesmo motivo: `bg-sidebar-foreground/10` tambem nao e
|
|
1250
|
+
gerada, e elas sairam transparentes — barras com tamanho certo e cor
|
|
1251
|
+
nenhuma. `currentColor` herda a cor do rail, entao o esqueleto acompanha a
|
|
1252
|
+
marca de cada conta sem ninguem declarar cor. */
|
|
1253
|
+
.fz-rail-skeleton span {
|
|
1254
|
+
background-color: currentColor;
|
|
1255
|
+
opacity: 0.12;
|
|
1256
|
+
border-radius: 0.25rem;
|
|
1257
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"fayz": {
|
|
4
4
|
"status": "beta"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.23.0",
|
|
7
7
|
"description": "Fayz SDK UI — Radix + Tailwind component library with CRUD engine and layout shells",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"sideEffects": [
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"clsx": "^2.1.0",
|
|
80
80
|
"recharts": "^2.15.0",
|
|
81
81
|
"tailwind-merge": "^2.4.0",
|
|
82
|
-
"@fayz-ai/core": "^0.
|
|
82
|
+
"@fayz-ai/core": "^0.23.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/react": "^18.3.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/layout/AppShellSkeleton.tsx","../src/layout/Takeover.tsx","../src/layout/page-trail.tsx","../src/layout/ContentSplit.tsx"],"names":["jsx","jsxs","React3"],"mappings":";;;;;;;;AAqCO,SAAS,WAAA,CAAY,EAAE,SAAA,EAAU,EAA2B;AACjE,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,EAAA;AAAA,QACT,8FAAA;AAAA,QACA,6FAAA;AAAA,QACA;AAAA;AACF;AAAA,GACF;AAEJ;AAEO,SAAS,gBAAA,CAAiB,EAAE,KAAA,EAAO,SAAA,EAAU,EAA0B;AAC5E,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,WAAA,EAAU,MAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,8EAAA,EAAgF,SAAS,CAAA;AAAA,MAEvG,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAW,QAAA,EAAA,KAAA,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A,EAAA;AAAA,wBAAAD,GAAAA,CAAC,cAAY,QAAA,EAAA,UAAA,EAAW,CAAA;AAAA,QACvB,gBAAA,oBAAoBA,GAAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,gBAAA,EAAiB;AAAA,OAAA,EAC3D,CAAA;AAAA,sBACAA,GAAAA,CAAC,SAAA,EAAA,EAAW,QAAA,EAAA,KAAA,EAAM;AAAA,KAAA,EACpB,GACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;AAWO,SAAS,mBAAA,CAAoB,EAAE,KAAA,EAAO,QAAA,EAAU,WAAU,EAA6B;AAC5F,EAAA,MAAM,GAAA,GAAYE,kBAAW,mBAAmB,CAAA;AAChD,EAAA,IAAI,CAAC,KAAK,OAAO,IAAA;AACjB,EAAA,uBACED,IAAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,SAAA;AAAA,MACR,IAAA,EAAK,IAAA;AAAA,MACL,OAAA,EAAS,MAAM,GAAA,CAAI,OAAA,CAAQ,IAAI,CAAA;AAAA,MAC/B,SAAA,EAAW,EAAA,CAAG,WAAA,EAAa,SAAS,CAAA;AAAA,MACpC,YAAA,EAAY,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,MAAA;AAAA,MAEhD,QAAA,EAAA;AAAA,wBAAAD,GAAAA,CAAC,cAAW,SAAA,EAAW,EAAA,CAAG,WAAW,CAAC,QAAA,IAAY,QAAQ,CAAA,EAAG,CAAA;AAAA,QAC5D,CAAC,QAAA,IAAY;AAAA;AAAA;AAAA,GAChB;AAEJ","file":"chunk-7G3O54CC.js","sourcesContent":["import * as React from 'react'\nimport { cn } from '../lib/cn'\n\n// ---------------------------------------------------------------------------\n// AppShellSkeleton — what the admin shows while it is still booting (session\n// restore, plugin runtime, first paint).\n//\n// It used to draw the SHAPE of the shell: rail, header band, tiles, table. The\n// idea was that the app would resolve into its own outline. What it did in\n// practice was promise a specific screen and then contradict it — the outline\n// is a dashboard, and half the time you were opening something else — and the\n// pulsing bars read as content that failed to load rather than content on its\n// way. Worse, it made the wait look LONGER: a page of fake rows holds the eye,\n// so every extra frame of it registers.\n//\n// One spinner on the rail's own color says exactly as much (the app is coming)\n// and nothing false. It also matches the HTML boot screen the Vite plugin\n// injects (see @fayz-ai/sdk boot-skeleton), so the whole cold load is one\n// continuous image — same background, same spinner, in the same place — from\n// first paint to mounted app, with nothing swapping underneath.\n// ---------------------------------------------------------------------------\n\nexport interface AppShellSkeletonProps {\n /** Kept for API compatibility. The boot screen no longer draws a shell shape,\n * so every layout gets the same one. */\n variant?: 'sidebar' | 'topbar' | 'minimal'\n /** Kept for API compatibility; the boot screen has no content frame. */\n contentFrame?: boolean\n /** Kept for API compatibility; the boot screen shows no logo. */\n logo?: React.ReactNode\n /** What is loading, for screen readers. */\n label: string\n className?: string\n}\n\n/** Ring spinner in the page's foreground tone. Static under reduced motion —\n * the ring alone still reads as \"busy\", a frozen spinner reads as \"stuck\". */\nexport function BootSpinner({ className }: { className?: string }) {\n return (\n <span\n aria-hidden\n className={cn(\n 'block h-7 w-7 animate-spin rounded-full border-2 border-foreground/20 border-t-foreground/70',\n 'motion-reduce:animate-none motion-reduce:border-t-foreground/20 motion-reduce:animate-pulse',\n className,\n )}\n />\n )\n}\n\nexport function AppShellSkeleton({ label, className }: AppShellSkeletonProps) {\n return (\n <div\n role=\"status\"\n aria-busy=\"true\"\n className={cn('fz-viewport-h flex items-center justify-center overflow-hidden bg-background', className)}\n >\n <span className=\"sr-only\">{label}</span>\n <BootSpinner />\n </div>\n )\n}\nAppShellSkeleton.displayName = 'AppShellSkeleton'\n","import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { X } from 'lucide-react'\nimport { cn } from '../lib/cn'\n\n/**\n * A full-viewport surface that covers the shell — rail, topbar and page — and\n * gives it back untouched on close.\n *\n * Not a route: the page underneath stays MOUNTED, so a filtered list, a scroll\n * position or a half-typed form survives a trip through the counter. That is\n * the whole reason this is not `immersive: true` on a route, which unmounts the\n * page you left and re-runs its queries on the way back.\n *\n * The back button closes it. Opening pushes a history entry with no URL change,\n * so `popstate` reads as \"leave this mode\" instead of navigating the page under\n * the takeover — which is what a browser Back would otherwise do while the\n * operator can only see the takeover.\n *\n * `Esc` does NOT close: an operator surface owns that key (it clears the\n * command field). The way out is the corner control, or Shift+Esc for the\n * keyboard.\n */\n\n/**\n * The way out, for anything rendered inside a takeover.\n *\n * A surface that offers its own exit — the counter's Balcão ⇄ Retaguarda switch\n * lives in the POS's own rail — needs the SAME close the corner X uses: the one\n * that pops the history entry the takeover pushed. A plain `setOpen(false)`\n * leaves that entry behind and the next Back press goes nowhere.\n */\nconst TakeoverCloseContext = createContext<() => void>(() => {})\nexport function useTakeoverClose(): () => void {\n return useContext(TakeoverCloseContext)\n}\n\nexport interface TakeoverProps {\n open: boolean\n onClose: () => void\n /** Accessible name for the dialog. */\n label: string\n /** Point the panel grows from — usually the rect of the row that opened it. */\n origin?: { x: number; y: number } | null\n closeLabel?: string\n /**\n * Hash path the URL wears while this is open (e.g. `/pos`), so a refresh\n * comes back to the takeover instead of to the page under it.\n *\n * `pushState` does not emit `hashchange`, which is exactly what makes this\n * safe: the URL says where you are without the hash router unmounting the\n * page underneath. Closing goes back, and THAT does emit it — the router\n * lands on the path it was already showing.\n *\n * The host is responsible for reopening on a cold load at this path.\n */\n route?: string\n /** Extra chrome beside the close button (terminal name, operator, clock). */\n corner?: React.ReactNode\n children: React.ReactNode\n}\n\ntype Phase = 'closed' | 'opening' | 'open' | 'closing'\n\nconst EXIT_MS = 220\n\nexport function Takeover({\n open, onClose, label, origin, closeLabel = 'Fechar', route, corner, children,\n}: TakeoverProps) {\n const [phase, setPhase] = useState<Phase>(open ? 'open' : 'closed')\n const panelRef = useRef<HTMLDivElement>(null)\n // The URL this replaced, and whether the entry it pushed is still there.\n // Closing puts the address back rather than counting history entries — a\n // count is wrong the moment anything else touches history in between.\n const pushed = useRef(false)\n const prevUrl = useRef('')\n\n useEffect(() => {\n if (open) {\n setPhase((p) => (p === 'closed' || p === 'closing' ? 'opening' : p))\n const id = requestAnimationFrame(() => setPhase('open'))\n return () => cancelAnimationFrame(id)\n }\n setPhase((p) => (p === 'closed' ? 'closed' : 'closing'))\n const t = setTimeout(() => setPhase('closed'), EXIT_MS)\n return () => clearTimeout(t)\n }, [open])\n\n // Body scroll lock — the takeover scrolls internally, and a shell that keeps\n // scrolling behind it moves the page you are meant to come back to.\n useEffect(() => {\n if (phase === 'closed') return\n const prev = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n return () => { document.body.style.overflow = prev }\n }, [phase])\n\n useEffect(() => {\n if (!open) return\n prevUrl.current = location.href\n history.pushState({ ...history.state, fzTakeover: label }, '', route ? `#${route}` : undefined)\n pushed.current = true\n const onPop = () => { pushed.current = false; onClose() }\n window.addEventListener('popstate', onPop)\n return () => window.removeEventListener('popstate', onPop)\n }, [open, label, route, onClose])\n\n const close = useCallback(() => {\n // `replaceState`, not `back()`: the address returns to exactly what it was,\n // and the router — which never saw the push, since pushState emits no\n // `hashchange` — is already showing that page. Going back instead depends\n // on the pushed entry still being the top one, which nothing guarantees.\n if (pushed.current) {\n pushed.current = false\n if (prevUrl.current) history.replaceState(history.state, '', prevUrl.current)\n }\n onClose()\n }, [onClose])\n\n useEffect(() => {\n if (!open) return\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && e.shiftKey) { e.preventDefault(); close() }\n }\n window.addEventListener('keydown', onKey)\n return () => window.removeEventListener('keydown', onKey)\n }, [open, close])\n\n // Focus lands inside on arrival; without it the keyboard is still in the rail\n // and the first shortcut goes to the page nobody can see.\n useEffect(() => {\n if (phase === 'open') panelRef.current?.focus({ preventScroll: true })\n }, [phase])\n\n if (phase === 'closed') return null\n\n const active = phase === 'open'\n const originStyle = origin\n ? { transformOrigin: `${origin.x}px ${origin.y}px` }\n : undefined\n\n return createPortal(\n <TakeoverCloseContext.Provider value={close}>\n <div className=\"fixed inset-0 z-[120]\" role=\"dialog\" aria-modal=\"true\" aria-label={label}>\n <div\n aria-hidden\n className={cn(\n 'absolute inset-0 bg-black/60 backdrop-blur-[2px] transition-opacity duration-200',\n active ? 'opacity-100' : 'opacity-0',\n )}\n />\n <div\n ref={panelRef}\n tabIndex={-1}\n style={originStyle}\n className={cn(\n 'saas-takeover-panel absolute inset-0 overflow-hidden bg-background outline-none',\n active ? 'saas-takeover-in' : 'saas-takeover-out',\n )}\n >\n {children}\n </div>\n\n {/* Above the panel, not inside it: the surface under the takeover draws\n its own chrome and must not have to reserve a corner for ours. */}\n <div className=\"pointer-events-none absolute right-0 top-0 z-10 flex items-center gap-2 p-3\">\n {corner}\n <button\n type=\"button\"\n onClick={close}\n aria-label={closeLabel}\n title={`${closeLabel} · Shift+Esc`}\n className={cn(\n 'fz-tap pointer-events-auto flex h-10 w-10 items-center justify-center rounded-full',\n 'bg-black/40 text-white/80 backdrop-blur transition-colors',\n 'hover:bg-black/60 hover:text-white',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60',\n )}\n >\n <X className=\"h-5 w-5\" />\n </button>\n </div>\n </div>\n </TakeoverCloseContext.Provider>,\n document.body,\n )\n}\n","import * as React from 'react'\n\n// ---------------------------------------------------------------------------\n// PageTrail — quem é o PAI da tela que está desenhando agora.\n//\n// Uma migalha (\"← Entrega / Embalagens\") precisa de duas coisas que moram em\n// lugares diferentes: o nome do nível de cima, que só o container sabe, e o\n// nome do nível atual, que só a folha sabe. Sem um caminho entre os dois cada\n// container desenhava a própria seta \"para não perder o caminho de volta\" — e\n// foi assim que Configurações ficou com dois cabeçalhos empilhados: um da\n// barra da shell (\"Configurações\") e um escrito à mão dentro do plugin\n// (\"← Entrega\"), desalinhados, para uma coisa só.\n//\n// Aqui o container apenas DECLARA o nível dele. Quem desenha é sempre a folha,\n// uma vez só, pelo mesmo PageHeader que o resto do app usa — uma seta na tela,\n// nunca duas.\n// ---------------------------------------------------------------------------\n\nexport interface PageTrailCrumb {\n /** Nome do nível — a palavra antes da barra para quem vem abaixo. */\n label: string\n /** Rota (hash) deste nível. É também a IDENTIDADE dele: uma tela cuja rota é\n * igual à do nível não é filha dele, é ele — sem isso a lista de Locais,\n * que É a aba, viraria \"← Locais / Locais\". */\n href: string\n /** Como voltar. Sem isso, a própria rota. */\n onNavigate?: () => void\n}\n\nconst EMPTY: PageTrailCrumb[] = []\nconst PageTrailContext = React.createContext<PageTrailCrumb[]>(EMPTY)\n\n/** Declara um nível para tudo que renderizar abaixo. */\nexport function PageTrail({\n label,\n href,\n onNavigate,\n children,\n}: PageTrailCrumb & { children: React.ReactNode }) {\n const parent = React.useContext(PageTrailContext)\n // Identidade estável: a folha memoiza o nó do cabeçalho a partir daqui, e um\n // array novo a cada render faria a reivindicação da barra recomeçar sem fim.\n const trail = React.useMemo(\n () => [...parent, { label, href, onNavigate }],\n [parent, label, href, onNavigate],\n )\n return <PageTrailContext.Provider value={trail}>{children}</PageTrailContext.Provider>\n}\n\nexport function usePageTrail(): PageTrailCrumb[] {\n return React.useContext(PageTrailContext)\n}\n\n/**\n * O nível imediatamente acima de `href`, ou undefined quando não há trilha —\n * fora de Configurações a página segue sem migalha, como sempre foi.\n */\nexport function usePageTrailParent(href?: string): PageTrailCrumb | undefined {\n const trail = React.useContext(PageTrailContext)\n return React.useMemo(() => {\n const above = href ? trail.filter((c) => c.href !== href) : trail\n return above[above.length - 1]\n }, [trail, href])\n}\n\nexport function navigateToCrumb(crumb: PageTrailCrumb): void {\n if (crumb.onNavigate) crumb.onNavigate()\n else window.location.hash = crumb.href\n}\n","import * as React from 'react'\nimport { PanelRight, PanelRightClose, PanelRightOpen } from 'lucide-react'\nimport { cn } from '../lib/cn'\nimport { Button } from '../primitives/button'\nimport {\n Sheet, SheetContent, SheetHeader, SheetBody, SheetTitle, SheetDescription,\n} from '../primitives/sheet'\n\n// ---------------------------------------------------------------------------\n// ContentSplit — main content with a right-aligned companion panel, mobile\n// first. Below `lg` the aside lives in a right Sheet (opened by a trigger the\n// host places wherever fits — typically SubpageHeader actions, via\n// <ContentSplitTrigger/>). From `lg` up it docks as a sticky right column.\n//\n// Pairs with SubpageHeader/ModulePage: the page keeps its own back-button\n// header; ContentSplit only owns the columns below it. Reuse for any\n// \"document + operational panel\" page (script + shooting checklist, form +\n// help, detail + activity feed).\n// ---------------------------------------------------------------------------\n\ninterface ContentSplitContextValue {\n open: boolean\n setOpen: (open: boolean) => void\n}\n\nconst ContentSplitContext = React.createContext<ContentSplitContextValue | null>(null)\n\nexport interface ContentSplitProps {\n /** Main column (the document). */\n children: React.ReactNode\n /** Companion panel content (the checklist / help / activity). */\n aside: React.ReactNode\n /** Panel title — Sheet header on mobile, card header on desktop. */\n asideTitle: React.ReactNode\n /** Optional subtitle under the title. */\n asideDescription?: React.ReactNode\n /** Desktop column width (defaults to 20rem). */\n asideWidth?: string\n /** Controlled mobile-sheet state; uncontrolled when omitted. */\n asideOpen?: boolean\n onAsideOpenChange?: (open: boolean) => void\n /** Desktop column can collapse into a slim reopen rail. */\n collapsible?: boolean\n /** Initial desktop collapsed state (e.g. expand only on the relevant day). */\n defaultCollapsed?: boolean\n className?: string\n}\n\nexport function ContentSplit({\n children,\n aside,\n asideTitle,\n asideDescription,\n asideWidth = '20rem',\n asideOpen,\n onAsideOpenChange,\n collapsible = false,\n defaultCollapsed = false,\n className,\n}: ContentSplitProps) {\n const [internalOpen, setInternalOpen] = React.useState(false)\n const open = asideOpen ?? internalOpen\n const setOpen = onAsideOpenChange ?? setInternalOpen\n const [collapsed, setCollapsed] = React.useState(collapsible && defaultCollapsed)\n\n return (\n <ContentSplitContext.Provider value={{ open, setOpen }}>\n <div\n className={cn('lg:grid lg:items-start lg:gap-6', className)}\n style={{ gridTemplateColumns: `minmax(0, 1fr) ${collapsed ? 'auto' : asideWidth}` }}\n >\n <div className=\"min-w-0\">{children}</div>\n\n {/* Desktop: docked sticky column (or slim reopen rail when collapsed) */}\n <aside className=\"hidden lg:block lg:sticky lg:top-4\">\n {collapsed ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setCollapsed(false)}\n className=\"h-9 w-9 p-0\"\n aria-label={typeof asideTitle === 'string' ? asideTitle : undefined}\n title={typeof asideTitle === 'string' ? asideTitle : undefined}\n >\n <PanelRightOpen className=\"h-4 w-4\" />\n </Button>\n ) : (\n <div className=\"rounded-card border border-border bg-card\">\n <div className=\"flex items-start justify-between gap-2 border-b border-border px-4 py-3\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-semibold text-foreground\">{asideTitle}</p>\n {asideDescription && (\n <p className=\"mt-0.5 text-xs text-muted-foreground\">{asideDescription}</p>\n )}\n </div>\n {collapsible && (\n <button\n type=\"button\"\n onClick={() => setCollapsed(true)}\n className=\"rounded p-1 text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground\"\n aria-label=\"collapse\"\n >\n <PanelRightClose className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n <div className=\"p-4\">{aside}</div>\n </div>\n )}\n </aside>\n </div>\n\n {/* Mobile: right sheet */}\n <div className=\"lg:hidden\">\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetContent width=\"max-w-sm\">\n <SheetHeader>\n <SheetTitle>{asideTitle}</SheetTitle>\n {asideDescription && <SheetDescription>{asideDescription}</SheetDescription>}\n </SheetHeader>\n <SheetBody>{aside}</SheetBody>\n </SheetContent>\n </Sheet>\n </div>\n </ContentSplitContext.Provider>\n )\n}\n\nexport interface ContentSplitTriggerProps {\n /** Accessible label; also the visible text unless `iconOnly`. */\n label: React.ReactNode\n iconOnly?: boolean\n className?: string\n}\n\n/** Opens the mobile aside sheet. Renders nothing from `lg` up (the panel is\n * already docked). Place inside SubpageHeader `actions` or any toolbar. */\nexport function ContentSplitTrigger({ label, iconOnly, className }: ContentSplitTriggerProps) {\n const ctx = React.useContext(ContentSplitContext)\n if (!ctx) return null\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => ctx.setOpen(true)}\n className={cn('lg:hidden', className)}\n aria-label={typeof label === 'string' ? label : undefined}\n >\n <PanelRight className={cn('h-4 w-4', !iconOnly && 'mr-1.5')} />\n {!iconOnly && label}\n </Button>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives/brand-marks.tsx","../src/icons.ts"],"names":["ChefControlMark"],"mappings":";;;;;AA+BO,IAAM,eAAA,GAAwB,KAAA,CAAA,UAAA;AAAA,EACnC,SAASA,gBAAAA,CAAgB,KAAA,EAAO,GAAA,EAAK;AACnC,IAAA;AAAA;AAAA;AAAA,sBAGE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,OAAA,EAAQ,8BAA6B,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,IAAA,EAAE,GAAG,KAAA,EACtF,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,2mDAA0mD,CAAA,EACpnD;AAAA;AAAA,EAEJ;AACF;AAGO,IAAM,WAAA,GAA0C;AAAA,EACrD;AACF;ACZA,IAAM,QAAA,GAAuC;AAAA,EAC3C,QAAA;AAAA,EAAU,aAAA;AAAA,EAAe,KAAA;AAAA,EAAO,eAAA;AAAA,EAAiB,cAAA;AAAA,EAAgB,cAAA;AAAA,EAAgB,aAAA;AAAA,EAAe,YAAA;AAAA,EAChG,KAAA;AAAA,EAAO,eAAA;AAAA,EAAiB,GAAA;AAAA,EAAK,QAAA;AAAA,EAAU,SAAA;AAAA,EAAW,IAAA;AAAA,EAAM,IAAA;AAAA,EAAM,IAAA;AAAA,EAAM,QAAA;AAAA,EACpE,aAAA;AAAA,EAAe,GAAA;AAAA,EAAK,KAAA;AAAA,EAAO,SAAA;AAAA,EAAW,SAAA;AAAA,EAAW,UAAA;AAAA,EAAY,QAAA;AAAA,EAAU,aAAA;AAAA,EAAe,cAAA;AAAA,EACtF,aAAA;AAAA,EAAe,YAAA;AAAA,EAAc,YAAA;AAAA,EAAc,aAAA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B,MAAA;AAAA,EAAQ,SAAA;AAAA,EAAW,KAAA;AAAA,EAAO,QAAA;AAAA,EAAU,MAAA;AAAA,EAAQ,CAAA;AAAA,EAAG,OAAA;AAAA,EACxE,GAAA;AAAA;AAAA;AAAA;AAAA,EAIA,GAAG;AACL,CAAA;AAGO,SAAS,cAAc,KAAA,EAAyC;AACrE,EAAA,MAAA,CAAO,MAAA,CAAO,UAAU,KAAK,CAAA;AAC/B;AAGO,SAAS,cAAc,IAAA,EAAsC;AAClE,EAAA,OAAO,SAAS,IAAI,CAAA;AACtB;AAGO,IAAM,QAAA,GAAW","file":"chunk-DHNUZF2X.js","sourcesContent":["import * as React from 'react'\nimport type { LucideIcon } from 'lucide-react'\n\n// ---------------------------------------------------------------------------\n// The Control family's own product marks.\n//\n// Every other tile in the app switcher is a lucide glyph named by a row in\n// `app.apps`, which is fine for a product that has no mark of its own. It is\n// not fine for one that does: ChefControl's symbol has weight hierarchy — thin\n// crown, heavy base, the same contrast as the logotype beside it — and lucide's\n// `ChefHat` draws the same object at constant stroke. The launcher is where a\n// product is recognised rather than read, so the row that shows a stand-in is\n// the row that says \"this app has no brand\".\n//\n// They live in the registry rather than in each app because the switcher lists\n// SIBLINGS: StoreControl draws the Chef row too, and a mark that only the app\n// itself owns would leave the same product looking like two different products\n// depending on which window you opened the menu from.\n//\n// `fill=\"currentColor\"` and no stroke: the tile decides the ink (see AppMark),\n// the same way a surface decides the colour of the text beside it — one drawing\n// for the gold tile, the rail and the login card, with no per-surface file and\n// no `filter: invert`, which chews the anti-aliased edge.\n// ---------------------------------------------------------------------------\n\n/**\n * Typed as a lucide icon so it can sit in the same registry: the props a mark\n * actually reads are `className` and `style`, and the stroke props the callers\n * pass mean nothing to a filled path — harmless, and not worth a second\n * resolver to avoid.\n */\nexport const ChefControlMark = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(\n function ChefControlMark(props, ref) {\n return (\n // The viewBox is the symbol's ink box, not the 1080 square of the source\n // file: cropped, the hat centres in a tile instead of floating in padding.\n <svg ref={ref} viewBox=\"140.2 147.83 799.59 784.35\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M871.42,305.72c-8.6-6.71-17.86-12.68-27.66-17.78-25.93-13.54-55.59-21.23-87.13-21.23-8.66,0-17.18.58-25.51,1.7-33.22-70.59-106.31-120.58-191.12-120.58s-157.93,49.99-191.12,120.61h-.03c-8.33-1.15-16.85-1.73-25.51-1.73-32.62,0-63.27,8.24-89.79,22.68-9.74,5.27-18.94,11.41-27.45,18.27-40.27,32.41-65.9,81.19-65.9,135.73,0,93.23,74.89,169.64,169.82,176.21,3.88,33.85,5.91,68.69,5.91,104.24,0,45.93-3.38,90.64-9.77,133.6-2,13.45-4.3,26.71-6.87,39.79,13.5-3.43,27.27-6.6,41.25-9.42,62.07-12.68,128.53-19.54,197.6-19.54s135.5,6.86,197.57,19.54c13.98,2.82,27.75,5.96,41.25,9.42-2.57-13.08-4.87-26.33-6.87-39.79-6.39-42.96-9.77-87.67-9.77-133.6,0-35.47,2-70.21,5.89-104.01,96.69-4.84,173.58-82,173.58-176.44,0-55.64-26.67-105.28-68.37-137.66ZM771.38,570.43c-4.87.51-9.77.75-14.76.75-8.36,0-16.55-.72-24.52-2.09-1.94,12.64-3.64,25.42-5.11,38.35-4.03,35.73-6.12,72.47-6.12,110.02,0,44.3,2.93,173.01,8.48,214.69-60.25-12.28-124.5-18.91-191.2-18.91s-130.99,6.63-191.24,18.94c5.56-41.67,8.48-170.42,8.48-214.71,0-37.34-2.09-73.9-6.06-109.45-1.43-12.93-3.14-25.72-5.11-38.35-6.81,1.02-13.8,1.52-20.88,1.52-6.27,0-12.46-.39-18.52-1.19-71.03-9.08-125.94-69.78-125.94-143.29,0-42.06,17.95-79.91,46.63-106.31,8.54-7.88,18.04-14.73,28.32-20.37,20.64-11.35,44.33-17.8,69.51-17.8,4.24,0,8.42.18,12.55.54,13.2,1.13,25.87,4.03,37.82,8.48,3.2-12.7,7.83-24.79,13.68-36.17,28.47-55.29,86.12-93.11,152.61-93.11s124.11,37.82,152.58,93.11c5.85,11.38,10.49,23.48,13.68,36.17,11.92-4.45,24.61-7.35,37.82-8.48,4.12-.36,8.3-.54,12.55-.54,24.07,0,46.75,5.88,66.7,16.28,10.34,5.41,19.95,12.01,28.62,19.66,30.14,26.47,49.17,65.3,49.17,108.55,0,74.8-56.87,136.36-129.73,143.74Z\" />\n </svg>\n )\n },\n) as unknown as LucideIcon\n\n/** Registry entries, by the name `app.apps.icon` carries for these products. */\nexport const BRAND_MARKS: Record<string, LucideIcon> = {\n ChefControlMark,\n}\n","import type { LucideIcon } from 'lucide-react'\nimport { BRAND_MARKS } from './primitives/brand-marks'\nimport {\n Activity, AlertTriangle, Apple, ArrowDownCircle, ArrowDownRight, ArrowLeftRight, ArrowUpCircle, ArrowUpRight,\n Award, BadgeDollarSign, Ban, Banknote, BarChart3, Beer, Bell, Bike, BookOpen,\n BookOpenCheck, Box, Boxes, Briefcase, Building2, Calculator, Calendar, CalendarCheck, CalendarCheck2,\n CalendarClock, CalendarDays, CalendarPlus, CalendarRange, CalendarX, Camera, Cat, Check, CheckCircle,\n CheckSquare, ChefHat, ChevronDown, ChevronsUpDown, Circle, CircleCheck, CircleDollarSign, Clapperboard,\n ClipboardCheck, ClipboardList,\n Clock, Clock3, Command, Compass, Contact, CookingPot, CreditCard, Database, Disc3, Dog,\n DollarSign, DoorOpen, Egg, ExternalLink, Eye, FileCheck2, FileDown,\n FileText, Filter, Flame, FolderOpen, Gauge, Gift, GlassWater, Globe, GraduationCap, HandCoins, Handshake, Heart, Hourglass,\n FolderTree, Home, Image, Images, Inbox, Instagram, Landmark, Layers, LayoutDashboard, LayoutTemplate,\n Leaf, LeafyGreen, LineChart, Link, List, ListChecks, ListMusic, ListPlus, Lock, LogIn,\n Mail, Map, MapPin, Megaphone, MessageCircle, MessageSquare, Mic, MoreHorizontal,\n MousePointerClick, Music, Newspaper, Package, PackageCheck, Palette, PartyPopper, PawPrint,\n Pencil, Percent, Phone, PieChart, Plug, Plus, PlusCircle, Puzzle, Radio,\n Receipt, Repeat, RotateCcw, RotateCw, Ruler, Scale, ScanLine, Search, Send, Settings, Shield,\n ShieldCheck, ShoppingBag, ShoppingCart, Sigma, SlidersHorizontal, Smartphone, Soup, Sparkles, Star, Store, Tag,\n TableProperties, Tags, Target, Ticket, Timer, ToggleLeft, TreePalm, TrendingDown, TrendingUp, Trophy, Truck,\n User, UserCheck, UserCog, UserPlus, UserX, Users, UsersRound, Utensils, WandSparkles,\n Upload, UtensilsCrossed, Wallet, Warehouse, Wheat, Workflow, Wrench, X, XCircle,\n Zap,\n} from 'lucide-react'\n\n// ---------------------------------------------------------------------------\n// Central lucide icon registry. The SDK's manifest-driven surfaces resolve\n// icons by string name; a namespace import (`import * as LucideIcons`) defeats\n// tree-shaking and drags all ~1,500 icons (~500 KB min) into every bundle, so\n// the SDK ships this curated set instead — the union of every icon name the\n// SDK, plugins, and app templates reference. Apps using names outside the set\n// call registerIcons({ Name: Component }) with their own named imports.\n// ---------------------------------------------------------------------------\n\nconst registry: Record<string, LucideIcon> = {\n Activity, AlertTriangle, Apple, ArrowDownCircle, ArrowDownRight, ArrowLeftRight, ArrowUpCircle, ArrowUpRight,\n Award, BadgeDollarSign, Ban, Banknote, BarChart3, Beer, Bell, Bike, BookOpen,\n BookOpenCheck, Box, Boxes, Briefcase, Building2, Calculator, Calendar, CalendarCheck, CalendarCheck2,\n CalendarClock, CalendarDays, CalendarPlus, CalendarRange, CalendarX, Camera, Cat, Check, CheckCircle,\n CheckSquare, ChefHat, ChevronDown, ChevronsUpDown, Circle, CircleCheck, CircleDollarSign, Clapperboard,\n ClipboardCheck, ClipboardList,\n Clock, Clock3, Command, Compass, Contact, CookingPot, CreditCard, Database, Disc3, Dog,\n DollarSign, DoorOpen, Egg, ExternalLink, Eye, FileCheck2, FileDown,\n FileText, Filter, Flame, FolderOpen, Gauge, Gift, GlassWater, Globe, GraduationCap, HandCoins, Handshake, Heart, Hourglass,\n FolderTree, Home, Image, Images, Inbox, Instagram, Landmark, Layers, LayoutDashboard, LayoutTemplate,\n Leaf, LeafyGreen, LineChart, Link, List, ListChecks, ListMusic, ListPlus, Lock, LogIn,\n Mail, Map, MapPin, Megaphone, MessageCircle, MessageSquare, Mic, MoreHorizontal,\n MousePointerClick, Music, Newspaper, Package, PackageCheck, Palette, PartyPopper, PawPrint,\n Pencil, Percent, Phone, PieChart, Plug, Plus, PlusCircle, Puzzle, Radio,\n Receipt, Repeat, RotateCcw, RotateCw, Ruler, Scale, ScanLine, Search, Send, Settings, Shield,\n ShieldCheck, ShoppingBag, ShoppingCart, Sigma, SlidersHorizontal, Smartphone, Soup, Sparkles, Star, Store, Tag,\n TableProperties, Tags, Target, Ticket, Timer, ToggleLeft, TreePalm, TrendingDown, TrendingUp, Trophy, Truck,\n User, UserCheck, UserCog, UserPlus, UserX, Users, UsersRound, Utensils, WandSparkles,\n Upload, UtensilsCrossed, Wallet, Warehouse, Wheat, Workflow, Wrench, X, XCircle,\n Zap,\n // The family's own product marks, resolvable by the same string names the\n // app registry stores — a product that HAS a mark should never be drawn by a\n // stand-in glyph in the launcher.\n ...BRAND_MARKS,\n}\n\n/** Add or override icons resolvable by string name (e.g. from app manifests). */\nexport function registerIcons(icons: Record<string, LucideIcon>): void {\n Object.assign(registry, icons)\n}\n\n/** Resolve a lucide icon by name; undefined when not registered. */\nexport function getLucideIcon(name: string): LucideIcon | undefined {\n return registry[name]\n}\n\n/** The registered icon map (live reference — do not mutate directly). */\nexport const ICON_MAP = registry\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives/card.tsx","../src/primitives/dropdown.tsx","../src/primitives/checkbox.tsx","../src/primitives/data-table.tsx","../src/hooks/useIsWide.ts","../src/primitives/skeleton.tsx","../src/primitives/page-toolbar.tsx"],"names":["React","React2","jsx","React3","Check","React4","jsxs","_","React5","ToolbarButton","ToolbarAction"],"mappings":";;;;;;;;AAIA,IAAM,IAA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,eAAA;AAAA,kBACzB,OAAO,SAAA,IAAa,eAAA;AAAA,kBAIpB,aAAA,EAAe,KAAA;AAAA,kBACd,GAAG,QAAA;AAAA,kBACJ,SAAA,EAAW,EAAA;AAAA,oBACT,uGAAA;AAAA,oBACA,iHAAA;AAAA,oBACA,WAAW,iCAAA,GAAoC;AAAA,mBACjD;AAAA,kBAEA,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAU,aAAA,EAAc;AAAA;AAAA,eACxC,GACE,IAAA;AAAA,cACH,KAAA;AAAA,cACA,OAAA;AAAA,cACA,KAAA;AAAA,cACA,SAAA;AAAA,cACA,OAAA;AAAA,cACA,4BACCA,GAAAA;AAAA,gBAAC,MAAA;AAAA,gBAAA;AAAA,kBACC,OAAA,EAAQ,OAAA;AAAA,kBAAQ,IAAA,EAAK,IAAA;AAAA,kBAAK,OAAA,EAAS,SAAA;AAAA,kBACnC,YAAA,EAAY,YAAA;AAAA,kBACZ,SAAA,EAAU,mHAAA;AAAA,kBAEV,QAAA,kBAAAA,GAAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAU,SAAA,EAAU;AAAA;AAAA,eACjC,GACE;AAAA;AAAA;AAAA;AACN;AAAA;AACF;AAEJ","file":"chunk-E44WOPCR.js","sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../lib/cn'\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'fayz-glass-surface rounded-card border bg-card text-card-foreground shadow-sm',\n className\n )}\n {...props}\n />\n))\nCard.displayName = 'Card'\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col space-y-1 p-4', className)}\n {...props}\n />\n))\nCardHeader.displayName = 'CardHeader'\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n 'text-sm font-semibold leading-tight tracking-tight',\n className\n )}\n {...props}\n />\n))\nCardTitle.displayName = 'CardTitle'\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn('text-xs text-muted-foreground', className)}\n {...props}\n />\n))\nCardDescription.displayName = 'CardDescription'\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-4 pt-0', className)} {...props} />\n))\nCardContent.displayName = 'CardContent'\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center p-4 pt-0', className)}\n {...props}\n />\n))\nCardFooter.displayName = 'CardFooter'\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\n\nimport { cn } from '../lib/cn'\n\nconst Dropdown = DropdownMenuPrimitive.Root\n\nconst DropdownTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownGroup = DropdownMenuPrimitive.Group\n\nconst DropdownPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownSub = DropdownMenuPrimitive.Sub\n\nconst DropdownRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm outline-none focus:bg-muted data-[state=open]:bg-muted',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n // Portaled, like DropdownContent. Without it the submenu renders inside the\n // parent panel's DOM — and that panel is `overflow-hidden`, so the submenu\n // was clipped to its box: a flyout you could open and never reach.\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'fayz-glass-surface z-[110] min-w-[8rem] overflow-hidden rounded-card border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'fayz-glass-surface z-[110] min-w-[8rem] overflow-hidden rounded-card border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-button py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-button py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n))\nDropdownSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest opacity-60', className)}\n {...props}\n />\n )\n}\nDropdownShortcut.displayName = 'DropdownShortcut'\n\nexport {\n Dropdown,\n DropdownTrigger,\n DropdownContent,\n DropdownItem,\n DropdownCheckboxItem,\n DropdownRadioItem,\n DropdownLabel,\n DropdownSeparator,\n DropdownShortcut,\n DropdownGroup,\n DropdownPortal,\n DropdownSub,\n DropdownSubContent,\n DropdownSubTrigger,\n DropdownRadioGroup,\n}\n","import * as React from 'react'\nimport { Check, Minus } from 'lucide-react'\nimport { cn } from '../lib/cn'\n\ntype CheckboxColor = 'primary' | 'success' | 'warning' | 'destructive'\n\ninterface CheckboxProps {\n checked?: boolean\n onChange?: (checked: boolean) => void\n disabled?: boolean\n className?: string\n color?: CheckboxColor\n id?: string\n /** Some but not all of what this box stands for is checked (a table header\n * over a partly selected page). Painted filled with a dash, and announced as\n * \"mixed\" — an empty box would claim nothing is selected. */\n indeterminate?: boolean\n /** -1 keeps it out of the tab order, for a box that only PAINTS the state of\n * a row that is itself the control. */\n tabIndex?: number\n 'aria-label'?: string\n 'data-testid'?: string\n}\n\nconst COLOR_CLASSES: Record<CheckboxColor, string> = {\n primary: 'border-primary bg-primary text-primary-foreground',\n success: 'border-success bg-success text-white dark:border-success dark:bg-success',\n warning: 'border-warning bg-warning text-white',\n destructive: 'border-destructive bg-destructive text-destructive-foreground',\n}\n\nconst Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(\n ({ checked = false, onChange, disabled, className, color = 'primary', id, indeterminate = false, ...props }, ref) => {\n const filled = checked || indeterminate\n return (\n <button\n ref={ref}\n id={id}\n type=\"button\"\n role=\"checkbox\"\n aria-checked={indeterminate ? 'mixed' : checked}\n disabled={disabled}\n onClick={() => onChange?.(!checked)}\n className={cn(\n 'peer inline-flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border-2 transition-all duration-150',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n filled\n ? `${COLOR_CLASSES[color]} shadow-sm`\n : 'border-muted-foreground/40 bg-background hover:border-muted-foreground/60',\n className,\n )}\n {...props}\n >\n {indeterminate\n ? <Minus className=\"h-3.5 w-3.5\" strokeWidth={3} />\n : checked && <Check className=\"h-3.5 w-3.5\" strokeWidth={3} />}\n </button>\n )\n },\n)\nCheckbox.displayName = 'Checkbox'\n\nexport { Checkbox }\nexport type { CheckboxColor, CheckboxProps }\n","import * as React from 'react'\nimport {\n type ColumnDef,\n type SortingState,\n flexRender,\n getCoreRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table'\nimport { ArrowUpDown, ArrowUp, ArrowDown } from 'lucide-react'\nimport { useTranslation } from '@fayz-ai/core'\n\nimport { cn } from '../lib/cn'\nimport { Checkbox } from './checkbox'\n\ninterface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[]\n data: TData[]\n loading?: boolean\n skeletonRows?: number\n emptyMessage?: React.ReactNode\n onRowClick?: (row: TData) => void\n /** Visual variant: 'card' (white bg, card wrapper — default), 'flat'\n * (transparent bg, still bordered), or 'bare' — no wrapper chrome at all,\n * for a table already inside a card that owns the border and radius. */\n variant?: 'card' | 'flat' | 'bare'\n /** Compact mode: smaller padding and font size */\n compact?: boolean\n /**\n * Qual coluna está ordenada e para que lado, quando quem ordena é OUTRO\n * controle (o menu \"Ordenar\" da barra de ferramentas).\n *\n * Marca o cabeçalho sem torná-lo clicável: com a ordenação fora da tabela,\n * a seta é INFORMAÇÃO (\"está ordenado por isto, assim\"), não um botão. Sem\n * ela, mudar a ordem por um menu que fecha em seguida não deixava rastro\n * nenhum na tela.\n */\n sortIndicator?: { columnId: string; dir: 'asc' | 'desc' }\n /**\n * Turns on the checkbox column on the left. Selection is CONTROLLED by ids:\n * what a bulk action needs is \"which records\", and the table's own row indexes\n * stop meaning that the moment the list refetches, sorts or pages.\n */\n selectable?: boolean\n selectedIds?: string[]\n onSelectedIdsChange?: (ids: string[]) => void\n /** Row identity for selection. Defaults to `row.id`. */\n getRowId?: (row: TData) => string\n}\n\nfunction DataTable<TData, TValue>({\n columns,\n data,\n loading = false,\n skeletonRows = 3,\n emptyMessage = 'No results.',\n onRowClick,\n variant = 'card',\n compact = false,\n sortIndicator,\n selectable = false,\n selectedIds,\n onSelectedIdsChange,\n getRowId,\n}: DataTableProps<TData, TValue>) {\n const t = useTranslation()\n const isCard = variant === 'card'\n // Rounded box and scroll container must be SEPARATE elements: a scroll\n // container paints its content over its own border-radius, which squared\n // the corners the moment a row background met them.\n const wrapperCls = isCard\n ? 'overflow-hidden rounded-card border bg-card shadow-sm'\n : variant === 'bare'\n ? ''\n : 'overflow-hidden rounded-lg border'\n // 'bare' sits below something else inside its parent card (a search/tools\n // toolbar), so its header is a mid-card band: no rounding, and it keeps the\n // card's own surface rather than starting a new tinted block.\n const headerCls = isCard\n ? 'border-b bg-muted/50'\n : variant === 'bare'\n ? 'border-b bg-muted/30 rounded-none'\n : 'border-b bg-muted/30'\n const thCls = compact ? 'px-3 py-1.5 text-left text-[11px] font-medium text-muted-foreground' : 'px-4 py-2.5 text-left font-medium text-muted-foreground'\n const tdCls = compact ? 'px-3 py-1.5 align-middle text-xs' : 'px-4 py-3 align-middle'\n const tableCls = compact ? 'w-full text-xs min-w-max' : 'w-full text-sm min-w-max'\n const rowHoverCls = isCard ? 'hover:bg-muted/30' : 'hover:bg-muted/20'\n const [sorting, setSorting] = React.useState<SortingState>([])\n\n const rowId = React.useCallback(\n (row: TData) => (getRowId ? getRowId(row) : String((row as { id?: unknown }).id ?? '')),\n [getRowId],\n )\n const selected = React.useMemo(() => new Set(selectedIds ?? []), [selectedIds])\n const pageIds = React.useMemo(() => data.map(rowId), [data, rowId])\n const selectedOnPage = pageIds.filter((id) => selected.has(id)).length\n const allOnPageSelected = pageIds.length > 0 && selectedOnPage === pageIds.length\n\n const toggleRow = React.useCallback((id: string) => {\n const next = new Set(selected)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n onSelectedIdsChange?.([...next])\n }, [selected, onSelectedIdsChange])\n // The header box acts on THIS page only — it must not silently drop a\n // selection made on another page, nor claim to have selected rows that were\n // never loaded.\n const toggleAllOnPage = React.useCallback(() => {\n const next = new Set(selected)\n if (allOnPageSelected) pageIds.forEach((id) => next.delete(id))\n else pageIds.forEach((id) => next.add(id))\n onSelectedIdsChange?.([...next])\n }, [selected, allOnPageSelected, pageIds, onSelectedIdsChange])\n\n // Built here rather than asked of every caller: the column is pure chrome, and\n // a hand-rolled copy per list is where the checkbox column drifts.\n const selectionColumn = React.useMemo<ColumnDef<TData, TValue>>(() => ({\n id: '__select__',\n enableSorting: false,\n header: () => (\n <Checkbox\n checked={allOnPageSelected}\n indeterminate={selectedOnPage > 0 && !allOnPageSelected}\n onChange={toggleAllOnPage}\n aria-label={t('crud.list.selectAllRows')}\n />\n ),\n cell: ({ row }) => {\n const id = rowId(row.original)\n return (\n <Checkbox\n checked={selected.has(id)}\n onChange={() => toggleRow(id)}\n aria-label={t('crud.list.selectRow')}\n />\n )\n },\n // `toggleAllOnPage` is in the deps because it closes over the CURRENT page's\n // ids: turning the page with nothing selected changes no other dep, and the\n // memo would hand the header a button that ticks the previous page's rows.\n }), [allOnPageSelected, selectedOnPage, selected, rowId, toggleRow, toggleAllOnPage, t])\n\n const allColumns = React.useMemo(\n () => (selectable ? [selectionColumn, ...columns] : columns),\n [selectable, selectionColumn, columns],\n )\n\n const table = useReactTable({\n data,\n columns: allColumns,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n onSortingChange: setSorting,\n state: { sorting },\n })\n\n if (loading) {\n return (\n <div className={wrapperCls}>\n <div className=\"overflow-x-auto\">\n <table className={tableCls}>\n <thead>\n <tr className={headerCls}>\n {allColumns.map((_, i) => (\n <th key={i} className={thCls}>\n <div className=\"h-3.5 w-20 animate-pulse rounded bg-muted\" />\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {Array.from({ length: skeletonRows }).map((_, i) => (\n <tr key={i} className=\"border-b last:border-0\">\n {allColumns.map((_, j) => (\n <td key={j} className={tdCls}>\n <div className=\"h-3.5 w-full animate-pulse rounded bg-muted\" />\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n )\n }\n\n return (\n <div className={wrapperCls}>\n <div className=\"overflow-x-auto\">\n <table className={tableCls}>\n <thead>\n {table.getHeaderGroups().map((headerGroup) => (\n <tr key={headerGroup.id} className={headerCls}>\n {headerGroup.headers.map((header) => {\n const sorted = header.column.getIsSorted()\n return (\n <th\n key={header.id}\n className={cn(thCls, header.column.id === '__select__' && 'w-10 pr-0')}\n >\n {header.isPlaceholder ? null : sortIndicator?.columnId === header.column.id ? (\n <span className=\"inline-flex items-center gap-1 text-foreground\">\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sortIndicator.dir === 'desc'\n ? <ArrowDown className=\"h-3 w-3\" />\n : <ArrowUp className=\"h-3 w-3\" />}\n </span>\n ) : header.column.getCanSort() ? (\n <button\n className=\"flex items-center gap-1 hover:text-foreground transition-colors\"\n onClick={header.column.getToggleSortingHandler()}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sorted === 'asc' ? (\n <ArrowUp className=\"h-3 w-3\" />\n ) : sorted === 'desc' ? (\n <ArrowDown className=\"h-3 w-3\" />\n ) : (\n <ArrowUpDown className=\"h-3 w-3 opacity-40\" />\n )}\n </button>\n ) : (\n flexRender(header.column.columnDef.header, header.getContext())\n )}\n </th>\n )\n })}\n </tr>\n ))}\n </thead>\n <tbody>\n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => {\n const isSelected = selectable && selected.has(rowId(row.original))\n return (\n <tr\n key={row.id}\n className={cn(\n `border-b last:border-0 transition-colors ${rowHoverCls}`,\n onRowClick && 'cursor-pointer',\n isSelected && 'bg-muted/40',\n )}\n onClick={() => onRowClick?.(row.original)}\n data-selected={isSelected || undefined}\n >\n {row.getVisibleCells().map((cell) => {\n const isSelectCell = cell.column.id === '__select__'\n return (\n <td\n key={cell.id}\n className={cn(tdCls, isSelectCell && 'w-10 pr-0')}\n // Ticking a box is not opening the record: without this\n // the row's own click handler fired underneath and the\n // list navigated away from the selection just made.\n onClick={isSelectCell ? (e) => e.stopPropagation() : undefined}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </td>\n )\n })}\n </tr>\n )\n })\n ) : (\n <tr>\n {/* Height, not just padding: an empty table that collapses to one\n thin row reads as a rendering glitch rather than \"nothing\n here yet\". `emptyMessage` takes a node so callers can hand in\n a full empty state (icon, headline, create action). */}\n <td colSpan={allColumns.length} className=\"h-64 px-6 text-center align-middle text-muted-foreground\">\n {emptyMessage}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n </div>\n )\n}\n\nexport { DataTable, type DataTableProps }\n","import * as React from 'react'\n\n/** The one breakpoint the shell actually branches on. */\nexport const WIDE_QUERY = '(min-width: 768px)'\n\n/**\n * Real width, not CSS.\n *\n * Some decisions cannot be made with a `md:hidden`: hiding is not unmounting,\n * and no portal respects `display: none` — two mounted copies of a page send\n * TWO sets of buttons to the shell's header bar, and the action appears twice.\n * `matchMedia` already answers correctly on the first render, so choosing here\n * does not flash.\n *\n * Prefer a CSS breakpoint when the choice is only about what is visible. Reach\n * for this when the choice changes what exists, or what a component decides.\n */\nexport function useIsWide(query: string = WIDE_QUERY): boolean {\n const [wide, setWide] = React.useState(\n () => (typeof window === 'undefined' ? true : window.matchMedia(query).matches),\n )\n React.useEffect(() => {\n const mq = window.matchMedia(query)\n const onChange = () => setWide(mq.matches)\n mq.addEventListener('change', onChange)\n return () => mq.removeEventListener('change', onChange)\n }, [query])\n return wide\n}\n","import { cn } from '../lib/cn'\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('animate-pulse rounded-md bg-muted', className)}\n {...props}\n />\n )\n}\n\n/**\n * Skeleton loader that mimics a table with rows and columns.\n * Drop-in replacement for \"Loading...\" text in list views.\n */\nfunction TableSkeleton({ columns = 4, rows = 2 }: { columns?: number; rows?: number }) {\n return (\n <div className=\"rounded-lg border overflow-hidden\">\n <div className=\"border-b bg-muted/30 flex gap-4 px-4 py-2.5\">\n {Array.from({ length: columns }).map((_, i) => (\n <Skeleton key={i} className=\"h-3 flex-1 rounded bg-muted-foreground/10\" />\n ))}\n </div>\n <div className=\"divide-y\">\n {Array.from({ length: rows }).map((_, r) => (\n <div key={r} className=\"flex items-center gap-4 px-4 py-3.5\">\n {Array.from({ length: columns }).map((_, c) => (\n <Skeleton\n key={c}\n className={cn(\n 'h-3 rounded',\n c === 0 ? 'flex-[2]' : 'flex-1',\n )}\n />\n ))}\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport { Skeleton, TableSkeleton }\n","import * as React from 'react'\nimport { Calendar, Check, ChevronDown, GripVertical, RefreshCw } from 'lucide-react'\nimport { cn } from '../lib/cn'\nimport { Button } from './button'\nimport { Dropdown, DropdownTrigger, DropdownContent, DropdownItem } from './dropdown'\nimport { useIsWide } from '../hooks/useIsWide'\n\n// ---------------------------------------------------------------------------\n// PageToolbar — a barra flutuante do que a tela está MOSTRANDO.\n//\n// A barra da shell carrega o que se FAZ numa tela (Novo, Importar, Salvar).\n// Esta carrega a pergunta que a tela responde: qual período, quais filtros,\n// quais cartões. Eram duas respostas diferentes para as mesmas três coisas — a\n// faixa de Análises, larga e com cromo próprio, e o \"Customize\" solto do\n// dashboard —, então o mesmo trabalho parecia recurso de produto diferente\n// dependendo da página aberta.\n//\n// Flutuante e à direita de propósito: ela governa a grade ABAIXO dela e fica\n// parada enquanto essa grade rola por baixo (sticky, com borda e sombra, para\n// ler como algo POR CIMA dos cartões e não como uma emenda no layout).\n// ---------------------------------------------------------------------------\n\n/**\n * O gatilho padrão da barra: sem contorno, com o rótulo sublinhado tracejado.\n *\n * Contornados, os três viravam três caixas arredondadas dentro de outra caixa\n * arredondada — a borda do vidro e a dos botões disputavam a mesma leitura, e a\n * barra parecia um grupo de botões e não um controle. O tracejado é o traço\n * clássico de \"este valor se troca\": diz que clica sem desenhar mais um limite.\n */\nexport const ToolbarButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & { icon?: React.ElementType; caret?: boolean }\n>(function ToolbarButton({ icon: Icon, caret = true, children, className, ...props }, ref) {\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"sm\"\n className={cn(\n // Sem fundo no hover: um retângulo arredondado aparecendo atrás do\n // rótulo desenha, no hover, exatamente o botão que o repouso não tem.\n // O que muda é o texto e o traço — mais firmes, e o tracejado vira\n // contínuo, que é o mesmo \"agora sim, clique\" sem inventar caixa.\n 'group gap-1.5 border-0 bg-transparent px-2 font-medium text-muted-foreground shadow-none',\n 'hover:bg-transparent hover:text-foreground',\n className,\n )}\n {...props}\n >\n {Icon ? <Icon className=\"h-3 w-3 shrink-0 opacity-70\" /> : null}\n <span className=\"inline-flex items-center gap-1.5 border-b border-dashed border-muted-foreground/40 pb-px transition-colors group-hover:border-solid group-hover:border-foreground\">\n {children}\n </span>\n {caret ? <ChevronDown className=\"h-3 w-3 shrink-0 opacity-60\" /> : null}\n </Button>\n )\n})\n\n/**\n * O gatilho de COMANDO da barra — Exportar, Imprimir, Novo.\n *\n * Mesma matéria do ToolbarButton acima (sem contorno, sem fundo, fantasma) e\n * sem o sublinhado tracejado: o tracejado promete \"este valor se troca\", e\n * imprimir não é um valor. Eram botões contornados no meio de uma barra sem\n * contorno nenhum — duas caixas arredondadas ao lado de três rótulos soltos,\n * que é o desenho que faz a barra parecer duas barras.\n */\nexport const ToolbarAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & { icon?: React.ElementType; caret?: boolean }\n>(function ToolbarAction({ icon: Icon, caret = false, children, className, ...props }, ref) {\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"sm\"\n className={cn(\n 'gap-1.5 border-0 bg-transparent px-2 font-medium text-muted-foreground shadow-none',\n 'hover:bg-transparent hover:text-foreground',\n className,\n )}\n {...props}\n >\n {Icon ? <Icon className=\"h-3 w-3 shrink-0 opacity-70\" /> : null}\n {children}\n {caret ? <ChevronDown className=\"h-3 w-3 shrink-0 opacity-60\" /> : null}\n </Button>\n )\n})\n\nexport interface RangeOption {\n value: string\n label: string\n}\n\nexport interface RangeControlProps {\n options: RangeOption[]\n value: string\n onChange: (value: string) => void\n /** Rótulo do gatilho quando não é nenhum dos presets (ex.: \"Personalizado\"). */\n label?: string\n /** \"21 jul – 19 ago\" — a janela que os números realmente cobrem. Um nome de\n * preset sozinho deixa a dúvida se \"este mês\" já inclui hoje. */\n span?: string\n /** Itens extras no fim do menu (ex.: abrir uma janela personalizada). */\n extra?: React.ReactNode\n /** Desenhado ao lado do gatilho (ex.: os dois seletores de data). */\n children?: React.ReactNode\n icon?: React.ElementType\n className?: string\n}\n\n/**\n * O controle de período — um só, para o dashboard e para as análises.\n *\n * Puramente apresentacional: quem tem o estado (o contexto de analytics, o de\n * dashboard) passa opções e valor. Eram dois desenhos para a mesma escolha, um\n * segmentado de 7d/30d/90d e um menu de presets, e trocar de tela trocava a\n * gramática do controle sem trocar o que ele faz.\n */\nexport function RangeControl({\n options, value, onChange, label, span, extra, children, icon = Calendar, className,\n}: RangeControlProps) {\n const current = options.find((o) => o.value === value)\n return (\n <div className={cn('flex items-center gap-1.5', className)}>\n <Dropdown>\n <DropdownTrigger asChild>\n <ToolbarButton icon={icon}>\n {label ?? current?.label ?? value}\n {span ? <span className=\"font-normal text-muted-foreground\">{span}</span> : null}\n </ToolbarButton>\n </DropdownTrigger>\n <DropdownContent align=\"end\" className=\"w-56\">\n {options.map((o) => (\n <DropdownItem key={o.value} onSelect={() => onChange(o.value)}>\n {o.label}\n {o.value === value ? <Check className=\"ml-auto h-3.5 w-3.5 shrink-0 pl-1\" /> : null}\n </DropdownItem>\n ))}\n {extra}\n </DropdownContent>\n </Dropdown>\n {children}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Onde a barra mora.\n//\n// Ela flutua sobre a grade, e \"sobre a grade\" às vezes quer dizer \"em cima do\n// título do terceiro cartão\". Em vez de escolher por todo mundo um canto que\n// nunca atrapalhe — não existe —, a barra ganha uma alça e o usuário resolve.\n//\n// UMA posição para todas as telas, por omissão: \"onde fica a barra flutuante\" é\n// uma preferência, não sete. Uma superfície que precise da sua passa `storageKey`.\n// ---------------------------------------------------------------------------\n\ninterface ToolbarOffset { x: number; y: number }\n\nconst OFFSET_KEY = (scope: string) => `fayz.toolbar.offset.${scope}`\nconst EDGE = 8\n\nfunction readOffset(key: string): ToolbarOffset {\n if (typeof window === 'undefined') return { x: 0, y: 0 }\n try {\n const raw = window.localStorage.getItem(key)\n if (!raw) return { x: 0, y: 0 }\n const parsed = JSON.parse(raw) as Partial<ToolbarOffset>\n return {\n x: Number.isFinite(parsed.x) ? Number(parsed.x) : 0,\n y: Number.isFinite(parsed.y) ? Number(parsed.y) : 0,\n }\n } catch {\n return { x: 0, y: 0 }\n }\n}\n\nfunction writeOffset(key: string, offset: ToolbarOffset): void {\n if (typeof window === 'undefined') return\n try {\n if (offset.x === 0 && offset.y === 0) window.localStorage.removeItem(key)\n else window.localStorage.setItem(key, JSON.stringify(offset))\n } catch {\n /* quota / private mode — perder isto custa uma posição, não um dado */\n }\n}\n\n/**\n * Deslocamento arrastável, preso à viewport.\n *\n * O clamp mede o elemento JÁ transladado e desconta o deslocamento atual para\n * achar a âncora — é o que mantém a barra inteira na tela depois de um resize,\n * de um rail que abre, ou de uma posição guardada numa janela maior.\n */\nfunction useToolbarOffset(storageKey: string, enabled: boolean) {\n const key = OFFSET_KEY(storageKey)\n const barRef = React.useRef<HTMLDivElement>(null)\n const [offset, setOffset] = React.useState<ToolbarOffset>(() => (enabled ? readOffset(key) : { x: 0, y: 0 }))\n const [dragging, setDragging] = React.useState(false)\n const latest = React.useRef(offset)\n latest.current = offset\n const origin = React.useRef<{ px: number; py: number; ox: number; oy: number } | null>(null)\n\n const clamp = React.useCallback((next: ToolbarOffset): ToolbarOffset => {\n const el = barRef.current\n if (!el || typeof window === 'undefined') return next\n const rect = el.getBoundingClientRect()\n const anchorLeft = rect.left - latest.current.x\n const anchorTop = rect.top - latest.current.y\n return {\n x: Math.min(\n Math.max(next.x, EDGE - anchorLeft),\n Math.max(EDGE - anchorLeft, window.innerWidth - EDGE - rect.width - anchorLeft),\n ),\n y: Math.min(\n Math.max(next.y, EDGE - anchorTop),\n Math.max(EDGE - anchorTop, window.innerHeight - EDGE - rect.height - anchorTop),\n ),\n }\n }, [])\n\n const move = React.useCallback((next: ToolbarOffset, persist: boolean) => {\n const clamped = clamp(next)\n setOffset(clamped)\n if (persist) writeOffset(key, clamped)\n }, [clamp, key])\n\n const onPointerDown = (event: React.PointerEvent<HTMLElement>) => {\n if (!enabled || event.button !== 0) return\n event.preventDefault()\n event.currentTarget.setPointerCapture(event.pointerId)\n origin.current = { px: event.clientX, py: event.clientY, ox: latest.current.x, oy: latest.current.y }\n setDragging(true)\n }\n\n const onPointerMove = (event: React.PointerEvent<HTMLElement>) => {\n const from = origin.current\n if (!from) return\n move({ x: from.ox + (event.clientX - from.px), y: from.oy + (event.clientY - from.py) }, false)\n }\n\n const endDrag = (event: React.PointerEvent<HTMLElement>) => {\n if (!origin.current) return\n origin.current = null\n setDragging(false)\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId)\n }\n writeOffset(key, latest.current)\n }\n\n // Teclado: a alça é um botão, e um controle que só responde ao arrasto não\n // existe para quem não usa mouse.\n const onKeyDown = (event: React.KeyboardEvent) => {\n if (!enabled) return\n const step = event.shiftKey ? 24 : 8\n const delta: Record<string, ToolbarOffset> = {\n ArrowLeft: { x: -step, y: 0 },\n ArrowRight: { x: step, y: 0 },\n ArrowUp: { x: 0, y: -step },\n ArrowDown: { x: 0, y: step },\n }\n if (event.key === 'Escape' || event.key === 'Home') {\n event.preventDefault()\n move({ x: 0, y: 0 }, true)\n return\n }\n const d = delta[event.key]\n if (!d) return\n event.preventDefault()\n move({ x: latest.current.x + d.x, y: latest.current.y + d.y }, true)\n }\n\n const reset = React.useCallback(() => move({ x: 0, y: 0 }, true), [move])\n\n // Uma posição guardada numa janela larga não pode esconder a barra numa\n // estreita — reancora sem gravar, para não sobrescrever a escolha do usuário.\n React.useEffect(() => {\n if (!enabled) return\n const onResize = () => move(latest.current, false)\n window.addEventListener('resize', onResize)\n return () => window.removeEventListener('resize', onResize)\n }, [enabled, move])\n\n return { barRef, offset, dragging, reset, handlers: { onPointerDown, onPointerMove, onPointerUp: endDrag, onPointerCancel: endDrag, onKeyDown } }\n}\n\nexport interface PageToolbarProps {\n /** O período. */\n range?: React.ReactNode\n /** Filtros gerais e comparação — o que estreita a pergunta. */\n filters?: React.ReactNode\n /** Filtros aplicados, como pastilhas removíveis. */\n chips?: React.ReactNode\n /** Quais componentes aparecem. */\n customize?: React.ReactNode\n /** Extras da tela (exportar, um relatório novo). */\n actions?: React.ReactNode\n onRefresh?: () => void\n refreshLabel?: string\n /** Solta a barra do topo (dentro de um modal, ou ao imprimir). */\n sticky?: boolean\n /** Alça de arrastar à esquerda. Desligue onde a barra não flutua sobre nada. */\n movable?: boolean\n /** Separa a posição desta barra da compartilhada. Ver useToolbarOffset. */\n storageKey?: string\n /** Rótulo acessível da alça. */\n moveLabel?: string\n className?: string\n}\n\nexport function PageToolbar({\n range, filters, chips, customize, actions, onRefresh, refreshLabel,\n sticky = true, movable = true, storageKey = 'shared', moveLabel, className,\n}: PageToolbarProps) {\n // A phone does not float this bar. Floating buys back a row of vertical space\n // on a wide screen; on a 393px one it lands ON the cards instead of beside\n // them, and the thing that would move it out of the way is a drag handle —\n // an interaction a finger cannot perform on a surface that scrolls. So below\n // md it is what it looks like: a row, full width, in the flow.\n const floating = useIsWide()\n const { barRef, offset, dragging, reset, handlers } = useToolbarOffset(storageKey, movable && floating)\n if (!range && !filters && !chips && !customize && !actions && !onRefresh) return null\n return (\n // Caixa de altura ZERO: a barra flutua sobre os cartões em vez de abrir uma\n // linha só para ela. Ocupando espaço, ela empurrava a grade inteira para\n // baixo para hospedar controles que a maioria das visitas nem toca — e\n // \"flutuante\" que reserva o próprio lugar não está flutuando.\n //\n // Zero + sticky, não `absolute`: absoluto não gruda, e a pergunta que a\n // página responde tem de continuar à mão depois de vinte cartões de rolagem.\n // `pointer-events-none` na caixa para que a faixa vazia dos lados não coma o\n // clique do cartão embaixo.\n <div\n className={cn(\n 'z-20 flex',\n // `items-start` não é enfeite: num flex de altura 0, o alinhamento\n // padrão (stretch) achata o filho para 0px — a barra some e só os\n // botões transbordam, sem vidro nenhum atrás.\n floating ? 'pointer-events-none h-0 items-start justify-end' : 'w-full',\n sticky && 'sticky top-0',\n )}\n >\n <div\n ref={barRef}\n // Transform, não `top/left`: um deslocamento composto não tira a barra\n // do fluxo nem briga com o `sticky` do pai — ele desloca o que o sticky\n // já posicionou.\n style={floating && (offset.x || offset.y) ? { transform: `translate3d(${offset.x}px, ${offset.y}px, 0)` } : undefined}\n className={cn(\n 'flex max-w-full flex-wrap items-center gap-2',\n floating\n // O mesmo vidro do assistente (fayz-floating-surface, em styles.css):\n // é a outra coisa que flutua sobre a página, e as duas se diziam\n // flutuantes em materiais diferentes. Fill fino + blur pesado, para a\n // grade passar por baixo sem competir.\n ? 'fayz-floating-surface pointer-events-auto justify-end rounded-2xl px-2 py-1.5'\n // No celular é uma faixa da página: opaca, porque agora ela ROLA com\n // o conteúdo em vez de flutuar sobre ele, e uma faixa translúcida\n // grudada no topo deixa o texto passar por baixo dela.\n : 'w-full justify-start border-b border-border bg-background px-3 py-2',\n dragging && 'select-none',\n className,\n )}\n >\n {movable && floating ? (\n <button\n type=\"button\"\n aria-label={moveLabel ?? 'Mover a barra'}\n title={moveLabel ?? 'Mover a barra'}\n // `touch-none` para o arrasto não virar rolagem no celular; o\n // duplo clique devolve a barra ao canto de origem, que é a saída\n // para quem a largou num lugar ruim.\n onDoubleClick={reset}\n {...handlers}\n className={cn(\n 'flex h-[26px] w-4 shrink-0 touch-none items-center justify-center rounded-md text-muted-foreground/50',\n 'transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n dragging ? 'cursor-grabbing text-foreground' : 'cursor-grab',\n )}\n >\n <GripVertical className=\"h-3.5 w-3.5\" />\n </button>\n ) : null}\n {range}\n {filters}\n {chips}\n {customize}\n {actions}\n {onRefresh ? (\n <Button\n variant=\"ghost\" size=\"sm\" onClick={onRefresh}\n aria-label={refreshLabel}\n className=\"w-[26px] border-0 bg-transparent p-0 text-muted-foreground shadow-none hover:bg-transparent hover:text-foreground\"\n >\n <RefreshCw className=\"h-3 w-3\" />\n </Button>\n ) : null}\n </div>\n </div>\n )\n}\n"]}
|
package/dist/chunk-HKGTF2YA.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
|
-
import { create } from 'zustand';
|
|
4
|
-
|
|
5
|
-
// src/stores/page-header.store.ts
|
|
6
|
-
var usePageHeaderStore = create((set, get) => ({
|
|
7
|
-
shellSlot: null,
|
|
8
|
-
setShellSlot: (element) => set({ shellSlot: element }),
|
|
9
|
-
outletSlot: null,
|
|
10
|
-
setOutletSlot: (element) => set({ outletSlot: element }),
|
|
11
|
-
claimed: false,
|
|
12
|
-
owner: null,
|
|
13
|
-
hasBack: false,
|
|
14
|
-
hosts: 0,
|
|
15
|
-
outlets: 0,
|
|
16
|
-
actions: 0,
|
|
17
|
-
claim: (owner, hasBack = false) => set({ owner, claimed: true, hasBack }),
|
|
18
|
-
release: (owner) => {
|
|
19
|
-
if (get().owner === owner) set({ owner: null, claimed: false, hasBack: false });
|
|
20
|
-
},
|
|
21
|
-
addHost: () => set((s) => ({ hosts: s.hosts + 1 })),
|
|
22
|
-
removeHost: () => set((s) => ({ hosts: Math.max(0, s.hosts - 1) })),
|
|
23
|
-
addOutlet: () => set((s) => ({ outlets: s.outlets + 1 })),
|
|
24
|
-
removeOutlet: () => set((s) => ({ outlets: Math.max(0, s.outlets - 1) })),
|
|
25
|
-
addActions: () => set((s) => ({ actions: s.actions + 1 })),
|
|
26
|
-
removeActions: () => set((s) => ({ actions: Math.max(0, s.actions - 1) }))
|
|
27
|
-
}));
|
|
28
|
-
function useRegisterPageActions() {
|
|
29
|
-
const add = usePageHeaderStore((s) => s.addActions);
|
|
30
|
-
const remove = usePageHeaderStore((s) => s.removeActions);
|
|
31
|
-
React.useEffect(() => {
|
|
32
|
-
add();
|
|
33
|
-
return remove;
|
|
34
|
-
}, [add, remove]);
|
|
35
|
-
}
|
|
36
|
-
function useHasPageActions() {
|
|
37
|
-
return usePageHeaderStore((s) => s.actions > 0);
|
|
38
|
-
}
|
|
39
|
-
function usePageHeaderClaimed() {
|
|
40
|
-
return usePageHeaderStore((s) => s.claimed);
|
|
41
|
-
}
|
|
42
|
-
function usePageTitleSlot() {
|
|
43
|
-
return usePageHeaderStore((s) => s.outletSlot ?? s.shellSlot);
|
|
44
|
-
}
|
|
45
|
-
function usePageTitleSlotHost() {
|
|
46
|
-
return usePageHeaderStore((s) => s.setShellSlot);
|
|
47
|
-
}
|
|
48
|
-
function usePageHeaderHost() {
|
|
49
|
-
const addHost = usePageHeaderStore((s) => s.addHost);
|
|
50
|
-
const removeHost = usePageHeaderStore((s) => s.removeHost);
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
addHost();
|
|
53
|
-
return removeHost;
|
|
54
|
-
}, [addHost, removeHost]);
|
|
55
|
-
}
|
|
56
|
-
function useHasPageHeaderHost() {
|
|
57
|
-
return usePageHeaderStore((s) => s.hosts > 0 || s.outlets > 0);
|
|
58
|
-
}
|
|
59
|
-
function useHasPageHeaderOutlet() {
|
|
60
|
-
return usePageHeaderStore((s) => s.outlets > 0);
|
|
61
|
-
}
|
|
62
|
-
function PageHeaderOutlet({ className }) {
|
|
63
|
-
const setOutletSlot = usePageHeaderStore((s) => s.setOutletSlot);
|
|
64
|
-
const claimed = usePageHeaderStore((s) => s.claimed);
|
|
65
|
-
const addOutlet = usePageHeaderStore((s) => s.addOutlet);
|
|
66
|
-
const removeOutlet = usePageHeaderStore((s) => s.removeOutlet);
|
|
67
|
-
React.useEffect(() => {
|
|
68
|
-
addOutlet();
|
|
69
|
-
return removeOutlet;
|
|
70
|
-
}, [addOutlet, removeOutlet]);
|
|
71
|
-
return React.createElement("div", {
|
|
72
|
-
ref: setOutletSlot,
|
|
73
|
-
className: `${className ?? "mb-4"}${claimed ? "" : " hidden"}`
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function usePageHeader(active, options) {
|
|
77
|
-
const id = React.useId();
|
|
78
|
-
const claim = usePageHeaderStore((s) => s.claim);
|
|
79
|
-
const release = usePageHeaderStore((s) => s.release);
|
|
80
|
-
const back = options?.back ?? false;
|
|
81
|
-
React.useEffect(() => {
|
|
82
|
-
if (!active) {
|
|
83
|
-
release(id);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
claim(id, back);
|
|
87
|
-
return () => release(id);
|
|
88
|
-
}, [id, active, back, claim, release]);
|
|
89
|
-
}
|
|
90
|
-
function useHasPageHeaderBack() {
|
|
91
|
-
return usePageHeaderStore((s) => s.hasBack);
|
|
92
|
-
}
|
|
93
|
-
function PageTitlePortal({ children }) {
|
|
94
|
-
const slot = usePageTitleSlot();
|
|
95
|
-
if (!slot) return React.createElement(React.Fragment, null, children);
|
|
96
|
-
return createPortal(children, slot);
|
|
97
|
-
}
|
|
98
|
-
var useLayoutStore = create((set) => ({
|
|
99
|
-
sidebarOpen: true,
|
|
100
|
-
sidebarCollapsed: false,
|
|
101
|
-
mobileDrawerOpen: false,
|
|
102
|
-
commandPaletteOpen: false,
|
|
103
|
-
toggleSidebar: () => set((state) => ({ sidebarOpen: !state.sidebarOpen })),
|
|
104
|
-
setSidebarCollapsed: (collapsed) => set({ sidebarCollapsed: collapsed }),
|
|
105
|
-
toggleMobileDrawer: () => set((state) => ({ mobileDrawerOpen: !state.mobileDrawerOpen })),
|
|
106
|
-
setMobileDrawerOpen: (open) => set({ mobileDrawerOpen: open }),
|
|
107
|
-
// Opening search closes the mobile drawer. The palette is a full-screen
|
|
108
|
-
// surface on a phone, and leaving the drawer mounted behind it means the user
|
|
109
|
-
// dismisses the palette onto a menu they had already navigated away from.
|
|
110
|
-
// Handled here so every entry point behaves the same — the rail's search
|
|
111
|
-
// field, the topbar button and the ⌘K shortcut.
|
|
112
|
-
setCommandPaletteOpen: (open) => set(open ? { commandPaletteOpen: true, mobileDrawerOpen: false } : { commandPaletteOpen: false })
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
export { PageHeaderOutlet, PageTitlePortal, useHasPageActions, useHasPageHeaderBack, useHasPageHeaderHost, useHasPageHeaderOutlet, useLayoutStore, usePageHeader, usePageHeaderClaimed, usePageHeaderHost, usePageTitleSlotHost, useRegisterPageActions };
|
|
116
|
-
//# sourceMappingURL=chunk-HKGTF2YA.js.map
|
|
117
|
-
//# sourceMappingURL=chunk-HKGTF2YA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stores/page-header.store.ts","../src/stores/layout.store.ts"],"names":["create"],"mappings":";;;;;AA8DA,IAAM,kBAAA,GAAqB,MAAA,CAAwB,CAAC,GAAA,EAAK,GAAA,MAAS;AAAA,EAChE,SAAA,EAAW,IAAA;AAAA,EACX,cAAc,CAAC,OAAA,KAAY,IAAI,EAAE,SAAA,EAAW,SAAS,CAAA;AAAA,EACrD,UAAA,EAAY,IAAA;AAAA,EACZ,eAAe,CAAC,OAAA,KAAY,IAAI,EAAE,UAAA,EAAY,SAAS,CAAA;AAAA,EACvD,OAAA,EAAS,KAAA;AAAA,EACT,KAAA,EAAO,IAAA;AAAA,EACP,OAAA,EAAS,KAAA;AAAA,EACT,KAAA,EAAO,CAAA;AAAA,EACP,OAAA,EAAS,CAAA;AAAA,EACT,OAAA,EAAS,CAAA;AAAA,EACT,KAAA,EAAO,CAAC,KAAA,EAAO,OAAA,GAAU,KAAA,KAAU,GAAA,CAAI,EAAE,KAAA,EAAO,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,CAAA;AAAA,EAC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sourcesContent":["import * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { create } from 'zustand'\n\ninterface PageHeaderState {\n /**\n * Where a page's own header DRAWS, so it can stay in the tree that wrote it.\n *\n * This used to be the node itself, handed over through this store — and a\n * store is not a React tree. The shell rendered it under ITS providers, so a\n * title carrying anything plugin-shaped (a quote's status dropdown) threw\n * \"useStore must be used within CrmPage\" and took the page with it. Same\n * lesson the right rail already learned: the page stays where it was written\n * and portals its body in.\n */\n shellSlot: HTMLElement | null\n setShellSlot: (element: HTMLElement | null) => void\n /** A container deeper than the shell — a module's own content column — that is\n * better placed to draw the header. It wins while it is mounted. */\n outletSlot: HTMLElement | null\n setOutletSlot: (element: HTMLElement | null) => void\n /** A page is drawing its own header, so the shell must not draw one too. */\n claimed: boolean\n /** Identity of whoever owns the slot, so a late unmount can't clear a newer\n * owner's content — the exact race you get navigating form → form. */\n owner: string | null\n /** The claimed header carries a back action, i.e. what the bar is showing is\n * a SUBPAGE (\"← Contas a Pagar / Nova\"), not the module's own screen. The\n * module's tab band reads this to step aside: a form reached from a tab is\n * not one of the tabs, and leaving the strip up marks a place the user is no\n * longer at, one line under a back link that says so. */\n hasBack: boolean\n /** How many shells are currently rendering the slot. A page needs to know:\n * with no host (minimal layout, an embedded form, a modal) its header would\n * be claimed into the void, and the page must draw it inline instead. */\n hosts: number\n /**\n * Quantos OUTLETS internos estão mostrando o slot. Um outlet é um container\n * mais fundo que a shell — a coluna de conteúdo de um módulo com trilha\n * lateral — que fica em melhor posição para desenhar o cabeçalho.\n *\n * Quando existe um, a barra da shell se cala: as duas juntas desenhariam a\n * mesma migalha duas vezes, e a da shell atravessa a largura inteira,\n * empurrando a trilha do módulo para baixo do topo.\n */\n outlets: number\n /**\n * Quantos blocos de ações de página estão montados agora. A barra precisa\n * saber ANTES de decidir se existe: ela some no celular de alguns produtos, e\n * um \"Novo\" entregue a uma barra escondida simplesmente não aparecia.\n */\n actions: number\n claim: (owner: string, hasBack?: boolean) => void\n release: (owner: string) => void\n addHost: () => void\n removeHost: () => void\n addOutlet: () => void\n removeOutlet: () => void\n addActions: () => void\n removeActions: () => void\n}\n\nconst usePageHeaderStore = create<PageHeaderState>((set, get) => ({\n shellSlot: null,\n setShellSlot: (element) => set({ shellSlot: element }),\n outletSlot: null,\n setOutletSlot: (element) => set({ outletSlot: element }),\n claimed: false,\n owner: null,\n hasBack: false,\n hosts: 0,\n outlets: 0,\n actions: 0,\n claim: (owner, hasBack = false) => set({ owner, claimed: true, hasBack }),\n release: (owner) => {\n if (get().owner === owner) set({ owner: null, claimed: false, hasBack: false })\n },\n addHost: () => set((s) => ({ hosts: s.hosts + 1 })),\n removeHost: () => set((s) => ({ hosts: Math.max(0, s.hosts - 1) })),\n addOutlet: () => set((s) => ({ outlets: s.outlets + 1 })),\n removeOutlet: () => set((s) => ({ outlets: Math.max(0, s.outlets - 1) })),\n addActions: () => set((s) => ({ actions: s.actions + 1 })),\n removeActions: () => set((s) => ({ actions: Math.max(0, s.actions - 1) })),\n}))\n\n/** Declara que esta página tem ações no topo. Chamado por PageHeaderActions. */\nexport function useRegisterPageActions(): void {\n const add = usePageHeaderStore((s) => s.addActions)\n const remove = usePageHeaderStore((s) => s.removeActions)\n React.useEffect(() => {\n add()\n return remove\n }, [add, remove])\n}\n\n/** Se alguma página tem ações no topo agora. A barra usa para não sumir com\n * elas no celular, e para não existir vazia. */\nexport function useHasPageActions(): boolean {\n return usePageHeaderStore((s) => s.actions > 0)\n}\n\n/** Read the current override. The shell calls this; pages should not. */\n/** True while a page is drawing its own header into the bar's slot. */\nexport function usePageHeaderClaimed(): boolean {\n return usePageHeaderStore((s) => s.claimed)\n}\n\n/** The bar's portal target, for the page that draws into it. */\nexport function usePageTitleSlot(): HTMLElement | null {\n return usePageHeaderStore((s) => s.outletSlot ?? s.shellSlot)\n}\n\n/** Registers the bar's portal target. Called by the shell. */\nexport function usePageTitleSlotHost(): (element: HTMLElement | null) => void {\n return usePageHeaderStore((s) => s.setShellSlot)\n}\n\n/**\n * Declare that this shell renders the page-header slot. Called by the layout,\n * never by a page. Without it `PageHeader` cannot tell \"nobody claimed the bar\"\n * from \"there is no bar\", and a header would vanish instead of falling back.\n */\nexport function usePageHeaderHost(): void {\n const addHost = usePageHeaderStore((s) => s.addHost)\n const removeHost = usePageHeaderStore((s) => s.removeHost)\n React.useEffect(() => {\n addHost()\n return removeHost\n }, [addHost, removeHost])\n}\n\n/** Whether any shell OR inner outlet is showing the slot right now. */\nexport function useHasPageHeaderHost(): boolean {\n return usePageHeaderStore((s) => s.hosts > 0 || s.outlets > 0)\n}\n\n/** True when a deeper container took over drawing the header. The shell bar\n * uses this to stand down. */\nexport function useHasPageHeaderOutlet(): boolean {\n return usePageHeaderStore((s) => s.outlets > 0)\n}\n\n/**\n * Desenha o cabeçalho AQUI em vez de na barra da shell.\n *\n * Para quem tem uma coluna própria de conteúdo — um módulo com trilha lateral —,\n * onde a barra da shell, larga demais, passaria por cima da trilha.\n */\nexport function PageHeaderOutlet({ className }: { className?: string }): React.ReactElement | null {\n const setOutletSlot = usePageHeaderStore((s) => s.setOutletSlot)\n const claimed = usePageHeaderStore((s) => s.claimed)\n const addOutlet = usePageHeaderStore((s) => s.addOutlet)\n const removeOutlet = usePageHeaderStore((s) => s.removeOutlet)\n\n React.useEffect(() => {\n addOutlet()\n return removeOutlet\n }, [addOutlet, removeOutlet])\n\n // A target, not a renderer: the page portals its own header in here, keeping\n // the tree that wrote it. `empty:hidden` keeps the margin off an unused slot.\n return React.createElement('div', {\n ref: setOutletSlot,\n className: `${className ?? 'mb-4'}${claimed ? '' : ' hidden'}`,\n })\n}\n\n/**\n * Put this page's own header — a back link, a breadcrumb — into the shell's top\n * bar, replacing the page title for as long as the page is mounted.\n *\n * Prefer the `PageHeader` component: it is this hook plus the one agreed layout\n * (← + title), so every screen in every app reads the same. Reach for the hook\n * directly only for a header that genuinely is not \"back + title\".\n *\n * A form or detail screen already says where it is (\"← Novo produto\") and the\n * bar above it was saying \"Produtos\" again, one line up. Two headers stacked is\n * a whole row of vertical space spent repeating a word.\n *\n * The node is re-claimed on every change so a breadcrumb whose label depends on\n * loaded data (a record's name) updates once it arrives.\n */\n/**\n * Tells the bar that this page is drawing its own header, and whether that\n * header carries a back action. The header ITSELF goes through `PageTitlePortal`\n * — flags travel as data, JSX stays in the tree that wrote it.\n */\nexport function usePageHeader(active: boolean, options?: { back?: boolean }): void {\n const id = React.useId()\n const claim = usePageHeaderStore((s) => s.claim)\n const release = usePageHeaderStore((s) => s.release)\n const back = options?.back ?? false\n\n React.useEffect(() => {\n if (!active) { release(id); return }\n claim(id, back)\n return () => release(id)\n }, [id, active, back, claim, release])\n}\n\n/** True while the bar is showing a subpage's \"← parent / title\". See\n * `PageHeaderState.hasBack`. */\nexport function useHasPageHeaderBack(): boolean {\n return usePageHeaderStore((s) => s.hasBack)\n}\n\nexport { usePageHeaderStore }\n\n/**\n * Draws a page's own header into the bar WITHOUT leaving its React tree, so a\n * title made of plugin components still has its plugin's providers above it.\n * With nowhere to draw into it renders where it stands, as any fallback.\n */\nexport function PageTitlePortal({ children }: { children: React.ReactNode }): React.ReactElement | null {\n const slot = usePageTitleSlot()\n if (!slot) return React.createElement(React.Fragment, null, children)\n return createPortal(children, slot)\n}\n","import { create } from 'zustand'\n\ninterface LayoutState {\n sidebarOpen: boolean\n sidebarCollapsed: boolean\n mobileDrawerOpen: boolean\n commandPaletteOpen: boolean\n setMobileDrawerOpen: (open: boolean) => void\n toggleSidebar: () => void\n setSidebarCollapsed: (collapsed: boolean) => void\n toggleMobileDrawer: () => void\n setCommandPaletteOpen: (open: boolean) => void\n}\n\nexport const useLayoutStore = create<LayoutState>((set) => ({\n sidebarOpen: true,\n sidebarCollapsed: false,\n mobileDrawerOpen: false,\n commandPaletteOpen: false,\n\n toggleSidebar: () =>\n set((state) => ({ sidebarOpen: !state.sidebarOpen })),\n\n setSidebarCollapsed: (collapsed) =>\n set({ sidebarCollapsed: collapsed }),\n\n toggleMobileDrawer: () =>\n set((state) => ({ mobileDrawerOpen: !state.mobileDrawerOpen })),\n\n setMobileDrawerOpen: (open) => set({ mobileDrawerOpen: open }),\n\n // Opening search closes the mobile drawer. The palette is a full-screen\n // surface on a phone, and leaving the drawer mounted behind it means the user\n // dismisses the palette onto a menu they had already navigated away from.\n // Handled here so every entry point behaves the same — the rail's search\n // field, the topbar button and the ⌘K shortcut.\n setCommandPaletteOpen: (open) =>\n set(open ? { commandPaletteOpen: true, mobileDrawerOpen: false } : { commandPaletteOpen: false }),\n}))\n"]}
|