@instructure/ui-progress 11.7.10 → 11.7.11-pr-snapshot-1794841957152

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/es/ProgressBar/v1/index.js +87 -123
  3. package/es/ProgressBar/v1/props.js +15 -26
  4. package/es/ProgressBar/v1/styles.js +167 -209
  5. package/es/ProgressBar/v1/theme.js +55 -93
  6. package/es/ProgressBar/v2/index.js +87 -123
  7. package/es/ProgressBar/v2/props.js +15 -26
  8. package/es/ProgressBar/v2/styles.js +188 -235
  9. package/es/ProgressCircle/v1/index.js +125 -165
  10. package/es/ProgressCircle/v1/props.js +16 -26
  11. package/es/ProgressCircle/v1/styles.js +291 -348
  12. package/es/ProgressCircle/v1/theme.js +88 -128
  13. package/es/ProgressCircle/v2/index.js +125 -165
  14. package/es/ProgressCircle/v2/props.js +16 -26
  15. package/es/ProgressCircle/v2/styles.js +291 -348
  16. package/es/exports/a.js +1 -25
  17. package/es/exports/b.js +1 -25
  18. package/package.json +13 -19
  19. package/src/ProgressBar/v1/index.tsx +7 -2
  20. package/src/ProgressBar/v2/index.tsx +4 -2
  21. package/src/ProgressCircle/v1/index.tsx +7 -2
  22. package/src/ProgressCircle/v2/index.tsx +4 -2
  23. package/tsconfig.build.json +0 -1
  24. package/tsconfig.build.tsbuildinfo +1 -1
  25. package/types/ProgressBar/v1/index.d.ts +3 -1
  26. package/types/ProgressBar/v1/index.d.ts.map +1 -1
  27. package/types/ProgressBar/v2/index.d.ts +3 -1
  28. package/types/ProgressBar/v2/index.d.ts.map +1 -1
  29. package/types/ProgressCircle/v1/index.d.ts +3 -1
  30. package/types/ProgressCircle/v1/index.d.ts.map +1 -1
  31. package/types/ProgressCircle/v2/index.d.ts +3 -1
  32. package/types/ProgressCircle/v2/index.d.ts.map +1 -1
  33. package/lib/ProgressBar/v1/index.js +0 -136
  34. package/lib/ProgressBar/v1/props.js +0 -31
  35. package/lib/ProgressBar/v1/styles.js +0 -216
  36. package/lib/ProgressBar/v1/theme.js +0 -100
  37. package/lib/ProgressBar/v2/index.js +0 -135
  38. package/lib/ProgressBar/v2/props.js +0 -31
  39. package/lib/ProgressBar/v2/styles.js +0 -242
  40. package/lib/ProgressCircle/v1/index.js +0 -181
  41. package/lib/ProgressCircle/v1/props.js +0 -31
  42. package/lib/ProgressCircle/v1/styles.js +0 -357
  43. package/lib/ProgressCircle/v1/theme.js +0 -146
  44. package/lib/ProgressCircle/v2/index.js +0 -180
  45. package/lib/ProgressCircle/v2/props.js +0 -31
  46. package/lib/ProgressCircle/v2/styles.js +0 -357
  47. package/lib/exports/a.js +0 -19
  48. package/lib/exports/b.js +0 -19
  49. package/lib/package.json +0 -1
@@ -1,135 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.ProgressBar = void 0;
8
- var _react = require("react");
9
- var _latest = require("@instructure/ui-view/latest");
10
- var _uiReactUtils = require("@instructure/ui-react-utils");
11
- var _emotion = require("@instructure/emotion");
12
- var _styles = _interopRequireDefault(require("./styles.js"));
13
- var _props = require("./props.js");
14
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
15
- var _dec, _class;
16
- /*
17
- * The MIT License (MIT)
18
- *
19
- * Copyright (c) 2015 - present Instructure, Inc.
20
- *
21
- * Permission is hereby granted, free of charge, to any person obtaining a copy
22
- * of this software and associated documentation files (the "Software"), to deal
23
- * in the Software without restriction, including without limitation the rights
24
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- * copies of the Software, and to permit persons to whom the Software is
26
- * furnished to do so, subject to the following conditions:
27
- *
28
- * The above copyright notice and this permission notice shall be included in all
29
- * copies or substantial portions of the Software.
30
- *
31
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
- * SOFTWARE.
38
- */
39
- /**
40
- ---
41
- category: components
42
- ---
43
- **/
44
- let ProgressBar = exports.ProgressBar = (_dec = (0, _emotion.withStyleNew)(_styles.default), _dec(_class = class ProgressBar extends _react.Component {
45
- static displayName = 'ProgressBar';
46
- static componentId = 'ProgressBar';
47
- static allowedProps = _props.allowedProps;
48
- static defaultProps = {
49
- formatScreenReaderValue: ({
50
- valueNow,
51
- valueMax
52
- }) => `${valueNow} / ${valueMax}`,
53
- size: 'medium',
54
- valueMax: 100,
55
- valueNow: 0,
56
- as: 'div',
57
- color: 'primary',
58
- shouldAnimate: false,
59
- // default to showing `success` color on completion
60
- meterColor: ({
61
- valueNow,
62
- valueMax
63
- }) => valueNow / valueMax >= 1 ? 'success' : 'brand'
64
- };
65
- ref = null;
66
- componentDidMount() {
67
- this.props.makeStyles?.();
68
- }
69
- componentDidUpdate() {
70
- this.props.makeStyles?.();
71
- }
72
- handleRef = el => {
73
- const {
74
- elementRef
75
- } = this.props;
76
- this.ref = el;
77
- if (typeof elementRef === 'function') {
78
- elementRef(el);
79
- }
80
- };
81
- render() {
82
- const {
83
- renderValue,
84
- formatScreenReaderValue,
85
- valueNow,
86
- valueMax,
87
- screenReaderLabel,
88
- size,
89
- color,
90
- meterColor,
91
- renderValueInside,
92
- styles,
93
- ...props
94
- } = this.props;
95
- const valueText = typeof formatScreenReaderValue === 'function' ? formatScreenReaderValue({
96
- valueNow: valueNow,
97
- valueMax: valueMax
98
- }) : undefined;
99
- const value = (0, _uiReactUtils.callRenderProp)(renderValue, {
100
- valueNow: valueNow,
101
- valueMax: valueMax
102
- });
103
- return (0, _jsxRuntime.jsxs)(_latest.View, {
104
- ...(0, _uiReactUtils.passthroughProps)(props),
105
- as: this.props.as,
106
- css: styles?.progressBar,
107
- margin: this.props.margin,
108
- elementRef: this.handleRef,
109
- "data-cid": "ProgressBar",
110
- children: [(0, _jsxRuntime.jsxs)("span", {
111
- css: styles?.trackLayout,
112
- children: [(0, _jsxRuntime.jsx)("progress", {
113
- css: styles?.htmlProgress,
114
- max: valueMax,
115
- value: valueNow,
116
- "aria-valuetext": valueText,
117
- "aria-label": screenReaderLabel
118
- }), (0, _jsxRuntime.jsx)("span", {
119
- css: styles?.track,
120
- role: "presentation",
121
- "aria-hidden": "true",
122
- children: (0, _jsxRuntime.jsx)("span", {
123
- css: styles?.trackValue,
124
- children: renderValueInside && value
125
- })
126
- })]
127
- }), value && !renderValueInside && (0, _jsxRuntime.jsx)("span", {
128
- css: styles?.value,
129
- "aria-hidden": "true",
130
- children: value
131
- })]
132
- });
133
- }
134
- }) || _class);
135
- var _default = exports.default = ProgressBar;
@@ -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 = ['screenReaderLabel', 'size', 'valueMax', 'valueNow', 'formatScreenReaderValue', 'renderValue', 'color', 'meterColor', 'shouldAnimate', 'margin', 'elementRef', 'as'];
@@ -1,242 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = 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
- /**
32
- * ---
33
- * private: true
34
- * ---
35
- * Generates the style object from the theme and provided additional information
36
- * @param {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @param {Object} sharedTokens Shared token object that stores common values for the theme.
39
- * @return {Object} The final style object, which will be used in the component
40
- */
41
- const generateStyle = (componentTheme, props, _sharedTokens) => {
42
- const {
43
- valueNow = 0,
44
- valueMax = 100,
45
- size,
46
- color,
47
- meterColor,
48
- shouldAnimate
49
- } = props;
50
- const meterColorClassName = typeof meterColor === 'function' ? meterColor({
51
- valueNow,
52
- valueMax
53
- }) : meterColor;
54
- const currentValue = valueNow > valueMax ? valueMax : valueNow < 0 ? 0 : valueNow;
55
- const currentValuePercent = `${currentValue / valueMax * 100}%`;
56
- const sizeVariants = {
57
- 'x-small': {
58
- track: {
59
- height: componentTheme.xSmallHeight
60
- },
61
- value: {
62
- fontSize: componentTheme.xSmallValueFontSize
63
- }
64
- },
65
- small: {
66
- track: {
67
- height: componentTheme.smallHeight
68
- },
69
- // product design wants = 18px
70
- value: {
71
- fontSize: componentTheme.smallValueFontSize
72
- }
73
- },
74
- medium: {
75
- track: {
76
- height: componentTheme.mediumHeight
77
- },
78
- value: {
79
- fontSize: componentTheme.mediumValueFontSize
80
- }
81
- },
82
- large: {
83
- track: {
84
- height: componentTheme.largeHeight
85
- },
86
- value: {
87
- fontSize: componentTheme.largeValueFontSize
88
- }
89
- }
90
- };
91
- const colorVariants = {
92
- primary: {
93
- trackLayout: {
94
- background: componentTheme.trackColor,
95
- borderWidth: componentTheme.trackBottomBorderWidth,
96
- borderStyle: 'solid',
97
- borderColor: componentTheme.borderColor
98
- },
99
- trackBorder: {
100
- borderBottomColor: componentTheme.trackBottomBorderColor
101
- },
102
- value: {
103
- color: componentTheme.textColor
104
- },
105
- htmlProgress: {
106
- borderColor: componentTheme.borderColor
107
- }
108
- },
109
- 'primary-inverse': {
110
- trackLayout: {
111
- background: componentTheme.trackColorInverse,
112
- borderWidth: componentTheme.trackBottomBorderWidth,
113
- borderStyle: 'solid',
114
- borderColor: componentTheme.borderColorInverse
115
- },
116
- trackBorder: {
117
- borderBottomColor: componentTheme.trackBottomBorderColorInverse
118
- },
119
- value: {
120
- color: componentTheme.textColorInverse
121
- },
122
- htmlProgress: {
123
- borderColor: componentTheme.borderColorInverse
124
- }
125
- }
126
- };
127
- const trackBackgroundVariants = {
128
- primary: {
129
- brand: {
130
- background: componentTheme.meterColorBrand
131
- },
132
- info: {
133
- background: componentTheme.meterColorInfo
134
- },
135
- success: {
136
- background: componentTheme.meterColorSuccess
137
- },
138
- danger: {
139
- background: componentTheme.meterColorDanger
140
- },
141
- warning: {
142
- background: componentTheme.meterColorWarning
143
- },
144
- alert: {
145
- background: componentTheme.meterColorAlert
146
- }
147
- },
148
- 'primary-inverse': {
149
- brand: {
150
- background: componentTheme.meterColorBrandInverse
151
- },
152
- info: {
153
- background: componentTheme.meterColorInfoInverse
154
- },
155
- success: {
156
- background: componentTheme.meterColorSuccessInverse
157
- },
158
- danger: {
159
- background: componentTheme.meterColorDangerInverse
160
- },
161
- warning: {
162
- background: componentTheme.meterColorWarningInverse
163
- },
164
- alert: {
165
- background: componentTheme.meterColorAlertInverse
166
- }
167
- }
168
- };
169
- return {
170
- progressBar: {
171
- label: 'progressBar',
172
- display: 'flex',
173
- alignItems: 'center',
174
- fontFamily: componentTheme.fontFamily,
175
- fontWeight: componentTheme.fontWeight,
176
- lineHeight: componentTheme.lineHeight,
177
- fontSize: componentTheme.fontSize,
178
- borderRadius: componentTheme.borderRadius
179
- },
180
- trackLayout: {
181
- label: 'progressBar__trackLayout',
182
- position: 'relative',
183
- flex: 1,
184
- borderRadius: 'inherit',
185
- ...colorVariants[color].trackLayout
186
- },
187
- track: {
188
- label: 'progressBar__track',
189
- display: 'block',
190
- boxSizing: 'border-box',
191
- width: '100%',
192
- borderBottomWidth: componentTheme.trackBottomBorderWidth,
193
- borderBottomStyle: 'solid',
194
- background: 'transparent',
195
- // Inner border-radius must be smaller than outer to avoid geometric gaps with nested rounded borders
196
- // Formula: inner radius = outer radius - border width
197
- borderRadius: `calc(${componentTheme.borderRadius} - ${componentTheme.trackBottomBorderWidth})`,
198
- // Negative margin pulls track down so trackLayout's full border overlaps and hides track's bottom border.
199
- // When trackLayout border is visible (light/dark themes), it creates a clean full border appearance.
200
- // When trackLayout border is transparent (legacy Canvas), track's bottom border remains visible.
201
- marginBottom: `calc(-1 * ${componentTheme.trackBottomBorderWidth})`,
202
- ...sizeVariants[size].track,
203
- ...colorVariants[color].trackBorder
204
- },
205
- trackValue: {
206
- label: 'progressBar__trackValue',
207
- display: 'block',
208
- boxSizing: 'border-box',
209
- height: '100%',
210
- width: currentValuePercent,
211
- maxWidth: '100%',
212
- borderRadius: 'inherit',
213
- ...(shouldAnimate && {
214
- transition: 'all 0.5s'
215
- }),
216
- ...(meterColorClassName && trackBackgroundVariants[color][meterColorClassName])
217
- },
218
- value: {
219
- label: 'progressBar__value',
220
- lineHeight: 1,
221
- boxSizing: 'border-box',
222
- paddingInlineStart: componentTheme.valuePadding,
223
- flex: '0 0 5.625rem',
224
- ...sizeVariants[size].value,
225
- ...colorVariants[color].value
226
- },
227
- htmlProgress: {
228
- label: 'progressBar__htmlProgress',
229
- display: 'block',
230
- position: 'absolute',
231
- top: '0',
232
- left: '0',
233
- width: '100%',
234
- height: '100%',
235
- boxSizing: 'border-box',
236
- zIndex: -1,
237
- opacity: 0,
238
- ...colorVariants[color].htmlProgress
239
- }
240
- };
241
- };
242
- var _default = exports.default = generateStyle;
@@ -1,181 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.ProgressCircle = void 0;
8
- var _react = require("react");
9
- var _uiA11yContent = require("@instructure/ui-a11y-content");
10
- var _v11_ = require("@instructure/ui-view/v11_6");
11
- var _uiReactUtils = require("@instructure/ui-react-utils");
12
- var _emotion = require("@instructure/emotion");
13
- var _styles = _interopRequireDefault(require("./styles.js"));
14
- var _theme = _interopRequireDefault(require("./theme.js"));
15
- var _props = require("./props.js");
16
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
17
- var _dec, _class;
18
- /*
19
- * The MIT License (MIT)
20
- *
21
- * Copyright (c) 2015 - present Instructure, Inc.
22
- *
23
- * Permission is hereby granted, free of charge, to any person obtaining a copy
24
- * of this software and associated documentation files (the "Software"), to deal
25
- * in the Software without restriction, including without limitation the rights
26
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
- * copies of the Software, and to permit persons to whom the Software is
28
- * furnished to do so, subject to the following conditions:
29
- *
30
- * The above copyright notice and this permission notice shall be included in all
31
- * copies or substantial portions of the Software.
32
- *
33
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
- * SOFTWARE.
40
- */
41
- /**
42
- ---
43
- category: components
44
- ---
45
- **/
46
- let ProgressCircle = exports.ProgressCircle = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class ProgressCircle extends _react.Component {
47
- static displayName = 'ProgressCircle';
48
- static componentId = 'ProgressCircle';
49
- static allowedProps = _props.allowedProps;
50
- static defaultProps = {
51
- formatScreenReaderValue: ({
52
- valueNow,
53
- valueMax
54
- }) => `${valueNow} / ${valueMax}`,
55
- size: 'medium',
56
- valueMax: 100,
57
- valueNow: 0,
58
- as: 'div',
59
- color: 'primary',
60
- shouldAnimateOnMount: false,
61
- // default to showing `success` color on completion
62
- meterColor: ({
63
- valueNow,
64
- valueMax
65
- }) => valueNow / valueMax >= 1 ? 'success' : 'brand'
66
- };
67
- _timeouts = [];
68
- ref = null;
69
- constructor(props) {
70
- super(props);
71
- this.state = {
72
- shouldAnimateOnMount: props.shouldAnimateOnMount
73
- };
74
- }
75
- handleRef = el => {
76
- const {
77
- elementRef
78
- } = this.props;
79
- this.ref = el;
80
- if (typeof elementRef === 'function') {
81
- elementRef(el);
82
- }
83
- };
84
- get makeStylesVariables() {
85
- return {
86
- shouldAnimateOnMount: this.state.shouldAnimateOnMount
87
- };
88
- }
89
- componentDidMount() {
90
- if (this.state.shouldAnimateOnMount) {
91
- this._timeouts.push(setTimeout(() => {
92
- this.setState({
93
- shouldAnimateOnMount: false
94
- });
95
- }, this.props.animationDelay || 500));
96
- }
97
- this.props.makeStyles?.(this.makeStylesVariables);
98
- }
99
- componentDidUpdate() {
100
- this.props.makeStyles?.(this.makeStylesVariables);
101
- }
102
- componentWillUnmount() {
103
- this._timeouts.forEach(timeout => clearTimeout(timeout));
104
- }
105
- render() {
106
- const {
107
- color,
108
- renderValue,
109
- formatScreenReaderValue,
110
- meterColor,
111
- valueNow,
112
- valueMax,
113
- screenReaderLabel,
114
- size,
115
- styles,
116
- ...props
117
- } = this.props;
118
- const valueText = typeof formatScreenReaderValue === 'function' ? formatScreenReaderValue({
119
- valueNow: valueNow,
120
- valueMax: valueMax
121
- }) : undefined;
122
- // consolidating the label and aria-valuetext to put in aria-label because
123
- // NVDA does not read aria-valuetext: https://github.com/nvaccess/nvda/issues/913
124
- // But leaving aria-valuetext because JAWS ignores aria-label
125
- const labelAndValueText = `${screenReaderLabel} ${valueText}`;
126
- const value = (0, _uiReactUtils.callRenderProp)(renderValue, {
127
- valueNow: valueNow,
128
- valueMax: valueMax
129
- });
130
- const style = {
131
- strokeDashoffset: `${styles?.dashOffset}em`
132
- };
133
- return (0, _jsxRuntime.jsxs)(_v11_.View, {
134
- ...(0, _uiReactUtils.passthroughProps)(props),
135
- as: this.props.as,
136
- elementRef: this.handleRef,
137
- css: styles?.progressCircle,
138
- margin: this.props.margin,
139
- "data-cid": "ProgressCircle",
140
- children: [(0, _jsxRuntime.jsx)(_uiA11yContent.ScreenReaderContent, {
141
- children: (0, _jsxRuntime.jsx)("progress", {
142
- max: valueMax,
143
- value: valueNow,
144
- "aria-valuetext": labelAndValueText
145
- })
146
- }), value && (0, _jsxRuntime.jsx)("span", {
147
- css: styles?.center,
148
- "aria-hidden": "true",
149
- children: (0, _jsxRuntime.jsx)("span", {
150
- css: styles?.value,
151
- children: value
152
- })
153
- }), (0, _jsxRuntime.jsxs)("svg", {
154
- css: styles?.circle,
155
- role: "presentation",
156
- focusable: "false",
157
- children: [(0, _jsxRuntime.jsx)("circle", {
158
- css: styles?.track,
159
- role: "presentation",
160
- cx: "50%",
161
- cy: "50%",
162
- r: styles?.radii?.radius
163
- }), (0, _jsxRuntime.jsx)("circle", {
164
- css: styles?.border,
165
- role: "presentation",
166
- cx: "50%",
167
- cy: "50%",
168
- r: styles?.radii?.borderOffsetRadius
169
- }), (0, _jsxRuntime.jsx)("circle", {
170
- css: styles?.meter,
171
- role: "presentation",
172
- style: style,
173
- cx: "50%",
174
- cy: "50%",
175
- r: styles?.radii?.radius
176
- })]
177
- })]
178
- });
179
- }
180
- }) || _class);
181
- var _default = exports.default = ProgressCircle;
@@ -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 = ['screenReaderLabel', 'size', 'valueMax', 'valueNow', 'formatScreenReaderValue', 'renderValue', 'color', 'meterColor', 'margin', 'elementRef', 'as', 'shouldAnimateOnMount', 'animationDelay'];