@weni/unnnic-system 3.31.1-alpha.2 → 3.32.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/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +1 -1
- package/package.json +8 -9
- package/public/doris.png +0 -0
- package/public/favicon.ico +0 -0
- package/src/App.vue +0 -0
- package/src/assets/emoji/u1F600.png +0 -0
- package/src/assets/emoji/u1F601.png +0 -0
- package/src/assets/emoji/u1F602.png +0 -0
- package/src/assets/emoji/u1F603.png +0 -0
- package/src/assets/emoji/u1F604.png +0 -0
- package/src/assets/emoji/u1F605.png +0 -0
- package/src/assets/emoji/u1F606.png +0 -0
- package/src/assets/emoji/u1F607.png +0 -0
- package/src/assets/emoji/u1F608.png +0 -0
- package/src/assets/emoji/u1F609.png +0 -0
- package/src/assets/emoji/u1F610.png +0 -0
- package/src/assets/emoji/u1F611.png +0 -0
- package/src/assets/emoji/u1F612.png +0 -0
- package/src/assets/emoji/u1F613.png +0 -0
- package/src/assets/emoji/u1F614.png +0 -0
- package/src/assets/emoji/u1F615.png +0 -0
- package/src/assets/emoji/u1F616.png +0 -0
- package/src/assets/emoji/u1F617.png +0 -0
- package/src/assets/emoji/u1F618.png +0 -0
- package/src/assets/emoji/u1F619.png +0 -0
- package/src/assets/emoji/u1F620.png +0 -0
- package/src/assets/emoji/u1F621.png +0 -0
- package/src/assets/emoji/u1F622.png +0 -0
- package/src/assets/emoji/u1F623.png +0 -0
- package/src/assets/emoji/u1F624.png +0 -0
- package/src/assets/emoji/u1F625.png +0 -0
- package/src/assets/emoji/u1F626.png +0 -0
- package/src/assets/emoji/u1F627.png +0 -0
- package/src/assets/emoji/u1F628.png +0 -0
- package/src/assets/emoji/u1F629.png +0 -0
- package/src/assets/emoji/u1F630.png +0 -0
- package/src/assets/emoji/u1F631.png +0 -0
- package/src/assets/emoji/u1F632.png +0 -0
- package/src/assets/emoji/u1F633.png +0 -0
- package/src/assets/emoji/u1F634.png +0 -0
- package/src/assets/emoji/u1F635.png +0 -0
- package/src/assets/emoji/u1F636.png +0 -0
- package/src/assets/emoji/u1F637.png +0 -0
- package/src/assets/emoji/u1F638.png +0 -0
- package/src/assets/emoji/u1F639.png +0 -0
- package/src/assets/emoji/u1F640.png +0 -0
- package/src/assets/emoji/u1F641.png +0 -0
- package/src/assets/emoji/u1F642.png +0 -0
- package/src/assets/emoji/u1F643.png +0 -0
- package/src/assets/emoji/u1F644.png +0 -0
- package/src/assets/emoji/u1F645.png +0 -0
- package/src/assets/fonts/material-symbols-rounded.woff2 +0 -0
- package/src/assets/icons/Brazil.vue +74 -0
- package/src/assets/icons/CheckboxDefault.vue +19 -0
- package/src/assets/icons/CheckboxDisable.vue +19 -0
- package/src/assets/icons/CheckboxLess.vue +23 -0
- package/src/assets/icons/CheckboxSelect.vue +25 -0
- package/src/assets/icons/FitnessBiceps1.vue +15 -0
- package/src/assets/icons/Indicator.vue +18 -0
- package/src/assets/icons/Messages.vue +18 -0
- package/src/assets/icons/NavigationMenuVertical1.vue +25 -0
- package/src/assets/icons/Pin.vue +33 -0
- package/src/assets/icons/RadioDefault.vue +17 -0
- package/src/assets/icons/RadioDisable.vue +17 -0
- package/src/assets/icons/RadioSelected.vue +23 -0
- package/src/assets/icons/SingleNeutral2.vue +20 -0
- package/src/assets/icons/SingleNeutralActions1.vue +20 -0
- package/src/assets/icons/SocialInstagram1.vue +15 -0
- package/src/assets/icons/SocialMediaFacebook1.vue +15 -0
- package/src/assets/icons/SortAsc.vue +19 -0
- package/src/assets/icons/SortDefault.vue +20 -0
- package/src/assets/icons/SortDesc.vue +19 -0
- package/src/assets/icons/Spain.vue +1846 -0
- package/src/assets/icons/SwitchDefault.vue +31 -0
- package/src/assets/icons/SwitchDefaultDisabled.vue +25 -0
- package/src/assets/icons/SwitchSelected.vue +31 -0
- package/src/assets/icons/SwitchSelectedDisabled.vue +23 -0
- package/src/assets/icons/TransferMessage.vue +24 -0
- package/src/assets/icons/USA.vue +192 -0
- package/src/assets/icons/Unpin.vue +33 -0
- 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/icons/weni-loading.svg +2 -0
- package/src/assets/img/flag/en.svg +28 -0
- package/src/assets/img/flag/pt-br.svg +21 -0
- package/src/assets/img/previews/doc-preview.png +0 -0
- package/src/assets/img/previews/image-preview.png +0 -0
- package/src/assets/img/previews/video-preview.png +0 -0
- package/src/assets/tokens/colors-primitives.json +155 -0
- package/src/assets/tokens/colors-semantic-dark.json +55 -0
- package/src/assets/tokens/colors-semantic.json +55 -0
- package/src/assets/tokens/fonts.json +70 -0
- package/src/assets/tokens/icon-sizes.json +22 -0
- package/src/assets/tokens/radii.json +28 -0
- package/src/assets/tokens/shadows.json +10 -0
- package/src/assets/tokens/spaces.json +46 -0
- package/src/components/Accordion/Accordion.vue +149 -0
- package/src/components/Alert/Alert.vue +62 -0
- package/src/components/Alert/Version1dot1.vue +231 -0
- package/src/components/Alert/__tests__/Alert.spec.js +41 -0
- package/src/components/Alert/__tests__/Version1dot1.spec.js +101 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +15 -0
- package/src/components/Alert/__tests__/__snapshots__/AlertBanner.spec.js.snap +10 -0
- package/src/components/Alert/__tests__/__snapshots__/AlertCaller.spec.js.snap +3 -0
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +13 -0
- package/src/components/AudioRecorder/AudioHandler.vue +121 -0
- package/src/components/AudioRecorder/AudioPlayer.vue +403 -0
- package/src/components/AudioRecorder/AudioRecorder.vue +475 -0
- package/src/components/AudioRecorder/AudioTranscriptionButton.vue +73 -0
- package/src/components/AvatarIcon/AvatarIcon.vue +107 -0
- package/src/components/AvatarIcon/__tests__/AvatarIcon.spec.js +84 -0
- package/src/components/AvatarIcon/__tests__/__snapshots__/AvatarIcon.spec.js.snap +7 -0
- package/src/components/Banner/Banner.vue +79 -0
- package/src/components/Banner/InfoBanner.vue +158 -0
- package/src/components/Breadcrumb/Breadcrumb.vue +82 -0
- package/src/components/Breadcrumb/__tests__/Breadcrumb.spec.js +68 -0
- package/src/components/Button/Button.vue +371 -0
- package/src/components/Button/__tests__/Button.spec.js +188 -0
- package/src/components/Button/types.ts +22 -0
- package/src/components/Card/AccountCard.vue +94 -0
- package/src/components/Card/BlankCard.vue +85 -0
- package/src/components/Card/Card.vue +218 -0
- package/src/components/Card/CardCompany.vue +189 -0
- package/src/components/Card/CardData.vue +123 -0
- package/src/components/Card/CardStatusesContainer.vue +255 -0
- package/src/components/Card/ContentCard.vue +145 -0
- package/src/components/Card/DashCard.vue +144 -0
- package/src/components/Card/DefaultCard.vue +87 -0
- package/src/components/Card/MarketplaceCard.vue +187 -0
- package/src/components/Card/SimpleCard.vue +166 -0
- package/src/components/Card/StatusCard.vue +113 -0
- package/src/components/Card/TitleCard.vue +100 -0
- package/src/components/CardImage/CardImage.vue +172 -0
- package/src/components/CardInformation/CardInformation.vue +65 -0
- package/src/components/CardNumber/CardNumber.vue +61 -0
- package/src/components/CardProject/CardProject.vue +320 -0
- package/src/components/CardProject/__tests__/CardProject.spec.js +161 -0
- package/src/components/ChartBar/ChartBar.vue +428 -0
- package/src/components/ChartFunnel/ChartFunnel.vue +70 -0
- package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +200 -0
- package/src/components/ChartFunnel/DefaultFunnel/__tests__/ChartDefaultFunnelBase.unit.spec.js +123 -0
- package/src/components/ChartFunnel/DefaultFunnel/__tests__/__snapshots__/ChartDefaultFunnelBase.unit.spec.js.snap +66 -0
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelBaseRow.vue +79 -0
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelFiveRows.vue +101 -0
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelFourRows.vue +89 -0
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelThreeRows.vue +77 -0
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +64 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/ChartFunnelBaseRow.unit.spec.js +192 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/ChartFunnelFiveRows.unit.spec.js +126 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/ChartFunnelFourRows.unit.spec.js +122 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/ChartFunnelThreeRow.unit.spec.js +120 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/__snapshots__/ChartFunnelBaseRow.unit.spec.js.snap +15 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/__snapshots__/ChartFunnelFiveRows.unit.spec.js.snap +3 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/__snapshots__/ChartFunnelFourRows.unit.spec.js.snap +3 -0
- package/src/components/ChartFunnel/SvgFunnel/__tests__/__snapshots__/ChartFunnelThreeRow.unit.spec.js.snap +3 -0
- package/src/components/ChartFunnel/__tests__/ChartFunnel.unit.spec.js +161 -0
- package/src/components/ChartFunnel/__tests__/__snapshots__/ChartFunnel.unit.spec.js.snap +3 -0
- package/src/components/ChartLine/ChartLine.vue +322 -0
- package/src/components/ChartLine/__tests__/ChartLine.spec.js +170 -0
- package/src/components/ChartMultiLine/ChartMultiLine.vue +326 -0
- package/src/components/ChartMultiLine/Line/Line.vue +170 -0
- package/src/components/ChartRainbow/ChartRainbow.vue +201 -0
- package/src/components/ChatsUserAvatar/ChatsUserAvatar.vue +158 -0
- package/src/components/Checkbox/Checkbox.vue +192 -0
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +65 -0
- package/src/components/CheckboxGroup/CheckboxGroup.vue +88 -0
- package/src/components/CheckboxGroup/__tests__/CheckboxGroup.spec.js +62 -0
- package/src/components/Chip/Chip.vue +125 -0
- package/src/components/Chip/__tests__/Chip.spec.js +164 -0
- package/src/components/Chip/types.ts +8 -0
- package/src/components/Collapse/Collapse.vue +142 -0
- package/src/components/Collapse/__tests__/Collapse.spec.js +117 -0
- package/src/components/Collapse/__tests__/__snapshots__/Collapse.spec.js.snap +8 -0
- package/src/components/Comment/Comment.vue +99 -0
- package/src/components/DataArea/DataArea.vue +99 -0
- package/src/components/DataTable/index.vue +555 -0
- package/src/components/DateFilter/DateFilter.vue +82 -0
- package/src/components/DatePicker/DatePicker.vue +1148 -0
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +591 -0
- package/src/components/DatePicker/translations.js +148 -0
- package/src/components/Disclaimer/Disclaimer.vue +179 -0
- package/src/components/Disclaimer/__tests__/Disclaimer.spec.js +165 -0
- package/src/components/Disclaimer/types.ts +16 -0
- package/src/components/Drawer/Drawer.vue +248 -0
- package/src/components/Drawer/__tests__/Drawer.spec.js +280 -0
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +22 -0
- package/src/components/DropArea/DropArea.vue +373 -0
- package/src/components/DropArea/__tests__/DropArea.spec.js +333 -0
- package/src/components/Dropdown/Dropdown.vue +142 -0
- package/src/components/Dropdown/DropdownItem.vue +32 -0
- package/src/components/Dropdown/DropdownSkeleton.vue +180 -0
- package/src/components/Dropdown/LanguageSelect.vue +296 -0
- package/src/components/Dropdown/__tests__/Dropdown.spec.js +155 -0
- package/src/components/Dropdown/__tests__/DropdownItem.spec.js +25 -0
- package/src/components/Dropdown/__tests__/DropdownSkeleton.spec.js +147 -0
- package/src/components/EmojiPicker/EmojiPicker.vue +244 -0
- package/src/components/EmojiPicker/__tests__/EmojiPicker.spec.js +236 -0
- package/src/components/Flag.vue +40 -0
- package/src/components/FormElement/FormElement.vue +139 -0
- package/src/components/Icon/OldIconsMap.json +111 -0
- package/src/components/Icon/types.ts +26 -0
- package/src/components/Icon.vue +198 -0
- package/src/components/IconLoading/IconLoading.vue +107 -0
- package/src/components/ImportCard/ImportCard.vue +245 -0
- package/src/components/Input/BaseInput.vue +156 -0
- package/src/components/Input/Input.scss +43 -0
- package/src/components/Input/Input.vue +191 -0
- package/src/components/Input/TextInput.vue +233 -0
- package/src/components/Input/__test__/BaseInput.spec.js +107 -0
- package/src/components/Input/__test__/Input.spec.js +103 -0
- package/src/components/Input/__test__/TextInput.spec.js +209 -0
- package/src/components/Input/__test__/__snapshots__/BaseInput.spec.js.snap +3 -0
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +22 -0
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +9 -0
- package/src/components/InputDatePicker/InputDatePicker.vue +253 -0
- package/src/components/InputDatePicker/__test__/InputDatePicker.spec.js +208 -0
- package/src/components/Label/Label.vue +62 -0
- package/src/components/Label/__tests__/Label.spec.js +30 -0
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +3 -0
- package/src/components/Modal/CallModal.vue +23 -0
- package/src/components/Modal/Modal.vue +377 -0
- package/src/components/ModalDialog/ModalDialog.vue +245 -0
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +159 -0
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +3 -0
- package/src/components/ModalNext/ModalNext.vue +437 -0
- package/src/components/MultiSelect/MultiSelectOption.vue +49 -0
- package/src/components/MultiSelect/__tests__/MultiSelect.spec.js +655 -0
- package/src/components/MultiSelect/__tests__/MultiSelectOption.spec.js +229 -0
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +91 -0
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +51 -0
- package/src/components/MultiSelect/index.vue +240 -0
- package/src/components/Navigator/__tests__/Navigator.spec.js +55 -0
- package/src/components/Navigator/index.vue +100 -0
- package/src/components/PageHeader/PageHeader.vue +151 -0
- package/src/components/PageHeader/__tests__/PageHeader.spec.js +97 -0
- package/src/components/PageHeader/index.ts +2 -0
- package/src/components/PageHeader/types.ts +11 -0
- package/src/components/Pagination/Pagination.vue +190 -0
- package/src/components/Pagination/__tests__/Pagination.spec.js +307 -0
- package/src/components/ProgressBar/ProgressBar.vue +245 -0
- package/src/components/Radio/Radio.vue +168 -0
- package/src/components/Radio/__test__/Radio.spec.js +145 -0
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +8 -0
- package/src/components/RadioGroup/RadioGroup.vue +128 -0
- package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +100 -0
- package/src/components/Select/SelectItem.vue +85 -0
- package/src/components/Select/__tests__/Select.spec.js +626 -0
- package/src/components/Select/__tests__/SelectItem.spec.js +330 -0
- package/src/components/Select/__tests__/__snapshots__/Popover.spec.js.snap +8 -0
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +91 -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/__tests__/__snapshots__/SelectPopover.spec.js.snap +8 -0
- package/src/components/Select/_select-shared.scss +25 -0
- package/src/components/Select/index.vue +459 -0
- package/src/components/Select/types.ts +37 -0
- package/src/components/SelectSmart/SelectSmart.vue +873 -0
- package/src/components/SelectSmart/SelectSmartMultipleHeader.vue +144 -0
- package/src/components/SelectSmart/SelectSmartOption.vue +178 -0
- package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +527 -0
- package/src/components/SelectSmart/__tests__/SelectSmartMultipleHeader.spec.js +86 -0
- package/src/components/SelectSmart/__tests__/SelectSmartOption.spec.js +139 -0
- package/src/components/SelectSmart/__tests__/__snapshots__/SelectSmartMultipleHeader.spec.js.snap +8 -0
- package/src/components/SelectSmart/__tests__/__snapshots__/SelectSmartOption.spec.js.snap +10 -0
- package/src/components/SelectTime/index.vue +220 -0
- package/src/components/Sidebar/SidebarItem.vue +224 -0
- package/src/components/Sidebar/__tests__/SidebarItem.spec.js +105 -0
- package/src/components/Sidebar/__tests__/Siderbar.spec.js +92 -0
- package/src/components/Sidebar/index.vue +126 -0
- package/src/components/Sidebar/propsValidator.js +24 -0
- package/src/components/SkeletonLoading/SkeletonLoading.vue +156 -0
- package/src/components/SkeletonLoading/__tests__/SkeletonLoading.spec.js +128 -0
- package/src/components/SkeletonLoading/skeletonTheme.vue +66 -0
- package/src/components/Switch/Switch.vue +185 -0
- package/src/components/Switch/__tests__/Switch.spec.js +55 -0
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +10 -0
- package/src/components/Tab/Tab.vue +203 -0
- package/src/components/Tab/__test__/Tab.spec.js +152 -0
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +23 -0
- package/src/components/Table/Table.vue +143 -0
- package/src/components/Table/TableRow.vue +101 -0
- package/src/components/TableNext/TableBodyCell.vue +47 -0
- package/src/components/TableNext/TableNext.vue +428 -0
- package/src/components/TableNext/TablePagination.vue +98 -0
- package/src/components/TableNext/__test__/TableBodyCell.spec.js +65 -0
- package/src/components/TableNext/__test__/TableNext.spec.js +197 -0
- package/src/components/TableNext/__test__/TablePagination.spec.js +65 -0
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +59 -0
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +41 -0
- package/src/components/TableNext/__test__/validation.unit.test.js +90 -0
- package/src/components/TableNext/validation.js +66 -0
- package/src/components/TabsExpanded/TabsExpanded.vue +156 -0
- package/src/components/TabsExpanded/__tests__/TabsExpanded.spec.js +78 -0
- package/src/components/Tag/DefaultTag.vue +87 -0
- package/src/components/Tag/Tag.vue +43 -0
- package/src/components/Tag/__tests__/DefaultTag.spec.js +51 -0
- package/src/components/Tag/__tests__/Tag.spec.js +82 -0
- package/src/components/Tag/types.ts +19 -0
- package/src/components/TemplatePreview/TemplatePreview.vue +252 -0
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +51 -0
- package/src/components/TemplatePreview/types.d.ts +16 -0
- package/src/components/TextArea/TextArea.vue +138 -0
- package/src/components/TextArea/__test__/TextArea.spec.js +218 -0
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +17 -0
- package/src/components/Toast/Toast.vue +252 -0
- package/src/components/Toast/ToastManager.ts +113 -0
- package/src/components/Toast/__tests__/Toast.spec.js +291 -0
- package/src/components/Toast/__tests__/ToastManager.spec.js +298 -0
- package/src/components/Toast/types.ts +57 -0
- package/src/components/ToolTip/ToolTip.vue +99 -0
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +451 -0
- package/src/components/Tour/Tour.vue +138 -0
- package/src/components/Tour/TourMask.vue +135 -0
- package/src/components/Tour/TourPopover.vue +236 -0
- package/src/components/Tour/propsValidation.js +82 -0
- package/src/components/UploadArea/UploadArea.vue +141 -0
- package/src/components/__tests__/Icon.spec.js +94 -0
- package/src/components/config.js +1 -0
- package/src/components/grid/Grid.vue +50 -0
- package/src/components/icons/IconCommunity.vue +12 -0
- package/src/components/icons/IconDocumentation.vue +12 -0
- package/src/components/icons/IconEcosystem.vue +12 -0
- package/src/components/icons/IconSupport.vue +12 -0
- package/src/components/icons/IconTooling.vue +19 -0
- package/src/components/icons/iconArrowsDefault.vue +16 -0
- package/src/components/index.ts +468 -0
- package/src/components/ui/dialog/Dialog.vue +51 -0
- package/src/components/ui/dialog/DialogClose.vue +29 -0
- package/src/components/ui/dialog/DialogContent.vue +141 -0
- package/src/components/ui/dialog/DialogFooter.vue +46 -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 +80 -0
- package/src/components/ui/drawer/DrawerClose.vue +31 -0
- package/src/components/ui/drawer/DrawerContent.vue +114 -0
- package/src/components/ui/drawer/DrawerDescription.vue +40 -0
- package/src/components/ui/drawer/DrawerFooter.vue +34 -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/Popover.vue +19 -0
- package/src/components/ui/popover/PopoverContent.vue +113 -0
- package/src/components/ui/popover/PopoverFooter.vue +47 -0
- package/src/components/ui/popover/PopoverOption.vue +130 -0
- package/src/components/ui/popover/PopoverTrigger.vue +27 -0
- package/src/components/ui/popover/__tests__/PopoverFooter.spec.js +116 -0
- package/src/components/ui/popover/context.ts +4 -0
- package/src/components/ui/popover/index.ts +6 -0
- package/src/components/ui/segmented-control/SegmentedControlList.vue +51 -0
- package/src/components/ui/segmented-control/SegmentedControlTrigger.vue +81 -0
- package/src/components/ui/segmented-control/index.ts +4 -0
- package/src/components/ui/table/Table.vue +29 -0
- package/src/components/ui/table/TableBody.vue +14 -0
- package/src/components/ui/table/TableCell.vue +28 -0
- package/src/components/ui/table/TableHead.vue +27 -0
- package/src/components/ui/table/TableHeader.vue +24 -0
- package/src/components/ui/table/TableRow.vue +51 -0
- package/src/components/ui/table/index.ts +6 -0
- package/src/components/ui/tabs/Tabs.vue +19 -0
- package/src/components/ui/tabs/TabsContent.vue +22 -0
- package/src/components/ui/tabs/TabsList.vue +40 -0
- package/src/components/ui/tabs/TabsTrigger.vue +63 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/tooltip/Tooltip.vue +21 -0
- package/src/components/ui/tooltip/TooltipContent.vue +84 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +24 -0
- package/src/components/ui/tooltip/index.ts +3 -0
- package/src/composables/useDelayedUnmount.ts +48 -0
- package/src/composables/useSelectBase.ts +119 -0
- package/src/composables/useSelectKeyboard.ts +91 -0
- package/src/composables/useTheme.ts +67 -0
- package/src/index.ts +29 -0
- package/src/lib/__tests__/teleport-target.spec.ts +73 -0
- package/src/lib/layer-manager.ts +64 -0
- package/src/lib/teleport-target.ts +46 -0
- package/src/lib/utils.ts +7 -0
- package/src/locales/en.json +50 -0
- package/src/locales/es.json +50 -0
- package/src/locales/pt_br.json +50 -0
- package/src/main.ts +9 -0
- package/src/mixins/i18n.js +74 -0
- package/src/stories/Accordion.stories.js +54 -0
- package/src/stories/Alert.stories.js +157 -0
- package/src/stories/AudioRecorder.stories.js +52 -0
- package/src/stories/AvatarIcon.stories.js +57 -0
- package/src/stories/Banner.stories.js +54 -0
- package/src/stories/Breadcrumb.stories.js +30 -0
- package/src/stories/Button.stories.js +183 -0
- package/src/stories/Card.stories.js +154 -0
- package/src/stories/CardCompany.stories.js +64 -0
- package/src/stories/CardData.stories.js +25 -0
- package/src/stories/CardImage.stories.js +58 -0
- package/src/stories/CardInformation.stories.js +44 -0
- package/src/stories/CardNumber.stories.js +15 -0
- package/src/stories/CardProject.stories.js +70 -0
- package/src/stories/CardSimple.stories.js +73 -0
- package/src/stories/ChartBar.stories.js +123 -0
- package/src/stories/ChartFunnel.stories.js +127 -0
- package/src/stories/ChartLine.stories.js +55 -0
- package/src/stories/ChartMultiLine.stories.js +50 -0
- package/src/stories/ChartRainbow.stories.js +18 -0
- package/src/stories/ChatsUserAvatar.stories.js +36 -0
- package/src/stories/Checkbox.stories.js +79 -0
- package/src/stories/CheckboxGroup.stories.js +105 -0
- package/src/stories/Chip.stories.js +194 -0
- package/src/stories/Collapse.stories.js +81 -0
- package/src/stories/Colors.mdx +13 -0
- package/src/stories/Colors.stories.js +132 -0
- package/src/stories/Comment.stories.js +66 -0
- package/src/stories/DataArea.stories.js +78 -0
- package/src/stories/DataTable.stories.js +588 -0
- package/src/stories/DateFilter.stories.js +18 -0
- package/src/stories/DatePicker.stories.js +114 -0
- package/src/stories/Dialog.stories.js +851 -0
- package/src/stories/Disclaimer.stories.js +93 -0
- package/src/stories/Drawer.stories.js +242 -0
- package/src/stories/DrawerNext.stories.js +631 -0
- package/src/stories/DropArea.mdx +66 -0
- package/src/stories/DropArea.stories.js +74 -0
- package/src/stories/Dropdown.stories.js +35 -0
- package/src/stories/EmojiPicker.stories.js +93 -0
- package/src/stories/FormElement.stories.js +35 -0
- package/src/stories/Grid.stories.js +19 -0
- package/src/stories/Icon.stories.js +144 -0
- package/src/stories/IconLoading.stories.js +63 -0
- package/src/stories/Iconography.mdx +7 -0
- package/src/stories/ImportCard.stories.js +33 -0
- package/src/stories/Input.mdx +79 -0
- package/src/stories/Input.stories.js +157 -0
- package/src/stories/InputDatePicker.stories.js +155 -0
- package/src/stories/Label.stories.js +30 -0
- package/src/stories/LanguageSelect.stories.js +26 -0
- package/src/stories/LayerManager.docs.mdx +40 -0
- package/src/stories/LayerManager.stories.js +407 -0
- package/src/stories/Modal.stories.js +101 -0
- package/src/stories/ModalDialog.mdx +89 -0
- package/src/stories/ModalDialog.stories.js +448 -0
- package/src/stories/ModalNext.stories.js +191 -0
- package/src/stories/MultiSelect.stories.js +169 -0
- package/src/stories/Navigator.stories.js +26 -0
- package/src/stories/PageHeader.stories.js +364 -0
- package/src/stories/Pagination.stories.js +37 -0
- package/src/stories/Popover.stories.js +457 -0
- package/src/stories/PopoverOption.stories.js +128 -0
- package/src/stories/ProgressBar.stories.js +38 -0
- package/src/stories/Radio.stories.js +104 -0
- package/src/stories/RadioGroup.stories.js +145 -0
- package/src/stories/SegmentedControl.stories.js +253 -0
- package/src/stories/Select.stories.js +375 -0
- package/src/stories/SelectSmart.mdx +152 -0
- package/src/stories/SelectSmart.stories.js +594 -0
- package/src/stories/SelectTime.stories.js +25 -0
- package/src/stories/Sidebar.stories.js +157 -0
- package/src/stories/SkeletonLoading.stories.js +28 -0
- package/src/stories/Switch.stories.js +46 -0
- package/src/stories/Tab.stories.js +56 -0
- package/src/stories/Table.stories.js +218 -0
- package/src/stories/TableNext.stories.js +176 -0
- package/src/stories/Tabs.stories.js +169 -0
- package/src/stories/TabsExpanded.stories.js +69 -0
- package/src/stories/Tag.stories.js +59 -0
- package/src/stories/TemplatePreview.stories.js +94 -0
- package/src/stories/TemplatePreviewModal.stories.js +110 -0
- package/src/stories/TextArea.mdx +68 -0
- package/src/stories/TextArea.stories.js +117 -0
- package/src/stories/Toast.mdx +123 -0
- package/src/stories/Toast.stories.js +126 -0
- package/src/stories/ToolTip.stories.js +71 -0
- package/src/stories/Tour.stories.js +216 -0
- package/src/stories/Typography.mdx +83 -0
- package/src/stories/Typography.stories.js +66 -0
- package/src/stories/UploadArea.stories.js +42 -0
- package/src/stories/assets/audios/audio-recorder-sample.mp3 +0 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/images/un.png +0 -0
- package/src/stories/assets/images/unnnic.png +0 -0
- package/src/stories/assets/images/unnnicPortrait.png +0 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/assets/videos/weni.mp4 +0 -0
- package/src/types/index.d.ts +53 -0
- package/src/types/scheme-colors.d.ts +209 -0
- package/src/types/unnnic-utils.d.ts +88 -0
- package/src/types/vue-shims.d.ts +5 -0
- package/src/types/vueuse-overrides.d.ts +7 -0
- package/src/utils/call.js +81 -0
- package/src/utils/colorTokens.js +2 -0
- package/src/utils/colorsList.js +89 -0
- package/src/utils/emojiList.js +47 -0
- package/src/utils/hours.js +100 -0
- package/src/utils/iconList.js +108 -0
- package/src/utils/icons.js +59 -0
- package/src/utils/plugins/i18n.js +20 -0
- package/src/utils/sanitize.js +75 -0
- /package/{dist → src/assets}/scss/colors-hsl.scss +0 -0
- /package/{dist → src/assets}/scss/colors.scss +0 -0
- /package/{dist → src/assets}/scss/deprecated/colors.scss +0 -0
- /package/{dist → src/assets}/scss/deprecated/fonts.scss +0 -0
- /package/{dist → src/assets}/scss/deprecated/grid.scss +0 -0
- /package/{dist → src/assets}/scss/deprecated/spacing.scss +0 -0
- /package/{dist → src/assets}/scss/fonts.scss +0 -0
- /package/{dist → src/assets}/scss/icon-sizes.scss +0 -0
- /package/{dist → src/assets}/scss/radii.scss +0 -0
- /package/{dist → src/assets}/scss/scheme-colors.scss +0 -0
- /package/{dist → src/assets}/scss/semantic-colors.scss +0 -0
- /package/{dist → src/assets}/scss/semantic-text-utilities.scss +0 -0
- /package/{dist → src/assets}/scss/shadows.scss +0 -0
- /package/{dist → src/assets}/scss/spaces.scss +0 -0
- /package/{dist → src/assets}/scss/tailwind.scss +0 -0
- /package/{dist → src/assets}/scss/theme.scss +0 -0
- /package/{dist → src/assets}/scss/unnnic.scss +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes, Component } from 'vue';
|
|
4
|
+
import { computed, h } from 'vue';
|
|
5
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
6
|
+
import {
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogOverlay,
|
|
9
|
+
DialogPortal,
|
|
10
|
+
useForwardPropsEmits,
|
|
11
|
+
} from 'reka-ui';
|
|
12
|
+
import { cn } from '@/lib/utils';
|
|
13
|
+
import { useLayerZIndex } from '@/lib/layer-manager';
|
|
14
|
+
import { useTeleportTarget } from '@/lib/teleport-target';
|
|
15
|
+
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'UnnnicDialogContent',
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const props = withDefaults(
|
|
22
|
+
defineProps<
|
|
23
|
+
DialogContentProps & {
|
|
24
|
+
parentClass?: HTMLAttributes['class'];
|
|
25
|
+
class?: HTMLAttributes['class'];
|
|
26
|
+
size?: 'small' | 'medium' | 'large';
|
|
27
|
+
}
|
|
28
|
+
>(),
|
|
29
|
+
{
|
|
30
|
+
size: 'medium',
|
|
31
|
+
parentClass: '', // This class should be temporary, to be discontinued with the ModalDialog component
|
|
32
|
+
class: '',
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
const emits = defineEmits<DialogContentEmits>();
|
|
36
|
+
|
|
37
|
+
const delegatedProps = reactiveOmit(props, 'class', 'parentClass');
|
|
38
|
+
|
|
39
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
40
|
+
|
|
41
|
+
const overlayZIndex = useLayerZIndex({ offset: -2 });
|
|
42
|
+
const modalZIndex = useLayerZIndex();
|
|
43
|
+
const portalTarget = useTeleportTarget();
|
|
44
|
+
|
|
45
|
+
const contentClasses = computed(() =>
|
|
46
|
+
cn(
|
|
47
|
+
'unnnic-dialog-content',
|
|
48
|
+
`unnnic-dialog-content--size-${props.size}`,
|
|
49
|
+
'duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',
|
|
50
|
+
props.class,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// This component is used to wrap the DialogContent component in a section if the parentClass is provided
|
|
55
|
+
// This is a temporary solution, to be discontinued with the ModalDialog component
|
|
56
|
+
const ConditionalWrapper: Component = (_, { slots }) => {
|
|
57
|
+
const content = slots.default?.();
|
|
58
|
+
return props.parentClass
|
|
59
|
+
? h('section', { class: props.parentClass }, content)
|
|
60
|
+
: content;
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<DialogPortal :to="portalTarget">
|
|
66
|
+
<DialogOverlay
|
|
67
|
+
class="unnnic-dialog-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
68
|
+
:style="{ zIndex: overlayZIndex }"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<ConditionalWrapper>
|
|
72
|
+
<DialogContent
|
|
73
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
74
|
+
:class="contentClasses"
|
|
75
|
+
:style="{ zIndex: modalZIndex }"
|
|
76
|
+
>
|
|
77
|
+
<slot />
|
|
78
|
+
</DialogContent>
|
|
79
|
+
</ConditionalWrapper>
|
|
80
|
+
</DialogPortal>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<style lang="scss" scoped>
|
|
84
|
+
@use '@/assets/scss/unnnic' as *;
|
|
85
|
+
|
|
86
|
+
.unnnic-dialog-overlay {
|
|
87
|
+
position: fixed;
|
|
88
|
+
top: 0;
|
|
89
|
+
left: 0;
|
|
90
|
+
|
|
91
|
+
width: 100vw;
|
|
92
|
+
height: 100vh;
|
|
93
|
+
background: rgba(53, 57, 69, 0.5);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.unnnic-dialog-content {
|
|
97
|
+
position: fixed;
|
|
98
|
+
top: 50%;
|
|
99
|
+
left: 50%;
|
|
100
|
+
|
|
101
|
+
transform: translate(-50%, -50%);
|
|
102
|
+
|
|
103
|
+
width: 100%;
|
|
104
|
+
max-height: calc(100% - $unnnic-space-20);
|
|
105
|
+
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
|
|
109
|
+
box-shadow: $unnnic-shadow-2;
|
|
110
|
+
border-radius: $unnnic-radius-4;
|
|
111
|
+
background-color: $unnnic-color-bg-base;
|
|
112
|
+
|
|
113
|
+
&--size-small {
|
|
114
|
+
max-width: 360px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&--size-medium {
|
|
118
|
+
max-width: 560px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--size-large {
|
|
122
|
+
max-width: 800px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
> * {
|
|
126
|
+
&::-webkit-scrollbar {
|
|
127
|
+
width: $unnnic-spacing-inline-nano;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&::-webkit-scrollbar-thumb {
|
|
131
|
+
background: $unnnic-color-border-emphasized;
|
|
132
|
+
border-radius: $unnnic-border-radius-pill;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&::-webkit-scrollbar-track {
|
|
136
|
+
background: $unnnic-color-bg-muted;
|
|
137
|
+
border-radius: $unnnic-border-radius-pill;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'UnnnicDialogFooter',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<{ class?: HTMLAttributes['class']; divider?: boolean }>(),
|
|
11
|
+
{
|
|
12
|
+
divider: true,
|
|
13
|
+
},
|
|
14
|
+
);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<footer
|
|
19
|
+
:class="
|
|
20
|
+
cn(
|
|
21
|
+
'unnnic-dialog-footer',
|
|
22
|
+
{ 'unnnic-dialog-footer--with-divider': props.divider },
|
|
23
|
+
props.class,
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</footer>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
@use '@/assets/scss/unnnic' as *;
|
|
33
|
+
|
|
34
|
+
.unnnic-dialog-footer {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: flex-end;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: $unnnic-space-2;
|
|
39
|
+
|
|
40
|
+
padding: $unnnic-space-6;
|
|
41
|
+
|
|
42
|
+
&--with-divider {
|
|
43
|
+
border-top: 1px solid $unnnic-color-border-soft;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
import UnnnicButton from '@/components/Button/Button.vue';
|
|
5
|
+
import DialogClose from './DialogClose.vue';
|
|
6
|
+
import UnnnicIcon, { SchemeColor } from '@/components/Icon.vue';
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: 'UnnnicDialogHeader',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<{
|
|
14
|
+
class?: HTMLAttributes['class'];
|
|
15
|
+
divider?: boolean;
|
|
16
|
+
type?: 'default' | 'success' | 'warning' | 'attention';
|
|
17
|
+
closeButton?: boolean;
|
|
18
|
+
}>(),
|
|
19
|
+
{
|
|
20
|
+
divider: true,
|
|
21
|
+
closeButton: true,
|
|
22
|
+
type: 'default',
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const iconsMapper = {
|
|
27
|
+
default: { icon: '', scheme: '' as SchemeColor },
|
|
28
|
+
success: { icon: 'check_circle', scheme: 'fg-success' as SchemeColor },
|
|
29
|
+
warning: { icon: 'warning', scheme: 'fg-critical' as SchemeColor },
|
|
30
|
+
attention: { icon: 'error', scheme: 'fg-warning' as SchemeColor },
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<header
|
|
36
|
+
:class="
|
|
37
|
+
cn(
|
|
38
|
+
'unnnic-dialog-header',
|
|
39
|
+
{ 'unnnic-dialog-header--with-divider': props.divider },
|
|
40
|
+
props.class,
|
|
41
|
+
)
|
|
42
|
+
"
|
|
43
|
+
>
|
|
44
|
+
<UnnnicIcon
|
|
45
|
+
v-if="iconsMapper[props.type]?.icon"
|
|
46
|
+
:icon="iconsMapper[props.type]?.icon"
|
|
47
|
+
:scheme="iconsMapper[props.type]?.scheme"
|
|
48
|
+
size="md"
|
|
49
|
+
/>
|
|
50
|
+
<slot />
|
|
51
|
+
|
|
52
|
+
<DialogClose
|
|
53
|
+
v-if="props.closeButton"
|
|
54
|
+
class="unnnic-dialog-header__close"
|
|
55
|
+
>
|
|
56
|
+
<UnnnicButton
|
|
57
|
+
type="tertiary"
|
|
58
|
+
iconCenter="close"
|
|
59
|
+
size="small"
|
|
60
|
+
/>
|
|
61
|
+
</DialogClose>
|
|
62
|
+
</header>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
@use '@/assets/scss/unnnic' as *;
|
|
67
|
+
|
|
68
|
+
.unnnic-dialog-header {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: $unnnic-space-2;
|
|
72
|
+
|
|
73
|
+
padding: $unnnic-space-6;
|
|
74
|
+
|
|
75
|
+
&--with-divider {
|
|
76
|
+
border-bottom: 1px solid $unnnic-color-border-soft;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__close {
|
|
80
|
+
margin-left: auto;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogTitleProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DialogTitle, useForwardProps } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: 'UnnnicDialogTitle',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const props = defineProps<
|
|
13
|
+
DialogTitleProps & { class?: HTMLAttributes['class'] }
|
|
14
|
+
>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
17
|
+
|
|
18
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<DialogTitle
|
|
23
|
+
v-bind="forwardedProps"
|
|
24
|
+
:class="cn('unnnic-dialog-title', props.class)"
|
|
25
|
+
>
|
|
26
|
+
<slot />
|
|
27
|
+
</DialogTitle>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style lang="scss" scoped>
|
|
31
|
+
@use '@/assets/scss/unnnic' as *;
|
|
32
|
+
|
|
33
|
+
.unnnic-dialog-title {
|
|
34
|
+
font: $unnnic-font-display-2;
|
|
35
|
+
color: $unnnic-color-fg-emphasized;
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogTriggerProps } from 'reka-ui';
|
|
3
|
+
import { DialogTrigger } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'UnnnicDialogTrigger',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = defineProps<DialogTriggerProps>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<DialogTrigger v-bind="props">
|
|
14
|
+
<slot />
|
|
15
|
+
</DialogTrigger>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Dialog } from './Dialog.vue';
|
|
2
|
+
export { default as DialogClose } from './DialogClose.vue';
|
|
3
|
+
export { default as DialogContent } from './DialogContent.vue';
|
|
4
|
+
export { default as DialogFooter } from './DialogFooter.vue';
|
|
5
|
+
export { default as DialogHeader } from './DialogHeader.vue';
|
|
6
|
+
export { default as DialogTitle } from './DialogTitle.vue';
|
|
7
|
+
export { default as DialogTrigger } from './DialogTrigger.vue';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { DrawerRootEmits } from 'vaul-vue';
|
|
3
|
+
import { computed, toRef } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { useForwardPropsEmits } from 'reka-ui';
|
|
6
|
+
import { DrawerRoot } from 'vaul-vue';
|
|
7
|
+
import useDelayedUnmount from '@/composables/useDelayedUnmount';
|
|
8
|
+
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: 'UnnnicDrawerNext',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Self-contained props type that mirrors `vaul-vue`'s `DrawerRootProps`.
|
|
15
|
+
*
|
|
16
|
+
* We intentionally avoid extending or intersecting `DrawerRootProps` because
|
|
17
|
+
* its definition includes the internal, non-exported `WithoutFadeFromProps`
|
|
18
|
+
* type, which breaks `vite-plugin-dts` declaration rollup with TS4023 when
|
|
19
|
+
* combined with our extra `lazyMount` / `unmountDelay` props.
|
|
20
|
+
*/
|
|
21
|
+
interface DrawerRootProps {
|
|
22
|
+
activeSnapPoint?: number | string | null;
|
|
23
|
+
closeThreshold?: number;
|
|
24
|
+
shouldScaleBackground?: boolean;
|
|
25
|
+
setBackgroundColorOnScale?: boolean;
|
|
26
|
+
scrollLockTimeout?: number;
|
|
27
|
+
fixed?: boolean;
|
|
28
|
+
dismissible?: boolean;
|
|
29
|
+
modal?: boolean;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
nested?: boolean;
|
|
33
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
34
|
+
noBodyStyles?: boolean;
|
|
35
|
+
handleOnly?: boolean;
|
|
36
|
+
preventScrollRestoration?: boolean;
|
|
37
|
+
snapPoints?: (number | string)[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface UnnnicDrawerNextProps extends DrawerRootProps {
|
|
41
|
+
/**
|
|
42
|
+
* When true, the drawer is only mounted while open and stays mounted for
|
|
43
|
+
* `unmountDelay` ms after closing so the exit animation can play. Use it
|
|
44
|
+
* to avoid mounting many drawers eagerly inside lists.
|
|
45
|
+
*/
|
|
46
|
+
lazyMount?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Delay (ms) before the drawer is unmounted after closing. Should match
|
|
49
|
+
* the leave animation duration. Only applies when `lazyMount` is true.
|
|
50
|
+
*/
|
|
51
|
+
unmountDelay?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const props = withDefaults(defineProps<UnnnicDrawerNextProps>(), {
|
|
55
|
+
shouldScaleBackground: true,
|
|
56
|
+
lazyMount: false,
|
|
57
|
+
unmountDelay: 300,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const emits = defineEmits<DrawerRootEmits>();
|
|
61
|
+
|
|
62
|
+
const delegatedProps = reactiveOmit(props, 'lazyMount', 'unmountDelay');
|
|
63
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
64
|
+
|
|
65
|
+
const open = toRef(props, 'open');
|
|
66
|
+
const lazyShouldRender = useDelayedUnmount(open, props.unmountDelay);
|
|
67
|
+
|
|
68
|
+
const shouldRender = computed(() => !props.lazyMount || lazyShouldRender.value);
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<DrawerRoot
|
|
73
|
+
v-if="shouldRender"
|
|
74
|
+
v-bind="forwarded"
|
|
75
|
+
direction="right"
|
|
76
|
+
handleOnly
|
|
77
|
+
>
|
|
78
|
+
<slot />
|
|
79
|
+
</DrawerRoot>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DrawerCloseProps } from 'vaul-vue';
|
|
3
|
+
import { DrawerClose } from 'vaul-vue';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'UnnnicDrawerClose',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<DrawerCloseProps>(), {
|
|
10
|
+
asChild: true,
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<DrawerClose
|
|
16
|
+
v-bind="props"
|
|
17
|
+
class="unnnic-drawer__close"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</DrawerClose>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style lang="scss" scoped>
|
|
24
|
+
@use '@/assets/scss/unnnic' as *;
|
|
25
|
+
|
|
26
|
+
.unnnic-drawer__close {
|
|
27
|
+
> * {
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
|
|
3
|
+
import { type HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { useForwardPropsEmits } from 'reka-ui';
|
|
6
|
+
import { DrawerContent, DrawerPortal } from 'vaul-vue';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
import { useLayerZIndex } from '@/lib/layer-manager';
|
|
9
|
+
import { useTeleportTarget } from '@/lib/teleport-target';
|
|
10
|
+
import DrawerOverlay from './DrawerOverlay.vue';
|
|
11
|
+
|
|
12
|
+
defineOptions({
|
|
13
|
+
name: 'UnnnicDrawerContent',
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<
|
|
19
|
+
DialogContentProps & {
|
|
20
|
+
class?: HTMLAttributes['class'];
|
|
21
|
+
size?: 'medium' | 'large' | 'extra-large' | 'giant';
|
|
22
|
+
showOverlay?: boolean;
|
|
23
|
+
}
|
|
24
|
+
>(),
|
|
25
|
+
{
|
|
26
|
+
class: undefined,
|
|
27
|
+
size: 'medium',
|
|
28
|
+
showOverlay: true,
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
const emits = defineEmits<DialogContentEmits>();
|
|
32
|
+
|
|
33
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
34
|
+
const forwardedProps = useForwardPropsEmits(delegatedProps, emits);
|
|
35
|
+
|
|
36
|
+
const layerZIndex = useLayerZIndex();
|
|
37
|
+
const portalTarget = useTeleportTarget();
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<DrawerPortal :to="portalTarget">
|
|
42
|
+
<DrawerOverlay
|
|
43
|
+
v-if="showOverlay"
|
|
44
|
+
:style="{ zIndex: layerZIndex - 2 }"
|
|
45
|
+
/>
|
|
46
|
+
<DrawerContent
|
|
47
|
+
v-bind="{ ...forwardedProps, ...$attrs }"
|
|
48
|
+
:class="
|
|
49
|
+
cn(
|
|
50
|
+
'unnnic-drawer__content',
|
|
51
|
+
`unnnic-drawer__content--${props.size}`,
|
|
52
|
+
props.class,
|
|
53
|
+
)
|
|
54
|
+
"
|
|
55
|
+
:style="{
|
|
56
|
+
'--initial-transform': 'calc(100% + 8px)',
|
|
57
|
+
zIndex: layerZIndex,
|
|
58
|
+
}"
|
|
59
|
+
>
|
|
60
|
+
<slot />
|
|
61
|
+
</DrawerContent>
|
|
62
|
+
</DrawerPortal>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
@use '@/assets/scss/unnnic' as *;
|
|
67
|
+
|
|
68
|
+
$drawer-space: $unnnic-space-2;
|
|
69
|
+
|
|
70
|
+
.unnnic-drawer__content {
|
|
71
|
+
-webkit-user-select: unset;
|
|
72
|
+
user-select: unset;
|
|
73
|
+
will-change: unset;
|
|
74
|
+
|
|
75
|
+
&::after {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
position: fixed;
|
|
80
|
+
top: $drawer-space;
|
|
81
|
+
right: $drawer-space;
|
|
82
|
+
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
|
|
86
|
+
height: calc(100% - $drawer-space * 2);
|
|
87
|
+
|
|
88
|
+
border-radius: $unnnic-radius-4;
|
|
89
|
+
border: 1px solid $unnnic-color-border-soft;
|
|
90
|
+
background-color: $unnnic-color-bg-base;
|
|
91
|
+
|
|
92
|
+
&--medium {
|
|
93
|
+
width: calc(100% / 3);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&--large {
|
|
97
|
+
width: 50%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--extra-large {
|
|
101
|
+
width: 66%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&--giant {
|
|
105
|
+
width: 75%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&__body {
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
padding: $unnnic-space-6;
|
|
111
|
+
flex: 1 0 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { DrawerDescriptionProps } from 'vaul-vue';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { DrawerDescription } from 'vaul-vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: 'UnnnicDrawerDescription',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const props = defineProps<
|
|
13
|
+
DrawerDescriptionProps & { class?: HTMLAttributes['class'] }
|
|
14
|
+
>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<DrawerDescription
|
|
21
|
+
v-bind="delegatedProps"
|
|
22
|
+
:class="cn('unnnic-drawer__description', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</DrawerDescription>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
@use '@/assets/scss/unnnic' as *;
|
|
30
|
+
|
|
31
|
+
.unnnic-drawer__description {
|
|
32
|
+
margin: 0;
|
|
33
|
+
|
|
34
|
+
font: $unnnic-font-body;
|
|
35
|
+
color: $unnnic-color-fg-base;
|
|
36
|
+
|
|
37
|
+
grid-column: 1 / 3;
|
|
38
|
+
grid-row: 2 / 3;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { type HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'UnnnicDrawerFooter',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}>();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<footer :class="cn('unnnic-drawer__footer', props.class)">
|
|
16
|
+
<slot />
|
|
17
|
+
</footer>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" scoped>
|
|
21
|
+
@use '@/assets/scss/unnnic' as *;
|
|
22
|
+
|
|
23
|
+
.unnnic-drawer__footer {
|
|
24
|
+
border-top: 1px solid $unnnic-color-border-soft;
|
|
25
|
+
|
|
26
|
+
margin-top: auto;
|
|
27
|
+
padding: $unnnic-space-6;
|
|
28
|
+
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: $unnnic-space-2;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { type HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
import UnnnicButton from '@/components/Button/Button.vue';
|
|
5
|
+
import DrawerClose from './DrawerClose.vue';
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
name: 'UnnnicDrawerHeader',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
class?: HTMLAttributes['class'];
|
|
13
|
+
}>();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<header :class="cn('unnnic-drawer__header', props.class)">
|
|
18
|
+
<slot />
|
|
19
|
+
|
|
20
|
+
<template v-if="$slots.close">
|
|
21
|
+
<slot
|
|
22
|
+
name="close"
|
|
23
|
+
class="unnnic-drawer__close-button"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
26
|
+
<template v-else>
|
|
27
|
+
<DrawerClose>
|
|
28
|
+
<UnnnicButton
|
|
29
|
+
iconCenter="close"
|
|
30
|
+
size="small"
|
|
31
|
+
type="tertiary"
|
|
32
|
+
class="unnnic-drawer__close-button"
|
|
33
|
+
/>
|
|
34
|
+
</DrawerClose>
|
|
35
|
+
</template>
|
|
36
|
+
</header>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" scoped>
|
|
40
|
+
@use '@/assets/scss/unnnic' as *;
|
|
41
|
+
|
|
42
|
+
.unnnic-drawer__header {
|
|
43
|
+
display: grid;
|
|
44
|
+
align-items: center;
|
|
45
|
+
grid-template-columns: 1fr auto;
|
|
46
|
+
padding: $unnnic-space-6;
|
|
47
|
+
|
|
48
|
+
gap: $unnnic-space-1;
|
|
49
|
+
|
|
50
|
+
border-bottom: 1px solid $unnnic-color-border-soft;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.unnnic-drawer__close-button {
|
|
54
|
+
grid-column: 2 / 3;
|
|
55
|
+
grid-row: 1 / 2;
|
|
56
|
+
}
|
|
57
|
+
</style>
|