@pequity/squirrel 6.1.1 → 7.0.1
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/cjs/chunks/index.js +748 -504
- package/dist/cjs/chunks/p-alert.js +52 -0
- package/dist/cjs/chunks/p-avatar.js +65 -0
- package/dist/cjs/chunks/p-btn.js +2 -2
- package/dist/cjs/chunks/p-date-picker.js +2 -2
- package/dist/cjs/chunks/p-input-number.js +161 -0
- package/dist/cjs/chunks/p-input-percent.js +2 -2
- package/dist/cjs/chunks/p-input.js +111 -0
- package/dist/cjs/chunks/p-progress-bar.js +38 -0
- package/dist/cjs/chunks/p-textarea.js +89 -0
- package/dist/cjs/index.js +69 -76
- package/dist/cjs/inputClasses.js +8 -2
- package/dist/cjs/p-alert.js +2 -64
- package/dist/cjs/p-avatar.js +2 -70
- package/dist/cjs/p-drawer.js +2 -2
- package/dist/cjs/p-input-number.js +2 -145
- package/dist/cjs/p-input-search.js +2 -2
- package/dist/cjs/p-input.js +2 -92
- package/dist/cjs/p-modal.js +2 -2
- package/dist/cjs/p-progress-bar.js +2 -40
- package/dist/cjs/p-table-filter-icon.js +14 -9
- package/dist/cjs/p-textarea.js +2 -72
- package/dist/cjs/p-toggle.js +76 -64
- package/dist/cjs/useInputClasses.js +13 -18
- package/dist/es/chunks/index.js +748 -504
- package/dist/es/chunks/p-alert.js +53 -0
- package/dist/es/chunks/p-avatar.js +66 -0
- package/dist/es/chunks/p-btn.js +2 -2
- package/dist/es/chunks/p-date-picker.js +2 -2
- package/dist/es/chunks/p-input-number.js +162 -0
- package/dist/es/chunks/p-input-percent.js +2 -2
- package/dist/es/chunks/p-input.js +112 -0
- package/dist/es/chunks/p-progress-bar.js +39 -0
- package/dist/es/chunks/p-textarea.js +90 -0
- package/dist/es/index.js +119 -126
- package/dist/es/inputClasses.js +8 -2
- package/dist/es/p-alert.js +2 -64
- package/dist/es/p-avatar.js +2 -70
- package/dist/es/p-drawer.js +2 -2
- package/dist/es/p-input-number.js +2 -145
- package/dist/es/p-input-search.js +2 -2
- package/dist/es/p-input.js +2 -92
- package/dist/es/p-modal.js +2 -2
- package/dist/es/p-progress-bar.js +2 -40
- package/dist/es/p-table-filter-icon.js +14 -9
- package/dist/es/p-textarea.js +2 -72
- package/dist/es/p-toggle.js +77 -65
- package/dist/es/useInputClasses.js +14 -19
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +27 -10
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +9 -10
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +8 -248
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +2 -2
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -13
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +2 -2
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +30 -61
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +101 -65
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +113 -83
- package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +5 -20
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +3 -7
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +79 -42
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +25 -62
- package/dist/squirrel/composables/useInputClasses.d.ts +2 -1
- package/dist/squirrel/utils/index.d.ts +1 -3
- package/dist/squirrel/utils/inputClasses.d.ts +9 -525
- package/dist/squirrel.css +5 -5
- package/package.json +28 -28
- package/squirrel/components/p-alert/p-alert.spec.js +9 -8
- package/squirrel/components/p-alert/p-alert.vue +19 -31
- package/squirrel/components/p-avatar/p-avatar.spec.ts +10 -3
- package/squirrel/components/p-avatar/p-avatar.vue +40 -42
- package/squirrel/components/p-btn/p-btn.spec.js +2 -3
- package/squirrel/components/p-btn/p-btn.vue +2 -2
- package/squirrel/components/p-input/p-input.vue +63 -40
- package/squirrel/components/p-input-number/p-input-number.vue +101 -86
- package/squirrel/components/p-progress-bar/p-progress-bar.vue +9 -14
- package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +8 -9
- package/squirrel/components/p-table-sort/p-table-sort.vue +13 -16
- package/squirrel/components/p-textarea/p-textarea.vue +55 -37
- package/squirrel/components/p-toggle/p-toggle.vue +59 -43
- package/squirrel/composables/useInputClasses.spec.js +50 -13
- package/squirrel/composables/useInputClasses.ts +18 -24
- package/squirrel/utils/index.ts +0 -7
- package/squirrel/utils/inputClasses.ts +8 -2
- package/dist/cjs/inputClassesMixin.js +0 -58
- package/dist/cjs/tailwind.js +0 -25
- package/dist/es/inputClassesMixin.js +0 -59
- package/dist/es/tailwind.js +0 -25
- package/dist/squirrel/utils/inputClassesMixin.d.ts +0 -56
- package/dist/squirrel/utils/tailwind.d.ts +0 -8
- package/squirrel/utils/inputClassesMixin.spec.js +0 -241
- package/squirrel/utils/inputClassesMixin.ts +0 -60
- package/squirrel/utils/tailwind.spec.js +0 -27
- package/squirrel/utils/tailwind.ts +0 -28
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type Size } from '../p-btn/p-btn.types';
|
|
2
|
+
import { type PropType, type StyleValue } from 'vue';
|
|
3
|
+
declare const labelClasses: import("vue").ComputedRef<string>, textareaClasses: import("vue").ComputedRef<string>, errorMsgClasses: import("vue").ComputedRef<string>;
|
|
4
|
+
declare const attrs: import("vue").ComputedRef<{
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
}>;
|
|
7
|
+
declare const style: import("vue").ComputedRef<StyleValue>;
|
|
8
|
+
declare const updateValue: (e: Event) => void;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_1: {
|
|
11
|
+
label: string;
|
|
12
|
+
labelClasses: string;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
15
|
+
label?: (props: typeof __VLS_1) => any;
|
|
16
|
+
}>;
|
|
17
|
+
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
18
|
modelValue: {
|
|
4
|
-
type:
|
|
19
|
+
type: PropType<string | number | null>;
|
|
5
20
|
default: string;
|
|
6
21
|
};
|
|
7
22
|
label: {
|
|
@@ -16,18 +31,28 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
31
|
type: BooleanConstructor;
|
|
17
32
|
default: boolean;
|
|
18
33
|
};
|
|
19
|
-
}>, {}, {}, {
|
|
20
|
-
attrs(): {
|
|
21
|
-
[x: string]: unknown;
|
|
22
|
-
};
|
|
23
|
-
style(): StyleValue;
|
|
24
|
-
}, {
|
|
25
|
-
updateValue(e: Event): void;
|
|
26
|
-
}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
27
34
|
size: {
|
|
28
|
-
type:
|
|
35
|
+
type: PropType<Size>;
|
|
36
|
+
default: string;
|
|
37
|
+
validator(value: Size): boolean;
|
|
38
|
+
};
|
|
39
|
+
}>, {
|
|
40
|
+
labelClasses: typeof labelClasses;
|
|
41
|
+
textareaClasses: typeof textareaClasses;
|
|
42
|
+
errorMsgClasses: typeof errorMsgClasses;
|
|
43
|
+
attrs: typeof attrs;
|
|
44
|
+
style: typeof style;
|
|
45
|
+
updateValue: typeof updateValue;
|
|
46
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
"update:modelValue": (...args: any[]) => void;
|
|
48
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
modelValue: {
|
|
50
|
+
type: PropType<string | number | null>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
type: StringConstructor;
|
|
29
55
|
default: string;
|
|
30
|
-
validator(value: import("../index.js").Size): boolean;
|
|
31
56
|
};
|
|
32
57
|
errorMsg: {
|
|
33
58
|
type: StringConstructor;
|
|
@@ -37,26 +62,28 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
37
62
|
type: BooleanConstructor;
|
|
38
63
|
default: boolean;
|
|
39
64
|
};
|
|
40
|
-
rounded: {
|
|
41
|
-
type: BooleanConstructor;
|
|
42
|
-
default: boolean;
|
|
43
|
-
};
|
|
44
|
-
}>, {}, {}, {
|
|
45
|
-
allClasses(): {
|
|
46
|
-
input: string;
|
|
47
|
-
label: string;
|
|
48
|
-
errorMessage: string;
|
|
49
|
-
};
|
|
50
|
-
inputClasses(): string;
|
|
51
|
-
labelClasses(): string;
|
|
52
|
-
errorMsgClasses(): string;
|
|
53
|
-
selectClasses(): string;
|
|
54
|
-
textareaClasses(): string;
|
|
55
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
65
|
size: {
|
|
57
|
-
type:
|
|
66
|
+
type: PropType<Size>;
|
|
67
|
+
default: string;
|
|
68
|
+
validator(value: Size): boolean;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{
|
|
71
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
size: "sm" | "md" | "lg";
|
|
74
|
+
label: string;
|
|
75
|
+
required: boolean;
|
|
76
|
+
modelValue: string | number | null;
|
|
77
|
+
errorMsg: string;
|
|
78
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
79
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: PropType<string | number | null>;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
label: {
|
|
85
|
+
type: StringConstructor;
|
|
58
86
|
default: string;
|
|
59
|
-
validator(value: import("../index.js").Size): boolean;
|
|
60
87
|
};
|
|
61
88
|
errorMsg: {
|
|
62
89
|
type: StringConstructor;
|
|
@@ -66,18 +93,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
66
93
|
type: BooleanConstructor;
|
|
67
94
|
default: boolean;
|
|
68
95
|
};
|
|
69
|
-
|
|
70
|
-
type:
|
|
71
|
-
default:
|
|
96
|
+
size: {
|
|
97
|
+
type: PropType<Size>;
|
|
98
|
+
default: string;
|
|
99
|
+
validator(value: Size): boolean;
|
|
72
100
|
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
rounded: boolean;
|
|
77
|
-
errorMsg: string;
|
|
78
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
101
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
102
|
+
"update:modelValue": (...args: any[]) => void;
|
|
103
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
104
|
modelValue: {
|
|
80
|
-
type:
|
|
105
|
+
type: PropType<string | number | null>;
|
|
81
106
|
default: string;
|
|
82
107
|
};
|
|
83
108
|
label: {
|
|
@@ -92,12 +117,24 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
92
117
|
type: BooleanConstructor;
|
|
93
118
|
default: boolean;
|
|
94
119
|
};
|
|
120
|
+
size: {
|
|
121
|
+
type: PropType<Size>;
|
|
122
|
+
default: string;
|
|
123
|
+
validator(value: Size): boolean;
|
|
124
|
+
};
|
|
95
125
|
}>> & Readonly<{
|
|
96
126
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
97
127
|
}>, {
|
|
128
|
+
size: "sm" | "md" | "lg";
|
|
98
129
|
label: string;
|
|
99
130
|
required: boolean;
|
|
100
|
-
modelValue: string | number;
|
|
131
|
+
modelValue: string | number | null;
|
|
101
132
|
errorMsg: string;
|
|
102
133
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
134
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
103
135
|
export default _default;
|
|
136
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
137
|
+
new (): {
|
|
138
|
+
$slots: S;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type Size } from '../p-btn/p-btn.types';
|
|
2
|
+
import { type PropType } from 'vue';
|
|
3
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
4
|
modelValue: {
|
|
4
5
|
type: BooleanConstructor;
|
|
5
6
|
default: boolean;
|
|
@@ -16,68 +17,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
17
|
type: BooleanConstructor;
|
|
17
18
|
default: boolean;
|
|
18
19
|
};
|
|
19
|
-
}>, {}, {}, {
|
|
20
|
-
toggleClasses(): string;
|
|
21
|
-
toggleLabelClasses(): string;
|
|
22
|
-
attrs(): {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
style(): StyleValue;
|
|
26
|
-
}, {
|
|
27
|
-
change(e: Event): void;
|
|
28
|
-
}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
29
20
|
size: {
|
|
30
|
-
type:
|
|
31
|
-
default: string;
|
|
32
|
-
validator(value: import("../index.js").Size): boolean;
|
|
33
|
-
};
|
|
34
|
-
errorMsg: {
|
|
35
|
-
type: StringConstructor;
|
|
21
|
+
type: PropType<Size>;
|
|
36
22
|
default: string;
|
|
23
|
+
validator(value: Size): boolean;
|
|
37
24
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
rounded: {
|
|
43
|
-
type: BooleanConstructor;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
}>, {}, {}, {
|
|
47
|
-
allClasses(): {
|
|
48
|
-
input: string;
|
|
49
|
-
label: string;
|
|
50
|
-
errorMessage: string;
|
|
51
|
-
};
|
|
52
|
-
inputClasses(): string;
|
|
53
|
-
labelClasses(): string;
|
|
54
|
-
errorMsgClasses(): string;
|
|
55
|
-
selectClasses(): string;
|
|
56
|
-
textareaClasses(): string;
|
|
57
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
-
size: {
|
|
59
|
-
type: import("vue").PropType<import("../index.js").Size>;
|
|
60
|
-
default: string;
|
|
61
|
-
validator(value: import("../index.js").Size): boolean;
|
|
62
|
-
};
|
|
63
|
-
errorMsg: {
|
|
64
|
-
type: StringConstructor;
|
|
65
|
-
default: string;
|
|
66
|
-
};
|
|
67
|
-
required: {
|
|
68
|
-
type: BooleanConstructor;
|
|
69
|
-
default: boolean;
|
|
70
|
-
};
|
|
71
|
-
rounded: {
|
|
72
|
-
type: BooleanConstructor;
|
|
73
|
-
default: boolean;
|
|
74
|
-
};
|
|
75
|
-
}>> & Readonly<{}>, {
|
|
76
|
-
size: "sm" | "md" | "lg";
|
|
77
|
-
required: boolean;
|
|
78
|
-
rounded: boolean;
|
|
79
|
-
errorMsg: string;
|
|
80
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (...args: any[]) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
81
28
|
modelValue: {
|
|
82
29
|
type: BooleanConstructor;
|
|
83
30
|
default: boolean;
|
|
@@ -94,12 +41,28 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
94
41
|
type: BooleanConstructor;
|
|
95
42
|
default: boolean;
|
|
96
43
|
};
|
|
44
|
+
size: {
|
|
45
|
+
type: PropType<Size>;
|
|
46
|
+
default: string;
|
|
47
|
+
validator(value: Size): boolean;
|
|
48
|
+
};
|
|
97
49
|
}>> & Readonly<{
|
|
98
50
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
99
51
|
}>, {
|
|
52
|
+
size: "sm" | "md" | "lg";
|
|
100
53
|
label: string;
|
|
101
54
|
required: boolean;
|
|
102
55
|
modelValue: boolean;
|
|
103
56
|
errorMsg: string;
|
|
104
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
58
|
+
label?: ((props: {
|
|
59
|
+
label: string;
|
|
60
|
+
labelClasses: string;
|
|
61
|
+
}) => any) | undefined;
|
|
62
|
+
}>;
|
|
105
63
|
export default _default;
|
|
64
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
65
|
+
new (): {
|
|
66
|
+
$slots: S;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Size } from '../components/p-btn/p-btn.types';
|
|
2
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
3
|
type Props = {
|
|
3
4
|
size: Size;
|
|
4
5
|
errorMsg: string;
|
|
@@ -7,7 +8,7 @@ type Props = {
|
|
|
7
8
|
suffix: boolean;
|
|
8
9
|
rounded: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare function useInputClasses(props: Partial<Props
|
|
11
|
+
export declare function useInputClasses(props: MaybeRefOrGetter<Partial<Props>>): {
|
|
11
12
|
inputClasses: import("vue").ComputedRef<string>;
|
|
12
13
|
labelClasses: import("vue").ComputedRef<string>;
|
|
13
14
|
selectClasses: import("vue").ComputedRef<string>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type Size, SIZES } from '../components/p-btn/p-btn.types';
|
|
2
2
|
import { CURRENCY_INPUT_DEFAULTS } from './currency';
|
|
3
3
|
import { getNextActiveElement, isElement, isVisible } from './dom';
|
|
4
|
-
import inputClassesMixin from './inputClassesMixin';
|
|
5
4
|
import { setupListKeyboardNavigation } from './listKeyboardNavigation';
|
|
6
5
|
import { toNumberOrNull } from './number';
|
|
7
6
|
import { isObject } from './object';
|
|
8
7
|
import { createPagingRange } from './pagination';
|
|
9
8
|
import { sanitizeUrl } from './sanitization';
|
|
10
9
|
import { toString } from './string';
|
|
11
|
-
import { type Color, getColor, getColorDeep, getScreen } from './tailwind';
|
|
12
10
|
import { splitStringForHighlight } from './text';
|
|
13
|
-
export {
|
|
11
|
+
export { createPagingRange, CURRENCY_INPUT_DEFAULTS, getNextActiveElement, isElement, isObject, isVisible, sanitizeUrl, setupListKeyboardNavigation, Size, SIZES, splitStringForHighlight, toNumberOrNull, toString, };
|