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,629 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
|
3
|
-
import {
|
|
4
|
-
type HeatmapProps,
|
|
5
|
-
type HeatmapCell,
|
|
6
|
-
type HeatmapColorScheme,
|
|
7
|
-
type HeatmapLegendItem,
|
|
8
|
-
type HeatmapDataPoint,
|
|
9
|
-
} from './types'
|
|
10
|
-
import Tooltip from '@/components/Tooltip.vue'
|
|
11
|
-
import { debounce } from '@/utils'
|
|
12
|
-
|
|
13
|
-
const props = withDefaults(defineProps<HeatmapProps>(), {
|
|
14
|
-
layout: 'grid',
|
|
15
|
-
interactive: true,
|
|
16
|
-
showLegend: true,
|
|
17
|
-
showLabels: false,
|
|
18
|
-
minValue: undefined,
|
|
19
|
-
maxValue: undefined,
|
|
20
|
-
responsive: true,
|
|
21
|
-
minCellSize: 8,
|
|
22
|
-
maxCellSize: 20,
|
|
23
|
-
class: '',
|
|
24
|
-
cellClass: '',
|
|
25
|
-
emptyCellClass: '',
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const emit = defineEmits<{
|
|
29
|
-
(e: 'cell-click', cell: HeatmapCell, event: MouseEvent): void
|
|
30
|
-
(e: 'cell-hover', cell: HeatmapCell | null, event: MouseEvent): void
|
|
31
|
-
}>()
|
|
32
|
-
|
|
33
|
-
const containerRef = ref<HTMLElement | null>(null)
|
|
34
|
-
const wrapperRef = ref<HTMLElement | null>(null)
|
|
35
|
-
const gridRef = ref<HTMLElement | null>(null)
|
|
36
|
-
const hoveredCell = ref<HeatmapCell | null>(null)
|
|
37
|
-
const containerWidth = ref(0)
|
|
38
|
-
const containerHeight = ref(0)
|
|
39
|
-
const resizeObserver = ref<ResizeObserver | null>(null)
|
|
40
|
-
|
|
41
|
-
const colorSchemes: Record<HeatmapColorScheme, string[]> = {
|
|
42
|
-
github: ['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39'],
|
|
43
|
-
green: ['#f0f9f4', '#a7f3d0', '#34d399', '#10b981', '#059669'],
|
|
44
|
-
blue: ['#eff6ff', '#bfdbfe', '#60a5fa', '#3b82f6', '#2563eb'],
|
|
45
|
-
red: ['#fef2f2', '#fecaca', '#f87171', '#ef4444', '#dc2626'],
|
|
46
|
-
purple: ['#faf5ff', '#e9d5ff', '#c084fc', '#a855f7', '#9333ea'],
|
|
47
|
-
orange: ['#fff7ed', '#fed7aa', '#fb923c', '#f97316', '#ea580c'],
|
|
48
|
-
grayscale: ['#f9fafb', '#e5e7eb', '#9ca3af', '#6b7280', '#374151'],
|
|
49
|
-
custom: [],
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const getColorScheme = computed(() => {
|
|
53
|
-
const config = props.colorConfig || {}
|
|
54
|
-
const scheme = config.scheme || 'github'
|
|
55
|
-
|
|
56
|
-
if (scheme === 'custom' && config.colors) {
|
|
57
|
-
return config.colors
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (config.minColor && config.maxColor) {
|
|
61
|
-
return [config.minColor, config.maxColor]
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return colorSchemes[scheme] || colorSchemes.github
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
const emptyColor = computed(() => {
|
|
68
|
-
return props.colorConfig?.emptyColor || '#ebedf0'
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const minValue = computed(() => {
|
|
72
|
-
if (props.minValue !== undefined) return props.minValue
|
|
73
|
-
if (props.data.length === 0) return 0
|
|
74
|
-
return Math.min(...props.data.map((d) => d.value))
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
const maxValue = computed(() => {
|
|
78
|
-
if (props.maxValue !== undefined) return props.maxValue
|
|
79
|
-
if (props.data.length === 0) return 1
|
|
80
|
-
return Math.max(...props.data.map((d) => d.value))
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
const valueRange = computed(() => {
|
|
84
|
-
return maxValue.value - minValue.value || 1
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const normalizeValue = (value: number): number => {
|
|
88
|
-
if (valueRange.value === 0) return 0
|
|
89
|
-
return (value - minValue.value) / valueRange.value
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const getColorForValue = (normalizedValue: number): string => {
|
|
93
|
-
if (normalizedValue === 0) return emptyColor.value
|
|
94
|
-
|
|
95
|
-
const colors = getColorScheme.value
|
|
96
|
-
if (colors.length === 0) return emptyColor.value
|
|
97
|
-
|
|
98
|
-
if (colors.length === 1) return colors[0]
|
|
99
|
-
|
|
100
|
-
if (colors.length === 2) {
|
|
101
|
-
const r1 = parseInt(colors[0].slice(1, 3), 16)
|
|
102
|
-
const g1 = parseInt(colors[0].slice(3, 5), 16)
|
|
103
|
-
const b1 = parseInt(colors[0].slice(5, 7), 16)
|
|
104
|
-
const r2 = parseInt(colors[1].slice(1, 3), 16)
|
|
105
|
-
const g2 = parseInt(colors[1].slice(3, 5), 16)
|
|
106
|
-
const b2 = parseInt(colors[1].slice(5, 7), 16)
|
|
107
|
-
|
|
108
|
-
const r = Math.round(r1 + (r2 - r1) * normalizedValue)
|
|
109
|
-
const g = Math.round(g1 + (g2 - g1) * normalizedValue)
|
|
110
|
-
const b = Math.round(b1 + (b2 - b1) * normalizedValue)
|
|
111
|
-
|
|
112
|
-
return `rgb(${r}, ${g}, ${b})`
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const index = Math.min(Math.floor(normalizedValue * (colors.length - 1)), colors.length - 1)
|
|
116
|
-
return colors[index]
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const processData = computed((): HeatmapCell[] => {
|
|
120
|
-
const dataMap = new Map<string, HeatmapDataPoint>()
|
|
121
|
-
|
|
122
|
-
props.data.forEach((point) => {
|
|
123
|
-
const key = `${point.x},${point.y}`
|
|
124
|
-
const existing = dataMap.get(key)
|
|
125
|
-
if (!existing || point.value > existing.value) {
|
|
126
|
-
dataMap.set(key, point)
|
|
127
|
-
}
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
const cells: HeatmapCell[] = []
|
|
131
|
-
|
|
132
|
-
if (props.layout === 'grid') {
|
|
133
|
-
const config = props.gridConfig || {}
|
|
134
|
-
const rows = config.rows || 7
|
|
135
|
-
const cols = config.cols || Math.ceil(props.data.length / rows)
|
|
136
|
-
|
|
137
|
-
for (let y = 0; y < rows; y++) {
|
|
138
|
-
for (let x = 0; x < cols; x++) {
|
|
139
|
-
const key = `${x},${y}`
|
|
140
|
-
const dataPoint = dataMap.get(key)
|
|
141
|
-
const value = dataPoint?.value || 0
|
|
142
|
-
const normalizedValue = normalizeValue(value)
|
|
143
|
-
|
|
144
|
-
cells.push({
|
|
145
|
-
x,
|
|
146
|
-
y,
|
|
147
|
-
value,
|
|
148
|
-
normalizedValue,
|
|
149
|
-
displayValue: dataPoint?.displayValue || value,
|
|
150
|
-
tooltip: props.tooltipConfig?.formatter
|
|
151
|
-
? props.tooltipConfig.formatter(
|
|
152
|
-
{
|
|
153
|
-
x,
|
|
154
|
-
y,
|
|
155
|
-
value,
|
|
156
|
-
normalizedValue,
|
|
157
|
-
},
|
|
158
|
-
dataPoint || { x, y, value }
|
|
159
|
-
)
|
|
160
|
-
: dataPoint?.tooltip || `${value} at (${x}, ${y})`,
|
|
161
|
-
...dataPoint,
|
|
162
|
-
})
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
} else if (props.layout === 'sequential') {
|
|
166
|
-
const config = props.sequentialConfig || {}
|
|
167
|
-
const itemsPerRow = config.itemsPerRow || 7
|
|
168
|
-
|
|
169
|
-
props.data.forEach((point, index) => {
|
|
170
|
-
const x = index % itemsPerRow
|
|
171
|
-
const y = Math.floor(index / itemsPerRow)
|
|
172
|
-
const normalizedValue = normalizeValue(point.value)
|
|
173
|
-
|
|
174
|
-
cells.push({
|
|
175
|
-
x,
|
|
176
|
-
y,
|
|
177
|
-
value: point.value,
|
|
178
|
-
normalizedValue,
|
|
179
|
-
displayValue: point.displayValue || point.value,
|
|
180
|
-
tooltip: props.tooltipConfig?.formatter
|
|
181
|
-
? props.tooltipConfig.formatter(
|
|
182
|
-
{
|
|
183
|
-
x,
|
|
184
|
-
y,
|
|
185
|
-
value: point.value,
|
|
186
|
-
normalizedValue,
|
|
187
|
-
},
|
|
188
|
-
point
|
|
189
|
-
)
|
|
190
|
-
: point.tooltip || `${point.value}`,
|
|
191
|
-
...point,
|
|
192
|
-
})
|
|
193
|
-
})
|
|
194
|
-
} else {
|
|
195
|
-
props.data.forEach((point) => {
|
|
196
|
-
const normalizedValue = normalizeValue(point.value)
|
|
197
|
-
cells.push({
|
|
198
|
-
x: point.x,
|
|
199
|
-
y: point.y,
|
|
200
|
-
value: point.value,
|
|
201
|
-
normalizedValue,
|
|
202
|
-
displayValue: point.displayValue || point.value,
|
|
203
|
-
tooltip: props.tooltipConfig?.formatter
|
|
204
|
-
? props.tooltipConfig.formatter(
|
|
205
|
-
{
|
|
206
|
-
x: point.x,
|
|
207
|
-
y: point.y,
|
|
208
|
-
value: point.value,
|
|
209
|
-
normalizedValue,
|
|
210
|
-
},
|
|
211
|
-
point
|
|
212
|
-
)
|
|
213
|
-
: point.tooltip || `${point.value}`,
|
|
214
|
-
...point,
|
|
215
|
-
})
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return cells
|
|
220
|
-
})
|
|
221
|
-
|
|
222
|
-
const cells = computed(() => processData.value)
|
|
223
|
-
|
|
224
|
-
const calculateOptimalCellSize = (
|
|
225
|
-
containerWidth: number,
|
|
226
|
-
containerHeight: number,
|
|
227
|
-
cols: number,
|
|
228
|
-
rows: number,
|
|
229
|
-
gap: number
|
|
230
|
-
): number => {
|
|
231
|
-
if (containerWidth === 0 || containerHeight === 0 || cols === 0 || rows === 0) {
|
|
232
|
-
return props.minCellSize
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const padding = 32
|
|
236
|
-
const availableWidth = Math.max(0, containerWidth - padding)
|
|
237
|
-
const availableHeight = Math.max(0, containerHeight - padding)
|
|
238
|
-
|
|
239
|
-
if (availableWidth <= 0 || availableHeight <= 0) {
|
|
240
|
-
return props.minCellSize
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const widthBasedSize = (availableWidth - (cols - 1) * gap) / cols
|
|
244
|
-
const heightBasedSize = (availableHeight - (rows - 1) * gap) / rows
|
|
245
|
-
|
|
246
|
-
const optimalSize = Math.min(widthBasedSize, heightBasedSize)
|
|
247
|
-
const calculatedSize = Math.max(
|
|
248
|
-
props.minCellSize,
|
|
249
|
-
Math.min(props.maxCellSize, Math.floor(optimalSize))
|
|
250
|
-
)
|
|
251
|
-
|
|
252
|
-
return calculatedSize
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
const gridConfig = computed(() => {
|
|
256
|
-
const config = props.gridConfig || {}
|
|
257
|
-
const rows = config.rows || 7
|
|
258
|
-
const cols = config.cols || Math.ceil(cells.value.length / rows)
|
|
259
|
-
|
|
260
|
-
let cellSize = config.cellSize
|
|
261
|
-
const gap = config.gap || 3
|
|
262
|
-
|
|
263
|
-
if (props.responsive && !cellSize && containerWidth.value > 0) {
|
|
264
|
-
cellSize = calculateOptimalCellSize(
|
|
265
|
-
containerWidth.value,
|
|
266
|
-
containerHeight.value,
|
|
267
|
-
cols,
|
|
268
|
-
rows,
|
|
269
|
-
gap
|
|
270
|
-
)
|
|
271
|
-
} else if (!cellSize) {
|
|
272
|
-
cellSize = 12
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return {
|
|
276
|
-
rows,
|
|
277
|
-
cols,
|
|
278
|
-
cellSize,
|
|
279
|
-
gap,
|
|
280
|
-
}
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
const sequentialConfig = computed(() => {
|
|
284
|
-
const config = props.sequentialConfig || {}
|
|
285
|
-
const itemsPerRow = config.itemsPerRow || 7
|
|
286
|
-
const totalItems = cells.value.length
|
|
287
|
-
const rows = Math.ceil(totalItems / itemsPerRow)
|
|
288
|
-
|
|
289
|
-
let cellSize = config.cellSize
|
|
290
|
-
const gap = config.gap || 3
|
|
291
|
-
|
|
292
|
-
if (props.responsive && !cellSize && containerWidth.value > 0) {
|
|
293
|
-
cellSize = calculateOptimalCellSize(
|
|
294
|
-
containerWidth.value,
|
|
295
|
-
containerHeight.value,
|
|
296
|
-
itemsPerRow,
|
|
297
|
-
rows,
|
|
298
|
-
gap
|
|
299
|
-
)
|
|
300
|
-
} else if (!cellSize) {
|
|
301
|
-
cellSize = 12
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
return {
|
|
305
|
-
itemsPerRow,
|
|
306
|
-
cellSize,
|
|
307
|
-
gap,
|
|
308
|
-
rows,
|
|
309
|
-
}
|
|
310
|
-
})
|
|
311
|
-
|
|
312
|
-
const gridStyle = computed(() => {
|
|
313
|
-
if (props.layout === 'grid') {
|
|
314
|
-
const config = gridConfig.value
|
|
315
|
-
return {
|
|
316
|
-
display: 'grid',
|
|
317
|
-
gridTemplateColumns: `repeat(${config.cols}, ${config.cellSize}px)`,
|
|
318
|
-
gap: `${config.gap}px`,
|
|
319
|
-
gridAutoRows: `${config.cellSize}px`,
|
|
320
|
-
}
|
|
321
|
-
} else if (props.layout === 'sequential') {
|
|
322
|
-
const config = sequentialConfig.value
|
|
323
|
-
return {
|
|
324
|
-
display: 'grid',
|
|
325
|
-
gridTemplateColumns: `repeat(${config.itemsPerRow}, ${config.cellSize}px)`,
|
|
326
|
-
gap: `${config.gap}px`,
|
|
327
|
-
gridAutoRows: `${config.cellSize}px`,
|
|
328
|
-
}
|
|
329
|
-
} else {
|
|
330
|
-
return {
|
|
331
|
-
display: 'grid',
|
|
332
|
-
gridAutoColumns: 'auto',
|
|
333
|
-
gap: '4px',
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
})
|
|
337
|
-
|
|
338
|
-
const legendItems = computed((): HeatmapLegendItem[] => {
|
|
339
|
-
if (!props.showLegend) return []
|
|
340
|
-
|
|
341
|
-
const colors = getColorScheme.value
|
|
342
|
-
const steps = Math.min(colors.length, 5)
|
|
343
|
-
const items: HeatmapLegendItem[] = []
|
|
344
|
-
|
|
345
|
-
for (let i = 0; i < steps; i++) {
|
|
346
|
-
const normalizedValue = i / (steps - 1)
|
|
347
|
-
const value = minValue.value + normalizedValue * valueRange.value
|
|
348
|
-
items.push({
|
|
349
|
-
value: Math.round(value * 100) / 100,
|
|
350
|
-
color: getColorForValue(normalizedValue),
|
|
351
|
-
label: i === 0 ? 'Less' : i === steps - 1 ? 'More' : undefined,
|
|
352
|
-
})
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return items
|
|
356
|
-
})
|
|
357
|
-
|
|
358
|
-
const handleCellClick = (cell: HeatmapCell, event: MouseEvent) => {
|
|
359
|
-
if (!props.interactive) return
|
|
360
|
-
emit('cell-click', cell, event)
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
const handleCellMouseEnter = (cell: HeatmapCell, event: MouseEvent) => {
|
|
364
|
-
if (!props.interactive) return
|
|
365
|
-
hoveredCell.value = cell
|
|
366
|
-
emit('cell-hover', cell, event)
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
const handleCellMouseLeave = () => {
|
|
370
|
-
if (!props.interactive) return
|
|
371
|
-
hoveredCell.value = null
|
|
372
|
-
emit('cell-hover', null, null as any)
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
const updateContainerSize = () => {
|
|
376
|
-
if (containerRef.value) {
|
|
377
|
-
const rect = containerRef.value.getBoundingClientRect()
|
|
378
|
-
containerWidth.value = Math.max(0, rect.width)
|
|
379
|
-
containerHeight.value = Math.max(0, rect.height)
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
const handleResize = debounce((entries: ResizeObserverEntry[]) => {
|
|
384
|
-
const entry = entries[0]
|
|
385
|
-
if (entry && props.responsive) {
|
|
386
|
-
containerWidth.value = Math.max(0, entry.contentRect.width)
|
|
387
|
-
containerHeight.value = Math.max(0, entry.contentRect.height)
|
|
388
|
-
}
|
|
389
|
-
}, 100)
|
|
390
|
-
|
|
391
|
-
onMounted(() => {
|
|
392
|
-
nextTick(() => {
|
|
393
|
-
updateContainerSize()
|
|
394
|
-
|
|
395
|
-
if (containerRef.value) {
|
|
396
|
-
resizeObserver.value = new ResizeObserver(handleResize)
|
|
397
|
-
resizeObserver.value.observe(containerRef.value)
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
window.addEventListener('resize', updateContainerSize)
|
|
401
|
-
})
|
|
402
|
-
})
|
|
403
|
-
|
|
404
|
-
onUnmounted(() => {
|
|
405
|
-
if (resizeObserver.value && containerRef.value) {
|
|
406
|
-
resizeObserver.value.unobserve(containerRef.value)
|
|
407
|
-
resizeObserver.value.disconnect()
|
|
408
|
-
resizeObserver.value = null
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
window.removeEventListener('resize', updateContainerSize)
|
|
412
|
-
})
|
|
413
|
-
|
|
414
|
-
watch(
|
|
415
|
-
() => [containerWidth.value, containerHeight.value, props.responsive, props.data.length],
|
|
416
|
-
() => {
|
|
417
|
-
if (props.responsive) {
|
|
418
|
-
nextTick(() => {
|
|
419
|
-
updateContainerSize()
|
|
420
|
-
})
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
)
|
|
424
|
-
</script>
|
|
425
|
-
|
|
426
|
-
<template>
|
|
427
|
-
<div ref="containerRef" :class="['heatmap-container', props.class]">
|
|
428
|
-
<div ref="wrapperRef" class="heatmap-wrapper">
|
|
429
|
-
<div ref="gridRef" :class="['heatmap-grid', props.layout]" :style="gridStyle">
|
|
430
|
-
<template v-for="(cell, index) in cells" :key="`${cell.x}-${cell.y}-${index}`">
|
|
431
|
-
<Tooltip
|
|
432
|
-
v-if="tooltipConfig?.enabled !== false && cell.tooltip"
|
|
433
|
-
:content="cell.tooltip"
|
|
434
|
-
:placement="tooltipConfig?.position || 'top'"
|
|
435
|
-
triggerClass="w-full">
|
|
436
|
-
<div
|
|
437
|
-
:class="[
|
|
438
|
-
'heatmap-cell',
|
|
439
|
-
{
|
|
440
|
-
'heatmap-cell-empty': cell.value === 0,
|
|
441
|
-
'heatmap-cell-hovered': hoveredCell?.x === cell.x && hoveredCell?.y === cell.y,
|
|
442
|
-
'heatmap-cell-interactive': interactive,
|
|
443
|
-
},
|
|
444
|
-
cell.value === 0 ? emptyCellClass : cellClass,
|
|
445
|
-
]"
|
|
446
|
-
:style="{
|
|
447
|
-
backgroundColor: getColorForValue(cell.normalizedValue),
|
|
448
|
-
}"
|
|
449
|
-
@click="handleCellClick(cell, $event)"
|
|
450
|
-
@mouseenter="handleCellMouseEnter(cell, $event)"
|
|
451
|
-
@mouseleave="handleCellMouseLeave">
|
|
452
|
-
<span v-if="showLabels && cell.displayValue !== undefined" class="heatmap-cell-label">
|
|
453
|
-
{{ cell.displayValue }}
|
|
454
|
-
</span>
|
|
455
|
-
</div>
|
|
456
|
-
</Tooltip>
|
|
457
|
-
<div
|
|
458
|
-
v-else
|
|
459
|
-
:class="[
|
|
460
|
-
'heatmap-cell',
|
|
461
|
-
{
|
|
462
|
-
'heatmap-cell-empty': cell.value === 0,
|
|
463
|
-
'heatmap-cell-hovered': hoveredCell?.x === cell.x && hoveredCell?.y === cell.y,
|
|
464
|
-
'heatmap-cell-interactive': interactive,
|
|
465
|
-
},
|
|
466
|
-
cell.value === 0 ? emptyCellClass : cellClass,
|
|
467
|
-
]"
|
|
468
|
-
:style="{
|
|
469
|
-
backgroundColor: getColorForValue(cell.normalizedValue),
|
|
470
|
-
}"
|
|
471
|
-
@click="handleCellClick(cell, $event)"
|
|
472
|
-
@mouseenter="handleCellMouseEnter(cell, $event)"
|
|
473
|
-
@mouseleave="handleCellMouseLeave">
|
|
474
|
-
<span v-if="showLabels && cell.displayValue !== undefined" class="heatmap-cell-label">
|
|
475
|
-
{{ cell.displayValue }}
|
|
476
|
-
</span>
|
|
477
|
-
</div>
|
|
478
|
-
</template>
|
|
479
|
-
</div>
|
|
480
|
-
</div>
|
|
481
|
-
|
|
482
|
-
<div v-if="showLegend && legendItems.length > 0" class="heatmap-legend">
|
|
483
|
-
<span class="heatmap-legend-label">Less</span>
|
|
484
|
-
<div class="heatmap-legend-colors">
|
|
485
|
-
<div
|
|
486
|
-
v-for="(item, index) in legendItems"
|
|
487
|
-
:key="index"
|
|
488
|
-
class="heatmap-legend-item"
|
|
489
|
-
:style="{ backgroundColor: item.color }"
|
|
490
|
-
:title="`${item.value}`" />
|
|
491
|
-
</div>
|
|
492
|
-
<span class="heatmap-legend-label">More</span>
|
|
493
|
-
</div>
|
|
494
|
-
</div>
|
|
495
|
-
</template>
|
|
496
|
-
|
|
497
|
-
<style scoped>
|
|
498
|
-
.heatmap-container {
|
|
499
|
-
width: 100%;
|
|
500
|
-
height: 100%;
|
|
501
|
-
display: flex;
|
|
502
|
-
flex-direction: column;
|
|
503
|
-
min-height: 0;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
.heatmap-wrapper {
|
|
507
|
-
width: 100%;
|
|
508
|
-
height: 100%;
|
|
509
|
-
overflow: auto;
|
|
510
|
-
flex: 1;
|
|
511
|
-
min-height: 0;
|
|
512
|
-
display: flex;
|
|
513
|
-
align-items: center;
|
|
514
|
-
justify-content: center;
|
|
515
|
-
padding: 16px;
|
|
516
|
-
box-sizing: border-box;
|
|
517
|
-
position: relative;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.heatmap-grid {
|
|
521
|
-
width: fit-content;
|
|
522
|
-
height: fit-content;
|
|
523
|
-
transition: all 0.2s ease-in-out;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.heatmap-cell {
|
|
527
|
-
aspect-ratio: 1 / 1;
|
|
528
|
-
border-radius: 2px;
|
|
529
|
-
transition: all 0.15s ease-in-out;
|
|
530
|
-
border: 1px solid transparent;
|
|
531
|
-
box-sizing: border-box;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.heatmap-cell-interactive {
|
|
535
|
-
cursor: pointer;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.heatmap-cell-interactive:hover {
|
|
539
|
-
transform: scale(1.1);
|
|
540
|
-
border-color: var(--border);
|
|
541
|
-
box-shadow:
|
|
542
|
-
0 4px 6px -1px rgb(0 0 0 / 0.1),
|
|
543
|
-
0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
544
|
-
z-index: 10;
|
|
545
|
-
position: relative;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.heatmap-cell-empty {
|
|
549
|
-
opacity: 0.6;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.heatmap-cell-hovered {
|
|
553
|
-
outline: 2px solid var(--primary);
|
|
554
|
-
outline-offset: 1px;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
.heatmap-cell-label {
|
|
558
|
-
font-size: 8px;
|
|
559
|
-
font-weight: 500;
|
|
560
|
-
color: var(--foreground);
|
|
561
|
-
opacity: 0.8;
|
|
562
|
-
display: flex;
|
|
563
|
-
align-items: center;
|
|
564
|
-
justify-content: center;
|
|
565
|
-
height: 100%;
|
|
566
|
-
width: 100%;
|
|
567
|
-
pointer-events: none;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.heatmap-legend {
|
|
571
|
-
display: flex;
|
|
572
|
-
align-items: center;
|
|
573
|
-
gap: 0.5rem;
|
|
574
|
-
margin-top: 1rem;
|
|
575
|
-
font-size: 0.75rem;
|
|
576
|
-
color: var(--muted-foreground);
|
|
577
|
-
flex-shrink: 0;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.heatmap-legend-label {
|
|
581
|
-
font-weight: 500;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
.heatmap-legend-colors {
|
|
585
|
-
display: flex;
|
|
586
|
-
gap: 0.125rem;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.heatmap-legend-item {
|
|
590
|
-
width: 0.75rem;
|
|
591
|
-
height: 0.75rem;
|
|
592
|
-
border-radius: 0.375rem;
|
|
593
|
-
border: 1px solid var(--border);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
@media (max-width: 640px) {
|
|
597
|
-
.heatmap-wrapper {
|
|
598
|
-
padding: 12px;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
.heatmap-cell {
|
|
602
|
-
border-radius: 2px;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.heatmap-cell-label {
|
|
606
|
-
font-size: 7px;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
@media (min-width: 641px) and (max-width: 1023px) {
|
|
611
|
-
.heatmap-wrapper {
|
|
612
|
-
padding: 14px;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
.heatmap-cell {
|
|
616
|
-
border-radius: 2px;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
@media (min-width: 1024px) {
|
|
621
|
-
.heatmap-wrapper {
|
|
622
|
-
padding: 16px;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.heatmap-cell {
|
|
626
|
-
border-radius: 3px;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
</style>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export interface HeatmapDataPoint {
|
|
2
|
-
x: number
|
|
3
|
-
y: number
|
|
4
|
-
value: number
|
|
5
|
-
[key: string]: any
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface HeatmapCell {
|
|
9
|
-
x: number
|
|
10
|
-
y: number
|
|
11
|
-
value: number
|
|
12
|
-
normalizedValue: number
|
|
13
|
-
displayValue?: string | number
|
|
14
|
-
tooltip?: string
|
|
15
|
-
[key: string]: any
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type HeatmapColorScheme =
|
|
19
|
-
| 'github'
|
|
20
|
-
| 'green'
|
|
21
|
-
| 'blue'
|
|
22
|
-
| 'red'
|
|
23
|
-
| 'purple'
|
|
24
|
-
| 'orange'
|
|
25
|
-
| 'grayscale'
|
|
26
|
-
| 'custom'
|
|
27
|
-
|
|
28
|
-
export interface HeatmapColorConfig {
|
|
29
|
-
scheme?: HeatmapColorScheme
|
|
30
|
-
colors?: string[]
|
|
31
|
-
minColor?: string
|
|
32
|
-
maxColor?: string
|
|
33
|
-
emptyColor?: string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type HeatmapLayout = 'grid' | 'sequential' | 'custom'
|
|
37
|
-
|
|
38
|
-
export interface HeatmapGridConfig {
|
|
39
|
-
rows?: number
|
|
40
|
-
cols?: number
|
|
41
|
-
cellSize?: number
|
|
42
|
-
gap?: number
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface HeatmapSequentialConfig {
|
|
46
|
-
itemsPerRow?: number
|
|
47
|
-
cellSize?: number
|
|
48
|
-
gap?: number
|
|
49
|
-
startDate?: Date
|
|
50
|
-
endDate?: Date
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface HeatmapTooltipConfig {
|
|
54
|
-
enabled?: boolean
|
|
55
|
-
formatter?: (cell: HeatmapCell, dataPoint: HeatmapDataPoint) => string
|
|
56
|
-
position?: 'top' | 'bottom' | 'left' | 'right' | 'auto'
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface HeatmapProps {
|
|
60
|
-
data: HeatmapDataPoint[]
|
|
61
|
-
layout?: HeatmapLayout
|
|
62
|
-
colorConfig?: HeatmapColorConfig
|
|
63
|
-
minValue?: number
|
|
64
|
-
maxValue?: number
|
|
65
|
-
gridConfig?: HeatmapGridConfig
|
|
66
|
-
sequentialConfig?: HeatmapSequentialConfig
|
|
67
|
-
tooltipConfig?: HeatmapTooltipConfig
|
|
68
|
-
showLegend?: boolean
|
|
69
|
-
showLabels?: boolean
|
|
70
|
-
interactive?: boolean
|
|
71
|
-
|
|
72
|
-
responsive?: boolean
|
|
73
|
-
minCellSize?: number
|
|
74
|
-
maxCellSize?: number
|
|
75
|
-
class?: string
|
|
76
|
-
cellClass?: string
|
|
77
|
-
emptyCellClass?: string
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface HeatmapLegendItem {
|
|
81
|
-
value: number
|
|
82
|
-
color: string
|
|
83
|
-
label?: string
|
|
84
|
-
}
|