@umbraco-ui/uui-tabs 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +22 -10
- package/lib/uui-tab-group.element.d.ts +1 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -235,10 +235,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
235
235
|
__accessCheck(obj, member, "access private method");
|
|
236
236
|
return method;
|
|
237
237
|
};
|
|
238
|
-
var _currentGap, _tabElements, _hiddenTabElements, _hiddenTabElementsMap, _visibilityBreakpoints, _resizeObserver, _tabResizeObservers, _breakPointCalculationInProgress, _onResize, onResize_fn, _cleanupTabs, cleanupTabs_fn, _onSlotChange, onSlotChange_fn, _onTabClicked, _calculateBreakPoints, calculateBreakPoints_fn, _setTabArray, setTabArray_fn, _updateCollapsibleTabs, updateCollapsibleTabs_fn, _isElementTabLike, isElementTabLike_fn;
|
|
238
|
+
var _currentGap, _tabElements, _hiddenTabElements, _hiddenTabElementsMap, _visibilityBreakpoints, _resizeObserver, _tabResizeObservers, _breakPointCalculationInProgress, _initialize, initialize_fn, _onResize, onResize_fn, _cleanupTabs, cleanupTabs_fn, _onSlotChange, onSlotChange_fn, _onTabClicked, _calculateBreakPoints, calculateBreakPoints_fn, _setTabArray, setTabArray_fn, _updateCollapsibleTabs, updateCollapsibleTabs_fn, _isElementTabLike, isElementTabLike_fn;
|
|
239
239
|
let UUITabGroupElement = class extends LitElement {
|
|
240
240
|
constructor() {
|
|
241
241
|
super(...arguments);
|
|
242
|
+
__privateAdd(this, _initialize);
|
|
242
243
|
__privateAdd(this, _onResize);
|
|
243
244
|
__privateAdd(this, _cleanupTabs);
|
|
244
245
|
__privateAdd(this, _onSlotChange);
|
|
@@ -282,12 +283,7 @@ let UUITabGroupElement = class extends LitElement {
|
|
|
282
283
|
}
|
|
283
284
|
connectedCallback() {
|
|
284
285
|
super.connectedCallback();
|
|
285
|
-
|
|
286
|
-
demandCustomElement(this, "uui-popover-container");
|
|
287
|
-
demandCustomElement(this, "uui-symbol-more");
|
|
288
|
-
__privateGet(this, _resizeObserver).observe(this);
|
|
289
|
-
if (!this.hasAttribute("role"))
|
|
290
|
-
this.setAttribute("role", "tablist");
|
|
286
|
+
__privateMethod(this, _initialize, initialize_fn).call(this);
|
|
291
287
|
}
|
|
292
288
|
disconnectedCallback() {
|
|
293
289
|
super.disconnectedCallback();
|
|
@@ -328,6 +324,16 @@ _visibilityBreakpoints = new WeakMap();
|
|
|
328
324
|
_resizeObserver = new WeakMap();
|
|
329
325
|
_tabResizeObservers = new WeakMap();
|
|
330
326
|
_breakPointCalculationInProgress = new WeakMap();
|
|
327
|
+
_initialize = new WeakSet();
|
|
328
|
+
initialize_fn = async function() {
|
|
329
|
+
demandCustomElement(this, "uui-button");
|
|
330
|
+
demandCustomElement(this, "uui-popover-container");
|
|
331
|
+
demandCustomElement(this, "uui-symbol-more");
|
|
332
|
+
if (!this.hasAttribute("role"))
|
|
333
|
+
this.setAttribute("role", "tablist");
|
|
334
|
+
await this.updateComplete;
|
|
335
|
+
__privateGet(this, _resizeObserver).observe(this._mainElement);
|
|
336
|
+
};
|
|
331
337
|
_onResize = new WeakSet();
|
|
332
338
|
onResize_fn = function(entries) {
|
|
333
339
|
const gapCSSVar = Number.parseFloat(
|
|
@@ -384,8 +390,8 @@ calculateBreakPoints_fn = async function() {
|
|
|
384
390
|
childrenWidth += gap;
|
|
385
391
|
}
|
|
386
392
|
const tolerance = 2;
|
|
387
|
-
this.style.
|
|
388
|
-
__privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, this.offsetWidth);
|
|
393
|
+
this._mainElement.style.width = childrenWidth - gap + tolerance + "px";
|
|
394
|
+
__privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, this._mainElement.offsetWidth);
|
|
389
395
|
};
|
|
390
396
|
_setTabArray = new WeakSet();
|
|
391
397
|
setTabArray_fn = function() {
|
|
@@ -439,12 +445,15 @@ isElementTabLike_fn = function(el) {
|
|
|
439
445
|
UUITabGroupElement.styles = [
|
|
440
446
|
css`
|
|
441
447
|
:host {
|
|
442
|
-
width:
|
|
448
|
+
min-width: 0;
|
|
449
|
+
display: flex;
|
|
450
|
+
height: 100%;
|
|
443
451
|
}
|
|
444
452
|
|
|
445
453
|
#main {
|
|
446
454
|
display: flex;
|
|
447
455
|
justify-content: space-between;
|
|
456
|
+
overflow: hidden;
|
|
448
457
|
}
|
|
449
458
|
|
|
450
459
|
#grid {
|
|
@@ -526,6 +535,9 @@ __decorateClass([
|
|
|
526
535
|
__decorateClass([
|
|
527
536
|
query("#popover-container")
|
|
528
537
|
], UUITabGroupElement.prototype, "_popoverContainerElement", 2);
|
|
538
|
+
__decorateClass([
|
|
539
|
+
query("#main")
|
|
540
|
+
], UUITabGroupElement.prototype, "_mainElement", 2);
|
|
529
541
|
__decorateClass([
|
|
530
542
|
queryAssignedElements({
|
|
531
543
|
flatten: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-tabs",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-tabs",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a4ae7535264c89cf346311d3d5ec5c888577e256"
|
|
48
48
|
}
|