@api-client/ui 0.5.48 → 0.5.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@api-client/ui",
3
- "version": "0.5.48",
3
+ "version": "0.5.50",
4
4
  "description": "Internal UI component library for the API Client ecosystem.",
5
5
  "license": "UNLICENSED",
6
6
  "main": "build/src/index.js",
@@ -5,6 +5,7 @@ export default css`
5
5
  display: block;
6
6
  transition-duration: var(--ui-collapse-transition-duration, 300ms);
7
7
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
8
+ transition-property: max-height, max-width;
8
9
  overflow: visible;
9
10
  }
10
11
 
@@ -104,7 +104,7 @@ export default class UiCollapse extends UiElement {
104
104
  */
105
105
  toggle(): void {
106
106
  this.open = !this.open
107
- this.dispatchEvent(new Event('open'))
107
+ this.dispatchEvent(new Event('toggle'))
108
108
  }
109
109
 
110
110
  /**
@@ -128,8 +128,11 @@ export default class UiCollapse extends UiElement {
128
128
  // After the transition is done, _transitionEnd will set the size back to
129
129
  // `auto`.
130
130
  if (sizeValue === '') {
131
+ // Temporarily remove constraint to measure natural size
132
+ const currentMaxDimension = this.style[this.dimensionMax]
131
133
  this.style[this.dimensionMax] = ''
132
134
  sizeValue = this.calcSize()
135
+ this.style[this.dimensionMax] = currentMaxDimension
133
136
  }
134
137
  // Go to startSize without animation.
135
138