UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

40 lines (39 loc) 1.62 kB
"use client"; import { jsx as p } from "react/jsx-runtime"; import { d as y } from "./chunks/index.cKLI89Eg.js"; import { c as C } from "./chunks/index.DQOqod3i.js"; import './assets/numberindicator.CtbitPQ8.css';const H = "ds-number-indicator_root_1svqy_1", k = "ds-number-indicator_root--has-content_1svqy_24", q = "ds-number-indicator_root--highlight_1svqy_29", N = "ds-number-indicator_root--dark_1svqy_33", d = { root: H, rootHasContent: k, rootHighlight: q, rootDark: N }, E = (m) => { const t = y.c(20); let r, o, e, n, i; t[0] !== m ? ({ label: o, className: r, theme: n, variant: i, ...e } = m, t[0] = m, t[1] = r, t[2] = o, t[3] = e, t[4] = n, t[5] = i) : (r = t[1], o = t[2], e = t[3], n = t[4], i = t[5]); const v = n === void 0 ? "light" : n, b = i === void 0 ? "default" : i; let l; t[6] !== o ? (l = typeof o == "string" && o.trim().length > 0, t[6] = o, t[7] = l) : l = t[7]; const s = l; let a; t[8] !== s || t[9] !== o ? (a = s ? o.trim().substring(0, 4) : null, t[8] = s, t[9] = o, t[10] = a) : a = t[10]; const g = a, _ = v === "dark", u = b === "highlight" || !s; let c; t[11] !== r || t[12] !== s || t[13] !== _ || t[14] !== u ? (c = C(d.root, r, { [d.rootDark]: _, [d.rootHasContent]: s, [d.rootHighlight]: u }), t[11] = r, t[12] = s, t[13] = _, t[14] = u, t[15] = c) : c = t[15]; const f = c; let h; return t[16] !== e || t[17] !== f || t[18] !== g ? (h = /* @__PURE__ */ p("span", { className: f, ...e, children: g }), t[16] = e, t[17] = f, t[18] = g, t[19] = h) : h = t[19], h; }; export { E as NumberIndicator };