@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,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const allowedProps = exports.allowedProps = ['min', 'max', 'defaultValue', 'value', 'onChange', 'messages', 'size', 'layout', 'id', 'label', 'displayValue', 'step', 'formatValue', 'inline', 'disabled', 'readOnly', 'margin', 'inputRef'];
@@ -1,153 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _uiThemes = require("@instructure/ui-themes");
8
- /*
9
- * The MIT License (MIT)
10
- *
11
- * Copyright (c) 2015 - present Instructure, Inc.
12
- *
13
- * Permission is hereby granted, free of charge, to any person obtaining a copy
14
- * of this software and associated documentation files (the "Software"), to deal
15
- * in the Software without restriction, including without limitation the rights
16
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- * copies of the Software, and to permit persons to whom the Software is
18
- * furnished to do so, subject to the following conditions:
19
- *
20
- * The above copyright notice and this permission notice shall be included in all
21
- * copies or substantial portions of the Software.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
-
32
- /**
33
- * ---
34
- * private: true
35
- * ---
36
- * Generates the style object from the theme and provided additional information
37
- * @param {Object} componentTheme The theme variable object.
38
- * @param {Object} props the props of the component, the style is applied to
39
- * @param {Object} state the state of the component, the style is applied to
40
- * @return {Object} The final style object, which will be used in the component
41
- */
42
- const generateStyle = (componentTheme, props, sharedTokens) => {
43
- const {
44
- size
45
- } = props;
46
- const valueSizeVariants = {
47
- small: {
48
- fontSize: componentTheme.valueSmallFontSize,
49
- paddingInline: componentTheme.valueSmallPadding,
50
- lineHeight: componentTheme.valueSmallLineHeight
51
- },
52
- medium: {
53
- fontSize: componentTheme.valueMediumFontSize,
54
- paddingInline: componentTheme.valueMediumPadding,
55
- lineHeight: componentTheme.valueMediumLineHeight
56
- },
57
- large: {
58
- fontSize: componentTheme.valueLargeFontSize,
59
- paddingInline: componentTheme.valueLargePadding,
60
- lineHeight: componentTheme.valueLargeLineHeight
61
- }
62
- };
63
- const trackBorderWidth = '1px';
64
- const trackStyle = {
65
- borderRadius: '0.312em',
66
- borderWidth: trackBorderWidth,
67
- borderStyle: 'solid',
68
- borderColor: componentTheme.trackBorderColor,
69
- color: 'transparent',
70
- cursor: 'pointer',
71
- background: componentTheme.trackBackground,
72
- height: `calc(${componentTheme.handleSize} / 2)`
73
- };
74
- const borderedHandleSize = `calc(${componentTheme.handleSize} + (${componentTheme.handleBorderSize} * 2))`;
75
- const thumbStyle = {
76
- appearance: 'none',
77
- borderRadius: '50%',
78
- cursor: 'pointer',
79
- transition: 'all 0.15s ease-in-out',
80
- background: componentTheme.handleBackground,
81
- width: borderedHandleSize,
82
- height: borderedHandleSize,
83
- borderWidth: componentTheme.handleBorderSize,
84
- borderColor: componentTheme.handleBorderColor,
85
- borderStyle: 'solid',
86
- boxSizing: 'border-box',
87
- boxShadow: (0, _uiThemes.boxShadowObjectsToCSSString)(componentTheme.boxShadow),
88
- '&:hover': {
89
- background: componentTheme.handleHoverBackground
90
- }
91
- };
92
-
93
- // Center the thumb vertically on the track by accounting for the track borders
94
- const thumbPosition = {
95
- marginTop: `calc(-1 * ${borderedHandleSize} / 4 - ${trackBorderWidth})`
96
- };
97
- const thumbFocusActiveStyle = {
98
- background: componentTheme.handleFocusBackground,
99
- boxShadow: `${(0, _uiThemes.boxShadowObjectsToCSSString)(componentTheme.boxShadow)}, ` + `inset 0 0 0 ${componentTheme.handleFocusInset} ${componentTheme.handleFocusBackground}, ` + `inset 0 0 0 calc(${componentTheme.handleFocusInset} + ${sharedTokens.focusOutline.width}) ${sharedTokens.focusOutline.onColor}`
100
- };
101
- return {
102
- rangeInput: {
103
- label: 'rangeInput',
104
- display: 'flex',
105
- justifyContent: 'center',
106
- alignItems: 'center',
107
- minWidth: componentTheme.minWidth
108
- },
109
- rangeInputInput: {
110
- label: 'rangeInput__input',
111
- all: 'initial',
112
- flex: 'auto',
113
- boxSizing: 'border-box',
114
- appearance: 'none',
115
- width: '100%',
116
- // for Firefox
117
- outline: 'none',
118
- margin: 0,
119
- '&::-webkit-slider-thumb': {
120
- ...thumbStyle,
121
- ...thumbPosition
122
- },
123
- '&::-moz-range-thumb': thumbStyle,
124
- '&:focus, &:active': {
125
- outline: 'none',
126
- '&::-webkit-slider-thumb': thumbFocusActiveStyle,
127
- '&::-moz-range-thumb': thumbFocusActiveStyle
128
- },
129
- // remove outline in FF
130
- '&::-moz-focus-inner, &::-moz-focus-outer': {
131
- border: 0,
132
- outline: 'none'
133
- },
134
- '&::-webkit-slider-runnable-track': trackStyle,
135
- '&::-moz-range-track': trackStyle,
136
- '[dir="rtl"] &': {
137
- direction: 'rtl'
138
- }
139
- },
140
- rangeInputInputValue: {
141
- label: 'rangeInput__value',
142
- all: 'initial',
143
- boxSizing: 'border-box',
144
- display: 'block',
145
- color: 'inherit',
146
- fontFamily: componentTheme.valueFontFamily,
147
- fontWeight: componentTheme.valueFontWeight,
148
- textAlign: 'center',
149
- ...valueSizeVariants[size]
150
- }
151
- };
152
- };
153
- var _default = exports.default = generateStyle;
package/lib/exports/a.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "RangeInput", {
7
- enumerable: true,
8
- get: function () {
9
- return _index.RangeInput;
10
- }
11
- });
12
- var _index = require("../RangeInput/v1/index.js");
package/lib/exports/b.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "RangeInput", {
7
- enumerable: true,
8
- get: function () {
9
- return _index.RangeInput;
10
- }
11
- });
12
- var _index = require("../RangeInput/v2/index.js");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}