@vc-shell/framework 1.0.180 → 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.
Files changed (149) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/framework.js +5020 -5002
  3. package/dist/index.css +1 -1
  4. package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
  5. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -1
  6. package/dist/tailwind.config.d.ts +1 -2
  7. package/dist/tailwind.config.d.ts.map +1 -1
  8. package/dist/tsconfig.tsbuildinfo +1 -1
  9. package/dist/ui/components/atoms/vc-badge/index.d.ts +1 -79
  10. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  11. package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts +389 -6
  12. package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -1
  13. package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts +2295 -5
  14. package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -1
  15. package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +1119 -5
  16. package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts.map +1 -1
  17. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts +1778 -5
  18. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -1
  19. package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts +51 -5
  20. package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts.map +1 -1
  21. package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts +37 -5
  22. package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts.map +1 -1
  23. package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts +62 -5
  24. package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts.map +1 -1
  25. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts +103 -5
  26. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
  27. package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts +101 -5
  28. package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -1
  29. package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts +103 -5
  30. package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -1
  31. package/dist/ui/components/atoms/vc-loading/vc-loading.stories.d.ts +18 -5
  32. package/dist/ui/components/atoms/vc-loading/vc-loading.stories.d.ts.map +1 -1
  33. package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts +85 -5
  34. package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -1
  35. package/dist/ui/components/atoms/vc-row/vc-row.stories.d.ts +25 -5
  36. package/dist/ui/components/atoms/vc-row/vc-row.stories.d.ts.map +1 -1
  37. package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +116 -5
  38. package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -1
  39. package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts +53 -5
  40. package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts.map +1 -1
  41. package/dist/ui/components/atoms/vc-video/vc-video.stories.d.ts +59 -0
  42. package/dist/ui/components/atoms/vc-video/vc-video.stories.d.ts.map +1 -0
  43. package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts +42 -5
  44. package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts.map +1 -1
  45. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +40 -5
  46. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -1
  47. package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts +179 -5
  48. package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts.map +1 -1
  49. package/dist/ui/components/molecules/vc-field/vc-field.stories.d.ts +12 -0
  50. package/dist/ui/components/molecules/vc-field/vc-field.stories.d.ts.map +1 -0
  51. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +19 -0
  52. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
  53. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts +182 -5
  54. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts.map +1 -1
  55. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +4 -0
  56. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  57. package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts +29 -5
  58. package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts.map +1 -1
  59. package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts +347 -5
  60. package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts.map +1 -1
  61. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts +354 -5
  62. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts.map +1 -1
  63. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts +889 -0
  64. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts.map +1 -0
  65. package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts +74 -5
  66. package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -1
  67. package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts +498 -5
  68. package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -1
  69. package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts +2567 -5
  70. package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts.map +1 -1
  71. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
  72. package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts +156 -5
  73. package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts.map +1 -1
  74. package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts +1297 -5
  75. package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -1
  76. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +276 -5
  77. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
  78. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +82 -3
  79. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  80. package/dist/ui/components/organisms/vc-blade/index.d.ts +1 -179
  81. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
  82. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts +209 -5
  83. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
  84. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +6 -3
  85. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  86. package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts +155 -6
  87. package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts.map +1 -1
  88. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +0 -4
  89. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  90. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +13 -8
  91. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  92. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  93. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +1272 -5
  94. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
  95. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  96. package/package.json +6 -5
  97. package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +1 -0
  98. package/shared/components/popup-handler/composables/usePopup/index.ts +8 -7
  99. package/tailwind.config.ts +2 -46
  100. package/ui/components/atoms/vc-badge/index.ts +1 -13
  101. package/ui/components/atoms/vc-badge/vc-badge.stories.ts +48 -20
  102. package/ui/components/atoms/vc-button/vc-button.stories.ts +111 -19
  103. package/ui/components/atoms/vc-card/vc-card.stories.ts +96 -18
  104. package/ui/components/atoms/vc-checkbox/vc-checkbox.stories.ts +75 -16
  105. package/ui/components/atoms/vc-col/vc-col.stories.ts +16 -17
  106. package/ui/components/atoms/vc-hint/vc-hint.stories.ts +18 -16
  107. package/ui/components/atoms/vc-icon/vc-icon.stories.ts +57 -16
  108. package/ui/components/atoms/vc-image/vc-image.stories.ts +72 -24
  109. package/ui/components/atoms/vc-label/vc-label.stories.ts +26 -16
  110. package/ui/components/atoms/vc-link/vc-link.stories.ts +29 -16
  111. package/ui/components/atoms/vc-loading/vc-loading.stories.ts +11 -16
  112. package/ui/components/atoms/vc-progress/vc-progress.stories.ts +22 -16
  113. package/ui/components/atoms/vc-row/vc-row.stories.ts +14 -17
  114. package/ui/components/atoms/vc-status/vc-status.stories.ts +78 -16
  115. package/ui/components/atoms/vc-switch/vc-switch.stories.ts +18 -16
  116. package/ui/components/atoms/vc-video/vc-video.stories.ts +33 -0
  117. package/ui/components/atoms/vc-widget/vc-widget.stories.ts +13 -17
  118. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +22 -19
  119. package/ui/components/molecules/vc-editor/vc-editor.stories.ts +24 -16
  120. package/ui/components/molecules/vc-field/vc-field.stories.ts +114 -0
  121. package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +34 -16
  122. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +3 -1
  123. package/ui/components/molecules/vc-form/vc-form.stories.ts +20 -16
  124. package/ui/components/molecules/vc-input/vc-input.stories.ts +144 -14
  125. package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +61 -18
  126. package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +120 -0
  127. package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +17 -14
  128. package/ui/components/molecules/vc-rating/vc-rating.stories.ts +51 -15
  129. package/ui/components/molecules/vc-select/vc-select.stories.ts +605 -29
  130. package/ui/components/molecules/vc-select/vc-select.vue +9 -3
  131. package/ui/components/molecules/vc-slider/vc-slider.stories.ts +34 -21
  132. package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +46 -14
  133. package/ui/components/organisms/vc-app/vc-app.stories.ts +204 -51
  134. package/ui/components/organisms/vc-app/vc-app.vue +31 -24
  135. package/ui/components/organisms/vc-blade/index.ts +1 -11
  136. package/ui/components/organisms/vc-blade/vc-blade.stories.ts +60 -16
  137. package/ui/components/organisms/vc-blade/vc-blade.vue +7 -2
  138. package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +68 -24
  139. package/ui/components/organisms/vc-gallery/vc-gallery.vue +7 -6
  140. package/ui/components/organisms/vc-popup/vc-popup.vue +7 -1
  141. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +1 -0
  142. package/ui/components/organisms/vc-table/vc-table.stories.ts +144 -30
  143. package/ui/components/organisms/vc-table/vc-table.vue +13 -7
  144. package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts +0 -7
  145. package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +0 -1
  146. package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts +0 -7
  147. package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts.map +0 -1
  148. package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +0 -52
  149. package/ui/components/organisms/vc-popup/vc-popup.stories.ts +0 -21
@@ -0,0 +1,120 @@
1
+ import { ref } from "vue";
2
+ import { VcMultivalue } from ".";
3
+ import { StoryFn, type Meta } from "@storybook/vue3";
4
+
5
+ const FIELD_TYPE = ["text", "number"];
6
+
7
+ export default {
8
+ title: "molecules/VcMultivalue",
9
+ component: VcMultivalue as Record<keyof typeof VcMultivalue, unknown>,
10
+ args: {
11
+ placeholder: "Enter a value",
12
+ type: "text",
13
+ label: "Multivalue Field",
14
+ name: "multivalueField",
15
+ options: [
16
+ { id: "1", title: "Option 1" },
17
+ { id: "2", title: "Option 2" },
18
+ { id: "3", title: "Option 3" },
19
+ ],
20
+ optionValue: "id",
21
+ optionLabel: "title",
22
+ multivalue: true,
23
+ },
24
+ argTypes: {
25
+ type: {
26
+ control: "radio",
27
+ options: FIELD_TYPE,
28
+ table: {
29
+ type: {
30
+ summary: FIELD_TYPE.join(" | "),
31
+ },
32
+ },
33
+ },
34
+ },
35
+ } satisfies Meta<typeof VcMultivalue>;
36
+
37
+ const Template: StoryFn<typeof VcMultivalue> = (args) => ({
38
+ components: { VcMultivalue } as Record<keyof typeof VcMultivalue, unknown>,
39
+ setup() {
40
+ const val = ref();
41
+ return { args, val };
42
+ },
43
+ template: `
44
+ <vc-multivalue v-bind="args" v-model="val"></vc-multivalue>
45
+ `,
46
+ });
47
+
48
+ export const Default = Template.bind({});
49
+
50
+ export const Error = Template.bind({});
51
+ Error.args = { errorMessage: "This is an error", error: true };
52
+
53
+ export const Disabled = Template.bind({});
54
+ Disabled.args = { disabled: true };
55
+
56
+ export const Tooltip = Template.bind({});
57
+ Tooltip.args = { tooltip: "This is a tooltip" };
58
+
59
+ export const SingleValue = Template.bind({});
60
+ SingleValue.args = {
61
+ multivalue: false,
62
+ };
63
+
64
+ export const Hint = Template.bind({});
65
+ Hint.args = {
66
+ hint: "This is a hint",
67
+ };
68
+
69
+ export const Required = Template.bind({});
70
+ Required.args = {
71
+ required: true,
72
+ };
73
+
74
+ export const CustomDropdownItemSlot: StoryFn<typeof VcMultivalue> = (args) => ({
75
+ components: { VcMultivalue } as Record<keyof typeof VcMultivalue, unknown>,
76
+ setup() {
77
+ const val = ref();
78
+ return { args, val };
79
+ },
80
+ template: `
81
+ <vc-multivalue v-bind="args" v-model="val">
82
+ <template #item="{ item }">
83
+ <div>
84
+ <h2 class="tw-font-bold">Item header</h2>
85
+ <div>{{ item.title }}</div>
86
+ </div>
87
+ </template>
88
+ </vc-multivalue>
89
+ `,
90
+ });
91
+
92
+ export const CustomHintSlot: StoryFn<typeof VcMultivalue> = (args) => ({
93
+ components: { VcMultivalue } as Record<keyof typeof VcMultivalue, unknown>,
94
+ setup() {
95
+ const val = ref();
96
+ return { args, val };
97
+ },
98
+ template: `
99
+ <vc-multivalue v-bind="args" v-model="val">
100
+ <template #hint>
101
+ <div class="tw-text-red-500">Custom hint</div>
102
+ </template>
103
+ </vc-multivalue>
104
+ `,
105
+ });
106
+
107
+ export const CustomErrorSlot: StoryFn<typeof VcMultivalue> = (args) => ({
108
+ components: { VcMultivalue } as Record<keyof typeof VcMultivalue, unknown>,
109
+ setup() {
110
+ const val = ref();
111
+ return { args, val };
112
+ },
113
+ template: `
114
+ <vc-multivalue v-bind="args" v-model="val" error>
115
+ <template #error>
116
+ <div class="tw-text-red-500">Custom error</div>
117
+ </template>
118
+ </vc-multivalue>
119
+ `,
120
+ });
@@ -1,21 +1,24 @@
1
- import type { Meta, StoryObj } from "@storybook/vue3";
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
2
  import { VcPagination } from "./";
3
3
 
4
- const meta: Meta<typeof VcPagination> = {
4
+ export default {
5
5
  title: "molecules/VcPagination",
6
6
  component: VcPagination,
7
- };
7
+ args: {
8
+ pages: 20,
9
+ currentPage: 3,
10
+ },
11
+ } satisfies Meta<typeof VcPagination>;
8
12
 
9
- export default meta;
10
- type Story = StoryObj<typeof VcPagination>;
13
+ export const Template: StoryFn<typeof VcPagination> = (args) => ({
14
+ components: { VcPagination },
15
+ setup() {
16
+ return { args };
17
+ },
18
+ template: '<vc-pagination v-bind="args"></vc-pagination>',
19
+ });
11
20
 
12
- export const Primary: Story = {
13
- render: (args) => ({
14
- components: { VcPagination },
15
- setup() {
16
- return { args };
17
- },
18
- template: '<vc-pagination v-bind="args"></vc-pagination>',
19
- }),
20
- args: {},
21
+ export const Expanded = Template.bind({});
22
+ Expanded.args = {
23
+ expanded: true,
21
24
  };
@@ -1,23 +1,59 @@
1
- import type { Meta, StoryObj } from "@storybook/vue3";
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
2
  import { VcRating } from "./";
3
3
 
4
- const meta: Meta<typeof VcRating> = {
4
+ const VARIANT = ["stars", "star-and-text", "text"];
5
+
6
+ export default {
5
7
  title: "molecules/VcRating",
6
8
  component: VcRating,
7
- };
8
-
9
- export default meta;
10
- type Story = StoryObj<typeof VcRating>;
11
-
12
- export const Primary: Story = {
13
- render: (args) => ({
14
- components: { VcRating },
15
- setup() {
16
- return { args };
17
- },
18
- template: '<vc-rating v-bind="args"></vc-rating>',
19
- }),
20
9
  args: {
21
10
  modelValue: 4,
11
+ max: 5,
12
+ variant: "stars",
13
+ },
14
+ argTypes: {
15
+ variant: {
16
+ control: "radio",
17
+ options: VARIANT,
18
+ },
19
+ },
20
+ } satisfies Meta<typeof VcRating>;
21
+
22
+ export const Template: StoryFn<typeof VcRating> = (args) => ({
23
+ components: { VcRating },
24
+ setup() {
25
+ return { args };
22
26
  },
27
+ template: '<vc-rating v-bind="args"></vc-rating>',
28
+ });
29
+
30
+ export const Label = Template.bind({});
31
+ Label.args = {
32
+ label: "Rating",
33
+ };
34
+
35
+ export const Tooltip = Template.bind({});
36
+ Tooltip.args = {
37
+ tooltip: "This is a tooltip",
23
38
  };
39
+
40
+ export const Placeholder = Template.bind({});
41
+ Placeholder.args = {
42
+ placeholder: "Select a rating",
43
+ modelValue: undefined,
44
+ };
45
+
46
+ export const AllVariants: StoryFn<typeof VcRating> = (args) => ({
47
+ components: { VcRating },
48
+ setup() {
49
+ return { args, variants: VARIANT };
50
+ },
51
+ template: `
52
+ <div class="tw-grid tw-gap-5 tw-grid-cols-3">
53
+ <div v-for="variant in variants">
54
+ <h2 class="tw-font-bold">Variant: {{variant}}</h2>
55
+ <vc-rating v-bind="args" :variant="variant" />
56
+ </div>
57
+ </div>
58
+ `,
59
+ });