straw-ui-vue 0.1.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/README.md +42 -0
- package/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/st-button/index.d.ts +162 -0
- package/dist/components/st-button/st-button.vue.cjs +1 -0
- package/dist/components/st-button/st-button.vue.d.ts +29 -0
- package/dist/components/st-button/st-button.vue.js +5 -0
- package/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/st-button/types.d.ts +49 -0
- package/dist/components/st-button.cjs +1 -0
- package/dist/components/st-button.js +6 -0
- package/dist/components/st-checkbox/index.d.ts +153 -0
- package/dist/components/st-checkbox/st-checkbox.vue.cjs +1 -0
- package/dist/components/st-checkbox/st-checkbox.vue.d.ts +27 -0
- package/dist/components/st-checkbox/st-checkbox.vue.js +5 -0
- package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.js +109 -0
- package/dist/components/st-checkbox/types.d.ts +20 -0
- package/dist/components/st-checkbox-group/index.d.ts +171 -0
- package/dist/components/st-checkbox-group/st-checkbox-group.vue.cjs +1 -0
- package/dist/components/st-checkbox-group/st-checkbox-group.vue.d.ts +29 -0
- package/dist/components/st-checkbox-group/st-checkbox-group.vue.js +5 -0
- package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/st-checkbox-group/types.d.ts +43 -0
- package/dist/components/st-checkbox-group.cjs +1 -0
- package/dist/components/st-checkbox-group.js +6 -0
- package/dist/components/st-checkbox.cjs +1 -0
- package/dist/components/st-checkbox.js +6 -0
- package/dist/components/st-dialog/index.d.ts +243 -0
- package/dist/components/st-dialog/st-dialog.vue.cjs +1 -0
- package/dist/components/st-dialog/st-dialog.vue.d.ts +41 -0
- package/dist/components/st-dialog/st-dialog.vue.js +5 -0
- package/dist/components/st-dialog/st-dialog.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-dialog/st-dialog.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/components/st-dialog/types.d.ts +29 -0
- package/dist/components/st-dialog.cjs +1 -0
- package/dist/components/st-dialog.js +6 -0
- package/dist/components/st-input/index.d.ts +315 -0
- package/dist/components/st-input/st-input.vue.cjs +1 -0
- package/dist/components/st-input/st-input.vue.d.ts +48 -0
- package/dist/components/st-input/st-input.vue.js +7 -0
- package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/st-input/types.d.ts +68 -0
- package/dist/components/st-input.cjs +1 -0
- package/dist/components/st-input.js +6 -0
- package/dist/components/st-menu/index.d.ts +217 -0
- package/dist/components/st-menu/st-menu-node.vue.cjs +1 -0
- package/dist/components/st-menu/st-menu-node.vue.d.ts +14 -0
- package/dist/components/st-menu/st-menu-node.vue.js +5 -0
- package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/st-menu/st-menu.vue.cjs +1 -0
- package/dist/components/st-menu/st-menu.vue.d.ts +26 -0
- package/dist/components/st-menu/st-menu.vue.js +5 -0
- package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/st-menu/types.d.ts +82 -0
- package/dist/components/st-menu.cjs +1 -0
- package/dist/components/st-menu.js +7 -0
- package/dist/components/st-popover/index.d.ts +243 -0
- package/dist/components/st-popover/st-popover.vue.cjs +1 -0
- package/dist/components/st-popover/st-popover.vue.d.ts +37 -0
- package/dist/components/st-popover/st-popover.vue.js +5 -0
- package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.js +355 -0
- package/dist/components/st-popover/types.d.ts +103 -0
- package/dist/components/st-popover.cjs +1 -0
- package/dist/components/st-popover.js +6 -0
- package/dist/components/st-radio/index.d.ts +135 -0
- package/dist/components/st-radio/st-radio.vue.cjs +1 -0
- package/dist/components/st-radio/st-radio.vue.d.ts +28 -0
- package/dist/components/st-radio/st-radio.vue.js +5 -0
- package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/components/st-radio/types.d.ts +15 -0
- package/dist/components/st-radio-group/index.d.ts +180 -0
- package/dist/components/st-radio-group/st-radio-group.vue.cjs +1 -0
- package/dist/components/st-radio-group/st-radio-group.vue.d.ts +35 -0
- package/dist/components/st-radio-group/st-radio-group.vue.js +5 -0
- package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/st-radio-group/types.d.ts +43 -0
- package/dist/components/st-radio-group.cjs +1 -0
- package/dist/components/st-radio-group.js +6 -0
- package/dist/components/st-radio.cjs +1 -0
- package/dist/components/st-radio.js +6 -0
- package/dist/components/st-select/index.d.ts +306 -0
- package/dist/components/st-select/st-select.vue.cjs +1 -0
- package/dist/components/st-select/st-select.vue.d.ts +47 -0
- package/dist/components/st-select/st-select.vue.js +5 -0
- package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/st-select/types.d.ts +85 -0
- package/dist/components/st-select.cjs +1 -0
- package/dist/components/st-select.js +6 -0
- package/dist/components/st-sidebar/index.d.ts +63 -0
- package/dist/components/st-sidebar/st-sidebar.vue.cjs +1 -0
- package/dist/components/st-sidebar/st-sidebar.vue.d.ts +11 -0
- package/dist/components/st-sidebar/st-sidebar.vue.js +5 -0
- package/dist/components/st-sidebar/st-sidebar.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-sidebar/st-sidebar.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/st-sidebar/types.d.ts +56 -0
- package/dist/components/st-sidebar-item/index.d.ts +63 -0
- package/dist/components/st-sidebar-item/st-sidebar-item.vue.cjs +1 -0
- package/dist/components/st-sidebar-item/st-sidebar-item.vue.d.ts +11 -0
- package/dist/components/st-sidebar-item/st-sidebar-item.vue.js +5 -0
- package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-sidebar-item/st-sidebar-item.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/st-sidebar-item/types.d.ts +19 -0
- package/dist/components/st-sidebar-item.cjs +1 -0
- package/dist/components/st-sidebar-item.js +6 -0
- package/dist/components/st-sidebar.cjs +1 -0
- package/dist/components/st-sidebar.js +6 -0
- package/dist/components/st-splitter/index.d.ts +88 -0
- package/dist/components/st-splitter/st-splitter.vue.cjs +1 -0
- package/dist/components/st-splitter/st-splitter.vue.d.ts +16 -0
- package/dist/components/st-splitter/st-splitter.vue.js +5 -0
- package/dist/components/st-splitter/st-splitter.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-splitter/st-splitter.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/components/st-splitter/types.d.ts +192 -0
- package/dist/components/st-splitter/useSplitter.cjs +1 -0
- package/dist/components/st-splitter/useSplitter.d.ts +24 -0
- package/dist/components/st-splitter/useSplitter.js +129 -0
- package/dist/components/st-splitter-panel/index.d.ts +180 -0
- package/dist/components/st-splitter-panel/st-splitter-panel.vue.cjs +1 -0
- package/dist/components/st-splitter-panel/st-splitter-panel.vue.d.ts +33 -0
- package/dist/components/st-splitter-panel/st-splitter-panel.vue.js +5 -0
- package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/st-splitter-panel/types.d.ts +27 -0
- package/dist/components/st-splitter-panel.cjs +1 -0
- package/dist/components/st-splitter-panel.js +6 -0
- package/dist/components/st-splitter.cjs +1 -0
- package/dist/components/st-splitter.js +7 -0
- package/dist/components/st-toggle/index.d.ts +159 -0
- package/dist/components/st-toggle/st-toggle.vue.cjs +1 -0
- package/dist/components/st-toggle/st-toggle.vue.d.ts +25 -0
- package/dist/components/st-toggle/st-toggle.vue.js +5 -0
- package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/components/st-toggle/types.d.ts +38 -0
- package/dist/components/st-toggle.cjs +1 -0
- package/dist/components/st-toggle.js +6 -0
- package/dist/components/st-tooltip/index.d.ts +183 -0
- package/dist/components/st-tooltip/st-tooltip.vue.cjs +1 -0
- package/dist/components/st-tooltip/st-tooltip.vue.d.ts +29 -0
- package/dist/components/st-tooltip/st-tooltip.vue.js +5 -0
- package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/st-tooltip/types.d.ts +79 -0
- package/dist/components/st-tooltip.cjs +1 -0
- package/dist/components/st-tooltip.js +6 -0
- package/dist/components/st-tree/index.d.ts +114 -0
- package/dist/components/st-tree/st-tree-node.vue.cjs +1 -0
- package/dist/components/st-tree/st-tree-node.vue.d.ts +4 -0
- package/dist/components/st-tree/st-tree-node.vue.js +5 -0
- package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/st-tree/st-tree.vue.cjs +1 -0
- package/dist/components/st-tree/st-tree.vue.d.ts +50 -0
- package/dist/components/st-tree/st-tree.vue.js +5 -0
- package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/st-tree/types.d.ts +87 -0
- package/dist/components/st-tree.cjs +1 -0
- package/dist/components/st-tree.js +6 -0
- package/dist/components/types.d.ts +41 -0
- package/dist/index.cjs +1 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +3005 -0
- package/dist/index.js +47 -0
- package/dist/utils/cn.cjs +1 -0
- package/dist/utils/cn.d.ts +11 -0
- package/dist/utils/cn.js +8 -0
- package/dist/utils/cva/index.cjs +1 -0
- package/dist/utils/cva/index.d.ts +9 -0
- package/dist/utils/cva/index.js +25 -0
- package/dist/utils/cva/types.d.ts +45 -0
- package/dist/utils/directive/index.cjs +1 -0
- package/dist/utils/directive/index.d.ts +4 -0
- package/dist/utils/directive/index.js +10 -0
- package/dist/utils/directive/intersection.cjs +1 -0
- package/dist/utils/directive/intersection.d.ts +6 -0
- package/dist/utils/directive/intersection.js +20 -0
- package/dist/utils/directive/interval.cjs +1 -0
- package/dist/utils/directive/interval.d.ts +6 -0
- package/dist/utils/directive/interval.js +14 -0
- package/dist/utils/directive/move.cjs +1 -0
- package/dist/utils/directive/move.d.ts +6 -0
- package/dist/utils/directive/move.js +42 -0
- package/dist/utils/directive/resize.cjs +1 -0
- package/dist/utils/directive/resize.d.ts +6 -0
- package/dist/utils/directive/resize.js +17 -0
- package/dist/utils/with-install.cjs +1 -0
- package/dist/utils/with-install.d.ts +4 -0
- package/dist/utils/with-install.js +10 -0
- package/package.json +87 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
export declare const StInput: {
|
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").InputProps & {
|
|
4
|
+
modelValue?: string | number;
|
|
5
|
+
}> & Readonly<{
|
|
6
|
+
onBlur?: (event: FocusEvent) => any;
|
|
7
|
+
onChange?: (event: Event) => any;
|
|
8
|
+
onFocus?: (event: FocusEvent) => any;
|
|
9
|
+
onInput?: (event: Event) => any;
|
|
10
|
+
onClear?: () => any;
|
|
11
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
12
|
+
}>, {
|
|
13
|
+
focus: () => void;
|
|
14
|
+
blur: () => void;
|
|
15
|
+
select: () => void;
|
|
16
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
blur: (event: FocusEvent) => any;
|
|
19
|
+
change: (event: Event) => any;
|
|
20
|
+
focus: (event: FocusEvent) => any;
|
|
21
|
+
input: (event: Event) => any;
|
|
22
|
+
clear: () => any;
|
|
23
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
24
|
+
}, import("vue").PublicProps, {
|
|
25
|
+
type: import("./types.d.ts").InputType;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
clearable: boolean;
|
|
29
|
+
readonly: boolean;
|
|
30
|
+
showPassword: boolean;
|
|
31
|
+
showWordLimit: boolean;
|
|
32
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
33
|
+
P: {};
|
|
34
|
+
B: {};
|
|
35
|
+
D: {};
|
|
36
|
+
C: {};
|
|
37
|
+
M: {};
|
|
38
|
+
Defaults: {};
|
|
39
|
+
}, Readonly<import("./types.d.ts").InputProps & {
|
|
40
|
+
modelValue?: string | number;
|
|
41
|
+
}> & Readonly<{
|
|
42
|
+
onBlur?: (event: FocusEvent) => any;
|
|
43
|
+
onChange?: (event: Event) => any;
|
|
44
|
+
onFocus?: (event: FocusEvent) => any;
|
|
45
|
+
onInput?: (event: Event) => any;
|
|
46
|
+
onClear?: () => any;
|
|
47
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
48
|
+
}>, {
|
|
49
|
+
focus: () => void;
|
|
50
|
+
blur: () => void;
|
|
51
|
+
select: () => void;
|
|
52
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
53
|
+
}, {}, {}, {}, {
|
|
54
|
+
type: import("./types.d.ts").InputType;
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
placeholder: string;
|
|
57
|
+
clearable: boolean;
|
|
58
|
+
readonly: boolean;
|
|
59
|
+
showPassword: boolean;
|
|
60
|
+
showWordLimit: boolean;
|
|
61
|
+
}>;
|
|
62
|
+
__isFragment?: never;
|
|
63
|
+
__isTeleport?: never;
|
|
64
|
+
__isSuspense?: never;
|
|
65
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").InputProps & {
|
|
66
|
+
modelValue?: string | number;
|
|
67
|
+
}> & Readonly<{
|
|
68
|
+
onBlur?: (event: FocusEvent) => any;
|
|
69
|
+
onChange?: (event: Event) => any;
|
|
70
|
+
onFocus?: (event: FocusEvent) => any;
|
|
71
|
+
onInput?: (event: Event) => any;
|
|
72
|
+
onClear?: () => any;
|
|
73
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
74
|
+
}>, {
|
|
75
|
+
focus: () => void;
|
|
76
|
+
blur: () => void;
|
|
77
|
+
select: () => void;
|
|
78
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
79
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
80
|
+
blur: (event: FocusEvent) => any;
|
|
81
|
+
change: (event: Event) => any;
|
|
82
|
+
focus: (event: FocusEvent) => any;
|
|
83
|
+
input: (event: Event) => any;
|
|
84
|
+
clear: () => any;
|
|
85
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
86
|
+
}, string, {
|
|
87
|
+
type: import("./types.d.ts").InputType;
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
placeholder: string;
|
|
90
|
+
clearable: boolean;
|
|
91
|
+
readonly: boolean;
|
|
92
|
+
showPassword: boolean;
|
|
93
|
+
showWordLimit: boolean;
|
|
94
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
95
|
+
$slots: {
|
|
96
|
+
prefix?: (props: {}) => any;
|
|
97
|
+
} & {
|
|
98
|
+
suffix?: (props: {}) => any;
|
|
99
|
+
};
|
|
100
|
+
})>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
101
|
+
[x: string]: any;
|
|
102
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
103
|
+
P: {};
|
|
104
|
+
B: {};
|
|
105
|
+
D: {};
|
|
106
|
+
C: {};
|
|
107
|
+
M: {};
|
|
108
|
+
Defaults: {};
|
|
109
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
110
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").InputProps & {
|
|
111
|
+
modelValue?: string | number;
|
|
112
|
+
}> & Readonly<{
|
|
113
|
+
onBlur?: (event: FocusEvent) => any;
|
|
114
|
+
onChange?: (event: Event) => any;
|
|
115
|
+
onFocus?: (event: FocusEvent) => any;
|
|
116
|
+
onInput?: (event: Event) => any;
|
|
117
|
+
onClear?: () => any;
|
|
118
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
119
|
+
}>, {
|
|
120
|
+
focus: () => void;
|
|
121
|
+
blur: () => void;
|
|
122
|
+
select: () => void;
|
|
123
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
124
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
125
|
+
blur: (event: FocusEvent) => any;
|
|
126
|
+
change: (event: Event) => any;
|
|
127
|
+
focus: (event: FocusEvent) => any;
|
|
128
|
+
input: (event: Event) => any;
|
|
129
|
+
clear: () => any;
|
|
130
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
131
|
+
}, import("vue").PublicProps, {
|
|
132
|
+
type: import("./types.d.ts").InputType;
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
placeholder: string;
|
|
135
|
+
clearable: boolean;
|
|
136
|
+
readonly: boolean;
|
|
137
|
+
showPassword: boolean;
|
|
138
|
+
showWordLimit: boolean;
|
|
139
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
140
|
+
P: {};
|
|
141
|
+
B: {};
|
|
142
|
+
D: {};
|
|
143
|
+
C: {};
|
|
144
|
+
M: {};
|
|
145
|
+
Defaults: {};
|
|
146
|
+
}, Readonly<import("./types.d.ts").InputProps & {
|
|
147
|
+
modelValue?: string | number;
|
|
148
|
+
}> & Readonly<{
|
|
149
|
+
onBlur?: (event: FocusEvent) => any;
|
|
150
|
+
onChange?: (event: Event) => any;
|
|
151
|
+
onFocus?: (event: FocusEvent) => any;
|
|
152
|
+
onInput?: (event: Event) => any;
|
|
153
|
+
onClear?: () => any;
|
|
154
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
155
|
+
}>, {
|
|
156
|
+
focus: () => void;
|
|
157
|
+
blur: () => void;
|
|
158
|
+
select: () => void;
|
|
159
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
160
|
+
}, {}, {}, {}, {
|
|
161
|
+
type: import("./types.d.ts").InputType;
|
|
162
|
+
disabled: boolean;
|
|
163
|
+
placeholder: string;
|
|
164
|
+
clearable: boolean;
|
|
165
|
+
readonly: boolean;
|
|
166
|
+
showPassword: boolean;
|
|
167
|
+
showWordLimit: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
__isFragment?: never;
|
|
170
|
+
__isTeleport?: never;
|
|
171
|
+
__isSuspense?: never;
|
|
172
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").InputProps & {
|
|
173
|
+
modelValue?: string | number;
|
|
174
|
+
}> & Readonly<{
|
|
175
|
+
onBlur?: (event: FocusEvent) => any;
|
|
176
|
+
onChange?: (event: Event) => any;
|
|
177
|
+
onFocus?: (event: FocusEvent) => any;
|
|
178
|
+
onInput?: (event: Event) => any;
|
|
179
|
+
onClear?: () => any;
|
|
180
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
181
|
+
}>, {
|
|
182
|
+
focus: () => void;
|
|
183
|
+
blur: () => void;
|
|
184
|
+
select: () => void;
|
|
185
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
186
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
187
|
+
blur: (event: FocusEvent) => any;
|
|
188
|
+
change: (event: Event) => any;
|
|
189
|
+
focus: (event: FocusEvent) => any;
|
|
190
|
+
input: (event: Event) => any;
|
|
191
|
+
clear: () => any;
|
|
192
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
193
|
+
}, string, {
|
|
194
|
+
type: import("./types.d.ts").InputType;
|
|
195
|
+
disabled: boolean;
|
|
196
|
+
placeholder: string;
|
|
197
|
+
clearable: boolean;
|
|
198
|
+
readonly: boolean;
|
|
199
|
+
showPassword: boolean;
|
|
200
|
+
showWordLimit: boolean;
|
|
201
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
202
|
+
$slots: {
|
|
203
|
+
prefix?: (props: {}) => any;
|
|
204
|
+
} & {
|
|
205
|
+
suffix?: (props: {}) => any;
|
|
206
|
+
};
|
|
207
|
+
})>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {
|
|
208
|
+
[x: string]: any;
|
|
209
|
+
}>;
|
|
210
|
+
__isFragment?: never;
|
|
211
|
+
__isTeleport?: never;
|
|
212
|
+
__isSuspense?: never;
|
|
213
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
214
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").InputProps & {
|
|
215
|
+
modelValue?: string | number;
|
|
216
|
+
}> & Readonly<{
|
|
217
|
+
onBlur?: (event: FocusEvent) => any;
|
|
218
|
+
onChange?: (event: Event) => any;
|
|
219
|
+
onFocus?: (event: FocusEvent) => any;
|
|
220
|
+
onInput?: (event: Event) => any;
|
|
221
|
+
onClear?: () => any;
|
|
222
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
223
|
+
}>, {
|
|
224
|
+
focus: () => void;
|
|
225
|
+
blur: () => void;
|
|
226
|
+
select: () => void;
|
|
227
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
228
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
229
|
+
blur: (event: FocusEvent) => any;
|
|
230
|
+
change: (event: Event) => any;
|
|
231
|
+
focus: (event: FocusEvent) => any;
|
|
232
|
+
input: (event: Event) => any;
|
|
233
|
+
clear: () => any;
|
|
234
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
235
|
+
}, import("vue").PublicProps, {
|
|
236
|
+
type: import("./types.d.ts").InputType;
|
|
237
|
+
disabled: boolean;
|
|
238
|
+
placeholder: string;
|
|
239
|
+
clearable: boolean;
|
|
240
|
+
readonly: boolean;
|
|
241
|
+
showPassword: boolean;
|
|
242
|
+
showWordLimit: boolean;
|
|
243
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
244
|
+
P: {};
|
|
245
|
+
B: {};
|
|
246
|
+
D: {};
|
|
247
|
+
C: {};
|
|
248
|
+
M: {};
|
|
249
|
+
Defaults: {};
|
|
250
|
+
}, Readonly<import("./types.d.ts").InputProps & {
|
|
251
|
+
modelValue?: string | number;
|
|
252
|
+
}> & Readonly<{
|
|
253
|
+
onBlur?: (event: FocusEvent) => any;
|
|
254
|
+
onChange?: (event: Event) => any;
|
|
255
|
+
onFocus?: (event: FocusEvent) => any;
|
|
256
|
+
onInput?: (event: Event) => any;
|
|
257
|
+
onClear?: () => any;
|
|
258
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
259
|
+
}>, {
|
|
260
|
+
focus: () => void;
|
|
261
|
+
blur: () => void;
|
|
262
|
+
select: () => void;
|
|
263
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
264
|
+
}, {}, {}, {}, {
|
|
265
|
+
type: import("./types.d.ts").InputType;
|
|
266
|
+
disabled: boolean;
|
|
267
|
+
placeholder: string;
|
|
268
|
+
clearable: boolean;
|
|
269
|
+
readonly: boolean;
|
|
270
|
+
showPassword: boolean;
|
|
271
|
+
showWordLimit: boolean;
|
|
272
|
+
}>;
|
|
273
|
+
__isFragment?: never;
|
|
274
|
+
__isTeleport?: never;
|
|
275
|
+
__isSuspense?: never;
|
|
276
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").InputProps & {
|
|
277
|
+
modelValue?: string | number;
|
|
278
|
+
}> & Readonly<{
|
|
279
|
+
onBlur?: (event: FocusEvent) => any;
|
|
280
|
+
onChange?: (event: Event) => any;
|
|
281
|
+
onFocus?: (event: FocusEvent) => any;
|
|
282
|
+
onInput?: (event: Event) => any;
|
|
283
|
+
onClear?: () => any;
|
|
284
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
285
|
+
}>, {
|
|
286
|
+
focus: () => void;
|
|
287
|
+
blur: () => void;
|
|
288
|
+
select: () => void;
|
|
289
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
290
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
291
|
+
blur: (event: FocusEvent) => any;
|
|
292
|
+
change: (event: Event) => any;
|
|
293
|
+
focus: (event: FocusEvent) => any;
|
|
294
|
+
input: (event: Event) => any;
|
|
295
|
+
clear: () => any;
|
|
296
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
297
|
+
}, string, {
|
|
298
|
+
type: import("./types.d.ts").InputType;
|
|
299
|
+
disabled: boolean;
|
|
300
|
+
placeholder: string;
|
|
301
|
+
clearable: boolean;
|
|
302
|
+
readonly: boolean;
|
|
303
|
+
showPassword: boolean;
|
|
304
|
+
showWordLimit: boolean;
|
|
305
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
306
|
+
$slots: {
|
|
307
|
+
prefix?: (props: {}) => any;
|
|
308
|
+
} & {
|
|
309
|
+
suffix?: (props: {}) => any;
|
|
310
|
+
};
|
|
311
|
+
})>>, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
312
|
+
[x: string]: any;
|
|
313
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & (import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin)));
|
|
314
|
+
export default StInput;
|
|
315
|
+
export type * from './types.d.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./st-input.vue_vue_type_script_setup_true_lang.cjs");;/* empty css */var t=require("../../_virtual/_plugin-vue_export-helper.cjs").default(e.default,[[`__scopeId`,`data-v-19943572`]]);exports.default=t;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { InputProps } from './types.d.ts';
|
|
2
|
+
type __VLS_Props = InputProps;
|
|
3
|
+
type __VLS_ModelProps = {
|
|
4
|
+
modelValue?: string | number;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
7
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
prefix?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
suffix?: (props: typeof __VLS_3) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
14
|
+
focus: () => void;
|
|
15
|
+
blur: () => void;
|
|
16
|
+
select: () => void;
|
|
17
|
+
inputRef: import("vue").Ref<HTMLInputElement, HTMLInputElement>;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
blur: (event: FocusEvent) => any;
|
|
20
|
+
change: (event: Event) => any;
|
|
21
|
+
focus: (event: FocusEvent) => any;
|
|
22
|
+
input: (event: Event) => any;
|
|
23
|
+
clear: () => any;
|
|
24
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
onBlur?: (event: FocusEvent) => any;
|
|
27
|
+
onChange?: (event: Event) => any;
|
|
28
|
+
onFocus?: (event: FocusEvent) => any;
|
|
29
|
+
onInput?: (event: Event) => any;
|
|
30
|
+
onClear?: () => any;
|
|
31
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
32
|
+
}>, {
|
|
33
|
+
type: import("./types.d.ts").InputType;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
clearable: boolean;
|
|
37
|
+
readonly: boolean;
|
|
38
|
+
showPassword: boolean;
|
|
39
|
+
showWordLimit: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./st-input.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
//#region src/components/st-input/st-input.vue
|
|
5
|
+
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-19943572"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../utils/cn.cjs");let t=require("vue");var n={key:0,class:`st-input__prefix inline-flex items-center text-foreground`},r=[`autocomplete`,`disabled`,`maxlength`,`minlength`,`placeholder`,`readonly`,`type`],i={key:3,class:`st-input__word-limit select-none text-xs text-muted-foreground`},a={key:4,class:`st-input__suffix inline-flex items-center text-foreground`},o=(0,t.defineComponent)({inheritAttrs:!1,__name:`st-input`,props:(0,t.mergeModels)({modelValue:{},type:{default:`text`},placeholder:{default:``},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{},minlength:{},showWordLimit:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{}},{modelValue:{default:``},modelModifiers:{}}),emits:(0,t.mergeModels)([`update:modelValue`,`input`,`change`,`focus`,`blur`,`clear`],[`update:modelValue`]),setup(o,{expose:s,emit:c}){let l=(0,t.useAttrs)(),u=o,d=c;(0,t.useSlots)();let f=(0,t.useModel)(o,`modelValue`),p=(0,t.ref)(null),m=(0,t.ref)(!1),h=(0,t.ref)(!1),g=(0,t.ref)(!1),_=(0,t.computed)(()=>{let e=f.value;return typeof e==`string`?e.length:String(e).length}),v=(0,t.computed)(()=>u.type===`password`?m.value?`text`:`password`:u.type),y=(0,t.computed)(()=>{if(u.type===`password`)return`new-password`}),b=(0,t.computed)(()=>u.clearable&&!u.disabled&&f.value&&h.value),x=(0,t.computed)(()=>u.type===`password`&&u.showPassword&&!u.disabled),S=(0,t.computed)(()=>e.cn(`st-input`,`relative inline-flex items-center gap-2.5 px-2.5 rounded-radius border border-input bg-background transition-colors transition-shadow`,`focus-within:border-ring focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0 focus-within:ring-offset-background`,`h-10 text-sm`,{"st-input--disabled cursor-not-allowed opacity-50":u.disabled},l.class)),C=(0,t.computed)(()=>e.cn(`st-input__inner`,`h-full w-full flex-1 min-w-0 min-h-0 bg-transparent outline-none text-foreground`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`)),w=()=>{h.value=!0},T=()=>{h.value=!1},E=e=>{d(`input`,e)},D=e=>{d(`change`,e)},O=e=>{g.value=!0,d(`focus`,e)},k=e=>{g.value=!1,d(`blur`,e)},A=()=>{f.value=``,d(`clear`),p.value?.focus()},j=()=>{m.value=!m.value};return s({focus:()=>{p.value?.focus()},blur:()=>{p.value?.blur()},select:()=>{p.value?.select()},inputRef:p}),(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)((0,t.unref)(l).style),onMouseenter:w,onMouseleave:T},[e.$slots.prefix||u.prefixIcon?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,n,[(0,t.renderSlot)(e.$slots,`prefix`,{},()=>[u.prefixIcon?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,{key:0,class:(0,t.normalizeClass)([u.prefixIcon,`st-input__prefix-icon text-foreground`])},null,2)):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`inputRef`,ref:p,"onUpdate:modelValue":o[0]||=e=>f.value=e,autocomplete:y.value,class:(0,t.normalizeClass)(C.value),disabled:u.disabled,maxlength:u.maxlength,minlength:u.minlength,placeholder:u.placeholder,readonly:u.readonly,type:v.value,onBlur:k,onChange:D,onFocus:O,onInput:E},null,42,r),[[t.vModelDynamic,f.value]]),b.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,class:`st-input__clear text-foreground cursor-pointer active:opacity-80`,onClick:A},[...o[1]||=[(0,t.createElementVNode)(`i`,{class:`i-ri-close-fill`},null,-1)]])):(0,t.createCommentVNode)(``,!0),x.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:2,class:`st-input__password-toggle text-foreground cursor-pointer active:opacity-80`,onClick:j},[(0,t.createElementVNode)(`i`,{class:(0,t.normalizeClass)(m.value?`i-ri-eye-off-line`:`i-ri-eye-line`)},null,2)])):(0,t.createCommentVNode)(``,!0),u.showWordLimit&&u.maxlength?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,i,(0,t.toDisplayString)(_.value)+`/`+(0,t.toDisplayString)(u.maxlength),1)):(0,t.createCommentVNode)(``,!0),e.$slots.suffix||u.suffixIcon?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,a,[(0,t.renderSlot)(e.$slots,`suffix`,{},()=>[u.suffixIcon?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,{key:0,class:(0,t.normalizeClass)([u.suffixIcon,`st-input__suffix-icon text-foreground`])},null,2)):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0)],38))}});exports.default=o;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, normalizeClass as s, normalizeStyle as c, openBlock as l, ref as u, renderSlot as d, toDisplayString as f, unref as p, useAttrs as m, useModel as h, useSlots as g, vModelDynamic as _, withDirectives as v } from "vue";
|
|
3
|
+
//#region src/components/st-input/st-input.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var y = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "st-input__prefix inline-flex items-center text-foreground"
|
|
7
|
+
}, b = [
|
|
8
|
+
"autocomplete",
|
|
9
|
+
"disabled",
|
|
10
|
+
"maxlength",
|
|
11
|
+
"minlength",
|
|
12
|
+
"placeholder",
|
|
13
|
+
"readonly",
|
|
14
|
+
"type"
|
|
15
|
+
], x = {
|
|
16
|
+
key: 3,
|
|
17
|
+
class: "st-input__word-limit select-none text-xs text-muted-foreground"
|
|
18
|
+
}, S = {
|
|
19
|
+
key: 4,
|
|
20
|
+
class: "st-input__suffix inline-flex items-center text-foreground"
|
|
21
|
+
}, C = /*@__PURE__*/ a({
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
__name: "st-input",
|
|
24
|
+
props: /*@__PURE__*/ o({
|
|
25
|
+
modelValue: {},
|
|
26
|
+
type: { default: "text" },
|
|
27
|
+
placeholder: { default: "" },
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
clearable: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
readonly: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
showPassword: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
maxlength: {},
|
|
45
|
+
minlength: {},
|
|
46
|
+
showWordLimit: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
prefixIcon: {},
|
|
51
|
+
suffixIcon: {}
|
|
52
|
+
}, {
|
|
53
|
+
modelValue: { default: "" },
|
|
54
|
+
modelModifiers: {}
|
|
55
|
+
}),
|
|
56
|
+
emits: /*@__PURE__*/ o([
|
|
57
|
+
"update:modelValue",
|
|
58
|
+
"input",
|
|
59
|
+
"change",
|
|
60
|
+
"focus",
|
|
61
|
+
"blur",
|
|
62
|
+
"clear"
|
|
63
|
+
], ["update:modelValue"]),
|
|
64
|
+
setup(a, { expose: o, emit: C }) {
|
|
65
|
+
let w = m(), T = a, E = C;
|
|
66
|
+
g();
|
|
67
|
+
let D = h(a, "modelValue"), O = u(null), k = u(!1), A = u(!1), j = u(!1), M = t(() => {
|
|
68
|
+
let e = D.value;
|
|
69
|
+
return typeof e == "string" ? e.length : String(e).length;
|
|
70
|
+
}), N = t(() => T.type === "password" ? k.value ? "text" : "password" : T.type), P = t(() => {
|
|
71
|
+
if (T.type === "password") return "new-password";
|
|
72
|
+
}), F = t(() => T.clearable && !T.disabled && D.value && A.value), I = t(() => T.type === "password" && T.showPassword && !T.disabled), L = t(() => e("st-input", "relative inline-flex items-center gap-2.5 px-2.5 rounded-radius border border-input bg-background transition-colors transition-shadow", "focus-within:border-ring focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0 focus-within:ring-offset-background", "h-10 text-sm", { "st-input--disabled cursor-not-allowed opacity-50": T.disabled }, w.class)), R = t(() => e("st-input__inner", "h-full w-full flex-1 min-w-0 min-h-0 bg-transparent outline-none text-foreground", "placeholder:text-muted-foreground", "disabled:cursor-not-allowed disabled:opacity-50")), z = () => {
|
|
73
|
+
A.value = !0;
|
|
74
|
+
}, B = () => {
|
|
75
|
+
A.value = !1;
|
|
76
|
+
}, V = (e) => {
|
|
77
|
+
E("input", e);
|
|
78
|
+
}, H = (e) => {
|
|
79
|
+
E("change", e);
|
|
80
|
+
}, U = (e) => {
|
|
81
|
+
j.value = !0, E("focus", e);
|
|
82
|
+
}, W = (e) => {
|
|
83
|
+
j.value = !1, E("blur", e);
|
|
84
|
+
}, G = () => {
|
|
85
|
+
D.value = "", E("clear"), O.value?.focus();
|
|
86
|
+
}, K = () => {
|
|
87
|
+
k.value = !k.value;
|
|
88
|
+
};
|
|
89
|
+
return o({
|
|
90
|
+
focus: () => {
|
|
91
|
+
O.value?.focus();
|
|
92
|
+
},
|
|
93
|
+
blur: () => {
|
|
94
|
+
O.value?.blur();
|
|
95
|
+
},
|
|
96
|
+
select: () => {
|
|
97
|
+
O.value?.select();
|
|
98
|
+
},
|
|
99
|
+
inputRef: O
|
|
100
|
+
}), (e, t) => (l(), r("div", {
|
|
101
|
+
class: s(L.value),
|
|
102
|
+
style: c(p(w).style),
|
|
103
|
+
onMouseenter: z,
|
|
104
|
+
onMouseleave: B
|
|
105
|
+
}, [
|
|
106
|
+
e.$slots.prefix || T.prefixIcon ? (l(), r("span", y, [d(e.$slots, "prefix", {}, () => [T.prefixIcon ? (l(), r("i", {
|
|
107
|
+
key: 0,
|
|
108
|
+
class: s([T.prefixIcon, "st-input__prefix-icon text-foreground"])
|
|
109
|
+
}, null, 2)) : n("", !0)], !0)])) : n("", !0),
|
|
110
|
+
v(i("input", {
|
|
111
|
+
ref_key: "inputRef",
|
|
112
|
+
ref: O,
|
|
113
|
+
"onUpdate:modelValue": t[0] ||= (e) => D.value = e,
|
|
114
|
+
autocomplete: P.value,
|
|
115
|
+
class: s(R.value),
|
|
116
|
+
disabled: T.disabled,
|
|
117
|
+
maxlength: T.maxlength,
|
|
118
|
+
minlength: T.minlength,
|
|
119
|
+
placeholder: T.placeholder,
|
|
120
|
+
readonly: T.readonly,
|
|
121
|
+
type: N.value,
|
|
122
|
+
onBlur: W,
|
|
123
|
+
onChange: H,
|
|
124
|
+
onFocus: U,
|
|
125
|
+
onInput: V
|
|
126
|
+
}, null, 42, b), [[_, D.value]]),
|
|
127
|
+
F.value ? (l(), r("span", {
|
|
128
|
+
key: 1,
|
|
129
|
+
class: "st-input__clear text-foreground cursor-pointer active:opacity-80",
|
|
130
|
+
onClick: G
|
|
131
|
+
}, [...t[1] ||= [i("i", { class: "i-ri-close-fill" }, null, -1)]])) : n("", !0),
|
|
132
|
+
I.value ? (l(), r("span", {
|
|
133
|
+
key: 2,
|
|
134
|
+
class: "st-input__password-toggle text-foreground cursor-pointer active:opacity-80",
|
|
135
|
+
onClick: K
|
|
136
|
+
}, [i("i", { class: s(k.value ? "i-ri-eye-off-line" : "i-ri-eye-line") }, null, 2)])) : n("", !0),
|
|
137
|
+
T.showWordLimit && T.maxlength ? (l(), r("span", x, f(M.value) + "/" + f(T.maxlength), 1)) : n("", !0),
|
|
138
|
+
e.$slots.suffix || T.suffixIcon ? (l(), r("span", S, [d(e.$slots, "suffix", {}, () => [T.suffixIcon ? (l(), r("i", {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: s([T.suffixIcon, "st-input__suffix-icon text-foreground"])
|
|
141
|
+
}, null, 2)) : n("", !0)], !0)])) : n("", !0)
|
|
142
|
+
], 38));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
//#endregion
|
|
146
|
+
export { C as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 输入框类型
|
|
3
|
+
*/
|
|
4
|
+
export type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 输入框组件属性接口
|
|
8
|
+
*/
|
|
9
|
+
export interface InputProps {
|
|
10
|
+
/** 输入框绑定值 */
|
|
11
|
+
modelValue?: string | number;
|
|
12
|
+
/** 输入框类型 */
|
|
13
|
+
type?: InputType;
|
|
14
|
+
/** 占位符文本 */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** 是否禁用 */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** 是否可清空 */
|
|
19
|
+
clearable?: boolean;
|
|
20
|
+
/** 是否只读 */
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
/** 是否显示密码切换按钮 */
|
|
23
|
+
showPassword?: boolean;
|
|
24
|
+
/** 最大输入长度 */
|
|
25
|
+
maxlength?: number;
|
|
26
|
+
/** 最小输入长度 */
|
|
27
|
+
minlength?: number;
|
|
28
|
+
/** 是否显示字数统计 */
|
|
29
|
+
showWordLimit?: boolean;
|
|
30
|
+
/** 前缀图标名称 */
|
|
31
|
+
prefixIcon?: string;
|
|
32
|
+
/** 后缀图标名称 */
|
|
33
|
+
suffixIcon?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 输入框组件事件接口
|
|
38
|
+
*/
|
|
39
|
+
export interface InputEmits {
|
|
40
|
+
/** 更新绑定值事件 */
|
|
41
|
+
'update:modelValue': [value: string | number];
|
|
42
|
+
/** 输入事件 */
|
|
43
|
+
input: [event: Event];
|
|
44
|
+
/** 值改变事件 */
|
|
45
|
+
change: [event: Event];
|
|
46
|
+
/** 获得焦点事件 */
|
|
47
|
+
focus: [event: FocusEvent];
|
|
48
|
+
/** 失去焦点事件 */
|
|
49
|
+
blur: [event: FocusEvent];
|
|
50
|
+
/** 清空事件 */
|
|
51
|
+
clear: [];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 输入框组件插槽接口
|
|
56
|
+
*/
|
|
57
|
+
export interface InputSlots {
|
|
58
|
+
/** 前缀内容插槽 */
|
|
59
|
+
prefix?: () => unknown;
|
|
60
|
+
/** 后缀内容插槽 */
|
|
61
|
+
suffix?: () => unknown;
|
|
62
|
+
/** 前缀图标插槽 */
|
|
63
|
+
'prefix-icon'?: () => unknown;
|
|
64
|
+
/** 后缀图标插槽 */
|
|
65
|
+
'suffix-icon'?: () => unknown;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils/with-install.cjs"),t=require("./st-input/st-input.vue.cjs");var n=e.withInstall(t.default);exports.StInput=n,exports.default=n;
|