@ptcwebops/ptcw-design 0.5.6 → 0.5.7
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/icon-asset_13.cjs.entry.js +758 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-accordion-item.cjs.entry.js +110 -0
- package/dist/cjs/ptc-accordion.cjs.entry.js +49 -0
- package/dist/cjs/ptc-announcement.cjs.entry.js +48 -0
- package/dist/cjs/{ptc-announcement_2.cjs.entry.js → ptc-svg-btn.cjs.entry.js} +0 -42
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/icon-asset/media/designer.svg +11 -0
- package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.css +74 -0
- package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +296 -0
- package/dist/collection/components/ptc-accordion/ptc-accordion.css +8 -0
- package/dist/collection/components/ptc-accordion/ptc-accordion.js +74 -0
- package/dist/collection/components/ptc-checkbox/ptc-checkbox.css +46 -13
- package/dist/collection/components/ptc-checkbox/ptc-checkbox.js +58 -20
- package/dist/collection/components/ptc-container/ptc-container.css +24 -1
- package/dist/collection/components/ptc-container/ptc-container.js +22 -1
- package/dist/collection/components/ptc-dropdown/ptc-dropdown.css +66 -0
- package/dist/collection/components/ptc-dropdown/ptc-dropdown.js +144 -0
- package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.css +67 -14
- package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.js +24 -50
- package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.css +37 -0
- package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +86 -0
- package/dist/collection/components/ptc-link/ptc-link.css +18 -0
- package/dist/collection/components/ptc-link/ptc-link.js +2 -2
- package/dist/collection/components/ptc-modal/ptc-modal.css +37 -0
- package/dist/collection/components/ptc-modal/ptc-modal.js +93 -11
- package/dist/collection/components/ptc-shopping-cart/ptc-shopping-cart.css +10 -5
- package/dist/collection/components/ptc-shopping-cart/ptc-shopping-cart.js +30 -8
- package/dist/collection/components/ptc-title/ptc-title.css +67 -35
- package/dist/collection/components/ptc-title/ptc-title.js +11 -2
- package/dist/collection/media/svg-imgs/check-mark.svg +3 -0
- package/dist/collection/media/svg-imgs/union.svg +3 -0
- package/dist/collection/utils/component.js +3 -0
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/custom-elements/index.js +398 -46
- package/dist/esm/dropdown-item.entry.js +1 -1
- package/dist/esm/icon-asset_13.entry.js +742 -0
- package/dist/esm/{index-f64012bd.js → index-357497dc.js} +1 -1
- package/dist/esm/list-item.entry.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottie-player.entry.js +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-accordion-item.entry.js +106 -0
- package/dist/esm/ptc-accordion.entry.js +45 -0
- package/dist/esm/ptc-announcement.entry.js +44 -0
- package/dist/esm/ptc-breadcrumb.entry.js +1 -1
- package/dist/esm/ptc-card-bottom.entry.js +1 -1
- package/dist/esm/ptc-card-content.entry.js +1 -1
- package/dist/esm/ptc-card-plm.entry.js +1 -1
- package/dist/esm/ptc-card.entry.js +1 -1
- package/dist/esm/ptc-date.entry.js +1 -1
- package/dist/esm/ptc-ellipsis-dropdown.entry.js +1 -1
- package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
- package/dist/esm/ptc-hero.entry.js +1 -1
- package/dist/esm/ptc-icon-list.entry.js +1 -1
- package/dist/esm/ptc-img_2.entry.js +1 -1
- package/dist/esm/ptc-list.entry.js +1 -1
- package/dist/esm/ptc-lottie.entry.js +1 -1
- package/dist/esm/ptc-minimized-footer.entry.js +1 -1
- package/dist/esm/ptc-minimized-header.entry.js +1 -1
- package/dist/esm/ptc-mobile-select.entry.js +1 -1
- package/dist/esm/ptc-nav-item.entry.js +1 -1
- package/dist/esm/ptc-nav.entry.js +1 -1
- package/dist/esm/ptc-picture.entry.js +1 -1
- package/dist/esm/ptc-previous-url.entry.js +1 -1
- package/dist/esm/ptc-pricing-block.entry.js +1 -1
- package/dist/esm/ptc-quote.entry.js +1 -1
- package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
- package/dist/esm/ptc-social-share.entry.js +1 -1
- package/dist/esm/ptc-span.entry.js +1 -1
- package/dist/esm/{ptc-announcement_2.entry.js → ptc-svg-btn.entry.js} +2 -43
- package/dist/esm/ptc-tab-list.entry.js +1 -1
- package/dist/esm/ptc-two-column-media.entry.js +1 -1
- package/dist/esm/ptcw-design.js +2 -2
- package/dist/esm/tab-content.entry.js +1 -1
- package/dist/esm/tab-header.entry.js +1 -1
- package/dist/ptcw-design/media/designer.svg +11 -0
- package/dist/ptcw-design/{p-7448f767.entry.js → p-00c1c3ec.entry.js} +1 -1
- package/dist/ptcw-design/{p-e8a60227.js → p-0e571387.js} +1 -1
- package/dist/ptcw-design/p-0f17a4f0.entry.js +1 -0
- package/dist/ptcw-design/{p-c3e79e54.entry.js → p-316d8eae.entry.js} +1 -1
- package/dist/ptcw-design/p-32ec2097.entry.js +1 -0
- package/dist/ptcw-design/p-45528270.entry.js +1 -0
- package/dist/ptcw-design/{p-3a41081a.entry.js → p-5142e9f1.entry.js} +1 -1
- package/dist/ptcw-design/{p-b79303ef.entry.js → p-525da87e.entry.js} +1 -1
- package/dist/ptcw-design/{p-8c6b8bc9.entry.js → p-59fd3cd2.entry.js} +1 -1
- package/dist/ptcw-design/{p-679b99ad.entry.js → p-6106d579.entry.js} +1 -1
- package/dist/ptcw-design/{p-18d0d10a.entry.js → p-66740e2e.entry.js} +1 -1
- package/dist/ptcw-design/{p-28174fbe.entry.js → p-689d91a7.entry.js} +1 -1
- package/dist/ptcw-design/{p-2b3a38c3.entry.js → p-68bcb24d.entry.js} +1 -1
- package/dist/ptcw-design/{p-796b4a16.entry.js → p-69581273.entry.js} +1 -1
- package/dist/ptcw-design/p-695f82bc.entry.js +1 -0
- package/dist/ptcw-design/{p-cd7119b8.entry.js → p-6ec21b76.entry.js} +1 -1
- package/dist/ptcw-design/{p-204a78ce.entry.js → p-737796bc.entry.js} +1 -1
- package/dist/ptcw-design/{p-5069bb7d.entry.js → p-74a72a40.entry.js} +1 -1
- package/dist/ptcw-design/{p-72e6a3f1.entry.js → p-7966413a.entry.js} +1 -1
- package/dist/ptcw-design/{p-1cfc77eb.entry.js → p-83277ae9.entry.js} +1 -1
- package/dist/ptcw-design/{p-c5bfb13d.entry.js → p-870d7171.entry.js} +1 -1
- package/dist/ptcw-design/{p-ee61991d.entry.js → p-91456c49.entry.js} +1 -1
- package/dist/ptcw-design/p-95f7e520.entry.js +1 -0
- package/dist/ptcw-design/{p-c13f31f6.entry.js → p-9e1fe694.entry.js} +1 -1
- package/dist/ptcw-design/{p-fe957cbf.entry.js → p-9e693f5e.entry.js} +1 -1
- package/dist/ptcw-design/{p-c5951736.entry.js → p-9ed142ce.entry.js} +1 -1
- package/dist/ptcw-design/{p-781aacb7.entry.js → p-9fe3e385.entry.js} +1 -1
- package/dist/ptcw-design/{p-0c86ac1a.entry.js → p-aa4f80c6.entry.js} +1 -1
- package/dist/ptcw-design/{p-612f7224.entry.js → p-adcbd7e1.entry.js} +1 -1
- package/dist/ptcw-design/{p-fa53e5e5.entry.js → p-beb569e6.entry.js} +1 -1
- package/dist/ptcw-design/{p-ec10f846.entry.js → p-c23a6ee1.entry.js} +1 -1
- package/dist/ptcw-design/{p-7bcc42e1.entry.js → p-cbf56b5e.entry.js} +1 -1
- package/dist/ptcw-design/p-cc18f13a.entry.js +1 -0
- package/dist/ptcw-design/{p-2a1808f8.entry.js → p-d0709a7c.entry.js} +1 -1
- package/dist/ptcw-design/{p-dbf3779e.entry.js → p-e4359c5a.entry.js} +1 -1
- package/dist/ptcw-design/{p-cec492a8.entry.js → p-ea8fa57b.entry.js} +1 -1
- package/dist/ptcw-design/{p-d64c3892.entry.js → p-ef64b508.entry.js} +1 -1
- package/dist/ptcw-design/{p-8ea08e1d.entry.js → p-f72ef3fc.entry.js} +1 -1
- package/dist/ptcw-design/{p-dc18ae76.entry.js → p-ff08fa6c.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +2 -2
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.d.ts +59 -0
- package/dist/types/components/ptc-accordion/ptc-accordion.d.ts +13 -0
- package/dist/types/components/ptc-checkbox/ptc-checkbox.d.ts +6 -4
- package/dist/types/components/ptc-container/ptc-container.d.ts +1 -0
- package/dist/types/components/ptc-dropdown/ptc-dropdown.d.ts +18 -0
- package/dist/types/components/ptc-filter-tag/ptc-filter-tag.d.ts +4 -9
- package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +9 -0
- package/dist/types/components/ptc-link/ptc-link.d.ts +1 -1
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +9 -0
- package/dist/types/components/ptc-title/ptc-title.d.ts +1 -1
- package/dist/types/components.d.ts +167 -23
- package/dist/types/utils/component.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +0 -64
- package/dist/cjs/ptc-button.cjs.entry.js +0 -76
- package/dist/cjs/ptc-checkbox.cjs.entry.js +0 -36
- package/dist/cjs/ptc-container.cjs.entry.js +0 -43
- package/dist/cjs/ptc-filter-tag.cjs.entry.js +0 -40
- package/dist/cjs/ptc-link.cjs.entry.js +0 -53
- package/dist/cjs/ptc-modal.cjs.entry.js +0 -117
- package/dist/cjs/ptc-para.cjs.entry.js +0 -50
- package/dist/cjs/ptc-shopping-cart.cjs.entry.js +0 -41
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -46
- package/dist/cjs/ptc-title.cjs.entry.js +0 -59
- package/dist/esm/icon-asset.entry.js +0 -60
- package/dist/esm/ptc-button.entry.js +0 -72
- package/dist/esm/ptc-checkbox.entry.js +0 -32
- package/dist/esm/ptc-container.entry.js +0 -39
- package/dist/esm/ptc-filter-tag.entry.js +0 -36
- package/dist/esm/ptc-link.entry.js +0 -49
- package/dist/esm/ptc-modal.entry.js +0 -113
- package/dist/esm/ptc-para.entry.js +0 -46
- package/dist/esm/ptc-shopping-cart.entry.js +0 -37
- package/dist/esm/ptc-spacer.entry.js +0 -42
- package/dist/esm/ptc-title.entry.js +0 -55
- package/dist/ptcw-design/p-279609f3.entry.js +0 -1
- package/dist/ptcw-design/p-412ca190.entry.js +0 -1
- package/dist/ptcw-design/p-49d34cb8.entry.js +0 -1
- package/dist/ptcw-design/p-7133275c.entry.js +0 -1
- package/dist/ptcw-design/p-90423b6f.entry.js +0 -1
- package/dist/ptcw-design/p-969c178b.entry.js +0 -1
- package/dist/ptcw-design/p-a9e7cd3e.entry.js +0 -1
- package/dist/ptcw-design/p-ab27089f.entry.js +0 -1
- package/dist/ptcw-design/p-b238d684.entry.js +0 -1
- package/dist/ptcw-design/p-c69933fe.entry.js +0 -1
- package/dist/ptcw-design/p-d2ef4221.entry.js +0 -1
- package/dist/ptcw-design/p-df80470b.entry.js +0 -1
- package/dist/ptcw-design/p-f32f9817.entry.js +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
:host {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
:host .dropdown__header {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: background-color ease-out 250ms, border-color ease-out 250ms;
|
|
8
|
+
background-color: var(--color-white);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
align-content: center;
|
|
12
|
+
border: 1px solid var(--color-gray-05);
|
|
13
|
+
padding: 0.25rem 0.75rem 0.25rem 0.75rem;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
font-family: Raleway;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 24px;
|
|
19
|
+
letter-spacing: 0em;
|
|
20
|
+
text-align: left;
|
|
21
|
+
}
|
|
22
|
+
:host .dropdown__header b {
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
}
|
|
25
|
+
:host .dropdown__header icon-asset {
|
|
26
|
+
width: 1rem;
|
|
27
|
+
height: 1rem;
|
|
28
|
+
margin-left: 0.5rem;
|
|
29
|
+
}
|
|
30
|
+
:host .dropdown__header:hover {
|
|
31
|
+
background-color: var(--color-gray-02);
|
|
32
|
+
}
|
|
33
|
+
:host .dropdown__list {
|
|
34
|
+
display: table;
|
|
35
|
+
border: 1px solid rgba(0, 0, 0, 0.24);
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
}
|
|
38
|
+
:host ul {
|
|
39
|
+
display: block;
|
|
40
|
+
top: 0.2rem;
|
|
41
|
+
right: 0.2rem;
|
|
42
|
+
margin: 0;
|
|
43
|
+
list-style-type: none;
|
|
44
|
+
padding-inline-start: 0;
|
|
45
|
+
padding: 0.25rem 0.25rem;
|
|
46
|
+
background-color: var(--color-gray-02);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
position: absolute;
|
|
49
|
+
z-index: 500;
|
|
50
|
+
}
|
|
51
|
+
:host ul li {
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
padding: 3px 1rem;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
}
|
|
56
|
+
:host ul li.selected:before {
|
|
57
|
+
content: "✓";
|
|
58
|
+
display: block;
|
|
59
|
+
position: absolute;
|
|
60
|
+
left: 0.4rem;
|
|
61
|
+
}
|
|
62
|
+
:host ul li:hover {
|
|
63
|
+
color: #fff;
|
|
64
|
+
background-color: #699af8;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Component, h, Prop, State, Event, Element } from '@stencil/core';
|
|
2
|
+
export class PtcDropdown {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Theme
|
|
6
|
+
*/
|
|
7
|
+
this.theme = 'sort';
|
|
8
|
+
this.toggle = false;
|
|
9
|
+
this.handleClick = (item) => {
|
|
10
|
+
this.listItems.forEach((item) => item.selected = undefined);
|
|
11
|
+
item.selected = true;
|
|
12
|
+
this.selectedItem = item;
|
|
13
|
+
this.toggle = !this.toggle;
|
|
14
|
+
this.clickedItem.emit(item);
|
|
15
|
+
};
|
|
16
|
+
this.toggleList = () => {
|
|
17
|
+
this.toggle = !this.toggle;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
let items = this.host.querySelectorAll('item');
|
|
22
|
+
if (!this.listItems) {
|
|
23
|
+
this.listItems = [];
|
|
24
|
+
}
|
|
25
|
+
items.forEach(item => {
|
|
26
|
+
if (item && item.getAttribute('label')) {
|
|
27
|
+
let listItem = {
|
|
28
|
+
element: item,
|
|
29
|
+
label: item.getAttribute('label'),
|
|
30
|
+
selected: item.hasAttribute('selected')
|
|
31
|
+
};
|
|
32
|
+
this.listItems.push(listItem);
|
|
33
|
+
if (item.hasAttribute('selected')) {
|
|
34
|
+
this.selectedItem = listItem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
const classMap = this.getCssClassMap();
|
|
41
|
+
return (h("div", { class: classMap },
|
|
42
|
+
h("header", { class: "dropdown__header", onClick: this.toggleList },
|
|
43
|
+
h("label", null,
|
|
44
|
+
h("b", null, this.label),
|
|
45
|
+
" ",
|
|
46
|
+
this.selectedItem ? this.selectedItem.label : "Select Option"),
|
|
47
|
+
h("icon-asset", { type: "solid", size: "x-small", name: "chevron-down" })),
|
|
48
|
+
this.toggle &&
|
|
49
|
+
h("ul", { tabIndex: -1, class: "dropdown__list", onBlur: () => { this.toggle = false; } }, this.listItems.map((item) => {
|
|
50
|
+
let cssClass = "dropdown__item";
|
|
51
|
+
if (item.selected) {
|
|
52
|
+
cssClass += " selected";
|
|
53
|
+
}
|
|
54
|
+
return (h("li", { class: cssClass, onClick: () => this.handleClick(item) }, item.label));
|
|
55
|
+
}))));
|
|
56
|
+
}
|
|
57
|
+
getCssClassMap() {
|
|
58
|
+
return {
|
|
59
|
+
['ptc-dropdown']: true,
|
|
60
|
+
[this.theme]: true
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get is() { return "ptc-dropdown"; }
|
|
64
|
+
static get encapsulation() { return "shadow"; }
|
|
65
|
+
static get originalStyleUrls() { return {
|
|
66
|
+
"$": ["ptc-dropdown.scss"]
|
|
67
|
+
}; }
|
|
68
|
+
static get styleUrls() { return {
|
|
69
|
+
"$": ["ptc-dropdown.css"]
|
|
70
|
+
}; }
|
|
71
|
+
static get properties() { return {
|
|
72
|
+
"theme": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "'sort'",
|
|
77
|
+
"resolved": "\"sort\"",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "Theme"
|
|
85
|
+
},
|
|
86
|
+
"attribute": "theme",
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"defaultValue": "'sort'"
|
|
89
|
+
},
|
|
90
|
+
"label": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": ""
|
|
103
|
+
},
|
|
104
|
+
"attribute": "label",
|
|
105
|
+
"reflect": false
|
|
106
|
+
},
|
|
107
|
+
"listItems": {
|
|
108
|
+
"type": "unknown",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "any[]",
|
|
112
|
+
"resolved": "any[]",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": ""
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}; }
|
|
123
|
+
static get states() { return {
|
|
124
|
+
"toggle": {},
|
|
125
|
+
"selectedItem": {}
|
|
126
|
+
}; }
|
|
127
|
+
static get events() { return [{
|
|
128
|
+
"method": "clickedItem",
|
|
129
|
+
"name": "clickedItem",
|
|
130
|
+
"bubbles": true,
|
|
131
|
+
"cancelable": true,
|
|
132
|
+
"composed": true,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "any",
|
|
139
|
+
"resolved": "any",
|
|
140
|
+
"references": {}
|
|
141
|
+
}
|
|
142
|
+
}]; }
|
|
143
|
+
static get elementRef() { return "host"; }
|
|
144
|
+
}
|
|
@@ -1,18 +1,71 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ptc-filter-tag {
|
|
2
|
+
display: block;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
position: relative;
|
|
5
|
+
margin: 0.25rem;
|
|
6
|
+
}
|
|
7
|
+
.ptc-filter-tag.bubble {
|
|
8
|
+
display: inline-block;
|
|
2
9
|
font-family: Raleway;
|
|
3
|
-
font-size:
|
|
4
|
-
font-weight:
|
|
5
|
-
line-height:
|
|
6
|
-
letter-spacing:
|
|
10
|
+
font-size: var(--ptc-font-size-xx-small);
|
|
11
|
+
font-weight: var(--ptc-font-weight-semibold);
|
|
12
|
+
line-height: var(--ptc-line-height-denser);
|
|
13
|
+
letter-spacing: var(--ptc-letter-spacing-normal);
|
|
7
14
|
text-align: left;
|
|
8
|
-
|
|
15
|
+
align-items: center;
|
|
16
|
+
transition: border-color ease-out 250ms;
|
|
17
|
+
border: 1px solid var(--color-gray-05);
|
|
9
18
|
border-radius: 999px;
|
|
10
|
-
padding
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
.bubble
|
|
17
|
-
|
|
19
|
+
padding: 0.375rem 1.875rem 0.375rem 0.875rem;
|
|
20
|
+
background: var(--color-white);
|
|
21
|
+
}
|
|
22
|
+
.ptc-filter-tag.bubble:hover {
|
|
23
|
+
border: 1px solid var(--color-gray-12);
|
|
24
|
+
}
|
|
25
|
+
.ptc-filter-tag.bubble .cls {
|
|
26
|
+
display: block;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0.35rem;
|
|
29
|
+
right: 0.8rem;
|
|
30
|
+
}
|
|
31
|
+
.ptc-filter-tag.link, .ptc-filter-tag.link-lg {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font-family: Raleway;
|
|
34
|
+
font-size: var(--ptc-font-size-x-small);
|
|
35
|
+
font-weight: var(--ptc-font-weight-semibold);
|
|
36
|
+
line-height: var(--ptc-line-height-denser);
|
|
37
|
+
letter-spacing: var(--ptc-letter-spacing-normal);
|
|
38
|
+
text-align: right;
|
|
39
|
+
border-bottom: 1px solid transparent;
|
|
40
|
+
background: var(--color-white);
|
|
41
|
+
}
|
|
42
|
+
.ptc-filter-tag.link:hover, .ptc-filter-tag.link-lg:hover {
|
|
43
|
+
text-decoration: underline;
|
|
44
|
+
}
|
|
45
|
+
.ptc-filter-tag.link .cls, .ptc-filter-tag.link-lg .cls {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
.ptc-filter-tag.link-lg {
|
|
49
|
+
font-size: var(--ptc-font-size-small);
|
|
50
|
+
font-weight: var(--ptc-font-weight-bold);
|
|
51
|
+
}
|
|
52
|
+
.ptc-filter-tag.button {
|
|
53
|
+
background: var(--color-gray-10);
|
|
54
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
55
|
+
padding: 0.625rem 1rem;
|
|
56
|
+
font-family: "Raleway";
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-size: var(--ptc-font-size-x-small);
|
|
59
|
+
font-weight: var(--ptc-font-weight-semibold);
|
|
60
|
+
line-height: var(--ptc-line-height-denser);
|
|
61
|
+
color: var(--color-white);
|
|
62
|
+
}
|
|
63
|
+
.ptc-filter-tag.button:hover {
|
|
64
|
+
background-color: var(--color-gray-12);
|
|
65
|
+
}
|
|
66
|
+
.ptc-filter-tag.button:active {
|
|
67
|
+
background-color: var(--color-black);
|
|
68
|
+
}
|
|
69
|
+
.ptc-filter-tag.button .cls {
|
|
70
|
+
display: none;
|
|
18
71
|
}
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import { Component, h, Prop, Host } from '@stencil/core';
|
|
1
|
+
import { Component, h, Prop, Host, Event } from '@stencil/core';
|
|
2
|
+
import CloseIcon from '../../media/svg-imgs/union.svg';
|
|
2
3
|
export class PtcFilterTag {
|
|
3
4
|
constructor() {
|
|
4
5
|
/**
|
|
5
6
|
* Theme
|
|
6
7
|
*/
|
|
7
8
|
this.theme = 'bubble';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.uppercase = false;
|
|
12
|
-
/**
|
|
13
|
-
* Font Size
|
|
14
|
-
*/
|
|
15
|
-
this.fontSize = 'medium';
|
|
9
|
+
this.handleClick = () => {
|
|
10
|
+
this.clicked.emit(this);
|
|
11
|
+
};
|
|
16
12
|
}
|
|
17
13
|
render() {
|
|
18
14
|
const classMap = this.getCssClassMap();
|
|
19
|
-
return (h(Host,
|
|
20
|
-
h("span", { class:
|
|
15
|
+
return (h(Host, null,
|
|
16
|
+
h("span", { class: classMap, onClick: () => this.handleClick() },
|
|
21
17
|
h("slot", null),
|
|
22
|
-
h("
|
|
18
|
+
h("span", { class: "cls", innerHTML: CloseIcon }))));
|
|
23
19
|
}
|
|
24
20
|
getCssClassMap() {
|
|
25
21
|
return {
|
|
26
22
|
['ptc-filter-tag']: true,
|
|
27
|
-
[this.theme]: true
|
|
28
|
-
['uppercase']: this.uppercase,
|
|
29
|
-
[this.fontSize]: true,
|
|
23
|
+
[this.theme]: true
|
|
30
24
|
};
|
|
31
25
|
}
|
|
32
26
|
static get is() { return "ptc-filter-tag"; }
|
|
@@ -42,8 +36,8 @@ export class PtcFilterTag {
|
|
|
42
36
|
"type": "string",
|
|
43
37
|
"mutable": false,
|
|
44
38
|
"complexType": {
|
|
45
|
-
"original": "'bubble'",
|
|
46
|
-
"resolved": "\"bubble\"",
|
|
39
|
+
"original": "'bubble' | 'link' | 'link-lg' | 'button'",
|
|
40
|
+
"resolved": "\"bubble\" | \"button\" | \"link\" | \"link-lg\"",
|
|
47
41
|
"references": {}
|
|
48
42
|
},
|
|
49
43
|
"required": false,
|
|
@@ -55,42 +49,22 @@ export class PtcFilterTag {
|
|
|
55
49
|
"attribute": "theme",
|
|
56
50
|
"reflect": false,
|
|
57
51
|
"defaultValue": "'bubble'"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
"required": false,
|
|
68
|
-
"optional": false,
|
|
52
|
+
}
|
|
53
|
+
}; }
|
|
54
|
+
static get events() { return [{
|
|
55
|
+
"method": "clicked",
|
|
56
|
+
"name": "clicked",
|
|
57
|
+
"bubbles": true,
|
|
58
|
+
"cancelable": true,
|
|
59
|
+
"composed": true,
|
|
69
60
|
"docs": {
|
|
70
61
|
"tags": [],
|
|
71
|
-
"text": "
|
|
62
|
+
"text": ""
|
|
72
63
|
},
|
|
73
|
-
"attribute": "uppercase",
|
|
74
|
-
"reflect": false,
|
|
75
|
-
"defaultValue": "false"
|
|
76
|
-
},
|
|
77
|
-
"fontSize": {
|
|
78
|
-
"type": "string",
|
|
79
|
-
"mutable": false,
|
|
80
64
|
"complexType": {
|
|
81
|
-
"original": "
|
|
82
|
-
"resolved": "
|
|
65
|
+
"original": "any",
|
|
66
|
+
"resolved": "any",
|
|
83
67
|
"references": {}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
"optional": false,
|
|
87
|
-
"docs": {
|
|
88
|
-
"tags": [],
|
|
89
|
-
"text": "Font Size"
|
|
90
|
-
},
|
|
91
|
-
"attribute": "font-size",
|
|
92
|
-
"reflect": false,
|
|
93
|
-
"defaultValue": "'medium'"
|
|
94
|
-
}
|
|
95
|
-
}; }
|
|
68
|
+
}
|
|
69
|
+
}]; }
|
|
96
70
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.content {
|
|
2
|
+
transition: max-height ease-out 250ms;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
max-height: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ptc-icon-minimize .header {
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
align-content: center;
|
|
12
|
+
}
|
|
13
|
+
.ptc-icon-minimize .header .title {
|
|
14
|
+
color: var(--color-gray-10);
|
|
15
|
+
font-family: "Raleway";
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: var(--ptc-font-weight-bold);
|
|
18
|
+
font-size: var(--ptc-font-size-x-small);
|
|
19
|
+
line-height: var(--ptc-line-height-normal);
|
|
20
|
+
}
|
|
21
|
+
.ptc-icon-minimize .header .icon {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
border: 1px solid var(--color-gray-10);
|
|
24
|
+
border-radius: 2px;
|
|
25
|
+
transition: background-color ease-out 250ms;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
height: 1.25rem;
|
|
29
|
+
width: 1.25rem;
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
.ptc-icon-minimize .header .icon:hover {
|
|
33
|
+
background-color: var(--color-gray-02);
|
|
34
|
+
}
|
|
35
|
+
.ptc-icon-minimize .header .icon icon-asset {
|
|
36
|
+
position: relative;
|
|
37
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Component, h, Prop, Element } from '@stencil/core';
|
|
2
|
+
export class PtcIconMinimize {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.opened = true;
|
|
5
|
+
}
|
|
6
|
+
componentDidLoad() {
|
|
7
|
+
let content = this.host.shadowRoot.querySelector('.content');
|
|
8
|
+
if (this.opened && !content.style.maxHeight) {
|
|
9
|
+
content.style.maxHeight = content.scrollHeight + "px";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
dropdownToggle() {
|
|
13
|
+
this.opened = !this.opened;
|
|
14
|
+
}
|
|
15
|
+
getScrollHeight() {
|
|
16
|
+
let result = undefined;
|
|
17
|
+
let content = this.host.shadowRoot.querySelector('.content');
|
|
18
|
+
if (this.opened && content) {
|
|
19
|
+
result = { 'max-height': content.scrollHeight + "px" };
|
|
20
|
+
}
|
|
21
|
+
else if (this.opened) {
|
|
22
|
+
result = { 'max-height': 350 + "px" };
|
|
23
|
+
}
|
|
24
|
+
else if (content && content.style.maxHeight) {
|
|
25
|
+
content.style.removeProperty('max-height');
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
let scrollHeight = this.getScrollHeight();
|
|
31
|
+
let icon = this.opened ? 'minus' : 'plus';
|
|
32
|
+
return (h("div", { class: "ptc-icon-minimize" },
|
|
33
|
+
h("div", { class: "header" },
|
|
34
|
+
h("div", { class: "title" }, this.heading),
|
|
35
|
+
h("div", { class: "icon", onClick: () => this.dropdownToggle() },
|
|
36
|
+
h("icon-asset", { type: "solid", size: "xxx-small", name: icon }))),
|
|
37
|
+
h("div", { class: "content", style: scrollHeight },
|
|
38
|
+
h("slot", null))));
|
|
39
|
+
}
|
|
40
|
+
static get is() { return "ptc-icon-minimize"; }
|
|
41
|
+
static get encapsulation() { return "shadow"; }
|
|
42
|
+
static get originalStyleUrls() { return {
|
|
43
|
+
"$": ["ptc-icon-minimize.scss"]
|
|
44
|
+
}; }
|
|
45
|
+
static get styleUrls() { return {
|
|
46
|
+
"$": ["ptc-icon-minimize.css"]
|
|
47
|
+
}; }
|
|
48
|
+
static get properties() { return {
|
|
49
|
+
"heading": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": true,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string",
|
|
54
|
+
"resolved": "string",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"attribute": "heading",
|
|
64
|
+
"reflect": false
|
|
65
|
+
},
|
|
66
|
+
"opened": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": true,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"attribute": "opened",
|
|
81
|
+
"reflect": false,
|
|
82
|
+
"defaultValue": "true"
|
|
83
|
+
}
|
|
84
|
+
}; }
|
|
85
|
+
static get elementRef() { return "host"; }
|
|
86
|
+
}
|
|
@@ -32,6 +32,24 @@
|
|
|
32
32
|
opacity: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
.product-link {
|
|
36
|
+
font-weight: var(--ptc-font-weight-extrabold);
|
|
37
|
+
margin-top: var(--ptc-element-spacing-04);
|
|
38
|
+
}
|
|
39
|
+
.product-link::after {
|
|
40
|
+
content: "";
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 100%;
|
|
43
|
+
left: 0px;
|
|
44
|
+
bottom: 2px;
|
|
45
|
+
transition: opacity var(--ptc-transition-fast) var(--ptc-ease-inout);
|
|
46
|
+
border-bottom: 2px solid var(--color-green-07);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
.product-link:hover.product-link::after {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
35
53
|
.arrow {
|
|
36
54
|
margin-right: var(--ptc-element-spacing-01);
|
|
37
55
|
}
|
|
@@ -144,8 +144,8 @@ export class PtcLink {
|
|
|
144
144
|
"type": "string",
|
|
145
145
|
"mutable": false,
|
|
146
146
|
"complexType": {
|
|
147
|
-
"original": "'simple' | 'underline' | 'arrow' | 'nav-title'| 'primary-nav-link' | 'nav-title-link' | 'secondary-nav-link' | 'footer-nav-link' | 'copyright-link' | 'arrow-plm'",
|
|
148
|
-
"resolved": "\"arrow\" | \"arrow-plm\" | \"copyright-link\" | \"footer-nav-link\" | \"nav-title\" | \"nav-title-link\" | \"primary-nav-link\" | \"secondary-nav-link\" | \"simple\" | \"underline\"",
|
|
147
|
+
"original": "'simple' | 'underline' | 'arrow' | 'nav-title'| 'primary-nav-link' | 'nav-title-link' | 'secondary-nav-link' | 'footer-nav-link' | 'copyright-link' | 'arrow-plm' | 'product-link'",
|
|
148
|
+
"resolved": "\"arrow\" | \"arrow-plm\" | \"copyright-link\" | \"footer-nav-link\" | \"nav-title\" | \"nav-title-link\" | \"primary-nav-link\" | \"product-link\" | \"secondary-nav-link\" | \"simple\" | \"underline\"",
|
|
149
149
|
"references": {}
|
|
150
150
|
},
|
|
151
151
|
"required": false,
|
|
@@ -61,6 +61,40 @@
|
|
|
61
61
|
margin-right: var(--ptc-element-spacing-03);
|
|
62
62
|
margin-top: var(--ptc-element-spacing-03);
|
|
63
63
|
}
|
|
64
|
+
.wrapper .modal-popup.shadow-scroller {
|
|
65
|
+
max-height: 756px;
|
|
66
|
+
}
|
|
67
|
+
.wrapper .modal-popup.shadow-scroller .modal-header {
|
|
68
|
+
transition: box-shadow ease-in-out 250ms;
|
|
69
|
+
position: relative;
|
|
70
|
+
min-height: 57px;
|
|
71
|
+
border-bottom: 1px solid var(--color-gray-02);
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.wrapper .modal-popup.shadow-scroller .modal-header .close {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: var(--spacing-md);
|
|
77
|
+
right: var(--spacing-md);
|
|
78
|
+
margin: 0;
|
|
79
|
+
}
|
|
80
|
+
.wrapper .modal-popup.shadow-scroller .modal-body {
|
|
81
|
+
min-height: 200px;
|
|
82
|
+
overflow-x: hidden;
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
}
|
|
85
|
+
.wrapper .modal-popup.shadow-scroller .modal-footer {
|
|
86
|
+
transition: box-shadow ease-in-out 250ms;
|
|
87
|
+
width: 100%;
|
|
88
|
+
min-height: 72px;
|
|
89
|
+
border-top: 1px solid var(--color-gray-02);
|
|
90
|
+
padding-top: 1rem;
|
|
91
|
+
}
|
|
92
|
+
.wrapper .modal-popup.shadow-scroller.scroll-top .modal-header {
|
|
93
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
|
|
94
|
+
}
|
|
95
|
+
.wrapper .modal-popup.shadow-scroller.scroll-bottom .modal-footer {
|
|
96
|
+
box-shadow: 0px -8px 12px rgba(0, 0, 0, 0.12);
|
|
97
|
+
}
|
|
64
98
|
.wrapper.show {
|
|
65
99
|
display: flex;
|
|
66
100
|
align-items: flex-start;
|
|
@@ -68,6 +102,9 @@
|
|
|
68
102
|
.wrapper.show .modal-popup {
|
|
69
103
|
transform: translateY(0);
|
|
70
104
|
}
|
|
105
|
+
.wrapper.show .modal-popup.rounded {
|
|
106
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
107
|
+
}
|
|
71
108
|
|
|
72
109
|
.overlay {
|
|
73
110
|
width: 100vw;
|