@weni/unnnic-system 3.7.1 → 3.8.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +17 -116
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/Version1dot1.vue.d.ts +2 -38
- package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
- package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +3 -3
- package/dist/components/Banner/Banner.vue.d.ts +1 -1
- package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/AccountCard.vue.d.ts +5 -5
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +27 -27
- package/dist/components/Card/CardCompany.vue.d.ts +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 +24 -31
- package/dist/components/CardInformation/CardInformation.vue.d.ts +5 -5
- package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
- package/dist/components/Carousel/Carousel.vue.d.ts +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 +27 -34
- package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
- package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
- package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.vue.d.ts +19 -26
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -0
- package/dist/components/Comment/Comment.vue.d.ts +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
- package/dist/components/DataTable/index.vue.d.ts +1 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +251 -41
- package/dist/components/DatePicker/DatePicker.vue.d.ts +4 -4
- package/dist/components/Drawer/Drawer.vue.d.ts +4 -4
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
- package/dist/components/Flag.vue.d.ts +2 -2
- package/dist/components/FormElement/FormElement.vue.d.ts +51 -28
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/Icon.vue.d.ts.map +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +4 -4
- package/dist/components/Input/BaseInput.vue.d.ts +33 -2
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +251 -41
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +85 -25
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +257 -47
- package/dist/components/InputNext/InputNext.vue.d.ts +5 -5
- package/dist/components/Label/Label.vue.d.ts +9 -15
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +199 -34
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +256 -46
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +8 -8
- package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +20 -14
- 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 +8 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +113 -60
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +5 -5
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +21 -28
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts.map +1 -1
- package/dist/components/SelectTime/index.vue.d.ts +85 -25
- package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -2
- package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +55 -21
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/Tab/Tab.vue.d.ts +13 -2
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +3 -3
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/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 +66 -30
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/Toast/Toast.vue.d.ts +16 -0
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/Toast/ToastManager.d.ts +14 -0
- package/dist/components/Toast/ToastManager.d.ts.map +1 -0
- package/dist/components/Toast/types.d.ts +35 -0
- package/dist/components/Toast/types.d.ts.map +1 -0
- package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +3 -3
- package/dist/components/Tour/TourPopover.vue.d.ts +3 -3
- package/dist/components/UploadArea/UploadArea.vue.d.ts +4 -4
- package/dist/components/index.d.ts +3993 -1340
- package/dist/components/index.d.ts.map +1 -1
- 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 +40 -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/popover/Popover.vue.d.ts +23 -0
- package/dist/components/ui/popover/Popover.vue.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +28 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverFooter.vue.d.ts +18 -0
- package/dist/components/ui/popover/PopoverFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +19 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.d.ts.map +1 -0
- package/dist/{es-484b4c46.mjs → es-4bdcf86e.mjs} +1 -1
- package/dist/{index-dc007393.mjs → index-0d6fa367.mjs} +18908 -11929
- package/dist/locales/en.json.d.ts +2 -1
- package/dist/locales/es.json.d.ts +2 -1
- package/dist/locales/pt_br.json.d.ts +2 -1
- package/dist/{pt-br-f73c4b3a.mjs → pt-br-51af7f2a.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +197 -172
- package/dist/unnnic.umd.js +56 -50
- package/dist/utils/call.d.ts +2 -1
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/assets/icons/checkbox-checked-disabled.svg +3 -0
- package/src/assets/icons/checkbox-checked.svg +3 -0
- package/src/assets/icons/checkbox-less-disabled.svg +3 -0
- package/src/assets/icons/checkbox-less.svg +3 -0
- package/src/assets/icons/radio-checked.svg +3 -0
- package/src/assets/icons/switch-checked-disabled.svg +3 -0
- package/src/assets/icons/switch-checked.svg +3 -0
- package/src/assets/scss/tailwind.scss +8 -0
- package/src/components/Alert/Alert.vue +26 -135
- package/src/components/Alert/SIMPLE_MIGRATION_GUIDE.md +152 -0
- package/src/components/Alert/Version1dot1.vue +0 -36
- package/src/components/Alert/__tests__/Alert.spec.js +2 -45
- package/src/components/Alert/__tests__/Version1dot1.spec.js +0 -21
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +11 -7
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +2 -2
- package/src/components/Button/Button.vue +68 -117
- package/src/components/Button/types.ts +0 -1
- package/src/components/Checkbox/Checkbox.vue +98 -64
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +6 -21
- package/src/components/CheckboxGroup/CheckboxGroup.vue +96 -0
- package/src/components/FormElement/FormElement.vue +63 -93
- package/src/components/Icon.vue +2 -0
- package/src/components/Input/BaseInput.vue +33 -14
- package/src/components/Input/Input.scss +20 -21
- package/src/components/Input/Input.vue +79 -56
- package/src/components/Input/TextInput.vue +80 -68
- package/src/components/Input/__test__/Input.spec.js +13 -33
- package/src/components/Input/__test__/TextInput.spec.js +6 -8
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +14 -5
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/Label.vue +52 -21
- package/src/components/Label/__tests__/Label.spec.js +1 -1
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +60 -146
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
- package/src/components/Popover/__tests__/Popover.spec.js +147 -0
- package/src/components/Popover/__tests__/__snapshots__/Popover.spec.js.snap +8 -0
- package/src/components/Popover/index.vue +146 -0
- package/src/components/Radio/Radio.vue +80 -67
- package/src/components/Radio/__test__/Radio.spec.js +14 -20
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +3 -3
- package/src/components/RadioGroup/RadioGroup.vue +142 -0
- package/src/components/Select/SelectOption.vue +65 -0
- package/src/components/Select/__tests__/Select.spec.js +412 -0
- package/src/components/Select/__tests__/SelectItem.spec.js +330 -0
- package/src/components/Select/__tests__/SelectOption.spec.js +174 -0
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +97 -0
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +15 -0
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +25 -0
- package/src/components/Select/index.vue +245 -0
- package/src/components/SelectSmart/SelectSmart.vue +4 -3
- package/src/components/Switch/Switch.vue +123 -96
- package/src/components/Switch/__tests__/Switch.spec.js +8 -75
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +5 -6
- package/src/components/Tab/Tab.vue +37 -23
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -1
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
- package/src/components/TextArea/TextArea.vue +34 -11
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +11 -3
- package/src/components/Toast/Toast.vue +246 -0
- package/src/components/Toast/ToastManager.ts +110 -0
- package/src/components/Toast/__tests__/Toast.spec.js +284 -0
- package/src/components/Toast/__tests__/ToastManager.spec.js +294 -0
- package/src/components/Toast/types.ts +57 -0
- package/src/components/index.ts +61 -9
- package/src/components/ui/dialog/Dialog.vue +15 -0
- package/src/components/ui/dialog/DialogClose.vue +25 -0
- package/src/components/ui/dialog/DialogContent.vue +114 -0
- package/src/components/ui/dialog/DialogFooter.vue +46 -0
- package/src/components/ui/dialog/DialogHeader.vue +78 -0
- package/src/components/ui/dialog/DialogTitle.vue +34 -0
- package/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/components/ui/dialog/index.ts +7 -0
- package/src/components/ui/popover/Popover.vue +19 -0
- package/src/components/ui/popover/PopoverContent.vue +109 -0
- package/src/components/ui/popover/PopoverFooter.vue +32 -0
- package/src/components/ui/popover/PopoverTrigger.vue +23 -0
- package/src/components/ui/popover/index.ts +5 -0
- package/src/locales/en.json +2 -1
- package/src/locales/es.json +2 -1
- package/src/locales/pt_br.json +2 -1
- package/src/stories/Alert.stories.js +6 -67
- package/src/stories/Button.stories.js +29 -39
- package/src/stories/Checkbox.stories.js +11 -4
- package/src/stories/CheckboxGroup.stories.js +105 -0
- package/src/stories/Dialog.stories.js +832 -0
- package/src/stories/Input.stories.js +71 -76
- package/src/stories/Label.stories.js +7 -0
- package/src/stories/ModalDialog.mdx +3 -0
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/Popover.stories.js +396 -0
- package/src/stories/RadioGroup.stories.js +144 -0
- package/src/stories/Select.stories.js +158 -0
- package/src/stories/Switch.stories.js +10 -5
- package/src/stories/Tab.stories.js +11 -4
- package/src/stories/TextArea.stories.js +13 -2
- package/src/stories/Toast.mdx +123 -0
- package/src/stories/Toast.stories.js +126 -0
- package/src/types/scheme-colors.d.ts +1 -0
- package/src/utils/call.js +46 -18
- package/src/components/Alert/AlertBanner.vue +0 -182
- package/src/components/Alert/AlertCaller.vue +0 -49
- package/src/components/Alert/__tests__/AlertBanner.spec.js +0 -89
- package/src/components/Alert/__tests__/AlertCaller.spec.js +0 -98
|
@@ -7,14 +7,25 @@ export default {
|
|
|
7
7
|
component: unnnicInput,
|
|
8
8
|
argTypes: {
|
|
9
9
|
label: { control: { type: 'text' } },
|
|
10
|
-
size: {
|
|
11
|
-
|
|
10
|
+
size: {
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['md', 'sm'],
|
|
13
|
+
defaultValue: {
|
|
14
|
+
summary: 'md',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
type: {
|
|
18
|
+
control: { type: 'select' },
|
|
19
|
+
options: ['normal', 'error'],
|
|
20
|
+
defaultValue: {
|
|
21
|
+
summary: 'normal',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
12
24
|
nativeType: { control: { type: 'select' }, options: ['text', 'password'] },
|
|
13
25
|
placeholder: { control: { type: 'text' } },
|
|
14
26
|
iconLeft: { control: { type: 'select' }, options: iconList },
|
|
15
27
|
iconRight: { control: { type: 'select' }, options: iconList },
|
|
16
28
|
allowTogglePassword: { control: { type: 'boolean' } },
|
|
17
|
-
hasCloudyColor: { control: { type: 'select' }, options: [true, false] },
|
|
18
29
|
},
|
|
19
30
|
render: (args) => ({
|
|
20
31
|
components: {
|
|
@@ -35,106 +46,72 @@ export default {
|
|
|
35
46
|
},
|
|
36
47
|
},
|
|
37
48
|
template: `
|
|
38
|
-
<unnnic-
|
|
39
|
-
<unnnic-input v-model="value" @icon-right-click="click" v-bind="args" />
|
|
40
|
-
</unnnic-form-element>
|
|
49
|
+
<unnnic-input v-model="value" @icon-right-click="click" v-bind="args" />
|
|
41
50
|
`,
|
|
42
51
|
}),
|
|
43
52
|
};
|
|
44
53
|
|
|
45
|
-
const TemplateError = (args, { argTypes }) => ({
|
|
46
|
-
props: Object.keys(argTypes),
|
|
47
|
-
|
|
48
|
-
components: {
|
|
49
|
-
unnnicFormElement,
|
|
50
|
-
unnnicInput,
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
setup() {
|
|
54
|
-
return { args };
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
data() {
|
|
58
|
-
return {
|
|
59
|
-
value: '',
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
template: `
|
|
64
|
-
<unnnic-form-element label="Label" error="Error text">
|
|
65
|
-
<unnnic-input v-model="value" v-bind="args"/>
|
|
66
|
-
</unnnic-form-element>
|
|
67
|
-
`,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const TemplateDisabled = (args, { argTypes }) => ({
|
|
71
|
-
props: Object.keys(argTypes),
|
|
72
|
-
|
|
73
|
-
components: {
|
|
74
|
-
unnnicFormElement,
|
|
75
|
-
unnnicInput,
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
setup() {
|
|
79
|
-
return { args };
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
data() {
|
|
83
|
-
return {
|
|
84
|
-
value: '',
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
template: `
|
|
89
|
-
<unnnic-form-element label="Label" message="Helper text" disabled>
|
|
90
|
-
<unnnic-input v-model="value" v-bind="args"/>
|
|
91
|
-
</unnnic-form-element>
|
|
92
|
-
`,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
54
|
export const Normal = {
|
|
96
55
|
args: {
|
|
97
|
-
|
|
56
|
+
label: 'Label',
|
|
98
57
|
placeholder: 'Placeholder',
|
|
99
58
|
},
|
|
100
59
|
};
|
|
101
60
|
|
|
102
61
|
export const NormalSm = {
|
|
103
62
|
args: {
|
|
63
|
+
label: 'Label',
|
|
104
64
|
size: 'sm',
|
|
105
|
-
type: 'normal',
|
|
106
65
|
placeholder: 'Placeholder',
|
|
107
66
|
},
|
|
108
67
|
};
|
|
109
68
|
|
|
110
|
-
export const Error =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
69
|
+
export const Error = {
|
|
70
|
+
args: {
|
|
71
|
+
label: 'Label',
|
|
72
|
+
placeholder: 'Placeholder',
|
|
73
|
+
errors: 'Error text',
|
|
74
|
+
},
|
|
114
75
|
};
|
|
115
76
|
|
|
116
|
-
export const ErrorSm =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
77
|
+
export const ErrorSm = {
|
|
78
|
+
args: {
|
|
79
|
+
label: 'Label',
|
|
80
|
+
size: 'sm',
|
|
81
|
+
errors: 'Error text',
|
|
82
|
+
placeholder: 'Placeholder',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const Disabled = {
|
|
87
|
+
args: {
|
|
88
|
+
label: 'Label',
|
|
89
|
+
disabled: true,
|
|
90
|
+
placeholder: 'Placeholder',
|
|
91
|
+
},
|
|
121
92
|
};
|
|
122
93
|
|
|
123
|
-
export const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
94
|
+
export const DisabledSm = {
|
|
95
|
+
args: {
|
|
96
|
+
label: 'Label',
|
|
97
|
+
size: 'sm',
|
|
98
|
+
disabled: true,
|
|
99
|
+
placeholder: 'Placeholder',
|
|
100
|
+
},
|
|
127
101
|
};
|
|
128
102
|
|
|
129
|
-
export const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
103
|
+
export const DisabledError = {
|
|
104
|
+
args: {
|
|
105
|
+
label: 'Label',
|
|
106
|
+
disabled: true,
|
|
107
|
+
errors: 'Error text',
|
|
108
|
+
placeholder: 'Placeholder',
|
|
109
|
+
},
|
|
134
110
|
};
|
|
135
111
|
|
|
136
112
|
export const Password = {
|
|
137
113
|
args: {
|
|
114
|
+
label: 'Label',
|
|
138
115
|
placeholder: 'Password',
|
|
139
116
|
nativeType: 'password',
|
|
140
117
|
allowTogglePassword: true,
|
|
@@ -143,6 +120,7 @@ export const Password = {
|
|
|
143
120
|
|
|
144
121
|
export const IconLeftAndRight = {
|
|
145
122
|
args: {
|
|
123
|
+
label: 'Label',
|
|
146
124
|
placeholder: 'Text',
|
|
147
125
|
iconLeft: 'email',
|
|
148
126
|
iconRight: 'search',
|
|
@@ -157,3 +135,20 @@ export const Mask = {
|
|
|
157
135
|
mask: ['###.###.###-##', '##.###.###/####-##'],
|
|
158
136
|
},
|
|
159
137
|
};
|
|
138
|
+
|
|
139
|
+
export const LimitMaxLength = {
|
|
140
|
+
args: {
|
|
141
|
+
label: 'Label',
|
|
142
|
+
placeholder: 'Text',
|
|
143
|
+
maxlength: 10,
|
|
144
|
+
showMaxlengthCounter: true,
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const WithTooltip = {
|
|
149
|
+
args: {
|
|
150
|
+
label: 'Label',
|
|
151
|
+
placeholder: 'Text',
|
|
152
|
+
tooltip: 'Tooltip',
|
|
153
|
+
},
|
|
154
|
+
};
|
|
@@ -6,6 +6,9 @@ import * as ModalDialogStories from './ModalDialog.stories';
|
|
|
6
6
|
|
|
7
7
|
# ModalDialog
|
|
8
8
|
|
|
9
|
+
> **⚠️ DEPRECATED**: This component has been deprecated in favor of the new `Dialog` component. Please use `UnnnicDialog`
|
|
10
|
+
instead for new implementations. See the [Dialog documentation](?path=/docs/feedback-dialog--docs) for more information.
|
|
11
|
+
|
|
9
12
|
The ModalDialog was designed to inform the user about a specific task, request information, or involve other tasks.
|
|
10
13
|
|
|
11
14
|
<Source
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Popover,
|
|
3
|
+
PopoverContent,
|
|
4
|
+
PopoverFooter,
|
|
5
|
+
PopoverTrigger,
|
|
6
|
+
} from '../components/ui/popover';
|
|
7
|
+
import UnnnicButton from '../components/Button/Button.vue';
|
|
8
|
+
import UnnnicInput from '../components/Input/Input.vue';
|
|
9
|
+
import UnnnicLabel from '../components/Label/Label.vue';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'Misc/Popover',
|
|
13
|
+
component: Popover,
|
|
14
|
+
tags: ['autodocs'],
|
|
15
|
+
parameters: {
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
component: `A popover component that displays rich content in a portal, floating on top of other content.
|
|
19
|
+
<br/>
|
|
20
|
+
It supports three sizes (small, medium, large).
|
|
21
|
+
<br/>
|
|
22
|
+
API reference: https://www.reka-ui.com/docs/components/popover
|
|
23
|
+
`,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
size: {
|
|
29
|
+
control: { type: 'select' },
|
|
30
|
+
options: ['small', 'medium', 'large'],
|
|
31
|
+
description: 'The size of the popover',
|
|
32
|
+
},
|
|
33
|
+
side: {
|
|
34
|
+
control: { type: 'select' },
|
|
35
|
+
options: ['top', 'right', 'bottom', 'left'],
|
|
36
|
+
description: 'The preferred side of the trigger to render against',
|
|
37
|
+
},
|
|
38
|
+
align: {
|
|
39
|
+
control: { type: 'select' },
|
|
40
|
+
options: ['start', 'center', 'end'],
|
|
41
|
+
description: 'The preferred alignment against the trigger',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
size: 'medium',
|
|
46
|
+
side: 'bottom',
|
|
47
|
+
align: 'center',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Default = {
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
description: {
|
|
55
|
+
story: 'A simple popover with some content inside.',
|
|
56
|
+
},
|
|
57
|
+
source: {
|
|
58
|
+
code: `
|
|
59
|
+
<UnnnicPopover>
|
|
60
|
+
<UnnnicPopoverTrigger>
|
|
61
|
+
<UnnnicButton text="Open Popover" />
|
|
62
|
+
</UnnnicPopoverTrigger>
|
|
63
|
+
<UnnnicPopoverContent v-bind="args">
|
|
64
|
+
<p style="margin: 0;">This is a simple popover with some content inside.</p>
|
|
65
|
+
</UnnnicPopoverContent>
|
|
66
|
+
</UnnnicPopover>
|
|
67
|
+
`,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
render: (args) => ({
|
|
72
|
+
components: { Popover, PopoverContent, PopoverTrigger, UnnnicButton },
|
|
73
|
+
setup() {
|
|
74
|
+
return { args };
|
|
75
|
+
},
|
|
76
|
+
template: `
|
|
77
|
+
<div style="display: flex; justify-content: center; align-items: center; min-height: 300px;">
|
|
78
|
+
<Popover>
|
|
79
|
+
<PopoverTrigger>
|
|
80
|
+
<UnnnicButton text="Open Popover" />
|
|
81
|
+
</PopoverTrigger>
|
|
82
|
+
<PopoverContent v-bind="args">
|
|
83
|
+
<p style="margin: 0;">This is a simple popover with some content inside.</p>
|
|
84
|
+
</PopoverContent>
|
|
85
|
+
</Popover>
|
|
86
|
+
</div>
|
|
87
|
+
`,
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const WithFooter = {
|
|
92
|
+
parameters: {
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
story:
|
|
96
|
+
'Popover with action buttons in the footer using the `PopoverFooter` component.',
|
|
97
|
+
},
|
|
98
|
+
source: {
|
|
99
|
+
code: `
|
|
100
|
+
<UnnnicPopover>
|
|
101
|
+
<UnnnicPopoverTrigger>
|
|
102
|
+
<UnnnicButton text="Open Popover" />
|
|
103
|
+
</UnnnicPopoverTrigger>
|
|
104
|
+
<UnnnicPopoverContent v-bind="args">
|
|
105
|
+
<p style="margin: 0;">This popover has a footer with action buttons.</p>
|
|
106
|
+
<UnnnicPopoverFooter>
|
|
107
|
+
<UnnnicButton text="Cancel" type="tertiary" />
|
|
108
|
+
<UnnnicButton text="Save" type="primary" />
|
|
109
|
+
</UnnnicPopoverFooter>
|
|
110
|
+
</UnnnicPopoverContent>
|
|
111
|
+
</UnnnicPopover>
|
|
112
|
+
`,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
render: (args) => ({
|
|
117
|
+
components: {
|
|
118
|
+
Popover,
|
|
119
|
+
PopoverContent,
|
|
120
|
+
PopoverFooter,
|
|
121
|
+
PopoverTrigger,
|
|
122
|
+
UnnnicButton,
|
|
123
|
+
},
|
|
124
|
+
setup() {
|
|
125
|
+
return { args };
|
|
126
|
+
},
|
|
127
|
+
template: `
|
|
128
|
+
<div style="display: flex; justify-content: center; align-items: center; min-height: 300px;">
|
|
129
|
+
<Popover>
|
|
130
|
+
<PopoverTrigger>
|
|
131
|
+
<UnnnicButton text="Open Popover" />
|
|
132
|
+
</PopoverTrigger>
|
|
133
|
+
<PopoverContent v-bind="args">
|
|
134
|
+
<p style="margin: 0;">This popover has a footer with action buttons.</p>
|
|
135
|
+
<PopoverFooter>
|
|
136
|
+
<UnnnicButton text="Cancel" type="tertiary" />
|
|
137
|
+
<UnnnicButton text="Save" type="primary" />
|
|
138
|
+
</PopoverFooter>
|
|
139
|
+
</PopoverContent>
|
|
140
|
+
</Popover>
|
|
141
|
+
</div>
|
|
142
|
+
`,
|
|
143
|
+
}),
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const WithForm = {
|
|
147
|
+
parameters: {
|
|
148
|
+
docs: {
|
|
149
|
+
description: {
|
|
150
|
+
story: 'Popover containing a form with inputs and footer actions.',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
render: (args) => ({
|
|
155
|
+
components: {
|
|
156
|
+
Popover,
|
|
157
|
+
PopoverContent,
|
|
158
|
+
PopoverFooter,
|
|
159
|
+
PopoverTrigger,
|
|
160
|
+
UnnnicButton,
|
|
161
|
+
UnnnicInput,
|
|
162
|
+
UnnnicLabel,
|
|
163
|
+
},
|
|
164
|
+
setup() {
|
|
165
|
+
return { args };
|
|
166
|
+
},
|
|
167
|
+
template: `
|
|
168
|
+
<div style="display: flex; justify-content: center; align-items: center; min-height: 400px;">
|
|
169
|
+
<Popover>
|
|
170
|
+
<PopoverTrigger>
|
|
171
|
+
<UnnnicButton text="Edit Profile" iconLeft="edit" />
|
|
172
|
+
</PopoverTrigger>
|
|
173
|
+
<PopoverContent v-bind="args">
|
|
174
|
+
<h3 style="margin: 0 0 16px 0; font-size: 16px; font-weight: 700;">Edit Profile</h3>
|
|
175
|
+
<form>
|
|
176
|
+
<UnnnicLabel label="Name" />
|
|
177
|
+
<UnnnicInput placeholder="Enter your name" />
|
|
178
|
+
<br />
|
|
179
|
+
<UnnnicLabel label="Email" />
|
|
180
|
+
<UnnnicInput placeholder="Enter your email" type="email" />
|
|
181
|
+
</form>
|
|
182
|
+
<PopoverFooter>
|
|
183
|
+
<UnnnicButton text="Cancel" type="tertiary" />
|
|
184
|
+
<UnnnicButton text="Save" type="primary" />
|
|
185
|
+
</PopoverFooter>
|
|
186
|
+
</PopoverContent>
|
|
187
|
+
</Popover>
|
|
188
|
+
</div>
|
|
189
|
+
`,
|
|
190
|
+
}),
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export const Sizes = {
|
|
194
|
+
parameters: {
|
|
195
|
+
docs: {
|
|
196
|
+
description: {
|
|
197
|
+
story:
|
|
198
|
+
'The popover comes in three sizes: small (240px), medium (320px), and large (400px).',
|
|
199
|
+
},
|
|
200
|
+
source: {
|
|
201
|
+
code: `
|
|
202
|
+
<UnnnicPopover>
|
|
203
|
+
<!-- Small popover (240px) -->
|
|
204
|
+
<UnnnicPopoverContent size="small">
|
|
205
|
+
...
|
|
206
|
+
</UnnnicPopoverContent>
|
|
207
|
+
|
|
208
|
+
<!-- Medium popover (320px) -->
|
|
209
|
+
<UnnnicPopoverContent size="medium">
|
|
210
|
+
...
|
|
211
|
+
</UnnnicPopoverContent>
|
|
212
|
+
<!-- Large popover (400px) -->
|
|
213
|
+
<UnnnicPopoverContent size="large">
|
|
214
|
+
...
|
|
215
|
+
</UnnnicPopoverContent>
|
|
216
|
+
</UnnnicPopover>
|
|
217
|
+
`,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
render: (args) => ({
|
|
222
|
+
components: { Popover, PopoverContent, PopoverTrigger, UnnnicButton },
|
|
223
|
+
setup() {
|
|
224
|
+
return { args };
|
|
225
|
+
},
|
|
226
|
+
template: `
|
|
227
|
+
<div style="display: flex; justify-content: space-around; align-items: center; min-height: 400px; gap: 32px;">
|
|
228
|
+
<Popover>
|
|
229
|
+
<PopoverTrigger>
|
|
230
|
+
<UnnnicButton text="Small" />
|
|
231
|
+
</PopoverTrigger>
|
|
232
|
+
<PopoverContent size="small">
|
|
233
|
+
<p style="margin: 0;">Small popover (240px)</p>
|
|
234
|
+
</PopoverContent>
|
|
235
|
+
</Popover>
|
|
236
|
+
|
|
237
|
+
<Popover>
|
|
238
|
+
<PopoverTrigger>
|
|
239
|
+
<UnnnicButton text="Medium" />
|
|
240
|
+
</PopoverTrigger>
|
|
241
|
+
<PopoverContent size="medium">
|
|
242
|
+
<p style="margin: 0;">Medium popover (320px)</p>
|
|
243
|
+
</PopoverContent>
|
|
244
|
+
</Popover>
|
|
245
|
+
|
|
246
|
+
<Popover>
|
|
247
|
+
<PopoverTrigger>
|
|
248
|
+
<UnnnicButton text="Large" />
|
|
249
|
+
</PopoverTrigger>
|
|
250
|
+
<PopoverContent size="large">
|
|
251
|
+
<p style="margin: 0;">Large popover (400px)</p>
|
|
252
|
+
</PopoverContent>
|
|
253
|
+
</Popover>
|
|
254
|
+
</div>
|
|
255
|
+
`,
|
|
256
|
+
}),
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const Placements = {
|
|
260
|
+
parameters: {
|
|
261
|
+
docs: {
|
|
262
|
+
description: {
|
|
263
|
+
story:
|
|
264
|
+
'The popover can be positioned on any side of the trigger: top, bottom, left, or right.',
|
|
265
|
+
},
|
|
266
|
+
source: {
|
|
267
|
+
code: `
|
|
268
|
+
<UnnnicPopover>
|
|
269
|
+
<!-- Top -->
|
|
270
|
+
<UnnnicPopoverContent side="top">
|
|
271
|
+
...
|
|
272
|
+
</UnnnicPopoverContent>
|
|
273
|
+
<!-- Bottom -->
|
|
274
|
+
<UnnnicPopoverContent side="bottom">
|
|
275
|
+
...
|
|
276
|
+
</UnnnicPopoverContent>
|
|
277
|
+
<!-- Right -->
|
|
278
|
+
<UnnnicPopoverContent side="right">
|
|
279
|
+
...
|
|
280
|
+
</UnnnicPopoverContent>
|
|
281
|
+
<!-- Left -->
|
|
282
|
+
<UnnnicPopoverContent side="left">
|
|
283
|
+
...
|
|
284
|
+
</UnnnicPopoverContent>
|
|
285
|
+
</UnnnicPopover>
|
|
286
|
+
`,
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
render: (args) => ({
|
|
291
|
+
components: { Popover, PopoverContent, PopoverTrigger, UnnnicButton },
|
|
292
|
+
setup() {
|
|
293
|
+
return { args };
|
|
294
|
+
},
|
|
295
|
+
template: `
|
|
296
|
+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 100px;">
|
|
297
|
+
<Popover>
|
|
298
|
+
<PopoverTrigger>
|
|
299
|
+
<UnnnicButton text="Top" style="width: 100%;" />
|
|
300
|
+
</PopoverTrigger>
|
|
301
|
+
<PopoverContent side="top" align="center">
|
|
302
|
+
<p style="margin: 0;">Popover on top</p>
|
|
303
|
+
</PopoverContent>
|
|
304
|
+
</Popover>
|
|
305
|
+
|
|
306
|
+
<Popover>
|
|
307
|
+
<PopoverTrigger>
|
|
308
|
+
<UnnnicButton text="Bottom" style="width: 100%;" />
|
|
309
|
+
</PopoverTrigger>
|
|
310
|
+
<PopoverContent side="bottom" align="center">
|
|
311
|
+
<p style="margin: 0;">Popover on bottom</p>
|
|
312
|
+
</PopoverContent>
|
|
313
|
+
</Popover>
|
|
314
|
+
|
|
315
|
+
<Popover>
|
|
316
|
+
<PopoverTrigger>
|
|
317
|
+
<UnnnicButton text="Right" style="width: 100%;" />
|
|
318
|
+
</PopoverTrigger>
|
|
319
|
+
<PopoverContent side="right" align="center">
|
|
320
|
+
<p style="margin: 0;">Popover on right</p>
|
|
321
|
+
</PopoverContent>
|
|
322
|
+
</Popover>
|
|
323
|
+
|
|
324
|
+
<Popover>
|
|
325
|
+
<PopoverTrigger>
|
|
326
|
+
<UnnnicButton text="Left" style="width: 100%;" />
|
|
327
|
+
</PopoverTrigger>
|
|
328
|
+
<PopoverContent side="left" align="center">
|
|
329
|
+
<p style="margin: 0;">Popover on left</p>
|
|
330
|
+
</PopoverContent>
|
|
331
|
+
</Popover>
|
|
332
|
+
</div>
|
|
333
|
+
`,
|
|
334
|
+
}),
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export const RichContent = {
|
|
338
|
+
args: {
|
|
339
|
+
size: 'large',
|
|
340
|
+
},
|
|
341
|
+
parameters: {
|
|
342
|
+
docs: {
|
|
343
|
+
description: {
|
|
344
|
+
story:
|
|
345
|
+
'Example of a popover with rich, structured content and footer actions.',
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
render: (args) => ({
|
|
350
|
+
components: {
|
|
351
|
+
Popover,
|
|
352
|
+
PopoverContent,
|
|
353
|
+
PopoverFooter,
|
|
354
|
+
PopoverTrigger,
|
|
355
|
+
UnnnicButton,
|
|
356
|
+
},
|
|
357
|
+
setup() {
|
|
358
|
+
return { args };
|
|
359
|
+
},
|
|
360
|
+
template: `
|
|
361
|
+
<div style="display: flex; justify-content: center; align-items: center; min-height: 400px;">
|
|
362
|
+
<Popover>
|
|
363
|
+
<PopoverTrigger>
|
|
364
|
+
<UnnnicButton text="Show Details" iconLeft="info" />
|
|
365
|
+
</PopoverTrigger>
|
|
366
|
+
<PopoverContent v-bind="args">
|
|
367
|
+
<div>
|
|
368
|
+
<h3 style="margin: 0 0 8px 0; font-size: 16px; font-weight: 700;">User Information</h3>
|
|
369
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
370
|
+
<div style="display: flex; gap: 8px;">
|
|
371
|
+
<span style="font-weight: 600;">Name:</span>
|
|
372
|
+
<span>John Doe</span>
|
|
373
|
+
</div>
|
|
374
|
+
<div style="display: flex; gap: 8px;">
|
|
375
|
+
<span style="font-weight: 600;">Email:</span>
|
|
376
|
+
<span>john.doe@example.com</span>
|
|
377
|
+
</div>
|
|
378
|
+
<div style="display: flex; gap: 8px;">
|
|
379
|
+
<span style="font-weight: 600;">Role:</span>
|
|
380
|
+
<span>Administrator</span>
|
|
381
|
+
</div>
|
|
382
|
+
<div style="display: flex; gap: 8px;">
|
|
383
|
+
<span style="font-weight: 600;">Status:</span>
|
|
384
|
+
<span style="color: #4CAF50;">Active</span>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
<PopoverFooter>
|
|
389
|
+
<UnnnicButton text="View Profile" type="primary" />
|
|
390
|
+
</PopoverFooter>
|
|
391
|
+
</PopoverContent>
|
|
392
|
+
</Popover>
|
|
393
|
+
</div>
|
|
394
|
+
`,
|
|
395
|
+
}),
|
|
396
|
+
};
|