@vc-shell/framework 1.0.181 → 1.0.182
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/CHANGELOG.md +9 -0
- package/dist/framework.js +5196 -5182
- package/dist/index.css +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -1
- package/dist/tailwind.config.d.ts +1 -2
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +1 -79
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts +389 -6
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts +2295 -5
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +1119 -5
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts +1778 -5
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts +51 -5
- package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts +37 -5
- package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts +62 -5
- package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts +103 -5
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts +101 -5
- package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts +103 -5
- package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.stories.d.ts +18 -5
- package/dist/ui/components/atoms/vc-loading/vc-loading.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts +85 -5
- package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.stories.d.ts +25 -5
- package/dist/ui/components/atoms/vc-row/vc-row.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +116 -5
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts +53 -5
- package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.stories.d.ts +59 -0
- package/dist/ui/components/atoms/vc-video/vc-video.stories.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts +42 -5
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +40 -5
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts +179 -5
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.stories.d.ts +12 -0
- package/dist/ui/components/molecules/vc-field/vc-field.stories.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +19 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts +182 -5
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +4 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts +29 -5
- package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts +347 -5
- package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts +354 -5
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts +889 -0
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts +74 -5
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts +498 -5
- package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts +2567 -5
- package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts +156 -5
- package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts +1297 -5
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +276 -5
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +82 -3
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/index.d.ts +1 -179
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts +209 -5
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +6 -3
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts +155 -6
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +0 -4
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +13 -8
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +1272 -5
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +6 -5
- package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +1 -0
- package/shared/components/popup-handler/composables/usePopup/index.ts +8 -7
- package/tailwind.config.ts +2 -46
- package/ui/components/atoms/vc-badge/index.ts +1 -13
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +48 -20
- package/ui/components/atoms/vc-button/vc-button.stories.ts +111 -19
- package/ui/components/atoms/vc-card/vc-card.stories.ts +96 -18
- package/ui/components/atoms/vc-checkbox/vc-checkbox.stories.ts +75 -16
- package/ui/components/atoms/vc-col/vc-col.stories.ts +16 -17
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +18 -16
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +57 -16
- package/ui/components/atoms/vc-image/vc-image.stories.ts +72 -24
- package/ui/components/atoms/vc-label/vc-label.stories.ts +26 -16
- package/ui/components/atoms/vc-link/vc-link.stories.ts +29 -16
- package/ui/components/atoms/vc-loading/vc-loading.stories.ts +11 -16
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +22 -16
- package/ui/components/atoms/vc-row/vc-row.stories.ts +14 -17
- package/ui/components/atoms/vc-status/vc-status.stories.ts +78 -16
- package/ui/components/atoms/vc-switch/vc-switch.stories.ts +18 -16
- package/ui/components/atoms/vc-video/vc-video.stories.ts +33 -0
- package/ui/components/atoms/vc-widget/vc-widget.stories.ts +13 -17
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +22 -19
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +24 -16
- package/ui/components/molecules/vc-field/vc-field.stories.ts +114 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +34 -16
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +3 -1
- package/ui/components/molecules/vc-form/vc-form.stories.ts +20 -16
- package/ui/components/molecules/vc-input/vc-input.stories.ts +144 -14
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +61 -18
- package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +120 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +17 -14
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +51 -15
- package/ui/components/molecules/vc-select/vc-select.stories.ts +605 -29
- package/ui/components/molecules/vc-select/vc-select.vue +0 -4
- package/ui/components/molecules/vc-slider/vc-slider.stories.ts +34 -21
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +46 -14
- package/ui/components/organisms/vc-app/vc-app.stories.ts +204 -51
- package/ui/components/organisms/vc-app/vc-app.vue +31 -24
- package/ui/components/organisms/vc-blade/index.ts +1 -11
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +60 -16
- package/ui/components/organisms/vc-blade/vc-blade.vue +7 -2
- package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +68 -24
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +7 -6
- package/ui/components/organisms/vc-popup/vc-popup.vue +7 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +1 -0
- package/ui/components/organisms/vc-table/vc-table.stories.ts +144 -30
- package/ui/components/organisms/vc-table/vc-table.vue +13 -7
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts +0 -7
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts +0 -7
- package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts.map +0 -1
- package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +0 -52
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +0 -21
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcHint } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcHint",
|
|
6
6
|
component: VcHint,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcHint },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
7
|
+
args: {
|
|
8
|
+
default: "This is a hint",
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
default: {
|
|
12
|
+
control: "text",
|
|
17
13
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
},
|
|
15
|
+
} satisfies Meta<typeof VcHint>;
|
|
16
|
+
|
|
17
|
+
export const Primary: StoryFn<typeof VcHint> = (args) => ({
|
|
18
|
+
components: { VcHint },
|
|
19
|
+
setup() {
|
|
20
|
+
return { args };
|
|
21
|
+
},
|
|
22
|
+
template: '<vc-hint v-bind="args">{{args.default}}</vc-hint>',
|
|
23
|
+
});
|
|
@@ -1,24 +1,65 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcIcon } from "./";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const SIZE = ["xs", "s", "m", "l", "xl", "xxl", "xxxl"];
|
|
5
|
+
const VARIANT = ["warning", "danger", "success"];
|
|
6
|
+
|
|
7
|
+
export default {
|
|
5
8
|
title: "atoms/VcIcon",
|
|
6
9
|
component: VcIcon,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcIcon>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcIcon },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-icon v-bind="args"></vc-icon>',
|
|
19
|
-
}),
|
|
20
10
|
args: {
|
|
21
11
|
icon: "fas fa-star",
|
|
22
12
|
size: "m",
|
|
23
13
|
},
|
|
24
|
-
|
|
14
|
+
argTypes: {
|
|
15
|
+
icon: { control: "text" },
|
|
16
|
+
size: {
|
|
17
|
+
control: "radio",
|
|
18
|
+
options: SIZE,
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: SIZE.join(" | "),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
variant: {
|
|
26
|
+
control: "radio",
|
|
27
|
+
options: VARIANT,
|
|
28
|
+
table: {
|
|
29
|
+
type: {
|
|
30
|
+
summary: VARIANT.join(" | "),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
} satisfies Meta<typeof VcIcon>;
|
|
36
|
+
|
|
37
|
+
export const Primary: StoryFn<typeof VcIcon> = (args) => ({
|
|
38
|
+
components: { VcIcon },
|
|
39
|
+
setup() {
|
|
40
|
+
return { args };
|
|
41
|
+
},
|
|
42
|
+
template: '<vc-icon v-bind="args"></vc-icon>',
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const AllStates: StoryFn<typeof VcIcon> = (args) => ({
|
|
46
|
+
components: {
|
|
47
|
+
VcIcon,
|
|
48
|
+
},
|
|
49
|
+
setup() {
|
|
50
|
+
return { args, variants: VARIANT, sizes: SIZE };
|
|
51
|
+
},
|
|
52
|
+
template: `
|
|
53
|
+
<div>
|
|
54
|
+
<div v-for="variant in variants" :key="variant">
|
|
55
|
+
<h2 class="tw-font-bold">Color: {{variant}}</h2>
|
|
56
|
+
<div class="tw-space-x-4 tw-flex tw-flex-row">
|
|
57
|
+
<div v-for="size in sizes" :key="size" >
|
|
58
|
+
<h3 class="">Size: <span class="tw-font-bold">{{size}}</span></h3>
|
|
59
|
+
<vc-icon v-bind="{...args, variant, size}"></vc-icon>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`,
|
|
65
|
+
});
|
|
@@ -1,37 +1,85 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcImage } from "./";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const ASPECT = ["1x1", "3x2", "4x3", "16x9"];
|
|
5
|
+
const SIZE = ["auto", "xs", "s", "m", "l", "xl", "xxl"];
|
|
6
|
+
const BACKGROUND = ["cover", "contain", "auto"];
|
|
7
|
+
|
|
8
|
+
export default {
|
|
5
9
|
title: "atoms/VcImage",
|
|
6
10
|
component: VcImage,
|
|
11
|
+
args: {
|
|
12
|
+
aspect: "1x1",
|
|
13
|
+
rounded: false,
|
|
14
|
+
clickable: false,
|
|
15
|
+
src: "https://picsum.photos/600",
|
|
16
|
+
size: "auto",
|
|
17
|
+
background: "cover",
|
|
18
|
+
},
|
|
7
19
|
argTypes: {
|
|
8
20
|
aspect: {
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
control: "radio",
|
|
22
|
+
options: ASPECT,
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: ASPECT.join(" | "),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
11
28
|
},
|
|
12
29
|
size: {
|
|
13
|
-
options:
|
|
14
|
-
control:
|
|
30
|
+
options: SIZE,
|
|
31
|
+
control: "radio",
|
|
32
|
+
table: {
|
|
33
|
+
type: {
|
|
34
|
+
summary: SIZE.join(" | "),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
background: {
|
|
39
|
+
options: BACKGROUND,
|
|
40
|
+
control: "radio",
|
|
41
|
+
table: {
|
|
42
|
+
type: {
|
|
43
|
+
summary: BACKGROUND.join(" | "),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
15
46
|
},
|
|
16
47
|
},
|
|
17
|
-
}
|
|
48
|
+
} satisfies Meta<typeof VcImage>;
|
|
18
49
|
|
|
19
|
-
export
|
|
20
|
-
|
|
50
|
+
export const Primary: StoryFn<typeof VcImage> = (args) => ({
|
|
51
|
+
components: { VcImage },
|
|
52
|
+
setup() {
|
|
53
|
+
return { args };
|
|
54
|
+
},
|
|
55
|
+
template: '<div style="width: 400px"><vc-image v-bind="args"></vc-image></div>',
|
|
56
|
+
});
|
|
21
57
|
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return { args };
|
|
27
|
-
},
|
|
28
|
-
template: '<div style="width: 400px"><vc-image v-bind="args"></vc-image></div>',
|
|
29
|
-
}),
|
|
30
|
-
args: {
|
|
31
|
-
aspect: "1x1",
|
|
32
|
-
rounded: false,
|
|
33
|
-
clickable: false,
|
|
34
|
-
src: "https://placekitten.com/800/600",
|
|
35
|
-
size: "auto",
|
|
58
|
+
export const AllStates: StoryFn<typeof VcImage> = (args) => ({
|
|
59
|
+
components: { VcImage },
|
|
60
|
+
setup() {
|
|
61
|
+
return { args, aspects: ASPECT, sizes: SIZE, backgrounds: BACKGROUND };
|
|
36
62
|
},
|
|
37
|
-
|
|
63
|
+
template: `
|
|
64
|
+
<div>
|
|
65
|
+
<div v-for="aspect in aspects" :key="aspect">
|
|
66
|
+
<h2 class="tw-font-bold">Aspect: {{aspect}}</h2>
|
|
67
|
+
<div class="tw-space-x-4 tw-flex tw-flex-row">
|
|
68
|
+
<div v-for="size in sizes" :key="size" >
|
|
69
|
+
<h3 class="">Size: <span class="tw-font-bold">{{size}}</span></h3>
|
|
70
|
+
<vc-image v-bind="{...args, aspect, size}"></vc-image>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div>
|
|
75
|
+
<h2 class="tw-font-bold">Bordered and Rounded</h2>
|
|
76
|
+
<div class="tw-space-x-4 tw-flex tw-flex-row">
|
|
77
|
+
<div v-for="size in sizes" :key="size" >
|
|
78
|
+
<h3 class="">Size: <span class="tw-font-bold">{{size}}</span></h3>
|
|
79
|
+
<vc-image v-bind="{...args, aspect: '1x1', size, bordered: true, rounded: true}"></vc-image>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
});
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcLabel } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcLabel",
|
|
6
6
|
component: VcLabel,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
components: { VcLabel },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
7
|
+
args: {
|
|
8
|
+
default: "This is a label",
|
|
9
|
+
tooltip: "This is a tooltip",
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
default: {
|
|
13
|
+
control: "text",
|
|
17
14
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
15
|
+
tooltip: {
|
|
16
|
+
control: "text",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
} satisfies Meta<typeof VcLabel>;
|
|
20
|
+
|
|
21
|
+
export const Primary: StoryFn<typeof VcLabel> = (args) => ({
|
|
22
|
+
components: { VcLabel },
|
|
23
|
+
setup() {
|
|
24
|
+
return { args };
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<vc-label v-bind="args">
|
|
28
|
+
{{args.default}}
|
|
29
|
+
<template #tooltip>{{args.tooltip}}</template>
|
|
30
|
+
</vc-label>`,
|
|
31
|
+
});
|
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcLink } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcLink",
|
|
6
6
|
component: VcLink,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcLink>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcLink },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-link v-bind="args">This is a link</vc-link>',
|
|
19
|
-
}),
|
|
20
7
|
args: {
|
|
21
8
|
active: false,
|
|
22
9
|
disabled: false,
|
|
10
|
+
default: "This is a link",
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
default: {
|
|
14
|
+
control: "text",
|
|
15
|
+
table: {
|
|
16
|
+
type: {
|
|
17
|
+
summary: "text",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
onClick: {
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: "function",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
} satisfies Meta<typeof VcLink>;
|
|
30
|
+
|
|
31
|
+
export const Primary: StoryFn<typeof VcLink> = (args) => ({
|
|
32
|
+
components: { VcLink },
|
|
33
|
+
setup() {
|
|
34
|
+
return { args };
|
|
23
35
|
},
|
|
24
|
-
}
|
|
36
|
+
template: '<vc-link v-bind="args">{{args.default}}</vc-link>',
|
|
37
|
+
});
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcLoading } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcLoading",
|
|
6
6
|
component: VcLoading,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcLoading>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcLoading },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-loading v-bind="args"></vc-loading>',
|
|
19
|
-
}),
|
|
20
7
|
args: {
|
|
21
8
|
active: true,
|
|
22
9
|
},
|
|
23
|
-
}
|
|
10
|
+
} satisfies Meta<typeof VcLoading>;
|
|
11
|
+
|
|
12
|
+
export const Primary: StoryFn<typeof VcLoading> = (args) => ({
|
|
13
|
+
components: { VcLoading },
|
|
14
|
+
setup() {
|
|
15
|
+
return { args };
|
|
16
|
+
},
|
|
17
|
+
template: `<div class="tw-h-20"><vc-loading v-bind="args"></vc-loading></div>`,
|
|
18
|
+
});
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcProgress } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcProgress",
|
|
6
6
|
component: VcProgress,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcProgress>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcProgress },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-progress v-bind="args"></vc-progress>',
|
|
19
|
-
}),
|
|
20
7
|
args: {
|
|
21
8
|
value: 30,
|
|
22
9
|
variant: "striped",
|
|
23
10
|
},
|
|
24
|
-
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
control: "radio",
|
|
14
|
+
options: ["default", "striped"],
|
|
15
|
+
table: {
|
|
16
|
+
type: {
|
|
17
|
+
summary: ["default", "striped"],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<typeof VcProgress>;
|
|
23
|
+
|
|
24
|
+
export const Primary: StoryFn<typeof VcProgress> = (args) => ({
|
|
25
|
+
components: { VcProgress },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: '<vc-progress v-bind="args"></vc-progress>',
|
|
30
|
+
});
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcRow } from "./";
|
|
3
3
|
import { VcImage } from "./../../";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export default {
|
|
6
6
|
title: "atoms/VcRow",
|
|
7
7
|
component: VcRow,
|
|
8
|
-
}
|
|
8
|
+
} satisfies Meta<typeof VcRow>;
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
args: {},
|
|
23
|
-
};
|
|
10
|
+
export const Primary: StoryFn<typeof VcRow> = (args) => ({
|
|
11
|
+
components: { VcRow, VcImage },
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
15
|
+
template: `<vc-row v-bind="args">
|
|
16
|
+
<vc-image src="https://picsum.photos/200" size="xl" />
|
|
17
|
+
<vc-image src="https://picsum.photos/200" size="xl" />
|
|
18
|
+
<vc-image src="https://picsum.photos/200" size="xl" />
|
|
19
|
+
</vc-row>`,
|
|
20
|
+
});
|
|
@@ -1,23 +1,85 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcStatus } from "./";
|
|
3
|
+
import { VcIcon } from "../vc-icon";
|
|
3
4
|
|
|
4
|
-
const
|
|
5
|
+
const VARIANT = ["info", "warning", "danger", "success", "light-danger"];
|
|
6
|
+
|
|
7
|
+
export default {
|
|
5
8
|
title: "atoms/VcStatus",
|
|
6
9
|
component: VcStatus,
|
|
7
|
-
|
|
10
|
+
args: {
|
|
11
|
+
variant: "info",
|
|
12
|
+
outline: true,
|
|
13
|
+
extend: false,
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
variant: {
|
|
17
|
+
control: "radio",
|
|
18
|
+
options: VARIANT,
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: VARIANT,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
outline: {
|
|
26
|
+
control: "boolean",
|
|
27
|
+
table: {
|
|
28
|
+
type: {
|
|
29
|
+
summary: "boolean",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
extend: {
|
|
34
|
+
control: "boolean",
|
|
35
|
+
table: {
|
|
36
|
+
type: {
|
|
37
|
+
summary: "boolean",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} satisfies Meta<typeof VcStatus>;
|
|
8
43
|
|
|
9
|
-
export
|
|
10
|
-
|
|
44
|
+
export const Primary: StoryFn<typeof VcStatus> = (args) => ({
|
|
45
|
+
components: { VcStatus },
|
|
46
|
+
setup() {
|
|
47
|
+
return { args };
|
|
48
|
+
},
|
|
49
|
+
template: '<vc-status v-bind="args">Status text</vc-status>',
|
|
50
|
+
});
|
|
11
51
|
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
52
|
+
export const Extended: StoryFn<typeof VcStatus> = (args) => ({
|
|
53
|
+
components: { VcStatus, VcIcon },
|
|
54
|
+
setup() {
|
|
55
|
+
return { args };
|
|
56
|
+
},
|
|
57
|
+
template: `
|
|
58
|
+
<vc-status v-bind="args" extend variant="danger" >
|
|
59
|
+
<div class="tw-flex tw-flex-row tw-items-center">
|
|
60
|
+
<VcIcon icon="fas fa-warehouse" size="xl" variant="danger" class="tw-mr-3" />
|
|
61
|
+
<div>
|
|
62
|
+
<h3 class="tw-font-bold">Status</h3>
|
|
63
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque tortor id lacus viverra, ut mollis libero auctor. </p>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</vc-status>`,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const AllStates: StoryFn<typeof VcStatus> = (args) => ({
|
|
70
|
+
components: { VcStatus },
|
|
71
|
+
setup() {
|
|
72
|
+
return { args, variants: VARIANT };
|
|
22
73
|
},
|
|
23
|
-
|
|
74
|
+
template: `
|
|
75
|
+
<div class="tw-space-y-4">
|
|
76
|
+
<div v-for="variant in variants" :key="variant">
|
|
77
|
+
<h2 class="tw-font-bold">Color: {{variant}}</h2>
|
|
78
|
+
<div class="tw-space-x-4 tw-flex tw-flex-row">
|
|
79
|
+
<vc-status v-bind="{...args, variant}">Outline {{variant}}</vc-status>
|
|
80
|
+
<vc-status v-bind="{...args, variant}" :outline="false">{{variant}}</vc-status>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
});
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcSwitch } from "./";
|
|
3
3
|
import { VcHint } from "./../../";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export default {
|
|
6
6
|
title: "atoms/VcSwitch",
|
|
7
7
|
component: VcSwitch,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
render: (args) => ({
|
|
15
|
-
components: { VcSwitch, VcHint },
|
|
16
|
-
setup() {
|
|
17
|
-
return { args };
|
|
8
|
+
args: {
|
|
9
|
+
label: "This is a switch",
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
tooltip: {
|
|
13
|
+
control: "text",
|
|
18
14
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
},
|
|
16
|
+
} satisfies Meta<typeof VcSwitch>;
|
|
17
|
+
|
|
18
|
+
export const Primary: StoryFn<typeof VcSwitch> = (args) => ({
|
|
19
|
+
components: { VcSwitch, VcHint },
|
|
20
|
+
setup() {
|
|
21
|
+
return { args };
|
|
22
|
+
},
|
|
23
|
+
template: '<vc-switch v-bind="args"></vc-switch>',
|
|
24
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
|
+
import { VcVideo } from "./";
|
|
3
|
+
|
|
4
|
+
const SIZE = ["auto", "xs", "s", "m", "l", "xl", "xxl"];
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "atoms/VcVideo",
|
|
8
|
+
component: VcVideo,
|
|
9
|
+
args: {
|
|
10
|
+
source: "https://www.youtube.com/embed/PeXX-V-dwpA",
|
|
11
|
+
size: "auto",
|
|
12
|
+
label: "Video",
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
size: {
|
|
16
|
+
options: SIZE,
|
|
17
|
+
control: "radio",
|
|
18
|
+
table: {
|
|
19
|
+
type: {
|
|
20
|
+
summary: SIZE.join(" | "),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
} satisfies Meta<typeof VcVideo>;
|
|
26
|
+
|
|
27
|
+
export const Primary: StoryFn<typeof VcVideo> = (args) => ({
|
|
28
|
+
components: { VcVideo },
|
|
29
|
+
setup() {
|
|
30
|
+
return { args };
|
|
31
|
+
},
|
|
32
|
+
template: '<div style="width: 400px"><vc-video v-bind="args"></vc-video></div>',
|
|
33
|
+
});
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcWidget } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "atoms/VcWidget",
|
|
6
6
|
component: VcWidget,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcWidget>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcWidget },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-widget v-bind="args"></vc-widget>',
|
|
19
|
-
}),
|
|
20
7
|
args: {
|
|
21
8
|
icon: "fas fa-save",
|
|
22
|
-
title: "
|
|
9
|
+
title: "Saved",
|
|
10
|
+
value: 12,
|
|
11
|
+
},
|
|
12
|
+
} satisfies Meta<typeof VcWidget>;
|
|
13
|
+
|
|
14
|
+
export const Primary: StoryFn<typeof VcWidget> = (args) => ({
|
|
15
|
+
components: { VcWidget },
|
|
16
|
+
setup() {
|
|
17
|
+
return { args };
|
|
23
18
|
},
|
|
24
|
-
|
|
19
|
+
template: '<vc-widget v-bind="args"></vc-widget>',
|
|
20
|
+
});
|