@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/dist/index.js ADDED
@@ -0,0 +1,316 @@
1
+ "use client";
2
+
3
+ // src/components/Alert/Alert.tsx
4
+ import { forwardRef } from "react";
5
+
6
+ // src/utils/cx.ts
7
+ function cx(...classes) {
8
+ return classes.filter(Boolean).join(" ");
9
+ }
10
+
11
+ // src/components/Alert/Alert.tsx
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var Alert = forwardRef(function Alert2({ children, className, title, variant = "info", ...props }, ref) {
14
+ const role = variant === "danger" || variant === "warning" ? "alert" : "status";
15
+ return /* @__PURE__ */ jsxs(
16
+ "div",
17
+ {
18
+ className: cx("ui-alert", `ui-alert-${variant}`, className),
19
+ ref,
20
+ role,
21
+ ...props,
22
+ children: [
23
+ title ? /* @__PURE__ */ jsx("div", { className: "ui-alert-title", children: title }) : null,
24
+ /* @__PURE__ */ jsx("div", { children })
25
+ ]
26
+ }
27
+ );
28
+ });
29
+
30
+ // src/components/Badge/Badge.tsx
31
+ import { forwardRef as forwardRef2 } from "react";
32
+ import { jsx as jsx2 } from "react/jsx-runtime";
33
+ var Badge = forwardRef2(function Badge2({ className, variant = "neutral", ...props }, ref) {
34
+ return /* @__PURE__ */ jsx2("span", { className: cx("ui-badge", `ui-badge-${variant}`, className), ref, ...props });
35
+ });
36
+
37
+ // src/components/Button/Button.tsx
38
+ import { forwardRef as forwardRef3 } from "react";
39
+
40
+ // src/components/Spinner/Spinner.tsx
41
+ import { jsx as jsx3 } from "react/jsx-runtime";
42
+ function Spinner({ className, label = "Loading", size = "md", ...props }) {
43
+ return /* @__PURE__ */ jsx3(
44
+ "span",
45
+ {
46
+ "aria-label": label,
47
+ className: cx("ui-spinner", size !== "md" && `ui-spinner-${size}`, className),
48
+ role: "status",
49
+ ...props
50
+ }
51
+ );
52
+ }
53
+
54
+ // src/components/Button/Button.tsx
55
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
56
+ var Button = forwardRef3(function Button2({
57
+ children,
58
+ className,
59
+ disabled,
60
+ isLoading = false,
61
+ leftIcon,
62
+ rightIcon,
63
+ size = "md",
64
+ type = "button",
65
+ variant = "primary",
66
+ ...props
67
+ }, ref) {
68
+ return /* @__PURE__ */ jsxs2(
69
+ "button",
70
+ {
71
+ className: cx(
72
+ "ui-button",
73
+ `ui-button-${variant}`,
74
+ size !== "md" && `ui-button-${size}`,
75
+ className
76
+ ),
77
+ "data-loading": isLoading ? "true" : void 0,
78
+ disabled: disabled || isLoading,
79
+ ref,
80
+ type,
81
+ ...props,
82
+ children: [
83
+ isLoading ? /* @__PURE__ */ jsx4(Spinner, { label: "Loading", size: "sm" }) : leftIcon,
84
+ /* @__PURE__ */ jsx4("span", { children }),
85
+ !isLoading ? rightIcon : null
86
+ ]
87
+ }
88
+ );
89
+ });
90
+
91
+ // src/components/Card/Card.tsx
92
+ import { forwardRef as forwardRef4 } from "react";
93
+ import { jsx as jsx5 } from "react/jsx-runtime";
94
+ var Card = forwardRef4(function Card2({ className, ...props }, ref) {
95
+ return /* @__PURE__ */ jsx5("div", { className: cx("ui-card", className), ref, ...props });
96
+ });
97
+ var CardHeader = forwardRef4(function CardHeader2({ className, ...props }, ref) {
98
+ return /* @__PURE__ */ jsx5("div", { className: cx("ui-card-header", className), ref, ...props });
99
+ });
100
+ var CardContent = forwardRef4(function CardContent2({ className, ...props }, ref) {
101
+ return /* @__PURE__ */ jsx5("div", { className: cx("ui-card-content", className), ref, ...props });
102
+ });
103
+ var CardFooter = forwardRef4(function CardFooter2({ className, ...props }, ref) {
104
+ return /* @__PURE__ */ jsx5("div", { className: cx("ui-card-footer", className), ref, ...props });
105
+ });
106
+
107
+ // src/components/EmptyState/EmptyState.tsx
108
+ import { forwardRef as forwardRef5 } from "react";
109
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
110
+ var EmptyState = forwardRef5(function EmptyState2({ action, className, description, icon, title, ...props }, ref) {
111
+ return /* @__PURE__ */ jsxs3("section", { className: cx("ui-empty-state", className), ref, ...props, children: [
112
+ icon ? /* @__PURE__ */ jsx6("div", { "aria-hidden": "true", children: icon }) : null,
113
+ /* @__PURE__ */ jsx6("h2", { className: "ui-empty-state-title", children: title }),
114
+ description ? /* @__PURE__ */ jsx6("p", { className: "ui-empty-state-description", children: description }) : null,
115
+ action
116
+ ] });
117
+ });
118
+
119
+ // src/components/Input/Input.tsx
120
+ import { forwardRef as forwardRef6, useId } from "react";
121
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
122
+ var Input = forwardRef6(function Input2({ className, error, helperText, id, label, ...props }, ref) {
123
+ const generatedId = useId();
124
+ const inputId = id ?? generatedId;
125
+ const descriptionId = helperText ? `${inputId}-help` : void 0;
126
+ const errorId = error ? `${inputId}-error` : void 0;
127
+ return /* @__PURE__ */ jsxs4("div", { className: "ui-input-field", children: [
128
+ label ? /* @__PURE__ */ jsx7("label", { className: "ui-label", htmlFor: inputId, children: label }) : null,
129
+ /* @__PURE__ */ jsx7(
130
+ "input",
131
+ {
132
+ "aria-describedby": cx(descriptionId, errorId) || void 0,
133
+ "aria-invalid": error ? true : void 0,
134
+ className: cx("ui-input", error && "ui-input-error", className),
135
+ id: inputId,
136
+ ref,
137
+ ...props
138
+ }
139
+ ),
140
+ helperText ? /* @__PURE__ */ jsx7("div", { className: "ui-field-help", id: descriptionId, children: helperText }) : null,
141
+ error ? /* @__PURE__ */ jsx7("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
142
+ ] });
143
+ });
144
+
145
+ // src/components/Modal/Modal.tsx
146
+ import {
147
+ forwardRef as forwardRef7,
148
+ useEffect,
149
+ useId as useId2,
150
+ useRef
151
+ } from "react";
152
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
153
+ function getFocusable(container) {
154
+ return Array.from(
155
+ container.querySelectorAll(
156
+ 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
157
+ )
158
+ ).filter((element) => !element.hasAttribute("disabled") && element.tabIndex !== -1);
159
+ }
160
+ var Modal = forwardRef7(function Modal2({ children, className, closeLabel = "Close dialog", isOpen, onOpenChange, title, ...props }, ref) {
161
+ const titleId = useId2();
162
+ const dialogRef = useRef(null);
163
+ useEffect(() => {
164
+ if (!isOpen) {
165
+ return;
166
+ }
167
+ const previousActiveElement = document.activeElement instanceof HTMLElement ? document.activeElement : null;
168
+ const focusable = dialogRef.current ? getFocusable(dialogRef.current) : [];
169
+ focusable[0]?.focus();
170
+ return () => {
171
+ previousActiveElement?.focus();
172
+ };
173
+ }, [isOpen]);
174
+ if (!isOpen) {
175
+ return null;
176
+ }
177
+ function handleOverlayClick(event) {
178
+ if (event.target === event.currentTarget) {
179
+ onOpenChange(false);
180
+ }
181
+ }
182
+ function handleKeyDown(event) {
183
+ if (event.key === "Escape") {
184
+ onOpenChange(false);
185
+ return;
186
+ }
187
+ if (event.key !== "Tab" || !dialogRef.current) {
188
+ return;
189
+ }
190
+ const focusable = getFocusable(dialogRef.current);
191
+ if (focusable.length === 0) {
192
+ return;
193
+ }
194
+ const first = focusable[0];
195
+ const last = focusable.at(-1);
196
+ if (!first || !last) {
197
+ return;
198
+ }
199
+ if (event.shiftKey && document.activeElement === first) {
200
+ event.preventDefault();
201
+ last.focus();
202
+ } else if (!event.shiftKey && document.activeElement === last) {
203
+ event.preventDefault();
204
+ first.focus();
205
+ }
206
+ }
207
+ return /* @__PURE__ */ jsx8("div", { className: "ui-modal-overlay", onClick: handleOverlayClick, children: /* @__PURE__ */ jsxs5(
208
+ "div",
209
+ {
210
+ "aria-labelledby": titleId,
211
+ "aria-modal": "true",
212
+ className: cx("ui-modal", className),
213
+ onKeyDown: handleKeyDown,
214
+ ref: (node) => {
215
+ dialogRef.current = node;
216
+ if (typeof ref === "function") {
217
+ ref(node);
218
+ } else if (ref) {
219
+ ref.current = node;
220
+ }
221
+ },
222
+ role: "dialog",
223
+ ...props,
224
+ children: [
225
+ /* @__PURE__ */ jsxs5("div", { className: "ui-modal-header", children: [
226
+ /* @__PURE__ */ jsx8("h2", { className: "ui-modal-title", id: titleId, children: title }),
227
+ /* @__PURE__ */ jsx8(
228
+ "button",
229
+ {
230
+ "aria-label": closeLabel,
231
+ className: "ui-modal-close",
232
+ onClick: () => onOpenChange(false),
233
+ type: "button",
234
+ children: "\xD7"
235
+ }
236
+ )
237
+ ] }),
238
+ /* @__PURE__ */ jsx8("div", { className: "ui-modal-body", children })
239
+ ]
240
+ }
241
+ ) });
242
+ });
243
+
244
+ // src/components/Skeleton/Skeleton.tsx
245
+ import { forwardRef as forwardRef8 } from "react";
246
+ import { jsx as jsx9 } from "react/jsx-runtime";
247
+ var Skeleton = forwardRef8(function Skeleton2({ className, height = "1rem", style, width = "100%", ...props }, ref) {
248
+ return /* @__PURE__ */ jsx9(
249
+ "div",
250
+ {
251
+ "aria-hidden": "true",
252
+ className: cx("ui-skeleton", className),
253
+ ref,
254
+ style: { height, width, ...style },
255
+ ...props
256
+ }
257
+ );
258
+ });
259
+
260
+ // src/tokens/colors.ts
261
+ var colors = {
262
+ background: "var(--ui-color-background)",
263
+ foreground: "var(--ui-color-foreground)",
264
+ surface: "var(--ui-color-surface)",
265
+ surfaceRaised: "var(--ui-color-surface-raised)",
266
+ border: "var(--ui-color-border)",
267
+ primary: "var(--ui-color-primary)",
268
+ primaryForeground: "var(--ui-color-primary-foreground)",
269
+ danger: "var(--ui-color-danger)",
270
+ dangerForeground: "var(--ui-color-danger-foreground)",
271
+ success: "var(--ui-color-success)",
272
+ successForeground: "var(--ui-color-success-foreground)",
273
+ warning: "var(--ui-color-warning)",
274
+ warningForeground: "var(--ui-color-warning-foreground)",
275
+ muted: "var(--ui-color-muted)",
276
+ mutedForeground: "var(--ui-color-muted-foreground)"
277
+ };
278
+
279
+ // src/tokens/spacing.ts
280
+ var spacing = {
281
+ 0: "0",
282
+ 1: "var(--ui-space-1)",
283
+ 2: "var(--ui-space-2)",
284
+ 3: "var(--ui-space-3)",
285
+ 4: "var(--ui-space-4)",
286
+ 5: "var(--ui-space-5)",
287
+ 6: "var(--ui-space-6)",
288
+ 8: "var(--ui-space-8)"
289
+ };
290
+
291
+ // src/tokens/typography.ts
292
+ var typography = {
293
+ fontFamily: "var(--ui-font-family)",
294
+ fontSizeSm: "var(--ui-font-size-sm)",
295
+ fontSizeMd: "var(--ui-font-size-md)",
296
+ fontSizeLg: "var(--ui-font-size-lg)",
297
+ lineHeight: "var(--ui-line-height)"
298
+ };
299
+ export {
300
+ Alert,
301
+ Badge,
302
+ Button,
303
+ Card,
304
+ CardContent,
305
+ CardFooter,
306
+ CardHeader,
307
+ EmptyState,
308
+ Input,
309
+ Modal,
310
+ Skeleton,
311
+ Spinner,
312
+ colors,
313
+ spacing,
314
+ typography
315
+ };
316
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../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":["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,SAAS,kBAAuD;;;ACAzD,SAAS,MAAM,SAA2D;AAC/E,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;;;ADaI,SAMW,KANX;AAPG,IAAM,QAAQ,WAAuC,SAASA,O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;AAAA;AAAA,EACN;AAEJ,CAAC;;;ACrBM,IAAM,SAAS;AAAA,EACpB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,iBAAiB;AACnB;;;AChBO,IAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;;;ACTO,IAAM,aAAa;AAAA,EACxB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd;","names":["Alert","forwardRef","jsx","forwardRef","Badge","forwardRef","jsx","jsx","jsxs","forwardRef","Button","forwardRef","jsx","forwardRef","Card","CardHeader","CardContent","CardFooter","forwardRef","jsx","jsxs","forwardRef","EmptyState","forwardRef","jsx","jsxs","forwardRef","Input","forwardRef","useId","jsx","jsxs","forwardRef","Modal","useId","forwardRef","jsx","forwardRef","Skeleton"]}