@weni/unnnic-system 3.8.2-alpha.0 → 3.8.2-alpha.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/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/{es-4bdcf86e.mjs → es-dc440fef.mjs} +1 -1
- package/dist/{index-0d6fa367.mjs → index-6b5eeee8.mjs} +339 -324
- package/dist/{pt-br-51af7f2a.mjs → pt-br-a2cfd62d.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +7 -11
- package/src/components/Alert/__tests__/__snapshots__/AlertBanner.spec.js.snap +2 -2
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +1 -1
- package/src/components/AvatarIcon/__tests__/__snapshots__/AvatarIcon.spec.js.snap +1 -1
- package/src/components/Checkbox/Checkbox.vue +72 -54
- package/src/components/Collapse/__tests__/__snapshots__/Collapse.spec.js.snap +3 -1
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +3 -3
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +5 -14
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
- package/src/components/Radio/Radio.vue +25 -7
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +3 -3
- package/src/components/Switch/Switch.vue +47 -33
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +6 -5
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -1
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +3 -11
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`UnnnicAlert.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</section>
|
|
12
|
-
<!--v-if-->
|
|
13
|
-
</aside>
|
|
14
|
-
</transition-stub>"
|
|
4
|
+
"<div data-v-284427ba="" class="unnnic-alert unnnic-alert-position--top-right"><span data-v-26446d8e="" data-v-284427ba="" class="material-symbols-rounded unnnic-icon-scheme--primary unnnic-icon-size--sm" data-testid="material-icon" translate="no" data-test="unnnic-icon">alert-icon</span>
|
|
5
|
+
<div data-v-284427ba="" class="unnnic-alert__content">
|
|
6
|
+
<div data-v-284427ba="" class="unnnic-alert__title">TEST ALERT</div>
|
|
7
|
+
<div data-v-284427ba="" class="unnnic-alert__text">This is an alert message</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div data-v-284427ba="" class="unnnic-alert__close-text unnnic--clickable">CLOSE</div>
|
|
10
|
+
</div>"
|
|
15
11
|
`;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`AlertBanner.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<section data-v-e8e4d051="" class="banner-alert banner-alert--banner-danger">
|
|
5
|
-
<header data-v-e8e4d051="" class="banner-alert__container-text"><span data-v-26446d8e="" data-v-e8e4d051="" class="
|
|
5
|
+
<header data-v-e8e4d051="" class="banner-alert__container-text"><span data-v-26446d8e="" data-v-e8e4d051="" class="material-symbols-rounded unnnic-icon-scheme--neutral-white unnnic-icon-size--sm banner-alert__textIcon" data-testid="material-icon" translate="no" data-test="unnnic-icon">block</span>
|
|
6
6
|
<p data-v-e8e4d051="" class="text">This is a banner alert</p><a data-v-e8e4d051="" class="banner-alert__link" href="https://example.com" target="_self">Learn more</a>
|
|
7
7
|
</header>
|
|
8
|
-
<div data-v-e8e4d051="" class="banner-alert__close"><span data-v-26446d8e="" data-v-e8e4d051="" class="
|
|
8
|
+
<div data-v-e8e4d051="" class="banner-alert__close"><span data-v-26446d8e="" data-v-e8e4d051="" class="material-symbols-rounded unnnic-icon-scheme--neutral-white unnnic-icon-size--sm" data-testid="material-icon" translate="no" data-test="unnnic-close-icon">close</span></div>
|
|
9
9
|
</section>"
|
|
10
10
|
`;
|
|
@@ -6,7 +6,7 @@ exports[`Alert.vue > matches snapshot 1`] = `
|
|
|
6
6
|
<div data-v-fb94f284="" class="alert__progress"></div>
|
|
7
7
|
<div data-v-fb94f284="" class="alert__text">Test Alert</div>
|
|
8
8
|
<div data-v-fb94f284="" class="alert__close">
|
|
9
|
-
<unnnic-icon-stub data-v-fb94f284="" filled="false" icon="close-1" clickable="false" size="sm" scheme="neutral-white"></unnnic-icon-stub>
|
|
9
|
+
<unnnic-icon-stub data-v-fb94f284="" filled="false" next="false" icon="close-1" clickable="false" size="sm" scheme="neutral-white"></unnnic-icon-stub>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</div>"
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`AvatarIcon.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<div data-v-5f185a90="" class="unnnic-avatar-icon aux-blue sm">
|
|
5
|
-
<unnnic-icon-stub data-v-5f185a90="" filled="false" icon="graph-stats-1" clickable="false" size="md" scheme="aux-blue"></unnnic-icon-stub>
|
|
5
|
+
<unnnic-icon-stub data-v-5f185a90="" filled="false" next="false" icon="graph-stats-1" clickable="false" size="md" scheme="aux-blue"></unnnic-icon-stub>
|
|
6
6
|
</div>"
|
|
7
7
|
`;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<template>
|
|
3
|
-
<section class="unnnic-checkbox
|
|
4
|
-
<label
|
|
3
|
+
<section class="unnnic-checkbox">
|
|
4
|
+
<label
|
|
5
|
+
:class="[
|
|
6
|
+
'unnnic-checkbox__input-wrapper',
|
|
7
|
+
{ 'unnnic-checkbox__input-wrapper--disabled': disabled },
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
5
10
|
<input
|
|
6
11
|
:class="[
|
|
7
|
-
'unnnic-
|
|
8
|
-
{ 'unnnic-
|
|
12
|
+
'unnnic-checkbox__input',
|
|
13
|
+
{ 'unnnic-checkbox__input--less': modelValue === 'less' },
|
|
9
14
|
]"
|
|
10
15
|
type="checkbox"
|
|
11
16
|
:disabled="disabled"
|
|
@@ -104,71 +109,84 @@ export default {
|
|
|
104
109
|
|
|
105
110
|
$checkbox-size: 21px;
|
|
106
111
|
|
|
107
|
-
.unnnic-checkbox
|
|
112
|
+
.unnnic-checkbox {
|
|
108
113
|
display: flex;
|
|
109
114
|
flex-direction: column;
|
|
110
115
|
align-items: flex-start;
|
|
111
|
-
}
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
align-items: center;
|
|
116
|
-
column-gap: $unnnic-space-2;
|
|
117
|
-
}
|
|
117
|
+
&__input-wrapper {
|
|
118
|
+
width: fit-content;
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
box-sizing: border-box;
|
|
128
|
-
|
|
129
|
-
outline: none;
|
|
130
|
-
|
|
131
|
-
&:checked {
|
|
132
|
-
border-width: 0;
|
|
133
|
-
background-color: $unnnic-color-bg-active;
|
|
134
|
-
background-image: url('../../assets/icons/checkbox-checked.svg');
|
|
135
|
-
background-repeat: no-repeat;
|
|
136
|
-
background-position: center;
|
|
137
|
-
|
|
138
|
-
&.unnnic-checkbox--less {
|
|
139
|
-
background-image: url('../../assets/icons/checkbox-less.svg');
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
column-gap: $unnnic-space-2;
|
|
123
|
+
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
|
|
126
|
+
&--disabled {
|
|
127
|
+
cursor: not-allowed;
|
|
140
128
|
}
|
|
141
129
|
}
|
|
142
130
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
131
|
+
&__input {
|
|
132
|
+
appearance: none;
|
|
133
|
+
width: $checkbox-size;
|
|
134
|
+
min-width: $checkbox-size;
|
|
135
|
+
height: $checkbox-size;
|
|
136
|
+
margin: 0;
|
|
137
|
+
background-color: $unnnic-color-bg-base;
|
|
138
|
+
border: 1px solid $unnnic-color-border-base;
|
|
139
|
+
border-radius: $unnnic-radius-1;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
|
|
142
|
+
outline: none;
|
|
143
|
+
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
|
|
146
|
+
&:checked {
|
|
147
|
+
border-width: 0;
|
|
148
|
+
background-color: $unnnic-color-bg-active;
|
|
149
|
+
background-image: url('../../assets/icons/checkbox-checked.svg');
|
|
150
|
+
background-repeat: no-repeat;
|
|
151
|
+
background-position: center;
|
|
152
|
+
|
|
153
|
+
&.unnnic-checkbox__input--less {
|
|
154
|
+
background-image: url('../../assets/icons/checkbox-less.svg');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&:disabled,
|
|
159
|
+
&:disabled:checked {
|
|
160
|
+
background-color: $unnnic-color-bg-muted;
|
|
161
|
+
border: 1px solid $unnnic-color-border-muted;
|
|
148
162
|
|
|
149
|
-
|
|
150
|
-
|
|
163
|
+
cursor: not-allowed;
|
|
164
|
+
}
|
|
151
165
|
|
|
152
|
-
|
|
153
|
-
background-image: url('../../assets/icons/checkbox-
|
|
166
|
+
&:disabled:checked {
|
|
167
|
+
background-image: url('../../assets/icons/checkbox-checked-disabled.svg');
|
|
168
|
+
|
|
169
|
+
&.unnnic-checkbox__input--less {
|
|
170
|
+
background-image: url('../../assets/icons/checkbox-less-disabled.svg');
|
|
171
|
+
}
|
|
154
172
|
}
|
|
155
173
|
}
|
|
156
|
-
}
|
|
157
174
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
175
|
+
&__label {
|
|
176
|
+
margin: 0;
|
|
177
|
+
font: $unnnic-font-body;
|
|
178
|
+
color: $unnnic-color-fg-emphasized;
|
|
162
179
|
|
|
163
|
-
|
|
164
|
-
|
|
180
|
+
&--disabled {
|
|
181
|
+
color: $unnnic-color-fg-muted;
|
|
182
|
+
}
|
|
165
183
|
}
|
|
166
|
-
}
|
|
167
184
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
185
|
+
&__helper {
|
|
186
|
+
margin: 0;
|
|
187
|
+
margin-left: $checkbox-size + $unnnic-space-2;
|
|
188
|
+
font: $unnnic-font-caption-2;
|
|
189
|
+
color: $unnnic-color-fg-base;
|
|
190
|
+
}
|
|
173
191
|
}
|
|
174
192
|
</style>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Collapse.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<div data-v-7d0d9fbd="" data-testid="collapse" class="unnnic-collapse unnnic-collapse--size-lg">
|
|
5
|
-
<div data-v-7d0d9fbd="" data-testid="collapse-header" class="unnnic-collapse__header">Test Title<
|
|
5
|
+
<div data-v-7d0d9fbd="" data-testid="collapse-header" class="unnnic-collapse__header">Test Title<svg data-v-26446d8e="" data-v-7d0d9fbd="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--xs unnnic-icon-scheme--neutral-cloudy" data-testid="old-map-icons">
|
|
6
|
+
<path d="M5.31471 14.0096L19.0432 29.5967C19.1676 29.7264 19.3169 29.8296 19.4822 29.9001C19.6474 29.9707 19.8253 30.007 20.005 30.007C20.1847 30.007 20.3625 29.9707 20.5278 29.9001C20.6931 29.8296 20.8424 29.7264 20.9668 29.5967L34.689 14.0096C34.7987 13.886 34.8825 13.7415 34.9353 13.5849C34.9882 13.4282 35.009 13.2625 34.9965 13.0977C34.984 12.9328 34.9385 12.7721 34.8627 12.6252C34.7869 12.4783 34.6824 12.3481 34.5553 12.2423L32.243 10.2963C31.9852 10.0789 31.6522 9.97163 31.316 9.99759C30.9797 10.0235 30.6671 10.1807 30.4457 10.435L20.2406 22.25C20.2112 22.2841 20.1749 22.3114 20.134 22.3302C20.0931 22.3489 20.0487 22.3587 20.0037 22.3587C19.9588 22.3587 19.9143 22.3489 19.8734 22.3302C19.8326 22.3114 19.7962 22.2841 19.7669 22.25L9.558 10.4338C9.33639 10.1806 9.02374 10.0252 8.68809 10.0013C8.52167 9.9865 8.35397 10.0052 8.19489 10.0563C8.03582 10.1074 7.8886 10.1898 7.76195 10.2988L5.44845 12.2423C5.32061 12.3479 5.21534 12.4781 5.13889 12.6252C5.06245 12.7723 5.0164 12.9332 5.0035 13.0985C4.99099 13.2635 5.01212 13.4294 5.06562 13.586C5.11911 13.7426 5.20386 13.8868 5.31471 14.0096Z" fill="#3B414D" class="primary"></path>
|
|
7
|
+
</svg></div>
|
|
6
8
|
<div data-v-7d0d9fbd="" class="unnnic-collapse__body" style="display: none;"></div>
|
|
7
9
|
</div>"
|
|
8
10
|
`;
|
|
@@ -10,12 +10,12 @@ exports[`Drawer.vue > Component Rendering > Component Rendering > matches the sn
|
|
|
10
10
|
<h1 data-v-196de012="" class="unnnic-drawer__title" data-testid="drawer-title">Test Title</h1>
|
|
11
11
|
<p data-v-196de012="" class="unnnic-drawer__description" data-testid="drawer-description">Test Description</p>
|
|
12
12
|
</section>
|
|
13
|
-
<unnnic-icon-stub data-v-196de012="" filled="false" icon="arrow_back" clickable="true" size="avatar-nano" scheme="neutral-darkest" class="unnnic-drawer__close" data-testid="close-icon"></unnnic-icon-stub>
|
|
13
|
+
<unnnic-icon-stub data-v-196de012="" filled="false" next="false" icon="arrow_back" clickable="true" size="avatar-nano" scheme="neutral-darkest" class="unnnic-drawer__close" data-testid="close-icon"></unnnic-icon-stub>
|
|
14
14
|
</header>
|
|
15
15
|
<section data-v-196de012="" class="unnnic-drawer__content"></section>
|
|
16
16
|
<footer data-v-196de012="" class="unnnic-drawer__footer" data-testid="footer">
|
|
17
|
-
<unnnic-button-stub data-v-196de012="" size="large" text="Secondary Action" type="tertiary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="secondary-button"></unnnic-button-stub>
|
|
18
|
-
<unnnic-button-stub data-v-196de012="" size="large" text="Primary Action" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="primary-button"></unnnic-button-stub>
|
|
17
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Secondary Action" type="tertiary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" next="false" disabled="false" loading="false" data-testid="secondary-button"></unnnic-button-stub>
|
|
18
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Primary Action" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" next="false" disabled="false" loading="false" data-testid="primary-button"></unnnic-button-stub>
|
|
19
19
|
</footer>
|
|
20
20
|
</section>
|
|
21
21
|
</transition-stub>
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Input.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-form-input" hascloudycolor="false" mask="####-####"><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-form-input input-itself input size-md normal input--has-icon-left input--has-icon-right unnnic-form-input input-itself" hascloudycolor="false" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>
|
|
10
|
-
<section data-v-9f8d6c86="" class="unnnic-form-element__hints-container">
|
|
11
|
-
<section data-v-9f8d6c86="" class="unnnic-form-element__message-container">
|
|
12
|
-
<p data-v-9f8d6c86="" class="unnnic-form-element__message">Error message</p>
|
|
13
|
-
<!--v-if-->
|
|
14
|
-
</section>
|
|
15
|
-
<!--v-if-->
|
|
16
|
-
</section>
|
|
17
|
-
</section>"
|
|
4
|
+
"<div data-v-d890ad85="" class="unnnic-form md">
|
|
5
|
+
<p data-v-d890ad85="" class="unnnic-form__label">Sample Label</p>
|
|
6
|
+
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md text-input--icon-right-size-sm unnnic-form-input" mask="####-####"><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-form-input input-itself input size-md normal input--has-icon-left input--has-icon-right unnnic-form-input input-itself" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" iconrightsize="sm" hascloudycolor="false" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--neutral-cloudy unnnic-icon-size--sm unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--neutral-cloudy unnnic-icon-size--sm unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>
|
|
7
|
+
<p data-v-d890ad85="" class="unnnic-form__message">Error message</p>
|
|
8
|
+
</div>"
|
|
18
9
|
`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`TextInput.vue > matches the snapshot 1`] = `"<div data-v-a0d36167="" class="text-input size--md"><input data-v-86533b41="" data-v-a0d36167="" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" allowtogglepassword="false" class="input-itself input size-md normal input--has-icon-left input--has-icon-right input-itself" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="
|
|
3
|
+
exports[`TextInput.vue > matches the snapshot 1`] = `"<div data-v-a0d36167="" class="text-input size--md text-input--icon-right-size-sm"><input data-v-86533b41="" data-v-a0d36167="" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" iconrightsize="sm" allowtogglepassword="false" hascloudycolor="false" class="input-itself input size-md normal input--has-icon-left input--has-icon-right input-itself" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--neutral-cloudy unnnic-icon-size--sm unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--neutral-cloudy unnnic-icon-size--sm unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>"`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`Label > applies the correct classes and styles 1`] = `"<p
|
|
3
|
+
exports[`Label > applies the correct classes and styles 1`] = `"<p class="unnnic-label__label">Label Test</p>"`;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<template>
|
|
3
|
-
<section class="unnnic-radio
|
|
4
|
-
<label
|
|
3
|
+
<section class="unnnic-radio">
|
|
4
|
+
<label
|
|
5
|
+
:class="[
|
|
6
|
+
'unnnic-radio__input-wrapper',
|
|
7
|
+
{ 'unnnic-radio__input-wrapper--disabled': disabled },
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
5
10
|
<input
|
|
6
|
-
class="unnnic-
|
|
11
|
+
class="unnnic-radio__input"
|
|
7
12
|
type="radio"
|
|
8
13
|
:disabled="disabled"
|
|
9
14
|
:checked="computedModelValue === value"
|
|
@@ -81,18 +86,27 @@ const computedName = computed(() => {
|
|
|
81
86
|
|
|
82
87
|
$radio-size: 21px;
|
|
83
88
|
|
|
84
|
-
.unnnic-radio
|
|
89
|
+
.unnnic-radio {
|
|
85
90
|
display: inline-flex;
|
|
86
91
|
flex-direction: column;
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
&__input-wrapper {
|
|
94
|
+
width: fit-content;
|
|
95
|
+
|
|
89
96
|
display: flex;
|
|
90
97
|
align-items: center;
|
|
91
98
|
gap: $unnnic-space-2;
|
|
99
|
+
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
|
|
102
|
+
&--disabled {
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
92
105
|
}
|
|
93
106
|
|
|
94
|
-
|
|
107
|
+
&__input {
|
|
95
108
|
appearance: none;
|
|
109
|
+
min-width: $radio-size;
|
|
96
110
|
width: $radio-size;
|
|
97
111
|
height: $radio-size;
|
|
98
112
|
margin: 0;
|
|
@@ -102,6 +116,8 @@ $radio-size: 21px;
|
|
|
102
116
|
box-sizing: border-box;
|
|
103
117
|
outline: none;
|
|
104
118
|
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
105
121
|
&:checked {
|
|
106
122
|
border-width: 0;
|
|
107
123
|
background-color: $unnnic-color-bg-active;
|
|
@@ -113,10 +129,12 @@ $radio-size: 21px;
|
|
|
113
129
|
&:disabled {
|
|
114
130
|
background-color: $unnnic-color-bg-muted;
|
|
115
131
|
border: 1px solid $unnnic-color-border-muted;
|
|
132
|
+
|
|
133
|
+
cursor: not-allowed;
|
|
116
134
|
}
|
|
117
135
|
}
|
|
118
136
|
|
|
119
|
-
|
|
137
|
+
&__label {
|
|
120
138
|
margin: 0;
|
|
121
139
|
font: $unnnic-font-body;
|
|
122
140
|
color: $unnnic-color-fg-emphasized;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Radio.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
</label></
|
|
4
|
+
"<div data-v-38c6bf5e="" class="unnnic-radio-container unnnic-radio-container--md"><svg data-v-26446d8e="" data-v-38c6bf5e="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--md unnnic-icon-scheme--neutral-cleanest unnnic-radio" data-testid="old-map-icons">
|
|
5
|
+
<circle cx="20" cy="20.0005" r="14.5" stroke="#3B414D" class="primary-stroke"></circle>
|
|
6
|
+
</svg><span data-v-38c6bf5e="" class="label">Option 1</span></div>"
|
|
7
7
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="unnnic-switch
|
|
2
|
+
<section class="unnnic-switch">
|
|
3
3
|
<UnnnicLabel
|
|
4
4
|
v-if="label"
|
|
5
5
|
:label="label"
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
class="unnnic-switch__label"
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
|
-
<label
|
|
11
|
+
<label
|
|
12
|
+
:class="[
|
|
13
|
+
'unnnic-switch__input-wrapper',
|
|
14
|
+
{ 'unnnic-switch__input-wrapper--disabled': disabled },
|
|
15
|
+
]"
|
|
16
|
+
>
|
|
12
17
|
<input
|
|
13
|
-
class="unnnic-
|
|
18
|
+
class="unnnic-switch__input"
|
|
14
19
|
type="checkbox"
|
|
15
20
|
:disabled="disabled"
|
|
16
21
|
:checked="modelValue"
|
|
@@ -143,47 +148,56 @@ export default {
|
|
|
143
148
|
$switch-width: 38px;
|
|
144
149
|
$switch-height: 20px;
|
|
145
150
|
|
|
146
|
-
.unnnic-switch
|
|
151
|
+
.unnnic-switch {
|
|
147
152
|
display: flex;
|
|
148
153
|
flex-direction: column;
|
|
149
154
|
|
|
150
|
-
|
|
155
|
+
&__input-wrapper {
|
|
156
|
+
width: fit-content;
|
|
157
|
+
|
|
151
158
|
display: flex;
|
|
152
159
|
align-items: center;
|
|
153
160
|
column-gap: $unnnic-space-2;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
161
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
background-color: $unnnic-color-bg-muted;
|
|
163
|
-
border-radius: $unnnic-radius-3;
|
|
164
|
-
box-sizing: border-box;
|
|
165
|
-
outline: none;
|
|
166
|
-
|
|
167
|
-
background-image: url('@/assets/icons/switch-checked.svg');
|
|
168
|
-
background-repeat: no-repeat;
|
|
169
|
-
background-position: 4px center;
|
|
170
|
-
|
|
171
|
-
transition:
|
|
172
|
-
120ms linear background-position,
|
|
173
|
-
120ms linear background-color;
|
|
174
|
-
|
|
175
|
-
cursor: pointer;
|
|
176
|
-
|
|
177
|
-
&:checked {
|
|
178
|
-
background-color: $unnnic-color-bg-active;
|
|
179
|
-
background-position: 20px center;
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
|
|
164
|
+
&--disabled {
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
}
|
|
180
167
|
}
|
|
181
168
|
|
|
182
|
-
|
|
169
|
+
&__input {
|
|
170
|
+
appearance: none;
|
|
171
|
+
width: $switch-width;
|
|
172
|
+
min-width: $switch-width;
|
|
173
|
+
height: $switch-height;
|
|
174
|
+
margin: 0;
|
|
183
175
|
background-color: $unnnic-color-bg-muted;
|
|
184
|
-
|
|
176
|
+
border-radius: $unnnic-radius-3;
|
|
177
|
+
box-sizing: border-box;
|
|
178
|
+
outline: none;
|
|
179
|
+
|
|
180
|
+
background-image: url('@/assets/icons/switch-checked.svg');
|
|
181
|
+
background-repeat: no-repeat;
|
|
182
|
+
background-position: 4px center;
|
|
183
|
+
|
|
184
|
+
transition:
|
|
185
|
+
120ms linear background-position,
|
|
186
|
+
120ms linear background-color;
|
|
187
|
+
|
|
188
|
+
cursor: pointer;
|
|
185
189
|
|
|
186
|
-
|
|
190
|
+
&:checked {
|
|
191
|
+
background-color: $unnnic-color-bg-active;
|
|
192
|
+
background-position: 20px center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&:disabled {
|
|
196
|
+
background-color: $unnnic-color-bg-muted;
|
|
197
|
+
background-image: url('@/assets/icons/switch-checked-disabled.svg');
|
|
198
|
+
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
}
|
|
187
201
|
}
|
|
188
202
|
|
|
189
203
|
&__label {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Switch > should match the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<!--v-if--><
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
"<div data-v-e4356c9d="" class="unnnic-switch">
|
|
5
|
+
<!--v-if--><svg data-v-3d58a7dd="" data-v-26446d8e="" data-v-e4356c9d="" id="default" width="80" height="40" viewBox="0 0 80 40" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--md unnnic--clickable unnnic-icon-scheme--neutral-soft unnnic-switch__icon" data-testid="old-map-icons" disabled="false" data-test-id="switch-icon">
|
|
6
|
+
<rect data-v-3d58a7dd="" x="4.20013" y="2.10046" width="71.6" height="35.8" rx="17.9" class="primary"></rect>
|
|
7
|
+
<circle data-v-3d58a7dd="" id="default-circle" cx="22.5" cy="20.0005" r="12.5" fill="white"></circle>
|
|
8
|
+
</svg>
|
|
8
9
|
<!--v-if-->
|
|
9
|
-
</
|
|
10
|
+
</div>"
|
|
10
11
|
`;
|
|
@@ -4,7 +4,7 @@ exports[`Tab.vue > matches the snapshot 1`] = `
|
|
|
4
4
|
"<div data-v-b4e39fac="" class="tab size-md">
|
|
5
5
|
<header data-v-b4e39fac="" class="tab-header">
|
|
6
6
|
<ul data-v-b4e39fac="" class="tab-content">
|
|
7
|
-
<li data-v-b4e39fac="" class="tab-head">tab1<div data-v-bf0cf546="" data-v-b4e39fac="" class="unnnic-tooltip"><span data-v-26446d8e="" data-v-b4e39fac="" class="
|
|
7
|
+
<li data-v-b4e39fac="" class="tab-head">tab1<div data-v-bf0cf546="" data-v-b4e39fac="" class="unnnic-tooltip"><span data-v-26446d8e="" data-v-b4e39fac="" class="material-symbols-rounded unnnic-icon-scheme--neutral-cleanest unnnic-icon-size--sm material-symbols-rounded--filled" data-testid="material-icon" translate="no">info</span><span data-v-bf0cf546="" class="unnnic-tooltip-label unnnic-tooltip-label-bottom" data-testid="tooltip-label" style="left: 0px; top: 8px;">Tooltip text <br data-v-bf0cf546=""><!--v-if--></span></div>
|
|
8
8
|
</li>
|
|
9
9
|
<li data-v-b4e39fac="" class="tab-head tab-head--active">tab2
|
|
10
10
|
<!--v-if-->
|
|
@@ -42,7 +42,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
|
|
|
42
42
|
<p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 1 of 1</p>
|
|
43
43
|
<div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
44
44
|
<!--v-if-->
|
|
45
|
-
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_left</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
45
|
+
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_left</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
46
46
|
<!--v-if-->
|
|
47
47
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="page-button" class="unnnic-button unnnic-button--size-small unnnic-button--secondary">
|
|
48
48
|
<!--v-if-->
|
|
@@ -51,7 +51,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
|
|
|
51
51
|
<!--v-if-->
|
|
52
52
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
53
53
|
<!--v-if-->
|
|
54
|
-
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_right</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
54
|
+
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_right</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
55
55
|
<!--v-if-->
|
|
56
56
|
</button></div>
|
|
57
57
|
</section>
|
|
@@ -5,7 +5,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
|
|
|
5
5
|
<p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 10 of 100</p>
|
|
6
6
|
<div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
7
7
|
<!--v-if-->
|
|
8
|
-
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_left</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
8
|
+
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-clean unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_left</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
9
9
|
<!--v-if-->
|
|
10
10
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="page-button" class="unnnic-button unnnic-button--size-small unnnic-button--secondary">
|
|
11
11
|
<!--v-if-->
|
|
@@ -34,7 +34,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
|
|
|
34
34
|
<!--v-if-->
|
|
35
35
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
36
36
|
<!--v-if-->
|
|
37
|
-
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-dark unnnic-icon-size--ant unnnic-icon__size--ant" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_right</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
37
|
+
<!--v-if--><span data-v-26446d8e="" data-v-ceff2a60="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-dark unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable" data-testid="icon-center" translate="no" style="visibility: visible;">chevron_right</span><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
38
38
|
<!--v-if-->
|
|
39
39
|
</button></div>
|
|
40
40
|
</section>"
|
|
@@ -2,16 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`TextArea.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<section data-v-9f8d6c86="" data-v-735b3c51="" class="unnnic-form-element">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</section><textarea data-v-735b3c51="" class="unnnic-text-area__textarea unnnic-text-area__textarea--size-md unnnic-text-area__textarea--type-normal" placeholder="Enter text" maxlength="200" value=""></textarea>
|
|
9
|
-
<section data-v-9f8d6c86="" class="unnnic-form-element__hints-container">
|
|
10
|
-
<section data-v-9f8d6c86="" class="unnnic-form-element__message-container">
|
|
11
|
-
<!--v-if-->
|
|
12
|
-
<!--v-if-->
|
|
13
|
-
</section>
|
|
14
|
-
<p data-v-9f8d6c86="">0/200</p>
|
|
15
|
-
</section>
|
|
5
|
+
<p data-v-9f8d6c86="" class="unnnic-form-element__label">Description</p><textarea data-v-735b3c51="" class="unnnic-text-area__textarea unnnic-text-area__textarea--size-md unnnic-text-area__textarea--type-normal" placeholder="Enter text" maxlength="200" value=""></textarea>
|
|
6
|
+
<!--v-if-->
|
|
7
|
+
<p data-v-9f8d6c86="" class="unnnic-form-element__message"> <span data-v-9f8d6c86="" class="unnnic-form-element__right-message">0/200</span></p>
|
|
16
8
|
</section>"
|
|
17
9
|
`;
|