hys-ui 0.1.0 → 0.2.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 +137 -1
- package/README.md +18 -6
- 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 +14 -14
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -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 +252 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -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 -84
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +1 -1
- package/dist/components/HysCard/HysCard2.vue.js +177 -44
- package/dist/components/HysCascader/HysCascader.vue.js +5 -182
- package/dist/components/HysCascader/HysCascader2.vue.js +760 -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 +5 -39
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
- package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -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 +268 -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 +55 -54
- package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
- package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +580 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +5 -264
- package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +468 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +35 -35
- package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
- 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 +5 -40
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
- package/dist/components/HysSearch/HysSearch.vue.js +50 -38
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
- 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 +859 -164
- 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 +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
- package/dist/components/HysSteps/HysSteps.vue.js +2 -2
- package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1471 -82
- 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 -66
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
- package/dist/components/HysToast/HysToast.vue.js +2 -2
- package/dist/components/HysToast/HysToast2.vue.js +121 -38
- package/dist/components/HysTour/HysTour.vue.js +47 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
- package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +641 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -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 +97 -78
- 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/datePicker.js +227 -0
- package/dist/composables/formContext.js +94 -3
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/numberInput.js +91 -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/textInput.js +34 -0
- package/dist/composables/toastEscape.js +16 -0
- package/dist/composables/transfer.js +63 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +16 -16
- package/dist/composables/useFloating.js +98 -52
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysToast.js +148 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/config.js +18 -15
- package/dist/index.js +149 -136
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -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 +99 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
- package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
- 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 +55 -27
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
- 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 +1 -0
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
- 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 +88 -4
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
- 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 +120 -14
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -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 +5 -5
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
- package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -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/composables/autocomplete.d.ts +106 -0
- package/dist/types/composables/avatar.d.ts +70 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +192 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/datePicker.d.ts +247 -0
- package/dist/types/composables/formContext.d.ts +138 -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/numberInput.d.ts +45 -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 +44 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +309 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/toastEscape.d.ts +1 -0
- package/dist/types/composables/transfer.d.ts +180 -0
- package/dist/types/composables/tree.d.ts +237 -0
- package/dist/types/composables/treeSelect.d.ts +167 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useFloating.d.ts +8 -5
- 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/useHysToast.d.ts +50 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/index.d.ts +38 -7
- package/package.json +47 -11
|
@@ -1,78 +1,149 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "hys-ui-ex-error",
|
|
6
|
-
role: "alert"
|
|
7
|
-
}, M = { key: 2 }, I = /* @__PURE__ */ B({
|
|
1
|
+
import { defineComponent as y, ref as v, useAttrs as c, computed as i, openBlock as B, createBlock as $, mergeProps as g, unref as b, createSlots as C, withCtx as l, renderSlot as r, normalizeProps as k, guardReactiveProps as w } from "vue";
|
|
2
|
+
import x from "../HysInput/HysInput.vue.js";
|
|
3
|
+
const I = /* @__PURE__ */ y({
|
|
8
4
|
inheritAttrs: !1,
|
|
9
5
|
__name: "HysTextarea",
|
|
10
6
|
props: {
|
|
11
|
-
modelValue: {
|
|
12
|
-
|
|
7
|
+
modelValue: {},
|
|
8
|
+
defaultValue: {},
|
|
13
9
|
placeholder: {},
|
|
14
|
-
|
|
15
|
-
maxlength: {},
|
|
10
|
+
label: {},
|
|
16
11
|
disabled: { type: Boolean },
|
|
17
12
|
readonly: { type: Boolean },
|
|
13
|
+
ariaLabel: {},
|
|
18
14
|
error: {},
|
|
19
|
-
|
|
15
|
+
status: {},
|
|
16
|
+
clearable: { type: Boolean },
|
|
17
|
+
clearIcon: {},
|
|
18
|
+
prefixIcon: {},
|
|
19
|
+
suffixIcon: {},
|
|
20
|
+
showCount: { type: [Boolean, Object], default: void 0 },
|
|
21
|
+
showWordLimit: { type: Boolean },
|
|
22
|
+
countPosition: { default: "inside" },
|
|
23
|
+
wordLimitPosition: {},
|
|
24
|
+
countGraphemes: { type: [Boolean, Function] },
|
|
25
|
+
maxlength: {},
|
|
26
|
+
minlength: {},
|
|
27
|
+
formatter: {},
|
|
28
|
+
parser: {},
|
|
29
|
+
allowInput: {},
|
|
30
|
+
autocomplete: {},
|
|
31
|
+
name: {},
|
|
32
|
+
size: {},
|
|
33
|
+
rows: { default: 4 },
|
|
20
34
|
autosize: { type: [Boolean, Object] },
|
|
21
|
-
resize: { default: "vertical" }
|
|
35
|
+
resize: { default: "vertical" },
|
|
36
|
+
inputProps: {},
|
|
37
|
+
autofocus: { type: Boolean },
|
|
38
|
+
selectOnFocus: { type: Boolean },
|
|
39
|
+
bordered: { type: Boolean, default: !0 },
|
|
40
|
+
round: { type: Boolean }
|
|
22
41
|
},
|
|
23
|
-
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
24
|
-
setup(
|
|
25
|
-
const a =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
value:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
42
|
+
emits: ["update:modelValue", "input", "change", "clear", "focus", "blur", "pressEnter", "compositionstart", "compositionupdate", "compositionend"],
|
|
43
|
+
setup(u, { expose: d, emit: m }) {
|
|
44
|
+
const a = u, s = m, n = v(), f = c();
|
|
45
|
+
return d({
|
|
46
|
+
input: i(() => {
|
|
47
|
+
var e;
|
|
48
|
+
return (e = n.value) == null ? void 0 : e.textarea;
|
|
49
|
+
}),
|
|
50
|
+
textarea: i(() => {
|
|
51
|
+
var e;
|
|
52
|
+
return (e = n.value) == null ? void 0 : e.textarea;
|
|
53
|
+
}),
|
|
54
|
+
isComposing: i(() => {
|
|
55
|
+
var e;
|
|
56
|
+
return ((e = n.value) == null ? void 0 : e.isComposing) ?? !1;
|
|
57
|
+
}),
|
|
58
|
+
focus: (e) => {
|
|
59
|
+
var o;
|
|
60
|
+
return (o = n.value) == null ? void 0 : o.focus(e);
|
|
61
|
+
},
|
|
62
|
+
blur: () => {
|
|
63
|
+
var e;
|
|
64
|
+
return (e = n.value) == null ? void 0 : e.blur();
|
|
65
|
+
},
|
|
66
|
+
select: () => {
|
|
67
|
+
var e;
|
|
68
|
+
return (e = n.value) == null ? void 0 : e.select();
|
|
69
|
+
},
|
|
70
|
+
clear: () => {
|
|
71
|
+
var e;
|
|
72
|
+
return (e = n.value) == null ? void 0 : e.clear();
|
|
73
|
+
},
|
|
74
|
+
resize: () => {
|
|
75
|
+
var e;
|
|
76
|
+
return ((e = n.value) == null ? void 0 : e.resize()) ?? Promise.resolve();
|
|
77
|
+
},
|
|
78
|
+
setSelectionRange: (e, o, t) => {
|
|
79
|
+
var p;
|
|
80
|
+
return (p = n.value) == null ? void 0 : p.setSelectionRange(e, o, t);
|
|
81
|
+
},
|
|
82
|
+
scrollTo: (e) => {
|
|
83
|
+
var o;
|
|
84
|
+
return (o = n.value) == null ? void 0 : o.scrollTo(e);
|
|
85
|
+
}
|
|
86
|
+
}), (e, o) => (B(), $(x, g({
|
|
87
|
+
ref_key: "control",
|
|
88
|
+
ref: n
|
|
89
|
+
}, { ...a, ...b(f) }, {
|
|
90
|
+
"show-count": a.showCount ?? a.maxlength !== void 0,
|
|
91
|
+
type: "textarea",
|
|
92
|
+
class: "hys-ui-ex-field",
|
|
93
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => s("update:modelValue", t)),
|
|
94
|
+
onInput: o[1] || (o[1] = (t) => s("input", t)),
|
|
95
|
+
onChange: o[2] || (o[2] = (t) => s("change", t)),
|
|
96
|
+
onClear: o[3] || (o[3] = (t) => s("clear")),
|
|
97
|
+
onFocus: o[4] || (o[4] = (t) => s("focus", t)),
|
|
98
|
+
onBlur: o[5] || (o[5] = (t) => s("blur", t)),
|
|
99
|
+
onPressEnter: o[6] || (o[6] = (t) => s("pressEnter", t)),
|
|
100
|
+
onCompositionstart: o[7] || (o[7] = (t) => s("compositionstart", t)),
|
|
101
|
+
onCompositionupdate: o[8] || (o[8] = (t) => s("compositionupdate", t)),
|
|
102
|
+
onCompositionend: o[9] || (o[9] = (t) => s("compositionend", t))
|
|
103
|
+
}), C({ _: 2 }, [
|
|
104
|
+
e.$slots.prefix ? {
|
|
105
|
+
name: "prefix",
|
|
106
|
+
fn: l(() => [
|
|
107
|
+
r(e.$slots, "prefix")
|
|
108
|
+
]),
|
|
109
|
+
key: "0"
|
|
110
|
+
} : void 0,
|
|
111
|
+
e.$slots.suffix ? {
|
|
112
|
+
name: "suffix",
|
|
113
|
+
fn: l(() => [
|
|
114
|
+
r(e.$slots, "suffix")
|
|
115
|
+
]),
|
|
116
|
+
key: "1"
|
|
117
|
+
} : void 0,
|
|
118
|
+
e.$slots.prepend ? {
|
|
119
|
+
name: "prepend",
|
|
120
|
+
fn: l(() => [
|
|
121
|
+
r(e.$slots, "prepend")
|
|
122
|
+
]),
|
|
123
|
+
key: "2"
|
|
124
|
+
} : void 0,
|
|
125
|
+
e.$slots.append ? {
|
|
126
|
+
name: "append",
|
|
127
|
+
fn: l(() => [
|
|
128
|
+
r(e.$slots, "append")
|
|
129
|
+
]),
|
|
130
|
+
key: "3"
|
|
131
|
+
} : void 0,
|
|
132
|
+
e.$slots["clear-icon"] ? {
|
|
133
|
+
name: "clear-icon",
|
|
134
|
+
fn: l(() => [
|
|
135
|
+
r(e.$slots, "clear-icon")
|
|
136
|
+
]),
|
|
137
|
+
key: "4"
|
|
138
|
+
} : void 0,
|
|
139
|
+
e.$slots.count ? {
|
|
140
|
+
name: "count",
|
|
141
|
+
fn: l((t) => [
|
|
142
|
+
r(e.$slots, "count", k(w(t)))
|
|
143
|
+
]),
|
|
144
|
+
key: "5"
|
|
145
|
+
} : void 0
|
|
146
|
+
]), 1040, ["show-count"]));
|
|
76
147
|
}
|
|
77
148
|
});
|
|
78
149
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysToast2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eaff35fd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,57 +1,140 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as X, useAttrs as j, useSlots as q, ref as d, computed as h, watch as N, onDeactivated as G, onActivated as J, nextTick as K, onBeforeUnmount as Q, openBlock as i, createBlock as H, Teleport as Y, createVNode as O, Transition as Z, withCtx as _, createElementBlock as m, mergeProps as ee, unref as x, renderSlot as A, resolveDynamicComponent as te, normalizeClass as ae, createCommentVNode as v, createElementVNode as oe, createTextVNode as se, toDisplayString as V } from "vue";
|
|
2
|
+
import { LoaderCircle as le, TriangleAlert as ne, Info as ie, CircleAlert as ue, CircleCheck as re, X as fe } from "lucide-vue-next";
|
|
3
|
+
import { useHysRootAttrs as ce } from "../../config.js";
|
|
4
|
+
import { registerToastEscape as de } from "../../composables/toastEscape.js";
|
|
5
|
+
const me = ["role", "aria-live"], ve = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "hys-ui-toast-icon",
|
|
8
|
+
"aria-hidden": "true"
|
|
9
|
+
}, ye = { class: "hys-ui-toast-message" }, pe = ["aria-label"], he = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "hys-ui-toast-action"
|
|
12
|
+
}, ke = /* @__PURE__ */ X({
|
|
13
|
+
inheritAttrs: !1,
|
|
5
14
|
__name: "HysToast",
|
|
6
15
|
props: {
|
|
7
|
-
message: {},
|
|
16
|
+
message: { default: "" },
|
|
8
17
|
type: { default: "success" },
|
|
9
|
-
duration: {
|
|
18
|
+
duration: {},
|
|
10
19
|
closable: { type: Boolean, default: !0 },
|
|
11
|
-
position: { default: "
|
|
20
|
+
position: { default: "top-center" },
|
|
21
|
+
offset: { default: 24 },
|
|
22
|
+
zIndex: { default: 2e3 },
|
|
23
|
+
showIcon: { type: Boolean, default: !0 },
|
|
24
|
+
pauseOnHover: { type: Boolean, default: !0 },
|
|
25
|
+
closeOnEscape: { type: Boolean },
|
|
26
|
+
repeat: { default: 1 },
|
|
27
|
+
plain: { type: Boolean },
|
|
28
|
+
teleport: { type: Boolean, default: !0 },
|
|
29
|
+
appendTo: { default: "body" }
|
|
12
30
|
},
|
|
13
|
-
emits: ["close"],
|
|
14
|
-
setup(e, { emit:
|
|
15
|
-
const
|
|
16
|
-
let l;
|
|
17
|
-
function
|
|
18
|
-
clearTimeout(
|
|
31
|
+
emits: ["close", "afterClose"],
|
|
32
|
+
setup(e, { expose: F, emit: S }) {
|
|
33
|
+
const a = e, w = S, E = j(), $ = q(), L = ce(), b = d(), u = d(!0), o = d(!1), C = d(!1), T = d(!1), R = h(() => a.position === "top" ? "top-center" : a.position === "bottom" ? "bottom-center" : a.position), g = h(() => Math.max(0, Number.isFinite(a.duration ?? 3e3) ? a.duration ?? (a.type === "loading" ? 0 : 3e3) : 0)), P = h(() => !!a.message || !!$.default), U = h(() => ({ success: re, error: ue, info: ie, warning: ne, loading: le })[a.type]);
|
|
34
|
+
let y, l, f = 0, z = 0, k = !1, I = !0;
|
|
35
|
+
function D() {
|
|
36
|
+
clearTimeout(y), y = void 0;
|
|
19
37
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
38
|
+
function r() {
|
|
39
|
+
y && (f = Math.max(0, f - (Date.now() - z))), D();
|
|
22
40
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
function c() {
|
|
42
|
+
if (D(), !(!u.value || !o.value || C.value || T.value || g.value <= 0)) {
|
|
43
|
+
if (f <= 0) {
|
|
44
|
+
n();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
z = Date.now(), y = setTimeout(n, f);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function B() {
|
|
51
|
+
f = g.value, c();
|
|
52
|
+
}
|
|
53
|
+
function n() {
|
|
54
|
+
o.value && (r(), o.value = !1, k || (k = !0, w("close")));
|
|
55
|
+
}
|
|
56
|
+
function W() {
|
|
57
|
+
!o.value && u.value && w("afterClose");
|
|
58
|
+
}
|
|
59
|
+
return N(() => [a.message, g.value, a.repeat], (s, t) => {
|
|
60
|
+
s[0] || !t && $.default ? (o.value = !0, k = !1, B()) : !P.value || t != null && t[0] ? n() : o.value && B();
|
|
61
|
+
}, { immediate: !0 }), N(() => o.value && u.value && a.closeOnEscape, (s) => {
|
|
62
|
+
l == null || l(), l = s ? de(n) : void 0;
|
|
63
|
+
}, { immediate: !0 }), G(() => {
|
|
64
|
+
u.value = !1, r();
|
|
65
|
+
}), J(() => {
|
|
66
|
+
u.value = !0, K(() => I && c());
|
|
67
|
+
}), Q(() => {
|
|
68
|
+
I = !1, r(), l == null || l();
|
|
69
|
+
}), F({ close: n, pause: r, resume: c, restart: B, element: b }), (s, t) => (i(), H(Y, {
|
|
70
|
+
to: e.appendTo,
|
|
71
|
+
disabled: !e.teleport
|
|
72
|
+
}, [
|
|
73
|
+
O(Z, {
|
|
74
|
+
name: "hys-ui-toast-motion",
|
|
75
|
+
appear: "",
|
|
76
|
+
onAfterLeave: W
|
|
77
|
+
}, {
|
|
78
|
+
default: _(() => [
|
|
79
|
+
o.value && u.value ? (i(), m("div", ee({
|
|
80
|
+
key: 0,
|
|
81
|
+
ref_key: "element",
|
|
82
|
+
ref: b
|
|
83
|
+
}, { ...x(L), ...x(E) }, {
|
|
84
|
+
class: ["hys-ui-toast", ["hys-ui-toast-" + e.type, "hys-ui-toast-position-" + R.value, { "hys-ui-toast-inline": !e.teleport, "hys-ui-toast-plain": e.plain }]],
|
|
85
|
+
style: { "--hys-ui-toast-offset": Math.max(0, e.offset) + "px", zIndex: e.zIndex },
|
|
32
86
|
role: e.type === "error" ? "alert" : "status",
|
|
33
|
-
|
|
34
|
-
|
|
87
|
+
"aria-live": e.type === "error" ? "assertive" : "polite",
|
|
88
|
+
"aria-atomic": "true",
|
|
89
|
+
onMouseenter: t[0] || (t[0] = (p) => e.pauseOnHover && (C.value = !0, r())),
|
|
90
|
+
onMouseleave: t[1] || (t[1] = (p) => {
|
|
91
|
+
C.value = !1, c();
|
|
92
|
+
}),
|
|
93
|
+
onFocusin: t[2] || (t[2] = (p) => {
|
|
94
|
+
T.value = !0, r();
|
|
95
|
+
}),
|
|
96
|
+
onFocusout: t[3] || (t[3] = (p) => {
|
|
97
|
+
var M;
|
|
98
|
+
return !((M = b.value) != null && M.contains(p.relatedTarget)) && (T.value = !1, c());
|
|
99
|
+
})
|
|
35
100
|
}), [
|
|
36
|
-
|
|
37
|
-
(
|
|
101
|
+
e.showIcon ? (i(), m("span", ve, [
|
|
102
|
+
A(s.$slots, "icon", {}, () => [
|
|
103
|
+
(i(), H(te(U.value), {
|
|
104
|
+
size: 18,
|
|
105
|
+
class: ae({ "hys-ui-toast-spinner": e.type === "loading" })
|
|
106
|
+
}, null, 8, ["class"]))
|
|
107
|
+
], !0)
|
|
108
|
+
])) : v("", !0),
|
|
109
|
+
oe("div", ye, [
|
|
110
|
+
A(s.$slots, "default", {}, () => [
|
|
111
|
+
se(V(e.message), 1)
|
|
112
|
+
], !0)
|
|
38
113
|
]),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
114
|
+
e.repeat > 1 ? (i(), m("span", {
|
|
115
|
+
key: 1,
|
|
116
|
+
class: "hys-ui-toast-repeat",
|
|
117
|
+
"aria-label": "重复 " + e.repeat + " 次"
|
|
118
|
+
}, "×" + V(e.repeat), 9, pe)) : v("", !0),
|
|
119
|
+
s.$slots.action ? (i(), m("span", he, [
|
|
120
|
+
A(s.$slots, "action", { close: n }, void 0, !0)
|
|
121
|
+
])) : v("", !0),
|
|
122
|
+
e.closable ? (i(), m("button", {
|
|
123
|
+
key: 3,
|
|
124
|
+
class: "hys-ui-toast-close",
|
|
42
125
|
type: "button",
|
|
43
126
|
"aria-label": "关闭提示",
|
|
44
|
-
onClick:
|
|
127
|
+
onClick: n
|
|
45
128
|
}, [
|
|
46
|
-
|
|
47
|
-
])) :
|
|
48
|
-
], 16,
|
|
129
|
+
O(x(fe), { size: 14 })
|
|
130
|
+
])) : v("", !0)
|
|
131
|
+
], 16, me)) : v("", !0)
|
|
49
132
|
]),
|
|
50
|
-
_:
|
|
133
|
+
_: 3
|
|
51
134
|
})
|
|
52
|
-
]));
|
|
135
|
+
], 8, ["to", "disabled"]));
|
|
53
136
|
}
|
|
54
137
|
});
|
|
55
138
|
export {
|
|
56
|
-
|
|
139
|
+
ke as default
|
|
57
140
|
};
|
|
@@ -1,74 +1,79 @@
|
|
|
1
|
-
import { defineComponent as C, useModel as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as C, useModel as V, ref as B, watch as f, openBlock as N, createBlock as b, withCtx as s, createElementVNode as x, toDisplayString as i, createVNode as m, createTextVNode as p, mergeModels as M } from "vue";
|
|
2
|
+
import E from "../HysModal/HysModal.vue.js";
|
|
3
|
+
import v from "../HysButton/HysButton.vue.js";
|
|
4
|
+
const T = /* @__PURE__ */ C({
|
|
5
5
|
__name: "HysTour",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ M({
|
|
7
7
|
steps: {},
|
|
8
8
|
current: {},
|
|
9
|
-
closeOnEscape: { type: Boolean }
|
|
9
|
+
closeOnEscape: { type: Boolean, default: !0 }
|
|
10
10
|
}, {
|
|
11
11
|
modelValue: { type: Boolean, default: !1 },
|
|
12
12
|
modelModifiers: {}
|
|
13
13
|
}),
|
|
14
|
-
emits: /* @__PURE__ */
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
14
|
+
emits: /* @__PURE__ */ M(["finish", "close", "change", "update:current"], ["update:modelValue"]),
|
|
15
|
+
setup(l, { emit: y }) {
|
|
16
|
+
const n = l, r = V(l, "modelValue"), u = y, e = B(o(n.current ?? 0));
|
|
17
|
+
function o(t) {
|
|
18
|
+
return Math.max(0, Math.min(Math.max(0, n.steps.length - 1), Number.isFinite(t) ? Math.floor(t) : 0));
|
|
19
|
+
}
|
|
20
|
+
f(() => n.current, (t) => {
|
|
21
|
+
t !== void 0 && (e.value = o(t));
|
|
22
|
+
}), f(r, (t) => {
|
|
23
|
+
t && (e.value = o(n.current ?? 0));
|
|
24
|
+
}), f(() => n.steps.length, () => {
|
|
25
|
+
e.value = o(e.value);
|
|
21
26
|
});
|
|
22
|
-
function
|
|
23
|
-
e.value =
|
|
27
|
+
function h(t) {
|
|
28
|
+
e.value = o(t), u("change", e.value), u("update:current", e.value);
|
|
24
29
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
30
|
+
function c() {
|
|
31
|
+
r.value = !1, u("close");
|
|
27
32
|
}
|
|
28
33
|
function k() {
|
|
29
|
-
e.value >=
|
|
34
|
+
e.value >= n.steps.length - 1 ? (u("finish"), c()) : h(e.value + 1);
|
|
30
35
|
}
|
|
31
|
-
return (
|
|
32
|
-
var
|
|
33
|
-
return
|
|
34
|
-
open:
|
|
35
|
-
title: ((
|
|
36
|
-
"close-on-escape":
|
|
36
|
+
return (t, a) => {
|
|
37
|
+
var g;
|
|
38
|
+
return N(), b(E, {
|
|
39
|
+
open: r.value,
|
|
40
|
+
title: ((g = l.steps[e.value]) == null ? void 0 : g.title) || "引导",
|
|
41
|
+
"close-on-escape": l.closeOnEscape !== !1,
|
|
37
42
|
"close-on-mask": !1,
|
|
38
|
-
onClose:
|
|
43
|
+
onClose: c
|
|
39
44
|
}, {
|
|
40
|
-
footer:
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
footer: s(() => [
|
|
46
|
+
x("span", null, i(l.steps.length ? e.value + 1 : 0) + " / " + i(l.steps.length), 1),
|
|
47
|
+
m(v, {
|
|
43
48
|
variant: "ghost",
|
|
44
|
-
onClick:
|
|
49
|
+
onClick: c
|
|
45
50
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
51
|
+
default: s(() => [...a[1] || (a[1] = [
|
|
52
|
+
p("跳过", -1)
|
|
48
53
|
])]),
|
|
49
54
|
_: 1
|
|
50
55
|
}),
|
|
51
|
-
|
|
56
|
+
m(v, {
|
|
52
57
|
variant: "secondary",
|
|
53
58
|
disabled: e.value === 0,
|
|
54
|
-
onClick:
|
|
59
|
+
onClick: a[0] || (a[0] = (d) => h(e.value - 1))
|
|
55
60
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
61
|
+
default: s(() => [...a[2] || (a[2] = [
|
|
62
|
+
p("上一步", -1)
|
|
58
63
|
])]),
|
|
59
64
|
_: 1
|
|
60
65
|
}, 8, ["disabled"]),
|
|
61
|
-
|
|
62
|
-
default:
|
|
63
|
-
|
|
66
|
+
m(v, { onClick: k }, {
|
|
67
|
+
default: s(() => [
|
|
68
|
+
p(i(e.value >= l.steps.length - 1 ? "完成" : "下一步"), 1)
|
|
64
69
|
]),
|
|
65
70
|
_: 1
|
|
66
71
|
})
|
|
67
72
|
]),
|
|
68
|
-
default:
|
|
69
|
-
var
|
|
73
|
+
default: s(() => {
|
|
74
|
+
var d;
|
|
70
75
|
return [
|
|
71
|
-
|
|
76
|
+
x("p", null, i(((d = l.steps[e.value]) == null ? void 0 : d.description) || "暂无引导步骤"), 1)
|
|
72
77
|
];
|
|
73
78
|
}),
|
|
74
79
|
_: 1
|
|
@@ -77,5 +82,5 @@ const O = /* @__PURE__ */ C({
|
|
|
77
82
|
}
|
|
78
83
|
});
|
|
79
84
|
export {
|
|
80
|
-
|
|
85
|
+
T as default
|
|
81
86
|
};
|