@stihl-design-system/components 1.0.0-RC.29 → 1.0.0-RC.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/{actionbutton.DHt1AL7U.js → actionbutton.u1qp8oGC.js} +1 -1
  2. package/{actionlink.BML1jenE.js → actionlink.C7HzeIVa.js} +1 -1
  3. package/assets/ActionButton.oGVPTS1J.css +1 -0
  4. package/assets/ActionLink.CTh6IXrN.css +1 -0
  5. package/assets/Header.CNqtWTxB.css +1 -0
  6. package/assets/MegaMenu.DX9gChtY.css +1 -0
  7. package/assets/banner.BLdW5VF4.css +1 -0
  8. package/banner.j9YpudOS.js +55 -0
  9. package/chunks/ActionButton.B8zFwOrJ.js +165 -0
  10. package/chunks/{ActionLink.BlhqDEtq.js → ActionLink.IX6oRXU3.js} +31 -31
  11. package/chunks/Header.DqZRryB5.js +366 -0
  12. package/chunks/MegaMenu.BY7eOnhj.js +189 -0
  13. package/chunks/Popover.NGetxKGg.js +159 -0
  14. package/chunks/floating-ui.react.x0F9CYgn.js +1637 -0
  15. package/components/Banner/Banner.d.ts +1 -1
  16. package/components/InputFile/InputFile.d.ts +1 -1
  17. package/components/MegaMenu/MegaMenu.d.ts +32 -0
  18. package/components/MegaMenu/MegaMenu.test.d.ts +1 -0
  19. package/components/MegaMenu/MegaMenu.utils.d.ts +52 -0
  20. package/components/MegaMenu/MegaMenu.utils.test.d.ts +1 -0
  21. package/components/Popover/Popover.d.ts +1 -1
  22. package/components/Scroller/Scroller.d.ts +1 -1
  23. package/github-mark-white.svg +1 -0
  24. package/github-mark.svg +1 -0
  25. package/{header.Z4Oxj_xL.js → header.QpNjE3N-.js} +1 -1
  26. package/index.d.ts +2 -0
  27. package/index.es.js +117 -112
  28. package/megamenu.CdHrEeoh.js +12 -0
  29. package/megamenu.d.ts +2 -0
  30. package/package.json +3 -1
  31. package/partials/index.js +21 -15
  32. package/partials/lib/partials.d.ts +1 -1
  33. package/{popover.BFx99cHg.js → popover.DXxm1oWI.js} +3 -2
  34. package/styles/scss/ds/index.scss +0 -1
  35. package/styles/scss/ds/lib/grid-main.scss +2 -13
  36. package/styles/scss/ds/lib/grid-sidebar.scss +38 -136
  37. package/{topbar.Bccms0xZ.js → topbar.Dhy_TL0U.js} +1 -1
  38. package/assets/ActionButton.Ewi0i1hW.css +0 -1
  39. package/assets/ActionLink.BdPEvuGm.css +0 -1
  40. package/assets/Header.DO34x-dO.css +0 -1
  41. package/assets/banner.D9EiZqqR.css +0 -1
  42. package/banner.B2YO054K.js +0 -55
  43. package/chunks/ActionButton.CzaWZGPt.js +0 -165
  44. package/chunks/Header.BSvyYrIV.js +0 -368
  45. package/chunks/Popover.hXQTvwwd.js +0 -1685
  46. package/styles/scss/ds/lib/grid-sidebar-sidebar.scss +0 -52
@@ -0,0 +1,159 @@
1
+ "use client";
2
+ import { jsx as A } from "react/jsx-runtime";
3
+ import { d as w } from "./index.CgTHIF3K.js";
4
+ import { isValidElement as V, useState as B, createContext as G, forwardRef as I, cloneElement as H, useContext as J } from "react";
5
+ import { i as K, u as L, a as Q, b as T, c as W, d as X, o as Y, s as Z, e as U, g as ee, F as te } from "./floating-ui.react.x0F9CYgn.js";
6
+ import { c as oe } from "./index.CEyLAtio.js";
7
+ import { g as E, c as $ } from "./helpers.BbWkXTr3.js";
8
+ import { a as se } from "./floating-ui.dom.C9TD1WpB.js";
9
+ import '../assets/Popover.BDTDsPAt.css';const ne = "ds-popover_popover_zyqhl_5", le = {
10
+ popover: ne
11
+ }, re = (n) => {
12
+ const t = w.c(29);
13
+ let e;
14
+ t[0] !== n ? (e = n === void 0 ? {} : n, t[0] = n, t[1] = e) : e = t[1];
15
+ const {
16
+ initialOpen: o,
17
+ placement: s,
18
+ isOpen: r,
19
+ popoverOffset: d,
20
+ onOpenChange: i
21
+ } = e, l = o === void 0 ? !1 : o, c = s === void 0 ? "bottom-start" : s, a = d === void 0 ? 6 : d, [h, m] = B(l), p = r ?? h, f = i ?? m;
22
+ let v;
23
+ t[2] !== a ? (v = Y(a), t[2] = a, t[3] = v) : v = t[3];
24
+ let u;
25
+ t[4] !== c || t[5] !== a ? (u = K({
26
+ crossAxis: c.includes("-"),
27
+ fallbackAxisSideDirection: "end",
28
+ padding: a
29
+ }), t[4] = c, t[5] = a, t[6] = u) : u = t[6];
30
+ let P;
31
+ t[7] !== a ? (P = Z({
32
+ padding: a
33
+ }), t[7] = a, t[8] = P) : P = t[8];
34
+ let S;
35
+ t[9] !== v || t[10] !== u || t[11] !== P ? (S = [v, u, P], t[9] = v, t[10] = u, t[11] = P, t[12] = S) : S = t[12];
36
+ let D;
37
+ t[13] !== p || t[14] !== c || t[15] !== f || t[16] !== S ? (D = {
38
+ placement: c,
39
+ open: p,
40
+ onOpenChange: f,
41
+ whileElementsMounted: se,
42
+ middleware: S
43
+ }, t[13] = p, t[14] = c, t[15] = f, t[16] = S, t[17] = D) : D = t[17];
44
+ const g = L(D), N = g.context;
45
+ let C;
46
+ t[18] === Symbol.for("react.memo_cache_sentinel") ? (C = {
47
+ enabled: !0
48
+ }, t[18] = C) : C = t[18];
49
+ const F = Q(N, C), b = T(N), _ = W(N);
50
+ let x;
51
+ t[19] !== F || t[20] !== b || t[21] !== _ ? (x = [F, b, _], t[19] = F, t[20] = b, t[21] = _, t[22] = x) : x = t[22];
52
+ const k = X(x);
53
+ let M, O;
54
+ return t[23] !== g || t[24] !== k || t[25] !== p || t[26] !== a || t[27] !== f ? (O = {
55
+ open: p,
56
+ popoverOffset: a,
57
+ setOpen: f,
58
+ ...k,
59
+ ...g
60
+ }, t[23] = g, t[24] = k, t[25] = p, t[26] = a, t[27] = f, t[28] = O) : O = t[28], M = O, M;
61
+ }, ie = (n) => {
62
+ if (!V(n))
63
+ throw new Error(E("DSPopover", "DSPopover.Anchor child must be a valid React element."));
64
+ }, ce = ({
65
+ hasContent: n,
66
+ hasAnchor: t
67
+ }) => {
68
+ if (!n)
69
+ throw new Error(E("DSPopover", "A DSPopover must have a <DSPopover.Content> component as a child. Please add it to the children of DSPopover."));
70
+ if (!t)
71
+ throw new Error(E("DSPopover", "A DSPopover.Anchor must have a <DSPopover.Anchor> component as a child. Please add it to the children of DSPopover."));
72
+ }, j = G(null), q = () => {
73
+ const n = J(j);
74
+ if (n == null)
75
+ throw new Error(E("DSPopover", "Components like DSPopover.Anchor or DSPopover.Content must be wrapped in <DSPopover />."));
76
+ return n;
77
+ }, y = (n) => {
78
+ const t = w.c(9);
79
+ let e, o;
80
+ t[0] !== n ? ({
81
+ children: e,
82
+ ...o
83
+ } = n, t[0] = n, t[1] = e, t[2] = o) : (e = t[1], o = t[2]);
84
+ let s;
85
+ t[3] !== o ? (s = {
86
+ ...o
87
+ }, t[3] = o, t[4] = s) : s = t[4];
88
+ const r = re(s), d = $(e, y.Content), i = $(e, R);
89
+ process.env.NODE_ENV !== "production" && ce({
90
+ hasContent: d,
91
+ hasAnchor: i
92
+ });
93
+ let l;
94
+ return t[5] !== e || t[6] !== r || t[7] !== o ? (l = /* @__PURE__ */ A(j.Provider, { value: r, ...o, children: e }), t[5] = e, t[6] = r, t[7] = o, t[8] = l) : l = t[8], l;
95
+ }, R = I((n, t) => {
96
+ const e = w.c(12);
97
+ let o, s;
98
+ e[0] !== n ? ({
99
+ children: o,
100
+ ...s
101
+ } = n, e[0] = n, e[1] = o, e[2] = s) : (o = e[1], s = e[2]), process.env.NODE_ENV !== "production" && ie(o);
102
+ const r = q(), d = o.ref;
103
+ let i;
104
+ e[3] !== d || e[4] !== r.refs.setReference || e[5] !== t ? (i = [r.refs.setReference, t, d], e[3] = d, e[4] = r.refs.setReference, e[5] = t, e[6] = i) : i = e[6];
105
+ const l = U(i);
106
+ if (V(o)) {
107
+ let c;
108
+ return e[7] !== o || e[8] !== r || e[9] !== s || e[10] !== l ? (c = H(o, r.getReferenceProps({
109
+ ref: l,
110
+ ...s,
111
+ ...o.props,
112
+ "data-state": r.open ? "open" : "closed"
113
+ })), e[7] = o, e[8] = r, e[9] = s, e[10] = l, e[11] = c) : c = e[11], c;
114
+ }
115
+ });
116
+ R.displayName = "DSPopover.Anchor";
117
+ const z = I((n, t) => {
118
+ const e = w.c(27);
119
+ let o, s, r;
120
+ e[0] !== n ? ({
121
+ style: r,
122
+ className: o,
123
+ ...s
124
+ } = n, e[0] = n, e[1] = o, e[2] = s, e[3] = r) : (o = e[1], s = e[2], r = e[3]);
125
+ const d = q();
126
+ let i, l;
127
+ e[4] !== d ? ({
128
+ context: i,
129
+ ...l
130
+ } = d, e[4] = d, e[5] = i, e[6] = l) : (i = e[5], l = e[6]);
131
+ let c;
132
+ e[7] !== t || e[8] !== l.refs.setFloating ? (c = [l.refs.setFloating, t], e[7] = t, e[8] = l.refs.setFloating, e[9] = c) : c = e[9];
133
+ const a = U(c);
134
+ if (!i.open)
135
+ return null;
136
+ let h;
137
+ e[10] !== l.floatingStyles || e[11] !== r ? (h = {
138
+ ...l.floatingStyles,
139
+ ...r
140
+ }, e[10] = l.floatingStyles, e[11] = r, e[12] = h) : h = e[12];
141
+ let m;
142
+ e[13] !== o ? (m = oe(le.popover, o), e[13] = o, e[14] = m) : m = e[14];
143
+ let p;
144
+ e[15] !== s || e[16] !== l ? (p = l.getFloatingProps(s), e[15] = s, e[16] = l, e[17] = p) : p = e[17];
145
+ let f;
146
+ e[18] !== s.children || e[19] !== a || e[20] !== h || e[21] !== m || e[22] !== p ? (f = /* @__PURE__ */ A("div", { ref: a, style: h, className: m, ...p, children: s.children }), e[18] = s.children, e[19] = a, e[20] = h, e[21] = m, e[22] = p, e[23] = f) : f = e[23];
147
+ let v;
148
+ return e[24] !== i || e[25] !== f ? (v = /* @__PURE__ */ A(ee, { children: /* @__PURE__ */ A(te, { context: i, modal: !1, children: f }) }), e[24] = i, e[25] = f, e[26] = v) : v = e[26], v;
149
+ });
150
+ z.displayName = "DSPopover.Content";
151
+ y.Anchor = R;
152
+ y.Content = z;
153
+ y.displayName = "DSPopover";
154
+ export {
155
+ y as D,
156
+ ce as a,
157
+ re as u,
158
+ ie as v
159
+ };