@wikicasa-dev/components 0.0.3 → 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/dist/UIKit/BaseFloatingLabel.vue.d.ts +44 -0
- package/dist/UIKit/BaseInput.stories.d.ts +6 -0
- package/dist/UIKit/BaseInput.vue.d.ts +133 -0
- package/dist/UIKit/BaseTextarea.vue.d.ts +82 -0
- package/dist/UIKit/BaseToggle.stories.d.ts +7 -0
- package/dist/components/HelloWorld.vue.d.ts +1 -11
- package/dist/components/base/BaseEmptyButton.stories.d.ts +6 -0
- package/dist/components/base/StaticSpinner.stories.d.ts +6 -0
- package/dist/components/input/TripleSelect.stories.d.ts +6 -0
- package/dist/components.js +422 -1560
- package/dist/components.umd.cjs +1 -3
- package/dist/composables/useFloatingLabel.d.ts +12 -0
- package/dist/stories/Button.stories.d.ts +6 -6
- package/dist/style.css +1 -1
- package/package.json +15 -10
- package/dist/components/Pera.vue.d.ts +0 -14
- /package/dist/components/{QualityScore.stories.d.ts → insert/QualityScore.stories.d.ts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Nullable } from "@wikicasa-dev/types";
|
|
2
|
+
type LabelState = "inline-label" | "floating-label";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
labelState: {
|
|
5
|
+
type: () => LabelState;
|
|
6
|
+
default: () => LabelState;
|
|
7
|
+
};
|
|
8
|
+
isValid: {
|
|
9
|
+
type: () => Nullable<boolean>;
|
|
10
|
+
default: () => Nullable<boolean>;
|
|
11
|
+
};
|
|
12
|
+
labelText: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
labelState: {
|
|
22
|
+
type: () => LabelState;
|
|
23
|
+
default: () => LabelState;
|
|
24
|
+
};
|
|
25
|
+
isValid: {
|
|
26
|
+
type: () => Nullable<boolean>;
|
|
27
|
+
default: () => Nullable<boolean>;
|
|
28
|
+
};
|
|
29
|
+
labelText: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>> & {
|
|
38
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
labelState: LabelState;
|
|
41
|
+
isValid: Nullable<boolean>;
|
|
42
|
+
disabled: string | boolean;
|
|
43
|
+
}, {}>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Nullable, FeedbackLabels } from "@wikicasa-dev/types";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
inputClass: {
|
|
4
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
5
|
+
required: false;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
inputType: {
|
|
9
|
+
type: () => "text-input" | "select";
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
labelText: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
border: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
22
|
+
};
|
|
23
|
+
feedback: {
|
|
24
|
+
type: () => FeedbackLabels;
|
|
25
|
+
};
|
|
26
|
+
isValid: {
|
|
27
|
+
type: () => Nullable<boolean>;
|
|
28
|
+
default: null;
|
|
29
|
+
};
|
|
30
|
+
auto: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
keepFloatingLabel: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
formatter: {
|
|
39
|
+
type: () => {
|
|
40
|
+
formatFn: (n: number | string) => string;
|
|
41
|
+
unFormatFn?: ((v: string) => string | number | boolean) | undefined;
|
|
42
|
+
};
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
labelState: import("vue").Ref<LabelState>;
|
|
47
|
+
setInitialLabelState: <T>(value: T) => void;
|
|
48
|
+
handleFocusIn: (autoFloating?: boolean | undefined) => void;
|
|
49
|
+
handleFocusOut: <T_1>(value: T_1, manual?: boolean | undefined, auto?: boolean | undefined) => void;
|
|
50
|
+
setInlineLabel: () => void;
|
|
51
|
+
setFloatingLabel: () => void;
|
|
52
|
+
}, {
|
|
53
|
+
type: string;
|
|
54
|
+
feedbackObj: FeedbackLabels;
|
|
55
|
+
pointerDownListener: (e: Event) => void;
|
|
56
|
+
}, {
|
|
57
|
+
passwordIcon(): Nullable<HTMLElement>;
|
|
58
|
+
inputEl(): HTMLInputElement;
|
|
59
|
+
}, {
|
|
60
|
+
/**
|
|
61
|
+
* Prevents the default behaviour of pointerout so the clicked element won't make lose the focus to the input element
|
|
62
|
+
* */
|
|
63
|
+
setPointerOutListener(): void;
|
|
64
|
+
handleFloatingLabelClick(): void;
|
|
65
|
+
normalizeFeedbackProp(): void;
|
|
66
|
+
updateInputValue(inputEl: HTMLInputElement, value: string): Nullable<string>;
|
|
67
|
+
handleInputChange({ target }: Event): void;
|
|
68
|
+
handleClick(e: Event): void;
|
|
69
|
+
handleClean(): void;
|
|
70
|
+
handleShowPasswd(_: Event): void;
|
|
71
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "focusout" | "focusin" | "update:modelValue" | "keydown-enter-pressed")[], "click" | "focusout" | "focusin" | "update:modelValue" | "keydown-enter-pressed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
72
|
+
inputClass: {
|
|
73
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
74
|
+
required: false;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
inputType: {
|
|
78
|
+
type: () => "text-input" | "select";
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
labelText: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
border: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
modelValue: {
|
|
90
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
91
|
+
};
|
|
92
|
+
feedback: {
|
|
93
|
+
type: () => FeedbackLabels;
|
|
94
|
+
};
|
|
95
|
+
isValid: {
|
|
96
|
+
type: () => Nullable<boolean>;
|
|
97
|
+
default: null;
|
|
98
|
+
};
|
|
99
|
+
auto: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
keepFloatingLabel: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
formatter: {
|
|
108
|
+
type: () => {
|
|
109
|
+
formatFn: (n: number | string) => string;
|
|
110
|
+
unFormatFn?: ((v: string) => string | number | boolean) | undefined;
|
|
111
|
+
};
|
|
112
|
+
default: null;
|
|
113
|
+
};
|
|
114
|
+
}>> & {
|
|
115
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
116
|
+
onFocusin?: ((...args: any[]) => any) | undefined;
|
|
117
|
+
onFocusout?: ((...args: any[]) => any) | undefined;
|
|
118
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
119
|
+
"onKeydown-enter-pressed"?: ((...args: any[]) => any) | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
isValid: Nullable<boolean>;
|
|
122
|
+
labelText: string;
|
|
123
|
+
keepFloatingLabel: boolean;
|
|
124
|
+
inputClass: string | unknown[];
|
|
125
|
+
inputType: "select" | "text-input";
|
|
126
|
+
border: boolean;
|
|
127
|
+
auto: boolean;
|
|
128
|
+
formatter: {
|
|
129
|
+
formatFn: (n: number | string) => string;
|
|
130
|
+
unFormatFn?: ((v: string) => string | number | boolean) | undefined;
|
|
131
|
+
};
|
|
132
|
+
}, {}>;
|
|
133
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { FeedbackLabels, Nullable } from "@wikicasa-dev/types";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
labelText: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
feedback: {
|
|
11
|
+
type: () => FeedbackLabels;
|
|
12
|
+
};
|
|
13
|
+
isValid: {
|
|
14
|
+
type: () => Nullable<boolean>;
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
textAreaStyle: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
isDisabled: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
resize: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
labelState: import("vue").Ref<LabelState>;
|
|
31
|
+
setInitialLabelState: <T>(value: T) => void;
|
|
32
|
+
handleFocusIn: (autoFloating?: boolean | undefined) => void;
|
|
33
|
+
handleFocusOut: <T_1>(value: T_1, manual?: boolean | undefined, auto?: boolean | undefined) => void;
|
|
34
|
+
}, {
|
|
35
|
+
value: string;
|
|
36
|
+
}, {
|
|
37
|
+
textareaElem(): HTMLTextAreaElement;
|
|
38
|
+
}, {
|
|
39
|
+
handleOnChange({ target }: Event): void;
|
|
40
|
+
handleFloatingLabelClick(): void;
|
|
41
|
+
disableTextarea(): void;
|
|
42
|
+
clearTextareaElem(): void;
|
|
43
|
+
disableAndFocusTextarea(): void;
|
|
44
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusout" | "focusin" | "update:modelValue")[], "focusout" | "focusin" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
labelText: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
modelValue: {
|
|
50
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
51
|
+
};
|
|
52
|
+
feedback: {
|
|
53
|
+
type: () => FeedbackLabels;
|
|
54
|
+
};
|
|
55
|
+
isValid: {
|
|
56
|
+
type: () => Nullable<boolean>;
|
|
57
|
+
default: null;
|
|
58
|
+
};
|
|
59
|
+
textAreaStyle: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
isDisabled: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
resize: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
}>> & {
|
|
72
|
+
onFocusin?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
onFocusout?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
isValid: Nullable<boolean>;
|
|
77
|
+
labelText: string;
|
|
78
|
+
resize: boolean;
|
|
79
|
+
textAreaStyle: string;
|
|
80
|
+
isDisabled: boolean;
|
|
81
|
+
}, {}>;
|
|
82
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import BaseToggle from "./BaseToggle.vue";
|
|
3
|
+
declare const meta: Meta<typeof BaseToggle>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BaseToggle>;
|
|
6
|
+
export declare const WithLabel: Story;
|
|
7
|
+
export declare const WithoutLabel: Story;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
msg: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
-
msg: {
|
|
8
|
-
type: import("vue").PropType<string>;
|
|
9
|
-
required: true;
|
|
10
|
-
};
|
|
11
|
-
}>>, {}, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
12
2
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import BaseEmptyButton from "./BaseEmptyButton.vue";
|
|
3
|
+
declare const meta: Meta<typeof BaseEmptyButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BaseEmptyButton>;
|
|
6
|
+
export declare const Primary: Story;
|