@v1nt1248/3nclient-lib 0.3.28 → 0.3.29
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/chunks/ui3n-notification-Dr_3Td9N.js +279 -0
- package/dist/components/index.d.ts +12 -12
- package/dist/components/ui3n-autocomplete/types.d.ts +8 -0
- package/dist/components/ui3n-autocomplete/ui3n-autocomplete.d.ts +2 -2
- package/dist/components/ui3n-badge/types.d.ts +12 -0
- package/dist/components/ui3n-badge/ui3n-badge-simple.d.ts +1 -1
- package/dist/components/ui3n-badge/ui3n-badge.d.ts +1 -1
- package/dist/components/ui3n-breadcrumbs/types.d.ts +1 -1
- package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumb.d.ts +2 -2
- package/dist/components/ui3n-button/types.d.ts +4 -2
- package/dist/components/ui3n-checkbox/types.d.ts +11 -0
- package/dist/components/ui3n-checkbox/ui3n-checkbox.d.ts +4 -1
- package/dist/components/ui3n-chip/types.d.ts +6 -1
- package/dist/components/ui3n-chip/ui3n-chip.d.ts +2 -0
- package/dist/components/ui3n-drop-files/types.d.ts +7 -0
- package/dist/components/ui3n-drop-files/ui3n-drop-files.d.ts +7 -1
- package/dist/components/ui3n-editable/types.d.ts +11 -0
- package/dist/components/ui3n-editable/ui3n-editable.d.ts +4 -2
- package/dist/components/ui3n-icon/types.d.ts +5 -1
- package/dist/components/ui3n-icon/ui3n-icon.d.ts +2 -2
- package/dist/components/ui3n-input/types.d.ts +4 -0
- package/dist/components/ui3n-input/ui3n-input.d.ts +4 -1
- package/dist/components/ui3n-input-file/types.d.ts +11 -0
- package/dist/components/ui3n-input-file/ui3n-input-file.d.ts +4 -1
- package/dist/components/ui3n-list/types.d.ts +4 -0
- package/dist/components/ui3n-menu/types.d.ts +4 -0
- package/dist/components/ui3n-menu/ui3n-menu.d.ts +1 -1
- package/dist/components/ui3n-notification/ui3n-notification.d.ts +2 -2
- package/dist/components/ui3n-progress/ui3n-progress-circular.d.ts +1 -1
- package/dist/components/ui3n-progress/ui3n-progress-linear.d.ts +1 -1
- package/dist/components/ui3n-radio-group/types.d.ts +18 -0
- package/dist/components/ui3n-radio-group/ui3n-radio-group.d.ts +3 -1
- package/dist/components/ui3n-radio-group/ui3n-radio.d.ts +6 -7
- package/dist/components/ui3n-scrollbar-vertical/types.d.ts +2 -0
- package/dist/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +2 -0
- package/dist/components/ui3n-selector/types.d.ts +11 -0
- package/dist/components/ui3n-selector/ui3n-selector.d.ts +2 -2
- package/dist/components/ui3n-slider/types.d.ts +11 -0
- package/dist/components/ui3n-slider/ui3n-slider.d.ts +4 -1
- package/dist/components/ui3n-step-line-bar/types.d.ts +4 -0
- package/dist/components/ui3n-switch/types.d.ts +11 -0
- package/dist/components/ui3n-switch/ui3n-switch.d.ts +4 -1
- package/dist/components/ui3n-table/composables/useTable.d.ts +1 -0
- package/dist/components/ui3n-table/types.d.ts +4 -0
- package/dist/components/ui3n-table/ui3n-table-sort-icon.d.ts +4 -1
- package/dist/components/ui3n-tabs/types.d.ts +4 -0
- package/dist/components/ui3n-text/types.d.ts +11 -0
- package/dist/components/ui3n-text/ui3n-text.d.ts +4 -1
- package/dist/components/ui3n-tooltip/types.d.ts +4 -0
- package/dist/components/ui3n-tooltip/ui3n-tooltip.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +2066 -1690
- package/dist/ui3n-plugins.js +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +29 -7
- package/src/components/ui3n-autocomplete/types.ts +9 -1
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +182 -51
- package/src/components/ui3n-badge/types.ts +10 -0
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +54 -55
- package/src/components/ui3n-badge/ui3n-badge.vue +4 -0
- package/src/components/ui3n-breadcrumbs/types.ts +1 -1
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +7 -5
- package/src/components/ui3n-button/types.ts +4 -2
- package/src/components/ui3n-button/ui3n-button.vue +24 -19
- package/src/components/ui3n-checkbox/types.ts +12 -0
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +79 -29
- package/src/components/ui3n-chip/types.ts +6 -1
- package/src/components/ui3n-chip/ui3n-chip.vue +64 -61
- package/src/components/ui3n-dialog/ui3n-dialog.vue +3 -3
- package/src/components/ui3n-drop-files/types.ts +8 -0
- package/src/components/ui3n-drop-files/ui3n-drop-files.vue +73 -29
- package/src/components/ui3n-editable/types.ts +12 -0
- package/src/components/ui3n-editable/ui3n-editable.vue +56 -24
- package/src/components/ui3n-icon/types.ts +5 -1
- package/src/components/ui3n-icon/ui3n-icon.vue +45 -50
- package/src/components/ui3n-input/types.ts +4 -0
- package/src/components/ui3n-input/ui3n-input.vue +14 -1
- package/src/components/ui3n-input-file/types.ts +12 -0
- package/src/components/ui3n-input-file/ui3n-input-file.vue +33 -16
- package/src/components/ui3n-list/types.ts +4 -0
- package/src/components/ui3n-list/ui3n-list.vue +3 -1
- package/src/components/ui3n-menu/types.ts +4 -0
- package/src/components/ui3n-menu/ui3n-menu.vue +43 -32
- package/src/components/ui3n-notification/ui3n-notification.vue +190 -175
- package/src/components/ui3n-progress/ui3n-progress-circular.vue +40 -22
- package/src/components/ui3n-progress/ui3n-progress-linear.vue +14 -7
- package/src/components/ui3n-radio-group/types.ts +20 -0
- package/src/components/ui3n-radio-group/ui3n-radio-group.vue +61 -48
- package/src/components/ui3n-radio-group/ui3n-radio.vue +60 -65
- package/src/components/ui3n-scrollbar-vertical/types.ts +2 -0
- package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +4 -4
- package/src/components/ui3n-selector/types.ts +12 -0
- package/src/components/ui3n-selector/ui3n-selector.vue +63 -40
- package/src/components/ui3n-slider/types.ts +12 -0
- package/src/components/ui3n-slider/ui3n-slider.vue +88 -39
- package/src/components/ui3n-step-line-bar/types.ts +4 -0
- package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +8 -10
- package/src/components/ui3n-switch/types.ts +12 -0
- package/src/components/ui3n-switch/ui3n-switch.vue +57 -25
- package/src/components/ui3n-table/composables/useTable.ts +17 -0
- package/src/components/ui3n-table/types.ts +4 -0
- package/src/components/ui3n-table/ui3n-table-sort-icon.vue +9 -8
- package/src/components/ui3n-table/ui3n-table.vue +48 -17
- package/src/components/ui3n-tabs/types.ts +4 -0
- package/src/components/ui3n-tabs/ui3n-tabs.vue +146 -108
- package/src/components/ui3n-text/types.ts +12 -0
- package/src/components/ui3n-text/ui3n-text.vue +56 -15
- package/src/components/ui3n-tooltip/types.ts +4 -0
- package/src/components/ui3n-tooltip/ui3n-tooltip.vue +61 -43
- package/src/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue +201 -17
- package/dist/chunks/ui3n-notification-DlDM-u-R.js +0 -276
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, onMounted, ref, watch, useCssModule } from 'vue';
|
|
3
|
-
import type { Ui3nTabsEmits, Ui3nTabsProps, Ui3nTabsSlots } from './types';
|
|
2
|
+
import { computed, nextTick, onMounted, ref, watch, useCssModule } from 'vue';
|
|
3
|
+
import type { Ui3nTabsEmits, Ui3nTabsProps, Ui3nTabsSlots } from './types';
|
|
4
4
|
|
|
5
|
-
const props = withDefaults(
|
|
6
|
-
defineProps<Ui3nTabsProps>(),
|
|
7
|
-
{
|
|
5
|
+
const props = withDefaults(defineProps<Ui3nTabsProps>(), {
|
|
8
6
|
modelValue: 0,
|
|
9
7
|
itemDirection: 'horizontal',
|
|
10
8
|
activeColor: 'var(--color-text-control-accent-default)',
|
|
@@ -12,139 +10,179 @@ const props = withDefaults(
|
|
|
12
10
|
indicatorColor: 'var(--color-border-control-accent-default)',
|
|
13
11
|
indicatorSize: 2,
|
|
14
12
|
indicatorPosition: 'normal',
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const children = ref<HTMLCollection | null>(null);
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
13
|
+
});
|
|
14
|
+
const emits = defineEmits<Ui3nTabsEmits>();
|
|
15
|
+
defineSlots<Ui3nTabsSlots>();
|
|
16
|
+
|
|
17
|
+
const $style = useCssModule();
|
|
18
|
+
|
|
19
|
+
const tabs = ref<HTMLDivElement | null>(null);
|
|
20
|
+
const activeIndex = ref(props.modelValue);
|
|
21
|
+
const children = ref<HTMLCollection | null>(null);
|
|
22
|
+
|
|
23
|
+
const tabsStyle = computed(() => ({
|
|
24
|
+
'--ui3n-tabs-active-color': props.activeColor,
|
|
25
|
+
'--ui3n-tabs-inactive-color': props.inactiveColor,
|
|
26
|
+
'--ui3n-tabs-indicator-color': props.indicatorColor,
|
|
27
|
+
'--ui3n-tabs-indicator-size': `${props.indicatorSize}px`,
|
|
28
|
+
'--ui3n-tabs-indicator-position': props.indicatorPosition === 'reverse' ? '100%' : '0',
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
function updateChildrenAttributes(): void {
|
|
32
|
+
if (tabs.value?.children) {
|
|
33
|
+
const children = tabs.value.children;
|
|
34
|
+
for (let i = 0; i < children.length; i++) {
|
|
35
|
+
const child = children[i] as HTMLElement;
|
|
36
|
+
|
|
37
|
+
child.dataset.index = `${i}`;
|
|
38
|
+
|
|
39
|
+
if (!child.classList.contains($style.item)) {
|
|
40
|
+
child.classList.add($style.item);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (i === activeIndex.value) {
|
|
44
|
+
child.classList.add($style.active);
|
|
45
|
+
} else {
|
|
46
|
+
child.classList.remove($style.active);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
|
|
52
|
+
function initialTabsActivity(): void {
|
|
53
|
+
if (children.value) {
|
|
54
|
+
for (let i = 0; i < children.value.length; i++) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
children.value[i].dataset.index = `${i}`;
|
|
57
|
+
children.value[i].classList.add($style.item);
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
|
|
62
|
+
function setTabsActivity(index: number): void {
|
|
63
|
+
if (children.value) {
|
|
64
|
+
for (let i = 0; i < children.value.length; i++) {
|
|
65
|
+
if (i === index) {
|
|
66
|
+
children.value[i].classList.add($style.active);
|
|
67
|
+
} else {
|
|
68
|
+
children.value[i].classList.remove($style.active);
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
}
|
|
64
|
-
}
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
function onClick(ev: MouseEvent) {
|
|
75
|
+
const target = ev.target as HTMLElement;
|
|
76
|
+
|
|
77
|
+
const itemEl = target.closest('[data-index]') as HTMLElement | null;
|
|
78
|
+
|
|
79
|
+
if (itemEl && itemEl.dataset.index) {
|
|
80
|
+
if (itemEl.hasAttribute('disabled') || itemEl.classList.contains($style.disabled)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const index = Number(itemEl.dataset.index);
|
|
85
|
+
|
|
86
|
+
activeIndex.value = index;
|
|
87
|
+
updateChildrenAttributes();
|
|
88
|
+
|
|
89
|
+
emits('update:modelValue', index);
|
|
90
|
+
}
|
|
71
91
|
}
|
|
72
|
-
|
|
92
|
+
|
|
93
|
+
watch(
|
|
94
|
+
() => props.modelValue,
|
|
95
|
+
newVal => {
|
|
96
|
+
if (newVal !== activeIndex.value) {
|
|
97
|
+
activeIndex.value = newVal;
|
|
98
|
+
nextTick(() => {
|
|
99
|
+
updateChildrenAttributes();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{ immediate: true },
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
onMounted(() => {
|
|
107
|
+
updateChildrenAttributes();
|
|
108
|
+
});
|
|
73
109
|
</script>
|
|
74
110
|
|
|
75
111
|
<template>
|
|
76
112
|
<div
|
|
77
113
|
ref="tabs"
|
|
114
|
+
:id="id"
|
|
115
|
+
:style="tabsStyle"
|
|
78
116
|
:class="[$style.ui3nTabs, itemDirection === 'vertical' && $style.vertical]"
|
|
79
|
-
|
|
117
|
+
@click="onClick"
|
|
80
118
|
>
|
|
81
119
|
<slot />
|
|
82
120
|
</div>
|
|
83
121
|
</template>
|
|
84
122
|
|
|
85
123
|
<style lang="scss" module>
|
|
86
|
-
@use '../../assets/styles/mixins' as mixins;
|
|
87
|
-
|
|
88
|
-
.ui3nTabs {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
position: relative;
|
|
92
|
-
height: var(--ui3n-tabs-height);
|
|
93
|
-
display: flex;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
align-items: stretch;
|
|
96
|
-
background-color: transparent;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.item {
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
position: relative;
|
|
102
|
-
user-select: none;
|
|
103
|
-
color: v-bind(inactiveColorValue);
|
|
104
|
-
@include mixins.ripple(var(--color-bg-control-secondary-default));
|
|
105
|
-
|
|
106
|
-
&:hover {
|
|
107
|
-
background-color: var(--color-bg-control-secondary-default);
|
|
108
|
-
}
|
|
124
|
+
@use '../../assets/styles/mixins' as mixins;
|
|
125
|
+
|
|
126
|
+
.ui3nTabs {
|
|
127
|
+
--ui3n-tabs-height: 48px;
|
|
109
128
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
bottom: v-bind(indicatorPositionValue);
|
|
116
|
-
height: v-bind(indicatorSizeValue);
|
|
129
|
+
position: relative;
|
|
130
|
+
height: var(--ui3n-tabs-height);
|
|
131
|
+
display: flex;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
align-items: stretch;
|
|
117
134
|
background-color: transparent;
|
|
118
|
-
transition: background-color 250ms ease-in-out;
|
|
119
135
|
}
|
|
120
136
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
137
|
+
.item {
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
position: relative;
|
|
140
|
+
user-select: none;
|
|
141
|
+
color: var(--ui3n-tabs-inactive-color);
|
|
142
|
+
@include mixins.ripple(var(--color-bg-control-secondary-default));
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
background-color: var(--color-bg-control-secondary-default);
|
|
146
|
+
}
|
|
127
147
|
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
&::after {
|
|
149
|
+
position: absolute;
|
|
150
|
+
content: '';
|
|
151
|
+
left: 0;
|
|
152
|
+
width: 100%;
|
|
153
|
+
bottom: var(--ui3n-tabs-indicator-position);
|
|
154
|
+
height: var(--ui3n-tabs-indicator-size);
|
|
155
|
+
background-color: transparent;
|
|
156
|
+
transition: background-color 250ms ease-in-out;
|
|
157
|
+
}
|
|
130
158
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
159
|
+
&[disabled] {
|
|
160
|
+
opacity: 0.5;
|
|
161
|
+
cursor: default;
|
|
162
|
+
pointer-events: none;
|
|
163
|
+
}
|
|
134
164
|
}
|
|
135
|
-
}
|
|
136
165
|
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
flex-direction: column;
|
|
166
|
+
.active {
|
|
167
|
+
color: var(--ui3n-tabs-active-color);
|
|
140
168
|
|
|
141
|
-
.item {
|
|
142
169
|
&::after {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
170
|
+
background-color: var(--ui3n-tabs-indicator-color);
|
|
171
|
+
transition: background-color 250ms ease-in-out;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.vertical {
|
|
176
|
+
height: auto;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
|
|
179
|
+
.item {
|
|
180
|
+
&::after {
|
|
181
|
+
left: var(--ui3n-tabs-indicator-position);
|
|
182
|
+
width: var(--ui3n-tabs-indicator-size);
|
|
183
|
+
bottom: 0;
|
|
184
|
+
height: 100%;
|
|
185
|
+
}
|
|
147
186
|
}
|
|
148
187
|
}
|
|
149
|
-
}
|
|
150
188
|
</style>
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export interface Ui3nTextProps {
|
|
2
|
+
/**
|
|
3
|
+
* Root element id
|
|
4
|
+
*/
|
|
5
|
+
id?: string;
|
|
6
|
+
/**
|
|
7
|
+
* HTML name attribute for form submission
|
|
8
|
+
*/
|
|
9
|
+
name?: string;
|
|
2
10
|
/**
|
|
3
11
|
* Text value
|
|
4
12
|
*/
|
|
@@ -86,3 +94,7 @@ export interface Ui3nTextEmits {
|
|
|
86
94
|
*/
|
|
87
95
|
(event: 'update:valid', value: boolean): void;
|
|
88
96
|
}
|
|
97
|
+
|
|
98
|
+
export interface Ui3nTextExpose {
|
|
99
|
+
clear: () => void;
|
|
100
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
<!-- @strictTemplates false -->
|
|
1
2
|
<script lang="ts" setup>
|
|
2
3
|
import { onMounted, ref, watch } from 'vue';
|
|
3
4
|
import { patchTextareaMaxRowsSupport } from '@/utils';
|
|
4
|
-
import type { Ui3nTextEmits, Ui3nTextProps } from './types';
|
|
5
|
+
import type { Ui3nTextEmits, Ui3nTextProps, Ui3nTextExpose } from './types';
|
|
5
6
|
|
|
6
7
|
const props = withDefaults(defineProps<Ui3nTextProps>(), {
|
|
8
|
+
name: undefined,
|
|
7
9
|
rows: 6,
|
|
8
10
|
maxRows: 6,
|
|
9
11
|
label: '',
|
|
@@ -42,9 +44,10 @@
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
function onBlur(event: Event) {
|
|
47
|
+
const value = (event.target as HTMLInputElement).value;
|
|
48
|
+
|
|
45
49
|
setTimeout(() => {
|
|
46
50
|
isFocused.value = false;
|
|
47
|
-
const value = (event.target as HTMLInputElement).value;
|
|
48
51
|
validate(value);
|
|
49
52
|
emits('blur', event);
|
|
50
53
|
emits('change', value);
|
|
@@ -82,6 +85,25 @@
|
|
|
82
85
|
emits('keydown', event);
|
|
83
86
|
}
|
|
84
87
|
|
|
88
|
+
function clear() {
|
|
89
|
+
text.value = '';
|
|
90
|
+
errorMessage.value = '';
|
|
91
|
+
isDirty.value = false;
|
|
92
|
+
|
|
93
|
+
if (textareaElement.value) {
|
|
94
|
+
textareaElement.value.value = '';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
emits('update:modelValue', '');
|
|
98
|
+
emits('input', '');
|
|
99
|
+
emits('change', '');
|
|
100
|
+
emits('update:valid', true);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
defineExpose<Ui3nTextExpose>({
|
|
104
|
+
clear,
|
|
105
|
+
});
|
|
106
|
+
|
|
85
107
|
onMounted(() => {
|
|
86
108
|
if (textareaElement.value) {
|
|
87
109
|
patchTextareaMaxRowsSupport(textareaElement.value!);
|
|
@@ -93,6 +115,15 @@
|
|
|
93
115
|
}
|
|
94
116
|
});
|
|
95
117
|
|
|
118
|
+
watch(
|
|
119
|
+
() => props.name,
|
|
120
|
+
newName => {
|
|
121
|
+
if (!newName) {
|
|
122
|
+
clear();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
);
|
|
126
|
+
|
|
96
127
|
watch(
|
|
97
128
|
() => props.modelValue,
|
|
98
129
|
(val, oldVal) => {
|
|
@@ -106,7 +137,10 @@
|
|
|
106
137
|
</script>
|
|
107
138
|
|
|
108
139
|
<template>
|
|
109
|
-
<div
|
|
140
|
+
<div
|
|
141
|
+
:id="id"
|
|
142
|
+
:class="[$style.ui3nText, disabled && $style.disabled, isFocused && $style.focused]"
|
|
143
|
+
>
|
|
110
144
|
<label
|
|
111
145
|
v-if="label"
|
|
112
146
|
:class="$style.label"
|
|
@@ -119,6 +153,7 @@
|
|
|
119
153
|
ref="textareaElement"
|
|
120
154
|
:class="$style.content"
|
|
121
155
|
:value="text"
|
|
156
|
+
:name="name"
|
|
122
157
|
:placeholder="placeholder"
|
|
123
158
|
:readonly="disabled"
|
|
124
159
|
:rows="rows"
|
|
@@ -138,28 +173,34 @@
|
|
|
138
173
|
|
|
139
174
|
<style lang="scss" module>
|
|
140
175
|
.ui3nText {
|
|
176
|
+
--ui3n-text-border-radius: 4px;
|
|
177
|
+
--ui3n-text-label-font-size: 12px;
|
|
178
|
+
--ui3n-text-font-size: 13px;
|
|
179
|
+
--ui3n-text-padding-inline: 8px;
|
|
180
|
+
--ui3n-text-padding-block: 8px;
|
|
181
|
+
|
|
141
182
|
position: relative;
|
|
142
183
|
width: 100%;
|
|
143
|
-
border-radius: var(--
|
|
184
|
+
border-radius: var(--ui3n-text-border-radius);
|
|
144
185
|
padding: 1px;
|
|
145
186
|
}
|
|
146
187
|
|
|
147
188
|
.label {
|
|
148
189
|
display: block;
|
|
149
190
|
width: 100%;
|
|
150
|
-
font-size: var(--font-
|
|
151
|
-
line-height:
|
|
191
|
+
font-size: var(--ui3n-text-label-font-size);
|
|
192
|
+
line-height: 1.33;
|
|
152
193
|
font-weight: 600;
|
|
153
194
|
color: var(--color-text-control-primary-default);
|
|
154
|
-
margin-bottom:
|
|
195
|
+
margin-bottom: 4px;
|
|
155
196
|
}
|
|
156
197
|
|
|
157
198
|
.body {
|
|
158
199
|
position: relative;
|
|
159
200
|
width: 100%;
|
|
160
|
-
padding: var(--
|
|
201
|
+
padding: var(--ui3n-text-padding-block) 0;
|
|
161
202
|
background-color: var(--color-bg-control-secondary-default);
|
|
162
|
-
border-radius: var(--
|
|
203
|
+
border-radius: var(--ui3n-text-border-radius);
|
|
163
204
|
transition: all 0.2s ease-in-out;
|
|
164
205
|
|
|
165
206
|
&:hover {
|
|
@@ -184,12 +225,12 @@
|
|
|
184
225
|
box-sizing: border-box;
|
|
185
226
|
position: relative;
|
|
186
227
|
width: 100%;
|
|
187
|
-
border-radius: var(--
|
|
228
|
+
border-radius: var(--ui3n-text-border-radius);
|
|
188
229
|
background-color: var(--color-bg-control-secondary-default);
|
|
189
|
-
padding: 0 var(--
|
|
230
|
+
padding: 0 var(--ui3n-text-padding-inline);
|
|
190
231
|
font-family: Inter, system-ui, sans-serif;
|
|
191
|
-
font-size: var(--font-
|
|
192
|
-
line-height:
|
|
232
|
+
font-size: var(--ui3n-text-font-size);
|
|
233
|
+
line-height: 1.23;
|
|
193
234
|
font-weight: 400;
|
|
194
235
|
color: var(--color-text-control-primary-default);
|
|
195
236
|
transition: all 0.2s ease-in-out;
|
|
@@ -197,8 +238,8 @@
|
|
|
197
238
|
&::placeholder {
|
|
198
239
|
color: var(--color-text-control-secondary-default);
|
|
199
240
|
font-style: italic;
|
|
200
|
-
font-size: var(--font-
|
|
201
|
-
line-height:
|
|
241
|
+
font-size: var(--ui3n-text-font-size);
|
|
242
|
+
line-height: 1.23;
|
|
202
243
|
font-weight: 400;
|
|
203
244
|
}
|
|
204
245
|
|