@weni/unnnic-system 3.12.2 → 3.12.3-alpha-teleports.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/dist/components/Alert/Alert.vue.d.ts +3 -3
- package/dist/components/Alert/Version1dot1.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +92 -18
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +184 -36
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Card/AccountCard.vue.d.ts +2 -2
- package/dist/components/Card/Card.vue.d.ts +103 -29
- package/dist/components/Card/CardCompany.vue.d.ts +2 -2
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +93 -19
- package/dist/components/Card/ContentCard.vue.d.ts +1 -1
- package/dist/components/Card/DashCard.vue.d.ts +2 -2
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
- package/dist/components/Card/SimpleCard.vue.d.ts +92 -18
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +92 -18
- package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
- package/dist/components/CardInformation/CardInformation.vue.d.ts +93 -19
- package/dist/components/CardProject/CardProject.vue.d.ts +2 -2
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
- package/dist/components/Carousel/TagCarousel.vue.d.ts +2 -2
- package/dist/components/ChartBar/ChartBar.vue.d.ts +98 -24
- package/dist/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue.d.ts.map +1 -1
- package/dist/components/ChartLine/ChartLine.vue.d.ts +92 -18
- package/dist/components/ChatText/ChatText.vue.d.ts +92 -18
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +92 -18
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +92 -18
- 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 +13 -13
- package/dist/components/Drawer/Drawer.vue.d.ts +37 -207
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/FormElement/FormElement.vue.d.ts +6 -6
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
- package/dist/components/Input/Input.vue.d.ts +12 -12
- package/dist/components/Input/TextInput.vue.d.ts +2 -2
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Label/Label.vue.d.ts +1 -1
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +209 -35
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +18 -18
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
- package/dist/components/MoodRating/MoodRating.vue.d.ts +92 -18
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
- package/dist/components/SelectTime/index.vue.d.ts +3 -3
- package/dist/components/Slider/Slider.vue.d.ts +92 -18
- package/dist/components/Switch/Switch.vue.d.ts +3 -3
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/Tab/Tab.vue.d.ts +92 -18
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +2 -2
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.vue.d.ts +8 -8
- package/dist/components/Toast/Toast.vue.d.ts +1 -1
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/ToolTip/ToolTip.vue.d.ts +92 -18
- package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
- package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +8 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +43 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/index.d.ts +0 -1
- package/dist/components/ui/popover/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/{es-40d7aad6.mjs → es-4aa88754.mjs} +1 -1
- package/dist/{index-56b50ff8.mjs → index-ec96f88a.mjs} +99538 -96746
- package/dist/lib/layer-manager.d.ts +16 -0
- package/dist/lib/layer-manager.d.ts.map +1 -0
- package/dist/{pt-br-e6e2313f.mjs → pt-br-ec1ec185.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +233 -207
- package/dist/unnnic.umd.js +48 -44
- package/package.json +3 -2
- package/src/assets/scss/tailwind.scss +8 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
- package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +2 -1
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +61 -60
- package/src/components/Checkbox/Checkbox.vue +2 -8
- package/src/components/CheckboxGroup/CheckboxGroup.vue +5 -7
- package/src/components/Chip/Chip.vue +1 -1
- package/src/components/Drawer/Drawer.vue +180 -270
- package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
- package/src/components/FormElement/FormElement.vue +87 -96
- package/src/components/Input/Input.vue +2 -2
- package/src/components/ModalDialog/ModalDialog.vue +64 -148
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
- package/src/components/Radio/Radio.vue +6 -12
- package/src/components/Radio/__test__/Radio.spec.js +1 -3
- package/src/components/RadioGroup/RadioGroup.vue +10 -18
- package/src/components/Switch/Switch.vue +3 -10
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
- package/src/components/TemplatePreview/TemplatePreview.vue +25 -28
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
- package/src/components/TemplatePreview/types.d.ts +3 -3
- package/src/components/Toast/Toast.vue +4 -1
- package/src/components/ToolTip/ToolTip.vue +25 -177
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +339 -61
- package/src/components/index.ts +56 -0
- package/src/components/ui/dialog/Dialog.vue +19 -0
- package/src/components/ui/dialog/DialogClose.vue +29 -0
- package/src/components/ui/dialog/DialogContent.vue +140 -0
- package/src/components/ui/dialog/DialogFooter.vue +50 -0
- package/src/components/ui/dialog/DialogHeader.vue +83 -0
- package/src/components/ui/dialog/DialogTitle.vue +38 -0
- package/src/components/ui/dialog/DialogTrigger.vue +16 -0
- package/src/components/ui/dialog/index.ts +7 -0
- package/src/components/ui/drawer/Drawer.vue +27 -0
- package/src/components/ui/drawer/DrawerClose.vue +37 -0
- package/src/components/ui/drawer/DrawerContent.vue +111 -0
- package/src/components/ui/drawer/DrawerDescription.vue +40 -0
- package/src/components/ui/drawer/DrawerFooter.vue +38 -0
- package/src/components/ui/drawer/DrawerHeader.vue +57 -0
- package/src/components/ui/drawer/DrawerOverlay.vue +33 -0
- package/src/components/ui/drawer/DrawerTitle.vue +37 -0
- package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
- package/src/components/ui/drawer/index.ts +10 -0
- package/src/components/ui/popover/PopoverContent.vue +4 -2
- package/src/components/ui/popover/PopoverTrigger.vue +5 -1
- package/src/components/ui/tooltip/Tooltip.vue +21 -0
- package/src/components/ui/tooltip/TooltipContent.vue +74 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +26 -0
- package/src/components/ui/tooltip/index.ts +3 -0
- package/src/lib/layer-manager.ts +92 -0
- package/src/stories/Dialog.stories.js +832 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/DrawerNext.stories.js +611 -0
- package/src/stories/LayerManager.docs.mdx +40 -0
- package/src/stories/LayerManager.stories.js +364 -0
- package/src/stories/ModalDialog.mdx +3 -0
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/TemplatePreview.stories.js +27 -27
- package/src/stories/TemplatePreviewModal.stories.js +31 -31
- package/dist/components/ui/popover/PopoverOption.vue.d.ts +0 -18
- package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +0 -1
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Drawer.vue > Component Rendering > Component Rendering > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</aside>"
|
|
4
|
+
"<div data-v-196de012="" class="unnnic-drawer" data-testid="drawer" open="true">
|
|
5
|
+
<div data-v-196de012="" showoverlay="true" data-testid="drawer-container" size="medium" class="unnnic-drawer__container unnnic-drawer__container--md">
|
|
6
|
+
<header data-v-39d0dfb8="" data-v-196de012="" class="unnnic-drawer__header unnnic-drawer__header">
|
|
7
|
+
<section data-v-196de012="" class="unnnic-drawer__title-container">
|
|
8
|
+
<div data-v-196de012="" class="unnnic-drawer__title" data-testid="drawer-title">Test Title</div>
|
|
9
|
+
<div data-v-196de012="" class="unnnic-drawer__description" data-testid="drawer-description">Test Description</div>
|
|
10
|
+
</section>
|
|
11
|
+
<div data-v-196de012="">
|
|
12
|
+
<unnnic-button-stub data-v-196de012="" size="small" text="" type="tertiary" float="false" iconleft="" iconright="" iconcenter="arrow_forward" iconsfilled="false" disabled="false" loading="false" class="unnnic-drawer__close-icon" data-testid="close-icon"></unnnic-button-stub>
|
|
13
|
+
</div>
|
|
14
|
+
</header>
|
|
15
|
+
<section data-v-196de012="" class="unnnic-drawer__content"></section>
|
|
16
|
+
<div data-v-196de012="" class="unnnic-drawer__footer" data-testid="footer">
|
|
17
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Secondary Action" type="tertiary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="secondary-button"></unnnic-button-stub>
|
|
18
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Primary Action" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="primary-button"></unnnic-button-stub>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>"
|
|
23
22
|
`;
|
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<UnnnicLabel
|
|
7
|
-
v-if="label"
|
|
8
|
-
:label="label"
|
|
2
|
+
<section class="unnnic-form-element" :class="{ 'unnnic-form-element--disabled': disabled }">
|
|
3
|
+
<UnnnicLabel
|
|
4
|
+
v-if="label"
|
|
5
|
+
:label="label"
|
|
9
6
|
:tooltip="tooltip"
|
|
10
7
|
:class="[
|
|
11
8
|
'unnnic-form-element__label',
|
|
12
9
|
{
|
|
13
10
|
'unnnic-form-element__label--fixed': fixedLabel,
|
|
14
11
|
},
|
|
15
|
-
]"
|
|
12
|
+
]"
|
|
16
13
|
/>
|
|
17
14
|
|
|
18
15
|
<slot></slot>
|
|
19
16
|
|
|
20
|
-
<section
|
|
17
|
+
<section
|
|
21
18
|
class="unnnic-form-element__hints-container"
|
|
22
19
|
v-if="message || error || !!$slots.rightMessage"
|
|
23
20
|
>
|
|
24
21
|
<section class="unnnic-form-element__message-container">
|
|
25
|
-
<p
|
|
26
|
-
v-if="message"
|
|
27
|
-
class="unnnic-form-element__message"
|
|
28
|
-
>
|
|
22
|
+
<p v-if="message" class="unnnic-form-element__message">
|
|
29
23
|
{{ fullySanitize(message) }}
|
|
30
24
|
</p>
|
|
31
|
-
<p
|
|
32
|
-
v-if="!!error?.length"
|
|
33
|
-
class="unnnic-form-element__message error"
|
|
34
|
-
>
|
|
25
|
+
<p v-if="!!error?.length" class="unnnic-form-element__message error">
|
|
35
26
|
{{ Array.isArray(error) ? error.join(', ') : error }}
|
|
36
27
|
</p>
|
|
37
28
|
</section>
|
|
@@ -43,104 +34,104 @@
|
|
|
43
34
|
</template>
|
|
44
35
|
|
|
45
36
|
<script lang="js">
|
|
46
|
-
import { fullySanitize } from '../../utils/sanitize';
|
|
47
|
-
import UnnnicLabel from '../Label/Label.vue';
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
props: {
|
|
54
|
-
size: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: 'md',
|
|
57
|
-
validator: (size) => ['md', 'sm'].includes(size),
|
|
37
|
+
import { fullySanitize } from '../../utils/sanitize';
|
|
38
|
+
import UnnnicLabel from '../Label/Label.vue';
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
components: {
|
|
42
|
+
UnnnicLabel,
|
|
58
43
|
},
|
|
44
|
+
props: {
|
|
45
|
+
size: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: 'md',
|
|
48
|
+
validator: (size) => ['md', 'sm'].includes(size),
|
|
49
|
+
},
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
label: { type: String, default: '' },
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
fixedLabel: { type: Boolean, default: false },
|
|
63
54
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
error: {
|
|
56
|
+
type: [Boolean, String],
|
|
57
|
+
default: false,
|
|
58
|
+
},
|
|
68
59
|
|
|
69
|
-
|
|
60
|
+
message: { type: String, default: '' },
|
|
70
61
|
|
|
71
|
-
|
|
62
|
+
disabled: { type: Boolean, default: false },
|
|
72
63
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
64
|
+
tooltip: { type: String, default: '' },
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
fullySanitize,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
79
70
|
</script>
|
|
80
71
|
|
|
81
72
|
<style lang="scss" scoped>
|
|
82
|
-
@use '@/assets/scss/unnnic' as *;
|
|
83
|
-
|
|
84
|
-
* {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.unnnic-form-element {
|
|
91
|
-
&__label {
|
|
92
|
-
font: $unnnic-font-body;
|
|
93
|
-
color: $unnnic-color-neutral-cloudy;
|
|
94
|
-
margin-bottom: $unnnic-space-1;
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
gap: $unnnic-space-2;
|
|
98
|
-
|
|
99
|
-
&--fixed {
|
|
100
|
-
margin-top: -$unnnic-font-size-body-gt - $unnnic-space-2 + $unnnic-space-1;
|
|
101
|
-
}
|
|
73
|
+
@use '@/assets/scss/unnnic' as *;
|
|
74
|
+
|
|
75
|
+
* {
|
|
76
|
+
margin: $unnnic-space-0;
|
|
77
|
+
padding: $unnnic-space-0;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
}
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
margin-
|
|
81
|
+
.unnnic-form-element {
|
|
82
|
+
&__label {
|
|
83
|
+
font: $unnnic-font-body;
|
|
84
|
+
color: $unnnic-color-neutral-cloudy;
|
|
85
|
+
margin-bottom: $unnnic-space-1;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: $unnnic-space-2;
|
|
89
|
+
|
|
90
|
+
&--fixed {
|
|
91
|
+
margin-top: -$unnnic-font-size-body-gt - $unnnic-space-2 + $unnnic-space-1;
|
|
92
|
+
}
|
|
108
93
|
|
|
109
|
-
|
|
110
|
-
|
|
94
|
+
&--fixed {
|
|
95
|
+
margin-bottom: $unnnic-space-0;
|
|
111
96
|
position: absolute;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
97
|
+
padding: $unnnic-space-0 $unnnic-space-1;
|
|
98
|
+
margin-left: $unnnic-space-2;
|
|
99
|
+
|
|
100
|
+
&:after {
|
|
101
|
+
content: ' ';
|
|
102
|
+
position: absolute;
|
|
103
|
+
left: $unnnic-space-0;
|
|
104
|
+
bottom: $unnnic-space-1 - $unnnic-border-width-thinner;
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: $unnnic-border-width-thinner;
|
|
107
|
+
background-color: $unnnic-color-white;
|
|
108
|
+
}
|
|
117
109
|
}
|
|
118
110
|
}
|
|
119
|
-
}
|
|
120
111
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
112
|
+
&__message {
|
|
113
|
+
&.error {
|
|
114
|
+
color: $unnnic-color-fg-critical;
|
|
115
|
+
}
|
|
124
116
|
}
|
|
125
|
-
}
|
|
126
117
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
&__hints-container {
|
|
119
|
+
display: flex;
|
|
120
|
+
justify-content: space-between;
|
|
121
|
+
margin-top: $unnnic-space-1;
|
|
122
|
+
font: $unnnic-font-caption-2;
|
|
123
|
+
color: $unnnic-color-fg-base;
|
|
124
|
+
}
|
|
134
125
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
&__message-container {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
gap: $unnnic-space-1;
|
|
130
|
+
}
|
|
140
131
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
&--disabled .unnnic-form-element__label,
|
|
133
|
+
&--disabled .unnnic-form-element__message {
|
|
134
|
+
user-select: none;
|
|
135
|
+
}
|
|
144
136
|
}
|
|
145
|
-
}
|
|
146
137
|
</style>
|
|
@@ -1,64 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
data-testid="modal-dialog"
|
|
2
|
+
<UnnnicDialog
|
|
3
|
+
:open="modelValue"
|
|
4
|
+
@update:open="$emit('update:modelValue', $event)"
|
|
6
5
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`unnnic-modal-dialog__container--${size}`,
|
|
16
|
-
]"
|
|
17
|
-
data-testid="modal-container"
|
|
6
|
+
<UnnnicDialogContent
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
:size="size === 'sm' ? 'small' : size === 'lg' ? 'large' : 'medium'"
|
|
9
|
+
:parentClass="['unnnic-modal-dialog', $attrs.class]"
|
|
10
|
+
class="unnnic-modal-dialog__container"
|
|
11
|
+
data-testid="modal-dialog"
|
|
12
|
+
@escape-key-down="persistentHandler"
|
|
13
|
+
@pointer-down-outside="persistentHandler"
|
|
18
14
|
>
|
|
19
15
|
<section
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
:class="[
|
|
17
|
+
'unnnic-modal-dialog__container__body',
|
|
18
|
+
{
|
|
19
|
+
'unnnic-modal-dialog__container__body--left-sidebar':
|
|
20
|
+
$slots.leftSidebar,
|
|
21
|
+
},
|
|
22
|
+
]"
|
|
22
23
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
<section
|
|
25
|
+
v-if="$slots.leftSidebar"
|
|
26
|
+
class="unnnic-modal-dialog__container__left-sidebar"
|
|
27
|
+
>
|
|
28
|
+
<slot name="leftSidebar" />
|
|
29
|
+
</section>
|
|
30
|
+
<UnnnicDialogHeader
|
|
28
31
|
v-if="title"
|
|
29
|
-
|
|
32
|
+
:closeButton="showCloseIcon"
|
|
33
|
+
:type="type"
|
|
30
34
|
>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class="unnnic-modal-dialog__container__title-icon"
|
|
36
|
-
:icon="icon || iconsMapper[type]?.icon"
|
|
37
|
-
:scheme="iconScheme || iconsMapper[type]?.scheme"
|
|
38
|
-
size="md"
|
|
39
|
-
/>
|
|
40
|
-
<h1
|
|
41
|
-
class="unnnic-modal-dialog__container__title-text"
|
|
42
|
-
data-testid="title-text"
|
|
43
|
-
>
|
|
44
|
-
{{ title }}
|
|
45
|
-
</h1>
|
|
46
|
-
</section>
|
|
47
|
-
<UnnnicIcon
|
|
48
|
-
v-if="showCloseIcon"
|
|
49
|
-
data-testid="close-icon"
|
|
50
|
-
icon="close"
|
|
51
|
-
clickable
|
|
52
|
-
scheme="neutral-cloudy"
|
|
53
|
-
@click="close()"
|
|
54
|
-
/>
|
|
55
|
-
</header>
|
|
35
|
+
<UnnnicDialogTitle>
|
|
36
|
+
{{ title }}
|
|
37
|
+
</UnnnicDialogTitle>
|
|
38
|
+
</UnnnicDialogHeader>
|
|
56
39
|
<section class="unnnic-modal-dialog__container__content">
|
|
57
40
|
<slot></slot>
|
|
58
41
|
</section>
|
|
59
|
-
|
|
42
|
+
|
|
43
|
+
<UnnnicDialogFooter
|
|
60
44
|
v-if="primaryButtonProps.text"
|
|
61
|
-
data-testid="actions-section"
|
|
62
45
|
:class="[
|
|
63
46
|
'unnnic-modal-dialog__container__actions',
|
|
64
47
|
{
|
|
@@ -66,6 +49,8 @@
|
|
|
66
49
|
showActionsDivider,
|
|
67
50
|
},
|
|
68
51
|
]"
|
|
52
|
+
:divider="showActionsDivider"
|
|
53
|
+
data-testid="actions-section"
|
|
69
54
|
>
|
|
70
55
|
<UnnnicButton
|
|
71
56
|
v-if="!hideSecondaryButton"
|
|
@@ -92,23 +77,32 @@
|
|
|
92
77
|
class="unnnic-modal-dialog__container__actions__primary-button"
|
|
93
78
|
@click.stop="$emit('primaryButtonClick')"
|
|
94
79
|
/>
|
|
80
|
+
</UnnnicDialogFooter>
|
|
95
81
|
</section>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</section>
|
|
82
|
+
</UnnnicDialogContent>
|
|
83
|
+
</UnnnicDialog>
|
|
99
84
|
</template>
|
|
100
85
|
|
|
101
86
|
<script>
|
|
102
|
-
import UnnnicIcon from '../Icon.vue';
|
|
103
87
|
import UnnnicButton from '../Button/Button.vue';
|
|
104
88
|
import UnnnicI18n from '../../mixins/i18n';
|
|
89
|
+
import UnnnicDialog from '../ui/dialog/Dialog.vue';
|
|
90
|
+
import UnnnicDialogContent from '../ui/dialog/DialogContent.vue';
|
|
91
|
+
import UnnnicDialogHeader from '../ui/dialog/DialogHeader.vue';
|
|
92
|
+
import UnnnicDialogTitle from '../ui/dialog/DialogTitle.vue';
|
|
93
|
+
import UnnnicDialogFooter from '../ui/dialog/DialogFooter.vue';
|
|
105
94
|
|
|
106
95
|
export default {
|
|
107
96
|
name: 'UnnnicModalDialog',
|
|
108
97
|
components: {
|
|
109
|
-
UnnnicIcon,
|
|
110
98
|
UnnnicButton,
|
|
99
|
+
UnnnicDialog,
|
|
100
|
+
UnnnicDialogContent,
|
|
101
|
+
UnnnicDialogHeader,
|
|
102
|
+
UnnnicDialogTitle,
|
|
103
|
+
UnnnicDialogFooter,
|
|
111
104
|
},
|
|
105
|
+
inheritAttrs: false,
|
|
112
106
|
mixins: [UnnnicI18n],
|
|
113
107
|
props: {
|
|
114
108
|
modelValue: {
|
|
@@ -177,11 +171,6 @@ export default {
|
|
|
177
171
|
es: 'Cancelar',
|
|
178
172
|
},
|
|
179
173
|
},
|
|
180
|
-
iconsMapper: {
|
|
181
|
-
success: { icon: 'check_circle', scheme: 'aux-green-500' },
|
|
182
|
-
warning: { icon: 'warning', scheme: 'aux-red-500' },
|
|
183
|
-
attention: { icon: 'error', scheme: 'aux-yellow-500' },
|
|
184
|
-
},
|
|
185
174
|
primaryButtonTypeMapper: {
|
|
186
175
|
success: 'primary',
|
|
187
176
|
warning: 'warning',
|
|
@@ -201,91 +190,39 @@ export default {
|
|
|
201
190
|
updateBodyOverflow(isHidden) {
|
|
202
191
|
document.body.style.overflow = isHidden ? 'hidden' : '';
|
|
203
192
|
},
|
|
193
|
+
persistentHandler(event) {
|
|
194
|
+
if (this.persistent) {
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
}
|
|
197
|
+
},
|
|
204
198
|
},
|
|
205
199
|
};
|
|
206
200
|
</script>
|
|
207
201
|
|
|
208
202
|
<style lang="scss" scoped>
|
|
209
203
|
@use '@/assets/scss/unnnic' as *;
|
|
210
|
-
* {
|
|
211
|
-
margin: 0;
|
|
212
|
-
padding: 0;
|
|
213
|
-
box-sizing: border-box;
|
|
214
|
-
}
|
|
215
|
-
.unnnic-modal-dialog {
|
|
216
|
-
width: 100vw;
|
|
217
|
-
height: 100vh;
|
|
218
|
-
position: fixed;
|
|
219
|
-
left: 0;
|
|
220
|
-
top: 0;
|
|
221
|
-
display: flex;
|
|
222
|
-
justify-content: center;
|
|
223
|
-
align-items: center;
|
|
224
|
-
z-index: 9999;
|
|
225
|
-
|
|
226
|
-
&__overlay {
|
|
227
|
-
position: absolute;
|
|
228
|
-
width: 100%;
|
|
229
|
-
height: 100%;
|
|
230
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
204
|
.unnnic-modal-dialog__container {
|
|
235
|
-
display: flex;
|
|
236
|
-
background: $unnnic-color-neutral-white;
|
|
237
|
-
border-radius: $unnnic-spacing-xs;
|
|
238
|
-
box-shadow: $unnnic-shadow-level-near;
|
|
239
|
-
position: fixed;
|
|
240
|
-
max-height: calc(100vh - $unnnic-spacing-giant);
|
|
241
|
-
overflow: hidden;
|
|
242
|
-
|
|
243
|
-
&--sm {
|
|
244
|
-
width: 400px;
|
|
245
|
-
}
|
|
246
|
-
&--md {
|
|
247
|
-
width: 600px;
|
|
248
|
-
}
|
|
249
|
-
&--lg {
|
|
250
|
-
width: 800px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
205
|
&__left-sidebar {
|
|
254
206
|
background-color: $unnnic-color-neutral-black;
|
|
255
207
|
color: $unnnic-color-neutral-white;
|
|
208
|
+
|
|
209
|
+
grid-area: left-sidebar;
|
|
210
|
+
grid-row: span 3;
|
|
256
211
|
}
|
|
257
212
|
|
|
258
213
|
&__body {
|
|
259
214
|
flex: 1;
|
|
260
215
|
display: flex;
|
|
261
216
|
flex-direction: column;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
&__header {
|
|
265
|
-
display: flex;
|
|
266
|
-
justify-content: space-between;
|
|
267
|
-
align-items: center;
|
|
268
|
-
border-bottom: 1px solid $unnnic-color-neutral-soft;
|
|
269
|
-
padding: $unnnic-spacing-md;
|
|
270
|
-
flex-shrink: 0;
|
|
271
|
-
}
|
|
272
217
|
|
|
273
|
-
|
|
274
|
-
display: flex;
|
|
275
|
-
align-items: center;
|
|
276
|
-
gap: $unnnic-spacing-ant;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
&__title-icon {
|
|
280
|
-
font-size: 28px;
|
|
281
|
-
}
|
|
218
|
+
overflow-y: auto;
|
|
282
219
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
220
|
+
&--left-sidebar {
|
|
221
|
+
border-radius: $unnnic-radius-4 0 0 $unnnic-radius-4;
|
|
222
|
+
display: grid;
|
|
223
|
+
grid-template-columns: auto 1fr;
|
|
224
|
+
grid-template-areas: 'left-sidebar content';
|
|
225
|
+
}
|
|
289
226
|
}
|
|
290
227
|
|
|
291
228
|
&__content {
|
|
@@ -309,26 +246,5 @@ export default {
|
|
|
309
246
|
border-radius: $unnnic-border-radius-pill;
|
|
310
247
|
}
|
|
311
248
|
}
|
|
312
|
-
|
|
313
|
-
&__actions {
|
|
314
|
-
display: grid;
|
|
315
|
-
grid-template-columns: 1fr 1fr;
|
|
316
|
-
grid-template-areas: 'secondary-button primary-button';
|
|
317
|
-
gap: $unnnic-spacing-sm;
|
|
318
|
-
padding: $unnnic-spacing-md;
|
|
319
|
-
flex-shrink: 0;
|
|
320
|
-
|
|
321
|
-
&--divider {
|
|
322
|
-
border-top: 1px solid $unnnic-color-neutral-soft;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
&__secondary-button {
|
|
326
|
-
grid-area: secondary-button;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
&__primary-button {
|
|
330
|
-
grid-area: primary-button;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
249
|
}
|
|
334
250
|
</style>
|