@umbraco-ui/uui-range-slider 1.7.0 → 1.8.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.
@@ -68,7 +68,7 @@
68
68
  "name": "pristine",
69
69
  "description": "Determines wether the form control has been touched or interacted with, this determines wether the validation-status of this form control should be made visible.",
70
70
  "type": "boolean",
71
- "default": "\"false\""
71
+ "default": "\"true\""
72
72
  },
73
73
  {
74
74
  "name": "required",
@@ -182,7 +182,7 @@
182
182
  "attribute": "pristine",
183
183
  "description": "Determines wether the form control has been touched or interacted with, this determines wether the validation-status of this form control should be made visible.",
184
184
  "type": "boolean",
185
- "default": "\"false\""
185
+ "default": "\"true\""
186
186
  },
187
187
  {
188
188
  "name": "required",
@@ -217,7 +217,8 @@
217
217
  "type": "ValidityState"
218
218
  },
219
219
  {
220
- "name": "validationMessage"
220
+ "name": "validationMessage",
221
+ "type": "string"
221
222
  }
222
223
  ],
223
224
  "events": [
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
2
2
  import { LitElement, html, svg, css } from 'lit';
3
- import { FormControlMixin } from '@umbraco-ui/uui-base/lib/mixins';
3
+ import { UUIFormControlMixin } from '@umbraco-ui/uui-base/lib/mixins';
4
4
  import { property, state, query } from 'lit/decorators.js';
5
5
  import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
6
6
  import { clamp } from '@umbraco-ui/uui-base/lib/utils';
@@ -49,7 +49,7 @@ const Z_INDEX = {
49
49
  const THUMB_SIZE = 18;
50
50
  const TRACK_PADDING = 12;
51
51
  const STEP_MIN_WIDTH = 24;
52
- let UUIRangeSliderElement = class extends FormControlMixin(LitElement) {
52
+ let UUIRangeSliderElement = class extends UUIFormControlMixin(LitElement, "") {
53
53
  /** Constructor and Validator */
54
54
  constructor() {
55
55
  super();
@@ -186,7 +186,7 @@ let UUIRangeSliderElement = class extends FormControlMixin(LitElement) {
186
186
  __privateMethod(this, _transferValueToInternalValues, transferValueToInternalValues_fn).call(this);
187
187
  }
188
188
  get value() {
189
- return this._value;
189
+ return super.value;
190
190
  }
191
191
  set value(newVal) {
192
192
  super.value = newVal;
@@ -221,6 +221,14 @@ let UUIRangeSliderElement = class extends FormControlMixin(LitElement) {
221
221
  getFormElement() {
222
222
  return this._currentFocus ? this._currentFocus : this._inputLow;
223
223
  }
224
+ async focus() {
225
+ await this.updateComplete;
226
+ this.getFormElement().focus();
227
+ }
228
+ async blur() {
229
+ await this.updateComplete;
230
+ this.getFormElement().blur();
231
+ }
224
232
  connectedCallback() {
225
233
  super.connectedCallback();
226
234
  if (!this.value) {
@@ -1,10 +1,11 @@
1
1
  import { LitElement } from 'lit';
2
- declare const UUIRangeSliderElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").FormControlMixinInterface) & typeof LitElement;
2
+ declare const UUIRangeSliderElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").UUIFormControlMixinElement<FormDataEntryValue | FormData>) & typeof LitElement;
3
3
  /**
4
4
  * @element uui-range-slider
5
5
  * @description - Range slider with two handles. Use uui-slider for a single handle.
6
6
  * @fires UUIRangeSliderEvent#input on input
7
7
  * @fires UUIRangeSliderEvent#change on change
8
+ * @extends UUIFormControlMixin
8
9
  */
9
10
  export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
10
11
  #private;
@@ -94,6 +95,8 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
94
95
  protected setValueHigh(high: number): void;
95
96
  protected setValue(low: number, high: number, lockValueRange?: boolean): void;
96
97
  protected getFormElement(): HTMLInputElement;
98
+ focus(): Promise<void>;
99
+ blur(): Promise<void>;
97
100
  /** Elements */
98
101
  private _outerTrack;
99
102
  private _inputLow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-range-slider",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,7 +30,7 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.7.0"
33
+ "@umbraco-ui/uui-base": "1.8.0"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
@@ -41,5 +41,5 @@
41
41
  "access": "public"
42
42
  },
43
43
  "homepage": "https://uui.umbraco.com/?path=/story/uui-range-slider",
44
- "gitHead": "1f139dc2b4ed9ba7b9fb1af5e934589d7c4d8f06"
44
+ "gitHead": "53021762a52dc54a46f0c5ef829c1cbaabde1160"
45
45
  }