@saasmakers/ui 1.4.36 → 1.4.38
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/app/components/bases/BaseButton.vue +1 -2
- package/app/components/bases/BaseMessage.vue +1 -1
- package/app/components/bases/BaseMetric.vue +2 -2
- package/app/components/fields/FieldSelect.vue +2 -2
- package/app/types/global.d.ts +0 -2
- package/nuxt.config.ts +0 -1
- package/package.json +11 -14
- package/app/components/bases/BaseAlert.stories.ts +0 -42
- package/app/components/bases/BaseAvatar.stories.ts +0 -18
- package/app/components/bases/BaseBordered.stories.ts +0 -22
- package/app/components/bases/BaseButton.stories.ts +0 -81
- package/app/components/bases/BaseCharacter.stories.ts +0 -31
- package/app/components/bases/BaseChart.stories.ts +0 -20
- package/app/components/bases/BaseDivider.stories.ts +0 -36
- package/app/components/bases/BaseEmoji.stories.ts +0 -28
- package/app/components/bases/BaseHeading.stories.ts +0 -49
- package/app/components/bases/BaseIcon.stories.ts +0 -56
- package/app/components/bases/BaseMessage.stories.ts +0 -35
- package/app/components/bases/BaseMetric.stories.ts +0 -39
- package/app/components/bases/BaseOverlay.stories.ts +0 -30
- package/app/components/bases/BaseParagraph.stories.ts +0 -36
- package/app/components/bases/BasePower.stories.ts +0 -58
- package/app/components/bases/BaseQuote.stories.ts +0 -63
- package/app/components/bases/BaseShortcut.stories.ts +0 -24
- package/app/components/bases/BaseSpinner.stories.ts +0 -42
- package/app/components/bases/BaseTag.stories.ts +0 -44
- package/app/components/bases/BaseTags.stories.ts +0 -42
- package/app/components/bases/BaseText.stories.ts +0 -47
- package/app/components/bases/BaseToast.stories.ts +0 -70
- package/app/components/fields/FieldAvatar.stories.ts +0 -37
- package/app/components/fields/FieldCheckbox.stories.ts +0 -36
- package/app/components/fields/FieldDays.stories.ts +0 -10
- package/app/components/fields/FieldEmojis.stories.ts +0 -10
- package/app/components/fields/FieldInput.stories.ts +0 -100
- package/app/components/fields/FieldLabel.stories.ts +0 -30
- package/app/components/fields/FieldMessage.stories.ts +0 -22
- package/app/components/fields/FieldSelect.stories.ts +0 -73
- package/app/components/fields/FieldTabs.stories.ts +0 -44
- package/app/components/fields/FieldTextarea.stories.ts +0 -44
- package/app/components/fields/FieldTime.stories.ts +0 -37
- package/app/components/layout/LayoutToasts.stories.ts +0 -8
|
@@ -58,7 +58,6 @@ function onClick(event: MouseEvent) {
|
|
|
58
58
|
:is="to ? NuxtLinkLocale : 'button'"
|
|
59
59
|
class="relative inline-block select-none appearance-none border focus-visible:outline-none"
|
|
60
60
|
:class="{
|
|
61
|
-
'inline-block': !circular,
|
|
62
61
|
'flex items-center justify-center': circular,
|
|
63
62
|
'cursor-not-allowed opacity-50': disabled,
|
|
64
63
|
'cursor-wait': loading,
|
|
@@ -131,7 +130,7 @@ function onClick(event: MouseEvent) {
|
|
|
131
130
|
|
|
132
131
|
<BaseSpinner
|
|
133
132
|
v-if="loading"
|
|
134
|
-
class="absolute left-1/2 top-1/2
|
|
133
|
+
class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
135
134
|
:color="!background ? 'black' : light ? color : color === 'white' ? 'indigo' : 'white'"
|
|
136
135
|
:size="size"
|
|
137
136
|
/>
|
|
@@ -36,7 +36,7 @@ const performanceIcon = computed<string | undefined>(() => {
|
|
|
36
36
|
:class="{
|
|
37
37
|
'items-start': alignment === 'left',
|
|
38
38
|
'items-center': alignment === 'center',
|
|
39
|
-
'items-
|
|
39
|
+
'items-end': alignment === 'right',
|
|
40
40
|
}"
|
|
41
41
|
>
|
|
42
42
|
<BaseText
|
|
@@ -62,7 +62,7 @@ const performanceIcon = computed<string | undefined>(() => {
|
|
|
62
62
|
|
|
63
63
|
<BaseIcon
|
|
64
64
|
v-if="performanceIcon"
|
|
65
|
-
class="absolute right-0 translate-x-4
|
|
65
|
+
class="absolute right-0 translate-x-4"
|
|
66
66
|
:class="{
|
|
67
67
|
'-mt-0.5': performance === 'down',
|
|
68
68
|
'mt-0.25': performance === 'up',
|
|
@@ -267,7 +267,7 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
267
267
|
<BaseIcon
|
|
268
268
|
v-if="caret"
|
|
269
269
|
class="ml-2 flex-initial"
|
|
270
|
-
:class="{ 'rotate-180
|
|
270
|
+
:class="{ 'rotate-180': opened }"
|
|
271
271
|
color="gray"
|
|
272
272
|
:icon="getIcon('arrowDown')"
|
|
273
273
|
/>
|
|
@@ -344,7 +344,7 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
344
344
|
<div
|
|
345
345
|
v-for="option in column.options"
|
|
346
346
|
:key="option.value"
|
|
347
|
-
class="
|
|
347
|
+
class="flex cursor-pointer items-center outline-none"
|
|
348
348
|
:class="{
|
|
349
349
|
'border-b border-gray-200 dark:border-gray-800 p-3 hover:bg-gray-100 dark:hover:bg-gray-800 last:border-b-0': computedColumns.length < 2,
|
|
350
350
|
'px-2 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 last:mb-2': computedColumns.length >= 2,
|
package/app/types/global.d.ts
CHANGED
|
@@ -93,7 +93,6 @@ declare global {
|
|
|
93
93
|
// Project
|
|
94
94
|
type LayerIconIcon = import('../composables/useLayerIcons').LayerIconIcon
|
|
95
95
|
type LayerIconValue = import('../composables/useLayerIcons').LayerIconValue
|
|
96
|
-
type Meta<T> = import('@nuxtjs/storybook').Meta<T>
|
|
97
96
|
|
|
98
97
|
// Navigator
|
|
99
98
|
interface Navigator {
|
|
@@ -108,7 +107,6 @@ declare global {
|
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
type RouteLocationNamedI18n = import('vue-router').RouteLocationNamedI18n
|
|
111
|
-
type StoryObj<T> = import('@nuxtjs/storybook').StoryObj<T>
|
|
112
110
|
type VuelidateValidation = import('@vuelidate/core').BaseValidation
|
|
113
111
|
}
|
|
114
112
|
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.38",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Reusable Nuxt UI components for SaaS Makers projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,32 +18,30 @@
|
|
|
18
18
|
"uno.config.ts"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@capacitor/preferences": "8.0.
|
|
22
|
-
"@nuxt/icon": "2.
|
|
21
|
+
"@capacitor/preferences": "8.0.1",
|
|
22
|
+
"@nuxt/icon": "2.2.3",
|
|
23
23
|
"@nuxt/scripts": "0.13.2",
|
|
24
24
|
"@nuxtjs/color-mode": "3.5.2",
|
|
25
|
-
"@nuxtjs/i18n": "10.
|
|
25
|
+
"@nuxtjs/i18n": "10.4.0",
|
|
26
26
|
"@nuxtjs/plausible": "2.0.1",
|
|
27
27
|
"@nuxtjs/robots": "5.6.7",
|
|
28
28
|
"@nuxtjs/sitemap": "7.5.0",
|
|
29
|
-
"@nuxtjs/storybook": "9.0.1",
|
|
30
29
|
"@pinia/nuxt": "0.11.3",
|
|
31
30
|
"@unhead/vue": "2.0.19",
|
|
32
|
-
"@unocss/nuxt": "66.
|
|
33
|
-
"@unocss/reset": "66.
|
|
31
|
+
"@unocss/nuxt": "66.7.0",
|
|
32
|
+
"@unocss/reset": "66.7.0",
|
|
34
33
|
"@vuelidate/core": "2.0.3",
|
|
35
34
|
"@vuelidate/validators": "2.0.4",
|
|
36
|
-
"@vueuse/components": "14.
|
|
37
|
-
"@vueuse/core": "14.
|
|
38
|
-
"@vueuse/nuxt": "14.
|
|
35
|
+
"@vueuse/components": "14.3.0",
|
|
36
|
+
"@vueuse/core": "14.3.0",
|
|
37
|
+
"@vueuse/nuxt": "14.3.0",
|
|
39
38
|
"chartist": "1.5.0",
|
|
40
39
|
"floating-vue": "5.2.2",
|
|
41
40
|
"motion-v": "1.7.4",
|
|
42
41
|
"numbro": "2.5.0",
|
|
43
42
|
"snarkdown": "2.0.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"vue": "3.5.26",
|
|
43
|
+
"unocss": "66.7.0",
|
|
44
|
+
"vue": "3.5.35",
|
|
47
45
|
"vue-router": "4.6.4"
|
|
48
46
|
},
|
|
49
47
|
"devDependencies": {
|
|
@@ -59,7 +57,6 @@
|
|
|
59
57
|
"access": "public"
|
|
60
58
|
},
|
|
61
59
|
"scripts": {
|
|
62
|
-
"dev": "storybook dev -p 3104 --no-open",
|
|
63
60
|
"lint": "eslint . --max-warnings=0",
|
|
64
61
|
"typecheck": "nuxi typecheck"
|
|
65
62
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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> }
|
|
@@ -1,22 +0,0 @@
|
|
|
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> }
|
|
@@ -1,81 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
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> }
|
|
@@ -1,20 +0,0 @@
|
|
|
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> }
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
hideNext: { control: 'boolean' },
|
|
17
|
-
hidePrevious: { control: 'boolean' },
|
|
18
|
-
loading: { control: 'boolean' },
|
|
19
|
-
margin: { control: 'number' },
|
|
20
|
-
navigable: { control: 'boolean' },
|
|
21
|
-
size: {
|
|
22
|
-
control: 'select',
|
|
23
|
-
options: ['sm', 'base'] satisfies BaseDividerSize[],
|
|
24
|
-
},
|
|
25
|
-
title: { control: 'text' },
|
|
26
|
-
},
|
|
27
|
-
} satisfies Meta<typeof BaseDivider>
|
|
28
|
-
|
|
29
|
-
export const Default: StoryObj<typeof BaseDivider> = { args: { title: 'Divider Title' } satisfies Partial<BaseDivider> }
|
|
30
|
-
|
|
31
|
-
export const Navigable: StoryObj<typeof BaseDivider> = {
|
|
32
|
-
args: {
|
|
33
|
-
navigable: true,
|
|
34
|
-
title: 'This week',
|
|
35
|
-
} satisfies Partial<BaseDivider>,
|
|
36
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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> }
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
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> }
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|
|
21
|
-
|
|
22
|
-
export const BorderedWithLegend: StoryObj<typeof BaseMessage> = {
|
|
23
|
-
args: {
|
|
24
|
-
bordered: true,
|
|
25
|
-
description: 'When you archive a habit, it will no longer appear in your main habits list. You can always unarchive it later if you change your mind.',
|
|
26
|
-
legend: 'Optional caption below the action',
|
|
27
|
-
title: 'Something went wrong',
|
|
28
|
-
} satisfies Partial<BaseMessage>,
|
|
29
|
-
decorators: [
|
|
30
|
-
story => ({
|
|
31
|
-
components: { story },
|
|
32
|
-
template: '<div class="mx-auto max-w-xs"><story /></div>',
|
|
33
|
-
}),
|
|
34
|
-
],
|
|
35
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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> }
|