@raintonic/formaui 0.2.1 → 0.3.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/CHANGELOG.md +100 -3
- package/LICENSE +21 -0
- package/README.md +80 -26
- package/fesm2022/raintonic-formaui-components-accordion.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-alert.mjs +24 -5
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +38 -9
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-badge.mjs +45 -31
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +24 -7
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-button-group.mjs +6 -6
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-button.mjs +63 -17
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-card.mjs +8 -8
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-data-table.mjs +67 -9
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +63 -16
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-drawer.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +25 -5
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -6
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-input.mjs +1 -1
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-menu.mjs +4 -4
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -5
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-paginator.mjs +27 -7
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-password-input.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-popover.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +32 -7
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-radio.mjs +4 -4
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-select.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +19 -4
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-slider.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-spinner.mjs +24 -7
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-stepper.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tab.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tag.mjs +21 -4
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +26 -7
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +41 -7
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +2 -2
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +35 -6
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-components-tree.mjs +23 -5
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-core.mjs +25 -1
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-dialog.mjs +3 -3
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-notification.mjs +2 -2
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-services-theme.mjs +3 -3
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
- package/fesm2022/raintonic-formaui-test-utils.mjs +21 -16
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -1
- package/fesm2022/raintonic-formaui.mjs +1 -1
- package/fesm2022/raintonic-formaui.mjs.map +1 -1
- package/llms-full.txt +33 -25
- package/llms.txt +1 -2
- package/package.json +1 -5
- package/styles/index.scss +2 -2
- package/styles/partials/_motion.scss +25 -0
- package/styles/partials/_theme.scss +6 -5
- package/styles/partials/components/_button.scss +361 -367
- package/styles/partials/themes/_dark.scss +14 -0
- package/styles/partials/themes/_light.scss +14 -0
- package/types/raintonic-formaui-components-alert.d.ts +11 -1
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
- package/types/raintonic-formaui-components-autocomplete.d.ts +25 -7
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
- package/types/raintonic-formaui-components-badge.d.ts +20 -9
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -1
- package/types/raintonic-formaui-components-big-menu.d.ts +12 -1
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -1
- package/types/raintonic-formaui-components-breadcrumb.d.ts +11 -2
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -1
- package/types/raintonic-formaui-components-button-group.d.ts +6 -6
- package/types/raintonic-formaui-components-button.d.ts +9 -7
- package/types/raintonic-formaui-components-button.d.ts.map +1 -1
- package/types/raintonic-formaui-components-card.d.ts +4 -4
- package/types/raintonic-formaui-components-checkbox.d.ts +1 -1
- package/types/raintonic-formaui-components-data-table.d.ts +56 -16
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
- package/types/raintonic-formaui-components-date-picker.d.ts +32 -4
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
- package/types/raintonic-formaui-components-drawer.d.ts +10 -1
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
- package/types/raintonic-formaui-components-file-upload.d.ts +12 -1
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -1
- package/types/raintonic-formaui-components-form-field.d.ts +12 -2
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
- package/types/raintonic-formaui-components-input.d.ts +1 -1
- package/types/raintonic-formaui-components-number-input.d.ts +11 -2
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
- package/types/raintonic-formaui-components-paginator.d.ts +13 -1
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -1
- package/types/raintonic-formaui-components-password-input.d.ts +12 -2
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
- package/types/raintonic-formaui-components-progressbar.d.ts +14 -1
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-select.d.ts.map +1 -1
- package/types/raintonic-formaui-components-side-panel.d.ts +10 -1
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
- package/types/raintonic-formaui-components-sidebar.d.ts +12 -1
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-slider.d.ts +12 -1
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -1
- package/types/raintonic-formaui-components-spinner.d.ts +12 -2
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tag.d.ts +10 -1
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -1
- package/types/raintonic-formaui-components-time-picker.d.ts +14 -2
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
- package/types/raintonic-formaui-components-toggle.d.ts +1 -1
- package/types/raintonic-formaui-components-toolbar.d.ts +22 -4
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tree-table.d.ts +29 -4
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -1
- package/types/raintonic-formaui-components-tree.d.ts +12 -1
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
- package/types/raintonic-formaui-core.d.ts +19 -2
- package/types/raintonic-formaui-core.d.ts.map +1 -1
- package/types/raintonic-formaui-services-dialog.d.ts +1 -1
- package/types/raintonic-formaui-services-theme.d.ts +3 -3
- package/types/raintonic-formaui-test-utils.d.ts +15 -2
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -1
- package/types/raintonic-formaui.d.ts +1 -1
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +0 -266
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +0 -1
- package/types/raintonic-formaui-components-dynamic-form.d.ts +0 -412
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +0 -1
|
@@ -1,367 +1,361 @@
|
|
|
1
|
-
// Button component styles aligned with theme tokens
|
|
2
|
-
@use '../constants' as *;
|
|
3
|
-
@use '../mixins' as mixins;
|
|
4
|
-
@use '../motion' as motion;
|
|
5
|
-
|
|
6
|
-
.fui-button {
|
|
7
|
-
// Component tokens with fallbacks
|
|
8
|
-
--fui-button-height: var(--fui-button-height-md);
|
|
9
|
-
--fui-button-font-size: var(--fui-font-size-02);
|
|
10
|
-
--fui-button-border-radius: var(--fui-border-radius-sm);
|
|
11
|
-
--fui-button-padding-x: var(--fui-spacing-05);
|
|
12
|
-
--fui-button-padding-y: var(--fui-spacing-03);
|
|
13
|
-
--fui-button-gap: var(--fui-spacing-03);
|
|
14
|
-
--fui-button-font-weight: var(--fui-font-weight-semibold);
|
|
15
|
-
--fui-button-letter-spacing: var(--fui-letter-spacing-wide);
|
|
16
|
-
|
|
17
|
-
// Default spinner/text foreground used during loading
|
|
18
|
-
@include mixins.fui-button-reset();
|
|
19
|
-
@include motion.fui-motion(all, var(--fui-duration-fast-02));
|
|
20
|
-
|
|
21
|
-
position: relative;
|
|
22
|
-
display: inline-flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
gap: var(--fui-button-gap);
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
|
|
28
|
-
font-family: var(--fui-font-family-sans);
|
|
29
|
-
font-weight: var(--fui-button-font-weight);
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
text-align: center;
|
|
32
|
-
vertical-align: middle;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
user-select: none;
|
|
35
|
-
letter-spacing: var(--fui-button-letter-spacing);
|
|
36
|
-
border-radius: var(--fui-button-border-radius);
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
min-height: var(--fui-button-height);
|
|
40
|
-
|
|
41
|
-
&:focus-visible {
|
|
42
|
-
@include mixins.fui-focus-ring();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Loading spinner
|
|
46
|
-
&__spinner {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
&--
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
color:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
&:hover:not(.fui-button--disabled) {
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&:active:not(.fui-button--disabled) {
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
color: var(--fui-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
//
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
//
|
|
338
|
-
@
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
.fui-button {
|
|
363
|
-
&__spinner {
|
|
364
|
-
display: none !important;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
1
|
+
// Button component styles aligned with theme tokens
|
|
2
|
+
@use '../constants' as *;
|
|
3
|
+
@use '../mixins' as mixins;
|
|
4
|
+
@use '../motion' as motion;
|
|
5
|
+
|
|
6
|
+
.fui-button {
|
|
7
|
+
// Component tokens with fallbacks
|
|
8
|
+
--fui-button-height: var(--fui-button-height-md);
|
|
9
|
+
--fui-button-font-size: var(--fui-font-size-02);
|
|
10
|
+
--fui-button-border-radius: var(--fui-border-radius-sm);
|
|
11
|
+
--fui-button-padding-x: var(--fui-spacing-05);
|
|
12
|
+
--fui-button-padding-y: var(--fui-spacing-03);
|
|
13
|
+
--fui-button-gap: var(--fui-spacing-03);
|
|
14
|
+
--fui-button-font-weight: var(--fui-font-weight-semibold);
|
|
15
|
+
--fui-button-letter-spacing: var(--fui-letter-spacing-wide);
|
|
16
|
+
|
|
17
|
+
// Default spinner/text foreground used during loading
|
|
18
|
+
@include mixins.fui-button-reset();
|
|
19
|
+
@include motion.fui-motion(all, var(--fui-duration-fast-02));
|
|
20
|
+
|
|
21
|
+
position: relative;
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
gap: var(--fui-button-gap);
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
|
|
28
|
+
font-family: var(--fui-font-family-sans);
|
|
29
|
+
font-weight: var(--fui-button-font-weight);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
text-align: center;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
user-select: none;
|
|
35
|
+
letter-spacing: var(--fui-button-letter-spacing);
|
|
36
|
+
border-radius: var(--fui-button-border-radius);
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
min-height: var(--fui-button-height);
|
|
40
|
+
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
@include mixins.fui-focus-ring();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Loading spinner
|
|
46
|
+
&__spinner {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__spinner-icon {
|
|
53
|
+
width: var(--fui-icon-size-sm);
|
|
54
|
+
height: var(--fui-icon-size-sm);
|
|
55
|
+
border: 2px solid currentColor;
|
|
56
|
+
border-top-color: transparent;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
animation: fui-spin var(--fui-duration-slow-02) linear infinite;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__leading {
|
|
62
|
+
display: contents;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Ripple effect on click
|
|
66
|
+
&__ripple {
|
|
67
|
+
position: absolute;
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
background-color: currentColor;
|
|
70
|
+
opacity: 0.35;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
transform: scale(0);
|
|
73
|
+
animation: fui-button-ripple var(--fui-duration-slow-01, 400ms) ease-out forwards;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (prefers-reduced-motion: reduce) {
|
|
77
|
+
&__ripple {
|
|
78
|
+
animation: none;
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// WCAG 2.1 AA: ensure minimum 44x44px touch target for smaller sizes
|
|
84
|
+
// Uses a pseudo-element so visual size remains unchanged
|
|
85
|
+
&::after {
|
|
86
|
+
content: '';
|
|
87
|
+
position: absolute;
|
|
88
|
+
inset: 50% auto auto 50%;
|
|
89
|
+
min-width: 44px;
|
|
90
|
+
min-height: 44px;
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
transform: translate(-50%, -50%);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// States
|
|
97
|
+
&--disabled {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
opacity: var(--fui-opacity-disabled);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&--loading {
|
|
103
|
+
cursor: wait;
|
|
104
|
+
|
|
105
|
+
.fui-button__leading {
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Hide any user-supplied icon child except the spinner
|
|
112
|
+
> .fui-icon:not(.fui-button__spinner),
|
|
113
|
+
> fui-icon:not(.fui-button__spinner) {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--full-width {
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Sizes
|
|
123
|
+
&--sm {
|
|
124
|
+
min-height: var(--fui-button-height-sm);
|
|
125
|
+
padding: calc(var(--fui-spacing-03) - 2px) var(--fui-spacing-03);
|
|
126
|
+
font-size: var(--fui-font-size-01);
|
|
127
|
+
|
|
128
|
+
&.fui-button--icon-only {
|
|
129
|
+
width: var(--fui-button-height-sm);
|
|
130
|
+
padding: calc(var(--fui-spacing-03) - 2px);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.fui-icon {
|
|
134
|
+
width: var(--fui-icon-size-sm);
|
|
135
|
+
height: var(--fui-icon-size-sm);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&--md {
|
|
140
|
+
min-height: var(--fui-button-height-md);
|
|
141
|
+
padding: var(--fui-spacing-03) var(--fui-spacing-05);
|
|
142
|
+
font-size: var(--fui-font-size-02);
|
|
143
|
+
|
|
144
|
+
&.fui-button--icon-only {
|
|
145
|
+
width: var(--fui-button-height-md);
|
|
146
|
+
padding: var(--fui-spacing-03);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.fui-icon {
|
|
150
|
+
width: var(--fui-icon-size-md);
|
|
151
|
+
height: var(--fui-icon-size-md);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--lg {
|
|
156
|
+
min-height: var(--fui-button-height-lg);
|
|
157
|
+
padding: calc(var(--fui-spacing-04) - 2px) var(--fui-spacing-05);
|
|
158
|
+
font-size: var(--fui-font-size-03);
|
|
159
|
+
|
|
160
|
+
&.fui-button--icon-only {
|
|
161
|
+
width: var(--fui-button-height-lg);
|
|
162
|
+
padding: calc(var(--fui-spacing-04) - 2px);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.fui-icon {
|
|
166
|
+
width: var(--fui-icon-size-md);
|
|
167
|
+
height: var(--fui-icon-size-md);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&--xl {
|
|
172
|
+
min-height: var(--fui-button-height-xl);
|
|
173
|
+
padding: var(--fui-spacing-04) var(--fui-spacing-06);
|
|
174
|
+
font-size: var(--fui-font-size-03);
|
|
175
|
+
|
|
176
|
+
&.fui-button--icon-only {
|
|
177
|
+
width: var(--fui-button-height-xl);
|
|
178
|
+
padding: var(--fui-spacing-04);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.fui-icon {
|
|
182
|
+
width: var(--fui-icon-size-md);
|
|
183
|
+
height: var(--fui-icon-size-md);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&--2xl {
|
|
188
|
+
min-height: var(--fui-button-height-2xl);
|
|
189
|
+
padding: var(--fui-spacing-05) var(--fui-spacing-06);
|
|
190
|
+
font-size: var(--fui-font-size-03);
|
|
191
|
+
|
|
192
|
+
&.fui-button--icon-only {
|
|
193
|
+
width: var(--fui-button-height-2xl);
|
|
194
|
+
padding: var(--fui-spacing-05);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.fui-icon {
|
|
198
|
+
width: var(--fui-icon-size-md);
|
|
199
|
+
height: var(--fui-icon-size-md);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Variant styles
|
|
204
|
+
// =============================================================================
|
|
205
|
+
|
|
206
|
+
// Primary — solid violet
|
|
207
|
+
&--primary {
|
|
208
|
+
background-color: var(--fui-primary-default);
|
|
209
|
+
color: var(--fui-primary-text);
|
|
210
|
+
border-color: transparent;
|
|
211
|
+
box-shadow: var(--fui-shadow-02);
|
|
212
|
+
|
|
213
|
+
&:hover:not(.fui-button--disabled) {
|
|
214
|
+
background-color: var(--fui-primary-hover);
|
|
215
|
+
box-shadow: var(--fui-shadow-03);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&:active:not(.fui-button--disabled) {
|
|
219
|
+
background-color: var(--fui-primary-hover);
|
|
220
|
+
box-shadow: none;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Secondary — white bg with border
|
|
225
|
+
&--secondary {
|
|
226
|
+
background-color: var(--fui-surface-card);
|
|
227
|
+
color: var(--fui-text-primary);
|
|
228
|
+
box-shadow: inset 0 0 0 var(--fui-border-width-md) var(--fui-border-color);
|
|
229
|
+
|
|
230
|
+
&:hover:not(.fui-button--disabled) {
|
|
231
|
+
background-color: var(--fui-surface-02);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&:active:not(.fui-button--disabled) {
|
|
235
|
+
background-color: var(--fui-surface-02);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Tertiary — neutral text, no bg/border
|
|
240
|
+
&--tertiary {
|
|
241
|
+
background-color: transparent;
|
|
242
|
+
color: var(--fui-tertiary-text);
|
|
243
|
+
border-color: transparent;
|
|
244
|
+
|
|
245
|
+
&:hover:not(.fui-button--disabled) {
|
|
246
|
+
background-color: var(--fui-tertiary-hover-bg);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:active:not(.fui-button--disabled) {
|
|
250
|
+
background-color: var(--fui-tertiary-hover-bg);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Tertiary-violet — violet text, no bg/border
|
|
255
|
+
&--tertiary-violet {
|
|
256
|
+
background-color: transparent;
|
|
257
|
+
color: var(--fui-tertiary-violet-text);
|
|
258
|
+
border-color: transparent;
|
|
259
|
+
|
|
260
|
+
&:hover:not(.fui-button--disabled) {
|
|
261
|
+
background-color: var(--fui-tertiary-violet-hover-bg);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&:active:not(.fui-button--disabled) {
|
|
265
|
+
background-color: var(--fui-tertiary-violet-hover-bg);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Link — underlined violet text on hover
|
|
270
|
+
&--link {
|
|
271
|
+
background-color: transparent;
|
|
272
|
+
color: var(--fui-primary);
|
|
273
|
+
|
|
274
|
+
&:hover:not(.fui-button--disabled) {
|
|
275
|
+
text-decoration: underline;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&:active:not(.fui-button--disabled) {
|
|
279
|
+
text-decoration: underline;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Destructive — solid red
|
|
284
|
+
&--destructive {
|
|
285
|
+
background-color: var(--fui-destructive-default);
|
|
286
|
+
color: var(--fui-destructive-text);
|
|
287
|
+
border-color: transparent;
|
|
288
|
+
box-shadow: var(--fui-shadow-02);
|
|
289
|
+
|
|
290
|
+
&:hover:not(.fui-button--disabled) {
|
|
291
|
+
background-color: var(--fui-destructive-hover);
|
|
292
|
+
box-shadow: var(--fui-shadow-03);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&:active:not(.fui-button--disabled) {
|
|
296
|
+
background-color: var(--fui-destructive-hover);
|
|
297
|
+
box-shadow: none;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Icon adjustments
|
|
302
|
+
&--icon-only {
|
|
303
|
+
gap: 0;
|
|
304
|
+
|
|
305
|
+
.fui-icon {
|
|
306
|
+
margin: 0;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Icon spacing within buttons
|
|
312
|
+
.fui-icon {
|
|
313
|
+
flex-shrink: 0;
|
|
314
|
+
|
|
315
|
+
&[fuiPrefix] {
|
|
316
|
+
margin-right: var(--fui-spacing-02);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[fuiSuffix] {
|
|
320
|
+
margin-left: var(--fui-spacing-02);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// High contrast mode support
|
|
325
|
+
@media (prefers-contrast: more) {
|
|
326
|
+
.fui-button {
|
|
327
|
+
&--secondary {
|
|
328
|
+
border-width: 3px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&:focus-visible {
|
|
332
|
+
outline-width: 3px;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Keyframes
|
|
338
|
+
@keyframes fui-spin {
|
|
339
|
+
from {
|
|
340
|
+
transform: rotate(0deg);
|
|
341
|
+
}
|
|
342
|
+
to {
|
|
343
|
+
transform: rotate(360deg);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@keyframes fui-button-ripple {
|
|
348
|
+
to {
|
|
349
|
+
transform: scale(2.5);
|
|
350
|
+
opacity: 0;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// Print styles
|
|
355
|
+
@media print {
|
|
356
|
+
.fui-button {
|
|
357
|
+
&__spinner {
|
|
358
|
+
display: none !important;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|