@solfacil/girassol 0.1.5 → 0.1.8
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 +1 -0
- package/cli/package.json +2 -12
- package/cli/src/commands/create:component.ts +2 -0
- package/cli/src/templates/components/component.vue.ejs +11 -11
- package/cli/yarn.lock +31 -2860
- package/dist/girassol.es.js +502 -293
- package/dist/girassol.umd.js +3 -3
- package/dist/style.css +1 -1
- package/dist/theme/solfacil/index.d.ts +1 -0
- package/dist/theme/solfacil/utilities.d.ts +1 -0
- package/dist/types/components/dropdown/Dropdown.vue.d.ts +2 -0
- package/dist/types/components/forms/button/Button.vue.d.ts +1 -1
- package/dist/types/components/forms/checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/dist/types/components/forms/input/Input.vue.d.ts +3 -1
- package/dist/types/components/forms/radio/RadioGroup.vue.d.ts +1 -1
- package/dist/types/components/forms/select/Select.vue.d.ts +53 -0
- package/dist/types/components/forms/select/index.d.ts +2 -0
- package/dist/types/components/forms/select/select.spec.d.ts +1 -0
- package/dist/types/components/forms/textarea/Textarea.vue.d.ts +1 -1
- package/dist/types/components/forms/textfield/Textfield.vue.d.ts +5 -5
- package/dist/types/components/informations/chip/Chip.vue.d.ts +41 -0
- package/dist/types/components/informations/chip/chip.spec.d.ts +1 -0
- package/dist/types/components/informations/chip/index.d.ts +2 -0
- package/dist/types/composables/use-toast/index.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/vite.config.d.ts +1 -1
- package/dist/windi.config.d.ts +1 -1
- package/package.json +29 -28
- package/theme/solfacil/index.ts +2 -1
- package/theme/solfacil/utilities.ts +17 -0
- package/vite.config.ts +1 -1
- package/windi.config.ts +2 -1
- package/cli/__tests__/cli-integration.test.ts +0 -29
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
id: string;
|
|
3
|
+
label?: string | undefined;
|
|
4
|
+
selected?: boolean | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
removable?: boolean | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
removable: boolean;
|
|
9
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
close: () => void;
|
|
11
|
+
} & {
|
|
12
|
+
"update:selected": () => void;
|
|
13
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
14
|
+
id: string;
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
selected?: boolean | undefined;
|
|
17
|
+
disabled?: boolean | undefined;
|
|
18
|
+
removable?: boolean | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
removable: boolean;
|
|
21
|
+
}>>> & {
|
|
22
|
+
"onUpdate:selected"?: (() => any) | undefined;
|
|
23
|
+
onClose?: (() => any) | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
removable: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: import('vue').PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
38
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
39
|
+
default: D[K];
|
|
40
|
+
} : P[K];
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Position,
|
|
1
|
+
import type { Position, ToastContent, ToastOptions } from './types';
|
|
2
2
|
export declare function useToast(): {
|
|
3
3
|
createToast: (content: string | ToastContent, options?: ToastOptions | undefined) => {
|
|
4
4
|
close: () => void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ import { SolRadio, SolRadioGroup } from './components/forms/radio';
|
|
|
7
7
|
import { SolCheckbox, SolCheckboxGroup } from './components/forms/checkbox';
|
|
8
8
|
import { SolSwitch } from './components/forms/switch';
|
|
9
9
|
import { SolDropdown } from './components/dropdown/';
|
|
10
|
+
import { SolSelect } from './components/forms/select';
|
|
11
|
+
import { SolChip } from './components/informations/chip';
|
|
10
12
|
import 'virtual:windi-base.css';
|
|
11
13
|
import 'virtual:windi-components.css';
|
|
12
14
|
import 'virtual:windi-utilities.css';
|
|
13
15
|
import '@/assets/style.css';
|
|
14
16
|
export { useToast } from './composables/use-toast';
|
|
15
17
|
export declare function install(App: App): void;
|
|
16
|
-
export { SolButton, SolInput, SolTextarea, SolTextfield, SolTextfieldPassword, SolRadio, SolRadioGroup, SolCheckbox, SolCheckboxGroup, SolSwitch, SolDropdown, };
|
|
18
|
+
export { SolButton, SolInput, SolTextarea, SolTextfield, SolTextfieldPassword, SolRadio, SolRadioGroup, SolCheckbox, SolCheckboxGroup, SolSwitch, SolDropdown, SolSelect, SolChip, };
|
|
17
19
|
export declare const componentsNames: string[];
|
package/dist/vite.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vitest/dist/config").
|
|
1
|
+
declare const _default: import("vitest/dist/config").UserConfigExport;
|
|
2
2
|
export default _default;
|
package/dist/windi.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("windicss/types/interfaces").FullConfig;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solfacil/girassol",
|
|
3
3
|
"description": "Girassol design system",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.8",
|
|
5
5
|
"authors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Kevin Martin",
|
|
@@ -33,11 +33,12 @@
|
|
|
33
33
|
"types": "./dist/types/index.d.ts",
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "vite --port 3333 --host",
|
|
36
|
+
"build:cli": "cd cli/ && yarn build",
|
|
36
37
|
"build:lib": "vue-tsc --noEmit && vite build",
|
|
37
38
|
"build:lib:ts": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
38
39
|
"preview": "vite preview",
|
|
39
|
-
"lint": "eslint
|
|
40
|
-
"lint:fix": "eslint
|
|
40
|
+
"lint": "eslint src/ --resolve-plugins-relative-to .",
|
|
41
|
+
"lint:fix": "eslint src/ --fix --resolve-plugins-relative-to .",
|
|
41
42
|
"girassol": "girassol",
|
|
42
43
|
"test": "vitest run",
|
|
43
44
|
"test:w": "vitest watch --silent ",
|
|
@@ -46,30 +47,31 @@
|
|
|
46
47
|
"build-storybook": "build-storybook"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@vueuse/core": "^8.
|
|
50
|
-
"vue": "^3.2.
|
|
50
|
+
"@vueuse/core": "^8.5.0",
|
|
51
|
+
"vue": "^3.2.36"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@antfu/eslint-config": "^0.
|
|
54
|
-
"@babel/core": "^7.
|
|
55
|
-
"@babel/preset-env": "^7.
|
|
54
|
+
"@antfu/eslint-config": "^0.23.1",
|
|
55
|
+
"@babel/core": "^7.18.2",
|
|
56
|
+
"@babel/preset-env": "^7.18.2",
|
|
56
57
|
"@iconify/json": "^2.1.28",
|
|
57
|
-
"@storybook/addon-a11y": "^6.
|
|
58
|
-
"@storybook/addon-actions": "^6.
|
|
59
|
-
"@storybook/addon-essentials": "^6.
|
|
60
|
-
"@storybook/addon-links": "^6.
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
58
|
+
"@storybook/addon-a11y": "^6.5.5",
|
|
59
|
+
"@storybook/addon-actions": "^6.5.5",
|
|
60
|
+
"@storybook/addon-essentials": "^6.5.5",
|
|
61
|
+
"@storybook/addon-links": "^6.5.5",
|
|
62
|
+
"@storybook/builder-vite": "^0.1.35",
|
|
63
|
+
"@storybook/theming": "^6.5.5",
|
|
64
|
+
"@storybook/vue3": "^6.5.5",
|
|
63
65
|
"@testing-library/jest-dom": "^5.16.4",
|
|
64
|
-
"@testing-library/user-event": "^14.
|
|
66
|
+
"@testing-library/user-event": "^14.2.0",
|
|
65
67
|
"@testing-library/vue": "^6.5.1",
|
|
66
68
|
"@types/jest-axe": "^3.5.3",
|
|
67
|
-
"@types/node": "^17.0.
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
-
"@vitejs/plugin-vue": "^2.3.
|
|
71
|
-
"babel-loader": "^8.2.
|
|
72
|
-
"c8": "^7.11.
|
|
69
|
+
"@types/node": "^17.0.35",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
|
71
|
+
"@typescript-eslint/parser": "^5.26.0",
|
|
72
|
+
"@vitejs/plugin-vue": "^2.3.3",
|
|
73
|
+
"babel-loader": "^8.2.5",
|
|
74
|
+
"c8": "^7.11.3",
|
|
73
75
|
"critters": "^0.0.16",
|
|
74
76
|
"eslint": "^8.14.0",
|
|
75
77
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -81,20 +83,19 @@
|
|
|
81
83
|
"jsdom": "^19.0.0",
|
|
82
84
|
"sass": "^1.50.0",
|
|
83
85
|
"storybook-addon-designs": "^6.2.1",
|
|
84
|
-
"storybook-builder-vite": "^0.1.23",
|
|
85
86
|
"stylelint": "^14.8.2",
|
|
86
87
|
"stylelint-config-prettier": "^9.0.3",
|
|
87
88
|
"stylelint-config-property-sort-order-smacss": "^9.0.0",
|
|
88
89
|
"stylelint-order": "^5.0.0",
|
|
89
90
|
"typescript": "^4.6.3",
|
|
90
|
-
"unplugin-icons": "^0.14.
|
|
91
|
-
"vite": "^2.9.
|
|
92
|
-
"vite-plugin-inspect": "^0.
|
|
91
|
+
"unplugin-icons": "^0.14.3",
|
|
92
|
+
"vite": "^2.9.9",
|
|
93
|
+
"vite-plugin-inspect": "^0.5.0",
|
|
93
94
|
"vite-plugin-windicss": "^1.8.4",
|
|
94
|
-
"vitest": "^0.
|
|
95
|
+
"vitest": "^0.12.9",
|
|
95
96
|
"vue-loader": "^17.0.0",
|
|
96
|
-
"vue-tsc": "^0.34.
|
|
97
|
-
"windicss": "^3.5.
|
|
97
|
+
"vue-tsc": "^0.34.15",
|
|
98
|
+
"windicss": "^3.5.4"
|
|
98
99
|
},
|
|
99
100
|
"repository": {
|
|
100
101
|
"type": "git",
|
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 {
|
|
8
|
+
import { debug, maxLines, outlinesForFocus, placeholder } from './utilities'
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
export {
|
|
@@ -21,4 +21,5 @@ export const utilities = {
|
|
|
21
21
|
outlinesForFocus,
|
|
22
22
|
maxLines,
|
|
23
23
|
debug,
|
|
24
|
+
placeholder,
|
|
24
25
|
}
|
|
@@ -80,4 +80,21 @@ export const debug = plugin(({ addUtilities }) => {
|
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
})
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
export const placeholder = plugin(({ addUtilities, theme }) => {
|
|
86
|
+
const placeholderSettings = {
|
|
87
|
+
color: `${theme('colors.neutral.low.light')} !important`,
|
|
88
|
+
fontSize: `${theme('fonts.3xs')} !important`,
|
|
89
|
+
fontFamily: `${theme('fonts.base')} !important`,
|
|
90
|
+
lineHeight: `${theme('fonts.leading-xs')} !important`,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
addUtilities({
|
|
94
|
+
'.placeholder': {
|
|
95
|
+
'&::placeholder': placeholderSettings,
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
'.placeholder-inline': placeholderSettings,
|
|
99
|
+
})
|
|
83
100
|
})
|
package/vite.config.ts
CHANGED
package/windi.config.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineConfig } from 'windicss/helpers'
|
|
|
2
2
|
|
|
3
3
|
import typography from 'windicss/plugin/typography'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { borders, colors, effects, misc, spacing, typography as typos, utilities } from './theme/solfacil/'
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
darkMode: 'class',
|
|
@@ -16,6 +16,7 @@ export default defineConfig({
|
|
|
16
16
|
utilities.outlinesForFocus,
|
|
17
17
|
utilities.maxLines,
|
|
18
18
|
utilities.debug,
|
|
19
|
+
utilities.placeholder,
|
|
19
20
|
],
|
|
20
21
|
|
|
21
22
|
theme: {
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { system, filesystem } from 'gluegun'
|
|
2
|
-
|
|
3
|
-
const src = filesystem.path(__dirname, '..')
|
|
4
|
-
|
|
5
|
-
const cli = async (cmd) =>
|
|
6
|
-
system.run('node ' + filesystem.path(src, 'bin', 'girassol') + ` ${cmd}`)
|
|
7
|
-
|
|
8
|
-
test('outputs version', async () => {
|
|
9
|
-
const output = await cli('--version')
|
|
10
|
-
expect(output).toContain('0.0.1')
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
test('outputs help', async () => {
|
|
14
|
-
const output = await cli('--help')
|
|
15
|
-
expect(output).toContain('0.0.1')
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
test('generates file', async () => {
|
|
19
|
-
const output = await cli('generate foo')
|
|
20
|
-
|
|
21
|
-
expect(output).toContain('Generated file at models/foo-model.ts')
|
|
22
|
-
const foomodel = filesystem.read('models/foo-model.ts')
|
|
23
|
-
|
|
24
|
-
expect(foomodel).toContain(`module.exports = {`)
|
|
25
|
-
expect(foomodel).toContain(`name: 'foo'`)
|
|
26
|
-
|
|
27
|
-
// cleanup artifact
|
|
28
|
-
filesystem.remove('models')
|
|
29
|
-
})
|