@stihl-design-system/components 1.0.0-RC.25 → 1.0.0-RC.27

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 (164) hide show
  1. package/{accordion.Dw3qTPN8.js → accordion.CBaDU14g.js} +2 -2
  2. package/{actionbutton.wYg4A5a2.js → actionbutton.DEJsLxnQ.js} +2 -2
  3. package/{actionlink.BoWrs0Mo.js → actionlink.Cs6BTCA3.js} +2 -2
  4. package/{arialiveregions.DVsA5OTR.js → arialiveregions.Fgcshs5k.js} +1 -1
  5. package/assets/ActionButton.Ewi0i1hW.css +1 -0
  6. package/assets/ActionLink.BdPEvuGm.css +1 -0
  7. package/assets/CustomReactSelect.B9f_KYFg.css +1 -0
  8. package/assets/Icon.QeJ7TxZs.css +1 -0
  9. package/assets/InputFile.Dqjz53mb.css +1 -0
  10. package/assets/InputPassword.BuVQ9dRy.css +1 -0
  11. package/assets/InputSearch.Dwtb3Mhw.css +1 -0
  12. package/assets/InputStepper.CBt99L83.css +1 -0
  13. package/assets/Popover.BDTDsPAt.css +1 -0
  14. package/assets/Select.CghDnBUQ.css +1 -0
  15. package/assets/Textarea.BgtH-TTe.css +1 -0
  16. package/assets/banner.D9EiZqqR.css +1 -0
  17. package/assets/input.DFwunFjw.css +1 -0
  18. package/assets/radio.BCB51D_y.css +1 -0
  19. package/assets/scroller.Hszs1Yq4.css +1 -0
  20. package/banner.CgQdUb_c.js +55 -0
  21. package/banner.d.ts +2 -0
  22. package/{breadcrumb.C07HDyGp.js → breadcrumb.x78HJy5P.js} +3 -3
  23. package/{button.BBqDvwVm.js → button.BD_04tIG.js} +3 -3
  24. package/{buttonround.Vy1EygFm.js → buttonround.BT3OfowK.js} +2 -2
  25. package/{checkbox.CvWI1Jrx.js → checkbox.BktYXQmJ.js} +3 -3
  26. package/{checkboxgroup.BLpSLo9t.js → checkboxgroup.YK8H0YoX.js} +2 -2
  27. package/{chip.BsDriMfL.js → chip.BKtNbt4y.js} +2 -2
  28. package/chipgroup.BWpqUzXF.js +209 -0
  29. package/chunks/{Accordion.Cjc_1Bu1.js → Accordion.eVOD7J_8.js} +2 -2
  30. package/chunks/ActionButton.Ck1rGqgm.js +165 -0
  31. package/chunks/ActionLink.DnUNjoAT.js +138 -0
  32. package/chunks/{AriaLiveRegions.utils.zSFFD3SF.js → AriaLiveRegions.utils.Cb327d_2.js} +1 -1
  33. package/chunks/{Breadcrumb.QhD6byzd.js → Breadcrumb.B7g30dIO.js} +3 -3
  34. package/chunks/{Button.DZNUuPKC.js → Button.CC0qEsuR.js} +4 -4
  35. package/chunks/{Checkbox.Ch8DBzws.js → Checkbox.BIQAKBVy.js} +3 -3
  36. package/chunks/{CheckboxGroup.C8D6tjVI.js → CheckboxGroup.DHzpgOWp.js} +3 -3
  37. package/chunks/{Chip.CHy8cZJz.js → Chip.DifLxHH7.js} +3 -3
  38. package/chunks/{CustomReactSelect.hdDSE0ON.js → CustomReactSelect.BPnzhvw1.js} +1356 -1593
  39. package/chunks/{Dialog.DPeGj8-T.js → Dialog.BuEEJ199.js} +2 -2
  40. package/chunks/{Drawer.BMibxANc.js → Drawer.BXUGmpJI.js} +2 -2
  41. package/chunks/{Fieldset.DHccz6TP.js → Fieldset.BX46NuLh.js} +2 -2
  42. package/chunks/Header.Djs1adPW.js +361 -0
  43. package/chunks/{Icon.CAXZUNWo.js → Icon.C0161Glk.js} +70 -67
  44. package/chunks/{Input.utils.CCYTBWD_.js → Input.utils.Cnnzvuk4.js} +1 -1
  45. package/chunks/{InputFile.fltVIulD.js → InputFile.vkkg5Pab.js} +32 -32
  46. package/chunks/InputPassword.D42uUEGy.js +136 -0
  47. package/chunks/InputSearch.aIbUXVQU.js +174 -0
  48. package/chunks/InputStepper.DFEdUWm7.js +263 -0
  49. package/chunks/{LinkButton.DyTU9sfN.js → LinkButton.DmXVHeyZ.js} +3 -3
  50. package/chunks/{NavigationTabList.D2NVVTjK.js → NavigationTabList.IQM074Vb.js} +1 -1
  51. package/chunks/{NavigationTabs.TfdsA8GX.js → NavigationTabs.BofhX8bD.js} +2 -2
  52. package/chunks/{Notification.BRg1qlng.js → Notification.B-3dPVUE.js} +2 -2
  53. package/chunks/Popover.hXQTvwwd.js +1685 -0
  54. package/chunks/{RadioGroup.D9mECdMK.js → RadioGroup.c7YYJdUe.js} +3 -3
  55. package/chunks/{Select.DCxMPsCm.js → Select.B_EHpk22.js} +25 -25
  56. package/chunks/{Slider.Cljc14kS.js → Slider.DMSwmGwD.js} +2 -2
  57. package/chunks/{Tabs.GvcCCCFT.js → Tabs.Bl4K3Kjn.js} +2 -2
  58. package/chunks/{Text.TS4XdA9e.js → Text.DGWeWF1y.js} +1 -1
  59. package/chunks/{Textarea.Bs4-nzu8.js → Textarea.Ce26v6ht.js} +54 -54
  60. package/chunks/{Toast.DawJ9OSY.js → Toast.BHz0vlGz.js} +2 -2
  61. package/chunks/floating-ui.dom.C9TD1WpB.js +950 -0
  62. package/chunks/helpers.BbWkXTr3.js +37 -0
  63. package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
  64. package/{combobox.DW_ey38o.js → combobox.AaK6QjRl.js} +1 -1
  65. package/components/ActionButton/ActionButton.d.ts +9 -5
  66. package/components/ActionButton/ActionButton.utils.d.ts +4 -2
  67. package/components/ActionLink/ActionLink.d.ts +9 -5
  68. package/components/ActionLink/ActionLink.utils.d.ts +4 -2
  69. package/components/Banner/Banner.d.ts +32 -0
  70. package/components/Banner/Banner.utils.d.ts +2 -0
  71. package/components/Button/Button.utils.d.ts +1 -1
  72. package/components/Header/Header.utils.d.ts +0 -2
  73. package/components/Icon/Icon.d.ts +1 -1
  74. package/components/Icon/Icon.utils.d.ts +1 -1
  75. package/components/Popover/Popover.d.ts +40 -0
  76. package/components/Popover/Popover.test.d.ts +1 -0
  77. package/components/Popover/Popover.utils.d.ts +53 -0
  78. package/components/Popover/Popover.utils.test.d.ts +1 -0
  79. package/components/Scroller/Scroller.d.ts +20 -0
  80. package/components/Scroller/Scroller.utils.d.ts +3 -0
  81. package/components/Tabs/TabList/TabList.d.ts +1 -1
  82. package/components/Tabs/TabList/TabList.utils.d.ts +0 -4
  83. package/connected-icon.svg +1 -0
  84. package/{customreactselect.DcH7h1mb.js → customreactselect.Bu1i8wkh.js} +4 -4
  85. package/{dialog.D6d_WXOM.js → dialog.CGsUCqhR.js} +2 -2
  86. package/{drawer.BmQWFOuF.js → drawer.BcAo4TO0.js} +2 -2
  87. package/{fieldset.D6q9YXrO.js → fieldset.DM9ELUJa.js} +2 -2
  88. package/{filelist.Dnd5nOdw.js → filelist.Cj9U-Jx8.js} +3 -3
  89. package/{flag.BR312AU-.js → flag.BHaAfp6B.js} +1 -1
  90. package/{floatingactionbutton.Do6eNSHq.js → floatingactionbutton.DSZXUHB_.js} +2 -2
  91. package/{header.5iwPmK5V.js → header.WhQHSuB1.js} +2 -2
  92. package/{icon.HkVs68n_.js → icon.DwfGhFCd.js} +1 -1
  93. package/icon.svg +1 -1
  94. package/imow-icon.svg +1 -0
  95. package/index.d.ts +6 -0
  96. package/index.es.js +201 -188
  97. package/{input.mPceLGnf.js → input.DhxUW3zc.js} +37 -37
  98. package/{inputfile.CIpE9i-3.js → inputfile.Cmkxf4Vq.js} +6 -6
  99. package/{inputpassword.DkiyI-yo.js → inputpassword.CaJBCMA0.js} +3 -3
  100. package/{inputsearch.DcOp_VUd.js → inputsearch.B06DhYzo.js} +4 -4
  101. package/{inputstepper.D7TpDXst.js → inputstepper.DNY7nzP8.js} +4 -4
  102. package/{link.B5NZ1QKr.js → link.DGuYGfh2.js} +2 -2
  103. package/{linkbutton.CMVcQVxI.js → linkbutton.B3q0B_yb.js} +3 -3
  104. package/{logo.B9taqlZR.js → logo.C96KaG1P.js} +1 -1
  105. package/mystihl-icon.svg +1 -0
  106. package/{navigationtablist.BMJTC9qo.js → navigationtablist.CS9yEGdP.js} +2 -2
  107. package/{navigationtabs.BQeKKIFy.js → navigationtabs.DQ1kE-h4.js} +2 -2
  108. package/{notification.Bzli8Qlq.js → notification.D8BDaU5x.js} +3 -3
  109. package/{optioncheckbox.DYKRBTy0.js → optioncheckbox.CEEPAq0u.js} +1 -1
  110. package/package.json +4 -2
  111. package/partials/assets.const.js +2 -0
  112. package/partials/copyAssets.js +4 -2
  113. package/partials/index.js +109 -81
  114. package/partials/lib/partials.d.ts +1 -1
  115. package/popover.BFx99cHg.js +10 -0
  116. package/popover.d.ts +2 -0
  117. package/radio.Be4pFOLf.js +134 -0
  118. package/{radiogroup.BnMkpjvV.js → radiogroup.BRjwP01C.js} +3 -3
  119. package/scroller.CCA6kFR6.js +123 -0
  120. package/scroller.d.ts +2 -0
  121. package/{select.BSvjDIVC.js → select.3zE96eWc.js} +3 -3
  122. package/{skiptocontent.CQ4aARqd.js → skiptocontent.D1UkPmhD.js} +2 -2
  123. package/{slider.LRlFFlYL.js → slider.CTCf7Xdm.js} +2 -2
  124. package/{spinner.t5FHjIEK.js → spinner.CeGt8DxU.js} +1 -1
  125. package/{switch.QUUSE9ZF.js → switch.CtULjgZq.js} +2 -2
  126. package/{systemfeedback.BpKZEv4U.js → systemfeedback.CLQCbTF6.js} +1 -1
  127. package/tablist.Dzwe0_J4.js +256 -0
  128. package/{tabs.CXkSN2kd.js → tabs.yudjJk9d.js} +2 -2
  129. package/{text.CPwbk8Gy.js → text.ZOUuesnU.js} +2 -2
  130. package/{textarea.D0ADOdR6.js → textarea.B_3fPtmd.js} +3 -3
  131. package/{toast.CYYvK4DJ.js → toast.Bhpwj1NF.js} +3 -3
  132. package/{toastmanager.k9iGb7MN.js → toastmanager.BHk65ynQ.js} +3 -3
  133. package/topbar.2b8fjmA4.js +11 -0
  134. package/utils/get-rect.d.ts +4 -0
  135. package/utils/get-rect.test.d.ts +1 -0
  136. package/utils/helpers.d.ts +10 -0
  137. package/utils/index.d.ts +2 -1
  138. package/utils/is-animation-disabled.d.ts +14 -0
  139. package/utils/is-animation-disabled.test.d.ts +1 -0
  140. package/assets/ActionButton.DZVAnm-p.css +0 -1
  141. package/assets/ActionLink.DuklSL3c.css +0 -1
  142. package/assets/CustomReactSelect.B8l6al4B.css +0 -1
  143. package/assets/Icon.ZNrKuqgu.css +0 -1
  144. package/assets/InputFile.Dx_CULYq.css +0 -1
  145. package/assets/InputPassword.CkHF5zCh.css +0 -1
  146. package/assets/InputSearch.BV8Q2EUL.css +0 -1
  147. package/assets/InputStepper.DzzrAdma.css +0 -1
  148. package/assets/Select.e1fTfWmm.css +0 -1
  149. package/assets/Textarea.BGV7Z0Z9.css +0 -1
  150. package/assets/input.Cj4tF_F7.css +0 -1
  151. package/assets/radio.CqaNn1Gz.css +0 -1
  152. package/chipgroup.D1Km301k.js +0 -186
  153. package/chunks/ActionButton.DFI8P9-f.js +0 -159
  154. package/chunks/ActionLink.CLQ1yQZF.js +0 -132
  155. package/chunks/Header.DPafHEKw.js +0 -384
  156. package/chunks/InputPassword.C4QhwijC.js +0 -136
  157. package/chunks/InputSearch.DdWBmEmu.js +0 -174
  158. package/chunks/InputStepper.BRzbuEho.js +0 -263
  159. package/chunks/helpers.CcqWV-wZ.js +0 -8
  160. package/radio.Dm9bDBzM.js +0 -134
  161. package/tablist.DGGeFOi1.js +0 -266
  162. package/topbar.BPSDyH0N.js +0 -10
  163. package/utils/isAnimationDisabled.d.ts +0 -1
  164. /package/components/{Tabs/TabList/TabList.utils.test.d.ts → Banner/Banner.test.d.ts} +0 -0
package/radio.Dm9bDBzM.js DELETED
@@ -1,134 +0,0 @@
1
- "use client";
2
- import { jsx as W, jsxs as ce } from "react/jsx-runtime";
3
- import { d as pe } from "./chunks/index.CgTHIF3K.js";
4
- import { c as L } from "./chunks/index.CEyLAtio.js";
5
- import { forwardRef as xe, useRef as he, useState as Ce, useEffect as ye } from "react";
6
- import { u as ze } from "./chunks/useBreakpoint.CMOR9ZOB.js";
7
- import './assets/radio.CqaNn1Gz.css';const be = (B) => B.replace(/\s+/g, ""), ke = "ds-radio_root_zsxsb_1", He = "ds-radio_root--disabled_zsxsb_24", ge = "ds-radio_root--with-custom-area_zsxsb_27", Ne = "ds-radio_root--with-custom-area--above_zsxsb_30", We = "ds-radio_radio_zsxsb_36", Be = "ds-radio_dot_zsxsb_54", De = "ds-radio_radio--invalid_zsxsb_78", Se = "ds-radio_label_zsxsb_83", Ue = "ds-radio_label--bold_zsxsb_100", Ie = "ds-radio_label--hidden_zsxsb_111", Ve = "ds-radio_label--with-custom-area_zsxsb_123", $e = "ds-radio_custom-area_zsxsb_127", we = "ds-radio_custom-area--above_zsxsb_135", je = "ds-radio_hint_zsxsb_141", Le = "ds-radio_hint--visible_zsxsb_165", Ee = "ds-radio_hint--unchecked-hidden_zsxsb_169", Oe = "ds-radio_hint--hidden_zsxsb_173", Pe = "ds-radio_input_zsxsb_186", t = {
8
- root: ke,
9
- rootDisabled: He,
10
- rootWithCustomArea: ge,
11
- rootWithCustomAreaAbove: Ne,
12
- radio: We,
13
- dot: Be,
14
- radioInvalid: De,
15
- label: Se,
16
- labelBold: Ue,
17
- labelHidden: Ie,
18
- labelWithCustomArea: Ve,
19
- customArea: $e,
20
- customAreaAbove: we,
21
- hint: je,
22
- hintVisible: Le,
23
- hintUncheckedHidden: Ee,
24
- hintHidden: Oe,
25
- input: Pe
26
- }, Re = xe((B, f) => {
27
- const e = pe.c(87);
28
- let D, m, s, r, i, n, c, h, v, S, U, I, V, $, w, j, b;
29
- e[0] !== B ? ({
30
- label: n,
31
- name: c,
32
- value: b,
33
- checked: D,
34
- className: m,
35
- customArea: s,
36
- isCustomAreaAbove: S,
37
- defaultChecked: U,
38
- disabled: I,
39
- fieldsetId: r,
40
- hideLabel: V,
41
- hint: i,
42
- invalid: $,
43
- isBold: w,
44
- hideUncheckedHint: j,
45
- onChange: h,
46
- ...v
47
- } = B, e[0] = B, e[1] = D, e[2] = m, e[3] = s, e[4] = r, e[5] = i, e[6] = n, e[7] = c, e[8] = h, e[9] = v, e[10] = S, e[11] = U, e[12] = I, e[13] = V, e[14] = $, e[15] = w, e[16] = j, e[17] = b) : (D = e[1], m = e[2], s = e[3], r = e[4], i = e[5], n = e[6], c = e[7], h = e[8], v = e[9], S = e[10], U = e[11], I = e[12], V = e[13], $ = e[14], w = e[15], j = e[16], b = e[17]);
48
- const u = S === void 0 ? !1 : S, ue = U === void 0 ? !1 : U, d = I === void 0 ? !1 : I, _e = V === void 0 ? !1 : V, A = $ === void 0 ? !1 : $, Y = w === void 0 ? !1 : w, l = j === void 0 ? !1 : j, fe = he(null), a = he(null), [me, ve] = Ce(ue), E = D !== void 0, o = E ? D : me;
49
- let O;
50
- e[18] !== o || e[19] !== l ? (O = () => {
51
- a.current && l && ((a.current.style.height === "0px" || a.current.style.height === "") && o ? (a.current.style.height = `${a.current.scrollHeight}px`, a.current.style.opacity = "1") : o || (a.current.style.opacity = "0", a.current.style.height = "0px"));
52
- }, e[18] = o, e[19] = l, e[20] = O) : O = e[20];
53
- let P;
54
- e[21] !== o ? (P = [a, o], e[21] = o, e[22] = P) : P = e[22], ye(O, P);
55
- const p = ze(_e), Z = !!s, ee = !!s && u;
56
- let R;
57
- e[23] !== m || e[24] !== d || e[25] !== Z || e[26] !== ee ? (R = L(t.root, {
58
- [t.rootDisabled]: d,
59
- [t.rootWithCustomArea]: Z,
60
- [t.rootWithCustomAreaAbove]: ee
61
- }, m), e[23] = m, e[24] = d, e[25] = Z, e[26] = ee, e[27] = R) : R = e[27];
62
- const te = R, se = !!s;
63
- let q;
64
- e[28] !== p || e[29] !== Y || e[30] !== se ? (q = L(t.label, {
65
- [t.labelBold]: Y,
66
- [t.labelHidden]: p,
67
- [t.labelWithCustomArea]: se
68
- }), e[28] = p, e[29] = Y, e[30] = se, e[31] = q) : q = e[31];
69
- const oe = q;
70
- let F;
71
- e[32] !== o || e[33] !== l || e[34] !== i ? (F = () => !l && i ? !0 : !!(l && i && o), e[32] = o, e[33] = l, e[34] = i, e[35] = F) : F = e[35];
72
- const ie = F;
73
- let G;
74
- e[36] !== p || e[37] !== l || e[38] !== ie ? (G = L(t.hint, {
75
- [t.hintHidden]: p,
76
- [t.hintUncheckedHidden]: l,
77
- [t.hintVisible]: ie()
78
- }), e[36] = p, e[37] = l, e[38] = ie, e[39] = G) : G = e[39];
79
- const le = G;
80
- let J;
81
- e[40] !== A ? (J = L(t.radio, {
82
- [t.radioInvalid]: A
83
- }), e[40] = A, e[41] = J) : J = e[41];
84
- const ae = J;
85
- let K;
86
- e[42] === Symbol.for("react.memo_cache_sentinel") ? (K = L(t.customArea, t.customAreaAbove), e[42] = K) : K = e[42];
87
- const Ae = K;
88
- let M;
89
- e[43] !== d || e[44] !== E || e[45] !== h ? (M = (_) => {
90
- if (d) {
91
- _.preventDefault();
92
- return;
93
- }
94
- E || ve(_.target.checked), h && h(_);
95
- }, e[43] = d, e[44] = E, e[45] = h, e[46] = M) : M = e[46];
96
- const de = M, x = i ? `${be(c)}-${be(b)}-description` : void 0;
97
- let Q;
98
- e[47] !== x || e[48] !== r || e[49] !== A ? (Q = [A && r && `${r}-feedback`, x].filter(Boolean).join(" ") || void 0, e[47] = x, e[48] = r, e[49] = A, e[50] = Q) : Q = e[50];
99
- const ne = Q;
100
- let C;
101
- e[51] !== f ? (C = (_) => {
102
- typeof f == "function" ? f(_) : f !== null && (f.current = _), fe.current = _;
103
- }, e[51] = f, e[52] = C) : C = e[52];
104
- const re = typeof n == "string" ? n : void 0;
105
- let y;
106
- e[53] !== ne || e[54] !== o || e[55] !== d || e[56] !== de || e[57] !== c || e[58] !== v || e[59] !== C || e[60] !== re || e[61] !== b ? (y = /* @__PURE__ */ W("input", { type: "radio", value: b, name: c, className: t.input, ref: C, onChange: de, ...v, disabled: d, checked: o, "aria-label": re, "aria-describedby": ne }), e[53] = ne, e[54] = o, e[55] = d, e[56] = de, e[57] = c, e[58] = v, e[59] = C, e[60] = re, e[61] = b, e[62] = y) : y = e[62];
107
- let T;
108
- e[63] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ W("div", { className: t.dot }), e[63] = T) : T = e[63];
109
- let z;
110
- e[64] !== ae ? (z = /* @__PURE__ */ W("span", { className: ae, children: T }), e[64] = ae, e[65] = z) : z = e[65];
111
- let k;
112
- e[66] !== s || e[67] !== u ? (k = s && u && /* @__PURE__ */ W("div", { className: Ae, children: s }), e[66] = s, e[67] = u, e[68] = k) : k = e[68];
113
- let H;
114
- e[69] !== s || e[70] !== u ? (H = s && !u && /* @__PURE__ */ W("div", { className: t.customArea, children: s }), e[69] = s, e[70] = u, e[71] = H) : H = e[71];
115
- let g;
116
- e[72] !== x || e[73] !== i || e[74] !== le ? (g = /* @__PURE__ */ W("span", { id: x, className: le, ref: a, children: i }), e[72] = x, e[73] = i, e[74] = le, e[75] = g) : g = e[75];
117
- let N;
118
- e[76] !== n || e[77] !== oe || e[78] !== H || e[79] !== g ? (N = /* @__PURE__ */ ce("span", { className: oe, children: [
119
- n,
120
- H,
121
- g
122
- ] }), e[76] = n, e[77] = oe, e[78] = H, e[79] = g, e[80] = N) : N = e[80];
123
- let X;
124
- return e[81] !== te || e[82] !== y || e[83] !== z || e[84] !== k || e[85] !== N ? (X = /* @__PURE__ */ ce("label", { className: te, children: [
125
- y,
126
- z,
127
- k,
128
- N
129
- ] }), e[81] = te, e[82] = y, e[83] = z, e[84] = k, e[85] = N, e[86] = X) : X = e[86], X;
130
- });
131
- Re.displayName = "DSRadio";
132
- export {
133
- Re as DSRadio
134
- };
@@ -1,266 +0,0 @@
1
- "use client";
2
- import { jsx as g, jsxs as me } from "react/jsx-runtime";
3
- import { d as ke } from "./chunks/index.CgTHIF3K.js";
4
- import { c as re } from "./chunks/index.CEyLAtio.js";
5
- import { useState as he, useRef as P, useEffect as xe } from "react";
6
- import { h as ge } from "./chunks/has-window.ut_-aShB.js";
7
- import { g as Ee } from "./chunks/helpers.CcqWV-wZ.js";
8
- import { u as be } from "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
9
- import { D as Re } from "./chunks/Button.DZNUuPKC.js";
10
- import { D as We } from "./chunks/Icon.CAXZUNWo.js";
11
- import { NumberIndicator as Me } from "./numberindicator.Ddf3ESi7.js";
12
- import { g as Pe, a as Ie } from "./chunks/TabPane.utils.DG16Y2uD.js";
13
- import { s as f, N as ze } from "./chunks/NavigationTabList.D2NVVTjK.js";
14
- const pe = () => {
15
- if (ge) {
16
- const i = getComputedStyle(document.documentElement).getPropertyValue("--ds-animation-duration").trim();
17
- return i === "0s" || i === "0ms";
18
- } else
19
- return !0;
20
- }, p = (i) => ge && (i == null ? void 0 : i.getBoundingClientRect()) || DOMRect.fromRect({
21
- x: 0,
22
- y: 0,
23
- width: 0,
24
- height: 0
25
- }), z = 48, Ue = (i) => {
26
- const e = ke.c(62);
27
- let v, T, m, A, y, s, V, H, O, h, l;
28
- e[0] !== i ? ({
29
- aria: v,
30
- id: h,
31
- selectedTabIndex: s,
32
- setSelectedTabIndex: V,
33
- tabs: l,
34
- alignment: H,
35
- className: T,
36
- defaultSelectedTabIndex: O,
37
- isNavigation: m,
38
- onTabChange: A,
39
- ...y
40
- } = i, e[0] = i, e[1] = v, e[2] = T, e[3] = m, e[4] = A, e[5] = y, e[6] = s, e[7] = V, e[8] = H, e[9] = O, e[10] = h, e[11] = l) : (v = e[1], T = e[2], m = e[3], A = e[4], y = e[5], s = e[6], V = e[7], H = e[8], O = e[9], h = e[10], l = e[11]);
41
- const X = H === void 0 ? "left" : H, Le = O === void 0 ? 0 : O, [j, b] = he(Le), [Se, De] = he(!1), [Ne, Be] = he(!1);
42
- let _;
43
- e[12] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[12] = _) : _ = e[12];
44
- const w = P(_), R = P(null), a = P(null), u = P(null), $ = P(!1), ve = P(s), ne = () => {
45
- ye(), Ce();
46
- };
47
- let q;
48
- e[13] === Symbol.for("react.memo_cache_sentinel") ? (q = [], e[13] = q) : q = e[13], be(() => {
49
- const n = new ResizeObserver(ne);
50
- return a.current && n.observe(a.current), () => {
51
- n.disconnect();
52
- };
53
- }, q);
54
- let F;
55
- e[14] !== X || e[15] !== l ? (F = [l, X], e[14] = X, e[15] = l, e[16] = F) : F = e[16], be(() => {
56
- var o;
57
- const n = ["16px 'STIHL Contraface Digital Text Regular'", "14px 'STIHL Contraface Digital Text Demi'", "16px 'STIHL Contraface Digital Text Bold'"];
58
- Promise.all(n.map(Ae)).then(() => {
59
- oe(s), K("next", s, "instant"), ye(), $.current = !0;
60
- }).catch(He);
61
- const t = () => {
62
- !$.current || !u.current || (r.matches ? u.current.style.transitionDuration = "0s" : u.current.style.transitionDuration = "");
63
- }, r = window.matchMedia("(prefers-reduced-motion: reduce)");
64
- return r.addEventListener("change", t), (o = a.current) == null || o.addEventListener("scroll", ne), () => {
65
- var c;
66
- r.removeEventListener("change", t), (c = a.current) == null || c.removeEventListener("scroll", ne);
67
- };
68
- }, F);
69
- let G;
70
- e[17] !== s ? (G = [s], e[17] = s, e[18] = G) : G = e[18], be(() => {
71
- if ($.current && (oe(s), m)) {
72
- const n = Te(s);
73
- b(s), K(n, s);
74
- }
75
- ve.current = s;
76
- }, G);
77
- let Q, J;
78
- e[19] !== j ? (Q = () => {
79
- var n;
80
- $.current && ((n = w.current[j]) == null || n.focus());
81
- }, J = [j], e[19] = j, e[20] = Q, e[21] = J) : (Q = e[20], J = e[21]), xe(Q, J);
82
- const I = (n) => {
83
- const t = Te(n);
84
- V(n), b(n), K(t, n), A && A(n);
85
- }, Te = (n) => {
86
- const t = p(a.current), r = p(w.current[n]);
87
- let o;
88
- return r.left - z < t.left ? o = "prev" : r.right + z > t.right ? o = "next" : o = s < n ? "next" : "prev", o;
89
- }, ye = () => {
90
- if (a.current && R.current) {
91
- const n = p(a.current), t = p(R.current);
92
- De(t.left < n.left), Be(t.right > n.right + 4);
93
- }
94
- };
95
- let U;
96
- e[22] === Symbol.for("react.memo_cache_sentinel") ? (U = (n) => {
97
- const t = n === void 0 ? 0 : n;
98
- ge && u.current && !pe() && !window.matchMedia("(prefers-reduced-motion: reduce)").matches && setTimeout(() => {
99
- u.current && (u.current.style.transitionDuration = "250ms");
100
- }, t);
101
- }, e[22] = U) : U = e[22];
102
- const we = U, Ce = () => {
103
- u.current && (u.current.style.transitionDuration = "0s", oe(ve.current), we());
104
- }, oe = (n) => {
105
- const t = u.current, r = p(w.current[n]), o = p(R.current), c = r.left - o.left;
106
- t && ($.current ? (t.style.width = `${r.width}px`, t.style.transform = `translateX(${c}px)`) : (t.style.transitionDuration = "0s", t.style.transform = `translateX(${c}px)`, t.style.width = `${r.width}px`, we(50)));
107
- }, se = (n, t) => {
108
- let r;
109
- e: switch (n.key) {
110
- case "ArrowLeft": {
111
- r = (t > 0 ? t : l.length) - 1, b(r);
112
- break e;
113
- }
114
- case "ArrowRight": {
115
- r = (t + 1) % l.length, b(r);
116
- break e;
117
- }
118
- case "Home": {
119
- r = 0, b(r);
120
- break e;
121
- }
122
- case "End": {
123
- r = l.length - 1, b(r);
124
- break e;
125
- }
126
- case "Enter":
127
- case " ": {
128
- I(t);
129
- return;
130
- }
131
- default:
132
- return;
133
- }
134
- if (r !== void 0) {
135
- const o = r > t ? "next" : "prev";
136
- setTimeout(() => K(o, r), 0);
137
- }
138
- n.preventDefault();
139
- }, ce = (n, t) => {
140
- let r;
141
- e: switch (n.key) {
142
- case "Tab": {
143
- if (n.shiftKey) {
144
- r = t - 1 < 0 ? 0 : t - 1, b(r), t !== 0 && n.preventDefault();
145
- break e;
146
- } else
147
- r = t + 1 > l.length - 1 ? t : t + 1, b(r), t !== l.length - 1 && n.preventDefault();
148
- break e;
149
- }
150
- case "Enter": {
151
- I(t);
152
- return;
153
- }
154
- default:
155
- return;
156
- }
157
- if (r !== void 0) {
158
- const o = r > t ? "next" : "prev";
159
- setTimeout(() => K(o, r), 0);
160
- }
161
- }, K = (n, t, r) => {
162
- const o = r === void 0 ? "smooth" : r, c = w.current[t], W = a.current, M = p(c), ue = p(W);
163
- let de;
164
- if (!(!c || !W)) {
165
- if (n === "prev") {
166
- if (M.left - z > ue.left)
167
- return;
168
- de = c.offsetLeft - z;
169
- } else {
170
- if (M.right + z < ue.right)
171
- return;
172
- de = c.offsetLeft + c.offsetWidth - ue.width + z;
173
- }
174
- W.scrollTo({
175
- left: de,
176
- behavior: pe() ? "instant" : o
177
- });
178
- }
179
- };
180
- let d;
181
- if (e[23] === Symbol.for("react.memo_cache_sentinel")) {
182
- d = (t) => {
183
- var o;
184
- const r = n(t);
185
- (o = a.current) == null || o.scrollTo({
186
- left: r,
187
- behavior: pe() ? "instant" : "smooth"
188
- });
189
- };
190
- const n = (t) => {
191
- if (!R.current || !a.current)
192
- return 0;
193
- const {
194
- scrollLeft: r,
195
- offsetWidth: o
196
- } = a.current, c = Math.round(o * 0.2);
197
- return t === "next" ? r + c : r - c;
198
- };
199
- e[23] = d;
200
- } else
201
- d = e[23];
202
- const le = X === "center";
203
- let Y;
204
- e[24] !== le ? (Y = re(f.scroller, {
205
- [f.scrollerCentered]: le
206
- }), e[24] = le, e[25] = Y) : Y = e[25];
207
- const Z = Y, ie = m ? "nav" : "div";
208
- let L;
209
- e[26] !== T ? (L = re(f.tabsWrapper, T), e[26] = T, e[27] = L) : L = e[27];
210
- let S;
211
- e[28] !== se || e[29] !== ce || e[30] !== m || e[31] !== Z || e[32] !== s || e[33] !== I || e[34] !== h || e[35] !== l ? (S = m ? /* @__PURE__ */ g(ze, { tabs: l, tabRefs: w, scrollerRef: R, handleNavigationKeydown: ce, scrollerClass: Z, selectedTabIndex: s, setSelectedTab: I }) : /* @__PURE__ */ g("div", { role: "tablist", className: Z, ref: R, children: l.map((n, t) => {
212
- const {
213
- id: r,
214
- label: o,
215
- iconName: c,
216
- numberIndicatorValue: W
217
- } = n;
218
- return /* @__PURE__ */ me("button", { id: Ie(h, r), role: "tab", "aria-selected": s === t, "aria-controls": Pe(h, r, t), tabIndex: s === t ? 0 : -1, className: f.tab, ref: (M) => {
219
- w.current[t] = M;
220
- }, onClick: () => I(t), onKeyDown: (M) => se(M, t), children: [
221
- c && /* @__PURE__ */ g(We, { name: c, "aria-hidden": "true" }),
222
- o,
223
- W && /* @__PURE__ */ g(Me, { label: W })
224
- ] }, Ie(h, r));
225
- }) }), e[28] = se, e[29] = ce, e[30] = m, e[31] = Z, e[32] = s, e[33] = I, e[34] = h, e[35] = l, e[36] = S) : S = e[36];
226
- let ee;
227
- e[37] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ g("span", { className: f.indicator, ref: u }), e[37] = ee) : ee = e[37];
228
- let D;
229
- e[38] !== ie || e[39] !== v || e[40] !== S ? (D = /* @__PURE__ */ me(ie, { className: f.scrollWrapper, ref: a, ...v, children: [
230
- S,
231
- ee
232
- ] }), e[38] = ie, e[39] = v, e[40] = S, e[41] = D) : D = e[41];
233
- const ae = !Se;
234
- let N;
235
- e[42] !== ae ? (N = re(f.scrollButton, {
236
- [f.scrollButtonHidden]: ae
237
- }), e[42] = ae, e[43] = N) : N = e[43];
238
- let B;
239
- e[44] !== d ? (B = () => d("prev"), e[44] = d, e[45] = B) : B = e[45];
240
- let C;
241
- e[46] !== N || e[47] !== B ? (C = /* @__PURE__ */ g(Re, { variant: "filled", className: N, hideLabel: !0, iconName: "chevron-left", tabIndex: -1, size: "small", onClick: B, children: "Left" }), e[46] = N, e[47] = B, e[48] = C) : C = e[48];
242
- const fe = !Ne;
243
- let k;
244
- e[49] !== fe ? (k = re(f.scrollButton, f.scrollButtonRight, {
245
- [f.scrollButtonHidden]: fe
246
- }), e[49] = fe, e[50] = k) : k = e[50];
247
- let x;
248
- e[51] !== d ? (x = () => d("next"), e[51] = d, e[52] = x) : x = e[52];
249
- let E;
250
- e[53] !== k || e[54] !== x ? (E = /* @__PURE__ */ g(Re, { variant: "filled", className: k, hideLabel: !0, iconName: "chevron-right", tabIndex: -1, size: "small", onClick: x, children: "Right" }), e[53] = k, e[54] = x, e[55] = E) : E = e[55];
251
- let te;
252
- return e[56] !== y || e[57] !== L || e[58] !== D || e[59] !== C || e[60] !== E ? (te = /* @__PURE__ */ me("div", { className: L, ...y, children: [
253
- D,
254
- C,
255
- E
256
- ] }), e[56] = y, e[57] = L, e[58] = D, e[59] = C, e[60] = E, e[61] = te) : te = e[61], te;
257
- };
258
- function Ae(i) {
259
- return document.fonts.load(i);
260
- }
261
- function He(i) {
262
- throw new Error(Ee("DSTabs", `The component requires the fonts to be loaded: ${i}`));
263
- }
264
- export {
265
- Ue as TabList
266
- };
@@ -1,10 +0,0 @@
1
- "use client";
2
- import "react/jsx-runtime";
3
- import "./chunks/index.CgTHIF3K.js";
4
- import "./chunks/index.CEyLAtio.js";
5
- import "react";
6
- import { b as a } from "./chunks/Header.DPafHEKw.js";
7
- import "./logo.B9taqlZR.js";
8
- export {
9
- a as DSTopBar
10
- };
@@ -1 +0,0 @@
1
- export declare const isAnimationDisabled: () => boolean;