@solfacil/girassol 0.1.0 → 0.1.5
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/.vscode/extensions.json +2 -1
- package/.vscode/settings.json +15 -5
- package/README.md +14 -3
- package/cli/src/commands/create:component.ts +91 -0
- package/cli/src/commands/generate:plugin.ts +17 -7
- package/cli/src/commands/generate:types.ts +5 -4
- package/cli/src/commands/girassol.ts +2 -2
- package/cli/src/extensions/cli-extension.ts +1 -1
- package/cli/src/templates/components/component.spec.ts.ejs +20 -0
- package/cli/src/templates/components/component.stories.mdx.ejs +74 -0
- package/cli/src/templates/components/component.vue.ejs +23 -0
- package/cli/src/templates/components/index.ts.ejs +10 -0
- package/cli/src/templates/windi.config.ts.ejs +3 -0
- package/dist/girassol.es.js +1022 -111
- package/dist/girassol.umd.js +5 -5
- package/dist/style.css +1 -1
- package/dist/theme/solfacil/colors.d.ts +2 -2
- package/dist/theme/solfacil/index.d.ts +2 -0
- package/dist/theme/solfacil/utilities.d.ts +2 -0
- package/dist/types/components/dropdown/Dropdown.vue.d.ts +75 -0
- package/dist/types/components/dropdown/dropdown.spec.d.ts +1 -0
- package/dist/types/components/dropdown/index.d.ts +2 -0
- package/dist/types/components/forms/button/Button.vue.d.ts +4 -4
- package/dist/types/components/forms/button/button.spec.d.ts +1 -0
- package/dist/types/components/forms/checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/dist/types/components/forms/checkbox/checkbox-group.spec.d.ts +1 -0
- package/dist/types/components/forms/checkbox/checkbox-type.d.ts +2 -2
- package/dist/types/components/forms/checkbox/checkbox.spec.d.ts +1 -0
- package/dist/types/components/forms/checkbox/index.d.ts +1 -1
- package/dist/types/components/forms/input/index.d.ts +1 -1
- package/dist/types/components/forms/input/input.spec.d.ts +1 -0
- package/dist/types/components/forms/radio/RadioGroup.vue.d.ts +1 -1
- package/dist/types/components/forms/radio/index.d.ts +1 -1
- package/dist/types/components/forms/radio/radio-group.spec.d.ts +1 -0
- package/dist/types/components/forms/radio/radio-type.d.ts +2 -2
- package/dist/types/components/forms/radio/radio.spec.d.ts +1 -0
- package/dist/types/components/forms/switch/Switch.vue.d.ts +33 -0
- package/dist/types/components/forms/switch/index.d.ts +2 -0
- package/dist/types/components/forms/switch/switch.spec.d.ts +1 -0
- package/dist/types/components/forms/textarea/Textarea.vue.d.ts +50 -0
- package/dist/types/components/forms/textarea/index.d.ts +2 -0
- package/dist/types/components/forms/textarea/textarea.spec.d.ts +1 -0
- package/dist/types/components/forms/textfield/Textfield.vue.d.ts +1 -1
- package/dist/types/components/forms/textfield/index.d.ts +1 -1
- package/dist/types/components/forms/textfield/textfield-password.spec.d.ts +1 -0
- package/dist/types/components/forms/textfield/textfield.spec.d.ts +1 -0
- package/dist/types/composables/use-toast/Toast.vue.d.ts +66 -0
- package/dist/types/composables/use-toast/index.d.ts +9 -0
- package/dist/types/composables/use-toast/types.d.ts +23 -0
- package/dist/types/composables/use-toast/use-toast.spec.d.ts +1 -0
- package/dist/types/composables/use-toast/useTimer.d.ts +9 -0
- package/dist/types/composables/use-toast/useTransition.d.ts +57 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/vite.config.d.ts +1 -1
- package/package.json +65 -32
- package/theme/solfacil/borders.ts +2 -2
- package/theme/solfacil/colors.ts +4 -4
- package/theme/solfacil/effects.ts +3 -3
- package/theme/solfacil/index.ts +4 -2
- package/theme/solfacil/miscs.ts +2 -2
- package/theme/solfacil/spacing.ts +1 -1
- package/theme/solfacil/typography.ts +2 -2
- package/theme/solfacil/utilities.ts +71 -3
- package/vite.config.ts +17 -5
- package/windi.config.ts +5 -3
|
@@ -25,8 +25,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
25
25
|
}>>> & {
|
|
26
26
|
"onUpdate:modelValue"?: ((event: string) => any) | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
label: string;
|
|
29
28
|
modelValue: string;
|
|
29
|
+
label: string;
|
|
30
30
|
}>;
|
|
31
31
|
export default _default;
|
|
32
32
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Position, ToastType } from './types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
id: string | number;
|
|
4
|
+
type: ToastType;
|
|
5
|
+
visible?: boolean | undefined;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
timeout: number;
|
|
9
|
+
hideProgressBar?: boolean | undefined;
|
|
10
|
+
showIcon?: boolean | undefined;
|
|
11
|
+
offset: number;
|
|
12
|
+
onClose?: (() => void) | undefined;
|
|
13
|
+
onCloseHandler?: (() => void) | undefined;
|
|
14
|
+
position?: Position | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
type: ToastType | undefined;
|
|
17
|
+
delay: number | undefined;
|
|
18
|
+
showIcon: boolean | undefined;
|
|
19
|
+
position: Position | undefined;
|
|
20
|
+
hideProgressBar: boolean | undefined;
|
|
21
|
+
offset: number;
|
|
22
|
+
visible: boolean;
|
|
23
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
24
|
+
id: string | number;
|
|
25
|
+
type: ToastType;
|
|
26
|
+
visible?: boolean | undefined;
|
|
27
|
+
title: string;
|
|
28
|
+
description?: string | undefined;
|
|
29
|
+
timeout: number;
|
|
30
|
+
hideProgressBar?: boolean | undefined;
|
|
31
|
+
showIcon?: boolean | undefined;
|
|
32
|
+
offset: number;
|
|
33
|
+
onClose?: (() => void) | undefined;
|
|
34
|
+
onCloseHandler?: (() => void) | undefined;
|
|
35
|
+
position?: Position | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
type: ToastType | undefined;
|
|
38
|
+
delay: number | undefined;
|
|
39
|
+
showIcon: boolean | undefined;
|
|
40
|
+
position: Position | undefined;
|
|
41
|
+
hideProgressBar: boolean | undefined;
|
|
42
|
+
offset: number;
|
|
43
|
+
visible: boolean;
|
|
44
|
+
}>>>, {
|
|
45
|
+
type: ToastType;
|
|
46
|
+
offset: number;
|
|
47
|
+
position: Position;
|
|
48
|
+
visible: boolean;
|
|
49
|
+
hideProgressBar: boolean;
|
|
50
|
+
showIcon: boolean;
|
|
51
|
+
}>;
|
|
52
|
+
export default _default;
|
|
53
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
54
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
55
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
56
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
57
|
+
} : {
|
|
58
|
+
type: import('vue').PropType<T[K]>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
63
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
64
|
+
default: D[K];
|
|
65
|
+
} : P[K];
|
|
66
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Position, ToastOptions, ToastContent } from './types';
|
|
2
|
+
export declare function useToast(): {
|
|
3
|
+
createToast: (content: string | ToastContent, options?: ToastOptions | undefined) => {
|
|
4
|
+
close: () => void;
|
|
5
|
+
};
|
|
6
|
+
clearAllToasts: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare function close(id: number, position: Position): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
export declare type ToastType = 'info' | 'danger' | 'warning' | 'success';
|
|
3
|
+
export declare type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
|
|
4
|
+
export interface ToastContent {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ToastOptions {
|
|
9
|
+
type?: ToastType;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
position?: Position;
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
hideProgressBar?: boolean;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
showOneToast?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ToastObject {
|
|
19
|
+
toastVNode: VNode;
|
|
20
|
+
container: HTMLDivElement;
|
|
21
|
+
}
|
|
22
|
+
export declare const TOAST_GAP = 12;
|
|
23
|
+
export declare const DEFAULT_OPTIONS: ToastOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Position } from "./types";
|
|
2
|
+
export declare function usePosition(fn: () => ({
|
|
3
|
+
position: Position;
|
|
4
|
+
offset: number;
|
|
5
|
+
})): {
|
|
6
|
+
stylePosition: import("vue").ComputedRef<{
|
|
7
|
+
left: string;
|
|
8
|
+
top: string;
|
|
9
|
+
bottom?: undefined;
|
|
10
|
+
right?: undefined;
|
|
11
|
+
marginRight?: undefined;
|
|
12
|
+
marginLeft?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
left: string;
|
|
15
|
+
bottom: string;
|
|
16
|
+
top?: undefined;
|
|
17
|
+
right?: undefined;
|
|
18
|
+
marginRight?: undefined;
|
|
19
|
+
marginLeft?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
right: string;
|
|
22
|
+
bottom: string;
|
|
23
|
+
left?: undefined;
|
|
24
|
+
top?: undefined;
|
|
25
|
+
marginRight?: undefined;
|
|
26
|
+
marginLeft?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
top: string;
|
|
29
|
+
left: string;
|
|
30
|
+
right: string;
|
|
31
|
+
marginRight: string;
|
|
32
|
+
marginLeft: string;
|
|
33
|
+
bottom?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
bottom: string;
|
|
36
|
+
left: string;
|
|
37
|
+
right: string;
|
|
38
|
+
marginRight: string;
|
|
39
|
+
marginLeft: string;
|
|
40
|
+
top?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
right: string;
|
|
43
|
+
top: string;
|
|
44
|
+
left?: undefined;
|
|
45
|
+
bottom?: undefined;
|
|
46
|
+
marginRight?: undefined;
|
|
47
|
+
marginLeft?: undefined;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
export declare enum Transition {
|
|
51
|
+
'top-left' = "bounce-left",
|
|
52
|
+
'top-right' = "bounce-right",
|
|
53
|
+
'top-center' = "bounce-down",
|
|
54
|
+
'bottom-left' = "bounce-left",
|
|
55
|
+
'bottom-center' = "bounce-up",
|
|
56
|
+
'bottom-right' = "bounce-right"
|
|
57
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
1
|
+
import type { App } from 'vue';
|
|
2
2
|
import { SolButton } from './components/forms/button';
|
|
3
3
|
import { SolInput } from './components/forms/input';
|
|
4
4
|
import { SolTextfield, SolTextfieldPassword } from './components/forms/textfield';
|
|
5
|
+
import { SolTextarea } from './components/forms/textarea';
|
|
5
6
|
import { SolRadio, SolRadioGroup } from './components/forms/radio';
|
|
6
7
|
import { SolCheckbox, SolCheckboxGroup } from './components/forms/checkbox';
|
|
8
|
+
import { SolSwitch } from './components/forms/switch';
|
|
9
|
+
import { SolDropdown } from './components/dropdown/';
|
|
7
10
|
import 'virtual:windi-base.css';
|
|
8
11
|
import 'virtual:windi-components.css';
|
|
9
12
|
import 'virtual:windi-utilities.css';
|
|
10
13
|
import '@/assets/style.css';
|
|
14
|
+
export { useToast } from './composables/use-toast';
|
|
11
15
|
export declare function install(App: App): void;
|
|
12
|
-
export { SolButton, SolInput, SolTextfield, SolTextfieldPassword, SolRadio, SolRadioGroup, SolCheckbox, SolCheckboxGroup };
|
|
16
|
+
export { SolButton, SolInput, SolTextarea, SolTextfield, SolTextfieldPassword, SolRadio, SolRadioGroup, SolCheckbox, SolCheckboxGroup, SolSwitch, SolDropdown, };
|
|
13
17
|
export declare const componentsNames: string[];
|
package/dist/vite.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("vitest/dist/config").UserConfig;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solfacil/girassol",
|
|
3
|
-
"
|
|
3
|
+
"description": "Girassol design system",
|
|
4
|
+
"version": "0.1.5",
|
|
4
5
|
"authors": [
|
|
5
6
|
{
|
|
6
7
|
"name": "Kevin Martin",
|
|
7
|
-
"email": "kevinbreaker2604@gmail.com"
|
|
8
|
+
"email": "kevinbreaker2604@gmail.com",
|
|
9
|
+
"url": "https://github.com/kevinbreaker"
|
|
8
10
|
}
|
|
9
11
|
],
|
|
10
12
|
"engines": {
|
|
@@ -25,7 +27,8 @@
|
|
|
25
27
|
"import": "./dist/girassol.es.js",
|
|
26
28
|
"require": "./dist/girassol.umd.js"
|
|
27
29
|
},
|
|
28
|
-
"./dist/style.css": "./dist/style.css"
|
|
30
|
+
"./dist/style.css": "./dist/style.css",
|
|
31
|
+
"./windi.config.ts": "./windi.config.ts"
|
|
29
32
|
},
|
|
30
33
|
"types": "./dist/types/index.d.ts",
|
|
31
34
|
"scripts": {
|
|
@@ -33,50 +36,80 @@
|
|
|
33
36
|
"build:lib": "vue-tsc --noEmit && vite build",
|
|
34
37
|
"build:lib:ts": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
35
38
|
"preview": "vite preview",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
39
|
+
"lint": "eslint . --resolve-plugins-relative-to .",
|
|
40
|
+
"lint:fix": "eslint . --fix --resolve-plugins-relative-to .",
|
|
41
|
+
"girassol": "girassol",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"test:w": "vitest watch --silent ",
|
|
44
|
+
"test:coverage": "vitest run --silent --coverage",
|
|
38
45
|
"storybook": "start-storybook -p 6006 --ci",
|
|
39
46
|
"build-storybook": "build-storybook"
|
|
40
47
|
},
|
|
41
48
|
"dependencies": {
|
|
42
|
-
"@vueuse/core": "^8.2.
|
|
43
|
-
"vue": "^3.2.
|
|
49
|
+
"@vueuse/core": "^8.2.6",
|
|
50
|
+
"vue": "^3.2.33"
|
|
44
51
|
},
|
|
45
52
|
"devDependencies": {
|
|
46
|
-
"@antfu/eslint-config": "^0.
|
|
47
|
-
"@babel/core": "^7.17.
|
|
53
|
+
"@antfu/eslint-config": "^0.20.2",
|
|
54
|
+
"@babel/core": "^7.17.9",
|
|
48
55
|
"@babel/preset-env": "^7.16.11",
|
|
49
|
-
"@iconify/json": "^2.1.
|
|
50
|
-
"@storybook/addon-a11y": "^6.4.
|
|
51
|
-
"@storybook/addon-actions": "^6.4.
|
|
52
|
-
"@storybook/addon-essentials": "^6.4.
|
|
53
|
-
"@storybook/addon-links": "^6.4.
|
|
54
|
-
"@storybook/theming": "^6.4.
|
|
55
|
-
"@storybook/vue3": "^6.4.
|
|
56
|
-
"@testing-library/jest-dom": "^5.16.
|
|
57
|
-
"@testing-library/user-event": "^
|
|
56
|
+
"@iconify/json": "^2.1.28",
|
|
57
|
+
"@storybook/addon-a11y": "^6.4.22",
|
|
58
|
+
"@storybook/addon-actions": "^6.4.22",
|
|
59
|
+
"@storybook/addon-essentials": "^6.4.22",
|
|
60
|
+
"@storybook/addon-links": "^6.4.22",
|
|
61
|
+
"@storybook/theming": "^6.4.22",
|
|
62
|
+
"@storybook/vue3": "^6.4.22",
|
|
63
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
64
|
+
"@testing-library/user-event": "^14.1.1",
|
|
58
65
|
"@testing-library/vue": "^6.5.1",
|
|
59
|
-
"@types/jest": "^27.4.1",
|
|
60
66
|
"@types/jest-axe": "^3.5.3",
|
|
61
|
-
"@types/node": "^17.0.
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
67
|
+
"@types/node": "^17.0.24",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
70
|
+
"@vitejs/plugin-vue": "^2.3.1",
|
|
65
71
|
"babel-loader": "^8.2.4",
|
|
72
|
+
"c8": "^7.11.0",
|
|
66
73
|
"critters": "^0.0.16",
|
|
67
|
-
"
|
|
74
|
+
"eslint": "^8.14.0",
|
|
75
|
+
"eslint-config-prettier": "^8.5.0",
|
|
76
|
+
"eslint-plugin-html": "^6.2.0",
|
|
77
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
78
|
+
"eslint-plugin-vue": "^8.7.1",
|
|
79
|
+
"eslint-plugin-vuejs-accessibility": "^1.1.1",
|
|
68
80
|
"jest-axe": "^5.0.1",
|
|
69
|
-
"
|
|
81
|
+
"jsdom": "^19.0.0",
|
|
82
|
+
"sass": "^1.50.0",
|
|
70
83
|
"storybook-addon-designs": "^6.2.1",
|
|
71
|
-
"storybook-builder-vite": "^0.1.
|
|
72
|
-
"
|
|
84
|
+
"storybook-builder-vite": "^0.1.23",
|
|
85
|
+
"stylelint": "^14.8.2",
|
|
86
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
87
|
+
"stylelint-config-property-sort-order-smacss": "^9.0.0",
|
|
88
|
+
"stylelint-order": "^5.0.0",
|
|
73
89
|
"typescript": "^4.6.3",
|
|
74
90
|
"unplugin-icons": "^0.14.1",
|
|
75
|
-
"vite": "^2.
|
|
91
|
+
"vite": "^2.9.4",
|
|
76
92
|
"vite-plugin-inspect": "^0.4.3",
|
|
77
|
-
"vite-plugin-windicss": "^1.8.
|
|
78
|
-
"
|
|
79
|
-
"vue-
|
|
93
|
+
"vite-plugin-windicss": "^1.8.4",
|
|
94
|
+
"vitest": "^0.10.0",
|
|
95
|
+
"vue-loader": "^17.0.0",
|
|
96
|
+
"vue-tsc": "^0.34.6",
|
|
80
97
|
"windicss": "^3.5.1"
|
|
81
|
-
}
|
|
98
|
+
},
|
|
99
|
+
"repository": {
|
|
100
|
+
"type": "git",
|
|
101
|
+
"url": "https://github.com/solfacil/girassol"
|
|
102
|
+
},
|
|
103
|
+
"keywords": [
|
|
104
|
+
"vue 3",
|
|
105
|
+
"Components",
|
|
106
|
+
"solfacil",
|
|
107
|
+
"girassol",
|
|
108
|
+
"windicss",
|
|
109
|
+
"design system",
|
|
110
|
+
"vue",
|
|
111
|
+
"vue.js",
|
|
112
|
+
"nuxt",
|
|
113
|
+
"nuxt 3"
|
|
114
|
+
]
|
|
82
115
|
}
|
package/theme/solfacil/colors.ts
CHANGED
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
neutral: {
|
|
11
11
|
low: {
|
|
12
12
|
light: '#8f8f8f',
|
|
13
13
|
medium: '#525252',
|
|
@@ -23,8 +23,8 @@ export default {
|
|
|
23
23
|
|
|
24
24
|
feedback: {
|
|
25
25
|
positive: {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
light: '#eefbf6',
|
|
27
|
+
medium: '#8ae5bf',
|
|
28
28
|
pure: '#47d79a',
|
|
29
29
|
},
|
|
30
30
|
|
|
@@ -39,5 +39,5 @@ export default {
|
|
|
39
39
|
medium: '#ff7470',
|
|
40
40
|
pure: '#ff251f',
|
|
41
41
|
},
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
43
|
}
|
|
@@ -4,12 +4,12 @@ export default {
|
|
|
4
4
|
|
|
5
5
|
strong: 0.8,
|
|
6
6
|
moderate: 0.32,
|
|
7
|
-
weak: 0.16
|
|
7
|
+
weak: 0.16,
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
boxShadow: {
|
|
11
11
|
soft: '0px 8px 16px rgba(41, 41, 41, 0.08)',
|
|
12
12
|
medium: '0px 12px 24px rgba(41, 41, 41, 0.16)',
|
|
13
|
-
large: '0px 16px 64px rgba(41, 41, 41, 0.24)'
|
|
14
|
-
}
|
|
13
|
+
large: '0px 16px 64px rgba(41, 41, 41, 0.24)',
|
|
14
|
+
},
|
|
15
15
|
}
|
package/theme/solfacil/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import spacing from './spacing'
|
|
|
5
5
|
import effects from './effects'
|
|
6
6
|
import misc from './miscs'
|
|
7
7
|
|
|
8
|
-
import { outlinesForFocus } from './utilities'
|
|
8
|
+
import { outlinesForFocus, maxLines, debug } from './utilities'
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
export {
|
|
@@ -18,5 +18,7 @@ export {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export const utilities = {
|
|
21
|
-
outlinesForFocus
|
|
21
|
+
outlinesForFocus,
|
|
22
|
+
maxLines,
|
|
23
|
+
debug,
|
|
22
24
|
}
|
package/theme/solfacil/miscs.ts
CHANGED
|
@@ -4,12 +4,80 @@ export const outlinesForFocus = plugin(({ addUtilities }) => {
|
|
|
4
4
|
addUtilities({
|
|
5
5
|
'.outline-focused': {
|
|
6
6
|
outline: '3px solid #292929',
|
|
7
|
-
outlineOffset: '0px'
|
|
7
|
+
outlineOffset: '0px',
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
'.outline-focused-invert': {
|
|
11
11
|
outline: '3px solid #ffffff',
|
|
12
|
-
outlineOffset: '0px'
|
|
13
|
-
}
|
|
12
|
+
outlineOffset: '0px',
|
|
13
|
+
},
|
|
14
14
|
})
|
|
15
15
|
})
|
|
16
|
+
|
|
17
|
+
export const maxLines = plugin(({ addUtilities }) => {
|
|
18
|
+
const total = 10
|
|
19
|
+
const variants = {}
|
|
20
|
+
|
|
21
|
+
for (let i = 1; i <= total; i++) {
|
|
22
|
+
Object.assign(variants, {
|
|
23
|
+
[`.max-lines-${i}`]: {
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
'line-clamp': `${i}`,
|
|
26
|
+
'-webkit-line-clamp': `${i}`,
|
|
27
|
+
'display': '-webkit-box',
|
|
28
|
+
'-webkit-box-orient': 'vertical',
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
addUtilities(variants)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
export const debug = plugin(({ addUtilities }) => {
|
|
37
|
+
addUtilities({
|
|
38
|
+
'.debug': {
|
|
39
|
+
outline: '2px dashed #ff0000!important',
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
'.debug-all': {
|
|
43
|
+
outline: '2px dashed #ff0000!important',
|
|
44
|
+
outlineOffset: '3px',
|
|
45
|
+
'> *': {
|
|
46
|
+
outline: '2px dotted #a0092f!important',
|
|
47
|
+
outlineOffset: '3px',
|
|
48
|
+
'> *': {
|
|
49
|
+
outline: '2px dashed #00ffff!important',
|
|
50
|
+
outlineOffset: '3px',
|
|
51
|
+
'> *': {
|
|
52
|
+
outline: '2px dotted #ff00ff!important',
|
|
53
|
+
outlineOffset: '3px',
|
|
54
|
+
'> *': {
|
|
55
|
+
outline: '2px dashed #f0ad2aff!important',
|
|
56
|
+
outlineOffset: '3px',
|
|
57
|
+
'> *': {
|
|
58
|
+
outline: '2px dotted #00ff00!important',
|
|
59
|
+
outlineOffset: '3px',
|
|
60
|
+
'> *': {
|
|
61
|
+
outline: '2px dashed #d9ffaa!important',
|
|
62
|
+
outlineOffset: '3px',
|
|
63
|
+
'> *': {
|
|
64
|
+
outline: '2px dotted #2adeff!important',
|
|
65
|
+
outlineOffset: '3px',
|
|
66
|
+
'> *': {
|
|
67
|
+
outline: '2px dashed #00af2f!important',
|
|
68
|
+
outlineOffset: '3px',
|
|
69
|
+
'*': {
|
|
70
|
+
outline: '2px groove #0faefa!important',
|
|
71
|
+
outlineOffset: '3px',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
})
|
package/vite.config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import path from 'path'
|
|
4
4
|
import vue from '@vitejs/plugin-vue'
|
|
5
5
|
|
|
6
6
|
import Icons from 'unplugin-icons/vite'
|
|
@@ -33,8 +33,8 @@ export default defineConfig({
|
|
|
33
33
|
'@assets': path.resolve(currentPath, './src/assets'),
|
|
34
34
|
'@components': path.resolve(currentPath, './src/components'),
|
|
35
35
|
'@forms': path.resolve(currentPath, './src/components/forms'),
|
|
36
|
-
'@themes': path.resolve(currentPath, 'theme')
|
|
37
|
-
}
|
|
36
|
+
'@themes': path.resolve(currentPath, 'theme'),
|
|
37
|
+
},
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
plugins: [
|
|
@@ -51,7 +51,7 @@ export default defineConfig({
|
|
|
51
51
|
|
|
52
52
|
Icons({
|
|
53
53
|
autoInstall: true,
|
|
54
|
-
compiler: 'vue3'
|
|
54
|
+
compiler: 'vue3',
|
|
55
55
|
}),
|
|
56
56
|
],
|
|
57
57
|
|
|
@@ -61,4 +61,16 @@ export default defineConfig({
|
|
|
61
61
|
'@vueuse/core',
|
|
62
62
|
],
|
|
63
63
|
},
|
|
64
|
+
|
|
65
|
+
test: {
|
|
66
|
+
globals: true,
|
|
67
|
+
environment: 'jsdom',
|
|
68
|
+
include: ['src/components/**/*.spec.ts', 'src/composables/**/*.spec.ts'],
|
|
69
|
+
coverage: {
|
|
70
|
+
extension: 'vue',
|
|
71
|
+
},
|
|
72
|
+
deps: {
|
|
73
|
+
inline: ['@vue', '@vueuse'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
64
76
|
})
|
package/windi.config.ts
CHANGED
|
@@ -8,12 +8,14 @@ export default defineConfig({
|
|
|
8
8
|
darkMode: 'class',
|
|
9
9
|
attributify: false,
|
|
10
10
|
extract: {
|
|
11
|
-
include: ['index.html', 'src/**/*']
|
|
11
|
+
include: ['index.html', 'src/**/*'],
|
|
12
12
|
},
|
|
13
13
|
|
|
14
14
|
plugins: [
|
|
15
15
|
typography(),
|
|
16
|
-
utilities.outlinesForFocus
|
|
16
|
+
utilities.outlinesForFocus,
|
|
17
|
+
utilities.maxLines,
|
|
18
|
+
utilities.debug,
|
|
17
19
|
],
|
|
18
20
|
|
|
19
21
|
theme: {
|
|
@@ -25,6 +27,6 @@ export default defineConfig({
|
|
|
25
27
|
...typos,
|
|
26
28
|
...effects,
|
|
27
29
|
...borders,
|
|
28
|
-
...spacing
|
|
30
|
+
...spacing,
|
|
29
31
|
},
|
|
30
32
|
})
|