@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,326 @@
|
|
|
1
|
+
<!-- eslint-disable linebreak-style -->
|
|
2
|
+
<template>
|
|
3
|
+
<div :class="['unnnic-chart-line', { condensed }]">
|
|
4
|
+
<div
|
|
5
|
+
v-if="title"
|
|
6
|
+
class="header"
|
|
7
|
+
>
|
|
8
|
+
<div class="title unnnic-font secondary body-lg color-fg-base">
|
|
9
|
+
{{ title }}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="main">
|
|
14
|
+
<div class="reference">
|
|
15
|
+
<div class="values">
|
|
16
|
+
<div
|
|
17
|
+
v-for="(value, index) in [value(maxValue), value(maxValue / 2), 0]"
|
|
18
|
+
:key="index + Math.random() * 100"
|
|
19
|
+
class="value unnnic-font secondary body-md color-fg-muted"
|
|
20
|
+
>
|
|
21
|
+
{{ value }}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="unnnic-font secondary body-md color-fg-muted"> </div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="lines">
|
|
29
|
+
<div class="groups">
|
|
30
|
+
<div
|
|
31
|
+
v-for="({ data }, index) in data"
|
|
32
|
+
:key="index + Math.random() * 100"
|
|
33
|
+
>
|
|
34
|
+
<Lines
|
|
35
|
+
:data="data"
|
|
36
|
+
:fixedMaxValue="maxValue"
|
|
37
|
+
:fixedMinValue="minValue"
|
|
38
|
+
:color="colors[index]"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div
|
|
42
|
+
v-for="n in 3"
|
|
43
|
+
:key="n + Math.random() * 100"
|
|
44
|
+
class="horizontal-line color-fg-muted"
|
|
45
|
+
:style="{ top: `${(n - 1) * ((122 + 67) / 3) - 8}px` }"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="reference_values">
|
|
51
|
+
<div
|
|
52
|
+
v-for="(value, index) in lineData"
|
|
53
|
+
:key="index + Math.random() * 100"
|
|
54
|
+
class="title unnnic-font secondary body-md color-fg-muted"
|
|
55
|
+
>
|
|
56
|
+
{{ formatValue(value) }}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="labels">
|
|
60
|
+
<div
|
|
61
|
+
v-for="(chart, index) in data"
|
|
62
|
+
:key="index + Math.random() * 100"
|
|
63
|
+
class="label unnnic-font secondary body-lg color-fg-base"
|
|
64
|
+
>
|
|
65
|
+
<svg
|
|
66
|
+
width="15"
|
|
67
|
+
height="6"
|
|
68
|
+
viewBox="0 0 15 6"
|
|
69
|
+
fill="none"
|
|
70
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
71
|
+
>
|
|
72
|
+
<rect
|
|
73
|
+
width="15"
|
|
74
|
+
height="6"
|
|
75
|
+
rx="3"
|
|
76
|
+
:fill="colors[index]"
|
|
77
|
+
/>
|
|
78
|
+
</svg>
|
|
79
|
+
{{ chart.title }} <strong>{{ findTotals(chart.data) }}</strong>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
84
|
+
<!-- eslint-disable linebreak-style -->
|
|
85
|
+
<script>
|
|
86
|
+
import Lines from './Line/Line.vue';
|
|
87
|
+
|
|
88
|
+
export default {
|
|
89
|
+
components: {
|
|
90
|
+
Lines,
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
props: {
|
|
94
|
+
condensed: Boolean,
|
|
95
|
+
fixedMaxValue: Number,
|
|
96
|
+
data: Array,
|
|
97
|
+
title: String,
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
data() {
|
|
101
|
+
return {
|
|
102
|
+
titles: [],
|
|
103
|
+
colors: [
|
|
104
|
+
'#3182CE',
|
|
105
|
+
'#38A169',
|
|
106
|
+
'#DD6B20',
|
|
107
|
+
'#805AD5',
|
|
108
|
+
'#E53E3E',
|
|
109
|
+
'#00A49F',
|
|
110
|
+
'#D69E2E',
|
|
111
|
+
'#00DED2',
|
|
112
|
+
'#F6AD55',
|
|
113
|
+
'#570074',
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
computed: {
|
|
118
|
+
maxValue() {
|
|
119
|
+
return (
|
|
120
|
+
this.fixedMaxValue ||
|
|
121
|
+
Math.max(...this.data.map(({ data }) => this.findMax(data)).flat())
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
minValue() {
|
|
125
|
+
return Math.min(
|
|
126
|
+
...this.data.map(({ data }) => this.findMin(data)).flat(),
|
|
127
|
+
);
|
|
128
|
+
},
|
|
129
|
+
lineData() {
|
|
130
|
+
return this.data[0].data.map((item) => item.title);
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
methods: {
|
|
135
|
+
value(value) {
|
|
136
|
+
if (this.maxValue <= 1) {
|
|
137
|
+
return value.toFixed(1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return String(Math.ceil(value));
|
|
141
|
+
},
|
|
142
|
+
findMax(array) {
|
|
143
|
+
return Math.max(...array.map(({ value }) => value));
|
|
144
|
+
},
|
|
145
|
+
findMin(array) {
|
|
146
|
+
return Math.min(...array.map(({ value }) => value));
|
|
147
|
+
},
|
|
148
|
+
findTotals(array) {
|
|
149
|
+
const values = array.map(({ value }) => value);
|
|
150
|
+
return values.reduce(
|
|
151
|
+
(accumulator, currentValue) => accumulator + currentValue,
|
|
152
|
+
0,
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
formatValue(value) {
|
|
156
|
+
return ` ${new Date(value).toLocaleString('default', {
|
|
157
|
+
month: 'short',
|
|
158
|
+
})} ${new Date(value).getDate()}`;
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<style lang="scss" scoped>
|
|
165
|
+
@use '@/assets/scss/unnnic' as *;
|
|
166
|
+
|
|
167
|
+
.unnnic-chart-line {
|
|
168
|
+
background-color: $unnnic-color-bg-base;
|
|
169
|
+
border-radius: $unnnic-border-radius-md;
|
|
170
|
+
padding: $unnnic-spacing-inset-md;
|
|
171
|
+
box-sizing: border-box;
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
row-gap: $unnnic-spacing-stack-nano;
|
|
175
|
+
outline-style: solid;
|
|
176
|
+
outline-color: $unnnic-color-bg-muted;
|
|
177
|
+
outline-width: 1px;
|
|
178
|
+
outline-offset: -1px;
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 296px;
|
|
181
|
+
|
|
182
|
+
.header {
|
|
183
|
+
display: flex;
|
|
184
|
+
height: 24px;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.labels {
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: row;
|
|
191
|
+
flex-wrap: wrap;
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 80px;
|
|
194
|
+
justify-content: space-between;
|
|
195
|
+
margin: 5px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.titles {
|
|
199
|
+
display: flex;
|
|
200
|
+
width: 100%;
|
|
201
|
+
height: 32px;
|
|
202
|
+
.title {
|
|
203
|
+
flex: 1;
|
|
204
|
+
text-align: center;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
.reference_values {
|
|
208
|
+
display: flex;
|
|
209
|
+
flex-direction: row;
|
|
210
|
+
padding-left: 36px;
|
|
211
|
+
justify-content: space-around;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.condensed {
|
|
215
|
+
padding: $unnnic-spacing-inset-sm;
|
|
216
|
+
|
|
217
|
+
.main .reference {
|
|
218
|
+
margin-right: $unnnic-spacing-inline-sm;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.main {
|
|
223
|
+
height: 9.125 * $unnnic-font-size;
|
|
224
|
+
display: flex;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
align-items: center;
|
|
227
|
+
|
|
228
|
+
.reference {
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-direction: column;
|
|
231
|
+
row-gap: $unnnic-spacing-stack-nano;
|
|
232
|
+
margin-right: $unnnic-spacing-inline-md;
|
|
233
|
+
height: 146px;
|
|
234
|
+
padding-top: 48px;
|
|
235
|
+
align-items: center;
|
|
236
|
+
|
|
237
|
+
.values {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
justify-content: space-between;
|
|
241
|
+
text-align: right;
|
|
242
|
+
height: 122px;
|
|
243
|
+
width: 12px;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.lines {
|
|
248
|
+
width: 100%;
|
|
249
|
+
.groups {
|
|
250
|
+
display: flex;
|
|
251
|
+
flex: 1;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
row-gap: $unnnic-spacing-stack-nano;
|
|
254
|
+
width: 100%;
|
|
255
|
+
height: 122px;
|
|
256
|
+
position: relative;
|
|
257
|
+
|
|
258
|
+
.unnnic-tooltip:hover .bar {
|
|
259
|
+
width: 0;
|
|
260
|
+
height: 100%;
|
|
261
|
+
border-left: 1px dashed $unnnic-color-fg-base;
|
|
262
|
+
margin: 0 auto;
|
|
263
|
+
}
|
|
264
|
+
.horizontal-line {
|
|
265
|
+
width: 100%;
|
|
266
|
+
border-top: 0.5px dashed;
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
position: absolute;
|
|
270
|
+
transform: translateY(8px);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@each $name, $color in $scheme-colors {
|
|
278
|
+
.color-#{$name} {
|
|
279
|
+
color: $color;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.bg-#{$name} {
|
|
283
|
+
background-color: $color;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.unnnic-font {
|
|
288
|
+
font-weight: $unnnic-font-weight-regular;
|
|
289
|
+
font-family: $unnnic-font-family-primary;
|
|
290
|
+
|
|
291
|
+
$font-sizes:
|
|
292
|
+
'body-sm' $unnnic-font-size-body-sm,
|
|
293
|
+
'body-md' $unnnic-font-size-body-md,
|
|
294
|
+
'body-gt' $unnnic-font-size-body-gt,
|
|
295
|
+
'body-lg' $unnnic-font-size-body-lg,
|
|
296
|
+
'title-sm' $unnnic-font-size-title-sm,
|
|
297
|
+
'title-md' $unnnic-font-size-title-md,
|
|
298
|
+
'title-lg' $unnnic-font-size-title-lg,
|
|
299
|
+
'h4' $unnnic-font-size-h4,
|
|
300
|
+
'h3' $unnnic-font-size-h3,
|
|
301
|
+
'h2' $unnnic-font-size-h2,
|
|
302
|
+
'h1' $unnnic-font-size-h1;
|
|
303
|
+
|
|
304
|
+
$font-weights:
|
|
305
|
+
'black' $unnnic-font-weight-black,
|
|
306
|
+
'bold' $unnnic-font-weight-bold,
|
|
307
|
+
'light' $unnnic-font-weight-light;
|
|
308
|
+
|
|
309
|
+
&.secondary {
|
|
310
|
+
font-family: $unnnic-font-family-secondary;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@each $name, $size in $font-sizes {
|
|
314
|
+
&.#{$name} {
|
|
315
|
+
font-size: $size;
|
|
316
|
+
line-height: $size + $unnnic-line-height-md;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@each $name, $weight in $font-weights {
|
|
321
|
+
&.#{$name} {
|
|
322
|
+
font-weight: $weight;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
|
+
<template>
|
|
3
|
+
<div
|
|
4
|
+
ref="chart"
|
|
5
|
+
class="chart"
|
|
6
|
+
:style="{ backgroundImage: svgChart }"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
v-for="({ value }, index) in data"
|
|
10
|
+
:key="index + Math.random() * 100"
|
|
11
|
+
class="group"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
:style="{
|
|
15
|
+
transform: `translateY(-${(value / (maxValue - minValue)) * 122}px)`,
|
|
16
|
+
}"
|
|
17
|
+
class="tooltip"
|
|
18
|
+
>
|
|
19
|
+
{{ value }}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
props: {
|
|
27
|
+
fixedMaxValue: Number,
|
|
28
|
+
fixedMinValue: Number,
|
|
29
|
+
data: Array,
|
|
30
|
+
color: String,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
chartContainerWidth: 0,
|
|
36
|
+
chartContainerHeight: 122,
|
|
37
|
+
minValue: 0,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
maxValue() {
|
|
42
|
+
return (
|
|
43
|
+
this.fixedMaxValue ||
|
|
44
|
+
Math.max(...this.data.map(({ value }) => value).flat())
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
svgChart() {
|
|
49
|
+
const bars = this.data.map(
|
|
50
|
+
({ value }) =>
|
|
51
|
+
50 -
|
|
52
|
+
122 / 200 -
|
|
53
|
+
((value / this.maxValue) * (50 - 122 / 100) + Math.random() * 0.01),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const barWidth = 100 / bars.length;
|
|
57
|
+
const halfBar = barWidth / 2;
|
|
58
|
+
|
|
59
|
+
let path = '';
|
|
60
|
+
|
|
61
|
+
path += `L ${barWidth / 2} ${bars[0]}`;
|
|
62
|
+
|
|
63
|
+
let x = 0;
|
|
64
|
+
|
|
65
|
+
for (let i = 1; i < bars.length; i += 1) {
|
|
66
|
+
if (i === 1) {
|
|
67
|
+
x = barWidth * 1.5;
|
|
68
|
+
} else {
|
|
69
|
+
x += barWidth;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
path += `C ${x - halfBar} ${bars[i - 1]} ${x - halfBar} ${
|
|
73
|
+
bars[i]
|
|
74
|
+
} ${x} ${bars[i]}`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (bars.length <= 1) {
|
|
78
|
+
x += barWidth / 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
path += `L ${x + halfBar} ${bars[bars.length - 1]}`;
|
|
82
|
+
|
|
83
|
+
const svg = `
|
|
84
|
+
<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 100 50" width="100%" height="100%">
|
|
85
|
+
<defs>
|
|
86
|
+
<linearGradient id="linear" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
87
|
+
<stop offset="0%" stop-color="${this.color}" stop-opacity="1" />
|
|
88
|
+
</linearGradient>
|
|
89
|
+
</defs>
|
|
90
|
+
|
|
91
|
+
<g style="transform: scaleX(${
|
|
92
|
+
this.chartContainerWidth / ((122 / 50) * 100)
|
|
93
|
+
}); transform-origin: center;">
|
|
94
|
+
<path fill="url(#linear1)" d="M0 50 L0 ${
|
|
95
|
+
String(bars[0]) + path
|
|
96
|
+
} L100 100Z" />
|
|
97
|
+
<path fill="none" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="url(#linear)" d="M0 ${
|
|
98
|
+
String(bars[0]) + path
|
|
99
|
+
}" />
|
|
100
|
+
</g>
|
|
101
|
+
</svg>
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
mounted() {
|
|
109
|
+
this.chartContainerWidth = this.$refs.chart.offsetWidth;
|
|
110
|
+
this.chartContainerHeigth = this.$refs.chart.offsetHeight;
|
|
111
|
+
if (this.maxValue !== this.findMax(this.data)) {
|
|
112
|
+
this.minValue = this.findMin(this.data);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
methods: {
|
|
116
|
+
findMax(array) {
|
|
117
|
+
return Math.max(...array.map(({ value }) => value));
|
|
118
|
+
},
|
|
119
|
+
findMin(array) {
|
|
120
|
+
return Math.min(...array.map(({ value }) => value));
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style lang="scss">
|
|
127
|
+
@use '@/assets/scss/unnnic' as *;
|
|
128
|
+
.chart {
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
background-repeat: no-repeat;
|
|
132
|
+
background-size: 100% 100%;
|
|
133
|
+
flex: 1;
|
|
134
|
+
display: flex;
|
|
135
|
+
position: absolute;
|
|
136
|
+
.unnnic-tooltip:hover .bar {
|
|
137
|
+
width: 0;
|
|
138
|
+
height: 100%;
|
|
139
|
+
border-left: 1px dashed $unnnic-color-fg-base;
|
|
140
|
+
margin: 0 auto;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.group {
|
|
145
|
+
flex: 1;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
justify-content: flex-end;
|
|
149
|
+
|
|
150
|
+
.tooltip {
|
|
151
|
+
display: flex;
|
|
152
|
+
height: 5px;
|
|
153
|
+
color: transparent;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
align-items: flex-end;
|
|
156
|
+
position: relative;
|
|
157
|
+
z-index: 99;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.tooltip:hover {
|
|
162
|
+
display: flex;
|
|
163
|
+
color: $unnnic-color-fg-base;
|
|
164
|
+
font-family: $unnnic-font-family-primary;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
align-items: flex-end;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="unnnic-chart-rainbow">
|
|
3
|
+
<svg
|
|
4
|
+
width="332"
|
|
5
|
+
height="166"
|
|
6
|
+
class="semicircle"
|
|
7
|
+
>
|
|
8
|
+
<defs xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<linearGradient
|
|
10
|
+
id="paint0_linear_10224_36584"
|
|
11
|
+
x1="178"
|
|
12
|
+
y1="45"
|
|
13
|
+
x2="28"
|
|
14
|
+
y2="198"
|
|
15
|
+
gradientUnits="userSpaceOnUse"
|
|
16
|
+
>
|
|
17
|
+
<stop stop-color="#00DED2" />
|
|
18
|
+
<stop
|
|
19
|
+
offset="1"
|
|
20
|
+
stop-color="#00DED2"
|
|
21
|
+
stop-opacity="0"
|
|
22
|
+
/>
|
|
23
|
+
</linearGradient>
|
|
24
|
+
</defs>
|
|
25
|
+
|
|
26
|
+
<path
|
|
27
|
+
id="path"
|
|
28
|
+
ref="background"
|
|
29
|
+
fill="none"
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
class="background"
|
|
32
|
+
stroke-width="26.56px"
|
|
33
|
+
></path>
|
|
34
|
+
|
|
35
|
+
<path
|
|
36
|
+
id="path"
|
|
37
|
+
ref="front"
|
|
38
|
+
fill="none"
|
|
39
|
+
stroke-linecap="round"
|
|
40
|
+
class="front"
|
|
41
|
+
stroke-width="26.56px"
|
|
42
|
+
></path>
|
|
43
|
+
</svg>
|
|
44
|
+
|
|
45
|
+
<div class="content">
|
|
46
|
+
<div class="percentage">
|
|
47
|
+
<span class="number">{{ modelValue }} </span>
|
|
48
|
+
<span class="symbol">%</span>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
v-if="description"
|
|
53
|
+
class="description"
|
|
54
|
+
>
|
|
55
|
+
{{ description }}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
export default {
|
|
63
|
+
components: {},
|
|
64
|
+
|
|
65
|
+
props: {
|
|
66
|
+
modelValue: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
description: {
|
|
72
|
+
type: String,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
watch: {
|
|
77
|
+
modelValue() {
|
|
78
|
+
this.updateChartSvg();
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
mounted() {
|
|
83
|
+
this.updateChartSvg();
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
methods: {
|
|
87
|
+
updateChartSvg() {
|
|
88
|
+
function polarToCartesian(centerX, centerY, radius, angleInDegrees) {
|
|
89
|
+
const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
x: centerX + radius * Math.cos(angleInRadians),
|
|
93
|
+
y: centerY + radius * Math.sin(angleInRadians),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function describeArc(
|
|
98
|
+
x,
|
|
99
|
+
y,
|
|
100
|
+
innerRadius,
|
|
101
|
+
outerRadius,
|
|
102
|
+
startAngle,
|
|
103
|
+
endAngle,
|
|
104
|
+
) {
|
|
105
|
+
const radius = innerRadius;
|
|
106
|
+
const spread = outerRadius - innerRadius;
|
|
107
|
+
const outerStart = polarToCartesian(x, y, radius + spread, endAngle);
|
|
108
|
+
const outerEnd = polarToCartesian(x, y, radius + spread, startAngle);
|
|
109
|
+
|
|
110
|
+
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
|
|
111
|
+
|
|
112
|
+
const d = [
|
|
113
|
+
'M',
|
|
114
|
+
outerStart.x,
|
|
115
|
+
outerStart.y,
|
|
116
|
+
'A',
|
|
117
|
+
radius + spread,
|
|
118
|
+
radius + spread,
|
|
119
|
+
0,
|
|
120
|
+
largeArcFlag,
|
|
121
|
+
0,
|
|
122
|
+
outerEnd.x,
|
|
123
|
+
outerEnd.y,
|
|
124
|
+
].join(' ');
|
|
125
|
+
|
|
126
|
+
return d;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const path = describeArc(166, 166, 139.44, 152.72, -85, 85);
|
|
130
|
+
|
|
131
|
+
this.$refs.background.setAttribute('d', path);
|
|
132
|
+
|
|
133
|
+
this.$refs.front.setAttribute(
|
|
134
|
+
'd',
|
|
135
|
+
describeArc(
|
|
136
|
+
166,
|
|
137
|
+
166,
|
|
138
|
+
139.44,
|
|
139
|
+
152.72,
|
|
140
|
+
-85,
|
|
141
|
+
-85 + (this.modelValue / 100) * 170,
|
|
142
|
+
),
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style lang="scss" scoped>
|
|
150
|
+
@use '@/assets/scss/unnnic' as *;
|
|
151
|
+
|
|
152
|
+
.unnnic-chart-rainbow {
|
|
153
|
+
position: relative;
|
|
154
|
+
width: fit-content;
|
|
155
|
+
|
|
156
|
+
.semicircle {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.background {
|
|
161
|
+
stroke: $unnnic-color-bg-base-soft;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.front {
|
|
165
|
+
stroke: url(#paint0_linear_10224_36584);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.content {
|
|
169
|
+
position: absolute;
|
|
170
|
+
bottom: 0;
|
|
171
|
+
text-align: center;
|
|
172
|
+
width: 100%;
|
|
173
|
+
|
|
174
|
+
.percentage {
|
|
175
|
+
font-family: $unnnic-font-family-secondary;
|
|
176
|
+
font-weight: $unnnic-font-weight-black;
|
|
177
|
+
|
|
178
|
+
.number {
|
|
179
|
+
color: $unnnic-color-fg-emphasized;
|
|
180
|
+
font-size: $unnnic-font-size-h3;
|
|
181
|
+
line-height: $unnnic-font-size-h3 + $unnnic-line-height-md;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.symbol {
|
|
185
|
+
color: $unnnic-color-fg-muted;
|
|
186
|
+
font-size: $unnnic-font-size-h4;
|
|
187
|
+
line-height: $unnnic-font-size-h4 + $unnnic-line-height-md;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.description {
|
|
192
|
+
color: $unnnic-color-fg-muted;
|
|
193
|
+
font-family: $unnnic-font-family-secondary;
|
|
194
|
+
font-size: $unnnic-font-size-body-lg;
|
|
195
|
+
line-height: $unnnic-font-size-body-lg + $unnnic-line-height-md;
|
|
196
|
+
font-weight: $unnnic-font-weight-regular;
|
|
197
|
+
margin-top: $unnnic-spacing-stack-nano;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
</style>
|