UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

56 lines (55 loc) 2.4 kB
"use client"; import { jsx as w, jsxs as S } from "react/jsx-runtime"; import { d as x } from "./chunks/index.CgTHIF3K.js"; import { c as H } from "./chunks/index.CEyLAtio.js"; import { D } from "./chunks/Button.Cf1CKq8N.js"; import './assets/banner.BLdW5VF4.css';const j = "ds-banner_root_1y1nw_1", k = "ds-banner_root--secondary_1y1nw_16", P = "ds-banner_root--highlight_1y1nw_20", z = "ds-banner_root--hide-close-button_1y1nw_24", E = "ds-banner_content_1y1nw_30", L = "ds-banner_close-button_1y1nw_42", d = { root: j, rootSecondary: k, rootHighlight: P, rootHideCloseButton: z, content: E, closeButton: L }, G = (y) => { const t = x.c(30); let e, s, n, o, l, h; t[0] !== y ? ({ className: s, closeButtonProps: n, children: e, variant: h, onClose: o, ...l } = y, t[0] = y, t[1] = e, t[2] = s, t[3] = n, t[4] = o, t[5] = l, t[6] = h) : (e = t[1], s = t[2], n = t[3], o = t[4], l = t[5], h = t[6]); const _ = h === void 0 ? "default" : h; let r; t[7] !== n ? (r = n || {}, t[7] = n, t[8] = r) : r = t[8]; let c, m; t[9] !== r ? ({ label: m, ...c } = r, t[9] = r, t[10] = c, t[11] = m) : (c = t[10], m = t[11]); const g = m === void 0 ? "Close banner" : m, B = _ === "secondary", p = _ === "highlight", C = !o; let u; t[12] !== s || t[13] !== B || t[14] !== p || t[15] !== C ? (u = H(d.root, s, { [d.rootSecondary]: B, [d.rootHighlight]: p, [d.rootHideCloseButton]: C }), t[12] = s, t[13] = B, t[14] = p, t[15] = C, t[16] = u) : u = t[16]; const v = u; let f; t[17] === Symbol.for("react.memo_cache_sentinel") ? (f = H(d.content), t[17] = f) : f = t[17]; const N = f; let a; t[18] !== e ? (a = /* @__PURE__ */ w("div", { className: N, children: e }), t[18] = e, t[19] = a) : a = t[19]; let i; t[20] !== g || t[21] !== o || t[22] !== c || t[23] !== _ ? (i = o && /* @__PURE__ */ w(D, { ...c, hideLabel: !0, iconName: "cross", variant: "ghost", className: d.closeButton, size: "small", onClick: o, type: "button", theme: _ === "default" ? "dark" : "light", children: g }), t[20] = g, t[21] = o, t[22] = c, t[23] = _, t[24] = i) : i = t[24]; let b; return t[25] !== l || t[26] !== v || t[27] !== i || t[28] !== a ? (b = /* @__PURE__ */ S("div", { className: v, ...l, children: [ a, i ] }), t[25] = l, t[26] = v, t[27] = i, t[28] = a, t[29] = b) : b = t[29], b; }; export { G as DSBanner };