@pequity/squirrel 6.0.12 → 6.0.13

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 (60) 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 +23 -31
  5. package/dist/cjs/inputClasses.js +127 -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 +28 -36
  14. package/dist/es/inputClasses.js +127 -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-textarea/p-textarea.vue.d.ts +11 -7
  29. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +11 -7
  30. package/dist/squirrel/composables/useInputClasses.d.ts +3 -3
  31. package/dist/squirrel/index.d.ts +1 -0
  32. package/dist/squirrel/utils/index.d.ts +2 -2
  33. package/dist/squirrel/utils/inputClasses.d.ts +938 -0
  34. package/dist/squirrel/utils/inputClassesMixin.d.ts +12 -8
  35. package/dist/squirrel.css +13 -13
  36. package/package.json +10 -7
  37. package/squirrel/components/p-btn/p-btn.spec.js +1 -1
  38. package/squirrel/components/p-btn/p-btn.types.ts +3 -1
  39. package/squirrel/components/p-btn/p-btn.vue +60 -74
  40. package/squirrel/components/p-file-upload/p-file-upload.spec.js +3 -8
  41. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +3 -10
  42. package/squirrel/components/p-input/p-input.spec.js +3 -8
  43. package/squirrel/components/p-input-number/p-input-number.spec.js +15 -18
  44. package/squirrel/components/p-input-percent/p-input-percent.spec.js +3 -8
  45. package/squirrel/components/p-input-percent/p-input-percent.vue +3 -3
  46. package/squirrel/components/p-input-search/p-input-search.vue +4 -4
  47. package/squirrel/components/p-select/p-select.spec.js +27 -33
  48. package/squirrel/components/p-select/p-select.vue +4 -4
  49. package/squirrel/components/p-textarea/p-textarea.spec.js +3 -8
  50. package/squirrel/composables/useInputClasses.spec.js +138 -77
  51. package/squirrel/composables/useInputClasses.ts +25 -39
  52. package/squirrel/index.ts +1 -0
  53. package/squirrel/utils/index.ts +3 -36
  54. package/squirrel/utils/inputClasses.ts +128 -0
  55. package/squirrel/utils/inputClassesMixin.spec.js +153 -64
  56. package/squirrel/utils/inputClassesMixin.ts +26 -43
  57. package/dist/cjs/inputClassesShared.js +0 -76
  58. package/dist/es/inputClassesShared.js +0 -76
  59. package/dist/squirrel/utils/inputClassesShared.d.ts +0 -45
  60. package/squirrel/utils/inputClassesShared.ts +0 -75
@@ -1,45 +0,0 @@
1
- export declare const LABEL_BASE = "block mb-1 font-medium";
2
- export declare const LABEL_SIZES: {
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- };
7
- export declare const LABEL_REQUIRED = "after:content-['_*'] after:text-on-error";
8
- export declare const ERROR_MSG = "text-xs text-on-error mt-1";
9
- export declare const INPUT_BASE: string;
10
- export declare const INPUT_NORMAL = "ring-p-gray-30 hover:ring-primary focus:ring-primary";
11
- export declare const INPUT_ERROR = "ring-on-error hover:ring-on-error focus:ring-on-error";
12
- export declare const INPUT_SIZES: {
13
- readonly sm: "h-8 text-sm rounded";
14
- readonly md: "h-10 text-base rounded";
15
- readonly lg: "h-12 text-lg rounded";
16
- };
17
- export type InputSize = keyof typeof INPUT_SIZES;
18
- export declare const TEXTAREA_BASE = "resize-y px-3 py-3 overflow-auto h-auto";
19
- export declare const SELECT_BASE = "truncate";
20
- export declare const SELECT_ARROW = "squirrel-bg-chevron-down bg-no-repeat appearance-none";
21
- export declare const SELECT_SIZES: {
22
- sm: string;
23
- md: string;
24
- lg: string;
25
- };
26
- export declare const SPACING_LEFT: {
27
- sm: string;
28
- md: string;
29
- lg: string;
30
- };
31
- export declare const SPACING_RIGHT: {
32
- sm: string;
33
- md: string;
34
- lg: string;
35
- };
36
- export declare const SPACING_PREFIX: {
37
- sm: string;
38
- md: string;
39
- lg: string;
40
- };
41
- export declare const SPACING_SUFFIX: {
42
- sm: string;
43
- md: string;
44
- lg: string;
45
- };
@@ -1,75 +0,0 @@
1
- export const LABEL_BASE = `block mb-1 font-medium`;
2
-
3
- export const LABEL_SIZES = {
4
- sm: `text-xs`,
5
- md: `text-sm`,
6
- lg: `text-base`,
7
- };
8
-
9
- export const LABEL_REQUIRED = `after:content-['_*'] after:text-on-error`;
10
-
11
- export const ERROR_MSG = `text-xs text-on-error mt-1`;
12
-
13
- export const INPUT_BASE = [
14
- 'text-night',
15
- 'w-full',
16
- 'bg-surface',
17
- 'focus:outline-none',
18
- 'border-0',
19
- 'ring-1',
20
- 'ring-inset',
21
- 'focus:ring-2',
22
- 'disabled:ring-p-gray-30',
23
- 'disabled:hover:ring-p-gray-30',
24
- 'disabled:bg-p-blue-10',
25
- 'disabled:cursor-default',
26
- 'placeholder:text-p-gray-40',
27
- ].join(' ');
28
-
29
- export const INPUT_NORMAL = `ring-p-gray-30 hover:ring-primary focus:ring-primary`;
30
-
31
- export const INPUT_ERROR = `ring-on-error hover:ring-on-error focus:ring-on-error`;
32
-
33
- export const INPUT_SIZES = {
34
- sm: `h-8 text-sm rounded`,
35
- md: `h-10 text-base rounded`,
36
- lg: `h-12 text-lg rounded`,
37
- } as const;
38
-
39
- export type InputSize = keyof typeof INPUT_SIZES;
40
-
41
- export const TEXTAREA_BASE = `resize-y px-3 py-3 overflow-auto h-auto`;
42
-
43
- export const SELECT_BASE = 'truncate';
44
-
45
- export const SELECT_ARROW = `squirrel-bg-chevron-down bg-no-repeat appearance-none`;
46
-
47
- export const SELECT_SIZES = {
48
- sm: `bg-[right_0.675rem_center] pr-8`,
49
- md: `bg-[right_1rem_center] pr-10`,
50
- lg: `bg-[right_1.25rem_center] pr-12`,
51
- };
52
-
53
- export const SPACING_LEFT = {
54
- sm: `pl-3`,
55
- md: `pl-4`,
56
- lg: `pl-5`,
57
- };
58
-
59
- export const SPACING_RIGHT = {
60
- sm: `pr-3`,
61
- md: `pr-4`,
62
- lg: `pr-5`,
63
- };
64
-
65
- export const SPACING_PREFIX = {
66
- sm: `pl-6`,
67
- md: `pl-8`,
68
- lg: `pl-12`,
69
- };
70
-
71
- export const SPACING_SUFFIX = {
72
- sm: `pr-6`,
73
- md: `pr-8`,
74
- lg: `pr-12`,
75
- };