@fayz-ai/ui 0.31.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VBYFN5ZL.js → chunk-33A7SN2N.js} +693 -173
- package/dist/chunk-33A7SN2N.js.map +1 -0
- package/dist/{chunk-ABY2HXG4.js → chunk-6GWXDVCO.js} +223 -27
- package/dist/chunk-6GWXDVCO.js.map +1 -0
- package/dist/{chunk-VDAYIQX4.js → chunk-C6PW5C5Q.js} +3 -3
- package/dist/chunk-C6PW5C5Q.js.map +1 -0
- package/dist/{chunk-NTPQRDJF.js → chunk-Q2B5RPH5.js} +13 -16
- package/dist/chunk-Q2B5RPH5.js.map +1 -0
- package/dist/{chunk-UDY4KJRX.js → chunk-UNEEY5XG.js} +7 -5
- package/dist/chunk-UNEEY5XG.js.map +1 -0
- package/dist/dashboard/DashboardGrid.d.ts +8 -1
- package/dist/dashboard/DashboardGrid.d.ts.map +1 -1
- package/dist/dashboard/KpiCard.d.ts.map +1 -1
- package/dist/dashboard/index.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/ModulePage.d.ts +55 -2
- package/dist/layout/ModulePage.d.ts.map +1 -1
- package/dist/layout/Sidebar.d.ts +6 -1
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/rail-flyout.d.ts.map +1 -1
- package/dist/primitives/collapsible-column.d.ts +38 -0
- package/dist/primitives/collapsible-column.d.ts.map +1 -0
- package/dist/primitives/coming-soon.d.ts +31 -0
- package/dist/primitives/coming-soon.d.ts.map +1 -0
- package/dist/primitives/data-table.d.ts +10 -1
- package/dist/primitives/data-table.d.ts.map +1 -1
- package/dist/primitives/date-picker.d.ts +6 -1
- package/dist/primitives/date-picker.d.ts.map +1 -1
- package/dist/primitives/filter-panel.d.ts +85 -0
- package/dist/primitives/filter-panel.d.ts.map +1 -0
- package/dist/primitives/filter-rail.d.ts +10 -7
- package/dist/primitives/filter-rail.d.ts.map +1 -1
- package/dist/primitives/header-tabs.d.ts +9 -35
- package/dist/primitives/header-tabs.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +3 -3
- package/dist/primitives/input.d.ts.map +1 -1
- package/dist/primitives/list-view.d.ts +3 -1
- package/dist/primitives/list-view.d.ts.map +1 -1
- package/dist/primitives/nav-connector.d.ts +23 -0
- package/dist/primitives/nav-connector.d.ts.map +1 -0
- package/dist/primitives/phone-field.d.ts.map +1 -1
- package/dist/primitives/search-select.d.ts.map +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/stores/page-header.store.d.ts +35 -1
- package/dist/stores/page-header.store.d.ts.map +1 -1
- package/dist/styles.css +66 -1
- package/dist/theme/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-ABY2HXG4.js.map +0 -1
- package/dist/chunk-NTPQRDJF.js.map +0 -1
- package/dist/chunk-UDY4KJRX.js.map +0 -1
- package/dist/chunk-VBYFN5ZL.js.map +0 -1
- package/dist/chunk-VDAYIQX4.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useIsWide, Dropdown, DropdownTrigger, DropdownContent, DropdownSeparator, DropdownItem, Card, FilterMenuRow, FilterMenu, DataTable, Popover, PopoverTrigger, PopoverContent, Checkbox } from './chunk-
|
|
2
|
-
import { useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions } from './chunk-
|
|
1
|
+
import { useIsWide, Dropdown, DropdownTrigger, DropdownContent, DropdownSeparator, DropdownItem, Card, FilterMenuRow, FilterMenu, DataTable, Popover, PopoverTrigger, PopoverContent, Checkbox } from './chunk-UNEEY5XG.js';
|
|
2
|
+
import { COLUMN_WIDTH, useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions, SubpageHeader, PageRail, CollapsibleColumn } from './chunk-33A7SN2N.js';
|
|
3
3
|
import { cn, Button } from './chunk-OKZ6WQB3.js';
|
|
4
4
|
import * as React18 from 'react';
|
|
5
5
|
import React18__default, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
|
-
import { X, ChevronDown, ChevronUp, Check, ArrowLeft, MoreHorizontal, Plus, MoreVertical, Search, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ImageIcon, RefreshCw, Clock, Download, Calendar, Loader2, Pencil, CalendarDays, MicOff, Mic } from 'lucide-react';
|
|
9
|
+
import { X, ChevronDown, ChevronUp, Check, ArrowLeft, MoreHorizontal, Plus, MoreVertical, Search, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ImageIcon, RefreshCw, Clock, Download, Calendar, Loader2, Pencil, CalendarDays, MicOff, Mic, ArrowRight } from 'lucide-react';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
11
|
import { Toaster } from 'sonner';
|
|
12
12
|
export { toast } from 'sonner';
|
|
@@ -27,7 +27,7 @@ var Input = React18.forwardRef(
|
|
|
27
27
|
type,
|
|
28
28
|
id: inputId,
|
|
29
29
|
className: cn(
|
|
30
|
-
"flex h-
|
|
30
|
+
"flex h-9 w-full rounded-input border border-input bg-card px-3 py-1.5 text-sm text-foreground shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
31
31
|
error && "border-destructive focus-visible:ring-destructive",
|
|
32
32
|
className
|
|
33
33
|
),
|
|
@@ -190,7 +190,7 @@ var SelectTrigger = React18.forwardRef(({ className, children, ...props }, ref)
|
|
|
190
190
|
{
|
|
191
191
|
ref,
|
|
192
192
|
className: cn(
|
|
193
|
-
"flex h-
|
|
193
|
+
"flex h-9 w-full items-center justify-between rounded-input border border-input bg-background px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
194
194
|
className
|
|
195
195
|
),
|
|
196
196
|
...props,
|
|
@@ -1075,7 +1075,11 @@ function PhoneField({
|
|
|
1075
1075
|
"aria-label": rest["aria-label"],
|
|
1076
1076
|
"data-testid": rest["data-testid"],
|
|
1077
1077
|
className: cn(
|
|
1078
|
-
|
|
1078
|
+
// `rounded-input`/`border-input` e não `rounded-md`/`border`: este campo
|
|
1079
|
+
// senta ao lado de um texto e de um seletor do DS, e era o único com
|
|
1080
|
+
// raio próprio — 6px contra os 12px do resto, na mesma linha da ficha.
|
|
1081
|
+
// O raio é do TEMA (`--input-radius`), que é quem sabe o desenho da casa.
|
|
1082
|
+
"flex h-9 w-full rounded-input border border-input bg-background px-3 py-1.5 text-sm outline-none focus:border-primary",
|
|
1079
1083
|
className
|
|
1080
1084
|
)
|
|
1081
1085
|
}
|
|
@@ -1448,6 +1452,7 @@ function ListView({
|
|
|
1448
1452
|
onRefresh,
|
|
1449
1453
|
refreshLabel = "Refresh",
|
|
1450
1454
|
className,
|
|
1455
|
+
rowClassName,
|
|
1451
1456
|
actions
|
|
1452
1457
|
}) {
|
|
1453
1458
|
const [internalSearch, setInternalSearch] = useState(controlledSearch ?? "");
|
|
@@ -1573,7 +1578,8 @@ function ListView({
|
|
|
1573
1578
|
selectable: selection.selectable,
|
|
1574
1579
|
selectedIds: selection.selectedIds,
|
|
1575
1580
|
onSelectedIdsChange: selection.setSelectedIds,
|
|
1576
|
-
getRowId
|
|
1581
|
+
getRowId,
|
|
1582
|
+
rowClassName
|
|
1577
1583
|
}
|
|
1578
1584
|
),
|
|
1579
1585
|
showPagination && /* @__PURE__ */ jsxs("div", { className: "-mt-px flex min-h-9 flex-col items-center gap-2 rounded-b-card border-t border-border px-3 py-2 sm:grid sm:grid-cols-[1fr_auto_1fr] sm:gap-3", children: [
|
|
@@ -1689,10 +1695,12 @@ function parseDate(s) {
|
|
|
1689
1695
|
return new Date(y, m - 1, d);
|
|
1690
1696
|
}
|
|
1691
1697
|
var TRIGGER_VARIANT = {
|
|
1692
|
-
input: "rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-3
|
|
1698
|
+
input: "flex h-9 items-center rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-3 text-sm w-full",
|
|
1693
1699
|
toolbar: "h-[26px] rounded-button border border-border bg-card shadow-button px-2.5 text-xs font-medium",
|
|
1694
1700
|
// Mesmas medidas e cores de FilterChip.
|
|
1695
|
-
chip: "rounded-full border border-transparent bg-muted/70 px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1701
|
+
chip: "rounded-full border border-transparent bg-muted/70 px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
1702
|
+
// O tracejado é o que diz que o texto se edita. Sem ele a data lê como rótulo.
|
|
1703
|
+
inline: "text-xs font-medium text-primary underline decoration-dashed decoration-from-font underline-offset-4 hover:opacity-80"
|
|
1696
1704
|
};
|
|
1697
1705
|
function DatePicker({ value, onChange, className, variant = "input", format = "long", defaultOpen, onOpenChange }) {
|
|
1698
1706
|
const t = useTranslation();
|
|
@@ -1766,9 +1774,9 @@ function DatePicker({ value, onChange, className, variant = "input", format = "l
|
|
|
1766
1774
|
ref: triggerRef,
|
|
1767
1775
|
type: "button",
|
|
1768
1776
|
onClick: () => setOpen((p) => !p),
|
|
1769
|
-
className: `flex items-center text-left transition-colors ${variant === "chip" ? "gap-1" : "gap-2 hover:bg-muted/30"} ${TRIGGER_VARIANT[variant]}`,
|
|
1777
|
+
className: `flex items-center text-left transition-colors ${variant === "chip" ? "gap-1" : variant === "inline" ? "" : "gap-2 hover:bg-muted/30"} ${TRIGGER_VARIANT[variant]}`,
|
|
1770
1778
|
children: [
|
|
1771
|
-
/* @__PURE__ */ jsx(Calendar, { className: `shrink-0 ${variant === "input" ? "h-3.5 w-3.5 text-muted-foreground" : "h-3 w-3 opacity-70"}` }),
|
|
1779
|
+
variant !== "inline" && /* @__PURE__ */ jsx(Calendar, { className: `shrink-0 ${variant === "input" ? "h-3.5 w-3.5 text-muted-foreground" : "h-3 w-3 opacity-70"}` }),
|
|
1772
1780
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: value ? (format === "numeric" ? formatDateNumeric : variant === "input" ? formatDate : formatDateCompact)(selectedDate, locale) : t("common.selectDate") })
|
|
1773
1781
|
]
|
|
1774
1782
|
}
|
|
@@ -2226,7 +2234,7 @@ function SearchSelect({
|
|
|
2226
2234
|
"div",
|
|
2227
2235
|
{
|
|
2228
2236
|
className: cn(
|
|
2229
|
-
"mt-1 flex items-center gap-2 rounded-
|
|
2237
|
+
"mt-1 flex h-9 items-center gap-2 rounded-input border border-input bg-background transition-colors",
|
|
2230
2238
|
open ? "ring-2 ring-primary/20" : "hover:bg-muted/30",
|
|
2231
2239
|
disabled && "opacity-50 cursor-not-allowed"
|
|
2232
2240
|
),
|
|
@@ -2272,9 +2280,17 @@ function SearchSelect({
|
|
|
2272
2280
|
position: "fixed",
|
|
2273
2281
|
left: rect.left,
|
|
2274
2282
|
width: rect.width,
|
|
2283
|
+
// O DIALOGO POE `pointer-events: none` NO BODY.
|
|
2284
|
+
//
|
|
2285
|
+
// Esta lista vai pelo portal, para o `body` — fora do conteudo do
|
|
2286
|
+
// dialogo, que e o unico ramo que o Radix reabilita. Sem esta
|
|
2287
|
+
// linha ela aparece por cima e NAO RECEBE CLIQUE: a busca roda, o
|
|
2288
|
+
// resultado desenha, e escolher nao faz nada. Mesma armadilha que
|
|
2289
|
+
// o PaymentModal ja documentava ("aparece por cima porem surdo").
|
|
2290
|
+
pointerEvents: "auto",
|
|
2275
2291
|
...rect.above ? { bottom: window.innerHeight - rect.top + 4 } : { top: rect.top + 4 }
|
|
2276
2292
|
},
|
|
2277
|
-
className: "fayz-glass-surface z-[
|
|
2293
|
+
className: "fayz-glass-surface z-[110] overflow-hidden rounded-lg border bg-popover shadow-lg",
|
|
2278
2294
|
children: [
|
|
2279
2295
|
isRequiredFilter && /* @__PURE__ */ jsx("div", { className: "border-b p-2", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2280
2296
|
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
@@ -2409,7 +2425,7 @@ function CurrencyInput({
|
|
|
2409
2425
|
"div",
|
|
2410
2426
|
{
|
|
2411
2427
|
className: cn(
|
|
2412
|
-
"flex items-center rounded-
|
|
2428
|
+
"flex h-9 items-center rounded-input border border-input bg-background ring-offset-background transition-colors cursor-text",
|
|
2413
2429
|
label && "mt-1",
|
|
2414
2430
|
focused && "border-ring ring-2 ring-ring ring-offset-2",
|
|
2415
2431
|
disabled && "opacity-50 cursor-not-allowed"
|
|
@@ -2431,7 +2447,7 @@ function CurrencyInput({
|
|
|
2431
2447
|
placeholder: placeholder ?? format(0),
|
|
2432
2448
|
disabled,
|
|
2433
2449
|
readOnly: false,
|
|
2434
|
-
className: "flex-1 bg-transparent px-2
|
|
2450
|
+
className: "h-full flex-1 bg-transparent px-2 text-sm outline-none text-right tabular-nums caret-primary selection:bg-primary/20",
|
|
2435
2451
|
onChange: () => {
|
|
2436
2452
|
}
|
|
2437
2453
|
}
|
|
@@ -2526,6 +2542,126 @@ function RequiredFilter({
|
|
|
2526
2542
|
/* @__PURE__ */ jsx(PopoverContent, { align, className: cn("w-72 p-1.5", contentClassName), children: typeof children === "function" ? children(close) : children })
|
|
2527
2543
|
] });
|
|
2528
2544
|
}
|
|
2545
|
+
function FilterPanel({
|
|
2546
|
+
title,
|
|
2547
|
+
dirty,
|
|
2548
|
+
onApply,
|
|
2549
|
+
applyLabel,
|
|
2550
|
+
pendingTitle,
|
|
2551
|
+
pendingHint,
|
|
2552
|
+
onClear,
|
|
2553
|
+
clearLabel,
|
|
2554
|
+
busy,
|
|
2555
|
+
applyDisabledReason,
|
|
2556
|
+
children,
|
|
2557
|
+
advanced,
|
|
2558
|
+
advancedCount,
|
|
2559
|
+
moreLabel,
|
|
2560
|
+
lessLabel,
|
|
2561
|
+
footer,
|
|
2562
|
+
className
|
|
2563
|
+
}) {
|
|
2564
|
+
const blocked = Boolean(applyDisabledReason);
|
|
2565
|
+
const [aberto, setAberto] = React18.useState(Boolean(advancedCount));
|
|
2566
|
+
const jaAbriu = React18.useRef(Boolean(advancedCount));
|
|
2567
|
+
React18.useEffect(() => {
|
|
2568
|
+
if (advancedCount && !jaAbriu.current) {
|
|
2569
|
+
jaAbriu.current = true;
|
|
2570
|
+
setAberto(true);
|
|
2571
|
+
}
|
|
2572
|
+
}, [advancedCount]);
|
|
2573
|
+
return /* @__PURE__ */ jsxs(Card, { className: cn("p-3", className), children: [
|
|
2574
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
|
|
2575
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-muted-foreground", children: title }),
|
|
2576
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1", children: [
|
|
2577
|
+
onClear && clearLabel && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: onClear, disabled: busy, children: clearLabel }),
|
|
2578
|
+
/* @__PURE__ */ jsx(
|
|
2579
|
+
Button,
|
|
2580
|
+
{
|
|
2581
|
+
size: "icon",
|
|
2582
|
+
"aria-label": applyLabel,
|
|
2583
|
+
title: applyDisabledReason || applyLabel,
|
|
2584
|
+
onClick: onApply,
|
|
2585
|
+
disabled: busy || blocked,
|
|
2586
|
+
className: cn(
|
|
2587
|
+
"h-8 w-8 rounded-full",
|
|
2588
|
+
dirty && !blocked && "ring-2 ring-primary/30 ring-offset-1 ring-offset-card"
|
|
2589
|
+
),
|
|
2590
|
+
children: /* @__PURE__ */ jsx(Search, { className: "h-4 w-4" })
|
|
2591
|
+
}
|
|
2592
|
+
)
|
|
2593
|
+
] })
|
|
2594
|
+
] }),
|
|
2595
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children }),
|
|
2596
|
+
advanced && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2597
|
+
/* @__PURE__ */ jsxs(
|
|
2598
|
+
"button",
|
|
2599
|
+
{
|
|
2600
|
+
type: "button",
|
|
2601
|
+
onClick: () => setAberto((v) => !v),
|
|
2602
|
+
"aria-expanded": aberto,
|
|
2603
|
+
className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",
|
|
2604
|
+
children: [
|
|
2605
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn("h-3.5 w-3.5 transition-transform", aberto && "rotate-180") }),
|
|
2606
|
+
aberto ? lessLabel ?? moreLabel : moreLabel,
|
|
2607
|
+
!aberto && Boolean(advancedCount) && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-primary/10 px-1.5 text-[10px] font-semibold text-primary", children: advancedCount })
|
|
2608
|
+
]
|
|
2609
|
+
}
|
|
2610
|
+
),
|
|
2611
|
+
aberto && /* @__PURE__ */ jsx("div", { className: "mt-2 grid gap-3 border-t pt-3 sm:grid-cols-2 lg:grid-cols-4", children: advanced })
|
|
2612
|
+
] }),
|
|
2613
|
+
footer && /* @__PURE__ */ jsx("div", { className: "mt-3", children: footer }),
|
|
2614
|
+
/* @__PURE__ */ jsx(
|
|
2615
|
+
DraftCommitBar,
|
|
2616
|
+
{
|
|
2617
|
+
open: dirty,
|
|
2618
|
+
title: pendingTitle,
|
|
2619
|
+
hint: pendingHint,
|
|
2620
|
+
icon: Search,
|
|
2621
|
+
commitLabel: applyLabel,
|
|
2622
|
+
onCommit: onApply,
|
|
2623
|
+
busy,
|
|
2624
|
+
commitDisabledReason: applyDisabledReason,
|
|
2625
|
+
className: "static mt-3 shadow-sm"
|
|
2626
|
+
}
|
|
2627
|
+
)
|
|
2628
|
+
] });
|
|
2629
|
+
}
|
|
2630
|
+
FilterPanel.displayName = "FilterPanel";
|
|
2631
|
+
function FilterPanelField({ label, compact, required, className, children }) {
|
|
2632
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("min-w-0", className), children: [
|
|
2633
|
+
/* @__PURE__ */ jsxs("p", { className: cn("text-[10px] font-medium uppercase tracking-wide text-muted-foreground", !compact && "mb-1"), children: [
|
|
2634
|
+
label,
|
|
2635
|
+
required ? " *" : ""
|
|
2636
|
+
] }),
|
|
2637
|
+
children
|
|
2638
|
+
] });
|
|
2639
|
+
}
|
|
2640
|
+
FilterPanelField.displayName = "FilterPanelField";
|
|
2641
|
+
function useFilterDraft(initial) {
|
|
2642
|
+
const inicial = React18.useRef(initial);
|
|
2643
|
+
const [draft, setDraft] = React18.useState(initial);
|
|
2644
|
+
const [applied, setApplied] = React18.useState(initial);
|
|
2645
|
+
const dirty = React18.useMemo(
|
|
2646
|
+
() => JSON.stringify(draft) !== JSON.stringify(applied),
|
|
2647
|
+
[draft, applied]
|
|
2648
|
+
);
|
|
2649
|
+
const patch = React18.useCallback((changes) => {
|
|
2650
|
+
setDraft((atual) => ({ ...atual, ...changes }));
|
|
2651
|
+
}, []);
|
|
2652
|
+
const apply = React18.useCallback(() => {
|
|
2653
|
+
setDraft((atual) => {
|
|
2654
|
+
setApplied(atual);
|
|
2655
|
+
return atual;
|
|
2656
|
+
});
|
|
2657
|
+
}, []);
|
|
2658
|
+
const reset = React18.useCallback((value) => {
|
|
2659
|
+
const alvo = value ?? inicial.current;
|
|
2660
|
+
setDraft(alvo);
|
|
2661
|
+
setApplied(alvo);
|
|
2662
|
+
}, []);
|
|
2663
|
+
return { draft, applied, patch, setDraft, dirty, apply, reset };
|
|
2664
|
+
}
|
|
2529
2665
|
function formatRange(from, to, locale) {
|
|
2530
2666
|
const parse = (s) => {
|
|
2531
2667
|
const [y, m, d] = s.split("-").map(Number);
|
|
@@ -3422,7 +3558,7 @@ function SearchCombobox({
|
|
|
3422
3558
|
onKeyDown: handleKeyDown,
|
|
3423
3559
|
placeholder,
|
|
3424
3560
|
autoFocus,
|
|
3425
|
-
className: minimal ? `w-full bg-transparent pl-2 ${chevron ? "pr-7" : "pr-3"} py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none border-b border-transparent hover:border-border focus:border-foreground transition-colors` : `w-full rounded-
|
|
3561
|
+
className: minimal ? `w-full bg-transparent pl-2 ${chevron ? "pr-7" : "pr-3"} py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none border-b border-transparent hover:border-border focus:border-foreground transition-colors` : `h-9 w-full rounded-input border border-input bg-background pl-8 ${chevron ? "pr-8" : "pr-3"} text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring`,
|
|
3426
3562
|
role: "combobox",
|
|
3427
3563
|
"aria-expanded": hasDropdown,
|
|
3428
3564
|
"aria-autocomplete": "list",
|
|
@@ -4131,6 +4267,61 @@ function StockEntryForm({
|
|
|
4131
4267
|
] })
|
|
4132
4268
|
] }) });
|
|
4133
4269
|
}
|
|
4270
|
+
function EmBreve({ label, o_que, quantas }) {
|
|
4271
|
+
return /* @__PURE__ */ jsxs(
|
|
4272
|
+
"button",
|
|
4273
|
+
{
|
|
4274
|
+
type: "button",
|
|
4275
|
+
disabled: true,
|
|
4276
|
+
title: `${o_que}${quantas ? ` \u2014 ${quantas}` : ""}`,
|
|
4277
|
+
className: "inline-flex cursor-not-allowed items-center gap-1.5 rounded-md border border-dashed border-input px-2.5 py-1 text-[11px] text-muted-foreground opacity-80",
|
|
4278
|
+
children: [
|
|
4279
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3", "aria-hidden": true }),
|
|
4280
|
+
label,
|
|
4281
|
+
/* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[10px]", children: "Em breve" })
|
|
4282
|
+
]
|
|
4283
|
+
}
|
|
4284
|
+
);
|
|
4285
|
+
}
|
|
4286
|
+
function ComingSoon({
|
|
4287
|
+
title,
|
|
4288
|
+
summary,
|
|
4289
|
+
v1Path,
|
|
4290
|
+
missing,
|
|
4291
|
+
v1AlsoMissing,
|
|
4292
|
+
measured,
|
|
4293
|
+
onBack,
|
|
4294
|
+
backTo
|
|
4295
|
+
}) {
|
|
4296
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
4297
|
+
onBack && /* @__PURE__ */ jsx(SubpageHeader, { title, onBack, parentLabel: backTo ?? "Voltar" }),
|
|
4298
|
+
/* @__PURE__ */ jsx(Card, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
4299
|
+
/* @__PURE__ */ jsx("span", { className: "mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsx(Clock, { className: "h-4 w-4 text-muted-foreground", "aria-hidden": true }) }),
|
|
4300
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
4301
|
+
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold", children: title }),
|
|
4302
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: summary }),
|
|
4303
|
+
v1Path && /* @__PURE__ */ jsxs("p", { className: "mt-3 text-xs text-muted-foreground", children: [
|
|
4304
|
+
"No sistema antigo: ",
|
|
4305
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: v1Path })
|
|
4306
|
+
] }),
|
|
4307
|
+
measured && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: measured }),
|
|
4308
|
+
v1AlsoMissing && // Honestidade que economiza uma reunião: ninguém vai procurar no V1
|
|
4309
|
+
// o que o V1 nunca teve.
|
|
4310
|
+
/* @__PURE__ */ jsx("div", { className: "mt-3 rounded-md border border-warning bg-warning-soft px-3 py-2", children: /* @__PURE__ */ jsxs("p", { className: "text-xs text-warning-soft-foreground", children: [
|
|
4311
|
+
/* @__PURE__ */ jsx("strong", { children: "O sistema antigo tamb\xE9m n\xE3o faz isto." }),
|
|
4312
|
+
" A tela existe l\xE1 e anuncia \xABem desenvolvimento\xBB. N\xE3o h\xE1 nada para trazer \u2014 \xE9 funcionalidade nova, n\xE3o porte."
|
|
4313
|
+
] }) }),
|
|
4314
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
|
|
4315
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Em breve \u2014 o que falta" }),
|
|
4316
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-2 space-y-1.5", children: missing.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2 text-sm", children: [
|
|
4317
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "mt-1 h-3 w-3 shrink-0 text-muted-foreground", "aria-hidden": true }),
|
|
4318
|
+
/* @__PURE__ */ jsx("span", { children: item })
|
|
4319
|
+
] }, item)) })
|
|
4320
|
+
] })
|
|
4321
|
+
] })
|
|
4322
|
+
] }) })
|
|
4323
|
+
] });
|
|
4324
|
+
}
|
|
4134
4325
|
|
|
4135
4326
|
// src/primitives/person-name.ts
|
|
4136
4327
|
var PARTICLES = /* @__PURE__ */ new Set([
|
|
@@ -4165,7 +4356,7 @@ function abbreviatePersonName(full) {
|
|
|
4165
4356
|
function comparePersonNames(a, b) {
|
|
4166
4357
|
return a.localeCompare(b, void 0, { sensitivity: "base" });
|
|
4167
4358
|
}
|
|
4168
|
-
var FILTER_RAIL_WIDTH =
|
|
4359
|
+
var FILTER_RAIL_WIDTH = COLUMN_WIDTH;
|
|
4169
4360
|
function FilterRail({
|
|
4170
4361
|
actions,
|
|
4171
4362
|
before,
|
|
@@ -4206,13 +4397,18 @@ function FilterRail({
|
|
|
4206
4397
|
] });
|
|
4207
4398
|
}
|
|
4208
4399
|
function FilterRailColumn({ children, collapsed = false }) {
|
|
4209
|
-
return
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
}
|
|
4400
|
+
return (
|
|
4401
|
+
// ENTREGUE À SHELL, como a coluna de um módulo: ali ela encosta no topo do
|
|
4402
|
+
// quadro e a régua do cabeçalho se emenda nela pela mesma curva. Desenhada
|
|
4403
|
+
// dentro da página, começava depois do respiro do módulo — e a costura, que
|
|
4404
|
+
// só existe quando a coluna encosta na faixa, não acontecia: a régua passava
|
|
4405
|
+
// reta por cima dela e a quina ficava quadrada, diferente de todo o resto.
|
|
4406
|
+
/* @__PURE__ */ jsx(PageRail, { children: /* @__PURE__ */ jsx(CollapsibleColumn, { storageKey: "fayz.filterrail", squeezed: collapsed, children: ({ collapsed: tight }) => (
|
|
4407
|
+
// Na tira, 224px de filtros dobrando linhas dentro de 64 é ruído
|
|
4408
|
+
// animado: o conteúdo espera o ponteiro (ou o botão) em vez de
|
|
4409
|
+
// espremer.
|
|
4410
|
+
tight ? null : /* @__PURE__ */ jsx("div", { className: "py-1", children })
|
|
4411
|
+
) }) })
|
|
4216
4412
|
);
|
|
4217
4413
|
}
|
|
4218
4414
|
function RailWorkspace({
|
|
@@ -4271,6 +4467,6 @@ function AdaptiveFilter({
|
|
|
4271
4467
|
);
|
|
4272
4468
|
}
|
|
4273
4469
|
|
|
4274
|
-
export { AdaptiveFilter, Badge, Breadcrumb, BulkActionBar, ChevronPager, CurrencyInput, DatePicker, DateRangeChip, DictateButton, DotBadge, DraftCommitBar, FILTER_RAIL_WIDTH, FilterCheckBox, FilterCheckList, FilterCheckRow, FilterChip, FilterRail, FilterRailColumn, FilterSection, INLINE_FILTER_MAX, Input, ListFilterBar, ListView, Markdown, MarkdownEditor, MiniCalendar, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFlow, ModalFlowEntry, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTask, ModalTaskHeader, ModalTaskHost, ModalTitle, ModalTrigger, MultiSelect, NestedPane, PageActionBar, PersonAvatar, PersonMultiPicker, PersonPicker, PhoneField, PhoneLink, PickerDialog, PickerList, RailWorkspace, RefreshButton, RequiredFilter, RowActions, SearchCombobox, SearchField, SearchSelect, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, StatTiles, StockEntryForm, Tabs, TabsContent, TabsList, TabsTrigger, Thumbnail, TimePicker, ToastProvider, WHATSAPP_BRAND_COLOR, WhatsAppIcon, WizardSteps, abbreviatePersonName, badgeVariants, comparePersonNames, formatPhone2 as formatPhone, normalizePhone, personInitials, renderMarkdown, setActionsMenuLabel, setRowActionsLabel, toLocalISODate, useInModalTaskHost, useRowSelection };
|
|
4275
|
-
//# sourceMappingURL=chunk-
|
|
4276
|
-
//# sourceMappingURL=chunk-
|
|
4470
|
+
export { AdaptiveFilter, Badge, Breadcrumb, BulkActionBar, ChevronPager, ComingSoon, CurrencyInput, DatePicker, DateRangeChip, DictateButton, DotBadge, DraftCommitBar, EmBreve, FILTER_RAIL_WIDTH, FilterCheckBox, FilterCheckList, FilterCheckRow, FilterChip, FilterPanel, FilterPanelField, FilterRail, FilterRailColumn, FilterSection, INLINE_FILTER_MAX, Input, ListFilterBar, ListView, Markdown, MarkdownEditor, MiniCalendar, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFlow, ModalFlowEntry, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTask, ModalTaskHeader, ModalTaskHost, ModalTitle, ModalTrigger, MultiSelect, NestedPane, PageActionBar, PersonAvatar, PersonMultiPicker, PersonPicker, PhoneField, PhoneLink, PickerDialog, PickerList, RailWorkspace, RefreshButton, RequiredFilter, RowActions, SearchCombobox, SearchField, SearchSelect, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, StatTiles, StockEntryForm, Tabs, TabsContent, TabsList, TabsTrigger, Thumbnail, TimePicker, ToastProvider, WHATSAPP_BRAND_COLOR, WhatsAppIcon, WizardSteps, abbreviatePersonName, badgeVariants, comparePersonNames, formatPhone2 as formatPhone, normalizePhone, personInitials, renderMarkdown, setActionsMenuLabel, setRowActionsLabel, toLocalISODate, useFilterDraft, useInModalTaskHost, useRowSelection };
|
|
4471
|
+
//# sourceMappingURL=chunk-6GWXDVCO.js.map
|
|
4472
|
+
//# sourceMappingURL=chunk-6GWXDVCO.js.map
|