@weni/unnnic-system 3.7.1-alpha.1 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -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 +15 -10
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts.map +1 -1
- 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 +1352 -4057
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-0331f100.mjs → es-484b4c46.mjs} +1 -1
- package/dist/{index-5e29f949.mjs → index-dc007393.mjs} +11929 -18885
- 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-cbd34d50.mjs → pt-br-f73c4b3a.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +172 -195
- package/dist/unnnic.umd.js +50 -56
- package/dist/utils/call.d.ts +1 -2
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +2 -3
- 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 +7 -11
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +2 -2
- package/src/components/Button/Button.vue +117 -68
- package/src/components/Button/types.ts +1 -0
- package/src/components/Checkbox/Checkbox.vue +64 -98
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +21 -6
- package/src/components/FormElement/FormElement.vue +93 -63
- package/src/components/Icon.vue +0 -3
- package/src/components/Input/BaseInput.vue +14 -33
- package/src/components/Input/Input.scss +21 -20
- package/src/components/Input/Input.vue +56 -77
- package/src/components/Input/TextInput.vue +68 -80
- package/src/components/Input/__test__/TextInput.spec.js +8 -6
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +5 -14
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/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 +146 -60
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
- package/src/components/ModalUpload/ModalUpload.vue +2 -0
- package/src/components/Radio/Radio.vue +67 -80
- package/src/components/Radio/__test__/Radio.spec.js +20 -14
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +3 -3
- package/src/components/SelectSmart/SelectSmart.vue +3 -4
- package/src/components/Switch/Switch.vue +96 -123
- package/src/components/Switch/__tests__/Switch.spec.js +75 -8
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +6 -5
- 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/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +3 -11
- package/src/components/index.ts +9 -58
- 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/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 +0 -23
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -40
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -25
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -29
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -23
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/index.d.ts +0 -8
- package/dist/components/ui/dialog/index.d.ts.map +0 -1
- package/dist/components/ui/popover/Popover.vue.d.ts +0 -23
- package/dist/components/ui/popover/Popover.vue.d.ts.map +0 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -43
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +0 -1
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -19
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/popover/index.d.ts +0 -5
- package/dist/components/ui/popover/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/components/ui/popover/Popover.vue +0 -19
- package/src/components/ui/popover/PopoverContent.vue +0 -98
- package/src/components/ui/popover/PopoverTrigger.vue +0 -23
- package/src/components/ui/popover/index.ts +0 -4
- package/src/stories/CheckboxGroup.stories.js +0 -105
- package/src/stories/Dialog.stories.js +0 -832
- package/src/stories/Popover.stories.js +0 -306
- 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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import { describe, test, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
3
|
+
import AlertBanner from '@/components/Alert/AlertBanner.vue';
|
|
4
|
+
|
|
5
|
+
describe('AlertBanner.vue', () => {
|
|
6
|
+
let wrapper;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
wrapper = mount(AlertBanner, {
|
|
10
|
+
props: {
|
|
11
|
+
text: 'This is a banner alert',
|
|
12
|
+
type: 'danger',
|
|
13
|
+
showCloseButton: true,
|
|
14
|
+
linkHref: 'https://example.com',
|
|
15
|
+
linkText: 'Learn more',
|
|
16
|
+
linkTarget: '_self',
|
|
17
|
+
onClose: vi.fn(),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
afterEach(() => {
|
|
23
|
+
wrapper.unmount();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('renders correctly', () => {
|
|
27
|
+
expect(wrapper.exists()).toBe(true);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('renders the correct text and link', () => {
|
|
31
|
+
const textElement = wrapper.find('.text');
|
|
32
|
+
const linkElement = wrapper.find('.banner-alert__link');
|
|
33
|
+
|
|
34
|
+
expect(textElement.text()).toBe('This is a banner alert');
|
|
35
|
+
expect(linkElement.text()).toBe('Learn more');
|
|
36
|
+
expect(linkElement.attributes('href')).toBe('https://example.com');
|
|
37
|
+
expect(linkElement.attributes('target')).toBe('_self');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('applies the correct class based on the type', () => {
|
|
41
|
+
expect(wrapper.classes()).toContain('banner-alert--banner-danger');
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('renders the correct icon based on the type', () => {
|
|
45
|
+
const icon = wrapper.findComponent('[data-test="unnnic-icon"]');
|
|
46
|
+
expect(icon.exists()).toBe(true);
|
|
47
|
+
expect(icon.props('icon')).toBe('block');
|
|
48
|
+
expect(icon.props('size')).toBe('sm');
|
|
49
|
+
expect(icon.props('scheme')).toBe('neutral-white');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('does not render the icon when type is not danger, warning, or info', async () => {
|
|
53
|
+
await wrapper.setProps({ type: 'success' });
|
|
54
|
+
const icon = wrapper.findComponent('[data-test="unnnic-icon"]');
|
|
55
|
+
expect(icon.element.style.display).toBe('none');
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('calls emitClose and emits close event when close button is clicked', async () => {
|
|
59
|
+
const closeButton = wrapper.find('.banner-alert__close');
|
|
60
|
+
await closeButton.trigger('click');
|
|
61
|
+
|
|
62
|
+
expect(wrapper.emitted()).toHaveProperty('close');
|
|
63
|
+
expect(wrapper.props().onClose).toHaveBeenCalled();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('does not render close button if showCloseButton is false', async () => {
|
|
67
|
+
await wrapper.setProps({ showCloseButton: false });
|
|
68
|
+
const closeButton = wrapper.find('.banner-alert__close');
|
|
69
|
+
expect(closeButton.element.style.display).toBe('none');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('matches the snapshot', () => {
|
|
73
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('getIconType function returns the correct icon based on type', () => {
|
|
77
|
+
expect(wrapper.vm.getIconType('danger')).toBe('block');
|
|
78
|
+
expect(wrapper.vm.getIconType('info')).toBe('info');
|
|
79
|
+
expect(wrapper.vm.getIconType('')).toBe('info');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test('isShowTextIcon function returns true for danger, warning, and info types', () => {
|
|
83
|
+
expect(wrapper.vm.isShowTextIcon('danger')).toBe(true);
|
|
84
|
+
expect(wrapper.vm.isShowTextIcon('warning')).toBe(true);
|
|
85
|
+
expect(wrapper.vm.isShowTextIcon('info')).toBe(true);
|
|
86
|
+
expect(wrapper.vm.isShowTextIcon('')).toBe(true);
|
|
87
|
+
expect(wrapper.vm.isShowTextIcon('success')).toBe(false);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import { describe, expect, test, vi, beforeEach, afterEach } from 'vitest';
|
|
3
|
+
import AlertCaller from '@/components/Alert/AlertCaller.vue';
|
|
4
|
+
import alert from '@/utils/call';
|
|
5
|
+
|
|
6
|
+
vi.mock('@/utils/call', () => ({
|
|
7
|
+
default: {
|
|
8
|
+
callAlert: vi.fn(),
|
|
9
|
+
},
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
describe('AlertCaller.vue', () => {
|
|
13
|
+
let wrapper;
|
|
14
|
+
|
|
15
|
+
const defaultProps = {
|
|
16
|
+
title: 'Test Title',
|
|
17
|
+
text: 'Test Text',
|
|
18
|
+
icon: 'test-icon',
|
|
19
|
+
enabled: true,
|
|
20
|
+
scheme: 'primary',
|
|
21
|
+
seconds: 5,
|
|
22
|
+
closeText: 'Close',
|
|
23
|
+
position: 'top-right',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
wrapper = mount(AlertCaller, {
|
|
28
|
+
props: defaultProps,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
afterEach(() => {
|
|
33
|
+
wrapper.unmount();
|
|
34
|
+
vi.clearAllMocks();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('renders correctly', () => {
|
|
38
|
+
expect(wrapper.exists()).toBe(true);
|
|
39
|
+
expect(wrapper.find('button').text()).toBe('Launch alert');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('calls callAlert method when button is clicked', async () => {
|
|
43
|
+
const callAlertSpy = vi.spyOn(wrapper.vm, 'callAlert');
|
|
44
|
+
await wrapper.find('button').trigger('click');
|
|
45
|
+
expect(callAlertSpy).toHaveBeenCalledTimes(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('callAlert method invokes alert.callAlert with correct props', async () => {
|
|
49
|
+
await wrapper.find('button').trigger('click');
|
|
50
|
+
expect(alert.callAlert).toHaveBeenCalledWith({
|
|
51
|
+
props: defaultProps,
|
|
52
|
+
seconds: defaultProps.seconds,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test.each([
|
|
57
|
+
['title', 'New Title'],
|
|
58
|
+
['text', 'New Text'],
|
|
59
|
+
['icon', 'new-icon'],
|
|
60
|
+
['enabled', false],
|
|
61
|
+
['scheme', 'secondary'],
|
|
62
|
+
['seconds', 10],
|
|
63
|
+
['closeText', 'Dismiss'],
|
|
64
|
+
['position', 'bottom-left'],
|
|
65
|
+
])('updates %s prop correctly', async (propName, newValue) => {
|
|
66
|
+
await wrapper.setProps({ [propName]: newValue });
|
|
67
|
+
await wrapper.find('button').trigger('click');
|
|
68
|
+
const expectedProps = { ...defaultProps, [propName]: newValue };
|
|
69
|
+
expect(alert.callAlert).toHaveBeenCalledWith({
|
|
70
|
+
props: expectedProps,
|
|
71
|
+
seconds: expectedProps.seconds,
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('passes default values when props are not provided', async () => {
|
|
76
|
+
wrapper = mount(AlertCaller, {
|
|
77
|
+
props: {},
|
|
78
|
+
});
|
|
79
|
+
await wrapper.find('button').trigger('click');
|
|
80
|
+
expect(alert.callAlert).toHaveBeenCalledWith({
|
|
81
|
+
props: {
|
|
82
|
+
title: null,
|
|
83
|
+
text: null,
|
|
84
|
+
icon: null,
|
|
85
|
+
enabled: true,
|
|
86
|
+
scheme: null,
|
|
87
|
+
seconds: 3,
|
|
88
|
+
closeText: null,
|
|
89
|
+
position: 'top-right',
|
|
90
|
+
},
|
|
91
|
+
seconds: 3,
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('matches snapshot', () => {
|
|
96
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -9,9 +9,13 @@ describe('Alert.vue', () => {
|
|
|
9
9
|
let wrapper;
|
|
10
10
|
|
|
11
11
|
const defaultProps = {
|
|
12
|
+
version: '1.0',
|
|
12
13
|
text: 'Test Alert',
|
|
13
14
|
scheme: 'feedback-green',
|
|
14
15
|
onClose: vi.fn(),
|
|
16
|
+
linkHref: 'https://example.com',
|
|
17
|
+
linkTarget: '_blank',
|
|
18
|
+
linkText: 'Learn more',
|
|
15
19
|
type: 'success',
|
|
16
20
|
};
|
|
17
21
|
|
|
@@ -47,6 +51,19 @@ describe('Alert.vue', () => {
|
|
|
47
51
|
expect(wrapper.find('.alert--scheme-aux-red').exists()).toBe(true);
|
|
48
52
|
});
|
|
49
53
|
|
|
54
|
+
test('renders link when linkHref is provided', () => {
|
|
55
|
+
const link = wrapper.find('.alert__link');
|
|
56
|
+
expect(link.exists()).toBe(true);
|
|
57
|
+
expect(link.attributes('href')).toBe('https://example.com');
|
|
58
|
+
expect(link.attributes('target')).toBe('_blank');
|
|
59
|
+
expect(link.text()).toBe('Learn more');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test('does not render link when linkHref is not provided', async () => {
|
|
63
|
+
await wrapper.setProps({ linkHref: '' });
|
|
64
|
+
expect(wrapper.find('.alert__link').exists()).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
|
|
50
67
|
test('emits close event and calls onClose prop when close button is clicked', async () => {
|
|
51
68
|
await wrapper.find('.alert__close').trigger('click');
|
|
52
69
|
expect(wrapper.emitted('close')).toBeTruthy();
|
|
@@ -76,8 +93,12 @@ describe('Alert.vue', () => {
|
|
|
76
93
|
});
|
|
77
94
|
|
|
78
95
|
test.each([
|
|
96
|
+
['version', '1.1'],
|
|
79
97
|
['text', 'New Alert Text'],
|
|
80
98
|
['scheme', 'feedback-red'],
|
|
99
|
+
['linkHref', 'https://newexample.com'],
|
|
100
|
+
['linkTarget', '_self'],
|
|
101
|
+
['linkText', 'Click here'],
|
|
81
102
|
['type', 'error'],
|
|
82
103
|
])('updates %s prop correctly', async (propName, newValue) => {
|
|
83
104
|
await wrapper.setProps({ [propName]: newValue });
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`UnnnicAlert.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</section>
|
|
12
|
-
<!--v-if-->
|
|
13
|
-
</aside>
|
|
14
|
-
</transition-stub>"
|
|
4
|
+
"<div data-v-284427ba="" class="unnnic-alert unnnic-alert-position--top-right"><span data-v-26446d8e="" data-v-284427ba="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--primary unnnic-icon-size--sm unnnic-icon__size--sm" data-testid="material-icon" translate="no" data-test="unnnic-icon">alert-icon</span>
|
|
5
|
+
<div data-v-284427ba="" class="unnnic-alert__content">
|
|
6
|
+
<div data-v-284427ba="" class="unnnic-alert__title">TEST ALERT</div>
|
|
7
|
+
<div data-v-284427ba="" class="unnnic-alert__text">This is an alert message</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div data-v-284427ba="" class="unnnic-alert__close-text unnnic--clickable">CLOSE</div>
|
|
10
|
+
</div>"
|
|
15
11
|
`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Alert.vue > matches snapshot 1`] = `
|
|
4
|
-
"<div data-v-fb94f284="" class="alert-container"
|
|
4
|
+
"<div data-v-fb94f284="" class="alert-container">
|
|
5
5
|
<div data-v-fb94f284="" class="alert alert--scheme-aux-green">
|
|
6
6
|
<div data-v-fb94f284="" class="alert__progress"></div>
|
|
7
|
-
<div data-v-fb94f284="" class="alert__text">Test Alert</div>
|
|
7
|
+
<div data-v-fb94f284="" class="alert__text">Test Alert</div><a data-v-fb94f284="" class="alert__link" href="https://example.com" target="_blank">Learn more</a>
|
|
8
8
|
<div data-v-fb94f284="" class="alert__close">
|
|
9
9
|
<unnnic-icon-stub data-v-fb94f284="" filled="false" icon="close-1" clickable="false" size="sm" scheme="neutral-white"></unnnic-icon-stub>
|
|
10
10
|
</div>
|
|
@@ -6,16 +6,19 @@
|
|
|
6
6
|
:class="[
|
|
7
7
|
'unnnic-button',
|
|
8
8
|
`unnnic-button--size-${size}`,
|
|
9
|
-
`unnnic-button--${
|
|
9
|
+
`unnnic-button--${type}`,
|
|
10
10
|
iconCenter ? `unnnic-button--icon-on-center` : null,
|
|
11
11
|
float ? `unnnic-button--float` : null,
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
14
|
+
<UnnnicIcon
|
|
15
15
|
v-if="loading"
|
|
16
|
+
icon="loading-circle-1"
|
|
16
17
|
:scheme="iconScheme"
|
|
17
18
|
:size="iconSize"
|
|
19
|
+
:filled="iconsFilled"
|
|
18
20
|
:style="{ position: 'absolute' }"
|
|
21
|
+
class="rotation"
|
|
19
22
|
data-testid="icon-loading"
|
|
20
23
|
/>
|
|
21
24
|
|
|
@@ -27,7 +30,6 @@
|
|
|
27
30
|
:filled="iconsFilled"
|
|
28
31
|
:class="{ 'unnnic-button__icon-left': hasText }"
|
|
29
32
|
:style="{ visibility: loading ? 'hidden' : 'visible' }"
|
|
30
|
-
clickable
|
|
31
33
|
data-testid="icon-left"
|
|
32
34
|
/>
|
|
33
35
|
|
|
@@ -38,7 +40,6 @@
|
|
|
38
40
|
:style="{ visibility: loading ? 'hidden' : 'visible' }"
|
|
39
41
|
:size="iconSize"
|
|
40
42
|
:filled="iconsFilled"
|
|
41
|
-
clickable
|
|
42
43
|
data-testid="icon-center"
|
|
43
44
|
/>
|
|
44
45
|
|
|
@@ -59,7 +60,6 @@
|
|
|
59
60
|
:filled="iconsFilled"
|
|
60
61
|
:class="{ 'unnnic-button__icon-right': hasText }"
|
|
61
62
|
:style="{ visibility: loading ? 'hidden' : 'visible' }"
|
|
62
|
-
clickable
|
|
63
63
|
data-testid="icon-right"
|
|
64
64
|
/>
|
|
65
65
|
</button>
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
<script setup lang="ts">
|
|
69
69
|
import { computed, watch, useSlots } from 'vue';
|
|
70
70
|
import UnnnicIcon from '../Icon.vue';
|
|
71
|
-
import UnnnicIconLoading from '../IconLoading/IconLoading.vue';
|
|
72
71
|
import type { ButtonProps, ButtonSize, ButtonType } from './types';
|
|
73
72
|
import type { SchemeColor } from '@/types/scheme-colors';
|
|
74
73
|
|
|
@@ -87,7 +86,6 @@ const props = withDefaults(defineProps<ButtonProps>(), {
|
|
|
87
86
|
iconRight: '',
|
|
88
87
|
iconCenter: '',
|
|
89
88
|
iconsFilled: false,
|
|
90
|
-
next: false,
|
|
91
89
|
disabled: false,
|
|
92
90
|
loading: false,
|
|
93
91
|
});
|
|
@@ -99,8 +97,8 @@ const buttonDisabled = computed(() => {
|
|
|
99
97
|
});
|
|
100
98
|
|
|
101
99
|
const iconSize = computed(() => {
|
|
102
|
-
if (props.size === '
|
|
103
|
-
return '
|
|
100
|
+
if (props.size === 'small') return 'sm';
|
|
101
|
+
return 'md';
|
|
104
102
|
});
|
|
105
103
|
|
|
106
104
|
const hasText = computed(() => {
|
|
@@ -117,11 +115,12 @@ const iconScheme = computed((): SchemeColor => {
|
|
|
117
115
|
primary: 'neutral-white',
|
|
118
116
|
secondary: 'neutral-dark',
|
|
119
117
|
tertiary: 'neutral-dark',
|
|
118
|
+
alternative: 'neutral-white',
|
|
120
119
|
warning: 'neutral-white',
|
|
121
120
|
attention: 'neutral-white',
|
|
122
121
|
};
|
|
123
122
|
|
|
124
|
-
return typeToSchemeMap[
|
|
123
|
+
return typeToSchemeMap[props.type] || 'neutral-white';
|
|
125
124
|
});
|
|
126
125
|
|
|
127
126
|
const isSizePropValid = computed(() => {
|
|
@@ -132,23 +131,16 @@ const isSizePropValid = computed(() => {
|
|
|
132
131
|
);
|
|
133
132
|
});
|
|
134
133
|
|
|
135
|
-
const buttonType = computed(() => {
|
|
136
|
-
return (
|
|
137
|
-
{
|
|
138
|
-
alternative: 'tertiary',
|
|
139
|
-
}[props.type] || props.type
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
134
|
const isTypePropValid = computed(() => {
|
|
144
135
|
const validTypes: ButtonType[] = [
|
|
145
136
|
'primary',
|
|
146
137
|
'secondary',
|
|
147
138
|
'tertiary',
|
|
139
|
+
'alternative',
|
|
148
140
|
'warning',
|
|
149
141
|
'attention',
|
|
150
142
|
];
|
|
151
|
-
return validTypes.includes(
|
|
143
|
+
return validTypes.includes(props.type);
|
|
152
144
|
});
|
|
153
145
|
|
|
154
146
|
const validateProps = () => {
|
|
@@ -162,8 +154,6 @@ const validateProps = () => {
|
|
|
162
154
|
|
|
163
155
|
if (!isTypePropValid.value) {
|
|
164
156
|
errorMessage += ' Invalid type prop.';
|
|
165
|
-
errorMessage +=
|
|
166
|
-
' Please provide one of the following types: primary, secondary, tertiary, warning, attention. Alternative is discontinued and it was forced renamed to tertiary.';
|
|
167
157
|
}
|
|
168
158
|
|
|
169
159
|
throw new Error(errorMessage);
|
|
@@ -201,19 +191,16 @@ watch(
|
|
|
201
191
|
display: inline-flex;
|
|
202
192
|
align-items: center;
|
|
203
193
|
justify-content: center;
|
|
204
|
-
border-radius: $unnnic-radius-
|
|
194
|
+
border-radius: $unnnic-border-radius-sm;
|
|
205
195
|
border: 0;
|
|
206
196
|
outline: none;
|
|
207
197
|
overflow: hidden;
|
|
208
198
|
white-space: nowrap;
|
|
209
|
-
font: $unnnic-font-
|
|
199
|
+
font-weight: $unnnic-font-weight-regular;
|
|
200
|
+
font-family: $unnnic-font-family-secondary;
|
|
210
201
|
cursor: pointer;
|
|
211
202
|
position: relative;
|
|
212
203
|
|
|
213
|
-
transition-property: color, background-color, border-color;
|
|
214
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
215
|
-
transition-duration: 0.15s;
|
|
216
|
-
|
|
217
204
|
&__icon {
|
|
218
205
|
&-left {
|
|
219
206
|
margin-right: $unnnic-inline-nano;
|
|
@@ -224,91 +211,129 @@ watch(
|
|
|
224
211
|
}
|
|
225
212
|
}
|
|
226
213
|
|
|
227
|
-
&--primary,
|
|
228
|
-
&--warning,
|
|
229
|
-
&--attention {
|
|
230
|
-
color: $unnnic-color-fg-inverted;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
&--secondary,
|
|
234
|
-
&--tertiary {
|
|
235
|
-
color: $unnnic-color-fg-emphasized;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
214
|
&--primary {
|
|
239
|
-
background-color: $unnnic-color-
|
|
215
|
+
background-color: $unnnic-color-weni-600;
|
|
216
|
+
color: $unnnic-color-neutral-white;
|
|
240
217
|
|
|
241
218
|
&:hover:enabled {
|
|
242
|
-
background-color: $unnnic-color-
|
|
219
|
+
background-color: $unnnic-color-weni-700;
|
|
243
220
|
}
|
|
244
221
|
|
|
245
222
|
&:active:enabled {
|
|
246
|
-
background-color: $unnnic-color-
|
|
223
|
+
background-color: $unnnic-color-weni-800;
|
|
247
224
|
}
|
|
248
225
|
}
|
|
249
226
|
|
|
250
227
|
&--secondary {
|
|
251
|
-
background-color: $unnnic-color-
|
|
228
|
+
background-color: $unnnic-color-neutral-white;
|
|
229
|
+
color: $unnnic-color-neutral-dark;
|
|
252
230
|
box-shadow: inset 0 0 0 $unnnic-border-width-thinner
|
|
253
|
-
$unnnic-color-
|
|
231
|
+
$unnnic-color-neutral-cleanest;
|
|
254
232
|
|
|
255
233
|
&:hover:enabled {
|
|
256
|
-
background-color: $unnnic-color-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&:active:enabled {
|
|
260
|
-
background-color: $unnnic-color-gray-100;
|
|
234
|
+
background-color: $unnnic-color-neutral-light;
|
|
261
235
|
}
|
|
262
236
|
|
|
263
237
|
&:disabled {
|
|
264
238
|
box-shadow: none;
|
|
265
239
|
}
|
|
240
|
+
|
|
241
|
+
&:active:enabled {
|
|
242
|
+
background-color: $unnnic-color-neutral-soft;
|
|
243
|
+
}
|
|
266
244
|
}
|
|
267
245
|
|
|
268
246
|
&--tertiary {
|
|
269
247
|
background-color: transparent;
|
|
248
|
+
color: $unnnic-color-neutral-dark;
|
|
270
249
|
|
|
271
250
|
&:hover:enabled {
|
|
272
|
-
background-color:
|
|
251
|
+
background-color: $unnnic-color-neutral-light;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&:disabled {
|
|
255
|
+
color: $unnnic-color-neutral-clean;
|
|
256
|
+
cursor: not-allowed;
|
|
273
257
|
}
|
|
274
258
|
|
|
275
259
|
&:active:enabled {
|
|
276
|
-
background-color:
|
|
260
|
+
background-color: $unnnic-color-neutral-soft;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&--alternative {
|
|
265
|
+
background-color: $unnnic-color-weni-50;
|
|
266
|
+
color: $unnnic-color-weni-800;
|
|
267
|
+
|
|
268
|
+
:deep(svg .primary) {
|
|
269
|
+
fill: $unnnic-color-weni-800;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:deep(svg .primary-stroke) {
|
|
273
|
+
stroke: $unnnic-color-weni-800;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&:hover:enabled {
|
|
277
|
+
background-color: $unnnic-color-weni-100;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&:disabled {
|
|
281
|
+
:deep(svg .primary) {
|
|
282
|
+
fill: $unnnic-color-neutral-clean;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:deep(svg .primary-stroke) {
|
|
286
|
+
stroke: $unnnic-color-neutral-clean;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:active:enabled {
|
|
291
|
+
background-color: $unnnic-color-weni-200;
|
|
292
|
+
color: $unnnic-color-weni-900;
|
|
293
|
+
|
|
294
|
+
:deep(svg .primary) {
|
|
295
|
+
fill: $unnnic-color-weni-900;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
:deep(svg .primary-stroke) {
|
|
299
|
+
stroke: $unnnic-color-weni-900;
|
|
300
|
+
}
|
|
277
301
|
}
|
|
278
302
|
}
|
|
279
303
|
|
|
280
304
|
&--warning {
|
|
281
|
-
background-color: $unnnic-color-red-500;
|
|
305
|
+
background-color: $unnnic-color-aux-red-500;
|
|
282
306
|
color: $unnnic-color-neutral-white;
|
|
283
307
|
|
|
284
308
|
&:hover:enabled {
|
|
285
|
-
background-color: $unnnic-color-red-
|
|
309
|
+
background-color: $unnnic-color-aux-red-700;
|
|
286
310
|
}
|
|
287
311
|
|
|
288
312
|
&:active:enabled {
|
|
289
|
-
background-color: $unnnic-color-red-
|
|
313
|
+
background-color: $unnnic-color-aux-red-900;
|
|
290
314
|
}
|
|
291
315
|
}
|
|
292
316
|
|
|
293
317
|
&--attention {
|
|
294
|
-
background-color: $unnnic-color-yellow-500;
|
|
318
|
+
background-color: $unnnic-color-aux-yellow-500;
|
|
319
|
+
color: $unnnic-color-neutral-white;
|
|
295
320
|
|
|
296
321
|
&:hover:enabled {
|
|
297
|
-
background-color: $unnnic-color-yellow-
|
|
322
|
+
background-color: $unnnic-color-aux-yellow-700;
|
|
298
323
|
}
|
|
299
324
|
|
|
300
325
|
&:active:enabled {
|
|
301
|
-
background-color: $unnnic-color-yellow-
|
|
326
|
+
background-color: $unnnic-color-aux-yellow-900;
|
|
302
327
|
}
|
|
303
328
|
}
|
|
304
329
|
|
|
305
330
|
&--primary:disabled,
|
|
306
331
|
&--secondary:disabled,
|
|
307
|
-
&--
|
|
332
|
+
&--alternative:disabled,
|
|
308
333
|
&--warning:disabled,
|
|
309
334
|
&--attention:disabled {
|
|
310
|
-
background-color: $unnnic-color-
|
|
311
|
-
color: $unnnic-color-
|
|
335
|
+
background-color: $unnnic-color-neutral-soft;
|
|
336
|
+
color: $unnnic-color-neutral-clean;
|
|
312
337
|
cursor: not-allowed;
|
|
313
338
|
}
|
|
314
339
|
|
|
@@ -321,12 +346,26 @@ watch(
|
|
|
321
346
|
box-shadow: $unnnic-shadow-level-near;
|
|
322
347
|
}
|
|
323
348
|
|
|
324
|
-
&--size
|
|
325
|
-
|
|
326
|
-
|
|
349
|
+
&--size {
|
|
350
|
+
&-extra-large,
|
|
351
|
+
&-large,
|
|
352
|
+
&-small {
|
|
353
|
+
padding: $unnnic-squish-xs;
|
|
354
|
+
font-size: $unnnic-font-size-body-gt;
|
|
355
|
+
line-height: ($unnnic-font-size-body-gt + $unnnic-line-height-medium);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&-extra-large {
|
|
359
|
+
height: 58px;
|
|
360
|
+
}
|
|
327
361
|
|
|
328
|
-
|
|
329
|
-
|
|
362
|
+
&-large {
|
|
363
|
+
height: 46px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
&-small {
|
|
367
|
+
height: 38px;
|
|
368
|
+
}
|
|
330
369
|
}
|
|
331
370
|
}
|
|
332
371
|
</style>
|
|
@@ -344,19 +383,29 @@ watch(
|
|
|
344
383
|
}
|
|
345
384
|
|
|
346
385
|
&-large {
|
|
347
|
-
height:
|
|
348
|
-
width:
|
|
386
|
+
height: 46px;
|
|
387
|
+
width: 46px;
|
|
349
388
|
}
|
|
350
389
|
|
|
351
390
|
&-large,
|
|
352
391
|
&-extra-large {
|
|
353
392
|
padding: $unnnic-inset-xs;
|
|
393
|
+
|
|
394
|
+
.unnnic-icon {
|
|
395
|
+
width: $unnnic-icon-size-md;
|
|
396
|
+
height: $unnnic-icon-size-md;
|
|
397
|
+
}
|
|
354
398
|
}
|
|
355
399
|
|
|
356
400
|
&-small {
|
|
357
401
|
padding: $unnnic-inset-nano;
|
|
358
|
-
height:
|
|
359
|
-
width:
|
|
402
|
+
height: 38px;
|
|
403
|
+
width: 38px;
|
|
404
|
+
|
|
405
|
+
.unnnic-icon {
|
|
406
|
+
width: $unnnic-icon-size-ant;
|
|
407
|
+
height: $unnnic-icon-size-ant;
|
|
408
|
+
}
|
|
360
409
|
}
|
|
361
410
|
}
|
|
362
411
|
}
|