@solfacil/girassol 0.1.9 → 0.2.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 (87) hide show
  1. package/cli/bin/{girassol → girassol-cli} +0 -0
  2. package/cli/build/cli.js +68 -0
  3. package/cli/build/commands/create:component.js +124 -0
  4. package/cli/build/commands/generate:plugin.js +89 -0
  5. package/cli/build/commands/generate:types.js +76 -0
  6. package/cli/build/commands/girassol-cli.js +52 -0
  7. package/cli/build/extensions/cli-extension.js +17 -0
  8. package/cli/build/templates/components.d.ts.ejs +1 -0
  9. package/cli/build/templates/nuxt-plugin.ejs +8 -0
  10. package/cli/build/templates/vue-plugin.ejs +5 -0
  11. package/cli/{src → build}/templates/windi.config.ts.ejs +0 -0
  12. package/cli/build/types/cli.d.ts +1 -0
  13. package/cli/build/types/commands/create:component.d.ts +1 -0
  14. package/cli/build/types/commands/generate:plugin.d.ts +1 -0
  15. package/cli/build/types/commands/generate:types.d.ts +7 -0
  16. package/cli/build/types/commands/girassol-cli.d.ts +1 -0
  17. package/cli/build/types/extensions/cli-extension.d.ts +1 -0
  18. package/cli/build/types/types.d.ts +0 -0
  19. package/cli/build/types.js +2 -0
  20. package/dist/README.md.d.ts +2 -0
  21. package/dist/cli/readme.md.d.ts +2 -0
  22. package/dist/cli/src/cli.d.ts +1 -0
  23. package/dist/cli/src/commands/create:component.d.ts +1 -0
  24. package/dist/cli/src/commands/generate:plugin.d.ts +1 -0
  25. package/dist/cli/src/commands/generate:types.d.ts +7 -0
  26. package/dist/cli/src/commands/girassol-cli.d.ts +1 -0
  27. package/dist/cli/src/extensions/cli-extension.d.ts +1 -0
  28. package/dist/cli/src/types.d.ts +0 -0
  29. package/dist/components.d.ts +22 -0
  30. package/dist/components.json +1 -0
  31. package/dist/girassol.es.js +611 -261
  32. package/dist/girassol.umd.js +5 -5
  33. package/dist/style.css +1 -1
  34. package/dist/theme/solfacil/colors.d.ts +23 -5
  35. package/dist/theme/solfacil/effects.d.ts +5 -3
  36. package/dist/theme/solfacil/typography.d.ts +1 -2
  37. package/dist/types/components/accordion/Accordion.vue.d.ts +97 -0
  38. package/dist/types/components/accordion/accordion.spec.d.ts +1 -0
  39. package/dist/types/components/accordion/index.d.ts +2 -0
  40. package/dist/types/components/dropdown/Dropdown.vue.d.ts +188 -31
  41. package/dist/types/components/forms/button/Button.vue.d.ts +86 -12
  42. package/dist/types/components/forms/checkbox/Checkbox.vue.d.ts +77 -11
  43. package/dist/types/components/forms/checkbox/CheckboxGroup.vue.d.ts +114 -19
  44. package/dist/types/components/forms/input/Input.vue.d.ts +76 -10
  45. package/dist/types/components/forms/radio/Radio.vue.d.ts +77 -11
  46. package/dist/types/components/forms/radio/RadioGroup.vue.d.ts +114 -19
  47. package/dist/types/components/forms/select/ListOption.vue.d.ts +149 -0
  48. package/dist/types/components/forms/select/Select.vue.d.ts +298 -27
  49. package/dist/types/components/forms/switch/Switch.vue.d.ts +83 -13
  50. package/dist/types/components/forms/textarea/Textarea.vue.d.ts +108 -19
  51. package/dist/types/components/forms/textfield/Textfield.vue.d.ts +101 -17
  52. package/dist/types/components/forms/textfield/TextfieldPassword.vue.d.ts +71 -9
  53. package/dist/types/components/informations/chip/Chip.vue.d.ts +94 -15
  54. package/dist/types/composables/use-toast/Toast.vue.d.ts +130 -24
  55. package/dist/types/composables/use-toast/index.d.ts +1 -1
  56. package/dist/types/index.d.ts +2723 -2
  57. package/dist/vite-modules/generate-component-types.d.ts +3 -0
  58. package/dist/windi.config.d.ts +1 -1
  59. package/package.json +52 -42
  60. package/theme/solfacil/borders.ts +2 -1
  61. package/theme/solfacil/colors.ts +36 -23
  62. package/theme/solfacil/effects.ts +6 -4
  63. package/theme/solfacil/typography.ts +2 -4
  64. package/vite.config.ts +4 -0
  65. package/windi.config.ts +31 -1
  66. package/cli/.eslintrc.js +0 -18
  67. package/cli/LICENSE +0 -21
  68. package/cli/docs/commands.md +0 -3
  69. package/cli/docs/plugins.md +0 -47
  70. package/cli/package.json +0 -53
  71. package/cli/readme.md +0 -26
  72. package/cli/src/cli.ts +0 -25
  73. package/cli/src/commands/create:component.ts +0 -93
  74. package/cli/src/commands/generate:plugin.ts +0 -68
  75. package/cli/src/commands/generate:types.ts +0 -38
  76. package/cli/src/commands/girassol.ts +0 -12
  77. package/cli/src/extensions/cli-extension.ts +0 -17
  78. package/cli/src/templates/components/component.spec.ts.ejs +0 -20
  79. package/cli/src/templates/components/component.stories.mdx.ejs +0 -74
  80. package/cli/src/templates/components/component.vue.ejs +0 -23
  81. package/cli/src/templates/components/index.ts.ejs +0 -10
  82. package/cli/src/templates/components.d.ts.ejs +0 -10
  83. package/cli/src/templates/nuxt-plugin.ejs +0 -7
  84. package/cli/src/templates/vue-plugin.ejs +0 -5
  85. package/cli/src/types.ts +0 -1
  86. package/cli/tsconfig.json +0 -28
  87. package/cli/yarn.lock +0 -1804
@@ -1,68 +0,0 @@
1
- import type { GluegunToolbox } from 'gluegun'
2
- const RELATIVE_ROOT_PROJECT = './'
3
-
4
- import { componentsNames } from '../../../dist/girassol.umd'
5
-
6
- module.exports = {
7
- name: 'generate:plugin',
8
- description: 'Setting girassol global plugin to nuxt/vue',
9
- run: async (toolbox: GluegunToolbox) => {
10
- const {
11
- parameters,
12
- template,
13
- print: { info, spin, highlight },
14
- } = toolbox
15
-
16
- if (parameters?.options?.nuxt) {
17
- const spinnerPlugin = spin('Setting plugin')
18
-
19
- await template.generate({
20
- template: 'nuxt-plugin.ejs',
21
- target: `${RELATIVE_ROOT_PROJECT}/plugins/girassol.ts`,
22
- })
23
-
24
- spinnerPlugin.succeed(`Plugin created in [/plugins/girassol.ts]!`)
25
- const spinnerTypes = spin('Setting types')
26
-
27
- await template.generate({
28
- props: { componentsNames },
29
- template: 'components.d.ts.ejs',
30
- target: `${RELATIVE_ROOT_PROJECT}components.d.ts`,
31
- })
32
-
33
- spinnerTypes.succeed('Global types created in [/components.d.ts]!')
34
- } else {
35
- const spinnerPlugin = spin('Setting plugin')
36
-
37
- await template.generate({
38
- template: 'vue-plugin.ejs',
39
- target: `${RELATIVE_ROOT_PROJECT}/src/plugins/girassol.ts`,
40
- })
41
-
42
- spinnerPlugin.succeed(`Plugin created in [/src/plugins/girassol.ts]!`)
43
-
44
- const spinnerTypes = spin('Setting types')
45
-
46
- await template.generate({
47
- props: { componentsNames },
48
- template: 'components.d.ts.ejs',
49
- target: `${RELATIVE_ROOT_PROJECT}/src/components.d.ts`,
50
- })
51
-
52
- spinnerTypes.succeed('Global types created in [/src/components.d.ts]!')
53
-
54
- info('Please, add command below to src/main.ts')
55
- highlight(`import girassol from 'plugins/girassol'`)
56
- highlight(`createApp(App).use(girassol)`)
57
- }
58
-
59
- const spinnerWindi = spin('Setting plugin')
60
-
61
- await template.generate({
62
- template: 'windi.config.ts.ejs',
63
- target: `${RELATIVE_ROOT_PROJECT}/windi.config.ts`,
64
- })
65
-
66
- spinnerWindi.succeed(`Windicss config created in [/windi.config.ts]!`)
67
- },
68
- }
@@ -1,38 +0,0 @@
1
- import type { GluegunToolbox } from 'gluegun'
2
- const RELATIVE_ROOT_PROJECT = './'
3
-
4
- import { componentsNames } from '../../../dist/girassol.umd'
5
-
6
- module.exports = {
7
- name: 'generate:plugin',
8
- description: 'Setting girassol global plugin to nuxt/vue',
9
- run: async (toolbox: GluegunToolbox) => {
10
- const {
11
- parameters,
12
- template,
13
- print: { spin },
14
- } = toolbox
15
-
16
- if (parameters?.options?.nuxt) {
17
- const spinnerTypes = spin('Setting types')
18
-
19
- await template.generate({
20
- props: { componentsNames },
21
- template: 'components.d.ts.ejs',
22
- target: `${RELATIVE_ROOT_PROJECT}components.d.ts`,
23
- })
24
-
25
- spinnerTypes.succeed(`Global types created in [/components.d.ts]!`)
26
- } else {
27
- const spinnerTypes = spin('Setting types')
28
-
29
- await template.generate({
30
- props: { componentsNames },
31
- template: 'components.d.ts.ejs',
32
- target: `${RELATIVE_ROOT_PROJECT}/src/components.d.ts`,
33
- })
34
-
35
- spinnerTypes.succeed('Global types created in [/src/components.d.ts]!')
36
- }
37
- },
38
- }
@@ -1,12 +0,0 @@
1
- import type { GluegunCommand } from 'gluegun'
2
-
3
- const command: GluegunCommand = {
4
- name: 'girassol',
5
- run: async (toolbox) => {
6
- const { print } = toolbox
7
-
8
- print.info('Welcome Girassol CLI')
9
- },
10
- }
11
-
12
- module.exports = command
@@ -1,17 +0,0 @@
1
- import type { GluegunToolbox } from 'gluegun'
2
-
3
- // add your CLI-specific functionality here, which will then be accessible
4
- // to your commands
5
- module.exports = (toolbox: GluegunToolbox) => {
6
- toolbox.foo = () => {
7
- toolbox.print.info('called foo extension')
8
- }
9
-
10
- // enable this if you want to read configuration in from
11
- // the current folder's package.json (in a "girassol" property),
12
- // girassol.config.json, etc.
13
- // toolbox.config = {
14
- // ...toolbox.config,
15
- // ...toolbox.config.loadConfig("girassol", process.cwd())
16
- // }
17
- }
@@ -1,20 +0,0 @@
1
- import '@testing-library/jest-dom'
2
- import userEvent from '@testing-library/user-event'
3
-
4
- import { render, screen } from '@testing-library/vue'
5
-
6
- import <%- props.name %> from './<%- props.name %>.vue'
7
-
8
- describe('[<%- props.folder %>] <%- props.name %>', () => {
9
- it('Renders text <%- props.name %> pass by label prop', () => {
10
- const label = 'awesome!'
11
-
12
- render(<%- props.name %>, {
13
- props: {
14
- label
15
- },
16
- })
17
-
18
- screen.getByText(label)
19
- })
20
- })
@@ -1,74 +0,0 @@
1
- import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'
2
- import { withDesign } from 'storybook-addon-designs'
3
-
4
- import <%- props.name %> from './<%- props.name %>.vue'
5
-
6
- <Meta
7
- title="Componentes/<%- props.folder %>/<%- props.name %>"
8
- component={<%- props.name %>}
9
- decorators={[withDesign]}
10
- parameters={{
11
- design: {
12
- type: 'figma',
13
- url: '',
14
- },
15
- }}
16
- argTypes={{
17
- label: 'hi!'
18
- }}
19
- />
20
-
21
- export const Template = ({ label,...args }) => ({
22
- components: { <%- props.name %> },
23
- setup() {
24
- return { args, label }
25
- },
26
- template: `<<%- props.name %> v-bind="args" id="teste"></<%- props.name %>>`,
27
- })
28
-
29
- # <%- props.name %>
30
-
31
- ## Melhores praticas
32
-
33
-
34
- ## Acessibilidade
35
-
36
-
37
- ## Importar localmente
38
-
39
- ```js dark
40
- import { Sol<%- props.name %> } from '@solfacil/girassol'
41
- ```
42
-
43
- ## Variants
44
- <Canvas>
45
- <Story
46
- name="Default"
47
- args={{
48
- label: 'default',
49
- }}
50
- >
51
- {Template.bind({})}
52
- </Story>
53
- </Canvas>
54
-
55
- ## Exemplos de uso
56
-
57
- ```html dark
58
- <Sol<%- props.name %> id="just-test">Awesome component!</Sol<%- props.name %>>
59
- ```
60
-
61
- ## Playground
62
-
63
- <Canvas>
64
- <Story
65
- name="Playground"
66
- args={{
67
- label: 'its work fine!',
68
- }}
69
- >
70
- {Template.bind({})}
71
- </Story>
72
- </Canvas>
73
-
74
- <ArgsTable story="Playground" />
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- id: string
4
- label?: string
5
- }>()
6
-
7
- const emit = defineEmits<{
8
- (e: 'change', value: string): void
9
- }>()
10
- </script>
11
-
12
- <template>
13
- <div class="sol-<%- props.nameClass %>-core">
14
- {{ label }}
15
- </div>
16
- </template>
17
-
18
- <style lang="scss">
19
- .sol-<%- props.nameClass %>-core {
20
-
21
- | @apply bg-brand-primary-medium px-2xs;
22
- }
23
- </style>
@@ -1,10 +0,0 @@
1
- import type { App } from 'vue'
2
- import Sol<%- props.name %> from './<%- props.name %>.vue'
3
-
4
- Sol<%- props.name %>.install = (app: App) => {
5
- app.component('Sol<%- props.name %>', Sol<%- props.name %>)
6
- }
7
-
8
- export {
9
- Sol<%- props.name %>,
10
- }
@@ -1,10 +0,0 @@
1
- declare module '@vue/runtime-core' {
2
- export interface GlobalComponents {
3
- <% props.componentsNames.forEach((comp, index) => {%><%-
4
- `${comp}: typeof import('@solfacil/girassol')['${comp}']`
5
- %>
6
- <% });%>
7
- }
8
- }
9
-
10
- export {}
@@ -1,7 +0,0 @@
1
- import { defineNuxtPlugin } from '#app';
2
-
3
- import { install } from '@solfacil/girassol'
4
-
5
- export default defineNuxtPlugin(({ vueApp }) => {
6
- vueApp.use(install)
7
- })
@@ -1,5 +0,0 @@
1
- import { install } from '@solfacil/girassol'
2
-
3
- export default {
4
- install
5
- }
package/cli/src/types.ts DELETED
@@ -1 +0,0 @@
1
- // export types
package/cli/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowSyntheticDefaultImports": false,
4
- "experimentalDecorators": true,
5
- "lib": [
6
- "es2015",
7
- "scripthost",
8
- "es2015.promise",
9
- "es2015.generator",
10
- "es2015.iterable",
11
- "dom"
12
- ],
13
- "module": "commonjs",
14
- "moduleResolution": "node",
15
- "noImplicitAny": false,
16
- "noImplicitThis": true,
17
- "noUnusedLocals": true,
18
- "sourceMap": false,
19
- "inlineSourceMap": true,
20
- "outDir": "build",
21
- "strict": false,
22
- "target": "es5",
23
- "declaration": true,
24
- "declarationDir": "build/types"
25
- },
26
- "include": ["src/**/*"],
27
- "exclude": ["node_modules"]
28
- }