vviinn-widgets 2.2.2 → 2.4.0
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/dist/cjs/{app-globals-30781f30.js → app-globals-2bcc74df.js} +1 -1
- package/dist/cjs/cropper-handler.cjs.entry.js +1 -1
- package/dist/cjs/{customized-slots-5d904d8e.js → customized-slots-4202eaf5.js} +1 -1
- package/dist/cjs/highlight-box_22.cjs.entry.js +20 -10
- package/dist/cjs/{imageSearch.store-128957a4.js → imageSearch.store-cb2b2cc8.js} +14 -11
- package/dist/cjs/{index-c493804d.js → index-44fc16ad.js} +7 -9
- package/dist/cjs/{index-741a970d.js → index-6771ae25.js} +1 -1
- package/dist/cjs/index-e9439500.js +3943 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{vviinn-carousel_5.cjs.entry.js → vviinn-carousel_3.cjs.entry.js} +54 -108
- package/dist/cjs/vviinn-error.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +63 -0
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +44 -0
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -4
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +74 -10
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +27 -7
- package/dist/collection/components/image-search/search-filters/search-filters.js +24 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +4 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +6 -3
- package/dist/collection/components/vviinn-icons/index.js +6 -8
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +18 -1
- package/dist/collection/components/vviinn-product-card/stories/args.js +73 -0
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +51 -0
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +105 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +57 -12
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +207 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +89 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +11 -4
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +190 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +29 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +212 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +47 -9
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +5 -0
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +31 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +3 -0
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +33 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +108 -10
- package/dist/collection/network/utils.js +1 -1
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/{components/vviinn-vpr-widget/GridMode.js → recommendation/events.js} +0 -0
- package/dist/collection/store/store.js +7 -9
- package/dist/collection/store/tracking.store.js +3 -0
- package/dist/collection/tracking/event.js +3 -0
- package/dist/collection/tracking/filter.js +5 -0
- package/dist/collection/tracking/index.js +13 -0
- package/dist/collection/tracking/models.js +6 -0
- package/dist/collection/tracking/product.js +18 -0
- package/dist/collection/tracking/search.js +5 -0
- package/dist/collection/tracking/widget.js +10 -0
- package/dist/esm/{app-globals-345e497d.js → app-globals-550daa9b.js} +1 -1
- package/dist/esm/cropper-handler.entry.js +1 -1
- package/dist/esm/{customized-slots-a76a8d41.js → customized-slots-80625933.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +20 -10
- package/dist/esm/{imageSearch.store-8eab0da1.js → imageSearch.store-1268786d.js} +12 -10
- package/dist/esm/{index-8cb063df.js → index-1cf740a8.js} +8 -10
- package/dist/esm/{index-6fa21e24.js → index-c09e56b6.js} +1 -1
- package/dist/esm/index-fa27f1df.js +3934 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{vviinn-carousel_5.entry.js → vviinn-carousel_3.entry.js} +55 -107
- package/dist/esm/vviinn-error.entry.js +1 -1
- package/dist/esm/vviinn-preloader.entry.js +2 -2
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +59 -0
- package/dist/esm/vviinn-vpr-button.entry.js +40 -0
- package/dist/esm/vviinn-vps-button.entry.js +4 -4
- package/dist/esm/vviinn-vps-widget.entry.js +71 -7
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/Image/error.d.ts +1 -0
- package/dist/types/Image/form.d.ts +1 -0
- package/dist/types/Image/fromFile.d.ts +1 -0
- package/dist/types/Image/imageToB64.d.ts +1 -0
- package/dist/types/Image/index.d.ts +1 -0
- package/dist/types/Image/renderPromise.d.ts +1 -0
- package/dist/types/Image/resizeImage.d.ts +1 -0
- package/dist/types/Image/sizing.d.ts +1 -0
- package/dist/types/Image/toFile.d.ts +1 -0
- package/dist/types/analytics/GAnalytics.d.ts +1 -0
- package/dist/types/analytics/GeneralAnalytics.d.ts +1 -0
- package/dist/types/analytics/GtagAnalytics.d.ts +1 -0
- package/dist/types/analytics/ProductAnalytics.d.ts +1 -0
- package/dist/types/campaign/Campaign.d.ts +1 -0
- package/dist/types/campaign/CampaignService.d.ts +1 -0
- package/dist/types/campaign/VCSCampaign.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignService.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignService.d.ts +1 -0
- package/dist/types/components/customized-slots.d.ts +1 -0
- package/dist/types/components/image-search/image-view/highlight-box/highlight-box.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/image-cropper.d.ts +4 -0
- package/dist/types/components/image-search/search-filters/search-filters.d.ts +4 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +4 -0
- package/dist/types/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-server-error/vviinn-server-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +1 -0
- package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +1 -0
- package/dist/types/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.d.ts +3 -0
- package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +1 -0
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/vviinn-onboarding.d.ts +1 -0
- package/dist/types/components/vviinn-overlay/vviinn-overlay.d.ts +1 -0
- package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +1 -0
- package/dist/types/components/vviinn-preloader/vviinn-preloader.d.ts +1 -0
- package/dist/types/components/vviinn-privacy-badge/vviinn-privacy-badge.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/args.d.ts +74 -0
- package/dist/types/components/vviinn-product-card/stories/decorators.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/stories/vviinn-product-card.stories.d.ts +81 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +9 -3
- package/dist/types/components/vviinn-slider/arrow.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slide/vviinn-slide.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slider.d.ts +1 -0
- package/dist/types/components/vviinn-teaser/vviinn-teaser.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +208 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +215 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +4 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +199 -0
- package/dist/types/components/vviinn-vpr-widget/stories/decorators.d.ts +3 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +142 -0
- package/dist/types/components/vviinn-vpr-widget/token-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +10 -1
- package/dist/types/components/vviinn-vps-button/stories/vviinn-vps-button.stories.d.ts +13 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts +11 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +14 -1
- package/dist/types/components.d.ts +10 -4
- package/dist/types/cropper/Cropper.d.ts +1 -0
- package/dist/types/cropper/Handler.d.ts +1 -0
- package/dist/types/dom/index.d.ts +1 -0
- package/dist/types/error.d.ts +1 -0
- package/dist/types/file/index.d.ts +1 -0
- package/dist/types/geometry/Clip.d.ts +1 -0
- package/dist/types/geometry/Point.d.ts +1 -0
- package/dist/types/geometry/Rectangle.d.ts +1 -0
- package/dist/types/geometry/RectangleAlt.d.ts +1 -0
- package/dist/types/geometry/Sized.d.ts +1 -0
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/generated.d.ts +1 -0
- package/dist/types/interfaces/recommendation.d.ts +1 -0
- package/dist/types/network/apiClient.d.ts +1 -0
- package/dist/types/network/ion/File.d.ts +1 -0
- package/dist/types/network/ion/Form.d.ts +1 -0
- package/dist/types/network/ion/Link.d.ts +1 -0
- package/dist/types/network/ion/ValueObject.d.ts +1 -0
- package/dist/types/network/request.d.ts +1 -0
- package/dist/types/network/utils.d.ts +1 -0
- package/dist/types/openApi/index.d.ts +6 -0
- package/dist/types/recommendation/events.d.ts +6 -0
- package/dist/types/recommendation/recommendation.d.ts +1 -0
- package/dist/types/searchSession/searchSession.d.ts +1 -0
- package/dist/types/sentry.d.ts +1 -0
- package/dist/types/slider/GridMode.d.ts +1 -0
- package/dist/types/store/file-processing.d.ts +1 -0
- package/dist/types/store/imageSearch.store.d.ts +1 -0
- package/dist/types/store/store.d.ts +8 -6
- package/dist/types/store/tracking.store.d.ts +4 -0
- package/dist/types/stories/image-selector.stories.d.ts +1 -0
- package/dist/types/stories/image-view.stories.d.ts +1 -0
- package/dist/types/stories/modal.stories.d.ts +1 -0
- package/dist/types/stories/onboarding.stories.d.ts +1 -0
- package/dist/types/stories/overlay.stories.d.ts +1 -0
- package/dist/types/stories/overlayedModal.stories.d.ts +1 -0
- package/dist/types/stories/privacy-badge.stories.d.ts +1 -0
- package/dist/types/stories/slider.stories.d.ts +1 -0
- package/dist/types/stories/teaser.stories.d.ts +1 -0
- package/dist/types/stories/vps-widget.stories.d.ts +1 -0
- package/dist/types/stories/vviinn-product.stories.d.ts +1 -0
- package/dist/types/tracking/event.d.ts +4 -0
- package/dist/types/tracking/filter.d.ts +3 -0
- package/dist/types/tracking/index.d.ts +9 -0
- package/dist/types/tracking/models.d.ts +13 -0
- package/dist/types/tracking/product.d.ts +7 -0
- package/dist/types/tracking/search.d.ts +3 -0
- package/dist/types/tracking/widget.d.ts +5 -0
- package/dist/types/utils/collections/collectionsUtils.d.ts +1 -0
- package/dist/types/utils/either.d.ts +1 -0
- package/dist/types/utils/enum/enumUtils.d.ts +1 -0
- package/dist/types/utils/event/Events.d.ts +1 -0
- package/dist/types/utils/number/index.d.ts +1 -0
- package/dist/types/utils/option/option.d.ts +1 -0
- package/dist/types/utils/semigroup/semigroupDiff.d.ts +1 -0
- package/dist/types/utils/token/tokenUtils.d.ts +1 -0
- package/dist/vviinn-widgets/{p-78ccc9eb.js → p-07125f64.js} +1 -1
- package/dist/vviinn-widgets/{p-f47e82b2.entry.js → p-27ede517.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-9d24f51e.entry.js → p-314e40b3.entry.js} +1 -1
- package/dist/vviinn-widgets/p-316abc01.js +1 -0
- package/dist/vviinn-widgets/{p-fb14e3cc.entry.js → p-4bdb3027.entry.js} +1 -1
- package/dist/vviinn-widgets/p-5535163a.entry.js +1 -0
- package/dist/vviinn-widgets/{p-59edfbe2.js → p-78b65f70.js} +1 -1
- package/dist/vviinn-widgets/{p-400eb62f.entry.js → p-86ae782f.entry.js} +1 -1
- package/dist/vviinn-widgets/p-89f2c19a.entry.js +1 -0
- package/dist/vviinn-widgets/{p-e1ba8626.js → p-8e25b838.js} +1 -1
- package/dist/vviinn-widgets/p-94aa8705.entry.js +1 -0
- package/dist/vviinn-widgets/{p-e67cae57.js → p-97af45f0.js} +1 -1
- package/dist/vviinn-widgets/p-c5e6ec4f.js +1 -0
- package/dist/vviinn-widgets/p-c63fb46b.entry.js +1 -0
- package/{www/build/p-d085199d.entry.js → dist/vviinn-widgets/p-dd7cac6e.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +11 -3
- package/www/build/{p-78ccc9eb.js → p-07125f64.js} +1 -1
- package/www/build/{p-f47e82b2.entry.js → p-27ede517.entry.js} +1 -1
- package/www/build/{p-9d24f51e.entry.js → p-314e40b3.entry.js} +1 -1
- package/www/build/p-316abc01.js +1 -0
- package/www/build/{p-fb14e3cc.entry.js → p-4bdb3027.entry.js} +1 -1
- package/www/build/p-5535163a.entry.js +1 -0
- package/www/build/{p-59edfbe2.js → p-78b65f70.js} +1 -1
- package/www/build/{p-400eb62f.entry.js → p-86ae782f.entry.js} +1 -1
- package/www/build/p-89f2c19a.entry.js +1 -0
- package/www/build/{p-e1ba8626.js → p-8e25b838.js} +1 -1
- package/www/build/p-94aa8705.entry.js +1 -0
- package/www/build/p-961822d3.js +125 -0
- package/www/build/{p-e67cae57.js → p-97af45f0.js} +1 -1
- package/www/build/p-c5e6ec4f.js +1 -0
- package/www/build/p-c63fb46b.entry.js +1 -0
- package/{dist/vviinn-widgets/p-d085199d.entry.js → www/build/p-dd7cac6e.entry.js} +1 -1
- package/www/build/p-e0153ae2.css +6 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -177
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +0 -18
- package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +0 -7
- package/dist/types/components/vviinn-vpr-widget/GridMode.d.ts +0 -1
- package/dist/vviinn-widgets/p-04b06ea9.entry.js +0 -1
- package/dist/vviinn-widgets/p-56fc949a.js +0 -1
- package/dist/vviinn-widgets/p-e38f4aa2.entry.js +0 -1
- package/www/build/p-04b06ea9.entry.js +0 -1
- package/www/build/p-56fc949a.js +0 -1
- package/www/build/p-7e4978d5.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-e38f4aa2.entry.js +0 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export const argTypes = {
|
|
2
|
+
buttonSize: {
|
|
3
|
+
name: "Button size",
|
|
4
|
+
options: ["Default", "Small", "Large"],
|
|
5
|
+
mapping: {
|
|
6
|
+
Default: 40,
|
|
7
|
+
Small: 32,
|
|
8
|
+
Large: 48,
|
|
9
|
+
},
|
|
10
|
+
control: {
|
|
11
|
+
type: "select",
|
|
12
|
+
labels: {
|
|
13
|
+
Default: "Default (40px)",
|
|
14
|
+
Small: "Small (32px)",
|
|
15
|
+
Large: "Large (48px)",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultValue: "Default",
|
|
19
|
+
},
|
|
20
|
+
iconColor: {
|
|
21
|
+
name: "Icon color",
|
|
22
|
+
control: {
|
|
23
|
+
type: "color",
|
|
24
|
+
},
|
|
25
|
+
defaultValue: "#000000",
|
|
26
|
+
},
|
|
27
|
+
backgroundColor: {
|
|
28
|
+
name: "Background color",
|
|
29
|
+
control: {
|
|
30
|
+
type: "color",
|
|
31
|
+
},
|
|
32
|
+
defaultValue: "#ffffff",
|
|
33
|
+
},
|
|
34
|
+
backgroundOpacity: {
|
|
35
|
+
name: "Background opacity (%)",
|
|
36
|
+
control: {
|
|
37
|
+
type: "number",
|
|
38
|
+
},
|
|
39
|
+
defaultValue: 100,
|
|
40
|
+
},
|
|
41
|
+
radius: {
|
|
42
|
+
name: "Radius (px)",
|
|
43
|
+
control: {
|
|
44
|
+
type: "number",
|
|
45
|
+
},
|
|
46
|
+
defaultValue: 20,
|
|
47
|
+
},
|
|
48
|
+
border: {
|
|
49
|
+
name: "Border",
|
|
50
|
+
control: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
},
|
|
53
|
+
defaultValue: false,
|
|
54
|
+
},
|
|
55
|
+
borderColor: {
|
|
56
|
+
name: "Border color",
|
|
57
|
+
control: {
|
|
58
|
+
type: "color",
|
|
59
|
+
},
|
|
60
|
+
defaultValue: "#cccccc",
|
|
61
|
+
},
|
|
62
|
+
shadow: {
|
|
63
|
+
name: "Shadow",
|
|
64
|
+
control: {
|
|
65
|
+
type: "boolean",
|
|
66
|
+
},
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
},
|
|
69
|
+
position: {
|
|
70
|
+
name: "Modal container appearance",
|
|
71
|
+
options: ["bottom", "right"],
|
|
72
|
+
control: {
|
|
73
|
+
type: "select",
|
|
74
|
+
labels: {
|
|
75
|
+
bottom: "From bottom",
|
|
76
|
+
right: "From right",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
defaultValue: "bottom",
|
|
80
|
+
},
|
|
81
|
+
backdropOpacity: {
|
|
82
|
+
name: "Backdrop opacity (%)",
|
|
83
|
+
control: {
|
|
84
|
+
type: "number",
|
|
85
|
+
},
|
|
86
|
+
defaultValue: 50,
|
|
87
|
+
},
|
|
88
|
+
sidebarBorderRadius: {
|
|
89
|
+
name: "Modal container round corners (px)",
|
|
90
|
+
control: {
|
|
91
|
+
type: "number",
|
|
92
|
+
},
|
|
93
|
+
defaultValue: 16,
|
|
94
|
+
},
|
|
95
|
+
showSourceImage: {
|
|
96
|
+
name: "Modal container show source image",
|
|
97
|
+
control: {
|
|
98
|
+
type: "boolean",
|
|
99
|
+
},
|
|
100
|
+
defaultValue: true,
|
|
101
|
+
},
|
|
102
|
+
sourceImageSize: {
|
|
103
|
+
name: "Source image size",
|
|
104
|
+
options: ["Default", "Small", "Large"],
|
|
105
|
+
mapping: {
|
|
106
|
+
Default: 64,
|
|
107
|
+
Small: 48,
|
|
108
|
+
Large: 80,
|
|
109
|
+
},
|
|
110
|
+
control: {
|
|
111
|
+
type: "select",
|
|
112
|
+
labels: {
|
|
113
|
+
Default: "Default (64px)",
|
|
114
|
+
Small: "Small (48px)",
|
|
115
|
+
Large: "Large (80px)",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
defaultValue: "Default",
|
|
119
|
+
},
|
|
120
|
+
sourceImageBorder: {
|
|
121
|
+
name: "Source image border",
|
|
122
|
+
control: {
|
|
123
|
+
type: "boolean",
|
|
124
|
+
},
|
|
125
|
+
defaultValue: false,
|
|
126
|
+
},
|
|
127
|
+
sourceImageBorderColor: {
|
|
128
|
+
name: "Source image border color",
|
|
129
|
+
control: {
|
|
130
|
+
type: "color",
|
|
131
|
+
},
|
|
132
|
+
defaultValue: "#cccccc",
|
|
133
|
+
},
|
|
134
|
+
sourceImageShadow: {
|
|
135
|
+
name: "Source image shadow",
|
|
136
|
+
control: {
|
|
137
|
+
type: "boolean",
|
|
138
|
+
},
|
|
139
|
+
defaultValue: true,
|
|
140
|
+
},
|
|
141
|
+
font: {
|
|
142
|
+
name: "Font family",
|
|
143
|
+
options: ["Inter", "System", "Arial"],
|
|
144
|
+
mapping: {
|
|
145
|
+
Inter: "'Inter', sans-serif",
|
|
146
|
+
System: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
|
|
147
|
+
Arial: "Arial, sans-serif",
|
|
148
|
+
},
|
|
149
|
+
control: {
|
|
150
|
+
type: "select",
|
|
151
|
+
labels: {
|
|
152
|
+
Inter: "Inter",
|
|
153
|
+
System: "System stack",
|
|
154
|
+
Arial: "Arial (web safe)",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
defaultValue: "Inter",
|
|
158
|
+
},
|
|
159
|
+
primaryTextColor: {
|
|
160
|
+
name: "Primary text color",
|
|
161
|
+
control: {
|
|
162
|
+
type: "color",
|
|
163
|
+
},
|
|
164
|
+
defaultValue: "#161616",
|
|
165
|
+
},
|
|
166
|
+
secondaryTextColor: {
|
|
167
|
+
name: "Secondary text color",
|
|
168
|
+
control: {
|
|
169
|
+
type: "color",
|
|
170
|
+
},
|
|
171
|
+
defaultValue: "#757575",
|
|
172
|
+
},
|
|
173
|
+
modalTitle: {
|
|
174
|
+
name: "Modal container title",
|
|
175
|
+
control: {
|
|
176
|
+
type: "boolean",
|
|
177
|
+
},
|
|
178
|
+
defaultValue: true,
|
|
179
|
+
},
|
|
180
|
+
sidebarTitle: {
|
|
181
|
+
name: "Modal container title name",
|
|
182
|
+
control: {
|
|
183
|
+
type: "text",
|
|
184
|
+
},
|
|
185
|
+
defaultValue: "Visually similar products",
|
|
186
|
+
},
|
|
187
|
+
modalTitleFontSize: {
|
|
188
|
+
name: "Modal container title font size (px)",
|
|
189
|
+
control: {
|
|
190
|
+
type: "number",
|
|
191
|
+
},
|
|
192
|
+
defaultValue: 28,
|
|
193
|
+
},
|
|
194
|
+
modalScrollbar: {
|
|
195
|
+
name: "Use default horizontal scrollbar in modal container",
|
|
196
|
+
control: {
|
|
197
|
+
type: "boolean",
|
|
198
|
+
},
|
|
199
|
+
defaultValue: false,
|
|
200
|
+
},
|
|
201
|
+
productId: {
|
|
202
|
+
name: "Product id",
|
|
203
|
+
},
|
|
204
|
+
token: {
|
|
205
|
+
name: "Token",
|
|
206
|
+
},
|
|
207
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { withDesign } from "storybook-addon-designs";
|
|
2
|
+
import { argTypes } from "./args";
|
|
3
|
+
const centerDecorator = (story) => `
|
|
4
|
+
<div style="display: grid;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
right: 0;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-items: center;">
|
|
12
|
+
${story()}
|
|
13
|
+
</div>
|
|
14
|
+
`;
|
|
15
|
+
export default {
|
|
16
|
+
title: "Widgets/Visual Recommendations/Button",
|
|
17
|
+
component: "vviinn-vpr-button",
|
|
18
|
+
decorators: [withDesign, centerDecorator],
|
|
19
|
+
argTypes,
|
|
20
|
+
};
|
|
21
|
+
const Template = (args) => `<style>
|
|
22
|
+
body {
|
|
23
|
+
font-family: ${args.font};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
vviinn-vpr-button::part(button) {
|
|
27
|
+
width: ${args.buttonSize}px;
|
|
28
|
+
height: ${args.buttonSize}px;
|
|
29
|
+
fill: ${args.iconColor};
|
|
30
|
+
background: ${args.backgroundColor};
|
|
31
|
+
opacity: ${args.backgroundOpacity}%;
|
|
32
|
+
border-radius: ${args.radius}px;
|
|
33
|
+
border: ${args.border ? "1px solid" : "none"};
|
|
34
|
+
border-color: ${args.borderColor};
|
|
35
|
+
${args.shadow ? "" : "box-shadow: none;"}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
vviinn-recommendations-sidebar::part(title) {
|
|
39
|
+
display: ${args.modalTitle ? "inline" : "none"};
|
|
40
|
+
font-size: ${args.modalTitleFontSize}px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
vviinn-recommendations-sidebar::part(product-title),
|
|
44
|
+
vviinn-recommendations-sidebar::part(brand),
|
|
45
|
+
vviinn-recommendations-sidebar::part(type),
|
|
46
|
+
vviinn-recommendations-sidebar::part(price-regular),
|
|
47
|
+
vviinn-recommendations-sidebar::part(price-sale) {
|
|
48
|
+
color: ${args.primaryTextColor};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
vviinn-recommendations-sidebar::part(price-outdated) {
|
|
52
|
+
color: ${args.secondaryTextColor};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
vviinn-recommendations-sidebar.open {
|
|
56
|
+
background: rgba(0, 0, 0, 0.1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
vviinn-recommendations-sidebar::part(body) {
|
|
60
|
+
border-radius: ${args.sidebarBorderRadius}px ${args.sidebarBorderRadius}px 0 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
vviinn-recommendations-sidebar::part(source-image) {
|
|
64
|
+
width: ${args.sourceImageSize}px;
|
|
65
|
+
height: ${args.sourceImageSize}px;
|
|
66
|
+
border: ${args.sourceImageBorder ? "1px solid" : "none"};
|
|
67
|
+
border-color: ${args.sourceImageBorderColor};
|
|
68
|
+
${args.sourceImageShadow ? "" : "box-shadow: none;"}
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
<vviinn-vpr-button token="${args.token}"
|
|
72
|
+
product-id="${args.productId}"
|
|
73
|
+
position="${args.position}"
|
|
74
|
+
sidebar-title="${args.sidebarTitle}"
|
|
75
|
+
modal-scrollbar="${args.modalScrollbar}"
|
|
76
|
+
source-image="${args.showSourceImage
|
|
77
|
+
? "https://www.moebel-shop.de/media/image/e3/e9/28/0749295-001_600x600.jpg"
|
|
78
|
+
: ""}"></vviinn-vpr-button>`;
|
|
79
|
+
export const Default = Template.bind({});
|
|
80
|
+
Default.args = {
|
|
81
|
+
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjgzLCJqdGkiOiI3ZTg2Y2I1YS00ZTFjLTRhYjctYjU2My1lN2FjMTYzZTYyZDIiLCJzY29wZXMiOlsidnByIiwidnBzIiwidnBjIl19.SbaQnBkvoXer3GPCWUthFQStFKLHZNMBfj4Qu44WHM8nzaIt48I74yVy4gVbX29vtd6jIkDPdakqEXRXmAxOCtv7_nsd4iBs1yMegfOWW5g8f10PKfZqmWJcfhwKIEElnUMFmP6rXpogntZ7iFfeTBbiRNzQPhkaa7jUjgQkCC4",
|
|
82
|
+
productId: "4114460310",
|
|
83
|
+
};
|
|
84
|
+
Default.parameters = {
|
|
85
|
+
design: {
|
|
86
|
+
type: "figma",
|
|
87
|
+
url: "https://www.figma.com/file/YR5ZK1s4z9ZRUXytB8uVuj/Widgets?node-id=591%3A3859",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -10,6 +10,10 @@ export class VviinnVprButton {
|
|
|
10
10
|
this.sourceImage = null;
|
|
11
11
|
this.sidebarTitle = "Visually similar products";
|
|
12
12
|
this.modalScrollbar = false;
|
|
13
|
+
this.sidebar = null;
|
|
14
|
+
this.sidebarCloseListener = () => {
|
|
15
|
+
document.body.removeChild(this.sidebar);
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
18
|
render() {
|
|
15
19
|
return (h(Host, null,
|
|
@@ -25,10 +29,13 @@ export class VviinnVprButton {
|
|
|
25
29
|
sidebar.position = this.position;
|
|
26
30
|
sidebar.sourceImage = this.sourceImage;
|
|
27
31
|
sidebar.widgetScrollbar = this.modalScrollbar;
|
|
28
|
-
sidebar
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
this.sidebar = sidebar;
|
|
33
|
+
sidebar.addEventListener("modalClosed", this.sidebarCloseListener);
|
|
34
|
+
document.body.append(this.sidebar);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
this.sidebar.removeEventListener("modalCLosed", this.sidebarCloseListener);
|
|
38
|
+
document.body.removeChild(this.sidebar);
|
|
32
39
|
}
|
|
33
40
|
static get is() { return "vviinn-vpr-button"; }
|
|
34
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export const apiPath = {
|
|
2
|
+
name: "api-path",
|
|
3
|
+
control: {
|
|
4
|
+
type: "text",
|
|
5
|
+
},
|
|
6
|
+
table: {
|
|
7
|
+
defaultValue: { summary: "https://api.vviinn.com" },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const token = {
|
|
11
|
+
name: "token",
|
|
12
|
+
control: {
|
|
13
|
+
type: "text",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const productId = {
|
|
17
|
+
name: "product-id",
|
|
18
|
+
control: {
|
|
19
|
+
type: "text",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const cssUrl = {
|
|
23
|
+
name: "css-url",
|
|
24
|
+
description: "Optional for custom CSS. It will overwrite all other settings.",
|
|
25
|
+
control: {
|
|
26
|
+
type: "text",
|
|
27
|
+
},
|
|
28
|
+
required: false,
|
|
29
|
+
};
|
|
30
|
+
const analyticsId = {
|
|
31
|
+
name: "Google tracking account ID",
|
|
32
|
+
description: "Optional. Goolge Analytics account id or tag manager id and click events will be send for analytics product lists",
|
|
33
|
+
control: {
|
|
34
|
+
type: "text",
|
|
35
|
+
},
|
|
36
|
+
required: false,
|
|
37
|
+
};
|
|
38
|
+
export const campaignType = {
|
|
39
|
+
name: "campaign-type",
|
|
40
|
+
control: {
|
|
41
|
+
type: "select",
|
|
42
|
+
labels: {
|
|
43
|
+
VPR: "Visually similar products (VPR)",
|
|
44
|
+
VCS: "Visually cross-selling (VCS)",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: false,
|
|
48
|
+
};
|
|
49
|
+
const showTitle = {
|
|
50
|
+
name: "Section title",
|
|
51
|
+
control: {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
},
|
|
54
|
+
table: {
|
|
55
|
+
defaultValue: { summary: true },
|
|
56
|
+
},
|
|
57
|
+
required: false,
|
|
58
|
+
};
|
|
59
|
+
const titleName = {
|
|
60
|
+
name: "block-title",
|
|
61
|
+
control: {
|
|
62
|
+
type: "text",
|
|
63
|
+
},
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: "Recommended products" },
|
|
66
|
+
},
|
|
67
|
+
required: false,
|
|
68
|
+
};
|
|
69
|
+
const titleFontSize = {
|
|
70
|
+
name: "Section title name font size (px)",
|
|
71
|
+
control: {
|
|
72
|
+
type: "number",
|
|
73
|
+
},
|
|
74
|
+
required: false,
|
|
75
|
+
};
|
|
76
|
+
const showScrollbars = {
|
|
77
|
+
name: "show-scroll",
|
|
78
|
+
description: "Add browser default horizontal scroll bar (in continuity mode) or pagination bullets (in grid mode) to add extra cue for users ",
|
|
79
|
+
control: {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
},
|
|
82
|
+
required: false,
|
|
83
|
+
};
|
|
84
|
+
const imageWidth = {
|
|
85
|
+
name: "image-width",
|
|
86
|
+
control: {
|
|
87
|
+
type: "number",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
const contentAlignment = {
|
|
91
|
+
name: "Content alignment",
|
|
92
|
+
options: ["Left", "Centered", "Right"],
|
|
93
|
+
mapping: {
|
|
94
|
+
Left: 0,
|
|
95
|
+
Centered: 1,
|
|
96
|
+
Right: 2,
|
|
97
|
+
},
|
|
98
|
+
control: {
|
|
99
|
+
type: "select",
|
|
100
|
+
default: 0,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
const primaryTextColor = {
|
|
104
|
+
name: "Primary text color",
|
|
105
|
+
control: {
|
|
106
|
+
type: "color",
|
|
107
|
+
},
|
|
108
|
+
description: "Used where the most user attention is needed: product brand, product title, and price.",
|
|
109
|
+
};
|
|
110
|
+
const secondaryTextColor = {
|
|
111
|
+
name: "Secondary text color",
|
|
112
|
+
description: "Used in Old Price",
|
|
113
|
+
control: {
|
|
114
|
+
type: "color",
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const argTypes = {
|
|
118
|
+
analyticsId,
|
|
119
|
+
apiPath,
|
|
120
|
+
campaignType,
|
|
121
|
+
contentAlignment,
|
|
122
|
+
cssUrl,
|
|
123
|
+
imageWidth,
|
|
124
|
+
primaryTextColor,
|
|
125
|
+
productId,
|
|
126
|
+
secondaryTextColor,
|
|
127
|
+
showScrollbars,
|
|
128
|
+
showTitle,
|
|
129
|
+
titleFontSize,
|
|
130
|
+
titleName,
|
|
131
|
+
token,
|
|
132
|
+
};
|
|
133
|
+
const recommendationsGridProductsDesktop = {
|
|
134
|
+
name: "Product cards shown on desktop",
|
|
135
|
+
description: "Desktop mode is bigger than 1024px. (Use arrow buttons to apply changes)",
|
|
136
|
+
control: {
|
|
137
|
+
type: "number",
|
|
138
|
+
},
|
|
139
|
+
required: false,
|
|
140
|
+
};
|
|
141
|
+
const recommendationsGridProductsTablet = {
|
|
142
|
+
name: "Product cards shown on tablet",
|
|
143
|
+
description: "How many product cards users will see inside one grid in a screen 768px-1024px. (Use arrow buttons to apply changes)",
|
|
144
|
+
control: {
|
|
145
|
+
type: "number",
|
|
146
|
+
},
|
|
147
|
+
required: false,
|
|
148
|
+
};
|
|
149
|
+
const recommendationsGridProductsMobile = {
|
|
150
|
+
name: "Product cards shown on mobile",
|
|
151
|
+
description: "How many product cards users will see inside one grid in a screen <768. (Use arrow buttons to apply changes)",
|
|
152
|
+
control: {
|
|
153
|
+
type: "number",
|
|
154
|
+
},
|
|
155
|
+
required: false,
|
|
156
|
+
};
|
|
157
|
+
export const gridLayoutArgs = {
|
|
158
|
+
recommendationsGridProductsDesktop,
|
|
159
|
+
recommendationsGridProductsTablet,
|
|
160
|
+
recommendationsGridProductsMobile,
|
|
161
|
+
};
|
|
162
|
+
const recommendationsContinuityProductsDesktop = {
|
|
163
|
+
name: "Product cards width in a L screen [px]",
|
|
164
|
+
description: "How wide product cards will be on a screen bigger than 1024px width",
|
|
165
|
+
control: {
|
|
166
|
+
type: "number",
|
|
167
|
+
},
|
|
168
|
+
required: false,
|
|
169
|
+
};
|
|
170
|
+
const recommendationsContinuityProductsTablet = {
|
|
171
|
+
name: "Product cards width in a M screen [px]",
|
|
172
|
+
description: "How wide product cards will be on a screen from 768px-1024px width",
|
|
173
|
+
control: {
|
|
174
|
+
type: "number",
|
|
175
|
+
},
|
|
176
|
+
required: false,
|
|
177
|
+
};
|
|
178
|
+
const recommendationsContinuityProductsMobile = {
|
|
179
|
+
name: "Product cards width in a S screen [px]",
|
|
180
|
+
description: "How wide product cards will be on a screen smaller than 768px width",
|
|
181
|
+
control: {
|
|
182
|
+
type: "number",
|
|
183
|
+
},
|
|
184
|
+
required: false,
|
|
185
|
+
};
|
|
186
|
+
export const continuityLayoutArgs = {
|
|
187
|
+
recommendationsContinuityProductsDesktop,
|
|
188
|
+
recommendationsContinuityProductsTablet,
|
|
189
|
+
recommendationsContinuityProductsMobile,
|
|
190
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const gridDecorator = (story) => `
|
|
2
|
+
<style>
|
|
3
|
+
@media (min-width: 836px) {
|
|
4
|
+
#root-inner {
|
|
5
|
+
padding: 0 10%;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (max-width: 860px) {
|
|
10
|
+
vviinn-product-card::part(title),
|
|
11
|
+
vviinn-product-card::part(brand),
|
|
12
|
+
vviinn-product-card::part(type),
|
|
13
|
+
vviinn-product-card::part(price-container) {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
${story()}
|
|
19
|
+
`;
|
|
20
|
+
export const continuityDecorator = (story) => `
|
|
21
|
+
<style>
|
|
22
|
+
@media (min-width: 836px) {
|
|
23
|
+
#root-inner {
|
|
24
|
+
padding-left: 10%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
${story()}
|
|
29
|
+
`;
|