vlite3 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_plugin-vue_export-helper.js +9 -0
- package/components/Accordion/Accordion.vue.d.ts +44 -0
- package/components/Accordion/Accordion.vue.js +95 -0
- package/components/Accordion/Accordion.vue2.js +4 -0
- package/components/Accordion/AccordionContent.vue.d.ts +22 -0
- package/components/Accordion/AccordionContent.vue.js +7 -0
- package/components/Accordion/AccordionContent.vue2.js +47 -0
- package/components/Accordion/AccordionItem.vue.d.ts +56 -0
- package/components/Accordion/AccordionItem.vue.js +115 -0
- package/components/Accordion/AccordionItem.vue2.js +4 -0
- package/components/Accordion/AccordionTrigger.vue.d.ts +43 -0
- package/components/Accordion/AccordionTrigger.vue.js +94 -0
- package/components/Accordion/AccordionTrigger.vue2.js +4 -0
- package/components/Accordion/index.d.ts +5 -0
- package/components/Accordion/types.d.ts +33 -0
- package/components/Alert.vue.d.ts +36 -0
- package/components/Alert.vue.js +84 -0
- package/components/Alert.vue2.js +4 -0
- package/components/Avatar.vue.d.ts +32 -0
- package/components/Avatar.vue.js +78 -0
- package/components/Avatar.vue2.js +4 -0
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +32 -0
- package/components/AvatarUploader/AvatarUploader.vue.js +99 -0
- package/components/AvatarUploader/AvatarUploader.vue2.js +4 -0
- package/{src/components/AvatarUploader/index.ts → components/AvatarUploader/index.d.ts} +2 -2
- package/components/Badge.vue.d.ts +25 -0
- package/components/Badge.vue.js +27 -0
- package/components/Badge.vue2.js +4 -0
- package/components/Button.vue.d.ts +26 -0
- package/components/Button.vue.js +107 -0
- package/components/Button.vue2.js +4 -0
- package/components/ButtonGroup.vue.d.ts +29 -0
- package/components/ButtonGroup.vue.js +7 -0
- package/components/ButtonGroup.vue2.js +30 -0
- package/components/Carousel/Carousel.vue.d.ts +847 -0
- package/components/Carousel/Carousel.vue.js +7 -0
- package/components/Carousel/Carousel.vue2.js +68 -0
- package/components/Carousel/index.d.ts +2 -0
- package/components/Carousel/types.d.ts +24 -0
- package/components/CheckBox.vue.d.ts +27 -0
- package/components/CheckBox.vue.js +115 -0
- package/components/CheckBox.vue2.js +4 -0
- package/components/Chip/Chip.vue.d.ts +33 -0
- package/components/Chip/Chip.vue.js +113 -0
- package/components/Chip/Chip.vue2.js +4 -0
- package/components/Chip/index.d.ts +2 -0
- package/components/Chip/types.d.ts +12 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +32 -0
- package/components/ChoiceBox/ChoiceBox.vue.js +141 -0
- package/components/ChoiceBox/ChoiceBox.vue2.js +4 -0
- package/components/ChoiceBox/index.d.ts +2 -0
- package/components/ColorPicker/ColorIro.vue.d.ts +18 -0
- package/components/ColorPicker/ColorIro.vue.js +142 -0
- package/components/ColorPicker/ColorIro.vue3.js +5 -0
- package/components/ColorPicker/ColorPicker.vue.d.ts +22 -0
- package/components/ColorPicker/ColorPicker.vue.js +56 -0
- package/components/ColorPicker/ColorPicker.vue2.js +4 -0
- package/components/ConfirmationModal.vue.d.ts +39 -0
- package/components/ConfirmationModal.vue.js +55 -0
- package/components/ConfirmationModal.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.d.ts +60 -0
- package/components/DataTable/DataTable.vue.js +7 -0
- package/components/DataTable/DataTable.vue2.js +310 -0
- package/components/DataTable/DataTableHeader.vue.d.ts +14 -0
- package/components/DataTable/DataTableHeader.vue.js +49 -0
- package/components/DataTable/DataTableHeader.vue2.js +4 -0
- package/components/DataTable/DataTableRow.vue.d.ts +51 -0
- package/components/DataTable/DataTableRow.vue.js +114 -0
- package/components/DataTable/DataTableRow.vue2.js +4 -0
- package/components/DataTable/DataTableToolbar.vue.d.ts +31 -0
- package/components/DataTable/DataTableToolbar.vue.js +45 -0
- package/components/DataTable/DataTableToolbar.vue2.js +4 -0
- package/components/DataTable/index.d.ts +4 -0
- package/components/DataTable/types.d.ts +75 -0
- package/components/DatePicker.vue.d.ts +44 -0
- package/components/DatePicker.vue.js +84 -0
- package/components/DatePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +105 -0
- package/components/Dropdown/Dropdown.vue.js +206 -0
- package/components/Dropdown/Dropdown.vue2.js +4 -0
- package/components/Dropdown/DropdownBooleanItem.vue.d.ts +12 -0
- package/components/Dropdown/DropdownBooleanItem.vue.js +41 -0
- package/components/Dropdown/DropdownBooleanItem.vue2.js +4 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +21 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.js +73 -0
- package/components/Dropdown/DropdownGroupedLayout.vue2.js +4 -0
- package/components/Dropdown/DropdownItem.vue.d.ts +35 -0
- package/components/Dropdown/DropdownItem.vue.js +56 -0
- package/components/Dropdown/DropdownItem.vue2.js +4 -0
- package/components/Dropdown/DropdownMenu.vue.d.ts +73 -0
- package/components/Dropdown/DropdownMenu.vue.js +232 -0
- package/components/Dropdown/DropdownMenu.vue2.js +4 -0
- package/components/Dropdown/DropdownTrigger.vue.d.ts +15 -0
- package/components/Dropdown/DropdownTrigger.vue.js +26 -0
- package/components/Dropdown/DropdownTrigger.vue2.js +4 -0
- package/components/Dropdown/composables/useDropdownIds.d.ts +5 -0
- package/components/Dropdown/composables/useDropdownIds.js +20 -0
- package/components/Dropdown/composables/useDropdownNavigation.d.ts +19 -0
- package/components/Dropdown/composables/useDropdownNavigation.js +49 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +16 -0
- package/components/Dropdown/composables/useDropdownSelection.js +41 -0
- package/components/Dropdown/index.d.ts +6 -0
- package/components/FilePicker/FilePicker.vue.d.ts +65 -0
- package/components/FilePicker/FilePicker.vue.js +285 -0
- package/components/FilePicker/FilePicker.vue2.js +4 -0
- package/components/FilePicker/index.d.ts +2 -0
- package/components/FileTree/FileTree.vue.d.ts +20 -0
- package/components/FileTree/FileTree.vue.js +139 -0
- package/components/FileTree/FileTree.vue2.js +4 -0
- package/components/FileTree/FileTreeNode.vue.d.ts +28 -0
- package/components/FileTree/FileTreeNode.vue.js +184 -0
- package/components/FileTree/FileTreeNode.vue2.js +4 -0
- package/components/FileTree/index.d.ts +4 -0
- package/components/FileTree/types.d.ts +36 -0
- package/components/FileTree/useTreeSelection.d.ts +12 -0
- package/components/FileTree/useTreeSelection.js +25 -0
- package/components/Form/CustomFields.vue.d.ts +38 -0
- package/components/Form/CustomFields.vue.js +7 -0
- package/components/Form/CustomFields.vue2.js +161 -0
- package/components/Form/Form.vue.d.ts +94 -0
- package/components/Form/Form.vue.js +7 -0
- package/components/Form/Form.vue2.js +238 -0
- package/components/Form/FormField.vue.d.ts +28 -0
- package/components/Form/FormField.vue.js +207 -0
- package/components/Form/FormField.vue2.js +4 -0
- package/components/Form/FormFields.vue.d.ts +29 -0
- package/components/Form/FormFields.vue.js +7 -0
- package/components/Form/FormFields.vue2.js +95 -0
- package/components/Form/composables/useFileUpload.d.ts +24 -0
- package/components/Form/composables/useFileUpload.js +40 -0
- package/components/Form/composables/useForm.d.ts +48 -0
- package/components/Form/composables/useForm.js +109 -0
- package/components/Form/index.d.ts +9 -0
- package/components/Form/types.d.ts +167 -0
- package/components/Form/utils/form.utils.d.ts +44 -0
- package/components/Form/utils/form.utils.js +97 -0
- package/components/Heatmap/Heatmap.vue.d.ts +26 -0
- package/components/Heatmap/Heatmap.vue.js +7 -0
- package/components/Heatmap/Heatmap.vue2.js +326 -0
- package/components/Heatmap/index.d.ts +2 -0
- package/components/Heatmap/types.d.ts +66 -0
- package/components/Icon.vue.d.ts +7 -0
- package/components/Icon.vue.js +25 -0
- package/components/Icon.vue2.js +4 -0
- package/components/IconPicker.vue.d.ts +38 -0
- package/components/IconPicker.vue.js +124 -0
- package/components/IconPicker.vue2.js +4 -0
- package/components/Input.vue.d.ts +54 -0
- package/components/Input.vue.js +267 -0
- package/components/Input.vue2.js +4 -0
- package/components/Label.vue.d.ts +23 -0
- package/components/Label.vue.js +23 -0
- package/components/Label.vue2.js +4 -0
- package/components/Logo.vue.d.ts +2 -0
- package/components/Logo.vue.js +10 -0
- package/components/Logo.vue2.js +4 -0
- package/components/Masonry/Masonry.vue.d.ts +31 -0
- package/components/Masonry/Masonry.vue.js +7 -0
- package/components/Masonry/Masonry.vue2.js +83 -0
- package/components/Masonry/index.d.ts +2 -0
- package/components/Masonry/types.d.ts +33 -0
- package/components/Masonry/types.js +10 -0
- package/components/Modal.vue.d.ts +52 -0
- package/components/Modal.vue.js +116 -0
- package/components/Modal.vue2.js +4 -0
- package/components/MultiSelect/MultiSelect.vue.d.ts +40 -0
- package/components/MultiSelect/MultiSelect.vue.js +126 -0
- package/components/MultiSelect/MultiSelect.vue2.js +4 -0
- package/components/MultiSelect/index.d.ts +1 -0
- package/components/Navbar/Navbar.vue.d.ts +51 -0
- package/components/Navbar/Navbar.vue.js +198 -0
- package/components/Navbar/Navbar.vue2.js +4 -0
- package/components/Navbar/NavbarGroup.vue.d.ts +24 -0
- package/components/Navbar/NavbarGroup.vue.js +23 -0
- package/components/Navbar/NavbarGroup.vue2.js +4 -0
- package/components/Navbar/NavbarItem.vue.d.ts +40 -0
- package/components/Navbar/NavbarItem.vue.js +104 -0
- package/components/Navbar/NavbarItem.vue2.js +4 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/OTPInput/OTPInput.vue.d.ts +33 -0
- package/components/OTPInput/OTPInput.vue.js +115 -0
- package/components/OTPInput/OTPInput.vue2.js +4 -0
- package/components/OTPInput/index.d.ts +1 -0
- package/components/Pagination/Pagination.vue.d.ts +34 -0
- package/components/Pagination/Pagination.vue.js +196 -0
- package/components/Pagination/Pagination.vue2.js +4 -0
- package/components/Pagination/index.d.ts +1 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +22 -0
- package/components/PricingPlan/PricingPlan.vue.js +55 -0
- package/components/PricingPlan/PricingPlan.vue2.js +4 -0
- package/components/PricingPlan/PricingPlanItem.vue.d.ts +17 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +94 -0
- package/components/PricingPlan/PricingPlanItem.vue2.js +4 -0
- package/components/PricingPlan/index.d.ts +3 -0
- package/components/PricingPlan/types.d.ts +25 -0
- package/components/SidePanel.vue.d.ts +64 -0
- package/components/SidePanel.vue.js +7 -0
- package/components/SidePanel.vue2.js +131 -0
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +11 -0
- package/components/SidebarMenu/SidebarMenu.vue.js +78 -0
- package/components/SidebarMenu/SidebarMenu.vue2.js +4 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +9 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +269 -0
- package/components/SidebarMenu/SidebarMenuItem.vue3.js +5 -0
- package/components/SidebarMenu/index.d.ts +3 -0
- package/components/SidebarMenu/types.d.ts +35 -0
- package/components/Slider.vue.d.ts +31 -0
- package/components/Slider.vue.js +157 -0
- package/components/Slider.vue2.js +4 -0
- package/components/Switch.vue.d.ts +16 -0
- package/components/Switch.vue.js +40 -0
- package/components/Switch.vue2.js +4 -0
- package/components/Tabes/Tabes.vue.d.ts +21 -0
- package/components/Tabes/Tabes.vue.js +75 -0
- package/components/Tabes/Tabes.vue2.js +4 -0
- package/components/Tabes/index.d.ts +2 -0
- package/components/Tabes/types.d.ts +8 -0
- package/components/Textarea.vue.d.ts +22 -0
- package/components/Textarea.vue.js +34 -0
- package/components/Textarea.vue2.js +4 -0
- package/components/ThemeToggle.vue.d.ts +2 -0
- package/components/ThemeToggle.vue.js +18 -0
- package/components/ThemeToggle.vue2.js +4 -0
- package/components/Timeline.vue.d.ts +39 -0
- package/components/Timeline.vue.js +174 -0
- package/components/Timeline.vue2.js +4 -0
- package/components/ToastNotification.vue.d.ts +7 -0
- package/components/ToastNotification.vue.js +7 -0
- package/components/ToastNotification.vue2.js +151 -0
- package/components/Tooltip.vue.d.ts +31 -0
- package/components/Tooltip.vue.js +45 -0
- package/components/Tooltip.vue2.js +4 -0
- package/components/Workbook/Sheet.vue.d.ts +38 -0
- package/components/Workbook/Sheet.vue.js +141 -0
- package/components/Workbook/Sheet.vue2.js +4 -0
- package/components/Workbook/Workbook.vue.d.ts +54 -0
- package/components/Workbook/Workbook.vue.js +7 -0
- package/components/Workbook/Workbook.vue2.js +146 -0
- package/components/Workbook/WorkbookAddButton.vue.d.ts +6 -0
- package/components/Workbook/WorkbookAddButton.vue.js +20 -0
- package/components/Workbook/WorkbookAddButton.vue2.js +4 -0
- package/components/Workbook/index.d.ts +3 -0
- package/components/Workbook/types.d.ts +34 -0
- package/composables/useKeyStroke.d.ts +21 -0
- package/composables/useKeyStroke.js +93 -0
- package/composables/useNotifications.d.ts +113 -0
- package/composables/useNotifications.js +99 -0
- package/composables/useTheme.d.ts +6 -0
- package/composables/useTheme.js +32 -0
- package/core/config.d.ts +29 -0
- package/core/config.js +12 -0
- package/core/index.d.ts +31 -0
- package/core/index.js +15 -0
- package/directives/vRipple.d.ts +4 -0
- package/directives/vRipple.js +17 -0
- package/index.d.ts +49 -0
- package/index.js +156 -0
- package/package.json +2 -2
- package/style.css +590 -0
- package/types/alert.type.d.ts +10 -0
- package/{src/types/avatar.type.ts → types/avatar.type.d.ts} +8 -9
- package/types/button.d.ts +15 -0
- package/types/buttongroup.type.d.ts +1 -0
- package/{src/types/config.type.ts → types/config.type.d.ts} +13 -16
- package/types/form.type.d.ts +45 -0
- package/types/index.d.ts +10 -0
- package/types/navbar.type.d.ts +27 -0
- package/types/sidepanel.type.d.ts +13 -0
- package/types/styles.d.ts +28 -0
- package/types/timeline.type.d.ts +9 -0
- package/{src/utils/functions.ts → utils/functions.d.ts} +1 -9
- package/utils/functions.js +11 -0
- package/utils/index.d.ts +2 -0
- package/utils/object.d.ts +6 -0
- package/utils/object.js +14 -0
- package/.vscode/extensions.json +0 -3
- package/LICENSE +0 -21
- package/index.html +0 -16
- package/scripts/bundle-css.js +0 -45
- package/src/App.vue +0 -7
- package/src/components/Accordion/Accordion.vue +0 -139
- package/src/components/Accordion/AccordionContent.vue +0 -63
- package/src/components/Accordion/AccordionItem.vue +0 -163
- package/src/components/Accordion/AccordionTrigger.vue +0 -125
- package/src/components/Accordion/index.ts +0 -5
- package/src/components/Accordion/types.ts +0 -41
- package/src/components/Alert.vue +0 -112
- package/src/components/Avatar.vue +0 -110
- package/src/components/AvatarUploader/AvatarUploader.vue +0 -129
- package/src/components/Badge.vue +0 -45
- package/src/components/Button.vue +0 -122
- package/src/components/ButtonGroup.vue +0 -173
- package/src/components/Carousel/Carousel.vue +0 -84
- package/src/components/Carousel/index.ts +0 -2
- package/src/components/Carousel/types.ts +0 -25
- package/src/components/CheckBox.vue +0 -132
- package/src/components/Chip/Chip.vue +0 -158
- package/src/components/Chip/index.ts +0 -2
- package/src/components/Chip/types.ts +0 -23
- package/src/components/ChoiceBox/ChoiceBox.vue +0 -181
- package/src/components/ChoiceBox/index.ts +0 -2
- package/src/components/ColorPicker/ColorIro.vue +0 -207
- package/src/components/ColorPicker/ColorPicker.vue +0 -61
- package/src/components/ConfirmationModal.vue +0 -46
- package/src/components/DataTable/DataTable.vue +0 -478
- package/src/components/DataTable/DataTableHeader.vue +0 -78
- package/src/components/DataTable/DataTableRow.vue +0 -171
- package/src/components/DataTable/DataTableToolbar.vue +0 -45
- package/src/components/DataTable/index.ts +0 -5
- package/src/components/DataTable/types.ts +0 -85
- package/src/components/DatePicker.vue +0 -102
- package/src/components/Dropdown/Dropdown.vue +0 -348
- package/src/components/Dropdown/DropdownBooleanItem.vue +0 -40
- package/src/components/Dropdown/DropdownGroupedLayout.vue +0 -115
- package/src/components/Dropdown/DropdownItem.vue +0 -56
- package/src/components/Dropdown/DropdownMenu.vue +0 -374
- package/src/components/Dropdown/DropdownTrigger.vue +0 -27
- package/src/components/Dropdown/composables/useDropdownIds.ts +0 -27
- package/src/components/Dropdown/composables/useDropdownNavigation.ts +0 -109
- package/src/components/Dropdown/composables/useDropdownSelection.ts +0 -106
- package/src/components/Dropdown/index.ts +0 -6
- package/src/components/FilePicker/FilePicker.vue +0 -459
- package/src/components/FilePicker/index.ts +0 -2
- package/src/components/FileTree/FileTree.vue +0 -334
- package/src/components/FileTree/FileTreeNode.vue +0 -225
- package/src/components/FileTree/index.ts +0 -2
- package/src/components/FileTree/types.ts +0 -31
- package/src/components/FileTree/useTreeSelection.ts +0 -66
- package/src/components/Form/CustomFields.vue +0 -294
- package/src/components/Form/Form.vue +0 -406
- package/src/components/Form/FormField.vue +0 -404
- package/src/components/Form/FormFields.vue +0 -161
- package/src/components/Form/composables/useFileUpload.ts +0 -112
- package/src/components/Form/composables/useForm.ts +0 -356
- package/src/components/Form/index.ts +0 -16
- package/src/components/Form/types.ts +0 -203
- package/src/components/Form/utils/form.utils.ts +0 -209
- package/src/components/Heatmap/Heatmap.vue +0 -629
- package/src/components/Heatmap/index.ts +0 -2
- package/src/components/Heatmap/types.ts +0 -84
- package/src/components/Icon.vue +0 -47
- package/src/components/IconPicker.vue +0 -138
- package/src/components/Input.vue +0 -366
- package/src/components/Label.vue +0 -25
- package/src/components/Logo.vue +0 -5
- package/src/components/Masonry/Masonry.vue +0 -148
- package/src/components/Masonry/index.ts +0 -2
- package/src/components/Masonry/types.ts +0 -44
- package/src/components/Modal.vue +0 -135
- package/src/components/MultiSelect/MultiSelect.vue +0 -176
- package/src/components/MultiSelect/index.ts +0 -1
- package/src/components/Navbar/Navbar.vue +0 -277
- package/src/components/Navbar/NavbarGroup.vue +0 -27
- package/src/components/Navbar/NavbarItem.vue +0 -124
- package/src/components/Navbar/index.ts +0 -3
- package/src/components/OTPInput/OTPInput.vue +0 -220
- package/src/components/OTPInput/index.ts +0 -1
- package/src/components/Pagination/Pagination.vue +0 -238
- package/src/components/Pagination/index.ts +0 -1
- package/src/components/PricingPlan/PricingPlan.vue +0 -102
- package/src/components/PricingPlan/PricingPlanItem.vue +0 -148
- package/src/components/PricingPlan/index.ts +0 -3
- package/src/components/PricingPlan/types.ts +0 -29
- package/src/components/SidePanel.vue +0 -184
- package/src/components/SidebarMenu/SidebarMenu.vue +0 -146
- package/src/components/SidebarMenu/SidebarMenuItem.vue +0 -333
- package/src/components/SidebarMenu/index.ts +0 -3
- package/src/components/SidebarMenu/types.ts +0 -54
- package/src/components/Slider.vue +0 -181
- package/src/components/Switch.vue +0 -51
- package/src/components/Tabes/Tabes.vue +0 -112
- package/src/components/Tabes/index.ts +0 -2
- package/src/components/Tabes/types.ts +0 -17
- package/src/components/Textarea.vue +0 -48
- package/src/components/ThemeToggle.vue +0 -14
- package/src/components/Timeline.vue +0 -250
- package/src/components/ToastNotification.vue +0 -257
- package/src/components/Tooltip.vue +0 -25
- package/src/components/Workbook/Sheet.vue +0 -185
- package/src/components/Workbook/Workbook.vue +0 -231
- package/src/components/Workbook/WorkbookAddButton.vue +0 -17
- package/src/components/Workbook/index.ts +0 -3
- package/src/components/Workbook/types.ts +0 -43
- package/src/composables/useKeyStroke.ts +0 -291
- package/src/composables/useNotifications.ts +0 -206
- package/src/composables/useTheme.ts +0 -55
- package/src/core/config.ts +0 -37
- package/src/core/index.ts +0 -49
- package/src/css/base.css +0 -148
- package/src/css/input.css +0 -61
- package/src/css/main.css +0 -6
- package/src/css/theme.css +0 -344
- package/src/directives/vRipple.ts +0 -38
- package/src/index.ts +0 -53
- package/src/main.ts +0 -5
- package/src/playground/Playground.vue +0 -429
- package/src/playground/composables/useGetUsers.ts +0 -538
- package/src/playground/demos/AccordionDemo.vue +0 -361
- package/src/playground/demos/AlertDemo.vue +0 -36
- package/src/playground/demos/AvatarDemo.vue +0 -41
- package/src/playground/demos/AvatarUploaderDemo.vue +0 -133
- package/src/playground/demos/BadgeDemo.vue +0 -31
- package/src/playground/demos/BadgesDemo.vue +0 -26
- package/src/playground/demos/ButtonDemo.vue +0 -99
- package/src/playground/demos/ButtonGroupDemo.vue +0 -39
- package/src/playground/demos/ButtonsDemo.vue +0 -111
- package/src/playground/demos/CarouselDemo.vue +0 -135
- package/src/playground/demos/CheckBoxDemo.vue +0 -43
- package/src/playground/demos/ChipDemo.vue +0 -190
- package/src/playground/demos/ChoiceBoxDemo.vue +0 -160
- package/src/playground/demos/ColorPickerDemo.vue +0 -30
- package/src/playground/demos/ColorsDemo.vue +0 -295
- package/src/playground/demos/DataTableDemo.vue +0 -215
- package/src/playground/demos/DatePickerDemo.vue +0 -43
- package/src/playground/demos/DisplayDemo.vue +0 -101
- package/src/playground/demos/DropdownDemo.vue +0 -651
- package/src/playground/demos/FilePickerDemo.vue +0 -175
- package/src/playground/demos/FileTreeDemo.vue +0 -150
- package/src/playground/demos/FormDemo.vue +0 -1144
- package/src/playground/demos/HeatmapDemo.vue +0 -467
- package/src/playground/demos/IconPickerDemo.vue +0 -27
- package/src/playground/demos/InputDemo.vue +0 -80
- package/src/playground/demos/InputsDemo.vue +0 -127
- package/src/playground/demos/LabelDemo.vue +0 -32
- package/src/playground/demos/MasonryDemo.vue +0 -241
- package/src/playground/demos/ModalDemo.vue +0 -67
- package/src/playground/demos/MultiSelectDemo.vue +0 -300
- package/src/playground/demos/NavbarDemo.vue +0 -59
- package/src/playground/demos/NavigationDemo.vue +0 -116
- package/src/playground/demos/OTPInputDemo.vue +0 -170
- package/src/playground/demos/OverlaysDemo.vue +0 -104
- package/src/playground/demos/PaginationDemo.vue +0 -130
- package/src/playground/demos/PricingPlanDemo.vue +0 -110
- package/src/playground/demos/SidePanelDemo.vue +0 -45
- package/src/playground/demos/SidebarMenuDemo.vue +0 -170
- package/src/playground/demos/SliderDemo.vue +0 -48
- package/src/playground/demos/SwitchDemo.vue +0 -40
- package/src/playground/demos/TabesDemo.vue +0 -178
- package/src/playground/demos/TextareaDemo.vue +0 -31
- package/src/playground/demos/ThemeToggleDemo.vue +0 -20
- package/src/playground/demos/TimelineDemo.vue +0 -43
- package/src/playground/demos/ToastDemo.vue +0 -111
- package/src/playground/demos/TooltipDemo.vue +0 -30
- package/src/playground/demos/WorkbookDemo.vue +0 -227
- package/src/types/alert.type.ts +0 -11
- package/src/types/button.ts +0 -36
- package/src/types/buttongroup.type.ts +0 -1
- package/src/types/form.type.ts +0 -75
- package/src/types/index.ts +0 -11
- package/src/types/navbar.type.ts +0 -28
- package/src/types/sidepanel.type.ts +0 -14
- package/src/types/styles.ts +0 -42
- package/src/types/timeline.type.ts +0 -11
- package/src/utils/index.ts +0 -2
- package/src/utils/object.ts +0 -40
- package/tsconfig.app.json +0 -27
- package/tsconfig.json +0 -48
- package/tsconfig.node.json +0 -18
- package/tsconfig.node.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/vercel.json +0 -8
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -63
- package/vite.config.ts +0 -64
- package/vite.config.vercel.ts +0 -17
|
@@ -1,1144 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, computed, markRaw } from 'vue'
|
|
3
|
-
import { Form, type IForm, type IFormSubmitPayload } from '@/components/Form'
|
|
4
|
-
import Button from '@/components/Button.vue'
|
|
5
|
-
import Badge from '@/components/Badge.vue'
|
|
6
|
-
import Icon from '@/components/Icon.vue'
|
|
7
|
-
|
|
8
|
-
// ==========================================
|
|
9
|
-
// DEMO TAB SECTIONS
|
|
10
|
-
// ==========================================
|
|
11
|
-
|
|
12
|
-
const activeTab = ref('basic')
|
|
13
|
-
|
|
14
|
-
const tabs = [
|
|
15
|
-
{ id: 'basic', label: 'Basic Forms', icon: 'lucide:layout-list' },
|
|
16
|
-
{ id: 'validation', label: 'Validation', icon: 'lucide:shield-check' },
|
|
17
|
-
{ id: 'advanced', label: 'Advanced', icon: 'lucide:sparkles' },
|
|
18
|
-
{ id: 'grouped', label: 'Grouped Forms', icon: 'lucide:layout-grid' },
|
|
19
|
-
{ id: 'multistep', label: 'Multi-Step', icon: 'tdesign:component-steps' },
|
|
20
|
-
{ id: 'custom', label: 'Custom Fields', icon: 'lucide:layers' },
|
|
21
|
-
{ id: 'uploads', label: 'Uploads', icon: 'lucide:upload-cloud' },
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
// Store submitted values for display
|
|
25
|
-
const submittedValues = ref<{
|
|
26
|
-
tab: string
|
|
27
|
-
values: any
|
|
28
|
-
timestamp: Date
|
|
29
|
-
} | null>(null)
|
|
30
|
-
|
|
31
|
-
const handleSubmit = (tab: string, payload: IFormSubmitPayload) => {
|
|
32
|
-
submittedValues.value = {
|
|
33
|
-
tab,
|
|
34
|
-
values: payload.values,
|
|
35
|
-
timestamp: new Date(),
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const clearSubmitted = () => {
|
|
40
|
-
submittedValues.value = null
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// ==========================================
|
|
44
|
-
// 1. BASIC FORMS
|
|
45
|
-
// ==========================================
|
|
46
|
-
|
|
47
|
-
// Login Form Schema
|
|
48
|
-
const loginSchema: IForm[] = [
|
|
49
|
-
{
|
|
50
|
-
name: 'email',
|
|
51
|
-
label: 'Email Address',
|
|
52
|
-
type: 'email',
|
|
53
|
-
placeholder: 'john@example.com',
|
|
54
|
-
icon: 'lucide:mail',
|
|
55
|
-
required: true,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'password',
|
|
59
|
-
label: 'Password',
|
|
60
|
-
type: 'password',
|
|
61
|
-
placeholder: '••••••••',
|
|
62
|
-
icon: 'lucide:lock',
|
|
63
|
-
required: true,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'rememberMe',
|
|
67
|
-
label: 'Remember me',
|
|
68
|
-
type: 'switch',
|
|
69
|
-
value: false,
|
|
70
|
-
},
|
|
71
|
-
]
|
|
72
|
-
|
|
73
|
-
// Contact Form Schema
|
|
74
|
-
const contactSchema: IForm[] = [
|
|
75
|
-
{
|
|
76
|
-
name: 'image',
|
|
77
|
-
label: 'Avatar',
|
|
78
|
-
type: 'avatarUpload',
|
|
79
|
-
placeholder: 'John Doe',
|
|
80
|
-
required: true,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'name',
|
|
84
|
-
label: 'Full Name',
|
|
85
|
-
type: 'text',
|
|
86
|
-
placeholder: 'John Doe',
|
|
87
|
-
required: true,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: 'email',
|
|
91
|
-
label: 'Email',
|
|
92
|
-
type: 'email',
|
|
93
|
-
placeholder: 'john@example.com',
|
|
94
|
-
required: true,
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: 'subject',
|
|
98
|
-
label: 'Subject',
|
|
99
|
-
type: 'select',
|
|
100
|
-
placeholder: 'Select a subject',
|
|
101
|
-
options: [
|
|
102
|
-
{ label: 'General Inquiry', value: 'general' },
|
|
103
|
-
{ label: 'Support', value: 'support' },
|
|
104
|
-
{ label: 'Sales', value: 'sales' },
|
|
105
|
-
{ label: 'Partnership', value: 'partnership' },
|
|
106
|
-
],
|
|
107
|
-
required: true,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'message',
|
|
111
|
-
label: 'Message',
|
|
112
|
-
type: 'textarea',
|
|
113
|
-
placeholder: 'Your message...',
|
|
114
|
-
props: { rows: 4 },
|
|
115
|
-
itemClass: 'col-span-2',
|
|
116
|
-
required: true,
|
|
117
|
-
},
|
|
118
|
-
]
|
|
119
|
-
|
|
120
|
-
// ==========================================
|
|
121
|
-
// 2. VALIDATION FORMS
|
|
122
|
-
// ==========================================
|
|
123
|
-
|
|
124
|
-
const validationSchema: IForm[] = [
|
|
125
|
-
{
|
|
126
|
-
name: 'username',
|
|
127
|
-
label: 'Username',
|
|
128
|
-
type: 'text',
|
|
129
|
-
placeholder: 'Enter username',
|
|
130
|
-
required: true,
|
|
131
|
-
validation: ({ value }) => {
|
|
132
|
-
if (!value) return ''
|
|
133
|
-
if (value.length < 3)
|
|
134
|
-
return 'Username must be at least 3 characters'
|
|
135
|
-
if (value.length > 20)
|
|
136
|
-
return 'Username must be at most 20 characters'
|
|
137
|
-
if (!/^[a-zA-Z0-9_]+$/.test(value))
|
|
138
|
-
return 'Only letters, numbers and underscores allowed'
|
|
139
|
-
return ''
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'email',
|
|
144
|
-
label: 'Email',
|
|
145
|
-
type: 'email',
|
|
146
|
-
placeholder: 'email@example.com',
|
|
147
|
-
required: true,
|
|
148
|
-
validation: ({ value }) => {
|
|
149
|
-
if (!value) return ''
|
|
150
|
-
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value))
|
|
151
|
-
return 'Please enter a valid email'
|
|
152
|
-
return ''
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: 'password',
|
|
157
|
-
label: 'Password',
|
|
158
|
-
type: 'password',
|
|
159
|
-
placeholder: '••••••••',
|
|
160
|
-
required: true,
|
|
161
|
-
validation: ({ value }) => {
|
|
162
|
-
if (!value) return ''
|
|
163
|
-
if (value.length < 8)
|
|
164
|
-
return 'Password must be at least 8 characters'
|
|
165
|
-
if (!/[A-Z]/.test(value))
|
|
166
|
-
return 'Password must contain an uppercase letter'
|
|
167
|
-
if (!/[0-9]/.test(value)) return 'Password must contain a number'
|
|
168
|
-
return ''
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: 'confirmPassword',
|
|
173
|
-
label: 'Confirm Password',
|
|
174
|
-
type: 'password',
|
|
175
|
-
placeholder: '••••••••',
|
|
176
|
-
required: true,
|
|
177
|
-
validation: ({ value, values }) => {
|
|
178
|
-
if (!value) return ''
|
|
179
|
-
if (value !== values.password) return 'Passwords do not match'
|
|
180
|
-
return ''
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: 'age',
|
|
185
|
-
label: 'Age',
|
|
186
|
-
type: 'number',
|
|
187
|
-
placeholder: '18',
|
|
188
|
-
min: 0,
|
|
189
|
-
max: 120,
|
|
190
|
-
validation: ({ value }) => {
|
|
191
|
-
if (value !== undefined && value !== null && value !== '') {
|
|
192
|
-
if (Number(value) < 18)
|
|
193
|
-
return 'You must be at least 18 years old'
|
|
194
|
-
}
|
|
195
|
-
return ''
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
name: 'website',
|
|
200
|
-
label: 'Website (Optional)',
|
|
201
|
-
type: 'url',
|
|
202
|
-
placeholder: 'https://example.com',
|
|
203
|
-
validation: ({ value }) => {
|
|
204
|
-
if (!value) return ''
|
|
205
|
-
try {
|
|
206
|
-
new URL(value)
|
|
207
|
-
return ''
|
|
208
|
-
} catch {
|
|
209
|
-
return 'Please enter a valid URL'
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'acceptTerms',
|
|
215
|
-
label: 'I accept the terms and conditions',
|
|
216
|
-
type: 'check',
|
|
217
|
-
required: true,
|
|
218
|
-
itemClass: 'col-span-2',
|
|
219
|
-
},
|
|
220
|
-
]
|
|
221
|
-
|
|
222
|
-
// ==========================================
|
|
223
|
-
// 3. ADVANCED FORMS (Conditional, updateValues)
|
|
224
|
-
// ==========================================
|
|
225
|
-
|
|
226
|
-
const advancedSchema: IForm[] = [
|
|
227
|
-
{
|
|
228
|
-
name: 'paymentMethod',
|
|
229
|
-
label: 'Payment Method',
|
|
230
|
-
type: 'select',
|
|
231
|
-
options: [
|
|
232
|
-
{ label: 'Credit Card', value: 'credit' },
|
|
233
|
-
{ label: 'PayPal', value: 'paypal' },
|
|
234
|
-
{ label: 'Bank Transfer', value: 'bank' },
|
|
235
|
-
],
|
|
236
|
-
required: true,
|
|
237
|
-
},
|
|
238
|
-
// Credit card fields - only shown when credit card selected
|
|
239
|
-
{
|
|
240
|
-
name: 'cardNumber',
|
|
241
|
-
label: 'Card Number',
|
|
242
|
-
type: 'text',
|
|
243
|
-
placeholder: '4242 4242 4242 4242',
|
|
244
|
-
when: ({ values }) => values.paymentMethod === 'credit',
|
|
245
|
-
required: true,
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: 'cardExpiry',
|
|
249
|
-
label: 'Expiry Date',
|
|
250
|
-
type: 'text',
|
|
251
|
-
placeholder: 'MM/YY',
|
|
252
|
-
when: ({ values }) => values.paymentMethod === 'credit',
|
|
253
|
-
required: true,
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
name: 'cardCvc',
|
|
257
|
-
label: 'CVC',
|
|
258
|
-
type: 'text',
|
|
259
|
-
placeholder: '123',
|
|
260
|
-
when: ({ values }) => values.paymentMethod === 'credit',
|
|
261
|
-
required: true,
|
|
262
|
-
},
|
|
263
|
-
// PayPal field - only shown when PayPal selected
|
|
264
|
-
{
|
|
265
|
-
name: 'paypalEmail',
|
|
266
|
-
label: 'PayPal Email',
|
|
267
|
-
type: 'email',
|
|
268
|
-
placeholder: 'paypal@example.com',
|
|
269
|
-
when: ({ values }) => values.paymentMethod === 'paypal',
|
|
270
|
-
required: true,
|
|
271
|
-
itemClass: 'col-span-2',
|
|
272
|
-
},
|
|
273
|
-
// Bank fields - only shown when bank selected
|
|
274
|
-
{
|
|
275
|
-
name: 'bankName',
|
|
276
|
-
label: 'Bank Name',
|
|
277
|
-
type: 'text',
|
|
278
|
-
placeholder: 'Enter bank name',
|
|
279
|
-
when: ({ values }) => values.paymentMethod === 'bank',
|
|
280
|
-
required: true,
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
name: 'accountNumber',
|
|
284
|
-
label: 'Account Number',
|
|
285
|
-
type: 'text',
|
|
286
|
-
placeholder: 'Enter account number',
|
|
287
|
-
when: ({ values }) => values.paymentMethod === 'bank',
|
|
288
|
-
required: true,
|
|
289
|
-
},
|
|
290
|
-
// Pricing with updateValues
|
|
291
|
-
{
|
|
292
|
-
name: 'quantity',
|
|
293
|
-
label: 'Quantity',
|
|
294
|
-
type: 'number',
|
|
295
|
-
value: 1,
|
|
296
|
-
min: 1,
|
|
297
|
-
max: 100,
|
|
298
|
-
updateValues: ({ values }) => {
|
|
299
|
-
const price = 29.99
|
|
300
|
-
return {
|
|
301
|
-
subtotal: (values.quantity || 0) * price,
|
|
302
|
-
total: (values.quantity || 0) * price * 1.1, // 10% tax
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
name: 'subtotal',
|
|
308
|
-
label: 'Subtotal',
|
|
309
|
-
type: 'text',
|
|
310
|
-
addonLeft: '$',
|
|
311
|
-
disabled: true,
|
|
312
|
-
value: 29.99,
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
name: 'total',
|
|
316
|
-
label: 'Total (incl. 10% tax)',
|
|
317
|
-
type: 'text',
|
|
318
|
-
addonLeft: '$',
|
|
319
|
-
disabled: true,
|
|
320
|
-
value: 32.99,
|
|
321
|
-
itemClass: 'col-span-2',
|
|
322
|
-
},
|
|
323
|
-
]
|
|
324
|
-
|
|
325
|
-
// ==========================================
|
|
326
|
-
// 4. GROUPED FORMS
|
|
327
|
-
// ==========================================
|
|
328
|
-
|
|
329
|
-
const personalInfoSchema: IForm[] = [
|
|
330
|
-
{
|
|
331
|
-
name: 'firstName',
|
|
332
|
-
label: 'First Name',
|
|
333
|
-
type: 'text',
|
|
334
|
-
placeholder: 'John',
|
|
335
|
-
required: true,
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
name: 'lastName',
|
|
339
|
-
label: 'Last Name',
|
|
340
|
-
type: 'text',
|
|
341
|
-
placeholder: 'Doe',
|
|
342
|
-
required: true,
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
name: 'email',
|
|
346
|
-
label: 'Email',
|
|
347
|
-
type: 'email',
|
|
348
|
-
placeholder: 'john@example.com',
|
|
349
|
-
required: true,
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: 'phone',
|
|
353
|
-
label: 'Phone',
|
|
354
|
-
type: 'tel',
|
|
355
|
-
placeholder: '+1 (555) 000-0000',
|
|
356
|
-
},
|
|
357
|
-
]
|
|
358
|
-
|
|
359
|
-
const addressSchema: IForm[] = [
|
|
360
|
-
{
|
|
361
|
-
name: 'street',
|
|
362
|
-
label: 'Street Address',
|
|
363
|
-
type: 'text',
|
|
364
|
-
placeholder: '123 Main St',
|
|
365
|
-
itemClass: 'col-span-2',
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
name: 'city',
|
|
369
|
-
label: 'City',
|
|
370
|
-
type: 'text',
|
|
371
|
-
placeholder: 'New York',
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
name: 'state',
|
|
375
|
-
label: 'State',
|
|
376
|
-
type: 'select',
|
|
377
|
-
options: [
|
|
378
|
-
{ label: 'California', value: 'CA' },
|
|
379
|
-
{ label: 'New York', value: 'NY' },
|
|
380
|
-
{ label: 'Texas', value: 'TX' },
|
|
381
|
-
{ label: 'Florida', value: 'FL' },
|
|
382
|
-
],
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
name: 'zipCode',
|
|
386
|
-
label: 'ZIP Code',
|
|
387
|
-
type: 'text',
|
|
388
|
-
placeholder: '10001',
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
name: 'country',
|
|
392
|
-
label: 'Country',
|
|
393
|
-
type: 'select',
|
|
394
|
-
options: [
|
|
395
|
-
{ label: 'United States', value: 'US' },
|
|
396
|
-
{ label: 'Canada', value: 'CA' },
|
|
397
|
-
{ label: 'United Kingdom', value: 'UK' },
|
|
398
|
-
],
|
|
399
|
-
},
|
|
400
|
-
]
|
|
401
|
-
|
|
402
|
-
const preferencesSchema: IForm[] = [
|
|
403
|
-
{
|
|
404
|
-
name: 'notifications',
|
|
405
|
-
label: 'Email Notifications',
|
|
406
|
-
type: 'switch',
|
|
407
|
-
value: true,
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
name: 'newsletter',
|
|
411
|
-
label: 'Subscribe to Newsletter',
|
|
412
|
-
type: 'switch',
|
|
413
|
-
value: false,
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
name: 'theme',
|
|
417
|
-
label: 'Theme',
|
|
418
|
-
type: 'select',
|
|
419
|
-
options: [
|
|
420
|
-
{ label: 'Light', value: 'light' },
|
|
421
|
-
{ label: 'Dark', value: 'dark' },
|
|
422
|
-
{ label: 'System', value: 'system' },
|
|
423
|
-
],
|
|
424
|
-
value: 'system',
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
name: 'language',
|
|
428
|
-
label: 'Language',
|
|
429
|
-
type: 'select',
|
|
430
|
-
options: [
|
|
431
|
-
{ label: 'English', value: 'en' },
|
|
432
|
-
{ label: 'Spanish', value: 'es' },
|
|
433
|
-
{ label: 'French', value: 'fr' },
|
|
434
|
-
],
|
|
435
|
-
value: 'en',
|
|
436
|
-
},
|
|
437
|
-
]
|
|
438
|
-
|
|
439
|
-
// ==========================================
|
|
440
|
-
// 5. MULTI-STEP FORM
|
|
441
|
-
// ==========================================
|
|
442
|
-
|
|
443
|
-
const multiStepTabs = [
|
|
444
|
-
{
|
|
445
|
-
id: 1,
|
|
446
|
-
title: 'Account',
|
|
447
|
-
icon: 'lucide:user',
|
|
448
|
-
description: 'Create your account',
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
id: 2,
|
|
452
|
-
title: 'Profile',
|
|
453
|
-
icon: 'lucide:user-circle',
|
|
454
|
-
description: 'Set up your profile',
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
id: 3,
|
|
458
|
-
title: 'Complete',
|
|
459
|
-
icon: 'lucide:check-circle',
|
|
460
|
-
description: 'Review and finish',
|
|
461
|
-
},
|
|
462
|
-
]
|
|
463
|
-
|
|
464
|
-
const accountSchema: IForm[] = [
|
|
465
|
-
{
|
|
466
|
-
name: 'email',
|
|
467
|
-
label: 'Email Address',
|
|
468
|
-
type: 'email',
|
|
469
|
-
placeholder: 'you@example.com',
|
|
470
|
-
required: true,
|
|
471
|
-
itemClass: 'col-span-2',
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
name: 'password',
|
|
475
|
-
label: 'Password',
|
|
476
|
-
type: 'password',
|
|
477
|
-
placeholder: '••••••••',
|
|
478
|
-
required: true,
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
name: 'confirmPassword',
|
|
482
|
-
label: 'Confirm Password',
|
|
483
|
-
type: 'password',
|
|
484
|
-
placeholder: '••••••••',
|
|
485
|
-
required: true,
|
|
486
|
-
validation: ({ value, values }) => {
|
|
487
|
-
if (value !== values.password) return 'Passwords do not match'
|
|
488
|
-
return ''
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
]
|
|
492
|
-
|
|
493
|
-
const profileSchema: IForm[] = [
|
|
494
|
-
{
|
|
495
|
-
name: 'displayName',
|
|
496
|
-
label: 'Display Name',
|
|
497
|
-
type: 'text',
|
|
498
|
-
placeholder: 'John Doe',
|
|
499
|
-
required: true,
|
|
500
|
-
itemClass: 'col-span-2',
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
name: 'bio',
|
|
504
|
-
label: 'Bio',
|
|
505
|
-
type: 'textarea',
|
|
506
|
-
placeholder: 'Tell us about yourself...',
|
|
507
|
-
props: { rows: 3 },
|
|
508
|
-
itemClass: 'col-span-2',
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
name: 'birthDate',
|
|
512
|
-
label: 'Birth Date',
|
|
513
|
-
type: 'date',
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
name: 'gender',
|
|
517
|
-
label: 'Gender',
|
|
518
|
-
type: 'select',
|
|
519
|
-
options: [
|
|
520
|
-
{ label: 'Male', value: 'male' },
|
|
521
|
-
{ label: 'Female', value: 'female' },
|
|
522
|
-
{ label: 'Other', value: 'other' },
|
|
523
|
-
{ label: 'Prefer not to say', value: 'none' },
|
|
524
|
-
],
|
|
525
|
-
},
|
|
526
|
-
]
|
|
527
|
-
|
|
528
|
-
const reviewSchema: IForm[] = [
|
|
529
|
-
{
|
|
530
|
-
name: 'acceptTerms',
|
|
531
|
-
label: 'I accept the Terms of Service',
|
|
532
|
-
type: 'check',
|
|
533
|
-
required: true,
|
|
534
|
-
itemClass: 'col-span-2',
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
name: 'acceptPrivacy',
|
|
538
|
-
label: 'I accept the Privacy Policy',
|
|
539
|
-
type: 'check',
|
|
540
|
-
required: true,
|
|
541
|
-
itemClass: 'col-span-2',
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
name: 'marketing',
|
|
545
|
-
label: 'Send me product updates and offers',
|
|
546
|
-
type: 'switch',
|
|
547
|
-
value: false,
|
|
548
|
-
itemClass: 'col-span-2',
|
|
549
|
-
},
|
|
550
|
-
]
|
|
551
|
-
|
|
552
|
-
// ==========================================
|
|
553
|
-
// 6. CUSTOM FIELDS
|
|
554
|
-
// ==========================================
|
|
555
|
-
|
|
556
|
-
const customFieldsSchema: IForm[] = [
|
|
557
|
-
{
|
|
558
|
-
name: 'projectName',
|
|
559
|
-
label: 'Project Name',
|
|
560
|
-
type: 'text',
|
|
561
|
-
placeholder: 'My Awesome Project',
|
|
562
|
-
required: true,
|
|
563
|
-
itemClass: 'col-span-2',
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
name: 'description',
|
|
567
|
-
label: 'Description',
|
|
568
|
-
type: 'textarea',
|
|
569
|
-
placeholder: 'Describe your project...',
|
|
570
|
-
props: { rows: 2 },
|
|
571
|
-
itemClass: 'col-span-2',
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
name: 'socialLinks',
|
|
575
|
-
label: 'Social Media Links',
|
|
576
|
-
type: 'customFields',
|
|
577
|
-
itemClass: 'col-span-2',
|
|
578
|
-
props: {
|
|
579
|
-
schema: [
|
|
580
|
-
{
|
|
581
|
-
name: 'platform',
|
|
582
|
-
label: 'Platform',
|
|
583
|
-
type: 'select',
|
|
584
|
-
options: [
|
|
585
|
-
{ label: 'Twitter', value: 'twitter' },
|
|
586
|
-
{ label: 'LinkedIn', value: 'linkedin' },
|
|
587
|
-
{ label: 'GitHub', value: 'github' },
|
|
588
|
-
{ label: 'Website', value: 'website' },
|
|
589
|
-
],
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
name: 'url',
|
|
593
|
-
label: 'URL',
|
|
594
|
-
type: 'url',
|
|
595
|
-
placeholder: 'https://',
|
|
596
|
-
},
|
|
597
|
-
],
|
|
598
|
-
headers: ['Platform', 'URL'],
|
|
599
|
-
},
|
|
600
|
-
value: [],
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
name: 'teamMembers',
|
|
604
|
-
label: 'Team Members',
|
|
605
|
-
type: 'customFields',
|
|
606
|
-
itemClass: 'col-span-2',
|
|
607
|
-
props: {
|
|
608
|
-
schema: [
|
|
609
|
-
{
|
|
610
|
-
name: 'name',
|
|
611
|
-
label: 'Name',
|
|
612
|
-
type: 'text',
|
|
613
|
-
placeholder: 'John Doe',
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
name: 'role',
|
|
617
|
-
label: 'Role',
|
|
618
|
-
type: 'select',
|
|
619
|
-
options: [
|
|
620
|
-
{ label: 'Developer', value: 'developer' },
|
|
621
|
-
{ label: 'Designer', value: 'designer' },
|
|
622
|
-
{ label: 'Manager', value: 'manager' },
|
|
623
|
-
{ label: 'QA', value: 'qa' },
|
|
624
|
-
],
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
name: 'email',
|
|
628
|
-
label: 'Email',
|
|
629
|
-
type: 'email',
|
|
630
|
-
placeholder: 'email@example.com',
|
|
631
|
-
},
|
|
632
|
-
],
|
|
633
|
-
headers: ['Name', 'Role', 'Email'],
|
|
634
|
-
},
|
|
635
|
-
value: [],
|
|
636
|
-
},
|
|
637
|
-
]
|
|
638
|
-
// ==========================================
|
|
639
|
-
// 7. UPLOAD FORMS
|
|
640
|
-
// ==========================================
|
|
641
|
-
|
|
642
|
-
const uploadSchema: IForm[] = [
|
|
643
|
-
{
|
|
644
|
-
name: 'avatar',
|
|
645
|
-
label: 'Avatar Upload',
|
|
646
|
-
type: 'avatarUpload',
|
|
647
|
-
placeholder: 'John Doe',
|
|
648
|
-
required: true,
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
name: 'idProof',
|
|
652
|
-
label: 'ID Proof (Input Style)',
|
|
653
|
-
type: 'file',
|
|
654
|
-
required: true,
|
|
655
|
-
placeholder: 'Select ID document',
|
|
656
|
-
props: {
|
|
657
|
-
accept: 'image/*,.pdf',
|
|
658
|
-
},
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
name: 'resume',
|
|
662
|
-
label: 'Resume (Dropzone)',
|
|
663
|
-
type: 'fileUploader',
|
|
664
|
-
required: true,
|
|
665
|
-
props: {
|
|
666
|
-
accept: '.pdf,.doc,.docx',
|
|
667
|
-
},
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
name: 'gallery',
|
|
671
|
-
label: 'Project Gallery (Multiple Files)',
|
|
672
|
-
type: 'fileUploader',
|
|
673
|
-
props: {
|
|
674
|
-
multiple: true,
|
|
675
|
-
accept: 'image/*',
|
|
676
|
-
},
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
name: 'documents',
|
|
680
|
-
label: 'Document Collection (Custom Fields with File)',
|
|
681
|
-
type: 'customFields',
|
|
682
|
-
props: {
|
|
683
|
-
schema: [
|
|
684
|
-
{
|
|
685
|
-
name: 'title',
|
|
686
|
-
label: 'Document Title',
|
|
687
|
-
type: 'text',
|
|
688
|
-
placeholder: 'e.g. Identity Proof',
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
name: 'file',
|
|
692
|
-
label: 'File Attachment',
|
|
693
|
-
type: 'file',
|
|
694
|
-
props: {
|
|
695
|
-
accept: '.pdf,.jpg,.png',
|
|
696
|
-
},
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
name: 'category',
|
|
700
|
-
label: 'Category',
|
|
701
|
-
type: 'select',
|
|
702
|
-
options: [
|
|
703
|
-
{ label: 'Personal', value: 'personal' },
|
|
704
|
-
{ label: 'Business', value: 'business' },
|
|
705
|
-
{ label: 'Legal', value: 'legal' },
|
|
706
|
-
],
|
|
707
|
-
},
|
|
708
|
-
],
|
|
709
|
-
headers: ['Title', 'File', 'Category'],
|
|
710
|
-
},
|
|
711
|
-
value: [],
|
|
712
|
-
},
|
|
713
|
-
]
|
|
714
|
-
</script>
|
|
715
|
-
|
|
716
|
-
<template>
|
|
717
|
-
<div class="space-y-8">
|
|
718
|
-
<div>
|
|
719
|
-
<h2 class="text-2xl font-bold text-gray-900 mb-2">
|
|
720
|
-
Form Component
|
|
721
|
-
</h2>
|
|
722
|
-
<p class="text-gray-600">
|
|
723
|
-
A powerful schema-driven form system with validation,
|
|
724
|
-
conditional fields, grouped layouts, and multi-step wizards.
|
|
725
|
-
</p>
|
|
726
|
-
</div>
|
|
727
|
-
|
|
728
|
-
<!-- Tab Navigation -->
|
|
729
|
-
<div class="border-b border-border">
|
|
730
|
-
<div class="flex flex-wrap gap-1">
|
|
731
|
-
<button
|
|
732
|
-
v-for="tab in tabs"
|
|
733
|
-
:key="tab.id"
|
|
734
|
-
@click="activeTab = tab.id"
|
|
735
|
-
class="flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-t-lg transition-colors"
|
|
736
|
-
:class="
|
|
737
|
-
activeTab === tab.id
|
|
738
|
-
? 'bg-white border-t border-x border-border -mb-px text-primary'
|
|
739
|
-
: 'text-gray-600 hover:text-gray-900 hover:bg-gray-100'
|
|
740
|
-
">
|
|
741
|
-
<Icon
|
|
742
|
-
:icon="tab.icon"
|
|
743
|
-
class="w-4 h-4" />
|
|
744
|
-
{{ tab.label }}
|
|
745
|
-
</button>
|
|
746
|
-
</div>
|
|
747
|
-
</div>
|
|
748
|
-
|
|
749
|
-
<!-- Tab Content -->
|
|
750
|
-
<div class="bg-white rounded-lg border border-border p-6">
|
|
751
|
-
<!-- Basic Forms Tab -->
|
|
752
|
-
<template v-if="activeTab === 'basic'">
|
|
753
|
-
<div class="space-y-8">
|
|
754
|
-
<div>
|
|
755
|
-
<h3 class="text-lg font-semibold mb-1">Login Form</h3>
|
|
756
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
757
|
-
Simple login form with email, password, and remember
|
|
758
|
-
me.
|
|
759
|
-
</p>
|
|
760
|
-
<div class="flex flex-col lg:flex-row gap-6">
|
|
761
|
-
<div class="flex-1 max-w-md">
|
|
762
|
-
<Form
|
|
763
|
-
:schema="loginSchema"
|
|
764
|
-
submitText="Sign In"
|
|
765
|
-
@onSubmit="
|
|
766
|
-
(payload) =>
|
|
767
|
-
handleSubmit('Login Form', payload)
|
|
768
|
-
" />
|
|
769
|
-
</div>
|
|
770
|
-
<!-- Inline Submitted Values -->
|
|
771
|
-
<div
|
|
772
|
-
v-if="
|
|
773
|
-
submittedValues &&
|
|
774
|
-
submittedValues.tab === 'Login Form'
|
|
775
|
-
"
|
|
776
|
-
class="flex-1 max-w-md">
|
|
777
|
-
<div
|
|
778
|
-
class="bg-green-50 border border-green-200 rounded-lg p-4 h-full">
|
|
779
|
-
<div class="flex items-center gap-2 mb-3">
|
|
780
|
-
<Icon
|
|
781
|
-
icon="lucide:check-circle"
|
|
782
|
-
class="w-5 h-5 text-green-600" />
|
|
783
|
-
<h4
|
|
784
|
-
class="font-semibold text-green-800">
|
|
785
|
-
Submitted Values
|
|
786
|
-
</h4>
|
|
787
|
-
</div>
|
|
788
|
-
<div
|
|
789
|
-
class="bg-white rounded border border-green-200 p-3 overflow-auto max-h-60">
|
|
790
|
-
<pre
|
|
791
|
-
class="text-xs text-gray-700 whitespace-pre-wrap"
|
|
792
|
-
>{{
|
|
793
|
-
JSON.stringify(
|
|
794
|
-
submittedValues.values,
|
|
795
|
-
null,
|
|
796
|
-
2,
|
|
797
|
-
)
|
|
798
|
-
}}</pre
|
|
799
|
-
>
|
|
800
|
-
</div>
|
|
801
|
-
</div>
|
|
802
|
-
</div>
|
|
803
|
-
</div>
|
|
804
|
-
</div>
|
|
805
|
-
|
|
806
|
-
<hr class="border-border" />
|
|
807
|
-
|
|
808
|
-
<div>
|
|
809
|
-
<h3 class="text-lg font-semibold mb-1">Contact Form</h3>
|
|
810
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
811
|
-
Contact form with dropdown, textarea, and grid
|
|
812
|
-
layout.
|
|
813
|
-
</p>
|
|
814
|
-
<div class="flex flex-col lg:flex-row gap-6">
|
|
815
|
-
<div class="flex-1 max-w-2xl">
|
|
816
|
-
<Form
|
|
817
|
-
:schema="contactSchema"
|
|
818
|
-
class-name="grid-cols-2"
|
|
819
|
-
submitText="Send Message"
|
|
820
|
-
@onSubmit="
|
|
821
|
-
(payload) =>
|
|
822
|
-
handleSubmit(
|
|
823
|
-
'Contact Form',
|
|
824
|
-
payload,
|
|
825
|
-
)
|
|
826
|
-
" />
|
|
827
|
-
</div>
|
|
828
|
-
<!-- Inline Submitted Values -->
|
|
829
|
-
<div
|
|
830
|
-
v-if="
|
|
831
|
-
submittedValues &&
|
|
832
|
-
submittedValues.tab === 'Contact Form'
|
|
833
|
-
"
|
|
834
|
-
class="flex-1 max-w-md">
|
|
835
|
-
<div
|
|
836
|
-
class="bg-green-50 border border-green-200 rounded-lg p-4 h-full">
|
|
837
|
-
<div class="flex items-center gap-2 mb-3">
|
|
838
|
-
<Icon
|
|
839
|
-
icon="lucide:check-circle"
|
|
840
|
-
class="w-5 h-5 text-green-600" />
|
|
841
|
-
<h4
|
|
842
|
-
class="font-semibold text-green-800">
|
|
843
|
-
Submitted Values
|
|
844
|
-
</h4>
|
|
845
|
-
</div>
|
|
846
|
-
<div
|
|
847
|
-
class="bg-white rounded border border-green-200 p-3 overflow-auto max-h-60">
|
|
848
|
-
<pre
|
|
849
|
-
class="text-xs text-gray-700 whitespace-pre-wrap"
|
|
850
|
-
>{{
|
|
851
|
-
JSON.stringify(
|
|
852
|
-
submittedValues.values,
|
|
853
|
-
null,
|
|
854
|
-
2,
|
|
855
|
-
)
|
|
856
|
-
}}</pre
|
|
857
|
-
>
|
|
858
|
-
</div>
|
|
859
|
-
</div>
|
|
860
|
-
</div>
|
|
861
|
-
</div>
|
|
862
|
-
</div>
|
|
863
|
-
</div>
|
|
864
|
-
</template>
|
|
865
|
-
|
|
866
|
-
<!-- Validation Tab -->
|
|
867
|
-
<template v-else-if="activeTab === 'validation'">
|
|
868
|
-
<div>
|
|
869
|
-
<h3 class="text-lg font-semibold mb-1">
|
|
870
|
-
Registration with Validation
|
|
871
|
-
</h3>
|
|
872
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
873
|
-
Comprehensive validation including regex patterns,
|
|
874
|
-
password matching, age checks, and URL validation.
|
|
875
|
-
</p>
|
|
876
|
-
<div class="flex flex-col lg:flex-row gap-6">
|
|
877
|
-
<div class="flex-1 max-w-2xl">
|
|
878
|
-
<Form
|
|
879
|
-
:schema="validationSchema"
|
|
880
|
-
submitText="Create Account"
|
|
881
|
-
@onSubmit="
|
|
882
|
-
(payload) =>
|
|
883
|
-
handleSubmit('Validation Form', payload)
|
|
884
|
-
" />
|
|
885
|
-
</div>
|
|
886
|
-
<!-- Inline Submitted Values -->
|
|
887
|
-
<div
|
|
888
|
-
v-if="
|
|
889
|
-
submittedValues &&
|
|
890
|
-
submittedValues.tab === 'Validation Form'
|
|
891
|
-
"
|
|
892
|
-
class="flex-1 max-w-md">
|
|
893
|
-
<div
|
|
894
|
-
class="bg-green-50 border border-green-200 rounded-lg p-4 h-full">
|
|
895
|
-
<div class="flex items-center gap-2 mb-3">
|
|
896
|
-
<Icon
|
|
897
|
-
icon="lucide:check-circle"
|
|
898
|
-
class="w-5 h-5 text-green-600" />
|
|
899
|
-
<h4 class="font-semibold text-green-800">
|
|
900
|
-
Submitted Values
|
|
901
|
-
</h4>
|
|
902
|
-
</div>
|
|
903
|
-
<div
|
|
904
|
-
class="bg-white rounded border border-green-200 p-3 overflow-auto max-h-80">
|
|
905
|
-
<pre
|
|
906
|
-
class="text-xs text-gray-700 whitespace-pre-wrap"
|
|
907
|
-
>{{
|
|
908
|
-
JSON.stringify(
|
|
909
|
-
submittedValues.values,
|
|
910
|
-
null,
|
|
911
|
-
2,
|
|
912
|
-
)
|
|
913
|
-
}}</pre
|
|
914
|
-
>
|
|
915
|
-
</div>
|
|
916
|
-
</div>
|
|
917
|
-
</div>
|
|
918
|
-
</div>
|
|
919
|
-
</div>
|
|
920
|
-
</template>
|
|
921
|
-
|
|
922
|
-
<!-- Advanced Tab -->
|
|
923
|
-
<template v-else-if="activeTab === 'advanced'">
|
|
924
|
-
<div>
|
|
925
|
-
<h3 class="text-lg font-semibold mb-1">
|
|
926
|
-
Conditional Fields & Computed Values
|
|
927
|
-
</h3>
|
|
928
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
929
|
-
Shows/hides fields based on selection (payment method)
|
|
930
|
-
and auto-calculates totals using
|
|
931
|
-
<code>updateValues</code>.
|
|
932
|
-
</p>
|
|
933
|
-
<div class="max-w-2xl">
|
|
934
|
-
<Form
|
|
935
|
-
:schema="advancedSchema"
|
|
936
|
-
submitText="Complete Payment"
|
|
937
|
-
@onSubmit="
|
|
938
|
-
(payload) =>
|
|
939
|
-
handleSubmit('Advanced Form', payload)
|
|
940
|
-
" />
|
|
941
|
-
</div>
|
|
942
|
-
</div>
|
|
943
|
-
</template>
|
|
944
|
-
|
|
945
|
-
<!-- Grouped Forms Tab -->
|
|
946
|
-
<template v-else-if="activeTab === 'grouped'">
|
|
947
|
-
<div>
|
|
948
|
-
<h3 class="text-lg font-semibold mb-1">
|
|
949
|
-
Grouped Form with Cards
|
|
950
|
-
</h3>
|
|
951
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
952
|
-
Form sections displayed as cards with headings and
|
|
953
|
-
descriptions.
|
|
954
|
-
</p>
|
|
955
|
-
<div class="max-w-3xl">
|
|
956
|
-
<Form
|
|
957
|
-
:schema="[
|
|
958
|
-
personalInfoSchema,
|
|
959
|
-
addressSchema,
|
|
960
|
-
preferencesSchema,
|
|
961
|
-
]"
|
|
962
|
-
:groupsHeadings="[
|
|
963
|
-
'Personal Information',
|
|
964
|
-
'Address',
|
|
965
|
-
'Preferences',
|
|
966
|
-
]"
|
|
967
|
-
:groupHeadingsDescription="[
|
|
968
|
-
'Enter your basic information',
|
|
969
|
-
'Where should we ship your orders?',
|
|
970
|
-
'Customize your experience',
|
|
971
|
-
]"
|
|
972
|
-
submitText="Save Profile"
|
|
973
|
-
@onSubmit="
|
|
974
|
-
(payload) =>
|
|
975
|
-
handleSubmit('Grouped Form', payload)
|
|
976
|
-
" />
|
|
977
|
-
</div>
|
|
978
|
-
</div>
|
|
979
|
-
</template>
|
|
980
|
-
|
|
981
|
-
<!-- Multi-Step Tab -->
|
|
982
|
-
<template v-else-if="activeTab === 'multistep'">
|
|
983
|
-
<div>
|
|
984
|
-
<h3 class="text-lg font-semibold mb-1">
|
|
985
|
-
Multi-Step Wizard
|
|
986
|
-
</h3>
|
|
987
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
988
|
-
Step-by-step form with Timeline navigation. Each step
|
|
989
|
-
validates before proceeding.
|
|
990
|
-
</p>
|
|
991
|
-
<div class="max-w-3xl">
|
|
992
|
-
<Form
|
|
993
|
-
:tabs="multiStepTabs"
|
|
994
|
-
:schema="[
|
|
995
|
-
accountSchema,
|
|
996
|
-
profileSchema,
|
|
997
|
-
reviewSchema,
|
|
998
|
-
]"
|
|
999
|
-
submitText="Create Account"
|
|
1000
|
-
@onSubmit="
|
|
1001
|
-
(payload) =>
|
|
1002
|
-
handleSubmit('Multi-Step Form', payload)
|
|
1003
|
-
" />
|
|
1004
|
-
</div>
|
|
1005
|
-
</div>
|
|
1006
|
-
</template>
|
|
1007
|
-
|
|
1008
|
-
<!-- Custom Fields Tab -->
|
|
1009
|
-
<template v-else-if="activeTab === 'custom'">
|
|
1010
|
-
<div>
|
|
1011
|
-
<h3 class="text-lg font-semibold mb-1">
|
|
1012
|
-
Dynamic Custom Fields
|
|
1013
|
-
</h3>
|
|
1014
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
1015
|
-
Add/remove dynamic rows like social links and team
|
|
1016
|
-
members using the CustomFields component.
|
|
1017
|
-
</p>
|
|
1018
|
-
<div class="max-w-4xl">
|
|
1019
|
-
<Form
|
|
1020
|
-
:schema="customFieldsSchema"
|
|
1021
|
-
:columns="2"
|
|
1022
|
-
submitText="Save Project"
|
|
1023
|
-
@onSubmit="
|
|
1024
|
-
(payload) =>
|
|
1025
|
-
handleSubmit('Custom Fields Form', payload)
|
|
1026
|
-
" />
|
|
1027
|
-
</div>
|
|
1028
|
-
</div>
|
|
1029
|
-
</template>
|
|
1030
|
-
|
|
1031
|
-
<!-- Uploads Tab -->
|
|
1032
|
-
<template v-else-if="activeTab === 'uploads'">
|
|
1033
|
-
<div>
|
|
1034
|
-
<h3 class="text-lg font-semibold mb-1">File Uploads</h3>
|
|
1035
|
-
<p class="text-sm text-gray-500 mb-4">
|
|
1036
|
-
Demonstration of avatar upload, single/multiple file
|
|
1037
|
-
uploads, and files within custom fields.
|
|
1038
|
-
</p>
|
|
1039
|
-
<div class="flex flex-col lg:flex-row gap-6">
|
|
1040
|
-
<div class="flex-1 max-w-2xl">
|
|
1041
|
-
<Form
|
|
1042
|
-
:schema="uploadSchema"
|
|
1043
|
-
submitText="Upload Files"
|
|
1044
|
-
class-name="grid-cols-1"
|
|
1045
|
-
:values="{
|
|
1046
|
-
documents: [
|
|
1047
|
-
{
|
|
1048
|
-
title: '1',
|
|
1049
|
-
file: 'https://storage.googleapis.com/vlite-bucket/fx4rzr/25_Algorithms_Every_Programmer_Should_Know.pdf',
|
|
1050
|
-
category: 'personal',
|
|
1051
|
-
},
|
|
1052
|
-
],
|
|
1053
|
-
avatar: 'https://cdn.prod.website-files.com/666ad77562dfabab1eb27f63/67477a47fb8225b8ce5d1813_44cc44f1c9_15800_1_1732686878.webp',
|
|
1054
|
-
idProof:
|
|
1055
|
-
'https://storage.googleapis.com/vlite-bucket/yxycao/safdar-azeem-cv.pdf',
|
|
1056
|
-
resume: 'https://storage.googleapis.com/vlite-bucket/rv65j/dummy.pdf',
|
|
1057
|
-
}"
|
|
1058
|
-
@onSubmit="
|
|
1059
|
-
(payload) =>
|
|
1060
|
-
handleSubmit('Uploads', payload)
|
|
1061
|
-
" />
|
|
1062
|
-
</div>
|
|
1063
|
-
<!-- Inline Submitted Values -->
|
|
1064
|
-
<div
|
|
1065
|
-
v-if="
|
|
1066
|
-
submittedValues &&
|
|
1067
|
-
submittedValues.tab === 'Uploads'
|
|
1068
|
-
"
|
|
1069
|
-
class="flex-1 max-w-md">
|
|
1070
|
-
<div
|
|
1071
|
-
class="bg-green-50 border border-green-200 rounded-lg p-4 h-full">
|
|
1072
|
-
<div class="flex items-center gap-2 mb-3">
|
|
1073
|
-
<Icon
|
|
1074
|
-
icon="lucide:check-circle"
|
|
1075
|
-
class="w-5 h-5 text-green-600" />
|
|
1076
|
-
<h4 class="font-semibold text-green-800">
|
|
1077
|
-
Submitted Values
|
|
1078
|
-
</h4>
|
|
1079
|
-
</div>
|
|
1080
|
-
<div
|
|
1081
|
-
class="bg-white rounded border border-green-200 p-3 overflow-auto max-h-[500px]">
|
|
1082
|
-
<pre
|
|
1083
|
-
class="text-xs text-gray-700 whitespace-pre-wrap"
|
|
1084
|
-
>{{
|
|
1085
|
-
JSON.stringify(
|
|
1086
|
-
submittedValues.values,
|
|
1087
|
-
null,
|
|
1088
|
-
2,
|
|
1089
|
-
)
|
|
1090
|
-
}}</pre
|
|
1091
|
-
>
|
|
1092
|
-
</div>
|
|
1093
|
-
</div>
|
|
1094
|
-
</div>
|
|
1095
|
-
</div>
|
|
1096
|
-
</div>
|
|
1097
|
-
</template>
|
|
1098
|
-
</div>
|
|
1099
|
-
|
|
1100
|
-
<!-- Submitted Values Display -->
|
|
1101
|
-
<Transition
|
|
1102
|
-
enter-active-class="transition duration-300 ease-out"
|
|
1103
|
-
enter-from-class="opacity-0 translate-y-4"
|
|
1104
|
-
enter-to-class="opacity-100 translate-y-0"
|
|
1105
|
-
leave-active-class="transition duration-200 ease-in"
|
|
1106
|
-
leave-from-class="opacity-100 translate-y-0"
|
|
1107
|
-
leave-to-class="opacity-0 translate-y-4">
|
|
1108
|
-
<div
|
|
1109
|
-
v-if="submittedValues"
|
|
1110
|
-
class="bg-green-50 border border-green-200 rounded-lg p-4">
|
|
1111
|
-
<div class="flex items-center justify-between mb-3">
|
|
1112
|
-
<div class="flex items-center gap-2">
|
|
1113
|
-
<Icon
|
|
1114
|
-
icon="lucide:check-circle"
|
|
1115
|
-
class="w-5 h-5 text-green-600" />
|
|
1116
|
-
<h4 class="font-semibold text-green-800">
|
|
1117
|
-
Form Submitted Successfully!
|
|
1118
|
-
</h4>
|
|
1119
|
-
<Badge
|
|
1120
|
-
variant="success"
|
|
1121
|
-
size="sm"
|
|
1122
|
-
>{{ submittedValues.tab }}</Badge
|
|
1123
|
-
>
|
|
1124
|
-
</div>
|
|
1125
|
-
<Button
|
|
1126
|
-
variant="ghost"
|
|
1127
|
-
size="xs"
|
|
1128
|
-
icon="lucide:x"
|
|
1129
|
-
@click="clearSubmitted" />
|
|
1130
|
-
</div>
|
|
1131
|
-
<p class="text-xs text-green-600 mb-2">
|
|
1132
|
-
Submitted at
|
|
1133
|
-
{{ submittedValues.timestamp.toLocaleTimeString() }}
|
|
1134
|
-
</p>
|
|
1135
|
-
<div
|
|
1136
|
-
class="bg-white rounded border border-green-200 p-3 overflow-auto max-h-60">
|
|
1137
|
-
<pre class="text-xs text-gray-700 whitespace-pre-wrap">{{
|
|
1138
|
-
JSON.stringify(submittedValues.values, null, 2)
|
|
1139
|
-
}}</pre>
|
|
1140
|
-
</div>
|
|
1141
|
-
</div>
|
|
1142
|
-
</Transition>
|
|
1143
|
-
</div>
|
|
1144
|
-
</template>
|