@elcrm/components 0.2.14 → 0.5.2

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 (214) hide show
  1. package/README.md +70 -36
  2. package/dist/ActionGroup-DcApj_Mz.js +27 -0
  3. package/dist/ActionGroup.css +1 -1
  4. package/dist/ActionGroup.d.ts +19 -19
  5. package/dist/ActionGroup.js +1 -1
  6. package/dist/Avatar-eGdLrMCv.js +113 -0
  7. package/dist/Avatar.css +1 -1
  8. package/dist/Avatar.d.ts +4 -4
  9. package/dist/Avatar.js +1 -1
  10. package/dist/AvatarGroup-Dq-UrOaC.js +81 -0
  11. package/dist/AvatarGroup.css +1 -1
  12. package/dist/AvatarGroup.d.ts +8 -28
  13. package/dist/AvatarGroup.js +1 -1
  14. package/dist/AvatarName-3B4yCxHn.js +68 -0
  15. package/dist/AvatarName.css +1 -1
  16. package/dist/AvatarName.js +1 -1
  17. package/dist/Badge-BjScAXGy.js +28 -0
  18. package/dist/Badge.css +1 -1
  19. package/dist/Badge.js +1 -1
  20. package/dist/Banner-DAY18FWO.js +34 -0
  21. package/dist/Banner.css +1 -1
  22. package/dist/Banner.js +1 -1
  23. package/dist/Brand-BfCuiyf7.js +34 -0
  24. package/dist/Brand.css +1 -1
  25. package/dist/Brand.d.ts +8 -10
  26. package/dist/Brand.js +1 -1
  27. package/dist/Breadcrumb-DM_hWw5n.js +98 -0
  28. package/dist/Breadcrumb.css +1 -1
  29. package/dist/Breadcrumb.d.ts +8 -5
  30. package/dist/Breadcrumb.js +1 -1
  31. package/dist/Card-a7N8Uh_H.js +12 -0
  32. package/dist/Card.css +1 -1
  33. package/dist/Card.js +1 -1
  34. package/dist/ChatFrame-BdSYRF-B.js +37 -0
  35. package/dist/ChatFrame.css +1 -1
  36. package/dist/ChatList.js +2 -2
  37. package/dist/{ChatMessages-B8rdXiK-.js → ChatMessages-CLxwRGIa.js} +1 -1
  38. package/dist/ChatMessages.js +1 -1
  39. package/dist/ChatSplit-8iw_1Shp.js +21 -0
  40. package/dist/CodeBlock-B3wvMejv.js +34 -0
  41. package/dist/CodeBlock.css +1 -1
  42. package/dist/CodeBlock.js +1 -1
  43. package/dist/Dropdown-CR_XxNak.js +185 -0
  44. package/dist/Dropdown.css +1 -1
  45. package/dist/Dropdown.d.ts +4 -94
  46. package/dist/Dropdown.js +1 -1
  47. package/dist/EmptyState-B_wWPjUu.js +23 -0
  48. package/dist/EmptyState.css +1 -1
  49. package/dist/EmptyState.js +1 -1
  50. package/dist/{Footer-qxUlnPR9.js → Footer-Bgh_JCUe.js} +4 -4
  51. package/dist/Footer.css +1 -1
  52. package/dist/Footer.js +1 -1
  53. package/dist/Header-BMDIi3u2.js +21 -0
  54. package/dist/Header.css +1 -1
  55. package/dist/Header.js +1 -1
  56. package/dist/Healthmap-Z-LLfGW0.js +359 -0
  57. package/dist/Healthmap.css +1 -1
  58. package/dist/Healthmap.d.ts +25 -3
  59. package/dist/Healthmap.js +1 -1
  60. package/dist/{Item-D4okhsfW.js → Item-CGpkMJu0.js} +13 -13
  61. package/dist/Item.css +1 -1
  62. package/dist/Item.d.ts +7 -7
  63. package/dist/Item.js +1 -1
  64. package/dist/ItemColumn-Ch61LqE0.js +41 -0
  65. package/dist/ItemColumn.css +1 -1
  66. package/dist/ItemColumn.js +1 -1
  67. package/dist/Layout-CzEGKl9s.js +31 -0
  68. package/dist/Layout.css +1 -1
  69. package/dist/Layout.d.ts +1 -1
  70. package/dist/Layout.js +1 -1
  71. package/dist/List-D13pqaUY.js +12 -0
  72. package/dist/List.css +1 -1
  73. package/dist/List.js +1 -1
  74. package/dist/Loading-C_CKD-zt.js +16 -0
  75. package/dist/Loading.css +1 -1
  76. package/dist/Loading.js +1 -1
  77. package/dist/Menu-D2kf7fN_.js +72 -0
  78. package/dist/Menu.css +1 -1
  79. package/dist/Menu.d.ts +7 -25
  80. package/dist/Menu.js +1 -1
  81. package/dist/NavSections-CNxxBMPT.js +154 -0
  82. package/dist/NavSections.css +1 -1
  83. package/dist/NavSections.d.ts +16 -28
  84. package/dist/NavSections.js +1 -1
  85. package/dist/PageHead-BfClTLrF.js +31 -0
  86. package/dist/PageHead.css +1 -1
  87. package/dist/PageHead.d.ts +1 -1
  88. package/dist/PageHead.js +1 -1
  89. package/dist/PageShell-BAJges-G.js +30 -0
  90. package/dist/PageShell.css +1 -1
  91. package/dist/PageShell.js +1 -1
  92. package/dist/PanelInfo-Db5GCr-c.js +137 -0
  93. package/dist/PanelInfo.css +1 -1
  94. package/dist/PanelInfo.d.ts +16 -9
  95. package/dist/PanelInfo.js +1 -1
  96. package/dist/Popover-xEZoMY-h.js +143 -0
  97. package/dist/Popover.css +1 -1
  98. package/dist/Popover.d.ts +40 -11
  99. package/dist/Popover.js +1 -1
  100. package/dist/PricingGroup-CWy47MlE.js +138 -0
  101. package/dist/PricingGroup.css +1 -1
  102. package/dist/PricingGroup.d.ts +0 -2
  103. package/dist/PricingGroup.js +1 -1
  104. package/dist/PricingTable-BjpGVAhi.js +157 -0
  105. package/dist/PricingTable.css +1 -1
  106. package/dist/PricingTable.d.ts +4 -7
  107. package/dist/PricingTable.js +1 -1
  108. package/dist/RadioGroup-DI4KKUvZ.js +121 -0
  109. package/dist/RadioGroup.css +1 -1
  110. package/dist/RadioGroup.js +1 -1
  111. package/dist/Section-PprWjOvt.js +47 -0
  112. package/dist/Section.css +1 -1
  113. package/dist/Section.d.ts +29 -9
  114. package/dist/Section.js +1 -1
  115. package/dist/Sidebar-Bouhd5SS.js +205 -0
  116. package/dist/Sidebar.css +1 -1
  117. package/dist/Sidebar.d.ts +18 -26
  118. package/dist/Sidebar.js +1 -1
  119. package/dist/SplitPane-DBa-g9td.js +92 -0
  120. package/dist/SplitPane.css +1 -1
  121. package/dist/SplitPane.d.ts +8 -7
  122. package/dist/SplitPane.js +1 -1
  123. package/dist/Stack-BPTehVYc.js +53 -0
  124. package/dist/Stack.css +1 -1
  125. package/dist/Stack.d.ts +2 -1
  126. package/dist/Stack.js +1 -1
  127. package/dist/Stat-p8j4PjrC.js +28 -0
  128. package/dist/Stat.css +1 -1
  129. package/dist/Stat.js +1 -1
  130. package/dist/TabSections-Dppe9wiz.js +84 -0
  131. package/dist/TabSections.css +1 -1
  132. package/dist/TabSections.d.ts +7 -2
  133. package/dist/TabSections.js +1 -1
  134. package/dist/Table-DqrDUUtb.js +27 -0
  135. package/dist/Table.css +1 -1
  136. package/dist/Table.d.ts +10 -2
  137. package/dist/Table.js +1 -1
  138. package/dist/Text-Bo1u7gVC.js +25 -0
  139. package/dist/Text.css +1 -1
  140. package/dist/Text.js +1 -1
  141. package/dist/TextGroup-236jHxdT.js +23 -0
  142. package/dist/TextGroup.css +1 -1
  143. package/dist/TextGroup.js +1 -1
  144. package/dist/Toolbar-Bl9-5Mis.js +35 -0
  145. package/dist/Toolbar.css +1 -1
  146. package/dist/Toolbar.d.ts +7 -12
  147. package/dist/Toolbar.js +1 -2
  148. package/dist/cx.d.ts +1 -1
  149. package/dist/dark.css +12 -0
  150. package/dist/index.css +40 -40
  151. package/dist/index.d.ts +5 -12
  152. package/dist/index.es.d.ts +5 -12
  153. package/dist/index.es.js +109 -108
  154. package/dist/kit-manifest.json +1646 -0
  155. package/dist/lazyRoute.d.ts +12 -6
  156. package/dist/light.css +12 -0
  157. package/dist/navTree.d.ts +13 -1
  158. package/dist/rovingKeys-Di9N1Nct.js +23 -0
  159. package/dist/rovingKeys.d.ts +7 -1
  160. package/dist/stackGap.d.ts +1 -1
  161. package/dist/tokens.css +13 -0
  162. package/dist/useControllableValue-BaE0VR5d.js +13 -0
  163. package/dist/useControllableValue.d.ts +3 -0
  164. package/package.json +13 -4
  165. package/dist/ActionGroup-ChKFW0mt.js +0 -27
  166. package/dist/Avatar-loGgFt72.js +0 -113
  167. package/dist/AvatarGroup-D1gnT3Od.js +0 -81
  168. package/dist/AvatarName-0BzyfpMq.js +0 -68
  169. package/dist/Badge-jp-9iNNL.js +0 -28
  170. package/dist/Banner-B72lcEMo.js +0 -34
  171. package/dist/Block-Bu7NEA0g.js +0 -8
  172. package/dist/Block.d.ts +0 -30
  173. package/dist/Block.js +0 -4
  174. package/dist/Brand-Zq-Idks4.js +0 -34
  175. package/dist/Breadcrumb-CAM_e9LN.js +0 -98
  176. package/dist/Card-hn37Opo3.js +0 -12
  177. package/dist/ChatFrame-BW2TmCkZ.js +0 -37
  178. package/dist/ChatSplit-DNnu3TNq.js +0 -21
  179. package/dist/CodeBlock-CRzVopIv.js +0 -25
  180. package/dist/Column-BiogBDf8.js +0 -8
  181. package/dist/Column.d.ts +0 -24
  182. package/dist/Column.js +0 -4
  183. package/dist/Dropdown-DosvDR13.js +0 -147
  184. package/dist/EmptyState-mBiWtMIM.js +0 -23
  185. package/dist/Header-DZQopVNy.js +0 -21
  186. package/dist/Healthmap-B6cdiLUl.js +0 -243
  187. package/dist/ItemColumn-M7a9L8CI.js +0 -41
  188. package/dist/Layout-mi6Ghayv.js +0 -31
  189. package/dist/List-BgKkYaGO.js +0 -12
  190. package/dist/Loading-DkkG7RcE.js +0 -16
  191. package/dist/Menu-DuXQv-zT.js +0 -66
  192. package/dist/NavSections-D6rDEtT1.js +0 -142
  193. package/dist/PageHead-DgaJ1mXY.js +0 -31
  194. package/dist/PageShell-D9EZiO8o.js +0 -30
  195. package/dist/PanelInfo-A5y5ysH8.js +0 -81
  196. package/dist/Popover-DWdvZTuA.js +0 -135
  197. package/dist/PricingGroup-Czuhe81Z.js +0 -120
  198. package/dist/PricingTable-BuLC0opK.js +0 -152
  199. package/dist/RadioGroup-fcXzhvMu.js +0 -129
  200. package/dist/Row-DsQOVn18.js +0 -8
  201. package/dist/Row.d.ts +0 -24
  202. package/dist/Row.js +0 -4
  203. package/dist/Section-Crxk2J-E.js +0 -34
  204. package/dist/Sidebar-CYFaPqdC.js +0 -178
  205. package/dist/SplitPane-DR7PCZ8f.js +0 -74
  206. package/dist/Stack-XkmPSswj.js +0 -53
  207. package/dist/Stat-sKXJwz5L.js +0 -27
  208. package/dist/TabSections-DN7yVJoF.js +0 -69
  209. package/dist/Table-BoDr3X2d.js +0 -25
  210. package/dist/Text-zHK2wmsw.js +0 -25
  211. package/dist/TextGroup-DmhuyMR1.js +0 -23
  212. package/dist/Toolbar-C1zAk9ak.js +0 -42
  213. package/dist/rovingKeys-CGlfTtNQ.js +0 -15
  214. package/dist/useControllableValue-CWqH1kpM.js +0 -10
@@ -1,41 +0,0 @@
1
- import e from "react";
2
- import { c as N } from "./cx-CcykAxZN.js";
3
- import './ItemColumn.css';const h = "c7r", v = "c7i", k = "c7b", b = "c7h", x = "c7t", g = "c7x", C = "c7d", F = "c7f", I = "c7p", y = "c7a", L = "c7s", M = "c7l", R = "c7k", l = {
4
- r: h,
5
- i: v,
6
- b: k,
7
- h: b,
8
- t: x,
9
- x: g,
10
- d: C,
11
- f: F,
12
- p: I,
13
- a: y,
14
- s: L,
15
- l: M,
16
- k: R
17
- };
18
- function $({ items: a }) {
19
- const t = a.filter((n) => n != null && n !== !1 && n !== "");
20
- return t.length === 0 ? null : /* @__PURE__ */ e.createElement(e.Fragment, null, t.map((n, c) => /* @__PURE__ */ e.createElement(e.Fragment, { key: c }, c > 0 ? /* @__PURE__ */ e.createElement("span", { className: l.p, "aria-hidden": !0 }, "·") : null, /* @__PURE__ */ e.createElement("span", null, n))));
21
- }
22
- function w({
23
- icon: a,
24
- title: t,
25
- extra: n,
26
- aside: c,
27
- description: s,
28
- footer: o,
29
- meta: m,
30
- size: r = "m",
31
- unread: i,
32
- children: E,
33
- className: d,
34
- ...p
35
- }) {
36
- const f = r === "s" ? l.s : r === "l" ? l.l : void 0, u = o ?? (m != null ? /* @__PURE__ */ e.createElement($, { items: m }) : null);
37
- return /* @__PURE__ */ e.createElement("div", { className: N(l.r, f, i && l.k, d), ...p }, a != null ? /* @__PURE__ */ e.createElement("span", { className: l.i, "aria-hidden": !0 }, a) : null, /* @__PURE__ */ e.createElement("div", { className: l.b }, t != null || n != null ? /* @__PURE__ */ e.createElement("div", { className: l.h }, t != null ? /* @__PURE__ */ e.createElement("span", { className: l.t }, t) : null, n != null ? /* @__PURE__ */ e.createElement("span", { className: l.x }, n) : null) : null, s != null ? /* @__PURE__ */ e.createElement("div", { className: l.d }, s) : null, u != null ? /* @__PURE__ */ e.createElement("div", { className: l.f }, u) : null, E), c != null ? /* @__PURE__ */ e.createElement("div", { className: l.a }, c) : null);
38
- }
39
- export {
40
- w as I
41
- };
@@ -1,31 +0,0 @@
1
- import l from "react";
2
- import { c as a } from "./cx-CcykAxZN.js";
3
- import './Layout.css';const f = "clr", h = "clx", k = "clm", x = "cls", F = "clb", L = "cla", g = "clk", y = "clh", D = "clf", n = {
4
- r: f,
5
- x: h,
6
- m: k,
7
- s: x,
8
- b: F,
9
- a: L,
10
- k: g,
11
- h: y,
12
- f: D
13
- }, p = ["header", "footer", "sidebar"];
14
- function o(e, c) {
15
- return (e ?? p).includes(c);
16
- }
17
- function I({
18
- sidebar: e,
19
- header: c,
20
- footer: t,
21
- fixed: s,
22
- children: b,
23
- className: m,
24
- ...r
25
- }) {
26
- const u = c != null && o(s, "header"), i = t != null && o(s, "footer"), v = e != null && o(s, "sidebar"), E = (s ?? p).length > 0, N = /* @__PURE__ */ l.createElement("main", { className: n.m }, c != null && !u ? c : null, b, t != null && !i ? t : null), d = /* @__PURE__ */ l.createElement(l.Fragment, null, u ? /* @__PURE__ */ l.createElement("div", { className: n.h }, c) : null, N, i ? /* @__PURE__ */ l.createElement("div", { className: n.f }, t) : null);
27
- return e != null ? /* @__PURE__ */ l.createElement("div", { className: a(n.r, n.s, E && n.x, m), ...r }, /* @__PURE__ */ l.createElement("div", { className: a(n.a, v && n.k) }, e), /* @__PURE__ */ l.createElement("div", { className: n.b }, d)) : /* @__PURE__ */ l.createElement("div", { className: a(n.r, E && n.x, m), ...r }, d);
28
- }
29
- export {
30
- I as L
31
- };
@@ -1,12 +0,0 @@
1
- import e from "react";
2
- import { c as n } from "./cx-CcykAxZN.js";
3
- import './List.css';const a = "csr", m = "csh", r = {
4
- r: a,
5
- h: m
6
- };
7
- function f({ row: t, children: c, className: s, ...o }) {
8
- return /* @__PURE__ */ e.createElement("ul", { className: n(r.r, t && r.h, s), ...o }, c);
9
- }
10
- export {
11
- f as L
12
- };
@@ -1,16 +0,0 @@
1
- import e from "react";
2
- import { c as s } from "./cx-CcykAxZN.js";
3
- import './Loading.css';const i = "cgr", n = "cgi", r = {
4
- r: i,
5
- i: n
6
- };
7
- function l({
8
- children: t = "Загрузка…",
9
- className: a,
10
- ...c
11
- }) {
12
- return /* @__PURE__ */ e.createElement("div", { className: s(r.r, a), role: "status", ...c }, /* @__PURE__ */ e.createElement("span", { className: r.i, "aria-hidden": !0 }), t);
13
- }
14
- export {
15
- l as L
16
- };
@@ -1,66 +0,0 @@
1
- import d from "react";
2
- import { B as g } from "./Badge-jp-9iNNL.js";
3
- import { b as x } from "./badgeText-CRzlIzi3.js";
4
- import { c as i } from "./cx-CcykAxZN.js";
5
- import { h as y } from "./rovingKeys-CGlfTtNQ.js";
6
- import './Menu.css';const h = "cmr", k = "cmv", E = "cmi", N = "cmd", w = "cma", B = "cmu", n = {
7
- r: h,
8
- v: k,
9
- i: E,
10
- d: N,
11
- a: w,
12
- u: B
13
- };
14
- function D({
15
- items: s,
16
- vertical: l,
17
- variant: u = "plain",
18
- value: e,
19
- onSelect: c,
20
- children: b,
21
- className: p,
22
- ...m
23
- }) {
24
- const f = (s ?? []).filter((a) => !a.disabled).map((a) => a.value), o = u === "line";
25
- return /* @__PURE__ */ d.createElement(
26
- "nav",
27
- {
28
- className: i(n.r, l && n.v, o && n.u, p),
29
- role: o ? "tablist" : void 0,
30
- onKeyDown: c ? (a) => y(a, {
31
- values: f,
32
- value: e,
33
- onSelect: c,
34
- vertical: l
35
- }) : void 0,
36
- ...m
37
- },
38
- s == null ? void 0 : s.map((a) => {
39
- const r = a.active ?? (e != null && a.value === e), t = x(a.badge);
40
- return /* @__PURE__ */ d.createElement(
41
- "button",
42
- {
43
- key: a.value,
44
- type: "button",
45
- role: o ? "tab" : void 0,
46
- className: i(n.i, r && n.a),
47
- "data-active": r ? "true" : void 0,
48
- "aria-current": o ? void 0 : r ? "page" : void 0,
49
- "aria-selected": o ? r : void 0,
50
- tabIndex: o ? r ? 0 : -1 : void 0,
51
- disabled: a.disabled,
52
- onClick: () => {
53
- var v;
54
- (v = a.onClick) == null || v.call(a), c == null || c(a.value);
55
- }
56
- },
57
- a.label,
58
- t != null ? /* @__PURE__ */ d.createElement(g, { className: n.d, tone: "accent", size: "s" }, t) : null
59
- );
60
- }),
61
- b
62
- );
63
- }
64
- export {
65
- D as M
66
- };
@@ -1,142 +0,0 @@
1
- import e, { useMemo as B, Suspense as D } from "react";
2
- import { c as K } from "./cx-CcykAxZN.js";
3
- import { I as F } from "./Item-D4okhsfW.js";
4
- import { f as I, c as M, a as O, b as P, i as V } from "./navTree-BRyaILN9.js";
5
- import { h as j } from "./rovingKeys-CGlfTtNQ.js";
6
- import { u as y } from "./useControllableValue-CWqH1kpM.js";
7
- import './NavSections.css';const A = "cvr", W = "cvn", $ = "cvg", q = "cvl", z = "cvi", G = "cva", H = "cvc", J = "cvt", Q = "cve", T = "cvs", U = "cvf", X = "cvm", c = {
8
- r: A,
9
- n: W,
10
- g: $,
11
- l: q,
12
- i: z,
13
- a: G,
14
- c: H,
15
- t: J,
16
- e: Q,
17
- s: T,
18
- f: U,
19
- m: X
20
- };
21
- function Y({ className: a }) {
22
- return /* @__PURE__ */ e.createElement("svg", { className: a, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
23
- "path",
24
- {
25
- d: "M2.5 4.5 6 8l3.5-3.5",
26
- fill: "none",
27
- stroke: "currentColor",
28
- strokeWidth: "1.5",
29
- strokeLinecap: "round",
30
- strokeLinejoin: "round"
31
- }
32
- ));
33
- }
34
- function C({
35
- items: a,
36
- value: d,
37
- open: f,
38
- onSelect: m,
39
- onToggle: E
40
- }) {
41
- return /* @__PURE__ */ e.createElement(e.Fragment, null, a.map((t) => {
42
- const v = t.items, s = v != null && v.length > 0, u = s && f.includes(t.value), r = !s && t.value === d;
43
- return /* @__PURE__ */ e.createElement(e.Fragment, { key: t.value }, /* @__PURE__ */ e.createElement(
44
- F,
45
- {
46
- as: "button",
47
- active: r,
48
- className: K(c.i, r && c.a),
49
- "data-active": r ? "true" : void 0,
50
- "data-open": u ? "true" : void 0,
51
- "aria-current": r ? "page" : void 0,
52
- "aria-expanded": s ? u : void 0,
53
- disabled: t.disabled,
54
- onClick: () => {
55
- s ? E(t.value) : m(t.value);
56
- }
57
- },
58
- t.icon != null ? /* @__PURE__ */ e.createElement("span", { className: c.c, "aria-hidden": !0 }, t.icon) : null,
59
- /* @__PURE__ */ e.createElement("span", { className: c.t }, t.label),
60
- s ? /* @__PURE__ */ e.createElement(Y, { className: c.e }) : null
61
- ), s && u ? /* @__PURE__ */ e.createElement("div", { className: c.s }, /* @__PURE__ */ e.createElement(
62
- C,
63
- {
64
- items: v,
65
- value: d,
66
- open: f,
67
- onSelect: m,
68
- onToggle: E
69
- }
70
- )) : null);
71
- }));
72
- }
73
- function le({
74
- groups: a,
75
- resolveSection: d,
76
- value: f,
77
- defaultValue: m,
78
- onValueChange: E,
79
- open: t,
80
- defaultOpen: v,
81
- onOpenChange: s,
82
- loading: u = null,
83
- footer: r,
84
- className: R,
85
- navLabel: S = "Разделы"
86
- }) {
87
- const g = B(
88
- () => m || I(a),
89
- [m, a]
90
- ), [l, b] = y(
91
- f,
92
- g,
93
- E
94
- ), [o = [], N] = y(
95
- t,
96
- M(a, v, l),
97
- s
98
- ), x = O(a).map((n) => n.value), p = e.useRef(l);
99
- e.useEffect(() => {
100
- if (l == null || l === p.current) {
101
- p.current = l;
102
- return;
103
- }
104
- p.current = l;
105
- const i = P(a, l).filter((w) => !o.includes(w));
106
- i.length && N([...o, ...i]);
107
- }, [l, a, o, N]);
108
- const h = (n) => {
109
- N(
110
- o.includes(n) ? o.filter((i) => i !== n) : [...o, n]
111
- );
112
- }, L = (n) => {
113
- V(a, n) ? h(n) : b(n);
114
- }, k = l ? d(l) : null;
115
- return /* @__PURE__ */ e.createElement("div", { className: K(c.r, R) }, /* @__PURE__ */ e.createElement(
116
- "nav",
117
- {
118
- className: c.n,
119
- "aria-label": S,
120
- onKeyDown: (n) => j(n, {
121
- values: x,
122
- value: l,
123
- onSelect: L,
124
- vertical: !0
125
- })
126
- },
127
- a.map((n, i) => /* @__PURE__ */ e.createElement("div", { key: i, className: c.g }, n.label != null ? /* @__PURE__ */ e.createElement("div", { className: c.l }, n.label) : null, /* @__PURE__ */ e.createElement(
128
- C,
129
- {
130
- items: n.items,
131
- value: l,
132
- open: o,
133
- onSelect: b,
134
- onToggle: h
135
- }
136
- ))),
137
- r != null ? /* @__PURE__ */ e.createElement("div", { className: c.f }, r) : null
138
- ), /* @__PURE__ */ e.createElement("div", { className: c.m }, k ? /* @__PURE__ */ e.createElement(D, { fallback: u }, e.createElement(k)) : null));
139
- }
140
- export {
141
- le as N
142
- };
@@ -1,31 +0,0 @@
1
- import c from "react";
2
- import { c as o } from "./cx-CcykAxZN.js";
3
- import './PageHead.css';const u = "ccr", f = "cck", i = "ccw", E = "cct", N = "cch", d = "ccn", h = "ccu", v = "ccs", w = "cca", k = "ccc", e = {
4
- r: u,
5
- k: f,
6
- w: i,
7
- t: E,
8
- h: N,
9
- n: d,
10
- u: h,
11
- s: v,
12
- a: w,
13
- c: k
14
- };
15
- function p(t) {
16
- return !(t == null || t === !1 || t === "" || typeof t == "number" && t === 0 || t === "0");
17
- }
18
- function g({
19
- title: t,
20
- sup: n,
21
- subtitle: a,
22
- actions: l,
23
- sticky: r,
24
- className: m,
25
- children: s
26
- }) {
27
- return /* @__PURE__ */ c.createElement("div", { className: o(e.r, r && e.k, m) }, /* @__PURE__ */ c.createElement("div", { className: e.w }, /* @__PURE__ */ c.createElement("div", { className: e.t }, /* @__PURE__ */ c.createElement("h1", { className: e.h }, /* @__PURE__ */ c.createElement("span", { className: e.n }, t), p(n) ? /* @__PURE__ */ c.createElement("span", { className: e.u }, n) : null), a != null ? /* @__PURE__ */ c.createElement("p", { className: e.s }, a) : null), l != null ? /* @__PURE__ */ c.createElement("div", { className: e.a }, l) : null), s != null ? /* @__PURE__ */ c.createElement("div", { className: e.c }, s) : null);
28
- }
29
- export {
30
- g as P
31
- };
@@ -1,30 +0,0 @@
1
- import e from "react";
2
- import { c as l } from "./cx-CcykAxZN.js";
3
- import './PageShell.css';const m = "ckr", f = "ckw", i = "ckb", k = "ckf", u = "cko", c = {
4
- r: m,
5
- w: f,
6
- b: i,
7
- f: k,
8
- o: u
9
- };
10
- function d({
11
- children: s,
12
- className: n,
13
- wide: o,
14
- scroll: r = !0,
15
- footer: t,
16
- ...a
17
- }) {
18
- return /* @__PURE__ */ e.createElement(
19
- "div",
20
- {
21
- ...a,
22
- className: l(c.r, o && c.w, !r && c.o, n)
23
- },
24
- /* @__PURE__ */ e.createElement("div", { className: c.b }, s),
25
- t != null ? /* @__PURE__ */ e.createElement("div", { className: c.f }, t) : null
26
- );
27
- }
28
- export {
29
- d as P
30
- };
@@ -1,81 +0,0 @@
1
- import e from "react";
2
- import { T as b } from "./TextGroup-DmhuyMR1.js";
3
- import { c as h } from "./cx-CcykAxZN.js";
4
- import { a as B, r as N } from "./overlayZ-BvHbYC1x.js";
5
- import './PanelInfo.css';const x = "pBr", g = "pBs", k = "pBh", I = "pBt", L = "pBa", O = "pBc", z = "pBb", M = "pBf", S = "pBd", n = {
6
- r: x,
7
- s: g,
8
- h: k,
9
- t: I,
10
- a: L,
11
- c: O,
12
- b: z,
13
- f: M,
14
- d: S
15
- }, m = "(max-width: 56rem)";
16
- function T({
17
- open: a,
18
- title: s,
19
- onClose: o,
20
- children: f,
21
- footer: l,
22
- headerExtra: u,
23
- close: v,
24
- "aria-label": y,
25
- className: E
26
- }) {
27
- const [r, p] = e.useState(
28
- () => typeof window < "u" ? window.matchMedia(m).matches : !1
29
- ), [i, d] = e.useState();
30
- e.useEffect(() => {
31
- const t = window.matchMedia(m), c = () => p(t.matches);
32
- return c(), t.addEventListener("change", c), () => t.removeEventListener("change", c);
33
- }, []), e.useEffect(() => {
34
- if (!a || !r) {
35
- d(void 0);
36
- return;
37
- }
38
- const t = B();
39
- return d(t), () => {
40
- N(t), d(void 0);
41
- };
42
- }, [a, r]), e.useEffect(() => {
43
- if (!a) return;
44
- const t = (c) => {
45
- c.key === "Escape" && (c.preventDefault(), o());
46
- };
47
- return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
48
- }, [a, o]), e.useEffect(() => {
49
- if (!a || !r) return;
50
- const t = document.body.style.overflow;
51
- return document.body.style.overflow = "hidden", () => {
52
- document.body.style.overflow = t;
53
- };
54
- }, [a, r]);
55
- const w = y ?? (typeof s == "string" && s.trim() ? s : "Панель");
56
- return /* @__PURE__ */ e.createElement(
57
- "aside",
58
- {
59
- className: h(n.r, E),
60
- "data-open": a ? "true" : "false",
61
- "data-overlay": r ? "true" : "false",
62
- "aria-hidden": !a,
63
- "aria-label": a ? w : void 0,
64
- style: i != null ? { zIndex: i } : void 0
65
- },
66
- a && r ? /* @__PURE__ */ e.createElement("div", { className: n.d, role: "presentation", onClick: o }) : null,
67
- /* @__PURE__ */ e.createElement("div", { className: n.s }, /* @__PURE__ */ e.createElement("div", { className: n.h }, /* @__PURE__ */ e.createElement("div", { className: n.t }, typeof s == "string" || typeof s == "number" ? /* @__PURE__ */ e.createElement(b, { title: String(s), size: "m" }) : s), /* @__PURE__ */ e.createElement("div", { className: n.a }, u, v ?? /* @__PURE__ */ e.createElement(
68
- "button",
69
- {
70
- type: "button",
71
- className: n.c,
72
- "aria-label": "Закрыть",
73
- onClick: o
74
- },
75
- "×"
76
- ))), /* @__PURE__ */ e.createElement("div", { className: n.b }, f), l != null ? /* @__PURE__ */ e.createElement("div", { className: n.f }, l) : null)
77
- );
78
- }
79
- export {
80
- T as P
81
- };
@@ -1,135 +0,0 @@
1
- import u, { useRef as E, useId as Y, useState as N, useLayoutEffect as O, useEffect as S } from "react";
2
- import { createPortal as _ } from "react-dom";
3
- import { c as T } from "./cx-CcykAxZN.js";
4
- import { a as $, r as V } from "./overlayZ-BvHbYC1x.js";
5
- import { u as ee } from "./useControllableValue-CWqH1kpM.js";
6
- import './Popover.css';const te = "c3r", ne = "c3t", oe = "c3p", H = {
7
- r: te,
8
- t: ne,
9
- p: oe
10
- };
11
- function ie(t, e) {
12
- const c = (e == null ? void 0 : e.querySelector("button, a, [role='button']")) ?? (e == null ? void 0 : e.firstElementChild);
13
- return (c instanceof HTMLElement ? c : e ?? t).getBoundingClientRect();
14
- }
15
- function re(t, e) {
16
- return t != null && t.top === e.top && t.left === e.left && t.minWidth === e.minWidth && t.maxHeight === e.maxHeight;
17
- }
18
- function se(t, e, c, p) {
19
- if (!u.isValidElement(t)) return t;
20
- const d = t.props.onClick;
21
- return u.cloneElement(t, {
22
- "aria-haspopup": "menu",
23
- "aria-expanded": e,
24
- "aria-controls": e ? c : void 0,
25
- onClick: (h) => {
26
- d == null || d(h), p();
27
- }
28
- });
29
- }
30
- function fe({
31
- trigger: t,
32
- children: e,
33
- open: c,
34
- defaultOpen: p = !1,
35
- onOpenChange: d,
36
- align: h = "end",
37
- placement: w = "auto",
38
- disabled: W = !1,
39
- label: Z,
40
- role: D = "menu",
41
- className: F,
42
- panelClassName: K
43
- }) {
44
- const x = E(null), b = E(null), g = E(null), y = Y(), [i = !1, j] = ee(
45
- c,
46
- p,
47
- d
48
- ), [m, P] = N(null), [a, k] = N(null), L = E(null);
49
- L.current = a;
50
- const M = (o) => {
51
- W && o || j(o);
52
- };
53
- O(() => {
54
- if (i) {
55
- a == null && k($());
56
- return;
57
- }
58
- a != null && (V(a), k(null));
59
- }, [i, a]), S(() => () => {
60
- L.current != null && V(L.current);
61
- }, []);
62
- const R = () => {
63
- var A;
64
- const o = x.current;
65
- if (!o) return;
66
- const n = ie(o, b.current), r = 8, l = 8, s = ((A = g.current) == null ? void 0 : A.offsetHeight) ?? 0, f = window.innerHeight - n.bottom - r - l, J = n.top - r - l, Q = s > 0 ? s : 160, I = w === "bottom" || w !== "top" && f >= Q, U = Math.min(
67
- 420,
68
- Math.max(120, I ? f : J)
69
- ), v = Math.max(200, n.width), X = h === "end" ? Math.max(8, Math.min(n.right - v, window.innerWidth - v - 8)) : Math.max(8, Math.min(n.left, window.innerWidth - v - 8)), q = { top: I ? n.bottom + r : Math.max(l, n.top - r - (s > 0 ? s : 0)), left: X, minWidth: v, maxHeight: U };
70
- P((B) => re(B, q) ? B : q);
71
- };
72
- O(() => {
73
- if (!i) {
74
- P(null);
75
- return;
76
- }
77
- R();
78
- const o = window.requestAnimationFrame(() => R()), n = () => R();
79
- return window.addEventListener("resize", n), window.addEventListener("scroll", n, !0), () => {
80
- window.cancelAnimationFrame(o), window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0);
81
- };
82
- }, [i, h, w, e]), S(() => {
83
- if (!i) return;
84
- const o = (r) => {
85
- var s, f;
86
- const l = r.target;
87
- (s = x.current) != null && s.contains(l) || (f = g.current) != null && f.contains(l) || M(!1);
88
- }, n = (r) => {
89
- r.key === "Escape" && M(!1);
90
- };
91
- return document.addEventListener("mousedown", o), document.addEventListener("keydown", n), () => {
92
- document.removeEventListener("mousedown", o), document.removeEventListener("keydown", n);
93
- };
94
- }, [i]);
95
- const G = {
96
- position: "fixed",
97
- zIndex: a ?? 1e3,
98
- ...m ? {
99
- top: m.top,
100
- bottom: "auto",
101
- left: m.left,
102
- minWidth: m.minWidth,
103
- maxHeight: m.maxHeight
104
- } : { visibility: "hidden", pointerEvents: "none" }
105
- }, z = i ? /* @__PURE__ */ u.createElement(
106
- "div",
107
- {
108
- ref: g,
109
- id: y,
110
- role: D,
111
- "aria-label": Z,
112
- className: T(H.p, K),
113
- style: G,
114
- onMouseDown: (o) => o.stopPropagation()
115
- },
116
- e
117
- ) : null, C = () => {
118
- W || M(!i);
119
- };
120
- return /* @__PURE__ */ u.createElement("div", { ref: x, className: T(H.r, F) }, /* @__PURE__ */ u.createElement(
121
- "div",
122
- {
123
- ref: b,
124
- className: H.t,
125
- "aria-haspopup": "menu",
126
- "aria-expanded": i,
127
- "aria-controls": i ? y : void 0,
128
- onClick: u.isValidElement(t) ? void 0 : C
129
- },
130
- se(t, i, y, C)
131
- ), z && typeof document < "u" ? _(z, document.body) : null);
132
- }
133
- export {
134
- fe as P
135
- };