@lazar-ui/kit 0.1.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 (100) hide show
  1. package/README.md +182 -0
  2. package/dist/Overlay-RmiBtqDR.mjs +1011 -0
  3. package/dist/accordion.css +1 -0
  4. package/dist/accordion.d.ts +53 -0
  5. package/dist/accordion.js +48 -0
  6. package/dist/alert.css +1 -0
  7. package/dist/alert.d.ts +33 -0
  8. package/dist/alert.js +20 -0
  9. package/dist/avatar.css +1 -0
  10. package/dist/avatar.d.ts +34 -0
  11. package/dist/avatar.js +41 -0
  12. package/dist/badge.css +1 -0
  13. package/dist/badge.d.ts +33 -0
  14. package/dist/badge.js +23 -0
  15. package/dist/breadcrumbs.css +1 -0
  16. package/dist/breadcrumbs.d.ts +80 -0
  17. package/dist/breadcrumbs.js +63 -0
  18. package/dist/button.css +1 -0
  19. package/dist/button.d.ts +66 -0
  20. package/dist/button.js +46 -0
  21. package/dist/camelCase-PtIYufW8.mjs +528 -0
  22. package/dist/card.css +1 -0
  23. package/dist/card.d.ts +42 -0
  24. package/dist/card.js +24 -0
  25. package/dist/checkbox.css +1 -0
  26. package/dist/checkbox.d.ts +41 -0
  27. package/dist/checkbox.js +42 -0
  28. package/dist/clsx-OuTLNxxd.mjs +16 -0
  29. package/dist/config-provider.d.ts +78 -0
  30. package/dist/config-provider.js +14 -0
  31. package/dist/css/palettes/indigo.css +104 -0
  32. package/dist/css/palettes/monochrome.css +104 -0
  33. package/dist/css/semantic.css +113 -0
  34. package/dist/dialog.css +1 -0
  35. package/dist/dialog.d.ts +91 -0
  36. package/dist/dialog.js +75 -0
  37. package/dist/drawer.css +1 -0
  38. package/dist/drawer.d.ts +128 -0
  39. package/dist/drawer.js +106 -0
  40. package/dist/empty-state.css +1 -0
  41. package/dist/empty-state.d.ts +33 -0
  42. package/dist/empty-state.js +52 -0
  43. package/dist/error-boundary.css +1 -0
  44. package/dist/error-boundary.d.ts +55 -0
  45. package/dist/error-boundary.js +37 -0
  46. package/dist/flex.css +1 -0
  47. package/dist/flex.d.ts +68 -0
  48. package/dist/flex.js +73 -0
  49. package/dist/form-field.css +1 -0
  50. package/dist/form-field.d.ts +27 -0
  51. package/dist/form-field.js +22 -0
  52. package/dist/getComponentSlots-DwAYUFNk.mjs +16 -0
  53. package/dist/getVariantClassName-D7Nhpuec.mjs +8 -0
  54. package/dist/input.css +1 -0
  55. package/dist/input.d.ts +39 -0
  56. package/dist/input.js +146 -0
  57. package/dist/isValidReactNode-CmYwTWCE.mjs +18 -0
  58. package/dist/menu.css +1 -0
  59. package/dist/menu.d.ts +94 -0
  60. package/dist/menu.js +135 -0
  61. package/dist/pagination.css +1 -0
  62. package/dist/pagination.d.ts +40 -0
  63. package/dist/pagination.js +74 -0
  64. package/dist/popover.css +1 -0
  65. package/dist/popover.d.ts +54 -0
  66. package/dist/popover.js +65 -0
  67. package/dist/select.css +1 -0
  68. package/dist/select.d.ts +64 -0
  69. package/dist/select.js +170 -0
  70. package/dist/separator.css +1 -0
  71. package/dist/separator.d.ts +25 -0
  72. package/dist/separator.js +24 -0
  73. package/dist/skeleton.css +1 -0
  74. package/dist/skeleton.d.ts +38 -0
  75. package/dist/skeleton.js +27 -0
  76. package/dist/spinner.css +1 -0
  77. package/dist/spinner.d.ts +31 -0
  78. package/dist/spinner.js +29 -0
  79. package/dist/switch.css +1 -0
  80. package/dist/switch.d.ts +44 -0
  81. package/dist/switch.js +37 -0
  82. package/dist/table.css +1 -0
  83. package/dist/table.d.ts +60 -0
  84. package/dist/table.js +40 -0
  85. package/dist/tabs.css +1 -0
  86. package/dist/tabs.d.ts +69 -0
  87. package/dist/tabs.js +79 -0
  88. package/dist/textarea.css +1 -0
  89. package/dist/textarea.d.ts +53 -0
  90. package/dist/textarea.js +46 -0
  91. package/dist/tooltip.css +1 -0
  92. package/dist/tooltip.d.ts +38 -0
  93. package/dist/tooltip.js +99 -0
  94. package/dist/useLocale-D2Z0JH0l.mjs +70 -0
  95. package/dist/useModalOverlay-D5Bs9FCB.mjs +486 -0
  96. package/dist/useOverlayPosition-DVu1Qziq.mjs +451 -0
  97. package/dist/useOverlayTriggerState-BIo1Jcba.mjs +221 -0
  98. package/dist/utils.d.ts +58 -0
  99. package/dist/utils.js +18 -0
  100. package/package.json +76 -0
@@ -0,0 +1 @@
1
+ @charset "UTF-8";:root{--accordion-gap: var(--space-4)}._root_5n2yo_5{display:flex;flex-direction:column;gap:var(--accordion-gap);width:100%}._root_m3edb_2{border-radius:16px;cursor:pointer;display:flex;flex-direction:row;gap:24px;padding:32px;transition:background-color .3s}._root_m3edb_2:hover,._root_m3edb_2._open_m3edb_14{background:#f9fafb}._root_m3edb_2._open_m3edb_14 ._description_m3edb_17{max-height:99999px;opacity:1;transition:max-height .5s ease-in,opacity .5s ease-in}._content_m3edb_23{flex:1 1 auto}._icons_m3edb_27{flex:0 0 24px;height:24px;padding-top:2px;position:relative}._icon_m3edb_27{left:0;opacity:0;position:absolute;top:2px;transition:opacity .3s}._icon_m3edb_27._show_m3edb_41{opacity:1}._icon_m3edb_27._collapse_m3edb_44:after,._icon_m3edb_27._expand_m3edb_44:after{color:#333;display:block;font-size:24px;line-height:24px;text-align:center;width:24px}._icon_m3edb_27._collapse_m3edb_44:after{content:"—"}._icon_m3edb_27._expand_m3edb_44:after{content:"+"}._title_m3edb_59{color:#333;font-size:18px;font-weight:500;line-height:28px}._description_m3edb_17{color:#666;font-size:16px;font-weight:400;line-height:24px;max-height:0;opacity:0;overflow:hidden;transition:max-height .5s ease-out,opacity .5s ease-out}@media only screen and (max-width:1023px){._root_m3edb_2{gap:16px;padding:20px}}
@@ -0,0 +1,53 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Accordion: TAccordionCompoundComponent;
4
+
5
+ /**
6
+ * Accordion container. Renders a vertically stacked list of expandable sections.
7
+ *
8
+ * Uses compound component pattern via `<Accordion.Item>`.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Accordion>
13
+ * <Accordion.Item title="Section 1">
14
+ * Content for section 1
15
+ * </Accordion.Item>
16
+ * <Accordion.Item title="Section 2" open>
17
+ * Content for section 2
18
+ * </Accordion.Item>
19
+ * </Accordion>
20
+ * ```
21
+ */
22
+ declare const Accordion_2: default_2.FC<IAccordionProps>;
23
+
24
+ export declare interface IAccordionProps extends default_2.PropsWithChildren {
25
+ }
26
+
27
+ declare interface IProps extends default_2.PropsWithChildren {
28
+ /** Whether the item is open. */
29
+ open?: boolean;
30
+ /** Handler for */
31
+ onOpenChange?: (isOpen: boolean) => void;
32
+ /** Title. */
33
+ title: string;
34
+ }
35
+
36
+ /**
37
+ * Accordion item sub-component. Manages its own open/closed state.
38
+ * Supports controlled mode via `open` and `onOpenChange`.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <Accordion.Item title="Controlled" open onOpenChange={(isOpen) => console.log(isOpen)}>
43
+ * Content
44
+ * </Accordion.Item>
45
+ * ```
46
+ */
47
+ declare const Item: default_2.FC<IProps>;
48
+
49
+ declare type TAccordionCompoundComponent = typeof Accordion_2 & {
50
+ Item: typeof Item;
51
+ };
52
+
53
+ export { }
@@ -0,0 +1,48 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import u, { useState as v } from "react";
3
+ import { i as x } from "./isValidReactNode-CmYwTWCE.mjs";
4
+ import { c as d } from "./clsx-OuTLNxxd.mjs";
5
+ import './accordion.css';const a = "Accordion";
6
+ var m = /* @__PURE__ */ ((n) => (n.ITEM = "Accordion.Item", n))(m || {});
7
+ const A = "_root_5n2yo_5", I = {
8
+ root: A
9
+ }, f = [m.ITEM], _ = (n) => {
10
+ const { children: c } = n, t = (s) => x(f, s) ? s : null;
11
+ return /* @__PURE__ */ e("div", { className: I.root, children: u.Children.map(c, t) });
12
+ };
13
+ _.displayName = a;
14
+ const T = "_root_m3edb_2", E = "_open_m3edb_14", g = "_description_m3edb_17", w = "_content_m3edb_23", y = "_icons_m3edb_27", O = "_icon_m3edb_27", $ = "_show_m3edb_41", k = "_collapse_m3edb_44", M = "_expand_m3edb_44", S = "_title_m3edb_59", o = {
15
+ root: T,
16
+ open: E,
17
+ description: g,
18
+ content: w,
19
+ icons: y,
20
+ icon: O,
21
+ show: $,
22
+ collapse: k,
23
+ expand: M,
24
+ title: S
25
+ }, p = (n) => {
26
+ const { children: c, onOpenChange: t, open: s = !1, title: h } = n, [i, N] = v(s), C = d(o.root, { [o.open]: i });
27
+ return /* @__PURE__ */ r("div", { className: C, onClick: () => {
28
+ N((b) => {
29
+ const l = !b;
30
+ return t && t(l), l;
31
+ });
32
+ }, children: [
33
+ /* @__PURE__ */ r("div", { className: o.icons, children: [
34
+ /* @__PURE__ */ e("div", { className: d(o.icon, o.collapse, { [o.show]: i }) }),
35
+ /* @__PURE__ */ e("div", { className: d(o.icon, o.expand, { [o.show]: !i }) })
36
+ ] }),
37
+ /* @__PURE__ */ r("div", { className: o.content, children: [
38
+ /* @__PURE__ */ e("div", { className: o.title, children: h }),
39
+ /* @__PURE__ */ e("div", { className: o.description, children: c })
40
+ ] })
41
+ ] });
42
+ };
43
+ p.displayName = `${a}.Item`;
44
+ const P = _;
45
+ P.Item = p;
46
+ export {
47
+ P as Accordion
48
+ };
package/dist/alert.css ADDED
@@ -0,0 +1 @@
1
+ :root{--alert-font-size: var(--font-size-sm);--alert-line-height: var(--line-height-sm);--alert-padding-x: var(--space-4);--alert-padding-y: var(--space-3);--alert-radius: var(--radius-2)}._root_1l2y4_9{border-radius:var(--alert-radius);border-style:solid;border-width:1px;font-size:var(--alert-font-size);line-height:var(--alert-line-height);padding:var(--alert-padding-y) var(--alert-padding-x)}._variantDanger_1l2y4_18{--alert-color: var(--palette-red-500);background:color-mix(in sRGB,var(--alert-color) 12%,transparent);border-color:color-mix(in sRGB,var(--alert-color) 24%,transparent);color:var(--alert-color)}._variantInfo_1l2y4_25{--alert-color: var(--palette-blue-500);background:color-mix(in sRGB,var(--alert-color) 12%,transparent);border-color:color-mix(in sRGB,var(--alert-color) 24%,transparent);color:var(--alert-color)}._variantSuccess_1l2y4_32{--alert-color: var(--palette-green-500);background:color-mix(in sRGB,var(--alert-color) 12%,transparent);border-color:color-mix(in sRGB,var(--alert-color) 24%,transparent);color:var(--alert-color)}._variantWarning_1l2y4_39{--alert-color: var(--palette-orange-500);background:color-mix(in sRGB,var(--alert-color) 12%,transparent);border-color:color-mix(in sRGB,var(--alert-color) 24%,transparent);color:var(--alert-color)}
@@ -0,0 +1,33 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Alert component. Renders a contextual notification banner.
5
+ *
6
+ * Supports four variants: info, success, warning, danger.
7
+ * Background and border are derived from the variant color via `color-mix()`.
8
+
9
+ * @example
10
+ * ```tsx
11
+ * <Alert>This is an info alert.</Alert>
12
+ * <Alert variant="success">Operation completed.</Alert>
13
+ * <Alert variant="warning">Check your input.</Alert>
14
+ * <Alert variant="danger">Something went wrong.</Alert>
15
+ * ```
16
+ */
17
+ export declare const Alert: default_2.FC<IAlertProps>;
18
+
19
+ declare enum EAlertVariant {
20
+ INFO = "info",
21
+ SUCCESS = "success",
22
+ WARNING = "warning",
23
+ DANGER = "danger"
24
+ }
25
+
26
+ export declare interface IAlertProps extends default_2.PropsWithChildren {
27
+ /** Visual variant. Default: 'info'. */
28
+ variant?: TAlertVariant;
29
+ }
30
+
31
+ export declare type TAlertVariant = `${EAlertVariant.INFO | EAlertVariant.SUCCESS | EAlertVariant.WARNING | EAlertVariant.DANGER}`;
32
+
33
+ export { }
package/dist/alert.js ADDED
@@ -0,0 +1,20 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { c as i } from "./clsx-OuTLNxxd.mjs";
3
+ import { g as c } from "./getVariantClassName-D7Nhpuec.mjs";
4
+ import './alert.css';const e = "Alert", l = "_root_1l2y4_9", _ = "_variantDanger_1l2y4_18", v = "_variantInfo_1l2y4_25", m = "_variantSuccess_1l2y4_32", g = "_variantWarning_1l2y4_39", a = {
5
+ root: l,
6
+ variantDanger: _,
7
+ variantInfo: v,
8
+ variantSuccess: m,
9
+ variantWarning: g
10
+ }, f = (n) => {
11
+ const { children: r, variant: t = "info" } = n, o = i(
12
+ a.root,
13
+ c("variant", t, a)
14
+ );
15
+ return /* @__PURE__ */ s("div", { className: o, role: "alert", children: r });
16
+ };
17
+ f.displayName = e;
18
+ export {
19
+ f as Alert
20
+ };
@@ -0,0 +1 @@
1
+ :root{--avatar-radius: var(--radius-full);--avatar-font-weight: var(--font-weight-semibold);--avatar-font-size: var(--font-size-sm)}._root_1rc9y_7{align-items:center;background:var(--avatar-color);border-radius:var(--avatar-radius);color:var(--avatar-text-color);display:inline-flex;font-weight:var(--avatar-font-weight);justify-content:center;line-height:1;overflow:hidden;-webkit-user-select:none;user-select:none;vertical-align:middle}._image_1rc9y_21{height:100%;object-fit:cover;width:100%}._fallback_1rc9y_27{align-items:center;display:flex;font-size:var(--avatar-font-size);justify-content:center;line-height:1}._sizeSm_1rc9y_35{font-size:var(--font-size-xs);height:24px;width:24px}._sizeSm_1rc9y_35 ._fallback_1rc9y_27{font-size:var(--font-size-xs)}._sizeMd_1rc9y_44{height:32px;width:32px}._sizeMd_1rc9y_44 ._fallback_1rc9y_27{font-size:var(--font-size-sm)}._sizeLg_1rc9y_52{height:40px;width:40px}._sizeLg_1rc9y_52 ._fallback_1rc9y_27{font-size:var(--font-size-md)}._sizeXl_1rc9y_60{height:56px;width:56px}._sizeXl_1rc9y_60 ._fallback_1rc9y_27{font-size:var(--font-size-lg)}
@@ -0,0 +1,34 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Avatar component. Renders an image with a textual fallback (children) when the image fails to load.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <Avatar src="https://i.pravatar.cc/80" alt="User" />
9
+ * <Avatar size="lg" color="var(--palette-blue-500)">JD</Avatar>
10
+ * ```
11
+ */
12
+ export declare const Avatar: default_2.FC<IProps>;
13
+
14
+ declare enum EAvatarSize {
15
+ SM = "sm",
16
+ MD = "md",
17
+ LG = "lg",
18
+ XL = "xl"
19
+ }
20
+
21
+ declare interface IProps extends default_2.PropsWithChildren {
22
+ /** Image source URL. */
23
+ src?: string;
24
+ /** Alternative text for the image. */
25
+ alt?: string;
26
+ /** Size. */
27
+ size?: TAvatarSize;
28
+ /** CSS background colour for the fallback state. Default: `var(--color-background-tertiary)`. */
29
+ color?: string;
30
+ }
31
+
32
+ declare type TAvatarSize = `${EAvatarSize.SM | EAvatarSize.MD | EAvatarSize.LG | EAvatarSize.XL}`;
33
+
34
+ export { }
package/dist/avatar.js ADDED
@@ -0,0 +1,41 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useState as _ } from "react";
3
+ import { c as g } from "./clsx-OuTLNxxd.mjs";
4
+ import { g as z } from "./getVariantClassName-D7Nhpuec.mjs";
5
+ import './avatar.css';const y = "Avatar", d = "_root_1rc9y_7", f = "_image_1rc9y_21", p = "_fallback_1rc9y_27", v = "_sizeSm_1rc9y_35", N = "_sizeMd_1rc9y_44", b = "_sizeLg_1rc9y_52", x = "_sizeXl_1rc9y_60", r = {
6
+ root: d,
7
+ image: f,
8
+ fallback: p,
9
+ sizeSm: v,
10
+ sizeMd: N,
11
+ sizeLg: b,
12
+ sizeXl: x
13
+ }, k = (e) => {
14
+ const { src: s, alt: c = "", children: o, size: i = "md", color: t } = e, [l, m] = _(!1), n = g(
15
+ r.root,
16
+ z("size", i, r)
17
+ );
18
+ return /* @__PURE__ */ a(
19
+ "div",
20
+ {
21
+ className: n,
22
+ style: {
23
+ "--avatar-color": t ?? "var(--color-background-tertiary)",
24
+ "--avatar-text-color": t ? "var(--color-text-on-brand)" : "var(--color-text-primary)"
25
+ },
26
+ children: s && !l ? /* @__PURE__ */ a(
27
+ "img",
28
+ {
29
+ className: r.image,
30
+ src: s,
31
+ alt: c,
32
+ onError: () => m(!0)
33
+ }
34
+ ) : o && /* @__PURE__ */ a("span", { className: r.fallback, children: o })
35
+ }
36
+ );
37
+ };
38
+ k.displayName = y;
39
+ export {
40
+ k as Avatar
41
+ };
package/dist/badge.css ADDED
@@ -0,0 +1 @@
1
+ :root{--badge-radius: var(--radius-full);--badge-font-weight: var(--font-weight-medium)}._root_9ayss_6{align-items:center;background:color-mix(in sRGB,var(--badge-color) 12%,transparent);border:1px solid color-mix(in sRGB,var(--badge-color) 24%,transparent);border-radius:var(--badge-radius);color:var(--badge-color);display:inline-flex;font-weight:var(--badge-font-weight);gap:var(--space-1);justify-content:center;line-height:1;white-space:nowrap;width:fit-content}._sizeSm_9ayss_21{font-size:var(--font-size-xs);line-height:var(--line-height-xs);padding:1px var(--space-2)}._sizeMd_9ayss_27{font-size:var(--font-size-sm);line-height:var(--line-height-sm);padding:1px var(--space-3)}._sizeLg_9ayss_33{font-size:var(--font-size-md);line-height:var(--line-height-md);padding:3px var(--space-4)}
@@ -0,0 +1,33 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Badge component. Renders a pill with text content and a derived background from the `color` prop.
5
+ *
6
+ * Background is computed via CSS `color-mix()` — pass any CSS color value as `color` and
7
+ * the component automatically generates a tinted background and subtle border.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Badge>Default</Badge>
12
+ * <Badge color="var(--palette-orange-500)">Orange</Badge>
13
+ * <Badge color="var(--color-text-success)" size="sm">Active</Badge>
14
+ * ```
15
+ */
16
+ export declare const Badge: default_2.FC<IProps>;
17
+
18
+ declare enum EBadgeSize {
19
+ SM = "sm",
20
+ MD = "md",
21
+ LG = "lg"
22
+ }
23
+
24
+ declare interface IProps extends default_2.PropsWithChildren {
25
+ /** CSS color value. Background is derived via `color-mix()`. Default: `var(--color-text-secondary)`. */
26
+ color?: string;
27
+ /** Size. */
28
+ size?: TBadgeSize;
29
+ }
30
+
31
+ declare type TBadgeSize = `${EBadgeSize.SM | EBadgeSize.MD | EBadgeSize.LG}`;
32
+
33
+ export { }
package/dist/badge.js ADDED
@@ -0,0 +1,23 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { c as i } from "./clsx-OuTLNxxd.mjs";
3
+ import { g as m } from "./getVariantClassName-D7Nhpuec.mjs";
4
+ import './badge.css';const n = "Badge", _ = "_root_9ayss_6", l = "_sizeSm_9ayss_21", z = "_sizeMd_9ayss_27", d = "_sizeLg_9ayss_33", s = {
5
+ root: _,
6
+ sizeSm: l,
7
+ sizeMd: z,
8
+ sizeLg: d
9
+ }, g = (o) => {
10
+ const { children: e, color: t, size: a = "md" } = o, r = i(s.root, m("size", a, s));
11
+ return /* @__PURE__ */ c(
12
+ "span",
13
+ {
14
+ className: r,
15
+ style: { "--badge-color": t ?? "var(--color-text-secondary)" },
16
+ children: e
17
+ }
18
+ );
19
+ };
20
+ g.displayName = n;
21
+ export {
22
+ g as Badge
23
+ };
@@ -0,0 +1 @@
1
+ :root{--breadcrumbs-font-size: var(--font-size-sm);--breadcrumbs-line-height: var(--line-height-sm);--breadcrumbs-gap: var(--space-1);--breadcrumbs-color-link: var(--color-text-secondary);--breadcrumbs-color-link-hover: var(--color-text-link-hover);--breadcrumbs-color-current: var(--color-text-primary);--breadcrumbs-color-separator: var(--color-text-quaternary);--breadcrumbs-font-weight-current: var(--font-weight-medium)}._root_b6jtc_12{display:flex}._list_b6jtc_16{align-items:center;display:flex;flex-wrap:wrap;gap:var(--breadcrumbs-gap);list-style:none;margin:0;padding:0}._item_b6jtc_26{align-items:center;display:inline-flex;gap:var(--breadcrumbs-gap)}._link_b6jtc_32{color:var(--breadcrumbs-color-link);font-size:var(--breadcrumbs-font-size);line-height:var(--breadcrumbs-line-height);text-decoration:none}._link_b6jtc_32:hover{color:var(--breadcrumbs-color-link-hover);text-decoration:underline}._label_b6jtc_43{color:var(--breadcrumbs-color-link);font-size:var(--breadcrumbs-font-size);line-height:var(--breadcrumbs-line-height)}._current_b6jtc_49{color:var(--breadcrumbs-color-current);font-weight:var(--breadcrumbs-font-weight-current)}._separator_b6jtc_54{color:var(--breadcrumbs-color-separator);font-size:var(--breadcrumbs-font-size);line-height:var(--breadcrumbs-line-height);-webkit-user-select:none;user-select:none}:root{--breadcrumbs-item-font-size: var(--font-size-sm);--breadcrumbs-item-line-height: var(--line-height-sm);--breadcrumbs-item-color-link: var(--color-text-secondary);--breadcrumbs-item-color-link-hover: var(--color-text-link-hover);--breadcrumbs-item-color-current: var(--color-text-primary);--breadcrumbs-item-font-weight-current: var(--font-weight-medium)}._link_1n28p_10{color:var(--breadcrumbs-item-color-link);font-size:var(--breadcrumbs-item-font-size);line-height:var(--breadcrumbs-item-line-height);text-decoration:none}._link_1n28p_10:hover{color:var(--breadcrumbs-item-color-link-hover);text-decoration:underline}._label_1n28p_21{color:var(--breadcrumbs-item-color-link);font-size:var(--breadcrumbs-item-font-size);line-height:var(--breadcrumbs-item-line-height)}._current_1n28p_27{color:var(--breadcrumbs-item-color-current);font-weight:var(--breadcrumbs-item-font-weight-current)}
@@ -0,0 +1,80 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Breadcrumbs: TBreadcrumbsCompoundComponent;
4
+
5
+ /**
6
+ * Breadcrumbs navigation component. Renders a trail of links indicating the current page location.
7
+ *
8
+ * Supports two mutually exclusive modes:
9
+ * - **Array mode**: pass an `items` array prop.
10
+ * - **JSX mode**: pass `<Breadcrumbs.Item>` elements as children.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * // Array mode
15
+ * <Breadcrumbs
16
+ * items={[
17
+ * { label: 'Home', href: '/' },
18
+ * { label: 'Products', href: '/products' },
19
+ * { label: 'Current Product', current: true },
20
+ * ]}
21
+ * />
22
+ * ```
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * // JSX mode
27
+ * <Breadcrumbs>
28
+ * <Breadcrumbs.Item href="/">Home</Breadcrumbs.Item>
29
+ * <Breadcrumbs.Item href="/products">Products</Breadcrumbs.Item>
30
+ * <Breadcrumbs.Item current>Current Product</Breadcrumbs.Item>
31
+ * </Breadcrumbs>
32
+ * ```
33
+ */
34
+ declare const Breadcrumbs_2: default_2.FC<IBreadcrumbsProps>;
35
+
36
+ export declare interface IBreadcrumbsProps extends default_2.PropsWithChildren {
37
+ /** Array of breadcrumb items for data-driven usage. When provided, `children` are ignored. */
38
+ items?: TBreadcrumbItem[];
39
+ /** Custom separator rendered between breadcrumb items. Default: `'/'`. */
40
+ separator?: default_2.ReactNode;
41
+ }
42
+
43
+ declare interface IProps extends default_2.PropsWithChildren {
44
+ /** Link URL. When omitted, renders a `<span>` instead of an `<a>`. */
45
+ href?: string;
46
+ /** Whether this item represents the current page. Sets `aria-current="page"`. */
47
+ current?: boolean;
48
+ }
49
+
50
+ /**
51
+ * Breadcrumbs item sub-component. Renders a single breadcrumb segment.
52
+ *
53
+ * Renders an `<a>` when `href` is provided and `current` is falsy.
54
+ * Renders a `<span>` with `aria-current="page"` when `current` is true.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <Breadcrumbs.Item href="/">Home</Breadcrumbs.Item>
59
+ * <Breadcrumbs.Item current>Current Page</Breadcrumbs.Item>
60
+ * ```
61
+ */
62
+ declare const Item: default_2.FC<IProps>;
63
+
64
+ /**
65
+ * Descriptor for a single breadcrumb item in array mode.
66
+ */
67
+ export declare type TBreadcrumbItem = {
68
+ /** Label text. */
69
+ label: string;
70
+ /** Link URL. When omitted or the item is the last, renders a `<span>`. */
71
+ href?: string;
72
+ /** Whether this item represents the current page. */
73
+ current?: boolean;
74
+ };
75
+
76
+ declare type TBreadcrumbsCompoundComponent = typeof Breadcrumbs_2 & {
77
+ Item: typeof Item;
78
+ };
79
+
80
+ export { }
@@ -0,0 +1,63 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { c as h } from "./clsx-OuTLNxxd.mjs";
3
+ import k from "react";
4
+ import { i as E } from "./isValidReactNode-CmYwTWCE.mjs";
5
+ import "./camelCase-PtIYufW8.mjs";
6
+ import './breadcrumbs.css';const _ = "Breadcrumbs", I = "/";
7
+ var N = ((s) => (s.ITEM = `${_}.Item`, s))(N || {});
8
+ const $ = "_root_b6jtc_12", A = "_list_b6jtc_16", C = "_item_b6jtc_26", T = "_link_b6jtc_32", g = "_label_b6jtc_43", B = "_current_b6jtc_49", L = "_separator_b6jtc_54", r = {
9
+ root: $,
10
+ list: A,
11
+ item: C,
12
+ link: T,
13
+ label: g,
14
+ current: B,
15
+ separator: L
16
+ }, v = [N.ITEM], f = (s) => {
17
+ const { children: c, items: t, separator: o = I } = s;
18
+ if (t) {
19
+ if (t.length === 0)
20
+ return null;
21
+ const n = (a, l) => {
22
+ const b = l === t.length - 1, p = a.current || b;
23
+ let m;
24
+ return a.href && !p ? m = /* @__PURE__ */ e("a", { className: r.link, href: a.href, children: a.label }) : p ? m = /* @__PURE__ */ e(
25
+ "span",
26
+ {
27
+ "aria-current": "page",
28
+ className: h(r.label, r.current),
29
+ children: a.label
30
+ }
31
+ ) : m = /* @__PURE__ */ e("span", { className: r.label, children: a.label }), /* @__PURE__ */ d("li", { className: r.item, children: [
32
+ m,
33
+ !b && /* @__PURE__ */ e("span", { "aria-hidden": "true", className: r.separator, children: o })
34
+ ] }, l);
35
+ };
36
+ return /* @__PURE__ */ e("nav", { "aria-label": "breadcrumb", className: r.root, children: /* @__PURE__ */ e("ol", { className: r.list, children: t.map((a, l) => n(a, l)) }) });
37
+ }
38
+ const i = [];
39
+ return k.Children.forEach(c, (n) => {
40
+ E(v, n) && i.push(n);
41
+ }), i.length === 0 ? null : /* @__PURE__ */ e("nav", { "aria-label": "breadcrumb", className: r.root, children: /* @__PURE__ */ e("ol", { className: r.list, children: i.map((n, a) => {
42
+ const l = a === i.length - 1;
43
+ return /* @__PURE__ */ d("li", { className: r.item, children: [
44
+ n,
45
+ !l && /* @__PURE__ */ e("span", { "aria-hidden": "true", className: r.separator, children: o })
46
+ ] }, a);
47
+ }) }) });
48
+ };
49
+ f.displayName = _;
50
+ const y = "_link_1n28p_10", M = "_label_1n28p_21", P = "_current_1n28p_27", u = {
51
+ link: y,
52
+ label: M,
53
+ current: P
54
+ }, j = (s) => {
55
+ const { children: c, href: t, current: o = !1 } = s;
56
+ return t && !o ? /* @__PURE__ */ e("a", { className: u.link, href: t, children: c }) : o ? /* @__PURE__ */ e("span", { "aria-current": "page", className: h(u.label, u.current), children: c }) : /* @__PURE__ */ e("span", { className: u.label, children: c });
57
+ };
58
+ j.displayName = `${_}.Item`;
59
+ const S = f;
60
+ S.Item = j;
61
+ export {
62
+ S as Breadcrumbs
63
+ };
@@ -0,0 +1 @@
1
+ :root{--button-bg: var(--color-background-brand);--button-bg-hover: var(--color-background-brand-hover);--button-text: var(--color-text-on-brand);--button-bg-secondary: var(--color-background-primary);--button-text-secondary: var(--color-text-secondary);--button-bg-secondary-hover: var(--color-background-secondary);--button-bg-danger: var(--color-background-error);--button-text-danger: var(--color-text-on-brand);--button-bg-danger-hover: var(--color-background-error-hover);--button-bg-disabled: var(--color-background-disabled);--button-text-disabled: var(--color-text-disabled);--button-border-disabled: var(--color-border-disabled);--button-focus-ring: var(--color-border-focus);--button-focus-ring-error: var(--color-border-focus-error);--button-radius: var(--radius-2);--button-border: var(--color-border-primary);--button-shadow: var(--shadow-xs)}._root_yed10_21{align-items:center;border:1px solid var(--button-border);border-radius:var(--button-radius);box-shadow:var(--button-shadow);display:flex;flex-direction:row;justify-content:center;outline-offset:2px;transition:background-color .2s,color .2s}._root_yed10_21._modeFilled_yed10_32._variantPrimary_yed10_32{background:var(--button-bg);color:var(--button-text)}._root_yed10_21._modeFilled_yed10_32._variantPrimary_yed10_32._pressed_yed10_36,._root_yed10_21._modeFilled_yed10_32._variantPrimary_yed10_32:active,._root_yed10_21._modeFilled_yed10_32._variantPrimary_yed10_32:hover{background:var(--button-bg-hover)}._root_yed10_21._modeFilled_yed10_32._variantPrimary_yed10_32:focus-visible{outline:2px solid var(--button-focus-ring)}._root_yed10_21._modeFilled_yed10_32._variantSecondary_yed10_42{background:var(--button-bg-secondary);color:var(--button-text-secondary)}._root_yed10_21._modeFilled_yed10_32._variantSecondary_yed10_42:active,._root_yed10_21._modeFilled_yed10_32._variantSecondary_yed10_42._pressed_yed10_36,._root_yed10_21._modeFilled_yed10_32._variantSecondary_yed10_42:hover{background:var(--button-bg-secondary-hover)}._root_yed10_21._modeFilled_yed10_32._variantSecondary_yed10_42:focus-visible{outline:2px solid var(--button-focus-ring)}._root_yed10_21._modeFilled_yed10_32._variantDanger_yed10_52{background:var(--button-bg-danger);color:var(--button-text-danger)}._root_yed10_21._modeFilled_yed10_32._variantDanger_yed10_52:active,._root_yed10_21._modeFilled_yed10_32._variantDanger_yed10_52._pressed_yed10_36,._root_yed10_21._modeFilled_yed10_32._variantDanger_yed10_52:hover{background:var(--button-bg-danger-hover)}._root_yed10_21._modeFilled_yed10_32._variantDanger_yed10_52:focus-visible{outline:2px solid var(--button-focus-ring-error)}._root_yed10_21._modeFilled_yed10_32:disabled,._root_yed10_21._modeFilled_yed10_32._disabled_yed10_62{background:var(--button-bg-disabled);border-color:var(--button-border-disabled);color:var(--button-text-disabled);cursor:not-allowed;pointer-events:none}._root_yed10_21._modeOutlined_yed10_69{background:transparent;box-shadow:none}._root_yed10_21._modeOutlined_yed10_69._variantPrimary_yed10_32{border-color:var(--color-background-brand);color:var(--color-background-brand)}._root_yed10_21._modeOutlined_yed10_69._variantPrimary_yed10_32:hover{background:var(--color-background-brand-secondary)}._root_yed10_21._modeOutlined_yed10_69._variantSecondary_yed10_42{color:var(--color-text-secondary)}._root_yed10_21._modeOutlined_yed10_69._variantSecondary_yed10_42:hover{background:var(--color-background-secondary)}._root_yed10_21._modeOutlined_yed10_69._variantDanger_yed10_52{border-color:var(--color-background-error);color:var(--color-background-error)}._root_yed10_21._modeOutlined_yed10_69._variantDanger_yed10_52:hover{background:var(--color-background-error);color:var(--color-text-on-brand)}._root_yed10_21._modeText_yed10_94{background:transparent;border-color:transparent;box-shadow:none}._root_yed10_21._modeText_yed10_94._variantPrimary_yed10_32{color:var(--color-background-brand)}._root_yed10_21._modeText_yed10_94._variantPrimary_yed10_32:hover{background:var(--color-background-brand-secondary)}._root_yed10_21._modeText_yed10_94._variantSecondary_yed10_42{color:var(--color-text-secondary)}._root_yed10_21._modeText_yed10_94._variantSecondary_yed10_42:hover{background:var(--color-background-secondary)}._root_yed10_21._modeText_yed10_94._variantDanger_yed10_52{color:var(--color-background-error)}._root_yed10_21._modeText_yed10_94._variantDanger_yed10_52:hover{background:var(--color-background-error);color:var(--color-text-on-brand)}._root_yed10_21._fullWidth_yed10_118{width:100%}._root_yed10_21._sizeSm_yed10_121{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);gap:var(--space-1);line-height:var(--line-height-sm);padding:var(--space-1) var(--space-3)}._root_yed10_21._sizeMd_yed10_128{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);gap:var(--space-1);line-height:var(--line-height-sm);padding:var(--space-2) var(--space-4)}._root_yed10_21._sizeLg_yed10_135{font-size:var(--font-size-md);font-weight:var(--font-weight-semibold);gap:var(--space-2);line-height:var(--line-height-md);padding:var(--space-3) var(--space-4)}
@@ -0,0 +1,66 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Button component. Renders a `<button>` or `<a>` element with support for size, variant, mode, and link behaviour.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <Button size="md" variant="primary" onClick={handleClick}>
9
+ * Click me
10
+ * </Button>
11
+ * ```
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * // Outlined danger button as a link
16
+ * <Button as="a" href="/delete" variant="danger" mode="outlined">
17
+ * Delete
18
+ * </Button>
19
+ * ```
20
+ */
21
+ export declare const Button: default_2.FC<IButtonProps>;
22
+
23
+ declare enum EButtonMode {
24
+ FILLED = "filled",
25
+ OUTLINED = "outlined",
26
+ TEXT = "text"
27
+ }
28
+
29
+ declare enum EButtonVariant {
30
+ PRIMARY = "primary",
31
+ SECONDARY = "secondary",
32
+ DANGER = "danger"
33
+ }
34
+
35
+ export declare interface IButtonProps extends default_2.PropsWithChildren {
36
+ /** Disable button. */
37
+ disabled?: boolean;
38
+ /** Stretch the component to the full width of the parent container. */
39
+ fullWidth?: boolean;
40
+ /** Visual mode: `'filled'` (default) — solid background, `'outlined'` — border only, `'text'` — no border or background. */
41
+ mode?: TButtonMode;
42
+ /** Event handler for click event. */
43
+ onClick?: () => void;
44
+ /** Size. */
45
+ size?: TButtonSize;
46
+ /** Variant. */
47
+ variant?: TButtonVariant;
48
+ /** Pressed. */
49
+ pressed?: boolean;
50
+ /** Link */
51
+ href?: string;
52
+ /** Link target */
53
+ target?: string;
54
+ /** Tag name. */
55
+ as?: 'a' | 'button';
56
+ /** HTML button type. */
57
+ type?: 'button' | 'submit' | 'reset';
58
+ }
59
+
60
+ declare type TButtonMode = `${EButtonMode.FILLED | EButtonMode.OUTLINED | EButtonMode.TEXT}`;
61
+
62
+ declare type TButtonSize = 'sm' | 'md' | 'lg';
63
+
64
+ declare type TButtonVariant = `${EButtonVariant.PRIMARY | EButtonVariant.SECONDARY | EButtonVariant.DANGER}`;
65
+
66
+ export { }
package/dist/button.js ADDED
@@ -0,0 +1,46 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as u } from "./clsx-OuTLNxxd.mjs";
3
+ import { g as s } from "./getVariantClassName-D7Nhpuec.mjs";
4
+ import './button.css';const f = "Button", v = "_root_yed10_21", z = "_modeFilled_yed10_32", g = "_variantPrimary_yed10_32", h = "_pressed_yed10_36", S = "_variantSecondary_yed10_42", b = "_variantDanger_yed10_52", x = "_disabled_yed10_62", N = "_modeOutlined_yed10_69", W = "_modeText_yed10_94", C = "_fullWidth_yed10_118", D = "_sizeSm_yed10_121", L = "_sizeMd_yed10_128", M = "_sizeLg_yed10_135", e = {
5
+ root: v,
6
+ modeFilled: z,
7
+ variantPrimary: g,
8
+ pressed: h,
9
+ variantSecondary: S,
10
+ variantDanger: b,
11
+ disabled: x,
12
+ modeOutlined: N,
13
+ modeText: W,
14
+ fullWidth: C,
15
+ sizeSm: D,
16
+ sizeMd: L,
17
+ sizeLg: M
18
+ }, P = (a) => {
19
+ const {
20
+ children: d,
21
+ disabled: t = !1,
22
+ fullWidth: i = !1,
23
+ mode: n = "filled",
24
+ onClick: r,
25
+ size: _ = "md",
26
+ variant: l = "primary",
27
+ pressed: m,
28
+ as: c = "button",
29
+ ...y
30
+ } = a, p = u(
31
+ e.root,
32
+ s("size", _, e),
33
+ s("variant", l, e),
34
+ s("mode", n, e),
35
+ {
36
+ [e.fullWidth]: i,
37
+ [e.pressed]: m,
38
+ [e.disabled]: t
39
+ }
40
+ );
41
+ return /* @__PURE__ */ o(c, { className: p, disabled: t, onClick: r, ...y, children: d && /* @__PURE__ */ o("span", { children: d }) });
42
+ };
43
+ P.displayName = f;
44
+ export {
45
+ P as Button
46
+ };