@weni/unnnic-system 3.2.9-alpha.9 → 3.2.9
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 +2 -11
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +119 -18
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/Version1dot1.vue.d.ts +38 -2
- package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
- package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
- package/dist/components/Banner/Banner.vue.d.ts +1 -1
- package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/AccountCard.vue.d.ts +3 -3
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +21 -21
- package/dist/components/Card/CardCompany.vue.d.ts +8 -8
- package/dist/components/Card/CardData.vue.d.ts +1 -1
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
- package/dist/components/Card/ContentCard.vue.d.ts +2 -2
- package/dist/components/Card/DashCard.vue.d.ts +4 -4
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
- package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
- package/dist/components/Card/StatusCard.vue.d.ts +2 -2
- package/dist/components/Card/TitleCard.vue.d.ts +2 -2
- package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
- package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
- package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
- package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
- package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
- package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
- package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
- package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
- package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
- package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
- package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/Comment/Comment.vue.d.ts +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
- package/dist/components/DataTable/index.vue.d.ts +1 -8
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +27 -149
- package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
- package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
- package/dist/components/Flag.vue.d.ts +2 -2
- package/dist/components/FormElement/FormElement.vue.d.ts +32 -38
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
- package/dist/components/Input/BaseInput.vue.d.ts +1 -28
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +27 -149
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +13 -67
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +37 -159
- package/dist/components/InputNext/InputNext.vue.d.ts +4 -4
- package/dist/components/Label/Label.vue.d.ts +15 -9
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +9 -9
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +35 -157
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
- package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +27 -81
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
- package/dist/components/SelectTime/index.vue.d.ts +13 -67
- package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -2
- package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -2
- package/dist/components/Tab/Tab.vue.d.ts +2 -13
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
- package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
- package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
- package/dist/components/Tag/Tag.vue.d.ts +8 -8
- package/dist/components/TextArea/TextArea.vue.d.ts +32 -38
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
- package/dist/components/index.d.ts +1079 -1889
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-d6005598.js → es-1ca6f2cf.mjs} +1 -1
- package/dist/{index-35640dc9.js → index-ca7d12b1.mjs} +8407 -8738
- 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-89c2c09d.js → pt-br-2d5000b1.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +182 -0
- package/dist/unnnic.umd.js +109 -0
- package/dist/utils/call.d.ts +1 -2
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/assets/scss/scheme-colors.scss +4 -131
- package/src/assets/tokens/colors.json +2 -2
- package/src/components/Alert/Alert.vue +135 -26
- package/src/components/Alert/AlertBanner.vue +182 -0
- package/src/components/Alert/AlertCaller.vue +49 -0
- package/src/components/Alert/Version1dot1.vue +36 -0
- package/src/components/Alert/__tests__/AlertBanner.spec.js +89 -0
- package/src/components/Alert/__tests__/AlertCaller.spec.js +98 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +7 -11
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +2 -2
- package/src/components/Button/Button.vue +108 -60
- package/src/components/Button/types.ts +1 -0
- package/src/components/DataTable/index.vue +10 -25
- package/src/components/FormElement/FormElement.vue +91 -51
- package/src/components/Input/BaseInput.vue +14 -22
- package/src/components/Input/Input.scss +21 -19
- package/src/components/Input/Input.vue +29 -85
- package/src/components/Input/TextInput.vue +42 -39
- package/src/components/Input/__test__/TextInput.spec.js +5 -5
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +3 -12
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/Label.vue +21 -52
- package/src/components/Label/__tests__/Label.spec.js +1 -1
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +0 -1
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
- package/src/components/Tab/Tab.vue +23 -37
- 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/TextArea.vue +9 -13
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +2 -7
- package/src/components/index.ts +4 -18
- 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/Alert.stories.js +67 -6
- package/src/stories/Button.stories.js +17 -2
- package/src/stories/DataTable.stories.js +0 -60
- package/src/stories/Input.stories.js +3 -16
- package/src/stories/Label.stories.js +0 -7
- package/src/stories/Tab.stories.js +4 -11
- package/src/types/scheme-colors.d.ts +14 -120
- package/src/utils/call.js +18 -46
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
- package/dist/components/Toast/Toast.vue.d.ts +0 -16
- package/dist/components/Toast/Toast.vue.d.ts.map +0 -1
- package/dist/components/Toast/ToastManager.d.ts +0 -14
- package/dist/components/Toast/ToastManager.d.ts.map +0 -1
- package/dist/components/Toast/types.d.ts +0 -35
- package/dist/components/Toast/types.d.ts.map +0 -1
- package/dist/unnnic.js +0 -188
- package/dist/unnnic.umd.cjs +0 -110
- package/src/assets/img/previews/doc-preview.png +0 -0
- package/src/assets/img/previews/image-preview.png +0 -0
- package/src/assets/img/previews/video-preview.png +0 -0
- 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 -93
- 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 -243
- package/src/components/TemplatePreview/TemplatePreview.vue +0 -252
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
- package/src/components/TemplatePreview/types.d.ts +0 -16
- package/src/components/Toast/Toast.vue +0 -236
- package/src/components/Toast/ToastManager.ts +0 -110
- package/src/components/Toast/types.ts +0 -57
- package/src/stories/Popover.stories.js +0 -39
- package/src/stories/Select.stories.js +0 -91
- package/src/stories/TemplatePreview.stories.js +0 -94
- package/src/stories/TemplatePreviewModal.stories.js +0 -110
- package/src/stories/Toast.mdx +0 -123
- package/src/stories/Toast.stories.js +0 -126
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
'text-input',
|
|
5
|
+
`size--${size}`,
|
|
6
|
+
`text-input--icon-right-size-${iconRightSize}`,
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
3
9
|
<BaseInput
|
|
4
10
|
v-bind="attributes"
|
|
5
11
|
ref="base-input"
|
|
@@ -12,9 +18,6 @@
|
|
|
12
18
|
class="input-itself"
|
|
13
19
|
:hasIconLeft="!!iconLeft"
|
|
14
20
|
:hasIconRight="!!iconRight || allowTogglePassword"
|
|
15
|
-
:maxlength="maxlength"
|
|
16
|
-
:readonly="readonly"
|
|
17
|
-
:forceActiveStatus="forceActiveStatus"
|
|
18
21
|
@focus="onFocus"
|
|
19
22
|
@blur="onBlur"
|
|
20
23
|
/>
|
|
@@ -23,7 +26,7 @@
|
|
|
23
26
|
v-if="iconLeft"
|
|
24
27
|
:scheme="iconScheme"
|
|
25
28
|
:icon="iconLeft"
|
|
26
|
-
size="
|
|
29
|
+
size="sm"
|
|
27
30
|
:clickable="iconLeftClickable"
|
|
28
31
|
:class="['icon-left', { clickable: iconLeftClickable }]"
|
|
29
32
|
@click="onIconLeftClick"
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
v-if="iconRightSvg"
|
|
34
37
|
:scheme="iconScheme"
|
|
35
38
|
:icon="iconRightSvg"
|
|
36
|
-
size="
|
|
39
|
+
:size="iconRightSize"
|
|
37
40
|
:clickable="iconRightClickable || allowTogglePassword"
|
|
38
41
|
:class="[
|
|
39
42
|
'icon-right',
|
|
@@ -89,6 +92,10 @@ export default {
|
|
|
89
92
|
type: Boolean,
|
|
90
93
|
default: null,
|
|
91
94
|
},
|
|
95
|
+
iconRightSize: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'sm',
|
|
98
|
+
},
|
|
92
99
|
allowTogglePassword: {
|
|
93
100
|
type: Boolean,
|
|
94
101
|
default: null,
|
|
@@ -101,22 +108,6 @@ export default {
|
|
|
101
108
|
type: String,
|
|
102
109
|
default: 'md',
|
|
103
110
|
},
|
|
104
|
-
maxlength: {
|
|
105
|
-
type: Number,
|
|
106
|
-
default: null,
|
|
107
|
-
},
|
|
108
|
-
disabled: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: false,
|
|
111
|
-
},
|
|
112
|
-
readonly: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
default: false,
|
|
115
|
-
},
|
|
116
|
-
forceActiveStatus: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: false,
|
|
119
|
-
},
|
|
120
111
|
},
|
|
121
112
|
emits: ['icon-left-click', 'icon-right-click'],
|
|
122
113
|
data() {
|
|
@@ -127,7 +118,7 @@ export default {
|
|
|
127
118
|
},
|
|
128
119
|
computed: {
|
|
129
120
|
isDisabled() {
|
|
130
|
-
return this.$attrs.disabled
|
|
121
|
+
return this.$attrs.disabled;
|
|
131
122
|
},
|
|
132
123
|
|
|
133
124
|
iconRightSvg() {
|
|
@@ -140,22 +131,22 @@ export default {
|
|
|
140
131
|
|
|
141
132
|
iconScheme() {
|
|
142
133
|
if (this.type === 'error') {
|
|
143
|
-
return '
|
|
134
|
+
return 'aux-red-500';
|
|
144
135
|
}
|
|
145
136
|
|
|
146
137
|
if (this.isDisabled) {
|
|
147
|
-
return '
|
|
138
|
+
return 'neutral-cleanest';
|
|
148
139
|
}
|
|
149
140
|
|
|
150
|
-
if (this.modelValue || this.isFocused
|
|
151
|
-
return '
|
|
141
|
+
if (this.modelValue || this.isFocused) {
|
|
142
|
+
return 'neutral-dark';
|
|
152
143
|
}
|
|
153
144
|
|
|
154
145
|
if (this.hasCloudyColor) {
|
|
155
|
-
return '
|
|
146
|
+
return 'neutral-cloudy';
|
|
156
147
|
}
|
|
157
148
|
|
|
158
|
-
return '
|
|
149
|
+
return 'neutral-cloudy';
|
|
159
150
|
},
|
|
160
151
|
|
|
161
152
|
attributes() {
|
|
@@ -192,10 +183,6 @@ export default {
|
|
|
192
183
|
<style lang="scss" scoped>
|
|
193
184
|
@use '@/assets/scss/unnnic' as *;
|
|
194
185
|
|
|
195
|
-
.text-input {
|
|
196
|
-
position: relative;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
186
|
.icon {
|
|
200
187
|
&-left,
|
|
201
188
|
&-right {
|
|
@@ -206,16 +193,32 @@ export default {
|
|
|
206
193
|
|
|
207
194
|
&-left {
|
|
208
195
|
position: absolute;
|
|
209
|
-
top:
|
|
210
|
-
|
|
211
|
-
left: $unnnic-space-4;
|
|
196
|
+
top: $unnnic-spacing-ant + 0.1875 * $unnnic-font-size;
|
|
197
|
+
left: $unnnic-inline-sm - $unnnic-border-width-thinner;
|
|
212
198
|
}
|
|
213
199
|
|
|
214
200
|
&-right {
|
|
215
201
|
position: absolute;
|
|
216
|
-
top:
|
|
217
|
-
|
|
218
|
-
|
|
202
|
+
top: $unnnic-spacing-ant + 0.1875 * $unnnic-font-size;
|
|
203
|
+
right: $unnnic-inline-sm - $unnnic-border-width-thinner;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
.text-input {
|
|
207
|
+
position: relative;
|
|
208
|
+
|
|
209
|
+
&.size--sm {
|
|
210
|
+
.icon-left,
|
|
211
|
+
.icon-right {
|
|
212
|
+
top: $unnnic-spacing-xs + 0.125 * $unnnic-font-size;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&.size--sm.text-input--icon-right-size-ant .icon-right {
|
|
217
|
+
top: 0.5625 * $unnnic-font-size;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&.size--md.text-input--icon-right-size-ant .icon-right {
|
|
221
|
+
top: 0.8125 * $unnnic-font-size;
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
</style>
|
|
@@ -74,22 +74,22 @@ describe('TextInput.vue', () => {
|
|
|
74
74
|
|
|
75
75
|
test('computes the correct iconScheme based on various states', async () => {
|
|
76
76
|
await wrapper.setProps({ type: 'error' });
|
|
77
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
77
|
+
expect(wrapper.vm.iconScheme).toBe('aux-red-500');
|
|
78
78
|
|
|
79
79
|
await wrapper.setProps({ type: 'normal' });
|
|
80
80
|
await wrapper.setData({ isDisabled: true });
|
|
81
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
81
|
+
expect(wrapper.vm.iconScheme).toBe('neutral-cloudy');
|
|
82
82
|
|
|
83
83
|
await wrapper.setData({ isDisabled: false });
|
|
84
84
|
await wrapper.setProps({ modelValue: 'text' });
|
|
85
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
85
|
+
expect(wrapper.vm.iconScheme).toBe('neutral-dark');
|
|
86
86
|
|
|
87
87
|
await wrapper.setData({ isFocused: true });
|
|
88
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
88
|
+
expect(wrapper.vm.iconScheme).toBe('neutral-dark');
|
|
89
89
|
|
|
90
90
|
await wrapper.setProps({ hasCloudyColor: true, modelValue: '' });
|
|
91
91
|
await wrapper.setData({ isFocused: false });
|
|
92
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
92
|
+
expect(wrapper.vm.iconScheme).toBe('neutral-cloudy');
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
test('attributes computed property returns combined attributes and props', () => {
|
|
@@ -2,17 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Input.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<div data-v-d890ad85="" class="unnnic-form md">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</section>
|
|
9
|
-
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md 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" hascloudycolor="false" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--fg-base 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="material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>
|
|
10
|
-
<section data-v-d890ad85="" class="unnnic-form__hints-container">
|
|
11
|
-
<section data-v-d890ad85="" class="unnnic-form__message-container">
|
|
12
|
-
<p data-v-d890ad85="" class="unnnic-form__message">Error message</p>
|
|
13
|
-
<!--v-if-->
|
|
14
|
-
</section>
|
|
15
|
-
<!--v-if-->
|
|
16
|
-
</section>
|
|
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>
|
|
17
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" 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--
|
|
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,65 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<p class="unnnic-label__label">{{ fullySanitize(props.label) }}</p>
|
|
4
|
-
<UnnnicToolTip
|
|
5
|
-
v-if="tooltip"
|
|
6
|
-
enabled
|
|
7
|
-
:text="tooltip"
|
|
8
|
-
:enableHtml="props.useHtmlTooltip"
|
|
9
|
-
>
|
|
10
|
-
<UnnnicIcon
|
|
11
|
-
icon="help"
|
|
12
|
-
size="sm"
|
|
13
|
-
scheme="fg-base"
|
|
14
|
-
/>
|
|
15
|
-
</UnnnicToolTip>
|
|
16
|
-
</section>
|
|
2
|
+
<p class="unnnic-label__label">{{ fullySanitize(label) }}</p>
|
|
17
3
|
</template>
|
|
18
4
|
|
|
19
|
-
<script
|
|
20
|
-
import { fullySanitize } from '
|
|
21
|
-
|
|
22
|
-
import UnnnicToolTip from '../ToolTip/ToolTip.vue';
|
|
23
|
-
import UnnnicIcon from '../Icon.vue';
|
|
24
|
-
|
|
25
|
-
defineOptions({
|
|
5
|
+
<script>
|
|
6
|
+
import { fullySanitize } from '../../utils/sanitize';
|
|
7
|
+
export default {
|
|
26
8
|
name: 'UnnnicLabel',
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tooltip: '',
|
|
38
|
-
useHtmlTooltip: false,
|
|
39
|
-
});
|
|
9
|
+
props: {
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: null,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
methods: {
|
|
16
|
+
fullySanitize,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
40
19
|
</script>
|
|
41
20
|
|
|
42
|
-
<style lang="scss"
|
|
21
|
+
<style lang="scss">
|
|
43
22
|
@use '@/assets/scss/unnnic' as *;
|
|
44
23
|
|
|
45
|
-
* {
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
padding: $unnnic-space-0;
|
|
48
|
-
margin: $unnnic-space-0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
24
|
.unnnic-label {
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
gap: $unnnic-space-2;
|
|
55
|
-
color: $unnnic-color-fg-base;
|
|
56
|
-
|
|
57
25
|
&__label {
|
|
58
|
-
font: $unnnic-font-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
font-family: $unnnic-font-family-secondary;
|
|
27
|
+
font-weight: $unnnic-font-weight-regular;
|
|
28
|
+
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
|
|
29
|
+
font-size: $unnnic-font-size-body-gt;
|
|
30
|
+
color: $unnnic-color-neutral-cloudy;
|
|
31
|
+
margin: $unnnic-spacing-stack-xs 0;
|
|
63
32
|
}
|
|
64
33
|
}
|
|
65
34
|
</style>
|
|
@@ -24,7 +24,7 @@ describe('Label', () => {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
it('applies the correct classes and styles', () => {
|
|
27
|
-
const label = wrapper.
|
|
27
|
+
const label = wrapper.findComponent('.unnnic-label__label');
|
|
28
28
|
expect(label.html()).toMatchSnapshot();
|
|
29
29
|
});
|
|
30
30
|
});
|
|
@@ -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>"`;
|
|
@@ -11,7 +11,7 @@ exports[`ModalDialog.vue > Elements rendering > matches the snapshot 1`] = `
|
|
|
11
11
|
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="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
12
|
<h1 data-v-68ebadeb="" class="unnnic-modal-dialog__container__title-text" data-testid="title-text">Test Title</h1>
|
|
13
13
|
</section>
|
|
14
|
-
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-
|
|
14
|
+
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-darkest" data-testid="close-icon"></unnnic-icon-stub>
|
|
15
15
|
</header>
|
|
16
16
|
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container__content"></section>
|
|
17
17
|
<section data-v-68ebadeb="" data-testid="actions-section" class="unnnic-modal-dialog__container__actions">
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
class="tab-head"
|
|
10
10
|
:class="{
|
|
11
11
|
'tab-head--active': localValue === tab,
|
|
12
|
-
'tab-head--disabled': disabledTabs?.includes(tab),
|
|
13
12
|
}"
|
|
14
13
|
@click="change(tab)"
|
|
15
14
|
>
|
|
@@ -21,9 +20,10 @@
|
|
|
21
20
|
side="bottom"
|
|
22
21
|
>
|
|
23
22
|
<UnnnicIcon
|
|
24
|
-
icon="
|
|
23
|
+
icon="info"
|
|
25
24
|
:size="size === 'sm' ? 'xs' : 'sm'"
|
|
26
|
-
|
|
25
|
+
filled
|
|
26
|
+
scheme="neutral-cleanest"
|
|
27
27
|
/>
|
|
28
28
|
</UnnnicToolTip>
|
|
29
29
|
</li>
|
|
@@ -65,13 +65,6 @@ export default {
|
|
|
65
65
|
tabs: {
|
|
66
66
|
type: Array,
|
|
67
67
|
default: null,
|
|
68
|
-
validator: (tabs) => {
|
|
69
|
-
return tabs.every((tab) => typeof tab === 'string') && tabs.length <= 5;
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
disabledTabs: {
|
|
73
|
-
type: Array,
|
|
74
|
-
default: null,
|
|
75
68
|
},
|
|
76
69
|
},
|
|
77
70
|
emits: ['change'],
|
|
@@ -112,10 +105,6 @@ export default {
|
|
|
112
105
|
return '';
|
|
113
106
|
},
|
|
114
107
|
change(value) {
|
|
115
|
-
if (this.disabledTabs?.includes(value)) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
108
|
this.localValue = value;
|
|
120
109
|
this.$emit('change', this.localValue);
|
|
121
110
|
},
|
|
@@ -130,15 +119,18 @@ export default {
|
|
|
130
119
|
display: flex;
|
|
131
120
|
align-items: flex-start;
|
|
132
121
|
justify-content: space-between;
|
|
133
|
-
color: $unnnic-color-
|
|
134
|
-
font: $unnnic-font-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
color: $unnnic-color-neutral-cloudy;
|
|
123
|
+
font-family: $unnnic-font-family-secondary;
|
|
124
|
+
font-weight: $unnnic-font-weight-bold;
|
|
125
|
+
font-size: $unnnic-font-size-body-lg;
|
|
126
|
+
line-height: ($unnnic-font-size-body-lg + $unnnic-line-height-medium);
|
|
127
|
+
margin-bottom: $unnnic-inset-sm;
|
|
128
|
+
border-bottom: $unnnic-border-width-thinner solid $unnnic-color-neutral-soft;
|
|
137
129
|
}
|
|
138
130
|
|
|
139
131
|
.tab-content {
|
|
140
132
|
display: flex;
|
|
141
|
-
gap: $unnnic-
|
|
133
|
+
gap: $unnnic-spacing-sm;
|
|
142
134
|
|
|
143
135
|
margin: 0;
|
|
144
136
|
padding: 0;
|
|
@@ -147,24 +139,27 @@ export default {
|
|
|
147
139
|
|
|
148
140
|
.tab-head {
|
|
149
141
|
display: flex;
|
|
150
|
-
gap: $unnnic-
|
|
142
|
+
gap: $unnnic-spacing-xs;
|
|
151
143
|
align-items: center;
|
|
152
144
|
|
|
153
145
|
cursor: pointer;
|
|
154
|
-
|
|
146
|
+
margin: $unnnic-spacing-xs $unnnic-spacing-sm;
|
|
155
147
|
|
|
156
148
|
.unnnic-tooltip {
|
|
157
149
|
display: flex;
|
|
158
150
|
}
|
|
159
151
|
|
|
160
152
|
&:hover {
|
|
161
|
-
color: $unnnic-color-
|
|
153
|
+
color: $unnnic-color-neutral-black;
|
|
162
154
|
}
|
|
163
155
|
}
|
|
164
156
|
|
|
165
157
|
.tab-head--active {
|
|
166
|
-
|
|
167
|
-
font: $unnnic-font-
|
|
158
|
+
font-family: $unnnic-font-family-secondary;
|
|
159
|
+
font-weight: $unnnic-font-weight-bold;
|
|
160
|
+
color: $unnnic-color-neutral-black;
|
|
161
|
+
font-size: $unnnic-font-size-body-lg;
|
|
162
|
+
line-height: ($unnnic-font-size-body-lg + $unnnic-line-height-medium);
|
|
168
163
|
transition: 0.4s;
|
|
169
164
|
|
|
170
165
|
position: relative;
|
|
@@ -173,23 +168,14 @@ export default {
|
|
|
173
168
|
content: '';
|
|
174
169
|
|
|
175
170
|
position: absolute;
|
|
176
|
-
bottom:
|
|
177
|
-
left:
|
|
171
|
+
bottom: -$unnnic-spacing-xs;
|
|
172
|
+
left: -$unnnic-spacing-sm;
|
|
178
173
|
|
|
179
174
|
display: block;
|
|
180
175
|
|
|
181
|
-
width: 100
|
|
176
|
+
width: calc(100% + (#{$unnnic-spacing-sm} * 2));
|
|
182
177
|
|
|
183
|
-
border-bottom: $unnnic-border-width-thin solid $unnnic-color-
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.tab-head--disabled {
|
|
188
|
-
color: $unnnic-color-fg-muted;
|
|
189
|
-
cursor: default;
|
|
190
|
-
|
|
191
|
-
&:hover {
|
|
192
|
-
color: $unnnic-color-fg-muted;
|
|
178
|
+
border-bottom: $unnnic-border-width-thin solid $unnnic-color-weni-600;
|
|
193
179
|
}
|
|
194
180
|
}
|
|
195
181
|
|
|
@@ -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="material-symbols-rounded unnnic-icon-scheme--
|
|
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--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
45
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
46
46
|
<path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
47
47
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
48
48
|
<!--v-if-->
|
|
@@ -53,7 +53,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
|
|
|
53
53
|
<!--v-if-->
|
|
54
54
|
</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">
|
|
55
55
|
<!--v-if-->
|
|
56
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
56
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
57
57
|
<path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
58
58
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
59
59
|
<!--v-if-->
|
|
@@ -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--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
8
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
9
9
|
<path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
10
10
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
11
11
|
<!--v-if-->
|
|
@@ -36,7 +36,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
|
|
|
36
36
|
<!--v-if-->
|
|
37
37
|
</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">
|
|
38
38
|
<!--v-if-->
|
|
39
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
39
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--sm unnnic-icon-scheme--neutral-dark" data-testid="icon-center" style="visibility: visible;">
|
|
40
40
|
<path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
41
41
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
42
42
|
<!--v-if-->
|
|
@@ -18,14 +18,13 @@
|
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
:value="modelValue"
|
|
20
20
|
@input="$emit('update:modelValue', fullySanitize($event.target.value))"
|
|
21
|
-
|
|
21
|
+
></textarea>
|
|
22
22
|
|
|
23
23
|
<template
|
|
24
24
|
v-if="maxLength"
|
|
25
25
|
#rightMessage
|
|
26
|
+
>{{ modelValue.length }}/{{ maxLength }}</template
|
|
26
27
|
>
|
|
27
|
-
{{ modelValue.length }}/{{ maxLength }}
|
|
28
|
-
</template>
|
|
29
28
|
</UnnnicFormElement>
|
|
30
29
|
</template>
|
|
31
30
|
|
|
@@ -97,12 +96,6 @@ export default {
|
|
|
97
96
|
@use '@/assets/scss/unnnic' as *;
|
|
98
97
|
@use '@/components/Input/Input' as *;
|
|
99
98
|
|
|
100
|
-
* {
|
|
101
|
-
margin: 0;
|
|
102
|
-
padding: 0;
|
|
103
|
-
box-sizing: border-box;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
99
|
.unnnic-text-area {
|
|
107
100
|
&__textarea {
|
|
108
101
|
@include input-base;
|
|
@@ -110,21 +103,24 @@ export default {
|
|
|
110
103
|
display: block;
|
|
111
104
|
width: 100%;
|
|
112
105
|
resize: vertical;
|
|
106
|
+
box-sizing: border-box;
|
|
113
107
|
|
|
114
108
|
scrollbar-width: thin;
|
|
115
109
|
|
|
116
|
-
padding: $unnnic-space-3 $unnnic-space-4;
|
|
117
|
-
|
|
118
110
|
&--size-md {
|
|
119
111
|
@include input-md-font;
|
|
120
112
|
|
|
121
|
-
min-height:
|
|
113
|
+
min-height: 6.25 * $unnnic-font-size;
|
|
114
|
+
padding: ($unnnic-spacing-ant - $unnnic-border-width-thinner)
|
|
115
|
+
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
&--size-sm {
|
|
125
119
|
@include input-sm-font;
|
|
126
120
|
|
|
127
|
-
min-height: $unnnic-
|
|
121
|
+
min-height: 5 * $unnnic-font-size;
|
|
122
|
+
padding: ($unnnic-spacing-xs)
|
|
123
|
+
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
128
124
|
}
|
|
129
125
|
|
|
130
126
|
&.unnnic-text-area__textarea--type-error {
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
exports[`TextArea.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<section data-v-9f8d6c86="" data-v-735b3c51="" class="unnnic-form-element">
|
|
5
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
|
-
|
|
7
|
-
|
|
8
|
-
<!--v-if-->
|
|
9
|
-
<!--v-if-->
|
|
10
|
-
</section>
|
|
11
|
-
<p data-v-9f8d6c86="">0/200</p>
|
|
12
|
-
</section>
|
|
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>
|
|
13
8
|
</section>"
|
|
14
9
|
`;
|