@aerogel/cli 0.0.0-next.7b6199e0666e235c949739bdbc7cca2d54c8636e → 0.0.0-next.7f369b50c025aaa1a8024b6e53c659a6d7d617b5

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 (39) hide show
  1. package/dist/aerogel-cli.js +184 -228
  2. package/dist/aerogel-cli.js.map +1 -1
  3. package/package.json +2 -1
  4. package/src/commands/create.test.ts +0 -23
  5. package/src/commands/create.ts +4 -8
  6. package/src/commands/generate-component.test.ts +0 -60
  7. package/src/commands/generate-component.ts +3 -79
  8. package/src/lib/App.ts +35 -42
  9. package/src/lib/File.ts +12 -1
  10. package/src/testing/setup.ts +6 -0
  11. package/templates/app/.github/workflows/ci.yml +0 -29
  12. package/templates/app/.gitignore.template +0 -2
  13. package/templates/app/.nvmrc +0 -1
  14. package/templates/app/.vscode/launch.json +0 -17
  15. package/templates/app/.vscode/settings.json +0 -10
  16. package/templates/app/cypress/cypress.config.ts +0 -14
  17. package/templates/app/cypress/e2e/app.cy.ts +0 -9
  18. package/templates/app/cypress/support/e2e.ts +0 -1
  19. package/templates/app/cypress/tsconfig.json +0 -11
  20. package/templates/app/index.html +0 -13
  21. package/templates/app/package.json +0 -67
  22. package/templates/app/src/App.vue +0 -12
  23. package/templates/app/src/assets/css/main.css +0 -4
  24. package/templates/app/src/assets/public/robots.txt +0 -2
  25. package/templates/app/src/lang/en.yaml +0 -3
  26. package/templates/app/src/main.test.ts +0 -9
  27. package/templates/app/src/main.ts +0 -13
  28. package/templates/app/src/types/globals.d.ts +0 -2
  29. package/templates/app/src/types/shims.d.ts +0 -7
  30. package/templates/app/src/types/ts-reset.d.ts +0 -1
  31. package/templates/app/tsconfig.json +0 -12
  32. package/templates/app/vite.config.ts +0 -31
  33. package/templates/component-button/[component.name].vue +0 -42
  34. package/templates/component-button-story/[component.name].story.vue +0 -77
  35. package/templates/component-checkbox/[component.name].vue +0 -34
  36. package/templates/component-checkbox-story/[component.name].story.vue +0 -63
  37. package/templates/component-input/[component.name].vue +0 -17
  38. package/templates/component-input-story/[component.name].story.vue +0 -63
  39. package/templates/component-story/[component.name].story.vue +0 -7
@@ -1,77 +0,0 @@
1
- <template>
2
- <Story :layout="{ type: 'grid' }">
3
- <Variant title="Playground">
4
- <<% component.name %> :color="color">
5
- {{ content }}
6
- </<% component.name %>>
7
-
8
- <template #controls>
9
- <HstText v-model="content" title="Content" />
10
- <HstSelect v-model="color" title="Color" :options="colorOptions" />
11
- </template>
12
- </Variant>
13
-
14
- <Variant title="Default">
15
- <<% component.name %>>
16
- Click me!
17
- </<% component.name %>>
18
- </Variant>
19
-
20
- <Variant title="Hover">
21
- <<% component.name %> class=":hover">
22
- Click me!
23
- </<% component.name %>>
24
- </Variant>
25
-
26
- <Variant title="Focus">
27
- <<% component.name %> class=":focus :focus-visible">
28
- Click me!
29
- </<% component.name %>>
30
- </Variant>
31
-
32
- <Variant title="Disabled">
33
- <<% component.name %> disabled>
34
- You can't click me
35
- </<% component.name %>>
36
- </Variant>
37
-
38
- <Variant title="Colors" :layout="{ width: '300px' }">
39
- <div class="flex items-center gap-2">
40
- <<% component.name %> color="primary">
41
- Primary
42
- </<% component.name %>>
43
- <<% component.name %> color="secondary">
44
- Secondary
45
- </<% component.name %>>
46
- <<% component.name %> color="danger">
47
- Danger
48
- </<% component.name %>>
49
- <<% component.name %> color="clear">
50
- Clear
51
- </<% component.name %>>
52
- </div>
53
- </Variant>
54
- </Story>
55
- </template>
56
-
57
- <script setup lang="ts">
58
- import { Colors } from '@aerogel/core';
59
- import { invert } from '@noeldemartin/utils';
60
- import { ref } from 'vue';
61
- import type { Color } from '@aerogel/core';
62
-
63
- const content = ref('Click me!');
64
- const color = ref<Color>(Colors.Primary);
65
- const colorOptions = invert(Colors);
66
- </script>
67
-
68
- <style>
69
- .story-<% component.slug %> {
70
- grid-template-columns: repeat(2, 300px) !important;
71
- }
72
-
73
- .story-<% component.slug %> .variant-playground,
74
- .story-<% component.slug %> .variant-colors{
75
- grid-column: 1 / -1;
76
- }
77
- </style>
@@ -1,34 +0,0 @@
1
- <template>
2
- <HeadlessInput
3
- ref="$input"
4
- :name="name"
5
- :class="className"
6
- :label="label"
7
- >
8
- <HeadlessInputInput
9
- v-bind="attrs"
10
- type="checkbox"
11
- />
12
- <div v-if="$slots.default">
13
- <HeadlessInputLabel>
14
- <slot />
15
- </HeadlessInputLabel>
16
- <HeadlessInputError />
17
- </div>
18
- </HeadlessInput>
19
- </template>
20
-
21
- <script setup lang="ts">
22
- import { HeadlessInputLabel, componentRef, stringProp, useInputAttrs } from '@aerogel/core';
23
- import type { IHeadlessInput } from '@aerogel/core';
24
-
25
- defineOptions({ inheritAttrs: false });
26
- defineProps({
27
- name: stringProp(),
28
- label: stringProp(),
29
- inputClass: stringProp(''),
30
- });
31
-
32
- const $input = componentRef<IHeadlessInput>();
33
- const [attrs, className] = useInputAttrs();
34
- </script>
@@ -1,63 +0,0 @@
1
- <template>
2
- <Story group="base" :layout="{ type: 'grid' }">
3
- <Variant title="Playground">
4
- <Form :form="form" class="m-1">
5
- <<% component.name %> name="accept" :form="form">
6
- {{ label }}
7
- </<% component.name %>>
8
- </Form>
9
-
10
- <template #controls>
11
- <HstText v-model="label" title="Label" />
12
- </template>
13
- </Variant>
14
-
15
- <Variant title="Default">
16
- <<% component.name %> class="m-1">
17
- Accept Terms & Conditions
18
- </<% component.name %>>
19
- </Variant>
20
-
21
- <Variant title="Hover">
22
- <<% component.name %> class="m-1" input-class=":hover">
23
- Accept Terms & Conditions
24
- </<% component.name %>>
25
- </Variant>
26
-
27
- <Variant title="Focus">
28
- <<% component.name %> class="m-1" input-class=":focus :focus-visible">
29
- Accept Terms & Conditions
30
- </<% component.name %>>
31
- </Variant>
32
-
33
- <Variant title="Error">
34
- <Form :form="errorForm" class="m-1">
35
- <<% component.name %> name="accept">
36
- Accept Terms & Conditions
37
- </<% component.name %>>
38
- </Form>
39
- </Variant>
40
- </Story>
41
- </template>
42
-
43
- <script setup lang="ts">
44
- import { requiredBooleanInput, useForm } from '@aerogel/core';
45
- import { ref } from 'vue';
46
-
47
- const form = useForm({ accept: requiredBooleanInput(true) });
48
- const errorForm = useForm({ accept: requiredBooleanInput() });
49
- const label = ref('Accept Terms & Conditions');
50
-
51
- form.submit();
52
- errorForm.submit();
53
- </script>
54
-
55
- <style>
56
- .story-<% component.slug %> {
57
- grid-template-columns: repeat(2, 300px) !important;
58
- }
59
-
60
- .story-<% component.slug %> .variant-playground {
61
- grid-column: 1 / -1;
62
- }
63
- </style>
@@ -1,17 +0,0 @@
1
- <template>
2
- <HeadlessInput v-bind="props">
3
- <HeadlessInputLabel />
4
- <HeadlessInputInput v-bind="attrs" />
5
- <HeadlessInputDescription />
6
- <HeadlessInputError />
7
- </HeadlessInput>
8
- </template>
9
-
10
- <script setup lang="ts">
11
- import { useInputAttrs, useInputProps } from '@aerogel/core';
12
-
13
- defineOptions({ inheritAttrs: false });
14
-
15
- const props = defineProps(useInputProps());
16
- const [attrs] = useInputAttrs();
17
- </script>
@@ -1,63 +0,0 @@
1
- <template>
2
- <Story :layout="{ type: 'grid' }">
3
- <Variant title="Playground">
4
- <Form :form="form">
5
- <<% component.name %> name="food" :label="label" :placeholder="placeholder" />
6
- </Form>
7
-
8
- <template #controls>
9
- <HstText v-model="label" title="Label" />
10
- <HstText v-model="placeholder" title="Placeholder" />
11
- <HstCheckbox v-model="hasErrors" title="Errors" />
12
- </template>
13
- </Variant>
14
-
15
- <Variant title="Default">
16
- <<% component.name %> label="What's the best food?" placeholder="Ramen" />
17
- </Variant>
18
-
19
- <Variant title="Hover">
20
- <<% component.name %> label="What's the best food?" placeholder="Ramen" input-class=":hover" />
21
- </Variant>
22
-
23
- <Variant title="Focus">
24
- <<% component.name %> label="What's the best food?" placeholder="Ramen" input-class=":focus :focus-visible" />
25
- </Variant>
26
-
27
- <Variant title="Error">
28
- <Form :form="errorForm">
29
- <<% component.name %>
30
- name="food"
31
- label="What's the best food?"
32
- placeholder="Ramen"
33
- class=":focus :focus-visible"
34
- />
35
- </Form>
36
- </Variant>
37
- </Story>
38
- </template>
39
-
40
- <script setup lang="ts">
41
- import { requiredStringInput, useForm } from '@aerogel/core';
42
- import { ref, watchEffect } from 'vue';
43
-
44
- const form = useForm({ food: requiredStringInput() });
45
- const errorForm = useForm({ food: requiredStringInput() });
46
- const label = ref('What\'s the best food?');
47
- const placeholder = ref('Ramen');
48
- const hasErrors = ref(false);
49
-
50
- errorForm.submit();
51
-
52
- watchEffect(() => (hasErrors.value ? form.submit() : form.reset()));
53
- </script>
54
-
55
- <style>
56
- .story-<% component.slug %> {
57
- grid-template-columns: repeat(2, 300px) !important;
58
- }
59
-
60
- .story-<% component.slug %> .variant-playground {
61
- grid-column: 1 / -1;
62
- }
63
- </style>
@@ -1,7 +0,0 @@
1
- <template>
2
- <Story>
3
- <Variant title="Primary">
4
- <<% component.name %> />
5
- </Variant>
6
- </Story>
7
- </template>