UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

67 lines (66 loc) 3.1 kB
"use client"; import { jsxs as C, jsx as b } from "react/jsx-runtime"; import { d as E } from "./chunks/index.CgTHIF3K.js"; import { c as R } from "./chunks/index.CEyLAtio.js"; import { D as T } from "./chunks/Icon.DGTYCv63.js"; import "./chunks/LinkButton.DdTspmJz.js"; import { forwardRef as $ } from "react"; import './assets/link.CeJUHbdf.css';const B = "ds-link_root_13q40_1", F = "ds-link_root--highlight_13q40_68", G = "ds-link_root--neutral-dark_13q40_82", J = "ds-link_root--highlight-dark_13q40_131", K = "ds-link_root--active_13q40_180", M = "ds-link_root--icon-left_13q40_187", r = { root: B, rootHighlight: F, rootNeutralDark: G, rootHighlightDark: J, rootActive: K, rootIconLeft: M }, O = $((L, x) => { const t = E.c(45); let l, s, n, a, c, o, e, i, h, d, g, u, v, p, D; t[0] !== L ? ({ children: n, aria: s, active: l, className: a, download: c, href: o, iconName: e, iconPosition: u, iconSource: i, referrerPolicy: h, rel: d, target: v, theme: p, variant: D, ...g } = L, t[0] = L, t[1] = l, t[2] = s, t[3] = n, t[4] = a, t[5] = c, t[6] = o, t[7] = e, t[8] = i, t[9] = h, t[10] = d, t[11] = g, t[12] = u, t[13] = v, t[14] = p, t[15] = D) : (l = t[1], s = t[2], n = t[3], a = t[4], c = t[5], o = t[6], e = t[7], i = t[8], h = t[9], d = t[10], g = t[11], u = t[12], v = t[13], p = t[14], D = t[15]); const z = u === void 0 ? "left" : u, I = v === void 0 ? "_self" : v, N = p === void 0 ? "light" : p, S = D === void 0 ? "neutral" : D, y = S === "highlight", A = N === "dark" && S === "neutral", P = N === "dark" && S === "highlight", j = z === "left"; let q; t[16] !== l || t[17] !== a || t[18] !== y || t[19] !== A || t[20] !== P || t[21] !== j ? (q = R(r.root, a, { [r.rootHighlight]: y, [r.rootNeutralDark]: A, [r.rootHighlightDark]: P, [r.rootActive]: l, [r.rootIconLeft]: j }), t[16] = l, t[17] = a, t[18] = y, t[19] = A, t[20] = P, t[21] = j, t[22] = q) : q = t[22]; const w = q, m = o === void 0 ? "span" : "a"; let f; t[23] !== m || t[24] !== c || t[25] !== o || t[26] !== h || t[27] !== d || t[28] !== I ? (f = m === "a" && { href: o, target: I, rel: d, referrerPolicy: h, download: c }, t[23] = m, t[24] = c, t[25] = o, t[26] = h, t[27] = d, t[28] = I, t[29] = f) : f = t[29]; let k; t[30] !== n ? (k = /* @__PURE__ */ b("span", { className: r.label, children: n }), t[30] = n, t[31] = k) : k = t[31]; let _; t[32] !== e || t[33] !== i || t[34] !== N ? (_ = (e || i) && /* @__PURE__ */ b(T, { name: e, theme: N, source: i, size: "medium", "aria-hidden": "true" }), t[32] = e, t[33] = i, t[34] = N, t[35] = _) : _ = t[35]; let H; return t[36] !== m || t[37] !== s || t[38] !== x || t[39] !== g || t[40] !== w || t[41] !== f || t[42] !== k || t[43] !== _ ? (H = /* @__PURE__ */ C(m, { className: w, ...f, ...s, ...g, ref: x, children: [ k, _ ] }), t[36] = m, t[37] = s, t[38] = x, t[39] = g, t[40] = w, t[41] = f, t[42] = k, t[43] = _, t[44] = H) : H = t[44], H; }); O.displayName = "DSLink"; export { O as DSLink };