@rinzai/zen 0.10.2 → 0.11.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 (42) hide show
  1. package/README.md +3 -3
  2. package/dist/avatar/index.d.ts +1 -1
  3. package/dist/avatar/index.d.ts.map +1 -1
  4. package/dist/avatar/index.js +23 -21
  5. package/dist/canvas/geometry.d.ts +51 -0
  6. package/dist/canvas/geometry.d.ts.map +1 -0
  7. package/dist/canvas/geometry.js +91 -0
  8. package/dist/canvas/index.d.ts +59 -0
  9. package/dist/canvas/index.d.ts.map +1 -0
  10. package/dist/canvas/index.js +303 -0
  11. package/dist/code-block/index.d.ts.map +1 -1
  12. package/dist/code-block/index.js +24 -31
  13. package/dist/color-picker/index.d.ts +36 -0
  14. package/dist/color-picker/index.d.ts.map +1 -0
  15. package/dist/color-picker/index.js +210 -0
  16. package/dist/combobox/index.js +46 -46
  17. package/dist/date-picker/index.js +5 -5
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/input/index.js +4 -4
  21. package/dist/input-group/index.js +8 -8
  22. package/dist/lib.js +84 -80
  23. package/dist/money-input/index.js +8 -8
  24. package/dist/month-picker/index.js +11 -11
  25. package/dist/repeat-picker/index.js +8 -8
  26. package/dist/select/index.js +16 -16
  27. package/dist/sortable/index.d.ts.map +1 -1
  28. package/dist/sortable/index.js +1 -1
  29. package/dist/tag-input/index.js +4 -4
  30. package/dist/textarea/index.js +4 -4
  31. package/dist/utils/color.d.ts +35 -0
  32. package/dist/utils/color.d.ts.map +1 -0
  33. package/dist/utils/color.js +66 -0
  34. package/dist/utils/theme-wave.d.ts.map +1 -1
  35. package/dist/utils/theme-wave.js +70 -69
  36. package/dist/utils/theme.d.ts.map +1 -1
  37. package/dist/utils/theme.js +56 -59
  38. package/dist/utils/useCopyToClipboard.d.ts +13 -0
  39. package/dist/utils/useCopyToClipboard.d.ts.map +1 -0
  40. package/dist/utils/useCopyToClipboard.js +26 -0
  41. package/dist/zen.css +1 -1
  42. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
- import { FIELD_WITHIN as t } from "../utils/styles.js";
4
- import { useFieldProps as n } from "../field/index.js";
3
+ import { useFieldProps as t } from "../field/index.js";
4
+ import { FIELD_WITHIN as n } from "../utils/styles.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  //#region packages/input-group/index.tsx
7
- function i({ invalid: n, className: i, onMouseDown: a, ...o }) {
7
+ function i({ invalid: t, className: i, onMouseDown: a, ...o }) {
8
8
  return /* @__PURE__ */ r("div", {
9
- "data-invalid": n || void 0,
10
- className: e("zen__input-group cursor-text", t, "has-disabled:bg-muted has-disabled:text-muted-foreground has-disabled:cursor-not-allowed", "data-invalid:border-destructive data-invalid:focus-within:border-destructive data-invalid:focus-within:shadow-[0_0_0_3px_oklch(var(--destructive)/0.16)]", i),
9
+ "data-invalid": t || void 0,
10
+ className: e("zen__input-group cursor-text", n, "has-disabled:bg-muted has-disabled:text-muted-foreground has-disabled:cursor-not-allowed", "data-invalid:border-destructive data-invalid:focus-within:border-destructive data-invalid:focus-within:shadow-[0_0_0_3px_oklch(var(--destructive)/0.16)]", i),
11
11
  onMouseDown: (e) => {
12
12
  a?.(e);
13
13
  let t = e.target;
@@ -18,10 +18,10 @@ function i({ invalid: n, className: i, onMouseDown: a, ...o }) {
18
18
  ...o
19
19
  });
20
20
  }
21
- function a({ className: t, ...i }) {
22
- let a = n(i);
21
+ function a({ className: n, ...i }) {
22
+ let a = t(i);
23
23
  return /* @__PURE__ */ r("input", {
24
- className: e("h-full w-full min-w-0 flex-1 bg-transparent text-sm outline-hidden placeholder:text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))] disabled:cursor-not-allowed", t),
24
+ className: e("h-full w-full min-w-0 flex-1 bg-transparent text-sm outline-hidden placeholder:text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))] disabled:cursor-not-allowed", n),
25
25
  ...i,
26
26
  ...a
27
27
  });
package/dist/lib.js CHANGED
@@ -15,83 +15,87 @@ import D, { StatusPillAction as O } from "./status-pill/index.js";
15
15
  import k from "./spinner/index.js";
16
16
  import A, { buttonVariants as j } from "./button/index.js";
17
17
  import M, { CardDescription as N, CardHeader as P, CardTitle as F, Stat as I, StatRow as L } from "./card/index.js";
18
- import R from "./code-block/index.js";
19
- import z from "./chip/index.js";
20
- import B, { PopoverClose as V, PopoverContent as H, PopoverTrigger as U } from "./popover/index.js";
21
- import W from "./collapse/index.js";
22
- import G from "./alert/index.js";
23
- import K, { FormMessage as q, useField as J, useFieldProps as Y } from "./field/index.js";
24
- import X, { InputGroupAddon as Z, InputGroupInput as Q } from "./input-group/index.js";
25
- import { FieldChevron as $ } from "./utils/field-chevron.js";
26
- import { useVirtualList as ee } from "./utils/useVirtualList.js";
27
- import te, { ComboboxCreate as ne, ComboboxEmpty as re, ComboboxItem as ie, ComboboxList as ae, ComboboxPopup as oe, ComboboxSearch as se, ComboboxTrigger as ce } from "./combobox/index.js";
28
- import le, { useToast as ue, useToastHost as de } from "./toast/index.js";
29
- import fe, { DialogClose as pe, DialogFooter as me, useModal as he } from "./dialog/index.js";
30
- import ge from "./confirm-dialog/index.js";
31
- import _e from "./editable-cell/index.js";
32
- import ve, { DisclosureContent as ye, DisclosureTrigger as be } from "./disclosure/index.js";
33
- import xe from "./header/index.js";
34
- import Se from "./inset/index.js";
35
- import Ce from "./input/index.js";
36
- import we from "./meter/index.js";
37
- import { addMonths as Te, currentMonth as Ee, formatMonth as De, fromMonthIndex as Oe, isMonth as ke, monthIndex as Ae, monthNames as je, monthRange as Me, monthsBetween as Ne } from "./utils/month.js";
38
- import Pe from "./month-picker/index.js";
39
- import Fe from "./checkbox/index.js";
40
- import { paletteColor as Ie } from "./chart/palette.js";
41
- import { ChartTooltipCard as Le } from "./chart/tooltip.js";
42
- import Re from "./chart/allocation.js";
43
- import ze from "./chart/donut.js";
44
- import Be, { ChartArea as Ve, ChartBar as He, ChartLine as Ue, ChartReference as We, niceTicks as Ge } from "./chart/index.js";
45
- import Ke, { Radio as qe } from "./radio-group/index.js";
46
- import { addDays as Je, addMonthsToDate as Ye, commonRanges as Xe, dayIndex as Ze, dayOfWeek as Qe, daysBetween as $e, daysInMonth as et, formatDate as tt, formatDateRange as nt, fromDayIndex as rt, isDate as it, today as at, weekStart as ot, weekdayNames as st } from "./utils/date.js";
47
- import ct from "./calendar/index.js";
48
- import lt, { DateRangePicker as ut } from "./date-picker/index.js";
49
- import { RateUnavailableError as dt, convertMinor as ft, isRateTable as pt, rateBetween as mt } from "./utils/fx.js";
50
- import ht, { MoneyConversionHint as gt, MoneyCurrencyMenu as _t, useMoneyInput as vt } from "./money-input/index.js";
51
- import yt, { RadioCard as bt } from "./radio-cards/index.js";
52
- import xt, { Pill as St, PillIndicator as Ct } from "./pills/index.js";
53
- import wt from "./page-header/index.js";
54
- import Tt from "./progress-ring/index.js";
55
- import Et, { SegmentedItem as Dt } from "./segmented/index.js";
56
- import Ot, { SelectGroup as kt, SelectItem as At, SelectSeparator as jt } from "./select/index.js";
57
- import Mt, { SideNavGroup as Nt, SideNavLink as Pt } from "./side-nav/index.js";
58
- import Ft from "./skeleton/index.js";
59
- import It from "./slider/index.js";
60
- import Lt, { TabBarItem as Rt } from "./tab-bar/index.js";
61
- import { SelectionBar as zt, TableSelectCell as Bt, TableSelectHead as Vt, useSelection as Ht } from "./table/selection.js";
62
- import { TableSwipeAction as Ut, TableSwipeRow as Wt } from "./table/swipe.js";
63
- import Gt, { TableBody as Kt, TableCell as qt, TableContainer as Jt, TableEmpty as Yt, TableFooter as Xt, TableFooterCell as Zt, TableHead as Qt, TableHeader as $t, TableRow as en, TableSpacerRow as tn, useSort as nn } from "./table/index.js";
64
- import { followSectionLink as rn } from "./utils/section-link.js";
65
- import an from "./table-of-contents/index.js";
66
- import on, { Tab as sn, TabList as cn, TabPanel as ln } from "./tabs/index.js";
67
- import { TreeCell as un, TreeLabel as dn, TreeRow as fn, TreeToggle as pn, useTree as mn } from "./tree/index.js";
68
- import hn from "./textarea/index.js";
69
- import gn from "./toggle/index.js";
70
- import _n, { TooltipContent as vn, TooltipTrigger as yn } from "./tooltip/index.js";
71
- import { DEFAULT_THEME as bn, INTENSITIES as xn, PRESETS as Sn, applyPreset as Cn, applyTheme as wn, contrastRatio as Tn, customize as En, normalizeTheme as Dn, oklchToLinearRgb as On, resetTheme as kn, themeVars as An } from "./utils/theme.js";
72
- import { prepareThemeWave as jn, themeWave as Mn } from "./utils/theme-wave.js";
73
- import Nn, { ThemeScript as Pn, themeScript as Fn } from "./theme-toggle/index.js";
74
- import { useHydrated as In } from "./utils/useHydrated.js";
75
- import Ln, { Breadcrumb as Rn } from "./breadcrumbs/index.js";
76
- import zn from "./code-input/index.js";
77
- import Bn, { useCommandPaletteShortcut as Vn } from "./command-palette/index.js";
78
- import Hn from "./empty-state/index.js";
79
- import Un, { accepts as Wn } from "./file-drop/index.js";
80
- import Gn, { pageRange as Kn } from "./pagination/index.js";
81
- import qn from "./sparkline/index.js";
82
- import Jn, { Step as Yn } from "./stepper/index.js";
83
- import Xn from "./tag-input/index.js";
84
- import Zn, { TimelineItem as Qn } from "./timeline/index.js";
85
- import $n from "./kbd/index.js";
86
- import er from "./range-slider/index.js";
87
- import tr, { FilterChip as nr } from "./filter-bar/index.js";
88
- import rr from "./keypad/index.js";
89
- import ir from "./calendar-heatmap/index.js";
90
- import ar from "./trend/index.js";
91
- import or, { ICON_COLORS as sr } from "./icon-picker/index.js";
92
- import { describeRepeat as cr, nextOccurrences as lr } from "./utils/repeat.js";
93
- import ur from "./repeat-picker/index.js";
94
- import dr from "./load-more/index.js";
95
- import { SortableHandle as fr, SortableItem as pr, SortableList as mr } from "./sortable/index.js";
96
- import hr from "./page-transition/index.js";
97
- export { G as Alert, Re as AllocationBar, b as AnimatedMoney, y as AnimatedNumber, x as Avatar, w as Backdrop, E as Badge, Rn as Breadcrumb, Ln as Breadcrumbs, A as Button, ct as Calendar, ir as CalendarHeatmap, M as Card, N as CardDescription, P as CardHeader, F as CardTitle, Be as Chart, Ve as ChartArea, He as ChartBar, Ue as ChartLine, We as ChartReference, Le as ChartTooltipCard, Fe as Checkbox, z as Chip, R as CodeBlock, zn as CodeInput, W as Collapse, te as Combobox, ne as ComboboxCreate, re as ComboboxEmpty, ie as ComboboxItem, ae as ComboboxList, oe as ComboboxPopup, se as ComboboxSearch, ce as ComboboxTrigger, Bn as CommandPalette, ge as ConfirmDialog, bn as DEFAULT_THEME, lt as DatePicker, ut as DateRangePicker, fe as Dialog, pe as DialogClose, me as DialogFooter, ve as Disclosure, ye as DisclosureContent, be as DisclosureTrigger, ze as DonutChart, _e as EditableCell, Hn as EmptyState, K as Field, $ as FieldChevron, Un as FileDrop, tr as FilterBar, nr as FilterChip, q as FormMessage, xe as Header, sr as ICON_COLORS, xn as INTENSITIES, or as IconPicker, S as ImageCropError, Ce as Input, X as InputGroup, Z as InputGroupAddon, Q as InputGroupInput, Se as Inset, $n as Kbd, rr as Keypad, dr as LoadMore, i as Menu, a as MenuContent, o as MenuContextTrigger, s as MenuHeader, c as MenuItem, l as MenuSeparator, u as MenuTrigger, we as Meter, gt as MoneyConversionHint, _t as MoneyCurrencyMenu, ht as MoneyInput, d as MoneyParseError, Pe as MonthPicker, Sn as PRESETS, wt as PageHeader, hr as PageTransition, Gn as Pagination, St as Pill, Ct as PillIndicator, xt as Pills, B as Popover, V as PopoverClose, H as PopoverContent, U as PopoverTrigger, Tt as ProgressRing, qe as Radio, bt as RadioCard, yt as RadioCards, Ke as RadioGroup, er as RangeSlider, dt as RateUnavailableError, ur as RepeatPicker, Et as Segmented, Dt as SegmentedItem, Ot as Select, kt as SelectGroup, At as SelectItem, jt as SelectSeparator, zt as SelectionBar, Mt as SideNav, Nt as SideNavGroup, Pt as SideNavLink, Ft as Skeleton, It as Slider, fr as SortableHandle, pr as SortableItem, mr as SortableList, qn as Sparkline, k as Spinner, I as Stat, L as StatRow, D as StatusPill, O as StatusPillAction, Yn as Step, Jn as Stepper, sn as Tab, Lt as TabBar, Rt as TabBarItem, cn as TabList, ln as TabPanel, Gt as Table, Kt as TableBody, qt as TableCell, Jt as TableContainer, Yt as TableEmpty, Xt as TableFooter, Zt as TableFooterCell, Qt as TableHead, $t as TableHeader, an as TableOfContents, en as TableRow, Bt as TableSelectCell, Vt as TableSelectHead, tn as TableSpacerRow, Ut as TableSwipeAction, Wt as TableSwipeRow, on as Tabs, Xn as TagInput, hn as TextArea, Pn as ThemeScript, Nn as ThemeToggle, Zn as Timeline, Qn as TimelineItem, le as ToastProvider, gn as Toggle, _n as Tooltip, vn as TooltipContent, yn as TooltipTrigger, un as TreeCell, dn as TreeLabel, fn as TreeRow, pn as TreeToggle, ar as Trend, Wn as accepts, Je as addDays, Te as addMonths, Ye as addMonthsToDate, t as applyGraphicsMode, Cn as applyPreset, wn as applyTheme, j as buttonVariants, Xe as commonRanges, Tn as contrastRatio, ft as convertMinor, C as cropImageToSquare, f as currencySymbol, Ee as currentMonth, En as customize, T as cva, e as cx, Ze as dayIndex, Qe as dayOfWeek, $e as daysBetween, et as daysInMonth, cr as describeRepeat, n as detectGraphicsMode, rn as followSectionLink, p as formatAmount, tt as formatDate, nt as formatDateRange, m as formatMoney, De as formatMonth, rt as fromDayIndex, Oe as fromMonthIndex, it as isDate, ke as isMonth, pt as isRateTable, h as minorDigits, Ae as monthIndex, je as monthNames, Me as monthRange, Ne as monthsBetween, lr as nextOccurrences, Ge as niceTicks, Dn as normalizeTheme, On as oklchToLinearRgb, Kn as pageRange, Ie as paletteColor, g as parseMoney, _ as parseMoneyInput, jn as prepareThemeWave, mt as rateBetween, v as reducedMotion, kn as resetTheme, Fn as themeScript, An as themeVars, Mn as themeWave, at as today, r as useAnchoredPopup, Vn as useCommandPaletteShortcut, J as useField, Y as useFieldProps, In as useHydrated, he as useModal, vt as useMoneyInput, Ht as useSelection, nn as useSort, ue as useToast, de as useToastHost, mn as useTree, ee as useVirtualList, ot as weekStart, st as weekdayNames };
18
+ import { Canvas as R, CanvasItem as z } from "./canvas/index.js";
19
+ import { useCopyToClipboard as B } from "./utils/useCopyToClipboard.js";
20
+ import V from "./code-block/index.js";
21
+ import H from "./alert/index.js";
22
+ import U, { FormMessage as W, useField as G, useFieldProps as K } from "./field/index.js";
23
+ import q from "./input/index.js";
24
+ import J from "./slider/index.js";
25
+ import { hexToOklch as Y, oklchToHex as X } from "./utils/color.js";
26
+ import { FieldChevron as Z } from "./utils/field-chevron.js";
27
+ import Q, { ColorPanel as $ } from "./color-picker/index.js";
28
+ import ee from "./chip/index.js";
29
+ import te, { PopoverClose as ne, PopoverContent as re, PopoverTrigger as ie } from "./popover/index.js";
30
+ import ae from "./collapse/index.js";
31
+ import oe, { InputGroupAddon as se, InputGroupInput as ce } from "./input-group/index.js";
32
+ import { useVirtualList as le } from "./utils/useVirtualList.js";
33
+ import ue, { ComboboxCreate as de, ComboboxEmpty as fe, ComboboxItem as pe, ComboboxList as me, ComboboxPopup as he, ComboboxSearch as ge, ComboboxTrigger as _e } from "./combobox/index.js";
34
+ import ve, { useToast as ye, useToastHost as be } from "./toast/index.js";
35
+ import xe, { DialogClose as Se, DialogFooter as Ce, useModal as we } from "./dialog/index.js";
36
+ import Te from "./confirm-dialog/index.js";
37
+ import Ee from "./editable-cell/index.js";
38
+ import De, { DisclosureContent as Oe, DisclosureTrigger as ke } from "./disclosure/index.js";
39
+ import Ae from "./header/index.js";
40
+ import je from "./inset/index.js";
41
+ import Me from "./meter/index.js";
42
+ import { addMonths as Ne, currentMonth as Pe, formatMonth as Fe, fromMonthIndex as Ie, isMonth as Le, monthIndex as Re, monthNames as ze, monthRange as Be, monthsBetween as Ve } from "./utils/month.js";
43
+ import He from "./month-picker/index.js";
44
+ import Ue from "./checkbox/index.js";
45
+ import { paletteColor as We } from "./chart/palette.js";
46
+ import { ChartTooltipCard as Ge } from "./chart/tooltip.js";
47
+ import Ke from "./chart/allocation.js";
48
+ import qe from "./chart/donut.js";
49
+ import Je, { ChartArea as Ye, ChartBar as Xe, ChartLine as Ze, ChartReference as Qe, niceTicks as $e } from "./chart/index.js";
50
+ import et, { Radio as tt } from "./radio-group/index.js";
51
+ import { addDays as nt, addMonthsToDate as rt, commonRanges as it, dayIndex as at, dayOfWeek as ot, daysBetween as st, daysInMonth as ct, formatDate as lt, formatDateRange as ut, fromDayIndex as dt, isDate as ft, today as pt, weekStart as mt, weekdayNames as ht } from "./utils/date.js";
52
+ import gt from "./calendar/index.js";
53
+ import _t, { DateRangePicker as vt } from "./date-picker/index.js";
54
+ import { RateUnavailableError as yt, convertMinor as bt, isRateTable as xt, rateBetween as St } from "./utils/fx.js";
55
+ import Ct, { MoneyConversionHint as wt, MoneyCurrencyMenu as Tt, useMoneyInput as Et } from "./money-input/index.js";
56
+ import Dt, { RadioCard as Ot } from "./radio-cards/index.js";
57
+ import kt, { Pill as At, PillIndicator as jt } from "./pills/index.js";
58
+ import Mt from "./page-header/index.js";
59
+ import Nt from "./progress-ring/index.js";
60
+ import Pt, { SegmentedItem as Ft } from "./segmented/index.js";
61
+ import It, { SelectGroup as Lt, SelectItem as Rt, SelectSeparator as zt } from "./select/index.js";
62
+ import Bt, { SideNavGroup as Vt, SideNavLink as Ht } from "./side-nav/index.js";
63
+ import Ut from "./skeleton/index.js";
64
+ import Wt, { TabBarItem as Gt } from "./tab-bar/index.js";
65
+ import { SelectionBar as Kt, TableSelectCell as qt, TableSelectHead as Jt, useSelection as Yt } from "./table/selection.js";
66
+ import { TableSwipeAction as Xt, TableSwipeRow as Zt } from "./table/swipe.js";
67
+ import Qt, { TableBody as $t, TableCell as en, TableContainer as tn, TableEmpty as nn, TableFooter as rn, TableFooterCell as an, TableHead as on, TableHeader as sn, TableRow as cn, TableSpacerRow as ln, useSort as un } from "./table/index.js";
68
+ import { followSectionLink as dn } from "./utils/section-link.js";
69
+ import fn from "./table-of-contents/index.js";
70
+ import pn, { Tab as mn, TabList as hn, TabPanel as gn } from "./tabs/index.js";
71
+ import { TreeCell as _n, TreeLabel as vn, TreeRow as yn, TreeToggle as bn, useTree as xn } from "./tree/index.js";
72
+ import Sn from "./textarea/index.js";
73
+ import Cn from "./toggle/index.js";
74
+ import wn, { TooltipContent as Tn, TooltipTrigger as En } from "./tooltip/index.js";
75
+ import { DEFAULT_THEME as Dn, INTENSITIES as On, PRESETS as kn, applyPreset as An, applyTheme as jn, contrastRatio as Mn, customize as Nn, normalizeTheme as Pn, oklchToLinearRgb as Fn, resetTheme as In, themeVars as Ln } from "./utils/theme.js";
76
+ import { prepareThemeWave as Rn, themeWave as zn } from "./utils/theme-wave.js";
77
+ import Bn, { ThemeScript as Vn, themeScript as Hn } from "./theme-toggle/index.js";
78
+ import { useHydrated as Un } from "./utils/useHydrated.js";
79
+ import Wn, { Breadcrumb as Gn } from "./breadcrumbs/index.js";
80
+ import Kn from "./code-input/index.js";
81
+ import qn, { useCommandPaletteShortcut as Jn } from "./command-palette/index.js";
82
+ import Yn from "./empty-state/index.js";
83
+ import Xn, { accepts as Zn } from "./file-drop/index.js";
84
+ import Qn, { pageRange as $n } from "./pagination/index.js";
85
+ import er from "./sparkline/index.js";
86
+ import tr, { Step as nr } from "./stepper/index.js";
87
+ import rr from "./tag-input/index.js";
88
+ import ir, { TimelineItem as ar } from "./timeline/index.js";
89
+ import or from "./kbd/index.js";
90
+ import sr from "./range-slider/index.js";
91
+ import cr, { FilterChip as lr } from "./filter-bar/index.js";
92
+ import ur from "./keypad/index.js";
93
+ import dr from "./calendar-heatmap/index.js";
94
+ import fr from "./trend/index.js";
95
+ import pr, { ICON_COLORS as mr } from "./icon-picker/index.js";
96
+ import { describeRepeat as hr, nextOccurrences as gr } from "./utils/repeat.js";
97
+ import _r from "./repeat-picker/index.js";
98
+ import vr from "./load-more/index.js";
99
+ import { SortableHandle as yr, SortableItem as br, SortableList as xr } from "./sortable/index.js";
100
+ import Sr from "./page-transition/index.js";
101
+ export { H as Alert, Ke as AllocationBar, b as AnimatedMoney, y as AnimatedNumber, x as Avatar, w as Backdrop, E as Badge, Gn as Breadcrumb, Wn as Breadcrumbs, A as Button, gt as Calendar, dr as CalendarHeatmap, R as Canvas, z as CanvasItem, M as Card, N as CardDescription, P as CardHeader, F as CardTitle, Je as Chart, Ye as ChartArea, Xe as ChartBar, Ze as ChartLine, Qe as ChartReference, Ge as ChartTooltipCard, Ue as Checkbox, ee as Chip, V as CodeBlock, Kn as CodeInput, ae as Collapse, $ as ColorPanel, Q as ColorPicker, ue as Combobox, de as ComboboxCreate, fe as ComboboxEmpty, pe as ComboboxItem, me as ComboboxList, he as ComboboxPopup, ge as ComboboxSearch, _e as ComboboxTrigger, qn as CommandPalette, Te as ConfirmDialog, Dn as DEFAULT_THEME, _t as DatePicker, vt as DateRangePicker, xe as Dialog, Se as DialogClose, Ce as DialogFooter, De as Disclosure, Oe as DisclosureContent, ke as DisclosureTrigger, qe as DonutChart, Ee as EditableCell, Yn as EmptyState, U as Field, Z as FieldChevron, Xn as FileDrop, cr as FilterBar, lr as FilterChip, W as FormMessage, Ae as Header, mr as ICON_COLORS, On as INTENSITIES, pr as IconPicker, S as ImageCropError, q as Input, oe as InputGroup, se as InputGroupAddon, ce as InputGroupInput, je as Inset, or as Kbd, ur as Keypad, vr as LoadMore, i as Menu, a as MenuContent, o as MenuContextTrigger, s as MenuHeader, c as MenuItem, l as MenuSeparator, u as MenuTrigger, Me as Meter, wt as MoneyConversionHint, Tt as MoneyCurrencyMenu, Ct as MoneyInput, d as MoneyParseError, He as MonthPicker, kn as PRESETS, Mt as PageHeader, Sr as PageTransition, Qn as Pagination, At as Pill, jt as PillIndicator, kt as Pills, te as Popover, ne as PopoverClose, re as PopoverContent, ie as PopoverTrigger, Nt as ProgressRing, tt as Radio, Ot as RadioCard, Dt as RadioCards, et as RadioGroup, sr as RangeSlider, yt as RateUnavailableError, _r as RepeatPicker, Pt as Segmented, Ft as SegmentedItem, It as Select, Lt as SelectGroup, Rt as SelectItem, zt as SelectSeparator, Kt as SelectionBar, Bt as SideNav, Vt as SideNavGroup, Ht as SideNavLink, Ut as Skeleton, J as Slider, yr as SortableHandle, br as SortableItem, xr as SortableList, er as Sparkline, k as Spinner, I as Stat, L as StatRow, D as StatusPill, O as StatusPillAction, nr as Step, tr as Stepper, mn as Tab, Wt as TabBar, Gt as TabBarItem, hn as TabList, gn as TabPanel, Qt as Table, $t as TableBody, en as TableCell, tn as TableContainer, nn as TableEmpty, rn as TableFooter, an as TableFooterCell, on as TableHead, sn as TableHeader, fn as TableOfContents, cn as TableRow, qt as TableSelectCell, Jt as TableSelectHead, ln as TableSpacerRow, Xt as TableSwipeAction, Zt as TableSwipeRow, pn as Tabs, rr as TagInput, Sn as TextArea, Vn as ThemeScript, Bn as ThemeToggle, ir as Timeline, ar as TimelineItem, ve as ToastProvider, Cn as Toggle, wn as Tooltip, Tn as TooltipContent, En as TooltipTrigger, _n as TreeCell, vn as TreeLabel, yn as TreeRow, bn as TreeToggle, fr as Trend, Zn as accepts, nt as addDays, Ne as addMonths, rt as addMonthsToDate, t as applyGraphicsMode, An as applyPreset, jn as applyTheme, j as buttonVariants, it as commonRanges, Mn as contrastRatio, bt as convertMinor, C as cropImageToSquare, f as currencySymbol, Pe as currentMonth, Nn as customize, T as cva, e as cx, at as dayIndex, ot as dayOfWeek, st as daysBetween, ct as daysInMonth, hr as describeRepeat, n as detectGraphicsMode, dn as followSectionLink, p as formatAmount, lt as formatDate, ut as formatDateRange, m as formatMoney, Fe as formatMonth, dt as fromDayIndex, Ie as fromMonthIndex, Y as hexToOklch, ft as isDate, Le as isMonth, xt as isRateTable, h as minorDigits, Re as monthIndex, ze as monthNames, Be as monthRange, Ve as monthsBetween, gr as nextOccurrences, $e as niceTicks, Pn as normalizeTheme, X as oklchToHex, Fn as oklchToLinearRgb, $n as pageRange, We as paletteColor, g as parseMoney, _ as parseMoneyInput, Rn as prepareThemeWave, St as rateBetween, v as reducedMotion, In as resetTheme, Hn as themeScript, Ln as themeVars, zn as themeWave, pt as today, r as useAnchoredPopup, Jn as useCommandPaletteShortcut, B as useCopyToClipboard, G as useField, K as useFieldProps, Un as useHydrated, we as useModal, Et as useMoneyInput, Yt as useSelection, un as useSort, ye as useToast, be as useToastHost, xn as useTree, le as useVirtualList, mt as weekStart, ht as weekdayNames };
@@ -4,13 +4,13 @@ import t, { MenuContent as n, MenuItem as r, MenuSeparator as i, MenuTrigger as
4
4
  import { currencySymbol as o, formatAmount as s, formatMoney as c, minorDigits as l, parseMoneyInput as u } from "../utils/money.js";
5
5
  import d from "../spinner/index.js";
6
6
  import { AlertIcon as f, InfoIcon as p } from "../utils/status-icons.js";
7
- import m, { InputGroupAddon as h, InputGroupInput as g } from "../input-group/index.js";
8
- import { FieldChevron as _ } from "../utils/field-chevron.js";
7
+ import { FieldChevron as m } from "../utils/field-chevron.js";
8
+ import h, { InputGroupAddon as g, InputGroupInput as _ } from "../input-group/index.js";
9
9
  import { convertMinor as v, rateBetween as y } from "../utils/fx.js";
10
10
  import { useEffect as b, useId as x, useRef as S, useState as C } from "react";
11
11
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
12
12
  //#region packages/money-input/index.tsx
13
- function D({ value: t, onChange: n, currency: r, locale: i, allowNegative: a, allowEmpty: o, live: s, onCancel: c, convert: l, start: u, end: d, compact: p = !1, disabled: _ = !1, className: v, onFocus: y, onBlur: b, onKeyDown: x, "aria-describedby": S, ...C }) {
13
+ function D({ value: t, onChange: n, currency: r, locale: i, allowNegative: a, allowEmpty: o, live: s, onCancel: c, convert: l, start: u, end: d, compact: p = !1, disabled: m = !1, className: v, onFocus: y, onBlur: b, onKeyDown: x, "aria-describedby": S, ...C }) {
14
14
  let w = A({
15
15
  value: t,
16
16
  onChange: n,
@@ -24,17 +24,17 @@ function D({ value: t, onChange: n, currency: r, locale: i, allowNegative: a, al
24
24
  }), D = !!w.conversion?.foreign;
25
25
  return /* @__PURE__ */ E("div", {
26
26
  className: e("zen__money-input flex flex-col gap-1", v),
27
- children: [/* @__PURE__ */ E(m, {
27
+ children: [/* @__PURE__ */ E(h, {
28
28
  invalid: !!w.error,
29
29
  "data-foreign": D || void 0,
30
30
  className: e(p && "h-7", "data-foreign:border-primary/50"),
31
31
  children: [
32
- u ?? (w.conversion && !_ ? /* @__PURE__ */ T(O, { money: w }) : /* @__PURE__ */ T(h, {
32
+ u ?? (w.conversion && !m ? /* @__PURE__ */ T(O, { money: w }) : /* @__PURE__ */ T(g, {
33
33
  "aria-hidden": !0,
34
34
  "data-slot": "symbol",
35
35
  children: w.symbol
36
36
  })),
37
- /* @__PURE__ */ T(g, {
37
+ /* @__PURE__ */ T(_, {
38
38
  ...C,
39
39
  ...w.inputProps,
40
40
  onFocus: (e) => {
@@ -47,7 +47,7 @@ function D({ value: t, onChange: n, currency: r, locale: i, allowNegative: a, al
47
47
  w.inputProps.onKeyDown(e), x?.(e);
48
48
  },
49
49
  "aria-describedby": e(w.inputProps["aria-describedby"], S) || void 0,
50
- disabled: _,
50
+ disabled: m,
51
51
  className: e("tabular-nums", p ? "text-right" : "text-left")
52
52
  }),
53
53
  d
@@ -65,7 +65,7 @@ function O({ money: s, className: c }) {
65
65
  return l ? /* @__PURE__ */ E(t, { children: [/* @__PURE__ */ E(a, {
66
66
  "aria-label": `Currency: ${l.currency}. Change to enter another currency`,
67
67
  className: e("group/currency hover:bg-tint/[0.07] focus-visible:ring-ring/50 -ml-1 flex shrink-0 items-center gap-0.5 rounded-md px-1 py-0.5 text-sm outline-hidden focus-visible:ring-2", l.foreign ? "text-primary" : "text-muted-foreground", c),
68
- children: [l.foreign ? l.currency : s.symbol, /* @__PURE__ */ T(_, { className: "text-inherit duration-150 group-data-popup-open/currency:rotate-180" })]
68
+ children: [l.foreign ? l.currency : s.symbol, /* @__PURE__ */ T(m, { className: "text-inherit duration-150 group-data-popup-open/currency:rotate-180" })]
69
69
  }), /* @__PURE__ */ E(n, {
70
70
  align: "start",
71
71
  offset: 8,
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
3
  import { useAnchoredPopup as t } from "../utils/useAnchoredPopup.js";
4
- import { PICKER_MONTH as n, PICKER_NAV as r, PLACEHOLDER as i, POPUP as a, TRIGGER as o } from "../utils/styles.js";
5
- import { useFieldProps as s } from "../field/index.js";
4
+ import { useFieldProps as n } from "../field/index.js";
5
+ import { PICKER_MONTH as r, PICKER_NAV as i, PLACEHOLDER as a, POPUP as o, TRIGGER as s } from "../utils/styles.js";
6
6
  import { FieldChevron as c } from "../utils/field-chevron.js";
7
7
  import l from "../icons/chevron-left.js";
8
8
  import u from "../icons/chevron-right.js";
@@ -11,7 +11,7 @@ import { useState as p } from "react";
11
11
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  //#region packages/month-picker/index.tsx
13
13
  function _({ value: _, onChange: v, locale: y, min: b, max: x, id: S, className: C, disabled: w = !1, placeholder: T = "Pick a month", onClear: E, clearLabel: D = "Clear", style: O, ...k }) {
14
- let [A, j] = p(() => Number((_ ?? (/* @__PURE__ */ new Date()).toISOString()).slice(0, 4))), M = t({ onOpenChange: (e) => e && _ && j(Number(_.slice(0, 4))) }), N = s({
14
+ let [A, j] = p(() => Number((_ ?? (/* @__PURE__ */ new Date()).toISOString()).slice(0, 4))), M = t({ onOpenChange: (e) => e && _ && j(Number(_.slice(0, 4))) }), N = n({
15
15
  ...k,
16
16
  id: S
17
17
  }), P = f(y), F = (e) => (!b || e >= b) && (!x || e <= x);
@@ -26,16 +26,16 @@ function _({ value: _, onChange: v, locale: y, min: b, max: x, id: S, className:
26
26
  ...M.triggerProps.style,
27
27
  ...O
28
28
  },
29
- className: e("zen__month-picker group", o, "w-full", M.open && "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus", C),
29
+ className: e("zen__month-picker group", s, "w-full", M.open && "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus", C),
30
30
  children: [/* @__PURE__ */ h("span", {
31
- className: _ ? void 0 : i,
31
+ className: _ ? void 0 : a,
32
32
  children: _ ? d(_, y) : T
33
33
  }), /* @__PURE__ */ h(c, { open: M.open })]
34
34
  }), /* @__PURE__ */ g("div", {
35
35
  ...M.popupProps,
36
36
  role: "dialog",
37
37
  "aria-label": "Choose month",
38
- className: e("zen__popover", a, "w-64 p-3"),
38
+ className: e("zen__popover", o, "w-64 p-3"),
39
39
  children: [
40
40
  /* @__PURE__ */ g("div", {
41
41
  className: "mb-2 flex items-center justify-between",
@@ -44,7 +44,7 @@ function _({ value: _, onChange: v, locale: y, min: b, max: x, id: S, className:
44
44
  type: "button",
45
45
  "aria-label": "Previous year",
46
46
  onClick: () => j((e) => e - 1),
47
- className: r,
47
+ className: i,
48
48
  children: /* @__PURE__ */ h(l, { className: "size-4" })
49
49
  }),
50
50
  /* @__PURE__ */ h("span", {
@@ -56,15 +56,15 @@ function _({ value: _, onChange: v, locale: y, min: b, max: x, id: S, className:
56
56
  type: "button",
57
57
  "aria-label": "Next year",
58
58
  onClick: () => j((e) => e + 1),
59
- className: r,
59
+ className: i,
60
60
  children: /* @__PURE__ */ h(u, { className: "size-4" })
61
61
  })
62
62
  ]
63
63
  }),
64
64
  /* @__PURE__ */ h("div", {
65
65
  className: "grid grid-cols-3 gap-1",
66
- children: P.map((t, r) => {
67
- let i = `${A}-${String(r + 1).padStart(2, "0")}`, a = i === _;
66
+ children: P.map((t, n) => {
67
+ let i = `${A}-${String(n + 1).padStart(2, "0")}`, a = i === _;
68
68
  return /* @__PURE__ */ h("button", {
69
69
  type: "button",
70
70
  disabled: !F(i),
@@ -73,7 +73,7 @@ function _({ value: _, onChange: v, locale: y, min: b, max: x, id: S, className:
73
73
  onClick: () => {
74
74
  v(i), M.setOpen(!1);
75
75
  },
76
- className: e(n, a && "bg-primary text-primary-foreground hover:bg-primary"),
76
+ className: e(r, a && "bg-primary text-primary-foreground hover:bg-primary"),
77
77
  children: t
78
78
  }, i);
79
79
  })
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
- import t from "../chip/index.js";
4
- import n from "../input/index.js";
3
+ import t from "../input/index.js";
4
+ import n from "../chip/index.js";
5
5
  import { dayOfWeek as r, formatDate as i, weekStart as a, weekdayNames as o } from "../utils/date.js";
6
6
  import s, { SelectItem as c } from "../select/index.js";
7
7
  import { describeRepeat as l, nextOccurrences as u } from "../utils/repeat.js";
@@ -32,7 +32,7 @@ function g({ value: g, onChange: _, locale: v, start: y, weekStartsOn: b = a(v),
32
32
  className: "text-muted-foreground",
33
33
  children: "Every"
34
34
  }),
35
- /* @__PURE__ */ p(n, {
35
+ /* @__PURE__ */ p(t, {
36
36
  "aria-label": "How many",
37
37
  inputMode: "numeric",
38
38
  value: C,
@@ -69,13 +69,13 @@ function g({ value: g, onChange: _, locale: v, start: y, weekStartsOn: b = a(v),
69
69
  "aria-label": "On",
70
70
  className: "flex flex-wrap gap-1.5",
71
71
  children: E.map((e) => {
72
- let n = D.includes(e);
73
- return /* @__PURE__ */ p(t, {
74
- pressed: n,
72
+ let t = D.includes(e);
73
+ return /* @__PURE__ */ p(n, {
74
+ pressed: t,
75
75
  onClick: () => {
76
- n && D.length === 1 || _({
76
+ t && D.length === 1 || _({
77
77
  ...g,
78
- weekdays: n ? D.filter((t) => t !== e) : [...D, e]
78
+ weekdays: t ? D.filter((t) => t !== e) : [...D, e]
79
79
  });
80
80
  },
81
81
  children: T[e]
@@ -2,16 +2,16 @@
2
2
  import { cx as e } from "../utils/cx.js";
3
3
  import { useTypeahead as t } from "../utils/typeahead.js";
4
4
  import { useAnchoredPopup as n } from "../utils/useAnchoredPopup.js";
5
- import { POPUP as r, TRIGGER as i } from "../utils/styles.js";
6
- import { CheckIcon as a } from "../utils/status-icons.js";
7
- import { useFieldProps as o } from "../field/index.js";
5
+ import { CheckIcon as r } from "../utils/status-icons.js";
6
+ import { useFieldProps as i } from "../field/index.js";
7
+ import { POPUP as a, TRIGGER as o } from "../utils/styles.js";
8
8
  import { FieldChevron as s } from "../utils/field-chevron.js";
9
9
  import { Children as c, Fragment as l, createContext as u, isValidElement as d, useCallback as f, useContext as p, useEffect as m, useId as h, useLayoutEffect as g, useRef as _, useState as v } from "react";
10
10
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
11
  //#region packages/select/index.tsx
12
12
  var S = u(null);
13
- function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u = !1, name: d, id: p, className: g, listClassName: C, children: T, style: E, onKeyDown: D, ...O }) {
14
- let k = _(null), A = h(), j = p ?? A, M = o({
13
+ function C({ value: r, onChange: c, placeholder: l = "Select…", disabled: u = !1, name: d, id: p, className: g, listClassName: C, children: T, style: E, onKeyDown: D, ...O }) {
14
+ let k = _(null), A = h(), j = p ?? A, M = i({
15
15
  ...O,
16
16
  id: p
17
17
  }), [N, P] = v(null), F = t(), [I, L] = v(/* @__PURE__ */ new Map()), R = () => Array.from(k.current?.querySelectorAll("[role=\"option\"]") ?? []).map((e) => ({
@@ -23,7 +23,7 @@ function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u =
23
23
  onOpenChange: (e) => {
24
24
  if (!e) return;
25
25
  let t = R();
26
- P(t.find((e) => e.value === a)?.value ?? t.find((e) => !e.disabled)?.value ?? null);
26
+ P(t.find((e) => e.value === r)?.value ?? t.find((e) => !e.disabled)?.value ?? null);
27
27
  }
28
28
  });
29
29
  m(() => {
@@ -36,7 +36,7 @@ function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u =
36
36
  return n.delete(e), n;
37
37
  })), []), H = new Map(I);
38
38
  w(T, H);
39
- let U = a === null ? void 0 : H.get(a), W = (e, t, n = R()) => {
39
+ let U = r === null ? void 0 : H.get(r), W = (e, t, n = R()) => {
40
40
  let r = e === null ? t === 1 ? -1 : n.length : n.findIndex((t) => t.value === e);
41
41
  for (let e = 1; e <= n.length; e++) {
42
42
  let i = (r + t * e + n.length * 2) % n.length;
@@ -79,7 +79,7 @@ function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u =
79
79
  onKeyDown: (e) => {
80
80
  D?.(e), ["ArrowDown", "ArrowUp"].includes(e.key) && !z.open && (e.preventDefault(), z.setOpen(!0));
81
81
  },
82
- className: e("zen__select group", i, "w-full", z.open && "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus", g),
82
+ className: e("zen__select group", o, "w-full", z.open && "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus", g),
83
83
  children: [/* @__PURE__ */ b("span", {
84
84
  className: e("truncate", U === void 0 && "text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))]"),
85
85
  children: U ?? l
@@ -88,11 +88,11 @@ function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u =
88
88
  d && /* @__PURE__ */ b("input", {
89
89
  type: "hidden",
90
90
  name: d,
91
- value: a ?? ""
91
+ value: r ?? ""
92
92
  }),
93
93
  /* @__PURE__ */ b("div", {
94
94
  ...z.popupProps,
95
- className: e("zen__popover", r, "overflow-visible py-1", C),
95
+ className: e("zen__popover", a, "overflow-visible py-1", C),
96
96
  children: /* @__PURE__ */ b("div", {
97
97
  ref: k,
98
98
  role: "listbox",
@@ -104,7 +104,7 @@ function C({ value: a, onChange: c, placeholder: l = "Select…", disabled: u =
104
104
  className: "max-h-72 overflow-y-auto outline-hidden",
105
105
  children: /* @__PURE__ */ b(S.Provider, {
106
106
  value: {
107
- value: a,
107
+ value: r,
108
108
  active: N,
109
109
  setActive: P,
110
110
  choose: B,
@@ -128,7 +128,7 @@ function w(e, t) {
128
128
  });
129
129
  }
130
130
  var T = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(T).join("") : "";
131
- function E({ value: t, label: n, disabled: r, className: i, children: o }) {
131
+ function E({ value: t, label: n, disabled: i, className: a, children: o }) {
132
132
  let s = p(S);
133
133
  if (!s) throw Error("SelectItem must be inside a Select");
134
134
  let c = _(null), l = n ?? T(o), u = s.register;
@@ -145,15 +145,15 @@ function E({ value: t, label: n, disabled: r, className: i, children: o }) {
145
145
  "data-value": t,
146
146
  "data-label": l || void 0,
147
147
  "aria-selected": d,
148
- "aria-disabled": r || void 0,
148
+ "aria-disabled": i || void 0,
149
149
  "data-highlighted": s.active === t || void 0,
150
- onMouseMove: () => !r && s.setActive(t),
150
+ onMouseMove: () => !i && s.setActive(t),
151
151
  onClick: () => s.choose(t),
152
- className: e("grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 px-3 py-2 text-sm outline-hidden select-none", "data-highlighted:bg-muted aria-disabled:cursor-not-allowed aria-disabled:opacity-50", i),
152
+ className: e("grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 px-3 py-2 text-sm outline-hidden select-none", "data-highlighted:bg-muted aria-disabled:cursor-not-allowed aria-disabled:opacity-50", a),
153
153
  children: [/* @__PURE__ */ b("span", {
154
154
  className: "text-primary col-start-1",
155
155
  "aria-hidden": !0,
156
- children: d && /* @__PURE__ */ b(a, {})
156
+ children: d && /* @__PURE__ */ b(r, {})
157
157
  }), /* @__PURE__ */ b("span", {
158
158
  className: "col-start-2 truncate",
159
159
  children: o
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/sortable/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,cAAc,EASjB,MAAM,OAAO,CAAC;AA2Bf;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAuJhG;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAazE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAwB9F;AAUD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC7E,gCAAgC;IAChC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAC3D,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAC7E,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/sortable/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,cAAc,EASjB,MAAM,OAAO,CAAC;AA2Bf;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAuJhG;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAczE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAwB9F;AAUD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC7E,gCAAgC;IAChC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAC3D,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAC7E,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACjB"}
@@ -108,7 +108,7 @@ function _({ id: t, className: n, ...r }) {
108
108
  return /* @__PURE__ */ c("li", {
109
109
  "data-sortable-id": t,
110
110
  "data-lifted": i === t || void 0,
111
- className: e("zen__sortable-item relative transition-[box-shadow,scale] duration-200 data-dragging:z-10 data-dragging:scale-[1.02] data-dragging:shadow-[0_12px_32px_-12px_oklch(0_0_0/0.6)] data-lifted:z-10 data-lifted:shadow-[0_0_0_2px_oklch(var(--primary)/0.6)]", n),
111
+ className: e("zen__sortable-item relative transition-[box-shadow,scale,background-color] duration-200 data-dragging:bg-card data-lifted:bg-card data-dragging:z-10 data-dragging:rounded-xl data-dragging:scale-[1.02] data-dragging:shadow-[0_0_0_1px_oklch(var(--tint)/0.08),0_12px_32px_-12px_oklch(0_0_0/0.6)] data-lifted:z-10 data-lifted:rounded-xl data-lifted:shadow-[0_0_0_2px_oklch(var(--primary)/0.6)]", n),
112
112
  ...r
113
113
  });
114
114
  }
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
- import { FIELD as t } from "../utils/styles.js";
4
- import { useFieldProps as n } from "../field/index.js";
3
+ import { useFieldProps as t } from "../field/index.js";
4
+ import { FIELD as n } from "../utils/styles.js";
5
5
  import r from "../icons/micro/x-mark.js";
6
6
  import { useLayoutEffect as i, useRef as a, useState as o } from "react";
7
7
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  //#region packages/tag-input/index.tsx
9
9
  function l({ value: l, defaultValue: u = [], onValueChange: d, validate: f, removeLabel: p = (e) => `Remove ${e}`, className: m, disabled: h, ...g }) {
10
- let [_, v] = o(u), y = l ?? _, [b, x] = o(""), S = n(g), C = a(null), w = y.length;
10
+ let [_, v] = o(u), y = l ?? _, [b, x] = o(""), S = t(g), C = a(null), w = y.length;
11
11
  i(() => {
12
12
  let e = C.current;
13
13
  e?.parentElement?.contains(document.activeElement) && (e.scrollTop = e.scrollHeight);
@@ -20,7 +20,7 @@ function l({ value: l, defaultValue: u = [], onValueChange: d, validate: f, remo
20
20
  t.length !== y.length && T(t);
21
21
  };
22
22
  return /* @__PURE__ */ c("div", {
23
- className: e("zen__tag-input", t, "flex h-auto max-h-36 min-h-10 w-full cursor-text flex-col gap-1.5 py-1.5", "has-[input:focus-visible]:border-glow/60 has-[input:focus-visible]:bg-tint/[0.05] has-[input:focus-visible]:shadow-glow-focus has-[input:focus-visible]:[--glow-border-color:transparent]", h && "cursor-not-allowed opacity-50", m),
23
+ className: e("zen__tag-input", n, "flex h-auto max-h-36 min-h-10 w-full cursor-text flex-col gap-1.5 py-1.5", "has-[input:focus-visible]:border-glow/60 has-[input:focus-visible]:bg-tint/[0.05] has-[input:focus-visible]:shadow-glow-focus has-[input:focus-visible]:[--glow-border-color:transparent]", h && "cursor-not-allowed opacity-50", m),
24
24
  onClick: (e) => e.currentTarget.querySelector("input")?.focus(),
25
25
  children: [w > 0 && /* @__PURE__ */ s("div", {
26
26
  ref: C,
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
- import { FIELD as t } from "../utils/styles.js";
4
- import { useFieldProps as n } from "../field/index.js";
3
+ import { useFieldProps as t } from "../field/index.js";
4
+ import { FIELD as n } from "../utils/styles.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  //#region packages/textarea/index.tsx
7
7
  function i(i) {
8
- let { className: a, ...o } = i, s = n(o);
8
+ let { className: a, ...o } = i, s = t(o);
9
9
  return /* @__PURE__ */ r("textarea", {
10
- className: e("zen__textarea", t.replace("h-10", ""), "h-32 w-full resize-y py-2", "read-only:text-foreground read-only:cursor-default read-only:border-none! read-only:bg-transparent read-only:shadow-none! read-only:outline-hidden!", a),
10
+ className: e("zen__textarea", n.replace("h-10", ""), "h-32 w-full resize-y py-2", "read-only:text-foreground read-only:cursor-default read-only:border-none! read-only:bg-transparent read-only:shadow-none! read-only:outline-hidden!", a),
11
11
  ...o,
12
12
  ...s
13
13
  });
@@ -0,0 +1,35 @@
1
+ /** A colour in OKLCH: lightness 0–1, chroma, hue in degrees, and alpha 0–1. */
2
+ export interface Oklch {
3
+ l: number;
4
+ c: number;
5
+ h: number;
6
+ alpha: number;
7
+ }
8
+ /** Hue in degrees, saturation and value 0–1, alpha 0–1. */
9
+ export interface Hsv {
10
+ h: number;
11
+ s: number;
12
+ v: number;
13
+ a: number;
14
+ }
15
+ type Rgba = [number, number, number, number];
16
+ /** "#rgb", "#rgba", "#rrggbb" or "#rrggbbaa" → sRGB and alpha, 0–1; null if it isn't one. */
17
+ export declare function parseHex(hex: string): Rgba | null;
18
+ /** sRGB and alpha, 0–1 → "#rrggbb", or "#rrggbbaa" when not opaque. */
19
+ export declare function formatHex([r, g, b, a]: readonly number[]): string;
20
+ export declare function hexToHsv(hex: string): Hsv | null;
21
+ export declare function hsvToHex({ h, s, v, a }: Hsv): string;
22
+ /** sRGB 0–1 → linear light. */
23
+ export declare const srgbToLinear: (c: number) => number;
24
+ /** Linear light → sRGB 0–1. */
25
+ export declare const linearToSrgb: (c: number) => number;
26
+ /** OKLCH → linear sRGB, clamped to gamut. */
27
+ export declare function oklchToLinear(l: number, c: number, h: number): [number, number, number];
28
+ /** A hex colour in OKLCH, e.g. to give its hue and chroma to the theme engine; null if it isn't one. */
29
+ export declare function hexToOklch(hex: string): Oklch | null;
30
+ /** OKLCH as hex; colours outside sRGB are clamped to it. */
31
+ export declare function oklchToHex({ l, c, h, alpha }: Omit<Oklch, 'alpha'> & {
32
+ alpha?: number;
33
+ }): string;
34
+ export {};
35
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../packages/utils/color.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,WAAW,KAAK;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,2DAA2D;AAC3D,MAAM,WAAW,GAAG;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAI7C,6FAA6F;AAC7F,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOjD;AAED,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAMrE;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAahD;AAED,wBAAgB,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,MAAM,CAMpD;AAED,+BAA+B;AAC/B,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,WAA8D,CAAC;AACrG,+BAA+B;AAC/B,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,WAAkE,CAAC;AAEzG,6CAA6C;AAC7C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAWvF;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAcpD;AAED,4DAA4D;AAC5D,wBAAgB,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAS,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEpG"}