sprintify-ui 0.0.14 → 0.0.15
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.
|
@@ -6,7 +6,6 @@ declare const _default: {
|
|
|
6
6
|
$props: Partial<{
|
|
7
7
|
required: boolean;
|
|
8
8
|
type: string;
|
|
9
|
-
icon: string;
|
|
10
9
|
name: string;
|
|
11
10
|
modelValue: string | number | null;
|
|
12
11
|
placeholder: string;
|
|
@@ -14,7 +13,6 @@ declare const _default: {
|
|
|
14
13
|
autocomplete: boolean;
|
|
15
14
|
step: number;
|
|
16
15
|
preventSubmit: boolean;
|
|
17
|
-
iconPosition: "left" | "right";
|
|
18
16
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
19
17
|
modelValue: {
|
|
20
18
|
default: string;
|
|
@@ -55,17 +53,9 @@ declare const _default: {
|
|
|
55
53
|
default: boolean;
|
|
56
54
|
type: BooleanConstructor;
|
|
57
55
|
};
|
|
58
|
-
icon: {
|
|
59
|
-
default: null;
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
};
|
|
62
|
-
iconPosition: {
|
|
63
|
-
default: string;
|
|
64
|
-
type: PropType<"left" | "right">;
|
|
65
|
-
};
|
|
66
56
|
}>> & {
|
|
67
57
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
68
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "type" | "
|
|
58
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "type" | "name" | "modelValue" | "placeholder" | "disabled" | "autocomplete" | "step" | "preventSubmit">;
|
|
69
59
|
$attrs: {
|
|
70
60
|
[x: string]: unknown;
|
|
71
61
|
};
|
|
@@ -119,20 +109,11 @@ declare const _default: {
|
|
|
119
109
|
default: boolean;
|
|
120
110
|
type: BooleanConstructor;
|
|
121
111
|
};
|
|
122
|
-
icon: {
|
|
123
|
-
default: null;
|
|
124
|
-
type: StringConstructor;
|
|
125
|
-
};
|
|
126
|
-
iconPosition: {
|
|
127
|
-
default: string;
|
|
128
|
-
type: PropType<"left" | "right">;
|
|
129
|
-
};
|
|
130
112
|
}>> & {
|
|
131
113
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
132
114
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], string, {
|
|
133
115
|
required: boolean;
|
|
134
116
|
type: string;
|
|
135
|
-
icon: string;
|
|
136
117
|
name: string;
|
|
137
118
|
modelValue: string | number | null;
|
|
138
119
|
placeholder: string;
|
|
@@ -140,7 +121,6 @@ declare const _default: {
|
|
|
140
121
|
autocomplete: boolean;
|
|
141
122
|
step: number;
|
|
142
123
|
preventSubmit: boolean;
|
|
143
|
-
iconPosition: "left" | "right";
|
|
144
124
|
}, {}, string> & {
|
|
145
125
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
146
126
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -201,14 +181,6 @@ declare const _default: {
|
|
|
201
181
|
default: boolean;
|
|
202
182
|
type: BooleanConstructor;
|
|
203
183
|
};
|
|
204
|
-
icon: {
|
|
205
|
-
default: null;
|
|
206
|
-
type: StringConstructor;
|
|
207
|
-
};
|
|
208
|
-
iconPosition: {
|
|
209
|
-
default: string;
|
|
210
|
-
type: PropType<"left" | "right">;
|
|
211
|
-
};
|
|
212
184
|
}>> & {
|
|
213
185
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
214
186
|
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
@@ -255,20 +227,11 @@ declare const _default: {
|
|
|
255
227
|
default: boolean;
|
|
256
228
|
type: BooleanConstructor;
|
|
257
229
|
};
|
|
258
|
-
icon: {
|
|
259
|
-
default: null;
|
|
260
|
-
type: StringConstructor;
|
|
261
|
-
};
|
|
262
|
-
iconPosition: {
|
|
263
|
-
default: string;
|
|
264
|
-
type: PropType<"left" | "right">;
|
|
265
|
-
};
|
|
266
230
|
}>> & {
|
|
267
231
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
268
232
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", {
|
|
269
233
|
required: boolean;
|
|
270
234
|
type: string;
|
|
271
|
-
icon: string;
|
|
272
235
|
name: string;
|
|
273
236
|
modelValue: string | number | null;
|
|
274
237
|
placeholder: string;
|
|
@@ -276,6 +239,5 @@ declare const _default: {
|
|
|
276
239
|
autocomplete: boolean;
|
|
277
240
|
step: number;
|
|
278
241
|
preventSubmit: boolean;
|
|
279
|
-
iconPosition: "left" | "right";
|
|
280
242
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
281
243
|
export default _default;
|
package/package.json
CHANGED
|
@@ -7,12 +7,7 @@ export default {
|
|
|
7
7
|
required: true,
|
|
8
8
|
type: 'text',
|
|
9
9
|
name: 'name',
|
|
10
|
-
|
|
11
|
-
argTypes: {
|
|
12
|
-
iconPosition: {
|
|
13
|
-
type: 'select',
|
|
14
|
-
options: ['left', 'right'],
|
|
15
|
-
},
|
|
10
|
+
class: 'w-full',
|
|
16
11
|
},
|
|
17
12
|
};
|
|
18
13
|
|
|
@@ -36,20 +31,6 @@ Demo.args = {
|
|
|
36
31
|
placeholder: 'Enter your name',
|
|
37
32
|
};
|
|
38
33
|
|
|
39
|
-
export const IconLeft = Template.bind({});
|
|
40
|
-
IconLeft.args = {
|
|
41
|
-
icon: 'heroicons:phone-20-solid',
|
|
42
|
-
iconPosition: 'left',
|
|
43
|
-
placeholder: 'Enter your phone',
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const IconRight = Template.bind({});
|
|
47
|
-
IconRight.args = {
|
|
48
|
-
icon: 'heroicons:phone-20-solid',
|
|
49
|
-
iconPosition: 'right',
|
|
50
|
-
placeholder: 'Enter your phone',
|
|
51
|
-
};
|
|
52
|
-
|
|
53
34
|
export const Number = Template.bind({});
|
|
54
35
|
Number.args = {
|
|
55
36
|
type: 'number',
|
|
@@ -1,43 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:placeholder="placeholder"
|
|
17
|
-
:required="required"
|
|
18
|
-
class="border-none bg-transparent outline-none focus:z-[1] focus:ring-2 focus:ring-primary-600 focus:ring-offset-1 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
19
|
-
:class="{
|
|
20
|
-
'rounded-r': icon && iconPosition == 'left',
|
|
21
|
-
'rounded-l': icon && iconPosition == 'right',
|
|
22
|
-
rounded: !icon,
|
|
23
|
-
}"
|
|
24
|
-
:autocomplete="autocomplete ? 'on' : 'off'"
|
|
25
|
-
@keydown.enter="onEnter"
|
|
26
|
-
@input="$emit('update:modelValue', transformInputValue($event))"
|
|
27
|
-
/>
|
|
28
|
-
<div
|
|
29
|
-
v-if="icon && iconPosition == 'right'"
|
|
30
|
-
class="flex shrink-0 items-center justify-center rounded-r border-l border-slate-300 bg-slate-100 px-3 text-slate-600"
|
|
31
|
-
>
|
|
32
|
-
<BaseIcon icon="heroicons:phone-20-solid" />
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
2
|
+
<input
|
|
3
|
+
ref="input"
|
|
4
|
+
:value="modelValue"
|
|
5
|
+
:type="type"
|
|
6
|
+
:name="name"
|
|
7
|
+
:step="step"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
:placeholder="placeholder"
|
|
10
|
+
:required="required"
|
|
11
|
+
class="rounded border-slate-300 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
12
|
+
:autocomplete="autocomplete ? 'on' : 'off'"
|
|
13
|
+
@keydown.enter="onEnter"
|
|
14
|
+
@input="$emit('update:modelValue', transformInputValue($event))"
|
|
15
|
+
/>
|
|
35
16
|
</template>
|
|
36
17
|
|
|
37
18
|
<script lang="ts" setup>
|
|
38
19
|
import { get, isNumber, isString, trim } from 'lodash';
|
|
39
20
|
import { PropType } from 'vue';
|
|
40
|
-
import { BaseIcon } from './index';
|
|
41
21
|
|
|
42
22
|
const props = defineProps({
|
|
43
23
|
modelValue: {
|
|
@@ -79,14 +59,6 @@ const props = defineProps({
|
|
|
79
59
|
default: false,
|
|
80
60
|
type: Boolean,
|
|
81
61
|
},
|
|
82
|
-
icon: {
|
|
83
|
-
default: null,
|
|
84
|
-
type: String,
|
|
85
|
-
},
|
|
86
|
-
iconPosition: {
|
|
87
|
-
default: 'left',
|
|
88
|
-
type: String as PropType<'left' | 'right'>,
|
|
89
|
-
},
|
|
90
62
|
});
|
|
91
63
|
|
|
92
64
|
defineEmits(['update:modelValue']);
|