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
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { defineComponent as G, useSlots as J, ref as v, computed as u, onMounted as K, nextTick as A, openBlock as d, createElementBlock as i, normalizeClass as s, createBlock as C, withCtx as O, createTextVNode as k, toDisplayString as V, createCommentVNode as c, createElementVNode as B, renderSlot as F, createVNode as x } from "vue";
|
|
2
|
+
import f from "./Icon.vue.js";
|
|
3
|
+
import Q from "./Label.vue.js";
|
|
4
|
+
import X from "./Textarea.vue.js";
|
|
5
|
+
const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2" }, le = /* @__PURE__ */ G({
|
|
6
|
+
__name: "Input",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: "" },
|
|
9
|
+
type: { default: "text" },
|
|
10
|
+
label: {},
|
|
11
|
+
placeholder: {},
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
loading: { type: Boolean, default: !1 },
|
|
14
|
+
error: {},
|
|
15
|
+
icon: {},
|
|
16
|
+
iconRight: {},
|
|
17
|
+
showClearButton: { type: Boolean, default: !0 },
|
|
18
|
+
autofocus: { type: Boolean, default: !1 },
|
|
19
|
+
class: { default: "" },
|
|
20
|
+
inputClass: { default: "" },
|
|
21
|
+
rows: { default: 3 },
|
|
22
|
+
lazy: { type: Boolean, default: !1 },
|
|
23
|
+
variant: { default: "outline" },
|
|
24
|
+
size: { default: "md" },
|
|
25
|
+
rounded: { default: "md" },
|
|
26
|
+
labelPosition: { default: "top" },
|
|
27
|
+
addonLeft: {},
|
|
28
|
+
addonRight: {},
|
|
29
|
+
addonLeftClass: { default: "" },
|
|
30
|
+
addonRightClass: { default: "" },
|
|
31
|
+
min: {},
|
|
32
|
+
max: {}
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:modelValue", "focus", "blur", "change", "click:icon", "click:icon-right"],
|
|
35
|
+
setup(t, { emit: I }) {
|
|
36
|
+
const e = t, r = I, m = J(), y = v(null), b = v(!1), M = u(() => e.type === "password" && b.value ? "text" : e.type), j = u(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), g = u(() => !!e.addonLeft || !!m["addon-left"]), h = u(() => !!e.addonRight || !!m["addon-right"]), N = u(() => [
|
|
37
|
+
"relative w-full",
|
|
38
|
+
e.class,
|
|
39
|
+
e.labelPosition === "left" ? "flex items-center gap-4" : "",
|
|
40
|
+
e.labelPosition === "right" ? "flex flex-row-reverse items-center gap-4" : "space-y-2"
|
|
41
|
+
].join(" ")), T = u(() => ["relative flex w-full items-stretch", e.labelPosition !== "top" ? "flex-1" : ""].join(
|
|
42
|
+
" "
|
|
43
|
+
)), R = u(() => {
|
|
44
|
+
const l = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/50 disabled:cursor-not-allowed disabled:opacity-50 transition-all focus-visible:outline-none", o = {
|
|
45
|
+
solid: "bg-muted border-transparent focus-visible:border-primary",
|
|
46
|
+
outline: "border border-input focus-visible:border-primary",
|
|
47
|
+
"outline-b": "border-b border-input bg-transparent rounded-none focus-visible:border-primary",
|
|
48
|
+
transparent: "border-none bg-transparent shadow-none"
|
|
49
|
+
}, a = {
|
|
50
|
+
sm: "h-8 text-xs",
|
|
51
|
+
md: "h-9 text-sm",
|
|
52
|
+
lg: "h-10 text-base"
|
|
53
|
+
}, $ = {
|
|
54
|
+
none: "rounded-none",
|
|
55
|
+
sm: "rounded-sm",
|
|
56
|
+
md: "rounded-md",
|
|
57
|
+
lg: "rounded-lg",
|
|
58
|
+
xl: "rounded-xl",
|
|
59
|
+
"2xl": "rounded-2xl",
|
|
60
|
+
full: "rounded-full"
|
|
61
|
+
};
|
|
62
|
+
let n = $[e.rounded];
|
|
63
|
+
g.value && (n = n.replace("rounded-", "rounded-r-").replace("rounded-l-", ""), e.rounded === "md" && (n = "rounded-r-md rounded-l-none"), e.rounded === "sm" && (n = "rounded-r-sm rounded-l-none"), e.rounded === "lg" && (n = "rounded-r-lg rounded-l-none"), e.rounded === "full" && (n = "rounded-r-full rounded-l-none")), h.value && ($[e.rounded], g.value ? n = "rounded-none" : (e.rounded === "md" && (n = "rounded-l-md rounded-r-none"), e.rounded === "sm" && (n = "rounded-l-sm rounded-r-none"), e.rounded === "lg" && (n = "rounded-l-lg rounded-r-none"), e.rounded === "full" && (n = "rounded-l-full rounded-r-none"))), e.variant === "outline-b" && (n = "rounded-none");
|
|
64
|
+
const L = e.variant === "outline-b" || e.variant === "transparent";
|
|
65
|
+
return [
|
|
66
|
+
l,
|
|
67
|
+
o[e.variant],
|
|
68
|
+
a[e.size],
|
|
69
|
+
n,
|
|
70
|
+
e.error ? "border-destructive focus-visible:ring-destructive" : "",
|
|
71
|
+
// Left Padding
|
|
72
|
+
e.icon ? "pl-9" : L && !g.value ? "pl-0" : "",
|
|
73
|
+
// Right Padding
|
|
74
|
+
e.showClearButton && j.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : L && !h.value ? "pr-0" : "",
|
|
75
|
+
e.inputClass
|
|
76
|
+
].join(" ");
|
|
77
|
+
}), z = {
|
|
78
|
+
sm: "text-xs",
|
|
79
|
+
md: "text-sm",
|
|
80
|
+
lg: "text-base"
|
|
81
|
+
}, E = u(() => {
|
|
82
|
+
const l = {
|
|
83
|
+
sm: "rounded-l-sm",
|
|
84
|
+
md: "rounded-l-md",
|
|
85
|
+
lg: "rounded-l-lg",
|
|
86
|
+
full: "rounded-l-full",
|
|
87
|
+
none: "rounded-none",
|
|
88
|
+
xl: "rounded-l-xl",
|
|
89
|
+
"2xl": "rounded-l-2xl"
|
|
90
|
+
}, o = !!m["addon-left"];
|
|
91
|
+
return [
|
|
92
|
+
"flex items-center justify-center whitespace-nowrap",
|
|
93
|
+
o ? "border-none" : "bg-muted border border-input border-r-0! px-3 text-muted-foreground",
|
|
94
|
+
o ? "" : z[e.size],
|
|
95
|
+
l[e.rounded] || "rounded-l-md",
|
|
96
|
+
e.addonLeftClass,
|
|
97
|
+
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
98
|
+
].join(" ");
|
|
99
|
+
}), D = u(() => {
|
|
100
|
+
const l = {
|
|
101
|
+
sm: "rounded-r-sm",
|
|
102
|
+
md: "rounded-r-md",
|
|
103
|
+
lg: "rounded-r-lg",
|
|
104
|
+
full: "rounded-r-full",
|
|
105
|
+
none: "rounded-none",
|
|
106
|
+
xl: "rounded-r-xl",
|
|
107
|
+
"2xl": "rounded-r-2xl"
|
|
108
|
+
}, o = !!m["addon-right"];
|
|
109
|
+
return [
|
|
110
|
+
"flex items-center justify-center whitespace-nowrap",
|
|
111
|
+
o ? "border-none" : "bg-muted border border-input border-l-0! px-3 text-muted-foreground",
|
|
112
|
+
o ? "" : z[e.size],
|
|
113
|
+
l[e.rounded] || "rounded-r-md",
|
|
114
|
+
e.addonRightClass,
|
|
115
|
+
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
116
|
+
].join(" ");
|
|
117
|
+
}), H = (l) => {
|
|
118
|
+
if (e.lazy) return;
|
|
119
|
+
const o = l.target;
|
|
120
|
+
r("update:modelValue", o.value);
|
|
121
|
+
}, U = (l) => {
|
|
122
|
+
const o = l.target;
|
|
123
|
+
e.lazy && r("update:modelValue", o.value), r("change", o.value);
|
|
124
|
+
}, W = () => {
|
|
125
|
+
b.value = !b.value;
|
|
126
|
+
}, q = () => {
|
|
127
|
+
r("update:modelValue", ""), A(() => {
|
|
128
|
+
y.value?.focus();
|
|
129
|
+
});
|
|
130
|
+
}, p = v(!1), w = v(!1), P = (l) => {
|
|
131
|
+
p.value = !0, r("focus", l);
|
|
132
|
+
}, S = (l) => {
|
|
133
|
+
p.value = !1, r("blur", l);
|
|
134
|
+
};
|
|
135
|
+
return K(() => {
|
|
136
|
+
e.autofocus && A(() => {
|
|
137
|
+
y.value?.focus();
|
|
138
|
+
});
|
|
139
|
+
}), (l, o) => (d(), i("div", {
|
|
140
|
+
class: s(N.value)
|
|
141
|
+
}, [
|
|
142
|
+
t.label ? (d(), C(Q, {
|
|
143
|
+
key: 0,
|
|
144
|
+
for: t.label,
|
|
145
|
+
class: s(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
|
|
146
|
+
}, {
|
|
147
|
+
default: O(() => [
|
|
148
|
+
k(V(t.label), 1)
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["for", "class"])) : c("", !0),
|
|
152
|
+
B("div", {
|
|
153
|
+
class: s(T.value)
|
|
154
|
+
}, [
|
|
155
|
+
g.value ? (d(), i("div", {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: s(E.value)
|
|
158
|
+
}, [
|
|
159
|
+
F(l.$slots, "addon-left", {}, () => [
|
|
160
|
+
k(V(t.addonLeft), 1)
|
|
161
|
+
])
|
|
162
|
+
], 2)) : c("", !0),
|
|
163
|
+
B("div", {
|
|
164
|
+
class: "relative w-full",
|
|
165
|
+
onMouseenter: o[3] || (o[3] = (a) => w.value = !0),
|
|
166
|
+
onMouseleave: o[4] || (o[4] = (a) => w.value = !1)
|
|
167
|
+
}, [
|
|
168
|
+
t.type === "textarea" ? (d(), C(X, {
|
|
169
|
+
key: 0,
|
|
170
|
+
"model-value": String(t.modelValue),
|
|
171
|
+
placeholder: t.placeholder,
|
|
172
|
+
disabled: t.disabled,
|
|
173
|
+
rows: t.rows,
|
|
174
|
+
class: s(R.value),
|
|
175
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => r("update:modelValue", a)),
|
|
176
|
+
onBlur: S,
|
|
177
|
+
onFocus: P
|
|
178
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "rows", "class"])) : (d(), i("input", {
|
|
179
|
+
key: 1,
|
|
180
|
+
ref_key: "inputRef",
|
|
181
|
+
ref: y,
|
|
182
|
+
type: M.value,
|
|
183
|
+
value: t.modelValue,
|
|
184
|
+
placeholder: t.placeholder,
|
|
185
|
+
disabled: t.disabled,
|
|
186
|
+
min: t.min,
|
|
187
|
+
max: t.max,
|
|
188
|
+
class: s(R.value),
|
|
189
|
+
onInput: H,
|
|
190
|
+
onChange: U,
|
|
191
|
+
onBlur: S,
|
|
192
|
+
onFocus: P
|
|
193
|
+
}, null, 42, Y)),
|
|
194
|
+
t.icon ? (d(), i("div", {
|
|
195
|
+
key: 2,
|
|
196
|
+
tabindex: "-1",
|
|
197
|
+
class: s([
|
|
198
|
+
"absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground",
|
|
199
|
+
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
|
|
200
|
+
]),
|
|
201
|
+
onClick: o[1] || (o[1] = (a) => !t.disabled && r("click:icon", a))
|
|
202
|
+
}, [
|
|
203
|
+
x(f, {
|
|
204
|
+
icon: t.icon,
|
|
205
|
+
class: "h-4 w-4"
|
|
206
|
+
}, null, 8, ["icon"])
|
|
207
|
+
], 2)) : c("", !0),
|
|
208
|
+
B("div", Z, [
|
|
209
|
+
t.loading ? (d(), C(f, {
|
|
210
|
+
key: 0,
|
|
211
|
+
icon: "lucide:loader-2",
|
|
212
|
+
class: "h-4 w-4 animate-spin text-muted-foreground"
|
|
213
|
+
})) : t.iconRight ? (d(), i("div", {
|
|
214
|
+
key: 1,
|
|
215
|
+
tabindex: "-1",
|
|
216
|
+
class: s([
|
|
217
|
+
"flex items-center justify-center text-muted-foreground",
|
|
218
|
+
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
|
|
219
|
+
]),
|
|
220
|
+
onClick: o[2] || (o[2] = (a) => !t.disabled && r("click:icon-right", a))
|
|
221
|
+
}, [
|
|
222
|
+
x(f, {
|
|
223
|
+
icon: t.iconRight,
|
|
224
|
+
class: "h-4 w-4"
|
|
225
|
+
}, null, 8, ["icon"])
|
|
226
|
+
], 2)) : c("", !0),
|
|
227
|
+
t.type === "password" && !t.disabled ? (d(), i("button", {
|
|
228
|
+
key: 2,
|
|
229
|
+
type: "button",
|
|
230
|
+
tabindex: "-1",
|
|
231
|
+
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none",
|
|
232
|
+
onClick: W
|
|
233
|
+
}, [
|
|
234
|
+
x(f, {
|
|
235
|
+
icon: b.value ? "lucide:eye-off" : "lucide:eye",
|
|
236
|
+
class: "h-4 w-4"
|
|
237
|
+
}, null, 8, ["icon"])
|
|
238
|
+
])) : c("", !0),
|
|
239
|
+
t.showClearButton && j.value && !t.disabled && !t.loading && t.type !== "textarea" && t.type !== "password" && (p.value || w.value) ? (d(), i("button", {
|
|
240
|
+
key: 3,
|
|
241
|
+
type: "button",
|
|
242
|
+
tabindex: "-1",
|
|
243
|
+
class: "flex items-center justify-center text-muted-foreground hover:text-foreground focus:outline-none transition-opacity duration-200",
|
|
244
|
+
onClick: q
|
|
245
|
+
}, [
|
|
246
|
+
x(f, {
|
|
247
|
+
icon: "lucide:x-circle",
|
|
248
|
+
class: "h-4 w-4"
|
|
249
|
+
})
|
|
250
|
+
])) : c("", !0)
|
|
251
|
+
])
|
|
252
|
+
], 32),
|
|
253
|
+
h.value ? (d(), i("div", {
|
|
254
|
+
key: 1,
|
|
255
|
+
class: s(D.value)
|
|
256
|
+
}, [
|
|
257
|
+
F(l.$slots, "addon-right", {}, () => [
|
|
258
|
+
k(V(t.addonRight), 1)
|
|
259
|
+
])
|
|
260
|
+
], 2)) : c("", !0)
|
|
261
|
+
], 2)
|
|
262
|
+
], 2));
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
export {
|
|
266
|
+
le as default
|
|
267
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
for?: string;
|
|
3
|
+
class?: string;
|
|
4
|
+
}
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLLabelElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
class: string;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLLabelElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as l, computed as r, openBlock as a, createElementBlock as n, normalizeClass as c, renderSlot as d } from "vue";
|
|
2
|
+
const p = ["for"], m = /* @__PURE__ */ l({
|
|
3
|
+
__name: "Label",
|
|
4
|
+
props: {
|
|
5
|
+
for: {},
|
|
6
|
+
class: { default: "" }
|
|
7
|
+
},
|
|
8
|
+
setup(o) {
|
|
9
|
+
const e = o, s = r(() => [
|
|
10
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
11
|
+
e.class
|
|
12
|
+
].join(" "));
|
|
13
|
+
return (t, f) => (a(), n("label", {
|
|
14
|
+
for: e.for,
|
|
15
|
+
class: c(s.value)
|
|
16
|
+
}, [
|
|
17
|
+
d(t.$slots, "default")
|
|
18
|
+
], 10, p));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
m as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MasonryProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {
|
|
6
|
+
data: any;
|
|
7
|
+
index: any;
|
|
8
|
+
colIndex: number;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
containerRef: unknown;
|
|
13
|
+
};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<MasonryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MasonryProps> & Readonly<{}>, {
|
|
18
|
+
gap: number;
|
|
19
|
+
tag: string;
|
|
20
|
+
cols: number | Record<string | number, number>;
|
|
21
|
+
itemKey: string;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
+
containerRef: unknown;
|
|
24
|
+
}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as B, ref as d, computed as m, onMounted as K, onUnmounted as O, openBlock as u, createBlock as w, resolveDynamicComponent as z, normalizeStyle as v, withCtx as C, createElementBlock as c, Fragment as p, renderList as y, renderSlot as S } from "vue";
|
|
2
|
+
import { MASONRY_BREAKPOINTS as x } from "./types.js";
|
|
3
|
+
import { debounce as A } from "../../utils/functions.js";
|
|
4
|
+
const j = /* @__PURE__ */ B({
|
|
5
|
+
__name: "Masonry",
|
|
6
|
+
props: {
|
|
7
|
+
data: {},
|
|
8
|
+
cols: { default: () => ({ default: 1, sm: 2, lg: 3 }) },
|
|
9
|
+
gap: { default: 16 },
|
|
10
|
+
tag: { default: "div" },
|
|
11
|
+
itemKey: { default: "id" }
|
|
12
|
+
},
|
|
13
|
+
setup(i) {
|
|
14
|
+
const l = i, r = d(null), f = d(0), s = d(null), g = () => {
|
|
15
|
+
r.value && (f.value = r.value.clientWidth);
|
|
16
|
+
}, b = m(() => {
|
|
17
|
+
if (typeof l.cols == "number") return l.cols;
|
|
18
|
+
const n = f.value;
|
|
19
|
+
if (!n) return l.cols.default || 1;
|
|
20
|
+
let o = l.cols.default || 1;
|
|
21
|
+
const t = Object.keys(l.cols).map((e) => {
|
|
22
|
+
let a = 0;
|
|
23
|
+
return typeof e == "number" || !isNaN(Number(e)) ? a = Number(e) : e in x && (a = x[e]), { k: e, px: a, val: l.cols[e] };
|
|
24
|
+
}).filter((e) => e.val !== void 0).sort((e, a) => e.px - a.px);
|
|
25
|
+
for (const e of t)
|
|
26
|
+
n >= e.px && (o = e.val);
|
|
27
|
+
return o || 1;
|
|
28
|
+
}), h = m(() => {
|
|
29
|
+
const n = b.value, o = Array.from({ length: n }, () => []), t = l.data.length;
|
|
30
|
+
for (let e = 0; e < t; e++)
|
|
31
|
+
o[e % n].push({
|
|
32
|
+
data: l.data[e],
|
|
33
|
+
index: e
|
|
34
|
+
});
|
|
35
|
+
return o;
|
|
36
|
+
});
|
|
37
|
+
K(() => {
|
|
38
|
+
g();
|
|
39
|
+
const n = A((o) => {
|
|
40
|
+
const t = o[0];
|
|
41
|
+
t && (f.value = t.contentRect.width);
|
|
42
|
+
}, 100);
|
|
43
|
+
s.value = new ResizeObserver(n), r.value && s.value.observe(r.value);
|
|
44
|
+
}), O(() => {
|
|
45
|
+
s.value && (s.value.disconnect(), s.value = null);
|
|
46
|
+
});
|
|
47
|
+
const R = (n, o) => {
|
|
48
|
+
const t = n.data;
|
|
49
|
+
return t && typeof t == "object" && l.itemKey in t ? t[l.itemKey] : o;
|
|
50
|
+
};
|
|
51
|
+
return (n, o) => (u(), w(z(i.tag), {
|
|
52
|
+
ref_key: "containerRef",
|
|
53
|
+
ref: r,
|
|
54
|
+
class: "flex w-full",
|
|
55
|
+
style: v({ gap: `${i.gap}px` })
|
|
56
|
+
}, {
|
|
57
|
+
default: C(() => [
|
|
58
|
+
(u(!0), c(p, null, y(h.value, (t, e) => (u(), c("div", {
|
|
59
|
+
key: e,
|
|
60
|
+
class: "flex flex-col flex-1 min-w-0",
|
|
61
|
+
style: v({ gap: `${i.gap}px` }),
|
|
62
|
+
role: "list"
|
|
63
|
+
}, [
|
|
64
|
+
(u(!0), c(p, null, y(t, (a, N) => (u(), c("div", {
|
|
65
|
+
key: R(a, N),
|
|
66
|
+
class: "masonry-item",
|
|
67
|
+
role: "listitem"
|
|
68
|
+
}, [
|
|
69
|
+
S(n.$slots, "default", {
|
|
70
|
+
data: a.data,
|
|
71
|
+
index: a.index,
|
|
72
|
+
colIndex: e
|
|
73
|
+
}, void 0, !0)
|
|
74
|
+
]))), 128))
|
|
75
|
+
], 4))), 128))
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 8, ["style"]));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
j as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface MasonryProps {
|
|
2
|
+
/**
|
|
3
|
+
* Array of items to render
|
|
4
|
+
*/
|
|
5
|
+
data: any[];
|
|
6
|
+
/**
|
|
7
|
+
* Column configuration object.
|
|
8
|
+
* Can be number keys (width in px) or string keys ('sm', 'md', 'lg', 'xl', '2xl').
|
|
9
|
+
* Values are element counts.
|
|
10
|
+
* Example: { default: 1, md: 2, lg: 3 }
|
|
11
|
+
*/
|
|
12
|
+
cols?: number | Record<string | number, number>;
|
|
13
|
+
/**
|
|
14
|
+
* Gap between columns and rows (in px or tailwind class number equivalent if implemented manually).
|
|
15
|
+
* For simplicity here, we assume it's a number representing pixels or 'rem' spacing via style,
|
|
16
|
+
* or a simple numeric multiplier for standard spacing.
|
|
17
|
+
* Defaults to 16 (px) or similar.
|
|
18
|
+
*/
|
|
19
|
+
gap?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Element used for the root container
|
|
22
|
+
*/
|
|
23
|
+
tag?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Key property name in data items to use as unique key.
|
|
26
|
+
* Defaults to 'id'. If not found, uses index (not recommended for large lists).
|
|
27
|
+
*/
|
|
28
|
+
itemKey?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Breakpoint values mapping in pixels
|
|
32
|
+
*/
|
|
33
|
+
export declare const MASONRY_BREAKPOINTS: Record<string, number>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
interface Props {
|
|
3
|
+
show?: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
maxWidth?: string;
|
|
6
|
+
closeOutside?: boolean;
|
|
7
|
+
backdrop?: boolean;
|
|
8
|
+
description?: string;
|
|
9
|
+
triggerClass?: string;
|
|
10
|
+
bodyClass?: string;
|
|
11
|
+
headerClass?: string;
|
|
12
|
+
footerClass?: string;
|
|
13
|
+
body?: Component;
|
|
14
|
+
bodyProps?: Record<string, any>;
|
|
15
|
+
}
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
trigger?(_: {}): any;
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
default?(_: {
|
|
22
|
+
close: () => void;
|
|
23
|
+
}): any;
|
|
24
|
+
footer?(_: {
|
|
25
|
+
close: () => void;
|
|
26
|
+
}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {};
|
|
29
|
+
rootEl: any;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
32
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
33
|
+
close: () => any;
|
|
34
|
+
onOpen: () => any;
|
|
35
|
+
"update:show": (value: boolean) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
37
|
+
onClose?: () => any;
|
|
38
|
+
onOnOpen?: () => any;
|
|
39
|
+
"onUpdate:show"?: (value: boolean) => any;
|
|
40
|
+
}>, {
|
|
41
|
+
show: boolean;
|
|
42
|
+
maxWidth: string;
|
|
43
|
+
closeOutside: boolean;
|
|
44
|
+
backdrop: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|