@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,137 @@
|
|
|
1
|
+
import n, { useRef as E, useId as M } from "react";
|
|
2
|
+
import { T as Z } from "./TextGroup-236jHxdT.js";
|
|
3
|
+
import { c as z } from "./cx-CcykAxZN.js";
|
|
4
|
+
import { a as O, r as V, p as B } from "./overlayZ-BvHbYC1x.js";
|
|
5
|
+
import { u as G } from "./useControllableValue-BaE0VR5d.js";
|
|
6
|
+
import './PanelInfo.css';const H = "oir", Q = "ois", U = "oih", Y = "oit", _ = "oia", j = "oic", J = "oib", W = "oif", X = "oid", a = {
|
|
7
|
+
root: H,
|
|
8
|
+
sheet: Q,
|
|
9
|
+
header: U,
|
|
10
|
+
title: Y,
|
|
11
|
+
actions: _,
|
|
12
|
+
close: j,
|
|
13
|
+
body: J,
|
|
14
|
+
footer: W,
|
|
15
|
+
dim: X
|
|
16
|
+
}, k = "(max-width: 56rem)", I = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
17
|
+
function oe({
|
|
18
|
+
open: L,
|
|
19
|
+
defaultOpen: N = !1,
|
|
20
|
+
title: c,
|
|
21
|
+
onOpenChange: d,
|
|
22
|
+
onClose: u,
|
|
23
|
+
children: A,
|
|
24
|
+
footer: b,
|
|
25
|
+
headerExtra: R,
|
|
26
|
+
close: S,
|
|
27
|
+
"aria-label": g,
|
|
28
|
+
className: q
|
|
29
|
+
}) {
|
|
30
|
+
const [o = !1, P] = G(
|
|
31
|
+
L,
|
|
32
|
+
N,
|
|
33
|
+
(t) => {
|
|
34
|
+
d == null || d(t), t || u == null || u();
|
|
35
|
+
}
|
|
36
|
+
), f = () => P(!1), T = E(null), m = E(null), v = E(null), p = M(), [r, D] = n.useState(
|
|
37
|
+
() => typeof window < "u" ? window.matchMedia(k).matches : !1
|
|
38
|
+
), [i, y] = n.useState();
|
|
39
|
+
n.useEffect(() => {
|
|
40
|
+
const t = window.matchMedia(k), e = () => D(t.matches);
|
|
41
|
+
return e(), t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
42
|
+
}, []), n.useEffect(() => {
|
|
43
|
+
if (!o || !r) {
|
|
44
|
+
y(void 0);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const t = O();
|
|
48
|
+
return y(t), () => {
|
|
49
|
+
V(t), y(void 0);
|
|
50
|
+
};
|
|
51
|
+
}, [o, r]), n.useEffect(() => {
|
|
52
|
+
if (!o) return;
|
|
53
|
+
const t = (e) => {
|
|
54
|
+
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
55
|
+
const s = B();
|
|
56
|
+
i != null && s !== i || i == null && s > 1e3 || (e.preventDefault(), f());
|
|
57
|
+
};
|
|
58
|
+
return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
|
|
59
|
+
}, [o, i]), n.useEffect(() => {
|
|
60
|
+
if (!o || !r) return;
|
|
61
|
+
const t = document.body.style.overflow;
|
|
62
|
+
return document.body.style.overflow = "hidden", () => {
|
|
63
|
+
document.body.style.overflow = t;
|
|
64
|
+
};
|
|
65
|
+
}, [o, r]), n.useEffect(() => {
|
|
66
|
+
if (!o || (v.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, !r)) return;
|
|
67
|
+
const t = requestAnimationFrame(() => {
|
|
68
|
+
const e = m.current;
|
|
69
|
+
if (!e) return;
|
|
70
|
+
(e.querySelector(I) ?? e).focus();
|
|
71
|
+
});
|
|
72
|
+
return () => {
|
|
73
|
+
var e, s;
|
|
74
|
+
cancelAnimationFrame(t), (s = (e = v.current) == null ? void 0 : e.focus) == null || s.call(e), v.current = null;
|
|
75
|
+
};
|
|
76
|
+
}, [o, r]), n.useEffect(() => {
|
|
77
|
+
if (!o || !r) return;
|
|
78
|
+
const t = (e) => {
|
|
79
|
+
if (e.key !== "Tab") return;
|
|
80
|
+
const s = m.current;
|
|
81
|
+
if (!s) return;
|
|
82
|
+
const l = [
|
|
83
|
+
...s.querySelectorAll(I)
|
|
84
|
+
].filter((x) => !x.hasAttribute("disabled") && x.offsetParent != null);
|
|
85
|
+
if (l.length === 0) {
|
|
86
|
+
e.preventDefault(), s.focus();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const h = l[0], w = l[l.length - 1];
|
|
90
|
+
e.shiftKey && document.activeElement === h ? (e.preventDefault(), w.focus()) : !e.shiftKey && document.activeElement === w && (e.preventDefault(), h.focus());
|
|
91
|
+
};
|
|
92
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
93
|
+
}, [o, r]);
|
|
94
|
+
const F = g ?? (typeof c == "string" && c.trim() ? c : "Панель"), K = r ? "div" : "aside";
|
|
95
|
+
return /* @__PURE__ */ n.createElement(
|
|
96
|
+
K,
|
|
97
|
+
{
|
|
98
|
+
ref: T,
|
|
99
|
+
className: z(a.root, q),
|
|
100
|
+
"data-open": o ? "true" : "false",
|
|
101
|
+
"data-overlay": r ? "true" : "false",
|
|
102
|
+
"aria-hidden": !o,
|
|
103
|
+
...r ? {
|
|
104
|
+
role: o ? "dialog" : void 0,
|
|
105
|
+
"aria-modal": o ? !0 : void 0,
|
|
106
|
+
"aria-labelledby": o ? p : void 0
|
|
107
|
+
} : {
|
|
108
|
+
"aria-label": o ? F : void 0
|
|
109
|
+
},
|
|
110
|
+
style: i != null ? { zIndex: i } : void 0
|
|
111
|
+
},
|
|
112
|
+
o && r ? /* @__PURE__ */ n.createElement("div", { className: a.dim, role: "presentation", onClick: f }) : null,
|
|
113
|
+
/* @__PURE__ */ n.createElement(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref: m,
|
|
117
|
+
className: a.sheet,
|
|
118
|
+
tabIndex: r ? -1 : void 0
|
|
119
|
+
},
|
|
120
|
+
/* @__PURE__ */ n.createElement("div", { className: a.header }, /* @__PURE__ */ n.createElement("div", { className: a.title, id: p }, typeof c == "string" || typeof c == "number" ? /* @__PURE__ */ n.createElement(Z, { title: String(c), size: "m" }) : c), /* @__PURE__ */ n.createElement("div", { className: a.actions }, R, S ?? /* @__PURE__ */ n.createElement(
|
|
121
|
+
"button",
|
|
122
|
+
{
|
|
123
|
+
type: "button",
|
|
124
|
+
className: a.close,
|
|
125
|
+
"aria-label": "Закрыть",
|
|
126
|
+
onClick: f
|
|
127
|
+
},
|
|
128
|
+
"×"
|
|
129
|
+
))),
|
|
130
|
+
/* @__PURE__ */ n.createElement("div", { className: a.body }, A),
|
|
131
|
+
b != null ? /* @__PURE__ */ n.createElement("div", { className: a.footer }, b) : null
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
oe as P
|
|
137
|
+
};
|
package/dist/PanelInfo.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.oir{flex:0 0 auto;position:relative;width:0;min-width:0;min-height:0;align-self:stretch;overflow:hidden;opacity:0;pointer-events:none;transition:width .22s ease,opacity .18s ease,min-width .22s ease}.oir[data-open=true]{width:var(--panel-info-width);min-width:var(--panel-info-width-min);opacity:1;pointer-events:auto}.ois{display:flex;flex-direction:column;height:100%;min-height:0;width:var(--panel-info-width);min-width:var(--panel-info-width-min);box-sizing:border-box;border:var(--chat-border);border-radius:var(--chat-radius);background:var(--chat-background);color:var(--shell-color)}.oih{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:var(--shell-gap-sm);padding:var(--shell-gap);border-bottom:var(--chat-border)}.oit{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.oia{flex:0 0 auto;display:flex;align-items:center;gap:.25rem}.oic{width:2rem;height:2rem;border:0;border-radius:var(--shell-radius);background:transparent;color:var(--shell-color-muted);font-size:1.35rem;line-height:1;cursor:pointer}.oic:hover{color:var(--shell-color);background:var(--shell-background-muted)}.oib{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--shell-gap)}.oif{flex:0 0 auto;padding:var(--shell-gap);border-top:var(--chat-border)}.oid{display:none}@media (max-width: 56rem){.oir[data-open=true]{width:0;min-width:0;opacity:1;overflow:visible;pointer-events:none}.oir[data-open=true] .oid{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:inherit;pointer-events:auto;background:var(--panel-info-backdrop);cursor:pointer}.oir[data-open=true] .ois{position:fixed;top:0;right:0;bottom:0;z-index:inherit;width:min(100vw,var(--panel-info-overlay-max));min-width:0;max-width:100vw;border-radius:0;border-left:var(--chat-border);border-right:none;border-top:none;border-bottom:none;pointer-events:auto;box-shadow:var(--popup-shadow)}}}
|
package/dist/PanelInfo.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export type PanelInfoProps = {
|
|
3
|
-
/** Открыта ли
|
|
4
|
-
open
|
|
3
|
+
/** Открыта ли панель (controlled). */
|
|
4
|
+
open?: boolean;
|
|
5
|
+
/** Начальное открытие (uncontrolled). */
|
|
6
|
+
defaultOpen?: boolean;
|
|
5
7
|
/** Заголовок шапки. */
|
|
6
8
|
title: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
+
/** Смена open (крестик / фон / Escape). */
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Закрытие. Эквивалент `onOpenChange(false)`.
|
|
13
|
+
* Удобный алиас для controlled-режима.
|
|
14
|
+
*/
|
|
15
|
+
onClose?: () => void;
|
|
9
16
|
/**
|
|
10
17
|
* Тело — форма (`@elcrm/form` поля) или любой контент.
|
|
11
18
|
* Скроллится между шапкой и footer.
|
|
@@ -23,7 +30,7 @@ export type PanelInfoProps = {
|
|
|
23
30
|
* Приложение может подставить `@elcrm/button`.
|
|
24
31
|
*/
|
|
25
32
|
close?: React.ReactNode;
|
|
26
|
-
/** `aria-label
|
|
33
|
+
/** `aria-label`, если title не строка. */
|
|
27
34
|
"aria-label"?: string;
|
|
28
35
|
/** Доп. CSS-класс. */
|
|
29
36
|
className?: string;
|
|
@@ -31,9 +38,9 @@ export type PanelInfoProps = {
|
|
|
31
38
|
/**
|
|
32
39
|
* Выезжающая панель справа: шапка / body / footer.
|
|
33
40
|
*
|
|
34
|
-
* Широкий экран — flex-колонка рядом со
|
|
35
|
-
* Узкий (`max-width: 56rem`) —
|
|
36
|
-
* и `acquireOverlayZIndex`.
|
|
41
|
+
* Широкий экран — flex-колонка рядом со списком (`aside`).
|
|
42
|
+
* Узкий (`max-width: 56rem`) — `dialog` + `aria-modal`, затемнение,
|
|
43
|
+
* focus trap и `acquireOverlayZIndex`.
|
|
37
44
|
*
|
|
38
45
|
* @example
|
|
39
46
|
* ```tsx
|
|
@@ -49,4 +56,4 @@ export type PanelInfoProps = {
|
|
|
49
56
|
*
|
|
50
57
|
* Токены: `--panel-info-width`, `--panel-info-backdrop`, `--shell-*`, `--chat-*`.
|
|
51
58
|
*/
|
|
52
|
-
export declare function PanelInfo({ open, title, onClose, children, footer, headerExtra, close, "aria-label": ariaLabel, className, }: PanelInfoProps): React.JSX.Element;
|
|
59
|
+
export declare function PanelInfo({ open: openProp, defaultOpen, title, onOpenChange, onClose, children, footer, headerExtra, close, "aria-label": ariaLabel, className, }: PanelInfoProps): React.JSX.Element;
|
package/dist/PanelInfo.js
CHANGED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import b, { useRef as w, useId as J, useState as F, useLayoutEffect as S, useEffect as Z } from "react";
|
|
2
|
+
import { createPortal as Q } from "react-dom";
|
|
3
|
+
import { c as K } from "./cx-CcykAxZN.js";
|
|
4
|
+
import { a as U, r as T } from "./overlayZ-BvHbYC1x.js";
|
|
5
|
+
import { u as X } from "./useControllableValue-BaE0VR5d.js";
|
|
6
|
+
import './Popover.css';const Y = "opr", _ = "opt", $ = "opp", C = {
|
|
7
|
+
root: Y,
|
|
8
|
+
trigger: _,
|
|
9
|
+
panel: $
|
|
10
|
+
};
|
|
11
|
+
function ee(e, t) {
|
|
12
|
+
const a = t == null ? void 0 : t.querySelector("[data-elcrm-popover-anchor]");
|
|
13
|
+
return a instanceof HTMLElement ? a.getBoundingClientRect() : t ? t.getBoundingClientRect() : e.getBoundingClientRect();
|
|
14
|
+
}
|
|
15
|
+
function te(e, t) {
|
|
16
|
+
return e != null && e.top === t.top && e.left === t.left && e.minWidth === t.minWidth && e.maxHeight === t.maxHeight;
|
|
17
|
+
}
|
|
18
|
+
function ne(e) {
|
|
19
|
+
return e === "menu" || e === "listbox" || e === "tree" || e === "grid" ? e : e === "dialog" || e === "alertdialog" ? "dialog" : "true";
|
|
20
|
+
}
|
|
21
|
+
function oe(e, t, a, h) {
|
|
22
|
+
const l = window.innerHeight - e.bottom - 8 - 8, c = e.top - 8 - 8, y = t > 0 ? t : 160, d = h === "bottom" || h !== "top" && l >= y, E = Math.min(
|
|
23
|
+
420,
|
|
24
|
+
Math.max(120, d ? l : c)
|
|
25
|
+
), u = Math.max(200, e.width), R = a === "end" ? Math.max(8, Math.min(e.right - u, window.innerWidth - u - 8)) : Math.max(8, Math.min(e.left, window.innerWidth - u - 8));
|
|
26
|
+
return { top: d ? e.bottom + 8 : Math.max(8, e.top - 8 - (t > 0 ? t : 0)), left: R, minWidth: u, maxHeight: E };
|
|
27
|
+
}
|
|
28
|
+
function le({
|
|
29
|
+
trigger: e,
|
|
30
|
+
children: t,
|
|
31
|
+
open: a,
|
|
32
|
+
defaultOpen: h = !1,
|
|
33
|
+
onOpenChange: H,
|
|
34
|
+
align: x = "end",
|
|
35
|
+
placement: l = "auto",
|
|
36
|
+
disabled: c = !1,
|
|
37
|
+
label: y,
|
|
38
|
+
role: d,
|
|
39
|
+
className: E,
|
|
40
|
+
panelClassName: u,
|
|
41
|
+
fitContent: R = !1
|
|
42
|
+
}) {
|
|
43
|
+
const v = w(null), I = w(null), P = w(null), L = J(), [o = !1, V] = X(
|
|
44
|
+
a,
|
|
45
|
+
h,
|
|
46
|
+
H
|
|
47
|
+
), [f, z] = F(null), [i, A] = F(null), M = w(null);
|
|
48
|
+
M.current = i;
|
|
49
|
+
const j = ne(d), B = typeof e == "function", k = (n) => {
|
|
50
|
+
c && n || V(n);
|
|
51
|
+
}, D = () => {
|
|
52
|
+
c || k(!o);
|
|
53
|
+
}, N = {
|
|
54
|
+
"data-elcrm-popover-anchor": "",
|
|
55
|
+
"aria-haspopup": j,
|
|
56
|
+
"aria-expanded": o,
|
|
57
|
+
"aria-controls": o ? L : void 0,
|
|
58
|
+
onClick: (n) => {
|
|
59
|
+
n.stopPropagation(), D();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
S(() => {
|
|
63
|
+
if (o) {
|
|
64
|
+
i == null && A(U());
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
i != null && (T(i), A(null));
|
|
68
|
+
}, [o, i]), Z(() => () => {
|
|
69
|
+
M.current != null && T(M.current);
|
|
70
|
+
}, []);
|
|
71
|
+
const W = () => {
|
|
72
|
+
var p;
|
|
73
|
+
const n = v.current;
|
|
74
|
+
if (!n) return;
|
|
75
|
+
const r = ee(n, I.current), s = ((p = P.current) == null ? void 0 : p.offsetHeight) ?? 0, m = oe(r, s, x, l);
|
|
76
|
+
z((g) => te(g, m) ? g : m);
|
|
77
|
+
};
|
|
78
|
+
S(() => {
|
|
79
|
+
if (!o) {
|
|
80
|
+
z(null);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
W();
|
|
84
|
+
const n = window.requestAnimationFrame(() => W()), r = () => W();
|
|
85
|
+
return window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
|
|
86
|
+
window.cancelAnimationFrame(n), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
87
|
+
};
|
|
88
|
+
}, [o, x, l, t]), Z(() => {
|
|
89
|
+
if (!o) return;
|
|
90
|
+
const n = (s) => {
|
|
91
|
+
var p, g;
|
|
92
|
+
const m = s.target;
|
|
93
|
+
(p = v.current) != null && p.contains(m) || (g = P.current) != null && g.contains(m) || k(!1);
|
|
94
|
+
}, r = (s) => {
|
|
95
|
+
s.key === "Escape" && (s.preventDefault(), s.stopPropagation(), k(!1));
|
|
96
|
+
};
|
|
97
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", r, !0), () => {
|
|
98
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", r, !0);
|
|
99
|
+
};
|
|
100
|
+
}, [o]);
|
|
101
|
+
const O = o && i != null ? {
|
|
102
|
+
position: "fixed",
|
|
103
|
+
zIndex: i,
|
|
104
|
+
...f ? {
|
|
105
|
+
top: f.top,
|
|
106
|
+
bottom: "auto",
|
|
107
|
+
left: f.left,
|
|
108
|
+
minWidth: f.minWidth,
|
|
109
|
+
...R ? { maxHeight: "none", overflow: "visible" } : { maxHeight: f.maxHeight }
|
|
110
|
+
} : { visibility: "hidden", pointerEvents: "none" }
|
|
111
|
+
} : null, q = O != null ? /* @__PURE__ */ b.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref: P,
|
|
115
|
+
id: L,
|
|
116
|
+
role: d,
|
|
117
|
+
"aria-label": y,
|
|
118
|
+
className: K(C.panel, u),
|
|
119
|
+
style: O,
|
|
120
|
+
onMouseDown: (n) => n.stopPropagation()
|
|
121
|
+
},
|
|
122
|
+
t
|
|
123
|
+
) : null, G = B ? e({ open: o, disabled: c, menuId: L, anchorProps: N }) : e;
|
|
124
|
+
return /* @__PURE__ */ b.createElement("div", { ref: v, className: K(C.root, E) }, /* @__PURE__ */ b.createElement(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: I,
|
|
128
|
+
className: C.trigger,
|
|
129
|
+
...B ? {} : {
|
|
130
|
+
...N,
|
|
131
|
+
role: "button",
|
|
132
|
+
tabIndex: c ? -1 : 0,
|
|
133
|
+
onKeyDown: (n) => {
|
|
134
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), D());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
G
|
|
139
|
+
), q && typeof document < "u" ? Q(q, document.body) : null);
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
le as P
|
|
143
|
+
};
|
package/dist/Popover.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.opr{position:relative;display:inline-flex;vertical-align:middle}.opt{display:inline-flex;align-items:center;min-width:0;height:auto}.opp{box-sizing:border-box;overflow:auto;padding:var(--shell-gap-sm);background:var(--shell-background);border:1px solid var(--shell-border);border-radius:var(--shell-radius);box-shadow:var(--popup-shadow);color:var(--shell-color);min-width:var(--dropdown-min-width);max-width:var(--dropdown-max-width);max-height:var(--dropdown-max-height)}}
|
package/dist/Popover.d.ts
CHANGED
|
@@ -1,33 +1,53 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/** Куда открывать панель относительно якоря. */
|
|
3
3
|
export type PopoverPlacement = "auto" | "top" | "bottom";
|
|
4
|
+
/** Props, которые нужно проставить на интерактивный якорь (кнопку). */
|
|
5
|
+
export type PopoverAnchorProps = {
|
|
6
|
+
"data-elcrm-popover-anchor": "";
|
|
7
|
+
"aria-haspopup": string;
|
|
8
|
+
"aria-expanded": boolean;
|
|
9
|
+
"aria-controls"?: string;
|
|
10
|
+
onClick: (event: React.MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
/** API для `trigger` как render-prop (без cloneElement). */
|
|
13
|
+
export type PopoverTriggerApi = {
|
|
14
|
+
open: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
menuId: string;
|
|
17
|
+
/** Пропы на кнопку/ссылку-якорь */
|
|
18
|
+
anchorProps: PopoverAnchorProps;
|
|
19
|
+
};
|
|
4
20
|
/**
|
|
5
21
|
* Портал у якоря: Escape, клик снаружи, z-index (`globalThis.elcrm.overlayZ`).
|
|
6
22
|
*
|
|
7
23
|
* Роли: Popover = свой попап (слот `children`).
|
|
8
24
|
* Типовое меню пунктов — {@link Dropdown}.
|
|
9
|
-
* Инлайн-навигация — {@link Menu} (не путать).
|
|
10
25
|
*
|
|
11
|
-
*
|
|
26
|
+
* Якорь — без `cloneElement`:
|
|
27
|
+
* - `trigger={(api) => <button {...api.anchorProps}>…</button>}` — канон;
|
|
28
|
+
* - `trigger={<span>…</span>}` — клик/ARIA на обёртке.
|
|
12
29
|
*
|
|
13
30
|
* @example
|
|
14
31
|
* ```tsx
|
|
15
32
|
* <Popover
|
|
16
|
-
* trigger={
|
|
33
|
+
* trigger={(api) => (
|
|
34
|
+
* <Button {...api.anchorProps}>Ещё</Button>
|
|
35
|
+
* )}
|
|
17
36
|
* label="Действия"
|
|
18
|
-
*
|
|
37
|
+
* role="dialog"
|
|
19
38
|
* >
|
|
20
|
-
* <List>
|
|
21
|
-
* <Item as="button">Скачать</Item>
|
|
22
|
-
* </List>
|
|
39
|
+
* <List><Item as="button">Скачать</Item></List>
|
|
23
40
|
* </Popover>
|
|
24
41
|
* ```
|
|
25
42
|
*
|
|
26
43
|
* Токены: `--shell-*`, `--popup-shadow`, `--dropdown-min-width`.
|
|
27
44
|
*/
|
|
28
45
|
export type PopoverProps = {
|
|
29
|
-
/**
|
|
30
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Якорь: узел **или** render-prop с {@link PopoverTriggerApi}.
|
|
48
|
+
* Render-prop — без clone; пропы на кнопку через `anchorProps`.
|
|
49
|
+
*/
|
|
50
|
+
trigger: React.ReactNode | ((api: PopoverTriggerApi) => React.ReactNode);
|
|
31
51
|
/** Содержимое панели */
|
|
32
52
|
children?: React.ReactNode;
|
|
33
53
|
/** Контролируемое открытие */
|
|
@@ -48,15 +68,24 @@ export type PopoverProps = {
|
|
|
48
68
|
disabled?: boolean;
|
|
49
69
|
/** aria-label панели */
|
|
50
70
|
label?: string;
|
|
51
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* role панели.
|
|
73
|
+
* По умолчанию без роли (произвольный контент).
|
|
74
|
+
* Меню пунктов — `role="menu"` ({@link Dropdown}).
|
|
75
|
+
*/
|
|
52
76
|
role?: React.AriaRole;
|
|
53
77
|
className?: string;
|
|
54
78
|
/** Класс панели (portal) */
|
|
55
79
|
panelClassName?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Высота по контенту: без `maxHeight` и без внутреннего скролла.
|
|
82
|
+
* Для меню аккаунта Sidebar (`Dropdown tone="account"`).
|
|
83
|
+
*/
|
|
84
|
+
fitContent?: boolean;
|
|
56
85
|
};
|
|
57
86
|
/**
|
|
58
87
|
* Панель в portal рядом с триггером.
|
|
59
88
|
*
|
|
60
89
|
* @see Dropdown, Menu
|
|
61
90
|
*/
|
|
62
|
-
export declare function Popover({ trigger, children, open: openProp, defaultOpen, onOpenChange, align, placement, disabled, label, role, className, panelClassName, }: PopoverProps): React.JSX.Element;
|
|
91
|
+
export declare function Popover({ trigger, children, open: openProp, defaultOpen, onOpenChange, align, placement, disabled, label, role, className, panelClassName, fitContent, }: PopoverProps): React.JSX.Element;
|
package/dist/Popover.js
CHANGED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import e, { useRef as R } from "react";
|
|
2
|
+
import { c as m } from "./cx-CcykAxZN.js";
|
|
3
|
+
import { h as S } from "./rovingKeys-Di9N1Nct.js";
|
|
4
|
+
import { u as z } from "./useControllableValue-BaE0VR5d.js";
|
|
5
|
+
import { C as K } from "./CheckIcon-FdB8fMEF.js";
|
|
6
|
+
import './PricingGroup.css';const L = "ggr", O = "ggi", V = "ggs", I = "ggb", j = "ggg", A = "gga", G = "ggm", M = "ggh", T = "ggt", q = "ggp", H = "ggz", J = "ggo", Q = "gge", U = "ggd", W = "ggx", X = "ggf", Y = "ggy", Z = "ggl", _ = "ggu", $ = "ggn", ee = "ggc", le = "ggk", ne = "ggw", a = {
|
|
7
|
+
root: L,
|
|
8
|
+
item: O,
|
|
9
|
+
selected: V,
|
|
10
|
+
banner: I,
|
|
11
|
+
gfloat: j,
|
|
12
|
+
above: A,
|
|
13
|
+
media: G,
|
|
14
|
+
head: M,
|
|
15
|
+
title: T,
|
|
16
|
+
price: q,
|
|
17
|
+
zsum: H,
|
|
18
|
+
old: J,
|
|
19
|
+
extra: Q,
|
|
20
|
+
desc: U,
|
|
21
|
+
xact: W,
|
|
22
|
+
feat: X,
|
|
23
|
+
ylist: Y,
|
|
24
|
+
label: Z,
|
|
25
|
+
usum: _,
|
|
26
|
+
note: $,
|
|
27
|
+
check: ee,
|
|
28
|
+
ktick: le,
|
|
29
|
+
wtick: ne
|
|
30
|
+
};
|
|
31
|
+
function y() {
|
|
32
|
+
return /* @__PURE__ */ e.createElement("span", { className: a.ktick, "aria-hidden": !0 }, /* @__PURE__ */ e.createElement(K, { className: a.wtick }));
|
|
33
|
+
}
|
|
34
|
+
function ae({ feature: l }) {
|
|
35
|
+
if (l != null && typeof l == "object" && !e.isValidElement(l) && "label" in l) {
|
|
36
|
+
const t = l;
|
|
37
|
+
return /* @__PURE__ */ e.createElement("li", { className: a.check }, t.icon != null ? t.icon : /* @__PURE__ */ e.createElement(y, null), /* @__PURE__ */ e.createElement("span", null, t.label));
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ e.createElement("li", { className: a.check }, /* @__PURE__ */ e.createElement(y, null), /* @__PURE__ */ e.createElement("span", null, l));
|
|
40
|
+
}
|
|
41
|
+
function P({ item: l }) {
|
|
42
|
+
const t = l.badge != null && (l.badgePlacement ?? "pill") === "pill";
|
|
43
|
+
return l.title == null && !t ? null : /* @__PURE__ */ e.createElement("div", { className: a.head }, l.title != null ? /* @__PURE__ */ e.createElement("h3", { className: a.title }, l.title) : null, t ? /* @__PURE__ */ e.createElement("span", { className: a.gfloat }, l.badge) : null);
|
|
44
|
+
}
|
|
45
|
+
function x({ item: l }) {
|
|
46
|
+
return l.price == null && l.priceOld == null && l.meta == null ? null : /* @__PURE__ */ e.createElement("div", { className: a.price }, l.priceOld != null ? /* @__PURE__ */ e.createElement("span", { className: a.old }, l.priceOld) : null, l.price != null ? /* @__PURE__ */ e.createElement("span", { className: a.zsum }, l.price) : null, l.meta != null ? /* @__PURE__ */ e.createElement("span", { className: a.extra }, l.meta) : null);
|
|
47
|
+
}
|
|
48
|
+
function f({ item: l }) {
|
|
49
|
+
return l.description == null ? null : /* @__PURE__ */ e.createElement("p", { className: a.desc }, l.description);
|
|
50
|
+
}
|
|
51
|
+
function te({
|
|
52
|
+
actions: l,
|
|
53
|
+
placement: t
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ e.createElement(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: t === "footer" ? a.feat : a.xact,
|
|
59
|
+
onClick: (c) => c.stopPropagation(),
|
|
60
|
+
onMouseDown: (c) => c.preventDefault()
|
|
61
|
+
},
|
|
62
|
+
l
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function ce({ item: l }) {
|
|
66
|
+
return l.features == null && l.featuresLabel == null && l.featuresSummary == null ? null : /* @__PURE__ */ e.createElement("div", { className: a.ylist }, l.featuresLabel != null ? /* @__PURE__ */ e.createElement("p", { className: a.label }, l.featuresLabel) : null, l.featuresSummary != null ? /* @__PURE__ */ e.createElement("p", { className: a.usum }, l.featuresSummary) : null, l.features != null && l.features.length > 0 ? /* @__PURE__ */ e.createElement("ul", { className: a.note }, l.features.map((t, c) => /* @__PURE__ */ e.createElement(ae, { key: c, feature: t }))) : null);
|
|
67
|
+
}
|
|
68
|
+
function ge({
|
|
69
|
+
items: l,
|
|
70
|
+
value: t,
|
|
71
|
+
defaultValue: c,
|
|
72
|
+
selectable: r = !1,
|
|
73
|
+
disabled: p = !1,
|
|
74
|
+
onValueChange: w,
|
|
75
|
+
className: D,
|
|
76
|
+
...B
|
|
77
|
+
}) {
|
|
78
|
+
const [i, g] = z(
|
|
79
|
+
t,
|
|
80
|
+
c,
|
|
81
|
+
w
|
|
82
|
+
), E = R(null), v = l.filter((n) => !(p || n.disabled)).map((n) => n.value);
|
|
83
|
+
return /* @__PURE__ */ e.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
ref: E,
|
|
87
|
+
className: m(a.root, D),
|
|
88
|
+
role: r ? "radiogroup" : "list",
|
|
89
|
+
onKeyDown: r ? (n) => S(n, {
|
|
90
|
+
values: v,
|
|
91
|
+
value: i,
|
|
92
|
+
onSelect: g,
|
|
93
|
+
focusRoot: E.current
|
|
94
|
+
}) : void 0,
|
|
95
|
+
...B
|
|
96
|
+
},
|
|
97
|
+
l.map((n) => {
|
|
98
|
+
const s = i === n.value, b = p || !!n.disabled, C = !!n.highlighted || s, h = n.badgePlacement ?? "pill", o = n.actionsPlacement ?? "after", k = n.descriptionPlacement ?? "after-price", u = r && !b, N = n.actions != null ? /* @__PURE__ */ e.createElement(
|
|
99
|
+
te,
|
|
100
|
+
{
|
|
101
|
+
actions: n.actions,
|
|
102
|
+
placement: o
|
|
103
|
+
}
|
|
104
|
+
) : null, F = /* @__PURE__ */ e.createElement(e.Fragment, null, n.priceFirst ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(x, { item: n }), /* @__PURE__ */ e.createElement(P, { item: n }), /* @__PURE__ */ e.createElement(f, { item: n })) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(P, { item: n }), k === "before-price" ? /* @__PURE__ */ e.createElement(f, { item: n }) : null, /* @__PURE__ */ e.createElement(x, { item: n }), k === "after-price" ? /* @__PURE__ */ e.createElement(f, { item: n }) : null));
|
|
105
|
+
return /* @__PURE__ */ e.createElement(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
key: n.value,
|
|
109
|
+
role: r ? "radio" : "listitem",
|
|
110
|
+
className: m(a.item, C && a.selected),
|
|
111
|
+
"data-value": n.value,
|
|
112
|
+
"data-selected": s ? "true" : void 0,
|
|
113
|
+
"data-highlighted": n.highlighted ? "true" : void 0,
|
|
114
|
+
"data-selectable": u ? "true" : void 0,
|
|
115
|
+
"aria-checked": r ? s : void 0,
|
|
116
|
+
"aria-disabled": b || void 0,
|
|
117
|
+
tabIndex: u ? s || !i && n.value === v[0] ? 0 : -1 : void 0,
|
|
118
|
+
onClick: () => {
|
|
119
|
+
u && g(n.value);
|
|
120
|
+
},
|
|
121
|
+
onKeyDown: (d) => {
|
|
122
|
+
u && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), g(n.value));
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
n.badge != null && h === "banner" ? /* @__PURE__ */ e.createElement("div", { className: a.banner }, n.badge) : null,
|
|
126
|
+
n.badge != null && h === "float" ? /* @__PURE__ */ e.createElement("div", { className: m(a.gfloat, a.above) }, n.badge) : null,
|
|
127
|
+
n.icon != null ? /* @__PURE__ */ e.createElement("div", { className: a.media }, n.icon) : null,
|
|
128
|
+
F,
|
|
129
|
+
o === "before" ? N : null,
|
|
130
|
+
/* @__PURE__ */ e.createElement(ce, { item: n }),
|
|
131
|
+
o === "after" || o === "footer" ? N : null
|
|
132
|
+
);
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
ge as P
|
|
138
|
+
};
|
package/dist/PricingGroup.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.
|
|
1
|
+
@layer elcrm-components{.ggr{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--pricing-card-min-width),1fr));gap:var(--shell-gap-lg);align-items:stretch}.ggi{position:relative;display:flex;flex-direction:column;gap:var(--shell-gap);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);box-shadow:var(--shell-shadow)}.ggi[data-selectable=true]{cursor:pointer}.ggi:disabled,.ggi[aria-disabled=true]{opacity:var(--shell-disabled-opacity);cursor:not-allowed}.ggs,.ggi[data-selected=true],.ggi[data-highlighted=true]{border-color:var(--shell-color-accent);background:var(--shell-background-selected);box-shadow:var(--shell-shadow)}.ggb{display:flex;align-items:center;justify-content:center;margin:calc(-1 * var(--shell-padding-block)) calc(-1 * var(--shell-padding-inline)) 0;padding:var(--shell-gap-sm) var(--shell-padding-inline);border-radius:var(--shell-radius) var(--shell-radius) 0 0;background:var(--shell-color-accent);color:var(--avatar-color);font-size:var(--shell-font-size-sm);font-weight:var(--shell-font-weight);text-align:center}.ggg{display:inline-flex;align-items:center;width:fit-content;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);line-height:1.2}.gga{position:absolute;top:0;left:50%;transform:translate(-50%,-50%)}.ggm{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:calc(var(--shell-icon-size) * 1.6);height:calc(var(--shell-icon-size) * 1.6);color:var(--shell-color-accent);background:var(--shell-background-hover);border-radius:50%;overflow:hidden}.ggh{display:flex;flex-wrap:wrap;align-items:center;gap:var(--shell-gap-sm)}.ggt{margin:0;font-size:var(--shell-font-size);font-weight:var(--shell-font-weight);color:var(--shell-color);line-height:1.3}.ggp{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--shell-gap-sm)}.ggz{font-size:calc(var(--shell-font-size-lg) * 1.35);font-weight:700;color:var(--shell-color);line-height:1.15}.ggi[data-highlighted=true] .ggz,.ggi[data-selected=true] .ggz{color:var(--shell-color-accent)}.ggo{font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);text-decoration:line-through}.gge{font-size:var(--shell-font-size-sm);color:var(--shell-color-muted)}.ggd{margin:0;font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);line-height:1.45}.ggx{display:flex;flex-direction:column;gap:var(--shell-gap-sm)}.ggf{display:flex;flex-direction:column;gap:var(--shell-gap-sm);margin:auto calc(-1 * var(--shell-padding-inline)) calc(-1 * var(--shell-padding-block));padding:var(--shell-padding);background:var(--shell-background-muted);border-top:1px solid var(--shell-border);border-radius:0 0 var(--shell-radius) var(--shell-radius)}.ggy{display:flex;flex-direction:column;gap:var(--shell-gap-sm);margin-top:auto}.ggl{margin:0;font-size:var(--shell-font-size-sm);font-weight:var(--shell-font-weight);letter-spacing:.04em;text-transform:uppercase;color:var(--shell-color-muted)}.ggu{margin:0;font-size:var(--shell-font-size-sm);color:var(--shell-color-muted);line-height:1.4}.ggn{display:flex;flex-direction:column;gap:var(--shell-gap-sm);margin:0;padding:0;list-style:none}.ggc{display:flex;align-items:flex-start;gap:var(--shell-gap-sm);font-size:var(--shell-font-size-sm);color:var(--shell-color);line-height:1.4}.ggk{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--shell-check-size);height:var(--shell-check-size);margin-top:.1em;color:var(--avatar-color);background:var(--shell-color-success);border-radius:50%}.ggw{width:60%;height:60%;display:block}}
|
package/dist/PricingGroup.d.ts
CHANGED
package/dist/PricingGroup.js
CHANGED