@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
@@ -1,52 +1,53 @@
1
- import { jsx as c, jsxs as C } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as C } from "react/jsx-runtime";
2
2
  import T, { cloneElement as S } from "react";
3
- import { i as A } from "./isValidReactNode-CmYwTWCE.mjs";
3
+ import { i as f } from "./isValidReactNode-CmYwTWCE.mjs";
4
4
  import "./camelCase-PtIYufW8.mjs";
5
- import { c as h } from "./clsx-OuTLNxxd.mjs";
5
+ import { c as A } from "./clsx-OuTLNxxd.mjs";
6
+ import { I as x } from "./Icon-flib0kme.mjs";
6
7
  import { g as u } from "./getComponentSlots-DwAYUFNk.mjs";
7
8
  import './empty-state.css';const l = "EmptyState";
8
9
  var o = ((t) => (t.ACTIONS = `${l}.Actions`, t.CONTENT = `${l}.Content`, t))(o || {});
9
- const E = "_actions_1pohs_1", O = {
10
- actions: E
10
+ const v = "_actions_dl9xv_1", E = {
11
+ actions: v
11
12
  }, p = ({ children: t }) => {
12
- const s = T.Children.toArray(t), r = s.map((n, e) => {
13
- if (!A("Button", n))
13
+ const s = T.Children.toArray(t), r = s.map((n, c) => {
14
+ if (!f("Button", n))
14
15
  return n;
15
16
  const i = n.props.variant;
16
17
  return S(n, {
17
- key: e,
18
- ...i ? {} : { variant: i ?? (e === 0 ? "primary" : "secondary") }
18
+ key: c,
19
+ ...i ? {} : { variant: i ?? (c === 0 ? "primary" : "secondary") }
19
20
  });
20
21
  });
21
- return s.length === 0 ? null : /* @__PURE__ */ c("div", { className: O.actions, children: r });
22
+ return s.length === 0 ? null : /* @__PURE__ */ e("div", { className: E.actions, children: r });
22
23
  };
23
24
  p.displayName = o.ACTIONS;
24
- const v = "_content_laixm_1", f = {
25
- content: v
26
- }, N = (t) => {
25
+ const O = "_content_laixm_1", h = {
26
+ content: O
27
+ }, d = (t) => {
27
28
  const { children: s } = t;
28
- return /* @__PURE__ */ c("div", { className: f.content, children: s });
29
+ return /* @__PURE__ */ e("div", { className: h.content, children: s });
29
30
  };
30
- N.displayName = o.CONTENT;
31
- const I = "_root_131ay_5", $ = "_icon_131ay_14", x = "_title_131ay_20", g = "_description_131ay_28", a = {
31
+ d.displayName = o.CONTENT;
32
+ const I = "_root_1fqx3_5", $ = "_icon_1fqx3_14", g = "_title_1fqx3_20", q = "_description_1fqx3_28", a = {
32
33
  root: I,
33
34
  icon: $,
34
- title: x,
35
- description: g
36
- }, L = [o.ACTIONS, o.CONTENT], d = (t) => {
37
- const { children: s, description: r, icon: n, title: e } = t, i = h(a.root), { [o.ACTIONS]: m, [o.CONTENT]: y } = u(s, L);
35
+ title: g,
36
+ description: q
37
+ }, L = [o.ACTIONS, o.CONTENT], N = (t) => {
38
+ const { children: s, description: r, icon: n, title: c } = t, i = A(a.root), { [o.ACTIONS]: m, [o.CONTENT]: y } = u(s, L);
38
39
  return /* @__PURE__ */ C("div", { className: i, children: [
39
- n && /* @__PURE__ */ c("div", { className: a.icon, children: n }),
40
- e && /* @__PURE__ */ c("h3", { className: a.title, children: e }),
41
- r && /* @__PURE__ */ c("p", { className: a.description, children: r }),
40
+ n && /* @__PURE__ */ e("div", { className: a.icon, children: /* @__PURE__ */ e(x, { name: n, size: 48 }) }),
41
+ c && /* @__PURE__ */ e("h3", { className: a.title, children: c }),
42
+ r && /* @__PURE__ */ e("p", { className: a.description, children: r }),
42
43
  y,
43
44
  m
44
45
  ] });
45
46
  };
46
- d.displayName = l;
47
- const _ = d;
47
+ N.displayName = l;
48
+ const _ = N;
48
49
  _.Actions = p;
49
- _.Content = N;
50
+ _.Content = d;
50
51
  export {
51
52
  _ as EmptyState
52
53
  };
@@ -1 +1 @@
1
- ._root_1q4b8_1{align-items:center;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-10) var(--space-5);text-align:center}._title_1q4b8_10{color:var(--color-text-primary);font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold);line-height:var(--line-height-lg);margin:0}._description_1q4b8_18{color:var(--color-text-secondary);font-size:var(--font-size-sm);line-height:var(--line-height-sm);margin:0;max-width:400px}
1
+ ._root_n01v7_1{align-items:center;display:flex;flex-direction:column;gap:var(--lui-space-2);padding:var(--lui-space-10) var(--lui-space-5);text-align:center}._title_n01v7_10{color:var(--lui-color-text-primary);font-size:var(--lui-font-size-lg);font-weight:var(--lui-font-weight-semibold);line-height:var(--line-height-lg);margin:0}._description_n01v7_18{color:var(--lui-color-text-secondary);font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm);margin:0;max-width:400px}
@@ -1,17 +1,17 @@
1
1
  import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
- import i from "react";
3
- import './error-boundary.css';const n = "ErrorBoundary", a = "_root_1q4b8_1", c = "_title_1q4b8_10", p = "_description_1q4b8_18", e = {
2
+ import n from "react";
3
+ import './error-boundary.css';const i = "ErrorBoundary", a = "_root_n01v7_1", c = "_title_n01v7_10", h = "_description_n01v7_18", e = {
4
4
  root: a,
5
5
  title: c,
6
- description: p
6
+ description: h
7
7
  };
8
- class u extends i.Component {
9
- static displayName = n;
8
+ class u extends n.Component {
9
+ static displayName = i;
10
10
  constructor(r) {
11
- super(r), this.state = { hasError: !1, error: null };
11
+ super(r), this.state = { error: null, hasError: !1 };
12
12
  }
13
13
  static getDerivedStateFromError(r) {
14
- return { hasError: !0, error: r };
14
+ return { error: r, hasError: !0 };
15
15
  }
16
16
  componentDidCatch(r, t) {
17
17
  this.props.onError?.(r, t);
@@ -20,13 +20,13 @@ class u extends i.Component {
20
20
  this.props.resetKey !== void 0 && this.props.resetKey !== r.resetKey && this.handleReset();
21
21
  }
22
22
  handleReset = () => {
23
- this.setState({ hasError: !1, error: null });
23
+ this.setState({ error: null, hasError: !1 });
24
24
  };
25
25
  render() {
26
26
  if (!this.state.hasError)
27
27
  return this.props.children;
28
28
  const { fallback: r } = this.props, { error: t } = this.state;
29
- return r !== void 0 ? typeof r == "function" ? r(t, this.handleReset) : r : /* @__PURE__ */ o("div", { className: e.root, children: [
29
+ return r !== void 0 && this.state.error !== null ? typeof r == "function" ? r(this.state.error, this.handleReset) : r : /* @__PURE__ */ o("div", { className: e.root, children: [
30
30
  /* @__PURE__ */ s("h3", { className: e.title, children: "Something went wrong" }),
31
31
  /* @__PURE__ */ s("p", { className: e.description, children: t?.message ?? "An unexpected error occurred." })
32
32
  ] });
package/dist/flex.js CHANGED
@@ -36,8 +36,8 @@ const z = (n) => {
36
36
  gap: o,
37
37
  grow: u,
38
38
  id: w,
39
- justify: s,
40
- px: l,
39
+ justify: l,
40
+ px: s,
41
41
  py: r,
42
42
  shrink: m,
43
43
  style: d,
@@ -46,7 +46,7 @@ const z = (n) => {
46
46
  e.root,
47
47
  i("direction", a),
48
48
  t != null && i("align", t),
49
- s != null && i("justify", s),
49
+ l != null && i("justify", l),
50
50
  f && e.wrap,
51
51
  p && e.fullWidth,
52
52
  u && e.grow,
@@ -58,9 +58,9 @@ const z = (n) => {
58
58
  className: y,
59
59
  id: w,
60
60
  style: {
61
- "--flex-gap": o != null ? `var(--space-${o})` : void 0,
62
- "--flex-px": l != null ? `var(--space-${l})` : void 0,
63
- "--flex-py": r != null ? `var(--space-${r})` : void 0,
61
+ "--flex-gap": o != null ? `var(--lui-space-${o})` : void 0,
62
+ "--flex-px": s != null ? `var(--lui-space-${s})` : void 0,
63
+ "--flex-py": r != null ? `var(--lui-space-${r})` : void 0,
64
64
  ...d
65
65
  },
66
66
  children: _
@@ -1 +1 @@
1
- :root{--formfield-gap: var(--space-1)}._root_pcv8m_5{display:flex;flex-direction:column;gap:var(--space-1)}._label_pcv8m_11{color:var(--color-text-primary);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:var(--line-height-sm)}._required_pcv8m_18{color:var(--color-text-error)}._error_pcv8m_22{color:var(--color-text-error);font-size:var(--font-size-xs);line-height:var(--line-height-xs);margin:0}
1
+ :root{--formfield-gap: var(--lui-space-1)}._root_1vp6v_5{display:flex;flex-direction:column;gap:var(--lui-space-1)}._label_1vp6v_11{color:var(--lui-color-text-primary);font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-medium);line-height:var(--line-height-sm)}._required_1vp6v_18{color:var(--lui-color-text-error)}._error_1vp6v_22{color:var(--lui-color-text-error);font-size:var(--lui-font-size-xs);line-height:var(--line-height-xs);margin:0}
@@ -1,22 +1,22 @@
1
1
  import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
2
  import { c as n } from "./clsx-OuTLNxxd.mjs";
3
- import './form-field.css';const d = "FormField", m = "_root_pcv8m_5", _ = "_label_pcv8m_11", p = "_required_pcv8m_18", u = "_error_pcv8m_22", r = {
4
- root: m,
5
- label: _,
3
+ import './form-field.css';const d = "FormField", _ = "_root_1vp6v_5", m = "_label_1vp6v_11", p = "_required_1vp6v_18", v = "_error_1vp6v_22", r = {
4
+ root: _,
5
+ label: m,
6
6
  required: p,
7
- error: u
8
- }, N = (a) => {
9
- const { children: c, error: e, label: o, required: t = !1 } = a, i = n(r.root);
7
+ error: v
8
+ }, u = (a) => {
9
+ const { children: t, error: e, label: o, required: c = !1 } = a, i = n(r.root);
10
10
  return /* @__PURE__ */ l("div", { className: i, children: [
11
11
  o && /* @__PURE__ */ l("label", { className: r.label, children: [
12
12
  o,
13
- t && /* @__PURE__ */ s("span", { className: r.required, "aria-hidden": "true", children: " *" })
13
+ c && /* @__PURE__ */ s("span", { className: r.required, "aria-hidden": "true", children: " *" })
14
14
  ] }),
15
- c,
15
+ t,
16
16
  e && /* @__PURE__ */ s("p", { className: r.error, role: "alert", children: e })
17
17
  ] });
18
18
  };
19
- N.displayName = d;
19
+ u.displayName = d;
20
20
  export {
21
- N as FormField
21
+ u as FormField
22
22
  };
package/dist/icon.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Icon component. Renders a Lucide SVG icon by name.
5
+ * Supports sizing, coloring, and custom stroke width.
6
+ * Returns `null` for unknown icon names.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <Icon name="search" />
11
+ * <Icon name="user" size={24} color="red" />
12
+ * <Icon name="x" ariaLabel="Close" />
13
+ * ```
14
+ */
15
+ export declare const Icon: default_2.FC<IIconProps>;
16
+
17
+ export declare interface IIconProps {
18
+ /** Icon name. Full list: https://lucide.dev/icons */
19
+ name: string;
20
+ /** Icon size (px). Default: 16. */
21
+ size?: number;
22
+ /** Stroke color. Default: 'currentColor'. */
23
+ color?: string;
24
+ /** Stroke width. Default: 2. */
25
+ strokeWidth?: number;
26
+ /** Semantic aria-label. Default: name. */
27
+ ariaLabel?: string;
28
+ }
29
+
30
+ export { }
package/dist/icon.js ADDED
@@ -0,0 +1,4 @@
1
+ import { I } from "./Icon-flib0kme.mjs";
2
+ export {
3
+ I as Icon
4
+ };
package/dist/input.css CHANGED
@@ -1 +1 @@
1
- :root{--input-bg: var(--color-background-primary);--input-bg-hover: var(--color-background-secondary);--input-border: var(--color-border-primary);--input-border-hover: var(--color-text-tertiary);--input-border-focus: var(--color-border-focus);--input-border-error: var(--color-border-focus-error);--input-text: var(--color-text-primary);--input-text-disabled: var(--color-text-disabled);--input-placeholder: var(--color-text-tertiary);--input-icon: var(--color-text-tertiary);--input-radius: var(--radius-1);--input-shadow: var(--shadow-xs);--input-gap: var(--space-2)}._root_p1h72_17{align-items:center;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--input-shadow);display:inline-flex;gap:var(--input-gap);position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_p1h72_17:hover{border-color:var(--input-border-hover)}._root_p1h72_17:focus-within{border-color:var(--input-border-focus);box-shadow:0 0 0 1px var(--input-border-focus)}._root_p1h72_17._invalid_p1h72_36{border-color:var(--input-border-error)}._root_p1h72_17._invalid_p1h72_36:focus-within{box-shadow:0 0 0 1px var(--input-border-error)}._root_p1h72_17._disabled_p1h72_42{background:var(--color-background-disabled);border-color:var(--color-border-disabled);box-shadow:none;cursor:not-allowed}._root_p1h72_17._disabled_p1h72_42:hover{border-color:var(--color-border-disabled)}._root_p1h72_17._disabled_p1h72_42:focus-within{border-color:var(--color-border-disabled);box-shadow:none}._sizeSm_p1h72_56{padding:var(--space-1) var(--space-2)}._sizeMd_p1h72_60{padding:var(--space-2) var(--space-3)}._sizeLg_p1h72_64{padding:var(--space-3) var(--space-4)}._control_p1h72_68{background:none;border:none;color:var(--input-text);flex:1;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0;outline:none;padding:0}._control_p1h72_68::placeholder{color:var(--input-placeholder)}._control_p1h72_68:disabled{color:var(--input-text-disabled);cursor:not-allowed}._control_p1h72_68:disabled::placeholder{color:var(--input-text-disabled)}._control_p1h72_68[type=number]::-webkit-outer-spin-button,._control_p1h72_68[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}._control_p1h72_68[type=number]{appearance:textfield}._before_p1h72_99,._after_p1h72_100{align-items:center;color:var(--input-icon);display:flex;flex-shrink:0;line-height:0}._togglePassword_p1h72_108{align-items:center;background:none;border:none;color:var(--input-icon);cursor:pointer;display:flex;flex-shrink:0;line-height:0;padding:0}._togglePassword_p1h72_108:hover{color:var(--color-text-secondary)}._sizeSm_p1h72_56 ._control_p1h72_68{font-size:var(--font-size-sm);line-height:var(--line-height-sm)}._sizeSm_p1h72_56 ._before_p1h72_99,._sizeSm_p1h72_56 ._after_p1h72_100,._sizeSm_p1h72_56 ._togglePassword_p1h72_108{height:14px;width:14px}._sizeMd_p1h72_60 ._control_p1h72_68{font-size:var(--font-size-md);line-height:var(--line-height-md)}._sizeMd_p1h72_60 ._before_p1h72_99,._sizeMd_p1h72_60 ._after_p1h72_100,._sizeMd_p1h72_60 ._togglePassword_p1h72_108{height:16px;width:16px}._sizeLg_p1h72_64 ._control_p1h72_68{font-size:var(--font-size-lg);line-height:var(--line-height-lg)}._sizeLg_p1h72_64 ._before_p1h72_99,._sizeLg_p1h72_64 ._after_p1h72_100,._sizeLg_p1h72_64 ._togglePassword_p1h72_108{height:18px;width:18px}
1
+ :root{--input-bg: var(--lui-color-background-secondary);--input-bg-hover: var(--lui-color-background-secondary);--input-border: var(--lui-color-border-primary);--input-border-hover: var(--lui-color-text-tertiary);--input-border-focus: var(--lui-color-border-focus);--input-border-error: var(--lui-color-border-focus-error);--input-text: var(--lui-color-text-primary);--input-text-disabled: var(--lui-color-text-disabled);--input-placeholder: var(--lui-color-text-tertiary);--input-icon: var(--lui-color-text-tertiary);--input-radius: var(--lui-radius-1);--input-shadow: var(--lui-shadow-xs);--input-gap: var(--lui-space-2)}._root_1k18n_17{align-items:center;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--input-shadow);display:inline-flex;gap:var(--input-gap);position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_1k18n_17:hover{border-color:var(--input-border-hover)}._root_1k18n_17:focus-within{border-color:var(--input-border-focus);box-shadow:0 0 0 1px var(--input-border-focus)}._root_1k18n_17._invalid_1k18n_36{border-color:var(--input-border-error)}._root_1k18n_17._invalid_1k18n_36:focus-within{box-shadow:0 0 0 1px var(--input-border-error)}._root_1k18n_17._disabled_1k18n_42{background:var(--lui-color-background-disabled);border-color:var(--lui-color-border-disabled);box-shadow:none;cursor:not-allowed}._root_1k18n_17._disabled_1k18n_42:hover{border-color:var(--lui-color-border-disabled)}._root_1k18n_17._disabled_1k18n_42:focus-within{border-color:var(--lui-color-border-disabled);box-shadow:none}._sizeSm_1k18n_56{padding:var(--lui-space-1) var(--lui-space-2)}._sizeMd_1k18n_60{padding:var(--lui-space-2) var(--lui-space-3)}._sizeLg_1k18n_64{padding:var(--lui-space-3) var(--lui-space-4)}._control_1k18n_68{background:none;border:none;color:var(--input-text);flex:1;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0;outline:none;padding:0}._control_1k18n_68::placeholder{color:var(--input-placeholder)}._control_1k18n_68:disabled{color:var(--input-text-disabled);cursor:not-allowed}._control_1k18n_68:disabled::placeholder{color:var(--input-text-disabled)}._control_1k18n_68[type=number]::-webkit-outer-spin-button,._control_1k18n_68[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}._control_1k18n_68[type=number]{appearance:textfield}._before_1k18n_99,._after_1k18n_100{align-items:center;color:var(--input-icon);display:flex;flex-shrink:0;line-height:0}._togglePassword_1k18n_108{align-items:center;background:none;border:none;color:var(--input-icon);cursor:pointer;display:flex;flex-shrink:0;line-height:0;padding:0}._togglePassword_1k18n_108:hover{color:var(--lui-color-text-secondary)}._sizeSm_1k18n_56 ._control_1k18n_68{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm)}._sizeSm_1k18n_56 ._before_1k18n_99,._sizeSm_1k18n_56 ._after_1k18n_100,._sizeSm_1k18n_56 ._togglePassword_1k18n_108{height:14px;width:14px}._sizeMd_1k18n_60 ._control_1k18n_68{font-size:var(--lui-font-size-md);line-height:var(--line-height-md)}._sizeMd_1k18n_60 ._before_1k18n_99,._sizeMd_1k18n_60 ._after_1k18n_100,._sizeMd_1k18n_60 ._togglePassword_1k18n_108{height:16px;width:16px}._sizeLg_1k18n_64 ._control_1k18n_68{font-size:var(--lui-font-size-lg);line-height:var(--line-height-lg)}._sizeLg_1k18n_64 ._before_1k18n_99,._sizeLg_1k18n_64 ._after_1k18n_100,._sizeLg_1k18n_64 ._togglePassword_1k18n_108{height:18px;width:18px}
package/dist/input.js CHANGED
@@ -1,146 +1,120 @@
1
- import { jsxs as C, jsx as e } from "react/jsx-runtime";
2
- import { c as z } from "./clsx-OuTLNxxd.mjs";
3
- import { useState as g, useCallback as f } from "react";
4
- import { g as M } from "./getVariantClassName-D7Nhpuec.mjs";
5
- import { u as x } from "./useLocale-D2Z0JH0l.mjs";
6
- import './input.css';const p = {
1
+ import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
+ import { c as v } from "./clsx-OuTLNxxd.mjs";
3
+ import { useState as g, useCallback as N } from "react";
4
+ import { g as U } from "./getVariantClassName-D7Nhpuec.mjs";
5
+ import { I as f } from "./Icon-flib0kme.mjs";
6
+ import { u as E } from "./useLocale-DdHNhmvT.mjs";
7
+ import './input.css';const m = {
7
8
  INPUT: "Input",
8
9
  INPUT_EMAIL: "InputEmail",
9
10
  INPUT_NUMBER: "InputNumber",
10
11
  INPUT_PASSWORD: "InputPassword",
11
12
  INPUT_PHONE: "InputPhone"
12
- }, y = "_root_p1h72_17", E = "_invalid_p1h72_36", B = "_disabled_p1h72_42", U = "_sizeSm_p1h72_56", L = "_sizeMd_p1h72_60", S = "_sizeLg_p1h72_64", T = "_control_p1h72_68", A = "_before_p1h72_99", k = "_after_p1h72_100", O = "_togglePassword_p1h72_108", l = {
13
- root: y,
14
- invalid: E,
15
- disabled: B,
16
- sizeSm: U,
17
- sizeMd: L,
18
- sizeLg: S,
19
- control: T,
13
+ }, S = "_root_1k18n_17", C = "_invalid_1k18n_36", M = "_disabled_1k18n_42", T = "_sizeSm_1k18n_56", B = "_sizeMd_1k18n_60", L = "_sizeLg_1k18n_64", x = "_control_1k18n_68", A = "_before_1k18n_99", O = "_after_1k18n_100", $ = "_togglePassword_1k18n_108", l = {
14
+ root: S,
15
+ invalid: C,
16
+ disabled: M,
17
+ sizeSm: T,
18
+ sizeMd: B,
19
+ sizeLg: L,
20
+ control: x,
20
21
  before: A,
21
- after: k,
22
- togglePassword: O
23
- }, d = (o) => {
24
- const { ref: s, invalid: t = !1, size: r = "md", before: a, after: n, className: i, onChange: c, onBlur: h, onFocus: m, ...u } = o, P = z(
22
+ after: O,
23
+ togglePassword: $
24
+ }, d = (n) => {
25
+ const { ref: e, invalid: s = !1, size: a = "md", before: r, after: t, className: i, onChange: c, onBlur: u, onFocus: _, ...p } = n, w = v(
25
26
  l.root,
26
- M("size", r, l),
27
+ U("size", a, l),
27
28
  {
28
- [l.disabled]: u.disabled === !0,
29
- [l.invalid]: t
29
+ [l.disabled]: p.disabled === !0,
30
+ [l.invalid]: s
30
31
  },
31
32
  i
32
- ), b = (v) => {
33
- c?.(v.target.value);
33
+ ), z = (k) => {
34
+ c?.(k.target.value);
34
35
  };
35
- return /* @__PURE__ */ C("div", { className: P, children: [
36
- a && /* @__PURE__ */ e("span", { className: l.before, children: a }),
37
- /* @__PURE__ */ e("input", { ref: s, className: l.control, onChange: b, onBlur: h, onFocus: m, ...u }),
38
- n && /* @__PURE__ */ e("span", { className: l.after, children: n })
36
+ return /* @__PURE__ */ y("div", { className: w, children: [
37
+ r && /* @__PURE__ */ o("span", { className: l.before, children: r }),
38
+ /* @__PURE__ */ o("input", { ref: e, className: l.control, onChange: z, onBlur: u, onFocus: _, ...p }),
39
+ t && /* @__PURE__ */ o("span", { className: l.after, children: t })
39
40
  ] });
40
41
  };
41
- d.displayName = p.INPUT;
42
- const V = () => /* @__PURE__ */ e("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
43
- "path",
44
- {
45
- d: "M2 3c0-.6.4-1 1-1h1.5a1 1 0 01.9.6l.7 1.5a1 1 0 01-.1 1.1L5 6a8.6 8.6 0 004 4l1-1a1 1 0 011.1-.2l1.5.7a1 1 0 01.6.9V13a1 1 0 01-1 1C6.5 14 2 9.5 2 3z",
46
- fill: "currentColor"
47
- }
48
- ) }), $ = () => /* @__PURE__ */ e("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
49
- "path",
50
- {
51
- d: "M2 4a2 2 0 012-2h8a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V4zm2 0l4 3 4-3m0 8V6.5L8 9.5 4 6.5V12",
52
- fill: "currentColor"
53
- }
54
- ) }), D = () => /* @__PURE__ */ e("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
55
- "path",
56
- {
57
- d: "M8 3C4.5 3 1.5 5.5 0 8c1.5 2.5 4.5 5 8 5s6.5-2.5 8-5c-1.5-2.5-4.5-5-8-5zm0 8a3 3 0 110-6 3 3 0 010 6zm0-1.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z",
58
- fill: "currentColor"
59
- }
60
- ) }), H = () => /* @__PURE__ */ e("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
61
- "path",
62
- {
63
- d: "M3.5 2L14 12.5M6.5 5.5A3 3 0 0010 9m4.5-1A9.5 9.5 0 0014 8c-1.5-2.5-4.5-5-8-5-.7 0-1.4.1-2 .3m-2.6 1.2C.8 5.2 0 8 0 8c1.5 2.5 4.5 5 8 5 1.5 0 2.9-.4 4.1-1",
64
- stroke: "currentColor",
65
- strokeWidth: "1.5",
66
- strokeLinecap: "round",
67
- fill: "none"
68
- }
69
- ) });
70
- function R(o) {
71
- const s = o.replace(/\D/g, "").slice(0, 11);
72
- if (!s) return "";
73
- let t = "+7";
74
- return s.length > 1 && (t += ` (${s.slice(1, 4)}`), s.length >= 4 && (t += `) ${s.slice(4, 7)}`), s.length >= 7 && (t += `-${s.slice(7, 9)}`), s.length >= 9 && (t += `-${s.slice(9, 11)}`), t;
42
+ d.displayName = m.INPUT;
43
+ function D(n) {
44
+ const e = n.replace(/\D/g, "").slice(0, 11);
45
+ if (!e)
46
+ return "";
47
+ let s = "+7";
48
+ return e.length > 1 && (s += ` (${e.slice(1, 4)}`), e.length >= 4 && (s += `) ${e.slice(4, 7)}`), e.length >= 7 && (s += `-${e.slice(7, 9)}`), e.length >= 9 && (s += `-${e.slice(9, 11)}`), s;
75
49
  }
76
- function j(o) {
77
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o);
50
+ function R(n) {
51
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n);
78
52
  }
79
- const w = (o) => {
80
- const { ref: s, before: t, onBlur: r, invalid: a, ...n } = o, [i, c] = g(!1), h = f(
81
- (u) => {
82
- c(!0), r?.(u);
53
+ const I = (n) => {
54
+ const { ref: e, before: s, onBlur: a, invalid: r, ...t } = n, [i, c] = g(!1), u = N(
55
+ (p) => {
56
+ c(!0), a?.(p);
83
57
  },
84
- [r]
85
- ), m = a || i && n.value != null && !j(n.value);
86
- return /* @__PURE__ */ e(
58
+ [a]
59
+ ), _ = r || i && t.value != null && !R(t.value);
60
+ return /* @__PURE__ */ o(
87
61
  d,
88
62
  {
89
- ref: s,
63
+ ref: e,
90
64
  type: "email",
91
- before: t ?? /* @__PURE__ */ e($, {}),
92
- invalid: m,
93
- onBlur: h,
94
- ...n
65
+ before: s ?? /* @__PURE__ */ o(f, { name: "mail", size: 16 }),
66
+ invalid: _,
67
+ onBlur: u,
68
+ ...t
95
69
  }
96
70
  );
97
71
  };
98
- w.displayName = p.INPUT_EMAIL;
99
- const _ = (o) => {
100
- const { ref: s, ...t } = o;
101
- return /* @__PURE__ */ e(d, { ref: s, type: "number", inputMode: "numeric", ...t });
72
+ I.displayName = m.INPUT_EMAIL;
73
+ const P = (n) => {
74
+ const { ref: e, ...s } = n;
75
+ return /* @__PURE__ */ o(d, { ref: e, type: "number", inputMode: "numeric", ...s });
102
76
  };
103
- _.displayName = p.INPUT_NUMBER;
104
- const N = (o) => {
105
- const { ref: s, after: t, ...r } = o, a = x(), [n, i] = g(!1), c = f(() => i((h) => !h), []);
106
- return /* @__PURE__ */ e(
77
+ P.displayName = m.INPUT_NUMBER;
78
+ const b = (n) => {
79
+ const { ref: e, after: s, ...a } = n, r = E(), [t, i] = g(!1), c = N(() => i((u) => !u), []);
80
+ return /* @__PURE__ */ o(
107
81
  d,
108
82
  {
109
- ref: s,
110
- type: n ? "text" : "password",
111
- after: t ?? /* @__PURE__ */ e(
83
+ ref: e,
84
+ type: t ? "text" : "password",
85
+ after: s ?? /* @__PURE__ */ o(
112
86
  "button",
113
87
  {
114
88
  type: "button",
115
89
  className: l.togglePassword,
116
90
  onClick: c,
117
91
  tabIndex: -1,
118
- "aria-label": n ? a.input.passwordHide : a.input.passwordShow,
119
- children: n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(D, {})
92
+ "aria-label": t ? r.input.passwordHide : r.input.passwordShow,
93
+ children: t ? /* @__PURE__ */ o(f, { name: "eyeOff", size: 16 }) : /* @__PURE__ */ o(f, { name: "eye", size: 16 })
120
94
  }
121
95
  ),
122
- ...r
96
+ ...a
123
97
  }
124
98
  );
125
99
  };
126
- N.displayName = p.INPUT_PASSWORD;
127
- const I = (o) => {
128
- const { ref: s, before: t, onChange: r, ...a } = o, n = f(
100
+ b.displayName = m.INPUT_PASSWORD;
101
+ const h = (n) => {
102
+ const { ref: e, before: s, onChange: a, ...r } = n, t = N(
129
103
  (i) => {
130
- const c = R(i);
131
- r?.(c);
104
+ const c = D(i);
105
+ a?.(c);
132
106
  },
133
- [r]
107
+ [a]
134
108
  );
135
- return /* @__PURE__ */ e(d, { ref: s, type: "tel", before: t ?? /* @__PURE__ */ e(V, {}), onChange: n, ...a });
109
+ return /* @__PURE__ */ o(d, { ref: e, type: "tel", before: s ?? /* @__PURE__ */ o(f, { name: "phone", size: 16 }), onChange: t, ...r });
136
110
  };
137
- I.displayName = p.INPUT_PHONE;
138
- const J = Object.assign(d, {
139
- Email: w,
140
- Number: _,
141
- Password: N,
142
- Phone: I
111
+ h.displayName = m.INPUT_PHONE;
112
+ const q = Object.assign(d, {
113
+ Email: I,
114
+ Number: P,
115
+ Password: b,
116
+ Phone: h
143
117
  });
144
118
  export {
145
- J as Input
119
+ q as Input
146
120
  };
@@ -1,37 +1,5 @@
1
1
  import { default as default_2 } from 'react';
2
2
 
3
- /**
4
- * Root provider that sets color scheme and locale for all UI Kit components.
5
- *
6
- * @example
7
- * ```tsx
8
- * import { ConfigProvider } from '@lazar-ui/kit';
9
- * import '@lazar-ui/kit/css/palettes/indigo.css';
10
- * import '@lazar-ui/kit/css/semantic.css';
11
- *
12
- * function App() {
13
- * return (
14
- * <ConfigProvider theme="light" locale="en">
15
- * <YourApp />
16
- * </ConfigProvider>
17
- * );
18
- * }
19
- * ```
20
- *
21
- * @example
22
- * ```tsx
23
- * // With custom locale and theme target
24
- * <ConfigProvider
25
- * theme="dark"
26
- * locale={{ dialog: { close: 'Закрыть' } }}
27
- * themeTarget={document.getElementById('root')}
28
- * >
29
- * <YourApp />
30
- * </ConfigProvider>
31
- * ```
32
- */
33
- export declare const ConfigProvider: default_2.FC<IProps>;
34
-
35
3
  export declare interface IConfigContext {
36
4
  theme: TTheme;
37
5
  locale: ILocaleMessages;
@@ -67,11 +35,43 @@ declare interface IProps extends default_2.PropsWithChildren {
67
35
  locale?: TLocale;
68
36
  }
69
37
 
38
+ /**
39
+ * Root provider that sets color scheme and locale for all Lazar UI Kit components.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * import { LazarUiProvider } from '@lazar-ui/kit';
44
+ * import '@lazar-ui/kit/css/palettes/indigo.css';
45
+ * import '@lazar-ui/kit/css/semantic.css';
46
+ *
47
+ * function App() {
48
+ * return (
49
+ * <LazarUiProvider theme="light" locale="en">
50
+ * <YourApp />
51
+ * </LazarUiProvider>
52
+ * );
53
+ * }
54
+ * ```
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * // With custom locale and theme target
59
+ * <LazarUiProvider
60
+ * theme="dark"
61
+ * locale={{ dialog: { close: 'Закрыть' } }}
62
+ * themeTarget={document.getElementById('root')}
63
+ * >
64
+ * <YourApp />
65
+ * </LazarUiProvider>
66
+ * ```
67
+ */
68
+ export declare const LazarUiProvider: default_2.FC<IProps>;
69
+
70
70
  export declare type TLocale = Partial<ILocaleMessages> | 'en' | 'ru';
71
71
 
72
72
  export declare type TTheme = 'light' | 'dark' | 'contrast';
73
73
 
74
- export declare const useConfigContext: () => IConfigContext;
74
+ export declare const useLazarUiContext: () => IConfigContext;
75
75
 
76
76
  export declare const useLocale: () => ILocaleMessages;
77
77
 
@@ -0,0 +1,14 @@
1
+ import { C as t } from "./useLocale-DdHNhmvT.mjs";
2
+ import { L as u, u as x } from "./useLocale-DdHNhmvT.mjs";
3
+ import { useContext as o } from "react";
4
+ const i = () => {
5
+ const r = o(t);
6
+ if (!r)
7
+ throw new Error("useLazarUiContext must be used within a LazarUiProvider");
8
+ return r;
9
+ };
10
+ export {
11
+ u as LazarUiProvider,
12
+ i as useLazarUiContext,
13
+ x as useLocale
14
+ };
package/dist/menu.css CHANGED
@@ -1 +1 @@
1
- ._root_rtz62_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_rtz62_1:hover{background:var(--color-background-secondary)}._root_rtz62_1:focus-visible{background:var(--color-background-secondary)}._root_rtz62_1._disabled_rtz62_19{color:var(--color-text-disabled);cursor:not-allowed}._root_rtz62_1._disabled_rtz62_19:hover{background:transparent}._checkbox_rtz62_27{align-items:center;border:1.5px solid var(--color-border-primary);border-radius:var(--radius-1);display:inline-flex;flex-shrink:0;height:16px;justify-content:center;transition:all .1s ease;width:16px}._checkbox_rtz62_27._checked_rtz62_38{background:var(--color-background-brand);border-color:var(--color-background-brand);color:var(--color-text-on-brand)}._label_rtz62_44{flex:1;overflow:hidden;text-overflow:ellipsis}:root{--dropdown-min-width: 160px;--dropdown-item-padding-x: var(--space-3);--dropdown-item-padding-y: var(--space-2);--dropdown-item-gap: var(--space-2);--dropdown-item-radius: var(--radius-1);--dropdown-item-font-size: var(--font-size-sm);--dropdown-item-icon-size: 16px;--dropdown-separator-margin: var(--space-1) var(--space-2);--dropdown-group-label-padding: var(--space-2) var(--space-3);--dropdown-group-label-font-size: var(--font-size-xs)}._root_mkbkc_14{min-width:var(--dropdown-min-width);padding:var(--space-1)}._root_1rvg0_1{padding-bottom:var(--space-1);padding-top:var(--space-1)}._root_1rvg0_1+._root_1rvg0_1{border-top:1px solid var(--color-border-primary)}._label_1rvg0_9{color:var(--color-text-tertiary);font-size:var(--dropdown-group-label-font-size);font-weight:var(--font-weight-medium);padding:var(--dropdown-group-label-padding);text-transform:uppercase}._root_vdz2l_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_vdz2l_1:hover{background:var(--color-background-secondary)}._root_vdz2l_1:focus-visible{background:var(--color-background-secondary)}._root_vdz2l_1._disabled_vdz2l_19{color:var(--color-text-disabled);cursor:not-allowed}._root_vdz2l_1._disabled_vdz2l_19:hover{background:transparent}._root_vdz2l_1._danger_vdz2l_26{color:var(--color-background-error)}._root_vdz2l_1._danger_vdz2l_26:hover{background:color-mix(in sRGB,var(--color-background-error) 8%,transparent)}._icon_vdz2l_33{align-items:center;color:var(--color-text-tertiary);display:inline-flex;flex-shrink:0;height:var(--dropdown-item-icon-size);justify-content:center;width:var(--dropdown-item-icon-size)}._label_vdz2l_43{flex:1;overflow:hidden;text-overflow:ellipsis}._root_c60j4_1{background:var(--color-border-primary);border:none;height:1px;margin:var(--dropdown-separator-margin)}
1
+ ._root_15rud_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_15rud_1:hover{background:var(--lui-color-background-secondary)}._root_15rud_1:focus-visible{background:var(--lui-color-background-secondary)}._root_15rud_1._disabled_15rud_19{color:var(--lui-color-text-disabled);cursor:not-allowed}._root_15rud_1._disabled_15rud_19:hover{background:transparent}._checkbox_15rud_27{align-items:center;border:1.5px solid var(--lui-color-border-primary);border-radius:var(--lui-radius-1);display:inline-flex;flex-shrink:0;height:16px;justify-content:center;transition:all .1s ease;width:16px}._checkbox_15rud_27._checked_15rud_38{background:var(--lui-color-background-brand);border-color:var(--lui-color-background-brand);color:var(--lui-color-text-on-brand)}._label_15rud_44{flex:1;overflow:hidden;text-overflow:ellipsis}:root{--dropdown-min-width: 160px;--dropdown-item-padding-x: var(--lui-space-3);--dropdown-item-padding-y: var(--lui-space-2);--dropdown-item-gap: var(--lui-space-2);--dropdown-item-radius: var(--lui-radius-1);--dropdown-item-font-size: var(--lui-font-size-sm);--dropdown-item-icon-size: 16px;--dropdown-separator-margin: var(--lui-space-1) var(--lui-space-2);--dropdown-group-label-padding: var(--lui-space-2) var(--lui-space-3);--dropdown-group-label-font-size: var(--lui-font-size-xs)}._root_1h0xj_14{min-width:var(--dropdown-min-width);padding:var(--lui-space-1)}._root_dtqrm_1{padding-bottom:var(--lui-space-1);padding-top:var(--lui-space-1)}._root_dtqrm_1+._root_dtqrm_1{border-top:1px solid var(--lui-color-border-primary)}._label_dtqrm_9{color:var(--lui-color-text-tertiary);font-size:var(--dropdown-group-label-font-size);font-weight:var(--lui-font-weight-medium);padding:var(--dropdown-group-label-padding);text-transform:uppercase}._root_5s7ps_1{align-items:center;border-radius:var(--dropdown-item-radius);cursor:pointer;display:flex;font-size:var(--dropdown-item-font-size);gap:var(--dropdown-item-gap);outline:none;padding:var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);transition:background-color .1s ease;-webkit-user-select:none;user-select:none}._root_5s7ps_1:hover{background:var(--lui-color-background-secondary)}._root_5s7ps_1:focus-visible{background:var(--lui-color-background-secondary)}._root_5s7ps_1._disabled_5s7ps_19{color:var(--lui-color-text-disabled);cursor:not-allowed}._root_5s7ps_1._disabled_5s7ps_19:hover{background:transparent}._root_5s7ps_1._danger_5s7ps_26{color:var(--lui-color-background-error)}._root_5s7ps_1._danger_5s7ps_26:hover{background:color-mix(in sRGB,var(--lui-color-background-error) 8%,transparent)}._icon_5s7ps_33{align-items:center;color:var(--lui-color-text-tertiary);display:inline-flex;flex-shrink:0;height:var(--dropdown-item-icon-size);justify-content:center;width:var(--dropdown-item-icon-size)}._label_5s7ps_43{flex:1;overflow:hidden;text-overflow:ellipsis}._root_16pgq_1{background:var(--lui-color-border-primary);border:none;height:1px;margin:var(--dropdown-separator-margin)}
package/dist/menu.d.ts CHANGED
@@ -48,8 +48,8 @@ declare interface IProps_5 {
48
48
  disabled?: boolean;
49
49
  /** Whether the item is in danger state (e.g. delete action). */
50
50
  danger?: boolean;
51
- /** Optional icon before the label. */
52
- icon?: default_2.ReactNode;
51
+ /** Optional icon name before the label. */
52
+ icon?: string;
53
53
  }
54
54
  export { IProps_5 as IItemProps }
55
55
  export { IProps_5 as IMenuItemProps }
@@ -74,7 +74,7 @@ export declare const Menu: TMenuCompoundComponent;
74
74
  * <Button>Actions</Button>
75
75
  * </Menu.Trigger>
76
76
  * <Menu.Content>
77
- * <Menu.Item icon={<Icon />}>Edit</Menu.Item>
77
+ * <Menu.Item icon="edit">Edit</Menu.Item>
78
78
  * <Menu.Item danger>Delete</Menu.Item>
79
79
  * </Menu.Content>
80
80
  * </Menu>