@lazar-ui/kit 0.5.2 → 0.6.0
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 +18 -0
- package/dist/Actions-CEIXfLKN.mjs +26 -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/Checkbox-Chfzm1Z9.mjs +46 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Content-ru2X8iBx.mjs +13 -0
- package/dist/Content.css +1 -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-JbyvZy05.mjs +66 -0
- package/dist/Item.css +1 -0
- package/dist/Panel-Q06TIYep.mjs +12 -0
- package/dist/Provider-CBfZpO45.mjs +12 -0
- package/dist/Row-C-3TXoDz.mjs +15 -0
- package/dist/Row.css +1 -0
- package/dist/Tab-CR0KvVaA.mjs +39 -0
- package/dist/Tab.css +1 -0
- package/dist/Text-DiOqZt8E.mjs +49 -0
- package/dist/Text.css +1 -0
- package/dist/Title-aOeFD24v.mjs +13 -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.js +1 -1
- 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/breadcrumbs.js +1 -1
- package/dist/button.js +1 -1
- package/dist/cell.d.ts +20 -0
- package/dist/cell.js +4 -0
- package/dist/checkbox.d.ts +10 -35
- package/dist/checkbox.js +2 -40
- package/dist/content.d.ts +8 -0
- package/dist/content.js +4 -0
- package/dist/context.d.ts +44 -0
- package/dist/context.js +7 -0
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +37 -44
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +72 -93
- package/dist/empty-state.css +1 -1
- package/dist/empty-state.js +29 -48
- package/dist/enums-BnuDYTua.mjs +4 -0
- package/dist/enums-CiPhZomh.mjs +6 -0
- package/dist/enums-DUZMBQDd.mjs +7 -0
- package/dist/{getComponentSlots-DwAYUFNk.mjs → getComponentSlots-DD4iju8N.mjs} +1 -1
- 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/isValidReactNode-D1buElhX.mjs +17 -0
- package/dist/item.d.ts +16 -0
- package/dist/item.js +4 -0
- package/dist/menu.css +1 -1
- package/dist/menu.js +46 -103
- package/dist/pagination.js +48 -60
- package/dist/panel.d.ts +9 -0
- package/dist/panel.js +4 -0
- package/dist/radio.css +1 -1
- package/dist/radio.js +42 -98
- package/dist/row.d.ts +12 -0
- package/dist/row.js +4 -0
- 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 +30 -72
- 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/useTabsContext-DdF09jQq.mjs +11 -0
- package/dist/utils.d.ts +2 -55
- package/dist/utils.js +14 -15
- package/package.json +1 -1
- package/dist/Button-jq8mFP6t.mjs +0 -52
- package/dist/checkbox.css +0 -1
- package/dist/isValidReactNode-CmYwTWCE.mjs +0 -18
- package/dist/typography.css +0 -1
- /package/dist/{input.css → InputBase.css} +0 -0
package/dist/panel.d.ts
ADDED
package/dist/panel.js
ADDED
package/dist/radio.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8"
|
|
1
|
+
@charset "UTF-8";:root{--radio-bg: var(--lui-color-background-primary);--radio-border: var(--lui-color-border-primary);--radio-checked-bg: var(--lui-color-background-brand);--radio-checked-border: var(--lui-color-background-brand);--radio-dot-color: var(--lui-color-text-on-brand);--radio-disabled-bg: var(--lui-color-background-disabled);--radio-disabled-border: var(--lui-color-border-disabled);--radio-disabled-dot: var(--lui-color-text-disabled);--radio-error-border: var(--lui-color-border-focus-error);--radio-error-checked-bg: var(--lui-color-background-error);--radio-error-checked-border: var(--lui-color-background-error);--radio-radius: var(--lui-radius-full);--radio-hover-border: var(--lui-palette-gray-400);--radio-focus-shadow: 0 0 0 2px var(--lui-palette-brand-secondary);--radio-label-color: var(--lui-color-text-primary);--radio-description-color: var(--lui-color-text-tertiary);--radio-label-font-weight: var(--lui-font-weight-medium);--radio-gap: var(--lui-space-2);--radio-content-gap: 2px;--radio-content-padding-top: 1px;--radio-group-gap: var(--lui-space-2);--radio-transition-duration: .15s;--radio-transition-timing: cubic-bezier(.4, 0, .2, 1)}._root_pott0_33{border:none;display:flex;flex-direction:column;margin:0;padding:0}._root_pott0_33._vertical_pott0_40 ._group_pott0_40{flex-direction:column}._root_pott0_33._horizontal_pott0_43 ._group_pott0_40{flex-direction:row}._group_pott0_40{display:flex;gap:var(--radio-group-gap)}
|
package/dist/radio.js
CHANGED
|
@@ -1,113 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
1
|
+
import { C as V, D as h, I as M } from "./Item-JbyvZy05.mjs";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import P, { useId as z, useState as A, useCallback as E } from "react";
|
|
4
|
+
import T from "clsx";
|
|
5
|
+
import { i as b } from "./isValidReactNode-D1buElhX.mjs";
|
|
6
6
|
import "lodash/camelCase";
|
|
7
|
-
import './radio.css';const
|
|
8
|
-
const e = E(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return e;
|
|
12
|
-
}, j = (e) => {
|
|
13
|
-
const { children: n, name: a, value: i, defaultValue: l, onChange: r, size: m, disabled: _, invalid: t } = e, p = P(), v = a ?? p, c = i !== void 0, [d, f] = A(l), g = c ? i : d, N = x(
|
|
14
|
-
(h) => {
|
|
15
|
-
c || f(h), r?.(h);
|
|
7
|
+
import './radio.css';const x = (e) => {
|
|
8
|
+
const { children: i, name: c, value: t, defaultValue: d, onChange: a, size: r, disabled: m, invalid: u } = e, p = z(), v = c ?? p, o = t !== void 0, [n, g] = A(d), N = o ? t : n, I = E(
|
|
9
|
+
(C) => {
|
|
10
|
+
o || g(C), a?.(C);
|
|
16
11
|
},
|
|
17
|
-
[
|
|
12
|
+
[o, a]
|
|
18
13
|
);
|
|
19
|
-
return /* @__PURE__ */ s(
|
|
20
|
-
}, b = "Radio", w = "_item_1mf7l_3", B = "_disabled_1mf7l_12", O = "_invalid_1mf7l_17", G = "_radio_1mf7l_17", U = "_input_1mf7l_20", Y = "_content_1mf7l_63", q = "_label_1mf7l_70", F = "_description_1mf7l_75", H = "_sizeSm_1mf7l_113", J = "_sizeMd_1mf7l_130", K = "_sizeLg_1mf7l_147", o = {
|
|
21
|
-
item: w,
|
|
22
|
-
disabled: B,
|
|
23
|
-
invalid: O,
|
|
24
|
-
radio: G,
|
|
25
|
-
input: U,
|
|
26
|
-
content: Y,
|
|
27
|
-
label: q,
|
|
28
|
-
description: F,
|
|
29
|
-
sizeSm: H,
|
|
30
|
-
sizeMd: J,
|
|
31
|
-
sizeLg: K
|
|
32
|
-
}, M = (e) => {
|
|
33
|
-
const { ref: n, children: a, value: i, description: l, disabled: r, onChange: m, ..._ } = e, t = $(), p = D(null), v = t.size ?? "md", c = t.value !== void 0 ? i === t.value : void 0, d = r !== void 0 ? r : t.disabled, f = t.invalid === !0, g = x(
|
|
34
|
-
(u) => {
|
|
35
|
-
p.current = u, typeof n == "function" ? n(u) : n && (n.current = u);
|
|
36
|
-
},
|
|
37
|
-
[n]
|
|
38
|
-
), N = (u) => {
|
|
39
|
-
t.onChange?.(u.target.value), m?.(u);
|
|
40
|
-
}, h = I(
|
|
41
|
-
o.item,
|
|
42
|
-
T("size", v, o),
|
|
43
|
-
{
|
|
44
|
-
[o.disabled]: d,
|
|
45
|
-
[o.invalid]: f
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
return /* @__PURE__ */ z("label", { className: h, children: [
|
|
49
|
-
/* @__PURE__ */ s(
|
|
50
|
-
"input",
|
|
51
|
-
{
|
|
52
|
-
ref: g,
|
|
53
|
-
className: o.input,
|
|
54
|
-
type: "radio",
|
|
55
|
-
checked: c,
|
|
56
|
-
disabled: d,
|
|
57
|
-
"aria-invalid": f || void 0,
|
|
58
|
-
name: t.name,
|
|
59
|
-
value: i,
|
|
60
|
-
onChange: N,
|
|
61
|
-
..._
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ s("span", { className: o.radio, "aria-hidden": "true" }),
|
|
65
|
-
(a || l) && /* @__PURE__ */ z("span", { className: o.content, children: [
|
|
66
|
-
a && /* @__PURE__ */ s("span", { className: o.label, children: a }),
|
|
67
|
-
l && /* @__PURE__ */ s("span", { className: o.description, children: l })
|
|
68
|
-
] })
|
|
69
|
-
] });
|
|
14
|
+
return /* @__PURE__ */ s(V.Provider, { value: { disabled: m, invalid: u, name: v, onChange: I, size: r, value: N }, children: i });
|
|
70
15
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}, te = [V.ITEM], y = (e) => {
|
|
16
|
+
var _ = ((e) => (e.ITEM = `${h}.Item`, e))(_ || {}), D = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e.LG = "lg", e))(D || {});
|
|
17
|
+
const L = "_root_pott0_33", R = "_vertical_pott0_40", S = "_group_pott0_40", y = "_horizontal_pott0_43", l = {
|
|
18
|
+
root: L,
|
|
19
|
+
vertical: R,
|
|
20
|
+
group: S,
|
|
21
|
+
horizontal: y
|
|
22
|
+
}, B = [_.ITEM], f = (e) => {
|
|
79
23
|
const {
|
|
80
|
-
children:
|
|
81
|
-
name:
|
|
82
|
-
value:
|
|
83
|
-
defaultValue:
|
|
84
|
-
onChange:
|
|
85
|
-
vertical:
|
|
86
|
-
size:
|
|
87
|
-
disabled:
|
|
24
|
+
children: i,
|
|
25
|
+
name: c,
|
|
26
|
+
value: t,
|
|
27
|
+
defaultValue: d,
|
|
28
|
+
onChange: a,
|
|
29
|
+
vertical: r = !0,
|
|
30
|
+
size: m = "md",
|
|
31
|
+
disabled: u = !1,
|
|
88
32
|
invalid: p = !1
|
|
89
|
-
} = e, v = (
|
|
90
|
-
[
|
|
91
|
-
[
|
|
33
|
+
} = e, v = (n) => b(B, n) ? n : null, o = T(l.root, {
|
|
34
|
+
[l.horizontal]: !r,
|
|
35
|
+
[l.vertical]: r
|
|
92
36
|
});
|
|
93
37
|
return /* @__PURE__ */ s(
|
|
94
|
-
|
|
38
|
+
x,
|
|
95
39
|
{
|
|
96
|
-
name:
|
|
97
|
-
value:
|
|
98
|
-
defaultValue:
|
|
99
|
-
onChange:
|
|
100
|
-
size:
|
|
101
|
-
disabled:
|
|
40
|
+
name: c,
|
|
41
|
+
value: t,
|
|
42
|
+
defaultValue: d,
|
|
43
|
+
onChange: a,
|
|
44
|
+
size: m,
|
|
45
|
+
disabled: u,
|
|
102
46
|
invalid: p,
|
|
103
|
-
children: /* @__PURE__ */ s("fieldset", { className:
|
|
47
|
+
children: /* @__PURE__ */ s("fieldset", { className: o, children: /* @__PURE__ */ s("div", { className: l.group, children: P.Children.map(i, v) }) })
|
|
104
48
|
}
|
|
105
49
|
);
|
|
106
50
|
};
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
51
|
+
f.displayName = h;
|
|
52
|
+
const O = f;
|
|
53
|
+
O.Item = M;
|
|
110
54
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
55
|
+
D as ERadioSize,
|
|
56
|
+
O as Radio
|
|
113
57
|
};
|
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/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-C-3TXoDz.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-D1buElhX.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,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as v } from "./Tab-CR0KvVaA.mjs";
|
|
2
|
+
import { jsx as a, jsxs as T } from "react/jsx-runtime";
|
|
3
|
+
import i from "react";
|
|
2
4
|
import C from "clsx";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
disabled: w,
|
|
21
|
-
variantDefault: O,
|
|
22
|
-
active: j,
|
|
23
|
-
variantButtons: F
|
|
24
|
-
}, N = (t) => {
|
|
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))
|
|
5
|
+
import "./useTabsContext-DdF09jQq.mjs";
|
|
6
|
+
import { P as h } from "./Provider-CBfZpO45.mjs";
|
|
7
|
+
import { P as b } from "./Panel-Q06TIYep.mjs";
|
|
8
|
+
import { i as g } from "./isValidReactNode-D1buElhX.mjs";
|
|
9
|
+
import { g as N } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
10
|
+
import { E, a as P } from "./enums-CiPhZomh.mjs";
|
|
11
|
+
import './tabs.css';const B = "_root_ndfzg_20", x = "_variantDefault_ndfzg_23", z = "_list_ndfzg_23", A = "_variantButtons_ndfzg_32", D = "_panel_ndfzg_45", t = {
|
|
12
|
+
root: B,
|
|
13
|
+
variantDefault: x,
|
|
14
|
+
list: z,
|
|
15
|
+
variantButtons: A,
|
|
16
|
+
panel: D
|
|
17
|
+
}, S = [E.TAB], l = (m) => {
|
|
18
|
+
const { defaultActiveIndex: c = 0, children: p, onChange: d, variant: o = P.DEFAULT } = m, s = [], f = C(t.root, N("variant", o, t));
|
|
19
|
+
let r = !1;
|
|
20
|
+
const _ = (n, u) => {
|
|
21
|
+
if (!g(S, n))
|
|
64
22
|
return null;
|
|
65
|
-
const { children: e = null } =
|
|
66
|
-
return
|
|
23
|
+
const { children: e = null } = n.props;
|
|
24
|
+
return s.push(e), e && (r = !0), i.cloneElement(n, { index: u });
|
|
67
25
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
26
|
+
return /* @__PURE__ */ a(h, { defaultActiveIndex: c, onTabChange: d, variant: o, children: /* @__PURE__ */ T("div", { className: f, children: [
|
|
27
|
+
/* @__PURE__ */ a("div", { className: t.list, children: i.Children.map(p, _) }),
|
|
28
|
+
r && /* @__PURE__ */ a("div", { className: t.panel, children: /* @__PURE__ */ a(b, { panels: s }) })
|
|
71
29
|
] }) });
|
|
72
30
|
};
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
31
|
+
l.displayName = "Tabs";
|
|
32
|
+
const V = l;
|
|
33
|
+
V.Tab = v;
|
|
76
34
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
35
|
+
P as ETabsVariant,
|
|
36
|
+
V as Tabs
|
|
79
37
|
};
|
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-DiOqZt8E.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
|
+
};
|
package/dist/title.d.ts
ADDED
package/dist/title.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare interface IToolbarProps extends default_2.PropsWithChildren {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Table.Toolbar — a simple flex-wrapper that sits above the Table
|
|
8
|
+
* and contains arbitrary controls (inputs, buttons, filters, etc.).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Table.Toolbar>
|
|
13
|
+
* <Input placeholder="Search..." />
|
|
14
|
+
* <Button>Export</Button>
|
|
15
|
+
* </Table.Toolbar>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const Toolbar: default_2.FC<IToolbarProps>;
|
|
19
|
+
|
|
20
|
+
export { }
|
package/dist/toolbar.js
ADDED
package/dist/trigger.js
ADDED