@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,128 @@
1
+ import { AriaDialogProps } from 'react-aria';
2
+ import { default as default_2 } from 'react';
3
+
4
+ /**
5
+ * Drawer Content sub-component.
6
+ *
7
+ * Renders the scrollable body of the drawer.
8
+ * Must be used within a Drawer component.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Drawer.Content>
13
+ * <p>Your content here.</p>
14
+ * </Drawer.Content>
15
+ * ```
16
+ */
17
+ declare const Content: default_2.FC<IContentProps>;
18
+
19
+ /**
20
+ * Drawer component.
21
+ *
22
+ * A slide-in panel that displays additional content without navigating away.
23
+ * Supports four placements (`left`, `right`, `top`, `bottom`) and three sizes (`sm`, `md`, `lg`).
24
+ * Uses `react-aria` for accessibility and overlay management.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <Drawer open={open} onOpenChange={setOpen}>
29
+ * <Drawer.Header>
30
+ * Drawer Title
31
+ * </Drawer.Header>
32
+ * <Drawer.Content>
33
+ * <p>Your content here.</p>
34
+ * </Drawer.Content>
35
+ * </Drawer>
36
+ * ```
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * <Drawer
41
+ * open={open}
42
+ * onOpenChange={setOpen}
43
+ * placement="left"
44
+ * size="lg"
45
+ * dismissable={false}
46
+ * >
47
+ * <Drawer.Header>
48
+ * Persistent Drawer
49
+ * </Drawer.Header>
50
+ * <Drawer.Content>
51
+ * <p>Cannot be closed by clicking outside.</p>
52
+ * </Drawer.Content>
53
+ * </Drawer>
54
+ * ```
55
+ */
56
+ declare const Drawer_2: default_2.FC<IDrawerProps>;
57
+
58
+ /**
59
+ * Drawer component.
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * <Drawer open={open} onOpenChange={setOpen}>
64
+ * <Drawer.Header>
65
+ * Drawer Title
66
+ * </Drawer.Header>
67
+ * <Drawer.Content>
68
+ * <div>Content</div>
69
+ * </Drawer.Content>
70
+ * </Drawer>
71
+ * ```
72
+ */
73
+ declare const DrawerCompoundComponent: TDrawerCompoundComponent;
74
+ export { DrawerCompoundComponent as Drawer }
75
+ export default DrawerCompoundComponent;
76
+
77
+ /**
78
+ * Drawer Header sub-component.
79
+ *
80
+ * Renders the title and a close button.
81
+ * Must be used within a Drawer component.
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * <Drawer.Header>
86
+ * Drawer Title
87
+ * </Drawer.Header>
88
+ * ```
89
+ */
90
+ declare const Header: default_2.FC<IHeaderProps>;
91
+
92
+ export declare interface IContentProps extends default_2.PropsWithChildren {
93
+ }
94
+
95
+ export declare interface IDrawerProps extends default_2.PropsWithChildren, AriaDialogProps {
96
+ /** Whether the drawer is open. */
97
+ open?: boolean;
98
+ /** Callback when open state changes. */
99
+ onOpenChange?: (open: boolean) => void;
100
+ /** Placement. Default: `'right'`. */
101
+ placement?: TDrawerPlacement;
102
+ /** Size. Default: `'md'`. */
103
+ size?: TDrawerSize;
104
+ /** Whether clicking the underlay closes the drawer. Default: `true`. */
105
+ dismissable?: boolean;
106
+ /** Portal container element. */
107
+ container?: HTMLElement;
108
+ }
109
+
110
+ export declare interface IHeaderProps extends default_2.PropsWithChildren {
111
+ }
112
+
113
+ declare type TDrawerCompoundComponent = typeof Drawer_2 & {
114
+ Content: typeof Content;
115
+ Header: typeof Header;
116
+ };
117
+
118
+ /**
119
+ * Drawer placements.
120
+ */
121
+ declare type TDrawerPlacement = 'bottom' | 'left' | 'right' | 'top';
122
+
123
+ /**
124
+ * Drawer sizes.
125
+ */
126
+ declare type TDrawerSize = 'lg' | 'md' | 'sm';
127
+
128
+ export { }
package/dist/drawer.js ADDED
@@ -0,0 +1,106 @@
1
+ import { jsx as t, jsxs as g } from "react/jsx-runtime";
2
+ import { createContext as S, useContext as H, useRef as d, useState as h, useEffect as I, useMemo as P } from "react";
3
+ import { c as j } from "./clsx-OuTLNxxd.mjs";
4
+ import { $ as B, a as F } from "./useModalOverlay-D5Bs9FCB.mjs";
5
+ import { r as k } from "./Overlay-RmiBtqDR.mjs";
6
+ import { a as K } from "./useOverlayTriggerState-BIo1Jcba.mjs";
7
+ import { g as U } from "./getComponentSlots-DwAYUFNk.mjs";
8
+ import { g as C } from "./getVariantClassName-D7Nhpuec.mjs";
9
+ import { u as V } from "./useLocale-D2Z0JH0l.mjs";
10
+ import './drawer.css';var s = /* @__PURE__ */ ((e) => (e.CONTENT = "Drawer.Content", e.HEADER = "Drawer.Header", e))(s || {});
11
+ const X = "_root_jagsa_1", Y = {
12
+ root: X
13
+ }, T = (e) => {
14
+ const { children: n } = e;
15
+ return /* @__PURE__ */ t("div", { className: Y.root, children: n });
16
+ };
17
+ T.displayName = s.CONTENT;
18
+ const G = "Drawer", J = [s.CONTENT, s.HEADER], E = S(null), Q = () => {
19
+ const e = H(E);
20
+ if (!e)
21
+ throw new Error("Drawer sub-components must be used within a Drawer component.");
22
+ return e;
23
+ }, W = "_underlay_7b6q3_24", Z = "_modal_7b6q3_32", ee = "_drawer_7b6q3_37", te = "_placementLeft_7b6q3_47", oe = "_entered_7b6q3_53", se = "_placementRight_7b6q3_56", ne = "_placementTop_7b6q3_65", re = "_placementBottom_7b6q3_74", ae = "_sizeSm_7b6q3_83", ce = "_sizeMd_7b6q3_90", le = "_sizeLg_7b6q3_97", ie = "_content_7b6q3_105", o = {
24
+ underlay: W,
25
+ modal: Z,
26
+ drawer: ee,
27
+ placementLeft: te,
28
+ entered: oe,
29
+ placementRight: se,
30
+ placementTop: ne,
31
+ placementBottom: re,
32
+ sizeSm: ae,
33
+ sizeMd: ce,
34
+ sizeLg: le,
35
+ content: ie
36
+ }, me = 300, $ = (e) => {
37
+ const { children: n, container: a, dismissable: c = !0, onOpenChange: l, open: r, placement: x = "right", size: y = "md" } = e, f = d(null), u = d(null), { dialogProps: A } = B(e, f), p = K({ isOpen: r, onOpenChange: l }), { modalProps: R, underlayProps: z } = F(
38
+ { isDismissable: c, isKeyboardDismissDisabled: !1 },
39
+ p,
40
+ u
41
+ ), [b, N] = h(r || !1), [L, w] = h(!1), i = d(b);
42
+ I(() => {
43
+ if (r) {
44
+ i.current = !0, N(!0);
45
+ const m = requestAnimationFrame(() => {
46
+ requestAnimationFrame(() => {
47
+ w(!0);
48
+ });
49
+ });
50
+ return () => cancelAnimationFrame(m);
51
+ }
52
+ if (i.current) {
53
+ w(!1);
54
+ const m = setTimeout(() => {
55
+ i.current = !1, N(!1);
56
+ }, me);
57
+ return () => clearTimeout(m);
58
+ }
59
+ }, [r]);
60
+ const {
61
+ [s.CONTENT]: D,
62
+ [s.HEADER]: M
63
+ } = P(() => U(n, J), [n]), O = j(
64
+ o.drawer,
65
+ C("size", y, o),
66
+ C("placement", x, o),
67
+ { [o.entered]: L }
68
+ );
69
+ return b ? /* @__PURE__ */ t(k, { portalContainer: a, children: /* @__PURE__ */ t("div", { className: o.underlay, ...z, children: /* @__PURE__ */ t("div", { className: o.modal, ...R, ref: u, children: /* @__PURE__ */ t(E.Provider, { value: { close: () => p.close() }, children: /* @__PURE__ */ g(
70
+ "div",
71
+ {
72
+ "aria-label": "Drawer",
73
+ "aria-modal": "true",
74
+ className: O,
75
+ role: "dialog",
76
+ ...A,
77
+ ref: f,
78
+ children: [
79
+ M,
80
+ D && /* @__PURE__ */ t("div", { className: o.content, children: D })
81
+ ]
82
+ }
83
+ ) }) }) }) }) : null;
84
+ };
85
+ $.displayName = G;
86
+ const de = "_root_1fwv3_13", _e = "_title_1fwv3_21", fe = "_close_1fwv3_31", _ = {
87
+ root: de,
88
+ title: _e,
89
+ close: fe
90
+ }, q = (e) => {
91
+ const { children: n } = e, { close: a } = Q(), c = V(), l = (r) => {
92
+ r.preventDefault(), a();
93
+ };
94
+ return /* @__PURE__ */ g("div", { className: _.root, children: [
95
+ /* @__PURE__ */ t("div", { className: _.title, children: n }),
96
+ /* @__PURE__ */ t("button", { "aria-label": c.dialog.close, className: _.close, onClick: l, type: "button", children: "X" })
97
+ ] });
98
+ };
99
+ q.displayName = s.HEADER;
100
+ const v = $;
101
+ v.Content = T;
102
+ v.Header = q;
103
+ export {
104
+ v as Drawer,
105
+ v as default
106
+ };
@@ -0,0 +1 @@
1
+ ._actions_1pohs_1{align-items:center;display:flex;gap:var(--space-2);margin-top:var(--space-2)}._content_laixm_1{width:100%}:root{--empty-state-icon-size: 48px}._root_131ay_5{align-items:center;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-10) var(--space-5);text-align:center}._icon_131ay_14{font-size:var(--empty-state-icon-size);line-height:1;margin-bottom:var(--space-2)}._title_131ay_20{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_131ay_28{color:var(--color-text-secondary);font-size:var(--font-size-sm);line-height:var(--line-height-sm);margin:0;max-width:400px}
@@ -0,0 +1,33 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Wrapper for action buttons inside EmptyState.
5
+ * Accepts only `<Button>` components as children.
6
+ * Auto-assigns variant based on position:
7
+ * - first child → `primary`
8
+ * - subsequent children → `secondary`
9
+ * unless the Button already has an explicit `variant` prop.
10
+ */
11
+ declare const Actions: default_2.FC<default_2.PropsWithChildren>;
12
+
13
+ declare const Content: default_2.FC<IProps>;
14
+
15
+ export declare const EmptyState: TEmptyStateCompoundComponent;
16
+
17
+ declare const EmptyState_2: default_2.FC<IEmptyStateProps>;
18
+
19
+ export declare interface IEmptyStateProps extends default_2.PropsWithChildren {
20
+ description?: string;
21
+ icon?: default_2.ReactNode;
22
+ title?: string;
23
+ }
24
+
25
+ declare interface IProps extends default_2.PropsWithChildren {
26
+ }
27
+
28
+ declare type TEmptyStateCompoundComponent = typeof EmptyState_2 & {
29
+ Actions: typeof Actions;
30
+ Content: typeof Content;
31
+ };
32
+
33
+ export { }
@@ -0,0 +1,52 @@
1
+ import { jsx as c, jsxs as C } from "react/jsx-runtime";
2
+ import T, { cloneElement as S } from "react";
3
+ import { i as A } from "./isValidReactNode-CmYwTWCE.mjs";
4
+ import "./camelCase-PtIYufW8.mjs";
5
+ import { c as h } from "./clsx-OuTLNxxd.mjs";
6
+ import { g as u } from "./getComponentSlots-DwAYUFNk.mjs";
7
+ import './empty-state.css';const l = "EmptyState";
8
+ var o = ((t) => (t.ACTIONS = `${l}.Actions`, t.CONTENT = `${l}.Content`, t))(o || {});
9
+ const E = "_actions_1pohs_1", O = {
10
+ actions: E
11
+ }, p = ({ children: t }) => {
12
+ const s = T.Children.toArray(t), r = s.map((n, e) => {
13
+ if (!A("Button", n))
14
+ return n;
15
+ const i = n.props.variant;
16
+ return S(n, {
17
+ key: e,
18
+ ...i ? {} : { variant: i ?? (e === 0 ? "primary" : "secondary") }
19
+ });
20
+ });
21
+ return s.length === 0 ? null : /* @__PURE__ */ c("div", { className: O.actions, children: r });
22
+ };
23
+ p.displayName = o.ACTIONS;
24
+ const v = "_content_laixm_1", f = {
25
+ content: v
26
+ }, N = (t) => {
27
+ const { children: s } = t;
28
+ return /* @__PURE__ */ c("div", { className: f.content, children: s });
29
+ };
30
+ N.displayName = o.CONTENT;
31
+ const I = "_root_131ay_5", $ = "_icon_131ay_14", x = "_title_131ay_20", g = "_description_131ay_28", a = {
32
+ root: I,
33
+ 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);
38
+ 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 }),
42
+ y,
43
+ m
44
+ ] });
45
+ };
46
+ d.displayName = l;
47
+ const _ = d;
48
+ _.Actions = p;
49
+ _.Content = N;
50
+ export {
51
+ _ as EmptyState
52
+ };
@@ -0,0 +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}
@@ -0,0 +1,55 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * React Error Boundary component.
5
+ *
6
+ * Catches JavaScript errors anywhere in its child component tree, logs those
7
+ * errors, and displays a fallback UI instead of the crashed component tree.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <ErrorBoundary>
12
+ * <MyComponent />
13
+ * </ErrorBoundary>
14
+ * ```
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <ErrorBoundary
19
+ * fallback={(error, reset) => (
20
+ * <div>
21
+ * <p>Something went wrong: {error.message}</p>
22
+ * <button onClick={reset}>Try again</button>
23
+ * </div>
24
+ * )}
25
+ * onError={(error) => console.error(error)}
26
+ * >
27
+ * <MyComponent />
28
+ * </ErrorBoundary>
29
+ * ```
30
+ */
31
+ export declare class ErrorBoundary extends default_2.Component<IErrorBoundaryProps, IErrorBoundaryState> {
32
+ static displayName: string;
33
+ constructor(props: IErrorBoundaryProps);
34
+ static getDerivedStateFromError(error: Error): IErrorBoundaryState;
35
+ componentDidCatch(error: Error, errorInfo: default_2.ErrorInfo): void;
36
+ componentDidUpdate(prevProps: IErrorBoundaryProps): void;
37
+ private handleReset;
38
+ render(): default_2.ReactNode;
39
+ }
40
+
41
+ export declare interface IErrorBoundaryProps extends default_2.PropsWithChildren {
42
+ /** Custom fallback element or render function `(error, reset) => ReactNode`. */
43
+ fallback?: default_2.ReactNode | ((error: Error, reset: () => void) => default_2.ReactNode);
44
+ /** Called when an error is caught. */
45
+ onError?: (error: Error, errorInfo: default_2.ErrorInfo) => void;
46
+ /** Resets the error boundary when the value changes. */
47
+ resetKey?: unknown;
48
+ }
49
+
50
+ declare interface IErrorBoundaryState {
51
+ hasError: boolean;
52
+ error: Error | null;
53
+ }
54
+
55
+ export { }
@@ -0,0 +1,37 @@
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 = {
4
+ root: a,
5
+ title: c,
6
+ description: p
7
+ };
8
+ class u extends i.Component {
9
+ static displayName = n;
10
+ constructor(r) {
11
+ super(r), this.state = { hasError: !1, error: null };
12
+ }
13
+ static getDerivedStateFromError(r) {
14
+ return { hasError: !0, error: r };
15
+ }
16
+ componentDidCatch(r, t) {
17
+ this.props.onError?.(r, t);
18
+ }
19
+ componentDidUpdate(r) {
20
+ this.props.resetKey !== void 0 && this.props.resetKey !== r.resetKey && this.handleReset();
21
+ }
22
+ handleReset = () => {
23
+ this.setState({ hasError: !1, error: null });
24
+ };
25
+ render() {
26
+ if (!this.state.hasError)
27
+ return this.props.children;
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: [
30
+ /* @__PURE__ */ s("h3", { className: e.title, children: "Something went wrong" }),
31
+ /* @__PURE__ */ s("p", { className: e.description, children: t?.message ?? "An unexpected error occurred." })
32
+ ] });
33
+ }
34
+ }
35
+ export {
36
+ u as ErrorBoundary
37
+ };
package/dist/flex.css ADDED
@@ -0,0 +1 @@
1
+ :root{--flex-gap: 0;--flex-px: 0;--flex-py: 0}._root_1mp2w_7{display:flex;gap:var(--flex-gap);padding-block:var(--flex-py);padding-inline:var(--flex-px)}._directionRow_1mp2w_14{flex-direction:row}._directionColumn_1mp2w_18{flex-direction:column}._directionRowReverse_1mp2w_22{flex-direction:row-reverse}._directionColumnReverse_1mp2w_26{flex-direction:column-reverse}._alignFlexStart_1mp2w_30{align-items:flex-start}._alignCenter_1mp2w_34{align-items:center}._alignFlexEnd_1mp2w_38{align-items:flex-end}._alignStretch_1mp2w_42{align-items:stretch}._alignBaseline_1mp2w_46{align-items:baseline}._justifyFlexStart_1mp2w_50{justify-content:flex-start}._justifyCenter_1mp2w_54{justify-content:center}._justifyFlexEnd_1mp2w_58{justify-content:flex-end}._justifySpaceBetween_1mp2w_62{justify-content:space-between}._justifySpaceAround_1mp2w_66{justify-content:space-around}._justifySpaceEvenly_1mp2w_70{justify-content:space-evenly}._fullWidth_1mp2w_74{width:100%}._wrap_1mp2w_78{flex-wrap:wrap}._grow_1mp2w_82{flex-grow:1}._shrink_1mp2w_86{flex-shrink:1}
package/dist/flex.d.ts ADDED
@@ -0,0 +1,68 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Flex component. A utility container for flexbox layouts.
5
+ *
6
+ * Maps common flexbox properties to props, eliminating inline `display: flex` styles.
7
+ * Supports direction, alignment, justification, gap, padding, wrap, grow, and shrink.
8
+ * Renders as a configurable HTML tag via the `as` prop.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Flex direction="column" gap={4} align="center">
13
+ * <div>Item 1</div>
14
+ * <div>Item 2</div>
15
+ * </Flex>
16
+ * ```
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Flex justify="space-between" align="center" px={4} py={2}>
21
+ * <span>Left</span>
22
+ * <span>Right</span>
23
+ * </Flex>
24
+ * ```
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <Flex as="nav" gap={3} wrap>
29
+ * <a href="#">Link</a>
30
+ * <a href="#">Link</a>
31
+ * </Flex>
32
+ * ```
33
+ */
34
+ export declare const Flex: default_2.FC<IFlexProps>;
35
+
36
+ export declare interface IFlexProps extends default_2.PropsWithChildren {
37
+ /** Flex direction. Default: `'row'`. */
38
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
39
+ /** Align-items. */
40
+ align?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
41
+ /** Justify-content. */
42
+ justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
43
+ /** Gap between children (maps to `--space-{n}`). */
44
+ gap?: TSpaceToken;
45
+ /** Flex-wrap. */
46
+ wrap?: boolean;
47
+ /** Padding horizontal (maps to `--space-{n}`). */
48
+ px?: TSpaceToken;
49
+ /** Padding vertical (maps to `--space-{n}`). */
50
+ py?: TSpaceToken;
51
+ /** Full width. */
52
+ fullWidth?: boolean;
53
+ /** Flex-grow. */
54
+ grow?: boolean;
55
+ /** Flex-shrink. */
56
+ shrink?: boolean;
57
+ /** Tag to render. Default: `'div'`. */
58
+ as?: 'div' | 'span' | 'section' | 'article' | 'nav' | 'header' | 'footer' | 'main' | 'aside';
59
+ /** HTML id. */
60
+ id?: string;
61
+ /** Inline styles override. */
62
+ style?: default_2.CSSProperties;
63
+ }
64
+
65
+ /** Space token values that map to `--space-{n}` CSS variables. */
66
+ export declare type TSpaceToken = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10;
67
+
68
+ export { }
package/dist/flex.js ADDED
@@ -0,0 +1,73 @@
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { c as x } from "./clsx-OuTLNxxd.mjs";
3
+ import { c as j } from "./camelCase-PtIYufW8.mjs";
4
+ import './flex.css';const S = "Flex", v = "_root_1mp2w_7", C = "_directionRow_1mp2w_14", F = "_directionColumn_1mp2w_18", h = "_directionRowReverse_1mp2w_22", R = "_directionColumnReverse_1mp2w_26", E = "_alignFlexStart_1mp2w_30", B = "_alignCenter_1mp2w_34", k = "_alignFlexEnd_1mp2w_38", A = "_alignStretch_1mp2w_42", W = "_alignBaseline_1mp2w_46", $ = "_justifyFlexStart_1mp2w_50", N = "_justifyCenter_1mp2w_54", D = "_justifyFlexEnd_1mp2w_58", I = "_justifySpaceBetween_1mp2w_62", L = "_justifySpaceAround_1mp2w_66", M = "_justifySpaceEvenly_1mp2w_70", P = "_fullWidth_1mp2w_74", Y = "_wrap_1mp2w_78", b = "_grow_1mp2w_82", q = "_shrink_1mp2w_86", e = {
5
+ root: v,
6
+ directionRow: C,
7
+ directionColumn: F,
8
+ directionRowReverse: h,
9
+ directionColumnReverse: R,
10
+ alignFlexStart: E,
11
+ alignCenter: B,
12
+ alignFlexEnd: k,
13
+ alignStretch: A,
14
+ alignBaseline: W,
15
+ justifyFlexStart: $,
16
+ justifyCenter: N,
17
+ justifyFlexEnd: D,
18
+ justifySpaceBetween: I,
19
+ justifySpaceAround: L,
20
+ justifySpaceEvenly: M,
21
+ fullWidth: P,
22
+ wrap: Y,
23
+ grow: b,
24
+ shrink: q
25
+ };
26
+ function i(n, t) {
27
+ return e[j(`${n}-${t}`)];
28
+ }
29
+ const z = (n) => {
30
+ const {
31
+ align: t,
32
+ as: c = "div",
33
+ children: _,
34
+ direction: a = "row",
35
+ fullWidth: p,
36
+ gap: o,
37
+ grow: u,
38
+ id: w,
39
+ justify: s,
40
+ px: l,
41
+ py: r,
42
+ shrink: m,
43
+ style: d,
44
+ wrap: f
45
+ } = n, y = x(
46
+ e.root,
47
+ i("direction", a),
48
+ t != null && i("align", t),
49
+ s != null && i("justify", s),
50
+ f && e.wrap,
51
+ p && e.fullWidth,
52
+ u && e.grow,
53
+ m && e.shrink
54
+ );
55
+ return /* @__PURE__ */ g(
56
+ c,
57
+ {
58
+ className: y,
59
+ id: w,
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,
64
+ ...d
65
+ },
66
+ children: _
67
+ }
68
+ );
69
+ };
70
+ z.displayName = S;
71
+ export {
72
+ z as Flex
73
+ };
@@ -0,0 +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}
@@ -0,0 +1,27 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * FormField component. Wraps form inputs with label, required indicator, and error message.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <FormField label="Name" required>
9
+ * <input />
10
+ * </FormField>
11
+ * <FormField label="Email" error="Invalid email">
12
+ * <input />
13
+ * </FormField>
14
+ * ```
15
+ */
16
+ export declare const FormField: default_2.FC<IFormFieldProps>;
17
+
18
+ export declare interface IFormFieldProps extends default_2.PropsWithChildren {
19
+ /** Label text displayed above the field. */
20
+ label?: string;
21
+ /** Error message displayed below the field. */
22
+ error?: string;
23
+ /** Whether the field is required. Default: false. */
24
+ required?: boolean;
25
+ }
26
+
27
+ export { }
@@ -0,0 +1,22 @@
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
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: _,
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);
10
+ return /* @__PURE__ */ l("div", { className: i, children: [
11
+ o && /* @__PURE__ */ l("label", { className: r.label, children: [
12
+ o,
13
+ t && /* @__PURE__ */ s("span", { className: r.required, "aria-hidden": "true", children: " *" })
14
+ ] }),
15
+ c,
16
+ e && /* @__PURE__ */ s("p", { className: r.error, role: "alert", children: e })
17
+ ] });
18
+ };
19
+ N.displayName = d;
20
+ export {
21
+ N as FormField
22
+ };
@@ -0,0 +1,16 @@
1
+ import i from "react";
2
+ import { i as n } from "./isValidReactNode-CmYwTWCE.mjs";
3
+ const c = (f, o) => {
4
+ const e = { children: [] };
5
+ return o.forEach((r) => {
6
+ e[r] = null;
7
+ }), i.Children.forEach(f, (r) => {
8
+ let t = !1;
9
+ o.forEach((a) => {
10
+ n(a, r, !1) && (e[a] = r, t = !0), t || e.children.push(r);
11
+ });
12
+ }), e;
13
+ };
14
+ export {
15
+ c as g
16
+ };
@@ -0,0 +1,8 @@
1
+ import { c as r } from "./camelCase-PtIYufW8.mjs";
2
+ const m = (s, e, t) => {
3
+ const a = r(`${s}-${e}`);
4
+ return t[a] || a;
5
+ };
6
+ export {
7
+ m as g
8
+ };
package/dist/input.css ADDED
@@ -0,0 +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}