@orangelogic/design-system 2.35.0 → 2.36.0
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/library/chunks/{file-on-demand.JybCAzD6.js → file-on-demand.Dhx3uvPA.js} +1 -1
- package/library/chunks/tab-group.B8-_uSUK.js +3575 -0
- package/library/components/atoms.js +1 -1
- package/library/components/file-on-demand.js +2 -2
- package/library/components/organisms.js +1 -1
- package/library/components/tab-group.js +1 -1
- package/library/components/tab.js +60 -71
- package/library/components/types.js +41117 -43746
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/tab/tab.d.ts +2 -0
- package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +2 -1
- package/library/packages/events/src/cx-tab-group-pagination-change.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/molecules/src/timeline/timeline.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/analytics.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/button.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/column.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/rich-text.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/text.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/{configsController.d.ts → configs-controller.d.ts} +1 -0
- package/library/packages/organisms/src/content-builder/plugins/accordion.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/analytics.d.ts +2 -10
- package/library/packages/organisms/src/content-builder/plugins/button.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/carousel.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/color-swatches.d.ts +2 -12
- package/library/packages/organisms/src/content-builder/plugins/column-group.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/column.d.ts +3 -12
- package/library/packages/organisms/src/content-builder/plugins/divider.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/font-kit.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/header.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/image.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/search-box.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/tab-group.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/text.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/timeline.d.ts +2 -11
- package/library/packages/organisms/src/content-builder/plugins/utils/details.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/plugins/video.d.ts +2 -11
- package/library/packages/organisms/src/video-editor/components/video-editor-tracks/video-editor-tracks.d.ts +2 -2
- package/library/packages/organisms/src/video-editor/video-editor.d.ts +3 -3
- package/library/packages/types/src/tab-group.d.ts +2 -1
- package/library/packages/types/src/video-editor.d.ts +1 -0
- package/library/react-web-component.d.ts +6 -2
- package/package.json +1 -1
- package/library/chunks/tab-group.DyzM7DYO.js +0 -1236
|
@@ -1,1236 +0,0 @@
|
|
|
1
|
-
import z from "../components/resize-observer.js";
|
|
2
|
-
import { i as W, n as u, C as B, x as A, c as R } from "./custom-element.fmLrnDZr.js";
|
|
3
|
-
import { c as E } from "./component.styles.DtouHn2g.js";
|
|
4
|
-
import { L } from "./i18n.D33BKrRs.js";
|
|
5
|
-
import { s as D } from "./scroll.DwPiX2Ox.js";
|
|
6
|
-
import { w as m } from "./watch.BCJD77bD.js";
|
|
7
|
-
import { i as U } from "./dom.DDszM5Cy.js";
|
|
8
|
-
import { r as h } from "./state.Dt9F_SuS.js";
|
|
9
|
-
import { t as V } from "./event-options.CYHYGOd8.js";
|
|
10
|
-
import { e as w } from "./query.BBf1UFkC.js";
|
|
11
|
-
import { r as N } from "./query-all.i3PyvTUQ.js";
|
|
12
|
-
import { e as x } from "./class-map.DqNfBvJI.js";
|
|
13
|
-
import { i as I } from "./guard.L-Ctqt3S.js";
|
|
14
|
-
import { o as $ } from "./map.D8heArFD.js";
|
|
15
|
-
import { o as T } from "./style-map.lEJHEwk3.js";
|
|
16
|
-
import { n as P } from "./when.Dr1es41R.js";
|
|
17
|
-
import { C as F } from "./button.DrU92LJQ.js";
|
|
18
|
-
import M from "../components/dropdown.js";
|
|
19
|
-
import j from "../components/icon-button.js";
|
|
20
|
-
import K from "../components/menu.js";
|
|
21
|
-
import { C as q } from "./menu-item.DqbKJDm0.js";
|
|
22
|
-
import X from "../components/tab.js";
|
|
23
|
-
var k = /* @__PURE__ */ ((t) => (t.Bottom = "bottom", t.End = "end", t.Start = "start", t.Top = "top", t))(k || {}), C = /* @__PURE__ */ ((t) => (t.Center = "center", t.End = "flex-end", t.Start = "flex-start", t))(C || {}), O = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Manual = "manual", t))(O || {}), H = /* @__PURE__ */ ((t) => (t.Button = "button", t.Default = "default", t))(H || {}), p = /* @__PURE__ */ ((t) => (t.Dropdown = "dropdown", t.Pagination = "pagination", t.Scroll = "scroll", t))(p || {}), y = /* @__PURE__ */ ((t) => (t.Absolute = "absolute", t.DisplayNone = "display-none", t))(y || {});
|
|
24
|
-
const J = W`
|
|
25
|
-
:host {
|
|
26
|
-
--indicator-color: var(--cx-color-primary);
|
|
27
|
-
--track-color: var(--cx-color-neutral-200);
|
|
28
|
-
--track-width: 2px;
|
|
29
|
-
|
|
30
|
-
display: block;
|
|
31
|
-
isolation: isolate;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
::slotted(cx-tab[data-hidden]) {
|
|
35
|
-
visibility: hidden !important;
|
|
36
|
-
pointer-events: none !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tab-group {
|
|
40
|
-
display: flex;
|
|
41
|
-
border-radius: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tab-group__tabs {
|
|
45
|
-
display: flex;
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tab-group--button .tab-group__tabs {
|
|
50
|
-
background-color: var(--cx-color-neutral-100);
|
|
51
|
-
border-radius: 12px;
|
|
52
|
-
padding: var(--cx-spacing-2x-small);
|
|
53
|
-
flex: 0 0 auto;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.tab-group__indicator {
|
|
57
|
-
position: absolute;
|
|
58
|
-
transition:
|
|
59
|
-
var(--cx-transition-fast) translate ease,
|
|
60
|
-
var(--cx-transition-fast) width ease;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tab-group__dropdown {
|
|
64
|
-
position: absolute;
|
|
65
|
-
z-index: 1;
|
|
66
|
-
top: 0;
|
|
67
|
-
height: 100%;
|
|
68
|
-
display: flex;
|
|
69
|
-
padding: var(--cx-spacing-2x-small);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.tab-group__dropdown__trigger {
|
|
73
|
-
--color: var(--tab-color, var(--cx-color-neutral-700));
|
|
74
|
-
--background-color: var(--tab-background-color, transparent);
|
|
75
|
-
--color-focus: var(--tab-active-color, var(--cx-color-primary));
|
|
76
|
-
--background-color-focus: var(--tab-active-background-color, transparent);
|
|
77
|
-
--cx-button-text-transform: none;
|
|
78
|
-
max-width: var(--tab-dropdown-trigger-max-width, 150px);
|
|
79
|
-
height: 100%;
|
|
80
|
-
flex: 1;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.tab-group__dropdown__trigger::part(base) {
|
|
84
|
-
height: 100%;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.tab-group__dropdown__trigger--active {
|
|
88
|
-
--color: var(--tab-active-color, var(--cx-color-neutral-600));
|
|
89
|
-
--background-color: var(--tab-active-background-color, transparent);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.tab-group__dropdown__trigger--hidden {
|
|
93
|
-
visibility: hidden;
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.tab-group__dropdown__menu {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
gap: var(--cx-spacing-3x-small);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.tab-group__dropdown__menu--reverse {
|
|
104
|
-
flex-direction: column-reverse;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.tab-group__dropdown__menu-item {
|
|
108
|
-
--label-color: var(--tab-color, var(--cx-color-neutral-700));
|
|
109
|
-
--cx-menu-item-background-color: var(--tab-background-color, transparent);
|
|
110
|
-
--cx-menu-item-background-color-hover: var(
|
|
111
|
-
--tab-background-color,
|
|
112
|
-
var(--cx-color-neutral-100)
|
|
113
|
-
);
|
|
114
|
-
--cx-menu-item-background-color-active: var(
|
|
115
|
-
--tab-active-background-color,
|
|
116
|
-
var(--cx-menu-item-background-color-hover)
|
|
117
|
-
);
|
|
118
|
-
--cx-menu-item-background-color-active-hover: var(
|
|
119
|
-
--tab-active-background-color,
|
|
120
|
-
var(--cx-color-neutral-200)
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.tab-group__dropdown__menu-item:hover:not(
|
|
125
|
-
.tab-group__dropdown__menu-item--active
|
|
126
|
-
) {
|
|
127
|
-
--label-color: var(--cx-color-neutral-800);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.tab-group__dropdown__menu-item--active {
|
|
131
|
-
--label-color: var(--tab-active-color, var(--cx-color-neutral-600));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.tab-group__dropdown__menu-item::part(base) {
|
|
135
|
-
padding: var(--cx-spacing-3x-small) var(--cx-spacing-x-small);
|
|
136
|
-
min-height: 40px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.tab-group__dropdown__menu-item::part(checked-icon),
|
|
140
|
-
.tab-group__dropdown__menu-item::part(submenu-icon) {
|
|
141
|
-
display: none;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.tab-group--has-scroll-controls .tab-group__nav-container {
|
|
145
|
-
position: relative;
|
|
146
|
-
padding: 0 var(--cx-spacing-x-large);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden,
|
|
150
|
-
.tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden {
|
|
151
|
-
visibility: hidden;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.tab-group__body {
|
|
155
|
-
display: block;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
:host([use-max-panel-height]) .tab-group__body {
|
|
159
|
-
overflow: auto;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
:host([hide-panel-variant='absolute']) .tab-group__body {
|
|
163
|
-
position: relative;
|
|
164
|
-
contain: layout size;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
:host([hide-panel-variant='absolute']) ::slotted(cx-tab-panel) {
|
|
168
|
-
display: block;
|
|
169
|
-
position: absolute !important;
|
|
170
|
-
top: 0;
|
|
171
|
-
left: 0;
|
|
172
|
-
width: 100%;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
:host([hide-panel-variant='absolute']) ::slotted(cx-tab-panel:not([active])) {
|
|
176
|
-
visibility: hidden;
|
|
177
|
-
opacity: 0;
|
|
178
|
-
pointer-events: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.tab-group__scroll-button {
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
justify-content: center;
|
|
185
|
-
position: absolute;
|
|
186
|
-
top: 0;
|
|
187
|
-
bottom: 0;
|
|
188
|
-
width: var(--cx-spacing-x-large);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.tab-group__scroll-button--start {
|
|
192
|
-
left: 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.tab-group__scroll-button--end {
|
|
196
|
-
right: 0;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.tab-group--rtl .tab-group__scroll-button--start {
|
|
200
|
-
left: auto;
|
|
201
|
-
right: 0;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.tab-group--rtl .tab-group__scroll-button--end {
|
|
205
|
-
left: 0;
|
|
206
|
-
right: auto;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.tab-group__nav {
|
|
210
|
-
justify-content: flex-start;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/*
|
|
214
|
-
* Top
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
.tab-group--top {
|
|
218
|
-
flex-direction: column;
|
|
219
|
-
gap: var(--cx-spacing-small);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.tab-group--top .tab-group__nav-container {
|
|
223
|
-
order: 1;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.tab-group--top .tab-group__nav {
|
|
227
|
-
display: flex;
|
|
228
|
-
overflow-x: auto;
|
|
229
|
-
|
|
230
|
-
/* Hide scrollbar in Firefox */
|
|
231
|
-
scrollbar-width: none;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.tab-group--top.tab-group--has-hidden-tabs .tab-group__nav {
|
|
235
|
-
overflow-x: hidden;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* Hide scrollbar in Chrome/Safari */
|
|
239
|
-
.tab-group--top .tab-group__nav::-webkit-scrollbar {
|
|
240
|
-
width: 0;
|
|
241
|
-
height: 0;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.tab-group--top .tab-group__tabs {
|
|
245
|
-
position: relative;
|
|
246
|
-
flex-direction: row;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.tab-group--top.tab-group--rtl .tab-group__tabs {
|
|
250
|
-
flex-direction: row-reverse;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.tab-group--default.tab-group--top .tab-group__tabs {
|
|
254
|
-
flex: 1 1 auto;
|
|
255
|
-
border-bottom: solid var(--track-width) var(--track-color);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.tab-group--top .tab-group__indicator {
|
|
259
|
-
bottom: calc(-1 * var(--track-width));
|
|
260
|
-
border-bottom: solid var(--track-width) var(--indicator-color);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.tab-group--top .tab-group__body {
|
|
264
|
-
order: 3;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.tab-group--top ::slotted(cx-tab-panel) {
|
|
268
|
-
--padding: var(--tab-panel-padding, var(--cx-spacing-medium) 0);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/*
|
|
272
|
-
* Bottom
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
.tab-group--bottom {
|
|
276
|
-
flex-direction: column;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.tab-group--bottom .tab-group__nav-container {
|
|
280
|
-
order: 3;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.tab-group--bottom .tab-group__nav {
|
|
284
|
-
display: flex;
|
|
285
|
-
overflow-x: auto;
|
|
286
|
-
|
|
287
|
-
/* Hide scrollbar in Firefox */
|
|
288
|
-
scrollbar-width: none;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.tab-group--bottom.tab-group--has-hidden-tabs .tab-group__nav {
|
|
292
|
-
overflow-x: hidden;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/* Hide scrollbar in Chrome/Safari */
|
|
296
|
-
.tab-group--bottom .tab-group__nav::-webkit-scrollbar {
|
|
297
|
-
width: 0;
|
|
298
|
-
height: 0;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.tab-group--bottom .tab-group__tabs {
|
|
302
|
-
position: relative;
|
|
303
|
-
flex-direction: row;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.tab-group--bottom.tab-group--rtl .tab-group__tabs {
|
|
307
|
-
flex-direction: row-reverse;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.tab-group--default.tab-group--bottom .tab-group__tabs {
|
|
311
|
-
flex: 1 1 auto;
|
|
312
|
-
border-top: solid var(--track-width) var(--track-color);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.tab-group--bottom .tab-group__indicator {
|
|
316
|
-
top: calc(-1 * var(--track-width));
|
|
317
|
-
border-top: solid var(--track-width) var(--indicator-color);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.tab-group--bottom .tab-group__body {
|
|
321
|
-
order: 1;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.tab-group--bottom ::slotted(cx-tab-panel) {
|
|
325
|
-
--padding: var(--tab-panel-padding, var(--cx-spacing-medium) 0);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/*
|
|
329
|
-
* Start
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
.tab-group--start {
|
|
333
|
-
flex-direction: row;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.tab-group--start .tab-group__nav-container {
|
|
337
|
-
order: 1;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.tab-group--start .tab-group__tabs {
|
|
341
|
-
flex: 0 0 auto;
|
|
342
|
-
flex-direction: column;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.tab-group--start .tab-group__indicator {
|
|
346
|
-
right: calc(-1 * var(--track-width));
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.tab-group--default.tab-group--start .tab-group__tabs {
|
|
350
|
-
border-inline-end: solid var(--track-width) var(--track-color);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.tab-group--default.tab-group--start .tab-group__indicator {
|
|
354
|
-
border-right: solid var(--track-width) var(--indicator-color);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.tab-group--start .tab-group__body {
|
|
358
|
-
flex: 1 1 auto;
|
|
359
|
-
order: 3;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.tab-group--start ::slotted(cx-tab-panel) {
|
|
363
|
-
--padding: var(--tab-panel-padding, 0 var(--cx-spacing-medium));
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/*
|
|
367
|
-
* End
|
|
368
|
-
*/
|
|
369
|
-
|
|
370
|
-
.tab-group--end {
|
|
371
|
-
flex-direction: row;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.tab-group--end .tab-group__nav-container {
|
|
375
|
-
order: 3;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.tab-group--end .tab-group__tabs {
|
|
379
|
-
flex: 0 0 auto;
|
|
380
|
-
flex-direction: column;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.tab-group--default.tab-group--end .tab-group__tabs {
|
|
384
|
-
border-left: solid var(--track-width) var(--track-color);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.tab-group--end .tab-group__indicator {
|
|
388
|
-
left: calc(-1 * var(--track-width));
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.tab-group--default.tab-group--end .tab-group__indicator {
|
|
392
|
-
border-inline-start: solid var(--track-width) var(--indicator-color);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.tab-group--end .tab-group__body {
|
|
396
|
-
flex: 1 1 auto;
|
|
397
|
-
order: 1;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.tab-group--end ::slotted(cx-tab-panel) {
|
|
401
|
-
--padding: var(--tab-panel-padding, 0 var(--cx-spacing-medium));
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.tab-pagination {
|
|
405
|
-
display: flex;
|
|
406
|
-
flex-wrap: wrap;
|
|
407
|
-
justify-content: center;
|
|
408
|
-
gap: var(--cx-spacing-small);
|
|
409
|
-
order: 2;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.tab-pagination__dot {
|
|
413
|
-
display: block;
|
|
414
|
-
cursor: pointer;
|
|
415
|
-
background: none;
|
|
416
|
-
border: 0;
|
|
417
|
-
border-radius: var(--cx-border-radius-circle);
|
|
418
|
-
width: var(--cx-spacing-small);
|
|
419
|
-
height: var(--cx-spacing-small);
|
|
420
|
-
background-color: var(--cx-color-neutral-300);
|
|
421
|
-
padding: 0;
|
|
422
|
-
margin: 0;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.tab-pagination__dot--active {
|
|
426
|
-
background-color: var(--cx-color-neutral-500);
|
|
427
|
-
}
|
|
428
|
-
`;
|
|
429
|
-
var Q = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, r = (t, e, o, a) => {
|
|
430
|
-
for (var n = a > 1 ? void 0 : a ? Y(e, o) : e, c = t.length - 1, s; c >= 0; c--)
|
|
431
|
-
(s = t[c]) && (n = (a ? s(e, o, n) : s(n)) || n);
|
|
432
|
-
return a && n && Q(e, o, n), n;
|
|
433
|
-
};
|
|
434
|
-
let i = class extends B {
|
|
435
|
-
constructor() {
|
|
436
|
-
super(...arguments), this.localize = new L(this), this.tabs = [], this.focusableTabs = [], this.panels = [], this.hasScrollControls = !1, this.shouldHideScrollStartButton = !1, this.shouldHideScrollEndButton = !1, this.dropdownOffset = 0, this.tabPanelHeight = 0, this.tabAlignmentIndent = 0, this.shouldIgnoreAlignment = !1, this.shouldShowDropdown = !1, this.isActiveTabHidden = !1, this.paginationCount = 0, this.activePaginationIndex = 0, this.tabWidth = 0, this.placement = k.Top, this.activation = O.Auto, this.noScrollControls = !1, this.fixedScrollControls = !1, this.useMaxPanelHeight = !1, this.variant = H.Default, this.overflowVariant = p.Scroll, this.hidePanelVariant = y.DisplayNone, this.tabAlignment = C.Start, this.dropdownLabel = "", this.tabsPerPage = 0, this.scrollOffset = 1;
|
|
437
|
-
}
|
|
438
|
-
connectedCallback() {
|
|
439
|
-
const t = Promise.all([
|
|
440
|
-
customElements.whenDefined("cx-tab"),
|
|
441
|
-
customElements.whenDefined("cx-tab-panel")
|
|
442
|
-
]);
|
|
443
|
-
super.connectedCallback(), this.resizeObserver = new ResizeObserver(() => {
|
|
444
|
-
this.repositionIndicator(), this.updateScrollControls(), this.updatePagination();
|
|
445
|
-
}), this.mutationObserver = new MutationObserver((e) => {
|
|
446
|
-
e.some(
|
|
447
|
-
(o) => !["aria-labelledby", "aria-controls"].includes(o.attributeName)
|
|
448
|
-
) && setTimeout(() => this.setAriaLabels()), e.some((o) => o.attributeName === "disabled") && this.syncTabsAndPanels();
|
|
449
|
-
}), this.updateComplete.then(() => {
|
|
450
|
-
this.syncTabsAndPanels(), this.syncScrollPosition(), this.mutationObserver.observe(this, {
|
|
451
|
-
attributes: !0,
|
|
452
|
-
childList: !0,
|
|
453
|
-
subtree: !0
|
|
454
|
-
}), this.resizeObserver.observe(this.nav), this.hidePanelVariant === y.Absolute && (this.setupPanelResizeObserver(), this.calculateTabPanelHeight()), t.then(() => {
|
|
455
|
-
new IntersectionObserver(
|
|
456
|
-
(o, a) => {
|
|
457
|
-
o[0].intersectionRatio > 0 && (this.setAriaLabels(), this.setActiveTab(this.getActiveTab() ?? this.tabs[0], {
|
|
458
|
-
emitEvents: !1
|
|
459
|
-
}), a.unobserve(o[0].target));
|
|
460
|
-
}
|
|
461
|
-
).observe(this.tabGroup);
|
|
462
|
-
});
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
disconnectedCallback() {
|
|
466
|
-
super.disconnectedCallback(), this.mutationObserver?.disconnect(), this.cleanupPanelResizeObserver(), this.nav && this.resizeObserver?.unobserve(this.nav);
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* Navigate to the next tab
|
|
470
|
-
*/
|
|
471
|
-
nextTab(t) {
|
|
472
|
-
const e = this.getActiveTab();
|
|
473
|
-
if (!e)
|
|
474
|
-
return;
|
|
475
|
-
const o = this.getAllTabs().indexOf(e), a = this.findNextFocusableTab(o, "forward");
|
|
476
|
-
a && this.setActiveTab(a, t);
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Navigate to the previous tab
|
|
480
|
-
*/
|
|
481
|
-
previousTab(t) {
|
|
482
|
-
const e = this.getActiveTab();
|
|
483
|
-
if (!e)
|
|
484
|
-
return;
|
|
485
|
-
const o = this.getAllTabs().indexOf(e), a = this.findNextFocusableTab(o, "backward");
|
|
486
|
-
a && this.setActiveTab(a, t);
|
|
487
|
-
}
|
|
488
|
-
getAllTabs() {
|
|
489
|
-
return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements();
|
|
490
|
-
}
|
|
491
|
-
getAllPanels() {
|
|
492
|
-
return [...this.body.assignedElements()].filter(
|
|
493
|
-
(t) => t.tagName.toLowerCase() === "cx-tab-panel"
|
|
494
|
-
);
|
|
495
|
-
}
|
|
496
|
-
getActiveTab() {
|
|
497
|
-
return this.tabs.find((t) => t.active);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* If dropdown overflow but placement is start and end, count as scroll overflow
|
|
501
|
-
*/
|
|
502
|
-
get allowDropdownOverflow() {
|
|
503
|
-
return this.overflowVariant === p.Dropdown && !["start", "end"].includes(this.placement);
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* Get the height of the body
|
|
507
|
-
*/
|
|
508
|
-
get bodyHeight() {
|
|
509
|
-
return this.hidePanelVariant === y.Absolute && this.tabPanelHeight > 0 ? `${this.tabPanelHeight}px` : "";
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Get caret direction based on placement
|
|
513
|
-
*/
|
|
514
|
-
get caretDirection() {
|
|
515
|
-
return this.placement === "bottom" ? "up" : "down";
|
|
516
|
-
}
|
|
517
|
-
handleClick(t) {
|
|
518
|
-
const e = t.target;
|
|
519
|
-
let o = e.closest("cx-tab");
|
|
520
|
-
if (!o) {
|
|
521
|
-
const n = e.closest("[data-panel]")?.getAttribute("data-panel");
|
|
522
|
-
o = this.tabs.find((c) => c.panel === n) ?? null;
|
|
523
|
-
}
|
|
524
|
-
o?.closest("cx-tab-group") === this && o !== null && (this.setActiveTab(o, { scrollBehavior: "smooth" }), this.isActiveTabHidden = o.hasAttribute("data-hidden"));
|
|
525
|
-
}
|
|
526
|
-
handleKeyDown(t) {
|
|
527
|
-
const e = t.target;
|
|
528
|
-
let o = e.closest("cx-tab");
|
|
529
|
-
if (!o) {
|
|
530
|
-
const n = e.closest("[data-panel]")?.getAttribute("data-panel");
|
|
531
|
-
o = this.tabs.find((c) => c.panel === n) ?? null;
|
|
532
|
-
}
|
|
533
|
-
if (o?.closest("cx-tab-group") === this && (["Enter", " "].includes(t.key) && o !== null && (this.setActiveTab(o, { scrollBehavior: "smooth" }), this.isActiveTabHidden = o.hasAttribute("data-hidden"), t.preventDefault()), [
|
|
534
|
-
"ArrowLeft",
|
|
535
|
-
"ArrowRight",
|
|
536
|
-
"ArrowUp",
|
|
537
|
-
"ArrowDown",
|
|
538
|
-
"Home",
|
|
539
|
-
"End"
|
|
540
|
-
].includes(t.key))) {
|
|
541
|
-
const n = this.tabs.find((d) => d.matches(":focus")), c = this.localize.dir() === "rtl";
|
|
542
|
-
let s = null;
|
|
543
|
-
if (["cx-tab"].includes(String(n?.tagName).toLowerCase())) {
|
|
544
|
-
switch (t.key) {
|
|
545
|
-
case "Home":
|
|
546
|
-
s = this.focusableTabs[0];
|
|
547
|
-
break;
|
|
548
|
-
case "End":
|
|
549
|
-
s = this.focusableTabs[this.focusableTabs.length - 1];
|
|
550
|
-
break;
|
|
551
|
-
default:
|
|
552
|
-
if (["top", "bottom"].includes(this.placement) && t.key === (c ? "ArrowRight" : "ArrowLeft") || ["start", "end"].includes(this.placement) && t.key === "ArrowUp") {
|
|
553
|
-
const d = this.tabs.findIndex((l) => l === n);
|
|
554
|
-
s = this.findNextFocusableTab(d, "backward");
|
|
555
|
-
} else if (["top", "bottom"].includes(this.placement) && t.key === (c ? "ArrowLeft" : "ArrowRight") || ["start", "end"].includes(this.placement) && t.key === "ArrowDown") {
|
|
556
|
-
const d = this.tabs.findIndex((l) => l === n);
|
|
557
|
-
s = this.findNextFocusableTab(d, "forward");
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
if (!s)
|
|
561
|
-
return;
|
|
562
|
-
if (s.tabIndex = 0, s.focus({ preventScroll: !0 }), this.allowDropdownOverflow && this.dropdown !== null && s.hasAttribute("data-hidden") && this.dropdown.show(), this.activation === "auto")
|
|
563
|
-
this.setActiveTab(s, { scrollBehavior: "smooth" }), this.isActiveTabHidden = s.hasAttribute("data-hidden");
|
|
564
|
-
else
|
|
565
|
-
for (const d of this.tabs)
|
|
566
|
-
d.tabIndex = d === s ? 0 : -1;
|
|
567
|
-
!s.hasAttribute("data-hidden") && ["top", "bottom"].includes(this.placement) && D(s, this.nav, "horizontal"), t.preventDefault();
|
|
568
|
-
}
|
|
569
|
-
if (this.allowDropdownOverflow && this.dropdown?.open) {
|
|
570
|
-
t.preventDefault();
|
|
571
|
-
const d = this.menu.getAllItems(), l = d.findIndex(
|
|
572
|
-
(v) => v.getAttribute("data-panel") === this.activeTab?.panel
|
|
573
|
-
);
|
|
574
|
-
let g = -1;
|
|
575
|
-
const f = this.tabs.filter(
|
|
576
|
-
(v) => !v.hasAttribute("data-hidden")
|
|
577
|
-
).length;
|
|
578
|
-
let _ = t.key;
|
|
579
|
-
switch (this.placement === k.Bottom && (_ = _ === "ArrowUp" && "ArrowDown" || _ === "ArrowDown" && "ArrowUp" || _), _) {
|
|
580
|
-
case "Home":
|
|
581
|
-
this.dropdown.hide(), this.tabs[0].focus(), g = 0;
|
|
582
|
-
break;
|
|
583
|
-
case "ArrowUp":
|
|
584
|
-
if (l === 0) {
|
|
585
|
-
this.dropdown.hide();
|
|
586
|
-
const v = this.tabs.filter((b) => !b.hasAttribute("data-hidden")).at(-1);
|
|
587
|
-
v && (v.focus(), g = this.tabs.findIndex(
|
|
588
|
-
(b) => b === v
|
|
589
|
-
));
|
|
590
|
-
} else
|
|
591
|
-
this.menu.setCurrentItem(d[l - 1]), d[l - 1].focus(), g = f + l - 1;
|
|
592
|
-
break;
|
|
593
|
-
case "ArrowDown":
|
|
594
|
-
l === d.length - 1 ? (this.dropdown.hide(), this.tabs[0].focus(), g = 0) : (this.menu.setCurrentItem(d[l + 1]), d[l + 1].focus(), g = f + l + 1);
|
|
595
|
-
break;
|
|
596
|
-
}
|
|
597
|
-
this.activation === "auto" && g >= 0 && (this.setActiveTab(this.tabs[g], {
|
|
598
|
-
scrollBehavior: "smooth"
|
|
599
|
-
}), this.isActiveTabHidden = this.tabs[g].hasAttribute("data-hidden"));
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
handleScrollToStart() {
|
|
604
|
-
this.nav.scroll({
|
|
605
|
-
behavior: "smooth",
|
|
606
|
-
left: this.localize.dir() === "rtl" ? this.nav.scrollLeft + this.nav.clientWidth : this.nav.scrollLeft - this.nav.clientWidth
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
handleScrollToEnd() {
|
|
610
|
-
this.nav.scroll({
|
|
611
|
-
behavior: "smooth",
|
|
612
|
-
left: this.localize.dir() === "rtl" ? this.nav.scrollLeft - this.nav.clientWidth : this.nav.scrollLeft + this.nav.clientWidth
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
handleDropdownAfterShow() {
|
|
616
|
-
this.dropdown.focusOnTrigger();
|
|
617
|
-
const t = this.tabs.findIndex((n) => n.tabIndex === 0), e = this.tabs.filter(
|
|
618
|
-
(n) => !n.hasAttribute("data-hidden")
|
|
619
|
-
).length;
|
|
620
|
-
if (t === -1)
|
|
621
|
-
return;
|
|
622
|
-
const o = t - e;
|
|
623
|
-
if (o < 0)
|
|
624
|
-
return;
|
|
625
|
-
const a = this.menu.getAllItems()[o];
|
|
626
|
-
this.menu.setCurrentItem(a), a.focus();
|
|
627
|
-
}
|
|
628
|
-
setActiveTab(t, e) {
|
|
629
|
-
if (e = {
|
|
630
|
-
emitEvents: !0,
|
|
631
|
-
paginateDirection: "forward",
|
|
632
|
-
scrollBehavior: "auto",
|
|
633
|
-
...e
|
|
634
|
-
}, t && t !== this.activeTab && !t.disabled) {
|
|
635
|
-
const o = this.activeTab;
|
|
636
|
-
this.activeTab = t;
|
|
637
|
-
for (const a of this.tabs)
|
|
638
|
-
a.active = a === this.activeTab, a.tabIndex = a === this.activeTab ? 0 : -1;
|
|
639
|
-
for (const a of this.panels)
|
|
640
|
-
a.active = a.name === this.activeTab?.panel, this.hidePanelVariant === y.Absolute && (a.inert = a.name !== this.activeTab?.panel);
|
|
641
|
-
if (this.syncIndicator(), this.calculateTabPanelHeight(), !this.activeTab?.hasAttribute("data-hidden") && ["top", "bottom"].includes(this.placement)) {
|
|
642
|
-
if (U(this.nav, this.activeTab, 10) || !e.paginate)
|
|
643
|
-
D(
|
|
644
|
-
this.activeTab,
|
|
645
|
-
this.nav,
|
|
646
|
-
"horizontal",
|
|
647
|
-
e.scrollBehavior
|
|
648
|
-
);
|
|
649
|
-
else if (e.paginate) {
|
|
650
|
-
let a = e.paginateDirection === "forward" ? this.activePaginationIndex + 1 : this.activePaginationIndex - 1;
|
|
651
|
-
a === this.paginationCount && (a = 0), a < 0 && (a = this.paginationCount - 1), this.nav.scrollTo({
|
|
652
|
-
behavior: "smooth",
|
|
653
|
-
left: a * this.nav.clientWidth
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
e.emitEvents && (o && this.emit("cx-tab-hide", { detail: { name: o.panel } }), this.emit("cx-tab-show", { detail: { name: this.activeTab.panel } }));
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
setAriaLabels() {
|
|
661
|
-
for (const t of this.tabs) {
|
|
662
|
-
const e = this.panels.find((o) => o.name === t.panel);
|
|
663
|
-
e && (t.setAttribute("aria-controls", e.getAttribute("id")), e.setAttribute("aria-labelledby", t.getAttribute("id")));
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
repositionIndicator() {
|
|
667
|
-
let t = this.getActiveTab();
|
|
668
|
-
if (t?.hasAttribute("data-hidden") && (t = this.tabs.find((d) => d.hasAttribute("data-hidden"))), !t)
|
|
669
|
-
return;
|
|
670
|
-
const e = t.hasAttribute("data-hidden") ? this.dropdownTrigger?.clientWidth ?? 0 : t.clientWidth, o = t.clientHeight, a = this.localize.dir() === "rtl", n = this.getAllTabs(), s = n.slice(0, n.indexOf(t)).reduce(
|
|
671
|
-
(d, l) => ({
|
|
672
|
-
left: d.left + l.clientWidth,
|
|
673
|
-
top: d.top + l.clientHeight
|
|
674
|
-
}),
|
|
675
|
-
{ left: 0, top: 0 }
|
|
676
|
-
);
|
|
677
|
-
switch (this.placement) {
|
|
678
|
-
case "top":
|
|
679
|
-
case "bottom":
|
|
680
|
-
this.indicator.style.width = `${e}px`, this.indicator.style.height = "auto", this.indicator.style.translate = a ? `${-1 * s.left}px` : `${s.left}px`;
|
|
681
|
-
break;
|
|
682
|
-
case "start":
|
|
683
|
-
case "end":
|
|
684
|
-
this.indicator.style.width = "auto", this.indicator.style.height = `${o}px`, this.indicator.style.translate = `0 ${s.top}px`;
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.
|
|
690
|
-
*/
|
|
691
|
-
syncTabsAndPanels() {
|
|
692
|
-
if (this.tabs = this.getAllTabs(), this.focusableTabs = this.tabs.filter((t) => !t.disabled), this.panels = this.getAllPanels(), this.syncIndicator(), this.updateComplete.then(() => {
|
|
693
|
-
this.updateScrollControls(), this.updatePagination(), this.hidePanelVariant === y.Absolute && (this.setupPanelResizeObserver(), this.calculateTabPanelHeight());
|
|
694
|
-
}), this.allowDropdownOverflow) {
|
|
695
|
-
const t = new IntersectionObserver(
|
|
696
|
-
(e) => {
|
|
697
|
-
t.disconnect();
|
|
698
|
-
const o = getComputedStyle(this.tabButtons), a = parseFloat(o.paddingLeft || "0") + parseFloat(o.paddingRight || "0"), n = this.container.clientWidth - a, c = this.nav.clientWidth - a, s = this.dropdownTrigger?.clientWidth ?? 0, d = e.length;
|
|
699
|
-
this.dropdownOffset = 0, this.isActiveTabHidden = !1, this.shouldShowDropdown = !1, this.tabs.forEach((l) => {
|
|
700
|
-
l.style.setProperty("--tab-max-width", "unset"), l.offsetWidth;
|
|
701
|
-
});
|
|
702
|
-
for (const [l, g] of e.entries()) {
|
|
703
|
-
const f = g.target, _ = c - this.dropdownOffset, v = f.getBoundingClientRect().width;
|
|
704
|
-
let b = l === e.length - 1 ? _ : _ - s;
|
|
705
|
-
if (l === 0 || l === 1)
|
|
706
|
-
switch (d) {
|
|
707
|
-
case 1:
|
|
708
|
-
b = c;
|
|
709
|
-
break;
|
|
710
|
-
case 2:
|
|
711
|
-
b = c / 2;
|
|
712
|
-
break;
|
|
713
|
-
default:
|
|
714
|
-
b = (c - s) / 2;
|
|
715
|
-
break;
|
|
716
|
-
}
|
|
717
|
-
let S = v > b;
|
|
718
|
-
if (l >= 2 && (S = S && b > i.MIN_CLAMP_WIDTH), !this.shouldShowDropdown && S) {
|
|
719
|
-
f.style.setProperty("--tab-max-width", `${b}px`), f.removeAttribute("data-hidden"), this.dropdownOffset += b;
|
|
720
|
-
continue;
|
|
721
|
-
}
|
|
722
|
-
this.shouldShowDropdown || v > b ? (f.active && (this.isActiveTabHidden = !0), f.setAttribute("data-hidden", ""), this.shouldShowDropdown = !0) : (f.removeAttribute("data-hidden"), this.dropdownOffset += f.getBoundingClientRect().width);
|
|
723
|
-
}
|
|
724
|
-
this.dropdownOffset = Math.floor(this.dropdownOffset), this.dropdownOffset + s > n && (this.dropdownOffset = n - s), this.tabAlignment !== C.Start ? (this.tabAlignmentIndent = n - this.dropdownOffset - (this.shouldShowDropdown ? s : 0), this.tabAlignment === C.Center && (this.tabAlignmentIndent = Math.floor(this.tabAlignmentIndent / 2))) : this.tabAlignmentIndent = 0;
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
root: this.nav,
|
|
728
|
-
threshold: 1
|
|
729
|
-
}
|
|
730
|
-
);
|
|
731
|
-
for (const e of this.tabs)
|
|
732
|
-
t.observe(e);
|
|
733
|
-
} else
|
|
734
|
-
for (const t of this.tabs)
|
|
735
|
-
t.removeAttribute("data-hidden");
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* Calculate the highest tab height
|
|
739
|
-
*/
|
|
740
|
-
calculateTabPanelHeight() {
|
|
741
|
-
if (this.useMaxPanelHeight) {
|
|
742
|
-
this.tabPanelHeight = 0;
|
|
743
|
-
for (const t of this.panels)
|
|
744
|
-
this.tabPanelHeight = Math.max(this.tabPanelHeight, t.clientHeight);
|
|
745
|
-
} else
|
|
746
|
-
this.tabPanelHeight = this.panels.filter((t) => t.active)?.[0]?.clientHeight ?? 0;
|
|
747
|
-
}
|
|
748
|
-
updatePagination() {
|
|
749
|
-
const t = this.nav.clientWidth;
|
|
750
|
-
if (t <= 0) {
|
|
751
|
-
this.paginationCount = 0, this.activePaginationIndex = 0, this.tabWidth = 0;
|
|
752
|
-
return;
|
|
753
|
-
}
|
|
754
|
-
this.paginationCount = Math.ceil(this.tabButtons.scrollWidth / t);
|
|
755
|
-
let e = Math.round(this.nav.scrollLeft / t);
|
|
756
|
-
Math.ceil(this.nav.scrollLeft + t) >= Math.round(this.tabButtons.scrollWidth) && e < this.paginationCount - 1 && (e = this.paginationCount - 1), this.activePaginationIndex = e, this.tabsPerPage > 0 ? this.tabWidth = t / this.tabsPerPage : this.tabWidth = 0;
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Sync the scroll position to the rightmost tab when:
|
|
760
|
-
* overflow variant is dropdown and the direction is rtl
|
|
761
|
-
*/
|
|
762
|
-
syncScrollPosition() {
|
|
763
|
-
this.overflowVariant === p.Dropdown && this.nav && (this.localize.dir() === "rtl" ? this.nav.scrollLeft = this.nav.scrollWidth : this.nav.scrollLeft = 0);
|
|
764
|
-
}
|
|
765
|
-
findNextFocusableTab(t, e) {
|
|
766
|
-
let o = null;
|
|
767
|
-
const a = e === "forward" ? 1 : -1;
|
|
768
|
-
let n = t + a;
|
|
769
|
-
for (; t < this.tabs.length; ) {
|
|
770
|
-
if (o = this.tabs[n] || null, o === null) {
|
|
771
|
-
e === "forward" ? o = this.focusableTabs[0] : o = this.focusableTabs[this.focusableTabs.length - 1];
|
|
772
|
-
break;
|
|
773
|
-
}
|
|
774
|
-
if (!o.disabled)
|
|
775
|
-
break;
|
|
776
|
-
n += a;
|
|
777
|
-
}
|
|
778
|
-
return o;
|
|
779
|
-
}
|
|
780
|
-
handleScrollEnd() {
|
|
781
|
-
this.updateScrollButtons(), this.updatePagination();
|
|
782
|
-
}
|
|
783
|
-
updateScrollButtons() {
|
|
784
|
-
this.hasScrollControls && !this.fixedScrollControls && (this.shouldHideScrollStartButton = this.scrollFromStart() <= this.scrollOffset, this.shouldHideScrollEndButton = this.isScrolledToEnd());
|
|
785
|
-
}
|
|
786
|
-
isScrolledToEnd() {
|
|
787
|
-
return this.scrollFromStart() + this.nav.clientWidth >= this.nav.scrollWidth - this.scrollOffset;
|
|
788
|
-
}
|
|
789
|
-
scrollFromStart() {
|
|
790
|
-
return this.localize.dir() === "rtl" ? -this.nav.scrollLeft : this.nav.scrollLeft;
|
|
791
|
-
}
|
|
792
|
-
updateScrollControls() {
|
|
793
|
-
this.noScrollControls ? this.hasScrollControls = !1 : this.hasScrollControls = ["top", "bottom"].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth + 1, this.updateScrollButtons();
|
|
794
|
-
}
|
|
795
|
-
syncIndicator() {
|
|
796
|
-
this.getActiveTab() ? (this.indicator.style.display = "block", this.repositionIndicator()) : this.indicator.style.display = "none";
|
|
797
|
-
}
|
|
798
|
-
handleVariantChange() {
|
|
799
|
-
for (const t of this.tabs)
|
|
800
|
-
t.requestUpdate();
|
|
801
|
-
}
|
|
802
|
-
handleOverflowVariantChange() {
|
|
803
|
-
this.tabAlignmentIndent = 0, this.syncTabsAndPanels();
|
|
804
|
-
}
|
|
805
|
-
handleDropdownLabelChange() {
|
|
806
|
-
this.syncTabsAndPanels();
|
|
807
|
-
}
|
|
808
|
-
handleAbsoluteHeightChange() {
|
|
809
|
-
if (this.hidePanelVariant === y.Absolute)
|
|
810
|
-
this.setupPanelResizeObserver(), this.calculateTabPanelHeight();
|
|
811
|
-
else {
|
|
812
|
-
this.cleanupPanelResizeObserver(), this.tabPanelHeight = 0;
|
|
813
|
-
for (const t of this.panels)
|
|
814
|
-
t.inert = !1;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
handleTabAlignmentChange() {
|
|
818
|
-
this.syncTabsAndPanels();
|
|
819
|
-
}
|
|
820
|
-
async handleTabsPerPageChange() {
|
|
821
|
-
await this.updateComplete, this.updatePagination();
|
|
822
|
-
}
|
|
823
|
-
/**
|
|
824
|
-
* Setup ResizeObserver for all panels when keepHiddenHeight is enabled
|
|
825
|
-
*/
|
|
826
|
-
setupPanelResizeObserver() {
|
|
827
|
-
if (this.hidePanelVariant !== y.Absolute) {
|
|
828
|
-
this.cleanupPanelResizeObserver();
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
this.cleanupPanelResizeObserver(), this.panelResizeObserver = new ResizeObserver(() => {
|
|
832
|
-
this.calculateTabPanelHeight();
|
|
833
|
-
});
|
|
834
|
-
for (const t of this.panels)
|
|
835
|
-
this.panelResizeObserver.observe(t);
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* Clean up panel ResizeObserver
|
|
839
|
-
*/
|
|
840
|
-
cleanupPanelResizeObserver() {
|
|
841
|
-
this.panelResizeObserver && (this.panelResizeObserver.disconnect(), this.panelResizeObserver = void 0);
|
|
842
|
-
}
|
|
843
|
-
/** Shows the specified tab panel. */
|
|
844
|
-
show(t) {
|
|
845
|
-
const e = this.tabs.find((o) => o.panel === t);
|
|
846
|
-
e && this.setActiveTab(e, { scrollBehavior: "smooth" });
|
|
847
|
-
}
|
|
848
|
-
handleNavContainerResize() {
|
|
849
|
-
const t = this.container.clientWidth, e = this.tabButtons.clientWidth;
|
|
850
|
-
this.shouldIgnoreAlignment = t < e, this.overflowVariant === p.Dropdown && (this.syncTabsAndPanels(), this.syncScrollPosition()), this.overflowVariant === p.Pagination && this.updatePagination();
|
|
851
|
-
}
|
|
852
|
-
handleIndicatorResize(t) {
|
|
853
|
-
t.stopPropagation(), this.syncIndicator(), this.updatePagination();
|
|
854
|
-
}
|
|
855
|
-
/** Guard for dropdown variant */
|
|
856
|
-
getDropdownStyle() {
|
|
857
|
-
const t = this.localize.dir() === "rtl";
|
|
858
|
-
return T({
|
|
859
|
-
[t ? "right" : "left"]: `${this.dropdownOffset}px`
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
getDropdownPlacement() {
|
|
863
|
-
const t = this.localize.dir() === "rtl";
|
|
864
|
-
return `${this.placement === "top" ? "bottom" : "top"}-${t ? "start" : "end"}`;
|
|
865
|
-
}
|
|
866
|
-
handlePaginationDotClick(t) {
|
|
867
|
-
const e = t.currentTarget, o = Number(e.dataset.index);
|
|
868
|
-
o === this.activePaginationIndex || Number.isNaN(o) || (this.activePaginationIndex = o, this.nav.scrollTo({
|
|
869
|
-
behavior: "smooth",
|
|
870
|
-
left: o * this.nav.clientWidth
|
|
871
|
-
}));
|
|
872
|
-
}
|
|
873
|
-
handlePaginationDotKeyDown(t) {
|
|
874
|
-
const e = t.target;
|
|
875
|
-
if (t.key === "Enter" || t.key === " ") {
|
|
876
|
-
t.preventDefault(), e.click();
|
|
877
|
-
return;
|
|
878
|
-
}
|
|
879
|
-
if (!["ArrowRight", "ArrowLeft"].includes(t.key))
|
|
880
|
-
return;
|
|
881
|
-
t.preventDefault(), t.stopPropagation();
|
|
882
|
-
const o = Array.from(this.allDots), a = o.indexOf(e);
|
|
883
|
-
if (a === -1)
|
|
884
|
-
return;
|
|
885
|
-
const n = t.key === "ArrowRight" ? a + 1 : a - 1;
|
|
886
|
-
o[n]?.focus();
|
|
887
|
-
}
|
|
888
|
-
renderPaginationDot(t) {
|
|
889
|
-
const e = t + 1;
|
|
890
|
-
return A`
|
|
891
|
-
<button
|
|
892
|
-
part="dot${this.activePaginationIndex === t ? " dot--active" : ""}"
|
|
893
|
-
class=${x({
|
|
894
|
-
"tab-pagination__dot": !0,
|
|
895
|
-
"tab-pagination__dot--active": t === this.activePaginationIndex
|
|
896
|
-
})}
|
|
897
|
-
role="tab"
|
|
898
|
-
type="button"
|
|
899
|
-
aria-selected=${t === this.activePaginationIndex ? "true" : "false"}
|
|
900
|
-
aria-label=${this.localize.term("slideNum", e)}
|
|
901
|
-
tabindex="0"
|
|
902
|
-
data-index=${t}
|
|
903
|
-
@click=${this.handlePaginationDotClick}
|
|
904
|
-
@keydown=${this.handlePaginationDotKeyDown}
|
|
905
|
-
></button>
|
|
906
|
-
`;
|
|
907
|
-
}
|
|
908
|
-
render() {
|
|
909
|
-
const t = this.localize.dir() === "rtl", e = this.allowDropdownOverflow && this.isActiveTabHidden, o = this.overflowVariant === p.Pagination && this.paginationCount > 1 && Number.isFinite(this.paginationCount);
|
|
910
|
-
return A`
|
|
911
|
-
<div
|
|
912
|
-
part="base"
|
|
913
|
-
class=${x({
|
|
914
|
-
"tab-group": !0,
|
|
915
|
-
"tab-group--bottom": this.placement === "bottom",
|
|
916
|
-
"tab-group--end": this.placement === "end",
|
|
917
|
-
"tab-group--has-hidden-tabs": this.allowDropdownOverflow && this.shouldShowDropdown,
|
|
918
|
-
"tab-group--has-scroll-controls": this.hasScrollControls && this.overflowVariant !== p.Dropdown,
|
|
919
|
-
"tab-group--rtl": t,
|
|
920
|
-
"tab-group--start": this.placement === "start",
|
|
921
|
-
"tab-group--top": this.placement === "top",
|
|
922
|
-
[`tab-group--${this.variant}`]: !0
|
|
923
|
-
})}
|
|
924
|
-
@click=${this.handleClick}
|
|
925
|
-
@keydown=${this.handleKeyDown}
|
|
926
|
-
>
|
|
927
|
-
<cx-resize-observer @cx-resize=${this.handleNavContainerResize}>
|
|
928
|
-
<div class="tab-group__nav-container" part="nav">
|
|
929
|
-
${P(
|
|
930
|
-
this.overflowVariant === p.Scroll && this.hasScrollControls,
|
|
931
|
-
() => A`
|
|
932
|
-
<cx-icon-button
|
|
933
|
-
part="scroll-button scroll-button--start"
|
|
934
|
-
exportparts="base:scroll-button__base"
|
|
935
|
-
class=${x({
|
|
936
|
-
"tab-group__scroll-button": !0,
|
|
937
|
-
"tab-group__scroll-button--start": !0,
|
|
938
|
-
"tab-group__scroll-button--start--hidden": this.shouldHideScrollStartButton
|
|
939
|
-
})}
|
|
940
|
-
name=${t ? "chevron_right" : "chevron_left"}
|
|
941
|
-
tabindex="-1"
|
|
942
|
-
aria-hidden="true"
|
|
943
|
-
label=${this.localize.term("scrollToStart")}
|
|
944
|
-
@click=${this.handleScrollToStart}
|
|
945
|
-
></cx-icon-button>
|
|
946
|
-
`
|
|
947
|
-
)}
|
|
948
|
-
<div
|
|
949
|
-
part="tab-group"
|
|
950
|
-
class="tab-group__nav"
|
|
951
|
-
style=${T({
|
|
952
|
-
justifyContent: this.overflowVariant === p.Dropdown || this.shouldIgnoreAlignment ? "flex-start" : this.tabAlignment,
|
|
953
|
-
transform: `translateX(${this.tabAlignmentIndent}px)`
|
|
954
|
-
})}
|
|
955
|
-
@scrollend=${this.handleScrollEnd}
|
|
956
|
-
>
|
|
957
|
-
<div part="tabs" class="tab-group__tabs" role="tablist">
|
|
958
|
-
<div
|
|
959
|
-
part="active-tab-indicator"
|
|
960
|
-
class="tab-group__indicator"
|
|
961
|
-
></div>
|
|
962
|
-
<cx-resize-observer @cx-resize=${this.handleIndicatorResize}>
|
|
963
|
-
<slot
|
|
964
|
-
name="nav"
|
|
965
|
-
@slotchange=${this.syncTabsAndPanels}
|
|
966
|
-
style=${T(this.tabWidth > 0 ? {
|
|
967
|
-
"--width": `${this.tabWidth}px`
|
|
968
|
-
} : {})}
|
|
969
|
-
></slot>
|
|
970
|
-
${P(
|
|
971
|
-
this.allowDropdownOverflow,
|
|
972
|
-
() => A`
|
|
973
|
-
<cx-dropdown
|
|
974
|
-
class=${x({
|
|
975
|
-
"tab-group__dropdown": !0
|
|
976
|
-
})}
|
|
977
|
-
style=${I(
|
|
978
|
-
[t, this.dropdownOffset],
|
|
979
|
-
() => this.getDropdownStyle()
|
|
980
|
-
)}
|
|
981
|
-
placement=${I(
|
|
982
|
-
[this.placement, t],
|
|
983
|
-
() => this.getDropdownPlacement()
|
|
984
|
-
)}
|
|
985
|
-
hoist
|
|
986
|
-
?disabled=${!this.shouldShowDropdown}
|
|
987
|
-
ignored-keys="ArrowUp ArrowDown Home"
|
|
988
|
-
@cx-after-show=${this.handleDropdownAfterShow}
|
|
989
|
-
>
|
|
990
|
-
<cx-button
|
|
991
|
-
slot="trigger"
|
|
992
|
-
tabindex="-1"
|
|
993
|
-
variant="custom"
|
|
994
|
-
caret
|
|
995
|
-
caret-direction=${this.caretDirection}
|
|
996
|
-
class=${x({
|
|
997
|
-
"tab-group__dropdown__trigger": !0,
|
|
998
|
-
"tab-group__dropdown__trigger--active": e,
|
|
999
|
-
"tab-group__dropdown__trigger--hidden": !this.shouldShowDropdown
|
|
1000
|
-
})}
|
|
1001
|
-
>
|
|
1002
|
-
${this.dropdownLabel}
|
|
1003
|
-
</cx-button>
|
|
1004
|
-
<cx-menu
|
|
1005
|
-
class=${x({
|
|
1006
|
-
"tab-group__dropdown__menu": !0,
|
|
1007
|
-
"tab-group__dropdown__menu--reverse": this.placement === "bottom"
|
|
1008
|
-
})}
|
|
1009
|
-
ignored-keys="ArrowUp ArrowDown Home"
|
|
1010
|
-
bubble-keydown
|
|
1011
|
-
>
|
|
1012
|
-
${$(
|
|
1013
|
-
this.tabs.filter(
|
|
1014
|
-
(a) => a.hasAttribute("data-hidden")
|
|
1015
|
-
),
|
|
1016
|
-
(a) => A`
|
|
1017
|
-
<cx-menu-item
|
|
1018
|
-
class=${x({
|
|
1019
|
-
"tab-group__dropdown__menu-item": !0,
|
|
1020
|
-
"tab-group__dropdown__menu-item--active": a.active
|
|
1021
|
-
})}
|
|
1022
|
-
aria-active=${a.ariaSelected}
|
|
1023
|
-
aria-disabled=${a.ariaDisabled}
|
|
1024
|
-
?active=${a.active}
|
|
1025
|
-
?disabled=${a.disabled}
|
|
1026
|
-
data-panel=${a.panel}
|
|
1027
|
-
>
|
|
1028
|
-
${a.textContent}
|
|
1029
|
-
</cx-menu-item>
|
|
1030
|
-
`
|
|
1031
|
-
)}
|
|
1032
|
-
</cx-menu>
|
|
1033
|
-
</cx-dropdown>
|
|
1034
|
-
`
|
|
1035
|
-
)}
|
|
1036
|
-
</cx-resize-observer>
|
|
1037
|
-
</div>
|
|
1038
|
-
</div>
|
|
1039
|
-
${P(
|
|
1040
|
-
this.overflowVariant === p.Scroll && this.hasScrollControls,
|
|
1041
|
-
() => A`
|
|
1042
|
-
<cx-icon-button
|
|
1043
|
-
part="scroll-button scroll-button--end"
|
|
1044
|
-
exportparts="base:scroll-button__base"
|
|
1045
|
-
class=${x({
|
|
1046
|
-
"tab-group__scroll-button": !0,
|
|
1047
|
-
"tab-group__scroll-button--end": !0,
|
|
1048
|
-
"tab-group__scroll-button--end--hidden": this.shouldHideScrollEndButton
|
|
1049
|
-
})}
|
|
1050
|
-
name=${t ? "chevron_left" : "chevron_right"}
|
|
1051
|
-
tabindex="-1"
|
|
1052
|
-
aria-hidden="true"
|
|
1053
|
-
label=${this.localize.term("scrollToEnd")}
|
|
1054
|
-
@click=${this.handleScrollToEnd}
|
|
1055
|
-
></cx-icon-button>
|
|
1056
|
-
`
|
|
1057
|
-
)}
|
|
1058
|
-
</div>
|
|
1059
|
-
</cx-resize-observer>
|
|
1060
|
-
|
|
1061
|
-
<slot
|
|
1062
|
-
part="body"
|
|
1063
|
-
class="tab-group__body"
|
|
1064
|
-
style=${T({ height: this.bodyHeight })}
|
|
1065
|
-
@slotchange=${this.syncTabsAndPanels}
|
|
1066
|
-
></slot>
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
${P(
|
|
1070
|
-
o,
|
|
1071
|
-
() => A`
|
|
1072
|
-
<div class="tab-pagination">
|
|
1073
|
-
${$(
|
|
1074
|
-
Array.from(
|
|
1075
|
-
{ length: this.paginationCount },
|
|
1076
|
-
(a, n) => n
|
|
1077
|
-
),
|
|
1078
|
-
(a) => this.renderPaginationDot(a)
|
|
1079
|
-
)}
|
|
1080
|
-
</div>
|
|
1081
|
-
`
|
|
1082
|
-
)}
|
|
1083
|
-
</div>
|
|
1084
|
-
`;
|
|
1085
|
-
}
|
|
1086
|
-
};
|
|
1087
|
-
i.styles = [E, J];
|
|
1088
|
-
i.dependencies = {
|
|
1089
|
-
"cx-button": F,
|
|
1090
|
-
"cx-dropdown": M,
|
|
1091
|
-
"cx-icon-button": j,
|
|
1092
|
-
"cx-menu": K,
|
|
1093
|
-
"cx-menu-item": q,
|
|
1094
|
-
"cx-resize-observer": z,
|
|
1095
|
-
"cx-tab": X
|
|
1096
|
-
};
|
|
1097
|
-
i.MIN_CLAMP_WIDTH = 100;
|
|
1098
|
-
r([
|
|
1099
|
-
w(".tab-group")
|
|
1100
|
-
], i.prototype, "tabGroup", 2);
|
|
1101
|
-
r([
|
|
1102
|
-
w(".tab-group__body")
|
|
1103
|
-
], i.prototype, "body", 2);
|
|
1104
|
-
r([
|
|
1105
|
-
w(".tab-group__nav-container")
|
|
1106
|
-
], i.prototype, "container", 2);
|
|
1107
|
-
r([
|
|
1108
|
-
w(".tab-group__nav")
|
|
1109
|
-
], i.prototype, "nav", 2);
|
|
1110
|
-
r([
|
|
1111
|
-
w(".tab-group__indicator")
|
|
1112
|
-
], i.prototype, "indicator", 2);
|
|
1113
|
-
r([
|
|
1114
|
-
w(".tab-group__dropdown")
|
|
1115
|
-
], i.prototype, "dropdown", 2);
|
|
1116
|
-
r([
|
|
1117
|
-
w(".tab-group__dropdown__menu")
|
|
1118
|
-
], i.prototype, "menu", 2);
|
|
1119
|
-
r([
|
|
1120
|
-
w(".tab-group__tabs")
|
|
1121
|
-
], i.prototype, "tabButtons", 2);
|
|
1122
|
-
r([
|
|
1123
|
-
w(".tab-group__dropdown__trigger")
|
|
1124
|
-
], i.prototype, "dropdownTrigger", 2);
|
|
1125
|
-
r([
|
|
1126
|
-
N(".tab-pagination__dot")
|
|
1127
|
-
], i.prototype, "allDots", 2);
|
|
1128
|
-
r([
|
|
1129
|
-
h()
|
|
1130
|
-
], i.prototype, "activeTab", 2);
|
|
1131
|
-
r([
|
|
1132
|
-
h()
|
|
1133
|
-
], i.prototype, "hasScrollControls", 2);
|
|
1134
|
-
r([
|
|
1135
|
-
h()
|
|
1136
|
-
], i.prototype, "shouldHideScrollStartButton", 2);
|
|
1137
|
-
r([
|
|
1138
|
-
h()
|
|
1139
|
-
], i.prototype, "shouldHideScrollEndButton", 2);
|
|
1140
|
-
r([
|
|
1141
|
-
h()
|
|
1142
|
-
], i.prototype, "dropdownOffset", 2);
|
|
1143
|
-
r([
|
|
1144
|
-
h()
|
|
1145
|
-
], i.prototype, "tabPanelHeight", 2);
|
|
1146
|
-
r([
|
|
1147
|
-
h()
|
|
1148
|
-
], i.prototype, "tabAlignmentIndent", 2);
|
|
1149
|
-
r([
|
|
1150
|
-
h()
|
|
1151
|
-
], i.prototype, "shouldIgnoreAlignment", 2);
|
|
1152
|
-
r([
|
|
1153
|
-
h()
|
|
1154
|
-
], i.prototype, "shouldShowDropdown", 2);
|
|
1155
|
-
r([
|
|
1156
|
-
h()
|
|
1157
|
-
], i.prototype, "isActiveTabHidden", 2);
|
|
1158
|
-
r([
|
|
1159
|
-
h()
|
|
1160
|
-
], i.prototype, "paginationCount", 2);
|
|
1161
|
-
r([
|
|
1162
|
-
h()
|
|
1163
|
-
], i.prototype, "activePaginationIndex", 2);
|
|
1164
|
-
r([
|
|
1165
|
-
h()
|
|
1166
|
-
], i.prototype, "tabWidth", 2);
|
|
1167
|
-
r([
|
|
1168
|
-
u()
|
|
1169
|
-
], i.prototype, "placement", 2);
|
|
1170
|
-
r([
|
|
1171
|
-
u()
|
|
1172
|
-
], i.prototype, "activation", 2);
|
|
1173
|
-
r([
|
|
1174
|
-
u({ attribute: "no-scroll-controls", type: Boolean })
|
|
1175
|
-
], i.prototype, "noScrollControls", 2);
|
|
1176
|
-
r([
|
|
1177
|
-
u({ attribute: "fixed-scroll-controls", type: Boolean })
|
|
1178
|
-
], i.prototype, "fixedScrollControls", 2);
|
|
1179
|
-
r([
|
|
1180
|
-
u({ attribute: "use-max-panel-height", type: Boolean })
|
|
1181
|
-
], i.prototype, "useMaxPanelHeight", 2);
|
|
1182
|
-
r([
|
|
1183
|
-
u({ reflect: !0, type: String })
|
|
1184
|
-
], i.prototype, "variant", 2);
|
|
1185
|
-
r([
|
|
1186
|
-
u({ attribute: "overflow-variant", reflect: !0, type: String })
|
|
1187
|
-
], i.prototype, "overflowVariant", 2);
|
|
1188
|
-
r([
|
|
1189
|
-
u({ attribute: "hide-panel-variant", reflect: !0, type: String })
|
|
1190
|
-
], i.prototype, "hidePanelVariant", 2);
|
|
1191
|
-
r([
|
|
1192
|
-
u({ attribute: "tab-alignment", reflect: !0, type: String })
|
|
1193
|
-
], i.prototype, "tabAlignment", 2);
|
|
1194
|
-
r([
|
|
1195
|
-
u({ attribute: "dropdown-label", type: String })
|
|
1196
|
-
], i.prototype, "dropdownLabel", 2);
|
|
1197
|
-
r([
|
|
1198
|
-
u({ attribute: "tabs-per-page", type: Number })
|
|
1199
|
-
], i.prototype, "tabsPerPage", 2);
|
|
1200
|
-
r([
|
|
1201
|
-
V({ passive: !0 })
|
|
1202
|
-
], i.prototype, "handleScrollEnd", 1);
|
|
1203
|
-
r([
|
|
1204
|
-
m("noScrollControls", { waitUntilFirstUpdate: !0 })
|
|
1205
|
-
], i.prototype, "updateScrollControls", 1);
|
|
1206
|
-
r([
|
|
1207
|
-
m("placement", { waitUntilFirstUpdate: !0 })
|
|
1208
|
-
], i.prototype, "syncIndicator", 1);
|
|
1209
|
-
r([
|
|
1210
|
-
m("variant", { waitUntilFirstUpdate: !0 })
|
|
1211
|
-
], i.prototype, "handleVariantChange", 1);
|
|
1212
|
-
r([
|
|
1213
|
-
m("overflowVariant", { waitUntilFirstUpdate: !0 })
|
|
1214
|
-
], i.prototype, "handleOverflowVariantChange", 1);
|
|
1215
|
-
r([
|
|
1216
|
-
m("dropdownLabel", { waitUntilFirstUpdate: !0 })
|
|
1217
|
-
], i.prototype, "handleDropdownLabelChange", 1);
|
|
1218
|
-
r([
|
|
1219
|
-
m("hidePanelVariant", { waitUntilFirstUpdate: !0 }),
|
|
1220
|
-
m("useMaxPanelHeight", { waitUntilFirstUpdate: !0 })
|
|
1221
|
-
], i.prototype, "handleAbsoluteHeightChange", 1);
|
|
1222
|
-
r([
|
|
1223
|
-
m("tabAlignment", { waitUntilFirstUpdate: !0 })
|
|
1224
|
-
], i.prototype, "handleTabAlignmentChange", 1);
|
|
1225
|
-
r([
|
|
1226
|
-
m("tabsPerPage", { waitUntilFirstUpdate: !0 })
|
|
1227
|
-
], i.prototype, "handleTabsPerPageChange", 1);
|
|
1228
|
-
i = r([
|
|
1229
|
-
R("cx-tab-group")
|
|
1230
|
-
], i);
|
|
1231
|
-
export {
|
|
1232
|
-
i as C,
|
|
1233
|
-
C as T,
|
|
1234
|
-
p as a,
|
|
1235
|
-
y as b
|
|
1236
|
-
};
|