@rinzai/zen 0.7.3 → 0.8.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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/badge/index.js +2 -2
  3. package/dist/base.css +3 -2
  4. package/dist/button/index.js +2 -2
  5. package/dist/calendar/index.js +1 -1
  6. package/dist/card/index.js +2 -2
  7. package/dist/chart/donut.d.ts +4 -2
  8. package/dist/chart/donut.d.ts.map +1 -1
  9. package/dist/chart/donut.js +61 -49
  10. package/dist/chart/index.js +1 -1
  11. package/dist/checkbox/index.js +2 -2
  12. package/dist/code-block/index.js +1 -1
  13. package/dist/combobox/index.d.ts.map +1 -1
  14. package/dist/combobox/index.js +86 -86
  15. package/dist/date-picker/index.js +2 -2
  16. package/dist/dialog/index.js +2 -2
  17. package/dist/disclosure/index.d.ts.map +1 -1
  18. package/dist/disclosure/index.js +3 -3
  19. package/dist/input/index.d.ts.map +1 -1
  20. package/dist/input/index.js +1 -1
  21. package/dist/input-group/index.js +1 -1
  22. package/dist/meter/index.js +1 -1
  23. package/dist/month-picker/index.d.ts.map +1 -1
  24. package/dist/month-picker/index.js +49 -49
  25. package/dist/page-header/index.js +1 -1
  26. package/dist/progress-ring/index.js +1 -1
  27. package/dist/radio-group/index.js +2 -2
  28. package/dist/segmented/index.js +1 -1
  29. package/dist/select/index.js +2 -2
  30. package/dist/side-nav/index.d.ts.map +1 -1
  31. package/dist/side-nav/index.js +1 -1
  32. package/dist/slider/index.js +1 -1
  33. package/dist/status-pill/index.js +2 -2
  34. package/dist/tab-bar/index.js +1 -1
  35. package/dist/table-of-contents/index.js +1 -1
  36. package/dist/textarea/index.d.ts.map +1 -1
  37. package/dist/textarea/index.js +1 -1
  38. package/dist/theme.css +50 -6
  39. package/dist/toast/index.js +5 -5
  40. package/dist/toggle/index.js +2 -2
  41. package/dist/tree/index.d.ts.map +1 -1
  42. package/dist/tree/index.js +1 -1
  43. package/dist/utils/field-chevron.js +1 -1
  44. package/dist/utils/styles.d.ts +9 -3
  45. package/dist/utils/styles.d.ts.map +1 -1
  46. package/dist/utils/styles.js +2 -2
  47. package/dist/utils/theme-wave.d.ts.map +1 -1
  48. package/dist/utils/theme-wave.js +5 -4
  49. package/dist/utils/theme.d.ts.map +1 -1
  50. package/dist/utils/theme.js +9 -6
  51. package/dist/variables.css +22 -1
  52. package/dist/zen.css +1 -1
  53. package/package.json +13 -24
package/README.md CHANGED
@@ -35,7 +35,7 @@ Zen never styles your own elements. For its page setup (the background showing t
35
35
  @import '@rinzai/zen/base.css';
36
36
  ```
37
37
 
38
- The look is set in [Inter](https://rsms.me/inter/); load it however you like.
38
+ The look is set in [Geist](https://vercel.com/font); load it however you like.
39
39
 
40
40
  ## Usage
41
41
 
@@ -11,11 +11,11 @@ function n({ variant: e, className: n, ...i }) {
11
11
  })
12
12
  });
13
13
  }
14
- var r = e("zen__badge inline-flex items-center rounded-md border px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wider uppercase whitespace-nowrap focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-glow/50", {
14
+ var r = e("zen__badge inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-glow/50", {
15
15
  variants: { variant: {
16
16
  default: "border-glow/30 bg-glow/10 text-primary",
17
17
  secondary: "border-tint/10 bg-tint/[0.06] text-foreground",
18
- destructive: "border-destructive/40 bg-destructive/15 text-destructive",
18
+ destructive: "border-destructive/40 bg-destructive/10 text-destructive",
19
19
  outline: "border-tint/10 text-foreground"
20
20
  } },
21
21
  defaultVariants: { variant: "default" }
package/dist/base.css CHANGED
@@ -14,8 +14,7 @@
14
14
  /* Transparent: an opaque body would paint over the z-index −1 <Backdrop>. */
15
15
  background: transparent;
16
16
  color: oklch(var(--foreground));
17
- font-family: 'Inter Variable', Inter, ui-sans-serif, system-ui, sans-serif;
18
- font-feature-settings: 'cv11', 'ss01';
17
+ font-family: 'Geist Variable', Geist, ui-sans-serif, system-ui, sans-serif;
19
18
  -webkit-font-smoothing: antialiased;
20
19
  -moz-osx-font-smoothing: grayscale;
21
20
  }
@@ -33,6 +32,8 @@
33
32
  h5,
34
33
  h6 {
35
34
  font-weight: 600;
35
+ /* Lines of even length, so a heading never leaves one word on its last line. */
36
+ text-wrap: balance;
36
37
  }
37
38
  h1,
38
39
  h2,
@@ -31,11 +31,11 @@ function a({ className: t, variant: a, size: s, tone: c, loading: l = !1, disabl
31
31
  var o = t("zen__button inline-flex cursor-pointer items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-hidden select-none transition-[background-color,border-color,box-shadow,color,transform] duration-200 ease-out active:scale-[0.97] focus-visible:ring-2 focus-visible:ring-glow/50 disabled:pointer-events-none disabled:opacity-50", {
32
32
  variants: {
33
33
  variant: {
34
- default: "bg-primary bg-[linear-gradient(to_bottom,oklch(1_0_0/0.16),transparent)] text-primary-foreground shadow-[0_0_0_1px_oklch(var(--glow)/0.55),0_0_22px_-6px_oklch(var(--glow)/0.7),inset_0_1px_0_hsl(0_0%_100%/0.3)] hover:shadow-[0_0_0_1px_oklch(var(--glow)/0.8),0_0_28px_-4px_oklch(var(--glow)/0.85),inset_0_1px_0_hsl(0_0%_100%/0.35)]",
34
+ default: "bg-primary bg-[linear-gradient(to_bottom,oklch(1_0_0/0.16),transparent)] text-primary-foreground shadow-[0_0_0_1px_oklch(var(--glow)/0.55),0_0_22px_-6px_oklch(var(--glow)/calc(0.7*var(--glow-k))),inset_0_1px_0_hsl(0_0%_100%/0.3)] hover:shadow-[0_0_0_1px_oklch(var(--glow)/0.8),0_0_28px_-4px_oklch(var(--glow)/calc(0.85*var(--glow-k))),inset_0_1px_0_hsl(0_0%_100%/0.35)]",
35
35
  secondary: "bg-primary/15 text-foreground shadow-[inset_0_0_0_1px_oklch(var(--primary)/0.25)] hover:bg-primary/25",
36
36
  outline: "glow-edge border border-tint/10 bg-tint/[0.03] text-foreground hover:border-tint/20 hover:bg-tint/[0.07]",
37
37
  ghost: "text-muted-foreground hover:bg-tint/[0.06] hover:text-foreground",
38
- destructive: "bg-destructive/90 text-destructive-foreground shadow-[0_0_0_1px_oklch(var(--destructive)/0.6),0_0_22px_-8px_oklch(var(--destructive)/0.7)] hover:bg-destructive",
38
+ destructive: "bg-destructive/90 text-destructive-foreground shadow-[0_0_0_1px_oklch(var(--destructive)/0.6),0_0_22px_-8px_oklch(var(--destructive)/calc(0.7*var(--glow-k)))] hover:bg-destructive",
39
39
  link: "inline-block h-auto! max-w-full truncate rounded-sm px-0! text-left align-bottom text-[length:inherit] text-primary underline-offset-4 hover:underline active:scale-100",
40
40
  icon: "text-muted-foreground hover:bg-tint/[0.06] hover:text-foreground"
41
41
  },
@@ -146,7 +146,7 @@ function x(x) {
146
146
  F(o), Y && L(o);
147
147
  },
148
148
  onMouseEnter: () => Y && L(o),
149
- className: e(ne, !u && "text-muted-foreground/45", h && "cursor-not-allowed opacity-35", m ? "bg-primary text-primary-foreground shadow-[0_0_20px_-4px_oklch(var(--glow)/0.8)]" : !h && "hover:bg-tint/[0.08]", o === j && "after:bg-primary after:absolute after:bottom-1 after:left-1/2 after:size-1 after:-translate-x-1/2 after:rounded-full", o === j && m && "after:bg-primary-foreground"),
149
+ className: e(ne, !u && "text-muted-foreground", h && "cursor-not-allowed opacity-35", m ? "bg-primary text-primary-foreground shadow-[0_0_20px_-4px_oklch(var(--glow)/calc(0.8*var(--glow-k)))]" : !h && "hover:bg-tint/[0.08]", o === j && "after:bg-primary after:absolute after:bottom-1 after:left-1/2 after:size-1 after:-translate-x-1/2 after:rounded-full", o === j && m && "after:bg-primary-foreground"),
150
150
  children: Number(o.slice(8))
151
151
  })
152
152
  }, o);
@@ -24,7 +24,7 @@ function o({ className: t, ...r }) {
24
24
  function s({ asChild: r, className: i, children: a, ...o }) {
25
25
  let s = {
26
26
  ...o,
27
- className: e("text-base font-semibold tracking-tight", i)
27
+ className: e("text-base font-semibold tracking-tight text-balance", i)
28
28
  };
29
29
  return n(r ? t : "h4", {
30
30
  ...s,
@@ -36,7 +36,7 @@ function c({ label: t, value: i, hint: a, tone: o = "default", className: s }) {
36
36
  className: e("zen__stat glass glow-edge flex flex-col gap-1 rounded-xl p-3.5 md:p-4", s),
37
37
  children: [
38
38
  /* @__PURE__ */ n("span", {
39
- className: "text-muted-foreground truncate text-[0.68rem] tracking-[0.1em] uppercase sm:text-xs",
39
+ className: "text-muted-foreground text-2xs truncate tracking-widest uppercase sm:text-xs",
40
40
  children: t
41
41
  }),
42
42
  /* @__PURE__ */ n("span", {
@@ -4,8 +4,10 @@ import { ChartPalette } from './palette';
4
4
  * A ring of parts of a whole (e.g. spending by category), with your content in
5
5
  * the middle (e.g. the total). Segments are parted by a small gap, with
6
6
  * rounded corners; pointing at one (or focusing it) lifts it and shows its
7
- * value. Best for a handful of parts: past about six, use bars. Colours default
8
- * to the chart palette in order.
7
+ * value. A part too small to show at its share is drawn as a pill, the
8
+ * narrowest segment, taking the room from the larger parts in proportion. Best
9
+ * for a handful of parts: past about six, use bars. Colours default to the
10
+ * chart palette in order.
9
11
  */
10
12
  export default function DonutChart({ items, label, size, thickness, palette, formatValue, children, className, }: DonutChartProps): import('react').JSX.Element;
11
13
  export interface DonutChartProps {
@@ -1 +1 @@
1
- {"version":3,"file":"donut.d.ts","sourceRoot":"","sources":["../../packages/chart/donut.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAqC,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,WAAW,CAAC;AAG5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,IAAU,EACV,SAAgB,EAChB,OAAiB,EACjB,WAAoB,EACpB,QAAQ,EACR,SAAS,GACZ,EAAE,eAAe,+BAiIjB;AA8CD,MAAM,WAAW,eAAe;IAC5B,0DAA0D;IAC1D,KAAK,EA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CAAC;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,qHAAqH;IACrH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -5,24 +5,28 @@ import { ChartTooltipCard as n } from "./tooltip.js";
5
5
  import { useLayoutEffect as r, useRef as i, useState as a } from "react";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  //#region packages/chart/donut.tsx
8
- function c({ items: c, label: u, size: p = 200, thickness: m = .32, palette: h = "chart", formatValue: g = String, children: _, className: v }) {
9
- let [y, b] = a(null), x = c.reduce((e, t) => e + Math.max(0, t.value), 0), S = p / 2, C = S * (1 - m), w = Math.min(4, (S - C) / 4), T = c.filter((e) => e.value > 0).length > 1 ? 1.5 : 0, E = -Math.PI / 2, D = c.map((e, n) => {
10
- let r = x ? Math.max(0, e.value) / x * Math.PI * 2 : 0, i = {
11
- start: E,
12
- end: E + r,
13
- color: e.color ?? t(h, n, c.length)
8
+ function c({ items: c, label: d, size: h = 200, thickness: g = .32, palette: _ = "chart", formatValue: v = String, children: y, className: b }) {
9
+ let [x, S] = a(null), C = c.reduce((e, t) => e + Math.max(0, t.value), 0), w = h / 2, T = w * (1 - g), E = Math.min(4, (w - T) / 4), D = c.filter((e) => e.value > 0).length > 1 ? 1.5 : 0, [O, k, A] = [
10
+ T + E,
11
+ w - E,
12
+ D + E
13
+ ], j = u(c, 2 * f(A, k)), M = -Math.PI / 2, N = c.map((e, n) => {
14
+ let r = {
15
+ start: M,
16
+ end: M + j[n],
17
+ color: e.color ?? t(_, n, c.length)
14
18
  };
15
- return E += r, i;
16
- }), O = y === null ? null : c[y], k = y === null ? null : (D[y].start + D[y].end) / 2, A = i(null), j = i(null);
19
+ return M += j[n], r;
20
+ }), P = x === null ? null : c[x], F = x === null ? null : (N[x].start + N[x].end) / 2, I = i(null), L = i(null);
17
21
  return r(() => {
18
- let e = j.current;
19
- if (k === null || !e || !A.current) return;
22
+ let e = L.current;
23
+ if (F === null || !e || !I.current) return;
20
24
  try {
21
25
  e.showPopover?.();
22
26
  } catch {}
23
27
  let t = () => {
24
- let t = A.current.getBoundingClientRect(), n = t.left + S + Math.cos(k) * (S + 10), r = t.top + S + Math.sin(k) * (S + 10), i = e.offsetWidth, a = e.offsetHeight, o = (e, t) => Math.max(l, Math.min(e, t - l));
25
- e.style.left = `${o(Math.cos(k) >= 0 ? n : n - i, document.documentElement.clientWidth - i)}px`, e.style.top = `${o(r - a / 2, window.innerHeight - a)}px`;
28
+ let t = I.current.getBoundingClientRect(), n = t.left + w + Math.cos(F) * (w + 10), r = t.top + w + Math.sin(F) * (w + 10), i = e.offsetWidth, a = e.offsetHeight, o = (e, t) => Math.max(l, Math.min(e, t - l));
29
+ e.style.left = `${o(Math.cos(F) >= 0 ? n : n - i, document.documentElement.clientWidth - i)}px`, e.style.top = `${o(r - a / 2, window.innerHeight - a)}px`;
26
30
  };
27
31
  return t(), window.addEventListener("scroll", t, {
28
32
  passive: !0,
@@ -30,63 +34,62 @@ function c({ items: c, label: u, size: p = 200, thickness: m = .32, palette: h =
30
34
  }), window.addEventListener("resize", t, { passive: !0 }), () => {
31
35
  window.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t);
32
36
  };
33
- }, [k, S]), /* @__PURE__ */ s("div", {
34
- ref: A,
35
- className: e("zen__donut relative shrink-0", v),
37
+ }, [F, w]), /* @__PURE__ */ s("div", {
38
+ ref: I,
39
+ className: e("zen__donut relative shrink-0", b),
36
40
  style: {
37
- width: p,
38
- height: p
41
+ width: h,
42
+ height: h
39
43
  },
40
44
  children: [
41
45
  /* @__PURE__ */ o("svg", {
42
- width: p,
43
- height: p,
44
- viewBox: `${-S} ${-S} ${p} ${p}`,
46
+ width: h,
47
+ height: h,
48
+ viewBox: `${-w} ${-w} ${h} ${h}`,
45
49
  role: "list",
46
- "aria-label": u,
50
+ "aria-label": d,
47
51
  className: "overflow-visible",
48
- children: D.map((e, t) => {
49
- let n = e.end - e.start >= Math.PI * 2 - 1e-6, r = n ? f(C, S, e.start, e.end) : d(C + w, S - w, e.start, e.end, T + w);
50
- if (!r) return null;
51
- let i = (e.start + e.end) / 2, a = y === t && !n ? 4 : 0, s = x ? Math.round(c[t].value / x * 100) : 0;
52
+ children: N.map((e, t) => {
53
+ if (e.end === e.start) return null;
54
+ let n = e.end - e.start >= Math.PI * 2 - 1e-6, r = n ? m(T, w, e.start, e.end) : p(O, k, e.start, e.end, A), i = (e.start + e.end) / 2, a = x === t && !n ? 4 : 0, s = C ? Math.round(c[t].value / C * 100) : 0;
52
55
  return /* @__PURE__ */ o("path", {
53
56
  role: "listitem",
54
57
  tabIndex: 0,
55
- "aria-label": `${c[t].label}: ${g(c[t].value)} (${s}%)`,
58
+ "aria-label": `${c[t].label}: ${v(c[t].value)} (${s}%)`,
56
59
  d: r,
57
- strokeWidth: n ? 0 : w * 2,
60
+ strokeWidth: n ? 0 : E * 2,
58
61
  strokeLinejoin: "round",
59
- onPointerEnter: () => b(t),
60
- onPointerLeave: () => b(null),
61
- onFocus: () => b(t),
62
- onBlur: () => b(null),
62
+ onPointerEnter: () => S(t),
63
+ onPointerLeave: () => S(null),
64
+ onFocus: () => S(t),
65
+ onBlur: () => S(null),
63
66
  className: "zen__chart-fade focus-visible:outline-hidden",
64
67
  style: {
65
68
  fill: e.color,
66
69
  stroke: e.color,
67
- opacity: y !== null && y !== t ? .55 : 1,
70
+ opacity: x !== null && x !== t ? .55 : 1,
68
71
  transform: `translate(${Math.cos(i) * a}px, ${Math.sin(i) * a}px)`,
69
72
  transition: "transform 200ms ease-out, opacity 200ms",
70
73
  animationDelay: `${t * 60}ms`,
71
- filter: y === t ? `drop-shadow(0 0 10px ${e.color})` : void 0
74
+ filter: x === t ? `drop-shadow(0 0 10px ${e.color})` : void 0
72
75
  }
73
76
  }, c[t].key);
74
77
  })
75
78
  }),
76
- _ && /* @__PURE__ */ o("div", {
79
+ y && /* @__PURE__ */ o("div", {
77
80
  className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",
78
- children: _
81
+ children: y
79
82
  }),
80
- O && y !== null && /* @__PURE__ */ o("div", {
81
- ref: j,
83
+ P && x !== null && /* @__PURE__ */ o("div", {
84
+ ref: L,
82
85
  popover: "manual",
83
86
  className: "pointer-events-none fixed inset-auto m-0 overflow-visible border-0 bg-transparent p-0",
84
87
  children: /* @__PURE__ */ o(n, {
85
- title: O.label,
88
+ title: P.label,
86
89
  rows: [{
87
- label: `${x ? Math.round(O.value / x * 100) : 0}%`,
88
- value: g(O.value),
89
- color: D[y].color
90
+ label: `${C ? Math.round(P.value / C * 100) : 0}%`,
91
+ value: v(P.value),
92
+ color: N[x].color
90
93
  }]
91
94
  })
92
95
  })
@@ -95,23 +98,32 @@ function c({ items: c, label: u, size: p = 200, thickness: m = .32, palette: h =
95
98
  }
96
99
  var l = 8;
97
100
  function u(e, t) {
101
+ let n = Math.PI * 2, r = e.map((e) => e.value).filter((e) => e > 0), i = [...r].sort((e, t) => e - t), a = Math.min(t, n / r.length), o = r.reduce((e, t) => e + t, 0), s = 0, c = (e) => e / o * (n - s * a);
102
+ for (; s < i.length - 1 && c(i[s]) < a;) o -= i[s++];
103
+ return e.map((e) => e.value > 0 ? Math.max(a, c(e.value)) : 0);
104
+ }
105
+ function d(e, t) {
98
106
  let n = (e) => Math.round(e * 1e3) / 1e3;
99
107
  return `${n(e * Math.cos(t))},${n(e * Math.sin(t))}`;
100
108
  }
101
- function d(e, t, n, r, i) {
102
- let a = (e) => Math.asin(Math.min(1, i / e)), [o, s] = [n + a(t), r - a(t)];
103
- if (s <= o) return "";
104
- let [c, l] = [n + a(e), r - a(e)];
105
- return l < c && (c = l = (n + r) / 2), `${`M${u(t, o)}A${t},${t} 0 ${+(s - o > Math.PI)} 1 ${u(t, s)}`}${l > c ? `L${u(e, l)}A${e},${e} 0 ${+(l - c > Math.PI)} 0 ${u(e, c)}` : `L${u(e, c)}`}Z`;
109
+ function f(e, t) {
110
+ return t > e ? Math.asin(e / t) : Math.PI / 2;
111
+ }
112
+ function p(e, t, n, r, i) {
113
+ let a = (e) => {
114
+ let [t, a] = [n + f(i, e), r - f(i, e)];
115
+ return a < t ? [(n + r) / 2, (n + r) / 2] : [t, a];
116
+ }, [o, s] = a(t), [c, l] = a(e), u = (e, t, n, r) => t === n ? "" : `A${e},${e} 0 ${+(Math.abs(n - t) > Math.PI)} ${r} ${d(e, n)}`;
117
+ return `M${d(t, o)}${u(t, o, s, 1)}L${d(e, l)}${u(e, l, c, 0)}Z`;
106
118
  }
107
- function f(e, t, n, r) {
119
+ function m(e, t, n, r) {
108
120
  if (r <= n) return "";
109
121
  let i = +(r - n > Math.PI);
110
122
  if (r - n >= Math.PI * 2 - 1e-6) {
111
123
  let r = n + Math.PI;
112
- return `M${u(t, n)}A${t},${t} 0 1 1 ${u(t, r)}A${t},${t} 0 1 1 ${u(t, n)}M${u(e, n)}A${e},${e} 0 1 0 ${u(e, r)}A${e},${e} 0 1 0 ${u(e, n)}Z`;
124
+ return `M${d(t, n)}A${t},${t} 0 1 1 ${d(t, r)}A${t},${t} 0 1 1 ${d(t, n)}M${d(e, n)}A${e},${e} 0 1 0 ${d(e, r)}A${e},${e} 0 1 0 ${d(e, n)}Z`;
113
125
  }
114
- return `M${u(t, n)}A${t},${t} 0 ${i} 1 ${u(t, r)}L${u(e, r)}A${e},${e} 0 ${i} 0 ${u(e, n)}Z`;
126
+ return `M${d(t, n)}A${t},${t} 0 ${i} 1 ${d(t, r)}L${d(e, r)}A${e},${e} 0 ${i} 0 ${d(e, n)}Z`;
115
127
  }
116
128
  //#endregion
117
129
  export { c as default };
@@ -270,7 +270,7 @@ function x({ data: r, x: i, label: s, summary: h, height: g = 240, formatX: _ =
270
270
  })
271
271
  ]
272
272
  }), Q && L !== null && /* @__PURE__ */ p("div", {
273
- className: "pointer-events-none absolute top-0 z-10 transition-[translate] duration-75",
273
+ className: "zen__chart-tooltip pointer-events-none absolute top-0 z-10 transition-[translate] duration-75",
274
274
  style: w($, me, I, g),
275
275
  children: A ? A(Q, L) : /* @__PURE__ */ p(n, {
276
276
  title: (D ?? _)(Q[i]),
@@ -21,9 +21,9 @@ function c({ children: c, description: l, indeterminate: u = !1, onChange: d, cl
21
21
  ...h,
22
22
  "aria-checked": u ? "mixed" : void 0,
23
23
  onChange: (e) => d?.(e.target.checked),
24
- className: e("peer border-tint/20 bg-tint/[0.04] m-0 size-full cursor-pointer appearance-none rounded-[5px] border", "outline-hidden transition-[background-color,border-color,box-shadow] duration-200", "hover:enabled:border-tint/35 focus-visible:ring-ring/50 focus-visible:ring-2", "checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary", "checked:shadow-[0_0_14px_-2px_oklch(var(--glow)/0.8)] indeterminate:shadow-[0_0_14px_-2px_oklch(var(--glow)/0.8)]", "aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50")
24
+ className: e("peer bg-tint/[0.04] m-0 size-full cursor-pointer appearance-none rounded-[5px] border border-[color:oklch(var(--tint)/var(--zen-control-edge))]", "outline-hidden transition-[background-color,border-color,box-shadow] duration-200", "focus-visible:ring-ring/50 focus-visible:ring-2 hover:enabled:border-[color:oklch(var(--tint)/var(--zen-control-edge-hover))]", "checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary", "checked:shadow-[0_0_14px_-2px_oklch(var(--glow)/calc(0.8*var(--glow-k)))] indeterminate:shadow-[0_0_14px_-2px_oklch(var(--glow)/calc(0.8*var(--glow-k)))]", "aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50")
25
25
  }),
26
- /* @__PURE__ */ o(t, { className: "text-primary-foreground pointer-events-none absolute size-3.5 opacity-0 transition-[opacity,clip-path] duration-300 ease-out [clip-path:inset(0_100%_0_0)] peer-checked:opacity-100 peer-checked:[clip-path:inset(0)] peer-indeterminate:hidden" }),
26
+ /* @__PURE__ */ o(t, { className: "zen__checkbox-check text-primary-foreground pointer-events-none absolute size-3.5 opacity-0 transition-[opacity,clip-path] duration-300 ease-out [clip-path:inset(0_100%_0_0)] peer-checked:opacity-100 peer-checked:[clip-path:inset(0)] peer-indeterminate:hidden" }),
27
27
  /* @__PURE__ */ o(r, { className: "text-primary-foreground pointer-events-none absolute hidden size-3.5 peer-indeterminate:block" })
28
28
  ]
29
29
  });
@@ -27,7 +27,7 @@ function a({ code: a, language: o, highlight: s, copyable: c = !0, variant: l =
27
27
  onClick: async () => {
28
28
  await navigator.clipboard?.writeText(f), m(!0);
29
29
  },
30
- className: e("text-muted-foreground hover:bg-tint/[0.07] hover:text-foreground focus-visible:ring-ring/50 absolute top-2.5 right-2.5 cursor-pointer rounded-lg px-2.5 py-1 text-xs font-medium outline-hidden transition-[opacity,background-color,color] focus-visible:ring-2", "opacity-0 group-hover:opacity-100 focus-visible:opacity-100", p && "text-primary opacity-100"),
30
+ className: e("zen__code-copy text-muted-foreground hover:bg-tint/[0.07] hover:text-foreground focus-visible:ring-ring/50 absolute top-2.5 right-2.5 cursor-pointer rounded-lg px-2.5 py-1 text-xs font-medium outline-hidden transition-[opacity,background-color,color] focus-visible:ring-2", "opacity-0 group-hover:opacity-100 focus-visible:opacity-100", p && "text-primary opacity-100"),
31
31
  children: p ? "Copied" : "Copy"
32
32
  })]
33
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/combobox/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEH,cAAc,EAGd,SAAS,EAOZ,MAAM,OAAO,CAAC;AAkCf;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,+BAiE1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC5B,WAA8B,EAC9B,QAAQ,EACR,SAAS,EACT,K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