vlite3 0.1.0 → 0.1.2
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/components/Accordion/Accordion.vue.d.ts +44 -0
- package/components/Accordion/Accordion.vue.js +95 -0
- package/components/Accordion/Accordion.vue2.js +4 -0
- package/components/Accordion/AccordionContent.vue.d.ts +22 -0
- package/components/Accordion/AccordionContent.vue.js +7 -0
- package/components/Accordion/AccordionContent.vue2.js +47 -0
- package/components/Accordion/AccordionItem.vue.d.ts +56 -0
- package/components/Accordion/AccordionItem.vue.js +115 -0
- package/components/Accordion/AccordionItem.vue2.js +4 -0
- package/components/Accordion/AccordionTrigger.vue.d.ts +43 -0
- package/components/Accordion/AccordionTrigger.vue.js +94 -0
- package/components/Accordion/AccordionTrigger.vue2.js +4 -0
- package/components/Accordion/index.d.ts +5 -0
- package/components/Accordion/types.d.ts +33 -0
- package/components/Alert.vue.d.ts +36 -0
- package/components/Alert.vue.js +84 -0
- package/components/Alert.vue2.js +4 -0
- package/components/Avatar.vue.d.ts +32 -0
- package/components/Avatar.vue.js +78 -0
- package/components/Avatar.vue2.js +4 -0
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +32 -0
- package/components/AvatarUploader/AvatarUploader.vue.js +99 -0
- package/components/AvatarUploader/AvatarUploader.vue2.js +4 -0
- package/{src/components/AvatarUploader/index.ts → components/AvatarUploader/index.d.ts} +2 -2
- package/components/Badge.vue.d.ts +25 -0
- package/components/Badge.vue.js +27 -0
- package/components/Badge.vue2.js +4 -0
- package/components/Button.vue.d.ts +26 -0
- package/components/Button.vue.js +107 -0
- package/components/Button.vue2.js +4 -0
- package/components/ButtonGroup.vue.d.ts +29 -0
- package/components/ButtonGroup.vue.js +7 -0
- package/components/ButtonGroup.vue2.js +30 -0
- package/components/Carousel/Carousel.vue.d.ts +847 -0
- package/components/Carousel/Carousel.vue.js +7 -0
- package/components/Carousel/Carousel.vue2.js +68 -0
- package/components/Carousel/index.d.ts +2 -0
- package/components/Carousel/types.d.ts +24 -0
- package/components/CheckBox.vue.d.ts +27 -0
- package/components/CheckBox.vue.js +115 -0
- package/components/CheckBox.vue2.js +4 -0
- package/components/Chip/Chip.vue.d.ts +33 -0
- package/components/Chip/Chip.vue.js +113 -0
- package/components/Chip/Chip.vue2.js +4 -0
- package/components/Chip/index.d.ts +2 -0
- package/components/Chip/types.d.ts +12 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +32 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +141 -0
- package/components/ChoiceBox/ChoiceBox.vue2.js +4 -0
- package/components/ChoiceBox/index.d.ts +2 -0
- package/components/ColorPicker/ColorIro.vue.d.ts +18 -0
- package/components/ColorPicker/ColorIro.vue.js +142 -0
- package/components/ColorPicker/ColorIro.vue3.js +5 -0
- package/components/ColorPicker/ColorPicker.vue.d.ts +22 -0
- package/components/ColorPicker/ColorPicker.vue.js +56 -0
- package/components/ColorPicker/ColorPicker.vue2.js +4 -0
- package/components/ConfirmationModal.vue.d.ts +39 -0
- package/components/ConfirmationModal.vue.js +55 -0
- package/components/ConfirmationModal.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.d.ts +60 -0
- package/components/DataTable/DataTable.vue.js +7 -0
- package/components/DataTable/DataTable.vue2.js +310 -0
- package/components/DataTable/DataTableHeader.vue.d.ts +14 -0
- package/components/DataTable/DataTableHeader.vue.js +49 -0
- package/components/DataTable/DataTableHeader.vue2.js +4 -0
- package/components/DataTable/DataTableRow.vue.d.ts +51 -0
- package/components/DataTable/DataTableRow.vue.js +114 -0
- package/components/DataTable/DataTableRow.vue2.js +4 -0
- package/components/DataTable/DataTableToolbar.vue.d.ts +31 -0
- package/components/DataTable/DataTableToolbar.vue.js +45 -0
- package/components/DataTable/DataTableToolbar.vue2.js +4 -0
- package/components/DataTable/index.d.ts +4 -0
- package/components/DataTable/types.d.ts +75 -0
- package/components/DatePicker.vue.d.ts +44 -0
- package/components/DatePicker.vue.js +84 -0
- package/components/DatePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +105 -0
- package/components/Dropdown/Dropdown.vue.js +206 -0
- package/components/Dropdown/Dropdown.vue2.js +4 -0
- package/components/Dropdown/DropdownBooleanItem.vue.d.ts +12 -0
- package/components/Dropdown/DropdownBooleanItem.vue.js +41 -0
- package/components/Dropdown/DropdownBooleanItem.vue2.js +4 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +21 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.js +73 -0
- package/components/Dropdown/DropdownGroupedLayout.vue2.js +4 -0
- package/components/Dropdown/DropdownItem.vue.d.ts +35 -0
- package/components/Dropdown/DropdownItem.vue.js +56 -0
- package/components/Dropdown/DropdownItem.vue2.js +4 -0
- package/components/Dropdown/DropdownMenu.vue.d.ts +73 -0
- package/components/Dropdown/DropdownMenu.vue.js +232 -0
- package/components/Dropdown/DropdownMenu.vue2.js +4 -0
- package/components/Dropdown/DropdownTrigger.vue.d.ts +15 -0
- package/components/Dropdown/DropdownTrigger.vue.js +26 -0
- package/components/Dropdown/DropdownTrigger.vue2.js +4 -0
- package/components/Dropdown/composables/useDropdownIds.d.ts +5 -0
- package/components/Dropdown/composables/useDropdownIds.js +20 -0
- package/components/Dropdown/composables/useDropdownNavigation.d.ts +19 -0
- package/components/Dropdown/composables/useDropdownNavigation.js +49 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +16 -0
- package/components/Dropdown/composables/useDropdownSelection.js +41 -0
- package/components/Dropdown/index.d.ts +6 -0
- package/components/FilePicker/FilePicker.vue.d.ts +65 -0
- package/components/FilePicker/FilePicker.vue.js +285 -0
- package/components/FilePicker/FilePicker.vue2.js +4 -0
- package/components/FilePicker/index.d.ts +2 -0
- package/components/FileTree/FileTree.vue.d.ts +20 -0
- package/components/FileTree/FileTree.vue.js +139 -0
- package/components/FileTree/FileTree.vue2.js +4 -0
- package/components/FileTree/FileTreeNode.vue.d.ts +28 -0
- package/components/FileTree/FileTreeNode.vue.js +184 -0
- package/components/FileTree/FileTreeNode.vue2.js +4 -0
- package/components/FileTree/index.d.ts +4 -0
- package/components/FileTree/types.d.ts +36 -0
- package/components/FileTree/useTreeSelection.d.ts +12 -0
- package/components/FileTree/useTreeSelection.js +25 -0
- package/components/Form/CustomFields.vue.d.ts +38 -0
- package/components/Form/CustomFields.vue.js +7 -0
- package/components/Form/CustomFields.vue2.js +161 -0
- package/components/Form/Form.vue.d.ts +94 -0
- package/components/Form/Form.vue.js +7 -0
- package/components/Form/Form.vue2.js +238 -0
- package/components/Form/FormField.vue.d.ts +28 -0
- package/components/Form/FormField.vue.js +207 -0
- package/components/Form/FormField.vue2.js +4 -0
- package/components/Form/FormFields.vue.d.ts +29 -0
- package/components/Form/FormFields.vue.js +7 -0
- package/components/Form/FormFields.vue2.js +95 -0
- package/components/Form/composables/useFileUpload.d.ts +24 -0
- package/components/Form/composables/useFileUpload.js +40 -0
- package/components/Form/composables/useForm.d.ts +48 -0
- package/components/Form/composables/useForm.js +109 -0
- package/components/Form/index.d.ts +9 -0
- package/components/Form/types.d.ts +167 -0
- package/components/Form/utils/form.utils.d.ts +44 -0
- package/components/Form/utils/form.utils.js +97 -0
- package/components/Heatmap/Heatmap.vue.d.ts +26 -0
- package/components/Heatmap/Heatmap.vue.js +7 -0
- package/components/Heatmap/Heatmap.vue2.js +326 -0
- package/components/Heatmap/index.d.ts +2 -0
- package/components/Heatmap/types.d.ts +66 -0
- package/components/Icon.vue.d.ts +7 -0
- package/components/Icon.vue.js +25 -0
- package/components/Icon.vue2.js +4 -0
- package/components/IconPicker.vue.d.ts +38 -0
- package/components/IconPicker.vue.js +124 -0
- package/components/IconPicker.vue2.js +4 -0
- package/components/Input.vue.d.ts +54 -0
- package/components/Input.vue.js +267 -0
- package/components/Input.vue2.js +4 -0
- package/components/Label.vue.d.ts +23 -0
- package/components/Label.vue.js +23 -0
- package/components/Label.vue2.js +4 -0
- package/components/Logo.vue.d.ts +2 -0
- package/components/Logo.vue.js +10 -0
- package/components/Logo.vue2.js +4 -0
- package/components/Masonry/Masonry.vue.d.ts +31 -0
- package/components/Masonry/Masonry.vue.js +7 -0
- package/components/Masonry/Masonry.vue2.js +83 -0
- package/components/Masonry/index.d.ts +2 -0
- package/components/Masonry/types.d.ts +33 -0
- package/components/Masonry/types.js +10 -0
- package/components/Modal.vue.d.ts +52 -0
- package/components/Modal.vue.js +116 -0
- package/components/Modal.vue2.js +4 -0
- package/components/MultiSelect/MultiSelect.vue.d.ts +40 -0
- package/components/MultiSelect/MultiSelect.vue.js +126 -0
- package/components/MultiSelect/MultiSelect.vue2.js +4 -0
- package/components/MultiSelect/index.d.ts +1 -0
- package/components/Navbar/Navbar.vue.d.ts +51 -0
- package/components/Navbar/Navbar.vue.js +198 -0
- package/components/Navbar/Navbar.vue2.js +4 -0
- package/components/Navbar/NavbarGroup.vue.d.ts +24 -0
- package/components/Navbar/NavbarGroup.vue.js +23 -0
- package/components/Navbar/NavbarGroup.vue2.js +4 -0
- package/components/Navbar/NavbarItem.vue.d.ts +40 -0
- package/components/Navbar/NavbarItem.vue.js +104 -0
- package/components/Navbar/NavbarItem.vue2.js +4 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/OTPInput/OTPInput.vue.d.ts +33 -0
- package/components/OTPInput/OTPInput.vue.js +115 -0
- package/components/OTPInput/OTPInput.vue2.js +4 -0
- package/components/OTPInput/index.d.ts +1 -0
- package/components/Pagination/Pagination.vue.d.ts +34 -0
- package/components/Pagination/Pagination.vue.js +196 -0
- package/components/Pagination/Pagination.vue2.js +4 -0
- package/components/Pagination/index.d.ts +1 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +22 -0
- package/components/PricingPlan/PricingPlan.vue.js +55 -0
- package/components/PricingPlan/PricingPlan.vue2.js +4 -0
- package/components/PricingPlan/PricingPlanItem.vue.d.ts +17 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +94 -0
- package/components/PricingPlan/PricingPlanItem.vue2.js +4 -0
- package/components/PricingPlan/index.d.ts +3 -0
- package/components/PricingPlan/types.d.ts +25 -0
- package/components/SidePanel.vue.d.ts +64 -0
- package/components/SidePanel.vue.js +7 -0
- package/components/SidePanel.vue2.js +131 -0
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +11 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +78 -0
- package/components/SidebarMenu/SidebarMenu.vue2.js +4 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +269 -0
- package/components/SidebarMenu/SidebarMenuItem.vue3.js +5 -0
- package/components/SidebarMenu/index.d.ts +3 -0
- package/components/SidebarMenu/types.d.ts +35 -0
- package/components/Slider.vue.d.ts +31 -0
- package/components/Slider.vue.js +157 -0
- package/components/Slider.vue2.js +4 -0
- package/components/Switch.vue.d.ts +16 -0
- package/components/Switch.vue.js +40 -0
- package/components/Switch.vue2.js +4 -0
- package/components/Tabes/Tabes.vue.d.ts +21 -0
- package/components/Tabes/Tabes.vue.js +75 -0
- package/components/Tabes/Tabes.vue2.js +4 -0
- package/components/Tabes/index.d.ts +2 -0
- package/components/Tabes/types.d.ts +8 -0
- package/components/Textarea.vue.d.ts +22 -0
- package/components/Textarea.vue.js +34 -0
- package/components/Textarea.vue2.js +4 -0
- package/components/ThemeToggle.vue.d.ts +2 -0
- package/components/ThemeToggle.vue.js +18 -0
- package/components/ThemeToggle.vue2.js +4 -0
- package/components/Timeline.vue.d.ts +39 -0
- package/components/Timeline.vue.js +174 -0
- package/components/Timeline.vue2.js +4 -0
- package/components/ToastNotification.vue.d.ts +7 -0
- package/components/ToastNotification.vue.js +7 -0
- package/components/ToastNotification.vue2.js +151 -0
- package/components/Tooltip.vue.d.ts +31 -0
- package/components/Tooltip.vue.js +45 -0
- package/components/Tooltip.vue2.js +4 -0
- package/components/Workbook/Sheet.vue.d.ts +38 -0
- package/components/Workbook/Sheet.vue.js +141 -0
- package/components/Workbook/Sheet.vue2.js +4 -0
- package/components/Workbook/Workbook.vue.d.ts +54 -0
- package/components/Workbook/Workbook.vue.js +7 -0
- package/components/Workbook/Workbook.vue2.js +146 -0
- package/components/Workbook/WorkbookAddButton.vue.d.ts +6 -0
- package/components/Workbook/WorkbookAddButton.vue.js +20 -0
- package/components/Workbook/WorkbookAddButton.vue2.js +4 -0
- package/components/Workbook/index.d.ts +3 -0
- package/components/Workbook/types.d.ts +34 -0
- package/composables/useKeyStroke.d.ts +21 -0
- package/composables/useKeyStroke.js +93 -0
- package/composables/useNotifications.d.ts +113 -0
- package/composables/useNotifications.js +99 -0
- package/composables/useTheme.d.ts +6 -0
- package/composables/useTheme.js +32 -0
- package/core/config.d.ts +29 -0
- package/core/config.js +12 -0
- package/core/index.d.ts +31 -0
- package/core/index.js +15 -0
- package/directives/vRipple.d.ts +4 -0
- package/directives/vRipple.js +17 -0
- package/index.d.ts +49 -0
- package/index.js +156 -0
- package/package.json +2 -2
- package/style.css +590 -0
- package/types/alert.type.d.ts +10 -0
- package/{src/types/avatar.type.ts → types/avatar.type.d.ts} +8 -9
- package/types/button.d.ts +15 -0
- package/types/buttongroup.type.d.ts +1 -0
- package/{src/types/config.type.ts → types/config.type.d.ts} +13 -16
- package/types/form.type.d.ts +45 -0
- package/types/index.d.ts +10 -0
- package/types/navbar.type.d.ts +27 -0
- package/types/sidepanel.type.d.ts +13 -0
- package/types/styles.d.ts +28 -0
- package/types/timeline.type.d.ts +9 -0
- package/{src/utils/functions.ts → utils/functions.d.ts} +1 -9
- package/utils/functions.js +11 -0
- package/utils/index.d.ts +2 -0
- package/utils/object.d.ts +6 -0
- package/utils/object.js +14 -0
- package/.vscode/extensions.json +0 -3
- package/LICENSE +0 -21
- package/index.html +0 -16
- package/scripts/bundle-css.js +0 -45
- package/src/App.vue +0 -7
- package/src/components/Accordion/Accordion.vue +0 -139
- package/src/components/Accordion/AccordionContent.vue +0 -63
- package/src/components/Accordion/AccordionItem.vue +0 -163
- package/src/components/Accordion/AccordionTrigger.vue +0 -125
- package/src/components/Accordion/index.ts +0 -5
- package/src/components/Accordion/types.ts +0 -41
- package/src/components/Alert.vue +0 -112
- package/src/components/Avatar.vue +0 -110
- package/src/components/AvatarUploader/AvatarUploader.vue +0 -129
- package/src/components/Badge.vue +0 -45
- package/src/components/Button.vue +0 -122
- package/src/components/ButtonGroup.vue +0 -173
- package/src/components/Carousel/Carousel.vue +0 -84
- package/src/components/Carousel/index.ts +0 -2
- package/src/components/Carousel/types.ts +0 -25
- package/src/components/CheckBox.vue +0 -132
- package/src/components/Chip/Chip.vue +0 -158
- package/src/components/Chip/index.ts +0 -2
- package/src/components/Chip/types.ts +0 -23
- package/src/components/ChoiceBox/ChoiceBox.vue +0 -181
- package/src/components/ChoiceBox/index.ts +0 -2
- package/src/components/ColorPicker/ColorIro.vue +0 -207
- package/src/components/ColorPicker/ColorPicker.vue +0 -61
- package/src/components/ConfirmationModal.vue +0 -46
- package/src/components/DataTable/DataTable.vue +0 -478
- package/src/components/DataTable/DataTableHeader.vue +0 -78
- package/src/components/DataTable/DataTableRow.vue +0 -171
- package/src/components/DataTable/DataTableToolbar.vue +0 -45
- package/src/components/DataTable/index.ts +0 -5
- package/src/components/DataTable/types.ts +0 -85
- package/src/components/DatePicker.vue +0 -102
- package/src/components/Dropdown/Dropdown.vue +0 -348
- package/src/components/Dropdown/DropdownBooleanItem.vue +0 -40
- package/src/components/Dropdown/DropdownGroupedLayout.vue +0 -115
- package/src/components/Dropdown/DropdownItem.vue +0 -56
- package/src/components/Dropdown/DropdownMenu.vue +0 -374
- package/src/components/Dropdown/DropdownTrigger.vue +0 -27
- package/src/components/Dropdown/composables/useDropdownIds.ts +0 -27
- package/src/components/Dropdown/composables/useDropdownNavigation.ts +0 -109
- package/src/components/Dropdown/composables/useDropdownSelection.ts +0 -106
- package/src/components/Dropdown/index.ts +0 -6
- package/src/components/FilePicker/FilePicker.vue +0 -459
- package/src/components/FilePicker/index.ts +0 -2
- package/src/components/FileTree/FileTree.vue +0 -334
- package/src/components/FileTree/FileTreeNode.vue +0 -225
- package/src/components/FileTree/index.ts +0 -2
- package/src/components/FileTree/types.ts +0 -31
- package/src/components/FileTree/useTreeSelection.ts +0 -66
- package/src/components/Form/CustomFields.vue +0 -294
- package/src/components/Form/Form.vue +0 -406
- package/src/components/Form/FormField.vue +0 -404
- package/src/components/Form/FormFields.vue +0 -161
- package/src/components/Form/composables/useFileUpload.ts +0 -112
- package/src/components/Form/composables/useForm.ts +0 -356
- package/src/components/Form/index.ts +0 -16
- package/src/components/Form/types.ts +0 -203
- package/src/components/Form/utils/form.utils.ts +0 -209
- package/src/components/Heatmap/Heatmap.vue +0 -629
- package/src/components/Heatmap/index.ts +0 -2
- package/src/components/Heatmap/types.ts +0 -84
- package/src/components/Icon.vue +0 -47
- package/src/components/IconPicker.vue +0 -138
- package/src/components/Input.vue +0 -366
- package/src/components/Label.vue +0 -25
- package/src/components/Logo.vue +0 -5
- package/src/components/Masonry/Masonry.vue +0 -148
- package/src/components/Masonry/index.ts +0 -2
- package/src/components/Masonry/types.ts +0 -44
- package/src/components/Modal.vue +0 -135
- package/src/components/MultiSelect/MultiSelect.vue +0 -176
- package/src/components/MultiSelect/index.ts +0 -1
- package/src/components/Navbar/Navbar.vue +0 -277
- package/src/components/Navbar/NavbarGroup.vue +0 -27
- package/src/components/Navbar/NavbarItem.vue +0 -124
- package/src/components/Navbar/index.ts +0 -3
- package/src/components/OTPInput/OTPInput.vue +0 -220
- package/src/components/OTPInput/index.ts +0 -1
- package/src/components/Pagination/Pagination.vue +0 -238
- package/src/components/Pagination/index.ts +0 -1
- package/src/components/PricingPlan/PricingPlan.vue +0 -102
- package/src/components/PricingPlan/PricingPlanItem.vue +0 -148
- package/src/components/PricingPlan/index.ts +0 -3
- package/src/components/PricingPlan/types.ts +0 -29
- package/src/components/SidePanel.vue +0 -184
- package/src/components/SidebarMenu/SidebarMenu.vue +0 -146
- package/src/components/SidebarMenu/SidebarMenuItem.vue +0 -333
- package/src/components/SidebarMenu/index.ts +0 -3
- package/src/components/SidebarMenu/types.ts +0 -54
- package/src/components/Slider.vue +0 -181
- package/src/components/Switch.vue +0 -51
- package/src/components/Tabes/Tabes.vue +0 -112
- package/src/components/Tabes/index.ts +0 -2
- package/src/components/Tabes/types.ts +0 -17
- package/src/components/Textarea.vue +0 -48
- package/src/components/ThemeToggle.vue +0 -14
- package/src/components/Timeline.vue +0 -250
- package/src/components/ToastNotification.vue +0 -257
- package/src/components/Tooltip.vue +0 -25
- package/src/components/Workbook/Sheet.vue +0 -185
- package/src/components/Workbook/Workbook.vue +0 -231
- package/src/components/Workbook/WorkbookAddButton.vue +0 -17
- package/src/components/Workbook/index.ts +0 -3
- package/src/components/Workbook/types.ts +0 -43
- package/src/composables/useKeyStroke.ts +0 -291
- package/src/composables/useNotifications.ts +0 -206
- package/src/composables/useTheme.ts +0 -55
- package/src/core/config.ts +0 -37
- package/src/core/index.ts +0 -49
- package/src/css/base.css +0 -148
- package/src/css/input.css +0 -61
- package/src/css/main.css +0 -6
- package/src/css/theme.css +0 -344
- package/src/directives/vRipple.ts +0 -38
- package/src/index.ts +0 -53
- package/src/main.ts +0 -5
- package/src/playground/Playground.vue +0 -429
- package/src/playground/composables/useGetUsers.ts +0 -538
- package/src/playground/demos/AccordionDemo.vue +0 -361
- package/src/playground/demos/AlertDemo.vue +0 -36
- package/src/playground/demos/AvatarDemo.vue +0 -41
- package/src/playground/demos/AvatarUploaderDemo.vue +0 -133
- package/src/playground/demos/BadgeDemo.vue +0 -31
- package/src/playground/demos/BadgesDemo.vue +0 -26
- package/src/playground/demos/ButtonDemo.vue +0 -99
- package/src/playground/demos/ButtonGroupDemo.vue +0 -39
- package/src/playground/demos/ButtonsDemo.vue +0 -111
- package/src/playground/demos/CarouselDemo.vue +0 -135
- package/src/playground/demos/CheckBoxDemo.vue +0 -43
- package/src/playground/demos/ChipDemo.vue +0 -190
- package/src/playground/demos/ChoiceBoxDemo.vue +0 -160
- package/src/playground/demos/ColorPickerDemo.vue +0 -30
- package/src/playground/demos/ColorsDemo.vue +0 -295
- package/src/playground/demos/DataTableDemo.vue +0 -215
- package/src/playground/demos/DatePickerDemo.vue +0 -43
- package/src/playground/demos/DisplayDemo.vue +0 -101
- package/src/playground/demos/DropdownDemo.vue +0 -651
- package/src/playground/demos/FilePickerDemo.vue +0 -175
- package/src/playground/demos/FileTreeDemo.vue +0 -150
- package/src/playground/demos/FormDemo.vue +0 -1144
- package/src/playground/demos/HeatmapDemo.vue +0 -467
- package/src/playground/demos/IconPickerDemo.vue +0 -27
- package/src/playground/demos/InputDemo.vue +0 -80
- package/src/playground/demos/InputsDemo.vue +0 -127
- package/src/playground/demos/LabelDemo.vue +0 -32
- package/src/playground/demos/MasonryDemo.vue +0 -241
- package/src/playground/demos/ModalDemo.vue +0 -67
- package/src/playground/demos/MultiSelectDemo.vue +0 -300
- package/src/playground/demos/NavbarDemo.vue +0 -59
- package/src/playground/demos/NavigationDemo.vue +0 -116
- package/src/playground/demos/OTPInputDemo.vue +0 -170
- package/src/playground/demos/OverlaysDemo.vue +0 -104
- package/src/playground/demos/PaginationDemo.vue +0 -130
- package/src/playground/demos/PricingPlanDemo.vue +0 -110
- package/src/playground/demos/SidePanelDemo.vue +0 -45
- package/src/playground/demos/SidebarMenuDemo.vue +0 -170
- package/src/playground/demos/SliderDemo.vue +0 -48
- package/src/playground/demos/SwitchDemo.vue +0 -40
- package/src/playground/demos/TabesDemo.vue +0 -178
- package/src/playground/demos/TextareaDemo.vue +0 -31
- package/src/playground/demos/ThemeToggleDemo.vue +0 -20
- package/src/playground/demos/TimelineDemo.vue +0 -43
- package/src/playground/demos/ToastDemo.vue +0 -111
- package/src/playground/demos/TooltipDemo.vue +0 -30
- package/src/playground/demos/WorkbookDemo.vue +0 -227
- package/src/types/alert.type.ts +0 -11
- package/src/types/button.ts +0 -36
- package/src/types/buttongroup.type.ts +0 -1
- package/src/types/form.type.ts +0 -75
- package/src/types/index.ts +0 -11
- package/src/types/navbar.type.ts +0 -28
- package/src/types/sidepanel.type.ts +0 -14
- package/src/types/styles.ts +0 -42
- package/src/types/timeline.type.ts +0 -11
- package/src/utils/index.ts +0 -2
- package/src/utils/object.ts +0 -40
- package/tsconfig.app.json +0 -27
- package/tsconfig.json +0 -48
- package/tsconfig.node.json +0 -18
- package/tsconfig.node.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/vercel.json +0 -8
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -63
- package/vite.config.ts +0 -64
- package/vite.config.vercel.ts +0 -17
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import Icon from './Icon.vue'
|
|
4
|
-
import type { TimelineStep, TimelineDirection, TimelineTextPosition } from '@/types'
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
steps: TimelineStep[]
|
|
8
|
-
activeStep?: number
|
|
9
|
-
direction?: TimelineDirection
|
|
10
|
-
textPosition?: TimelineTextPosition
|
|
11
|
-
clickable?: boolean
|
|
12
|
-
class?: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
-
activeStep: 0,
|
|
17
|
-
direction: 'horizontal',
|
|
18
|
-
textPosition: 'bottom',
|
|
19
|
-
clickable: false,
|
|
20
|
-
class: '',
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const emit = defineEmits<{
|
|
24
|
-
(e: 'step-click', step: TimelineStep, index: number): void
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const getStepStatus = (index: number, step: TimelineStep) => {
|
|
28
|
-
if (step.status) return step.status
|
|
29
|
-
if (index < props.activeStep) return 'completed'
|
|
30
|
-
if (index === props.activeStep) return 'current'
|
|
31
|
-
return 'upcoming'
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const isVertical = computed(() => props.direction === 'vertical')
|
|
35
|
-
|
|
36
|
-
// Calculate progress percentage for global horizontal bar (Text Bottom Mode)
|
|
37
|
-
const progressPercentage = computed(() => {
|
|
38
|
-
if (props.steps.length <= 1) return 0
|
|
39
|
-
const effectiveStep = Math.min(props.activeStep, props.steps.length - 1)
|
|
40
|
-
return (effectiveStep / (props.steps.length - 1)) * 100
|
|
41
|
-
})
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<nav
|
|
46
|
-
:aria-label="'Progress'"
|
|
47
|
-
:class="['w-full', props.class]">
|
|
48
|
-
<ol
|
|
49
|
-
role="list"
|
|
50
|
-
:class="[
|
|
51
|
-
'relative flex',
|
|
52
|
-
// Vertical
|
|
53
|
-
isVertical ? 'flex-col space-y-0' : '',
|
|
54
|
-
|
|
55
|
-
// Horizontal: Bottom Text (Default) -> Justify Between
|
|
56
|
-
!isVertical && textPosition === 'bottom'
|
|
57
|
-
? 'flex-row w-full justify-between items-center'
|
|
58
|
-
: '',
|
|
59
|
-
|
|
60
|
-
// Horizontal: Right Text -> Standard Flex
|
|
61
|
-
!isVertical && textPosition === 'right'
|
|
62
|
-
? 'flex-row w-full'
|
|
63
|
-
: '',
|
|
64
|
-
]">
|
|
65
|
-
<!-- Global Horizontal Line (Text Bottom Mode ONLY) -->
|
|
66
|
-
<div
|
|
67
|
-
v-if="!isVertical && textPosition === 'bottom'"
|
|
68
|
-
class="absolute top-4 left-4 right-4 h-0.5 bg-border"
|
|
69
|
-
aria-hidden="true">
|
|
70
|
-
<div
|
|
71
|
-
class="h-full bg-primary transition-all duration-300 ease-in-out"
|
|
72
|
-
:style="{ width: `${progressPercentage}%` }"></div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<!-- Mobile Global Line (Force for small screens even if 'right') -->
|
|
76
|
-
<div
|
|
77
|
-
v-if="!isVertical && textPosition === 'right'"
|
|
78
|
-
class="absolute top-4 left-4 right-4 h-0.5 bg-border block sm:hidden"
|
|
79
|
-
aria-hidden="true">
|
|
80
|
-
<div
|
|
81
|
-
class="h-full bg-primary transition-all duration-300 ease-in-out"
|
|
82
|
-
:style="{ width: `${progressPercentage}%` }"></div>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<li
|
|
86
|
-
v-for="(step, index) in steps"
|
|
87
|
-
:key="step.id"
|
|
88
|
-
@click="clickable ? emit('step-click', step, index) : null"
|
|
89
|
-
:class="[
|
|
90
|
-
'relative',
|
|
91
|
-
clickable ? 'cursor-pointer' : '',
|
|
92
|
-
|
|
93
|
-
// Vertical
|
|
94
|
-
isVertical ? 'w-full pb-10 last:pb-0' : '',
|
|
95
|
-
|
|
96
|
-
// Horizontal Bottom: Fixed Width Icon Anchor
|
|
97
|
-
!isVertical && textPosition === 'bottom'
|
|
98
|
-
? 'flex-none w-8'
|
|
99
|
-
: '',
|
|
100
|
-
|
|
101
|
-
// Horizontal Right: Flex-1 to spread out (Desktop), Mobile acts as fixed width
|
|
102
|
-
!isVertical && textPosition === 'right'
|
|
103
|
-
? 'flex-1 last:flex-none'
|
|
104
|
-
: '',
|
|
105
|
-
]">
|
|
106
|
-
<!-- Vertical Line (Desktop Only when Vertical) -->
|
|
107
|
-
<div
|
|
108
|
-
v-if="isVertical && index !== steps.length - 1"
|
|
109
|
-
class="hidden sm:block absolute top-4 left-4 -ml-px h-full w-0.5 bg-border"
|
|
110
|
-
:class="{ 'bg-primary': index < activeStep }"
|
|
111
|
-
aria-hidden="true"></div>
|
|
112
|
-
|
|
113
|
-
<div
|
|
114
|
-
:class="[
|
|
115
|
-
'group relative flex',
|
|
116
|
-
|
|
117
|
-
// Vertical Layout
|
|
118
|
-
isVertical
|
|
119
|
-
? 'flex-col items-center text-center sm:flex-row sm:items-start sm:text-left'
|
|
120
|
-
: '',
|
|
121
|
-
|
|
122
|
-
// Horizontal Bottom or Mobile Default
|
|
123
|
-
!isVertical && textPosition === 'bottom'
|
|
124
|
-
? 'flex-col items-center justify-center'
|
|
125
|
-
: '',
|
|
126
|
-
|
|
127
|
-
// Horizontal Right (Desktop) -> Row with gap
|
|
128
|
-
// Mobile -> Fallback to Col (Icon Only effectively)
|
|
129
|
-
!isVertical && textPosition === 'right'
|
|
130
|
-
? 'flex-col items-center sm:flex-row sm:items-center sm:gap-2 w-full' // w-full needed for flex line growth
|
|
131
|
-
: '',
|
|
132
|
-
]">
|
|
133
|
-
<!-- Icon Circle -->
|
|
134
|
-
<span
|
|
135
|
-
class="flex h-9 w-9 items-center justify-center shrink-0 bg-background z-10"
|
|
136
|
-
aria-hidden="true">
|
|
137
|
-
<!-- Completed Step -->
|
|
138
|
-
<span
|
|
139
|
-
v-if="getStepStatus(index, step) === 'completed'"
|
|
140
|
-
class="relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-primary hover:bg-primary-dark transition-colors">
|
|
141
|
-
<Icon
|
|
142
|
-
icon="lucide:check"
|
|
143
|
-
class="h-5 w-5 text-primary-foreground" />
|
|
144
|
-
</span>
|
|
145
|
-
|
|
146
|
-
<!-- Current Step -->
|
|
147
|
-
<span
|
|
148
|
-
v-else-if="getStepStatus(index, step) === 'current'"
|
|
149
|
-
class="relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-primary bg-background">
|
|
150
|
-
<Icon
|
|
151
|
-
v-if="step.icon"
|
|
152
|
-
:icon="step.icon"
|
|
153
|
-
class="h-4 w-4 text-primary" />
|
|
154
|
-
<span
|
|
155
|
-
v-else
|
|
156
|
-
class="h-2.5 w-2.5 rounded-full bg-primary" />
|
|
157
|
-
</span>
|
|
158
|
-
|
|
159
|
-
<!-- Upcoming Step -->
|
|
160
|
-
<span
|
|
161
|
-
v-else
|
|
162
|
-
class="relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 bg-background group-hover:border-muted-foreground transition-colors">
|
|
163
|
-
<Icon
|
|
164
|
-
v-if="step.icon"
|
|
165
|
-
:icon="step.icon"
|
|
166
|
-
class="h-4 w-4 text-muted-foreground" />
|
|
167
|
-
<span
|
|
168
|
-
v-else
|
|
169
|
-
class="h-2.5 w-2.5 rounded-full bg-transparent group-hover:bg-muted" />
|
|
170
|
-
</span>
|
|
171
|
-
</span>
|
|
172
|
-
|
|
173
|
-
<!-- Content -->
|
|
174
|
-
<span
|
|
175
|
-
:class="[
|
|
176
|
-
'min-w-[max-content] flex-col',
|
|
177
|
-
'hidden sm:flex', // Hide on mobile (Icon Only rule)
|
|
178
|
-
|
|
179
|
-
// Vertical: Margin Left
|
|
180
|
-
isVertical ? 'sm:ml-4 sm:pt-1.5' : '',
|
|
181
|
-
|
|
182
|
-
// Horizontal Bottom: Absolute Below
|
|
183
|
-
!isVertical && textPosition === 'bottom'
|
|
184
|
-
? 'absolute top-10 text-center'
|
|
185
|
-
: '',
|
|
186
|
-
|
|
187
|
-
// Horizontal Bottom Alignment specific
|
|
188
|
-
!isVertical &&
|
|
189
|
-
textPosition === 'bottom' &&
|
|
190
|
-
index === 0
|
|
191
|
-
? 'left-0 text-left items-start'
|
|
192
|
-
: '',
|
|
193
|
-
!isVertical &&
|
|
194
|
-
textPosition === 'bottom' &&
|
|
195
|
-
index === steps.length - 1
|
|
196
|
-
? 'right-0 text-right items-end'
|
|
197
|
-
: '',
|
|
198
|
-
!isVertical &&
|
|
199
|
-
textPosition === 'bottom' &&
|
|
200
|
-
index > 0 &&
|
|
201
|
-
index < steps.length - 1
|
|
202
|
-
? 'left-1/2 -translate-x-1/2 items-center'
|
|
203
|
-
: '',
|
|
204
|
-
|
|
205
|
-
// Horizontal Right: No absolute, just flow
|
|
206
|
-
!isVertical && textPosition === 'right' ? '' : '',
|
|
207
|
-
]">
|
|
208
|
-
<slot
|
|
209
|
-
name="content"
|
|
210
|
-
:step="step"
|
|
211
|
-
:index="index">
|
|
212
|
-
<span
|
|
213
|
-
class="text-sm font-medium leading-tight"
|
|
214
|
-
:class="
|
|
215
|
-
getStepStatus(index, step) === 'upcoming'
|
|
216
|
-
? 'text-muted-foreground'
|
|
217
|
-
: 'text-primary'
|
|
218
|
-
"
|
|
219
|
-
>{{ step.title }}</span
|
|
220
|
-
>
|
|
221
|
-
<span
|
|
222
|
-
v-if="step.description"
|
|
223
|
-
class="text-xs text-muted-foreground mt-1"
|
|
224
|
-
>{{ step.description }}</span
|
|
225
|
-
>
|
|
226
|
-
</slot>
|
|
227
|
-
</span>
|
|
228
|
-
|
|
229
|
-
<!-- Horizontal Right Mode Line (Flex) -->
|
|
230
|
-
<!-- Placed AFTER content to prevent overlap -->
|
|
231
|
-
<div
|
|
232
|
-
v-if="
|
|
233
|
-
!isVertical &&
|
|
234
|
-
textPosition === 'right' &&
|
|
235
|
-
index !== steps.length - 1
|
|
236
|
-
"
|
|
237
|
-
class="hidden sm:block flex-1 h-0.5 bg-border ml-2"
|
|
238
|
-
aria-hidden="true">
|
|
239
|
-
<!-- Colored portion -->
|
|
240
|
-
<div
|
|
241
|
-
class="h-full bg-primary transition-all duration-300"
|
|
242
|
-
:class="
|
|
243
|
-
index < activeStep ? 'w-full' : 'w-0'
|
|
244
|
-
"></div>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
</li>
|
|
248
|
-
</ol>
|
|
249
|
-
</nav>
|
|
250
|
-
</template>
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from 'vue'
|
|
3
|
-
import Icon from './Icon.vue'
|
|
4
|
-
import {
|
|
5
|
-
useNotifications,
|
|
6
|
-
type ToastPosition,
|
|
7
|
-
type Notification,
|
|
8
|
-
} from '@/composables/useNotifications'
|
|
9
|
-
import Button from './Button.vue'
|
|
10
|
-
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
position?: ToastPosition
|
|
13
|
-
expand?: boolean
|
|
14
|
-
}>()
|
|
15
|
-
|
|
16
|
-
const { notifications, removeToast, globalConfig, pauseTimers, resumeTimers } = useNotifications()
|
|
17
|
-
|
|
18
|
-
// Configuration
|
|
19
|
-
const VISIBLE_TOASTS = 3
|
|
20
|
-
const TOAST_HEIGHT = 60 // Estimate or dynamic
|
|
21
|
-
const OFFSET = 16
|
|
22
|
-
const GAP = 14
|
|
23
|
-
|
|
24
|
-
const isExpanded = ref(false)
|
|
25
|
-
|
|
26
|
-
const positions: ToastPosition[] = [
|
|
27
|
-
'top-left',
|
|
28
|
-
'top-center',
|
|
29
|
-
'top-right',
|
|
30
|
-
'bottom-left',
|
|
31
|
-
'bottom-center',
|
|
32
|
-
'bottom-right',
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
// Get notifications for a specific position, consistent sort (Newest at the END of array usually in useNotifications,
|
|
36
|
-
// but for stacking we often want to process from Newest -> Oldest)
|
|
37
|
-
const getNotificationsByPosition = (pos: ToastPosition) => {
|
|
38
|
-
// Filter by position
|
|
39
|
-
const filtered = notifications.value.filter((n) => n.position === pos)
|
|
40
|
-
// Reverse so index 0 is the newest (Top of stack)
|
|
41
|
-
return filtered.slice().reverse()
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Styling & Positioning Logic
|
|
45
|
-
const positionClasses: Record<ToastPosition, string> = {
|
|
46
|
-
'top-left': 'top-0 left-0 py-4',
|
|
47
|
-
'top-center': 'top-0 left-1/2 -translate-x-1/2 py-4',
|
|
48
|
-
'top-right': 'top-0 right-0 py-4',
|
|
49
|
-
'bottom-left': 'bottom-2.5 left-0',
|
|
50
|
-
'bottom-center': 'bottom-2.5 left-1/2 -translate-x-1/2',
|
|
51
|
-
'bottom-right': 'bottom-2.5 right-0',
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
import { type StyleValue } from 'vue'
|
|
55
|
-
|
|
56
|
-
const getToastStyle = (index: number, total: number, pos: ToastPosition): StyleValue => {
|
|
57
|
-
const isBottom = pos.includes('bottom')
|
|
58
|
-
const hovering = isExpanded.value || globalConfig.value.expand // Global expand or local hover
|
|
59
|
-
|
|
60
|
-
// We only show top N visually, others are hidden or stacked
|
|
61
|
-
const isVisible = index < VISIBLE_TOASTS
|
|
62
|
-
|
|
63
|
-
// If not visible and not expanding, hide
|
|
64
|
-
if (!isVisible && !hovering) {
|
|
65
|
-
return {
|
|
66
|
-
opacity: 0,
|
|
67
|
-
pointerEvents: 'none',
|
|
68
|
-
transform: isBottom ? 'translateY(20px) scale(0.9)' : 'translateY(-20px) scale(0.9)',
|
|
69
|
-
zIndex: -1,
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Expanded State
|
|
74
|
-
if (hovering) {
|
|
75
|
-
const yDir = isBottom ? -1 : 1
|
|
76
|
-
return {
|
|
77
|
-
transform: `translate3d(0, ${index * (yDir * (100 + GAP))}%, 0) scale(1)`,
|
|
78
|
-
opacity: 1,
|
|
79
|
-
zIndex: total - index,
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Stacked State
|
|
84
|
-
const scale = 1 - index * 0.05
|
|
85
|
-
const yDir = isBottom ? -1 : 1
|
|
86
|
-
const yOffset = index * GAP * yDir
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
transform: `translate3d(0, ${yOffset}px, -${index}px) scale(${scale})`,
|
|
90
|
-
opacity: 1,
|
|
91
|
-
zIndex: total - index,
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Handler
|
|
96
|
-
const handleActionClick = (notification: Notification) => {
|
|
97
|
-
if (notification.action) {
|
|
98
|
-
notification.action.onClick()
|
|
99
|
-
removeToast(notification.id)
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Visuals
|
|
104
|
-
const icons = {
|
|
105
|
-
error: 'lucide:octagon-x',
|
|
106
|
-
success: 'lucide:circle-check',
|
|
107
|
-
info: 'lucide:info',
|
|
108
|
-
warning: 'lucide:triangle-alert',
|
|
109
|
-
default: 'lucide:bell',
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Color mapping for toast variants
|
|
113
|
-
const variantClasses: Record<string, string> = {
|
|
114
|
-
// Default/Primary
|
|
115
|
-
default: 'bg-white border-border text-foreground', // Fallback to standard
|
|
116
|
-
|
|
117
|
-
// Theme Variants (matching Alert.vue style)
|
|
118
|
-
success: 'bg-success text-success-fg border-success-fg/30 dark:border-success-fg/10',
|
|
119
|
-
error: 'bg-danger text-danger-fg border-danger-fg/30 dark:border-danger-fg/10',
|
|
120
|
-
warning: 'bg-warning-light text-warning-fg border-warning-fg/30',
|
|
121
|
-
info: 'bg-white text-gray-900 border/50',
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const getVariantClass = (type: string) => {
|
|
125
|
-
return variantClasses[type] || variantClasses.default
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Interaction Handlers with Debounce
|
|
129
|
-
let hoverTimeout: ReturnType<typeof setTimeout> | null = null
|
|
130
|
-
|
|
131
|
-
const handleMouseEnter = () => {
|
|
132
|
-
if (hoverTimeout) {
|
|
133
|
-
clearTimeout(hoverTimeout)
|
|
134
|
-
hoverTimeout = null
|
|
135
|
-
}
|
|
136
|
-
isExpanded.value = true
|
|
137
|
-
pauseTimers()
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const handleMouseLeave = () => {
|
|
141
|
-
hoverTimeout = setTimeout(() => {
|
|
142
|
-
isExpanded.value = false
|
|
143
|
-
resumeTimers()
|
|
144
|
-
}, 400) // 400ms delay to allow crossing gaps
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const getTransformOrigin = (pos: ToastPosition) => {
|
|
148
|
-
if (pos.includes('center')) return 'bottom center' // or top center depending on side?
|
|
149
|
-
// Actually, simple logic:
|
|
150
|
-
const y = pos.includes('bottom') ? 'bottom' : 'top'
|
|
151
|
-
const x = pos.includes('right') ? 'right' : pos.includes('left') ? 'left' : 'center'
|
|
152
|
-
return `${y} ${x}`
|
|
153
|
-
}
|
|
154
|
-
</script>
|
|
155
|
-
|
|
156
|
-
<template>
|
|
157
|
-
<div
|
|
158
|
-
class="toast-provider pointer-events-none fixed inset-0 z-9999 overflow-hidden"
|
|
159
|
-
aria-live="polite">
|
|
160
|
-
<template v-for="pos in positions" :key="pos">
|
|
161
|
-
<!-- Position Container -->
|
|
162
|
-
<div
|
|
163
|
-
class="fixed px-4 flex flex-col gap-2 transition-all duration-300 max-w-full sm:max-w-120"
|
|
164
|
-
:class="[
|
|
165
|
-
positionClasses[pos],
|
|
166
|
-
// Align outer container
|
|
167
|
-
pos.includes('center')
|
|
168
|
-
? 'items-center'
|
|
169
|
-
: pos.includes('right')
|
|
170
|
-
? 'items-end'
|
|
171
|
-
: 'items-start',
|
|
172
|
-
]"
|
|
173
|
-
@mouseenter="handleMouseEnter"
|
|
174
|
-
@mouseleave="handleMouseLeave">
|
|
175
|
-
<!-- The List Group -->
|
|
176
|
-
<div
|
|
177
|
-
class="relative w-full transition-all pointer-events-auto"
|
|
178
|
-
:class="[
|
|
179
|
-
{ 'flex-col-reverse': pos.includes('top') },
|
|
180
|
-
// We use grid, so flex-col-reverse on wrapper doesn't matter for stack order,
|
|
181
|
-
// but logic is handled by z-index and transform in getToastStyle.
|
|
182
|
-
]">
|
|
183
|
-
<TransitionGroup
|
|
184
|
-
enter-active-class="transition-all duration-300 ease-out-spring"
|
|
185
|
-
leave-active-class="transition-all ease-in"
|
|
186
|
-
enter-from-class="opacity-0 scale-90 translate-y-2"
|
|
187
|
-
leave-to-class="opacity-0 translate-y-2"
|
|
188
|
-
move-class="transition-all ease-spring"
|
|
189
|
-
tag="div"
|
|
190
|
-
class="w-full grid grid-cols-1 grid-rows-1"
|
|
191
|
-
:class="[
|
|
192
|
-
pos.includes('center')
|
|
193
|
-
? 'justify-items-center'
|
|
194
|
-
: pos.includes('right')
|
|
195
|
-
? 'justify-items-end'
|
|
196
|
-
: 'justify-items-start',
|
|
197
|
-
]"
|
|
198
|
-
style="min-height: 20px">
|
|
199
|
-
<div
|
|
200
|
-
v-for="(notification, index) in getNotificationsByPosition(pos)"
|
|
201
|
-
:key="notification.id"
|
|
202
|
-
:data-index="index"
|
|
203
|
-
:data-pos="pos"
|
|
204
|
-
class="col-start-1 h-max row-start-1 mb-1 w-auto border pl-4 pr-6 py-3 flex gap-2.5 items-start transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu will-change-transform object-cover"
|
|
205
|
-
:class="[
|
|
206
|
-
getVariantClass(notification.type),
|
|
207
|
-
notification.description || notification.action ? 'rounded-xl' : 'rounded-full',
|
|
208
|
-
]"
|
|
209
|
-
:style="[
|
|
210
|
-
getToastStyle(index, getNotificationsByPosition(pos).length, pos),
|
|
211
|
-
{
|
|
212
|
-
'--hover-offset': pos.includes('bottom') ? '-5px' : '5px',
|
|
213
|
-
'transform-origin': getTransformOrigin(pos),
|
|
214
|
-
},
|
|
215
|
-
]">
|
|
216
|
-
<!-- Icon -->
|
|
217
|
-
<Icon
|
|
218
|
-
:icon="icons[notification.type] || icons.default"
|
|
219
|
-
class="w-5 h-5 shrink-0 mt-0.5" />
|
|
220
|
-
|
|
221
|
-
<!-- Content -->
|
|
222
|
-
<div class="flex-1 min-w-0">
|
|
223
|
-
<p class="text-sm font-medium leading-tight mt-0.5">
|
|
224
|
-
{{ notification.message }}
|
|
225
|
-
</p>
|
|
226
|
-
<p v-if="notification.description" class="text-sm mt-1 leading-relaxed opacity-90">
|
|
227
|
-
{{ notification.description }}
|
|
228
|
-
</p>
|
|
229
|
-
</div>
|
|
230
|
-
|
|
231
|
-
<!-- Action / Close -->
|
|
232
|
-
<Button
|
|
233
|
-
v-if="notification.action"
|
|
234
|
-
type="button"
|
|
235
|
-
size="xs"
|
|
236
|
-
variant="outline"
|
|
237
|
-
class="ml-2 shrink-0 h-8 px-3 text-xs bg-transparent border-current/20 hover:bg-black/5 dark:hover:bg-white/10"
|
|
238
|
-
@click="handleActionClick(notification)">
|
|
239
|
-
{{ notification.action.label }}
|
|
240
|
-
</Button>
|
|
241
|
-
</div>
|
|
242
|
-
</TransitionGroup>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
</template>
|
|
246
|
-
</div>
|
|
247
|
-
</template>
|
|
248
|
-
|
|
249
|
-
<style scoped>
|
|
250
|
-
/* Spring Easing for that 'Sonner' feel */
|
|
251
|
-
.ease-out-spring {
|
|
252
|
-
transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
253
|
-
}
|
|
254
|
-
.ease-spring {
|
|
255
|
-
transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
256
|
-
}
|
|
257
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import ToolTipLite from 'v-tooltip-lite'
|
|
3
|
-
import 'v-tooltip-lite/style.css'
|
|
4
|
-
import type { TooltTipProps } from 'v-tooltip-lite/types'
|
|
5
|
-
|
|
6
|
-
const props = withDefaults(defineProps<TooltTipProps>(), {
|
|
7
|
-
placement: 'top',
|
|
8
|
-
class: '',
|
|
9
|
-
teleport: true,
|
|
10
|
-
arrow: true,
|
|
11
|
-
contentClass: 'max-w-[350px]',
|
|
12
|
-
triggerClass: '',
|
|
13
|
-
})
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<ToolTipLite v-bind="props" class="inline-block" class-name="basic-tooltip">
|
|
18
|
-
<template #trigger>
|
|
19
|
-
<slot />
|
|
20
|
-
</template>
|
|
21
|
-
<template #default>
|
|
22
|
-
<slot name="content" />
|
|
23
|
-
</template>
|
|
24
|
-
</ToolTipLite>
|
|
25
|
-
</template>
|