@bichon/ds 0.0.3 → 0.0.4

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 DELETED
@@ -1,2186 +0,0 @@
1
- 'use strict';
2
-
3
- var react = require('@emotion/react');
4
- var jsxRuntime = require('react/jsx-runtime');
5
- var react$1 = require('react');
6
- var styled18 = require('@emotion/styled');
7
- var isPropValid8 = require('@emotion/is-prop-valid');
8
- var RadixAvatar = require('@radix-ui/react-avatar');
9
- var RadixProgress = require('@radix-ui/react-progress');
10
- var lucideReact = require('lucide-react');
11
- var TextareaAutosize = require('react-textarea-autosize');
12
- var ToastPrimitive = require('@radix-ui/react-toast');
13
- var DialogPrimitive = require('@radix-ui/react-dialog');
14
- var CheckboxPrimitive = require('@radix-ui/react-checkbox');
15
- var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
16
- var DropdownMenu2 = require('@radix-ui/react-dropdown-menu');
17
- var TooltipPrimitive2 = require('@radix-ui/react-tooltip');
18
- var ToggleGroup = require('@radix-ui/react-toggle-group');
19
- var TabsPrimitive = require('@radix-ui/react-tabs');
20
-
21
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
22
-
23
- function _interopNamespace(e) {
24
- if (e && e.__esModule) return e;
25
- var n = Object.create(null);
26
- if (e) {
27
- Object.keys(e).forEach(function (k) {
28
- if (k !== 'default') {
29
- var d = Object.getOwnPropertyDescriptor(e, k);
30
- Object.defineProperty(n, k, d.get ? d : {
31
- enumerable: true,
32
- get: function () { return e[k]; }
33
- });
34
- }
35
- });
36
- }
37
- n.default = e;
38
- return Object.freeze(n);
39
- }
40
-
41
- var styled18__default = /*#__PURE__*/_interopDefault(styled18);
42
- var isPropValid8__default = /*#__PURE__*/_interopDefault(isPropValid8);
43
- var RadixAvatar__namespace = /*#__PURE__*/_interopNamespace(RadixAvatar);
44
- var RadixProgress__namespace = /*#__PURE__*/_interopNamespace(RadixProgress);
45
- var TextareaAutosize__default = /*#__PURE__*/_interopDefault(TextareaAutosize);
46
- var ToastPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitive);
47
- var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
48
- var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
49
- var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
50
- var DropdownMenu2__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu2);
51
- var TooltipPrimitive2__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive2);
52
- var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
53
- var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
54
-
55
- // src/BichonThemeProvider.tsx
56
-
57
- // src/tokens/colors.ts
58
- var basicColor = {
59
- blue: {
60
- 100: "#EAF3FF",
61
- 300: "#ABCDFF",
62
- 500: "#2C81FC",
63
- 700: "#0C52B8",
64
- 900: "#002F74"
65
- },
66
- grey: {
67
- 50: "#FAFAFC",
68
- 100: "#F1F1F4",
69
- 200: "#E3E4E8",
70
- 300: "#B5B9C4",
71
- 400: "#949AA8",
72
- 500: "#6E7687",
73
- 600: "#596070",
74
- 700: "#4B505D",
75
- 800: "#3F434D",
76
- 900: "#25262C"
77
- },
78
- black: "#25262C",
79
- white: "#FFFFFF",
80
- black30: "rgba(37, 38, 44, 0.3)",
81
- // black 30% opacity
82
- red: {
83
- 100: "#FFECEE",
84
- 500: "#F04452",
85
- 700: "#AC202B"
86
- }
87
- };
88
- var colors = {
89
- basic: basicColor,
90
- // Semantic Colors
91
- none: "transparent",
92
- // Chart
93
- chartBlack: basicColor.grey[900],
94
- chartRed: basicColor.red[500],
95
- chartOrange: "#F98A00",
96
- chartYellow: "#EDB100",
97
- chartGreen: "#31A96B",
98
- chartBlue: basicColor.blue[500],
99
- chartPurple: "#8B4EDD",
100
- chartPink: "#F05C96",
101
- // Font
102
- textPrimary: basicColor.grey[900],
103
- textSecondary: basicColor.grey[600],
104
- textTertiary: basicColor.grey[500],
105
- textDisabled: basicColor.grey[300],
106
- textPlaceholder: basicColor.grey[300],
107
- // Line
108
- lineLight: basicColor.grey[100],
109
- lineDefault: basicColor.grey[200],
110
- lineAccent: basicColor.blue[500],
111
- lineWarning: basicColor.red[500],
112
- // Background
113
- bgWhite: basicColor.white,
114
- bgLightGrey: basicColor.grey[50],
115
- bgMediumGrey: basicColor.grey[100],
116
- bgDarkGrey: basicColor.grey[800],
117
- bgBlack: basicColor.grey[900],
118
- bgAccent: basicColor.blue[500],
119
- bgAccentDark: basicColor.blue[700],
120
- bgAccentSubtle: basicColor.blue[100],
121
- bgWarning: basicColor.red[500],
122
- bgWarningDark: basicColor.red[700],
123
- bgWarningSubtle: basicColor.red[100],
124
- // Status
125
- textAccent: basicColor.blue[500],
126
- textWarning: basicColor.red[500]
127
- };
128
-
129
- // src/tokens/typo.ts
130
- var typo = {
131
- Sb_32: `
132
- font-size: 32px;
133
- line-height: 42px;
134
- font-weight: 600;
135
- letter-spacing: -0.02em;
136
- `,
137
- Sb_24: `
138
- font-size: 24px;
139
- line-height: 32px;
140
- font-weight: 600;
141
- letter-spacing: -0.02em;
142
- `,
143
- Sb_20: `
144
- font-size: 20px;
145
- line-height: 29px;
146
- font-weight: 600;
147
- letter-spacing: -0.02em;
148
- `,
149
- Sb_18: `
150
- font-size: 18px;
151
- line-height: 27px;
152
- font-weight: 600;
153
- letter-spacing: -0.02em;
154
- `,
155
- Sb_16: `
156
- font-size: 16px;
157
- line-height: 24px;
158
- font-weight: 600;
159
- letter-spacing: -0.02em;
160
- `,
161
- Sb_14: `
162
- font-size: 14px;
163
- line-height: 21px;
164
- font-weight: 600;
165
- letter-spacing: -0.02em;
166
- `,
167
- Md_18: `
168
- font-size: 18px;
169
- line-height: 27px;
170
- font-weight: 500;
171
- letter-spacing: -0.02em;
172
- `,
173
- Md_16: `
174
- font-size: 16px;
175
- line-height: 24px;
176
- font-weight: 500;
177
- letter-spacing: -0.02em;
178
- `,
179
- Md_15: `
180
- font-size: 15px;
181
- line-height: 22.5px;
182
- font-weight: 500;
183
- letter-spacing: -0.02em;
184
- `,
185
- Md_14: `
186
- font-size: 14px;
187
- line-height: 21px;
188
- font-weight: 500;
189
- letter-spacing: -0.02em;
190
- `,
191
- Md_13: `
192
- font-size: 13px;
193
- line-height: 19.5px;
194
- font-weight: 500;
195
- letter-spacing: -0.02em;
196
- `,
197
- Md_12: `
198
- font-size: 12px;
199
- line-height: 18px;
200
- font-weight: 500;
201
- letter-spacing: -0.02em;
202
- `,
203
- Rg_16: `
204
- font-size: 16px;
205
- line-height: 24px;
206
- font-weight: 400;
207
- letter-spacing: -0.02em;
208
- `,
209
- Rg_15: `
210
- font-size: 15px;
211
- line-height: 22.5px;
212
- font-weight: 400;
213
- letter-spacing: -0.02em;
214
- `,
215
- Rg_14: `
216
- font-size: 14px;
217
- line-height: 21px;
218
- font-weight: 400;
219
- letter-spacing: -0.02em;
220
- `,
221
- Rg_13: `
222
- font-size: 13px;
223
- line-height: 19.5px;
224
- font-weight: 400;
225
- letter-spacing: -0.02em;
226
- `,
227
- Rg_12: `
228
- font-size: 12px;
229
- line-height: 18px;
230
- font-weight: 400;
231
- letter-spacing: -0.02em;
232
- `
233
- };
234
-
235
- // src/tokens/spacing.ts
236
- var spacing = {
237
- 0: "0px",
238
- 1: "4px",
239
- 2: "8px",
240
- 3: "12px",
241
- 4: "16px",
242
- 5: "20px",
243
- 6: "24px",
244
- 8: "32px",
245
- 10: "40px",
246
- 12: "48px",
247
- 16: "64px",
248
- 20: "80px",
249
- 24: "96px"
250
- };
251
- var semanticSpacing = {
252
- xs: spacing[1],
253
- sm: spacing[2],
254
- md: spacing[3],
255
- lg: spacing[4],
256
- xl: spacing[5],
257
- "2xl": spacing[6],
258
- "3xl": spacing[8]
259
- };
260
- var componentSize = {
261
- cardWidth: "286px",
262
- cardContainerWidth: "334px",
263
- modalWidth: "400px",
264
- inputHeight: {
265
- small: "32px",
266
- medium: "40px",
267
- large: "48px"
268
- }
269
- };
270
-
271
- // src/tokens/radius.ts
272
- var radius = {
273
- none: "0px",
274
- xs: "2px",
275
- sm: "4px",
276
- md: "6px",
277
- lg: "8px",
278
- xl: "10px",
279
- "2xl": "12px",
280
- "3xl": "20px",
281
- full: "9999px"
282
- };
283
-
284
- // src/tokens/shadows.ts
285
- var shadows = {
286
- none: "none",
287
- sm: "0px 1px 2px 0px rgba(0, 27, 55, 0.08)",
288
- base: "0px 2px 4px 0px rgba(0, 27, 55, 0.10)",
289
- md: "0px 4px 8px 0px rgba(0, 27, 55, 0.12)",
290
- lg: "0px 8px 16px 0px rgba(0, 27, 55, 0.15)",
291
- xl: "0px 12px 24px 0px rgba(0, 27, 55, 0.18)",
292
- modal: "0px 4px 12px 0px rgba(0, 27, 55, 0.15)"
293
- };
294
-
295
- // src/assets/fonts/woff2/Pretendard-Thin.woff2
296
- var Pretendard_Thin_default = "./Pretendard-Thin-7QVSFVOF.woff2";
297
-
298
- // src/assets/fonts/woff2/Pretendard-ExtraLight.woff2
299
- var Pretendard_ExtraLight_default = "./Pretendard-ExtraLight-W2EFW6U4.woff2";
300
-
301
- // src/assets/fonts/woff2/Pretendard-Light.woff2
302
- var Pretendard_Light_default = "./Pretendard-Light-44S62PI7.woff2";
303
-
304
- // src/assets/fonts/woff2/Pretendard-Regular.woff2
305
- var Pretendard_Regular_default = "./Pretendard-Regular-CGOPAG2E.woff2";
306
-
307
- // src/assets/fonts/woff2/Pretendard-Medium.woff2
308
- var Pretendard_Medium_default = "./Pretendard-Medium-CLYKZXFO.woff2";
309
-
310
- // src/assets/fonts/woff2/Pretendard-SemiBold.woff2
311
- var Pretendard_SemiBold_default = "./Pretendard-SemiBold-Z6RJ4TYK.woff2";
312
-
313
- // src/assets/fonts/woff2/Pretendard-Bold.woff2
314
- var Pretendard_Bold_default = "./Pretendard-Bold-4AHBL5CN.woff2";
315
-
316
- // src/assets/fonts/woff2/Pretendard-ExtraBold.woff2
317
- var Pretendard_ExtraBold_default = "./Pretendard-ExtraBold-3U7HNRI4.woff2";
318
-
319
- // src/assets/fonts/woff2/Pretendard-Black.woff2
320
- var Pretendard_Black_default = "./Pretendard-Black-JLVK6ESK.woff2";
321
-
322
- // src/styles/globalStyles.ts
323
- var globalStyles = react.css`
324
- @font-face {
325
- font-family: 'Pretendard';
326
- src: url(${Pretendard_Thin_default}) format('woff2');
327
- font-weight: 100;
328
- font-display: swap;
329
- }
330
-
331
- @font-face {
332
- font-family: 'Pretendard';
333
- src: url(${Pretendard_ExtraLight_default}) format('woff2');
334
- font-weight: 200;
335
- font-display: swap;
336
- }
337
-
338
- @font-face {
339
- font-family: 'Pretendard';
340
- src: url(${Pretendard_Light_default}) format('woff2');
341
- font-weight: 300;
342
- font-display: swap;
343
- }
344
-
345
- @font-face {
346
- font-family: 'Pretendard';
347
- src: url(${Pretendard_Regular_default}) format('woff2');
348
- font-weight: 400;
349
- font-display: swap;
350
- }
351
-
352
- @font-face {
353
- font-family: 'Pretendard';
354
- src: url(${Pretendard_Medium_default}) format('woff2');
355
- font-weight: 500;
356
- font-display: swap;
357
- }
358
-
359
- @font-face {
360
- font-family: 'Pretendard';
361
- src: url(${Pretendard_SemiBold_default}) format('woff2');
362
- font-weight: 600;
363
- font-display: swap;
364
- }
365
-
366
- @font-face {
367
- font-family: 'Pretendard';
368
- src: url(${Pretendard_Bold_default}) format('woff2');
369
- font-weight: 700;
370
- font-display: swap;
371
- }
372
-
373
- @font-face {
374
- font-family: 'Pretendard';
375
- src: url(${Pretendard_ExtraBold_default}) format('woff2');
376
- font-weight: 800;
377
- font-display: swap;
378
- }
379
-
380
- @font-face {
381
- font-family: 'Pretendard';
382
- src: url(${Pretendard_Black_default}) format('woff2');
383
- font-weight: 900;
384
- font-display: swap;
385
- }
386
-
387
- :root {
388
- font-synthesis: none;
389
- text-rendering: optimizeLegibility;
390
- -webkit-font-smoothing: antialiased;
391
- -moz-osx-font-smoothing: grayscale;
392
- }
393
-
394
- * {
395
- font-family:
396
- 'Pretendard',
397
- -apple-system,
398
- BlinkMacSystemFont,
399
- system-ui,
400
- Roboto,
401
- 'Helvetica Neue',
402
- 'Segoe UI',
403
- 'Apple SD Gothic Neo',
404
- 'Noto Sans KR',
405
- 'Malgun Gothic',
406
- 'Apple Color Emoji',
407
- 'Segoe UI Emoji',
408
- 'Segoe UI Symbol',
409
- sans-serif;
410
- box-sizing: border-box;
411
- margin: 0;
412
- padding: 0;
413
- }
414
-
415
- html,
416
- body {
417
- -webkit-font-smoothing: antialiased;
418
- -moz-osx-font-smoothing: grayscale;
419
- }
420
-
421
- button {
422
- font-family: inherit;
423
- border: 0;
424
- outline: none;
425
- }
426
-
427
- input,
428
- textarea {
429
- outline: none;
430
- }
431
-
432
- textarea {
433
- resize: none;
434
- }
435
-
436
- h1,
437
- h2,
438
- h3,
439
- h4,
440
- h5,
441
- h6,
442
- p {
443
- margin: 0;
444
- }
445
-
446
- a {
447
- text-decoration: none;
448
- color: inherit;
449
- }
450
- `;
451
- var theme = {
452
- colors,
453
- typo,
454
- spacing,
455
- radius,
456
- shadows
457
- };
458
- function BichonThemeProvider({ children }) {
459
- return /* @__PURE__ */ jsxRuntime.jsxs(react.ThemeProvider, { theme, children: [
460
- /* @__PURE__ */ jsxRuntime.jsx(react.Global, { styles: globalStyles }),
461
- children
462
- ] });
463
- }
464
- var sizeStyles = {
465
- large: {
466
- width: "40px",
467
- height: "40px"
468
- },
469
- medium: {
470
- width: "32px",
471
- height: "32px"
472
- },
473
- small: {
474
- width: "24px",
475
- height: "24px"
476
- }
477
- };
478
- var propFilter = (prop) => !["$size"].includes(prop) && isPropValid8__default.default(prop);
479
- var StyledAvatarRoot = styled18__default.default(RadixAvatar__namespace.Root, {
480
- shouldForwardProp: propFilter
481
- })`
482
- display: inline-flex;
483
- align-items: center;
484
- justify-content: center;
485
- vertical-align: middle;
486
- overflow: hidden;
487
- user-select: none;
488
- width: ${({ $size }) => sizeStyles[$size].width};
489
- height: ${({ $size }) => sizeStyles[$size].height};
490
- border-radius: 50%;
491
- border: 1px solid ${({ theme: theme2 }) => theme2.colors.lineDefault};
492
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
493
- `;
494
- var StyledAvatarImage = styled18__default.default(RadixAvatar__namespace.Image)`
495
- width: 100%;
496
- height: 100%;
497
- object-fit: cover;
498
- border-radius: inherit;
499
- `;
500
- var StyledAvatarFallback = styled18__default.default(RadixAvatar__namespace.Fallback)`
501
- width: 100%;
502
- height: 100%;
503
- display: flex;
504
- align-items: center;
505
- justify-content: center;
506
- background-color: ${({ theme: theme2 }) => theme2.colors.bgLightGrey};
507
- color: ${({ theme: theme2 }) => theme2.colors.textTertiary};
508
- font-size: 14px;
509
- font-weight: 500;
510
- line-height: 1;
511
- text-transform: uppercase;
512
- `;
513
- var AvatarFallbackIcon = ({ size = 32 }) => {
514
- return /* @__PURE__ */ jsxRuntime.jsxs(
515
- "svg",
516
- {
517
- width: size,
518
- height: size,
519
- viewBox: "0 0 32 32",
520
- fill: "none",
521
- xmlns: "http://www.w3.org/2000/svg",
522
- children: [
523
- /* @__PURE__ */ jsxRuntime.jsxs(
524
- "mask",
525
- {
526
- id: "mask0_156_7568",
527
- style: { maskType: "alpha" },
528
- maskUnits: "userSpaceOnUse",
529
- x: "5",
530
- y: "8",
531
- width: "22",
532
- height: "35",
533
- children: [
534
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "14", r: "6", fill: "#6E7687" }),
535
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "32", r: "11", fill: "#6E7687" })
536
- ]
537
- }
538
- ),
539
- /* @__PURE__ */ jsxRuntime.jsx("g", { mask: "url(#mask0_156_7568)", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "16", fill: "#B5B9C4" }) })
540
- ]
541
- }
542
- );
543
- };
544
- var Avatar = react$1.forwardRef(
545
- ({ size = "medium", src, alt, fallback, ...props }, ref) => {
546
- const sizeMap = {
547
- large: 40,
548
- medium: 32,
549
- small: 24
550
- };
551
- const iconSize = sizeMap[size];
552
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledAvatarRoot, { ref, $size: size, ...props, children: [
553
- src && /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarImage, { src, alt }),
554
- /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarFallback, { children: fallback || /* @__PURE__ */ jsxRuntime.jsx(AvatarFallbackIcon, { size: iconSize }) })
555
- ] });
556
- }
557
- );
558
- Avatar.displayName = "Avatar";
559
- var sizeStyles2 = {
560
- large: {
561
- padding: "3.5px 12px",
562
- typography: "Md_14"
563
- },
564
- medium: {
565
- padding: "2px 10px",
566
- typography: "Md_13"
567
- },
568
- small: {
569
- padding: "1px 8px",
570
- typography: "Md_12"
571
- }
572
- };
573
- var propFilter2 = (prop) => !["$variant", "$size"].includes(prop) && isPropValid8__default.default(prop);
574
- var StyledBadge = styled18__default.default("span", {
575
- shouldForwardProp: propFilter2
576
- })`
577
- display: inline-flex;
578
- justify-content: center;
579
- align-items: center;
580
- width: fit-content;
581
- height: fit-content;
582
- border-radius: 999px;
583
- white-space: nowrap;
584
-
585
- ${({ $size, theme: theme2 }) => {
586
- const spec = sizeStyles2[$size];
587
- return `
588
- ${theme2.typo[spec.typography]}
589
- padding: ${spec.padding};
590
- `;
591
- }}
592
-
593
- ${({ $variant, theme: theme2 }) => {
594
- if ($variant === "active") {
595
- return `
596
- background-color: ${theme2.colors.bgAccentSubtle};
597
- color: ${theme2.colors.bgAccent};
598
- `;
599
- }
600
- if ($variant === "neutral") {
601
- return `
602
- background-color: ${theme2.colors.bgMediumGrey};
603
- color: ${theme2.colors.textSecondary};
604
- `;
605
- }
606
- if ($variant === "warning") {
607
- return `
608
- background-color: ${theme2.colors.bgWarningSubtle};
609
- color: ${theme2.colors.textWarning};
610
- `;
611
- }
612
- return "";
613
- }}
614
- `;
615
- var Badge = react$1.forwardRef(
616
- ({
617
- variant = "neutral",
618
- size = "medium",
619
- children,
620
- ...props
621
- }, ref) => {
622
- return /* @__PURE__ */ jsxRuntime.jsx(
623
- StyledBadge,
624
- {
625
- ref,
626
- $variant: variant,
627
- $size: size,
628
- ...props,
629
- children
630
- }
631
- );
632
- }
633
- );
634
- Badge.displayName = "Badge";
635
- var sizeStyles3 = {
636
- large: {
637
- height: "8px"
638
- },
639
- medium: {
640
- height: "5px"
641
- },
642
- small: {
643
- height: "2px"
644
- }
645
- };
646
- var propFilter3 = (prop) => !["$size", "$width"].includes(prop) && isPropValid8__default.default(prop);
647
- var StyledProgressRoot = styled18__default.default(RadixProgress__namespace.Root, {
648
- shouldForwardProp: propFilter3
649
- })`
650
- position: relative;
651
- overflow: hidden;
652
- background-color: ${({ theme: theme2 }) => theme2.colors.bgMediumGrey};
653
- border-radius: 999px;
654
- width: ${({ $width }) => $width ? typeof $width === "number" ? `${$width}px` : $width : "100%"};
655
- height: ${({ $size }) => sizeStyles3[$size].height};
656
-
657
- /* Indeterminate animation support */
658
- &[data-state='indeterminate'] {
659
- animation: progress-indeterminate 1.5s ease-in-out infinite;
660
- }
661
-
662
- @keyframes progress-indeterminate {
663
- 0% {
664
- transform: translateX(-100%);
665
- }
666
- 100% {
667
- transform: translateX(100%);
668
- }
669
- }
670
- `;
671
- var StyledProgressIndicator = styled18__default.default(RadixProgress__namespace.Indicator)`
672
- background-color: ${({ theme: theme2 }) => theme2.colors.bgAccent};
673
- width: 100%;
674
- height: 100%;
675
- transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
676
- `;
677
- var Progress = react$1.forwardRef(
678
- ({ size = "medium", value, width = "100%", duration, ...props }, ref) => {
679
- return /* @__PURE__ */ jsxRuntime.jsx(
680
- StyledProgressRoot,
681
- {
682
- ref,
683
- value,
684
- $size: size,
685
- $width: width,
686
- style: {
687
- ...duration && { "--progress-duration": duration }
688
- },
689
- ...props,
690
- children: /* @__PURE__ */ jsxRuntime.jsx(
691
- StyledProgressIndicator,
692
- {
693
- style: {
694
- transform: `translateX(-${100 - (value ?? 0)}%)`
695
- }
696
- }
697
- )
698
- }
699
- );
700
- }
701
- );
702
- Progress.displayName = "Progress";
703
- var sizeStyles4 = {
704
- filled: {
705
- large: { borderRadius: "xl", typography: "Md_16", padding: "12px 16px" },
706
- medium: { borderRadius: "lg", typography: "Md_15", padding: "8.5px 16px" },
707
- small: { borderRadius: "lg", typography: "Md_14", padding: "5.5px 12px" }
708
- },
709
- warning: {
710
- large: { borderRadius: "xl", typography: "Md_16", padding: "12px 16px" },
711
- medium: { borderRadius: "lg", typography: "Md_15", padding: "8.5px 16px" },
712
- small: { borderRadius: "lg", typography: "Md_14", padding: "5.5px 12px" }
713
- },
714
- outlined: {
715
- large: { borderRadius: "xl", typography: "Md_16", padding: "12px 16px" },
716
- medium: { borderRadius: "lg", typography: "Md_15", padding: "8.5px 16px" },
717
- small: { borderRadius: "lg", typography: "Md_14", padding: "5.5px 12px" }
718
- },
719
- text: {
720
- large: { borderRadius: "xl", typography: "Md_16", padding: "12px 8px" },
721
- medium: { borderRadius: "lg", typography: "Md_15", padding: "8.5px 8px" },
722
- small: { borderRadius: "lg", typography: "Md_14", padding: "8px 6px" }
723
- }
724
- };
725
- var propFilter4 = (prop) => !["$variant", "$size", "$width", "$active"].includes(prop) && isPropValid8__default.default(prop);
726
- var StyledButton = styled18__default.default("button", {
727
- shouldForwardProp: propFilter4
728
- })`
729
- display: inline-flex;
730
- justify-content: center;
731
- align-items: center;
732
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
733
- width: ${({ $width }) => $width ? typeof $width === "number" ? `${$width}px` : $width : "fit-content"};
734
- height: fit-content;
735
-
736
- border: none;
737
- outline: none;
738
- text-align: center;
739
- cursor: pointer;
740
- white-space: nowrap;
741
-
742
- transition: background-color 0.2s ease, color 0.2s ease,
743
- border-color 0.2s ease, opacity 0.2s ease;
744
-
745
- ${({ $variant, $size, theme: theme2 }) => {
746
- const spec = sizeStyles4[$variant][$size];
747
- const borderRadius = "borderRadius" in spec ? theme2.radius[spec.borderRadius] : "";
748
- return `
749
- ${theme2.typo[spec.typography]}
750
- padding: ${spec.padding};
751
- ${borderRadius ? `border-radius: ${borderRadius};` : ""}
752
- `;
753
- }}
754
-
755
- ${({ $variant, $active, theme: theme2 }) => {
756
- const activeSelector = $active ? `&, ` : "";
757
- const hoverActive = `&:hover:not(:disabled), &:active:not(:disabled)`;
758
- if ($variant === "filled") {
759
- return `
760
- background-color: ${$active ? theme2.colors.bgAccentDark : theme2.colors.bgAccent};
761
- color: ${theme2.colors.bgWhite};
762
- ${activeSelector}${hoverActive} {
763
- background-color: ${theme2.colors.bgAccentDark};
764
- color: ${theme2.colors.bgWhite};
765
- }
766
- `;
767
- }
768
- if ($variant === "warning") {
769
- return `
770
- background-color: ${$active ? theme2.colors.bgWarningDark : theme2.colors.bgWarning};
771
- color: ${theme2.colors.bgWhite};
772
- ${activeSelector}${hoverActive} {
773
- background-color: ${theme2.colors.bgWarningDark};
774
- color: ${theme2.colors.bgWhite};
775
- }
776
- `;
777
- }
778
- if ($variant === "outlined") {
779
- return `
780
- background-color: ${$active ? theme2.colors.bgMediumGrey : theme2.colors.bgWhite};
781
- border: 1px solid ${theme2.colors.lineDefault};
782
- color: ${theme2.colors.textPrimary};
783
- ${activeSelector}${hoverActive} {
784
- background-color: ${theme2.colors.bgMediumGrey};
785
- border: 1px solid ${theme2.colors.lineDefault};
786
- color: ${theme2.colors.textPrimary};
787
- }
788
- `;
789
- }
790
- return `
791
- background-color: ${$active ? theme2.colors.bgMediumGrey : "transparent"};
792
- color: ${theme2.colors.textPrimary};
793
- ${activeSelector}${hoverActive} {
794
- background-color: ${theme2.colors.bgMediumGrey};
795
- color: ${theme2.colors.textPrimary};
796
- }
797
- `;
798
- }}
799
-
800
- /* Disabled 공통 처리 (opacity 50%) */
801
- &:disabled {
802
- opacity: 0.5;
803
- cursor: not-allowed;
804
- }
805
- `;
806
- var Button = react$1.forwardRef(
807
- ({
808
- variant = "filled",
809
- size = "medium",
810
- width,
811
- active,
812
- children,
813
- type = "button",
814
- ...props
815
- }, ref) => {
816
- return /* @__PURE__ */ jsxRuntime.jsx(
817
- StyledButton,
818
- {
819
- ref,
820
- $variant: variant,
821
- $size: size,
822
- $width: width,
823
- $active: active,
824
- type,
825
- ...props,
826
- children
827
- }
828
- );
829
- }
830
- );
831
- Button.displayName = "Button";
832
- var StyledFlex = styled18__default.default.div`
833
- display: flex;
834
- flex-direction: ${({ direction }) => direction || "row"};
835
- justify-content: ${({ justify }) => justify || "flex-start"};
836
- align-items: ${({ alignItems }) => alignItems || "stretch"};
837
- gap: ${({ gap }) => typeof gap === "number" ? `${gap}px` : gap || "0"};
838
- width: ${({ width }) => typeof width === "number" ? `${width}px` : width || "auto"};
839
- height: ${({ height }) => typeof height === "number" ? `${height}px` : height || "auto"};
840
- padding: ${({ padding }) => padding || "0"};
841
- `;
842
- var Flex = react$1.forwardRef(
843
- ({ children, ...props }, ref) => {
844
- return /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { ref, ...props, children });
845
- }
846
- );
847
- Flex.displayName = "Flex";
848
- var StyledTextFieldInputWrapper = styled18__default.default.div`
849
- position: relative;
850
- width: 100%;
851
- `;
852
- var StyledLeadingIconWrapper = styled18__default.default.div`
853
- position: absolute;
854
- left: 16px;
855
- top: 50%;
856
- transform: translateY(-50%);
857
- color: ${({ theme: theme2 }) => theme2.colors.textTertiary};
858
- display: flex;
859
- align-items: center;
860
- justify-content: center;
861
- pointer-events: none;
862
- `;
863
- var StyledTextFieldInput = styled18__default.default.input`
864
- width: 100%;
865
- padding: ${({ $hasLeadingIcon }) => $hasLeadingIcon ? "12.5px 16px 12.5px 44px" : "12.5px 16px"};
866
- border: 1px solid
867
- ${({ theme: theme2, $variant }) => {
868
- if ($variant === "focus") return theme2.colors.lineAccent;
869
- if ($variant === "warning") return theme2.colors.lineWarning;
870
- return theme2.colors.lineDefault;
871
- }};
872
- border-radius: ${({ theme: theme2 }) => theme2.radius.xl};
873
- background: ${({ theme: theme2 }) => theme2.colors.bgWhite};
874
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
875
- ${({ theme: theme2 }) => theme2.typo.Rg_16}
876
- opacity: ${({ $variant }) => $variant === "disabled" ? 0.5 : 1};
877
-
878
- &::placeholder {
879
- color: ${({ theme: theme2 }) => theme2.colors.textDisabled};
880
- }
881
-
882
- &:focus {
883
- outline: none;
884
- border-color: ${({ theme: theme2, $variant }) => {
885
- if ($variant === "warning") return theme2.colors.lineWarning;
886
- return theme2.colors.lineAccent;
887
- }};
888
- }
889
-
890
- &:disabled {
891
- cursor: not-allowed;
892
- opacity: 0.5;
893
- }
894
- `;
895
- var StyledTextFieldTextarea = styled18__default.default(TextareaAutosize__default.default, {
896
- shouldForwardProp: (prop) => isPropValid8__default.default(prop) || prop === "minRows" || prop === "maxRows"
897
- })`
898
- width: 100%;
899
- padding: ${({ $hasLeadingIcon }) => $hasLeadingIcon ? "12.5px 16px 12.5px 44px" : "12.5px 16px"};
900
- border: 1px solid
901
- ${({ theme: theme2, $variant }) => {
902
- if ($variant === "focus") return theme2.colors.lineAccent;
903
- if ($variant === "warning") return theme2.colors.lineWarning;
904
- return theme2.colors.lineDefault;
905
- }};
906
- border-radius: ${({ theme: theme2 }) => theme2.radius.xl};
907
- background: ${({ theme: theme2 }) => theme2.colors.bgWhite};
908
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
909
- ${({ theme: theme2 }) => theme2.typo.Rg_16}
910
- opacity: ${({ $variant }) => $variant === "disabled" ? 0.5 : 1};
911
- resize: none;
912
- font-family: inherit;
913
-
914
- &::placeholder {
915
- color: ${({ theme: theme2 }) => theme2.colors.textDisabled};
916
- }
917
-
918
- &:focus {
919
- outline: none;
920
- border-color: ${({ theme: theme2, $variant }) => {
921
- if ($variant === "warning") return theme2.colors.lineWarning;
922
- return theme2.colors.lineAccent;
923
- }};
924
- }
925
-
926
- &:disabled {
927
- cursor: not-allowed;
928
- opacity: 0.5;
929
- }
930
- `;
931
- var StyledHelperText = styled18__default.default.div`
932
- ${({ theme: theme2 }) => theme2.typo.Rg_12}
933
- margin-top: 6px;
934
- color: ${({ theme: theme2, $variant }) => {
935
- if ($variant === "warning") return theme2.colors.textWarning;
936
- return theme2.colors.textTertiary;
937
- }};
938
- opacity: ${({ $variant }) => $variant === "disabled" ? 0.5 : 1};
939
- `;
940
- var TextField = react$1.forwardRef(
941
- ({
942
- multiline = false,
943
- variant = "default",
944
- width = "375px",
945
- searchField = false,
946
- minRows = 2,
947
- maxRows,
948
- helperText,
949
- showHelperText,
950
- disabled,
951
- ...props
952
- }, ref) => {
953
- const enableSearch = !multiline && searchField;
954
- const effectiveVariant = react$1.useMemo(() => {
955
- if (disabled) return "disabled";
956
- return variant;
957
- }, [disabled, variant]);
958
- const shouldShowHelperText = react$1.useMemo(() => {
959
- if (showHelperText === false) return false;
960
- return Boolean(helperText);
961
- }, [showHelperText, helperText]);
962
- const inputProps = react$1.useMemo(() => {
963
- const baseProps = {
964
- ...props,
965
- $variant: effectiveVariant,
966
- $width: "100%",
967
- $multiline: multiline,
968
- $hasLeadingIcon: enableSearch,
969
- disabled: effectiveVariant === "disabled" || disabled
970
- };
971
- if (multiline) {
972
- return {
973
- ...baseProps,
974
- minRows,
975
- maxRows
976
- };
977
- }
978
- return baseProps;
979
- }, [
980
- props,
981
- effectiveVariant,
982
- multiline,
983
- minRows,
984
- maxRows,
985
- disabled,
986
- enableSearch
987
- ]);
988
- return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", width, children: [
989
- /* @__PURE__ */ jsxRuntime.jsxs(StyledTextFieldInputWrapper, { children: [
990
- enableSearch && /* @__PURE__ */ jsxRuntime.jsx(StyledLeadingIconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { size: 20 }) }),
991
- multiline ? /* @__PURE__ */ jsxRuntime.jsx(
992
- StyledTextFieldTextarea,
993
- {
994
- ref,
995
- ...inputProps
996
- }
997
- ) : /* @__PURE__ */ jsxRuntime.jsx(
998
- StyledTextFieldInput,
999
- {
1000
- ref,
1001
- ...inputProps
1002
- }
1003
- )
1004
- ] }),
1005
- shouldShowHelperText && /* @__PURE__ */ jsxRuntime.jsx(StyledHelperText, { $variant: effectiveVariant, children: helperText })
1006
- ] });
1007
- }
1008
- );
1009
- TextField.displayName = "TextField";
1010
- var StyledToastViewport = styled18__default.default(ToastPrimitive__namespace.Viewport)`
1011
- position: fixed;
1012
- ${({ $position, $viewportOffset }) => $position === "top" ? `top: ${$viewportOffset}px;` : `bottom: ${$viewportOffset}px;`}
1013
- left: 50%;
1014
- transform: translateX(-50%);
1015
- display: flex;
1016
- flex-direction: column;
1017
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1018
- width: max-content;
1019
- max-width: 90vw;
1020
- z-index: 9999;
1021
- `;
1022
- var StyledToastRoot = styled18__default.default(ToastPrimitive__namespace.Root)`
1023
- background-color: ${({ theme: theme2 }) => theme2.colors.bgDarkGrey};
1024
- color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1025
- border-radius: ${({ theme: theme2 }) => theme2.radius.lg};
1026
- padding: ${({ theme: theme2 }) => `${theme2.spacing[3]} ${theme2.spacing[4]}`};
1027
- box-shadow: ${({ theme: theme2 }) => theme2.shadows.lg};
1028
-
1029
- &[data-state='open'] {
1030
- animation: slideIn 200ms ease-out;
1031
- }
1032
-
1033
- &[data-state='closed'] {
1034
- animation: slideOut 200ms ease-in;
1035
- }
1036
-
1037
- @keyframes slideIn {
1038
- from {
1039
- transform: translateY(${({ $position }) => $position === "top" ? "-100%" : "100%"});
1040
- opacity: 0;
1041
- }
1042
- to {
1043
- transform: translateY(0);
1044
- opacity: 1;
1045
- }
1046
- }
1047
-
1048
- @keyframes slideOut {
1049
- from {
1050
- transform: translateY(0);
1051
- opacity: 1;
1052
- }
1053
- to {
1054
- transform: translateY(${({ $position }) => $position === "top" ? "-100%" : "100%"});
1055
- opacity: 0;
1056
- }
1057
- }
1058
- `;
1059
- var StyledToastDescription = styled18__default.default(ToastPrimitive__namespace.Description)`
1060
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1061
- `;
1062
- var ToastContext = react$1.createContext(null);
1063
- function ToastProvider({
1064
- children,
1065
- position: defaultPosition = "bottom",
1066
- viewportOffset = 20,
1067
- ...props
1068
- }) {
1069
- const [open, setOpen] = react$1.useState(false);
1070
- const [content, setContent] = react$1.useState("");
1071
- const [duration, setDuration] = react$1.useState(3e3);
1072
- const [position, setPosition] = react$1.useState(defaultPosition);
1073
- return /* @__PURE__ */ jsxRuntime.jsx(
1074
- ToastContext.Provider,
1075
- {
1076
- value: {
1077
- open,
1078
- setOpen,
1079
- content,
1080
- setContent,
1081
- duration,
1082
- setDuration,
1083
- position,
1084
- setPosition
1085
- },
1086
- children: /* @__PURE__ */ jsxRuntime.jsxs(ToastPrimitive__namespace.Provider, { swipeDirection: "down", ...props, children: [
1087
- children,
1088
- /* @__PURE__ */ jsxRuntime.jsx(StyledToastRoot, { open, onOpenChange: setOpen, duration, $position: position, children: /* @__PURE__ */ jsxRuntime.jsx(StyledToastDescription, { children: content }) }),
1089
- /* @__PURE__ */ jsxRuntime.jsx(StyledToastViewport, { $position: position, $viewportOffset: viewportOffset })
1090
- ] })
1091
- }
1092
- );
1093
- }
1094
- function useToast() {
1095
- const context = react$1.useContext(ToastContext);
1096
- if (!context) {
1097
- throw new Error("useToast must be used within ToastProvider");
1098
- }
1099
- const showToast = (message, options) => {
1100
- context.setContent(message);
1101
- if (options?.duration) context.setDuration(options.duration);
1102
- if (options?.position) context.setPosition(options.position);
1103
- context.setOpen(true);
1104
- };
1105
- return { showToast };
1106
- }
1107
- var StyledOverlay = styled18__default.default(DialogPrimitive__namespace.Overlay)`
1108
- background-color: ${({ theme: theme2 }) => theme2.colors.basic.black30};
1109
- position: fixed;
1110
- inset: 0;
1111
- z-index: 9998;
1112
-
1113
- &[data-state='open'] {
1114
- animation: fadeIn 200ms ease-out;
1115
- }
1116
-
1117
- &[data-state='closed'] {
1118
- animation: fadeOut 200ms ease-in;
1119
- }
1120
-
1121
- @keyframes fadeIn {
1122
- from { opacity: 0; }
1123
- to { opacity: 1; }
1124
- }
1125
-
1126
- @keyframes fadeOut {
1127
- from { opacity: 1; }
1128
- to { opacity: 0; }
1129
- }
1130
- `;
1131
- var StyledContent = styled18__default.default(DialogPrimitive__namespace.Content)`
1132
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1133
- border-radius: ${({ theme: theme2 }) => theme2.radius["2xl"]};
1134
- box-shadow: ${({ theme: theme2 }) => theme2.shadows.modal};
1135
- position: fixed;
1136
- top: 50%;
1137
- left: 50%;
1138
- transform: translate(-50%, -50%);
1139
- width: 90vw;
1140
- max-width: 400px;
1141
- max-height: 85vh;
1142
- padding: ${({ theme: theme2 }) => theme2.spacing[6]};
1143
- z-index: 9999;
1144
-
1145
- &[data-state='open'] {
1146
- animation: contentShow 200ms ease-out;
1147
- }
1148
-
1149
- @keyframes contentShow {
1150
- from {
1151
- opacity: 0;
1152
- transform: translate(-50%, -48%) scale(0.96);
1153
- }
1154
- to {
1155
- opacity: 1;
1156
- transform: translate(-50%, -50%) scale(1);
1157
- }
1158
- }
1159
-
1160
- &:focus {
1161
- outline: none;
1162
- }
1163
- `;
1164
- var StyledHeader = styled18__default.default.div`
1165
- display: flex;
1166
- justify-content: space-between;
1167
- align-items: flex-start;
1168
- margin-bottom: ${({ theme: theme2 }) => theme2.spacing[4]};
1169
- `;
1170
- var StyledTitle = styled18__default.default(DialogPrimitive__namespace.Title)`
1171
- ${({ theme: theme2 }) => theme2.typo.Sb_18}
1172
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
1173
- margin: 0;
1174
- `;
1175
- var StyledCloseButton = styled18__default.default.button`
1176
- background: transparent;
1177
- border: none;
1178
- cursor: pointer;
1179
- padding: 0;
1180
- display: flex;
1181
- align-items: center;
1182
- justify-content: center;
1183
- color: ${({ theme: theme2 }) => theme2.colors.textSecondary};
1184
- transition: color 0.2s ease;
1185
-
1186
- &:hover {
1187
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
1188
- }
1189
- `;
1190
- var StyledBody = styled18__default.default.div`
1191
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1192
- color: ${({ theme: theme2 }) => theme2.colors.textSecondary};
1193
- margin-bottom: ${({ theme: theme2 }) => theme2.spacing[6]};
1194
- `;
1195
- var StyledFooter = styled18__default.default.div`
1196
- display: flex;
1197
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1198
- justify-content: flex-end;
1199
- `;
1200
- function DialogRoot({ isOpen, onClose, children }) {
1201
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
1202
- /* @__PURE__ */ jsxRuntime.jsx(StyledOverlay, {}),
1203
- /* @__PURE__ */ jsxRuntime.jsx(StyledContent, { children })
1204
- ] }) });
1205
- }
1206
- function DialogTitle({ children }) {
1207
- const theme2 = react.useTheme();
1208
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledHeader, { children: [
1209
- /* @__PURE__ */ jsxRuntime.jsx(StyledTitle, { children }),
1210
- /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(StyledCloseButton, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 24, color: theme2.colors.textSecondary }) }) })
1211
- ] });
1212
- }
1213
- function DialogContent({ children }) {
1214
- return /* @__PURE__ */ jsxRuntime.jsx(StyledBody, { children });
1215
- }
1216
- function DialogFooter({ children }) {
1217
- return /* @__PURE__ */ jsxRuntime.jsx(StyledFooter, { children });
1218
- }
1219
- var Dialog = DialogRoot;
1220
- Dialog.Title = DialogTitle;
1221
- Dialog.Content = DialogContent;
1222
- Dialog.Footer = DialogFooter;
1223
- var StyledChatBubble = styled18__default.default.div`
1224
- padding: ${({ theme: theme2 }) => `${theme2.spacing[3]} ${theme2.spacing[4]}`};
1225
- border-radius: ${({ theme: theme2 }) => theme2.radius.xl};
1226
- max-width: 70%;
1227
- width: fit-content;
1228
- word-wrap: break-word;
1229
-
1230
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1231
-
1232
- ${({ $variant, theme: theme2 }) => {
1233
- if ($variant === "user") {
1234
- return `
1235
- background-color: ${theme2.colors.bgAccent};
1236
- color: ${theme2.colors.bgWhite};
1237
- align-self: flex-end;
1238
- border-bottom-right-radius: ${theme2.radius.sm};
1239
- `;
1240
- }
1241
- return `
1242
- background-color: ${theme2.colors.bgMediumGrey};
1243
- color: ${theme2.colors.textPrimary};
1244
- align-self: flex-start;
1245
- border-bottom-left-radius: ${theme2.radius.sm};
1246
- `;
1247
- }}
1248
- `;
1249
- function ChatBubble({ variant = "assistant", children }) {
1250
- return /* @__PURE__ */ jsxRuntime.jsx(StyledChatBubble, { $variant: variant, children });
1251
- }
1252
- var ICON_BUTTON_PADDING = {
1253
- large: "12px",
1254
- medium: "10px",
1255
- small: "8px"
1256
- };
1257
- var iconButtonSizeStyles = {
1258
- filled: {
1259
- large: {
1260
- ...sizeStyles4.filled.large,
1261
- padding: `${ICON_BUTTON_PADDING.large} ${ICON_BUTTON_PADDING.large}`
1262
- },
1263
- medium: {
1264
- ...sizeStyles4.filled.medium,
1265
- padding: `${ICON_BUTTON_PADDING.medium} ${ICON_BUTTON_PADDING.medium}`
1266
- },
1267
- small: {
1268
- ...sizeStyles4.filled.small,
1269
- padding: `${ICON_BUTTON_PADDING.small} ${ICON_BUTTON_PADDING.small}`
1270
- }
1271
- },
1272
- warning: {
1273
- large: {
1274
- ...sizeStyles4.warning.large,
1275
- padding: `${ICON_BUTTON_PADDING.large} ${ICON_BUTTON_PADDING.large}`
1276
- },
1277
- medium: {
1278
- ...sizeStyles4.warning.medium,
1279
- padding: `${ICON_BUTTON_PADDING.medium} ${ICON_BUTTON_PADDING.medium}`
1280
- },
1281
- small: {
1282
- ...sizeStyles4.warning.small,
1283
- padding: `${ICON_BUTTON_PADDING.small} ${ICON_BUTTON_PADDING.small}`
1284
- }
1285
- },
1286
- outlined: {
1287
- large: {
1288
- ...sizeStyles4.outlined.large,
1289
- padding: `${ICON_BUTTON_PADDING.large} ${ICON_BUTTON_PADDING.large}`
1290
- },
1291
- medium: {
1292
- ...sizeStyles4.outlined.medium,
1293
- padding: `${ICON_BUTTON_PADDING.medium} ${ICON_BUTTON_PADDING.medium}`
1294
- },
1295
- small: {
1296
- ...sizeStyles4.outlined.small,
1297
- padding: `${ICON_BUTTON_PADDING.small} ${ICON_BUTTON_PADDING.small}`
1298
- }
1299
- },
1300
- text: {
1301
- large: {
1302
- ...sizeStyles4.text.large,
1303
- padding: `${ICON_BUTTON_PADDING.large} ${ICON_BUTTON_PADDING.large}`
1304
- },
1305
- medium: {
1306
- ...sizeStyles4.text.medium,
1307
- padding: `${ICON_BUTTON_PADDING.medium} ${ICON_BUTTON_PADDING.medium}`
1308
- },
1309
- small: {
1310
- ...sizeStyles4.text.small,
1311
- padding: `${ICON_BUTTON_PADDING.small} ${ICON_BUTTON_PADDING.small}`
1312
- }
1313
- }
1314
- };
1315
- var propFilter5 = (prop) => !["$variant", "$size"].includes(prop) && isPropValid8__default.default(prop);
1316
- var StyledIconButton = styled18__default.default("button", {
1317
- shouldForwardProp: propFilter5
1318
- })`
1319
- display: inline-flex;
1320
- justify-content: center;
1321
- align-items: center;
1322
- gap: 0;
1323
- width: fit-content;
1324
- height: fit-content;
1325
-
1326
- /* 기본 초기화 */
1327
- border: none;
1328
- outline: none;
1329
- text-align: center;
1330
- cursor: pointer;
1331
- white-space: nowrap;
1332
-
1333
- /* 애니메이션 */
1334
- transition:
1335
- background-color 0.2s ease,
1336
- color 0.2s ease,
1337
- border-color 0.2s ease,
1338
- opacity 0.2s ease;
1339
-
1340
- /* 사이즈 & 타이포그래피 (Button과 동일, padding만 변환) */
1341
- ${({ $variant, $size, theme: theme2 }) => {
1342
- const spec = iconButtonSizeStyles[$variant][$size];
1343
- const borderRadius = "borderRadius" in spec ? theme2.radius[spec.borderRadius] : "";
1344
- return `
1345
- ${theme2.typo[spec.typography]}
1346
- padding: ${spec.padding};
1347
- ${borderRadius ? `border-radius: ${borderRadius};` : ""}
1348
- `;
1349
- }}
1350
-
1351
- /* 색상 Variants (Button과 동일) */
1352
- ${({ $variant, theme: theme2 }) => {
1353
- if ($variant === "filled") {
1354
- return `
1355
- background-color: ${theme2.colors.bgAccent};
1356
- color: ${theme2.colors.bgWhite};
1357
-
1358
- &:hover:not(:disabled),
1359
- &:active:not(:disabled) {
1360
- background-color: ${theme2.colors.bgAccentDark};
1361
- color: ${theme2.colors.bgWhite};
1362
- }
1363
- `;
1364
- }
1365
- if ($variant === "warning") {
1366
- return `
1367
- background-color: ${theme2.colors.bgWarning};
1368
- color: ${theme2.colors.bgWhite};
1369
-
1370
- &:hover:not(:disabled),
1371
- &:active:not(:disabled) {
1372
- background-color: ${theme2.colors.bgWarningDark};
1373
- color: ${theme2.colors.bgWhite};
1374
- }
1375
- `;
1376
- }
1377
- if ($variant === "outlined") {
1378
- return `
1379
- background-color: ${theme2.colors.bgWhite};
1380
- border: 1px solid ${theme2.colors.lineDefault};
1381
- color: ${theme2.colors.textPrimary};
1382
-
1383
- /* Pressed & Hovered: bg-medium-gray */
1384
- &:hover:not(:disabled),
1385
- &:active:not(:disabled) {
1386
- background-color: ${theme2.colors.bgMediumGrey};
1387
- border: 1px solid ${theme2.colors.lineDefault};
1388
- color: ${theme2.colors.textPrimary};
1389
- }
1390
- `;
1391
- }
1392
- return `
1393
- background-color: transparent;
1394
- color: ${theme2.colors.textPrimary};
1395
-
1396
- &:hover:not(:disabled),
1397
- &:active:not(:disabled) {
1398
- background-color: ${theme2.colors.bgMediumGrey};
1399
- color: ${theme2.colors.textPrimary};
1400
- }
1401
- `;
1402
- }}
1403
-
1404
- /* Disabled 공통 처리 */
1405
- &:disabled {
1406
- opacity: 0.5;
1407
- cursor: not-allowed;
1408
- }
1409
- `;
1410
- var IconButton = react$1.forwardRef(
1411
- ({ variant = "filled", size = "medium", children, type = "button", ...props }, ref) => {
1412
- return /* @__PURE__ */ jsxRuntime.jsx(
1413
- StyledIconButton,
1414
- {
1415
- ref,
1416
- $variant: variant,
1417
- $size: size,
1418
- type,
1419
- ...props,
1420
- children
1421
- }
1422
- );
1423
- }
1424
- );
1425
- IconButton.displayName = "IconButton";
1426
- var PaginationContainer = styled18__default.default.div`
1427
- display: flex;
1428
- align-items: center;
1429
- gap: ${({ theme: theme2 }) => theme2.spacing[1]};
1430
- `;
1431
- var PaginationPages = styled18__default.default.div`
1432
- display: flex;
1433
- align-items: center;
1434
- gap: 0;
1435
- `;
1436
- var StyledPaginationButton = styled18__default.default("button", {
1437
- shouldForwardProp: (prop) => prop !== "$active" && isPropValid8__default.default(prop)
1438
- })`
1439
- display: inline-flex;
1440
- align-items: center;
1441
- justify-content: center;
1442
- min-width: 0;
1443
- padding: 8.5px;
1444
- border: none;
1445
- border-radius: ${({ theme: theme2 }) => theme2.radius.lg};
1446
- background-color: ${({ theme: theme2, $active }) => $active ? theme2.colors.bgMediumGrey : "transparent"};
1447
- cursor: pointer;
1448
- transition:
1449
- background-color 0.2s ease,
1450
- color 0.2s ease;
1451
-
1452
- .pagination-button-inner {
1453
- display: inline-flex;
1454
- align-items: center;
1455
- justify-content: center;
1456
- width: 23px;
1457
- height: 23px;
1458
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1459
- color: ${({ theme: theme2, $active }) => $active ? theme2.colors.textPrimary : theme2.colors.textTertiary};
1460
- }
1461
-
1462
- &:hover:not(:disabled) {
1463
- background-color: ${({ theme: theme2, $active }) => $active ? theme2.colors.bgMediumGrey : theme2.colors.bgLightGrey};
1464
- }
1465
-
1466
- &:disabled {
1467
- opacity: 0.5;
1468
- cursor: not-allowed;
1469
- pointer-events: none;
1470
- }
1471
- `;
1472
- var DOTS = "...";
1473
- var range = (start, end) => {
1474
- const length = end - start + 1;
1475
- return Array.from({ length }, (_, idx) => idx + start);
1476
- };
1477
- function Pagination({
1478
- currentPage,
1479
- totalPage,
1480
- onPageChange,
1481
- siblingCount = 1
1482
- }) {
1483
- const paginationRange = react$1.useMemo(() => {
1484
- if (totalPage <= 1) return [];
1485
- const totalPageNumbers = siblingCount + 5;
1486
- if (totalPageNumbers >= totalPage) {
1487
- return range(1, totalPage);
1488
- }
1489
- const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
1490
- const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPage);
1491
- const shouldShowLeftDots = leftSiblingIndex > 2;
1492
- const shouldShowRightDots = rightSiblingIndex < totalPage - 2;
1493
- const firstPageIndex = 1;
1494
- const lastPageIndex = totalPage;
1495
- if (!shouldShowLeftDots && shouldShowRightDots) {
1496
- const leftItemCount = 3 + 2 * siblingCount;
1497
- const leftRange = range(1, leftItemCount);
1498
- return [...leftRange, DOTS, totalPage];
1499
- }
1500
- if (shouldShowLeftDots && !shouldShowRightDots) {
1501
- const rightItemCount = 3 + 2 * siblingCount;
1502
- const rightRange = range(totalPage - rightItemCount + 1, totalPage);
1503
- return [firstPageIndex, DOTS, ...rightRange];
1504
- }
1505
- if (shouldShowLeftDots && shouldShowRightDots) {
1506
- const middleRange = range(leftSiblingIndex, rightSiblingIndex);
1507
- return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
1508
- }
1509
- return [];
1510
- }, [totalPage, currentPage, siblingCount]);
1511
- const handlePrevPage = () => {
1512
- if (currentPage > 1) {
1513
- onPageChange(currentPage - 1);
1514
- }
1515
- };
1516
- const handleNextPage = () => {
1517
- if (currentPage < totalPage) {
1518
- onPageChange(currentPage + 1);
1519
- }
1520
- };
1521
- if (currentPage === 0 || paginationRange.length < 2) {
1522
- return null;
1523
- }
1524
- return /* @__PURE__ */ jsxRuntime.jsxs(PaginationContainer, { children: [
1525
- /* @__PURE__ */ jsxRuntime.jsx(
1526
- IconButton,
1527
- {
1528
- type: "button",
1529
- variant: "text",
1530
- size: "small",
1531
- onClick: handlePrevPage,
1532
- disabled: currentPage === 1,
1533
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { size: 24 })
1534
- }
1535
- ),
1536
- /* @__PURE__ */ jsxRuntime.jsx(PaginationPages, { children: paginationRange.map((pageNumber, index) => {
1537
- if (pageNumber === DOTS) {
1538
- return /* @__PURE__ */ jsxRuntime.jsx(
1539
- IconButton,
1540
- {
1541
- type: "button",
1542
- variant: "text",
1543
- size: "small",
1544
- disabled: true,
1545
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ellipsis, { size: 24, strokeWidth: 1.5 })
1546
- },
1547
- `dots-${index}`
1548
- );
1549
- }
1550
- const isCurrent = pageNumber === currentPage;
1551
- return /* @__PURE__ */ jsxRuntime.jsx(
1552
- StyledPaginationButton,
1553
- {
1554
- type: "button",
1555
- $active: isCurrent,
1556
- onClick: () => onPageChange(pageNumber),
1557
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pagination-button-inner", children: pageNumber })
1558
- },
1559
- pageNumber
1560
- );
1561
- }) }),
1562
- /* @__PURE__ */ jsxRuntime.jsx(
1563
- IconButton,
1564
- {
1565
- type: "button",
1566
- variant: "text",
1567
- size: "small",
1568
- onClick: handleNextPage,
1569
- disabled: currentPage === totalPage,
1570
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { size: 24 })
1571
- }
1572
- )
1573
- ] });
1574
- }
1575
- var StyledCheckbox = styled18__default.default(CheckboxPrimitive__namespace.Root)`
1576
- width: 20px;
1577
- height: 20px;
1578
- border-radius: ${({ theme: theme2 }) => theme2.radius.sm};
1579
- border: 1px solid ${({ theme: theme2 }) => theme2.colors.lineDefault};
1580
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1581
- display: flex;
1582
- align-items: center;
1583
- justify-content: center;
1584
- cursor: pointer;
1585
- transition: all 0.2s ease;
1586
-
1587
- &:hover {
1588
- border-color: ${({ theme: theme2 }) => theme2.colors.lineAccent};
1589
- }
1590
-
1591
- &[data-state='checked'] {
1592
- background-color: ${({ theme: theme2 }) => theme2.colors.bgAccent};
1593
- border-color: ${({ theme: theme2 }) => theme2.colors.bgAccent};
1594
- }
1595
-
1596
- &:disabled {
1597
- opacity: 0.5;
1598
- cursor: not-allowed;
1599
- }
1600
- `;
1601
- var StyledIndicator = styled18__default.default(CheckboxPrimitive__namespace.Indicator)`
1602
- color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1603
- display: flex;
1604
- align-items: center;
1605
- justify-content: center;
1606
- `;
1607
- var CheckboxContainer = styled18__default.default.div`
1608
- display: flex;
1609
- align-items: center;
1610
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1611
- `;
1612
- var Label = styled18__default.default.label`
1613
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1614
- color: ${({ theme: theme2, $disabled }) => $disabled ? theme2.colors.textDisabled : theme2.colors.textPrimary};
1615
- cursor: ${({ $disabled }) => $disabled ? "not-allowed" : "pointer"};
1616
- user-select: none;
1617
- `;
1618
- var Checkbox = react$1.forwardRef(({ label, disabled, id, ...props }, ref) => {
1619
- const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1620
- return /* @__PURE__ */ jsxRuntime.jsxs(CheckboxContainer, { children: [
1621
- /* @__PURE__ */ jsxRuntime.jsx(StyledCheckbox, { ref, id: checkboxId, disabled, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(StyledIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 16, strokeWidth: 3 }) }) }),
1622
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: checkboxId, $disabled: disabled, children: label })
1623
- ] });
1624
- });
1625
- Checkbox.displayName = "Checkbox";
1626
- var StyledRadioGroup = styled18__default.default(RadioGroupPrimitive__namespace.Root)`
1627
- display: flex;
1628
- flex-direction: column;
1629
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1630
- `;
1631
- var RadioItem = styled18__default.default.div`
1632
- display: flex;
1633
- align-items: center;
1634
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1635
- `;
1636
- var StyledRadioButton = styled18__default.default(RadioGroupPrimitive__namespace.Item)`
1637
- width: 20px;
1638
- height: 20px;
1639
- border-radius: ${({ theme: theme2 }) => theme2.radius.full};
1640
- border: 1px solid ${({ theme: theme2 }) => theme2.colors.lineDefault};
1641
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1642
- display: flex;
1643
- align-items: center;
1644
- justify-content: center;
1645
- cursor: pointer;
1646
- transition: all 0.2s ease;
1647
-
1648
- &:hover {
1649
- border-color: ${({ theme: theme2 }) => theme2.colors.lineAccent};
1650
- }
1651
-
1652
- &[data-state='checked'] {
1653
- border-color: ${({ theme: theme2 }) => theme2.colors.bgAccent};
1654
- }
1655
-
1656
- &:disabled {
1657
- opacity: 0.5;
1658
- cursor: not-allowed;
1659
- }
1660
- `;
1661
- var StyledIndicator2 = styled18__default.default(RadioGroupPrimitive__namespace.Indicator)`
1662
- width: 10px;
1663
- height: 10px;
1664
- border-radius: ${({ theme: theme2 }) => theme2.radius.full};
1665
- background-color: ${({ theme: theme2 }) => theme2.colors.bgAccent};
1666
- `;
1667
- var Label2 = styled18__default.default.label`
1668
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1669
- color: ${({ theme: theme2, $disabled }) => $disabled ? theme2.colors.textDisabled : theme2.colors.textPrimary};
1670
- cursor: ${({ $disabled }) => $disabled ? "not-allowed" : "pointer"};
1671
- user-select: none;
1672
- `;
1673
- var RadioButton = react$1.forwardRef(({ options, ...props }, ref) => {
1674
- return /* @__PURE__ */ jsxRuntime.jsx(StyledRadioGroup, { ref, ...props, children: options.map((option) => {
1675
- const radioId = `radio-${option.value}`;
1676
- return /* @__PURE__ */ jsxRuntime.jsxs(RadioItem, { children: [
1677
- /* @__PURE__ */ jsxRuntime.jsx(
1678
- StyledRadioButton,
1679
- {
1680
- value: option.value,
1681
- id: radioId,
1682
- disabled: option.disabled,
1683
- children: /* @__PURE__ */ jsxRuntime.jsx(StyledIndicator2, {})
1684
- }
1685
- ),
1686
- /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: radioId, $disabled: option.disabled, children: option.label })
1687
- ] }, option.value);
1688
- }) });
1689
- });
1690
- RadioButton.displayName = "RadioButton";
1691
- var StyledMenuContent = styled18__default.default(DropdownMenu2__namespace.Content)`
1692
- min-width: 200px;
1693
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1694
- border-radius: ${({ theme: theme2 }) => theme2.radius.lg};
1695
- padding: ${({ theme: theme2 }) => theme2.spacing[1]};
1696
- box-shadow: ${({ theme: theme2 }) => theme2.shadows.lg};
1697
- z-index: 9999;
1698
-
1699
- &[data-state='open'] {
1700
- animation: fadeIn 200ms ease-out;
1701
- }
1702
-
1703
- @keyframes fadeIn {
1704
- from {
1705
- opacity: 0;
1706
- transform: translateY(-4px);
1707
- }
1708
- to {
1709
- opacity: 1;
1710
- transform: translateY(0);
1711
- }
1712
- }
1713
- `;
1714
- var StyledMenuItem = styled18__default.default(DropdownMenu2__namespace.Item)`
1715
- display: flex;
1716
- align-items: center;
1717
- justify-content: space-between;
1718
- padding: ${({ theme: theme2 }) => `${theme2.spacing[2]} ${theme2.spacing[3]}`};
1719
- border-radius: ${({ theme: theme2 }) => theme2.radius.md};
1720
- ${({ theme: theme2 }) => theme2.typo.Md_14}
1721
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
1722
- cursor: pointer;
1723
- outline: none;
1724
- user-select: none;
1725
- width: ${({ $width }) => $width ? typeof $width === "number" ? `${$width}px` : $width : "auto"};
1726
-
1727
- &:hover,
1728
- &:focus {
1729
- background-color: ${({ theme: theme2 }) => theme2.colors.bgMediumGrey};
1730
- }
1731
-
1732
- &[data-disabled] {
1733
- color: ${({ theme: theme2 }) => theme2.colors.textDisabled};
1734
- pointer-events: none;
1735
- }
1736
- `;
1737
- var MenuItemLeft = styled18__default.default.div`
1738
- display: flex;
1739
- align-items: center;
1740
- gap: ${({ theme: theme2 }) => theme2.spacing[2]};
1741
- `;
1742
- var MenuItemText = styled18__default.default.span``;
1743
- var MenuLeadingIcon = styled18__default.default.span`
1744
- display: flex;
1745
- align-items: center;
1746
- justify-content: center;
1747
- width: 20px;
1748
- height: 20px;
1749
- `;
1750
- var MenuTrailingIcon = styled18__default.default.span`
1751
- display: flex;
1752
- align-items: center;
1753
- justify-content: center;
1754
- width: 16px;
1755
- height: 16px;
1756
- color: ${({ theme: theme2 }) => theme2.colors.textTertiary};
1757
- `;
1758
- var Menu = DropdownMenu2__namespace.Root;
1759
- var MenuTrigger = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Trigger, { ref, ...props, asChild: true, children }));
1760
- MenuTrigger.displayName = "MenuTrigger";
1761
- var MenuContent = react$1.forwardRef(({ children, sideOffset = 5, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledMenuContent, { ref, sideOffset, ...props, children }) }));
1762
- MenuContent.displayName = "MenuContent";
1763
- var MenuItem = react$1.forwardRef(
1764
- ({ leadingIcon, trailingIcon, width, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(StyledMenuItem, { ref, $width: width, ...props, children: [
1765
- /* @__PURE__ */ jsxRuntime.jsxs(MenuItemLeft, { children: [
1766
- leadingIcon && /* @__PURE__ */ jsxRuntime.jsx(MenuLeadingIcon, { children: leadingIcon }),
1767
- /* @__PURE__ */ jsxRuntime.jsx(MenuItemText, { children })
1768
- ] }),
1769
- trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(MenuTrailingIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { size: 16 }) })
1770
- ] })
1771
- );
1772
- MenuItem.displayName = "MenuItem";
1773
- var StyledTooltipContent = styled18__default.default(TooltipPrimitive2__namespace.Content)`
1774
- background-color: ${({ theme: theme2 }) => theme2.colors.bgDarkGrey};
1775
- color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1776
- border-radius: ${({ theme: theme2 }) => theme2.radius.md};
1777
- padding: ${({ theme: theme2 }) => `${theme2.spacing[1]} ${theme2.spacing[2]}`};
1778
- ${({ theme: theme2 }) => theme2.typo.Md_12}
1779
- box-shadow: ${({ theme: theme2 }) => theme2.shadows.base};
1780
- z-index: 9999;
1781
- max-width: 300px;
1782
-
1783
- &[data-state='delayed-open'] {
1784
- animation: fadeIn 200ms ease-out;
1785
- }
1786
-
1787
- @keyframes fadeIn {
1788
- from {
1789
- opacity: 0;
1790
- transform: translateY(-2px);
1791
- }
1792
- to {
1793
- opacity: 1;
1794
- transform: translateY(0);
1795
- }
1796
- }
1797
- `;
1798
- var StyledArrow = styled18__default.default(TooltipPrimitive2__namespace.Arrow)`
1799
- fill: ${({ theme: theme2 }) => theme2.colors.bgDarkGrey};
1800
- `;
1801
- var TooltipProvider = react$1.forwardRef(
1802
- ({ children, delayDuration = 300, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive2__namespace.Provider, { delayDuration, ...props, children })
1803
- );
1804
- TooltipProvider.displayName = "TooltipProvider";
1805
- var Tooltip = TooltipPrimitive2__namespace.Root;
1806
- var TooltipTrigger = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive2__namespace.Trigger, { ref, ...props, asChild: true, children }));
1807
- TooltipTrigger.displayName = "TooltipTrigger";
1808
- var TooltipContent = react$1.forwardRef(
1809
- ({ children, sideOffset = 5, showArrow = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(StyledTooltipContent, { ref, sideOffset, ...props, children: [
1810
- children,
1811
- showArrow && /* @__PURE__ */ jsxRuntime.jsx(StyledArrow, {})
1812
- ] }) })
1813
- );
1814
- TooltipContent.displayName = "TooltipContent";
1815
- var itemSizeStyles = {
1816
- large: {
1817
- padding: "8.5px 17.5px",
1818
- typography: "Md_15"
1819
- },
1820
- small: {
1821
- padding: "3.5px 19.5px",
1822
- typography: "Md_14"
1823
- }
1824
- };
1825
- var rootPropFilter = (prop) => !["$size"].includes(prop) && isPropValid8__default.default(prop);
1826
- var StyledSegmentedControlRoot = styled18__default.default(
1827
- ToggleGroup__namespace.Root,
1828
- { shouldForwardProp: rootPropFilter }
1829
- )`
1830
- display: inline-flex;
1831
- padding: 4px;
1832
- border-radius: 12px;
1833
- background-color: ${({ theme: theme2 }) => theme2.colors.bgMediumGrey};
1834
- box-shadow: ${({ theme: theme2 }) => theme2.shadows.base};
1835
- width: fit-content;
1836
- `;
1837
- var itemPropFilter = (prop) => !["$size"].includes(prop) && isPropValid8__default.default(prop);
1838
- var StyledSegmentedControlItem = styled18__default.default(
1839
- ToggleGroup__namespace.Item,
1840
- { shouldForwardProp: itemPropFilter }
1841
- )`
1842
- display: inline-flex;
1843
- align-items: center;
1844
- justify-content: center;
1845
- border: none;
1846
- outline: none;
1847
- cursor: pointer;
1848
- border-radius: 12px;
1849
- white-space: nowrap;
1850
- font-family: inherit;
1851
- transition:
1852
- background-color 0.2s ease,
1853
- color 0.2s ease;
1854
-
1855
- ${({ $size, theme: theme2 }) => {
1856
- const spec = itemSizeStyles[$size];
1857
- return `
1858
- padding: ${spec.padding};
1859
- ${theme2.typo[spec.typography]}
1860
- `;
1861
- }}
1862
-
1863
- color: ${({ theme: theme2 }) => theme2.colors.textTertiary};
1864
- background-color: transparent;
1865
-
1866
- &[data-state='on'] {
1867
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
1868
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1869
- }
1870
-
1871
- &:hover:not([data-state='on']) {
1872
- color: ${({ theme: theme2 }) => theme2.colors.textSecondary};
1873
- }
1874
-
1875
- &:disabled {
1876
- cursor: not-allowed;
1877
- opacity: 0.5;
1878
- }
1879
- `;
1880
- var SegmentedControlSizeContext = react$1.createContext("large");
1881
- var SegmentedControlRoot = react$1.forwardRef(({ size = "large", children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SegmentedControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxRuntime.jsx(
1882
- StyledSegmentedControlRoot,
1883
- {
1884
- ref,
1885
- type: "single",
1886
- $size: size,
1887
- ...props,
1888
- children
1889
- }
1890
- ) }));
1891
- SegmentedControlRoot.displayName = "SegmentedControlRoot";
1892
- var SegmentedControlItem = react$1.forwardRef(({ children, ...props }, ref) => {
1893
- const size = react$1.useContext(SegmentedControlSizeContext);
1894
- return /* @__PURE__ */ jsxRuntime.jsx(StyledSegmentedControlItem, { ref, $size: size, ...props, children });
1895
- });
1896
- SegmentedControlItem.displayName = "SegmentedControlItem";
1897
- var propFilter6 = (prop) => isPropValid8__default.default(prop);
1898
- var StyledTabList = styled18__default.default(TabsPrimitive__namespace.List, {
1899
- shouldForwardProp: propFilter6
1900
- })`
1901
- display: flex;
1902
- border-bottom: 1px solid ${({ theme: theme2 }) => theme2.colors.lineDefault};
1903
- width: fit-content;
1904
- `;
1905
- var StyledTabTrigger = styled18__default.default(TabsPrimitive__namespace.Trigger, {
1906
- shouldForwardProp: propFilter6
1907
- })`
1908
- display: inline-flex;
1909
- align-items: center;
1910
- justify-content: center;
1911
- padding: 12px 16px;
1912
- border: none;
1913
- outline: none;
1914
- cursor: pointer;
1915
- background: transparent;
1916
- font-family: inherit;
1917
- ${({ theme: theme2 }) => theme2.typo.Sb_16}
1918
- color: ${({ theme: theme2 }) => theme2.colors.textTertiary};
1919
- position: relative;
1920
- transition: color 0.2s ease;
1921
-
1922
- &[data-state="active"] {
1923
- color: ${({ theme: theme2 }) => theme2.colors.textPrimary};
1924
- }
1925
-
1926
- &[data-state="active"]::after {
1927
- content: "";
1928
- position: absolute;
1929
- bottom: -1px;
1930
- left: 4px;
1931
- right: 4px;
1932
- height: 2px;
1933
- background-color: ${({ theme: theme2 }) => theme2.colors.bgBlack};
1934
- border-radius: 100px;
1935
- }
1936
-
1937
- &:hover:not([data-state="active"]) {
1938
- color: ${({ theme: theme2 }) => theme2.colors.textSecondary};
1939
- }
1940
-
1941
- &:disabled {
1942
- cursor: not-allowed;
1943
- opacity: 0.5;
1944
- }
1945
- `;
1946
- var StyledTabContent = styled18__default.default(TabsPrimitive__namespace.Content, {
1947
- shouldForwardProp: propFilter6
1948
- })`
1949
- outline: none;
1950
- `;
1951
- var TabRoot = react$1.forwardRef(
1952
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props, children })
1953
- );
1954
- TabRoot.displayName = "TabRoot";
1955
- var TabList = react$1.forwardRef(
1956
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTabList, { ref, ...props, children })
1957
- );
1958
- TabList.displayName = "TabList";
1959
- var TabTrigger = react$1.forwardRef(
1960
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTabTrigger, { ref, ...props, children })
1961
- );
1962
- TabTrigger.displayName = "TabTrigger";
1963
- var TabContent = react$1.forwardRef(
1964
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTabContent, { ref, ...props, children })
1965
- );
1966
- TabContent.displayName = "TabContent";
1967
- var propFilter7 = (prop) => isPropValid8__default.default(prop);
1968
- var StyledTableRoot = styled18__default.default("div", {
1969
- shouldForwardProp: propFilter7
1970
- })`
1971
- background-color: ${({ theme: theme2 }) => theme2.colors.bgWhite};
1972
- border-radius: ${({ theme: theme2 }) => theme2.radius.lg};
1973
- overflow: hidden;
1974
- width: fit-content;
1975
- `;
1976
- var StyledTable = styled18__default.default("table", {
1977
- shouldForwardProp: propFilter7
1978
- })`
1979
- width: 100%;
1980
- border-collapse: collapse;
1981
- `;
1982
- var StyledTableHeader = styled18__default.default("thead", {
1983
- shouldForwardProp: propFilter7
1984
- })``;
1985
- var StyledTableBody = styled18__default.default("tbody", {
1986
- shouldForwardProp: propFilter7
1987
- })``;
1988
- var StyledTableHeaderRow = styled18__default.default("tr", {
1989
- shouldForwardProp: propFilter7
1990
- })``;
1991
- var StyledTableBodyRow = styled18__default.default("tr", {
1992
- shouldForwardProp: propFilter7
1993
- })`
1994
- background: transparent;
1995
- border-radius: 0;
1996
- transition: background-color 0.2s ease;
1997
-
1998
- &:hover {
1999
- background-color: ${({ theme: theme2 }) => theme2.colors.bgLightGrey};
2000
- }
2001
- `;
2002
- var StyledTableHeaderCell = styled18__default.default("th", {
2003
- shouldForwardProp: propFilter7
2004
- })`
2005
- ${({ theme: theme2 }) => theme2.typo.Md_14}
2006
- color: ${({ theme: theme2 }) => theme2.colors.textSecondary};
2007
- height: 36px;
2008
- padding: 0 16px;
2009
- background-color: ${({ theme: theme2 }) => theme2.colors.bgMediumGrey};
2010
- border: none;
2011
- font-family: inherit;
2012
- text-align: left;
2013
- vertical-align: middle;
2014
-
2015
- &:first-of-type {
2016
- border-radius: ${({ theme: theme2 }) => theme2.radius.lg} 0 0
2017
- ${({ theme: theme2 }) => theme2.radius.lg};
2018
- }
2019
-
2020
- &:last-of-type {
2021
- border-radius: 0 ${({ theme: theme2 }) => theme2.radius.lg}
2022
- ${({ theme: theme2 }) => theme2.radius.lg} 0;
2023
- }
2024
- `;
2025
- var StyledTableBodyCell = styled18__default.default("td", {
2026
- shouldForwardProp: propFilter7
2027
- })`
2028
- height: 56px;
2029
- padding: 0 16px;
2030
- background: transparent;
2031
- border: none;
2032
- border-top: 1px solid ${({ theme: theme2 }) => theme2.colors.lineDefault};
2033
- border-radius: 0;
2034
- font-family: inherit;
2035
- text-align: left;
2036
- vertical-align: middle;
2037
-
2038
- tr:first-of-type & {
2039
- border-top: none;
2040
- }
2041
- `;
2042
- var TableRoot = react$1.forwardRef(
2043
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableRoot, { ref, ...props, children })
2044
- );
2045
- TableRoot.displayName = "TableRoot";
2046
- var Table = react$1.forwardRef(
2047
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTable, { ref, ...props, children })
2048
- );
2049
- Table.displayName = "Table";
2050
- var TableHeader = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableHeader, { ref, ...props, children }));
2051
- TableHeader.displayName = "TableHeader";
2052
- var TableBody = react$1.forwardRef(
2053
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableBody, { ref, ...props, children })
2054
- );
2055
- TableBody.displayName = "TableBody";
2056
- var TableHeaderRow = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableHeaderRow, { ref, ...props, children }));
2057
- TableHeaderRow.displayName = "TableHeaderRow";
2058
- var TableBodyRow = react$1.forwardRef(
2059
- ({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableBodyRow, { ref, ...props, children })
2060
- );
2061
- TableBodyRow.displayName = "TableBodyRow";
2062
- var TableHeaderCell = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableHeaderCell, { ref, ...props, children }));
2063
- TableHeaderCell.displayName = "TableHeaderCell";
2064
- var TableBodyCell = react$1.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledTableBodyCell, { ref, ...props, children }));
2065
- TableBodyCell.displayName = "TableBodyCell";
2066
- var dim = (v) => v === void 0 ? void 0 : typeof v === "number" ? `${v}px` : v;
2067
- var StyledSkeleton = styled18__default.default("span", {
2068
- shouldForwardProp: (prop) => ![
2069
- "$width",
2070
- "$minWidth",
2071
- "$maxWidth",
2072
- "$height",
2073
- "$minHeight",
2074
- "$maxHeight",
2075
- "$loading"
2076
- ].includes(prop) && isPropValid8__default.default(prop)
2077
- })`
2078
- display: inline-block;
2079
- position: relative;
2080
- border-radius: ${({ theme: theme2 }) => theme2.radius.sm};
2081
-
2082
- ${({ $width }) => $width !== void 0 && `width: ${dim($width)};`}
2083
- ${({ $minWidth }) => $minWidth !== void 0 && `min-width: ${dim($minWidth)};`}
2084
- ${({ $maxWidth }) => $maxWidth !== void 0 && `max-width: ${dim($maxWidth)};`}
2085
- ${({ $height }) => $height !== void 0 && `height: ${dim($height)};`}
2086
- ${({ $minHeight }) => $minHeight !== void 0 && `min-height: ${dim($minHeight)};`}
2087
- ${({ $maxHeight }) => $maxHeight !== void 0 && `max-height: ${dim($maxHeight)};`}
2088
-
2089
- ${({ $loading, theme: theme2 }) => $loading && `
2090
- background-color: ${theme2.colors.bgMediumGrey};
2091
- animation: skeleton-pulse 1.5s ease-in-out infinite;
2092
-
2093
- & > * {
2094
- visibility: hidden;
2095
- pointer-events: none;
2096
- }
2097
- `}
2098
-
2099
- ${({ $loading }) => !$loading && `
2100
- background-color: transparent;
2101
- `}
2102
-
2103
- @keyframes skeleton-pulse {
2104
- 0%,
2105
- 100% {
2106
- opacity: 1;
2107
- }
2108
- 50% {
2109
- opacity: 0.6;
2110
- }
2111
- }
2112
- `;
2113
- var Skeleton = react$1.forwardRef(
2114
- ({
2115
- loading = true,
2116
- children,
2117
- width,
2118
- minWidth,
2119
- maxWidth,
2120
- height,
2121
- minHeight,
2122
- maxHeight,
2123
- ...props
2124
- }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2125
- StyledSkeleton,
2126
- {
2127
- ref,
2128
- $loading: loading,
2129
- $width: width,
2130
- $minWidth: minWidth,
2131
- $maxWidth: maxWidth,
2132
- $height: height,
2133
- $minHeight: minHeight,
2134
- $maxHeight: maxHeight,
2135
- ...props,
2136
- children
2137
- }
2138
- )
2139
- );
2140
- Skeleton.displayName = "Skeleton";
2141
-
2142
- exports.Avatar = Avatar;
2143
- exports.Badge = Badge;
2144
- exports.BichonThemeProvider = BichonThemeProvider;
2145
- exports.Button = Button;
2146
- exports.ChatBubble = ChatBubble;
2147
- exports.Checkbox = Checkbox;
2148
- exports.Dialog = Dialog;
2149
- exports.Flex = Flex;
2150
- exports.IconButton = IconButton;
2151
- exports.Menu = Menu;
2152
- exports.MenuContent = MenuContent;
2153
- exports.MenuItem = MenuItem;
2154
- exports.MenuTrigger = MenuTrigger;
2155
- exports.Pagination = Pagination;
2156
- exports.Progress = Progress;
2157
- exports.RadioButton = RadioButton;
2158
- exports.SegmentedControlItem = SegmentedControlItem;
2159
- exports.SegmentedControlRoot = SegmentedControlRoot;
2160
- exports.Skeleton = Skeleton;
2161
- exports.TabContent = TabContent;
2162
- exports.TabList = TabList;
2163
- exports.TabRoot = TabRoot;
2164
- exports.TabTrigger = TabTrigger;
2165
- exports.Table = Table;
2166
- exports.TableBody = TableBody;
2167
- exports.TableBodyCell = TableBodyCell;
2168
- exports.TableBodyRow = TableBodyRow;
2169
- exports.TableHeader = TableHeader;
2170
- exports.TableHeaderCell = TableHeaderCell;
2171
- exports.TableHeaderRow = TableHeaderRow;
2172
- exports.TableRoot = TableRoot;
2173
- exports.TextField = TextField;
2174
- exports.ToastProvider = ToastProvider;
2175
- exports.Tooltip = Tooltip;
2176
- exports.TooltipContent = TooltipContent;
2177
- exports.TooltipProvider = TooltipProvider;
2178
- exports.TooltipTrigger = TooltipTrigger;
2179
- exports.colors = colors;
2180
- exports.componentSize = componentSize;
2181
- exports.radius = radius;
2182
- exports.semanticSpacing = semanticSpacing;
2183
- exports.shadows = shadows;
2184
- exports.spacing = spacing;
2185
- exports.typo = typo;
2186
- exports.useToast = useToast;