@weni/unnnic-system 3.31.1 → 3.32.1
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.d.ts +3822 -10606
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +15979 -17314
- package/dist/unnnic.umd.js +37 -37
- package/package.json +1 -1
- package/src/components/AvatarIcon/AvatarIcon.vue +35 -49
- package/src/components/Breadcrumb/Breadcrumb.vue +20 -14
- package/src/components/Checkbox/Checkbox.vue +44 -57
- package/src/components/DatePicker/DatePicker.vue +53 -35
- package/src/components/DatePicker/{translations.js → translations.ts} +17 -5
- package/src/components/Input/BaseInput.vue +67 -75
- package/src/components/Input/Input.vue +84 -132
- package/src/components/Input/TextInput.vue +119 -136
- package/src/components/Input/__test__/TextInput.spec.js +10 -14
- package/src/components/Pagination/Pagination.vue +124 -141
- package/src/components/Radio/Radio.vue +36 -31
- package/src/components/Select/SelectItem.vue +24 -24
- package/src/components/SkeletonLoading/SkeletonLoading.vue +87 -88
- package/src/components/SkeletonLoading/skeletonTheme.vue +49 -44
- package/src/components/index.ts +1 -41
- package/src/stories/PageHeader.stories.js +11 -5
- package/src/types/index.d.ts +0 -1
- package/src/components/Button/ButtonIcon.vue +0 -106
- package/src/components/Button/__tests__/ButtonIcon.spec.js +0 -56
- package/src/components/Carousel/Carousel.vue +0 -59
- package/src/components/Carousel/TagCarousel.vue +0 -209
- package/src/components/Carousel/__tests__/TagCarousel.spec.js +0 -258
- package/src/components/ChatText/ChatText.vue +0 -179
- package/src/components/CircleProgressBar/CircleProgressBar.vue +0 -150
- package/src/components/Indicator/Indicator.vue +0 -110
- package/src/components/InputNext/InputNext.vue +0 -282
- package/src/components/ModalUpload/ModalUpload.vue +0 -181
- package/src/components/MoodRating/MoodRating.vue +0 -130
- package/src/components/Slider/Slider.vue +0 -438
- package/src/components/Slider/__tests__/Slider.spec.js +0 -321
- package/src/components/StarRating/StarRating.vue +0 -76
- package/src/components/TransitionRipple/TransitionRipple.vue +0 -126
- package/src/stories/ButtonIcon.stories.js +0 -31
- package/src/stories/Carousel.stories.js +0 -45
- package/src/stories/ChatText.stories.js +0 -57
- package/src/stories/CircleProgressBar.stories.js +0 -15
- package/src/stories/Indicator.stories.js +0 -18
- package/src/stories/InputNext.stories.js +0 -92
- package/src/stories/ModalUpload.stories.js +0 -25
- package/src/stories/MoodRating.stories.js +0 -33
- package/src/stories/Slider.stories.js +0 -23
- package/src/stories/StarRating.stories.js +0 -38
- package/src/stories/TransitionRipple.stories.js +0 -35
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="unnnic-circle-progress-bar">
|
|
3
|
-
<svg
|
|
4
|
-
width="46"
|
|
5
|
-
height="46"
|
|
6
|
-
class="semicircle"
|
|
7
|
-
>
|
|
8
|
-
<circle
|
|
9
|
-
cx="23"
|
|
10
|
-
cy="23"
|
|
11
|
-
r="21"
|
|
12
|
-
stroke="black"
|
|
13
|
-
stroke-width="4px"
|
|
14
|
-
:class="['background', progress === totalProgress ? 'filled' : '']"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<path
|
|
18
|
-
v-show="progress < totalProgress && progress > 0"
|
|
19
|
-
id="path"
|
|
20
|
-
ref="background"
|
|
21
|
-
fill="none"
|
|
22
|
-
stroke-linecap="round"
|
|
23
|
-
class="front"
|
|
24
|
-
stroke-width="4px"
|
|
25
|
-
></path>
|
|
26
|
-
</svg>
|
|
27
|
-
|
|
28
|
-
<div class="content">{{ progress }}/{{ totalProgress }}</div>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
export default {
|
|
34
|
-
components: {},
|
|
35
|
-
|
|
36
|
-
props: {
|
|
37
|
-
progress: {
|
|
38
|
-
type: Number,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
totalProgress: {
|
|
42
|
-
type: Number,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
computed: {
|
|
47
|
-
progressChange() {
|
|
48
|
-
return `${this.progress}-${this.totalProgress}`;
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
watch: {
|
|
53
|
-
progressChange: {
|
|
54
|
-
immediate: true,
|
|
55
|
-
handler() {
|
|
56
|
-
function polarToCartesian(centerX, centerY, radius, angleInDegrees) {
|
|
57
|
-
const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
x: centerX + radius * -Math.cos(angleInRadians),
|
|
61
|
-
y: centerY + radius * -Math.sin(angleInRadians),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function describeArc(
|
|
66
|
-
x,
|
|
67
|
-
y,
|
|
68
|
-
innerRadius,
|
|
69
|
-
outerRadius,
|
|
70
|
-
startAngle,
|
|
71
|
-
endAngle,
|
|
72
|
-
) {
|
|
73
|
-
const radius = innerRadius;
|
|
74
|
-
const spread = outerRadius - innerRadius;
|
|
75
|
-
const outerStart = polarToCartesian(x, y, radius + spread, endAngle);
|
|
76
|
-
const outerEnd = polarToCartesian(x, y, radius + spread, startAngle);
|
|
77
|
-
|
|
78
|
-
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
|
|
79
|
-
|
|
80
|
-
const d = [
|
|
81
|
-
'M',
|
|
82
|
-
outerStart.x,
|
|
83
|
-
outerStart.y,
|
|
84
|
-
'A',
|
|
85
|
-
radius + spread,
|
|
86
|
-
radius + spread,
|
|
87
|
-
0,
|
|
88
|
-
largeArcFlag,
|
|
89
|
-
0,
|
|
90
|
-
outerEnd.x,
|
|
91
|
-
outerEnd.y,
|
|
92
|
-
].join(' ');
|
|
93
|
-
|
|
94
|
-
return d;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const value = (this.progress / this.totalProgress) * 360;
|
|
98
|
-
|
|
99
|
-
const path = describeArc(23, 23, 0, 21, 180 - value.toFixed(), 180);
|
|
100
|
-
|
|
101
|
-
this.$nextTick(() => {
|
|
102
|
-
this.$refs.background.setAttribute('d', path);
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<style lang="scss" scoped>
|
|
111
|
-
@use '@/assets/scss/unnnic' as *;
|
|
112
|
-
|
|
113
|
-
.unnnic-circle-progress-bar {
|
|
114
|
-
position: relative;
|
|
115
|
-
width: fit-content;
|
|
116
|
-
|
|
117
|
-
.semicircle {
|
|
118
|
-
display: block;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.background {
|
|
122
|
-
fill: transparent;
|
|
123
|
-
stroke: rgba($unnnic-color-teal-8, $unnnic-opacity-level-extra-light);
|
|
124
|
-
|
|
125
|
-
&.filled {
|
|
126
|
-
stroke: $unnnic-color-teal-8;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.front {
|
|
131
|
-
stroke: $unnnic-color-teal-8;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.content {
|
|
135
|
-
position: absolute;
|
|
136
|
-
text-align: center;
|
|
137
|
-
width: 100%;
|
|
138
|
-
|
|
139
|
-
top: 50%;
|
|
140
|
-
left: 50%;
|
|
141
|
-
transform: translate(-50%, -50%);
|
|
142
|
-
|
|
143
|
-
color: $unnnic-color-fg-muted;
|
|
144
|
-
font-family: $unnnic-font-family-secondary;
|
|
145
|
-
font-weight: $unnnic-font-weight-regular;
|
|
146
|
-
font-size: $unnnic-font-size-body-gt;
|
|
147
|
-
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
</style>
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="weni-step-indicator">
|
|
3
|
-
<div
|
|
4
|
-
v-for="step in numberOfSteps"
|
|
5
|
-
:key="step"
|
|
6
|
-
:class="{
|
|
7
|
-
'weni-step-indicator__step__wrapper': true,
|
|
8
|
-
'weni-step-indicator--has-separator': step > 1,
|
|
9
|
-
}"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
v-if="step !== 1"
|
|
13
|
-
:class="{
|
|
14
|
-
'weni-step-indicator__step__separator': true,
|
|
15
|
-
'weni-step-indicator__step__separator--active': step <= currentStep,
|
|
16
|
-
}"
|
|
17
|
-
/>
|
|
18
|
-
<div
|
|
19
|
-
:class="{
|
|
20
|
-
'weni-step-indicator__step': true,
|
|
21
|
-
'weni-step-indicator__step--active': step <= currentStep,
|
|
22
|
-
}"
|
|
23
|
-
>
|
|
24
|
-
<span class="weni-step-indicator__label">
|
|
25
|
-
{{ titleForStep(step) }}
|
|
26
|
-
</span>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
export default {
|
|
34
|
-
name: 'UnnnicIndicator',
|
|
35
|
-
props: {
|
|
36
|
-
numberOfSteps: {
|
|
37
|
-
type: Number,
|
|
38
|
-
required: true,
|
|
39
|
-
},
|
|
40
|
-
titles: {
|
|
41
|
-
type: Array,
|
|
42
|
-
default: () => [],
|
|
43
|
-
},
|
|
44
|
-
currentStep: {
|
|
45
|
-
type: Number,
|
|
46
|
-
default: 0,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
methods: {
|
|
50
|
-
titleForStep(step) {
|
|
51
|
-
try {
|
|
52
|
-
return this.titles[step - 1];
|
|
53
|
-
} catch (e) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<style lang="scss" scoped>
|
|
62
|
-
@use '@/assets/scss/unnnic' as *;
|
|
63
|
-
|
|
64
|
-
.weni-step-indicator {
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
width: 100%;
|
|
68
|
-
&--has-separator {
|
|
69
|
-
flex: 1;
|
|
70
|
-
}
|
|
71
|
-
&__step {
|
|
72
|
-
border-radius: 50%;
|
|
73
|
-
height: $unnnic-avatar-size-nano;
|
|
74
|
-
width: $unnnic-avatar-size-nano;
|
|
75
|
-
border: $unnnic-border-width-thick solid $unnnic-color-border-muted;
|
|
76
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
77
|
-
position: relative;
|
|
78
|
-
&__wrapper {
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
}
|
|
82
|
-
&--active {
|
|
83
|
-
background-color: $unnnic-color-teal-8;
|
|
84
|
-
border: 4px solid rgba(0, 222, 210, 0.24);
|
|
85
|
-
background-clip: content-box;
|
|
86
|
-
}
|
|
87
|
-
&__separator {
|
|
88
|
-
border: $unnnic-border-width-thin solid $unnnic-color-border-muted;
|
|
89
|
-
margin: 0 $unnnic-inline-xs;
|
|
90
|
-
border-radius: 3px;
|
|
91
|
-
flex: 1;
|
|
92
|
-
&--active {
|
|
93
|
-
border: 2px solid $unnnic-color-teal-8;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
&__label {
|
|
98
|
-
position: absolute;
|
|
99
|
-
white-space: nowrap;
|
|
100
|
-
text-align: center;
|
|
101
|
-
transform: translateX(-50%);
|
|
102
|
-
left: 50%;
|
|
103
|
-
top: 100%;
|
|
104
|
-
margin: $unnnic-inline-xs 0 0 0;
|
|
105
|
-
color: $unnnic-color-fg-base;
|
|
106
|
-
font-size: $unnnic-font-size-body-gt;
|
|
107
|
-
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
</style>
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="['unnnic-input', `size-${size}`, { 'type-error': hasError }]">
|
|
3
|
-
<span
|
|
4
|
-
v-if="!!$slots.label || label"
|
|
5
|
-
:class="[
|
|
6
|
-
'label unnnic-font secondary color-fg-base',
|
|
7
|
-
{ 'body-md': size === 'sm', 'body-gt': size == 'md' },
|
|
8
|
-
]"
|
|
9
|
-
@click="$refs.input.focus()"
|
|
10
|
-
>
|
|
11
|
-
<template v-if="!!$slots.label">
|
|
12
|
-
<slot name="label" />
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<template v-else-if="label">
|
|
16
|
-
{{ label }}
|
|
17
|
-
</template>
|
|
18
|
-
</span>
|
|
19
|
-
|
|
20
|
-
<div
|
|
21
|
-
class="input-container"
|
|
22
|
-
@click="$refs.input.focus()"
|
|
23
|
-
>
|
|
24
|
-
<UnnnicIcon
|
|
25
|
-
v-if="iconLeft"
|
|
26
|
-
:icon="iconLeft"
|
|
27
|
-
size="sm"
|
|
28
|
-
:scheme="iconScheme"
|
|
29
|
-
:clickable="!!$attrs['icon-left-click']"
|
|
30
|
-
@click="
|
|
31
|
-
$attrs['icon-left-click']
|
|
32
|
-
? $emit('icon-left-click')
|
|
33
|
-
: $refs.input.focus()
|
|
34
|
-
"
|
|
35
|
-
/>
|
|
36
|
-
|
|
37
|
-
<input
|
|
38
|
-
ref="input"
|
|
39
|
-
class="unnnic-font secondary"
|
|
40
|
-
:type="
|
|
41
|
-
allowTogglePassword
|
|
42
|
-
? showPassword
|
|
43
|
-
? 'text'
|
|
44
|
-
: 'password'
|
|
45
|
-
: nativeType
|
|
46
|
-
"
|
|
47
|
-
:placeholder="placeholder"
|
|
48
|
-
:disabled="disabled"
|
|
49
|
-
:value="modelValue"
|
|
50
|
-
:maxlength="maxlength"
|
|
51
|
-
:readonly="readonly"
|
|
52
|
-
@focus="focus"
|
|
53
|
-
@blur="blur"
|
|
54
|
-
@input="$emit('update:model-value', $event.srcElement.value)"
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<UnnnicIcon
|
|
58
|
-
v-if="iconRight"
|
|
59
|
-
:icon="iconRight"
|
|
60
|
-
size="sm"
|
|
61
|
-
:scheme="iconScheme"
|
|
62
|
-
:clickable="!!$attrs['icon-right-click']"
|
|
63
|
-
@click="
|
|
64
|
-
$attrs['icon-right-click']
|
|
65
|
-
? $emit('icon-right-click')
|
|
66
|
-
: $refs.input.focus()
|
|
67
|
-
"
|
|
68
|
-
/>
|
|
69
|
-
|
|
70
|
-
<UnnnicIcon
|
|
71
|
-
v-if="allowTogglePassword"
|
|
72
|
-
:icon="showPassword ? 'view-off-1' : 'view-1-1'"
|
|
73
|
-
size="sm"
|
|
74
|
-
:scheme="iconScheme"
|
|
75
|
-
clickable
|
|
76
|
-
@click="showPassword = !showPassword"
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div
|
|
81
|
-
v-if="error && error !== true"
|
|
82
|
-
class="message unnnic-font secondary body-md color-feedback-red"
|
|
83
|
-
>
|
|
84
|
-
{{ error }}
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div
|
|
88
|
-
v-else-if="message"
|
|
89
|
-
class="message unnnic-font secondary body-md color-fg-base"
|
|
90
|
-
>
|
|
91
|
-
{{ message }}
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<script>
|
|
97
|
-
import UnnnicIcon from '../Icon.vue';
|
|
98
|
-
|
|
99
|
-
export default {
|
|
100
|
-
components: {
|
|
101
|
-
UnnnicIcon,
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
props: {
|
|
105
|
-
modelValue: String,
|
|
106
|
-
label: String,
|
|
107
|
-
iconLeft: String,
|
|
108
|
-
iconRight: String,
|
|
109
|
-
|
|
110
|
-
allowTogglePassword: Boolean,
|
|
111
|
-
disabled: Boolean,
|
|
112
|
-
|
|
113
|
-
maxlength: {
|
|
114
|
-
type: [String, Number],
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
size: {
|
|
118
|
-
type: String,
|
|
119
|
-
default: 'md',
|
|
120
|
-
validator: (size) => ['md', 'sm'].includes(size),
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
type: {
|
|
124
|
-
type: String,
|
|
125
|
-
default: 'normal',
|
|
126
|
-
validator: (type) => ['normal', 'error'].includes(type),
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
nativeType: {
|
|
130
|
-
type: String,
|
|
131
|
-
default: 'text',
|
|
132
|
-
validator: (type) => ['text', 'password'].includes(type),
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
placeholder: String,
|
|
136
|
-
|
|
137
|
-
message: String,
|
|
138
|
-
|
|
139
|
-
error: {
|
|
140
|
-
type: [Boolean, String],
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
readonly: {
|
|
144
|
-
type: Boolean,
|
|
145
|
-
default: false,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
data() {
|
|
150
|
-
return {
|
|
151
|
-
isFocused: false,
|
|
152
|
-
showPassword: false,
|
|
153
|
-
};
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
computed: {
|
|
157
|
-
hasError() {
|
|
158
|
-
return this.error === true || this.error || this.type === 'error';
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
iconScheme() {
|
|
162
|
-
if (this.hasError) {
|
|
163
|
-
return 'feedback-red';
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return 'fg-base';
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
methods: {
|
|
171
|
-
focus() {
|
|
172
|
-
this.isFocused = true;
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
blur() {
|
|
176
|
-
this.isFocused = false;
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
</script>
|
|
181
|
-
|
|
182
|
-
<style lang="scss" scoped>
|
|
183
|
-
@use '@/assets/scss/unnnic' as *;
|
|
184
|
-
|
|
185
|
-
.unnnic-input {
|
|
186
|
-
.label {
|
|
187
|
-
display: inline-block;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.input-container {
|
|
191
|
-
background-color: $unnnic-color-bg-base;
|
|
192
|
-
border-radius: $unnnic-border-radius-sm;
|
|
193
|
-
outline-style: solid;
|
|
194
|
-
outline-color: $unnnic-color-bg-muted;
|
|
195
|
-
outline-width: 1px;
|
|
196
|
-
outline-offset: -1px;
|
|
197
|
-
cursor: text;
|
|
198
|
-
display: flex;
|
|
199
|
-
align-items: center;
|
|
200
|
-
column-gap: $unnnic-spacing-inline-xs;
|
|
201
|
-
|
|
202
|
-
&:focus-within {
|
|
203
|
-
outline-color: $unnnic-color-fg-base;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&:has(input:disabled) {
|
|
207
|
-
outline-style: dashed;
|
|
208
|
-
outline-color: $unnnic-color-fg-muted;
|
|
209
|
-
background-color: $unnnic-color-bg-base-soft;
|
|
210
|
-
cursor: default;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
input {
|
|
214
|
-
all: unset;
|
|
215
|
-
|
|
216
|
-
flex: 1;
|
|
217
|
-
|
|
218
|
-
font-family: $unnnic-font-family-secondary;
|
|
219
|
-
font-weight: $unnnic-font-weight-regular;
|
|
220
|
-
color: $unnnic-color-fg-base;
|
|
221
|
-
|
|
222
|
-
&:focus::placeholder {
|
|
223
|
-
color: $unnnic-color-fg-muted;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&::placeholder {
|
|
227
|
-
color: $unnnic-color-fg-base;
|
|
228
|
-
opacity: 1; /* Firefox */
|
|
229
|
-
user-select: none;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.message {
|
|
235
|
-
margin-top: $unnnic-spacing-stack-nano;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
&.size-md {
|
|
239
|
-
.label {
|
|
240
|
-
margin-bottom: $unnnic-spacing-stack-xs;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.input-container {
|
|
244
|
-
padding: $unnnic-squish-xs;
|
|
245
|
-
|
|
246
|
-
input {
|
|
247
|
-
font-size: $unnnic-font-size-body-gt;
|
|
248
|
-
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
&.size-sm {
|
|
254
|
-
.label {
|
|
255
|
-
margin-bottom: $unnnic-spacing-stack-nano;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.input-container {
|
|
259
|
-
padding: $unnnic-squish-nano;
|
|
260
|
-
|
|
261
|
-
input {
|
|
262
|
-
font-size: $unnnic-font-size-body-md;
|
|
263
|
-
line-height: $unnnic-font-size-body-md + $unnnic-line-height-md;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
&.type-error {
|
|
269
|
-
.input-container {
|
|
270
|
-
outline-color: $unnnic-color-fg-critical;
|
|
271
|
-
|
|
272
|
-
input {
|
|
273
|
-
color: $unnnic-color-fg-critical;
|
|
274
|
-
|
|
275
|
-
&::placeholder {
|
|
276
|
-
color: $unnnic-color-fg-critical;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
</style>
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="modal-upload">
|
|
3
|
-
<div class="close-button-container">
|
|
4
|
-
<UnnnicIcon
|
|
5
|
-
class="close-button"
|
|
6
|
-
icon="close-1"
|
|
7
|
-
scheme="fg-base"
|
|
8
|
-
size="sm"
|
|
9
|
-
clickable
|
|
10
|
-
@click="$emit('close')"
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div class="title">
|
|
15
|
-
{{ textTitle }}
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<UnnnicUploadArea
|
|
19
|
-
:acceptMultiple="acceptMultiple"
|
|
20
|
-
:supportedFormats="supportedFormats"
|
|
21
|
-
:maximumUploads="maximumUploads"
|
|
22
|
-
:filesProgress="filesProgress"
|
|
23
|
-
:isUploading="isUploading"
|
|
24
|
-
:canImport="canImport"
|
|
25
|
-
:canDelete="canDelete"
|
|
26
|
-
:maxFileSize="maxFileSize"
|
|
27
|
-
:files="files"
|
|
28
|
-
:subtitle="subtitle"
|
|
29
|
-
@file-change="$emit('file-change', $event)"
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
|
-
<div class="footer">
|
|
33
|
-
<UnnnicButton
|
|
34
|
-
size="large"
|
|
35
|
-
type="tertiary"
|
|
36
|
-
:text="textCancel"
|
|
37
|
-
@click="$emit('cancel')"
|
|
38
|
-
/>
|
|
39
|
-
|
|
40
|
-
<UnnnicButton
|
|
41
|
-
size="large"
|
|
42
|
-
type="primary"
|
|
43
|
-
:text="textAction"
|
|
44
|
-
@click="$emit('action')"
|
|
45
|
-
/>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import UnnnicUploadArea from '../UploadArea/UploadArea.vue';
|
|
52
|
-
import UnnnicIcon from '../Icon.vue';
|
|
53
|
-
import UnnnicButton from '../Button/Button.vue';
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
components: {
|
|
57
|
-
UnnnicUploadArea,
|
|
58
|
-
UnnnicIcon,
|
|
59
|
-
UnnnicButton,
|
|
60
|
-
},
|
|
61
|
-
model: {
|
|
62
|
-
prop: 'files',
|
|
63
|
-
event: 'file-change',
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
props: {
|
|
67
|
-
textCancel: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: 'Cancelar',
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
textAction: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: 'Importar tudo',
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
textTitle: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: 'Importar sentenças',
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
acceptMultiple: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: true,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
supportedFormats: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: '.png',
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
maximumUploads: {
|
|
93
|
-
type: Number,
|
|
94
|
-
default: 1,
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
filesProgress: {
|
|
98
|
-
type: Array,
|
|
99
|
-
default: () => [],
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
isUploading: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: false,
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
canImport: {
|
|
108
|
-
type: Boolean,
|
|
109
|
-
default: false,
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
canDelete: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
default: true,
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
maxFileSize: {
|
|
118
|
-
type: Number,
|
|
119
|
-
default: undefined,
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
files: {
|
|
123
|
-
type: Array,
|
|
124
|
-
default: () => [],
|
|
125
|
-
},
|
|
126
|
-
subtitle: {
|
|
127
|
-
required: false,
|
|
128
|
-
type: String,
|
|
129
|
-
default: '',
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
emits: ['close', 'file-change', 'cancel', 'action'],
|
|
133
|
-
|
|
134
|
-
data() {
|
|
135
|
-
return {};
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
</script>
|
|
139
|
-
|
|
140
|
-
<style lang="scss" scoped>
|
|
141
|
-
@use '@/assets/scss/unnnic' as *;
|
|
142
|
-
|
|
143
|
-
.modal-upload {
|
|
144
|
-
background-color: $unnnic-color-bg-base-soft;
|
|
145
|
-
border-radius: $unnnic-border-radius-sm;
|
|
146
|
-
padding: 0 $unnnic-spacing-inline-md;
|
|
147
|
-
padding-top: $unnnic-spacing-stack-sm;
|
|
148
|
-
padding-bottom: $unnnic-spacing-stack-giant;
|
|
149
|
-
box-shadow: $unnnic-shadow-1;
|
|
150
|
-
|
|
151
|
-
.close-button-container {
|
|
152
|
-
text-align: right;
|
|
153
|
-
margin-bottom: $unnnic-spacing-stack-xs;
|
|
154
|
-
|
|
155
|
-
.close-button {
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.title {
|
|
161
|
-
text-align: center;
|
|
162
|
-
font-family: $unnnic-font-family-secondary;
|
|
163
|
-
font-weight: $unnnic-font-weight-black;
|
|
164
|
-
font-size: $unnnic-font-size-title-sm;
|
|
165
|
-
line-height: $unnnic-font-size-title-sm + $unnnic-line-height-md;
|
|
166
|
-
color: $unnnic-color-fg-emphasized;
|
|
167
|
-
margin-bottom: $unnnic-spacing-stack-md;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.footer {
|
|
171
|
-
margin-top: $unnnic-spacing-stack-md;
|
|
172
|
-
margin-bottom: -$unnnic-spacing-stack-sm;
|
|
173
|
-
display: grid;
|
|
174
|
-
grid-gap: $unnnic-spacing-inline-lg;
|
|
175
|
-
grid-template-columns: repeat(
|
|
176
|
-
auto-fit,
|
|
177
|
-
minmax(10 * $unnnic-font-size, 1fr)
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
</style>
|