@elcrm/components 0.1.2 → 0.2.1

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 (91) hide show
  1. package/README.md +66 -2
  2. package/dist/ActionGroup.css +1 -1
  3. package/dist/Avatar.d.ts +2 -1
  4. package/dist/AvatarGroup.d.ts +2 -1
  5. package/dist/AvatarName-0BzyfpMq.js +68 -0
  6. package/dist/AvatarName.css +1 -1
  7. package/dist/AvatarName.d.ts +4 -1
  8. package/dist/AvatarName.js +1 -1
  9. package/dist/Badge.d.ts +2 -1
  10. package/dist/Card.css +1 -1
  11. package/dist/ChatFrame-BW2TmCkZ.js +37 -0
  12. package/dist/ChatFrame.css +1 -0
  13. package/dist/ChatList.d.ts +9 -0
  14. package/dist/ChatList.js +7 -0
  15. package/dist/ChatMessages-B8rdXiK-.js +19 -0
  16. package/dist/ChatMessages.d.ts +9 -0
  17. package/dist/ChatMessages.js +4 -0
  18. package/dist/ChatSplit-DNnu3TNq.js +21 -0
  19. package/dist/CheckIcon-FdB8fMEF.js +17 -0
  20. package/dist/CheckIcon.d.ts +8 -0
  21. package/dist/Dropdown-4yUB2tk1.js +142 -0
  22. package/dist/Dropdown.css +1 -1
  23. package/dist/Dropdown.js +1 -1
  24. package/dist/Footer.css +1 -1
  25. package/dist/Item.css +1 -1
  26. package/dist/ItemColumn.css +1 -1
  27. package/dist/ItemColumn.d.ts +2 -1
  28. package/dist/Layout-mi6Ghayv.js +31 -0
  29. package/dist/Layout.css +1 -1
  30. package/dist/Layout.d.ts +19 -2
  31. package/dist/Layout.js +1 -1
  32. package/dist/Loading-DkkG7RcE.js +16 -0
  33. package/dist/Loading.css +1 -1
  34. package/dist/Loading.d.ts +1 -1
  35. package/dist/Loading.js +1 -1
  36. package/dist/Menu-DuXQv-zT.js +66 -0
  37. package/dist/Menu.css +1 -1
  38. package/dist/Menu.js +1 -1
  39. package/dist/NavSections-BpyZPimZ.js +79 -0
  40. package/dist/NavSections.css +1 -1
  41. package/dist/NavSections.js +1 -1
  42. package/dist/PageHead.css +1 -1
  43. package/dist/Popover-D0m5JWIt.js +142 -0
  44. package/dist/Popover.css +1 -1
  45. package/dist/Popover.js +1 -1
  46. package/dist/PricingGroup-Czuhe81Z.js +120 -0
  47. package/dist/PricingGroup.css +1 -1
  48. package/dist/PricingGroup.js +1 -1
  49. package/dist/{PricingTable-DALddSwM.js → PricingTable-BuLC0opK.js} +69 -75
  50. package/dist/PricingTable.css +1 -1
  51. package/dist/PricingTable.js +1 -1
  52. package/dist/RadioGroup-fcXzhvMu.js +129 -0
  53. package/dist/RadioGroup.css +1 -1
  54. package/dist/RadioGroup.js +1 -1
  55. package/dist/Sidebar-CBYq1ad6.js +107 -0
  56. package/dist/Sidebar.css +1 -1
  57. package/dist/Sidebar.d.ts +17 -1
  58. package/dist/Sidebar.js +1 -1
  59. package/dist/{Stat-C5iZyEoo.js → Stat-sKXJwz5L.js} +5 -5
  60. package/dist/Stat.css +1 -1
  61. package/dist/Stat.js +1 -1
  62. package/dist/TabSections-DN7yVJoF.js +69 -0
  63. package/dist/TabSections.css +1 -1
  64. package/dist/TabSections.js +1 -1
  65. package/dist/TextGroup.d.ts +2 -1
  66. package/dist/badgeText-CRzlIzi3.js +8 -0
  67. package/dist/badgeText.d.ts +4 -0
  68. package/dist/dark.css +4 -1
  69. package/dist/index.css +21 -19
  70. package/dist/index.d.ts +10 -1
  71. package/dist/index.es.d.ts +10 -1
  72. package/dist/index.es.js +51 -44
  73. package/dist/light.css +4 -1
  74. package/dist/rovingKeys-CGlfTtNQ.js +15 -0
  75. package/dist/rovingKeys.d.ts +13 -0
  76. package/dist/tokens.css +35 -14
  77. package/dist/types.d.ts +2 -0
  78. package/dist/useControllableValue-CWqH1kpM.js +10 -0
  79. package/dist/useControllableValue.d.ts +4 -0
  80. package/package.json +5 -1
  81. package/dist/AvatarName-C1sIDPH-.js +0 -66
  82. package/dist/Dropdown-CQBMF9aR.js +0 -151
  83. package/dist/Layout-BQwEaeO0.js +0 -22
  84. package/dist/Loading-ChGq9peU.js +0 -15
  85. package/dist/Menu-DpUvOl8Y.js +0 -58
  86. package/dist/NavSections-NDcIDD6H.js +0 -59
  87. package/dist/Popover-g2xTGubK.js +0 -123
  88. package/dist/PricingGroup-DgcdVSq8.js +0 -126
  89. package/dist/RadioGroup-D2UUOTkY.js +0 -138
  90. package/dist/Sidebar-DeqxYgxn.js +0 -69
  91. package/dist/TabSections-Bf_sZo7b.js +0 -50
@@ -1,126 +0,0 @@
1
- import e from "react";
2
- import { c as i } from "./cx-CcykAxZN.js";
3
- import './PricingGroup.css';const z = "cur", O = "cui", j = "cus", M = "cub", R = "cug", A = "cua", G = "cum", I = "cuh", K = "cut", T = "cup", U = "cuz", W = "cuo", $ = "cue", q = "cud", C = "cux", H = "cuf", J = "cuy", Q = "cul", X = "cuu", Y = "cun", Z = "cuc", _ = "cuk", V = "cuw", c = {
4
- r: z,
5
- i: O,
6
- s: j,
7
- b: M,
8
- g: R,
9
- a: A,
10
- m: G,
11
- h: I,
12
- t: K,
13
- p: T,
14
- z: U,
15
- o: W,
16
- e: $,
17
- d: q,
18
- x: C,
19
- f: H,
20
- y: J,
21
- l: Q,
22
- u: X,
23
- n: Y,
24
- c: Z,
25
- k: _,
26
- w: V
27
- };
28
- function N() {
29
- return /* @__PURE__ */ e.createElement("span", { className: c.k, "aria-hidden": !0 }, /* @__PURE__ */ e.createElement("svg", { className: c.w, viewBox: "0 0 12 12" }, /* @__PURE__ */ e.createElement(
30
- "path",
31
- {
32
- d: "M2.5 6.2 4.8 8.5 9.5 3.5",
33
- fill: "none",
34
- stroke: "currentColor",
35
- strokeWidth: "1.8",
36
- strokeLinecap: "round",
37
- strokeLinejoin: "round"
38
- }
39
- )));
40
- }
41
- function ee({ feature: l }) {
42
- if (l != null && typeof l == "object" && !e.isValidElement(l) && "label" in l) {
43
- const t = l;
44
- return /* @__PURE__ */ e.createElement("li", { className: c.c }, t.icon != null ? t.icon : /* @__PURE__ */ e.createElement(N, null), /* @__PURE__ */ e.createElement("span", null, t.label));
45
- }
46
- return /* @__PURE__ */ e.createElement("li", { className: c.c }, /* @__PURE__ */ e.createElement(N, null), /* @__PURE__ */ e.createElement("span", null, l));
47
- }
48
- function h({ item: l }) {
49
- const t = l.badge != null && (l.badgePlacement ?? "pill") === "pill";
50
- return l.title == null && !t ? null : /* @__PURE__ */ e.createElement("div", { className: c.h }, l.title != null ? /* @__PURE__ */ e.createElement("h3", { className: c.t }, l.title) : null, t ? /* @__PURE__ */ e.createElement("span", { className: c.g }, l.badge) : null);
51
- }
52
- function k({ item: l }) {
53
- return l.price == null && l.priceOld == null && l.meta == null ? null : /* @__PURE__ */ e.createElement("div", { className: c.p }, l.priceOld != null ? /* @__PURE__ */ e.createElement("span", { className: c.o }, l.priceOld) : null, l.price != null ? /* @__PURE__ */ e.createElement("span", { className: c.z }, l.price) : null, l.meta != null ? /* @__PURE__ */ e.createElement("span", { className: c.e }, l.meta) : null);
54
- }
55
- function d({ item: l }) {
56
- return l.description == null ? null : /* @__PURE__ */ e.createElement("p", { className: c.d }, l.description);
57
- }
58
- function le({
59
- actions: l,
60
- placement: t
61
- }) {
62
- return /* @__PURE__ */ e.createElement(
63
- "div",
64
- {
65
- className: t === "footer" ? c.f : c.x,
66
- onClick: (a) => a.stopPropagation(),
67
- onMouseDown: (a) => a.preventDefault()
68
- },
69
- l
70
- );
71
- }
72
- function ne({ item: l }) {
73
- return l.features == null && l.featuresLabel == null && l.featuresSummary == null ? null : /* @__PURE__ */ e.createElement("div", { className: c.y }, l.featuresLabel != null ? /* @__PURE__ */ e.createElement("p", { className: c.l }, l.featuresLabel) : null, l.featuresSummary != null ? /* @__PURE__ */ e.createElement("p", { className: c.u }, l.featuresSummary) : null, l.features != null && l.features.length > 0 ? /* @__PURE__ */ e.createElement("ul", { className: c.n }, l.features.map((t, a) => /* @__PURE__ */ e.createElement(ee, { key: a, feature: t }))) : null);
74
- }
75
- function ae({
76
- items: l,
77
- value: t,
78
- defaultValue: a,
79
- selectable: y = !1,
80
- disabled: P = !1,
81
- onValueChange: u,
82
- className: w,
83
- ...x
84
- }) {
85
- const [B, D] = e.useState(a), m = t !== void 0, F = m ? t : B, f = (n) => {
86
- m || D(n), u == null || u(n);
87
- };
88
- return /* @__PURE__ */ e.createElement("div", { className: i(c.r, w), role: "list", ...x }, l.map((n) => {
89
- const p = F === n.value, E = P || !!n.disabled, L = !!n.highlighted || p, b = n.badgePlacement ?? "pill", r = n.actionsPlacement ?? "after", g = n.descriptionPlacement ?? "after-price", s = y && !E, v = n.actions != null ? /* @__PURE__ */ e.createElement(
90
- le,
91
- {
92
- actions: n.actions,
93
- placement: r
94
- }
95
- ) : null, S = /* @__PURE__ */ e.createElement(e.Fragment, null, n.priceFirst ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(k, { item: n }), /* @__PURE__ */ e.createElement(h, { item: n }), /* @__PURE__ */ e.createElement(d, { item: n })) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(h, { item: n }), g === "before-price" ? /* @__PURE__ */ e.createElement(d, { item: n }) : null, /* @__PURE__ */ e.createElement(k, { item: n }), g === "after-price" ? /* @__PURE__ */ e.createElement(d, { item: n }) : null));
96
- return /* @__PURE__ */ e.createElement(
97
- "div",
98
- {
99
- key: n.value,
100
- role: "listitem",
101
- className: i(c.i, L && c.s),
102
- "data-selected": p ? "true" : void 0,
103
- "data-highlighted": n.highlighted ? "true" : void 0,
104
- "data-selectable": s ? "true" : void 0,
105
- "aria-disabled": E || void 0,
106
- tabIndex: s ? 0 : void 0,
107
- onClick: () => {
108
- s && f(n.value);
109
- },
110
- onKeyDown: (o) => {
111
- s && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), f(n.value));
112
- }
113
- },
114
- n.badge != null && b === "banner" ? /* @__PURE__ */ e.createElement("div", { className: c.b }, n.badge) : null,
115
- n.badge != null && b === "float" ? /* @__PURE__ */ e.createElement("div", { className: i(c.g, c.a) }, n.badge) : null,
116
- n.icon != null ? /* @__PURE__ */ e.createElement("div", { className: c.m }, n.icon) : null,
117
- S,
118
- r === "before" ? v : null,
119
- /* @__PURE__ */ e.createElement(ne, { item: n }),
120
- r === "after" || r === "footer" ? v : null
121
- );
122
- }));
123
- }
124
- export {
125
- ae as P
126
- };
@@ -1,138 +0,0 @@
1
- import e from "react";
2
- import { c as r } from "./cx-CcykAxZN.js";
3
- import './RadioGroup.css';const D = "cqr", F = "cqi", L = "cqs", M = "cqp", B = "cqh", I = "cqn", j = "cqm", A = "cqf", G = "cqc", S = "cqt", T = "cqe", U = "cqd", W = "cqx", $ = "cqy", C = "cqz", H = "cqk", J = "cqo", K = "cqq", O = "cqw", c = {
4
- r: D,
5
- i: F,
6
- s: L,
7
- p: M,
8
- h: B,
9
- n: I,
10
- m: j,
11
- f: A,
12
- c: G,
13
- t: S,
14
- e: T,
15
- d: U,
16
- x: W,
17
- y: $,
18
- z: C,
19
- k: H,
20
- o: J,
21
- q: K,
22
- w: O
23
- };
24
- function P() {
25
- return /* @__PURE__ */ e.createElement("svg", { className: c.w, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(
26
- "path",
27
- {
28
- d: "M2.5 6.2 4.8 8.5 9.5 3.5",
29
- fill: "none",
30
- stroke: "currentColor",
31
- strokeWidth: "1.8",
32
- strokeLinecap: "round",
33
- strokeLinejoin: "round"
34
- }
35
- ));
36
- }
37
- function v({
38
- kind: t,
39
- selected: l
40
- }) {
41
- const a = t === "radio";
42
- return /* @__PURE__ */ e.createElement(
43
- "span",
44
- {
45
- className: r(c.k, a ? c.o : c.q),
46
- "data-on": l ? "true" : void 0,
47
- "aria-hidden": !0
48
- },
49
- !a && l ? /* @__PURE__ */ e.createElement(P, null) : null
50
- );
51
- }
52
- function i({
53
- title: t,
54
- meta: l,
55
- price: a,
56
- badge: s
57
- }) {
58
- return t == null && l == null && a == null && s == null ? null : /* @__PURE__ */ e.createElement("div", { className: c.t }, a != null ? /* @__PURE__ */ e.createElement("span", { className: c.z }, a) : null, t ?? null, l != null ? /* @__PURE__ */ e.createElement("span", { className: c.e }, l) : null, s ?? null);
59
- }
60
- function f({ children: t }) {
61
- return /* @__PURE__ */ e.createElement(
62
- "div",
63
- {
64
- className: c.x,
65
- onClick: (l) => l.stopPropagation(),
66
- onMouseDown: (l) => l.preventDefault()
67
- },
68
- t
69
- );
70
- }
71
- function Y({
72
- items: t,
73
- value: l,
74
- defaultValue: a,
75
- name: s,
76
- disabled: m = !1,
77
- indicator: p = "check",
78
- indicatorSide: N = "end",
79
- onValueChange: u,
80
- className: k,
81
- ...h
82
- }) {
83
- const b = e.useId(), w = s ?? b, [x, y] = e.useState(a), E = l !== void 0, g = E ? l : x, z = (n) => {
84
- E || y(n), u == null || u(n);
85
- };
86
- return /* @__PURE__ */ e.createElement(
87
- "div",
88
- {
89
- className: r(c.r, k),
90
- role: "radiogroup",
91
- "aria-disabled": m || void 0,
92
- ...h
93
- },
94
- t.map((n) => {
95
- const o = g === n.value, R = m || !!n.disabled, d = n.variant === "split", q = n.iconFramed !== !1;
96
- return /* @__PURE__ */ e.createElement(
97
- "label",
98
- {
99
- key: n.value,
100
- className: r(c.i, o && c.s, d && c.p),
101
- "data-selected": o ? "true" : void 0,
102
- "data-indicator": d ? void 0 : N
103
- },
104
- /* @__PURE__ */ e.createElement(
105
- "input",
106
- {
107
- className: c.n,
108
- type: "radio",
109
- name: w,
110
- value: n.value,
111
- checked: o,
112
- disabled: R,
113
- onChange: () => z(n.value)
114
- }
115
- ),
116
- d ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: c.h }, n.icon != null ? /* @__PURE__ */ e.createElement("div", { className: r(c.m, q && c.f) }, n.icon) : null, /* @__PURE__ */ e.createElement(i, { title: n.title }), /* @__PURE__ */ e.createElement(v, { kind: p, selected: o })), /* @__PURE__ */ e.createElement("div", { className: c.y }, /* @__PURE__ */ e.createElement(
117
- i,
118
- {
119
- price: n.price,
120
- meta: n.meta,
121
- badge: n.badge
122
- }
123
- ), n.description != null ? /* @__PURE__ */ e.createElement("p", { className: c.d }, n.description) : null, n.actions != null ? /* @__PURE__ */ e.createElement(f, null, n.actions) : null)) : /* @__PURE__ */ e.createElement(e.Fragment, null, n.icon != null ? /* @__PURE__ */ e.createElement("div", { className: r(c.m, q && c.f) }, n.icon) : null, /* @__PURE__ */ e.createElement("div", { className: c.c }, /* @__PURE__ */ e.createElement(
124
- i,
125
- {
126
- title: n.title,
127
- meta: n.meta,
128
- price: n.price,
129
- badge: n.badge
130
- }
131
- ), n.description != null ? /* @__PURE__ */ e.createElement("p", { className: c.d }, n.description) : null, n.actions != null ? /* @__PURE__ */ e.createElement(f, null, n.actions) : null), /* @__PURE__ */ e.createElement(v, { kind: p, selected: o }))
132
- );
133
- })
134
- );
135
- }
136
- export {
137
- Y as R
138
- };
@@ -1,69 +0,0 @@
1
- import l from "react";
2
- import { B as h } from "./Badge-jp-9iNNL.js";
3
- import { I as x } from "./Item-D4okhsfW.js";
4
- import { c as u } from "./cx-CcykAxZN.js";
5
- import './Sidebar.css';const k = "c2r", g = "c2b", y = "c2x", B = "c2g", I = "c2s", w = "c2p", z = "c2h", C = "c2n", R = "c2i", T = "c2a", $ = "c2o", j = "c2l", q = "c2d", A = "c2f", D = "c2v", e = {
6
- r: k,
7
- b: g,
8
- x: y,
9
- g: B,
10
- s: I,
11
- p: w,
12
- h: z,
13
- n: C,
14
- i: R,
15
- a: T,
16
- o: $,
17
- l: j,
18
- d: q,
19
- f: A,
20
- v: D
21
- };
22
- function F(n) {
23
- if (n == null || n === "") return null;
24
- const c = Number(n);
25
- return !Number.isNaN(c) && c === 0 ? null : !Number.isNaN(c) && c > 99 ? "99+" : String(n);
26
- }
27
- function L({
28
- groups: n,
29
- items: c,
30
- value: v,
31
- onSelect: s,
32
- variant: E = "cards",
33
- brand: o,
34
- extra: r,
35
- footer: N,
36
- version: m,
37
- className: f,
38
- "aria-label": b = "Основное меню"
39
- }) {
40
- const p = n ?? c ?? [];
41
- return /* @__PURE__ */ l.createElement(
42
- "aside",
43
- {
44
- className: u(e.r, E === "plain" && e.p, f),
45
- "aria-label": b
46
- },
47
- o != null || r != null ? /* @__PURE__ */ l.createElement("div", { className: e.b }, o, r != null ? /* @__PURE__ */ l.createElement("div", { className: e.x }, r) : null) : null,
48
- /* @__PURE__ */ l.createElement("div", { className: e.g }, p.map((t) => /* @__PURE__ */ l.createElement("nav", { key: t.value, className: e.s, "aria-label": t.title ?? "Навигация" }, t.title ? /* @__PURE__ */ l.createElement("div", { className: e.h }, t.title) : null, /* @__PURE__ */ l.createElement("ul", { className: e.n }, (t.items ?? []).map((a) => {
49
- const d = F(a.badge), i = v === a.value;
50
- return /* @__PURE__ */ l.createElement("li", { key: a.value }, /* @__PURE__ */ l.createElement(
51
- x,
52
- {
53
- as: "button",
54
- active: i,
55
- className: u(e.i, i && e.a),
56
- "aria-current": i ? "page" : void 0,
57
- onClick: () => s == null ? void 0 : s(a.value)
58
- },
59
- a.icon != null ? /* @__PURE__ */ l.createElement("span", { className: e.o, "aria-hidden": !0 }, a.icon) : null,
60
- /* @__PURE__ */ l.createElement("span", { className: e.l }, a.label),
61
- d != null ? /* @__PURE__ */ l.createElement(h, { className: e.d, tone: "accent", size: "s" }, d) : null
62
- ));
63
- }))))),
64
- N != null || m != null ? /* @__PURE__ */ l.createElement("div", { className: u(e.s, e.f) }, N, m != null ? /* @__PURE__ */ l.createElement("div", { className: e.v }, m) : null) : null
65
- );
66
- }
67
- export {
68
- L as S
69
- };
@@ -1,50 +0,0 @@
1
- import t, { useMemo as S, useState as y, Suspense as T } from "react";
2
- import { c as b } from "./cx-CcykAxZN.js";
3
- import './TabSections.css';const x = "ctr", I = "ctb", M = "ctn", R = "ctt", $ = "cta", g = "cte", j = "cts", q = "ctm", a = {
4
- r: x,
5
- b: I,
6
- n: M,
7
- t: R,
8
- a: $,
9
- e: g,
10
- s: j,
11
- m: q
12
- };
13
- function A({
14
- items: l = [],
15
- resolveSection: d,
16
- value: o,
17
- defaultValue: n,
18
- onValueChange: s,
19
- loading: v = null,
20
- actions: m,
21
- className: i,
22
- navLabel: E = "Вкладки"
23
- }) {
24
- const p = S(() => {
25
- var e;
26
- return n || (((e = l.find((c) => !c.disabled)) == null ? void 0 : e.value) ?? "");
27
- }, [n, l]), [N, f] = y(p), r = o ?? N, k = (e) => {
28
- o == null && f(e), s == null || s(e);
29
- }, u = r ? d(r) : null;
30
- return /* @__PURE__ */ t.createElement("div", { className: b(a.r, i) }, /* @__PURE__ */ t.createElement("div", { className: a.b }, /* @__PURE__ */ t.createElement("nav", { className: a.n, "aria-label": E }, l.map((e) => {
31
- const c = e.value === r;
32
- return /* @__PURE__ */ t.createElement(
33
- "button",
34
- {
35
- key: e.value,
36
- type: "button",
37
- className: b(a.t, c && a.a),
38
- "data-active": c ? "true" : void 0,
39
- "aria-current": c ? "page" : void 0,
40
- disabled: e.disabled,
41
- onClick: () => k(e.value)
42
- },
43
- /* @__PURE__ */ t.createElement("span", null, e.label),
44
- e.badge != null && e.badge !== "" ? /* @__PURE__ */ t.createElement("em", { className: a.e }, e.badge) : null
45
- );
46
- })), m != null ? /* @__PURE__ */ t.createElement("div", { className: a.s }, m) : null), /* @__PURE__ */ t.createElement("div", { className: a.m }, u ? /* @__PURE__ */ t.createElement(T, { fallback: v }, t.createElement(u)) : null));
47
- }
48
- export {
49
- A as T
50
- };