UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

17 lines (14 loc) 1.21 kB
import { jsx, Fragment, jsxs } from 'react/jsx-runtime'; import { Component } from 'react'; import { minifyCss } from '../../minifyCss.mjs'; import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs'; import { getSpinnerCss as getComponentCss$o } from '../../../../../../components/dist/styles/esm/styles-entry.mjs'; import { parseAndGetAriaAttributes } from '../../../../../../components/dist/utils/esm/utils-entry.mjs'; class DSRSpinner extends Component { host; render() { const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$o(this.props.size, this.props.theme))); return (jsx(Fragment, { children: jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxs("span", { className: "root", role: "alert", "aria-live": "assertive", ...parseAndGetAriaAttributes(this.props.aria), children: [jsx("span", { className: "sr-only", children: "\u00A0" }), jsxs("svg", { viewBox: "-16 -16 32 32", width: "100%", height: "100%", focusable: "false", "aria-hidden": "true", children: [jsx("circle", { r: "9" }), jsx("circle", { r: "9" })] })] })] }) })); } } export { DSRSpinner };