@pibit.ai/cure-design-system 0.6.54 → 0.6.57

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,4 +1,5 @@
1
- var e = { exports: {} };
1
+ import { __require as r } from "../node_modules/react-is/index.js";
2
+ var a = r();
2
3
  export {
3
- e as __module
4
+ a as r
4
5
  };
@@ -1,5 +1,4 @@
1
- import { __require as r } from "../node_modules/react-is/index.js";
2
- var a = r();
1
+ var e = { exports: {} };
3
2
  export {
4
- a as r
3
+ e as __module
5
4
  };
@@ -1,5 +1,5 @@
1
1
  import { Children as p } from "react";
2
- import { r as y } from "../../../../_virtual/index2.js";
2
+ import { r as y } from "../../../../_virtual/index.js";
3
3
  import { isNullish as m } from "./DataUtils.js";
4
4
  import { get as f } from "../../../es-toolkit/dist/compat/object/get.js";
5
5
  var u = (r) => typeof r == "string" ? r : r ? r.displayName || r.name || "Component" : "", l = null, n = null, o = (r) => {
@@ -1,4 +1,4 @@
1
- import { __module as r } from "../../../_virtual/index.js";
1
+ import { __module as r } from "../../../_virtual/index2.js";
2
2
  import { __require as o } from "../cjs/use-sync-external-store-shim.production.js";
3
3
  import { __require as i } from "../cjs/use-sync-external-store-shim.development.js";
4
4
  var e;
@@ -1,17 +1,19 @@
1
1
  import { FC, ReactNode } from 'react';
2
+ export type AddActionIconSize = "size-4" | "size-5" | "size-6";
2
3
  /**
3
4
  * Link-style add action ("Add Filter", "Add Filter Group") on the DS Button, kept visually
4
5
  * identical to the raw button it replaces: medium weight, 1.5 gap, caller-driven colour and
5
6
  * font size (the caller's classes land last, so they win over the link variant's defaults).
6
7
  * Like the raw button: the icon takes the label's colour (`currentColor`) rather than the link
7
- * variant's lighter icon shade, and the label is not underlined on hover.
8
+ * variant's lighter icon shade, the icon is `iconSize` (not the Button's 20px), and the label is
9
+ * not underlined on hover.
8
10
  */
9
11
  export declare const AddActionButton: ({ icon: Icon, fontSize, iconSize, className, onClick, children, }: {
10
12
  icon: FC<{
11
13
  className?: string;
12
14
  }>;
13
15
  fontSize: string;
14
- iconSize: string;
16
+ iconSize: AddActionIconSize;
15
17
  className?: string;
16
18
  onClick: () => void;
17
19
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"add-action-button.d.ts","sourceRoot":"","sources":["../../../src/patterns/condition-builder/add-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,mEAO7B;IACC,IAAI,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB,4CAgBA,CAAC"}
1
+ {"version":3,"file":"add-action-button.d.ts","sourceRoot":"","sources":["../../../src/patterns/condition-builder/add-action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAY/D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,mEAO7B;IACC,IAAI,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB,4CAiBA,CAAC"}
@@ -1,30 +1,35 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { cx as c } from "../../utils/cn.js";
3
- import { Button as m } from "../../primitives/button/button.js";
4
- const l = ({
5
- icon: t,
6
- fontSize: o,
7
- iconSize: n,
8
- className: r,
9
- onClick: e,
10
- children: a
11
- }) => /* @__PURE__ */ i(
12
- m,
3
+ import { Button as s } from "../../primitives/button/button.js";
4
+ const d = {
5
+ "size-4": "*:data-icon:size-4",
6
+ "size-5": "*:data-icon:size-5",
7
+ "size-6": "*:data-icon:size-6"
8
+ }, u = ({
9
+ icon: o,
10
+ fontSize: a,
11
+ iconSize: t,
12
+ className: e,
13
+ onClick: i,
14
+ children: n
15
+ }) => /* @__PURE__ */ r(
16
+ s,
13
17
  {
14
18
  type: "button",
15
19
  color: "link-color",
16
20
  size: "sm",
17
- iconLeading: t,
18
- leadingClassName: n,
21
+ iconLeading: o,
22
+ leadingClassName: t,
19
23
  className: c(
20
24
  "gap-1.5 font-medium *:data-icon:text-current hover:*:data-icon:text-current hover:*:data-text:decoration-transparent",
21
- o,
22
- r
25
+ d[t],
26
+ a,
27
+ e
23
28
  ),
24
- onClick: e,
25
- children: a
29
+ onClick: i,
30
+ children: n
26
31
  }
27
32
  );
28
33
  export {
29
- l as AddActionButton
34
+ u as AddActionButton
30
35
  };
@@ -2,6 +2,11 @@ import { FC } from 'react';
2
2
  export interface StatusFilterOption {
3
3
  key: string;
4
4
  label: string;
5
+ /**
6
+ * Heading the option is listed under (multi-select). Consecutive options with the same group share one heading;
7
+ * when no option has a group the list is flat, as before.
8
+ */
9
+ group?: string;
5
10
  }
6
11
  export interface StatusFilters {
7
12
  all: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"status-filter-dropdown.d.ts","sourceRoot":"","sources":["../../../src/patterns/filters/status-filter-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAiBnE,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,KAAK,iCAAiC,GAAG,uBAAuB,GAAG;IACjE,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,oBAAoB,EAAE,aAAa,CAAC;IACpC,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,2GAA2G;IAC3G,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,KAAK,+BAA+B,GAAG,uBAAuB,GAAG;IAC/D,aAAa,EAAE,QAAQ,CAAC;IACxB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC,iCAAiC,GACjC,+BAA+B,CAAC;AAqBpC,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA0Q9D,CAAC"}
1
+ {"version":3,"file":"status-filter-dropdown.d.ts","sourceRoot":"","sources":["../../../src/patterns/filters/status-filter-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAiBnE,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,KAAK,iCAAiC,GAAG,uBAAuB,GAAG;IACjE,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,oBAAoB,EAAE,aAAa,CAAC;IACpC,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,2GAA2G;IAC3G,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,KAAK,+BAA+B,GAAG,uBAAuB,GAAG;IAC/D,aAAa,EAAE,QAAQ,CAAC;IACxB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC,iCAAiC,GACjC,+BAA+B,CAAC;AAgCpC,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA2R9D,CAAC"}
@@ -1,140 +1,147 @@
1
- import { jsx as n, jsxs as s, Fragment as q } from "react/jsx-runtime";
2
- import { useRef as S, useState as I, useLayoutEffect as D } from "react";
3
- import { ChevronDown as P, MinusSquare as $ } from "@untitledui/icons";
4
- import { cx as U } from "../../utils/cn.js";
5
- import { Dropdown as p } from "../../primitives/dropdown/dropdown.js";
6
- import { Button as y } from "../../primitives/button/button.js";
7
- import { RadioButtonBase as W } from "../../primitives/radio/radio.js";
8
- import { EllipsisContentWithTooltip as G } from "../../primitives/tooltip/ellipsis-content.js";
9
- import { CheckboxBase as J } from "../../primitives/checkbox/checkbox.js";
10
- const N = ({ isSelected: t }) => /* @__PURE__ */ n("div", { className: "pointer-events-none", "aria-hidden": !0, children: /* @__PURE__ */ n(J, { isSelected: t }) }), A = ({ label: t }) => /* @__PURE__ */ n(
11
- G,
1
+ import { jsx as n, jsxs as c, Fragment as q } from "react/jsx-runtime";
2
+ import { useRef as A, useState as I, useLayoutEffect as F } from "react";
3
+ import { ChevronDown as P, MinusSquare as U } from "@untitledui/icons";
4
+ import { cx as W } from "../../utils/cn.js";
5
+ import { Dropdown as R } from "../../primitives/dropdown/dropdown.js";
6
+ import { Button as v } from "../../primitives/button/button.js";
7
+ import { RadioButtonBase as G } from "../../primitives/radio/radio.js";
8
+ import { EllipsisContentWithTooltip as J } from "../../primitives/tooltip/ellipsis-content.js";
9
+ import { CheckboxBase as Q } from "../../primitives/checkbox/checkbox.js";
10
+ const V = ({ isSelected: t }) => /* @__PURE__ */ n("div", { className: "pointer-events-none", "aria-hidden": !0, children: /* @__PURE__ */ n(Q, { isSelected: t }) }), X = (t) => {
11
+ const i = [];
12
+ for (const f of t) {
13
+ const h = i[i.length - 1];
14
+ h && h.group === f.group ? h.options.push(f) : i.push({ group: f.group, options: [f] });
15
+ }
16
+ return i;
17
+ }, z = ({ label: t }) => /* @__PURE__ */ n(
18
+ J,
12
19
  {
13
20
  content: t,
14
21
  className: "min-w-0 flex-1",
15
22
  tooltipClassName: "z-[100001]"
16
23
  }
17
- ), oe = (t) => {
24
+ ), se = (t) => {
18
25
  const {
19
- isOpen: u,
20
- onOpenChange: F,
21
- onApply: R,
22
- onReset: V,
23
- className: z,
24
- buttonLabel: d = "Status",
25
- isDisabled: M = !1,
26
- isApplyDisabled: T,
27
- isResetDisabled: E
28
- } = t, i = t.selectionMode === "single", o = i ? t.options : t.statusOptions, a = (o == null ? void 0 : o.length) ?? 0, f = i ? 0 : Object.entries(t.appliedStatusFilters).filter(
29
- ([e, l]) => e !== "all" && l
30
- ).length, L = !i && t.defaultSelectAll === !0, H = (() => {
31
- if (i) {
26
+ isOpen: i,
27
+ onOpenChange: f,
28
+ onApply: h,
29
+ onReset: M,
30
+ className: T,
31
+ buttonLabel: m = "Status",
32
+ isDisabled: E = !1,
33
+ isApplyDisabled: L,
34
+ isResetDisabled: O
35
+ } = t, o = t.selectionMode === "single", s = o ? t.options : t.statusOptions, u = (s == null ? void 0 : s.length) ?? 0, g = o ? 0 : Object.entries(t.appliedStatusFilters).filter(
36
+ ([e, r]) => e !== "all" && r
37
+ ).length, H = !o && t.defaultSelectAll === !0, j = (() => {
38
+ if (o) {
32
39
  const e = t.defaultValue ?? "all";
33
40
  return t.value !== e;
34
41
  }
35
- return a === 0 ? !1 : L ? f < a : f > 0;
36
- })(), m = i ? 0 : Object.entries(t.statusFilters).filter(
37
- ([e, l]) => e !== "all" && l
38
- ).length, b = m === a && a > 0, g = m > 0 && m < a, O = (() => {
39
- var l;
40
- if (!i)
41
- return !(f === a && a > 0) && f > 0 ? `${d} ${f} selected` : d;
42
+ return u === 0 ? !1 : H ? g < u : g > 0;
43
+ })(), x = o ? 0 : Object.entries(t.statusFilters).filter(
44
+ ([e, r]) => e !== "all" && r
45
+ ).length, k = x === u && u > 0, p = x > 0 && x < u, B = (() => {
46
+ var r;
47
+ if (!o)
48
+ return !(g === u && u > 0) && g > 0 ? `${m} ${g} selected` : m;
42
49
  const e = t.defaultValue ?? "all";
43
- return t.value === e ? d : ((l = o.find((c) => c.key === t.value)) == null ? void 0 : l.label) ?? d;
44
- })(), h = S(null), v = S(0), [j, B] = I(
50
+ return t.value === e ? m : ((r = s.find((a) => a.key === t.value)) == null ? void 0 : r.label) ?? m;
51
+ })(), y = A(null), w = A(0), [K, _] = I(
45
52
  () => typeof window > "u" ? 400 : Math.round(window.innerHeight * 0.5)
46
- ), K = i ? t.pendingValue : t.statusFilters;
47
- return D(() => {
48
- if (!u) return;
53
+ ), $ = o ? t.pendingValue : t.statusFilters;
54
+ return F(() => {
55
+ if (!i) return;
49
56
  const e = () => {
50
- B(Math.round(window.innerHeight * 0.5));
57
+ _(Math.round(window.innerHeight * 0.5));
51
58
  };
52
59
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
53
- }, [u]), D(() => {
60
+ }, [i]), F(() => {
54
61
  const e = () => {
55
- h.current && (h.current.scrollTop = v.current);
62
+ y.current && (y.current.scrollTop = w.current);
56
63
  };
57
64
  e();
58
- const l = requestAnimationFrame(e);
59
- return () => cancelAnimationFrame(l);
60
- }, [K]), /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ s(p.Root, { isOpen: u, onOpenChange: F, children: [
65
+ const r = requestAnimationFrame(e);
66
+ return () => cancelAnimationFrame(r);
67
+ }, [$]), /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ c(R.Root, { isOpen: i, onOpenChange: f, children: [
61
68
  /* @__PURE__ */ n(
62
- y,
69
+ v,
63
70
  {
64
71
  size: "xs",
65
72
  color: "secondary",
66
73
  iconTrailing: /* @__PURE__ */ n(P, { size: 12 }),
67
- className: U(
74
+ className: W(
68
75
  "relative",
69
- H && !u && "ring-1 ring-brand-600 bg-brand-primary text-brand-600 hover:bg-brand-primary hover:text-brand-600",
70
- z,
71
- u && "shadow-[0_0_0_4px_rgba(102,112,133,0.14)]"
76
+ j && !i && "ring-1 ring-brand-600 bg-brand-primary text-brand-600 hover:bg-brand-primary hover:text-brand-600",
77
+ T,
78
+ i && "shadow-[0_0_0_4px_rgba(102,112,133,0.14)]"
72
79
  ),
73
- isDisabled: M,
74
- children: O
80
+ isDisabled: E,
81
+ children: B
75
82
  }
76
83
  ),
77
84
  /* @__PURE__ */ n(
78
- p.Popover,
85
+ R.Popover,
79
86
  {
80
87
  className: "overflow-hidden",
81
88
  style: { overflow: "hidden" },
82
- maxHeight: j,
83
- scrollRef: h,
84
- children: /* @__PURE__ */ s("div", { className: "flex max-h-[50vh] flex-col overflow-hidden text-secondary text-xs", children: [
89
+ maxHeight: K,
90
+ scrollRef: y,
91
+ children: /* @__PURE__ */ c("div", { className: "flex max-h-[50vh] flex-col overflow-hidden text-secondary text-xs", children: [
85
92
  /* @__PURE__ */ n(
86
93
  "div",
87
94
  {
88
- ref: h,
95
+ ref: y,
89
96
  className: "min-h-0 flex-1 space-y-3 overflow-x-hidden overflow-y-auto p-3",
90
- role: i ? "radiogroup" : void 0,
91
- "aria-label": i ? d : void 0,
97
+ role: o ? "radiogroup" : void 0,
98
+ "aria-label": o ? m : void 0,
92
99
  onScroll: (e) => {
93
- v.current = e.currentTarget.scrollTop;
100
+ w.current = e.currentTarget.scrollTop;
94
101
  },
95
- children: i ? o.map((e, l) => {
96
- const c = t.pendingValue === e.key, _ = o.some((r) => r.key === t.pendingValue);
97
- return /* @__PURE__ */ s(
102
+ children: o ? s.map((e, r) => {
103
+ const a = t.pendingValue === e.key, b = s.some((l) => l.key === t.pendingValue);
104
+ return /* @__PURE__ */ c(
98
105
  "div",
99
106
  {
100
107
  role: "radio",
101
- "aria-checked": c,
102
- tabIndex: c || !_ && l === 0 ? 0 : -1,
108
+ "aria-checked": a,
109
+ tabIndex: a || !b && r === 0 ? 0 : -1,
103
110
  className: "flex cursor-pointer items-center gap-3 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
104
- onMouseDownCapture: (r) => r.preventDefault(),
111
+ onMouseDownCapture: (l) => l.preventDefault(),
105
112
  onClick: () => t.onValueChange(e.key),
106
- onKeyDown: (r) => {
107
- var w, C;
108
- if (r.key === "Enter" || r.key === " ") {
109
- r.preventDefault(), t.onValueChange(e.key);
113
+ onKeyDown: (l) => {
114
+ var D, N;
115
+ if (l.key === "Enter" || l.key === " ") {
116
+ l.preventDefault(), t.onValueChange(e.key);
110
117
  return;
111
118
  }
112
- const k = r.key === "ArrowDown" || r.key === "ArrowRight" ? 1 : r.key === "ArrowUp" || r.key === "ArrowLeft" ? -1 : 0;
113
- if (!k) return;
114
- r.preventDefault();
115
- const x = (l + k + o.length) % o.length;
116
- t.onValueChange(o[x].key), (C = (w = h.current) == null ? void 0 : w.querySelectorAll('[role="radio"]')[x]) == null || C.focus();
119
+ const C = l.key === "ArrowDown" || l.key === "ArrowRight" ? 1 : l.key === "ArrowUp" || l.key === "ArrowLeft" ? -1 : 0;
120
+ if (!C) return;
121
+ l.preventDefault();
122
+ const S = (r + C + s.length) % s.length;
123
+ t.onValueChange(s[S].key), (N = (D = y.current) == null ? void 0 : D.querySelectorAll('[role="radio"]')[S]) == null || N.focus();
117
124
  },
118
125
  children: [
119
126
  /* @__PURE__ */ n("div", { className: "pointer-events-none", children: /* @__PURE__ */ n(
120
- W,
127
+ G,
121
128
  {
122
129
  size: "sm",
123
- isSelected: c,
130
+ isSelected: a,
124
131
  "aria-hidden": !0
125
132
  }
126
133
  ) }),
127
- /* @__PURE__ */ n(A, { label: e.label })
134
+ /* @__PURE__ */ n(z, { label: e.label })
128
135
  ]
129
136
  },
130
137
  e.key
131
138
  );
132
- }) : /* @__PURE__ */ s(q, { children: [
133
- /* @__PURE__ */ s(
139
+ }) : /* @__PURE__ */ c(q, { children: [
140
+ /* @__PURE__ */ c(
134
141
  "div",
135
142
  {
136
143
  role: "checkbox",
137
- "aria-checked": g ? "mixed" : b,
144
+ "aria-checked": p ? "mixed" : k,
138
145
  tabIndex: 0,
139
146
  className: "flex cursor-pointer items-center gap-3 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
140
147
  onMouseDownCapture: (e) => e.preventDefault(),
@@ -143,65 +150,80 @@ const N = ({ isSelected: t }) => /* @__PURE__ */ n("div", { className: "pointer-
143
150
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t.onStatusChange("all"));
144
151
  },
145
152
  children: [
146
- g ? /* @__PURE__ */ n(
147
- $,
153
+ p ? /* @__PURE__ */ n(
154
+ U,
148
155
  {
149
156
  size: 18,
150
157
  className: "text-utility-brand-600",
151
158
  "aria-hidden": !0
152
159
  }
153
- ) : /* @__PURE__ */ n(N, { isSelected: b }),
160
+ ) : /* @__PURE__ */ n(V, { isSelected: k }),
154
161
  /* @__PURE__ */ n("span", { children: "All" })
155
162
  ]
156
163
  }
157
164
  ),
158
- o.map((e) => /* @__PURE__ */ s(
159
- "div",
160
- {
161
- role: "checkbox",
162
- "aria-checked": t.statusFilters[e.key],
163
- tabIndex: 0,
164
- className: "flex cursor-pointer items-center gap-3 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
165
- onMouseDownCapture: (l) => l.preventDefault(),
166
- onClick: () => t.onStatusChange(e.key),
167
- onKeyDown: (l) => {
168
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), t.onStatusChange(e.key));
165
+ X(s).map(({ group: e, options: r }, a) => {
166
+ const b = r.map((d) => /* @__PURE__ */ c(
167
+ "div",
168
+ {
169
+ role: "checkbox",
170
+ "aria-checked": t.statusFilters[d.key],
171
+ tabIndex: 0,
172
+ className: "flex cursor-pointer items-center gap-3 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
173
+ onMouseDownCapture: (l) => l.preventDefault(),
174
+ onClick: () => t.onStatusChange(d.key),
175
+ onKeyDown: (l) => {
176
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), t.onStatusChange(d.key));
177
+ },
178
+ children: [
179
+ /* @__PURE__ */ n(
180
+ V,
181
+ {
182
+ isSelected: t.statusFilters[d.key]
183
+ }
184
+ ),
185
+ /* @__PURE__ */ n(z, { label: d.label })
186
+ ]
169
187
  },
170
- children: [
171
- /* @__PURE__ */ n(
172
- N,
173
- {
174
- isSelected: t.statusFilters[e.key]
175
- }
176
- ),
177
- /* @__PURE__ */ n(A, { label: e.label })
178
- ]
179
- },
180
- e.key
181
- ))
188
+ d.key
189
+ ));
190
+ return e ? /* @__PURE__ */ c(
191
+ "div",
192
+ {
193
+ role: "group",
194
+ "aria-label": e,
195
+ className: "space-y-3",
196
+ children: [
197
+ /* @__PURE__ */ n("p", { "aria-hidden": !0, className: "pt-1 text-xs font-semibold text-tertiary", children: e }),
198
+ b
199
+ ]
200
+ },
201
+ `${e}-${a}`
202
+ ) : b;
203
+ })
182
204
  ] })
183
205
  }
184
206
  ),
185
- /* @__PURE__ */ s("div", { className: "flex shrink-0 justify-end gap-2 bg-primary p-3", children: [
207
+ /* @__PURE__ */ c("div", { className: "flex shrink-0 justify-end gap-2 bg-primary p-3", children: [
186
208
  /* @__PURE__ */ n(
187
- y,
209
+ v,
188
210
  {
189
211
  size: "xs",
190
212
  color: "secondary",
191
213
  className: "flex-1 p-2",
192
- onClick: V,
193
- isDisabled: E,
214
+ onClick: M,
215
+ isDisabled: O,
194
216
  children: "Reset"
195
217
  }
196
218
  ),
197
219
  /* @__PURE__ */ n(
198
- y,
220
+ v,
199
221
  {
200
222
  size: "xs",
201
223
  color: "primary",
202
224
  className: "flex-1 p-2",
203
- onClick: R,
204
- isDisabled: T,
225
+ onClick: h,
226
+ isDisabled: L,
205
227
  children: "Apply"
206
228
  }
207
229
  )
@@ -212,5 +234,5 @@ const N = ({ isSelected: t }) => /* @__PURE__ */ n("div", { className: "pointer-
212
234
  ] }) });
213
235
  };
214
236
  export {
215
- oe as StatusFilterDropdown
237
+ se as StatusFilterDropdown
216
238
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pibit.ai/cure-design-system",
3
- "version": "0.6.54",
3
+ "version": "0.6.57",
4
4
  "description": "CURE Design System - React component library",
5
5
  "author": "Pibit",
6
6
  "license": "MIT",