@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.
Files changed (71) hide show
  1. package/dist/cjs/blog-detail-content_21.cjs.entry.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ptc-card_2.cjs.entry.js +1 -1
  4. package/dist/cjs/ptc-collapse-list.cjs.entry.js +7 -6
  5. package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +128 -3
  6. package/dist/cjs/ptc-filter-tag_2.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +76 -185
  8. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-tab-list.cjs.entry.js +110 -2
  10. package/dist/cjs/ptcw-design.cjs.js +1 -1
  11. package/dist/cjs/tab-content.cjs.entry.js +12 -2
  12. package/dist/cjs/tab-header.cjs.entry.js +7 -1
  13. package/dist/collection/components/icon-asset/icon-asset.css +2 -2
  14. package/dist/collection/components/organism-bundles/blog-detail-content/blog-detail-content.css +1 -1
  15. package/dist/collection/components/organism-bundles/blog-detail-layout/blog-detail-layout.css +1 -1
  16. package/dist/collection/components/ptc-card/ptc-card.css +1 -1
  17. package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +7 -6
  18. package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.css +8 -0
  19. package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.js +138 -2
  20. package/dist/collection/components/ptc-form-checkbox/ptc-form-checkbox.css +7 -7
  21. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +9 -7
  22. package/dist/collection/components/ptc-pagenation/ptc-pagenation.css +1 -1
  23. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +2 -2
  24. package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +5 -1
  25. package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +148 -2
  26. package/dist/collection/components/ptc-textfield/ptc-textfield.css +34 -51
  27. package/dist/collection/components/tab-content/tab-content.css +0 -7
  28. package/dist/collection/components/tab-content/tab-content.js +11 -1
  29. package/dist/collection/components/tab-header/tab-header.css +12 -0
  30. package/dist/collection/components/tab-header/tab-header.js +6 -0
  31. package/dist/custom-elements/index.js +349 -208
  32. package/dist/esm/blog-detail-content_21.entry.js +4 -4
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/ptc-card_2.entry.js +1 -1
  35. package/dist/esm/ptc-collapse-list.entry.js +7 -6
  36. package/dist/esm/ptc-ellipsis-dropdown.entry.js +128 -3
  37. package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
  38. package/dist/esm/ptc-form-checkbox_2.entry.js +76 -185
  39. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  40. package/dist/esm/ptc-tab-list.entry.js +110 -2
  41. package/dist/esm/ptcw-design.js +1 -1
  42. package/dist/esm/tab-content.entry.js +13 -3
  43. package/dist/esm/tab-header.entry.js +8 -2
  44. package/dist/ptcw-design/p-1ed632b2.entry.js +1 -0
  45. package/dist/ptcw-design/{p-00980d4d.entry.js → p-20c01caa.entry.js} +1 -1
  46. package/dist/ptcw-design/p-2c2f895a.entry.js +1 -0
  47. package/dist/ptcw-design/p-3784738e.entry.js +68 -0
  48. package/dist/ptcw-design/p-38a56ed6.entry.js +1 -0
  49. package/dist/ptcw-design/p-5441b0b9.entry.js +1 -0
  50. package/dist/ptcw-design/{p-fc51fc29.entry.js → p-657ecf13.entry.js} +1 -1
  51. package/dist/ptcw-design/p-8038bf31.entry.js +1 -0
  52. package/dist/ptcw-design/p-849655f7.entry.js +1 -0
  53. package/dist/ptcw-design/p-f618e1d4.entry.js +1 -0
  54. package/dist/ptcw-design/ptcw-design.css +1 -1
  55. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  56. package/dist/types/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.d.ts +12 -0
  57. package/dist/types/components/ptc-tab-list/ptc-tab-list.d.ts +12 -0
  58. package/dist/types/components/tab-content/tab-content.d.ts +4 -0
  59. package/dist/types/components/tab-header/tab-header.d.ts +1 -0
  60. package/dist/types/components.d.ts +2 -0
  61. package/dist/types/utils/interfaces.d.ts +2 -0
  62. package/package.json +1 -1
  63. package/readme.md +1 -1
  64. package/dist/ptcw-design/p-01223c98.entry.js +0 -1
  65. package/dist/ptcw-design/p-21a3fd97.entry.js +0 -1
  66. package/dist/ptcw-design/p-3dae22b8.entry.js +0 -1
  67. package/dist/ptcw-design/p-47c97f32.entry.js +0 -1
  68. package/dist/ptcw-design/p-754fe9f4.entry.js +0 -1
  69. package/dist/ptcw-design/p-904abfc9.entry.js +0 -1
  70. package/dist/ptcw-design/p-c642d666.entry.js +0 -1
  71. package/dist/ptcw-design/p-cfd07b95.entry.js +0 -68
@@ -1,6 +1,9 @@
1
1
  import { h } from '@stencil/core';
2
2
  export class PtcEllipsisDropdown {
3
3
  constructor() {
4
+ this.menuitemNodes = [];
5
+ this.firstMenuitem = false;
6
+ this.lastMenuitem = false;
4
7
  this.dataItems = [];
5
8
  this.selectedTab = undefined;
6
9
  this.isDropdownOpen = false;
@@ -8,6 +11,7 @@ export class PtcEllipsisDropdown {
8
11
  this.isIPad = undefined;
9
12
  this.dropdownType = "default";
10
13
  }
14
+ //firstChars = [];
11
15
  dropdownToggle(e) {
12
16
  e.currentTarget.classList.toggle("show");
13
17
  this.isDropdownOpen = e.currentTarget.classList.contains("show");
@@ -26,20 +30,146 @@ export class PtcEllipsisDropdown {
26
30
  this.isMobile = window.innerWidth < 768;
27
31
  this.isIPad = window.innerWidth < 992 || screen.width < 992;
28
32
  }
33
+ onEscClicked() {
34
+ var _a;
35
+ let container = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.ptc-ellipsis-dropdown');
36
+ //this.host.focus();
37
+ if (container) {
38
+ container.classList.remove('show');
39
+ this.isDropdownOpen = false;
40
+ }
41
+ }
29
42
  componentWillLoad() {
30
43
  this.isMobile = window.innerWidth < 768;
31
44
  this.isIPad = window.innerWidth < 992 || screen.width < 992;
32
45
  }
46
+ onMenuitemKeydown(event) {
47
+ var tgt = event.currentTarget, key = event.key, flag = false;
48
+ if (event.ctrlKey || event.altKey || event.metaKey) {
49
+ return;
50
+ }
51
+ if (event.shiftKey) {
52
+ if (event.key === 'Tab') {
53
+ }
54
+ }
55
+ else {
56
+ switch (key) {
57
+ case 'Up':
58
+ case 'ArrowUp':
59
+ this.setFocusToPreviousMenuitem(tgt);
60
+ flag = true;
61
+ break;
62
+ case 'ArrowDown':
63
+ case 'Down':
64
+ this.setFocusToNextMenuitem(tgt);
65
+ flag = true;
66
+ break;
67
+ case 'Home':
68
+ case 'PageUp':
69
+ this.setFocusToFirstMenuitem();
70
+ flag = true;
71
+ break;
72
+ case 'End':
73
+ case 'PageDown':
74
+ this.setFocusToLastMenuitem();
75
+ flag = true;
76
+ break;
77
+ case 'Tab':
78
+ this.onEscClicked();
79
+ break;
80
+ default:
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
+ }
33
158
  render() {
34
159
  let activeTab = this.dataItems.find(z => z.isSelected == true);
35
160
  let isActive = false;
36
161
  if (activeTab) {
37
162
  isActive = true;
38
163
  }
39
- 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) => {
40
165
  let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
41
166
  let activeDropdown = dataItem.isSelected ? 'selected-drop' : '';
42
- return (h("dropdown-item", { class: activeClass + activeDropdown + 'mf-listen' }, h("span", { onClick: (e) => {
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) => {
43
173
  e.preventDefault();
44
174
  this.onItemSelected(dataItem);
45
175
  } }, dataItem.text)));
@@ -155,6 +285,12 @@ export class PtcEllipsisDropdown {
155
285
  "target": "window",
156
286
  "capture": false,
157
287
  "passive": true
288
+ }, {
289
+ "name": "escClicked",
290
+ "method": "onEscClicked",
291
+ "target": "window",
292
+ "capture": false,
293
+ "passive": false
158
294
  }];
159
295
  }
160
296
  }
@@ -1133,29 +1133,29 @@ ptc-link, ptc-square-card,
1133
1133
 
1134
1134
  .mdc-checkbox {
1135
1135
  transform: translateX(-8px);
1136
- padding: 8px;
1136
+ padding: calc((34px - 18px) / 2);
1137
1137
  /* @alternate */
1138
1138
  padding: calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2);
1139
- margin: 0px;
1139
+ margin: calc((34px - 34px) / 2);
1140
1140
  /* @alternate */
1141
1141
  margin: calc((var(--mdc-checkbox-touch-target-size, 34px) - 34px) / 2);
1142
1142
  }
1143
1143
  .mdc-checkbox .mdc-checkbox__background {
1144
- top: 8px;
1144
+ top: calc((34px - 18px) / 2);
1145
1145
  /* @alternate */
1146
1146
  top: calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2);
1147
- left: 8px;
1147
+ left: calc((34px - 18px) / 2);
1148
1148
  /* @alternate */
1149
1149
  left: calc((var(--mdc-checkbox-ripple-size, 34px) - 18px) / 2);
1150
1150
  }
1151
1151
  .mdc-checkbox .mdc-checkbox__native-control {
1152
- top: 0px;
1152
+ top: calc((34px - 34px) / 2);
1153
1153
  /* @alternate */
1154
1154
  top: calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);
1155
- right: 0px;
1155
+ right: calc((34px - 34px) / 2);
1156
1156
  /* @alternate */
1157
1157
  right: calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);
1158
- left: 0px;
1158
+ left: calc((34px - 34px) / 2);
1159
1159
  /* @alternate */
1160
1160
  left: calc((34px - var(--mdc-checkbox-touch-target-size, 34px)) / 2);
1161
1161
  width: 34px;
@@ -1101,7 +1101,7 @@ ptc-link, ptc-square-card,
1101
1101
  }
1102
1102
  @media only screen and (min-width: 992px) {
1103
1103
  .u-3-col-grid .u-3-col {
1104
- width: calc(33.3333333333% - 10.66666666px);
1104
+ width: calc(33.333333333333% - 10.66666666px);
1105
1105
  }
1106
1106
  }
1107
1107
  .u-3-col-grid.u-col-space-lg {
@@ -1118,7 +1118,7 @@ ptc-link, ptc-square-card,
1118
1118
  }
1119
1119
  @media only screen and (min-width: 992px) {
1120
1120
  .u-3-col-grid.u-col-space-lg .u-3-col {
1121
- width: calc(33.3333333333% - 21.3333333px);
1121
+ width: calc(33.333333333333% - 21.3333333px);
1122
1122
  }
1123
1123
  }
1124
1124
 
@@ -1259,6 +1259,13 @@ a:focus-visible {
1259
1259
 
1260
1260
  .hp-adjustments {
1261
1261
  background-color: var(--color-black);
1262
+ height: auto;
1263
+ min-height: 640px !important;
1264
+ }
1265
+ @media (min-height: 640px) {
1266
+ .hp-adjustments {
1267
+ min-height: 72vh !important;
1268
+ }
1262
1269
  }
1263
1270
  .hp-adjustments .div1 {
1264
1271
  grid-area: 1/1/3/2;
@@ -1292,11 +1299,6 @@ a:focus-visible {
1292
1299
  opacity: 0;
1293
1300
  }
1294
1301
 
1295
- @media screen and (min-width: 992.01px) {
1296
- .hp-adjustments {
1297
- height: 90vh;
1298
- }
1299
- }
1300
1302
  .div1 {
1301
1303
  grid-area: 1/1/2/2;
1302
1304
  min-height: 300px;
@@ -128,7 +128,7 @@ ptc-link, ptc-square-card,
128
128
  width: 1.125rem;
129
129
  height: 1.125rem;
130
130
  border: 1px solid var(--color-gray-10);
131
- border-radius: calc(var(--ptc-border-radius-standard) / 2);
131
+ border-radius: calc(var(--ptc-border-radius-standard)/2);
132
132
  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);
133
133
  }
134
134
  .standard-filter .next-button:hover, .standard-filter .previous-button:hover {
@@ -1046,7 +1046,7 @@ ptc-link, ptc-square-card,
1046
1046
  }
1047
1047
  @media only screen and (min-width: 992px) {
1048
1048
  .u-3-col-grid .u-3-col {
1049
- width: calc(33.3333333333% - 10.66666666px);
1049
+ width: calc(33.333333333333% - 10.66666666px);
1050
1050
  }
1051
1051
  }
1052
1052
  .u-3-col-grid.u-col-space-lg {
@@ -1063,7 +1063,7 @@ ptc-link, ptc-square-card,
1063
1063
  }
1064
1064
  @media only screen and (min-width: 992px) {
1065
1065
  .u-3-col-grid.u-col-space-lg .u-3-col {
1066
- width: calc(33.3333333333% - 21.3333333px);
1066
+ width: calc(33.333333333333% - 21.3333333px);
1067
1067
  }
1068
1068
  }
1069
1069
 
@@ -193,7 +193,11 @@ ptc-tab-list.tab-with-banner .tabs-header-container {
193
193
  }
194
194
  }
195
195
  .ellipsis-btn.active {
196
- display: block;
196
+ display: inline-block;
197
+ }
198
+ .ellipsis-btn:focus-visible {
199
+ border-radius: var(--ptc-border-radius-standard);
200
+ outline: 5px solid var(--keyboard-nav-outline);
197
201
  }
198
202
 
199
203
  tab-header {
@@ -6,6 +6,10 @@ export class PtcTabList {
6
6
  this.isMobile = undefined;
7
7
  this.isMobileTabWithBanner = undefined;
8
8
  this.selectedValue = undefined;
9
+ this.dropdownItemsCount = 0;
10
+ }
11
+ closeDropdown() {
12
+ this.escClicked.emit();
9
13
  }
10
14
  componentWillLoad() {
11
15
  this.isMobile = window.innerWidth < 768;
@@ -16,6 +20,14 @@ export class PtcTabList {
16
20
  this.calculateHeaderTabsRendering();
17
21
  /*const [group] = this.tabGroup;
18
22
  this.selectGroup(group);*/
23
+ this.ellipsisDropdown = this.host.querySelector('ptc-ellipsis-dropdown');
24
+ this.ellipsisDropdown.addEventListener('keydown', this.onKeydown.bind(this));
25
+ const tabsHeaderEl = Array.from(this.host.querySelectorAll('tab-header'));
26
+ tabsHeaderEl.forEach((tab, i) => {
27
+ if ((tabsHeaderEl.length - this.dropdownItemsCount) == (i + 1)) {
28
+ this.lastVisibleTab = tab;
29
+ }
30
+ });
19
31
  }
20
32
  onSelectedTab(event) {
21
33
  let self = this;
@@ -23,6 +35,14 @@ export class PtcTabList {
23
35
  event.detail.then(res => {
24
36
  if (group.header.name === res.name) {
25
37
  self.selectGroup(group);
38
+ // Set the selected tab's tabindex to 0
39
+ group.header.el.setAttribute('tabindex', '0');
40
+ // Focus the selected tab
41
+ group.header.el.focus();
42
+ }
43
+ else {
44
+ // Set other tabs' tabindex to -1
45
+ group.header.el.setAttribute('tabindex', '-1');
26
46
  }
27
47
  });
28
48
  });
@@ -70,6 +90,7 @@ export class PtcTabList {
70
90
  if (activateDropDown) {
71
91
  dropdown.classList.add('active');
72
92
  dropdown.dataItems = hiddenTabs.reverse();
93
+ this.dropdownItemsCount = dropdown.dataItems.length;
73
94
  }
74
95
  else {
75
96
  dropdown.classList.remove('active');
@@ -90,7 +111,7 @@ export class PtcTabList {
90
111
  if (headerCount === tabsHeaderEl.length) {
91
112
  headerComplete = true;
92
113
  }
93
- headerData.push(res);
114
+ headerData.push(Object.assign(Object.assign({}, res), { el }));
94
115
  }));
95
116
  this.tabsHeader = headerData;
96
117
  const tabsContentEl = Array.from(this.host.querySelectorAll('tab-content'));
@@ -116,6 +137,92 @@ export class PtcTabList {
116
137
  self.selectGroup(group);
117
138
  }
118
139
  }, 3100); // Increased time interval from 100 to 3100 to fix the preload skeleton issue
140
+ tabsHeaderEl.forEach((header, index) => {
141
+ // console.log(header);
142
+ header.setAttribute('id', 'tab-' + (index + 1));
143
+ header.setAttribute('role', 'tab');
144
+ header.setAttribute('aria-selected', index === 0 ? 'true' : 'false');
145
+ header.setAttribute('tabindex', index === 0 ? '0' : '-1'); // Set tabindex based on index
146
+ header.setAttribute('aria-controls', 'tab-panel-' + (index + 1));
147
+ header.addEventListener('keydown', this.onKeydown.bind(this));
148
+ if (!this.firstTab) {
149
+ this.firstTab = header;
150
+ }
151
+ this.lastTab = header;
152
+ });
153
+ tabsContentEl.forEach((panel, index) => {
154
+ panel.setAttribute('id', 'tabpanel-' + (index + 1));
155
+ panel.setAttribute('role', 'tabpanel');
156
+ panel.setAttribute('aria-labelledby', 'tab-' + (index + 1));
157
+ });
158
+ }
159
+ moveFocusToTab(currentTab) {
160
+ currentTab.focus();
161
+ }
162
+ moveFocusToPreviousTab(currentTab) {
163
+ if (currentTab === this.firstTab || currentTab == this.ellipsisDropdown) {
164
+ this.ellipsisDropdown.setAttribute('tabindex', '-1');
165
+ if (this.dropdownItemsCount == 0) {
166
+ this.moveFocusToTab(this.lastTab);
167
+ }
168
+ else if (currentTab == this.ellipsisDropdown) {
169
+ this.moveFocusToTab(this.lastVisibleTab);
170
+ }
171
+ else {
172
+ this.ellipsisDropdown.setAttribute('tabindex', '0');
173
+ this.ellipsisDropdown.focus();
174
+ }
175
+ }
176
+ else {
177
+ const index = this.tabsHeader.findIndex(tab => tab.el === currentTab);
178
+ this.moveFocusToTab(this.tabsHeader[index - 1].el);
179
+ }
180
+ }
181
+ moveFocusToNextTab(currentTab) {
182
+ this.ellipsisDropdown.setAttribute('tabindex', '-1');
183
+ if (currentTab === this.lastTab || currentTab === this.lastVisibleTab) {
184
+ if (this.dropdownItemsCount == 0) {
185
+ this.moveFocusToTab(this.firstTab);
186
+ }
187
+ else {
188
+ this.ellipsisDropdown.setAttribute('tabindex', '0');
189
+ this.ellipsisDropdown.focus();
190
+ }
191
+ }
192
+ else {
193
+ const index = this.tabsHeader.findIndex(tab => tab.el === currentTab);
194
+ this.moveFocusToTab(this.tabsHeader[index + 1].el);
195
+ }
196
+ }
197
+ onKeydown(event) {
198
+ const currentTab = event.currentTarget;
199
+ let flag = false;
200
+ switch (event.key) {
201
+ case 'ArrowLeft':
202
+ this.moveFocusToPreviousTab(currentTab);
203
+ flag = true;
204
+ break;
205
+ case 'ArrowRight':
206
+ this.moveFocusToNextTab(currentTab);
207
+ flag = true;
208
+ break;
209
+ case 'Escape':
210
+ this.closeDropdown();
211
+ flag = true;
212
+ break;
213
+ }
214
+ if (flag) {
215
+ event.stopPropagation();
216
+ event.preventDefault();
217
+ }
218
+ }
219
+ async toggleTabGroup(name) {
220
+ let self = this;
221
+ this.tabGroup.forEach(group => {
222
+ if (group.header.name === name) {
223
+ self.selectGroup(group);
224
+ }
225
+ });
119
226
  }
120
227
  selectGroup(group) {
121
228
  let self = this;
@@ -178,7 +285,8 @@ export class PtcTabList {
178
285
  return {
179
286
  "isMobile": {},
180
287
  "isMobileTabWithBanner": {},
181
- "selectedValue": {}
288
+ "selectedValue": {},
289
+ "dropdownItemsCount": {}
182
290
  };
183
291
  }
184
292
  static get events() {
@@ -197,8 +305,46 @@ export class PtcTabList {
197
305
  "resolved": "any",
198
306
  "references": {}
199
307
  }
308
+ }, {
309
+ "method": "escClicked",
310
+ "name": "escClicked",
311
+ "bubbles": true,
312
+ "cancelable": true,
313
+ "composed": true,
314
+ "docs": {
315
+ "tags": [],
316
+ "text": ""
317
+ },
318
+ "complexType": {
319
+ "original": "any",
320
+ "resolved": "any",
321
+ "references": {}
322
+ }
200
323
  }];
201
324
  }
325
+ static get methods() {
326
+ return {
327
+ "toggleTabGroup": {
328
+ "complexType": {
329
+ "signature": "(name: string) => Promise<void>",
330
+ "parameters": [{
331
+ "tags": [],
332
+ "text": ""
333
+ }],
334
+ "references": {
335
+ "Promise": {
336
+ "location": "global"
337
+ }
338
+ },
339
+ "return": "Promise<void>"
340
+ },
341
+ "docs": {
342
+ "text": "",
343
+ "tags": []
344
+ }
345
+ }
346
+ };
347
+ }
202
348
  static get elementRef() { return "host"; }
203
349
  static get listeners() {
204
350
  return [{
@@ -2215,9 +2215,9 @@
2215
2215
  .iti__v-hide {
2216
2216
  visibility: hidden;
2217
2217
  }
2218
- .iti input.iti__tel-input,
2219
- .iti input.iti__tel-input[type=text],
2220
- .iti input.iti__tel-input[type=tel] {
2218
+ .iti input,
2219
+ .iti input[type=text],
2220
+ .iti input[type=tel] {
2221
2221
  position: relative;
2222
2222
  z-index: 0;
2223
2223
  margin-top: 0 !important;
@@ -2256,35 +2256,26 @@
2256
2256
  border-top: none;
2257
2257
  border-bottom: 4px solid #555;
2258
2258
  }
2259
- .iti__dropdown-content {
2259
+ .iti__country-list {
2260
2260
  position: absolute;
2261
2261
  z-index: 2;
2262
- margin-left: -1px;
2262
+ list-style: none;
2263
+ padding: 0;
2264
+ margin: 0 0 0 -1px;
2263
2265
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
2264
2266
  background-color: white;
2265
2267
  border: 1px solid #ccc;
2268
+ white-space: nowrap;
2266
2269
  max-height: 200px;
2267
2270
  overflow-y: scroll;
2268
2271
  -webkit-overflow-scrolling: touch;
2269
2272
  }
2270
- .iti__dropdown-content--dropup {
2273
+ .iti__country-list--dropup {
2271
2274
  bottom: 100%;
2272
2275
  margin-bottom: -1px;
2273
2276
  }
2274
- .iti__search-input {
2275
- width: 100%;
2276
- border-width: 0;
2277
- }
2278
- .iti__country-list {
2279
- list-style: none;
2280
- padding: 0;
2281
- margin: 0;
2282
- }
2283
- .iti--flexible-dropdown-width .iti__country-list {
2284
- white-space: nowrap;
2285
- }
2286
2277
  @media (max-width: 500px) {
2287
- .iti--flexible-dropdown-width .iti__country-list {
2278
+ .iti__country-list {
2288
2279
  white-space: normal;
2289
2280
  }
2290
2281
  }
@@ -2316,20 +2307,20 @@
2316
2307
  margin-right: 0;
2317
2308
  margin-left: 6px;
2318
2309
  }
2319
- .iti--allow-dropdown input.iti__tel-input,
2320
- .iti--allow-dropdown input.iti__tel-input[type=text],
2321
- .iti--allow-dropdown input.iti__tel-input[type=tel], .iti--separate-dial-code input.iti__tel-input,
2322
- .iti--separate-dial-code input.iti__tel-input[type=text],
2323
- .iti--separate-dial-code input.iti__tel-input[type=tel] {
2310
+ .iti--allow-dropdown input,
2311
+ .iti--allow-dropdown input[type=text],
2312
+ .iti--allow-dropdown input[type=tel], .iti--separate-dial-code input,
2313
+ .iti--separate-dial-code input[type=text],
2314
+ .iti--separate-dial-code input[type=tel] {
2324
2315
  padding-right: 6px;
2325
2316
  padding-left: 52px;
2326
2317
  margin-left: 0;
2327
2318
  }
2328
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input,
2329
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=text],
2330
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=tel], [dir=rtl] .iti--separate-dial-code input.iti__tel-input,
2331
- [dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=text],
2332
- [dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=tel] {
2319
+ [dir=rtl] .iti--allow-dropdown input,
2320
+ [dir=rtl] .iti--allow-dropdown input[type=text],
2321
+ [dir=rtl] .iti--allow-dropdown input[type=tel], [dir=rtl] .iti--separate-dial-code input,
2322
+ [dir=rtl] .iti--separate-dial-code input[type=text],
2323
+ [dir=rtl] .iti--separate-dial-code input[type=tel] {
2333
2324
  padding-right: 52px;
2334
2325
  padding-left: 6px;
2335
2326
  margin-right: 0;
@@ -2348,12 +2339,12 @@
2348
2339
  .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
2349
2340
  background-color: rgba(0, 0, 0, 0.05);
2350
2341
  }
2351
- .iti--allow-dropdown .iti__flag-container:has(+ input[disabled]):hover,
2352
- .iti--allow-dropdown .iti__flag-container:has(+ input[readonly]):hover {
2342
+ .iti--allow-dropdown input[disabled] + .iti__flag-container:hover,
2343
+ .iti--allow-dropdown input[readonly] + .iti__flag-container:hover {
2353
2344
  cursor: default;
2354
2345
  }
2355
- .iti--allow-dropdown .iti__flag-container:has(+ input[disabled]):hover .iti__selected-flag,
2356
- .iti--allow-dropdown .iti__flag-container:has(+ input[readonly]):hover .iti__selected-flag {
2346
+ .iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag,
2347
+ .iti--allow-dropdown input[readonly] + .iti__flag-container:hover .iti__selected-flag {
2357
2348
  background-color: transparent;
2358
2349
  }
2359
2350
  .iti--separate-dial-code .iti__selected-flag {
@@ -2377,26 +2368,18 @@
2377
2368
  cursor: pointer;
2378
2369
  }
2379
2370
 
2380
- .iti--fullscreen-popup.iti--container {
2381
- background-color: rgba(0, 0, 0, 0.5);
2382
- top: 0;
2383
- bottom: 0;
2384
- left: 0;
2385
- right: 0;
2371
+ .iti-mobile .iti--container {
2372
+ top: 30px;
2373
+ bottom: 30px;
2374
+ left: 30px;
2375
+ right: 30px;
2386
2376
  position: fixed;
2387
- padding: 30px;
2388
- display: flex;
2389
- flex-direction: column;
2390
- justify-content: center;
2391
- }
2392
- .iti--fullscreen-popup.iti--container.iti--country-search {
2393
- justify-content: flex-start;
2394
2377
  }
2395
- .iti--fullscreen-popup .iti__dropdown-content {
2378
+ .iti-mobile .iti__country-list {
2396
2379
  max-height: 100%;
2397
- position: relative;
2380
+ width: 100%;
2398
2381
  }
2399
- .iti--fullscreen-popup .iti__country {
2382
+ .iti-mobile .iti__country {
2400
2383
  padding: 10px 10px;
2401
2384
  line-height: 1.5em;
2402
2385
  }
@@ -2422,7 +2405,7 @@
2422
2405
  .iti__flag.iti__va {
2423
2406
  width: 15px;
2424
2407
  }
2425
- @media (min-resolution: 2x) {
2408
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
2426
2409
  .iti__flag {
2427
2410
  background-size: 5762px 15px;
2428
2411
  }
@@ -3488,7 +3471,7 @@
3488
3471
  background-color: #dbdbdb;
3489
3472
  background-position: 20px 0;
3490
3473
  }
3491
- @media (min-resolution: 2x) {
3474
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
3492
3475
  .iti__flag {
3493
3476
  background-image: url("../img/flags@2x.png?1");
3494
3477
  }
@@ -54,18 +54,11 @@ ptc-link, ptc-square-card,
54
54
  }
55
55
  }
56
56
 
57
- .tab-content {
58
- display: none;
59
- }
60
57
  .tab-content p, .tab-content ul, .tab-content ol, .tab-content span, .tab-content h1, .tab-content h2, .tab-content h3, .tab-content h4, .tab-content h5, .tab-content h6 {
61
58
  max-width: 720px;
62
59
  font-weight: var(--ptc-font-weight-normal);
63
60
  }
64
61
 
65
- .tab-content-selected {
66
- display: block;
67
- }
68
-
69
62
  .tab-content h3 {
70
63
  font-size: var(--ptc-font-size-medium);
71
64
  font-weight: var(--ptc-font-weight-bold);