@indielayer/ui 2.0.0 → 2.1.0
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/docs/App.vue +19 -4
- package/docs/assets/css/tailwind.css +7 -1
- package/docs/components/Cookies.vue +3 -1
- package/docs/components/common/CodePreview.vue +1 -1
- package/docs/components/common/DocsCopyPage.vue +200 -0
- package/docs/components/common/DocumentPage.vue +76 -23
- package/docs/components/toolbar/ToolbarColorToggle.vue +29 -18
- package/docs/components/toolbar/ToolbarSearch.vue +4 -4
- package/docs/composables/useDocMeta.ts +63 -4
- package/docs/icons.ts +3 -0
- package/docs/main.ts +25 -26
- package/docs/pages/component/accordion/index.vue +2 -2
- package/docs/pages/component/alert/index.vue +2 -2
- package/docs/pages/component/avatar/index.vue +4 -4
- package/docs/pages/component/badge/index.vue +2 -2
- package/docs/pages/component/breadcrumbs/index.vue +2 -2
- package/docs/pages/component/button/button-group.vue +3 -3
- package/docs/pages/component/button/index.vue +14 -7
- package/docs/pages/component/button/tooltip.vue +10 -0
- package/docs/pages/component/card/index.vue +2 -2
- package/docs/pages/component/carousel/index.vue +2 -2
- package/docs/pages/component/checkbox/index.vue +5 -5
- package/docs/pages/component/container/index.vue +2 -2
- package/docs/pages/component/datepicker/index.vue +2 -2
- package/docs/pages/component/divider/index.vue +4 -4
- package/docs/pages/component/drawer/index.vue +2 -2
- package/docs/pages/component/empty/index.vue +3 -3
- package/docs/pages/component/form/index.vue +2 -2
- package/docs/pages/component/formGroup/index.vue +2 -2
- package/docs/pages/component/infiniteLoader/index.vue +3 -3
- package/docs/pages/component/input/index.vue +5 -5
- package/docs/pages/component/inputGroup/index.vue +3 -3
- package/docs/pages/component/inputGroup/validation.vue +6 -1
- package/docs/pages/component/link/index.vue +2 -2
- package/docs/pages/component/loader/index.vue +2 -2
- package/docs/pages/component/menu/index.vue +2 -2
- package/docs/pages/component/modal/index.vue +3 -3
- package/docs/pages/component/notifications/index.vue +2 -2
- package/docs/pages/component/pagination/index.vue +2 -2
- package/docs/pages/component/popover/index.vue +2 -2
- package/docs/pages/component/popover/usage.vue +14 -0
- package/docs/pages/component/progress/index.vue +3 -3
- package/docs/pages/component/qrCode/index.vue +2 -2
- package/docs/pages/component/radio/index.vue +3 -3
- package/docs/pages/component/scroll/index.vue +3 -3
- package/docs/pages/component/select/index.vue +5 -5
- package/docs/pages/component/skeleton/index.vue +2 -2
- package/docs/pages/component/slider/index.vue +2 -2
- package/docs/pages/component/spacer/index.vue +2 -2
- package/docs/pages/component/spinner/index.vue +3 -3
- package/docs/pages/component/table/index.vue +4 -4
- package/docs/pages/component/tabs/index.vue +2 -2
- package/docs/pages/component/tabs/usage.vue +26 -0
- package/docs/pages/component/tag/index.vue +2 -2
- package/docs/pages/component/textarea/index.vue +4 -4
- package/docs/pages/component/toggle/index.vue +4 -4
- package/docs/pages/component/upload/index.vue +2 -2
- package/docs/pages/component/upload/usage.vue +1 -0
- package/docs/pages/component/virtualGrid/index.vue +2 -2
- package/docs/pages/component/virtualList/index.vue +3 -3
- package/docs/pages/icons.vue +2 -2
- package/docs/router/index.ts +39 -44
- package/docs/search/components.json +1 -1
- package/docs/search/index.json +1 -1
- package/lib/common/buttonGroupRadius.d.ts +3 -0
- package/lib/common/buttonGroupRadius.js +6 -0
- package/lib/common/props.d.ts +1 -1
- package/lib/common/props.js +10 -9
- package/lib/components/accordion/Accordion.vue.d.ts +42 -9
- package/lib/components/accordion/Accordion.vue_vue_type_script_setup_true_lang.js +18 -6
- package/lib/components/accordion/AccordionItem.vue.d.ts +33 -6
- package/lib/components/accordion/AccordionItem.vue_vue_type_script_setup_true_lang.js +31 -6
- package/lib/components/alert/Alert.vue.d.ts +27 -6
- package/lib/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +20 -6
- package/lib/components/avatar/Avatar.vue.d.ts +45 -9
- package/lib/components/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +17 -6
- package/lib/components/badge/Badge.vue.d.ts +54 -9
- package/lib/components/badge/Badge.vue_vue_type_script_setup_true_lang.js +26 -9
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +30 -6
- package/lib/components/breadcrumbs/Breadcrumbs.vue_vue_type_script_setup_true_lang.js +13 -5
- package/lib/components/button/Button.js +2 -2
- package/lib/components/button/Button.vue.d.ts +138 -28
- package/lib/components/button/Button.vue_vue_type_script_setup_true_lang.js +192 -70
- package/lib/components/button/ButtonGroup.js +4 -5
- package/lib/components/button/ButtonGroup.vue.d.ts +54 -10
- package/lib/components/button/ButtonGroup.vue_vue_type_script_setup_true_lang.js +30 -19
- package/lib/components/button/theme/Button.base.theme.js +6 -5
- package/lib/components/button/theme/Button.carbon.theme.js +6 -5
- package/lib/components/card/Card.vue.d.ts +3 -0
- package/lib/components/card/Card.vue_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/carousel/Carousel.vue.d.ts +21 -3
- package/lib/components/carousel/Carousel.vue_vue_type_script_setup_true_lang.js +23 -5
- package/lib/components/carousel/CarouselSlide.js +2 -2
- package/lib/components/carousel/CarouselSlide.vue.d.ts +3 -0
- package/lib/components/carousel/CarouselSlide.vue_vue_type_script_setup_true_lang.js +3 -1
- package/lib/components/carousel/{CarouselSlide.vue_vue_type_style_index_0_scoped_e90d2127_lang.module.js → CarouselSlide.vue_vue_type_style_index_0_scoped_4f559831_lang.module.js} +1 -1
- package/lib/components/checkbox/Checkbox.vue.d.ts +198 -45
- package/lib/components/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +20 -3
- package/lib/components/container/Container.vue.d.ts +6 -0
- package/lib/components/container/Container.vue_vue_type_script_setup_true_lang.js +5 -2
- package/lib/components/datepicker/Datepicker.vue.d.ts +462 -36
- package/lib/components/datepicker/Datepicker.vue_vue_type_script_setup_true_lang.js +294 -153
- package/lib/components/divider/Divider.vue.d.ts +12 -3
- package/lib/components/divider/Divider.vue_vue_type_script_setup_true_lang.js +6 -2
- package/lib/components/drawer/Drawer.vue.d.ts +39 -6
- package/lib/components/drawer/Drawer.vue_vue_type_script_setup_true_lang.js +30 -7
- package/lib/components/empty/Empty.vue.d.ts +30 -6
- package/lib/components/empty/Empty.vue_vue_type_script_setup_true_lang.js +17 -4
- package/lib/components/form/Form.vue.d.ts +48 -9
- package/lib/components/form/Form.vue_vue_type_script_setup_true_lang.js +34 -7
- package/lib/components/formGroup/FormGroup.vue.d.ts +171 -39
- package/lib/components/formGroup/FormGroup.vue_vue_type_script_setup_true_lang.js +15 -9
- package/lib/components/icon/Icon.vue.d.ts +9 -0
- package/lib/components/icon/Icon.vue_vue_type_script_setup_true_lang.js +6 -3
- package/lib/components/image/Image.vue.d.ts +12 -3
- package/lib/components/image/Image.vue_vue_type_script_setup_true_lang.js +5 -1
- package/lib/components/index.js +18 -18
- package/lib/components/input/Input.vue.d.ts +291 -66
- package/lib/components/input/Input.vue_vue_type_script_setup_true_lang.js +53 -15
- package/lib/components/inputFooter/InputFooter.vue.d.ts +48 -12
- package/lib/components/inputFooter/InputFooter.vue_vue_type_script_setup_true_lang.js +18 -5
- package/lib/components/inputGroup/InputGroup.vue.d.ts +171 -39
- package/lib/components/inputGroup/InputGroup.vue_vue_type_script_setup_true_lang.js +6 -1
- package/lib/components/label/Label.vue.d.ts +78 -18
- package/lib/components/label/Label.vue_vue_type_script_setup_true_lang.js +28 -8
- package/lib/components/link/Link.js +2 -2
- package/lib/components/link/Link.vue.d.ts +18 -3
- package/lib/components/link/Link.vue_vue_type_script_setup_true_lang.js +10 -5
- package/lib/components/loader/Loader.vue.d.ts +30 -6
- package/lib/components/loader/Loader.vue_vue_type_script_setup_true_lang.js +11 -3
- package/lib/components/menu/Menu.vue.d.ts +51 -9
- package/lib/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +24 -8
- package/lib/components/menu/MenuItem.js +2 -2
- package/lib/components/menu/MenuItem.vue.d.ts +198 -45
- package/lib/components/menu/MenuItem.vue_vue_type_script_setup_true_lang.js +84 -23
- package/lib/components/menu/{MenuItem.vue_vue_type_style_index_0_scoped_2a6b7341_lang.module.js → MenuItem.vue_vue_type_style_index_0_scoped_5aebaff3_lang.module.js} +1 -1
- package/lib/components/modal/Modal.vue.d.ts +177 -39
- package/lib/components/modal/Modal.vue_vue_type_script_setup_true_lang.js +104 -23
- package/lib/components/notifications/Notifications.vue.d.ts +24 -0
- package/lib/components/notifications/Notifications.vue_vue_type_script_setup_true_lang.js +39 -12
- package/lib/components/pagination/Pagination.vue.d.ts +12 -0
- package/lib/components/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +8 -4
- package/lib/components/pagination/PaginationItem.vue.d.ts +18 -3
- package/lib/components/pagination/PaginationItem.vue_vue_type_script_setup_true_lang.js +8 -3
- package/lib/components/popover/Popover.vue.d.ts +204 -45
- package/lib/components/popover/Popover.vue_vue_type_script_setup_true_lang.js +157 -66
- package/lib/components/popover/PopoverContainer.vue.d.ts +3 -0
- package/lib/components/popover/PopoverContainer.vue_vue_type_script_setup_true_lang.js +3 -1
- package/lib/components/popover/PopoverContentBoundary.js +5 -0
- package/lib/components/popover/PopoverContentBoundary.vue.d.ts +9 -0
- package/lib/components/popover/PopoverContentBoundary.vue_vue_type_script_setup_true_lang.js +18 -0
- package/lib/components/popover/theme/PopoverContainer.base.theme.js +1 -1
- package/lib/components/progress/Progress.vue.d.ts +9 -0
- package/lib/components/progress/Progress.vue_vue_type_script_setup_true_lang.js +7 -4
- package/lib/components/qrCode/QrCode.vue.d.ts +24 -3
- package/lib/components/qrCode/QrCode.vue_vue_type_script_setup_true_lang.js +13 -5
- package/lib/components/radio/Radio.vue.d.ts +186 -42
- package/lib/components/radio/Radio.vue_vue_type_script_setup_true_lang.js +10 -2
- package/lib/components/radioButton/RadioButton.vue.d.ts +186 -42
- package/lib/components/radioButton/RadioButton.vue_vue_type_script_setup_true_lang.js +9 -1
- package/lib/components/scroll/Scroll.vue.d.ts +3 -0
- package/lib/components/scroll/Scroll.vue_vue_type_script_setup_true_lang.js +9 -4
- package/lib/components/select/Select.vue.d.ts +633 -144
- package/lib/components/select/Select.vue_vue_type_script_setup_true_lang.js +224 -189
- package/lib/components/skeleton/Skeleton.vue.d.ts +6 -0
- package/lib/components/skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +5 -2
- package/lib/components/slider/Slider.js +1 -1
- package/lib/components/slider/Slider.vue.d.ts +180 -39
- package/lib/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +14 -3
- package/lib/components/spinner/Spinner.vue.d.ts +6 -0
- package/lib/components/spinner/Spinner.vue_vue_type_script_setup_true_lang.js +3 -1
- package/lib/components/stepper/Stepper.vue.d.ts +120 -24
- package/lib/components/stepper/Stepper.vue_vue_type_script_setup_true_lang.js +63 -15
- package/lib/components/tab/Tab.vue.d.ts +112 -31
- package/lib/components/tab/Tab.vue_vue_type_script_setup_true_lang.js +166 -95
- package/lib/components/tab/TabGroup.vue.d.ts +47 -12
- package/lib/components/tab/TabGroup.vue_vue_type_script_setup_true_lang.js +93 -49
- package/lib/components/tab/theme/Tab.base.theme.js +6 -6
- package/lib/components/tab/theme/Tab.carbon.theme.js +6 -6
- package/lib/components/tab/theme/TabGroup.base.theme.js +7 -7
- package/lib/components/tab/theme/TabGroup.carbon.theme.js +3 -3
- package/lib/components/table/Table.vue.d.ts +45 -9
- package/lib/components/table/Table.vue_vue_type_script_setup_true_lang.js +82 -27
- package/lib/components/table/TableCell.vue.d.ts +54 -12
- package/lib/components/table/TableCell.vue_vue_type_script_setup_true_lang.js +23 -8
- package/lib/components/table/TableHead.vue_vue_type_script_setup_true_lang.js +2 -1
- package/lib/components/table/TableHeader.vue.d.ts +18 -3
- package/lib/components/table/TableHeader.vue_vue_type_script_setup_true_lang.js +10 -4
- package/lib/components/table/TableRow.vue.d.ts +15 -3
- package/lib/components/table/TableRow.vue_vue_type_script_setup_true_lang.js +10 -5
- package/lib/components/tag/Tag.vue.d.ts +33 -6
- package/lib/components/tag/Tag.vue_vue_type_script_setup_true_lang.js +21 -7
- package/lib/components/textarea/Textarea.vue.d.ts +237 -54
- package/lib/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +38 -13
- package/lib/components/themeProvider/ThemeProvider.vue.d.ts +10 -4
- package/lib/components/themeProvider/ThemeProvider.vue_vue_type_script_setup_true_lang.js +6 -1
- package/lib/components/toggle/Toggle.vue.d.ts +174 -39
- package/lib/components/toggle/Toggle.vue_vue_type_script_setup_true_lang.js +5 -1
- package/lib/components/tooltip/ToggleTip.vue.d.ts +24 -6
- package/lib/components/tooltip/ToggleTip.vue_vue_type_script_setup_true_lang.js +9 -2
- package/lib/components/tooltip/Tooltip.vue.d.ts +30 -6
- package/lib/components/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +16 -4
- package/lib/components/upload/Upload.vue.d.ts +249 -57
- package/lib/components/upload/Upload.vue_vue_type_script_setup_true_lang.js +156 -125
- package/lib/components/upload/fileAccept.d.ts +6 -0
- package/lib/components/upload/fileAccept.js +17 -0
- package/lib/composables/useColors.d.ts +1 -0
- package/lib/composables/useColors.js +2 -1
- package/lib/composables/useCommon.d.ts +1 -0
- package/lib/composables/useCommon.js +2 -1
- package/lib/composables/useFocusTrap.js +1 -1
- package/lib/composables/useInputtable.d.ts +45 -10
- package/lib/composables/useInputtable.js +56 -14
- package/lib/composables/useInteractive.d.ts +13 -3
- package/lib/composables/useInteractive.js +14 -4
- package/lib/index.js +12 -12
- package/lib/index.umd.js +9 -10
- package/lib/themes/base/styles.d.ts +1 -1
- package/lib/themes/base/styles.js +1 -1
- package/lib/themes/carbon/styles.d.ts +1 -1
- package/lib/themes/carbon/styles.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue.d.ts +27 -16
- package/lib/virtual/components/infiniteLoader/InfiniteLoader.vue_vue_type_script_setup_true_lang.js +25 -5
- package/lib/virtual/components/virtualGrid/VirtualGrid.vue.d.ts +108 -86
- package/lib/virtual/components/virtualGrid/VirtualGrid.vue_vue_type_script_setup_true_lang.js +91 -21
- package/lib/virtual/components/virtualList/VirtualList.vue.d.ts +62 -48
- package/lib/virtual/components/virtualList/VirtualList.vue_vue_type_script_setup_true_lang.js +64 -13
- package/lib/virtual/components/virtualList/useDynamicRowHeight.js +4 -3
- package/package.json +5 -3
- package/src/common/buttonGroupRadius.ts +16 -0
- package/src/common/props.ts +10 -9
- package/src/components/accordion/Accordion.vue +20 -4
- package/src/components/accordion/AccordionItem.vue +28 -3
- package/src/components/alert/Alert.vue +22 -6
- package/src/components/avatar/Avatar.vue +20 -5
- package/src/components/badge/Badge.vue +24 -5
- package/src/components/breadcrumbs/Breadcrumbs.vue +15 -5
- package/src/components/button/Button.vue +140 -5
- package/src/components/button/ButtonGroup.vue +41 -25
- package/src/components/button/__tests__/ Button.spec.ts +41 -0
- package/src/components/button/__tests__/ ButtonGroup.spec.ts +32 -0
- package/src/components/button/theme/Button.base.theme.ts +4 -1
- package/src/components/button/theme/Button.carbon.theme.ts +5 -4
- package/src/components/card/Card.vue +10 -2
- package/src/components/carousel/Carousel.vue +22 -2
- package/src/components/carousel/CarouselSlide.vue +6 -0
- package/src/components/checkbox/Checkbox.vue +22 -3
- package/src/components/container/Container.vue +10 -1
- package/src/components/datepicker/Datepicker.vue +466 -101
- package/src/components/datepicker/__tests__/Datepicker.spec.ts +31 -0
- package/src/components/divider/Divider.vue +9 -3
- package/src/components/drawer/Drawer.vue +27 -2
- package/src/components/empty/Empty.vue +18 -3
- package/src/components/form/Form.vue +32 -3
- package/src/components/formGroup/FormGroup.vue +12 -0
- package/src/components/icon/Icon.vue +4 -1
- package/src/components/image/Image.vue +8 -2
- package/src/components/input/Input.vue +54 -12
- package/src/components/inputFooter/InputFooter.vue +21 -6
- package/src/components/inputGroup/InputGroup.vue +12 -1
- package/src/components/label/Label.vue +31 -7
- package/src/components/link/Link.vue +16 -5
- package/src/components/loader/Loader.vue +10 -2
- package/src/components/menu/Menu.vue +23 -5
- package/src/components/menu/MenuItem.vue +78 -17
- package/src/components/modal/Modal.vue +90 -15
- package/src/components/notifications/Notifications.vue +23 -0
- package/src/components/notifications/__tests__/Notifications.spec.ts +44 -4
- package/src/components/pagination/Pagination.vue +9 -1
- package/src/components/pagination/PaginationItem.vue +11 -2
- package/src/components/popover/Popover.vue +113 -18
- package/src/components/popover/PopoverContainer.vue +9 -1
- package/src/components/popover/PopoverContentBoundary.vue +32 -0
- package/src/components/popover/__tests__/Popover.spec.ts +51 -0
- package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
- package/src/components/progress/Progress.vue +8 -3
- package/src/components/qrCode/QrCode.vue +9 -1
- package/src/components/radio/Radio.vue +16 -2
- package/src/components/radioButton/RadioButton.vue +15 -1
- package/src/components/scroll/Scroll.vue +15 -4
- package/src/components/select/Select.vue +53 -16
- package/src/components/skeleton/Skeleton.vue +3 -0
- package/src/components/slider/Slider.vue +15 -0
- package/src/components/spinner/Spinner.vue +2 -0
- package/src/components/stepper/Stepper.vue +57 -9
- package/src/components/tab/Tab.vue +153 -63
- package/src/components/tab/TabGroup.vue +110 -26
- package/src/components/tab/__tests__/Tab.spec.ts +53 -0
- package/src/components/tab/__tests__/TabGroup.spec.ts +113 -0
- package/src/components/tab/theme/Tab.base.theme.ts +24 -2
- package/src/components/tab/theme/Tab.carbon.theme.ts +30 -7
- package/src/components/tab/theme/TabGroup.base.theme.ts +12 -9
- package/src/components/tab/theme/TabGroup.carbon.theme.ts +6 -2
- package/src/components/table/Table.vue +76 -19
- package/src/components/table/TableCell.vue +25 -6
- package/src/components/table/TableHead.vue +9 -2
- package/src/components/table/TableHeader.vue +16 -3
- package/src/components/table/TableRow.vue +17 -5
- package/src/components/tag/Tag.vue +22 -6
- package/src/components/textarea/Textarea.vue +40 -11
- package/src/components/themeProvider/ThemeProvider.vue +22 -7
- package/src/components/toggle/Toggle.vue +9 -1
- package/src/components/tooltip/ToggleTip.vue +12 -3
- package/src/components/tooltip/Tooltip.vue +19 -3
- package/src/components/upload/Upload.vue +46 -16
- package/src/components/upload/__tests__/fileAccept.spec.ts +39 -0
- package/src/components/upload/fileAccept.ts +29 -0
- package/src/composables/useColors.ts +1 -0
- package/src/composables/useCommon.ts +1 -0
- package/src/composables/useFocusTrap.ts +3 -1
- package/src/composables/useInputtable.ts +66 -10
- package/src/composables/useInteractive.ts +13 -3
- package/src/themes/base/styles.ts +2 -3
- package/src/themes/carbon/styles.ts +2 -3
- package/src/version.ts +1 -1
- package/src/virtual/components/infiniteLoader/InfiniteLoader.vue +33 -1
- package/src/virtual/components/virtualGrid/VirtualGrid.vue +104 -10
- package/src/virtual/components/virtualList/VirtualList.vue +73 -8
- package/src/virtual/components/virtualList/useDynamicRowHeight.ts +9 -2
- package/volar.d.ts +3 -0
- package/docs/layouts/simple.vue +0 -5
- package/lib/components/button/ButtonGroup.vue_vue_type_style_index_0_lang.module.js +0 -7
- /package/lib/components/button/{Button.vue_vue_type_style_index_0_scoped_4402fde2_lang.module.js → Button.vue_vue_type_style_index_0_scoped_486cb9c0_lang.module.js} +0 -0
- /package/lib/components/link/{Link.vue_vue_type_style_index_0_scoped_8e0e4d08_lang.module.js → Link.vue_vue_type_style_index_0_scoped_3ee61e03_lang.module.js} +0 -0
|
@@ -2,109 +2,140 @@ import { useTheme as e } from "../../composables/useTheme.js";
|
|
|
2
2
|
import { optionalBooleanProp as t } from "../../common/props.js";
|
|
3
3
|
import { useCommon as n } from "../../composables/useCommon.js";
|
|
4
4
|
import r from "../icon/Icon.js";
|
|
5
|
-
import { closeIcon as i, fileIcon as
|
|
6
|
-
import { useInteractive as
|
|
7
|
-
import { useInputtable as
|
|
8
|
-
import
|
|
9
|
-
import { useDropZone as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
5
|
+
import { closeIcon as i, fileIcon as ee, uploadIcon as te } from "../../common/icons.js";
|
|
6
|
+
import { useInteractive as a } from "../../composables/useInteractive.js";
|
|
7
|
+
import { useInputtable as o } from "../../composables/useInputtable.js";
|
|
8
|
+
import s from "../inputFooter/InputFooter.js";
|
|
9
|
+
import { useDropZone as ne } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.34_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
|
|
10
|
+
import re from "../label/Label.js";
|
|
11
|
+
import c from "../progress/Progress.js";
|
|
12
|
+
import { isFileAccepted as l } from "./fileAccept.js";
|
|
13
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, openBlock as S, ref as C, renderList as ie, renderSlot as w, toDisplayString as T, toHandlers as ae, unref as E, watch as oe, withCtx as se } from "vue";
|
|
13
14
|
//#region src/components/upload/Upload.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
15
|
+
var ce = [
|
|
15
16
|
"id",
|
|
16
17
|
"disabled",
|
|
17
18
|
"name",
|
|
18
19
|
"accept",
|
|
19
20
|
"multiple",
|
|
20
21
|
"readonly"
|
|
21
|
-
],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
], le = { class: "text-secondary-500 dark:text-secondary-400" }, D = { class: "flex items-center" }, O = ["src"], k = { class: "truncate flex-1 pr-2" }, A = { class: "font-medium truncate" }, j = { class: "text-xs text-secondary-500" }, M = ["onClick"], N = {
|
|
23
|
+
...n.validators(),
|
|
24
|
+
variant: ["box"]
|
|
25
|
+
}, P = {
|
|
26
|
+
...a.props(),
|
|
27
|
+
...o.props(),
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
description: "Text shown in the default drop zone."
|
|
31
|
+
},
|
|
32
|
+
accept: {
|
|
33
|
+
type: String,
|
|
34
|
+
description: "Accepted file types (native `accept` attribute)."
|
|
35
|
+
},
|
|
36
|
+
multiple: t("Allows selecting more than one file."),
|
|
37
|
+
maxFiles: {
|
|
38
|
+
type: [Number, String],
|
|
39
|
+
description: "Maximum number of files allowed."
|
|
40
|
+
},
|
|
41
|
+
maxFileSize: {
|
|
42
|
+
type: [Number, String],
|
|
43
|
+
description: "Maximum file size in bytes."
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "box",
|
|
48
|
+
description: "Visual variant of the upload control."
|
|
26
49
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
action: {
|
|
51
|
+
type: String,
|
|
52
|
+
description: "URL to upload files to; enables remote upload mode when set."
|
|
53
|
+
},
|
|
54
|
+
headers: {
|
|
55
|
+
type: Object,
|
|
56
|
+
description: "Additional HTTP headers sent with the upload request."
|
|
57
|
+
},
|
|
58
|
+
method: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "POST",
|
|
61
|
+
description: "HTTP method used when uploading to `action`."
|
|
62
|
+
},
|
|
63
|
+
withCredentials: t("Sends cookies/credentials with the upload request."),
|
|
64
|
+
fileFormDataName: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "file",
|
|
67
|
+
description: "FormData field name for each uploaded file."
|
|
68
|
+
}
|
|
69
|
+
}, F = /* @__PURE__ */ _({
|
|
70
|
+
name: "XUpload",
|
|
71
|
+
validators: N,
|
|
72
|
+
docs: {
|
|
73
|
+
slots: {
|
|
74
|
+
box: "Custom drop zone UI (`is-over` when dragging files).",
|
|
75
|
+
files: "Custom file list (`files` upload state array).",
|
|
76
|
+
removeIcon: "Icon for the remove-file control."
|
|
38
77
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
default: "POST"
|
|
78
|
+
emits: {
|
|
79
|
+
...o.emitDocs(),
|
|
80
|
+
upload: "Emitted when a file finishes uploading (remote mode).",
|
|
81
|
+
remove: "Emitted when a file is removed from the list."
|
|
44
82
|
},
|
|
45
|
-
|
|
46
|
-
fileFormDataName: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: "file"
|
|
49
|
-
}
|
|
83
|
+
methods: { ...o.methodDocs() }
|
|
50
84
|
},
|
|
85
|
+
props: P,
|
|
51
86
|
emits: [
|
|
52
|
-
...
|
|
87
|
+
...o.emits(),
|
|
53
88
|
"upload",
|
|
54
89
|
"remove"
|
|
55
90
|
],
|
|
56
|
-
setup(t, { expose: n, emit:
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
setup(t, { expose: n, emit: _ }) {
|
|
92
|
+
let N = t, P = _, F = C(null), I = d(() => !!N.action), L = C([]);
|
|
93
|
+
oe(L, (e) => {
|
|
94
|
+
P("update:modelValue", e);
|
|
60
95
|
}, {
|
|
61
96
|
deep: !0,
|
|
62
97
|
immediate: !0
|
|
63
98
|
});
|
|
64
|
-
let { focus:
|
|
65
|
-
function
|
|
99
|
+
let { focus: R, blur: z } = a(F);
|
|
100
|
+
function B(e) {
|
|
66
101
|
if (!e) return !1;
|
|
67
|
-
if (!
|
|
68
|
-
if (
|
|
69
|
-
for (let t = 0; t < e.length; t++) if (e[t].size > Number(
|
|
102
|
+
if (!N.multiple && e.length > 1 || N.maxFiles && e.length > Number(N.maxFiles)) return Y.value = "Too many files", !1;
|
|
103
|
+
if (N.maxFileSize) {
|
|
104
|
+
for (let t = 0; t < e.length; t++) if (e[t].size > Number(N.maxFileSize)) return Y.value = "File size is too large", !1;
|
|
70
105
|
}
|
|
71
|
-
if (
|
|
72
|
-
let t =
|
|
73
|
-
for (let n = 0; n < e.length; n++) {
|
|
74
|
-
let r = e[n];
|
|
75
|
-
if (!t.some((e) => r.type === e || r.name.endsWith(e))) return Y.value = "Invalid file type", !1;
|
|
76
|
-
}
|
|
106
|
+
if (N.accept) {
|
|
107
|
+
for (let t = 0; t < e.length; t++) if (!l(e[t], N.accept)) return Y.value = "Invalid file type", !1;
|
|
77
108
|
}
|
|
78
109
|
return !0;
|
|
79
110
|
}
|
|
80
|
-
function
|
|
111
|
+
function V(e) {
|
|
81
112
|
let t = e.target.files;
|
|
82
|
-
|
|
113
|
+
B(t) && P("change", e);
|
|
83
114
|
}
|
|
84
|
-
function
|
|
115
|
+
function H(e) {
|
|
85
116
|
let t = e.target.files;
|
|
86
|
-
|
|
117
|
+
B(t) && (K(t), N.validateOnInput && !Z.value && Q(L.value), P("input", e));
|
|
87
118
|
}
|
|
88
|
-
let
|
|
89
|
-
function
|
|
90
|
-
|
|
119
|
+
let U = C(null);
|
|
120
|
+
function W(e) {
|
|
121
|
+
B(e) && K(e);
|
|
91
122
|
}
|
|
92
|
-
let { isOverDropZone: G } =
|
|
93
|
-
onDrop:
|
|
94
|
-
multiple:
|
|
123
|
+
let { isOverDropZone: G } = ne(U, {
|
|
124
|
+
onDrop: W,
|
|
125
|
+
multiple: N.multiple,
|
|
95
126
|
preventDefaultForUnhandled: !1
|
|
96
127
|
});
|
|
97
128
|
function K(e) {
|
|
98
|
-
|
|
129
|
+
L.value = e ? Array.from(e).map((e) => ({
|
|
99
130
|
file: e,
|
|
100
|
-
completed: !
|
|
101
|
-
progress:
|
|
131
|
+
completed: !I.value,
|
|
132
|
+
progress: I.value ? 0 : 100,
|
|
102
133
|
error: ""
|
|
103
|
-
})) : [],
|
|
134
|
+
})) : [], I.value && me();
|
|
104
135
|
}
|
|
105
|
-
function
|
|
106
|
-
let t =
|
|
107
|
-
t !== -1 && (
|
|
136
|
+
function ue(e) {
|
|
137
|
+
let t = L.value.findIndex((t) => t.file === e);
|
|
138
|
+
t !== -1 && (P("remove", L.value[t]), L.value.splice(t, 1));
|
|
108
139
|
}
|
|
109
140
|
function q(e) {
|
|
110
141
|
return e.type.startsWith("image") || [
|
|
@@ -117,23 +148,23 @@ var ae = [
|
|
|
117
148
|
].some((t) => e.name.endsWith(t));
|
|
118
149
|
}
|
|
119
150
|
let J = [];
|
|
120
|
-
function
|
|
151
|
+
function de(e) {
|
|
121
152
|
let t = URL.createObjectURL(e);
|
|
122
153
|
return J.push(t), t;
|
|
123
154
|
}
|
|
124
|
-
|
|
155
|
+
x(() => {
|
|
125
156
|
J.forEach((e) => URL.revokeObjectURL(e));
|
|
126
157
|
});
|
|
127
|
-
function
|
|
158
|
+
function fe(e) {
|
|
128
159
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : e < 1024 * 1024 * 1024 ? `${(e / 1024 / 1024).toFixed(2)} MB` : `${(e / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
129
160
|
}
|
|
130
|
-
async function
|
|
161
|
+
async function pe(e) {
|
|
131
162
|
return new Promise((t, n) => {
|
|
132
|
-
if (!
|
|
163
|
+
if (!N.action) n(/* @__PURE__ */ Error("No action provided"));
|
|
133
164
|
else {
|
|
134
165
|
let r = new XMLHttpRequest(), i = new FormData();
|
|
135
|
-
i.append(
|
|
136
|
-
r.setRequestHeader(e,
|
|
166
|
+
i.append(N.fileFormDataName, e.file), r.open(N.method, N.action, !0), N.headers && typeof N.headers == "object" && Object.keys(N.headers).forEach((e) => {
|
|
167
|
+
r.setRequestHeader(e, N.headers[e]);
|
|
137
168
|
}), r.upload.addEventListener("progress", (t) => {
|
|
138
169
|
t.lengthComputable && (e.progress = t.loaded / t.total * 100);
|
|
139
170
|
}), r.addEventListener("load", () => {
|
|
@@ -155,63 +186,63 @@ var ae = [
|
|
|
155
186
|
}
|
|
156
187
|
});
|
|
157
188
|
}
|
|
158
|
-
async function
|
|
159
|
-
if (!
|
|
189
|
+
async function me() {
|
|
190
|
+
if (!N.action && !L.value) return;
|
|
160
191
|
let e = [];
|
|
161
|
-
for (let t = 0; t <
|
|
162
|
-
await Promise.all(e), Q(
|
|
192
|
+
for (let t = 0; t < L.value.length; t++) e.push(pe(L.value[t]));
|
|
193
|
+
await Promise.all(e), Q(L.value);
|
|
163
194
|
}
|
|
164
|
-
function
|
|
165
|
-
Y.value = "", Z.value = !0,
|
|
195
|
+
function he() {
|
|
196
|
+
Y.value = "", Z.value = !0, L.value = [], F.value && (F.value.value = "");
|
|
166
197
|
}
|
|
167
|
-
let { errorInternal: Y, hideFooterInternal:
|
|
168
|
-
focus:
|
|
169
|
-
emit:
|
|
170
|
-
}), { styles:
|
|
198
|
+
let { errorInternal: Y, hideFooterInternal: ge, isInsideForm: X, isInsideInputGroup: _e, inputListeners: ve, isFirstValidation: Z, validate: Q, setError: ye } = o(N, {
|
|
199
|
+
focus: R,
|
|
200
|
+
emit: P
|
|
201
|
+
}), { styles: be, classes: $, className: xe } = e("Upload", {}, N);
|
|
171
202
|
return n({
|
|
172
|
-
focus:
|
|
173
|
-
blur:
|
|
174
|
-
reset:
|
|
203
|
+
focus: R,
|
|
204
|
+
blur: z,
|
|
205
|
+
reset: he,
|
|
175
206
|
validate: Q,
|
|
176
|
-
setError:
|
|
177
|
-
}), (e, t) => (
|
|
178
|
-
style:
|
|
207
|
+
setError: ye
|
|
208
|
+
}), (e, t) => (S(), m("div", { class: y([E(xe), E($).wrapper]) }, [g(re, {
|
|
209
|
+
style: b(E(be)),
|
|
179
210
|
disabled: e.disabled,
|
|
180
211
|
required: e.required,
|
|
181
|
-
"is-inside-form":
|
|
182
|
-
"is-inside-input-group":
|
|
212
|
+
"is-inside-form": E(X),
|
|
213
|
+
"is-inside-input-group": E(_e),
|
|
183
214
|
label: e.label,
|
|
184
215
|
tooltip: e.tooltip
|
|
185
216
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
|
|
217
|
+
default: se(() => [
|
|
218
|
+
h("input", v({
|
|
188
219
|
id: e.id,
|
|
189
220
|
ref_key: "elRef",
|
|
190
|
-
ref:
|
|
221
|
+
ref: F,
|
|
191
222
|
type: "file",
|
|
192
|
-
class: ["sr-only",
|
|
223
|
+
class: ["sr-only", E($).input],
|
|
193
224
|
disabled: e.disabled,
|
|
194
225
|
name: e.name,
|
|
195
226
|
accept: e.accept,
|
|
196
227
|
multiple: e.multiple,
|
|
197
228
|
readonly: e.readonly
|
|
198
|
-
},
|
|
199
|
-
...
|
|
200
|
-
input:
|
|
201
|
-
change:
|
|
202
|
-
}, !0)), null, 16,
|
|
203
|
-
|
|
229
|
+
}, ae({
|
|
230
|
+
...E(ve),
|
|
231
|
+
input: H,
|
|
232
|
+
change: V
|
|
233
|
+
}, !0)), null, 16, ce),
|
|
234
|
+
w(e.$slots, "box", { isOver: E(G) }, () => [h("div", {
|
|
204
235
|
ref_key: "dropZoneRef",
|
|
205
|
-
ref:
|
|
206
|
-
class:
|
|
236
|
+
ref: U,
|
|
237
|
+
class: y(["border border-dashed rounded-md flex items-center justify-center gap-2 p-4 cursor-pointer transition-colors duration-500 hover:border-primary-500 dark:hover:border-primary-400", { "border-primary-500 dark:border-primary-400": E(G) }])
|
|
207
238
|
}, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
t[0] ||=
|
|
239
|
+
g(r, { icon: E(te) }, null, 8, ["icon"]),
|
|
240
|
+
h("span", le, T(e.placeholder), 1),
|
|
241
|
+
t[0] ||= h("span", { class: "text-xs text-secondary-400 dark:text-secondary-500" }, "or drag and drop", -1)
|
|
211
242
|
], 2)]),
|
|
212
|
-
|
|
243
|
+
E(ge) ? p("", !0) : (S(), f(s, {
|
|
213
244
|
key: 0,
|
|
214
|
-
error:
|
|
245
|
+
error: E(Y),
|
|
215
246
|
helper: e.helper
|
|
216
247
|
}, null, 8, ["error", "helper"]))
|
|
217
248
|
]),
|
|
@@ -224,38 +255,38 @@ var ae = [
|
|
|
224
255
|
"is-inside-input-group",
|
|
225
256
|
"label",
|
|
226
257
|
"tooltip"
|
|
227
|
-
]),
|
|
258
|
+
]), w(e.$slots, "files", { files: L.value }, () => [(S(!0), m(u, null, ie(L.value, (t, n) => (S(), m("div", {
|
|
228
259
|
key: n,
|
|
229
260
|
class: "border rounded-md p-2 bg-secondary-100 my-2"
|
|
230
261
|
}, [
|
|
231
|
-
|
|
232
|
-
|
|
262
|
+
h("div", D, [
|
|
263
|
+
h("div", { class: y(["rounded-md w-9 h-9 flex items-center justify-center mr-2 border", { "p-2 bg-white": !q(t.file) }]) }, [q(t.file) ? (S(), m("img", {
|
|
233
264
|
key: 0,
|
|
234
|
-
src:
|
|
265
|
+
src: de(t.file),
|
|
235
266
|
class: "w-full h-full object-cover rounded-md"
|
|
236
|
-
}, null, 8,
|
|
267
|
+
}, null, 8, O)) : (S(), f(r, {
|
|
237
268
|
key: 1,
|
|
238
|
-
icon:
|
|
269
|
+
icon: E(ee)
|
|
239
270
|
}, null, 8, ["icon"]))], 2),
|
|
240
|
-
|
|
241
|
-
|
|
271
|
+
h("div", k, [h("div", A, T(t.file.name), 1), h("div", j, T(fe(t.file.size)), 1)]),
|
|
272
|
+
h("button", {
|
|
242
273
|
type: "button",
|
|
243
274
|
class: "shrink-0",
|
|
244
|
-
onClick: (e) =>
|
|
245
|
-
}, [
|
|
275
|
+
onClick: (e) => ue(t.file)
|
|
276
|
+
}, [w(e.$slots, "removeIcon", {}, () => [g(r, { icon: E(i) }, null, 8, ["icon"])])], 8, M)
|
|
246
277
|
]),
|
|
247
|
-
|
|
278
|
+
I.value ? (S(), f(c, {
|
|
248
279
|
key: 0,
|
|
249
280
|
percentage: t.progress,
|
|
250
281
|
class: "mt-1",
|
|
251
282
|
color: t.error ? "warning" : "success"
|
|
252
|
-
}, null, 8, ["percentage", "color"])) :
|
|
253
|
-
t.error ? (
|
|
283
|
+
}, null, 8, ["percentage", "color"])) : p("", !0),
|
|
284
|
+
t.error ? (S(), f(s, {
|
|
254
285
|
key: 1,
|
|
255
286
|
error: t.error
|
|
256
|
-
}, null, 8, ["error"])) :
|
|
287
|
+
}, null, 8, ["error"])) : p("", !0)
|
|
257
288
|
]))), 128))])], 2));
|
|
258
289
|
}
|
|
259
290
|
});
|
|
260
291
|
//#endregion
|
|
261
|
-
export {
|
|
292
|
+
export { F as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matches a file against an HTML `accept` attribute value.
|
|
3
|
+
* Supports extensions (`.png`), MIME types (`image/png`), and wildcards (`image/*`).
|
|
4
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept
|
|
5
|
+
*/
|
|
6
|
+
export declare function isFileAccepted(file: File, accept: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/upload/fileAccept.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = t.split(",").map((e) => e.trim()).filter(Boolean);
|
|
4
|
+
if (!n.length) return !0;
|
|
5
|
+
let r = e.name.toLowerCase(), i = e.type.toLowerCase();
|
|
6
|
+
return n.some((e) => {
|
|
7
|
+
let t = e.toLowerCase();
|
|
8
|
+
if (t.startsWith(".")) return r.endsWith(t);
|
|
9
|
+
if (t.endsWith("/*")) {
|
|
10
|
+
let e = t.slice(0, -2);
|
|
11
|
+
return i.startsWith(`${e}/`);
|
|
12
|
+
}
|
|
13
|
+
return i === t;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as isFileAccepted };
|
|
@@ -9,7 +9,8 @@ var e = () => {}, t = Object.freeze({ size: [
|
|
|
9
9
|
e.props = () => ({ size: {
|
|
10
10
|
type: String,
|
|
11
11
|
default: "md",
|
|
12
|
-
validator: (e) => t.size.includes(e)
|
|
12
|
+
validator: (e) => t.size.includes(e),
|
|
13
|
+
description: "Control size. One of xs, sm, md, lg, xl."
|
|
13
14
|
} }), e.validators = () => ({ ...t });
|
|
14
15
|
//#endregion
|
|
15
16
|
export { e as useCommon };
|
|
@@ -37,7 +37,7 @@ function a() {
|
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
39
|
function h(e) {
|
|
40
|
-
document.removeEventListener("keydown", p), o?.disconnect(), o = null, e?.returnFocus && l && l.focus(), u = null, a.value = [], s = null, c = null, l = null;
|
|
40
|
+
typeof document < "u" && document.removeEventListener("keydown", p), o?.disconnect(), o = null, e?.returnFocus && l && l.focus(), u = null, a.value = [], s = null, c = null, l = null;
|
|
41
41
|
}
|
|
42
42
|
return t(() => {
|
|
43
43
|
h({ returnFocus: !0 });
|
|
@@ -58,28 +58,63 @@ export declare const useInputtable: {
|
|
|
58
58
|
getError: () => any;
|
|
59
59
|
};
|
|
60
60
|
emits(withListeners?: boolean): string[];
|
|
61
|
+
emitDocs(withListeners?: boolean): Record<string, string>;
|
|
62
|
+
methodDocs(): Record<string, string>;
|
|
61
63
|
props(): {
|
|
62
64
|
readonly modelValue: {
|
|
63
65
|
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
64
66
|
readonly default: undefined;
|
|
67
|
+
readonly description: "Bound value (v-model).";
|
|
68
|
+
};
|
|
69
|
+
readonly id: {
|
|
70
|
+
readonly type: StringConstructor;
|
|
71
|
+
readonly description: "Native id attribute for the input element.";
|
|
72
|
+
};
|
|
73
|
+
readonly name: {
|
|
74
|
+
readonly type: StringConstructor;
|
|
75
|
+
readonly description: "Native name attribute for form submission.";
|
|
76
|
+
};
|
|
77
|
+
readonly readonly: {
|
|
78
|
+
readonly type: BooleanConstructor;
|
|
79
|
+
readonly description: "Makes the field read-only without disabling it.";
|
|
80
|
+
};
|
|
81
|
+
readonly required: {
|
|
82
|
+
readonly type: BooleanConstructor;
|
|
83
|
+
readonly description: "Marks the field as required for validation.";
|
|
65
84
|
};
|
|
66
|
-
readonly id: StringConstructor;
|
|
67
|
-
readonly name: StringConstructor;
|
|
68
|
-
readonly readonly: BooleanConstructor;
|
|
69
|
-
readonly required: BooleanConstructor;
|
|
70
85
|
readonly validateOnInput: {
|
|
71
86
|
readonly type: BooleanConstructor;
|
|
72
87
|
readonly default: true;
|
|
88
|
+
readonly description: "Runs validation on each input event when true.";
|
|
89
|
+
};
|
|
90
|
+
readonly label: {
|
|
91
|
+
readonly type: StringConstructor;
|
|
92
|
+
readonly description: "Visible label text for the field.";
|
|
93
|
+
};
|
|
94
|
+
readonly helper: {
|
|
95
|
+
readonly type: StringConstructor;
|
|
96
|
+
readonly description: "Helper text shown below the field.";
|
|
97
|
+
};
|
|
98
|
+
readonly error: {
|
|
99
|
+
readonly type: StringConstructor;
|
|
100
|
+
readonly description: "External error message; overrides rule errors when set.";
|
|
101
|
+
};
|
|
102
|
+
readonly hideFooter: {
|
|
103
|
+
readonly type: BooleanConstructor;
|
|
104
|
+
readonly description: "Hides the footer area (helper / error).";
|
|
73
105
|
};
|
|
74
|
-
readonly label: StringConstructor;
|
|
75
|
-
readonly helper: StringConstructor;
|
|
76
|
-
readonly error: StringConstructor;
|
|
77
|
-
readonly hideFooter: BooleanConstructor;
|
|
78
106
|
readonly rules: {
|
|
79
107
|
readonly type: ArrayConstructor;
|
|
80
108
|
readonly default: () => never[];
|
|
109
|
+
readonly description: "Validation rule functions or rule descriptors.";
|
|
110
|
+
};
|
|
111
|
+
readonly tooltip: {
|
|
112
|
+
readonly type: StringConstructor;
|
|
113
|
+
readonly description: "Optional tooltip text next to the label.";
|
|
114
|
+
};
|
|
115
|
+
readonly skipFormRegistry: {
|
|
116
|
+
readonly type: BooleanConstructor;
|
|
117
|
+
readonly description: "Skips registering this field with a parent x-form.";
|
|
81
118
|
};
|
|
82
|
-
readonly tooltip: StringConstructor;
|
|
83
|
-
readonly skipFormRegistry: BooleanConstructor;
|
|
84
119
|
};
|
|
85
120
|
};
|
|
@@ -103,7 +103,16 @@ l.emits = (e = !0) => e ? [
|
|
|
103
103
|
"focus",
|
|
104
104
|
"input",
|
|
105
105
|
"change"
|
|
106
|
-
] : ["update:modelValue"], l.
|
|
106
|
+
] : ["update:modelValue"], l.emitDocs = (e = !0) => {
|
|
107
|
+
let t = { "update:modelValue": "Emitted when the bound value changes (v-model)." };
|
|
108
|
+
return e && (t.blur = "Emitted when the field loses focus.", t.focus = "Emitted when the field receives focus.", t.input = "Emitted on native input events.", t.change = "Emitted when the value is committed (change)."), t;
|
|
109
|
+
}, l.methodDocs = () => ({
|
|
110
|
+
focus: "Focus the underlying control.",
|
|
111
|
+
blur: "Remove focus from the underlying control.",
|
|
112
|
+
reset: "Reset the field value and validation state.",
|
|
113
|
+
validate: "Run validation rules and return whether the field is valid.",
|
|
114
|
+
setError: "Set an external error message on the field."
|
|
115
|
+
}), l.props = () => ({
|
|
107
116
|
modelValue: {
|
|
108
117
|
type: [
|
|
109
118
|
String,
|
|
@@ -112,26 +121,59 @@ l.emits = (e = !0) => e ? [
|
|
|
112
121
|
Object,
|
|
113
122
|
Array
|
|
114
123
|
],
|
|
115
|
-
default: void 0
|
|
124
|
+
default: void 0,
|
|
125
|
+
description: "Bound value (v-model)."
|
|
126
|
+
},
|
|
127
|
+
id: {
|
|
128
|
+
type: String,
|
|
129
|
+
description: "Native id attribute for the input element."
|
|
130
|
+
},
|
|
131
|
+
name: {
|
|
132
|
+
type: String,
|
|
133
|
+
description: "Native name attribute for form submission."
|
|
134
|
+
},
|
|
135
|
+
readonly: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
description: "Makes the field read-only without disabling it."
|
|
138
|
+
},
|
|
139
|
+
required: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
description: "Marks the field as required for validation."
|
|
116
142
|
},
|
|
117
|
-
id: String,
|
|
118
|
-
name: String,
|
|
119
|
-
readonly: Boolean,
|
|
120
|
-
required: Boolean,
|
|
121
143
|
validateOnInput: {
|
|
122
144
|
type: Boolean,
|
|
123
|
-
default: !0
|
|
145
|
+
default: !0,
|
|
146
|
+
description: "Runs validation on each input event when true."
|
|
147
|
+
},
|
|
148
|
+
label: {
|
|
149
|
+
type: String,
|
|
150
|
+
description: "Visible label text for the field."
|
|
151
|
+
},
|
|
152
|
+
helper: {
|
|
153
|
+
type: String,
|
|
154
|
+
description: "Helper text shown below the field."
|
|
155
|
+
},
|
|
156
|
+
error: {
|
|
157
|
+
type: String,
|
|
158
|
+
description: "External error message; overrides rule errors when set."
|
|
159
|
+
},
|
|
160
|
+
hideFooter: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
description: "Hides the footer area (helper / error)."
|
|
124
163
|
},
|
|
125
|
-
label: String,
|
|
126
|
-
helper: String,
|
|
127
|
-
error: String,
|
|
128
|
-
hideFooter: Boolean,
|
|
129
164
|
rules: {
|
|
130
165
|
type: Array,
|
|
131
|
-
default: () => []
|
|
166
|
+
default: () => [],
|
|
167
|
+
description: "Validation rule functions or rule descriptors."
|
|
168
|
+
},
|
|
169
|
+
tooltip: {
|
|
170
|
+
type: String,
|
|
171
|
+
description: "Optional tooltip text next to the label."
|
|
132
172
|
},
|
|
133
|
-
|
|
134
|
-
|
|
173
|
+
skipFormRegistry: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
description: "Skips registering this field with a parent x-form."
|
|
176
|
+
}
|
|
135
177
|
});
|
|
136
178
|
//#endregion
|
|
137
179
|
export { l as useInputtable };
|
|
@@ -12,12 +12,22 @@ export declare const useInteractive: {
|
|
|
12
12
|
blur: () => void | undefined;
|
|
13
13
|
};
|
|
14
14
|
props(): {
|
|
15
|
-
readonly disabled:
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
readonly disabled: {
|
|
16
|
+
readonly type: BooleanConstructor;
|
|
17
|
+
readonly description: "Disables interaction and applies disabled styling.";
|
|
18
|
+
};
|
|
19
|
+
readonly loading: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly description: "Shows a loading indicator and blocks interaction.";
|
|
22
|
+
};
|
|
23
|
+
readonly loadingLabel: {
|
|
24
|
+
readonly type: StringConstructor;
|
|
25
|
+
readonly description: "Accessible label announced while loading.";
|
|
26
|
+
};
|
|
18
27
|
readonly loadingStatus: {
|
|
19
28
|
readonly type: PropType<LoaderStatus>;
|
|
20
29
|
readonly default: "active";
|
|
30
|
+
readonly description: "Loader visual status (for example active or indeterminate).";
|
|
21
31
|
};
|
|
22
32
|
};
|
|
23
33
|
};
|