| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx } from "react/jsx-runtime"; |
| 3 |
import styles from '@patternfly/react-styles/css/components/Spinner/spinner.mjs'; |
| 4 |
import { css } from '@patternfly/react-styles'; |
| 5 |
import cssDiameter from '@patternfly/react-tokens/dist/esm/c_spinner_diameter'; |
| 6 |
export var spinnerSize; |
| 7 |
(function (spinnerSize) { |
| 8 |
spinnerSize["sm"] = "sm"; |
| 9 |
spinnerSize["md"] = "md"; |
| 10 |
spinnerSize["lg"] = "lg"; |
| 11 |
spinnerSize["xl"] = "xl"; |
| 12 |
})(spinnerSize || (spinnerSize = {})); |
| 13 |
export const Spinner = (_a) => { |
| 14 |
var { className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', diameter, isInline = false, 'aria-label': ariaLabel, 'aria-labelledBy': ariaLabelledBy } = _a, props = __rest(_a, ["className", "size", 'aria-valuetext', "diameter", "isInline", 'aria-label', 'aria-labelledBy']); |
| 15 |
return (_jsx("svg", Object.assign({ className: css(styles.spinner, isInline ? styles.modifiers.inline : styles.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText, viewBox: "0 0 100 100" }, (diameter && { style: { [cssDiameter.name]: diameter } }), (ariaLabel && { 'aria-label': ariaLabel }), (ariaLabelledBy && { 'aria-labelledBy': ariaLabelledBy }), (!ariaLabel && !ariaLabelledBy && { 'aria-label': 'Contents' }), props, { children: _jsx("circle", { className: styles.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" }) }))); |
| 16 |
}; |
| 17 |
Spinner.displayName = 'Spinner'; |
| 18 |
//# sourceMappingURL=Spinner.js.map |