Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript-community/ui-material-slider

Package Overview
Dependencies
Maintainers
12
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript-community/ui-material-slider - npm Package Compare versions

Comparing version 5.3.3 to 5.4.0-alpha.4

1

cssproperties.d.ts

@@ -6,1 +6,2 @@ import { Color, CssProperty, Style } from '@nativescript/core';

export declare const thumbHollowAtStartProperty: CssProperty<Style, boolean>;
export declare const stepSizeProperty: CssProperty<Style, number>;

13

cssproperties.js

@@ -6,3 +6,3 @@ import { Color, CssProperty, Style, booleanConverter } from '@nativescript/core';

equalityComparer: Color.equals,
valueConverter: v => new Color(v)
valueConverter: (v) => new Color(v)
});

@@ -14,3 +14,3 @@ trackBackgroundColorProperty.register(Style);

equalityComparer: Color.equals,
valueConverter: v => new Color(v)
valueConverter: (v) => new Color(v)
});

@@ -22,3 +22,3 @@ thumbColorProperty.register(Style);

equalityComparer: Color.equals,
valueConverter: v => new Color(v)
valueConverter: (v) => new Color(v)
});

@@ -32,2 +32,9 @@ trackFillColorProperty.register(Style);

thumbHollowAtStartProperty.register(Style);
export const stepSizeProperty = new CssProperty({
name: 'stepSize',
cssName: 'step-size',
defaultValue: 0,
valueConverter: (v) => parseFloat(v)
});
stepSizeProperty.register(Style);
//# sourceMappingURL=cssproperties.js.map
{
"name": "@nativescript-community/ui-material-slider",
"version": "5.3.3",
"version": "5.4.0-alpha.4+ef2a4482",
"description": "Material Design Sliders allow users to make selections from a range of values.",

@@ -46,5 +46,5 @@ "main": "./slider",

"dependencies": {
"@nativescript-community/ui-material-core": "^5.3.3"
"@nativescript-community/ui-material-core": "^5.4.0-alpha.4+ef2a4482"
},
"gitHead": "bbf6747f2fdbdb732bbef1e3b6075cc342198600"
"gitHead": "ef2a4482fd8fca3288e16a0973c103ef61b9e184"
}

@@ -8,2 +8,3 @@ import { Color, Slider as NSSlider } from '@nativescript/core';

elevation: number;
stepSize: number;
}

@@ -25,2 +25,6 @@ import { CSSType, Color, Slider as NSSlider } from '@nativescript/core';

], SliderBase.prototype, "elevation", void 0);
__decorate([
cssProperty,
__metadata("design:type", Number)
], SliderBase.prototype, "stepSize", void 0);
SliderBase = __decorate([

@@ -27,0 +31,0 @@ CSSType('MDSlider')

@@ -12,2 +12,3 @@ import { CoercibleProperty, Color, Property, View } from '@nativescript/core';

thumbColor: Color;
stepSize: number;
elevation: number;

@@ -14,0 +15,0 @@ _supressNativeValue: boolean;

import { cssProperty, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
import { getEnabledColorStateList } from '@nativescript-community/ui-material-core/android/utils';
import { CoercibleProperty, Color, Property, View, backgroundColorProperty, backgroundInternalProperty, colorProperty } from '@nativescript/core';
import { thumbColorProperty, trackBackgroundColorProperty, trackFillColorProperty } from './cssproperties';
import { stepSizeProperty, thumbColorProperty, trackBackgroundColorProperty, trackFillColorProperty } from './cssproperties';
let ASlider;

@@ -98,3 +98,11 @@ export function sliderGetEnabledColorStateList(color, alpha = 255) {

}
[stepSizeProperty.getDefault]() {
return 0;
}
[stepSizeProperty.setNative](value) {
this.nativeViewProtected.setStepSize(value);
}
[valueProperty.setNative](value) {
this.nativeViewProtected.setValueFrom(this.minValue);
this.nativeViewProtected.setValueTo(this.maxValue);
this.nativeViewProtected.setValue(value);

@@ -154,2 +162,6 @@ }

__metadata("design:type", Number)
], Slider.prototype, "stepSize", void 0);
__decorate([
cssProperty,
__metadata("design:type", Number)
], Slider.prototype, "elevation", void 0);

@@ -156,0 +168,0 @@ valueProperty.register(Slider);

import { elevationProperty, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
import { Color, backgroundColorProperty, colorProperty } from '@nativescript/core';
import { thumbColorProperty, thumbHollowAtStartProperty, trackBackgroundColorProperty, trackFillColorProperty } from './cssproperties';
import { maxValueProperty } from '@nativescript/core/ui/progress';
import { minValueProperty } from '@nativescript/core/ui/slider/slider-common';
import { stepSizeProperty, thumbColorProperty, thumbHollowAtStartProperty, trackBackgroundColorProperty, trackFillColorProperty } from './cssproperties';
import { SliderBase } from './slider-common';

@@ -54,3 +56,28 @@ export class Slider extends SliderBase {

}
[minValueProperty.setNative](value) {
this.nativeViewProtected.minimumValue = value;
if (this.stepSize !== 0) {
this.nativeViewProtected.numberOfDiscreteValues = (this.maxValue - this.minValue) / value;
}
}
[maxValueProperty.setNative](value) {
this.nativeViewProtected.maximumValue = value;
if (this.stepSize !== 0) {
this.nativeViewProtected.numberOfDiscreteValues = (this.maxValue - this.minValue) / value;
}
}
[stepSizeProperty.getDefault]() {
return 0;
}
[stepSizeProperty.setNative](value) {
if (value === 0) {
this.nativeViewProtected.discrete = false;
}
else {
this.nativeViewProtected.discrete = true;
this.nativeViewProtected.numberOfDiscreteValues = (this.maxValue - this.minValue) / value;
this.nativeViewProtected.shouldDisplayDiscreteValueLabel = false;
}
}
}
//# sourceMappingURL=slider.ios.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc