@lazar-ui/kit 0.5.2 → 0.6.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/CHANGELOG.md +24 -0
- package/dist/Actions-Cii4AnwJ.mjs +12 -0
- package/dist/Actions.css +1 -0
- package/dist/ActiveFilters-BJojmc-d.mjs +29 -0
- package/dist/ActiveFilters.css +1 -0
- package/dist/Button-BN85EtaZ.mjs +52 -0
- package/dist/Button.css +1 -1
- package/dist/Cell-BPBvEyeL.mjs +21 -0
- package/dist/Cell.css +1 -0
- package/dist/Content-1kg0isb_.mjs +12 -0
- package/dist/Content.css +1 -0
- package/dist/Context-BjkJbHVo.mjs +6 -0
- package/dist/Group-DyDpeqOP.mjs +16 -0
- package/dist/Group.css +1 -0
- package/dist/Header-Clhgyr0J.mjs +29 -0
- package/dist/Header.css +1 -0
- package/dist/Heading-CL47Fqe7.mjs +30 -0
- package/dist/Heading.css +1 -0
- package/dist/InputBase-BHZWQT9-.mjs +46 -0
- package/dist/Item-CBYGbEHN.mjs +47 -0
- package/dist/Item.css +1 -0
- package/dist/Panel-B-LZtrGB.mjs +11 -0
- package/dist/Row-BfI8268z.mjs +15 -0
- package/dist/Row.css +1 -0
- package/dist/Separator-FETQ3gHZ.mjs +9 -0
- package/dist/Separator.css +1 -0
- package/dist/Tab-BfpR10OT.mjs +38 -0
- package/dist/Tab.css +1 -0
- package/dist/Text-DQPy-DZ5.mjs +46 -0
- package/dist/Text.css +1 -0
- package/dist/Title-xHMuJWGl.mjs +12 -0
- package/dist/Title.css +1 -0
- package/dist/Toolbar-BJQy4qFI.mjs +11 -0
- package/dist/Toolbar.css +1 -0
- package/dist/Trigger-C_4De6l1.mjs +11 -0
- package/dist/accordion.css +1 -1
- package/dist/accordion.js +23 -62
- package/dist/actions.d.ts +13 -0
- package/dist/actions.js +4 -0
- package/dist/active-filters.d.ts +35 -0
- package/dist/active-filters.js +4 -0
- package/dist/button.js +1 -1
- package/dist/cell.d.ts +20 -0
- package/dist/cell.js +4 -0
- package/dist/content.d.ts +8 -0
- package/dist/content.js +4 -0
- package/dist/context.d.ts +17 -0
- package/dist/context.js +5 -0
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +44 -62
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +72 -93
- package/dist/enums-BnuDYTua.mjs +4 -0
- package/dist/enums-DUZMBQDd.mjs +7 -0
- package/dist/enums-DfSzOa3x.mjs +4 -0
- package/dist/enums-OoI2Qgqq.mjs +14 -0
- package/dist/getDecorationStyle-BCBONKEl.mjs +7 -0
- package/dist/group.d.ts +12 -0
- package/dist/group.js +4 -0
- package/dist/header.d.ts +21 -0
- package/dist/header.js +4 -0
- package/dist/heading.d.ts +55 -0
- package/dist/heading.js +7 -0
- package/dist/input-base.d.ts +29 -0
- package/dist/input-base.js +4 -0
- package/dist/input.js +86 -124
- package/dist/item.d.ts +42 -0
- package/dist/item.js +4 -0
- package/dist/menu.css +1 -1
- package/dist/menu.js +63 -81
- package/dist/panel.d.ts +9 -0
- package/dist/panel.js +4 -0
- package/dist/row.d.ts +12 -0
- package/dist/row.js +4 -0
- package/dist/separator.d.ts +1 -21
- package/dist/separator.js +2 -22
- package/dist/tab.d.ts +30 -0
- package/dist/tab.js +4 -0
- package/dist/table.css +1 -1
- package/dist/table.js +25 -74
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +34 -73
- package/dist/text.d.ts +74 -0
- package/dist/text.js +8 -0
- package/dist/title.d.ts +8 -0
- package/dist/title.js +4 -0
- package/dist/toolbar.d.ts +20 -0
- package/dist/toolbar.js +4 -0
- package/dist/trigger.d.ts +8 -0
- package/dist/trigger.js +4 -0
- package/dist/typography.d.ts +90 -40
- package/dist/typography.js +4 -38
- package/dist/utils.d.ts +20 -0
- package/dist/utils.js +9 -7
- package/package.json +1 -1
- package/dist/Button-jq8mFP6t.mjs +0 -52
- package/dist/separator.css +0 -1
- package/dist/typography.css +0 -1
- /package/dist/{input.css → InputBase.css} +0 -0
package/dist/menu.js
CHANGED
|
@@ -1,117 +1,99 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import p from "clsx";
|
|
3
|
-
import { I as
|
|
4
|
-
import { usePopoverContext as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
3
|
+
import { I as C } from "./Icon-DUCBChX2.mjs";
|
|
4
|
+
import { usePopoverContext as E, Popover as b } from "./popover.js";
|
|
5
|
+
import { E as m, D as T, a as g } from "./enums-DUZMBQDd.mjs";
|
|
6
|
+
import I from "react";
|
|
7
|
+
import { i as M } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
8
|
+
import { G as y } from "./Group-DyDpeqOP.mjs";
|
|
9
|
+
import { S as A } from "./Separator-FETQ3gHZ.mjs";
|
|
10
|
+
import { T as P } from "./Trigger-C_4De6l1.mjs";
|
|
11
|
+
import './menu.css';const u = () => {
|
|
12
|
+
const { state: s } = E();
|
|
9
13
|
return {
|
|
10
14
|
close: () => {
|
|
11
|
-
|
|
15
|
+
s.close();
|
|
12
16
|
}
|
|
13
17
|
};
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_.root,
|
|
25
|
-
s && _.disabled
|
|
18
|
+
}, S = "_root_15rud_1", v = "_disabled_15rud_19", O = "_checkbox_15rud_27", $ = "_checked_15rud_38", G = "_label_15rud_44", d = {
|
|
19
|
+
root: S,
|
|
20
|
+
disabled: v,
|
|
21
|
+
checkbox: O,
|
|
22
|
+
checked: $,
|
|
23
|
+
label: G
|
|
24
|
+
}, k = (s) => {
|
|
25
|
+
const { checked: o, children: l, disabled: e = !1, onCheckedChange: t } = s, { close: a } = u(), c = p(
|
|
26
|
+
d.root,
|
|
27
|
+
e && d.disabled
|
|
26
28
|
);
|
|
27
29
|
return /* @__PURE__ */ h(
|
|
28
30
|
"div",
|
|
29
31
|
{
|
|
30
32
|
"aria-checked": o,
|
|
31
|
-
"aria-disabled":
|
|
32
|
-
className:
|
|
33
|
+
"aria-disabled": e,
|
|
34
|
+
className: c,
|
|
33
35
|
onClick: () => {
|
|
34
|
-
|
|
36
|
+
e || (t && t(!o), a());
|
|
35
37
|
},
|
|
36
38
|
role: "menuitemcheckbox",
|
|
37
|
-
tabIndex:
|
|
39
|
+
tabIndex: e ? -1 : 0,
|
|
38
40
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ n("span", { className: p(d.checkbox, o && d.checked), children: o && /* @__PURE__ */ n(C, { name: "check", size: 12, strokeWidth: 3 }) }),
|
|
42
|
+
/* @__PURE__ */ n("span", { className: d.label, children: l })
|
|
41
43
|
]
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
46
|
};
|
|
45
|
-
|
|
46
|
-
const L = "_root_1h0xj_14",
|
|
47
|
+
k.displayName = m.CHECKBOX;
|
|
48
|
+
const L = "_root_1h0xj_14", R = {
|
|
47
49
|
root: L
|
|
48
|
-
},
|
|
49
|
-
const { children: o } =
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
}, N = (s) => {
|
|
51
|
+
const { children: o } = s;
|
|
52
|
+
return /* @__PURE__ */ n(b.Content, { padding: !1, children: /* @__PURE__ */ n("div", { className: R.root, children: o }) });
|
|
51
53
|
};
|
|
52
|
-
|
|
53
|
-
const j = [
|
|
54
|
-
const { children: o, open:
|
|
55
|
-
return /* @__PURE__ */
|
|
54
|
+
N.displayName = m.CONTENT;
|
|
55
|
+
const j = [m.TRIGGER, m.CONTENT], f = (s) => {
|
|
56
|
+
const { children: o, open: l, onOpenChange: e, placement: t = T } = s, a = (c) => M(j, c) ? c : null;
|
|
57
|
+
return /* @__PURE__ */ n(b, { open: l, onOpenChange: e, placement: t, children: I.Children.map(o, a) });
|
|
56
58
|
};
|
|
57
|
-
f.displayName =
|
|
58
|
-
const
|
|
59
|
-
root:
|
|
60
|
-
label: S
|
|
61
|
-
}, $ = (e) => {
|
|
62
|
-
const { children: o, label: n } = e;
|
|
63
|
-
return /* @__PURE__ */ h("div", { className: b.root, role: "group", children: [
|
|
64
|
-
/* @__PURE__ */ t("div", { className: b.label, children: n }),
|
|
65
|
-
o
|
|
66
|
-
] });
|
|
67
|
-
};
|
|
68
|
-
$.displayName = r.GROUP;
|
|
69
|
-
const z = "_root_5s7ps_1", D = "_disabled_5s7ps_19", H = "_danger_5s7ps_26", K = "_icon_5s7ps_33", X = "_label_5s7ps_43", m = {
|
|
70
|
-
root: z,
|
|
59
|
+
f.displayName = g;
|
|
60
|
+
const B = "_root_5s7ps_1", D = "_disabled_5s7ps_19", z = "_danger_5s7ps_26", U = "_icon_5s7ps_33", F = "_label_5s7ps_43", i = {
|
|
61
|
+
root: B,
|
|
71
62
|
disabled: D,
|
|
72
|
-
danger:
|
|
73
|
-
icon:
|
|
74
|
-
label:
|
|
75
|
-
},
|
|
76
|
-
const { children: o, danger:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
63
|
+
danger: z,
|
|
64
|
+
icon: U,
|
|
65
|
+
label: F
|
|
66
|
+
}, x = (s) => {
|
|
67
|
+
const { children: o, danger: l = !1, disabled: e = !1, icon: t, onAction: a } = s, { close: c } = u(), _ = p(
|
|
68
|
+
i.root,
|
|
69
|
+
l && i.danger,
|
|
70
|
+
e && i.disabled
|
|
80
71
|
);
|
|
81
72
|
return /* @__PURE__ */ h(
|
|
82
73
|
"div",
|
|
83
74
|
{
|
|
84
|
-
"aria-disabled":
|
|
85
|
-
className:
|
|
75
|
+
"aria-disabled": e,
|
|
76
|
+
className: _,
|
|
86
77
|
onClick: () => {
|
|
87
|
-
|
|
78
|
+
e || (a && a(), c());
|
|
88
79
|
},
|
|
89
80
|
role: "menuitem",
|
|
90
|
-
tabIndex:
|
|
81
|
+
tabIndex: e ? -1 : 0,
|
|
91
82
|
children: [
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
83
|
+
t && /* @__PURE__ */ n("span", { className: i.icon, children: /* @__PURE__ */ n(C, { name: t, size: 16 }) }),
|
|
84
|
+
/* @__PURE__ */ n("span", { className: i.label, children: o })
|
|
94
85
|
]
|
|
95
86
|
}
|
|
96
87
|
);
|
|
97
88
|
};
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
I.displayName = r.TRIGGER;
|
|
108
|
-
const i = f;
|
|
109
|
-
i.Checkbox = T;
|
|
110
|
-
i.Content = x;
|
|
111
|
-
i.Group = $;
|
|
112
|
-
i.Item = R;
|
|
113
|
-
i.Separator = E;
|
|
114
|
-
i.Trigger = I;
|
|
89
|
+
x.displayName = m.ITEM;
|
|
90
|
+
const r = f;
|
|
91
|
+
r.Checkbox = k;
|
|
92
|
+
r.Content = N;
|
|
93
|
+
r.Group = y;
|
|
94
|
+
r.Item = x;
|
|
95
|
+
r.Separator = A;
|
|
96
|
+
r.Trigger = P;
|
|
115
97
|
export {
|
|
116
|
-
|
|
98
|
+
r as Menu
|
|
117
99
|
};
|
package/dist/panel.d.ts
ADDED
package/dist/panel.js
ADDED
package/dist/row.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
declare interface IProps extends default_2.PropsWithChildren {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Table row. Must be used as a child of `<Table>`.
|
|
8
|
+
* Accepts `<Table.Cell>` children.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Row: default_2.FC<IProps>;
|
|
11
|
+
|
|
12
|
+
export { }
|
package/dist/row.js
ADDED
package/dist/separator.d.ts
CHANGED
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
|
|
3
|
-
declare
|
|
4
|
-
/** Vertical orientation. Default: `false`. */
|
|
5
|
-
vertical?: boolean;
|
|
6
|
-
/** CSS colour of the line. Default: `var(--lui-color-border-primary)`. */
|
|
7
|
-
color?: string;
|
|
8
|
-
/** Removes padding around the line. Default: `false`. */
|
|
9
|
-
bleed?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Separator component. Renders a horizontal or vertical dividing line.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* <Separator />
|
|
18
|
-
* <Separator vertical />
|
|
19
|
-
* <Separator bleed />
|
|
20
|
-
* <Separator vertical bleed color="var(--lui-color-text-success)" />
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare const Separator: default_2.FC<IProps>;
|
|
3
|
+
export declare const Separator: default_2.FC;
|
|
24
4
|
|
|
25
5
|
export { }
|
package/dist/separator.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import c from "clsx";
|
|
3
|
-
import './separator.css';const i = "Separator", _ = "_root_kvseh_5", n = "_vertical_kvseh_14", v = "_bleed_kvseh_21", o = {
|
|
4
|
-
root: _,
|
|
5
|
-
vertical: n,
|
|
6
|
-
bleed: v
|
|
7
|
-
}, m = (r) => {
|
|
8
|
-
const { vertical: e = !1, color: t, bleed: s = !1 } = r, l = c(
|
|
9
|
-
o.root,
|
|
10
|
-
e && o.vertical,
|
|
11
|
-
s && o.bleed
|
|
12
|
-
);
|
|
13
|
-
return /* @__PURE__ */ a(
|
|
14
|
-
"hr",
|
|
15
|
-
{
|
|
16
|
-
className: l,
|
|
17
|
-
style: { "--separator-color": t ?? "var(--lui-color-border-primary)" }
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
m.displayName = i;
|
|
1
|
+
import { S as o } from "./Separator-FETQ3gHZ.mjs";
|
|
22
2
|
export {
|
|
23
|
-
|
|
3
|
+
o as Separator
|
|
24
4
|
};
|
package/dist/tab.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare interface ITabProps {
|
|
4
|
+
/** Index at list of tabs. */
|
|
5
|
+
index?: number;
|
|
6
|
+
/** Disabled tab flag. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Label. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** HTML tabindex attribute. */
|
|
11
|
+
tabIndex?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Individual tab button. Must be used as a child of `<Tabs>`.
|
|
16
|
+
*
|
|
17
|
+
* Manages its active/disabled state via parent context and sets proper ARIA attributes (`role="tab"`, `aria-selected`, `aria-controls`).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Tabs defaultActiveIndex={0}>
|
|
22
|
+
* <Tabs.Tab label="First" />
|
|
23
|
+
* <Tabs.Tab label="Second" disabled />
|
|
24
|
+
* <Tabs.Tab label="Third" />
|
|
25
|
+
* </Tabs>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const Tab: default_2.FC<ITabProps>;
|
|
29
|
+
|
|
30
|
+
export { }
|
package/dist/tab.js
ADDED
package/dist/table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--
|
|
1
|
+
:root{--table-font-size: var(--lui-font-size-md)}._wrapper_17sd8_5{display:flex;flex-direction:column;gap:var(--lui-space-4)}._root_17sd8_11{border-collapse:collapse;font-size:var(--table-font-size);table-layout:fixed;width:100%}
|
package/dist/table.js
CHANGED
|
@@ -1,79 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { i } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
1
|
+
import { A as d } from "./ActiveFilters-BJojmc-d.mjs";
|
|
2
|
+
import { C as f } from "./Cell-BPBvEyeL.mjs";
|
|
3
|
+
import { R as b } from "./Row-BfI8268z.mjs";
|
|
4
|
+
import { T as A } from "./Toolbar-BJQy4qFI.mjs";
|
|
5
|
+
import { jsxs as T, jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import R from "react";
|
|
7
|
+
import { i as t } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
9
8
|
import "lodash/camelCase";
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return e.length === 0 ? null : /* @__PURE__ */ h("div", { className: $.root, children: [
|
|
22
|
-
e.map((a) => /* @__PURE__ */ h(L, { onDelete: l(a.key), children: [
|
|
23
|
-
a.label,
|
|
24
|
-
": ",
|
|
25
|
-
a.value
|
|
26
|
-
] }, a.key)),
|
|
27
|
-
o && /* @__PURE__ */ n(u, { mode: "text", size: "sm", onClick: m, children: c.Table.ActiveFilters.clearAll })
|
|
9
|
+
import { E as e } from "./enums-BnuDYTua.mjs";
|
|
10
|
+
import './table.css';const w = "Table", C = "_wrapper_17sd8_5", _ = "_root_17sd8_11", l = {
|
|
11
|
+
wrapper: C,
|
|
12
|
+
root: _
|
|
13
|
+
}, i = (m) => {
|
|
14
|
+
const { children: n } = m, s = R.Children.toArray(n), p = s.find(
|
|
15
|
+
(o) => t(e.TOOLBAR, o, !1)
|
|
16
|
+
), c = s.filter((o) => !t(e.TOOLBAR, o, !1)).filter((o) => t(e.ROW, o, !0));
|
|
17
|
+
return /* @__PURE__ */ T("div", { className: l.wrapper, children: [
|
|
18
|
+
p,
|
|
19
|
+
/* @__PURE__ */ a("table", { className: l.root, children: /* @__PURE__ */ a("tbody", { children: c }) })
|
|
28
20
|
] });
|
|
29
21
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
alignRight: F,
|
|
37
|
-
alignCenter: D
|
|
38
|
-
}, A = (t) => {
|
|
39
|
-
const { align: e = "left", as: o = "td", children: r, title: c, width: l } = t, m = y(_.root, w("align", e, _), {
|
|
40
|
-
[_.header]: o === "th"
|
|
41
|
-
});
|
|
42
|
-
return /* @__PURE__ */ n(o, { className: m, title: c, width: l, children: r });
|
|
43
|
-
};
|
|
44
|
-
A.displayName = s.CELL;
|
|
45
|
-
const E = "_root_t4731_5", I = {
|
|
46
|
-
root: E
|
|
47
|
-
}, T = (t) => {
|
|
48
|
-
const { children: e } = t, o = (r) => i(s.CELL, r) ? r : null;
|
|
49
|
-
return /* @__PURE__ */ n("tr", { className: I.root, children: b.Children.map(e, o) });
|
|
50
|
-
};
|
|
51
|
-
T.displayName = s.ROW;
|
|
52
|
-
const M = "Table.Toolbar", P = "_root_d4szt_6", W = {
|
|
53
|
-
root: P
|
|
54
|
-
}, f = (t) => {
|
|
55
|
-
const { children: e } = t;
|
|
56
|
-
return /* @__PURE__ */ n("div", { className: W.root, children: e });
|
|
57
|
-
};
|
|
58
|
-
f.displayName = M;
|
|
59
|
-
const Y = "Table", j = "_wrapper_17sd8_5", z = "_root_17sd8_11", C = {
|
|
60
|
-
wrapper: j,
|
|
61
|
-
root: z
|
|
62
|
-
}, N = (t) => {
|
|
63
|
-
const { children: e } = t, o = b.Children.toArray(e), r = o.find(
|
|
64
|
-
(l) => i(s.TOOLBAR, l, !1)
|
|
65
|
-
), c = o.filter((l) => !i(s.TOOLBAR, l, !1)).filter((l) => i(s.ROW, l, !0));
|
|
66
|
-
return /* @__PURE__ */ h("div", { className: C.wrapper, children: [
|
|
67
|
-
r,
|
|
68
|
-
/* @__PURE__ */ n("table", { className: C.root, children: /* @__PURE__ */ n("tbody", { children: c }) })
|
|
69
|
-
] });
|
|
70
|
-
};
|
|
71
|
-
N.displayName = Y;
|
|
72
|
-
const d = N;
|
|
73
|
-
d.ActiveFilters = g;
|
|
74
|
-
d.Cell = A;
|
|
75
|
-
d.Row = T;
|
|
76
|
-
d.Toolbar = f;
|
|
22
|
+
i.displayName = w;
|
|
23
|
+
const r = i;
|
|
24
|
+
r.ActiveFilters = d;
|
|
25
|
+
r.Cell = f;
|
|
26
|
+
r.Row = b;
|
|
27
|
+
r.Toolbar = A;
|
|
77
28
|
export {
|
|
78
|
-
|
|
29
|
+
r as Table
|
|
79
30
|
};
|
package/dist/tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:root{--tabs-padding: var(--lui-space-8);--tabs-panel-padding-top: var(--lui-space-10);--tab-text: var(--lui-color-text-secondary);--tab-text-active: var(--lui-color-text-primary);--tab-text-disabled: var(--lui-color-text-disabled);--tab-border-active: var(--lui-palette-gray-900);--tab-bg-buttons: var(--lui-color-background-tertiary);--tab-bg-buttons-active: var(--lui-color-background-brand-secondary);--tab-text-buttons: var(--lui-color-text-quaternary);--tab-text-buttons-active: var(--lui-color-text-primary);--tab-radius-buttons: var(--lui-radius-1);--tab-font-buttons: var(--lui-font-size-md);--tab-gap-buttons: var(--lui-space-3);--tab-padding-y-buttons: var(--lui-space-2);--tab-padding-x-buttons: var(--lui-space-3);--tab-list-gap: var(--lui-space-4)}._root_ndfzg_20{width:auto}._root_ndfzg_20._variantDefault_ndfzg_23 ._list_ndfzg_23:before{border-bottom:1px solid var(--lui-color-border-primary);bottom:0;content:"";left:0;position:absolute;right:0;z-index:0}._root_ndfzg_20._variantButtons_ndfzg_32 ._list_ndfzg_23{align-items:center;gap:var(--tab-list-gap);justify-content:flex-start;padding:var(--tabs-padding)}._list_ndfzg_23{display:flex;overflow-x:auto;position:relative}._panel_ndfzg_45{padding-top:var(--tabs-panel-padding-top);position:relative}@media only screen and (max-width:1023px){._root_ndfzg_20._variantButtons_ndfzg_32{justify-content:start}}
|
package/dist/tabs.js
CHANGED
|
@@ -1,79 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import C from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const { disabled: n = !1, label: s, index: a = 0, tabIndex: o = 0 } = t, { activeIndex: r, getPanelId: d, getTabId: i, setActiveTab: u, variant: l } = x(), v = d(a), e = i(a), T = r === a, $ = C(_.root, I("variant", l, _), {
|
|
26
|
-
[_.active]: T,
|
|
27
|
-
[_.disabled]: n
|
|
28
|
-
});
|
|
29
|
-
return /* @__PURE__ */ c(
|
|
30
|
-
"button",
|
|
31
|
-
{
|
|
32
|
-
"aria-selected": T,
|
|
33
|
-
"aria-controls": v,
|
|
34
|
-
"aria-disabled": n,
|
|
35
|
-
className: $,
|
|
36
|
-
disabled: n,
|
|
37
|
-
id: e,
|
|
38
|
-
onClick: () => {
|
|
39
|
-
n || u(a);
|
|
40
|
-
},
|
|
41
|
-
role: "tab",
|
|
42
|
-
tabIndex: n ? -1 : o,
|
|
43
|
-
children: s
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
N.displayName = `${f.TAB}`;
|
|
48
|
-
const P = (t) => {
|
|
49
|
-
const { panels: n } = t, { activeIndex: s, getPanelId: a } = x(), o = a(s);
|
|
50
|
-
return /* @__PURE__ */ c("div", { id: o, children: n[s] });
|
|
51
|
-
};
|
|
52
|
-
P.displayName = `${f.PANEL}`;
|
|
53
|
-
const M = "_root_ndfzg_20", R = "_variantDefault_ndfzg_23", V = "_list_ndfzg_23", Y = "_variantButtons_ndfzg_32", q = "_panel_ndfzg_45", b = {
|
|
54
|
-
root: M,
|
|
55
|
-
variantDefault: R,
|
|
56
|
-
list: V,
|
|
57
|
-
variantButtons: Y,
|
|
58
|
-
panel: q
|
|
59
|
-
}, G = [f.TAB], B = (t) => {
|
|
60
|
-
const { defaultActiveIndex: n = 0, children: s, onChange: a, variant: o = A.DEFAULT } = t, r = [], d = C(b.root, I("variant", o, b));
|
|
61
|
-
let i = !1;
|
|
62
|
-
const u = (l, v) => {
|
|
63
|
-
if (!S(G, l))
|
|
1
|
+
import { T as _ } from "./Tab-BfpR10OT.mjs";
|
|
2
|
+
import { jsx as i, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import u, { useState as b, useId as h } from "react";
|
|
4
|
+
import g from "clsx";
|
|
5
|
+
import { C as E, E as I, a as N } from "./enums-OoI2Qgqq.mjs";
|
|
6
|
+
import { P as A } from "./Panel-B-LZtrGB.mjs";
|
|
7
|
+
import { i as P } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
8
|
+
import { g as x } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
9
|
+
import './tabs.css';const v = (a, e, s) => `${a}-${s}-${e}`, B = (a) => {
|
|
10
|
+
const { defaultActiveIndex: e = 0, children: s, onTabChange: l, variant: c } = a, [o, m] = b(e), n = h(), f = (t) => {
|
|
11
|
+
t !== o && (m(t), l && l(t));
|
|
12
|
+
}, r = (t) => v(n, t, "panel"), p = (t) => v(n, t, "tab");
|
|
13
|
+
return /* @__PURE__ */ i(E.Provider, { value: { activeIndex: o, baseId: n, getPanelId: r, getTabId: p, setActiveTab: f, variant: c }, children: s });
|
|
14
|
+
}, z = "_root_ndfzg_20", D = "_variantDefault_ndfzg_23", S = "_list_ndfzg_23", V = "_variantButtons_ndfzg_32", $ = "_panel_ndfzg_45", d = {
|
|
15
|
+
root: z,
|
|
16
|
+
variantDefault: D,
|
|
17
|
+
list: S,
|
|
18
|
+
variantButtons: V,
|
|
19
|
+
panel: $
|
|
20
|
+
}, j = [I.TAB], T = (a) => {
|
|
21
|
+
const { defaultActiveIndex: e = 0, children: s, onChange: l, variant: c = N.DEFAULT } = a, o = [], m = g(d.root, x("variant", c, d));
|
|
22
|
+
let n = !1;
|
|
23
|
+
const f = (r, p) => {
|
|
24
|
+
if (!P(j, r))
|
|
64
25
|
return null;
|
|
65
|
-
const { children:
|
|
66
|
-
return
|
|
26
|
+
const { children: t = null } = r.props;
|
|
27
|
+
return o.push(t), t && (n = !0), u.cloneElement(r, { index: p });
|
|
67
28
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
29
|
+
return /* @__PURE__ */ i(B, { defaultActiveIndex: e, onTabChange: l, variant: c, children: /* @__PURE__ */ C("div", { className: m, children: [
|
|
30
|
+
/* @__PURE__ */ i("div", { className: d.list, children: u.Children.map(s, f) }),
|
|
31
|
+
n && /* @__PURE__ */ i("div", { className: d.panel, children: /* @__PURE__ */ i(A, { panels: o }) })
|
|
71
32
|
] }) });
|
|
72
33
|
};
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
34
|
+
T.displayName = "Tabs";
|
|
35
|
+
const y = T;
|
|
36
|
+
y.Tab = _;
|
|
76
37
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
38
|
+
N as ETabsVariant,
|
|
39
|
+
y as Tabs
|
|
79
40
|
};
|
package/dist/text.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare enum ETextColor {
|
|
4
|
+
PRIMARY = "primary",
|
|
5
|
+
SECONDARY = "secondary",
|
|
6
|
+
TERTIARY = "tertiary",
|
|
7
|
+
DISABLED = "disabled",
|
|
8
|
+
BRAND = "brand"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare enum ETextSize {
|
|
12
|
+
XS = "xs",
|
|
13
|
+
SM = "sm",
|
|
14
|
+
MD = "md",
|
|
15
|
+
LG = "lg"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare enum ETextWeight {
|
|
19
|
+
NORMAL = "normal",
|
|
20
|
+
MEDIUM = "medium",
|
|
21
|
+
SEMIBOLD = "semibold",
|
|
22
|
+
BOLD = "bold"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare interface ITextProps extends default_2.PropsWithChildren {
|
|
26
|
+
/** HTML-тег для рендера корневого элемента. По умолчанию `p`. */
|
|
27
|
+
as?: TTextTag;
|
|
28
|
+
/** Размер текста. По умолчанию `sm`. */
|
|
29
|
+
size?: TTextSize;
|
|
30
|
+
/** Насыщенность шрифта. По умолчанию `normal`. */
|
|
31
|
+
weight?: TTextWeight;
|
|
32
|
+
/** Цвет текста из дизайн-системы. Если не передан — используется наследованный цвет. */
|
|
33
|
+
color?: TTextColor;
|
|
34
|
+
/** Обрезать текст с многоточием (одна строка, `text-overflow: ellipsis`). */
|
|
35
|
+
truncate?: boolean;
|
|
36
|
+
/** Подчёркивание: `true` для обычного underline, `'dotted'` для пунктирного подчёркивания. */
|
|
37
|
+
underline?: boolean | 'dotted';
|
|
38
|
+
/** Зачёркивание текста (`text-decoration: line-through`). */
|
|
39
|
+
strikethrough?: boolean;
|
|
40
|
+
/** Ref на корневой элемент. */
|
|
41
|
+
ref?: default_2.Ref<HTMLElement>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Text — компонент для отображения основного текста.
|
|
46
|
+
*
|
|
47
|
+
* Поддерживает размеры от 12px (xs) до 16px (lg), различные насыщенности шрифта
|
|
48
|
+
* и цвета из дизайн-системы. Подходит для параграфов, лейблов, аннотаций.
|
|
49
|
+
*
|
|
50
|
+
* В отличие от Heading, Text не имеет встроенного жирного начертания —
|
|
51
|
+
* вес управляется отдельным пропом `weight`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Text size="lg" weight="medium">Основной текст</Text>
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Text size="xs" color="secondary" as="span">Аннотация</Text>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
declare const Text_2: default_2.ForwardRefExoticComponent<Omit<ITextProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
64
|
+
export { Text_2 as Text }
|
|
65
|
+
|
|
66
|
+
export declare type TTextColor = `${ETextColor}`;
|
|
67
|
+
|
|
68
|
+
export declare type TTextSize = `${ETextSize}`;
|
|
69
|
+
|
|
70
|
+
export declare type TTextTag = 'p' | 'span' | 'div';
|
|
71
|
+
|
|
72
|
+
export declare type TTextWeight = `${ETextWeight}`;
|
|
73
|
+
|
|
74
|
+
export { }
|
package/dist/text.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { T as R } from "./Text-DQPy-DZ5.mjs";
|
|
2
|
+
var a = /* @__PURE__ */ ((r) => (r.XS = "xs", r.SM = "sm", r.MD = "md", r.LG = "lg", r))(a || {}), d = /* @__PURE__ */ ((r) => (r.PRIMARY = "primary", r.SECONDARY = "secondary", r.TERTIARY = "tertiary", r.DISABLED = "disabled", r.BRAND = "brand", r))(d || {}), m = /* @__PURE__ */ ((r) => (r.NORMAL = "normal", r.MEDIUM = "medium", r.SEMIBOLD = "semibold", r.BOLD = "bold", r))(m || {});
|
|
3
|
+
export {
|
|
4
|
+
d as ETextColor,
|
|
5
|
+
a as ETextSize,
|
|
6
|
+
m as ETextWeight,
|
|
7
|
+
R as Text
|
|
8
|
+
};
|