@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.
Files changed (44) hide show
  1. package/CHANGELOG.MD +14 -0
  2. package/README.md +1 -0
  3. package/dist/@vcita/design-system.esm.js +736 -435
  4. package/dist/@vcita/design-system.min.js +1 -1
  5. package/dist/@vcita/design-system.ssr.js +665 -379
  6. package/init/DesignSystem.js +18 -2
  7. package/init/SvgIcons.js +4 -0
  8. package/init/vuetify.config.js +3 -3
  9. package/package.json +1 -1
  10. package/src/components/VcActionList/VcActionList.spec.js +1 -1
  11. package/src/components/VcActionList/VcActionList.stories.js +1 -1
  12. package/src/components/VcActionList/VcActionList.vue +1 -0
  13. package/src/components/VcActions/VcActions.spec.js +1 -1
  14. package/src/components/VcActions/VcActions.stories.js +1 -1
  15. package/src/components/VcActions/VcActions.vue +4 -6
  16. package/src/components/VcBanner/VcBanner.stories.js +14 -2
  17. package/src/components/VcBanner/VcBanner.vue +5 -2
  18. package/src/components/VcBottomActions/VcBottomActions.spec.js +1 -1
  19. package/src/components/VcBottomActions/VcBottomActions.stories.js +3 -3
  20. package/src/components/VcCard/VcCard.vue +1 -0
  21. package/src/components/VcEmptyState/VcEmptyState.vue +1 -1
  22. package/src/components/VcExpansionCard/VcExpansionCard.spec.js +146 -0
  23. package/src/components/VcExpansionCard/VcExpansionCard.stories.js +43 -0
  24. package/src/components/VcExpansionCard/VcExpansionCard.vue +117 -0
  25. package/src/components/VcSwitch/VcSwitch.spec.js +40 -0
  26. package/src/components/VcSwitch/VcSwitch.stories.js +14 -3
  27. package/src/components/VcSwitch/VcSwitch.vue +162 -52
  28. package/src/components/index.js +2 -0
  29. package/src/components/list/VcListEntity/VcListEntity.spec.js +95 -0
  30. package/src/components/list/VcListEntity/VcListEntity.stories.js +77 -0
  31. package/src/components/list/VcListEntity/VcListEntity.vue +70 -0
  32. package/src/components/modal/VcConfirmModal/VcConfirmModal.vue +6 -2
  33. package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.stories.js +2 -0
  34. package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.vue +5 -0
  35. package/src/components/modal/VcInputModal/VcInputModal.stories.js +8 -1
  36. package/src/components/modal/VcInputModal/VcInputModal.vue +6 -1
  37. package/src/components/modal/VcNoticeModal/VcNoticeModal.stories.js +6 -1
  38. package/src/components/modal/VcNoticeModal/VcNoticeModal.vue +5 -1
  39. package/src/components/wizard/VcSteperContent/VcStepperContent.vue +6 -0
  40. package/src/components/wizard/VcWizard/VcWizard.spec.js +7 -0
  41. package/src/components/wizard/VcWizard/VcWizard.stories.js +3 -0
  42. package/src/components/wizard/VcWizard/VcWizard.vue +12 -4
  43. package/src/components/wizard/VcWizard/demoWizardPage.vue +1 -1
  44. package/src/stories/welcome.stories.mdx +1 -0
@@ -9,7 +9,7 @@ const Template = (args, {argTypes}) => ({
9
9
  data: () => ({
10
10
  itemValue: true,
11
11
  }),
12
- template: '<div><VcSwitch v-model="itemValue" color="secondary" :label="label" :ripple="ripple" :disabled="disabled" @input="onChange"/></div>',
12
+ template: '<div><VcSwitch v-model="itemValue" color="secondary" :label="label" :ripple="ripple" :disabled="disabled" @input="onChange" :icon="icon" /></div>',
13
13
  })
14
14
 
15
15
  export const Playground = Template.bind({});
@@ -20,6 +20,7 @@ Playground.args = {
20
20
  onChange: action("input"),
21
21
  ripple: true,
22
22
  disabled: false,
23
+ icon: false,
23
24
  }
24
25
 
25
26
  const TemplateDisabled = (args, {argTypes}) => ({
@@ -28,7 +29,7 @@ const TemplateDisabled = (args, {argTypes}) => ({
28
29
  data: () => ({
29
30
  itemValue: true,
30
31
  }),
31
- template: '<div><VcSwitch v-model="itemValue" color="secondary" :label="label" :ripple="ripple" :disabled="disabled" @input="onChange"/></div>',
32
+ template: '<div><VcSwitch v-model="itemValue" color="secondary" :label="label" :ripple="ripple" :disabled="disabled" @input="onChange" :icon="icon" /></div>',
32
33
  })
33
34
 
34
35
  export const Disabled = TemplateDisabled.bind({});
@@ -70,6 +71,16 @@ LabelInSlot.args = {
70
71
  disabled: false,
71
72
  }
72
73
 
74
+ export const WithIcon = Template.bind({});
75
+
76
+ // Set default values
77
+ WithIcon.args = {
78
+ value: true,
79
+ onChange: action("input"),
80
+ disabled: false,
81
+ icon: true,
82
+ }
83
+
73
84
  export default {
74
85
  title: 'Form / VcSwitch',
75
86
  id: 'VcSwitch',
@@ -84,4 +95,4 @@ export default {
84
95
  url: 'http://www.url.com/status', // will make the tag a link
85
96
  },
86
97
  },
87
- };
98
+ };
@@ -1,21 +1,27 @@
1
1
  <template>
2
+ <div class="switchContainer" :class="{'with-icon': icon}">
2
3
  <v-switch inset hide-details
3
4
  class="VcSwitch"
4
- :class="{'is-active': value,}"
5
+ :class="{'is-active': value, 'with-icon': icon}"
5
6
  :label="label"
6
7
  :ripple="ripple"
7
8
  :input-value="value"
8
9
  :color="color"
9
10
  :disabled="disabled"
10
- @change="val => $emit('input', Boolean(val))">
11
+ @change="onChange">
11
12
  <template #label>
12
13
  <slot name="label"/>
13
14
  </template>
14
15
  </v-switch>
16
+ <VcIcon v-if="icon&value" class="VcSwitchIcon VcSwitchIconV" size="10">$check_button</VcIcon>
17
+ <VcIcon v-if="icon&!value" class="VcSwitchIcon VcSwitchIconX" size="10">$close_button</VcIcon>
18
+ </div>
15
19
  </template>
16
20
 
17
21
  <script>
22
+ import VcIcon from '../VcIcon/VcIcon.vue'
18
23
  export default {
24
+ components: { VcIcon },
19
25
  name: "VcSwitch",
20
26
  props: {
21
27
  value: {
@@ -37,85 +43,189 @@ export default {
37
43
  disabled: {
38
44
  type: Boolean,
39
45
  default: false
46
+ },
47
+ icon: {
48
+ type: Boolean,
49
+ default: false
40
50
  }
41
51
  },
52
+ methods:{
53
+ onChange: function (id) {
54
+ this.$emit('input', id)
55
+ }
56
+ }
42
57
  }
43
58
  </script>
44
59
 
45
60
  <style lang="scss" scoped>
46
61
  @import "../../scss/_i18n-mixins.scss";
47
62
 
48
- .VcSwitch {
49
- padding: 0;
50
- margin: 0;
63
+ .switchContainer{
64
+
65
+ & .VcSwitch {
66
+ padding: 0;
67
+ margin: 0;
51
68
 
52
- ::v-deep {
53
- label {
54
- font-size: var(--font-size-small);
55
- font-weight: var(--font-weight-medium);
56
- line-height: var(--size-value6);
57
- color: rgba(0, 0, 0, 0.87);
58
- }
69
+ ::v-deep {
70
+ label {
71
+ font-size: var(--font-size-small);
72
+ font-weight: var(--font-weight-medium);
73
+ line-height: var(--size-value6);
74
+ color: rgba(0, 0, 0, 0.87);
75
+ }
59
76
 
60
- input {
61
- height: var(--size-value5);
62
- }
77
+ input {
78
+ height: var(--size-value5);
79
+ }
63
80
 
64
- .v-input--selection-controls__input {
65
- @include i-margin-mirror(0, var(--size-value3));
66
- height: var(--size-value5);
67
- width: var(--size-value8);
68
- }
69
- .v-input--switch__track {
70
- top: 0;
71
- @include i-position-mirror(left, 0);
81
+ .v-input--selection-controls__input {
82
+ @include i-margin-mirror(0, var(--size-value3));
83
+ height: var(--size-value5);
84
+ width: var(--size-value8);
85
+ }
86
+ .v-input--switch__track {
87
+ top: 0;
88
+ @include i-position-mirror(left, 0);
89
+ }
90
+
91
+ .v-input--selection-controls__ripple {
92
+ @include i-position-mirror(left, -10px);
93
+ height: 25px;
94
+ width: 25px;
95
+ }
96
+
97
+ .v-input--switch__thumb {
98
+ height: 14px;
99
+ width: 14px;
100
+ background-color: #fff;
101
+ top: calc(50% - 7px);
102
+ @include i-translate-x(3px, '!');
103
+ box-shadow: var(--shadow-5);
104
+ }
72
105
  }
73
106
 
74
- .v-input--selection-controls__ripple {
75
- @include i-position-mirror(left, -10px);
76
- height: 25px;
77
- width: 25px;
107
+ &.v-input--is-disabled{
108
+ ::v-deep {
109
+ opacity: 1;
110
+ .v-input--switch__track{
111
+ color: var(--gray-lighten-2) !important;
112
+ }
113
+
114
+ .v-input--switch__thumb{
115
+ background-color: var(--gray) !important;
116
+ box-shadow: none;
117
+ }
118
+ }
78
119
  }
79
120
 
80
- .v-input--switch__thumb {
81
- height: 14px;
82
- width: 14px;
83
- background-color: #fff;
84
- top: calc(50% - 7px);
85
- @include i-translate-x(3px, '!');
86
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.141176), 0 1px 3px rgba(0, 0, 0, 0.2);
121
+ &.is-active {
122
+ ::v-deep {
123
+ .v-input--switch__track {
124
+ opacity: 1;
125
+ background-color: currentColor;
126
+ }
127
+
128
+ .v-input--selection-controls__ripple {
129
+ @include i-translate-x(14px, '!');
130
+ }
131
+
132
+ .v-input--switch__thumb {
133
+ @include i-translate-x(17px, '!');
134
+ }
135
+ }
87
136
  }
88
- }
89
137
 
90
- &.v-input--is-disabled{
91
- ::v-deep {
92
- opacity: 1;
93
- .v-input--switch__track{
94
- color: #EDEDED !important;
138
+ &.with-icon {
139
+ ::v-deep {
140
+
141
+ input {
142
+ height: var(--size-value6);
95
143
  }
96
144
 
97
- .v-input--switch__thumb{
98
- background-color: #E0E0E0 !important;
99
- box-shadow: none;
145
+ .v-input--selection-controls__input {
146
+ @include i-margin-mirror(0, var(--size-value3));
147
+ height: var(--size-value6);
148
+ width: var(--size-value12);
100
149
  }
101
- }
102
- }
103
-
104
- &.is-active {
105
- ::v-deep {
106
150
  .v-input--switch__track {
107
- opacity: 1;
108
- background-color: currentColor;
151
+ top: 0;
152
+ @include i-position-mirror(left, 0);
153
+ height: var(--size-value6);
154
+ width: var(--size-value12);
109
155
  }
110
156
 
111
157
  .v-input--selection-controls__ripple {
112
- @include i-translate-x(14px, '!');
158
+ @include i-position-mirror(left, -9px);
159
+ height: 29px;
160
+ width: 29px;
161
+ top: calc(50% - 21.5px);
113
162
  }
114
163
 
115
164
  .v-input--switch__thumb {
116
- @include i-translate-x(17px, '!');
165
+ height: 18px;
166
+ width: 18px;
167
+ top: calc(50% - 9px);
168
+ @include i-translate-x(3.5px, '!');
169
+ }
170
+ }
171
+
172
+ &.v-input--is-disabled{
173
+ ::v-deep {
174
+ opacity: 1;
175
+ .v-input--switch__track{
176
+ color: var(--gray-lighten-2) !important;
177
+ }
178
+
179
+ .v-input--switch__thumb{
180
+ background-color: var(--gray) !important;
181
+ box-shadow: none;
182
+ }
183
+ }
184
+
185
+ & + .VcSwitchIcon{
186
+ fill: var(--gray-lighten-2) !important;
117
187
  }
118
188
  }
189
+
190
+ &.is-active {
191
+ ::v-deep {
192
+ .v-input--switch__track {
193
+ opacity: 1;
194
+ background-color: currentColor;
195
+ }
196
+
197
+ .v-input--selection-controls__ripple {
198
+ @include i-translate-x(23.5px, '!');
199
+ }
200
+
201
+ .v-input--switch__thumb {
202
+ @include i-translate-x(26px, '!');
203
+ }
204
+ }
205
+ }
206
+
207
+ }
208
+ }
209
+
210
+ & .VcSwitchIcon{
211
+ position: relative;
212
+ }
213
+ & .VcSwitchIconV{
214
+ left: 30px;
215
+ top: -47px;
216
+ margin-bottom: -47px;
217
+ fill: var(--v-secondary-base);
218
+ }
219
+
220
+ & .VcSwitchIconX{
221
+ left: 7.4px;
222
+ top: -51px;
223
+ margin-bottom: -51px;
224
+ fill: var(--neutral-lighten-1);
225
+ }
226
+
227
+ &.with-icon{
228
+ height: var(--size-value6);
119
229
  }
120
230
  }
121
231
 
@@ -21,6 +21,8 @@ export {default as VcIcon} from './VcIcon/VcIcon.vue';
21
21
  export {default as VcLayout} from './VcLayout/VcLayout.vue';
22
22
  export {default as VcLoader} from './VcLoader/VcLoader.vue';
23
23
  export {default as VcSwitch} from './VcSwitch/VcSwitch.vue';
24
+ export {default as VcListEntity} from './list/VcListEntity/VcListEntity.vue';
25
+ export {default as VcExpansionCard} from './VcExpansionCard/VcExpansionCard.vue';
24
26
  export {default as VcTextField} from './VcTextField/VcTextField.vue';
25
27
  export {default as VcAvatar} from './VcAvatar/VcAvatar.vue';
26
28
  export {default as VcTextArea} from './VcTextArea/VcTextArea.vue';
@@ -0,0 +1,95 @@
1
+ import '@testing-library/jest-dom';
2
+ import VcListEntity from "./VcListEntity.vue";
3
+ import init from "../../../../testing-library.config"
4
+ import Vuetify from 'vuetify';
5
+ import {render} from "@testing-library/vue";
6
+ import {fireEvent} from '@testing-library/dom'
7
+
8
+ init();
9
+
10
+
11
+ const props = {
12
+ basic: {
13
+ title: 'first entity',
14
+ value: true
15
+ },
16
+ };
17
+
18
+ describe("VcListEntity.vue", () => {
19
+
20
+ const renderWithVuetify = (component, options, callback) => {
21
+ const root = document.createElement('div')
22
+ root.setAttribute('data-app', 'true')
23
+
24
+ return render(
25
+ component,
26
+ {
27
+ container: document.body.appendChild(root),
28
+ // for Vuetify components that use the vuetify instance property
29
+ vuetify: new Vuetify(),
30
+ ...options,
31
+ mocks: {},
32
+ },
33
+ callback,
34
+ )
35
+ }
36
+
37
+ it("render VcListEntity", () => {
38
+ // Queries: https://testing-library.com/docs/queries/about#types-of-queries
39
+ const {container, getByTestId, getByText} = renderWithVuetify(VcListEntity, {
40
+ props: props.basic
41
+ })
42
+
43
+ // Expect options: https://github.com/testing-library/jest-dom
44
+ expect(container).toHaveAttribute('data-app', 'true')
45
+
46
+
47
+ const component = getByTestId('VcListEntity');
48
+ expect(component).toBeInTheDocument();
49
+
50
+ const title = getByText('first entity');
51
+ expect(title).toBeInTheDocument();
52
+ });
53
+
54
+ it("render VcListEntity with icon slot", () => {
55
+ // Queries: https://testing-library.com/docs/queries/about#types-of-queries
56
+ const {container, getByTestId, getByText} = renderWithVuetify(VcListEntity, {
57
+ props: props.basic,
58
+ slots: {
59
+ icon: '<div>icon</div>',
60
+ },
61
+ })
62
+
63
+ // Expect options: https://github.com/testing-library/jest-dom
64
+ expect(container).toHaveAttribute('data-app', 'true')
65
+
66
+
67
+ const component = getByTestId('VcListEntity');
68
+ expect(component).toBeInTheDocument();
69
+
70
+ const title = getByText('first entity');
71
+ expect(title).toBeInTheDocument();
72
+
73
+ const slotIcon = getByText('icon');
74
+ expect(slotIcon).toBeInTheDocument();
75
+ });
76
+
77
+ it('event emitted',async () => {
78
+ const {emitted,getByRole} = renderWithVuetify(VcListEntity, {
79
+ props: props.basic,
80
+ })
81
+
82
+ const switchName = getByRole('switch');
83
+ expect(switchName).toBeInTheDocument();
84
+ expect(switchName).toHaveAttribute('aria-checked',"true");
85
+
86
+ await fireEvent.click(switchName);
87
+ expect(switchName).toHaveAttribute('aria-checked',"false");
88
+ expect(emitted().input.length).toBe(1);
89
+
90
+ await fireEvent.click(switchName);
91
+ expect(switchName).toHaveAttribute('aria-checked',"true");
92
+ expect(emitted().input.length).toBe(2);
93
+ })
94
+
95
+ });
@@ -0,0 +1,77 @@
1
+ import VcListEntityCmp from './VcListEntity.vue';
2
+
3
+ const Template = (args, {argTypes}) => ({
4
+ components: {VcListEntity: VcListEntityCmp},
5
+ props: Object.keys(argTypes),
6
+ data: () => ({
7
+ itemValue: true,
8
+ }),
9
+ template: `<div><VcListEntity :disabled="disabled" :value="itemValue" :title="title"></VcListEntity></div>`,
10
+ })
11
+
12
+ export const Playground = Template.bind({});
13
+
14
+ // Set default values
15
+ Playground.args = {
16
+ disabled: false,
17
+ value: false,
18
+ title:'text to <b>storybook</b>'
19
+ }
20
+
21
+ const TemplateDisabled = (args, {argTypes}) => ({
22
+ components: {VcListEntity: VcListEntityCmp},
23
+ props: Object.keys(argTypes),
24
+ data: () => ({
25
+ itemValue: true,
26
+ }),
27
+ template: '<div><VcListEntity :disabled="disabled" :value="itemValue" :title="title" /></div>',
28
+ })
29
+
30
+ export const Disabled = TemplateDisabled.bind({});
31
+
32
+ // Set default values
33
+ Disabled.args = {
34
+ disabled: true,
35
+ value: false,
36
+ title:'text to <b>storybook</b>'
37
+ }
38
+
39
+ const TemplateWithSlot = (args, {argTypes}) => ({
40
+ components: {VcListEntity: VcListEntityCmp},
41
+ props: Object.keys(argTypes),
42
+ data: () => ({
43
+ itemValue: true,
44
+ }),
45
+ template: `<div><VcListEntity :disabled="disabled" :value="itemValue" :title="title" >
46
+ <template v-slot:icon>
47
+ <v-icon size="12">home</v-icon>
48
+ </template>
49
+ </VcListEntity>
50
+ </div>`,
51
+ })
52
+
53
+ export const WithSlot = TemplateWithSlot.bind({});
54
+
55
+ // Set default values
56
+ WithSlot.args = {
57
+ disabled: false,
58
+ value: false,
59
+ title:'text to <b>storybook</b>'
60
+ }
61
+
62
+
63
+ export default {
64
+ title: 'containers / list / VcListEntity',
65
+ id: 'VcListEntity',
66
+ component: VcListEntityCmp,
67
+ parameters: {
68
+ design: {
69
+ type: 'figma',
70
+ url: 'https://www.figma.com/file/xIOY6fBoA1wpy1tHv3i5js/vcita---ui-library?node-id=4133%3A39303',
71
+ },
72
+ status: {
73
+ type: 'stable', // 'beta' | 'stable' | 'deprecated' | 'releaseCandidate'
74
+ url: 'http://www.url.com/status', // will make the tag a link
75
+ },
76
+ },
77
+ };
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div id="container" class="listEntity" :data-qa="dataQa">
3
+ <v-container fluid>
4
+ <div class="d-flex flex-wrap justify-space-between align-center sl-row" :class="{'margin-start':$vuetify.breakpoint.mdAndUp}">
5
+ <div class="justify-start d-flex align-center">
6
+ <slot name="icon"></slot>
7
+ <div
8
+ class="sl-title"
9
+ v-html="title"
10
+ >
11
+ </div>
12
+ </div>
13
+ <div class="d-flex justify-end">
14
+ <VcSwitch
15
+ :disabled="disabled"
16
+ :ripple="false"
17
+ v-model="value"
18
+ color="secondary"
19
+ @input="val => $emit('input', Boolean(val))"
20
+ >
21
+ </VcSwitch>
22
+ </div>
23
+
24
+
25
+ </div>
26
+ </v-container>
27
+ </div>
28
+ </template>
29
+ <script>
30
+ import VcIcon from '../../VcIcon/VcIcon.vue'
31
+ import VcSwitch from '../../VcSwitch/VcSwitch.vue';
32
+ export default {
33
+ components: { VcIcon, VcSwitch },
34
+ name: 'VcListEntity',
35
+ props: {
36
+ disabled: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ value: {
41
+ type: Boolean,
42
+ default: false
43
+ },
44
+ title: {
45
+ type: String,
46
+ required: false,
47
+ },
48
+ dataQa: {
49
+ type: String,
50
+ default: 'VcListEntity'
51
+ },
52
+ },
53
+ };
54
+ </script>
55
+
56
+ <style lang="scss">
57
+ .listEntity{
58
+ & .sl-title{
59
+ font-size: var(--font-size-x-small);
60
+ line-height: var(--size-value4);
61
+ font-weight: var(--font-weight-medium2);
62
+ margin: 0 8px;
63
+ }
64
+
65
+
66
+ & .sl-row{
67
+ min-width: 100%;
68
+ }
69
+ }
70
+ </style>
@@ -16,8 +16,8 @@
16
16
  <VcModalFooter
17
17
  direction="horizontal"
18
18
  :buttons='[
19
- {label: cancelButtonLabel || $dst("ds.modal.cancel"),event:"onCancelClicked",color:"white"},
20
- {label: okButtonLabel || $dst("ds.modal.ok"),event:"onOkClicked",color:"secondary"}
19
+ {label: cancelButtonLabel || $dst("ds.modal.cancel"), event:"onCancelClicked", color:"white", loading},
20
+ {label: okButtonLabel || $dst("ds.modal.ok"), event:"onOkClicked", color:"secondary", loading}
21
21
  ]'
22
22
  @onOkClicked="$emit('onOkClicked')"
23
23
  @onCancelClicked="$emit('onCancelClicked')"
@@ -83,6 +83,10 @@ export default {
83
83
  type: String,
84
84
  required: false
85
85
  },
86
+ loading: {
87
+ type: Boolean,
88
+ default: false
89
+ }
86
90
  }
87
91
  }
88
92
  </script>
@@ -11,6 +11,7 @@ const Template = (args, {argTypes}) => ({
11
11
  template: `
12
12
  <div>
13
13
  <VcConfirmProminentModal :show-dialog="showDialog"
14
+ :useOffset="useOffset"
14
15
  :title-text="titleText"
15
16
  :subtitle-text="subtitleText"
16
17
  :icon="iconParam"
@@ -29,6 +30,7 @@ export const Playground = Template.bind({});
29
30
  // Set default values
30
31
  Playground.args = {
31
32
  showDialog: true,
33
+ useOffset: false,
32
34
  titleText: 'Notice header text',
33
35
  subtitleText: 'some more information about this issue, and some more information about this issue',
34
36
  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.',
@@ -5,6 +5,7 @@
5
5
  :icon="icon"
6
6
  :size="size"
7
7
  flavor="prominent"
8
+ :useOffset="useOffset"
8
9
  @onCloseButtonClicked="$emit('onCloseButtonClicked')"
9
10
  @onOkClicked="$emit('onOkClicked')"
10
11
  @onCancelClicked="$emit('onCancelClicked')">
@@ -46,6 +47,10 @@ export default {
46
47
  type: String,
47
48
  required: false
48
49
  },
50
+ useOffset: {
51
+ type: Boolean,
52
+ default: true
53
+ },
49
54
  size: {
50
55
  type: String,
51
56
  default: 'md', // required
@@ -14,6 +14,7 @@ const Template = (args, {argTypes}) => ({
14
14
  template: `
15
15
  <div>
16
16
  <VcInputModal :show-dialog="showDialog"
17
+ :useOffset="useOffset"
17
18
  :topTitle="topTitle"
18
19
  :title="title"
19
20
  :subtitle="subtitle"
@@ -37,6 +38,7 @@ export const Playground = Template.bind({});
37
38
  // Set default values
38
39
  Playground.args = {
39
40
  showDialog: true,
41
+ useOffset: false,
40
42
  topTitle: '',
41
43
  title: 'Input form',
42
44
  subtitle: '',
@@ -55,6 +57,7 @@ const TemplateWithAdditional = (args, {argTypes}) => ({
55
57
  ],
56
58
  }),
57
59
  template: '<div><VcInputModal :show-dialog="showDialog" ' +
60
+ ':useOffset="useOffset" ' +
58
61
  ':topTitle="topTitle" ' +
59
62
  ':title="title" ' +
60
63
  ':subtitle="subtitle" ' +
@@ -78,6 +81,7 @@ export const WithAdditionalPanel = TemplateWithAdditional.bind({});
78
81
  // Set default values
79
82
  WithAdditionalPanel.args = {
80
83
  showDialog: true,
84
+ useOffset: false,
81
85
  title: 'With additional pane (when large)',
82
86
  size: 'lg'
83
87
  }
@@ -93,7 +97,7 @@ const TemplateWithFooter = (args, {argTypes}) => ({
93
97
  }),
94
98
  template: `
95
99
  <div>
96
- <VcInputModal :show-dialog="showDialog" :topTitle="topTitle" :title="title" :subtitle="subtitle"
100
+ <VcInputModal :show-dialog="showDialog" :useOffset="useOffset" :topTitle="topTitle" :title="title" :subtitle="subtitle"
97
101
  :header-icon="headerIcon" :size="size" @onCloseButtonClicked="onCloseButtonClicked"
98
102
  @onOkClicked="onOkClicked" @onCancelClicked="onCancelClicked"
99
103
  @onValidationChanged="onValidationChanged">
@@ -125,6 +129,7 @@ export const UsingFooterSlot = TemplateWithFooter.bind({});
125
129
  // Set default values
126
130
  UsingFooterSlot.args = {
127
131
  showDialog: true,
132
+ useOffset: false,
128
133
  title: 'With additional pane (when large)',
129
134
  size: 'lg',
130
135
  }
@@ -144,6 +149,7 @@ const TemplateWithImage = (args, {argTypes}) => ({
144
149
  ],
145
150
  }),
146
151
  template: '<div><VcInputModal :show-dialog="showDialog" ' +
152
+ ':useOffset="useOffset" ' +
147
153
  ':topTitle="topTitle" ' +
148
154
  ':title="title" ' +
149
155
  ':subtitle="subtitle" ' +
@@ -164,6 +170,7 @@ export const WithHeaderImage = TemplateWithImage.bind({});
164
170
  // Set default values
165
171
  WithHeaderImage.args = {
166
172
  showDialog: true,
173
+ useOffset: false,
167
174
  topTitle: 'Top title',
168
175
  title: 'Input form',
169
176
  size: 'lg'