UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

47 lines (46 loc) 2.2 kB
"use client"; import { jsxs as x, jsx as w } from "react/jsx-runtime"; import { d as y } from "./chunks/index.D-sRdssb.js"; import { c as L } from "./chunks/index.DL9mof6u.js"; import { D as v } from "./chunks/Icon.CDLyB7Pv.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 l, t, r, i, n; e[0] !== d ? ({ aria: l, className: t, size: i, theme: n, ...r } = d, e[0] = d, e[1] = l, e[2] = t, e[3] = r, e[4] = i, e[5] = n) : (l = e[1], t = e[2], r = e[3], i = e[4], n = e[5]); const a = i === void 0 ? "small" : i, _ = n === void 0 ? "light" : n, S = a === "small", p = a === "medium", f = a === "large", g = a === "x-large", h = a === "inherit"; let c; e[6] !== t || e[7] !== S || e[8] !== p || e[9] !== f || e[10] !== g || e[11] !== h ? (c = L(o.root, t, { [o.rootSizeSmall]: S, [o.rootSizeMedium]: p, [o.rootSizeLarge]: f, [o.rootSizeXLarge]: g, [o.rootSizeInherit]: h }), e[6] = t, 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 = l?.["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 s; e[14] !== _ ? (s = /* @__PURE__ */ w(v, { name: "loading-spinner", theme: _, focusable: "false", "aria-hidden": "true" }), e[14] = _, e[15] = s) : s = e[15]; let z; return e[16] !== r || e[17] !== b || e[18] !== s || e[19] !== u ? (z = /* @__PURE__ */ x("span", { className: b, role: "alert", "aria-live": "assertive", "aria-label": u, ...r, children: [ m, s ] }), e[16] = r, e[17] = b, e[18] = s, e[19] = u, e[20] = z) : z = e[20], z; }; export { k as DSSpinner };