@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
51 lines (50 loc) • 2.23 kB
JavaScript
"use client";
import { jsxs as y, jsx as p } from "react/jsx-runtime";
import { d as L } from "./chunks/index.CgTHIF3K.js";
import { c as u } from "./chunks/index.CEyLAtio.js";
import { D as w } from "./chunks/Icon.NSsVrYeq.js";
import './assets/flag.C7i3MAAP.css';const b = "ds-flag_root_14d3h_1", x = "ds-flag_root--color-grey-light_14d3h_28", G = "ds-flag_root--color-yellow-light_14d3h_31", N = "ds-flag_root--color-red-light_14d3h_34", S = "ds-flag_root--color-green-light_14d3h_37", D = "ds-flag_root--color-orange-base_14d3h_40", C = {
root: b,
"root--color-grey-light": "ds-flag_root--color-grey-light_14d3h_28",
rootColorGreyLight: x,
"root--color-yellow-light": "ds-flag_root--color-yellow-light_14d3h_31",
rootColorYellowLight: G,
"root--color-red-light": "ds-flag_root--color-red-light_14d3h_34",
rootColorRedLight: N,
"root--color-green-light": "ds-flag_root--color-green-light_14d3h_37",
rootColorGreenLight: S,
"root--color-orange-base": "ds-flag_root--color-orange-base_14d3h_40",
rootColorOrangeBase: D
}, R = (n) => {
const o = L.c(23);
let e, s, r, t, l, c;
o[0] !== n ? ({
children: e,
className: s,
color: r,
iconName: t,
iconSource: l,
...c
} = n, o[0] = n, o[1] = e, o[2] = s, o[3] = r, o[4] = t, o[5] = l, o[6] = c) : (e = o[1], s = o[2], r = o[3], t = o[4], l = o[5], c = o[6]);
const g = typeof r == "string" && C[`root--color-${r}`];
let a;
o[7] !== r || o[8] !== g ? (a = g ? {} : {
backgroundColor: r
}, o[7] = r, o[8] = g, o[9] = a) : a = o[9];
const _ = a, f = C[`root--color-${r}`];
let d;
o[10] !== s || o[11] !== g || o[12] !== f ? (d = u(C.root, s, {
[f]: g
}), o[10] = s, o[11] = g, o[12] = f, o[13] = d) : d = o[13];
const m = d;
let i;
o[14] !== t || o[15] !== l ? (i = (t || l) && /* @__PURE__ */ p(w, { name: t, theme: "light", source: l, "aria-hidden": "true" }), o[14] = t, o[15] = l, o[16] = i) : i = o[16];
let h;
return o[17] !== e || o[18] !== _ || o[19] !== c || o[20] !== m || o[21] !== i ? (h = /* @__PURE__ */ y("span", { className: m, style: _, ...c, children: [
i,
e
] }), o[17] = e, o[18] = _, o[19] = c, o[20] = m, o[21] = i, o[22] = h) : h = o[22], h;
};
export {
R as DSFlag
};