@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
34 lines (33 loc) • 1.34 kB
JavaScript
"use client";
import { jsx as f } from "react/jsx-runtime";
import { d as _ } from "./chunks/index.D-sRdssb.js";
import { c as p } from "./chunks/index.DL9mof6u.js";
import './assets/numberindicator.O6XwvtL0.css';const b = "ds-number-indicator_root_ueqlv_1", v = "ds-number-indicator_root--has-content_ueqlv_24", C = "ds-number-indicator_root--highlight_ueqlv_29", g = {
root: b,
rootHasContent: v,
rootHighlight: C
}, x = (c) => {
const t = _.c(16);
let e, o, n, r;
t[0] !== c ? ({
label: o,
className: e,
variant: r,
...n
} = c, t[0] = c, t[1] = e, t[2] = o, t[3] = n, t[4] = r) : (e = t[1], o = t[2], n = t[3], r = t[4]);
const u = r === void 0 ? "default" : r, s = typeof o == "string" && o.trim().length > 0;
let i;
t[5] !== s || t[6] !== o ? (i = s ? o.trim().substring(0, 4) : null, t[5] = s, t[6] = o, t[7] = i) : i = t[7];
const h = i, m = u === "highlight" || !s;
let l;
t[8] !== e || t[9] !== s || t[10] !== m ? (l = p(g.root, e, {
[g.rootHasContent]: s,
[g.rootHighlight]: m
}), t[8] = e, t[9] = s, t[10] = m, t[11] = l) : l = t[11];
const d = l;
let a;
return t[12] !== n || t[13] !== d || t[14] !== h ? (a = /* @__PURE__ */ f("span", { className: d, ...n, children: h }), t[12] = n, t[13] = d, t[14] = h, t[15] = a) : a = t[15], a;
};
export {
x as NumberIndicator
};