UNPKG

braid-design-system

Version:
49 lines (48 loc) 2 kB
"use strict"; const jsxRuntime = require("react/jsx-runtime"); const lib_css_atoms_atoms_cjs = require("../../css/atoms/atoms.cjs"); const lib_components_Box_Box_cjs = require("../Box/Box.cjs"); const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs"); const lib_components_Loader_Loader_css_cjs = require("./Loader.css.cjs"); const lib_css_typography_css_cjs = require("../../css/typography.css.cjs"); const Loader = ({ size = "standard", "aria-label": ariaLabel = "Loading", delayVisibility = false, data, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx( lib_components_Box_Box_cjs.Box, { display: "flex", alignItems: "center", className: [ lib_components_Loader_Loader_css_cjs.rootSize[size], delayVisibility ? lib_components_Loader_Loader_css_cjs.delay : void 0 ], "aria-label": ariaLabel, role: "alert", "aria-live": "assertive", ...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }), children: /* @__PURE__ */ jsxRuntime.jsxs( "svg", { xmlns: "http://www.w3.org/2000/svg", className: [ lib_css_atoms_atoms_cjs.atoms({ reset: "svg" }), lib_components_Loader_Loader_css_cjs.size[size], lib_components_Loader_Loader_css_cjs.currentColor, lib_css_typography_css_cjs.tone.neutral ].join(" "), viewBox: "0 0 302 134", "aria-hidden": true, children: [ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: lib_components_Loader_Loader_css_cjs.circle, cy: "67", cx: "40", r: "40" }), /* @__PURE__ */ jsxRuntime.jsx("circle", { className: lib_components_Loader_Loader_css_cjs.circle, cy: "67", cx: "150", r: "40" }), /* @__PURE__ */ jsxRuntime.jsx("circle", { className: lib_components_Loader_Loader_css_cjs.circle, cy: "67", cx: "260", r: "40" }) ] } ) } ); exports.Loader = Loader;