ep-craft 0.1.28 → 0.1.29

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.
@@ -0,0 +1,165 @@
1
+ import { isNil as o } from "lodash-unified";
2
+ import { isNumber as r } from "../../utils/types.js";
3
+ import "@vueuse/core";
4
+ import "@vue/shared";
5
+ import { UPDATE_MODEL_EVENT as n, INPUT_EVENT as p, CHANGE_EVENT as u } from "../../constants/event.js";
6
+ import "@element-plus/icons-vue";
7
+ import { buildProps as l, definePropType as t } from "../../utils/vue/props/runtime.js";
8
+ import "vue";
9
+ import { useSizeProp as m } from "../../hooks/use-size/index.js";
10
+ import "@popperjs/core";
11
+ import "../../hooks/use-z-index/index.js";
12
+ import "../../hooks/use-delayed-toggle/index.js";
13
+ import { useAriaProps as a } from "../../hooks/use-aria/index.js";
14
+ import "../../hooks/use-model-toggle/index.js";
15
+ import "../../hooks/use-empty-values/index.js";
16
+ import { floatLabelProp as d } from "../../hooks/use-float-label/index.js";
17
+ l({
18
+ /**
19
+ * @description same as `id` in native input
20
+ */
21
+ id: {
22
+ type: String,
23
+ default: void 0
24
+ },
25
+ /**
26
+ * @description incremental step
27
+ */
28
+ step: {
29
+ type: Number,
30
+ default: 1
31
+ },
32
+ /**
33
+ * @description whether input value can only be multiple of step
34
+ */
35
+ stepStrictly: Boolean,
36
+ /**
37
+ * @description the maximum allowed value
38
+ */
39
+ max: {
40
+ type: Number,
41
+ default: Number.MAX_SAFE_INTEGER
42
+ },
43
+ /**
44
+ * @description the minimum allowed value
45
+ */
46
+ min: {
47
+ type: Number,
48
+ default: Number.MIN_SAFE_INTEGER
49
+ },
50
+ /**
51
+ * @description binding value
52
+ */
53
+ modelValue: {
54
+ type: [Number, null]
55
+ },
56
+ /**
57
+ * @description same as `readonly` in native input
58
+ */
59
+ readonly: Boolean,
60
+ /**
61
+ * @description whether the component is disabled
62
+ */
63
+ disabled: {
64
+ type: Boolean,
65
+ default: void 0
66
+ },
67
+ /**
68
+ * @description size of the component
69
+ */
70
+ size: m,
71
+ /**
72
+ * @description whether to enable the control buttons
73
+ */
74
+ controls: {
75
+ type: Boolean,
76
+ default: !0
77
+ },
78
+ /**
79
+ * @description position of the control buttons
80
+ */
81
+ controlsPosition: {
82
+ type: String,
83
+ default: "",
84
+ values: ["", "right"]
85
+ },
86
+ /**
87
+ * @description value should be set when input box is cleared
88
+ */
89
+ valueOnClear: {
90
+ type: t([String, Number, null]),
91
+ validator: (e) => e === null || r(e) || ["min", "max"].includes(e),
92
+ default: null
93
+ },
94
+ /**
95
+ * @description same as `name` in native input
96
+ */
97
+ name: String,
98
+ /**
99
+ * @description same as `placeholder` in native input
100
+ */
101
+ placeholder: String,
102
+ /**
103
+ * @description precision of input value
104
+ */
105
+ precision: {
106
+ type: Number,
107
+ validator: (e) => e >= 0 && e === Number.parseInt(`${e}`, 10)
108
+ },
109
+ /**
110
+ * @description whether to trigger form validation
111
+ */
112
+ validateEvent: {
113
+ type: Boolean,
114
+ default: !0
115
+ },
116
+ ...a(["ariaLabel"]),
117
+ /**
118
+ * @description native input mode for virtual keyboards
119
+ */
120
+ inputmode: {
121
+ type: t(String),
122
+ default: void 0
123
+ },
124
+ /**
125
+ * @description alignment for the inner input text
126
+ */
127
+ align: {
128
+ type: t(String),
129
+ default: "center"
130
+ },
131
+ /**
132
+ * @description whether to disable scientific notation input (e.g. 'e', 'E')
133
+ */
134
+ disabledScientific: Boolean,
135
+ /**
136
+ * @description specifies the format of the value presented in the input
137
+ */
138
+ formatter: {
139
+ type: Function
140
+ },
141
+ /**
142
+ * @description specifies the value extracted from the formatted input
143
+ */
144
+ parser: {
145
+ type: Function
146
+ },
147
+ /**
148
+ * @description same as `tabindex` in native input
149
+ */
150
+ tabindex: {
151
+ type: [String, Number],
152
+ default: 0
153
+ },
154
+ ...d
155
+ });
156
+ const I = {
157
+ [u]: (e, i) => i !== e,
158
+ blur: (e) => e instanceof FocusEvent,
159
+ focus: (e) => e instanceof FocusEvent,
160
+ [p]: (e) => r(e) || o(e),
161
+ [n]: (e) => r(e) || o(e)
162
+ };
163
+ export {
164
+ I as inputNumberEmits
165
+ };
@@ -0,0 +1,2 @@
1
+ import type _EpInputNumber from './EpInputNumber.vue';
2
+ export type InputNumberInstance = InstanceType<typeof _EpInputNumber>;