@ptcwebops/ptcw-design 6.3.10-beta → 6.3.11-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/{component-6a178a16.js → component-4dd13907.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ptc-countdown.cjs.entry.js +1 -1
  4. package/dist/cjs/ptc-data-lookup.cjs.entry.js +1 -1
  5. package/dist/cjs/ptc-enhanced-product-listing-card.cjs.entry.js +66 -0
  6. package/dist/cjs/ptc-form-checkbox_4.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-icon-list.cjs.entry.js +6 -3
  8. package/dist/cjs/ptcw-design.cjs.js +1 -1
  9. package/dist/cjs/storefront-enhanced-product-list-example.cjs.entry.js +66 -0
  10. package/dist/collection/collection-manifest.json +2 -0
  11. package/dist/collection/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.css +1118 -0
  12. package/dist/collection/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.js +63 -0
  13. package/dist/collection/components/ptc-countdown/ptc-countdown.css +1 -1
  14. package/dist/collection/components/ptc-enhanced-product-listing-card/ptc-enhanced-product-listing-card.css +126 -0
  15. package/dist/collection/components/ptc-enhanced-product-listing-card/ptc-enhanced-product-listing-card.js +112 -0
  16. package/dist/collection/components/ptc-icon-list/ptc-icon-list.css +5 -0
  17. package/dist/collection/components/ptc-icon-list/ptc-icon-list.js +40 -2
  18. package/dist/custom-elements/index.d.ts +12 -0
  19. package/dist/custom-elements/index.js +131 -7
  20. package/dist/esm/{component-80f298b4.js → component-9c921cc6.js} +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/ptc-countdown.entry.js +1 -1
  23. package/dist/esm/ptc-data-lookup.entry.js +1 -1
  24. package/dist/esm/ptc-enhanced-product-listing-card.entry.js +62 -0
  25. package/dist/esm/ptc-form-checkbox_4.entry.js +1 -1
  26. package/dist/esm/ptc-icon-list.entry.js +6 -3
  27. package/dist/esm/ptcw-design.js +1 -1
  28. package/dist/esm/storefront-enhanced-product-list-example.entry.js +62 -0
  29. package/dist/ptcw-design/{p-d0581b07.entry.js → p-08b281d1.entry.js} +1 -1
  30. package/dist/ptcw-design/p-38b7ca02.entry.js +1 -0
  31. package/dist/ptcw-design/p-8eb89969.entry.js +1 -0
  32. package/dist/ptcw-design/{p-291072b4.entry.js → p-a3b57ede.entry.js} +1 -1
  33. package/dist/ptcw-design/{p-3f68e2f2.entry.js → p-ae50e218.entry.js} +1 -1
  34. package/dist/ptcw-design/p-b5094974.entry.js +1 -0
  35. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  36. package/dist/types/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.d.ts +10 -0
  37. package/dist/types/components/ptc-enhanced-product-listing-card/ptc-enhanced-product-listing-card.d.ts +20 -0
  38. package/dist/types/components/ptc-icon-list/ptc-icon-list.d.ts +2 -0
  39. package/dist/types/components.d.ts +46 -0
  40. package/package.json +1 -1
  41. package/readme.md +1 -1
  42. package/dist/ptcw-design/p-bf3bc577.entry.js +0 -1
  43. /package/dist/ptcw-design/{p-672a349f.js → p-bcab66bf.js} +0 -0
@@ -0,0 +1,63 @@
1
+ import { Host, h } from '@stencil/core';
2
+ import Swiper, { Navigation, Pagination, Scrollbar, Mousewheel } from 'swiper';
3
+ export class StorefrontEnhancedProductListExample {
4
+ constructor() {
5
+ this.componentDidLoad = () => {
6
+ setTimeout(() => {
7
+ let swiperContainer = this.el.querySelector('.enhanced-product-listing-cards');
8
+ this.swiper = new Swiper(swiperContainer, {
9
+ modules: [Navigation, Pagination, Scrollbar, Mousewheel],
10
+ slidesPerView: 'auto',
11
+ spaceBetween: 24,
12
+ initialSlide: 0,
13
+ centerInsufficientSlides: false,
14
+ scrollbar: {
15
+ el: this.swiperPaginationRef,
16
+ draggable: false,
17
+ },
18
+ navigation: {
19
+ nextEl: this.swiperButtonNextRef,
20
+ prevEl: this.swiperButtonPrevRef,
21
+ },
22
+ mousewheel: {
23
+ forceToAxis: true,
24
+ sensitivity: 100,
25
+ },
26
+ breakpoints: {
27
+ 768: {
28
+ slidesPerView: 2,
29
+ spaceBetween: 24,
30
+ },
31
+ 1200: {
32
+ slidesPerView: 2,
33
+ spaceBetween: 32,
34
+ },
35
+ 1440: {
36
+ slidesPerView: 2,
37
+ spaceBetween: 40,
38
+ },
39
+ },
40
+ });
41
+ swiperContainer.addEventListener('ctaFocussed', (e) => {
42
+ let focusIndex = e.detail['card-index'];
43
+ this.swiper.slideTo(focusIndex);
44
+ });
45
+ }, 100);
46
+ };
47
+ }
48
+ render() {
49
+ return (h(Host, null, h("div", { class: "swiper-container enhanced-product-listing-cards" }, h("div", { class: "swiper-wrapper" }, h("slot", null)), h("div", { class: "swiper-scrollbar", ref: el => (this.swiperPaginationRef = el) }), h("div", { class: "swiper-button-next", ref: el => (this.swiperButtonNextRef = el) }, h("svg", { width: "14", height: "20", viewBox: "0 0 14 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.75 17.25L8 10L0.75 2.75L3.375 0.125L13.25 10L3.375 19.875L0.75 17.25Z", fill: "#323B42" }))), h("div", { class: "swiper-button-prev", ref: el => (this.swiperButtonPrevRef = el) }, h("svg", { width: "14", height: "20", viewBox: "0 0 14 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M13.25 2.75L6 10L13.25 17.25L10.625 19.875L0.749999 10L10.625 0.125L13.25 2.75Z", fill: "#323B42" }))))));
50
+ }
51
+ static get is() { return "storefront-enhanced-product-list-example"; }
52
+ static get originalStyleUrls() {
53
+ return {
54
+ "$": ["storefront-enhanced-product-list-example.scss"]
55
+ };
56
+ }
57
+ static get styleUrls() {
58
+ return {
59
+ "$": ["storefront-enhanced-product-list-example.css"]
60
+ };
61
+ }
62
+ static get elementRef() { return "el"; }
63
+ }
@@ -74,7 +74,7 @@ ptc-link, ptc-square-card,
74
74
  padding: 16px 4px;
75
75
  display: block;
76
76
  max-width: 450px;
77
- min-width: 330px;
77
+ min-width: 280px;
78
78
  border-radius: 4px;
79
79
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.32);
80
80
  background-color: #20262a;
@@ -0,0 +1,126 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6,
7
+ p,
8
+ ul,
9
+ li,
10
+ ptc-subnav,
11
+ ptc-tab-list,
12
+ ptc-link, ptc-square-card,
13
+ .hyphenate-text, ptc-footer {
14
+ word-break: break-word;
15
+ hyphens: manual;
16
+ -webkit-hyphens: manual;
17
+ -moz-hyphens: manual;
18
+ -ms-hyphens: manual;
19
+ }
20
+ @supports (hyphenate-limit-chars: 12 3 3) {
21
+ h1,
22
+ h2,
23
+ h3,
24
+ h4,
25
+ h5,
26
+ h6,
27
+ p,
28
+ ul,
29
+ li,
30
+ ptc-subnav,
31
+ ptc-tab-list,
32
+ ptc-link, ptc-square-card,
33
+ .hyphenate-text, ptc-footer {
34
+ hyphens: auto;
35
+ -webkit-hyphenate-limit-before: 3;
36
+ /* For Safari */
37
+ -webkit-hyphenate-limit-after: 3;
38
+ /* For Safari */
39
+ hyphenate-limit-chars: 12 3 3;
40
+ hyphenate-limit-lines: 2;
41
+ hyphenate-limit-last: always;
42
+ hyphenate-limit-zone: 6%;
43
+ -webkit-hyphens: auto;
44
+ -webkit-hyphenate-limit-before: 3;
45
+ -webkit-hyphenate-limit-after: 3;
46
+ -webkit-hyphenate-limit-chars: 12 3 3;
47
+ -webkit-hyphenate-limit-lines: 2;
48
+ -moz-hyphens: auto;
49
+ -moz-hyphenate-limit-chars: 12 3 3;
50
+ -moz-hyphenate-limit-lines: 2;
51
+ -ms-hyphens: auto;
52
+ -ms-hyphenate-limit-chars: 12 3 3;
53
+ -ms-hyphenate-limit-lines: 2;
54
+ }
55
+ }
56
+
57
+ :host {
58
+ display: block;
59
+ height: 100%;
60
+ }
61
+ :host .card {
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: 24px;
65
+ justify-content: space-between;
66
+ position: relative;
67
+ padding: 32px 32px 40px 32px;
68
+ box-sizing: border-box;
69
+ width: 288px;
70
+ height: 100%;
71
+ border-radius: var(--ptc-border-radius-standard);
72
+ background: #FFF;
73
+ box-shadow: var(--ptc-shadow-small);
74
+ }
75
+ :host .ribbon {
76
+ position: absolute;
77
+ top: 32px;
78
+ left: -4px;
79
+ border-radius: 0px 4px 4px 0px;
80
+ background: var(--color-blue-07);
81
+ display: flex;
82
+ padding: 6px 28px;
83
+ justify-content: center;
84
+ align-items: center;
85
+ color: #FFF;
86
+ font-family: Raleway;
87
+ font-size: var(--ptc-font-size-x-small);
88
+ font-style: var(--ptc-font-style-normal);
89
+ font-weight: var(--ptc-font-weight-extrabold);
90
+ line-height: var(--ptc-line-height-densest);
91
+ }
92
+ :host .ribbon .ribbon-wrap-around {
93
+ position: absolute;
94
+ bottom: -4px;
95
+ left: 0px;
96
+ }
97
+ :host .flex-start {
98
+ padding-top: 48px;
99
+ }
100
+ :host .pricing {
101
+ display: flex;
102
+ gap: 4px;
103
+ align-items: flex-end;
104
+ margin-bottom: 16px;
105
+ }
106
+ :host .pricing .pricing-label {
107
+ color: var(--color-gray-10);
108
+ font-family: Raleway;
109
+ font-size: var(--ptc-font-size-x-small);
110
+ font-style: var(--ptc-font-style-normal);
111
+ font-weight: var(--ptc-font-weight-regular);
112
+ line-height: var(--ptc-line-height-p);
113
+ }
114
+ :host .pricing .pricing-value {
115
+ color: var(--color-gray-10, #323B42);
116
+ font-family: Raleway;
117
+ font-size: var(--ptc-font-size-x-large);
118
+ font-style: var(--ptc-font-style-normal);
119
+ font-weight: var(--ptc-font-weight-extrabold);
120
+ line-height: 35px;
121
+ }
122
+ @media only screen and (min-width: 768px) {
123
+ :host .card {
124
+ width: 100%;
125
+ }
126
+ }
@@ -0,0 +1,112 @@
1
+ import { Host, h } from '@stencil/core';
2
+ let iconListTextStyle = `:host .ptc-icon-list .ptc-content-simple {
3
+ color: #323B42;
4
+ font-family: Raleway;
5
+ font-size: 16px;
6
+ font-style: normal;
7
+ font-weight: 600;
8
+ line-height: 20px;
9
+ padding-top: 0;
10
+ }`;
11
+ export class PtcEnhancedProductListingCard {
12
+ constructor() {
13
+ this.ctaFocussedHandler = () => {
14
+ this.ctaFocussed.emit({
15
+ 'card-index': this.cardIndex
16
+ });
17
+ };
18
+ this.componentWillLoad = () => {
19
+ this.featureCallouts = [];
20
+ let featureCalloutSlots = this.el.querySelectorAll('[slot^="feature-callout-"]');
21
+ if (featureCalloutSlots && featureCalloutSlots.length > 0) {
22
+ for (let featureCalloutSlot of Array.from(featureCalloutSlots)) {
23
+ this.featureCallouts.push(featureCalloutSlot.innerText);
24
+ }
25
+ }
26
+ let cta = this.el.querySelector('[slot="cta"]');
27
+ if (cta) {
28
+ this.cta.href = cta.href;
29
+ this.cta.title = cta.title;
30
+ this.cta.text = cta.text;
31
+ this.cta.target = cta.target;
32
+ }
33
+ };
34
+ this.componentDidLoad = () => {
35
+ var _a;
36
+ let cta = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('ptc-button');
37
+ if (cta) {
38
+ cta.addEventListener('focus', () => this.ctaFocussedHandler());
39
+ }
40
+ };
41
+ this.cardIndex = 0;
42
+ this.featureCallouts = [];
43
+ this.cta = {
44
+ href: "",
45
+ title: "",
46
+ text: "",
47
+ target: "",
48
+ };
49
+ }
50
+ render() {
51
+ return (h(Host, null, h("div", { class: "card" }, h("div", { class: "ribbon" }, h("svg", { class: "ribbon-wrap-around", xmlns: "http://www.w3.org/2000/svg", width: "4", height: "4", viewBox: "0 0 4 4", fill: "none" }, h("path", { d: "M4 3.02124L0 0.0212402H4V3.02124Z", fill: "#08283E" })), h("slot", { name: "ribbon-text" })), h("div", { class: "flex-start" }, h("ptc-title", { "seo-compatibility-mode": true, type: "h3", "text-align": "left", "title-size": "large", "title-color": "gray", upperline: "no-upperline", "title-display": "block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", "is-plm-hub": "false" }, h("h3", null, h("slot", { name: "heading" }))), h("ptc-para", { "seo-compatibility-mode": true, "font-size": "x-small", "font-weight": "w-4", "para-align": "left", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-bottom-5" }, h("p", null, h("slot", { name: "description" }))), h("div", null, (this.featureCallouts.length > 0) && this.featureCallouts.map((feature, idx) => (h("ptc-icon-list", { "is-last-item": (idx === this.featureCallouts.length - 1) ? "true" : "false", "no-bottom-space": (idx === this.featureCallouts.length - 1) ? "true" : "false", "list-content": feature, styles: iconListTextStyle, "list-type": "simple-icon-list" }, h("icon-asset", { slot: "icon", type: "ptc", size: "x-small", name: "checkmark", color: "ptc-green" })))))), h("div", { class: "flex-end" }, h("div", { class: "pricing" }, h("span", { class: "pricing-label" }, h("slot", { name: "pricing-label" })), h("span", { class: "pricing-value" }, h("slot", { name: "pricing-value" }))), h("ptc-button", { color: "ptc-quaternary", "link-href": this.cta.href, "link-title": this.cta.title || this.cta.text, target: this.cta.target, type: "button", "tracker-id": `eplc${this.cardIndex}-cta` }, this.cta.text)))));
52
+ }
53
+ static get is() { return "ptc-enhanced-product-listing-card"; }
54
+ static get encapsulation() { return "shadow"; }
55
+ static get originalStyleUrls() {
56
+ return {
57
+ "$": ["ptc-enhanced-product-listing-card.scss"]
58
+ };
59
+ }
60
+ static get styleUrls() {
61
+ return {
62
+ "$": ["ptc-enhanced-product-listing-card.css"]
63
+ };
64
+ }
65
+ static get properties() {
66
+ return {
67
+ "cardIndex": {
68
+ "type": "number",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "number",
72
+ "resolved": "number",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "PROPS"
80
+ },
81
+ "attribute": "card-index",
82
+ "reflect": false,
83
+ "defaultValue": "0"
84
+ }
85
+ };
86
+ }
87
+ static get states() {
88
+ return {
89
+ "featureCallouts": {},
90
+ "cta": {}
91
+ };
92
+ }
93
+ static get events() {
94
+ return [{
95
+ "method": "ctaFocussed",
96
+ "name": "ctaFocussed",
97
+ "bubbles": true,
98
+ "cancelable": true,
99
+ "composed": true,
100
+ "docs": {
101
+ "tags": [],
102
+ "text": "EVENTS"
103
+ },
104
+ "complexType": {
105
+ "original": "any",
106
+ "resolved": "any",
107
+ "references": {}
108
+ }
109
+ }];
110
+ }
111
+ static get elementRef() { return "el"; }
112
+ }
@@ -127,4 +127,9 @@ ptc-link, ptc-square-card,
127
127
 
128
128
  :host(.last-item) {
129
129
  margin-bottom: var(--ptc-layout-spacing-03);
130
+ }
131
+
132
+ :host(.last-item.no-bottom-space) {
133
+ padding-bottom: 0;
134
+ margin-bottom: 0;
130
135
  }
@@ -6,16 +6,19 @@ export class PtcIconList {
6
6
  this.valueText = '';
7
7
  this.listContent = '';
8
8
  this.isLastItem = false;
9
+ this.noBottomSpace = false;
10
+ this.styles = undefined;
9
11
  }
10
12
  render() {
11
13
  const classMap = this.getCssClassMap();
12
- return (h(Host, { class: classMap }, this.listType == "stat-icon-list" ? (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-numbered-values" }, h("span", { class: "value-text" }, this.valueText, "\u00A0"), h("span", { class: "ptc-numbered-subtitle" }, this.valueWithUnit)), h("p", { class: "ptc-content" }, "- \u00A0", this.listContent))) : (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-content-simple" }, this.listContent, !this.listContent &&
14
+ return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), this.listType == "stat-icon-list" ? (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-numbered-values" }, h("span", { class: "value-text" }, this.valueText, "\u00A0"), h("span", { class: "ptc-numbered-subtitle" }, this.valueWithUnit)), h("p", { class: "ptc-content" }, "- \u00A0", this.listContent))) : (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-content-simple" }, this.listContent, !this.listContent &&
13
15
  h("slot", null))))));
14
16
  }
15
17
  getCssClassMap() {
16
18
  return {
17
19
  [this.listType]: this.listType ? true : false,
18
- ['last-item']: this.isLastItem ? true : false
20
+ ['last-item']: this.isLastItem ? true : false,
21
+ ['no-bottom-space']: this.noBottomSpace ? true : false,
19
22
  };
20
23
  }
21
24
  static get is() { return "ptc-icon-list"; }
@@ -121,6 +124,41 @@ export class PtcIconList {
121
124
  "attribute": "is-last-item",
122
125
  "reflect": false,
123
126
  "defaultValue": "false"
127
+ },
128
+ "noBottomSpace": {
129
+ "type": "boolean",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "boolean",
133
+ "resolved": "boolean",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": true,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": ""
141
+ },
142
+ "attribute": "no-bottom-space",
143
+ "reflect": false,
144
+ "defaultValue": "false"
145
+ },
146
+ "styles": {
147
+ "type": "string",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "string",
151
+ "resolved": "string",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": true,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": ""
159
+ },
160
+ "attribute": "styles",
161
+ "reflect": false
124
162
  }
125
163
  };
126
164
  }
@@ -350,6 +350,12 @@ export const PtcEmbeddedQuiz: {
350
350
  new (): PtcEmbeddedQuiz;
351
351
  };
352
352
 
353
+ interface PtcEnhancedProductListingCard extends Components.PtcEnhancedProductListingCard, HTMLElement {}
354
+ export const PtcEnhancedProductListingCard: {
355
+ prototype: PtcEnhancedProductListingCard;
356
+ new (): PtcEnhancedProductListingCard;
357
+ };
358
+
353
359
  interface PtcFeaturedList extends Components.PtcFeaturedList, HTMLElement {}
354
360
  export const PtcFeaturedList: {
355
361
  prototype: PtcFeaturedList;
@@ -1028,6 +1034,12 @@ export const SequentialBundleExample: {
1028
1034
  new (): SequentialBundleExample;
1029
1035
  };
1030
1036
 
1037
+ interface StorefrontEnhancedProductListExample extends Components.StorefrontEnhancedProductListExample, HTMLElement {}
1038
+ export const StorefrontEnhancedProductListExample: {
1039
+ prototype: StorefrontEnhancedProductListExample;
1040
+ new (): StorefrontEnhancedProductListExample;
1041
+ };
1042
+
1031
1043
  interface TabContent extends Components.TabContent, HTMLElement {}
1032
1044
  export const TabContent: {
1033
1045
  prototype: TabContent;