insystem-atoms 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,1770 @@
1
+ import React3, { useId, useState, useEffect } from 'react';
2
+ import styled2, { keyframes, css } from 'styled-components';
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
+
5
+ // src/components/Button/index.tsx
6
+
7
+ // src/styles/tokens.ts
8
+ var defaultTokens = {
9
+ color: {
10
+ primary: "#3B82F6",
11
+ primaryHover: "#2563EB",
12
+ primaryLight: "#EFF6FF",
13
+ secondary: "#6B7280",
14
+ secondaryHover: "#4B5563",
15
+ secondaryLight: "#F3F4F6",
16
+ success: "#10B981",
17
+ successLight: "#ECFDF5",
18
+ warning: "#F59E0B",
19
+ warningLight: "#FFFBEB",
20
+ danger: "#EF4444",
21
+ dangerHover: "#DC2626",
22
+ dangerLight: "#FEF2F2",
23
+ text: {
24
+ primary: "#111827",
25
+ secondary: "#6B7280",
26
+ disabled: "#9CA3AF",
27
+ inverse: "#FFFFFF",
28
+ placeholder: "#9CA3AF",
29
+ error: "#EF4444",
30
+ hint: "#6B7280"
31
+ },
32
+ border: {
33
+ default: "#D1D5DB",
34
+ focus: "#3B82F6",
35
+ error: "#EF4444",
36
+ disabled: "#E5E7EB"
37
+ },
38
+ background: {
39
+ default: "#FFFFFF",
40
+ disabled: "#F9FAFB",
41
+ hover: "#F3F4F6",
42
+ subtle: "#F9FAFB"
43
+ }
44
+ },
45
+ font: {
46
+ size: {
47
+ xs: "12px",
48
+ sm: "13px",
49
+ md: "14px",
50
+ lg: "16px"
51
+ },
52
+ weight: {
53
+ regular: 400,
54
+ medium: 500,
55
+ semibold: 600
56
+ },
57
+ family: "'Pretendard', 'Apple SD Gothic Neo', sans-serif"
58
+ },
59
+ spacing: {
60
+ xs: "4px",
61
+ sm: "8px",
62
+ md: "12px",
63
+ lg: "16px",
64
+ xl: "20px",
65
+ xxl: "24px"
66
+ },
67
+ radius: {
68
+ none: "0",
69
+ sm: "4px",
70
+ md: "6px",
71
+ lg: "8px",
72
+ xl: "12px",
73
+ full: "9999px"
74
+ },
75
+ shadow: {
76
+ sm: "0 1px 2px 0 rgba(0,0,0,0.05)",
77
+ md: "0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10)",
78
+ lg: "0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -4px rgba(0,0,0,0.10)",
79
+ popup: "0px 2px 10px 0px rgba(0,0,0,0.1)",
80
+ modal: "0px 8px 24px 0px rgba(0,0,0,0.14)",
81
+ field: "0px 6px 16px 0px rgba(0,0,0,0.06)",
82
+ card: "0px 12px 12px 0px rgba(0,0,0,0.10)"
83
+ },
84
+ transition: {
85
+ fast: "0.15s ease",
86
+ base: "0.2s ease",
87
+ slow: "0.3s ease"
88
+ }
89
+ };
90
+ var tokens = deepClone(defaultTokens);
91
+ function configureTokens(overrides) {
92
+ deepMergeInPlace(tokens, overrides);
93
+ }
94
+ function resetTokens() {
95
+ deepMergeInPlace(tokens, defaultTokens);
96
+ }
97
+ function deepClone(obj) {
98
+ if (obj === null || typeof obj !== "object") return obj;
99
+ if (Array.isArray(obj)) return obj.map(deepClone);
100
+ const result = {};
101
+ for (const key in obj) {
102
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
103
+ result[key] = deepClone(obj[key]);
104
+ }
105
+ }
106
+ return result;
107
+ }
108
+ function deepMergeInPlace(target, source) {
109
+ for (const key in source) {
110
+ if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
111
+ const val = source[key];
112
+ if (val === void 0) continue;
113
+ if (val !== null && typeof val === "object" && !Array.isArray(val)) {
114
+ if (typeof target[key] === "object") {
115
+ deepMergeInPlace(
116
+ target[key],
117
+ val
118
+ );
119
+ } else {
120
+ target[key] = deepClone(val);
121
+ }
122
+ } else {
123
+ target[key] = val;
124
+ }
125
+ }
126
+ }
127
+
128
+ // src/styles/t.ts
129
+ var t = {
130
+ // ─── Color — Brand ─────────────────────────────────────────────────────────
131
+ primary: () => tokens.color.primary,
132
+ primaryHover: () => tokens.color.primaryHover,
133
+ primaryLight: () => tokens.color.primaryLight,
134
+ secondary: () => tokens.color.secondary,
135
+ secondaryHover: () => tokens.color.secondaryHover,
136
+ secondaryLight: () => tokens.color.secondaryLight,
137
+ // ─── Color — Status ─────────────────────────────────────────────────────────
138
+ success: () => tokens.color.success,
139
+ successLight: () => tokens.color.successLight,
140
+ warning: () => tokens.color.warning,
141
+ warningLight: () => tokens.color.warningLight,
142
+ danger: () => tokens.color.danger,
143
+ dangerHover: () => tokens.color.dangerHover,
144
+ dangerLight: () => tokens.color.dangerLight,
145
+ // ─── Color — Text ───────────────────────────────────────────────────────────
146
+ textPrimary: () => tokens.color.text.primary,
147
+ textSecondary: () => tokens.color.text.secondary,
148
+ textDisabled: () => tokens.color.text.disabled,
149
+ textInverse: () => tokens.color.text.inverse,
150
+ textPlaceholder: () => tokens.color.text.placeholder,
151
+ textError: () => tokens.color.text.error,
152
+ textHint: () => tokens.color.text.hint,
153
+ // ─── Color — Border ─────────────────────────────────────────────────────────
154
+ borderDefault: () => tokens.color.border.default,
155
+ borderFocus: () => tokens.color.border.focus,
156
+ borderError: () => tokens.color.border.error,
157
+ borderDisabled: () => tokens.color.border.disabled,
158
+ // ─── Color — Background ─────────────────────────────────────────────────────
159
+ bgDefault: () => tokens.color.background.default,
160
+ bgDisabled: () => tokens.color.background.disabled,
161
+ bgHover: () => tokens.color.background.hover,
162
+ bgSubtle: () => tokens.color.background.subtle,
163
+ // ─── Font ───────────────────────────────────────────────────────────────────
164
+ fontFamily: () => tokens.font.family,
165
+ fontXs: () => tokens.font.size.xs,
166
+ fontSm: () => tokens.font.size.sm,
167
+ fontMd: () => tokens.font.size.md,
168
+ fontLg: () => tokens.font.size.lg,
169
+ weightRegular: () => tokens.font.weight.regular,
170
+ weightMedium: () => tokens.font.weight.medium,
171
+ weightSemibold: () => tokens.font.weight.semibold,
172
+ // ─── Spacing ─────────────────────────────────────────────────────────────────
173
+ spacingXs: () => tokens.spacing.xs,
174
+ spacingSm: () => tokens.spacing.sm,
175
+ spacingMd: () => tokens.spacing.md,
176
+ spacingLg: () => tokens.spacing.lg,
177
+ spacingXl: () => tokens.spacing.xl,
178
+ spacingXxl: () => tokens.spacing.xxl,
179
+ // ─── Radius ──────────────────────────────────────────────────────────────────
180
+ radiusNone: () => tokens.radius.none,
181
+ radiusSm: () => tokens.radius.sm,
182
+ radiusMd: () => tokens.radius.md,
183
+ radiusLg: () => tokens.radius.lg,
184
+ radiusXl: () => tokens.radius.xl,
185
+ radiusFull: () => tokens.radius.full,
186
+ // ─── Shadow ──────────────────────────────────────────────────────────────────
187
+ shadowSm: () => tokens.shadow.sm,
188
+ shadowMd: () => tokens.shadow.md,
189
+ shadowLg: () => tokens.shadow.lg,
190
+ shadowPopup: () => tokens.shadow.popup,
191
+ shadowModal: () => tokens.shadow.modal,
192
+ shadowField: () => tokens.shadow.field,
193
+ shadowCard: () => tokens.shadow.card,
194
+ // ─── Transition ──────────────────────────────────────────────────────────────
195
+ transitionFast: () => tokens.transition.fast,
196
+ transitionBase: () => tokens.transition.base,
197
+ transitionSlow: () => tokens.transition.slow,
198
+ // ─── Composite (자주 쓰는 alpha 조합) ────────────────────────────────────────
199
+ /** primary 20% 투명도 — 포커스 링 outline 색상 */
200
+ primaryAlpha20: () => `${tokens.color.primary}33`,
201
+ /** danger 20% 투명도 — 에러 포커스 링 */
202
+ dangerAlpha20: () => `${tokens.color.danger}33`
203
+ };
204
+ var Button = React3.forwardRef(
205
+ ({
206
+ variant = "primary",
207
+ size = "md",
208
+ loading = false,
209
+ fullWidth = false,
210
+ width,
211
+ leftIcon,
212
+ rightIcon,
213
+ iconOnly = false,
214
+ disabled,
215
+ children,
216
+ borderRadius,
217
+ borderColor,
218
+ textColor,
219
+ backgroundColor,
220
+ padding,
221
+ ...rest
222
+ }, ref) => {
223
+ const isDisabled = disabled || loading;
224
+ return /* @__PURE__ */ jsx(
225
+ StyledButton,
226
+ {
227
+ ref,
228
+ variant,
229
+ $size: size,
230
+ $fullWidth: fullWidth,
231
+ $width: width,
232
+ $iconOnly: iconOnly,
233
+ $borderRadius: borderRadius,
234
+ $borderColor: borderColor,
235
+ $textColor: textColor,
236
+ $backgroundColor: backgroundColor,
237
+ $padding: padding,
238
+ disabled: isDisabled,
239
+ "aria-disabled": isDisabled,
240
+ "aria-busy": loading,
241
+ ...rest,
242
+ children: loading ? /* @__PURE__ */ jsx(Spinner, { size }) : /* @__PURE__ */ jsxs(Fragment, { children: [
243
+ leftIcon && /* @__PURE__ */ jsx(IconWrapper, { position: "left", children: leftIcon }),
244
+ !iconOnly && children,
245
+ rightIcon && /* @__PURE__ */ jsx(IconWrapper, { position: "right", children: rightIcon })
246
+ ] })
247
+ }
248
+ );
249
+ }
250
+ );
251
+ Button.displayName = "Button";
252
+ var spin = keyframes`to { transform: rotate(360deg); }`;
253
+ var spinnerSizeMap = {
254
+ xs: "10px",
255
+ sm: "12px",
256
+ md: "14px",
257
+ lg: "16px"
258
+ };
259
+ var Spinner = ({ size }) => /* @__PURE__ */ jsx(SpinnerCircle, { $size: spinnerSizeMap[size] });
260
+ var SpinnerCircle = styled2.span`
261
+ display: inline-block;
262
+ width: ${({ $size }) => $size};
263
+ height: ${({ $size }) => $size};
264
+ border: 2px solid currentColor;
265
+ border-top-color: transparent;
266
+ border-radius: 50%;
267
+ animation: ${spin} 0.6s linear infinite;
268
+ `;
269
+ var IconWrapper = styled2.span`
270
+ display: inline-flex;
271
+ align-items: center;
272
+ flex-shrink: 0;
273
+ ${({ position }) => position === "left" ? "margin-right: 6px;" : "margin-left: 6px;"}
274
+ svg { width: 1em; height: 1em; }
275
+ `;
276
+ var sizeStyles = {
277
+ xs: css`
278
+ height: 26px;
279
+ padding: 0 8px;
280
+ font-size: ${t.fontXs};
281
+ border-radius: ${t.radiusSm};
282
+ `,
283
+ sm: css`
284
+ height: 32px;
285
+ padding: 0 ${t.spacingSm};
286
+ font-size: ${t.fontSm};
287
+ border-radius: ${t.radiusSm};
288
+ `,
289
+ md: css`
290
+ height: 38px;
291
+ padding: 0 ${t.spacingLg};
292
+ font-size: ${t.fontMd};
293
+ border-radius: ${t.radiusMd};
294
+ `,
295
+ lg: css`
296
+ height: 46px;
297
+ padding: 0 ${t.spacingXl};
298
+ font-size: ${t.fontLg};
299
+ border-radius: ${t.radiusLg};
300
+ `
301
+ };
302
+ var variantStyles = {
303
+ primary: css`
304
+ background: ${t.primary};
305
+ color: ${t.textInverse};
306
+ border: 1px solid transparent;
307
+ &:hover:not(:disabled) { background: ${t.primaryHover}; }
308
+ `,
309
+ secondary: css`
310
+ background: ${t.bgDefault};
311
+ color: ${t.secondary};
312
+ border: 1px solid ${t.borderDefault};
313
+ &:hover:not(:disabled) {
314
+ background: ${t.bgHover};
315
+ border-color: ${t.secondary};
316
+ }
317
+ `,
318
+ success: css`
319
+ background: ${t.success};
320
+ color: ${t.textInverse};
321
+ border: 1px solid transparent;
322
+ &:hover:not(:disabled) { filter: brightness(0.92); }
323
+ `,
324
+ warning: css`
325
+ background: ${t.warning};
326
+ color: ${t.textInverse};
327
+ border: 1px solid transparent;
328
+ &:hover:not(:disabled) { filter: brightness(0.92); }
329
+ `,
330
+ danger: css`
331
+ background: transparent;
332
+ color: ${t.danger};
333
+ border: 1px solid ${t.danger};
334
+ &:hover:not(:disabled) {
335
+ background: ${t.dangerLight};
336
+ border-color: ${t.dangerHover};
337
+ color: ${t.dangerHover};
338
+ }
339
+ `,
340
+ ghost: css`
341
+ background: transparent;
342
+ color: ${t.primary};
343
+ border: 1px solid transparent;
344
+ &:hover:not(:disabled) { background: ${t.bgHover}; }
345
+ `,
346
+ admin: css`
347
+ background: #333;
348
+ color: #fff;
349
+ border: 1px solid transparent;
350
+ &:hover:not(:disabled) { background: #111; }
351
+ `,
352
+ neutral: css`
353
+ background: #999;
354
+ color: #fff;
355
+ border: 1px solid transparent;
356
+ &:hover:not(:disabled) { background: #666; }
357
+ `,
358
+ conversion: css`
359
+ background: transparent;
360
+ color: ${t.primary};
361
+ border: 1px solid ${t.primary};
362
+ &:hover:not(:disabled) { background: ${t.bgHover}; }
363
+ `,
364
+ icon: css`
365
+ background: transparent;
366
+ color: ${t.textPrimary};
367
+ border: none;
368
+ padding: 0;
369
+ &:hover:not(:disabled) { background: ${t.bgHover}; }
370
+ `
371
+ };
372
+ var StyledButton = styled2.button`
373
+ display: inline-flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ cursor: pointer;
377
+ font-family: ${t.fontFamily};
378
+ font-weight: ${t.weightMedium};
379
+ line-height: 1;
380
+ white-space: nowrap;
381
+ transition: background ${t.transitionFast}, border-color ${t.transitionFast},
382
+ filter ${t.transitionFast}, opacity ${t.transitionFast};
383
+ user-select: none;
384
+ outline: none;
385
+
386
+ ${({ $size }) => sizeStyles[$size]}
387
+ ${({ variant }) => variantStyles[variant]}
388
+
389
+ ${({ $fullWidth }) => $fullWidth && css`width: 100%;`}
390
+
391
+ ${({ $width }) => $width !== void 0 && css`width: ${typeof $width === "number" ? `${$width}px` : $width};`}
392
+
393
+ ${({ $iconOnly, $size }) => $iconOnly && css`
394
+ padding: 0;
395
+ width: ${$size === "xs" ? "26px" : $size === "sm" ? "32px" : $size === "lg" ? "46px" : "38px"};
396
+ `}
397
+
398
+ ${({ $borderRadius }) => $borderRadius && `border-radius: ${$borderRadius};`}
399
+ ${({ $borderColor }) => $borderColor && `border-color: ${$borderColor}; border-style: solid;`}
400
+ ${({ $textColor }) => $textColor && `color: ${$textColor};`}
401
+ ${({ $backgroundColor }) => $backgroundColor && `background: ${$backgroundColor};`}
402
+ ${({ $padding }) => $padding && `padding: ${$padding};`}
403
+
404
+ &:disabled {
405
+ opacity: 0.45;
406
+ cursor: not-allowed;
407
+ }
408
+
409
+ &:focus-visible {
410
+ outline: 2px solid ${t.primary};
411
+ outline-offset: 2px;
412
+ }
413
+ `;
414
+ var Input = React3.forwardRef(
415
+ ({
416
+ size = "md",
417
+ error,
418
+ hint,
419
+ prefix,
420
+ suffix,
421
+ clearable = false,
422
+ onClear,
423
+ fullWidth = true,
424
+ width,
425
+ label,
426
+ required,
427
+ disabled,
428
+ value,
429
+ onChange,
430
+ id: externalId,
431
+ borderRadius,
432
+ borderColor,
433
+ textColor,
434
+ backgroundColor,
435
+ padding,
436
+ ...rest
437
+ }, ref) => {
438
+ const autoId = useId();
439
+ const id = externalId ?? autoId;
440
+ const [internalValue, setInternalValue] = useState("");
441
+ const isControlled = value !== void 0;
442
+ const currentValue = isControlled ? value : internalValue;
443
+ const showClear = clearable && !!currentValue && !disabled;
444
+ const handleChange = (e) => {
445
+ if (!isControlled) setInternalValue(e.target.value);
446
+ onChange?.(e);
447
+ };
448
+ const handleClear = () => {
449
+ if (!isControlled) setInternalValue("");
450
+ onClear?.();
451
+ };
452
+ return /* @__PURE__ */ jsxs(Wrapper, { $fullWidth: fullWidth, $width: width, children: [
453
+ label && /* @__PURE__ */ jsx(InputLabel, { htmlFor: id, $required: !!required, children: label }),
454
+ /* @__PURE__ */ jsxs(
455
+ InputWrapper,
456
+ {
457
+ $size: size,
458
+ $hasError: !!error,
459
+ $disabled: !!disabled,
460
+ $borderRadius: borderRadius,
461
+ $borderColor: borderColor,
462
+ $backgroundColor: backgroundColor,
463
+ children: [
464
+ prefix && /* @__PURE__ */ jsx(Adornment, { position: "left", children: prefix }),
465
+ /* @__PURE__ */ jsx(
466
+ StyledInput,
467
+ {
468
+ ref,
469
+ id,
470
+ $size: size,
471
+ $hasPrefix: !!prefix,
472
+ $hasSuffix: !!suffix || showClear,
473
+ $textColor: textColor,
474
+ $padding: padding,
475
+ disabled,
476
+ value: currentValue,
477
+ onChange: handleChange,
478
+ "aria-invalid": !!error,
479
+ "aria-describedby": error ? `${id}-error` : hint ? `${id}-hint` : void 0,
480
+ ...rest
481
+ }
482
+ ),
483
+ showClear && /* @__PURE__ */ jsx(ClearButton, { type: "button", onClick: handleClear, "aria-label": "\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30", children: /* @__PURE__ */ jsx(ClearIcon, {}) }),
484
+ suffix && /* @__PURE__ */ jsx(Adornment, { position: "right", children: suffix })
485
+ ]
486
+ }
487
+ ),
488
+ error && /* @__PURE__ */ jsx(HelperText, { id: `${id}-error`, role: "alert", $isError: true, children: error }),
489
+ !error && hint && /* @__PURE__ */ jsx(HelperText, { id: `${id}-hint`, children: hint })
490
+ ] });
491
+ }
492
+ );
493
+ Input.displayName = "Input";
494
+ var ClearIcon = () => /* @__PURE__ */ jsx(
495
+ "svg",
496
+ {
497
+ width: "14",
498
+ height: "14",
499
+ viewBox: "0 0 14 14",
500
+ fill: "none",
501
+ xmlns: "http://www.w3.org/2000/svg",
502
+ "aria-hidden": "true",
503
+ children: /* @__PURE__ */ jsx(
504
+ "path",
505
+ {
506
+ d: "M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",
507
+ stroke: "currentColor",
508
+ strokeWidth: "1.5",
509
+ strokeLinecap: "round"
510
+ }
511
+ )
512
+ }
513
+ );
514
+ var heightMap = { sm: "30px", md: "36px", lg: "44px" };
515
+ var fontSizeMap = { sm: t.fontSm, md: t.fontMd, lg: t.fontLg };
516
+ var paddingMap = { sm: "0 8px", md: "0 12px", lg: "0 16px" };
517
+ var Wrapper = styled2.div`
518
+ display: inline-flex;
519
+ flex-direction: column;
520
+ gap: 4px;
521
+ ${({ $fullWidth, $width }) => {
522
+ if ($width !== void 0)
523
+ return `width: ${typeof $width === "number" ? `${$width}px` : $width};`;
524
+ return $fullWidth ? "width: 100%;" : "";
525
+ }}
526
+ `;
527
+ var InputLabel = styled2.label`
528
+ font-size: ${t.fontSm};
529
+ font-weight: ${t.weightMedium};
530
+ color: ${t.textPrimary};
531
+ font-family: ${t.fontFamily};
532
+
533
+ ${({ $required }) => $required && css`
534
+ &::after {
535
+ content: ' *';
536
+ color: ${t.danger};
537
+ }
538
+ `}
539
+ `;
540
+ var InputWrapper = styled2.div`
541
+ display: flex;
542
+ align-items: center;
543
+ height: ${({ $size }) => heightMap[$size]};
544
+ border: 1px solid
545
+ ${({ $hasError, $borderColor }) => $hasError ? t.borderError() : $borderColor ?? t.borderDefault()};
546
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusMd()};
547
+ background: ${({ $disabled, $backgroundColor }) => $disabled ? t.bgDisabled() : $backgroundColor ?? t.bgDefault()};
548
+ transition: border-color ${t.transitionFast};
549
+ overflow: hidden;
550
+
551
+ &:focus-within {
552
+ border-color: ${({ $hasError }) => $hasError ? t.borderError() : t.borderFocus()};
553
+ outline: 2px solid
554
+ ${({ $hasError }) => $hasError ? t.dangerAlpha20() : t.primaryAlpha20()};
555
+ outline-offset: 0;
556
+ }
557
+ `;
558
+ var StyledInput = styled2.input`
559
+ flex: 1;
560
+ min-width: 0;
561
+ height: 100%;
562
+ border: none;
563
+ outline: none;
564
+ background: transparent;
565
+ font-family: ${t.fontFamily};
566
+ font-size: ${({ $size }) => fontSizeMap[$size]()};
567
+ color: ${({ $textColor }) => $textColor ?? t.textPrimary()};
568
+ padding: ${({ $size, $padding }) => $padding ?? paddingMap[$size]};
569
+ ${({ $hasPrefix }) => $hasPrefix && "padding-left: 4px;"}
570
+ ${({ $hasSuffix }) => $hasSuffix && "padding-right: 4px;"}
571
+
572
+ &::placeholder {
573
+ color: ${t.textPlaceholder};
574
+ }
575
+
576
+ &:disabled {
577
+ color: ${t.textDisabled};
578
+ cursor: not-allowed;
579
+ }
580
+ `;
581
+ var Adornment = styled2.span`
582
+ display: inline-flex;
583
+ align-items: center;
584
+ flex-shrink: 0;
585
+ color: ${t.textSecondary};
586
+ ${({ position }) => position === "left" ? "padding-left: 10px;" : "padding-right: 10px;"}
587
+
588
+ svg {
589
+ width: 16px;
590
+ height: 16px;
591
+ }
592
+ `;
593
+ var ClearButton = styled2.button`
594
+ display: inline-flex;
595
+ align-items: center;
596
+ justify-content: center;
597
+ flex-shrink: 0;
598
+ width: 28px;
599
+ height: 100%;
600
+ border: none;
601
+ background: transparent;
602
+ color: ${t.textSecondary};
603
+ cursor: pointer;
604
+ padding: 0;
605
+ transition: color ${t.transitionFast};
606
+
607
+ &:hover {
608
+ color: ${t.textPrimary};
609
+ }
610
+ `;
611
+ var HelperText = styled2.span`
612
+ font-size: ${t.fontXs};
613
+ font-family: ${t.fontFamily};
614
+ color: ${({ $isError }) => $isError ? t.textError() : t.textHint()};
615
+ `;
616
+ var Checkbox = React3.forwardRef(
617
+ ({
618
+ label,
619
+ size = "md",
620
+ indeterminate = false,
621
+ error = false,
622
+ disabled,
623
+ id: externalId,
624
+ checkColor,
625
+ borderColor,
626
+ borderRadius,
627
+ ...rest
628
+ }, ref) => {
629
+ const autoId = useId();
630
+ const id = externalId ?? autoId;
631
+ const internalRef = React3.useCallback(
632
+ (node) => {
633
+ if (node) node.indeterminate = indeterminate;
634
+ if (typeof ref === "function") ref(node);
635
+ else if (ref) ref.current = node;
636
+ },
637
+ [indeterminate, ref]
638
+ );
639
+ return /* @__PURE__ */ jsxs(Wrapper2, { disabled: !!disabled, children: [
640
+ /* @__PURE__ */ jsx(
641
+ HiddenInput,
642
+ {
643
+ ref: internalRef,
644
+ type: "checkbox",
645
+ id,
646
+ disabled,
647
+ "aria-invalid": error,
648
+ ...rest
649
+ }
650
+ ),
651
+ /* @__PURE__ */ jsx(
652
+ CheckMark,
653
+ {
654
+ size,
655
+ $hasError: error,
656
+ $checkColor: checkColor,
657
+ $borderColor: borderColor,
658
+ $borderRadius: borderRadius,
659
+ "aria-hidden": "true",
660
+ children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateLine, {}) : /* @__PURE__ */ jsx(CheckIcon, {})
661
+ }
662
+ ),
663
+ label && /* @__PURE__ */ jsx(CheckLabel, { size, children: label })
664
+ ] });
665
+ }
666
+ );
667
+ Checkbox.displayName = "Checkbox";
668
+ var CheckIcon = () => /* @__PURE__ */ jsx("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
669
+ "path",
670
+ {
671
+ d: "M1 4L3.5 6.5L9 1",
672
+ stroke: "currentColor",
673
+ strokeWidth: "1.8",
674
+ strokeLinecap: "round",
675
+ strokeLinejoin: "round"
676
+ }
677
+ ) });
678
+ var IndeterminateLine = () => /* @__PURE__ */ jsx("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M1 1H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) });
679
+ var boxSize = { sm: "14px", md: "16px", lg: "20px" };
680
+ var fontSizeMap2 = { sm: t.fontSm, md: t.fontMd, lg: t.fontLg };
681
+ var Wrapper2 = styled2.label`
682
+ display: inline-flex;
683
+ align-items: center;
684
+ gap: ${t.spacingSm};
685
+ cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
686
+ user-select: none;
687
+ opacity: ${({ disabled }) => disabled ? 0.45 : 1};
688
+ `;
689
+ var HiddenInput = styled2.input`
690
+ position: absolute;
691
+ width: 1px;
692
+ height: 1px;
693
+ margin: -1px;
694
+ padding: 0;
695
+ overflow: hidden;
696
+ clip: rect(0, 0, 0, 0);
697
+ white-space: nowrap;
698
+ border: 0;
699
+ `;
700
+ var CheckMark = styled2.span`
701
+ display: inline-flex;
702
+ align-items: center;
703
+ justify-content: center;
704
+ flex-shrink: 0;
705
+ width: ${({ size }) => boxSize[size]};
706
+ height: ${({ size }) => boxSize[size]};
707
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusSm()};
708
+ border: 1.5px solid
709
+ ${({ $hasError, $borderColor }) => $hasError ? t.borderError() : $borderColor ?? t.borderDefault()};
710
+ background: ${t.bgDefault};
711
+ color: transparent;
712
+ transition: all ${t.transitionFast};
713
+
714
+ ${HiddenInput}:checked + &,
715
+ ${HiddenInput}:indeterminate + & {
716
+ background: ${({ $checkColor }) => $checkColor ?? t.primary()};
717
+ border-color: ${({ $checkColor }) => $checkColor ?? t.primary()};
718
+ color: ${t.textInverse};
719
+ }
720
+
721
+ ${HiddenInput}:focus-visible + & {
722
+ outline: 2px solid ${({ $checkColor }) => $checkColor ?? t.primary()};
723
+ outline-offset: 2px;
724
+ }
725
+ `;
726
+ var CheckLabel = styled2.span`
727
+ font-family: ${t.fontFamily};
728
+ font-size: ${({ size }) => fontSizeMap2[size]()};
729
+ color: ${t.textPrimary};
730
+ line-height: 1.4;
731
+ `;
732
+ var Radio = React3.forwardRef(
733
+ ({ label, size = "md", error = false, disabled, id: externalId, checkColor, borderColor, ...rest }, ref) => {
734
+ const autoId = useId();
735
+ const id = externalId ?? autoId;
736
+ return /* @__PURE__ */ jsxs(Wrapper3, { disabled: !!disabled, children: [
737
+ /* @__PURE__ */ jsx(
738
+ HiddenInput2,
739
+ {
740
+ ref,
741
+ type: "radio",
742
+ id,
743
+ disabled,
744
+ "aria-invalid": error,
745
+ ...rest
746
+ }
747
+ ),
748
+ /* @__PURE__ */ jsx(
749
+ RadioMark,
750
+ {
751
+ size,
752
+ $hasError: error,
753
+ $checkColor: checkColor,
754
+ $borderColor: borderColor,
755
+ "aria-hidden": "true"
756
+ }
757
+ ),
758
+ label && /* @__PURE__ */ jsx(RadioLabel, { size, children: label })
759
+ ] });
760
+ }
761
+ );
762
+ Radio.displayName = "Radio";
763
+ var RadioGroup = ({
764
+ options,
765
+ value,
766
+ onChange,
767
+ name,
768
+ size = "md",
769
+ direction = "row",
770
+ gridColumns = 3,
771
+ gap,
772
+ disabled = false,
773
+ error = false,
774
+ errorMessage,
775
+ checkColor,
776
+ borderColor
777
+ }) => {
778
+ return /* @__PURE__ */ jsxs(GroupWrapper, { direction, $gridColumns: gridColumns, $gap: gap, role: "radiogroup", children: [
779
+ options.map((option) => /* @__PURE__ */ jsx(
780
+ Radio,
781
+ {
782
+ name,
783
+ value: option.value,
784
+ label: option.label,
785
+ size,
786
+ checked: value === option.value,
787
+ disabled: disabled || option.disabled,
788
+ error,
789
+ checkColor,
790
+ borderColor,
791
+ onChange: () => onChange?.(option.value)
792
+ },
793
+ option.value
794
+ )),
795
+ error && errorMessage && /* @__PURE__ */ jsx(ErrorText, { role: "alert", children: errorMessage })
796
+ ] });
797
+ };
798
+ RadioGroup.displayName = "RadioGroup";
799
+ var dotSize = { sm: "14px", md: "16px", lg: "20px" };
800
+ var fontSizeMap3 = { sm: t.fontSm, md: t.fontMd, lg: t.fontLg };
801
+ var Wrapper3 = styled2.label`
802
+ display: inline-flex;
803
+ align-items: center;
804
+ gap: ${t.spacingSm};
805
+ cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
806
+ user-select: none;
807
+ opacity: ${({ disabled }) => disabled ? 0.45 : 1};
808
+ `;
809
+ var HiddenInput2 = styled2.input`
810
+ position: absolute;
811
+ width: 1px;
812
+ height: 1px;
813
+ margin: -1px;
814
+ padding: 0;
815
+ overflow: hidden;
816
+ clip: rect(0, 0, 0, 0);
817
+ white-space: nowrap;
818
+ border: 0;
819
+ `;
820
+ var RadioMark = styled2.span`
821
+ display: inline-flex;
822
+ align-items: center;
823
+ justify-content: center;
824
+ flex-shrink: 0;
825
+ width: ${({ size }) => dotSize[size]};
826
+ height: ${({ size }) => dotSize[size]};
827
+ border-radius: 50%;
828
+ border: 1.5px solid
829
+ ${({ $hasError, $borderColor }) => $hasError ? t.borderError() : $borderColor ?? t.borderDefault()};
830
+ background: ${t.bgDefault};
831
+ transition: all ${t.transitionFast};
832
+
833
+ &::after {
834
+ content: '';
835
+ display: block;
836
+ width: 50%;
837
+ height: 50%;
838
+ border-radius: 50%;
839
+ background: transparent;
840
+ transition: background ${t.transitionFast};
841
+ }
842
+
843
+ ${HiddenInput2}:checked + & {
844
+ border-color: ${({ $checkColor }) => $checkColor ?? t.primary()};
845
+ &::after {
846
+ background: ${({ $checkColor }) => $checkColor ?? t.primary()};
847
+ }
848
+ }
849
+
850
+ ${HiddenInput2}:focus-visible + & {
851
+ outline: 2px solid ${({ $checkColor }) => $checkColor ?? t.primary()};
852
+ outline-offset: 2px;
853
+ }
854
+ `;
855
+ var RadioLabel = styled2.span`
856
+ font-family: ${t.fontFamily};
857
+ font-size: ${({ size }) => fontSizeMap3[size]()};
858
+ color: ${t.textPrimary};
859
+ line-height: 1.4;
860
+ `;
861
+ var GroupWrapper = styled2.div`
862
+ display: ${({ direction }) => direction === "grid" ? "grid" : "flex"};
863
+
864
+ ${({ direction, $gridColumns }) => direction === "grid" && `grid-template-columns: repeat(${$gridColumns}, auto); justify-content: start;`}
865
+
866
+ ${({ direction }) => direction !== "grid" && `flex-direction: ${direction === "column" ? "column" : "row"};`}
867
+
868
+ gap: ${({ direction, $gap }) => $gap ?? (direction === "row" ? t.spacingLg() : direction === "grid" ? "12px 20px" : t.spacingSm())};
869
+
870
+ flex-wrap: wrap;
871
+ `;
872
+ var ErrorText = styled2.span`
873
+ width: 100%;
874
+ font-family: ${t.fontFamily};
875
+ font-size: ${t.fontXs};
876
+ color: ${t.textError};
877
+ `;
878
+ var Select = React3.forwardRef(
879
+ ({
880
+ options,
881
+ placeholder,
882
+ size = "md",
883
+ variant = "default",
884
+ error,
885
+ hint,
886
+ label,
887
+ required,
888
+ fullWidth = true,
889
+ width,
890
+ disabled,
891
+ id: externalId,
892
+ borderRadius,
893
+ borderColor,
894
+ textColor,
895
+ backgroundColor,
896
+ padding,
897
+ ...rest
898
+ }, ref) => {
899
+ const autoId = useId();
900
+ const id = externalId ?? autoId;
901
+ return /* @__PURE__ */ jsxs(Wrapper4, { $fullWidth: fullWidth, $width: width, children: [
902
+ label && /* @__PURE__ */ jsx(SelectLabel, { htmlFor: id, $required: !!required, children: label }),
903
+ /* @__PURE__ */ jsxs(
904
+ SelectWrapper,
905
+ {
906
+ $size: size,
907
+ $hasError: !!error,
908
+ $disabled: !!disabled,
909
+ $variant: variant,
910
+ $borderRadius: borderRadius,
911
+ $borderColor: borderColor,
912
+ $backgroundColor: backgroundColor,
913
+ children: [
914
+ /* @__PURE__ */ jsxs(
915
+ StyledSelect,
916
+ {
917
+ ref,
918
+ id,
919
+ $size: size,
920
+ $textColor: textColor,
921
+ $padding: padding,
922
+ disabled,
923
+ "aria-invalid": !!error,
924
+ "aria-describedby": error ? `${id}-error` : hint ? `${id}-hint` : void 0,
925
+ defaultValue: placeholder ? "" : void 0,
926
+ ...rest,
927
+ children: [
928
+ placeholder && /* @__PURE__ */ jsx("option", { value: "", disabled: true, hidden: true, children: placeholder }),
929
+ options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
930
+ ]
931
+ }
932
+ ),
933
+ /* @__PURE__ */ jsx(ChevronIcon, { "aria-hidden": "true" })
934
+ ]
935
+ }
936
+ ),
937
+ error && /* @__PURE__ */ jsx(HelperText2, { id: `${id}-error`, role: "alert", $isError: true, children: error }),
938
+ !error && hint && /* @__PURE__ */ jsx(HelperText2, { id: `${id}-hint`, children: hint })
939
+ ] });
940
+ }
941
+ );
942
+ Select.displayName = "Select";
943
+ var ChevronIcon = () => /* @__PURE__ */ jsx(
944
+ "svg",
945
+ {
946
+ width: "14",
947
+ height: "14",
948
+ viewBox: "0 0 14 14",
949
+ fill: "none",
950
+ xmlns: "http://www.w3.org/2000/svg",
951
+ "aria-hidden": "true",
952
+ children: /* @__PURE__ */ jsx(
953
+ "path",
954
+ {
955
+ d: "M3 5L7 9L11 5",
956
+ stroke: "currentColor",
957
+ strokeWidth: "1.5",
958
+ strokeLinecap: "round",
959
+ strokeLinejoin: "round"
960
+ }
961
+ )
962
+ }
963
+ );
964
+ var heightMap2 = { sm: "30px", md: "36px", lg: "44px" };
965
+ var fontSizeMap4 = { sm: t.fontSm, md: t.fontMd, lg: t.fontLg };
966
+ var paddingMap2 = { sm: "0 8px", md: "0 12px", lg: "0 16px" };
967
+ var getVariantBg = (variant) => ({ default: t.bgDefault(), outlined: t.bgDefault(), filled: "#F9FAFB" })[variant];
968
+ var Wrapper4 = styled2.div`
969
+ display: inline-flex;
970
+ flex-direction: column;
971
+ gap: 4px;
972
+ ${({ $fullWidth, $width }) => {
973
+ if ($width !== void 0)
974
+ return `width: ${typeof $width === "number" ? `${$width}px` : $width};`;
975
+ return $fullWidth ? "width: 100%;" : "";
976
+ }}
977
+ `;
978
+ var SelectLabel = styled2.label`
979
+ font-family: ${t.fontFamily};
980
+ font-size: ${t.fontSm};
981
+ font-weight: ${t.weightMedium};
982
+ color: ${t.textPrimary};
983
+
984
+ ${({ $required }) => $required && `&::after {
985
+ content: ' *';
986
+ color: ${t.danger()};
987
+ }`}
988
+ `;
989
+ var SelectWrapper = styled2.div`
990
+ position: relative;
991
+ display: flex;
992
+ align-items: center;
993
+ height: ${({ $size }) => heightMap2[$size]};
994
+ border: 1px solid
995
+ ${({ $hasError, $borderColor }) => $hasError ? t.borderError() : $borderColor ?? t.borderDefault()};
996
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusMd()};
997
+ background: ${({ $disabled, $variant, $backgroundColor }) => $disabled ? t.bgDisabled() : $backgroundColor ?? getVariantBg($variant)};
998
+ transition: border-color ${t.transitionFast};
999
+
1000
+ &:focus-within {
1001
+ border-color: ${({ $hasError }) => $hasError ? t.borderError() : t.borderFocus()};
1002
+ outline: 2px solid
1003
+ ${({ $hasError }) => $hasError ? t.dangerAlpha20() : t.primaryAlpha20()};
1004
+ }
1005
+
1006
+ svg {
1007
+ position: absolute;
1008
+ right: 10px;
1009
+ pointer-events: none;
1010
+ color: ${t.textSecondary};
1011
+ flex-shrink: 0;
1012
+ }
1013
+ `;
1014
+ var StyledSelect = styled2.select`
1015
+ flex: 1;
1016
+ width: 100%;
1017
+ height: 100%;
1018
+ border: none;
1019
+ outline: none;
1020
+ background: transparent;
1021
+ appearance: none;
1022
+ font-family: ${t.fontFamily};
1023
+ font-size: ${({ $size }) => fontSizeMap4[$size]()};
1024
+ color: ${({ $textColor }) => $textColor ?? t.textPrimary()};
1025
+ padding: ${({ $size, $padding }) => $padding ?? paddingMap2[$size]};
1026
+ padding-right: 32px;
1027
+ cursor: pointer;
1028
+
1029
+ &:disabled {
1030
+ color: ${t.textDisabled};
1031
+ cursor: not-allowed;
1032
+ }
1033
+ `;
1034
+ var HelperText2 = styled2.span`
1035
+ font-family: ${t.fontFamily};
1036
+ font-size: ${t.fontXs};
1037
+ color: ${({ $isError }) => $isError ? t.textError() : t.textHint()};
1038
+ `;
1039
+ var TextArea = React3.forwardRef(
1040
+ ({
1041
+ size = "md",
1042
+ error,
1043
+ hint,
1044
+ label,
1045
+ required,
1046
+ fullWidth = true,
1047
+ width,
1048
+ maxLength,
1049
+ resize = "vertical",
1050
+ disabled,
1051
+ value,
1052
+ onChange,
1053
+ rows = 4,
1054
+ id: externalId,
1055
+ borderRadius,
1056
+ borderColor,
1057
+ textColor,
1058
+ backgroundColor,
1059
+ padding,
1060
+ ...rest
1061
+ }, ref) => {
1062
+ const autoId = useId();
1063
+ const id = externalId ?? autoId;
1064
+ const [internalValue, setInternalValue] = useState("");
1065
+ const isControlled = value !== void 0;
1066
+ const currentValue = isControlled ? value : internalValue;
1067
+ const handleChange = (e) => {
1068
+ if (!isControlled) setInternalValue(e.target.value);
1069
+ onChange?.(e);
1070
+ };
1071
+ return /* @__PURE__ */ jsxs(Wrapper5, { $fullWidth: fullWidth, $width: width, children: [
1072
+ label && /* @__PURE__ */ jsx(TextAreaLabel, { htmlFor: id, $required: !!required, children: label }),
1073
+ /* @__PURE__ */ jsx(
1074
+ StyledTextArea,
1075
+ {
1076
+ ref,
1077
+ id,
1078
+ $size: size,
1079
+ rows,
1080
+ $resize: resize,
1081
+ disabled,
1082
+ $hasError: !!error,
1083
+ maxLength,
1084
+ value: currentValue,
1085
+ onChange: handleChange,
1086
+ $borderRadius: borderRadius,
1087
+ $borderColor: borderColor,
1088
+ $textColor: textColor,
1089
+ $backgroundColor: backgroundColor,
1090
+ $padding: padding,
1091
+ "aria-invalid": !!error,
1092
+ "aria-describedby": error ? `${id}-error` : hint ? `${id}-hint` : void 0,
1093
+ ...rest
1094
+ }
1095
+ ),
1096
+ /* @__PURE__ */ jsxs(Footer, { children: [
1097
+ /* @__PURE__ */ jsxs("div", { children: [
1098
+ error && /* @__PURE__ */ jsx(HelperText3, { id: `${id}-error`, role: "alert", $isError: true, children: error }),
1099
+ !error && hint && /* @__PURE__ */ jsx(HelperText3, { id: `${id}-hint`, children: hint })
1100
+ ] }),
1101
+ maxLength !== void 0 && /* @__PURE__ */ jsxs(Counter, { $isOver: currentValue.length > maxLength, children: [
1102
+ currentValue.length,
1103
+ " / ",
1104
+ maxLength
1105
+ ] })
1106
+ ] })
1107
+ ] });
1108
+ }
1109
+ );
1110
+ TextArea.displayName = "TextArea";
1111
+ var fontSizeMap5 = { sm: t.fontSm, md: t.fontMd, lg: t.fontLg };
1112
+ var paddingMap3 = { sm: "6px 8px", md: "8px 12px", lg: "10px 16px" };
1113
+ var Wrapper5 = styled2.div`
1114
+ display: inline-flex;
1115
+ flex-direction: column;
1116
+ gap: 4px;
1117
+ ${({ $fullWidth, $width }) => {
1118
+ if ($width !== void 0)
1119
+ return `width: ${typeof $width === "number" ? `${$width}px` : $width};`;
1120
+ return $fullWidth ? "width: 100%;" : "";
1121
+ }}
1122
+ `;
1123
+ var TextAreaLabel = styled2.label`
1124
+ font-family: ${t.fontFamily};
1125
+ font-size: ${t.fontSm};
1126
+ font-weight: ${t.weightMedium};
1127
+ color: ${t.textPrimary};
1128
+
1129
+ ${({ $required }) => $required && `&::after {
1130
+ content: ' *';
1131
+ color: ${t.danger()};
1132
+ }`}
1133
+ `;
1134
+ var StyledTextArea = styled2.textarea`
1135
+ width: 100%;
1136
+ box-sizing: border-box;
1137
+ border: 1px solid
1138
+ ${({ $hasError, $borderColor }) => $hasError ? t.borderError() : $borderColor ?? t.borderDefault()};
1139
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusMd()};
1140
+ background: ${({ $backgroundColor }) => $backgroundColor ?? t.bgDefault()};
1141
+ font-family: ${t.fontFamily};
1142
+ font-size: ${({ $size }) => fontSizeMap5[$size]()};
1143
+ color: ${({ $textColor }) => $textColor ?? t.textPrimary()};
1144
+ padding: ${({ $size, $padding }) => $padding ?? paddingMap3[$size]};
1145
+ resize: ${({ $resize }) => $resize};
1146
+ outline: none;
1147
+ transition: border-color ${t.transitionFast};
1148
+ line-height: 1.6;
1149
+
1150
+ &::placeholder {
1151
+ color: ${t.textPlaceholder};
1152
+ }
1153
+
1154
+ &:focus {
1155
+ border-color: ${({ $hasError }) => $hasError ? t.borderError() : t.borderFocus()};
1156
+ outline: 2px solid
1157
+ ${({ $hasError }) => $hasError ? t.dangerAlpha20() : t.primaryAlpha20()};
1158
+ outline-offset: 0;
1159
+ }
1160
+
1161
+ &:disabled {
1162
+ background: ${t.bgDisabled};
1163
+ color: ${t.textDisabled};
1164
+ cursor: not-allowed;
1165
+ resize: none;
1166
+ }
1167
+ `;
1168
+ var Footer = styled2.div`
1169
+ display: flex;
1170
+ justify-content: space-between;
1171
+ align-items: flex-start;
1172
+ `;
1173
+ var HelperText3 = styled2.span`
1174
+ font-family: ${t.fontFamily};
1175
+ font-size: ${t.fontXs};
1176
+ color: ${({ $isError }) => $isError ? t.textError() : t.textHint()};
1177
+ `;
1178
+ var Counter = styled2.span`
1179
+ font-family: ${t.fontFamily};
1180
+ font-size: ${t.fontXs};
1181
+ color: ${({ $isOver }) => $isOver ? t.textError() : t.textSecondary()};
1182
+ white-space: nowrap;
1183
+ margin-left: auto;
1184
+ `;
1185
+ var Label = React3.forwardRef(
1186
+ ({ required, optional, size = "md", disabled, children, ...rest }, ref) => {
1187
+ return /* @__PURE__ */ jsxs(StyledLabel, { ref, size, disabled: !!disabled, ...rest, children: [
1188
+ children,
1189
+ required && /* @__PURE__ */ jsx(RequiredMark, { "aria-label": "\uD544\uC218", children: "*" }),
1190
+ !required && optional && /* @__PURE__ */ jsx(OptionalMark, { children: "(\uC120\uD0DD)" })
1191
+ ] });
1192
+ }
1193
+ );
1194
+ Label.displayName = "Label";
1195
+ var fontSizeMap6 = { sm: t.fontXs, md: t.fontSm, lg: t.fontMd };
1196
+ var StyledLabel = styled2.label`
1197
+ display: inline-flex;
1198
+ align-items: center;
1199
+ gap: 2px;
1200
+ font-family: ${t.fontFamily};
1201
+ font-size: ${({ size }) => fontSizeMap6[size]()};
1202
+ font-weight: ${t.weightMedium};
1203
+ color: ${({ disabled }) => disabled ? t.textDisabled() : t.textPrimary()};
1204
+ cursor: ${({ disabled, htmlFor }) => disabled ? "not-allowed" : htmlFor ? "pointer" : "default"};
1205
+ user-select: none;
1206
+ `;
1207
+ var RequiredMark = styled2.span`
1208
+ color: ${t.danger};
1209
+ font-size: inherit;
1210
+ line-height: 1;
1211
+ `;
1212
+ var OptionalMark = styled2.span`
1213
+ font-size: ${t.fontXs};
1214
+ font-weight: ${t.weightRegular};
1215
+ color: ${t.textSecondary};
1216
+ `;
1217
+ var Badge = React3.forwardRef(
1218
+ ({
1219
+ variant = "primary",
1220
+ size = "md",
1221
+ outline = false,
1222
+ icon,
1223
+ dot = false,
1224
+ children,
1225
+ borderRadius,
1226
+ textColor,
1227
+ backgroundColor,
1228
+ borderColor,
1229
+ ...rest
1230
+ }, ref) => {
1231
+ if (dot) {
1232
+ return /* @__PURE__ */ jsx(
1233
+ DotBadge,
1234
+ {
1235
+ ref,
1236
+ variant,
1237
+ $backgroundColor: backgroundColor,
1238
+ ...rest
1239
+ }
1240
+ );
1241
+ }
1242
+ return /* @__PURE__ */ jsxs(
1243
+ StyledBadge,
1244
+ {
1245
+ ref,
1246
+ variant,
1247
+ size,
1248
+ $outline: outline,
1249
+ $borderRadius: borderRadius,
1250
+ $textColor: textColor,
1251
+ $backgroundColor: backgroundColor,
1252
+ $borderColor: borderColor,
1253
+ ...rest,
1254
+ children: [
1255
+ icon && /* @__PURE__ */ jsx(IconWrapper2, { children: icon }),
1256
+ children
1257
+ ]
1258
+ }
1259
+ );
1260
+ }
1261
+ );
1262
+ Badge.displayName = "Badge";
1263
+ var getVariantColor = () => ({
1264
+ primary: { bg: "#EFF6FF", text: "#1D4ED8", border: "#BFDBFE" },
1265
+ secondary: { bg: "#F3F4F6", text: "#374151", border: "#D1D5DB" },
1266
+ success: { bg: "#ECFDF5", text: "#065F46", border: "#A7F3D0" },
1267
+ warning: { bg: "#FFFBEB", text: "#92400E", border: "#FDE68A" },
1268
+ danger: { bg: "#FEF2F2", text: "#991B1B", border: "#FECACA" },
1269
+ ghost: { bg: "transparent", text: t.textSecondary(), border: t.borderDefault() }
1270
+ });
1271
+ var sizeStyles2 = {
1272
+ sm: css`
1273
+ padding: 1px 6px;
1274
+ font-size: ${t.fontXs};
1275
+ border-radius: ${t.radiusSm};
1276
+ `,
1277
+ md: css`
1278
+ padding: 2px 8px;
1279
+ font-size: ${t.fontSm};
1280
+ border-radius: ${t.radiusMd};
1281
+ `,
1282
+ lg: css`
1283
+ padding: 3px 10px;
1284
+ font-size: ${t.fontMd};
1285
+ border-radius: ${t.radiusMd};
1286
+ `
1287
+ };
1288
+ var StyledBadge = styled2.span`
1289
+ display: inline-flex;
1290
+ align-items: center;
1291
+ gap: 4px;
1292
+ font-family: ${t.fontFamily};
1293
+ font-weight: ${t.weightMedium};
1294
+ line-height: 1.4;
1295
+ white-space: nowrap;
1296
+ flex-shrink: 0;
1297
+
1298
+ ${({ size }) => sizeStyles2[size]}
1299
+
1300
+ background: ${({ variant, $outline, $backgroundColor }) => $backgroundColor ?? ($outline ? "transparent" : getVariantColor()[variant].bg)};
1301
+ color: ${({ variant, $textColor }) => $textColor ?? getVariantColor()[variant].text};
1302
+ border: 1px solid
1303
+ ${({ variant, $outline, $borderColor }) => $borderColor ?? ($outline ? getVariantColor()[variant].border : "transparent")};
1304
+
1305
+ ${({ $borderRadius }) => $borderRadius && `border-radius: ${$borderRadius};`}
1306
+ `;
1307
+ var DotBadge = styled2.span`
1308
+ display: inline-block;
1309
+ width: 8px;
1310
+ height: 8px;
1311
+ border-radius: 50%;
1312
+ flex-shrink: 0;
1313
+ background: ${({ variant, $backgroundColor }) => {
1314
+ if ($backgroundColor) return $backgroundColor;
1315
+ const map = {
1316
+ primary: t.primary(),
1317
+ secondary: t.secondary(),
1318
+ success: t.success(),
1319
+ warning: t.warning(),
1320
+ danger: t.danger(),
1321
+ ghost: t.borderDefault()
1322
+ };
1323
+ return map[variant];
1324
+ }};
1325
+ `;
1326
+ var IconWrapper2 = styled2.span`
1327
+ display: inline-flex;
1328
+ align-items: center;
1329
+ flex-shrink: 0;
1330
+
1331
+ svg {
1332
+ width: 1em;
1333
+ height: 1em;
1334
+ }
1335
+ `;
1336
+ var Chip = React3.forwardRef(
1337
+ ({
1338
+ label,
1339
+ active = false,
1340
+ count,
1341
+ activeColor,
1342
+ borderRadius,
1343
+ borderColor,
1344
+ textColor,
1345
+ backgroundColor,
1346
+ ...rest
1347
+ }, ref) => {
1348
+ return /* @__PURE__ */ jsxs(
1349
+ StyledChip,
1350
+ {
1351
+ ref,
1352
+ type: "button",
1353
+ $active: active,
1354
+ $activeColor: activeColor,
1355
+ $borderRadius: borderRadius,
1356
+ $borderColor: borderColor,
1357
+ $textColor: textColor,
1358
+ $backgroundColor: backgroundColor,
1359
+ "aria-pressed": active,
1360
+ ...rest,
1361
+ children: [
1362
+ label,
1363
+ count !== void 0 && /* @__PURE__ */ jsx(CountBadge, { children: count })
1364
+ ]
1365
+ }
1366
+ );
1367
+ }
1368
+ );
1369
+ Chip.displayName = "Chip";
1370
+ var StyledChip = styled2.button`
1371
+ display: inline-flex;
1372
+ align-items: center;
1373
+ justify-content: center;
1374
+ gap: 4px;
1375
+ padding: 5px 14px;
1376
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusFull()};
1377
+ border: 1px solid
1378
+ ${({ $active, $activeColor, $borderColor }) => $active ? $activeColor ?? t.primary() : $borderColor ?? t.borderDefault()};
1379
+ background: ${({ $backgroundColor }) => $backgroundColor ?? t.bgDefault()};
1380
+ color: ${({ $active, $activeColor, $textColor }) => $active ? $activeColor ?? t.primary() : $textColor ?? t.textSecondary()};
1381
+ font-family: ${t.fontFamily};
1382
+ font-size: ${t.fontMd};
1383
+ font-weight: ${t.weightMedium};
1384
+ cursor: pointer;
1385
+ transition: all ${t.transitionBase};
1386
+ white-space: nowrap;
1387
+ user-select: none;
1388
+
1389
+ &:hover:not(:disabled) {
1390
+ border-color: ${({ $activeColor }) => $activeColor ?? t.primary()};
1391
+ color: ${({ $activeColor }) => $activeColor ?? t.primary()};
1392
+ ${({ $active }) => !$active && "background: #f5f8ff;"}
1393
+ }
1394
+
1395
+ &:disabled {
1396
+ opacity: 0.45;
1397
+ cursor: not-allowed;
1398
+ }
1399
+
1400
+ &:focus-visible {
1401
+ outline: 2px solid ${({ $activeColor }) => $activeColor ?? t.primary()};
1402
+ outline-offset: 2px;
1403
+ }
1404
+ `;
1405
+ var CountBadge = styled2.span`
1406
+ display: inline-flex;
1407
+ align-items: center;
1408
+ justify-content: center;
1409
+ font-size: ${t.fontXs};
1410
+ font-weight: ${t.weightSemibold};
1411
+ `;
1412
+ var Loading = ({
1413
+ size = "md",
1414
+ text,
1415
+ fullscreen = false,
1416
+ color,
1417
+ overlayColor
1418
+ }) => {
1419
+ const content = /* @__PURE__ */ jsxs(Inner, { children: [
1420
+ /* @__PURE__ */ jsx(Spinner2, { $size: size, $color: color, "aria-hidden": true }),
1421
+ text && /* @__PURE__ */ jsx(LoadingText, { children: text })
1422
+ ] });
1423
+ if (fullscreen) {
1424
+ return /* @__PURE__ */ jsx(Overlay, { $overlayColor: overlayColor, role: "status", "aria-label": text ?? "\uB85C\uB529 \uC911", children: content });
1425
+ }
1426
+ return /* @__PURE__ */ jsx(Inline, { role: "status", "aria-label": text ?? "\uB85C\uB529 \uC911", children: content });
1427
+ };
1428
+ Loading.displayName = "Loading";
1429
+ var spin2 = keyframes`
1430
+ to { transform: rotate(360deg); }
1431
+ `;
1432
+ var spinnerSizeMap2 = {
1433
+ xs: "16px",
1434
+ sm: "20px",
1435
+ md: "32px",
1436
+ lg: "48px"
1437
+ };
1438
+ var borderSizeMap = {
1439
+ xs: "2px",
1440
+ sm: "2px",
1441
+ md: "3px",
1442
+ lg: "4px"
1443
+ };
1444
+ var Spinner2 = styled2.div`
1445
+ width: ${({ $size }) => spinnerSizeMap2[$size]};
1446
+ height: ${({ $size }) => spinnerSizeMap2[$size]};
1447
+ border: ${({ $size }) => borderSizeMap[$size]} solid #f0f0f0;
1448
+ border-top-color: ${({ $color }) => $color ?? t.primary()};
1449
+ border-radius: 50%;
1450
+ animation: ${spin2} 0.8s linear infinite;
1451
+ flex-shrink: 0;
1452
+ `;
1453
+ var Inner = styled2.div`
1454
+ display: flex;
1455
+ flex-direction: column;
1456
+ align-items: center;
1457
+ gap: ${t.spacingSm};
1458
+ `;
1459
+ var LoadingText = styled2.span`
1460
+ font-family: ${t.fontFamily};
1461
+ font-size: ${t.fontSm};
1462
+ color: ${t.textSecondary};
1463
+ `;
1464
+ var Overlay = styled2.div`
1465
+ position: fixed;
1466
+ inset: 0;
1467
+ display: flex;
1468
+ align-items: center;
1469
+ justify-content: center;
1470
+ background: ${({ $overlayColor }) => $overlayColor ?? "rgba(255,255,255,0.85)"};
1471
+ z-index: 9999;
1472
+ `;
1473
+ var Inline = styled2.div`
1474
+ display: inline-flex;
1475
+ align-items: center;
1476
+ justify-content: center;
1477
+ `;
1478
+ var Pagination = ({
1479
+ currentPage,
1480
+ totalPages,
1481
+ onPageChange,
1482
+ maxVisible = 5,
1483
+ activeColor,
1484
+ borderRadius
1485
+ }) => {
1486
+ const pages = generatePageNumbers(currentPage, totalPages, maxVisible);
1487
+ return /* @__PURE__ */ jsxs(Wrapper6, { children: [
1488
+ /* @__PURE__ */ jsx(
1489
+ NavButton,
1490
+ {
1491
+ onClick: () => onPageChange(currentPage - 1),
1492
+ disabled: currentPage <= 1,
1493
+ "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
1494
+ $borderRadius: borderRadius,
1495
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
1496
+ }
1497
+ ),
1498
+ /* @__PURE__ */ jsx(PageList, { children: pages.map(
1499
+ (page, i) => page === "ellipsis" ? /* @__PURE__ */ jsx(Ellipsis, { children: "\u2026" }, `e-${i}`) : /* @__PURE__ */ jsx(
1500
+ PageButton,
1501
+ {
1502
+ onClick: () => onPageChange(page),
1503
+ $active: page === currentPage,
1504
+ $activeColor: activeColor,
1505
+ $borderRadius: borderRadius,
1506
+ "aria-current": page === currentPage ? "page" : void 0,
1507
+ children: page
1508
+ },
1509
+ page
1510
+ )
1511
+ ) }),
1512
+ /* @__PURE__ */ jsx(
1513
+ NavButton,
1514
+ {
1515
+ onClick: () => onPageChange(currentPage + 1),
1516
+ disabled: currentPage >= totalPages,
1517
+ "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
1518
+ $borderRadius: borderRadius,
1519
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
1520
+ }
1521
+ )
1522
+ ] });
1523
+ };
1524
+ Pagination.displayName = "Pagination";
1525
+ function generatePageNumbers(current, total, maxVisible) {
1526
+ if (total <= maxVisible) {
1527
+ return Array.from({ length: total }, (_, i) => i + 1);
1528
+ }
1529
+ const half = Math.floor(maxVisible / 2);
1530
+ let start = Math.max(1, current - half);
1531
+ const end = Math.min(total, start + maxVisible - 1);
1532
+ if (end - start < maxVisible - 1) {
1533
+ start = Math.max(1, end - maxVisible + 1);
1534
+ }
1535
+ const pages = [];
1536
+ if (start > 1) {
1537
+ pages.push(1);
1538
+ if (start > 2) pages.push("ellipsis");
1539
+ }
1540
+ for (let i = start; i <= end; i++) {
1541
+ pages.push(i);
1542
+ }
1543
+ if (end < total) {
1544
+ if (end < total - 1) pages.push("ellipsis");
1545
+ pages.push(total);
1546
+ }
1547
+ return pages;
1548
+ }
1549
+ var ChevronLeftIcon = () => /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1550
+ var ChevronRightIcon = () => /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1551
+ var Wrapper6 = styled2.nav`
1552
+ display: flex;
1553
+ align-items: center;
1554
+ gap: ${t.spacingXs};
1555
+ `;
1556
+ var PageList = styled2.div`
1557
+ display: flex;
1558
+ align-items: center;
1559
+ gap: ${t.spacingXs};
1560
+ `;
1561
+ var baseButtonStyles = css`
1562
+ display: inline-flex;
1563
+ align-items: center;
1564
+ justify-content: center;
1565
+ min-width: 32px;
1566
+ height: 32px;
1567
+ padding: 0 4px;
1568
+ border: 1px solid ${t.borderDefault};
1569
+ background: ${t.bgDefault};
1570
+ font-family: ${t.fontFamily};
1571
+ font-size: ${t.fontSm};
1572
+ cursor: pointer;
1573
+ transition: all ${t.transitionFast};
1574
+ user-select: none;
1575
+
1576
+ &:disabled {
1577
+ opacity: 0.4;
1578
+ cursor: not-allowed;
1579
+ }
1580
+
1581
+ &:focus-visible {
1582
+ outline: 2px solid ${t.primary};
1583
+ outline-offset: 2px;
1584
+ }
1585
+ `;
1586
+ var NavButton = styled2.button`
1587
+ ${baseButtonStyles}
1588
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusMd()};
1589
+ color: ${t.textSecondary};
1590
+
1591
+ &:hover:not(:disabled) {
1592
+ background: ${t.bgHover};
1593
+ color: ${t.textPrimary};
1594
+ }
1595
+ `;
1596
+ var PageButton = styled2.button`
1597
+ ${baseButtonStyles}
1598
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusMd()};
1599
+ font-weight: ${({ $active }) => $active ? t.weightSemibold() : t.weightRegular()};
1600
+ background: ${({ $active, $activeColor }) => $active ? $activeColor ?? t.primary() : t.bgDefault()};
1601
+ color: ${({ $active }) => $active ? t.textInverse() : t.textPrimary()};
1602
+ border-color: ${({ $active, $activeColor }) => $active ? $activeColor ?? t.primary() : t.borderDefault()};
1603
+
1604
+ &:hover:not(:disabled) {
1605
+ background: ${({ $active, $activeColor }) => $active ? $activeColor ?? t.primaryHover() : t.bgHover()};
1606
+ }
1607
+ `;
1608
+ var Ellipsis = styled2.span`
1609
+ display: inline-flex;
1610
+ align-items: center;
1611
+ justify-content: center;
1612
+ min-width: 32px;
1613
+ height: 32px;
1614
+ font-family: ${t.fontFamily};
1615
+ font-size: ${t.fontSm};
1616
+ color: ${t.textSecondary};
1617
+ user-select: none;
1618
+ `;
1619
+ var Toast = ({
1620
+ message,
1621
+ type = "info",
1622
+ duration = 3e3,
1623
+ onClose,
1624
+ position = "bottom-center",
1625
+ backgroundColor,
1626
+ textColor,
1627
+ borderRadius
1628
+ }) => {
1629
+ const [isClosing, setIsClosing] = useState(false);
1630
+ useEffect(() => {
1631
+ if (duration <= 0) return;
1632
+ const timer = setTimeout(() => {
1633
+ setIsClosing(true);
1634
+ setTimeout(onClose, 300);
1635
+ }, duration);
1636
+ return () => clearTimeout(timer);
1637
+ }, [duration, onClose]);
1638
+ const handleClose = () => {
1639
+ setIsClosing(true);
1640
+ setTimeout(onClose, 300);
1641
+ };
1642
+ return /* @__PURE__ */ jsxs(
1643
+ ToastContainer,
1644
+ {
1645
+ $type: type,
1646
+ $position: position,
1647
+ $isClosing: isClosing,
1648
+ $backgroundColor: backgroundColor,
1649
+ $textColor: textColor,
1650
+ $borderRadius: borderRadius,
1651
+ role: "alert",
1652
+ "aria-live": "assertive",
1653
+ children: [
1654
+ /* @__PURE__ */ jsx(TypeIcon, { type }),
1655
+ /* @__PURE__ */ jsx(ToastMessage, { children: message }),
1656
+ /* @__PURE__ */ jsx(CloseButton, { onClick: handleClose, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
1657
+ ]
1658
+ }
1659
+ );
1660
+ };
1661
+ Toast.displayName = "Toast";
1662
+ var TypeIcon = ({ type }) => {
1663
+ const icons = {
1664
+ info: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
1665
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
1666
+ /* @__PURE__ */ jsx("path", { d: "M8 7v5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1667
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "4.5", r: "0.75", fill: "currentColor" })
1668
+ ] }),
1669
+ success: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
1670
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
1671
+ /* @__PURE__ */ jsx("path", { d: "M5 8l2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1672
+ ] }),
1673
+ error: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
1674
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
1675
+ /* @__PURE__ */ jsx("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1676
+ ] }),
1677
+ warning: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
1678
+ /* @__PURE__ */ jsx("path", { d: "M8 2L14.5 13H1.5L8 2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1679
+ /* @__PURE__ */ jsx("path", { d: "M8 6v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1680
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "11.5", r: "0.75", fill: "currentColor" })
1681
+ ] })
1682
+ };
1683
+ return /* @__PURE__ */ jsx(IconWrapper3, { children: icons[type] });
1684
+ };
1685
+ var CloseIcon = () => /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M9 3L3 9M3 3l6 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
1686
+ var slideUpIn = keyframes`
1687
+ from { transform: translateY(100%); opacity: 0; }
1688
+ to { transform: translateY(0); opacity: 1; }
1689
+ `;
1690
+ var slideDownOut = keyframes`
1691
+ from { transform: translateY(0); opacity: 1; }
1692
+ to { transform: translateY(100%); opacity: 0; }
1693
+ `;
1694
+ var slideDownIn = keyframes`
1695
+ from { transform: translateY(-100%); opacity: 0; }
1696
+ to { transform: translateY(0); opacity: 1; }
1697
+ `;
1698
+ var slideUpOut = keyframes`
1699
+ from { transform: translateY(0); opacity: 1; }
1700
+ to { transform: translateY(-100%); opacity: 0; }
1701
+ `;
1702
+ var typeColor = {
1703
+ info: { bg: "#1D4ED8", text: "#fff" },
1704
+ success: { bg: "#065F46", text: "#fff" },
1705
+ error: { bg: "#991B1B", text: "#fff" },
1706
+ warning: { bg: "#92400E", text: "#fff" }
1707
+ };
1708
+ var positionStyles = {
1709
+ "top-center": "top: 24px; left: 50%; transform: translateX(-50%);",
1710
+ "top-right": "top: 24px; right: 24px;",
1711
+ "bottom-center": "bottom: 24px; left: 50%; transform: translateX(-50%);",
1712
+ "bottom-right": "bottom: 24px; right: 24px;"
1713
+ };
1714
+ var ToastContainer = styled2.div`
1715
+ position: fixed;
1716
+ ${({ $position }) => positionStyles[$position]}
1717
+ display: flex;
1718
+ align-items: center;
1719
+ gap: ${t.spacingSm};
1720
+ padding: 12px 16px;
1721
+ border-radius: ${({ $borderRadius }) => $borderRadius ?? t.radiusLg()};
1722
+ background: ${({ $type, $backgroundColor }) => $backgroundColor ?? typeColor[$type].bg};
1723
+ color: ${({ $type, $textColor }) => $textColor ?? typeColor[$type].text};
1724
+ font-family: ${t.fontFamily};
1725
+ font-size: ${t.fontMd};
1726
+ min-width: 240px;
1727
+ max-width: 420px;
1728
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1729
+ z-index: 9999;
1730
+
1731
+ ${({ $position, $isClosing }) => {
1732
+ const isBottom = $position.startsWith("bottom");
1733
+ if ($isClosing) {
1734
+ return css`animation: ${isBottom ? slideDownOut : slideUpOut} 0.3s ease-out forwards;`;
1735
+ }
1736
+ return css`animation: ${isBottom ? slideUpIn : slideDownIn} 0.3s ease-out;`;
1737
+ }}
1738
+ `;
1739
+ var IconWrapper3 = styled2.span`
1740
+ display: inline-flex;
1741
+ flex-shrink: 0;
1742
+ `;
1743
+ var ToastMessage = styled2.span`
1744
+ flex: 1;
1745
+ line-height: 1.4;
1746
+ `;
1747
+ var CloseButton = styled2.button`
1748
+ display: inline-flex;
1749
+ align-items: center;
1750
+ justify-content: center;
1751
+ flex-shrink: 0;
1752
+ width: 20px;
1753
+ height: 20px;
1754
+ border: none;
1755
+ background: transparent;
1756
+ color: currentColor;
1757
+ cursor: pointer;
1758
+ padding: 0;
1759
+ opacity: 0.7;
1760
+ transition: opacity ${t.transitionFast};
1761
+ margin-left: 4px;
1762
+
1763
+ &:hover {
1764
+ opacity: 1;
1765
+ }
1766
+ `;
1767
+
1768
+ export { Badge, Button, Checkbox, Chip, Input, Label, Loading, Pagination, Radio, RadioGroup, Select, TextArea, Toast, configureTokens, defaultTokens, resetTokens };
1769
+ //# sourceMappingURL=index.mjs.map
1770
+ //# sourceMappingURL=index.mjs.map