@fayz-ai/ui 0.21.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.
Files changed (96) hide show
  1. package/dist/analytics/AnalyticsCard.d.ts.map +1 -1
  2. package/dist/analytics/AnalyticsControls.d.ts.map +1 -1
  3. package/dist/analytics/DateRangeControl.d.ts +14 -0
  4. package/dist/analytics/DateRangeControl.d.ts.map +1 -0
  5. package/dist/analytics/StatementTable.d.ts +22 -0
  6. package/dist/analytics/StatementTable.d.ts.map +1 -0
  7. package/dist/analytics/context.d.ts +8 -0
  8. package/dist/analytics/context.d.ts.map +1 -1
  9. package/dist/analytics/derive.d.ts +13 -0
  10. package/dist/analytics/derive.d.ts.map +1 -1
  11. package/dist/analytics/index.d.ts +7 -1
  12. package/dist/analytics/index.d.ts.map +1 -1
  13. package/dist/analytics/statement.d.ts +58 -0
  14. package/dist/analytics/statement.d.ts.map +1 -0
  15. package/dist/{chunk-E44WOPCR.js → chunk-HO2P2XB4.js} +428 -58
  16. package/dist/chunk-HO2P2XB4.js.map +1 -0
  17. package/dist/{chunk-P3YTL3MF.js → chunk-L4TXDKMN.js} +5 -5
  18. package/dist/chunk-L4TXDKMN.js.map +1 -0
  19. package/dist/{chunk-AIUHVTVK.js → chunk-OWN3GFDG.js} +5 -3
  20. package/dist/chunk-OWN3GFDG.js.map +1 -0
  21. package/dist/{chunk-EGHEU3U5.js → chunk-RRNMNFLF.js} +492 -789
  22. package/dist/chunk-RRNMNFLF.js.map +1 -0
  23. package/dist/chunk-UP7WVKSU.js +631 -0
  24. package/dist/chunk-UP7WVKSU.js.map +1 -0
  25. package/dist/{chunk-OYH7CEMB.js → chunk-XEUIYSW2.js} +330 -366
  26. package/dist/chunk-XEUIYSW2.js.map +1 -0
  27. package/dist/{chunk-MBGTFL4I.js → chunk-XKFYX3DG.js} +39 -8
  28. package/dist/chunk-XKFYX3DG.js.map +1 -0
  29. package/dist/dashboard/OnboardingWidget.d.ts +4 -1
  30. package/dist/dashboard/OnboardingWidget.d.ts.map +1 -1
  31. package/dist/dashboard/SidebarOnboarding.d.ts +11 -1
  32. package/dist/dashboard/SidebarOnboarding.d.ts.map +1 -1
  33. package/dist/dashboard/index.js +4 -4
  34. package/dist/icons.js +1 -1
  35. package/dist/index.d.ts +3 -3
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +1109 -166
  38. package/dist/index.js.map +1 -1
  39. package/dist/layout/AppShell.d.ts +7 -1
  40. package/dist/layout/AppShell.d.ts.map +1 -1
  41. package/dist/layout/ModulePage.d.ts.map +1 -1
  42. package/dist/layout/SaveBar.d.ts.map +1 -1
  43. package/dist/layout/ShellSearch.d.ts +53 -0
  44. package/dist/layout/ShellSearch.d.ts.map +1 -0
  45. package/dist/layout/Sidebar.d.ts +10 -6
  46. package/dist/layout/Sidebar.d.ts.map +1 -1
  47. package/dist/layout/Takeover.d.ts.map +1 -1
  48. package/dist/layout/index.d.ts +1 -0
  49. package/dist/layout/index.d.ts.map +1 -1
  50. package/dist/layout/index.js +4 -4
  51. package/dist/primitives/data-table.d.ts.map +1 -1
  52. package/dist/primitives/date-range-chip.d.ts +32 -0
  53. package/dist/primitives/date-range-chip.d.ts.map +1 -0
  54. package/dist/primitives/header-tabs.d.ts +7 -1
  55. package/dist/primitives/header-tabs.d.ts.map +1 -1
  56. package/dist/primitives/index.d.ts +2 -1
  57. package/dist/primitives/index.d.ts.map +1 -1
  58. package/dist/primitives/index.js +5 -5
  59. package/dist/primitives/list-view.d.ts +43 -1
  60. package/dist/primitives/list-view.d.ts.map +1 -1
  61. package/dist/primitives/modal.d.ts +2 -0
  62. package/dist/primitives/modal.d.ts.map +1 -1
  63. package/dist/primitives/page-actions.d.ts +14 -0
  64. package/dist/primitives/page-actions.d.ts.map +1 -1
  65. package/dist/primitives/page-toolbar.d.ts +16 -1
  66. package/dist/primitives/page-toolbar.d.ts.map +1 -1
  67. package/dist/primitives/search-select.d.ts +3 -1
  68. package/dist/primitives/search-select.d.ts.map +1 -1
  69. package/dist/primitives/segmented-control.d.ts.map +1 -1
  70. package/dist/primitives/stock-entry-form.d.ts +4 -1
  71. package/dist/primitives/stock-entry-form.d.ts.map +1 -1
  72. package/dist/stores/layout.store.d.ts +20 -1
  73. package/dist/stores/layout.store.d.ts.map +1 -1
  74. package/dist/styles.css +133 -0
  75. package/dist/tour/PracticeOverlay.d.ts +12 -0
  76. package/dist/tour/PracticeOverlay.d.ts.map +1 -0
  77. package/dist/tour/TourSpotlight.d.ts.map +1 -1
  78. package/dist/tour/confetti.d.ts +17 -0
  79. package/dist/tour/confetti.d.ts.map +1 -0
  80. package/dist/tour/index.d.ts +3 -0
  81. package/dist/tour/index.d.ts.map +1 -1
  82. package/dist/tour/practice.store.d.ts +28 -0
  83. package/dist/tour/practice.store.d.ts.map +1 -0
  84. package/dist/tour/tour.store.d.ts +4 -0
  85. package/dist/tour/tour.store.d.ts.map +1 -1
  86. package/dist/tour/types.d.ts +17 -0
  87. package/dist/tour/types.d.ts.map +1 -1
  88. package/package.json +2 -2
  89. package/dist/chunk-AIUHVTVK.js.map +0 -1
  90. package/dist/chunk-E44WOPCR.js.map +0 -1
  91. package/dist/chunk-EGHEU3U5.js.map +0 -1
  92. package/dist/chunk-HKGTF2YA.js +0 -117
  93. package/dist/chunk-HKGTF2YA.js.map +0 -1
  94. package/dist/chunk-MBGTFL4I.js.map +0 -1
  95. package/dist/chunk-OYH7CEMB.js.map +0 -1
  96. package/dist/chunk-P3YTL3MF.js.map +0 -1
@@ -26,6 +26,9 @@ export interface StockEntryFormProps {
26
26
  /** Current on-hand, to show the consequence while they type. */
27
27
  available: number;
28
28
  saving?: boolean;
29
+ /** An unresolved command may be retried, but its inputs must not change. */
30
+ readOnly?: boolean;
31
+ notice?: string;
29
32
  onSubmit: (entry: StockEntrySubmit) => void | Promise<void>;
30
33
  labels?: Partial<typeof DEFAULT_LABELS>;
31
34
  }
@@ -47,6 +50,6 @@ declare const DEFAULT_LABELS: {
47
50
  submit: string;
48
51
  submitting: string;
49
52
  };
50
- export declare function StockEntryForm({ verb, onVerbChange, onClose, verbs, reasons, available, saving, onSubmit, labels: overrides, }: StockEntryFormProps): React.JSX.Element;
53
+ export declare function StockEntryForm({ verb, onVerbChange, onClose, verbs, reasons, available, saving, readOnly, notice, onSubmit, labels: overrides, }: StockEntryFormProps): React.JSX.Element;
51
54
  export {};
52
55
  //# sourceMappingURL=stock-entry-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stock-entry-form.d.ts","sourceRoot":"","sources":["../../src/primitives/stock-entry-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAA;CACjD;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;IAChC,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACrC,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QA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CAAA;IACrC,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC,OAAO,cAAc,CAAC,CAAA;CACxC;AAED,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;CAiBnB,CAAA;AAOD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,OAAY,EAAE,SAAS,EAC3D,MAAc,EAAE,QAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GACtE,EAAE,mBAAmB,qBAmKrB"}
@@ -2,12 +2,31 @@ interface LayoutState {
2
2
  sidebarOpen: boolean;
3
3
  sidebarCollapsed: boolean;
4
4
  mobileDrawerOpen: boolean;
5
+ /**
6
+ * A próxima troca de rota NÃO fecha a gaveta.
7
+ *
8
+ * "Voltar para o início" navega, mas o que ele faz é trocar o TRILHO: a
9
+ * pessoa segue escolhendo para onde ir, dentro do menu. Fechar ali devolvia
10
+ * a tela de onde ela estava saindo e obrigava a reabrir o menu para o passo
11
+ * seguinte. Consumido uma vez e rearmado em false, para que um destino de
12
+ * verdade continue fechando.
13
+ */
14
+ drawerKeepOpenOnce: boolean;
5
15
  commandPaletteOpen: boolean;
16
+ /**
17
+ * O que a paleta já deve estar procurando quando abrir.
18
+ *
19
+ * A busca do trilho filtra o trilho; quando o que se procura não está lá,
20
+ * ela ESCALA para a paleta — e escalar não pode custar digitar de novo o
21
+ * que já foi digitado. Zerado ao fechar, para que o ⌘K seco abra limpo.
22
+ */
23
+ commandPaletteQuery: string;
6
24
  setMobileDrawerOpen: (open: boolean) => void;
25
+ keepDrawerOpenOnce: () => void;
7
26
  toggleSidebar: () => void;
8
27
  setSidebarCollapsed: (collapsed: boolean) => void;
9
28
  toggleMobileDrawer: () => void;
10
- setCommandPaletteOpen: (open: boolean) => void;
29
+ setCommandPaletteOpen: (open: boolean, query?: string) => void;
11
30
  }
12
31
  export declare const useLayoutStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LayoutState>>;
13
32
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"layout.store.d.ts","sourceRoot":"","sources":["../../src/stores/layout.store.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,WAAW,EAAE,OAAO,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;IACzB,gBAAgB,EAAE,OAAO,CAAA;IACzB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACjD,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,qBAAqB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/C;AAED,eAAO,MAAM,cAAc,0EAwBxB,CAAA"}
1
+ {"version":3,"file":"layout.store.d.ts","sourceRoot":"","sources":["../../src/stores/layout.store.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,WAAW,EAAE,OAAO,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;IACzB,gBAAgB,EAAE,OAAO,CAAA;IACzB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,OAAO,CAAA;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;;;;;OAMG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACjD,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,qBAAqB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/D;AAED,eAAO,MAAM,cAAc,0EA6BxB,CAAA"}
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
@@ -1083,6 +1109,14 @@ html {
1083
1109
  a soft halo that breathes instead: the movement is what says "this one, now",
1084
1110
  and it is the only thing moving on a dimmed screen, so it can be gentle.
1085
1111
  --------------------------------------------------------------------------- */
1112
+ /* Practice footprint — the next field's badge pulses to say "you, here, now". */
1113
+ @keyframes fz-practice-pulse {
1114
+ 0%, 100% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.5); }
1115
+ 50% { box-shadow: 0 0 0 6px hsl(var(--primary) / 0); }
1116
+ }
1117
+ .fz-practice-pulse { animation: fz-practice-pulse 1.5s ease-in-out infinite; }
1118
+ @media (prefers-reduced-motion: reduce) { .fz-practice-pulse { animation: none; } }
1119
+
1086
1120
  @keyframes fz-spotlight-breathe {
1087
1121
  0%, 100% { box-shadow: 0 0 0 2px hsl(var(--primary) / 0.55), 0 0 0 7px hsl(var(--primary) / 0.14); }
1088
1122
  50% { box-shadow: 0 0 0 3px hsl(var(--primary) / 0.75), 0 0 0 12px hsl(var(--primary) / 0.06); }
@@ -1099,6 +1133,73 @@ html {
1099
1133
  .fz-spotlight-ring { animation: none; }
1100
1134
  }
1101
1135
 
1136
+ /* The guiding cursor — the hand that walks somebody to the control.
1137
+ The translate is set inline by TourSpotlight; this transition is the whole
1138
+ journey. It sits above the dim and below nothing: z-index inherits from the
1139
+ overlay container, and pointer-events stay off so it can never eat the click
1140
+ it is pointing at. */
1141
+ .fz-tour-cursor {
1142
+ position: fixed;
1143
+ top: 0;
1144
+ left: 0;
1145
+ pointer-events: none;
1146
+ transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
1147
+ filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.45));
1148
+ will-change: transform;
1149
+ }
1150
+ /* Travelling: the cursor breathes — shrinks leaning into the move, swells as
1151
+ it glides — so it reads as a living hand, not a sprite being dragged. */
1152
+ @keyframes fz-tour-cursor-breathe {
1153
+ 0%, 100% { scale: 1; }
1154
+ 35% { scale: 0.84; }
1155
+ 70% { scale: 1.1; }
1156
+ }
1157
+ .fz-tour-cursor-travel svg { animation: fz-tour-cursor-breathe 700ms ease-in-out infinite; }
1158
+
1159
+ @keyframes fz-tour-cursor-tap {
1160
+ 0% { scale: 1; }
1161
+ 35% { scale: 0.82; }
1162
+ 100% { scale: 1; }
1163
+ }
1164
+ .fz-tour-cursor-arrived svg { animation: fz-tour-cursor-tap 420ms ease-out; }
1165
+
1166
+ /* The "click": two rings ripple out from the cursor tip on arrival, like a
1167
+ tap on a touchscreen. Pseudo-elements so they cost nothing while idle. */
1168
+ .fz-tour-cursor::before,
1169
+ .fz-tour-cursor::after {
1170
+ content: '';
1171
+ position: absolute;
1172
+ /* Centered on the cursor TIP (the translate origin sits at the SVG's
1173
+ top-left; the tip of the drawn arrow lands ~8px right, ~4px down). */
1174
+ left: -6px;
1175
+ top: -10px;
1176
+ width: 28px;
1177
+ height: 28px;
1178
+ border-radius: 9999px;
1179
+ border: 2px solid hsl(var(--primary) / 0.65);
1180
+ opacity: 0;
1181
+ scale: 0.3;
1182
+ pointer-events: none;
1183
+ }
1184
+ @keyframes fz-tour-ripple {
1185
+ 0% { opacity: 0.9; scale: 0.3; }
1186
+ 100% { opacity: 0; scale: 2.4; }
1187
+ }
1188
+ .fz-tour-cursor-arrived::before { animation: fz-tour-ripple 640ms ease-out; }
1189
+ .fz-tour-cursor-arrived::after { animation: fz-tour-ripple 640ms ease-out 150ms; }
1190
+ /* On a handover stop the cursor stays perched and nudges toward the control:
1191
+ the visual for "this one — go ahead". */
1192
+ @keyframes fz-tour-cursor-nudge {
1193
+ 0%, 100% { translate: 0 0; }
1194
+ 50% { translate: -5px -5px; }
1195
+ }
1196
+ .fz-tour-cursor-nudge svg { animation: fz-tour-cursor-nudge 1.6s ease-in-out 480ms infinite; }
1197
+ @media (prefers-reduced-motion: reduce) {
1198
+ .fz-tour-cursor { transition: none; }
1199
+ .fz-tour-cursor-arrived svg, .fz-tour-cursor-nudge svg, .fz-tour-cursor-travel svg { animation: none; }
1200
+ .fz-tour-cursor-arrived::before, .fz-tour-cursor-arrived::after { animation: none; }
1201
+ }
1202
+
1102
1203
  /* ---------------------------------------------------------------------------
1103
1204
  Takeover — a surface that covers the whole shell (see layout/Takeover.tsx).
1104
1205
 
@@ -1122,3 +1223,35 @@ html {
1122
1223
  @media (prefers-reduced-motion: reduce) {
1123
1224
  .saas-takeover-in, .saas-takeover-out { animation-duration: 1ms; }
1124
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
+ }
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The footprints. No dim, no cursor — the person is DRIVING now. Each field
4
+ * wears a numbered badge that turns into a check the moment they touch it; the
5
+ * one they should touch next pulses. Filling the last (Save) rains confetti
6
+ * from the bottom of the whole screen.
7
+ *
8
+ * Mounted once by the shell, next to TourSpotlight. Renders nothing until a
9
+ * practice run is active.
10
+ */
11
+ export declare function PracticeOverlay(): React.ReactPortal | null;
12
+ //# sourceMappingURL=PracticeOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PracticeOverlay.d.ts","sourceRoot":"","sources":["../../src/tour/PracticeOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B;;;;;;;;GAQG;AACH,wBAAgB,eAAe,6BAmG9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"TourSpotlight.d.ts","sourceRoot":"","sources":["../../src/tour/TourSpotlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC,OAAO,cAAc,CAAC,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,cAAc;;;;;;;;CAQnB,CAAA;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,4BAyLtE"}
1
+ {"version":3,"file":"TourSpotlight.d.ts","sourceRoot":"","sources":["../../src/tour/TourSpotlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC,OAAO,cAAc,CAAC,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,cAAc;;;;;;;;CAQnB,CAAA;AA4DD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,4BAuWtE"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Confetti — the reward at the end of a tour, dependency-free.
3
+ *
4
+ * A short burst on a full-screen canvas that removes itself. No library: the
5
+ * ui package ships in every app and this is ~40 lines of physics. Honours
6
+ * reduced-motion by doing nothing. Deterministic-ish randomness seeded off the
7
+ * call time is fine — this is decoration, never resumed.
8
+ */
9
+ export declare function fireConfetti(opts?: {
10
+ origin?: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ count?: number;
15
+ fromBottom?: boolean;
16
+ }): void;
17
+ //# sourceMappingURL=confetti.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../src/tour/confetti.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAiGrH"}
@@ -1,4 +1,7 @@
1
1
  export { TourSpotlight, type TourSpotlightProps } from './TourSpotlight';
2
2
  export { useTourStore, setTourNavigator, getTourNavigator, currentStop, type TourState } from './tour.store';
3
3
  export { tourAnchor, type TourDef, type TourStopDef } from './types';
4
+ export { fireConfetti } from './confetti';
5
+ export { PracticeOverlay } from './PracticeOverlay';
6
+ export { usePracticeStore, nextPracticeStep, type PracticeStep, type PracticeState } from './practice.store';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC5G,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC5G,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import type { PracticeStep } from './types';
2
+ /**
3
+ * Practice mode — the second half of a guided feature.
4
+ *
5
+ * The tour DRIVES: a cursor walks the person to the create screen. Practice
6
+ * WATCHES: numbered footprints pin to the real fields and the person fills them
7
+ * in themselves, each ticking as they go, the last one (Save) raining confetti.
8
+ * Watching teaches where things are; doing teaches how — this is the doing.
9
+ *
10
+ * A step is "done" the first time the person interacts inside its anchor
11
+ * (types, picks, clicks). Interaction, not a value check: it is robust across
12
+ * every field kind, and the goal is to fix the SEQUENCE in muscle memory, not
13
+ * to validate the form (the form validates itself on save).
14
+ */
15
+ export type { PracticeStep };
16
+ export interface PracticeState {
17
+ title: string | null;
18
+ steps: PracticeStep[];
19
+ /** Anchors already done, in the order they were completed. */
20
+ done: string[];
21
+ start: (title: string, steps: PracticeStep[]) => void;
22
+ markDone: (anchor: string) => void;
23
+ stop: () => void;
24
+ }
25
+ export declare const usePracticeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<PracticeState>>;
26
+ /** The next footprint the person should touch — the first not-done step. */
27
+ export declare function nextPracticeStep(steps: PracticeStep[], done: string[]): PracticeStep | undefined;
28
+ //# sourceMappingURL=practice.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"practice.store.d.ts","sourceRoot":"","sources":["../../src/tour/practice.store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;;;;;;;;;GAYG;AAEH,YAAY,EAAE,YAAY,EAAE,CAAA;AAE5B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;IACrD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED,eAAO,MAAM,gBAAgB,4EAkB1B,CAAA;AAEH,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,GAAG,SAAS,CAEhG"}
@@ -9,12 +9,16 @@ export interface TourState {
9
9
  tourId: string;
10
10
  completed: boolean;
11
11
  } | null;
12
+ /** The most recent tour, running or not — what "restart" restarts. */
13
+ lastTour: TourDef | null;
12
14
  start: (tour: TourDef) => void;
13
15
  next: () => void;
14
16
  prev: () => void;
15
17
  goTo: (index: number) => void;
16
18
  /** `completed` distinguishes finishing from skipping; both close the overlay. */
17
19
  stop: (completed?: boolean) => void;
20
+ /** Start the last tour over from stop 1 — running (reset) or ended (revive). */
21
+ restart: () => void;
18
22
  }
19
23
  export declare const useTourStore: import("zustand").UseBoundStore<import("zustand").StoreApi<TourState>>;
20
24
  /** The stop on screen right now, if any. */
@@ -1 +1 @@
1
- {"version":3,"file":"tour.store.d.ts","sourceRoot":"","sources":["../../src/tour/tour.store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAcnD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAE/E;AACD,wBAAgB,gBAAgB,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAEvE;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,WAAW,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IAC1D,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,iFAAiF;IACjF,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC;AAED,eAAO,MAAM,YAAY,wEA8BtB,CAAA;AAEH,4CAA4C;AAC5C,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAErE"}
1
+ {"version":3,"file":"tour.store.d.ts","sourceRoot":"","sources":["../../src/tour/tour.store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAenD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAE/E;AACD,wBAAgB,gBAAgB,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAEvE;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,WAAW,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IAC1D,sEAAsE;IACtE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,iFAAiF;IACjF,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,gFAAgF;IAChF,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,YAAY,wEA6CtB,CAAA;AAEH,4CAA4C;AAC5C,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAErE"}
@@ -16,10 +16,27 @@ export interface TourStopDef {
16
16
  /** Wait for the person to use the control instead of offering "next". */
17
17
  waitForUser?: boolean;
18
18
  }
19
+ /**
20
+ * A field the person fills themselves after the tour drops them on the form.
21
+ * The one canonical shape for a practice footprint in the UI kit; `practice.store`
22
+ * and `PracticeOverlay` use this, and @fayz-ai/core mirrors it as `PracticeAction`.
23
+ */
24
+ export interface PracticeStep {
25
+ anchor: string;
26
+ label: string;
27
+ /** Completing this ends practice and fires the finale. */
28
+ final?: boolean;
29
+ }
19
30
  export interface TourDef {
20
31
  id: string;
21
32
  title?: string;
22
33
  stops: TourStopDef[];
34
+ /**
35
+ * What to do AFTER the tour arrives. The stops walk them to the create
36
+ * screen; these footprints let them fill it in themselves, ticking as they
37
+ * go. Completing the whole tour hands off to practice instead of just ending.
38
+ */
39
+ practice?: PracticeStep[];
23
40
  }
24
41
  /** Spread onto the element a tour points at: `<Button {...tourAnchor('shop.new')} />`. */
25
42
  export declare function tourAnchor(anchor: string): {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tour/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACxD,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAElE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tour/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACxD,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;CAC1B;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAElE"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "beta"
5
5
  },
6
- "version": "0.21.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.21.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/primitives/brand-marks.tsx","../src/icons.ts"],"names":["ChefControlMark"],"mappings":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,KAAK,CAAA;AAC/B;AAGO,SAAS,cAAc,IAAA,EAAsC;AAClE,EAAA,OAAO,SAAS,IAAI,CAAA;AACtB;AAGO,IAAM,QAAA,GAAW","file":"chunk-AIUHVTVK.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, 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, 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,IAAA,GAAaA,kBAGjB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,+EAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,IAAA,CAAK,WAAA,GAAc,MAAA;AAEnB,IAAM,UAAA,GAAmBA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AU,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"]}