@bestow-ui/react 0.5.0 → 0.7.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.cjs +334 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +250 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +77 -2
- package/dist/index.d.ts +77 -2
- package/dist/index.js +303 -153
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -206,38 +206,83 @@ function usePortalClassName() {
|
|
|
206
206
|
return usePortalProps().className;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// src/components/
|
|
209
|
+
// src/components/Avatar/Avatar.tsx
|
|
210
|
+
import * as RadixAvatar from "@radix-ui/react-avatar";
|
|
211
|
+
import { UserIcon } from "@bestow-ui/icons";
|
|
212
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
213
|
+
|
|
214
|
+
// src/components/Avatar/Avatar.css.ts
|
|
215
|
+
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
216
|
+
var fallback = "_1fd2kp27";
|
|
217
|
+
var image = "_1fd2kp26";
|
|
218
|
+
var root2 = _7a468({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
|
|
219
|
+
|
|
220
|
+
// src/components/Avatar/Avatar.tsx
|
|
221
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
222
|
+
function getInitials(name) {
|
|
223
|
+
const [a = "", b = ""] = name.trim().split(/\s+/);
|
|
224
|
+
const first = (word) => Array.from(word)[0] ?? "";
|
|
225
|
+
return (first(a) + first(b)).toUpperCase();
|
|
226
|
+
}
|
|
227
|
+
var Avatar = forwardRef2(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
|
|
228
|
+
const label3 = alt ?? name;
|
|
229
|
+
const a11y = label3 ? { role: "img", "aria-label": label3 } : { "aria-hidden": true };
|
|
230
|
+
const initials = name ? getInitials(name) : "";
|
|
231
|
+
return /* @__PURE__ */ jsxs(RadixAvatar.Root, { ref, className: cx(root2({ size, shape }), className), ...a11y, ...rest, children: [
|
|
232
|
+
src && /* @__PURE__ */ jsx2(RadixAvatar.Image, { src, alt: "", className: image }),
|
|
233
|
+
/* @__PURE__ */ jsx2(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx2(UserIcon, { size: "60%" })) })
|
|
234
|
+
] });
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// src/components/Badge/Badge.tsx
|
|
210
238
|
import { forwardRef as forwardRef3 } from "react";
|
|
211
239
|
|
|
240
|
+
// src/components/Badge/Badge.css.ts
|
|
241
|
+
import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
242
|
+
var badge = _7a4682({ defaultClassName: "_1295cfn4", variantClassNames: { variant: { solid: "_1295cfn5", soft: "_1295cfn6", outline: "_1295cfn7" }, color: { primary: "_1295cfn8", neutral: "_1295cfn9", danger: "_1295cfna", success: "_1295cfnb" }, size: { sm: "_1295cfnc", md: "_1295cfnd", lg: "_1295cfne" } }, defaultVariants: { variant: "soft", color: "neutral", size: "md" }, compoundVariants: [] });
|
|
243
|
+
var icon = "_1295cfnf";
|
|
244
|
+
|
|
245
|
+
// src/components/Badge/Badge.tsx
|
|
246
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
247
|
+
var Badge = forwardRef3(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
|
|
248
|
+
return /* @__PURE__ */ jsxs2("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
|
|
249
|
+
startIcon && /* @__PURE__ */ jsx3("span", { className: icon, children: startIcon }),
|
|
250
|
+
children
|
|
251
|
+
] });
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// src/components/Button/Button.tsx
|
|
255
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
256
|
+
|
|
212
257
|
// src/components/Spinner/Spinner.tsx
|
|
213
258
|
import { LoaderIcon } from "@bestow-ui/icons";
|
|
214
|
-
import { forwardRef as
|
|
259
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
215
260
|
|
|
216
261
|
// src/styles/visuallyHidden.css.ts
|
|
217
262
|
var visuallyHidden = "_1kdtbw10";
|
|
218
263
|
|
|
219
264
|
// src/components/Spinner/Spinner.css.ts
|
|
220
|
-
import { createRuntimeFn as
|
|
221
|
-
var spinner =
|
|
265
|
+
import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
266
|
+
var spinner = _7a4683({ defaultClassName: "_4b5tg40", variantClassNames: { color: { current: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "current", size: "md" }, compoundVariants: [] });
|
|
222
267
|
|
|
223
268
|
// src/components/Spinner/Spinner.tsx
|
|
224
|
-
import { jsx as
|
|
225
|
-
var Spinner =
|
|
269
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
270
|
+
var Spinner = forwardRef4(function Spinner2({ size, color, label: label3 = "\uB85C\uB529 \uC911", className, ...rest }, ref) {
|
|
226
271
|
const a11y = label3 ? { role: "status" } : { "aria-hidden": true };
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
label3 && /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ jsxs3("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
273
|
+
/* @__PURE__ */ jsx4(LoaderIcon, { size: "100%" }),
|
|
274
|
+
label3 && /* @__PURE__ */ jsx4("span", { className: visuallyHidden, children: label3 })
|
|
230
275
|
] });
|
|
231
276
|
});
|
|
232
277
|
|
|
233
278
|
// src/components/Button/Button.css.ts
|
|
234
|
-
import { createRuntimeFn as
|
|
235
|
-
var button =
|
|
236
|
-
var
|
|
279
|
+
import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
280
|
+
var button = _7a4684({ defaultClassName: "xcekda6", variantClassNames: { variant: { solid: "xcekda7", soft: "xcekda8", outline: "xcekda9", ghost: "xcekdaa" }, color: { primary: "xcekdab", neutral: "xcekdac", danger: "xcekdad" }, size: { sm: "xcekdae", md: "xcekdaf", lg: "xcekdag" }, fullWidth: { true: "xcekdah" } }, defaultVariants: { variant: "solid", color: "primary", size: "md" }, compoundVariants: [] });
|
|
281
|
+
var icon2 = "xcekdai";
|
|
237
282
|
|
|
238
283
|
// src/components/Button/Button.tsx
|
|
239
|
-
import { jsx as
|
|
240
|
-
var Button =
|
|
284
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
285
|
+
var Button = forwardRef5(function Button2({ variant, color, size, fullWidth, startIcon, endIcon, loading, className, type = "button", onClick, children, ...rest }, ref) {
|
|
241
286
|
const handleClick = (event) => {
|
|
242
287
|
if (loading) {
|
|
243
288
|
event.preventDefault();
|
|
@@ -245,8 +290,8 @@ var Button = forwardRef3(function Button2({ variant, color, size, fullWidth, sta
|
|
|
245
290
|
}
|
|
246
291
|
onClick?.(event);
|
|
247
292
|
};
|
|
248
|
-
const leading = loading ? /* @__PURE__ */
|
|
249
|
-
return /* @__PURE__ */
|
|
293
|
+
const leading = loading ? /* @__PURE__ */ jsx5(Spinner, { size: "sm", label: "" }) : startIcon;
|
|
294
|
+
return /* @__PURE__ */ jsxs4(
|
|
250
295
|
"button",
|
|
251
296
|
{
|
|
252
297
|
ref,
|
|
@@ -257,16 +302,41 @@ var Button = forwardRef3(function Button2({ variant, color, size, fullWidth, sta
|
|
|
257
302
|
onClick: handleClick,
|
|
258
303
|
...rest,
|
|
259
304
|
children: [
|
|
260
|
-
leading && /* @__PURE__ */
|
|
305
|
+
leading && /* @__PURE__ */ jsx5("span", { className: icon2, children: leading }),
|
|
261
306
|
children,
|
|
262
|
-
endIcon && /* @__PURE__ */
|
|
307
|
+
endIcon && /* @__PURE__ */ jsx5("span", { className: icon2, children: endIcon })
|
|
263
308
|
]
|
|
264
309
|
}
|
|
265
310
|
);
|
|
266
311
|
});
|
|
267
312
|
|
|
313
|
+
// src/components/Card/Card.tsx
|
|
314
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
315
|
+
|
|
316
|
+
// src/components/Card/Card.css.ts
|
|
317
|
+
import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
318
|
+
var body = "dnuf1u9";
|
|
319
|
+
var card = _7a4685({ defaultClassName: "dnuf1u0", variantClassNames: { variant: { outline: "dnuf1u1", elevated: "dnuf1u2", soft: "dnuf1u3" }, padding: { none: "dnuf1u4", sm: "dnuf1u5", md: "dnuf1u6", lg: "dnuf1u7" } }, defaultVariants: { variant: "outline", padding: "md" }, compoundVariants: [] });
|
|
320
|
+
var footer = "dnuf1ua";
|
|
321
|
+
var header = "dnuf1u8";
|
|
322
|
+
|
|
323
|
+
// src/components/Card/Card.tsx
|
|
324
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
325
|
+
var Card = forwardRef6(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
|
|
326
|
+
return /* @__PURE__ */ jsx6(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
|
|
327
|
+
});
|
|
328
|
+
var CardHeader = forwardRef6(function CardHeader2({ className, ...rest }, ref) {
|
|
329
|
+
return /* @__PURE__ */ jsx6("div", { ref, className: cx(header, className), ...rest });
|
|
330
|
+
});
|
|
331
|
+
var CardBody = forwardRef6(function CardBody2({ className, ...rest }, ref) {
|
|
332
|
+
return /* @__PURE__ */ jsx6("div", { ref, className: cx(body, className), ...rest });
|
|
333
|
+
});
|
|
334
|
+
var CardFooter = forwardRef6(function CardFooter2({ className, ...rest }, ref) {
|
|
335
|
+
return /* @__PURE__ */ jsx6("div", { ref, className: cx(footer, className), ...rest });
|
|
336
|
+
});
|
|
337
|
+
|
|
268
338
|
// src/components/Checkbox/Checkbox.tsx
|
|
269
|
-
import { forwardRef as
|
|
339
|
+
import { forwardRef as forwardRef7, useEffect, useRef } from "react";
|
|
270
340
|
|
|
271
341
|
// src/utils/mergeRefs.ts
|
|
272
342
|
function mergeRefs(...refs) {
|
|
@@ -279,23 +349,23 @@ function mergeRefs(...refs) {
|
|
|
279
349
|
}
|
|
280
350
|
|
|
281
351
|
// src/components/Checkbox/Checkbox.css.ts
|
|
282
|
-
import { createRuntimeFn as
|
|
352
|
+
import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
283
353
|
var checkIcon = "_1y7mzsn8 _1y7mzsn7";
|
|
284
|
-
var control =
|
|
354
|
+
var control = _7a4686({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
285
355
|
var indeterminateIcon = "_1y7mzsn9 _1y7mzsn7";
|
|
286
356
|
var input = "_1y7mzsn6";
|
|
287
|
-
var
|
|
357
|
+
var root3 = _7a4686({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
288
358
|
|
|
289
359
|
// src/components/Checkbox/Checkbox.tsx
|
|
290
|
-
import { jsx as
|
|
291
|
-
var Checkbox =
|
|
360
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
361
|
+
var Checkbox = forwardRef7(function Checkbox2({ label: label3, size, indeterminate = false, invalid, disabled, className, ...rest }, ref) {
|
|
292
362
|
const innerRef = useRef(null);
|
|
293
363
|
useEffect(() => {
|
|
294
364
|
if (innerRef.current) innerRef.current.indeterminate = indeterminate;
|
|
295
365
|
}, [indeterminate]);
|
|
296
|
-
return /* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
366
|
+
return /* @__PURE__ */ jsxs5("label", { className: cx(root3({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
367
|
+
/* @__PURE__ */ jsxs5("span", { className: control({ size }), children: [
|
|
368
|
+
/* @__PURE__ */ jsx7(
|
|
299
369
|
"input",
|
|
300
370
|
{
|
|
301
371
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -306,39 +376,62 @@ var Checkbox = forwardRef4(function Checkbox2({ label: label3, size, indetermina
|
|
|
306
376
|
...rest
|
|
307
377
|
}
|
|
308
378
|
),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsx7("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx7("path", { d: "M5 10.5l3.2 3L15 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
380
|
+
/* @__PURE__ */ jsx7("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx7("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
311
381
|
] }),
|
|
312
382
|
label3
|
|
313
383
|
] });
|
|
314
384
|
});
|
|
315
385
|
|
|
386
|
+
// src/components/Divider/Divider.tsx
|
|
387
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
388
|
+
|
|
389
|
+
// src/components/Divider/Divider.css.ts
|
|
390
|
+
import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
391
|
+
var divider = _7a4687({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
392
|
+
var labeled = "_1t3gq8v3";
|
|
393
|
+
var line = "_1t3gq8v4";
|
|
394
|
+
|
|
395
|
+
// src/components/Divider/Divider.tsx
|
|
396
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
397
|
+
var Divider = forwardRef8(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
|
|
398
|
+
if (children && orientation === "horizontal") {
|
|
399
|
+
return /* @__PURE__ */ jsxs6("div", { ref, className: cx(labeled, className), ...rest, children: [
|
|
400
|
+
/* @__PURE__ */ jsx8("span", { className: line, "aria-hidden": true }),
|
|
401
|
+
children,
|
|
402
|
+
/* @__PURE__ */ jsx8("span", { className: line, "aria-hidden": true })
|
|
403
|
+
] });
|
|
404
|
+
}
|
|
405
|
+
const a11y = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation === "vertical" ? "vertical" : void 0 };
|
|
406
|
+
return /* @__PURE__ */ jsx8("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
|
|
407
|
+
});
|
|
408
|
+
|
|
316
409
|
// src/components/Input/Input.tsx
|
|
317
|
-
import { forwardRef as
|
|
410
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
318
411
|
|
|
319
412
|
// src/components/Input/Input.css.ts
|
|
320
|
-
import { createRuntimeFn as
|
|
413
|
+
import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
321
414
|
var adornment = "_19p5zvh6";
|
|
322
415
|
var field = "_19p5zvh7";
|
|
323
416
|
var fieldFullWidth = "_19p5zvh8";
|
|
324
|
-
var helperText =
|
|
417
|
+
var helperText = _7a4688({ defaultClassName: "_19p5zvhb", variantClassNames: { error: { true: "_19p5zvhc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
325
418
|
var input2 = "_19p5zvh5";
|
|
326
419
|
var label = "_19p5zvh9";
|
|
327
420
|
var requiredMark = "_19p5zvha";
|
|
328
|
-
var
|
|
421
|
+
var root4 = _7a4688({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
329
422
|
|
|
330
423
|
// src/components/Input/Input.tsx
|
|
331
|
-
import { jsx as
|
|
332
|
-
var Input =
|
|
333
|
-
return /* @__PURE__ */
|
|
424
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
425
|
+
var Input = forwardRef9(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
|
|
426
|
+
return /* @__PURE__ */ jsxs7(
|
|
334
427
|
"div",
|
|
335
428
|
{
|
|
336
|
-
className: cx(
|
|
429
|
+
className: cx(root4({ size, fullWidth }), rootClassName),
|
|
337
430
|
"data-invalid": invalid || void 0,
|
|
338
431
|
"data-disabled": disabled || void 0,
|
|
339
432
|
children: [
|
|
340
|
-
startAdornment && /* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
433
|
+
startAdornment && /* @__PURE__ */ jsx9("span", { className: adornment, children: startAdornment }),
|
|
434
|
+
/* @__PURE__ */ jsx9(
|
|
342
435
|
"input",
|
|
343
436
|
{
|
|
344
437
|
ref,
|
|
@@ -348,25 +441,25 @@ var Input = forwardRef5(function Input2({ size, invalid, fullWidth, startAdornme
|
|
|
348
441
|
...rest
|
|
349
442
|
}
|
|
350
443
|
),
|
|
351
|
-
endAdornment && /* @__PURE__ */
|
|
444
|
+
endAdornment && /* @__PURE__ */ jsx9("span", { className: adornment, children: endAdornment })
|
|
352
445
|
]
|
|
353
446
|
}
|
|
354
447
|
);
|
|
355
448
|
});
|
|
356
449
|
|
|
357
450
|
// src/components/Input/TextField.tsx
|
|
358
|
-
import { forwardRef as
|
|
359
|
-
import { jsx as
|
|
360
|
-
var TextField =
|
|
451
|
+
import { forwardRef as forwardRef10, useId } from "react";
|
|
452
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
453
|
+
var TextField = forwardRef10(function TextField2({ label: label3, helperText: helperText2, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
|
|
361
454
|
const generatedId = useId();
|
|
362
455
|
const inputId = id ?? generatedId;
|
|
363
456
|
const helperId = helperText2 ? `${inputId}-helper` : void 0;
|
|
364
|
-
return /* @__PURE__ */
|
|
365
|
-
label3 && /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ jsxs8("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
458
|
+
label3 && /* @__PURE__ */ jsxs8("label", { htmlFor: inputId, className: label, children: [
|
|
366
459
|
label3,
|
|
367
|
-
required && /* @__PURE__ */
|
|
460
|
+
required && /* @__PURE__ */ jsx10("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
368
461
|
] }),
|
|
369
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ jsx10(
|
|
370
463
|
Input,
|
|
371
464
|
{
|
|
372
465
|
ref,
|
|
@@ -378,7 +471,7 @@ var TextField = forwardRef6(function TextField2({ label: label3, helperText: hel
|
|
|
378
471
|
...rest
|
|
379
472
|
}
|
|
380
473
|
),
|
|
381
|
-
helperText2 && /* @__PURE__ */
|
|
474
|
+
helperText2 && /* @__PURE__ */ jsx10("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
382
475
|
] });
|
|
383
476
|
});
|
|
384
477
|
|
|
@@ -387,19 +480,19 @@ import * as Dialog from "@radix-ui/react-dialog";
|
|
|
387
480
|
import { XIcon } from "@bestow-ui/icons";
|
|
388
481
|
|
|
389
482
|
// src/components/Modal/Modal.css.ts
|
|
390
|
-
import { createRuntimeFn as
|
|
391
|
-
var
|
|
483
|
+
import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
484
|
+
var body2 = "_1pdsmv0a";
|
|
392
485
|
var closeButton = "_1pdsmv09";
|
|
393
|
-
var content =
|
|
486
|
+
var content = _7a4689({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
394
487
|
var description = "_1pdsmv08";
|
|
395
|
-
var
|
|
396
|
-
var
|
|
488
|
+
var footer2 = "_1pdsmv0b";
|
|
489
|
+
var header2 = "_1pdsmv05";
|
|
397
490
|
var headings = "_1pdsmv06";
|
|
398
491
|
var overlay = "_1pdsmv00";
|
|
399
492
|
var title = "_1pdsmv07";
|
|
400
493
|
|
|
401
494
|
// src/components/Modal/Modal.tsx
|
|
402
|
-
import { jsx as
|
|
495
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
403
496
|
function Modal({
|
|
404
497
|
open,
|
|
405
498
|
defaultOpen,
|
|
@@ -408,18 +501,18 @@ function Modal({
|
|
|
408
501
|
title: title3,
|
|
409
502
|
description: description4,
|
|
410
503
|
children,
|
|
411
|
-
footer:
|
|
504
|
+
footer: footer4,
|
|
412
505
|
size,
|
|
413
506
|
hideCloseButton = false,
|
|
414
507
|
closeOnOverlayClick = true,
|
|
415
508
|
className
|
|
416
509
|
}) {
|
|
417
510
|
const portal2 = usePortalProps();
|
|
418
|
-
return /* @__PURE__ */
|
|
419
|
-
trigger2 && /* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ jsxs9(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
|
|
512
|
+
trigger2 && /* @__PURE__ */ jsx11(Dialog.Trigger, { asChild: true, children: trigger2 }),
|
|
513
|
+
/* @__PURE__ */ jsxs9(Dialog.Portal, { children: [
|
|
514
|
+
/* @__PURE__ */ jsx11(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
|
|
515
|
+
/* @__PURE__ */ jsxs9(
|
|
423
516
|
Dialog.Content,
|
|
424
517
|
{
|
|
425
518
|
className: cx(portal2.className, content({ size }), className),
|
|
@@ -427,15 +520,15 @@ function Modal({
|
|
|
427
520
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
428
521
|
...description4 ? {} : { "aria-describedby": void 0 },
|
|
429
522
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
description4 && /* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ jsxs9("div", { className: header2, children: [
|
|
524
|
+
/* @__PURE__ */ jsxs9("div", { className: headings, children: [
|
|
525
|
+
/* @__PURE__ */ jsx11(Dialog.Title, { className: title, children: title3 }),
|
|
526
|
+
description4 && /* @__PURE__ */ jsx11(Dialog.Description, { className: description, children: description4 })
|
|
434
527
|
] }),
|
|
435
|
-
!hideCloseButton && /* @__PURE__ */
|
|
528
|
+
!hideCloseButton && /* @__PURE__ */ jsx11(Dialog.Close, { className: closeButton, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx11(XIcon, { size: 16 }) })
|
|
436
529
|
] }),
|
|
437
|
-
children && /* @__PURE__ */
|
|
438
|
-
|
|
530
|
+
children && /* @__PURE__ */ jsx11("div", { className: body2, children }),
|
|
531
|
+
footer4 && /* @__PURE__ */ jsx11("div", { className: footer2, children: footer4 })
|
|
439
532
|
]
|
|
440
533
|
}
|
|
441
534
|
)
|
|
@@ -446,22 +539,22 @@ var ModalClose = Dialog.Close;
|
|
|
446
539
|
|
|
447
540
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
448
541
|
import * as RadixRadioGroup from "@radix-ui/react-radio-group";
|
|
449
|
-
import { forwardRef as
|
|
542
|
+
import { forwardRef as forwardRef11, useId as useId2 } from "react";
|
|
450
543
|
|
|
451
544
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
452
|
-
import { createRuntimeFn as
|
|
545
|
+
import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
453
546
|
var description2 = "_1w9iwjmd";
|
|
454
547
|
var groupLabel = "_1w9iwjme";
|
|
455
548
|
var indicator = "_1w9iwjma";
|
|
456
|
-
var items =
|
|
549
|
+
var items = _7a46810({ defaultClassName: "_1w9iwjm0", variantClassNames: { orientation: { vertical: "_1w9iwjm1", horizontal: "_1w9iwjm2" } }, defaultVariants: { orientation: "vertical" }, compoundVariants: [] });
|
|
457
550
|
var labelText = "_1w9iwjmc";
|
|
458
|
-
var option =
|
|
459
|
-
var radio =
|
|
551
|
+
var option = _7a46810({ defaultClassName: "_1w9iwjm3", variantClassNames: { size: { sm: "_1w9iwjm4", md: "_1w9iwjm5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
552
|
+
var radio = _7a46810({ defaultClassName: "_1w9iwjm7", variantClassNames: { size: { sm: "_1w9iwjm8", md: "_1w9iwjm9" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
460
553
|
var text = "_1w9iwjmb";
|
|
461
554
|
|
|
462
555
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
463
|
-
import { jsx as
|
|
464
|
-
var RadioGroup =
|
|
556
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
557
|
+
var RadioGroup = forwardRef11(function RadioGroup2(props, ref) {
|
|
465
558
|
const {
|
|
466
559
|
options,
|
|
467
560
|
value: value2,
|
|
@@ -484,12 +577,12 @@ var RadioGroup = forwardRef7(function RadioGroup2(props, ref) {
|
|
|
484
577
|
const baseId = id ?? generatedId;
|
|
485
578
|
const labelId = label3 ? `${baseId}-label` : void 0;
|
|
486
579
|
const helperId = helperText2 ? `${baseId}-helper` : void 0;
|
|
487
|
-
return /* @__PURE__ */
|
|
488
|
-
label3 && /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ jsxs10("div", { className: cx(field, className), children: [
|
|
581
|
+
label3 && /* @__PURE__ */ jsxs10("span", { id: labelId, className: cx(label, groupLabel), children: [
|
|
489
582
|
label3,
|
|
490
|
-
required && /* @__PURE__ */
|
|
583
|
+
required && /* @__PURE__ */ jsx12("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
491
584
|
] }),
|
|
492
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ jsx12(
|
|
493
586
|
RadixRadioGroup.Root,
|
|
494
587
|
{
|
|
495
588
|
ref,
|
|
@@ -510,8 +603,8 @@ var RadioGroup = forwardRef7(function RadioGroup2(props, ref) {
|
|
|
510
603
|
const itemId = `${baseId}-${option2.value}`;
|
|
511
604
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
512
605
|
const itemDisabled = disabled || option2.disabled;
|
|
513
|
-
return /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsxs10("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
607
|
+
/* @__PURE__ */ jsx12(
|
|
515
608
|
RadixRadioGroup.Item,
|
|
516
609
|
{
|
|
517
610
|
id: itemId,
|
|
@@ -519,29 +612,29 @@ var RadioGroup = forwardRef7(function RadioGroup2(props, ref) {
|
|
|
519
612
|
disabled: option2.disabled,
|
|
520
613
|
"aria-describedby": descriptionId,
|
|
521
614
|
className: radio({ size }),
|
|
522
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ jsx12(RadixRadioGroup.Indicator, { className: indicator })
|
|
523
616
|
}
|
|
524
617
|
),
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
option2.description && /* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ jsxs10("span", { className: text, children: [
|
|
619
|
+
/* @__PURE__ */ jsx12("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
620
|
+
option2.description && /* @__PURE__ */ jsx12("span", { id: descriptionId, className: description2, children: option2.description })
|
|
528
621
|
] })
|
|
529
622
|
] }, option2.value);
|
|
530
623
|
})
|
|
531
624
|
}
|
|
532
625
|
),
|
|
533
|
-
helperText2 && /* @__PURE__ */
|
|
626
|
+
helperText2 && /* @__PURE__ */ jsx12("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
534
627
|
] });
|
|
535
628
|
});
|
|
536
629
|
|
|
537
630
|
// src/components/Select/Select.tsx
|
|
538
631
|
import * as RadixSelect from "@radix-ui/react-select";
|
|
539
|
-
import { forwardRef as
|
|
632
|
+
import { forwardRef as forwardRef12, useId as useId3 } from "react";
|
|
540
633
|
import { CheckIcon, ChevronDownIcon } from "@bestow-ui/icons";
|
|
541
634
|
|
|
542
635
|
// src/components/Select/Select.css.ts
|
|
543
636
|
var content2 = "_1kx81e83";
|
|
544
|
-
var
|
|
637
|
+
var icon3 = "_1kx81e82";
|
|
545
638
|
var item = "_1kx81e85";
|
|
546
639
|
var itemIndicator = "_1kx81e86";
|
|
547
640
|
var trigger = "_1kx81e80";
|
|
@@ -549,8 +642,8 @@ var value = "_1kx81e81";
|
|
|
549
642
|
var viewport = "_1kx81e84";
|
|
550
643
|
|
|
551
644
|
// src/components/Select/Select.tsx
|
|
552
|
-
import { jsx as
|
|
553
|
-
var Select =
|
|
645
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
646
|
+
var Select = forwardRef12(function Select2(props, ref) {
|
|
554
647
|
const {
|
|
555
648
|
options,
|
|
556
649
|
value: value2,
|
|
@@ -574,12 +667,12 @@ var Select = forwardRef8(function Select2(props, ref) {
|
|
|
574
667
|
const triggerId = id ?? generatedId;
|
|
575
668
|
const helperId = helperText2 ? `${triggerId}-helper` : void 0;
|
|
576
669
|
const portal2 = usePortalProps();
|
|
577
|
-
return /* @__PURE__ */
|
|
578
|
-
label3 && /* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ jsxs11("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
671
|
+
label3 && /* @__PURE__ */ jsxs11("label", { htmlFor: triggerId, className: label, children: [
|
|
579
672
|
label3,
|
|
580
|
-
required && /* @__PURE__ */
|
|
673
|
+
required && /* @__PURE__ */ jsx13("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
581
674
|
] }),
|
|
582
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ jsxs11(
|
|
583
676
|
RadixSelect.Root,
|
|
584
677
|
{
|
|
585
678
|
value: isControlled ? value2 ?? "" : void 0,
|
|
@@ -589,7 +682,7 @@ var Select = forwardRef8(function Select2(props, ref) {
|
|
|
589
682
|
required,
|
|
590
683
|
name,
|
|
591
684
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ jsxs11(
|
|
593
686
|
RadixSelect.Trigger,
|
|
594
687
|
{
|
|
595
688
|
ref,
|
|
@@ -598,14 +691,14 @@ var Select = forwardRef8(function Select2(props, ref) {
|
|
|
598
691
|
"aria-invalid": error || void 0,
|
|
599
692
|
"aria-describedby": helperId,
|
|
600
693
|
"data-invalid": error || void 0,
|
|
601
|
-
className: cx(
|
|
694
|
+
className: cx(root4({ size, fullWidth }), trigger, className),
|
|
602
695
|
children: [
|
|
603
|
-
/* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ jsx13("span", { className: value, children: /* @__PURE__ */ jsx13(RadixSelect.Value, { placeholder }) }),
|
|
697
|
+
/* @__PURE__ */ jsx13(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx13(ChevronDownIcon, { size: 16 }) })
|
|
605
698
|
]
|
|
606
699
|
}
|
|
607
700
|
),
|
|
608
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ jsx13(RadixSelect.Portal, { children: /* @__PURE__ */ jsx13(
|
|
609
702
|
RadixSelect.Content,
|
|
610
703
|
{
|
|
611
704
|
position: "popper",
|
|
@@ -613,15 +706,15 @@ var Select = forwardRef8(function Select2(props, ref) {
|
|
|
613
706
|
collisionPadding: 8,
|
|
614
707
|
className: cx(portal2.className, content2),
|
|
615
708
|
style: portal2.style,
|
|
616
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ jsx13(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs11(
|
|
617
710
|
RadixSelect.Item,
|
|
618
711
|
{
|
|
619
712
|
value: option2.value,
|
|
620
713
|
disabled: option2.disabled,
|
|
621
714
|
className: item,
|
|
622
715
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ jsx13(RadixSelect.ItemText, { children: option2.label }),
|
|
717
|
+
/* @__PURE__ */ jsx13(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx13(CheckIcon, { size: 16 }) })
|
|
625
718
|
]
|
|
626
719
|
},
|
|
627
720
|
option2.value
|
|
@@ -631,21 +724,70 @@ var Select = forwardRef8(function Select2(props, ref) {
|
|
|
631
724
|
]
|
|
632
725
|
}
|
|
633
726
|
),
|
|
634
|
-
helperText2 && /* @__PURE__ */
|
|
727
|
+
helperText2 && /* @__PURE__ */ jsx13("p", { id: helperId, className: helperText({ error }), children: helperText2 })
|
|
635
728
|
] });
|
|
636
729
|
});
|
|
637
730
|
|
|
731
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
732
|
+
import { assignInlineVars as assignInlineVars2 } from "@vanilla-extract/dynamic";
|
|
733
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
734
|
+
|
|
735
|
+
// src/components/Skeleton/Skeleton.css.ts
|
|
736
|
+
import { createRuntimeFn as _7a46811 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
737
|
+
var height = "var(--_1s8datd1)";
|
|
738
|
+
var lines = "_1s8datd6";
|
|
739
|
+
var skeleton = _7a46811({ defaultClassName: "_1s8datd2", variantClassNames: { variant: { text: "_1s8datd3", rect: "_1s8datd4", circle: "_1s8datd5" } }, defaultVariants: { variant: "text" }, compoundVariants: [] });
|
|
740
|
+
var width = "var(--_1s8datd0)";
|
|
741
|
+
|
|
742
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
743
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
744
|
+
var toCss = (value2) => typeof value2 === "number" ? `${value2}px` : value2;
|
|
745
|
+
var Skeleton = forwardRef13(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
|
|
746
|
+
const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
|
|
747
|
+
const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
|
|
748
|
+
if (variant === "text" && lines2 > 1) {
|
|
749
|
+
return /* @__PURE__ */ jsx14(
|
|
750
|
+
"span",
|
|
751
|
+
{
|
|
752
|
+
ref,
|
|
753
|
+
"aria-hidden": true,
|
|
754
|
+
className: cx(lines, className),
|
|
755
|
+
style: { ...assignInlineVars2({ [width]: w }), ...style },
|
|
756
|
+
...rest,
|
|
757
|
+
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ jsx14(
|
|
758
|
+
"span",
|
|
759
|
+
{
|
|
760
|
+
className: skeleton({ variant }),
|
|
761
|
+
style: assignInlineVars2({ [width]: i === lines2 - 1 ? "60%" : "100%", [height]: h })
|
|
762
|
+
},
|
|
763
|
+
i
|
|
764
|
+
))
|
|
765
|
+
}
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
return /* @__PURE__ */ jsx14(
|
|
769
|
+
"span",
|
|
770
|
+
{
|
|
771
|
+
ref,
|
|
772
|
+
"aria-hidden": true,
|
|
773
|
+
className: cx(skeleton({ variant }), className),
|
|
774
|
+
style: { ...assignInlineVars2({ [width]: w, [height]: h }), ...style },
|
|
775
|
+
...rest
|
|
776
|
+
}
|
|
777
|
+
);
|
|
778
|
+
});
|
|
779
|
+
|
|
638
780
|
// src/components/Stack/Stack.tsx
|
|
639
|
-
import { forwardRef as
|
|
781
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
640
782
|
|
|
641
783
|
// src/components/Stack/Stack.css.ts
|
|
642
|
-
import { createRuntimeFn as
|
|
643
|
-
var stack =
|
|
784
|
+
import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
785
|
+
var stack = _7a46812({ defaultClassName: "_1jz9hj90", variantClassNames: { direction: { row: "_1jz9hj91", column: "_1jz9hj92", "row-reverse": "_1jz9hj93", "column-reverse": "_1jz9hj94" }, gap: { "0": "_1jz9hj95", "1": "_1jz9hj96", "2": "_1jz9hj97", "3": "_1jz9hj98", "4": "_1jz9hj99", "5": "_1jz9hj9a", "6": "_1jz9hj9b", "8": "_1jz9hj9c", "10": "_1jz9hj9d", "12": "_1jz9hj9e", "16": "_1jz9hj9f" }, align: { start: "_1jz9hj9g", center: "_1jz9hj9h", end: "_1jz9hj9i", stretch: "_1jz9hj9j", baseline: "_1jz9hj9k" }, justify: { start: "_1jz9hj9l", center: "_1jz9hj9m", end: "_1jz9hj9n", between: "_1jz9hj9o", around: "_1jz9hj9p", evenly: "_1jz9hj9q" }, wrap: { true: "_1jz9hj9r" } }, defaultVariants: { direction: "column" }, compoundVariants: [] });
|
|
644
786
|
|
|
645
787
|
// src/components/Stack/Stack.tsx
|
|
646
|
-
import { jsx as
|
|
647
|
-
var Stack =
|
|
648
|
-
return /* @__PURE__ */
|
|
788
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
789
|
+
var Stack = forwardRef14(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
|
|
790
|
+
return /* @__PURE__ */ jsx15(
|
|
649
791
|
Component,
|
|
650
792
|
{
|
|
651
793
|
ref,
|
|
@@ -657,22 +799,22 @@ var Stack = forwardRef9(function Stack2({ as: Component = "div", direction, gap,
|
|
|
657
799
|
|
|
658
800
|
// src/components/Switch/Switch.tsx
|
|
659
801
|
import * as RadixSwitch from "@radix-ui/react-switch";
|
|
660
|
-
import { forwardRef as
|
|
802
|
+
import { forwardRef as forwardRef15, useId as useId4 } from "react";
|
|
661
803
|
|
|
662
804
|
// src/components/Switch/Switch.css.ts
|
|
663
|
-
import { createRuntimeFn as
|
|
805
|
+
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
664
806
|
var label2 = "o33ul29";
|
|
665
|
-
var
|
|
666
|
-
var thumb =
|
|
667
|
-
var track =
|
|
807
|
+
var root5 = _7a46813({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
808
|
+
var thumb = _7a46813({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
809
|
+
var track = _7a46813({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
668
810
|
|
|
669
811
|
// src/components/Switch/Switch.tsx
|
|
670
|
-
import { jsx as
|
|
671
|
-
var Switch =
|
|
812
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
813
|
+
var Switch = forwardRef15(function Switch2({ label: label3, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
672
814
|
const generatedId = useId4();
|
|
673
815
|
const switchId = id ?? generatedId;
|
|
674
|
-
return /* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ jsxs12("span", { className: cx(root5({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
817
|
+
/* @__PURE__ */ jsx16(
|
|
676
818
|
RadixSwitch.Root,
|
|
677
819
|
{
|
|
678
820
|
ref,
|
|
@@ -681,16 +823,16 @@ var Switch = forwardRef10(function Switch2({ label: label3, size, id, className,
|
|
|
681
823
|
"aria-label": ariaLabel,
|
|
682
824
|
className: track({ size }),
|
|
683
825
|
...rest,
|
|
684
|
-
children: /* @__PURE__ */
|
|
826
|
+
children: /* @__PURE__ */ jsx16(RadixSwitch.Thumb, { className: thumb({ size }) })
|
|
685
827
|
}
|
|
686
828
|
),
|
|
687
|
-
label3 && /* @__PURE__ */
|
|
829
|
+
label3 && /* @__PURE__ */ jsx16("label", { htmlFor: switchId, className: label2, children: label3 })
|
|
688
830
|
] });
|
|
689
831
|
});
|
|
690
832
|
|
|
691
833
|
// src/components/Textarea/Textarea.tsx
|
|
692
834
|
import {
|
|
693
|
-
forwardRef as
|
|
835
|
+
forwardRef as forwardRef16,
|
|
694
836
|
useCallback,
|
|
695
837
|
useEffect as useEffect2,
|
|
696
838
|
useId as useId5,
|
|
@@ -700,17 +842,17 @@ import {
|
|
|
700
842
|
} from "react";
|
|
701
843
|
|
|
702
844
|
// src/components/Textarea/Textarea.css.ts
|
|
703
|
-
import { createRuntimeFn as
|
|
845
|
+
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
704
846
|
var count = "_1koawa9";
|
|
705
847
|
var countOver = "_1koawaa";
|
|
706
848
|
var defaultWidth = "_1koawa7";
|
|
707
|
-
var
|
|
708
|
-
var textarea =
|
|
849
|
+
var footer3 = "_1koawa8";
|
|
850
|
+
var textarea = _7a46814({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
709
851
|
|
|
710
852
|
// src/components/Textarea/Textarea.tsx
|
|
711
|
-
import { jsx as
|
|
853
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
712
854
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect2;
|
|
713
|
-
var Textarea =
|
|
855
|
+
var Textarea = forwardRef16(function Textarea2({
|
|
714
856
|
label: label3,
|
|
715
857
|
helperText: helperText2,
|
|
716
858
|
error,
|
|
@@ -750,12 +892,12 @@ var Textarea = forwardRef11(function Textarea2({
|
|
|
750
892
|
fitHeight();
|
|
751
893
|
onChange?.(event);
|
|
752
894
|
};
|
|
753
|
-
return /* @__PURE__ */
|
|
754
|
-
label3 && /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ jsxs13("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
896
|
+
label3 && /* @__PURE__ */ jsxs13("label", { htmlFor: textareaId, className: label, children: [
|
|
755
897
|
label3,
|
|
756
|
-
required && /* @__PURE__ */
|
|
898
|
+
required && /* @__PURE__ */ jsx17("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
757
899
|
] }),
|
|
758
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ jsx17(
|
|
759
901
|
"textarea",
|
|
760
902
|
{
|
|
761
903
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -777,9 +919,9 @@ var Textarea = forwardRef11(function Textarea2({
|
|
|
777
919
|
...rest
|
|
778
920
|
}
|
|
779
921
|
),
|
|
780
|
-
(helperText2 || showCount) && /* @__PURE__ */
|
|
781
|
-
helperText2 && /* @__PURE__ */
|
|
782
|
-
showCount && /* @__PURE__ */
|
|
922
|
+
(helperText2 || showCount) && /* @__PURE__ */ jsxs13("div", { className: footer3, children: [
|
|
923
|
+
helperText2 && /* @__PURE__ */ jsx17("p", { id: helperId, className: helperText({ error }), children: helperText2 }),
|
|
924
|
+
showCount && /* @__PURE__ */ jsx17("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
783
925
|
] })
|
|
784
926
|
] });
|
|
785
927
|
});
|
|
@@ -790,16 +932,16 @@ import { createContext as createContext2, useCallback as useCallback2, useContex
|
|
|
790
932
|
import { XIcon as XIcon2 } from "@bestow-ui/icons";
|
|
791
933
|
|
|
792
934
|
// src/components/Toast/Toast.css.ts
|
|
793
|
-
import { createRuntimeFn as
|
|
935
|
+
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
794
936
|
var action = "_1g11zvx7";
|
|
795
937
|
var close = "_1g11zvx8";
|
|
796
938
|
var description3 = "_1g11zvx6";
|
|
797
939
|
var title2 = "_1g11zvx5";
|
|
798
|
-
var toast =
|
|
940
|
+
var toast = _7a46815({ defaultClassName: "_1g11zvx1", variantClassNames: { variant: { "default": "_1g11zvx2", success: "_1g11zvx3", danger: "_1g11zvx4" } }, defaultVariants: { variant: "default" }, compoundVariants: [] });
|
|
799
941
|
var viewport2 = "_1g11zvx0";
|
|
800
942
|
|
|
801
943
|
// src/components/Toast/Toast.tsx
|
|
802
|
-
import { jsx as
|
|
944
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
803
945
|
var REMOVE_DELAY = 500;
|
|
804
946
|
var ToastContext = createContext2(null);
|
|
805
947
|
function ToastProvider({ children, duration = 5e3, label: label3 = "\uC54C\uB9BC" }) {
|
|
@@ -817,9 +959,9 @@ function ToastProvider({ children, duration = 5e3, label: label3 = "\uC54C\uB9BC
|
|
|
817
959
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
818
960
|
}, []);
|
|
819
961
|
const value2 = useMemo2(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
820
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ jsx18(ToastContext.Provider, { value: value2, children: /* @__PURE__ */ jsxs14(RadixToast.Provider, { duration, label: label3, swipeDirection: "right", children: [
|
|
821
963
|
children,
|
|
822
|
-
toasts.map(({ id, open, title: title3, description: description4, variant, duration: itemDuration, action: action2 }) => /* @__PURE__ */
|
|
964
|
+
toasts.map(({ id, open, title: title3, description: description4, variant, duration: itemDuration, action: action2 }) => /* @__PURE__ */ jsxs14(
|
|
823
965
|
RadixToast.Root,
|
|
824
966
|
{
|
|
825
967
|
open,
|
|
@@ -829,15 +971,15 @@ function ToastProvider({ children, duration = 5e3, label: label3 = "\uC54C\uB9BC
|
|
|
829
971
|
},
|
|
830
972
|
className: toast({ variant }),
|
|
831
973
|
children: [
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
description4 && /* @__PURE__ */
|
|
834
|
-
action2 && /* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ jsx18(RadixToast.Title, { className: title2, children: title3 }),
|
|
975
|
+
description4 && /* @__PURE__ */ jsx18(RadixToast.Description, { className: description3, children: description4 }),
|
|
976
|
+
action2 && /* @__PURE__ */ jsx18(RadixToast.Action, { asChild: true, altText: action2.altText ?? action2.label, className: action, children: /* @__PURE__ */ jsx18(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action2.onClick, children: action2.label }) }),
|
|
977
|
+
/* @__PURE__ */ jsx18(RadixToast.Close, { className: close, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx18(XIcon2, { size: 16 }) })
|
|
836
978
|
]
|
|
837
979
|
},
|
|
838
980
|
id
|
|
839
981
|
)),
|
|
840
|
-
/* @__PURE__ */
|
|
982
|
+
/* @__PURE__ */ jsx18(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
841
983
|
] }) });
|
|
842
984
|
}
|
|
843
985
|
function useToast() {
|
|
@@ -854,7 +996,7 @@ var arrow = "z7rufs1";
|
|
|
854
996
|
var content3 = "z7rufs0";
|
|
855
997
|
|
|
856
998
|
// src/components/Tooltip/Tooltip.tsx
|
|
857
|
-
import { jsx as
|
|
999
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
858
1000
|
function Tooltip({
|
|
859
1001
|
content: content4,
|
|
860
1002
|
children,
|
|
@@ -869,9 +1011,9 @@ function Tooltip({
|
|
|
869
1011
|
}) {
|
|
870
1012
|
const portal2 = usePortalProps();
|
|
871
1013
|
if (disabled || content4 == null || content4 === "") return children;
|
|
872
|
-
return /* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ jsx19(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs15(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1015
|
+
/* @__PURE__ */ jsx19(RadixTooltip.Trigger, { asChild: true, children }),
|
|
1016
|
+
/* @__PURE__ */ jsx19(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs15(
|
|
875
1017
|
RadixTooltip.Content,
|
|
876
1018
|
{
|
|
877
1019
|
side,
|
|
@@ -882,7 +1024,7 @@ function Tooltip({
|
|
|
882
1024
|
style: portal2.style,
|
|
883
1025
|
children: [
|
|
884
1026
|
content4,
|
|
885
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ jsx19(RadixTooltip.Arrow, { className: arrow, width: 10, height: 5 })
|
|
886
1028
|
]
|
|
887
1029
|
}
|
|
888
1030
|
) })
|
|
@@ -890,14 +1032,14 @@ function Tooltip({
|
|
|
890
1032
|
}
|
|
891
1033
|
|
|
892
1034
|
// src/components/Typography/Typography.tsx
|
|
893
|
-
import { forwardRef as
|
|
1035
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
894
1036
|
|
|
895
1037
|
// src/components/Typography/Typography.css.ts
|
|
896
|
-
import { createRuntimeFn as
|
|
897
|
-
var typography =
|
|
1038
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1039
|
+
var typography = _7a46816({ defaultClassName: "kiolio0", variantClassNames: { variant: { display: "kiolio1", h1: "kiolio2", h2: "kiolio3", h3: "kiolio4", h4: "kiolio5", "body-lg": "kiolio6", body: "kiolio7", "body-sm": "kiolio8", caption: "kiolio9" }, color: { "default": "kiolioa", muted: "kioliob", subtle: "kiolioc", primary: "kioliod", danger: "kiolioe", success: "kioliof", inherit: "kioliog" }, weight: { regular: "kiolioh", medium: "kiolioi", semibold: "kiolioj", bold: "kioliok" }, align: { start: "kioliol", center: "kioliom", end: "kiolion" }, truncate: { true: "kiolioo" } }, defaultVariants: { variant: "body", color: "default" }, compoundVariants: [] });
|
|
898
1040
|
|
|
899
1041
|
// src/components/Typography/Typography.tsx
|
|
900
|
-
import { jsx as
|
|
1042
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
901
1043
|
var defaultElement = {
|
|
902
1044
|
display: "h1",
|
|
903
1045
|
h1: "h1",
|
|
@@ -909,9 +1051,9 @@ var defaultElement = {
|
|
|
909
1051
|
"body-sm": "p",
|
|
910
1052
|
caption: "span"
|
|
911
1053
|
};
|
|
912
|
-
var Typography =
|
|
1054
|
+
var Typography = forwardRef17(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
|
|
913
1055
|
const Component = as ?? defaultElement[variant];
|
|
914
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsx20(
|
|
915
1057
|
Component,
|
|
916
1058
|
{
|
|
917
1059
|
ref,
|
|
@@ -921,13 +1063,21 @@ var Typography = forwardRef12(function Typography2({ variant = "body", as, color
|
|
|
921
1063
|
);
|
|
922
1064
|
});
|
|
923
1065
|
export {
|
|
1066
|
+
Avatar,
|
|
1067
|
+
Badge,
|
|
924
1068
|
Button,
|
|
1069
|
+
Card,
|
|
1070
|
+
CardBody,
|
|
1071
|
+
CardFooter,
|
|
1072
|
+
CardHeader,
|
|
925
1073
|
Checkbox,
|
|
1074
|
+
Divider,
|
|
926
1075
|
Input,
|
|
927
1076
|
Modal,
|
|
928
1077
|
ModalClose,
|
|
929
1078
|
RadioGroup,
|
|
930
1079
|
Select,
|
|
1080
|
+
Skeleton,
|
|
931
1081
|
Spinner,
|
|
932
1082
|
Stack,
|
|
933
1083
|
Switch,
|