@pibit.ai/cure-design-system 0.6.26 → 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.
@@ -13,8 +13,7 @@ export interface AlertFloatingProps {
13
13
  */
14
14
  confirmLabel?: string;
15
15
  /**
16
- * The label for the dismiss button.
17
- * @default "Dismiss"
16
+ * The label for the dismiss link button. Without one, only the X is shown; it is then named "Dismiss".
18
17
  */
19
18
  dismissLabel?: string;
20
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/patterns/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA+C3C,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,GAAI,iGAU3B,kBAAkB,4CA+CpB,CAAC"}
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/patterns/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA+C3C,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,GAAI,iGAU3B,kBAAkB,4CA+CpB,CAAC"}
@@ -1,17 +1,17 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { isValidElement as g } from "react";
3
- import { InfoCircle as l, CheckCircle as u, AlertCircle as o } from "@untitledui/icons";
4
- import { cx as b } from "../../utils/cn.js";
5
- import { FeaturedIcon as p } from "../../primitives/featured-icon/featured-icon.js";
6
- import { Button as d } from "../../primitives/button/button.js";
3
+ import { InfoCircle as l, CheckCircle as u, AlertCircle as d } from "@untitledui/icons";
4
+ import { cx as p } from "../../utils/cn.js";
5
+ import { FeaturedIcon as b } from "../../primitives/featured-icon/featured-icon.js";
6
+ import { Button as f } from "../../primitives/button/button.js";
7
7
  import { CloseButton as y } from "../../primitives/close-button/close-button.js";
8
8
  const h = {
9
9
  default: l,
10
10
  info: l,
11
11
  brand: l,
12
12
  gray: l,
13
- error: o,
14
- warning: o,
13
+ error: d,
14
+ warning: d,
15
15
  success: u,
16
16
  notice: l
17
17
  }, v = {
@@ -33,44 +33,44 @@ const h = {
33
33
  success: "text-green-800",
34
34
  notice: "text-[#F7F7F7]"
35
35
  }, A = ({
36
- title: f,
37
- description: s,
38
- confirmLabel: m,
36
+ title: m,
37
+ description: o,
38
+ confirmLabel: a,
39
39
  onClose: r,
40
- onConfirm: n,
40
+ onConfirm: c,
41
41
  color: e = "default",
42
- dismissLabel: c = "",
43
- icon: a = null,
42
+ dismissLabel: n = "",
43
+ icon: s = null,
44
44
  className: x = ""
45
45
  }) => /* @__PURE__ */ i(
46
46
  "div",
47
47
  {
48
- className: b(
48
+ className: p(
49
49
  `${e ? v[e] : "bg-blue-50"} flex flex-col justify-between items-center gap-4 rounded-xl border border-primary p-2.5 shadow-xs md:flex-row`,
50
50
  x
51
51
  ),
52
52
  children: [
53
53
  /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-4", children: [
54
- g(a) ? /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: a }) : /* @__PURE__ */ t(
55
- p,
54
+ g(s) ? /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: s }) : /* @__PURE__ */ t(
55
+ b,
56
56
  {
57
- icon: a || h[e],
57
+ icon: s || h[e],
58
58
  color: e === "default" || e === "info" ? "gray" : e === "notice" ? "brand" : e,
59
59
  theme: e === "default" || e === "info" ? "modern" : "outline",
60
60
  size: "sm"
61
61
  }
62
62
  ),
63
63
  /* @__PURE__ */ t("div", { className: "flex justify-center items-center flex-1 flex-col", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-center flex-col gap-1 overflow-auto", children: [
64
- /* @__PURE__ */ t("p", { className: `${w[e]} pr-8 text-sm font-semibold md:pr-0`, children: f }),
65
- s && /* @__PURE__ */ t("p", { className: "text-sm text-tertiary", children: s })
64
+ /* @__PURE__ */ t("p", { className: `${w[e]} pr-8 text-sm font-semibold md:pr-0`, children: m }),
65
+ o && /* @__PURE__ */ t("p", { className: "text-sm text-tertiary", children: o })
66
66
  ] }) })
67
67
  ] }),
68
68
  /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2", children: [
69
- (n || r) && /* @__PURE__ */ i("div", { className: "flex gap-3", children: [
70
- r && /* @__PURE__ */ t(d, { size: "xs", onClick: r, color: "link-gray", children: c }),
71
- n && /* @__PURE__ */ t(d, { onClick: n, size: "xs", color: "link-color", children: m })
69
+ (c && a || r && n) && /* @__PURE__ */ i("div", { className: "flex gap-3", children: [
70
+ r && n && /* @__PURE__ */ t(f, { size: "xs", onClick: r, color: "link-gray", children: n }),
71
+ c && a && /* @__PURE__ */ t(f, { onClick: c, size: "xs", color: "link-color", children: a })
72
72
  ] }),
73
- r && /* @__PURE__ */ t(y, { onClick: r, size: "xs", label: c })
73
+ r && /* @__PURE__ */ t(y, { onClick: r, size: "xs", label: n || "Dismiss" })
74
74
  ] })
75
75
  ]
76
76
  }
@@ -15,7 +15,8 @@ export interface EmptyStateHeaderProps extends ComponentPropsWithRef<"div"> {
15
15
  declare const Header: ({ pattern, patternSize, ...props }: EmptyStateHeaderProps) => import("react/jsx-runtime").JSX.Element;
16
16
  declare const Content: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element;
17
17
  declare const Footer: (props: ComponentPropsWithRef<"div">) => import("react/jsx-runtime").JSX.Element;
18
- declare const Title: (props: ComponentPropsWithRef<"h1">) => import("react/jsx-runtime").JSX.Element;
18
+ /** An `h2`: the page around an empty state already has its own `h1`. */
19
+ declare const Title: (props: ComponentPropsWithRef<"h2">) => import("react/jsx-runtime").JSX.Element;
19
20
  declare const Description: (props: ComponentPropsWithRef<"p">) => import("react/jsx-runtime").JSX.Element;
20
21
  declare const EmptyState: typeof Root & {
21
22
  Title: typeof Title;
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/patterns/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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B,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,YAAY,EAAE,OAAO,YAAY,CAAC;CACnC,CAAC;AASF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as x } from "react/jsx-runtime";
2
- import { createContext as d, useContext as m } from "react";
2
+ import { createContext as d, useContext as c } from "react";
3
3
  import { SearchLg as u } from "@untitledui/icons";
4
4
  import { cx as o } from "../../utils/cn.js";
5
5
  import { Circle as f } from "./circle-pattern.js";
@@ -14,14 +14,14 @@ const r = d({ size: "lg" }), N = ({ size: e = "lg", ...t }) => /* @__PURE__ */ s
14
14
  color: e = "gray",
15
15
  theme: t = "modern",
16
16
  icon: a = u,
17
- size: c = "lg",
18
- ...l
17
+ size: l = "lg",
18
+ ...m
19
19
  }) => {
20
- const { size: i } = m(r);
21
- return /* @__PURE__ */ s(g, { ...l, color: e, theme: t, icon: a, size: i === "lg" ? "xl" : c });
20
+ const { size: i } = c(r);
21
+ return /* @__PURE__ */ s(g, { ...m, color: e, theme: t, icon: a, size: i === "lg" ? "xl" : l });
22
22
  }, y = ({ pattern: e = "circle", patternSize: t = "md", ...a }) => {
23
- const { size: c } = m(r);
24
- return /* @__PURE__ */ x("header", { ...a, className: o("relative mb-4", (c === "md" || c === "lg") && "mb-5", a.className), children: [
23
+ const { size: l } = c(r);
24
+ return /* @__PURE__ */ x("header", { ...a, className: o("relative mb-4", (l === "md" || l === "lg") && "mb-5", a.className), children: [
25
25
  e !== "none" && /* @__PURE__ */ s(
26
26
  f,
27
27
  {
@@ -32,9 +32,9 @@ const r = d({ size: "lg" }), N = ({ size: e = "lg", ...t }) => /* @__PURE__ */ s
32
32
  a.children
33
33
  ] });
34
34
  }, b = (e) => {
35
- const { size: t } = m(r);
35
+ const { size: t } = c(r);
36
36
  return /* @__PURE__ */ s(
37
- "main",
37
+ "div",
38
38
  {
39
39
  ...e,
40
40
  className: o(
@@ -44,10 +44,10 @@ const r = d({ size: "lg" }), N = ({ size: e = "lg", ...t }) => /* @__PURE__ */ s
44
44
  )
45
45
  }
46
46
  );
47
- }, h = (e) => /* @__PURE__ */ s("footer", { ...e, className: o("z-10 flex gap-3", e.className) }), C = (e) => {
48
- const { size: t } = m(r);
47
+ }, h = (e) => /* @__PURE__ */ s("footer", { ...e, className: o("z-10 flex gap-3", e.className) }), v = (e) => {
48
+ const { size: t } = c(r);
49
49
  return /* @__PURE__ */ s(
50
- "h1",
50
+ "h2",
51
51
  {
52
52
  ...e,
53
53
  className: o(
@@ -58,15 +58,15 @@ const r = d({ size: "lg" }), N = ({ size: e = "lg", ...t }) => /* @__PURE__ */ s
58
58
  )
59
59
  }
60
60
  );
61
- }, F = (e) => {
62
- const { size: t } = m(r);
61
+ }, C = (e) => {
62
+ const { size: t } = c(r);
63
63
  return /* @__PURE__ */ s("p", { ...e, className: o("text-center text-xs text-tertiary", t === "lg" && "text-sm", e.className) });
64
64
  }, n = N;
65
- n.Title = C;
65
+ n.Title = v;
66
66
  n.Header = y;
67
67
  n.Footer = h;
68
68
  n.Content = b;
69
- n.Description = F;
69
+ n.Description = C;
70
70
  n.FeaturedIcon = z;
71
71
  export {
72
72
  n as EmptyState
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-drawer.d.ts","sourceRoot":"","sources":["../../../src/patterns/expandable-drawer/expandable-drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAQlE,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAM1E,MAAM,WAAW,0BAA0B;IACzC,iFAAiF;IACjF,KAAK,EAAE,0BAA0B,CAAC;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yGAAyG;IACzG,MAAM,CAAC,EAAE,KAAK,CAAC,SAA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AK,CAAC,SAAS,CAAC;IACzB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4GAA4G;IAC5G,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,iFAAiF;IACjF,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA0KtE,CAAC"}
@@ -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,eAAe,GACf,gBAAgB,GAChB,WAAW,GACX,eAAe,CAAC;AACpB,KAAK,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAClG,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC;AAsDjF,QAAA,MAAM,KAAK,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,GAAG,aAAa,EAAE,MAAM,CAAC,CAAC,CA2B/F,CAAC;AA0CF,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,WAAW,CAAE,SAA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,CAAC,SAAS,WAAW,EAAE,oGAS5C,qBAAqB,CAAC,iBAAiB,EAAE,CAAC,CAAC,4CAoC7C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,qBAAqB,CAAC,OAAO,YAAY,CAAC,4CAYzE,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,4BAA4B;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAC;IAClE,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAKD,eAAO,MAAM,GAAG,GAAI,OAAO,iBAAiB,4CA8C3C,CAAC;AAEF,eAAO,MAAM,IAAI;8BAA6B,qBAAqB,CAAC,OAAO,QAAQ,CAAC;mBA9EpD,qBAAqB,CAAC,OAAO,YAAY,CAAC;WA/ClD,CAAC,SAAS,WAAW,sGAS1C,qBAAqB,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,MA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,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,0HAS1B,iBAAiB,4CAuHnB,CAAC"}
@@ -1,44 +1,45 @@
1
1
  import { jsx as n, jsxs as b } from "react/jsx-runtime";
2
- import { useRef as I, useMemo as $ } from "react";
3
- import { ChevronRight as P } from "@untitledui/icons";
4
- import { motion as A } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
5
- import { AnimatePresence as D } from "../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js";
6
- const _ = ({
7
- tree: s,
8
- onToggle: p,
9
- CustomNode: x,
2
+ import { useRef as S, useState as j, useMemo as C, useId as M } from "react";
3
+ import { ChevronRight as _ } from "@untitledui/icons";
4
+ import { motion as D } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
5
+ import { AnimatePresence as B } from "../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js";
6
+ const q = ({
7
+ tree: r,
8
+ onToggle: d,
9
+ CustomNode: v,
10
10
  onNodeClick: c,
11
- selectedNodeId: v,
12
- keyboardNavigation: e,
13
- canSelectNode: d,
14
- "aria-label": m
11
+ selectedNodeId: w,
12
+ keyboardNavigation: t,
13
+ canSelectNode: h,
14
+ "aria-label": f
15
15
  }) => {
16
- const f = I(null), l = $(() => {
17
- const t = [];
18
- function i(a, r = "", h) {
19
- a.forEach((u, g) => {
20
- const O = r ? `${r}-${g}` : String(g);
21
- t.push({ node: u, path: O, parentId: h }), u.isOpen && i(u.children, O, u.id);
16
+ var O;
17
+ const m = S(null), [u, $] = j(null), l = C(() => {
18
+ const i = [];
19
+ function e(s, o = "", A) {
20
+ s.forEach((p, E) => {
21
+ const P = o ? `${o}-${E}` : String(E);
22
+ i.push({ node: p, path: P, parentId: A }), p.isOpen && e(p.children, P, p.id);
22
23
  });
23
24
  }
24
- return i(s), t;
25
- }, [s]);
26
- function o(t) {
27
- var a;
28
- const i = (a = f.current) == null ? void 0 : a.querySelector(
29
- `[data-tree-node-id="${CSS.escape(t)}"]`
25
+ return e(r), i;
26
+ }, [r]);
27
+ function a(i) {
28
+ var s;
29
+ const e = (s = m.current) == null ? void 0 : s.querySelector(
30
+ `[data-tree-node-id="${CSS.escape(i)}"]`
30
31
  );
31
- i == null || i.focus({ preventScroll: !0 }), i == null || i.scrollIntoView({ block: "nearest", behavior: "instant" });
32
+ e == null || e.focus({ preventScroll: !0 }), e == null || e.scrollIntoView({ block: "nearest", behavior: "instant" });
32
33
  }
33
- function w(t) {
34
- if (!e || t.nativeEvent.isComposing) return;
35
- const i = t.target.closest(
34
+ function x(i) {
35
+ if (!t || i.nativeEvent.isComposing) return;
36
+ const e = i.target.closest(
36
37
  "[data-tree-node-id]"
37
- ), a = l.findIndex(
38
- ({ node: g }) => g.id === (i == null ? void 0 : i.dataset.treeNodeId)
38
+ ), s = l.findIndex(
39
+ ({ node: E }) => E.id === (e == null ? void 0 : e.dataset.treeNodeId)
39
40
  );
40
- if (a < 0) return;
41
- const { node: r, path: h, parentId: u } = l[a];
41
+ if (s < 0) return;
42
+ const { node: o, path: A, parentId: p } = l[s];
42
43
  if ([
43
44
  "ArrowDown",
44
45
  "ArrowUp",
@@ -48,111 +49,119 @@ const _ = ({
48
49
  "End",
49
50
  "Enter",
50
51
  " "
51
- ].includes(t.key) && !((t.key === "Enter" || t.key === " ") && t.target.closest("button")))
52
- switch (t.preventDefault(), t.stopPropagation(), t.key) {
52
+ ].includes(i.key) && !((i.key === "Enter" || i.key === " ") && i.target.closest("button")))
53
+ switch (i.preventDefault(), i.stopPropagation(), i.key) {
53
54
  case "ArrowDown":
54
- o(l[(a + 1) % l.length].node.id);
55
+ a(l[Math.min(s + 1, l.length - 1)].node.id);
55
56
  break;
56
57
  case "ArrowUp":
57
- o(
58
- l[(a - 1 + l.length) % l.length].node.id
59
- );
58
+ a(l[Math.max(s - 1, 0)].node.id);
60
59
  break;
61
60
  case "Home":
62
- o(l[0].node.id);
61
+ a(l[0].node.id);
63
62
  break;
64
63
  case "End":
65
- o(l[l.length - 1].node.id);
64
+ a(l[l.length - 1].node.id);
66
65
  break;
67
66
  case "ArrowRight":
68
- r.children.length && !r.isOpen ? p(h) : r.children.length && o(r.children[0].id);
67
+ o.children.length && !o.isOpen ? d(A) : o.children.length && a(o.children[0].id);
69
68
  break;
70
69
  case "ArrowLeft":
71
- r.children.length && r.isOpen ? p(h) : u && o(u);
70
+ o.children.length && o.isOpen ? d(A) : p && a(p);
72
71
  break;
73
72
  default:
74
- (!d || d(r)) && (c == null || c(r));
73
+ (!h || h(o)) && (c == null || c(o));
75
74
  }
76
75
  }
76
+ const I = u && l.some(({ node: i }) => i.id === u) ? u : (O = l[0]) == null ? void 0 : O.node.id;
77
+ function g(i) {
78
+ var s;
79
+ const e = (s = i.target.closest("[data-tree-node-id]")) == null ? void 0 : s.dataset.treeNodeId;
80
+ e && $(e);
81
+ }
77
82
  return /* @__PURE__ */ n(
78
83
  "div",
79
84
  {
80
- ref: f,
81
- role: e ? "tree" : void 0,
82
- "aria-label": e ? m : void 0,
83
- onKeyDown: w,
84
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: s.map((t, i) => /* @__PURE__ */ n(
85
- E,
85
+ ref: m,
86
+ role: t ? "tree" : void 0,
87
+ "aria-label": t ? f : void 0,
88
+ onKeyDown: x,
89
+ onFocus: t ? g : void 0,
90
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: r.map((i, e) => /* @__PURE__ */ n(
91
+ R,
86
92
  {
87
- node: t,
88
- path: String(i),
89
- onToggle: p,
93
+ node: i,
94
+ path: String(e),
95
+ onToggle: d,
90
96
  onNodeClick: c,
91
- CustomNode: x,
92
- keyboardNavigation: e,
93
- selectedNodeId: v,
94
- canSelectNode: d,
97
+ CustomNode: v,
98
+ keyboardNavigation: t,
99
+ selectedNodeId: w,
100
+ canSelectNode: h,
101
+ tabStopId: I,
95
102
  level: 1,
96
- position: i + 1,
97
- siblingCount: s.length
103
+ position: e + 1,
104
+ siblingCount: r.length
98
105
  },
99
- t.id || i
106
+ i.id || e
100
107
  )) })
101
108
  }
102
109
  );
103
- }, E = ({
104
- node: s,
105
- path: p,
106
- onToggle: x,
110
+ }, R = ({
111
+ node: r,
112
+ path: d,
113
+ onToggle: v,
107
114
  onNodeClick: c,
108
- CustomNode: v,
109
- keyboardNavigation: e,
110
- selectedNodeId: d,
111
- canSelectNode: m,
112
- level: f,
113
- position: l,
114
- siblingCount: o
115
+ CustomNode: w,
116
+ keyboardNavigation: t,
117
+ selectedNodeId: h,
118
+ canSelectNode: f,
119
+ tabStopId: m,
120
+ level: u,
121
+ position: $,
122
+ siblingCount: l
115
123
  }) => {
116
- const w = s.children.length > 0, t = d != null && s.id === d, i = (r) => {
117
- r.stopPropagation(), x(p);
118
- }, a = (r) => {
119
- r.stopPropagation(), c == null || c(s);
124
+ const a = r.children.length > 0, x = M(), I = t && a && !!r.isOpen, g = h != null && r.id === h, O = (e) => {
125
+ e.stopPropagation(), v(d);
126
+ }, i = (e) => {
127
+ e.stopPropagation(), c == null || c(r);
120
128
  };
121
129
  return /* @__PURE__ */ b("div", { className: "relative", children: [
122
130
  /* @__PURE__ */ b(
123
131
  "div",
124
132
  {
125
- className: `flex items-center gap-2 py-0.5 ${e ? "rounded-md outline-none hover:bg-primary_hover focus:bg-primary_hover" : ""}`,
126
- "data-tree-node-id": s.id,
127
- role: e ? "treeitem" : void 0,
128
- tabIndex: e ? f === 1 && l === 1 ? 0 : -1 : void 0,
129
- "aria-label": e ? s.label : void 0,
130
- "aria-level": e ? f : void 0,
131
- "aria-posinset": e ? l : void 0,
132
- "aria-setsize": e ? o : void 0,
133
- "aria-expanded": e && w ? !!s.isOpen : void 0,
134
- "aria-selected": e && (!m || m(s)) ? t : void 0,
133
+ className: `flex items-center gap-2 py-0.5 ${t ? "rounded-md outline-none hover:bg-primary_hover focus:bg-primary_hover" : ""}`,
134
+ "data-tree-node-id": r.id,
135
+ role: t ? "treeitem" : void 0,
136
+ tabIndex: t ? r.id === m ? 0 : -1 : void 0,
137
+ "aria-owns": I ? x : void 0,
138
+ "aria-label": t ? r.label : void 0,
139
+ "aria-level": t ? u : void 0,
140
+ "aria-posinset": t ? $ : void 0,
141
+ "aria-setsize": t ? l : void 0,
142
+ "aria-expanded": t && a ? !!r.isOpen : void 0,
143
+ "aria-selected": t && (!f || f(r)) ? g : void 0,
135
144
  children: [
136
145
  /* @__PURE__ */ n(
137
146
  "div",
138
147
  {
139
148
  className: "w-4 h-4 flex-shrink-0",
140
- onClick: (r) => r.stopPropagation(),
141
- children: w && /* @__PURE__ */ n(
149
+ onClick: (e) => e.stopPropagation(),
150
+ children: a && /* @__PURE__ */ n(
142
151
  "button",
143
152
  {
144
153
  type: "button",
145
- tabIndex: e ? -1 : void 0,
146
- onClick: i,
154
+ tabIndex: t ? -1 : void 0,
155
+ onClick: O,
147
156
  className: "cursor-pointer hover:bg-secondary_subtle rounded p-0.5 transition-colors flex items-center justify-center",
148
- "aria-label": s.isOpen ? "Collapse" : "Expand",
157
+ "aria-label": r.isOpen ? "Collapse" : "Expand",
149
158
  children: /* @__PURE__ */ n(
150
- A.div,
159
+ D.div,
151
160
  {
152
161
  initial: !1,
153
- animate: { rotate: s.isOpen ? 90 : 0 },
162
+ animate: { rotate: r.isOpen ? 90 : 0 },
154
163
  transition: { duration: 0.2, ease: "easeOut" },
155
- children: /* @__PURE__ */ n(P, { className: "w-4 h-4 text-[var(--color-gray-400)]" })
164
+ children: /* @__PURE__ */ n(_, { className: "w-4 h-4 text-[var(--color-gray-400)]" })
156
165
  }
157
166
  )
158
167
  }
@@ -162,28 +171,28 @@ const _ = ({
162
171
  /* @__PURE__ */ n(
163
172
  "div",
164
173
  {
165
- onClick: a,
174
+ onClick: i,
166
175
  className: "flex-1 min-w-0 cursor-pointer",
167
- children: /* @__PURE__ */ n(v, { node: s, isSelected: t })
176
+ children: /* @__PURE__ */ n(w, { node: r, isSelected: g })
168
177
  }
169
178
  )
170
179
  ]
171
180
  }
172
181
  ),
173
- /* @__PURE__ */ n(D, { initial: !1, children: w && s.isOpen && /* @__PURE__ */ n(
174
- A.div,
182
+ /* @__PURE__ */ n(B, { initial: !1, children: a && r.isOpen && /* @__PURE__ */ n(
183
+ D.div,
175
184
  {
176
- initial: e ? !1 : { opacity: 0, height: 0 },
185
+ initial: t ? !1 : { opacity: 0, height: 0 },
177
186
  animate: {
178
187
  opacity: 1,
179
188
  height: "auto",
180
189
  transition: {
181
190
  height: {
182
- duration: e ? 0 : 0.1,
191
+ duration: t ? 0 : 0.1,
183
192
  ease: "easeOut"
184
193
  },
185
194
  opacity: {
186
- duration: e ? 0 : 0.1,
195
+ duration: t ? 0 : 0.1,
187
196
  ease: "easeOut"
188
197
  }
189
198
  }
@@ -193,11 +202,11 @@ const _ = ({
193
202
  height: 0,
194
203
  transition: {
195
204
  height: {
196
- duration: e ? 0 : 0.3,
205
+ duration: t ? 0 : 0.3,
197
206
  ease: "easeIn"
198
207
  },
199
208
  opacity: {
200
- duration: e ? 0 : 0.2,
209
+ duration: t ? 0 : 0.2,
201
210
  ease: "easeIn"
202
211
  }
203
212
  }
@@ -205,28 +214,37 @@ const _ = ({
205
214
  style: { overflow: "clip" },
206
215
  children: /* @__PURE__ */ b("div", { className: "ml-6 relative", children: [
207
216
  /* @__PURE__ */ n("div", { className: "absolute left-[-17px] top-[-6px] bottom-0 w-px bg-[var(--color-gray-200)]" }),
208
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: s.children.map((r, h) => /* @__PURE__ */ n(
209
- E,
217
+ /* @__PURE__ */ n(
218
+ "div",
210
219
  {
211
- node: r,
212
- path: `${p}-${h}`,
213
- onToggle: x,
214
- onNodeClick: c,
215
- CustomNode: v,
216
- keyboardNavigation: e,
217
- selectedNodeId: d,
218
- canSelectNode: m,
219
- level: f + 1,
220
- position: h + 1,
221
- siblingCount: s.children.length
222
- },
223
- r.id || `${p}-${h}`
224
- )) })
220
+ id: I ? x : void 0,
221
+ role: t ? "group" : void 0,
222
+ className: "flex flex-col gap-2",
223
+ children: r.children.map((e, s) => /* @__PURE__ */ n(
224
+ R,
225
+ {
226
+ node: e,
227
+ path: `${d}-${s}`,
228
+ onToggle: v,
229
+ onNodeClick: c,
230
+ CustomNode: w,
231
+ keyboardNavigation: t,
232
+ selectedNodeId: h,
233
+ canSelectNode: f,
234
+ tabStopId: m,
235
+ level: u + 1,
236
+ position: s + 1,
237
+ siblingCount: r.children.length
238
+ },
239
+ e.id || `${d}-${s}`
240
+ ))
241
+ }
242
+ )
225
243
  ] })
226
244
  }
227
245
  ) })
228
246
  ] });
229
247
  };
230
248
  export {
231
- _ as IndentedTree
249
+ q as IndentedTree
232
250
  };
@@ -7,7 +7,8 @@ export interface FeaturedIconProps {
7
7
  className?: string;
8
8
  }> | ReactNode;
9
9
  size?: "sm" | "md" | "lg" | "xl";
10
- color: "brand" | "gray" | "success" | "warning" | "error";
10
+ /** @default "brand" */
11
+ color?: "brand" | "gray" | "success" | "warning" | "error";
11
12
  theme?: "light" | "gradient" | "dark" | "outline" | "modern" | "modern-neue";
12
13
  }
13
14
  export declare const FeaturedIcon: (props: FeaturedIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"featured-icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/featured-icon/featured-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA6HhD,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1D,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;CAC9E;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAwBpD,CAAC"}
1
+ {"version":3,"file":"featured-icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/featured-icon/featured-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA6HhD,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,uBAAuB;IACvB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3D,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;CAC9E;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAwBpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pibit.ai/cure-design-system",
3
- "version": "0.6.26",
3
+ "version": "0.6.27",
4
4
  "description": "CURE Design System - React component library",
5
5
  "author": "Pibit",
6
6
  "license": "MIT",