@jixic/react-ui 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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @jixic/react-ui
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Initial public preview with Button, Input, Card, Badge, Alert, Modal, Spinner, Skeleton, and EmptyState.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jixic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @jixic/react-ui
2
+
3
+ A React and TypeScript UI component library for web and Next.js applications. The package is framework-agnostic and does not depend on Next.js APIs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @jixic/react-ui react react-dom
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Button, Card, CardContent, Input } from "@jixic/react-ui";
15
+ import "@jixic/react-ui/styles.css";
16
+
17
+ export function Example() {
18
+ return (
19
+ <Card>
20
+ <CardContent>
21
+ <Input label="Email" type="email" />
22
+ <Button>Continue</Button>
23
+ </CardContent>
24
+ </Card>
25
+ );
26
+ }
27
+ ```
28
+
29
+ Set `data-ui-theme="dark"` on any parent element to enable dark theme tokens.
package/dist/index.cjs ADDED
@@ -0,0 +1,351 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ Alert: () => Alert,
25
+ Badge: () => Badge,
26
+ Button: () => Button,
27
+ Card: () => Card,
28
+ CardContent: () => CardContent,
29
+ CardFooter: () => CardFooter,
30
+ CardHeader: () => CardHeader,
31
+ EmptyState: () => EmptyState,
32
+ Input: () => Input,
33
+ Modal: () => Modal,
34
+ Skeleton: () => Skeleton,
35
+ Spinner: () => Spinner,
36
+ colors: () => colors,
37
+ spacing: () => spacing,
38
+ typography: () => typography
39
+ });
40
+ module.exports = __toCommonJS(index_exports);
41
+
42
+ // src/components/Alert/Alert.tsx
43
+ var import_react = require("react");
44
+
45
+ // src/utils/cx.ts
46
+ function cx(...classes) {
47
+ return classes.filter(Boolean).join(" ");
48
+ }
49
+
50
+ // src/components/Alert/Alert.tsx
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ var Alert = (0, import_react.forwardRef)(function Alert2({ children, className, title, variant = "info", ...props }, ref) {
53
+ const role = variant === "danger" || variant === "warning" ? "alert" : "status";
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
55
+ "div",
56
+ {
57
+ className: cx("ui-alert", `ui-alert-${variant}`, className),
58
+ ref,
59
+ role,
60
+ ...props,
61
+ children: [
62
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ui-alert-title", children: title }) : null,
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children })
64
+ ]
65
+ }
66
+ );
67
+ });
68
+
69
+ // src/components/Badge/Badge.tsx
70
+ var import_react2 = require("react");
71
+ var import_jsx_runtime2 = require("react/jsx-runtime");
72
+ var Badge = (0, import_react2.forwardRef)(function Badge2({ className, variant = "neutral", ...props }, ref) {
73
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cx("ui-badge", `ui-badge-${variant}`, className), ref, ...props });
74
+ });
75
+
76
+ // src/components/Button/Button.tsx
77
+ var import_react3 = require("react");
78
+
79
+ // src/components/Spinner/Spinner.tsx
80
+ var import_jsx_runtime3 = require("react/jsx-runtime");
81
+ function Spinner({ className, label = "Loading", size = "md", ...props }) {
82
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
83
+ "span",
84
+ {
85
+ "aria-label": label,
86
+ className: cx("ui-spinner", size !== "md" && `ui-spinner-${size}`, className),
87
+ role: "status",
88
+ ...props
89
+ }
90
+ );
91
+ }
92
+
93
+ // src/components/Button/Button.tsx
94
+ var import_jsx_runtime4 = require("react/jsx-runtime");
95
+ var Button = (0, import_react3.forwardRef)(function Button2({
96
+ children,
97
+ className,
98
+ disabled,
99
+ isLoading = false,
100
+ leftIcon,
101
+ rightIcon,
102
+ size = "md",
103
+ type = "button",
104
+ variant = "primary",
105
+ ...props
106
+ }, ref) {
107
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
108
+ "button",
109
+ {
110
+ className: cx(
111
+ "ui-button",
112
+ `ui-button-${variant}`,
113
+ size !== "md" && `ui-button-${size}`,
114
+ className
115
+ ),
116
+ "data-loading": isLoading ? "true" : void 0,
117
+ disabled: disabled || isLoading,
118
+ ref,
119
+ type,
120
+ ...props,
121
+ children: [
122
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Spinner, { label: "Loading", size: "sm" }) : leftIcon,
123
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children }),
124
+ !isLoading ? rightIcon : null
125
+ ]
126
+ }
127
+ );
128
+ });
129
+
130
+ // src/components/Card/Card.tsx
131
+ var import_react4 = require("react");
132
+ var import_jsx_runtime5 = require("react/jsx-runtime");
133
+ var Card = (0, import_react4.forwardRef)(function Card2({ className, ...props }, ref) {
134
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cx("ui-card", className), ref, ...props });
135
+ });
136
+ var CardHeader = (0, import_react4.forwardRef)(function CardHeader2({ className, ...props }, ref) {
137
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cx("ui-card-header", className), ref, ...props });
138
+ });
139
+ var CardContent = (0, import_react4.forwardRef)(function CardContent2({ className, ...props }, ref) {
140
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cx("ui-card-content", className), ref, ...props });
141
+ });
142
+ var CardFooter = (0, import_react4.forwardRef)(function CardFooter2({ className, ...props }, ref) {
143
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cx("ui-card-footer", className), ref, ...props });
144
+ });
145
+
146
+ // src/components/EmptyState/EmptyState.tsx
147
+ var import_react5 = require("react");
148
+ var import_jsx_runtime6 = require("react/jsx-runtime");
149
+ var EmptyState = (0, import_react5.forwardRef)(function EmptyState2({ action, className, description, icon, title, ...props }, ref) {
150
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: cx("ui-empty-state", className), ref, ...props, children: [
151
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "aria-hidden": "true", children: icon }) : null,
152
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "ui-empty-state-title", children: title }),
153
+ description ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "ui-empty-state-description", children: description }) : null,
154
+ action
155
+ ] });
156
+ });
157
+
158
+ // src/components/Input/Input.tsx
159
+ var import_react6 = require("react");
160
+ var import_jsx_runtime7 = require("react/jsx-runtime");
161
+ var Input = (0, import_react6.forwardRef)(function Input2({ className, error, helperText, id, label, ...props }, ref) {
162
+ const generatedId = (0, import_react6.useId)();
163
+ const inputId = id ?? generatedId;
164
+ const descriptionId = helperText ? `${inputId}-help` : void 0;
165
+ const errorId = error ? `${inputId}-error` : void 0;
166
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "ui-input-field", children: [
167
+ label ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { className: "ui-label", htmlFor: inputId, children: label }) : null,
168
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
169
+ "input",
170
+ {
171
+ "aria-describedby": cx(descriptionId, errorId) || void 0,
172
+ "aria-invalid": error ? true : void 0,
173
+ className: cx("ui-input", error && "ui-input-error", className),
174
+ id: inputId,
175
+ ref,
176
+ ...props
177
+ }
178
+ ),
179
+ helperText ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ui-field-help", id: descriptionId, children: helperText }) : null,
180
+ error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
181
+ ] });
182
+ });
183
+
184
+ // src/components/Modal/Modal.tsx
185
+ var import_react7 = require("react");
186
+ var import_jsx_runtime8 = require("react/jsx-runtime");
187
+ function getFocusable(container) {
188
+ return Array.from(
189
+ container.querySelectorAll(
190
+ 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
191
+ )
192
+ ).filter((element) => !element.hasAttribute("disabled") && element.tabIndex !== -1);
193
+ }
194
+ var Modal = (0, import_react7.forwardRef)(function Modal2({ children, className, closeLabel = "Close dialog", isOpen, onOpenChange, title, ...props }, ref) {
195
+ const titleId = (0, import_react7.useId)();
196
+ const dialogRef = (0, import_react7.useRef)(null);
197
+ (0, import_react7.useEffect)(() => {
198
+ if (!isOpen) {
199
+ return;
200
+ }
201
+ const previousActiveElement = document.activeElement instanceof HTMLElement ? document.activeElement : null;
202
+ const focusable = dialogRef.current ? getFocusable(dialogRef.current) : [];
203
+ focusable[0]?.focus();
204
+ return () => {
205
+ previousActiveElement?.focus();
206
+ };
207
+ }, [isOpen]);
208
+ if (!isOpen) {
209
+ return null;
210
+ }
211
+ function handleOverlayClick(event) {
212
+ if (event.target === event.currentTarget) {
213
+ onOpenChange(false);
214
+ }
215
+ }
216
+ function handleKeyDown(event) {
217
+ if (event.key === "Escape") {
218
+ onOpenChange(false);
219
+ return;
220
+ }
221
+ if (event.key !== "Tab" || !dialogRef.current) {
222
+ return;
223
+ }
224
+ const focusable = getFocusable(dialogRef.current);
225
+ if (focusable.length === 0) {
226
+ return;
227
+ }
228
+ const first = focusable[0];
229
+ const last = focusable.at(-1);
230
+ if (!first || !last) {
231
+ return;
232
+ }
233
+ if (event.shiftKey && document.activeElement === first) {
234
+ event.preventDefault();
235
+ last.focus();
236
+ } else if (!event.shiftKey && document.activeElement === last) {
237
+ event.preventDefault();
238
+ first.focus();
239
+ }
240
+ }
241
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ui-modal-overlay", onClick: handleOverlayClick, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
242
+ "div",
243
+ {
244
+ "aria-labelledby": titleId,
245
+ "aria-modal": "true",
246
+ className: cx("ui-modal", className),
247
+ onKeyDown: handleKeyDown,
248
+ ref: (node) => {
249
+ dialogRef.current = node;
250
+ if (typeof ref === "function") {
251
+ ref(node);
252
+ } else if (ref) {
253
+ ref.current = node;
254
+ }
255
+ },
256
+ role: "dialog",
257
+ ...props,
258
+ children: [
259
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "ui-modal-header", children: [
260
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "ui-modal-title", id: titleId, children: title }),
261
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
262
+ "button",
263
+ {
264
+ "aria-label": closeLabel,
265
+ className: "ui-modal-close",
266
+ onClick: () => onOpenChange(false),
267
+ type: "button",
268
+ children: "\xD7"
269
+ }
270
+ )
271
+ ] }),
272
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ui-modal-body", children })
273
+ ]
274
+ }
275
+ ) });
276
+ });
277
+
278
+ // src/components/Skeleton/Skeleton.tsx
279
+ var import_react8 = require("react");
280
+ var import_jsx_runtime9 = require("react/jsx-runtime");
281
+ var Skeleton = (0, import_react8.forwardRef)(function Skeleton2({ className, height = "1rem", style, width = "100%", ...props }, ref) {
282
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
283
+ "div",
284
+ {
285
+ "aria-hidden": "true",
286
+ className: cx("ui-skeleton", className),
287
+ ref,
288
+ style: { height, width, ...style },
289
+ ...props
290
+ }
291
+ );
292
+ });
293
+
294
+ // src/tokens/colors.ts
295
+ var colors = {
296
+ background: "var(--ui-color-background)",
297
+ foreground: "var(--ui-color-foreground)",
298
+ surface: "var(--ui-color-surface)",
299
+ surfaceRaised: "var(--ui-color-surface-raised)",
300
+ border: "var(--ui-color-border)",
301
+ primary: "var(--ui-color-primary)",
302
+ primaryForeground: "var(--ui-color-primary-foreground)",
303
+ danger: "var(--ui-color-danger)",
304
+ dangerForeground: "var(--ui-color-danger-foreground)",
305
+ success: "var(--ui-color-success)",
306
+ successForeground: "var(--ui-color-success-foreground)",
307
+ warning: "var(--ui-color-warning)",
308
+ warningForeground: "var(--ui-color-warning-foreground)",
309
+ muted: "var(--ui-color-muted)",
310
+ mutedForeground: "var(--ui-color-muted-foreground)"
311
+ };
312
+
313
+ // src/tokens/spacing.ts
314
+ var spacing = {
315
+ 0: "0",
316
+ 1: "var(--ui-space-1)",
317
+ 2: "var(--ui-space-2)",
318
+ 3: "var(--ui-space-3)",
319
+ 4: "var(--ui-space-4)",
320
+ 5: "var(--ui-space-5)",
321
+ 6: "var(--ui-space-6)",
322
+ 8: "var(--ui-space-8)"
323
+ };
324
+
325
+ // src/tokens/typography.ts
326
+ var typography = {
327
+ fontFamily: "var(--ui-font-family)",
328
+ fontSizeSm: "var(--ui-font-size-sm)",
329
+ fontSizeMd: "var(--ui-font-size-md)",
330
+ fontSizeLg: "var(--ui-font-size-lg)",
331
+ lineHeight: "var(--ui-line-height)"
332
+ };
333
+ // Annotate the CommonJS export names for ESM import in node:
334
+ 0 && (module.exports = {
335
+ Alert,
336
+ Badge,
337
+ Button,
338
+ Card,
339
+ CardContent,
340
+ CardFooter,
341
+ CardHeader,
342
+ EmptyState,
343
+ Input,
344
+ Modal,
345
+ Skeleton,
346
+ Spinner,
347
+ colors,
348
+ spacing,
349
+ typography
350
+ });
351
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/components/Alert/Alert.tsx","../src/utils/cx.ts","../src/components/Badge/Badge.tsx","../src/components/Button/Button.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Card/Card.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Input/Input.tsx","../src/components/Modal/Modal.tsx","../src/components/Skeleton/Skeleton.tsx","../src/tokens/colors.ts","../src/tokens/spacing.ts","../src/tokens/typography.ts"],"sourcesContent":["export { Alert } from \"./components/Alert/Alert\";\nexport type { AlertProps } from \"./components/Alert/Alert\";\nexport { Badge } from \"./components/Badge/Badge\";\nexport type { BadgeProps } from \"./components/Badge/Badge\";\nexport { Button } from \"./components/Button/Button\";\nexport type { ButtonProps } from \"./components/Button/Button\";\nexport { Card, CardContent, CardFooter, CardHeader } from \"./components/Card/Card\";\nexport type {\n CardContentProps,\n CardFooterProps,\n CardHeaderProps,\n CardProps,\n} from \"./components/Card/Card\";\nexport { EmptyState } from \"./components/EmptyState/EmptyState\";\nexport type { EmptyStateProps } from \"./components/EmptyState/EmptyState\";\nexport { Input } from \"./components/Input/Input\";\nexport type { InputProps } from \"./components/Input/Input\";\nexport { Modal } from \"./components/Modal/Modal\";\nexport type { ModalProps } from \"./components/Modal/Modal\";\nexport { Skeleton } from \"./components/Skeleton/Skeleton\";\nexport type { SkeletonProps } from \"./components/Skeleton/Skeleton\";\nexport { Spinner } from \"./components/Spinner/Spinner\";\nexport type { SpinnerProps } from \"./components/Spinner/Spinner\";\nexport { colors, spacing, typography } from \"./tokens\";\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title?: ReactNode;\n variant?: \"info\" | \"success\" | \"warning\" | \"danger\";\n}\n\nexport const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n { children, className, title, variant = \"info\", ...props },\n ref,\n) {\n const role = variant === \"danger\" || variant === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <div\n className={cx(\"ui-alert\", `ui-alert-${variant}`, className)}\n ref={ref}\n role={role}\n {...props}\n >\n {title ? <div className=\"ui-alert-title\">{title}</div> : null}\n <div>{children}</div>\n </div>\n );\n});\n","export function cx(...classes: Array<string | false | null | undefined>): string {\n return classes.filter(Boolean).join(\" \");\n}\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: \"neutral\" | \"success\" | \"warning\" | \"danger\";\n}\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { className, variant = \"neutral\", ...props },\n ref,\n) {\n return <span className={cx(\"ui-badge\", `ui-badge-${variant}`, className)} ref={ref} {...props} />;\n});\n","import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { Spinner } from \"../Spinner/Spinner\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n isLoading?: boolean;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n size?: \"sm\" | \"md\" | \"lg\";\n variant?: \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n children,\n className,\n disabled,\n isLoading = false,\n leftIcon,\n rightIcon,\n size = \"md\",\n type = \"button\",\n variant = \"primary\",\n ...props\n },\n ref,\n) {\n return (\n <button\n className={cx(\n \"ui-button\",\n `ui-button-${variant}`,\n size !== \"md\" && `ui-button-${size}`,\n className,\n )}\n data-loading={isLoading ? \"true\" : undefined}\n disabled={disabled || isLoading}\n ref={ref}\n type={type}\n {...props}\n >\n {isLoading ? <Spinner label=\"Loading\" size=\"sm\" /> : leftIcon}\n <span>{children}</span>\n {!isLoading ? rightIcon : null}\n </button>\n );\n});\n","import type { HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n label?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nexport function Spinner({ className, label = \"Loading\", size = \"md\", ...props }: SpinnerProps) {\n return (\n <span\n aria-label={label}\n className={cx(\"ui-spinner\", size !== \"md\" && `ui-spinner-${size}`, className)}\n role=\"status\"\n {...props}\n />\n );\n}\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport type CardProps = HTMLAttributes<HTMLDivElement>;\nexport type CardHeaderProps = HTMLAttributes<HTMLDivElement>;\nexport type CardContentProps = HTMLAttributes<HTMLDivElement>;\nexport type CardFooterProps = HTMLAttributes<HTMLDivElement>;\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(function Card(\n { className, ...props },\n ref,\n) {\n return <div className={cx(\"ui-card\", className)} ref={ref} {...props} />;\n});\n\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(function CardHeader(\n { className, ...props },\n ref,\n) {\n return <div className={cx(\"ui-card-header\", className)} ref={ref} {...props} />;\n});\n\nexport const CardContent = forwardRef<HTMLDivElement, CardContentProps>(function CardContent(\n { className, ...props },\n ref,\n) {\n return <div className={cx(\"ui-card-content\", className)} ref={ref} {...props} />;\n});\n\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(function CardFooter(\n { className, ...props },\n ref,\n) {\n return <div className={cx(\"ui-card-footer\", className)} ref={ref} {...props} />;\n});\n","import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n action?: ReactNode;\n description?: ReactNode;\n icon?: ReactNode;\n title: ReactNode;\n}\n\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(\n { action, className, description, icon, title, ...props },\n ref,\n) {\n return (\n <section className={cx(\"ui-empty-state\", className)} ref={ref} {...props}>\n {icon ? <div aria-hidden=\"true\">{icon}</div> : null}\n <h2 className=\"ui-empty-state-title\">{title}</h2>\n {description ? <p className=\"ui-empty-state-description\">{description}</p> : null}\n {action}\n </section>\n );\n});\n","import { forwardRef, type InputHTMLAttributes, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n error?: string;\n helperText?: string;\n label?: string;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { className, error, helperText, id, label, ...props },\n ref,\n) {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const descriptionId = helperText ? `${inputId}-help` : undefined;\n const errorId = error ? `${inputId}-error` : undefined;\n\n return (\n <div className=\"ui-input-field\">\n {label ? (\n <label className=\"ui-label\" htmlFor={inputId}>\n {label}\n </label>\n ) : null}\n <input\n aria-describedby={cx(descriptionId, errorId) || undefined}\n aria-invalid={error ? true : undefined}\n className={cx(\"ui-input\", error && \"ui-input-error\", className)}\n id={inputId}\n ref={ref}\n {...props}\n />\n {helperText ? (\n <div className=\"ui-field-help\" id={descriptionId}>\n {helperText}\n </div>\n ) : null}\n {error ? (\n <div className=\"ui-field-error\" id={errorId} role=\"alert\">\n {error}\n </div>\n ) : null}\n </div>\n );\n});\n","import {\n forwardRef,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n useEffect,\n useId,\n useRef,\n} from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n children: ReactNode;\n closeLabel?: string;\n isOpen: boolean;\n onOpenChange: (isOpen: boolean) => void;\n title: ReactNode;\n}\n\nfunction getFocusable(container: HTMLElement): HTMLElement[] {\n return Array.from(\n container.querySelectorAll<HTMLElement>(\n 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ).filter((element) => !element.hasAttribute(\"disabled\") && element.tabIndex !== -1);\n}\n\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(function Modal(\n { children, className, closeLabel = \"Close dialog\", isOpen, onOpenChange, title, ...props },\n ref,\n) {\n const titleId = useId();\n const dialogRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n const previousActiveElement =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const focusable = dialogRef.current ? getFocusable(dialogRef.current) : [];\n focusable[0]?.focus();\n\n return () => {\n previousActiveElement?.focus();\n };\n }, [isOpen]);\n\n if (!isOpen) {\n return null;\n }\n\n function handleOverlayClick(event: MouseEvent<HTMLDivElement>) {\n if (event.target === event.currentTarget) {\n onOpenChange(false);\n }\n }\n\n function handleKeyDown(event: KeyboardEvent<HTMLDivElement>) {\n if (event.key === \"Escape\") {\n onOpenChange(false);\n return;\n }\n\n if (event.key !== \"Tab\" || !dialogRef.current) {\n return;\n }\n\n const focusable = getFocusable(dialogRef.current);\n if (focusable.length === 0) {\n return;\n }\n\n const first = focusable[0];\n const last = focusable.at(-1);\n\n if (!first || !last) {\n return;\n }\n\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n return (\n <div className=\"ui-modal-overlay\" onClick={handleOverlayClick}>\n <div\n aria-labelledby={titleId}\n aria-modal=\"true\"\n className={cx(\"ui-modal\", className)}\n onKeyDown={handleKeyDown}\n ref={(node) => {\n dialogRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n role=\"dialog\"\n {...props}\n >\n <div className=\"ui-modal-header\">\n <h2 className=\"ui-modal-title\" id={titleId}>\n {title}\n </h2>\n <button\n aria-label={closeLabel}\n className=\"ui-modal-close\"\n onClick={() => onOpenChange(false)}\n type=\"button\"\n >\n ×\n </button>\n </div>\n <div className=\"ui-modal-body\">{children}</div>\n </div>\n </div>\n );\n});\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n height?: number | string;\n width?: number | string;\n}\n\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(function Skeleton(\n { className, height = \"1rem\", style, width = \"100%\", ...props },\n ref,\n) {\n return (\n <div\n aria-hidden=\"true\"\n className={cx(\"ui-skeleton\", className)}\n ref={ref}\n style={{ height, width, ...style }}\n {...props}\n />\n );\n});\n","export const colors = {\n background: \"var(--ui-color-background)\",\n foreground: \"var(--ui-color-foreground)\",\n surface: \"var(--ui-color-surface)\",\n surfaceRaised: \"var(--ui-color-surface-raised)\",\n border: \"var(--ui-color-border)\",\n primary: \"var(--ui-color-primary)\",\n primaryForeground: \"var(--ui-color-primary-foreground)\",\n danger: \"var(--ui-color-danger)\",\n dangerForeground: \"var(--ui-color-danger-foreground)\",\n success: \"var(--ui-color-success)\",\n successForeground: \"var(--ui-color-success-foreground)\",\n warning: \"var(--ui-color-warning)\",\n warningForeground: \"var(--ui-color-warning-foreground)\",\n muted: \"var(--ui-color-muted)\",\n mutedForeground: \"var(--ui-color-muted-foreground)\",\n} as const;\n","export const spacing = {\n 0: \"0\",\n 1: \"var(--ui-space-1)\",\n 2: \"var(--ui-space-2)\",\n 3: \"var(--ui-space-3)\",\n 4: \"var(--ui-space-4)\",\n 5: \"var(--ui-space-5)\",\n 6: \"var(--ui-space-6)\",\n 8: \"var(--ui-space-8)\",\n} as const;\n","export const typography = {\n fontFamily: \"var(--ui-font-family)\",\n fontSizeSm: \"var(--ui-font-size-sm)\",\n fontSizeMd: \"var(--ui-font-size-md)\",\n fontSizeLg: \"var(--ui-font-size-lg)\",\n lineHeight: \"var(--ui-line-height)\",\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgE;;;ACAzD,SAAS,MAAM,SAA2D;AAC/E,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;;;ADaI;AAPG,IAAM,YAAQ,yBAAuC,SAASA,OACnE,EAAE,UAAU,WAAW,OAAO,UAAU,QAAQ,GAAG,MAAM,GACzD,KACA;AACA,QAAM,OAAO,YAAY,YAAY,YAAY,YAAY,UAAU;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAA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O,IAAM,aAAa;AAAA,EACxB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd;","names":["Alert","import_react","import_jsx_runtime","Badge","import_react","import_jsx_runtime","import_jsx_runtime","Button","import_react","import_jsx_runtime","Card","CardHeader","CardContent","CardFooter","import_react","import_jsx_runtime","EmptyState","import_react","import_jsx_runtime","Input","import_react","import_jsx_runtime","Modal","import_react","import_jsx_runtime","Skeleton"]}
@@ -0,0 +1,106 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes } from 'react';
3
+
4
+ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
5
+ title?: ReactNode;
6
+ variant?: "info" | "success" | "warning" | "danger";
7
+ }
8
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
9
+
10
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
11
+ variant?: "neutral" | "success" | "warning" | "danger";
12
+ }
13
+ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
14
+
15
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
16
+ isLoading?: boolean;
17
+ leftIcon?: ReactNode;
18
+ rightIcon?: ReactNode;
19
+ size?: "sm" | "md" | "lg";
20
+ variant?: "primary" | "secondary" | "ghost" | "danger";
21
+ }
22
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
23
+
24
+ type CardProps = HTMLAttributes<HTMLDivElement>;
25
+ type CardHeaderProps = HTMLAttributes<HTMLDivElement>;
26
+ type CardContentProps = HTMLAttributes<HTMLDivElement>;
27
+ type CardFooterProps = HTMLAttributes<HTMLDivElement>;
28
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
29
+ declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
30
+ declare const CardContent: react.ForwardRefExoticComponent<CardContentProps & react.RefAttributes<HTMLDivElement>>;
31
+ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
32
+
33
+ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
34
+ action?: ReactNode;
35
+ description?: ReactNode;
36
+ icon?: ReactNode;
37
+ title: ReactNode;
38
+ }
39
+ declare const EmptyState: react.ForwardRefExoticComponent<EmptyStateProps & react.RefAttributes<HTMLDivElement>>;
40
+
41
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
42
+ error?: string;
43
+ helperText?: string;
44
+ label?: string;
45
+ }
46
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
47
+
48
+ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
49
+ children: ReactNode;
50
+ closeLabel?: string;
51
+ isOpen: boolean;
52
+ onOpenChange: (isOpen: boolean) => void;
53
+ title: ReactNode;
54
+ }
55
+ declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>>;
56
+
57
+ interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
58
+ height?: number | string;
59
+ width?: number | string;
60
+ }
61
+ declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
62
+
63
+ interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
64
+ label?: string;
65
+ size?: "sm" | "md" | "lg";
66
+ }
67
+ declare function Spinner({ className, label, size, ...props }: SpinnerProps): react.JSX.Element;
68
+
69
+ declare const colors: {
70
+ readonly background: "var(--ui-color-background)";
71
+ readonly foreground: "var(--ui-color-foreground)";
72
+ readonly surface: "var(--ui-color-surface)";
73
+ readonly surfaceRaised: "var(--ui-color-surface-raised)";
74
+ readonly border: "var(--ui-color-border)";
75
+ readonly primary: "var(--ui-color-primary)";
76
+ readonly primaryForeground: "var(--ui-color-primary-foreground)";
77
+ readonly danger: "var(--ui-color-danger)";
78
+ readonly dangerForeground: "var(--ui-color-danger-foreground)";
79
+ readonly success: "var(--ui-color-success)";
80
+ readonly successForeground: "var(--ui-color-success-foreground)";
81
+ readonly warning: "var(--ui-color-warning)";
82
+ readonly warningForeground: "var(--ui-color-warning-foreground)";
83
+ readonly muted: "var(--ui-color-muted)";
84
+ readonly mutedForeground: "var(--ui-color-muted-foreground)";
85
+ };
86
+
87
+ declare const spacing: {
88
+ readonly 0: "0";
89
+ readonly 1: "var(--ui-space-1)";
90
+ readonly 2: "var(--ui-space-2)";
91
+ readonly 3: "var(--ui-space-3)";
92
+ readonly 4: "var(--ui-space-4)";
93
+ readonly 5: "var(--ui-space-5)";
94
+ readonly 6: "var(--ui-space-6)";
95
+ readonly 8: "var(--ui-space-8)";
96
+ };
97
+
98
+ declare const typography: {
99
+ readonly fontFamily: "var(--ui-font-family)";
100
+ readonly fontSizeSm: "var(--ui-font-size-sm)";
101
+ readonly fontSizeMd: "var(--ui-font-size-md)";
102
+ readonly fontSizeLg: "var(--ui-font-size-lg)";
103
+ readonly lineHeight: "var(--ui-line-height)";
104
+ };
105
+
106
+ export { Alert, type AlertProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, EmptyState, type EmptyStateProps, Input, type InputProps, Modal, type ModalProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, colors, spacing, typography };
@@ -0,0 +1,106 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes } from 'react';
3
+
4
+ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
5
+ title?: ReactNode;
6
+ variant?: "info" | "success" | "warning" | "danger";
7
+ }
8
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
9
+
10
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
11
+ variant?: "neutral" | "success" | "warning" | "danger";
12
+ }
13
+ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
14
+
15
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
16
+ isLoading?: boolean;
17
+ leftIcon?: ReactNode;
18
+ rightIcon?: ReactNode;
19
+ size?: "sm" | "md" | "lg";
20
+ variant?: "primary" | "secondary" | "ghost" | "danger";
21
+ }
22
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
23
+
24
+ type CardProps = HTMLAttributes<HTMLDivElement>;
25
+ type CardHeaderProps = HTMLAttributes<HTMLDivElement>;
26
+ type CardContentProps = HTMLAttributes<HTMLDivElement>;
27
+ type CardFooterProps = HTMLAttributes<HTMLDivElement>;
28
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
29
+ declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
30
+ declare const CardContent: react.ForwardRefExoticComponent<CardContentProps & react.RefAttributes<HTMLDivElement>>;
31
+ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
32
+
33
+ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
34
+ action?: ReactNode;
35
+ description?: ReactNode;
36
+ icon?: ReactNode;
37
+ title: ReactNode;
38
+ }
39
+ declare const EmptyState: react.ForwardRefExoticComponent<EmptyStateProps & react.RefAttributes<HTMLDivElement>>;
40
+
41
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
42
+ error?: string;
43
+ helperText?: string;
44
+ label?: string;
45
+ }
46
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
47
+
48
+ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
49
+ children: ReactNode;
50
+ closeLabel?: string;
51
+ isOpen: boolean;
52
+ onOpenChange: (isOpen: boolean) => void;
53
+ title: ReactNode;
54
+ }
55
+ declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>>;
56
+
57
+ interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
58
+ height?: number | string;
59
+ width?: number | string;
60
+ }
61
+ declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
62
+
63
+ interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
64
+ label?: string;
65
+ size?: "sm" | "md" | "lg";
66
+ }
67
+ declare function Spinner({ className, label, size, ...props }: SpinnerProps): react.JSX.Element;
68
+
69
+ declare const colors: {
70
+ readonly background: "var(--ui-color-background)";
71
+ readonly foreground: "var(--ui-color-foreground)";
72
+ readonly surface: "var(--ui-color-surface)";
73
+ readonly surfaceRaised: "var(--ui-color-surface-raised)";
74
+ readonly border: "var(--ui-color-border)";
75
+ readonly primary: "var(--ui-color-primary)";
76
+ readonly primaryForeground: "var(--ui-color-primary-foreground)";
77
+ readonly danger: "var(--ui-color-danger)";
78
+ readonly dangerForeground: "var(--ui-color-danger-foreground)";
79
+ readonly success: "var(--ui-color-success)";
80
+ readonly successForeground: "var(--ui-color-success-foreground)";
81
+ readonly warning: "var(--ui-color-warning)";
82
+ readonly warningForeground: "var(--ui-color-warning-foreground)";
83
+ readonly muted: "var(--ui-color-muted)";
84
+ readonly mutedForeground: "var(--ui-color-muted-foreground)";
85
+ };
86
+
87
+ declare const spacing: {
88
+ readonly 0: "0";
89
+ readonly 1: "var(--ui-space-1)";
90
+ readonly 2: "var(--ui-space-2)";
91
+ readonly 3: "var(--ui-space-3)";
92
+ readonly 4: "var(--ui-space-4)";
93
+ readonly 5: "var(--ui-space-5)";
94
+ readonly 6: "var(--ui-space-6)";
95
+ readonly 8: "var(--ui-space-8)";
96
+ };
97
+
98
+ declare const typography: {
99
+ readonly fontFamily: "var(--ui-font-family)";
100
+ readonly fontSizeSm: "var(--ui-font-size-sm)";
101
+ readonly fontSizeMd: "var(--ui-font-size-md)";
102
+ readonly fontSizeLg: "var(--ui-font-size-lg)";
103
+ readonly lineHeight: "var(--ui-line-height)";
104
+ };
105
+
106
+ export { Alert, type AlertProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, EmptyState, type EmptyStateProps, Input, type InputProps, Modal, type ModalProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, colors, spacing, typography };