@elcrm/components 0.5.3 → 0.5.4
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 +1 -1
- package/dist/Layout.css +1 -1
- package/dist/Layout.d.ts +3 -1
- package/dist/{Menu-D2kf7fN_.js → Menu-u0WnWjT-.js} +17 -16
- package/dist/Menu.d.ts +5 -0
- package/dist/Menu.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/kit-manifest.json +2 -2
- package/dist/tokens.css +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -795,7 +795,7 @@ const resolve = createLazyResolver(
|
|
|
795
795
|
**Узкие (только если нужно иначе)**
|
|
796
796
|
|
|
797
797
|
```
|
|
798
|
-
--layout-height / --layout-padding / --layout-margin / --layout-max-width
|
|
798
|
+
--layout-height / --layout-padding / --layout-main-padding / --layout-margin / --layout-max-width
|
|
799
799
|
--header-height / --header-z / --header-margin / --header-shadow / --header-radius / --header-border / --header-nav-justify
|
|
800
800
|
--section-padding / --section-title-size / --section-title-size-md / --section-auth-card-max-width
|
|
801
801
|
--nav-sections-padding / --nav-sections-nav-width / --nav-sections-main-max-width
|
package/dist/Layout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer elcrm-components{.slr{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;box-sizing:border-box;background:var(--shell-background-muted);margin:var(--layout-margin);padding:var(--layout-padding);max-width:var(--layout-max-width);gap:0}.slx{height:var(--layout-height);max-height:var(--layout-height);overflow:hidden}.slm{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}.slr:not(.slx){height:auto;max-height:none;overflow:visible}.slr:not(.slx) .slm{overflow:visible;flex:0 1 auto;min-height:auto}.sls{flex-direction:row;align-items:stretch;gap:var(--layout-gap)}.slb{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:var(--layout-main-background);border-radius:var(--layout-main-radius);box-shadow:var(--layout-main-shadow);border:var(--layout-main-border)}.slr:not(.slx) .slb{overflow:visible}.sla{display:flex;flex-direction:column;flex:0 0 var(--sidebar-width);width:var(--sidebar-width);min-width:0;min-height:0;align-self:stretch}.slk{overflow:hidden}.sla:not(.slk){overflow:auto}.sla>*{flex:1 1 auto;min-height:0;width:100%;height:100%;max-height:100%}@media (max-width: 900px){.sla{flex-basis:72px;width:72px}}.slh,.slf{flex:0 0 auto;min-width:0}}
|
|
1
|
+
@layer elcrm-components{.slr{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;box-sizing:border-box;background:var(--shell-background-muted);margin:var(--layout-margin);padding:var(--layout-padding);max-width:var(--layout-max-width);gap:0}.slx{height:var(--layout-height);max-height:var(--layout-height);overflow:hidden}.slm{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:var(--layout-main-padding)}.slr:not(.slx){height:auto;max-height:none;overflow:visible}.slr:not(.slx) .slm{overflow:visible;flex:0 1 auto;min-height:auto}.sls{flex-direction:row;align-items:stretch;gap:var(--layout-gap)}.slb{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:var(--layout-main-background);border-radius:var(--layout-main-radius);box-shadow:var(--layout-main-shadow);border:var(--layout-main-border)}.slr:not(.slx) .slb{overflow:visible}.sla{display:flex;flex-direction:column;flex:0 0 var(--sidebar-width);width:var(--sidebar-width);min-width:0;min-height:0;align-self:stretch}.slk{overflow:hidden}.sla:not(.slk){overflow:auto}.sla>*{flex:1 1 auto;min-height:0;width:100%;height:100%;max-height:100%}@media (max-width: 900px){.sla{flex-basis:72px;width:72px}}.slh,.slf{flex:0 0 auto;min-width:0}}
|
package/dist/Layout.d.ts
CHANGED
|
@@ -26,7 +26,9 @@ export type LayoutFixedSlot = "header" | "footer" | "sidebar";
|
|
|
26
26
|
* </Layout>
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
|
-
* Токены: `--layout-height`, `--layout-padding`, `--layout-
|
|
29
|
+
* Токены: `--layout-height`, `--layout-padding`, `--layout-main-padding`,
|
|
30
|
+
* `--layout-margin`, `--layout-max-width`, `--shell-*`.
|
|
31
|
+
* `--layout-main-padding` — отступ внутри `<main>` (между шапкой и контентом).
|
|
30
32
|
*/
|
|
31
33
|
export type LayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
32
34
|
/** Левая колонка (обычно `<Sidebar />`) — ряд: сайдбар + контент */
|
|
@@ -4,7 +4,7 @@ import { b as N } from "./badgeText-CRzlIzi3.js";
|
|
|
4
4
|
import { c as p } from "./cx-CcykAxZN.js";
|
|
5
5
|
import { h } from "./rovingKeys-Di9N1Nct.js";
|
|
6
6
|
import { u as w } from "./useControllableValue-BaE0VR5d.js";
|
|
7
|
-
import './Menu.css';const B = "lnr", C = "lnv", K = "lni", M = "lnd", z = "lna", D = "lnu",
|
|
7
|
+
import './Menu.css';const B = "lnr", C = "lnv", K = "lni", M = "lnd", z = "lna", D = "lnu", a = {
|
|
8
8
|
root: B,
|
|
9
9
|
vertical: C,
|
|
10
10
|
item: K,
|
|
@@ -12,14 +12,14 @@ import './Menu.css';const B = "lnr", C = "lnv", K = "lni", M = "lnd", z = "lna",
|
|
|
12
12
|
active: z,
|
|
13
13
|
underline: D
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
items:
|
|
15
|
+
function A({
|
|
16
|
+
items: n,
|
|
17
17
|
vertical: c,
|
|
18
|
-
variant:
|
|
18
|
+
variant: g = "plain",
|
|
19
19
|
value: r,
|
|
20
20
|
defaultValue: s,
|
|
21
21
|
onValueChange: u,
|
|
22
|
-
children:
|
|
22
|
+
children: m,
|
|
23
23
|
className: R,
|
|
24
24
|
...x
|
|
25
25
|
}) {
|
|
@@ -27,12 +27,12 @@ function F({
|
|
|
27
27
|
r,
|
|
28
28
|
s,
|
|
29
29
|
u
|
|
30
|
-
), y = (
|
|
30
|
+
), y = (n ?? []).filter((e) => !e.disabled).map((e) => e.value), k = g === "line", d = l.useRef(null), i = u || r !== void 0 || s !== void 0;
|
|
31
31
|
return /* @__PURE__ */ l.createElement(
|
|
32
32
|
"nav",
|
|
33
33
|
{
|
|
34
34
|
ref: d,
|
|
35
|
-
className: p(
|
|
35
|
+
className: p(a.root, c && a.vertical, k && a.underline, R),
|
|
36
36
|
onKeyDown: i ? (e) => h(e, {
|
|
37
37
|
values: y,
|
|
38
38
|
value: t,
|
|
@@ -42,18 +42,19 @@ function F({
|
|
|
42
42
|
}) : void 0,
|
|
43
43
|
...x
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
const
|
|
45
|
+
n == null ? void 0 : n.map((e) => {
|
|
46
|
+
const o = e.active ?? (t != null && e.value === t), b = N(e.badge);
|
|
47
47
|
return /* @__PURE__ */ l.createElement(
|
|
48
48
|
"button",
|
|
49
49
|
{
|
|
50
50
|
key: e.value,
|
|
51
51
|
type: "button",
|
|
52
|
-
className: p(
|
|
52
|
+
className: p(a.item, o && a.active),
|
|
53
53
|
"data-value": e.value,
|
|
54
|
-
"data-active":
|
|
55
|
-
"aria-current":
|
|
56
|
-
|
|
54
|
+
"data-active": o ? "true" : void 0,
|
|
55
|
+
"aria-current": o ? "page" : void 0,
|
|
56
|
+
"aria-label": e.ariaLabel,
|
|
57
|
+
tabIndex: i ? o ? 0 : -1 : void 0,
|
|
57
58
|
disabled: e.disabled,
|
|
58
59
|
onClick: () => {
|
|
59
60
|
var f;
|
|
@@ -61,12 +62,12 @@ function F({
|
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
e.label,
|
|
64
|
-
b != null ? /* @__PURE__ */ l.createElement(E, { className:
|
|
65
|
+
b != null ? /* @__PURE__ */ l.createElement(E, { className: a.dot, tone: "accent", size: "s" }, b) : null
|
|
65
66
|
);
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
+
m
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
A as M
|
|
72
73
|
};
|
package/dist/Menu.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export type MenuItem = {
|
|
|
24
24
|
* `0`, `null`, `""` — не рендерим.
|
|
25
25
|
*/
|
|
26
26
|
badge?: number | string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Подпись для скринридера, если `label` — иконка без текста.
|
|
29
|
+
* Попадает в `aria-label` кнопки пункта.
|
|
30
|
+
*/
|
|
31
|
+
ariaLabel?: string;
|
|
27
32
|
};
|
|
28
33
|
/**
|
|
29
34
|
* Props компонента {@link Menu}.
|
package/dist/Menu.js
CHANGED
package/dist/index.css
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
@layer elcrm-components{.lcr{display:flex;align-items:flex-start;gap:var(--item-column-gap);min-width:0;width:100%;text-align:left}.lci{flex-shrink:0;box-sizing:border-box;width:var(--item-column-icon-size);height:var(--item-column-icon-size);border-radius:var(--item-column-icon-radius);display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--shell-color-accent) 14%,transparent);color:var(--shell-color-accent)}.lcb{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--shell-gap-sm)}.lch{display:flex;align-items:center;gap:var(--shell-gap-sm);min-width:0}.lct{flex:1;min-width:0;margin:0;font-size:var(--item-column-title-size);font-weight:var(--shell-font-weight);color:var(--shell-color);line-height:var(--item-column-title-line);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lcx{flex-shrink:0;display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--shell-gap-sm)}.lcd{margin:0;font-size:var(--shell-font-size-sm);font-weight:400;color:var(--shell-color);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.lcf{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--shell-gap-sm);font-size:var(--item-column-meta-size);color:var(--shell-color-muted);line-height:1.35}.lcp{opacity:.5;-webkit-user-select:none;user-select:none}.lca{flex-shrink:0;display:inline-flex;align-items:flex-start}.lcs .lct{font-size:var(--shell-font-size-sm)}.lcs .lcd{font-size:var(--item-column-meta-size)}.lcl .lct{font-size:var(--shell-font-size-lg)}.lcl .lcd{font-size:var(--shell-font-size)}.lck .lct{font-weight:700}}
|
|
36
36
|
|
|
37
|
-
@layer elcrm-components{.slr{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;box-sizing:border-box;background:var(--shell-background-muted);margin:var(--layout-margin);padding:var(--layout-padding);max-width:var(--layout-max-width);gap:0}.slx{height:var(--layout-height);max-height:var(--layout-height);overflow:hidden}.slm{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}.slr:not(.slx){height:auto;max-height:none;overflow:visible}.slr:not(.slx) .slm{overflow:visible;flex:0 1 auto;min-height:auto}.sls{flex-direction:row;align-items:stretch;gap:var(--layout-gap)}.slb{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:var(--layout-main-background);border-radius:var(--layout-main-radius);box-shadow:var(--layout-main-shadow);border:var(--layout-main-border)}.slr:not(.slx) .slb{overflow:visible}.sla{display:flex;flex-direction:column;flex:0 0 var(--sidebar-width);width:var(--sidebar-width);min-width:0;min-height:0;align-self:stretch}.slk{overflow:hidden}.sla:not(.slk){overflow:auto}.sla>*{flex:1 1 auto;min-height:0;width:100%;height:100%;max-height:100%}@media (max-width: 900px){.sla{flex-basis:72px;width:72px}}.slh,.slf{flex:0 0 auto;min-width:0}}
|
|
37
|
+
@layer elcrm-components{.slr{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;box-sizing:border-box;background:var(--shell-background-muted);margin:var(--layout-margin);padding:var(--layout-padding);max-width:var(--layout-max-width);gap:0}.slx{height:var(--layout-height);max-height:var(--layout-height);overflow:hidden}.slm{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:var(--layout-main-padding)}.slr:not(.slx){height:auto;max-height:none;overflow:visible}.slr:not(.slx) .slm{overflow:visible;flex:0 1 auto;min-height:auto}.sls{flex-direction:row;align-items:stretch;gap:var(--layout-gap)}.slb{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:var(--layout-main-background);border-radius:var(--layout-main-radius);box-shadow:var(--layout-main-shadow);border:var(--layout-main-border)}.slr:not(.slx) .slb{overflow:visible}.sla{display:flex;flex-direction:column;flex:0 0 var(--sidebar-width);width:var(--sidebar-width);min-width:0;min-height:0;align-self:stretch}.slk{overflow:hidden}.sla:not(.slk){overflow:auto}.sla>*{flex:1 1 auto;min-height:0;width:100%;height:100%;max-height:100%}@media (max-width: 900px){.sla{flex-basis:72px;width:72px}}.slh,.slf{flex:0 0 auto;min-width:0}}
|
|
38
38
|
|
|
39
39
|
@layer elcrm-components{.llr{display:flex;flex-direction:column;gap:var(--shell-gap-sm);padding:0;margin:0;list-style:none}.llh{flex-direction:row;flex-wrap:wrap}}
|
|
40
40
|
|
package/dist/index.es.js
CHANGED
|
@@ -11,7 +11,7 @@ import { T as G } from "./TextGroup-236jHxdT.js";
|
|
|
11
11
|
import { T as R } from "./Text-Bo1u7gVC.js";
|
|
12
12
|
import { S as O } from "./Stat-p8j4PjrC.js";
|
|
13
13
|
import { S as M, s as Z } from "./Stack-BPTehVYc.js";
|
|
14
|
-
import { M as w } from "./Menu-
|
|
14
|
+
import { M as w } from "./Menu-u0WnWjT-.js";
|
|
15
15
|
import { D } from "./Dropdown-CR_XxNak.js";
|
|
16
16
|
import { B as j } from "./Breadcrumb-DM_hWw5n.js";
|
|
17
17
|
import { L as J } from "./Loading-C_CKD-zt.js";
|
package/dist/kit-manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "elcrm-kit-manifest-v1",
|
|
3
3
|
"package": "@elcrm/components",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.4",
|
|
5
5
|
"pkg": "components",
|
|
6
|
-
"generatedAt": "2026-
|
|
6
|
+
"generatedAt": "2026-09-11T00:17:51.201Z",
|
|
7
7
|
"components": [
|
|
8
8
|
{
|
|
9
9
|
"slug": "ActionGroup",
|
package/dist/tokens.css
CHANGED
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
--layout-main-background: transparent;
|
|
35
35
|
--layout-main-shadow: none;
|
|
36
36
|
--layout-main-border: none;
|
|
37
|
+
/* padding у <main> (.slm): сверху/снизу между шапкой, контентом и футером */
|
|
38
|
+
--layout-main-padding: 0;
|
|
37
39
|
/* none — без ограничения; иначе например 1440px */
|
|
38
40
|
--layout-max-width: none;
|
|
39
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elcrm/components",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Shell UI elCRM: Layout, Header, Sidebar, Popover, Healthmap, PanelInfo, PageHead, PageShell, Section, Stack, Stat и др.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MaSkal <dev@elcrm.online>",
|