@ptcwebops/ptcw-design 5.9.0 → 5.9.1
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/blog-detail-content_21.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-card_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-collapse-list.cjs.entry.js +7 -6
- package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +128 -3
- package/dist/cjs/ptc-filter-tag_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +76 -185
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ptc-tab-list.cjs.entry.js +110 -2
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/tab-content.cjs.entry.js +12 -2
- package/dist/cjs/tab-header.cjs.entry.js +7 -1
- package/dist/collection/components/icon-asset/icon-asset.css +2 -2
- package/dist/collection/components/organism-bundles/blog-detail-content/blog-detail-content.css +1 -1
- package/dist/collection/components/organism-bundles/blog-detail-layout/blog-detail-layout.css +1 -1
- package/dist/collection/components/ptc-card/ptc-card.css +1 -1
- package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +7 -6
- package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.css +8 -0
- package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.js +138 -2
- package/dist/collection/components/ptc-form-checkbox/ptc-form-checkbox.css +7 -7
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +9 -7
- package/dist/collection/components/ptc-pagenation/ptc-pagenation.css +1 -1
- package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +2 -2
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +5 -1
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +148 -2
- package/dist/collection/components/ptc-textfield/ptc-textfield.css +34 -51
- package/dist/collection/components/tab-content/tab-content.css +0 -7
- package/dist/collection/components/tab-content/tab-content.js +11 -1
- package/dist/collection/components/tab-header/tab-header.css +12 -0
- package/dist/collection/components/tab-header/tab-header.js +6 -0
- package/dist/custom-elements/index.js +349 -208
- package/dist/esm/blog-detail-content_21.entry.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-card_2.entry.js +1 -1
- package/dist/esm/ptc-collapse-list.entry.js +7 -6
- package/dist/esm/ptc-ellipsis-dropdown.entry.js +128 -3
- package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
- package/dist/esm/ptc-form-checkbox_2.entry.js +76 -185
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptc-tab-list.entry.js +110 -2
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/tab-content.entry.js +13 -3
- package/dist/esm/tab-header.entry.js +8 -2
- package/dist/ptcw-design/p-1ed632b2.entry.js +1 -0
- package/dist/ptcw-design/{p-00980d4d.entry.js → p-20c01caa.entry.js} +1 -1
- package/dist/ptcw-design/p-2c2f895a.entry.js +1 -0
- package/dist/ptcw-design/p-3784738e.entry.js +68 -0
- package/dist/ptcw-design/p-38a56ed6.entry.js +1 -0
- package/dist/ptcw-design/p-5441b0b9.entry.js +1 -0
- package/dist/ptcw-design/{p-fc51fc29.entry.js → p-657ecf13.entry.js} +1 -1
- package/dist/ptcw-design/p-8038bf31.entry.js +1 -0
- package/dist/ptcw-design/p-849655f7.entry.js +1 -0
- package/dist/ptcw-design/p-f618e1d4.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.d.ts +12 -0
- package/dist/types/components/ptc-tab-list/ptc-tab-list.d.ts +12 -0
- package/dist/types/components/tab-content/tab-content.d.ts +4 -0
- package/dist/types/components/tab-header/tab-header.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/utils/interfaces.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-01223c98.entry.js +0 -1
- package/dist/ptcw-design/p-21a3fd97.entry.js +0 -1
- package/dist/ptcw-design/p-3dae22b8.entry.js +0 -1
- package/dist/ptcw-design/p-47c97f32.entry.js +0 -1
- package/dist/ptcw-design/p-754fe9f4.entry.js +0 -1
- package/dist/ptcw-design/p-904abfc9.entry.js +0 -1
- package/dist/ptcw-design/p-c642d666.entry.js +0 -1
- package/dist/ptcw-design/p-cfd07b95.entry.js +0 -68
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c83db688.js';
|
|
2
2
|
|
|
3
|
-
const ptcEllipsisDropdownCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.ellipsis-icon{box-sizing:border-box;border:1px solid var(--color-gray-08);border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;display:flex;align-items:center;justify-content:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}.ellipsis-icon icon-asset{display:inline-block}.ellipsis-icon icon-asset svg{margin:0 auto;display:block;width:10px !important;height:10px !important}.ellipsis-icon.active{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ellipsis-icon.active::after{content:\"\";width:32px;height:2px;display:inline-block;background-color:var(--color-green-07);position:absolute;bottom:-11px}@media only screen and (min-width: 1440px){.ellipsis-icon.active::after{bottom:-17px}}.ptc-ellipsis-dropdown{position:relative;display:inline-block;cursor:pointer;padding:2px 0 14px 0;border-bottom:2px solid var(--color-green-07);margin:0 1rem -1px 1rem;box-sizing:border-box}@media only screen and (min-width: 768px){.ptc-ellipsis-dropdown.default{padding:0px;border-bottom:none;margin:0;height:44px;width:44px;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}}.ptc-ellipsis-dropdown.tab-with-banner{padding:0px 0 16px 0;margin:0 1rem -2.5px 1rem}@media only screen and (min-width: 992px){.ptc-ellipsis-dropdown.tab-with-banner{padding:0px 0px 1rem 0px;border-bottom:none;margin:0;height:100%;width:44px;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}}.ptc-ellipsis-dropdown.tab-with-banner .ellipsis-icon.active::after{bottom:-2px}.ptc-ellipsis-dropdown.tab-with-banner .dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:1010;background:var(--color-white);padding:0.8rem 0;right:auto;left:0;min-width:max-content;width:100%}@media only screen and (min-width: 992px){.ptc-ellipsis-dropdown.tab-with-banner .dropdown-container{right:0;left:auto;top:50%;margin-top:22px}}.ptc-ellipsis-dropdown.tab-with-banner.show .dropdown-container{display:inline-block}@media only screen and (min-width: 1440px){.ptc-ellipsis-dropdown{height:34px;width:34px}}.ptc-ellipsis-dropdown .mob-drop{color:var(--color-gray-10);font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-p);font-family:\"Raleway\";font-style:normal;display:flex;align-items:center}.ptc-ellipsis-dropdown .mob-drop svg{display:inline-block;vertical-align:middle;margin:4px 0px 0px 12px;min-width:12px}.dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:1010;background:var(--color-white);padding:0.8rem 0;right:auto;left:0;min-width:max-content;width:100%}@media only screen and (min-width: 768px){.dropdown-container{right:0;left:auto;margin-top:48px}}@media only screen and (min-width: 1440px){.dropdown-container{margin-top:45px}}.dropdown-container .selected-drop .dropdown-item span{position:relative;font-weight:var(--ptc-font-weight-bold)}.dropdown-container .selected-drop .dropdown-item span::before{content:\"\";width:2px;height:60%;background:var(--color-green-07);display:block;left:16px;position:absolute;top:20%}.show .dropdown-container{display:inline-block}";
|
|
3
|
+
const ptcEllipsisDropdownCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.ellipsis-icon{box-sizing:border-box;border:1px solid var(--color-gray-08);border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;display:flex;align-items:center;justify-content:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}.ellipsis-icon icon-asset{display:inline-block}.ellipsis-icon icon-asset svg{margin:0 auto;display:block;width:10px !important;height:10px !important}.ellipsis-icon.active{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ellipsis-icon.active::after{content:\"\";width:32px;height:2px;display:inline-block;background-color:var(--color-green-07);position:absolute;bottom:-11px}@media only screen and (min-width: 1440px){.ellipsis-icon.active::after{bottom:-17px}}.ptc-ellipsis-dropdown{position:relative;display:inline-block;cursor:pointer;padding:2px 0 14px 0;border-bottom:2px solid var(--color-green-07);margin:0 1rem -1px 1rem;box-sizing:border-box}@media only screen and (min-width: 768px){.ptc-ellipsis-dropdown.default{padding:0px;border-bottom:none;margin:0;height:44px;width:44px;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}}.ptc-ellipsis-dropdown.tab-with-banner{padding:0px 0 16px 0;margin:0 1rem -2.5px 1rem}@media only screen and (min-width: 992px){.ptc-ellipsis-dropdown.tab-with-banner{padding:0px 0px 1rem 0px;border-bottom:none;margin:0;height:100%;width:44px;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}}.ptc-ellipsis-dropdown.tab-with-banner .ellipsis-icon.active::after{bottom:-2px}.ptc-ellipsis-dropdown.tab-with-banner .dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:1010;background:var(--color-white);padding:0.8rem 0;right:auto;left:0;min-width:max-content;width:100%}@media only screen and (min-width: 992px){.ptc-ellipsis-dropdown.tab-with-banner .dropdown-container{right:0;left:auto;top:50%;margin-top:22px}}.ptc-ellipsis-dropdown.tab-with-banner.show .dropdown-container{display:inline-block}@media only screen and (min-width: 1440px){.ptc-ellipsis-dropdown{height:34px;width:34px}}.ptc-ellipsis-dropdown .mob-drop{color:var(--color-gray-10);font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-p);font-family:\"Raleway\";font-style:normal;display:flex;align-items:center}.ptc-ellipsis-dropdown .mob-drop svg{display:inline-block;vertical-align:middle;margin:4px 0px 0px 12px;min-width:12px}.dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:1010;background:var(--color-white);padding:0.8rem 0;right:auto;left:0;min-width:max-content;width:100%}@media only screen and (min-width: 768px){.dropdown-container{right:0;left:auto;margin-top:48px}}@media only screen and (min-width: 1440px){.dropdown-container{margin-top:45px}}.dropdown-container .selected-drop .dropdown-item span{position:relative;font-weight:var(--ptc-font-weight-bold)}.dropdown-container .selected-drop .dropdown-item span::before{content:\"\";width:2px;height:60%;background:var(--color-green-07);display:block;left:16px;position:absolute;top:20%}.show .dropdown-container{display:inline-block}dropdown-item:focus-visible{outline:none}dropdown-item:focus-visible .dropdown-item{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}";
|
|
4
4
|
|
|
5
5
|
const PtcEllipsisDropdown = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
9
|
+
this.menuitemNodes = [];
|
|
10
|
+
this.firstMenuitem = false;
|
|
11
|
+
this.lastMenuitem = false;
|
|
9
12
|
this.dataItems = [];
|
|
10
13
|
this.selectedTab = undefined;
|
|
11
14
|
this.isDropdownOpen = false;
|
|
@@ -13,6 +16,7 @@ const PtcEllipsisDropdown = class {
|
|
|
13
16
|
this.isIPad = undefined;
|
|
14
17
|
this.dropdownType = "default";
|
|
15
18
|
}
|
|
19
|
+
//firstChars = [];
|
|
16
20
|
dropdownToggle(e) {
|
|
17
21
|
e.currentTarget.classList.toggle("show");
|
|
18
22
|
this.isDropdownOpen = e.currentTarget.classList.contains("show");
|
|
@@ -31,20 +35,141 @@ const PtcEllipsisDropdown = class {
|
|
|
31
35
|
this.isMobile = window.innerWidth < 768;
|
|
32
36
|
this.isIPad = window.innerWidth < 992 || screen.width < 992;
|
|
33
37
|
}
|
|
38
|
+
onEscClicked() {
|
|
39
|
+
var _a;
|
|
40
|
+
let container = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.ptc-ellipsis-dropdown');
|
|
41
|
+
//this.host.focus();
|
|
42
|
+
if (container) {
|
|
43
|
+
container.classList.remove('show');
|
|
44
|
+
this.isDropdownOpen = false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
34
47
|
componentWillLoad() {
|
|
35
48
|
this.isMobile = window.innerWidth < 768;
|
|
36
49
|
this.isIPad = window.innerWidth < 992 || screen.width < 992;
|
|
37
50
|
}
|
|
51
|
+
onMenuitemKeydown(event) {
|
|
52
|
+
var tgt = event.currentTarget, key = event.key, flag = false;
|
|
53
|
+
if (event.ctrlKey || event.altKey || event.metaKey) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (event.shiftKey) ;
|
|
57
|
+
else {
|
|
58
|
+
switch (key) {
|
|
59
|
+
case 'Up':
|
|
60
|
+
case 'ArrowUp':
|
|
61
|
+
this.setFocusToPreviousMenuitem(tgt);
|
|
62
|
+
flag = true;
|
|
63
|
+
break;
|
|
64
|
+
case 'ArrowDown':
|
|
65
|
+
case 'Down':
|
|
66
|
+
this.setFocusToNextMenuitem(tgt);
|
|
67
|
+
flag = true;
|
|
68
|
+
break;
|
|
69
|
+
case 'Home':
|
|
70
|
+
case 'PageUp':
|
|
71
|
+
this.setFocusToFirstMenuitem();
|
|
72
|
+
flag = true;
|
|
73
|
+
break;
|
|
74
|
+
case 'End':
|
|
75
|
+
case 'PageDown':
|
|
76
|
+
this.setFocusToLastMenuitem();
|
|
77
|
+
flag = true;
|
|
78
|
+
break;
|
|
79
|
+
case 'Tab':
|
|
80
|
+
this.onEscClicked();
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (flag) {
|
|
85
|
+
event.stopPropagation();
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
setFocusToMenuitem(newMenuitem) {
|
|
90
|
+
this.menuitemNodes.forEach(function (item) {
|
|
91
|
+
if (item === newMenuitem) {
|
|
92
|
+
item.tabIndex = 0;
|
|
93
|
+
newMenuitem.focus();
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
item.tabIndex = -1;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
setFocusToFirstMenuitem() {
|
|
101
|
+
this.setFocusToMenuitem(this.firstMenuitem);
|
|
102
|
+
}
|
|
103
|
+
setFocusToLastMenuitem() {
|
|
104
|
+
this.setFocusToMenuitem(this.lastMenuitem);
|
|
105
|
+
}
|
|
106
|
+
setFocusToPreviousMenuitem(currentMenuitem) {
|
|
107
|
+
var newMenuitem, index;
|
|
108
|
+
if (currentMenuitem === this.firstMenuitem) {
|
|
109
|
+
newMenuitem = this.lastMenuitem;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
index = this.menuitemNodes.indexOf(currentMenuitem);
|
|
113
|
+
newMenuitem = this.menuitemNodes[index - 1];
|
|
114
|
+
}
|
|
115
|
+
this.setFocusToMenuitem(newMenuitem);
|
|
116
|
+
return newMenuitem;
|
|
117
|
+
}
|
|
118
|
+
setFocusToNextMenuitem(currentMenuitem) {
|
|
119
|
+
var newMenuitem, index;
|
|
120
|
+
if (currentMenuitem === this.lastMenuitem) {
|
|
121
|
+
newMenuitem = this.firstMenuitem;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
index = this.menuitemNodes.indexOf(currentMenuitem);
|
|
125
|
+
newMenuitem = this.menuitemNodes[index + 1];
|
|
126
|
+
}
|
|
127
|
+
this.setFocusToMenuitem(newMenuitem);
|
|
128
|
+
return newMenuitem;
|
|
129
|
+
}
|
|
130
|
+
componentDidLoad() {
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
this.menuitems = this.host.shadowRoot.querySelectorAll('dropdown-item');
|
|
133
|
+
for (var i = 0; i < this.menuitems.length; i++) {
|
|
134
|
+
var menuitem = this.menuitems[i];
|
|
135
|
+
this.menuitemNodes.push(menuitem);
|
|
136
|
+
menuitem.tabIndex = -1;
|
|
137
|
+
menuitem.addEventListener('keydown', this.onMenuitemKeydown.bind(this));
|
|
138
|
+
if (!this.firstMenuitem) {
|
|
139
|
+
this.firstMenuitem = menuitem;
|
|
140
|
+
}
|
|
141
|
+
this.lastMenuitem = menuitem;
|
|
142
|
+
}
|
|
143
|
+
}, 100);
|
|
144
|
+
const ellp = this.host.shadowRoot.querySelector('.ptc-ellipsis-dropdown');
|
|
145
|
+
this.host.addEventListener('keydown', (event) => {
|
|
146
|
+
// Open dropdown on 'Enter' key press
|
|
147
|
+
if (event.key === 'Enter') {
|
|
148
|
+
ellp.click();
|
|
149
|
+
}
|
|
150
|
+
if (event.key === 'ArrowDown') {
|
|
151
|
+
this.host.shadowRoot.querySelectorAll('dropdown-item')[0].focus();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
if (this.isMobile || (this.isIPad && this.dropdownType === 'tab-with-banner')) {
|
|
155
|
+
this.host.setAttribute('tabindex', '0');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
38
158
|
render() {
|
|
39
159
|
let activeTab = this.dataItems.find(z => z.isSelected == true);
|
|
40
160
|
let isActive = false;
|
|
41
161
|
if (activeTab) {
|
|
42
162
|
isActive = true;
|
|
43
163
|
}
|
|
44
|
-
return (h("div", { class: this.dropdownType == 'tab-with-banner' ? "ptc-ellipsis-dropdown tab-with-banner" : "ptc-ellipsis-dropdown default", onClick: (e) => this.dropdownToggle(e) }, (this.isMobile || (this.isIPad && this.dropdownType === 'tab-with-banner')) ? (h("div", { class: 'mob-drop' }, h("span", { class: 'opt-name' }, this.dataItems.map((item) => item.isSelected ? item.text : '')), h("svg", { width: "12", height: "9", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1 1.65723L5.94975 6.60697L10.8995 1.65723", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))) : (h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' }))), h("div", { class: "dropdown-container" }, h("slot", { name: "dropdown" }), this.dataItems.map(dataItem => {
|
|
164
|
+
return (h("div", { class: this.dropdownType == 'tab-with-banner' ? "ptc-ellipsis-dropdown tab-with-banner" : "ptc-ellipsis-dropdown default", onClick: (e) => this.dropdownToggle(e) }, (this.isMobile || (this.isIPad && this.dropdownType === 'tab-with-banner')) ? (h("div", { class: 'mob-drop' }, h("span", { class: 'opt-name' }, this.dataItems.map((item) => item.isSelected ? item.text : '')), h("svg", { width: "12", height: "9", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1 1.65723L5.94975 6.60697L10.8995 1.65723", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))) : (h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' }))), h("div", { class: "dropdown-container", role: "menu", "aria-labelledby": "menubutton1" }, h("slot", { name: "dropdown" }), this.dataItems.map((dataItem) => {
|
|
45
165
|
let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
|
|
46
166
|
let activeDropdown = dataItem.isSelected ? 'selected-drop' : '';
|
|
47
|
-
return (h("dropdown-item", { class: activeClass + activeDropdown + 'mf-listen'
|
|
167
|
+
return (h("dropdown-item", { role: "menuitem", class: activeClass + activeDropdown + 'mf-listen', onKeyDown: (e) => {
|
|
168
|
+
if (e.key === 'Enter') {
|
|
169
|
+
e.preventDefault();
|
|
170
|
+
this.onItemSelected(dataItem);
|
|
171
|
+
}
|
|
172
|
+
} }, h("span", { onClick: (e) => {
|
|
48
173
|
e.preventDefault();
|
|
49
174
|
this.onItemSelected(dataItem);
|
|
50
175
|
} }, dataItem.text)));
|
|
@@ -62,7 +62,7 @@ const PtcFilterTag = class {
|
|
|
62
62
|
};
|
|
63
63
|
PtcFilterTag.style = ptcFilterTagCss;
|
|
64
64
|
|
|
65
|
-
const ptcPagenationCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.events-filter{padding:20px 32px 20px 0;text-align:center}@media (min-width: 992px){.events-filter{padding:10px 40px 10px 0px}}.events-filter .pagenation-arrow{width:40px;height:40px;margin:0 15px;vertical-align:middle}.standard-filter{font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-semibold);text-align:center}.standard-filter .standard-filter-item{height:2.5rem;width:2.5rem;display:inline-flex;align-items:center;justify-content:center;margin-right:0.5rem;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium);background-color:transparent;border-radius:var(--ptc-border-radius-standard);color:var(--color-gray-10);text-decoration:none}.standard-filter .standard-filter-item:hover{background-color:var(--color-gray-02);text-decoration:none}.standard-filter .standard-filter-item:focus{text-decoration:none;outline:3px solid var(--color-blue-07);outline-offset:2px}.standard-filter .standard-filter-item:active{background-color:var(--color-gray-05);text-decoration:none;transition:none}.standard-filter .standard-filter-item.active{transition:none;background-color:var(--color-gray-12);color:var(--color-white)}.standard-filter .standard-filter-item.active:hover{transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium);background-color:var(--color-gray-12);cursor:default}.standard-filter .standard-filter-item[data-url=last]{margin-right:1.25rem}.standard-filter .next-button,.standard-filter .previous-button{font-size:var(--ptc-font-size-x-small);font-weight:normal;display:inline-flex;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border:1px solid var(--color-gray-10);border-radius:calc(var(--ptc-border-radius-standard)
|
|
65
|
+
const ptcPagenationCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.events-filter{padding:20px 32px 20px 0;text-align:center}@media (min-width: 992px){.events-filter{padding:10px 40px 10px 0px}}.events-filter .pagenation-arrow{width:40px;height:40px;margin:0 15px;vertical-align:middle}.standard-filter{font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-semibold);text-align:center}.standard-filter .standard-filter-item{height:2.5rem;width:2.5rem;display:inline-flex;align-items:center;justify-content:center;margin-right:0.5rem;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium);background-color:transparent;border-radius:var(--ptc-border-radius-standard);color:var(--color-gray-10);text-decoration:none}.standard-filter .standard-filter-item:hover{background-color:var(--color-gray-02);text-decoration:none}.standard-filter .standard-filter-item:focus{text-decoration:none;outline:3px solid var(--color-blue-07);outline-offset:2px}.standard-filter .standard-filter-item:active{background-color:var(--color-gray-05);text-decoration:none;transition:none}.standard-filter .standard-filter-item.active{transition:none;background-color:var(--color-gray-12);color:var(--color-white)}.standard-filter .standard-filter-item.active:hover{transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium);background-color:var(--color-gray-12);cursor:default}.standard-filter .standard-filter-item[data-url=last]{margin-right:1.25rem}.standard-filter .next-button,.standard-filter .previous-button{font-size:var(--ptc-font-size-x-small);font-weight:normal;display:inline-flex;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border:1px solid var(--color-gray-10);border-radius:calc(var(--ptc-border-radius-standard)/2);transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), fill var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.standard-filter .next-button:hover,.standard-filter .previous-button:hover{background-color:var(--color-gray-02);text-decoration:none}.standard-filter .next-button:active,.standard-filter .previous-button:active{transition:none;background-color:var(--color-gray-05);text-decoration:none}.standard-filter .next-button:focus,.standard-filter .previous-button:focus{text-decoration:none;outline:3px solid var(--color-blue-07);outline-offset:2px}.standard-filter .next-button.disabled,.standard-filter .previous-button.disabled{cursor:default;border-color:var(--color-gray-04);color:var(--color-gray-04);fill:var(--color-gray-04)}.standard-filter .next-button.disabled:hover,.standard-filter .next-button.disabled:active,.standard-filter .previous-button.disabled:hover,.standard-filter .previous-button.disabled:active{background-color:transparent}.standard-filter .previous-button{margin-right:1.25rem}.standard-filter .previous-button icon-asset{transform:rotate(90deg);position:relative;right:2px}.standard-filter .next-button icon-asset{transform:rotate(-90deg);position:relative;left:1px}.standard-filter .standard-filter-dots{margin:0.125rem 0.5rem 0.125rem 0.125rem}@media (768px){.standard-filter .standard-filter-dots{margin:0.125rem 0.5rem 0.125rem 0.125rem}}.show-page{display:inline}.hide-page{display:none}.prev-text{display:none}.last-text{display:none}@media (min-width: 992px){.prev-text{display:inline}.last-text{display:inline}}.events-filter-item{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold);font-stretch:normal;font-style:var(--ptc-font-style-normal);line-height:var(--ptc-line-height-denser);letter-spacing:var(--ptc-letter-spacing-normal);text-align:left;padding:6px;color:var(--color-gray-10);text-decoration:none}.events-filter .active{font-family:var(--ptc-font-latin);border-bottom:2px solid var(--color-green-13);font-weight:var(--ptc-font-weight-semibold)}.events-filter-item:hover,.events-filter-item:focus{text-decoration:none;outline:0;color:var(--color-green-14)}span.events-filter-item:hover,span.events-filter-item:focus{text-decoration:none;outline:0;color:var(--color-gray-10)}span.events-filter-item.disabled{color:var(--color-white-01)}.events-filter .disabled{color:var(--color-white-01)}.events-filter-dots{padding:0rem;font-weight:var(--ptc-font-weight-extrabold);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-stretch:normal;font-style:var(--ptc-font-style-normal);line-height:var(--ptc-line-height-denser);letter-spacing:var(--ptc-letter-spacing-normal);text-align:left;color:var(--color-gray-10);text-decoration:none}.events-disable-arrows{opacity:0.35}.events-enable-arrows{opacity:1}.events-small-dots{height:60px;margin-top:-25px}@media (min-width: 992px){.events-small-dots{height:80px;margin-top:-40px}}.last-page{transform:rotate(180deg)}";
|
|
66
66
|
|
|
67
67
|
const PtcPagenation = class {
|
|
68
68
|
constructor(hostRef) {
|