@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,98 +0,0 @@
1
- import e from "react";
2
- import { c as x } from "./cx-CcykAxZN.js";
3
- import './Breadcrumb.css';const y = "c0r", w = "c0i", B = "c0c", L = "c0n", C = "c0l", F = "c0d", M = "c0s", $ = "c0v", S = "c0e", l = {
4
- r: y,
5
- i: w,
6
- c: B,
7
- n: L,
8
- l: C,
9
- d: F,
10
- s: M,
11
- v: $,
12
- e: S
13
- };
14
- function Z() {
15
- return /* @__PURE__ */ e.createElement("svg", { className: l.v, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
16
- "path",
17
- {
18
- d: "M4.5 2.5 8 6l-3.5 3.5",
19
- fill: "none",
20
- stroke: "currentColor",
21
- strokeWidth: "1.5",
22
- strokeLinecap: "round",
23
- strokeLinejoin: "round"
24
- }
25
- ));
26
- }
27
- function j() {
28
- return /* @__PURE__ */ e.createElement("svg", { className: l.d, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
29
- "path",
30
- {
31
- d: "M6 1.5 8.5 4.5h-5L6 1.5ZM6 10.5 3.5 7.5h5L6 10.5Z",
32
- fill: "currentColor"
33
- }
34
- ));
35
- }
36
- function D(t) {
37
- return t === "slash" ? "/" : t === "chevron" ? /* @__PURE__ */ e.createElement(Z, null) : t;
38
- }
39
- function H(t, r) {
40
- if (r == null || r < 1 || t.length <= r + 1)
41
- return t.map((a, c) => ({ kind: "item", item: a, index: c }));
42
- const h = t.slice(0, r).map((a, c) => ({
43
- kind: "item",
44
- item: a,
45
- index: c
46
- })), o = t[t.length - 1];
47
- return [
48
- ...h,
49
- { kind: "ellipsis" },
50
- { kind: "item", item: o, index: t.length - 1 }
51
- ];
52
- }
53
- function q({
54
- items: t,
55
- separator: r = "chevron",
56
- collapseAfter: h,
57
- onEllipsisClick: o,
58
- onItemClick: a,
59
- className: c,
60
- ...k
61
- }) {
62
- const N = H(t, h), g = t.length - 1;
63
- return /* @__PURE__ */ e.createElement("nav", { "aria-label": "Breadcrumb", className: c, ...k }, /* @__PURE__ */ e.createElement("ol", { className: l.r }, N.map((E, p) => {
64
- const s = [];
65
- if (p > 0 && s.push(
66
- /* @__PURE__ */ e.createElement("li", { key: `sep-${p}`, className: l.s, "aria-hidden": !0 }, D(r))
67
- ), E.kind === "ellipsis")
68
- return s.push(
69
- /* @__PURE__ */ e.createElement("li", { key: "ellipsis" }, o ? /* @__PURE__ */ e.createElement(
70
- "button",
71
- {
72
- type: "button",
73
- className: l.e,
74
- "aria-label": "Показать путь",
75
- onClick: o
76
- },
77
- "…"
78
- ) : /* @__PURE__ */ e.createElement("span", { className: l.e }, "…"))
79
- ), /* @__PURE__ */ e.createElement(e.Fragment, { key: `frag-${p}` }, s);
80
- const { item: n, index: f } = E, u = f === g, d = /* @__PURE__ */ e.createElement(e.Fragment, null, n.icon != null ? /* @__PURE__ */ e.createElement("span", { className: l.n }, n.icon) : null, n.label != null ? /* @__PURE__ */ e.createElement("span", { className: l.l }, n.label) : null, n.dropdown ? /* @__PURE__ */ e.createElement(j, null) : null), m = x(l.i, u && l.c), b = () => {
81
- var v;
82
- n.disabled || u || ((v = n.onClick) == null || v.call(n), a == null || a(n, f));
83
- };
84
- let i;
85
- return u || n.disabled ? i = /* @__PURE__ */ e.createElement(
86
- "span",
87
- {
88
- className: m,
89
- "aria-current": u ? "page" : void 0,
90
- "aria-disabled": n.disabled || void 0
91
- },
92
- d
93
- ) : n.href != null ? i = /* @__PURE__ */ e.createElement("a", { className: m, href: n.href, onClick: b }, d) : n.onClick != null || a != null || n.dropdown ? i = /* @__PURE__ */ e.createElement("button", { type: "button", className: m, onClick: b }, d) : i = /* @__PURE__ */ e.createElement("span", { className: m }, d), s.push(/* @__PURE__ */ e.createElement("li", { key: n.value }, i)), /* @__PURE__ */ e.createElement(e.Fragment, { key: n.value }, s);
94
- })));
95
- }
96
- export {
97
- q as B
98
- };
@@ -1,12 +0,0 @@
1
- import r from "react";
2
- import { c as s } from "./cx-CcykAxZN.js";
3
- import './Card.css';const o = "cdr", m = "cdt", c = {
4
- r: o,
5
- t: m
6
- };
7
- function i({ title: t, children: e, className: a, ...n }) {
8
- return /* @__PURE__ */ r.createElement("div", { className: s(c.r, a), ...n }, t != null ? /* @__PURE__ */ r.createElement("div", { className: c.t }, t) : null, e);
9
- }
10
- export {
11
- i as C
12
- };
@@ -1,37 +0,0 @@
1
- import e from "react";
2
- import { c as f } from "./cx-CcykAxZN.js";
3
- import './ChatFrame.css';const p = "c8r", u = "c8l", g = "c8g", b = "c8h", h = "c8b", E = "c8f", N = "c8p", c = {
4
- r: p,
5
- l: u,
6
- g,
7
- h: b,
8
- b: h,
9
- f: E,
10
- p: N
11
- };
12
- function x({
13
- variant: l = "messages",
14
- as: n = "section",
15
- header: s,
16
- footer: t,
17
- children: a,
18
- className: r,
19
- bodyRef: o,
20
- onBodyScroll: m,
21
- ...i
22
- }) {
23
- return /* @__PURE__ */ e.createElement(
24
- n,
25
- {
26
- className: f(c.r, l === "list" ? c.l : c.g, r),
27
- ...i
28
- },
29
- s != null ? /* @__PURE__ */ e.createElement("div", { className: c.h }, s) : null,
30
- /* @__PURE__ */ e.createElement("div", { className: c.b, ref: o, onScroll: m }, a),
31
- t != null ? /* @__PURE__ */ e.createElement("div", { className: c.f }, t) : null
32
- );
33
- }
34
- export {
35
- x as C,
36
- c as s
37
- };
@@ -1,21 +0,0 @@
1
- import e from "react";
2
- import { C as s, s as m } from "./ChatFrame-BW2TmCkZ.js";
3
- import { c as l } from "./cx-CcykAxZN.js";
4
- function p({
5
- "aria-label": a = "Диалоги",
6
- ...t
7
- }) {
8
- return /* @__PURE__ */ e.createElement(s, { variant: "list", as: "aside", "aria-label": a, ...t });
9
- }
10
- function f({
11
- list: a,
12
- messages: t,
13
- className: r,
14
- ...i
15
- }) {
16
- return /* @__PURE__ */ e.createElement("div", { className: l(m.p, r), ...i }, a, t);
17
- }
18
- export {
19
- p as C,
20
- f as a
21
- };
@@ -1,25 +0,0 @@
1
- import e from "react";
2
- import { c as u } from "./cx-CcykAxZN.js";
3
- import './CodeBlock.css';const p = "cEr", b = "cEb", d = "cEp", i = "cEa", N = "cEc", c = {
4
- r: p,
5
- b,
6
- p: d,
7
- a: i,
8
- c: N
9
- };
10
- function k({
11
- title: l,
12
- code: n,
13
- children: s,
14
- onCopy: t,
15
- copyLabel: r = "Копировать",
16
- actions: a,
17
- className: m,
18
- ...o
19
- }) {
20
- const E = s ?? (n != null ? /* @__PURE__ */ e.createElement("code", null, n) : null);
21
- return /* @__PURE__ */ e.createElement("div", { className: u(c.r, m), ...o }, l != null || t || a ? /* @__PURE__ */ e.createElement("div", { className: c.b }, /* @__PURE__ */ e.createElement("span", null, l ?? "Код"), /* @__PURE__ */ e.createElement("div", { className: c.a }, a, t ? /* @__PURE__ */ e.createElement("button", { type: "button", className: c.c, onClick: t }, r) : null)) : null, /* @__PURE__ */ e.createElement("pre", { className: c.p }, E));
22
- }
23
- export {
24
- k as C
25
- };
@@ -1,8 +0,0 @@
1
- import o from "react";
2
- import { S as r } from "./Stack-XkmPSswj.js";
3
- function n(t) {
4
- return /* @__PURE__ */ o.createElement(r, { direction: "column", ...t });
5
- }
6
- export {
7
- n as C
8
- };
package/dist/Column.d.ts DELETED
@@ -1,24 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StackProps } from './Stack';
3
- /**
4
- * @deprecated Используйте `Stack` (column по умолчанию).
5
- * Миграция: `elcrm migrate components`.
6
- *
7
- * Вертикальный стек (алиас Stack).
8
- *
9
- * @example
10
- * ```tsx
11
- * // Было:
12
- * <Column gap={12}>…</Column>
13
- * // Стало:
14
- * <Stack gap={12}>…</Stack>
15
- * ```
16
- */
17
- export type ColumnProps = Omit<StackProps, "direction">;
18
- /**
19
- * @deprecated Используйте `Stack` (column по умолчанию).
20
- * Миграция: `elcrm migrate components`.
21
- *
22
- * @see Stack, Block, Row
23
- */
24
- export declare function Column(props: ColumnProps): React.JSX.Element;
package/dist/Column.js DELETED
@@ -1,4 +0,0 @@
1
- import { C as r } from "./Column-BiogBDf8.js";
2
- export {
3
- r as Column
4
- };
@@ -1,147 +0,0 @@
1
- import e from "react";
2
- import { C as E } from "./CheckIcon-FdB8fMEF.js";
3
- import { c as p } from "./cx-CcykAxZN.js";
4
- import { P as M } from "./Popover-DWdvZTuA.js";
5
- import { u as P } from "./Toolbar-C1zAk9ak.js";
6
- import { u as R } from "./useControllableValue-CWqH1kpM.js";
7
- import './Dropdown.css';const T = "crr", W = "crt", F = "crc", G = "crp", V = "crh", q = "crg", A = "crd", H = "cri", J = "crn", K = "crm", Q = "crk", U = "crl", X = "cru", Y = "crb", Z = "cro", _ = "crf", $ = "crx", S = "cry", ee = "crv", n = {
8
- r: T,
9
- t: W,
10
- c: F,
11
- p: G,
12
- h: V,
13
- g: q,
14
- d: A,
15
- i: H,
16
- n: J,
17
- m: K,
18
- k: Q,
19
- l: U,
20
- u: X,
21
- b: Y,
22
- o: Z,
23
- f: _,
24
- x: $,
25
- y: S,
26
- v: ee
27
- };
28
- function ne() {
29
- return /* @__PURE__ */ e.createElement("svg", { className: n.c, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
30
- "path",
31
- {
32
- d: "M2.5 4.5 6 8l3.5-3.5",
33
- fill: "none",
34
- stroke: "currentColor",
35
- strokeWidth: "1.5",
36
- strokeLinecap: "round",
37
- strokeLinejoin: "round"
38
- }
39
- ));
40
- }
41
- function ce() {
42
- return /* @__PURE__ */ e.createElement("svg", { className: n.m, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
43
- "path",
44
- {
45
- d: "M4.5 2.5 8 6l-3.5 3.5",
46
- fill: "none",
47
- stroke: "currentColor",
48
- strokeWidth: "1.5",
49
- strokeLinecap: "round",
50
- strokeLinejoin: "round"
51
- }
52
- ));
53
- }
54
- function re({ item: a }) {
55
- return a.checkbox ? /* @__PURE__ */ e.createElement("span", { className: p(n.x, a.checked && n.y), "aria-hidden": !0 }, a.checked ? /* @__PURE__ */ e.createElement(E, { className: n.v }) : null) : a.checked ? /* @__PURE__ */ e.createElement("span", { className: n.k, "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(E, { className: n.v })) : a.status != null ? /* @__PURE__ */ e.createElement(
56
- "span",
57
- {
58
- className: p(n.b, a.status === "online" ? n.o : n.f),
59
- "aria-hidden": !0
60
- }
61
- ) : a.icon != null ? /* @__PURE__ */ e.createElement("span", { className: n.n }, a.icon) : null;
62
- }
63
- function ae(a, t, l) {
64
- return t != null && t.length > 0 ? l != null && t[0] && t[0].title == null ? [{ ...t[0], title: l }, ...t.slice(1)] : t : a != null && a.length > 0 ? [{ title: l, items: a }] : l != null ? [{ title: l, items: [] }] : [];
65
- }
66
- function ie({
67
- items: a,
68
- groups: t,
69
- trigger: l,
70
- label: o,
71
- hideChevron: v = !1,
72
- title: b,
73
- align: k = "end",
74
- placement: N = "auto",
75
- open: x,
76
- defaultOpen: C = !1,
77
- onOpenChange: y,
78
- closeOnSelect: g = !0,
79
- disabled: u = !1,
80
- size: L,
81
- onSelect: d,
82
- className: z
83
- }) {
84
- const i = P(), w = L ?? (i == null ? void 0 : i.size), [h = !1, f] = R(
85
- x,
86
- C,
87
- y
88
- ), O = ae(a, t, b), B = (r) => {
89
- var c;
90
- if (r.disabled) return;
91
- (c = r.onClick) == null || c.call(r), d == null || d(r.value, r), r.checkbox || r.submenu || !g || f(!1);
92
- }, D = l ?? /* @__PURE__ */ e.createElement(
93
- "button",
94
- {
95
- type: "button",
96
- className: n.t,
97
- "data-size": w,
98
- "data-open": h ? "true" : void 0,
99
- disabled: u,
100
- "aria-haspopup": "menu",
101
- "aria-expanded": h
102
- },
103
- o,
104
- v ? null : /* @__PURE__ */ e.createElement(ne, null)
105
- );
106
- return /* @__PURE__ */ e.createElement(
107
- M,
108
- {
109
- className: p(n.r, z),
110
- open: h,
111
- onOpenChange: (r) => {
112
- u || f(r);
113
- },
114
- align: k,
115
- placement: N,
116
- trigger: D,
117
- label: typeof o == "string" ? o : void 0,
118
- disabled: u
119
- },
120
- /* @__PURE__ */ e.createElement("div", { className: n.p, "data-align": k }, O.map((r, m) => /* @__PURE__ */ e.createElement(e.Fragment, { key: m }, m > 0 ? /* @__PURE__ */ e.createElement("hr", { className: n.d }) : null, /* @__PURE__ */ e.createElement("div", { className: n.g, role: "group" }, r.title != null ? /* @__PURE__ */ e.createElement("p", { className: n.h }, r.title) : null, r.items.map((c) => {
121
- const j = r.items.some(
122
- (s) => s.checked || s.checkbox || s.status != null || s.icon != null
123
- ), I = /* @__PURE__ */ e.createElement(re, { item: c });
124
- return /* @__PURE__ */ e.createElement(
125
- "button",
126
- {
127
- key: c.value,
128
- type: "button",
129
- role: "menuitem",
130
- className: n.i,
131
- "data-checked": (c.checked || c.checkbox) && c.checked ? "true" : void 0,
132
- "data-danger": c.danger ? "true" : void 0,
133
- disabled: c.disabled,
134
- "aria-checked": c.checked != null || c.checkbox ? !!c.checked : void 0,
135
- onClick: () => B(c)
136
- },
137
- j ? I ?? /* @__PURE__ */ e.createElement("span", { className: n.n, "aria-hidden": !0 }) : null,
138
- c.label != null ? /* @__PURE__ */ e.createElement("span", { className: n.l }, c.label) : null,
139
- c.shortcut != null ? /* @__PURE__ */ e.createElement("span", { className: n.u }, c.shortcut) : null,
140
- c.submenu ? /* @__PURE__ */ e.createElement(ce, null) : null
141
- );
142
- })))))
143
- );
144
- }
145
- export {
146
- ie as D
147
- };
@@ -1,23 +0,0 @@
1
- import e from "react";
2
- import { c as u } from "./cx-CcykAxZN.js";
3
- import './EmptyState.css';const o = "cpr", p = "cpi", E = "cpt", d = "cpd", i = "cpa", t = {
4
- r: o,
5
- i: p,
6
- t: E,
7
- d,
8
- a: i
9
- };
10
- function v({
11
- title: l,
12
- description: a,
13
- icon: c,
14
- actions: n,
15
- children: s,
16
- className: r,
17
- ...m
18
- }) {
19
- return /* @__PURE__ */ e.createElement("div", { className: u(t.r, r), role: "status", ...m }, c != null ? /* @__PURE__ */ e.createElement("div", { className: t.i }, c) : null, l != null ? /* @__PURE__ */ e.createElement("h3", { className: t.t }, l) : null, a != null ? /* @__PURE__ */ e.createElement("p", { className: t.d }, a) : null, s, n != null ? /* @__PURE__ */ e.createElement("div", { className: t.a }, n) : null);
20
- }
21
- export {
22
- v as E
23
- };
@@ -1,21 +0,0 @@
1
- import l from "react";
2
- import { c as u } from "./cx-CcykAxZN.js";
3
- import './Header.css';const o = "chr", i = "chn", d = "cha", e = {
4
- r: o,
5
- n: i,
6
- a: d
7
- };
8
- function p({
9
- brand: n,
10
- nav: c,
11
- search: t,
12
- actions: a,
13
- children: r,
14
- className: s,
15
- ...m
16
- }) {
17
- return /* @__PURE__ */ l.createElement("header", { className: u(e.r, s), ...m }, n ?? null, c != null ? /* @__PURE__ */ l.createElement("div", { className: e.n }, c) : null, t ?? null, a != null ? /* @__PURE__ */ l.createElement("div", { className: e.a }, a) : null, r);
18
- }
19
- export {
20
- p as H
21
- };
@@ -1,243 +0,0 @@
1
- import e, { useState as L, useMemo as Y, useEffect as X } from "react";
2
- import { createPortal as ee } from "react-dom";
3
- import { c as j } from "./cx-CcykAxZN.js";
4
- import './Healthmap.css';const te = "hAr", ne = "hAc", se = "hAa", ae = "hAh", le = "hAt", ce = "hAm", re = "hAo", oe = "hAn", me = "hAd", ie = "hAw", ue = "hAk", he = "hAe", pe = "hAf", Ee = "hAi", fe = "hAg", ge = "hAb", ye = "hAp", be = "hAq", ve = "hAv", Ne = "hAl", de = "hAz", Te = "hAj", Ae = "hAu", ke = "hAx", we = "hAs", De = "hAy", n = {
5
- r: te,
6
- c: ne,
7
- a: se,
8
- h: ae,
9
- t: le,
10
- m: ce,
11
- o: re,
12
- n: oe,
13
- d: me,
14
- w: ie,
15
- k: ue,
16
- e: he,
17
- f: pe,
18
- i: Ee,
19
- g: fe,
20
- b: ge,
21
- p: ye,
22
- q: be,
23
- v: ve,
24
- l: Ne,
25
- z: de,
26
- j: Te,
27
- u: Ae,
28
- x: ke,
29
- s: we,
30
- y: De
31
- }, f = 5, _ = 12, B = 3, z = _ + B, Ue = [
32
- "янв",
33
- "фев",
34
- "мар",
35
- "апр",
36
- "май",
37
- "июн",
38
- "июл",
39
- "авг",
40
- "сен",
41
- "окт",
42
- "ноя",
43
- "дек"
44
- ], xe = {
45
- one: "действие",
46
- few: "действия",
47
- many: "действий"
48
- };
49
- function x(t) {
50
- const [l, a, m] = t.split("-").map(Number);
51
- return new Date(Date.UTC(l, a - 1, m));
52
- }
53
- function Ce(t, l) {
54
- if (t <= 0) return 0;
55
- if (l <= 1) return 4;
56
- const a = t / l;
57
- return a > 0.75 ? 4 : a > 0.5 ? 3 : a > 0.25 ? 2 : 1;
58
- }
59
- function T(t, l) {
60
- const a = t % 10, m = t % 100;
61
- return a === 1 && m !== 11 ? l.one : a >= 2 && a <= 4 && (m < 10 || m >= 20) ? l.few : l.many;
62
- }
63
- function $e(t) {
64
- return T(t, { one: "день", few: "дня", many: "дней" });
65
- }
66
- function H(t) {
67
- return x(t).toLocaleDateString("ru-RU", {
68
- weekday: "long",
69
- day: "numeric",
70
- month: "long",
71
- year: "numeric",
72
- timeZone: "UTC"
73
- });
74
- }
75
- function Me(t) {
76
- let l = 0;
77
- for (let a = t.length - 1; a >= 0; a--) {
78
- if (t[a].count <= 0) {
79
- if (l === 0) continue;
80
- break;
81
- }
82
- l++;
83
- }
84
- return l;
85
- }
86
- function Re({
87
- data: t,
88
- loading: l = !1,
89
- year: a = null,
90
- onYearChange: m,
91
- hint: G,
92
- brandName: O = "Активность",
93
- brandSub: I = "сводка",
94
- unit: A = xe,
95
- className: Z
96
- }) {
97
- const [g, k] = L(0), [p, w] = L(null), i = Y(() => {
98
- var P;
99
- if (!((P = t == null ? void 0 : t.days) != null && P.length))
100
- return {
101
- weeks: [],
102
- months: [],
103
- streak: 0,
104
- activeDays: 0,
105
- bestDay: 0
106
- };
107
- const s = Math.max(1, ...t.days.map((o) => o.count)), h = new Map(t.days.map((o) => [o.date, o.count])), c = x(t.from), u = x(t.to), M = c.getUTCDay(), Q = M === 0 ? -6 : 1 - M, r = new Date(c);
108
- r.setUTCDate(r.getUTCDate() + Q);
109
- const E = [], S = [];
110
- let F = -1;
111
- for (; r.getTime() <= u.getTime() || E.length === 0; ) {
112
- const o = [];
113
- for (let U = 0; U < 7; U++) {
114
- const V = r.getUTCFullYear(), N = r.getUTCMonth(), W = r.getUTCDate(), R = `${V}-${String(N + 1).padStart(2, "0")}-${String(W).padStart(2, "0")}`, d = r.getTime() >= c.getTime() && r.getTime() <= u.getTime(), q = d ? h.get(R) ?? 0 : 0;
115
- U === 0 && d && N !== F && (S.push({ label: Ue[N], col: E.length }), F = N), o.push({
116
- date: R,
117
- count: d ? q : 0,
118
- level: d ? Ce(q, s) : 0
119
- }), r.setUTCDate(r.getUTCDate() + 1);
120
- }
121
- if (E.push(o), r.getTime() > u.getTime() && E.length >= 52 || E.length > 60) break;
122
- }
123
- return {
124
- weeks: E,
125
- months: S,
126
- streak: Me(t.days),
127
- activeDays: t.days.filter((o) => o.count > 0).length,
128
- bestDay: Math.max(0, ...t.days.map((o) => o.count))
129
- };
130
- }, [t]), y = Y(() => {
131
- var h;
132
- const s = (h = t == null ? void 0 : t.years) != null && h.length ? [...t.years] : [(/* @__PURE__ */ new Date()).getUTCFullYear(), (/* @__PURE__ */ new Date()).getUTCFullYear() - 1];
133
- return [...new Set(s)].sort((c, u) => u - c);
134
- }, [t == null ? void 0 : t.years]), D = (/* @__PURE__ */ new Date()).getUTCFullYear(), b = a ?? (t == null ? void 0 : t.year) ?? D, C = (t == null ? void 0 : t.total) ?? 0, v = Math.max(1, Math.ceil(y.length / f));
135
- X(() => {
136
- const s = y.indexOf(b);
137
- s < 0 || k(Math.floor(s / f));
138
- }, [b, y]);
139
- const J = y.slice(
140
- g * f,
141
- g * f + f
142
- );
143
- function $(s, h) {
144
- const c = h.getBoundingClientRect();
145
- w({
146
- date: s.date,
147
- count: s.count,
148
- x: c.left + c.width / 2,
149
- y: c.top
150
- });
151
- }
152
- const K = l ? "Загрузка…" : `${C} ${T(C, A)} за ${a == null || a === D ? "последний год" : `${a} год`}`;
153
- return /* @__PURE__ */ e.createElement("div", { className: j(n.r, Z) }, /* @__PURE__ */ e.createElement("section", { className: n.c, "aria-label": "Календарь активности" }, /* @__PURE__ */ e.createElement("div", { className: n.h }, /* @__PURE__ */ e.createElement("h3", { className: n.t }, K)), /* @__PURE__ */ e.createElement(
154
- "div",
155
- {
156
- className: n.m,
157
- "aria-hidden": !0,
158
- style: {
159
- width: i.weeks.length ? i.weeks.length * z - B : void 0
160
- }
161
- },
162
- i.months.map((s) => /* @__PURE__ */ e.createElement(
163
- "span",
164
- {
165
- key: `${s.label}-${s.col}`,
166
- className: n.o,
167
- style: { left: s.col * z }
168
- },
169
- s.label
170
- ))
171
- ), /* @__PURE__ */ e.createElement("div", { className: n.n }, /* @__PURE__ */ e.createElement("div", { className: n.d, "aria-hidden": !0 }, /* @__PURE__ */ e.createElement("span", null, "Пн"), /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("span", null, "Ср"), /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("span", null, "Пт"), /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("span", null)), /* @__PURE__ */ e.createElement(
172
- "div",
173
- {
174
- className: n.w,
175
- style: {
176
- gridTemplateColumns: `repeat(${i.weeks.length}, ${_}px)`
177
- },
178
- role: "grid",
179
- "aria-label": "График активности"
180
- },
181
- i.weeks.map((s, h) => /* @__PURE__ */ e.createElement("div", { key: h, className: n.k, role: "row" }, s.map((c) => /* @__PURE__ */ e.createElement(
182
- "button",
183
- {
184
- key: c.date,
185
- type: "button",
186
- className: n.e,
187
- "data-level": c.level,
188
- role: "gridcell",
189
- "aria-label": `${H(c.date)}: ${c.count} ${T(c.count, A)}`,
190
- onMouseEnter: (u) => $(c, u.currentTarget),
191
- onMouseLeave: () => w(null),
192
- onFocus: (u) => $(c, u.currentTarget),
193
- onBlur: () => w(null)
194
- }
195
- ))))
196
- )), /* @__PURE__ */ e.createElement("div", { className: n.f }, /* @__PURE__ */ e.createElement("span", { className: n.i }, G ?? ""), /* @__PURE__ */ e.createElement("nav", { className: n.z, "aria-label": "Год" }, v > 1 ? /* @__PURE__ */ e.createElement(
197
- "button",
198
- {
199
- type: "button",
200
- className: n.u,
201
- "aria-label": "Предыдущие годы",
202
- disabled: g <= 0,
203
- onClick: () => k((s) => Math.max(0, s - 1))
204
- },
205
- "‹"
206
- ) : null, /* @__PURE__ */ e.createElement("div", { className: n.j, role: "tablist" }, J.map((s) => /* @__PURE__ */ e.createElement(
207
- "button",
208
- {
209
- key: s,
210
- type: "button",
211
- role: "tab",
212
- "aria-selected": s === b,
213
- className: j(n.x, s === b && n.s),
214
- onClick: () => m == null ? void 0 : m(s === D ? null : s)
215
- },
216
- s
217
- ))), v > 1 ? /* @__PURE__ */ e.createElement(
218
- "button",
219
- {
220
- type: "button",
221
- className: n.u,
222
- "aria-label": "Следующие годы",
223
- disabled: g >= v - 1,
224
- onClick: () => k((s) => Math.min(v - 1, s + 1))
225
- },
226
- "›"
227
- ) : null), /* @__PURE__ */ e.createElement("div", { className: n.g, "aria-hidden": !0 }, /* @__PURE__ */ e.createElement("span", null, "Меньше"), [0, 1, 2, 3, 4].map((s) => /* @__PURE__ */ e.createElement("span", { key: s, className: n.e, "data-level": s })), /* @__PURE__ */ e.createElement("span", null, "Больше")))), /* @__PURE__ */ e.createElement("aside", { className: n.a, "aria-label": "Сводка" }, /* @__PURE__ */ e.createElement("div", { className: n.b }, /* @__PURE__ */ e.createElement("span", null, O), /* @__PURE__ */ e.createElement("span", null, I)), /* @__PURE__ */ e.createElement("div", { className: n.p }, /* @__PURE__ */ e.createElement("div", { className: n.q }, /* @__PURE__ */ e.createElement("span", { className: n.v }, l ? "—" : i.streak), /* @__PURE__ */ e.createElement("span", { className: n.l }, "серия, ", $e(i.streak))), /* @__PURE__ */ e.createElement("div", { className: n.q }, /* @__PURE__ */ e.createElement("span", { className: n.v }, l ? "—" : i.activeDays), /* @__PURE__ */ e.createElement("span", { className: n.l }, "активных дней")), /* @__PURE__ */ e.createElement("div", { className: n.q }, /* @__PURE__ */ e.createElement("span", { className: n.v }, l ? "—" : i.bestDay), /* @__PURE__ */ e.createElement("span", { className: n.l }, "макс. за день")))), p ? ee(
228
- /* @__PURE__ */ e.createElement(
229
- "div",
230
- {
231
- className: n.y,
232
- style: { left: p.x, top: p.y },
233
- role: "tooltip"
234
- },
235
- /* @__PURE__ */ e.createElement("div", null, H(p.date)),
236
- /* @__PURE__ */ e.createElement("div", null, p.count, " ", T(p.count, A))
237
- ),
238
- document.body
239
- ) : null);
240
- }
241
- export {
242
- Re as H
243
- };