@umbraco-ui/uui-combobox 1.0.0-rc.3 → 1.0.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.
Files changed (2) hide show
  1. package/lib/index.js +14 -24
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -31,7 +31,8 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
31
31
  this._search = "";
32
32
  this._onMouseDown = () => requestAnimationFrame(() => this._input.focus());
33
33
  this._onBlur = () => requestAnimationFrame(() => {
34
- if (document.activeElement !== this) {
34
+ var _a;
35
+ if (!((_a = this.shadowRoot) == null ? void 0 : _a.activeElement)) {
35
36
  this._onClose();
36
37
  }
37
38
  });
@@ -83,6 +84,7 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
83
84
  this.value = "";
84
85
  this.search = "";
85
86
  this._input.value = this._displayValue;
87
+ this._input.focus();
86
88
  this.dispatchEvent(new UUIComboboxEvent(UUIComboboxEvent.SEARCH));
87
89
  this.dispatchEvent(new UUIComboboxEvent(UUIComboboxEvent.CHANGE));
88
90
  };
@@ -108,21 +110,20 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
108
110
  </svg>`;
109
111
  };
110
112
  this._renderClearButton = () => {
111
- return html`<uui-button
112
- id="clear-button"
113
- class=${this.value || this.search ? "--show" : ""}
114
- @click=${this._onClear}
115
- @keydown=${this._onClear}
116
- label="clear"
117
- slot="append"
118
- compact
119
- style="height: 100%;">
120
- <uui-icon name="remove" .fallback=${iconRemove.strings[0]}></uui-icon>
121
- </uui-button>`;
113
+ return this.value || this.search ? html`<uui-button
114
+ id="clear-button"
115
+ @click=${this._onClear}
116
+ @keydown=${this._onClear}
117
+ label="clear"
118
+ slot="append"
119
+ compact
120
+ style="height: 100%;">
121
+ <uui-icon name="remove" .fallback=${iconRemove.strings[0]}></uui-icon>
122
+ </uui-button>` : "";
122
123
  };
123
124
  this._renderDropdown = () => {
124
125
  return html`<div id="dropdown" slot="popover">
125
- <uui-scroll-container id="scroll-container">
126
+ <uui-scroll-container tabindex="-1" id="scroll-container">
126
127
  <slot></slot>
127
128
  </uui-scroll-container>
128
129
  </div>`;
@@ -231,17 +232,6 @@ UUIComboboxElement.styles = [
231
232
  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));
232
233
  }
233
234
 
234
- #clear-button {
235
- pointer-events: none;
236
- opacity: 0;
237
- transition: opacity 120ms;
238
- }
239
-
240
- #clear-button.--show {
241
- pointer-events: auto;
242
- opacity: 1;
243
- }
244
-
245
235
  #caret {
246
236
  margin-right: var(--uui-size-3, 9px);
247
237
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-combobox",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,11 +30,11 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.0.0-rc.3",
34
- "@umbraco-ui/uui-button": "1.0.0-rc.3",
35
- "@umbraco-ui/uui-combobox-list": "1.0.0-rc.3",
36
- "@umbraco-ui/uui-icon": "1.0.0-rc.3",
37
- "@umbraco-ui/uui-scroll-container": "1.0.0-rc.3"
33
+ "@umbraco-ui/uui-base": "1.0.0",
34
+ "@umbraco-ui/uui-button": "1.0.0",
35
+ "@umbraco-ui/uui-combobox-list": "1.0.0",
36
+ "@umbraco-ui/uui-icon": "1.0.0",
37
+ "@umbraco-ui/uui-scroll-container": "1.0.0"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -45,5 +45,5 @@
45
45
  "access": "public"
46
46
  },
47
47
  "homepage": "https://uui.umbraco.com/?path=/story/uui-combobox",
48
- "gitHead": "7d643a3d5f7204efbc3aaad83889c2fd5200af73"
48
+ "gitHead": "ffb9cef00262b9f36177adcca9675b4893c0045e"
49
49
  }