@umbraco-ui/uui-tabs 1.4.0 → 1.5.0-rc.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.
@@ -4,11 +4,26 @@
4
4
  {
5
5
  "name": "uui-tab-group",
6
6
  "path": "./lib/uui-tab-group.element.ts",
7
+ "attributes": [
8
+ {
9
+ "name": "dropdown-content-direction",
10
+ "description": "Set the flex direction of the content of the dropdown.",
11
+ "type": "string",
12
+ "default": "\"vertical\""
13
+ }
14
+ ],
7
15
  "properties": [
8
16
  {
9
17
  "name": "styles",
10
18
  "type": "CSSResult[]",
11
19
  "default": "[null]"
20
+ },
21
+ {
22
+ "name": "dropdownContentDirection",
23
+ "attribute": "dropdown-content-direction",
24
+ "description": "Set the flex direction of the content of the dropdown.",
25
+ "type": "string",
26
+ "default": "\"vertical\""
12
27
  }
13
28
  ],
14
29
  "slots": [
@@ -41,6 +56,12 @@
41
56
  "type": "string",
42
57
  "default": "\"undefined\""
43
58
  },
59
+ {
60
+ "name": "orientation",
61
+ "description": "Set the visual orientation of this tab, this changes the look and placement of the active indication.",
62
+ "type": "string",
63
+ "default": "\"horizontal\""
64
+ },
44
65
  {
45
66
  "name": "active",
46
67
  "description": "Set this boolean to true for then the related composition is sorted.",
@@ -80,6 +101,13 @@
80
101
  "type": "string",
81
102
  "default": "\"undefined\""
82
103
  },
104
+ {
105
+ "name": "orientation",
106
+ "attribute": "orientation",
107
+ "description": "Set the visual orientation of this tab, this changes the look and placement of the active indication.",
108
+ "type": "string",
109
+ "default": "\"horizontal\""
110
+ },
83
111
  {
84
112
  "name": "active",
85
113
  "attribute": "active",
@@ -128,6 +156,10 @@
128
156
  {
129
157
  "name": "--uui-tab-divider",
130
158
  "description": "Define the tab dividers color"
159
+ },
160
+ {
161
+ "name": "--uui-tab-padding-horizontal",
162
+ "description": "Define the tab horizontal padding"
131
163
  }
132
164
  ]
133
165
  },
@@ -154,6 +186,12 @@
154
186
  "type": "string",
155
187
  "default": "\"undefined\""
156
188
  },
189
+ {
190
+ "name": "orientation",
191
+ "description": "Set the visual orientation of this tab, this changes the look and placement of the active indication.",
192
+ "type": "string",
193
+ "default": "\"horizontal\""
194
+ },
157
195
  {
158
196
  "name": "active",
159
197
  "description": "Set this boolean to true for then the related composition is sorted.",
@@ -193,6 +231,13 @@
193
231
  "type": "string",
194
232
  "default": "\"undefined\""
195
233
  },
234
+ {
235
+ "name": "orientation",
236
+ "attribute": "orientation",
237
+ "description": "Set the visual orientation of this tab, this changes the look and placement of the active indication.",
238
+ "type": "string",
239
+ "default": "\"horizontal\""
240
+ },
196
241
  {
197
242
  "name": "active",
198
243
  "attribute": "active",
@@ -241,6 +286,10 @@
241
286
  {
242
287
  "name": "--uui-tab-divider",
243
288
  "description": "Define the tab dividers color"
289
+ },
290
+ {
291
+ "name": "--uui-tab-padding-horizontal",
292
+ "description": "Define the tab horizontal padding"
244
293
  }
245
294
  ]
246
295
  }
package/lib/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { ActiveMixin, LabelMixin } from '@umbraco-ui/uui-base/lib/mixins';
2
2
  import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3
3
  import { LitElement, html, css } from 'lit';
4
- import { property, queryAssignedElements } from 'lit/decorators.js';
4
+ import { property, query, queryAssignedElements } from 'lit/decorators.js';
5
5
  import { ifDefined } from 'lit/directives/if-defined.js';
6
+ import { repeat } from 'lit/directives/repeat.js';
7
+ import '@umbraco-ui/uui-button/lib/uui-button.element';
8
+ import '@umbraco-ui/uui-popover-container/lib/uui-popover-container.element';
9
+ import '@umbraco-ui/uui-symbol-more/lib/uui-symbol-more.element';
6
10
  import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
7
11
 
8
12
  var __defProp$1 = Object.defineProperty;
@@ -20,6 +24,7 @@ let UUITabElement = class extends ActiveMixin(LabelMixin("", LitElement)) {
20
24
  constructor() {
21
25
  super();
22
26
  this.disabled = false;
27
+ this.orientation = "horizontal";
23
28
  this.addEventListener("click", this.onHostClick);
24
29
  }
25
30
  onHostClick(e) {
@@ -60,22 +65,24 @@ UUITabElement.styles = [
60
65
  :host {
61
66
  color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
62
67
  font-family: inherit;
68
+ width: fit-content;
63
69
  }
64
70
 
65
71
  #button {
66
72
  position: relative;
73
+ box-sizing: border-box;
67
74
  display: flex;
68
75
  flex-direction: column;
69
76
  align-items: center;
70
77
  justify-content: center;
71
- text-align: center;
72
- padding: var(--uui-size-2,6px) var(--uui-size-4,12px);
73
- border: none;
74
- box-sizing: border-box;
75
- min-height: 32px;
76
- font-size: inherit;
78
+ width: 100%;
77
79
  height: 100%;
80
+ min-height: var(--uui-size-12,36px);
78
81
  min-width: 70px;
82
+ padding: var(--uui-size-2,6px)
83
+ var(--uui-tab-padding-horizontal, var(--uui-size-4,12px));
84
+ border: none;
85
+ font-size: inherit;
79
86
  background: none;
80
87
  color: inherit;
81
88
  cursor: pointer;
@@ -86,6 +93,12 @@ UUITabElement.styles = [
86
93
  line-height: normal;
87
94
  }
88
95
 
96
+ :host([orientation='vertical']) #button {
97
+ min-height: var(--uui-size-14,42px);
98
+ padding: var(--uui-size-2,6px)
99
+ var(--uui-tab-padding-horizontal, var(--uui-size-5,15px));
100
+ }
101
+
89
102
  :host(:not([active]):not([disabled])) #button:hover {
90
103
  color: var(--uui-tab-text-hover, var(--uui-color-default-emphasis,#3544b1));
91
104
  }
@@ -106,26 +119,49 @@ UUITabElement.styles = [
106
119
  #button::before {
107
120
  content: '';
108
121
  position: absolute;
109
- height: 0px;
110
- /* max-width: 50px; */
111
- width: calc(100% - 16px);
112
- left: auto;
113
- right: auto;
114
122
  background-color: var(--uui-color-current,#f5c1bc);
115
- bottom: 0;
116
- border-radius: 3px 3px 0 0;
117
123
  opacity: 0;
118
- transition: opacity ease-in 120ms, height ease-in 120ms;
119
- }
120
- #button:hover::before {
121
- background-color: var(--uui-color-current-emphasis,rgb(248, 214, 211));
124
+ --transitionDuration: 120ms;
125
+ --barWidth: 4px;
126
+ --borderRadius: 3px;
122
127
  }
123
128
  :host([active]) #button::before {
124
129
  opacity: 1;
125
- height: 4px;
126
- transition: opacity 120ms, height ease-out 120ms;
127
130
  }
128
131
 
132
+ /* HORIZONTAL */
133
+ :host([orientation='horizontal']) #button::before {
134
+ left: auto;
135
+ right: auto;
136
+ border-radius: var(--borderRadius) var(--borderRadius) 0 0;
137
+ height: 0px;
138
+ width: calc(100% - 15px);
139
+ bottom: 0;
140
+ transition: opacity ease-in-out var(--transitionDuration),
141
+ height ease-in-out var(--transitionDuration);
142
+ }
143
+ :host([active][orientation='horizontal']) #button::before {
144
+ height: var(--barWidth);
145
+ }
146
+
147
+ /* VERTICAL */
148
+ :host([orientation='vertical']) #button::before {
149
+ top: auto;
150
+ bottom: auto;
151
+ border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
152
+ height: calc(100% - 12px);
153
+ width: 0px;
154
+ left: 0;
155
+ transition: opacity ease-in-out var(--transitionDuration),
156
+ width ease-in-out var(--transitionDuration);
157
+ }
158
+ :host([active][orientation='vertical']) #button::before {
159
+ width: var(--barWidth);
160
+ }
161
+
162
+ #button:hover::before {
163
+ background-color: var(--uui-color-current-emphasis,rgb(248, 214, 211));
164
+ }
129
165
  :host([disabled]) #button::before {
130
166
  background-color: var(--uui-color-disabled-standalone,rgb(226, 226, 226));
131
167
  }
@@ -134,6 +170,18 @@ UUITabElement.styles = [
134
170
  font-size: 20px;
135
171
  margin-bottom: var(--uui-size-2,6px);
136
172
  }
173
+
174
+ slot.label {
175
+ /* TODO: Find a better selector */
176
+ text-align: center;
177
+ display: flex;
178
+ width: 100%;
179
+ flex-direction: column;
180
+ }
181
+
182
+ :host([orientation='vertical']) slot.label {
183
+ text-align: left;
184
+ }
137
185
  `
138
186
  ];
139
187
  __decorateClass$1([
@@ -145,6 +193,9 @@ __decorateClass$1([
145
193
  __decorateClass$1([
146
194
  property({ type: String })
147
195
  ], UUITabElement.prototype, "target", 2);
196
+ __decorateClass$1([
197
+ property({ type: String, reflect: true })
198
+ ], UUITabElement.prototype, "orientation", 2);
148
199
  UUITabElement = __decorateClass$1([
149
200
  defineElement("uui-tab")
150
201
  ], UUITabElement);
@@ -160,46 +211,191 @@ var __decorateClass = (decorators, target, key, kind) => {
160
211
  __defProp(target, key, result);
161
212
  return result;
162
213
  };
214
+ var __accessCheck = (obj, member, msg) => {
215
+ if (!member.has(obj))
216
+ throw TypeError("Cannot " + msg);
217
+ };
218
+ var __privateGet = (obj, member, getter) => {
219
+ __accessCheck(obj, member, "read from private field");
220
+ return getter ? getter.call(obj) : member.get(obj);
221
+ };
222
+ var __privateAdd = (obj, member, value) => {
223
+ if (member.has(obj))
224
+ throw TypeError("Cannot add the same private member more than once");
225
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
226
+ };
227
+ var __privateSet = (obj, member, value, setter) => {
228
+ __accessCheck(obj, member, "write to private field");
229
+ setter ? setter.call(obj, value) : member.set(obj, value);
230
+ return value;
231
+ };
232
+ var __privateMethod = (obj, member, method) => {
233
+ __accessCheck(obj, member, "access private method");
234
+ return method;
235
+ };
236
+ var _tabElements, _hiddenTabElements, _hiddenTabElementsMap, _visibilityBreakpoints, _oldBreakpoint, _resizeObserver, _onResize, onResize_fn, _onSlotChange, onSlotChange_fn, _onTabClicked, _updateCollapsibleTabs, updateCollapsibleTabs_fn, _calculateBreakPoints, calculateBreakPoints_fn, _setTabArray, setTabArray_fn, _isElementTabLike, isElementTabLike_fn;
163
237
  let UUITabGroupElement = class extends LitElement {
164
238
  constructor() {
165
239
  super(...arguments);
166
- this._tabElements = [];
167
- this._onTabClicked = (e) => {
240
+ __privateAdd(this, _onResize);
241
+ __privateAdd(this, _onSlotChange);
242
+ __privateAdd(this, _updateCollapsibleTabs);
243
+ __privateAdd(this, _calculateBreakPoints);
244
+ __privateAdd(this, _setTabArray);
245
+ __privateAdd(this, _isElementTabLike);
246
+ this.dropdownContentDirection = "vertical";
247
+ __privateAdd(this, _tabElements, []);
248
+ __privateAdd(this, _hiddenTabElements, []);
249
+ __privateAdd(this, _hiddenTabElementsMap, /* @__PURE__ */ new Map());
250
+ __privateAdd(this, _visibilityBreakpoints, []);
251
+ __privateAdd(this, _oldBreakpoint, 0);
252
+ __privateAdd(this, _resizeObserver, new ResizeObserver(
253
+ __privateMethod(this, _onResize, onResize_fn).bind(this)
254
+ ));
255
+ __privateAdd(this, _onTabClicked, (e) => {
168
256
  const selectedElement = e.currentTarget;
169
- if (this._elementIsTabLike(selectedElement)) {
257
+ if (__privateMethod(this, _isElementTabLike, isElementTabLike_fn).call(this, selectedElement)) {
170
258
  selectedElement.active = true;
171
- const filtered = this._tabElements.filter((el) => el !== selectedElement);
259
+ const linkedElement = __privateGet(this, _hiddenTabElementsMap).get(selectedElement);
260
+ if (linkedElement) {
261
+ linkedElement.active = true;
262
+ }
263
+ const filtered = [
264
+ ...__privateGet(this, _tabElements),
265
+ ...__privateGet(this, _hiddenTabElements)
266
+ ].filter((el) => el !== selectedElement && el !== linkedElement);
172
267
  filtered.forEach((el) => {
173
- if (this._elementIsTabLike(el)) {
268
+ if (__privateMethod(this, _isElementTabLike, isElementTabLike_fn).call(this, el)) {
174
269
  el.active = false;
175
270
  }
176
271
  });
272
+ const hasActiveHidden = __privateGet(this, _hiddenTabElements).some(
273
+ (el) => el.active && el !== linkedElement
274
+ );
275
+ hasActiveHidden ? this._moreButtonElement.classList.add("active-inside") : this._moreButtonElement.classList.remove("active-inside");
177
276
  }
178
- };
179
- }
180
- _setTabArray() {
181
- this._tabElements = this._slottedNodes ? this._slottedNodes : [];
182
- }
183
- _onSlotChange() {
184
- this._tabElements.forEach((el) => {
185
- el.removeEventListener("click", this._onTabClicked);
186
277
  });
187
- this._setTabArray();
188
- this._tabElements.forEach((el) => {
189
- el.addEventListener("click", this._onTabClicked);
190
- });
191
- }
192
- _elementIsTabLike(el) {
193
- return el instanceof UUITabElement || "active" in el;
194
278
  }
195
279
  connectedCallback() {
196
280
  super.connectedCallback();
281
+ __privateGet(this, _resizeObserver).observe(this);
197
282
  if (!this.hasAttribute("role"))
198
283
  this.setAttribute("role", "tablist");
199
284
  }
285
+ disconnectedCallback() {
286
+ super.disconnectedCallback();
287
+ __privateGet(this, _resizeObserver).unobserve(this);
288
+ }
200
289
  render() {
201
- return html` <slot @slotchange=${this._onSlotChange}></slot> `;
290
+ return html`
291
+ <slot @slotchange=${__privateMethod(this, _onSlotChange, onSlotChange_fn)}></slot>
292
+ <uui-button
293
+ popovertarget="popover-container"
294
+ style="display: none"
295
+ id="more-button"
296
+ label="More"
297
+ compact>
298
+ <uui-symbol-more></uui-symbol-more>
299
+ </uui-button>
300
+ <uui-popover-container
301
+ id="popover-container"
302
+ popover
303
+ margin="10"
304
+ placement="bottom-end">
305
+ <div id="hidden-tabs-container">
306
+ ${repeat(__privateGet(this, _hiddenTabElements), (el) => html`${el}`)}
307
+ </div>
308
+ </uui-popover-container>
309
+ `;
310
+ }
311
+ };
312
+ _tabElements = new WeakMap();
313
+ _hiddenTabElements = new WeakMap();
314
+ _hiddenTabElementsMap = new WeakMap();
315
+ _visibilityBreakpoints = new WeakMap();
316
+ _oldBreakpoint = new WeakMap();
317
+ _resizeObserver = new WeakMap();
318
+ _onResize = new WeakSet();
319
+ onResize_fn = function(entries) {
320
+ __privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, entries[0].contentBoxSize[0].inlineSize);
321
+ };
322
+ _onSlotChange = new WeakSet();
323
+ onSlotChange_fn = function() {
324
+ __privateGet(this, _tabElements).forEach((el) => {
325
+ el.removeEventListener("click", __privateGet(this, _onTabClicked));
326
+ });
327
+ __privateMethod(this, _setTabArray, setTabArray_fn).call(this);
328
+ __privateGet(this, _tabElements).forEach((el) => {
329
+ el.addEventListener("click", __privateGet(this, _onTabClicked));
330
+ });
331
+ };
332
+ _onTabClicked = new WeakMap();
333
+ _updateCollapsibleTabs = new WeakSet();
334
+ updateCollapsibleTabs_fn = function(containerWidth) {
335
+ const buttonWidth = this._moreButtonElement.offsetWidth;
336
+ if (__privateGet(this, _visibilityBreakpoints).slice(-1)[0] < containerWidth && __privateGet(this, _hiddenTabElements).length === 0)
337
+ return;
338
+ let newBreakpoint = Number.MAX_VALUE;
339
+ for (let i = __privateGet(this, _visibilityBreakpoints).length - 1; i > -1; i--) {
340
+ const breakpoint = __privateGet(this, _visibilityBreakpoints)[i];
341
+ const containerWidthButtonWidth = containerWidth - (i !== __privateGet(this, _visibilityBreakpoints).length - 1 ? buttonWidth : 0);
342
+ if (breakpoint < containerWidthButtonWidth) {
343
+ newBreakpoint = i;
344
+ break;
345
+ }
202
346
  }
347
+ if (newBreakpoint === __privateGet(this, _oldBreakpoint))
348
+ return;
349
+ __privateSet(this, _oldBreakpoint, newBreakpoint);
350
+ __privateGet(this, _hiddenTabElements).forEach((el) => {
351
+ el.removeEventListener("click", __privateGet(this, _onTabClicked));
352
+ });
353
+ __privateSet(this, _hiddenTabElements, []);
354
+ __privateGet(this, _hiddenTabElementsMap).clear();
355
+ let hasActiveTabInDropdown = false;
356
+ for (let i = 0; i < __privateGet(this, _visibilityBreakpoints).length; i++) {
357
+ const breakpoint = __privateGet(this, _visibilityBreakpoints)[i];
358
+ const tab = __privateGet(this, _tabElements)[i];
359
+ const containerWidthButtonWidth = containerWidth - (i !== __privateGet(this, _visibilityBreakpoints).length - 1 ? buttonWidth : 0);
360
+ if (breakpoint < containerWidthButtonWidth) {
361
+ tab.style.display = "";
362
+ this._moreButtonElement.style.display = "none";
363
+ } else {
364
+ const proxyTab = tab.cloneNode(true);
365
+ proxyTab.addEventListener("click", __privateGet(this, _onTabClicked));
366
+ proxyTab.classList.add("hidden-tab");
367
+ proxyTab.style.display = "";
368
+ proxyTab.orientation = this.dropdownContentDirection;
369
+ __privateGet(this, _hiddenTabElementsMap).set(proxyTab, tab);
370
+ __privateGet(this, _hiddenTabElementsMap).set(tab, proxyTab);
371
+ __privateGet(this, _hiddenTabElements).push(proxyTab);
372
+ tab.style.display = "none";
373
+ this._moreButtonElement.style.display = "";
374
+ if (tab.active) {
375
+ hasActiveTabInDropdown = true;
376
+ }
377
+ }
378
+ }
379
+ hasActiveTabInDropdown ? this._moreButtonElement.classList.add("active-inside") : this._moreButtonElement.classList.remove("active-inside");
380
+ this.requestUpdate();
381
+ };
382
+ _calculateBreakPoints = new WeakSet();
383
+ calculateBreakPoints_fn = function() {
384
+ let childrenWidth = 0;
385
+ for (let i = 0; i < __privateGet(this, _tabElements).length; i++) {
386
+ childrenWidth += __privateGet(this, _tabElements)[i].offsetWidth;
387
+ __privateGet(this, _visibilityBreakpoints)[i] = childrenWidth;
388
+ }
389
+ __privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, this.offsetWidth);
390
+ };
391
+ _setTabArray = new WeakSet();
392
+ setTabArray_fn = function() {
393
+ __privateSet(this, _tabElements, this._slottedNodes ? this._slottedNodes : []);
394
+ __privateMethod(this, _calculateBreakPoints, calculateBreakPoints_fn).call(this);
395
+ };
396
+ _isElementTabLike = new WeakSet();
397
+ isElementTabLike_fn = function(el) {
398
+ return el instanceof UUITabElement || "active" in el;
203
399
  };
204
400
  UUITabGroupElement.styles = [
205
401
  css`
@@ -215,14 +411,62 @@ UUITabGroupElement.styles = [
215
411
  ::slotted(*:not(:last-of-type)) {
216
412
  border-right: 1px solid var(--uui-tab-divider, none);
217
413
  }
414
+
415
+ .hidden-tab {
416
+ width: 100%;
417
+ }
418
+
419
+ #hidden-tabs-container {
420
+ width: fit-content;
421
+ display: flex;
422
+ flex-direction: column;
423
+ background: var(--uui-color-surface,#fff);
424
+ border-radius: var(--uui-border-radius,3px);
425
+ box-shadow: var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,0.19) , 0 6px 6px rgba(0,0,0,0.23));
426
+ overflow: hidden;
427
+ }
428
+ :host([dropdown-direction='horizontal']) #hidden-tabs-container {
429
+ flex-direction: row;
430
+ }
431
+
432
+ #more-button {
433
+ margin-left: auto;
434
+ position: relative;
435
+ }
436
+ #more-button::before {
437
+ content: '';
438
+ position: absolute;
439
+ bottom: 0;
440
+ width: 100%;
441
+ background-color: var(--uui-color-current,#f5c1bc);
442
+ height: 0px;
443
+ border-radius: 3px 3px 0 0;
444
+ opacity: 0;
445
+ transition: opacity ease-in 120ms, height ease-in 120ms;
446
+ }
447
+ #more-button.active-inside::before {
448
+ opacity: 1;
449
+ height: 4px;
450
+ transition: opacity 120ms, height ease-out 120ms;
451
+ }
218
452
  `
219
453
  ];
454
+ __decorateClass([
455
+ query("#more-button")
456
+ ], UUITabGroupElement.prototype, "_moreButtonElement", 2);
220
457
  __decorateClass([
221
458
  queryAssignedElements({
222
459
  flatten: true,
223
460
  selector: "uui-tab, [uui-tab], [role=tab]"
224
461
  })
225
462
  ], UUITabGroupElement.prototype, "_slottedNodes", 2);
463
+ __decorateClass([
464
+ property({
465
+ type: String,
466
+ reflect: true,
467
+ attribute: "dropdown-content-direction"
468
+ })
469
+ ], UUITabGroupElement.prototype, "dropdownContentDirection", 2);
226
470
  UUITabGroupElement = __decorateClass([
227
471
  defineElement("uui-tab-group")
228
472
  ], UUITabGroupElement);
@@ -1,17 +1,25 @@
1
1
  import { LitElement } from 'lit';
2
+ import '@umbraco-ui/uui-button/lib/uui-button.element';
3
+ import '@umbraco-ui/uui-popover-container/lib/uui-popover-container.element';
4
+ import '@umbraco-ui/uui-symbol-more/lib/uui-symbol-more.element';
2
5
  /**
3
6
  * @element uui-tab-group
4
7
  * @slot - Default slot for the tab group
5
8
  */
6
9
  export declare class UUITabGroupElement extends LitElement {
10
+ #private;
7
11
  static styles: import("lit").CSSResult[];
12
+ private _moreButtonElement;
8
13
  private _slottedNodes?;
9
- private _tabElements;
10
- private _setTabArray;
11
- private _onSlotChange;
12
- private _onTabClicked;
13
- private _elementIsTabLike;
14
+ /**
15
+ * Set the flex direction of the content of the dropdown.
16
+ * @type {string}
17
+ * @attr
18
+ * @default vertical
19
+ */
20
+ dropdownContentDirection: 'vertical' | 'horizontal';
14
21
  connectedCallback(): void;
22
+ disconnectedCallback(): void;
15
23
  render(): import("lit-html").TemplateResult<1>;
16
24
  }
17
25
  declare global {
@@ -12,6 +12,7 @@ declare const UUITabElement_base: (new (...args: any[]) => import("@umbraco-ui/u
12
12
  * @cssprop --uui-tab-text-active - Define the tab text active color
13
13
  * @cssprop --uui-tab-background - Define the tab group background color
14
14
  * @cssprop --uui-tab-divider - Define the tab dividers color
15
+ * @cssprop --uui-tab-padding-horizontal - Define the tab horizontal padding
15
16
  */
16
17
  export declare class UUITabElement extends UUITabElement_base {
17
18
  static styles: import("lit").CSSResult[];
@@ -36,6 +37,13 @@ export declare class UUITabElement extends UUITabElement_base {
36
37
  * @default undefined
37
38
  */
38
39
  target?: '_blank' | '_parent' | '_self' | '_top';
40
+ /**
41
+ * Set the visual orientation of this tab, this changes the look and placement of the active indication.
42
+ * @type {string}
43
+ * @attr
44
+ * @default horizontal
45
+ */
46
+ orientation?: 'horizontal' | 'vertical';
39
47
  constructor();
40
48
  private onHostClick;
41
49
  render(): import("lit-html").TemplateResult<1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-tabs",
3
- "version": "1.4.0",
3
+ "version": "1.5.0-rc.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,7 +30,7 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.4.0"
33
+ "@umbraco-ui/uui-base": "1.5.0-rc.0"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -41,5 +41,5 @@
41
41
  "access": "public"
42
42
  },
43
43
  "homepage": "https://uui.umbraco.com/?path=/story/uui-tabs",
44
- "gitHead": "09437426b75b875ea93d7ab61b489d3817d81d96"
44
+ "gitHead": "73cbc1444590282b7fb63a18d5639628ba18f0a3"
45
45
  }