@v1nt1248/3nclient-lib 0.1.26 → 0.1.27
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/dist/components/ui3n-radio-group/types.d.ts +1 -1
- package/dist/components/ui3n-radio-group/ui3n-radio-group.vue.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +5457 -5447
- package/dist/ui3n-plugins.js +2057 -2049
- package/dist/variables.css +40 -0
- package/package.json +1 -1
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +6 -6
- package/src/components/ui3n-badge/ui3n-badge.vue +6 -6
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +17 -7
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +2 -2
- package/src/components/ui3n-button/ui3n-button.vue +30 -15
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +29 -10
- package/src/components/ui3n-chip/ui3n-chip.vue +19 -15
- package/src/components/ui3n-dialog/ui3n-dialog.vue +10 -10
- package/src/components/ui3n-drop-files/ui3n-drop-files.vue +17 -17
- package/src/components/ui3n-emoji/ui3n-emoji.vue +2 -2
- package/src/components/ui3n-input/ui3n-input.vue +73 -54
- package/src/components/ui3n-list/ui3n-list.vue +15 -15
- package/src/components/ui3n-menu/ui3n-menu.vue +7 -7
- package/src/components/ui3n-notification/ui3n-notification.vue +32 -23
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +2 -2
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +2 -2
- package/src/components/ui3n-radio-group/types.ts +1 -1
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +4 -5
- package/src/components/ui3n-radio-group/ui3n-radio.vue +3 -3
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +2 -2
- package/src/components/ui3n-switch/ui3n-switch.vue +2 -2
- package/src/components/ui3n-table/ui3n-table.vue +2 -2
- package/src/components/ui3n-tabs/ui3n-tabs.vue +2 -2
- package/src/components/ui3n-text/ui3n-text.vue +2 -2
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +2 -2
- package/src/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { onMounted } from 'vue';
|
|
2
|
+
import { computed, onMounted, useCssModule } from 'vue';
|
|
3
3
|
import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue';
|
|
4
4
|
import Ui3nButton from '../ui3n-button/ui3n-button.vue';
|
|
5
5
|
import type { Ui3nNotificationProps } from './types';
|
|
@@ -43,6 +43,19 @@ const stylesByTypes = {
|
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const $css = useCssModule();
|
|
47
|
+
|
|
48
|
+
const mainCssClasses = computed(() => {
|
|
49
|
+
const val = [$css.ui3nNotification, $css[`${props.type}Type`], $css[`${props.position}Position`]];
|
|
50
|
+
props.withIcon && val.push($css.withIcon);
|
|
51
|
+
|
|
52
|
+
return val;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function closeNotification() {
|
|
56
|
+
props.onClose();
|
|
57
|
+
}
|
|
58
|
+
|
|
46
59
|
onMounted(() => {
|
|
47
60
|
if (props.duration > 500) {
|
|
48
61
|
setTimeout(() => {
|
|
@@ -50,29 +63,25 @@ onMounted(() => {
|
|
|
50
63
|
}, props.duration);
|
|
51
64
|
}
|
|
52
65
|
});
|
|
53
|
-
|
|
54
|
-
const closeNotification = () => {
|
|
55
|
-
props.onClose();
|
|
56
|
-
};
|
|
57
66
|
</script>
|
|
58
67
|
|
|
59
68
|
<template>
|
|
60
69
|
<div
|
|
61
70
|
:id="id"
|
|
62
|
-
:class="
|
|
71
|
+
:class="mainCssClasses"
|
|
63
72
|
>
|
|
64
|
-
<div v-if="withIcon" :class="$style.
|
|
73
|
+
<div v-if="withIcon" :class="$style.ui3nNotificationIcon">
|
|
65
74
|
<ui3n-icon
|
|
66
|
-
:icon="stylesByTypes[type].icon"
|
|
75
|
+
:icon="stylesByTypes[type!].icon"
|
|
67
76
|
width="16"
|
|
68
77
|
height="16"
|
|
69
|
-
:rotate="stylesByTypes[type].iconRotate"
|
|
70
|
-
:color="stylesByTypes[type].iconColor"
|
|
78
|
+
:rotate="stylesByTypes[type!].iconRotate"
|
|
79
|
+
:color="stylesByTypes[type!].iconColor"
|
|
71
80
|
/>
|
|
72
81
|
</div>
|
|
73
82
|
|
|
74
83
|
|
|
75
|
-
<div :class="$style.
|
|
84
|
+
<div :class="$style.ui3nNotificationContent">
|
|
76
85
|
{{ content }}
|
|
77
86
|
</div>
|
|
78
87
|
|
|
@@ -82,7 +91,7 @@ const closeNotification = () => {
|
|
|
82
91
|
size="small"
|
|
83
92
|
color="transparent"
|
|
84
93
|
icon="round-close"
|
|
85
|
-
:icon-color="stylesByTypes[type].color"
|
|
94
|
+
:icon-color="stylesByTypes[type!].color"
|
|
86
95
|
:class="$style.closeBtn"
|
|
87
96
|
@click="closeNotification"
|
|
88
97
|
/>
|
|
@@ -90,7 +99,7 @@ const closeNotification = () => {
|
|
|
90
99
|
</template>
|
|
91
100
|
|
|
92
101
|
<style lang="scss" module>
|
|
93
|
-
.
|
|
102
|
+
.ui3nNotification {
|
|
94
103
|
--ui3n-notification-width: 380px;
|
|
95
104
|
|
|
96
105
|
display: flex;
|
|
@@ -110,7 +119,7 @@ const closeNotification = () => {
|
|
|
110
119
|
justify-content: flex-start;
|
|
111
120
|
}
|
|
112
121
|
|
|
113
|
-
.
|
|
122
|
+
.ui3nNotificationIcon {
|
|
114
123
|
position: relative;
|
|
115
124
|
min-width: var(--spacing-l);
|
|
116
125
|
width: var(--spacing-l);
|
|
@@ -122,7 +131,7 @@ const closeNotification = () => {
|
|
|
122
131
|
align-items: center;
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
.
|
|
134
|
+
.ui3nNotificationContent {
|
|
126
135
|
position: relative;
|
|
127
136
|
flex-grow: 2;
|
|
128
137
|
font-size: var(--font-12);
|
|
@@ -140,11 +149,11 @@ const closeNotification = () => {
|
|
|
140
149
|
.infoType {
|
|
141
150
|
background-color: var(--info-fill-default);
|
|
142
151
|
|
|
143
|
-
.
|
|
152
|
+
.ui3nNotificationIcon {
|
|
144
153
|
background-color: var(--info-content-default);
|
|
145
154
|
}
|
|
146
155
|
|
|
147
|
-
.
|
|
156
|
+
.ui3nNotificationContent {
|
|
148
157
|
color: var(--info-content-default);
|
|
149
158
|
}
|
|
150
159
|
}
|
|
@@ -152,11 +161,11 @@ const closeNotification = () => {
|
|
|
152
161
|
.successType {
|
|
153
162
|
background-color: var(--success-fill-default);
|
|
154
163
|
|
|
155
|
-
.
|
|
164
|
+
.ui3nNotificationIcon {
|
|
156
165
|
background-color: var(--success-content-default);
|
|
157
166
|
}
|
|
158
167
|
|
|
159
|
-
.
|
|
168
|
+
.ui3nNotificationContent {
|
|
160
169
|
color: var(--success-content-default);
|
|
161
170
|
}
|
|
162
171
|
}
|
|
@@ -164,11 +173,11 @@ const closeNotification = () => {
|
|
|
164
173
|
.warningType {
|
|
165
174
|
background-color: var(--warning-fill-default);
|
|
166
175
|
|
|
167
|
-
.
|
|
176
|
+
.ui3nNotificationIcon {
|
|
168
177
|
background-color: var(--warning-content-default);
|
|
169
178
|
}
|
|
170
179
|
|
|
171
|
-
.
|
|
180
|
+
.ui3nNotificationContent {
|
|
172
181
|
color: var(--warning-content-default);
|
|
173
182
|
}
|
|
174
183
|
}
|
|
@@ -176,11 +185,11 @@ const closeNotification = () => {
|
|
|
176
185
|
.errorType {
|
|
177
186
|
background-color: var(--error-fill-default);
|
|
178
187
|
|
|
179
|
-
.
|
|
188
|
+
.ui3nNotificationIcon {
|
|
180
189
|
background-color: var(--error-content-default);
|
|
181
190
|
}
|
|
182
191
|
|
|
183
|
-
.
|
|
192
|
+
.ui3nNotificationContent {
|
|
184
193
|
color: var(--error-content-default);
|
|
185
194
|
}
|
|
186
195
|
}
|
|
@@ -80,7 +80,7 @@ onBeforeUnmount(() => {
|
|
|
80
80
|
</script>
|
|
81
81
|
|
|
82
82
|
<template>
|
|
83
|
-
<div ref="element" :class="[$style.
|
|
83
|
+
<div ref="element" :class="[$style.ui3nProgressCircular, indeterminate && $style.indeterminate]">
|
|
84
84
|
<svg :height="innerSize" :width="innerSize" :class="$style.pie" xmlns="http://www.w3.org/2000/svg">
|
|
85
85
|
<circle :class="$style.background" :r="circleRadius" cx="50%" cy="50%" />
|
|
86
86
|
<circle :class="$style.chart" :r="circleRadius" cx="50%" cy="50%" :stroke-dasharray="strokeDasharray" />
|
|
@@ -96,7 +96,7 @@ onBeforeUnmount(() => {
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<style lang="scss" module>
|
|
99
|
-
.
|
|
99
|
+
.ui3nProgressCircular {
|
|
100
100
|
--ui3n-progress-circular-size: v-bind(cssSize);
|
|
101
101
|
--ui3n-progress-circular-width: v-bind(cssWidth);
|
|
102
102
|
--ui3n-progress-circular-font-size: v-bind(fontSize);
|
|
@@ -27,7 +27,7 @@ const displayValue = computed(() => props.indeterminate
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<div :class="[$style.
|
|
30
|
+
<div :class="[$style.ui3nProgressLinear, indeterminate && $style.indeterminate]">
|
|
31
31
|
<div
|
|
32
32
|
v-if="isValueShown && innerHeight < thresholdHeight"
|
|
33
33
|
:class="[$style.text, $style.above]"
|
|
@@ -49,7 +49,7 @@ const displayValue = computed(() => props.indeterminate
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<style lang="scss" module>
|
|
52
|
-
.
|
|
52
|
+
.ui3nProgressLinear {
|
|
53
53
|
--ui3n-progress-linear-height: v-bind(cssHeight);
|
|
54
54
|
--ui3n-progress-linear-bg: v-bind(bgColor);
|
|
55
55
|
--ui3n-progress-linear-color: v-bind(color);
|
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
} from './types';
|
|
9
9
|
|
|
10
10
|
const props = withDefaults(defineProps<Ui3nRadioGroupProps>(), {
|
|
11
|
-
modelValue: false,
|
|
12
11
|
direction: 'vertical',
|
|
13
12
|
disabled: false,
|
|
14
13
|
});
|
|
@@ -41,7 +40,7 @@ watch(
|
|
|
41
40
|
<template>
|
|
42
41
|
<div
|
|
43
42
|
:class="[
|
|
44
|
-
$style.
|
|
43
|
+
$style.ui3nRadioGroup,
|
|
45
44
|
direction === 'horizontal' && $style.horizontal,
|
|
46
45
|
]"
|
|
47
46
|
>
|
|
@@ -50,17 +49,17 @@ watch(
|
|
|
50
49
|
</template>
|
|
51
50
|
|
|
52
51
|
<style lang="scss" module>
|
|
53
|
-
.
|
|
52
|
+
.ui3nRadioGroup {
|
|
54
53
|
position: relative;
|
|
55
54
|
display: flex;
|
|
56
55
|
flex-direction: column;
|
|
57
56
|
justify-content: flex-start;
|
|
58
57
|
align-items: flex-start;
|
|
59
|
-
gap:
|
|
58
|
+
gap: var(--spacing-xs);
|
|
60
59
|
|
|
61
60
|
&.horizontal {
|
|
62
61
|
flex-direction: row;
|
|
63
|
-
column-gap:
|
|
62
|
+
column-gap: var(--spacing-s);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
</style>
|
|
@@ -66,7 +66,7 @@ function change() {
|
|
|
66
66
|
emits('change', val.value);
|
|
67
67
|
emits('update:modelValue', val.value);
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
|
|
71
71
|
onBeforeMount(() => {
|
|
72
72
|
if (
|
|
@@ -125,7 +125,7 @@ watch(
|
|
|
125
125
|
<div
|
|
126
126
|
ref="radioEl"
|
|
127
127
|
:class="[
|
|
128
|
-
$style.
|
|
128
|
+
$style.ui3nRadio,
|
|
129
129
|
disabled && $style.disabled,
|
|
130
130
|
!slots.default && $style.noLabel,
|
|
131
131
|
]"
|
|
@@ -180,7 +180,7 @@ watch(
|
|
|
180
180
|
<style lang="scss" module>
|
|
181
181
|
@import "../../assets/styles/mixins";
|
|
182
182
|
|
|
183
|
-
.
|
|
183
|
+
.ui3nRadio {
|
|
184
184
|
--ui3n-radio-size: 16px;
|
|
185
185
|
--ui3n-radio-color: var(--color-icon-control-accent-default);
|
|
186
186
|
--ui3n-radio-text-size: 12px;
|
|
@@ -10,7 +10,7 @@ withDefaults(
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
|
-
<div :class="$style.
|
|
13
|
+
<div :class="$style.ui3nStepLineBar">
|
|
14
14
|
<div :class="$style.label">
|
|
15
15
|
{{ label }}
|
|
16
16
|
</div>
|
|
@@ -22,7 +22,7 @@ withDefaults(
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<style lang="scss" module>
|
|
25
|
-
.
|
|
25
|
+
.ui3nStepLineBar {
|
|
26
26
|
--ui3n-step-line-bar-steps: v-bind(steps);
|
|
27
27
|
|
|
28
28
|
position: relative;
|
|
@@ -42,7 +42,7 @@ function change() {
|
|
|
42
42
|
<template>
|
|
43
43
|
<div
|
|
44
44
|
ref="switchEl"
|
|
45
|
-
:class="[$style.
|
|
45
|
+
:class="[$style.ui3nSwitch, val && $style.checked, !slots.default && $style.noLabel, disabled && $style.disabled]"
|
|
46
46
|
>
|
|
47
47
|
<Transition>
|
|
48
48
|
<div :class="$style.body" @click="change">
|
|
@@ -57,7 +57,7 @@ function change() {
|
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<style lang="scss" module>
|
|
60
|
-
.
|
|
60
|
+
.ui3nSwitch {
|
|
61
61
|
--ui3n-switch-size: 16px;
|
|
62
62
|
--ui3n-switch-color: var(--color-icon-control-accent-default);
|
|
63
63
|
--ui3n-switch-off-color: var(--color-bg-table-cell-pressed);
|
|
@@ -36,7 +36,7 @@ const eventsHandlers = {
|
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<template>
|
|
39
|
-
<div ref="tableEl" :class="$style.
|
|
39
|
+
<div ref="tableEl" :class="$style.ui3nTable">
|
|
40
40
|
<div :class="[$style.header, showGroupActionsRow && $style.withGroupActions]">
|
|
41
41
|
<!-- group actions -->
|
|
42
42
|
<div v-if="showGroupActionsRow" :class="$style.groupActions">
|
|
@@ -161,7 +161,7 @@ const eventsHandlers = {
|
|
|
161
161
|
<style lang="scss" module>
|
|
162
162
|
@import "../../assets/styles/mixins.scss";
|
|
163
163
|
|
|
164
|
-
.
|
|
164
|
+
.ui3nTable {
|
|
165
165
|
--ui3n-table-columns-width: auto;
|
|
166
166
|
--ui3n-table-base-head-height: 36px;
|
|
167
167
|
--ui3n-table-group-actions-height: 48px;
|
|
@@ -75,7 +75,7 @@ const onClick = (ev: MouseEvent) => {
|
|
|
75
75
|
<template>
|
|
76
76
|
<div
|
|
77
77
|
ref="tabs"
|
|
78
|
-
:class="[$style.
|
|
78
|
+
:class="[$style.ui3nTabs, itemDirection === 'vertical' && $style.vertical]"
|
|
79
79
|
v-on="children ? { click: onClick } : {}"
|
|
80
80
|
>
|
|
81
81
|
<slot />
|
|
@@ -85,7 +85,7 @@ const onClick = (ev: MouseEvent) => {
|
|
|
85
85
|
<style lang="scss" module>
|
|
86
86
|
@import "../../assets/styles/mixins";
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
.ui3nTabs {
|
|
89
89
|
--ui3n-tabs-height: 48px;
|
|
90
90
|
|
|
91
91
|
position: relative;
|
|
@@ -94,7 +94,7 @@ function onEscapeKeydown(event: KeyboardEvent) {
|
|
|
94
94
|
</script>
|
|
95
95
|
|
|
96
96
|
<template>
|
|
97
|
-
<div :class="[$style.
|
|
97
|
+
<div :class="[$style.ui3nText, disabled && $style.disabled, isFocused && $style.focused]">
|
|
98
98
|
<label v-if="label" :class="$style.label">
|
|
99
99
|
{{ label }}
|
|
100
100
|
</label>
|
|
@@ -120,7 +120,7 @@ function onEscapeKeydown(event: KeyboardEvent) {
|
|
|
120
120
|
</template>
|
|
121
121
|
|
|
122
122
|
<style lang="scss" module>
|
|
123
|
-
.
|
|
123
|
+
.ui3nText {
|
|
124
124
|
position: relative;
|
|
125
125
|
width: 100%;
|
|
126
126
|
border-radius: var(--spacing-xs);
|
|
@@ -93,7 +93,7 @@ watch(isPositioned, val => {
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<template>
|
|
96
|
-
<div :class="$style.
|
|
96
|
+
<div :class="$style.ui3nTooltip">
|
|
97
97
|
<div
|
|
98
98
|
ref="referenceEl"
|
|
99
99
|
:class="$style.reference"
|
|
@@ -126,7 +126,7 @@ watch(isPositioned, val => {
|
|
|
126
126
|
</template>
|
|
127
127
|
|
|
128
128
|
<style lang="scss" module>
|
|
129
|
-
.
|
|
129
|
+
.ui3nTooltip {
|
|
130
130
|
--ui3n-tooltip-bg-color: v-bind(color);
|
|
131
131
|
--ui3n-tooltip-text-color: v-bind(textColor);
|
|
132
132
|
|
|
@@ -45,7 +45,7 @@ onMounted(() => {
|
|
|
45
45
|
<template>
|
|
46
46
|
<div
|
|
47
47
|
ref="wrapElement"
|
|
48
|
-
:class="$style.
|
|
48
|
+
:class="$style.ui3nVirtualScroll"
|
|
49
49
|
@scroll="onScroll"
|
|
50
50
|
>
|
|
51
51
|
<div
|
|
@@ -74,7 +74,7 @@ onMounted(() => {
|
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<style lang="scss" module>
|
|
77
|
-
.
|
|
77
|
+
.ui3nVirtualScroll {
|
|
78
78
|
position: relative;
|
|
79
79
|
width: 100%;
|
|
80
80
|
height: 100%;
|