@umbraco-ui/uui-tabs 1.6.0 → 1.7.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.
package/lib/index.js CHANGED
@@ -102,7 +102,8 @@ UUITabElement.styles = [
102
102
  }
103
103
 
104
104
  :host(:not([active]):not([disabled])) #button:active {
105
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),
105
+ box-shadow:
106
+ inset 0 2px 4px rgba(0, 0, 0, 0.15),
106
107
  0 1px 2px rgba(0, 0, 0, 0.05);
107
108
  }
108
109
 
@@ -139,7 +140,8 @@ UUITabElement.styles = [
139
140
  height: 0px;
140
141
  width: calc(100% - 15px);
141
142
  bottom: 0;
142
- transition: opacity ease-in-out var(--transitionDuration),
143
+ transition:
144
+ opacity ease-in-out var(--transitionDuration),
143
145
  height ease-in-out var(--transitionDuration);
144
146
  }
145
147
  :host([active][orientation='horizontal']) #button::before {
@@ -154,7 +156,8 @@ UUITabElement.styles = [
154
156
  height: calc(100% - 12px);
155
157
  width: 0px;
156
158
  left: 0;
157
- transition: opacity ease-in-out var(--transitionDuration),
159
+ transition:
160
+ opacity ease-in-out var(--transitionDuration),
158
161
  width ease-in-out var(--transitionDuration);
159
162
  }
160
163
  :host([active][orientation='vertical']) #button::before {
@@ -235,10 +238,11 @@ var __privateMethod = (obj, member, method) => {
235
238
  __accessCheck(obj, member, "access private method");
236
239
  return method;
237
240
  };
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;
241
+ 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
242
  let UUITabGroupElement = class extends LitElement {
240
243
  constructor() {
241
244
  super(...arguments);
245
+ __privateAdd(this, _initialize);
242
246
  __privateAdd(this, _onResize);
243
247
  __privateAdd(this, _cleanupTabs);
244
248
  __privateAdd(this, _onSlotChange);
@@ -282,12 +286,7 @@ let UUITabGroupElement = class extends LitElement {
282
286
  }
283
287
  connectedCallback() {
284
288
  super.connectedCallback();
285
- demandCustomElement(this, "uui-button");
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");
289
+ __privateMethod(this, _initialize, initialize_fn).call(this);
291
290
  }
292
291
  disconnectedCallback() {
293
292
  super.disconnectedCallback();
@@ -328,6 +327,16 @@ _visibilityBreakpoints = new WeakMap();
328
327
  _resizeObserver = new WeakMap();
329
328
  _tabResizeObservers = new WeakMap();
330
329
  _breakPointCalculationInProgress = new WeakMap();
330
+ _initialize = new WeakSet();
331
+ initialize_fn = async function() {
332
+ demandCustomElement(this, "uui-button");
333
+ demandCustomElement(this, "uui-popover-container");
334
+ demandCustomElement(this, "uui-symbol-more");
335
+ if (!this.hasAttribute("role"))
336
+ this.setAttribute("role", "tablist");
337
+ await this.updateComplete;
338
+ __privateGet(this, _resizeObserver).observe(this._mainElement);
339
+ };
331
340
  _onResize = new WeakSet();
332
341
  onResize_fn = function(entries) {
333
342
  const gapCSSVar = Number.parseFloat(
@@ -384,8 +393,8 @@ calculateBreakPoints_fn = async function() {
384
393
  childrenWidth += gap;
385
394
  }
386
395
  const tolerance = 2;
387
- this.style.maxWidth = childrenWidth - gap + tolerance + "px";
388
- __privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, this.offsetWidth);
396
+ this._mainElement.style.width = childrenWidth - gap + tolerance + "px";
397
+ __privateMethod(this, _updateCollapsibleTabs, updateCollapsibleTabs_fn).call(this, this._mainElement.offsetWidth);
389
398
  };
390
399
  _setTabArray = new WeakSet();
391
400
  setTabArray_fn = function() {
@@ -439,12 +448,15 @@ isElementTabLike_fn = function(el) {
439
448
  UUITabGroupElement.styles = [
440
449
  css`
441
450
  :host {
442
- width: 100%;
451
+ min-width: 0;
452
+ display: flex;
453
+ height: 100%;
443
454
  }
444
455
 
445
456
  #main {
446
457
  display: flex;
447
458
  justify-content: space-between;
459
+ overflow: hidden;
448
460
  }
449
461
 
450
462
  #grid {
@@ -511,12 +523,16 @@ UUITabGroupElement.styles = [
511
523
  height: 0px;
512
524
  border-radius: 3px 3px 0 0;
513
525
  opacity: 0;
514
- transition: opacity ease-in 120ms, height ease-in 120ms;
526
+ transition:
527
+ opacity ease-in 120ms,
528
+ height ease-in 120ms;
515
529
  }
516
530
  #more-button.active-inside::before {
517
531
  opacity: 1;
518
532
  height: 4px;
519
- transition: opacity 120ms, height ease-out 120ms;
533
+ transition:
534
+ opacity 120ms,
535
+ height ease-out 120ms;
520
536
  }
521
537
  `
522
538
  ];
@@ -526,6 +542,9 @@ __decorateClass([
526
542
  __decorateClass([
527
543
  query("#popover-container")
528
544
  ], UUITabGroupElement.prototype, "_popoverContainerElement", 2);
545
+ __decorateClass([
546
+ query("#main")
547
+ ], UUITabGroupElement.prototype, "_mainElement", 2);
529
548
  __decorateClass([
530
549
  queryAssignedElements({
531
550
  flatten: true,
@@ -12,6 +12,7 @@ export declare class UUITabGroupElement extends LitElement {
12
12
  #private;
13
13
  private _moreButtonElement;
14
14
  private _popoverContainerElement;
15
+ private _mainElement;
15
16
  private _slottedNodes?;
16
17
  /**
17
18
  * Set the flex direction of the content of the dropdown.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-tabs",
3
- "version": "1.6.0",
3
+ "version": "1.7.0-rc.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,13 +30,13 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.6.0",
34
- "@umbraco-ui/uui-button": "1.6.0",
35
- "@umbraco-ui/uui-popover-container": "1.6.0",
36
- "@umbraco-ui/uui-symbol-more": "1.6.0"
33
+ "@umbraco-ui/uui-base": "1.7.0-rc.0",
34
+ "@umbraco-ui/uui-button": "1.7.0-rc.0",
35
+ "@umbraco-ui/uui-popover-container": "1.7.0-rc.0",
36
+ "@umbraco-ui/uui-symbol-more": "1.7.0-rc.0"
37
37
  },
38
38
  "scripts": {
39
- "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
39
+ "build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
40
40
  "clean": "tsc --build --clean && rimraf -g dist lib/*.js lib/**/*.js *.tgz lib/**/*.d.ts custom-elements.json",
41
41
  "analyze": "web-component-analyzer **/*.element.ts --outFile custom-elements.json"
42
42
  },
@@ -44,5 +44,5 @@
44
44
  "access": "public"
45
45
  },
46
46
  "homepage": "https://uui.umbraco.com/?path=/story/uui-tabs",
47
- "gitHead": "b06aebbb67ff67c9611a19927ec3ef484edcb1cc"
47
+ "gitHead": "a7166e62b37b609e74b96821d397c694a5f42458"
48
48
  }