@elcrm/components 0.2.13 → 0.5.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.
- package/README.md +76 -38
- package/dist/ActionGroup-DcApj_Mz.js +27 -0
- package/dist/ActionGroup.css +1 -1
- package/dist/ActionGroup.d.ts +19 -19
- package/dist/ActionGroup.js +1 -1
- package/dist/Avatar-eGdLrMCv.js +113 -0
- package/dist/Avatar.css +1 -1
- package/dist/Avatar.d.ts +4 -4
- package/dist/Avatar.js +1 -1
- package/dist/AvatarGroup-Dq-UrOaC.js +81 -0
- package/dist/AvatarGroup.css +1 -1
- package/dist/AvatarGroup.d.ts +8 -28
- package/dist/AvatarGroup.js +1 -1
- package/dist/AvatarName-3B4yCxHn.js +68 -0
- package/dist/AvatarName.css +1 -1
- package/dist/AvatarName.js +1 -1
- package/dist/Badge-BjScAXGy.js +28 -0
- package/dist/Badge.css +1 -1
- package/dist/Badge.js +1 -1
- package/dist/Banner-DAY18FWO.js +34 -0
- package/dist/Banner.css +1 -1
- package/dist/Banner.js +1 -1
- package/dist/Brand-BfCuiyf7.js +34 -0
- package/dist/Brand.css +1 -1
- package/dist/Brand.d.ts +8 -10
- package/dist/Brand.js +1 -1
- package/dist/Breadcrumb-DM_hWw5n.js +98 -0
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.d.ts +8 -5
- package/dist/Breadcrumb.js +1 -1
- package/dist/Card-a7N8Uh_H.js +12 -0
- package/dist/Card.css +1 -1
- package/dist/Card.js +1 -1
- package/dist/ChatFrame-BdSYRF-B.js +37 -0
- package/dist/ChatFrame.css +1 -1
- package/dist/ChatList.js +2 -2
- package/dist/{ChatMessages-B8rdXiK-.js → ChatMessages-CLxwRGIa.js} +1 -1
- package/dist/ChatMessages.js +1 -1
- package/dist/ChatSplit-8iw_1Shp.js +21 -0
- package/dist/CodeBlock-B3wvMejv.js +34 -0
- package/dist/CodeBlock.css +1 -1
- package/dist/CodeBlock.js +1 -1
- package/dist/Dropdown-CR_XxNak.js +185 -0
- package/dist/Dropdown.css +1 -1
- package/dist/Dropdown.d.ts +4 -94
- package/dist/Dropdown.js +1 -1
- package/dist/EmptyState-B_wWPjUu.js +23 -0
- package/dist/EmptyState.css +1 -1
- package/dist/EmptyState.d.ts +1 -1
- package/dist/EmptyState.js +1 -1
- package/dist/{Footer-qxUlnPR9.js → Footer-Bgh_JCUe.js} +4 -4
- package/dist/Footer.css +1 -1
- package/dist/Footer.js +1 -1
- package/dist/Header-BMDIi3u2.js +21 -0
- package/dist/Header.css +1 -1
- package/dist/Header.js +1 -1
- package/dist/Healthmap-Z-LLfGW0.js +359 -0
- package/dist/Healthmap.css +1 -1
- package/dist/Healthmap.d.ts +25 -3
- package/dist/Healthmap.js +1 -1
- package/dist/{Item-D4okhsfW.js → Item-CGpkMJu0.js} +13 -13
- package/dist/Item.css +1 -1
- package/dist/Item.d.ts +7 -7
- package/dist/Item.js +1 -1
- package/dist/ItemColumn-Ch61LqE0.js +41 -0
- package/dist/ItemColumn.css +1 -1
- package/dist/ItemColumn.js +1 -1
- package/dist/Layout-CzEGKl9s.js +31 -0
- package/dist/Layout.css +1 -1
- package/dist/Layout.d.ts +1 -1
- package/dist/Layout.js +1 -1
- package/dist/List-D13pqaUY.js +12 -0
- package/dist/List.css +1 -1
- package/dist/List.js +1 -1
- package/dist/Loading-C_CKD-zt.js +16 -0
- package/dist/Loading.css +1 -1
- package/dist/Loading.d.ts +1 -1
- package/dist/Loading.js +1 -1
- package/dist/Menu-D2kf7fN_.js +72 -0
- package/dist/Menu.css +1 -1
- package/dist/Menu.d.ts +7 -25
- package/dist/Menu.js +1 -1
- package/dist/NavSections-CNxxBMPT.js +154 -0
- package/dist/NavSections.css +1 -1
- package/dist/NavSections.d.ts +16 -28
- package/dist/NavSections.js +1 -1
- package/dist/PageHead-BfClTLrF.js +31 -0
- package/dist/PageHead.css +1 -1
- package/dist/PageHead.d.ts +1 -1
- package/dist/PageHead.js +1 -1
- package/dist/PageShell-BAJges-G.js +30 -0
- package/dist/PageShell.css +1 -1
- package/dist/PageShell.js +1 -1
- package/dist/PanelInfo-Db5GCr-c.js +137 -0
- package/dist/PanelInfo.css +1 -1
- package/dist/PanelInfo.d.ts +16 -9
- package/dist/PanelInfo.js +1 -1
- package/dist/Popover-xEZoMY-h.js +143 -0
- package/dist/Popover.css +1 -1
- package/dist/Popover.d.ts +40 -11
- package/dist/Popover.js +1 -1
- package/dist/PricingGroup-CWy47MlE.js +138 -0
- package/dist/PricingGroup.css +1 -1
- package/dist/PricingGroup.d.ts +0 -2
- package/dist/PricingGroup.js +1 -1
- package/dist/PricingTable-BjpGVAhi.js +157 -0
- package/dist/PricingTable.css +1 -1
- package/dist/PricingTable.d.ts +4 -7
- package/dist/PricingTable.js +1 -1
- package/dist/RadioGroup-DI4KKUvZ.js +121 -0
- package/dist/RadioGroup.css +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Section-PprWjOvt.js +47 -0
- package/dist/Section.css +1 -1
- package/dist/Section.d.ts +29 -9
- package/dist/Section.js +1 -1
- package/dist/Sidebar-Bouhd5SS.js +205 -0
- package/dist/Sidebar.css +1 -1
- package/dist/Sidebar.d.ts +18 -26
- package/dist/Sidebar.js +1 -1
- package/dist/SplitPane-DBa-g9td.js +92 -0
- package/dist/SplitPane.css +1 -1
- package/dist/SplitPane.d.ts +8 -7
- package/dist/SplitPane.js +1 -1
- package/dist/Stack-BPTehVYc.js +53 -0
- package/dist/Stack.css +1 -1
- package/dist/Stack.d.ts +2 -1
- package/dist/Stack.js +1 -1
- package/dist/Stat-p8j4PjrC.js +28 -0
- package/dist/Stat.css +1 -1
- package/dist/Stat.js +1 -1
- package/dist/TabSections-Dppe9wiz.js +84 -0
- package/dist/TabSections.css +1 -1
- package/dist/TabSections.d.ts +7 -2
- package/dist/TabSections.js +1 -1
- package/dist/Table-DqrDUUtb.js +27 -0
- package/dist/Table.css +1 -1
- package/dist/Table.d.ts +10 -2
- package/dist/Table.js +1 -1
- package/dist/Text-Bo1u7gVC.js +25 -0
- package/dist/Text.css +1 -0
- package/dist/Text.d.ts +19 -0
- package/dist/Text.js +4 -0
- package/dist/TextGroup-236jHxdT.js +23 -0
- package/dist/TextGroup.css +1 -1
- package/dist/TextGroup.js +1 -1
- package/dist/Toolbar-Bl9-5Mis.js +35 -0
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.d.ts +7 -12
- package/dist/Toolbar.js +1 -2
- package/dist/cx.d.ts +1 -1
- package/dist/dark.css +12 -0
- package/dist/index.css +41 -39
- package/dist/index.d.ts +7 -12
- package/dist/index.es.d.ts +7 -12
- package/dist/index.es.js +110 -107
- package/dist/kit-manifest.json +1646 -0
- package/dist/lazyRoute.d.ts +12 -6
- package/dist/light.css +12 -0
- package/dist/navTree.d.ts +13 -1
- package/dist/rovingKeys-Di9N1Nct.js +23 -0
- package/dist/rovingKeys.d.ts +7 -1
- package/dist/stackGap.d.ts +1 -1
- package/dist/tokens.css +20 -2
- package/dist/useControllableValue-BaE0VR5d.js +13 -0
- package/dist/useControllableValue.d.ts +3 -0
- package/package.json +48 -4
- package/dist/ActionGroup-ChKFW0mt.js +0 -27
- package/dist/Avatar-loGgFt72.js +0 -113
- package/dist/AvatarGroup-D1gnT3Od.js +0 -81
- package/dist/AvatarName-0BzyfpMq.js +0 -68
- package/dist/Badge-jp-9iNNL.js +0 -28
- package/dist/Banner-B72lcEMo.js +0 -34
- package/dist/Block-Bu7NEA0g.js +0 -8
- package/dist/Block.d.ts +0 -30
- package/dist/Block.js +0 -4
- package/dist/Brand-Zq-Idks4.js +0 -34
- package/dist/Breadcrumb-CAM_e9LN.js +0 -98
- package/dist/Card-hn37Opo3.js +0 -12
- package/dist/ChatFrame-BW2TmCkZ.js +0 -37
- package/dist/ChatSplit-DNnu3TNq.js +0 -21
- package/dist/CodeBlock-CRzVopIv.js +0 -25
- package/dist/Column-BiogBDf8.js +0 -8
- package/dist/Column.d.ts +0 -24
- package/dist/Column.js +0 -4
- package/dist/Dropdown-DosvDR13.js +0 -147
- package/dist/EmptyState-mBiWtMIM.js +0 -23
- package/dist/Header-DZQopVNy.js +0 -21
- package/dist/Healthmap-B6cdiLUl.js +0 -243
- package/dist/ItemColumn-M7a9L8CI.js +0 -41
- package/dist/Layout-mi6Ghayv.js +0 -31
- package/dist/List-BgKkYaGO.js +0 -12
- package/dist/Loading-DkkG7RcE.js +0 -16
- package/dist/Menu-DuXQv-zT.js +0 -66
- package/dist/NavSections-D6rDEtT1.js +0 -142
- package/dist/PageHead-DgaJ1mXY.js +0 -31
- package/dist/PageShell-D9EZiO8o.js +0 -30
- package/dist/PanelInfo-A5y5ysH8.js +0 -81
- package/dist/Popover-DWdvZTuA.js +0 -135
- package/dist/PricingGroup-Czuhe81Z.js +0 -120
- package/dist/PricingTable-BuLC0opK.js +0 -152
- package/dist/RadioGroup-fcXzhvMu.js +0 -129
- package/dist/Row-DsQOVn18.js +0 -8
- package/dist/Row.d.ts +0 -24
- package/dist/Row.js +0 -4
- package/dist/Section-Crxk2J-E.js +0 -34
- package/dist/Sidebar-CYFaPqdC.js +0 -178
- package/dist/SplitPane-DR7PCZ8f.js +0 -74
- package/dist/Stack-XkmPSswj.js +0 -53
- package/dist/Stat-sKXJwz5L.js +0 -27
- package/dist/TabSections-DN7yVJoF.js +0 -69
- package/dist/Table-BoDr3X2d.js +0 -25
- package/dist/TextGroup-DmhuyMR1.js +0 -23
- package/dist/Toolbar-C1zAk9ak.js +0 -42
- package/dist/rovingKeys-CGlfTtNQ.js +0 -15
- package/dist/useControllableValue-CWqH1kpM.js +0 -10
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import l from "react";
|
|
2
|
+
import { c as C } from "./cx-CcykAxZN.js";
|
|
3
|
+
import { u as D } from "./useControllableValue-BaE0VR5d.js";
|
|
4
|
+
import { Tooltip as F } from "@elcrm/tooltip";
|
|
5
|
+
import { C as q } from "./CheckIcon-FdB8fMEF.js";
|
|
6
|
+
import './PricingTable.css';const z = "gtr", T = "gth", B = "gtm", I = "gtn", O = "gtt", V = "gtg", M = "gtp", S = "gtz", H = "gto", K = "gte", R = "gtd", $ = "gtx", j = "gtb", A = "gty", G = "gtl", J = "gtw", L = "gtc", Q = "gtk", U = "gtv", W = "gta", X = "gtu", Y = "gtq", t = {
|
|
7
|
+
root: z,
|
|
8
|
+
head: T,
|
|
9
|
+
media: B,
|
|
10
|
+
name: I,
|
|
11
|
+
title: O,
|
|
12
|
+
gban: V,
|
|
13
|
+
price: M,
|
|
14
|
+
zsum: S,
|
|
15
|
+
old: H,
|
|
16
|
+
excerpt: K,
|
|
17
|
+
desc: R,
|
|
18
|
+
xact: $,
|
|
19
|
+
block: j,
|
|
20
|
+
yrow: A,
|
|
21
|
+
label: G,
|
|
22
|
+
whint: J,
|
|
23
|
+
cell: L,
|
|
24
|
+
ktick: Q,
|
|
25
|
+
vtick: U,
|
|
26
|
+
absent: W,
|
|
27
|
+
ufoot: X,
|
|
28
|
+
quad: Y
|
|
29
|
+
};
|
|
30
|
+
function Z() {
|
|
31
|
+
return /* @__PURE__ */ l.createElement("span", { className: t.ktick, "aria-hidden": !0 }, /* @__PURE__ */ l.createElement(q, { className: t.vtick }));
|
|
32
|
+
}
|
|
33
|
+
function _({ value: e }) {
|
|
34
|
+
return e === !0 ? /* @__PURE__ */ l.createElement(Z, null) : e === !1 || e == null || e === "" ? /* @__PURE__ */ l.createElement("span", { className: t.absent }, "—") : /* @__PURE__ */ l.createElement(l.Fragment, null, e);
|
|
35
|
+
}
|
|
36
|
+
function v({
|
|
37
|
+
item: e,
|
|
38
|
+
pill: r
|
|
39
|
+
}) {
|
|
40
|
+
return e.title == null && !r ? null : /* @__PURE__ */ l.createElement("div", { className: t.name }, e.title != null ? /* @__PURE__ */ l.createElement("h3", { className: t.title }, e.title) : null, r ? /* @__PURE__ */ l.createElement("span", { className: t.gban }, e.badge) : null);
|
|
41
|
+
}
|
|
42
|
+
function h({ item: e }) {
|
|
43
|
+
return e.price == null && e.priceOld == null && e.meta == null ? null : /* @__PURE__ */ l.createElement("div", { className: t.price }, e.priceOld != null ? /* @__PURE__ */ l.createElement("span", { className: t.old }, e.priceOld) : null, e.price != null ? /* @__PURE__ */ l.createElement("span", { className: t.zsum }, e.price) : null, e.meta != null ? /* @__PURE__ */ l.createElement("span", { className: t.excerpt }, e.meta) : null);
|
|
44
|
+
}
|
|
45
|
+
function ee({
|
|
46
|
+
item: e,
|
|
47
|
+
highlighted: r,
|
|
48
|
+
selected: i,
|
|
49
|
+
selectable: o,
|
|
50
|
+
disabled: u,
|
|
51
|
+
onSelect: m
|
|
52
|
+
}) {
|
|
53
|
+
const d = e.badge != null && (e.badgePlacement ?? "pill") === "pill", p = e.badge != null && e.badgePlacement === "banner";
|
|
54
|
+
return /* @__PURE__ */ l.createElement(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: t.head,
|
|
58
|
+
role: o ? "radio" : "columnheader",
|
|
59
|
+
"data-value": e.value,
|
|
60
|
+
"data-highlighted": r ? "true" : void 0,
|
|
61
|
+
"data-selectable": o ? "true" : void 0,
|
|
62
|
+
"aria-checked": o ? i : void 0,
|
|
63
|
+
tabIndex: o && !u ? i ? 0 : -1 : void 0,
|
|
64
|
+
onClick: () => {
|
|
65
|
+
o && !u && m();
|
|
66
|
+
},
|
|
67
|
+
onKeyDown: (n) => {
|
|
68
|
+
!o || u || (n.key === "Enter" || n.key === " ") && (n.preventDefault(), m());
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
p ? /* @__PURE__ */ l.createElement("span", { className: t.gban }, e.badge) : null,
|
|
72
|
+
e.icon != null ? /* @__PURE__ */ l.createElement("div", { className: t.media }, e.icon) : null,
|
|
73
|
+
e.priceFirst ? /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(h, { item: e }), /* @__PURE__ */ l.createElement(v, { item: e, pill: d }), e.description != null ? /* @__PURE__ */ l.createElement("p", { className: t.desc }, e.description) : null) : /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(v, { item: e, pill: d }), e.descriptionPlacement === "before-price" && e.description != null ? /* @__PURE__ */ l.createElement("p", { className: t.desc }, e.description) : null, /* @__PURE__ */ l.createElement(h, { item: e }), e.descriptionPlacement !== "before-price" && e.description != null ? /* @__PURE__ */ l.createElement("p", { className: t.desc }, e.description) : null),
|
|
74
|
+
e.actions != null ? /* @__PURE__ */ l.createElement(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: t.xact,
|
|
78
|
+
onClick: (n) => n.stopPropagation(),
|
|
79
|
+
onMouseDown: (n) => n.preventDefault()
|
|
80
|
+
},
|
|
81
|
+
e.actions
|
|
82
|
+
) : null
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
function re({
|
|
86
|
+
items: e,
|
|
87
|
+
sections: r,
|
|
88
|
+
footerActions: i = !0,
|
|
89
|
+
value: o,
|
|
90
|
+
defaultValue: u,
|
|
91
|
+
selectable: m = !1,
|
|
92
|
+
disabled: d = !1,
|
|
93
|
+
onValueChange: p,
|
|
94
|
+
className: n,
|
|
95
|
+
style: b,
|
|
96
|
+
...f
|
|
97
|
+
}) {
|
|
98
|
+
const [k, N] = D(
|
|
99
|
+
o,
|
|
100
|
+
u,
|
|
101
|
+
p
|
|
102
|
+
), y = e.length, x = {
|
|
103
|
+
...b,
|
|
104
|
+
gridTemplateColumns: `var(--pricing-table-label-width) repeat(${y}, minmax(12rem, 1fr))`
|
|
105
|
+
};
|
|
106
|
+
let w = 0;
|
|
107
|
+
return /* @__PURE__ */ l.createElement("div", { className: C(t.root, n), style: x, role: "table", ...f }, /* @__PURE__ */ l.createElement("div", { className: t.quad, role: "columnheader" }), e.map((a) => {
|
|
108
|
+
const s = k === a.value, c = !!a.highlighted || s;
|
|
109
|
+
return /* @__PURE__ */ l.createElement(
|
|
110
|
+
ee,
|
|
111
|
+
{
|
|
112
|
+
key: a.value,
|
|
113
|
+
item: a,
|
|
114
|
+
highlighted: c,
|
|
115
|
+
selected: s,
|
|
116
|
+
selectable: m && !d && !a.disabled,
|
|
117
|
+
disabled: d || !!a.disabled,
|
|
118
|
+
onSelect: () => N(a.value)
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}), r == null ? void 0 : r.map((a, s) => /* @__PURE__ */ l.createElement(l.Fragment, { key: a.value ?? String(a.title) ?? s }, a.title != null ? /* @__PURE__ */ l.createElement("div", { className: t.block, role: "rowheader" }, a.title) : null, a.rows.map((c) => {
|
|
122
|
+
const P = w++ % 2 === 1;
|
|
123
|
+
return /* @__PURE__ */ l.createElement(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
key: c.key,
|
|
127
|
+
className: t.yrow,
|
|
128
|
+
"data-alt": P ? "true" : void 0,
|
|
129
|
+
role: "row"
|
|
130
|
+
},
|
|
131
|
+
/* @__PURE__ */ l.createElement("div", { className: t.label, role: "rowheader" }, /* @__PURE__ */ l.createElement("span", null, c.label), c.hint != null && c.hint !== "" ? /* @__PURE__ */ l.createElement(F, { content: c.hint }, /* @__PURE__ */ l.createElement(
|
|
132
|
+
"button",
|
|
133
|
+
{
|
|
134
|
+
type: "button",
|
|
135
|
+
className: t.whint,
|
|
136
|
+
"aria-label": c.hint
|
|
137
|
+
},
|
|
138
|
+
"?"
|
|
139
|
+
)) : null),
|
|
140
|
+
e.map((g) => {
|
|
141
|
+
var E;
|
|
142
|
+
return /* @__PURE__ */ l.createElement("div", { key: g.value, className: t.cell, role: "cell" }, /* @__PURE__ */ l.createElement(_, { value: (E = c.values) == null ? void 0 : E[g.value] }));
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
}))), i ? /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", { className: t.quad }), e.map((a) => /* @__PURE__ */ l.createElement("div", { key: a.value, className: t.ufoot }, a.actions != null ? /* @__PURE__ */ l.createElement(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: t.xact,
|
|
149
|
+
onClick: (s) => s.stopPropagation(),
|
|
150
|
+
onMouseDown: (s) => s.preventDefault()
|
|
151
|
+
},
|
|
152
|
+
a.actions
|
|
153
|
+
) : null))) : null);
|
|
154
|
+
}
|
|
155
|
+
export {
|
|
156
|
+
re as P
|
|
157
|
+
};
|
package/dist/PricingTable.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.gtr{display:grid;width:100%;column-gap:var(--shell-gap);row-gap:0;align-items:stretch;overflow-x:auto}.gth{display:flex;flex-direction:column;gap:var(--shell-gap-sm);padding:var(--shell-padding);box-sizing:border-box;color:var(--shell-color);background:var(--shell-background);border:1px solid transparent;border-radius:var(--shell-radius)}.gth[data-highlighted=true]{border-color:var(--shell-color-accent);background:var(--shell-background-selected)}.gtm{display:flex;align-items:center;justify-content:center;width:calc(var(--shell-icon-size) * 1.4);height:calc(var(--shell-icon-size) * 1.4);color:var(--shell-color-accent);background:var(--shell-background-hover);border-radius:var(--shell-radius);overflow:hidden}.gtn{display:flex;flex-wrap:wrap;align-items:center;gap:var(--shell-gap-sm)}.gtt{margin:0;font-size:var(--shell-font-size);font-weight:var(--shell-font-weight);color:var(--shell-color);line-height:1.3}.gtg{display:inline-flex;align-items:center;padding:.15rem .5rem;border-radius:999px;background:var(--shell-background-hover);color:var(--shell-color-accent);font-size:var(--shell-font-size-sm);font-weight:var(--shell-font-weight)}.gtp{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--shell-gap-sm)}.gtz{font-size:var(--shell-font-size-lg);font-weight:700;color:var(--shell-color);line-height:1.15}.gto{font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);text-decoration:line-through}.gte{font-size:var(--shell-font-size-sm);color:var(--shell-color-muted)}.gtd{margin:0;font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);line-height:1.45}.gtx{display:flex;flex-direction:column;gap:var(--shell-gap-sm)}.gtb{grid-column:1 / -1;margin:var(--shell-gap) 0 var(--shell-gap-sm);padding:0;font-size:var(--shell-font-size-sm);font-weight:var(--shell-font-weight);color:var(--shell-color-accent)}.gtf,.gty{display:contents}.gty>*{padding:var(--shell-padding);box-sizing:border-box;border-bottom:1px solid var(--shell-border);background:var(--shell-background)}.gty[data-alt=true]>*{background:var(--shell-background-muted)}.gtl{display:flex;align-items:center;gap:var(--shell-gap-sm);font-size:var(--shell-font-size-sm);color:var(--shell-color);line-height:1.4}.gtw{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--shell-status-size);height:var(--shell-status-size);padding:0;border:1px solid var(--shell-border);border-radius:50%;background:transparent;color:var(--shell-color-muted);font-size:9px;line-height:1;cursor:help}.gtc{display:flex;align-items:center;justify-content:center;text-align:center;font-size:var(--shell-font-size-sm);color:var(--shell-color);font-weight:500}.gtk{display:inline-flex;align-items:center;justify-content:center;width:var(--shell-check-size);height:var(--shell-check-size);color:var(--avatar-color);background:var(--shell-color-success);border-radius:50%}.gtv{width:60%;height:60%;display:block}.gta{color:var(--shell-color-muted)}.gtu{display:flex;flex-direction:column;gap:var(--shell-gap-sm);padding:var(--shell-padding);box-sizing:border-box}.gtq{min-width:var(--pricing-table-label-width)}}
|
package/dist/PricingTable.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PricingTableCellValue, PricingTableItem } from './PricingTableParts';
|
|
3
3
|
/**
|
|
4
4
|
* Колонка тарифа в таблице — тот же {@link PricingPlan}, что у {@link PricingGroup}.
|
|
5
5
|
* Один массив `items` можно шарить между Group и Table.
|
|
6
6
|
*/
|
|
7
|
-
export type PricingTableItem
|
|
8
|
-
/**
|
|
9
|
-
* Значение ячейки матрицы:
|
|
10
|
-
* `true` — галочка, `false` / `null` / нет ключа — «—», иначе текст/узел.
|
|
11
|
-
*/
|
|
12
|
-
export type PricingTableCellValue = boolean | React.ReactNode | null | undefined;
|
|
7
|
+
export type { PricingTableItem, PricingTableCellValue };
|
|
13
8
|
/**
|
|
14
9
|
* Строка сравнения в секции таблицы.
|
|
15
10
|
*
|
|
@@ -32,6 +27,8 @@ export type PricingTableRow = {
|
|
|
32
27
|
* Секция матрицы сравнения (заголовок + строки).
|
|
33
28
|
*/
|
|
34
29
|
export type PricingTableSection = {
|
|
30
|
+
/** Идентификатор секции (ключ React). */
|
|
31
|
+
value?: string;
|
|
35
32
|
/** Заголовок секции («Безопасность»). Нет — не рисуем. */
|
|
36
33
|
title?: React.ReactNode;
|
|
37
34
|
/** Строки фич / параметров. */
|
package/dist/PricingTable.js
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { C as q } from "./CheckIcon-FdB8fMEF.js";
|
|
3
|
+
import { c as o } from "./cx-CcykAxZN.js";
|
|
4
|
+
import { u as w } from "./useControllableValue-BaE0VR5d.js";
|
|
5
|
+
import './RadioGroup.css';const z = "lrr", R = "lri", F = "lrs", I = "lrp", V = "lrh", A = "lrn", B = "lrm", D = "lrf", G = "lrc", L = "lrt", P = "lre", T = "lrd", j = "lrx", H = "lry", J = "lrz", K = "lrk", M = "lro", O = "lrq", Q = "lrw", n = {
|
|
6
|
+
root: z,
|
|
7
|
+
item: R,
|
|
8
|
+
selected: F,
|
|
9
|
+
psplit: I,
|
|
10
|
+
head: V,
|
|
11
|
+
native: A,
|
|
12
|
+
media: B,
|
|
13
|
+
framed: D,
|
|
14
|
+
col: G,
|
|
15
|
+
title: L,
|
|
16
|
+
extra: P,
|
|
17
|
+
desc: T,
|
|
18
|
+
xact: j,
|
|
19
|
+
ybody: H,
|
|
20
|
+
zsum: J,
|
|
21
|
+
knob: K,
|
|
22
|
+
oround: M,
|
|
23
|
+
quad: O,
|
|
24
|
+
wtick: Q
|
|
25
|
+
};
|
|
26
|
+
function E({
|
|
27
|
+
kind: t,
|
|
28
|
+
selected: a
|
|
29
|
+
}) {
|
|
30
|
+
const c = t === "radio";
|
|
31
|
+
return /* @__PURE__ */ e.createElement(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
className: o(n.knob, c ? n.oround : n.quad),
|
|
35
|
+
"data-on": a ? "true" : void 0,
|
|
36
|
+
"aria-hidden": !0
|
|
37
|
+
},
|
|
38
|
+
!c && a ? /* @__PURE__ */ e.createElement(q, { className: n.wtick }) : null
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function u({
|
|
42
|
+
title: t,
|
|
43
|
+
meta: a,
|
|
44
|
+
price: c,
|
|
45
|
+
badge: r
|
|
46
|
+
}) {
|
|
47
|
+
return t == null && a == null && c == null && r == null ? null : /* @__PURE__ */ e.createElement("div", { className: n.title }, c != null ? /* @__PURE__ */ e.createElement("span", { className: n.zsum }, c) : null, t ?? null, a != null ? /* @__PURE__ */ e.createElement("span", { className: n.extra }, a) : null, r ?? null);
|
|
48
|
+
}
|
|
49
|
+
function v({ children: t }) {
|
|
50
|
+
return /* @__PURE__ */ e.createElement("div", { className: n.xact, onClick: (a) => a.stopPropagation() }, t);
|
|
51
|
+
}
|
|
52
|
+
function Y({
|
|
53
|
+
items: t,
|
|
54
|
+
value: a,
|
|
55
|
+
defaultValue: c,
|
|
56
|
+
name: r,
|
|
57
|
+
disabled: i = !1,
|
|
58
|
+
indicator: m = "check",
|
|
59
|
+
indicatorSide: f = "end",
|
|
60
|
+
onValueChange: N,
|
|
61
|
+
className: k,
|
|
62
|
+
...b
|
|
63
|
+
}) {
|
|
64
|
+
const h = e.useId(), x = r ?? h, [y, g] = w(
|
|
65
|
+
a,
|
|
66
|
+
c,
|
|
67
|
+
N
|
|
68
|
+
);
|
|
69
|
+
return /* @__PURE__ */ e.createElement(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: o(n.root, k),
|
|
73
|
+
role: "radiogroup",
|
|
74
|
+
"aria-disabled": i || void 0,
|
|
75
|
+
...b
|
|
76
|
+
},
|
|
77
|
+
t.map((l) => {
|
|
78
|
+
const s = y === l.value, C = i || !!l.disabled, d = l.variant === "split", p = l.iconFramed !== !1;
|
|
79
|
+
return /* @__PURE__ */ e.createElement(
|
|
80
|
+
"label",
|
|
81
|
+
{
|
|
82
|
+
key: l.value,
|
|
83
|
+
className: o(n.item, s && n.selected, d && n.psplit),
|
|
84
|
+
"data-selected": s ? "true" : void 0,
|
|
85
|
+
"data-indicator": d ? void 0 : f
|
|
86
|
+
},
|
|
87
|
+
/* @__PURE__ */ e.createElement(
|
|
88
|
+
"input",
|
|
89
|
+
{
|
|
90
|
+
className: n.native,
|
|
91
|
+
type: "radio",
|
|
92
|
+
name: x,
|
|
93
|
+
value: l.value,
|
|
94
|
+
checked: s,
|
|
95
|
+
disabled: C,
|
|
96
|
+
onChange: () => g(l.value)
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
d ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: n.head }, l.icon != null ? /* @__PURE__ */ e.createElement("div", { className: o(n.media, p && n.framed) }, l.icon) : null, /* @__PURE__ */ e.createElement(u, { title: l.title }), /* @__PURE__ */ e.createElement(E, { kind: m, selected: s })), /* @__PURE__ */ e.createElement("div", { className: n.ybody }, /* @__PURE__ */ e.createElement(
|
|
100
|
+
u,
|
|
101
|
+
{
|
|
102
|
+
price: l.price,
|
|
103
|
+
meta: l.meta,
|
|
104
|
+
badge: l.badge
|
|
105
|
+
}
|
|
106
|
+
), l.description != null ? /* @__PURE__ */ e.createElement("p", { className: n.desc }, l.description) : null, l.actions != null ? /* @__PURE__ */ e.createElement(v, null, l.actions) : null)) : /* @__PURE__ */ e.createElement(e.Fragment, null, l.icon != null ? /* @__PURE__ */ e.createElement("div", { className: o(n.media, p && n.framed) }, l.icon) : null, /* @__PURE__ */ e.createElement("div", { className: n.col }, /* @__PURE__ */ e.createElement(
|
|
107
|
+
u,
|
|
108
|
+
{
|
|
109
|
+
title: l.title,
|
|
110
|
+
meta: l.meta,
|
|
111
|
+
price: l.price,
|
|
112
|
+
badge: l.badge
|
|
113
|
+
}
|
|
114
|
+
), l.description != null ? /* @__PURE__ */ e.createElement("p", { className: n.desc }, l.description) : null, l.actions != null ? /* @__PURE__ */ e.createElement(v, null, l.actions) : null), /* @__PURE__ */ e.createElement(E, { kind: m, selected: s }))
|
|
115
|
+
);
|
|
116
|
+
})
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
Y as R
|
|
121
|
+
};
|
package/dist/RadioGroup.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.lrr{display:flex;flex-direction:column;gap:var(--shell-gap)}.lri{display:flex;align-items:flex-start;gap:var(--shell-gap);width:100%;margin:0;padding:var(--shell-padding);box-sizing:border-box;text-align:left;font:inherit;color:var(--shell-color);background:var(--shell-background);border:1px solid var(--shell-border);border-radius:var(--shell-radius);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.lri:hover:not(:disabled){background:var(--shell-background-hover)}.lri:disabled{opacity:var(--shell-disabled-opacity);cursor:not-allowed}.lrs,.lri[data-selected=true]{border-color:var(--shell-color-accent);background:var(--shell-background-selected)}.lrp{flex-direction:column;align-items:stretch;padding:0;gap:0}.lrp.lrs .lrh,.lrp[data-selected=true] .lrh{border-bottom-color:var(--shell-color-accent)}.lrn{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.lrm{display:flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden}.lrf{width:var(--shell-icon-size);height:var(--shell-icon-size);padding:var(--shell-gap-sm);box-sizing:content-box;color:var(--shell-color-muted);background:var(--shell-background-muted);border:1px solid var(--shell-border);border-radius:var(--shell-radius)}.lrc{display:flex;flex:1;flex-direction:column;gap:var(--shell-gap-sm);min-width:0}.lrt{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--shell-gap-sm);font-size:var(--shell-font-size);font-weight:var(--shell-font-weight);color:var(--shell-color);line-height:1.3}.lre{font-size:var(--shell-font-size-sm);font-weight:400;color:var(--shell-color-muted)}.lrd{margin:0;font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);line-height:1.45}.lrx{display:flex;flex-wrap:wrap;gap:var(--shell-gap-sm);margin-top:var(--shell-gap-sm)}.lrh{display:flex;align-items:center;gap:var(--shell-gap);padding:var(--shell-padding);border-bottom:1px solid var(--shell-border)}.lrh .lrt{flex:1;min-width:0}.lry{display:flex;flex-direction:column;gap:var(--shell-gap-sm);padding:var(--shell-padding)}.lrz{font-size:var(--shell-font-size-lg);font-weight:700;color:var(--shell-color);line-height:1.2}.lrk{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--shell-check-size);height:var(--shell-check-size);margin-left:auto;box-sizing:border-box;border:1px solid var(--shell-border);background:var(--shell-background);color:var(--avatar-color)}.lri[data-indicator=start]>.lrk{margin-left:0;order:-1}.lro{border-radius:50%}.lro[data-on=true]{border-color:var(--shell-color-accent);background:var(--shell-color-accent);box-shadow:inset 0 0 0 3px var(--shell-background-selected)}.lrq{border-radius:calc(var(--shell-radius) * .4)}.lrq[data-on=true]{border-color:var(--shell-color-accent);background:var(--shell-color-accent)}.lrw{width:60%;height:60%;display:block}}
|
package/dist/RadioGroup.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import { c as l } from "./cx-CcykAxZN.js";
|
|
3
|
+
import { S as v } from "./Stack-BPTehVYc.js";
|
|
4
|
+
import './Section.css';const w = "sep", y = "seu", A = "sek", T = "seh", z = "sec", B = "sei", F = "set", H = "sed", R = "see", j = "seb", q = "ses", C = "sel", e = {
|
|
5
|
+
page: w,
|
|
6
|
+
uwrap: y,
|
|
7
|
+
kcard: A,
|
|
8
|
+
header: T,
|
|
9
|
+
center: z,
|
|
10
|
+
icon: B,
|
|
11
|
+
title: F,
|
|
12
|
+
demi: H,
|
|
13
|
+
excerpt: R,
|
|
14
|
+
body: j,
|
|
15
|
+
slot: q,
|
|
16
|
+
line: C
|
|
17
|
+
};
|
|
18
|
+
function J({
|
|
19
|
+
title: n,
|
|
20
|
+
description: s,
|
|
21
|
+
icon: c,
|
|
22
|
+
children: r,
|
|
23
|
+
actions: o,
|
|
24
|
+
variant: m = "page",
|
|
25
|
+
align: g,
|
|
26
|
+
titleSize: E = "lg",
|
|
27
|
+
direction: h = "column",
|
|
28
|
+
gap: N,
|
|
29
|
+
columns: k,
|
|
30
|
+
className: u,
|
|
31
|
+
as: b
|
|
32
|
+
}) {
|
|
33
|
+
const d = m === "auth", a = m === "block", f = g ?? (d ? "center" : "start"), i = b ?? "section", x = a ? "h2" : "h1", S = E ?? (a ? "md" : "lg"), p = /* @__PURE__ */ t.createElement(t.Fragment, null, (c != null || n != null || s != null) && /* @__PURE__ */ t.createElement("header", { className: l(e.header, f === "center" && e.center) }, c != null ? /* @__PURE__ */ t.createElement("div", { className: e.icon }, c) : null, n != null ? /* @__PURE__ */ t.createElement(x, { className: l(e.title, S === "md" && e.demi) }, n) : null, s != null ? /* @__PURE__ */ t.createElement("p", { className: e.excerpt }, s) : null), r != null ? /* @__PURE__ */ t.createElement(
|
|
34
|
+
v,
|
|
35
|
+
{
|
|
36
|
+
className: e.body,
|
|
37
|
+
direction: h,
|
|
38
|
+
gap: N,
|
|
39
|
+
columns: k
|
|
40
|
+
},
|
|
41
|
+
r
|
|
42
|
+
) : null, o != null ? /* @__PURE__ */ t.createElement("div", { className: e.slot }, o) : null);
|
|
43
|
+
return d ? /* @__PURE__ */ t.createElement("div", { className: l(e.uwrap, u) }, /* @__PURE__ */ t.createElement(i, { className: e.kcard }, p)) : /* @__PURE__ */ t.createElement(i, { className: l(a ? e.line : e.page, u) }, p);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
J as S
|
|
47
|
+
};
|
package/dist/Section.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.sep{display:flex;flex-direction:column;gap:var(--shell-gap);padding:var(--section-padding);flex:1;min-width:0}.seu{box-sizing:border-box;min-height:100svh;display:flex;align-items:center;justify-content:center;padding:var(--section-padding)}.sek{box-sizing:border-box;width:100%;max-width:var(--section-auth-card-max-width);padding:var(--shell-gap-lg);background:var(--shell-background);border:1px solid var(--shell-border);border-radius:var(--shell-radius);box-shadow:var(--shell-shadow);display:flex;flex-direction:column;gap:var(--shell-gap)}.seh{display:flex;flex-direction:column;gap:var(--shell-gap-sm)}.sec{text-align:center;align-items:center}.sei{display:flex;margin-bottom:var(--shell-gap-sm)}.sec .sei{justify-content:center}.set{margin:0;font-size:var(--section-title-size);font-weight:var(--shell-font-weight);letter-spacing:-.02em;color:var(--shell-color);line-height:1.25}.sed{font-size:var(--section-title-size-md)}.see{margin:0;font-size:var(--shell-font-size);color:var(--shell-color-muted);line-height:1.45}.seb{width:100%;text-align:left}.ses{display:flex;flex-direction:column;gap:var(--shell-gap-sm);width:100%}.sel{display:flex;flex-direction:column;gap:var(--shell-gap);margin-bottom:var(--shell-gap-lg);padding-bottom:var(--shell-gap-lg);border-bottom:1px solid var(--shell-border)}.sel:last-of-type{margin-bottom:0;padding-bottom:0;border-bottom:none}.sel .set{font-size:var(--shell-font-size);font-weight:var(--shell-font-weight)}}
|
package/dist/Section.d.ts
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { StackColumns, StackDirection } from './Stack';
|
|
2
3
|
/**
|
|
3
4
|
* Единая секция страницы: заголовок, описание, иконка, контент, действия.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* каркас
|
|
6
|
+
* Роли (не путать):
|
|
7
|
+
* - `Layout` — оболочка приложения (`<main>` внутри);
|
|
8
|
+
* - `PageShell` — каркас модуля (скролл + footer);
|
|
9
|
+
* - `PageHead` — строка title + actions на странице;
|
|
10
|
+
* - `Section` — блок контента / auth / подраздел.
|
|
11
|
+
*
|
|
12
|
+
* Тело (`children`) — тот же ряд/колонка/сетка, что у `Stack`
|
|
13
|
+
* (`direction` / `gap` / `columns`). Ряд кнопок в `actions` —
|
|
14
|
+
* оберни в `<Stack direction="row">`.
|
|
8
15
|
*
|
|
9
16
|
* @example
|
|
10
17
|
* ```tsx
|
|
11
|
-
* <Section title="
|
|
12
|
-
* <
|
|
18
|
+
* <Section title="Фильтры" direction="row" gap={12}>
|
|
19
|
+
* <SearchField name="q" />
|
|
20
|
+
* <Button>Найти</Button>
|
|
21
|
+
* </Section>
|
|
22
|
+
* <Section title="Карточки" direction="grid" columns={3} gap={16}>
|
|
23
|
+
* <Stat label="Всего" value={10} />
|
|
13
24
|
* </Section>
|
|
14
25
|
* ```
|
|
15
26
|
*
|
|
@@ -24,7 +35,7 @@ export type SectionProps = {
|
|
|
24
35
|
icon?: React.ReactNode;
|
|
25
36
|
/** Основной контент секции */
|
|
26
37
|
children?: React.ReactNode;
|
|
27
|
-
/** Блок действий
|
|
38
|
+
/** Блок действий под контентом (колонка; для ряда — Stack direction="row") */
|
|
28
39
|
actions?: React.ReactNode;
|
|
29
40
|
/**
|
|
30
41
|
* `page` — секция модуля / панель настроек.
|
|
@@ -36,14 +47,23 @@ export type SectionProps = {
|
|
|
36
47
|
align?: "start" | "center";
|
|
37
48
|
/** Размер заголовка */
|
|
38
49
|
titleSize?: "md" | "lg";
|
|
50
|
+
/** Раскладка тела: как у Stack (по умолчанию `column`) */
|
|
51
|
+
direction?: StackDirection;
|
|
52
|
+
/** Отступ между детьми тела */
|
|
53
|
+
gap?: number | string;
|
|
54
|
+
/** Сетка тела: число колонок или треки (только при `direction="grid"`) */
|
|
55
|
+
columns?: StackColumns;
|
|
39
56
|
/** Доп. CSS-класс */
|
|
40
57
|
className?: string;
|
|
41
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* HTML-тег корня. По умолчанию `section` (Layout уже даёт `<main>`).
|
|
60
|
+
* Явно `main` — только если Section сам корень страницы без Layout.
|
|
61
|
+
*/
|
|
42
62
|
as?: "section" | "main" | "div";
|
|
43
63
|
};
|
|
44
64
|
/**
|
|
45
65
|
* Единая секция страницы: title + description + icon + children.
|
|
46
66
|
*
|
|
47
|
-
* @see PageHead, PageShell, Stack, EmptyState
|
|
67
|
+
* @see PageHead, PageShell, Layout, Stack, EmptyState
|
|
48
68
|
*/
|
|
49
|
-
export declare function Section({ title, description, icon, children, actions, variant, align, titleSize, className, as, }: SectionProps): React.JSX.Element;
|
|
69
|
+
export declare function Section({ title, description, icon, children, actions, variant, align, titleSize, direction, gap, columns, className, as, }: SectionProps): React.JSX.Element;
|
package/dist/Section.js
CHANGED