@vcita/design-system 1.20.11 → 1.20.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcita/design-system",
3
- "version": "1.20.11",
3
+ "version": "1.20.13",
4
4
  "description": "vcita design system",
5
5
  "author": "vcita",
6
6
  "scripts": {
@@ -69,4 +69,12 @@ describe('VcMiniBanner.vue', () => {
69
69
  const text = within(title).getByText(baseProps.subtitle);
70
70
  expect(text).toBeInTheDocument();
71
71
  });
72
+
73
+ it('computed buttonProps', () => {
74
+ const buttonProps = VcMiniBanner.computed.buttonProps;
75
+ const primaryButtonProps = buttonProps.bind({ buttonType: 'primary' });
76
+ expect(primaryButtonProps()).toEqual({ flavor: 'primary', small: true, pill: true });
77
+ const secondaryButtonProps = buttonProps.bind({ buttonType: 'secondary' });
78
+ expect(secondaryButtonProps()).toEqual({ flavor: 'secondary', small: true, outlined: true });
79
+ });
72
80
  });
@@ -23,6 +23,7 @@ const Template = (args, { argTypes }) => ({
23
23
  :subtitle="subtitle"
24
24
  :ctaLabel="ctaLabel"
25
25
  :gradientHue="gradientHue"
26
+ :button-type="buttonType"
26
27
  @onAction="onAction" />
27
28
 
28
29
  </div>
@@ -38,6 +39,7 @@ Playground.args = {
38
39
  'Get creative freedom for your campaigns with a growing collection of templates for every occasion.',
39
40
  ctaLabel: 'Install app',
40
41
  gradientHue: '#f1f9fe',
42
+ buttonType: 'primary',
41
43
  };
42
44
 
43
45
  export const LongSubtitle = Template.bind({});
@@ -48,6 +50,7 @@ LongSubtitle.args = {
48
50
  'Zapier empowers you to automate your work across 5,000+ apps—so you can move forward, faster. From side hustlers to enterprise leaders, Zapier connects your work apps so you get more focus and less frustration.',
49
51
  ctaLabel: 'Read more',
50
52
  gradientHue: '#fefef3',
53
+ buttonType: 'primary',
51
54
  };
52
55
 
53
56
  export const WithoutHue = Template.bind({});
@@ -57,12 +60,19 @@ WithoutHue.args = {
57
60
  subtitle:
58
61
  'Connect your day-to-day business activity with your accounting platform to save time and automate your reporting process',
59
62
  ctaLabel: 'Connect',
63
+ buttonType: 'primary',
60
64
  };
61
65
 
62
66
  export default {
63
67
  title: 'Content display / VcMiniBanner',
64
68
  id: 'VcMiniBanner',
65
69
  component: VcMiniBanner,
70
+ argTypes: {
71
+ buttonType: {
72
+ options: ['primary', 'secondary'],
73
+ control: { type: 'radio' },
74
+ },
75
+ },
66
76
  parameters: {
67
77
  design: {
68
78
  type: 'figma',
@@ -24,7 +24,7 @@
24
24
  </h4>
25
25
  </div>
26
26
  <div class="vc-mini-banner__cta">
27
- <VcButton pill small class="primary-cta" :data-qa="`${dataQa}-button`">
27
+ <VcButton v-bind="buttonProps" class="primary-cta" :data-qa="`${dataQa}-button`">
28
28
  {{ ctaLabel }}
29
29
  </VcButton>
30
30
  </div>
@@ -61,6 +61,21 @@ export default {
61
61
  gradientHue: {
62
62
  type: String,
63
63
  },
64
+ buttonType: {
65
+ type: String,
66
+ default: 'primary',
67
+ validator: (type) => ['primary', 'secondary'].includes(type),
68
+ },
69
+ },
70
+ computed: {
71
+ buttonProps() {
72
+ const props = {
73
+ primary: { flavor: 'primary', small: true, pill: true },
74
+ secondary: { flavor: 'secondary', small: true, outlined: true },
75
+ };
76
+
77
+ return props[this.buttonType];
78
+ },
64
79
  },
65
80
  };
66
81
  </script>
@@ -82,7 +82,7 @@ describe('VcDataTable.vue', () => {
82
82
  thresholds: {
83
83
  sm: 960,
84
84
  },
85
- smAndDown: true,
85
+ mdAndDown: true,
86
86
  };
87
87
 
88
88
  vuetify.framework.breakpoint = breakpoint;
@@ -275,7 +275,7 @@ export default {
275
275
  }),
276
276
  computed: {
277
277
  isMobile() {
278
- return this.showMobileOnBreakpoint && this.$vuetify.breakpoint.smAndDown;
278
+ return this.showMobileOnBreakpoint && this.$vuetify.breakpoint.mdAndDown;
279
279
  },
280
280
  headersWithClasses() {
281
281
  const updatedHeaders = this.headers.map((headerItem, index) => ({