@v1nt1248/3nclient-lib 0.3.18 → 0.3.20
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 +1 -0
- package/dist/components/ui3n-button/constants.d.ts +5 -0
- package/dist/components/ui3n-button/types.d.ts +4 -2
- package/dist/components/ui3n-button/ui3n-button.vue.d.ts +2 -2
- package/dist/components/ui3n-input/types.d.ts +5 -0
- package/dist/components/ui3n-input/ui3n-input.vue.d.ts +18 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +6239 -3171
- package/dist/ui3n-plugins.js +1836 -1175
- package/dist/ui3n-utils.js +1751 -1089
- package/dist/utils/debounce.d.ts +8 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/variables.css +2 -1
- package/package.json +23 -22
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +1 -0
- package/src/components/ui3n-button/constants.ts +5 -0
- package/src/components/ui3n-button/types.ts +4 -2
- package/src/components/ui3n-button/ui3n-button.vue +378 -90
- package/src/components/ui3n-input/types.ts +5 -0
- package/src/components/ui3n-input/ui3n-input.vue +177 -96
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { computed, onMounted, ref, watch, useCssModule } from 'vue';
|
|
3
3
|
import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue';
|
|
4
4
|
import Ui3nRipple from '../../directives/ui3n-ripple';
|
|
5
|
-
import {
|
|
5
|
+
import { iconSizeByButtonSize } from './constants';
|
|
6
|
+
import type { Ui3nButtonEmits, Ui3nButtonProps, Ui3nButtonSlots, Ui3nButtonEventName } from './types';
|
|
6
7
|
|
|
7
8
|
const vUi3nRipple = Ui3nRipple;
|
|
8
9
|
|
|
@@ -23,12 +24,29 @@
|
|
|
23
24
|
const val = [$css.ui3nButton, $css[props.size], $css[props.type]];
|
|
24
25
|
|
|
25
26
|
props.block && props.type !== 'icon' && val.push($css.block);
|
|
27
|
+
props.square && val.push($css.square);
|
|
26
28
|
props.icon && val.push($css[`withIcon-${props.iconPosition}`]);
|
|
27
29
|
props.elevation && val.push($css.elevation);
|
|
28
30
|
|
|
29
31
|
return val;
|
|
30
32
|
});
|
|
31
33
|
|
|
34
|
+
const currentIconSize = computed(() => {
|
|
35
|
+
if (props.iconSize) {
|
|
36
|
+
return props.iconSize;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return iconSizeByButtonSize[props.size];
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const currentIconColor = computed(() => {
|
|
43
|
+
if (props.iconColor) {
|
|
44
|
+
return props.iconColor;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return 'inherit';
|
|
48
|
+
});
|
|
49
|
+
|
|
32
50
|
async function handleButtonEvent(eventName: Ui3nButtonEventName, value?: Event) {
|
|
33
51
|
if (['init', 'enter'].includes(eventName)) {
|
|
34
52
|
// @ts-ignore
|
|
@@ -42,7 +60,9 @@
|
|
|
42
60
|
watch(
|
|
43
61
|
[() => props.color, () => props.textColor],
|
|
44
62
|
(newValue: [string | undefined, string | undefined], prevValue: [string | undefined, string | undefined]) => {
|
|
45
|
-
if (!buttonEl.value)
|
|
63
|
+
if (!buttonEl.value) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
46
66
|
|
|
47
67
|
const [prevColor, prevTextColor] = prevValue;
|
|
48
68
|
const [color, textColor] = newValue;
|
|
@@ -50,29 +70,31 @@
|
|
|
50
70
|
(props.type === 'custom' || props.type === 'icon') &&
|
|
51
71
|
color !== prevColor &&
|
|
52
72
|
buttonEl.value.style.setProperty(
|
|
53
|
-
'--ui3n-button-bg-color
|
|
73
|
+
'--ui3n-button-bg-color',
|
|
54
74
|
color ?? 'var(--color-bg-button-primary-default)',
|
|
55
75
|
);
|
|
56
76
|
|
|
57
|
-
props.type === 'custom' &&
|
|
77
|
+
(props.type === 'custom' || props.type === 'icon') &&
|
|
58
78
|
textColor !== prevTextColor &&
|
|
59
79
|
buttonEl.value.style.setProperty(
|
|
60
|
-
'--ui3n-button-text-color
|
|
61
|
-
textColor ?? 'var(--color-text-button-primary-default',
|
|
80
|
+
'--ui3n-button-text-color',
|
|
81
|
+
textColor ?? 'var(--color-text-button-primary-default)',
|
|
62
82
|
);
|
|
63
83
|
},
|
|
64
84
|
);
|
|
65
85
|
|
|
66
86
|
onMounted(() => {
|
|
67
|
-
if (!buttonEl.value)
|
|
87
|
+
if (!buttonEl.value) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
68
90
|
|
|
69
91
|
(props.type === 'custom' || props.type === 'icon') &&
|
|
70
92
|
props.color &&
|
|
71
|
-
buttonEl.value.style.setProperty('--ui3n-button-bg-color
|
|
93
|
+
buttonEl.value.style.setProperty('--ui3n-button-bg-color', props.color);
|
|
72
94
|
|
|
73
95
|
props.type === 'custom' &&
|
|
74
96
|
props.textColor &&
|
|
75
|
-
buttonEl.value.style.setProperty('--ui3n-button-text-color
|
|
97
|
+
buttonEl.value.style.setProperty('--ui3n-button-text-color', props.textColor);
|
|
76
98
|
|
|
77
99
|
handleButtonEvent('init');
|
|
78
100
|
});
|
|
@@ -94,9 +116,8 @@
|
|
|
94
116
|
v-if="icon"
|
|
95
117
|
:class="$style.buttonIcon"
|
|
96
118
|
:icon="icon"
|
|
97
|
-
:
|
|
98
|
-
:
|
|
99
|
-
:color="iconColor || 'var(--color-text-button-primary-default)'"
|
|
119
|
+
:size="currentIconSize"
|
|
120
|
+
:color="currentIconColor"
|
|
100
121
|
/>
|
|
101
122
|
|
|
102
123
|
<span
|
|
@@ -112,54 +133,72 @@
|
|
|
112
133
|
@use '../../assets/styles/mixins' as mixins;
|
|
113
134
|
|
|
114
135
|
.ui3nButton {
|
|
115
|
-
--ui3n-button-
|
|
136
|
+
--ui3n-button-height: 32px;
|
|
137
|
+
--ui3n-button-border-radius: calc(var(--ui3n-button-height) / 2);
|
|
138
|
+
--ui3n-button-outline-color: transparent;
|
|
139
|
+
--ui3n-button-padding: 0 var(--spacing-m);
|
|
140
|
+
--ui3n-button-padding-when-icon: var(--spacing-s);
|
|
116
141
|
--ui3n-button-text-size: var(--font-12);
|
|
117
|
-
--ui3n-button-text-color
|
|
118
|
-
--ui3n-button-bg-color
|
|
142
|
+
--ui3n-button-text-color: var(--color-text-button-primary-default);
|
|
143
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-default);
|
|
119
144
|
|
|
120
145
|
position: relative;
|
|
121
146
|
width: max-content;
|
|
147
|
+
height: var(--ui3n-button-height);
|
|
148
|
+
padding: var(--ui3n-button-padding);
|
|
122
149
|
display: flex;
|
|
123
150
|
justify-content: center;
|
|
124
151
|
align-items: center;
|
|
125
152
|
column-gap: var(--spacing-xs);
|
|
126
153
|
border: none;
|
|
127
|
-
|
|
128
|
-
|
|
154
|
+
border-radius: var(--ui3n-button-border-radius);
|
|
155
|
+
outline: 2px solid var(--ui3n-button-outline-color);
|
|
129
156
|
font-size: var(--ui3n-button-text-size);
|
|
130
157
|
font-weight: 600;
|
|
158
|
+
color: var(--ui3n-button-text-color);
|
|
159
|
+
background-color: var(--ui3n-button-bg-color);
|
|
131
160
|
user-select: none;
|
|
132
161
|
overflow: hidden;
|
|
162
|
+
transition:
|
|
163
|
+
background-color 0.2s,
|
|
164
|
+
transform 0.1s;
|
|
133
165
|
|
|
134
|
-
|
|
135
|
-
|
|
166
|
+
&.withIcon-left {
|
|
167
|
+
padding-left: var(--ui3n-button-padding-when-icon);
|
|
136
168
|
}
|
|
137
|
-
}
|
|
138
169
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
170
|
+
&.withIcon-right {
|
|
171
|
+
padding-right: var(--ui3n-button-padding-when-icon);
|
|
172
|
+
}
|
|
142
173
|
|
|
143
|
-
&.
|
|
144
|
-
|
|
174
|
+
&.square {
|
|
175
|
+
--ui3n-button-border-radius: calc(var(--ui3n-button-height) / 6);
|
|
145
176
|
}
|
|
146
177
|
|
|
147
|
-
|
|
148
|
-
|
|
178
|
+
&:not([disabled]) {
|
|
179
|
+
cursor: pointer;
|
|
149
180
|
}
|
|
150
181
|
}
|
|
151
182
|
|
|
152
|
-
.
|
|
153
|
-
height:
|
|
154
|
-
padding: 0 var(--spacing-
|
|
183
|
+
.regular {
|
|
184
|
+
--ui3n-button-height: 32px;
|
|
185
|
+
--ui3n-button-padding: 0 var(--spacing-m);
|
|
186
|
+
--ui3n-button-padding-when-icon: var(--spacing-s);
|
|
187
|
+
--ui3n-button-text-size: var(--font-12);
|
|
188
|
+
}
|
|
155
189
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
190
|
+
.small {
|
|
191
|
+
--ui3n-button-height: 24px;
|
|
192
|
+
--ui3n-button-padding: 0 var(--spacing-s);
|
|
193
|
+
--ui3n-button-padding-when-icon: var(--spacing-xs);
|
|
194
|
+
--ui3n-button-text-size: var(--font-12);
|
|
195
|
+
}
|
|
159
196
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
197
|
+
.large {
|
|
198
|
+
--ui3n-button-height: 48px;
|
|
199
|
+
--ui3n-button-padding: 0 var(--spacing-m);
|
|
200
|
+
--ui3n-button-padding-when-icon: var(--spacing-s);
|
|
201
|
+
--ui3n-button-text-size: var(--font-15);
|
|
163
202
|
}
|
|
164
203
|
|
|
165
204
|
.block {
|
|
@@ -167,117 +206,370 @@
|
|
|
167
206
|
}
|
|
168
207
|
|
|
169
208
|
.primary {
|
|
170
|
-
|
|
171
|
-
color: var(--color-text-button-primary-default);
|
|
209
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-default);
|
|
210
|
+
--ui3n-button-text-color: var(--color-text-button-primary-default);
|
|
172
211
|
|
|
173
212
|
&:hover {
|
|
174
|
-
|
|
175
|
-
color: var(--color-text-button-primary-hover);
|
|
213
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-hover);
|
|
214
|
+
--ui3n-button-text-color: var(--color-text-button-primary-hover);
|
|
176
215
|
}
|
|
177
216
|
|
|
178
217
|
&:focus {
|
|
179
|
-
|
|
218
|
+
--ui3n-button-text-color: var(--color-text-button-primary-default);
|
|
219
|
+
--ui3n-button-outline-color: oklch(from var(--color-bg-button-primary-default) calc(l - 0.185) c 260deg);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:active {
|
|
223
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-pressed);
|
|
224
|
+
--ui3n-button-text-color: var(--color-text-button-primary-pressed);
|
|
225
|
+
--ui3n-button-outline-color: transparent;
|
|
180
226
|
}
|
|
181
227
|
|
|
182
228
|
&[disabled] {
|
|
183
|
-
|
|
184
|
-
color: var(--color-text-button-primary-disabled);
|
|
229
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-disabled);
|
|
230
|
+
--ui3n-button-text-color: var(--color-text-button-primary-disabled);
|
|
231
|
+
|
|
232
|
+
opacity: 0.7;
|
|
185
233
|
pointer-events: none;
|
|
186
234
|
}
|
|
235
|
+
|
|
236
|
+
&.elevation {
|
|
237
|
+
--ui3n-button-text-color: var(--color-text-button-primary-default);
|
|
238
|
+
|
|
239
|
+
background-image: linear-gradient(
|
|
240
|
+
var(--color-bg-button-primary-default),
|
|
241
|
+
var(--color-bg-button-primary-hover)
|
|
242
|
+
);
|
|
243
|
+
box-shadow:
|
|
244
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
245
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.4),
|
|
246
|
+
inset 0 1px 1px 0 oklch(from var(--blue-0) l c h / 0.25);
|
|
247
|
+
|
|
248
|
+
.text {
|
|
249
|
+
text-shadow: 0 1px 0 oklch(from var(--blue-100) l c h / 0.25);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&:hover {
|
|
253
|
+
--ui3n-button-text-color: var(--color-text-button-primary-hover);
|
|
254
|
+
|
|
255
|
+
background-image: linear-gradient(
|
|
256
|
+
var(--color-bg-button-primary-default),
|
|
257
|
+
var(--color-bg-button-primary-pressed)
|
|
258
|
+
);
|
|
259
|
+
box-shadow:
|
|
260
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
261
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
262
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&:focus {
|
|
266
|
+
--ui3n-button-text-color: var(--color-text-button-primary-default);
|
|
267
|
+
--ui3n-button-outline-color: oklch(from var(--color-bg-button-primary-default) calc(l - 0.185) c 260deg);
|
|
268
|
+
|
|
269
|
+
background-image: linear-gradient(
|
|
270
|
+
var(--color-bg-button-primary-default),
|
|
271
|
+
var(--color-bg-button-primary-hover)
|
|
272
|
+
);
|
|
273
|
+
box-shadow:
|
|
274
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
275
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
276
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&:active {
|
|
280
|
+
--ui3n-button-text-color: var(--color-text-button-primary-pressed);
|
|
281
|
+
--ui3n-button-outline-color: transparent;
|
|
282
|
+
|
|
283
|
+
background-image: linear-gradient(
|
|
284
|
+
var(--color-bg-button-primary-hover),
|
|
285
|
+
var(--color-bg-button-primary-pressed)
|
|
286
|
+
);
|
|
287
|
+
box-shadow:
|
|
288
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
289
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
290
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&[disabled] {
|
|
294
|
+
--ui3n-button-bg-color: var(--color-bg-button-primary-disabled);
|
|
295
|
+
--ui3n-button-text-color: var(--color-text-button-primary-disabled);
|
|
296
|
+
|
|
297
|
+
opacity: 0.7;
|
|
298
|
+
background-image: none;
|
|
299
|
+
box-shadow: none;
|
|
300
|
+
pointer-events: none;
|
|
301
|
+
|
|
302
|
+
.text {
|
|
303
|
+
text-shadow: none;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
187
307
|
}
|
|
188
308
|
|
|
189
309
|
.secondary {
|
|
190
|
-
|
|
191
|
-
color: var(--color-text-button-secondary-default);
|
|
310
|
+
--ui3n-button-bg-color: var(--color-bg-button-secondary-default);
|
|
311
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-default);
|
|
192
312
|
|
|
193
313
|
&:hover {
|
|
194
|
-
|
|
195
|
-
color: var(--color-text-button-secondary-hover);
|
|
314
|
+
--ui3n-button-bg-color: var(--color-bg-button-secondary-hover);
|
|
315
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-hover);
|
|
196
316
|
}
|
|
197
317
|
|
|
198
318
|
&:focus {
|
|
199
|
-
|
|
319
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-default);
|
|
320
|
+
--ui3n-button-outline-color: oklch(from var(--color-bg-button-secondary-default) calc(l - 0.185) c 260deg);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:active {
|
|
324
|
+
--ui3n-button-bg-color: var(--color-bg-button-secondary-pressed);
|
|
325
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-pressed);
|
|
326
|
+
--ui3n-button-outline-color: transparent;
|
|
200
327
|
}
|
|
201
328
|
|
|
202
329
|
&[disabled] {
|
|
203
|
-
|
|
204
|
-
color: var(--color-text-button-secondary-disabled);
|
|
330
|
+
--ui3n-button-bg-color: var(--color-bg-button-secondary-disabled);
|
|
331
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-disabled);
|
|
332
|
+
|
|
333
|
+
opacity: 0.7;
|
|
205
334
|
pointer-events: none;
|
|
206
335
|
}
|
|
336
|
+
|
|
337
|
+
&.elevation {
|
|
338
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-default);
|
|
339
|
+
|
|
340
|
+
background-image: linear-gradient(
|
|
341
|
+
var(--color-bg-button-secondary-default),
|
|
342
|
+
var(--color-bg-button-secondary-hover)
|
|
343
|
+
);
|
|
344
|
+
box-shadow:
|
|
345
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
346
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
347
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
348
|
+
|
|
349
|
+
&:hover {
|
|
350
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-hover);
|
|
351
|
+
|
|
352
|
+
background-image: linear-gradient(
|
|
353
|
+
var(--color-bg-button-secondary-hover),
|
|
354
|
+
var(--color-bg-button-secondary-pressed)
|
|
355
|
+
);
|
|
356
|
+
box-shadow:
|
|
357
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
358
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
359
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
&:focus {
|
|
363
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-default);
|
|
364
|
+
--ui3n-button-outline-color: var(--color-border-button-secondary-focused);
|
|
365
|
+
|
|
366
|
+
background-image: linear-gradient(
|
|
367
|
+
var(--color-bg-button-secondary-default),
|
|
368
|
+
var(--color-bg-button-secondary-hover)
|
|
369
|
+
);
|
|
370
|
+
box-shadow:
|
|
371
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
372
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
373
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
&:active {
|
|
377
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-pressed);
|
|
378
|
+
--ui3n-button-outline-color: transparent;
|
|
379
|
+
|
|
380
|
+
background-image: linear-gradient(
|
|
381
|
+
var(--color-bg-button-secondary-hover),
|
|
382
|
+
var(--color-bg-button-secondary-pressed)
|
|
383
|
+
);
|
|
384
|
+
box-shadow:
|
|
385
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
386
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
387
|
+
inset 0 1px 1px 0 oklch(from var(--blue-30) l c h / 0.25);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&[disabled] {
|
|
391
|
+
--ui3n-button-bg-color: var(--color-bg-button-secondary-disabled);
|
|
392
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-disabled);
|
|
393
|
+
|
|
394
|
+
opacity: 0.7;
|
|
395
|
+
background-image: none;
|
|
396
|
+
box-shadow: none;
|
|
397
|
+
pointer-events: none;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
207
400
|
}
|
|
208
401
|
|
|
209
402
|
.tertiary {
|
|
210
|
-
|
|
211
|
-
color: var(--color-text-button-
|
|
212
|
-
line-height: calc(var(--ui3n-button-text-size) * 1.25);
|
|
213
|
-
padding: 0;
|
|
403
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-default);
|
|
404
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-default);
|
|
214
405
|
|
|
215
406
|
&:hover {
|
|
216
|
-
|
|
217
|
-
color: var(--color-text-button-
|
|
218
|
-
text-decoration: underline;
|
|
219
|
-
cursor: pointer;
|
|
407
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-hover);
|
|
408
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-hover);
|
|
220
409
|
}
|
|
221
410
|
|
|
222
411
|
&:focus {
|
|
223
|
-
|
|
412
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-default);
|
|
413
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-focused);
|
|
414
|
+
--ui3n-button-outline-color: oklch(from var(--color-bg-button-tritery-default) calc(l - 0.185) c 260deg);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
&:active {
|
|
418
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-pressed);
|
|
419
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-pressed);
|
|
420
|
+
--ui3n-button-outline-color: transparent;
|
|
224
421
|
}
|
|
225
422
|
|
|
226
423
|
&[disabled] {
|
|
227
|
-
|
|
228
|
-
color: var(--color-text-button-
|
|
424
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-disabled);
|
|
425
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-disabled);
|
|
426
|
+
|
|
427
|
+
opacity: 0.7;
|
|
229
428
|
pointer-events: none;
|
|
230
429
|
}
|
|
231
|
-
}
|
|
232
430
|
|
|
233
|
-
|
|
234
|
-
|
|
431
|
+
&.elevation {
|
|
432
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-default);
|
|
235
433
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
434
|
+
background-image: linear-gradient(
|
|
435
|
+
var(--color-bg-button-tritery-default),
|
|
436
|
+
var(--color-bg-button-tritery-hover)
|
|
437
|
+
);
|
|
438
|
+
box-shadow:
|
|
439
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
440
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
441
|
+
inset 0 1px 1px 0 var(--black-12);
|
|
239
442
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
width: var(--spacing-l);
|
|
243
|
-
padding: 0;
|
|
244
|
-
}
|
|
443
|
+
&:hover {
|
|
444
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-hover);
|
|
245
445
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
446
|
+
background-image: linear-gradient(
|
|
447
|
+
var(--color-bg-button-tritery-hover),
|
|
448
|
+
var(--color-bg-button-tritery-pressed)
|
|
449
|
+
);
|
|
450
|
+
box-shadow:
|
|
451
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
452
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
453
|
+
inset 0 1px 1px 0 var(--black-12);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&:focus {
|
|
457
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-focused);
|
|
458
|
+
--ui3n-button-outline-color: oklch(from var(--color-bg-button-tritery-default) calc(l - 0.185) c 260deg);
|
|
459
|
+
|
|
460
|
+
background-image: linear-gradient(
|
|
461
|
+
var(--color-bg-button-tritery-default),
|
|
462
|
+
var(--color-bg-button-tritery-hover)
|
|
463
|
+
);
|
|
464
|
+
box-shadow:
|
|
465
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
466
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
467
|
+
inset 0 1px 1px 0 var(--black-12);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
&:active {
|
|
471
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-pressed);
|
|
472
|
+
--ui3n-button-outline-color: transparent;
|
|
473
|
+
|
|
474
|
+
background-image: linear-gradient(
|
|
475
|
+
var(--color-bg-button-tritery-hover),
|
|
476
|
+
var(--color-bg-button-tritery-pressed)
|
|
477
|
+
);
|
|
478
|
+
box-shadow:
|
|
479
|
+
0 1px 1px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
480
|
+
0 2px 8px 0 oklch(from var(--blue-100) l c h / 0.25),
|
|
481
|
+
inset 0 1px 1px 0 var(--black-12);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
&[disabled] {
|
|
485
|
+
--ui3n-button-bg-color: var(--color-bg-button-tritery-disabled);
|
|
486
|
+
--ui3n-button-text-color: var(--color-text-button-tritery-disabled);
|
|
487
|
+
|
|
488
|
+
opacity: 0.7;
|
|
489
|
+
background-image: none;
|
|
490
|
+
box-shadow: none;
|
|
491
|
+
pointer-events: none;
|
|
492
|
+
}
|
|
250
493
|
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.outline {
|
|
497
|
+
--ui3n-button-bg-color: transparent;
|
|
498
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-default);
|
|
499
|
+
--ui3n-button-outline-color: var(--ui3n-button-text-color);
|
|
251
500
|
|
|
252
501
|
&:hover {
|
|
253
|
-
|
|
502
|
+
--ui3n-button-bg-color: oklch(from var(--color-text-button-secondary-default) l c h / 0.08);
|
|
503
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-hover);
|
|
504
|
+
--ui3n-button-outline-color: var(--ui3n-button-text-color);
|
|
254
505
|
}
|
|
255
506
|
|
|
256
507
|
&:focus {
|
|
257
|
-
|
|
508
|
+
--ui3n-button-bg-color: transparent;
|
|
509
|
+
--ui3n-button-text-color: oklch(
|
|
510
|
+
from var(--color-text-button-secondary-default) calc(l * 0.9) c calc(h * 1.1)
|
|
511
|
+
);
|
|
512
|
+
--ui3n-button-outline-color: var(--ui3n-button-text-color);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
&:active {
|
|
516
|
+
--ui3n-button-bg-color: oklch(from var(--color-text-button-secondary-default) l c h / 0.12);
|
|
517
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-pressed);
|
|
518
|
+
--ui3n-button-outline-color: var(--ui3n-button-text-color);
|
|
258
519
|
}
|
|
259
520
|
|
|
260
521
|
&[disabled] {
|
|
261
|
-
|
|
522
|
+
--ui3n-button-bg-color: transparent;
|
|
523
|
+
--ui3n-button-text-color: var(--color-text-button-secondary-disabled);
|
|
524
|
+
|
|
262
525
|
pointer-events: none;
|
|
263
526
|
}
|
|
264
527
|
}
|
|
265
528
|
|
|
266
|
-
.
|
|
267
|
-
|
|
529
|
+
.icon {
|
|
530
|
+
padding: 0 !important;
|
|
531
|
+
|
|
532
|
+
&:not(.square) {
|
|
533
|
+
border-radius: 50%;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
&.regular {
|
|
537
|
+
min-width: var(--spacing-l);
|
|
538
|
+
width: var(--spacing-l);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
&.small {
|
|
542
|
+
min-width: var(--spacing-ml);
|
|
543
|
+
width: var(--spacing-ml);
|
|
544
|
+
}
|
|
268
545
|
|
|
269
|
-
|
|
270
|
-
|
|
546
|
+
&.large {
|
|
547
|
+
min-width: var(--spacing-xxl);
|
|
548
|
+
width: var(--spacing-xxl);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
271
551
|
|
|
552
|
+
.icon,
|
|
553
|
+
.custom {
|
|
272
554
|
&:hover {
|
|
273
|
-
background: var(--ui3n-button-
|
|
555
|
+
background-color: oklch(from var(--ui3n-button-bg-color) calc(l - 0.185) c h);
|
|
274
556
|
}
|
|
275
557
|
|
|
276
558
|
&:focus {
|
|
277
|
-
outline:
|
|
559
|
+
--ui3n-button-outline-color: oklch(from var(--ui3n-button-bg-color) calc(l - 0.185) c h);
|
|
560
|
+
|
|
561
|
+
background-color: var(--ui3n-button-bg-color);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
&:active {
|
|
565
|
+
--ui3n-button-outline-color: transparent;
|
|
566
|
+
|
|
567
|
+
background-color: oklch(from var(--ui3n-button-bg-color) calc(l - 0.205) c h);
|
|
278
568
|
}
|
|
279
569
|
|
|
280
570
|
&[disabled] {
|
|
571
|
+
background-color: oklch(from var(--ui3n-button-bg-color) calc(l + 0.15) c h);
|
|
572
|
+
color: oklch(from var(--ui3n-button-text-color) calc(l + 0.15) c 260deg);
|
|
281
573
|
opacity: 0.7;
|
|
282
574
|
pointer-events: none;
|
|
283
575
|
}
|
|
@@ -298,10 +590,6 @@
|
|
|
298
590
|
.text {
|
|
299
591
|
display: inline-block;
|
|
300
592
|
max-width: 100%;
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.elevation {
|
|
305
|
-
@include mixins.elevation();
|
|
593
|
+
user-select: none;
|
|
306
594
|
}
|
|
307
595
|
</style>
|