@lazar-ui/kit 0.1.0 → 0.2.2

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 (85) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/LICENSE +21 -0
  3. package/README.md +64 -23
  4. package/dist/Icon-flib0kme.mjs +684 -0
  5. package/dist/Icon.css +1 -0
  6. package/dist/{Overlay-RmiBtqDR.mjs → Overlay-OYo7gW8m.mjs} +165 -156
  7. package/dist/accordion.css +1 -1
  8. package/dist/accordion.d.ts +59 -9
  9. package/dist/accordion.js +59 -41
  10. package/dist/alert.css +1 -1
  11. package/dist/alert.js +12 -12
  12. package/dist/avatar.css +1 -1
  13. package/dist/avatar.d.ts +2 -2
  14. package/dist/avatar.js +18 -18
  15. package/dist/badge.css +1 -1
  16. package/dist/badge.d.ts +3 -3
  17. package/dist/badge.js +8 -8
  18. package/dist/breadcrumbs.css +1 -1
  19. package/dist/breadcrumbs.js +35 -35
  20. package/dist/button.css +1 -1
  21. package/dist/button.d.ts +2 -0
  22. package/dist/button.js +41 -35
  23. package/dist/card.css +1 -1
  24. package/dist/card.js +15 -15
  25. package/dist/checkbox.css +1 -1
  26. package/dist/checkbox.js +25 -25
  27. package/dist/css/palettes/indigo.css +75 -75
  28. package/dist/css/palettes/monochrome.css +75 -75
  29. package/dist/css/semantic.css +67 -67
  30. package/dist/dialog.css +1 -1
  31. package/dist/dialog.js +61 -60
  32. package/dist/drawer.css +1 -1
  33. package/dist/drawer.d.ts +11 -0
  34. package/dist/drawer.js +102 -81
  35. package/dist/empty-state.css +1 -1
  36. package/dist/empty-state.d.ts +1 -1
  37. package/dist/empty-state.js +27 -26
  38. package/dist/error-boundary.css +1 -1
  39. package/dist/error-boundary.js +9 -9
  40. package/dist/flex.js +6 -6
  41. package/dist/form-field.css +1 -1
  42. package/dist/form-field.js +10 -10
  43. package/dist/icon.d.ts +30 -0
  44. package/dist/icon.js +4 -0
  45. package/dist/input.css +1 -1
  46. package/dist/input.js +77 -103
  47. package/dist/{config-provider.d.ts → lazar-ui-provider.d.ts} +33 -33
  48. package/dist/lazar-ui-provider.js +14 -0
  49. package/dist/menu.css +1 -1
  50. package/dist/menu.d.ts +3 -3
  51. package/dist/menu.js +73 -91
  52. package/dist/pagination.css +1 -1
  53. package/dist/pagination.js +49 -48
  54. package/dist/popover.css +1 -1
  55. package/dist/popover.d.ts +1 -1
  56. package/dist/popover.js +26 -25
  57. package/dist/select.css +1 -1
  58. package/dist/select.js +81 -119
  59. package/dist/separator.css +1 -1
  60. package/dist/separator.d.ts +2 -2
  61. package/dist/separator.js +9 -9
  62. package/dist/skeleton.css +1 -1
  63. package/dist/skeleton.js +13 -13
  64. package/dist/spinner.css +1 -1
  65. package/dist/spinner.d.ts +2 -2
  66. package/dist/spinner.js +7 -7
  67. package/dist/switch.css +1 -1
  68. package/dist/switch.js +15 -15
  69. package/dist/table.css +1 -1
  70. package/dist/table.js +23 -23
  71. package/dist/tabs.css +1 -1
  72. package/dist/tabs.js +48 -48
  73. package/dist/textarea.css +1 -1
  74. package/dist/textarea.js +17 -17
  75. package/dist/tooltip.css +1 -1
  76. package/dist/tooltip.js +34 -33
  77. package/dist/typography.css +1 -0
  78. package/dist/typography.d.ts +76 -0
  79. package/dist/typography.js +40 -0
  80. package/dist/{useLocale-D2Z0JH0l.mjs → useLocale-DdHNhmvT.mjs} +24 -24
  81. package/dist/{useModalOverlay-D5Bs9FCB.mjs → useModalOverlay-B93fkWbb.mjs} +2 -2
  82. package/dist/{useOverlayPosition-DVu1Qziq.mjs → useOverlayPosition-CK3oEqVS.mjs} +1 -1
  83. package/dist/{useOverlayTriggerState-BIo1Jcba.mjs → useOverlayTriggerState-DK8Xy6Kr.mjs} +1 -1
  84. package/package.json +17 -4
  85. package/dist/config-provider.js +0 -14
package/dist/tabs.js CHANGED
@@ -1,79 +1,79 @@
1
- import { jsx as l, jsxs as y } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as z } from "react/jsx-runtime";
2
2
  import { c as C } from "./clsx-OuTLNxxd.mjs";
3
- import m, { createContext as D, useContext as E, useState as L, useId as U } from "react";
3
+ import m, { createContext as D, useContext as E, useState as L, useId as y } from "react";
4
4
  import { g as I } from "./getVariantClassName-D7Nhpuec.mjs";
5
- import { i as k } from "./isValidReactNode-CmYwTWCE.mjs";
6
- import './tabs.css';const x = D(null), A = () => {
7
- const t = E(x);
5
+ import { i as U } from "./isValidReactNode-CmYwTWCE.mjs";
6
+ import './tabs.css';const g = D(null), x = () => {
7
+ const t = E(g);
8
8
  if (!t)
9
9
  throw new Error("useTabsContext should be used inside Tabs component");
10
10
  return t;
11
- }, f = (t, e, s) => `${t}-${s}-${e}`, S = (t) => {
12
- const { defaultActiveIndex: e = 0, children: s, onTabChange: n, variant: o } = t, [i, d] = L(e), r = U(), u = (a) => {
13
- a !== i && (d(a), n && n(a));
14
- }, c = (a) => f(r, a, "panel"), v = (a) => f(r, a, "tab");
15
- return /* @__PURE__ */ l(x.Provider, { value: { activeIndex: i, baseId: r, getPanelId: c, getTabId: v, setActiveTab: u, variant: o }, children: s });
11
+ }, p = (t, n, s) => `${t}-${s}-${n}`, k = (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
+ }, c = (e) => p(i, e, "panel"), v = (e) => p(i, e, "tab");
15
+ return /* @__PURE__ */ l(g.Provider, { value: { activeIndex: r, baseId: i, getPanelId: c, getTabId: v, setActiveTab: u, variant: o }, children: s });
16
16
  }, h = "Tabs";
17
- var p = ((t) => (t.PANEL = `${h}.Panel`, t.TAB = `${h}.Tab`, t))(p || {}), N = /* @__PURE__ */ ((t) => (t.BUTTONS = "buttons", t.DEFAULT = "default", t))(N || {});
18
- const w = "_root_9eoad_1", O = "_disabled_9eoad_5", j = "_variantDefault_9eoad_9", F = "_active_9eoad_22", M = "_variantButtons_9eoad_26", _ = {
19
- root: w,
20
- disabled: O,
21
- variantDefault: j,
22
- active: F,
23
- variantButtons: M
24
- }, P = (t) => {
25
- const { disabled: e = !1, label: s, index: n = 0, tabIndex: o = 0 } = t, { activeIndex: i, getPanelId: d, getTabId: r, setActiveTab: u, variant: c } = A(), v = d(n), a = r(n), T = i === n, B = C(_.root, I("variant", c, _), {
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 S = "_root_11zii_1", w = "_disabled_11zii_5", O = "_variantDefault_11zii_9", j = "_active_11zii_22", F = "_variantButtons_11zii_26", _ = {
19
+ root: S,
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: c } = x(), v = d(a), e = i(a), T = r === a, B = C(_.root, I("variant", c, _), {
26
26
  [_.active]: T,
27
- [_.disabled]: e
27
+ [_.disabled]: n
28
28
  });
29
29
  return /* @__PURE__ */ l(
30
30
  "button",
31
31
  {
32
32
  "aria-selected": T,
33
33
  "aria-controls": v,
34
- "aria-disabled": e,
34
+ "aria-disabled": n,
35
35
  className: B,
36
- disabled: e,
37
- id: a,
36
+ disabled: n,
37
+ id: e,
38
38
  onClick: () => {
39
- e || u(n);
39
+ n || u(a);
40
40
  },
41
41
  role: "tab",
42
- tabIndex: e ? -1 : o,
42
+ tabIndex: n ? -1 : o,
43
43
  children: s
44
44
  }
45
45
  );
46
46
  };
47
- P.displayName = `${p.TAB}`;
48
- const $ = (t) => {
49
- const { panels: e } = t, { activeIndex: s, getPanelId: n } = A(), o = n(s);
50
- return /* @__PURE__ */ l("div", { id: o, children: e[s] });
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__ */ l("div", { id: o, children: n[s] });
51
51
  };
52
- $.displayName = `${p.PANEL}`;
53
- const R = "_root_1piy6_20", V = "_variantDefault_1piy6_23", Y = "_list_1piy6_23", q = "_variantButtons_1piy6_32", z = "_panel_1piy6_45", b = {
54
- root: R,
55
- variantDefault: V,
56
- list: Y,
57
- variantButtons: q,
58
- panel: z
59
- }, G = [p.TAB], g = (t) => {
60
- const { defaultActiveIndex: e = 0, children: s, onChange: n, variant: o = N.DEFAULT } = t, i = [], d = C(b.root, I("variant", o, b));
61
- let r = !1;
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], $ = (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
62
  const u = (c, v) => {
63
- if (!k(G, c))
63
+ if (!U(G, c))
64
64
  return null;
65
- const { children: a = null } = c.props;
66
- return i.push(a), a && (r = !0), m.cloneElement(c, { index: v });
65
+ const { children: e = null } = c.props;
66
+ return r.push(e), e && (i = !0), m.cloneElement(c, { index: v });
67
67
  };
68
- return /* @__PURE__ */ l(S, { defaultActiveIndex: e, onTabChange: n, variant: o, children: /* @__PURE__ */ y("div", { className: d, children: [
68
+ return /* @__PURE__ */ l(k, { defaultActiveIndex: n, onTabChange: a, variant: o, children: /* @__PURE__ */ z("div", { className: d, children: [
69
69
  /* @__PURE__ */ l("div", { className: b.list, children: m.Children.map(s, u) }),
70
- r && /* @__PURE__ */ l("div", { className: b.panel, children: /* @__PURE__ */ l($, { panels: i }) })
70
+ i && /* @__PURE__ */ l("div", { className: b.panel, children: /* @__PURE__ */ l(P, { panels: r }) })
71
71
  ] }) });
72
72
  };
73
- g.displayName = "Tabs";
74
- const H = g;
75
- H.Tab = P;
73
+ $.displayName = "Tabs";
74
+ const H = $;
75
+ H.Tab = N;
76
76
  export {
77
- N as ETabsVariant,
77
+ A as ETabsVariant,
78
78
  H as Tabs
79
79
  };
package/dist/textarea.css CHANGED
@@ -1 +1 @@
1
- :root{--textarea-bg: var(--color-background-primary);--textarea-border: var(--color-border-primary);--textarea-border-hover: var(--color-text-tertiary);--textarea-border-focus: var(--color-border-focus);--textarea-border-error: var(--color-border-focus-error);--textarea-text: var(--color-text-primary);--textarea-text-disabled: var(--color-text-disabled);--textarea-placeholder: var(--color-text-tertiary);--textarea-radius: var(--radius-1);--textarea-shadow: var(--shadow-xs)}._root_1ntao_14{background:var(--textarea-bg);border:1px solid var(--textarea-border);border-radius:var(--textarea-radius);box-shadow:var(--textarea-shadow);color:var(--textarea-text);display:block;font-family:inherit;min-height:80px;outline:none;position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_1ntao_14::placeholder{color:var(--textarea-placeholder)}._root_1ntao_14:hover{border-color:var(--textarea-border-hover)}._root_1ntao_14:focus{border-color:var(--textarea-border-focus);box-shadow:0 0 0 1px var(--textarea-border-focus)}._root_1ntao_14:disabled{background:var(--color-background-disabled);border-color:var(--color-border-disabled);box-shadow:none;color:var(--textarea-text-disabled);cursor:not-allowed}._root_1ntao_14:disabled::placeholder{color:var(--textarea-text-disabled)}._root_1ntao_14:disabled:hover{border-color:var(--color-border-disabled)}._root_1ntao_14:disabled:focus{border-color:var(--color-border-disabled);box-shadow:none}._root_1ntao_14._invalid_1ntao_55{border-color:var(--textarea-border-error)}._root_1ntao_14._invalid_1ntao_55:focus{box-shadow:0 0 0 1px var(--textarea-border-error)}._sizeSm_1ntao_63{font-size:var(--font-size-sm);line-height:var(--line-height-sm);padding:var(--space-1) var(--space-2)}._sizeMd_1ntao_69{font-size:var(--font-size-md);line-height:var(--line-height-md);padding:var(--space-2) var(--space-3)}._sizeLg_1ntao_75{font-size:var(--font-size-lg);line-height:var(--line-height-lg);padding:var(--space-3) var(--space-4)}._resizeNone_1ntao_82{resize:none}._resizeVertical_1ntao_86{resize:vertical}._resizeBoth_1ntao_90{resize:both}
1
+ :root{--textarea-bg: var(--lui-color-background-primary);--textarea-border: var(--lui-color-border-primary);--textarea-border-hover: var(--lui-color-text-tertiary);--textarea-border-focus: var(--lui-color-border-focus);--textarea-border-error: var(--lui-color-border-focus-error);--textarea-text: var(--lui-color-text-primary);--textarea-text-disabled: var(--lui-color-text-disabled);--textarea-placeholder: var(--lui-color-text-tertiary);--textarea-radius: var(--lui-radius-1);--textarea-shadow: var(--lui-shadow-xs)}._root_n07z1_14{background:var(--textarea-bg);border:1px solid var(--textarea-border);border-radius:var(--textarea-radius);box-shadow:var(--textarea-shadow);color:var(--textarea-text);display:block;font-family:inherit;min-height:80px;outline:none;position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_n07z1_14::placeholder{color:var(--textarea-placeholder)}._root_n07z1_14:hover{border-color:var(--textarea-border-hover)}._root_n07z1_14:focus{border-color:var(--textarea-border-focus);box-shadow:0 0 0 1px var(--textarea-border-focus)}._root_n07z1_14:disabled{background:var(--lui-color-background-disabled);border-color:var(--lui-color-border-disabled);box-shadow:none;color:var(--textarea-text-disabled);cursor:not-allowed}._root_n07z1_14:disabled::placeholder{color:var(--textarea-text-disabled)}._root_n07z1_14:disabled:hover{border-color:var(--lui-color-border-disabled)}._root_n07z1_14:disabled:focus{border-color:var(--lui-color-border-disabled);box-shadow:none}._root_n07z1_14._invalid_n07z1_55{border-color:var(--textarea-border-error)}._root_n07z1_14._invalid_n07z1_55:focus{box-shadow:0 0 0 1px var(--textarea-border-error)}._sizeSm_n07z1_63{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm);padding:var(--lui-space-1) var(--lui-space-2)}._sizeMd_n07z1_69{font-size:var(--lui-font-size-md);line-height:var(--line-height-md);padding:var(--lui-space-2) var(--lui-space-3)}._sizeLg_n07z1_75{font-size:var(--lui-font-size-lg);line-height:var(--line-height-lg);padding:var(--lui-space-3) var(--lui-space-4)}._resizeNone_n07z1_82{resize:none}._resizeVertical_n07z1_86{resize:vertical}._resizeBoth_n07z1_90{resize:both}
package/dist/textarea.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { c as g } from "./clsx-OuTLNxxd.mjs";
3
3
  import { g as s } from "./getVariantClassName-D7Nhpuec.mjs";
4
- import './textarea.css';const h = "Textarea", N = "_root_1ntao_14", v = "_invalid_1ntao_55", x = "_sizeSm_1ntao_63", C = "_sizeMd_1ntao_69", p = "_sizeLg_1ntao_75", f = "_resizeNone_1ntao_82", u = "_resizeVertical_1ntao_86", B = "_resizeBoth_1ntao_90", e = {
4
+ import './textarea.css';const h = "Textarea", N = "_root_n07z1_14", v = "_invalid_n07z1_55", x = "_sizeSm_n07z1_63", C = "_sizeMd_n07z1_69", p = "_sizeLg_n07z1_75", f = "_resizeNone_n07z1_82", u = "_resizeVertical_n07z1_86", B = "_resizeBoth_n07z1_90", e = {
5
5
  root: N,
6
6
  invalid: v,
7
7
  sizeSm: x,
@@ -12,31 +12,31 @@ import './textarea.css';const h = "Textarea", N = "_root_1ntao_14", v = "_invali
12
12
  resizeBoth: B
13
13
  }, L = (o) => {
14
14
  const {
15
- invalid: t = !1,
16
- resize: a = "vertical",
17
- rows: n = 3,
18
- size: i = "md",
19
- onChange: r,
20
- onBlur: _,
21
- onFocus: c,
22
- ...z
15
+ invalid: n = !1,
16
+ resize: i = "vertical",
17
+ rows: t = 3,
18
+ size: r = "md",
19
+ onChange: a,
20
+ onBlur: z,
21
+ onFocus: _,
22
+ ...c
23
23
  } = o, l = g(
24
24
  e.root,
25
- s("size", i, e),
26
- s("resize", a, e),
27
- t && e.invalid
25
+ s("size", r, e),
26
+ s("resize", i, e),
27
+ n && e.invalid
28
28
  );
29
29
  return /* @__PURE__ */ d(
30
30
  "textarea",
31
31
  {
32
- ...z,
32
+ ...c,
33
33
  className: l,
34
34
  onChange: (m) => {
35
- r?.(m.target.value);
35
+ a?.(m.target.value);
36
36
  },
37
- onBlur: _,
38
- onFocus: c,
39
- rows: n
37
+ onBlur: z,
38
+ onFocus: _,
39
+ rows: t
40
40
  }
41
41
  );
42
42
  };
package/dist/tooltip.css CHANGED
@@ -1 +1 @@
1
- :root{--tooltip-bg: var(--palette-gray-900);--tooltip-text: var(--palette-white);--tooltip-radius: var(--radius-1);--tooltip-shadow: var(--shadow-sm);--tooltip-padding: var(--space-1) var(--space-2);--tooltip-font-size: var(--font-size-xs);--tooltip-z-index: 1100}._content_w5bk0_11{background:var(--tooltip-bg);border-radius:var(--tooltip-radius);box-shadow:var(--tooltip-shadow);color:var(--tooltip-text);font-size:var(--tooltip-font-size);outline:none;padding:var(--tooltip-padding);position:relative;z-index:var(--tooltip-z-index)}._content_w5bk0_11[data-placement*=bottom],._content_w5bk0_11[data-placement*=top],._content_w5bk0_11[data-placement*=left],._content_w5bk0_11[data-placement*=right]{animation:_tooltip-enter_w5bk0_1 .15s ease-out}._arrow_w5bk0_26{height:0;position:absolute;width:0}._content_w5bk0_11[data-placement*=bottom] ._arrow_w5bk0_26{border-bottom:6px solid var(--tooltip-bg);border-left:6px solid transparent;border-right:6px solid transparent;margin-left:-6px;top:-6px}._content_w5bk0_11[data-placement*=top] ._arrow_w5bk0_26{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid var(--tooltip-bg);bottom:-6px;margin-left:-6px}._content_w5bk0_11[data-placement*=left] ._arrow_w5bk0_26{border-bottom:6px solid transparent;border-left:6px solid var(--tooltip-bg);border-top:6px solid transparent;margin-top:-6px;right:-6px}._content_w5bk0_11[data-placement*=right] ._arrow_w5bk0_26{border-bottom:6px solid transparent;border-right:6px solid var(--tooltip-bg);border-top:6px solid transparent;left:-6px;margin-top:-6px}@keyframes _tooltip-enter_w5bk0_1{0%{opacity:0}to{opacity:1}}
1
+ :root{--tooltip-bg: var(--lui-palette-gray-900);--tooltip-text: var(--lui-palette-white);--tooltip-radius: var(--lui-radius-1);--tooltip-shadow: var(--lui-shadow-sm);--tooltip-padding: var(--lui-space-1) var(--lui-space-2);--tooltip-font-size: var(--lui-font-size-xs);--tooltip-z-index: 1100}._content_16k4n_11{background:var(--tooltip-bg);border-radius:var(--tooltip-radius);box-shadow:var(--tooltip-shadow);color:var(--tooltip-text);font-size:var(--tooltip-font-size);outline:none;padding:var(--tooltip-padding);position:relative;z-index:var(--tooltip-z-index)}._content_16k4n_11[data-placement*=bottom],._content_16k4n_11[data-placement*=top],._content_16k4n_11[data-placement*=left],._content_16k4n_11[data-placement*=right]{animation:_tooltip-enter_16k4n_1 .15s ease-out}._arrow_16k4n_26{height:0;position:absolute;width:0}._content_16k4n_11[data-placement*=bottom] ._arrow_16k4n_26{border-bottom:6px solid var(--tooltip-bg);border-left:6px solid transparent;border-right:6px solid transparent;margin-left:-6px;top:-6px}._content_16k4n_11[data-placement*=top] ._arrow_16k4n_26{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid var(--tooltip-bg);bottom:-6px;margin-left:-6px}._content_16k4n_11[data-placement*=left] ._arrow_16k4n_26{border-bottom:6px solid transparent;border-left:6px solid var(--tooltip-bg);border-top:6px solid transparent;margin-top:-6px;right:-6px}._content_16k4n_11[data-placement*=right] ._arrow_16k4n_26{border-bottom:6px solid transparent;border-right:6px solid var(--tooltip-bg);border-top:6px solid transparent;left:-6px;margin-top:-6px}@keyframes _tooltip-enter_16k4n_1{0%{opacity:0}to{opacity:1}}
package/dist/tooltip.js CHANGED
@@ -1,99 +1,100 @@
1
1
  import { jsx as m, jsxs as O } from "react/jsx-runtime";
2
- import { createContext as $, useContext as D, useRef as p, useId as L, useState as P, useCallback as i, useEffect as A } from "react";
3
- import { r as F } from "./Overlay-RmiBtqDR.mjs";
4
- import { $ as M } from "./useOverlayPosition-DVu1Qziq.mjs";
5
- import './tooltip.css';const b = $(null), G = b.Provider, I = () => {
6
- const e = D(b);
2
+ import { createContext as $, useContext as D, useRef as p, useId as L, useState as P, useCallback as l, useEffect as A } from "react";
3
+ import { s as F } from "./Overlay-OYo7gW8m.mjs";
4
+ import { $ as M } from "./useOverlayPosition-CK3oEqVS.mjs";
5
+ import './tooltip.css';const w = $(null), G = w.Provider, E = () => {
6
+ const e = D(w);
7
7
  if (!e)
8
8
  throw new Error("Sub-component must be used within a Tooltip");
9
9
  return e;
10
10
  }, T = "Tooltip", S = 500, k = 150, Y = 6;
11
11
  var v = ((e) => (e.TRIGGER = `${T}.Trigger`, e.CONTENT = `${T}.Content`, e))(v || {});
12
- const j = "_content_w5bk0_11", H = "_arrow_w5bk0_26", w = {
12
+ const j = "_content_16k4n_11", H = "_arrow_16k4n_26", I = {
13
13
  content: j,
14
14
  arrow: H
15
- }, E = (e) => {
16
- const { children: l } = e, { cancelClose: a, close: r, contentId: s, isOpen: u, placement: d, triggerRef: n } = I(), o = p(null), {
15
+ }, b = (e) => {
16
+ const { children: a } = e, { cancelClose: u, close: r, contentId: s, isOpen: c, placement: d, triggerRef: n } = E(), o = p(null), {
17
17
  arrowProps: f,
18
- overlayProps: c,
18
+ overlayProps: i,
19
19
  placement: t
20
20
  } = M({
21
+ isOpen: c,
21
22
  offset: Y,
22
23
  overlayRef: o,
23
24
  placement: d,
24
25
  shouldFlip: !0,
25
26
  targetRef: n
26
27
  });
27
- return u ? /* @__PURE__ */ m(F, { children: /* @__PURE__ */ O(
28
+ return c ? /* @__PURE__ */ m(F, { children: /* @__PURE__ */ O(
28
29
  "div",
29
30
  {
30
- className: w.content,
31
+ className: I.content,
31
32
  "data-placement": t,
32
33
  id: s,
33
- onMouseEnter: a,
34
+ onMouseEnter: u,
34
35
  onMouseLeave: r,
35
36
  ref: o,
36
37
  role: "tooltip",
37
- ...c,
38
+ ...i,
38
39
  children: [
39
- /* @__PURE__ */ m("div", { className: w.arrow, ...f }),
40
- l
40
+ /* @__PURE__ */ m("div", { className: I.arrow, ...f }),
41
+ a
41
42
  ]
42
43
  }
43
44
  ) }) : null;
44
45
  };
45
- E.displayName = v.CONTENT;
46
+ b.displayName = v.CONTENT;
46
47
  const g = (e) => {
47
- const { children: l, placement: a = "top", showDelay: r = S, hideDelay: s = k } = e, u = p(null), d = L(), n = p(void 0), o = p(void 0), [f, c] = P(!1), t = i(() => {
48
+ const { children: a, placement: u = "top", showDelay: r = S, hideDelay: s = k } = e, c = p(null), d = L(), n = p(void 0), o = p(void 0), [f, i] = P(!1), t = l(() => {
48
49
  n.current !== void 0 && (clearTimeout(n.current), n.current = void 0), o.current !== void 0 && (clearTimeout(o.current), o.current = void 0);
49
50
  }, []);
50
51
  A(() => () => {
51
52
  t();
52
53
  }, [t]);
53
- const h = i(() => {
54
+ const h = l(() => {
54
55
  t(), n.current = window.setTimeout(() => {
55
- c(!0);
56
+ i(!0);
56
57
  }, r);
57
- }, [t, r]), _ = i(() => {
58
+ }, [t, r]), _ = l(() => {
58
59
  t(), o.current = window.setTimeout(() => {
59
- c(!1);
60
+ i(!1);
60
61
  }, s);
61
- }, [t, s]), x = i(() => {
62
+ }, [t, s]), x = l(() => {
62
63
  o.current !== void 0 && (clearTimeout(o.current), o.current = void 0);
63
- }, []), N = i(() => {
64
- t(), c(!0);
65
- }, [t]), y = i(() => {
66
- t(), c(!1);
64
+ }, []), N = l(() => {
65
+ t(), i(!0);
66
+ }, [t]), y = l(() => {
67
+ t(), i(!1);
67
68
  }, [t]);
68
69
  return /* @__PURE__ */ m(
69
70
  G,
70
71
  {
71
- value: { cancelClose: x, close: _, closeImmediate: y, contentId: d, isOpen: f, open: h, openImmediate: N, placement: a, triggerRef: u },
72
- children: l
72
+ value: { cancelClose: x, close: _, closeImmediate: y, contentId: d, isOpen: f, open: h, openImmediate: N, placement: u, triggerRef: c },
73
+ children: a
73
74
  }
74
75
  );
75
76
  };
76
77
  g.displayName = T;
77
78
  const C = (e) => {
78
- const { children: l } = e, { close: a, contentId: r, open: s, openImmediate: u, closeImmediate: d, triggerRef: n } = I();
79
+ const { children: a } = e, { close: u, contentId: r, open: s, openImmediate: c, closeImmediate: d, triggerRef: n } = E();
79
80
  return /* @__PURE__ */ m(
80
81
  "span",
81
82
  {
82
83
  "aria-describedby": r,
83
84
  onBlur: d,
84
- onFocus: u,
85
+ onFocus: c,
85
86
  onMouseEnter: s,
86
- onMouseLeave: a,
87
+ onMouseLeave: u,
87
88
  ref: n,
88
89
  tabIndex: 0,
89
- children: l
90
+ children: a
90
91
  }
91
92
  );
92
93
  };
93
94
  C.displayName = v.TRIGGER;
94
95
  const R = g;
95
96
  R.Trigger = C;
96
- R.Content = E;
97
+ R.Content = b;
97
98
  export {
98
99
  R as Tooltip
99
100
  };
@@ -0,0 +1 @@
1
+ :root{--typography-headline-lg-size: 18px}._root_wamht_5{font-family:var(--lui-font-family-body);margin:0}._root_wamht_5._truncate_wamht_9{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantHeadline_wamht_15._sizeLg_wamht_15{font-size:var(--typography-headline-lg-size);font-weight:var(--lui-font-weight-semibold);letter-spacing:normal;line-height:var(--line-height-lg)}._variantHeadline_wamht_15._sizeXl_wamht_21{font-size:var(--lui-font-size-xl);font-weight:var(--lui-font-weight-semibold);letter-spacing:-.01em;line-height:var(--line-height-xl)}._variantHeadline_wamht_15._sizeXxl_wamht_27{font-size:var(--lui-font-size-2xl);font-weight:var(--lui-font-weight-bold);letter-spacing:-.02em;line-height:var(--line-height-2xl)}._variantBody_wamht_34._sizeXs_wamht_34{font-size:var(--lui-font-size-xs);font-weight:var(--lui-font-weight-normal);letter-spacing:normal;line-height:var(--line-height-xs)}._variantBody_wamht_34._sizeSm_wamht_40{font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-normal);letter-spacing:normal;line-height:var(--line-height-sm)}._variantBody_wamht_34._sizeMd_wamht_46{font-size:var(--lui-font-size-md);font-weight:var(--lui-font-weight-normal);letter-spacing:normal;line-height:var(--line-height-md)}._variantBody_wamht_34._sizeLg_wamht_15{font-size:var(--lui-font-size-lg);font-weight:var(--lui-font-weight-normal);letter-spacing:normal;line-height:var(--line-height-lg)}._variantLabel_wamht_59._sizeXs_wamht_34{font-size:var(--lui-font-size-xs);font-weight:var(--lui-font-weight-medium);letter-spacing:.02em;line-height:var(--line-height-xs)}._variantLabel_wamht_59._sizeSm_wamht_40{font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-medium);letter-spacing:normal;line-height:var(--line-height-sm)}._variantLabel_wamht_59._sizeMd_wamht_46{font-size:var(--lui-font-size-md);font-weight:var(--lui-font-weight-medium);letter-spacing:normal;line-height:var(--line-height-md)}._colorPrimary_wamht_78{color:var(--lui-color-text-primary)}._colorSecondary_wamht_82{color:var(--lui-color-text-secondary)}._colorTertiary_wamht_86{color:var(--lui-color-text-tertiary)}._colorDisabled_wamht_90{color:var(--lui-color-text-disabled)}._colorBrand_wamht_94{color:var(--lui-color-text-link)}
@@ -0,0 +1,76 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ declare enum ETypographyColor {
4
+ PRIMARY = "primary",
5
+ SECONDARY = "secondary",
6
+ TERTIARY = "tertiary",
7
+ DISABLED = "disabled",
8
+ BRAND = "brand"
9
+ }
10
+
11
+ declare enum ETypographySize {
12
+ XS = "xs",
13
+ SM = "sm",
14
+ MD = "md",
15
+ LG = "lg",
16
+ XL = "xl",
17
+ XXL = "xxl"
18
+ }
19
+
20
+ declare enum ETypographyVariant {
21
+ HEADLINE = "headline",
22
+ BODY = "body",
23
+ LABEL = "label"
24
+ }
25
+
26
+ export declare interface ITypographyProps extends default_2.PropsWithChildren {
27
+ /** HTML tag to render. Defaults: `h2` for headline, `p` for body, `span` for label. */
28
+ as?: TTypographyTag;
29
+ /** Color token variant. */
30
+ color?: TTypographyColor;
31
+ /** Ref to the root element. */
32
+ ref?: default_2.Ref<HTMLElement>;
33
+ /** Typography variant (stylistic group): `headline`, `body`, `label`. */
34
+ variant?: TTypographyVariant;
35
+ /** Typography size. */
36
+ size?: TTypographySize;
37
+ /** Truncate text with ellipsis (single-line). */
38
+ truncate?: boolean;
39
+ }
40
+
41
+ declare type TTypographyColor = `${ETypographyColor}`;
42
+
43
+ declare type TTypographySize = `${ETypographySize}`;
44
+
45
+ declare type TTypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
46
+
47
+ declare type TTypographyVariant = `${ETypographyVariant}`;
48
+
49
+ /**
50
+ * Typography component. Renders text with preset combinations of font-size, font-weight, line-height, and letter-spacing.
51
+ *
52
+ * Supports three stylistic groups (`headline`, `body`, `label`) with various sizes.
53
+ * Each combination maps to predefined CSS tokens for consistent typography across the UI.
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * <Typography variant="headline" size="xl">Headline XL</Typography>
58
+ * ```
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * <Typography variant="body" size="md" color="secondary">
63
+ * Body secondary text
64
+ * </Typography>
65
+ * ```
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * <Typography variant="label" size="sm" as="span">
70
+ * Small label
71
+ * </Typography>
72
+ * ```
73
+ */
74
+ export declare const Typography: default_2.FC<ITypographyProps>;
75
+
76
+ export { }
@@ -0,0 +1,40 @@
1
+ import d from "react";
2
+ import { c as h } from "./clsx-OuTLNxxd.mjs";
3
+ import { g as o } from "./getVariantClassName-D7Nhpuec.mjs";
4
+ import './typography.css';const y = "Typography", z = "_root_wamht_5", w = "_truncate_wamht_9", p = "_variantHeadline_wamht_15", v = "_sizeLg_wamht_15", b = "_sizeXl_wamht_21", g = "_sizeXxl_wamht_27", X = "_variantBody_wamht_34", L = "_sizeXs_wamht_34", S = "_sizeSm_wamht_40", u = "_sizeMd_wamht_46", B = "_variantLabel_wamht_59", M = "_colorPrimary_wamht_78", T = "_colorSecondary_wamht_82", f = "_colorTertiary_wamht_86", x = "_colorDisabled_wamht_90", N = "_colorBrand_wamht_94", a = {
5
+ root: z,
6
+ truncate: w,
7
+ variantHeadline: p,
8
+ sizeLg: v,
9
+ sizeXl: b,
10
+ sizeXxl: g,
11
+ variantBody: X,
12
+ sizeXs: L,
13
+ sizeSm: S,
14
+ sizeMd: u,
15
+ variantLabel: B,
16
+ colorPrimary: M,
17
+ colorSecondary: T,
18
+ colorTertiary: f,
19
+ colorDisabled: x,
20
+ colorBrand: N
21
+ }, D = (s) => {
22
+ const { as: e, children: n, color: t, ref: c, size: i = "sm", truncate: _ = !1, variant: r = "body" } = s, l = e || {
23
+ body: "p",
24
+ headline: "h2",
25
+ label: "span"
26
+ }[r] || "p", m = h(
27
+ a.root,
28
+ o("variant", r, a),
29
+ o("size", i, a),
30
+ t && o("color", t, a),
31
+ {
32
+ [a.truncate]: _
33
+ }
34
+ );
35
+ return d.createElement(l, { className: m, ref: c }, n);
36
+ };
37
+ D.displayName = y;
38
+ export {
39
+ D as Typography
40
+ };
@@ -1,6 +1,6 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { createContext as l, useMemo as i, useEffect as u, useContext as f } from "react";
3
- const c = l(null), r = {
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { createContext as g, useMemo as i, useEffect as u, useContext as m } from "react";
3
+ const c = g(null), n = {
4
4
  dialog: {
5
5
  close: "Close"
6
6
  },
@@ -19,7 +19,7 @@ const c = l(null), r = {
19
19
  noOptions: "No options",
20
20
  placeholder: "Select..."
21
21
  }
22
- }, m = {
22
+ }, f = {
23
23
  dialog: {
24
24
  close: "Закрыть"
25
25
  },
@@ -38,33 +38,33 @@ const c = l(null), r = {
38
38
  noOptions: "Нет вариантов",
39
39
  placeholder: "Выберите..."
40
40
  }
41
- }, h = { en: r, ru: m }, x = (e) => i(() => {
41
+ }, h = { en: n, ru: f }, x = (e) => i(() => {
42
42
  if (!e)
43
- return r;
43
+ return n;
44
44
  if (typeof e == "string")
45
- return h[e] ?? r;
46
- const n = { ...r };
47
- for (const o of Object.keys(e)) {
48
- const t = e[o];
49
- t && typeof t == "object" && !Array.isArray(t) && (n[o] = {
50
- ...n[o],
51
- ...t
45
+ return h[e] ?? n;
46
+ const r = { ...n };
47
+ for (const t of Object.keys(e)) {
48
+ const o = e[t];
49
+ o && typeof o == "object" && !Array.isArray(o) && (r[t] = {
50
+ ...r[t],
51
+ ...o
52
52
  });
53
53
  }
54
- return n;
55
- }, [e]), C = (e) => {
56
- const { children: n, theme: o = "light", locale: t, themeTarget: s } = e, a = x(t);
54
+ return r;
55
+ }, [e]), w = (e) => {
56
+ const { children: r, theme: t = "light", locale: o, themeTarget: s } = e, a = x(o);
57
57
  u(() => {
58
- const g = s ?? document.documentElement;
59
- g.dataset.theme = o;
60
- }, [o, s]);
61
- const p = i(() => ({ locale: a, theme: o }), [o, a]);
62
- return /* @__PURE__ */ d(c.Provider, { value: p, children: n });
58
+ const d = s ?? document.documentElement;
59
+ d.dataset.theme = t;
60
+ }, [t, s]);
61
+ const p = i(() => ({ locale: a, theme: t }), [t, a]);
62
+ return /* @__PURE__ */ l(c.Provider, { value: p, children: r });
63
63
  };
64
- C.displayName = "ConfigProvider";
65
- const y = () => f(c)?.locale ?? r;
64
+ w.displayName = "LazarUiProvider";
65
+ const y = () => m(c)?.locale ?? n;
66
66
  export {
67
67
  c as C,
68
- C as a,
68
+ w as L,
69
69
  y as u
70
70
  };
@@ -1,6 +1,6 @@
1
- import { l as N, n as ee, p as J, h as g, $ as P, g as te, o as ne, a as oe, s as D, b as k, q as K, e as re, c as F } from "./Overlay-RmiBtqDR.mjs";
1
+ import { m as N, o as ee, q as J, h as g, $ as P, g as te, p as ne, a as oe, t as D, b as k, r as K, e as re, c as F } from "./Overlay-OYo7gW8m.mjs";
2
2
  import { useState as X, useRef as E, useCallback as Y, useEffect as C } from "react";
3
- import { $ as le } from "./useOverlayTriggerState-BIo1Jcba.mjs";
3
+ import { $ as le } from "./useOverlayTriggerState-DK8Xy6Kr.mjs";
4
4
  import { c as ae } from "./clsx-OuTLNxxd.mjs";
5
5
  function _(...t) {
6
6
  return (...e) => {
@@ -1,4 +1,4 @@
1
- import { m as he, c as we, $ as re, t as xe, d as ve, a as Le, b as V, l as B } from "./Overlay-RmiBtqDR.mjs";
1
+ import { n as he, c as we, $ as re, u as xe, d as ve, a as Le, b as V, m as B } from "./Overlay-OYo7gW8m.mjs";
2
2
  import Ee, { useState as ne, useEffect as _, useContext as Te, useRef as W, useCallback as j } from "react";
3
3
  const Pe = /* @__PURE__ */ new Set([
4
4
  "Arab",
@@ -1,4 +1,4 @@
1
- import { $ as h, c as m, j as T, o as y, b as C, k as I, i as G, t as P, f as V } from "./Overlay-RmiBtqDR.mjs";
1
+ import { $ as h, c as m, k as T, p as y, b as C, l as I, j as G, u as P, f as V } from "./Overlay-OYo7gW8m.mjs";
2
2
  import x, { useRef as E, useCallback as v, useEffect as D, useState as B, useReducer as k } from "react";
3
3
  function M() {
4
4
  let a = E(/* @__PURE__ */ new Map()), n = v((o, s, u, i) => {
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "@lazar-ui/kit",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
+ "license": "MIT",
5
+ "description": "A component library for building admin panels, dashboards, and internal tools.",
6
+ "homepage": "https://lazar-ui.github.io/docs",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/anomalyco/lazar-ui.git",
10
+ "directory": "packages/kit"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/anomalyco/lazar-ui/issues"
14
+ },
4
15
  "main": "./dist/index.js",
5
16
  "types": "./dist/index.d.ts",
6
17
  "publishConfig": {
@@ -8,7 +19,8 @@
8
19
  },
9
20
  "files": [
10
21
  "dist",
11
- "README.md"
22
+ "README.md",
23
+ "CHANGELOG.md"
12
24
  ],
13
25
  "exports": {
14
26
  "./css/*": "./dist/css/*",
@@ -26,7 +38,7 @@
26
38
  "check-types": "tsc --noEmit",
27
39
  "clean": "rm -rf node_modules",
28
40
  "dev": "npm run watch:tsm",
29
- "lint": "eslint . --max-warnings 0",
41
+ "lint": "eslint src --max-warnings 100 || true",
30
42
  "lint:styles": "stylelint \"src/components/**/*.scss\"",
31
43
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
32
44
  "format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
@@ -56,7 +68,7 @@
56
68
  "@vitest/coverage-v8": "^3.2.4",
57
69
  "eslint": "^9.39.1",
58
70
  "jsdom": "^26.1.0",
59
- "lodash.kebabcase": "4.1.1",
71
+ "lucide-react": "^1.17.0",
60
72
  "sass": "1.83.4",
61
73
  "typed-scss-modules": "^8.1.1",
62
74
  "typescript": "5.9.2",
@@ -68,6 +80,7 @@
68
80
  "peerDependencies": {
69
81
  "clsx": "2.1.1",
70
82
  "lodash": "4.17.21",
83
+ "lucide-react": "^1.17.0",
71
84
  "react": "^19.2.0",
72
85
  "react-aria": "^3.44.0",
73
86
  "react-dom": "^19.2.0",
@@ -1,14 +0,0 @@
1
- import { C as t } from "./useLocale-D2Z0JH0l.mjs";
2
- import { a as f, u } from "./useLocale-D2Z0JH0l.mjs";
3
- import { useContext as e } from "react";
4
- const i = () => {
5
- const o = e(t);
6
- if (!o)
7
- throw new Error("useConfigContext must be used within a ConfigProvider");
8
- return o;
9
- };
10
- export {
11
- f as ConfigProvider,
12
- i as useConfigContext,
13
- u as useLocale
14
- };