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