@fayz-ai/ui 0.33.1 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6GWXDVCO.js → chunk-7W6WRDDF.js} +54 -102
- package/dist/chunk-7W6WRDDF.js.map +1 -0
- package/dist/{chunk-Q2B5RPH5.js → chunk-N7JP63VB.js} +5 -5
- package/dist/{chunk-Q2B5RPH5.js.map → chunk-N7JP63VB.js.map} +1 -1
- package/dist/{chunk-UNEEY5XG.js → chunk-UCNY76FQ.js} +3 -3
- package/dist/{chunk-UNEEY5XG.js.map → chunk-UCNY76FQ.js.map} +1 -1
- package/dist/{chunk-33A7SN2N.js → chunk-XR3WXB6N.js} +363 -235
- package/dist/chunk-XR3WXB6N.js.map +1 -0
- package/dist/{chunk-ATDIWKBD.js → chunk-ZTS5S6BZ.js} +4 -3
- package/dist/chunk-ZTS5S6BZ.js.map +1 -0
- package/dist/dashboard/index.js +4 -4
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -1
- 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/SaveBar.d.ts.map +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/layout/rail-flyout.d.ts.map +1 -1
- package/dist/primitives/ai-action-button.d.ts +13 -0
- package/dist/primitives/ai-action-button.d.ts.map +1 -0
- package/dist/primitives/date-picker.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +3 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +4 -4
- package/dist/primitives/inline-link.d.ts +29 -0
- package/dist/primitives/inline-link.d.ts.map +1 -0
- package/dist/primitives/modal.d.ts +2 -0
- package/dist/primitives/modal.d.ts.map +1 -1
- package/dist/primitives/page-actions.d.ts.map +1 -1
- package/dist/primitives/person-picker.d.ts +1 -1
- package/dist/primitives/person-picker.d.ts.map +1 -1
- package/dist/primitives/search-select.d.ts +4 -1
- package/dist/primitives/search-select.d.ts.map +1 -1
- package/dist/styles.css +26 -0
- package/package.json +2 -2
- package/dist/chunk-33A7SN2N.js.map +0 -1
- package/dist/chunk-6GWXDVCO.js.map +0 -1
- package/dist/chunk-ATDIWKBD.js.map +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { useIsWide, Dropdown, DropdownTrigger, DropdownContent, DropdownSeparator, DropdownItem, Card, FilterMenuRow, FilterMenu, DataTable, Popover, PopoverTrigger, PopoverContent, Checkbox } from './chunk-
|
|
2
|
-
import { COLUMN_WIDTH, useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions, SubpageHeader, PageRail, CollapsibleColumn } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { useIsWide, Dropdown, DropdownTrigger, DropdownContent, DropdownSeparator, DropdownItem, Card, FilterMenuRow, FilterMenu, DataTable, Popover, PopoverTrigger, PopoverContent, Checkbox } from './chunk-UCNY76FQ.js';
|
|
2
|
+
import { COLUMN_WIDTH, useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalDescription, ModalFooter, SubpageHeader, PageRail, CollapsibleColumn } from './chunk-XR3WXB6N.js';
|
|
3
|
+
import { Button, cn } from './chunk-OKZ6WQB3.js';
|
|
4
4
|
import * as React18 from 'react';
|
|
5
5
|
import React18__default, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
6
|
+
import { Loader2, Sparkles, ChevronDown, ChevronUp, Check, ArrowLeft, MoreHorizontal, Search, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ImageIcon, RefreshCw, Clock, X, Plus, Download, Calendar, Pencil, CalendarDays, MicOff, Mic, ArrowRight, MoreVertical } from 'lucide-react';
|
|
6
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
import { cva } from 'class-variance-authority';
|
|
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, ArrowRight } from 'lucide-react';
|
|
10
9
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
10
|
import { Toaster } from 'sonner';
|
|
12
11
|
export { toast } from 'sonner';
|
|
@@ -15,6 +14,42 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
15
14
|
import { createPortal } from 'react-dom';
|
|
16
15
|
import { useTranslation, getCountry, unmaskPhone, maskPhone, getCurrentLocale } from '@fayz-ai/core';
|
|
17
16
|
|
|
17
|
+
var TONE = {
|
|
18
|
+
solid: "bg-magic text-magic-foreground border border-magic shadow-button-primary hover:bg-magic/90 active:shadow-button-inset",
|
|
19
|
+
soft: "border border-magic/30 bg-magic-soft text-magic-soft-foreground shadow-button hover:bg-magic/10 active:shadow-button-inset"
|
|
20
|
+
};
|
|
21
|
+
var AiActionButton = React18.forwardRef(
|
|
22
|
+
({ busy, busyLabel, tone = "solid", className, children, disabled, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
23
|
+
Button,
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
variant: "ghost",
|
|
27
|
+
disabled: disabled || busy,
|
|
28
|
+
className: cn(TONE[tone], className),
|
|
29
|
+
...props,
|
|
30
|
+
children: [
|
|
31
|
+
busy ? /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 shrink-0 animate-spin", "aria-hidden": true }) : /* @__PURE__ */ jsx(Sparkles, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": true }),
|
|
32
|
+
busy ? busyLabel ?? children : children
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
AiActionButton.displayName = "AiActionButton";
|
|
38
|
+
var INLINE_LINK_TONE = {
|
|
39
|
+
solid: "underline underline-offset-2 decoration-from-font",
|
|
40
|
+
dashed: "underline decoration-dashed decoration-from-font underline-offset-4"
|
|
41
|
+
};
|
|
42
|
+
var TONE2 = INLINE_LINK_TONE;
|
|
43
|
+
var BASE = "inline items-baseline text-left font-[inherit] text-primary hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50";
|
|
44
|
+
function InlineLink({ tone = "solid", className, children, ...rest }) {
|
|
45
|
+
const classes = cn(BASE, TONE2[tone], className);
|
|
46
|
+
if ("href" in rest && rest.href !== void 0) {
|
|
47
|
+
const { href, ...anchor } = rest;
|
|
48
|
+
return /* @__PURE__ */ jsx("a", { href, className: classes, ...anchor, children });
|
|
49
|
+
}
|
|
50
|
+
const button = rest;
|
|
51
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: classes, ...button, children });
|
|
52
|
+
}
|
|
18
53
|
var Input = React18.forwardRef(
|
|
19
54
|
({ className, type, error, description, id, ...props }, ref) => {
|
|
20
55
|
const inputId = id ?? React18.useId();
|
|
@@ -92,96 +127,6 @@ function Badge({ className, variant, dot, children, ...props }) {
|
|
|
92
127
|
children
|
|
93
128
|
] });
|
|
94
129
|
}
|
|
95
|
-
var SIZE_MAP = {
|
|
96
|
-
sm: "sm:max-w-sm",
|
|
97
|
-
md: "sm:max-w-md",
|
|
98
|
-
lg: "sm:max-w-lg",
|
|
99
|
-
xl: "sm:max-w-xl",
|
|
100
|
-
"2xl": "sm:max-w-2xl",
|
|
101
|
-
"3xl": "sm:max-w-3xl",
|
|
102
|
-
// Duas colunas de trabalho lado a lado (ficha + linha do tempo) não cabem em
|
|
103
|
-
// 3xl: a coluna da direita fica com 20rem e o texto de cada anotação quebra
|
|
104
|
-
// a cada quatro palavras.
|
|
105
|
-
"4xl": "sm:max-w-4xl",
|
|
106
|
-
"5xl": "sm:max-w-5xl",
|
|
107
|
-
full: "sm:max-w-[calc(100vw-4rem)]"
|
|
108
|
-
};
|
|
109
|
-
var Modal = DialogPrimitive.Root;
|
|
110
|
-
var ModalTrigger = DialogPrimitive.Trigger;
|
|
111
|
-
var ModalClose = DialogPrimitive.Close;
|
|
112
|
-
var ModalPortal = DialogPrimitive.Portal;
|
|
113
|
-
var ModalOverlay = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
114
|
-
DialogPrimitive.Overlay,
|
|
115
|
-
{
|
|
116
|
-
ref,
|
|
117
|
-
className: cn(
|
|
118
|
-
"fayz-modal-overlay saas-mdl-ov fixed inset-0 z-[100]",
|
|
119
|
-
"flex items-center justify-center p-0 sm:p-6",
|
|
120
|
-
className
|
|
121
|
-
),
|
|
122
|
-
...props
|
|
123
|
-
}
|
|
124
|
-
));
|
|
125
|
-
ModalOverlay.displayName = "ModalOverlay";
|
|
126
|
-
var ModalContent = React18.forwardRef(({ className, children, size = "lg", hideClose, noPadding, onPointerDownOutside, onInteractOutside, onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ jsx(ModalPortal, { children: /* @__PURE__ */ jsx(ModalOverlay, { children: /* @__PURE__ */ jsxs(
|
|
127
|
-
DialogPrimitive.Content,
|
|
128
|
-
{
|
|
129
|
-
ref,
|
|
130
|
-
onCloseAutoFocus: (e) => {
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
onCloseAutoFocus?.(e);
|
|
133
|
-
},
|
|
134
|
-
onPointerDownOutside: (e) => {
|
|
135
|
-
const target = e.target;
|
|
136
|
-
if (target.closest("[data-modal-passthrough]") || target.closest("[data-radix-popper-content-wrapper]")) {
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
}
|
|
139
|
-
onPointerDownOutside?.(e);
|
|
140
|
-
},
|
|
141
|
-
onInteractOutside: (e) => {
|
|
142
|
-
const target = e.target;
|
|
143
|
-
if (target.closest("[data-modal-passthrough]") || target.closest("[data-radix-popper-content-wrapper]")) {
|
|
144
|
-
e.preventDefault();
|
|
145
|
-
}
|
|
146
|
-
onInteractOutside?.(e);
|
|
147
|
-
},
|
|
148
|
-
className: cn(
|
|
149
|
-
// fz-container: a form inside a dialog measures the DIALOG. Without
|
|
150
|
-
// it a two-column field grid in an `sm` modal read the window's width
|
|
151
|
-
// and kept both columns in 380px.
|
|
152
|
-
"fayz-glass-surface fayz-modal-content saas-mdl-ct fz-container relative z-[100] flex flex-col w-full outline-none",
|
|
153
|
-
// Mobile fullscreen
|
|
154
|
-
"h-full rounded-none border-0",
|
|
155
|
-
// Desktop centered card
|
|
156
|
-
"sm:h-auto sm:max-h-[85vh] sm:rounded-2xl sm:border",
|
|
157
|
-
SIZE_MAP[size],
|
|
158
|
-
noPadding ? "" : "p-6 gap-4",
|
|
159
|
-
className
|
|
160
|
-
),
|
|
161
|
-
...props,
|
|
162
|
-
children: [
|
|
163
|
-
children,
|
|
164
|
-
!hideClose && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 z-10 flex h-7 w-7 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring", children: [
|
|
165
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
166
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
167
|
-
] })
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
) }) }));
|
|
171
|
-
ModalContent.displayName = "ModalContent";
|
|
172
|
-
function ModalHeader({ className, ...props }) {
|
|
173
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left shrink-0", className), ...props });
|
|
174
|
-
}
|
|
175
|
-
function ModalBody({ className, ...props }) {
|
|
176
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-1 flex-col overflow-y-auto min-h-0", className), ...props });
|
|
177
|
-
}
|
|
178
|
-
function ModalFooter({ className, ...props }) {
|
|
179
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col-reverse gap-2 pb-[env(safe-area-inset-bottom)] sm:mt-0 sm:flex-row sm:justify-end sm:gap-0 sm:space-x-2 sm:pb-0 shrink-0", className), ...props });
|
|
180
|
-
}
|
|
181
|
-
var ModalTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props }));
|
|
182
|
-
ModalTitle.displayName = "ModalTitle";
|
|
183
|
-
var ModalDescription = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
184
|
-
ModalDescription.displayName = "ModalDescription";
|
|
185
130
|
var Select = SelectPrimitive.Root;
|
|
186
131
|
var SelectGroup = SelectPrimitive.Group;
|
|
187
132
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -480,7 +425,10 @@ function PageActionBar({ actions, className }) {
|
|
|
480
425
|
if (visible.length === 0) return null;
|
|
481
426
|
if (!wide) {
|
|
482
427
|
const usable = visible.filter((a) => !a.desktopOnly);
|
|
483
|
-
|
|
428
|
+
if (usable.length === 0) return null;
|
|
429
|
+
const fab = /* @__PURE__ */ jsx(PageActionFab, { actions: usable });
|
|
430
|
+
const fabHost = typeof document !== "undefined" ? document.querySelector(".shell-enter") ?? document.body : null;
|
|
431
|
+
return fabHost ? createPortal(fab, fabHost) : fab;
|
|
484
432
|
}
|
|
485
433
|
let seenPrimary = false;
|
|
486
434
|
const primary = [];
|
|
@@ -1700,7 +1648,9 @@ var TRIGGER_VARIANT = {
|
|
|
1700
1648
|
// Mesmas medidas e cores de FilterChip.
|
|
1701
1649
|
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
1650
|
// O tracejado é o que diz que o texto se edita. Sem ele a data lê como rótulo.
|
|
1703
|
-
|
|
1651
|
+
// A tinta vem do InlineLink: o mesmo traço estava escrito aqui, no gatilho de
|
|
1652
|
+
// forma de pagamento e na barra de ferramentas, com três grafias.
|
|
1653
|
+
inline: `text-xs font-medium text-primary hover:opacity-80 ${INLINE_LINK_TONE.dashed}`
|
|
1704
1654
|
};
|
|
1705
1655
|
function DatePicker({ value, onChange, className, variant = "input", format = "long", defaultOpen, onOpenChange }) {
|
|
1706
1656
|
const t = useTranslation();
|
|
@@ -2048,6 +1998,7 @@ function SearchSelect({
|
|
|
2048
1998
|
loadOnOpen = true,
|
|
2049
1999
|
variant = "field",
|
|
2050
2000
|
icon: FilterIcon,
|
|
2001
|
+
leading,
|
|
2051
2002
|
emptyValue = "____",
|
|
2052
2003
|
className,
|
|
2053
2004
|
disabled,
|
|
@@ -2239,7 +2190,7 @@ function SearchSelect({
|
|
|
2239
2190
|
disabled && "opacity-50 cursor-not-allowed"
|
|
2240
2191
|
),
|
|
2241
2192
|
children: [
|
|
2242
|
-
/* @__PURE__ */ jsx(Search, { className: "h-3.5 w-3.5 text-muted-foreground ml-3 shrink-0" }),
|
|
2193
|
+
leading && hasValue && !open ? /* @__PURE__ */ jsx("span", { className: "ml-2.5 flex shrink-0 items-center", children: leading }) : /* @__PURE__ */ jsx(Search, { className: "h-3.5 w-3.5 text-muted-foreground ml-3 shrink-0" }),
|
|
2243
2194
|
open ? /* @__PURE__ */ jsx(
|
|
2244
2195
|
"input",
|
|
2245
2196
|
{
|
|
@@ -2917,7 +2868,8 @@ function MultiSelect({
|
|
|
2917
2868
|
var AVATAR_SIZE = {
|
|
2918
2869
|
xs: "h-5 w-5 text-[9px]",
|
|
2919
2870
|
sm: "h-6 w-6 text-[10px]",
|
|
2920
|
-
md: "h-8 w-8 text-xs"
|
|
2871
|
+
md: "h-8 w-8 text-xs",
|
|
2872
|
+
lg: "h-10 w-10 text-sm"
|
|
2921
2873
|
};
|
|
2922
2874
|
function personInitials(name) {
|
|
2923
2875
|
const parts = name.trim().split(/\s+/).map((w) => w.replace(/[^\p{L}\p{N}]/gu, "")).filter(Boolean);
|
|
@@ -4467,6 +4419,6 @@ function AdaptiveFilter({
|
|
|
4467
4419
|
);
|
|
4468
4420
|
}
|
|
4469
4421
|
|
|
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,
|
|
4471
|
-
//# sourceMappingURL=chunk-
|
|
4472
|
-
//# sourceMappingURL=chunk-
|
|
4422
|
+
export { AdaptiveFilter, AiActionButton, 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, INLINE_LINK_TONE, InlineLink, Input, ListFilterBar, ListView, Markdown, MarkdownEditor, MiniCalendar, ModalFlow, ModalFlowEntry, ModalTask, ModalTaskHeader, ModalTaskHost, 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 };
|
|
4423
|
+
//# sourceMappingURL=chunk-7W6WRDDF.js.map
|
|
4424
|
+
//# sourceMappingURL=chunk-7W6WRDDF.js.map
|