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,310 @@
|
|
|
1
|
+
import { defineComponent as _, ref as g, computed as b, watch as p, onMounted as ee, openBlock as n, createElementBlock as i, createVNode as $, createSlots as V, withCtx as z, renderSlot as I, createBlock as j, createCommentVNode as k, createElementVNode as r, normalizeClass as E, Fragment as B, renderList as P, normalizeStyle as D, mergeProps as te, toDisplayString as le, createTextVNode as ae, unref as se } from "vue";
|
|
2
|
+
import oe from "../Icon.vue.js";
|
|
3
|
+
import ne from "../CheckBox.vue.js";
|
|
4
|
+
import re from "../Button.vue.js";
|
|
5
|
+
import ie from "../ConfirmationModal.vue.js";
|
|
6
|
+
import de from "../Pagination/Pagination.vue.js";
|
|
7
|
+
import ue from "./DataTableHeader.vue.js";
|
|
8
|
+
import ce from "./DataTableRow.vue.js";
|
|
9
|
+
import me from "./DataTableToolbar.vue.js";
|
|
10
|
+
const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve = {
|
|
11
|
+
key: 0,
|
|
12
|
+
style: { width: "48px" }
|
|
13
|
+
}, ge = { class: "[&_tr]:border-b [&_tr]:border-border/70! bg-muted" }, pe = { class: "hover:bg-transparent" }, we = {
|
|
14
|
+
key: 0,
|
|
15
|
+
scope: "col",
|
|
16
|
+
class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
|
|
17
|
+
style: { width: "48px" }
|
|
18
|
+
}, ye = { class: "flex items-center justify-center" }, be = { class: "[&_tr:last-child]:border-0" }, ke = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
21
|
+
style: { width: "48px" }
|
|
22
|
+
}, Pe = { key: 2 }, xe = ["colspan"], Ce = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, Se = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted/20" }, $e = { class: "mt-2 text-base font-semibold text-foreground" }, Ie = { class: "text-sm max-w-sm mx-auto" }, Be = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "mt-4"
|
|
25
|
+
}, Fe = { key: 0 }, Ae = /* @__PURE__ */ _({
|
|
26
|
+
__name: "DataTable",
|
|
27
|
+
props: {
|
|
28
|
+
rows: { default: () => [] },
|
|
29
|
+
selectedRows: { default: () => [] },
|
|
30
|
+
search: { default: "" },
|
|
31
|
+
showSearch: { type: Boolean, default: !0 },
|
|
32
|
+
searchPlaceholder: { default: "Search..." },
|
|
33
|
+
headers: { default: () => [] },
|
|
34
|
+
keyField: { default: "_id" },
|
|
35
|
+
loading: { type: Boolean, default: !1 },
|
|
36
|
+
selectable: { type: Boolean, default: !1 },
|
|
37
|
+
emptyMessage: { default: "No data available" },
|
|
38
|
+
emptyIcon: { default: "lucide:inbox" },
|
|
39
|
+
showPagination: { type: Boolean, default: !0 },
|
|
40
|
+
pageInfo: {},
|
|
41
|
+
itemsPerPage: { default: 10 },
|
|
42
|
+
itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
|
|
43
|
+
showItemsPerPage: { type: Boolean, default: !0 },
|
|
44
|
+
striped: { type: Boolean, default: !1 },
|
|
45
|
+
hoverable: { type: Boolean, default: !0 },
|
|
46
|
+
bordered: { type: Boolean, default: !0 },
|
|
47
|
+
compact: { type: Boolean, default: !1 },
|
|
48
|
+
tableClass: {},
|
|
49
|
+
class: {}
|
|
50
|
+
},
|
|
51
|
+
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
52
|
+
setup(s, { emit: A }) {
|
|
53
|
+
const U = (e, t) => t.split(".").reduce((l, c) => l?.[c], e), u = (e, t) => U(e, t), a = s, w = A, d = g({ field: "", order: "" }), x = g(a.itemsPerPage), h = g(a.pageInfo?.currentPage || 1), y = g(a.search || ""), C = g(!1), v = g("initial"), O = b(() => a.loading && (v.value === "initial" || v.value === "page"));
|
|
54
|
+
p(
|
|
55
|
+
() => a.loading,
|
|
56
|
+
(e, t) => {
|
|
57
|
+
!e && t && (v.value = "idle");
|
|
58
|
+
}
|
|
59
|
+
), p(
|
|
60
|
+
() => a.search,
|
|
61
|
+
(e) => {
|
|
62
|
+
e !== void 0 && e !== y.value && (y.value = e);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
let F = null;
|
|
66
|
+
p(y, (e) => {
|
|
67
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
68
|
+
h.value = 1, v.value = "search", S();
|
|
69
|
+
}, 300);
|
|
70
|
+
}), p(
|
|
71
|
+
() => a.itemsPerPage,
|
|
72
|
+
(e) => {
|
|
73
|
+
x.value = e;
|
|
74
|
+
}
|
|
75
|
+
), p(
|
|
76
|
+
() => a.pageInfo?.currentPage,
|
|
77
|
+
(e) => {
|
|
78
|
+
e && (h.value = e);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
const M = (e) => u(e, a.keyField), o = g(/* @__PURE__ */ new Set());
|
|
82
|
+
p(
|
|
83
|
+
() => a.selectedRows,
|
|
84
|
+
(e) => {
|
|
85
|
+
const t = new Set((e || []).map((l) => u(l, a.keyField)));
|
|
86
|
+
(t.size !== o.value.size || [...t].some((l) => !o.value.has(l))) && (o.value = t);
|
|
87
|
+
},
|
|
88
|
+
{ immediate: !0, deep: !0 }
|
|
89
|
+
);
|
|
90
|
+
const R = b(() => a.rows.length === 0 ? !1 : a.rows.every((e) => o.value.has(u(e, a.keyField)))), N = b(() => o.value.size > 0 && !R.value), L = b(() => {
|
|
91
|
+
const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
|
|
92
|
+
return e.forEach((l) => t.set(u(l, a.keyField), l)), Array.from(o.value).map((l) => t.get(l)).filter(Boolean);
|
|
93
|
+
}), W = (e) => {
|
|
94
|
+
e ? a.rows.forEach((t) => o.value.add(u(t, a.keyField))) : o.value.size > 0 && a.rows.forEach((t) => o.value.delete(u(t, a.keyField))), T();
|
|
95
|
+
}, q = (e) => {
|
|
96
|
+
o.value.has(e) ? o.value.delete(e) : o.value.add(e), T();
|
|
97
|
+
}, T = () => {
|
|
98
|
+
const e = a.selectedRows || [], t = /* @__PURE__ */ new Set(), l = [];
|
|
99
|
+
a.rows.forEach((m) => {
|
|
100
|
+
const f = u(m, a.keyField);
|
|
101
|
+
o.value.has(f) && (l.push(m), t.add(f));
|
|
102
|
+
}), e.forEach((m) => {
|
|
103
|
+
const f = u(m, a.keyField);
|
|
104
|
+
!t.has(f) && o.value.has(f) && (l.push(m), t.add(f));
|
|
105
|
+
});
|
|
106
|
+
const c = {
|
|
107
|
+
selected: l,
|
|
108
|
+
all: R.value,
|
|
109
|
+
indeterminate: N.value
|
|
110
|
+
};
|
|
111
|
+
w("select", c), w("update:selectedRows", l);
|
|
112
|
+
}, G = (e) => {
|
|
113
|
+
d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), h.value = 1, v.value = "sort", S();
|
|
114
|
+
}, H = (e) => {
|
|
115
|
+
h.value = e, v.value = "page", S();
|
|
116
|
+
}, J = (e) => {
|
|
117
|
+
x.value = e, h.value = 1, v.value = "limit", w("update:itemsPerPage", e), S();
|
|
118
|
+
}, K = (e) => {
|
|
119
|
+
w("rowClick", e);
|
|
120
|
+
}, Q = () => {
|
|
121
|
+
const e = L.value;
|
|
122
|
+
w("delete", e), C.value = !1;
|
|
123
|
+
}, S = () => {
|
|
124
|
+
w("change", {
|
|
125
|
+
pagination: {
|
|
126
|
+
page: h.value,
|
|
127
|
+
limit: x.value
|
|
128
|
+
},
|
|
129
|
+
sorting: { ...d.value },
|
|
130
|
+
search: y.value
|
|
131
|
+
});
|
|
132
|
+
}, X = b(() => [
|
|
133
|
+
"w-full bg-background rounded border border-border/60 flex flex-col",
|
|
134
|
+
"overflow-hidden",
|
|
135
|
+
a.class
|
|
136
|
+
].join(" ")), Y = b(() => ["w-full caption-bottom text-sm", a.tableClass].join(" ")), Z = (e) => e.width ? e.width : "auto";
|
|
137
|
+
return p(
|
|
138
|
+
() => a.rows,
|
|
139
|
+
() => {
|
|
140
|
+
const e = new Set(a.rows.map((t) => u(t, a.keyField)));
|
|
141
|
+
o.value = new Set([...o.value].filter((t) => e.has(t)));
|
|
142
|
+
}
|
|
143
|
+
), ee(() => {
|
|
144
|
+
S();
|
|
145
|
+
}), (e, t) => (n(), i("div", fe, [
|
|
146
|
+
$(me, {
|
|
147
|
+
modelValue: y.value,
|
|
148
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => y.value = l),
|
|
149
|
+
"show-search": s.showSearch,
|
|
150
|
+
placeholder: s.searchPlaceholder
|
|
151
|
+
}, V({ _: 2 }, [
|
|
152
|
+
e.$slots?.["toolbar-left"] ? {
|
|
153
|
+
name: "left",
|
|
154
|
+
fn: z(() => [
|
|
155
|
+
I(e.$slots, "toolbar-left", {}, void 0, !0)
|
|
156
|
+
]),
|
|
157
|
+
key: "0"
|
|
158
|
+
} : void 0,
|
|
159
|
+
e.$slots?.["toolbar-right"] || o.value.size > 0 ? {
|
|
160
|
+
name: "right",
|
|
161
|
+
fn: z(() => [
|
|
162
|
+
o.value.size > 0 ? (n(), j(re, {
|
|
163
|
+
key: 0,
|
|
164
|
+
rounded: "full",
|
|
165
|
+
variant: "ghost",
|
|
166
|
+
icon: "lucide:trash-2",
|
|
167
|
+
class: "text-destructive! bg-destructive/10 hover:bg-destructive/15",
|
|
168
|
+
onClick: t[0] || (t[0] = (l) => C.value = !0)
|
|
169
|
+
})) : k("", !0),
|
|
170
|
+
I(e.$slots, "toolbar-right", {}, void 0, !0)
|
|
171
|
+
]),
|
|
172
|
+
key: "1"
|
|
173
|
+
} : void 0
|
|
174
|
+
]), 1032, ["modelValue", "show-search", "placeholder"]),
|
|
175
|
+
r("div", {
|
|
176
|
+
class: E(X.value)
|
|
177
|
+
}, [
|
|
178
|
+
r("div", he, [
|
|
179
|
+
r("table", {
|
|
180
|
+
class: E(Y.value)
|
|
181
|
+
}, [
|
|
182
|
+
r("colgroup", null, [
|
|
183
|
+
s.selectable ? (n(), i("col", ve)) : k("", !0),
|
|
184
|
+
(n(!0), i(B, null, P(s.headers, (l) => (n(), i("col", {
|
|
185
|
+
key: l.field,
|
|
186
|
+
style: D({
|
|
187
|
+
width: Z(l)
|
|
188
|
+
})
|
|
189
|
+
}, null, 4))), 128))
|
|
190
|
+
]),
|
|
191
|
+
r("thead", ge, [
|
|
192
|
+
r("tr", pe, [
|
|
193
|
+
s.selectable ? (n(), i("th", we, [
|
|
194
|
+
r("div", ye, [
|
|
195
|
+
$(ne, {
|
|
196
|
+
"model-value": R.value,
|
|
197
|
+
indeterminate: N.value,
|
|
198
|
+
size: "xs",
|
|
199
|
+
"onUpdate:modelValue": W
|
|
200
|
+
}, null, 8, ["model-value", "indeterminate"])
|
|
201
|
+
])
|
|
202
|
+
])) : k("", !0),
|
|
203
|
+
(n(!0), i(B, null, P(s.headers, (l) => (n(), j(ue, {
|
|
204
|
+
key: l.field,
|
|
205
|
+
header: l,
|
|
206
|
+
"sort-config": d.value,
|
|
207
|
+
compact: s.compact,
|
|
208
|
+
onSort: G
|
|
209
|
+
}, null, 8, ["header", "sort-config", "compact"]))), 128))
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
r("tbody", be, [
|
|
213
|
+
O.value ? (n(!0), i(B, { key: 0 }, P(Math.min(x.value, 15), (l) => (n(), i("tr", {
|
|
214
|
+
key: "skeleton-" + l,
|
|
215
|
+
class: "border-b border-border/50 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
216
|
+
}, [
|
|
217
|
+
s.selectable ? (n(), i("td", ke, [...t[4] || (t[4] = [
|
|
218
|
+
r("div", { class: "flex items-center justify-center" }, [
|
|
219
|
+
r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
220
|
+
], -1)
|
|
221
|
+
])])) : k("", !0),
|
|
222
|
+
(n(!0), i(B, null, P(s.headers, (c) => (n(), i("td", {
|
|
223
|
+
key: c.field,
|
|
224
|
+
class: E(["p-5! align-middle", [c.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
225
|
+
}, [
|
|
226
|
+
r("div", {
|
|
227
|
+
class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
|
|
228
|
+
style: D({
|
|
229
|
+
width: `${50 + Math.random() * 40}%`
|
|
230
|
+
})
|
|
231
|
+
}, null, 4)
|
|
232
|
+
], 2))), 128))
|
|
233
|
+
]))), 128)) : s.rows.length > 0 ? (n(!0), i(B, { key: 1 }, P(s.rows, (l, c) => (n(), j(ce, {
|
|
234
|
+
key: M(l),
|
|
235
|
+
row: l,
|
|
236
|
+
headers: s.headers,
|
|
237
|
+
index: c,
|
|
238
|
+
"key-field": s.keyField,
|
|
239
|
+
selectable: s.selectable,
|
|
240
|
+
"is-selected": o.value.has(M(l)),
|
|
241
|
+
hoverable: s.hoverable,
|
|
242
|
+
striped: s.striped,
|
|
243
|
+
compact: s.compact,
|
|
244
|
+
onSelect: q,
|
|
245
|
+
onRowClick: K
|
|
246
|
+
}, V({ _: 2 }, [
|
|
247
|
+
P(s.headers, (m) => ({
|
|
248
|
+
name: m.field,
|
|
249
|
+
fn: z((f) => [
|
|
250
|
+
I(e.$slots, m.field, te({ ref_for: !0 }, f), void 0, !0)
|
|
251
|
+
])
|
|
252
|
+
}))
|
|
253
|
+
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", Pe, [
|
|
254
|
+
r("td", {
|
|
255
|
+
colspan: s.selectable ? s.headers.length + 1 : s.headers.length,
|
|
256
|
+
class: "h-96 text-center align-middle hover:bg-transparent"
|
|
257
|
+
}, [
|
|
258
|
+
r("div", Ce, [
|
|
259
|
+
r("div", Se, [
|
|
260
|
+
$(oe, {
|
|
261
|
+
icon: s.emptyIcon,
|
|
262
|
+
class: "h-6 w-6 text-muted-foreground/80"
|
|
263
|
+
}, null, 8, ["icon"])
|
|
264
|
+
]),
|
|
265
|
+
r("h3", $e, le(s.emptyMessage), 1),
|
|
266
|
+
r("p", Ie, [
|
|
267
|
+
I(e.$slots, "empty-description", {}, () => [
|
|
268
|
+
t[5] || (t[5] = ae(" No results found. Try adjusting your filters or search terms. ", -1))
|
|
269
|
+
], !0)
|
|
270
|
+
]),
|
|
271
|
+
e.$slots["empty-action"] ? (n(), i("div", Be, [
|
|
272
|
+
I(e.$slots, "empty-action", {}, void 0, !0)
|
|
273
|
+
])) : k("", !0)
|
|
274
|
+
])
|
|
275
|
+
], 8, xe)
|
|
276
|
+
]))
|
|
277
|
+
])
|
|
278
|
+
], 2)
|
|
279
|
+
])
|
|
280
|
+
], 2),
|
|
281
|
+
s.showPagination && s.pageInfo ? (n(), i("div", Fe, [
|
|
282
|
+
$(se(de), {
|
|
283
|
+
"current-page": h.value,
|
|
284
|
+
"total-pages": s.pageInfo.totalPages,
|
|
285
|
+
"show-page-info": !1,
|
|
286
|
+
"show-items-per-page": s.showItemsPerPage,
|
|
287
|
+
"items-per-page": x.value,
|
|
288
|
+
"items-per-page-options": s.itemsPerPageOptions,
|
|
289
|
+
"nav-type": "icon",
|
|
290
|
+
onChange: H,
|
|
291
|
+
"onUpdate:itemsPerPage": J
|
|
292
|
+
}, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options"])
|
|
293
|
+
])) : k("", !0),
|
|
294
|
+
$(ie, {
|
|
295
|
+
show: C.value,
|
|
296
|
+
"onUpdate:show": t[2] || (t[2] = (l) => C.value = l),
|
|
297
|
+
title: "Confirm Deletion",
|
|
298
|
+
description: "Are you sure you want to delete the selected items?",
|
|
299
|
+
"confirm-text": "Delete",
|
|
300
|
+
"cancel-text": "Cancel",
|
|
301
|
+
variant: "danger",
|
|
302
|
+
onConfirm: Q,
|
|
303
|
+
onCancel: t[3] || (t[3] = (l) => C.value = !1)
|
|
304
|
+
}, null, 8, ["show"])
|
|
305
|
+
]));
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
export {
|
|
309
|
+
Ae as default
|
|
310
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TableHeader, SortConfig } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
header: TableHeader;
|
|
4
|
+
sortConfig?: SortConfig;
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
sort: (field: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
10
|
+
onSort?: (field: string) => any;
|
|
11
|
+
}>, {
|
|
12
|
+
compact: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableCellElement>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as m, computed as o, openBlock as n, createElementBlock as a, normalizeClass as r, createElementVNode as s, toDisplayString as p, createVNode as g, createCommentVNode as x } from "vue";
|
|
2
|
+
import y from "../Icon.vue.js";
|
|
3
|
+
const C = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, b = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "w-4 h-4 shrink-0"
|
|
6
|
+
}, j = /* @__PURE__ */ m({
|
|
7
|
+
__name: "DataTableHeader",
|
|
8
|
+
props: {
|
|
9
|
+
header: {},
|
|
10
|
+
sortConfig: {},
|
|
11
|
+
compact: { type: Boolean, default: !1 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["sort"],
|
|
14
|
+
setup(t, { emit: i }) {
|
|
15
|
+
const e = t, l = i, c = o(() => e.sortConfig?.field === e.header.field && e.sortConfig?.order), d = o(() => !e.sortConfig || e.sortConfig.field !== e.header.field ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), f = () => {
|
|
16
|
+
e.header.sortable !== !1 && l("sort", e.header.field);
|
|
17
|
+
}, u = o(() => ({
|
|
18
|
+
left: "justify-start text-left",
|
|
19
|
+
center: "justify-center text-center",
|
|
20
|
+
right: "justify-end text-right"
|
|
21
|
+
})[e.header.align || "left"]);
|
|
22
|
+
return (h, v) => (n(), a("th", {
|
|
23
|
+
scope: "col",
|
|
24
|
+
class: r(["h-10 px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden", [
|
|
25
|
+
t.compact ? "py-2" : "py-3!",
|
|
26
|
+
t.header.sortable !== !1 ? "cursor-pointer hover:bg-muted/50" : "",
|
|
27
|
+
t.header.hideOnMobile ? "hidden md:table-cell" : ""
|
|
28
|
+
]]),
|
|
29
|
+
onClick: f
|
|
30
|
+
}, [
|
|
31
|
+
s("div", {
|
|
32
|
+
class: r(["flex items-center gap-2 space-x-2", u.value])
|
|
33
|
+
}, [
|
|
34
|
+
s("span", C, p(t.header.title), 1),
|
|
35
|
+
t.header.sortable !== !1 ? (n(), a("span", b, [
|
|
36
|
+
g(y, {
|
|
37
|
+
icon: d.value,
|
|
38
|
+
class: r(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
|
|
39
|
+
c.value ? "opacity-100 text-foreground" : "opacity-0 group-hover:opacity-100"
|
|
40
|
+
]])
|
|
41
|
+
}, null, 8, ["icon", "class"])
|
|
42
|
+
])) : x("", !0)
|
|
43
|
+
], 2)
|
|
44
|
+
], 2));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
j as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TableHeader } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
row: any;
|
|
4
|
+
headers: TableHeader[];
|
|
5
|
+
index: number;
|
|
6
|
+
keyField: string;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
hoverable?: boolean;
|
|
10
|
+
striped?: boolean;
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: Partial<Record<string, (_: {
|
|
16
|
+
value: any;
|
|
17
|
+
row: any;
|
|
18
|
+
index: number;
|
|
19
|
+
field: string;
|
|
20
|
+
}) => any>>;
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLTableRowElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
+
select: (id: any) => any;
|
|
27
|
+
rowClick: (payload: {
|
|
28
|
+
row: any;
|
|
29
|
+
index: number;
|
|
30
|
+
}) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
32
|
+
onSelect?: (id: any) => any;
|
|
33
|
+
onRowClick?: (payload: {
|
|
34
|
+
row: any;
|
|
35
|
+
index: number;
|
|
36
|
+
}) => any;
|
|
37
|
+
}>, {
|
|
38
|
+
isSelected: boolean;
|
|
39
|
+
selectable: boolean;
|
|
40
|
+
compact: boolean;
|
|
41
|
+
keyField: string;
|
|
42
|
+
hoverable: boolean;
|
|
43
|
+
striped: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableRowElement>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineComponent as p, computed as k, openBlock as c, createElementBlock as a, normalizeClass as u, withModifiers as v, createElementVNode as m, createVNode as h, createCommentVNode as N, Fragment as B, renderList as M, renderSlot as V } from "vue";
|
|
2
|
+
import z from "../CheckBox.vue.js";
|
|
3
|
+
const F = ["data-state"], L = { class: "flex items-center justify-center" }, U = ["title", "innerHTML"], T = /* @__PURE__ */ p({
|
|
4
|
+
__name: "DataTableRow",
|
|
5
|
+
props: {
|
|
6
|
+
row: {},
|
|
7
|
+
headers: {},
|
|
8
|
+
index: {},
|
|
9
|
+
keyField: { default: "_id" },
|
|
10
|
+
selectable: { type: Boolean, default: !1 },
|
|
11
|
+
isSelected: { type: Boolean, default: !1 },
|
|
12
|
+
hoverable: { type: Boolean, default: !0 },
|
|
13
|
+
striped: { type: Boolean, default: !1 },
|
|
14
|
+
compact: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["select", "rowClick"],
|
|
17
|
+
setup(t, { emit: f }) {
|
|
18
|
+
const s = t, d = f, r = (e, n) => n.split(".").reduce((i, l) => i?.[l], e), g = (e, n, i) => e.format ? e.format(n, i) : n == null ? "-" : e.type === "price" ? new Intl.NumberFormat("en-US", {
|
|
19
|
+
style: "currency",
|
|
20
|
+
currency: "USD"
|
|
21
|
+
}).format(Number(n)) : e.type === "date" ? new Date(n).toLocaleDateString("en-US", {
|
|
22
|
+
year: "numeric",
|
|
23
|
+
month: "short",
|
|
24
|
+
day: "numeric"
|
|
25
|
+
}) : e.type === "number" ? new Intl.NumberFormat("en-US").format(Number(n)) : String(n), x = (e, n, i) => {
|
|
26
|
+
const l = [];
|
|
27
|
+
if (e.capitalize && l.push("capitalize"), e.addStatusColor) {
|
|
28
|
+
const o = w(n);
|
|
29
|
+
o && l.push(o);
|
|
30
|
+
}
|
|
31
|
+
if (typeof e.class == "function") {
|
|
32
|
+
const o = e.class(n, i);
|
|
33
|
+
o && l.push(o);
|
|
34
|
+
} else e.class && l.push(e.class);
|
|
35
|
+
return l.join(" ");
|
|
36
|
+
}, w = (e) => {
|
|
37
|
+
const n = {
|
|
38
|
+
active: "text-success font-medium",
|
|
39
|
+
inactive: "text-muted-foreground",
|
|
40
|
+
pending: "text-warning font-medium",
|
|
41
|
+
completed: "text-success font-medium",
|
|
42
|
+
cancelled: "text-destructive font-medium",
|
|
43
|
+
failed: "text-destructive font-medium",
|
|
44
|
+
success: "text-success font-medium",
|
|
45
|
+
error: "text-destructive font-medium",
|
|
46
|
+
warning: "text-warning font-medium",
|
|
47
|
+
info: "text-info font-medium",
|
|
48
|
+
high: "text-destructive font-medium",
|
|
49
|
+
medium: "text-warning font-medium",
|
|
50
|
+
low: "text-muted-foreground"
|
|
51
|
+
}, i = String(e).toLowerCase().replace(/[-_\s]/g, "");
|
|
52
|
+
return n[i] || "";
|
|
53
|
+
}, b = (e) => ({
|
|
54
|
+
left: "text-left",
|
|
55
|
+
center: "text-center",
|
|
56
|
+
right: "text-right"
|
|
57
|
+
})[e.align || "left"], y = k(() => r(s.row, s.keyField)), C = () => {
|
|
58
|
+
d("rowClick", { row: s.row, index: s.index });
|
|
59
|
+
}, S = () => {
|
|
60
|
+
d("select", y.value);
|
|
61
|
+
};
|
|
62
|
+
return (e, n) => (c(), a("tr", {
|
|
63
|
+
class: u(["border-b border-border/70 transition-colors data-[state=selected]:bg-muted h-full", [
|
|
64
|
+
t.hoverable ? "hover:bg-muted/80" : "",
|
|
65
|
+
t.striped && t.index % 2 === 1 ? "bg-muted/20" : "bg-background",
|
|
66
|
+
t.isSelected ? "bg-muted! hover:bg-muted/30" : "",
|
|
67
|
+
"group"
|
|
68
|
+
]]),
|
|
69
|
+
"data-state": t.isSelected ? "selected" : void 0,
|
|
70
|
+
onClick: C
|
|
71
|
+
}, [
|
|
72
|
+
t.selectable ? (c(), a("td", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: "w-[48px] px-0 py-3 align-middle text-center",
|
|
75
|
+
style: { width: "48px" },
|
|
76
|
+
onClick: n[0] || (n[0] = v(() => {
|
|
77
|
+
}, ["stop"]))
|
|
78
|
+
}, [
|
|
79
|
+
m("div", L, [
|
|
80
|
+
h(z, {
|
|
81
|
+
"model-value": t.isSelected,
|
|
82
|
+
size: "xs",
|
|
83
|
+
"onUpdate:modelValue": S
|
|
84
|
+
}, null, 8, ["model-value"])
|
|
85
|
+
])
|
|
86
|
+
])) : N("", !0),
|
|
87
|
+
(c(!0), a(B, null, M(t.headers, (i) => (c(), a("td", {
|
|
88
|
+
key: i.field,
|
|
89
|
+
class: u(["align-middle overflow-hidden", [
|
|
90
|
+
t.compact ? "p-2 text-xs" : "py-3! px-3 text-sm",
|
|
91
|
+
b(i),
|
|
92
|
+
i.hideOnMobile ? "hidden md:table-cell" : "",
|
|
93
|
+
x(i, r(t.row, i.field), t.row)
|
|
94
|
+
]])
|
|
95
|
+
}, [
|
|
96
|
+
V(e.$slots, i.field, {
|
|
97
|
+
value: t.row,
|
|
98
|
+
row: t.row,
|
|
99
|
+
index: t.index,
|
|
100
|
+
field: i.field
|
|
101
|
+
}, () => [
|
|
102
|
+
m("span", {
|
|
103
|
+
class: "truncate block",
|
|
104
|
+
title: String(r(t.row, i.field)),
|
|
105
|
+
innerHTML: g(i, r(t.row, i.field), t.row)
|
|
106
|
+
}, null, 8, U)
|
|
107
|
+
])
|
|
108
|
+
], 2))), 128))
|
|
109
|
+
], 10, F));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
export {
|
|
113
|
+
T as default
|
|
114
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
showSearch?: boolean;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
left?(_: {}): any;
|
|
10
|
+
right?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
+
"update:modelValue": (value: string) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
20
|
+
}>, {
|
|
21
|
+
placeholder: string;
|
|
22
|
+
modelValue: string;
|
|
23
|
+
showSearch: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
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,45 @@
|
|
|
1
|
+
import { defineComponent as i, computed as p, openBlock as l, createElementBlock as o, renderSlot as r, createCommentVNode as c, createVNode as f, createElementVNode as h } from "vue";
|
|
2
|
+
import V from "../Input.vue.js";
|
|
3
|
+
const g = { class: "flex flex-col sm:flex-row items-center gap-4 p-1" }, v = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "flex items-center gap-3"
|
|
6
|
+
}, _ = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "w-full sm:w-72! mr-auto!"
|
|
9
|
+
}, w = { class: "ml-auto flex items-center gap-3" }, x = /* @__PURE__ */ i({
|
|
10
|
+
__name: "DataTableToolbar",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { default: "" },
|
|
13
|
+
showSearch: { type: Boolean, default: !0 },
|
|
14
|
+
placeholder: { default: "Search..." }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(t, { emit: d }) {
|
|
18
|
+
const n = t, u = d, a = p({
|
|
19
|
+
get: () => n.modelValue,
|
|
20
|
+
set: (e) => u("update:modelValue", e)
|
|
21
|
+
});
|
|
22
|
+
return (e, s) => (l(), o("div", g, [
|
|
23
|
+
e.$slots?.left ? (l(), o("div", v, [
|
|
24
|
+
r(e.$slots, "left")
|
|
25
|
+
])) : c("", !0),
|
|
26
|
+
t.showSearch ? (l(), o("div", _, [
|
|
27
|
+
f(V, {
|
|
28
|
+
modelValue: a.value,
|
|
29
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => a.value = m),
|
|
30
|
+
placeholder: t.placeholder,
|
|
31
|
+
icon: "lucide:search",
|
|
32
|
+
variant: "outline",
|
|
33
|
+
class: "bg-background",
|
|
34
|
+
"show-clear-button": !0
|
|
35
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
36
|
+
])) : c("", !0),
|
|
37
|
+
h("div", w, [
|
|
38
|
+
r(e.$slots, "right")
|
|
39
|
+
])
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
x as default
|
|
45
|
+
};
|