@elcrm/components 0.5.3 → 0.5.5

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 (42) hide show
  1. package/README.md +12 -1
  2. package/dist/{AvatarGroup-Dq-UrOaC.js → AvatarGroup-DeceOhGV.js} +29 -26
  3. package/dist/AvatarGroup.js +1 -1
  4. package/dist/{Breadcrumb-DM_hWw5n.js → Breadcrumb-BexTTfCV.js} +42 -29
  5. package/dist/Breadcrumb.js +1 -1
  6. package/dist/CodeBlock-CZFC4r35.js +37 -0
  7. package/dist/CodeBlock.js +1 -1
  8. package/dist/Dropdown-C9rbsSgR.js +190 -0
  9. package/dist/Dropdown.js +1 -1
  10. package/dist/{Healthmap-Z-LLfGW0.js → Healthmap-B4h6_9Yv.js} +130 -123
  11. package/dist/Healthmap.js +1 -1
  12. package/dist/Layout.css +1 -1
  13. package/dist/Layout.d.ts +3 -1
  14. package/dist/Menu-CR2CclSe.js +76 -0
  15. package/dist/Menu.d.ts +5 -0
  16. package/dist/Menu.js +1 -1
  17. package/dist/PageHead-BjBvWtlk.js +33 -0
  18. package/dist/PageHead.d.ts +7 -1
  19. package/dist/PageHead.js +1 -1
  20. package/dist/{PanelInfo-Db5GCr-c.js → PanelInfo-BTkDUF-p.js} +61 -58
  21. package/dist/PanelInfo.js +1 -1
  22. package/dist/Popover.d.ts +1 -1
  23. package/dist/{PricingTable-BjpGVAhi.js → PricingTable-Dt2wsnEz.js} +56 -53
  24. package/dist/PricingTable.js +1 -1
  25. package/dist/Section-C5XfBTfd.js +48 -0
  26. package/dist/Section.d.ts +8 -1
  27. package/dist/Section.js +1 -1
  28. package/dist/{Sidebar-Bouhd5SS.js → Sidebar-C5vMwV9L.js} +77 -74
  29. package/dist/Sidebar.js +1 -1
  30. package/dist/TabSections-CEM_8Fjy.js +87 -0
  31. package/dist/TabSections.js +1 -1
  32. package/dist/index.css +1 -1
  33. package/dist/index.es.js +12 -12
  34. package/dist/kit-manifest.json +12 -2
  35. package/dist/tokens.css +2 -0
  36. package/package.json +1 -1
  37. package/dist/CodeBlock-B3wvMejv.js +0 -34
  38. package/dist/Dropdown-CR_XxNak.js +0 -185
  39. package/dist/Menu-D2kf7fN_.js +0 -72
  40. package/dist/PageHead-BfClTLrF.js +0 -31
  41. package/dist/Section-PprWjOvt.js +0 -47
  42. package/dist/TabSections-Dppe9wiz.js +0 -84
package/README.md CHANGED
@@ -86,6 +86,17 @@ import { Avatar } from "@elcrm/components/Avatar";
86
86
  import { RadioGroup } from "@elcrm/components/RadioGroup";
87
87
  ```
88
88
 
89
+ ## Темы
90
+
91
+ Готовые пресеты тем живут в отдельном пакете `@elcrm/style`:
92
+
93
+ ```ts
94
+ import "@elcrm/style/panel.css"; // или @elcrm/style/orbit.css
95
+ ```
96
+
97
+ Тема переключается атрибутом `data-theme="light" | "dark"`.
98
+ Токены и геометрия — там же; `@elcrm/components` fallback-цвета не задаёт.
99
+
89
100
  ## Компоненты
90
101
 
91
102
  | | Назначение | Ключевые props |
@@ -795,7 +806,7 @@ const resolve = createLazyResolver(
795
806
  **Узкие (только если нужно иначе)**
796
807
 
797
808
  ```
798
- --layout-height / --layout-padding / --layout-margin / --layout-max-width
809
+ --layout-height / --layout-padding / --layout-main-padding / --layout-margin / --layout-max-width
799
810
  --header-height / --header-z / --header-margin / --header-shadow / --header-radius / --header-border / --header-nav-justify
800
811
  --section-padding / --section-title-size / --section-title-size-md / --section-auth-card-max-width
801
812
  --nav-sections-padding / --nav-sections-nav-width / --nav-sections-main-max-width
@@ -1,11 +1,12 @@
1
1
  import e from "react";
2
+ import { Button as y } from "@elcrm/button";
2
3
  import { A as f } from "./Avatar-eGdLrMCv.js";
3
4
  import { c } from "./cx-CcykAxZN.js";
4
- import './AvatarGroup.css';const C = "lar", I = "lai", P = "lao", x = "lad", G = "las", M = "lam", R = "lal", t = {
5
- root: C,
6
- item: I,
7
- overflow: P,
8
- dadd: x,
5
+ import './AvatarGroup.css';const I = "lar", P = "lai", x = "lao", B = "lad", G = "las", M = "lam", R = "lal", t = {
6
+ root: I,
7
+ item: P,
8
+ overflow: x,
9
+ dadd: B,
9
10
  small: G,
10
11
  middle: M,
11
12
  large: R
@@ -14,30 +15,30 @@ function $(a) {
14
15
  if (a.name != null && a.name !== "") return a.name;
15
16
  if (a.title != null && a.title !== "") return a.title;
16
17
  }
17
- function B({
18
+ function F({
18
19
  items: a,
19
20
  max: s,
20
21
  size: n = "m",
21
22
  add: v = !1,
22
- addLabel: b = "Добавить",
23
+ addLabel: g = "Добавить",
23
24
  onAdd: r,
24
- onValueChange: u,
25
- className: g,
26
- "aria-label": E = "Аватары",
27
- ...h
25
+ onValueChange: i,
26
+ className: b,
27
+ "aria-label": h = "Аватары",
28
+ ...E
28
29
  }) {
29
- const i = n === "s" ? t.small : n === "l" ? t.large : t.middle, k = s != null && s >= 0 ? Math.min(s, a.length) : a.length, m = a.slice(0, k), o = a.length - m.length;
30
+ const u = n === "s" ? t.small : n === "l" ? t.large : t.middle, k = s != null && s >= 0 ? Math.min(s, a.length) : a.length, m = a.slice(0, k), o = a.length - m.length;
30
31
  return /* @__PURE__ */ e.createElement(
31
32
  "div",
32
33
  {
33
- className: c(t.root, g),
34
+ className: c(t.root, b),
34
35
  role: "group",
35
- "aria-label": E,
36
- ...h
36
+ "aria-label": h,
37
+ ...E
37
38
  },
38
- m.map((l, N) => {
39
- const p = $(l), d = l.alt ?? l.title ?? l.name, w = u != null;
40
- return /* @__PURE__ */ e.createElement("span", { key: l.value, className: t.item, style: { zIndex: N + 1 } }, w ? /* @__PURE__ */ e.createElement(
39
+ m.map((l, w) => {
40
+ const p = $(l), d = l.alt ?? l.title ?? l.name, N = i != null;
41
+ return /* @__PURE__ */ e.createElement("span", { key: l.value, className: t.item, style: { zIndex: w + 1 } }, N ? /* @__PURE__ */ e.createElement(
41
42
  f,
42
43
  {
43
44
  as: "button",
@@ -46,8 +47,8 @@ function B({
46
47
  alt: d,
47
48
  size: n,
48
49
  status: l.status,
49
- onClick: (y) => {
50
- y.stopPropagation(), u(l.value);
50
+ onClick: (C) => {
51
+ C.stopPropagation(), i(l.value);
51
52
  }
52
53
  }
53
54
  ) : /* @__PURE__ */ e.createElement(
@@ -61,13 +62,15 @@ function B({
61
62
  }
62
63
  ));
63
64
  }),
64
- o > 0 ? /* @__PURE__ */ e.createElement("span", { className: c(t.overflow, i), "aria-label": `Ещё ${o}` }, "+", o) : null,
65
+ o > 0 ? /* @__PURE__ */ e.createElement("span", { className: c(t.overflow, u), "aria-label": `Ещё ${o}` }, "+", o) : null,
65
66
  v ? /* @__PURE__ */ e.createElement(
66
- "button",
67
+ y,
67
68
  {
68
- type: "button",
69
- className: c(t.dadd, i),
70
- "aria-label": b,
69
+ variant: "ghost",
70
+ size: n,
71
+ width: "s",
72
+ className: c(t.dadd, u),
73
+ "aria-label": g,
71
74
  onClick: (l) => {
72
75
  l.stopPropagation(), r == null || r();
73
76
  }
@@ -77,5 +80,5 @@ function B({
77
80
  );
78
81
  }
79
82
  export {
80
- B as A
83
+ F as A
81
84
  };
@@ -1,4 +1,4 @@
1
- import { A as o } from "./AvatarGroup-Dq-UrOaC.js";
1
+ import { A as o } from "./AvatarGroup-DeceOhGV.js";
2
2
  export {
3
3
  o as AvatarGroup
4
4
  };
@@ -1,13 +1,14 @@
1
1
  import e from "react";
2
+ import { Button as k } from "@elcrm/button";
2
3
  import { c as x } from "./cx-CcykAxZN.js";
3
- import './Breadcrumb.css';const g = "lbr", y = "lbi", B = "lbc", L = "lbn", C = "lbl", F = "lbd", M = "lbs", I = "lbv", S = "lbe", l = {
4
- root: g,
4
+ import './Breadcrumb.css';const B = "lbr", y = "lbi", L = "lbc", C = "lbn", F = "lbl", M = "lbd", z = "lbs", I = "lbv", S = "lbe", l = {
5
+ root: B,
5
6
  item: y,
6
- current: B,
7
- nicon: L,
8
- label: C,
9
- dropdown: F,
10
- sep: M,
7
+ current: L,
8
+ nicon: C,
9
+ label: F,
10
+ dropdown: M,
11
+ sep: z,
11
12
  vbar: I,
12
13
  ellipsis: S
13
14
  };
@@ -38,11 +39,11 @@ function j(t) {
38
39
  }
39
40
  function D(t, a) {
40
41
  if (a == null || a < 1 || t.length <= a + 1)
41
- return t.map((r, c) => ({ kind: "item", item: r, index: c }));
42
- const p = t.slice(0, a).map((r, c) => ({
42
+ return t.map((r, s) => ({ kind: "item", item: r, index: s }));
43
+ const p = t.slice(0, a).map((r, s) => ({
43
44
  kind: "item",
44
45
  item: r,
45
- index: c
46
+ index: s
46
47
  })), o = t[t.length - 1];
47
48
  return [
48
49
  ...p,
@@ -50,49 +51,61 @@ function D(t, a) {
50
51
  { kind: "item", item: o, index: t.length - 1 }
51
52
  ];
52
53
  }
53
- function W({
54
+ function q({
54
55
  items: t,
55
56
  separator: a = "chevron",
56
57
  collapseAfter: p,
57
58
  onEllipsisClick: o,
58
59
  onValueChange: r,
59
- className: c,
60
- ...k
60
+ className: s,
61
+ ...v
61
62
  }) {
62
- const v = D(t, p), N = t.length - 1;
63
- return /* @__PURE__ */ e.createElement("nav", { "aria-label": "Breadcrumb", className: c, ...k }, /* @__PURE__ */ e.createElement("ol", { className: l.root }, v.map((E, b) => {
64
- const s = [];
65
- if (b > 0 && s.push(
63
+ const N = D(t, p), w = t.length - 1;
64
+ return /* @__PURE__ */ e.createElement("nav", { "aria-label": "Breadcrumb", className: s, ...v }, /* @__PURE__ */ e.createElement("ol", { className: l.root }, N.map((h, b) => {
65
+ const c = [];
66
+ if (b > 0 && c.push(
66
67
  /* @__PURE__ */ e.createElement("li", { key: `sep-${b}`, className: l.sep, "aria-hidden": !0 }, j(a))
67
- ), E.kind === "ellipsis")
68
- return s.push(
68
+ ), h.kind === "ellipsis")
69
+ return c.push(
69
70
  /* @__PURE__ */ e.createElement("li", { key: "ellipsis" }, o ? /* @__PURE__ */ e.createElement(
70
- "button",
71
+ k,
71
72
  {
72
- type: "button",
73
+ variant: "ghost",
74
+ size: "s",
75
+ width: "s",
73
76
  className: l.ellipsis,
74
77
  "aria-label": "Показать путь",
75
78
  onClick: o
76
79
  },
77
80
  "…"
78
81
  ) : /* @__PURE__ */ e.createElement("span", { className: l.ellipsis }, "…"))
79
- ), /* @__PURE__ */ e.createElement(e.Fragment, { key: `frag-${b}` }, s);
80
- const { item: n, index: w } = E, m = w === N, u = /* @__PURE__ */ e.createElement(e.Fragment, null, n.icon != null ? /* @__PURE__ */ e.createElement("span", { className: l.nicon }, n.icon) : null, n.label != null ? /* @__PURE__ */ e.createElement("span", { className: l.label }, n.label) : null, n.dropdown ? /* @__PURE__ */ e.createElement($, null) : null), d = x(l.item, m && l.current), f = () => {
81
- var h;
82
- n.disabled || m || ((h = n.onClick) == null || h.call(n), r == null || r(n.value));
82
+ ), /* @__PURE__ */ e.createElement(e.Fragment, { key: `frag-${b}` }, c);
83
+ const { item: n, index: g } = h, m = g === w, d = /* @__PURE__ */ e.createElement(e.Fragment, null, n.icon != null ? /* @__PURE__ */ e.createElement("span", { className: l.nicon }, n.icon) : null, n.label != null ? /* @__PURE__ */ e.createElement("span", { className: l.label }, n.label) : null, n.dropdown ? /* @__PURE__ */ e.createElement($, null) : null), u = x(l.item, m && l.current), E = () => {
84
+ var f;
85
+ n.disabled || m || ((f = n.onClick) == null || f.call(n), r == null || r(n.value));
83
86
  };
84
87
  let i;
85
88
  return m || n.disabled ? i = /* @__PURE__ */ e.createElement(
86
89
  "span",
87
90
  {
88
- className: d,
91
+ className: u,
89
92
  "aria-current": m ? "page" : void 0,
90
93
  "aria-disabled": n.disabled || void 0
91
94
  },
92
- u
93
- ) : n.href != null ? i = /* @__PURE__ */ e.createElement("a", { className: d, href: n.href, onClick: f }, u) : n.onClick != null || r != null || n.dropdown ? i = /* @__PURE__ */ e.createElement("button", { type: "button", className: d, onClick: f }, u) : i = /* @__PURE__ */ e.createElement("span", { className: d }, u), s.push(/* @__PURE__ */ e.createElement("li", { key: n.value }, i)), /* @__PURE__ */ e.createElement(e.Fragment, { key: n.value }, s);
95
+ d
96
+ ) : n.href != null ? i = /* @__PURE__ */ e.createElement("a", { className: u, href: n.href, onClick: E }, d) : n.onClick != null || r != null || n.dropdown ? i = /* @__PURE__ */ e.createElement(
97
+ k,
98
+ {
99
+ variant: "ghost",
100
+ size: "s",
101
+ width: "s",
102
+ className: u,
103
+ onClick: E
104
+ },
105
+ d
106
+ ) : i = /* @__PURE__ */ e.createElement("span", { className: u }, d), c.push(/* @__PURE__ */ e.createElement("li", { key: n.value }, i)), /* @__PURE__ */ e.createElement(e.Fragment, { key: n.value }, c);
94
107
  })));
95
108
  }
96
109
  export {
97
- W as B
110
+ q as B
98
111
  };
@@ -1,4 +1,4 @@
1
- import { B as e } from "./Breadcrumb-DM_hWw5n.js";
1
+ import { B as e } from "./Breadcrumb-BexTTfCV.js";
2
2
  export {
3
3
  e as Breadcrumb
4
4
  };
@@ -0,0 +1,37 @@
1
+ import e from "react";
2
+ import { Button as p } from "@elcrm/button";
3
+ import { c as u } from "./cx-CcykAxZN.js";
4
+ import './CodeBlock.css';const E = "dcr", f = "dcb", N = "dcp", b = "dca", v = "dcc", t = {
5
+ root: E,
6
+ bar: f,
7
+ pre: N,
8
+ actions: b,
9
+ copy: v
10
+ };
11
+ function k({
12
+ title: a,
13
+ code: n,
14
+ children: l,
15
+ onCopy: c,
16
+ copyLabel: r = "Копировать",
17
+ actions: o,
18
+ className: m,
19
+ ...i
20
+ }) {
21
+ const s = typeof r == "string" && r.trim() ? r.trim() : "Копировать", d = l ?? (n != null ? /* @__PURE__ */ e.createElement("code", null, n) : null);
22
+ return /* @__PURE__ */ e.createElement("div", { className: u(t.root, m), ...i }, a != null || c || o ? /* @__PURE__ */ e.createElement("div", { className: t.bar }, /* @__PURE__ */ e.createElement("span", null, a ?? "Код"), /* @__PURE__ */ e.createElement("div", { className: t.actions }, o, c ? /* @__PURE__ */ e.createElement(
23
+ p,
24
+ {
25
+ variant: "ghost",
26
+ size: "s",
27
+ width: "s",
28
+ className: t.copy,
29
+ "aria-label": s,
30
+ onClick: c
31
+ },
32
+ s
33
+ ) : null)) : null, /* @__PURE__ */ e.createElement("pre", { className: t.pre }, d));
34
+ }
35
+ export {
36
+ k as C
37
+ };
package/dist/CodeBlock.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r } from "./CodeBlock-B3wvMejv.js";
1
+ import { C as r } from "./CodeBlock-CZFC4r35.js";
2
2
  export {
3
3
  r as CodeBlock
4
4
  };
@@ -0,0 +1,190 @@
1
+ import n, { useRef as K, useEffect as T } from "react";
2
+ import { Button as S } from "@elcrm/button";
3
+ import { c as u } from "./cx-CcykAxZN.js";
4
+ import { P as W } from "./Popover-xEZoMY-h.js";
5
+ import { h as G } from "./rovingKeys-Di9N1Nct.js";
6
+ import { u as H } from "./Toolbar-Bl9-5Mis.js";
7
+ import { u as $ } from "./useControllableValue-BaE0VR5d.js";
8
+ import { C as w } from "./CheckIcon-FdB8fMEF.js";
9
+ import './Dropdown.css';const J = "ldr", Q = "lda", U = "ldt", X = "ldc", Y = "ldp", Z = "ldh", _ = "ldg", V = "ldd", ee = "ldi", ne = "ldn", te = "ldm", ae = "ldk", le = "ldl", ce = "ldu", oe = "ldb", re = "ldo", se = "ldf", ue = "ldx", de = "ldy", ie = "ldv", fe = "lde", he = "lds", a = {
10
+ root: J,
11
+ anchor: Q,
12
+ trigger: U,
13
+ chevron: X,
14
+ panel: Y,
15
+ heading: Z,
16
+ group: _,
17
+ divider: V,
18
+ item: ee,
19
+ none: ne,
20
+ more: te,
21
+ kcheck: ae,
22
+ label: le,
23
+ ushort: ce,
24
+ bead: oe,
25
+ online: re,
26
+ foff: se,
27
+ xbox: ue,
28
+ yes: de,
29
+ vtick: ie,
30
+ elevated: fe,
31
+ surface: he
32
+ };
33
+ function me() {
34
+ return /* @__PURE__ */ n.createElement("svg", { className: a.chevron, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(
35
+ "path",
36
+ {
37
+ d: "M2.5 4.5 6 8l3.5-3.5",
38
+ fill: "none",
39
+ stroke: "currentColor",
40
+ strokeWidth: "1.5",
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round"
43
+ }
44
+ ));
45
+ }
46
+ function ve() {
47
+ return /* @__PURE__ */ n.createElement("svg", { className: a.more, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(
48
+ "path",
49
+ {
50
+ d: "M4.5 2.5 8 6l-3.5 3.5",
51
+ fill: "none",
52
+ stroke: "currentColor",
53
+ strokeWidth: "1.5",
54
+ strokeLinecap: "round",
55
+ strokeLinejoin: "round"
56
+ }
57
+ ));
58
+ }
59
+ function ke({ item: l }) {
60
+ return l.checkbox ? /* @__PURE__ */ n.createElement("span", { className: u(a.xbox, l.checked && a.yes), "aria-hidden": !0 }, l.checked ? /* @__PURE__ */ n.createElement(w, { className: a.vtick }) : null) : l.checked ? /* @__PURE__ */ n.createElement("span", { className: a.kcheck, "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(w, { className: a.vtick })) : l.status != null ? /* @__PURE__ */ n.createElement(
61
+ "span",
62
+ {
63
+ className: u(a.bead, l.status === "online" ? a.online : a.foff),
64
+ "aria-hidden": !0
65
+ }
66
+ ) : l.icon != null ? /* @__PURE__ */ n.createElement("span", { className: a.none }, l.icon) : null;
67
+ }
68
+ function pe(l, o, c) {
69
+ return o != null && o.length > 0 ? c != null && o[0] && o[0].title == null ? [{ ...o[0], title: c }, ...o.slice(1)] : o : l != null && l.length > 0 ? [{ title: c, items: l }] : c != null ? [{ title: c, items: [] }] : [];
70
+ }
71
+ function we({
72
+ items: l,
73
+ groups: o,
74
+ trigger: c,
75
+ label: d,
76
+ hideChevron: L = !1,
77
+ title: R,
78
+ align: N = "end",
79
+ placement: z = "auto",
80
+ open: B,
81
+ defaultOpen: D = !1,
82
+ onOpenChange: M,
83
+ closeOnSelect: O = !0,
84
+ disabled: i = !1,
85
+ size: P,
86
+ tone: x = "default",
87
+ onValueChange: f,
88
+ className: F
89
+ }) {
90
+ const h = H(), m = P ?? (h == null ? void 0 : h.size), [v = !1, C] = $(
91
+ B,
92
+ D,
93
+ M
94
+ ), y = pe(l, o, R), k = K(null), p = y.flatMap((e) => e.items).filter((e) => !e.disabled).map((e) => e.value), [g, E] = n.useState(p[0] ?? ""), b = x === "account";
95
+ T(() => {
96
+ if (!v) return;
97
+ const e = p[0];
98
+ e && (E(e), requestAnimationFrame(() => {
99
+ var t;
100
+ const r = (t = k.current) == null ? void 0 : t.querySelector(
101
+ `[data-value="${typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e.replace(/"/g, '\\"')}"]`
102
+ );
103
+ r instanceof HTMLElement && r.focus();
104
+ }));
105
+ }, [v]);
106
+ const I = (e) => {
107
+ var t;
108
+ if (e.disabled) return;
109
+ (t = e.onClick) == null || t.call(e), f == null || f(e.value, e), e.checkbox || e.submenu || !O || C(!1);
110
+ };
111
+ return /* @__PURE__ */ n.createElement(
112
+ W,
113
+ {
114
+ className: u(a.root, F),
115
+ open: v,
116
+ onOpenChange: (e) => {
117
+ i || C(e);
118
+ },
119
+ align: N,
120
+ placement: z,
121
+ label: typeof d == "string" ? d : void 0,
122
+ disabled: i,
123
+ role: "menu",
124
+ panelClassName: b ? a.elevated : void 0,
125
+ fitContent: b,
126
+ trigger: (e) => typeof c == "function" ? c(e) : c != null ? /* @__PURE__ */ n.createElement("span", { className: a.anchor, ...e.anchorProps }, c) : /* @__PURE__ */ n.createElement(
127
+ S,
128
+ {
129
+ variant: "ghost",
130
+ size: m,
131
+ width: "s",
132
+ className: a.trigger,
133
+ "data-size": m,
134
+ "data-open": e.open ? "true" : void 0,
135
+ disabled: i,
136
+ ...e.anchorProps
137
+ },
138
+ d,
139
+ L ? null : /* @__PURE__ */ n.createElement(me, null)
140
+ )
141
+ },
142
+ /* @__PURE__ */ n.createElement(
143
+ "div",
144
+ {
145
+ ref: k,
146
+ className: u(a.panel, b && a.surface),
147
+ "data-align": N,
148
+ "data-tone": x,
149
+ onKeyDown: (e) => G(e, {
150
+ values: p,
151
+ value: g,
152
+ vertical: !0,
153
+ focusRoot: k.current,
154
+ onSelect: E
155
+ })
156
+ },
157
+ y.map((e, r) => /* @__PURE__ */ n.createElement(n.Fragment, { key: e.value ?? r }, r > 0 ? /* @__PURE__ */ n.createElement("hr", { className: a.divider }) : null, /* @__PURE__ */ n.createElement("div", { className: a.group, role: "group" }, e.title != null ? /* @__PURE__ */ n.createElement("p", { className: a.heading }, e.title) : null, e.items.map((t) => {
158
+ const j = e.items.some(
159
+ (s) => s.checked || s.checkbox || s.status != null || s.icon != null
160
+ ), q = /* @__PURE__ */ n.createElement(ke, { item: t }), A = t.checkbox === !0 || t.checked != null;
161
+ return /* @__PURE__ */ n.createElement(
162
+ S,
163
+ {
164
+ key: t.value,
165
+ variant: "ghost",
166
+ size: m,
167
+ width: "s",
168
+ role: t.checkbox ? "menuitemcheckbox" : "menuitem",
169
+ className: a.item,
170
+ "data-value": t.value,
171
+ "data-checked": (t.checked || t.checkbox) && t.checked ? "true" : void 0,
172
+ "data-danger": t.danger ? "true" : void 0,
173
+ tabIndex: t.value === g ? 0 : -1,
174
+ disabled: t.disabled,
175
+ "aria-checked": A ? !!t.checked : void 0,
176
+ onClick: () => I(t),
177
+ onFocus: () => E(t.value)
178
+ },
179
+ j ? q ?? /* @__PURE__ */ n.createElement("span", { className: a.none, "aria-hidden": !0 }) : null,
180
+ t.label != null ? /* @__PURE__ */ n.createElement("span", { className: a.label }, t.label) : null,
181
+ t.shortcut != null ? /* @__PURE__ */ n.createElement("span", { className: a.ushort }, t.shortcut) : null,
182
+ t.submenu ? /* @__PURE__ */ n.createElement(ve, null) : null
183
+ );
184
+ }))))
185
+ )
186
+ );
187
+ }
188
+ export {
189
+ we as D
190
+ };
package/dist/Dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as p } from "./Dropdown-CR_XxNak.js";
1
+ import { D as p } from "./Dropdown-C9rbsSgR.js";
2
2
  export {
3
3
  p as Dropdown
4
4
  };