hys-ui 0.1.1 → 0.3.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/CHANGELOG.md +149 -0
- package/README.md +17 -1
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +639 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +256 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -27
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +288 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -92
- package/dist/components/HysCalendar/HysCalendar2.vue.js +815 -2
- package/dist/components/HysCard/HysCard.vue.js +2 -2
- package/dist/components/HysCard/HysCard2.vue.js +175 -42
- package/dist/components/HysCascader/HysCascader.vue.js +5 -194
- package/dist/components/HysCascader/HysCascader2.vue.js +773 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +3 -3
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +1 -1
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -216
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1019 -563
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +270 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +820 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +270 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFileManager/HysFileManager.vue.js +3 -3
- package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +578 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
- package/dist/components/HysFormItem/HysFormItem2.vue.js +528 -2
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +1380 -268
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +467 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +122 -109
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +490 -85
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
- package/dist/components/HysPagination/HysPagination.vue.js +1 -1
- package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +2 -2
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
- package/dist/components/HysSearch/HysSearch.vue.js +37 -36
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +999 -189
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +1 -1
- package/dist/components/HysSlider/HysSlider2.vue.js +536 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +170 -0
- package/dist/components/HysSteps/HysSteps.vue.js +1 -1
- package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1494 -88
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -68
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -81
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +46 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
- package/dist/components/HysTransfer/HysTransfer2.vue.js +446 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +503 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +651 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +570 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -124
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/formContext.js +92 -7
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +65 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +136 -56
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/index.js +152 -139
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +104 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +71 -20
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +120 -31
- package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +50 -39
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +84 -5
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +4 -3
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -35
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +34 -12
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +131 -22
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +69 -11
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +24 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +3 -3
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +50 -28
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysToast/HysToast.vue.d.ts +3 -3
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +4 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +107 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +109 -0
- package/dist/types/composables/avatar.d.ts +73 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +195 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +250 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/formContext.d.ts +135 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +183 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +46 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +312 -0
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/transfer.d.ts +187 -0
- package/dist/types/composables/tree.d.ts +240 -0
- package/dist/types/composables/treeSelect.d.ts +170 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +28 -6
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/index.d.ts +50 -9
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +2 -1
|
@@ -1,70 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { type HysUploadProps, type HysUploadFile, type HysUploadItem, type HysUploadSlots, type HysUploadChange, type HysUploadInvalid, type HysUploadError } from "../../composables/upload";
|
|
2
|
+
export type { HysUploadFile } from "../../composables/upload";
|
|
3
|
+
declare const __VLS_export: <T extends HysUploadItem = HysUploadFile>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<HysUploadProps<T> & {
|
|
5
|
+
onChange?: ((files: T[]) => any) | undefined;
|
|
6
|
+
"onUpdate:modelValue"?: ((files: T[]) => any) | undefined;
|
|
7
|
+
onProgress?: ((percentage: number, file: T) => any) | undefined;
|
|
8
|
+
onSelect?: ((files: File[]) => any) | undefined;
|
|
9
|
+
onSuccess?: ((response: unknown, file: T) => any) | undefined;
|
|
10
|
+
onAbort?: ((file: T, reason: string) => any) | undefined;
|
|
11
|
+
onDrop?: ((event: DragEvent) => any) | undefined;
|
|
12
|
+
onError?: ((message: string) => any) | undefined;
|
|
13
|
+
onInvalid?: ((info: HysUploadInvalid<T>) => any) | undefined;
|
|
14
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
15
|
+
onStart?: ((file: T) => any) | undefined;
|
|
16
|
+
onRemove?: ((file: T) => any) | undefined;
|
|
17
|
+
onPreview?: ((file: T) => any) | undefined;
|
|
18
|
+
onDownload?: ((file: T) => any) | undefined;
|
|
19
|
+
"onUpdate:fileList"?: ((files: T[]) => any) | undefined;
|
|
20
|
+
onFileChange?: ((change: HysUploadChange<T>) => any) | undefined;
|
|
21
|
+
onUploadError?: ((error: HysUploadError, file: T) => any) | undefined;
|
|
22
|
+
onExceed?: ((files: File[]) => any) | undefined;
|
|
23
|
+
onRemoveError?: ((error: Error, file: T) => any) | undefined;
|
|
24
|
+
}> & (typeof globalThis extends {
|
|
25
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
26
|
+
} ? P : {});
|
|
27
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
28
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
29
|
+
input: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
30
|
+
files: import("vue").ComputedRef<T[]>;
|
|
31
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
32
|
+
uploading: import("vue").ComputedRef<number>;
|
|
33
|
+
queued: import("vue").ComputedRef<number>;
|
|
34
|
+
open: (event?: Event) => void;
|
|
35
|
+
focus: () => void;
|
|
36
|
+
addFiles: (inputFiles: readonly File[]) => Promise<T[]>;
|
|
37
|
+
getFiles: () => T[];
|
|
38
|
+
clearFiles: (statuses?: readonly import("../../index.js").HysUploadStatus[]) => Promise<boolean>;
|
|
39
|
+
remove: (file: string | T) => Promise<boolean>;
|
|
40
|
+
submit: (file?: T | string) => Promise<number>;
|
|
41
|
+
retry: (file: T | string) => Promise<boolean>;
|
|
42
|
+
abort: (file?: T | string) => number;
|
|
43
|
+
preview: (file: string | T) => Promise<boolean>;
|
|
44
|
+
download: (file: string | T) => Promise<boolean>;
|
|
45
|
+
}>) => void;
|
|
46
|
+
attrs: any;
|
|
47
|
+
slots: HysUploadSlots<T>;
|
|
48
|
+
emit: ((evt: "change", files: T[]) => void) & ((evt: "update:modelValue", files: T[]) => void) & ((evt: "progress", percentage: number, file: T) => void) & ((evt: "select", files: File[]) => void) & ((evt: "success", response: unknown, file: T) => void) & ((evt: "abort", file: T, reason: string) => void) & ((evt: "drop", event: DragEvent) => void) & ((evt: "error", message: string) => void) & ((evt: "invalid", info: HysUploadInvalid<T>) => void) & ((evt: "paste", event: ClipboardEvent) => void) & ((evt: "start", file: T) => void) & ((evt: "remove", file: T) => void) & ((evt: "preview", file: T) => void) & ((evt: "download", file: T) => void) & ((evt: "update:fileList", files: T[]) => void) & ((evt: "fileChange", change: HysUploadChange<T>) => void) & ((evt: "uploadError", error: HysUploadError, file: T) => void) & ((evt: "exceed", files: File[]) => void) & ((evt: "removeError", error: Error, file: T) => void);
|
|
49
|
+
}>) => import("vue").VNode & {
|
|
50
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
16
51
|
};
|
|
17
|
-
declare const __VLS_template: () => {
|
|
18
|
-
__VLS_Slots: {
|
|
19
|
-
default?: (props: {}) => any;
|
|
20
|
-
} & {
|
|
21
|
-
file?: (props: {
|
|
22
|
-
file: {
|
|
23
|
-
uid: string;
|
|
24
|
-
name: string;
|
|
25
|
-
size: number;
|
|
26
|
-
raw: {
|
|
27
|
-
readonly lastModified: number;
|
|
28
|
-
readonly name: string;
|
|
29
|
-
readonly webkitRelativePath: string;
|
|
30
|
-
readonly size: number;
|
|
31
|
-
readonly type: string;
|
|
32
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
33
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
34
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
35
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
36
|
-
text: () => Promise<string>;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}) => any;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
43
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
44
|
-
clearFiles: () => void;
|
|
45
|
-
open: () => void;
|
|
46
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
-
change: (files: HysUploadFile[]) => any;
|
|
48
|
-
select: (files: File[]) => any;
|
|
49
|
-
error: (message: string) => any;
|
|
50
|
-
remove: (file: HysUploadFile) => any;
|
|
51
|
-
exceed: (files: File[]) => any;
|
|
52
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
53
|
-
onChange?: ((files: HysUploadFile[]) => any) | undefined;
|
|
54
|
-
onSelect?: ((files: File[]) => any) | undefined;
|
|
55
|
-
onError?: ((message: string) => any) | undefined;
|
|
56
|
-
onRemove?: ((file: HysUploadFile) => any) | undefined;
|
|
57
|
-
onExceed?: ((files: File[]) => any) | undefined;
|
|
58
|
-
}>, {
|
|
59
|
-
multiple: boolean;
|
|
60
|
-
drag: boolean;
|
|
61
|
-
showFileList: boolean;
|
|
62
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
64
52
|
declare const _default: typeof __VLS_export;
|
|
65
53
|
export default _default;
|
|
66
|
-
type
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
54
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
55
|
+
[K in keyof T]: T[K];
|
|
56
|
+
} : {
|
|
57
|
+
[K in keyof T as K]: T[K];
|
|
58
|
+
}) & {};
|
|
@@ -1,45 +1,76 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
declare const __VLS_template: () => {
|
|
20
|
-
__VLS_Slots: {
|
|
21
|
-
[x: string]: ((props: {
|
|
22
|
-
row: Row;
|
|
23
|
-
value: unknown;
|
|
1
|
+
import { type HysVirtualTableProps, type HysVirtualTableColumn, type HysVirtualTableCell, type HysVirtualTableKey, type HysVirtualTableSort, type HysVirtualTableRange, type HysVirtualTableScroll, type HysVirtualTableAlign } from "../../composables/virtualTable";
|
|
2
|
+
declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<HysVirtualTableProps<T> & {
|
|
4
|
+
onScroll?: ((state: HysVirtualTableScroll) => any) | undefined;
|
|
5
|
+
onSelectionChange?: ((keys: HysVirtualTableKey[], rows: T[]) => any) | undefined;
|
|
6
|
+
onRowClick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
7
|
+
"onUpdate:selectedRowKeys"?: ((keys: HysVirtualTableKey[]) => any) | undefined;
|
|
8
|
+
onSortChange?: ((sort: HysVirtualTableSort | null) => any) | undefined;
|
|
9
|
+
"onUpdate:currentRowKey"?: ((key: HysVirtualTableKey | null) => any) | undefined;
|
|
10
|
+
onCurrentChange?: ((row: T | null, key: HysVirtualTableKey | null) => any) | undefined;
|
|
11
|
+
onRowDblclick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
12
|
+
onCellClick?: ((context: HysVirtualTableCell<T>, event: MouseEvent) => any) | undefined;
|
|
13
|
+
"onUpdate:sortState"?: ((sort: HysVirtualTableSort | null) => any) | undefined;
|
|
14
|
+
onRangeChange?: ((range: HysVirtualTableRange) => any) | undefined;
|
|
15
|
+
onEndReached?: ((info: {
|
|
16
|
+
distance: number;
|
|
17
|
+
total: number;
|
|
24
18
|
}) => any) | undefined;
|
|
25
|
-
} & {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
}> & (typeof globalThis extends {
|
|
20
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
21
|
+
} ? P : {});
|
|
22
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
23
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
24
|
+
viewport: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
25
|
+
scrollTop: import("vue").Ref<number, number>;
|
|
26
|
+
scrollLeft: import("vue").Ref<number, number>;
|
|
27
|
+
range: import("vue").ComputedRef<HysVirtualTableRange>;
|
|
28
|
+
selectedRowKeys: import("vue").ComputedRef<HysVirtualTableKey[]>;
|
|
29
|
+
sortState: import("vue").ComputedRef<HysVirtualTableSort | null>;
|
|
30
|
+
scrollTo: (options: {
|
|
31
|
+
top?: number;
|
|
32
|
+
left?: number;
|
|
33
|
+
behavior?: ScrollBehavior;
|
|
34
|
+
}) => void;
|
|
35
|
+
scrollToRow: (index: number, align?: HysVirtualTableAlign) => void;
|
|
36
|
+
scrollToKey: (key: HysVirtualTableKey, align?: HysVirtualTableAlign) => boolean;
|
|
37
|
+
scrollToColumn: (key: string, align?: HysVirtualTableAlign) => boolean;
|
|
38
|
+
focusCell: (index: number, key?: string) => Promise<boolean>;
|
|
39
|
+
setSort: (value: HysVirtualTableSort | null) => Promise<boolean>;
|
|
40
|
+
clearSelection: () => Promise<boolean>;
|
|
41
|
+
toggleRowSelection: (key: HysVirtualTableKey, selected?: boolean) => Promise<boolean>;
|
|
42
|
+
selectAll: (selected?: boolean) => Promise<boolean>;
|
|
43
|
+
setCurrentRow: (key: HysVirtualTableKey | null) => Promise<boolean>;
|
|
44
|
+
getRow: (index: number) => T;
|
|
45
|
+
remeasure: () => void;
|
|
46
|
+
}>) => void;
|
|
47
|
+
attrs: any;
|
|
48
|
+
slots: {
|
|
49
|
+
[name: string]: ((props: any) => any) | undefined;
|
|
50
|
+
header?(props: {
|
|
51
|
+
column: HysVirtualTableColumn<T>;
|
|
52
|
+
columnIndex: number;
|
|
53
|
+
}): any;
|
|
54
|
+
cell?(props: HysVirtualTableCell<T>): any;
|
|
55
|
+
empty?(): any;
|
|
56
|
+
loading?(): any;
|
|
57
|
+
footer?(props: {
|
|
58
|
+
rows: readonly T[];
|
|
59
|
+
range: HysVirtualTableRange;
|
|
60
|
+
selectedRowKeys: HysVirtualTableKey[];
|
|
61
|
+
}): any;
|
|
31
62
|
};
|
|
63
|
+
emit: ((evt: "scroll", state: HysVirtualTableScroll) => void) & ((evt: "selectionChange", keys: HysVirtualTableKey[], rows: T[]) => void) & ((evt: "rowClick", row: T, index: number, event: MouseEvent) => void) & ((evt: "update:selectedRowKeys", keys: HysVirtualTableKey[]) => void) & ((evt: "sortChange", sort: HysVirtualTableSort | null) => void) & ((evt: "update:currentRowKey", key: HysVirtualTableKey | null) => void) & ((evt: "currentChange", row: T | null, key: HysVirtualTableKey | null) => void) & ((evt: "rowDblclick", row: T, index: number, event: MouseEvent) => void) & ((evt: "cellClick", context: HysVirtualTableCell<T>, event: MouseEvent) => void) & ((evt: "update:sortState", sort: HysVirtualTableSort | null) => void) & ((evt: "rangeChange", range: HysVirtualTableRange) => void) & ((evt: "endReached", info: {
|
|
64
|
+
distance: number;
|
|
65
|
+
total: number;
|
|
66
|
+
}) => void);
|
|
67
|
+
}>) => import("vue").VNode & {
|
|
68
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
32
69
|
};
|
|
33
|
-
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
34
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
35
|
-
height: number;
|
|
36
|
-
rowHeight: number;
|
|
37
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
70
|
declare const _default: typeof __VLS_export;
|
|
40
71
|
export default _default;
|
|
41
|
-
type
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
72
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
73
|
+
[K in keyof T]: T[K];
|
|
74
|
+
} : {
|
|
75
|
+
[K in keyof T as K]: T[K];
|
|
76
|
+
}) & {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
2
|
+
import type { Component, CSSProperties } from "vue";
|
|
3
|
+
import type { Placement } from "./useFloating";
|
|
4
|
+
import type { HysInputProps } from "./textInput";
|
|
5
|
+
export interface HysAutocompleteOption {
|
|
6
|
+
value?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export type HysAutocompleteItem = string | HysAutocompleteOption;
|
|
12
|
+
export interface HysAutocompleteGroup {
|
|
13
|
+
label: string;
|
|
14
|
+
options?: readonly HysAutocompleteDataOption[];
|
|
15
|
+
children?: readonly HysAutocompleteDataOption[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
key?: string | number;
|
|
18
|
+
type?: "group";
|
|
19
|
+
}
|
|
20
|
+
export type HysAutocompleteDataOption = HysAutocompleteItem | HysAutocompleteGroup;
|
|
21
|
+
export interface HysAutocompleteContext {
|
|
22
|
+
signal: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
export type HysAutocompleteCallback = (options: readonly HysAutocompleteDataOption[]) => void;
|
|
25
|
+
export type HysAutocompleteFetch = (query: string, callback: HysAutocompleteCallback, context: HysAutocompleteContext) => void | readonly HysAutocompleteDataOption[] | Promise<void | readonly HysAutocompleteDataOption[]>;
|
|
26
|
+
export interface HysAutocompleteProps {
|
|
27
|
+
popupTransition?: HysPopupTransition;
|
|
28
|
+
popupTransitionDuration?: number;
|
|
29
|
+
modelValue?: string;
|
|
30
|
+
defaultValue?: string;
|
|
31
|
+
options?: readonly HysAutocompleteDataOption[];
|
|
32
|
+
fetchSuggestions?: HysAutocompleteFetch | readonly HysAutocompleteDataOption[];
|
|
33
|
+
valueKey?: string;
|
|
34
|
+
labelKey?: string;
|
|
35
|
+
filterOption?: boolean | ((query: string, item: HysAutocompleteItem) => boolean);
|
|
36
|
+
caseSensitive?: boolean;
|
|
37
|
+
debounce?: number;
|
|
38
|
+
minQueryLength?: number;
|
|
39
|
+
triggerOnFocus?: boolean;
|
|
40
|
+
highlightFirst?: boolean;
|
|
41
|
+
loopNavigation?: boolean;
|
|
42
|
+
backfill?: boolean;
|
|
43
|
+
selectWhenUnmatched?: boolean;
|
|
44
|
+
selectOnTab?: boolean;
|
|
45
|
+
append?: boolean;
|
|
46
|
+
clearAfterSelect?: boolean;
|
|
47
|
+
blurAfterSelect?: boolean;
|
|
48
|
+
getShow?: (query: string) => boolean;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
readonly?: boolean;
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
hideLoading?: boolean;
|
|
53
|
+
clearable?: boolean;
|
|
54
|
+
clearIcon?: Component;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
ariaLabel?: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
status?: "error" | "warning" | "success";
|
|
60
|
+
error?: string;
|
|
61
|
+
size?: "sm" | "md" | "lg";
|
|
62
|
+
bordered?: boolean;
|
|
63
|
+
autofocus?: boolean;
|
|
64
|
+
inputProps?: Omit<HysInputProps, "modelValue" | "defaultValue">;
|
|
65
|
+
open?: boolean;
|
|
66
|
+
defaultOpen?: boolean;
|
|
67
|
+
placement?: Placement;
|
|
68
|
+
popupMatchWidth?: boolean;
|
|
69
|
+
popupWidth?: number | string;
|
|
70
|
+
popupClass?: string;
|
|
71
|
+
popupStyle?: CSSProperties;
|
|
72
|
+
appendTo?: string | HTMLElement | false;
|
|
73
|
+
listHeight?: number;
|
|
74
|
+
emptyText?: string;
|
|
75
|
+
loadingText?: string;
|
|
76
|
+
errorText?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface HysAutocompleteInstance {
|
|
79
|
+
input: HTMLInputElement | HTMLTextAreaElement | undefined;
|
|
80
|
+
isOpen: boolean;
|
|
81
|
+
loading: boolean;
|
|
82
|
+
highlightedIndex: number;
|
|
83
|
+
suggestions: readonly HysAutocompleteDataOption[];
|
|
84
|
+
focus: (options?: FocusOptions) => void;
|
|
85
|
+
blur: () => void;
|
|
86
|
+
open: () => Promise<void>;
|
|
87
|
+
close: () => void;
|
|
88
|
+
clear: () => void;
|
|
89
|
+
getData: () => Promise<void>;
|
|
90
|
+
retry: () => Promise<void>;
|
|
91
|
+
highlight: (index: number) => void;
|
|
92
|
+
select: (option: HysAutocompleteItem) => Promise<void>;
|
|
93
|
+
}
|
|
94
|
+
export interface HysAutocompleteRow {
|
|
95
|
+
key: string;
|
|
96
|
+
kind: "group" | "option";
|
|
97
|
+
label: string;
|
|
98
|
+
value: string;
|
|
99
|
+
disabled: boolean;
|
|
100
|
+
item: HysAutocompleteItem;
|
|
101
|
+
group?: HysAutocompleteGroup;
|
|
102
|
+
}
|
|
103
|
+
export declare function autocompleteValue(item: HysAutocompleteItem, key?: string, labelKey?: string): string;
|
|
104
|
+
export declare function normalizeAutocomplete(data: readonly HysAutocompleteDataOption[], query: string, settings: {
|
|
105
|
+
valueKey: string;
|
|
106
|
+
labelKey: string;
|
|
107
|
+
filter: boolean | ((query: string, item: HysAutocompleteItem) => boolean);
|
|
108
|
+
caseSensitive: boolean;
|
|
109
|
+
}): HysAutocompleteRow[];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { HysPopupTransition } from '../motion/popup';
|
|
2
|
+
import { type Component, type ComputedRef, type CSSProperties, type ImgHTMLAttributes, type InjectionKey } from "vue";
|
|
3
|
+
import type { Placement } from "./useFloating";
|
|
4
|
+
export type HysAvatarBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
5
|
+
export type HysAvatarSize = number | "sm" | "md" | "lg" | "small" | "medium" | "default" | "large" | Partial<Record<HysAvatarBreakpoint, number>>;
|
|
6
|
+
export type HysAvatarFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
7
|
+
export interface HysAvatarProps {
|
|
8
|
+
name?: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
srcset?: string;
|
|
11
|
+
srcSet?: string;
|
|
12
|
+
sizes?: string;
|
|
13
|
+
size?: HysAvatarSize;
|
|
14
|
+
shape?: "circle" | "square";
|
|
15
|
+
fit?: HysAvatarFit;
|
|
16
|
+
alt?: string;
|
|
17
|
+
icon?: Component;
|
|
18
|
+
gap?: number;
|
|
19
|
+
autoFit?: boolean;
|
|
20
|
+
color?: string;
|
|
21
|
+
textColor?: string;
|
|
22
|
+
bordered?: boolean;
|
|
23
|
+
radius?: number | string;
|
|
24
|
+
fallbackSrc?: string;
|
|
25
|
+
loadError?: (event: Event) => boolean | void;
|
|
26
|
+
draggable?: boolean;
|
|
27
|
+
crossOrigin?: "" | "anonymous" | "use-credentials";
|
|
28
|
+
lazy?: boolean;
|
|
29
|
+
imgProps?: ImgHTMLAttributes;
|
|
30
|
+
}
|
|
31
|
+
export interface HysAvatarLoadInfo {
|
|
32
|
+
src: string;
|
|
33
|
+
fallback: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface HysAvatarInstance {
|
|
36
|
+
element: HTMLElement | undefined;
|
|
37
|
+
image: HTMLImageElement | undefined;
|
|
38
|
+
loaded: boolean;
|
|
39
|
+
failed: boolean;
|
|
40
|
+
reload: () => void;
|
|
41
|
+
}
|
|
42
|
+
export interface HysAvatarOption extends HysAvatarProps {
|
|
43
|
+
key?: string | number;
|
|
44
|
+
}
|
|
45
|
+
export interface HysAvatarGroupInstance {
|
|
46
|
+
open: () => Promise<void>;
|
|
47
|
+
close: () => void;
|
|
48
|
+
}
|
|
49
|
+
export interface HysAvatarGroupProps {
|
|
50
|
+
popupTransition?: HysPopupTransition;
|
|
51
|
+
popupTransitionDuration?: number;
|
|
52
|
+
options?: readonly HysAvatarOption[];
|
|
53
|
+
size?: HysAvatarSize;
|
|
54
|
+
shape?: "circle" | "square";
|
|
55
|
+
gap?: number;
|
|
56
|
+
maxCount?: number;
|
|
57
|
+
vertical?: boolean;
|
|
58
|
+
bordered?: boolean;
|
|
59
|
+
maxStyle?: CSSProperties;
|
|
60
|
+
maxClass?: string;
|
|
61
|
+
placement?: Placement;
|
|
62
|
+
trigger?: "hover" | "focus" | "click";
|
|
63
|
+
showOverflow?: boolean;
|
|
64
|
+
expandOnHover?: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface AvatarGroupContext {
|
|
67
|
+
size: ComputedRef<HysAvatarSize | undefined>;
|
|
68
|
+
shape: ComputedRef<"circle" | "square" | undefined>;
|
|
69
|
+
bordered: ComputedRef<boolean>;
|
|
70
|
+
}
|
|
71
|
+
export declare const avatarGroupKey: InjectionKey<AvatarGroupContext>;
|
|
72
|
+
export declare function resolveAvatarSize(size: HysAvatarSize | undefined, viewport: number): number;
|
|
73
|
+
export declare function useAvatarSize(size: ComputedRef<HysAvatarSize | undefined>): ComputedRef<number>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type HysCalendarValue = string | Date;
|
|
2
|
+
export type HysCalendarMode = "month" | "year";
|
|
3
|
+
export type HysCalendarTransition = "none" | "fade" | "slide" | "slide-up" | "zoom";
|
|
4
|
+
export type HysCalendarAction = "prev-month" | "next-month" | "prev-year" | "next-year" | "today";
|
|
5
|
+
export interface CalendarEvent {
|
|
6
|
+
id: string;
|
|
7
|
+
date: string;
|
|
8
|
+
title: string;
|
|
9
|
+
end?: string;
|
|
10
|
+
time?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface HysCalendarSelectInfo {
|
|
16
|
+
source: "date" | "month" | "keyboard" | "customize";
|
|
17
|
+
}
|
|
18
|
+
export interface HysCalendarCell {
|
|
19
|
+
day: string;
|
|
20
|
+
date: Date;
|
|
21
|
+
type: "prev-month" | "current-month" | "next-month";
|
|
22
|
+
isSelected: boolean;
|
|
23
|
+
isToday: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
events: CalendarEvent[];
|
|
26
|
+
}
|
|
27
|
+
export interface HysCalendarMonthCell {
|
|
28
|
+
month: number;
|
|
29
|
+
date: Date;
|
|
30
|
+
day: string;
|
|
31
|
+
isSelected: boolean;
|
|
32
|
+
isToday: boolean;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
events: CalendarEvent[];
|
|
35
|
+
}
|
|
36
|
+
export interface HysCalendarInstance<T extends HysCalendarValue = string> {
|
|
37
|
+
readonly element: HTMLElement | undefined;
|
|
38
|
+
readonly selectedDay: T | undefined;
|
|
39
|
+
readonly panelValue: T;
|
|
40
|
+
readonly currentMode: HysCalendarMode;
|
|
41
|
+
readonly visibleRange: readonly [string, string];
|
|
42
|
+
pickDay: (value: HysCalendarValue) => Promise<boolean>;
|
|
43
|
+
selectDate: (action: HysCalendarAction) => boolean;
|
|
44
|
+
showMonth: (value: HysCalendarValue) => boolean;
|
|
45
|
+
setMode: (mode: HysCalendarMode) => boolean;
|
|
46
|
+
focus: () => Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export declare function calendarDay(value: HysCalendarValue | undefined, format?: string): number | undefined;
|
|
49
|
+
export declare function civilDay(y: number, m: number, d: number): number;
|
|
50
|
+
export declare function calendarParts(day: number): {
|
|
51
|
+
year: number;
|
|
52
|
+
month: number;
|
|
53
|
+
day: number;
|
|
54
|
+
weekday: number;
|
|
55
|
+
};
|
|
56
|
+
export declare function calendarISO(day: number): string;
|
|
57
|
+
export declare function calendarDate(day: number): Date;
|
|
58
|
+
export declare function calendarFormat(day: number, format: string): string;
|
|
59
|
+
export declare function calendarShift(day: number, months: number): number;
|
|
60
|
+
export declare function calendarWeeks(start: number, end: number, first: number): [number, number];
|
|
61
|
+
export declare function calendarWeek(day: number): number;
|
|
62
|
+
/** Index only the bounded visible window, including intersecting multi-day events. */
|
|
63
|
+
export declare function calendarEvents(events: readonly CalendarEvent[], start: number, end: number): {
|
|
64
|
+
dates: Map<number, CalendarEvent[]>;
|
|
65
|
+
months: Map<number, CalendarEvent[]>;
|
|
66
|
+
};
|