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,101 +1,506 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as oe, useSlots as le, useAttrs as ie, ref as ne, useId as re, computed as h, mergeProps as B, openBlock as n, createBlock as C, Teleport as de, createVNode as g, Transition as se, normalizeProps as y, guardReactiveProps as m, withCtx as w, unref as a, withDirectives as j, createElementBlock as u, createElementVNode as c, toDisplayString as v, createCommentVNode as s, normalizeStyle as z, normalizeClass as T, renderSlot as b, resolveDynamicComponent as D, createTextVNode as F, vShow as p, withModifiers as ue } from "vue";
|
|
2
|
+
import { Info as q, CircleHelp as ce, CircleX as ye, TriangleAlert as me, CircleCheck as fe, GripHorizontal as he, GripVertical as N, Minimize2 as ge, Maximize2 as ve, X as be, LoaderCircle as ke } from "lucide-vue-next";
|
|
3
|
+
import R from "../HysButton/HysButton.vue.js";
|
|
4
|
+
import { useHysRootAttrs as Be } from "../../config.js";
|
|
5
|
+
import { useModal as Ce } from "../../composables/useModal.js";
|
|
6
|
+
import { modalLength as k, modalWidth as we } from "../../composables/modal.js";
|
|
7
|
+
const ze = ["role", "aria-modal", "aria-label", "aria-labelledby", "aria-describedby", "aria-busy"], xe = { class: "hys-ui-modal-title-wrap" }, Se = {
|
|
8
|
+
class: "hys-ui-modal-head-actions",
|
|
9
|
+
"data-hys-modal-no-drag": ""
|
|
10
|
+
}, Pe = ["aria-label", "title", "aria-pressed"], He = ["aria-label", "disabled"], Te = {
|
|
6
11
|
key: 0,
|
|
7
|
-
class: "hys-ui-
|
|
8
|
-
|
|
12
|
+
class: "hys-ui-modal-loading",
|
|
13
|
+
role: "status"
|
|
14
|
+
}, De = { class: "hys-ui-modal-content" }, Fe = ["data-type"], Ae = { class: "hys-ui-modal-content-main" }, Oe = {
|
|
15
|
+
key: 1,
|
|
16
|
+
role: "alert",
|
|
17
|
+
class: "hys-ui-modal-error"
|
|
18
|
+
}, Ve = /* @__PURE__ */ oe({
|
|
19
|
+
inheritAttrs: !1,
|
|
9
20
|
__name: "HysModal",
|
|
10
21
|
props: {
|
|
11
|
-
open: { type: Boolean },
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
open: { type: Boolean, default: void 0 },
|
|
23
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
24
|
+
defaultOpen: { type: Boolean },
|
|
25
|
+
title: { default: "" },
|
|
26
|
+
description: {},
|
|
27
|
+
type: { default: "default" },
|
|
28
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
29
|
+
opacity: {},
|
|
30
|
+
maskOpacity: {},
|
|
31
|
+
icon: {},
|
|
32
|
+
width: {},
|
|
33
|
+
height: {},
|
|
34
|
+
maxHeight: {},
|
|
35
|
+
minWidth: {},
|
|
36
|
+
minHeight: {},
|
|
37
|
+
maxWidth: {},
|
|
38
|
+
size: { default: "md" },
|
|
39
|
+
centered: { type: Boolean, default: !0 },
|
|
40
|
+
top: {},
|
|
41
|
+
center: { type: Boolean },
|
|
42
|
+
fullscreen: { type: Boolean, default: void 0 },
|
|
43
|
+
defaultFullscreen: { type: Boolean },
|
|
44
|
+
showFullscreen: { type: Boolean },
|
|
14
45
|
closeOnMask: { type: Boolean, default: !0 },
|
|
15
46
|
closeOnEscape: { type: Boolean, default: !0 },
|
|
16
47
|
showClose: { type: Boolean, default: !0 },
|
|
17
48
|
destroyOnClose: { type: Boolean, default: !0 },
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
49
|
+
forceRender: { type: Boolean },
|
|
50
|
+
modal: { type: Boolean, default: !0 },
|
|
51
|
+
modalPenetrable: { type: Boolean },
|
|
52
|
+
appendTo: { type: [String, Object, Boolean], default: "body" },
|
|
53
|
+
lockScroll: { type: Boolean, default: void 0 },
|
|
54
|
+
trapFocus: { type: Boolean, default: void 0 },
|
|
55
|
+
restoreFocus: { type: Boolean, default: !0 },
|
|
56
|
+
initialFocus: { type: [String, Boolean, Object], default: "auto" },
|
|
57
|
+
openDelay: {},
|
|
58
|
+
closeDelay: {},
|
|
59
|
+
transition: { type: [String, Object, Boolean], default: "scale" },
|
|
60
|
+
transitionDuration: {},
|
|
61
|
+
zIndex: {},
|
|
62
|
+
headerClass: {},
|
|
63
|
+
headerSize: { default: "md" },
|
|
64
|
+
footerSize: { default: "md" },
|
|
65
|
+
headerHeight: {},
|
|
66
|
+
footerHeight: {},
|
|
67
|
+
titleFontSize: {},
|
|
68
|
+
bodyClass: {},
|
|
69
|
+
footerClass: {},
|
|
70
|
+
overlayClass: {},
|
|
71
|
+
modalClass: {},
|
|
72
|
+
headerStyle: {},
|
|
73
|
+
bodyStyle: {},
|
|
74
|
+
footerStyle: {},
|
|
75
|
+
maskStyle: {},
|
|
76
|
+
modalStyle: {},
|
|
77
|
+
ariaLabel: {},
|
|
78
|
+
ariaLabelledby: {},
|
|
79
|
+
ariaDescribedby: {},
|
|
80
|
+
role: {},
|
|
81
|
+
headerAriaLevel: { default: 2 },
|
|
82
|
+
closeText: { default: "关闭" },
|
|
83
|
+
fullscreenText: { default: "全屏" },
|
|
84
|
+
restoreText: { default: "还原" },
|
|
85
|
+
footer: { type: Boolean, default: void 0 },
|
|
86
|
+
footerAlign: {},
|
|
87
|
+
showCancel: { type: Boolean, default: !0 },
|
|
88
|
+
okText: { default: "确定" },
|
|
89
|
+
cancelText: { default: "取消" },
|
|
90
|
+
okVariant: {},
|
|
91
|
+
okButtonProps: {},
|
|
92
|
+
cancelButtonProps: {},
|
|
93
|
+
confirmLoading: { type: Boolean },
|
|
94
|
+
confirmDisabled: { type: Boolean },
|
|
95
|
+
cancelDisabled: { type: Boolean },
|
|
96
|
+
closeWhileConfirming: { type: Boolean },
|
|
97
|
+
loading: { type: Boolean },
|
|
98
|
+
loadingText: { default: "正在加载…" },
|
|
99
|
+
showError: { type: Boolean, default: !0 },
|
|
100
|
+
errorText: {},
|
|
101
|
+
confirmOnCtrlEnter: { type: Boolean },
|
|
102
|
+
closeOnConfirm: { type: Boolean, default: !0 },
|
|
103
|
+
beforeClose: {},
|
|
104
|
+
beforeConfirm: {},
|
|
105
|
+
draggable: { type: Boolean },
|
|
106
|
+
dragHandlePosition: { default: "center" },
|
|
107
|
+
dragMode: { default: "live" },
|
|
108
|
+
dragThreshold: { default: 6 },
|
|
109
|
+
dragEffect: { default: "lift" },
|
|
110
|
+
overflow: { type: Boolean },
|
|
111
|
+
keepHandleVisible: { type: Boolean, default: !0 },
|
|
112
|
+
resizable: { type: Boolean },
|
|
113
|
+
resetPositionOnClose: { type: Boolean, default: !0 },
|
|
114
|
+
resetSizeOnClose: { type: Boolean, default: !0 },
|
|
115
|
+
placement: {}
|
|
21
116
|
},
|
|
22
|
-
emits: ["close", "closeError"],
|
|
23
|
-
setup(e, { expose:
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
117
|
+
emits: ["update:open", "update:modelValue", "update:fullscreen", "open", "opened", "close", "closed", "afterClose", "visibleChange", "fullscreenChange", "ok", "cancel", "closeError", "confirmError", "openAutoFocus", "closeAutoFocus", "dragStart", "drag", "dragEnd", "resizeStart", "resize", "resizeEnd"],
|
|
118
|
+
setup(e, { expose: G, emit: U }) {
|
|
119
|
+
const l = e, X = U, J = le(), Q = ie(), A = Be(), x = ne(), O = re(), S = O + "-title", P = O + "-description", t = Ce(
|
|
120
|
+
l,
|
|
121
|
+
x,
|
|
122
|
+
(d, ...o) => X(d, ...o)
|
|
123
|
+
), r = t.fullscreen, f = h(() => ({
|
|
124
|
+
close: t.requestClose,
|
|
125
|
+
cancel: t.cancel,
|
|
126
|
+
confirm: t.confirm,
|
|
127
|
+
closing: t.closing.value,
|
|
128
|
+
confirming: t.confirming.value,
|
|
129
|
+
busy: t.busy.value,
|
|
130
|
+
error: t.error.value,
|
|
131
|
+
titleId: S,
|
|
132
|
+
descriptionId: P,
|
|
133
|
+
fullscreen: r.value,
|
|
134
|
+
toggleFullscreen: t.toggleFullscreen
|
|
135
|
+
})), Y = h(
|
|
136
|
+
() => l.footer !== !1 && (l.footer === !0 || !!J.footer)
|
|
137
|
+
), Z = h(
|
|
138
|
+
() => Math.max(1, Math.min(6, Math.trunc(l.headerAriaLevel)))
|
|
139
|
+
), _ = h(() => {
|
|
140
|
+
var d, o;
|
|
141
|
+
return {
|
|
142
|
+
...l.modalStyle,
|
|
143
|
+
...l.opacity !== void 0 ? {
|
|
144
|
+
"--hys-ui-modal-opacity": t.alpha(l.opacity) * 100 + "%",
|
|
145
|
+
background: `color-mix(in srgb,var(--hys-ui-surface,var(--hys-ui-theme-surface)) ${t.alpha(l.opacity) * 100}%,transparent)`
|
|
146
|
+
} : {},
|
|
147
|
+
width: r.value ? "100%" : k(
|
|
148
|
+
((d = t.interaction.dimensions.value) == null ? void 0 : d.width) ?? we(l)
|
|
149
|
+
),
|
|
150
|
+
height: r.value ? "100dvh" : k(((o = t.interaction.dimensions.value) == null ? void 0 : o.height) ?? l.height),
|
|
151
|
+
maxWidth: r.value ? "100%" : l.maxWidth ? `min(${l.maxWidth}px,100%)` : "100%",
|
|
152
|
+
maxHeight: r.value ? "100dvh" : k(l.maxHeight) ?? "calc(100dvh - 36px)",
|
|
153
|
+
"--hys-ui-modal-x": t.interaction.position.value.x + "px",
|
|
154
|
+
"--hys-ui-modal-y": t.interaction.position.value.y + "px"
|
|
155
|
+
};
|
|
156
|
+
}), ee = h(() => ({
|
|
157
|
+
...l.maskStyle,
|
|
158
|
+
...l.modal !== !1 && l.maskOpacity !== void 0 ? {
|
|
159
|
+
"--hys-ui-modal-mask-opacity": t.alpha(l.maskOpacity) * 100 + "%",
|
|
160
|
+
background: `color-mix(in srgb,#0b183d ${t.alpha(l.maskOpacity) * 100}%,transparent)`
|
|
161
|
+
} : {},
|
|
162
|
+
zIndex: t.state.zIndex.value,
|
|
163
|
+
...l.centered === !1 && !r.value ? { alignItems: "flex-start", paddingTop: k(l.top) ?? "15vh" } : {},
|
|
164
|
+
...l.transitionDuration !== void 0 ? {
|
|
165
|
+
"--hys-ui-modal-duration": Math.max(0, Math.min(5e3, l.transitionDuration)) + "ms"
|
|
166
|
+
} : {}
|
|
167
|
+
})), te = h(() => {
|
|
168
|
+
const d = typeof l.transition == "object" ? l.transition : {
|
|
169
|
+
name: typeof l.transition == "string" ? l.transition : void 0
|
|
170
|
+
}, o = d.name ?? "hys-ui-modal-motion";
|
|
171
|
+
return B(
|
|
172
|
+
{ ...d },
|
|
173
|
+
{
|
|
174
|
+
name: ["fade", "scale", "slide"].includes(o) ? "hys-ui-modal-" + o : o,
|
|
175
|
+
appear: !0,
|
|
176
|
+
css: t.motion.value && d.css !== !1,
|
|
177
|
+
...l.transitionDuration !== void 0 ? { duration: Math.max(0, Math.min(5e3, l.transitionDuration)) } : {},
|
|
178
|
+
onAfterEnter: t.afterEnter,
|
|
179
|
+
onAfterLeave: t.afterLeave
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}), ae = h(
|
|
183
|
+
() => l.icon ?? {
|
|
184
|
+
info: q,
|
|
185
|
+
success: fe,
|
|
186
|
+
warning: me,
|
|
187
|
+
error: ye,
|
|
188
|
+
confirm: ce,
|
|
189
|
+
default: q
|
|
190
|
+
}[l.type]
|
|
191
|
+
);
|
|
192
|
+
function H() {
|
|
193
|
+
l.draggable && t.interaction.resetPosition();
|
|
30
194
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
195
|
+
return G({
|
|
196
|
+
element: x,
|
|
197
|
+
open: t.shown,
|
|
198
|
+
closing: t.closing,
|
|
199
|
+
confirming: t.confirming,
|
|
200
|
+
fullscreen: r,
|
|
201
|
+
get position() {
|
|
202
|
+
return t.interaction.getPosition();
|
|
203
|
+
},
|
|
204
|
+
get dimensions() {
|
|
205
|
+
return t.interaction.getDimensions();
|
|
206
|
+
},
|
|
207
|
+
show: t.show,
|
|
208
|
+
hide: () => t.requestClose("api"),
|
|
209
|
+
close: t.requestClose,
|
|
210
|
+
handleOpen: t.show,
|
|
211
|
+
handleClose: () => t.requestClose("api"),
|
|
212
|
+
confirm: t.confirm,
|
|
213
|
+
cancel: t.cancel,
|
|
214
|
+
focus: t.state.focus,
|
|
215
|
+
toggleFullscreen: t.toggleFullscreen,
|
|
216
|
+
setFullscreen: t.setFullscreen,
|
|
217
|
+
resetPosition: t.interaction.resetPosition,
|
|
218
|
+
resetSize: t.interaction.resetSize,
|
|
219
|
+
setPosition: t.interaction.setPosition,
|
|
220
|
+
setSize: t.interaction.setSize
|
|
221
|
+
}), (d, o) => (n(), C(de, {
|
|
222
|
+
to: e.appendTo || "body",
|
|
223
|
+
disabled: e.appendTo === !1
|
|
224
|
+
}, [
|
|
225
|
+
g(se, y(m(te.value)), {
|
|
226
|
+
default: w(() => {
|
|
227
|
+
var E, M;
|
|
228
|
+
return [
|
|
229
|
+
a(t).state.active.value && (e.forceRender || a(t).rendered.value) ? j((n(), u("div", B({ key: 0 }, a(A), {
|
|
230
|
+
class: ["hys-ui-overlay hys-ui-modal-overlay", [
|
|
231
|
+
e.overlayClass,
|
|
232
|
+
{
|
|
233
|
+
"hys-ui-modal-fullscreen": a(r),
|
|
234
|
+
"hys-ui-modal-no-mask": l.modal === !1,
|
|
235
|
+
"hys-ui-modal-penetrable": l.modal === !1 && e.modalPenetrable,
|
|
236
|
+
"hys-ui-modal-center": e.center,
|
|
237
|
+
"hys-ui-modal-allow-overflow": e.overflow
|
|
238
|
+
}
|
|
239
|
+
]],
|
|
240
|
+
style: ee.value,
|
|
241
|
+
onPointerdown: o[11] || (o[11] = //@ts-ignore
|
|
242
|
+
(...i) => a(t).maskDown && a(t).maskDown(...i)),
|
|
243
|
+
onPointerup: o[12] || (o[12] = //@ts-ignore
|
|
244
|
+
(...i) => a(t).maskUp && a(t).maskUp(...i))
|
|
245
|
+
}), [
|
|
246
|
+
a(t).interaction.previewing.value ? (n(), u("div", {
|
|
247
|
+
key: 0,
|
|
248
|
+
ref: (i) => a(t).interaction.previewLayer.value = i,
|
|
249
|
+
class: "hys-ui-modal-drag-preview",
|
|
250
|
+
"aria-hidden": "true"
|
|
251
|
+
}, [
|
|
252
|
+
c("span", null, v(e.title || "移动位置"), 1)
|
|
253
|
+
], 512)) : s("", !0),
|
|
254
|
+
c("section", B({
|
|
255
|
+
ref_key: "dialog",
|
|
256
|
+
ref: x
|
|
257
|
+
}, { ...a(A), ...a(Q) }, {
|
|
258
|
+
tabindex: "-1",
|
|
259
|
+
class: ["hys-ui-modal", [
|
|
260
|
+
e.modalClass,
|
|
261
|
+
"hys-ui-modal-" + (e.size ?? "md"),
|
|
262
|
+
"hys-ui-modal-drag-effect-" + e.dragEffect,
|
|
263
|
+
{
|
|
264
|
+
"hys-ui-modal-dragging": a(t).interaction.dragging.value,
|
|
265
|
+
"hys-ui-modal-resizing": a(t).interaction.resizing.value,
|
|
266
|
+
"hys-ui-modal-preview-origin": a(t).interaction.previewing.value
|
|
267
|
+
}
|
|
268
|
+
]],
|
|
269
|
+
role: e.role ?? "dialog",
|
|
270
|
+
"aria-modal": l.modal === !1 && e.modalPenetrable ? void 0 : !0,
|
|
271
|
+
"aria-label": e.ariaLabel || e.title || "对话框",
|
|
272
|
+
"aria-labelledby": e.ariaLabelledby || (e.title || d.$slots.header ? S : void 0),
|
|
273
|
+
"aria-describedby": e.ariaDescribedby || (e.description ? P : void 0),
|
|
274
|
+
"aria-busy": a(t).busy.value || void 0,
|
|
275
|
+
style: _.value,
|
|
276
|
+
onKeydown: o[10] || (o[10] = //@ts-ignore
|
|
277
|
+
(...i) => a(t).key && a(t).key(...i))
|
|
278
|
+
}), [
|
|
279
|
+
e.title || d.$slots.header || e.showClose || e.showFullscreen || e.draggable ? (n(), u("header", {
|
|
70
280
|
key: 0,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
281
|
+
class: T(["hys-ui-dialog-head", [
|
|
282
|
+
e.headerClass,
|
|
283
|
+
"hys-ui-modal-header-" + (e.headerSize ?? "md"),
|
|
284
|
+
{
|
|
285
|
+
"hys-ui-modal-header-with-center-grip": e.draggable && !a(r) && e.dragHandlePosition === "center"
|
|
286
|
+
}
|
|
287
|
+
]]),
|
|
288
|
+
style: z({
|
|
289
|
+
...e.headerStyle,
|
|
290
|
+
minHeight: a(k)(e.headerHeight) ?? ((E = e.headerStyle) == null ? void 0 : E.minHeight)
|
|
291
|
+
})
|
|
292
|
+
}, [
|
|
293
|
+
e.draggable && !a(r) && e.dragHandlePosition === "center" ? (n(), u("button", {
|
|
294
|
+
key: 0,
|
|
295
|
+
type: "button",
|
|
296
|
+
class: "hys-ui-modal-drag-handle hys-ui-modal-drag-handle-center",
|
|
297
|
+
"data-hys-modal-drag-handle": "",
|
|
298
|
+
"aria-label": "移动弹窗",
|
|
299
|
+
title: "拖动移动弹窗;双击复位,Alt 加方向键微调",
|
|
300
|
+
onPointerdown: o[0] || (o[0] = (i) => a(t).interaction.start(i, "drag")),
|
|
301
|
+
onKeydown: o[1] || (o[1] = //@ts-ignore
|
|
302
|
+
(...i) => a(t).interaction.headerKey && a(t).interaction.headerKey(...i)),
|
|
303
|
+
onDblclick: H
|
|
304
|
+
}, [
|
|
305
|
+
g(a(he), {
|
|
306
|
+
size: 18,
|
|
307
|
+
"aria-hidden": "true"
|
|
308
|
+
})
|
|
309
|
+
], 32)) : s("", !0),
|
|
310
|
+
c("div", xe, [
|
|
311
|
+
e.draggable && !a(r) && ["left", "both"].includes(e.dragHandlePosition) ? (n(), u("button", {
|
|
312
|
+
key: 0,
|
|
313
|
+
type: "button",
|
|
314
|
+
class: "hys-ui-modal-drag-handle",
|
|
315
|
+
"data-hys-modal-drag-handle": "",
|
|
316
|
+
"aria-label": "移动弹窗",
|
|
317
|
+
title: "拖动移动弹窗;双击复位,Alt 加方向键微调",
|
|
318
|
+
onPointerdown: o[2] || (o[2] = (i) => a(t).interaction.start(i, "drag")),
|
|
319
|
+
onKeydown: o[3] || (o[3] = //@ts-ignore
|
|
320
|
+
(...i) => a(t).interaction.headerKey && a(t).interaction.headerKey(...i)),
|
|
321
|
+
onDblclick: H
|
|
322
|
+
}, [
|
|
323
|
+
g(a(N), {
|
|
324
|
+
size: 16,
|
|
325
|
+
"aria-hidden": "true"
|
|
326
|
+
})
|
|
327
|
+
], 32)) : s("", !0),
|
|
328
|
+
b(d.$slots, "header", y(m(f.value)), () => [
|
|
329
|
+
(n(), C(D("h" + Z.value), {
|
|
330
|
+
id: S,
|
|
331
|
+
class: "hys-ui-modal-title",
|
|
332
|
+
style: z({ fontSize: a(k)(e.titleFontSize) })
|
|
333
|
+
}, {
|
|
334
|
+
default: w(() => [
|
|
335
|
+
F(v(e.title), 1)
|
|
336
|
+
]),
|
|
337
|
+
_: 1
|
|
338
|
+
}, 8, ["style"]))
|
|
339
|
+
], !0)
|
|
340
|
+
]),
|
|
341
|
+
c("div", Se, [
|
|
342
|
+
e.draggable && !a(r) && ["right", "both"].includes(e.dragHandlePosition) ? (n(), u("button", {
|
|
343
|
+
key: 0,
|
|
344
|
+
type: "button",
|
|
345
|
+
class: "hys-ui-modal-drag-handle",
|
|
346
|
+
"data-hys-modal-drag-handle": "",
|
|
347
|
+
"aria-label": "从右侧移动弹窗",
|
|
348
|
+
title: "从右侧拖动;双击复位,Alt 加方向键微调",
|
|
349
|
+
onPointerdown: o[4] || (o[4] = (i) => a(t).interaction.start(i, "drag")),
|
|
350
|
+
onKeydown: o[5] || (o[5] = //@ts-ignore
|
|
351
|
+
(...i) => a(t).interaction.headerKey && a(t).interaction.headerKey(...i)),
|
|
352
|
+
onDblclick: H
|
|
353
|
+
}, [
|
|
354
|
+
g(a(N), {
|
|
355
|
+
size: 16,
|
|
356
|
+
"aria-hidden": "true"
|
|
357
|
+
})
|
|
358
|
+
], 32)) : s("", !0),
|
|
359
|
+
e.showFullscreen ? (n(), u("button", {
|
|
360
|
+
key: 1,
|
|
361
|
+
type: "button",
|
|
362
|
+
class: "hys-ui-icon-action",
|
|
363
|
+
"aria-label": a(r) ? e.restoreText : e.fullscreenText,
|
|
364
|
+
title: a(r) ? e.restoreText : e.fullscreenText,
|
|
365
|
+
"aria-pressed": a(r),
|
|
366
|
+
onClick: o[6] || (o[6] = //@ts-ignore
|
|
367
|
+
(...i) => a(t).toggleFullscreen && a(t).toggleFullscreen(...i))
|
|
368
|
+
}, [
|
|
369
|
+
b(d.$slots, "fullscreen-icon", y(m(f.value)), () => [
|
|
370
|
+
(n(), C(D(a(r) ? a(ge) : a(ve)), { size: 16 }))
|
|
371
|
+
], !0)
|
|
372
|
+
], 8, Pe)) : s("", !0),
|
|
373
|
+
e.showClose ? (n(), u("button", {
|
|
374
|
+
key: 2,
|
|
375
|
+
type: "button",
|
|
376
|
+
class: "hys-ui-icon-action",
|
|
377
|
+
"aria-label": e.closeText,
|
|
378
|
+
disabled: a(t).closing.value || a(t).confirming.value && !e.closeWhileConfirming,
|
|
379
|
+
onClick: o[7] || (o[7] = (i) => a(t).requestClose("button", i))
|
|
380
|
+
}, [
|
|
381
|
+
b(d.$slots, "close-icon", y(m(f.value)), () => [
|
|
382
|
+
g(a(be), { size: 18 })
|
|
383
|
+
], !0)
|
|
384
|
+
], 8, He)) : s("", !0)
|
|
385
|
+
])
|
|
386
|
+
], 6)) : s("", !0),
|
|
387
|
+
c("div", {
|
|
388
|
+
class: T(["hys-ui-dialog-body", e.bodyClass]),
|
|
389
|
+
style: z(e.bodyStyle)
|
|
76
390
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
391
|
+
e.loading ? (n(), u("div", Te, [
|
|
392
|
+
b(d.$slots, "loading", y(m(f.value)), () => [
|
|
393
|
+
g(a(ke), {
|
|
394
|
+
size: 23,
|
|
395
|
+
class: "hys-ui-modal-spinner"
|
|
396
|
+
}),
|
|
397
|
+
c("span", null, v(e.loadingText), 1)
|
|
398
|
+
], !0)
|
|
399
|
+
])) : s("", !0),
|
|
400
|
+
j(c("div", De, [
|
|
401
|
+
e.showIcon ?? e.type !== "default" ? (n(), u("span", {
|
|
402
|
+
key: 0,
|
|
403
|
+
class: "hys-ui-modal-type-icon",
|
|
404
|
+
"data-type": e.type,
|
|
405
|
+
"aria-hidden": "true"
|
|
406
|
+
}, [
|
|
407
|
+
b(d.$slots, "icon", y(m(f.value)), () => [
|
|
408
|
+
(n(), C(D(ae.value), { size: 24 }))
|
|
409
|
+
], !0)
|
|
410
|
+
], 8, Fe)) : s("", !0),
|
|
411
|
+
c("div", Ae, [
|
|
412
|
+
e.description ? (n(), u("p", {
|
|
413
|
+
key: 0,
|
|
414
|
+
id: P,
|
|
415
|
+
class: "hys-ui-modal-description"
|
|
416
|
+
}, v(e.description), 1)) : s("", !0),
|
|
417
|
+
b(d.$slots, "default", y(m(f.value)), void 0, !0)
|
|
418
|
+
])
|
|
419
|
+
], 512), [
|
|
420
|
+
[p, !e.loading]
|
|
421
|
+
]),
|
|
422
|
+
e.showError && a(t).error.value ? (n(), u("p", Oe, v(a(t).error.value), 1)) : s("", !0)
|
|
423
|
+
], 6),
|
|
424
|
+
Y.value ? (n(), u("footer", {
|
|
425
|
+
key: 1,
|
|
426
|
+
class: T(["hys-ui-dialog-foot", [
|
|
427
|
+
e.footerClass,
|
|
428
|
+
"hys-ui-modal-footer-" + (e.footerSize ?? "md")
|
|
429
|
+
]]),
|
|
430
|
+
style: z({
|
|
431
|
+
...e.footerStyle,
|
|
432
|
+
minHeight: a(k)(e.footerHeight) ?? ((M = e.footerStyle) == null ? void 0 : M.minHeight),
|
|
433
|
+
justifyContent: e.footerAlign === "start" ? "flex-start" : e.footerAlign === "center" || e.center ? "center" : "flex-end",
|
|
434
|
+
paddingInlineEnd: e.resizable && !a(r) ? "38px" : void 0
|
|
435
|
+
})
|
|
436
|
+
}, [
|
|
437
|
+
b(d.$slots, "footer", y(m(f.value)), () => {
|
|
438
|
+
var i, K, L, $, I, V, W;
|
|
439
|
+
return [
|
|
440
|
+
e.showCancel ? (n(), C(R, B({ key: 0 }, e.cancelButtonProps, {
|
|
441
|
+
"data-hys-modal-cancel": "",
|
|
442
|
+
variant: ((i = e.cancelButtonProps) == null ? void 0 : i.variant) ?? "secondary",
|
|
443
|
+
size: ((K = e.cancelButtonProps) == null ? void 0 : K.size) ?? e.footerSize ?? "md",
|
|
444
|
+
disabled: e.cancelDisabled || ((L = e.cancelButtonProps) == null ? void 0 : L.disabled) || a(t).closing.value || a(t).confirming.value && !e.closeWhileConfirming,
|
|
445
|
+
onClick: a(t).cancel
|
|
446
|
+
}), {
|
|
447
|
+
default: w(() => [
|
|
448
|
+
F(v(e.cancelText), 1)
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 16, ["variant", "size", "disabled", "onClick"])) : s("", !0),
|
|
452
|
+
g(R, B(e.okButtonProps, {
|
|
453
|
+
"data-hys-modal-confirm": "",
|
|
454
|
+
variant: (($ = e.okButtonProps) == null ? void 0 : $.variant) ?? e.okVariant ?? "primary",
|
|
455
|
+
size: ((I = e.okButtonProps) == null ? void 0 : I.size) ?? e.footerSize ?? "md",
|
|
456
|
+
loading: a(t).confirming.value || ((V = e.okButtonProps) == null ? void 0 : V.loading),
|
|
457
|
+
disabled: e.confirmDisabled || ((W = e.okButtonProps) == null ? void 0 : W.disabled) || a(t).closing.value || e.loading,
|
|
458
|
+
onClick: a(t).confirm
|
|
459
|
+
}), {
|
|
460
|
+
default: w(() => [
|
|
461
|
+
F(v(e.okText), 1)
|
|
462
|
+
]),
|
|
463
|
+
_: 1
|
|
464
|
+
}, 16, ["variant", "size", "loading", "disabled", "onClick"])
|
|
465
|
+
];
|
|
466
|
+
}, !0)
|
|
467
|
+
], 6)) : s("", !0),
|
|
468
|
+
e.resizable && !a(r) ? (n(), u("button", {
|
|
469
|
+
key: 2,
|
|
470
|
+
type: "button",
|
|
471
|
+
class: "hys-ui-modal-resize-handle",
|
|
472
|
+
"aria-label": "调整弹窗尺寸",
|
|
473
|
+
title: "拖拽调整尺寸;方向键微调,Home 恢复",
|
|
474
|
+
onPointerdown: o[8] || (o[8] = ue((i) => a(t).interaction.start(i, "resize"), ["stop"])),
|
|
475
|
+
onKeydown: o[9] || (o[9] = //@ts-ignore
|
|
476
|
+
(...i) => a(t).interaction.resizeKey && a(t).interaction.resizeKey(...i))
|
|
477
|
+
}, [...o[13] || (o[13] = [
|
|
478
|
+
c("svg", {
|
|
479
|
+
width: "17",
|
|
480
|
+
height: "17",
|
|
481
|
+
viewBox: "0 0 20 20",
|
|
482
|
+
fill: "none",
|
|
483
|
+
"aria-hidden": "true"
|
|
484
|
+
}, [
|
|
485
|
+
c("path", {
|
|
486
|
+
d: "m5 16 11-11m-6 11 6-6m-1 6 1-1",
|
|
487
|
+
stroke: "currentColor",
|
|
488
|
+
"stroke-width": "1.7",
|
|
489
|
+
"stroke-linecap": "round"
|
|
490
|
+
})
|
|
491
|
+
], -1)
|
|
492
|
+
])], 32)) : s("", !0)
|
|
493
|
+
], 16, ze)
|
|
494
|
+
], 16)), [
|
|
495
|
+
[p, a(t).shown.value]
|
|
496
|
+
]) : s("", !0)
|
|
497
|
+
];
|
|
498
|
+
}),
|
|
94
499
|
_: 3
|
|
95
|
-
})
|
|
96
|
-
]));
|
|
500
|
+
}, 16)
|
|
501
|
+
], 8, ["to", "disabled"]));
|
|
97
502
|
}
|
|
98
503
|
});
|
|
99
504
|
export {
|
|
100
|
-
|
|
505
|
+
Ve as default
|
|
101
506
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysNumberInput2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d19c4dda"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|