@rinzai/zen 0.6.1 → 0.7.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 (161) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +3 -3
  3. package/dist/alert/index.d.ts +21 -0
  4. package/dist/alert/index.d.ts.map +1 -0
  5. package/dist/alert/index.js +49 -0
  6. package/dist/avatar/index.d.ts.map +1 -1
  7. package/dist/avatar/index.js +25 -22
  8. package/dist/button/index.d.ts +2 -1
  9. package/dist/button/index.d.ts.map +1 -1
  10. package/dist/button/index.js +43 -12
  11. package/dist/calendar/index.d.ts.map +1 -1
  12. package/dist/calendar/index.js +86 -85
  13. package/dist/chart/donut.d.ts +4 -1
  14. package/dist/chart/donut.d.ts.map +1 -1
  15. package/dist/chart/donut.js +76 -66
  16. package/dist/chart/index.d.ts +8 -2
  17. package/dist/chart/index.d.ts.map +1 -1
  18. package/dist/chart/index.js +192 -182
  19. package/dist/chart/palette.d.ts +14 -0
  20. package/dist/chart/palette.d.ts.map +1 -0
  21. package/dist/chart/palette.js +9 -0
  22. package/dist/chart/tooltip.d.ts +6 -2
  23. package/dist/chart/tooltip.d.ts.map +1 -1
  24. package/dist/chart/tooltip.js +6 -6
  25. package/dist/checkbox/index.d.ts.map +1 -1
  26. package/dist/checkbox/index.js +28 -44
  27. package/dist/chip/index.js +1 -1
  28. package/dist/code-block/index.js +1 -1
  29. package/dist/date-picker/index.d.ts.map +1 -1
  30. package/dist/date-picker/index.js +24 -38
  31. package/dist/disclosure/index.js +1 -1
  32. package/dist/editable-cell/index.js +1 -1
  33. package/dist/field/index.d.ts +1 -1
  34. package/dist/field/index.d.ts.map +1 -1
  35. package/dist/field/index.js +33 -32
  36. package/dist/header/index.d.ts +9 -1
  37. package/dist/header/index.d.ts.map +1 -1
  38. package/dist/header/index.js +17 -9
  39. package/dist/icons/arrow-left.d.ts +3 -0
  40. package/dist/icons/arrow-left.d.ts.map +1 -0
  41. package/dist/icons/arrow-right.d.ts +3 -0
  42. package/dist/icons/arrow-right.d.ts.map +1 -0
  43. package/dist/icons/bars.d.ts +3 -0
  44. package/dist/icons/bars.d.ts.map +1 -0
  45. package/dist/icons/calendar.d.ts +3 -0
  46. package/dist/icons/calendar.d.ts.map +1 -0
  47. package/dist/icons/chart-bar.d.ts +3 -0
  48. package/dist/icons/chart-bar.d.ts.map +1 -0
  49. package/dist/icons/chevron-down.d.ts.map +1 -1
  50. package/dist/icons/chevron-down.js +4 -2
  51. package/dist/icons/chevron-left.d.ts.map +1 -1
  52. package/dist/icons/chevron-left.js +4 -2
  53. package/dist/icons/chevron-right.d.ts.map +1 -1
  54. package/dist/icons/chevron-right.js +4 -2
  55. package/dist/icons/chevron-up.d.ts.map +1 -1
  56. package/dist/icons/chevron-up.js +4 -2
  57. package/dist/icons/ellipsis.d.ts +0 -1
  58. package/dist/icons/ellipsis.d.ts.map +1 -1
  59. package/dist/icons/flag.d.ts +3 -0
  60. package/dist/icons/flag.d.ts.map +1 -0
  61. package/dist/icons/list-bullet.d.ts +3 -0
  62. package/dist/icons/list-bullet.d.ts.map +1 -0
  63. package/dist/icons/lock.d.ts +3 -0
  64. package/dist/icons/lock.d.ts.map +1 -0
  65. package/dist/icons/logout.d.ts +3 -0
  66. package/dist/icons/logout.d.ts.map +1 -0
  67. package/dist/icons/micro/calendar.d.ts +3 -0
  68. package/dist/icons/micro/calendar.d.ts.map +1 -0
  69. package/dist/icons/micro/calendar.js +21 -0
  70. package/dist/icons/micro/check.d.ts +3 -0
  71. package/dist/icons/micro/check.d.ts.map +1 -0
  72. package/dist/icons/micro/check.js +21 -0
  73. package/dist/icons/micro/chevron-down.d.ts +3 -0
  74. package/dist/icons/micro/chevron-down.d.ts.map +1 -0
  75. package/dist/icons/micro/chevron-down.js +21 -0
  76. package/dist/icons/micro/chevron-right.d.ts +3 -0
  77. package/dist/icons/micro/chevron-right.d.ts.map +1 -0
  78. package/dist/icons/micro/chevron-right.js +21 -0
  79. package/dist/icons/micro/exclamation-triangle.d.ts +3 -0
  80. package/dist/icons/micro/exclamation-triangle.d.ts.map +1 -0
  81. package/dist/icons/micro/exclamation-triangle.js +21 -0
  82. package/dist/icons/micro/information-circle.d.ts +3 -0
  83. package/dist/icons/micro/information-circle.d.ts.map +1 -0
  84. package/dist/icons/micro/information-circle.js +21 -0
  85. package/dist/icons/micro/minus.d.ts +3 -0
  86. package/dist/icons/micro/minus.d.ts.map +1 -0
  87. package/dist/icons/micro/minus.js +17 -0
  88. package/dist/icons/micro/moon.d.ts +3 -0
  89. package/dist/icons/micro/moon.d.ts.map +1 -0
  90. package/dist/icons/micro/moon.js +17 -0
  91. package/dist/icons/micro/sun.d.ts +3 -0
  92. package/dist/icons/micro/sun.d.ts.map +1 -0
  93. package/dist/icons/micro/sun.js +17 -0
  94. package/dist/icons/micro/x-mark.d.ts +3 -0
  95. package/dist/icons/micro/x-mark.d.ts.map +1 -0
  96. package/dist/icons/micro/x-mark.js +17 -0
  97. package/dist/icons/search.d.ts.map +1 -1
  98. package/dist/icons/search.js +4 -2
  99. package/dist/icons/settings.d.ts +3 -0
  100. package/dist/icons/settings.d.ts.map +1 -0
  101. package/dist/icons/squares.d.ts +3 -0
  102. package/dist/icons/squares.d.ts.map +1 -0
  103. package/dist/icons/table.d.ts +3 -0
  104. package/dist/icons/table.d.ts.map +1 -0
  105. package/dist/icons/x-mark.d.ts.map +1 -1
  106. package/dist/icons/x-mark.js +4 -2
  107. package/dist/index.d.ts +7 -5
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/lib.js +57 -61
  110. package/dist/menu/index.d.ts.map +1 -1
  111. package/dist/menu/index.js +67 -60
  112. package/dist/month-picker/index.d.ts.map +1 -1
  113. package/dist/month-picker/index.js +55 -55
  114. package/dist/pills/index.d.ts +1 -1
  115. package/dist/pills/index.d.ts.map +1 -1
  116. package/dist/pills/index.js +6 -2
  117. package/dist/popover/index.js +12 -11
  118. package/dist/select/index.d.ts.map +1 -1
  119. package/dist/select/index.js +96 -102
  120. package/dist/slider/index.d.ts.map +1 -1
  121. package/dist/slider/index.js +1 -1
  122. package/dist/status-pill/index.d.ts +18 -0
  123. package/dist/status-pill/index.d.ts.map +1 -0
  124. package/dist/status-pill/index.js +25 -0
  125. package/dist/tab-bar/index.js +1 -1
  126. package/dist/table/index.js +1 -1
  127. package/dist/tabs/index.d.ts.map +1 -1
  128. package/dist/tabs/index.js +9 -5
  129. package/dist/theme-toggle/index.d.ts +26 -4
  130. package/dist/theme-toggle/index.d.ts.map +1 -1
  131. package/dist/theme-toggle/index.js +42 -35
  132. package/dist/theme.css +67 -1
  133. package/dist/toast/index.d.ts.map +1 -1
  134. package/dist/toast/index.js +119 -106
  135. package/dist/tree/index.d.ts +22 -3
  136. package/dist/tree/index.d.ts.map +1 -1
  137. package/dist/tree/index.js +76 -56
  138. package/dist/utils/date.d.ts +6 -4
  139. package/dist/utils/date.d.ts.map +1 -1
  140. package/dist/utils/date.js +18 -16
  141. package/dist/utils/field-chevron.d.ts.map +1 -1
  142. package/dist/utils/field-chevron.js +5 -14
  143. package/dist/utils/status-icons.d.ts +1 -1
  144. package/dist/utils/status-icons.d.ts.map +1 -1
  145. package/dist/utils/status-icons.js +11 -41
  146. package/dist/utils/styles.d.ts +9 -3
  147. package/dist/utils/styles.d.ts.map +1 -1
  148. package/dist/utils/styles.js +2 -2
  149. package/dist/utils/theme-wave.d.ts +26 -0
  150. package/dist/utils/theme-wave.d.ts.map +1 -0
  151. package/dist/utils/theme-wave.js +239 -0
  152. package/dist/utils/typeahead.d.ts +12 -0
  153. package/dist/utils/typeahead.d.ts.map +1 -0
  154. package/dist/utils/typeahead.js +19 -0
  155. package/dist/zen.css +1 -1
  156. package/package.json +2 -1
  157. package/dist/icons/ellipsis.js +0 -31
  158. package/dist/icons/index.d.ts +0 -9
  159. package/dist/icons/index.d.ts.map +0 -1
  160. package/dist/icons/status.d.ts +0 -2
  161. package/dist/icons/status.d.ts.map +0 -1
@@ -1,39 +1,42 @@
1
1
  "use client";
2
2
  import { cx as e } from "../utils/cx.js";
3
3
  import { TableCell as t, TableRow as n } from "../table/index.js";
4
- import { useCallback as r, useMemo as i, useRef as a, useState as o } from "react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import r from "../icons/micro/chevron-right.js";
5
+ import { useCallback as i, useMemo as a, useRef as o, useState as s } from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
7
  //#region packages/tree/index.tsx
7
- function l({ items: t, getKey: n, getChildren: s, defaultExpanded: c = !0, rowHeight: l = 36 }) {
8
- let [u, d] = o(() => /* @__PURE__ */ new Set()), [f, p] = o(null), [m, h] = o(null), g = a(null), _ = r((e) => u.has(e) !== c, [u, c]), v = i(() => {
9
- let e = [], r = (t, i, a) => {
10
- for (let o of t) {
11
- let t = n(o), c = s(o), l = !!c?.length, u = l && _(t);
8
+ function u({ items: t, getKey: n, getChildren: r, defaultExpanded: c = !0, rowHeight: l = 36 }) {
9
+ let [u, d] = s(() => /* @__PURE__ */ new Set()), [f, p] = s(null), [m, h] = s(null), g = o(null), _ = i((e) => u.has(e) !== c, [u, c]), v = a(() => {
10
+ let e = [], i = (t, a, o) => {
11
+ t.forEach((s, c) => {
12
+ let l = n(s), u = r(s), d = !!u?.length, f = d && _(l);
12
13
  e.push({
13
- item: o,
14
- key: t,
15
- depth: i,
16
- parentKey: a,
17
- hasChildren: l,
18
- expanded: u
19
- }), u && r(c, i + 1, t);
20
- }
14
+ item: s,
15
+ key: l,
16
+ depth: a,
17
+ parentKey: o,
18
+ hasChildren: d,
19
+ expanded: f,
20
+ position: c + 1,
21
+ siblings: t.length
22
+ }), f && i(u, a + 1, l);
23
+ });
21
24
  };
22
- return r(t, 0, null), e;
25
+ return i(t, 0, null), e;
23
26
  }, [
24
27
  t,
25
28
  n,
26
- s,
29
+ r,
27
30
  _
28
31
  ]), y = () => {
29
- let e = [], r = (t) => {
30
- for (let i of t) {
31
- let t = s(i);
32
- t?.length && (e.push(n(i)), r(t));
32
+ let e = [], i = (t) => {
33
+ for (let a of t) {
34
+ let t = r(a);
35
+ t?.length && (e.push(n(a)), i(t));
33
36
  }
34
37
  };
35
- return r(t), e;
36
- }, b = r((e, t) => d((n) => {
38
+ return i(t), e;
39
+ }, b = i((e, t) => d((n) => {
37
40
  let r = new Set(n);
38
41
  return t === c ? r.delete(e) : r.add(e), r;
39
42
  }), [c]), x = () => typeof window < "u" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || document.documentElement.classList.contains("reduce-motion")), S = (e) => {
@@ -54,6 +57,17 @@ function l({ items: t, getKey: n, getChildren: s, defaultExpanded: c = !0, rowHe
54
57
  };
55
58
  g.current = t, setTimeout(t, 500);
56
59
  }
60
+ }, [C, w] = s(null), T = v.some((e) => e.key === C) ? C : v[0]?.key ?? null, E = (e) => e.expanded && m !== e.key, D = (e, t) => {
61
+ if (t.target !== t.currentTarget) return;
62
+ let n = v.indexOf(e), r;
63
+ if (t.key === "ArrowDown") r = v[n + 1];
64
+ else if (t.key === "ArrowUp") r = v[n - 1];
65
+ else if (t.key === "Home") r = v[0];
66
+ else if (t.key === "End") r = v.at(-1);
67
+ else if (t.key === "ArrowRight" && e.hasChildren) E(e) ? r = v[n + 1] : S(e.key);
68
+ else if (t.key === "ArrowLeft") E(e) ? S(e.key) : r = v.find((t) => t.key === e.parentKey);
69
+ else return;
70
+ t.preventDefault(), r && t.currentTarget.closest("[role=\"treegrid\"], table")?.querySelector(`[data-tree-key="${CSS.escape(r.key)}"]`)?.focus();
57
71
  };
58
72
  return {
59
73
  rows: v,
@@ -63,73 +77,79 @@ function l({ items: t, getKey: n, getChildren: s, defaultExpanded: c = !0, rowHe
63
77
  collapse: (e) => b(e, !1),
64
78
  expandAll: () => d(c ? /* @__PURE__ */ new Set() : new Set(y())),
65
79
  collapseAll: () => d(c ? new Set(y()) : /* @__PURE__ */ new Set()),
80
+ tableProps: { role: "treegrid" },
66
81
  rowProps: (t) => ({
67
82
  "aria-level": t.depth + 1,
68
- "aria-expanded": t.hasChildren ? t.expanded : void 0,
83
+ "aria-expanded": t.hasChildren ? E(t) : void 0,
84
+ "aria-posinset": t.position,
85
+ "aria-setsize": t.siblings,
69
86
  "data-depth": t.depth,
70
- className: e(f && t.parentKey === f.key && "zen__tree-row-enter", m && t.parentKey === m && "zen__tree-row-exit"),
87
+ "data-tree-key": t.key,
88
+ tabIndex: t.key === T ? 0 : -1,
89
+ onFocus: (e) => {
90
+ e.target === e.currentTarget && w(t.key);
91
+ },
92
+ onKeyDown: (e) => D(t, e),
93
+ className: e("outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring/60", f && t.parentKey === f.key && "zen__tree-row-enter", m && t.parentKey === m && "zen__tree-row-exit"),
71
94
  style: { "--row-h": `${l - 1}px` },
72
95
  onAnimationEnd: (e) => {
73
96
  e.animationName === "zen-row-close" && m && t.parentKey === m && g.current?.();
74
97
  }
75
98
  }),
76
99
  toggleProps: (e) => ({
77
- expanded: e.expanded && m !== e.key,
78
- onToggle: () => S(e.key)
100
+ expanded: E(e),
101
+ onToggle: () => S(e.key),
102
+ tabIndex: -1
79
103
  }),
80
104
  rowHeight: l
81
105
  };
82
106
  }
83
- function u({ row: t, tree: r, className: i, style: a, ...o }) {
84
- let c = r.rowProps(t);
85
- return /* @__PURE__ */ s(n, {
86
- ...o,
87
- ...c,
88
- className: e(c.className, i),
107
+ function d({ row: t, tree: r, className: i, style: a, onFocus: o, onKeyDown: s, ...l }) {
108
+ let u = r.rowProps(t);
109
+ return /* @__PURE__ */ c(n, {
110
+ ...l,
111
+ ...u,
112
+ onFocus: (e) => {
113
+ o?.(e), u.onFocus(e);
114
+ },
115
+ onKeyDown: (e) => {
116
+ s?.(e), e.defaultPrevented || u.onKeyDown(e);
117
+ },
118
+ className: e(u.className, i),
89
119
  style: {
90
- ...c.style,
120
+ ...u.style,
91
121
  ...a
92
122
  }
93
123
  });
94
124
  }
95
- function d({ numeric: n, className: r, children: i, ...a }) {
96
- return /* @__PURE__ */ s(t, {
125
+ function f({ numeric: n, className: r, children: i, ...a }) {
126
+ return /* @__PURE__ */ c(t, {
97
127
  numeric: n,
98
128
  className: e("py-0 whitespace-nowrap", r),
99
129
  ...a,
100
- children: /* @__PURE__ */ s("div", {
130
+ children: /* @__PURE__ */ c("div", {
101
131
  className: e("zen__tree-cell flex h-[var(--row-h)] items-center", n && "justify-end"),
102
132
  children: i
103
133
  })
104
134
  });
105
135
  }
106
- function f({ row: t, tree: n, indent: r = 20, children: i, className: a }) {
107
- return /* @__PURE__ */ c("div", {
136
+ function p({ row: t, tree: n, indent: r = 20, children: i, className: a }) {
137
+ return /* @__PURE__ */ l("div", {
108
138
  className: e("flex min-w-0 flex-1 items-center gap-1", a),
109
139
  style: { paddingLeft: t.depth * r },
110
- children: [t.hasChildren ? /* @__PURE__ */ s(p, { ...n.toggleProps(t) }) : /* @__PURE__ */ s("span", { className: "-ml-1 w-6 shrink-0" }), i]
140
+ children: [t.hasChildren ? /* @__PURE__ */ c(m, { ...n.toggleProps(t) }) : /* @__PURE__ */ c("span", { className: "-ml-1 w-6 shrink-0" }), i]
111
141
  });
112
142
  }
113
- function p({ expanded: t, onToggle: n, className: r, ...i }) {
114
- return /* @__PURE__ */ s("button", {
143
+ function m({ expanded: t, onToggle: n, className: i, ...a }) {
144
+ return /* @__PURE__ */ c("button", {
115
145
  type: "button",
116
146
  onClick: n,
117
147
  "aria-label": t ? "Collapse" : "Expand",
118
148
  "aria-expanded": t,
119
- className: e("text-muted-foreground hover:bg-tint/[0.08] hover:text-foreground focus-visible:ring-ring/50 -ml-1 grid size-6 shrink-0 place-items-center rounded-md outline-hidden transition-colors focus-visible:ring-2", r),
120
- ...i,
121
- children: /* @__PURE__ */ s("svg", {
122
- viewBox: "0 0 16 16",
123
- fill: "none",
124
- stroke: "currentColor",
125
- strokeWidth: "2",
126
- strokeLinecap: "round",
127
- strokeLinejoin: "round",
128
- "aria-hidden": !0,
129
- className: e("size-4 transition-transform duration-200 ease-out", t && "rotate-90"),
130
- children: /* @__PURE__ */ s("path", { d: "m6 3.5 4.5 4.5L6 12.5" })
131
- })
149
+ className: e("text-muted-foreground hover:bg-tint/[0.08] hover:text-foreground focus-visible:ring-ring/50 -ml-1 grid size-6 shrink-0 cursor-pointer place-items-center rounded-md outline-hidden transition-colors focus-visible:ring-2", i),
150
+ ...a,
151
+ children: /* @__PURE__ */ c(r, { className: e("size-4 transition-transform duration-200 ease-out", t && "rotate-90") })
132
152
  });
133
153
  }
134
154
  //#endregion
135
- export { d as TreeCell, f as TreeLabel, u as TreeRow, p as TreeToggle, l as useTree };
155
+ export { f as TreeCell, p as TreeLabel, d as TreeRow, m as TreeToggle, u as useTree };
@@ -23,15 +23,17 @@ export declare function dayOfWeek(date: DateString): number;
23
23
  export declare function today(now?: Date): DateString;
24
24
  /** Days from `from` to `to` (negative if `to` is earlier). */
25
25
  export declare function daysBetween(from: DateString, to: DateString): number;
26
+ /** How much of a date to show; `day` is the day and month without the year ("Sep 3"), for dates within the year. */
27
+ export type DateStyle = 'day' | 'short' | 'medium' | 'long' | 'full';
26
28
  /**
27
- * "Sep 30, 2026" (or the locale's equivalent) by default; `short` is
28
- * "9/30/26", `long` "September 30, 2026", `full` adds the weekday.
29
+ * "Sep 30, 2026" (or the locale's equivalent) by default; `day` is "Sep 30",
30
+ * `short` "9/30/26", `long` "September 30, 2026", `full` adds the weekday.
29
31
  */
30
- export declare function formatDate(date: DateString, locale: string, style?: 'short' | 'medium' | 'long' | 'full'): string;
32
+ export declare function formatDate(date: DateString, locale: string, style?: DateStyle): string;
31
33
  /** Short weekday names for a locale, Sunday first. */
32
34
  export declare function weekdayNames(locale: string, style?: 'narrow' | 'short' | 'long'): string[];
33
35
  /** The first day of the week for a locale: 0 for Sunday, 1 for Monday, 6 for Saturday. */
34
36
  export declare function weekStart(locale: string): number;
35
37
  /** "Sep 3 – 10, 2026" (or the locale's equivalent), sharing what the two dates have in common. */
36
- export declare function formatDateRange(start: DateString, end: DateString, locale: string, style?: 'short' | 'medium' | 'long'): string;
38
+ export declare function formatDateRange(start: DateString, end: DateString, locale: string, style?: Exclude<DateStyle, 'full'>): string;
37
39
  //# sourceMappingURL=date.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../packages/utils/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,GAAG,EAAE,UAAU,GAAG,IAAI,CAAC;CAC1B;AAID,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAI1D;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAGjD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEtD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAE/D;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAKvE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGhD;AAED,qCAAqC;AACrC,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAElD;AAED,qCAAqC;AACrC,wBAAgB,KAAK,CAAC,GAAG,GAAE,IAAiB,GAAG,UAAU,CAExD;AAED,8DAA8D;AAC9D,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAEpE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACtB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAiB,GACvD,MAAM,CAIR;AAED,sDAAsD;AACtD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,GAAG,OAAO,GAAG,MAAgB,GAAG,MAAM,EAAE,CAGnG;AAUD,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAahD;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAC3B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,OAAO,GAAG,QAAQ,GAAG,MAAiB,GAC9C,MAAM,CAGR"}
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../packages/utils/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,GAAG,EAAE,UAAU,GAAG,IAAI,CAAC;CAC1B;AAID,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAI1D;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAGjD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEtD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAE/D;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAKvE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGhD;AAED,qCAAqC;AACrC,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAElD;AAED,qCAAqC;AACrC,wBAAgB,KAAK,CAAC,GAAG,GAAE,IAAiB,GAAG,UAAU,CAExD;AAED,8DAA8D;AAC9D,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAEpE;AAED,oHAAoH;AACpH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAQrE;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,SAAoB,GAAG,MAAM,CAEhG;AAED,sDAAsD;AACtD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,GAAG,OAAO,GAAG,MAAgB,GAAG,MAAM,EAAE,CAGnG;AAUD,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAahD;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAC3B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAY,GAC7C,MAAM,CAER"}
@@ -33,36 +33,38 @@ function c(e = /* @__PURE__ */ new Date()) {
33
33
  function l(e, t) {
34
34
  return n(t) - n(e);
35
35
  }
36
- function u(e, t, r = "medium") {
37
- return g(new Intl.DateTimeFormat(t, {
38
- dateStyle: r,
39
- timeZone: "UTC"
40
- }).format(n(e) * 864e5));
36
+ var u = (e, t) => new Intl.DateTimeFormat(e, t === "day" ? {
37
+ day: "numeric",
38
+ month: "short",
39
+ timeZone: "UTC"
40
+ } : {
41
+ dateStyle: t,
42
+ timeZone: "UTC"
43
+ });
44
+ function d(e, t, r = "medium") {
45
+ return _(u(t, r).format(n(e) * 864e5));
41
46
  }
42
- function d(e, t = "short") {
47
+ function f(e, t = "short") {
43
48
  let n = new Intl.DateTimeFormat(e, {
44
49
  weekday: t,
45
50
  timeZone: "UTC"
46
51
  });
47
52
  return Array.from({ length: 7 }, (e, t) => n.format(Date.UTC(2023, 0, 1 + t)));
48
53
  }
49
- var f = new Set("AG AS BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW".split(" ")), p = new Set("AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".split(" "));
50
- function m(e) {
54
+ var p = new Set("AG AS BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW".split(" ")), m = new Set("AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".split(" "));
55
+ function h(e) {
51
56
  try {
52
57
  let t = new Intl.Locale(e), n = t.getWeekInfo?.() ?? t.weekInfo;
53
58
  if (n) return n.firstDay % 7;
54
59
  let r = t.maximize().region ?? "";
55
- return f.has(r) ? 0 : p.has(r) ? 6 : 1;
60
+ return p.has(r) ? 0 : m.has(r) ? 6 : 1;
56
61
  } catch {
57
62
  return 1;
58
63
  }
59
64
  }
60
- function h(e, t, r, i = "medium") {
61
- return g(new Intl.DateTimeFormat(r, {
62
- dateStyle: i,
63
- timeZone: "UTC"
64
- }).formatRange(n(e) * 864e5, n(t) * 864e5));
65
+ function g(e, t, r, i = "medium") {
66
+ return _(u(r, i).formatRange(n(e) * 864e5, n(t) * 864e5));
65
67
  }
66
- var g = (e) => e.replace(/[\u2009\u202f]/g, " ");
68
+ var _ = (e) => e.replace(/[\u2009\u202f]/g, " ");
67
69
  //#endregion
68
- export { i as addDays, a as addMonthsToDate, n as dayIndex, s as dayOfWeek, l as daysBetween, o as daysInMonth, u as formatDate, h as formatDateRange, r as fromDayIndex, t as isDate, c as today, m as weekStart, d as weekdayNames };
70
+ export { i as addDays, a as addMonthsToDate, n as dayIndex, s as dayOfWeek, l as daysBetween, o as daysInMonth, d as formatDate, g as formatDateRange, r as fromDayIndex, t as isDate, c as today, h as weekStart, f as weekdayNames };
@@ -1 +1 @@
1
- {"version":3,"file":"field-chevron.d.ts","sourceRoot":"","sources":["../../packages/utils/field-chevron.tsx"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAmBvF"}
1
+ {"version":3,"file":"field-chevron.d.ts","sourceRoot":"","sources":["../../packages/utils/field-chevron.tsx"],"names":[],"mappings":"AAIA,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAUvF"}
@@ -1,19 +1,10 @@
1
1
  "use client";
2
2
  import { cx as e } from "./cx.js";
3
- import { jsx as t } from "react/jsx-runtime";
3
+ import t from "../icons/micro/chevron-down.js";
4
+ import { jsx as n } from "react/jsx-runtime";
4
5
  //#region packages/utils/field-chevron.tsx
5
- function n({ open: n, className: r }) {
6
- return /* @__PURE__ */ t("svg", {
7
- viewBox: "0 0 16 16",
8
- fill: "none",
9
- stroke: "currentColor",
10
- strokeWidth: "1.6",
11
- strokeLinecap: "round",
12
- strokeLinejoin: "round",
13
- "aria-hidden": !0,
14
- className: e("text-muted-foreground size-4 shrink-0 transition-transform duration-300", n && "rotate-180", r),
15
- children: /* @__PURE__ */ t("path", { d: "m4 6 4 4 4-4" })
16
- });
6
+ function r({ open: r, className: i }) {
7
+ return /* @__PURE__ */ n(t, { className: e("text-muted-foreground size-4 shrink-0 transition-transform duration-300", r && "rotate-180", i) });
17
8
  }
18
9
  //#endregion
19
- export { n as FieldChevron };
10
+ export { r as FieldChevron };
@@ -1,4 +1,4 @@
1
- /** Small 16px status icons in the current text colour (toasts, field errors). */
1
+ /** Small status icons in the current text colour (toasts, field errors): Heroicons' micro set. */
2
2
  export declare function CheckIcon({ className }: {
3
3
  className?: string;
4
4
  }): import('react').JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"status-icons.d.ts","sourceRoot":"","sources":["../../packages/utils/status-icons.tsx"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAe9D;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAgB9D;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAe7D"}
1
+ {"version":3,"file":"status-icons.d.ts","sourceRoot":"","sources":["../../packages/utils/status-icons.tsx"],"names":[],"mappings":"AAMA,kGAAkG;AAClG,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE9D;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE9D;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE7D"}
@@ -1,48 +1,18 @@
1
1
  "use client";
2
2
  import { cx as e } from "./cx.js";
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import t from "../icons/micro/check.js";
4
+ import n from "../icons/micro/exclamation-triangle.js";
5
+ import r from "../icons/micro/information-circle.js";
6
+ import { jsx as i } from "react/jsx-runtime";
4
7
  //#region packages/utils/status-icons.tsx
5
- function r({ className: n }) {
6
- return /* @__PURE__ */ t("svg", {
7
- viewBox: "0 0 16 16",
8
- fill: "none",
9
- stroke: "currentColor",
10
- strokeWidth: "2",
11
- strokeLinecap: "round",
12
- strokeLinejoin: "round",
13
- className: e("size-3.5", n),
14
- "aria-hidden": !0,
15
- children: /* @__PURE__ */ t("path", { d: "m3.5 8.5 3 3 6-7" })
16
- });
8
+ function a({ className: n }) {
9
+ return /* @__PURE__ */ i(t, { className: e("size-3.5", n) });
17
10
  }
18
- function i({ className: r }) {
19
- return /* @__PURE__ */ n("svg", {
20
- viewBox: "0 0 16 16",
21
- fill: "none",
22
- stroke: "currentColor",
23
- strokeWidth: "1.8",
24
- strokeLinecap: "round",
25
- strokeLinejoin: "round",
26
- className: e("size-3.5", r),
27
- "aria-hidden": !0,
28
- children: [/* @__PURE__ */ t("path", { d: "M8 2.2 1.6 13.3h12.8L8 2.2Z" }), /* @__PURE__ */ t("path", { d: "M8 6.5v3M8 11.6v.1" })]
29
- });
11
+ function o({ className: t }) {
12
+ return /* @__PURE__ */ i(n, { className: e("size-3.5", t) });
30
13
  }
31
- function a({ className: r }) {
32
- return /* @__PURE__ */ n("svg", {
33
- viewBox: "0 0 16 16",
34
- fill: "none",
35
- stroke: "currentColor",
36
- strokeWidth: "1.8",
37
- strokeLinecap: "round",
38
- className: e("size-3.5", r),
39
- "aria-hidden": !0,
40
- children: [/* @__PURE__ */ t("circle", {
41
- cx: "8",
42
- cy: "8",
43
- r: "6.3"
44
- }), /* @__PURE__ */ t("path", { d: "M8 7.3v3.8M8 4.9v.1" })]
45
- });
14
+ function s({ className: t }) {
15
+ return /* @__PURE__ */ i(r, { className: e("size-3.5", t) });
46
16
  }
47
17
  //#endregion
48
- export { i as AlertIcon, r as CheckIcon, a as InfoIcon };
18
+ export { o as AlertIcon, a as CheckIcon, s as InfoIcon };
@@ -1,5 +1,10 @@
1
- /** Shared field look: faint glass, hairline border lit by the pointer, violet glow on focus. */
1
+ /** Shared field look: faint glass, a hairline in the glow colour (white would grey it out) lit by the pointer, violet glow on focus. */
2
2
  export declare const FIELD: string;
3
+ /** A picker's previous/next arrows (Calendar, MonthPicker). */
4
+ export declare const PICKER_NAV = "text-muted-foreground cursor-pointer hover:bg-tint/[0.07] hover:text-foreground focus-visible:ring-ring/50 grid size-8 place-items-center rounded-md outline-hidden transition-colors focus-visible:ring-2";
5
+ /** A month in a picker's month grid (Calendar, MonthPicker); add PICKER_MONTH_ON for the chosen one. */
6
+ export declare const PICKER_MONTH = "cursor-pointer rounded-lg py-2 text-sm outline-hidden transition-colors disabled:cursor-not-allowed disabled:opacity-35 focus-visible:ring-ring/50 focus-visible:ring-2 hover:bg-tint/[0.07]";
7
+ export declare const PICKER_MONTH_ON = "bg-primary text-primary-foreground hover:bg-primary";
3
8
  /** Glow a trigger carries while its popup is open. */
4
9
  export declare const TRIGGER_OPEN = "border-glow/60 [--glow-border-color:transparent] shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)]";
5
10
  /** Trigger for popup fields (dropdown): a field that glows while open. */
@@ -8,9 +13,10 @@ export declare const TRIGGER: string;
8
13
  export declare const POPUP = "glass glass-blur rounded-xl text-foreground shadow-[var(--popup-shadow),0_0_40px_-20px_oklch(var(--glow)/0.5)] outline-hidden";
9
14
  /** Pills (and TabList variant="pills"): a glass track… */
10
15
  export declare const PILL_TRACK = "glow-edge relative flex w-fit items-center gap-1 rounded-full border border-tint/5 bg-tint/[0.03] p-1";
11
- /** …a glowing pill that slides to the active item… */
16
+ /** …a glowing pill that slides to the active item (its look is repeated in theme.css, for before it's measured)… */
12
17
  export declare const PILL_INDICATOR = "absolute top-1 bottom-1 left-0 rounded-full bg-primary/15 shadow-[inset_0_0_0_1px_oklch(var(--glow)/0.35),0_0_24px_-4px_oklch(var(--glow)/0.6)] transition-[translate,width] duration-500 ease-[cubic-bezier(0.2,0.8,0.2,1)]";
13
- /** …and items that sit above it, lit when current (a link) or selected (a tab). */
18
+ /** …and items that sit above it, lit when current (a link) or selected (a tab). Only their text colour
19
+ * transitions: the pill they wear before the indicator is measured (theme.css) must go at once. */
14
20
  export declare const PILL: string;
15
21
  /**
16
22
  * For a wrapper whose child input takes focus (InputGroup): FIELD, lit by
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../packages/utils/styles.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,eAAO,MAAM,KAAK,QAKmC,CAAC;AAEtD,sDAAsD;AACtD,eAAO,MAAM,YAAY,qIAC6G,CAAC;AAEvI,0EAA0E;AAC1E,eAAO,MAAM,OAAO,QAAgF,CAAC;AAErG,oEAAoE;AACpE,eAAO,MAAM,KAAK,kIACiH,CAAC;AAEpI,0DAA0D;AAC1D,eAAO,MAAM,UAAU,0GACoF,CAAC;AAE5G,sDAAsD;AACtD,eAAO,MAAM,cAAc,iOACuM,CAAC;AAEnO,mFAAmF;AACnF,eAAO,MAAM,IAAI,QAEkG,CAAC;AAEpH;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAK4B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../packages/utils/styles.ts"],"names":[],"mappings":"AAEA,wIAAwI;AACxI,eAAO,MAAM,KAAK,QAKmC,CAAC;AAEtD,+DAA+D;AAC/D,eAAO,MAAM,UAAU,+MACyL,CAAC;AAEjN,wGAAwG;AACxG,eAAO,MAAM,YAAY,iMACyK,CAAC;AACnM,eAAO,MAAM,eAAe,wDAAwD,CAAC;AAErF,sDAAsD;AACtD,eAAO,MAAM,YAAY,qIAC6G,CAAC;AAEvI,0EAA0E;AAC1E,eAAO,MAAM,OAAO,QAA+F,CAAC;AAEpH,oEAAoE;AACpE,eAAO,MAAM,KAAK,kIACiH,CAAC;AAEpI,0DAA0D;AAC1D,eAAO,MAAM,UAAU,0GACoF,CAAC;AAE5G,oHAAoH;AACpH,eAAO,MAAM,cAAc,iOACuM,CAAC;AAEnO;mGACmG;AACnG,eAAO,MAAM,IAAI,QAEkG,CAAC;AAEpH;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAK4B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { cx as e } from "./cx.js";
3
3
  //#region packages/utils/styles.ts
4
- var t = "glow-border h-10 rounded-lg border [--glow-border-color:oklch(var(--tint)/0.1)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-muted-foreground hover:[--glow-border-color:oklch(var(--tint)/0.2)] focus-visible:border-glow/60 focus-visible:[--glow-border-color:transparent] focus-visible:bg-tint/[0.05] focus-visible:shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)] focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50", n = "border-glow/60 [--glow-border-color:transparent] shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)]", r = e(t, "inline-flex items-center justify-between gap-2 whitespace-nowrap"), i = "glass glass-blur rounded-xl text-foreground shadow-[var(--popup-shadow),0_0_40px_-20px_oklch(var(--glow)/0.5)] outline-hidden", a = "glow-edge relative flex w-fit items-center gap-1 rounded-full border border-tint/5 bg-tint/[0.03] p-1", o = "absolute top-1 bottom-1 left-0 rounded-full bg-primary/15 shadow-[inset_0_0_0_1px_oklch(var(--glow)/0.35),0_0_24px_-4px_oklch(var(--glow)/0.6)] transition-[translate,width] duration-500 ease-[cubic-bezier(0.2,0.8,0.2,1)]", s = "relative z-10 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap outline-hidden transition-colors duration-300 select-none focus-visible:ring-2 focus-visible:ring-ring/40 text-muted-foreground hover:text-foreground aria-[current=page]:text-foreground aria-selected:text-foreground", c = "glow-border flex w-full items-center gap-1.5 h-10 rounded-lg border [--glow-border-color:oklch(var(--tint)/0.1)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-muted-foreground hover:[--glow-border-color:oklch(var(--tint)/0.2)] focus-within:border-glow/60 focus-within:[--glow-border-color:transparent] focus-within:bg-tint/[0.05] focus-within:shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)] focus-within:outline-hidden disabled:cursor-not-allowed disabled:opacity-50";
4
+ var t = "glow-border h-10 rounded-lg border [--glow-border-color:oklch(var(--glow)/0.22)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-muted-foreground hover:[--glow-border-color:oklch(var(--glow)/0.4)] focus-visible:border-glow/60 focus-visible:[--glow-border-color:transparent] focus-visible:bg-tint/[0.05] focus-visible:shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)] focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50", n = "text-muted-foreground cursor-pointer hover:bg-tint/[0.07] hover:text-foreground focus-visible:ring-ring/50 grid size-8 place-items-center rounded-md outline-hidden transition-colors focus-visible:ring-2", r = "cursor-pointer rounded-lg py-2 text-sm outline-hidden transition-colors disabled:cursor-not-allowed disabled:opacity-35 focus-visible:ring-ring/50 focus-visible:ring-2 hover:bg-tint/[0.07]", i = "bg-primary text-primary-foreground hover:bg-primary", a = "border-glow/60 [--glow-border-color:transparent] shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)]", o = e(t, "inline-flex cursor-pointer items-center justify-between gap-2 whitespace-nowrap"), s = "glass glass-blur rounded-xl text-foreground shadow-[var(--popup-shadow),0_0_40px_-20px_oklch(var(--glow)/0.5)] outline-hidden", c = "glow-edge relative flex w-fit items-center gap-1 rounded-full border border-tint/5 bg-tint/[0.03] p-1", l = "absolute top-1 bottom-1 left-0 rounded-full bg-primary/15 shadow-[inset_0_0_0_1px_oklch(var(--glow)/0.35),0_0_24px_-4px_oklch(var(--glow)/0.6)] transition-[translate,width] duration-500 ease-[cubic-bezier(0.2,0.8,0.2,1)]", u = "relative z-10 cursor-pointer disabled:cursor-not-allowed rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap outline-hidden transition-[color] duration-300 select-none focus-visible:ring-2 focus-visible:ring-ring/40 text-muted-foreground hover:text-foreground aria-[current=page]:text-foreground aria-selected:text-foreground", d = "glow-border flex w-full items-center gap-1.5 h-10 rounded-lg border [--glow-border-color:oklch(var(--glow)/0.22)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-muted-foreground hover:[--glow-border-color:oklch(var(--glow)/0.4)] focus-within:border-glow/60 focus-within:[--glow-border-color:transparent] focus-within:bg-tint/[0.05] focus-within:shadow-[0_0_0_3px_oklch(var(--glow)/0.16),0_0_24px_-6px_oklch(var(--glow)/0.6)] focus-within:outline-hidden disabled:cursor-not-allowed disabled:opacity-50";
5
5
  //#endregion
6
- export { t as FIELD, c as FIELD_WITHIN, s as PILL, o as PILL_INDICATOR, a as PILL_TRACK, i as POPUP, r as TRIGGER, n as TRIGGER_OPEN };
6
+ export { t as FIELD, d as FIELD_WITHIN, r as PICKER_MONTH, i as PICKER_MONTH_ON, n as PICKER_NAV, u as PILL, l as PILL_INDICATOR, c as PILL_TRACK, s as POPUP, o as TRIGGER, a as TRIGGER_OPEN };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Gets the water ready before a switch, e.g. when the pointer or focus reaches
3
+ * the button: its shader is compiled and drawn once, off the page. The GPU
4
+ * driver otherwise finishes that work on the first frame of the first switch,
5
+ * which then hitches.
6
+ */
7
+ export declare function prepareThemeWave(): void;
8
+ /**
9
+ * Changes the theme (`change` swaps the classes or variables) like a drop
10
+ * falling into water at `from` (an element's centre, or a point; the centre
11
+ * by default). The water fills the page or, for a theme on one element (a
12
+ * panel, a preview: `target`, the element whose classes or variables
13
+ * `change` swaps), just that element. Into a light theme, the new theme spreads in a wavy
14
+ * ring; into a dark one, the old theme is pulled into the point. Ripples trail the ring's edge, glinting in the
15
+ * theme's glow colours, and the edge shimmers like a soap film. The water is
16
+ * drawn on the GPU, over the page, which itself doesn't bend. Without a GPU
17
+ * (lite graphics, or no WebGL), without view transitions, or with reduced
18
+ * motion (the OS setting or html.reduce-motion), the theme just changes: drawn
19
+ * on the CPU, even a plain full-screen circle stutters. Call prepareThemeWave
20
+ * when the pointer or focus reaches the switch, so the first switch is smooth.
21
+ */
22
+ export declare function themeWave(change: () => void, from?: Element | {
23
+ x: number;
24
+ y: number;
25
+ } | null, target?: Element | null): void;
26
+ //# sourceMappingURL=theme-wave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-wave.d.ts","sourceRoot":"","sources":["../../packages/utils/theme-wave.ts"],"names":[],"mappings":"AA6NA;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACrB,MAAM,EAAE,MAAM,IAAI,EAClB,IAAI,CAAC,EAAE,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,EAChD,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GACxB,IAAI,CAqJN"}