@umbraco-ui/uui-range-slider 1.10.0 → 1.11.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.
@@ -70,12 +70,6 @@
70
70
  "type": "string",
71
71
  "default": "\"0,0\""
72
72
  },
73
- {
74
- "name": "pristine",
75
- "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.",
76
- "type": "boolean",
77
- "default": "\"true\""
78
- },
79
73
  {
80
74
  "name": "required",
81
75
  "description": "Apply validation rule for requiring a value of this form control.",
@@ -99,6 +93,12 @@
99
93
  "description": "Custom error message.",
100
94
  "type": "string",
101
95
  "default": "\"This field is invalid\""
96
+ },
97
+ {
98
+ "name": "pristine",
99
+ "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.",
100
+ "type": "boolean",
101
+ "default": "\"true\""
102
102
  }
103
103
  ],
104
104
  "properties": [
@@ -190,13 +190,6 @@
190
190
  "type": "string",
191
191
  "default": "\"0,0\""
192
192
  },
193
- {
194
- "name": "pristine",
195
- "attribute": "pristine",
196
- "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.",
197
- "type": "boolean",
198
- "default": "\"true\""
199
- },
200
193
  {
201
194
  "name": "required",
202
195
  "attribute": "required",
@@ -232,6 +225,13 @@
232
225
  {
233
226
  "name": "validationMessage",
234
227
  "type": "string"
228
+ },
229
+ {
230
+ "name": "pristine",
231
+ "attribute": "pristine",
232
+ "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.",
233
+ "type": "boolean",
234
+ "default": "\"true\""
235
235
  }
236
236
  ],
237
237
  "events": [
package/lib/index.js CHANGED
@@ -39,6 +39,7 @@ const Z_INDEX = {
39
39
  BACK: 1
40
40
  };
41
41
  const THUMB_SIZE = 18;
42
+ const TRACK_HEIGHT = 3;
42
43
  const TRACK_PADDING = 12;
43
44
  const STEP_MIN_WIDTH = 24;
44
45
  let UUIRangeSliderElement = class extends UUIFormControlMixin(LitElement, "") {
@@ -405,7 +406,7 @@ let UUIRangeSliderElement = class extends UUIFormControlMixin(LitElement, "") {
405
406
  const stepPositions = new Array(stepAmount + 1).fill(stepWidth).map((stepWidth2) => stepWidth2 * index++);
406
407
  return html`<div class="step-wrapper">
407
408
  <svg height="100%" width="100%">
408
- <rect x="9" y="9" height="3" rx="2" />
409
+ <rect x="9" y="9" height="${TRACK_HEIGHT}" rx="2" />
409
410
  ${this._renderStepCircles(stepPositions)}
410
411
  </svg>
411
412
  ${this._renderStepValues(stepAmount)}
@@ -426,9 +427,9 @@ let UUIRangeSliderElement = class extends UUIFormControlMixin(LitElement, "") {
426
427
  const colorStart = this._lowInputValue - this._min;
427
428
  const colorEnd = this._highInputValue - this._min;
428
429
  if (cx / trackValue >= colorStart && cx / trackValue <= colorEnd) {
429
- return svg`<circle class="track-step filled" cx="${cx}" cy="5" r="4.5" />`;
430
+ return svg`<circle class="track-step filled" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
430
431
  } else {
431
- return svg`<circle class="track-step regular" cx="${cx}" cy="5" r="4.5" />`;
432
+ return svg`<circle class="track-step regular" cx="${cx}" cy="${TRACK_HEIGHT * 2}" r="4.5" />`;
432
433
  }
433
434
  })}`;
434
435
  }
@@ -555,16 +556,18 @@ UUIRangeSliderElement.styles = [
555
556
  }
556
557
 
557
558
  :host(:not([readonly])) #inner-color-thumb:hover .color {
558
- height: 5px;
559
+ height: ${TRACK_HEIGHT * 2}px;
559
560
  background-color: var(--color-hover);
561
+ transform: translateY(-${TRACK_HEIGHT / 2}px);
560
562
  }
561
563
 
562
564
  .color {
563
565
  user-select: none;
564
566
  position: absolute;
565
567
  inset-inline: 0;
566
- height: 3px;
567
- transform: translateY(2px);
568
+ height: ${TRACK_HEIGHT}px;
569
+ top: 50%;
570
+ transform: translateY(0);
568
571
  background-color: var(--color-interactive);
569
572
  transition: height 60ms;
570
573
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-range-slider",
3
- "version": "1.10.0",
3
+ "version": "1.11.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.10.0"
33
+ "@umbraco-ui/uui-base": "1.11.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": "fc19b5d3cd80cf4205ec56d14403ae0e926d6aed"
44
+ "gitHead": "414ce88901f82c5fc7d6be942779047bb34a1407"
45
45
  }