@rinzai/zen 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './icons';
6
6
  export { default as Input } from './input';
7
7
  export { default as Popover } from './popover';
8
8
  export { default as Toggle } from './toggle';
9
+ export { default as TextArea } from './textarea';
9
10
  export { cva, type VariantProps } from './utils/cva';
10
11
  export { cx } from './utils/cx';
11
12
  declare module 'react' {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,OAAO,CAAC;IACnB,UAAU,aAAa;QACnB,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;KACzC;CACJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,OAAO,CAAC;IACnB,UAAU,aAAa;QACnB,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;KACzC;CACJ"}
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ export default function Input(props: TextAreaProps): import("react/jsx-runtime").JSX.Element;
3
+ export type TextAreaProps = ComponentProps<'textarea'>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,aAAa,2CAejD;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC"}
package/dist/zen.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as b, jsxs as W, Fragment as Ve } from "react/jsx-runtime";
1
+ import { jsx as y, jsxs as W, Fragment as Ve } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
3
  import { useLayoutEffect as ot, useEffect as re, useState as de, useId as it, useMemo as ve, useRef as Ee } from "react";
4
4
  import * as st from "react-dom";
@@ -31,7 +31,7 @@ const M = (...e) => e.reduce((o, t) => t == null || t === !1 ? o : typeof t == "
31
31
  return M(e, s, l, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
32
32
  };
33
33
  function Be({ variant: e, className: o, ...t }) {
34
- return /* @__PURE__ */ b("span", { ...t, className: ct({ variant: e, className: o }) });
34
+ return /* @__PURE__ */ y("span", { ...t, className: ct({ variant: e, className: o }) });
35
35
  }
36
36
  const ct = We(
37
37
  "zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
@@ -50,7 +50,7 @@ const ct = We(
50
50
  }
51
51
  );
52
52
  function at({ className: e, variant: o, size: t, ...n }) {
53
- return /* @__PURE__ */ b("button", { className: ut({ variant: o, size: t, className: e }), ...n });
53
+ return /* @__PURE__ */ y("button", { className: ut({ variant: o, size: t, className: e }), ...n });
54
54
  }
55
55
  const ut = We(
56
56
  "zen__button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
@@ -230,7 +230,7 @@ function ze(e, o, t) {
230
230
  }
231
231
  return f;
232
232
  }
233
- const yt = async (e, o, t) => {
233
+ const bt = async (e, o, t) => {
234
234
  const {
235
235
  placement: n = "bottom",
236
236
  strategy: i = "absolute",
@@ -253,7 +253,7 @@ const yt = async (e, o, t) => {
253
253
  x: p,
254
254
  y: v,
255
255
  data: E,
256
- reset: y
256
+ reset: b
257
257
  } = await m({
258
258
  x: u,
259
259
  y: d,
@@ -274,11 +274,11 @@ const yt = async (e, o, t) => {
274
274
  ...f[w],
275
275
  ...E
276
276
  }
277
- }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (h = y.placement), y.rects && (c = y.rects === !0 ? await r.getElementRects({
277
+ }, b && g <= 50 && (g++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
278
278
  reference: e,
279
279
  floating: o,
280
280
  strategy: i
281
- }) : y.rects), {
281
+ }) : b.rects), {
282
282
  x: u,
283
283
  y: d
284
284
  } = ze(c, h, a)), x = -1);
@@ -323,20 +323,20 @@ async function Ue(e, o) {
323
323
  } : {
324
324
  x: 1,
325
325
  y: 1
326
- }, y = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
326
+ }, b = ue(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
327
327
  elements: l,
328
328
  rect: p,
329
329
  offsetParent: v,
330
330
  strategy: a
331
331
  }) : p);
332
332
  return {
333
- top: (m.top - y.top + g.top) / E.y,
334
- bottom: (y.bottom - m.bottom + g.bottom) / E.y,
335
- left: (m.left - y.left + g.left) / E.x,
336
- right: (y.right - m.right + g.right) / E.x
333
+ top: (m.top - b.top + g.top) / E.y,
334
+ bottom: (b.bottom - m.bottom + g.bottom) / E.y,
335
+ left: (m.left - b.left + g.left) / E.x,
336
+ right: (b.right - m.right + g.right) / E.x
337
337
  };
338
338
  }
339
- const bt = function(e) {
339
+ const yt = function(e) {
340
340
  return e === void 0 && (e = {}), {
341
341
  name: "flip",
342
342
  options: e,
@@ -360,9 +360,9 @@ const bt = function(e) {
360
360
  } = he(e, o);
361
361
  if ((t = s.arrow) != null && t.alignmentOffset)
362
362
  return {};
363
- const m = U(i), p = G(l), v = U(l) === l, E = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = h || (v || !x ? [ae(l)] : mt(l)), R = g !== "none";
364
- !h && R && y.push(...pt(l, x, g, E));
365
- const O = [l, ...y], z = await Ue(o, w), K = [];
363
+ const m = U(i), p = G(l), v = U(l) === l, E = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = h || (v || !x ? [ae(l)] : mt(l)), R = g !== "none";
364
+ !h && R && b.push(...pt(l, x, g, E));
365
+ const O = [l, ...b], z = await Ue(o, w), K = [];
366
366
  let P = ((n = s.flip) == null ? void 0 : n.overflows) || [];
367
367
  if (u && K.push(z[m]), d) {
368
368
  const N = ht(i, r, E);
@@ -937,7 +937,7 @@ function Wt(e, o) {
937
937
  threshold: H(0, le(1, a)) || 1
938
938
  };
939
939
  let E = !0;
940
- function y(R) {
940
+ function b(R) {
941
941
  const O = R[0].intersectionRatio;
942
942
  if (O !== a) {
943
943
  if (!E)
@@ -949,13 +949,13 @@ function Wt(e, o) {
949
949
  O === 1 && !Qe(c, e.getBoundingClientRect()) && r(), E = !1;
950
950
  }
951
951
  try {
952
- t = new IntersectionObserver(y, {
952
+ t = new IntersectionObserver(b, {
953
953
  ...v,
954
954
  // Handle <iframe>s
955
955
  root: i.ownerDocument
956
956
  });
957
957
  } catch {
958
- t = new IntersectionObserver(y, v);
958
+ t = new IntersectionObserver(b, v);
959
959
  }
960
960
  t.observe(e);
961
961
  }
@@ -997,7 +997,7 @@ function Bt(e, o, t, n) {
997
997
  }), d == null || d(), (m = f) == null || m.disconnect(), f = null, a && cancelAnimationFrame(g);
998
998
  };
999
999
  }
1000
- const jt = Et, $t = St, Ht = bt, Ut = (e, o, t) => {
1000
+ const jt = Et, $t = St, Ht = yt, Ut = (e, o, t) => {
1001
1001
  const n = /* @__PURE__ */ new Map(), i = {
1002
1002
  platform: Vt,
1003
1003
  ...t
@@ -1005,7 +1005,7 @@ const jt = Et, $t = St, Ht = bt, Ut = (e, o, t) => {
1005
1005
  ...i.platform,
1006
1006
  _c: n
1007
1007
  };
1008
- return yt(e, o, {
1008
+ return bt(e, o, {
1009
1009
  ...i,
1010
1010
  platform: s
1011
1011
  });
@@ -1048,7 +1048,7 @@ function _e(e, o) {
1048
1048
  const t = et(e);
1049
1049
  return Math.round(o * t) / t;
1050
1050
  }
1051
- function ye(e) {
1051
+ function be(e) {
1052
1052
  const o = C.useRef(e);
1053
1053
  return se(() => {
1054
1054
  o.current = e;
@@ -1081,7 +1081,7 @@ function qt(e) {
1081
1081
  S !== R.current && (R.current = S, x(S));
1082
1082
  }, []), v = C.useCallback((S) => {
1083
1083
  S !== O.current && (O.current = S, m(S));
1084
- }, []), E = s || g, y = r || w, R = C.useRef(null), O = C.useRef(null), z = C.useRef(u), K = a != null, P = ye(a), Y = ye(i), ee = ye(c), B = C.useCallback(() => {
1084
+ }, []), E = s || g, b = r || w, R = C.useRef(null), O = C.useRef(null), z = C.useRef(u), K = a != null, P = be(a), Y = be(i), ee = be(c), B = C.useCallback(() => {
1085
1085
  if (!R.current || !O.current)
1086
1086
  return;
1087
1087
  const S = {
@@ -1113,12 +1113,12 @@ function qt(e) {
1113
1113
  se(() => (N.current = !0, () => {
1114
1114
  N.current = !1;
1115
1115
  }), []), se(() => {
1116
- if (E && (R.current = E), y && (O.current = y), E && y) {
1116
+ if (E && (R.current = E), b && (O.current = b), E && b) {
1117
1117
  if (P.current)
1118
- return P.current(E, y, B);
1118
+ return P.current(E, b, B);
1119
1119
  B();
1120
1120
  }
1121
- }, [E, y, B, P, K]);
1121
+ }, [E, b, B, P, K]);
1122
1122
  const te = C.useMemo(() => ({
1123
1123
  reference: R,
1124
1124
  floating: O,
@@ -1126,8 +1126,8 @@ function qt(e) {
1126
1126
  setFloating: v
1127
1127
  }), [p, v]), k = C.useMemo(() => ({
1128
1128
  reference: E,
1129
- floating: y
1130
- }), [E, y]), V = C.useMemo(() => {
1129
+ floating: b
1130
+ }), [E, b]), V = C.useMemo(() => {
1131
1131
  const S = {
1132
1132
  position: t,
1133
1133
  left: 0,
@@ -1193,24 +1193,24 @@ function tt(e) {
1193
1193
  role: d = "tooltip",
1194
1194
  style: h,
1195
1195
  ...f
1196
- } = e, [g, x] = de(c), w = () => u !== void 0 && c !== void 0 ? c : g, m = () => u !== void 0 && c !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: y } = qt({
1196
+ } = e, [g, x] = de(c), w = () => u !== void 0 && c !== void 0 ? c : g, m = () => u !== void 0 && c !== void 0 ? u : x, { x: p, y: v, strategy: E, refs: b } = qt({
1197
1197
  open: w(),
1198
1198
  middleware: [Kt(4), Xt(), Yt()],
1199
1199
  whileElementsMounted: Bt,
1200
1200
  placement: t
1201
1201
  }), R = it();
1202
1202
  return re(
1203
- Zt(y.floating, (O) => {
1203
+ Zt(b.floating, (O) => {
1204
1204
  O && m()(!1);
1205
1205
  }),
1206
1206
  []
1207
1207
  ), /* @__PURE__ */ W(Ve, { children: [
1208
- /* @__PURE__ */ b(
1208
+ /* @__PURE__ */ y(
1209
1209
  "div",
1210
1210
  {
1211
1211
  className: "z-auto min-w-fit max-w-fit",
1212
1212
  id: `zen__popover-${R}`,
1213
- ref: y.setReference,
1213
+ ref: b.setReference,
1214
1214
  onClick: (O) => {
1215
1215
  if (n === "click") {
1216
1216
  if (a)
@@ -1224,7 +1224,7 @@ function tt(e) {
1224
1224
  }
1225
1225
  ),
1226
1226
  w() && rt(
1227
- /* @__PURE__ */ b(
1227
+ /* @__PURE__ */ y(
1228
1228
  "div",
1229
1229
  {
1230
1230
  ...f,
@@ -1234,7 +1234,7 @@ function tt(e) {
1234
1234
  "zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
1235
1235
  o
1236
1236
  ),
1237
- ref: y.setFloating,
1237
+ ref: b.setFloating,
1238
1238
  style: {
1239
1239
  ...h,
1240
1240
  position: E,
@@ -1272,11 +1272,11 @@ function Gt(e) {
1272
1272
  const m = i == null ? void 0 : i.current;
1273
1273
  if (!m)
1274
1274
  return;
1275
- const p = m.offsetWidth, v = [], E = [], y = r(
1275
+ const p = m.offsetWidth, v = [], E = [], b = r(
1276
1276
  n,
1277
1277
  ((h == null ? void 0 : h.measureText(n).width) ?? 0) + 10
1278
1278
  );
1279
- g == null || g.reduce((R, O, z) => (R + O + y > p - 20 ? E.push(o[z]) : v.push(o[z]), R + O), 0), d({
1279
+ g == null || g.reduce((R, O, z) => (R + O + b > p - 20 ? E.push(o[z]) : v.push(o[z]), R + O), 0), d({
1280
1280
  visible: v,
1281
1281
  hidden: E
1282
1282
  });
@@ -1296,18 +1296,18 @@ function Gt(e) {
1296
1296
  };
1297
1297
  }, [o]), /* @__PURE__ */ W(Ve, { children: [
1298
1298
  (x = u.visible) == null ? void 0 : x.map((m, p) => t(m, p, s == null ? void 0 : s[p])),
1299
- ((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ b(
1299
+ ((w = u.hidden) == null ? void 0 : w.length) > 0 && /* @__PURE__ */ y(
1300
1300
  tt,
1301
1301
  {
1302
1302
  trigger: "click",
1303
- content: /* @__PURE__ */ b("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
1303
+ content: /* @__PURE__ */ y("div", { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: u.hidden.map(
1304
1304
  (m, p) => t(
1305
1305
  m,
1306
1306
  u.visible.length + p,
1307
1307
  s == null ? void 0 : s[u.visible.length + p]
1308
1308
  )
1309
1309
  ) }),
1310
- children: /* @__PURE__ */ b(Be, { className: c, variant: a, children: /* @__PURE__ */ b("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
1310
+ children: /* @__PURE__ */ y(Be, { className: c, variant: a, children: /* @__PURE__ */ y("p", { children: `+${u.hidden.length} ${n}` }) }, "more_items_button")
1311
1311
  }
1312
1312
  )
1313
1313
  ] });
@@ -1344,7 +1344,7 @@ function X(e, o, t) {
1344
1344
  return (a = t == null ? void 0 : t.onChange) == null || a.call(t, i), i;
1345
1345
  };
1346
1346
  }
1347
- function be(e, o) {
1347
+ function ye(e, o) {
1348
1348
  if (e === void 0)
1349
1349
  throw new Error("Unexpected undefined");
1350
1350
  return e;
@@ -1685,11 +1685,11 @@ class ln {
1685
1685
  ), this.getVirtualItemForOffset = (t) => {
1686
1686
  const n = this.getMeasurements();
1687
1687
  if (n.length !== 0)
1688
- return be(
1688
+ return ye(
1689
1689
  n[nt(
1690
1690
  0,
1691
1691
  n.length - 1,
1692
- (i) => be(n[i]).start,
1692
+ (i) => ye(n[i]).start,
1693
1693
  t
1694
1694
  )]
1695
1695
  );
@@ -1736,7 +1736,7 @@ class ln {
1736
1736
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
1737
1737
  this.options.getItemKey(t)
1738
1738
  )) {
1739
- const [c] = be(
1739
+ const [c] = ye(
1740
1740
  this.getOffsetForIndex(t, l)
1741
1741
  );
1742
1742
  Jt(c, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: i });
@@ -1821,7 +1821,7 @@ function un(e) {
1821
1821
  });
1822
1822
  }
1823
1823
  function fn(e) {
1824
- return /* @__PURE__ */ b(
1824
+ return /* @__PURE__ */ y(
1825
1825
  "svg",
1826
1826
  {
1827
1827
  xmlns: "http://www.w3.org/2000/svg",
@@ -1831,12 +1831,12 @@ function fn(e) {
1831
1831
  stroke: "currentColor",
1832
1832
  className: "h-6 w-6",
1833
1833
  ...e,
1834
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1834
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1835
1835
  }
1836
1836
  );
1837
1837
  }
1838
1838
  function dn(e) {
1839
- return /* @__PURE__ */ b(
1839
+ return /* @__PURE__ */ y(
1840
1840
  "svg",
1841
1841
  {
1842
1842
  xmlns: "http://www.w3.org/2000/svg",
@@ -1846,7 +1846,7 @@ function dn(e) {
1846
1846
  stroke: "currentColor",
1847
1847
  className: "h-6 w-6",
1848
1848
  ...e,
1849
- children: /* @__PURE__ */ b(
1849
+ children: /* @__PURE__ */ y(
1850
1850
  "path",
1851
1851
  {
1852
1852
  strokeLinecap: "round",
@@ -1858,7 +1858,7 @@ function dn(e) {
1858
1858
  );
1859
1859
  }
1860
1860
  function hn(e) {
1861
- return /* @__PURE__ */ b(
1861
+ return /* @__PURE__ */ y(
1862
1862
  "svg",
1863
1863
  {
1864
1864
  xmlns: "http://www.w3.org/2000/svg",
@@ -1868,7 +1868,7 @@ function hn(e) {
1868
1868
  stroke: "currentColor",
1869
1869
  className: "h-6 w-6",
1870
1870
  ...e,
1871
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1871
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1872
1872
  }
1873
1873
  );
1874
1874
  }
@@ -1885,7 +1885,7 @@ function wn(e) {
1885
1885
  mutable: a,
1886
1886
  onAdd: c
1887
1887
  } = e, u = Ee(null), [d, h] = de(!1), f = Ee(null);
1888
- return /* @__PURE__ */ b(
1888
+ return /* @__PURE__ */ y(
1889
1889
  tt,
1890
1890
  {
1891
1891
  placement: "bottom",
@@ -1897,7 +1897,7 @@ function wn(e) {
1897
1897
  style: {
1898
1898
  "--input-width": `${(g = f.current) == null ? void 0 : g.offsetWidth}px`
1899
1899
  },
1900
- content: /* @__PURE__ */ b(
1900
+ content: /* @__PURE__ */ y(
1901
1901
  mn,
1902
1902
  {
1903
1903
  ...a ? { mutable: a, onAdd: c } : { mutable: a },
@@ -1915,7 +1915,7 @@ function wn(e) {
1915
1915
  ),
1916
1916
  ref: f,
1917
1917
  children: [
1918
- /* @__PURE__ */ b(
1918
+ /* @__PURE__ */ y(
1919
1919
  "div",
1920
1920
  {
1921
1921
  className: M(
@@ -1923,7 +1923,7 @@ function wn(e) {
1923
1923
  s ? "text-muted-foreground" : "text-foreground"
1924
1924
  ),
1925
1925
  ref: u,
1926
- children: l ? /* @__PURE__ */ b(
1926
+ children: l ? /* @__PURE__ */ y(
1927
1927
  Gt,
1928
1928
  {
1929
1929
  items: t.map((x) => x.text),
@@ -1939,7 +1939,7 @@ function wn(e) {
1939
1939
  variant: "secondary",
1940
1940
  children: [
1941
1941
  x,
1942
- /* @__PURE__ */ b(
1942
+ /* @__PURE__ */ y(
1943
1943
  at,
1944
1944
  {
1945
1945
  onClick: () => {
@@ -1948,7 +1948,7 @@ function wn(e) {
1948
1948
  variant: "icon",
1949
1949
  size: "icon",
1950
1950
  className: "group bg-muted p-0.5 hover:bg-muted-foreground",
1951
- children: /* @__PURE__ */ b(hn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
1951
+ children: /* @__PURE__ */ y(hn, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
1952
1952
  }
1953
1953
  )
1954
1954
  ]
@@ -1959,7 +1959,7 @@ function wn(e) {
1959
1959
  ) : t.text ?? r
1960
1960
  }
1961
1961
  ),
1962
- /* @__PURE__ */ b(
1962
+ /* @__PURE__ */ y(
1963
1963
  fn,
1964
1964
  {
1965
1965
  className: M(
@@ -1986,8 +1986,8 @@ function mn(e) {
1986
1986
  }), h = n instanceof Array ? n.map((f) => f.key) : [n.key];
1987
1987
  return /* @__PURE__ */ W("div", { className: "flex min-w-[var(--input-width)] flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background", children: [
1988
1988
  /* @__PURE__ */ W("div", { className: M("inline-flex grow items-center rounded px-3 py-2"), children: [
1989
- /* @__PURE__ */ b(dn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
1990
- /* @__PURE__ */ b(
1989
+ /* @__PURE__ */ y(dn, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
1990
+ /* @__PURE__ */ y(
1991
1991
  "input",
1992
1992
  {
1993
1993
  className: "inline-flex grow bg-transparent text-sm text-foreground outline-hidden",
@@ -2003,7 +2003,7 @@ function mn(e) {
2003
2003
  className: M("max-h-60 grow overflow-auto shadow-sm", "focus:outline-hidden focus:ring-0"),
2004
2004
  ref: c,
2005
2005
  children: [
2006
- /* @__PURE__ */ b(
2006
+ /* @__PURE__ */ y(
2007
2007
  "div",
2008
2008
  {
2009
2009
  style: {
@@ -2011,7 +2011,7 @@ function mn(e) {
2011
2011
  width: "100%",
2012
2012
  position: "relative"
2013
2013
  },
2014
- children: d.getVirtualItems().map((f) => /* @__PURE__ */ b(
2014
+ children: d.getVirtualItems().map((f) => /* @__PURE__ */ y(
2015
2015
  "li",
2016
2016
  {
2017
2017
  style: {
@@ -2049,14 +2049,14 @@ function mn(e) {
2049
2049
  l
2050
2050
  ]
2051
2051
  }
2052
- ) : /* @__PURE__ */ b("li", { className: M("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2052
+ ) : /* @__PURE__ */ y("li", { className: M("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" }))
2053
2053
  ]
2054
2054
  }
2055
2055
  )
2056
2056
  ] });
2057
2057
  }
2058
- function yn(e) {
2059
- return /* @__PURE__ */ b(
2058
+ function bn(e) {
2059
+ return /* @__PURE__ */ y(
2060
2060
  "svg",
2061
2061
  {
2062
2062
  xmlns: "http://www.w3.org/2000/svg",
@@ -2066,13 +2066,13 @@ function yn(e) {
2066
2066
  stroke: "currentColor",
2067
2067
  className: "h-6 w-6",
2068
2068
  ...e,
2069
- children: /* @__PURE__ */ b("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2069
+ children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2070
2070
  }
2071
2071
  );
2072
2072
  }
2073
- function bn(e) {
2073
+ function yn(e) {
2074
2074
  const { className: o, ...t } = e;
2075
- return /* @__PURE__ */ b(
2075
+ return /* @__PURE__ */ y(
2076
2076
  "input",
2077
2077
  {
2078
2078
  className: M(
@@ -2101,8 +2101,8 @@ function vn(e) {
2101
2101
  ),
2102
2102
  onClick: () => n == null ? void 0 : n(!t),
2103
2103
  children: [
2104
- /* @__PURE__ */ b("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
2105
- /* @__PURE__ */ b(
2104
+ /* @__PURE__ */ y("input", { type: "hidden", readOnly: !0, ...s, defaultChecked: i, checked: t }),
2105
+ /* @__PURE__ */ y(
2106
2106
  "div",
2107
2107
  {
2108
2108
  className: M(
@@ -2115,16 +2115,34 @@ function vn(e) {
2115
2115
  }
2116
2116
  );
2117
2117
  }
2118
+ function En(e) {
2119
+ const { className: o, ...t } = e;
2120
+ return /* @__PURE__ */ y(
2121
+ "textarea",
2122
+ {
2123
+ className: M(
2124
+ "border-input bg-background text-foreground h-10 w-full rounded border-2 px-3 py-2 text-sm transition",
2125
+ "focus-visible:border-primary focus-visible:shadow-ring focus-visible:shadow-xs focus-visible:outline-hidden",
2126
+ "read-only:text-foreground read-only:cursor-pointer read-only:border-none! read-only:bg-transparent read-only:shadow-none! read-only:outline-hidden!",
2127
+ "disabled:bg-muted disabled:text-muted disabled:cursor-not-allowed",
2128
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
2129
+ o
2130
+ ),
2131
+ ...t
2132
+ }
2133
+ );
2134
+ }
2118
2135
  export {
2119
2136
  Be as Badge,
2120
2137
  at as Button,
2121
- yn as ChevronDown,
2138
+ bn as ChevronDown,
2122
2139
  fn as ChevronUp,
2123
2140
  Gt as Collapse,
2124
2141
  wn as Dropdown,
2125
- bn as Input,
2142
+ yn as Input,
2126
2143
  tt as Popover,
2127
2144
  dn as Search,
2145
+ En as TextArea,
2128
2146
  vn as Toggle,
2129
2147
  We as cva,
2130
2148
  M as cx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rinzai/zen",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "module": "./dist/zen.js",