@pibit.ai/cure-design-system 0.6.25 → 0.6.27

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.
@@ -1,68 +1,71 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { Minimize01 as H, Expand01 as K, X as F } from "@untitledui/icons";
3
3
  import { useState as U, useId as Y, useRef as G, useEffect as J } from "react";
4
4
  import { motion as Q } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
5
5
  const Z = 512, W = "calc(100vw - 140px)", C = { type: "tween", duration: 0.3, ease: "easeInOut" }, se = ({
6
6
  state: o,
7
- onClose: h,
8
- header: n,
9
- title: I = "",
7
+ onClose: g,
8
+ header: s,
9
+ title: u = "",
10
10
  subtitle: y,
11
11
  children: z,
12
- normalWidth: g = Z,
13
- maxWidth: D = W,
14
- width: k,
12
+ normalWidth: D = Z,
13
+ maxWidth: k = W,
14
+ width: R,
15
15
  minWidth: a = 480,
16
- maxResizableWidth: R,
16
+ maxResizableWidth: M,
17
17
  onWidthChange: r,
18
18
  onExpandedChange: c,
19
- headerActions: M,
20
- className: P = "",
21
- headerClassName: S = "",
22
- bodyClassName: E = ""
19
+ headerActions: P,
20
+ className: S = "",
21
+ headerClassName: E = "",
22
+ bodyClassName: V = ""
23
23
  }) => {
24
- const [v, V] = U(!1), u = o !== "hidden";
25
- u && !v && V(!0);
26
- const w = c !== void 0, m = o === "expanded", l = o === "hidden" ? 0 : o === "expanded" ? D : k ?? g, f = Math.max(R ?? Number.POSITIVE_INFINITY, a), b = o === "normal" && u && typeof l == "number" && r !== void 0, p = (e) => Math.min(Math.max(e, a), f), L = Y(), s = G(null);
24
+ const [w, L] = U(!1), m = o !== "hidden";
25
+ m && !w && L(!0);
26
+ const N = c !== void 0, b = o === "expanded", l = o === "hidden" ? 0 : o === "expanded" ? k : R ?? D, f = Math.max(M ?? Number.POSITIVE_INFINITY, a), p = o === "normal" && m && typeof l == "number" && r !== void 0, v = (e) => Math.min(Math.max(e, a), f), h = Y(), i = G(null);
27
27
  J(() => () => {
28
28
  var e;
29
- return (e = s.current) == null ? void 0 : e.call(s);
29
+ return (e = i.current) == null ? void 0 : e.call(i);
30
30
  }, []);
31
31
  const T = (e) => {
32
- if (!b || typeof l != "number") return;
32
+ if (!p || typeof l != "number") return;
33
33
  e.preventDefault(), e.stopPropagation();
34
34
  const d = e.clientX, $ = l, O = document.body.style.cursor, q = document.body.style.userSelect;
35
35
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
36
- const N = (B) => {
37
- r == null || r(p($ + d - B.clientX));
36
+ const I = (B) => {
37
+ r == null || r(v($ + d - B.clientX));
38
38
  }, x = () => {
39
- document.body.style.cursor = O, document.body.style.userSelect = q, window.removeEventListener("pointermove", N), window.removeEventListener("pointerup", x), s.current = null;
39
+ document.body.style.cursor = O, document.body.style.userSelect = q, window.removeEventListener("pointermove", I), window.removeEventListener("pointerup", x), i.current = null;
40
40
  };
41
- s.current = x, window.addEventListener("pointermove", N), window.addEventListener("pointerup", x);
41
+ i.current = x, window.addEventListener("pointermove", I), window.addEventListener("pointerup", x);
42
42
  }, X = (e) => {
43
- if (!b || typeof l != "number") return;
43
+ if (!p || typeof l != "number") return;
44
44
  const d = e.shiftKey ? 50 : 16;
45
- e.key === "ArrowLeft" && (e.preventDefault(), r == null || r(p(l + d))), e.key === "ArrowRight" && (e.preventDefault(), r == null || r(p(l - d)));
45
+ e.key === "ArrowLeft" && (e.preventDefault(), r == null || r(v(l + d))), e.key === "ArrowRight" && (e.preventDefault(), r == null || r(v(l - d)));
46
46
  }, _ = {
47
47
  backgroundImage: "linear-gradient(90deg, rgba(6, 132, 240, 0.1) 0%, rgba(6, 132, 240, 0.1) 100%), linear-gradient(0deg, rgba(255, 255, 255, 0) 60.66%, rgba(255, 255, 255, 0.5) 100%), linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.3) 100%)"
48
- }, j = `flex items-center justify-between pl-6 pr-2 border-b border-secondary gap-2 py-4 ${S}`, A = `flex min-h-0 flex-1 flex-col overflow-y-auto pb-3 ${E} ${n ? "" : "px-5"}`;
48
+ }, j = `flex items-center justify-between pl-6 pr-2 border-b border-secondary gap-2 py-4 ${E}`, A = `flex min-h-0 flex-1 flex-col overflow-y-auto pb-3 ${V} ${s ? "" : "px-5"}`;
49
49
  return /* @__PURE__ */ t(
50
50
  Q.div,
51
51
  {
52
- className: `relative flex flex-col flex-shrink-0 overflow-hidden min-w-0 h-[calc(98vh-85px)] z-1000 ${P}`,
52
+ className: `relative flex flex-col flex-shrink-0 overflow-hidden min-w-0 h-[calc(98vh-85px)] z-1000 ${S}`,
53
53
  initial: !1,
54
54
  animate: {
55
55
  width: l,
56
56
  minWidth: o === "hidden" ? 0 : a || void 0
57
57
  },
58
58
  transition: C,
59
- children: u && /* @__PURE__ */ i(
59
+ children: m && /* @__PURE__ */ n(
60
60
  "div",
61
61
  {
62
+ role: "region",
63
+ "aria-labelledby": s == null ? h : void 0,
64
+ "aria-label": s != null && u ? u : void 0,
62
65
  className: "h-full w-full min-w-0 flex flex-col rounded-2xl border-l border-t border-b border-white backdrop-blur-[3px] p-2",
63
66
  style: _,
64
67
  children: [
65
- b && /* @__PURE__ */ t(
68
+ p && /* @__PURE__ */ t(
66
69
  "div",
67
70
  {
68
71
  role: "separator",
@@ -77,29 +80,29 @@ const Z = 512, W = "calc(100vw - 140px)", C = { type: "tween", duration: 0.3, ea
77
80
  className: "absolute left-0 top-0 z-10 h-full w-2 -translate-x-1 cursor-col-resize touch-none focus-visible:outline-none"
78
81
  }
79
82
  ),
80
- /* @__PURE__ */ i("div", { className: "h-full w-full bg-white rounded-lg overflow-hidden flex flex-col min-w-0", children: [
81
- n ?? /* @__PURE__ */ i("header", { className: j, children: [
82
- /* @__PURE__ */ i("div", { className: `flex-1 flex flex-col gap-0 min-w-0 ${w ? "pr-2" : "pr-16"}`, children: [
83
- /* @__PURE__ */ t("h2", { id: L, className: "text-lg font-semibold leading-7 text-[#06060a] truncate", children: I }),
83
+ /* @__PURE__ */ n("div", { className: "h-full w-full bg-white rounded-lg overflow-hidden flex flex-col min-w-0", children: [
84
+ s ?? /* @__PURE__ */ n("header", { className: j, children: [
85
+ /* @__PURE__ */ n("div", { className: `flex-1 flex flex-col gap-0 min-w-0 ${N ? "pr-2" : "pr-16"}`, children: [
86
+ /* @__PURE__ */ t("h2", { id: h, className: "text-lg font-semibold leading-7 text-[#06060a] truncate", children: u }),
84
87
  y && /* @__PURE__ */ t("p", { className: "text-sm text-secondary truncate", children: y })
85
88
  ] }),
86
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
87
- M,
88
- w && /* @__PURE__ */ t(
89
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
90
+ P,
91
+ N && /* @__PURE__ */ t(
89
92
  "button",
90
93
  {
91
94
  type: "button",
92
- onClick: () => c == null ? void 0 : c(!m),
95
+ onClick: () => c == null ? void 0 : c(!b),
93
96
  className: "flex items-center justify-center p-2 rounded-lg hover:bg-primary_hover transition-colors cursor-pointer",
94
- "aria-label": m ? "Collapse sidebar" : "Expand sidebar",
95
- children: m ? /* @__PURE__ */ t(H, { size: 20, className: "text-fg-quaternary", strokeWidth: 1.67 }) : /* @__PURE__ */ t(K, { size: 20, className: "text-fg-quaternary", strokeWidth: 1.67 })
97
+ "aria-label": b ? "Collapse sidebar" : "Expand sidebar",
98
+ children: b ? /* @__PURE__ */ t(H, { size: 20, className: "text-fg-quaternary", strokeWidth: 1.67 }) : /* @__PURE__ */ t(K, { size: 20, className: "text-fg-quaternary", strokeWidth: 1.67 })
96
99
  }
97
100
  ),
98
101
  /* @__PURE__ */ t(
99
102
  "button",
100
103
  {
101
104
  type: "button",
102
- onClick: h,
105
+ onClick: g,
103
106
  className: "flex items-center justify-center p-2 rounded-lg hover:bg-primary_hover transition-colors cursor-pointer",
104
107
  "aria-label": "Close",
105
108
  children: /* @__PURE__ */ t(F, { size: 20, className: "text-fg-quaternary", strokeWidth: 1.67 })
@@ -107,7 +110,7 @@ const Z = 512, W = "calc(100vw - 140px)", C = { type: "tween", duration: 0.3, ea
107
110
  )
108
111
  ] })
109
112
  ] }),
110
- /* @__PURE__ */ t("main", { className: A, children: v ? z : null })
113
+ /* @__PURE__ */ t("div", { className: A, children: w ? z : null })
111
114
  ] })
112
115
  ]
113
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"filter-list-section.d.ts","sourceRoot":"","sources":["../../../src/patterns/filters/filter-list-section.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,cAAc;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEjC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAcD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,cAAc,EAAE,EAC1D,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,MAAM,EACN,WAAsB,EACtB,UAAU,EACV,YAAkC,EAClC,YAAkC,EAClC,UAA8B,EAC9B,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CAwF3B"}
1
+ {"version":3,"file":"filter-list-section.d.ts","sourceRoot":"","sources":["../../../src/patterns/filters/filter-list-section.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,cAAc;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAEjC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAcD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,cAAc,EAAE,EAC1D,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,MAAM,EACN,WAAsB,EACtB,UAAU,EACV,YAAkC,EAClC,YAAkC,EAClC,UAA8B,EAC9B,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA8F3B"}
@@ -1,45 +1,45 @@
1
- import { jsxs as n, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
2
  import { MinusSquare as N } from "@untitledui/icons";
3
3
  import g from "../../primitives/select/SearchInput.js";
4
- import { Checkbox as m } from "../../primitives/checkbox/checkbox.js";
5
- import { Avatar as b } from "../../primitives/avatar/avatar.js";
6
- function S(r) {
7
- return r.label ?? String(r.value ?? "");
4
+ import { Checkbox as m, CheckboxBase as b } from "../../primitives/checkbox/checkbox.js";
5
+ import { Avatar as S } from "../../primitives/avatar/avatar.js";
6
+ function C(a) {
7
+ return a.label ?? String(a.value ?? "");
8
8
  }
9
- function C(r) {
10
- return r.value ?? String(r.id ?? "");
9
+ function k(a) {
10
+ return a.value ?? String(a.id ?? "");
11
11
  }
12
- function k(r) {
13
- return r.id ?? r.value;
12
+ function w(a) {
13
+ return a.id ?? a.value;
14
14
  }
15
- function K({
16
- title: r,
15
+ function _({
16
+ title: a,
17
17
  items: c,
18
- selectedValues: i,
18
+ selectedValues: t,
19
19
  selectAll: o,
20
20
  search: l,
21
21
  placeholder: u = "Search",
22
22
  showAvatar: h,
23
- getItemLabel: t = S,
24
- getItemValue: f = C,
25
- getItemKey: x = k,
23
+ getItemLabel: i = C,
24
+ getItemValue: f = k,
25
+ getItemKey: x = w,
26
26
  onSearchChange: p,
27
27
  onToggleSelectAll: s,
28
28
  onToggleItem: v
29
29
  }) {
30
30
  const y = c.filter(
31
- (e) => t(e).toLowerCase().includes(l.toLowerCase())
31
+ (e) => i(e).toLowerCase().includes(l.toLowerCase())
32
32
  );
33
33
  return /* @__PURE__ */ n("div", { children: [
34
34
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2 mb-4", children: [
35
- /* @__PURE__ */ a("h3", { className: "text-sm font-medium text-gray-900", children: r }),
36
- i.length > 0 && /* @__PURE__ */ n("span", { className: "text-xs", children: [
37
- i.length,
35
+ /* @__PURE__ */ r("h3", { className: "text-sm font-medium text-gray-900", children: a }),
36
+ t.length > 0 && /* @__PURE__ */ n("span", { className: "text-xs", children: [
37
+ t.length,
38
38
  " selected"
39
39
  ] })
40
40
  ] }),
41
41
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
42
- (c.length > 10 || l) && /* @__PURE__ */ a(
42
+ (c.length > 10 || l) && /* @__PURE__ */ r(
43
43
  g,
44
44
  {
45
45
  className: "bg-secondary_subtle ring-0 rounded-md",
@@ -51,7 +51,7 @@ function K({
51
51
  ),
52
52
  /* @__PURE__ */ n("div", { className: "max-h-48 overflow-y-auto", children: [
53
53
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3 p-2", children: [
54
- o ? /* @__PURE__ */ a(
54
+ o ? /* @__PURE__ */ r(
55
55
  m,
56
56
  {
57
57
  className: "cursor-pointer",
@@ -59,22 +59,22 @@ function K({
59
59
  isSelected: o,
60
60
  onChange: s
61
61
  }
62
- ) : /* @__PURE__ */ a(
62
+ ) : /* @__PURE__ */ r(
63
63
  "div",
64
64
  {
65
65
  onClick: s,
66
66
  role: "checkbox",
67
- "aria-checked": i.length > 0 ? "mixed" : !1,
67
+ "aria-checked": t.length > 0 ? "mixed" : !1,
68
68
  "aria-label": "Select all",
69
69
  tabIndex: 0,
70
70
  onKeyDown: (e) => {
71
71
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s());
72
72
  },
73
73
  className: "h-4 w-4 flex items-center justify-center overflow-hidden cursor-pointer",
74
- children: /* @__PURE__ */ a(N, { size: 18, className: "text-utility-brand-600" })
74
+ children: t.length > 0 ? /* @__PURE__ */ r(N, { size: 18, className: "text-utility-brand-600" }) : /* @__PURE__ */ r(b, { isSelected: !1 })
75
75
  }
76
76
  ),
77
- /* @__PURE__ */ a("span", { className: "text-sm font-medium text-gray-900", children: "Select All" })
77
+ /* @__PURE__ */ r("span", { className: "text-sm font-medium text-gray-900", children: "Select All" })
78
78
  ] }),
79
79
  y.map((e) => {
80
80
  const d = f(e);
@@ -83,23 +83,23 @@ function K({
83
83
  {
84
84
  className: "flex items-center gap-3 hover:bg-primary_hover rounded-md p-2",
85
85
  children: [
86
- /* @__PURE__ */ a(
86
+ /* @__PURE__ */ r(
87
87
  m,
88
88
  {
89
- "aria-label": t(e),
90
- isSelected: i.includes(d),
89
+ "aria-label": i(e),
90
+ isSelected: t.includes(d),
91
91
  onChange: () => v(d)
92
92
  }
93
93
  ),
94
- h ? /* @__PURE__ */ a(
95
- b,
94
+ h ? /* @__PURE__ */ r(
95
+ S,
96
96
  {
97
97
  size: "xs",
98
- initials: t(e).charAt(0),
99
- alt: t(e)
98
+ initials: i(e).charAt(0),
99
+ alt: i(e)
100
100
  }
101
101
  ) : null,
102
- /* @__PURE__ */ a("span", { className: "text-sm text-gray-700", children: t(e) })
102
+ /* @__PURE__ */ r("span", { className: "text-sm text-gray-700", children: i(e) })
103
103
  ]
104
104
  },
105
105
  x(e)
@@ -110,5 +110,5 @@ function K({
110
110
  ] });
111
111
  }
112
112
  export {
113
- K as FilterListSection
113
+ _ as FilterListSection
114
114
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/patterns/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,QAAQ,IAAI,YAAY,EACxB,cAAc,IAAI,kBAAkB,EACrC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,QAAQ,IAAI,YAAY,EACxB,IAAI,IAAI,QAAQ,EAGjB,MAAM,uBAAuB,CAAC;AAY/B,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAG7C,KAAK,eAAe,GAChB,cAAc,GACd,aAAa,GACb,eA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qB,CAAC,iBAAiB,EAAE,CAAC,CAAC;kBAoEnB,iBAAiB;CAgE3C,CAAC"}
@@ -1,9 +1,9 @@
1
- import { jsx as b, jsxs as h } from "react/jsx-runtime";
2
- import { createContext as _, useContext as v, Fragment as T } from "react";
3
- import { Tabs as w, useSlottedContext as z, TabsContext as N, TabList as C, Tab as B, TabPanel as L } from "react-aria-components";
1
+ import { jsx as b, jsxs as _ } from "react/jsx-runtime";
2
+ import { createContext as v, useContext as T, Fragment as w } from "react";
3
+ import { Tabs as z, useSlottedContext as N, TabsContext as B, TabList as C, Tab as L, TabPanel as P } from "react-aria-components";
4
4
  import { cx as e } from "../../utils/cn.js";
5
5
  import { Badge as p } from "../../primitives/badge/badge.js";
6
- const P = ({ isFocusVisible: t, isSelected: n, isHovered: o, isDisabled: a }) => ({
6
+ const j = ({ isFocusVisible: t, isSelected: n, isHovered: o, isDisabled: a }) => ({
7
7
  "button-brand": e(
8
8
  "outline-focus-ring",
9
9
  t && "outline-2 -outline-offset-2",
@@ -51,7 +51,7 @@ const P = ({ isFocusVisible: t, isSelected: n, isHovered: o, isDisabled: a }) =>
51
51
  !n && "before:shadow-[4px_4px_0_0_transparent] after:shadow-[-4px_4px_0_0_transparent]",
52
52
  !n && !a && o && "bg-primary_hover text-primary"
53
53
  )
54
- }), j = {
54
+ }), $ = {
55
55
  xs: {
56
56
  "button-brand": "text-xs font-semibold px-2",
57
57
  "button-gray": "text-xs font-semibold px-2",
@@ -78,7 +78,7 @@ const P = ({ isFocusVisible: t, isSelected: n, isHovered: o, isDisabled: a }) =>
78
78
  line: "text-md font-semibold pr-3.5 pl-3 py-1",
79
79
  "button-curved": "py-2.5 px-5"
80
80
  }
81
- }, $ = ({ size: t, fullWidth: n }) => ({
81
+ }, I = ({ size: t, fullWidth: n }) => ({
82
82
  "button-brand": "gap-1",
83
83
  "button-gray": "gap-1",
84
84
  "button-border": e(
@@ -90,14 +90,14 @@ const P = ({ isFocusVisible: t, isSelected: n, isHovered: o, isDisabled: a }) =>
90
90
  line: "gap-2",
91
91
  "button-curved": "gap-0"
92
92
  });
93
- function I(t) {
93
+ function k(t) {
94
94
  return t.some((n) => {
95
95
  if (!("badge" in n)) return !1;
96
96
  const o = n.badge;
97
97
  return o != null && String(o).length > 0;
98
98
  });
99
99
  }
100
- const k = {
100
+ const A = {
101
101
  xs: "!min-h-8",
102
102
  sm: "!min-h-9",
103
103
  md: "!min-h-10"
@@ -109,11 +109,11 @@ const k = {
109
109
  underline: t || n ? "brand" : "gray",
110
110
  line: t || n ? "brand" : "gray",
111
111
  "button-curved": "gray"
112
- }), c = _({
112
+ }), y = v({
113
113
  size: "sm",
114
114
  type: "button-brand",
115
115
  reserveBadgeSlot: !1
116
- }), A = ({
116
+ }), M = ({
117
117
  size: t = "sm",
118
118
  type: n = "button-brand",
119
119
  orientation: o,
@@ -123,15 +123,15 @@ const k = {
123
123
  items: u,
124
124
  ...r
125
125
  }) => {
126
- const i = z(N), s = o ?? (i == null ? void 0 : i.orientation) ?? "horizontal", l = s === "horizontal" && n === "underline" && I(u);
127
- return /* @__PURE__ */ b(c.Provider, { value: { size: t, type: n, orientation: s, fullWidth: a, reserveBadgeSlot: l }, children: /* @__PURE__ */ b(
126
+ const i = N(B), s = o ?? (i == null ? void 0 : i.orientation) ?? "horizontal", l = s === "horizontal" && n === "underline" && k(u);
127
+ return /* @__PURE__ */ b(y.Provider, { value: { size: t, type: n, orientation: s, fullWidth: a, reserveBadgeSlot: l }, children: /* @__PURE__ */ b(
128
128
  C,
129
129
  {
130
130
  ...r,
131
131
  items: u,
132
132
  className: (f) => e(
133
133
  "group flex",
134
- $({
134
+ I({
135
135
  size: t,
136
136
  fullWidth: a
137
137
  })[n],
@@ -140,11 +140,11 @@ const k = {
140
140
  s === "horizontal" && n === "underline" && "relative before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-border-secondary",
141
141
  typeof d == "function" ? d(f) : d
142
142
  ),
143
- children: m ?? ((f) => /* @__PURE__ */ b(y, { ...f, children: f.children }))
143
+ children: m ?? ((f) => /* @__PURE__ */ b(h, { ...f, children: f.children }))
144
144
  }
145
145
  ) });
146
- }, M = (t) => /* @__PURE__ */ b(
147
- L,
146
+ }, W = (t) => /* @__PURE__ */ b(
147
+ P,
148
148
  {
149
149
  ...t,
150
150
  className: (n) => e(
@@ -152,23 +152,23 @@ const k = {
152
152
  typeof t.className == "function" ? t.className(n) : t.className
153
153
  )
154
154
  }
155
- ), y = (t) => {
156
- const { label: n, children: o, badge: a, leadingBadge: d, badgeClassName: m, ...u } = t, { size: r = "sm", type: i = "button-brand", fullWidth: s } = v(c);
155
+ ), c = (t) => t != null && t !== "", h = (t) => {
156
+ const { label: n, children: o, badge: a, leadingBadge: d, badgeClassName: m, ...u } = t, { size: r = "sm", type: i = "button-brand", fullWidth: s } = T(y);
157
157
  return /* @__PURE__ */ b(
158
- B,
158
+ L,
159
159
  {
160
160
  ...u,
161
161
  className: (l) => e(
162
162
  "z-10 flex h-max cursor-pointer items-center justify-center gap-1 rounded-md whitespace-nowrap text-secondary transition duration-100 ease-linear",
163
163
  "group-orientation-vertical:justify-start",
164
164
  s && "w-full flex-1",
165
- k[r],
166
- j[r][i],
167
- P(l)[i],
165
+ A[r],
166
+ $[r][i],
167
+ j(l)[i],
168
168
  typeof t.className == "function" ? t.className(l) : t.className
169
169
  ),
170
- children: (l) => /* @__PURE__ */ h(T, { children: [
171
- d && /* @__PURE__ */ b(
170
+ children: (l) => /* @__PURE__ */ _(w, { children: [
171
+ c(d) && /* @__PURE__ */ b(
172
172
  p,
173
173
  {
174
174
  size: r === "xs" ? "sm" : r,
@@ -179,7 +179,7 @@ const k = {
179
179
  }
180
180
  ),
181
181
  typeof o == "function" ? o(l) : o || n,
182
- a && /* @__PURE__ */ b(
182
+ c(a) && /* @__PURE__ */ b(
183
183
  p,
184
184
  {
185
185
  size: r === "xs" ? "sm" : r,
@@ -193,7 +193,7 @@ const k = {
193
193
  }
194
194
  );
195
195
  }, x = ({ className: t, ...n }) => /* @__PURE__ */ b(
196
- w,
196
+ z,
197
197
  {
198
198
  keyboardActivation: "manual",
199
199
  ...n,
@@ -206,12 +206,12 @@ const k = {
206
206
  )
207
207
  }
208
208
  );
209
- x.Panel = M;
210
- x.List = A;
211
- x.Item = y;
209
+ x.Panel = W;
210
+ x.List = M;
211
+ x.Item = h;
212
212
  export {
213
- y as Tab,
214
- A as TabList,
215
- M as TabPanel,
213
+ h as Tab,
214
+ M as TabList,
215
+ W as TabPanel,
216
216
  x as Tabs
217
217
  };
@@ -1 +1 @@
1
- {"version":3,"file":"indented-tree.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/indented-tree.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,0HAS1B,iBAAiB,4CA8GnB,CAAC"}
1
+ {"version":3,"file":"indented-tree.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/indented-tree.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAA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