1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import styles from '@patternfly/react-styles/css/components/Spinner/spinner';
|
4 | import { css } from '@patternfly/react-styles';
|
5 | export var spinnerSize;
|
6 | (function (spinnerSize) {
|
7 | spinnerSize["sm"] = "sm";
|
8 | spinnerSize["md"] = "md";
|
9 | spinnerSize["lg"] = "lg";
|
10 | spinnerSize["xl"] = "xl";
|
11 | })(spinnerSize || (spinnerSize = {}));
|
12 | export const Spinner = (_a) => {
|
13 | var {
|
14 |
|
15 | className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', isSVG = false, diameter, 'aria-label': ariaLabel, 'aria-labelledBy': ariaLabelledBy } = _a, props = __rest(_a, ["className", "size", 'aria-valuetext', "isSVG", "diameter", 'aria-label', 'aria-labelledBy']);
|
16 | const Component = isSVG ? 'svg' : 'span';
|
17 | return (React.createElement(Component, Object.assign({ className: css(styles.spinner, styles.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText }, (isSVG && { viewBox: '0 0 100 100' }), (diameter && { style: { '--pf-c-spinner--diameter': diameter } }), (ariaLabel && { 'aria-label': ariaLabel }), (ariaLabelledBy && { 'aria-labelledBy': ariaLabelledBy }), (!ariaLabel && !ariaLabelledBy && { 'aria-label': 'Contents' }), props), isSVG ? (React.createElement("circle", { className: styles.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" })) : (React.createElement(React.Fragment, null,
|
18 | React.createElement("span", { className: css(styles.spinnerClipper) }),
|
19 | React.createElement("span", { className: css(styles.spinnerLeadBall) }),
|
20 | React.createElement("span", { className: css(styles.spinnerTailBall) })))));
|
21 | };
|
22 | Spinner.displayName = 'Spinner';
|
23 |
|
\ | No newline at end of file |