@momentum-design/components 0.104.5 → 0.104.6
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 +268 -263
- package/dist/browser/index.js.map +4 -4
- package/dist/components/slider/index.d.ts +7 -0
- package/dist/components/slider/index.js +4 -0
- package/dist/components/slider/slider.component.d.ts +120 -0
- package/dist/components/slider/slider.component.js +189 -0
- package/dist/components/slider/slider.constants.d.ts +2 -0
- package/dist/components/slider/slider.constants.js +3 -0
- package/dist/components/slider/slider.styles.d.ts +2 -0
- package/dist/components/slider/slider.styles.js +7 -0
- package/dist/components/slider/slider.types.d.ts +3 -0
- package/dist/components/slider/slider.types.js +2 -0
- package/dist/custom-elements.json +3312 -2800
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +5 -4
- package/dist/react/index.js +5 -4
- package/dist/react/slider/index.d.ts +12 -0
- package/dist/react/slider/index.js +21 -0
- package/package.json +1 -1
@@ -0,0 +1,120 @@
|
|
1
|
+
import { CSSResult } from 'lit';
|
2
|
+
import { Component } from '../../models';
|
3
|
+
/**
|
4
|
+
* slider component, which ...
|
5
|
+
*
|
6
|
+
* @tagname mdc-slider
|
7
|
+
*
|
8
|
+
* @slot default - This is a default/unnamed slot
|
9
|
+
*
|
10
|
+
* @cssproperty --custom-property-name - Description of the CSS custom property
|
11
|
+
*/
|
12
|
+
declare class Slider extends Component {
|
13
|
+
/**
|
14
|
+
* Whether or not to show a value range. When false, the slider displays a slide-able handle for the value property; when true, it displays slide-able handles for the valueStart and valueEnd properties.
|
15
|
+
*/
|
16
|
+
range: boolean;
|
17
|
+
/**
|
18
|
+
* Whether the slider is disabled.
|
19
|
+
*/
|
20
|
+
disabled?: boolean;
|
21
|
+
/**
|
22
|
+
* Acts similar to disabled, but component is focusable and tooltip is shown on focus.
|
23
|
+
*/
|
24
|
+
softDisabled?: boolean;
|
25
|
+
/**
|
26
|
+
* Icon that represents the minimum value; ex: muted speaker.
|
27
|
+
*/
|
28
|
+
leadingIcon?: string;
|
29
|
+
/**
|
30
|
+
* Icon that represents the maximum value; ex: speaker with full volume.
|
31
|
+
*/
|
32
|
+
trailingIcon?: string;
|
33
|
+
/**
|
34
|
+
* The slider minimum value.
|
35
|
+
*/
|
36
|
+
min: number;
|
37
|
+
/**
|
38
|
+
* The slider maximum value.
|
39
|
+
*/
|
40
|
+
max: number;
|
41
|
+
/**
|
42
|
+
* The slider value displayed when range is false.
|
43
|
+
*/
|
44
|
+
value?: number;
|
45
|
+
/**
|
46
|
+
* The slider start value displayed when range is true.
|
47
|
+
*/
|
48
|
+
valueStart?: number;
|
49
|
+
/**
|
50
|
+
* The slider end value displayed when range is true.
|
51
|
+
*/
|
52
|
+
valueEnd?: number;
|
53
|
+
/**
|
54
|
+
* The step between values. This will show tick marks and the stepper will snap to the nearest tick mark.
|
55
|
+
*/
|
56
|
+
step: number;
|
57
|
+
/**
|
58
|
+
* It represents the label for slider component.
|
59
|
+
*/
|
60
|
+
label?: string;
|
61
|
+
/**
|
62
|
+
* The label text is shown below the slider (on leading side) representing the minimum starting value of the slider.
|
63
|
+
*/
|
64
|
+
labelStart?: string;
|
65
|
+
/**
|
66
|
+
* The label text is shown below the slider (on trailing side) representing the maximum starting value of the slider.
|
67
|
+
*/
|
68
|
+
labelEnd?: string;
|
69
|
+
/**
|
70
|
+
* An optional label for the slider's value displayed when range is false; if not set, the label is the value itself.
|
71
|
+
*/
|
72
|
+
valueLabel: string;
|
73
|
+
/**
|
74
|
+
* An optional label for the slider's start value displayed when range is true; if not set, the label is the valueStart itself.
|
75
|
+
*/
|
76
|
+
valueLabelStart: string;
|
77
|
+
/**
|
78
|
+
* An optional label for the slider's end value displayed when range is true; if not set, the label is the valueEnd itself.
|
79
|
+
*/
|
80
|
+
valueLabelEnd: string;
|
81
|
+
/**
|
82
|
+
* Aria label for the slider's start handle displayed when range is true.
|
83
|
+
*/
|
84
|
+
ariaLabelStart: string;
|
85
|
+
/**
|
86
|
+
* Aria value text for the slider's start value displayed when range is true.
|
87
|
+
*/
|
88
|
+
ariaValuetextStart: string;
|
89
|
+
/**
|
90
|
+
* Aria label for the slider's end handle displayed when range is true.
|
91
|
+
*/
|
92
|
+
ariaLabelEnd: string;
|
93
|
+
/**
|
94
|
+
* Aria value text for the slider's end value displayed when range is true.
|
95
|
+
*/
|
96
|
+
ariaValuetextEnd: string;
|
97
|
+
/**
|
98
|
+
* Name attribute for the slider (single value).
|
99
|
+
*/
|
100
|
+
name?: string;
|
101
|
+
/**
|
102
|
+
* Name attribute for the slider's start handle (range).
|
103
|
+
*/
|
104
|
+
nameStart?: string;
|
105
|
+
/**
|
106
|
+
* Name attribute for the slider's end handle (range).
|
107
|
+
*/
|
108
|
+
nameEnd?: string;
|
109
|
+
/**
|
110
|
+
* Aria value text for the slider's value displayed when range is false.
|
111
|
+
*/
|
112
|
+
dataAriaValuetext: string;
|
113
|
+
/**
|
114
|
+
* Aria label for the slider's handle displayed when range is false.
|
115
|
+
*/
|
116
|
+
dataAriaLabel: string;
|
117
|
+
render(): import("lit-html").TemplateResult<1>;
|
118
|
+
static styles: Array<CSSResult>;
|
119
|
+
}
|
120
|
+
export default Slider;
|
@@ -0,0 +1,189 @@
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
import { html } from 'lit';
|
11
|
+
import { property } from 'lit/decorators.js';
|
12
|
+
import { Component } from '../../models';
|
13
|
+
import styles from './slider.styles';
|
14
|
+
/**
|
15
|
+
* slider component, which ...
|
16
|
+
*
|
17
|
+
* @tagname mdc-slider
|
18
|
+
*
|
19
|
+
* @slot default - This is a default/unnamed slot
|
20
|
+
*
|
21
|
+
* @cssproperty --custom-property-name - Description of the CSS custom property
|
22
|
+
*/
|
23
|
+
class Slider extends Component {
|
24
|
+
constructor() {
|
25
|
+
super(...arguments);
|
26
|
+
/**
|
27
|
+
* Whether or not to show a value range. When false, the slider displays a slide-able handle for the value property; when true, it displays slide-able handles for the valueStart and valueEnd properties.
|
28
|
+
*/
|
29
|
+
this.range = false;
|
30
|
+
/**
|
31
|
+
* The slider minimum value.
|
32
|
+
*/
|
33
|
+
this.min = 0;
|
34
|
+
/**
|
35
|
+
* The slider maximum value.
|
36
|
+
*/
|
37
|
+
this.max = 100;
|
38
|
+
/**
|
39
|
+
* The step between values. This will show tick marks and the stepper will snap to the nearest tick mark.
|
40
|
+
*/
|
41
|
+
this.step = 1;
|
42
|
+
/**
|
43
|
+
* An optional label for the slider's value displayed when range is false; if not set, the label is the value itself.
|
44
|
+
*/
|
45
|
+
this.valueLabel = '';
|
46
|
+
/**
|
47
|
+
* An optional label for the slider's start value displayed when range is true; if not set, the label is the valueStart itself.
|
48
|
+
*/
|
49
|
+
this.valueLabelStart = '';
|
50
|
+
/**
|
51
|
+
* An optional label for the slider's end value displayed when range is true; if not set, the label is the valueEnd itself.
|
52
|
+
*/
|
53
|
+
this.valueLabelEnd = '';
|
54
|
+
/**
|
55
|
+
* Aria label for the slider's start handle displayed when range is true.
|
56
|
+
*/
|
57
|
+
this.ariaLabelStart = '';
|
58
|
+
/**
|
59
|
+
* Aria value text for the slider's start value displayed when range is true.
|
60
|
+
*/
|
61
|
+
this.ariaValuetextStart = '';
|
62
|
+
/**
|
63
|
+
* Aria label for the slider's end handle displayed when range is true.
|
64
|
+
*/
|
65
|
+
this.ariaLabelEnd = '';
|
66
|
+
/**
|
67
|
+
* Aria value text for the slider's end value displayed when range is true.
|
68
|
+
*/
|
69
|
+
this.ariaValuetextEnd = '';
|
70
|
+
/**
|
71
|
+
* Aria value text for the slider's value displayed when range is false.
|
72
|
+
*/
|
73
|
+
this.dataAriaValuetext = '';
|
74
|
+
/**
|
75
|
+
* Aria label for the slider's handle displayed when range is false.
|
76
|
+
*/
|
77
|
+
this.dataAriaLabel = '';
|
78
|
+
}
|
79
|
+
render() {
|
80
|
+
return html `<p>This is a dummy slider component!</p>
|
81
|
+
<slot></slot>`;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
Slider.styles = [...Component.styles, ...styles];
|
85
|
+
__decorate([
|
86
|
+
property({ type: Boolean }),
|
87
|
+
__metadata("design:type", Object)
|
88
|
+
], Slider.prototype, "range", void 0);
|
89
|
+
__decorate([
|
90
|
+
property({ type: Boolean }),
|
91
|
+
__metadata("design:type", Boolean)
|
92
|
+
], Slider.prototype, "disabled", void 0);
|
93
|
+
__decorate([
|
94
|
+
property({ type: Boolean, attribute: 'soft-disabled' }),
|
95
|
+
__metadata("design:type", Boolean)
|
96
|
+
], Slider.prototype, "softDisabled", void 0);
|
97
|
+
__decorate([
|
98
|
+
property({ type: String, attribute: 'leading-icon' }),
|
99
|
+
__metadata("design:type", String)
|
100
|
+
], Slider.prototype, "leadingIcon", void 0);
|
101
|
+
__decorate([
|
102
|
+
property({ type: String, attribute: 'trailing-icon' }),
|
103
|
+
__metadata("design:type", String)
|
104
|
+
], Slider.prototype, "trailingIcon", void 0);
|
105
|
+
__decorate([
|
106
|
+
property({ type: Number }),
|
107
|
+
__metadata("design:type", Object)
|
108
|
+
], Slider.prototype, "min", void 0);
|
109
|
+
__decorate([
|
110
|
+
property({ type: Number }),
|
111
|
+
__metadata("design:type", Object)
|
112
|
+
], Slider.prototype, "max", void 0);
|
113
|
+
__decorate([
|
114
|
+
property({ type: Number }),
|
115
|
+
__metadata("design:type", Number)
|
116
|
+
], Slider.prototype, "value", void 0);
|
117
|
+
__decorate([
|
118
|
+
property({ type: Number, attribute: 'value-start' }),
|
119
|
+
__metadata("design:type", Number)
|
120
|
+
], Slider.prototype, "valueStart", void 0);
|
121
|
+
__decorate([
|
122
|
+
property({ type: Number, attribute: 'value-end' }),
|
123
|
+
__metadata("design:type", Number)
|
124
|
+
], Slider.prototype, "valueEnd", void 0);
|
125
|
+
__decorate([
|
126
|
+
property({ type: Number }),
|
127
|
+
__metadata("design:type", Object)
|
128
|
+
], Slider.prototype, "step", void 0);
|
129
|
+
__decorate([
|
130
|
+
property({ type: String }),
|
131
|
+
__metadata("design:type", String)
|
132
|
+
], Slider.prototype, "label", void 0);
|
133
|
+
__decorate([
|
134
|
+
property({ type: String, attribute: 'label-start' }),
|
135
|
+
__metadata("design:type", String)
|
136
|
+
], Slider.prototype, "labelStart", void 0);
|
137
|
+
__decorate([
|
138
|
+
property({ type: String, attribute: 'label-end' }),
|
139
|
+
__metadata("design:type", String)
|
140
|
+
], Slider.prototype, "labelEnd", void 0);
|
141
|
+
__decorate([
|
142
|
+
property({ type: String, attribute: 'value-label' }),
|
143
|
+
__metadata("design:type", String)
|
144
|
+
], Slider.prototype, "valueLabel", void 0);
|
145
|
+
__decorate([
|
146
|
+
property({ type: String, attribute: 'value-label-start' }),
|
147
|
+
__metadata("design:type", String)
|
148
|
+
], Slider.prototype, "valueLabelStart", void 0);
|
149
|
+
__decorate([
|
150
|
+
property({ type: String, attribute: 'value-label-end' }),
|
151
|
+
__metadata("design:type", String)
|
152
|
+
], Slider.prototype, "valueLabelEnd", void 0);
|
153
|
+
__decorate([
|
154
|
+
property({ type: String, attribute: 'aria-label-start' }),
|
155
|
+
__metadata("design:type", String)
|
156
|
+
], Slider.prototype, "ariaLabelStart", void 0);
|
157
|
+
__decorate([
|
158
|
+
property({ type: String, attribute: 'aria-valuetext-start' }),
|
159
|
+
__metadata("design:type", String)
|
160
|
+
], Slider.prototype, "ariaValuetextStart", void 0);
|
161
|
+
__decorate([
|
162
|
+
property({ type: String, attribute: 'aria-label-end' }),
|
163
|
+
__metadata("design:type", String)
|
164
|
+
], Slider.prototype, "ariaLabelEnd", void 0);
|
165
|
+
__decorate([
|
166
|
+
property({ type: String, attribute: 'aria-valuetext-end' }),
|
167
|
+
__metadata("design:type", String)
|
168
|
+
], Slider.prototype, "ariaValuetextEnd", void 0);
|
169
|
+
__decorate([
|
170
|
+
property({ type: String }),
|
171
|
+
__metadata("design:type", String)
|
172
|
+
], Slider.prototype, "name", void 0);
|
173
|
+
__decorate([
|
174
|
+
property({ type: String, attribute: 'name-start' }),
|
175
|
+
__metadata("design:type", String)
|
176
|
+
], Slider.prototype, "nameStart", void 0);
|
177
|
+
__decorate([
|
178
|
+
property({ type: String, attribute: 'name-end' }),
|
179
|
+
__metadata("design:type", String)
|
180
|
+
], Slider.prototype, "nameEnd", void 0);
|
181
|
+
__decorate([
|
182
|
+
property({ type: String, attribute: 'data-aria-valuetext' }),
|
183
|
+
__metadata("design:type", String)
|
184
|
+
], Slider.prototype, "dataAriaValuetext", void 0);
|
185
|
+
__decorate([
|
186
|
+
property({ type: String, attribute: 'data-aria-label' }),
|
187
|
+
__metadata("design:type", String)
|
188
|
+
], Slider.prototype, "dataAriaLabel", void 0);
|
189
|
+
export default Slider;
|