@vcita/design-system 1.3.3 → 1.3.4

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 (41) hide show
  1. package/config/locales/ds.en.yml +4 -0
  2. package/dist/@vcita/design-system.esm.js +1763 -1068
  3. package/dist/@vcita/design-system.min.js +2 -2
  4. package/dist/@vcita/design-system.ssr.js +1625 -950
  5. package/init/DesignSystem.js +3 -1
  6. package/init/initI18n.js +24 -16
  7. package/package.json +2 -1
  8. package/src/components/VcBottomSheet/VcBottomSheet.stories.js +6 -13
  9. package/src/components/VcBottomSheet/VcBottomSheet.vue +2 -3
  10. package/src/components/VcButton/VcButton.vue +1 -1
  11. package/src/components/VcCheckbox/VcCheckbox.vue +8 -1
  12. package/src/components/VcColorPicker/VcColorPicker.spec.js +206 -0
  13. package/src/components/VcColorPicker/VcColorPicker.stories.js +107 -0
  14. package/src/components/VcColorPicker/VcColorPicker.vue +270 -0
  15. package/src/components/VcGroupedItems/VcGroupedItems.spec.js +148 -0
  16. package/src/components/VcGroupedItems/VcGroupedItems.stories.js +135 -0
  17. package/src/components/VcGroupedItems/VcGroupedItems.vue +155 -0
  18. package/src/components/VcLink/VcLink.spec.js +3 -3
  19. package/src/components/VcLink/VcLink.stories.js +2 -6
  20. package/src/components/VcLink/VcLink.vue +1 -18
  21. package/src/components/VcMenu/VcDropdown.spec.js +120 -0
  22. package/src/components/VcMenu/VcDropdown.stories.js +272 -0
  23. package/src/components/VcMenu/VcDropdown.vue +93 -0
  24. package/src/components/VcMenu/VcMenu.spec.js +61 -10
  25. package/src/components/VcMenu/VcMenu.stories.js +38 -33
  26. package/src/components/VcMenu/VcMenu.vue +19 -3
  27. package/src/components/VcPopover/VcPopover.stories.js +2 -2
  28. package/src/components/VcSearchPicker/VcSearchPicker.stories.js +3 -4
  29. package/src/components/VcSelectField/VcSelectField.vue +6 -0
  30. package/src/components/VcSideNav/VcSideNav.spec.js +1 -1
  31. package/src/components/VcSideNav/VcSideNav.vue +21 -104
  32. package/src/components/VcTextField/VcTextField.vue +1 -0
  33. package/src/components/index.js +4 -0
  34. package/src/components/list/VcBaseListItem/VcBaseListItem.stories.js +22 -13
  35. package/src/components/list/VcBaseListItem/VcBaseListItem.vue +4 -1
  36. package/src/components/list/VcList/VcList.stories.js +245 -240
  37. package/src/components/list/VcList/VcList.vue +11 -4
  38. package/src/components/page/layouts/centeredPage/CenteredPageLayout.stories.js +17 -16
  39. package/styles/variables.scss +1 -0
  40. package/styles/vuetify-variables.scss +9 -1
  41. package/CHANGELOG.md +0 -352
@@ -2,12 +2,155 @@ import VcList from './VcList';
2
2
  import {VcCheckbox, VcIcon} from '@/components/index';
3
3
  import VcBaseDocs from "@/stories/VcBaseDocs.mdx";
4
4
 
5
+ const checkboxItems = [
6
+ {
7
+ disabled: true,
8
+ avatar:
9
+ {
10
+ name: 'Person One',
11
+ path: require('@/stories/assets/pics/avatar4.png'),
12
+ },
13
+ identifier: 0
14
+ },
15
+ {
16
+ disabled: true,
17
+ avatar: {
18
+ name: 'Person Two',
19
+ path: require('@/stories/assets/pics/avatar2.png'),
20
+ },
21
+ identifier: 1
22
+ },
23
+ {
24
+ selected: true,
25
+ avatar: {
26
+ name: 'Person Three',
27
+ path: require('@/stories/assets/pics/avatar1.png'),
28
+ },
29
+ identifier: 2
30
+ },
31
+ {
32
+ selected: true,
33
+ avatar: {
34
+ name: 'Person Four',
35
+ colorId: 3,
36
+ },
37
+ identifier: 3
38
+ },
39
+ {
40
+ avatar: {
41
+ name: 'Person Five',
42
+ colorId: 4,
43
+ },
44
+ identifier: 4
45
+ },
46
+ {
47
+ avatar: {
48
+ name: 'Person Six',
49
+ path: require('@/stories/assets/pics/avatar2.png'),
50
+ },
51
+ identifier: 5
52
+ },
53
+ {
54
+ avatar: {
55
+ name: 'Person Seven',
56
+ colorId: 6,
57
+ },
58
+ identifier: 6
59
+ },
60
+ {
61
+ avatar: {
62
+ name: 'Person Eight',
63
+ colorId: 7,
64
+ },
65
+ identifier: 7
66
+ },
67
+ {
68
+ avatar: {
69
+ name: 'Person Nine',
70
+ colorId: 8,
71
+ },
72
+ identifier: 8
73
+ },
74
+ {
75
+ avatar: {
76
+ name: 'Person Ten',
77
+ path: require('@/stories/assets/pics/avatar3.png'),
78
+ },
79
+ identifier: 9
80
+ },
81
+ {
82
+ avatar: {
83
+ name: 'Person Eleven',
84
+ colorId: 10,
85
+ },
86
+ identifier: 10
87
+ },
88
+ {
89
+ avatar: {
90
+ name: 'Person Twelve',
91
+ colorId: 11,
92
+ },
93
+ identifier: 11
94
+ },
95
+ {
96
+ avatar: {
97
+ name: 'Person Thirteen',
98
+ colorId: 12,
99
+ },
100
+ identifier: 12
101
+ },
102
+ {
103
+ avatar: {
104
+ name: 'Person Fourteen',
105
+ colorId: 14,
106
+ },
107
+ identifier: 14
108
+ },
109
+ {
110
+ avatar: {
111
+ name: 'Person Fifteen',
112
+ colorId: 13,
113
+ },
114
+ identifier: 13
115
+ },
116
+ {
117
+ avatar: {
118
+ name: 'Person Sixteen',
119
+ colorId: 15,
120
+ },
121
+ identifier: 15
122
+ },
123
+ {
124
+ avatar: {
125
+ name: 'Person Seventeen',
126
+ colorId: 16,
127
+ },
128
+ identifier: 16
129
+ },
130
+ {
131
+ avatar: {
132
+ name: 'Person Eighteen',
133
+ colorId: 17,
134
+ },
135
+ identifier: 17
136
+ },
137
+ {
138
+ avatar: {
139
+ name: 'Person Nineteen',
140
+ colorId: 18,
141
+ },
142
+ identifier: 18
143
+ }
144
+ ];
145
+
146
+
5
147
  const baseProps = {
6
148
  emptyListTitle: 'No result found',
7
149
  emptyListMsg: 'We can’t find any item matching your search',
8
150
  imagePath: require('@/stories/assets/pics/avatar1.png'),
9
151
  multiple: false,
10
152
  dataQa: 'vc-list',
153
+ items : checkboxItems.slice(0, 5),
11
154
  }
12
155
 
13
156
  const Template = (args, {argTypes}) => ({
@@ -46,148 +189,109 @@ MultipleWithCheckbox.args = {
46
189
  :disabled="item.disabled"
47
190
  show-border="false"
48
191
  style="padding: 0; margin: 0; flex: 1 1 auto"/>`,
49
- items: [
50
- {
51
- disabled: true,
52
- avatar:
53
- {
54
- name: 'Person One',
55
- path: require('@/stories/assets/pics/avatar4.png'),
56
- },
57
- identifier: 0
58
- },
59
- {
60
- disabled: true,
61
- avatar: {
62
- name: 'Person Two',
63
- path: require('@/stories/assets/pics/avatar2.png'),
64
- },
65
- identifier: 1
66
- },
67
- {
68
- selected: true,
69
- avatar: {
70
- name: 'Person Three',
71
- path: require('@/stories/assets/pics/avatar1.png'),
72
- },
73
- identifier: 2
74
- },
75
- {
76
- selected: true,
77
- avatar: {
78
- name: 'Person Four',
79
- colorId: 3,
80
- },
81
- identifier: 3
82
- },
83
- {
84
- avatar: {
85
- name: 'Person Five',
86
- colorId: 4,
87
- },
88
- identifier: 4
89
- },
90
- {
91
- avatar: {
92
- name: 'Person Six',
93
- path: require('@/stories/assets/pics/avatar2.png'),
94
- },
95
- identifier: 5
96
- },
97
- {
98
- avatar: {
99
- name: 'Person Seven',
100
- colorId: 6,
101
- },
102
- identifier: 6
103
- },
104
- {
105
- avatar: {
106
- name: 'Person Eight',
107
- colorId: 7,
108
- },
109
- identifier: 7
110
- },
111
- {
112
- avatar: {
113
- name: 'Person Nine',
114
- colorId: 8,
115
- },
116
- identifier: 8
117
- },
118
- {
119
- avatar: {
120
- name: 'Person Ten',
121
- path: require('@/stories/assets/pics/avatar3.png'),
122
- },
123
- identifier: 9
124
- },
125
- {
126
- avatar: {
127
- name: 'Person Eleven',
128
- colorId: 10,
129
- },
130
- identifier: 10
131
- },
132
- {
133
- avatar: {
134
- name: 'Person Twelve',
135
- colorId: 11,
136
- },
137
- identifier: 11
138
- },
139
- {
140
- avatar: {
141
- name: 'Person Thirteen',
142
- colorId: 12,
143
- },
144
- identifier: 12
145
- },
146
- {
147
- avatar: {
148
- name: 'Person Fourteen',
149
- colorId: 14,
150
- },
151
- identifier: 14
152
- },
153
- {
154
- avatar: {
155
- name: 'Person Fifteen',
156
- colorId: 13,
157
- },
158
- identifier: 13
159
- },
160
- {
161
- avatar: {
162
- name: 'Person Sixteen',
163
- colorId: 15,
164
- },
165
- identifier: 15
166
- },
167
- {
168
- avatar: {
169
- name: 'Person Seventeen',
170
- colorId: 16,
171
- },
172
- identifier: 16
173
- },
174
- {
175
- avatar: {
176
- name: 'Person Eighteen',
177
- colorId: 17,
178
- },
179
- identifier: 17
180
- },
181
- {
182
- avatar: {
183
- name: 'Person Nineteen',
184
- colorId: 18,
185
- },
186
- identifier: 18
187
- }
188
- ],
189
192
  }
190
193
 
194
+ const iconItems = [
195
+ {
196
+ disabled: true,
197
+ icon: 'flag',
198
+ label: '(GMT-10:00) America/Adak',
199
+ identifier: 0
200
+ },
201
+ {
202
+ disabled: true,
203
+ icon: 'customer',
204
+ label: '(GMT-09:00) Alaska',
205
+ identifier: 1
206
+ },
207
+ {
208
+ selected: true,
209
+ icon: 'inactive',
210
+ label: '(GMT-07:00) Arizona',
211
+ identifier: 2
212
+ },
213
+ {
214
+ icon: 'vip',
215
+ label: '(GMT-06:00) Central Time (US & Canada)',
216
+ identifier: 3
217
+ },
218
+ {
219
+ icon: 'success',
220
+ label: '(GMT-05:00) Eastern Time (US & Canada)',
221
+ identifier: 4
222
+ },
223
+ {
224
+ icon: 'close_button',
225
+ label: '(GMT-12:00) International Date Line West',
226
+ identifier: 5
227
+ },
228
+ {
229
+ icon: 'plus',
230
+ label: '(GMT-11:00) American Samoa',
231
+ identifier: 6
232
+ },
233
+ {
234
+ icon: 'arrow_right',
235
+ label: '(GMT-08:00) Tijuana',
236
+ identifier: 7
237
+ },
238
+ {
239
+ icon: 'warning',
240
+ label: '(GMT-07:00) Chihuahua',
241
+ identifier: 8
242
+ },
243
+ {
244
+ icon: 'warning_fill',
245
+ label: '(GMT-06:00) Mexico City',
246
+ identifier: 9
247
+ },
248
+ {
249
+ icon: 'check_button',
250
+ label: '(GMT-05:00) Lima',
251
+ identifier: 10
252
+ },
253
+ {
254
+ icon: 'check_circle',
255
+ label: '(GMT-04:00) La Paz',
256
+ identifier: 11
257
+ },
258
+ {
259
+ icon: 'check_fill',
260
+ label: '(GMT-03:00) Greenland',
261
+ identifier: 12
262
+ },
263
+ {
264
+ icon: 'info',
265
+ label: '(GMT-02:00) Mid-Atlantic',
266
+ identifier: 14
267
+ },
268
+ {
269
+ icon: 'information',
270
+ label: '(GMT-01:00) Cape Verde Is.',
271
+ identifier: 13
272
+ },
273
+ {
274
+ icon: 'info_fill',
275
+ label: '(GMT+00:00) London',
276
+ identifier: 15
277
+ },
278
+ {
279
+ icon: 'error',
280
+ label: '(GMT+01:00) Berlin',
281
+ identifier: 16
282
+ },
283
+ {
284
+ icon: 'question',
285
+ label: '(GMT+02:00) Jerusalem',
286
+ identifier: 17
287
+ },
288
+ {
289
+ icon: 'attention',
290
+ label: '(GMT+02:00) Sofia',
291
+ identifier: 18
292
+ }
293
+ ];
294
+
191
295
  export const SingleIconAndText = Template.bind({});
192
296
 
193
297
  // Set default values
@@ -195,106 +299,7 @@ SingleIconAndText.args = {
195
299
  ...baseProps,
196
300
  slotContent: `<VcIcon small style="margin-inline-end: 12px">{{ '$' + item.icon }}</VcIcon>
197
301
  <span>{{ item.label }}</span>`,
198
- items: [
199
- {
200
- disabled: true,
201
- icon: 'flag',
202
- label: '(GMT-10:00) America/Adak',
203
- identifier: 0
204
- },
205
- {
206
- disabled: true,
207
- icon: 'customer',
208
- label: '(GMT-09:00) Alaska',
209
- identifier: 1
210
- },
211
- {
212
- selected: true,
213
- icon: 'inactive',
214
- label: '(GMT-07:00) Arizona',
215
- identifier: 2
216
- },
217
- {
218
- icon: 'vip',
219
- label: '(GMT-06:00) Central Time (US & Canada)',
220
- identifier: 3
221
- },
222
- {
223
- icon: 'success',
224
- label: '(GMT-05:00) Eastern Time (US & Canada)',
225
- identifier: 4
226
- },
227
- {
228
- icon: 'close_button',
229
- label: '(GMT-12:00) International Date Line West',
230
- identifier: 5
231
- },
232
- {
233
- icon: 'plus',
234
- label: '(GMT-11:00) American Samoa',
235
- identifier: 6
236
- },
237
- {
238
- icon: 'arrow_right',
239
- label: '(GMT-08:00) Tijuana',
240
- identifier: 7
241
- },
242
- {
243
- icon: 'warning',
244
- label: '(GMT-07:00) Chihuahua',
245
- identifier: 8
246
- },
247
- {
248
- icon: 'warning_fill',
249
- label: '(GMT-06:00) Mexico City',
250
- identifier: 9
251
- },
252
- {
253
- icon: 'check_button',
254
- label: '(GMT-05:00) Lima',
255
- identifier: 10
256
- },
257
- {
258
- icon: 'check_circle',
259
- label: '(GMT-04:00) La Paz',
260
- identifier: 11
261
- },
262
- {
263
- icon: 'check_fill',
264
- label: '(GMT-03:00) Greenland',
265
- identifier: 12
266
- },
267
- {
268
- icon: 'info',
269
- label: '(GMT-02:00) Mid-Atlantic',
270
- identifier: 14
271
- },
272
- {
273
- icon: 'information',
274
- label: '(GMT-01:00) Cape Verde Is.',
275
- identifier: 13
276
- },
277
- {
278
- icon: 'info_fill',
279
- label: '(GMT+00:00) London',
280
- identifier: 15
281
- },
282
- {
283
- icon: 'error',
284
- label: '(GMT+01:00) Berlin',
285
- identifier: 16
286
- },
287
- {
288
- icon: 'question',
289
- label: '(GMT+02:00) Jerusalem',
290
- identifier: 17
291
- },
292
- {
293
- icon: 'attention',
294
- label: '(GMT+02:00) Sofia',
295
- identifier: 18
296
- }
297
- ]
302
+ items: iconItems.slice(0, 5),
298
303
  }
299
304
 
300
305
  export default {
@@ -1,7 +1,6 @@
1
1
  <template>
2
- <div :data-qa="dataQa">
3
- <ul v-if="!isEmptyList"
4
- class="vc-list">
2
+ <div :data-qa="dataQa" class="vc-list-container">
3
+ <ul v-if="!isEmptyList" class="vc-list">
5
4
  <VcBaseListItem v-for="item in items"
6
5
  v-bind="item"
7
6
  :key="item.identifier"
@@ -15,7 +14,7 @@
15
14
  </ul>
16
15
  <template v-else>
17
16
  <slot name="emptyList">
18
- <VcEmptyState :title="noItemsTitle" :subtitle="noItemsMsg" size="sm"
17
+ <VcEmptyState :title="noItemsTitle" :subtitle="noItemsMsg" size="sm" class="VcListEmptyState"
19
18
  :data-qa="`${dataQa}-empty`"
20
19
  :image="imagePath"/>
21
20
  </slot>
@@ -73,9 +72,17 @@ export default {
73
72
  </script>
74
73
 
75
74
  <style lang="scss" scoped>
75
+ .vc-list-container {
76
+ width: 100%;
77
+ }
76
78
 
77
79
  .vc-list {
80
+ width: 100%;
78
81
  margin: var(--size-value0);
79
82
  padding: var(--size-value0);
80
83
  }
84
+
85
+ .VcListEmptyState {
86
+ margin: var(--size-value4);
87
+ }
81
88
  </style>
@@ -9,24 +9,24 @@ const Template = (args, {argTypes}) => ({
9
9
  template: `
10
10
  <div>
11
11
  <div :style="{borderBottom: '2px solid black', paddingBottom: '5px', marginBottom: '20px'}">
12
- A simple centered layout, which expands and collapses the content area based on minimum and maximum width,
12
+ A simple centered layout, which expands and collapses the content area based on minimum and maximum width,
13
13
  and keeps the header in sync.
14
14
  <br>To use, go to "Docs" and click "show code".
15
15
  </div>
16
- <VcLayout justify-center :style="{padding: 'var(--size-value5)'}">
17
- <VcLayout column :style="{minWidth: 'var(--centered-layout-min-width)', maxWidth: 'var(--centered-layout-max-width)', flexBasis: 'var(--centered-layout-min-width)'}">
18
- <VcPageHeader :title="title"
19
- :subtitle="subtitle"
20
- :show-back-button="showBackButton"
21
- :breadcrumbs="breadcrumbs"
22
- :button-data="headerButtonData"
23
- @onSaveClicked="onSaveClicked"
24
- @onBackClicked="onBackClicked"/>
25
- <VcLayout align-center justify-center
26
- :style="{ minHeight: '300px', backgroundColor: 'var(--green-lighten-2)'}">
27
- Your content goes here
28
- </VcLayout>
16
+ <VcLayout justify-center align-start :style="{margin: 'var(--size-value5)', height: '100%'}">
17
+ <VcLayout column :style="{minWidth: 'var(--centered-layout-min-width)', maxWidth: 'var(--centered-layout-max-width)', flexBasis: 'var(--centered-layout-min-width)'}">
18
+ <VcPageHeader :title="title"
19
+ :subtitle="subtitle"
20
+ :show-back-button="showBackButton"
21
+ :breadcrumbs="breadcrumbs"
22
+ :button-data="headerButtonData"
23
+ @onSaveClicked="onSaveClicked"
24
+ @onBackClicked="onBackClicked"/>
25
+ <VcLayout align-center justify-center
26
+ :style="{ minHeight: '300px', backgroundColor: 'var(--green-lighten-2)'}">
27
+ Your content goes here
29
28
  </VcLayout>
29
+ </VcLayout>
30
30
  </VcLayout>
31
31
  </div>`,
32
32
  })
@@ -47,7 +47,7 @@ Playground.parameters = {
47
47
  source: {
48
48
  code: `
49
49
  <template>
50
- <VcLayout justify-center class="LayoutContainer">
50
+ <VcLayout justify-center align-start class="LayoutContainer">
51
51
  <VcLayout column class="MainLayout">
52
52
  <VcPageHeader :title="$t([YourPageTitle])"
53
53
  :subtitle="$t([YourPageSubtitle])"
@@ -124,7 +124,8 @@ Playground.parameters = {
124
124
 
125
125
  <style lang="scss" scoped>
126
126
  .LayoutContainer {
127
- padding: var(--size-value5);
127
+ margin: var(--size-value5);
128
+ height: 100%;
128
129
  }
129
130
 
130
131
  .MainLayout {
@@ -28,6 +28,7 @@
28
28
  }
29
29
 
30
30
  --border-radius: 6px;
31
+ --border-radius-circle: 50%;
31
32
  --border-frame: 1px solid #e0e0e0;
32
33
  --border-focused-frame: 1px solid var(--v-secondary-base);
33
34
  --shadow-focused-frame: 0px 0px 0px 3px var(--v-secondary-lighten1);
@@ -33,4 +33,12 @@ $switch-ripple-top: calc(50% - 20px);
33
33
  $snackbar-content-padding: 0;
34
34
 
35
35
  // Select Field
36
- $select-field-height: 52px;
36
+ $select-field-height: 52px;
37
+
38
+ // Color Picker
39
+ $color-picker-swatch-color-width: 24px;
40
+ $color-picker-swatch-color-height: 24px;
41
+ $color-picker-swatch-color-margin: 5px;
42
+ $color-picker-controls-padding: 8px;
43
+ $color-picker-swatch-color-border-radius: 50%;
44
+ $color-picker-border-radius: 4px;