@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.
Files changed (96) hide show
  1. package/dist/cjs/chunks/index.js +748 -504
  2. package/dist/cjs/chunks/p-alert.js +52 -0
  3. package/dist/cjs/chunks/p-avatar.js +65 -0
  4. package/dist/cjs/chunks/p-btn.js +2 -2
  5. package/dist/cjs/chunks/p-date-picker.js +2 -2
  6. package/dist/cjs/chunks/p-input-number.js +161 -0
  7. package/dist/cjs/chunks/p-input-percent.js +2 -2
  8. package/dist/cjs/chunks/p-input.js +111 -0
  9. package/dist/cjs/chunks/p-progress-bar.js +38 -0
  10. package/dist/cjs/chunks/p-textarea.js +89 -0
  11. package/dist/cjs/index.js +69 -76
  12. package/dist/cjs/inputClasses.js +8 -2
  13. package/dist/cjs/p-alert.js +2 -64
  14. package/dist/cjs/p-avatar.js +2 -70
  15. package/dist/cjs/p-drawer.js +2 -2
  16. package/dist/cjs/p-input-number.js +2 -145
  17. package/dist/cjs/p-input-search.js +2 -2
  18. package/dist/cjs/p-input.js +2 -92
  19. package/dist/cjs/p-modal.js +2 -2
  20. package/dist/cjs/p-progress-bar.js +2 -40
  21. package/dist/cjs/p-table-filter-icon.js +14 -9
  22. package/dist/cjs/p-textarea.js +2 -72
  23. package/dist/cjs/p-toggle.js +76 -64
  24. package/dist/cjs/useInputClasses.js +13 -18
  25. package/dist/es/chunks/index.js +748 -504
  26. package/dist/es/chunks/p-alert.js +53 -0
  27. package/dist/es/chunks/p-avatar.js +66 -0
  28. package/dist/es/chunks/p-btn.js +2 -2
  29. package/dist/es/chunks/p-date-picker.js +2 -2
  30. package/dist/es/chunks/p-input-number.js +162 -0
  31. package/dist/es/chunks/p-input-percent.js +2 -2
  32. package/dist/es/chunks/p-input.js +112 -0
  33. package/dist/es/chunks/p-progress-bar.js +39 -0
  34. package/dist/es/chunks/p-textarea.js +90 -0
  35. package/dist/es/index.js +119 -126
  36. package/dist/es/inputClasses.js +8 -2
  37. package/dist/es/p-alert.js +2 -64
  38. package/dist/es/p-avatar.js +2 -70
  39. package/dist/es/p-drawer.js +2 -2
  40. package/dist/es/p-input-number.js +2 -145
  41. package/dist/es/p-input-search.js +2 -2
  42. package/dist/es/p-input.js +2 -92
  43. package/dist/es/p-modal.js +2 -2
  44. package/dist/es/p-progress-bar.js +2 -40
  45. package/dist/es/p-table-filter-icon.js +14 -9
  46. package/dist/es/p-textarea.js +2 -72
  47. package/dist/es/p-toggle.js +77 -65
  48. package/dist/es/useInputClasses.js +14 -19
  49. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +27 -10
  50. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +9 -10
  51. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +8 -248
  52. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +2 -2
  53. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -13
  54. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +2 -2
  55. package/dist/squirrel/components/p-input/p-input.vue.d.ts +30 -61
  56. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +101 -65
  57. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +113 -83
  58. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
  59. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +5 -20
  60. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  61. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
  62. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +3 -7
  63. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +79 -42
  64. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +25 -62
  65. package/dist/squirrel/composables/useInputClasses.d.ts +2 -1
  66. package/dist/squirrel/utils/index.d.ts +1 -3
  67. package/dist/squirrel/utils/inputClasses.d.ts +9 -525
  68. package/dist/squirrel.css +5 -5
  69. package/package.json +28 -28
  70. package/squirrel/components/p-alert/p-alert.spec.js +9 -8
  71. package/squirrel/components/p-alert/p-alert.vue +19 -31
  72. package/squirrel/components/p-avatar/p-avatar.spec.ts +10 -3
  73. package/squirrel/components/p-avatar/p-avatar.vue +40 -42
  74. package/squirrel/components/p-btn/p-btn.spec.js +2 -3
  75. package/squirrel/components/p-btn/p-btn.vue +2 -2
  76. package/squirrel/components/p-input/p-input.vue +63 -40
  77. package/squirrel/components/p-input-number/p-input-number.vue +101 -86
  78. package/squirrel/components/p-progress-bar/p-progress-bar.vue +9 -14
  79. package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +8 -9
  80. package/squirrel/components/p-table-sort/p-table-sort.vue +13 -16
  81. package/squirrel/components/p-textarea/p-textarea.vue +55 -37
  82. package/squirrel/components/p-toggle/p-toggle.vue +59 -43
  83. package/squirrel/composables/useInputClasses.spec.js +50 -13
  84. package/squirrel/composables/useInputClasses.ts +18 -24
  85. package/squirrel/utils/index.ts +0 -7
  86. package/squirrel/utils/inputClasses.ts +8 -2
  87. package/dist/cjs/inputClassesMixin.js +0 -58
  88. package/dist/cjs/tailwind.js +0 -25
  89. package/dist/es/inputClassesMixin.js +0 -59
  90. package/dist/es/tailwind.js +0 -25
  91. package/dist/squirrel/utils/inputClassesMixin.d.ts +0 -56
  92. package/dist/squirrel/utils/tailwind.d.ts +0 -8
  93. package/squirrel/utils/inputClassesMixin.spec.js +0 -241
  94. package/squirrel/utils/inputClassesMixin.ts +0 -60
  95. package/squirrel/utils/tailwind.spec.js +0 -27
  96. package/squirrel/utils/tailwind.ts +0 -28
@@ -1,7 +1,22 @@
1
- import { type StyleValue } from 'vue';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
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: (StringConstructor | NumberConstructor)[];
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: import("vue").PropType<import("../index.js").Size>;
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: import("vue").PropType<import("../index.js").Size>;
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
- rounded: {
70
- type: BooleanConstructor;
71
- default: boolean;
96
+ size: {
97
+ type: PropType<Size>;
98
+ default: string;
99
+ validator(value: Size): boolean;
72
100
  };
73
- }>> & Readonly<{}>, {
74
- size: "sm" | "md" | "lg";
75
- required: boolean;
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: (StringConstructor | NumberConstructor)[];
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 StyleValue } from 'vue';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
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: import("vue").PropType<import("../index.js").Size>;
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
- required: {
39
- type: BooleanConstructor;
40
- default: boolean;
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 { Color, createPagingRange, CURRENCY_INPUT_DEFAULTS, getColor, getColorDeep, getNextActiveElement, getScreen, inputClassesMixin, isElement, isObject, isVisible, sanitizeUrl, setupListKeyboardNavigation, Size, SIZES, splitStringForHighlight, toNumberOrNull, toString, };
11
+ export { createPagingRange, CURRENCY_INPUT_DEFAULTS, getNextActiveElement, isElement, isObject, isVisible, sanitizeUrl, setupListKeyboardNavigation, Size, SIZES, splitStringForHighlight, toNumberOrNull, toString, };