@weni/unnnic-system 3.9.1 → 3.9.3-alpha.0
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 +16 -0
- package/dist/assets/tokens/colors.json.d.ts +376 -0
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +17 -116
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/Version1dot1.vue.d.ts +2 -38
- 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 +3 -3
- 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 +1 -1
- 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 +5 -5
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +27 -27
- package/dist/components/Card/CardCompany.vue.d.ts +11 -414
- package/dist/components/Card/CardData.vue.d.ts +1 -1
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +5 -5
- package/dist/components/Card/ContentCard.vue.d.ts +3 -3
- package/dist/components/Card/DashCard.vue.d.ts +5 -5
- 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 +3 -3
- package/dist/components/CardImage/CardImage.vue.d.ts +24 -31
- package/dist/components/CardInformation/CardInformation.vue.d.ts +5 -5
- package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
- package/dist/components/Carousel/Carousel.vue.d.ts +13 -416
- package/dist/components/Carousel/TagCarousel.vue.d.ts +12 -415
- package/dist/components/ChartBar/ChartBar.vue.d.ts +5 -5
- 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 +30 -448
- 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 +19 -26
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -0
- 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 +12 -2
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +251 -41
- package/dist/components/DatePicker/DatePicker.vue.d.ts +4 -4
- package/dist/components/Drawer/Drawer.vue.d.ts +4 -4
- 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 +51 -28
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/Icon.vue.d.ts.map +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +4 -4
- package/dist/components/Input/BaseInput.vue.d.ts +33 -2
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +251 -41
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +85 -25
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +256 -46
- package/dist/components/InputNext/InputNext.vue.d.ts +5 -5
- package/dist/components/Label/Label.vue.d.ts +9 -15
- 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 +6 -6
- package/dist/components/ModalNext/ModalNext.vue.d.ts +256 -46
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +9 -9
- package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +26 -14
- package/dist/components/PageHeader/PageHeader.vue.d.ts +28 -0
- package/dist/components/PageHeader/PageHeader.vue.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +3 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/PageHeader/types.d.ts +9 -0
- package/dist/components/PageHeader/types.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +3 -3
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +10 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +120 -470
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +11 -414
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +21 -28
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts.map +1 -1
- package/dist/components/SelectTime/index.vue.d.ts +85 -25
- 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 +55 -21
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/Tab/Tab.vue.d.ts +13 -2
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +3 -3
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/DefaultTag.vue.d.ts +4 -83
- package/dist/components/Tag/DefaultTag.vue.d.ts.map +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +12 -414
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Tag/types.d.ts +18 -0
- package/dist/components/Tag/types.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.vue.d.ts +78 -33
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/Toast/Toast.vue.d.ts +16 -0
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/Toast/ToastManager.d.ts +14 -0
- package/dist/components/Toast/ToastManager.d.ts.map +1 -0
- package/dist/components/Toast/types.d.ts +35 -0
- package/dist/components/Toast/types.d.ts.map +1 -0
- package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +3 -3
- package/dist/components/Tour/TourPopover.vue.d.ts +3 -3
- package/dist/components/UploadArea/UploadArea.vue.d.ts +4 -4
- package/dist/components/index.d.ts +8736 -10161
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/{es-efb4f902.mjs → es-61b41785.mjs} +1 -1
- package/dist/{index-e30fc518.mjs → index-10160248.mjs} +9383 -8807
- package/dist/locales/en.json.d.ts +2 -1
- package/dist/locales/es.json.d.ts +2 -1
- package/dist/locales/pt_br.json.d.ts +2 -1
- package/dist/{pt-br-4bacdbb6.mjs → pt-br-31a68683.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +158 -151
- package/dist/unnnic.umd.js +34 -35
- package/dist/utils/call.d.ts +2 -1
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/assets/icons/checkbox-checked-disabled.svg +3 -0
- package/src/assets/icons/checkbox-checked.svg +3 -0
- package/src/assets/icons/checkbox-less-disabled.svg +3 -0
- package/src/assets/icons/checkbox-less.svg +3 -0
- package/src/assets/icons/radio-checked.svg +3 -0
- package/src/assets/icons/switch-checked-disabled.svg +3 -0
- package/src/assets/icons/switch-checked.svg +3 -0
- package/src/assets/scss/scheme-colors.scss +309 -223
- package/src/components/Alert/Alert.vue +26 -135
- package/src/components/Alert/Version1dot1.vue +0 -36
- package/src/components/Alert/__tests__/Alert.spec.js +2 -45
- package/src/components/Alert/__tests__/Version1dot1.spec.js +0 -21
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +11 -7
- 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/Button/Button.vue +67 -117
- package/src/components/Button/types.ts +0 -1
- package/src/components/ChatsContact/ChatsContact.vue +16 -8
- package/src/components/Checkbox/Checkbox.vue +117 -65
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +6 -21
- package/src/components/CheckboxGroup/CheckboxGroup.vue +96 -0
- package/src/components/DataTable/index.vue +48 -0
- package/src/components/FormElement/FormElement.vue +63 -93
- package/src/components/Icon.vue +2 -0
- package/src/components/Input/BaseInput.vue +33 -14
- package/src/components/Input/Input.scss +22 -22
- package/src/components/Input/Input.vue +79 -56
- package/src/components/Input/TextInput.vue +81 -65
- package/src/components/Input/__test__/Input.spec.js +13 -33
- package/src/components/Input/__test__/TextInput.spec.js +6 -8
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +17 -4
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +7 -1
- package/src/components/Label/Label.vue +52 -21
- 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/MultiSelectV2/MultSelectOption.vue +67 -0
- package/src/components/MultiSelectV2/__tests__/MultiSelect.spec.js +556 -0
- package/src/components/MultiSelectV2/__tests__/MultiSelectOption.spec.js +229 -0
- package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelect.spec.js.snap +121 -0
- package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +51 -0
- package/src/components/MultiSelectV2/index.vue +221 -0
- package/src/components/PageHeader/PageHeader.vue +148 -0
- package/src/components/PageHeader/index.ts +2 -0
- package/src/components/PageHeader/types.ts +10 -0
- package/src/components/Popover/__tests__/Popover.spec.js +147 -0
- package/src/components/Popover/__tests__/__snapshots__/Popover.spec.js.snap +8 -0
- package/src/components/Popover/index.vue +146 -0
- package/src/components/Radio/Radio.vue +118 -66
- package/src/components/Radio/__test__/Radio.spec.js +14 -20
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +4 -3
- package/src/components/RadioGroup/RadioGroup.vue +142 -0
- package/src/components/Select/SelectOption.vue +65 -0
- package/src/components/Select/__tests__/Select.spec.js +412 -0
- package/src/components/Select/__tests__/SelectItem.spec.js +330 -0
- package/src/components/Select/__tests__/SelectOption.spec.js +174 -0
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +97 -0
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +15 -0
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +25 -0
- package/src/components/Select/index.vue +249 -0
- package/src/components/SelectSmart/SelectSmart.vue +4 -3
- package/src/components/Switch/Switch.vue +132 -91
- package/src/components/Switch/__tests__/Switch.spec.js +8 -75
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +5 -6
- package/src/components/Tab/Tab.vue +37 -23
- 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/Tag/DefaultTag.vue +51 -107
- package/src/components/Tag/Tag.vue +32 -79
- package/src/components/Tag/types.ts +19 -0
- package/src/components/TextArea/TextArea.vue +41 -12
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +11 -3
- package/src/components/Toast/Toast.vue +246 -0
- package/src/components/Toast/ToastManager.ts +110 -0
- package/src/components/Toast/__tests__/Toast.spec.js +291 -0
- package/src/components/Toast/__tests__/ToastManager.spec.js +294 -0
- package/src/components/Toast/types.ts +57 -0
- package/src/components/index.ts +33 -18
- package/src/locales/en.json +2 -1
- package/src/locales/es.json +2 -1
- package/src/locales/pt_br.json +2 -1
- package/src/stories/Alert.stories.js +6 -67
- package/src/stories/Button.stories.js +29 -39
- package/src/stories/ChatsContact.stories.js +9 -0
- package/src/stories/Checkbox.stories.js +11 -4
- package/src/stories/CheckboxGroup.stories.js +105 -0
- package/src/stories/DataTable.stories.js +192 -0
- package/src/stories/Input.stories.js +71 -76
- package/src/stories/Label.stories.js +7 -0
- package/src/stories/MultiSelectV2.stories.js +158 -0
- package/src/stories/PageHeader.stories.js +330 -0
- package/src/stories/Radio.stories.js +28 -1
- package/src/stories/RadioGroup.stories.js +144 -0
- package/src/stories/Select.stories.js +158 -0
- package/src/stories/Switch.stories.js +10 -5
- package/src/stories/Tab.stories.js +11 -4
- package/src/stories/Tag.stories.js +24 -43
- package/src/stories/TextArea.stories.js +14 -2
- package/src/stories/Toast.mdx +123 -0
- package/src/stories/Toast.stories.js +126 -0
- package/src/types/scheme-colors.d.ts +1 -0
- package/src/utils/call.js +46 -18
- package/dist/components/Tag/BrandTag.vue.d.ts +0 -51
- package/dist/components/Tag/BrandTag.vue.d.ts.map +0 -1
- package/dist/components/Tag/IndicatorTag.vue.d.ts +0 -151
- package/dist/components/Tag/IndicatorTag.vue.d.ts.map +0 -1
- package/dist/components/Tag/TagNext.vue.d.ts +0 -24
- package/dist/components/Tag/TagNext.vue.d.ts.map +0 -1
- package/src/components/Alert/AlertBanner.vue +0 -182
- package/src/components/Alert/AlertCaller.vue +0 -49
- package/src/components/Alert/__tests__/AlertBanner.spec.js +0 -89
- package/src/components/Alert/__tests__/AlertCaller.spec.js +0 -98
- package/src/components/Tag/BrandTag.vue +0 -96
- package/src/components/Tag/IndicatorTag.vue +0 -107
- package/src/components/Tag/TagNext.vue +0 -60
|
@@ -1,51 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class="unnnic-form__label"
|
|
13
|
-
>
|
|
14
|
-
{{ fullySanitize(label) }}
|
|
15
|
-
</p>
|
|
16
|
-
|
|
2
|
+
<UnnnicFormElement
|
|
3
|
+
:label="label || $slots.label"
|
|
4
|
+
:size="size"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:message="message"
|
|
7
|
+
:tooltip="tooltip"
|
|
8
|
+
:error="computedError"
|
|
9
|
+
:class="['unnnic-form', size]"
|
|
10
|
+
data-testid="form-element"
|
|
11
|
+
>
|
|
17
12
|
<TextInput
|
|
18
13
|
v-bind="$attrs"
|
|
19
14
|
v-model="val"
|
|
20
15
|
class="unnnic-form-input"
|
|
16
|
+
:forceActiveStatus="forceActiveStatus"
|
|
21
17
|
:placeholder="placeholder"
|
|
22
18
|
:iconLeft="iconLeft"
|
|
23
19
|
:iconRight="iconRight"
|
|
24
|
-
:type="type"
|
|
20
|
+
:type="errors.length > 0 && !disabled ? 'error' : type"
|
|
25
21
|
:iconLeftClickable="iconLeftClickable"
|
|
26
22
|
:iconRightClickable="iconRightClickable"
|
|
27
23
|
:hasCloudyColor="hasCloudyColor"
|
|
28
24
|
:size="size"
|
|
29
25
|
:mask="mask"
|
|
30
26
|
:nativeType="nativeType"
|
|
27
|
+
:maxlength="maxlength"
|
|
28
|
+
:disabled="disabled"
|
|
29
|
+
:readonly="readonly"
|
|
30
|
+
:showClear="showClear"
|
|
31
|
+
@clear="$emit('clear')"
|
|
31
32
|
/>
|
|
32
33
|
|
|
33
|
-
<
|
|
34
|
-
v-if="
|
|
35
|
-
|
|
34
|
+
<template
|
|
35
|
+
v-if="maxlength && showMaxlengthCounter"
|
|
36
|
+
#rightMessage
|
|
36
37
|
>
|
|
37
|
-
{{
|
|
38
|
-
</
|
|
39
|
-
</
|
|
38
|
+
{{ (val || '').length }} / {{ maxlength }}
|
|
39
|
+
</template>
|
|
40
|
+
</UnnnicFormElement>
|
|
40
41
|
</template>
|
|
41
42
|
|
|
42
43
|
<script>
|
|
43
44
|
import { fullySanitize } from '../../utils/sanitize';
|
|
44
45
|
import TextInput from './TextInput.vue';
|
|
46
|
+
import UnnnicFormElement from '../FormElement/FormElement.vue';
|
|
45
47
|
|
|
46
48
|
export default {
|
|
47
49
|
name: 'UnnnicInput',
|
|
48
|
-
components: {
|
|
50
|
+
components: {
|
|
51
|
+
TextInput,
|
|
52
|
+
UnnnicFormElement,
|
|
53
|
+
},
|
|
49
54
|
props: {
|
|
50
55
|
placeholder: {
|
|
51
56
|
type: String,
|
|
@@ -68,19 +73,23 @@ export default {
|
|
|
68
73
|
},
|
|
69
74
|
message: {
|
|
70
75
|
type: String,
|
|
71
|
-
default:
|
|
76
|
+
default: '',
|
|
77
|
+
},
|
|
78
|
+
errors: {
|
|
79
|
+
type: [String, Array],
|
|
80
|
+
default: '',
|
|
72
81
|
},
|
|
73
82
|
label: {
|
|
74
83
|
type: String,
|
|
75
|
-
default:
|
|
84
|
+
default: '',
|
|
76
85
|
},
|
|
77
86
|
iconLeft: {
|
|
78
87
|
type: String,
|
|
79
|
-
default:
|
|
88
|
+
default: '',
|
|
80
89
|
},
|
|
81
90
|
iconRight: {
|
|
82
91
|
type: String,
|
|
83
|
-
default:
|
|
92
|
+
default: '',
|
|
84
93
|
},
|
|
85
94
|
allowTogglePassword: {
|
|
86
95
|
type: Boolean,
|
|
@@ -88,11 +97,11 @@ export default {
|
|
|
88
97
|
},
|
|
89
98
|
iconLeftClickable: {
|
|
90
99
|
type: Boolean,
|
|
91
|
-
default:
|
|
100
|
+
default: false,
|
|
92
101
|
},
|
|
93
102
|
iconRightClickable: {
|
|
94
103
|
type: Boolean,
|
|
95
|
-
default:
|
|
104
|
+
default: false,
|
|
96
105
|
},
|
|
97
106
|
hasCloudyColor: {
|
|
98
107
|
type: Boolean,
|
|
@@ -106,16 +115,50 @@ export default {
|
|
|
106
115
|
type: [String, Array],
|
|
107
116
|
default: '',
|
|
108
117
|
},
|
|
118
|
+
tooltip: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: '',
|
|
121
|
+
},
|
|
122
|
+
maxlength: {
|
|
123
|
+
type: [Number, null],
|
|
124
|
+
default: null,
|
|
125
|
+
},
|
|
126
|
+
showMaxlengthCounter: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false,
|
|
129
|
+
},
|
|
130
|
+
disabled: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: false,
|
|
133
|
+
},
|
|
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
|
+
},
|
|
109
146
|
},
|
|
110
|
-
|
|
147
|
+
|
|
148
|
+
emits: ['update:modelValue', 'clear'],
|
|
149
|
+
|
|
111
150
|
data() {
|
|
112
151
|
return {
|
|
113
152
|
val: this.modelValue,
|
|
114
153
|
};
|
|
115
154
|
},
|
|
116
155
|
computed: {
|
|
117
|
-
|
|
118
|
-
|
|
156
|
+
computedError() {
|
|
157
|
+
if (Array.isArray(this.errors)) {
|
|
158
|
+
return this.errors.join(', ') || this.type === 'error';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return this.errors || this.type === 'error';
|
|
119
162
|
},
|
|
120
163
|
},
|
|
121
164
|
watch: {
|
|
@@ -136,29 +179,9 @@ export default {
|
|
|
136
179
|
</script>
|
|
137
180
|
|
|
138
181
|
<style lang="scss" scoped>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
position: relative;
|
|
144
|
-
|
|
145
|
-
&__message {
|
|
146
|
-
font-size: $unnnic-font-size-body-md;
|
|
147
|
-
margin: $unnnic-spacing-stack-nano 0;
|
|
148
|
-
color: $unnnic-color-feedback-red;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&__label {
|
|
152
|
-
font-weight: $unnnic-font-weight-regular;
|
|
153
|
-
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
|
|
154
|
-
font-size: $unnnic-font-size-body-gt;
|
|
155
|
-
color: $unnnic-color-neutral-cloudy;
|
|
156
|
-
margin: $unnnic-spacing-stack-xs 0;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&.sm &__label {
|
|
160
|
-
font-size: $unnnic-font-size-body-md;
|
|
161
|
-
line-height: $unnnic-font-size-body-md + $unnnic-line-height-medium;
|
|
162
|
-
}
|
|
182
|
+
* {
|
|
183
|
+
margin: 0;
|
|
184
|
+
padding: 0;
|
|
185
|
+
box-sizing: border-box;
|
|
163
186
|
}
|
|
164
187
|
</style>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="[
|
|
4
|
-
'text-input',
|
|
5
|
-
`size--${size}`,
|
|
6
|
-
`text-input--icon-right-size-${iconRightSize}`,
|
|
7
|
-
]"
|
|
8
|
-
>
|
|
2
|
+
<div :class="['text-input', `size--${size}`]">
|
|
9
3
|
<BaseInput
|
|
10
4
|
v-bind="attributes"
|
|
11
5
|
ref="base-input"
|
|
@@ -18,6 +12,10 @@
|
|
|
18
12
|
class="input-itself"
|
|
19
13
|
:hasIconLeft="!!iconLeft"
|
|
20
14
|
:hasIconRight="!!iconRight || allowTogglePassword"
|
|
15
|
+
:hasClearIcon="showClear"
|
|
16
|
+
:maxlength="maxlength"
|
|
17
|
+
:readonly="readonly"
|
|
18
|
+
:forceActiveStatus="forceActiveStatus"
|
|
21
19
|
@focus="onFocus"
|
|
22
20
|
@blur="onBlur"
|
|
23
21
|
/>
|
|
@@ -26,24 +24,34 @@
|
|
|
26
24
|
v-if="iconLeft"
|
|
27
25
|
:scheme="iconScheme"
|
|
28
26
|
:icon="iconLeft"
|
|
29
|
-
size="
|
|
27
|
+
size="ant"
|
|
30
28
|
:clickable="iconLeftClickable"
|
|
31
29
|
:class="['icon-left', { clickable: iconLeftClickable }]"
|
|
32
30
|
@click="onIconLeftClick"
|
|
33
31
|
/>
|
|
34
32
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
<section class="icon-right-container">
|
|
34
|
+
<UnnnicIcon
|
|
35
|
+
v-if="showClear"
|
|
36
|
+
class="icon-clear"
|
|
37
|
+
:scheme="iconScheme"
|
|
38
|
+
icon="close"
|
|
39
|
+
size="ant"
|
|
40
|
+
clickable
|
|
41
|
+
@click.stop="onClearClick"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<UnnnicIcon
|
|
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>
|
|
47
55
|
</div>
|
|
48
56
|
</template>
|
|
49
57
|
|
|
@@ -92,24 +100,36 @@ export default {
|
|
|
92
100
|
type: Boolean,
|
|
93
101
|
default: null,
|
|
94
102
|
},
|
|
95
|
-
iconRightSize: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: 'sm',
|
|
98
|
-
},
|
|
99
103
|
allowTogglePassword: {
|
|
100
104
|
type: Boolean,
|
|
101
105
|
default: null,
|
|
102
106
|
},
|
|
103
|
-
hasCloudyColor: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
default: null,
|
|
106
|
-
},
|
|
107
107
|
size: {
|
|
108
108
|
type: String,
|
|
109
109
|
default: 'md',
|
|
110
110
|
},
|
|
111
|
+
maxlength: {
|
|
112
|
+
type: Number,
|
|
113
|
+
default: null,
|
|
114
|
+
},
|
|
115
|
+
disabled: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
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
|
+
},
|
|
111
131
|
},
|
|
112
|
-
emits: ['icon-left-click', 'icon-right-click'],
|
|
132
|
+
emits: ['icon-left-click', 'icon-right-click', 'clear'],
|
|
113
133
|
data() {
|
|
114
134
|
return {
|
|
115
135
|
isFocused: false,
|
|
@@ -118,7 +138,7 @@ export default {
|
|
|
118
138
|
},
|
|
119
139
|
computed: {
|
|
120
140
|
isDisabled() {
|
|
121
|
-
return this.$attrs.disabled;
|
|
141
|
+
return this.$attrs.disabled || this.disabled;
|
|
122
142
|
},
|
|
123
143
|
|
|
124
144
|
iconRightSvg() {
|
|
@@ -130,23 +150,19 @@ export default {
|
|
|
130
150
|
},
|
|
131
151
|
|
|
132
152
|
iconScheme() {
|
|
133
|
-
if (this.type === 'error') {
|
|
134
|
-
return 'aux-red-500';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
153
|
if (this.isDisabled) {
|
|
138
|
-
return '
|
|
154
|
+
return 'fg-muted';
|
|
139
155
|
}
|
|
140
156
|
|
|
141
|
-
if (this.modelValue || this.isFocused) {
|
|
142
|
-
return '
|
|
157
|
+
if (this.modelValue || this.isFocused || this.forceActiveStatus) {
|
|
158
|
+
return 'color-gray-700';
|
|
143
159
|
}
|
|
144
160
|
|
|
145
161
|
if (this.hasCloudyColor) {
|
|
146
|
-
return '
|
|
162
|
+
return 'fg-base';
|
|
147
163
|
}
|
|
148
164
|
|
|
149
|
-
return '
|
|
165
|
+
return 'fg-base';
|
|
150
166
|
},
|
|
151
167
|
|
|
152
168
|
attributes() {
|
|
@@ -171,6 +187,10 @@ export default {
|
|
|
171
187
|
if (this.iconLeftClickable) this.$emit('icon-left-click');
|
|
172
188
|
},
|
|
173
189
|
|
|
190
|
+
onClearClick() {
|
|
191
|
+
this.$emit('clear');
|
|
192
|
+
},
|
|
193
|
+
|
|
174
194
|
onIconRightClick() {
|
|
175
195
|
if (this.attributes.disabled) return;
|
|
176
196
|
if (this.allowTogglePassword) this.showPassword = !this.showPassword;
|
|
@@ -183,42 +203,38 @@ export default {
|
|
|
183
203
|
<style lang="scss" scoped>
|
|
184
204
|
@use '@/assets/scss/unnnic' as *;
|
|
185
205
|
|
|
206
|
+
.text-input {
|
|
207
|
+
position: relative;
|
|
208
|
+
}
|
|
209
|
+
|
|
186
210
|
.icon {
|
|
187
|
-
&-left
|
|
188
|
-
|
|
211
|
+
&-left {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: 50%;
|
|
214
|
+
transform: translateY(-50%);
|
|
215
|
+
left: $unnnic-space-4;
|
|
216
|
+
|
|
189
217
|
&:not(.clickable) {
|
|
190
218
|
pointer-events: none;
|
|
191
219
|
}
|
|
192
220
|
}
|
|
193
221
|
|
|
194
|
-
&-
|
|
222
|
+
&-right-container {
|
|
195
223
|
position: absolute;
|
|
196
|
-
top:
|
|
197
|
-
|
|
198
|
-
|
|
224
|
+
top: 50%;
|
|
225
|
+
transform: translateY(-50%);
|
|
226
|
+
right: $unnnic-space-4;
|
|
199
227
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
right: $unnnic-inline-sm - $unnnic-border-width-thinner;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
.text-input {
|
|
207
|
-
position: relative;
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
gap: $unnnic-space-2;
|
|
208
231
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
232
|
+
.icon-clear {
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
}
|
|
235
|
+
.icon-right:not(.clickable) {
|
|
236
|
+
pointer-events: none;
|
|
213
237
|
}
|
|
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;
|
|
222
238
|
}
|
|
223
239
|
}
|
|
224
240
|
</style>
|
|
@@ -40,29 +40,21 @@ describe('Input.vue', () => {
|
|
|
40
40
|
expect(wrapper.exists()).toBe(true);
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
test('renders
|
|
44
|
-
const
|
|
45
|
-
expect(
|
|
46
|
-
expect(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
expect(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
test('renders message correctly', async () => {
|
|
53
|
-
const message = wrapper.find('.unnnic-form__message');
|
|
54
|
-
expect(message.exists()).toBe(true);
|
|
55
|
-
expect(message.text()).toBe('Error message');
|
|
56
|
-
|
|
57
|
-
await wrapper.setProps({ message: null });
|
|
58
|
-
expect(wrapper.find('.unnnic-form__message').exists()).toBe(false);
|
|
43
|
+
test('renders form element correctly', async () => {
|
|
44
|
+
const formElement = wrapper.findComponent('[data-testid="form-element"]');
|
|
45
|
+
expect(formElement.exists()).toBe(true);
|
|
46
|
+
expect(formElement.props('label')).toBe('Sample Label');
|
|
47
|
+
expect(formElement.props('size')).toBe('md');
|
|
48
|
+
expect(formElement.props('message')).toBe('Error message');
|
|
49
|
+
expect(formElement.props('disabled')).toBe(false);
|
|
50
|
+
expect(formElement.props('tooltip')).toBe('');
|
|
51
|
+
expect(formElement.props('error')).toBe(false);
|
|
59
52
|
});
|
|
60
53
|
|
|
61
|
-
test('
|
|
62
|
-
expect(wrapper.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
expect(wrapper.classes()).toContain('sm');
|
|
54
|
+
test('renders maxlength counter correctly', async () => {
|
|
55
|
+
expect(wrapper.text()).not.toContain('0 / 10');
|
|
56
|
+
await wrapper.setProps({ maxlength: 10, showMaxlengthCounter: true });
|
|
57
|
+
expect(wrapper.text()).toContain('0 / 10');
|
|
66
58
|
});
|
|
67
59
|
|
|
68
60
|
test('renders TextInput component', () => {
|
|
@@ -96,18 +88,6 @@ describe('Input.vue', () => {
|
|
|
96
88
|
expect(wrapper.vm.val).toBe('new value');
|
|
97
89
|
});
|
|
98
90
|
|
|
99
|
-
test('hasLabelSlot computed property works correctly', async () => {
|
|
100
|
-
expect(wrapper.vm.hasLabelSlot).toBe(false);
|
|
101
|
-
|
|
102
|
-
wrapper = mount(Input, {
|
|
103
|
-
slots: {
|
|
104
|
-
label: '<span>Custom Label</span>',
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
expect(wrapper.vm.hasLabelSlot).toBe(true);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
91
|
test('correctly mounts with initial modelValue', async () => {
|
|
112
92
|
wrapper = mount(Input, {
|
|
113
93
|
props: {
|
|
@@ -19,7 +19,6 @@ describe('TextInput.vue', () => {
|
|
|
19
19
|
iconLeftClickable: true,
|
|
20
20
|
iconRightClickable: true,
|
|
21
21
|
allowTogglePassword: false,
|
|
22
|
-
hasCloudyColor: false,
|
|
23
22
|
size: 'md',
|
|
24
23
|
},
|
|
25
24
|
global: {
|
|
@@ -74,22 +73,21 @@ describe('TextInput.vue', () => {
|
|
|
74
73
|
|
|
75
74
|
test('computes the correct iconScheme based on various states', async () => {
|
|
76
75
|
await wrapper.setProps({ type: 'error' });
|
|
77
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
76
|
+
expect(wrapper.vm.iconScheme).toBe('fg-base');
|
|
78
77
|
|
|
79
78
|
await wrapper.setProps({ type: 'normal' });
|
|
80
79
|
await wrapper.setData({ isDisabled: true });
|
|
81
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
80
|
+
expect(wrapper.vm.iconScheme).toBe('fg-base');
|
|
82
81
|
|
|
83
82
|
await wrapper.setData({ isDisabled: false });
|
|
84
83
|
await wrapper.setProps({ modelValue: 'text' });
|
|
85
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
84
|
+
expect(wrapper.vm.iconScheme).toBe('fg-base');
|
|
86
85
|
|
|
87
86
|
await wrapper.setData({ isFocused: true });
|
|
88
|
-
expect(wrapper.vm.iconScheme).toBe('
|
|
87
|
+
expect(wrapper.vm.iconScheme).toBe('fg-base');
|
|
89
88
|
|
|
90
|
-
await wrapper.setProps({
|
|
91
|
-
|
|
92
|
-
expect(wrapper.vm.iconScheme).toBe('neutral-cloudy');
|
|
89
|
+
await wrapper.setProps({ disabled: true });
|
|
90
|
+
expect(wrapper.vm.iconScheme).toBe('fg-muted');
|
|
93
91
|
});
|
|
94
92
|
|
|
95
93
|
test('attributes computed property returns combined attributes and props', () => {
|
|
@@ -2,8 +2,21 @@
|
|
|
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
|
-
</
|
|
5
|
+
<section data-v-7f222291="" data-v-d890ad85="" class="unnnic-label unnnic-form__label">
|
|
6
|
+
<p data-v-7f222291="" class="unnnic-label__label">Sample Label</p>
|
|
7
|
+
<!--v-if-->
|
|
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" showclear="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>
|
|
10
|
+
<section data-v-a0d36167="" class="icon-right-container">
|
|
11
|
+
<!--v-if--><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>
|
|
12
|
+
</section>
|
|
13
|
+
</div>
|
|
14
|
+
<section data-v-d890ad85="" class="unnnic-form__hints-container">
|
|
15
|
+
<section data-v-d890ad85="" class="unnnic-form__message-container">
|
|
16
|
+
<p data-v-d890ad85="" class="unnnic-form__message">Error message</p>
|
|
17
|
+
<!--v-if-->
|
|
18
|
+
</section>
|
|
19
|
+
<!--v-if-->
|
|
20
|
+
</section>
|
|
21
|
+
</section>"
|
|
9
22
|
`;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`TextInput.vue > matches the snapshot 1`] = `
|
|
3
|
+
exports[`TextInput.vue > matches the snapshot 1`] = `
|
|
4
|
+
"<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" showclear="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--fg-base unnnic-icon-size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span>
|
|
5
|
+
<section data-v-a0d36167="" class="icon-right-container">
|
|
6
|
+
<!--v-if--><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>
|
|
7
|
+
</section>
|
|
8
|
+
</div>"
|
|
9
|
+
`;
|
|
@@ -1,34 +1,65 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<section class="unnnic-label">
|
|
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>
|
|
3
17
|
</template>
|
|
4
18
|
|
|
5
|
-
<script>
|
|
6
|
-
import { fullySanitize } from '
|
|
7
|
-
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { fullySanitize } from '@/utils/sanitize';
|
|
21
|
+
|
|
22
|
+
import UnnnicToolTip from '../ToolTip/ToolTip.vue';
|
|
23
|
+
import UnnnicIcon from '../Icon.vue';
|
|
24
|
+
|
|
25
|
+
defineOptions({
|
|
8
26
|
name: 'UnnnicLabel',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export interface LabelProps {
|
|
30
|
+
label?: string;
|
|
31
|
+
tooltip?: string;
|
|
32
|
+
useHtmlTooltip?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const props = withDefaults(defineProps<LabelProps>(), {
|
|
36
|
+
label: '',
|
|
37
|
+
tooltip: '',
|
|
38
|
+
useHtmlTooltip: false,
|
|
39
|
+
});
|
|
19
40
|
</script>
|
|
20
41
|
|
|
21
|
-
<style lang="scss">
|
|
42
|
+
<style lang="scss" scoped>
|
|
22
43
|
@use '@/assets/scss/unnnic' as *;
|
|
23
44
|
|
|
45
|
+
* {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
padding: $unnnic-space-0;
|
|
48
|
+
margin: $unnnic-space-0;
|
|
49
|
+
}
|
|
50
|
+
|
|
24
51
|
.unnnic-label {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: $unnnic-space-2;
|
|
55
|
+
color: $unnnic-color-fg-base;
|
|
56
|
+
|
|
25
57
|
&__label {
|
|
26
|
-
font
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
margin: $unnnic-spacing-stack-xs 0;
|
|
58
|
+
font: $unnnic-font-body;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:deep(.unnnic-tooltip) {
|
|
62
|
+
display: flex;
|
|
32
63
|
}
|
|
33
64
|
}
|
|
34
65
|
</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.find('.unnnic-label__label');
|
|
28
28
|
expect(label.html()).toMatchSnapshot();
|
|
29
29
|
});
|
|
30
30
|
});
|