@designcrowd/fe-shared-lib 1.4.8-promocardv1 → 1.4.9
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/.storybook/main.ts +4 -5
- package/.storybook/preview.js +0 -1
- package/dist/css/tailwind-brandCrowd.css +6 -0
- package/dist/css/tailwind-brandPage.css +6 -0
- package/dist/css/tailwind-crazyDomains.css +6 -0
- package/dist/css/tailwind-designCom.css +6 -0
- package/dist/css/tailwind-designCrowd.css +6 -0
- package/index.js +1 -1
- package/package.json +10 -10
- package/src/atoms/components/Carousel/Carousel.fixtures.js +0 -18
- package/src/atoms/components/Carousel/carousel.stories.js +179 -448
- package/src/atoms/components/Icon/Icon.stories.js +3 -0
- package/src/atoms/components/Icon/Icon.vue +6 -0
- package/src/atoms/components/Icon/icons/badge.vue +8 -0
- package/src/atoms/components/Icon/icons/briefcase.vue +7 -0
- package/src/atoms/components/Icon/icons/clipboard-check.vue +7 -0
- package/src/atoms/components/Price/Price.vue +5 -5
- package/src/atoms/components/SparkleIcon/SparkleIcon.stories.js +182 -0
- package/src/atoms/components/SparkleIcon/SparkleIcon.vue +105 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-01.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-02.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-03.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-04.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-05.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-06.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-07.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/animations/state-08.svg +5 -0
- package/src/atoms/components/SparkleIcon/assets/sparkle.svg +3 -0
- package/src/atoms/components/SparkleIcon/index.ts +3 -0
- package/tailwind.config.js +8 -7
- package/public/css/tailwind-brandCrowd.css +0 -2472
- package/public/css/tailwind-brandPage.css +0 -2156
- package/public/css/tailwind-crazyDomains.css +0 -2472
- package/public/css/tailwind-designCom.css +0 -2472
- package/public/css/tailwind-designCrowd.css +0 -2472
- package/src/atoms/components/PromoCard/PromoCard.stories.ts +0 -265
- package/src/atoms/components/PromoCard/PromoCard.vue +0 -89
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import PromoCard from './PromoCard.vue';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/PromoCard',
|
|
5
|
-
component: PromoCard,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Standard = {
|
|
9
|
-
render: (args) => {
|
|
10
|
-
return {
|
|
11
|
-
components: {
|
|
12
|
-
PromoCard,
|
|
13
|
-
},
|
|
14
|
-
setup() {
|
|
15
|
-
return { args };
|
|
16
|
-
},
|
|
17
|
-
template: `
|
|
18
|
-
<PromoCard
|
|
19
|
-
v-bind="args"
|
|
20
|
-
@button-clicked="handleButtonClick"
|
|
21
|
-
/>
|
|
22
|
-
`,
|
|
23
|
-
methods: {
|
|
24
|
-
handleButtonClick() {
|
|
25
|
-
console.log('Button clicked!');
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
args: {
|
|
31
|
-
title: 'Special Offer',
|
|
32
|
-
description: 'Get 20% off your next purchase. Limited time offer!',
|
|
33
|
-
imageUrl: 'https://bcassetcdn.com/assets/images/promo/legalzoom-symbol.svg',
|
|
34
|
-
altText: 'Promotional image',
|
|
35
|
-
buttonLabel: 'Learn More',
|
|
36
|
-
horizontalLayout: false,
|
|
37
|
-
scaleImageDown: false,
|
|
38
|
-
imageWidthFull: false,
|
|
39
|
-
shouldShowImageOnTop: false,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const HorizontalLayout = {
|
|
44
|
-
render: (args) => {
|
|
45
|
-
return {
|
|
46
|
-
components: {
|
|
47
|
-
PromoCard,
|
|
48
|
-
},
|
|
49
|
-
setup() {
|
|
50
|
-
return { args };
|
|
51
|
-
},
|
|
52
|
-
template: `
|
|
53
|
-
<PromoCard
|
|
54
|
-
v-bind="args"
|
|
55
|
-
@button-clicked="handleButtonClick"
|
|
56
|
-
/>
|
|
57
|
-
`,
|
|
58
|
-
methods: {
|
|
59
|
-
handleButtonClick() {
|
|
60
|
-
console.log('Button clicked!');
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
args: {
|
|
66
|
-
title: 'Premium Package',
|
|
67
|
-
description: 'Upgrade to premium and unlock exclusive features today.',
|
|
68
|
-
imageUrl: 'https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png',
|
|
69
|
-
altText: 'Premium package image',
|
|
70
|
-
buttonLabel: 'Upgrade Now',
|
|
71
|
-
horizontalLayout: true,
|
|
72
|
-
scaleImageDown: false,
|
|
73
|
-
imageWidthFull: false,
|
|
74
|
-
shouldShowImageOnTop: false,
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export const ImageOnTop = {
|
|
79
|
-
render: (args) => {
|
|
80
|
-
return {
|
|
81
|
-
components: {
|
|
82
|
-
PromoCard,
|
|
83
|
-
},
|
|
84
|
-
setup() {
|
|
85
|
-
return { args };
|
|
86
|
-
},
|
|
87
|
-
template: `
|
|
88
|
-
<PromoCard
|
|
89
|
-
v-bind="args"
|
|
90
|
-
@button-clicked="handleButtonClick"
|
|
91
|
-
/>
|
|
92
|
-
`,
|
|
93
|
-
methods: {
|
|
94
|
-
handleButtonClick() {
|
|
95
|
-
console.log('Button clicked!');
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
args: {
|
|
101
|
-
title: 'Mobile Friendly',
|
|
102
|
-
description: 'This layout works great on mobile devices with the image displayed on top.',
|
|
103
|
-
imageUrl: 'https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png',
|
|
104
|
-
altText: 'Mobile friendly layout',
|
|
105
|
-
buttonLabel: 'Try It',
|
|
106
|
-
horizontalLayout: false,
|
|
107
|
-
scaleImageDown: false,
|
|
108
|
-
imageWidthFull: false,
|
|
109
|
-
shouldShowImageOnTop: true,
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const ScaledDownImage = {
|
|
114
|
-
render: (args) => {
|
|
115
|
-
return {
|
|
116
|
-
components: {
|
|
117
|
-
PromoCard,
|
|
118
|
-
},
|
|
119
|
-
setup() {
|
|
120
|
-
return { args };
|
|
121
|
-
},
|
|
122
|
-
template: `
|
|
123
|
-
<PromoCard
|
|
124
|
-
v-bind="args"
|
|
125
|
-
@button-clicked="handleButtonClick"
|
|
126
|
-
/>
|
|
127
|
-
`,
|
|
128
|
-
methods: {
|
|
129
|
-
handleButtonClick() {
|
|
130
|
-
console.log('Button clicked!');
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
},
|
|
135
|
-
args: {
|
|
136
|
-
title: 'Logo Showcase',
|
|
137
|
-
description: 'Display your logo with proper spacing and scaling.',
|
|
138
|
-
imageUrl: 'https://via.placeholder.com/120x120',
|
|
139
|
-
altText: 'Logo showcase',
|
|
140
|
-
buttonLabel: 'View More',
|
|
141
|
-
horizontalLayout: false,
|
|
142
|
-
scaleImageDown: true,
|
|
143
|
-
imageWidthFull: false,
|
|
144
|
-
shouldShowImageOnTop: false,
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const FullWidthImage = {
|
|
149
|
-
render: (args) => {
|
|
150
|
-
return {
|
|
151
|
-
components: {
|
|
152
|
-
PromoCard,
|
|
153
|
-
},
|
|
154
|
-
setup() {
|
|
155
|
-
return { args };
|
|
156
|
-
},
|
|
157
|
-
template: `
|
|
158
|
-
<PromoCard
|
|
159
|
-
v-bind="args"
|
|
160
|
-
@button-clicked="handleButtonClick"
|
|
161
|
-
/>
|
|
162
|
-
`,
|
|
163
|
-
methods: {
|
|
164
|
-
handleButtonClick() {
|
|
165
|
-
console.log('Button clicked!');
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
},
|
|
170
|
-
args: {
|
|
171
|
-
title: 'Full Width Banner',
|
|
172
|
-
description: 'Images that stretch to fill the available space.',
|
|
173
|
-
imageUrl: 'https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png',
|
|
174
|
-
altText: 'Full width banner',
|
|
175
|
-
buttonLabel: 'Explore',
|
|
176
|
-
horizontalLayout: false,
|
|
177
|
-
scaleImageDown: false,
|
|
178
|
-
imageWidthFull: true,
|
|
179
|
-
shouldShowImageOnTop: false,
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export const AllOptions = {
|
|
184
|
-
render: (args) => {
|
|
185
|
-
return {
|
|
186
|
-
components: {
|
|
187
|
-
PromoCard,
|
|
188
|
-
},
|
|
189
|
-
setup() {
|
|
190
|
-
return { args };
|
|
191
|
-
},
|
|
192
|
-
template: `
|
|
193
|
-
<div class="tw-space-y-4">
|
|
194
|
-
<div>
|
|
195
|
-
<h3 class="tw-mb-2 tw-font-bold">Standard Layout</h3>
|
|
196
|
-
<PromoCard
|
|
197
|
-
title="Standard Promo"
|
|
198
|
-
description="This is the default vertical layout with image on the left."
|
|
199
|
-
imageUrl="https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png"
|
|
200
|
-
altText="Standard layout"
|
|
201
|
-
buttonLabel="Click Me"
|
|
202
|
-
@button-clicked="handleButtonClick"
|
|
203
|
-
/>
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
<div>
|
|
207
|
-
<h3 class="tw-mb-2 tw-font-bold">Horizontal Layout</h3>
|
|
208
|
-
<PromoCard
|
|
209
|
-
title="Horizontal Promo"
|
|
210
|
-
description="This layout is better for desktop with content side by side."
|
|
211
|
-
imageUrl="https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png"
|
|
212
|
-
altText="Horizontal layout"
|
|
213
|
-
buttonLabel="Click Me"
|
|
214
|
-
:horizontal-layout="true"
|
|
215
|
-
@button-clicked="handleButtonClick"
|
|
216
|
-
/>
|
|
217
|
-
</div>
|
|
218
|
-
|
|
219
|
-
<div>
|
|
220
|
-
<h3 class="tw-mb-2 tw-font-bold">Image On Top</h3>
|
|
221
|
-
<PromoCard
|
|
222
|
-
title="Mobile Optimized"
|
|
223
|
-
description="Perfect for mobile views with image stacked on top."
|
|
224
|
-
imageUrl="https://bcassetcdn.com/assets/images/promo/brandpage-design-support.png"
|
|
225
|
-
altText="Image on top"
|
|
226
|
-
buttonLabel="Click Me"
|
|
227
|
-
:should-show-image-on-top="true"
|
|
228
|
-
@button-clicked="handleButtonClick"
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
</div>
|
|
232
|
-
`,
|
|
233
|
-
methods: {
|
|
234
|
-
handleButtonClick() {
|
|
235
|
-
console.log('Button clicked!');
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
};
|
|
239
|
-
},
|
|
240
|
-
args: {},
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
Standard.story = {
|
|
244
|
-
name: 'PromoCard - Standard',
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
HorizontalLayout.story = {
|
|
248
|
-
name: 'PromoCard - Horizontal Layout',
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
ImageOnTop.story = {
|
|
252
|
-
name: 'PromoCard - Image On Top',
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
ScaledDownImage.story = {
|
|
256
|
-
name: 'PromoCard - Scaled Down Image',
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
FullWidthImage.story = {
|
|
260
|
-
name: 'PromoCard - Full Width Image',
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
AllOptions.story = {
|
|
264
|
-
name: 'PromoCard - All Variants',
|
|
265
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tw-flex" :class="shouldShowImageOnTop ? 'tw-flex-col' : 'tw-flex-row'">
|
|
3
|
-
<div
|
|
4
|
-
class="tw-flex tw-justify-center tw-items-center tw-bg-grayscale-400 tw-w-60 tw-p-1 dcom-rounded-tl dcom-rounded-bl"
|
|
5
|
-
:class="{
|
|
6
|
-
'tw-w-full tw-px-8 md:tw-px-12 lg:tw-px-20 tw-py-4': shouldShowImageOnTop,
|
|
7
|
-
'tw-px-4': !shouldShowImageOnTop,
|
|
8
|
-
}"
|
|
9
|
-
>
|
|
10
|
-
<img class="tw-w-full" :src="imageUrl" :alt="altText" />
|
|
11
|
-
</div>
|
|
12
|
-
<div
|
|
13
|
-
class="tw-flex tw-bg-white tw-w-full tw-p-4 tw-grow dcom-rounded-tr dcom-rounded-br tw-flex-col tw-justify-between"
|
|
14
|
-
:class="{
|
|
15
|
-
'lg:tw-flex-row lg:tw-items-center lg:tw-justify-normal': horizontalLayout,
|
|
16
|
-
}"
|
|
17
|
-
>
|
|
18
|
-
<div class="tw-text-left tw-overflow-hidden tw-text-ellipsis tw-text-base" :class="lineClampStyle">
|
|
19
|
-
<div class="tw-font-bold tw-text-black tw-mb-0.5">
|
|
20
|
-
{{ title }}
|
|
21
|
-
</div>
|
|
22
|
-
<p>
|
|
23
|
-
{{ description }}
|
|
24
|
-
</p>
|
|
25
|
-
</div>
|
|
26
|
-
<Button
|
|
27
|
-
variant="primary"
|
|
28
|
-
size="small"
|
|
29
|
-
:full-width="!horizontalLayout"
|
|
30
|
-
class="tw-text-left tw-mt-4"
|
|
31
|
-
:class="horizontalLayout ? 'tw-w-full tw-mr-2 md:tw-mt-0 md:tw-w-auto' : ''"
|
|
32
|
-
:label="buttonLabel"
|
|
33
|
-
@on-click="buttonClicked"
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
<script>
|
|
39
|
-
import Button from '../Button/Button.vue';
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
components: { Button },
|
|
43
|
-
props: {
|
|
44
|
-
title: {
|
|
45
|
-
type: String,
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
description: {
|
|
49
|
-
type: String,
|
|
50
|
-
required: true,
|
|
51
|
-
},
|
|
52
|
-
imageUrl: { type: String, required: true },
|
|
53
|
-
altText: { type: String, default: '' },
|
|
54
|
-
buttonLabel: {
|
|
55
|
-
type: String,
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
horizontalLayout: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false,
|
|
61
|
-
},
|
|
62
|
-
shouldShowImageOnTop: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false,
|
|
65
|
-
},
|
|
66
|
-
textLineClamp: {
|
|
67
|
-
type: Number,
|
|
68
|
-
default: 0, // 0 is infinite
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
computed: {
|
|
72
|
-
shouldUseHorizontalLayout() {
|
|
73
|
-
// when in desktop view, display horizontal mode
|
|
74
|
-
return this.horizontalLayout;
|
|
75
|
-
},
|
|
76
|
-
lineClampStyle() {
|
|
77
|
-
if (this.textLineClamp > 0) {
|
|
78
|
-
return `tw-line-clamp-${this.textLineClamp}`;
|
|
79
|
-
}
|
|
80
|
-
return 'tw-line-clamp-none';
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
methods: {
|
|
84
|
-
buttonClicked() {
|
|
85
|
-
this.$emit('button-clicked');
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
</script>
|