@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,40 +1,43 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcBreadcrumbs } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "molecules/VcBreadcrumbs",
|
|
6
6
|
component: VcBreadcrumbs,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof VcBreadcrumbs>;
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcBreadcrumbs },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-breadcrumbs v-bind="args"></vc-breadcrumbs>',
|
|
19
|
-
}),
|
|
20
7
|
args: {
|
|
21
8
|
items: [
|
|
22
9
|
{
|
|
23
10
|
id: "0",
|
|
24
11
|
title: "Back",
|
|
25
12
|
icon: "fas fa-arrow-left",
|
|
26
|
-
// current: false,
|
|
27
13
|
},
|
|
28
14
|
{
|
|
29
15
|
id: "1",
|
|
30
16
|
title: "Electronics",
|
|
31
|
-
// current: false,
|
|
32
17
|
},
|
|
33
18
|
{
|
|
34
19
|
id: "2",
|
|
35
20
|
title: "Desktop",
|
|
36
|
-
// current: true,
|
|
37
21
|
},
|
|
38
22
|
],
|
|
39
23
|
},
|
|
40
|
-
|
|
24
|
+
argTypes: {
|
|
25
|
+
items: {
|
|
26
|
+
control: "object",
|
|
27
|
+
table: {
|
|
28
|
+
type: {
|
|
29
|
+
summary:
|
|
30
|
+
"{ id: string, title: string, icon?: string, clickHandler?: (id: string) => void | Promise<void> }[]",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
} satisfies Meta<typeof VcBreadcrumbs>;
|
|
36
|
+
|
|
37
|
+
export const Primary: StoryFn<typeof VcBreadcrumbs> = (args) => ({
|
|
38
|
+
components: { VcBreadcrumbs },
|
|
39
|
+
setup() {
|
|
40
|
+
return { args };
|
|
41
|
+
},
|
|
42
|
+
template: '<vc-breadcrumbs v-bind="args"></vc-breadcrumbs>',
|
|
43
|
+
});
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcEditor } from "./";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
title: "molecules/VcEditor",
|
|
6
6
|
component: VcEditor,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
args: {
|
|
8
|
+
assetsFolder: "folder",
|
|
9
|
+
placeholder: "Editor text placeholder",
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
control: "text",
|
|
14
|
+
table: {
|
|
15
|
+
type: {
|
|
16
|
+
summary: "string | number | Date",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
17
19
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta<typeof VcEditor>;
|
|
22
|
+
|
|
23
|
+
export const Primary: StoryFn<typeof VcEditor> = (args) => ({
|
|
24
|
+
components: { VcEditor },
|
|
25
|
+
setup() {
|
|
26
|
+
return { args };
|
|
27
|
+
},
|
|
28
|
+
template: '<vc-editor v-bind="args"></vc-editor>',
|
|
29
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { StoryFn, Meta } from "@storybook/vue3";
|
|
2
|
+
import VcField from "./vc-field.vue";
|
|
3
|
+
|
|
4
|
+
const TYPE = ["text", "date", "date-ago", "link", "email"];
|
|
5
|
+
const ORIENTATION = ["vertical", "horizontal"];
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "molecules/VcField",
|
|
9
|
+
component: VcField,
|
|
10
|
+
args: {
|
|
11
|
+
label: "Field Label",
|
|
12
|
+
tooltip: "Field Tooltip",
|
|
13
|
+
type: "text",
|
|
14
|
+
modelValue: "Field Value",
|
|
15
|
+
orientation: "vertical",
|
|
16
|
+
aspectRatio: [1, 1],
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
type: {
|
|
20
|
+
control: "radio",
|
|
21
|
+
|
|
22
|
+
options: TYPE,
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: TYPE.join(" | "),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
orientation: {
|
|
30
|
+
control: "radio",
|
|
31
|
+
options: ORIENTATION,
|
|
32
|
+
table: {
|
|
33
|
+
type: {
|
|
34
|
+
summary: ORIENTATION.join(" | "),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
aspectRatio: {
|
|
39
|
+
control: "array",
|
|
40
|
+
table: {
|
|
41
|
+
type: {
|
|
42
|
+
summary: "number[]",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
} as Meta;
|
|
48
|
+
|
|
49
|
+
const Template: StoryFn = (args) => ({
|
|
50
|
+
components: { VcField },
|
|
51
|
+
setup() {
|
|
52
|
+
return { args };
|
|
53
|
+
},
|
|
54
|
+
template: `
|
|
55
|
+
<vc-field v-bind="args" />
|
|
56
|
+
`,
|
|
57
|
+
args: {},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const Default = Template.bind({});
|
|
61
|
+
Default.args = {
|
|
62
|
+
...Template.args,
|
|
63
|
+
type: "text",
|
|
64
|
+
modelValue: "Field Value",
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const DateType = Template.bind({});
|
|
68
|
+
DateType.args = {
|
|
69
|
+
...Template.args,
|
|
70
|
+
type: "date",
|
|
71
|
+
modelValue: new Date(),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const DateAgo = Template.bind({});
|
|
75
|
+
DateAgo.args = {
|
|
76
|
+
...Template.args,
|
|
77
|
+
type: "date-ago",
|
|
78
|
+
modelValue: new Date(),
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const Link = Template.bind({});
|
|
82
|
+
Link.args = {
|
|
83
|
+
...Template.args,
|
|
84
|
+
type: "link",
|
|
85
|
+
modelValue: "https://virtocommerce.com/",
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const LinkCopyable = Template.bind({});
|
|
89
|
+
LinkCopyable.args = {
|
|
90
|
+
...Template.args,
|
|
91
|
+
type: "link",
|
|
92
|
+
modelValue: "https://virtocommerce.com/",
|
|
93
|
+
copyable: true,
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const Email = Template.bind({});
|
|
97
|
+
Email.args = {
|
|
98
|
+
...Template.args,
|
|
99
|
+
type: "email",
|
|
100
|
+
modelValue: "email@virtocommerce.com",
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const Horizontal = Template.bind({});
|
|
104
|
+
Horizontal.args = {
|
|
105
|
+
...Template.args,
|
|
106
|
+
orientation: "horizontal",
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const HorizontalAspectRatio = Template.bind({});
|
|
110
|
+
HorizontalAspectRatio.args = {
|
|
111
|
+
...Template.args,
|
|
112
|
+
orientation: "horizontal",
|
|
113
|
+
aspectRatio: [1, 2],
|
|
114
|
+
};
|
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcFileUpload } from "./";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const VARIANT = ["gallery", "file-upload"];
|
|
5
|
+
|
|
6
|
+
export default {
|
|
5
7
|
title: "molecules/VcFileUpload",
|
|
6
8
|
component: VcFileUpload,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
args: {
|
|
10
|
+
variant: "gallery",
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: "radio",
|
|
15
|
+
options: VARIANT,
|
|
16
|
+
table: {
|
|
17
|
+
type: {
|
|
18
|
+
summary: VARIANT.join(" | "),
|
|
19
|
+
},
|
|
20
|
+
},
|
|
17
21
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
rules: {
|
|
23
|
+
control: "object",
|
|
24
|
+
table: {
|
|
25
|
+
type: {
|
|
26
|
+
summary: "keyof IValidationRules | IValidationRules",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
} satisfies Meta<typeof VcFileUpload>;
|
|
32
|
+
|
|
33
|
+
export const Primary: StoryFn<typeof VcFileUpload> = (args) => ({
|
|
34
|
+
components: { VcFileUpload },
|
|
35
|
+
setup() {
|
|
36
|
+
return { args };
|
|
37
|
+
},
|
|
38
|
+
template: '<vc-file-upload v-bind="args"></vc-file-upload>',
|
|
39
|
+
});
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
>
|
|
20
20
|
<VcIcon
|
|
21
21
|
class="tw-text-[#c8dbea]"
|
|
22
|
-
icon="
|
|
22
|
+
:icon="icon"
|
|
23
23
|
size="xxl"
|
|
24
24
|
></VcIcon>
|
|
25
25
|
|
|
@@ -65,6 +65,7 @@ export interface Props {
|
|
|
65
65
|
multiple?: boolean;
|
|
66
66
|
rules?: keyof IValidationRules | IValidationRules;
|
|
67
67
|
name?: string;
|
|
68
|
+
icon?: string;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export interface Emits {
|
|
@@ -75,6 +76,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
75
76
|
variant: "gallery",
|
|
76
77
|
accept: ".jpg, .png, .jpeg",
|
|
77
78
|
name: "Gallery",
|
|
79
|
+
icon: "fas fa-cloud-upload-alt",
|
|
78
80
|
});
|
|
79
81
|
|
|
80
82
|
const emit = defineEmits<Emits>();
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcForm } from "./";
|
|
3
|
+
import { VcInput } from "../vc-input";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export default {
|
|
5
6
|
title: "molecules/VcForm",
|
|
6
7
|
component: VcForm,
|
|
7
|
-
}
|
|
8
|
+
} satisfies Meta<typeof VcForm>;
|
|
8
9
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
export const Primary: StoryFn<typeof VcForm> = (args) => ({
|
|
11
|
+
components: { VcForm, VcInput },
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
15
|
+
template: `
|
|
16
|
+
<vc-form v-bind="args">
|
|
17
|
+
<template #default>
|
|
18
|
+
<div class="tw-flex tw-flex-col tw-gap-4">
|
|
19
|
+
<vc-input label="First Name" />
|
|
20
|
+
<vc-input label="Last Name" />
|
|
21
|
+
<vc-input label="Email" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
</vc-form>`,
|
|
25
|
+
});
|
|
@@ -1,21 +1,151 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcInput } from "./";
|
|
3
|
+
import { VcButton } from "../..";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export default {
|
|
5
6
|
title: "molecules/VcInput",
|
|
6
7
|
component: VcInput,
|
|
8
|
+
args: {
|
|
9
|
+
label: "This is an input",
|
|
10
|
+
placeholder: "Placeholder",
|
|
11
|
+
},
|
|
12
|
+
} satisfies Meta<typeof VcInput>;
|
|
13
|
+
|
|
14
|
+
export const Template: StoryFn<typeof VcInput> = (args) => ({
|
|
15
|
+
components: { VcInput },
|
|
16
|
+
setup() {
|
|
17
|
+
return { args };
|
|
18
|
+
},
|
|
19
|
+
template: '<vc-input v-bind="args"></vc-input>',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const Error: StoryFn<typeof VcInput> = Template.bind({});
|
|
23
|
+
Error.args = {
|
|
24
|
+
errorMessage: "This is an error",
|
|
25
|
+
error: true,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Disabled: StoryFn<typeof VcInput> = Template.bind({});
|
|
29
|
+
Disabled.args = {
|
|
30
|
+
disabled: true,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const Hint: StoryFn<typeof VcInput> = Template.bind({});
|
|
34
|
+
Hint.args = {
|
|
35
|
+
hint: "This is a hint",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Tooltip: StoryFn<typeof VcInput> = Template.bind({});
|
|
39
|
+
Tooltip.args = {
|
|
40
|
+
tooltip: "This is a tooltip",
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Required: StoryFn<typeof VcInput> = Template.bind({});
|
|
44
|
+
Required.args = {
|
|
45
|
+
required: true,
|
|
7
46
|
};
|
|
8
47
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const Primary: Story = {
|
|
13
|
-
render: (args) => ({
|
|
14
|
-
components: { VcInput },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<vc-input v-bind="args"></vc-input>',
|
|
19
|
-
}),
|
|
20
|
-
args: {},
|
|
48
|
+
export const Prefix: StoryFn<typeof VcInput> = Template.bind({});
|
|
49
|
+
Prefix.args = {
|
|
50
|
+
prefix: "Prefix",
|
|
21
51
|
};
|
|
52
|
+
|
|
53
|
+
export const Suffix: StoryFn<typeof VcInput> = Template.bind({});
|
|
54
|
+
Suffix.args = {
|
|
55
|
+
suffix: "Suffix",
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const CustomInputControlSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
59
|
+
components: { VcInput },
|
|
60
|
+
setup() {
|
|
61
|
+
return { args };
|
|
62
|
+
},
|
|
63
|
+
template: `
|
|
64
|
+
<vc-input v-bind="args">
|
|
65
|
+
<template #control="{ placeholder }">
|
|
66
|
+
<input
|
|
67
|
+
type="range"
|
|
68
|
+
:disabled="disabled"
|
|
69
|
+
:placeholder="placeholder"
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
</vc-input>`,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const CustomPrependSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
76
|
+
components: { VcInput, VcButton },
|
|
77
|
+
setup() {
|
|
78
|
+
return { args };
|
|
79
|
+
},
|
|
80
|
+
template: `
|
|
81
|
+
<vc-input v-bind="args">
|
|
82
|
+
<template #prepend>
|
|
83
|
+
<vc-button>Action</vc-button>
|
|
84
|
+
</template>
|
|
85
|
+
</vc-input>`,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const CustomAppendSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
89
|
+
components: { VcInput, VcButton },
|
|
90
|
+
setup() {
|
|
91
|
+
return { args };
|
|
92
|
+
},
|
|
93
|
+
template: `
|
|
94
|
+
<vc-input v-bind="args">
|
|
95
|
+
<template #append>
|
|
96
|
+
<vc-button>Action</vc-button>
|
|
97
|
+
</template>
|
|
98
|
+
</vc-input>`,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export const CustomPrependInnerSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
102
|
+
components: { VcInput, VcButton },
|
|
103
|
+
setup() {
|
|
104
|
+
return { args };
|
|
105
|
+
},
|
|
106
|
+
template: `
|
|
107
|
+
<vc-input v-bind="args">
|
|
108
|
+
<template #prepend-inner>
|
|
109
|
+
<vc-button>Action</vc-button>
|
|
110
|
+
</template>
|
|
111
|
+
</vc-input>`,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export const CustomAppendInnerSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
115
|
+
components: { VcInput, VcButton },
|
|
116
|
+
setup() {
|
|
117
|
+
return { args };
|
|
118
|
+
},
|
|
119
|
+
template: `
|
|
120
|
+
<vc-input v-bind="args">
|
|
121
|
+
<template #append-inner>
|
|
122
|
+
<vc-button>Action</vc-button>
|
|
123
|
+
</template>
|
|
124
|
+
</vc-input>`,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export const CustomErrorSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
128
|
+
components: { VcInput },
|
|
129
|
+
setup() {
|
|
130
|
+
return { args };
|
|
131
|
+
},
|
|
132
|
+
template: `
|
|
133
|
+
<vc-input v-bind="args" error>
|
|
134
|
+
<template #error>
|
|
135
|
+
<p class="tw-font-bold tw-text-green-700">This is an custom error message</p>
|
|
136
|
+
</template>
|
|
137
|
+
</vc-input>`,
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export const CustomHintSlot: StoryFn<typeof VcInput> = (args) => ({
|
|
141
|
+
components: { VcInput, VcButton },
|
|
142
|
+
setup() {
|
|
143
|
+
return { args };
|
|
144
|
+
},
|
|
145
|
+
template: `
|
|
146
|
+
<vc-input v-bind="args">
|
|
147
|
+
<template #hint>
|
|
148
|
+
<VcButton text>Custom hint action button</VcButton>
|
|
149
|
+
</template>
|
|
150
|
+
</vc-input>`,
|
|
151
|
+
});
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
import type { Meta,
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { VcInputCurrency } from "./";
|
|
3
3
|
import { ref } from "vue";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export default {
|
|
6
6
|
title: "molecules/VcInputCurrency",
|
|
7
7
|
component: VcInputCurrency,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof VcInputCurrency>;
|
|
12
|
-
|
|
13
|
-
export const Primary: Story = {
|
|
14
|
-
render: (args) => ({
|
|
15
|
-
// components: { VcInputCurrency, VcSelect, VcInput },
|
|
16
|
-
setup() {
|
|
17
|
-
const price = ref(0);
|
|
18
|
-
const option = ref("USD");
|
|
19
|
-
return { args, price, option };
|
|
20
|
-
},
|
|
21
|
-
template:
|
|
22
|
-
'<vc-input-currency v-bind="args" v-model:modelValue.number="price" v-model:option="option"></vc-input-currency>',
|
|
23
|
-
}),
|
|
24
8
|
args: {
|
|
25
9
|
label: "Label",
|
|
26
10
|
placeholder: "Placeholder",
|
|
@@ -36,5 +20,64 @@ export const Primary: Story = {
|
|
|
36
20
|
],
|
|
37
21
|
optionLabel: "title",
|
|
38
22
|
optionValue: "value",
|
|
23
|
+
modelValue: 1000000,
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
optionLabel: {
|
|
27
|
+
control: "text",
|
|
28
|
+
},
|
|
29
|
+
optionValue: {
|
|
30
|
+
control: "text",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
} satisfies Meta<typeof VcInputCurrency>;
|
|
34
|
+
|
|
35
|
+
export const Template: StoryFn<typeof VcInputCurrency> = (args) => ({
|
|
36
|
+
components: { VcInputCurrency },
|
|
37
|
+
setup() {
|
|
38
|
+
const option = ref("USD");
|
|
39
|
+
return { args, option };
|
|
39
40
|
},
|
|
41
|
+
template: '<vc-input-currency v-bind="args" v-model:option="option"></vc-input-currency>',
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const Hint: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
45
|
+
Hint.args = {
|
|
46
|
+
hint: "This is a hint",
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Tooltip: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
50
|
+
Tooltip.args = {
|
|
51
|
+
tooltip: "This is a tooltip",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const Error: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
55
|
+
Error.args = {
|
|
56
|
+
errorMessage: "This is an error",
|
|
57
|
+
error: true,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const Disabled: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
61
|
+
Disabled.args = {
|
|
62
|
+
disabled: true,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Required: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
66
|
+
Required.args = {
|
|
67
|
+
required: true,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Prefix: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
71
|
+
Prefix.args = {
|
|
72
|
+
prefix: "$",
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const Suffix: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
76
|
+
Suffix.args = {
|
|
77
|
+
suffix: "USD",
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Loading: StoryFn<typeof VcInputCurrency> = Template.bind({});
|
|
81
|
+
Loading.args = {
|
|
82
|
+
loading: true,
|
|
40
83
|
};
|