@saasmakers/ui 0.1.79 → 0.1.80

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 (36) hide show
  1. package/app/components/bases/BaseAlert.stories.ts +42 -0
  2. package/app/components/bases/BaseAvatar.stories.ts +18 -0
  3. package/app/components/bases/BaseBordered.stories.ts +22 -0
  4. package/app/components/bases/BaseButton.stories.ts +81 -0
  5. package/app/components/bases/BaseCharacter.stories.ts +31 -0
  6. package/app/components/bases/BaseChart.stories.ts +20 -0
  7. package/app/components/bases/BaseDivider.stories.ts +25 -0
  8. package/app/components/bases/BaseEmoji.stories.ts +28 -0
  9. package/app/components/bases/BaseHeading.stories.ts +49 -0
  10. package/app/components/bases/BaseIcon.stories.ts +56 -0
  11. package/app/components/bases/BaseMessage.stories.ts +20 -0
  12. package/app/components/bases/BaseMetric.stories.ts +39 -0
  13. package/app/components/bases/BaseOverlay.stories.ts +30 -0
  14. package/app/components/bases/BaseParagraph.stories.ts +36 -0
  15. package/app/components/bases/BasePower.stories.ts +59 -0
  16. package/app/components/bases/BaseQuote.stories.ts +63 -0
  17. package/app/components/bases/BaseSpinner.stories.ts +42 -0
  18. package/app/components/bases/BaseTag.stories.ts +44 -0
  19. package/app/components/bases/BaseTags.stories.ts +42 -0
  20. package/app/components/bases/BaseText.stories.ts +48 -0
  21. package/app/components/bases/BaseToast.stories.ts +29 -0
  22. package/app/components/fields/FieldCheckbox.stories.ts +36 -0
  23. package/app/components/fields/FieldDays.stories.ts +10 -0
  24. package/app/components/fields/FieldEmojis.stories.ts +10 -0
  25. package/app/components/fields/FieldInput.stories.ts +80 -0
  26. package/app/components/fields/FieldLabel.stories.ts +30 -0
  27. package/app/components/fields/FieldMessage.stories.ts +22 -0
  28. package/app/components/fields/FieldSelect.stories.ts +73 -0
  29. package/app/components/fields/FieldTabs.stories.ts +44 -0
  30. package/app/components/fields/FieldTextarea.stories.ts +44 -0
  31. package/app/components/fields/FieldTime.stories.ts +39 -0
  32. package/app/components/layout/LayoutToasts.stories.ts +8 -0
  33. package/app/types/bases.d.ts +1 -1
  34. package/app/types/global.d.ts +3 -0
  35. package/nuxt.config.ts +1 -0
  36. package/package.json +4 -1
@@ -0,0 +1,42 @@
1
+ import BaseAlert from './BaseAlert.vue'
2
+
3
+ export default {
4
+ component: BaseAlert,
5
+ title: 'Bases/BaseAlert',
6
+
7
+ argTypes: {
8
+ closingId: { control: 'text' },
9
+ isClosable: { control: 'boolean' },
10
+ size: {
11
+ control: 'select',
12
+ options: [
13
+ '2xs',
14
+ 'xs',
15
+ 'sm',
16
+ 'base',
17
+ 'lg',
18
+ 'xl',
19
+ '2xl',
20
+ '3xl',
21
+ '4xl',
22
+ ] satisfies BaseSize[],
23
+ },
24
+ status: {
25
+ control: 'select',
26
+ options: [
27
+ 'error',
28
+ 'info',
29
+ 'success',
30
+ 'warning',
31
+ ] satisfies BaseStatus[],
32
+ },
33
+ text: { control: 'text' },
34
+ },
35
+ } satisfies Meta<typeof BaseAlert>
36
+
37
+ export const Default: StoryObj<typeof BaseAlert> = {
38
+ args: {
39
+ status: 'info',
40
+ text: 'This is an alert message',
41
+ } satisfies Partial<BaseAlert>,
42
+ }
@@ -0,0 +1,18 @@
1
+ import BaseAvatar from './BaseAvatar.vue'
2
+
3
+ export default {
4
+ component: BaseAvatar,
5
+ title: 'Bases/BaseAvatar',
6
+
7
+ argTypes: {
8
+ bordered: { control: 'boolean' },
9
+ borderWidth: { control: 'number' },
10
+ circular: { control: 'boolean' },
11
+ editable: { control: 'boolean' },
12
+ maxSizeMb: { control: 'number' },
13
+ shadow: { control: 'boolean' },
14
+ src: { control: 'text' },
15
+ },
16
+ } satisfies Meta<typeof BaseAvatar>
17
+
18
+ export const Default: StoryObj<typeof BaseAvatar> = { args: { src: 'https://via.placeholder.com/100' } satisfies Partial<BaseAvatar> }
@@ -0,0 +1,22 @@
1
+ import BaseBordered from './BaseBordered.vue'
2
+
3
+ export default {
4
+ component: BaseBordered,
5
+ title: 'Bases/BaseBordered',
6
+
7
+ argTypes: {
8
+ background: {
9
+ control: 'select',
10
+ options: ['gray', 'white'] satisfies BaseBackground[],
11
+ },
12
+ borderColor: {
13
+ control: 'select',
14
+ options: ['black', 'gray'] satisfies BaseBorderedColor[],
15
+ },
16
+ hasBorder: { control: 'boolean' },
17
+ shadow: { control: 'boolean' },
18
+ title: { control: 'text' },
19
+ },
20
+ } satisfies Meta<typeof BaseBordered>
21
+
22
+ export const Default: StoryObj<typeof BaseBordered> = { args: { title: 'Bordered Container' } satisfies Partial<BaseBordered> }
@@ -0,0 +1,81 @@
1
+ import BaseButton from './BaseButton.vue'
2
+
3
+ export default {
4
+ component: BaseButton,
5
+ title: 'Bases/BaseButton',
6
+
7
+ argTypes: {
8
+ background: { control: 'boolean' },
9
+ circular: { control: 'boolean' },
10
+ color: {
11
+ control: 'select',
12
+ options: [
13
+ 'black',
14
+ 'gray',
15
+ 'green',
16
+ 'indigo',
17
+ 'orange',
18
+ 'red',
19
+ 'white',
20
+ ] satisfies BaseColor[],
21
+ },
22
+ confirmation: { control: 'boolean' },
23
+ disabled: { control: 'boolean' },
24
+ fullWidth: { control: 'boolean' },
25
+ icon: { control: 'text' },
26
+ iconColor: {
27
+ control: 'select',
28
+ options: [
29
+ 'black',
30
+ 'gray',
31
+ 'green',
32
+ 'indigo',
33
+ 'orange',
34
+ 'red',
35
+ 'white',
36
+ ] satisfies BaseColor[],
37
+ },
38
+ light: { control: 'boolean' },
39
+ loading: { control: 'boolean' },
40
+ reverse: { control: 'boolean' },
41
+ rounded: {
42
+ control: 'select',
43
+ options: [
44
+ 'none',
45
+ 'sm',
46
+ 'base',
47
+ 'md',
48
+ 'lg',
49
+ 'xl',
50
+ 'full',
51
+ ] satisfies BaseButtonRounded[],
52
+ },
53
+ size: {
54
+ control: 'select',
55
+ options: [
56
+ '2xs',
57
+ 'xs',
58
+ 'sm',
59
+ 'base',
60
+ 'lg',
61
+ 'xl',
62
+ ] satisfies BaseButtonSize[],
63
+ },
64
+ text: { control: 'text' },
65
+ type: {
66
+ control: 'select',
67
+ options: [
68
+ 'button',
69
+ 'reset',
70
+ 'submit',
71
+ ],
72
+ },
73
+ },
74
+ } satisfies Meta<typeof BaseButton>
75
+
76
+ export const Default: StoryObj<typeof BaseButton> = {
77
+ args: {
78
+ color: 'black',
79
+ text: 'Update profile',
80
+ } satisfies Partial<BaseButton>,
81
+ }
@@ -0,0 +1,31 @@
1
+ import BaseCharacter from './BaseCharacter.vue'
2
+
3
+ export default {
4
+ component: BaseCharacter,
5
+ title: 'Bases/BaseCharacter',
6
+
7
+ argTypes: {
8
+ character: {
9
+ control: 'select',
10
+ options: [
11
+ 'anthony',
12
+ 'julien',
13
+ 'mathieu',
14
+ 'nada',
15
+ 'power',
16
+ 'yoda',
17
+ ] satisfies BaseCharacterCharacter[],
18
+ },
19
+ size: {
20
+ control: 'select',
21
+ options: [
22
+ 'xs',
23
+ 'sm',
24
+ 'base',
25
+ 'lg',
26
+ ] satisfies BaseCharacterSize[],
27
+ },
28
+ },
29
+ } satisfies Meta<typeof BaseCharacter>
30
+
31
+ export const Default: StoryObj<typeof BaseCharacter> = { args: { character: 'power' } satisfies Partial<BaseCharacter> }
@@ -0,0 +1,20 @@
1
+ import BaseChart from './BaseChart.vue'
2
+
3
+ export default {
4
+ component: BaseChart,
5
+ title: 'Bases/BaseChart',
6
+
7
+ argTypes: {
8
+ fullWidth: { control: 'boolean' },
9
+ type: {
10
+ control: 'select',
11
+ options: [
12
+ 'bar',
13
+ 'line',
14
+ 'pie',
15
+ ] satisfies BaseChartType[],
16
+ },
17
+ },
18
+ } satisfies Meta<typeof BaseChart>
19
+
20
+ export const Default: StoryObj<typeof BaseChart> = { args: { type: 'bar' } satisfies Partial<BaseChart> }
@@ -0,0 +1,25 @@
1
+ import BaseDivider from './BaseDivider.vue'
2
+
3
+ export default {
4
+ component: BaseDivider,
5
+ title: 'Bases/BaseDivider',
6
+
7
+ argTypes: {
8
+ borderStyle: {
9
+ control: 'select',
10
+ options: [
11
+ 'dashed',
12
+ 'dotted',
13
+ 'solid',
14
+ ] satisfies BaseDividerBorderStyle[],
15
+ },
16
+ margin: { control: 'number' },
17
+ size: {
18
+ control: 'select',
19
+ options: ['sm', 'base'] satisfies BaseDividerSize[],
20
+ },
21
+ title: { control: 'text' },
22
+ },
23
+ } satisfies Meta<typeof BaseDivider>
24
+
25
+ export const Default: StoryObj<typeof BaseDivider> = { args: { title: 'Divider Title' } satisfies Partial<BaseDivider> }
@@ -0,0 +1,28 @@
1
+ import BaseEmoji from './BaseEmoji.vue'
2
+
3
+ export default {
4
+ component: BaseEmoji,
5
+ title: 'Bases/BaseEmoji',
6
+
7
+ argTypes: {
8
+ clickable: { control: 'boolean' },
9
+ emoji: { control: 'text' },
10
+ hasBox: { control: 'boolean' },
11
+ size: {
12
+ control: 'select',
13
+ options: [
14
+ '2xs',
15
+ 'xs',
16
+ 'sm',
17
+ 'base',
18
+ 'lg',
19
+ 'xl',
20
+ '2xl',
21
+ '3xl',
22
+ '4xl',
23
+ ] satisfies BaseSize[],
24
+ },
25
+ },
26
+ } satisfies Meta<typeof BaseEmoji>
27
+
28
+ export const Default: StoryObj<typeof BaseEmoji> = { args: { emoji: '😀' } satisfies Partial<BaseEmoji> }
@@ -0,0 +1,49 @@
1
+ import BaseHeading from './BaseHeading.vue'
2
+
3
+ export default {
4
+ component: BaseHeading,
5
+ title: 'Bases/BaseHeading',
6
+
7
+ argTypes: {
8
+ alignment: {
9
+ control: 'select',
10
+ options: [
11
+ 'center',
12
+ 'left',
13
+ 'right',
14
+ ] satisfies BaseAlignment[],
15
+ },
16
+ size: {
17
+ control: 'select',
18
+ options: [
19
+ 'xs',
20
+ 'sm',
21
+ 'base',
22
+ 'lg',
23
+ 'xl',
24
+ ] satisfies BaseHeadingSize[],
25
+ },
26
+ tag: {
27
+ control: 'select',
28
+ options: [
29
+ 'h1',
30
+ 'h2',
31
+ 'h3',
32
+ 'h4',
33
+ 'h5',
34
+ 'h6',
35
+ ] satisfies BaseHeadingTag[],
36
+ },
37
+ },
38
+ } satisfies Meta<typeof BaseHeading>
39
+
40
+ export const Default: StoryObj<typeof BaseHeading> = {
41
+ args: { tag: 'h1' } satisfies Partial<BaseHeading>,
42
+ render: args => ({
43
+ components: { BaseHeading },
44
+ setup() {
45
+ return { args }
46
+ },
47
+ template: '<BaseHeading v-bind="args">Heading Text</BaseHeading>',
48
+ }),
49
+ }
@@ -0,0 +1,56 @@
1
+ import BaseIcon from './BaseIcon.vue'
2
+
3
+ export default {
4
+ component: BaseIcon,
5
+ title: 'Bases/BaseIcon',
6
+
7
+ argTypes: {
8
+ bold: { control: 'boolean' },
9
+ clickable: { control: 'boolean' },
10
+ color: {
11
+ control: 'select',
12
+ options: [
13
+ 'black',
14
+ 'gray',
15
+ 'green',
16
+ 'indigo',
17
+ 'orange',
18
+ 'red',
19
+ 'white',
20
+ ] satisfies BaseColor[],
21
+ },
22
+ confirmation: { control: 'boolean' },
23
+ icon: { control: 'text' },
24
+ loading: { control: 'boolean' },
25
+ reverse: { control: 'boolean' },
26
+ size: {
27
+ control: 'select',
28
+ options: [
29
+ '2xs',
30
+ 'xs',
31
+ 'sm',
32
+ 'base',
33
+ 'lg',
34
+ 'xl',
35
+ '2xl',
36
+ '3xl',
37
+ '4xl',
38
+ ] satisfies BaseSize[],
39
+ },
40
+ status: {
41
+ control: 'select',
42
+ options: [
43
+ 'error',
44
+ 'info',
45
+ 'success',
46
+ 'warning',
47
+ ] satisfies BaseStatus[],
48
+ },
49
+ text: { control: 'text' },
50
+ truncate: { control: 'boolean' },
51
+ underline: { control: 'boolean' },
52
+ uppercase: { control: 'boolean' },
53
+ },
54
+ } satisfies Meta<typeof BaseIcon>
55
+
56
+ export const Default: StoryObj<typeof BaseIcon> = { args: { text: 'Icon Text' } satisfies Partial<BaseIcon> }
@@ -0,0 +1,20 @@
1
+ import BaseMessage from './BaseMessage.vue'
2
+
3
+ export default {
4
+ component: BaseMessage,
5
+ title: 'Bases/BaseMessage',
6
+
7
+ argTypes: {
8
+ bordered: { control: 'boolean' },
9
+ description: { control: 'text' },
10
+ legend: { control: 'text' },
11
+ title: { control: 'text' },
12
+ },
13
+ } satisfies Meta<typeof BaseMessage>
14
+
15
+ export const Default: StoryObj<typeof BaseMessage> = {
16
+ args: {
17
+ description: 'This is a message description',
18
+ title: 'Message Title',
19
+ } satisfies Partial<BaseMessage>,
20
+ }
@@ -0,0 +1,39 @@
1
+ import BaseMetric from './BaseMetric.vue'
2
+
3
+ export default {
4
+ component: BaseMetric,
5
+ title: 'Bases/BaseMetric',
6
+
7
+ argTypes: {
8
+ alignment: {
9
+ control: 'select',
10
+ options: [
11
+ 'center',
12
+ 'left',
13
+ 'right',
14
+ ] satisfies BaseMetricAlignment[],
15
+ },
16
+ performance: {
17
+ control: 'select',
18
+ options: [
19
+ 'down',
20
+ 'equal',
21
+ 'up',
22
+ ] satisfies BaseMetricPerformance[],
23
+ },
24
+ performanceTooltip: { control: 'text' },
25
+ size: {
26
+ control: 'select',
27
+ options: ['sm', 'base'] satisfies BaseMetricSize[],
28
+ },
29
+ title: { control: 'text' },
30
+ value: { control: 'text' },
31
+ },
32
+ } satisfies Meta<typeof BaseMetric>
33
+
34
+ export const Default: StoryObj<typeof BaseMetric> = {
35
+ args: {
36
+ title: 'Metric Title',
37
+ value: '100',
38
+ } satisfies Partial<BaseMetric>,
39
+ }
@@ -0,0 +1,30 @@
1
+ import BaseOverlay from './BaseOverlay.vue'
2
+
3
+ export default {
4
+ component: BaseOverlay,
5
+ title: 'Bases/BaseOverlay',
6
+
7
+ argTypes: {
8
+ active: { control: 'boolean' },
9
+ clickable: { control: 'boolean' },
10
+ fixed: { control: 'boolean' },
11
+ hasClose: { control: 'boolean' },
12
+ opacity: {
13
+ control: 'select',
14
+ options: [
15
+ 0,
16
+ 25,
17
+ 50,
18
+ 75,
19
+ 95,
20
+ 100,
21
+ ] satisfies BaseOverlayOpacity[],
22
+ },
23
+ position: {
24
+ control: 'select',
25
+ options: ['absolute', 'fixed'] satisfies BaseOverlayPosition[],
26
+ },
27
+ },
28
+ } satisfies Meta<typeof BaseOverlay>
29
+
30
+ export const Default: StoryObj<typeof BaseOverlay> = { args: { active: true } satisfies Partial<BaseOverlay> }
@@ -0,0 +1,36 @@
1
+ import BaseParagraph from './BaseParagraph.vue'
2
+
3
+ export default {
4
+ component: BaseParagraph,
5
+ title: 'Bases/BaseParagraph',
6
+
7
+ argTypes: {
8
+ alignment: {
9
+ control: 'select',
10
+ options: [
11
+ 'center',
12
+ 'left',
13
+ 'right',
14
+ ] satisfies BaseParagraphAlignment[],
15
+ },
16
+ size: {
17
+ control: 'select',
18
+ options: [
19
+ 'sm',
20
+ 'base',
21
+ 'lg',
22
+ ] satisfies BaseParagraphSize[],
23
+ },
24
+ },
25
+ } satisfies Meta<typeof BaseParagraph>
26
+
27
+ export const Default: StoryObj<typeof BaseParagraph> = {
28
+ args: {},
29
+ render: args => ({
30
+ components: { BaseParagraph },
31
+ setup() {
32
+ return { args }
33
+ },
34
+ template: '<BaseParagraph v-bind="args">This is a paragraph text.</BaseParagraph>',
35
+ }),
36
+ }
@@ -0,0 +1,59 @@
1
+ import BasePower from './BasePower.vue'
2
+
3
+ export default {
4
+ component: BasePower,
5
+ title: 'Bases/BasePower',
6
+
7
+ argTypes: {
8
+ animated: { control: 'boolean' },
9
+ power: {
10
+ control: 'select',
11
+ options: [
12
+ '401',
13
+ '404',
14
+ '500',
15
+ 'angry',
16
+ 'bag',
17
+ 'bank',
18
+ 'book',
19
+ 'browser',
20
+ 'chair',
21
+ 'christmas',
22
+ 'city',
23
+ 'city-bis',
24
+ 'coffee',
25
+ 'computer-book',
26
+ 'computer-coffee',
27
+ 'dead',
28
+ 'easter',
29
+ 'hourglass',
30
+ 'invite',
31
+ 'ko',
32
+ 'love',
33
+ 'magic',
34
+ 'popcorn',
35
+ 'radar',
36
+ 'rocket',
37
+ 'smiling',
38
+ 'social-networks',
39
+ 'starwars',
40
+ 'teach',
41
+ 'typewriter',
42
+ 'website',
43
+ 'welcome',
44
+ 'writer',
45
+ ] satisfies BasePowerPower[],
46
+ },
47
+ size: {
48
+ control: 'select',
49
+ options: [
50
+ 'xs',
51
+ 'sm',
52
+ 'base',
53
+ 'lg',
54
+ ] satisfies BasePowerSize[],
55
+ },
56
+ },
57
+ } satisfies Meta<typeof BasePower>
58
+
59
+ export const Default: StoryObj<typeof BasePower> = { args: { power: 'rocket' } satisfies Partial<BasePower> }
@@ -0,0 +1,63 @@
1
+ import BaseQuote from './BaseQuote.vue'
2
+
3
+ export default {
4
+ component: BaseQuote,
5
+ title: 'Bases/BaseQuote',
6
+
7
+ argTypes: {
8
+ background: {
9
+ control: 'select',
10
+ options: [
11
+ 'gray',
12
+ 'gray-light',
13
+ 'white',
14
+ ] satisfies BaseQuoteBackground[],
15
+ },
16
+ character: {
17
+ control: 'select',
18
+ options: [
19
+ 'anthony',
20
+ 'julien',
21
+ 'mathieu',
22
+ 'nada',
23
+ 'power',
24
+ 'yoda',
25
+ ] satisfies BaseCharacterCharacter[],
26
+ },
27
+ clickable: { control: 'boolean' },
28
+ closingId: { control: 'text' },
29
+ forceSlot: { control: 'boolean' },
30
+ hasClose: { control: 'boolean' },
31
+ hideCharacterOnMobile: { control: 'boolean' },
32
+ noMargin: { control: 'boolean' },
33
+ reverse: { control: 'boolean' },
34
+ size: {
35
+ control: 'select',
36
+ options: [
37
+ 'xs',
38
+ 'sm',
39
+ 'base',
40
+ ] satisfies BaseQuoteSize[],
41
+ },
42
+ status: {
43
+ control: 'select',
44
+ options: [
45
+ 'error',
46
+ 'info',
47
+ 'success',
48
+ 'warning',
49
+ ] satisfies BaseStatus[],
50
+ },
51
+ },
52
+ } satisfies Meta<typeof BaseQuote>
53
+
54
+ export const Default: StoryObj<typeof BaseQuote> = {
55
+ args: {},
56
+ render: args => ({
57
+ components: { BaseQuote },
58
+ setup() {
59
+ return { args }
60
+ },
61
+ template: '<BaseQuote v-bind="args">This is a quote text.</BaseQuote>',
62
+ }),
63
+ }
@@ -0,0 +1,42 @@
1
+ import BaseSpinner from './BaseSpinner.vue'
2
+
3
+ export default {
4
+ component: BaseSpinner,
5
+ title: 'Bases/BaseSpinner',
6
+
7
+ argTypes: {
8
+ clickable: { control: 'boolean' },
9
+ color: {
10
+ control: 'select',
11
+ options: [
12
+ 'black',
13
+ 'gray',
14
+ 'green',
15
+ 'indigo',
16
+ 'orange',
17
+ 'red',
18
+ 'white',
19
+ ] satisfies BaseColor[],
20
+ },
21
+ id: { control: 'text' },
22
+ reverse: { control: 'boolean' },
23
+ size: {
24
+ control: 'select',
25
+ options: [
26
+ '2xs',
27
+ 'xs',
28
+ 'sm',
29
+ 'base',
30
+ 'lg',
31
+ 'xl',
32
+ '2xl',
33
+ '3xl',
34
+ '4xl',
35
+ ] satisfies BaseSize[],
36
+ },
37
+ text: { control: 'text' },
38
+ uppercase: { control: 'boolean' },
39
+ },
40
+ } satisfies Meta<typeof BaseSpinner>
41
+
42
+ export const Default: StoryObj<typeof BaseSpinner> = { args: { text: 'Loading...' } satisfies Partial<BaseSpinner> }
@@ -0,0 +1,44 @@
1
+ import BaseTag from './BaseTag.vue'
2
+
3
+ export default {
4
+ component: BaseTag,
5
+ title: 'Bases/BaseTag',
6
+
7
+ argTypes: {
8
+ active: { control: 'boolean' },
9
+ avatar: { control: 'text' },
10
+ circle: { control: 'text' },
11
+ clickable: { control: 'boolean' },
12
+ color: {
13
+ control: 'select',
14
+ options: [
15
+ 'black',
16
+ 'gray',
17
+ 'green',
18
+ 'indigo',
19
+ 'orange',
20
+ 'red',
21
+ 'white',
22
+ ] satisfies BaseColor[],
23
+ },
24
+ draggable: { control: 'boolean' },
25
+ editable: { control: 'boolean' },
26
+ icon: { control: 'text' },
27
+ iconSize: { control: 'number' },
28
+ id: { control: 'number' },
29
+ isCreation: { control: 'boolean' },
30
+ light: { control: 'boolean' },
31
+ order: { control: 'number' },
32
+ removable: { control: 'boolean' },
33
+ rounded: { control: 'boolean' },
34
+ size: {
35
+ control: 'select',
36
+ options: ['sm', 'base'] satisfies BaseTagSize[],
37
+ },
38
+ text: { control: 'text' },
39
+ truncate: { control: 'boolean' },
40
+ uppercase: { control: 'boolean' },
41
+ },
42
+ } satisfies Meta<typeof BaseTag>
43
+
44
+ export const Default: StoryObj<typeof BaseTag> = { args: { text: 'Tag' } satisfies Partial<BaseTag> }
@@ -0,0 +1,42 @@
1
+ import BaseTags from './BaseTags.vue'
2
+
3
+ export default {
4
+ component: BaseTags,
5
+ title: 'Bases/BaseTags',
6
+
7
+ argTypes: {
8
+ active: { control: 'boolean' },
9
+ clickable: { control: 'boolean' },
10
+ draggable: { control: 'boolean' },
11
+ editable: { control: 'boolean' },
12
+ hasBack: { control: 'boolean' },
13
+ hasCreation: { control: 'boolean' },
14
+ maxTags: { control: 'number' },
15
+ modelValue: { control: 'object' },
16
+ removable: { control: 'boolean' },
17
+ selectable: { control: 'boolean' },
18
+ selectableUnique: { control: 'boolean' },
19
+ size: {
20
+ control: 'select',
21
+ options: ['sm', 'base'] satisfies BaseTagSize[],
22
+ },
23
+ tags: { control: 'object' },
24
+ wrap: { control: 'boolean' },
25
+ },
26
+ } satisfies Meta<typeof BaseTags>
27
+
28
+ export const Default: StoryObj<typeof BaseTags> = {
29
+ args: {
30
+ modelValue: [],
31
+ tags: [
32
+ {
33
+ id: 1,
34
+ text: 'Tag 1',
35
+ },
36
+ {
37
+ id: 2,
38
+ text: 'Tag 2',
39
+ },
40
+ ],
41
+ } satisfies Partial<BaseTags>,
42
+ }
@@ -0,0 +1,48 @@
1
+ import BaseText from './BaseText.vue'
2
+
3
+ export default {
4
+ component: BaseText,
5
+ title: 'Bases/BaseText',
6
+
7
+ argTypes: {
8
+ alignment: {
9
+ control: 'select',
10
+ options: [
11
+ 'center',
12
+ 'left',
13
+ 'right',
14
+ ] satisfies BaseAlignment[],
15
+ },
16
+ background: {
17
+ control: 'select',
18
+ options: ['gray', 'white'] satisfies BaseBackground[],
19
+ },
20
+ block: { control: 'boolean' },
21
+ bold: { control: 'boolean' },
22
+ hasMargin: { control: 'boolean' },
23
+ maxCharacters: { control: 'number' },
24
+ noWrap: { control: 'boolean' },
25
+ reverse: { control: 'boolean' },
26
+ size: {
27
+ control: 'select',
28
+ options: [
29
+ '2xs',
30
+ 'xs',
31
+ 'sm',
32
+ 'base',
33
+ 'lg',
34
+ 'xl',
35
+ '2xl',
36
+ '3xl',
37
+ '4xl',
38
+ ] satisfies BaseSize[],
39
+ },
40
+ skeleton: { control: 'boolean' },
41
+ text: { control: 'text' },
42
+ truncate: { control: 'boolean' },
43
+ underline: { control: 'boolean' },
44
+ uppercase: { control: 'boolean' },
45
+ },
46
+ } satisfies Meta<typeof BaseText>
47
+
48
+ export const Default: StoryObj<typeof BaseText> = { args: { text: 'Text content' } satisfies Partial<BaseText> }
@@ -0,0 +1,29 @@
1
+ import BaseToast from './BaseToast.vue'
2
+
3
+ export default {
4
+ component: BaseToast,
5
+ title: 'Bases/BaseToast',
6
+
7
+ argTypes: {
8
+ hasClose: { control: 'boolean' },
9
+ id: { control: 'text' },
10
+ status: {
11
+ control: 'select',
12
+ options: [
13
+ 'error',
14
+ 'info',
15
+ 'success',
16
+ 'warning',
17
+ ] satisfies BaseStatus[],
18
+ },
19
+ text: { control: 'text' },
20
+ },
21
+ } satisfies Meta<typeof BaseToast>
22
+
23
+ export const Default: StoryObj<typeof BaseToast> = {
24
+ args: {
25
+ id: 'toast-1',
26
+ status: 'info',
27
+ text: 'Toast message',
28
+ } satisfies Partial<BaseToast>,
29
+ }
@@ -0,0 +1,36 @@
1
+ import FieldCheckbox from './FieldCheckbox.vue'
2
+
3
+ export default {
4
+ component: FieldCheckbox,
5
+ title: 'Fields/FieldCheckbox',
6
+
7
+ argTypes: {
8
+ description: { control: 'text' },
9
+ disabled: { control: 'boolean' },
10
+ fullWidth: { control: 'boolean' },
11
+ hideError: { control: 'boolean' },
12
+ label: { control: 'text' },
13
+ labelIcon: { control: 'text' },
14
+ lineThrough: { control: 'boolean' },
15
+ loading: { control: 'boolean' },
16
+ required: { control: 'boolean' },
17
+ size: {
18
+ control: 'select',
19
+ options: [
20
+ 'xs',
21
+ 'sm',
22
+ 'base',
23
+ 'lg',
24
+ ] satisfies FieldSize[],
25
+ },
26
+ truncate: { control: 'boolean' },
27
+ uppercase: { control: 'boolean' },
28
+ },
29
+ } satisfies Meta<typeof FieldCheckbox>
30
+
31
+ export const Default: StoryObj<typeof FieldCheckbox> = {
32
+ args: {
33
+ label: 'Checkbox Label',
34
+ modelValue: false,
35
+ } satisfies Partial<FieldCheckbox>,
36
+ }
@@ -0,0 +1,10 @@
1
+ import FieldDays from './FieldDays.vue'
2
+
3
+ export default {
4
+ component: FieldDays,
5
+ title: 'Fields/FieldDays',
6
+
7
+ argTypes: {},
8
+ } satisfies Meta<typeof FieldDays>
9
+
10
+ export const Default: StoryObj<typeof FieldDays> = { args: { modelValue: [] } satisfies Partial<FieldDays> }
@@ -0,0 +1,10 @@
1
+ import FieldEmojis from './FieldEmojis.vue'
2
+
3
+ export default {
4
+ component: FieldEmojis,
5
+ title: 'Fields/FieldEmojis',
6
+
7
+ argTypes: {},
8
+ } satisfies Meta<typeof FieldEmojis>
9
+
10
+ export const Default: StoryObj<typeof FieldEmojis> = { args: { modelValue: '' } satisfies Partial<FieldEmojis> }
@@ -0,0 +1,80 @@
1
+ import FieldInput from './FieldInput.vue'
2
+
3
+ export default {
4
+ component: FieldInput,
5
+ title: 'Fields/FieldInput',
6
+
7
+ argTypes: {
8
+ alignment: {
9
+ control: 'select',
10
+ options: [
11
+ 'center',
12
+ 'left',
13
+ 'right',
14
+ ] satisfies BaseAlignment[],
15
+ },
16
+ autocomplete: { control: 'boolean' },
17
+ autofocus: { control: 'boolean' },
18
+ background: {
19
+ control: 'select',
20
+ options: ['gray', 'white'] satisfies FieldBackground[],
21
+ },
22
+ border: {
23
+ control: 'select',
24
+ options: [
25
+ 'bottom',
26
+ 'full',
27
+ 'none',
28
+ ] satisfies FieldInputBorder[],
29
+ },
30
+ description: { control: 'text' },
31
+ disabled: { control: 'boolean' },
32
+ fullWidth: { control: 'boolean' },
33
+ hideError: { control: 'boolean' },
34
+ label: { control: 'text' },
35
+ labelIcon: { control: 'text' },
36
+ lineThrough: { control: 'boolean' },
37
+ loading: { control: 'boolean' },
38
+ lowercaseOnly: { control: 'boolean' },
39
+ max: { control: 'number' },
40
+ min: { control: 'number' },
41
+ placeholder: { control: 'text' },
42
+ required: { control: 'boolean' },
43
+ size: {
44
+ control: 'select',
45
+ options: [
46
+ 'xs',
47
+ 'sm',
48
+ 'base',
49
+ 'lg',
50
+ ] satisfies FieldSize[],
51
+ },
52
+ type: {
53
+ control: 'select',
54
+ options: [
55
+ 'currency',
56
+ 'date',
57
+ 'datetime-local',
58
+ 'email',
59
+ 'month',
60
+ 'number',
61
+ 'password',
62
+ 'search',
63
+ 'tel',
64
+ 'text',
65
+ 'time',
66
+ 'url',
67
+ 'week',
68
+ ] satisfies FieldInputType[],
69
+ },
70
+ uppercase: { control: 'boolean' },
71
+ },
72
+ } satisfies Meta<typeof FieldInput>
73
+
74
+ export const Default: StoryObj<typeof FieldInput> = {
75
+ args: {
76
+ label: 'Input Label',
77
+ modelValue: '',
78
+ placeholder: 'Enter text...',
79
+ } satisfies Partial<FieldInput>,
80
+ }
@@ -0,0 +1,30 @@
1
+ import FieldLabel from './FieldLabel.vue'
2
+
3
+ export default {
4
+ component: FieldLabel,
5
+ title: 'Fields/FieldLabel',
6
+
7
+ argTypes: {
8
+ disabled: { control: 'boolean' },
9
+ forField: { control: 'text' },
10
+ hasMarginBottom: { control: 'boolean' },
11
+ hasMarginLeft: { control: 'boolean' },
12
+ icon: { control: 'text' },
13
+ label: { control: 'text' },
14
+ lineThrough: { control: 'boolean' },
15
+ loading: { control: 'boolean' },
16
+ required: { control: 'boolean' },
17
+ size: {
18
+ control: 'select',
19
+ options: [
20
+ 'xs',
21
+ 'sm',
22
+ 'base',
23
+ 'lg',
24
+ ] satisfies FieldSize[],
25
+ },
26
+ truncate: { control: 'boolean' },
27
+ },
28
+ } satisfies Meta<typeof FieldLabel>
29
+
30
+ export const Default: StoryObj<typeof FieldLabel> = { args: { label: 'Label Text' } satisfies Partial<FieldLabel> }
@@ -0,0 +1,22 @@
1
+ import FieldMessage from './FieldMessage.vue'
2
+
3
+ export default {
4
+ component: FieldMessage,
5
+ title: 'Fields/FieldMessage',
6
+
7
+ argTypes: {
8
+ description: { control: 'text' },
9
+ hideError: { control: 'boolean' },
10
+ size: {
11
+ control: 'select',
12
+ options: [
13
+ 'xs',
14
+ 'sm',
15
+ 'base',
16
+ 'lg',
17
+ ] satisfies FieldSize[],
18
+ },
19
+ },
20
+ } satisfies Meta<typeof FieldMessage>
21
+
22
+ export const Default: StoryObj<typeof FieldMessage> = { args: { description: 'This is a message' } satisfies Partial<FieldMessage> }
@@ -0,0 +1,73 @@
1
+ import FieldSelect from './FieldSelect.vue'
2
+
3
+ export default {
4
+ component: FieldSelect,
5
+ title: 'Fields/FieldSelect',
6
+
7
+ argTypes: {
8
+ border: {
9
+ control: 'select',
10
+ options: [
11
+ 'bottom',
12
+ 'full',
13
+ 'none',
14
+ ] satisfies FieldSelectBorder[],
15
+ },
16
+ caret: { control: 'boolean' },
17
+ columns: { control: 'object' },
18
+ description: { control: 'text' },
19
+ direction: {
20
+ control: 'select',
21
+ options: ['bottom', 'top'] satisfies FieldSelectDirection[],
22
+ },
23
+ disabled: { control: 'boolean' },
24
+ hideError: { control: 'boolean' },
25
+ label: { control: 'text' },
26
+ labelIcon: { control: 'text' },
27
+ maxHeight: {
28
+ control: 'select',
29
+ options: [
30
+ 'xs',
31
+ 'sm',
32
+ 'md',
33
+ 'lg',
34
+ ] satisfies FieldSelectMaxHeight[],
35
+ },
36
+ openOnHover: { control: 'boolean' },
37
+ options: { control: 'object' },
38
+ padding: { control: 'boolean' },
39
+ placeholder: { control: 'text' },
40
+ required: { control: 'boolean' },
41
+ size: {
42
+ control: 'select',
43
+ options: [
44
+ 'xs',
45
+ 'sm',
46
+ 'base',
47
+ 'lg',
48
+ ] satisfies FieldSize[],
49
+ },
50
+ },
51
+ } satisfies Meta<typeof FieldSelect>
52
+
53
+ export const Default: StoryObj<typeof FieldSelect> = {
54
+ args: {
55
+ label: 'Select Label',
56
+ modelValue: '',
57
+ options: [
58
+ {
59
+ text: 'Option 1',
60
+ value: '1',
61
+ },
62
+ {
63
+ text: 'Option 2',
64
+ value: '2',
65
+ },
66
+ {
67
+ text: 'Option 3',
68
+ value: '3',
69
+ },
70
+ ],
71
+ placeholder: 'Choose an option...',
72
+ } satisfies Partial<FieldSelect>,
73
+ }
@@ -0,0 +1,44 @@
1
+ import FieldTabs from './FieldTabs.vue'
2
+
3
+ export default {
4
+ component: FieldTabs,
5
+ title: 'Fields/FieldTabs',
6
+
7
+ argTypes: {
8
+ minimizeOnMobile: { control: 'boolean' },
9
+ size: {
10
+ control: 'select',
11
+ options: [
12
+ 'xs',
13
+ 'sm',
14
+ 'base',
15
+ 'lg',
16
+ ] satisfies FieldSize[],
17
+ },
18
+ tabs: { control: 'object' },
19
+ theme: {
20
+ control: 'select',
21
+ options: ['border', 'rounded'] satisfies FieldTabsTheme[],
22
+ },
23
+ },
24
+ } satisfies Meta<typeof FieldTabs>
25
+
26
+ export const Default: StoryObj<typeof FieldTabs> = {
27
+ args: {
28
+ modelValue: 'tab1',
29
+ tabs: [
30
+ {
31
+ label: 'Tab 1',
32
+ value: 'tab1',
33
+ },
34
+ {
35
+ label: 'Tab 2',
36
+ value: 'tab2',
37
+ },
38
+ {
39
+ label: 'Tab 3',
40
+ value: 'tab3',
41
+ },
42
+ ],
43
+ } satisfies Partial<FieldTabs>,
44
+ }
@@ -0,0 +1,44 @@
1
+ import FieldTextarea from './FieldTextarea.vue'
2
+
3
+ export default {
4
+ component: FieldTextarea,
5
+ title: 'Fields/FieldTextarea',
6
+
7
+ argTypes: {
8
+ autofocus: { control: 'boolean' },
9
+ background: {
10
+ control: 'select',
11
+ options: ['gray', 'white'] satisfies FieldBackground[],
12
+ },
13
+ border: { control: 'boolean' },
14
+ description: { control: 'text' },
15
+ disabled: { control: 'boolean' },
16
+ fullWidth: { control: 'boolean' },
17
+ hideError: { control: 'boolean' },
18
+ label: { control: 'text' },
19
+ labelIcon: { control: 'text' },
20
+ loading: { control: 'boolean' },
21
+ padding: { control: 'boolean' },
22
+ placeholder: { control: 'text' },
23
+ required: { control: 'boolean' },
24
+ resize: { control: 'boolean' },
25
+ rows: { control: 'number' },
26
+ size: {
27
+ control: 'select',
28
+ options: [
29
+ 'xs',
30
+ 'sm',
31
+ 'base',
32
+ 'lg',
33
+ ] satisfies FieldSize[],
34
+ },
35
+ },
36
+ } satisfies Meta<typeof FieldTextarea>
37
+
38
+ export const Default: StoryObj<typeof FieldTextarea> = {
39
+ args: {
40
+ label: 'Textarea Label',
41
+ modelValue: '',
42
+ placeholder: 'Enter text...',
43
+ } satisfies Partial<FieldTextarea>,
44
+ }
@@ -0,0 +1,39 @@
1
+ import FieldTime from './FieldTime.vue'
2
+
3
+ export default {
4
+ component: FieldTime,
5
+ title: 'Fields/FieldTime',
6
+
7
+ argTypes: {
8
+ background: {
9
+ control: 'select',
10
+ options: ['gray', 'white'] satisfies FieldBackground[],
11
+ },
12
+ description: { control: 'text' },
13
+ disabled: { control: 'boolean' },
14
+ hideError: { control: 'boolean' },
15
+ icon: { control: 'text' },
16
+ id: { control: 'text' },
17
+ label: { control: 'text' },
18
+ labelIcon: { control: 'text' },
19
+ name: { control: 'text' },
20
+ required: { control: 'boolean' },
21
+ size: {
22
+ control: 'select',
23
+ options: [
24
+ 'xs',
25
+ 'sm',
26
+ 'base',
27
+ 'lg',
28
+ ] satisfies FieldSize[],
29
+ },
30
+ },
31
+ } satisfies Meta<typeof FieldTime>
32
+
33
+ export const Default: StoryObj<typeof FieldTime> = {
34
+ args: {
35
+ id: 'time-1',
36
+ label: 'Time Label',
37
+ modelValue: '',
38
+ } satisfies Partial<FieldTime>,
39
+ }
@@ -0,0 +1,8 @@
1
+ import LayoutToasts from './LayoutToasts.vue'
2
+
3
+ export default {
4
+ component: LayoutToasts,
5
+ title: 'Layout/LayoutToasts',
6
+ } satisfies Meta<typeof LayoutToasts>
7
+
8
+ export const Default: StoryObj<typeof LayoutToasts> = { args: {} }
@@ -334,7 +334,7 @@ export interface BaseTags {
334
334
 
335
335
  export interface BaseText {
336
336
  alignment?: BaseAlignment
337
- background?: BaseTextBackground
337
+ background?: BaseBackground
338
338
  block?: boolean
339
339
  bold?: boolean
340
340
  hasMargin?: boolean
@@ -15,6 +15,7 @@ declare global {
15
15
  type LayerIconValue = LayerIconValueType
16
16
 
17
17
  // Bases
18
+ type BaseAlignment = Bases.BaseAlignment
18
19
  type BaseBackground = Bases.BaseBackground
19
20
  type BaseColor = Bases.BaseColor
20
21
  type BaseSize = Bases.BaseSize
@@ -97,7 +98,9 @@ declare global {
97
98
  type ChartistLineChartData = import('chartist').LineChartData
98
99
  type ChartistOptions = import('chartist').Options
99
100
  type ChartistPieChartData = import('chartist').PieChartData
101
+ type Meta<T> = import('@nuxtjs/storybook').Meta<T>
100
102
  type RouteLocationNamedI18n = import('vue-router').RouteLocationNamedI18n
103
+ type StoryObj<T> = import('@nuxtjs/storybook').StoryObj<T>
101
104
  type VuelidateValidation = import('@vuelidate/core').BaseValidation
102
105
 
103
106
  // Navigator
package/nuxt.config.ts CHANGED
@@ -56,6 +56,7 @@ export default defineNuxtConfig({
56
56
  '@nuxtjs/plausible',
57
57
  '@nuxtjs/robots',
58
58
  '@nuxtjs/sitemap',
59
+ '@nuxtjs/storybook',
59
60
  '@pinia/nuxt',
60
61
  '@unocss/nuxt',
61
62
  '@vueuse/nuxt',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
3
  "type": "module",
4
- "version": "0.1.79",
4
+ "version": "0.1.80",
5
5
  "private": false,
6
6
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
7
7
  "license": "MIT",
@@ -33,6 +33,7 @@
33
33
  "@nuxtjs/plausible": "2.0.1",
34
34
  "@nuxtjs/robots": "5.5.6",
35
35
  "@nuxtjs/sitemap": "7.4.7",
36
+ "@nuxtjs/storybook": "9.0.1",
36
37
  "@pinia/nuxt": "0.11.2",
37
38
  "@unocss/nuxt": "66.5.4",
38
39
  "@unocss/reset": "66.5.10",
@@ -47,6 +48,7 @@
47
48
  "motion-v": "1.7.4",
48
49
  "numbro": "2.5.0",
49
50
  "snarkdown": "2.0.0",
51
+ "storybook": "9.0.5",
50
52
  "unocss": "66.5.4",
51
53
  "vue": "3.5.22",
52
54
  "vue-router": "4.6.3"
@@ -59,6 +61,7 @@
59
61
  "scripts": {
60
62
  "dev": "nuxi dev",
61
63
  "lint": "eslint .",
64
+ "storybook": "storybook dev",
62
65
  "typecheck": "nuxi typecheck"
63
66
  }
64
67
  }