hys-ui 0.3.0 → 0.5.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 +27 -0
- package/README.md +68 -73
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +467 -2
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas2.vue.js +166 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.js +7 -0
- package/dist/components/HysAnimatedNumber/NumberDigits/NumberDigits2.vue.js +105 -0
- package/dist/components/HysAnimatedNumber/animation/digital.js +186 -0
- package/dist/components/HysAnimatedNumber/animation/morph.js +110 -0
- package/dist/components/HysAnimatedNumber/animation/paint.js +34 -0
- package/dist/components/HysAnimatedNumber/animation/particles.js +51 -0
- package/dist/components/HysAnimatedNumber/animation/paths.js +165 -0
- package/dist/components/HysAnimatedNumber/animation/physics.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/render.js +89 -0
- package/dist/components/HysAnimatedNumber/animation/reveal.js +125 -0
- package/dist/components/HysAnimatedNumber/animation/rolling.js +66 -0
- package/dist/components/HysAnimatedNumber/animation/scenarios.js +217 -0
- package/dist/components/HysAnimatedNumber/animation/spatial.js +112 -0
- package/dist/components/HysAnimatedNumber/useNumberCountdown.js +58 -0
- package/dist/components/HysAnimatedNumber/useNumberVisuals.js +60 -0
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +227 -60
- package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
- package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
- package/dist/components/HysFormItem/HysFormItem.vue.js +1 -1
- package/dist/components/HysFormItem/HysFormItem2.vue.js +231 -229
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +327 -274
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +1092 -154
- package/dist/components/HysModal/HysModal.vue.js +3 -3
- package/dist/components/HysModal/HysModal2.vue.js +81 -80
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
- package/dist/components/HysSearch/HysSearch.vue.js +5 -82
- package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +472 -443
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
- package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1418 -1150
- package/dist/components/HysTextarea/HysTextarea.vue.js +56 -32
- package/dist/components/HysTour/HysTour.vue.js +291 -67
- package/dist/components/HysTour/HysTour3.vue.js +5 -0
- package/dist/composables/animatedNumberDigits.js +106 -0
- package/dist/composables/animatedNumberFormat.js +222 -0
- package/dist/composables/animatedNumberTiming.js +66 -0
- package/dist/composables/buttonGroup.js +12 -0
- package/dist/composables/floatingPosition.js +18 -0
- package/dist/composables/mentionDocument.js +79 -0
- package/dist/composables/mentionEditor.js +58 -0
- package/dist/composables/numberAnimation.js +72 -0
- package/dist/composables/numberAnimationCatalog.js +301 -0
- package/dist/composables/numberAnimationSequence.js +45 -0
- package/dist/composables/selectOptions.js +44 -38
- package/dist/composables/splitPaneSizes.js +58 -0
- package/dist/composables/table.js +128 -105
- package/dist/composables/textInput.js +23 -14
- package/dist/composables/useDialog.js +50 -50
- package/dist/composables/useFloating.js +107 -103
- package/dist/composables/useHysAnimatedNumber.js +264 -0
- package/dist/composables/useHysNumberAnimationGroup.js +23 -0
- package/dist/composables/useMentionCaret.js +81 -0
- package/dist/composables/useMentionList.js +81 -0
- package/dist/composables/useMentionModel.js +90 -0
- package/dist/composables/useMentionOptions.js +421 -0
- package/dist/composables/useSplitPaneDrag.js +52 -0
- package/dist/composables/useSplitPaneStorage.js +38 -0
- package/dist/composables/useTable.js +344 -312
- package/dist/composables/useTableSticky.js +79 -0
- package/dist/composables/useTextareaSize.js +62 -46
- package/dist/composables/useTourLayout.js +129 -0
- package/dist/config.js +11 -11
- package/dist/index.js +183 -152
- package/dist/internal/MultiSplitPane.vue.js +305 -0
- package/dist/internal/MultiSplitPane2.vue.js +4 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +99 -6
- package/dist/types/components/HysAnimatedNumber/NumberAnimationCanvas/NumberAnimationCanvas.vue.d.ts +19 -0
- package/dist/types/components/HysAnimatedNumber/NumberDigits/NumberDigits.vue.d.ts +31 -0
- package/dist/types/components/HysAnimatedNumber/animation/digital.d.ts +3 -0
- package/dist/types/components/HysAnimatedNumber/animation/morph.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/paint.d.ts +44 -0
- package/dist/types/components/HysAnimatedNumber/animation/particles.d.ts +5 -0
- package/dist/types/components/HysAnimatedNumber/animation/paths.d.ts +12 -0
- package/dist/types/components/HysAnimatedNumber/animation/physics.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/render.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/reveal.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/rolling.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/animation/scenarios.d.ts +4 -0
- package/dist/types/components/HysAnimatedNumber/animation/spatial.d.ts +2 -0
- package/dist/types/components/HysAnimatedNumber/useNumberCountdown.d.ts +8 -0
- package/dist/types/components/HysAnimatedNumber/useNumberVisuals.d.ts +12 -0
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +12 -3
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +2 -2
- package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
- package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
- package/dist/types/components/HysCard/HysCard.vue.d.ts +1 -1
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +3 -3
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +3 -3
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +3 -3
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +2 -2
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +6 -6
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +3 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +2 -2
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysInput/HysInput.vue.d.ts +13 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -40
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +1 -1
- package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +46 -8
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +6 -1
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +2 -2
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTable/HysTable.vue.d.ts +1740 -3
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +1 -1
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +1 -1
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +13 -2
- package/dist/types/components/HysToast/HysToast.vue.d.ts +1 -1
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +1 -1
- package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -9
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +3 -3
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +2 -2
- package/dist/types/composables/animatedNumber.d.ts +220 -0
- package/dist/types/composables/animatedNumberDigits.d.ts +32 -0
- package/dist/types/composables/animatedNumberFormat.d.ts +16 -0
- package/dist/types/composables/animatedNumberTiming.d.ts +21 -0
- package/dist/types/composables/buttonGroup.d.ts +9 -0
- package/dist/types/composables/drawer.d.ts +1 -1
- package/dist/types/composables/floatingPosition.d.ts +14 -0
- package/dist/types/composables/mention.d.ts +284 -0
- package/dist/types/composables/mentionDocument.d.ts +15 -0
- package/dist/types/composables/mentionEditor.d.ts +7 -0
- package/dist/types/composables/modal.d.ts +2 -0
- package/dist/types/composables/numberAnimation.d.ts +29 -0
- package/dist/types/composables/numberAnimationCatalog.d.ts +58 -0
- package/dist/types/composables/numberAnimationSequence.d.ts +13 -0
- package/dist/types/composables/selectOptions.d.ts +5 -0
- package/dist/types/composables/splitPaneSizes.d.ts +11 -0
- package/dist/types/composables/table.d.ts +116 -6
- package/dist/types/composables/textInput.d.ts +39 -4
- package/dist/types/composables/tour.d.ts +68 -0
- package/dist/types/composables/useFloating.d.ts +1 -1
- package/dist/types/composables/useHysAnimatedNumber.d.ts +37 -0
- package/dist/types/composables/useHysNumberAnimationGroup.d.ts +4 -0
- package/dist/types/composables/useMentionCaret.d.ts +6 -0
- package/dist/types/composables/useMentionList.d.ts +23 -0
- package/dist/types/composables/useMentionModel.d.ts +14 -0
- package/dist/types/composables/useMentionOptions.d.ts +26 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
- package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
- package/dist/types/composables/useTable.d.ts +7 -3
- package/dist/types/composables/useTableSticky.d.ts +22 -0
- package/dist/types/composables/useTextareaSize.d.ts +5 -2
- package/dist/types/composables/useTourLayout.d.ts +33 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +46 -1
- package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
- package/package.json +3 -2
- package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
- package/dist/components/HysTour/HysTour2.vue.js +0 -4
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { X as
|
|
3
|
-
import { useHysControlState as
|
|
4
|
-
import { useHysRootAttrs as
|
|
5
|
-
import { textLengthLimit as
|
|
6
|
-
import { useTextareaSize as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as Je, inject as $e, useAttrs as Qe, ref as z, useId as ie, computed as r, watch as G, onMounted as Ye, onActivated as Ze, onDeactivated as _e, onBeforeUnmount as et, openBlock as f, createElementBlock as w, mergeProps as Oe, unref as n, toDisplayString as I, createCommentVNode as x, createElementVNode as se, normalizeClass as Q, renderSlot as E, createTextVNode as Y, createBlock as N, resolveDynamicComponent as K, isRef as tt, withModifiers as Ae, nextTick as re } from "vue";
|
|
2
|
+
import { X as at, EyeOff as ot, Eye as nt } from "lucide-vue-next";
|
|
3
|
+
import { useHysControlState as lt, fieldKey as ut, formKey as it } from "../../composables/formContext.js";
|
|
4
|
+
import { useHysRootAttrs as st } from "../../config.js";
|
|
5
|
+
import { textLengthLimit as je, textCount as Re, textInputSize as rt, textLimit as dt, modelText as vt } from "../../composables/textInput.js";
|
|
6
|
+
import { useTextareaSize as ct } from "../../composables/useTextareaSize.js";
|
|
7
|
+
const ft = ["data-hys-ui-validate-event"], mt = ["for"], pt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "hys-ui-input-addon"
|
|
10
|
-
},
|
|
10
|
+
}, yt = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "hys-ui-input-affix hys-ui-input-prefix"
|
|
13
|
-
},
|
|
13
|
+
}, ht = { class: "hys-ui-input-trailing" }, bt = ["aria-label", "aria-pressed", "disabled"], wt = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "hys-ui-input-affix"
|
|
16
|
-
},
|
|
16
|
+
}, gt = ["id"], xt = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "hys-ui-input-addon"
|
|
19
|
-
},
|
|
19
|
+
}, Pt = ["name", "form", "value", "disabled"], Bt = ["id"], Vt = ["id"], It = /* @__PURE__ */ Je({
|
|
20
20
|
inheritAttrs: !1,
|
|
21
21
|
__name: "HysInput",
|
|
22
22
|
props: {
|
|
23
23
|
modelValue: {},
|
|
24
|
+
modelModifiers: {},
|
|
24
25
|
defaultValue: {},
|
|
25
26
|
placeholder: {},
|
|
26
27
|
type: { default: "text" },
|
|
@@ -30,7 +31,10 @@ const ut = ["for"], it = {
|
|
|
30
31
|
ariaLabel: {},
|
|
31
32
|
error: {},
|
|
32
33
|
status: {},
|
|
33
|
-
clearable: { type: Boolean },
|
|
34
|
+
clearable: { type: Boolean, default: void 0 },
|
|
35
|
+
allowClear: { type: Boolean },
|
|
36
|
+
addonBefore: {},
|
|
37
|
+
addonAfter: {},
|
|
34
38
|
clearIcon: {},
|
|
35
39
|
prefixIcon: {},
|
|
36
40
|
suffixIcon: {},
|
|
@@ -55,75 +59,93 @@ const ut = ["for"], it = {
|
|
|
55
59
|
autosize: { type: [Boolean, Object] },
|
|
56
60
|
resize: { default: "vertical" },
|
|
57
61
|
inputProps: {},
|
|
62
|
+
inputStyle: { type: [Boolean, null, String, Object, Array] },
|
|
63
|
+
inputmode: {},
|
|
64
|
+
tabindex: {},
|
|
65
|
+
form: {},
|
|
66
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
58
67
|
autofocus: { type: Boolean },
|
|
59
68
|
selectOnFocus: { type: Boolean },
|
|
60
69
|
bordered: { type: Boolean, default: !0 },
|
|
61
70
|
round: { type: Boolean }
|
|
62
71
|
},
|
|
63
|
-
emits: ["update:modelValue", "input", "change", "clear", "focus", "blur", "pressEnter", "compositionstart", "compositionupdate", "compositionend", "update:passwordVisible", "passwordVisibleChange"],
|
|
64
|
-
setup(o, { expose:
|
|
65
|
-
const
|
|
66
|
-
()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
emits: ["update:modelValue", "input", "change", "clear", "focus", "blur", "pressEnter", "keydown", "mouseenter", "mouseleave", "compositionstart", "compositionupdate", "compositionend", "update:passwordVisible", "passwordVisibleChange"],
|
|
73
|
+
setup(o, { expose: Te, emit: De }) {
|
|
74
|
+
const t = o, d = De, { disabled: v, size: de } = lt({
|
|
75
|
+
get disabled() {
|
|
76
|
+
return t.disabled;
|
|
77
|
+
},
|
|
78
|
+
get size() {
|
|
79
|
+
return rt(t.size);
|
|
80
|
+
}
|
|
81
|
+
}), u = $e(ut, void 0), Z = $e(it, void 0), Fe = st(), S = Qe(), s = z(), ve = ie(), Ge = ie(), _ = ie(), ce = z(String(t.defaultValue ?? "")), m = r(
|
|
82
|
+
() => t.modelValue === void 0 ? ce.value : String(t.modelValue ?? "")
|
|
83
|
+
), p = z(!1), q = z(""), L = z(), M = z(t.defaultPasswordVisible), k = r(
|
|
84
|
+
() => t.passwordVisible ?? M.value ?? !1
|
|
85
|
+
), C = r(() => t.type === "textarea"), b = r(() => je(t.maxlength)), H = r(() => je(t.minlength)), $ = r(() => L.value ?? m.value), O = r(() => Re($.value, t.countGraphemes)), ee = r(
|
|
86
|
+
() => b.value !== void 0 && O.value > b.value
|
|
87
|
+
), fe = r(
|
|
72
88
|
() => {
|
|
73
89
|
var e;
|
|
74
|
-
return !!(
|
|
90
|
+
return !!(t.error || (e = u == null ? void 0 : u.invalid) != null && e.value || u != null && u.error.value || t.status === "error" || ee.value);
|
|
75
91
|
}
|
|
76
|
-
),
|
|
92
|
+
), me = r(
|
|
77
93
|
() => {
|
|
78
94
|
var e;
|
|
79
|
-
return
|
|
95
|
+
return fe.value ? "error" : t.status ?? ((e = u == null ? void 0 : u.status) == null ? void 0 : e.value);
|
|
80
96
|
}
|
|
81
|
-
),
|
|
97
|
+
), pe = r(
|
|
82
98
|
() => {
|
|
83
99
|
var e;
|
|
84
|
-
return
|
|
100
|
+
return S.id || ((e = t.inputProps) == null ? void 0 : e.id) || (u == null ? void 0 : u.id.value) || (t.label ? Ge : void 0);
|
|
85
101
|
}
|
|
86
|
-
),
|
|
87
|
-
() => (
|
|
88
|
-
),
|
|
89
|
-
() => !!(
|
|
90
|
-
),
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
), te = r(() => !!(t.showCount || t.showWordLimit)), ye = r(
|
|
103
|
+
() => (t.wordLimitPosition ?? t.countPosition) === "outside"
|
|
104
|
+
), W = r(
|
|
105
|
+
() => !!(t.countGraphemes || t.formatter || t.parser)
|
|
106
|
+
), ae = r(() => {
|
|
107
|
+
var e;
|
|
108
|
+
return t.name ?? ((e = t.inputProps) == null ? void 0 : e.name);
|
|
109
|
+
}), he = r(() => {
|
|
110
|
+
var e;
|
|
111
|
+
return t.form ?? ((e = t.inputProps) == null ? void 0 : e.form);
|
|
112
|
+
}), be = r(
|
|
113
|
+
() => !!(t.formatter || t.parser) && !!ae.value
|
|
114
|
+
), we = r(() => {
|
|
93
115
|
try {
|
|
94
|
-
if (typeof
|
|
95
|
-
return
|
|
96
|
-
value:
|
|
97
|
-
count:
|
|
98
|
-
maxLength:
|
|
116
|
+
if (typeof t.showCount == "object")
|
|
117
|
+
return t.showCount.formatter({
|
|
118
|
+
value: $.value,
|
|
119
|
+
count: O.value,
|
|
120
|
+
maxLength: b.value
|
|
99
121
|
});
|
|
100
122
|
} catch {
|
|
101
123
|
}
|
|
102
|
-
return String(
|
|
124
|
+
return String(O.value) + (b.value === void 0 ? "" : " / " + b.value);
|
|
103
125
|
});
|
|
104
|
-
let
|
|
105
|
-
function
|
|
126
|
+
let B = !0, U = 0, A, ge = "", P, j, R = m.value;
|
|
127
|
+
function oe(e, a = !1, l = e) {
|
|
106
128
|
try {
|
|
107
|
-
return
|
|
129
|
+
return t.formatter ? String(t.formatter(e, { userTyping: a, input: l })) : e;
|
|
108
130
|
} catch {
|
|
109
131
|
return e;
|
|
110
132
|
}
|
|
111
133
|
}
|
|
112
|
-
function
|
|
113
|
-
const
|
|
114
|
-
if (typeof
|
|
134
|
+
function ne(e) {
|
|
135
|
+
const a = t.parser ? t.parser(e) : e;
|
|
136
|
+
if (typeof a != "string" && (typeof a != "number" || !Number.isFinite(a)))
|
|
115
137
|
throw Error("Invalid input parser result");
|
|
116
|
-
return String(
|
|
138
|
+
return String(a);
|
|
117
139
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
140
|
+
function X(e) {
|
|
141
|
+
q.value = e, ge = e, s.value && s.value.value !== e && (s.value.value = e);
|
|
120
142
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
143
|
+
function V() {
|
|
144
|
+
L.value = void 0, X(oe(m.value));
|
|
123
145
|
}
|
|
124
|
-
function
|
|
146
|
+
function Ne() {
|
|
125
147
|
return Object.fromEntries(
|
|
126
|
-
Object.entries({ ...
|
|
148
|
+
Object.entries({ ...t.inputProps, ...S }).filter(
|
|
127
149
|
([e]) => ![
|
|
128
150
|
"class",
|
|
129
151
|
"style",
|
|
@@ -135,372 +157,403 @@ const ut = ["for"], it = {
|
|
|
135
157
|
)
|
|
136
158
|
);
|
|
137
159
|
}
|
|
138
|
-
function
|
|
139
|
-
const e =
|
|
160
|
+
function T() {
|
|
161
|
+
const e = s.value;
|
|
140
162
|
if (!e) return;
|
|
141
|
-
const
|
|
163
|
+
const a = Re(m.value, t.countGraphemes);
|
|
142
164
|
e.setCustomValidity(
|
|
143
|
-
|
|
165
|
+
W.value && m.value && H.value !== void 0 && a < H.value ? "请至少输入 " + H.value + " 个字符" : W.value && b.value !== void 0 && a > b.value ? "请最多输入 " + b.value + " 个字符" : ""
|
|
144
166
|
);
|
|
145
167
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
168
|
+
function le(e, a = !0) {
|
|
169
|
+
var i;
|
|
170
|
+
const l = ++U, c = vt(e, t.modelModifiers), y = t.validateEvent || (i = u == null ? void 0 : u.deferChangeValidation) == null ? void 0 : i.call(u);
|
|
171
|
+
A = c, t.modelValue === void 0 && (ce.value = c), d("update:modelValue", e), a && d("input", e), re(() => {
|
|
172
|
+
y == null || y(), !(l !== U || !B) && (m.value !== c && V(), A = void 0, T());
|
|
150
173
|
});
|
|
151
174
|
}
|
|
152
|
-
function
|
|
153
|
-
if (!
|
|
175
|
+
function Ke(e, a, l) {
|
|
176
|
+
if (!t.parser)
|
|
154
177
|
return Math.max(
|
|
155
178
|
0,
|
|
156
179
|
Math.min(
|
|
157
|
-
|
|
158
|
-
|
|
180
|
+
a.length,
|
|
181
|
+
a.length - (e.length - l)
|
|
159
182
|
)
|
|
160
183
|
);
|
|
161
184
|
try {
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
164
|
-
return Math.max(0,
|
|
165
|
-
let
|
|
166
|
-
for (;
|
|
167
|
-
const
|
|
168
|
-
|
|
185
|
+
const c = ne(e.slice(0, l)).length;
|
|
186
|
+
if (!c)
|
|
187
|
+
return Math.max(0, a.length - (e.length - l));
|
|
188
|
+
let y = 0, i = a.length;
|
|
189
|
+
for (; y < i; ) {
|
|
190
|
+
const h = Math.floor((y + i) / 2);
|
|
191
|
+
ne(a.slice(0, h)).length >= c ? i = h : y = h + 1;
|
|
169
192
|
}
|
|
170
|
-
return
|
|
193
|
+
return y;
|
|
171
194
|
} catch {
|
|
172
|
-
return Math.min(
|
|
195
|
+
return Math.min(l, a.length);
|
|
173
196
|
}
|
|
174
197
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
198
|
+
function xe(e) {
|
|
199
|
+
var y;
|
|
200
|
+
const a = e.target;
|
|
201
|
+
if (!B || v.value || t.readonly) {
|
|
202
|
+
V();
|
|
179
203
|
return;
|
|
180
204
|
}
|
|
181
|
-
if (
|
|
182
|
-
|
|
205
|
+
if (p.value) {
|
|
206
|
+
q.value = a.value;
|
|
183
207
|
return;
|
|
184
208
|
}
|
|
185
|
-
if (
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
209
|
+
if (P !== void 0) {
|
|
210
|
+
const i = P === a.value;
|
|
211
|
+
if (P = void 0, i) return;
|
|
188
212
|
}
|
|
189
|
-
const
|
|
213
|
+
const l = a.value, c = a.selectionStart;
|
|
190
214
|
try {
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
215
|
+
const i = dt(
|
|
216
|
+
ne(l),
|
|
217
|
+
b.value,
|
|
218
|
+
t.countGraphemes
|
|
195
219
|
);
|
|
196
|
-
if (
|
|
220
|
+
if (t.allowInput && !t.allowInput(i))
|
|
197
221
|
throw Error("Rejected input");
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
222
|
+
const h = oe(i, !0, l);
|
|
223
|
+
if (X(h), c !== null && h !== l)
|
|
200
224
|
try {
|
|
201
|
-
const
|
|
202
|
-
|
|
225
|
+
const F = Ke(l, h, c);
|
|
226
|
+
a.setSelectionRange(F, F);
|
|
203
227
|
} catch {
|
|
204
228
|
}
|
|
205
|
-
|
|
229
|
+
(y = t.modelModifiers) != null && y.lazy ? (L.value = i, d("input", i)) : le(i);
|
|
206
230
|
} catch {
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
231
|
+
const i = ge;
|
|
232
|
+
if (X(i), c !== null)
|
|
209
233
|
try {
|
|
210
|
-
const
|
|
234
|
+
const h = Math.max(
|
|
211
235
|
0,
|
|
212
|
-
|
|
236
|
+
c - (l.length - i.length)
|
|
213
237
|
);
|
|
214
|
-
|
|
238
|
+
a.setSelectionRange(h, h);
|
|
215
239
|
} catch {
|
|
216
240
|
}
|
|
217
241
|
}
|
|
218
242
|
}
|
|
219
|
-
function
|
|
243
|
+
function Pe() {
|
|
220
244
|
var e;
|
|
221
|
-
!
|
|
245
|
+
!B || v.value || t.readonly || (p.value = !1, P = void 0, L.value = void 0, X(oe("")), le(""), R = "", d("change", ""), d("clear"), (e = s.value) == null || e.focus());
|
|
246
|
+
}
|
|
247
|
+
async function ue() {
|
|
248
|
+
if (!(!B || v.value || t.readonly || p.value)) {
|
|
249
|
+
if (L.value !== void 0) {
|
|
250
|
+
const e = L.value;
|
|
251
|
+
L.value = void 0, le(e, !1);
|
|
252
|
+
}
|
|
253
|
+
await re(), !(!B || v.value || t.readonly || p.value) && (V(), T(), R !== m.value && (R = m.value, d("change", m.value)));
|
|
254
|
+
}
|
|
222
255
|
}
|
|
223
|
-
|
|
224
|
-
|
|
256
|
+
function qe(e) {
|
|
257
|
+
d("keydown", e), !(e.key !== "Enter" || e.defaultPrevented || e.isComposing || p.value || e.keyCode === 229) && (C.value || ue(), d("pressEnter", e));
|
|
225
258
|
}
|
|
226
|
-
function
|
|
227
|
-
var
|
|
228
|
-
|
|
259
|
+
function He(e) {
|
|
260
|
+
var a;
|
|
261
|
+
p.value && (p.value = !1, d("compositionend", e), xe(e), P = (a = s.value) == null ? void 0 : a.value);
|
|
229
262
|
}
|
|
230
|
-
function
|
|
231
|
-
|
|
263
|
+
function J(e) {
|
|
264
|
+
v.value || !B || (t.passwordVisible === void 0 && (M.value = e), d("update:passwordVisible", e), d("passwordVisibleChange", e));
|
|
232
265
|
}
|
|
233
|
-
async function
|
|
234
|
-
if (
|
|
235
|
-
const e =
|
|
236
|
-
if (
|
|
266
|
+
async function We() {
|
|
267
|
+
if (v.value || t.showPasswordOn === "mousedown") return;
|
|
268
|
+
const e = s.value, a = e == null ? void 0 : e.selectionStart, l = e == null ? void 0 : e.selectionEnd;
|
|
269
|
+
if (J(!k.value), await re(), !(!B || v.value) && (e == null || e.focus({ preventScroll: !0 }), a != null && l != null))
|
|
237
270
|
try {
|
|
238
|
-
e == null || e.setSelectionRange(
|
|
271
|
+
e == null || e.setSelectionRange(a, l);
|
|
239
272
|
} catch {
|
|
240
273
|
}
|
|
241
274
|
}
|
|
242
|
-
function
|
|
243
|
-
|
|
275
|
+
function D() {
|
|
276
|
+
j == null || j(), j = void 0;
|
|
244
277
|
}
|
|
245
|
-
function
|
|
246
|
-
if (e.button !== 0 ||
|
|
278
|
+
function Ue(e) {
|
|
279
|
+
if (e.button !== 0 || t.showPasswordOn !== "mousedown" || v.value)
|
|
247
280
|
return;
|
|
248
|
-
e.preventDefault(),
|
|
249
|
-
const
|
|
250
|
-
|
|
281
|
+
e.preventDefault(), D(), J(!0);
|
|
282
|
+
const a = () => {
|
|
283
|
+
J(!1), D();
|
|
251
284
|
};
|
|
252
|
-
document.addEventListener("pointerup",
|
|
253
|
-
document.removeEventListener("pointerup",
|
|
285
|
+
document.addEventListener("pointerup", a, !0), document.addEventListener("pointercancel", a, !0), window.addEventListener("blur", a), j = () => {
|
|
286
|
+
document.removeEventListener("pointerup", a, !0), document.removeEventListener("pointercancel", a, !0), window.removeEventListener("blur", a);
|
|
254
287
|
};
|
|
255
288
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
289
|
+
function Xe(e) {
|
|
290
|
+
t.showPasswordOn === "mousedown" && [" ", "Enter"].includes(e.key) && (e.preventDefault(), J(!k.value));
|
|
258
291
|
}
|
|
259
|
-
const
|
|
260
|
-
function
|
|
261
|
-
|
|
292
|
+
const { resize: Be, textareaStyle: Ve } = ct(s, t, de, q);
|
|
293
|
+
function ke() {
|
|
294
|
+
D(), B = !1, U++, A = void 0, p.value = !1, P = void 0, M.value = !1, V();
|
|
262
295
|
}
|
|
263
|
-
return
|
|
264
|
-
|
|
296
|
+
return G(
|
|
297
|
+
m,
|
|
265
298
|
() => {
|
|
266
|
-
|
|
299
|
+
A !== m.value && (p.value = !1, V(), R = m.value), T();
|
|
267
300
|
},
|
|
268
301
|
{ flush: "sync" }
|
|
269
|
-
),
|
|
270
|
-
() =>
|
|
302
|
+
), G(
|
|
303
|
+
() => {
|
|
304
|
+
var e;
|
|
305
|
+
return [t.formatter, t.parser, t.type, (e = t.modelModifiers) == null ? void 0 : e.lazy];
|
|
306
|
+
},
|
|
271
307
|
() => {
|
|
272
|
-
|
|
308
|
+
p.value = !1, V(), D(), M.value = !1;
|
|
273
309
|
}
|
|
274
|
-
),
|
|
275
|
-
() => [
|
|
310
|
+
), G(
|
|
311
|
+
() => [v.value, t.readonly],
|
|
276
312
|
() => {
|
|
277
|
-
(
|
|
313
|
+
(v.value || t.readonly) && (D(), M.value = !1, p.value = !1, V());
|
|
278
314
|
}
|
|
279
|
-
),
|
|
280
|
-
() => [
|
|
281
|
-
|
|
282
|
-
),
|
|
283
|
-
() =>
|
|
315
|
+
), G(
|
|
316
|
+
() => [t.countGraphemes, t.maxlength, t.minlength],
|
|
317
|
+
T
|
|
318
|
+
), G(
|
|
319
|
+
() => Z == null ? void 0 : Z.resetting.value,
|
|
284
320
|
(e) => {
|
|
285
|
-
e && (
|
|
321
|
+
e && (U++, A = void 0, p.value = !1, P = void 0, V(), R = m.value);
|
|
286
322
|
},
|
|
287
323
|
{ flush: "sync" }
|
|
288
|
-
),
|
|
324
|
+
), Ye(() => {
|
|
289
325
|
var e;
|
|
290
|
-
|
|
291
|
-
}),
|
|
292
|
-
|
|
293
|
-
}),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
326
|
+
V(), T(), t.autofocus && !v.value && ((e = s.value) == null || e.focus());
|
|
327
|
+
}), Ze(() => {
|
|
328
|
+
B = !0;
|
|
329
|
+
}), _e(ke), et(ke), Te({
|
|
330
|
+
element: s,
|
|
331
|
+
input: s,
|
|
332
|
+
textarea: r(
|
|
333
|
+
() => C.value ? s.value : void 0
|
|
297
334
|
),
|
|
298
|
-
isComposing:
|
|
335
|
+
isComposing: p,
|
|
336
|
+
passwordVisible: k,
|
|
337
|
+
textareaStyle: Ve,
|
|
299
338
|
focus: (e) => {
|
|
300
|
-
var
|
|
301
|
-
|
|
339
|
+
var a;
|
|
340
|
+
v.value || (a = s.value) == null || a.focus(e);
|
|
302
341
|
},
|
|
303
342
|
blur: () => {
|
|
304
343
|
var e;
|
|
305
|
-
return (e =
|
|
344
|
+
return (e = s.value) == null ? void 0 : e.blur();
|
|
306
345
|
},
|
|
307
346
|
select: () => {
|
|
308
347
|
var e;
|
|
309
|
-
return (e =
|
|
348
|
+
return (e = s.value) == null ? void 0 : e.select();
|
|
310
349
|
},
|
|
311
|
-
clear:
|
|
312
|
-
resize:
|
|
313
|
-
|
|
314
|
-
|
|
350
|
+
clear: Pe,
|
|
351
|
+
resize: Be,
|
|
352
|
+
resizeTextarea: Be,
|
|
353
|
+
setSelectionRange: (e, a, l) => {
|
|
354
|
+
var c;
|
|
315
355
|
try {
|
|
316
|
-
(
|
|
356
|
+
(c = s.value) == null || c.setSelectionRange(e, a, l);
|
|
317
357
|
} catch {
|
|
318
358
|
}
|
|
319
359
|
},
|
|
320
360
|
scrollTo: (e) => {
|
|
321
|
-
var
|
|
322
|
-
return (
|
|
361
|
+
var a;
|
|
362
|
+
return (a = s.value) == null ? void 0 : a.scrollTo(e);
|
|
323
363
|
}
|
|
324
|
-
}), (e,
|
|
325
|
-
var
|
|
326
|
-
return
|
|
364
|
+
}), (e, a) => {
|
|
365
|
+
var l, c, y, i, h, F, Ce, Ee, Le, Se, ze, Ie;
|
|
366
|
+
return f(), w("div", Oe(n(Fe), {
|
|
327
367
|
class: ["hys-ui-input-wrap", [
|
|
328
|
-
n(
|
|
329
|
-
"hys-ui-input-" + n(
|
|
330
|
-
{ "hys-ui-input-disabled": n(
|
|
368
|
+
n(S).class,
|
|
369
|
+
"hys-ui-input-" + n(de),
|
|
370
|
+
{ "hys-ui-input-disabled": n(v), "hys-ui-input-textarea": C.value }
|
|
331
371
|
]],
|
|
332
|
-
style: n(
|
|
372
|
+
style: n(S).style,
|
|
373
|
+
"data-hys-ui-validate-event": o.validateEvent ? void 0 : "off",
|
|
374
|
+
onMouseenter: a[6] || (a[6] = (g) => d("mouseenter", g)),
|
|
375
|
+
onMouseleave: a[7] || (a[7] = (g) => d("mouseleave", g))
|
|
333
376
|
}), [
|
|
334
|
-
o.label ? (
|
|
377
|
+
o.label ? (f(), w("label", {
|
|
335
378
|
key: 0,
|
|
336
379
|
class: "hys-ui-input-label",
|
|
337
|
-
for:
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
class:
|
|
341
|
-
"hys-ui-input-has-prepend": e.$slots.prepend,
|
|
342
|
-
"hys-ui-input-has-append": e.$slots.append
|
|
380
|
+
for: pe.value
|
|
381
|
+
}, I(o.label), 9, mt)) : x("", !0),
|
|
382
|
+
se("div", {
|
|
383
|
+
class: Q(["hys-ui-input-group", {
|
|
384
|
+
"hys-ui-input-has-prepend": e.$slots.prepend || o.addonBefore,
|
|
385
|
+
"hys-ui-input-has-append": e.$slots.append || o.addonAfter
|
|
343
386
|
}])
|
|
344
387
|
}, [
|
|
345
|
-
e.$slots.prepend ? (
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
388
|
+
e.$slots.prepend || o.addonBefore ? (f(), w("div", pt, [
|
|
389
|
+
E(e.$slots, "prepend", {}, () => [
|
|
390
|
+
Y(I(o.addonBefore), 1)
|
|
391
|
+
], !0)
|
|
392
|
+
])) : x("", !0),
|
|
393
|
+
se("div", {
|
|
394
|
+
class: Q(["hys-ui-input-shell", [
|
|
395
|
+
me.value ? "hys-ui-input-shell-" + me.value : "",
|
|
351
396
|
{ "hys-ui-input-borderless": !o.bordered, "hys-ui-input-round": o.round }
|
|
352
397
|
]])
|
|
353
398
|
}, [
|
|
354
|
-
(
|
|
399
|
+
(f(), N(K(C.value ? "textarea" : "input"), Oe({
|
|
355
400
|
ref_key: "input",
|
|
356
|
-
ref:
|
|
357
|
-
},
|
|
358
|
-
id:
|
|
401
|
+
ref: s
|
|
402
|
+
}, Ne(), {
|
|
403
|
+
id: pe.value,
|
|
359
404
|
class: [
|
|
360
|
-
(
|
|
361
|
-
|
|
405
|
+
(l = o.inputProps) == null ? void 0 : l.class,
|
|
406
|
+
C.value ? "hys-ui-input hys-ui-ex-control" : "hys-ui-input"
|
|
362
407
|
],
|
|
363
408
|
"data-hys-ui-field-managed": "",
|
|
364
|
-
"aria-label": o.ariaLabel || n(
|
|
365
|
-
"aria-invalid":
|
|
366
|
-
"aria-required": ((
|
|
409
|
+
"aria-label": o.ariaLabel || n(S)["aria-label"] || ((c = n(u)) == null ? void 0 : c.label.value) || (o.label || (y = o.inputProps) == null ? void 0 : y["aria-label"]),
|
|
410
|
+
"aria-invalid": fe.value || void 0,
|
|
411
|
+
"aria-required": ((i = n(u)) == null ? void 0 : i.required.value) || ((h = o.inputProps) == null ? void 0 : h["aria-required"]),
|
|
367
412
|
"aria-describedby": [
|
|
368
|
-
o.error ? n(
|
|
369
|
-
n(
|
|
370
|
-
|
|
413
|
+
o.error ? n(ve) : (F = n(u)) == null ? void 0 : F.describedBy.value,
|
|
414
|
+
n(S)["aria-describedby"] || ((Ce = o.inputProps) == null ? void 0 : Ce["aria-describedby"]),
|
|
415
|
+
te.value ? n(_) : void 0
|
|
371
416
|
].filter(Boolean).join(" ") || void 0,
|
|
372
|
-
value:
|
|
373
|
-
placeholder: o.placeholder ?? ((
|
|
374
|
-
type:
|
|
375
|
-
disabled: n(
|
|
417
|
+
value: q.value,
|
|
418
|
+
placeholder: o.placeholder ?? ((Ee = o.inputProps) == null ? void 0 : Ee.placeholder),
|
|
419
|
+
type: C.value ? void 0 : o.showPassword && k.value && o.type === "password" ? "text" : o.type,
|
|
420
|
+
disabled: n(v),
|
|
376
421
|
readonly: o.readonly,
|
|
377
|
-
maxlength:
|
|
378
|
-
minlength:
|
|
379
|
-
autocomplete: o.autocomplete ?? ((
|
|
380
|
-
|
|
381
|
-
|
|
422
|
+
maxlength: W.value ? void 0 : b.value,
|
|
423
|
+
minlength: W.value ? void 0 : H.value,
|
|
424
|
+
autocomplete: o.autocomplete ?? ((Le = o.inputProps) == null ? void 0 : Le.autocomplete),
|
|
425
|
+
inputmode: o.inputmode ?? ((Se = o.inputProps) == null ? void 0 : Se.inputmode),
|
|
426
|
+
tabindex: o.tabindex ?? ((ze = o.inputProps) == null ? void 0 : ze.tabindex),
|
|
427
|
+
form: he.value,
|
|
428
|
+
name: be.value ? void 0 : ae.value,
|
|
429
|
+
rows: C.value ? o.rows : void 0,
|
|
382
430
|
style: [
|
|
383
|
-
(
|
|
384
|
-
|
|
431
|
+
(Ie = o.inputProps) == null ? void 0 : Ie.style,
|
|
432
|
+
o.inputStyle,
|
|
433
|
+
C.value ? { resize: o.autosize ? "none" : t.resize } : void 0,
|
|
434
|
+
n(Ve)
|
|
385
435
|
],
|
|
386
|
-
onInput:
|
|
387
|
-
onCompositionstart:
|
|
388
|
-
|
|
436
|
+
onInput: xe,
|
|
437
|
+
onCompositionstart: a[0] || (a[0] = (g) => {
|
|
438
|
+
p.value = !0, tt(P) ? P.value = void 0 : P = void 0, d("compositionstart", g);
|
|
389
439
|
}),
|
|
390
|
-
onCompositionupdate:
|
|
391
|
-
onCompositionend:
|
|
392
|
-
onChange:
|
|
393
|
-
onFocus:
|
|
394
|
-
var
|
|
395
|
-
o.selectOnFocus && ((
|
|
440
|
+
onCompositionupdate: a[1] || (a[1] = (g) => d("compositionupdate", g)),
|
|
441
|
+
onCompositionend: He,
|
|
442
|
+
onChange: ue,
|
|
443
|
+
onFocus: a[2] || (a[2] = (g) => {
|
|
444
|
+
var Me;
|
|
445
|
+
o.selectOnFocus && ((Me = s.value) == null || Me.select()), d("focus", g);
|
|
396
446
|
}),
|
|
397
|
-
onBlur:
|
|
398
|
-
|
|
447
|
+
onBlur: a[3] || (a[3] = (g) => {
|
|
448
|
+
ue(), d("blur", g);
|
|
399
449
|
}),
|
|
400
|
-
onKeydown:
|
|
401
|
-
}), null, 16, ["id", "class", "aria-label", "aria-invalid", "aria-required", "aria-describedby", "value", "placeholder", "type", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "rows", "style"])),
|
|
402
|
-
e.$slots.prefix || o.prefixIcon ? (
|
|
403
|
-
|
|
404
|
-
(
|
|
450
|
+
onKeydown: qe
|
|
451
|
+
}), null, 16, ["id", "class", "aria-label", "aria-invalid", "aria-required", "aria-describedby", "value", "placeholder", "type", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "inputmode", "tabindex", "form", "name", "rows", "style"])),
|
|
452
|
+
e.$slots.prefix || o.prefixIcon ? (f(), w("span", yt, [
|
|
453
|
+
E(e.$slots, "prefix", {}, () => [
|
|
454
|
+
(f(), N(K(o.prefixIcon), {
|
|
405
455
|
size: 16,
|
|
406
456
|
"aria-hidden": "true"
|
|
407
457
|
}))
|
|
408
458
|
], !0)
|
|
409
|
-
])) :
|
|
410
|
-
|
|
411
|
-
o.clearable &&
|
|
459
|
+
])) : x("", !0),
|
|
460
|
+
se("div", ht, [
|
|
461
|
+
(o.clearable ?? o.allowClear) && $.value && !n(v) && !o.readonly ? (f(), w("button", {
|
|
412
462
|
key: 0,
|
|
413
463
|
type: "button",
|
|
414
464
|
class: "hys-ui-input-action",
|
|
415
465
|
"aria-label": "清空输入",
|
|
416
|
-
onMousedown:
|
|
466
|
+
onMousedown: a[4] || (a[4] = Ae(() => {
|
|
417
467
|
}, ["prevent"])),
|
|
418
|
-
onClick:
|
|
468
|
+
onClick: Pe
|
|
419
469
|
}, [
|
|
420
|
-
|
|
421
|
-
(
|
|
470
|
+
E(e.$slots, "clear-icon", {}, () => [
|
|
471
|
+
(f(), N(K(o.clearIcon || n(at)), {
|
|
422
472
|
size: 14,
|
|
423
473
|
"aria-hidden": "true"
|
|
424
474
|
}))
|
|
425
475
|
], !0)
|
|
426
|
-
], 32)) :
|
|
427
|
-
o.showPassword && o.type === "password" ? (
|
|
476
|
+
], 32)) : x("", !0),
|
|
477
|
+
o.showPassword && o.type === "password" ? (f(), w("button", {
|
|
428
478
|
key: 1,
|
|
429
479
|
type: "button",
|
|
430
480
|
class: "hys-ui-input-action",
|
|
431
|
-
"aria-label":
|
|
432
|
-
"aria-pressed":
|
|
433
|
-
disabled: n(
|
|
434
|
-
onMousedown:
|
|
481
|
+
"aria-label": k.value ? "隐藏密码" : "显示密码",
|
|
482
|
+
"aria-pressed": k.value,
|
|
483
|
+
disabled: n(v),
|
|
484
|
+
onMousedown: a[5] || (a[5] = Ae(() => {
|
|
435
485
|
}, ["prevent"])),
|
|
436
|
-
onPointerdown:
|
|
437
|
-
onKeydown:
|
|
438
|
-
onClick:
|
|
486
|
+
onPointerdown: Ue,
|
|
487
|
+
onKeydown: Xe,
|
|
488
|
+
onClick: We
|
|
439
489
|
}, [
|
|
440
|
-
|
|
441
|
-
(
|
|
490
|
+
E(e.$slots, "password-icon", { visible: k.value }, () => [
|
|
491
|
+
(f(), N(K(k.value ? n(ot) : n(nt)), {
|
|
442
492
|
size: 16,
|
|
443
493
|
"aria-hidden": "true"
|
|
444
494
|
}))
|
|
445
495
|
], !0)
|
|
446
|
-
], 40,
|
|
447
|
-
e.$slots.suffix || o.suffixIcon ? (
|
|
448
|
-
|
|
449
|
-
(
|
|
496
|
+
], 40, bt)) : x("", !0),
|
|
497
|
+
e.$slots.suffix || o.suffixIcon ? (f(), w("span", wt, [
|
|
498
|
+
E(e.$slots, "suffix", {}, () => [
|
|
499
|
+
(f(), N(K(o.suffixIcon), {
|
|
450
500
|
size: 16,
|
|
451
501
|
"aria-hidden": "true"
|
|
452
502
|
}))
|
|
453
503
|
], !0)
|
|
454
|
-
])) :
|
|
455
|
-
|
|
504
|
+
])) : x("", !0),
|
|
505
|
+
te.value && !ye.value ? (f(), w("small", {
|
|
456
506
|
key: 3,
|
|
457
|
-
id: n(
|
|
458
|
-
class:
|
|
507
|
+
id: n(_),
|
|
508
|
+
class: Q(["hys-ui-input-count", { "hys-ui-input-count-error": ee.value }])
|
|
459
509
|
}, [
|
|
460
|
-
|
|
461
|
-
value:
|
|
462
|
-
count:
|
|
463
|
-
maxLength:
|
|
510
|
+
E(e.$slots, "count", {
|
|
511
|
+
value: $.value,
|
|
512
|
+
count: O.value,
|
|
513
|
+
maxLength: b.value
|
|
464
514
|
}, () => [
|
|
465
|
-
|
|
515
|
+
Y(I(we.value), 1)
|
|
466
516
|
], !0)
|
|
467
|
-
], 10,
|
|
517
|
+
], 10, gt)) : x("", !0)
|
|
468
518
|
])
|
|
469
519
|
], 2),
|
|
470
|
-
e.$slots.append ? (
|
|
471
|
-
|
|
472
|
-
|
|
520
|
+
e.$slots.append || o.addonAfter ? (f(), w("div", xt, [
|
|
521
|
+
E(e.$slots, "append", {}, () => [
|
|
522
|
+
Y(I(o.addonAfter), 1)
|
|
523
|
+
], !0)
|
|
524
|
+
])) : x("", !0)
|
|
473
525
|
], 2),
|
|
474
|
-
|
|
526
|
+
be.value ? (f(), w("input", {
|
|
475
527
|
key: 1,
|
|
476
528
|
type: "hidden",
|
|
477
|
-
name:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
529
|
+
name: ae.value,
|
|
530
|
+
form: he.value,
|
|
531
|
+
value: m.value,
|
|
532
|
+
disabled: n(v)
|
|
533
|
+
}, null, 8, Pt)) : x("", !0),
|
|
534
|
+
te.value && ye.value ? (f(), w("small", {
|
|
482
535
|
key: 2,
|
|
483
|
-
id: n(
|
|
484
|
-
class:
|
|
536
|
+
id: n(_),
|
|
537
|
+
class: Q(["hys-ui-input-count hys-ui-input-count-outside", { "hys-ui-input-count-error": ee.value }])
|
|
485
538
|
}, [
|
|
486
|
-
|
|
487
|
-
value:
|
|
488
|
-
count:
|
|
489
|
-
maxLength:
|
|
539
|
+
E(e.$slots, "count", {
|
|
540
|
+
value: $.value,
|
|
541
|
+
count: O.value,
|
|
542
|
+
maxLength: b.value
|
|
490
543
|
}, () => [
|
|
491
|
-
|
|
544
|
+
Y(I(we.value), 1)
|
|
492
545
|
], !0)
|
|
493
|
-
], 10,
|
|
494
|
-
o.error ? (
|
|
546
|
+
], 10, Bt)) : x("", !0),
|
|
547
|
+
o.error ? (f(), w("small", {
|
|
495
548
|
key: 3,
|
|
496
|
-
id: n(
|
|
549
|
+
id: n(ve),
|
|
497
550
|
class: "hys-ui-error-text",
|
|
498
551
|
role: "alert"
|
|
499
|
-
},
|
|
500
|
-
], 16);
|
|
552
|
+
}, I(o.error), 9, Vt)) : x("", !0)
|
|
553
|
+
], 16, ft);
|
|
501
554
|
};
|
|
502
555
|
}
|
|
503
556
|
});
|
|
504
557
|
export {
|
|
505
|
-
|
|
558
|
+
It as default
|
|
506
559
|
};
|