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
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { defineComponent as X, inject as Y, useAttrs as Z, ref as _, useId as ee, computed as n, shallowRef as ae, provide as le, onMounted as te, openBlock as m, createElementBlock as y, mergeProps as ue, unref as o, Fragment as T, renderList as G, createBlock as re, withCtx as ie, renderSlot as q, createTextVNode as F, toDisplayString as N, createCommentVNode as R, createElementVNode as oe } from "vue";
|
|
2
|
+
import ne from "../HysCheckbox/HysCheckbox.vue.js";
|
|
3
|
+
import { useHysControlState as se, fieldKey as de } from "../../composables/formContext.js";
|
|
4
|
+
import { uniqueChoices as $, choiceOptions as ve, checkboxGroupKey as ce, choiceKey as O } from "../../composables/choice.js";
|
|
5
|
+
import { useHysRootAttrs as me } from "../../config.js";
|
|
6
|
+
import { useChoiceModel as fe, useChoiceNativeReset as ye } from "../../composables/choiceModel.js";
|
|
7
|
+
const be = ["id", "aria-label", "aria-disabled", "aria-readonly", "aria-required", "aria-invalid", "aria-describedby"], he = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "hys-ui-checkbox-empty"
|
|
10
|
+
}, ge = { class: "hys-ui-checkbox-empty" }, pe = ["name", "form", "value", "disabled"], ke = ["id"], qe = /* @__PURE__ */ X({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "HysCheckboxGroup",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: {},
|
|
15
|
+
defaultValue: {},
|
|
16
|
+
options: {},
|
|
17
|
+
fieldNames: {},
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
readonly: { type: Boolean },
|
|
20
|
+
size: {},
|
|
21
|
+
min: {},
|
|
22
|
+
max: {},
|
|
23
|
+
required: { type: Boolean },
|
|
24
|
+
name: {},
|
|
25
|
+
form: {},
|
|
26
|
+
ariaLabel: {},
|
|
27
|
+
vertical: { type: Boolean },
|
|
28
|
+
type: { default: "checkbox" },
|
|
29
|
+
buttonStyle: {},
|
|
30
|
+
border: { type: Boolean },
|
|
31
|
+
error: {},
|
|
32
|
+
status: {},
|
|
33
|
+
autofocus: { type: Boolean },
|
|
34
|
+
emptyText: { default: "暂无选项" }
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:modelValue", "change", "reject", "focus", "blur"],
|
|
37
|
+
setup(s, { expose: P, emit: J }) {
|
|
38
|
+
const l = s, g = J, { disabled: f, size: Q } = se(l), v = Y(de, void 0), A = Z(), U = me(), b = _(), j = ee(), h = fe(
|
|
39
|
+
l,
|
|
40
|
+
() => $(l.defaultValue ?? []),
|
|
41
|
+
(e, a) => Array.isArray(e) && Array.isArray(a) && e.length === a.length && e.every((t, r) => t === a[r])
|
|
42
|
+
), u = n(() => $(h.current.value ?? [])), p = n(
|
|
43
|
+
() => ve(l.options ?? [], l.fieldNames)
|
|
44
|
+
), c = ae(
|
|
45
|
+
[]
|
|
46
|
+
), S = n(
|
|
47
|
+
() => Math.max(
|
|
48
|
+
l.required ? 1 : 0,
|
|
49
|
+
Number.isFinite(l.min) ? Math.floor(l.min) : 0
|
|
50
|
+
)
|
|
51
|
+
), V = n(
|
|
52
|
+
() => l.max !== void 0 && Number.isFinite(l.max) ? Math.max(0, Math.floor(l.max)) : 1 / 0
|
|
53
|
+
), k = n(() => S.value > V.value), w = n(
|
|
54
|
+
() => {
|
|
55
|
+
var e, a;
|
|
56
|
+
return l.error || (e = v == null ? void 0 : v.invalid) != null && e.value || l.status === "error" || k.value || u.value.length > V.value ? "error" : l.status ?? ((a = v == null ? void 0 : v.status) == null ? void 0 : a.value);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
function H(e) {
|
|
60
|
+
return k.value || (u.value.includes(e) ? u.value.length <= S.value : u.value.length >= V.value);
|
|
61
|
+
}
|
|
62
|
+
async function L(e, a) {
|
|
63
|
+
return e.length === u.value.length && e.every((t, r) => t === u.value[r]) ? !1 : h.commit(
|
|
64
|
+
e,
|
|
65
|
+
(t) => g("update:modelValue", t),
|
|
66
|
+
(t) => g("change", t, a),
|
|
67
|
+
!0
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
async function E(e, a = !u.value.includes(e)) {
|
|
71
|
+
if (!h.isLive() || f.value || l.readonly) return !1;
|
|
72
|
+
const t = c.value.find((d) => d.value.value === e), r = p.value.find((d) => d.value === e);
|
|
73
|
+
return !t && !r || t != null && t.locked.value || r != null && r.disabled || u.value.includes(e) === a ? !1 : H(e) ? (g("reject", {
|
|
74
|
+
value: e,
|
|
75
|
+
checked: a,
|
|
76
|
+
reason: k.value ? "range" : a ? "max" : "min"
|
|
77
|
+
}), !1) : L(
|
|
78
|
+
a ? [...u.value, e] : u.value.filter((d) => d !== e),
|
|
79
|
+
{ value: e, checked: a, source: "toggle" }
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const x = n(
|
|
83
|
+
() => l.options !== void 0 ? p.value.filter((e) => !e.disabled).map((e) => e.value) : [
|
|
84
|
+
...new Set(
|
|
85
|
+
c.value.filter(
|
|
86
|
+
(e) => !e.locked.value && e.value.value !== void 0
|
|
87
|
+
).map((e) => e.value.value)
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
), M = n(
|
|
91
|
+
() => x.value.length > 0 && x.value.every((e) => u.value.includes(e))
|
|
92
|
+
), I = n(
|
|
93
|
+
() => !M.value && x.value.some((e) => u.value.includes(e))
|
|
94
|
+
);
|
|
95
|
+
async function K() {
|
|
96
|
+
if (!h.isLive() || f.value || l.readonly || k.value)
|
|
97
|
+
return !1;
|
|
98
|
+
const e = [...u.value];
|
|
99
|
+
for (const a of x.value)
|
|
100
|
+
!e.includes(a) && e.length < V.value && e.push(a);
|
|
101
|
+
return L(e, { source: "all" });
|
|
102
|
+
}
|
|
103
|
+
async function z() {
|
|
104
|
+
if (!h.isLive() || f.value || l.readonly || k.value)
|
|
105
|
+
return !1;
|
|
106
|
+
const e = new Set(x.value), a = u.value.filter((t) => !e.has(t));
|
|
107
|
+
for (const t of u.value)
|
|
108
|
+
a.length < S.value && !a.includes(t) && a.push(t);
|
|
109
|
+
return L(a, { source: "clear" });
|
|
110
|
+
}
|
|
111
|
+
function D(e) {
|
|
112
|
+
var t, r;
|
|
113
|
+
if (f.value) return;
|
|
114
|
+
const a = c.value.find(
|
|
115
|
+
(d) => {
|
|
116
|
+
var B;
|
|
117
|
+
return d.value.value === (e ?? u.value[0]) && !((B = d.input.value) != null && B.disabled);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
(r = (a == null ? void 0 : a.input.value) || ((t = b.value) == null ? void 0 : t.querySelector(
|
|
121
|
+
'input[type="checkbox"]:not(:disabled)'
|
|
122
|
+
))) == null || r.focus();
|
|
123
|
+
}
|
|
124
|
+
le(ce, {
|
|
125
|
+
values: u,
|
|
126
|
+
disabled: f,
|
|
127
|
+
readonly: n(() => !!l.readonly),
|
|
128
|
+
size: Q,
|
|
129
|
+
button: n(() => l.type === "button"),
|
|
130
|
+
border: n(() => !!l.border),
|
|
131
|
+
solid: n(() => l.buttonStyle === "solid"),
|
|
132
|
+
status: w,
|
|
133
|
+
form: n(() => l.form),
|
|
134
|
+
isLimited: H,
|
|
135
|
+
toggle: E,
|
|
136
|
+
register: (e) => (c.value.includes(e) || (c.value = [...c.value, e]), () => c.value = c.value.filter((a) => a !== e))
|
|
137
|
+
}), ye(b, h.reset, void 0, () => l.form);
|
|
138
|
+
function W(e) {
|
|
139
|
+
var a, t;
|
|
140
|
+
return !!((a = p.value.find((r) => r.value === e)) != null && a.disabled) || !!((t = c.value.find((r) => r.value.value === e)) != null && t.disabled.value);
|
|
141
|
+
}
|
|
142
|
+
return te(() => {
|
|
143
|
+
l.autofocus && D();
|
|
144
|
+
}), P({
|
|
145
|
+
values: u,
|
|
146
|
+
allChecked: M,
|
|
147
|
+
indeterminate: I,
|
|
148
|
+
focus: D,
|
|
149
|
+
blur: () => {
|
|
150
|
+
var a;
|
|
151
|
+
const e = document.activeElement;
|
|
152
|
+
e && ((a = b.value) != null && a.contains(e)) && e.blur();
|
|
153
|
+
},
|
|
154
|
+
checkAll: K,
|
|
155
|
+
clear: z,
|
|
156
|
+
toggle: E
|
|
157
|
+
}), (e, a) => {
|
|
158
|
+
var t, r, d, B;
|
|
159
|
+
return m(), y("div", ue({
|
|
160
|
+
ref_key: "root",
|
|
161
|
+
ref: b
|
|
162
|
+
}, { ...o(U), ...o(A) }, {
|
|
163
|
+
id: o(A).id || ((t = o(v)) == null ? void 0 : t.id.value),
|
|
164
|
+
role: "group",
|
|
165
|
+
"data-hys-ui-field-managed": "",
|
|
166
|
+
class: ["hys-ui-checkbox-group", { "hys-ui-checkbox-group-vertical": s.vertical }],
|
|
167
|
+
"aria-label": s.ariaLabel || o(A)["aria-label"] || ((r = o(v)) == null ? void 0 : r.label.value) || "复选框组",
|
|
168
|
+
"aria-disabled": o(f) || void 0,
|
|
169
|
+
"aria-readonly": s.readonly || void 0,
|
|
170
|
+
"aria-required": s.required || ((d = o(v)) == null ? void 0 : d.required.value) || S.value > 0 || void 0,
|
|
171
|
+
"aria-invalid": w.value === "error" || void 0,
|
|
172
|
+
"aria-describedby": [s.error ? o(j) : (B = o(v)) == null ? void 0 : B.describedBy.value, o(A)["aria-describedby"]].filter(Boolean).join(" ") || void 0,
|
|
173
|
+
onFocusin: a[0] || (a[0] = (i) => {
|
|
174
|
+
var C;
|
|
175
|
+
return !((C = b.value) != null && C.contains(i.relatedTarget)) && g("focus", i);
|
|
176
|
+
}),
|
|
177
|
+
onFocusout: a[1] || (a[1] = (i) => {
|
|
178
|
+
var C;
|
|
179
|
+
return !((C = b.value) != null && C.contains(i.relatedTarget)) && g("blur", i);
|
|
180
|
+
})
|
|
181
|
+
}), [
|
|
182
|
+
l.options !== void 0 ? (m(), y(T, { key: 0 }, [
|
|
183
|
+
(m(!0), y(T, null, G(p.value, (i) => (m(), re(ne, {
|
|
184
|
+
key: o(O)(i.value),
|
|
185
|
+
value: i.value,
|
|
186
|
+
disabled: i.disabled,
|
|
187
|
+
indeterminate: i.indeterminate
|
|
188
|
+
}, {
|
|
189
|
+
default: ie(() => [
|
|
190
|
+
q(e.$slots, "option", {
|
|
191
|
+
option: i,
|
|
192
|
+
checked: u.value.includes(i.value)
|
|
193
|
+
}, () => [
|
|
194
|
+
F(N(i.label), 1)
|
|
195
|
+
], !0)
|
|
196
|
+
]),
|
|
197
|
+
_: 2
|
|
198
|
+
}, 1032, ["value", "disabled", "indeterminate"]))), 128)),
|
|
199
|
+
p.value.length ? R("", !0) : (m(), y("span", he, [
|
|
200
|
+
q(e.$slots, "empty", {}, () => [
|
|
201
|
+
F(N(s.emptyText), 1)
|
|
202
|
+
], !0)
|
|
203
|
+
]))
|
|
204
|
+
], 64)) : q(e.$slots, "default", {
|
|
205
|
+
values: u.value,
|
|
206
|
+
allChecked: M.value,
|
|
207
|
+
indeterminate: I.value,
|
|
208
|
+
checkAll: K,
|
|
209
|
+
clear: z
|
|
210
|
+
}, () => [
|
|
211
|
+
oe("span", ge, [
|
|
212
|
+
q(e.$slots, "empty", {}, () => [
|
|
213
|
+
F(N(s.emptyText), 1)
|
|
214
|
+
], !0)
|
|
215
|
+
])
|
|
216
|
+
], !0, 1),
|
|
217
|
+
s.name ? (m(!0), y(T, { key: 2 }, G(u.value, (i) => (m(), y("input", {
|
|
218
|
+
key: o(O)(i),
|
|
219
|
+
type: "hidden",
|
|
220
|
+
name: s.name,
|
|
221
|
+
form: s.form,
|
|
222
|
+
value: String(i),
|
|
223
|
+
disabled: o(f) || W(i)
|
|
224
|
+
}, null, 8, pe))), 128)) : R("", !0),
|
|
225
|
+
s.error ? (m(), y("small", {
|
|
226
|
+
key: 3,
|
|
227
|
+
id: o(j),
|
|
228
|
+
role: "alert",
|
|
229
|
+
class: "hys-ui-checkbox-group-error"
|
|
230
|
+
}, N(s.error), 9, ke)) : R("", !0)
|
|
231
|
+
], 16, be);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
export {
|
|
236
|
+
qe as default
|
|
237
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { defineComponent as z, provide as K, computed as C, openBlock as l, createElementBlock as o, mergeProps as T, unref as d, createElementVNode as n, renderSlot as m, normalizeProps as c, guardReactiveProps as x, toDisplayString as r, normalizeStyle as u, createCommentVNode as s, Fragment as I, renderList as L, createBlock as k, withKeys as S, withModifiers as B, withCtx as y, createTextVNode as f, createVNode as F } from "vue";
|
|
2
|
+
import { Check as N } from "lucide-vue-next";
|
|
3
|
+
import b from "../HysButton/HysButton.vue.js";
|
|
4
|
+
import { useHysRootAttrs as V } from "../../config.js";
|
|
5
|
+
import { overlayOwnerKey as $ } from "../../composables/overlayManager.js";
|
|
6
|
+
import { colorRgb as h, sameColor as g } from "../../composables/color.js";
|
|
7
|
+
const H = ["id", "role", "aria-label", "aria-disabled"], O = ["tabindex", "aria-valuenow", "aria-valuetext", "aria-disabled"], R = ["tabindex", "aria-valuenow", "aria-disabled"], W = ["tabindex", "aria-valuenow", "aria-valuetext", "aria-disabled"], A = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "hys-ui-pf-color-presets",
|
|
10
|
+
role: "group",
|
|
11
|
+
"aria-label": "常用颜色"
|
|
12
|
+
}, E = ["disabled", "aria-label", "aria-pressed", "onClick"], j = ["value", "disabled", "readonly", "aria-invalid"], q = {
|
|
13
|
+
key: 3,
|
|
14
|
+
class: "hys-ui-pf-color-error",
|
|
15
|
+
role: "alert"
|
|
16
|
+
}, D = { key: 4 }, p = /* @__PURE__ */ z({
|
|
17
|
+
__name: "HysColorPanel",
|
|
18
|
+
props: {
|
|
19
|
+
state: {},
|
|
20
|
+
options: {}
|
|
21
|
+
},
|
|
22
|
+
setup(e) {
|
|
23
|
+
const v = e, P = V();
|
|
24
|
+
K(
|
|
25
|
+
$,
|
|
26
|
+
C(() => !!v.state.open.value && v.state.live.value)
|
|
27
|
+
);
|
|
28
|
+
const w = C(() => {
|
|
29
|
+
const i = v.state.working.value;
|
|
30
|
+
return "rgb(" + h(i).map((a) => Math.round(a * 255)).join(",") + ")";
|
|
31
|
+
});
|
|
32
|
+
function M(i) {
|
|
33
|
+
return i[0] * 0.2126 + i[1] * 0.7152 + i[2] * 0.0722 > 0.58 ? "#172a4d" : "#fff";
|
|
34
|
+
}
|
|
35
|
+
return (i, a) => (l(), o("div", T({
|
|
36
|
+
id: e.state.panelId,
|
|
37
|
+
ref: (t) => e.state.panel.value = t
|
|
38
|
+
}, d(P), {
|
|
39
|
+
class: ["hys-ui-v4-menu hys-ui-pf-color-panel hys-ui-color-panel", [e.options.popupClass, { "hys-ui-color-inline": e.options.inline }]],
|
|
40
|
+
style: e.options.inline ? {
|
|
41
|
+
...e.options.popupStyle,
|
|
42
|
+
width: typeof e.options.popupWidth == "number" ? e.options.popupWidth + "px" : e.options.popupWidth
|
|
43
|
+
} : { ...e.options.popupStyle, ...e.state.floating.style.value },
|
|
44
|
+
role: e.options.inline ? "group" : "dialog",
|
|
45
|
+
"aria-label": e.options.ariaLabel || e.options.label || "选择颜色",
|
|
46
|
+
"aria-disabled": e.state.control.disabled.value || void 0,
|
|
47
|
+
onFocusin: a[21] || (a[21] = //@ts-ignore
|
|
48
|
+
(...t) => e.state.focusIn && e.state.focusIn(...t)),
|
|
49
|
+
onFocusout: a[22] || (a[22] = //@ts-ignore
|
|
50
|
+
(...t) => e.state.focusOut && e.state.focusOut(...t))
|
|
51
|
+
}), [
|
|
52
|
+
n("header", null, [
|
|
53
|
+
m(i.$slots, "header", c(x(e.state.context.value)), () => [
|
|
54
|
+
a[23] || (a[23] = n("strong", null, "选择颜色", -1)),
|
|
55
|
+
n("code", null, r(e.state.hasColor.value ? e.state.serialized.value : "未选择"), 1)
|
|
56
|
+
], !0)
|
|
57
|
+
]),
|
|
58
|
+
n("div", {
|
|
59
|
+
class: "hys-ui-pf-color-palette",
|
|
60
|
+
role: "slider",
|
|
61
|
+
tabindex: e.state.locked.value ? -1 : 0,
|
|
62
|
+
"aria-label": "饱和度与亮度",
|
|
63
|
+
"aria-valuemin": "0",
|
|
64
|
+
"aria-valuemax": "100",
|
|
65
|
+
"aria-valuenow": Math.round(e.state.working.value.s * 100),
|
|
66
|
+
"aria-valuetext": "饱和度 " + Math.round(e.state.working.value.s * 100) + "%,亮度 " + Math.round(e.state.working.value.v * 100) + "%",
|
|
67
|
+
"aria-disabled": e.state.locked.value || void 0,
|
|
68
|
+
style: u({
|
|
69
|
+
backgroundColor: "hsl(" + e.state.working.value.h + ",100%,50%)"
|
|
70
|
+
}),
|
|
71
|
+
onPointerdown: a[0] || (a[0] = (t) => e.state.start(t, "palette")),
|
|
72
|
+
onPointermove: a[1] || (a[1] = //@ts-ignore
|
|
73
|
+
(...t) => e.state.move && e.state.move(...t)),
|
|
74
|
+
onPointerup: a[2] || (a[2] = //@ts-ignore
|
|
75
|
+
(...t) => e.state.end && e.state.end(...t)),
|
|
76
|
+
onPointercancel: a[3] || (a[3] = //@ts-ignore
|
|
77
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
78
|
+
onLostpointercapture: a[4] || (a[4] = //@ts-ignore
|
|
79
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
80
|
+
onKeydown: a[5] || (a[5] = (t) => e.state.keyboard(t, "palette"))
|
|
81
|
+
}, [
|
|
82
|
+
n("span", {
|
|
83
|
+
class: "hys-ui-pf-color-cursor",
|
|
84
|
+
style: u({
|
|
85
|
+
left: e.state.working.value.s * 100 + "%",
|
|
86
|
+
top: (1 - e.state.working.value.v) * 100 + "%",
|
|
87
|
+
background: w.value
|
|
88
|
+
})
|
|
89
|
+
}, null, 4)
|
|
90
|
+
], 44, O),
|
|
91
|
+
n("div", {
|
|
92
|
+
class: "hys-ui-pf-color-hue",
|
|
93
|
+
role: "slider",
|
|
94
|
+
tabindex: e.state.locked.value ? -1 : 0,
|
|
95
|
+
"aria-label": "色相",
|
|
96
|
+
"aria-valuemin": "0",
|
|
97
|
+
"aria-valuemax": "359",
|
|
98
|
+
"aria-valuenow": Math.round(e.state.working.value.h),
|
|
99
|
+
"aria-disabled": e.state.locked.value || void 0,
|
|
100
|
+
onPointerdown: a[6] || (a[6] = (t) => e.state.start(t, "hue")),
|
|
101
|
+
onPointermove: a[7] || (a[7] = //@ts-ignore
|
|
102
|
+
(...t) => e.state.move && e.state.move(...t)),
|
|
103
|
+
onPointerup: a[8] || (a[8] = //@ts-ignore
|
|
104
|
+
(...t) => e.state.end && e.state.end(...t)),
|
|
105
|
+
onPointercancel: a[9] || (a[9] = //@ts-ignore
|
|
106
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
107
|
+
onLostpointercapture: a[10] || (a[10] = //@ts-ignore
|
|
108
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
109
|
+
onKeydown: a[11] || (a[11] = (t) => e.state.keyboard(t, "hue"))
|
|
110
|
+
}, [
|
|
111
|
+
n("span", {
|
|
112
|
+
style: u({ left: e.state.working.value.h / 359 * 100 + "%" })
|
|
113
|
+
}, null, 4)
|
|
114
|
+
], 40, R),
|
|
115
|
+
e.options.showAlpha ? (l(), o("div", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: "hys-ui-color-alpha",
|
|
118
|
+
role: "slider",
|
|
119
|
+
tabindex: e.state.locked.value ? -1 : 0,
|
|
120
|
+
"aria-label": "透明度",
|
|
121
|
+
"aria-valuemin": "0",
|
|
122
|
+
"aria-valuemax": "100",
|
|
123
|
+
"aria-valuenow": Math.round(e.state.working.value.a * 100),
|
|
124
|
+
"aria-valuetext": Math.round(e.state.working.value.a * 100) + "%",
|
|
125
|
+
"aria-disabled": e.state.locked.value || void 0,
|
|
126
|
+
onPointerdown: a[12] || (a[12] = (t) => e.state.start(t, "alpha")),
|
|
127
|
+
onPointermove: a[13] || (a[13] = //@ts-ignore
|
|
128
|
+
(...t) => e.state.move && e.state.move(...t)),
|
|
129
|
+
onPointerup: a[14] || (a[14] = //@ts-ignore
|
|
130
|
+
(...t) => e.state.end && e.state.end(...t)),
|
|
131
|
+
onPointercancel: a[15] || (a[15] = //@ts-ignore
|
|
132
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
133
|
+
onLostpointercapture: a[16] || (a[16] = //@ts-ignore
|
|
134
|
+
(...t) => e.state.pointerCancel && e.state.pointerCancel(...t)),
|
|
135
|
+
onKeydown: a[17] || (a[17] = (t) => e.state.keyboard(t, "alpha"))
|
|
136
|
+
}, [
|
|
137
|
+
n("div", {
|
|
138
|
+
style: u({
|
|
139
|
+
background: "linear-gradient(to right,transparent," + w.value + ")"
|
|
140
|
+
})
|
|
141
|
+
}, null, 4),
|
|
142
|
+
n("span", {
|
|
143
|
+
style: u({ left: e.state.working.value.a * 100 + "%" })
|
|
144
|
+
}, null, 4)
|
|
145
|
+
], 40, W)) : s("", !0),
|
|
146
|
+
e.options.showPresets !== !1 && e.state.presets.value.length ? (l(), o("div", A, [
|
|
147
|
+
(l(!0), o(I, null, L(e.state.presets.value, (t) => (l(), o("button", {
|
|
148
|
+
key: t.key,
|
|
149
|
+
type: "button",
|
|
150
|
+
disabled: e.state.locked.value,
|
|
151
|
+
"aria-label": t.value,
|
|
152
|
+
"aria-pressed": e.state.hasColor.value && d(g)(t.parsed, e.state.working.value),
|
|
153
|
+
onClick: (G) => e.state.setColor(t.value)
|
|
154
|
+
}, [
|
|
155
|
+
n("span", {
|
|
156
|
+
class: "hys-ui-color-preset-fill",
|
|
157
|
+
style: u({ background: t.color })
|
|
158
|
+
}, null, 4),
|
|
159
|
+
m(i.$slots, "preset", {
|
|
160
|
+
value: t.value,
|
|
161
|
+
color: t.color,
|
|
162
|
+
selected: e.state.hasColor.value && d(g)(t.parsed, e.state.working.value),
|
|
163
|
+
disabled: e.state.locked.value
|
|
164
|
+
}, () => [
|
|
165
|
+
e.state.hasColor.value && d(g)(t.parsed, e.state.working.value) ? (l(), k(d(N), {
|
|
166
|
+
key: 0,
|
|
167
|
+
size: 13,
|
|
168
|
+
style: u({ color: M(d(h)(t.parsed)) }),
|
|
169
|
+
"aria-hidden": "true"
|
|
170
|
+
}, null, 8, ["style"])) : s("", !0)
|
|
171
|
+
], !0)
|
|
172
|
+
], 8, E))), 128))
|
|
173
|
+
])) : s("", !0),
|
|
174
|
+
e.options.showInput !== !1 ? (l(), o("input", {
|
|
175
|
+
key: 2,
|
|
176
|
+
class: "hys-ui-color-panel-input",
|
|
177
|
+
value: e.state.draft.value,
|
|
178
|
+
disabled: e.state.control.disabled.value,
|
|
179
|
+
readonly: e.options.readonly,
|
|
180
|
+
"aria-label": "面板颜色值",
|
|
181
|
+
"aria-invalid": !e.state.valid.value || void 0,
|
|
182
|
+
spellcheck: "false",
|
|
183
|
+
autocomplete: "off",
|
|
184
|
+
onInput: a[18] || (a[18] = (t) => e.state.draft.value = t.target.value),
|
|
185
|
+
onChange: a[19] || (a[19] = //@ts-ignore
|
|
186
|
+
(...t) => e.state.commitText && e.state.commitText(...t)),
|
|
187
|
+
onKeydown: a[20] || (a[20] = S(B(
|
|
188
|
+
//@ts-ignore
|
|
189
|
+
(...t) => e.state.confirm && e.state.confirm(...t),
|
|
190
|
+
["prevent"]
|
|
191
|
+
), ["enter"]))
|
|
192
|
+
}, null, 40, j)) : s("", !0),
|
|
193
|
+
e.state.valid.value ? s("", !0) : (l(), o("small", q, "请输入有效的颜色值")),
|
|
194
|
+
e.options.showFooter !== !1 ? (l(), o("footer", D, [
|
|
195
|
+
m(i.$slots, "footer", c(x(e.state.context.value)), () => [
|
|
196
|
+
e.options.clearable ? (l(), k(b, {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "hys-ui-color-clear",
|
|
199
|
+
variant: "ghost",
|
|
200
|
+
size: "sm",
|
|
201
|
+
disabled: e.state.locked.value || !e.state.value.value && !e.state.hasColor.value,
|
|
202
|
+
onClick: e.state.clear
|
|
203
|
+
}, {
|
|
204
|
+
default: y(() => [
|
|
205
|
+
f(r(e.options.clearText || "清空"), 1)
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}, 8, ["disabled", "onClick"])) : s("", !0),
|
|
209
|
+
a[24] || (a[24] = n("span", { class: "hys-ui-color-footer-spacer" }, null, -1)),
|
|
210
|
+
e.options.immediate === !1 && !e.options.inline ? (l(), k(b, {
|
|
211
|
+
key: 1,
|
|
212
|
+
variant: "ghost",
|
|
213
|
+
size: "sm",
|
|
214
|
+
onClick: e.state.cancel
|
|
215
|
+
}, {
|
|
216
|
+
default: y(() => [
|
|
217
|
+
f(r(e.options.cancelText || "取消"), 1)
|
|
218
|
+
]),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 8, ["onClick"])) : s("", !0),
|
|
221
|
+
F(b, {
|
|
222
|
+
size: "sm",
|
|
223
|
+
disabled: e.state.locked.value || !e.state.valid.value,
|
|
224
|
+
onClick: e.state.confirm
|
|
225
|
+
}, {
|
|
226
|
+
default: y(() => [
|
|
227
|
+
f(r(e.options.confirmText || (e.options.immediate === !1 ? "确认" : "完成")), 1)
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["disabled", "onClick"])
|
|
231
|
+
], !0)
|
|
232
|
+
])) : s("", !0)
|
|
233
|
+
], 16, H));
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export {
|
|
237
|
+
p as default
|
|
238
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysColorPicker2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dbe35865"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|