@weni/unnnic-system 3.8.2-alpha.1 → 3.9.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 +9 -1
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +116 -17
- 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 +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 +5 -5
- 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 +31 -24
- 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 +7 -7
- package/dist/components/Carousel/TagCarousel.vue.d.ts +6 -6
- 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 +34 -27
- 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 +26 -19
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- 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 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +41 -251
- 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 +28 -51
- 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 +2 -33
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +41 -251
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +25 -85
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +47 -257
- package/dist/components/InputNext/InputNext.vue.d.ts +5 -5
- 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 +34 -199
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +46 -256
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +8 -8
- package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +14 -20
- 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 +6 -8
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +60 -113
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +5 -5
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +28 -21
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts.map +1 -1
- package/dist/components/SelectTime/index.vue.d.ts +25 -85
- 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 +21 -55
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- 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 +3 -3
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/BrandTag.vue.d.ts +1 -1
- package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
- package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
- package/dist/components/Tag/Tag.vue.d.ts +5 -5
- package/dist/components/TextArea/TextArea.vue.d.ts +30 -66
- 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 +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 +1468 -3755
- 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/components/ui/{dialog/Dialog.vue.d.ts → tabs/Tabs.vue.d.ts} +7 -6
- package/dist/components/ui/tabs/Tabs.vue.d.ts.map +1 -0
- package/dist/components/ui/{dialog/DialogTitle.vue.d.ts → tabs/TabsContent.vue.d.ts} +3 -3
- package/dist/components/ui/tabs/TabsContent.vue.d.ts.map +1 -0
- package/dist/components/ui/{dialog/DialogFooter.vue.d.ts → tabs/TabsList.vue.d.ts} +5 -7
- package/dist/components/ui/tabs/TabsList.vue.d.ts.map +1 -0
- package/dist/components/ui/{dialog/DialogHeader.vue.d.ts → tabs/TabsTrigger.vue.d.ts} +5 -11
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/tabs/index.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts.map +1 -0
- package/dist/{es-dc440fef.mjs → es-4b7090cd.mjs} +1 -1
- package/dist/{index-6b5eeee8.mjs → index-65c23d9a.mjs} +15213 -15538
- 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-a2cfd62d.mjs → pt-br-6324858c.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +185 -194
- package/dist/unnnic.umd.js +38 -42
- package/dist/utils/call.d.ts +1 -2
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/assets/scss/tailwind.scss +0 -8
- 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__/Alert.spec.js +45 -2
- 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__/Version1dot1.spec.js +21 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
- package/src/components/Alert/__tests__/__snapshots__/AlertBanner.spec.js.snap +2 -2
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +3 -3
- package/src/components/AvatarIcon/__tests__/__snapshots__/AvatarIcon.spec.js.snap +1 -1
- package/src/components/Button/Button.vue +117 -68
- package/src/components/Button/types.ts +1 -0
- package/src/components/Checkbox/Checkbox.vue +65 -117
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +21 -6
- package/src/components/Collapse/__tests__/__snapshots__/Collapse.spec.js.snap +1 -3
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +3 -3
- package/src/components/FormElement/FormElement.vue +93 -63
- package/src/components/Icon.vue +0 -2
- package/src/components/Input/BaseInput.vue +14 -33
- package/src/components/Input/Input.scss +21 -20
- package/src/components/Input/Input.vue +56 -79
- package/src/components/Input/TextInput.vue +68 -80
- package/src/components/Input/__test__/Input.spec.js +33 -13
- package/src/components/Input/__test__/TextInput.spec.js +8 -6
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +1 -1
- 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/ModalDialog/ModalDialog.vue +146 -60
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
- package/src/components/Radio/Radio.vue +67 -98
- package/src/components/Radio/__test__/Radio.spec.js +20 -14
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +1 -1
- package/src/components/SelectSmart/SelectSmart.vue +3 -4
- package/src/components/Switch/Switch.vue +91 -132
- package/src/components/Switch/__tests__/Switch.spec.js +75 -8
- package/src/components/Switch/__tests__/__snapshots__/Switch.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 +11 -34
- package/src/components/index.ts +27 -48
- package/src/components/ui/tabs/Tabs.vue +19 -0
- package/src/components/ui/tabs/TabsContent.vue +22 -0
- package/src/components/ui/tabs/TabsList.vue +34 -0
- package/src/components/ui/tabs/TabsTrigger.vue +79 -0
- package/src/components/ui/tabs/index.ts +4 -0
- 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 +39 -29
- package/src/stories/Checkbox.stories.js +4 -11
- package/src/stories/Input.stories.js +76 -71
- package/src/stories/Label.stories.js +0 -7
- package/src/stories/ModalDialog.mdx +0 -3
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/Switch.stories.js +5 -10
- package/src/stories/Tab.stories.js +4 -11
- package/src/stories/Tabs.stories.js +125 -0
- package/src/stories/TextArea.stories.js +2 -13
- package/src/types/scheme-colors.d.ts +0 -1
- package/src/utils/call.js +18 -46
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +0 -28
- package/dist/components/CheckboxGroup/CheckboxGroup.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/components/ui/dialog/Dialog.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -40
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/index.d.ts +0 -8
- package/dist/components/ui/dialog/index.d.ts.map +0 -1
- package/src/assets/icons/checkbox-checked-disabled.svg +0 -3
- package/src/assets/icons/checkbox-checked.svg +0 -3
- package/src/assets/icons/checkbox-less-disabled.svg +0 -3
- package/src/assets/icons/checkbox-less.svg +0 -3
- package/src/assets/icons/radio-checked.svg +0 -3
- package/src/assets/icons/switch-checked-disabled.svg +0 -3
- package/src/assets/icons/switch-checked.svg +0 -3
- package/src/components/Alert/SIMPLE_MIGRATION_GUIDE.md +0 -152
- package/src/components/CheckboxGroup/CheckboxGroup.vue +0 -96
- 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/RadioGroup/RadioGroup.vue +0 -142
- package/src/components/Select/SelectOption.vue +0 -65
- package/src/components/Select/__tests__/Select.spec.js +0 -412
- package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
- package/src/components/Select/__tests__/SelectOption.spec.js +0 -174
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -97
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +0 -15
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +0 -25
- package/src/components/Select/index.vue +0 -245
- package/src/components/Toast/Toast.vue +0 -246
- package/src/components/Toast/ToastManager.ts +0 -110
- package/src/components/Toast/__tests__/Toast.spec.js +0 -284
- package/src/components/Toast/__tests__/ToastManager.spec.js +0 -294
- package/src/components/Toast/types.ts +0 -57
- package/src/components/ui/dialog/Dialog.vue +0 -15
- package/src/components/ui/dialog/DialogClose.vue +0 -25
- package/src/components/ui/dialog/DialogContent.vue +0 -114
- package/src/components/ui/dialog/DialogFooter.vue +0 -46
- package/src/components/ui/dialog/DialogHeader.vue +0 -78
- package/src/components/ui/dialog/DialogTitle.vue +0 -34
- package/src/components/ui/dialog/DialogTrigger.vue +0 -12
- package/src/components/ui/dialog/index.ts +0 -7
- package/src/stories/CheckboxGroup.stories.js +0 -105
- package/src/stories/Dialog.stories.js +0 -832
- package/src/stories/RadioGroup.stories.js +0 -144
- package/src/stories/Select.stories.js +0 -158
- package/src/stories/Toast.mdx +0 -123
- package/src/stories/Toast.stories.js +0 -126
|
@@ -1,49 +1,37 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<template>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
3
|
+
<div class="unnnic-checkbox-wrapper">
|
|
4
|
+
<UnnnicIcon
|
|
5
|
+
class="unnnic-checkbox"
|
|
6
|
+
:class="{ disabled }"
|
|
7
|
+
:icon="icon"
|
|
8
|
+
:scheme="color"
|
|
9
|
+
:clickable="!disabled"
|
|
10
|
+
:size="size"
|
|
11
|
+
@click="click"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
v-if="textRight"
|
|
5
16
|
:class="[
|
|
6
|
-
'unnnic-
|
|
7
|
-
|
|
17
|
+
'unnnic-checkbox__label',
|
|
18
|
+
'unnnic-checkbox__label__right',
|
|
19
|
+
`unnnic-checkbox__label__${size}`,
|
|
8
20
|
]"
|
|
21
|
+
data-testid="checkbox-text-right"
|
|
9
22
|
>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{ 'unnnic-checkbox__input--less': modelValue === 'less' },
|
|
14
|
-
]"
|
|
15
|
-
type="checkbox"
|
|
16
|
-
:disabled="disabled"
|
|
17
|
-
:checked="modelValue === 'less' || modelValue"
|
|
18
|
-
@change="click"
|
|
19
|
-
v-bind="pick($attrs, ['id', 'name'])"
|
|
20
|
-
/>
|
|
21
|
-
|
|
22
|
-
<p
|
|
23
|
-
v-if="label || textRight"
|
|
24
|
-
:class="[
|
|
25
|
-
'unnnic-checkbox__label',
|
|
26
|
-
{ 'unnnic-checkbox__label--disabled': disabled },
|
|
27
|
-
]"
|
|
28
|
-
data-testid="checkbox-text-right"
|
|
29
|
-
>
|
|
30
|
-
{{ label || textRight }}
|
|
31
|
-
</p>
|
|
32
|
-
</label>
|
|
33
|
-
|
|
34
|
-
<p
|
|
35
|
-
v-if="helper"
|
|
36
|
-
class="unnnic-checkbox__helper"
|
|
37
|
-
>
|
|
38
|
-
{{ helper }}
|
|
39
|
-
</p>
|
|
40
|
-
</section>
|
|
23
|
+
{{ textRight }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
41
26
|
</template>
|
|
42
27
|
|
|
43
28
|
<script>
|
|
44
|
-
import
|
|
29
|
+
import UnnnicIcon from '../Icon.vue';
|
|
45
30
|
|
|
46
31
|
export default {
|
|
32
|
+
components: {
|
|
33
|
+
UnnnicIcon,
|
|
34
|
+
},
|
|
47
35
|
model: {
|
|
48
36
|
event: 'change',
|
|
49
37
|
},
|
|
@@ -62,16 +50,13 @@ export default {
|
|
|
62
50
|
default: false,
|
|
63
51
|
},
|
|
64
52
|
|
|
65
|
-
|
|
66
|
-
type: String,
|
|
67
|
-
default: '',
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
helper: {
|
|
53
|
+
size: {
|
|
71
54
|
type: String,
|
|
72
|
-
default: '',
|
|
55
|
+
default: 'md',
|
|
56
|
+
validator(value) {
|
|
57
|
+
return ['md', 'sm'].includes(value);
|
|
58
|
+
},
|
|
73
59
|
},
|
|
74
|
-
|
|
75
60
|
textRight: {
|
|
76
61
|
type: String,
|
|
77
62
|
default: '',
|
|
@@ -90,11 +75,25 @@ export default {
|
|
|
90
75
|
|
|
91
76
|
return 'less';
|
|
92
77
|
},
|
|
78
|
+
|
|
79
|
+
icon() {
|
|
80
|
+
return {
|
|
81
|
+
checked: 'checkbox-select',
|
|
82
|
+
default: this.disabled ? 'checkbox-disable' : 'checkbox-default',
|
|
83
|
+
less: 'checkbox-less',
|
|
84
|
+
}[this.valueName];
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
color() {
|
|
88
|
+
if (this.valueName === 'default') {
|
|
89
|
+
return 'neutral-clean';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return 'brand-weni';
|
|
93
|
+
},
|
|
93
94
|
},
|
|
94
95
|
|
|
95
96
|
methods: {
|
|
96
|
-
pick,
|
|
97
|
-
|
|
98
97
|
click() {
|
|
99
98
|
const isChecked = ['checked', 'less'].includes(this.valueName);
|
|
100
99
|
this.$emit('change', !isChecked);
|
|
@@ -107,86 +106,35 @@ export default {
|
|
|
107
106
|
<style lang="scss" scoped>
|
|
108
107
|
@use '@/assets/scss/unnnic' as *;
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.unnnic-checkbox {
|
|
109
|
+
.unnnic-checkbox-wrapper {
|
|
113
110
|
display: flex;
|
|
114
|
-
flex-direction: column;
|
|
115
111
|
align-items: flex-start;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
116
114
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
align-items: center;
|
|
122
|
-
column-gap: $unnnic-space-2;
|
|
123
|
-
|
|
124
|
-
cursor: pointer;
|
|
125
|
-
|
|
126
|
-
&--disabled {
|
|
127
|
-
cursor: not-allowed;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
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;
|
|
162
|
-
|
|
163
|
-
cursor: not-allowed;
|
|
164
|
-
}
|
|
165
|
-
|
|
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
|
-
}
|
|
115
|
+
.unnnic-checkbox {
|
|
116
|
+
&.disabled {
|
|
117
|
+
:deep(.primary) {
|
|
118
|
+
fill: $unnnic-color-neutral-cleanest;
|
|
172
119
|
}
|
|
173
120
|
}
|
|
121
|
+
}
|
|
174
122
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
123
|
+
.unnnic-checkbox__label {
|
|
124
|
+
font-family: $unnnic-font-family-secondary;
|
|
125
|
+
font-weight: $unnnic-font-weight-regular;
|
|
126
|
+
color: $unnnic-color-neutral-darkest;
|
|
179
127
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
128
|
+
&__sm {
|
|
129
|
+
margin-left: $unnnic-inline-nano;
|
|
130
|
+
font-size: $unnnic-font-size-body-md;
|
|
131
|
+
line-height: $unnnic-font-size-body-md + $unnnic-line-height-md;
|
|
183
132
|
}
|
|
184
133
|
|
|
185
|
-
&
|
|
186
|
-
margin:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
color: $unnnic-color-fg-base;
|
|
134
|
+
&__md {
|
|
135
|
+
margin-left: $unnnic-inline-xs;
|
|
136
|
+
font-size: $unnnic-font-size-body-gt;
|
|
137
|
+
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
|
|
190
138
|
}
|
|
191
139
|
}
|
|
192
140
|
</style>
|
|
@@ -24,28 +24,43 @@ describe('Checkbox', () => {
|
|
|
24
24
|
|
|
25
25
|
it('should checkbox emit change events', async () => {
|
|
26
26
|
wrapper = createWrapper();
|
|
27
|
-
const checkbox = wrapper.
|
|
27
|
+
const checkbox = wrapper.findComponent({ name: 'UnnnicIcon' });
|
|
28
28
|
|
|
29
29
|
// click false to true
|
|
30
|
-
await checkbox.trigger('
|
|
30
|
+
await checkbox.trigger('click');
|
|
31
31
|
expect(wrapper.emitted('change')[0][0]).eq(true);
|
|
32
32
|
|
|
33
33
|
// click true to false
|
|
34
34
|
await wrapper.setProps({ modelValue: true });
|
|
35
|
-
await checkbox.trigger('
|
|
35
|
+
await checkbox.trigger('click');
|
|
36
36
|
expect(wrapper.emitted('change')[1][0]).eq(false);
|
|
37
37
|
|
|
38
38
|
// click less to false
|
|
39
39
|
await wrapper.setProps({ modelValue: 'less' });
|
|
40
|
-
expect(wrapper.vm.
|
|
41
|
-
await checkbox.trigger('
|
|
40
|
+
expect(wrapper.vm.icon).eq('checkbox-less');
|
|
41
|
+
await checkbox.trigger('click');
|
|
42
42
|
expect(wrapper.emitted('change')[2][0]).eq(false);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
it('should checkbox disabled', async () => {
|
|
46
46
|
wrapper = createWrapper({ disabled: true });
|
|
47
|
-
const checkbox = wrapper.
|
|
47
|
+
const checkbox = wrapper.findComponent({ name: 'UnnnicIcon' });
|
|
48
48
|
await checkbox.trigger('click');
|
|
49
49
|
expect(wrapper.emitted('change')).eq(undefined);
|
|
50
50
|
});
|
|
51
|
+
|
|
52
|
+
it('should define sizes', async () => {
|
|
53
|
+
wrapper = createWrapper({ size: 'sm', textRight: 'Label' });
|
|
54
|
+
const checkbox = wrapper.findComponent({ name: 'UnnnicIcon' });
|
|
55
|
+
const label = wrapper.find('.unnnic-checkbox__label');
|
|
56
|
+
|
|
57
|
+
// sm
|
|
58
|
+
expect(checkbox.classes()).include('unnnic-icon__size--sm');
|
|
59
|
+
expect(label.classes()).include('unnnic-checkbox__label__sm');
|
|
60
|
+
|
|
61
|
+
// md
|
|
62
|
+
await wrapper.setProps({ size: 'md' });
|
|
63
|
+
expect(checkbox.classes()).include('unnnic-icon__size--md');
|
|
64
|
+
expect(label.classes()).include('unnnic-checkbox__label__md');
|
|
65
|
+
});
|
|
51
66
|
});
|
|
@@ -2,9 +2,7 @@
|
|
|
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<
|
|
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>
|
|
5
|
+
<div data-v-7d0d9fbd="" data-testid="collapse-header" class="unnnic-collapse__header">Test Title<span data-v-26446d8e="" data-v-7d0d9fbd="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--neutral-cloudy unnnic-icon-size--xs unnnic-icon__size--xs" data-testid="material-icon" translate="no">expand_more</span></div>
|
|
8
6
|
<div data-v-7d0d9fbd="" class="unnnic-collapse__body" style="display: none;"></div>
|
|
9
7
|
</div>"
|
|
10
8
|
`;
|
|
@@ -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"
|
|
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>
|
|
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"
|
|
18
|
-
<unnnic-button-stub data-v-196de012="" size="large" text="Primary Action" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false"
|
|
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>
|
|
19
19
|
</footer>
|
|
20
20
|
</section>
|
|
21
21
|
</transition-stub>
|
|
@@ -3,53 +3,66 @@
|
|
|
3
3
|
class="unnnic-form-element"
|
|
4
4
|
:class="{ 'unnnic-form-element--disabled': disabled }"
|
|
5
5
|
>
|
|
6
|
-
<
|
|
6
|
+
<p
|
|
7
7
|
v-if="label"
|
|
8
|
-
:label="label"
|
|
9
|
-
:tooltip="tooltip"
|
|
10
8
|
:class="[
|
|
11
9
|
'unnnic-form-element__label',
|
|
12
10
|
{
|
|
13
11
|
'unnnic-form-element__label--fixed': fixedLabel,
|
|
14
12
|
},
|
|
15
13
|
]"
|
|
16
|
-
|
|
14
|
+
>
|
|
15
|
+
{{ fullySanitize(label) }}
|
|
16
|
+
</p>
|
|
17
17
|
|
|
18
18
|
<slot></slot>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<p
|
|
21
|
+
v-if="shouldShowErrorSection"
|
|
22
|
+
class="unnnic-form-element__error"
|
|
23
|
+
>
|
|
24
|
+
<template v-if="error !== true">
|
|
25
|
+
<UnnnicIcon
|
|
26
|
+
size="sm"
|
|
27
|
+
icon="warning"
|
|
28
|
+
scheme="aux-red-500"
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
{{ fullySanitize(error) }}
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<span
|
|
35
|
+
v-if="!!$slots.rightMessage"
|
|
36
|
+
class="unnnic-form-element__right-message"
|
|
37
|
+
>
|
|
38
|
+
<slot name="rightMessage"></slot>
|
|
39
|
+
</span>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p
|
|
43
|
+
v-if="message || !!$slots.rightMessage"
|
|
44
|
+
class="unnnic-form-element__message"
|
|
23
45
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class="unnnic-form-element__message error"
|
|
34
|
-
>
|
|
35
|
-
{{ Array.isArray(error) ? error.join(', ') : error }}
|
|
36
|
-
</p>
|
|
37
|
-
</section>
|
|
38
|
-
<p v-if="!!$slots.rightMessage">
|
|
39
|
-
<slot name="rightMessage" />
|
|
40
|
-
</p>
|
|
41
|
-
</section>
|
|
46
|
+
{{ fullySanitize(message) }}
|
|
47
|
+
|
|
48
|
+
<span
|
|
49
|
+
v-if="!shouldShowErrorSection && !!$slots.rightMessage"
|
|
50
|
+
class="unnnic-form-element__right-message"
|
|
51
|
+
>
|
|
52
|
+
<slot name="rightMessage"></slot>
|
|
53
|
+
</span>
|
|
54
|
+
</p>
|
|
42
55
|
</section>
|
|
43
56
|
</template>
|
|
44
57
|
|
|
45
|
-
<script
|
|
58
|
+
<script>
|
|
59
|
+
import UnnnicIcon from '../../components/Icon.vue';
|
|
46
60
|
import { fullySanitize } from '../../utils/sanitize';
|
|
47
|
-
import UnnnicLabel from '../Label/Label.vue';
|
|
48
|
-
|
|
49
61
|
export default {
|
|
50
62
|
components: {
|
|
51
|
-
|
|
63
|
+
UnnnicIcon,
|
|
52
64
|
},
|
|
65
|
+
|
|
53
66
|
props: {
|
|
54
67
|
size: {
|
|
55
68
|
type: String,
|
|
@@ -57,20 +70,28 @@ export default {
|
|
|
57
70
|
validator: (size) => ['md', 'sm'].includes(size),
|
|
58
71
|
},
|
|
59
72
|
|
|
60
|
-
label:
|
|
73
|
+
label: String,
|
|
61
74
|
|
|
62
|
-
fixedLabel:
|
|
75
|
+
fixedLabel: Boolean,
|
|
63
76
|
|
|
64
77
|
error: {
|
|
65
78
|
type: [Boolean, String],
|
|
66
79
|
default: false,
|
|
67
80
|
},
|
|
68
81
|
|
|
69
|
-
message:
|
|
82
|
+
message: String,
|
|
70
83
|
|
|
71
|
-
disabled:
|
|
84
|
+
disabled: Boolean,
|
|
85
|
+
},
|
|
72
86
|
|
|
73
|
-
|
|
87
|
+
data() {
|
|
88
|
+
return {};
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
computed: {
|
|
92
|
+
shouldShowErrorSection() {
|
|
93
|
+
return this.error && (this.error !== true || !!this.$slots.rightMessage);
|
|
94
|
+
},
|
|
74
95
|
},
|
|
75
96
|
methods: {
|
|
76
97
|
fullySanitize,
|
|
@@ -81,66 +102,75 @@ export default {
|
|
|
81
102
|
<style lang="scss" scoped>
|
|
82
103
|
@use '@/assets/scss/unnnic' as *;
|
|
83
104
|
|
|
84
|
-
* {
|
|
85
|
-
margin: $unnnic-space-0;
|
|
86
|
-
padding: $unnnic-space-0;
|
|
87
|
-
box-sizing: border-box;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
105
|
.unnnic-form-element {
|
|
91
106
|
&__label {
|
|
92
|
-
|
|
107
|
+
margin: 0;
|
|
108
|
+
margin-bottom: $unnnic-spacing-nano;
|
|
109
|
+
|
|
93
110
|
color: $unnnic-color-neutral-cloudy;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
111
|
+
font-family: $unnnic-font-family-secondary;
|
|
112
|
+
font-weight: $unnnic-font-weight-regular;
|
|
113
|
+
font-size: $unnnic-font-size-body-gt;
|
|
114
|
+
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
|
|
115
|
+
|
|
116
|
+
$label-bottom-spacing: 3px;
|
|
98
117
|
|
|
99
118
|
&--fixed {
|
|
100
|
-
margin-top: -$unnnic-font-size-body-gt - $unnnic-
|
|
119
|
+
margin-top: -$unnnic-font-size-body-gt - $unnnic-line-height-md +
|
|
120
|
+
$label-bottom-spacing;
|
|
101
121
|
}
|
|
102
122
|
|
|
103
123
|
&--fixed {
|
|
104
|
-
margin-bottom:
|
|
124
|
+
margin-bottom: 0;
|
|
105
125
|
position: absolute;
|
|
106
|
-
padding:
|
|
107
|
-
margin-left: $unnnic-
|
|
126
|
+
padding: 0 $unnnic-spacing-nano;
|
|
127
|
+
margin-left: $unnnic-spacing-xs;
|
|
108
128
|
|
|
109
129
|
&:after {
|
|
110
130
|
content: ' ';
|
|
111
131
|
position: absolute;
|
|
112
|
-
left:
|
|
113
|
-
bottom: $
|
|
132
|
+
left: 0;
|
|
133
|
+
bottom: $label-bottom-spacing - $unnnic-border-width-thinner;
|
|
114
134
|
width: 100%;
|
|
115
135
|
height: $unnnic-border-width-thinner;
|
|
116
|
-
background-color: $unnnic-color-white;
|
|
136
|
+
background-color: $unnnic-color-neutral-white;
|
|
117
137
|
}
|
|
118
138
|
}
|
|
119
139
|
}
|
|
120
140
|
|
|
141
|
+
&__error,
|
|
121
142
|
&__message {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
margin: 0;
|
|
144
|
+
margin-top: $unnnic-spacing-stack-nano;
|
|
145
|
+
|
|
146
|
+
color: $unnnic-color-neutral-cloudy;
|
|
147
|
+
font-family: $unnnic-font-family-secondary;
|
|
148
|
+
font-weight: $unnnic-font-weight-regular;
|
|
149
|
+
font-size: $unnnic-font-size-body-md;
|
|
150
|
+
line-height: $unnnic-font-size-body-md + $unnnic-line-height-md;
|
|
125
151
|
}
|
|
126
152
|
|
|
127
|
-
&
|
|
153
|
+
&__message {
|
|
128
154
|
display: flex;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
155
|
+
column-gap: $unnnic-spacing-nano;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&__right-message {
|
|
159
|
+
margin-left: auto;
|
|
133
160
|
}
|
|
134
161
|
|
|
135
|
-
&
|
|
162
|
+
&__error {
|
|
136
163
|
display: flex;
|
|
137
|
-
|
|
138
|
-
|
|
164
|
+
column-gap: $unnnic-spacing-nano;
|
|
165
|
+
align-items: center;
|
|
166
|
+
|
|
167
|
+
color: $unnnic-color-aux-red-500;
|
|
139
168
|
}
|
|
140
169
|
|
|
141
170
|
&--disabled .unnnic-form-element__label,
|
|
142
171
|
&--disabled .unnnic-form-element__message {
|
|
143
172
|
user-select: none;
|
|
173
|
+
color: $unnnic-color-neutral-cleanest;
|
|
144
174
|
}
|
|
145
175
|
}
|
|
146
176
|
</style>
|
package/src/components/Icon.vue
CHANGED
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
v-mask="mask"
|
|
5
5
|
v-bind="attributes"
|
|
6
6
|
:value="fullySanitize(modelValue)"
|
|
7
|
-
:class="
|
|
7
|
+
:class="classes"
|
|
8
8
|
:type="nativeType"
|
|
9
|
-
:readonly="readonly"
|
|
10
9
|
/>
|
|
10
|
+
|
|
11
11
|
<input
|
|
12
12
|
v-else
|
|
13
13
|
v-bind="attributes"
|
|
14
14
|
:value="fullySanitize(modelValue)"
|
|
15
|
-
:class="
|
|
15
|
+
:class="classes"
|
|
16
16
|
:type="nativeType"
|
|
17
|
-
:maxlength="maxlength"
|
|
18
|
-
:readonly="readonly"
|
|
19
17
|
/>
|
|
20
18
|
</template>
|
|
21
19
|
|
|
@@ -51,19 +49,6 @@ export default {
|
|
|
51
49
|
},
|
|
52
50
|
hasIconLeft: Boolean,
|
|
53
51
|
hasIconRight: Boolean,
|
|
54
|
-
hasClearIcon: Boolean,
|
|
55
|
-
maxlength: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: null,
|
|
58
|
-
},
|
|
59
|
-
readonly: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
forceActiveStatus: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: false,
|
|
66
|
-
},
|
|
67
52
|
},
|
|
68
53
|
emits: ['update:modelValue'],
|
|
69
54
|
data() {
|
|
@@ -88,7 +73,6 @@ export default {
|
|
|
88
73
|
{
|
|
89
74
|
'input--has-icon-left': this.hasIconLeft,
|
|
90
75
|
'input--has-icon-right': this.hasIconRight,
|
|
91
|
-
'input--has-clear-icon': this.hasClearIcon,
|
|
92
76
|
},
|
|
93
77
|
];
|
|
94
78
|
},
|
|
@@ -112,30 +96,27 @@ export default {
|
|
|
112
96
|
&.size {
|
|
113
97
|
&-md {
|
|
114
98
|
@include input-md-font;
|
|
115
|
-
|
|
116
|
-
|
|
99
|
+
|
|
100
|
+
padding: ($unnnic-spacing-ant - $unnnic-border-width-thinner)
|
|
101
|
+
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
117
102
|
}
|
|
118
103
|
|
|
119
104
|
&-sm {
|
|
120
105
|
@include input-sm-font;
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
|
|
107
|
+
padding: $unnnic-spacing-xs
|
|
108
|
+
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
123
109
|
}
|
|
124
110
|
}
|
|
125
111
|
|
|
126
112
|
&.input--has-icon-left {
|
|
127
|
-
padding-left: $unnnic-
|
|
113
|
+
padding-left: $unnnic-spacing-sm + $unnnic-icon-size-sm +
|
|
114
|
+
$unnnic-spacing-xs - $unnnic-border-width-thinner;
|
|
128
115
|
}
|
|
129
116
|
|
|
130
117
|
&.input--has-icon-right {
|
|
131
|
-
padding-right: $unnnic-
|
|
132
|
-
|
|
133
|
-
padding-right: $unnnic-space-10 + $unnnic-space-6;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.input--has-clear-icon {
|
|
138
|
-
padding-right: $unnnic-space-10;
|
|
118
|
+
padding-right: $unnnic-spacing-sm + $unnnic-icon-size-sm +
|
|
119
|
+
$unnnic-spacing-xs - $unnnic-border-width-thinner;
|
|
139
120
|
}
|
|
140
121
|
|
|
141
122
|
&.error {
|
|
@@ -145,7 +126,7 @@ export default {
|
|
|
145
126
|
&:-ms-input-placeholder,
|
|
146
127
|
&::-ms-input-placeholder {
|
|
147
128
|
/* Internet Explorer 10-11 */
|
|
148
|
-
color: $unnnic-color-
|
|
129
|
+
color: $unnnic-color-brand-sec;
|
|
149
130
|
}
|
|
150
131
|
}
|
|
151
132
|
</style>
|