@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.
Files changed (106) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Actions-CEIXfLKN.mjs +26 -0
  3. package/dist/Actions.css +1 -0
  4. package/dist/ActiveFilters-BJojmc-d.mjs +29 -0
  5. package/dist/ActiveFilters.css +1 -0
  6. package/dist/Button-BN85EtaZ.mjs +52 -0
  7. package/dist/Button.css +1 -1
  8. package/dist/Cell-BPBvEyeL.mjs +21 -0
  9. package/dist/Cell.css +1 -0
  10. package/dist/Checkbox-Chfzm1Z9.mjs +46 -0
  11. package/dist/Checkbox.css +1 -0
  12. package/dist/Content-ru2X8iBx.mjs +13 -0
  13. package/dist/Content.css +1 -0
  14. package/dist/Group-DyDpeqOP.mjs +16 -0
  15. package/dist/Group.css +1 -0
  16. package/dist/Header-Clhgyr0J.mjs +29 -0
  17. package/dist/Header.css +1 -0
  18. package/dist/Heading-CL47Fqe7.mjs +30 -0
  19. package/dist/Heading.css +1 -0
  20. package/dist/InputBase-BHZWQT9-.mjs +46 -0
  21. package/dist/Item-JbyvZy05.mjs +66 -0
  22. package/dist/Item.css +1 -0
  23. package/dist/Panel-Q06TIYep.mjs +12 -0
  24. package/dist/Provider-CBfZpO45.mjs +12 -0
  25. package/dist/Row-C-3TXoDz.mjs +15 -0
  26. package/dist/Row.css +1 -0
  27. package/dist/Tab-CR0KvVaA.mjs +39 -0
  28. package/dist/Tab.css +1 -0
  29. package/dist/Text-DiOqZt8E.mjs +49 -0
  30. package/dist/Text.css +1 -0
  31. package/dist/Title-aOeFD24v.mjs +13 -0
  32. package/dist/Title.css +1 -0
  33. package/dist/Toolbar-BJQy4qFI.mjs +11 -0
  34. package/dist/Toolbar.css +1 -0
  35. package/dist/Trigger-C_4De6l1.mjs +11 -0
  36. package/dist/accordion.js +1 -1
  37. package/dist/actions.d.ts +13 -0
  38. package/dist/actions.js +4 -0
  39. package/dist/active-filters.d.ts +35 -0
  40. package/dist/active-filters.js +4 -0
  41. package/dist/breadcrumbs.js +1 -1
  42. package/dist/button.js +1 -1
  43. package/dist/cell.d.ts +20 -0
  44. package/dist/cell.js +4 -0
  45. package/dist/checkbox.d.ts +10 -35
  46. package/dist/checkbox.js +2 -40
  47. package/dist/content.d.ts +8 -0
  48. package/dist/content.js +4 -0
  49. package/dist/context.d.ts +44 -0
  50. package/dist/context.js +7 -0
  51. package/dist/dialog.css +1 -1
  52. package/dist/dialog.js +37 -44
  53. package/dist/drawer.css +1 -1
  54. package/dist/drawer.js +72 -93
  55. package/dist/empty-state.css +1 -1
  56. package/dist/empty-state.js +29 -48
  57. package/dist/enums-BnuDYTua.mjs +4 -0
  58. package/dist/enums-CiPhZomh.mjs +6 -0
  59. package/dist/enums-DUZMBQDd.mjs +7 -0
  60. package/dist/{getComponentSlots-DwAYUFNk.mjs → getComponentSlots-DD4iju8N.mjs} +1 -1
  61. package/dist/group.d.ts +12 -0
  62. package/dist/group.js +4 -0
  63. package/dist/header.d.ts +21 -0
  64. package/dist/header.js +4 -0
  65. package/dist/heading.d.ts +55 -0
  66. package/dist/heading.js +7 -0
  67. package/dist/input-base.d.ts +29 -0
  68. package/dist/input-base.js +4 -0
  69. package/dist/input.js +86 -124
  70. package/dist/isValidReactNode-D1buElhX.mjs +17 -0
  71. package/dist/item.d.ts +16 -0
  72. package/dist/item.js +4 -0
  73. package/dist/menu.css +1 -1
  74. package/dist/menu.js +46 -103
  75. package/dist/pagination.js +48 -60
  76. package/dist/panel.d.ts +9 -0
  77. package/dist/panel.js +4 -0
  78. package/dist/radio.css +1 -1
  79. package/dist/radio.js +42 -98
  80. package/dist/row.d.ts +12 -0
  81. package/dist/row.js +4 -0
  82. package/dist/tab.d.ts +30 -0
  83. package/dist/tab.js +4 -0
  84. package/dist/table.css +1 -1
  85. package/dist/table.js +25 -74
  86. package/dist/tabs.css +1 -1
  87. package/dist/tabs.js +30 -72
  88. package/dist/text.d.ts +74 -0
  89. package/dist/text.js +8 -0
  90. package/dist/title.d.ts +8 -0
  91. package/dist/title.js +4 -0
  92. package/dist/toolbar.d.ts +20 -0
  93. package/dist/toolbar.js +4 -0
  94. package/dist/trigger.d.ts +8 -0
  95. package/dist/trigger.js +4 -0
  96. package/dist/typography.d.ts +90 -40
  97. package/dist/typography.js +4 -38
  98. package/dist/useTabsContext-DdF09jQq.mjs +11 -0
  99. package/dist/utils.d.ts +2 -55
  100. package/dist/utils.js +14 -15
  101. package/package.json +1 -1
  102. package/dist/Button-jq8mFP6t.mjs +0 -52
  103. package/dist/checkbox.css +0 -1
  104. package/dist/isValidReactNode-CmYwTWCE.mjs +0 -18
  105. package/dist/typography.css +0 -1
  106. /package/dist/{input.css → InputBase.css} +0 -0
@@ -0,0 +1,9 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ declare interface IProps {
4
+ panels: default_2.ReactNode[];
5
+ }
6
+
7
+ export declare const Panel: default_2.FC<IProps>;
8
+
9
+ export { }
package/dist/panel.js ADDED
@@ -0,0 +1,4 @@
1
+ import { P as o } from "./Panel-Q06TIYep.mjs";
2
+ export {
3
+ o as Panel
4
+ };
package/dist/radio.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";._item_1mf7l_3{align-items:flex-start;cursor:pointer;display:inline-flex;gap:var(--radio-gap);position:relative;-webkit-user-select:none;user-select:none;vertical-align:middle}._item_1mf7l_3._disabled_1mf7l_12{cursor:not-allowed;opacity:.5}._item_1mf7l_3._invalid_1mf7l_17 ._radio_1mf7l_17{border-color:var(--radio-error-border)}._item_1mf7l_3._invalid_1mf7l_17 ._input_1mf7l_20:checked+._radio_1mf7l_17{background-color:var(--radio-error-checked-bg);border-color:var(--radio-error-checked-border)}._input_1mf7l_20{border:0;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._radio_1mf7l_17{align-items:center;background:var(--radio-bg);border:1px solid var(--radio-border);border-radius:var(--radio-radius);display:flex;flex-shrink:0;justify-content:center;position:relative;transition:background var(--radio-transition-duration) var(--radio-transition-timing),border-color var(--radio-transition-duration) var(--radio-transition-timing)}._radio_1mf7l_17:after{background:var(--radio-dot-color);border-radius:50%;content:"";opacity:0;position:absolute;transition:opacity var(--radio-transition-duration) var(--radio-transition-timing),transform var(--radio-transition-duration) var(--radio-transition-timing)}._content_1mf7l_63{display:flex;flex-direction:column;gap:var(--radio-content-gap);padding-top:var(--radio-content-padding-top)}._label_1mf7l_70{color:var(--radio-label-color);font-weight:var(--radio-label-font-weight)}._description_1mf7l_75{color:var(--radio-description-color);font-weight:var(--lui-font-weight-normal)}._item_1mf7l_3:not(._disabled_1mf7l_12) ._input_1mf7l_20:not(:checked):hover+._radio_1mf7l_17{border-color:var(--radio-hover-border)}._input_1mf7l_20:focus-visible+._radio_1mf7l_17{box-shadow:var(--radio-focus-shadow)}._input_1mf7l_20:checked+._radio_1mf7l_17{background:var(--radio-checked-bg);border-color:var(--radio-checked-border)}._input_1mf7l_20:checked+._radio_1mf7l_17:after{opacity:1}._disabled_1mf7l_12 ._input_1mf7l_20:checked+._radio_1mf7l_17{background:var(--radio-disabled-bg);border-color:var(--radio-disabled-border)}._disabled_1mf7l_12 ._input_1mf7l_20:checked+._radio_1mf7l_17:after{background:var(--radio-disabled-dot)}._disabled_1mf7l_12 ._input_1mf7l_20:not(:checked)+._radio_1mf7l_17{background:var(--radio-disabled-bg);border-color:var(--radio-disabled-border)}._sizeSm_1mf7l_113 ._radio_1mf7l_17{height:16px;width:16px}._sizeSm_1mf7l_113 ._radio_1mf7l_17:after{height:6px;width:6px}._sizeSm_1mf7l_113 ._label_1mf7l_70{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm)}._sizeSm_1mf7l_113 ._description_1mf7l_75{font-size:var(--lui-font-size-xs);line-height:var(--line-height-xs)}._sizeMd_1mf7l_130 ._radio_1mf7l_17{height:20px;width:20px}._sizeMd_1mf7l_130 ._radio_1mf7l_17:after{height:8px;width:8px}._sizeMd_1mf7l_130 ._label_1mf7l_70{font-size:var(--lui-font-size-md);line-height:var(--line-height-md)}._sizeMd_1mf7l_130 ._description_1mf7l_75{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm)}._sizeLg_1mf7l_147 ._radio_1mf7l_17{height:24px;width:24px}._sizeLg_1mf7l_147 ._radio_1mf7l_17:after{height:10px;width:10px}._sizeLg_1mf7l_147 ._label_1mf7l_70{font-size:var(--lui-font-size-lg);line-height:var(--line-height-lg)}._sizeLg_1mf7l_147 ._description_1mf7l_75{font-size:var(--lui-font-size-md);line-height:var(--line-height-md)}: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)}
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 { jsx as s, jsxs as z } from "react/jsx-runtime";
2
- import L, { createContext as S, useContext as E, useId as P, useState as A, useCallback as x, useRef as D } from "react";
3
- import I from "clsx";
4
- import { g as T } from "./getVariantClassName-DoCNtwBw.mjs";
5
- import { i as k } from "./isValidReactNode-CmYwTWCE.mjs";
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 R = S(null), $ = () => {
8
- const e = E(R);
9
- if (!e)
10
- throw new Error("useRadioContext should be used inside Radio component");
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
- [c, r]
12
+ [o, a]
18
13
  );
19
- return /* @__PURE__ */ s(R.Provider, { value: { disabled: _, invalid: t, name: v, onChange: N, size: m, value: g }, children: n });
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
- M.displayName = `${b}.Item`;
72
- var V = ((e) => (e.ITEM = `${b}.Item`, e))(V || {}), Q = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e.LG = "lg", e))(Q || {});
73
- const W = "_root_pott0_33", X = "_vertical_pott0_40", Z = "_group_pott0_40", ee = "_horizontal_pott0_43", C = {
74
- root: W,
75
- vertical: X,
76
- group: Z,
77
- horizontal: ee
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: n,
81
- name: a,
82
- value: i,
83
- defaultValue: l,
84
- onChange: r,
85
- vertical: m = !0,
86
- size: _ = "md",
87
- disabled: t = !1,
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 = (d) => k(te, d) ? d : null, c = I(C.root, {
90
- [C.horizontal]: !m,
91
- [C.vertical]: m
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
- j,
38
+ x,
95
39
  {
96
- name: a,
97
- value: i,
98
- defaultValue: l,
99
- onChange: r,
100
- size: _,
101
- disabled: t,
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: c, children: /* @__PURE__ */ s("div", { className: C.group, children: L.Children.map(n, v) }) })
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
- y.displayName = b;
108
- const ne = y;
109
- ne.Item = M;
51
+ f.displayName = h;
52
+ const O = f;
53
+ O.Item = M;
110
54
  export {
111
- Q as ERadioSize,
112
- ne as Radio
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
@@ -0,0 +1,4 @@
1
+ import { R } from "./Row-C-3TXoDz.mjs";
2
+ export {
3
+ R as Row
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
@@ -0,0 +1,4 @@
1
+ import { T as r } from "./Tab-CR0KvVaA.mjs";
2
+ export {
3
+ r as Tab
4
+ };
package/dist/table.css CHANGED
@@ -1 +1 @@
1
- :root{--active-filters-gap: var(--lui-space-2)}._root_4qb7d_5{align-items:center;display:flex;flex-wrap:wrap;gap:var(--active-filters-gap)}:root{--cell-bg-header: var(--lui-color-background-tertiary);--cell-border-header: var(--lui-color-border-secondary);--cell-padding: var(--lui-space-3) var(--lui-space-4);--cell-max-width: 200px}._root_lmxwt_8{background-color:transparent;border-bottom:1px solid var(--lui-color-border-primary);max-width:var(--cell-max-width);overflow:hidden;padding:var(--cell-padding);text-overflow:ellipsis;white-space:nowrap}._root_lmxwt_8._header_lmxwt_17{background-color:var(--cell-bg-header);border-bottom:2px solid var(--cell-border-header)}._root_lmxwt_8._alignLeft_lmxwt_21{text-align:left}._root_lmxwt_8._alignRight_lmxwt_24{text-align:right}._root_lmxwt_8._alignCenter_lmxwt_27{text-align:center}:root{--table-bg-stripe: var(--lui-color-background-secondary)}._root_t4731_5{background-color:var(--lui-color-background-primary);border-bottom:1px solid var(--lui-color-border-primary);transition:background-color .2s}._root_t4731_5:nth-child(odd){background-color:var(--table-bg-stripe)}._root_t4731_5:hover{background-color:var(--lui-color-background-brand-secondary)}:root{--toolbar-gap: var(--lui-space-3);--toolbar-padding: var(--lui-space-3) 0}._root_d4szt_6{align-items:center;display:flex;gap:var(--toolbar-gap);padding:var(--toolbar-padding)}: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%}
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 { jsxs as h, jsx as n } from "react/jsx-runtime";
2
- import b, { useCallback as p } from "react";
3
- import { B as u } from "./Button-jq8mFP6t.mjs";
4
- import { C as L } from "./Chip-CmsNZTlz.mjs";
5
- import { u as R } from "./useLocale-CJh-krrY.mjs";
6
- import y from "clsx";
7
- import { g as w } from "./getVariantClassName-DoCNtwBw.mjs";
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 './table.css';const v = "Table.ActiveFilters", x = "_root_4qb7d_5", $ = {
11
- root: x
12
- }, g = (t) => {
13
- const { filters: e, onClearAll: o, onRemove: r } = t, c = R(), l = p(
14
- (a) => () => {
15
- r(a);
16
- },
17
- [r]
18
- ), m = p(() => {
19
- o?.();
20
- }, [o]);
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
- g.displayName = v;
31
- var s = /* @__PURE__ */ ((t) => (t.CELL = "Table.Cell", t.ROW = "Table.Row", t.TOOLBAR = "Table.Toolbar", t))(s || {});
32
- const O = "_root_lmxwt_8", k = "_header_lmxwt_17", B = "_alignLeft_lmxwt_21", F = "_alignRight_lmxwt_24", D = "_alignCenter_lmxwt_27", _ = {
33
- root: O,
34
- header: k,
35
- alignLeft: B,
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
- d as Table
29
+ r as Table
79
30
  };
package/dist/tabs.css CHANGED
@@ -1 +1 @@
1
- ._root_11zii_1{position:relative;-webkit-user-select:none;user-select:none}._root_11zii_1._disabled_11zii_5{color:var(--tab-text-disabled);cursor:not-allowed}._root_11zii_1._variantDefault_11zii_9{border-bottom:2px solid transparent;color:var(--tab-text);font-size:var(--lui-font-size-md);font-weight:var(--lui-font-weight-medium);line-height:var(--line-height-md);padding:var(--lui-space-3) var(--lui-space-5);transition:border-color .3s,color .3s;white-space:nowrap}._root_11zii_1._variantDefault_11zii_9:focus{border-color:var(--tab-text-active)}._root_11zii_1._variantDefault_11zii_9._active_11zii_22{border-color:var(--tab-border-active);color:var(--tab-text-active)}._root_11zii_1._variantButtons_11zii_26{align-items:center;background:var(--tab-bg-buttons);border-radius:var(--tab-radius-buttons);color:var(--tab-text-buttons);display:flex;flex:1;flex-direction:column;font-size:var(--tab-font-buttons);font-weight:var(--lui-font-weight-medium);gap:var(--tab-gap-buttons);height:64px;justify-content:center;line-height:var(--line-height-md);max-width:320px;padding:var(--tab-padding-y-buttons) var(--tab-padding-x-buttons)}._root_11zii_1._variantButtons_11zii_26:focus{box-shadow:0 0 0 2px #98a2b324}._root_11zii_1._variantButtons_11zii_26._active_11zii_22{background:var(--tab-bg-buttons-active);color:var(--tab-text-buttons-active)}@media only screen and (max-width:1023px){._root_11zii_1._variantButtons_11zii_26{gap:var(--tab-gap-buttons);height:40px;justify-content:center;padding:var(--lui-space-2) var(--lui-space-5);white-space:nowrap}}: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}}
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 { jsx as c, jsxs as z } from "react/jsx-runtime";
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 m, { createContext as D, useContext as E, useState as L, useId as y } from "react";
4
- import { g as I } from "./getVariantClassName-DoCNtwBw.mjs";
5
- import { i as S } from "./isValidReactNode-CmYwTWCE.mjs";
6
- import './tabs.css';const g = D(null), x = () => {
7
- const t = E(g);
8
- if (!t)
9
- throw new Error("useTabsContext should be used inside Tabs component");
10
- return t;
11
- }, p = (t, n, s) => `${t}-${s}-${n}`, U = (t) => {
12
- const { defaultActiveIndex: n = 0, children: s, onTabChange: a, variant: o } = t, [r, d] = L(n), i = y(), u = (e) => {
13
- e !== r && (d(e), a && a(e));
14
- }, l = (e) => p(i, e, "panel"), v = (e) => p(i, e, "tab");
15
- return /* @__PURE__ */ c(g.Provider, { value: { activeIndex: r, baseId: i, getPanelId: l, getTabId: v, setActiveTab: u, variant: o }, children: s });
16
- }, h = "Tabs";
17
- var f = ((t) => (t.PANEL = `${h}.Panel`, t.TAB = `${h}.Tab`, t))(f || {}), A = /* @__PURE__ */ ((t) => (t.BUTTONS = "buttons", t.DEFAULT = "default", t))(A || {});
18
- const k = "_root_11zii_1", w = "_disabled_11zii_5", O = "_variantDefault_11zii_9", j = "_active_11zii_22", F = "_variantButtons_11zii_26", _ = {
19
- root: k,
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 } = l.props;
66
- return r.push(e), e && (i = !0), m.cloneElement(l, { index: v });
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__ */ c(U, { defaultActiveIndex: n, onTabChange: a, variant: o, children: /* @__PURE__ */ z("div", { className: d, children: [
69
- /* @__PURE__ */ c("div", { className: b.list, children: m.Children.map(s, u) }),
70
- i && /* @__PURE__ */ c("div", { className: b.panel, children: /* @__PURE__ */ c(P, { panels: r }) })
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
- B.displayName = "Tabs";
74
- const H = B;
75
- H.Tab = N;
31
+ l.displayName = "Tabs";
32
+ const V = l;
33
+ V.Tab = v;
76
34
  export {
77
- A as ETabsVariant,
78
- H as Tabs
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
+ };
@@ -0,0 +1,8 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare interface ITitleProps extends default_2.PropsWithChildren {
4
+ }
5
+
6
+ export declare const Title: default_2.FC<ITitleProps>;
7
+
8
+ export { }
package/dist/title.js ADDED
@@ -0,0 +1,4 @@
1
+ import { T as r } from "./Title-aOeFD24v.mjs";
2
+ export {
3
+ r as Title
4
+ };
@@ -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 { }
@@ -0,0 +1,4 @@
1
+ import { T as a } from "./Toolbar-BJQy4qFI.mjs";
2
+ export {
3
+ a as Toolbar
4
+ };
@@ -0,0 +1,8 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare interface IProps extends default_2.PropsWithChildren {
4
+ }
5
+
6
+ export declare const Trigger: default_2.FC<IProps>;
7
+
8
+ export { }
@@ -0,0 +1,4 @@
1
+ import { T as g } from "./Trigger-C_4De6l1.mjs";
2
+ export {
3
+ g as Trigger
4
+ };