@stihl-design-system/components 1.0.0-RC.26 → 1.0.0-RC.28
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.
- package/{accordion.CBaDU14g.js → accordion.B9X4Vlig.js} +1 -1
- package/{actionbutton.DEJsLxnQ.js → actionbutton.7x4F7a0U.js} +1 -1
- package/{actionlink.Cs6BTCA3.js → actionlink.CV0n19ik.js} +1 -1
- package/assets/Accordion.BHWEZCmu.css +1 -0
- package/assets/CustomReactSelect.Dq5Hoqv2.css +1 -0
- package/assets/{Fieldset.Cy5r0K7n.css → Fieldset.CW9dBvAo.css} +1 -1
- package/assets/InputFile.BVgHILAZ.css +1 -0
- package/assets/InputPassword.CBpkWGy7.css +1 -0
- package/assets/InputSearch.CnPJYH8L.css +1 -0
- package/assets/InputStepper.U2h9Kd0t.css +1 -0
- package/assets/Select.U7xsC0o1.css +1 -0
- package/assets/Slider.DzwSjDPV.css +1 -0
- package/assets/Textarea.C4IEEOFR.css +1 -0
- package/assets/banner.D9EiZqqR.css +1 -0
- package/assets/input.CuIHvnD5.css +1 -0
- package/assets/radio.ipbv7OMF.css +1 -0
- package/assets/scroller.Hszs1Yq4.css +1 -0
- package/banner.CgQdUb_c.js +55 -0
- package/banner.d.ts +2 -0
- package/{checkboxgroup.YK8H0YoX.js → checkboxgroup.Bylq97Q9.js} +2 -2
- package/chipgroup.BWpqUzXF.js +209 -0
- package/chunks/Accordion.BvHroAyn.js +154 -0
- package/chunks/ActionButton.BlhiiU3l.js +165 -0
- package/chunks/ActionLink.BvFL6rgb.js +138 -0
- package/chunks/{CheckboxGroup.DHzpgOWp.js → CheckboxGroup.D4MQD0i0.js} +1 -1
- package/chunks/{CustomReactSelect.DWdh3k_q.js → CustomReactSelect.D9B928kB.js} +440 -438
- package/chunks/Fieldset.BgZMYAH-.js +74 -0
- package/chunks/Header.BSvyYrIV.js +368 -0
- package/chunks/InputFile.rC7NJYrU.js +218 -0
- package/chunks/InputPassword.5-r36K86.js +132 -0
- package/chunks/InputSearch.D4Q99_nR.js +170 -0
- package/chunks/InputStepper.EsPAGCFJ.js +259 -0
- package/chunks/{NavigationTabs.CuOXq0b7.js → NavigationTabs.BofhX8bD.js} +1 -1
- package/chunks/{RadioGroup.okEm_-NA.js → RadioGroup.CRP8_vsg.js} +2 -2
- package/chunks/Select.lveq1iBY.js +158 -0
- package/chunks/Slider.D9MHH4cZ.js +292 -0
- package/chunks/{Tabs.C4qGWCcD.js → Tabs.Bl4K3Kjn.js} +1 -1
- package/chunks/Textarea.BRfh8ykm.js +161 -0
- package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
- package/combobox.pMk_oggm.js +60 -0
- package/components/Banner/Banner.d.ts +32 -0
- package/components/Banner/Banner.utils.d.ts +2 -0
- package/components/Combobox/Combobox.d.ts +4 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
- package/components/Scroller/Scroller.d.ts +20 -0
- package/components/Scroller/Scroller.utils.d.ts +3 -0
- package/components/Tabs/TabList/TabList.d.ts +1 -1
- package/components/Tabs/TabList/TabList.utils.d.ts +0 -4
- package/{customreactselect.BvuvCDyE.js → customreactselect.-DGMZMFu.js} +2 -3
- package/{fieldset.DM9ELUJa.js → fieldset.BR9fZReW.js} +1 -1
- package/{header.DLrTpc-W.js → header.Z4Oxj_xL.js} +1 -1
- package/index.d.ts +4 -0
- package/index.es.js +202 -195
- package/input.DAneVu7p.js +199 -0
- package/{inputfile.Cmkxf4Vq.js → inputfile.CB-QTIDn.js} +2 -3
- package/{inputpassword.CYfGcUE-.js → inputpassword.B_A0JDkz.js} +2 -3
- package/{inputsearch.CecX8gHD.js → inputsearch.DUgTkPWm.js} +2 -3
- package/{inputstepper.CFgfHjM_.js → inputstepper.DKmlBa0Y.js} +2 -3
- package/{navigationtabs.B86G8ODY.js → navigationtabs.DQ1kE-h4.js} +2 -2
- package/package.json +2 -2
- package/partials/index.js +107 -85
- package/partials/lib/partials.d.ts +1 -1
- package/radio.z-Mi3J6t.js +134 -0
- package/{radiogroup.C2PkTHnF.js → radiogroup.Bk36A24U.js} +3 -3
- package/scroller.CCA6kFR6.js +123 -0
- package/scroller.d.ts +2 -0
- package/{select.CmGQdpsV.js → select.4wUa3vMT.js} +2 -3
- package/{slider.DGmVtnxs.js → slider.BicJfJzc.js} +2 -2
- package/styles/scss/ds/index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +187 -0
- package/styles/scss/ds/lib/input.scss +26 -0
- package/tablist.Dzwe0_J4.js +256 -0
- package/{tabs.Dby_2Hyz.js → tabs.yudjJk9d.js} +2 -2
- package/{textarea.yOTo23Pd.js → textarea.BynOgkpo.js} +2 -3
- package/{topbar.qNB9efbF.js → topbar.Bccms0xZ.js} +1 -1
- package/utils/get-rect.d.ts +4 -0
- package/utils/get-rect.test.d.ts +1 -0
- package/utils/index.d.ts +2 -1
- package/utils/is-animation-disabled.d.ts +14 -0
- package/utils/is-animation-disabled.test.d.ts +1 -0
- package/assets/Accordion.DOcfZwq8.css +0 -1
- package/assets/CustomReactSelect.B8l6al4B.css +0 -1
- package/assets/InputFile.Dqjz53mb.css +0 -1
- package/assets/InputPassword.CkHF5zCh.css +0 -1
- package/assets/InputSearch.BV8Q2EUL.css +0 -1
- package/assets/InputStepper.DzzrAdma.css +0 -1
- package/assets/Select.e1fTfWmm.css +0 -1
- package/assets/Slider.C8i4U4iT.css +0 -1
- package/assets/Textarea.BGV7Z0Z9.css +0 -1
- package/assets/input.Cj4tF_F7.css +0 -1
- package/assets/radio.CqaNn1Gz.css +0 -1
- package/chipgroup.Bp_v9IQu.js +0 -186
- package/chunks/Accordion.eVOD7J_8.js +0 -154
- package/chunks/ActionButton.Ck1rGqgm.js +0 -165
- package/chunks/ActionLink.DnUNjoAT.js +0 -138
- package/chunks/Fieldset.BX46NuLh.js +0 -74
- package/chunks/Header.CsrzyVil.js +0 -356
- package/chunks/InputFile.vkkg5Pab.js +0 -220
- package/chunks/InputPassword.BQU09DJh.js +0 -136
- package/chunks/InputSearch.CXL9ThpX.js +0 -174
- package/chunks/InputStepper.BhLQVAlo.js +0 -263
- package/chunks/Select.D3IUIdPJ.js +0 -162
- package/chunks/Slider.CPG4Btbq.js +0 -292
- package/chunks/Textarea.D4vXRg_U.js +0 -163
- package/combobox.DIB07SNA.js +0 -58
- package/input.D4OiEI8g.js +0 -203
- package/radio.Dm9bDBzM.js +0 -134
- package/tablist.CcCURua8.js +0 -266
- package/utils/isAnimationDisabled.d.ts +0 -1
- /package/components/{Tabs/TabList/TabList.utils.test.d.ts → Banner/Banner.test.d.ts} +0 -0
|
@@ -62,7 +62,7 @@ export declare function getResetStyles(options?: GetResetStylesOptions): string
|
|
|
62
62
|
type GetSSRStylesOptions = {
|
|
63
63
|
format?: Exclude<Format, 'cra'>;
|
|
64
64
|
};
|
|
65
|
-
declare const COMPONENT_NAME: readonly ["DSAccordion", "DSActionButton", "DSActionLink", "DSAriaLiveRegions", "DSBreadcrumb", "DSButton", "DSButtonRound", "DSCheckbox", "DSCheckboxGroup", "DSChipGroup", "DSCombobox", "DSDialog", "DSDrawer", "DSFieldset", "DSFlag", "DSFloatingActionButton", "DSHeader", "DSHeading", "DSIcon", "DSInput", "DSInputFile", "DSInputPassword", "DSInputSearch", "DSInputStepper", "DSLink", "DSLinkButton", "DSLogo", "DSNavigationTabs", "DSNotification", "DSPopover", "DSRadioGroup", "DSSelect", "DSSkipToContent", "DSSlider", "DSSpinner", "DSSwitch", "DSTabs", "DSText", "DSTextarea", "DSTitle", "DSToastManager", "DSTopBar"];
|
|
65
|
+
declare const COMPONENT_NAME: readonly ["DSAccordion", "DSActionButton", "DSActionLink", "DSAriaLiveRegions", "DSBanner", "DSBreadcrumb", "DSButton", "DSButtonRound", "DSCheckbox", "DSCheckboxGroup", "DSChipGroup", "DSCombobox", "DSDialog", "DSDrawer", "DSFieldset", "DSFlag", "DSFloatingActionButton", "DSHeader", "DSHeading", "DSIcon", "DSInput", "DSInputFile", "DSInputPassword", "DSInputSearch", "DSInputStepper", "DSLink", "DSLinkButton", "DSLogo", "DSNavigationTabs", "DSNotification", "DSPopover", "DSRadioGroup", "DSScroller", "DSSelect", "DSSkipToContent", "DSSlider", "DSSpinner", "DSSwitch", "DSTabs", "DSText", "DSTextarea", "DSTitle", "DSToastManager", "DSTopBar"];
|
|
66
66
|
export type ComponentName = (typeof COMPONENT_NAME)[number];
|
|
67
67
|
/**
|
|
68
68
|
* Retrieves server-side rendered (SSR) styles for the specified components to be injected into the <head> at build time.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as B, jsxs as ce } from "react/jsx-runtime";
|
|
3
|
+
import { d as pe } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
+
import { c as E } from "./chunks/index.CEyLAtio.js";
|
|
5
|
+
import { forwardRef as Ce, useRef as he, useState as we, useEffect as ye } from "react";
|
|
6
|
+
import { u as ke } from "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
+
import './assets/radio.ipbv7OMF.css';const ue = (D) => D.replace(/\s+/g, ""), He = "ds-radio_root_12vrw_1", ge = "ds-radio_root--disabled_12vrw_24", Ne = "ds-radio_root--with-custom-area_12vrw_27", We = "ds-radio_root--with-custom-area--above_12vrw_30", Be = "ds-radio_radio_12vrw_36", De = "ds-radio_dot_12vrw_54", xe = "ds-radio_radio--invalid_12vrw_78", Se = "ds-radio_label_12vrw_83", Ue = "ds-radio_label--bold_12vrw_100", Ie = "ds-radio_label--hidden_12vrw_111", Ve = "ds-radio_label--with-custom-area_12vrw_123", $e = "ds-radio_custom-area_12vrw_127", je = "ds-radio_custom-area--above_12vrw_135", Le = "ds-radio_hint_12vrw_141", Ee = "ds-radio_hint--visible_12vrw_165", Oe = "ds-radio_hint--unchecked-hidden_12vrw_169", Pe = "ds-radio_hint--hidden_12vrw_173", Re = "ds-radio_input_12vrw_186", t = {
|
|
8
|
+
root: He,
|
|
9
|
+
rootDisabled: ge,
|
|
10
|
+
rootWithCustomArea: Ne,
|
|
11
|
+
rootWithCustomAreaAbove: We,
|
|
12
|
+
radio: Be,
|
|
13
|
+
dot: De,
|
|
14
|
+
radioInvalid: xe,
|
|
15
|
+
label: Se,
|
|
16
|
+
labelBold: Ue,
|
|
17
|
+
labelHidden: Ie,
|
|
18
|
+
labelWithCustomArea: Ve,
|
|
19
|
+
customArea: $e,
|
|
20
|
+
customAreaAbove: je,
|
|
21
|
+
hint: Le,
|
|
22
|
+
hintVisible: Ee,
|
|
23
|
+
hintUncheckedHidden: Oe,
|
|
24
|
+
hintHidden: Pe,
|
|
25
|
+
input: Re
|
|
26
|
+
}, qe = Ce((D, m) => {
|
|
27
|
+
const e = pe.c(87);
|
|
28
|
+
let x, b, o, n, i, d, c, h, v, S, U, I, V, $, j, L, u;
|
|
29
|
+
e[0] !== D ? ({
|
|
30
|
+
label: d,
|
|
31
|
+
name: c,
|
|
32
|
+
value: u,
|
|
33
|
+
checked: x,
|
|
34
|
+
className: b,
|
|
35
|
+
customArea: o,
|
|
36
|
+
isCustomAreaAbove: S,
|
|
37
|
+
defaultChecked: U,
|
|
38
|
+
disabled: I,
|
|
39
|
+
fieldsetId: n,
|
|
40
|
+
hideLabel: V,
|
|
41
|
+
hint: i,
|
|
42
|
+
invalid: $,
|
|
43
|
+
isBold: j,
|
|
44
|
+
hideUncheckedHint: L,
|
|
45
|
+
onChange: h,
|
|
46
|
+
...v
|
|
47
|
+
} = D, e[0] = D, e[1] = x, e[2] = b, e[3] = o, e[4] = n, e[5] = i, e[6] = d, 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] = j, e[16] = L, e[17] = u) : (x = e[1], b = e[2], o = e[3], n = e[4], i = e[5], d = 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], j = e[15], L = e[16], u = e[17]);
|
|
48
|
+
const _ = S === void 0 ? !1 : S, _e = U === void 0 ? !1 : U, r = I === void 0 ? !1 : I, fe = V === void 0 ? !1 : V, A = $ === void 0 ? !1 : $, Y = j === void 0 ? !1 : j, l = L === void 0 ? !1 : L, me = he(null), a = he(null), [be, ve] = we(_e), O = x !== void 0, s = O ? x : be;
|
|
49
|
+
let P;
|
|
50
|
+
e[18] !== s || e[19] !== l ? (P = () => {
|
|
51
|
+
a.current && l && ((a.current.style.height === "0px" || a.current.style.height === "") && s ? (a.current.style.height = `${a.current.scrollHeight}px`, a.current.style.opacity = "1") : s || (a.current.style.opacity = "0", a.current.style.height = "0px"));
|
|
52
|
+
}, e[18] = s, e[19] = l, e[20] = P) : P = e[20];
|
|
53
|
+
let R;
|
|
54
|
+
e[21] !== s ? (R = [a, s], e[21] = s, e[22] = R) : R = e[22], ye(P, R);
|
|
55
|
+
const p = ke(fe), Z = !!o, ee = !!o && _;
|
|
56
|
+
let q;
|
|
57
|
+
e[23] !== b || e[24] !== r || e[25] !== Z || e[26] !== ee ? (q = E(t.root, {
|
|
58
|
+
[t.rootDisabled]: r,
|
|
59
|
+
[t.rootWithCustomArea]: Z,
|
|
60
|
+
[t.rootWithCustomAreaAbove]: ee
|
|
61
|
+
}, b), e[23] = b, e[24] = r, e[25] = Z, e[26] = ee, e[27] = q) : q = e[27];
|
|
62
|
+
const te = q, oe = !!o;
|
|
63
|
+
let z;
|
|
64
|
+
e[28] !== p || e[29] !== Y || e[30] !== oe ? (z = E(t.label, {
|
|
65
|
+
[t.labelBold]: Y,
|
|
66
|
+
[t.labelHidden]: p,
|
|
67
|
+
[t.labelWithCustomArea]: oe
|
|
68
|
+
}), e[28] = p, e[29] = Y, e[30] = oe, e[31] = z) : z = e[31];
|
|
69
|
+
const se = z;
|
|
70
|
+
let F;
|
|
71
|
+
e[32] !== s || e[33] !== l || e[34] !== i ? (F = () => !l && i ? !0 : !!(l && i && s), e[32] = s, 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 = E(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 = E(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 = E(t.customArea, t.customAreaAbove), e[42] = K) : K = e[42];
|
|
87
|
+
const Ae = K;
|
|
88
|
+
let M;
|
|
89
|
+
e[43] !== r || e[44] !== O || e[45] !== h ? (M = (f) => {
|
|
90
|
+
if (r) {
|
|
91
|
+
f.preventDefault();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
O || ve(f.target.checked), h && h(f);
|
|
95
|
+
}, e[43] = r, e[44] = O, e[45] = h, e[46] = M) : M = e[46];
|
|
96
|
+
const re = M, C = i ? `${ue(c)}-${ue(u)}-description` : void 0;
|
|
97
|
+
let Q;
|
|
98
|
+
e[47] !== C || e[48] !== n || e[49] !== A ? (Q = [A && n && `${n}-feedback`, C].filter(Boolean).join(" ") || void 0, e[47] = C, e[48] = n, e[49] = A, e[50] = Q) : Q = e[50];
|
|
99
|
+
const de = Q;
|
|
100
|
+
let w;
|
|
101
|
+
e[51] !== m ? (w = (f) => {
|
|
102
|
+
typeof m == "function" ? m(f) : m !== null && (m.current = f), me.current = f;
|
|
103
|
+
}, e[51] = m, e[52] = w) : w = e[52];
|
|
104
|
+
const ne = typeof d == "string" ? d : void 0;
|
|
105
|
+
let y;
|
|
106
|
+
e[53] !== de || e[54] !== s || e[55] !== r || e[56] !== re || e[57] !== c || e[58] !== v || e[59] !== w || e[60] !== ne || e[61] !== u ? (y = /* @__PURE__ */ B("input", { type: "radio", value: u, name: c, className: t.input, ref: w, onChange: re, ...v, disabled: r, checked: s, "aria-label": ne, "aria-describedby": de }), e[53] = de, e[54] = s, e[55] = r, e[56] = re, e[57] = c, e[58] = v, e[59] = w, e[60] = ne, e[61] = u, e[62] = y) : y = e[62];
|
|
107
|
+
let T;
|
|
108
|
+
e[63] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ B("div", { className: t.dot }), e[63] = T) : T = e[63];
|
|
109
|
+
let k;
|
|
110
|
+
e[64] !== ae ? (k = /* @__PURE__ */ B("span", { className: ae, children: T }), e[64] = ae, e[65] = k) : k = e[65];
|
|
111
|
+
let H;
|
|
112
|
+
e[66] !== o || e[67] !== _ ? (H = o && _ && /* @__PURE__ */ B("div", { className: Ae, children: o }), e[66] = o, e[67] = _, e[68] = H) : H = e[68];
|
|
113
|
+
let g;
|
|
114
|
+
e[69] !== o || e[70] !== _ ? (g = o && !_ && /* @__PURE__ */ B("div", { className: t.customArea, children: o }), e[69] = o, e[70] = _, e[71] = g) : g = e[71];
|
|
115
|
+
let N;
|
|
116
|
+
e[72] !== C || e[73] !== i || e[74] !== le ? (N = /* @__PURE__ */ B("span", { id: C, className: le, ref: a, children: i }), e[72] = C, e[73] = i, e[74] = le, e[75] = N) : N = e[75];
|
|
117
|
+
let W;
|
|
118
|
+
e[76] !== d || e[77] !== se || e[78] !== g || e[79] !== N ? (W = /* @__PURE__ */ ce("span", { className: se, children: [
|
|
119
|
+
d,
|
|
120
|
+
g,
|
|
121
|
+
N
|
|
122
|
+
] }), e[76] = d, e[77] = se, e[78] = g, e[79] = N, e[80] = W) : W = e[80];
|
|
123
|
+
let X;
|
|
124
|
+
return e[81] !== te || e[82] !== y || e[83] !== k || e[84] !== H || e[85] !== W ? (X = /* @__PURE__ */ ce("label", { className: te, children: [
|
|
125
|
+
y,
|
|
126
|
+
k,
|
|
127
|
+
H,
|
|
128
|
+
W
|
|
129
|
+
] }), e[81] = te, e[82] = y, e[83] = k, e[84] = H, e[85] = W, e[86] = X) : X = e[86], X;
|
|
130
|
+
});
|
|
131
|
+
qe.displayName = "DSRadio";
|
|
132
|
+
export {
|
|
133
|
+
qe as DSRadio
|
|
134
|
+
};
|
|
@@ -3,9 +3,9 @@ import "react/jsx-runtime";
|
|
|
3
3
|
import "./chunks/index.CgTHIF3K.js";
|
|
4
4
|
import "./chunks/index.CEyLAtio.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./chunks/Fieldset.
|
|
7
|
-
import "./radio.
|
|
8
|
-
import { D as s } from "./chunks/RadioGroup.
|
|
6
|
+
import "./chunks/Fieldset.BgZMYAH-.js";
|
|
7
|
+
import "./radio.z-Mi3J6t.js";
|
|
8
|
+
import { D as s } from "./chunks/RadioGroup.CRP8_vsg.js";
|
|
9
9
|
export {
|
|
10
10
|
s as DSRadioGroup
|
|
11
11
|
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as J, jsx as w } from "react/jsx-runtime";
|
|
3
|
+
import { d as K } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
+
import { c as y } from "./chunks/index.CEyLAtio.js";
|
|
5
|
+
import { useState as M, useRef as T } from "react";
|
|
6
|
+
import { i as j, g as A } from "./chunks/is-animation-disabled.CUl4N3LI.js";
|
|
7
|
+
import { g as Q } from "./chunks/helpers.BbWkXTr3.js";
|
|
8
|
+
import { u as O } from "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
+
import { D as $ } from "./chunks/Button.CC0qEsuR.js";
|
|
10
|
+
import './assets/scroller.Hszs1Yq4.css';const U = "ds-scroller_root_3ktti_1", Y = "ds-scroller_scroll-wrapper_3ktti_6", Z = "ds-scroller_scroller_3ktti_45", tt = "ds-scroller_scroll-button_3ktti_60", et = "ds-scroller_scroll-button--hidden_3ktti_65", rt = "ds-scroller_scroll-button--right_3ktti_69", n = {
|
|
11
|
+
root: U,
|
|
12
|
+
scrollWrapper: Y,
|
|
13
|
+
scroller: Z,
|
|
14
|
+
scrollButton: tt,
|
|
15
|
+
scrollButtonHidden: et,
|
|
16
|
+
scrollButtonRight: rt
|
|
17
|
+
}, dt = (c) => {
|
|
18
|
+
const t = K.c(37);
|
|
19
|
+
let a, f, u, r;
|
|
20
|
+
t[0] !== c ? ({
|
|
21
|
+
children: a,
|
|
22
|
+
className: f,
|
|
23
|
+
scrollToPosition: r,
|
|
24
|
+
...u
|
|
25
|
+
} = c, t[0] = c, t[1] = a, t[2] = f, t[3] = u, t[4] = r) : (a = t[1], f = t[2], u = t[3], r = t[4]);
|
|
26
|
+
const [z, q] = M(!1), [H, V] = M(!1), S = T(null), e = T(null), X = T(!1), D = () => {
|
|
27
|
+
I();
|
|
28
|
+
};
|
|
29
|
+
let R;
|
|
30
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (R = [], t[5] = R) : R = t[5], O(() => {
|
|
31
|
+
const l = new ResizeObserver(D);
|
|
32
|
+
return e.current && l.observe(e.current), () => {
|
|
33
|
+
l.disconnect();
|
|
34
|
+
};
|
|
35
|
+
}, R);
|
|
36
|
+
let x;
|
|
37
|
+
t[6] !== r ? (x = [r], t[6] = r, t[7] = x) : x = t[7], O(() => {
|
|
38
|
+
var s;
|
|
39
|
+
const l = ["18px 'STIHL Contraface Digital Text Bold'"];
|
|
40
|
+
return Promise.all(l.map(ot)).then(() => {
|
|
41
|
+
X.current = !0, I(), F();
|
|
42
|
+
}).catch(lt), (s = e.current) == null || s.addEventListener("scroll", D), () => {
|
|
43
|
+
var i;
|
|
44
|
+
(i = e.current) == null || i.removeEventListener("scroll", D);
|
|
45
|
+
};
|
|
46
|
+
}, x);
|
|
47
|
+
const F = () => {
|
|
48
|
+
e.current && (r != null && r.scrollPosition) && e.current.scrollTo({
|
|
49
|
+
left: r.scrollPosition,
|
|
50
|
+
behavior: j() || !r.isSmooth ? "instant" : "smooth"
|
|
51
|
+
});
|
|
52
|
+
}, I = () => {
|
|
53
|
+
if (e.current && S.current) {
|
|
54
|
+
const l = A(e.current), s = A(S.current);
|
|
55
|
+
q(s.left < l.left), V(s.right > l.right + 4);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
let o;
|
|
59
|
+
if (t[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
+
o = (s) => {
|
|
61
|
+
var N;
|
|
62
|
+
const i = l(s);
|
|
63
|
+
(N = e.current) == null || N.scrollTo({
|
|
64
|
+
left: i,
|
|
65
|
+
behavior: j() ? "instant" : "smooth"
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const l = (s) => {
|
|
69
|
+
if (!S.current || !e.current)
|
|
70
|
+
return 0;
|
|
71
|
+
const {
|
|
72
|
+
scrollLeft: i,
|
|
73
|
+
offsetWidth: N
|
|
74
|
+
} = e.current, W = Math.round(N * 0.2);
|
|
75
|
+
return s === "next" ? i + W : i - W;
|
|
76
|
+
};
|
|
77
|
+
t[8] = o;
|
|
78
|
+
} else
|
|
79
|
+
o = t[8];
|
|
80
|
+
let L;
|
|
81
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (L = y(n.scroller), t[9] = L) : L = t[9];
|
|
82
|
+
const G = L;
|
|
83
|
+
let m;
|
|
84
|
+
t[10] !== f ? (m = y(n.root, f), t[10] = f, t[11] = m) : m = t[11];
|
|
85
|
+
const C = z || H ? 0 : -1;
|
|
86
|
+
let d;
|
|
87
|
+
t[12] !== a ? (d = /* @__PURE__ */ w("div", { className: G, ref: S, children: a }), t[12] = a, t[13] = d) : d = t[13];
|
|
88
|
+
let h;
|
|
89
|
+
t[14] !== C || t[15] !== d ? (h = /* @__PURE__ */ w("div", { className: n.scrollWrapper, ref: e, tabIndex: C, children: d }), t[14] = C, t[15] = d, t[16] = h) : h = t[16];
|
|
90
|
+
const E = !z;
|
|
91
|
+
let p;
|
|
92
|
+
t[17] !== E ? (p = y(n.scrollButton, {
|
|
93
|
+
[n.scrollButtonHidden]: E
|
|
94
|
+
}), t[17] = E, t[18] = p) : p = t[18];
|
|
95
|
+
let _;
|
|
96
|
+
t[19] !== o ? (_ = () => o("prev"), t[19] = o, t[20] = _) : _ = t[20];
|
|
97
|
+
let b;
|
|
98
|
+
t[21] !== _ || t[22] !== p ? (b = /* @__PURE__ */ w($, { variant: "filled", className: p, hideLabel: !0, iconName: "chevron-left", tabIndex: -1, size: "small", onClick: _, children: "Left" }), t[21] = _, t[22] = p, t[23] = b) : b = t[23];
|
|
99
|
+
const P = !H;
|
|
100
|
+
let B;
|
|
101
|
+
t[24] !== P ? (B = y(n.scrollButton, n.scrollButtonRight, {
|
|
102
|
+
[n.scrollButtonHidden]: P
|
|
103
|
+
}), t[24] = P, t[25] = B) : B = t[25];
|
|
104
|
+
let g;
|
|
105
|
+
t[26] !== o ? (g = () => o("next"), t[26] = o, t[27] = g) : g = t[27];
|
|
106
|
+
let v;
|
|
107
|
+
t[28] !== B || t[29] !== g ? (v = /* @__PURE__ */ w($, { variant: "filled", className: B, hideLabel: !0, iconName: "chevron-right", tabIndex: -1, size: "small", onClick: g, children: "Right" }), t[28] = B, t[29] = g, t[30] = v) : v = t[30];
|
|
108
|
+
let k;
|
|
109
|
+
return t[31] !== u || t[32] !== b || t[33] !== v || t[34] !== m || t[35] !== h ? (k = /* @__PURE__ */ J("div", { className: m, ...u, children: [
|
|
110
|
+
h,
|
|
111
|
+
b,
|
|
112
|
+
v
|
|
113
|
+
] }), t[31] = u, t[32] = b, t[33] = v, t[34] = m, t[35] = h, t[36] = k) : k = t[36], k;
|
|
114
|
+
};
|
|
115
|
+
function ot(c) {
|
|
116
|
+
return document.fonts.load(c);
|
|
117
|
+
}
|
|
118
|
+
function lt(c) {
|
|
119
|
+
throw new Error(Q("DSScroller", `The component requires the fonts to be loaded: ${c}`));
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
dt as DSScroller
|
|
123
|
+
};
|
package/scroller.d.ts
ADDED
|
@@ -4,10 +4,9 @@ import "./chunks/index.CgTHIF3K.js";
|
|
|
4
4
|
import "./chunks/index.CEyLAtio.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./asterisk.CR60hx8S.js";
|
|
8
7
|
import "./chunks/Icon.C0161Glk.js";
|
|
9
8
|
import "./systemfeedback.CLQCbTF6.js";
|
|
10
|
-
import { D } from "./chunks/Select.
|
|
9
|
+
import { D as s } from "./chunks/Select.lveq1iBY.js";
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
s as DSSelect
|
|
13
12
|
};
|
|
@@ -4,8 +4,8 @@ import "./chunks/index.CgTHIF3K.js";
|
|
|
4
4
|
import "./chunks/index.CEyLAtio.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./input.
|
|
8
|
-
import { D as s } from "./chunks/Slider.
|
|
7
|
+
import "./input.DAneVu7p.js";
|
|
8
|
+
import { D as s } from "./chunks/Slider.D9MHH4cZ.js";
|
|
9
9
|
export {
|
|
10
10
|
s as DSSlider
|
|
11
11
|
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
@use '_focus' as *;
|
|
2
|
+
@use '_helpers' as *;
|
|
3
|
+
@use '_high-contrast' as *;
|
|
4
|
+
@use '_hover' as *;
|
|
5
|
+
@use '../spacing' as *;
|
|
6
|
+
@use '../text' as *;
|
|
7
|
+
@use '../theme' as *;
|
|
8
|
+
@use '../transition' as *;
|
|
9
|
+
|
|
10
|
+
@mixin input-label-base($hasHint: false) {
|
|
11
|
+
@include utility-medium;
|
|
12
|
+
display: block;
|
|
13
|
+
max-width: fit-content;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
&:has(input) {
|
|
17
|
+
|
|
18
|
+
& input {
|
|
19
|
+
margin-block-start: $spacing-8;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& :first-child:not(input) {
|
|
23
|
+
|
|
24
|
+
margin-block-start: $spacing-4;
|
|
25
|
+
|
|
26
|
+
margin-block-end: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:not(:has(input)) {
|
|
31
|
+
@if $hasHint {
|
|
32
|
+
margin-block-end: $spacing-4;
|
|
33
|
+
} @else {
|
|
34
|
+
margin-block-end: $spacing-8;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@mixin input-label-disabled() {
|
|
40
|
+
@include high-contrast-media-query {
|
|
41
|
+
color: GrayText;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@mixin input-label-required() {
|
|
46
|
+
&:after {
|
|
47
|
+
content: '*';
|
|
48
|
+
margin-inline-start: $spacing-2;
|
|
49
|
+
font-family:
|
|
50
|
+
'STIHL Contraface Digital Text Regular',
|
|
51
|
+
-apple-system,
|
|
52
|
+
BlinkMacSystemFont,
|
|
53
|
+
'Segoe UI',
|
|
54
|
+
Roboto,
|
|
55
|
+
'Helvetica Neue',
|
|
56
|
+
Arial,
|
|
57
|
+
sans-serif;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin input-hint-base() {
|
|
62
|
+
@include utility-small;
|
|
63
|
+
display: block;
|
|
64
|
+
max-width: 25.5rem;
|
|
65
|
+
margin-block-end: $spacing-8;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@mixin input-base($size) {
|
|
69
|
+
@if ($size == 'medium') {
|
|
70
|
+
|
|
71
|
+
@include utility-medium;
|
|
72
|
+
|
|
73
|
+
padding-inline-start: adjust-spacing-for-border-1($spacing-16);
|
|
74
|
+
padding-inline-end: adjust-spacing-for-border-1($spacing-16);
|
|
75
|
+
min-height: px-to-rem($spacing-48);
|
|
76
|
+
height: px-to-rem($spacing-48);
|
|
77
|
+
} @else if($size == 'small') {
|
|
78
|
+
@include utility-small;
|
|
79
|
+
|
|
80
|
+
padding-inline-start: adjust-spacing-for-border-1($spacing-8);
|
|
81
|
+
padding-inline-end: adjust-spacing-for-border-1($spacing-8);
|
|
82
|
+
|
|
83
|
+
min-height: px-to-rem($spacing-32);
|
|
84
|
+
height: px-to-rem($spacing-32);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@include focus($offset: 0, $thickness: $spacing-1);
|
|
89
|
+
@include transition((background-color, color));
|
|
90
|
+
|
|
91
|
+
@include hover-media-query {
|
|
92
|
+
&:hover {
|
|
93
|
+
background: $theme-light-background-color-transparent-hover;
|
|
94
|
+
@include high-contrast-media-query {
|
|
95
|
+
border-color: Highlight;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
& {
|
|
101
|
+
background: transparent;
|
|
102
|
+
border: $spacing-1 solid $theme-light-border-color-primary;
|
|
103
|
+
border-radius: 0;
|
|
104
|
+
color: $theme-light-content-color-primary;
|
|
105
|
+
width: 100%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&[readonly] {
|
|
109
|
+
background-color: $theme-light-background-color-tertiary;
|
|
110
|
+
border-color: transparent;
|
|
111
|
+
color: $theme-light-content-color-primary;
|
|
112
|
+
|
|
113
|
+
@include focus($offset: 0, $thickness: $spacing-2);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:disabled {
|
|
117
|
+
background-color: transparent;
|
|
118
|
+
border-color: $theme-light-border-color-primary-disabled;
|
|
119
|
+
color: $theme-light-content-color-primary-disabled;
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::-webkit-placeholder,
|
|
124
|
+
&::placeholder {
|
|
125
|
+
color: $theme-light-content-color-secondary;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
&[type='search'] {
|
|
164
|
+
appearance: none;
|
|
165
|
+
-webkit-appearance: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&[type='range'] {
|
|
169
|
+
accent-color: $color-core-orange-dark;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&[type='number'] {
|
|
173
|
+
-moz-appearance: textfield;
|
|
174
|
+
appearance: textfield;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@mixin input-invalid() {
|
|
179
|
+
border-color: $theme-light-border-color-feedback-error;
|
|
180
|
+
outline-color: $theme-light-border-color-feedback-error;
|
|
181
|
+
|
|
182
|
+
&:active,
|
|
183
|
+
&:focus,
|
|
184
|
+
&:focus-visible {
|
|
185
|
+
border-color: $theme-light-border-color-primary;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use './ds-internal/_input' as *;
|
|
2
|
+
|
|
3
|
+
@mixin input-label($hasHint: false, $isDisabled: false, $isRequired: false) {
|
|
4
|
+
@if (not $isDisabled and not $isRequired) {
|
|
5
|
+
@include input-label-base($hasHint);
|
|
6
|
+
}
|
|
7
|
+
@if $isDisabled {
|
|
8
|
+
@include input-label-disabled();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@if $isRequired {
|
|
12
|
+
@include input-label-required();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin input-hint() {
|
|
17
|
+
@include input-hint-base();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin input($size: 'medium', $isInvalid: false) {
|
|
21
|
+
@if (not $isInvalid) {
|
|
22
|
+
@include input-base($size);
|
|
23
|
+
} @else {
|
|
24
|
+
@include input-invalid();
|
|
25
|
+
}
|
|
26
|
+
}
|