@pequity/squirrel 6.1.1 → 7.0.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.
Files changed (94) hide show
  1. package/dist/cjs/chunks/p-alert.js +52 -0
  2. package/dist/cjs/chunks/p-avatar.js +65 -0
  3. package/dist/cjs/chunks/p-btn.js +1 -1
  4. package/dist/cjs/chunks/p-date-picker.js +2 -2
  5. package/dist/cjs/chunks/p-input-number.js +161 -0
  6. package/dist/cjs/chunks/p-input-percent.js +2 -2
  7. package/dist/cjs/chunks/p-input.js +111 -0
  8. package/dist/cjs/chunks/p-progress-bar.js +38 -0
  9. package/dist/cjs/chunks/p-textarea.js +89 -0
  10. package/dist/cjs/index.js +69 -76
  11. package/dist/cjs/inputClasses.js +8 -2
  12. package/dist/cjs/p-alert.js +2 -64
  13. package/dist/cjs/p-avatar.js +2 -70
  14. package/dist/cjs/p-drawer.js +2 -2
  15. package/dist/cjs/p-input-number.js +2 -145
  16. package/dist/cjs/p-input-search.js +2 -2
  17. package/dist/cjs/p-input.js +2 -92
  18. package/dist/cjs/p-modal.js +2 -2
  19. package/dist/cjs/p-progress-bar.js +2 -40
  20. package/dist/cjs/p-table-filter-icon.js +14 -9
  21. package/dist/cjs/p-textarea.js +2 -72
  22. package/dist/cjs/p-toggle.js +76 -64
  23. package/dist/cjs/useInputClasses.js +13 -18
  24. package/dist/es/chunks/p-alert.js +53 -0
  25. package/dist/es/chunks/p-avatar.js +66 -0
  26. package/dist/es/chunks/p-btn.js +1 -1
  27. package/dist/es/chunks/p-date-picker.js +2 -2
  28. package/dist/es/chunks/p-input-number.js +162 -0
  29. package/dist/es/chunks/p-input-percent.js +2 -2
  30. package/dist/es/chunks/p-input.js +112 -0
  31. package/dist/es/chunks/p-progress-bar.js +39 -0
  32. package/dist/es/chunks/p-textarea.js +90 -0
  33. package/dist/es/index.js +119 -126
  34. package/dist/es/inputClasses.js +8 -2
  35. package/dist/es/p-alert.js +2 -64
  36. package/dist/es/p-avatar.js +2 -70
  37. package/dist/es/p-drawer.js +2 -2
  38. package/dist/es/p-input-number.js +2 -145
  39. package/dist/es/p-input-search.js +2 -2
  40. package/dist/es/p-input.js +2 -92
  41. package/dist/es/p-modal.js +2 -2
  42. package/dist/es/p-progress-bar.js +2 -40
  43. package/dist/es/p-table-filter-icon.js +14 -9
  44. package/dist/es/p-textarea.js +2 -72
  45. package/dist/es/p-toggle.js +77 -65
  46. package/dist/es/useInputClasses.js +14 -19
  47. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +27 -10
  48. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +9 -10
  49. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +7 -7
  50. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +2 -2
  51. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -13
  52. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +2 -2
  53. package/dist/squirrel/components/p-input/p-input.vue.d.ts +30 -61
  54. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +101 -65
  55. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +113 -83
  56. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
  57. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +5 -20
  58. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  59. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
  60. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +3 -7
  61. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +79 -42
  62. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +25 -62
  63. package/dist/squirrel/composables/useInputClasses.d.ts +2 -1
  64. package/dist/squirrel/utils/index.d.ts +1 -3
  65. package/dist/squirrel/utils/inputClasses.d.ts +12 -0
  66. package/dist/squirrel.css +5 -5
  67. package/package.json +18 -18
  68. package/squirrel/components/p-alert/p-alert.spec.js +9 -8
  69. package/squirrel/components/p-alert/p-alert.vue +19 -31
  70. package/squirrel/components/p-avatar/p-avatar.spec.ts +10 -3
  71. package/squirrel/components/p-avatar/p-avatar.vue +40 -42
  72. package/squirrel/components/p-btn/p-btn.spec.js +1 -3
  73. package/squirrel/components/p-btn/p-btn.vue +1 -1
  74. package/squirrel/components/p-input/p-input.vue +63 -40
  75. package/squirrel/components/p-input-number/p-input-number.vue +101 -86
  76. package/squirrel/components/p-progress-bar/p-progress-bar.vue +9 -14
  77. package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +8 -9
  78. package/squirrel/components/p-table-sort/p-table-sort.vue +13 -16
  79. package/squirrel/components/p-textarea/p-textarea.vue +55 -37
  80. package/squirrel/components/p-toggle/p-toggle.vue +59 -43
  81. package/squirrel/composables/useInputClasses.spec.js +50 -13
  82. package/squirrel/composables/useInputClasses.ts +18 -24
  83. package/squirrel/utils/index.ts +0 -7
  84. package/squirrel/utils/inputClasses.ts +8 -2
  85. package/dist/cjs/inputClassesMixin.js +0 -58
  86. package/dist/cjs/tailwind.js +0 -25
  87. package/dist/es/inputClassesMixin.js +0 -59
  88. package/dist/es/tailwind.js +0 -25
  89. package/dist/squirrel/utils/inputClassesMixin.d.ts +0 -56
  90. package/dist/squirrel/utils/tailwind.d.ts +0 -8
  91. package/squirrel/utils/inputClassesMixin.spec.js +0 -241
  92. package/squirrel/utils/inputClassesMixin.ts +0 -60
  93. package/squirrel/utils/tailwind.spec.js +0 -27
  94. package/squirrel/utils/tailwind.ts +0 -28
@@ -1,28 +0,0 @@
1
- import { squirrelTailwindConfig } from '@squirrel/tailwind/config';
2
- import { get } from 'lodash-es';
3
- import type { Config } from 'tailwindcss';
4
- import resolveConfig from 'tailwindcss/resolveConfig';
5
-
6
- const config = resolveConfig(squirrelTailwindConfig);
7
- const theme = config.theme as Config['theme'];
8
- const colors = theme?.colors;
9
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
- const extendedColors = theme?.extend?.colors;
11
- const screens = theme?.screens;
12
-
13
- export type Color = keyof typeof colors | keyof typeof extendedColors;
14
-
15
- export const getColor = (name: Color) => {
16
- return colors?.[name];
17
- };
18
-
19
- export const getColorDeep = (color: string) => {
20
- const baseColor = color.split('-').slice(0, -1).join('-') as Color;
21
- const colorNumber = String(color.split('-').pop());
22
-
23
- return get(getColor(baseColor), colorNumber);
24
- };
25
-
26
- export const getScreen = (size: keyof typeof screens) => {
27
- return screens?.[size];
28
- };