@swisspost/design-system-components 1.4.0 → 1.5.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 (162) hide show
  1. package/dist/cjs/check-one-of-4c2e8b2e.js +10 -0
  2. package/dist/cjs/check-one-of-4c2e8b2e.js.map +1 -0
  3. package/dist/cjs/{check-type-f24cf91d.js → check-type-508a21a5.js} +1 -7
  4. package/dist/cjs/check-type-508a21a5.js.map +1 -0
  5. package/dist/cjs/fade-8c6d4fa7.js +12 -0
  6. package/dist/cjs/fade-8c6d4fa7.js.map +1 -0
  7. package/dist/cjs/{index-50d7d035.js → index-12cc37c9.js} +107 -5
  8. package/dist/cjs/index-12cc37c9.js.map +1 -0
  9. package/dist/cjs/index-f8f6f146.js +28 -0
  10. package/dist/cjs/index-f8f6f146.js.map +1 -0
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/package-112e1698.js +7 -0
  13. package/dist/cjs/package-112e1698.js.map +1 -0
  14. package/dist/cjs/post-alert.cjs.entry.js +105 -0
  15. package/dist/cjs/post-alert.cjs.entry.js.map +1 -0
  16. package/dist/cjs/post-collapsible.cjs.entry.js +6 -5
  17. package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
  18. package/dist/cjs/post-components.cjs.js +2 -2
  19. package/dist/cjs/post-icon.cjs.entry.js +12 -21
  20. package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
  21. package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
  22. package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
  23. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  24. package/dist/cjs/post-tabs.cjs.entry.js +31 -17
  25. package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
  26. package/dist/cjs/post-tooltip.cjs.entry.js +5097 -0
  27. package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -0
  28. package/dist/collection/collection-manifest.json +3 -1
  29. package/dist/collection/components/post-alert/alert-types.js +2 -0
  30. package/dist/collection/components/post-alert/alert-types.js.map +1 -0
  31. package/dist/collection/components/post-alert/post-alert.css +35 -0
  32. package/dist/collection/components/post-alert/post-alert.js +255 -0
  33. package/dist/collection/components/post-alert/post-alert.js.map +1 -0
  34. package/dist/collection/components/post-collapsible/post-collapsible.css +2 -227
  35. package/dist/collection/components/post-icon/post-icon.css +1 -102
  36. package/dist/collection/components/post-tab-header/post-tab-header.css +3 -337
  37. package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
  38. package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
  39. package/dist/collection/components/post-tab-panel/post-tab-panel.css +1 -3
  40. package/dist/collection/components/post-tabs/post-tabs.css +1 -148
  41. package/dist/collection/components/post-tabs/post-tabs.js +26 -7
  42. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  43. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -0
  44. package/dist/collection/components/post-tooltip/post-tooltip.js +338 -0
  45. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -0
  46. package/dist/collection/components/post-tooltip/types.js +2 -0
  47. package/dist/collection/components/post-tooltip/types.js.map +1 -0
  48. package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
  49. package/dist/collection/utils/property-checkers/check-pattern.js +5 -0
  50. package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -0
  51. package/dist/collection/utils/property-checkers/index.js +3 -0
  52. package/dist/collection/utils/property-checkers/index.js.map +1 -1
  53. package/dist/components/check-one-of.js +8 -0
  54. package/dist/components/check-one-of.js.map +1 -0
  55. package/dist/components/check-type.js +1 -6
  56. package/dist/components/check-type.js.map +1 -1
  57. package/dist/components/fade.js +9 -0
  58. package/dist/components/fade.js.map +1 -0
  59. package/dist/components/package.js +1 -1
  60. package/dist/components/post-alert.d.ts +11 -0
  61. package/dist/components/post-alert.js +135 -0
  62. package/dist/components/post-alert.js.map +1 -0
  63. package/dist/components/post-collapsible.js +3 -2
  64. package/dist/components/post-collapsible.js.map +1 -1
  65. package/dist/components/post-icon.js +1 -135
  66. package/dist/components/post-icon.js.map +1 -1
  67. package/dist/components/post-icon2.js +146 -0
  68. package/dist/components/post-icon2.js.map +1 -0
  69. package/dist/components/post-tab-header.js +2 -2
  70. package/dist/components/post-tab-header.js.map +1 -1
  71. package/dist/components/post-tabs.js +27 -13
  72. package/dist/components/post-tabs.js.map +1 -1
  73. package/dist/components/post-tooltip.d.ts +11 -0
  74. package/dist/components/post-tooltip.js +5118 -0
  75. package/dist/components/post-tooltip.js.map +1 -0
  76. package/dist/docs.json +313 -3
  77. package/dist/esm/check-one-of-ded5e15e.js +8 -0
  78. package/dist/esm/check-one-of-ded5e15e.js.map +1 -0
  79. package/dist/esm/{check-type-67411ed3.js → check-type-18ebb4e7.js} +2 -7
  80. package/dist/esm/check-type-18ebb4e7.js.map +1 -0
  81. package/dist/esm/fade-671f1489.js +9 -0
  82. package/dist/esm/fade-671f1489.js.map +1 -0
  83. package/dist/esm/{index-cc0e53f0.js → index-5611074b.js} +107 -5
  84. package/dist/esm/index-5611074b.js.map +1 -0
  85. package/dist/esm/index-7f723686.js +24 -0
  86. package/dist/esm/index-7f723686.js.map +1 -0
  87. package/dist/esm/loader.js +3 -3
  88. package/dist/esm/package-331628f1.js +5 -0
  89. package/dist/esm/package-331628f1.js.map +1 -0
  90. package/dist/esm/post-alert.entry.js +101 -0
  91. package/dist/esm/post-alert.entry.js.map +1 -0
  92. package/dist/esm/post-collapsible.entry.js +5 -4
  93. package/dist/esm/post-collapsible.entry.js.map +1 -1
  94. package/dist/esm/post-components.js +3 -3
  95. package/dist/esm/post-icon.entry.js +7 -16
  96. package/dist/esm/post-icon.entry.js.map +1 -1
  97. package/dist/esm/post-tab-header.entry.js +4 -4
  98. package/dist/esm/post-tab-header.entry.js.map +1 -1
  99. package/dist/esm/post-tab-panel.entry.js +2 -2
  100. package/dist/esm/post-tabs.entry.js +29 -15
  101. package/dist/esm/post-tabs.entry.js.map +1 -1
  102. package/dist/esm/post-tooltip.entry.js +5093 -0
  103. package/dist/esm/post-tooltip.entry.js.map +1 -0
  104. package/dist/post-components/p-0d37fe44.entry.js +2 -0
  105. package/dist/post-components/p-0d37fe44.entry.js.map +1 -0
  106. package/dist/post-components/p-123bb6fb.entry.js +2 -0
  107. package/dist/post-components/p-123bb6fb.entry.js.map +1 -0
  108. package/dist/post-components/p-15fc087f.js +2 -0
  109. package/dist/post-components/p-15fc087f.js.map +1 -0
  110. package/dist/post-components/p-65a9d1c2.entry.js +2 -0
  111. package/dist/post-components/p-7240ae7b.entry.js +2 -0
  112. package/dist/post-components/p-7240ae7b.entry.js.map +1 -0
  113. package/dist/post-components/p-75a7b352.js +2 -0
  114. package/dist/post-components/p-75a7b352.js.map +1 -0
  115. package/dist/post-components/p-8c386036.entry.js +9 -0
  116. package/dist/post-components/p-8c386036.entry.js.map +1 -0
  117. package/dist/post-components/p-97a064da.entry.js +2 -0
  118. package/dist/post-components/{p-6dad6a8a.entry.js.map → p-97a064da.entry.js.map} +1 -1
  119. package/dist/post-components/p-bcc705f1.js +2 -0
  120. package/dist/post-components/p-bcc705f1.js.map +1 -0
  121. package/dist/post-components/p-ccae1c68.entry.js +2 -0
  122. package/dist/post-components/p-ccae1c68.entry.js.map +1 -0
  123. package/dist/post-components/p-d94db268.js +3 -0
  124. package/dist/post-components/p-d94db268.js.map +1 -0
  125. package/dist/post-components/p-e5306504.js +2 -0
  126. package/dist/post-components/p-e5306504.js.map +1 -0
  127. package/dist/post-components/p-eb3ff4dc.js +2 -0
  128. package/dist/post-components/post-components.esm.js +1 -1
  129. package/dist/post-components/post-components.esm.js.map +1 -1
  130. package/dist/types/components/post-alert/alert-types.d.ts +2 -0
  131. package/dist/types/components/post-alert/post-alert.d.ts +49 -0
  132. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -0
  133. package/dist/types/components/post-tooltip/post-tooltip.d.ts +66 -0
  134. package/dist/types/components/post-tooltip/types.d.ts +2 -0
  135. package/dist/types/components.d.ts +115 -0
  136. package/dist/types/utils/property-checkers/check-one-of.d.ts +1 -1
  137. package/dist/types/utils/property-checkers/check-pattern.d.ts +1 -0
  138. package/dist/types/utils/property-checkers/index.d.ts +3 -1
  139. package/package.json +12 -8
  140. package/dist/cjs/check-type-f24cf91d.js.map +0 -1
  141. package/dist/cjs/index-50d7d035.js.map +0 -1
  142. package/dist/cjs/package-e8a6597e.js +0 -7
  143. package/dist/cjs/package-e8a6597e.js.map +0 -1
  144. package/dist/esm/check-type-67411ed3.js.map +0 -1
  145. package/dist/esm/index-cc0e53f0.js.map +0 -1
  146. package/dist/esm/package-b514d0f6.js +0 -5
  147. package/dist/esm/package-b514d0f6.js.map +0 -1
  148. package/dist/post-components/p-1388585d.entry.js +0 -2
  149. package/dist/post-components/p-1388585d.entry.js.map +0 -1
  150. package/dist/post-components/p-58916755.js +0 -2
  151. package/dist/post-components/p-5b3445dc.entry.js +0 -2
  152. package/dist/post-components/p-5b3445dc.entry.js.map +0 -1
  153. package/dist/post-components/p-6341b9b4.js +0 -3
  154. package/dist/post-components/p-6341b9b4.js.map +0 -1
  155. package/dist/post-components/p-6dad6a8a.entry.js +0 -2
  156. package/dist/post-components/p-b95ec099.entry.js +0 -2
  157. package/dist/post-components/p-cc92afb7.entry.js +0 -2
  158. package/dist/post-components/p-cc92afb7.entry.js.map +0 -1
  159. package/dist/post-components/p-f549b3fc.js +0 -2
  160. package/dist/post-components/p-f549b3fc.js.map +0 -1
  161. /package/dist/post-components/{p-b95ec099.entry.js.map → p-65a9d1c2.entry.js.map} +0 -0
  162. /package/dist/post-components/{p-58916755.js.map → p-eb3ff4dc.js.map} +0 -0
@@ -1,102 +1 @@
1
- :host {
2
- display: inline-block;
3
- width: 1em;
4
- vertical-align: -0.15em;
5
- }
6
-
7
- svg {
8
- display: block;
9
- width: 100%;
10
- height: 100%;
11
- fill: currentColor;
12
- background-color: currentColor;
13
- -webkit-mask-position: center center;
14
- mask-position: center center;
15
- -webkit-mask-repeat: no-repeat;
16
- mask-repeat: no-repeat;
17
- -webkit-mask-size: 100%;
18
- mask-size: 100%;
19
- }
20
-
21
- :host([flip-h]:not([flip-h=false])) {
22
- scale: -1 1;
23
- }
24
-
25
- :host([flip-v]:not([flip-v=false])) {
26
- scale: 1 -1;
27
- }
28
-
29
- :host([flip-h][flip-v]:not([flip-h=false], [flip-v=false])) {
30
- scale: -1;
31
- }
32
-
33
- :host([animation]) {
34
- transform-origin: center;
35
- }
36
-
37
- :host([animation=cylon]) {
38
- animation: icon-animation-cylon 0.75s ease-in-out infinite alternate;
39
- }
40
-
41
- :host([animation=cylon-vertical]) {
42
- animation: icon-animation-cylon-vertical 0.75s ease-in-out infinite alternate;
43
- }
44
-
45
- :host([animation=spin]) {
46
- animation: icon-animation-spin 2s linear infinite normal;
47
- }
48
-
49
- :host([animation=spin-reverse]) {
50
- animation: icon-animation-spin 2s linear infinite reverse;
51
- }
52
-
53
- :host([animation=fade]) {
54
- animation: icon-animation-fade 0.75s ease-in-out infinite alternate;
55
- }
56
-
57
- :host([animation=throb]) {
58
- animation: icon-animation-throb 0.75s ease-in-out infinite alternate;
59
- }
60
-
61
- @keyframes icon-animation-cylon {
62
- from {
63
- transform: translateX(-25%);
64
- }
65
- to {
66
- transform: translateX(25%);
67
- }
68
- }
69
- @keyframes icon-animation-cylon-vertical {
70
- from {
71
- transform: translateY(25%);
72
- }
73
- to {
74
- transform: translateY(-25%);
75
- }
76
- }
77
- @keyframes icon-animation-fade {
78
- from {
79
- opacity: 0.1;
80
- }
81
- to {
82
- opacity: 1;
83
- }
84
- }
85
- @keyframes icon-animation-spin {
86
- from {
87
- transform: rotate(0deg);
88
- }
89
- to {
90
- transform: rotate(359deg);
91
- }
92
- }
93
- @keyframes icon-animation-throb {
94
- from {
95
- opacity: 0.5;
96
- transform: scale(0.5);
97
- }
98
- to {
99
- opacity: 1;
100
- transform: scale(1);
101
- }
102
- }
1
+ :host{display:inline-block;width:1em;vertical-align:-0.15em}svg{display:block;width:100%;height:100%;fill:currentColor;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}
@@ -1,337 +1,3 @@
1
- /**
2
- * Colors used by the post style guide
3
- */
4
- /**
5
- * Maps. Allow maps to have custom colors from the project
6
- * by always merging into a default empty map
7
- */
8
- .tab-title {
9
- display: inline-block;
10
- position: relative;
11
- box-sizing: border-box;
12
- padding: 1rem;
13
- transition: background-color 100ms;
14
- border-right: 1px solid transparent;
15
- border-left: 1px solid transparent;
16
- outline-color: currentColor;
17
- opacity: 0.7;
18
- color: var(--post-contrast-color);
19
- text-decoration: none;
20
- }
21
- .tab-title:focus {
22
- background-color: unset;
23
- color: var(--post-contrast-color);
24
- }
25
- .tab-title:hover {
26
- opacity: 1;
27
- background-color: #fff;
28
- color: var(--post-contrast-color);
29
- }
30
- .tab-title:focus-visible {
31
- outline: transparent;
32
- opacity: 1;
33
- background-color: #fff;
34
- color: var(--post-contrast-color);
35
- box-shadow: none;
36
- }
37
- .tab-title:focus-visible::after {
38
- content: "";
39
- display: block;
40
- position: absolute;
41
- top: 2px;
42
- right: 1px;
43
- bottom: 0;
44
- left: 1px;
45
- box-shadow: 0 0 0 1px #fff, 0 0 0 2px hsl(0, 0%, 20%);
46
- }
47
- .tab-title.active {
48
- z-index: 1;
49
- border-right-color: hsl(0, 0%, 80%);
50
- border-left-color: hsl(0, 0%, 80%);
51
- opacity: 1;
52
- background-color: #fff;
53
- color: var(--post-contrast-color);
54
- font-weight: 700;
55
- }
56
- .tab-title.active::before {
57
- content: "";
58
- display: block;
59
- position: absolute;
60
- top: 0;
61
- right: -1px;
62
- left: -1px;
63
- height: 0.25rem;
64
- background-color: #fc0;
65
- }
66
- :is(.bg-dark, .bg-primary, .bg-black, .bg-danger, .bg-nightblue, .bg-nightblue-bright, .bg-petrol, .bg-coral, .bg-olive, .bg-purple, .bg-purple-bright, .bg-aubergine, .bg-aubergine-bright) .tab-title:hover {
67
- background-color: rgba(255, 255, 255, 0.2);
68
- }
69
- :is(.bg-dark, .bg-primary, .bg-black, .bg-danger, .bg-nightblue, .bg-nightblue-bright, .bg-petrol, .bg-coral, .bg-olive, .bg-purple, .bg-purple-bright, .bg-aubergine, .bg-aubergine-bright) .tab-title:focus-visible {
70
- background-color: rgba(255, 255, 255, 0.2);
71
- }
72
- @media (forced-colors: active), (-ms-high-contrast: active), (-ms-high-contrast: white-on-black) {
73
- .tab-title {
74
- opacity: 1;
75
- border-left-color: Canvas;
76
- border-right-color: Canvas;
77
- color: LinkText;
78
- }
79
- .tab-title:hover, .tab-title:focus, .tab-title:focus-within, .tab-title:focus-visible {
80
- outline: 2px solid Highlight;
81
- outline-offset: -0.25rem;
82
- }
83
- .tab-title.active {
84
- border-left-color: ButtonText;
85
- border-right-color: ButtonText;
86
- color: Highlight;
87
- }
88
- .tab-title.active::before {
89
- background-color: Highlight;
90
- }
91
- }
92
-
93
- .bg-yellow .tab-title {
94
- background-color: #fc0;
95
- }
96
- .bg-yellow .tab-title.active {
97
- background-color: #fc0;
98
- }
99
- .bg-yellow .nav-item {
100
- background-color: #fc0;
101
- }
102
-
103
- .bg-light .tab-title {
104
- background-color: #faf9f8;
105
- }
106
- .bg-light .tab-title.active {
107
- background-color: #faf9f8;
108
- }
109
- .bg-light .nav-item {
110
- background-color: #faf9f8;
111
- }
112
-
113
- .bg-gray .tab-title {
114
- background-color: #f4f3f1;
115
- }
116
- .bg-gray .tab-title.active {
117
- background-color: #f4f3f1;
118
- }
119
- .bg-gray .nav-item {
120
- background-color: #f4f3f1;
121
- }
122
-
123
- .bg-dark .tab-title {
124
- background-color: hsl(0, 0%, 20%);
125
- }
126
- .bg-dark .tab-title.active {
127
- background-color: hsl(0, 0%, 20%);
128
- }
129
- .bg-dark .nav-item {
130
- background-color: hsl(0, 0%, 20%);
131
- }
132
-
133
- .bg-primary .tab-title {
134
- background-color: hsl(0, 0%, 20%);
135
- }
136
- .bg-primary .tab-title.active {
137
- background-color: hsl(0, 0%, 20%);
138
- }
139
- .bg-primary .nav-item {
140
- background-color: hsl(0, 0%, 20%);
141
- }
142
-
143
- .bg-white .tab-title {
144
- background-color: #fff;
145
- }
146
- .bg-white .tab-title.active {
147
- background-color: #fff;
148
- }
149
- .bg-white .nav-item {
150
- background-color: #fff;
151
- }
152
-
153
- .bg-black .tab-title {
154
- background-color: #000;
155
- }
156
- .bg-black .tab-title.active {
157
- background-color: #000;
158
- }
159
- .bg-black .nav-item {
160
- background-color: #000;
161
- }
162
-
163
- .bg-success .tab-title {
164
- background-color: #2c911c;
165
- }
166
- .bg-success .tab-title.active {
167
- background-color: #2c911c;
168
- }
169
- .bg-success .nav-item {
170
- background-color: #2c911c;
171
- }
172
-
173
- .bg-info .tab-title {
174
- background-color: #cce4ee;
175
- }
176
- .bg-info .tab-title.active {
177
- background-color: #cce4ee;
178
- }
179
- .bg-info .nav-item {
180
- background-color: #cce4ee;
181
- }
182
-
183
- .bg-warning .tab-title {
184
- background-color: #f49e00;
185
- }
186
- .bg-warning .tab-title.active {
187
- background-color: #f49e00;
188
- }
189
- .bg-warning .nav-item {
190
- background-color: #f49e00;
191
- }
192
-
193
- .bg-danger .tab-title {
194
- background-color: #a51728;
195
- }
196
- .bg-danger .tab-title.active {
197
- background-color: #a51728;
198
- }
199
- .bg-danger .nav-item {
200
- background-color: #a51728;
201
- }
202
-
203
- .bg-nightblue .tab-title {
204
- background-color: #004976;
205
- }
206
- .bg-nightblue .tab-title.active {
207
- background-color: #004976;
208
- }
209
- .bg-nightblue .nav-item {
210
- background-color: #004976;
211
- }
212
-
213
- .bg-nightblue-bright .tab-title {
214
- background-color: #0076a8;
215
- }
216
- .bg-nightblue-bright .tab-title.active {
217
- background-color: #0076a8;
218
- }
219
- .bg-nightblue-bright .nav-item {
220
- background-color: #0076a8;
221
- }
222
-
223
- .bg-petrol .tab-title {
224
- background-color: #006d68;
225
- }
226
- .bg-petrol .tab-title.active {
227
- background-color: #006d68;
228
- }
229
- .bg-petrol .nav-item {
230
- background-color: #006d68;
231
- }
232
-
233
- .bg-petrol-bright .tab-title {
234
- background-color: #00968f;
235
- }
236
- .bg-petrol-bright .tab-title.active {
237
- background-color: #00968f;
238
- }
239
- .bg-petrol-bright .nav-item {
240
- background-color: #00968f;
241
- }
242
-
243
- .bg-coral .tab-title {
244
- background-color: #9e2a2f;
245
- }
246
- .bg-coral .tab-title.active {
247
- background-color: #9e2a2f;
248
- }
249
- .bg-coral .nav-item {
250
- background-color: #9e2a2f;
251
- }
252
-
253
- .bg-coral-bright .tab-title {
254
- background-color: #e03c31;
255
- }
256
- .bg-coral-bright .tab-title.active {
257
- background-color: #e03c31;
258
- }
259
- .bg-coral-bright .nav-item {
260
- background-color: #e03c31;
261
- }
262
-
263
- .bg-olive .tab-title {
264
- background-color: #716135;
265
- }
266
- .bg-olive .tab-title.active {
267
- background-color: #716135;
268
- }
269
- .bg-olive .nav-item {
270
- background-color: #716135;
271
- }
272
-
273
- .bg-olive-bright .tab-title {
274
- background-color: #aa9d2e;
275
- }
276
- .bg-olive-bright .tab-title.active {
277
- background-color: #aa9d2e;
278
- }
279
- .bg-olive-bright .nav-item {
280
- background-color: #aa9d2e;
281
- }
282
-
283
- .bg-purple .tab-title {
284
- background-color: #80276c;
285
- }
286
- .bg-purple .tab-title.active {
287
- background-color: #80276c;
288
- }
289
- .bg-purple .nav-item {
290
- background-color: #80276c;
291
- }
292
-
293
- .bg-purple-bright .tab-title {
294
- background-color: #c5299b;
295
- }
296
- .bg-purple-bright .tab-title.active {
297
- background-color: #c5299b;
298
- }
299
- .bg-purple-bright .nav-item {
300
- background-color: #c5299b;
301
- }
302
-
303
- .bg-aubergine .tab-title {
304
- background-color: #523178;
305
- }
306
- .bg-aubergine .tab-title.active {
307
- background-color: #523178;
308
- }
309
- .bg-aubergine .nav-item {
310
- background-color: #523178;
311
- }
312
-
313
- .bg-aubergine-bright .tab-title {
314
- background-color: #7566a0;
315
- }
316
- .bg-aubergine-bright .tab-title.active {
317
- background-color: #7566a0;
318
- }
319
- .bg-aubergine-bright .nav-item {
320
- background-color: #7566a0;
321
- }
322
-
323
- [class*=bg-] .tab-title.active:focus::after {
324
- background-color: rgba(255, 255, 255, 0.2);
325
- }
326
- @supports selector(*:focus-visible) {
327
- [class*=bg-] .tab-title.active:focus::after {
328
- background-color: unset;
329
- }
330
- [class*=bg-] .tab-title.active:focus-visible::after {
331
- background-color: rgba(255, 255, 255, 0.2);
332
- }
333
- }
334
-
335
- :host {
336
- display: block;
337
- }
1
+ .tab-title[role=tab]{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:#fff;color:var(--post-contrast-color)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:#fff;color:var(--post-contrast-color);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-success .tab-title{background-color:#2c911c}.bg-success .tab-title.active{background-color:#2c911c}.bg-success .nav-item{background-color:#2c911c}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-danger .tab-title{background-color:#a51728}.bg-danger .tab-title.active{background-color:#a51728}.bg-danger .nav-item{background-color:#a51728}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!
2
+ * Copyright 2021 by Swiss Post, Information Technology
3
+ */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;user-select:none;appearance:button}
@@ -13,7 +13,7 @@ export class PostTabHeader {
13
13
  this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
14
14
  }
15
15
  render() {
16
- return (h(Host, { "data-version": version }, h("li", { class: "nav-item" }, h("a", { "aria-selected": "false", class: "tab-title nav-link", href: "#", id: this.tabId, role: "tab" }, h("slot", null)))));
16
+ return (h(Host, { "data-version": version }, h("button", { "aria-selected": "false", class: "tab-title", id: this.tabId, role: "tab", tabindex: "-1", type: "button" }, h("slot", null))));
17
17
  }
18
18
  static get is() { return "post-tab-header"; }
19
19
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"post-tab-header.js","sourceRoot":"","sources":["../../../../src/components/post-tab-header/post-tab-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C,MAAM,OAAO,aAAa;;;;;EAWxB,WAAW,CAAC,QAAyC;IACnD,aAAa,CAAC,QAAQ,EAAE,uDAAuD,CAAC,CAAC;EACnF,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;EAC5D,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,oBAAe,OAAO;MACzB,UAAI,KAAK,EAAC,UAAU;QAClB,0BACgB,OAAO,EACrB,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,GAAG,EACR,EAAE,EAAE,IAAI,CAAC,KAAK,EACd,IAAI,EAAC,KAAK;UAEV,eAAO,CACL,CACD,CACA,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <li class=\"nav-item\">\n <a\n aria-selected=\"false\"\n class=\"tab-title nav-link\"\n href=\"#\"\n id={this.tabId}\n role=\"tab\"\n >\n <slot/>\n </a>\n </li>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"post-tab-header.js","sourceRoot":"","sources":["../../../../src/components/post-tab-header/post-tab-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C,MAAM,OAAO,aAAa;;;;;EAWxB,WAAW,CAAC,QAAyC;IACnD,aAAa,CAAC,QAAQ,EAAE,uDAAuD,CAAC,CAAC;EACnF,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;EAC5D,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,oBAAe,OAAO;MACzB,+BAAsB,OAAO,EAAC,KAAK,EAAC,WAAW,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ;QACpG,eAAQ,CACD,CACJ,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { checkNonEmpty } from '../../utils';\n\n@Component({\n tag: 'post-tab-header',\n styleUrl: 'post-tab-header.scss',\n shadow: true,\n})\nexport class PostTabHeader {\n @Element() host: HTMLPostTabHeaderElement;\n\n @State() tabId: string;\n\n /**\n * The name of the panel controlled by the tab header.\n */\n @Prop() readonly panel: HTMLPostTabPanelElement['name'];\n\n @Watch('panel')\n validateFor(newValue: HTMLPostTabPanelElement['name']) {\n checkNonEmpty(newValue, 'The \"panel\" prop is required for the post-tab-header.');\n }\n\n componentWillLoad() {\n this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;\n }\n\n render() {\n return (\n <Host data-version={version}>\n <button aria-selected=\"false\" class=\"tab-title\" id={this.tabId} role=\"tab\" tabindex=\"-1\" type=\"button\">\n <slot />\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -1,3 +1 @@
1
- :host {
2
- display: none;
3
- }
1
+ :host{display:none}
@@ -1,148 +1 @@
1
- /**
2
- * Colors used by the post style guide
3
- */
4
- /**
5
- * Maps. Allow maps to have custom colors from the project
6
- * by always merging into a default empty map
7
- */
8
- .tabs-wrapper {
9
- position: relative;
10
- padding-top: 1rem;
11
- border: 0;
12
- background-color: #faf9f8;
13
- }
14
- .tabs-wrapper::after {
15
- content: "";
16
- position: absolute;
17
- bottom: 0;
18
- width: 100%;
19
- height: 1px;
20
- background-color: hsl(0, 0%, 80%);
21
- }
22
- .tabs-wrapper .tabs {
23
- background-color: transparent !important;
24
- }
25
- @media (forced-colors: active), (-ms-high-contrast: active), (-ms-high-contrast: white-on-black) {
26
- .tabs-wrapper::after {
27
- background-color: ButtonBorder;
28
- }
29
- }
30
-
31
- .tabs {
32
- margin: 0;
33
- padding: 0;
34
- list-style: none;
35
- display: flex;
36
- flex-wrap: nowrap;
37
- overflow-x: auto;
38
- /* prevent scroll chaining on x scroll */
39
- overscroll-behavior-x: contain;
40
- white-space: nowrap;
41
- }
42
- .tabs::after {
43
- content: "";
44
- display: block;
45
- flex: 1 0 auto;
46
- width: 1rem;
47
- }
48
-
49
- .tab-content {
50
- padding-top: 1rem;
51
- padding-bottom: 1rem;
52
- }
53
-
54
- .bg-yellow .tabs-wrapper {
55
- background-color: #fc0;
56
- }
57
-
58
- .bg-light .tabs-wrapper {
59
- background-color: #faf9f8;
60
- }
61
-
62
- .bg-gray .tabs-wrapper {
63
- background-color: #f4f3f1;
64
- }
65
-
66
- .bg-dark .tabs-wrapper {
67
- background-color: hsl(0, 0%, 20%);
68
- }
69
-
70
- .bg-primary .tabs-wrapper {
71
- background-color: hsl(0, 0%, 20%);
72
- }
73
-
74
- .bg-white .tabs-wrapper {
75
- background-color: #fff;
76
- }
77
-
78
- .bg-black .tabs-wrapper {
79
- background-color: #000;
80
- }
81
-
82
- .bg-success .tabs-wrapper {
83
- background-color: #2c911c;
84
- }
85
-
86
- .bg-info .tabs-wrapper {
87
- background-color: #cce4ee;
88
- }
89
-
90
- .bg-warning .tabs-wrapper {
91
- background-color: #f49e00;
92
- }
93
-
94
- .bg-danger .tabs-wrapper {
95
- background-color: #a51728;
96
- }
97
-
98
- .bg-nightblue .tabs-wrapper {
99
- background-color: #004976;
100
- }
101
-
102
- .bg-nightblue-bright .tabs-wrapper {
103
- background-color: #0076a8;
104
- }
105
-
106
- .bg-petrol .tabs-wrapper {
107
- background-color: #006d68;
108
- }
109
-
110
- .bg-petrol-bright .tabs-wrapper {
111
- background-color: #00968f;
112
- }
113
-
114
- .bg-coral .tabs-wrapper {
115
- background-color: #9e2a2f;
116
- }
117
-
118
- .bg-coral-bright .tabs-wrapper {
119
- background-color: #e03c31;
120
- }
121
-
122
- .bg-olive .tabs-wrapper {
123
- background-color: #716135;
124
- }
125
-
126
- .bg-olive-bright .tabs-wrapper {
127
- background-color: #aa9d2e;
128
- }
129
-
130
- .bg-purple .tabs-wrapper {
131
- background-color: #80276c;
132
- }
133
-
134
- .bg-purple-bright .tabs-wrapper {
135
- background-color: #c5299b;
136
- }
137
-
138
- .bg-aubergine .tabs-wrapper {
139
- background-color: #523178;
140
- }
141
-
142
- .bg-aubergine-bright .tabs-wrapper {
143
- background-color: #7566a0;
144
- }
145
-
146
- :host {
147
- display: block;
148
- }
1
+ .tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:#faf9f8}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem;padding-bottom:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-primary .tabs-wrapper{background-color:#333}.bg-white .tabs-wrapper{background-color:#fff}.bg-black .tabs-wrapper{background-color:#000}.bg-success .tabs-wrapper{background-color:#2c911c}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-danger .tabs-wrapper{background-color:#a51728}.bg-nightblue .tabs-wrapper{background-color:#004976}.bg-nightblue-bright .tabs-wrapper{background-color:#0076a8}.bg-petrol .tabs-wrapper{background-color:#006d68}.bg-petrol-bright .tabs-wrapper{background-color:#00968f}.bg-coral .tabs-wrapper{background-color:#9e2a2f}.bg-coral-bright .tabs-wrapper{background-color:#e03c31}.bg-olive .tabs-wrapper{background-color:#716135}.bg-olive-bright .tabs-wrapper{background-color:#aa9d2e}.bg-purple .tabs-wrapper{background-color:#80276c}.bg-purple-bright .tabs-wrapper{background-color:#c5299b}.bg-aubergine .tabs-wrapper{background-color:#523178}.bg-aubergine-bright .tabs-wrapper{background-color:#7566a0}:host{display:block}
@@ -1,4 +1,4 @@
1
- import { Host, h } from '@stencil/core';
1
+ import { h, Host } from '@stencil/core';
2
2
  import { version } from '../../../package.json';
3
3
  import { fadeIn, fadeOut } from '../../animations';
4
4
  export class PostTabs {
@@ -13,7 +13,7 @@ export class PostTabs {
13
13
  this.moveMisplacedTabs();
14
14
  this.enableTabs();
15
15
  const initiallyActivePanel = this.activePanel || this.tabs.item(0).panel;
16
- this.show(initiallyActivePanel);
16
+ void this.show(initiallyActivePanel);
17
17
  this.isLoaded = true;
18
18
  }
19
19
  /**
@@ -70,24 +70,29 @@ export class PostTabs {
70
70
  const tabPanel = this.getPanel(tab.panel).shadowRoot.querySelector('.tab-pane');
71
71
  tabTitle.setAttribute('aria-controls', tabPanel.id);
72
72
  tabPanel.setAttribute('aria-labelledby', tabTitle.id);
73
- tab.addEventListener('click', e => {
74
- e.preventDefault();
75
- this.show(tab.panel);
73
+ tab.addEventListener('click', () => {
74
+ void this.show(tab.panel);
75
+ });
76
+ tab.addEventListener('keydown', ({ key }) => {
77
+ if (key === 'ArrowRight' || key === 'ArrowLeft')
78
+ this.navigateTabs(tab, key);
76
79
  });
77
80
  });
78
81
  // if the currently active tab was removed from the DOM then select the first one
79
82
  if (this.activeTab && !this.activeTab.isConnected) {
80
- this.show(this.tabs.item(0).panel);
83
+ void this.show(this.tabs.item(0).panel);
81
84
  }
82
85
  }
83
86
  activateTab(tab) {
84
87
  if (this.activeTab) {
85
88
  const tabTitle = this.activeTab.shadowRoot.querySelector('.tab-title');
86
89
  tabTitle.setAttribute('aria-selected', 'false');
90
+ tabTitle.setAttribute('tabindex', '-1');
87
91
  tabTitle.classList.remove('active');
88
92
  }
89
93
  const tabTitle = tab.shadowRoot.querySelector('.tab-title');
90
94
  tabTitle.setAttribute('aria-selected', 'true');
95
+ tabTitle.removeAttribute('tabindex');
91
96
  tabTitle.classList.add('active');
92
97
  this.activeTab = tab;
93
98
  }
@@ -115,8 +120,22 @@ export class PostTabs {
115
120
  getPanel(name) {
116
121
  return this.host.querySelector(`post-tab-panel[name=${name}]`);
117
122
  }
123
+ navigateTabs(tab, key) {
124
+ const activeTabIndex = Array.from(this.tabs).indexOf(tab);
125
+ let nextTab;
126
+ if (key === 'ArrowRight') {
127
+ nextTab = this.tabs[activeTabIndex + 1] || this.tabs[0];
128
+ }
129
+ else {
130
+ nextTab = this.tabs[activeTabIndex - 1] || this.tabs[this.tabs.length - 1];
131
+ }
132
+ if (!nextTab)
133
+ return;
134
+ const nextTabTitle = nextTab.shadowRoot.querySelector('.tab-title');
135
+ nextTabTitle.focus();
136
+ }
118
137
  render() {
119
- return (h(Host, { "data-version": version }, h("div", { class: "tabs-wrapper" }, h("ul", { class: "tabs nav", role: "tablist" }, h("slot", { name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { class: "tab-content" }, h("slot", { onSlotchange: () => this.moveMisplacedTabs() }))));
138
+ return (h(Host, { "data-version": version }, h("div", { class: "tabs-wrapper" }, h("div", { class: "tabs", role: "tablist" }, h("slot", { name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { class: "tab-content" }, h("slot", { onSlotchange: () => this.moveMisplacedTabs() }))));
120
139
  }
121
140
  static get is() { return "post-tabs"; }
122
141
  static get encapsulation() { return "shadow"; }