@vcita/design-system 0.2.7 → 0.2.11
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 +14 -0
- package/README.md +1 -0
- package/dist/@vcita/design-system.esm.js +736 -435
- package/dist/@vcita/design-system.min.js +1 -1
- package/dist/@vcita/design-system.ssr.js +665 -379
- package/init/DesignSystem.js +18 -2
- package/init/SvgIcons.js +4 -0
- package/init/vuetify.config.js +3 -3
- package/package.json +1 -1
- package/src/components/VcActionList/VcActionList.spec.js +1 -1
- package/src/components/VcActionList/VcActionList.stories.js +1 -1
- package/src/components/VcActionList/VcActionList.vue +1 -0
- package/src/components/VcActions/VcActions.spec.js +1 -1
- package/src/components/VcActions/VcActions.stories.js +1 -1
- package/src/components/VcActions/VcActions.vue +4 -6
- package/src/components/VcBanner/VcBanner.stories.js +14 -2
- package/src/components/VcBanner/VcBanner.vue +5 -2
- package/src/components/VcBottomActions/VcBottomActions.spec.js +1 -1
- package/src/components/VcBottomActions/VcBottomActions.stories.js +3 -3
- package/src/components/VcCard/VcCard.vue +1 -0
- package/src/components/VcEmptyState/VcEmptyState.vue +1 -1
- package/src/components/VcExpansionCard/VcExpansionCard.spec.js +146 -0
- package/src/components/VcExpansionCard/VcExpansionCard.stories.js +43 -0
- package/src/components/VcExpansionCard/VcExpansionCard.vue +117 -0
- package/src/components/VcSwitch/VcSwitch.spec.js +40 -0
- package/src/components/VcSwitch/VcSwitch.stories.js +14 -3
- package/src/components/VcSwitch/VcSwitch.vue +162 -52
- package/src/components/index.js +2 -0
- package/src/components/list/VcListEntity/VcListEntity.spec.js +95 -0
- package/src/components/list/VcListEntity/VcListEntity.stories.js +77 -0
- package/src/components/list/VcListEntity/VcListEntity.vue +70 -0
- package/src/components/modal/VcConfirmModal/VcConfirmModal.vue +6 -2
- package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.stories.js +2 -0
- package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.vue +5 -0
- package/src/components/modal/VcInputModal/VcInputModal.stories.js +8 -1
- package/src/components/modal/VcInputModal/VcInputModal.vue +6 -1
- package/src/components/modal/VcNoticeModal/VcNoticeModal.stories.js +6 -1
- package/src/components/modal/VcNoticeModal/VcNoticeModal.vue +5 -1
- package/src/components/wizard/VcSteperContent/VcStepperContent.vue +6 -0
- package/src/components/wizard/VcWizard/VcWizard.spec.js +7 -0
- package/src/components/wizard/VcWizard/VcWizard.stories.js +3 -0
- package/src/components/wizard/VcWizard/VcWizard.vue +12 -4
- package/src/components/wizard/VcWizard/demoWizardPage.vue +1 -1
- package/src/stories/welcome.stories.mdx +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VcModalContainer showHeaderDivider showCloseButton flavor="input"
|
|
3
|
-
:
|
|
3
|
+
:useOffset="useOffset" :showDialog="showDialog"
|
|
4
|
+
:size="$vuetify.breakpoint.mdAndUp ? size : 'responsive'"
|
|
4
5
|
@onCloseButtonClicked="$emit('onCloseButtonClicked')">
|
|
5
6
|
<template #header>
|
|
6
7
|
<slot name="header">
|
|
@@ -74,6 +75,10 @@ export default {
|
|
|
74
75
|
type: String,
|
|
75
76
|
required: false,
|
|
76
77
|
},
|
|
78
|
+
useOffset: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true
|
|
81
|
+
},
|
|
77
82
|
size: {
|
|
78
83
|
type: String,
|
|
79
84
|
default: 'lg', // required
|
|
@@ -14,6 +14,7 @@ const Template = (args, {argTypes}) => ({
|
|
|
14
14
|
template: `
|
|
15
15
|
<div>
|
|
16
16
|
<VcNoticeModal :show-dialog="showDialog"
|
|
17
|
+
:useOffset="useOffset"
|
|
17
18
|
:title-text="titleText"
|
|
18
19
|
:subtitle-text="subtitleText"
|
|
19
20
|
:icon="iconParam"
|
|
@@ -32,6 +33,7 @@ export const Playground = Template.bind({});
|
|
|
32
33
|
// Set default values
|
|
33
34
|
Playground.args = {
|
|
34
35
|
showDialog: true,
|
|
36
|
+
useOffset: false,
|
|
35
37
|
titleText: 'Notice header text',
|
|
36
38
|
subtitleText: 'some more information about this issue, and some more information about this issue',
|
|
37
39
|
contentText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
@@ -49,6 +51,7 @@ const TemplateUsingSlot = (args, {argTypes}) => ({
|
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
template: '<div><VcNoticeModal :show-dialog="showDialog" ' +
|
|
54
|
+
':useOffset="useOffset" ' +
|
|
52
55
|
':title-text="titleText" ' +
|
|
53
56
|
':subtitle-text="subtitleText" ' +
|
|
54
57
|
':icon="iconParam" ' +
|
|
@@ -69,6 +72,7 @@ export const UsingContentSlot = TemplateUsingSlot.bind({});
|
|
|
69
72
|
// Set default values
|
|
70
73
|
UsingContentSlot.args = {
|
|
71
74
|
showDialog: true,
|
|
75
|
+
useOffset: false,
|
|
72
76
|
titleText: 'Notice header text',
|
|
73
77
|
subtitleText: 'some more information about this issue, and some more information about this issue',
|
|
74
78
|
contentText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
@@ -84,7 +88,7 @@ const TemplateUsingFooterSlot = (args, {argTypes}) => ({
|
|
|
84
88
|
},
|
|
85
89
|
},
|
|
86
90
|
template: `
|
|
87
|
-
<VcNoticeModal :show-dialog="showDialog" :title-text="titleText" :subtitle-text="subtitleText"
|
|
91
|
+
<VcNoticeModal :show-dialog="showDialog" :useOffset="useOffset" :title-text="titleText" :subtitle-text="subtitleText"
|
|
88
92
|
:content-text="contentText" :icon="iconParam" :size="size"
|
|
89
93
|
@onCloseButtonClicked="onCloseButtonClicked" @onOkClicked="onOkClicked"
|
|
90
94
|
@onCancelClicked="onCancelClicked">
|
|
@@ -109,6 +113,7 @@ export const UsingFooterSlot = TemplateUsingFooterSlot.bind({});
|
|
|
109
113
|
// Set default values
|
|
110
114
|
UsingFooterSlot.args = {
|
|
111
115
|
showDialog: true,
|
|
116
|
+
useOffset: false,
|
|
112
117
|
titleText: 'Notice header text',
|
|
113
118
|
subtitleText: 'some more information about this issue, and some more information about this issue',
|
|
114
119
|
contentText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VcModalContainer :showFooterDivider="flavor === 'prominent'" :flavor="flavor"
|
|
3
|
-
:showDialog="showDialog"
|
|
3
|
+
:useOffset="useOffset" :showDialog="showDialog"
|
|
4
4
|
:size="$vuetify.breakpoint.mdAndUp ? size : 'responsive'"
|
|
5
5
|
showCloseButton
|
|
6
6
|
@onCloseButtonClicked="$emit('onCloseButtonClicked')">
|
|
@@ -61,6 +61,10 @@ export default {
|
|
|
61
61
|
type: String,
|
|
62
62
|
required: false
|
|
63
63
|
},
|
|
64
|
+
useOffset: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
64
68
|
size: {
|
|
65
69
|
type: String,
|
|
66
70
|
default: 'lg', // required
|
|
@@ -122,14 +122,20 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
}
|
|
124
124
|
.layout-content {
|
|
125
|
+
padding: var(--size-value0) var(--size-value4);
|
|
125
126
|
@include md-and-up {
|
|
127
|
+
padding: revert;
|
|
126
128
|
padding-block-start: var(--size-value3);
|
|
127
129
|
padding-inline: var(--size-value10);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
.stepper-header {
|
|
133
|
+
flex: 0;
|
|
131
134
|
margin-block-end: var(--size-value7);
|
|
135
|
+
padding: var(--size-value0) var(--size-value4);
|
|
132
136
|
@include md-and-up {
|
|
137
|
+
padding: revert;
|
|
138
|
+
flex: revert;
|
|
133
139
|
padding-block-start: var(--size-value3);
|
|
134
140
|
padding-inline: var(--size-value10);
|
|
135
141
|
}
|
|
@@ -120,6 +120,11 @@ describe("VcWizard.vue", () => {
|
|
|
120
120
|
props: {
|
|
121
121
|
steps: defaultSteps,
|
|
122
122
|
dataQa: 'vcWizard',
|
|
123
|
+
initialWizardData: {
|
|
124
|
+
textFieldValue: 'initial value'
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
|
|
123
128
|
}
|
|
124
129
|
})
|
|
125
130
|
const stepperElement = getByTestId("vc-steps-bar")
|
|
@@ -132,6 +137,8 @@ describe("VcWizard.vue", () => {
|
|
|
132
137
|
expect(nextButton).toHaveClass('v-btn--disabled')
|
|
133
138
|
|
|
134
139
|
const textInput = await findByTestId('text-input')
|
|
140
|
+
expect(textInput.value).toBe('initial value')
|
|
141
|
+
await userEvent.clear(textInput)
|
|
135
142
|
await userEvent.type(textInput, "1");
|
|
136
143
|
await userEvent.type(textInput, "2");
|
|
137
144
|
await userEvent.type(textInput, "3");
|
|
@@ -41,6 +41,10 @@ export default {
|
|
|
41
41
|
name: "VcWizard",
|
|
42
42
|
components: {VcStepsBar, VcStepperContent, VcMobileWizardProgress, VcWizardCtaContainer},
|
|
43
43
|
props: {
|
|
44
|
+
initialWizardData: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: () => ({}),
|
|
47
|
+
},
|
|
44
48
|
steps: {
|
|
45
49
|
type: [Array],
|
|
46
50
|
validator: steps => steps.every(step => step.name),
|
|
@@ -87,13 +91,16 @@ export default {
|
|
|
87
91
|
if(this.currentStep < this.wizardSteps.length) {
|
|
88
92
|
this.currentStep++;
|
|
89
93
|
} else {
|
|
90
|
-
this.$emit('submit', this.
|
|
94
|
+
this.$emit('submit', this.wizardData)
|
|
91
95
|
}
|
|
92
96
|
},
|
|
93
97
|
},
|
|
94
98
|
computed: {
|
|
95
99
|
wizardData() {
|
|
96
|
-
return Object.values(this.wizardStepsData).reduce((acc, currentValue) =>
|
|
100
|
+
return Object.values(this.wizardStepsData).reduce((acc, currentValue) => {
|
|
101
|
+
Object.assign(acc,currentValue)
|
|
102
|
+
return acc
|
|
103
|
+
}, {...this.initialWizardData})
|
|
97
104
|
},
|
|
98
105
|
currentStepObj() {
|
|
99
106
|
return this.wizardSteps[this.currentStep - 1]
|
|
@@ -120,8 +127,8 @@ export default {
|
|
|
120
127
|
height: 100%;
|
|
121
128
|
@include md-and-up {
|
|
122
129
|
display: grid;
|
|
123
|
-
grid-template-columns: minmax(
|
|
124
|
-
grid-template-rows:
|
|
130
|
+
grid-template-columns: minmax(250px,1fr) 3fr;
|
|
131
|
+
grid-template-rows: 562px 80px;
|
|
125
132
|
grid-column-gap: var(--size-value10);
|
|
126
133
|
grid-row-gap: 0px;
|
|
127
134
|
}
|
|
@@ -133,6 +140,7 @@ export default {
|
|
|
133
140
|
.vc-stepper-container {
|
|
134
141
|
grid-area: 1 / 1 / 3 / 2;
|
|
135
142
|
border-inline-end: 1px solid #E0E0E0;
|
|
143
|
+
max-height: calc( 100% - 24px );
|
|
136
144
|
}
|
|
137
145
|
.wizard-cta-container {
|
|
138
146
|
grid-area: 2 / 2 / 3 / 3;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<v-btn @click="$emit('submit', {stepData: {backButtonLabel: 'new text'}} )" data-qa="test-button" class="demo-page-button">
|
|
4
4
|
demo button text
|
|
5
5
|
</v-btn>
|
|
6
|
-
<VcTextArea data-qa="text-input" class="text-input" placeholder="enter 123 to proceed" @input="(data) => $emit('submit', {wizardData: {textFieldValue: data}} )" >
|
|
6
|
+
<VcTextArea :value="textFieldValue" data-qa="text-input" class="text-input" placeholder="enter 123 to proceed" @input="(data) => $emit('submit', {wizardData: {textFieldValue: data}} )" >
|
|
7
7
|
|
|
8
8
|
</VcTextArea>
|
|
9
9
|
<v-layout>
|
|
@@ -179,6 +179,7 @@ Setting their values will allow you to control different aspects of the display
|
|
|
179
179
|
<div><code>--size-value7: 28px;</code></div>
|
|
180
180
|
<div><code>--size-value8: 32px;</code></div>
|
|
181
181
|
<div><code>--size-value10: 40px;</code></div>
|
|
182
|
+
<div><code>--size-value12: 48px;</code></div>
|
|
182
183
|
<div><code>--size-value16: 64px;</code></div>
|
|
183
184
|
|
|
184
185
|
|