@uniai-fe/uds-primitives 0.0.1
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 +63 -0
- package/package.json +85 -0
- package/src/components/alternate/hooks/index.ts +4 -0
- package/src/components/alternate/img/.gitkeep +0 -0
- package/src/components/alternate/index.scss +1 -0
- package/src/components/alternate/index.tsx +4 -0
- package/src/components/alternate/markup/index.tsx +4 -0
- package/src/components/alternate/styles/index.scss +3 -0
- package/src/components/alternate/types/index.ts +4 -0
- package/src/components/alternate/utils/index.ts +4 -0
- package/src/components/badge/hooks/index.ts +4 -0
- package/src/components/badge/img/.gitkeep +0 -0
- package/src/components/badge/index.scss +1 -0
- package/src/components/badge/index.tsx +6 -0
- package/src/components/badge/markup/Badge.tsx +51 -0
- package/src/components/badge/markup/index.tsx +1 -0
- package/src/components/badge/styles/index.scss +189 -0
- package/src/components/badge/types/index.ts +55 -0
- package/src/components/badge/utils/index.ts +21 -0
- package/src/components/button/hooks/index.ts +4 -0
- package/src/components/button/img/.gitkeep +0 -0
- package/src/components/button/index.scss +1 -0
- package/src/components/button/index.tsx +6 -0
- package/src/components/button/markup/Button.tsx +175 -0
- package/src/components/button/markup/index.tsx +1 -0
- package/src/components/button/styles/index.scss +847 -0
- package/src/components/button/types/index.ts +79 -0
- package/src/components/button/utils/index.ts +58 -0
- package/src/components/calendar/hooks/index.ts +4 -0
- package/src/components/calendar/img/.gitkeep +0 -0
- package/src/components/calendar/index.scss +1 -0
- package/src/components/calendar/index.tsx +4 -0
- package/src/components/calendar/markup/index.tsx +4 -0
- package/src/components/calendar/styles/index.scss +3 -0
- package/src/components/calendar/types/index.ts +4 -0
- package/src/components/calendar/utils/index.ts +4 -0
- package/src/components/checkbox/hooks/index.ts +4 -0
- package/src/components/checkbox/img/.gitkeep +0 -0
- package/src/components/checkbox/img/check-large.svg +3 -0
- package/src/components/checkbox/img/check-medium.svg +3 -0
- package/src/components/checkbox/img/check.svg +3 -0
- package/src/components/checkbox/index.scss +1 -0
- package/src/components/checkbox/index.tsx +4 -0
- package/src/components/checkbox/markup/Checkbox.tsx +127 -0
- package/src/components/checkbox/markup/index.ts +1 -0
- package/src/components/checkbox/styles/index.scss +164 -0
- package/src/components/checkbox/types/checkbox.ts +21 -0
- package/src/components/checkbox/types/index.ts +1 -0
- package/src/components/chip/hooks/index.ts +4 -0
- package/src/components/chip/img/.gitkeep +0 -0
- package/src/components/chip/img/remove.svg +3 -0
- package/src/components/chip/index.scss +1 -0
- package/src/components/chip/index.tsx +6 -0
- package/src/components/chip/markup/Chip.tsx +103 -0
- package/src/components/chip/markup/index.tsx +1 -0
- package/src/components/chip/styles/index.scss +140 -0
- package/src/components/chip/types/index.ts +52 -0
- package/src/components/chip/utils/index.ts +36 -0
- package/src/components/dialog/hooks/index.ts +4 -0
- package/src/components/dialog/img/.gitkeep +0 -0
- package/src/components/dialog/index.scss +1 -0
- package/src/components/dialog/index.tsx +3 -0
- package/src/components/dialog/markup/confirm-dialog.tsx +316 -0
- package/src/components/dialog/markup/index.tsx +4 -0
- package/src/components/dialog/markup/notice-dialog.tsx +191 -0
- package/src/components/dialog/styles/base.scss +153 -0
- package/src/components/dialog/styles/confirm.scss +58 -0
- package/src/components/dialog/styles/index.scss +3 -0
- package/src/components/dialog/styles/notice.scss +65 -0
- package/src/components/dialog/types/index.ts +70 -0
- package/src/components/dialog/utils/index.ts +4 -0
- package/src/components/drawer/hooks/index.ts +113 -0
- package/src/components/drawer/img/.gitkeep +0 -0
- package/src/components/drawer/img/close.svg +3 -0
- package/src/components/drawer/index.scss +1 -0
- package/src/components/drawer/index.tsx +3 -0
- package/src/components/drawer/markup/drawer.tsx +421 -0
- package/src/components/drawer/markup/index.tsx +3 -0
- package/src/components/drawer/styles/index.scss +232 -0
- package/src/components/drawer/types/index.ts +51 -0
- package/src/components/drawer/utils/context.ts +15 -0
- package/src/components/drawer/utils/index.tsx +77 -0
- package/src/components/dropdown/hooks/index.ts +4 -0
- package/src/components/dropdown/img/.gitkeep +0 -0
- package/src/components/dropdown/index.scss +1 -0
- package/src/components/dropdown/index.tsx +4 -0
- package/src/components/dropdown/markup/index.tsx +4 -0
- package/src/components/dropdown/styles/index.scss +3 -0
- package/src/components/dropdown/types/index.ts +4 -0
- package/src/components/dropdown/utils/index.ts +4 -0
- package/src/components/input/hooks/index.ts +4 -0
- package/src/components/input/img/.gitkeep +0 -0
- package/src/components/input/img/check-correct.svg +3 -0
- package/src/components/input/img/check-default.svg +3 -0
- package/src/components/input/img/check-incorrect.svg +3 -0
- package/src/components/input/img/error.svg +5 -0
- package/src/components/input/img/hide-off.svg +4 -0
- package/src/components/input/img/hide-on.svg +6 -0
- package/src/components/input/img/reset.svg +3 -0
- package/src/components/input/img/search.svg +4 -0
- package/src/components/input/img/success.svg +3 -0
- package/src/components/input/index.scss +1 -0
- package/src/components/input/index.tsx +6 -0
- package/src/components/input/markup/index.tsx +1 -0
- package/src/components/input/markup/text/Base.tsx +311 -0
- package/src/components/input/markup/text/Identification.tsx +145 -0
- package/src/components/input/markup/text/Password.tsx +71 -0
- package/src/components/input/markup/text/Phone.tsx +115 -0
- package/src/components/input/markup/text/Search.tsx +35 -0
- package/src/components/input/markup/text/index.ts +10 -0
- package/src/components/input/styles/index.scss +375 -0
- package/src/components/input/types/index.ts +56 -0
- package/src/components/input/utils/index.ts +54 -0
- package/src/components/label/hooks/index.ts +4 -0
- package/src/components/label/img/.gitkeep +0 -0
- package/src/components/label/index.scss +1 -0
- package/src/components/label/index.tsx +4 -0
- package/src/components/label/markup/index.tsx +4 -0
- package/src/components/label/styles/index.scss +3 -0
- package/src/components/label/types/index.ts +4 -0
- package/src/components/label/utils/index.ts +4 -0
- package/src/components/navigation/hooks/index.ts +4 -0
- package/src/components/navigation/img/.gitkeep +0 -0
- package/src/components/navigation/index.scss +1 -0
- package/src/components/navigation/index.tsx +8 -0
- package/src/components/navigation/markup/index.tsx +2 -0
- package/src/components/navigation/markup/mobile/BottomNavigation.tsx +127 -0
- package/src/components/navigation/markup/mobile/index.ts +1 -0
- package/src/components/navigation/markup/web/index.ts +4 -0
- package/src/components/navigation/styles/index.scss +133 -0
- package/src/components/navigation/types/index.ts +38 -0
- package/src/components/navigation/utils/index.ts +23 -0
- package/src/components/pagination/hooks/index.ts +4 -0
- package/src/components/pagination/img/.gitkeep +0 -0
- package/src/components/pagination/index.scss +1 -0
- package/src/components/pagination/index.tsx +6 -0
- package/src/components/pagination/markup/Carousel.tsx +76 -0
- package/src/components/pagination/markup/Count.tsx +54 -0
- package/src/components/pagination/markup/Pagination.tsx +83 -0
- package/src/components/pagination/markup/index.tsx +3 -0
- package/src/components/pagination/styles/index.scss +155 -0
- package/src/components/pagination/types/index.ts +68 -0
- package/src/components/pagination/utils/index.ts +58 -0
- package/src/components/radio/hooks/index.ts +4 -0
- package/src/components/radio/img/.gitkeep +0 -0
- package/src/components/radio/index.scss +1 -0
- package/src/components/radio/index.tsx +7 -0
- package/src/components/radio/markup/Radio.tsx +121 -0
- package/src/components/radio/markup/RadioCard.tsx +68 -0
- package/src/components/radio/markup/RadioCardGroup.tsx +75 -0
- package/src/components/radio/markup/index.tsx +3 -0
- package/src/components/radio/styles/index.scss +252 -0
- package/src/components/radio/types/index.ts +1 -0
- package/src/components/radio/types/radio.ts +63 -0
- package/src/components/radio/utils/index.ts +4 -0
- package/src/components/scrollbar/hooks/index.ts +4 -0
- package/src/components/scrollbar/img/.gitkeep +0 -0
- package/src/components/scrollbar/index.scss +1 -0
- package/src/components/scrollbar/index.tsx +4 -0
- package/src/components/scrollbar/markup/index.tsx +4 -0
- package/src/components/scrollbar/styles/index.scss +3 -0
- package/src/components/scrollbar/types/index.ts +4 -0
- package/src/components/scrollbar/utils/index.ts +4 -0
- package/src/components/segmented-control/index.scss +1 -0
- package/src/components/segmented-control/index.tsx +7 -0
- package/src/components/segmented-control/markup/SegmentedControl.tsx +117 -0
- package/src/components/segmented-control/markup/index.ts +1 -0
- package/src/components/segmented-control/styles/index.scss +113 -0
- package/src/components/segmented-control/types/index.ts +22 -0
- package/src/components/select/hooks/index.ts +4 -0
- package/src/components/select/img/.gitkeep +0 -0
- package/src/components/select/index.scss +1 -0
- package/src/components/select/index.tsx +4 -0
- package/src/components/select/markup/index.tsx +4 -0
- package/src/components/select/styles/index.scss +3 -0
- package/src/components/select/types/index.ts +4 -0
- package/src/components/select/utils/index.ts +4 -0
- package/src/components/spinner/hooks/index.ts +4 -0
- package/src/components/spinner/img/.gitkeep +0 -0
- package/src/components/spinner/index.scss +1 -0
- package/src/components/spinner/index.tsx +4 -0
- package/src/components/spinner/markup/index.tsx +4 -0
- package/src/components/spinner/styles/index.scss +3 -0
- package/src/components/spinner/types/index.ts +4 -0
- package/src/components/spinner/utils/index.ts +4 -0
- package/src/components/tab/hooks/index.ts +4 -0
- package/src/components/tab/img/.gitkeep +0 -0
- package/src/components/tab/index.scss +1 -0
- package/src/components/tab/index.tsx +6 -0
- package/src/components/tab/markup/TabContent.tsx +29 -0
- package/src/components/tab/markup/TabList.tsx +60 -0
- package/src/components/tab/markup/TabRoot.tsx +74 -0
- package/src/components/tab/markup/TabTrigger.tsx +47 -0
- package/src/components/tab/markup/index.tsx +4 -0
- package/src/components/tab/styles/index.scss +182 -0
- package/src/components/tab/types/index.ts +46 -0
- package/src/components/tab/utils/index.ts +5 -0
- package/src/components/tab/utils/tab-context.ts +20 -0
- package/src/components/table/hooks/index.ts +4 -0
- package/src/components/table/img/.gitkeep +0 -0
- package/src/components/table/index.scss +1 -0
- package/src/components/table/index.tsx +4 -0
- package/src/components/table/markup/index.tsx +4 -0
- package/src/components/table/styles/index.scss +3 -0
- package/src/components/table/types/index.ts +4 -0
- package/src/components/table/utils/index.ts +4 -0
- package/src/hooks/index.ts +4 -0
- package/src/img/.gitkeep +0 -0
- package/src/index.scss +3 -0
- package/src/index.tsx +26 -0
- package/src/init/dayjs.ts +14 -0
- package/src/theme/ThemeProvider.tsx +25 -0
- package/src/theme/config.ts +29 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/overrides.scss +215 -0
- package/src/types/index.ts +4 -0
- package/src/utils/index.ts +4 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
@use "@uniai-fe/uds-foundation/css";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
:where(.radix-themes, .theme-root, :root) {
|
|
5
|
+
/* spacing */
|
|
6
|
+
--theme-button-gap-1: var(--spacing-gap-1);
|
|
7
|
+
--theme-button-gap-2: var(--spacing-gap-2);
|
|
8
|
+
--theme-button-gap-3: var(--spacing-gap-3);
|
|
9
|
+
--theme-button-padding-1: var(--spacing-padding-1);
|
|
10
|
+
--theme-button-padding-2: var(--spacing-padding-2);
|
|
11
|
+
--theme-button-padding-3: var(--spacing-padding-3);
|
|
12
|
+
--theme-button-padding-4: var(--spacing-padding-4);
|
|
13
|
+
--theme-button-padding-5: var(--spacing-padding-5);
|
|
14
|
+
--theme-button-padding-6: var(--spacing-padding-6);
|
|
15
|
+
--theme-button-padding-7: var(--spacing-padding-7);
|
|
16
|
+
--theme-button-padding-9: var(--spacing-padding-9);
|
|
17
|
+
--theme-button-min-width: var(--theme-size-small-2);
|
|
18
|
+
|
|
19
|
+
/* size/radius */
|
|
20
|
+
--theme-button-size-small-1: var(--theme-size-small-1);
|
|
21
|
+
--theme-button-size-small-2: var(--theme-size-small-2);
|
|
22
|
+
--theme-button-size-small-3: var(--theme-size-small-3);
|
|
23
|
+
--theme-button-size-medium-1: var(--theme-size-medium-1);
|
|
24
|
+
--theme-button-size-medium-2: var(--theme-size-medium-2);
|
|
25
|
+
--theme-button-size-medium-3: var(--theme-size-medium-3);
|
|
26
|
+
--theme-button-radius-medium-1: var(--theme-radius-medium-1);
|
|
27
|
+
--theme-button-radius-medium-3: var(--theme-radius-medium-3);
|
|
28
|
+
--theme-button-radius-large-1: var(--theme-radius-large-1);
|
|
29
|
+
--theme-button-radius-large-2: var(--theme-radius-large-2);
|
|
30
|
+
--theme-button-radius-small: var(--theme-radius-small);
|
|
31
|
+
--theme-button-radius-xlarge: var(--theme-radius-xlarge);
|
|
32
|
+
|
|
33
|
+
/* typography */
|
|
34
|
+
--theme-button-font-body-medium-family: var(--font-body-medium-family);
|
|
35
|
+
--theme-button-font-body-medium-size: var(--font-body-medium-size);
|
|
36
|
+
--theme-button-font-body-medium-weight: var(--font-body-medium-weight);
|
|
37
|
+
--theme-button-font-body-medium-line-height: var(
|
|
38
|
+
--font-body-medium-line-height
|
|
39
|
+
);
|
|
40
|
+
--theme-button-font-body-medium-letter-spacing: var(
|
|
41
|
+
--font-body-medium-letter-spacing
|
|
42
|
+
);
|
|
43
|
+
--theme-button-font-label-medium-size: var(--font-label-medium-size);
|
|
44
|
+
--theme-button-font-label-medium-weight: var(--font-label-medium-weight);
|
|
45
|
+
--theme-button-font-label-medium-line-height: var(
|
|
46
|
+
--font-label-medium-line-height
|
|
47
|
+
);
|
|
48
|
+
--theme-button-font-label-medium-letter-spacing: var(
|
|
49
|
+
--font-label-medium-letter-spacing
|
|
50
|
+
);
|
|
51
|
+
--theme-button-font-label-large-size: var(--font-label-large-size);
|
|
52
|
+
--theme-button-font-label-large-weight: var(--font-label-large-weight);
|
|
53
|
+
--theme-button-font-label-large-line-height: var(
|
|
54
|
+
--font-label-large-line-height
|
|
55
|
+
);
|
|
56
|
+
--theme-button-font-label-large-letter-spacing: var(
|
|
57
|
+
--font-label-large-letter-spacing
|
|
58
|
+
);
|
|
59
|
+
--theme-button-font-body-large-size: var(--font-body-large-size);
|
|
60
|
+
--theme-button-font-body-large-weight: var(--font-body-large-weight);
|
|
61
|
+
--theme-button-font-body-large-line-height: var(
|
|
62
|
+
--font-body-large-line-height
|
|
63
|
+
);
|
|
64
|
+
--theme-button-font-body-large-letter-spacing: var(
|
|
65
|
+
--font-body-large-letter-spacing
|
|
66
|
+
);
|
|
67
|
+
--theme-button-font-weight: 400;
|
|
68
|
+
|
|
69
|
+
/* colors */
|
|
70
|
+
--theme-button-color-neutral-base: var(--color-neutral-20);
|
|
71
|
+
--theme-button-color-common-100: var(--color-common-100);
|
|
72
|
+
--theme-button-color-primary-default: var(--color-primary-default);
|
|
73
|
+
--theme-button-color-primary-strong: var(--color-primary-strong);
|
|
74
|
+
--theme-button-color-primary-heavy: var(--color-primary-heavy);
|
|
75
|
+
--theme-button-color-secondary-default: var(--color-secondary-default);
|
|
76
|
+
--theme-button-color-secondary-strong: var(--color-secondary-strong);
|
|
77
|
+
--theme-button-color-secondary-heavy: var(--color-secondary-heavy);
|
|
78
|
+
--theme-button-color-tertiary-default: var(--color-tertiary-default);
|
|
79
|
+
--theme-button-color-tertiary-strong: var(--color-tertiary-strong);
|
|
80
|
+
--theme-button-color-tertiary-heavy: var(--color-tertiary-heavy);
|
|
81
|
+
--theme-button-color-blue-90: var(--color-blue-90);
|
|
82
|
+
--theme-button-color-blue-50: var(--color-blue-50);
|
|
83
|
+
--theme-button-color-blue-45: var(--color-blue-45);
|
|
84
|
+
--theme-button-overlay-solid-tertiary-bg: var(--color-bg-surface-strong);
|
|
85
|
+
/* Confirm dialog cancel 버튼을 위한 solid tertiary 색상 정의 */
|
|
86
|
+
--theme-button-tertiary-solid-bg: var(--color-bg-surface-neutral);
|
|
87
|
+
--theme-button-tertiary-solid-hover-bg: var(--color-bg-surface-strong);
|
|
88
|
+
--theme-button-tertiary-solid-pressed-bg: var(--color-bg-surface-strong);
|
|
89
|
+
--theme-button-tertiary-solid-foreground: var(--color-label-neutral);
|
|
90
|
+
--theme-button-secondary-solid-bg: var(--color-blue-95, #e5eeff);
|
|
91
|
+
--theme-button-secondary-solid-hover-bg: #dbe9ff;
|
|
92
|
+
--theme-button-secondary-solid-pressed-bg: #ccdeff;
|
|
93
|
+
--theme-button-color-cool-gray-90: var(--color-cool-gray-90);
|
|
94
|
+
--theme-button-color-cool-gray-95: var(--color-cool-gray-95);
|
|
95
|
+
--theme-button-color-cool-gray-10: var(--color-cool-gray-10);
|
|
96
|
+
--theme-button-color-bg-surface-standard: var(--color-bg-surface-standard);
|
|
97
|
+
--theme-button-color-bg-alternative-cool-gray: var(
|
|
98
|
+
--color-bg-alternative-cool-gray
|
|
99
|
+
);
|
|
100
|
+
--theme-button-color-bg-surface-strong: var(--color-bg-surface-strong);
|
|
101
|
+
--theme-button-color-label-disabled: var(--color-label-disabled);
|
|
102
|
+
|
|
103
|
+
/* overlays */
|
|
104
|
+
--theme-button-overlay-solid-secondary-bg: var(--color-blue-90);
|
|
105
|
+
--theme-button-overlay-outlined-primary-bg: var(--color-blue-90);
|
|
106
|
+
--theme-button-overlay-outlined-secondary-bg: var(--color-cool-gray-95);
|
|
107
|
+
--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
|
+
}
|
|
117
|
+
$button-intents: (
|
|
118
|
+
primary: (
|
|
119
|
+
solid-bg: var(
|
|
120
|
+
--theme-button-color-primary-default,
|
|
121
|
+
var(--color-primary-default)
|
|
122
|
+
),
|
|
123
|
+
solid-hover: var(--theme-button-color-blue-50, var(--color-blue-50)),
|
|
124
|
+
solid-active: var(--theme-button-color-blue-45, var(--color-blue-45)),
|
|
125
|
+
solid-foreground: var(
|
|
126
|
+
--theme-button-color-common-100,
|
|
127
|
+
var(--color-common-100)
|
|
128
|
+
),
|
|
129
|
+
outline-border: var(
|
|
130
|
+
--theme-button-color-primary-default,
|
|
131
|
+
var(--color-primary-default)
|
|
132
|
+
),
|
|
133
|
+
outline-hover-bg: var(
|
|
134
|
+
--theme-button-color-primary-default,
|
|
135
|
+
var(--color-primary-default)
|
|
136
|
+
),
|
|
137
|
+
outline-hover-foreground: var(
|
|
138
|
+
--theme-button-color-common-100,
|
|
139
|
+
var(--color-common-100)
|
|
140
|
+
),
|
|
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
|
+
),
|
|
150
|
+
secondary: (
|
|
151
|
+
solid-bg: var(
|
|
152
|
+
--theme-button-secondary-solid-bg,
|
|
153
|
+
var(--color-blue-95, #e5eeff)
|
|
154
|
+
),
|
|
155
|
+
solid-hover: var(--theme-button-secondary-solid-hover-bg, #dbe9ff),
|
|
156
|
+
solid-active: var(--theme-button-secondary-solid-pressed-bg, #ccdeff),
|
|
157
|
+
solid-foreground: var(
|
|
158
|
+
--theme-button-color-primary-default,
|
|
159
|
+
var(--color-primary-default)
|
|
160
|
+
),
|
|
161
|
+
outline-border: var(
|
|
162
|
+
--theme-button-color-cool-gray-90,
|
|
163
|
+
var(--color-cool-gray-90)
|
|
164
|
+
),
|
|
165
|
+
outline-hover-bg: var(--theme-button-color-blue-90, var(--color-blue-90)),
|
|
166
|
+
outline-hover-foreground: var(
|
|
167
|
+
--theme-button-color-primary-heavy,
|
|
168
|
+
var(--color-primary-heavy)
|
|
169
|
+
),
|
|
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
|
+
),
|
|
179
|
+
teritary: (
|
|
180
|
+
solid-bg: var(
|
|
181
|
+
--theme-button-tertiary-solid-bg,
|
|
182
|
+
var(--color-bg-surface-neutral)
|
|
183
|
+
),
|
|
184
|
+
solid-hover: var(
|
|
185
|
+
--theme-button-tertiary-solid-hover-bg,
|
|
186
|
+
var(--color-bg-surface-static-cool-gray)
|
|
187
|
+
),
|
|
188
|
+
solid-active: var(
|
|
189
|
+
--theme-button-tertiary-solid-pressed-bg,
|
|
190
|
+
var(--color-bg-surface-strong)
|
|
191
|
+
),
|
|
192
|
+
solid-foreground: var(
|
|
193
|
+
--theme-button-tertiary-solid-foreground,
|
|
194
|
+
var(--color-label-neutral)
|
|
195
|
+
),
|
|
196
|
+
outline-border: var(
|
|
197
|
+
--theme-button-color-cool-gray-90,
|
|
198
|
+
var(--color-cool-gray-90)
|
|
199
|
+
),
|
|
200
|
+
outline-hover-bg: var(
|
|
201
|
+
--theme-button-color-cool-gray-95,
|
|
202
|
+
var(--color-cool-gray-95)
|
|
203
|
+
),
|
|
204
|
+
outline-hover-foreground: var(
|
|
205
|
+
--theme-button-color-neutral-base,
|
|
206
|
+
var(--color-neutral-20)
|
|
207
|
+
),
|
|
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
|
+
),
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
@function intent-token($intent, $key) {
|
|
220
|
+
@return map.get(map.get($button-intents, $intent), $key);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@mixin button-state-selector($variant, $intent) {
|
|
224
|
+
.button:where([data-variant="#{$variant}"][data-intent="#{$intent}"]) {
|
|
225
|
+
@content;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@mixin button-overlay-state(
|
|
230
|
+
$variant,
|
|
231
|
+
$intent,
|
|
232
|
+
$bg,
|
|
233
|
+
$hover-opacity,
|
|
234
|
+
$pressed-opacity,
|
|
235
|
+
$border-color: null
|
|
236
|
+
) {
|
|
237
|
+
.button:where([data-variant="#{$variant}"][data-intent="#{$intent}"]) {
|
|
238
|
+
&:hover:not(:disabled),
|
|
239
|
+
&[data-simulated-state="hover"]:not(:disabled) {
|
|
240
|
+
background-color: $bg;
|
|
241
|
+
@if $border-color == null {
|
|
242
|
+
border-color: $bg;
|
|
243
|
+
} @else {
|
|
244
|
+
border-color: $border-color;
|
|
245
|
+
}
|
|
246
|
+
box-shadow: inset 0 0 0 999px rgba(255, 255, 255, $hover-opacity);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:active:not(:disabled),
|
|
250
|
+
&[data-simulated-state="pressed"]:not(:disabled) {
|
|
251
|
+
background-color: $bg;
|
|
252
|
+
@if $border-color == null {
|
|
253
|
+
border-color: $bg;
|
|
254
|
+
} @else {
|
|
255
|
+
border-color: $border-color;
|
|
256
|
+
}
|
|
257
|
+
box-shadow: inset 0 0 0 999px rgba(255, 255, 255, $pressed-opacity);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Radix reset 이후에도 primitives 스타일이 유지되도록 공통 클래스에 스타일 부여 */
|
|
263
|
+
.button {
|
|
264
|
+
display: flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
justify-content: center;
|
|
267
|
+
gap: var(--theme-button-gap-2, var(--spacing-gap-2, 8px));
|
|
268
|
+
width: fit-content;
|
|
269
|
+
min-width: var(--theme-button-min-width, var(--theme-size-small-2, 24px));
|
|
270
|
+
min-height: var(--button-min-height, auto);
|
|
271
|
+
padding-inline: var(
|
|
272
|
+
--button-padding-inline,
|
|
273
|
+
var(--theme-button-padding-4, var(--spacing-padding-4, 16px))
|
|
274
|
+
);
|
|
275
|
+
padding-block: var(
|
|
276
|
+
--button-padding-block,
|
|
277
|
+
var(--theme-button-padding-2, var(--spacing-padding-2, 4px))
|
|
278
|
+
);
|
|
279
|
+
border-radius: var(
|
|
280
|
+
--button-border-radius,
|
|
281
|
+
var(--theme-button-radius-medium-1, var(--theme-radius-medium-1, 8px))
|
|
282
|
+
);
|
|
283
|
+
border: 1px solid transparent;
|
|
284
|
+
background-color: transparent;
|
|
285
|
+
color: var(--theme-button-color-neutral-base, var(--color-neutral-20));
|
|
286
|
+
box-shadow: none;
|
|
287
|
+
font-family: var(
|
|
288
|
+
--theme-button-font-body-medium-family,
|
|
289
|
+
var(--font-body-medium-family, "Pretendard")
|
|
290
|
+
);
|
|
291
|
+
font-size: var(
|
|
292
|
+
--theme-button-font-body-medium-size,
|
|
293
|
+
var(--font-body-medium-size, 16px)
|
|
294
|
+
);
|
|
295
|
+
font-weight: var(
|
|
296
|
+
--theme-button-font-weight,
|
|
297
|
+
400
|
|
298
|
+
); /* 버튼 텍스트는 스케일과 무관하게 weight 400 유지 */
|
|
299
|
+
line-height: var(
|
|
300
|
+
--theme-button-font-body-medium-line-height,
|
|
301
|
+
var(--font-body-medium-line-height, 24px)
|
|
302
|
+
);
|
|
303
|
+
letter-spacing: var(
|
|
304
|
+
--theme-button-font-body-medium-letter-spacing,
|
|
305
|
+
var(--font-body-medium-letter-spacing, 0px)
|
|
306
|
+
);
|
|
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
|
+
filter: none;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.button:where([data-block="true"]) {
|
|
319
|
+
width: 100%;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.button:where([data-loading="true"]) {
|
|
323
|
+
pointer-events: none;
|
|
324
|
+
cursor: progress;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.button-icon,
|
|
328
|
+
.button-label,
|
|
329
|
+
.button-prefix,
|
|
330
|
+
.button-suffix {
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@each $intent, $tokens in $button-intents {
|
|
337
|
+
@include button-state-selector("solid", $intent) {
|
|
338
|
+
background-color: intent-token($intent, solid-bg);
|
|
339
|
+
border-color: intent-token($intent, solid-bg);
|
|
340
|
+
color: intent-token($intent, solid-foreground);
|
|
341
|
+
&:disabled,
|
|
342
|
+
&[data-disabled="true"] {
|
|
343
|
+
background-color: var(
|
|
344
|
+
--theme-button-color-bg-surface-standard,
|
|
345
|
+
var(--color-bg-surface-standard)
|
|
346
|
+
);
|
|
347
|
+
border-color: var(
|
|
348
|
+
--theme-button-color-bg-surface-standard,
|
|
349
|
+
var(--color-bg-surface-standard)
|
|
350
|
+
);
|
|
351
|
+
color: var(
|
|
352
|
+
--theme-button-color-label-disabled,
|
|
353
|
+
var(--color-label-disabled)
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&:hover:not(:disabled),
|
|
358
|
+
&[data-simulated-state="hover"]:not(:disabled) {
|
|
359
|
+
background-color: intent-token($intent, solid-hover);
|
|
360
|
+
border-color: intent-token($intent, solid-hover);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&:active:not(:disabled),
|
|
364
|
+
&[data-simulated-state="pressed"]:not(:disabled) {
|
|
365
|
+
background-color: intent-token($intent, solid-active);
|
|
366
|
+
border-color: intent-token($intent, solid-active);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
@include button-state-selector("outlined", $intent) {
|
|
371
|
+
background-color: transparent;
|
|
372
|
+
color: intent-token($intent, text-color);
|
|
373
|
+
border-color: intent-token($intent, outline-border);
|
|
374
|
+
|
|
375
|
+
&:disabled,
|
|
376
|
+
&[data-disabled="true"] {
|
|
377
|
+
background-color: var(
|
|
378
|
+
--theme-button-color-bg-surface-standard,
|
|
379
|
+
var(--color-bg-surface-standard)
|
|
380
|
+
);
|
|
381
|
+
border-color: var(
|
|
382
|
+
--theme-button-color-bg-surface-standard,
|
|
383
|
+
var(--color-bg-surface-standard)
|
|
384
|
+
);
|
|
385
|
+
color: var(
|
|
386
|
+
--theme-button-color-label-disabled,
|
|
387
|
+
var(--color-label-disabled)
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
&:hover:not(:disabled),
|
|
392
|
+
&[data-simulated-state="hover"]:not(:disabled) {
|
|
393
|
+
background-color: intent-token($intent, outline-hover-bg);
|
|
394
|
+
border-color: intent-token($intent, outline-border);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
&:active:not(:disabled),
|
|
398
|
+
&[data-simulated-state="pressed"]:not(:disabled) {
|
|
399
|
+
background-color: intent-token($intent, solid-bg);
|
|
400
|
+
border-color: intent-token($intent, outline-border);
|
|
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
|
+
);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
$button-size-map: (
|
|
461
|
+
small: (
|
|
462
|
+
padding-inline: var(
|
|
463
|
+
--theme-button-padding-3,
|
|
464
|
+
var(--spacing-padding-3, 12px)
|
|
465
|
+
),
|
|
466
|
+
padding-block: var(--theme-button-padding-1, var(--spacing-padding-1, 2px)),
|
|
467
|
+
gap: var(--theme-button-gap-1, var(--spacing-gap-1, 4px)),
|
|
468
|
+
font-size: var(
|
|
469
|
+
--theme-button-font-label-medium-size,
|
|
470
|
+
var(--font-label-medium-size, 14px)
|
|
471
|
+
),
|
|
472
|
+
font-weight: var(
|
|
473
|
+
--theme-button-font-label-medium-weight,
|
|
474
|
+
var(--font-label-medium-weight, 400)
|
|
475
|
+
),
|
|
476
|
+
line-height: var(
|
|
477
|
+
--theme-button-font-label-medium-line-height,
|
|
478
|
+
var(--font-label-medium-line-height, 1.5em)
|
|
479
|
+
),
|
|
480
|
+
letter-spacing: var(
|
|
481
|
+
--theme-button-font-label-medium-letter-spacing,
|
|
482
|
+
var(--font-label-medium-letter-spacing, 0px)
|
|
483
|
+
),
|
|
484
|
+
),
|
|
485
|
+
medium: (
|
|
486
|
+
padding-inline: var(
|
|
487
|
+
--theme-button-padding-4,
|
|
488
|
+
var(--spacing-padding-4, 16px)
|
|
489
|
+
),
|
|
490
|
+
gap: var(--theme-button-gap-2, var(--spacing-gap-2, 8px)),
|
|
491
|
+
padding-block: var(--theme-button-padding-2, var(--spacing-padding-2, 4px)),
|
|
492
|
+
font-size: var(
|
|
493
|
+
--theme-button-font-label-large-size,
|
|
494
|
+
var(--font-label-large-size, 16px)
|
|
495
|
+
),
|
|
496
|
+
font-weight: var(
|
|
497
|
+
--theme-button-font-label-large-weight,
|
|
498
|
+
var(--font-label-large-weight, 400)
|
|
499
|
+
),
|
|
500
|
+
line-height: var(
|
|
501
|
+
--theme-button-font-label-large-line-height,
|
|
502
|
+
var(--font-label-large-line-height, 1.5em)
|
|
503
|
+
),
|
|
504
|
+
letter-spacing: var(
|
|
505
|
+
--theme-button-font-label-large-letter-spacing,
|
|
506
|
+
var(--font-label-large-letter-spacing, 0px)
|
|
507
|
+
),
|
|
508
|
+
),
|
|
509
|
+
large: (
|
|
510
|
+
padding-inline: var(
|
|
511
|
+
--theme-button-padding-5,
|
|
512
|
+
var(--spacing-padding-5, 20px)
|
|
513
|
+
),
|
|
514
|
+
gap: var(--theme-button-gap-3, var(--spacing-gap-3, 12px)),
|
|
515
|
+
padding-block: var(--theme-button-padding-3, var(--spacing-padding-3, 6px)),
|
|
516
|
+
font-size: var(
|
|
517
|
+
--theme-button-font-body-medium-size,
|
|
518
|
+
var(--font-body-medium-size, 17px)
|
|
519
|
+
),
|
|
520
|
+
font-weight: var(
|
|
521
|
+
--theme-button-font-body-medium-weight,
|
|
522
|
+
var(--font-body-medium-weight, 500)
|
|
523
|
+
),
|
|
524
|
+
line-height: var(
|
|
525
|
+
--theme-button-font-body-medium-line-height,
|
|
526
|
+
var(--font-body-medium-line-height, 1.5em)
|
|
527
|
+
),
|
|
528
|
+
letter-spacing: var(
|
|
529
|
+
--theme-button-font-body-medium-letter-spacing,
|
|
530
|
+
var(--font-body-medium-letter-spacing, 0px)
|
|
531
|
+
),
|
|
532
|
+
),
|
|
533
|
+
xlarge: (
|
|
534
|
+
padding-inline: var(
|
|
535
|
+
--theme-button-padding-6,
|
|
536
|
+
var(--spacing-padding-6, 24px)
|
|
537
|
+
),
|
|
538
|
+
gap: var(--theme-button-gap-3, var(--spacing-gap-3, 12px)),
|
|
539
|
+
padding-block: var(--theme-button-padding-4, var(--spacing-padding-4, 8px)),
|
|
540
|
+
font-size: var(
|
|
541
|
+
--theme-button-font-body-large-size,
|
|
542
|
+
var(--font-body-large-size, 19px)
|
|
543
|
+
),
|
|
544
|
+
font-weight: var(
|
|
545
|
+
--theme-button-font-body-large-weight,
|
|
546
|
+
var(--font-body-large-weight, 600)
|
|
547
|
+
),
|
|
548
|
+
line-height: var(
|
|
549
|
+
--theme-button-font-body-large-line-height,
|
|
550
|
+
var(--font-body-large-line-height, 1.5em)
|
|
551
|
+
),
|
|
552
|
+
letter-spacing: var(
|
|
553
|
+
--theme-button-font-body-large-letter-spacing,
|
|
554
|
+
var(--font-body-large-letter-spacing, 0px)
|
|
555
|
+
),
|
|
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)
|
|
572
|
+
),
|
|
573
|
+
),
|
|
574
|
+
large: (
|
|
575
|
+
padding-block: var(--theme-button-padding-5, var(--spacing-padding-5, 12px)),
|
|
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)
|
|
631
|
+
),
|
|
632
|
+
),
|
|
633
|
+
);
|
|
634
|
+
|
|
635
|
+
@each $size, $tokens in $button-size-map {
|
|
636
|
+
.button:where([data-size="#{$size}"]) {
|
|
637
|
+
padding-inline: map.get($tokens, padding-inline);
|
|
638
|
+
gap: map.get($tokens, gap);
|
|
639
|
+
padding-block: map.get($tokens, padding-block);
|
|
640
|
+
font-size: map.get($tokens, font-size);
|
|
641
|
+
font-weight: var(--theme-button-font-weight, 400);
|
|
642
|
+
line-height: map.get($tokens, line-height);
|
|
643
|
+
letter-spacing: map.get($tokens, letter-spacing);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
@mixin button-padding-variant($variant, $map) {
|
|
648
|
+
@each $size, $tokens in $map {
|
|
649
|
+
.button:where([data-variant="#{$variant}"][data-size="#{$size}"]) {
|
|
650
|
+
padding-block: map.get($tokens, padding-block);
|
|
651
|
+
padding-inline: map.get($tokens, padding-inline);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
@mixin button-padding-shape($shape, $map) {
|
|
657
|
+
@each $size, $tokens in $map {
|
|
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
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
@include button-dimension-variant("solid", $button-dimension-default);
|
|
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"]) {
|
|
766
|
+
box-shadow: none;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
@include button-overlay-state("solid", "secondary", transparent, 0, 0);
|
|
770
|
+
|
|
771
|
+
.button:where([data-variant="solid"][data-intent="secondary"]) {
|
|
772
|
+
&:hover:not(:disabled),
|
|
773
|
+
&[data-simulated-state="hover"]:not(:disabled) {
|
|
774
|
+
background-color: var(--theme-button-secondary-solid-hover-bg, #dbe9ff);
|
|
775
|
+
border-color: var(--theme-button-secondary-solid-hover-bg, #dbe9ff);
|
|
776
|
+
box-shadow: none;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
&:active:not(:disabled),
|
|
780
|
+
&[data-simulated-state="pressed"]:not(:disabled) {
|
|
781
|
+
background-color: var(--theme-button-secondary-solid-pressed-bg, #ccdeff);
|
|
782
|
+
border-color: var(--theme-button-secondary-solid-pressed-bg, #ccdeff);
|
|
783
|
+
box-shadow: none;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
@include button-overlay-state(
|
|
788
|
+
"solid",
|
|
789
|
+
"teritary",
|
|
790
|
+
var(--color-border-standard-strong, var(--color-bg-surface-strong)),
|
|
791
|
+
0.68,
|
|
792
|
+
0.48,
|
|
793
|
+
intent-token(teritary, solid-bg)
|
|
794
|
+
);
|
|
795
|
+
|
|
796
|
+
@include button-overlay-state(
|
|
797
|
+
"outlined",
|
|
798
|
+
"primary",
|
|
799
|
+
var(--theme-button-overlay-outlined-primary-bg, var(--color-blue-90)),
|
|
800
|
+
0.68,
|
|
801
|
+
0.28,
|
|
802
|
+
intent-token(primary, outline-border)
|
|
803
|
+
);
|
|
804
|
+
|
|
805
|
+
@include button-overlay-state(
|
|
806
|
+
"outlined",
|
|
807
|
+
"secondary",
|
|
808
|
+
var(--theme-button-overlay-outlined-secondary-bg, var(--color-cool-gray-95)),
|
|
809
|
+
0.68,
|
|
810
|
+
0.28,
|
|
811
|
+
intent-token(secondary, outline-border)
|
|
812
|
+
);
|
|
813
|
+
|
|
814
|
+
@include button-overlay-state(
|
|
815
|
+
"outlined",
|
|
816
|
+
"teritary",
|
|
817
|
+
var(--theme-button-overlay-outlined-tertiary-bg, var(--color-cool-gray-95)),
|
|
818
|
+
0.68,
|
|
819
|
+
0.28,
|
|
820
|
+
intent-token(teritary, outline-border)
|
|
821
|
+
);
|
|
822
|
+
|
|
823
|
+
.button:disabled,
|
|
824
|
+
.button:where([data-disabled="true"]) {
|
|
825
|
+
background-color: var(
|
|
826
|
+
--theme-button-color-bg-surface-standard,
|
|
827
|
+
var(--color-bg-surface-standard)
|
|
828
|
+
);
|
|
829
|
+
border-color: var(
|
|
830
|
+
--theme-button-color-bg-surface-standard,
|
|
831
|
+
var(--color-bg-surface-standard)
|
|
832
|
+
);
|
|
833
|
+
color: var(--theme-button-color-label-disabled, var(--color-label-disabled));
|
|
834
|
+
cursor: not-allowed;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.button:where([data-shape="round"]) {
|
|
838
|
+
border-radius: 9999px;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.button:where([data-icon-slot="left"]) .button-label {
|
|
842
|
+
margin-left: var(--theme-button-gap-1, var(--spacing-gap-1, 4px));
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.button:where([data-icon-slot="right"]) .button-label {
|
|
846
|
+
margin-right: var(--theme-button-gap-1, var(--spacing-gap-1, 4px));
|
|
847
|
+
}
|