@elcrm/components 0.5.4 → 0.5.5

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 (37) hide show
  1. package/README.md +11 -0
  2. package/dist/{AvatarGroup-Dq-UrOaC.js → AvatarGroup-DeceOhGV.js} +29 -26
  3. package/dist/AvatarGroup.js +1 -1
  4. package/dist/{Breadcrumb-DM_hWw5n.js → Breadcrumb-BexTTfCV.js} +42 -29
  5. package/dist/Breadcrumb.js +1 -1
  6. package/dist/CodeBlock-CZFC4r35.js +37 -0
  7. package/dist/CodeBlock.js +1 -1
  8. package/dist/Dropdown-C9rbsSgR.js +190 -0
  9. package/dist/Dropdown.js +1 -1
  10. package/dist/{Healthmap-Z-LLfGW0.js → Healthmap-B4h6_9Yv.js} +130 -123
  11. package/dist/Healthmap.js +1 -1
  12. package/dist/Menu-CR2CclSe.js +76 -0
  13. package/dist/Menu.js +1 -1
  14. package/dist/PageHead-BjBvWtlk.js +33 -0
  15. package/dist/PageHead.d.ts +7 -1
  16. package/dist/PageHead.js +1 -1
  17. package/dist/{PanelInfo-Db5GCr-c.js → PanelInfo-BTkDUF-p.js} +61 -58
  18. package/dist/PanelInfo.js +1 -1
  19. package/dist/Popover.d.ts +1 -1
  20. package/dist/{PricingTable-BjpGVAhi.js → PricingTable-Dt2wsnEz.js} +56 -53
  21. package/dist/PricingTable.js +1 -1
  22. package/dist/Section-C5XfBTfd.js +48 -0
  23. package/dist/Section.d.ts +8 -1
  24. package/dist/Section.js +1 -1
  25. package/dist/{Sidebar-Bouhd5SS.js → Sidebar-C5vMwV9L.js} +77 -74
  26. package/dist/Sidebar.js +1 -1
  27. package/dist/TabSections-CEM_8Fjy.js +87 -0
  28. package/dist/TabSections.js +1 -1
  29. package/dist/index.es.js +12 -12
  30. package/dist/kit-manifest.json +12 -2
  31. package/package.json +1 -1
  32. package/dist/CodeBlock-B3wvMejv.js +0 -34
  33. package/dist/Dropdown-CR_XxNak.js +0 -185
  34. package/dist/Menu-u0WnWjT-.js +0 -73
  35. package/dist/PageHead-BfClTLrF.js +0 -31
  36. package/dist/Section-PprWjOvt.js +0 -47
  37. package/dist/TabSections-Dppe9wiz.js +0 -84
@@ -1,69 +1,70 @@
1
- import n, { useRef as E, useId as M } from "react";
1
+ import n, { useRef as E, useId as K } from "react";
2
+ import { Button as M } from "@elcrm/button";
2
3
  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
4
+ import { c as O } from "./cx-CcykAxZN.js";
5
+ import { a as B, r as V, p as G } from "./overlayZ-BvHbYC1x.js";
6
+ import { u as H } from "./useControllableValue-BaE0VR5d.js";
7
+ import './PanelInfo.css';const Q = "oir", U = "ois", Y = "oih", _ = "oit", j = "oia", J = "oic", W = "oib", X = "oif", $ = "oid", a = {
8
+ root: Q,
9
+ sheet: U,
10
+ header: Y,
11
+ title: _,
12
+ actions: j,
13
+ close: J,
14
+ body: W,
15
+ footer: X,
16
+ dim: $
16
17
  }, 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
+ function se({
18
19
  open: L,
19
20
  defaultOpen: N = !1,
20
- title: c,
21
+ title: i,
21
22
  onOpenChange: d,
22
23
  onClose: u,
23
- children: A,
24
+ children: g,
24
25
  footer: b,
25
- headerExtra: R,
26
- close: S,
27
- "aria-label": g,
26
+ headerExtra: A,
27
+ close: R,
28
+ "aria-label": S,
28
29
  className: q
29
30
  }) {
30
- const [o = !1, P] = G(
31
+ const [r = !1, P] = H(
31
32
  L,
32
33
  N,
33
34
  (t) => {
34
35
  d == null || d(t), t || u == null || u();
35
36
  }
36
- ), f = () => P(!1), T = E(null), m = E(null), v = E(null), p = M(), [r, D] = n.useState(
37
+ ), f = () => P(!1), T = E(null), m = E(null), v = E(null), h = K(), [o, z] = n.useState(
37
38
  () => typeof window < "u" ? window.matchMedia(k).matches : !1
38
- ), [i, y] = n.useState();
39
+ ), [c, y] = n.useState();
39
40
  n.useEffect(() => {
40
- const t = window.matchMedia(k), e = () => D(t.matches);
41
+ const t = window.matchMedia(k), e = () => z(t.matches);
41
42
  return e(), t.addEventListener("change", e), () => t.removeEventListener("change", e);
42
43
  }, []), n.useEffect(() => {
43
- if (!o || !r) {
44
+ if (!r || !o) {
44
45
  y(void 0);
45
46
  return;
46
47
  }
47
- const t = O();
48
+ const t = B();
48
49
  return y(t), () => {
49
50
  V(t), y(void 0);
50
51
  };
51
- }, [o, r]), n.useEffect(() => {
52
- if (!o) return;
52
+ }, [r, o]), n.useEffect(() => {
53
+ if (!r) return;
53
54
  const t = (e) => {
54
55
  if (e.key !== "Escape" || e.defaultPrevented) return;
55
- const s = B();
56
- i != null && s !== i || i == null && s > 1e3 || (e.preventDefault(), f());
56
+ const s = G();
57
+ c != null && s !== c || c == null && s > 1e3 || (e.preventDefault(), f());
57
58
  };
58
59
  return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
59
- }, [o, i]), n.useEffect(() => {
60
- if (!o || !r) return;
60
+ }, [r, c]), n.useEffect(() => {
61
+ if (!r || !o) return;
61
62
  const t = document.body.style.overflow;
62
63
  return document.body.style.overflow = "hidden", () => {
63
64
  document.body.style.overflow = t;
64
65
  };
65
- }, [o, r]), n.useEffect(() => {
66
- if (!o || (v.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, !r)) return;
66
+ }, [r, o]), n.useEffect(() => {
67
+ if (!r || (v.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, !o)) return;
67
68
  const t = requestAnimationFrame(() => {
68
69
  const e = m.current;
69
70
  if (!e) return;
@@ -73,8 +74,8 @@ function oe({
73
74
  var e, s;
74
75
  cancelAnimationFrame(t), (s = (e = v.current) == null ? void 0 : e.focus) == null || s.call(e), v.current = null;
75
76
  };
76
- }, [o, r]), n.useEffect(() => {
77
- if (!o || !r) return;
77
+ }, [r, o]), n.useEffect(() => {
78
+ if (!r || !o) return;
78
79
  const t = (e) => {
79
80
  if (e.key !== "Tab") return;
80
81
  const s = m.current;
@@ -86,52 +87,54 @@ function oe({
86
87
  e.preventDefault(), s.focus();
87
88
  return;
88
89
  }
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());
90
+ const p = l[0], w = l[l.length - 1];
91
+ e.shiftKey && document.activeElement === p ? (e.preventDefault(), w.focus()) : !e.shiftKey && document.activeElement === w && (e.preventDefault(), p.focus());
91
92
  };
92
93
  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";
94
+ }, [r, o]);
95
+ const D = S ?? (typeof i == "string" && i.trim() ? i : "Панель"), F = o ? "div" : "aside";
95
96
  return /* @__PURE__ */ n.createElement(
96
- K,
97
+ F,
97
98
  {
98
99
  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
100
+ className: O(a.root, q),
101
+ "data-open": r ? "true" : "false",
102
+ "data-overlay": o ? "true" : "false",
103
+ "aria-hidden": !r,
104
+ ...o ? {
105
+ role: r ? "dialog" : void 0,
106
+ "aria-modal": r ? !0 : void 0,
107
+ "aria-labelledby": r ? h : void 0
107
108
  } : {
108
- "aria-label": o ? F : void 0
109
+ "aria-label": r ? D : void 0
109
110
  },
110
- style: i != null ? { zIndex: i } : void 0
111
+ style: c != null ? { zIndex: c } : void 0
111
112
  },
112
- o && r ? /* @__PURE__ */ n.createElement("div", { className: a.dim, role: "presentation", onClick: f }) : null,
113
+ r && o ? /* @__PURE__ */ n.createElement("div", { className: a.dim, role: "presentation", onClick: f }) : null,
113
114
  /* @__PURE__ */ n.createElement(
114
115
  "div",
115
116
  {
116
117
  ref: m,
117
118
  className: a.sheet,
118
- tabIndex: r ? -1 : void 0
119
+ tabIndex: o ? -1 : void 0
119
120
  },
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",
121
+ /* @__PURE__ */ n.createElement("div", { className: a.header }, /* @__PURE__ */ n.createElement("div", { className: a.title, id: h }, typeof i == "string" || typeof i == "number" ? /* @__PURE__ */ n.createElement(Z, { title: String(i), size: "m" }) : i), /* @__PURE__ */ n.createElement("div", { className: a.actions }, A, R ?? /* @__PURE__ */ n.createElement(
122
+ M,
122
123
  {
123
- type: "button",
124
+ variant: "ghost",
125
+ size: "s",
126
+ width: "s",
124
127
  className: a.close,
125
128
  "aria-label": "Закрыть",
126
129
  onClick: f
127
130
  },
128
131
  "×"
129
132
  ))),
130
- /* @__PURE__ */ n.createElement("div", { className: a.body }, A),
133
+ /* @__PURE__ */ n.createElement("div", { className: a.body }, g),
131
134
  b != null ? /* @__PURE__ */ n.createElement("div", { className: a.footer }, b) : null
132
135
  )
133
136
  );
134
137
  }
135
138
  export {
136
- oe as P
139
+ se as P
137
140
  };
package/dist/PanelInfo.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as e } from "./PanelInfo-Db5GCr-c.js";
1
+ import { P as e } from "./PanelInfo-BTkDUF-p.js";
2
2
  export {
3
3
  e as PanelInfo
4
4
  };
package/dist/Popover.d.ts CHANGED
@@ -4,7 +4,7 @@ export type PopoverPlacement = "auto" | "top" | "bottom";
4
4
  /** Props, которые нужно проставить на интерактивный якорь (кнопку). */
5
5
  export type PopoverAnchorProps = {
6
6
  "data-elcrm-popover-anchor": "";
7
- "aria-haspopup": string;
7
+ "aria-haspopup": React.AriaAttributes["aria-haspopup"];
8
8
  "aria-expanded": boolean;
9
9
  "aria-controls"?: string;
10
10
  onClick: (event: React.MouseEvent) => void;
@@ -1,37 +1,38 @@
1
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,
2
+ import { Button as C } from "@elcrm/button";
3
+ import { c as D } from "./cx-CcykAxZN.js";
4
+ import { u as F } from "./useControllableValue-BaE0VR5d.js";
5
+ import { Tooltip as q } from "@elcrm/tooltip";
6
+ import { C as z } from "./CheckIcon-FdB8fMEF.js";
7
+ import './PricingTable.css';const B = "gtr", T = "gth", I = "gtm", O = "gtn", V = "gtt", M = "gtg", S = "gtp", H = "gtz", K = "gto", R = "gte", $ = "gtd", j = "gtx", A = "gtb", G = "gty", J = "gtl", L = "gtw", Q = "gtc", U = "gtk", W = "gtv", X = "gta", Y = "gtu", Z = "gtq", t = {
8
+ root: B,
8
9
  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
10
+ media: I,
11
+ name: O,
12
+ title: V,
13
+ gban: M,
14
+ price: S,
15
+ zsum: H,
16
+ old: K,
17
+ excerpt: R,
18
+ desc: $,
19
+ xact: j,
20
+ block: A,
21
+ yrow: G,
22
+ label: J,
23
+ whint: L,
24
+ cell: Q,
25
+ ktick: U,
26
+ vtick: W,
27
+ absent: X,
28
+ ufoot: Y,
29
+ quad: Z
29
30
  };
30
- function Z() {
31
- return /* @__PURE__ */ l.createElement("span", { className: t.ktick, "aria-hidden": !0 }, /* @__PURE__ */ l.createElement(q, { className: t.vtick }));
31
+ function _() {
32
+ return /* @__PURE__ */ l.createElement("span", { className: t.ktick, "aria-hidden": !0 }, /* @__PURE__ */ l.createElement(z, { className: t.vtick }));
32
33
  }
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);
34
+ function ee({ value: e }) {
35
+ return e === !0 ? /* @__PURE__ */ l.createElement(_, null) : e === !1 || e == null || e === "" ? /* @__PURE__ */ l.createElement("span", { className: t.absent }, "—") : /* @__PURE__ */ l.createElement(l.Fragment, null, e);
35
36
  }
36
37
  function v({
37
38
  item: e,
@@ -42,15 +43,15 @@ function v({
42
43
  function h({ item: e }) {
43
44
  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
  }
45
- function ee({
46
+ function le({
46
47
  item: e,
47
48
  highlighted: r,
48
- selected: i,
49
+ selected: d,
49
50
  selectable: o,
50
51
  disabled: u,
51
52
  onSelect: m
52
53
  }) {
53
- const d = e.badge != null && (e.badgePlacement ?? "pill") === "pill", p = e.badge != null && e.badgePlacement === "banner";
54
+ const i = e.badge != null && (e.badgePlacement ?? "pill") === "pill", p = e.badge != null && e.badgePlacement === "banner";
54
55
  return /* @__PURE__ */ l.createElement(
55
56
  "div",
56
57
  {
@@ -59,8 +60,8 @@ function ee({
59
60
  "data-value": e.value,
60
61
  "data-highlighted": r ? "true" : void 0,
61
62
  "data-selectable": o ? "true" : void 0,
62
- "aria-checked": o ? i : void 0,
63
- tabIndex: o && !u ? i ? 0 : -1 : void 0,
63
+ "aria-checked": o ? d : void 0,
64
+ tabIndex: o && !u ? d ? 0 : -1 : void 0,
64
65
  onClick: () => {
65
66
  o && !u && m();
66
67
  },
@@ -70,7 +71,7 @@ function ee({
70
71
  },
71
72
  p ? /* @__PURE__ */ l.createElement("span", { className: t.gban }, e.badge) : null,
72
73
  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.priceFirst ? /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(h, { item: e }), /* @__PURE__ */ l.createElement(v, { item: e, pill: i }), 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: i }), 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
75
  e.actions != null ? /* @__PURE__ */ l.createElement(
75
76
  "div",
76
77
  {
@@ -82,39 +83,39 @@ function ee({
82
83
  ) : null
83
84
  );
84
85
  }
85
- function re({
86
+ function se({
86
87
  items: e,
87
88
  sections: r,
88
- footerActions: i = !0,
89
+ footerActions: d = !0,
89
90
  value: o,
90
91
  defaultValue: u,
91
92
  selectable: m = !1,
92
- disabled: d = !1,
93
+ disabled: i = !1,
93
94
  onValueChange: p,
94
95
  className: n,
95
- style: b,
96
- ...f
96
+ style: f,
97
+ ...b
97
98
  }) {
98
- const [k, N] = D(
99
+ const [k, N] = F(
99
100
  o,
100
101
  u,
101
102
  p
102
103
  ), y = e.length, x = {
103
- ...b,
104
+ ...f,
104
105
  gridTemplateColumns: `var(--pricing-table-label-width) repeat(${y}, minmax(12rem, 1fr))`
105
106
  };
106
107
  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
+ return /* @__PURE__ */ l.createElement("div", { className: D(t.root, n), style: x, role: "table", ...b }, /* @__PURE__ */ l.createElement("div", { className: t.quad, role: "columnheader" }), e.map((a) => {
108
109
  const s = k === a.value, c = !!a.highlighted || s;
109
110
  return /* @__PURE__ */ l.createElement(
110
- ee,
111
+ le,
111
112
  {
112
113
  key: a.value,
113
114
  item: a,
114
115
  highlighted: c,
115
116
  selected: s,
116
- selectable: m && !d && !a.disabled,
117
- disabled: d || !!a.disabled,
117
+ selectable: m && !i && !a.disabled,
118
+ disabled: i || !!a.disabled,
118
119
  onSelect: () => N(a.value)
119
120
  }
120
121
  );
@@ -128,10 +129,12 @@ function re({
128
129
  "data-alt": P ? "true" : void 0,
129
130
  role: "row"
130
131
  },
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",
132
+ /* @__PURE__ */ l.createElement("div", { className: t.label, role: "rowheader" }, /* @__PURE__ */ l.createElement("span", null, c.label), c.hint != null && c.hint !== "" ? /* @__PURE__ */ l.createElement(q, { content: c.hint }, /* @__PURE__ */ l.createElement(
133
+ C,
133
134
  {
134
- type: "button",
135
+ variant: "ghost",
136
+ size: "s",
137
+ width: "s",
135
138
  className: t.whint,
136
139
  "aria-label": c.hint
137
140
  },
@@ -139,10 +142,10 @@ function re({
139
142
  )) : null),
140
143
  e.map((g) => {
141
144
  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] }));
145
+ return /* @__PURE__ */ l.createElement("div", { key: g.value, className: t.cell, role: "cell" }, /* @__PURE__ */ l.createElement(ee, { value: (E = c.values) == null ? void 0 : E[g.value] }));
143
146
  })
144
147
  );
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(
148
+ }))), d ? /* @__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
149
  "div",
147
150
  {
148
151
  className: t.xact,
@@ -153,5 +156,5 @@ function re({
153
156
  ) : null))) : null);
154
157
  }
155
158
  export {
156
- re as P
159
+ se as P
157
160
  };
@@ -1,4 +1,4 @@
1
- import { P as e } from "./PricingTable-BjpGVAhi.js";
1
+ import { P as e } from "./PricingTable-Dt2wsnEz.js";
2
2
  export {
3
3
  e as PricingTable
4
4
  };
@@ -0,0 +1,48 @@
1
+ import t from "react";
2
+ import { c as l } from "./cx-CcykAxZN.js";
3
+ import { S as w } from "./Stack-BPTehVYc.js";
4
+ import './Section.css';const y = "sep", A = "seu", T = "sek", z = "seh", B = "sec", F = "sei", H = "set", R = "sed", j = "see", q = "seb", C = "ses", D = "sel", e = {
5
+ page: y,
6
+ uwrap: A,
7
+ kcard: T,
8
+ header: z,
9
+ center: B,
10
+ icon: F,
11
+ title: H,
12
+ demi: R,
13
+ excerpt: j,
14
+ body: q,
15
+ slot: C,
16
+ line: D
17
+ };
18
+ function K({
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
+ titleAs: h,
28
+ direction: N = "column",
29
+ gap: k,
30
+ columns: b,
31
+ className: u,
32
+ as: f
33
+ }) {
34
+ const d = m === "auth", a = m === "block", x = g ?? (d ? "center" : "start"), i = f ?? "section", S = h ?? (a ? "h2" : "div"), v = 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, x === "center" && e.center) }, c != null ? /* @__PURE__ */ t.createElement("div", { className: e.icon }, c) : null, n != null ? /* @__PURE__ */ t.createElement(S, { className: l(e.title, v === "md" && e.demi) }, n) : null, s != null ? /* @__PURE__ */ t.createElement("p", { className: e.excerpt }, s) : null), r != null ? /* @__PURE__ */ t.createElement(
35
+ w,
36
+ {
37
+ className: e.body,
38
+ direction: N,
39
+ gap: k,
40
+ columns: b
41
+ },
42
+ r
43
+ ) : null, o != null ? /* @__PURE__ */ t.createElement("div", { className: e.slot }, o) : null);
44
+ 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);
45
+ }
46
+ export {
47
+ K as S
48
+ };
package/dist/Section.d.ts CHANGED
@@ -47,6 +47,13 @@ export type SectionProps = {
47
47
  align?: "start" | "center";
48
48
  /** Размер заголовка */
49
49
  titleSize?: "md" | "lg";
50
+ /**
51
+ * HTML-тег заголовка.
52
+ * По умолчанию — `div` для `page`/`auth` и `h2` для `block`,
53
+ * чтобы не дублировать `h1` из PageHead.
54
+ * Явно `h1` — только если Section сам заголовок страницы.
55
+ */
56
+ titleAs?: "h1" | "h2" | "h3" | "div";
50
57
  /** Раскладка тела: как у Stack (по умолчанию `column`) */
51
58
  direction?: StackDirection;
52
59
  /** Отступ между детьми тела */
@@ -66,4 +73,4 @@ export type SectionProps = {
66
73
  *
67
74
  * @see PageHead, PageShell, Layout, Stack, EmptyState
68
75
  */
69
- export declare function Section({ title, description, icon, children, actions, variant, align, titleSize, direction, gap, columns, className, as, }: SectionProps): React.JSX.Element;
76
+ export declare function Section({ title, description, icon, children, actions, variant, align, titleSize, titleAs, direction, gap, columns, className, as, }: SectionProps): React.JSX.Element;
package/dist/Section.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as r } from "./Section-PprWjOvt.js";
1
+ import { S as r } from "./Section-C5XfBTfd.js";
2
2
  export {
3
3
  r as Section
4
4
  };