@v1nt1248/3nclient-lib 0.0.5 → 0.0.7
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/index.d.ts +5 -0
- package/dist/components/ui3n-icon.vue.d.ts +16 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/types.d.ts +31 -0
- package/dist/directives/index.d.ts +1 -0
- package/dist/index.d.ts +5 -18
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/notifications.d.ts +4 -0
- package/dist/plugins/store-vue-bus.d.ts +2 -9
- package/dist/plugins/vue-bus.d.ts +8 -4
- package/dist/style.css +1 -1
- package/dist/tools/index.d.ts +3 -0
- package/dist/ui-3n-lib.js +1101 -11629
- package/package.json +10 -10
- package/src/components/index.ts +13 -0
- package/src/components/ui3n-button.vue +156 -0
- package/src/components/ui3n-drop-files.vue +171 -0
- package/src/components/ui3n-emoji.vue +64 -0
- package/src/components/ui3n-icon.vue +51 -0
- package/src/components/ui3n-input.vue +282 -0
- package/src/components/ui3n-notification.vue +144 -0
- package/src/components/ui3n-table-sort-icon.vue +23 -0
- package/src/components/ui3n-table.vue +318 -0
- package/src/components/ui3n-text.vue +181 -0
- package/dist/components/ui3n-drop-files.vue.d.ts +0 -33
- package/dist/components/ui3n-emoji.vue.d.ts +0 -28
- package/dist/components/ui3n-input.vue.d.ts +0 -76
- package/dist/components/ui3n-notification.vue.d.ts +0 -72
- package/dist/components/ui3n-table-sort-icon.vue.d.ts +0 -24
- package/dist/components/ui3n-table.vue.d.ts +0 -30
- package/dist/components/ui3n-text.vue.d.ts +0 -62
- package/dist/types.d.ts +0 -60
- package/dist/ui-3n-lib.umd.cjs +0 -72
- /package/dist/{helpers → tools}/common.helpers.d.ts +0 -0
- /package/dist/{helpers → tools}/textarea-max-rows.d.ts +0 -0
- /package/dist/{helpers → tools}/ui.helpers.d.ts +0 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
import Ui3nTableSortIcon from './ui3n-table-sort-icon.vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
items: ListingEntryTypeExtended[];
|
|
8
|
+
textIfEmpty?: string;
|
|
9
|
+
}>()
|
|
10
|
+
const emit = defineEmits<{
|
|
11
|
+
(ev: 'go', name: string): void;
|
|
12
|
+
(ev: 'action', value: { action: EntityAction, entity: ListingEntryTypeExtended }): void;
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const sortField = ref<SortField>('name')
|
|
16
|
+
const sortDirection = ref<'asc'|'desc'>('asc')
|
|
17
|
+
|
|
18
|
+
const sortByName = (itemA: ListingEntryTypeExtended, itemB: ListingEntryTypeExtended) => {
|
|
19
|
+
if (sortDirection.value === 'desc') {
|
|
20
|
+
return itemA.name < itemB.name ? 1 : -1
|
|
21
|
+
}
|
|
22
|
+
return itemA.name > itemB.name ? 1 : -1
|
|
23
|
+
}
|
|
24
|
+
const sortByType = (itemA: ListingEntryTypeExtended, itemB: ListingEntryTypeExtended) => {
|
|
25
|
+
if (sortDirection.value === 'desc') {
|
|
26
|
+
return itemA.type! < itemB.type! ? 1 : -1
|
|
27
|
+
}
|
|
28
|
+
return itemA.type! > itemB.type! ? 1 : -1
|
|
29
|
+
}
|
|
30
|
+
const sortByCreatedAt = (itemA: ListingEntryTypeExtended, itemB: ListingEntryTypeExtended) => {
|
|
31
|
+
const tsA = itemA.ctime!.getTime()
|
|
32
|
+
const tsB = itemB.ctime!.getTime()
|
|
33
|
+
return sortDirection.value === 'asc' ? tsA - tsB : tsB - tsA
|
|
34
|
+
}
|
|
35
|
+
const sortByChangedAt = (itemA: ListingEntryTypeExtended, itemB: ListingEntryTypeExtended) => {
|
|
36
|
+
const tsA = itemA.mtime!.getTime()
|
|
37
|
+
const tsB = itemB.mtime!.getTime()
|
|
38
|
+
return sortDirection.value === 'asc' ? tsA - tsB : tsB - tsA
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const placeholder = computed(() => props.textIfEmpty || 'Empty')
|
|
42
|
+
const sortMap = {
|
|
43
|
+
name: sortByName,
|
|
44
|
+
type: sortByType,
|
|
45
|
+
createdAt: sortByCreatedAt,
|
|
46
|
+
changedAt: sortByChangedAt,
|
|
47
|
+
}
|
|
48
|
+
const sortedItems =computed(() => [...props.items].sort(sortMap[sortField.value]))
|
|
49
|
+
const changeSort = (field: SortField) => {
|
|
50
|
+
if (field !== sortField.value) {
|
|
51
|
+
sortField.value = field
|
|
52
|
+
sortDirection.value = 'asc'
|
|
53
|
+
} else {
|
|
54
|
+
sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const getTimeAsString = (date: Date) => {
|
|
59
|
+
return date
|
|
60
|
+
? `${`${date.getDate()}`.padStart(2, '0')}/${`${date.getMonth() + 1}`.padStart(2, '0')}/${date.getFullYear()} ${`${date.getHours()}`.padStart(2, '0')}:${`${date.getMinutes()}`.padStart(2, '0')}`
|
|
61
|
+
: ''
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const handleClick = (ev: MouseEvent) => {
|
|
65
|
+
ev.preventDefault()
|
|
66
|
+
const { target } = ev
|
|
67
|
+
const { id, classList } = target as Element
|
|
68
|
+
if (classList.contains('ui3n-table__item') && id) {
|
|
69
|
+
return props.items.find(i => i.id === id)
|
|
70
|
+
}
|
|
71
|
+
return undefined
|
|
72
|
+
}
|
|
73
|
+
const onClick = (ev: MouseEvent) => {
|
|
74
|
+
handleClick(ev)
|
|
75
|
+
const entity = handleClick(ev)
|
|
76
|
+
if (entity && entity.isFolder && entity.fullPath) {
|
|
77
|
+
emit('go', entity.fullPath)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const onRightClick = (ev: MouseEvent) => {
|
|
81
|
+
handleClick(ev)
|
|
82
|
+
const entity = handleClick(ev)
|
|
83
|
+
if (entity) {
|
|
84
|
+
emit( 'action', { action: 'open-menu', entity })
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const handleActions = (ev: MouseEvent, action: EntityAction, entity: ListingEntryTypeExtended) => {
|
|
89
|
+
ev.preventDefault()
|
|
90
|
+
ev.stopImmediatePropagation()
|
|
91
|
+
emit('action', { action, entity })
|
|
92
|
+
}
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<template>
|
|
96
|
+
<div class="ui3n-table">
|
|
97
|
+
<div class="ui3n-table__header">
|
|
98
|
+
<div
|
|
99
|
+
class="ui3n-table__header-cell ui3n-table__header-cell--sortable ui3n-table__name"
|
|
100
|
+
@click="changeSort('name')"
|
|
101
|
+
>
|
|
102
|
+
<span class="ui3n-table__header-text">Name</span>
|
|
103
|
+
<ui3n-table-sort-icon
|
|
104
|
+
v-if="sortField === 'name'"
|
|
105
|
+
:value="sortDirection"
|
|
106
|
+
:size="18"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<div
|
|
110
|
+
class="ui3n-table__header-cell ui3n-table__header-cell--sortable ui3n-table__type"
|
|
111
|
+
@click="changeSort('type')"
|
|
112
|
+
>
|
|
113
|
+
<span class="ui3n-table__header-text">Type</span>
|
|
114
|
+
<ui3n-table-sort-icon
|
|
115
|
+
v-if="sortField === 'type'"
|
|
116
|
+
:value="sortDirection"
|
|
117
|
+
:size="18"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div
|
|
122
|
+
class="ui3n-table__header-cell ui3n-table__header-cell--sortable ui3n-table__changedAt"
|
|
123
|
+
@click="changeSort('changedAt')"
|
|
124
|
+
>
|
|
125
|
+
<span class="ui3n-table__header-text">Changed At</span>
|
|
126
|
+
<ui3n-table-sort-icon
|
|
127
|
+
v-if="sortField === 'changedAt'"
|
|
128
|
+
:value="sortDirection"
|
|
129
|
+
:size="18"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="ui3n-table__content">
|
|
135
|
+
<div
|
|
136
|
+
v-for="item in sortedItems"
|
|
137
|
+
:id="item.id"
|
|
138
|
+
:key="item.id"
|
|
139
|
+
class="ui3n-table__item"
|
|
140
|
+
@click="onClick"
|
|
141
|
+
@click.right="onRightClick"
|
|
142
|
+
>
|
|
143
|
+
<icon
|
|
144
|
+
:icon="item.isFolder ? 'folder' : 'subject'"
|
|
145
|
+
:width="16"
|
|
146
|
+
:height="16"
|
|
147
|
+
class="ui3n-table__item-icon"
|
|
148
|
+
/>
|
|
149
|
+
<div class="ui3n-table__item-cell ui3n-table__name">
|
|
150
|
+
{{ item.name }}
|
|
151
|
+
</div>
|
|
152
|
+
<div class="ui3n-table__item-cell ui3n-table__type">
|
|
153
|
+
{{ item.ext || '' }}
|
|
154
|
+
</div>
|
|
155
|
+
<div class="ui3n-table__item-cell ui3n-table__changedAt">
|
|
156
|
+
{{ getTimeAsString(item.mtime!) }}
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<icon
|
|
160
|
+
v-if="item.isFolder"
|
|
161
|
+
icon="bookmark"
|
|
162
|
+
:width="12"
|
|
163
|
+
:height="12"
|
|
164
|
+
class="ui3n-table__item-bookmark"
|
|
165
|
+
@click="handleActions($event, 'add:favorites', item)"
|
|
166
|
+
/>
|
|
167
|
+
|
|
168
|
+
<icon
|
|
169
|
+
icon="baseline-edit"
|
|
170
|
+
:width="12"
|
|
171
|
+
:height="12"
|
|
172
|
+
class="ui3n-table__item-rename"
|
|
173
|
+
@click="handleActions($event, 'rename', item)"
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div
|
|
178
|
+
v-if="!sortedItems.length"
|
|
179
|
+
class="ui3n-table__empty"
|
|
180
|
+
>
|
|
181
|
+
{{ placeholder }}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</template>
|
|
186
|
+
|
|
187
|
+
<style lang="scss" scoped>
|
|
188
|
+
@import "../assets/styles/mixins";
|
|
189
|
+
|
|
190
|
+
.ui3n-table {
|
|
191
|
+
--table-header-height: 36px;
|
|
192
|
+
--table-row-height: 28px;
|
|
193
|
+
|
|
194
|
+
position: relative;
|
|
195
|
+
width: 100%;
|
|
196
|
+
height: 100%;
|
|
197
|
+
overflow-x: hidden;
|
|
198
|
+
overflow-y: auto;
|
|
199
|
+
|
|
200
|
+
&__header {
|
|
201
|
+
position: sticky;
|
|
202
|
+
top: 0;
|
|
203
|
+
display: flex;
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: var(--table-header-height);
|
|
206
|
+
justify-content: flex-start;
|
|
207
|
+
align-items: center;
|
|
208
|
+
padding: 0 calc(var(--base-size) * 2);
|
|
209
|
+
background-color: var(--gray-50);
|
|
210
|
+
|
|
211
|
+
&-cell {
|
|
212
|
+
display: flex;
|
|
213
|
+
justify-content: flex-start;
|
|
214
|
+
align-items: center;
|
|
215
|
+
font-size: var(--font-13);
|
|
216
|
+
line-height: var(--font-18);
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
color: var(--black-90);
|
|
219
|
+
|
|
220
|
+
&--sortable {
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&-text {
|
|
226
|
+
display: block;
|
|
227
|
+
position: relative;
|
|
228
|
+
@include text-overflow-ellipsis(100%)
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&__item {
|
|
233
|
+
display: flex;
|
|
234
|
+
width: 100%;
|
|
235
|
+
height: var(--table-row-height);
|
|
236
|
+
justify-content: flex-start;
|
|
237
|
+
align-items: center;
|
|
238
|
+
padding: 0 calc(var(--base-size) * 2) 0 calc(var(--base-size) * 5);
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
border-bottom: 1px solid var(--gray-50);
|
|
241
|
+
|
|
242
|
+
&-bookmark,
|
|
243
|
+
&-rename {
|
|
244
|
+
display: none;
|
|
245
|
+
position: absolute;
|
|
246
|
+
z-index: 1;
|
|
247
|
+
color: var(--black-30);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&-bookmark {
|
|
251
|
+
left: 2px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&-rename {
|
|
255
|
+
right: calc(var(--base-size) * 13 + 24px);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&-icon {
|
|
259
|
+
position: absolute;
|
|
260
|
+
left: calc(var(--base-size) * 2);
|
|
261
|
+
color: var(--black-30);
|
|
262
|
+
pointer-events: none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&-cell {
|
|
266
|
+
position: relative;
|
|
267
|
+
font-weight: 400;
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&:hover {
|
|
272
|
+
background-color: var(--blue-main-30);
|
|
273
|
+
|
|
274
|
+
.ui3n-table__item-bookmark,
|
|
275
|
+
.ui3n-table__item-rename {
|
|
276
|
+
display: block;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ui3n-table__item-icon {
|
|
280
|
+
color: var(--blue-main);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&__name {
|
|
286
|
+
flex: 1 0;
|
|
287
|
+
|
|
288
|
+
&.ui3n-table__item-cell {
|
|
289
|
+
font-size: var(--font-12);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&__type {
|
|
294
|
+
width: calc(var(--base-size) * 7);
|
|
295
|
+
text-align: center;
|
|
296
|
+
|
|
297
|
+
&.ui3n-table__item-cell {
|
|
298
|
+
font-size: var(--font-10);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&__changedAt {
|
|
303
|
+
width: calc(var(--base-size) * 13);
|
|
304
|
+
|
|
305
|
+
&.ui3n-table__item-cell {
|
|
306
|
+
font-size: var(--font-11);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
&__empty {
|
|
311
|
+
font-size: var(--font-20);
|
|
312
|
+
font-style: italic;
|
|
313
|
+
color: var(--black-30);
|
|
314
|
+
text-align: center;
|
|
315
|
+
padding-top: calc(var(--base-size) * 10);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
</style>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import { computed, onMounted, ref, watch } from 'vue'
|
|
4
|
+
import { patchTextareaMaxRowsSupport } from '../helpers/textarea-max-rows'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
text: string;
|
|
8
|
+
rows?: number;
|
|
9
|
+
maxRows?: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
rules?: Array<(v: string) => any>;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}>()
|
|
15
|
+
const emit = defineEmits<{
|
|
16
|
+
(ev: 'init', value: HTMLTextAreaElement): void;
|
|
17
|
+
(ev: 'input', value: string): void;
|
|
18
|
+
(ev: 'focus', value: Event): void;
|
|
19
|
+
(ev: 'blur', value: Event): void;
|
|
20
|
+
(ev: 'update:text', value: string): void;
|
|
21
|
+
(ev: 'update:valid', value: boolean): void;
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const textareaElement = ref<HTMLTextAreaElement | null>(null)
|
|
25
|
+
const isFocused = ref(false)
|
|
26
|
+
const errorMessage = ref('')
|
|
27
|
+
|
|
28
|
+
const componentProps = computed(() => {
|
|
29
|
+
const { rows = 6, maxRows = 6, label = '', placeholder = '', disabled = false } = props
|
|
30
|
+
return { rows, maxRows, label, placeholder, disabled }
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const isValid = computed(() => {
|
|
34
|
+
if (!props.text) {
|
|
35
|
+
return true
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return !errorMessage.value
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
if (textareaElement.value) {
|
|
43
|
+
patchTextareaMaxRowsSupport(textareaElement.value!)
|
|
44
|
+
emit('init', textareaElement.value!)
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
watch(
|
|
49
|
+
() => isValid.value,
|
|
50
|
+
val => emit('update:valid', val),
|
|
51
|
+
{ immediate: true },
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
const validate = (text: string) => {
|
|
55
|
+
errorMessage.value = ''
|
|
56
|
+
if (props.rules && props.rules.length) {
|
|
57
|
+
for (const validateFunction of props.rules) {
|
|
58
|
+
if (typeof validateFunction === 'function') {
|
|
59
|
+
const res = validateFunction(text)
|
|
60
|
+
if (typeof res === 'string') {
|
|
61
|
+
errorMessage.value += res
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const onFocus = (event: Event) => {
|
|
69
|
+
isFocused.value = true
|
|
70
|
+
emit('focus', event)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const onBlur = (event: Event) => {
|
|
74
|
+
isFocused.value = false
|
|
75
|
+
emit('blur', event)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const onInput = (ev: Event) => {
|
|
79
|
+
const value = (ev.target as HTMLInputElement).value
|
|
80
|
+
validate(value)
|
|
81
|
+
emit('update:text', value)
|
|
82
|
+
emit('input', value)
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<div
|
|
88
|
+
:class="[
|
|
89
|
+
'ui3n-text',
|
|
90
|
+
{ 'ui3n-text--disabled': props.disabled, 'ui3n-text--focused': isFocused },
|
|
91
|
+
]"
|
|
92
|
+
>
|
|
93
|
+
<label
|
|
94
|
+
v-if="componentProps.label"
|
|
95
|
+
class="ui3n-text__label"
|
|
96
|
+
>
|
|
97
|
+
{{ componentProps.label }}
|
|
98
|
+
</label>
|
|
99
|
+
<div class="ui3n-text__body">
|
|
100
|
+
<textarea
|
|
101
|
+
ref="textareaElement"
|
|
102
|
+
:value="props.text"
|
|
103
|
+
:placeholder="componentProps.placeholder"
|
|
104
|
+
:readonly="componentProps.disabled"
|
|
105
|
+
:rows="componentProps.rows"
|
|
106
|
+
:max-rows="componentProps.maxRows"
|
|
107
|
+
:disabled="componentProps.disabled"
|
|
108
|
+
class="ui3n-text__content"
|
|
109
|
+
v-bind="$attrs"
|
|
110
|
+
@input="onInput"
|
|
111
|
+
@focusin="onFocus"
|
|
112
|
+
@focusout="onBlur"
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
|
|
118
|
+
<style lang="scss" scoped>
|
|
119
|
+
.ui3n-text {
|
|
120
|
+
position: relative;
|
|
121
|
+
width: 100%;
|
|
122
|
+
|
|
123
|
+
&__label {
|
|
124
|
+
display: block;
|
|
125
|
+
width: 100%;
|
|
126
|
+
font-size: var(--font-12, 12px);
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
color: var(--black-90, #212121);
|
|
129
|
+
margin-bottom: calc(var(--base-size, 8px) / 2);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__body {
|
|
133
|
+
position: relative;
|
|
134
|
+
width: 100%;
|
|
135
|
+
padding: var(--base-size, 8px) 0;
|
|
136
|
+
background-color: var(--gray-50, #f2f2f2);
|
|
137
|
+
border-radius: 4px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&__content {
|
|
141
|
+
resize: none;
|
|
142
|
+
display: block;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
position: relative;
|
|
145
|
+
width: 100%;
|
|
146
|
+
border-radius: 4px;
|
|
147
|
+
background-color: var(--gray-50, #f2f2f2);
|
|
148
|
+
padding: 0 var(--base-size, 8px);
|
|
149
|
+
font-family: OpenSans, sans-serif;
|
|
150
|
+
font-size: var(--font-13, 13px);
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
line-height: var(--font-16, 16px);
|
|
153
|
+
color: var(--black-90, #212121);
|
|
154
|
+
border: none;
|
|
155
|
+
|
|
156
|
+
&::placeholder {
|
|
157
|
+
font-size: var(--font-13, 13px);
|
|
158
|
+
font-weight: 300;
|
|
159
|
+
font-style: italic;
|
|
160
|
+
color: var(--gray-90, #212121);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&--disabled {
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
user-select: none;
|
|
167
|
+
opacity: 0.5;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&--focused {
|
|
171
|
+
.ui3n-text {
|
|
172
|
+
&__body, &__content {
|
|
173
|
+
background-color: var(--blue-main-20, #d8edfd);
|
|
174
|
+
outline: none;
|
|
175
|
+
border: none;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
</style>
|
|
181
|
+
../tools/textarea-max-rows
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
title: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
};
|
|
5
|
-
text: {
|
|
6
|
-
type: import("vue").PropType<string>;
|
|
7
|
-
};
|
|
8
|
-
additionalText: {
|
|
9
|
-
type: import("vue").PropType<string>;
|
|
10
|
-
};
|
|
11
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
select: (fileList: FileList) => void;
|
|
13
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
-
title: {
|
|
15
|
-
type: import("vue").PropType<string>;
|
|
16
|
-
};
|
|
17
|
-
text: {
|
|
18
|
-
type: import("vue").PropType<string>;
|
|
19
|
-
};
|
|
20
|
-
additionalText: {
|
|
21
|
-
type: import("vue").PropType<string>;
|
|
22
|
-
};
|
|
23
|
-
}>> & {
|
|
24
|
-
onSelect?: ((fileList: FileList) => any) | undefined;
|
|
25
|
-
}, {}, {}>, {
|
|
26
|
-
default?(_: {}): any;
|
|
27
|
-
}>;
|
|
28
|
-
export default _default;
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
emoji: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
size: {
|
|
7
|
-
type: import("vue").PropType<string | number>;
|
|
8
|
-
};
|
|
9
|
-
readonly: {
|
|
10
|
-
type: import("vue").PropType<boolean>;
|
|
11
|
-
};
|
|
12
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
click: (value: Event) => void;
|
|
14
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
emoji: {
|
|
16
|
-
type: import("vue").PropType<string>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
size: {
|
|
20
|
-
type: import("vue").PropType<string | number>;
|
|
21
|
-
};
|
|
22
|
-
readonly: {
|
|
23
|
-
type: import("vue").PropType<boolean>;
|
|
24
|
-
};
|
|
25
|
-
}>> & {
|
|
26
|
-
onClick?: ((value: Event) => any) | undefined;
|
|
27
|
-
}, {}, {}>;
|
|
28
|
-
export default _default;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
value: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
label: {
|
|
7
|
-
type: import("vue").PropType<string>;
|
|
8
|
-
};
|
|
9
|
-
placeholder: {
|
|
10
|
-
type: import("vue").PropType<string>;
|
|
11
|
-
};
|
|
12
|
-
clearable: {
|
|
13
|
-
type: import("vue").PropType<boolean>;
|
|
14
|
-
};
|
|
15
|
-
autofocus: {
|
|
16
|
-
type: import("vue").PropType<boolean>;
|
|
17
|
-
};
|
|
18
|
-
rules: {
|
|
19
|
-
type: import("vue").PropType<((v: string) => any)[]>;
|
|
20
|
-
};
|
|
21
|
-
disabled: {
|
|
22
|
-
type: import("vue").PropType<boolean>;
|
|
23
|
-
};
|
|
24
|
-
icon: {
|
|
25
|
-
type: import("vue").PropType<string>;
|
|
26
|
-
};
|
|
27
|
-
iconColor: {
|
|
28
|
-
type: import("vue").PropType<string>;
|
|
29
|
-
};
|
|
30
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
-
input: (value: string) => void;
|
|
32
|
-
focus: (value: Event) => void;
|
|
33
|
-
blur: (value: Event) => void;
|
|
34
|
-
clear: (value: string) => void;
|
|
35
|
-
change: (value: string) => void;
|
|
36
|
-
"update:value": (value: string) => void;
|
|
37
|
-
"update:valid": (value: boolean) => void;
|
|
38
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
-
value: {
|
|
40
|
-
type: import("vue").PropType<string>;
|
|
41
|
-
required: true;
|
|
42
|
-
};
|
|
43
|
-
label: {
|
|
44
|
-
type: import("vue").PropType<string>;
|
|
45
|
-
};
|
|
46
|
-
placeholder: {
|
|
47
|
-
type: import("vue").PropType<string>;
|
|
48
|
-
};
|
|
49
|
-
clearable: {
|
|
50
|
-
type: import("vue").PropType<boolean>;
|
|
51
|
-
};
|
|
52
|
-
autofocus: {
|
|
53
|
-
type: import("vue").PropType<boolean>;
|
|
54
|
-
};
|
|
55
|
-
rules: {
|
|
56
|
-
type: import("vue").PropType<((v: string) => any)[]>;
|
|
57
|
-
};
|
|
58
|
-
disabled: {
|
|
59
|
-
type: import("vue").PropType<boolean>;
|
|
60
|
-
};
|
|
61
|
-
icon: {
|
|
62
|
-
type: import("vue").PropType<string>;
|
|
63
|
-
};
|
|
64
|
-
iconColor: {
|
|
65
|
-
type: import("vue").PropType<string>;
|
|
66
|
-
};
|
|
67
|
-
}>> & {
|
|
68
|
-
onFocus?: ((value: Event) => any) | undefined;
|
|
69
|
-
onBlur?: ((value: Event) => any) | undefined;
|
|
70
|
-
onChange?: ((value: string) => any) | undefined;
|
|
71
|
-
onInput?: ((value: string) => any) | undefined;
|
|
72
|
-
onClear?: ((value: string) => any) | undefined;
|
|
73
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
74
|
-
"onUpdate:valid"?: ((value: boolean) => any) | undefined;
|
|
75
|
-
}, {}, {}>;
|
|
76
|
-
export default _default;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
id: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
};
|
|
5
|
-
type: {
|
|
6
|
-
type: import("vue").PropType<"success" | "warning" | "info" | "error">;
|
|
7
|
-
};
|
|
8
|
-
content: {
|
|
9
|
-
type: import("vue").PropType<string>;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
icon: {
|
|
13
|
-
type: import("vue").PropType<string>;
|
|
14
|
-
};
|
|
15
|
-
iconSize: {
|
|
16
|
-
type: import("vue").PropType<string | number>;
|
|
17
|
-
};
|
|
18
|
-
iconColor: {
|
|
19
|
-
type: import("vue").PropType<string>;
|
|
20
|
-
};
|
|
21
|
-
position: {
|
|
22
|
-
type: import("vue").PropType<"left" | "center" | "right">;
|
|
23
|
-
};
|
|
24
|
-
duration: {
|
|
25
|
-
type: import("vue").PropType<number>;
|
|
26
|
-
};
|
|
27
|
-
teleport: {
|
|
28
|
-
type: import("vue").PropType<string>;
|
|
29
|
-
};
|
|
30
|
-
onOpen: {
|
|
31
|
-
type: import("vue").PropType<() => void>;
|
|
32
|
-
};
|
|
33
|
-
onClose: {
|
|
34
|
-
type: import("vue").PropType<() => void>;
|
|
35
|
-
};
|
|
36
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
-
id: {
|
|
38
|
-
type: import("vue").PropType<string>;
|
|
39
|
-
};
|
|
40
|
-
type: {
|
|
41
|
-
type: import("vue").PropType<"success" | "warning" | "info" | "error">;
|
|
42
|
-
};
|
|
43
|
-
content: {
|
|
44
|
-
type: import("vue").PropType<string>;
|
|
45
|
-
required: true;
|
|
46
|
-
};
|
|
47
|
-
icon: {
|
|
48
|
-
type: import("vue").PropType<string>;
|
|
49
|
-
};
|
|
50
|
-
iconSize: {
|
|
51
|
-
type: import("vue").PropType<string | number>;
|
|
52
|
-
};
|
|
53
|
-
iconColor: {
|
|
54
|
-
type: import("vue").PropType<string>;
|
|
55
|
-
};
|
|
56
|
-
position: {
|
|
57
|
-
type: import("vue").PropType<"left" | "center" | "right">;
|
|
58
|
-
};
|
|
59
|
-
duration: {
|
|
60
|
-
type: import("vue").PropType<number>;
|
|
61
|
-
};
|
|
62
|
-
teleport: {
|
|
63
|
-
type: import("vue").PropType<string>;
|
|
64
|
-
};
|
|
65
|
-
onOpen: {
|
|
66
|
-
type: import("vue").PropType<() => void>;
|
|
67
|
-
};
|
|
68
|
-
onClose: {
|
|
69
|
-
type: import("vue").PropType<() => void>;
|
|
70
|
-
};
|
|
71
|
-
}>>, {}, {}>;
|
|
72
|
-
export default _default;
|