@instructure/ui-range-input 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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.
@@ -1,28 +1,5 @@
1
- var _dec, _dec2, _class;
2
- /*
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) 2015 - present Instructure, Inc.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
-
1
+ import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
26
3
  import { Component } from 'react';
27
4
  import { warn } from '@instructure/console';
28
5
  import { ContextView } from '@instructure/ui-view/latest';
@@ -32,165 +9,150 @@ import { withStyleNew } from '@instructure/emotion';
32
9
  import { omitProps, pickProps, withDeterministicId } from '@instructure/ui-react-utils';
33
10
  import generateStyle from './styles.js';
34
11
  import { allowedProps } from './props.js';
35
-
36
- /**
37
- ---
38
- category: components
39
- ---
40
- **/
41
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
42
- let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle), _dec(_class = _dec2(_class = class RangeInput extends Component {
43
- static displayName = 'RangeInput';
44
- static componentId = 'RangeInput';
45
- static outputLocatorAttribute = 'data-range-output';
46
- static allowedProps = allowedProps;
47
- static defaultProps = {
48
- step: 1,
49
- formatValue: val => val,
50
- // If min and max has default value, they don't give a warning if not set, even if they are required props.
51
- // TODO: figure out if they don't need to be required or remove defaults in V9.
52
- max: 0,
53
- min: 0,
54
- inline: false,
55
- size: 'medium',
56
- layout: 'stacked',
57
- displayValue: true,
58
- disabled: false,
59
- readOnly: false
60
- };
61
- ref = null;
62
- _input = null;
63
- _inputListener = null;
64
- _changeListener = null;
65
- defaultId;
66
- handleRef = el => {
67
- this.ref = el;
68
- };
69
- handleInputRef = el => {
70
- this._input = el;
71
- if (typeof this.props.inputRef === 'function') {
72
- this.props.inputRef(el);
12
+ class RangeInput extends Component {
13
+ static{
14
+ this.displayName = 'RangeInput';
15
+ }
16
+ static{
17
+ this.componentId = 'RangeInput';
18
+ }
19
+ static{
20
+ this.outputLocatorAttribute = 'data-range-output';
73
21
  }
74
- };
75
- constructor(props) {
76
- super(props);
77
- if (typeof props.value === 'undefined') {
78
- this.state = {
79
- value: props.defaultValue
80
- };
22
+ static{
23
+ this.allowedProps = allowedProps;
81
24
  }
82
- this.defaultId = props.deterministicId();
83
- }
84
-
85
- /* workaround for https://github.com/facebook/react/issues/554 */
86
- componentDidMount() {
87
- this.props.makeStyles?.();
88
- if (this._input !== null) {
89
- // https://connect.microsoft.com/IE/Feedback/Details/856998
90
- this._inputListener = addEventListener(this._input, 'input', this.handleChange);
91
- this._changeListener = addEventListener(this._input, 'change', this.handleChange);
25
+ static{
26
+ this.defaultProps = {
27
+ step: 1,
28
+ formatValue: (val)=>val,
29
+ max: 0,
30
+ min: 0,
31
+ inline: false,
32
+ size: 'medium',
33
+ layout: 'stacked',
34
+ displayValue: true,
35
+ disabled: false,
36
+ readOnly: false
37
+ };
92
38
  }
93
- }
94
- componentWillUnmount() {
95
- if (!this._input) {
96
- return;
39
+ constructor(props){
40
+ super(props), this.ref = null, this._input = null, this._inputListener = null, this._changeListener = null, this.handleRef = (el)=>{
41
+ this.ref = el;
42
+ }, this.handleInputRef = (el)=>{
43
+ this._input = el;
44
+ if (typeof this.props.inputRef === 'function') {
45
+ this.props.inputRef(el);
46
+ }
47
+ }, this.handleChange = (event)=>{
48
+ const { onChange, value } = this.props;
49
+ if (typeof value === 'undefined') {
50
+ this.setState({
51
+ value: event.target.value
52
+ });
53
+ }
54
+ if (typeof onChange === 'function') {
55
+ onChange(event.target.value);
56
+ }
57
+ }, this.noopChange = ()=>{};
58
+ if (typeof props.value === 'undefined') {
59
+ this.state = {
60
+ value: props.defaultValue
61
+ };
62
+ }
63
+ this.defaultId = props.deterministicId();
97
64
  }
98
- this._inputListener?.remove();
99
- this._changeListener?.remove();
100
- }
101
- /* end workaround */
102
-
103
- componentDidUpdate() {
104
- this.props.makeStyles?.();
105
- }
106
- handleChange = event => {
107
- const {
108
- onChange,
109
- value
110
- } = this.props;
111
- if (typeof value === 'undefined') {
112
- this.setState({
113
- value: event.target.value
114
- });
65
+ componentDidMount() {
66
+ this.props.makeStyles?.();
67
+ if (this._input !== null) {
68
+ this._inputListener = addEventListener(this._input, 'input', this.handleChange);
69
+ this._changeListener = addEventListener(this._input, 'change', this.handleChange);
70
+ }
115
71
  }
116
- if (typeof onChange === 'function') {
117
- onChange(event.target.value);
72
+ componentWillUnmount() {
73
+ if (!this._input) {
74
+ return;
75
+ }
76
+ this._inputListener?.remove();
77
+ this._changeListener?.remove();
118
78
  }
119
- };
120
-
121
- // controlled input must have an onChange, but we're handling it with native events
122
- noopChange = () => {};
123
- get value() {
124
- const value = typeof this.props.value === 'undefined' ? this.state.value : this.props.value;
125
- return typeof value === 'string' ? parseInt(value) : value;
126
- }
127
- get id() {
128
- return this.props.id || this.defaultId;
129
- }
130
- renderValue() {
131
- if (this.props.displayValue) {
132
- if (!this.value) {
133
- warn(false, 'RangeInput should have a `value` or `defaultValue` set for the value to be displayed. If no value has to be displayed, set `displayValue={false}`.');
79
+ componentDidUpdate() {
80
+ this.props.makeStyles?.();
81
+ }
82
+ get value() {
83
+ const value = typeof this.props.value === 'undefined' ? this.state.value : this.props.value;
84
+ return typeof value === 'string' ? parseInt(value) : value;
85
+ }
86
+ get id() {
87
+ return this.props.id || this.defaultId;
88
+ }
89
+ renderValue() {
90
+ if (this.props.displayValue) {
91
+ if (!this.value) {
92
+ warn(false, 'RangeInput should have a `value` or `defaultValue` set for the value to be displayed. If no value has to be displayed, set `displayValue={false}`.');
93
+ return null;
94
+ }
95
+ const props = {
96
+ [RangeInput.outputLocatorAttribute]: this.id
97
+ };
98
+ return /*#__PURE__*/ _jsx(ContextView, {
99
+ background: "inverse",
100
+ placement: "end center",
101
+ children: /*#__PURE__*/ _jsx("div", {
102
+ ...props,
103
+ css: this.props.styles?.rangeInputInputValue,
104
+ children: this.props.formatValue(this.value, this.props.max)
105
+ })
106
+ });
107
+ }
134
108
  return null;
135
- }
136
- const props = {
137
- [RangeInput.outputLocatorAttribute]: this.id
138
- };
139
- return _jsx(ContextView, {
140
- background: "inverse",
141
- placement: "end center",
142
- children: _jsx("div", {
143
- ...props,
144
- css: this.props.styles?.rangeInputInputValue,
145
- children: this.props.formatValue(this.value, this.props.max)
146
- })
147
- });
148
109
  }
149
- return null;
150
- }
151
- render() {
152
- const {
153
- formatValue,
154
- disabled,
155
- readOnly,
156
- messages
157
- } = this.props;
158
- const props = omitProps(this.props, RangeInput.allowedProps);
159
- const hasMessages = !!messages?.some(m => !!m.text);
160
- const messagesId = `${this.id}-messages`;
161
- const labelId = `${this.id}-label`;
162
- return _jsx(FormField, {
163
- ...pickProps(this.props, FormField.allowedProps),
164
- label: this.props.label,
165
- messagesId: messagesId,
166
- labelId: labelId,
167
- id: this.id,
168
- elementRef: this.handleRef,
169
- "data-cid": "RangeInput",
170
- children: _jsxs("div", {
171
- css: this.props.styles?.rangeInput,
172
- children: [_jsx("input", {
173
- css: this.props.styles?.rangeInputInput,
174
- ref: this.handleInputRef,
175
- type: "range",
176
- id: this.id,
177
- min: this.props.min,
178
- max: this.props.max,
179
- step: this.props.step,
180
- value: this.value,
181
- onChange: this.noopChange,
182
- "aria-valuetext": formatValue(this.value, this.props.max),
183
- ...props,
184
- disabled: disabled || readOnly,
185
- "aria-disabled": disabled || readOnly ? 'true' : undefined
186
- // Keep messages in the description so the accessible name contains only the label.
187
- ,
188
- "aria-describedby": [props['aria-describedby'], hasMessages ? messagesId : null].filter(Boolean).join(' ') || undefined,
189
- "aria-labelledby": hasMessages ? props['aria-labelledby'] || labelId : props['aria-labelledby']
190
- }), this.renderValue()]
191
- })
192
- });
193
- }
194
- }) || _class) || _class);
110
+ render() {
111
+ const { formatValue, disabled, readOnly, messages } = this.props;
112
+ const props = omitProps(this.props, RangeInput.allowedProps);
113
+ const hasMessages = !!messages?.some((m)=>!!m.text);
114
+ const messagesId = `${this.id}-messages`;
115
+ const labelId = `${this.id}-label`;
116
+ return /*#__PURE__*/ _jsx(FormField, {
117
+ ...pickProps(this.props, FormField.allowedProps),
118
+ label: this.props.label,
119
+ messagesId: messagesId,
120
+ labelId: labelId,
121
+ id: this.id,
122
+ elementRef: this.handleRef,
123
+ "data-cid": "RangeInput",
124
+ children: /*#__PURE__*/ _jsxs("div", {
125
+ css: this.props.styles?.rangeInput,
126
+ children: [
127
+ /*#__PURE__*/ _jsx("input", {
128
+ css: this.props.styles?.rangeInputInput,
129
+ ref: this.handleInputRef,
130
+ type: "range",
131
+ id: this.id,
132
+ min: this.props.min,
133
+ max: this.props.max,
134
+ step: this.props.step,
135
+ value: this.value,
136
+ onChange: this.noopChange,
137
+ "aria-valuetext": formatValue(this.value, this.props.max),
138
+ ...props,
139
+ disabled: disabled || readOnly,
140
+ "aria-disabled": disabled || readOnly ? 'true' : undefined,
141
+ "aria-describedby": [
142
+ props['aria-describedby'],
143
+ hasMessages ? messagesId : null
144
+ ].filter(Boolean).join(' ') || undefined,
145
+ "aria-labelledby": hasMessages ? props['aria-labelledby'] || labelId : props['aria-labelledby']
146
+ }),
147
+ this.renderValue()
148
+ ]
149
+ })
150
+ });
151
+ }
152
+ }
153
+ RangeInput = _ts_decorate([
154
+ withDeterministicId(),
155
+ withStyleNew(generateStyle)
156
+ ], RangeInput);
195
157
  export default RangeInput;
196
- export { RangeInput };
158
+ export { RangeInput };
@@ -1,26 +1,21 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const allowedProps = ['min', 'max', 'defaultValue', 'value', 'onChange', 'messages', 'size', 'layout', 'id', 'label', 'displayValue', 'step', 'formatValue', 'inline', 'disabled', 'readOnly', 'margin', 'inputRef'];
26
- export { allowedProps };
1
+ const allowedProps = [
2
+ 'min',
3
+ 'max',
4
+ 'defaultValue',
5
+ 'value',
6
+ 'onChange',
7
+ 'messages',
8
+ 'size',
9
+ 'layout',
10
+ 'id',
11
+ 'label',
12
+ 'displayValue',
13
+ 'step',
14
+ 'formatValue',
15
+ 'inline',
16
+ 'disabled',
17
+ 'readOnly',
18
+ 'margin',
19
+ 'inputRef'
20
+ ];
21
+ export { allowedProps };
@@ -1,148 +1,107 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
1
  import { boxShadowObjectsToCSSString } from '@instructure/ui-themes';
26
-
27
- /**
28
- * ---
29
- * private: true
30
- * ---
31
- * Generates the style object from the theme and provided additional information
32
- * @param {Object} componentTheme The theme variable object.
33
- * @param {Object} props the props of the component, the style is applied to
34
- * @param {Object} state the state of the component, the style is applied to
35
- * @return {Object} The final style object, which will be used in the component
36
- */
37
- const generateStyle = (componentTheme, props, sharedTokens) => {
38
- const {
39
- size
40
- } = props;
41
- const valueSizeVariants = {
42
- small: {
43
- fontSize: componentTheme.valueSmallFontSize,
44
- paddingInline: componentTheme.valueSmallPadding,
45
- lineHeight: componentTheme.valueSmallLineHeight
46
- },
47
- medium: {
48
- fontSize: componentTheme.valueMediumFontSize,
49
- paddingInline: componentTheme.valueMediumPadding,
50
- lineHeight: componentTheme.valueMediumLineHeight
51
- },
52
- large: {
53
- fontSize: componentTheme.valueLargeFontSize,
54
- paddingInline: componentTheme.valueLargePadding,
55
- lineHeight: componentTheme.valueLargeLineHeight
56
- }
57
- };
58
- const trackBorderWidth = '1px';
59
- const trackStyle = {
60
- borderRadius: '0.312em',
61
- borderWidth: trackBorderWidth,
62
- borderStyle: 'solid',
63
- borderColor: componentTheme.trackBorderColor,
64
- color: 'transparent',
65
- cursor: 'pointer',
66
- background: componentTheme.trackBackground,
67
- height: `calc(${componentTheme.handleSize} / 2)`
68
- };
69
- const borderedHandleSize = `calc(${componentTheme.handleSize} + (${componentTheme.handleBorderSize} * 2))`;
70
- const thumbStyle = {
71
- appearance: 'none',
72
- borderRadius: '50%',
73
- cursor: 'pointer',
74
- transition: 'all 0.15s ease-in-out',
75
- background: componentTheme.handleBackground,
76
- width: borderedHandleSize,
77
- height: borderedHandleSize,
78
- borderWidth: componentTheme.handleBorderSize,
79
- borderColor: componentTheme.handleBorderColor,
80
- borderStyle: 'solid',
81
- boxSizing: 'border-box',
82
- boxShadow: boxShadowObjectsToCSSString(componentTheme.boxShadow),
83
- '&:hover': {
84
- background: componentTheme.handleHoverBackground
85
- }
86
- };
87
-
88
- // Center the thumb vertically on the track by accounting for the track borders
89
- const thumbPosition = {
90
- marginTop: `calc(-1 * ${borderedHandleSize} / 4 - ${trackBorderWidth})`
91
- };
92
- const thumbFocusActiveStyle = {
93
- background: componentTheme.handleFocusBackground,
94
- boxShadow: `${boxShadowObjectsToCSSString(componentTheme.boxShadow)}, ` + `inset 0 0 0 ${componentTheme.handleFocusInset} ${componentTheme.handleFocusBackground}, ` + `inset 0 0 0 calc(${componentTheme.handleFocusInset} + ${sharedTokens.focusOutline.width}) ${sharedTokens.focusOutline.onColor}`
95
- };
96
- return {
97
- rangeInput: {
98
- label: 'rangeInput',
99
- display: 'flex',
100
- justifyContent: 'center',
101
- alignItems: 'center',
102
- minWidth: componentTheme.minWidth
103
- },
104
- rangeInputInput: {
105
- label: 'rangeInput__input',
106
- all: 'initial',
107
- flex: 'auto',
108
- boxSizing: 'border-box',
109
- appearance: 'none',
110
- width: '100%',
111
- // for Firefox
112
- outline: 'none',
113
- margin: 0,
114
- '&::-webkit-slider-thumb': {
115
- ...thumbStyle,
116
- ...thumbPosition
117
- },
118
- '&::-moz-range-thumb': thumbStyle,
119
- '&:focus, &:active': {
120
- outline: 'none',
121
- '&::-webkit-slider-thumb': thumbFocusActiveStyle,
122
- '&::-moz-range-thumb': thumbFocusActiveStyle
123
- },
124
- // remove outline in FF
125
- '&::-moz-focus-inner, &::-moz-focus-outer': {
126
- border: 0,
127
- outline: 'none'
128
- },
129
- '&::-webkit-slider-runnable-track': trackStyle,
130
- '&::-moz-range-track': trackStyle,
131
- '[dir="rtl"] &': {
132
- direction: 'rtl'
133
- }
134
- },
135
- rangeInputInputValue: {
136
- label: 'rangeInput__value',
137
- all: 'initial',
138
- boxSizing: 'border-box',
139
- display: 'block',
140
- color: 'inherit',
141
- fontFamily: componentTheme.valueFontFamily,
142
- fontWeight: componentTheme.valueFontWeight,
143
- textAlign: 'center',
144
- ...valueSizeVariants[size]
145
- }
146
- };
2
+ const generateStyle = (componentTheme, props, sharedTokens)=>{
3
+ const { size } = props;
4
+ const valueSizeVariants = {
5
+ small: {
6
+ fontSize: componentTheme.valueSmallFontSize,
7
+ paddingInline: componentTheme.valueSmallPadding,
8
+ lineHeight: componentTheme.valueSmallLineHeight
9
+ },
10
+ medium: {
11
+ fontSize: componentTheme.valueMediumFontSize,
12
+ paddingInline: componentTheme.valueMediumPadding,
13
+ lineHeight: componentTheme.valueMediumLineHeight
14
+ },
15
+ large: {
16
+ fontSize: componentTheme.valueLargeFontSize,
17
+ paddingInline: componentTheme.valueLargePadding,
18
+ lineHeight: componentTheme.valueLargeLineHeight
19
+ }
20
+ };
21
+ const trackBorderWidth = '1px';
22
+ const trackStyle = {
23
+ borderRadius: '0.312em',
24
+ borderWidth: trackBorderWidth,
25
+ borderStyle: 'solid',
26
+ borderColor: componentTheme.trackBorderColor,
27
+ color: 'transparent',
28
+ cursor: 'pointer',
29
+ background: componentTheme.trackBackground,
30
+ height: `calc(${componentTheme.handleSize} / 2)`
31
+ };
32
+ const borderedHandleSize = `calc(${componentTheme.handleSize} + (${componentTheme.handleBorderSize} * 2))`;
33
+ const thumbStyle = {
34
+ appearance: 'none',
35
+ borderRadius: '50%',
36
+ cursor: 'pointer',
37
+ transition: 'all 0.15s ease-in-out',
38
+ background: componentTheme.handleBackground,
39
+ width: borderedHandleSize,
40
+ height: borderedHandleSize,
41
+ borderWidth: componentTheme.handleBorderSize,
42
+ borderColor: componentTheme.handleBorderColor,
43
+ borderStyle: 'solid',
44
+ boxSizing: 'border-box',
45
+ boxShadow: boxShadowObjectsToCSSString(componentTheme.boxShadow),
46
+ '&:hover': {
47
+ background: componentTheme.handleHoverBackground
48
+ }
49
+ };
50
+ const thumbPosition = {
51
+ marginTop: `calc(-1 * ${borderedHandleSize} / 4 - ${trackBorderWidth})`
52
+ };
53
+ const thumbFocusActiveStyle = {
54
+ background: componentTheme.handleFocusBackground,
55
+ boxShadow: `${boxShadowObjectsToCSSString(componentTheme.boxShadow)}, ` + `inset 0 0 0 ${componentTheme.handleFocusInset} ${componentTheme.handleFocusBackground}, ` + `inset 0 0 0 calc(${componentTheme.handleFocusInset} + ${sharedTokens.focusOutline.width}) ${sharedTokens.focusOutline.onColor}`
56
+ };
57
+ return {
58
+ rangeInput: {
59
+ label: 'rangeInput',
60
+ display: 'flex',
61
+ justifyContent: 'center',
62
+ alignItems: 'center',
63
+ minWidth: componentTheme.minWidth
64
+ },
65
+ rangeInputInput: {
66
+ label: 'rangeInput__input',
67
+ all: 'initial',
68
+ flex: 'auto',
69
+ boxSizing: 'border-box',
70
+ appearance: 'none',
71
+ width: '100%',
72
+ outline: 'none',
73
+ margin: 0,
74
+ '&::-webkit-slider-thumb': {
75
+ ...thumbStyle,
76
+ ...thumbPosition
77
+ },
78
+ '&::-moz-range-thumb': thumbStyle,
79
+ '&:focus, &:active': {
80
+ outline: 'none',
81
+ '&::-webkit-slider-thumb': thumbFocusActiveStyle,
82
+ '&::-moz-range-thumb': thumbFocusActiveStyle
83
+ },
84
+ '&::-moz-focus-inner, &::-moz-focus-outer': {
85
+ border: 0,
86
+ outline: 'none'
87
+ },
88
+ '&::-webkit-slider-runnable-track': trackStyle,
89
+ '&::-moz-range-track': trackStyle,
90
+ '[dir="rtl"] &': {
91
+ direction: 'rtl'
92
+ }
93
+ },
94
+ rangeInputInputValue: {
95
+ label: 'rangeInput__value',
96
+ all: 'initial',
97
+ boxSizing: 'border-box',
98
+ display: 'block',
99
+ color: 'inherit',
100
+ fontFamily: componentTheme.valueFontFamily,
101
+ fontWeight: componentTheme.valueFontWeight,
102
+ textAlign: 'center',
103
+ ...valueSizeVariants[size]
104
+ }
105
+ };
147
106
  };
148
- export default generateStyle;
107
+ export default generateStyle;