@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
47 lines (46 loc) • 2.22 kB
JavaScript
"use client";
import { jsxs as x, jsx as w } from "react/jsx-runtime";
import { d as y } from "./chunks/index.CgTHIF3K.js";
import { c as L } from "./chunks/index.CEyLAtio.js";
import { D as v } from "./chunks/Icon.NSsVrYeq.js";
import './assets/spinner.Ctn_YYBG.css';const I = "ds-spinner_root_awbzc_1", N = "ds-spinner_root-size-small_awbzc_10", O = "ds-spinner_root-size-medium_awbzc_14", R = "ds-spinner_root-size-large_awbzc_18", D = "ds-spinner_root-size-x-large_awbzc_22", M = "ds-spinner_root-size-inherit_awbzc_26", X = "ds-spinner_screenReaderOnly_awbzc_51", o = {
root: I,
rootSizeSmall: N,
rootSizeMedium: O,
rootSizeLarge: R,
rootSizeXLarge: D,
rootSizeInherit: M,
screenReaderOnly: X
}, k = (d) => {
const e = y.c(21);
let t, s, r, n, a;
e[0] !== d ? ({
aria: t,
className: s,
size: n,
theme: a,
...r
} = d, e[0] = d, e[1] = t, e[2] = s, e[3] = r, e[4] = n, e[5] = a) : (t = e[1], s = e[2], r = e[3], n = e[4], a = e[5]);
const l = n === void 0 ? "small" : n, _ = a === void 0 ? "light" : a, S = l === "small", p = l === "medium", f = l === "large", g = l === "x-large", h = l === "inherit";
let c;
e[6] !== s || e[7] !== S || e[8] !== p || e[9] !== f || e[10] !== g || e[11] !== h ? (c = L(o.root, s, {
[o.rootSizeSmall]: S,
[o.rootSizeMedium]: p,
[o.rootSizeLarge]: f,
[o.rootSizeXLarge]: g,
[o.rootSizeInherit]: h
}), e[6] = s, e[7] = S, e[8] = p, e[9] = f, e[10] = g, e[11] = h, e[12] = c) : c = e[12];
const b = c, u = (t == null ? void 0 : t["aria-label"]) || void 0;
let m;
e[13] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ w("span", { className: o.screenReaderOnly, children: " " }), e[13] = m) : m = e[13];
let i;
e[14] !== _ ? (i = /* @__PURE__ */ w(v, { name: "loading-spinner", theme: _, focusable: "false", "aria-hidden": "true" }), e[14] = _, e[15] = i) : i = e[15];
let z;
return e[16] !== r || e[17] !== b || e[18] !== i || e[19] !== u ? (z = /* @__PURE__ */ x("span", { className: b, role: "alert", "aria-live": "assertive", "aria-label": u, ...r, children: [
m,
i
] }), e[16] = r, e[17] = b, e[18] = i, e[19] = u, e[20] = z) : z = e[20], z;
};
export {
k as DSSpinner
};