@pibit.ai/cure-design-system 0.6.26 → 0.6.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/hooks/use-escape-layer.d.ts +10 -0
  2. package/dist/hooks/use-escape-layer.d.ts.map +1 -0
  3. package/dist/hooks/use-escape-layer.js +35 -0
  4. package/dist/patterns/alert/alert.d.ts +1 -2
  5. package/dist/patterns/alert/alert.d.ts.map +1 -1
  6. package/dist/patterns/alert/alert.js +22 -22
  7. package/dist/patterns/drawer/drawer.d.ts.map +1 -1
  8. package/dist/patterns/drawer/drawer.js +104 -93
  9. package/dist/patterns/empty-state/empty-state.d.ts +2 -1
  10. package/dist/patterns/empty-state/empty-state.d.ts.map +1 -1
  11. package/dist/patterns/empty-state/empty-state.js +16 -16
  12. package/dist/patterns/expandable-drawer/expandable-drawer.d.ts.map +1 -1
  13. package/dist/patterns/expandable-drawer/expandable-drawer.js +43 -40
  14. package/dist/patterns/filters/checklist-select.js +36 -36
  15. package/dist/patterns/filters/filter-list-section.d.ts.map +1 -1
  16. package/dist/patterns/filters/filter-list-section.js +30 -30
  17. package/dist/patterns/filters/status-filter-dropdown.d.ts.map +1 -1
  18. package/dist/patterns/filters/status-filter-dropdown.js +83 -74
  19. package/dist/patterns/modal/modal-wrapper.d.ts.map +1 -1
  20. package/dist/patterns/modal/modal-wrapper.js +32 -46
  21. package/dist/patterns/sub-sidebar/sub-sidebar.d.ts.map +1 -1
  22. package/dist/patterns/sub-sidebar/sub-sidebar.js +93 -86
  23. package/dist/patterns/tabs/tabs.d.ts.map +1 -1
  24. package/dist/patterns/tabs/tabs.js +33 -36
  25. package/dist/patterns/tree-view/indented-tree.d.ts.map +1 -1
  26. package/dist/patterns/tree-view/indented-tree.js +136 -118
  27. package/dist/primitives/featured-icon/featured-icon.d.ts +2 -1
  28. package/dist/primitives/featured-icon/featured-icon.d.ts.map +1 -1
  29. package/dist/styles/components.css +1 -1
  30. package/package.json +1 -1
@@ -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: I,
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), g = 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 h = (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", h), 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", h), 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 ? g : 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",
@@ -74,32 +77,32 @@ const Z = 512, W = "calc(100vw - 140px)", C = { type: "tween", duration: 0.3, ea
74
77
  tabIndex: 0,
75
78
  onPointerDown: T,
76
79
  onKeyDown: X,
77
- className: "absolute left-0 top-0 z-10 h-full w-2 -translate-x-1 cursor-col-resize touch-none focus-visible:outline-none"
80
+ className: "absolute left-0 top-0 z-10 h-full w-2 -translate-x-1 cursor-col-resize touch-none rounded-full outline-none focus-visible:bg-brand-solid"
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: g, 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: I,
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,51 +1,51 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { MinusSquare as v } from "@untitledui/icons";
3
- import { cx as p } from "../../utils/cn.js";
4
- import { Checkbox as u } from "../../primitives/checkbox/checkbox.js";
5
- import { Button as y } from "../../primitives/button/button.js";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { MinusSquare as N } from "@untitledui/icons";
3
+ import { cx as f } from "../../utils/cn.js";
4
+ import { Checkbox as h } from "../../primitives/checkbox/checkbox.js";
5
+ import { Button as b } from "../../primitives/button/button.js";
6
6
  function D({
7
- options: x,
7
+ options: p,
8
8
  selectedKeys: c,
9
9
  onChange: l,
10
10
  onApply: d,
11
11
  onReset: m,
12
- onClose: n,
13
- className: b
12
+ onClose: o,
13
+ className: y
14
14
  }) {
15
- const a = x.map((e) => e.key).filter(Boolean), i = new Set(c), f = a.length > 0 && i.size === a.length, h = i.size > 0 && i.size < a.length, o = () => {
16
- f || h ? l == null || l([]) : l == null || l(a);
15
+ const s = p.map((e) => e.key).filter(Boolean), t = new Set(c), u = s.length > 0 && t.size === s.length, x = t.size > 0 && t.size < s.length, n = () => {
16
+ u || x ? l == null || l([]) : l == null || l(s);
17
17
  }, k = (e) => {
18
- const t = new Set(c);
19
- t.has(e) ? t.delete(e) : t.add(e), l == null || l(Array.from(t));
18
+ const a = new Set(c);
19
+ a.has(e) ? a.delete(e) : a.add(e), l == null || l(Array.from(a));
20
20
  }, S = () => {
21
- d == null || d(c), n == null || n();
22
- }, N = () => {
21
+ d == null || d(c), o == null || o();
22
+ }, v = () => {
23
23
  m == null || m();
24
24
  };
25
- return /* @__PURE__ */ s(
25
+ return /* @__PURE__ */ i(
26
26
  "div",
27
27
  {
28
- className: p(
28
+ className: f(
29
29
  "flex flex-col rounded-xl bg-primary shadow-sm ring-1 ring-primary",
30
- b
30
+ y
31
31
  ),
32
32
  "data-slot": "checklist-select",
33
33
  children: [
34
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-0 p-3", children: [
35
- /* @__PURE__ */ s(
34
+ /* @__PURE__ */ i("div", { className: "flex flex-col gap-0 p-3", children: [
35
+ /* @__PURE__ */ i(
36
36
  "label",
37
37
  {
38
- className: p(
38
+ className: f(
39
39
  "flex cursor-pointer items-center gap-3 rounded-md py-2 pr-2 pl-0 outline-hidden",
40
40
  "hover:bg-primary_hover"
41
41
  ),
42
42
  children: [
43
- h ? /* @__PURE__ */ r(
44
- v,
43
+ x ? /* @__PURE__ */ r(
44
+ N,
45
45
  {
46
46
  size: 18,
47
- className: "text-utility-brand-600",
48
- onClick: o,
47
+ className: "text-utility-brand-600 rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
48
+ onClick: n,
49
49
  cursor: "pointer",
50
50
  "aria-hidden": !1,
51
51
  role: "checkbox",
@@ -53,14 +53,14 @@ function D({
53
53
  "aria-label": "Select all options",
54
54
  tabIndex: 0,
55
55
  onKeyDown: (e) => {
56
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o());
56
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
57
57
  }
58
58
  }
59
59
  ) : /* @__PURE__ */ r(
60
- u,
60
+ h,
61
61
  {
62
- isSelected: f,
63
- onChange: o,
62
+ isSelected: u,
63
+ onChange: n,
64
64
  size: "sm",
65
65
  "aria-label": "Select all options"
66
66
  }
@@ -69,18 +69,18 @@ function D({
69
69
  ]
70
70
  }
71
71
  ),
72
- x.map((e) => /* @__PURE__ */ s(
72
+ p.map((e) => /* @__PURE__ */ i(
73
73
  "label",
74
74
  {
75
- className: p(
75
+ className: f(
76
76
  "flex cursor-pointer items-center gap-3 rounded-md py-2 pr-2 pl-0 outline-hidden",
77
77
  "hover:bg-primary_hover"
78
78
  ),
79
79
  children: [
80
80
  /* @__PURE__ */ r(
81
- u,
81
+ h,
82
82
  {
83
- isSelected: i.has(e.key),
83
+ isSelected: t.has(e.key),
84
84
  onChange: () => k(e.key),
85
85
  size: "sm",
86
86
  "aria-label": e.value
@@ -92,19 +92,19 @@ function D({
92
92
  e.key
93
93
  ))
94
94
  ] }),
95
- /* @__PURE__ */ s("div", { className: "flex gap-2 border-primary p-3", children: [
95
+ /* @__PURE__ */ i("div", { className: "flex gap-2 border-primary p-3", children: [
96
96
  /* @__PURE__ */ r(
97
- y,
97
+ b,
98
98
  {
99
99
  size: "xs",
100
100
  color: "secondary",
101
101
  className: "flex-1 bg-secondary border-none text-primary",
102
- onClick: N,
102
+ onClick: v,
103
103
  children: "Reset"
104
104
  }
105
105
  ),
106
106
  /* @__PURE__ */ r(
107
- y,
107
+ b,
108
108
  {
109
109
  size: "xs",
110
110
  color: "primary",
@@ -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,33 +1,33 @@
1
1
  import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import { MinusSquare as N } from "@untitledui/icons";
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) {
2
+ import { MinusSquare as y } from "@untitledui/icons";
3
+ import N from "../../primitives/select/SearchInput.js";
4
+ import { Checkbox as u, CheckboxBase as g } from "../../primitives/checkbox/checkbox.js";
5
+ import { Avatar as S } from "../../primitives/avatar/avatar.js";
6
+ function C(r) {
7
7
  return r.label ?? String(r.value ?? "");
8
8
  }
9
- function C(r) {
9
+ function k(r) {
10
10
  return r.value ?? String(r.id ?? "");
11
11
  }
12
- function k(r) {
12
+ function w(r) {
13
13
  return r.id ?? r.value;
14
14
  }
15
- function K({
15
+ function _({
16
16
  title: r,
17
- items: c,
17
+ items: o,
18
18
  selectedValues: i,
19
- selectAll: o,
19
+ selectAll: c,
20
20
  search: l,
21
- placeholder: u = "Search",
22
- showAvatar: h,
23
- getItemLabel: t = S,
24
- getItemValue: f = C,
25
- getItemKey: x = k,
21
+ placeholder: f = "Search",
22
+ showAvatar: m,
23
+ getItemLabel: t = C,
24
+ getItemValue: h = k,
25
+ getItemKey: x = w,
26
26
  onSearchChange: p,
27
27
  onToggleSelectAll: s,
28
28
  onToggleItem: v
29
29
  }) {
30
- const y = c.filter(
30
+ const b = o.filter(
31
31
  (e) => t(e).toLowerCase().includes(l.toLowerCase())
32
32
  );
33
33
  return /* @__PURE__ */ n("div", { children: [
@@ -39,24 +39,24 @@ function K({
39
39
  ] })
40
40
  ] }),
41
41
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
42
- (c.length > 10 || l) && /* @__PURE__ */ a(
43
- g,
42
+ (o.length > 10 || l) && /* @__PURE__ */ a(
43
+ N,
44
44
  {
45
45
  className: "bg-secondary_subtle ring-0 rounded-md",
46
46
  size: "sm",
47
- placeholder: u,
47
+ placeholder: f,
48
48
  value: l,
49
49
  onChange: p
50
50
  }
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(
55
- m,
54
+ c ? /* @__PURE__ */ a(
55
+ u,
56
56
  {
57
57
  className: "cursor-pointer",
58
58
  "aria-label": "Select all",
59
- isSelected: o,
59
+ isSelected: c,
60
60
  onChange: s
61
61
  }
62
62
  ) : /* @__PURE__ */ a(
@@ -70,29 +70,29 @@ function K({
70
70
  onKeyDown: (e) => {
71
71
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s());
72
72
  },
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" })
73
+ className: "h-4 w-4 flex items-center justify-center overflow-hidden cursor-pointer rounded-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
74
+ children: i.length > 0 ? /* @__PURE__ */ a(y, { size: 18, className: "text-utility-brand-600" }) : /* @__PURE__ */ a(g, { isSelected: !1 })
75
75
  }
76
76
  ),
77
77
  /* @__PURE__ */ a("span", { className: "text-sm font-medium text-gray-900", children: "Select All" })
78
78
  ] }),
79
- y.map((e) => {
80
- const d = f(e);
79
+ b.map((e) => {
80
+ const d = h(e);
81
81
  return /* @__PURE__ */ n(
82
82
  "div",
83
83
  {
84
84
  className: "flex items-center gap-3 hover:bg-primary_hover rounded-md p-2",
85
85
  children: [
86
86
  /* @__PURE__ */ a(
87
- m,
87
+ u,
88
88
  {
89
89
  "aria-label": t(e),
90
90
  isSelected: i.includes(d),
91
91
  onChange: () => v(d)
92
92
  }
93
93
  ),
94
- h ? /* @__PURE__ */ a(
95
- b,
94
+ m ? /* @__PURE__ */ a(
95
+ S,
96
96
  {
97
97
  size: "xs",
98
98
  initials: t(e).charAt(0),
@@ -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":"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;AAgBnE,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;AAQpC,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAyP9D,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;AAgBnE,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;AAQpC,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA0Q9D,CAAC"}