@weni/unnnic-system 3.9.1-alpha.0 → 3.9.1-alpha.2
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/CHANGELOG.md +1 -1
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +3 -82
- package/dist/components/Input/BaseInput.vue.d.ts +0 -22
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +3 -82
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +2 -53
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +4 -83
- package/dist/components/InputNext/InputNext.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +29 -194
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +3 -82
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +2 -53
- package/dist/components/SelectTime/index.vue.d.ts +2 -53
- package/dist/components/Tag/DefaultTag.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +236 -1728
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-ed9b7d22.mjs → es-d456f02a.mjs} +1 -1
- package/dist/{index-bbfce723.mjs → index-120e037a.mjs} +11411 -12212
- package/dist/locales/en.json.d.ts +1 -2
- package/dist/locales/es.json.d.ts +1 -2
- package/dist/locales/pt_br.json.d.ts +1 -2
- package/dist/{pt-br-8c45d7e7.mjs → pt-br-b627c074.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +179 -195
- package/dist/unnnic.umd.js +34 -41
- package/package.json +1 -1
- package/src/assets/scss/tailwind.scss +0 -8
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +1 -1
- package/src/components/Button/Button.vue +0 -1
- package/src/components/Input/BaseInput.vue +2 -21
- package/src/components/Input/Input.scss +3 -3
- package/src/components/Input/Input.vue +1 -19
- package/src/components/Input/TextInput.vue +21 -62
- package/src/components/ModalDialog/ModalDialog.vue +146 -60
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +1 -0
- package/src/components/Tag/DefaultTag.vue +0 -5
- package/src/components/index.ts +23 -55
- package/src/locales/en.json +1 -2
- package/src/locales/es.json +1 -2
- package/src/locales/pt_br.json +1 -2
- package/src/stories/ModalDialog.mdx +0 -3
- package/src/stories/ModalDialog.stories.js +1 -1
- package/dist/components/PageHeader/PageHeader.vue.d.ts +0 -28
- package/dist/components/PageHeader/PageHeader.vue.d.ts.map +0 -1
- package/dist/components/PageHeader/index.d.ts +0 -3
- package/dist/components/PageHeader/index.d.ts.map +0 -1
- package/dist/components/PageHeader/types.d.ts +0 -9
- package/dist/components/PageHeader/types.d.ts.map +0 -1
- package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -23
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -40
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -25
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -29
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -23
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/index.d.ts +0 -8
- package/dist/components/ui/dialog/index.d.ts.map +0 -1
- package/src/components/Alert/SIMPLE_MIGRATION_GUIDE.md +0 -152
- package/src/components/PageHeader/PageHeader.vue +0 -154
- package/src/components/PageHeader/index.ts +0 -2
- package/src/components/PageHeader/types.ts +0 -10
- package/src/components/Popover/__tests__/Popover.spec.js +0 -147
- package/src/components/Popover/__tests__/__snapshots__/Popover.spec.js.snap +0 -8
- package/src/components/Popover/index.vue +0 -146
- package/src/components/Select/SelectOption.vue +0 -65
- package/src/components/Select/__tests__/Select.spec.js +0 -412
- package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
- package/src/components/Select/__tests__/SelectOption.spec.js +0 -174
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -97
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +0 -15
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +0 -25
- package/src/components/Select/index.vue +0 -245
- package/src/components/ui/dialog/Dialog.vue +0 -15
- package/src/components/ui/dialog/DialogClose.vue +0 -25
- package/src/components/ui/dialog/DialogContent.vue +0 -114
- package/src/components/ui/dialog/DialogFooter.vue +0 -46
- package/src/components/ui/dialog/DialogHeader.vue +0 -79
- package/src/components/ui/dialog/DialogTitle.vue +0 -34
- package/src/components/ui/dialog/DialogTrigger.vue +0 -12
- package/src/components/ui/dialog/index.ts +0 -7
- package/src/stories/Dialog.stories.js +0 -832
- package/src/stories/PageHeader.stories.js +0 -330
- package/src/stories/Select.stories.js +0 -158
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Alert.vue > matches snapshot 1`] = `
|
|
4
|
-
"<div data-v-fb94f284="" class="alert-container"
|
|
4
|
+
"<div data-v-fb94f284="" class="alert-container">
|
|
5
5
|
<div data-v-fb94f284="" class="alert alert--scheme-aux-green">
|
|
6
6
|
<div data-v-fb94f284="" class="alert__progress"></div>
|
|
7
7
|
<div data-v-fb94f284="" class="alert__text">Test Alert</div>
|
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
v-mask="mask"
|
|
5
5
|
v-bind="attributes"
|
|
6
6
|
:value="fullySanitize(modelValue)"
|
|
7
|
-
:class="
|
|
7
|
+
:class="classes"
|
|
8
8
|
:type="nativeType"
|
|
9
|
-
:readonly="readonly"
|
|
10
9
|
/>
|
|
11
10
|
<input
|
|
12
11
|
v-else
|
|
13
12
|
v-bind="attributes"
|
|
14
13
|
:value="fullySanitize(modelValue)"
|
|
15
|
-
:class="
|
|
14
|
+
:class="classes"
|
|
16
15
|
:type="nativeType"
|
|
17
16
|
:maxlength="maxlength"
|
|
18
|
-
:readonly="readonly"
|
|
19
17
|
/>
|
|
20
18
|
</template>
|
|
21
19
|
|
|
@@ -51,19 +49,10 @@ export default {
|
|
|
51
49
|
},
|
|
52
50
|
hasIconLeft: Boolean,
|
|
53
51
|
hasIconRight: Boolean,
|
|
54
|
-
hasClearIcon: Boolean,
|
|
55
52
|
maxlength: {
|
|
56
53
|
type: Number,
|
|
57
54
|
default: null,
|
|
58
55
|
},
|
|
59
|
-
readonly: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
forceActiveStatus: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: false,
|
|
66
|
-
},
|
|
67
56
|
},
|
|
68
57
|
emits: ['update:modelValue'],
|
|
69
58
|
data() {
|
|
@@ -88,7 +77,6 @@ export default {
|
|
|
88
77
|
{
|
|
89
78
|
'input--has-icon-left': this.hasIconLeft,
|
|
90
79
|
'input--has-icon-right': this.hasIconRight,
|
|
91
|
-
'input--has-clear-icon': this.hasClearIcon,
|
|
92
80
|
},
|
|
93
81
|
];
|
|
94
82
|
},
|
|
@@ -129,13 +117,6 @@ export default {
|
|
|
129
117
|
|
|
130
118
|
&.input--has-icon-right {
|
|
131
119
|
padding-right: $unnnic-space-10;
|
|
132
|
-
&.input--has-clear-icon {
|
|
133
|
-
padding-right: $unnnic-space-10 + $unnnic-space-6;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.input--has-clear-icon {
|
|
138
|
-
padding-right: $unnnic-space-10;
|
|
139
120
|
}
|
|
140
121
|
|
|
141
122
|
&.error {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
caret-color: $unnnic-color-fg-muted;
|
|
10
10
|
font: $unnnic-font-body;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
transition: border-color 0.1s ease-in-out;
|
|
13
|
+
|
|
14
|
+
&:focus {
|
|
15
15
|
border-color: $unnnic-color-border-active;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
v-bind="$attrs"
|
|
14
14
|
v-model="val"
|
|
15
15
|
class="unnnic-form-input"
|
|
16
|
-
:forceActiveStatus="forceActiveStatus"
|
|
17
16
|
:placeholder="placeholder"
|
|
18
17
|
:iconLeft="iconLeft"
|
|
19
18
|
:iconRight="iconRight"
|
|
@@ -26,9 +25,6 @@
|
|
|
26
25
|
:nativeType="nativeType"
|
|
27
26
|
:maxlength="maxlength"
|
|
28
27
|
:disabled="disabled"
|
|
29
|
-
:readonly="readonly"
|
|
30
|
-
:showClear="showClear"
|
|
31
|
-
@clear="$emit('clear')"
|
|
32
28
|
/>
|
|
33
29
|
|
|
34
30
|
<template
|
|
@@ -131,22 +127,8 @@ export default {
|
|
|
131
127
|
type: Boolean,
|
|
132
128
|
default: false,
|
|
133
129
|
},
|
|
134
|
-
readonly: {
|
|
135
|
-
type: Boolean,
|
|
136
|
-
default: false,
|
|
137
|
-
},
|
|
138
|
-
forceActiveStatus: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: false,
|
|
141
|
-
},
|
|
142
|
-
showClear: {
|
|
143
|
-
type: Boolean,
|
|
144
|
-
default: false,
|
|
145
|
-
},
|
|
146
130
|
},
|
|
147
|
-
|
|
148
|
-
emits: ['update:modelValue', 'clear'],
|
|
149
|
-
|
|
131
|
+
emits: ['update:modelValue'],
|
|
150
132
|
data() {
|
|
151
133
|
return {
|
|
152
134
|
val: this.modelValue,
|
|
@@ -12,10 +12,7 @@
|
|
|
12
12
|
class="input-itself"
|
|
13
13
|
:hasIconLeft="!!iconLeft"
|
|
14
14
|
:hasIconRight="!!iconRight || allowTogglePassword"
|
|
15
|
-
:hasClearIcon="showClear"
|
|
16
15
|
:maxlength="maxlength"
|
|
17
|
-
:readonly="readonly"
|
|
18
|
-
:forceActiveStatus="forceActiveStatus"
|
|
19
16
|
@focus="onFocus"
|
|
20
17
|
@blur="onBlur"
|
|
21
18
|
/>
|
|
@@ -30,28 +27,18 @@
|
|
|
30
27
|
@click="onIconLeftClick"
|
|
31
28
|
/>
|
|
32
29
|
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
v-if="iconRightSvg"
|
|
46
|
-
:scheme="iconScheme"
|
|
47
|
-
:icon="iconRightSvg"
|
|
48
|
-
size="ant"
|
|
49
|
-
:clickable="iconRightClickable || allowTogglePassword"
|
|
50
|
-
class="icon-right"
|
|
51
|
-
:class="{ clickable: iconRightClickable || allowTogglePassword }"
|
|
52
|
-
@click="onIconRightClick"
|
|
53
|
-
/>
|
|
54
|
-
</section>
|
|
30
|
+
<UnnnicIcon
|
|
31
|
+
v-if="iconRightSvg"
|
|
32
|
+
:scheme="iconScheme"
|
|
33
|
+
:icon="iconRightSvg"
|
|
34
|
+
size="ant"
|
|
35
|
+
:clickable="iconRightClickable || allowTogglePassword"
|
|
36
|
+
:class="[
|
|
37
|
+
'icon-right',
|
|
38
|
+
{ clickable: iconRightClickable || allowTogglePassword },
|
|
39
|
+
]"
|
|
40
|
+
@click="onIconRightClick"
|
|
41
|
+
/>
|
|
55
42
|
</div>
|
|
56
43
|
</template>
|
|
57
44
|
|
|
@@ -116,20 +103,8 @@ export default {
|
|
|
116
103
|
type: Boolean,
|
|
117
104
|
default: false,
|
|
118
105
|
},
|
|
119
|
-
readonly: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: false,
|
|
122
|
-
},
|
|
123
|
-
forceActiveStatus: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
default: false,
|
|
126
|
-
},
|
|
127
|
-
showClear: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
default: false,
|
|
130
|
-
},
|
|
131
106
|
},
|
|
132
|
-
emits: ['icon-left-click', 'icon-right-click'
|
|
107
|
+
emits: ['icon-left-click', 'icon-right-click'],
|
|
133
108
|
data() {
|
|
134
109
|
return {
|
|
135
110
|
isFocused: false,
|
|
@@ -154,10 +129,6 @@ export default {
|
|
|
154
129
|
return 'fg-muted';
|
|
155
130
|
}
|
|
156
131
|
|
|
157
|
-
if (this.forceActiveStatus) {
|
|
158
|
-
return 'color-gray-700';
|
|
159
|
-
}
|
|
160
|
-
|
|
161
132
|
return 'fg-base';
|
|
162
133
|
},
|
|
163
134
|
|
|
@@ -183,10 +154,6 @@ export default {
|
|
|
183
154
|
if (this.iconLeftClickable) this.$emit('icon-left-click');
|
|
184
155
|
},
|
|
185
156
|
|
|
186
|
-
onClearClick() {
|
|
187
|
-
this.$emit('clear');
|
|
188
|
-
},
|
|
189
|
-
|
|
190
157
|
onIconRightClick() {
|
|
191
158
|
if (this.attributes.disabled) return;
|
|
192
159
|
if (this.allowTogglePassword) this.showPassword = !this.showPassword;
|
|
@@ -204,33 +171,25 @@ export default {
|
|
|
204
171
|
}
|
|
205
172
|
|
|
206
173
|
.icon {
|
|
174
|
+
&-left,
|
|
175
|
+
&-right {
|
|
176
|
+
&:not(.clickable) {
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
207
181
|
&-left {
|
|
208
182
|
position: absolute;
|
|
209
183
|
top: 50%;
|
|
210
184
|
transform: translateY(-50%);
|
|
211
185
|
left: $unnnic-space-4;
|
|
212
|
-
|
|
213
|
-
&:not(.clickable) {
|
|
214
|
-
pointer-events: none;
|
|
215
|
-
}
|
|
216
186
|
}
|
|
217
187
|
|
|
218
|
-
&-right
|
|
188
|
+
&-right {
|
|
219
189
|
position: absolute;
|
|
220
190
|
top: 50%;
|
|
221
191
|
transform: translateY(-50%);
|
|
222
192
|
right: $unnnic-space-4;
|
|
223
|
-
|
|
224
|
-
display: flex;
|
|
225
|
-
align-items: center;
|
|
226
|
-
gap: $unnnic-space-2;
|
|
227
|
-
|
|
228
|
-
.icon-clear {
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
}
|
|
231
|
-
.icon-right:not(.clickable) {
|
|
232
|
-
pointer-events: none;
|
|
233
|
-
}
|
|
234
193
|
}
|
|
235
194
|
}
|
|
236
195
|
</style>
|
|
@@ -1,46 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
2
|
+
<section
|
|
3
|
+
v-if="modelValue"
|
|
4
|
+
class="unnnic-modal-dialog"
|
|
4
5
|
data-testid="modal-dialog"
|
|
5
|
-
@update:open="$emit('update:modelValue', $event)"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<section
|
|
8
|
+
class="unnnic-modal-dialog__overlay"
|
|
9
|
+
data-testid="modal-overlay"
|
|
10
|
+
@click.stop="!persistent && close()"
|
|
11
|
+
/>
|
|
12
|
+
<section
|
|
13
|
+
:class="[
|
|
14
|
+
'unnnic-modal-dialog__container',
|
|
15
|
+
`unnnic-modal-dialog__container--${size}`,
|
|
16
|
+
]"
|
|
10
17
|
data-testid="modal-container"
|
|
11
|
-
@escape-key-down="persistentHandler"
|
|
12
|
-
@pointer-down-outside="persistentHandler"
|
|
13
18
|
>
|
|
14
19
|
<section
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
'unnnic-modal-dialog__container__body--left-sidebar':
|
|
19
|
-
$slots.leftSidebar,
|
|
20
|
-
},
|
|
21
|
-
]"
|
|
20
|
+
v-if="$slots.leftSidebar"
|
|
21
|
+
class="unnnic-modal-dialog__container__left-sidebar"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</section>
|
|
29
|
-
<UnnnicDialogHeader
|
|
23
|
+
<slot name="leftSidebar" />
|
|
24
|
+
</section>
|
|
25
|
+
|
|
26
|
+
<section class="unnnic-modal-dialog__container__body">
|
|
27
|
+
<header
|
|
30
28
|
v-if="title"
|
|
31
|
-
|
|
32
|
-
:type="type"
|
|
29
|
+
class="unnnic-modal-dialog__container__header"
|
|
33
30
|
>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
<section class="unnnic-modal-dialog__container__title-container">
|
|
32
|
+
<UnnnicIcon
|
|
33
|
+
v-if="icon || type"
|
|
34
|
+
data-testid="title-icon"
|
|
35
|
+
class="unnnic-modal-dialog__container__title-icon"
|
|
36
|
+
:icon="icon || iconsMapper[type]?.icon"
|
|
37
|
+
:scheme="iconScheme || iconsMapper[type]?.scheme"
|
|
38
|
+
size="md"
|
|
39
|
+
/>
|
|
40
|
+
<h1
|
|
41
|
+
class="unnnic-modal-dialog__container__title-text"
|
|
42
|
+
data-testid="title-text"
|
|
43
|
+
>
|
|
44
|
+
{{ title }}
|
|
45
|
+
</h1>
|
|
46
|
+
</section>
|
|
47
|
+
<UnnnicIcon
|
|
48
|
+
v-if="showCloseIcon"
|
|
49
|
+
data-testid="close-icon"
|
|
50
|
+
icon="close"
|
|
51
|
+
clickable
|
|
52
|
+
scheme="neutral-cloudy"
|
|
53
|
+
@click="close()"
|
|
54
|
+
/>
|
|
55
|
+
</header>
|
|
38
56
|
<section class="unnnic-modal-dialog__container__content">
|
|
39
57
|
<slot></slot>
|
|
40
58
|
</section>
|
|
41
|
-
|
|
42
|
-
<UnnnicDialogFooter
|
|
59
|
+
<section
|
|
43
60
|
v-if="primaryButtonProps.text"
|
|
61
|
+
data-testid="actions-section"
|
|
44
62
|
:class="[
|
|
45
63
|
'unnnic-modal-dialog__container__actions',
|
|
46
64
|
{
|
|
@@ -48,8 +66,6 @@
|
|
|
48
66
|
showActionsDivider,
|
|
49
67
|
},
|
|
50
68
|
]"
|
|
51
|
-
:divider="showActionsDivider"
|
|
52
|
-
data-testid="actions-section"
|
|
53
69
|
>
|
|
54
70
|
<UnnnicButton
|
|
55
71
|
v-if="!hideSecondaryButton"
|
|
@@ -76,30 +92,22 @@
|
|
|
76
92
|
class="unnnic-modal-dialog__container__actions__primary-button"
|
|
77
93
|
@click.stop="$emit('primaryButtonClick')"
|
|
78
94
|
/>
|
|
79
|
-
</
|
|
95
|
+
</section>
|
|
80
96
|
</section>
|
|
81
|
-
</
|
|
82
|
-
</
|
|
97
|
+
</section>
|
|
98
|
+
</section>
|
|
83
99
|
</template>
|
|
84
100
|
|
|
85
101
|
<script>
|
|
102
|
+
import UnnnicIcon from '../Icon.vue';
|
|
86
103
|
import UnnnicButton from '../Button/Button.vue';
|
|
87
104
|
import UnnnicI18n from '../../mixins/i18n';
|
|
88
|
-
import UnnnicDialog from '../ui/dialog/Dialog.vue';
|
|
89
|
-
import UnnnicDialogContent from '../ui/dialog/DialogContent.vue';
|
|
90
|
-
import UnnnicDialogHeader from '../ui/dialog/DialogHeader.vue';
|
|
91
|
-
import UnnnicDialogTitle from '../ui/dialog/DialogTitle.vue';
|
|
92
|
-
import UnnnicDialogFooter from '../ui/dialog/DialogFooter.vue';
|
|
93
105
|
|
|
94
106
|
export default {
|
|
95
107
|
name: 'UnnnicModalDialog',
|
|
96
108
|
components: {
|
|
109
|
+
UnnnicIcon,
|
|
97
110
|
UnnnicButton,
|
|
98
|
-
UnnnicDialog,
|
|
99
|
-
UnnnicDialogContent,
|
|
100
|
-
UnnnicDialogHeader,
|
|
101
|
-
UnnnicDialogTitle,
|
|
102
|
-
UnnnicDialogFooter,
|
|
103
111
|
},
|
|
104
112
|
mixins: [UnnnicI18n],
|
|
105
113
|
props: {
|
|
@@ -169,6 +177,11 @@ export default {
|
|
|
169
177
|
es: 'Cancelar',
|
|
170
178
|
},
|
|
171
179
|
},
|
|
180
|
+
iconsMapper: {
|
|
181
|
+
success: { icon: 'check_circle', scheme: 'aux-green-500' },
|
|
182
|
+
warning: { icon: 'warning', scheme: 'aux-red-500' },
|
|
183
|
+
attention: { icon: 'error', scheme: 'aux-yellow-500' },
|
|
184
|
+
},
|
|
172
185
|
primaryButtonTypeMapper: {
|
|
173
186
|
success: 'primary',
|
|
174
187
|
warning: 'warning',
|
|
@@ -188,39 +201,91 @@ export default {
|
|
|
188
201
|
updateBodyOverflow(isHidden) {
|
|
189
202
|
document.body.style.overflow = isHidden ? 'hidden' : '';
|
|
190
203
|
},
|
|
191
|
-
persistentHandler(event) {
|
|
192
|
-
if (this.persistent) {
|
|
193
|
-
event.preventDefault();
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
204
|
},
|
|
197
205
|
};
|
|
198
206
|
</script>
|
|
199
207
|
|
|
200
208
|
<style lang="scss" scoped>
|
|
201
209
|
@use '@/assets/scss/unnnic' as *;
|
|
210
|
+
* {
|
|
211
|
+
margin: 0;
|
|
212
|
+
padding: 0;
|
|
213
|
+
box-sizing: border-box;
|
|
214
|
+
}
|
|
215
|
+
.unnnic-modal-dialog {
|
|
216
|
+
width: 100vw;
|
|
217
|
+
height: 100vh;
|
|
218
|
+
position: fixed;
|
|
219
|
+
left: 0;
|
|
220
|
+
top: 0;
|
|
221
|
+
display: flex;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
align-items: center;
|
|
224
|
+
z-index: 9999;
|
|
225
|
+
|
|
226
|
+
&__overlay {
|
|
227
|
+
position: absolute;
|
|
228
|
+
width: 100%;
|
|
229
|
+
height: 100%;
|
|
230
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
202
234
|
.unnnic-modal-dialog__container {
|
|
235
|
+
display: flex;
|
|
236
|
+
background: $unnnic-color-neutral-white;
|
|
237
|
+
border-radius: $unnnic-spacing-xs;
|
|
238
|
+
box-shadow: $unnnic-shadow-level-near;
|
|
239
|
+
position: fixed;
|
|
240
|
+
max-height: calc(100vh - $unnnic-spacing-giant);
|
|
241
|
+
overflow: hidden;
|
|
242
|
+
|
|
243
|
+
&--sm {
|
|
244
|
+
width: 400px;
|
|
245
|
+
}
|
|
246
|
+
&--md {
|
|
247
|
+
width: 600px;
|
|
248
|
+
}
|
|
249
|
+
&--lg {
|
|
250
|
+
width: 800px;
|
|
251
|
+
}
|
|
252
|
+
|
|
203
253
|
&__left-sidebar {
|
|
204
254
|
background-color: $unnnic-color-neutral-black;
|
|
205
255
|
color: $unnnic-color-neutral-white;
|
|
206
|
-
|
|
207
|
-
grid-area: left-sidebar;
|
|
208
|
-
grid-row: span 3;
|
|
209
256
|
}
|
|
210
257
|
|
|
211
258
|
&__body {
|
|
212
259
|
flex: 1;
|
|
213
260
|
display: flex;
|
|
214
261
|
flex-direction: column;
|
|
262
|
+
}
|
|
215
263
|
|
|
216
|
-
|
|
264
|
+
&__header {
|
|
265
|
+
display: flex;
|
|
266
|
+
justify-content: space-between;
|
|
267
|
+
align-items: center;
|
|
268
|
+
border-bottom: 1px solid $unnnic-color-neutral-soft;
|
|
269
|
+
padding: $unnnic-spacing-md;
|
|
270
|
+
flex-shrink: 0;
|
|
271
|
+
}
|
|
217
272
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
273
|
+
&__title-container {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: $unnnic-spacing-ant;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&__title-icon {
|
|
280
|
+
font-size: 28px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&__title-text {
|
|
284
|
+
font-family: $unnnic-font-family-secondary;
|
|
285
|
+
font-size: $unnnic-font-size-title-sm;
|
|
286
|
+
font-weight: $unnnic-font-weight-black;
|
|
287
|
+
line-height: 28px;
|
|
288
|
+
color: $unnnic-color-neutral-darkest;
|
|
224
289
|
}
|
|
225
290
|
|
|
226
291
|
&__content {
|
|
@@ -244,5 +309,26 @@ export default {
|
|
|
244
309
|
border-radius: $unnnic-border-radius-pill;
|
|
245
310
|
}
|
|
246
311
|
}
|
|
312
|
+
|
|
313
|
+
&__actions {
|
|
314
|
+
display: grid;
|
|
315
|
+
grid-template-columns: 1fr 1fr;
|
|
316
|
+
grid-template-areas: 'secondary-button primary-button';
|
|
317
|
+
gap: $unnnic-spacing-sm;
|
|
318
|
+
padding: $unnnic-spacing-md;
|
|
319
|
+
flex-shrink: 0;
|
|
320
|
+
|
|
321
|
+
&--divider {
|
|
322
|
+
border-top: 1px solid $unnnic-color-neutral-soft;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&__secondary-button {
|
|
326
|
+
grid-area: secondary-button;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&__primary-button {
|
|
330
|
+
grid-area: primary-button;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
247
333
|
}
|
|
248
334
|
</style>
|
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`ModalDialog.vue > Elements rendering > matches the snapshot 1`] = `
|
|
3
|
+
exports[`ModalDialog.vue > Elements rendering > matches the snapshot 1`] = `
|
|
4
|
+
"<section data-v-68ebadeb="" class="unnnic-modal-dialog" data-testid="modal-dialog">
|
|
5
|
+
<section data-v-68ebadeb="" class="unnnic-modal-dialog__overlay" data-testid="modal-overlay"></section>
|
|
6
|
+
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container unnnic-modal-dialog__container--md" data-testid="modal-container">
|
|
7
|
+
<!--v-if-->
|
|
8
|
+
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container__body">
|
|
9
|
+
<header data-v-68ebadeb="" class="unnnic-modal-dialog__container__header">
|
|
10
|
+
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container__title-container">
|
|
11
|
+
<unnnic-icon-stub data-v-68ebadeb="" filled="false" icon="test-icon" clickable="false" size="md" scheme="neutral-darkest" data-testid="title-icon" class="unnnic-modal-dialog__container__title-icon"></unnnic-icon-stub>
|
|
12
|
+
<h1 data-v-68ebadeb="" class="unnnic-modal-dialog__container__title-text" data-testid="title-text">Test Title</h1>
|
|
13
|
+
</section>
|
|
14
|
+
<unnnic-icon-stub data-v-68ebadeb="" filled="false" icon="close" clickable="true" size="md" scheme="neutral-cloudy" data-testid="close-icon"></unnnic-icon-stub>
|
|
15
|
+
</header>
|
|
16
|
+
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container__content"></section>
|
|
17
|
+
<section data-v-68ebadeb="" data-testid="actions-section" class="unnnic-modal-dialog__container__actions">
|
|
18
|
+
<unnnic-button-stub data-v-68ebadeb="" size="large" text="Cancel" type="tertiary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="secondary-button" class="unnnic-modal-dialog__container__actions__secondary-button"></unnnic-button-stub>
|
|
19
|
+
<unnnic-button-stub data-v-68ebadeb="" size="large" text="Confirm" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="primary-button" class="unnnic-modal-dialog__container__actions__primary-button"></unnnic-button-stub>
|
|
20
|
+
</section>
|
|
21
|
+
</section>
|
|
22
|
+
</section>
|
|
23
|
+
</section>"
|
|
24
|
+
`;
|
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
exports[`Radio.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<section data-v-38c6bf5e="" class="unnnic-radio" size="md"><label data-v-38c6bf5e="" class="unnnic-radio__input-wrapper"><input data-v-38c6bf5e="" class="unnnic-radio__input" type="radio" name="">
|
|
5
5
|
<p data-v-38c6bf5e="" class="unnnic-radio__label"> Option 1</p>
|
|
6
|
+
<!--v-if-->
|
|
6
7
|
</label></section>"
|
|
7
8
|
`;
|
|
@@ -62,7 +62,6 @@ const color = computed(() => {
|
|
|
62
62
|
gap: $unnnic-space-1;
|
|
63
63
|
border-radius: $unnnic-border-radius-pill;
|
|
64
64
|
padding: calc($unnnic-space-1 * 1.5) $unnnic-space-3;
|
|
65
|
-
width: fit-content;
|
|
66
65
|
|
|
67
66
|
background-color: v-bind(color);
|
|
68
67
|
|
|
@@ -73,10 +72,6 @@ const color = computed(() => {
|
|
|
73
72
|
&__label {
|
|
74
73
|
margin: 0;
|
|
75
74
|
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
text-overflow: ellipsis;
|
|
78
|
-
white-space: nowrap;
|
|
79
|
-
|
|
80
75
|
font: $unnnic-font-caption-1;
|
|
81
76
|
color: $unnnic-color-fg-emphasized;
|
|
82
77
|
}
|