@momentum-design/components 0.121.3 → 0.121.4
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.
- package/dist/browser/index.js +14 -14
- package/dist/browser/index.js.map +2 -2
- package/dist/components/slider/slider.component.d.ts +4 -0
- package/dist/components/slider/slider.component.js +9 -1
- package/dist/components/slider/slider.types.d.ts +1 -1
- package/dist/custom-elements.json +880 -862
- package/dist/index.d.ts +2 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +3 -3
- package/package.json +1 -1
|
@@ -152,6 +152,10 @@ declare class Slider extends Component {
|
|
|
152
152
|
* Aria value text for the slider's end value displayed when range is true.
|
|
153
153
|
*/
|
|
154
154
|
endAriaValueText?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Whether to hide the tooltip when the thumb is focused or hovered.
|
|
157
|
+
*/
|
|
158
|
+
hideTooltip?: boolean;
|
|
155
159
|
/**
|
|
156
160
|
* Targets all the input components with type='range'
|
|
157
161
|
* @internal
|
|
@@ -214,7 +214,11 @@ class Slider extends Component {
|
|
|
214
214
|
const [inputStart, inputEnd] = this.inputElements;
|
|
215
215
|
const input = source === 'end' ? inputEnd : inputStart;
|
|
216
216
|
const value = Number(input === null || input === void 0 ? void 0 : input.value);
|
|
217
|
-
if (typeof value !== 'number' ||
|
|
217
|
+
if (typeof value !== 'number' ||
|
|
218
|
+
Number.isNaN(value) ||
|
|
219
|
+
this.max === this.min ||
|
|
220
|
+
this.disabled ||
|
|
221
|
+
this.hideTooltip) {
|
|
218
222
|
return nothing;
|
|
219
223
|
}
|
|
220
224
|
const normalizedValue = (value - this.min) / (this.max - this.min);
|
|
@@ -581,6 +585,10 @@ __decorate([
|
|
|
581
585
|
property({ reflect: true, type: String, attribute: 'end-aria-valuetext' }),
|
|
582
586
|
__metadata("design:type", String)
|
|
583
587
|
], Slider.prototype, "endAriaValueText", void 0);
|
|
588
|
+
__decorate([
|
|
589
|
+
property({ reflect: true, type: Boolean, attribute: 'hide-tooltip' }),
|
|
590
|
+
__metadata("design:type", Boolean)
|
|
591
|
+
], Slider.prototype, "hideTooltip", void 0);
|
|
584
592
|
__decorate([
|
|
585
593
|
queryAll('input[type="range"]'),
|
|
586
594
|
__metadata("design:type", Array)
|