srcdev-nuxt-forms 2.2.1 → 2.3.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/nuxt.config.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  export default defineNuxtConfig({
4
4
  devtools: { enabled: true },
5
5
  css: ['modern-normalize', './assets/styles/main.css'],
6
- modules: ['@nuxt/icon', '@nuxt/test-utils/module', '@nuxtjs/storybook'],
6
+ modules: ['@nuxt/icon', '@nuxt/test-utils/module'],
7
7
  typescript: {
8
8
  tsConfig: {
9
9
  compilerOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "2.2.1",
4
+ "version": "2.3.0",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",
@@ -15,7 +15,6 @@
15
15
  "lint": "eslint .",
16
16
  "postinstall": "nuxt prepare .playground",
17
17
  "release": "release-it",
18
- "storybook": "storybook dev --port 6006 --config-dir .storybook",
19
18
  "test": "vitest"
20
19
  },
21
20
  "files": [
@@ -45,12 +44,6 @@
45
44
  "@iconify-json/ph": "1.2.2",
46
45
  "@iconify-json/radix-icons": "1.2.2",
47
46
  "@iconify-json/ri": "1.2.5",
48
- "@nuxtjs/storybook": "8.3.2",
49
- "@storybook/addon-essentials": "8.4.7",
50
- "@storybook/addon-interactions": "8.4.7",
51
- "@storybook/addon-links": "8.4.7",
52
- "@storybook/vue3": "8.4.7",
53
- "http-proxy-middleware": "3.0.3",
54
47
  "modern-normalize": "3.0.1",
55
48
  "zod": "3.24.1"
56
49
  },
@@ -1,36 +0,0 @@
1
- import type { Meta, StoryFn } from '@nuxtjs/storybook';
2
- // import { Suspense } from 'vue';
3
- import InputError from '../InputError.vue';
4
-
5
- export default {
6
- title: 'Components/UI/InputError',
7
- component: InputError,
8
- } as Meta<typeof InputError>;
9
-
10
- const Template: StoryFn<typeof InputError> = (args) => ({
11
- components: { InputError },
12
- setup() {
13
- return { args };
14
- },
15
- template: `
16
- <Suspense>
17
- <template #default>
18
- <InputError v-bind="args" />
19
- </template>
20
- <template #fallback>
21
- <div>Loading...</div>
22
- </template>
23
- </Suspense>
24
- `,
25
- });
26
-
27
- export const SingleErrorMessage = Template.bind({});
28
- SingleErrorMessage.args = {
29
- dataTestid: 'inputError',
30
- errorMessage: 'Hello World',
31
- showError: true,
32
- id: 'testId',
33
- styleClassPassthrough: ['testClass'],
34
- compact: false,
35
- isDetached: true,
36
- };
@@ -1,8 +0,0 @@
1
- import { Meta, Canvas, Controls } from '@storybook/blocks';
2
- import * as InputButtonCoreStories from './InputButtonCore.stories'
3
-
4
- <Meta of={InputButtonCoreStories} />
5
-
6
- <Canvas of={InputButtonCoreStories.Primary} />
7
-
8
- <Controls of={InputButtonCoreStories.Primary} />
@@ -1,65 +0,0 @@
1
- import type { Meta, StoryFn } from '@nuxtjs/storybook';
2
- import InputButtonCore from '../InputButtonCore.vue';
3
- import propValidators from '../../c12/prop-validators';
4
-
5
- export default {
6
- title: 'Components/Forms/Buttons/Core',
7
- component: InputButtonCore,
8
- argTypes: {
9
- size: {
10
- options: propValidators.size,
11
- control: { type: 'select' },
12
- },
13
- weight: {
14
- options: propValidators.weight,
15
- control: { type: 'select' },
16
- },
17
- theme: {
18
- options: propValidators.theme,
19
- control: { type: 'select' },
20
- default: 'primary',
21
- },
22
- effect: {
23
- options: ['fancy', 'pulse'],
24
- control: { type: 'select' },
25
- },
26
- },
27
- } as Meta<typeof InputButtonCore>;
28
-
29
- const Template: StoryFn<typeof InputButtonCore> = (args) => ({
30
- components: { InputButtonCore },
31
- setup() {
32
- return { args };
33
- },
34
- template: `
35
- <Suspense>
36
- <template #default>
37
- <InputButtonCore v-bind="args">
38
- <template v-if="${'left' in args}" v-slot:title>${args.left}</template>
39
- <template v-if="${'right' in args}" v-slot:content>${args.right}</template>
40
- <template v-if="${'iconOnly' in args}" v-slot:content>${args.iconOnly}</template>
41
- </InputButtonCore>
42
- </template>
43
- <template #fallback>
44
- <div>Loading...</div>
45
- </template>
46
- </Suspense>
47
- `,
48
- // template: '<InputButtonCore v-bind="args" />',
49
- });
50
-
51
- export const Primary = Template.bind({});
52
- Primary.args = {
53
- size: 'medium',
54
- weight: 'wght-400',
55
- theme: 'primary',
56
- useEffect: false,
57
- effect: 'pulse',
58
- buttonText: 'Button text prop',
59
- dataTestid: 'buttonTestId',
60
- styleClassPassthrough: ['testClass', 'testClass2'],
61
- isPending: false,
62
- readonly: false,
63
- left: 'Left',
64
- right: 'Right',
65
- };
@@ -1,8 +0,0 @@
1
- import { Meta, Canvas, Controls } from '@storybook/blocks';
2
- import * as MultipleRadiobuttonsStories from './MultipleRadiobuttons.stories'
3
-
4
- <Meta of={MultipleRadiobuttonsStories} />
5
-
6
- <Canvas of={MultipleRadiobuttonsStories.Primary} />
7
-
8
- <Controls of={MultipleRadiobuttonsStories.Primary} />
@@ -1,71 +0,0 @@
1
- import type { Meta, StoryFn } from '@nuxtjs/storybook';
2
- import MultipleRadiobuttons from '../MultipleRadiobuttons.vue';
3
- import propValidators from '../../c12/prop-validators';
4
- import modelData from './data/tags.json';
5
-
6
- export default {
7
- title: 'Components/Forms/MultipleRadiobuttons',
8
- component: MultipleRadiobuttons,
9
- argTypes: {
10
- size: {
11
- options: propValidators.size,
12
- control: { type: 'select' },
13
- },
14
- weight: {
15
- options: propValidators.weight,
16
- control: { type: 'select' },
17
- },
18
- theme: {
19
- options: propValidators.theme,
20
- control: { type: 'select' },
21
- default: 'primary',
22
- },
23
- optionsLayout: {
24
- options: ['inline', 'equal-widths'],
25
- control: { type: 'select' },
26
- },
27
- direction: {
28
- options: ['row', 'row-reverse'],
29
- control: { type: 'select' },
30
- },
31
- },
32
- } as Meta<typeof MultipleRadiobuttons>;
33
-
34
- const Template: StoryFn<typeof MultipleRadiobuttons> = (args) => ({
35
- components: { MultipleRadiobuttons },
36
- setup() {
37
- return { args };
38
- },
39
- template: `
40
- <Suspense>
41
- <template #default>
42
- <MultipleRadiobuttons v-bind="args">
43
- <template v-if="${'description' in args}" v-slot:description>${args.description}</template>
44
- </MultipleRadiobuttons>
45
- </template>
46
- <template #fallback>
47
- <div>Loading...</div>
48
- </template>
49
- </Suspense>
50
- `,
51
- // template: '<MultipleRadiobuttons v-bind="args" />',
52
- });
53
-
54
- export const Primary = Template.bind({});
55
- Primary.args = {
56
- id: 'tagsRadio',
57
- name: 'tagsRadio',
58
- legend: 'Choose tags (as radiobuttons)',
59
- required: true,
60
- label: 'Check between 3 and 8 tags',
61
- placeholder: 'eg. Type something here',
62
- isButton: true,
63
- errorMessage: 'Please select between 3 and 8 tags',
64
- fieldHasError: false,
65
- modelValue: [],
66
- fieldData: modelData,
67
- size: 'x-small',
68
- optionsLayout: 'inline',
69
- theme: 'primary',
70
- direction: 'row',
71
- };
@@ -1,67 +0,0 @@
1
- {
2
- "data": [
3
- {
4
- "id": "pizza",
5
- "name": "tags",
6
- "value": "pizza",
7
- "label": "Pizza"
8
- },
9
- {
10
- "id": "italian",
11
- "name": "tags",
12
- "value": "italian",
13
- "label": "Italian"
14
- },
15
- {
16
- "id": "vegetarian",
17
- "name": "tags",
18
- "value": "vegetarian",
19
- "label": "Vegetarian"
20
- },
21
- {
22
- "id": "stir-fry",
23
- "name": "tags",
24
- "value": "stir-fry",
25
- "label": "Stir-fry"
26
- },
27
- {
28
- "id": "asian",
29
- "name": "tags",
30
- "value": "asian",
31
- "label": "Asian"
32
- },
33
- {
34
- "id": "cookies",
35
- "name": "tags",
36
- "value": "cookies",
37
- "label": "Cookies"
38
- },
39
- {
40
- "id": "dessert",
41
- "name": "tags",
42
- "value": "dessert",
43
- "label": "Dessert"
44
- },
45
- {
46
- "id": "baking",
47
- "name": "tags",
48
- "value": "baking",
49
- "label": "Baking"
50
- },
51
- {
52
- "id": "pasta",
53
- "name": "tags",
54
- "value": "pasta",
55
- "label": "Pasta"
56
- },
57
- {
58
- "id": "chicken",
59
- "name": "tags",
60
- "value": "chicken",
61
- "label": "Chicken"
62
- }
63
- ],
64
- "total": 5,
65
- "skip": 0,
66
- "limit": 10
67
- }
@@ -1,8 +0,0 @@
1
- import { Meta, Canvas, Controls } from '@storybook/blocks';
2
- import * as InputTextCoreStories from './InputTextCore.stories'
3
-
4
- <Meta of={InputTextCoreStories} />
5
-
6
- <Canvas of={InputTextCoreStories.Primary} />
7
-
8
- <Controls of={InputTextCoreStories.Primary} />
@@ -1,59 +0,0 @@
1
- import type { Meta, StoryFn } from '@nuxtjs/storybook';
2
- import InputTextCore from '../InputTextCore.vue';
3
- import propValidators from '../../c12/prop-validators';
4
-
5
- export default {
6
- title: 'Components/Forms/Input/Text/Core',
7
- component: InputTextCore,
8
- argTypes: {
9
- type: {
10
- options: propValidators.inputTypesText,
11
- control: { type: 'select' },
12
- },
13
- inputMode: {
14
- options: propValidators.inputMode,
15
- control: { type: 'select' },
16
- },
17
- theme: {
18
- options: propValidators.theme,
19
- control: { type: 'select' },
20
- default: 'primary',
21
- },
22
- },
23
- } as Meta<typeof InputTextCore>;
24
-
25
- const Template: StoryFn<typeof InputTextCore> = (args) => ({
26
- components: { InputTextCore },
27
- setup() {
28
- return { args };
29
- },
30
- template: `
31
- <Suspense>
32
- <template #default>
33
- <InputTextCore v-bind="args">
34
- <template v-if="${'left' in args}" v-slot:title>${args.left}</template>
35
- <template v-if="${'right' in args}" v-slot:content>${args.right}</template>
36
- </InputTextCore>
37
- </template>
38
- <template #fallback>
39
- <div>Loading...</div>
40
- </template>
41
- </Suspense>
42
- `,
43
- // template: '<InputTextCore v-bind="args" />',
44
- });
45
-
46
- export const Primary = Template.bind({});
47
- Primary.args = {
48
- type: 'text',
49
- inputmode: 'text',
50
- maxlength: 255,
51
- id: 'testId',
52
- name: 'testName',
53
- required: true,
54
- placeholder: 'Input placeholder text',
55
- fieldHasError: false,
56
- styleClassPassthrough: ['testClass1', 'testClass2'],
57
- theme: 'primary',
58
- modelValue: 'This is the model value',
59
- };
@@ -1,8 +0,0 @@
1
- import { Meta, Canvas, Controls } from '@storybook/blocks';
2
- import * as InputPasswordWithLabelStories from './InputPasswordWithLabel.stories'
3
-
4
- <Meta of={InputPasswordWithLabelStories} />
5
-
6
- <Canvas of={InputPasswordWithLabelStories.Primary} />
7
-
8
- <Controls of={InputPasswordWithLabelStories.Primary} />
@@ -1,60 +0,0 @@
1
- import type { Meta, StoryFn } from '@nuxtjs/storybook';
2
- import InputPasswordWithLabel from '../InputPasswordWithLabel.vue';
3
- import propValidators from '../../../c12/prop-validators';
4
-
5
- export default {
6
- title: 'Components/Forms/Input/Text/InputPasswordWithLabel',
7
- component: InputPasswordWithLabel,
8
- argTypes: {
9
- type: {
10
- options: propValidators.inputTypesText,
11
- control: { type: 'select' },
12
- },
13
- inputMode: {
14
- options: propValidators.inputMode,
15
- control: { type: 'select' },
16
- },
17
- theme: {
18
- options: propValidators.theme,
19
- control: { type: 'select' },
20
- default: 'primary',
21
- },
22
- },
23
- } as Meta<typeof InputPasswordWithLabel>;
24
-
25
- const Template: StoryFn<typeof InputPasswordWithLabel> = (args) => ({
26
- components: { InputPasswordWithLabel },
27
- setup() {
28
- return { args };
29
- },
30
- template: `
31
- <Suspense>
32
- <template #default>
33
- <InputPasswordWithLabel v-bind="args">
34
- <template v-if="${'iconOnly' in args}" v-slot:iconOnly>${args.iconOnly}</template>
35
- </InputPasswordWithLabel>
36
- </template>
37
- <template #fallback>
38
- <div>Loading...</div>
39
- </template>
40
- </Suspense>
41
- `,
42
- // template: '<InputPasswordWithLabel v-bind="args" />',
43
- });
44
-
45
- export const Primary = Template.bind({});
46
- Primary.args = {
47
- type: 'password',
48
- maxlength: 255,
49
- id: 'testId',
50
- name: 'testName',
51
- placeholder: 'Input placeholder text',
52
- label: 'Input label text',
53
- errorMessage: 'This is an error message',
54
- fieldHasError: false,
55
- required: true,
56
- styleClassPassthrough: ['testClass1', 'testClass2'],
57
- theme: 'primary',
58
- modelValue: 'This is the model value',
59
- iconOnly: `<Icon name="radix-icons:eye-none" class="icon" />`,
60
- };