@pequity/squirrel 6.0.12 → 6.0.14

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 (69) hide show
  1. package/dist/cjs/chunks/index.js +2645 -0
  2. package/dist/cjs/chunks/p-btn.types.js +3 -0
  3. package/dist/cjs/chunks/p-select.js +2 -2
  4. package/dist/cjs/index.js +49 -52
  5. package/dist/cjs/inputClasses.js +129 -0
  6. package/dist/cjs/inputClassesMixin.js +23 -19
  7. package/dist/cjs/p-btn.js +56 -57
  8. package/dist/cjs/p-input-search.js +3 -3
  9. package/dist/cjs/useInputClasses.js +19 -18
  10. package/dist/es/chunks/index.js +2646 -0
  11. package/dist/es/chunks/p-btn.types.js +4 -0
  12. package/dist/es/chunks/p-select.js +2 -2
  13. package/dist/es/index.js +75 -78
  14. package/dist/es/inputClasses.js +129 -0
  15. package/dist/es/inputClassesMixin.js +23 -19
  16. package/dist/es/p-btn.js +56 -57
  17. package/dist/es/p-input-search.js +3 -3
  18. package/dist/es/useInputClasses.js +23 -22
  19. package/dist/squirrel/components/p-btn/p-btn.types.d.ts +2 -1
  20. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +395 -17
  21. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +30 -22
  22. package/dist/squirrel/components/p-input/p-input.vue.d.ts +11 -7
  23. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +11 -7
  24. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +3 -3
  25. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +16 -12
  26. package/dist/squirrel/components/p-select/p-select.vue.d.ts +5 -5
  27. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +30 -22
  28. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  29. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +11 -7
  30. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +11 -7
  31. package/dist/squirrel/composables/useInputClasses.d.ts +3 -3
  32. package/dist/squirrel/index.d.ts +1 -0
  33. package/dist/squirrel/utils/index.d.ts +2 -2
  34. package/dist/squirrel/utils/inputClasses.d.ts +988 -0
  35. package/dist/squirrel/utils/inputClassesMixin.d.ts +12 -8
  36. package/dist/squirrel.css +15 -22
  37. package/package.json +22 -19
  38. package/squirrel/assets/squirrel.css +1 -1
  39. package/squirrel/components/p-action-bar/p-action-bar.stories.js +1 -2
  40. package/squirrel/components/p-btn/p-btn.spec.js +1 -1
  41. package/squirrel/components/p-btn/p-btn.types.ts +3 -1
  42. package/squirrel/components/p-btn/p-btn.vue +60 -74
  43. package/squirrel/components/p-file-upload/p-file-upload.spec.js +3 -8
  44. package/squirrel/components/p-file-upload/p-file-upload.vue +6 -16
  45. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +3 -10
  46. package/squirrel/components/p-input/p-input.spec.js +3 -8
  47. package/squirrel/components/p-input-number/p-input-number.spec.js +15 -18
  48. package/squirrel/components/p-input-percent/p-input-percent.spec.js +3 -8
  49. package/squirrel/components/p-input-percent/p-input-percent.vue +3 -3
  50. package/squirrel/components/p-input-search/p-input-search.vue +4 -4
  51. package/squirrel/components/p-select/p-select.spec.js +28 -34
  52. package/squirrel/components/p-select/p-select.vue +4 -4
  53. package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
  54. package/squirrel/components/p-textarea/p-textarea.spec.js +3 -8
  55. package/squirrel/composables/useInputClasses.spec.js +138 -77
  56. package/squirrel/composables/useInputClasses.ts +25 -39
  57. package/squirrel/index.ts +1 -0
  58. package/squirrel/utils/index.ts +3 -36
  59. package/squirrel/utils/inputClasses.ts +130 -0
  60. package/squirrel/utils/inputClassesMixin.spec.js +153 -64
  61. package/squirrel/utils/inputClassesMixin.ts +26 -43
  62. package/dist/cjs/inputClassesShared.js +0 -76
  63. package/dist/es/inputClassesShared.js +0 -76
  64. package/dist/squirrel/utils/inputClassesShared.d.ts +0 -45
  65. package/squirrel/assets/file-upload-drag-over-icon.svg +0 -5
  66. package/squirrel/assets/file-upload-upload-icon.svg +0 -5
  67. package/squirrel/assets/file-upload-x-icon-hover.svg +0 -8
  68. package/squirrel/assets/file-upload-x-icon.svg +0 -8
  69. package/squirrel/utils/inputClassesShared.ts +0 -75
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../../utils/inputClassesShared';
1
+ import { type Size } from '../p-btn/p-btn.types';
2
2
  import { type PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  modelValue: {
@@ -6,9 +6,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
6
6
  default: string;
7
7
  };
8
8
  size: {
9
- type: PropType<InputSize>;
9
+ type: PropType<Size>;
10
10
  default: string;
11
- validator(value: InputSize): boolean;
11
+ validator(value: Size): boolean;
12
12
  };
13
13
  showEnterIcon: {
14
14
  type: BooleanConstructor;
@@ -30,9 +30,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
30
30
  default: string;
31
31
  };
32
32
  size: {
33
- type: PropType<InputSize>;
33
+ type: PropType<Size>;
34
34
  default: string;
35
- validator(value: InputSize): boolean;
35
+ validator(value: Size): boolean;
36
36
  };
37
37
  showEnterIcon: {
38
38
  type: BooleanConstructor;
@@ -79,9 +79,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
79
79
  style(): import("vue").StyleValue;
80
80
  }, {}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
81
81
  size: {
82
- type: PropType<InputSize>;
82
+ type: PropType<Size>;
83
83
  default: string;
84
- validator(value: InputSize): boolean;
84
+ validator(value: Size): boolean;
85
85
  };
86
86
  errorMsg: {
87
87
  type: StringConstructor;
@@ -95,18 +95,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
95
95
  type: BooleanConstructor;
96
96
  default: boolean;
97
97
  };
98
- }>, {}, {
99
- errorMsgClasses: string;
100
- }, {
98
+ }>, {}, {}, {
99
+ allClasses(): {
100
+ input: string;
101
+ label: string;
102
+ errorMessage: string;
103
+ };
101
104
  inputClasses(): string;
102
105
  labelClasses(): string;
106
+ errorMsgClasses(): string;
103
107
  selectClasses(): string;
104
108
  textareaClasses(): string;
105
109
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
106
110
  size: {
107
- type: PropType<InputSize>;
111
+ type: PropType<Size>;
108
112
  default: string;
109
- validator(value: InputSize): boolean;
113
+ validator(value: Size): boolean;
110
114
  };
111
115
  errorMsg: {
112
116
  type: StringConstructor;
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../../utils/inputClassesShared';
1
+ import { type Size } from '../p-btn/p-btn.types';
2
2
  import { type PropType } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
@@ -34,9 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
34
34
  default: boolean;
35
35
  };
36
36
  size: {
37
- type: PropType<InputSize>;
37
+ type: PropType<Size>;
38
38
  default: string;
39
- validator(value: InputSize): boolean;
39
+ validator(value: Size): boolean;
40
40
  };
41
41
  itemText: {
42
42
  type: StringConstructor;
@@ -70,9 +70,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
70
70
  default: boolean;
71
71
  };
72
72
  size: {
73
- type: PropType<InputSize>;
73
+ type: PropType<Size>;
74
74
  default: string;
75
- validator(value: InputSize): boolean;
75
+ validator(value: Size): boolean;
76
76
  };
77
77
  itemText: {
78
78
  type: StringConstructor;
@@ -32,9 +32,9 @@ declare function __VLS_template(): {
32
32
  default: string;
33
33
  };
34
34
  size: {
35
- type: PropType<import("../..").InputSize>;
35
+ type: PropType<import("..").Size>;
36
36
  default: string;
37
- validator(value: import("../..").InputSize): boolean;
37
+ validator(value: import("..").Size): boolean;
38
38
  };
39
39
  showEnterIcon: {
40
40
  type: BooleanConstructor;
@@ -91,9 +91,9 @@ declare function __VLS_template(): {
91
91
  style(): StyleValue;
92
92
  }, {}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
93
93
  size: {
94
- type: PropType<import("../..").InputSize>;
94
+ type: PropType<import("..").Size>;
95
95
  default: string;
96
- validator(value: import("../..").InputSize): boolean;
96
+ validator(value: import("..").Size): boolean;
97
97
  };
98
98
  errorMsg: {
99
99
  type: StringConstructor;
@@ -107,18 +107,22 @@ declare function __VLS_template(): {
107
107
  type: BooleanConstructor;
108
108
  default: boolean;
109
109
  };
110
- }>, {}, {
111
- errorMsgClasses: string;
112
- }, {
110
+ }>, {}, {}, {
111
+ allClasses(): {
112
+ input: string;
113
+ label: string;
114
+ errorMessage: string;
115
+ };
113
116
  inputClasses(): string;
114
117
  labelClasses(): string;
118
+ errorMsgClasses(): string;
115
119
  selectClasses(): string;
116
120
  textareaClasses(): string;
117
121
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
118
122
  size: {
119
- type: PropType<import("../..").InputSize>;
123
+ type: PropType<import("..").Size>;
120
124
  default: string;
121
- validator(value: import("../..").InputSize): boolean;
125
+ validator(value: import("..").Size): boolean;
122
126
  };
123
127
  errorMsg: {
124
128
  type: StringConstructor;
@@ -186,9 +190,9 @@ declare function __VLS_template(): {
186
190
  default: string;
187
191
  };
188
192
  size: {
189
- type: PropType<import("../..").InputSize>;
193
+ type: PropType<import("..").Size>;
190
194
  default: string;
191
- validator(value: import("../..").InputSize): boolean;
195
+ validator(value: import("..").Size): boolean;
192
196
  };
193
197
  showEnterIcon: {
194
198
  type: BooleanConstructor;
@@ -497,9 +501,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
497
501
  default: string;
498
502
  };
499
503
  size: {
500
- type: PropType<import("../..").InputSize>;
504
+ type: PropType<import("..").Size>;
501
505
  default: string;
502
- validator(value: import("../..").InputSize): boolean;
506
+ validator(value: import("..").Size): boolean;
503
507
  };
504
508
  showEnterIcon: {
505
509
  type: BooleanConstructor;
@@ -556,9 +560,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
556
560
  style(): StyleValue;
557
561
  }, {}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
558
562
  size: {
559
- type: PropType<import("../..").InputSize>;
563
+ type: PropType<import("..").Size>;
560
564
  default: string;
561
- validator(value: import("../..").InputSize): boolean;
565
+ validator(value: import("..").Size): boolean;
562
566
  };
563
567
  errorMsg: {
564
568
  type: StringConstructor;
@@ -572,18 +576,22 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
572
576
  type: BooleanConstructor;
573
577
  default: boolean;
574
578
  };
575
- }>, {}, {
576
- errorMsgClasses: string;
577
- }, {
579
+ }>, {}, {}, {
580
+ allClasses(): {
581
+ input: string;
582
+ label: string;
583
+ errorMessage: string;
584
+ };
578
585
  inputClasses(): string;
579
586
  labelClasses(): string;
587
+ errorMsgClasses(): string;
580
588
  selectClasses(): string;
581
589
  textareaClasses(): string;
582
590
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
583
591
  size: {
584
- type: PropType<import("../..").InputSize>;
592
+ type: PropType<import("..").Size>;
585
593
  default: string;
586
- validator(value: import("../..").InputSize): boolean;
594
+ validator(value: import("..").Size): boolean;
587
595
  };
588
596
  errorMsg: {
589
597
  type: StringConstructor;
@@ -651,9 +659,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
651
659
  default: string;
652
660
  };
653
661
  size: {
654
- type: PropType<import("../..").InputSize>;
662
+ type: PropType<import("..").Size>;
655
663
  default: string;
656
- validator(value: import("../..").InputSize): boolean;
664
+ validator(value: import("..").Size): boolean;
657
665
  };
658
666
  showEnterIcon: {
659
667
  type: BooleanConstructor;
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
26
26
  }>, {}, {
27
27
  DEFAULT_CLASSES: string;
28
28
  }, {
29
- textColorClass(): "" | "text-active-blue" | "text-p-gray-60";
29
+ textColorClass(): "" | "text-p-gray-60" | "text-active-blue";
30
30
  style(): {
31
31
  color?: undefined;
32
32
  } | {
@@ -25,9 +25,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
25
  updateValue(e: Event): void;
26
26
  }, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
27
27
  size: {
28
- type: import("vue").PropType<import("../../index.js").InputSize>;
28
+ type: import("vue").PropType<import("../index.js").Size>;
29
29
  default: string;
30
- validator(value: import("../../index.js").InputSize): boolean;
30
+ validator(value: import("../index.js").Size): boolean;
31
31
  };
32
32
  errorMsg: {
33
33
  type: StringConstructor;
@@ -41,18 +41,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
41
41
  type: BooleanConstructor;
42
42
  default: boolean;
43
43
  };
44
- }>, {}, {
45
- errorMsgClasses: string;
46
- }, {
44
+ }>, {}, {}, {
45
+ allClasses(): {
46
+ input: string;
47
+ label: string;
48
+ errorMessage: string;
49
+ };
47
50
  inputClasses(): string;
48
51
  labelClasses(): string;
52
+ errorMsgClasses(): string;
49
53
  selectClasses(): string;
50
54
  textareaClasses(): string;
51
55
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
52
56
  size: {
53
- type: import("vue").PropType<import("../../index.js").InputSize>;
57
+ type: import("vue").PropType<import("../index.js").Size>;
54
58
  default: string;
55
- validator(value: import("../../index.js").InputSize): boolean;
59
+ validator(value: import("../index.js").Size): boolean;
56
60
  };
57
61
  errorMsg: {
58
62
  type: StringConstructor;
@@ -27,9 +27,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
27
27
  change(e: Event): void;
28
28
  }, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
29
29
  size: {
30
- type: import("vue").PropType<import("../../index.js").InputSize>;
30
+ type: import("vue").PropType<import("../index.js").Size>;
31
31
  default: string;
32
- validator(value: import("../../index.js").InputSize): boolean;
32
+ validator(value: import("../index.js").Size): boolean;
33
33
  };
34
34
  errorMsg: {
35
35
  type: StringConstructor;
@@ -43,18 +43,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
43
43
  type: BooleanConstructor;
44
44
  default: boolean;
45
45
  };
46
- }>, {}, {
47
- errorMsgClasses: string;
48
- }, {
46
+ }>, {}, {}, {
47
+ allClasses(): {
48
+ input: string;
49
+ label: string;
50
+ errorMessage: string;
51
+ };
49
52
  inputClasses(): string;
50
53
  labelClasses(): string;
54
+ errorMsgClasses(): string;
51
55
  selectClasses(): string;
52
56
  textareaClasses(): string;
53
57
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
54
58
  size: {
55
- type: import("vue").PropType<import("../../index.js").InputSize>;
59
+ type: import("vue").PropType<import("../index.js").Size>;
56
60
  default: string;
57
- validator(value: import("../../index.js").InputSize): boolean;
61
+ validator(value: import("../index.js").Size): boolean;
58
62
  };
59
63
  errorMsg: {
60
64
  type: StringConstructor;
@@ -1,6 +1,6 @@
1
- import { type InputSize } from '../utils/inputClassesShared';
1
+ import { type Size } from '../components/p-btn/p-btn.types';
2
2
  type Props = {
3
- size: InputSize;
3
+ size: Size;
4
4
  errorMsg: string;
5
5
  required: boolean;
6
6
  prefix: boolean;
@@ -12,6 +12,6 @@ export declare function useInputClasses(props: Partial<Props>): {
12
12
  labelClasses: import("vue").ComputedRef<string>;
13
13
  selectClasses: import("vue").ComputedRef<string>;
14
14
  textareaClasses: import("vue").ComputedRef<string>;
15
- errorMsgClasses: import("vue").Ref<string, string>;
15
+ errorMsgClasses: import("vue").ComputedRef<string>;
16
16
  };
17
17
  export {};
@@ -3,3 +3,4 @@ export * from './components';
3
3
  export * from './composables';
4
4
  export * from './tailwind/config';
5
5
  export * from './utils';
6
+ export * from 'tailwind-variants';
@@ -1,7 +1,7 @@
1
+ import { type Size, SIZES } from '../components/p-btn/p-btn.types';
1
2
  import { CURRENCY_INPUT_DEFAULTS } from './currency';
2
3
  import { getNextActiveElement, isElement, isVisible } from './dom';
3
4
  import inputClassesMixin from './inputClassesMixin';
4
- import { ERROR_MSG, INPUT_BASE, INPUT_ERROR, INPUT_NORMAL, INPUT_SIZES, type InputSize, LABEL_BASE, LABEL_REQUIRED, LABEL_SIZES, SELECT_ARROW, SELECT_BASE, SELECT_SIZES, SPACING_LEFT, SPACING_PREFIX, SPACING_RIGHT, SPACING_SUFFIX, TEXTAREA_BASE } from './inputClassesShared';
5
5
  import { setupListKeyboardNavigation } from './listKeyboardNavigation';
6
6
  import { toNumberOrNull } from './number';
7
7
  import { isObject } from './object';
@@ -10,4 +10,4 @@ import { sanitizeUrl } from './sanitization';
10
10
  import { toString } from './string';
11
11
  import { type Color, getColor, getColorDeep, getScreen } from './tailwind';
12
12
  import { splitStringForHighlight } from './text';
13
- export { Color, createPagingRange, CURRENCY_INPUT_DEFAULTS, ERROR_MSG, getColor, getColorDeep, getNextActiveElement, getScreen, INPUT_BASE, INPUT_ERROR, INPUT_NORMAL, INPUT_SIZES, inputClassesMixin, InputSize, isElement, isObject, isVisible, LABEL_BASE, LABEL_REQUIRED, LABEL_SIZES, sanitizeUrl, SELECT_ARROW, SELECT_BASE, SELECT_SIZES, setupListKeyboardNavigation, SPACING_LEFT, SPACING_PREFIX, SPACING_RIGHT, SPACING_SUFFIX, splitStringForHighlight, TEXTAREA_BASE, toNumberOrNull, toString, };
13
+ export { Color, createPagingRange, CURRENCY_INPUT_DEFAULTS, getColor, getColorDeep, getNextActiveElement, getScreen, inputClassesMixin, isElement, isObject, isVisible, sanitizeUrl, setupListKeyboardNavigation, Size, SIZES, splitStringForHighlight, toNumberOrNull, toString, };