project-booster-vue 9.14.1 → 9.14.2
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 +1 -1
- package/src/components/cards/PbCard.stories.mdx +43 -110
- package/src/components/cards/PbCard.vue +96 -149
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-align-horizontal-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-align-text-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-align-vertical-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-button-href-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-button-label-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-degradations-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-disabled-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-flag-label-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-flag-theme-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-hero-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-image-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-image-is-contained-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-image-ratio-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-image-title-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-link-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-min-card-ratio-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-selectable-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-selected-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-text-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-title-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-card-/360/237/247/254-features-type-icon-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-cards-list-/360/237/247/254-features-3-cards-1-snap.png +0 -0
- package/src/components/cards/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-cards-list-/360/237/247/254-features-4-cards-1-snap.png +0 -0
- package/src/components/cards-select/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-cards-pb-cards-select-/360/237/246/240-showcase-hint-1-snap.png +0 -0
- package/src/components/carousel/PbCarousel.vue +0 -2
- package/src/components/configurations/section/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-configurations-pb-configurations-section-/360/237/246/240-feature-with-configurations-1-snap.png +0 -0
- package/src/components/configurations/section/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-configurations-pb-configurations-section-/360/237/246/240-feature-with-configurations-with-updated-prices-1-snap.png +0 -0
- package/src/components/landing/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-landing-pb-projects-landing-page-/360/237/223/204-101-sandbox-1-snap.png +0 -0
- package/src/components/media/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-documents-media-pb-media-/360/237/246/240-with-media-1-snap.png +0 -0
- package/src/components/media/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-documents-media-pb-media-/360/237/246/240-with-media-read-only-1-snap.png +0 -0
- package/src/components/pedagogy/PbPedagogy.vue +7 -4
- package/src/components/pedagogy/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-pedagogy-pb-pedagogy-/360/237/246/240-101-sandbox-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-import-showcase-error-with-existing-configurations-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-import-showcase-import-from-empty-state-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-import-showcase-with-existing-configurations-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-list-showcase-empty-state-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-list-showcase-with-configurations-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-configurations-list-showcase-with-configurations-with-updated-prices-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-documents-media-showcase-with-media-documents-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-estimates-showcase-delete-estimate-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-estimates-showcase-with-estimates-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-planner-showcase-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-planner-showcase-empty-state-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-tools-configurators-estimators-showcase-with-configurators-only-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-tools-configurators-estimators-showcase-with-estimators-and-configurators-1-snap.png +0 -0
- package/src/components/projects/project-hub/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-project-hub-/360/237/246/240-features-tools-configurators-estimators-showcase-with-estimators-only-1-snap.png +0 -0
- package/src/components/projects/projects/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-projects-/360/237/246/240-showcase-1-snap.png +0 -0
- package/src/components/projects/projects/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-projects-/360/237/246/240-showcase-autoscroll-to-estimates-1-snap.png +0 -0
- package/src/components/projects/projects-list/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-projects-pb-projects-list-/360/237/246/240-showcase-1-snap.png +0 -0
- package/src/components/question/PbQuestion.vue +1 -1
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-demo-multiple-multiple-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-demo-simple-simple-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-answers-multiple-skippable-multiselect-question-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-101-101-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-custom-back-button-hide-back-button-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-decorator-stripes-decorator-stripe-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-show-more-show-more-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-skippable-mutiple-skippable-1-snap.png +0 -0
- package/src/components/question/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-question-/360/237/246/240-features-question-skippable-skippable-1-snap.png +0 -0
- package/src/components/question/configurations-import/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-scenario-questions-pb-configurations-import-/360/237/246/240-with-simulations-linked-1-snap.png +0 -0
- package/src/components/restitution/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-restitution-pb-restitution-/360/237/246/240-feature-conditional-exit-options-1-snap.png +0 -0
- package/src/components/restitution/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-restitution-pb-restitution-/360/237/246/240-features-with-exit-options-1-snap.png +0 -0
- package/src/components/scenario/PbScenario-Demo-Project.stories.js +10 -101
package/package.json
CHANGED
|
@@ -105,11 +105,12 @@ The `PbCard` Vue component is a card component with:
|
|
|
105
105
|
- A hero,
|
|
106
106
|
- A title,
|
|
107
107
|
- A text,
|
|
108
|
-
- A button
|
|
108
|
+
- A button,
|
|
109
|
+
- A link.
|
|
109
110
|
|
|
110
111
|
The minimum card ratio can be forced.
|
|
111
112
|
|
|
112
|
-
It is hoverable (unless a `buttonLabel` is valued);
|
|
113
|
+
It is hoverable (unless a `buttonLabel` or `linkLabel` is valued);
|
|
113
114
|
|
|
114
115
|
As many card components, the card has:
|
|
115
116
|
|
|
@@ -126,7 +127,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
126
127
|
setup() {
|
|
127
128
|
return { args };
|
|
128
129
|
},
|
|
129
|
-
template: `<div style="display: flex;">
|
|
130
|
+
template: `<div style="display: flex;height: 60vh;width: 256px">
|
|
130
131
|
<pb-card
|
|
131
132
|
:image-title="args.imageTitle"
|
|
132
133
|
:image="args.image"
|
|
@@ -136,6 +137,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
136
137
|
:hero="args.hero"
|
|
137
138
|
:title="args.title"
|
|
138
139
|
:text="args.text"
|
|
140
|
+
:linkLabel="args.linkLabel"
|
|
139
141
|
:button-label="args.buttonLabel"
|
|
140
142
|
:button-href="args.buttonHref"
|
|
141
143
|
:card-min-ratio="args.cardMinRatio"
|
|
@@ -146,9 +148,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
146
148
|
:selectable="args.selectable"
|
|
147
149
|
:selected="args.selected"
|
|
148
150
|
:type-icon="args.typeIcon"
|
|
149
|
-
|
|
150
|
-
:pricing="args.pricing"
|
|
151
|
-
style="width: 100%;max-width: 256px;"
|
|
151
|
+
style="width: 100%;max-width: 256px;height: 100%;"
|
|
152
152
|
/>
|
|
153
153
|
</div>`,
|
|
154
154
|
});
|
|
@@ -158,6 +158,13 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
158
158
|
name="101 Sandbox"
|
|
159
159
|
args={{
|
|
160
160
|
title: 'The card title',
|
|
161
|
+
flagLabel: 'The card flag label',
|
|
162
|
+
flagTheme: 'primary',
|
|
163
|
+
hero: 'The card hero',
|
|
164
|
+
text: 'The card text',
|
|
165
|
+
imageTitle: 'The card image title',
|
|
166
|
+
linkLabel: 'The link label',
|
|
167
|
+
buttonLabel: 'The button label',
|
|
161
168
|
image:
|
|
162
169
|
'https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80',
|
|
163
170
|
}}
|
|
@@ -178,7 +185,11 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
178
185
|
{{
|
|
179
186
|
components: { PbCard },
|
|
180
187
|
template: `
|
|
181
|
-
<div style="display: flex;gap:
|
|
188
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
189
|
+
<pb-card
|
|
190
|
+
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
191
|
+
class="pb-card--story"
|
|
192
|
+
/>
|
|
182
193
|
<pb-card
|
|
183
194
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
184
195
|
flag-label="The flag label"
|
|
@@ -209,7 +220,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
209
220
|
{{
|
|
210
221
|
components: { PbCard },
|
|
211
222
|
template: `
|
|
212
|
-
<div style="display: flex;gap:
|
|
223
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
213
224
|
<pb-card
|
|
214
225
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
215
226
|
flag-label="The flag label"
|
|
@@ -242,7 +253,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
242
253
|
{{
|
|
243
254
|
components: { PbCard },
|
|
244
255
|
template: `
|
|
245
|
-
<div style="display: flex;gap:
|
|
256
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
246
257
|
<pb-card
|
|
247
258
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
248
259
|
flag-label="The flag label"
|
|
@@ -339,7 +350,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
339
350
|
{{
|
|
340
351
|
components: { PbCard },
|
|
341
352
|
template: `
|
|
342
|
-
<div style="display: flex;gap:
|
|
353
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
343
354
|
<pb-card
|
|
344
355
|
card-min-ratio="16x9"
|
|
345
356
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
@@ -424,14 +435,14 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
424
435
|
</Story>
|
|
425
436
|
</Canvas>
|
|
426
437
|
|
|
427
|
-
## **alignText** prop
|
|
438
|
+
## **alignText** prop (mixed with **alignVertical** prop)
|
|
428
439
|
|
|
429
440
|
<Canvas>
|
|
430
441
|
<Story name="Features/Align text" parameters={{ controls: { disable: true } }}>
|
|
431
442
|
{{
|
|
432
443
|
components: { PbCard },
|
|
433
444
|
template: `
|
|
434
|
-
<div style="display: flex;gap:
|
|
445
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
435
446
|
<pb-card
|
|
436
447
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
437
448
|
flag-label="The flag label"
|
|
@@ -450,6 +461,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
450
461
|
text="The card text"
|
|
451
462
|
button-label="The button label"
|
|
452
463
|
align-text="center"
|
|
464
|
+
align-vertical="center"
|
|
453
465
|
class="pb-card--story"
|
|
454
466
|
/>
|
|
455
467
|
<pb-card
|
|
@@ -460,6 +472,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
460
472
|
text="The card text"
|
|
461
473
|
button-label="The button label"
|
|
462
474
|
align-text="right"
|
|
475
|
+
align-vertical="flex-end"
|
|
463
476
|
class="pb-card--story"
|
|
464
477
|
/>
|
|
465
478
|
<pb-card
|
|
@@ -502,7 +515,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
502
515
|
{{
|
|
503
516
|
components: { PbCard },
|
|
504
517
|
template: `
|
|
505
|
-
<div style="display: flex;gap:
|
|
518
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
506
519
|
<pb-card
|
|
507
520
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
508
521
|
flag-label="The flag label"
|
|
@@ -603,7 +616,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
603
616
|
{{
|
|
604
617
|
components: { PbCard },
|
|
605
618
|
template: `
|
|
606
|
-
<div style="display: flex;gap:
|
|
619
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
607
620
|
<pb-card
|
|
608
621
|
card-min-ratio="3x4"
|
|
609
622
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
@@ -673,7 +686,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
673
686
|
{{
|
|
674
687
|
components: { PbCard },
|
|
675
688
|
template: `
|
|
676
|
-
<div style="display: flex;gap:
|
|
689
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
677
690
|
<pb-card
|
|
678
691
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
679
692
|
image-ratio="16x9"
|
|
@@ -777,7 +790,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
777
790
|
{{
|
|
778
791
|
components: { PbCard },
|
|
779
792
|
template: `
|
|
780
|
-
<div style="display: flex;gap:
|
|
793
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
781
794
|
<pb-card
|
|
782
795
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
783
796
|
flag-label="The flag label"
|
|
@@ -806,7 +819,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
806
819
|
{{
|
|
807
820
|
components: { PbCard },
|
|
808
821
|
template: `
|
|
809
|
-
<div style="display: flex;gap:
|
|
822
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
810
823
|
<pb-card
|
|
811
824
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
812
825
|
flag-label="The flag label"
|
|
@@ -874,7 +887,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
874
887
|
components: { PbCard },
|
|
875
888
|
data: () => ({ HTML_STRING }),
|
|
876
889
|
template: `
|
|
877
|
-
<div style="display: flex;gap:
|
|
890
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
878
891
|
<pb-card
|
|
879
892
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
880
893
|
flag-label="The flag label"
|
|
@@ -914,7 +927,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
914
927
|
components: { PbCard },
|
|
915
928
|
data: () => ({ HTML_STRING }),
|
|
916
929
|
template: `
|
|
917
|
-
<div style="display: flex;gap:
|
|
930
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
918
931
|
<pb-card
|
|
919
932
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
920
933
|
title="The card title"
|
|
@@ -949,7 +962,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
949
962
|
components: { PbCard },
|
|
950
963
|
data: () => ({ HTML_STRING }),
|
|
951
964
|
template: `
|
|
952
|
-
<div style="display: flex;gap:
|
|
965
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
953
966
|
<pb-card
|
|
954
967
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
955
968
|
title="The card title"
|
|
@@ -991,7 +1004,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
991
1004
|
{{
|
|
992
1005
|
components: { PbCard },
|
|
993
1006
|
template: `
|
|
994
|
-
<div style="display: flex;gap:
|
|
1007
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
995
1008
|
<pb-card
|
|
996
1009
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
997
1010
|
title="The card title"
|
|
@@ -1018,7 +1031,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1018
1031
|
{{
|
|
1019
1032
|
components: { PbCard },
|
|
1020
1033
|
template: `
|
|
1021
|
-
<div style="display: flex;gap:
|
|
1034
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1022
1035
|
<pb-card
|
|
1023
1036
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1024
1037
|
title="The card title"
|
|
@@ -1029,7 +1042,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1029
1042
|
<pb-card
|
|
1030
1043
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1031
1044
|
title="The card title"
|
|
1032
|
-
text="The card text should have
|
|
1045
|
+
text="The card text should have three lines of text to test alignment"
|
|
1033
1046
|
button-label="The button label"
|
|
1034
1047
|
button-href="http://www.google.com"
|
|
1035
1048
|
class="pb-card--story"
|
|
@@ -1048,7 +1061,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1048
1061
|
components: { PbCard },
|
|
1049
1062
|
data: () => ({ HTML_STRING }),
|
|
1050
1063
|
template: `
|
|
1051
|
-
<div style="display: flex;gap:
|
|
1064
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1052
1065
|
<pb-card
|
|
1053
1066
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1054
1067
|
flag-label="The flag label"
|
|
@@ -1142,7 +1155,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1142
1155
|
{{
|
|
1143
1156
|
components: { PbCard },
|
|
1144
1157
|
template: `
|
|
1145
|
-
<div style="display: flex;gap:
|
|
1158
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1146
1159
|
<pb-card
|
|
1147
1160
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1148
1161
|
title="The card title"
|
|
@@ -1201,7 +1214,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1201
1214
|
{{
|
|
1202
1215
|
components: { PbCard },
|
|
1203
1216
|
template: `
|
|
1204
|
-
<div style="display: flex;gap:
|
|
1217
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1205
1218
|
<pb-card
|
|
1206
1219
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1207
1220
|
title="The card title"
|
|
@@ -1272,7 +1285,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1272
1285
|
{{
|
|
1273
1286
|
components: { PbCard },
|
|
1274
1287
|
template: `
|
|
1275
|
-
<div style="display: flex;gap:
|
|
1288
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1276
1289
|
<pb-card
|
|
1277
1290
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1278
1291
|
title="The card title"
|
|
@@ -1306,7 +1319,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1306
1319
|
{{
|
|
1307
1320
|
components: { PbCard },
|
|
1308
1321
|
template: `
|
|
1309
|
-
<div style="display: flex;gap:
|
|
1322
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1310
1323
|
<pb-card
|
|
1311
1324
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1312
1325
|
title="The card title"
|
|
@@ -1373,7 +1386,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1373
1386
|
{{
|
|
1374
1387
|
components: { PbCard },
|
|
1375
1388
|
template: `
|
|
1376
|
-
<div style="display: flex;gap:
|
|
1389
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1377
1390
|
<pb-card
|
|
1378
1391
|
v-for="variation in generateProps()"
|
|
1379
1392
|
:image-title="variation.imageTitle"
|
|
@@ -1419,86 +1432,6 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1419
1432
|
</Story>
|
|
1420
1433
|
</Canvas>
|
|
1421
1434
|
|
|
1422
|
-
## **rating** prop
|
|
1423
|
-
|
|
1424
|
-
<Canvas>
|
|
1425
|
-
<Story name="Features/Rating" parameters={{ controls: { disable: true } }}>
|
|
1426
|
-
{{
|
|
1427
|
-
components: { PbCard },
|
|
1428
|
-
template: `
|
|
1429
|
-
<div style="display: flex;gap: 2rem;flex-wrap: wrap;">
|
|
1430
|
-
<pb-card
|
|
1431
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1432
|
-
title="The card title"
|
|
1433
|
-
text="The card text should have two lines"
|
|
1434
|
-
button-label="The button label"
|
|
1435
|
-
type-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Payment_Bill_24px.svg"
|
|
1436
|
-
class="pb-card--story"
|
|
1437
|
-
/>
|
|
1438
|
-
<pb-card
|
|
1439
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1440
|
-
title="The card title"
|
|
1441
|
-
text="The card text should have two lines"
|
|
1442
|
-
button-label="The button label"
|
|
1443
|
-
:rating="{'numberOfVotes':42,'rate':3.48}"
|
|
1444
|
-
class="pb-card--story"
|
|
1445
|
-
/>
|
|
1446
|
-
<pb-card
|
|
1447
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1448
|
-
title="The card title"
|
|
1449
|
-
text="The card text should have two lines"
|
|
1450
|
-
button-label="The button label"
|
|
1451
|
-
type-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Payment_Bill_24px.svg"
|
|
1452
|
-
:rating="{'numberOfVotes':675,'rate':4}"
|
|
1453
|
-
class="pb-card--story"
|
|
1454
|
-
/>
|
|
1455
|
-
</div>
|
|
1456
|
-
`,
|
|
1457
|
-
}}
|
|
1458
|
-
</Story>
|
|
1459
|
-
</Canvas>
|
|
1460
|
-
|
|
1461
|
-
## **pricing** prop
|
|
1462
|
-
|
|
1463
|
-
<Canvas>
|
|
1464
|
-
<Story name="Features/Pricing" parameters={{ controls: { disable: true } }}>
|
|
1465
|
-
{{
|
|
1466
|
-
components: { PbCard },
|
|
1467
|
-
template: `
|
|
1468
|
-
<div style="display: flex;gap: 2rem;flex-wrap: wrap;">
|
|
1469
|
-
<pb-card
|
|
1470
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1471
|
-
title="The card title"
|
|
1472
|
-
text="The card text should have two lines"
|
|
1473
|
-
button-label="The button label"
|
|
1474
|
-
type-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Payment_Bill_24px.svg"
|
|
1475
|
-
class="pb-card--story"
|
|
1476
|
-
/>
|
|
1477
|
-
<pb-card
|
|
1478
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1479
|
-
title="The card title"
|
|
1480
|
-
text="The card text should have two lines"
|
|
1481
|
-
button-label="The button label"
|
|
1482
|
-
:rating="{'numberOfVotes':42,'rate':3.48}"
|
|
1483
|
-
:pricing="{'price': 29.9,'oldPrice':34.9,'discount':{'type':'PERCENTAGE','value':14} }"
|
|
1484
|
-
class="pb-card--story"
|
|
1485
|
-
/>
|
|
1486
|
-
<pb-card
|
|
1487
|
-
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1488
|
-
title="The card title"
|
|
1489
|
-
text="The card text should have two lines"
|
|
1490
|
-
button-label="The button label"
|
|
1491
|
-
type-icon="https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Payment_Bill_24px.svg"
|
|
1492
|
-
:rating="{'numberOfVotes':675,'rate':4}"
|
|
1493
|
-
:pricing="{'price': 29.9}"
|
|
1494
|
-
class="pb-card--story"
|
|
1495
|
-
/>
|
|
1496
|
-
</div>
|
|
1497
|
-
`,
|
|
1498
|
-
}}
|
|
1499
|
-
</Story>
|
|
1500
|
-
</Canvas>
|
|
1501
|
-
|
|
1502
1435
|
## **link** prop
|
|
1503
1436
|
|
|
1504
1437
|
<Canvas>
|
|
@@ -1506,7 +1439,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
1506
1439
|
{{
|
|
1507
1440
|
components: { PbCard },
|
|
1508
1441
|
template: `
|
|
1509
|
-
<div style="display: flex;gap:
|
|
1442
|
+
<div style="display: flex;gap: 1rem;flex-wrap: wrap;">
|
|
1510
1443
|
<pb-card
|
|
1511
1444
|
image="https://images.unsplash.com/photo-1577106777018-886191d770b2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1868&q=80"
|
|
1512
1445
|
title="The card title"
|
|
@@ -6,12 +6,83 @@
|
|
|
6
6
|
}${flattened ? 'pb-card--no-pointer-events' : ''} ${
|
|
7
7
|
cardMinRatio && cardMinRatio !== 'auto' ? 'm-ratio-container--' + cardMinRatio : ''
|
|
8
8
|
}`"
|
|
9
|
-
:align-items="alignHorizontal"
|
|
10
9
|
:role="!buttonLabel ? 'button' : 'article'"
|
|
11
10
|
:style="`min-height: ${cardMinHeight}`"
|
|
12
11
|
@click="handleCardClick"
|
|
13
12
|
>
|
|
14
|
-
<m-flex
|
|
13
|
+
<m-flex
|
|
14
|
+
class="pb-card__container"
|
|
15
|
+
direction="column-reverse"
|
|
16
|
+
justify-content="flex-end"
|
|
17
|
+
:align-items="alignVertical"
|
|
18
|
+
>
|
|
19
|
+
<!-- Duplicated wrapper to reset flex formattong context to block formatting context to allow margin to collapse -->
|
|
20
|
+
<!-- Break formatting to benefit :empty CSS selector -->
|
|
21
|
+
<!-- eslint-disable -->
|
|
22
|
+
<!-- prettier-ignore -->
|
|
23
|
+
<div class="pb-card__items-container" :style="alignHorizontal ? `justify-content: ${alignHorizontal}` : ''"><m-flex
|
|
24
|
+
v-if="flagLabel"
|
|
25
|
+
class="pb-card__flag"
|
|
26
|
+
:class="{ 'pb-card__flag--disabled': disabled }"
|
|
27
|
+
:style="`text-align: ${alignText}`"
|
|
28
|
+
:justify-content="alignVertical"
|
|
29
|
+
>
|
|
30
|
+
<m-flag :label="flagLabel" :theme="disabled ? 'solid-dark' : flagTheme" />
|
|
31
|
+
</m-flex><div
|
|
32
|
+
v-if="hero"
|
|
33
|
+
v-html="hero"
|
|
34
|
+
class="pb-card__hero"
|
|
35
|
+
:class="{ 'pb-card__hero--disabled': disabled }"
|
|
36
|
+
:style="`text-align: ${alignText}`"
|
|
37
|
+
/><m-flex v-if="title || text" direction="column" gap="0.25rem" :align-items="alignVertical" :justify-content="alignHorizontal">
|
|
38
|
+
<div
|
|
39
|
+
v-if="title"
|
|
40
|
+
v-html="title"
|
|
41
|
+
class="pb-card__title"
|
|
42
|
+
:class="{ 'pb-card__title--disabled': disabled }"
|
|
43
|
+
:style="`text-align: ${alignText}`"
|
|
44
|
+
/>
|
|
45
|
+
<div v-if="text" v-html="text" class="pb-card__text" :style="`text-align: ${alignText}`" />
|
|
46
|
+
</m-flex><div class="pb-card__actions-container" v-if="linkLabel || buttonLabel"><m-flex
|
|
47
|
+
v-if="buttonLabel"
|
|
48
|
+
class="pb-card__buttons-container"
|
|
49
|
+
align-items="flex-end"
|
|
50
|
+
:justify-content="alignVertical"
|
|
51
|
+
>
|
|
52
|
+
<m-button
|
|
53
|
+
v-if="buttonLabel && !buttonHref"
|
|
54
|
+
class="pb-card__button"
|
|
55
|
+
:label="buttonLabel"
|
|
56
|
+
size="s"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
@click="handleButtonClicked"
|
|
59
|
+
/>
|
|
60
|
+
<m-button
|
|
61
|
+
v-if="buttonHref && buttonLabel"
|
|
62
|
+
class="pb-card__button"
|
|
63
|
+
:label="buttonLabel"
|
|
64
|
+
:disabled="disabled"
|
|
65
|
+
rel="noopener noreferrer"
|
|
66
|
+
target="_blank"
|
|
67
|
+
size="s"
|
|
68
|
+
@click="handleButtonLinkClicked(buttonHref)"
|
|
69
|
+
/>
|
|
70
|
+
</m-flex><m-flex
|
|
71
|
+
v-if="linkLabel"
|
|
72
|
+
class="pb-card__links-container"
|
|
73
|
+
align-items="flex-end"
|
|
74
|
+
:justify-content="alignVertical"
|
|
75
|
+
>
|
|
76
|
+
<m-link
|
|
77
|
+
v-if="linkLabel"
|
|
78
|
+
class="pb-card__link"
|
|
79
|
+
:label="linkLabel"
|
|
80
|
+
:disabled="disabled"
|
|
81
|
+
size="s"
|
|
82
|
+
@click="handleLinkClicked"
|
|
83
|
+
/>
|
|
84
|
+
</m-flex></div></div>
|
|
85
|
+
<!-- eslint-enable -->
|
|
15
86
|
<div v-if="image" class="pb-card__image-container">
|
|
16
87
|
<m-image
|
|
17
88
|
:src="image"
|
|
@@ -32,85 +103,9 @@
|
|
|
32
103
|
</div>
|
|
33
104
|
</m-flex>
|
|
34
105
|
</div>
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
<!-- Break formatting to benefit :empty CSS selector -->
|
|
38
|
-
<!-- eslint-disable -->
|
|
39
|
-
<!-- prettier-ignore -->
|
|
40
|
-
<div class="pb-card__items-container" direction="column"><m-flex
|
|
41
|
-
v-if="flagLabel"
|
|
42
|
-
class="pb-card__flag"
|
|
43
|
-
:class="{ 'pb-card__flag--disabled': disabled }"
|
|
44
|
-
:style="`text-align: ${alignText}`"
|
|
45
|
-
:justify-content="alignVertical"
|
|
46
|
-
>
|
|
47
|
-
<m-flag :label="flagLabel" :theme="disabled ? 'solid-dark' : flagTheme" />
|
|
48
|
-
</m-flex><div
|
|
49
|
-
v-if="hero"
|
|
50
|
-
v-html="hero"
|
|
51
|
-
class="pb-card__hero"
|
|
52
|
-
:class="{ 'pb-card__hero--disabled': disabled }"
|
|
53
|
-
:style="`text-align: ${alignText}`"
|
|
54
|
-
/><div
|
|
55
|
-
v-if="title"
|
|
56
|
-
v-html="title"
|
|
57
|
-
class="pb-card__title"
|
|
58
|
-
:class="{ 'pb-card__title--disabled': disabled }"
|
|
59
|
-
:style="`text-align: ${alignText}`"
|
|
60
|
-
/><div v-if="text" v-html="text" class="pb-card__text" :style="`text-align: ${alignText}`" /><m-flex class="pb-card__rating" align-items="center" v-if="rating">
|
|
61
|
-
<m-rating :value="rating.rate" size="s" />
|
|
62
|
-
<div v-html="rating.numberOfVotes + ' avis'" class="pb-card__rating-text" />
|
|
63
|
-
</m-flex><div class="pb-card__pricing" v-if="pricing">
|
|
64
|
-
<div v-html="pricing.oldPrice + '€ / prestation'" class="pb-card__pricing-old" v-if="pricing.oldPrice" />
|
|
65
|
-
<div
|
|
66
|
-
v-html="pricing.price + '€ / prestation'"
|
|
67
|
-
:class="{ 'pb-card__pricing-discount': pricing.discount }"
|
|
68
|
-
class="pb-card__pricing-new"
|
|
69
|
-
/>
|
|
70
|
-
</div><m-flex
|
|
71
|
-
v-if="buttonLabel"
|
|
72
|
-
class="pb-card__buttons-container"
|
|
73
|
-
align-items="flex-end"
|
|
74
|
-
:justify-content="alignVertical"
|
|
75
|
-
>
|
|
76
|
-
<m-button
|
|
77
|
-
v-if="buttonLabel && !buttonHref"
|
|
78
|
-
class="pb-card__button"
|
|
79
|
-
:label="buttonLabel"
|
|
80
|
-
size="s"
|
|
81
|
-
:disabled="disabled"
|
|
82
|
-
@click="handleButtonClicked"
|
|
83
|
-
/>
|
|
84
|
-
<m-button
|
|
85
|
-
v-if="buttonHref && buttonLabel"
|
|
86
|
-
class="pb-card__button"
|
|
87
|
-
:label="buttonLabel"
|
|
88
|
-
:disabled="disabled"
|
|
89
|
-
rel="noopener noreferrer"
|
|
90
|
-
target="_blank"
|
|
91
|
-
size="s"
|
|
92
|
-
@click="handleButtonLinkClicked(buttonHref)"
|
|
93
|
-
/>
|
|
94
|
-
</m-flex><m-flex
|
|
95
|
-
v-if="linkLabel"
|
|
96
|
-
class="pb-card__links-container"
|
|
97
|
-
align-items="flex-end"
|
|
98
|
-
:justify-content="alignVertical"
|
|
99
|
-
>
|
|
100
|
-
<m-link
|
|
101
|
-
v-if="linkLabel"
|
|
102
|
-
class="pb-card__link"
|
|
103
|
-
:label="linkLabel"
|
|
104
|
-
:disabled="disabled"
|
|
105
|
-
size="s"
|
|
106
|
-
@click="handleLinkClicked"
|
|
107
|
-
/>
|
|
108
|
-
</m-flex></div>
|
|
109
|
-
<!-- eslint-enable -->
|
|
110
|
-
</div>
|
|
106
|
+
<pb-card-selection-indicator :selectable="selectable" :selected="selected" ref="pbCardSelectionIndicator" />
|
|
107
|
+
<pb-card-type-indicator v-if="typeIcon" :type-icon="typeIcon" ref="pbCardTypeIcon" />
|
|
111
108
|
</m-flex>
|
|
112
|
-
<pb-card-selection-indicator :selectable="selectable" :selected="selected" ref="pbCardSelectionIndicator" />
|
|
113
|
-
<pb-card-type-indicator v-if="typeIcon" :type-icon="typeIcon" ref="pbCardTypeIcon" />
|
|
114
109
|
</m-flex>
|
|
115
110
|
</template>
|
|
116
111
|
|
|
@@ -123,7 +118,6 @@ import MImage from '../mozaic/image/MImage.vue';
|
|
|
123
118
|
import PbCardSelectionIndicator from './decorators/PbCardSelectionIndicator.vue';
|
|
124
119
|
import PbCardTypeIndicator from './decorators/PbCardTypeIndicator.vue';
|
|
125
120
|
import { M_FLEX_VALIDATOR } from '../mozaic/flex/MFlex.vue';
|
|
126
|
-
import MRating from '../mozaic/rating/MRating.vue';
|
|
127
121
|
import MLink from '../mozaic/link/MLink.vue';
|
|
128
122
|
|
|
129
123
|
export const PB_CARD_VALIDATOR = {
|
|
@@ -137,7 +131,6 @@ export default defineComponent({
|
|
|
137
131
|
|
|
138
132
|
components: {
|
|
139
133
|
MLink,
|
|
140
|
-
MRating,
|
|
141
134
|
MButton,
|
|
142
135
|
MFlag,
|
|
143
136
|
MFlex,
|
|
@@ -296,21 +289,7 @@ export default defineComponent({
|
|
|
296
289
|
default: null,
|
|
297
290
|
},
|
|
298
291
|
/**
|
|
299
|
-
* The
|
|
300
|
-
*/
|
|
301
|
-
rating: {
|
|
302
|
-
type: Object,
|
|
303
|
-
default: null,
|
|
304
|
-
},
|
|
305
|
-
/**
|
|
306
|
-
* The pricing
|
|
307
|
-
*/
|
|
308
|
-
pricing: {
|
|
309
|
-
type: Object,
|
|
310
|
-
default: null,
|
|
311
|
-
},
|
|
312
|
-
/**
|
|
313
|
-
* The link label to display dialog
|
|
292
|
+
* The link label
|
|
314
293
|
*/
|
|
315
294
|
linkLabel: {
|
|
316
295
|
type: String,
|
|
@@ -371,10 +350,18 @@ $responsive-breakpoint: 's';
|
|
|
371
350
|
|
|
372
351
|
background-color: white;
|
|
373
352
|
border: 1px solid $color-grey-300;
|
|
374
|
-
height: fit-content;
|
|
375
353
|
overflow: hidden;
|
|
376
354
|
position: relative;
|
|
377
355
|
|
|
356
|
+
&__items-container:empty ~ &__image-container {
|
|
357
|
+
height: 100%;
|
|
358
|
+
|
|
359
|
+
.pb-card__image {
|
|
360
|
+
height: 100%;
|
|
361
|
+
padding-top: 0;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
378
365
|
&--hoverable:hover {
|
|
379
366
|
@include set-box-shadow('l');
|
|
380
367
|
|
|
@@ -432,12 +419,14 @@ $responsive-breakpoint: 's';
|
|
|
432
419
|
}
|
|
433
420
|
|
|
434
421
|
&__items-container {
|
|
435
|
-
display:
|
|
436
|
-
|
|
437
|
-
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
flex-grow: 1;
|
|
425
|
+
gap: $mu075;
|
|
426
|
+
padding: $mu100;
|
|
438
427
|
|
|
439
428
|
@include set-from-screen($responsive-breakpoint) {
|
|
440
|
-
|
|
429
|
+
padding: $mu150;
|
|
441
430
|
}
|
|
442
431
|
|
|
443
432
|
&:empty {
|
|
@@ -446,8 +435,6 @@ $responsive-breakpoint: 's';
|
|
|
446
435
|
}
|
|
447
436
|
|
|
448
437
|
&__flag {
|
|
449
|
-
margin: $mu100 0;
|
|
450
|
-
|
|
451
438
|
&--disabled {
|
|
452
439
|
opacity: 0.6;
|
|
453
440
|
}
|
|
@@ -459,7 +446,6 @@ $responsive-breakpoint: 's';
|
|
|
459
446
|
|
|
460
447
|
color: $color-grey-900;
|
|
461
448
|
hyphens: auto;
|
|
462
|
-
margin: $mu100 0;
|
|
463
449
|
max-width: 100%;
|
|
464
450
|
overflow-wrap: break-word;
|
|
465
451
|
word-break: break-word;
|
|
@@ -483,7 +469,6 @@ $responsive-breakpoint: 's';
|
|
|
483
469
|
|
|
484
470
|
color: $color-grey-900;
|
|
485
471
|
hyphens: auto;
|
|
486
|
-
margin: $mu100 0 $mu050;
|
|
487
472
|
max-width: 100%;
|
|
488
473
|
overflow-wrap: break-word;
|
|
489
474
|
word-break: break-word;
|
|
@@ -507,7 +492,6 @@ $responsive-breakpoint: 's';
|
|
|
507
492
|
color: $color-grey-600;
|
|
508
493
|
height: 100%;
|
|
509
494
|
hyphens: auto;
|
|
510
|
-
margin: $mu050 0 $mu100;
|
|
511
495
|
max-width: 100%;
|
|
512
496
|
overflow-wrap: break-word;
|
|
513
497
|
word-break: break-word;
|
|
@@ -521,26 +505,19 @@ $responsive-breakpoint: 's';
|
|
|
521
505
|
}
|
|
522
506
|
}
|
|
523
507
|
|
|
524
|
-
&
|
|
508
|
+
&__actions-container {
|
|
509
|
+
display: flex;
|
|
510
|
+
flex-direction: column;
|
|
525
511
|
flex-grow: 1;
|
|
526
|
-
|
|
512
|
+
gap: $mu075;
|
|
513
|
+
justify-content: end;
|
|
527
514
|
}
|
|
528
515
|
|
|
529
516
|
&__button {
|
|
530
|
-
height: auto !important;
|
|
531
517
|
padding-bottom: $mu050;
|
|
532
518
|
padding-top: $mu050;
|
|
533
519
|
}
|
|
534
520
|
|
|
535
|
-
&__links-container {
|
|
536
|
-
flex-grow: 1;
|
|
537
|
-
margin: $mu050 0 0;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
&__link {
|
|
541
|
-
height: auto !important;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
521
|
&--disabled {
|
|
545
522
|
background: $color-grey-100;
|
|
546
523
|
border: 2px solid $color-grey-100;
|
|
@@ -551,35 +528,5 @@ $responsive-breakpoint: 's';
|
|
|
551
528
|
cursor: not-allowed;
|
|
552
529
|
}
|
|
553
530
|
}
|
|
554
|
-
|
|
555
|
-
&__rating {
|
|
556
|
-
&-text {
|
|
557
|
-
@include set-font-scale('02', 'm');
|
|
558
|
-
|
|
559
|
-
color: $color-grey-700;
|
|
560
|
-
margin-left: $mu050;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
&__pricing {
|
|
565
|
-
&-old {
|
|
566
|
-
@include set-font-scale('04', 'm');
|
|
567
|
-
|
|
568
|
-
color: $color-grey-900;
|
|
569
|
-
margin-top: $mu050;
|
|
570
|
-
text-decoration-line: line-through;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
&-new {
|
|
574
|
-
@include set-font-scale('07', 'm');
|
|
575
|
-
@include set-font-face('semi-bold');
|
|
576
|
-
color: $color-grey-800;
|
|
577
|
-
margin-top: $mu100 !important;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
&-discount {
|
|
581
|
-
color: $color-danger-500 !important;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
531
|
}
|
|
585
532
|
</style>
|
|
@@ -124,10 +124,13 @@ export default defineComponent({
|
|
|
124
124
|
},
|
|
125
125
|
},
|
|
126
126
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
let targetUrl = card.viewModel.url;
|
|
128
|
+
if (this.currentAppointmentQualification && this.currentAppointmentQualification.inhabitantProjectId) {
|
|
129
|
+
targetUrl = card.viewModel.url.replace(
|
|
130
|
+
'@@PB_PROJECT_ID_FILLER@@',
|
|
131
|
+
this.currentAppointmentQualification.inhabitantProjectId,
|
|
132
|
+
);
|
|
133
|
+
}
|
|
131
134
|
window.open(targetUrl, '_blank');
|
|
132
135
|
},
|
|
133
136
|
|
|
@@ -184,7 +184,6 @@
|
|
|
184
184
|
</div>
|
|
185
185
|
</transition-group>
|
|
186
186
|
</pb-sticky-footer>
|
|
187
|
-
<div class="pb-question__padding-bottom" />
|
|
188
187
|
<m-container>
|
|
189
188
|
<m-flexy
|
|
190
189
|
v-if="payload.viewModel.decoratorStripe && payload.viewModel.decoratorStripe.length > 0"
|
|
@@ -202,6 +201,7 @@
|
|
|
202
201
|
</m-flexy-col>
|
|
203
202
|
</m-flexy>
|
|
204
203
|
</m-container>
|
|
204
|
+
<div class="pb-question__padding-bottom" />
|
|
205
205
|
<m-dialog class="pb-question__dialog" v-model:show-dialog="displayDialog">
|
|
206
206
|
<template #header v-if="!displayVideo">
|
|
207
207
|
<span>{{ dialog.headerTitle }}</span>
|
|
@@ -1,114 +1,17 @@
|
|
|
1
|
+
import merge from 'lodash.merge';
|
|
1
2
|
import { ref } from 'vue';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
2
4
|
import axios from 'axios';
|
|
3
5
|
import { object } from '@storybook/addon-knobs';
|
|
4
6
|
import { nestedAppDecorator } from '../../../.storybook/nested-app-decorator';
|
|
7
|
+
import storeOptions from '../../stores/store';
|
|
5
8
|
import PbScenario from './PbScenario.vue';
|
|
6
9
|
|
|
7
10
|
export default {
|
|
8
11
|
title: 'Project Booster/Scenario/PbScenario 🦠/Demo',
|
|
9
12
|
component: PbScenario,
|
|
10
13
|
decorators: [
|
|
11
|
-
nestedAppDecorator(
|
|
12
|
-
{
|
|
13
|
-
state: {
|
|
14
|
-
summary: {
|
|
15
|
-
subprojectId: 'ae62d167-e02e-4744-81b1-102cc5816be2',
|
|
16
|
-
subprojectTemplateId: '22248ac3-9391-47f4-8a54-6fe280c2fa5b',
|
|
17
|
-
businessUnit: 'LMFR',
|
|
18
|
-
summaryDate: '2020-05-13T09:49:45.886602047Z',
|
|
19
|
-
cost: {
|
|
20
|
-
min: 691526.2,
|
|
21
|
-
max: 1443197.48,
|
|
22
|
-
currency: 'EURO',
|
|
23
|
-
},
|
|
24
|
-
components: [
|
|
25
|
-
{
|
|
26
|
-
componentId: 'LAND',
|
|
27
|
-
title: 'Terrain en lotissement',
|
|
28
|
-
cost: {
|
|
29
|
-
min: 20664,
|
|
30
|
-
max: 38523.6,
|
|
31
|
-
currency: 'EURO',
|
|
32
|
-
},
|
|
33
|
-
lines: [
|
|
34
|
-
{
|
|
35
|
-
text: '- Terrain seul',
|
|
36
|
-
details: 'Terrain constructible, délimité et viabilisé. La nature du sous-sol est garantie.',
|
|
37
|
-
cost: {
|
|
38
|
-
min: 19680,
|
|
39
|
-
max: 35670,
|
|
40
|
-
currency: 'EURO',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
text: '- Frais de notaire',
|
|
45
|
-
cost: {
|
|
46
|
-
min: 984,
|
|
47
|
-
max: 2853.6,
|
|
48
|
-
currency: 'EURO',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
componentId: 'HOUSE',
|
|
55
|
-
title: 'Maison contemporaine livrée prête à finir',
|
|
56
|
-
cost: {
|
|
57
|
-
min: 664562.5,
|
|
58
|
-
max: 1381050,
|
|
59
|
-
currency: 'EURO',
|
|
60
|
-
},
|
|
61
|
-
lines: [
|
|
62
|
-
{
|
|
63
|
-
text: '- Budget construction maison',
|
|
64
|
-
details:
|
|
65
|
-
"Ce budget n'inclut pas : le terrain, la viabilisation, l'aménagement extérieur et la taxe d'aménagement.",
|
|
66
|
-
cost: {
|
|
67
|
-
min: 651000,
|
|
68
|
-
max: 1255500,
|
|
69
|
-
currency: 'EURO',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
componentId: 'TAXES',
|
|
76
|
-
title: "Taxe d'aménagement",
|
|
77
|
-
details:
|
|
78
|
-
"Taxe qui s'applique pour les projets de construction, de reconstruction et d'agrandissement qui nécessitent des autorisations de travaux. Un abattement de 50% est prévu sur les 100 premiers m².",
|
|
79
|
-
cost: {
|
|
80
|
-
min: 6299.7,
|
|
81
|
-
max: 23623.88,
|
|
82
|
-
currency: 'EURO',
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
subprojectAttributes: {
|
|
87
|
-
finish: 'PARTIALLY_BY_MYSELF',
|
|
88
|
-
houseType: 'CONTEMPORARY',
|
|
89
|
-
inseeCode: '59350',
|
|
90
|
-
land: 'NOT_YET',
|
|
91
|
-
landSurfaceInSquareMeters: 123,
|
|
92
|
-
landType: 'IN_A_LOT',
|
|
93
|
-
livingAreaInSquareMeters: 465,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
getters: {
|
|
99
|
-
summary(state) {
|
|
100
|
-
return state.summary;
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
actions: {
|
|
105
|
-
sendEventToBus(action) {
|
|
106
|
-
console.log('Event sent to bus: ', JSON.stringify(action, null, '\t'));
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
[{ path: '/steps/:stepCode/previous/:answers', component: PbScenario }],
|
|
111
|
-
),
|
|
14
|
+
nestedAppDecorator(storeOptions, [{ path: '/steps/:stepCode/previous/:answers', component: PbScenario }]),
|
|
112
15
|
],
|
|
113
16
|
parameters: { storyshots: { disable: true }, layout: 'fullscreen' },
|
|
114
17
|
};
|
|
@@ -124,6 +27,12 @@ const generateStory = (jsonLocation) => () => ({
|
|
|
124
27
|
},
|
|
125
28
|
},
|
|
126
29
|
setup() {
|
|
30
|
+
const store = useStore();
|
|
31
|
+
store.dispatch('documentsPlans/updateContext', { type: 'DOCUMENT', subType: 'PLAN' });
|
|
32
|
+
store.dispatch('documentsPictures/updateContext', { type: 'DOCUMENT', subType: 'PHOTO' });
|
|
33
|
+
store.dispatch('estimates/setSummary', {
|
|
34
|
+
cost: {},
|
|
35
|
+
});
|
|
127
36
|
const scenarios = ref(null);
|
|
128
37
|
const hasScenario = ref(false);
|
|
129
38
|
axios.get(jsonLocation).then((result) => {
|