@weni/unnnic-system 3.12.3-alpha.4 → 3.12.3
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 +10 -0
- 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 +18 -92
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +36 -184
- 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 +29 -103
- package/dist/components/Card/CardCompany.vue.d.ts +2 -2
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +19 -93
- 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 +18 -92
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +18 -92
- package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
- package/dist/components/CardInformation/CardInformation.vue.d.ts +19 -93
- 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 +24 -98
- package/dist/components/ChartLine/ChartLine.vue.d.ts +18 -92
- package/dist/components/ChatText/ChatText.vue.d.ts +18 -92
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +18 -92
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/DataArea/DataArea.vue.d.ts +18 -92
- 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 +15 -94
- package/dist/components/Disclaimer/Disclaimer.vue.d.ts +3 -6
- package/dist/components/Disclaimer/Disclaimer.vue.d.ts.map +1 -1
- package/dist/components/Disclaimer/DisclaimerV2.vue.d.ts +8 -0
- package/dist/components/Disclaimer/DisclaimerV2.vue.d.ts.map +1 -0
- package/dist/components/Disclaimer/types-v2.d.ts +7 -0
- package/dist/components/Disclaimer/types-v2.d.ts.map +1 -0
- package/dist/components/Disclaimer/types.d.ts +3 -6
- package/dist/components/Disclaimer/types.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +207 -37
- 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/ImportCard/ImportCard.vue.d.ts +6 -6
- package/dist/components/Input/BaseInput.vue.d.ts +0 -22
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +14 -93
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +3 -54
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputNext/InputNext.vue.d.ts +4 -4
- 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 +35 -209
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +20 -99
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
- package/dist/components/MoodRating/MoodRating.vue.d.ts +18 -92
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +163 -0
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts +6 -6
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +12 -63
- 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 +4 -55
- package/dist/components/Slider/Slider.vue.d.ts +18 -92
- package/dist/components/Switch/Switch.vue.d.ts +3 -3
- package/dist/components/Tab/Tab.vue.d.ts +18 -92
- 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/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 +18 -92
- 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/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverOption.vue.d.ts +1 -1
- package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
- package/dist/{es-e4e4f53d.mjs → es-c19444c0.mjs} +1 -1
- package/dist/{index-492e2532.mjs → index-93b45359.mjs} +51889 -54730
- package/dist/locales/en.json.d.ts +1 -3
- package/dist/locales/es.json.d.ts +1 -3
- package/dist/locales/pt_br.json.d.ts +1 -3
- package/dist/{pt-br-ac2463c3.mjs → pt-br-23dc9ca6.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +206 -234
- package/dist/unnnic.umd.js +44 -48
- package/package.json +2 -3
- package/src/assets/scss/scheme-colors.scss +223 -223
- package/src/assets/scss/tailwind.scss +0 -8
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Disclaimer/Disclaimer.vue +42 -136
- package/src/components/Disclaimer/DisclaimerV2.vue +171 -0
- package/src/components/Disclaimer/__tests__/Disclaimer.spec.js +45 -70
- package/src/components/Disclaimer/__tests__/DisclaimerV2.spec.js +68 -0
- package/src/components/Disclaimer/types-v2.ts +12 -0
- package/src/components/Disclaimer/types.ts +3 -12
- package/src/components/Drawer/Drawer.vue +269 -190
- package/src/components/Drawer/__tests__/Drawer.spec.js +46 -37
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +19 -18
- package/src/components/Input/BaseInput.vue +2 -21
- package/src/components/Input/Input.scss +3 -2
- package/src/components/Input/Input.vue +1 -19
- package/src/components/Input/TextInput.vue +22 -58
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +1 -5
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -7
- package/src/components/ModalDialog/ModalDialog.vue +148 -64
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +221 -11
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
- package/src/components/MultiSelect/MultiSelect.vue +297 -0
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -3
- package/src/components/Toast/Toast.vue +9 -16
- package/src/components/ToolTip/ToolTip.vue +177 -25
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +61 -339
- package/src/components/index.ts +11 -63
- package/src/components/ui/popover/PopoverContent.vue +2 -19
- package/src/components/ui/popover/PopoverOption.vue +0 -4
- package/src/components/ui/popover/PopoverTrigger.vue +1 -5
- package/src/locales/en.json +1 -3
- package/src/locales/es.json +1 -3
- package/src/locales/pt_br.json +1 -3
- package/src/stories/Disclaimer.stories.js +12 -53
- package/src/stories/DisclaimerV2.stories.js +51 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/ModalDialog.mdx +0 -3
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/MultiSelect.stories.js +46 -142
- package/dist/components/MultiSelect/MultSelectOption.vue.d.ts +0 -17
- package/dist/components/MultiSelect/MultSelectOption.vue.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.vue.d.ts +0 -44
- package/dist/components/MultiSelect/index.vue.d.ts.map +0 -1
- package/dist/components/Select/index.vue.d.ts +0 -44
- package/dist/components/Select/index.vue.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -23750
- package/dist/components/index.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 -21
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -43
- 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/drawer/Drawer.vue.d.ts +0 -35
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +0 -21
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -43
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -23
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -22
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -25
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -8
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -23
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +0 -19
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/index.d.ts +0 -11
- package/dist/components/ui/drawer/index.d.ts.map +0 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +0 -23
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +0 -31
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +0 -19
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/index.d.ts +0 -4
- package/dist/components/ui/tooltip/index.d.ts.map +0 -1
- package/dist/lib/layer-manager.d.ts +0 -16
- package/dist/lib/layer-manager.d.ts.map +0 -1
- package/src/components/MultiSelect/MultSelectOption.vue +0 -49
- package/src/components/MultiSelect/__tests__/MultiSelect.spec.js +0 -556
- package/src/components/MultiSelect/__tests__/MultiSelectOption.spec.js +0 -229
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -87
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +0 -51
- package/src/components/MultiSelect/index.vue +0 -224
- package/src/components/Select/__tests__/Select.spec.js +0 -422
- package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
- package/src/components/Select/__tests__/__snapshots__/Popover.spec.js.snap +0 -8
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -71
- 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/__tests__/__snapshots__/SelectPopover.spec.js.snap +0 -8
- package/src/components/Select/index.vue +0 -297
- package/src/components/ui/dialog/Dialog.vue +0 -19
- package/src/components/ui/dialog/DialogClose.vue +0 -29
- package/src/components/ui/dialog/DialogContent.vue +0 -140
- package/src/components/ui/dialog/DialogFooter.vue +0 -50
- package/src/components/ui/dialog/DialogHeader.vue +0 -83
- package/src/components/ui/dialog/DialogTitle.vue +0 -38
- package/src/components/ui/dialog/DialogTrigger.vue +0 -16
- package/src/components/ui/dialog/index.ts +0 -7
- package/src/components/ui/drawer/Drawer.vue +0 -27
- package/src/components/ui/drawer/DrawerClose.vue +0 -31
- package/src/components/ui/drawer/DrawerContent.vue +0 -111
- package/src/components/ui/drawer/DrawerDescription.vue +0 -40
- package/src/components/ui/drawer/DrawerFooter.vue +0 -38
- package/src/components/ui/drawer/DrawerHeader.vue +0 -57
- package/src/components/ui/drawer/DrawerOverlay.vue +0 -33
- package/src/components/ui/drawer/DrawerTitle.vue +0 -37
- package/src/components/ui/drawer/DrawerTrigger.vue +0 -31
- package/src/components/ui/drawer/index.ts +0 -10
- package/src/components/ui/tooltip/Tooltip.vue +0 -21
- package/src/components/ui/tooltip/TooltipContent.vue +0 -74
- package/src/components/ui/tooltip/TooltipTrigger.vue +0 -26
- package/src/components/ui/tooltip/index.ts +0 -3
- package/src/lib/layer-manager.ts +0 -92
- package/src/stories/Dialog.stories.js +0 -832
- package/src/stories/DrawerNext.stories.js +0 -611
- package/src/stories/LayerManager.docs.mdx +0 -40
- package/src/stories/LayerManager.stories.js +0 -364
- package/src/stories/Select.stories.js +0 -158
|
@@ -1,22 +1,23 @@
|
|
|
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
|
-
</
|
|
4
|
+
"<aside data-v-196de012="" class="unnnic-drawer" data-testid="drawer">
|
|
5
|
+
<section data-v-196de012="" class="unnnic-drawer__overlay" data-testid="overlay"></section>
|
|
6
|
+
<transition-stub data-v-196de012="" name="drawer" appear="true" persisted="false" css="true">
|
|
7
|
+
<section data-v-196de012="" data-testid="drawer-container" class="unnnic-drawer__container unnnic-drawer__container--md">
|
|
8
|
+
<header data-v-196de012="" class="unnnic-drawer__header">
|
|
9
|
+
<section data-v-196de012="" class="unnnic-drawer__title-container">
|
|
10
|
+
<h1 data-v-196de012="" class="unnnic-drawer__title" data-testid="drawer-title">Test Title</h1>
|
|
11
|
+
<p data-v-196de012="" class="unnnic-drawer__description" data-testid="drawer-description">Test Description</p>
|
|
12
|
+
</section>
|
|
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
|
+
</header>
|
|
15
|
+
<section data-v-196de012="" class="unnnic-drawer__content"></section>
|
|
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" 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
|
+
</footer>
|
|
20
|
+
</section>
|
|
21
|
+
</transition-stub>
|
|
22
|
+
</aside>"
|
|
22
23
|
`;
|
|
@@ -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
|
/>
|
|
11
10
|
<input
|
|
12
11
|
v-else
|
|
13
12
|
v-bind="attributes"
|
|
14
13
|
:value="fullySanitize(modelValue)"
|
|
15
|
-
:class="
|
|
14
|
+
:class="classes"
|
|
16
15
|
:type="nativeType"
|
|
17
16
|
:maxlength="maxlength"
|
|
18
|
-
:readonly="readonly"
|
|
19
17
|
/>
|
|
20
18
|
</template>
|
|
21
19
|
|
|
@@ -51,19 +49,10 @@ export default {
|
|
|
51
49
|
},
|
|
52
50
|
hasIconLeft: Boolean,
|
|
53
51
|
hasIconRight: Boolean,
|
|
54
|
-
hasClearIcon: Boolean,
|
|
55
52
|
maxlength: {
|
|
56
53
|
type: Number,
|
|
57
54
|
default: null,
|
|
58
55
|
},
|
|
59
|
-
readonly: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
forceActiveStatus: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: false,
|
|
66
|
-
},
|
|
67
56
|
},
|
|
68
57
|
emits: ['update:modelValue'],
|
|
69
58
|
data() {
|
|
@@ -88,7 +77,6 @@ export default {
|
|
|
88
77
|
{
|
|
89
78
|
'input--has-icon-left': this.hasIconLeft,
|
|
90
79
|
'input--has-icon-right': this.hasIconRight,
|
|
91
|
-
'input--has-clear-icon': this.hasClearIcon,
|
|
92
80
|
},
|
|
93
81
|
];
|
|
94
82
|
},
|
|
@@ -129,13 +117,6 @@ export default {
|
|
|
129
117
|
|
|
130
118
|
&.input--has-icon-right {
|
|
131
119
|
padding-right: $unnnic-space-10;
|
|
132
|
-
&.input--has-clear-icon {
|
|
133
|
-
padding-right: $unnnic-space-10 + $unnnic-space-6;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.input--has-clear-icon {
|
|
138
|
-
padding-right: $unnnic-space-10;
|
|
139
120
|
}
|
|
140
121
|
|
|
141
122
|
&.error {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
v-bind="$attrs"
|
|
14
14
|
v-model="val"
|
|
15
15
|
class="unnnic-form-input"
|
|
16
|
-
:forceActiveStatus="forceActiveStatus"
|
|
17
16
|
:placeholder="placeholder"
|
|
18
17
|
:iconLeft="iconLeft"
|
|
19
18
|
:iconRight="iconRight"
|
|
@@ -26,9 +25,6 @@
|
|
|
26
25
|
:nativeType="nativeType"
|
|
27
26
|
:maxlength="maxlength"
|
|
28
27
|
:disabled="disabled"
|
|
29
|
-
:readonly="readonly"
|
|
30
|
-
:showClear="showClear"
|
|
31
|
-
@clear="$emit('clear')"
|
|
32
28
|
/>
|
|
33
29
|
|
|
34
30
|
<template
|
|
@@ -131,22 +127,8 @@ export default {
|
|
|
131
127
|
type: Boolean,
|
|
132
128
|
default: false,
|
|
133
129
|
},
|
|
134
|
-
readonly: {
|
|
135
|
-
type: Boolean,
|
|
136
|
-
default: false,
|
|
137
|
-
},
|
|
138
|
-
forceActiveStatus: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: false,
|
|
141
|
-
},
|
|
142
|
-
showClear: {
|
|
143
|
-
type: Boolean,
|
|
144
|
-
default: false,
|
|
145
|
-
},
|
|
146
130
|
},
|
|
147
|
-
|
|
148
|
-
emits: ['update:modelValue', 'clear'],
|
|
149
|
-
|
|
131
|
+
emits: ['update:modelValue'],
|
|
150
132
|
data() {
|
|
151
133
|
return {
|
|
152
134
|
val: this.modelValue,
|
|
@@ -12,10 +12,7 @@
|
|
|
12
12
|
class="input-itself"
|
|
13
13
|
:hasIconLeft="!!iconLeft"
|
|
14
14
|
:hasIconRight="!!iconRight || allowTogglePassword"
|
|
15
|
-
:hasClearIcon="showClear"
|
|
16
15
|
:maxlength="maxlength"
|
|
17
|
-
:readonly="readonly"
|
|
18
|
-
:forceActiveStatus="forceActiveStatus"
|
|
19
16
|
@focus="onFocus"
|
|
20
17
|
@blur="onBlur"
|
|
21
18
|
/>
|
|
@@ -30,28 +27,18 @@
|
|
|
30
27
|
@click="onIconLeftClick"
|
|
31
28
|
/>
|
|
32
29
|
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
v-if="iconRightSvg"
|
|
46
|
-
:scheme="iconScheme"
|
|
47
|
-
:icon="iconRightSvg"
|
|
48
|
-
size="ant"
|
|
49
|
-
:clickable="iconRightClickable || allowTogglePassword"
|
|
50
|
-
class="icon-right"
|
|
51
|
-
:class="{ clickable: iconRightClickable || allowTogglePassword }"
|
|
52
|
-
@click="onIconRightClick"
|
|
53
|
-
/>
|
|
54
|
-
</section>
|
|
30
|
+
<UnnnicIcon
|
|
31
|
+
v-if="iconRightSvg"
|
|
32
|
+
:scheme="iconScheme"
|
|
33
|
+
:icon="iconRightSvg"
|
|
34
|
+
size="ant"
|
|
35
|
+
:clickable="iconRightClickable || allowTogglePassword"
|
|
36
|
+
:class="[
|
|
37
|
+
'icon-right',
|
|
38
|
+
{ clickable: iconRightClickable || allowTogglePassword },
|
|
39
|
+
]"
|
|
40
|
+
@click="onIconRightClick"
|
|
41
|
+
/>
|
|
55
42
|
</div>
|
|
56
43
|
</template>
|
|
57
44
|
|
|
@@ -116,20 +103,8 @@ export default {
|
|
|
116
103
|
type: Boolean,
|
|
117
104
|
default: false,
|
|
118
105
|
},
|
|
119
|
-
readonly: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: false,
|
|
122
|
-
},
|
|
123
|
-
forceActiveStatus: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
default: false,
|
|
126
|
-
},
|
|
127
|
-
showClear: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
default: false,
|
|
130
|
-
},
|
|
131
106
|
},
|
|
132
|
-
emits: ['icon-left-click', 'icon-right-click'
|
|
107
|
+
emits: ['icon-left-click', 'icon-right-click'],
|
|
133
108
|
data() {
|
|
134
109
|
return {
|
|
135
110
|
isFocused: false,
|
|
@@ -153,6 +128,7 @@ export default {
|
|
|
153
128
|
if (this.isDisabled) {
|
|
154
129
|
return 'fg-muted';
|
|
155
130
|
}
|
|
131
|
+
|
|
156
132
|
return 'fg-base';
|
|
157
133
|
},
|
|
158
134
|
|
|
@@ -178,10 +154,6 @@ export default {
|
|
|
178
154
|
if (this.iconLeftClickable) this.$emit('icon-left-click');
|
|
179
155
|
},
|
|
180
156
|
|
|
181
|
-
onClearClick() {
|
|
182
|
-
this.$emit('clear');
|
|
183
|
-
},
|
|
184
|
-
|
|
185
157
|
onIconRightClick() {
|
|
186
158
|
if (this.attributes.disabled) return;
|
|
187
159
|
if (this.allowTogglePassword) this.showPassword = !this.showPassword;
|
|
@@ -199,33 +171,25 @@ export default {
|
|
|
199
171
|
}
|
|
200
172
|
|
|
201
173
|
.icon {
|
|
174
|
+
&-left,
|
|
175
|
+
&-right {
|
|
176
|
+
&:not(.clickable) {
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
202
181
|
&-left {
|
|
203
182
|
position: absolute;
|
|
204
183
|
top: 50%;
|
|
205
184
|
transform: translateY(-50%);
|
|
206
185
|
left: $unnnic-space-4;
|
|
207
|
-
|
|
208
|
-
&:not(.clickable) {
|
|
209
|
-
pointer-events: none;
|
|
210
|
-
}
|
|
211
186
|
}
|
|
212
187
|
|
|
213
|
-
&-right
|
|
188
|
+
&-right {
|
|
214
189
|
position: absolute;
|
|
215
190
|
top: 50%;
|
|
216
191
|
transform: translateY(-50%);
|
|
217
192
|
right: $unnnic-space-4;
|
|
218
|
-
|
|
219
|
-
display: flex;
|
|
220
|
-
align-items: center;
|
|
221
|
-
gap: $unnnic-space-2;
|
|
222
|
-
|
|
223
|
-
.icon-clear {
|
|
224
|
-
cursor: pointer;
|
|
225
|
-
}
|
|
226
|
-
.icon-right:not(.clickable) {
|
|
227
|
-
pointer-events: none;
|
|
228
|
-
}
|
|
229
193
|
}
|
|
230
194
|
}
|
|
231
195
|
</style>
|
|
@@ -6,11 +6,7 @@ exports[`Input.vue > matches the snapshot 1`] = `
|
|
|
6
6
|
<p data-v-7f222291="" class="unnnic-label__label">Sample Label</p>
|
|
7
7
|
<!--v-if-->
|
|
8
8
|
</section>
|
|
9
|
-
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-form-input" hascloudycolor="false" mask="####-####"><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-form-input input-itself input size-md normal input--has-icon-left input--has-icon-right unnnic-form-input input-itself" hascloudycolor="false" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true"
|
|
10
|
-
<section data-v-a0d36167="" class="icon-right-container">
|
|
11
|
-
<!--v-if--><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span>
|
|
12
|
-
</section>
|
|
13
|
-
</div>
|
|
9
|
+
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-form-input" hascloudycolor="false" mask="####-####"><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-form-input input-itself input size-md normal input--has-icon-left input--has-icon-right unnnic-form-input input-itself" hascloudycolor="false" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>
|
|
14
10
|
<section data-v-9f8d6c86="" class="unnnic-form-element__hints-container">
|
|
15
11
|
<section data-v-9f8d6c86="" class="unnnic-form-element__message-container">
|
|
16
12
|
<p data-v-9f8d6c86="" class="unnnic-form-element__message">Error message</p>
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`TextInput.vue > matches the snapshot 1`] = `
|
|
4
|
-
"<div data-v-a0d36167="" class="text-input size--md"><input data-v-86533b41="" data-v-a0d36167="" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" allowtogglepassword="false" showclear="false" class="input-itself input size-md normal input--has-icon-left input--has-icon-right input-itself" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span>
|
|
5
|
-
<section data-v-a0d36167="" class="icon-right-container">
|
|
6
|
-
<!--v-if--><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span>
|
|
7
|
-
</section>
|
|
8
|
-
</div>"
|
|
9
|
-
`;
|
|
3
|
+
exports[`TextInput.vue > matches the snapshot 1`] = `"<div data-v-a0d36167="" class="text-input size--md"><input data-v-86533b41="" data-v-a0d36167="" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" allowtogglepassword="false" class="input-itself input size-md normal input--has-icon-left input--has-icon-right input-itself" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>"`;
|
|
@@ -1,47 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<section
|
|
3
|
+
v-if="modelValue"
|
|
4
|
+
class="unnnic-modal-dialog"
|
|
5
|
+
data-testid="modal-dialog"
|
|
5
6
|
>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
<section
|
|
8
|
+
class="unnnic-modal-dialog__overlay"
|
|
9
|
+
data-testid="modal-overlay"
|
|
10
|
+
@click.stop="!persistent && close()"
|
|
11
|
+
/>
|
|
12
|
+
<section
|
|
13
|
+
:class="[
|
|
14
|
+
'unnnic-modal-dialog__container',
|
|
15
|
+
`unnnic-modal-dialog__container--${size}`,
|
|
16
|
+
]"
|
|
17
|
+
data-testid="modal-container"
|
|
14
18
|
>
|
|
15
19
|
<section
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
'unnnic-modal-dialog__container__body--left-sidebar':
|
|
20
|
-
$slots.leftSidebar,
|
|
21
|
-
},
|
|
22
|
-
]"
|
|
20
|
+
v-if="$slots.leftSidebar"
|
|
21
|
+
class="unnnic-modal-dialog__container__left-sidebar"
|
|
23
22
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</section>
|
|
30
|
-
<UnnnicDialogHeader
|
|
23
|
+
<slot name="leftSidebar" />
|
|
24
|
+
</section>
|
|
25
|
+
|
|
26
|
+
<section class="unnnic-modal-dialog__container__body">
|
|
27
|
+
<header
|
|
31
28
|
v-if="title"
|
|
32
|
-
|
|
33
|
-
:type="type"
|
|
29
|
+
class="unnnic-modal-dialog__container__header"
|
|
34
30
|
>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
<section class="unnnic-modal-dialog__container__title-container">
|
|
32
|
+
<UnnnicIcon
|
|
33
|
+
v-if="icon || type"
|
|
34
|
+
data-testid="title-icon"
|
|
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>
|
|
39
56
|
<section class="unnnic-modal-dialog__container__content">
|
|
40
57
|
<slot></slot>
|
|
41
58
|
</section>
|
|
42
|
-
|
|
43
|
-
<UnnnicDialogFooter
|
|
59
|
+
<section
|
|
44
60
|
v-if="primaryButtonProps.text"
|
|
61
|
+
data-testid="actions-section"
|
|
45
62
|
:class="[
|
|
46
63
|
'unnnic-modal-dialog__container__actions',
|
|
47
64
|
{
|
|
@@ -49,8 +66,6 @@
|
|
|
49
66
|
showActionsDivider,
|
|
50
67
|
},
|
|
51
68
|
]"
|
|
52
|
-
:divider="showActionsDivider"
|
|
53
|
-
data-testid="actions-section"
|
|
54
69
|
>
|
|
55
70
|
<UnnnicButton
|
|
56
71
|
v-if="!hideSecondaryButton"
|
|
@@ -77,32 +92,23 @@
|
|
|
77
92
|
class="unnnic-modal-dialog__container__actions__primary-button"
|
|
78
93
|
@click.stop="$emit('primaryButtonClick')"
|
|
79
94
|
/>
|
|
80
|
-
</
|
|
95
|
+
</section>
|
|
81
96
|
</section>
|
|
82
|
-
</
|
|
83
|
-
</
|
|
97
|
+
</section>
|
|
98
|
+
</section>
|
|
84
99
|
</template>
|
|
85
100
|
|
|
86
101
|
<script>
|
|
102
|
+
import UnnnicIcon from '../Icon.vue';
|
|
87
103
|
import UnnnicButton from '../Button/Button.vue';
|
|
88
104
|
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';
|
|
94
105
|
|
|
95
106
|
export default {
|
|
96
107
|
name: 'UnnnicModalDialog',
|
|
97
108
|
components: {
|
|
109
|
+
UnnnicIcon,
|
|
98
110
|
UnnnicButton,
|
|
99
|
-
UnnnicDialog,
|
|
100
|
-
UnnnicDialogContent,
|
|
101
|
-
UnnnicDialogHeader,
|
|
102
|
-
UnnnicDialogTitle,
|
|
103
|
-
UnnnicDialogFooter,
|
|
104
111
|
},
|
|
105
|
-
inheritAttrs: false,
|
|
106
112
|
mixins: [UnnnicI18n],
|
|
107
113
|
props: {
|
|
108
114
|
modelValue: {
|
|
@@ -171,6 +177,11 @@ export default {
|
|
|
171
177
|
es: 'Cancelar',
|
|
172
178
|
},
|
|
173
179
|
},
|
|
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
|
+
},
|
|
174
185
|
primaryButtonTypeMapper: {
|
|
175
186
|
success: 'primary',
|
|
176
187
|
warning: 'warning',
|
|
@@ -190,39 +201,91 @@ export default {
|
|
|
190
201
|
updateBodyOverflow(isHidden) {
|
|
191
202
|
document.body.style.overflow = isHidden ? 'hidden' : '';
|
|
192
203
|
},
|
|
193
|
-
persistentHandler(event) {
|
|
194
|
-
if (this.persistent) {
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
204
|
},
|
|
199
205
|
};
|
|
200
206
|
</script>
|
|
201
207
|
|
|
202
208
|
<style lang="scss" scoped>
|
|
203
209
|
@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
|
+
|
|
204
234
|
.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
|
+
|
|
205
253
|
&__left-sidebar {
|
|
206
254
|
background-color: $unnnic-color-neutral-black;
|
|
207
255
|
color: $unnnic-color-neutral-white;
|
|
208
|
-
|
|
209
|
-
grid-area: left-sidebar;
|
|
210
|
-
grid-row: span 3;
|
|
211
256
|
}
|
|
212
257
|
|
|
213
258
|
&__body {
|
|
214
259
|
flex: 1;
|
|
215
260
|
display: flex;
|
|
216
261
|
flex-direction: column;
|
|
262
|
+
}
|
|
217
263
|
|
|
218
|
-
|
|
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
|
+
}
|
|
219
272
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
273
|
+
&__title-container {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: $unnnic-spacing-ant;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&__title-icon {
|
|
280
|
+
font-size: 28px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&__title-text {
|
|
284
|
+
font-family: $unnnic-font-family-secondary;
|
|
285
|
+
font-size: $unnnic-font-size-title-sm;
|
|
286
|
+
font-weight: $unnnic-font-weight-black;
|
|
287
|
+
line-height: 28px;
|
|
288
|
+
color: $unnnic-color-neutral-darkest;
|
|
226
289
|
}
|
|
227
290
|
|
|
228
291
|
&__content {
|
|
@@ -246,5 +309,26 @@ export default {
|
|
|
246
309
|
border-radius: $unnnic-border-radius-pill;
|
|
247
310
|
}
|
|
248
311
|
}
|
|
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
|
+
}
|
|
249
333
|
}
|
|
250
334
|
</style>
|