@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.
- 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 +1 -1
- 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/p-alert.js +53 -0
- package/dist/es/chunks/p-avatar.js +66 -0
- package/dist/es/chunks/p-btn.js +1 -1
- 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 +7 -7
- 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 +12 -0
- package/dist/squirrel.css +5 -5
- package/package.json +18 -18
- 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 +1 -3
- package/squirrel/components/p-btn/p-btn.vue +1 -1
- 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,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
|
-
};
|