@jixic/react-ui 0.1.0 → 0.1.1
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/README.md +42 -1
- package/dist/index.cjs +282 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -2
- package/dist/index.d.ts +78 -2
- package/dist/index.js +271 -42
- package/dist/index.js.map +1 -1
- package/dist/styles.css +242 -1
- package/package.json +30 -2
package/dist/index.js
CHANGED
|
@@ -27,20 +27,27 @@ var Alert = forwardRef(function Alert2({ children, className, title, variant = "
|
|
|
27
27
|
);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
// src/components/Avatar/Avatar.tsx
|
|
31
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
32
|
+
function Avatar({ alt, className, fallback, size = "md", src, ...props }) {
|
|
33
|
+
const initials = fallback ?? alt.split(" ").filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase()).join("");
|
|
34
|
+
return /* @__PURE__ */ jsx2("span", { className: cx("ui-avatar", `ui-avatar-${size}`, className), ...props, children: src ? /* @__PURE__ */ jsx2("img", { alt, className: "ui-avatar-image", src }) : initials });
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
// src/components/Badge/Badge.tsx
|
|
31
38
|
import { forwardRef as forwardRef2 } from "react";
|
|
32
|
-
import { jsx as
|
|
39
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
33
40
|
var Badge = forwardRef2(function Badge2({ className, variant = "neutral", ...props }, ref) {
|
|
34
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ jsx3("span", { className: cx("ui-badge", `ui-badge-${variant}`, className), ref, ...props });
|
|
35
42
|
});
|
|
36
43
|
|
|
37
44
|
// src/components/Button/Button.tsx
|
|
38
45
|
import { forwardRef as forwardRef3 } from "react";
|
|
39
46
|
|
|
40
47
|
// src/components/Spinner/Spinner.tsx
|
|
41
|
-
import { jsx as
|
|
48
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
42
49
|
function Spinner({ className, label = "Loading", size = "md", ...props }) {
|
|
43
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ jsx4(
|
|
44
51
|
"span",
|
|
45
52
|
{
|
|
46
53
|
"aria-label": label,
|
|
@@ -52,7 +59,7 @@ function Spinner({ className, label = "Loading", size = "md", ...props }) {
|
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
// src/components/Button/Button.tsx
|
|
55
|
-
import { jsx as
|
|
62
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
56
63
|
var Button = forwardRef3(function Button2({
|
|
57
64
|
children,
|
|
58
65
|
className,
|
|
@@ -80,8 +87,8 @@ var Button = forwardRef3(function Button2({
|
|
|
80
87
|
type,
|
|
81
88
|
...props,
|
|
82
89
|
children: [
|
|
83
|
-
isLoading ? /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
90
|
+
isLoading ? /* @__PURE__ */ jsx5(Spinner, { label: "Loading", size: "sm" }) : leftIcon,
|
|
91
|
+
/* @__PURE__ */ jsx5("span", { children }),
|
|
85
92
|
!isLoading ? rightIcon : null
|
|
86
93
|
]
|
|
87
94
|
}
|
|
@@ -90,43 +97,74 @@ var Button = forwardRef3(function Button2({
|
|
|
90
97
|
|
|
91
98
|
// src/components/Card/Card.tsx
|
|
92
99
|
import { forwardRef as forwardRef4 } from "react";
|
|
93
|
-
import { jsx as
|
|
100
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
94
101
|
var Card = forwardRef4(function Card2({ className, ...props }, ref) {
|
|
95
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsx6("div", { className: cx("ui-card", className), ref, ...props });
|
|
96
103
|
});
|
|
97
104
|
var CardHeader = forwardRef4(function CardHeader2({ className, ...props }, ref) {
|
|
98
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ jsx6("div", { className: cx("ui-card-header", className), ref, ...props });
|
|
99
106
|
});
|
|
100
107
|
var CardContent = forwardRef4(function CardContent2({ className, ...props }, ref) {
|
|
101
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ jsx6("div", { className: cx("ui-card-content", className), ref, ...props });
|
|
102
109
|
});
|
|
103
110
|
var CardFooter = forwardRef4(function CardFooter2({ className, ...props }, ref) {
|
|
104
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ jsx6("div", { className: cx("ui-card-footer", className), ref, ...props });
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
115
|
+
import { forwardRef as forwardRef5, useId } from "react";
|
|
116
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
117
|
+
var Checkbox = forwardRef5(function Checkbox2({ className, description, error, id, label, ...props }, ref) {
|
|
118
|
+
const generatedId = useId();
|
|
119
|
+
const checkboxId = id ?? generatedId;
|
|
120
|
+
const descriptionId = description ? `${checkboxId}-description` : void 0;
|
|
121
|
+
const errorId = error ? `${checkboxId}-error` : void 0;
|
|
122
|
+
return /* @__PURE__ */ jsxs3("div", { className: "ui-choice-field", children: [
|
|
123
|
+
/* @__PURE__ */ jsxs3("label", { className: "ui-choice", children: [
|
|
124
|
+
/* @__PURE__ */ jsx7(
|
|
125
|
+
"input",
|
|
126
|
+
{
|
|
127
|
+
"aria-describedby": cx(descriptionId, errorId) || void 0,
|
|
128
|
+
"aria-invalid": error ? true : void 0,
|
|
129
|
+
className: cx("ui-checkbox", className),
|
|
130
|
+
id: checkboxId,
|
|
131
|
+
ref,
|
|
132
|
+
type: "checkbox",
|
|
133
|
+
...props
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsxs3("span", { className: "ui-choice-copy", children: [
|
|
137
|
+
/* @__PURE__ */ jsx7("span", { className: "ui-choice-label", children: label }),
|
|
138
|
+
description ? /* @__PURE__ */ jsx7("span", { className: "ui-choice-description", id: descriptionId, children: description }) : null
|
|
139
|
+
] })
|
|
140
|
+
] }),
|
|
141
|
+
error ? /* @__PURE__ */ jsx7("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
|
|
142
|
+
] });
|
|
105
143
|
});
|
|
106
144
|
|
|
107
145
|
// src/components/EmptyState/EmptyState.tsx
|
|
108
|
-
import { forwardRef as
|
|
109
|
-
import { jsx as
|
|
110
|
-
var EmptyState =
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
icon ? /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
description ? /* @__PURE__ */
|
|
146
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
147
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
148
|
+
var EmptyState = forwardRef6(function EmptyState2({ action, className, description, icon, title, ...props }, ref) {
|
|
149
|
+
return /* @__PURE__ */ jsxs4("section", { className: cx("ui-empty-state", className), ref, ...props, children: [
|
|
150
|
+
icon ? /* @__PURE__ */ jsx8("div", { "aria-hidden": "true", children: icon }) : null,
|
|
151
|
+
/* @__PURE__ */ jsx8("h2", { className: "ui-empty-state-title", children: title }),
|
|
152
|
+
description ? /* @__PURE__ */ jsx8("p", { className: "ui-empty-state-description", children: description }) : null,
|
|
115
153
|
action
|
|
116
154
|
] });
|
|
117
155
|
});
|
|
118
156
|
|
|
119
157
|
// src/components/Input/Input.tsx
|
|
120
|
-
import { forwardRef as
|
|
121
|
-
import { jsx as
|
|
122
|
-
var Input =
|
|
123
|
-
const generatedId =
|
|
158
|
+
import { forwardRef as forwardRef7, useId as useId2 } from "react";
|
|
159
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
160
|
+
var Input = forwardRef7(function Input2({ className, error, helperText, id, label, ...props }, ref) {
|
|
161
|
+
const generatedId = useId2();
|
|
124
162
|
const inputId = id ?? generatedId;
|
|
125
163
|
const descriptionId = helperText ? `${inputId}-help` : void 0;
|
|
126
164
|
const errorId = error ? `${inputId}-error` : void 0;
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
label ? /* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ jsxs5("div", { className: "ui-input-field", children: [
|
|
166
|
+
label ? /* @__PURE__ */ jsx9("label", { className: "ui-label", htmlFor: inputId, children: label }) : null,
|
|
167
|
+
/* @__PURE__ */ jsx9(
|
|
130
168
|
"input",
|
|
131
169
|
{
|
|
132
170
|
"aria-describedby": cx(descriptionId, errorId) || void 0,
|
|
@@ -137,19 +175,19 @@ var Input = forwardRef6(function Input2({ className, error, helperText, id, labe
|
|
|
137
175
|
...props
|
|
138
176
|
}
|
|
139
177
|
),
|
|
140
|
-
helperText ? /* @__PURE__ */
|
|
141
|
-
error ? /* @__PURE__ */
|
|
178
|
+
helperText ? /* @__PURE__ */ jsx9("div", { className: "ui-field-help", id: descriptionId, children: helperText }) : null,
|
|
179
|
+
error ? /* @__PURE__ */ jsx9("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
|
|
142
180
|
] });
|
|
143
181
|
});
|
|
144
182
|
|
|
145
183
|
// src/components/Modal/Modal.tsx
|
|
146
184
|
import {
|
|
147
|
-
forwardRef as
|
|
185
|
+
forwardRef as forwardRef8,
|
|
148
186
|
useEffect,
|
|
149
|
-
useId as
|
|
187
|
+
useId as useId3,
|
|
150
188
|
useRef
|
|
151
189
|
} from "react";
|
|
152
|
-
import { jsx as
|
|
190
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
153
191
|
function getFocusable(container) {
|
|
154
192
|
return Array.from(
|
|
155
193
|
container.querySelectorAll(
|
|
@@ -157,8 +195,8 @@ function getFocusable(container) {
|
|
|
157
195
|
)
|
|
158
196
|
).filter((element) => !element.hasAttribute("disabled") && element.tabIndex !== -1);
|
|
159
197
|
}
|
|
160
|
-
var Modal =
|
|
161
|
-
const titleId =
|
|
198
|
+
var Modal = forwardRef8(function Modal2({ children, className, closeLabel = "Close dialog", isOpen, onOpenChange, title, ...props }, ref) {
|
|
199
|
+
const titleId = useId3();
|
|
162
200
|
const dialogRef = useRef(null);
|
|
163
201
|
useEffect(() => {
|
|
164
202
|
if (!isOpen) {
|
|
@@ -204,7 +242,7 @@ var Modal = forwardRef7(function Modal2({ children, className, closeLabel = "Clo
|
|
|
204
242
|
first.focus();
|
|
205
243
|
}
|
|
206
244
|
}
|
|
207
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ jsx10("div", { className: "ui-modal-overlay", onClick: handleOverlayClick, children: /* @__PURE__ */ jsxs6(
|
|
208
246
|
"div",
|
|
209
247
|
{
|
|
210
248
|
"aria-labelledby": titleId,
|
|
@@ -222,9 +260,9 @@ var Modal = forwardRef7(function Modal2({ children, className, closeLabel = "Clo
|
|
|
222
260
|
role: "dialog",
|
|
223
261
|
...props,
|
|
224
262
|
children: [
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ jsxs6("div", { className: "ui-modal-header", children: [
|
|
264
|
+
/* @__PURE__ */ jsx10("h2", { className: "ui-modal-title", id: titleId, children: title }),
|
|
265
|
+
/* @__PURE__ */ jsx10(
|
|
228
266
|
"button",
|
|
229
267
|
{
|
|
230
268
|
"aria-label": closeLabel,
|
|
@@ -235,17 +273,80 @@ var Modal = forwardRef7(function Modal2({ children, className, closeLabel = "Clo
|
|
|
235
273
|
}
|
|
236
274
|
)
|
|
237
275
|
] }),
|
|
238
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ jsx10("div", { className: "ui-modal-body", children })
|
|
239
277
|
]
|
|
240
278
|
}
|
|
241
279
|
) });
|
|
242
280
|
});
|
|
243
281
|
|
|
282
|
+
// src/components/Radio/Radio.tsx
|
|
283
|
+
import { forwardRef as forwardRef9, useId as useId4 } from "react";
|
|
284
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
285
|
+
var Radio = forwardRef9(function Radio2({ className, description, id, label, ...props }, ref) {
|
|
286
|
+
const generatedId = useId4();
|
|
287
|
+
const radioId = id ?? generatedId;
|
|
288
|
+
const descriptionId = description ? `${radioId}-description` : void 0;
|
|
289
|
+
return /* @__PURE__ */ jsxs7("label", { className: "ui-choice", children: [
|
|
290
|
+
/* @__PURE__ */ jsx11(
|
|
291
|
+
"input",
|
|
292
|
+
{
|
|
293
|
+
"aria-describedby": descriptionId,
|
|
294
|
+
className: cx("ui-radio", className),
|
|
295
|
+
id: radioId,
|
|
296
|
+
ref,
|
|
297
|
+
type: "radio",
|
|
298
|
+
...props
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
/* @__PURE__ */ jsxs7("span", { className: "ui-choice-copy", children: [
|
|
302
|
+
/* @__PURE__ */ jsx11("span", { className: "ui-choice-label", children: label }),
|
|
303
|
+
description ? /* @__PURE__ */ jsx11("span", { className: "ui-choice-description", id: descriptionId, children: description }) : null
|
|
304
|
+
] })
|
|
305
|
+
] });
|
|
306
|
+
});
|
|
307
|
+
function RadioGroup({ children, error, label }) {
|
|
308
|
+
return /* @__PURE__ */ jsxs7("fieldset", { className: "ui-radio-group", children: [
|
|
309
|
+
/* @__PURE__ */ jsx11("legend", { className: "ui-label", children: label }),
|
|
310
|
+
/* @__PURE__ */ jsx11("div", { className: "ui-radio-options", children }),
|
|
311
|
+
error ? /* @__PURE__ */ jsx11("div", { className: "ui-field-error", role: "alert", children: error }) : null
|
|
312
|
+
] });
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// src/components/Select/Select.tsx
|
|
316
|
+
import { forwardRef as forwardRef10, useId as useId5 } from "react";
|
|
317
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
318
|
+
var Select = forwardRef10(function Select2({ className, error, helperText, id, label, options, placeholder, ...props }, ref) {
|
|
319
|
+
const generatedId = useId5();
|
|
320
|
+
const selectId = id ?? generatedId;
|
|
321
|
+
const descriptionId = helperText ? `${selectId}-help` : void 0;
|
|
322
|
+
const errorId = error ? `${selectId}-error` : void 0;
|
|
323
|
+
return /* @__PURE__ */ jsxs8("div", { className: "ui-input-field", children: [
|
|
324
|
+
label ? /* @__PURE__ */ jsx12("label", { className: "ui-label", htmlFor: selectId, children: label }) : null,
|
|
325
|
+
/* @__PURE__ */ jsxs8(
|
|
326
|
+
"select",
|
|
327
|
+
{
|
|
328
|
+
"aria-describedby": cx(descriptionId, errorId) || void 0,
|
|
329
|
+
"aria-invalid": error ? true : void 0,
|
|
330
|
+
className: cx("ui-input", "ui-select", error && "ui-input-error", className),
|
|
331
|
+
id: selectId,
|
|
332
|
+
ref,
|
|
333
|
+
...props,
|
|
334
|
+
children: [
|
|
335
|
+
placeholder ? /* @__PURE__ */ jsx12("option", { value: "", disabled: true, children: placeholder }) : null,
|
|
336
|
+
options.map((option) => /* @__PURE__ */ jsx12("option", { disabled: option.disabled, value: option.value, children: option.label }, option.value))
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
helperText ? /* @__PURE__ */ jsx12("div", { className: "ui-field-help", id: descriptionId, children: helperText }) : null,
|
|
341
|
+
error ? /* @__PURE__ */ jsx12("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
|
|
342
|
+
] });
|
|
343
|
+
});
|
|
344
|
+
|
|
244
345
|
// src/components/Skeleton/Skeleton.tsx
|
|
245
|
-
import { forwardRef as
|
|
246
|
-
import { jsx as
|
|
247
|
-
var Skeleton =
|
|
248
|
-
return /* @__PURE__ */
|
|
346
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
347
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
348
|
+
var Skeleton = forwardRef11(function Skeleton2({ className, height = "1rem", style, width = "100%", ...props }, ref) {
|
|
349
|
+
return /* @__PURE__ */ jsx13(
|
|
249
350
|
"div",
|
|
250
351
|
{
|
|
251
352
|
"aria-hidden": "true",
|
|
@@ -257,6 +358,125 @@ var Skeleton = forwardRef8(function Skeleton2({ className, height = "1rem", styl
|
|
|
257
358
|
);
|
|
258
359
|
});
|
|
259
360
|
|
|
361
|
+
// src/components/Switch/Switch.tsx
|
|
362
|
+
import { forwardRef as forwardRef12, useId as useId6 } from "react";
|
|
363
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
364
|
+
var Switch = forwardRef12(function Switch2({ className, description, id, label, ...props }, ref) {
|
|
365
|
+
const generatedId = useId6();
|
|
366
|
+
const switchId = id ?? generatedId;
|
|
367
|
+
const descriptionId = description ? `${switchId}-description` : void 0;
|
|
368
|
+
return /* @__PURE__ */ jsxs9("label", { className: "ui-switch", children: [
|
|
369
|
+
/* @__PURE__ */ jsxs9("span", { className: "ui-choice-copy", children: [
|
|
370
|
+
/* @__PURE__ */ jsx14("span", { className: "ui-choice-label", children: label }),
|
|
371
|
+
description ? /* @__PURE__ */ jsx14("span", { className: "ui-choice-description", id: descriptionId, children: description }) : null
|
|
372
|
+
] }),
|
|
373
|
+
/* @__PURE__ */ jsx14(
|
|
374
|
+
"input",
|
|
375
|
+
{
|
|
376
|
+
"aria-describedby": descriptionId,
|
|
377
|
+
className: cx("ui-switch-input", className),
|
|
378
|
+
id: switchId,
|
|
379
|
+
ref,
|
|
380
|
+
role: "switch",
|
|
381
|
+
type: "checkbox",
|
|
382
|
+
...props
|
|
383
|
+
}
|
|
384
|
+
),
|
|
385
|
+
/* @__PURE__ */ jsx14("span", { "aria-hidden": "true", className: "ui-switch-track", children: /* @__PURE__ */ jsx14("span", { className: "ui-switch-thumb" }) })
|
|
386
|
+
] });
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
// src/components/Tabs/Tabs.tsx
|
|
390
|
+
import { useId as useId7, useMemo, useState } from "react";
|
|
391
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
392
|
+
function Tabs({
|
|
393
|
+
"aria-label": ariaLabel,
|
|
394
|
+
className,
|
|
395
|
+
defaultValue,
|
|
396
|
+
items,
|
|
397
|
+
onValueChange,
|
|
398
|
+
value
|
|
399
|
+
}) {
|
|
400
|
+
const generatedId = useId7();
|
|
401
|
+
const firstEnabledValue = useMemo(() => items.find((item) => !item.disabled)?.value, [items]);
|
|
402
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? firstEnabledValue);
|
|
403
|
+
const selectedValue = value ?? internalValue;
|
|
404
|
+
const selectedItem = items.find((item) => item.value === selectedValue) ?? items[0];
|
|
405
|
+
function selectTab(nextValue) {
|
|
406
|
+
setInternalValue(nextValue);
|
|
407
|
+
onValueChange?.(nextValue);
|
|
408
|
+
}
|
|
409
|
+
return /* @__PURE__ */ jsxs10("div", { className: cx("ui-tabs", className), children: [
|
|
410
|
+
/* @__PURE__ */ jsx15("div", { "aria-label": ariaLabel, className: "ui-tab-list", role: "tablist", children: items.map((item) => {
|
|
411
|
+
const isSelected = item.value === selectedItem?.value;
|
|
412
|
+
const tabId = `${generatedId}-${item.value}-tab`;
|
|
413
|
+
const panelId = `${generatedId}-${item.value}-panel`;
|
|
414
|
+
return /* @__PURE__ */ jsx15(
|
|
415
|
+
"button",
|
|
416
|
+
{
|
|
417
|
+
"aria-controls": panelId,
|
|
418
|
+
"aria-selected": isSelected,
|
|
419
|
+
className: "ui-tab",
|
|
420
|
+
disabled: item.disabled,
|
|
421
|
+
id: tabId,
|
|
422
|
+
onClick: () => selectTab(item.value),
|
|
423
|
+
role: "tab",
|
|
424
|
+
tabIndex: isSelected ? 0 : -1,
|
|
425
|
+
type: "button",
|
|
426
|
+
children: item.label
|
|
427
|
+
},
|
|
428
|
+
item.value
|
|
429
|
+
);
|
|
430
|
+
}) }),
|
|
431
|
+
selectedItem ? /* @__PURE__ */ jsx15(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
"aria-labelledby": `${generatedId}-${selectedItem.value}-tab`,
|
|
435
|
+
className: "ui-tab-panel",
|
|
436
|
+
id: `${generatedId}-${selectedItem.value}-panel`,
|
|
437
|
+
role: "tabpanel",
|
|
438
|
+
children: selectedItem.content
|
|
439
|
+
}
|
|
440
|
+
) : null
|
|
441
|
+
] });
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// src/components/Textarea/Textarea.tsx
|
|
445
|
+
import { forwardRef as forwardRef13, useId as useId8 } from "react";
|
|
446
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
447
|
+
var Textarea = forwardRef13(function Textarea2({ className, error, helperText, id, label, rows = 4, ...props }, ref) {
|
|
448
|
+
const generatedId = useId8();
|
|
449
|
+
const textareaId = id ?? generatedId;
|
|
450
|
+
const descriptionId = helperText ? `${textareaId}-help` : void 0;
|
|
451
|
+
const errorId = error ? `${textareaId}-error` : void 0;
|
|
452
|
+
return /* @__PURE__ */ jsxs11("div", { className: "ui-input-field", children: [
|
|
453
|
+
label ? /* @__PURE__ */ jsx16("label", { className: "ui-label", htmlFor: textareaId, children: label }) : null,
|
|
454
|
+
/* @__PURE__ */ jsx16(
|
|
455
|
+
"textarea",
|
|
456
|
+
{
|
|
457
|
+
"aria-describedby": cx(descriptionId, errorId) || void 0,
|
|
458
|
+
"aria-invalid": error ? true : void 0,
|
|
459
|
+
className: cx("ui-input", "ui-textarea", error && "ui-input-error", className),
|
|
460
|
+
id: textareaId,
|
|
461
|
+
ref,
|
|
462
|
+
rows,
|
|
463
|
+
...props
|
|
464
|
+
}
|
|
465
|
+
),
|
|
466
|
+
helperText ? /* @__PURE__ */ jsx16("div", { className: "ui-field-help", id: descriptionId, children: helperText }) : null,
|
|
467
|
+
error ? /* @__PURE__ */ jsx16("div", { className: "ui-field-error", id: errorId, role: "alert", children: error }) : null
|
|
468
|
+
] });
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
472
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
473
|
+
function Tooltip({ children, content }) {
|
|
474
|
+
return /* @__PURE__ */ jsxs12("span", { className: "ui-tooltip", children: [
|
|
475
|
+
children,
|
|
476
|
+
/* @__PURE__ */ jsx17("span", { className: "ui-tooltip-content", role: "tooltip", children: content })
|
|
477
|
+
] });
|
|
478
|
+
}
|
|
479
|
+
|
|
260
480
|
// src/tokens/colors.ts
|
|
261
481
|
var colors = {
|
|
262
482
|
background: "var(--ui-color-background)",
|
|
@@ -298,17 +518,26 @@ var typography = {
|
|
|
298
518
|
};
|
|
299
519
|
export {
|
|
300
520
|
Alert,
|
|
521
|
+
Avatar,
|
|
301
522
|
Badge,
|
|
302
523
|
Button,
|
|
303
524
|
Card,
|
|
304
525
|
CardContent,
|
|
305
526
|
CardFooter,
|
|
306
527
|
CardHeader,
|
|
528
|
+
Checkbox,
|
|
307
529
|
EmptyState,
|
|
308
530
|
Input,
|
|
309
531
|
Modal,
|
|
532
|
+
Radio,
|
|
533
|
+
RadioGroup,
|
|
534
|
+
Select,
|
|
310
535
|
Skeleton,
|
|
311
536
|
Spinner,
|
|
537
|
+
Switch,
|
|
538
|
+
Tabs,
|
|
539
|
+
Textarea,
|
|
540
|
+
Tooltip,
|
|
312
541
|
colors,
|
|
313
542
|
spacing,
|
|
314
543
|
typography
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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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,EAAE,WAAW,SAAS,QAAQ,OAAO,QAAQ,QAAQ,GAAG,MAAM,GAC9D,KACA;AACA,SACE,gBAAAF;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAW,GAAG,eAAe,SAAS;AAAA,MACtC;AAAA,MACA,OAAO,EAAE,QAAQ,OAAO,GAAG,MAAM;AAAA,MAChC,GAAG;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"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Alert/Alert.tsx","../src/utils/cx.ts","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.tsx","../src/components/Button/Button.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Input/Input.tsx","../src/components/Modal/Modal.tsx","../src/components/Radio/Radio.tsx","../src/components/Select/Select.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/Switch/Switch.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Tooltip/Tooltip.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 { type HTMLAttributes } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n alt: string;\n fallback?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n src?: string;\n}\n\nexport function Avatar({ alt, className, fallback, size = \"md\", src, ...props }: AvatarProps) {\n const initials =\n fallback ??\n alt\n .split(\" \")\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => part[0]?.toUpperCase())\n .join(\"\");\n\n return (\n <span className={cx(\"ui-avatar\", `ui-avatar-${size}`, className)} {...props}>\n {src ? <img alt={alt} className=\"ui-avatar-image\" src={src} /> : initials}\n </span>\n );\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 InputHTMLAttributes, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> {\n description?: string;\n error?: string;\n label: string;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { className, description, error, id, label, ...props },\n ref,\n) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n const descriptionId = description ? `${checkboxId}-description` : undefined;\n const errorId = error ? `${checkboxId}-error` : undefined;\n\n return (\n <div className=\"ui-choice-field\">\n <label className=\"ui-choice\">\n <input\n aria-describedby={cx(descriptionId, errorId) || undefined}\n aria-invalid={error ? true : undefined}\n className={cx(\"ui-checkbox\", className)}\n id={checkboxId}\n ref={ref}\n type=\"checkbox\"\n {...props}\n />\n <span className=\"ui-choice-copy\">\n <span className=\"ui-choice-label\">{label}</span>\n {description ? (\n <span className=\"ui-choice-description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </span>\n </label>\n {error ? (\n <div className=\"ui-field-error\" id={errorId} role=\"alert\">\n {error}\n </div>\n ) : null}\n </div>\n );\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 InputHTMLAttributes, type ReactNode, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> {\n description?: string;\n label: string;\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, description, id, label, ...props },\n ref,\n) {\n const generatedId = useId();\n const radioId = id ?? generatedId;\n const descriptionId = description ? `${radioId}-description` : undefined;\n\n return (\n <label className=\"ui-choice\">\n <input\n aria-describedby={descriptionId}\n className={cx(\"ui-radio\", className)}\n id={radioId}\n ref={ref}\n type=\"radio\"\n {...props}\n />\n <span className=\"ui-choice-copy\">\n <span className=\"ui-choice-label\">{label}</span>\n {description ? (\n <span className=\"ui-choice-description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </span>\n </label>\n );\n});\n\nexport interface RadioGroupProps {\n children: ReactNode;\n error?: string;\n label: string;\n}\n\nexport function RadioGroup({ children, error, label }: RadioGroupProps) {\n return (\n <fieldset className=\"ui-radio-group\">\n <legend className=\"ui-label\">{label}</legend>\n <div className=\"ui-radio-options\">{children}</div>\n {error ? (\n <div className=\"ui-field-error\" role=\"alert\">\n {error}\n </div>\n ) : null}\n </fieldset>\n );\n}\n","import { forwardRef, type SelectHTMLAttributes, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface SelectOption {\n disabled?: boolean;\n label: string;\n value: string;\n}\n\nexport interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, \"children\"> {\n error?: string;\n helperText?: string;\n label?: string;\n options: SelectOption[];\n placeholder?: string;\n}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n { className, error, helperText, id, label, options, placeholder, ...props },\n ref,\n) {\n const generatedId = useId();\n const selectId = id ?? generatedId;\n const descriptionId = helperText ? `${selectId}-help` : undefined;\n const errorId = error ? `${selectId}-error` : undefined;\n\n return (\n <div className=\"ui-input-field\">\n {label ? (\n <label className=\"ui-label\" htmlFor={selectId}>\n {label}\n </label>\n ) : null}\n <select\n aria-describedby={cx(descriptionId, errorId) || undefined}\n aria-invalid={error ? true : undefined}\n className={cx(\"ui-input\", \"ui-select\", error && \"ui-input-error\", className)}\n id={selectId}\n ref={ref}\n {...props}\n >\n {placeholder ? (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n ) : null}\n {options.map((option) => (\n <option disabled={option.disabled} key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\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 { 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","import { forwardRef, type InputHTMLAttributes, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> {\n description?: string;\n label: string;\n}\n\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(function Switch(\n { className, description, id, label, ...props },\n ref,\n) {\n const generatedId = useId();\n const switchId = id ?? generatedId;\n const descriptionId = description ? `${switchId}-description` : undefined;\n\n return (\n <label className=\"ui-switch\">\n <span className=\"ui-choice-copy\">\n <span className=\"ui-choice-label\">{label}</span>\n {description ? (\n <span className=\"ui-choice-description\" id={descriptionId}>\n {description}\n </span>\n ) : null}\n </span>\n <input\n aria-describedby={descriptionId}\n className={cx(\"ui-switch-input\", className)}\n id={switchId}\n ref={ref}\n role=\"switch\"\n type=\"checkbox\"\n {...props}\n />\n <span aria-hidden=\"true\" className=\"ui-switch-track\">\n <span className=\"ui-switch-thumb\" />\n </span>\n </label>\n );\n});\n","import { type ReactNode, useId, useMemo, useState } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface TabItem {\n content: ReactNode;\n disabled?: boolean;\n label: ReactNode;\n value: string;\n}\n\nexport interface TabsProps {\n \"aria-label\"?: string;\n className?: string;\n defaultValue?: string;\n items: TabItem[];\n onValueChange?: (value: string) => void;\n value?: string;\n}\n\nexport function Tabs({\n \"aria-label\": ariaLabel,\n className,\n defaultValue,\n items,\n onValueChange,\n value,\n}: TabsProps) {\n const generatedId = useId();\n const firstEnabledValue = useMemo(() => items.find((item) => !item.disabled)?.value, [items]);\n const [internalValue, setInternalValue] = useState(defaultValue ?? firstEnabledValue);\n const selectedValue = value ?? internalValue;\n const selectedItem = items.find((item) => item.value === selectedValue) ?? items[0];\n\n function selectTab(nextValue: string) {\n setInternalValue(nextValue);\n onValueChange?.(nextValue);\n }\n\n return (\n <div className={cx(\"ui-tabs\", className)}>\n <div aria-label={ariaLabel} className=\"ui-tab-list\" role=\"tablist\">\n {items.map((item) => {\n const isSelected = item.value === selectedItem?.value;\n const tabId = `${generatedId}-${item.value}-tab`;\n const panelId = `${generatedId}-${item.value}-panel`;\n\n return (\n <button\n aria-controls={panelId}\n aria-selected={isSelected}\n className=\"ui-tab\"\n disabled={item.disabled}\n id={tabId}\n key={item.value}\n onClick={() => selectTab(item.value)}\n role=\"tab\"\n tabIndex={isSelected ? 0 : -1}\n type=\"button\"\n >\n {item.label}\n </button>\n );\n })}\n </div>\n {selectedItem ? (\n <div\n aria-labelledby={`${generatedId}-${selectedItem.value}-tab`}\n className=\"ui-tab-panel\"\n id={`${generatedId}-${selectedItem.value}-panel`}\n role=\"tabpanel\"\n >\n {selectedItem.content}\n </div>\n ) : null}\n </div>\n );\n}\n","import { forwardRef, type TextareaHTMLAttributes, useId } from \"react\";\nimport { cx } from \"../../utils/cx\";\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n error?: string;\n helperText?: string;\n label?: string;\n}\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(\n { className, error, helperText, id, label, rows = 4, ...props },\n ref,\n) {\n const generatedId = useId();\n const textareaId = id ?? generatedId;\n const descriptionId = helperText ? `${textareaId}-help` : undefined;\n const errorId = error ? `${textareaId}-error` : undefined;\n\n return (\n <div className=\"ui-input-field\">\n {label ? (\n <label className=\"ui-label\" htmlFor={textareaId}>\n {label}\n </label>\n ) : null}\n <textarea\n aria-describedby={cx(descriptionId, errorId) || undefined}\n aria-invalid={error ? true : undefined}\n className={cx(\"ui-input\", \"ui-textarea\", error && \"ui-input-error\", className)}\n id={textareaId}\n ref={ref}\n rows={rows}\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 { type ReactNode } from \"react\";\n\nexport interface TooltipProps {\n children: ReactNode;\n content: ReactNode;\n}\n\nexport function Tooltip({ children, content }: TooltipProps) {\n return (\n <span className=\"ui-tooltip\">\n {children}\n <span className=\"ui-tooltip-content\" role=\"tooltip\">\n {content}\n </span>\n </span>\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,OACnE,EAAE,UAAU,WAAW,OAAO,UAAU,QAAQ,GAAG,MAAM,GACzD,KACA;AACA,QAAM,OAAO,YAAY,YAAY,YAAY,YAAY,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AA,QACJ;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,IACC,aACC,gBAAAA,MAAC,SAAI,WAAU,iBAAgB,IAAI,eAChC,sBACH,IACE;AAAA,IACH,QACC,gBAAAA,MAAC,SAAI,WAAU,kBAAiB,IAAI,SAAS,MAAK,SAC/C,iBACH,IACE;AAAA,KACN;AAEJ,CAAC;;;ACrCG,SAEE,OAAAK,OAFF,QAAAC,cAAA;AAFG,SAAS,QAAQ,EAAE,UAAU,QAAQ,GAAiB;AAC3D,SACE,gBAAAA,OAAC,UAAK,WAAU,cACb;AAAA;AAAA,IACD,gBAAAD,MAAC,UAAK,WAAU,sBAAqB,MAAK,WACvC,mBACH;AAAA,KACF;AAEJ;;;AChBO,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","jsx","forwardRef","jsx","forwardRef","Badge","forwardRef","jsx","jsx","jsxs","forwardRef","Button","forwardRef","jsx","forwardRef","Card","CardHeader","CardContent","CardFooter","forwardRef","jsx","jsxs","forwardRef","Checkbox","forwardRef","jsx","jsxs","forwardRef","EmptyState","forwardRef","useId","jsx","jsxs","forwardRef","Input","useId","forwardRef","useId","jsx","jsxs","forwardRef","Modal","useId","forwardRef","useId","jsx","jsxs","forwardRef","Radio","useId","forwardRef","useId","jsx","jsxs","forwardRef","Select","useId","forwardRef","jsx","forwardRef","Skeleton","forwardRef","useId","jsx","jsxs","forwardRef","Switch","useId","useId","jsx","jsxs","useId","forwardRef","useId","jsx","jsxs","forwardRef","Textarea","useId","jsx","jsxs"]}
|