quasar-ui-sellmate-ui-kit 2.2.4 → 2.2.5
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/index.common.js +2 -2
- package/dist/index.css +1 -17
- package/dist/index.esm.js +2 -2
- package/dist/index.min.css +2 -2
- package/dist/index.rtl.css +1 -17
- package/dist/index.rtl.min.css +2 -2
- package/dist/index.umd.js +69 -69
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/SFilePicker.vue +200 -200
- package/src/components/STab.vue +15 -14
- package/src/components/STabs.vue +32 -32
- package/src/css/app.scss +0 -16
package/package.json
CHANGED
|
@@ -1,200 +1,200 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-file
|
|
3
|
-
outlined
|
|
4
|
-
dense
|
|
5
|
-
:model-value="modelValue"
|
|
6
|
-
@update:model-value="value => $emit('update:modelValue', value)"
|
|
7
|
-
class="s-file rounded-borders"
|
|
8
|
-
ref="sFilePickerRef"
|
|
9
|
-
:disable="disable"
|
|
10
|
-
:class="{ 's-file--nodata': displayPlaceholder }"
|
|
11
|
-
>
|
|
12
|
-
<template #prepend>
|
|
13
|
-
<q-icon :name="attachFileIcon" size="20px" color="Grey_Darken-4" @click.stop />
|
|
14
|
-
<div v-if="displayPlaceholder" class="file-placeholder text-Grey_Lighten-2" @click.stop>
|
|
15
|
-
{{ placeholder }}
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
<template v-slot:append v-if="clearable">
|
|
19
|
-
<q-icon
|
|
20
|
-
:name="closeIcon"
|
|
21
|
-
size="16px"
|
|
22
|
-
class="cursor-pointer"
|
|
23
|
-
@click="clearFile"
|
|
24
|
-
data-cy="delete-icon"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
</q-file>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import { defineComponent, ref, computed } from 'vue';
|
|
32
|
-
import { QFile, QIcon } from 'quasar';
|
|
33
|
-
import { attachFileIcon, closeIcon } from '../assets/icons.js';
|
|
34
|
-
|
|
35
|
-
export default defineComponent({
|
|
36
|
-
name: 'SFilePicker',
|
|
37
|
-
components: {
|
|
38
|
-
QFile,
|
|
39
|
-
QIcon,
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
placeholder: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: '파일을 업로드 해주세요',
|
|
45
|
-
},
|
|
46
|
-
disable: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
clearable: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false,
|
|
53
|
-
},
|
|
54
|
-
modelValue: {
|
|
55
|
-
type: [File, FileList, Array, null],
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
setup(props, { emit }) {
|
|
60
|
-
function clearFile() {
|
|
61
|
-
emit('update:modelValue', null);
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
closeIcon,
|
|
65
|
-
clearFile,
|
|
66
|
-
attachFileIcon,
|
|
67
|
-
sFilePickerRef: ref(null),
|
|
68
|
-
displayPlaceholder: computed(
|
|
69
|
-
() => {
|
|
70
|
-
if (Array.isArray(props.modelValue)) {
|
|
71
|
-
return props.modelValue.length === 0 || (props.modelValue.length > 0
|
|
72
|
-
&& props.modelValue.every(file => file instanceof File && file.size === 0));
|
|
73
|
-
}
|
|
74
|
-
if (props.modelValue === null) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return props.modelValue instanceof File && props.modelValue.size === 0;
|
|
78
|
-
},
|
|
79
|
-
),
|
|
80
|
-
};
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style lang="scss">
|
|
86
|
-
@import '../css/quasar.variables.scss';
|
|
87
|
-
|
|
88
|
-
.s-file {
|
|
89
|
-
width: fit-content;
|
|
90
|
-
max-height: $default-height;
|
|
91
|
-
|
|
92
|
-
.q-field__inner {
|
|
93
|
-
.q-field__control {
|
|
94
|
-
align-items: center;
|
|
95
|
-
padding: 4px 8px;
|
|
96
|
-
min-height: $default-height;
|
|
97
|
-
height: $default-height;
|
|
98
|
-
|
|
99
|
-
&:hover,
|
|
100
|
-
&:active {
|
|
101
|
-
background: $Grey_Lighten-5;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:after {
|
|
105
|
-
border: 1px solid $Grey_Lighten-1;
|
|
106
|
-
box-shadow: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.q-field__prepend {
|
|
110
|
-
width: fit-content;
|
|
111
|
-
height: $default-content-height;
|
|
112
|
-
padding: 0;
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
|
|
115
|
-
> .q-icon {
|
|
116
|
-
margin-right: $between-margin-md;
|
|
117
|
-
}
|
|
118
|
-
.file-placeholder {
|
|
119
|
-
line-height: $default-line-height;
|
|
120
|
-
font-size: $default-font;
|
|
121
|
-
font-weight: $default-font-weight;
|
|
122
|
-
height: 100%;
|
|
123
|
-
display: block;
|
|
124
|
-
width: fit-content;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&-container {
|
|
129
|
-
.q-field__native {
|
|
130
|
-
min-height: 0;
|
|
131
|
-
|
|
132
|
-
> div {
|
|
133
|
-
font-size: $default-font;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
color: $Grey_Darken-5;
|
|
136
|
-
word-break: keep-all;
|
|
137
|
-
white-space: nowrap;
|
|
138
|
-
text-overflow: ellipsis;
|
|
139
|
-
margin-right: 8px;
|
|
140
|
-
line-height: 16px;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.q-field__append {
|
|
146
|
-
height: $default-content-size;
|
|
147
|
-
font-size: $default-font;
|
|
148
|
-
width: 20px;
|
|
149
|
-
padding: 0;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
align-items: center;
|
|
152
|
-
margin-left: 8px;
|
|
153
|
-
|
|
154
|
-
> .q-icon {
|
|
155
|
-
font-size: 20px;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&--nodata {
|
|
162
|
-
.q-field__inner .q-field__control .q-field__control-container {
|
|
163
|
-
display: none;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.s-file.q-field--disabled {
|
|
169
|
-
.q-field__inner {
|
|
170
|
-
.q-field__control {
|
|
171
|
-
opacity: 1 !important;
|
|
172
|
-
background: $Grey_Lighten-3;
|
|
173
|
-
|
|
174
|
-
&:after {
|
|
175
|
-
border: 1px solid $Grey_Lighten-2;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&-container {
|
|
179
|
-
.q-field__native {
|
|
180
|
-
> span {
|
|
181
|
-
color: $Grey_Default;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.q-field__prepend {
|
|
187
|
-
opacity: 1 !important;
|
|
188
|
-
|
|
189
|
-
.file-placeholder {
|
|
190
|
-
color: $Grey_Default !important;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.q-icon {
|
|
194
|
-
color: $Grey_Default !important;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-file
|
|
3
|
+
outlined
|
|
4
|
+
dense
|
|
5
|
+
:model-value="modelValue"
|
|
6
|
+
@update:model-value="value => $emit('update:modelValue', value)"
|
|
7
|
+
class="s-file rounded-borders"
|
|
8
|
+
ref="sFilePickerRef"
|
|
9
|
+
:disable="disable"
|
|
10
|
+
:class="{ 's-file--nodata': displayPlaceholder }"
|
|
11
|
+
>
|
|
12
|
+
<template #prepend>
|
|
13
|
+
<q-icon :name="attachFileIcon" size="20px" color="Grey_Darken-4" @click.stop />
|
|
14
|
+
<div v-if="displayPlaceholder" class="file-placeholder text-Grey_Lighten-2" @click.stop>
|
|
15
|
+
{{ placeholder }}
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<template v-slot:append v-if="clearable">
|
|
19
|
+
<q-icon
|
|
20
|
+
:name="closeIcon"
|
|
21
|
+
size="16px"
|
|
22
|
+
class="cursor-pointer"
|
|
23
|
+
@click="clearFile"
|
|
24
|
+
data-cy="delete-icon"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
27
|
+
</q-file>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { defineComponent, ref, computed } from 'vue';
|
|
32
|
+
import { QFile, QIcon } from 'quasar';
|
|
33
|
+
import { attachFileIcon, closeIcon } from '../assets/icons.js';
|
|
34
|
+
|
|
35
|
+
export default defineComponent({
|
|
36
|
+
name: 'SFilePicker',
|
|
37
|
+
components: {
|
|
38
|
+
QFile,
|
|
39
|
+
QIcon,
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
placeholder: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '파일을 업로드 해주세요',
|
|
45
|
+
},
|
|
46
|
+
disable: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
clearable: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
modelValue: {
|
|
55
|
+
type: [File, FileList, Array, null],
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
setup(props, { emit }) {
|
|
60
|
+
function clearFile() {
|
|
61
|
+
emit('update:modelValue', null);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
closeIcon,
|
|
65
|
+
clearFile,
|
|
66
|
+
attachFileIcon,
|
|
67
|
+
sFilePickerRef: ref(null),
|
|
68
|
+
displayPlaceholder: computed(
|
|
69
|
+
() => {
|
|
70
|
+
if (Array.isArray(props.modelValue)) {
|
|
71
|
+
return props.modelValue.length === 0 || (props.modelValue.length > 0
|
|
72
|
+
&& props.modelValue.every(file => file instanceof File && file.size === 0));
|
|
73
|
+
}
|
|
74
|
+
if (props.modelValue === null) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return props.modelValue instanceof File && props.modelValue.size === 0;
|
|
78
|
+
},
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<style lang="scss">
|
|
86
|
+
@import '../css/quasar.variables.scss';
|
|
87
|
+
|
|
88
|
+
.s-file {
|
|
89
|
+
width: fit-content;
|
|
90
|
+
max-height: $default-height;
|
|
91
|
+
|
|
92
|
+
.q-field__inner {
|
|
93
|
+
.q-field__control {
|
|
94
|
+
align-items: center;
|
|
95
|
+
padding: 4px 8px;
|
|
96
|
+
min-height: $default-height;
|
|
97
|
+
height: $default-height;
|
|
98
|
+
|
|
99
|
+
&:hover,
|
|
100
|
+
&:active {
|
|
101
|
+
background: $Grey_Lighten-5;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:after {
|
|
105
|
+
border: 1px solid $Grey_Lighten-1;
|
|
106
|
+
box-shadow: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.q-field__prepend {
|
|
110
|
+
width: fit-content;
|
|
111
|
+
height: $default-content-height;
|
|
112
|
+
padding: 0;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
|
|
115
|
+
> .q-icon {
|
|
116
|
+
margin-right: $between-margin-md;
|
|
117
|
+
}
|
|
118
|
+
.file-placeholder {
|
|
119
|
+
line-height: $default-line-height;
|
|
120
|
+
font-size: $default-font;
|
|
121
|
+
font-weight: $default-font-weight;
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: block;
|
|
124
|
+
width: fit-content;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-container {
|
|
129
|
+
.q-field__native {
|
|
130
|
+
min-height: 0;
|
|
131
|
+
|
|
132
|
+
> div {
|
|
133
|
+
font-size: $default-font;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
color: $Grey_Darken-5;
|
|
136
|
+
word-break: keep-all;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
text-overflow: ellipsis;
|
|
139
|
+
margin-right: 8px;
|
|
140
|
+
line-height: 16px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.q-field__append {
|
|
146
|
+
height: $default-content-size;
|
|
147
|
+
font-size: $default-font;
|
|
148
|
+
width: 20px;
|
|
149
|
+
padding: 0;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
align-items: center;
|
|
152
|
+
margin-left: 8px;
|
|
153
|
+
|
|
154
|
+
> .q-icon {
|
|
155
|
+
font-size: 20px;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&--nodata {
|
|
162
|
+
.q-field__inner .q-field__control .q-field__control-container {
|
|
163
|
+
display: none;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.s-file.q-field--disabled {
|
|
169
|
+
.q-field__inner {
|
|
170
|
+
.q-field__control {
|
|
171
|
+
opacity: 1 !important;
|
|
172
|
+
background: $Grey_Lighten-3;
|
|
173
|
+
|
|
174
|
+
&:after {
|
|
175
|
+
border: 1px solid $Grey_Lighten-2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&-container {
|
|
179
|
+
.q-field__native {
|
|
180
|
+
> span {
|
|
181
|
+
color: $Grey_Default;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.q-field__prepend {
|
|
187
|
+
opacity: 1 !important;
|
|
188
|
+
|
|
189
|
+
.file-placeholder {
|
|
190
|
+
color: $Grey_Default !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.q-icon {
|
|
194
|
+
color: $Grey_Default !important;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
</style>
|
package/src/components/STab.vue
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-tab :name="name" :
|
|
3
|
-
<template
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
{{ secondLabel }}
|
|
2
|
+
<q-tab :name="name" :ripple="false" :class="$attrs.class" class="s-tab">
|
|
3
|
+
<template #default>
|
|
4
|
+
{{ label }}
|
|
5
|
+
<span class="q-ml-xs badge" v-if="badge">
|
|
6
|
+
{{ badge }}
|
|
9
7
|
</span>
|
|
10
8
|
</template>
|
|
11
9
|
</q-tab>
|
|
@@ -24,7 +22,7 @@ export default defineComponent({
|
|
|
24
22
|
props: {
|
|
25
23
|
name: String,
|
|
26
24
|
label: String,
|
|
27
|
-
|
|
25
|
+
badge: String,
|
|
28
26
|
},
|
|
29
27
|
});
|
|
30
28
|
</script>
|
|
@@ -34,19 +32,23 @@ export default defineComponent({
|
|
|
34
32
|
|
|
35
33
|
.s-tab {
|
|
36
34
|
padding: $tab-padding;
|
|
37
|
-
border-radius: $button-border-radius $button-border-radius 0 0;
|
|
38
|
-
border: 1px solid $Grey_Lighten-2;
|
|
39
|
-
border-bottom: 1px solid $positive;
|
|
40
35
|
background: $Grey_Lighten-5;
|
|
41
36
|
color: $Grey_Default;
|
|
42
37
|
min-height: 0;
|
|
38
|
+
border: 1px solid $Grey_Lighten-2;
|
|
39
|
+
border: {
|
|
40
|
+
bottom: 1px solid $positive;
|
|
41
|
+
radius: $button-border-radius $button-border-radius 0 0;
|
|
42
|
+
}
|
|
43
43
|
.q-tab__content {
|
|
44
44
|
padding: 0;
|
|
45
45
|
height: $default-content-height;
|
|
46
46
|
min-width: 0;
|
|
47
|
-
flex-wrap: nowrap;
|
|
48
47
|
display: flex;
|
|
49
|
-
flex
|
|
48
|
+
flex: {
|
|
49
|
+
wrap: nowrap;
|
|
50
|
+
direction: row;
|
|
51
|
+
}
|
|
50
52
|
.q-tab__label {
|
|
51
53
|
height: $default-content-height;
|
|
52
54
|
line-height: $default-line-height;
|
|
@@ -54,7 +56,6 @@ export default defineComponent({
|
|
|
54
56
|
weight: $default-font-weight;
|
|
55
57
|
size: $default-font;
|
|
56
58
|
}
|
|
57
|
-
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
}
|
package/src/components/STabs.vue
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-tabs
|
|
3
|
-
align="left"
|
|
4
|
-
active-color="positive"
|
|
5
|
-
indicator-color="transparent"
|
|
6
|
-
no-caps
|
|
7
|
-
dense
|
|
8
|
-
class="s-tabs text-grey"
|
|
9
|
-
:model-value="tab"
|
|
10
|
-
>
|
|
11
|
-
<slot></slot>
|
|
12
|
-
</q-tabs>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import { defineComponent, ref } from 'vue';
|
|
17
|
-
import { QTabs } from 'quasar';
|
|
18
|
-
|
|
19
|
-
export default defineComponent({
|
|
20
|
-
name: 'STabs',
|
|
21
|
-
components: {
|
|
22
|
-
QTabs,
|
|
23
|
-
},
|
|
24
|
-
setup(props) {
|
|
25
|
-
const tab = ref(props.modelValue);
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
tab,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<q-tabs
|
|
3
|
+
align="left"
|
|
4
|
+
active-color="positive"
|
|
5
|
+
indicator-color="transparent"
|
|
6
|
+
no-caps
|
|
7
|
+
dense
|
|
8
|
+
class="s-tabs text-grey"
|
|
9
|
+
:model-value="tab"
|
|
10
|
+
>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</q-tabs>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { defineComponent, ref } from 'vue';
|
|
17
|
+
import { QTabs } from 'quasar';
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'STabs',
|
|
21
|
+
components: {
|
|
22
|
+
QTabs,
|
|
23
|
+
},
|
|
24
|
+
setup(props) {
|
|
25
|
+
const tab = ref(props.modelValue);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
tab,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
</script>
|
package/src/css/app.scss
CHANGED
|
@@ -68,22 +68,6 @@
|
|
|
68
68
|
cursor: not-allowed;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.q-tab {
|
|
72
|
-
border: 1px solid $Grey_Lighten-2;
|
|
73
|
-
border-bottom: transparent;
|
|
74
|
-
border-top-left-radius: 4px;
|
|
75
|
-
border-top-right-radius: 4px;
|
|
76
|
-
padding: 0px 20px;
|
|
77
|
-
&--active {
|
|
78
|
-
border-top: 1px solid $positive;
|
|
79
|
-
border-left: 1px solid $positive;
|
|
80
|
-
border-right: 1px solid $positive;
|
|
81
|
-
}
|
|
82
|
-
&--inactive {
|
|
83
|
-
border-bottom: 1px solid $Grey_Lighten-2;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
71
|
.q-card {
|
|
88
72
|
border-radius: 8px !important;
|
|
89
73
|
}
|