@v1nt1248/3nclient-lib 0.3.51 → 0.4.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/README.md +2 -0
- package/dist/chunks/{ui3n-notification-o0tuhTpO.js → ui3n-notification-CTYQV3nR.js} +38 -37
- package/dist/src/components/ui3n-chip/ui3n-chip.d.ts +0 -5
- package/dist/src/components/ui3n-icon/ui3n-icon.d.ts +0 -1
- package/dist/src/components/ui3n-progress/ui3n-progress-circular.d.ts +0 -2
- package/dist/src/components/ui3n-progress/ui3n-progress-linear.d.ts +0 -2
- package/dist/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.d.ts +0 -7
- package/dist/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +0 -7
- package/dist/src/components/ui3n-slider/ui3n-slider.d.ts +0 -5
- package/dist/src/components/ui3n-tabs/ui3n-tabs.d.ts +0 -4
- package/dist/src/components/ui3n-tooltip/ui3n-tooltip.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +1697 -1748
- package/dist/ui3n-plugins.js +2 -1
- package/package.json +11 -4
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +28 -25
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +18 -17
- package/src/components/ui3n-badge/ui3n-badge.vue +3 -2
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +11 -10
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +4 -1
- package/src/components/ui3n-button/ui3n-button.vue +244 -158
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +22 -21
- package/src/components/ui3n-chip/ui3n-chip.vue +56 -40
- package/src/components/ui3n-dialog/ui3n-dialog-provider.vue +1 -0
- package/src/components/ui3n-dialog/ui3n-dialog.vue +19 -18
- package/src/components/ui3n-drop-files/ui3n-drop-files.vue +8 -7
- package/src/components/ui3n-editable/ui3n-content-editable.vue +11 -10
- package/src/components/ui3n-editable/ui3n-editable.vue +26 -25
- package/src/components/ui3n-emoji/ui3n-emoji.vue +7 -6
- package/src/components/ui3n-icon/ui3n-icon.vue +26 -16
- package/src/components/ui3n-input/ui3n-input.vue +36 -32
- package/src/components/ui3n-input-file/ui3n-input-file.vue +8 -5
- package/src/components/ui3n-list/ui3n-list.vue +8 -7
- package/src/components/ui3n-menu/ui3n-menu.vue +6 -5
- package/src/components/ui3n-mobile-menu/ui3n-mobile-menu.vue +4 -3
- package/src/components/ui3n-mobile-menu-item/ui3n-mobile-menu-item.vue +7 -6
- package/src/components/ui3n-notification/ui3n-notification-container.vue +1 -0
- package/src/components/ui3n-notification/ui3n-notification.vue +28 -26
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +32 -19
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +31 -18
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +4 -1
- package/src/components/ui3n-radio-group/ui3n-radio.vue +6 -5
- package/src/components/ui3n-scrollbar/ui3n-scrollbar.vue +94 -83
- package/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.vue +51 -39
- package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +51 -39
- package/src/components/ui3n-selector/ui3n-selector.vue +33 -28
- package/src/components/ui3n-slider/ui3n-slider.vue +53 -34
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +10 -6
- package/src/components/ui3n-switch/ui3n-switch.vue +23 -22
- package/src/components/ui3n-table/ui3n-table.vue +50 -48
- package/src/components/ui3n-tabs/ui3n-tabs.vue +38 -20
- package/src/components/ui3n-text/ui3n-text.vue +15 -14
- package/src/components/ui3n-tooltip/ui3n-tooltip-old.vue +14 -11
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +38 -27
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
<template>
|
|
192
192
|
<div
|
|
193
193
|
:id="id"
|
|
194
|
+
data-ui3n="input"
|
|
194
195
|
:class="[
|
|
195
196
|
$style.ui3nInput,
|
|
196
197
|
size === 'large' && $style.large,
|
|
@@ -287,38 +288,41 @@
|
|
|
287
288
|
|
|
288
289
|
<style lang="scss" module>
|
|
289
290
|
.ui3nInput {
|
|
290
|
-
--ui3n-input-height
|
|
291
|
-
--ui3n-input-label-font-size
|
|
292
|
-
--ui3n-input-font-size
|
|
293
|
-
--ui3n-input-message-font-size
|
|
294
|
-
--
|
|
295
|
-
--ui3n-input-padding-x
|
|
296
|
-
--
|
|
297
|
-
--ui3n-input-outer-padding-top
|
|
298
|
-
--ui3n-input-outer-padding-bottom
|
|
299
|
-
--ui3n-input-outer-padding-x
|
|
291
|
+
--_input-height: var(--ui3n-input-height, 32px);
|
|
292
|
+
--_input-label-font-size: var(--ui3n-input-label-font-size, 12px);
|
|
293
|
+
--_input-font-size: var(--ui3n-input-font-size, 13px);
|
|
294
|
+
--_input-message-font-size: var(--ui3n-input-message-font-size, 10px);
|
|
295
|
+
--_input-border-radius: var(--ui3n-input-border-radius, 4px);
|
|
296
|
+
--_input-padding-x: var(--ui3n-input-padding-x, 8px);
|
|
297
|
+
--_input-message-top: var(--ui3n-input-message-top, calc(var(--_input-height) + 16px + 2px));
|
|
298
|
+
--_input-outer-padding-top: var(--ui3n-input-outer-padding-top, 1px);
|
|
299
|
+
--_input-outer-padding-bottom: var(--ui3n-input-outer-padding-bottom, 15px);
|
|
300
|
+
--_input-outer-padding-x: var(--ui3n-input-outer-padding-x, 1px);
|
|
300
301
|
|
|
301
302
|
&.withLabel {
|
|
302
|
-
--
|
|
303
|
-
|
|
303
|
+
--_input-message-top: var(
|
|
304
|
+
--ui3n-input-message-top,
|
|
305
|
+
calc(var(--_input-height) + calc(var(--_input-label-font-size) * 1.33) + 6px)
|
|
304
306
|
);
|
|
305
307
|
}
|
|
306
308
|
|
|
309
|
+
/* The large size reads its own variable first, then the one shared by both sizes. */
|
|
307
310
|
&.large {
|
|
308
|
-
--ui3n-input-height
|
|
309
|
-
--ui3n-input-font-size
|
|
310
|
-
--ui3n-input-border-radius
|
|
311
|
-
--ui3n-input-padding-x
|
|
311
|
+
--_input-height: var(--ui3n-input-height-large, var(--ui3n-input-height, 48px));
|
|
312
|
+
--_input-font-size: var(--ui3n-input-font-size-large, var(--ui3n-input-font-size, 16px));
|
|
313
|
+
--_input-border-radius: var(--ui3n-input-border-radius-large, var(--ui3n-input-border-radius, 8px));
|
|
314
|
+
--_input-padding-x: var(--ui3n-input-padding-x-large, var(--ui3n-input-padding-x, 12px));
|
|
312
315
|
}
|
|
313
316
|
|
|
314
317
|
position: relative;
|
|
315
318
|
width: 100%;
|
|
316
|
-
padding: var(--
|
|
317
|
-
var(--
|
|
318
|
-
border-radius: var(--
|
|
319
|
+
padding: var(--_input-outer-padding-top) var(--_input-outer-padding-x)
|
|
320
|
+
var(--_input-outer-padding-bottom) var(--_input-outer-padding-x);
|
|
321
|
+
border-radius: var(--_input-border-radius);
|
|
319
322
|
|
|
323
|
+
/* hideBottomSpace removes the space, so it doesn't read the public variable */
|
|
320
324
|
&.withoutBottomSpace {
|
|
321
|
-
--
|
|
325
|
+
--_input-outer-padding-bottom: 0;
|
|
322
326
|
}
|
|
323
327
|
|
|
324
328
|
&:hover {
|
|
@@ -342,7 +346,7 @@
|
|
|
342
346
|
.ui3nInputLabel {
|
|
343
347
|
display: block;
|
|
344
348
|
width: 100%;
|
|
345
|
-
font-size: var(--
|
|
349
|
+
font-size: var(--_input-label-font-size);
|
|
346
350
|
line-height: 1.33;
|
|
347
351
|
font-weight: 500;
|
|
348
352
|
color: var(--color-text-control-primary-default);
|
|
@@ -352,8 +356,8 @@
|
|
|
352
356
|
.inputWrapper {
|
|
353
357
|
display: flex;
|
|
354
358
|
align-items: center;
|
|
355
|
-
height: var(--
|
|
356
|
-
border-radius: var(--
|
|
359
|
+
height: var(--_input-height);
|
|
360
|
+
border-radius: var(--_input-border-radius);
|
|
357
361
|
background-color: var(--color-bg-control-secondary-default);
|
|
358
362
|
transition: background-color 0.2s ease-in-out;
|
|
359
363
|
}
|
|
@@ -367,9 +371,9 @@
|
|
|
367
371
|
border: none;
|
|
368
372
|
outline: none;
|
|
369
373
|
height: 100%;
|
|
370
|
-
padding: 0 var(--
|
|
374
|
+
padding: 0 var(--_input-padding-x);
|
|
371
375
|
background-color: transparent;
|
|
372
|
-
font-size: var(--
|
|
376
|
+
font-size: var(--_input-font-size);
|
|
373
377
|
line-height: 1.23;
|
|
374
378
|
font-weight: 400;
|
|
375
379
|
color: var(--color-text-control-primary-default);
|
|
@@ -378,7 +382,7 @@
|
|
|
378
382
|
&::placeholder {
|
|
379
383
|
color: var(--color-text-control-secondary-default);
|
|
380
384
|
font-style: italic;
|
|
381
|
-
font-size: var(--
|
|
385
|
+
font-size: var(--_input-font-size);
|
|
382
386
|
font-weight: 400;
|
|
383
387
|
}
|
|
384
388
|
|
|
@@ -400,7 +404,7 @@
|
|
|
400
404
|
display: flex;
|
|
401
405
|
align-items: center;
|
|
402
406
|
flex-shrink: 0;
|
|
403
|
-
padding-left: calc(var(--
|
|
407
|
+
padding-left: calc(var(--_input-padding-x) / 2);
|
|
404
408
|
}
|
|
405
409
|
|
|
406
410
|
.appendIconSlot {
|
|
@@ -408,18 +412,18 @@
|
|
|
408
412
|
align-items: center;
|
|
409
413
|
flex-shrink: 0;
|
|
410
414
|
gap: 4px;
|
|
411
|
-
padding-right: calc(var(--
|
|
415
|
+
padding-right: calc(var(--_input-padding-x) / 2);
|
|
412
416
|
}
|
|
413
417
|
|
|
414
418
|
.withPrepend {
|
|
415
419
|
.ui3nInputField {
|
|
416
|
-
padding-left: calc(var(--
|
|
420
|
+
padding-left: calc(var(--_input-padding-x) / 2);
|
|
417
421
|
}
|
|
418
422
|
}
|
|
419
423
|
|
|
420
424
|
.withAppend {
|
|
421
425
|
.ui3nInputField {
|
|
422
|
-
padding-right: calc(var(--
|
|
426
|
+
padding-right: calc(var(--_input-padding-x) / 2);
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
429
|
|
|
@@ -431,9 +435,9 @@
|
|
|
431
435
|
position: absolute;
|
|
432
436
|
left: 0;
|
|
433
437
|
width: 100%;
|
|
434
|
-
top: calc(var(--
|
|
438
|
+
top: calc(var(--_input-message-top) + 2px);
|
|
435
439
|
font-style: italic;
|
|
436
|
-
font-size: var(--
|
|
440
|
+
font-size: var(--_input-message-font-size);
|
|
437
441
|
font-weight: 400;
|
|
438
442
|
line-height: 1.2;
|
|
439
443
|
}
|
|
@@ -133,7 +133,10 @@
|
|
|
133
133
|
</script>
|
|
134
134
|
|
|
135
135
|
<template>
|
|
136
|
-
<div
|
|
136
|
+
<div
|
|
137
|
+
data-ui3n="input-file"
|
|
138
|
+
:class="$style.ui3nInputFile"
|
|
139
|
+
>
|
|
137
140
|
<label
|
|
138
141
|
:for="id"
|
|
139
142
|
:class="[$style.label, disabled && $style.disabled]"
|
|
@@ -158,19 +161,19 @@
|
|
|
158
161
|
|
|
159
162
|
<style lang="scss" module>
|
|
160
163
|
.ui3nInputFile {
|
|
161
|
-
--ui3n-input-file-font-size
|
|
162
|
-
--ui3n-input-file-padding-inline
|
|
164
|
+
--_input-file-font-size: var(--ui3n-input-file-font-size, 12px);
|
|
165
|
+
--_input-file-padding-inline: var(--ui3n-input-file-padding-inline, 4px);
|
|
163
166
|
|
|
164
167
|
position: relative;
|
|
165
168
|
width: max-content;
|
|
166
169
|
}
|
|
167
170
|
|
|
168
171
|
.label {
|
|
169
|
-
font-size: var(--
|
|
172
|
+
font-size: var(--_input-file-font-size);
|
|
170
173
|
font-weight: 500;
|
|
171
174
|
line-height: 1.33;
|
|
172
175
|
color: var(--color-text-button-secondary-default);
|
|
173
|
-
padding: 0 var(--
|
|
176
|
+
padding: 0 var(--_input-file-padding-inline);
|
|
174
177
|
cursor: pointer;
|
|
175
178
|
|
|
176
179
|
&:hover {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<div
|
|
17
17
|
ref="listElement"
|
|
18
18
|
:id="id"
|
|
19
|
+
data-ui3n="list"
|
|
19
20
|
:class="$style.ui3nList"
|
|
20
21
|
>
|
|
21
22
|
<div :class="[$style.ui3nListTitle, sticky && $style.ui3nListTitleSticky]">
|
|
@@ -54,14 +55,14 @@
|
|
|
54
55
|
|
|
55
56
|
<style lang="scss" module>
|
|
56
57
|
.ui3nList {
|
|
57
|
-
--ui3n-list-item-height
|
|
58
|
-
--ui3n-list-bg-color
|
|
59
|
-
--ui3n-list-padding-block
|
|
58
|
+
--_list-item-height: var(--ui3n-list-item-height, 28px);
|
|
59
|
+
--_list-bg-color: var(--ui3n-list-bg-color, transparent);
|
|
60
|
+
--_list-padding-block: var(--ui3n-list-padding-block, 4px);
|
|
60
61
|
|
|
61
62
|
position: relative;
|
|
62
63
|
width: 100%;
|
|
63
64
|
height: 100%;
|
|
64
|
-
background-color: var(--
|
|
65
|
+
background-color: var(--_list-bg-color);
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
.ui3nListTitle {
|
|
@@ -82,8 +83,8 @@
|
|
|
82
83
|
.ui3nListItem {
|
|
83
84
|
position: relative;
|
|
84
85
|
width: 100%;
|
|
85
|
-
min-height: var(--
|
|
86
|
-
padding: var(--
|
|
86
|
+
min-height: var(--_list-item-height);
|
|
87
|
+
padding: var(--_list-padding-block) 0;
|
|
87
88
|
display: flex;
|
|
88
89
|
justify-content: flex-start;
|
|
89
90
|
align-items: center;
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
z-index: 1;
|
|
94
95
|
font-size: 16px;
|
|
95
96
|
font-weight: 600;
|
|
96
|
-
background-color: var(--
|
|
97
|
+
background-color: var(--_list-bg-color);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
.ui3nListItemContent {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
|
|
86
86
|
return {
|
|
87
87
|
...floatingStyles.value,
|
|
88
|
-
'--ui3n-menu-
|
|
88
|
+
'--ui3n-menu-z-index': String(props.zIndex),
|
|
89
89
|
...(contentBorderRadiusStr && { '--ui3n-menu-content-border-radius': contentBorderRadiusStr }),
|
|
90
90
|
...(props.contentStyles || {}),
|
|
91
91
|
};
|
|
@@ -269,6 +269,7 @@
|
|
|
269
269
|
<div
|
|
270
270
|
ref="menu-element"
|
|
271
271
|
:id="id"
|
|
272
|
+
data-ui3n="menu"
|
|
272
273
|
:class="$style.ui3nMenu"
|
|
273
274
|
:style="rootStyles"
|
|
274
275
|
@click="emits('click', $event)"
|
|
@@ -298,7 +299,7 @@
|
|
|
298
299
|
@use '../../assets/styles/mixins' as mixins;
|
|
299
300
|
|
|
300
301
|
.ui3nMenu {
|
|
301
|
-
--ui3n-menu-content-bg
|
|
302
|
+
--_menu-content-bg: var(--ui3n-menu-content-bg, var(--color-bg-control-secondary-default));
|
|
302
303
|
|
|
303
304
|
position: relative;
|
|
304
305
|
display: inline-block;
|
|
@@ -317,9 +318,9 @@
|
|
|
317
318
|
|
|
318
319
|
.ui3nMenuContent {
|
|
319
320
|
position: absolute;
|
|
320
|
-
border-radius: var(--ui3n-menu-content-border-radius);
|
|
321
|
-
background-color: var(--
|
|
322
|
-
z-index: var(--ui3n-menu-
|
|
321
|
+
border-radius: var(--ui3n-menu-content-border-radius, 4px);
|
|
322
|
+
background-color: var(--_menu-content-bg);
|
|
323
|
+
z-index: var(--ui3n-menu-z-index, 1000);
|
|
323
324
|
overflow: hidden;
|
|
324
325
|
@include mixins.dropShadow();
|
|
325
326
|
}
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
27
|
<div
|
|
28
|
+
data-ui3n="mobile-menu"
|
|
28
29
|
:class="$style.ui3nMobileMenu"
|
|
29
30
|
:style="inlineStyles"
|
|
30
31
|
>
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
@use '../../assets/styles/mixins' as mixins;
|
|
82
83
|
|
|
83
84
|
.ui3nMobileMenu {
|
|
84
|
-
--ui3n-menu-width-custom
|
|
85
|
+
--_menu-width-custom: var(--ui3n-menu-width-custom, 240px);
|
|
85
86
|
|
|
86
87
|
display: inline-block;
|
|
87
88
|
width: max-content;
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
position: relative;
|
|
111
112
|
top: 0;
|
|
112
113
|
left: 0;
|
|
113
|
-
width: var(--
|
|
114
|
+
width: var(--_menu-width-custom);
|
|
114
115
|
max-width: 80vw;
|
|
115
116
|
display: flex;
|
|
116
117
|
flex-direction: column;
|
|
@@ -180,7 +181,7 @@
|
|
|
180
181
|
|
|
181
182
|
.slide-fade-enter-from,
|
|
182
183
|
.slide-fade-leave-to {
|
|
183
|
-
transform: translateX(calc(var(--
|
|
184
|
+
transform: translateX(calc(var(--_menu-width-custom) * -1));
|
|
184
185
|
opacity: 0;
|
|
185
186
|
|
|
186
187
|
div[class*='menuPanel'] {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
14
|
<div
|
|
15
|
+
data-ui3n="mobile-menu-item"
|
|
15
16
|
:class="[$style.menuItem, isActive && $style.menuItemSelected]"
|
|
16
17
|
@click="selectMenuItem"
|
|
17
18
|
>
|
|
@@ -33,18 +34,18 @@
|
|
|
33
34
|
.menuItem {
|
|
34
35
|
display: flex;
|
|
35
36
|
width: 100%;
|
|
36
|
-
height: var(--
|
|
37
|
-
border-radius: var(--
|
|
37
|
+
height: var(--ui3n-mobile-menu-item-height, 48px);
|
|
38
|
+
border-radius: var(--ui3n-mobile-menu-item-border-radius, 8px);
|
|
38
39
|
justify-content: flex-start;
|
|
39
40
|
align-items: center;
|
|
40
|
-
column-gap: var(--
|
|
41
|
-
padding: 0 var(--
|
|
41
|
+
column-gap: var(--ui3n-mobile-menu-item-gap, 8px);
|
|
42
|
+
padding: 0 var(--ui3n-mobile-menu-item-padding-inline, 8px);
|
|
42
43
|
cursor: pointer;
|
|
43
44
|
|
|
44
45
|
.menuItemName {
|
|
45
|
-
font-size: var(--font-
|
|
46
|
+
font-size: var(--ui3n-mobile-menu-item-font-size, 14px);
|
|
46
47
|
font-weight: 600;
|
|
47
|
-
line-height: var(--
|
|
48
|
+
line-height: var(--ui3n-mobile-menu-item-line-height, 20px);
|
|
48
49
|
color: var(--color-text-control-primary-default);
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
<template>
|
|
84
84
|
<div
|
|
85
85
|
:id="id"
|
|
86
|
+
data-ui3n="notification"
|
|
86
87
|
:class="mainCssClasses"
|
|
87
88
|
:style="inlineStyles"
|
|
88
89
|
>
|
|
@@ -117,26 +118,27 @@
|
|
|
117
118
|
|
|
118
119
|
<style lang="scss" module>
|
|
119
120
|
.ui3nNotification {
|
|
120
|
-
--ui3n-notification-width
|
|
121
|
-
--ui3n-notification-font-size
|
|
122
|
-
--ui3n-notification-border-radius
|
|
123
|
-
--ui3n-notification-margin-bottom
|
|
124
|
-
--ui3n-notification-icon-size
|
|
125
|
-
--
|
|
121
|
+
--_notification-width: var(--ui3n-notification-width, 380px);
|
|
122
|
+
--_notification-font-size: var(--ui3n-notification-font-size, 12px);
|
|
123
|
+
--_notification-border-radius: var(--ui3n-notification-border-radius, 8px);
|
|
124
|
+
--_notification-margin-bottom: var(--ui3n-notification-margin-bottom, 4px);
|
|
125
|
+
--_notification-icon-size: var(--ui3n-notification-icon-size, 32px);
|
|
126
|
+
--_notification-padding: var(--ui3n-notification-padding, 16px);
|
|
127
|
+
--_notification-text-color: var(--ui3n-notification-text-color, var(--default-content-default));
|
|
126
128
|
|
|
127
129
|
display: flex;
|
|
128
130
|
position: relative;
|
|
129
131
|
box-sizing: border-box;
|
|
130
132
|
z-index: 5000;
|
|
131
|
-
border-radius: var(--
|
|
133
|
+
border-radius: var(--_notification-border-radius);
|
|
132
134
|
outline: 1px solid var(--color-border-block-primary-default);
|
|
133
|
-
padding: var(--
|
|
134
|
-
max-width: var(--
|
|
135
|
-
margin-bottom: var(--
|
|
135
|
+
padding: var(--_notification-padding);
|
|
136
|
+
max-width: var(--_notification-width);
|
|
137
|
+
margin-bottom: var(--_notification-margin-bottom);
|
|
136
138
|
justify-content: center;
|
|
137
139
|
align-items: center;
|
|
138
140
|
gap: 8px;
|
|
139
|
-
color: var(--
|
|
141
|
+
color: var(--_notification-text-color);
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
.withIcon {
|
|
@@ -145,10 +147,10 @@
|
|
|
145
147
|
|
|
146
148
|
.ui3nNotificationIcon {
|
|
147
149
|
position: relative;
|
|
148
|
-
min-width: var(--
|
|
149
|
-
width: var(--
|
|
150
|
-
min-height: var(--
|
|
151
|
-
height: var(--
|
|
150
|
+
min-width: var(--_notification-icon-size);
|
|
151
|
+
width: var(--_notification-icon-size);
|
|
152
|
+
min-height: var(--_notification-icon-size);
|
|
153
|
+
height: var(--_notification-icon-size);
|
|
152
154
|
border-radius: 50%;
|
|
153
155
|
display: flex;
|
|
154
156
|
justify-content: center;
|
|
@@ -159,11 +161,11 @@
|
|
|
159
161
|
.ui3nNotificationContent {
|
|
160
162
|
position: relative;
|
|
161
163
|
flex-grow: 2;
|
|
162
|
-
font-size: var(--
|
|
164
|
+
font-size: var(--_notification-font-size);
|
|
163
165
|
font-weight: 500;
|
|
164
166
|
line-height: 1.33;
|
|
165
167
|
padding-right: 20px;
|
|
166
|
-
color: var(--
|
|
168
|
+
color: var(--_notification-text-color);
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
.closeBtn {
|
|
@@ -171,11 +173,11 @@
|
|
|
171
173
|
z-index: 1;
|
|
172
174
|
top: 6px;
|
|
173
175
|
right: 6px;
|
|
174
|
-
color: var(--
|
|
176
|
+
color: var(--_notification-text-color);
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
.infoType {
|
|
178
|
-
--ui3n-notification-text-color
|
|
180
|
+
--_notification-text-color: var(--ui3n-notification-text-color, var(--info-content-default));
|
|
179
181
|
|
|
180
182
|
background-color: var(--info-fill-default);
|
|
181
183
|
|
|
@@ -186,12 +188,12 @@
|
|
|
186
188
|
:global(.dark-theme) &,
|
|
187
189
|
:global(.midnight-theme) &,
|
|
188
190
|
:global(.dark2-theme) & {
|
|
189
|
-
--ui3n-notification-text-color
|
|
191
|
+
--_notification-text-color: var(--ui3n-notification-text-color, oklch(from var(--info-content-default) calc(l + 0.15) c h));
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
.successType {
|
|
194
|
-
--ui3n-notification-text-color
|
|
196
|
+
--_notification-text-color: var(--ui3n-notification-text-color, var(--success-content-default));
|
|
195
197
|
|
|
196
198
|
background-color: var(--success-fill-default);
|
|
197
199
|
|
|
@@ -202,12 +204,12 @@
|
|
|
202
204
|
:global(.dark-theme) &,
|
|
203
205
|
:global(.midnight-theme) &,
|
|
204
206
|
:global(.dark2-theme) & {
|
|
205
|
-
--ui3n-notification-text-color
|
|
207
|
+
--_notification-text-color: var(--ui3n-notification-text-color, oklch(from var(--success-content-default) calc(l + 0.15) c h));
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
.warningType {
|
|
210
|
-
--ui3n-notification-text-color
|
|
212
|
+
--_notification-text-color: var(--ui3n-notification-text-color, var(--warning-content-default));
|
|
211
213
|
|
|
212
214
|
background-color: var(--warning-fill-default);
|
|
213
215
|
|
|
@@ -218,12 +220,12 @@
|
|
|
218
220
|
:global(.dark-theme) &,
|
|
219
221
|
:global(.midnight-theme) &,
|
|
220
222
|
:global(.dark2-theme) & {
|
|
221
|
-
--ui3n-notification-text-color
|
|
223
|
+
--_notification-text-color: var(--ui3n-notification-text-color, color-mix(in oklch, var(--warning-content-default) 45%, white));
|
|
222
224
|
}
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
.errorType {
|
|
226
|
-
--ui3n-notification-text-color
|
|
228
|
+
--_notification-text-color: var(--ui3n-notification-text-color, var(--error-content-default));
|
|
227
229
|
|
|
228
230
|
background-color: var(--error-fill-default);
|
|
229
231
|
|
|
@@ -234,7 +236,7 @@
|
|
|
234
236
|
:global(.dark-theme) &,
|
|
235
237
|
:global(.midnight-theme) &,
|
|
236
238
|
:global(.dark2-theme) & {
|
|
237
|
-
--ui3n-notification-text-color
|
|
239
|
+
--_notification-text-color: var(--ui3n-notification-text-color, color-mix(in oklch, var(--error-content-default) 45%, white));
|
|
238
240
|
}
|
|
239
241
|
}
|
|
240
242
|
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
const props = withDefaults(defineProps<Ui3nProgressCircularProps>(), {
|
|
6
6
|
value: 0,
|
|
7
7
|
size: 64,
|
|
8
|
-
bgColor: 'var(--color-bg-control-primary-default)',
|
|
9
|
-
color: 'var(--color-bg-control-accent-default)',
|
|
10
8
|
indeterminate: false,
|
|
11
9
|
withText: false,
|
|
12
10
|
});
|
|
@@ -38,17 +36,29 @@
|
|
|
38
36
|
|
|
39
37
|
const fontSize = computed(() => `${Math.floor(innerSize.value / 3.8)}px`);
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
/* the geometry is computed here; the colours default in CSS */
|
|
40
|
+
const progressStyle = computed(() => {
|
|
41
|
+
const styles: Record<string, string> = {
|
|
42
|
+
'--ui3n-progress-circular-size': `${innerSize.value}px`,
|
|
43
|
+
'--ui3n-progress-circular-font-size': fontSize.value,
|
|
44
|
+
'--ui3n-progress-virtual-width': String(virtualStrokeWidth.value),
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
if (props.bgColor) {
|
|
48
|
+
styles['--ui3n-progress-circular-bg'] = props.bgColor;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (props.color) {
|
|
52
|
+
styles['--ui3n-progress-circular-color'] = props.color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return styles;
|
|
56
|
+
});
|
|
48
57
|
</script>
|
|
49
58
|
|
|
50
59
|
<template>
|
|
51
60
|
<div
|
|
61
|
+
data-ui3n="progress-circular"
|
|
52
62
|
:style="progressStyle"
|
|
53
63
|
:class="[$style.ui3nProgressCircular, indeterminate && $style.indeterminate]"
|
|
54
64
|
>
|
|
@@ -85,12 +95,15 @@
|
|
|
85
95
|
|
|
86
96
|
<style lang="scss" module>
|
|
87
97
|
.ui3nProgressCircular {
|
|
98
|
+
--_progress-circular-bg: var(--ui3n-progress-circular-bg, var(--color-bg-control-primary-default));
|
|
99
|
+
--_progress-circular-color: var(--ui3n-progress-circular-color, var(--color-bg-control-accent-default));
|
|
100
|
+
|
|
88
101
|
position: relative;
|
|
89
102
|
display: inline-flex;
|
|
90
|
-
min-width: var(--ui3n-progress-circular-size);
|
|
91
|
-
width: var(--ui3n-progress-circular-size);
|
|
92
|
-
min-height: var(--ui3n-progress-circular-size);
|
|
93
|
-
height: var(--ui3n-progress-circular-size);
|
|
103
|
+
min-width: var(--ui3n-progress-circular-size, 64px);
|
|
104
|
+
width: var(--ui3n-progress-circular-size, 64px);
|
|
105
|
+
min-height: var(--ui3n-progress-circular-size, 64px);
|
|
106
|
+
height: var(--ui3n-progress-circular-size, 64px);
|
|
94
107
|
justify-content: center;
|
|
95
108
|
align-items: center;
|
|
96
109
|
user-select: none;
|
|
@@ -104,15 +117,15 @@
|
|
|
104
117
|
|
|
105
118
|
.background {
|
|
106
119
|
fill: none;
|
|
107
|
-
stroke: var(--
|
|
108
|
-
stroke-width: var(--ui3n-progress-virtual-width);
|
|
120
|
+
stroke: var(--_progress-circular-bg);
|
|
121
|
+
stroke-width: var(--ui3n-progress-virtual-width, 8);
|
|
109
122
|
transition: stroke 0.2s ease;
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
.chart {
|
|
113
126
|
fill: none;
|
|
114
|
-
stroke: var(--
|
|
115
|
-
stroke-width: var(--ui3n-progress-virtual-width);
|
|
127
|
+
stroke: var(--_progress-circular-color);
|
|
128
|
+
stroke-width: var(--ui3n-progress-virtual-width, 8);
|
|
116
129
|
transition:
|
|
117
130
|
stroke-dasharray 0.2s ease-in-out,
|
|
118
131
|
stroke 0.2s ease;
|
|
@@ -124,10 +137,10 @@
|
|
|
124
137
|
display: flex;
|
|
125
138
|
justify-content: center;
|
|
126
139
|
align-items: center;
|
|
127
|
-
font-size: var(--ui3n-progress-circular-font-size);
|
|
140
|
+
font-size: var(--ui3n-progress-circular-font-size, 16px);
|
|
128
141
|
font-weight: 600;
|
|
129
142
|
line-height: 1;
|
|
130
|
-
color: var(--
|
|
143
|
+
color: var(--_progress-circular-color);
|
|
131
144
|
}
|
|
132
145
|
|
|
133
146
|
.indeterminate {
|