@umbraco-ui/uui-combobox 1.2.0 → 1.2.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.
@@ -23,6 +23,12 @@
23
23
  "type": " string ",
24
24
  "default": "\"\\\"Close\\\"\""
25
25
  },
26
+ {
27
+ "name": "disabled",
28
+ "description": "Disables the uui-combobox.",
29
+ "type": "boolean",
30
+ "default": "\"false\""
31
+ },
26
32
  {
27
33
  "name": "name",
28
34
  "description": "This is a name property of the component.",
@@ -93,6 +99,13 @@
93
99
  "type": " string ",
94
100
  "default": "\"\\\"Close\\\"\""
95
101
  },
102
+ {
103
+ "name": "disabled",
104
+ "attribute": "disabled",
105
+ "description": "Disables the uui-combobox.",
106
+ "type": "boolean",
107
+ "default": "\"false\""
108
+ },
96
109
  {
97
110
  "name": "formAssociated",
98
111
  "description": "This is a static class field indicating that the element is can be used inside a native form and participate in its events.\nIt may require a polyfill, check support here https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals.\nRead more about form controls here https://web.dev/more-capable-form-controls/",
@@ -168,7 +181,7 @@
168
181
  ],
169
182
  "slots": [
170
183
  {
171
- "name": "default",
184
+ "name": "",
172
185
  "description": "for uui-combobox-list-options"
173
186
  },
174
187
  {
package/lib/index.js CHANGED
@@ -28,6 +28,7 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
28
28
  super(...arguments);
29
29
  this.open = false;
30
30
  this.closeLabel = "Close";
31
+ this.disabled = false;
31
32
  this._displayValue = "";
32
33
  this._search = "";
33
34
  this._isPhone = false;
@@ -107,11 +108,12 @@ let UUIComboboxElement = class extends FormControlMixin(LitElement) {
107
108
  type="text"
108
109
  .value=${this._displayValue}
109
110
  autocomplete="off"
111
+ .disabled=${this.disabled}
110
112
  @click=${this._open}
111
113
  @input=${this._onInput}
112
114
  @keydown=${this._onKeyDown}>
113
115
  <slot name="input-prepend" slot="prepend"></slot>
114
- ${this._renderClearButton()} ${this._renderCaret()}
116
+ ${this.disabled ? "" : this._renderClearButton()} ${this._renderCaret()}
115
117
  <slot name="input-append" slot="append"></slot>
116
118
  </uui-input>`;
117
119
  };
@@ -268,6 +270,10 @@ UUIComboboxElement.styles = [
268
270
  margin-top: -1px;
269
271
  }
270
272
 
273
+ :host([disabled]) #caret {
274
+ fill: var(--uui-color-disabled-contrast,#c4c4c4);
275
+ }
276
+
271
277
  #phone-wrapper {
272
278
  position: fixed;
273
279
  inset: 0;
@@ -307,6 +313,9 @@ __decorateClass([
307
313
  __decorateClass([
308
314
  property({ type: String })
309
315
  ], UUIComboboxElement.prototype, "closeLabel", 2);
316
+ __decorateClass([
317
+ property({ type: Boolean, reflect: true })
318
+ ], UUIComboboxElement.prototype, "disabled", 2);
310
319
  __decorateClass([
311
320
  query("#combobox-input")
312
321
  ], UUIComboboxElement.prototype, "_input", 2);
@@ -4,7 +4,7 @@ declare const UUIComboboxElement_base: (new (...args: any[]) => import("@umbraco
4
4
  * @element uui-combobox
5
5
  * @fires {UUIComboboxEvent} input - fires when search input is changed
6
6
  * @fires {UUIComboboxEvent} change - fires when selection is changed
7
- * @slot default - for uui-combobox-list-options
7
+ * @slot - for uui-combobox-list-options
8
8
  * @slot input-prepend - prepend for the uui-input
9
9
  * @slot input-append - append for the uui-input
10
10
  * @description - Filterable combobox
@@ -35,6 +35,13 @@ export declare class UUIComboboxElement extends UUIComboboxElement_base {
35
35
  * @default "Close"
36
36
  */
37
37
  closeLabel: string;
38
+ /**
39
+ * Disables the uui-combobox.
40
+ * @type {boolean}
41
+ * @attr
42
+ * @default false
43
+ */
44
+ disabled: boolean;
38
45
  private _input;
39
46
  private _comboboxListElements?;
40
47
  private _comboboxList;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-combobox",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
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.1.0",
34
- "@umbraco-ui/uui-button": "1.1.0",
35
- "@umbraco-ui/uui-combobox-list": "1.1.0",
36
- "@umbraco-ui/uui-icon": "1.1.0",
37
- "@umbraco-ui/uui-scroll-container": "1.1.0"
33
+ "@umbraco-ui/uui-base": "1.2.1",
34
+ "@umbraco-ui/uui-button": "1.2.1",
35
+ "@umbraco-ui/uui-combobox-list": "1.2.1",
36
+ "@umbraco-ui/uui-icon": "1.2.1",
37
+ "@umbraco-ui/uui-scroll-container": "1.2.1"
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": "5159a81e353c893c30073cdbf2fdd94306477d6e"
48
+ "gitHead": "94eb22bee5ff21bac6fadbd78653671279bebe36"
49
49
  }