@fayz-ai/ui 0.35.0 → 0.36.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.
Files changed (48) hide show
  1. package/dist/{chunk-63BB2CNP.js → chunk-7SEWMFO3.js} +101 -16
  2. package/dist/chunk-7SEWMFO3.js.map +1 -0
  3. package/dist/{chunk-CUCIVYCV.js → chunk-BJNV7RJQ.js} +4 -4
  4. package/dist/{chunk-CUCIVYCV.js.map → chunk-BJNV7RJQ.js.map} +1 -1
  5. package/dist/chunk-FKYFYGAS.js +143 -0
  6. package/dist/chunk-FKYFYGAS.js.map +1 -0
  7. package/dist/{chunk-OBWOHU5E.js → chunk-IA3QZZSC.js} +173 -134
  8. package/dist/chunk-IA3QZZSC.js.map +1 -0
  9. package/dist/{chunk-OB2ULDBD.js → chunk-IN2DFMJV.js} +4 -4
  10. package/dist/{chunk-OB2ULDBD.js.map → chunk-IN2DFMJV.js.map} +1 -1
  11. package/dist/{chunk-XQTGXHT6.js → chunk-N6LNCYOT.js} +3 -3
  12. package/dist/{chunk-XQTGXHT6.js.map → chunk-N6LNCYOT.js.map} +1 -1
  13. package/dist/{chunk-2CRN3BOD.js → chunk-P4764AWQ.js} +6 -6
  14. package/dist/{chunk-2CRN3BOD.js.map → chunk-P4764AWQ.js.map} +1 -1
  15. package/dist/{chunk-FNGCA3XR.js → chunk-URDLBXAS.js} +4 -4
  16. package/dist/{chunk-FNGCA3XR.js.map → chunk-URDLBXAS.js.map} +1 -1
  17. package/dist/{chunk-GLRLWBBF.js → chunk-ZJ7C2P64.js} +17 -102
  18. package/dist/chunk-ZJ7C2P64.js.map +1 -0
  19. package/dist/{chunk-ATDIWKBD.js → chunk-ZTS5S6BZ.js} +4 -3
  20. package/dist/chunk-ZTS5S6BZ.js.map +1 -0
  21. package/dist/dashboard/index.js +5 -5
  22. package/dist/icons.js +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +16 -16
  26. package/dist/layout/AppShell.d.ts.map +1 -1
  27. package/dist/layout/ModulePage.d.ts.map +1 -1
  28. package/dist/layout/SaveBar.d.ts.map +1 -1
  29. package/dist/layout/index.js +5 -5
  30. package/dist/layout/rail-flyout.d.ts.map +1 -1
  31. package/dist/primitives/ai-action-button.d.ts +13 -0
  32. package/dist/primitives/ai-action-button.d.ts.map +1 -0
  33. package/dist/primitives/date-picker.d.ts.map +1 -1
  34. package/dist/primitives/index.d.ts +2 -0
  35. package/dist/primitives/index.d.ts.map +1 -1
  36. package/dist/primitives/index.js +7 -7
  37. package/dist/primitives/inline-link.d.ts +29 -0
  38. package/dist/primitives/inline-link.d.ts.map +1 -0
  39. package/dist/primitives/search-select.d.ts +4 -1
  40. package/dist/primitives/search-select.d.ts.map +1 -1
  41. package/dist/wizard/index.js +3 -3
  42. package/package.json +2 -2
  43. package/dist/chunk-63BB2CNP.js.map +0 -1
  44. package/dist/chunk-ATDIWKBD.js.map +0 -1
  45. package/dist/chunk-GLRLWBBF.js.map +0 -1
  46. package/dist/chunk-OBWOHU5E.js.map +0 -1
  47. package/dist/chunk-OKZ6WQB3.js +0 -57
  48. package/dist/chunk-OKZ6WQB3.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-FNGCA3XR.js';
2
- import { COLUMN_WIDTH, useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalDescription, ModalFooter, SubpageHeader, PageRail, CollapsibleColumn } from './chunk-63BB2CNP.js';
3
- import { cn, Button } from './chunk-OKZ6WQB3.js';
4
- import * as React17 from 'react';
5
- import React17__default, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
1
+ import { useIsWide, Dropdown, DropdownTrigger, DropdownContent, DropdownSeparator, DropdownItem, Card, FilterMenuRow, FilterMenu, DataTable, Popover, PopoverTrigger, PopoverContent, Checkbox } from './chunk-URDLBXAS.js';
2
+ import { COLUMN_WIDTH, useSaveBarVisible, useCrossModuleBack, useBackHandler, Hint, PageHeaderActions, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalDescription, ModalFooter, SubpageHeader, PageRail, CollapsibleColumn } from './chunk-7SEWMFO3.js';
3
+ import { Button, cn } from './chunk-FKYFYGAS.js';
4
+ import * as React18 from 'react';
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
9
  import * as SelectPrimitive from '@radix-ui/react-select';
9
- import { ChevronDown, ChevronUp, Check, ArrowLeft, MoreHorizontal, Search, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ImageIcon, RefreshCw, Clock, X, Plus, Download, Calendar, Loader2, Pencil, CalendarDays, MicOff, Mic, ArrowRight, MoreVertical } from 'lucide-react';
10
10
  import { Toaster } from 'sonner';
11
11
  export { toast } from 'sonner';
12
12
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -14,9 +14,45 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
14
14
  import { createPortal } from 'react-dom';
15
15
  import { useTranslation, getCountry, unmaskPhone, maskPhone, getCurrentLocale } from '@fayz-ai/core';
16
16
 
17
- var Input = React17.forwardRef(
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
+ }
53
+ var Input = React18.forwardRef(
18
54
  ({ className, type, error, description, id, ...props }, ref) => {
19
- const inputId = id ?? React17.useId();
55
+ const inputId = id ?? React18.useId();
20
56
  const descriptionId = description ? `${inputId}-description` : void 0;
21
57
  const errorId = error ? `${inputId}-error` : void 0;
22
58
  return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
@@ -94,7 +130,7 @@ function Badge({ className, variant, dot, children, ...props }) {
94
130
  var Select = SelectPrimitive.Root;
95
131
  var SelectGroup = SelectPrimitive.Group;
96
132
  var SelectValue = SelectPrimitive.Value;
97
- var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
133
+ var SelectTrigger = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
98
134
  SelectPrimitive.Trigger,
99
135
  {
100
136
  ref,
@@ -110,7 +146,7 @@ var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref)
110
146
  }
111
147
  ));
112
148
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
113
- var SelectScrollUpButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
149
+ var SelectScrollUpButton = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
114
150
  SelectPrimitive.ScrollUpButton,
115
151
  {
116
152
  ref,
@@ -123,7 +159,7 @@ var SelectScrollUpButton = React17.forwardRef(({ className, ...props }, ref) =>
123
159
  }
124
160
  ));
125
161
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
126
- var SelectScrollDownButton = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
162
+ var SelectScrollDownButton = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
127
163
  SelectPrimitive.ScrollDownButton,
128
164
  {
129
165
  ref,
@@ -136,7 +172,7 @@ var SelectScrollDownButton = React17.forwardRef(({ className, ...props }, ref) =
136
172
  }
137
173
  ));
138
174
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
139
- var SelectContent = React17.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
175
+ var SelectContent = React18.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
140
176
  SelectPrimitive.Content,
141
177
  {
142
178
  ref,
@@ -164,7 +200,7 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
164
200
  }
165
201
  ) }));
166
202
  SelectContent.displayName = SelectPrimitive.Content.displayName;
167
- var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
203
+ var SelectLabel = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
168
204
  SelectPrimitive.Label,
169
205
  {
170
206
  ref,
@@ -176,7 +212,7 @@ var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
176
212
  }
177
213
  ));
178
214
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
179
- var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
215
+ var SelectItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
180
216
  SelectPrimitive.Item,
181
217
  {
182
218
  ref,
@@ -192,7 +228,7 @@ var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) =>
192
228
  }
193
229
  ));
194
230
  SelectItem.displayName = SelectPrimitive.Item.displayName;
195
- var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
231
+ var SelectSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
196
232
  SelectPrimitive.Separator,
197
233
  {
198
234
  ref,
@@ -230,7 +266,7 @@ function ToastProvider({
230
266
  );
231
267
  }
232
268
  var Tabs = TabsPrimitive.Root;
233
- var TabsList = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
269
+ var TabsList = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
234
270
  TabsPrimitive.List,
235
271
  {
236
272
  ref,
@@ -244,7 +280,7 @@ var TabsList = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__
244
280
  }
245
281
  ));
246
282
  TabsList.displayName = TabsPrimitive.List.displayName;
247
- var TabsTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
283
+ var TabsTrigger = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
248
284
  TabsPrimitive.Trigger,
249
285
  {
250
286
  ref,
@@ -256,7 +292,7 @@ var TabsTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
256
292
  }
257
293
  ));
258
294
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
259
- var TabsContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
295
+ var TabsContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
260
296
  TabsPrimitive.Content,
261
297
  {
262
298
  ref,
@@ -268,7 +304,7 @@ var TabsContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
268
304
  }
269
305
  ));
270
306
  TabsContent.displayName = TabsPrimitive.Content.displayName;
271
- var Separator2 = React17.forwardRef(
307
+ var Separator2 = React18.forwardRef(
272
308
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
273
309
  SeparatorPrimitive.Root,
274
310
  {
@@ -319,7 +355,7 @@ function formatPhone(digits, fallback, countryCode) {
319
355
  const tail = rest.length === 9 ? rest.slice(5) : rest.slice(4);
320
356
  return `+55 (${ddd}) ${head}-${tail}`;
321
357
  }
322
- var PhoneLink = React17.forwardRef(
358
+ var PhoneLink = React18.forwardRef(
323
359
  ({ phone, message, countryCode, raw, className, children, ...props }, ref) => {
324
360
  const { e164, display } = normalizePhone(phone, countryCode);
325
361
  const label = children ?? (raw ? phone ?? "" : display);
@@ -507,9 +543,9 @@ function PageActionFab({ actions }) {
507
543
  ] });
508
544
  }
509
545
  function useScrim(open) {
510
- const [mounted, setMounted] = React17.useState(open);
511
- const [visible, setVisible] = React17.useState(open);
512
- React17.useEffect(() => {
546
+ const [mounted, setMounted] = React18.useState(open);
547
+ const [visible, setVisible] = React18.useState(open);
548
+ React18.useEffect(() => {
513
549
  if (open) {
514
550
  setMounted(true);
515
551
  const frame = requestAnimationFrame(() => setVisible(true));
@@ -523,7 +559,7 @@ function useScrim(open) {
523
559
  }
524
560
  var SCRIM_MS = 200;
525
561
  function FabButton({ actions, tone, mini }) {
526
- const [open, setOpen] = React17.useState(false);
562
+ const [open, setOpen] = React18.useState(false);
527
563
  const scrim = useScrim(open);
528
564
  if (actions.length === 0) return null;
529
565
  const isCreate = tone === "primary";
@@ -636,7 +672,7 @@ function RowActions({
636
672
  const Icon2 = a.icon;
637
673
  const isDanger = a.intent === "danger";
638
674
  const prevSafe = i > 0 && overflow[i - 1].intent !== "danger";
639
- return /* @__PURE__ */ jsxs(React17.Fragment, { children: [
675
+ return /* @__PURE__ */ jsxs(React18.Fragment, { children: [
640
676
  isDanger && prevSafe && /* @__PURE__ */ jsx(DropdownSeparator, {}),
641
677
  /* @__PURE__ */ jsxs(
642
678
  DropdownItem,
@@ -887,8 +923,8 @@ var ICON_CLASSES = {
887
923
  lg: "h-5 w-5"
888
924
  };
889
925
  function Thumbnail({ src, alt = "", size = "md", icon: Icon2 = ImageIcon, className }) {
890
- const [failed, setFailed] = React17.useState(false);
891
- React17.useEffect(() => {
926
+ const [failed, setFailed] = React18.useState(false);
927
+ React18.useEffect(() => {
892
928
  setFailed(false);
893
929
  }, [src]);
894
930
  const base = cn("shrink-0 overflow-hidden", SIZE_CLASSES[size], className);
@@ -915,9 +951,9 @@ function Thumbnail({ src, alt = "", size = "md", icon: Icon2 = ImageIcon, classN
915
951
  }
916
952
  Thumbnail.displayName = "Thumbnail";
917
953
  function RefreshButton({ onRefresh, fromCache, label, labelCached, className, ...rest }) {
918
- const [phase, setPhase] = React17.useState("idle");
919
- const alive = React17.useRef(true);
920
- React17.useEffect(() => () => {
954
+ const [phase, setPhase] = React18.useState("idle");
955
+ const alive = React18.useRef(true);
956
+ React18.useEffect(() => () => {
921
957
  alive.current = false;
922
958
  }, []);
923
959
  const title = fromCache ? labelCached ?? label : label;
@@ -1139,27 +1175,27 @@ function useRowSelection({
1139
1175
  getRowId,
1140
1176
  enabled = true
1141
1177
  }) {
1142
- const identify = React17.useCallback(
1178
+ const identify = React18.useCallback(
1143
1179
  (row) => getRowId ? getRowId(row) : String(row?.id ?? ""),
1144
1180
  [getRowId]
1145
1181
  );
1146
- const visible = React17.useMemo(() => rows ?? [], [rows]);
1147
- const [rawSelection, setRawSelection] = React17.useState([]);
1148
- const visibleIds = React17.useMemo(() => new Set(visible.map(identify)), [visible, identify]);
1149
- const selectedIds = React17.useMemo(
1182
+ const visible = React18.useMemo(() => rows ?? [], [rows]);
1183
+ const [rawSelection, setRawSelection] = React18.useState([]);
1184
+ const visibleIds = React18.useMemo(() => new Set(visible.map(identify)), [visible, identify]);
1185
+ const selectedIds = React18.useMemo(
1150
1186
  () => rawSelection.filter((id) => visibleIds.has(id)),
1151
1187
  [rawSelection, visibleIds]
1152
1188
  );
1153
- const selectedRows = React17.useMemo(() => {
1189
+ const selectedRows = React18.useMemo(() => {
1154
1190
  const picked = new Set(selectedIds);
1155
1191
  return visible.filter((row) => picked.has(identify(row)));
1156
1192
  }, [visible, selectedIds, identify]);
1157
- const clear = React17.useCallback(() => setRawSelection([]), []);
1158
- const selectAll = React17.useCallback(
1193
+ const clear = React18.useCallback(() => setRawSelection([]), []);
1194
+ const selectAll = React18.useCallback(
1159
1195
  () => setRawSelection(visible.map(identify)),
1160
1196
  [visible, identify]
1161
1197
  );
1162
- const barActions = React17.useMemo(
1198
+ const barActions = React18.useMemo(
1163
1199
  () => (actions ?? []).map((action) => ({
1164
1200
  id: action.id,
1165
1201
  label: action.label,
@@ -1231,10 +1267,10 @@ function ListFilterBar({
1231
1267
  className
1232
1268
  }) {
1233
1269
  const wide = useIsWide();
1234
- const usable = React17.useMemo(() => (filters ?? []).filter((f) => f.options.length > 0), [filters]);
1270
+ const usable = React18.useMemo(() => (filters ?? []).filter((f) => f.options.length > 0), [filters]);
1235
1271
  const active = usable.filter((f) => f.value != null && f.value !== "");
1236
1272
  const total = activeCount ?? active.length;
1237
- const fields = React17.useMemo(() => [
1273
+ const fields = React18.useMemo(() => [
1238
1274
  ...usable.map((f) => ({
1239
1275
  id: f.id,
1240
1276
  label: f.label,
@@ -1388,7 +1424,7 @@ function ListView({
1388
1424
  const showSearch = !!onSearchChange;
1389
1425
  const showTags = tags && tags.length > 0 && onTagChange;
1390
1426
  const selection = useRowSelection({ rows: loading ? [] : data, actions: bulkActions, getRowId });
1391
- const allFilters = React17.useMemo(() => [
1427
+ const allFilters = React18.useMemo(() => [
1392
1428
  ...showTags ? [{
1393
1429
  id: "__tag",
1394
1430
  label: tagsLabel ?? allTagLabel,
@@ -1612,7 +1648,9 @@ var TRIGGER_VARIANT = {
1612
1648
  // Mesmas medidas e cores de FilterChip.
1613
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",
1614
1650
  // O tracejado é o que diz que o texto se edita. Sem ele a data lê como rótulo.
1615
- inline: "text-xs font-medium text-primary underline decoration-dashed decoration-from-font underline-offset-4 hover:opacity-80"
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}`
1616
1654
  };
1617
1655
  function DatePicker({ value, onChange, className, variant = "input", format = "long", defaultOpen, onOpenChange }) {
1618
1656
  const t = useTranslation();
@@ -1779,7 +1817,7 @@ function toLocalISODate(d) {
1779
1817
  }
1780
1818
  function MiniCalendar({ selectedDate, onDateSelect, onMonthChange, markers }) {
1781
1819
  const locale = getCurrentLocale();
1782
- const [viewMonth, setViewMonth] = React17__default.useState(() => new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1));
1820
+ const [viewMonth, setViewMonth] = React18__default.useState(() => new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1));
1783
1821
  const monthLabel = viewMonth.toLocaleDateString(toDateLocale2(locale), { month: "long", year: "numeric" });
1784
1822
  const dayLabels = DAY_LABELS2[locale] ?? DAY_LABELS2.en;
1785
1823
  const weeks = useMemo(() => {
@@ -1859,7 +1897,7 @@ function FilterSection({
1859
1897
  count,
1860
1898
  children
1861
1899
  }) {
1862
- const [open, setOpen] = React17__default.useState(defaultOpen);
1900
+ const [open, setOpen] = React18__default.useState(defaultOpen);
1863
1901
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1864
1902
  /* @__PURE__ */ jsxs(
1865
1903
  "button",
@@ -1935,7 +1973,7 @@ function FilterCheckList({
1935
1973
  }
1936
1974
  return /* @__PURE__ */ jsx("div", { className: className ? `${className} space-y-0.5` : "space-y-0.5", children: rows });
1937
1975
  }
1938
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React17.useLayoutEffect : React17.useEffect;
1976
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React18.useLayoutEffect : React18.useEffect;
1939
1977
  function SearchSelect({
1940
1978
  value,
1941
1979
  displayValue,
@@ -1960,6 +1998,7 @@ function SearchSelect({
1960
1998
  loadOnOpen = true,
1961
1999
  variant = "field",
1962
2000
  icon: FilterIcon,
2001
+ leading,
1963
2002
  emptyValue = "____",
1964
2003
  className,
1965
2004
  disabled,
@@ -1967,19 +2006,19 @@ function SearchSelect({
1967
2006
  }) {
1968
2007
  const isRequiredFilter = variant === "required-filter";
1969
2008
  const canCreate = !!onCreate && allowCreate !== false;
1970
- const [open, setOpen] = React17.useState(false);
1971
- const [query, setQuery] = React17.useState("");
1972
- const [results, setResults] = React17.useState([]);
1973
- const [loading, setLoading] = React17.useState(false);
1974
- const [creating, setCreating] = React17.useState(false);
1975
- const [selectedLabel, setSelectedLabel] = React17.useState(displayValue ?? "");
1976
- const containerRef = React17.useRef(null);
1977
- const inputRef = React17.useRef(null);
1978
- const timerRef = React17.useRef();
1979
- const [rect, setRect] = React17.useState(null);
1980
- const dropdownRef = React17.useRef(null);
1981
- const requestRef = React17.useRef(0);
1982
- React17.useEffect(() => {
2009
+ const [open, setOpen] = React18.useState(false);
2010
+ const [query, setQuery] = React18.useState("");
2011
+ const [results, setResults] = React18.useState([]);
2012
+ const [loading, setLoading] = React18.useState(false);
2013
+ const [creating, setCreating] = React18.useState(false);
2014
+ const [selectedLabel, setSelectedLabel] = React18.useState(displayValue ?? "");
2015
+ const containerRef = React18.useRef(null);
2016
+ const inputRef = React18.useRef(null);
2017
+ const timerRef = React18.useRef();
2018
+ const [rect, setRect] = React18.useState(null);
2019
+ const dropdownRef = React18.useRef(null);
2020
+ const requestRef = React18.useRef(0);
2021
+ React18.useEffect(() => {
1983
2022
  function handler(e) {
1984
2023
  const target = e.target;
1985
2024
  if (containerRef.current?.contains(target)) return;
@@ -1989,10 +2028,10 @@ function SearchSelect({
1989
2028
  document.addEventListener("mousedown", handler);
1990
2029
  return () => document.removeEventListener("mousedown", handler);
1991
2030
  }, []);
1992
- React17.useEffect(() => {
2031
+ React18.useEffect(() => {
1993
2032
  if (displayValue !== void 0) setSelectedLabel(displayValue);
1994
2033
  }, [displayValue]);
1995
- React17.useEffect(() => {
2034
+ React18.useEffect(() => {
1996
2035
  if (open && loadOnOpen && query.length === 0 && results.length === 0 && !loading) {
1997
2036
  const request = ++requestRef.current;
1998
2037
  setLoading(true);
@@ -2060,7 +2099,7 @@ function SearchSelect({
2060
2099
  setResults([]);
2061
2100
  setTimeout(() => inputRef.current?.focus(), 0);
2062
2101
  }
2063
- const groups = React17.useMemo(() => {
2102
+ const groups = React18.useMemo(() => {
2064
2103
  const map = /* @__PURE__ */ new Map();
2065
2104
  for (const opt of results) {
2066
2105
  const group = opt.group ?? "";
@@ -2151,7 +2190,7 @@ function SearchSelect({
2151
2190
  disabled && "opacity-50 cursor-not-allowed"
2152
2191
  ),
2153
2192
  children: [
2154
- /* @__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" }),
2155
2194
  open ? /* @__PURE__ */ jsx(
2156
2195
  "input",
2157
2196
  {
@@ -2254,7 +2293,7 @@ function SearchSelect({
2254
2293
  ]
2255
2294
  },
2256
2295
  group
2257
- )) }) }) : /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-auto py-1", children: [...groups.entries()].map(([group, options]) => /* @__PURE__ */ jsxs(React17.Fragment, { children: [
2296
+ )) }) }) : /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-auto py-1", children: [...groups.entries()].map(([group, options]) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
2258
2297
  group && /* @__PURE__ */ jsx("div", { className: "sticky top-0 bg-muted/50 px-3 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: group }),
2259
2298
  options.map(optionButton)
2260
2299
  ] }, group)) }),
@@ -2297,9 +2336,9 @@ function CurrencyInput({
2297
2336
  className,
2298
2337
  disabled
2299
2338
  }) {
2300
- const inputRef = React17.useRef(null);
2301
- const [focused, setFocused] = React17.useState(false);
2302
- const format = React17.useCallback((v) => {
2339
+ const inputRef = React18.useRef(null);
2340
+ const [focused, setFocused] = React18.useState(false);
2341
+ const format = React18.useCallback((v) => {
2303
2342
  return new Intl.NumberFormat(locale, {
2304
2343
  minimumFractionDigits: 2,
2305
2344
  maximumFractionDigits: 2
@@ -2426,9 +2465,9 @@ function RequiredFilter({
2426
2465
  className,
2427
2466
  contentClassName
2428
2467
  }) {
2429
- const [open, setOpen] = React17.useState(false);
2468
+ const [open, setOpen] = React18.useState(false);
2430
2469
  const missing = !value;
2431
- const close = React17.useCallback(() => setOpen(false), []);
2470
+ const close = React18.useCallback(() => setOpen(false), []);
2432
2471
  return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
2433
2472
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
2434
2473
  "button",
@@ -2474,9 +2513,9 @@ function FilterPanel({
2474
2513
  className
2475
2514
  }) {
2476
2515
  const blocked = Boolean(applyDisabledReason);
2477
- const [aberto, setAberto] = React17.useState(Boolean(advancedCount));
2478
- const jaAbriu = React17.useRef(Boolean(advancedCount));
2479
- React17.useEffect(() => {
2516
+ const [aberto, setAberto] = React18.useState(Boolean(advancedCount));
2517
+ const jaAbriu = React18.useRef(Boolean(advancedCount));
2518
+ React18.useEffect(() => {
2480
2519
  if (advancedCount && !jaAbriu.current) {
2481
2520
  jaAbriu.current = true;
2482
2521
  setAberto(true);
@@ -2551,23 +2590,23 @@ function FilterPanelField({ label, compact, required, className, children }) {
2551
2590
  }
2552
2591
  FilterPanelField.displayName = "FilterPanelField";
2553
2592
  function useFilterDraft(initial) {
2554
- const inicial = React17.useRef(initial);
2555
- const [draft, setDraft] = React17.useState(initial);
2556
- const [applied, setApplied] = React17.useState(initial);
2557
- const dirty = React17.useMemo(
2593
+ const inicial = React18.useRef(initial);
2594
+ const [draft, setDraft] = React18.useState(initial);
2595
+ const [applied, setApplied] = React18.useState(initial);
2596
+ const dirty = React18.useMemo(
2558
2597
  () => JSON.stringify(draft) !== JSON.stringify(applied),
2559
2598
  [draft, applied]
2560
2599
  );
2561
- const patch = React17.useCallback((changes) => {
2600
+ const patch = React18.useCallback((changes) => {
2562
2601
  setDraft((atual) => ({ ...atual, ...changes }));
2563
2602
  }, []);
2564
- const apply = React17.useCallback(() => {
2603
+ const apply = React18.useCallback(() => {
2565
2604
  setDraft((atual) => {
2566
2605
  setApplied(atual);
2567
2606
  return atual;
2568
2607
  });
2569
2608
  }, []);
2570
- const reset = React17.useCallback((value) => {
2609
+ const reset = React18.useCallback((value) => {
2571
2610
  const alvo = value ?? inicial.current;
2572
2611
  setDraft(alvo);
2573
2612
  setApplied(alvo);
@@ -2603,7 +2642,7 @@ function DateRangeChip({
2603
2642
  label,
2604
2643
  className
2605
2644
  }) {
2606
- const [open, setOpen] = React17.useState(false);
2645
+ const [open, setOpen] = React18.useState(false);
2607
2646
  const active = !!(from || to);
2608
2647
  const locale = typeof navigator !== "undefined" ? navigator.language : "en";
2609
2648
  const presetLabel = presets.find((p) => p.value === preset)?.label;
@@ -2708,9 +2747,9 @@ function MultiSelect({
2708
2747
  variant = "field",
2709
2748
  icon: Icon2
2710
2749
  }) {
2711
- const [query, setQuery] = React17.useState("");
2712
- const selected = React17.useMemo(() => new Set(value), [value]);
2713
- const filtered = React17.useMemo(() => {
2750
+ const [query, setQuery] = React18.useState("");
2751
+ const selected = React18.useMemo(() => new Set(value), [value]);
2752
+ const filtered = React18.useMemo(() => {
2714
2753
  const q = query.trim().toLowerCase();
2715
2754
  if (!q) return options;
2716
2755
  return options.filter((o) => o.label.toLowerCase().includes(q));
@@ -2848,8 +2887,8 @@ function hueFor(name) {
2848
2887
  return AVATAR_HUES[h % AVATAR_HUES.length];
2849
2888
  }
2850
2889
  function PersonAvatar({ name, src, size = "sm", className }) {
2851
- const [failed, setFailed] = React17.useState(false);
2852
- React17.useEffect(() => {
2890
+ const [failed, setFailed] = React18.useState(false);
2891
+ React18.useEffect(() => {
2853
2892
  setFailed(false);
2854
2893
  }, [src]);
2855
2894
  const base = cn("shrink-0 overflow-hidden rounded-full", AVATAR_SIZE[size], className);
@@ -2889,7 +2928,7 @@ function ListShell({
2889
2928
  footer,
2890
2929
  children
2891
2930
  }) {
2892
- const filtered = React17.useMemo(() => {
2931
+ const filtered = React18.useMemo(() => {
2893
2932
  const q = query.trim().toLowerCase();
2894
2933
  if (!q) return options;
2895
2934
  return options.filter((o) => o.name.toLowerCase().includes(q));
@@ -2912,7 +2951,7 @@ function ListShell({
2912
2951
  )
2913
2952
  ] }),
2914
2953
  /* @__PURE__ */ jsxs("div", { className: "max-h-72 overflow-y-auto py-1", children: [
2915
- filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-3 py-5 text-center text-xs text-muted-foreground", children: emptyLabel }) : filtered.map((o) => /* @__PURE__ */ jsx(React17.Fragment, { children: children(o) }, o.id)),
2954
+ filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-3 py-5 text-center text-xs text-muted-foreground", children: emptyLabel }) : filtered.map((o) => /* @__PURE__ */ jsx(React18.Fragment, { children: children(o) }, o.id)),
2916
2955
  footer
2917
2956
  ] })
2918
2957
  ] });
@@ -2947,8 +2986,8 @@ function PersonPicker({
2947
2986
  onClear,
2948
2987
  variant = "input"
2949
2988
  }) {
2950
- const [query, setQuery] = React17.useState("");
2951
- const [open, setOpen] = React17.useState(false);
2989
+ const [query, setQuery] = React18.useState("");
2990
+ const [open, setOpen] = React18.useState(false);
2952
2991
  const current = options.find((o) => o.id === value);
2953
2992
  return /* @__PURE__ */ jsxs(Dropdown, { open, onOpenChange: setOpen, children: [
2954
2993
  /* @__PURE__ */ jsx(DropdownTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs("button", { type: "button", disabled, className: cn(TRIGGER_CLASSES[variant], className), children: [
@@ -3026,8 +3065,8 @@ function PersonMultiPicker({
3026
3065
  max,
3027
3066
  variant = "input"
3028
3067
  }) {
3029
- const [query, setQuery] = React17.useState("");
3030
- const selected = React17.useMemo(() => new Set(value), [value]);
3068
+ const [query, setQuery] = React18.useState("");
3069
+ const selected = React18.useMemo(() => new Set(value), [value]);
3031
3070
  const atCeiling = max != null && value.length >= max;
3032
3071
  function toggle(id) {
3033
3072
  if (selected.has(id)) onChange(value.filter((x) => x !== id));
@@ -3126,17 +3165,17 @@ function DictateButton({
3126
3165
  className,
3127
3166
  disabled
3128
3167
  }) {
3129
- const [ouvindo, setOuvindo] = React17.useState(false);
3130
- const [erro, setErro] = React17.useState(null);
3131
- const ref = React17.useRef(null);
3132
- const [suportado, setSuportado] = React17.useState(false);
3133
- React17.useEffect(() => {
3168
+ const [ouvindo, setOuvindo] = React18.useState(false);
3169
+ const [erro, setErro] = React18.useState(null);
3170
+ const ref = React18.useRef(null);
3171
+ const [suportado, setSuportado] = React18.useState(false);
3172
+ React18.useEffect(() => {
3134
3173
  setSuportado(recognitionCtor() !== null);
3135
3174
  }, []);
3136
- React17.useEffect(() => () => {
3175
+ React18.useEffect(() => () => {
3137
3176
  ref.current?.stop();
3138
3177
  }, []);
3139
- const alternar = React17.useCallback(() => {
3178
+ const alternar = React18.useCallback(() => {
3140
3179
  if (ouvindo) {
3141
3180
  ref.current?.stop();
3142
3181
  return;
@@ -3199,7 +3238,7 @@ function renderInline(text, keyPrefix) {
3199
3238
  if (part.startsWith("`") && part.endsWith("`") && part.length > 2) {
3200
3239
  return /* @__PURE__ */ jsx("code", { className: "rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]", children: part.slice(1, -1) }, key);
3201
3240
  }
3202
- return part === "" ? null : /* @__PURE__ */ jsx(React17.Fragment, { children: part }, key);
3241
+ return part === "" ? null : /* @__PURE__ */ jsx(React18.Fragment, { children: part }, key);
3203
3242
  });
3204
3243
  }
3205
3244
  function parseBlocks(source) {
@@ -3283,7 +3322,7 @@ function renderMarkdown(source) {
3283
3322
  case "ol":
3284
3323
  return /* @__PURE__ */ jsx("ol", { className: "list-decimal space-y-1 pl-5", children: block.items.map((item, li) => /* @__PURE__ */ jsx("li", { children: renderInline(item, `${key}-${li}`) }, `${key}-${li}`)) }, key);
3285
3324
  case "p":
3286
- return /* @__PURE__ */ jsx("p", { children: block.lines.map((l, li) => /* @__PURE__ */ jsxs(React17.Fragment, { children: [
3325
+ return /* @__PURE__ */ jsx("p", { children: block.lines.map((l, li) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
3287
3326
  li > 0 && /* @__PURE__ */ jsx("br", {}),
3288
3327
  renderInline(l, `${key}-${li}`)
3289
3328
  ] }, `${key}-${li}`)) }, key);
@@ -3304,7 +3343,7 @@ function MarkdownEditor({
3304
3343
  renderPreview,
3305
3344
  className
3306
3345
  }) {
3307
- const [mode, setMode] = React17.useState(
3346
+ const [mode, setMode] = React18.useState(
3308
3347
  defaultMode === "preview" && value.trim() === "" ? "edit" : defaultMode
3309
3348
  );
3310
3349
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
@@ -3589,29 +3628,29 @@ function PickerList({
3589
3628
  listClassName,
3590
3629
  autoFocus = true
3591
3630
  }) {
3592
- const [query, setQuery] = React17.useState("");
3631
+ const [query, setQuery] = React18.useState("");
3593
3632
  const term = normalize(query.trim());
3594
- const sections = React17.useMemo(
3633
+ const sections = React18.useMemo(
3595
3634
  () => groups ?? [{ id: "_", options: options ?? [] }],
3596
3635
  [groups, options]
3597
3636
  );
3598
- const total = React17.useMemo(
3637
+ const total = React18.useMemo(
3599
3638
  () => sections.reduce((n, g) => n + g.options.length, 0),
3600
3639
  [sections]
3601
3640
  );
3602
- const visible = React17.useMemo(() => {
3641
+ const visible = React18.useMemo(() => {
3603
3642
  if (!term) return sections;
3604
3643
  const hits = sections.flatMap((g) => g.options.filter((o) => optionMatches(o, term)));
3605
3644
  return [{ id: "_results", options: hits }];
3606
3645
  }, [sections, term]);
3607
- const flat = React17.useMemo(() => visible.flatMap((g) => g.options), [visible]);
3608
- const [active, setActive] = React17.useState(0);
3609
- const listRef = React17.useRef(null);
3610
- React17.useEffect(() => {
3646
+ const flat = React18.useMemo(() => visible.flatMap((g) => g.options), [visible]);
3647
+ const [active, setActive] = React18.useState(0);
3648
+ const listRef = React18.useRef(null);
3649
+ React18.useEffect(() => {
3611
3650
  const i = flat.findIndex((o) => o.id === value);
3612
3651
  setActive(i >= 0 ? i : 0);
3613
3652
  }, [term]);
3614
- React17.useEffect(() => {
3653
+ React18.useEffect(() => {
3615
3654
  listRef.current?.querySelector(`[data-picker-index="${active}"]`)?.scrollIntoView({ block: "nearest" });
3616
3655
  }, [active]);
3617
3656
  function step(delta) {
@@ -3673,7 +3712,7 @@ function PickerList({
3673
3712
  className: cn("min-h-0 flex-1 overflow-y-auto py-1", listClassName),
3674
3713
  children: [
3675
3714
  flat.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }),
3676
- visible.map((group) => /* @__PURE__ */ jsxs(React17.Fragment, { children: [
3715
+ visible.map((group) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
3677
3716
  group.label && group.options.length > 0 && /* @__PURE__ */ jsx("p", { className: "px-3 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: group.label }),
3678
3717
  group.options.map((o) => {
3679
3718
  index += 1;
@@ -3894,7 +3933,7 @@ function NestedPane({ title, hint, onBack, children, className }) {
3894
3933
  children
3895
3934
  ] });
3896
3935
  }
3897
- var ModalTaskContext = React17.createContext(null);
3936
+ var ModalTaskContext = React18.createContext(null);
3898
3937
  function ModalTaskHeader({ title, hint, stack, onClose }) {
3899
3938
  const popTo = (index) => {
3900
3939
  for (let i = stack.length - 1; i > index; i--) stack[i].onBack();
@@ -3927,7 +3966,7 @@ function ModalTaskHeader({ title, hint, stack, onClose }) {
3927
3966
  children: title
3928
3967
  }
3929
3968
  ),
3930
- stack.map((c, i) => /* @__PURE__ */ jsxs(React17.Fragment, { children: [
3969
+ stack.map((c, i) => /* @__PURE__ */ jsxs(React18.Fragment, { children: [
3931
3970
  /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground/50", "aria-hidden": true }),
3932
3971
  i < stack.length - 1 ? /* @__PURE__ */ jsx(
3933
3972
  "button",
@@ -3953,10 +3992,10 @@ function ModalTaskHeader({ title, hint, stack, onClose }) {
3953
3992
  ] });
3954
3993
  }
3955
3994
  function ModalTaskHost({ children, className, header }) {
3956
- const [stack, setStack] = React17.useState([]);
3957
- const [slot, setSlot] = React17.useState(null);
3958
- const idRef = React17.useRef(0);
3959
- const api = React17.useMemo(() => ({
3995
+ const [stack, setStack] = React18.useState([]);
3996
+ const [slot, setSlot] = React18.useState(null);
3997
+ const idRef = React18.useRef(0);
3998
+ const api = React18.useMemo(() => ({
3960
3999
  open: (meta) => {
3961
4000
  const id = ++idRef.current;
3962
4001
  setStack((s) => [...s, { id, meta }]);
@@ -3965,7 +4004,7 @@ function ModalTaskHost({ children, className, header }) {
3965
4004
  close: (id) => setStack((s) => s.filter((e) => e.id !== id))
3966
4005
  }), []);
3967
4006
  const top = stack.length ? stack[stack.length - 1] : null;
3968
- const value = React17.useMemo(
4007
+ const value = React18.useMemo(
3969
4008
  () => ({ ...api, topId: top?.id ?? null, slot }),
3970
4009
  [api, top?.id, slot]
3971
4010
  );
@@ -3976,14 +4015,14 @@ function ModalTaskHost({ children, className, header }) {
3976
4015
  ] });
3977
4016
  }
3978
4017
  function useInModalTaskHost() {
3979
- return React17.useContext(ModalTaskContext) !== null;
4018
+ return React18.useContext(ModalTaskContext) !== null;
3980
4019
  }
3981
4020
  function ModalTask({ open, title, hint, onClose, width, children }) {
3982
- const host = React17.useContext(ModalTaskContext);
3983
- const onCloseRef = React17.useRef(onClose);
4021
+ const host = React18.useContext(ModalTaskContext);
4022
+ const onCloseRef = React18.useRef(onClose);
3984
4023
  onCloseRef.current = onClose;
3985
- const [myId, setMyId] = React17.useState(null);
3986
- React17.useEffect(() => {
4024
+ const [myId, setMyId] = React18.useState(null);
4025
+ React18.useEffect(() => {
3987
4026
  if (!host || !open) return;
3988
4027
  const id = host.open({ title, hint, onBack: () => onCloseRef.current() });
3989
4028
  setMyId(id);
@@ -4049,13 +4088,13 @@ function StockEntryForm({
4049
4088
  labels: overrides
4050
4089
  }) {
4051
4090
  const labels = { ...DEFAULT_LABELS, ...overrides };
4052
- const [quantity, setQuantity] = React17.useState("");
4053
- const [reasonCode, setReasonCode] = React17.useState("");
4054
- const [occurredOn, setOccurredOn] = React17.useState(todayISO());
4055
- const [note, setNote] = React17.useState("");
4056
- const [noteOpen, setNoteOpen] = React17.useState(false);
4057
- const quantityRef = React17.useRef(null);
4058
- React17.useEffect(() => {
4091
+ const [quantity, setQuantity] = React18.useState("");
4092
+ const [reasonCode, setReasonCode] = React18.useState("");
4093
+ const [occurredOn, setOccurredOn] = React18.useState(todayISO());
4094
+ const [note, setNote] = React18.useState("");
4095
+ const [noteOpen, setNoteOpen] = React18.useState(false);
4096
+ const quantityRef = React18.useRef(null);
4097
+ React18.useEffect(() => {
4059
4098
  if (verb === null) return;
4060
4099
  setQuantity("");
4061
4100
  setReasonCode("");
@@ -4294,7 +4333,7 @@ function FilterRail({
4294
4333
  )
4295
4334
  ] }),
4296
4335
  before,
4297
- visible.map((section, index) => /* @__PURE__ */ jsxs(React17__default.Fragment, { children: [
4336
+ visible.map((section, index) => /* @__PURE__ */ jsxs(React18__default.Fragment, { children: [
4298
4337
  (index > 0 || !!before || !!actions || !!search) && /* @__PURE__ */ jsx("div", { className: "my-4 h-px bg-border" }),
4299
4338
  /* @__PURE__ */ jsx(
4300
4339
  FilterSection,
@@ -4380,6 +4419,6 @@ function AdaptiveFilter({
4380
4419
  );
4381
4420
  }
4382
4421
 
4383
- 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, 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 };
4384
- //# sourceMappingURL=chunk-OBWOHU5E.js.map
4385
- //# sourceMappingURL=chunk-OBWOHU5E.js.map
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-IA3QZZSC.js.map
4424
+ //# sourceMappingURL=chunk-IA3QZZSC.js.map