@uniai-fe/uds-primitives 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -3
- package/dist/styles.css +3571 -0
- package/package.json +20 -8
- package/src/components/badge/markup/Badge.tsx +10 -0
- package/src/components/badge/styles/index.scss +2 -2
- package/src/components/badge/types/index.ts +1 -1
- package/src/components/button/index.scss +3 -1
- package/src/components/button/index.tsx +9 -1
- package/src/components/button/markup/ButtonDefault.tsx +162 -0
- package/src/components/button/markup/ButtonRounded.tsx +48 -0
- package/src/components/button/markup/ButtonText.tsx +49 -0
- package/src/components/button/markup/index.ts +3 -0
- package/src/components/button/styles/{index.scss → button.scss} +148 -362
- package/src/components/button/styles/round-button.scss +56 -0
- package/src/components/button/styles/text-button.scss +96 -0
- package/src/components/button/types/index.ts +110 -35
- package/src/components/button/types/templates.ts +33 -0
- package/src/components/button/utils/index.ts +19 -19
- package/src/components/checkbox/markup/Checkbox.tsx +20 -2
- package/src/components/checkbox/types/checkbox.ts +16 -0
- package/src/components/chip/markup/Chip.tsx +8 -0
- package/src/components/dialog/markup/{confirm-dialog.tsx → ConfirmDialog.tsx} +23 -0
- package/src/components/dialog/markup/{notice-dialog.tsx → NoticeDialog.tsx} +18 -0
- package/src/components/dialog/markup/index.tsx +2 -2
- package/src/components/dialog/types/index.ts +43 -0
- package/src/components/drawer/markup/{drawer.tsx → Drawer.tsx} +58 -0
- package/src/components/drawer/markup/index.tsx +1 -1
- package/src/components/drawer/types/index.ts +24 -0
- package/src/components/input/markup/text/Base.tsx +32 -3
- package/src/components/input/markup/text/Identification.tsx +15 -2
- package/src/components/input/markup/text/Password.tsx +35 -2
- package/src/components/input/markup/text/Phone.tsx +38 -2
- package/src/components/input/markup/text/Search.tsx +30 -1
- package/src/components/input/styles/index.scss +6 -6
- package/src/components/input/types/index.ts +22 -1
- package/src/components/input/utils/index.ts +6 -0
- package/src/components/navigation/index.tsx +5 -0
- package/src/components/navigation/markup/mobile/BottomNavigation.tsx +11 -0
- package/src/components/navigation/types/index.ts +22 -0
- package/src/components/pagination/markup/Carousel.tsx +1 -0
- package/src/components/pagination/markup/Count.tsx +1 -0
- package/src/components/pagination/markup/Pagination.tsx +2 -0
- package/src/components/radio/markup/Radio.tsx +16 -2
- package/src/components/radio/markup/RadioCard.tsx +8 -0
- package/src/components/radio/markup/RadioCardGroup.tsx +8 -0
- package/src/components/radio/types/radio.ts +39 -0
- package/src/components/segmented-control/markup/SegmentedControl.tsx +12 -0
- package/src/components/segmented-control/types/index.ts +16 -0
- package/src/components/tab/markup/TabContent.tsx +5 -0
- package/src/components/tab/markup/TabList.tsx +19 -2
- package/src/components/tab/markup/TabRoot.tsx +50 -4
- package/src/components/tab/markup/TabTrigger.tsx +9 -1
- package/src/components/tab/styles/index.scss +28 -10
- package/src/components/tab/types/index.ts +10 -0
- package/src/components/tab/utils/tab-context.ts +8 -2
- package/src/index.scss +22 -1
- package/src/theme/ThemeProvider.tsx +2 -2
- package/styles.scss +1 -0
- package/src/components/button/markup/Button.tsx +0 -175
- package/src/components/button/markup/index.tsx +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use "@uniai-fe/uds-foundation/css";
|
|
2
2
|
@use "sass:map";
|
|
3
3
|
|
|
4
|
-
:
|
|
4
|
+
:root {
|
|
5
5
|
/* spacing */
|
|
6
6
|
--theme-button-gap-1: var(--spacing-gap-1);
|
|
7
7
|
--theme-button-gap-2: var(--spacing-gap-2);
|
|
@@ -15,6 +15,24 @@
|
|
|
15
15
|
--theme-button-padding-7: var(--spacing-padding-7);
|
|
16
16
|
--theme-button-padding-9: var(--spacing-padding-9);
|
|
17
17
|
--theme-button-min-width: var(--theme-size-small-2);
|
|
18
|
+
--theme-button-text-padding-block: var(--spacing-padding-4, 8px);
|
|
19
|
+
--theme-button-text-padding-inline-small: var(--spacing-padding-4, 8px);
|
|
20
|
+
--theme-button-text-padding-inline-medium: var(--spacing-padding-5, 12px);
|
|
21
|
+
--theme-button-text-padding-inline-large: var(--spacing-padding-5, 12px);
|
|
22
|
+
--theme-button-text-min-height-small: var(--theme-size-small-1, 20px);
|
|
23
|
+
--theme-button-text-min-height-medium: var(--theme-size-small-2, 24px);
|
|
24
|
+
--theme-button-text-min-height-large: var(--theme-size-small-3, 32px);
|
|
25
|
+
--theme-button-text-radius: var(--theme-radius-small, 4px);
|
|
26
|
+
--theme-button-round-padding-inline-small: var(--spacing-padding-5, 12px);
|
|
27
|
+
--theme-button-round-padding-inline-medium: var(--spacing-padding-6, 16px);
|
|
28
|
+
--theme-button-round-padding-inline-large: var(--spacing-padding-7, 20px);
|
|
29
|
+
--theme-button-round-padding-block: var(--spacing-padding-2, 4px);
|
|
30
|
+
--theme-button-round-min-height-small: var(--theme-size-small-2, 24px);
|
|
31
|
+
--theme-button-round-min-height-medium: var(--theme-size-small-3, 32px);
|
|
32
|
+
--theme-button-round-min-height-large: var(--theme-size-medium-1, 40px);
|
|
33
|
+
--theme-button-round-radius-small: var(--theme-radius-xlarge-2, 16px);
|
|
34
|
+
--theme-button-round-radius-medium: var(--theme-radius-xlarge-2, 16px);
|
|
35
|
+
--theme-button-round-radius-large: 30px;
|
|
18
36
|
|
|
19
37
|
/* size/radius */
|
|
20
38
|
--theme-button-size-small-1: var(--theme-size-small-1);
|
|
@@ -105,16 +123,8 @@
|
|
|
105
123
|
--theme-button-overlay-outlined-primary-bg: var(--color-blue-90);
|
|
106
124
|
--theme-button-overlay-outlined-secondary-bg: var(--color-cool-gray-95);
|
|
107
125
|
--theme-button-overlay-outlined-tertiary-bg: var(--color-cool-gray-95);
|
|
108
|
-
|
|
109
|
-
/* text-button backgrounds */
|
|
110
|
-
--theme-button-text-default-hover-bg: var(--color-tertiary-default);
|
|
111
|
-
--theme-button-text-default-pressed-bg: var(--color-tertiary-strong);
|
|
112
|
-
--theme-button-text-secondary-hover-bg: var(--color-bg-alternative-cool-gray);
|
|
113
|
-
--theme-button-text-secondary-pressed-bg: var(--color-secondary-strong);
|
|
114
|
-
--theme-button-text-tertiary-hover-bg: var(--color-bg-alternative-cool-gray);
|
|
115
|
-
--theme-button-text-tertiary-pressed-bg: var(--color-bg-surface-strong);
|
|
116
126
|
}
|
|
117
|
-
$button-
|
|
127
|
+
$button-priorities: (
|
|
118
128
|
primary: (
|
|
119
129
|
solid-bg: var(
|
|
120
130
|
--theme-button-color-primary-default,
|
|
@@ -130,6 +140,10 @@ $button-intents: (
|
|
|
130
140
|
--theme-button-color-primary-default,
|
|
131
141
|
var(--color-primary-default)
|
|
132
142
|
),
|
|
143
|
+
outline-foreground: var(
|
|
144
|
+
--theme-button-color-primary-default,
|
|
145
|
+
var(--color-primary-default)
|
|
146
|
+
),
|
|
133
147
|
outline-hover-bg: var(
|
|
134
148
|
--theme-button-color-primary-default,
|
|
135
149
|
var(--color-primary-default)
|
|
@@ -138,14 +152,6 @@ $button-intents: (
|
|
|
138
152
|
--theme-button-color-common-100,
|
|
139
153
|
var(--color-common-100)
|
|
140
154
|
),
|
|
141
|
-
text-color: var(
|
|
142
|
-
--theme-button-color-primary-default,
|
|
143
|
-
var(--color-primary-default)
|
|
144
|
-
),
|
|
145
|
-
text-hover-color: var(
|
|
146
|
-
--theme-button-color-primary-heavy,
|
|
147
|
-
var(--color-primary-heavy)
|
|
148
|
-
),
|
|
149
155
|
),
|
|
150
156
|
secondary: (
|
|
151
157
|
solid-bg: var(
|
|
@@ -162,21 +168,17 @@ $button-intents: (
|
|
|
162
168
|
--theme-button-color-cool-gray-90,
|
|
163
169
|
var(--color-cool-gray-90)
|
|
164
170
|
),
|
|
171
|
+
outline-foreground: var(
|
|
172
|
+
--theme-button-color-primary-default,
|
|
173
|
+
var(--color-primary-default)
|
|
174
|
+
),
|
|
165
175
|
outline-hover-bg: var(--theme-button-color-blue-90, var(--color-blue-90)),
|
|
166
176
|
outline-hover-foreground: var(
|
|
167
177
|
--theme-button-color-primary-heavy,
|
|
168
178
|
var(--color-primary-heavy)
|
|
169
179
|
),
|
|
170
|
-
text-color: var(
|
|
171
|
-
--theme-button-color-primary-default,
|
|
172
|
-
var(--color-primary-default)
|
|
173
|
-
),
|
|
174
|
-
text-hover-color: var(
|
|
175
|
-
--theme-button-color-primary-strong,
|
|
176
|
-
var(--color-primary-strong)
|
|
177
|
-
),
|
|
178
180
|
),
|
|
179
|
-
|
|
181
|
+
tertiary: (
|
|
180
182
|
solid-bg: var(
|
|
181
183
|
--theme-button-tertiary-solid-bg,
|
|
182
184
|
var(--color-bg-surface-neutral)
|
|
@@ -197,6 +199,10 @@ $button-intents: (
|
|
|
197
199
|
--theme-button-color-cool-gray-90,
|
|
198
200
|
var(--color-cool-gray-90)
|
|
199
201
|
),
|
|
202
|
+
outline-foreground: var(
|
|
203
|
+
--theme-button-color-cool-gray-10,
|
|
204
|
+
var(--color-cool-gray-10)
|
|
205
|
+
),
|
|
200
206
|
outline-hover-bg: var(
|
|
201
207
|
--theme-button-color-cool-gray-95,
|
|
202
208
|
var(--color-cool-gray-95)
|
|
@@ -205,38 +211,30 @@ $button-intents: (
|
|
|
205
211
|
--theme-button-color-neutral-base,
|
|
206
212
|
var(--color-neutral-20)
|
|
207
213
|
),
|
|
208
|
-
text-color: var(
|
|
209
|
-
--theme-button-color-cool-gray-10,
|
|
210
|
-
var(--color-cool-gray-10)
|
|
211
|
-
),
|
|
212
|
-
text-hover-color: var(
|
|
213
|
-
--theme-button-color-neutral-base,
|
|
214
|
-
var(--color-neutral-20)
|
|
215
|
-
),
|
|
216
214
|
),
|
|
217
215
|
);
|
|
218
216
|
|
|
219
|
-
@function
|
|
220
|
-
@return map.get(map.get($button-
|
|
217
|
+
@function priority-token($priority, $key) {
|
|
218
|
+
@return map.get(map.get($button-priorities, $priority), $key);
|
|
221
219
|
}
|
|
222
220
|
|
|
223
|
-
@mixin button-state-selector($
|
|
224
|
-
.button
|
|
221
|
+
@mixin button-state-selector($fill, $priority) {
|
|
222
|
+
.button.button-fill-#{$fill}.button-priority-#{$priority} {
|
|
225
223
|
@content;
|
|
226
224
|
}
|
|
227
225
|
}
|
|
228
226
|
|
|
229
227
|
@mixin button-overlay-state(
|
|
230
|
-
$
|
|
231
|
-
$
|
|
228
|
+
$fill,
|
|
229
|
+
$priority,
|
|
232
230
|
$bg,
|
|
233
231
|
$hover-opacity,
|
|
234
232
|
$pressed-opacity,
|
|
235
233
|
$border-color: null
|
|
236
234
|
) {
|
|
237
|
-
.button
|
|
238
|
-
&:hover:not(:disabled),
|
|
239
|
-
&[data-
|
|
235
|
+
.button.button-fill-#{$fill}.button-priority-#{$priority} {
|
|
236
|
+
&:hover:not(:disabled):not([aria-disabled="true"]),
|
|
237
|
+
&[data-user-action="hover"]:not(:disabled):not([aria-disabled="true"]) {
|
|
240
238
|
background-color: $bg;
|
|
241
239
|
@if $border-color == null {
|
|
242
240
|
border-color: $bg;
|
|
@@ -246,8 +244,8 @@ $button-intents: (
|
|
|
246
244
|
box-shadow: inset 0 0 0 999px rgba(255, 255, 255, $hover-opacity);
|
|
247
245
|
}
|
|
248
246
|
|
|
249
|
-
&:active:not(:disabled),
|
|
250
|
-
&[data-
|
|
247
|
+
&:active:not(:disabled):not([aria-disabled="true"]),
|
|
248
|
+
&[data-user-action="pressed"]:not(:disabled):not([aria-disabled="true"]) {
|
|
251
249
|
background-color: $bg;
|
|
252
250
|
@if $border-color == null {
|
|
253
251
|
border-color: $bg;
|
|
@@ -259,7 +257,7 @@ $button-intents: (
|
|
|
259
257
|
}
|
|
260
258
|
}
|
|
261
259
|
|
|
262
|
-
/*
|
|
260
|
+
/* Primitives 버튼 공통 스타일 */
|
|
263
261
|
.button {
|
|
264
262
|
display: flex;
|
|
265
263
|
align-items: center;
|
|
@@ -304,42 +302,35 @@ $button-intents: (
|
|
|
304
302
|
--theme-button-font-body-medium-letter-spacing,
|
|
305
303
|
var(--font-body-medium-letter-spacing, 0px)
|
|
306
304
|
);
|
|
307
|
-
/* Radix Theme pressed filter를 비활성화해 상태 색상이 그대로 노출되도록 한다. */
|
|
308
|
-
--base-button-solid-active-filter: none;
|
|
309
|
-
--base-button-solid-high-contrast-hover-filter: none;
|
|
310
|
-
--base-button-solid-high-contrast-active-filter: none;
|
|
311
|
-
--base-button-classic-active-filter: none;
|
|
312
|
-
--base-button-classic-high-contrast-hover-filter: none;
|
|
313
|
-
--base-button-classic-high-contrast-active-filter: none;
|
|
314
305
|
filter: none;
|
|
315
306
|
cursor: pointer;
|
|
316
307
|
}
|
|
317
308
|
|
|
318
|
-
.button
|
|
309
|
+
.button.button-block {
|
|
319
310
|
width: 100%;
|
|
320
311
|
}
|
|
321
312
|
|
|
322
|
-
.button
|
|
313
|
+
.button[aria-busy="true"] {
|
|
323
314
|
pointer-events: none;
|
|
324
315
|
cursor: progress;
|
|
325
316
|
}
|
|
326
317
|
|
|
327
318
|
.button-icon,
|
|
328
319
|
.button-label,
|
|
329
|
-
.button-
|
|
330
|
-
.button-
|
|
320
|
+
.button-left,
|
|
321
|
+
.button-right {
|
|
331
322
|
display: inline-flex;
|
|
332
323
|
align-items: center;
|
|
333
324
|
justify-content: center;
|
|
334
325
|
}
|
|
335
326
|
|
|
336
|
-
@each $
|
|
337
|
-
@include button-state-selector("solid", $
|
|
338
|
-
background-color:
|
|
339
|
-
border-color:
|
|
340
|
-
color:
|
|
327
|
+
@each $priority, $tokens in $button-priorities {
|
|
328
|
+
@include button-state-selector("solid", $priority) {
|
|
329
|
+
background-color: priority-token($priority, solid-bg);
|
|
330
|
+
border-color: priority-token($priority, solid-bg);
|
|
331
|
+
color: priority-token($priority, solid-foreground);
|
|
341
332
|
&:disabled,
|
|
342
|
-
&[
|
|
333
|
+
&[aria-disabled="true"] {
|
|
343
334
|
background-color: var(
|
|
344
335
|
--theme-button-color-bg-surface-standard,
|
|
345
336
|
var(--color-bg-surface-standard)
|
|
@@ -354,26 +345,26 @@ $button-intents: (
|
|
|
354
345
|
);
|
|
355
346
|
}
|
|
356
347
|
|
|
357
|
-
&:hover:not(:disabled),
|
|
358
|
-
&[data-
|
|
359
|
-
background-color:
|
|
360
|
-
border-color:
|
|
348
|
+
&:hover:not(:disabled):not([aria-disabled="true"]),
|
|
349
|
+
&[data-user-action="hover"]:not(:disabled):not([aria-disabled="true"]) {
|
|
350
|
+
background-color: priority-token($priority, solid-hover);
|
|
351
|
+
border-color: priority-token($priority, solid-hover);
|
|
361
352
|
}
|
|
362
353
|
|
|
363
|
-
&:active:not(:disabled),
|
|
364
|
-
&[data-
|
|
365
|
-
background-color:
|
|
366
|
-
border-color:
|
|
354
|
+
&:active:not(:disabled):not([aria-disabled="true"]),
|
|
355
|
+
&[data-user-action="pressed"]:not(:disabled):not([aria-disabled="true"]) {
|
|
356
|
+
background-color: priority-token($priority, solid-active);
|
|
357
|
+
border-color: priority-token($priority, solid-active);
|
|
367
358
|
}
|
|
368
359
|
}
|
|
369
360
|
|
|
370
|
-
@include button-state-selector("outlined", $
|
|
361
|
+
@include button-state-selector("outlined", $priority) {
|
|
371
362
|
background-color: transparent;
|
|
372
|
-
color:
|
|
373
|
-
border-color:
|
|
363
|
+
color: priority-token($priority, outline-foreground);
|
|
364
|
+
border-color: priority-token($priority, outline-border);
|
|
374
365
|
|
|
375
366
|
&:disabled,
|
|
376
|
-
&[
|
|
367
|
+
&[aria-disabled="true"] {
|
|
377
368
|
background-color: var(
|
|
378
369
|
--theme-button-color-bg-surface-standard,
|
|
379
370
|
var(--color-bg-surface-standard)
|
|
@@ -388,71 +379,16 @@ $button-intents: (
|
|
|
388
379
|
);
|
|
389
380
|
}
|
|
390
381
|
|
|
391
|
-
&:hover:not(:disabled),
|
|
392
|
-
&[data-
|
|
393
|
-
background-color:
|
|
394
|
-
border-color:
|
|
382
|
+
&:hover:not(:disabled):not([aria-disabled="true"]),
|
|
383
|
+
&[data-user-action="hover"]:not(:disabled):not([aria-disabled="true"]) {
|
|
384
|
+
background-color: priority-token($priority, outline-hover-bg);
|
|
385
|
+
border-color: priority-token($priority, outline-border);
|
|
395
386
|
}
|
|
396
387
|
|
|
397
|
-
&:active:not(:disabled),
|
|
398
|
-
&[data-
|
|
399
|
-
background-color:
|
|
400
|
-
border-color:
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
@include button-state-selector("text-button", $intent) {
|
|
405
|
-
border-color: transparent;
|
|
406
|
-
background-color: transparent;
|
|
407
|
-
color: intent-token($intent, text-color);
|
|
408
|
-
|
|
409
|
-
$hover-bg: var(
|
|
410
|
-
--theme-button-text-default-hover-bg,
|
|
411
|
-
var(--color-tertiary-default)
|
|
412
|
-
);
|
|
413
|
-
$pressed-bg: var(
|
|
414
|
-
--theme-button-text-default-pressed-bg,
|
|
415
|
-
var(--color-tertiary-strong)
|
|
416
|
-
);
|
|
417
|
-
|
|
418
|
-
@if $intent == secondary {
|
|
419
|
-
$hover-bg: var(
|
|
420
|
-
--theme-button-text-secondary-hover-bg,
|
|
421
|
-
var(--color-bg-alternative-cool-gray)
|
|
422
|
-
);
|
|
423
|
-
$pressed-bg: var(
|
|
424
|
-
--theme-button-text-secondary-pressed-bg,
|
|
425
|
-
var(--color-secondary-strong)
|
|
426
|
-
);
|
|
427
|
-
} @else if $intent == teritary {
|
|
428
|
-
$hover-bg: var(
|
|
429
|
-
--theme-button-text-tertiary-hover-bg,
|
|
430
|
-
var(--color-bg-alternative-cool-gray)
|
|
431
|
-
);
|
|
432
|
-
$pressed-bg: var(
|
|
433
|
-
--theme-button-text-tertiary-pressed-bg,
|
|
434
|
-
var(--color-bg-surface-strong)
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
&:hover:not(:disabled),
|
|
439
|
-
&[data-simulated-state="hover"]:not(:disabled) {
|
|
440
|
-
background-color: $hover-bg;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
&:active:not(:disabled),
|
|
444
|
-
&[data-simulated-state="pressed"]:not(:disabled) {
|
|
445
|
-
background-color: $pressed-bg;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
&:disabled,
|
|
449
|
-
&[data-disabled="true"] {
|
|
450
|
-
background-color: transparent;
|
|
451
|
-
border-color: transparent;
|
|
452
|
-
color: var(
|
|
453
|
-
--theme-button-color-label-disabled,
|
|
454
|
-
var(--color-label-disabled)
|
|
455
|
-
);
|
|
388
|
+
&:active:not(:disabled):not([aria-disabled="true"]),
|
|
389
|
+
&[data-user-action="pressed"]:not(:disabled):not([aria-disabled="true"]) {
|
|
390
|
+
background-color: priority-token($priority, solid-bg);
|
|
391
|
+
border-color: priority-token($priority, outline-border);
|
|
456
392
|
}
|
|
457
393
|
}
|
|
458
394
|
}
|
|
@@ -460,11 +396,11 @@ $button-intents: (
|
|
|
460
396
|
$button-size-map: (
|
|
461
397
|
small: (
|
|
462
398
|
padding-inline: var(
|
|
463
|
-
--theme-button-padding-
|
|
464
|
-
var(--spacing-padding-
|
|
399
|
+
--theme-button-padding-6,
|
|
400
|
+
var(--spacing-padding-6, 24px)
|
|
465
401
|
),
|
|
466
|
-
padding-block: var(--theme-button-padding-
|
|
467
|
-
gap: var(--theme-button-gap-
|
|
402
|
+
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
403
|
+
gap: var(--theme-button-gap-2, var(--spacing-gap-2, 8px)),
|
|
468
404
|
font-size: var(
|
|
469
405
|
--theme-button-font-label-medium-size,
|
|
470
406
|
var(--font-label-medium-size, 14px)
|
|
@@ -481,14 +417,22 @@ $button-size-map: (
|
|
|
481
417
|
--theme-button-font-label-medium-letter-spacing,
|
|
482
418
|
var(--font-label-medium-letter-spacing, 0px)
|
|
483
419
|
),
|
|
420
|
+
min-height: var(
|
|
421
|
+
--theme-button-size-small-3,
|
|
422
|
+
var(--theme-size-small-3, 32px)
|
|
423
|
+
),
|
|
424
|
+
radius: var(
|
|
425
|
+
--theme-button-radius-medium-3,
|
|
426
|
+
var(--theme-radius-medium-3, 8px)
|
|
427
|
+
),
|
|
484
428
|
),
|
|
485
429
|
medium: (
|
|
486
430
|
padding-inline: var(
|
|
487
|
-
--theme-button-padding-
|
|
488
|
-
var(--spacing-padding-
|
|
431
|
+
--theme-button-padding-7,
|
|
432
|
+
var(--spacing-padding-7, 20px)
|
|
489
433
|
),
|
|
490
434
|
gap: var(--theme-button-gap-2, var(--spacing-gap-2, 8px)),
|
|
491
|
-
padding-block: var(--theme-button-padding-
|
|
435
|
+
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
492
436
|
font-size: var(
|
|
493
437
|
--theme-button-font-label-large-size,
|
|
494
438
|
var(--font-label-large-size, 16px)
|
|
@@ -505,14 +449,22 @@ $button-size-map: (
|
|
|
505
449
|
--theme-button-font-label-large-letter-spacing,
|
|
506
450
|
var(--font-label-large-letter-spacing, 0px)
|
|
507
451
|
),
|
|
452
|
+
min-height: var(
|
|
453
|
+
--theme-button-size-medium-1,
|
|
454
|
+
var(--theme-size-medium-1, 40px)
|
|
455
|
+
),
|
|
456
|
+
radius: var(
|
|
457
|
+
--theme-button-radius-medium-3,
|
|
458
|
+
var(--theme-radius-medium-3, 8px)
|
|
459
|
+
),
|
|
508
460
|
),
|
|
509
461
|
large: (
|
|
510
462
|
padding-inline: var(
|
|
511
|
-
--theme-button-padding-
|
|
512
|
-
var(--spacing-padding-
|
|
463
|
+
--theme-button-padding-9,
|
|
464
|
+
var(--spacing-padding-9, 28px)
|
|
513
465
|
),
|
|
514
466
|
gap: var(--theme-button-gap-3, var(--spacing-gap-3, 12px)),
|
|
515
|
-
padding-block: var(--theme-button-padding-
|
|
467
|
+
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
516
468
|
font-size: var(
|
|
517
469
|
--theme-button-font-body-medium-size,
|
|
518
470
|
var(--font-body-medium-size, 17px)
|
|
@@ -529,14 +481,22 @@ $button-size-map: (
|
|
|
529
481
|
--theme-button-font-body-medium-letter-spacing,
|
|
530
482
|
var(--font-body-medium-letter-spacing, 0px)
|
|
531
483
|
),
|
|
484
|
+
min-height: var(
|
|
485
|
+
--theme-button-size-medium-2,
|
|
486
|
+
var(--theme-size-medium-2, 48px)
|
|
487
|
+
),
|
|
488
|
+
radius: var(
|
|
489
|
+
--theme-button-radius-large-1,
|
|
490
|
+
var(--theme-radius-large-1, 12px)
|
|
491
|
+
),
|
|
532
492
|
),
|
|
533
493
|
xlarge: (
|
|
534
494
|
padding-inline: var(
|
|
535
|
-
--theme-button-padding-
|
|
536
|
-
var(--spacing-padding-
|
|
495
|
+
--theme-button-padding-9,
|
|
496
|
+
var(--spacing-padding-9, 28px)
|
|
537
497
|
),
|
|
538
498
|
gap: var(--theme-button-gap-3, var(--spacing-gap-3, 12px)),
|
|
539
|
-
padding-block: var(--theme-button-padding-
|
|
499
|
+
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
540
500
|
font-size: var(
|
|
541
501
|
--theme-button-font-body-large-size,
|
|
542
502
|
var(--font-body-large-size, 19px)
|
|
@@ -553,231 +513,61 @@ $button-size-map: (
|
|
|
553
513
|
--theme-button-font-body-large-letter-spacing,
|
|
554
514
|
var(--font-body-large-letter-spacing, 0px)
|
|
555
515
|
),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
$button-padding-default: (
|
|
560
|
-
small: (
|
|
561
|
-
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
562
|
-
padding-inline: var(
|
|
563
|
-
--theme-button-padding-6,
|
|
564
|
-
var(--spacing-padding-6, 24px)
|
|
565
|
-
),
|
|
566
|
-
),
|
|
567
|
-
medium: (
|
|
568
|
-
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
569
|
-
padding-inline: var(
|
|
570
|
-
--theme-button-padding-7,
|
|
571
|
-
var(--spacing-padding-7, 20px)
|
|
516
|
+
min-height: var(
|
|
517
|
+
--theme-button-size-medium-3,
|
|
518
|
+
var(--theme-size-medium-3, 56px)
|
|
572
519
|
),
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
padding-inline: var(
|
|
577
|
-
--theme-button-padding-9,
|
|
578
|
-
var(--spacing-padding-9, 28px)
|
|
579
|
-
),
|
|
580
|
-
),
|
|
581
|
-
xlarge: (
|
|
582
|
-
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
583
|
-
padding-inline: var(
|
|
584
|
-
--theme-button-padding-9,
|
|
585
|
-
var(--spacing-padding-9, 28px)
|
|
586
|
-
),
|
|
587
|
-
),
|
|
588
|
-
);
|
|
589
|
-
|
|
590
|
-
$button-padding-round: (
|
|
591
|
-
small: (
|
|
592
|
-
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
593
|
-
padding-inline: var(
|
|
594
|
-
--theme-button-padding-5,
|
|
595
|
-
var(--spacing-padding-5, 20px)
|
|
596
|
-
),
|
|
597
|
-
),
|
|
598
|
-
medium: (
|
|
599
|
-
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
600
|
-
padding-inline: var(
|
|
601
|
-
--theme-button-padding-6,
|
|
602
|
-
var(--spacing-padding-6, 24px)
|
|
603
|
-
),
|
|
604
|
-
),
|
|
605
|
-
large: (
|
|
606
|
-
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
607
|
-
padding-inline: var(
|
|
608
|
-
--theme-button-padding-7,
|
|
609
|
-
var(--spacing-padding-7, 20px)
|
|
610
|
-
),
|
|
611
|
-
),
|
|
612
|
-
);
|
|
613
|
-
|
|
614
|
-
$button-padding-text: (
|
|
615
|
-
small: (
|
|
616
|
-
padding-block: var(--theme-button-padding-4, var(--spacing-padding-4, 8px)),
|
|
617
|
-
padding-inline: var(--theme-button-padding-4, var(--spacing-padding-4, 8px)),
|
|
618
|
-
),
|
|
619
|
-
medium: (
|
|
620
|
-
padding-block: var(--theme-button-padding-4, var(--spacing-padding-4, 8px)),
|
|
621
|
-
padding-inline: var(
|
|
622
|
-
--theme-button-padding-5,
|
|
623
|
-
var(--spacing-padding-5, 12px)
|
|
624
|
-
),
|
|
625
|
-
),
|
|
626
|
-
large: (
|
|
627
|
-
padding-block: var(--theme-button-padding-4, var(--spacing-padding-4, 8px)),
|
|
628
|
-
padding-inline: var(
|
|
629
|
-
--theme-button-padding-5,
|
|
630
|
-
var(--spacing-padding-5, 12px)
|
|
520
|
+
radius: var(
|
|
521
|
+
--theme-button-radius-large-2,
|
|
522
|
+
var(--theme-radius-large-2, 16px)
|
|
631
523
|
),
|
|
632
524
|
),
|
|
633
525
|
);
|
|
634
526
|
|
|
635
527
|
@each $size, $tokens in $button-size-map {
|
|
636
|
-
.button
|
|
528
|
+
.button.button-size-#{$size} {
|
|
637
529
|
padding-inline: map.get($tokens, padding-inline);
|
|
638
530
|
gap: map.get($tokens, gap);
|
|
639
531
|
padding-block: map.get($tokens, padding-block);
|
|
640
532
|
font-size: map.get($tokens, font-size);
|
|
641
|
-
font-weight:
|
|
533
|
+
font-weight: map.get($tokens, font-weight);
|
|
642
534
|
line-height: map.get($tokens, line-height);
|
|
643
535
|
letter-spacing: map.get($tokens, letter-spacing);
|
|
536
|
+
min-height: map.get($tokens, min-height);
|
|
537
|
+
border-radius: map.get($tokens, radius);
|
|
644
538
|
}
|
|
645
539
|
}
|
|
646
540
|
|
|
647
|
-
@
|
|
648
|
-
|
|
649
|
-
.
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
.button:where([data-shape="#{$shape}"][data-size="#{$size}"]) {
|
|
659
|
-
padding-block: map.get($tokens, padding-block);
|
|
660
|
-
padding-inline: map.get($tokens, padding-inline);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
@include button-padding-variant("solid", $button-padding-default);
|
|
666
|
-
@include button-padding-variant("outlined", $button-padding-default);
|
|
667
|
-
@include button-padding-variant("text-button", $button-padding-text);
|
|
668
|
-
@include button-padding-shape("round", $button-padding-round);
|
|
669
|
-
|
|
670
|
-
$button-dimension-default: (
|
|
671
|
-
small: (
|
|
672
|
-
height: var(--theme-button-size-small-3, var(--theme-size-small-3, 32px)),
|
|
673
|
-
radius: var(
|
|
674
|
-
--theme-button-radius-medium-3,
|
|
675
|
-
var(--theme-radius-medium-3, 8px)
|
|
676
|
-
),
|
|
677
|
-
),
|
|
678
|
-
medium: (
|
|
679
|
-
height: var(--theme-button-size-medium-1, var(--theme-size-medium-1, 40px)),
|
|
680
|
-
radius: var(
|
|
681
|
-
--theme-button-radius-medium-3,
|
|
682
|
-
var(--theme-radius-medium-3, 8px)
|
|
683
|
-
),
|
|
684
|
-
),
|
|
685
|
-
large: (
|
|
686
|
-
height: var(--theme-button-size-medium-2, var(--theme-size-medium-2, 48px)),
|
|
687
|
-
radius: var(
|
|
688
|
-
--theme-button-radius-large-1,
|
|
689
|
-
var(--theme-radius-large-1, 12px)
|
|
690
|
-
),
|
|
691
|
-
),
|
|
692
|
-
xlarge: (
|
|
693
|
-
height: var(--theme-button-size-medium-3, var(--theme-size-medium-3, 56px)),
|
|
694
|
-
radius: var(
|
|
695
|
-
--theme-button-radius-large-2,
|
|
696
|
-
var(--theme-radius-large-2, 16px)
|
|
697
|
-
),
|
|
698
|
-
),
|
|
699
|
-
);
|
|
700
|
-
|
|
701
|
-
$button-dimension-round: (
|
|
702
|
-
small: (
|
|
703
|
-
height: var(--theme-button-size-small-2, var(--theme-size-small-2, 24px)),
|
|
704
|
-
radius: var(--theme-button-size-small-2, var(--theme-size-small-2, 24px)),
|
|
705
|
-
),
|
|
706
|
-
medium: (
|
|
707
|
-
height: var(--theme-button-size-small-3, var(--theme-size-small-3, 32px)),
|
|
708
|
-
radius: var(--theme-button-size-small-3, var(--theme-size-small-3, 32px)),
|
|
709
|
-
),
|
|
710
|
-
large: (
|
|
711
|
-
height: var(--theme-button-size-medium-1, var(--theme-size-medium-1, 40px)),
|
|
712
|
-
radius: var(--theme-button-size-medium-1, var(--theme-size-medium-1, 40px)),
|
|
713
|
-
),
|
|
714
|
-
);
|
|
715
|
-
|
|
716
|
-
$button-dimension-text: (
|
|
717
|
-
small: (
|
|
718
|
-
height: var(--theme-button-size-small-1, var(--theme-size-small-1, 20px)),
|
|
719
|
-
radius: var(
|
|
720
|
-
--theme-button-radius-medium-3,
|
|
721
|
-
var(--theme-radius-medium-3, 8px)
|
|
722
|
-
),
|
|
723
|
-
),
|
|
724
|
-
medium: (
|
|
725
|
-
height: var(--theme-button-size-small-2, var(--theme-size-small-2, 24px)),
|
|
726
|
-
radius: var(
|
|
727
|
-
--theme-button-radius-medium-3,
|
|
728
|
-
var(--theme-radius-medium-3, 8px)
|
|
729
|
-
),
|
|
730
|
-
),
|
|
731
|
-
large: (
|
|
732
|
-
height: var(--theme-button-size-small-3, var(--theme-size-small-3, 32px)),
|
|
733
|
-
radius: var(
|
|
734
|
-
--theme-button-radius-medium-3,
|
|
735
|
-
var(--theme-radius-medium-3, 8px)
|
|
736
|
-
),
|
|
737
|
-
),
|
|
738
|
-
);
|
|
739
|
-
|
|
740
|
-
@mixin button-dimension-variant($variant, $map) {
|
|
741
|
-
@each $size, $tokens in $map {
|
|
742
|
-
.button:where([data-variant="#{$variant}"][data-size="#{$size}"]) {
|
|
743
|
-
height: map.get($tokens, height);
|
|
744
|
-
border-radius: map.get($tokens, radius);
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
@mixin button-dimension-shape($shape, $map) {
|
|
750
|
-
@each $size, $tokens in $map {
|
|
751
|
-
.button:where([data-shape="#{$shape}"][data-size="#{$size}"]) {
|
|
752
|
-
height: map.get($tokens, height);
|
|
753
|
-
border-radius: map.get($tokens, radius);
|
|
754
|
-
}
|
|
541
|
+
@each $size, $tokens in $button-size-map {
|
|
542
|
+
.button.button-size-#{$size} {
|
|
543
|
+
padding-inline: map.get($tokens, padding-inline);
|
|
544
|
+
gap: map.get($tokens, gap);
|
|
545
|
+
padding-block: map.get($tokens, padding-block);
|
|
546
|
+
font-size: map.get($tokens, font-size);
|
|
547
|
+
font-weight: map.get($tokens, font-weight);
|
|
548
|
+
line-height: map.get($tokens, line-height);
|
|
549
|
+
letter-spacing: map.get($tokens, letter-spacing);
|
|
550
|
+
min-height: map.get($tokens, min-height);
|
|
551
|
+
border-radius: map.get($tokens, radius);
|
|
755
552
|
}
|
|
756
553
|
}
|
|
757
554
|
|
|
758
|
-
|
|
759
|
-
@include button-dimension-variant("outlined", $button-dimension-default);
|
|
760
|
-
@include button-dimension-variant("text-button", $button-dimension-text);
|
|
761
|
-
@include button-dimension-shape("round", $button-dimension-round);
|
|
762
|
-
|
|
763
|
-
/* Radix Themes outline variant는 box-shadow가 default로 들어가므로 제거 */
|
|
764
|
-
.button.rt-variant-outline,
|
|
765
|
-
.button:where([data-variant="outlined"]) {
|
|
555
|
+
.button.button-fill-outlined {
|
|
766
556
|
box-shadow: none;
|
|
767
557
|
}
|
|
768
558
|
|
|
769
559
|
@include button-overlay-state("solid", "secondary", transparent, 0, 0);
|
|
770
560
|
|
|
771
|
-
.button
|
|
772
|
-
&:hover:not(:disabled),
|
|
773
|
-
&[data-
|
|
561
|
+
.button.button-fill-solid.button-priority-secondary {
|
|
562
|
+
&:hover:not(:disabled):not([aria-disabled="true"]),
|
|
563
|
+
&[data-user-action="hover"]:not(:disabled):not([aria-disabled="true"]) {
|
|
774
564
|
background-color: var(--theme-button-secondary-solid-hover-bg, #dbe9ff);
|
|
775
565
|
border-color: var(--theme-button-secondary-solid-hover-bg, #dbe9ff);
|
|
776
566
|
box-shadow: none;
|
|
777
567
|
}
|
|
778
568
|
|
|
779
|
-
&:active:not(:disabled),
|
|
780
|
-
&[data-
|
|
569
|
+
&:active:not(:disabled):not([aria-disabled="true"]),
|
|
570
|
+
&[data-user-action="pressed"]:not(:disabled):not([aria-disabled="true"]) {
|
|
781
571
|
background-color: var(--theme-button-secondary-solid-pressed-bg, #ccdeff);
|
|
782
572
|
border-color: var(--theme-button-secondary-solid-pressed-bg, #ccdeff);
|
|
783
573
|
box-shadow: none;
|
|
@@ -786,11 +576,11 @@ $button-dimension-text: (
|
|
|
786
576
|
|
|
787
577
|
@include button-overlay-state(
|
|
788
578
|
"solid",
|
|
789
|
-
"
|
|
579
|
+
"tertiary",
|
|
790
580
|
var(--color-border-standard-strong, var(--color-bg-surface-strong)),
|
|
791
581
|
0.68,
|
|
792
582
|
0.48,
|
|
793
|
-
|
|
583
|
+
priority-token(tertiary, solid-bg)
|
|
794
584
|
);
|
|
795
585
|
|
|
796
586
|
@include button-overlay-state(
|
|
@@ -799,7 +589,7 @@ $button-dimension-text: (
|
|
|
799
589
|
var(--theme-button-overlay-outlined-primary-bg, var(--color-blue-90)),
|
|
800
590
|
0.68,
|
|
801
591
|
0.28,
|
|
802
|
-
|
|
592
|
+
priority-token(primary, outline-border)
|
|
803
593
|
);
|
|
804
594
|
|
|
805
595
|
@include button-overlay-state(
|
|
@@ -808,20 +598,20 @@ $button-dimension-text: (
|
|
|
808
598
|
var(--theme-button-overlay-outlined-secondary-bg, var(--color-cool-gray-95)),
|
|
809
599
|
0.68,
|
|
810
600
|
0.28,
|
|
811
|
-
|
|
601
|
+
priority-token(secondary, outline-border)
|
|
812
602
|
);
|
|
813
603
|
|
|
814
604
|
@include button-overlay-state(
|
|
815
605
|
"outlined",
|
|
816
|
-
"
|
|
606
|
+
"tertiary",
|
|
817
607
|
var(--theme-button-overlay-outlined-tertiary-bg, var(--color-cool-gray-95)),
|
|
818
608
|
0.68,
|
|
819
609
|
0.28,
|
|
820
|
-
|
|
610
|
+
priority-token(tertiary, outline-border)
|
|
821
611
|
);
|
|
822
612
|
|
|
823
613
|
.button:disabled,
|
|
824
|
-
.button
|
|
614
|
+
.button[aria-disabled="true"] {
|
|
825
615
|
background-color: var(
|
|
826
616
|
--theme-button-color-bg-surface-standard,
|
|
827
617
|
var(--color-bg-surface-standard)
|
|
@@ -834,14 +624,10 @@ $button-dimension-text: (
|
|
|
834
624
|
cursor: not-allowed;
|
|
835
625
|
}
|
|
836
626
|
|
|
837
|
-
.button
|
|
838
|
-
border-radius: 9999px;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
.button:where([data-icon-slot="left"]) .button-label {
|
|
627
|
+
.button.button-icon-left .button-label {
|
|
842
628
|
margin-left: var(--theme-button-gap-1, var(--spacing-gap-1, 4px));
|
|
843
629
|
}
|
|
844
630
|
|
|
845
|
-
.button
|
|
631
|
+
.button.button-icon-right .button-label {
|
|
846
632
|
margin-right: var(--theme-button-gap-1, var(--spacing-gap-1, 4px));
|
|
847
633
|
}
|