@umbraco-ui/uui-range-slider 1.7.0-rc.0 → 1.8.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.
@@ -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,10 @@ 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(
53
+ LitElement,
54
+ ""
55
+ ) {
53
56
  /** Constructor and Validator */
54
57
  constructor() {
55
58
  super();
@@ -186,7 +189,7 @@ let UUIRangeSliderElement = class extends FormControlMixin(LitElement) {
186
189
  __privateMethod(this, _transferValueToInternalValues, transferValueToInternalValues_fn).call(this);
187
190
  }
188
191
  get value() {
189
- return this._value;
192
+ return super.value;
190
193
  }
191
194
  set value(newVal) {
192
195
  super.value = newVal;
@@ -221,6 +224,14 @@ let UUIRangeSliderElement = class extends FormControlMixin(LitElement) {
221
224
  getFormElement() {
222
225
  return this._currentFocus ? this._currentFocus : this._inputLow;
223
226
  }
227
+ async focus() {
228
+ await this.updateComplete;
229
+ this.getFormElement().focus();
230
+ }
231
+ async blur() {
232
+ await this.updateComplete;
233
+ this.getFormElement().blur();
234
+ }
224
235
  connectedCallback() {
225
236
  super.connectedCallback();
226
237
  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").UUIFormControlMixinInterface<string, unknown>) & 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;
@@ -80,8 +81,8 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
80
81
  * @attr
81
82
  * @default 0,0
82
83
  */
83
- get value(): FormDataEntryValue | FormData;
84
- set value(newVal: FormDataEntryValue | FormData);
84
+ get value(): unknown;
85
+ set value(newVal: unknown);
85
86
  private _currentFocus?;
86
87
  private _movement;
87
88
  private startPoint;
@@ -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-rc.0",
3
+ "version": "1.8.0-rc.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-rc.0"
33
+ "@umbraco-ui/uui-base": "1.8.0-rc.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": "a7166e62b37b609e74b96821d397c694a5f42458"
44
+ "gitHead": "46d444c66217c9a3c74518d8ce4badc7f121bfdf"
45
45
  }