@stihl-design-system/components 1.0.0-RC.26 → 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.
- package/assets/CustomReactSelect.B9f_KYFg.css +1 -0
- package/assets/InputPassword.BuVQ9dRy.css +1 -0
- package/assets/InputSearch.Dwtb3Mhw.css +1 -0
- package/assets/InputStepper.CBt99L83.css +1 -0
- package/assets/Select.CghDnBUQ.css +1 -0
- package/assets/Textarea.BgtH-TTe.css +1 -0
- package/assets/banner.D9EiZqqR.css +1 -0
- package/assets/input.DFwunFjw.css +1 -0
- package/assets/radio.BCB51D_y.css +1 -0
- package/assets/scroller.Hszs1Yq4.css +1 -0
- package/banner.CgQdUb_c.js +55 -0
- package/banner.d.ts +2 -0
- package/chipgroup.BWpqUzXF.js +209 -0
- package/chunks/{CustomReactSelect.DWdh3k_q.js → CustomReactSelect.BPnzhvw1.js} +52 -49
- package/chunks/Header.Djs1adPW.js +361 -0
- package/chunks/InputPassword.D42uUEGy.js +136 -0
- package/chunks/InputSearch.aIbUXVQU.js +174 -0
- package/chunks/InputStepper.DFEdUWm7.js +263 -0
- package/chunks/{NavigationTabs.CuOXq0b7.js → NavigationTabs.BofhX8bD.js} +1 -1
- package/chunks/{RadioGroup.okEm_-NA.js → RadioGroup.c7YYJdUe.js} +1 -1
- package/chunks/{Select.D3IUIdPJ.js → Select.B_EHpk22.js} +22 -22
- package/chunks/{Slider.CPG4Btbq.js → Slider.DMSwmGwD.js} +1 -1
- package/chunks/{Tabs.C4qGWCcD.js → Tabs.Bl4K3Kjn.js} +1 -1
- package/chunks/{Textarea.D4vXRg_U.js → Textarea.Ce26v6ht.js} +53 -53
- package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
- package/{combobox.DIB07SNA.js → combobox.AaK6QjRl.js} +1 -1
- package/components/Banner/Banner.d.ts +32 -0
- package/components/Banner/Banner.utils.d.ts +2 -0
- 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.Bu1i8wkh.js} +1 -1
- package/{header.DLrTpc-W.js → header.WhQHSuB1.js} +1 -1
- package/index.d.ts +4 -0
- package/index.es.js +202 -195
- package/{input.D4OiEI8g.js → input.DhxUW3zc.js} +35 -35
- package/{inputpassword.CYfGcUE-.js → inputpassword.CaJBCMA0.js} +1 -1
- package/{inputsearch.CecX8gHD.js → inputsearch.B06DhYzo.js} +1 -1
- package/{inputstepper.CFgfHjM_.js → inputstepper.DNY7nzP8.js} +1 -1
- package/{navigationtabs.B86G8ODY.js → navigationtabs.DQ1kE-h4.js} +2 -2
- package/package.json +2 -2
- package/partials/index.js +104 -82
- package/partials/lib/partials.d.ts +1 -1
- package/radio.Be4pFOLf.js +134 -0
- package/{radiogroup.C2PkTHnF.js → radiogroup.BRjwP01C.js} +2 -2
- package/scroller.CCA6kFR6.js +123 -0
- package/scroller.d.ts +2 -0
- package/{select.CmGQdpsV.js → select.3zE96eWc.js} +1 -1
- package/{slider.DGmVtnxs.js → slider.CTCf7Xdm.js} +2 -2
- package/tablist.Dzwe0_J4.js +256 -0
- package/{tabs.Dby_2Hyz.js → tabs.yudjJk9d.js} +2 -2
- package/{textarea.yOTo23Pd.js → textarea.B_3fPtmd.js} +1 -1
- package/{topbar.qNB9efbF.js → topbar.2b8fjmA4.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/CustomReactSelect.B8l6al4B.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/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/Header.CsrzyVil.js +0 -356
- package/chunks/InputPassword.BQU09DJh.js +0 -136
- package/chunks/InputSearch.CXL9ThpX.js +0 -174
- package/chunks/InputStepper.BhLQVAlo.js +0 -263
- 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
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as g, jsxs as he, Fragment as ge } from "react/jsx-runtime";
|
|
3
|
+
import { d as P } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as B } from "./index.CEyLAtio.js";
|
|
5
|
+
import { useState as T, useEffect as re, useContext as ne, createContext as De, useRef as q } from "react";
|
|
6
|
+
import { g as U, c as F, p as me } from "./helpers.BbWkXTr3.js";
|
|
7
|
+
import { u as He } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
8
|
+
import { DSLogo as Pe } from "../logo.C96KaG1P.js";
|
|
9
|
+
import '../assets/Header.DO34x-dO.css';const xe = (d) => {
|
|
10
|
+
const e = P.c(3), t = 0, [r, n] = T("down");
|
|
11
|
+
let a, s;
|
|
12
|
+
return e[0] !== t ? (a = () => {
|
|
13
|
+
let l;
|
|
14
|
+
l = window.scrollY;
|
|
15
|
+
const c = () => {
|
|
16
|
+
const o = window.scrollY, m = o > l ? "down" : "up";
|
|
17
|
+
Math.abs(o - l) > t && (n(m), l = o);
|
|
18
|
+
};
|
|
19
|
+
return window.addEventListener("scroll", c, {
|
|
20
|
+
passive: !0
|
|
21
|
+
}), () => window.removeEventListener("scroll", c);
|
|
22
|
+
}, s = [t], e[0] = t, e[1] = a, e[2] = s) : (a = e[1], s = e[2]), re(a, s), r;
|
|
23
|
+
}, ft = ["full", "main"], Ee = ({
|
|
24
|
+
hasBrandArea: d,
|
|
25
|
+
hasPrimaryArea: e,
|
|
26
|
+
hasSecondaryArea: t
|
|
27
|
+
}) => {
|
|
28
|
+
if (d)
|
|
29
|
+
throw new Error(U("DSHeader", "A <DSTopBar.BrandArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
30
|
+
if (e)
|
|
31
|
+
throw new Error(U("DSHeader", "A <DSTopBar.PrimaryArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
32
|
+
if (t)
|
|
33
|
+
throw new Error(U("DSHeader", "A <DSTopBar.SecondaryArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
34
|
+
}, Te = "ds-top-bar_root_ryiho_1", Fe = "ds-top-bar_root--sticky_ryiho_47", Ce = "ds-top-bar_root--fixed_ryiho_51", Oe = "ds-top-bar_content_ryiho_59", Ve = "ds-top-bar_content--variant-full_ryiho_78", Re = "ds-top-bar_content--has-primary-area-and-secondary-area_ryiho_82", ke = "ds-top-bar_primary_ryiho_87", Me = "ds-top-bar_content--has-brand-add-on-with-primary-area-and-secondary-area_ryiho_102", $e = "ds-top-bar_brand_ryiho_107", We = "ds-top-bar_content--has-primary-area_ryiho_82", Ie = "ds-top-bar_content--has-primary-area--with-brand-add-on_ryiho_146", Le = "ds-top-bar_brand-add-on_ryiho_210", Ye = "ds-top-bar_brand-add-on--double_ryiho_231", ze = "ds-top-bar_sub-title_ryiho_245", qe = "ds-top-bar_secondary_ryiho_271", Ue = "ds-top-bar_logo_ryiho_280", je = "ds-top-bar_logo--reduced_ryiho_290", v = {
|
|
35
|
+
root: Te,
|
|
36
|
+
rootSticky: Fe,
|
|
37
|
+
rootFixed: Ce,
|
|
38
|
+
content: Oe,
|
|
39
|
+
contentVariantFull: Ve,
|
|
40
|
+
contentHasPrimaryAreaAndSecondaryArea: Re,
|
|
41
|
+
primary: ke,
|
|
42
|
+
contentHasBrandAddOnWithPrimaryAreaAndSecondaryArea: Me,
|
|
43
|
+
brand: $e,
|
|
44
|
+
contentHasPrimaryArea: We,
|
|
45
|
+
contentHasPrimaryAreaWithBrandAddOn: Ie,
|
|
46
|
+
brandAddOn: Le,
|
|
47
|
+
brandAddOnDouble: Ye,
|
|
48
|
+
subTitle: ze,
|
|
49
|
+
secondary: qe,
|
|
50
|
+
logo: Ue,
|
|
51
|
+
logoReduced: je
|
|
52
|
+
}, Ge = ({
|
|
53
|
+
hasBrandArea: d,
|
|
54
|
+
hasPrimaryArea: e,
|
|
55
|
+
hasSecondaryArea: t
|
|
56
|
+
}) => {
|
|
57
|
+
if (!d)
|
|
58
|
+
throw new Error(U("DSTopBar", "A <DSTopBar.BrandArea> component is required. Please include it as a child of DSTopBar."));
|
|
59
|
+
if (!e && t)
|
|
60
|
+
throw new Error(U("DSTopBar", "A <DSTopBar.PrimaryArea> is required when using <DSTopBar.SecondaryArea>. Please include <DSTopBar.PrimaryArea> as a child of DSTopBar, or move the content from <DSTopBar.SecondaryArea> into <DSTopBar.PrimaryArea>."));
|
|
61
|
+
}, ue = (d) => d == null || typeof d == "object" && !Array.isArray(d) && d !== null && Object.keys(d).length === 0, At = ["double", "single"], I = (d) => {
|
|
62
|
+
const e = P.c(28);
|
|
63
|
+
let t, r, n, a;
|
|
64
|
+
e[0] !== d ? ({
|
|
65
|
+
children: t,
|
|
66
|
+
className: r,
|
|
67
|
+
rootClassName: a,
|
|
68
|
+
...n
|
|
69
|
+
} = d, e[0] = d, e[1] = t, e[2] = r, e[3] = n, e[4] = a) : (t = e[1], r = e[2], n = e[3], a = e[4]);
|
|
70
|
+
const {
|
|
71
|
+
variant: s,
|
|
72
|
+
isHeaderSticky: l,
|
|
73
|
+
isMobile: c,
|
|
74
|
+
topBarAreaRef: o,
|
|
75
|
+
isStickyMainNavigationVisible: m,
|
|
76
|
+
hasBrandAddOn: h
|
|
77
|
+
} = ne(j);
|
|
78
|
+
let A, y;
|
|
79
|
+
if (e[5] !== t || e[6] !== r || e[7] !== h || e[8] !== l || e[9] !== c || e[10] !== m || e[11] !== a || e[12] !== s) {
|
|
80
|
+
const x = F(t, fe), p = F(t, Ae), i = F(t, ye);
|
|
81
|
+
process.env.NODE_ENV !== "production" && Ge({
|
|
82
|
+
hasBrandArea: x,
|
|
83
|
+
hasPrimaryArea: p,
|
|
84
|
+
hasSecondaryArea: i
|
|
85
|
+
});
|
|
86
|
+
let b;
|
|
87
|
+
e[15] !== l || e[16] !== c || e[17] !== m || e[18] !== a ? (b = B(v.root, a, l ? {
|
|
88
|
+
[v.rootSticky]: !c && m,
|
|
89
|
+
[v.rootFixed]: !c && !m
|
|
90
|
+
} : {}), e[15] = l, e[16] = c, e[17] = m, e[18] = a, e[19] = b) : b = e[19], A = b, y = B(v.content, r, {
|
|
91
|
+
[v.contentHasPrimaryArea]: p && !h && !i,
|
|
92
|
+
[v.contentHasPrimaryAreaWithBrandAddOn]: p && h && !i,
|
|
93
|
+
[v.contentHasBrandAddOnWithPrimaryAreaAndSecondaryArea]: h && p && i,
|
|
94
|
+
[v.contentHasPrimaryAreaAndSecondaryArea]: p && i && !h,
|
|
95
|
+
[v.contentVariantFull]: s === "full"
|
|
96
|
+
}), e[5] = t, e[6] = r, e[7] = h, e[8] = l, e[9] = c, e[10] = m, e[11] = a, e[12] = s, e[13] = A, e[14] = y;
|
|
97
|
+
} else
|
|
98
|
+
A = e[13], y = e[14];
|
|
99
|
+
const _ = y;
|
|
100
|
+
let f;
|
|
101
|
+
e[20] !== t || e[21] !== _ || e[22] !== n ? (f = /* @__PURE__ */ g("section", { className: _, ...n, children: t }), e[20] = t, e[21] = _, e[22] = n, e[23] = f) : f = e[23];
|
|
102
|
+
let u;
|
|
103
|
+
return e[24] !== A || e[25] !== f || e[26] !== o ? (u = /* @__PURE__ */ g("div", { className: A, ref: o, children: f }), e[24] = A, e[25] = f, e[26] = o, e[27] = u) : u = e[27], u;
|
|
104
|
+
}, fe = (d) => {
|
|
105
|
+
const e = P.c(26), {
|
|
106
|
+
children: t,
|
|
107
|
+
className: r
|
|
108
|
+
} = d, {
|
|
109
|
+
logoProps: n,
|
|
110
|
+
brandAddOnProps: a,
|
|
111
|
+
setHasBrandAddOn: s
|
|
112
|
+
} = ne(j);
|
|
113
|
+
let l;
|
|
114
|
+
e[0] !== n ? (l = n || {}, e[0] = n, e[1] = l) : l = e[1];
|
|
115
|
+
const {
|
|
116
|
+
aria: c,
|
|
117
|
+
logo: o,
|
|
118
|
+
href: m,
|
|
119
|
+
target: h
|
|
120
|
+
} = l, A = o === void 0 ? "main" : o, y = m === void 0 ? "/" : m, _ = h === void 0 ? "_self" : h;
|
|
121
|
+
let f;
|
|
122
|
+
e[2] !== a || e[3] !== t || e[4] !== s ? (f = () => {
|
|
123
|
+
t || !ue(a) ? s == null || s(!0) : s == null || s(!1);
|
|
124
|
+
}, e[2] = a, e[3] = t, e[4] = s, e[5] = f) : f = e[5];
|
|
125
|
+
let u;
|
|
126
|
+
e[6] !== a || e[7] !== t ? (u = [t, a], e[6] = a, e[7] = t, e[8] = u) : u = e[8], re(f, u);
|
|
127
|
+
let x;
|
|
128
|
+
e[9] !== A ? (x = B(v.logo, {
|
|
129
|
+
[v.logoReduced]: A.includes("reduced")
|
|
130
|
+
}), e[9] = A, e[10] = x) : x = e[10];
|
|
131
|
+
const p = x;
|
|
132
|
+
let i;
|
|
133
|
+
e[11] !== r ? (i = B(v.brand, r), e[11] = r, e[12] = i) : i = e[12];
|
|
134
|
+
let b;
|
|
135
|
+
e[13] !== c || e[14] !== y || e[15] !== A || e[16] !== p || e[17] !== _ ? (b = /* @__PURE__ */ g(Pe, { className: p, aria: c, logo: A, href: y, target: _ }), e[13] = c, e[14] = y, e[15] = A, e[16] = p, e[17] = _, e[18] = b) : b = e[18];
|
|
136
|
+
let D;
|
|
137
|
+
e[19] !== a ? (D = ue(a) ? void 0 : /* @__PURE__ */ g(_e, { ...a }), e[19] = a, e[20] = D) : D = e[20];
|
|
138
|
+
let H;
|
|
139
|
+
return e[21] !== t || e[22] !== D || e[23] !== i || e[24] !== b ? (H = /* @__PURE__ */ he("div", { className: i, children: [
|
|
140
|
+
b,
|
|
141
|
+
D,
|
|
142
|
+
t
|
|
143
|
+
] }), e[21] = t, e[22] = D, e[23] = i, e[24] = b, e[25] = H) : H = e[25], H;
|
|
144
|
+
};
|
|
145
|
+
fe.displayName = "DSTopBar.BrandArea";
|
|
146
|
+
const _e = (d) => {
|
|
147
|
+
const e = P.c(10), {
|
|
148
|
+
children: t,
|
|
149
|
+
className: r,
|
|
150
|
+
subTitle: n,
|
|
151
|
+
variant: a
|
|
152
|
+
} = d, s = a === void 0 ? "single" : a, l = s === "double";
|
|
153
|
+
let c;
|
|
154
|
+
e[0] !== r || e[1] !== l ? (c = B(v.brandAddOn, r, {
|
|
155
|
+
[v.brandAddOnDouble]: l
|
|
156
|
+
}), e[0] = r, e[1] = l, e[2] = c) : c = e[2];
|
|
157
|
+
const o = c;
|
|
158
|
+
let m;
|
|
159
|
+
e[3] !== t || e[4] !== n || e[5] !== s ? (m = s === "single" ? t : /* @__PURE__ */ he(ge, { children: [
|
|
160
|
+
/* @__PURE__ */ g("span", { children: t }),
|
|
161
|
+
n && /* @__PURE__ */ g("span", { className: v.subTitle, children: n })
|
|
162
|
+
] }), e[3] = t, e[4] = n, e[5] = s, e[6] = m) : m = e[6];
|
|
163
|
+
let h;
|
|
164
|
+
return e[7] !== o || e[8] !== m ? (h = /* @__PURE__ */ g("span", { className: o, children: m }), e[7] = o, e[8] = m, e[9] = h) : h = e[9], h;
|
|
165
|
+
};
|
|
166
|
+
_e.displayName = "DSTopBar.BrandAddOn";
|
|
167
|
+
const Ae = (d) => {
|
|
168
|
+
const e = P.c(5), {
|
|
169
|
+
children: t,
|
|
170
|
+
className: r
|
|
171
|
+
} = d;
|
|
172
|
+
let n;
|
|
173
|
+
e[0] !== r ? (n = B(v.primary, r), e[0] = r, e[1] = n) : n = e[1];
|
|
174
|
+
let a;
|
|
175
|
+
return e[2] !== t || e[3] !== n ? (a = /* @__PURE__ */ g("div", { className: n, children: t }), e[2] = t, e[3] = n, e[4] = a) : a = e[4], a;
|
|
176
|
+
};
|
|
177
|
+
Ae.displayName = "DSTopBar.PrimaryArea";
|
|
178
|
+
const ye = (d) => {
|
|
179
|
+
const e = P.c(5), {
|
|
180
|
+
children: t,
|
|
181
|
+
className: r
|
|
182
|
+
} = d;
|
|
183
|
+
let n;
|
|
184
|
+
e[0] !== r ? (n = B(v.secondary, r), e[0] = r, e[1] = n) : n = e[1];
|
|
185
|
+
let a;
|
|
186
|
+
return e[2] !== t || e[3] !== n ? (a = /* @__PURE__ */ g("div", { className: n, children: t }), e[2] = t, e[3] = n, e[4] = a) : a = e[4], a;
|
|
187
|
+
};
|
|
188
|
+
ye.displayName = "DSTopBar.SecondaryArea";
|
|
189
|
+
I.BrandArea = fe;
|
|
190
|
+
I.PrimaryArea = Ae;
|
|
191
|
+
I.SecondaryArea = ye;
|
|
192
|
+
const Je = "ds-header_root_g2mvw_1", Ke = "ds-header_root--sticky_g2mvw_4", Qe = "ds-header_root--hidden_g2mvw_9", Xe = "ds-header_root--fixed_g2mvw_20", Ze = "ds-header_main-navigation-area_g2mvw_36", et = "ds-header_main-navigation-area--fixed_g2mvw_88", tt = "ds-header_main-navigation-area--fixed--visible_g2mvw_103", at = "ds-header_main-navigation-content_g2mvw_108", rt = "ds-header_main-navigation-content--variant-full_g2mvw_112", nt = "ds-header_header-placeholder_g2mvw_117", ot = "ds-header_header-placeholder--with-banner_g2mvw_120", S = {
|
|
193
|
+
root: Je,
|
|
194
|
+
rootSticky: Ke,
|
|
195
|
+
rootHidden: Qe,
|
|
196
|
+
rootFixed: Xe,
|
|
197
|
+
mainNavigationArea: Ze,
|
|
198
|
+
mainNavigationAreaFixed: et,
|
|
199
|
+
mainNavigationAreaFixedVisible: tt,
|
|
200
|
+
mainNavigationContent: at,
|
|
201
|
+
mainNavigationContentVariantFull: rt,
|
|
202
|
+
headerPlaceholder: nt,
|
|
203
|
+
headerPlaceholderWithBanner: ot
|
|
204
|
+
}, j = De({
|
|
205
|
+
variant: "main"
|
|
206
|
+
}), oe = (d) => {
|
|
207
|
+
const e = P.c(59);
|
|
208
|
+
let t, r, n, a, s, l, c;
|
|
209
|
+
e[0] !== d ? ({
|
|
210
|
+
children: r,
|
|
211
|
+
brandAddOnProps: t,
|
|
212
|
+
className: n,
|
|
213
|
+
isHeaderSticky: l,
|
|
214
|
+
variant: c,
|
|
215
|
+
logoProps: a,
|
|
216
|
+
...s
|
|
217
|
+
} = d, e[0] = d, e[1] = t, e[2] = r, e[3] = n, e[4] = a, e[5] = s, e[6] = l, e[7] = c) : (t = e[1], r = e[2], n = e[3], a = e[4], s = e[5], l = e[6], c = e[7]);
|
|
218
|
+
const o = l === void 0 ? !1 : l, m = c === void 0 ? "main" : c, [h, A] = T(!1);
|
|
219
|
+
let y;
|
|
220
|
+
e[8] !== r ? (y = F(r, oe.BannerArea, !0), e[8] = r, e[9] = y) : y = e[9];
|
|
221
|
+
const _ = y, f = F(r, I.BrandArea), u = F(r, I.PrimaryArea), x = F(r, I.SecondaryArea);
|
|
222
|
+
process.env.NODE_ENV !== "production" && Ee({
|
|
223
|
+
hasBrandArea: f,
|
|
224
|
+
hasPrimaryArea: u,
|
|
225
|
+
hasSecondaryArea: x
|
|
226
|
+
});
|
|
227
|
+
const p = xe(), [i, b] = T(!1), D = q(null), H = q(null), ie = q(null), pe = q(null), [C, Ne] = T(!1), [O, we] = T(!1), [w, ve] = T(!0), [se, Be] = T(!1), de = q(i);
|
|
228
|
+
let G, J;
|
|
229
|
+
e[10] !== o ? (G = () => {
|
|
230
|
+
if (o) {
|
|
231
|
+
const N = () => {
|
|
232
|
+
b((W) => (de.current = W, window.innerWidth < 1024));
|
|
233
|
+
};
|
|
234
|
+
return N(), window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
|
|
235
|
+
}
|
|
236
|
+
}, J = [o], e[10] = o, e[11] = G, e[12] = J) : (G = e[11], J = e[12]), re(G, J);
|
|
237
|
+
let K, Q;
|
|
238
|
+
e[13] !== o ? (K = () => {
|
|
239
|
+
if (o) {
|
|
240
|
+
const N = () => {
|
|
241
|
+
var Y, z, ae;
|
|
242
|
+
const W = ((Y = D.current) == null ? void 0 : Y.offsetHeight) ?? 0, ce = ((z = H.current) == null ? void 0 : z.offsetHeight) ?? 0, E = ((ae = ie.current) == null ? void 0 : ae.offsetHeight) ?? 0, L = document.documentElement;
|
|
243
|
+
L.style.setProperty("--ds-banner-height", `${me(W)}rem`), L.style.setProperty("--ds-header-height", `${me(ce)}rem`), L.style.setProperty("--ds-top-bar-height", `${me(E)}rem`);
|
|
244
|
+
};
|
|
245
|
+
return N(), window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
|
|
246
|
+
}
|
|
247
|
+
}, Q = [o], e[13] = o, e[14] = K, e[15] = Q) : (K = e[14], Q = e[15]), He(K, Q);
|
|
248
|
+
let X;
|
|
249
|
+
e[16] !== o || e[17] !== C || e[18] !== i || e[19] !== w || e[20] !== p ? (X = () => {
|
|
250
|
+
if (o) {
|
|
251
|
+
const N = () => {
|
|
252
|
+
const E = H.current, L = !!E && window.scrollY <= E.offsetHeight;
|
|
253
|
+
Ne(L);
|
|
254
|
+
const Y = pe.current, z = ie.current;
|
|
255
|
+
if (!i && de.current && !w) {
|
|
256
|
+
ve(C && !!E && window.scrollY <= E.offsetHeight);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
const ae = !!z && !!Y && Y.getBoundingClientRect().bottom > z.getBoundingClientRect().bottom;
|
|
260
|
+
ve(ae && !!E && window.scrollY <= E.offsetHeight);
|
|
261
|
+
};
|
|
262
|
+
window.addEventListener("scroll", N, {
|
|
263
|
+
passive: !0
|
|
264
|
+
}), N();
|
|
265
|
+
const W = H.current, ce = !!W && W.getBoundingClientRect().bottom > 0;
|
|
266
|
+
return i && we(p === "up" && !ce), i || Be(p === "up" && !w), () => {
|
|
267
|
+
window.removeEventListener("scroll", N);
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}, e[16] = o, e[17] = C, e[18] = i, e[19] = w, e[20] = p, e[21] = X) : X = e[21];
|
|
271
|
+
let Z;
|
|
272
|
+
e[22] !== o || e[23] !== i || e[24] !== p ? (Z = [o, i, de, p], e[22] = o, e[23] = i, e[24] = p, e[25] = Z) : Z = e[25], re(X, Z);
|
|
273
|
+
let ee;
|
|
274
|
+
e[26] !== n || e[27] !== O || e[28] !== o || e[29] !== C || e[30] !== i ? (ee = B(S.root, n, o ? {
|
|
275
|
+
[S.rootSticky]: i,
|
|
276
|
+
[S.rootHidden]: i && !C,
|
|
277
|
+
[S.rootFixed]: i && O
|
|
278
|
+
} : {}), e[26] = n, e[27] = O, e[28] = o, e[29] = C, e[30] = i, e[31] = ee) : ee = e[31];
|
|
279
|
+
const le = ee;
|
|
280
|
+
let V;
|
|
281
|
+
e[32] !== t || e[33] !== h || e[34] !== se || e[35] !== o || e[36] !== i || e[37] !== w || e[38] !== a || e[39] !== m ? (V = {
|
|
282
|
+
variant: m,
|
|
283
|
+
bannerAreaRef: D,
|
|
284
|
+
brandAddOnProps: t,
|
|
285
|
+
hasBrandAddOn: h,
|
|
286
|
+
setHasBrandAddOn: A,
|
|
287
|
+
isFixedMainNavigation: se,
|
|
288
|
+
isHeaderSticky: o,
|
|
289
|
+
isMobile: i,
|
|
290
|
+
isStickyMainNavigationVisible: w,
|
|
291
|
+
mainNavigationAreaRef: pe,
|
|
292
|
+
topBarAreaRef: ie,
|
|
293
|
+
logoProps: a
|
|
294
|
+
}, e[32] = t, e[33] = h, e[34] = se, e[35] = o, e[36] = i, e[37] = w, e[38] = a, e[39] = m, e[40] = V) : V = e[40];
|
|
295
|
+
let R;
|
|
296
|
+
e[41] !== r || e[42] !== V ? (R = /* @__PURE__ */ g(j.Provider, { value: V, children: r }), e[41] = r, e[42] = V, e[43] = R) : R = e[43];
|
|
297
|
+
let k;
|
|
298
|
+
e[44] !== s || e[45] !== le || e[46] !== R ? (k = /* @__PURE__ */ g("header", { className: le, ...s, ref: H, children: R }), e[44] = s, e[45] = le, e[46] = R, e[47] = k) : k = e[47];
|
|
299
|
+
let M;
|
|
300
|
+
e[48] !== O || e[49] !== i ? (M = i && O && /* @__PURE__ */ g("div", { className: S.headerPlaceholder }), e[48] = O, e[49] = i, e[50] = M) : M = e[50];
|
|
301
|
+
let $;
|
|
302
|
+
e[51] !== _ || e[52] !== i || e[53] !== w ? ($ = !i && !w && /* @__PURE__ */ g("div", { className: _ ? S.headerPlaceholderWithBanner : S.headerPlaceholder }), e[51] = _, e[52] = i, e[53] = w, e[54] = $) : $ = e[54];
|
|
303
|
+
let te;
|
|
304
|
+
return e[55] !== k || e[56] !== M || e[57] !== $ ? (te = /* @__PURE__ */ he(ge, { children: [
|
|
305
|
+
k,
|
|
306
|
+
M,
|
|
307
|
+
$
|
|
308
|
+
] }), e[55] = k, e[56] = M, e[57] = $, e[58] = te) : te = e[58], te;
|
|
309
|
+
}, be = (d) => {
|
|
310
|
+
const e = P.c(4), {
|
|
311
|
+
children: t,
|
|
312
|
+
className: r
|
|
313
|
+
} = d, {
|
|
314
|
+
bannerAreaRef: n
|
|
315
|
+
} = ne(j);
|
|
316
|
+
let a;
|
|
317
|
+
return e[0] !== n || e[1] !== t || e[2] !== r ? (a = /* @__PURE__ */ g("div", { ref: n, className: r, children: t }), e[0] = n, e[1] = t, e[2] = r, e[3] = a) : a = e[3], a;
|
|
318
|
+
};
|
|
319
|
+
be.displayName = "DSHeader.BannerArea";
|
|
320
|
+
const Se = (d) => {
|
|
321
|
+
const e = P.c(15), {
|
|
322
|
+
children: t,
|
|
323
|
+
className: r
|
|
324
|
+
} = d, {
|
|
325
|
+
variant: n,
|
|
326
|
+
isFixedMainNavigation: a,
|
|
327
|
+
isHeaderSticky: s,
|
|
328
|
+
isMobile: l,
|
|
329
|
+
isStickyMainNavigationVisible: c,
|
|
330
|
+
mainNavigationAreaRef: o
|
|
331
|
+
} = ne(j);
|
|
332
|
+
let m;
|
|
333
|
+
e[0] !== r || e[1] !== a || e[2] !== s || e[3] !== l || e[4] !== c ? (m = B(S.mainNavigationArea, r, s ? {
|
|
334
|
+
[S.mainNavigationAreaFixed]: !l && !c,
|
|
335
|
+
[S.mainNavigationAreaFixedVisible]: !l && a
|
|
336
|
+
} : {}), e[0] = r, e[1] = a, e[2] = s, e[3] = l, e[4] = c, e[5] = m) : m = e[5];
|
|
337
|
+
const h = m, A = n === "full";
|
|
338
|
+
let y;
|
|
339
|
+
e[6] !== A ? (y = B(S.mainNavigationContent, {
|
|
340
|
+
[S.mainNavigationContentVariantFull]: A
|
|
341
|
+
}), e[6] = A, e[7] = y) : y = e[7];
|
|
342
|
+
const _ = y;
|
|
343
|
+
let f;
|
|
344
|
+
e[8] !== t || e[9] !== _ ? (f = /* @__PURE__ */ g("div", { className: _, children: t }), e[8] = t, e[9] = _, e[10] = f) : f = e[10];
|
|
345
|
+
let u;
|
|
346
|
+
return e[11] !== o || e[12] !== h || e[13] !== f ? (u = /* @__PURE__ */ g("div", { className: h, ref: o, children: f }), e[11] = o, e[12] = h, e[13] = f, e[14] = u) : u = e[14], u;
|
|
347
|
+
};
|
|
348
|
+
Se.displayName = "DSHeader.MainNavigationArea";
|
|
349
|
+
oe.BannerArea = be;
|
|
350
|
+
oe.MainNavigationArea = Se;
|
|
351
|
+
oe.displayName = "DSHeader";
|
|
352
|
+
export {
|
|
353
|
+
At as B,
|
|
354
|
+
j as D,
|
|
355
|
+
ft as H,
|
|
356
|
+
oe as a,
|
|
357
|
+
I as b,
|
|
358
|
+
Ge as c,
|
|
359
|
+
ue as i,
|
|
360
|
+
Ee as v
|
|
361
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as $, jsxs as rt } from "react/jsx-runtime";
|
|
3
|
+
import { d as ht } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as J } from "./index.CEyLAtio.js";
|
|
5
|
+
import { forwardRef as vt, useState as gt, useRef as yt } from "react";
|
|
6
|
+
import { u as Pt } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
+
import { Asterisk as xt } from "../asterisk.CR60hx8S.js";
|
|
8
|
+
import { D as St } from "./Button.CC0qEsuR.js";
|
|
9
|
+
import { DSSystemFeedback as Dt } from "../systemfeedback.CLQCbTF6.js";
|
|
10
|
+
import { g as pt } from "./helpers.BbWkXTr3.js";
|
|
11
|
+
import '../assets/InputPassword.BuVQ9dRy.css';const Bt = "ds-input-password_input_1xglz_1", It = "ds-input-password_input--small_1xglz_9", zt = "ds-input-password_input--invalid_1xglz_121", kt = "ds-input-password_input--has-action-button_1xglz_182", Nt = "ds-input-password_root_1xglz_218", Ct = "ds-input-password_hint_1xglz_227", Ht = "ds-input-password_label_1xglz_227", Lt = "ds-input-password_wrapper_1xglz_231", $t = "ds-input-password_action-button_1xglz_237", qt = "ds-input-password_label--hidden_1xglz_255", At = "ds-input-password_label--disabled_1xglz_268", Tt = "ds-input-password_feedback_1xglz_288", s = {
|
|
12
|
+
input: Bt,
|
|
13
|
+
inputSmall: It,
|
|
14
|
+
inputInvalid: zt,
|
|
15
|
+
inputHasActionButton: kt,
|
|
16
|
+
root: Nt,
|
|
17
|
+
hint: Ct,
|
|
18
|
+
label: Ht,
|
|
19
|
+
wrapper: Lt,
|
|
20
|
+
actionButton: $t,
|
|
21
|
+
labelHidden: qt,
|
|
22
|
+
labelDisabled: At,
|
|
23
|
+
feedback: Tt
|
|
24
|
+
}, Et = ({
|
|
25
|
+
id: d,
|
|
26
|
+
label: i
|
|
27
|
+
}) => {
|
|
28
|
+
if (!d)
|
|
29
|
+
throw new Error(pt("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
|
|
30
|
+
if (!i)
|
|
31
|
+
throw new Error(pt("DSInputPassword", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`));
|
|
32
|
+
}, Vt = vt((d, i) => {
|
|
33
|
+
const t = ht.c(82);
|
|
34
|
+
let p, n, e, r, c, o, S, D, B, I, z, k, N, u;
|
|
35
|
+
t[0] !== d ? ({
|
|
36
|
+
id: e,
|
|
37
|
+
label: r,
|
|
38
|
+
autoComplete: S,
|
|
39
|
+
className: p,
|
|
40
|
+
disabled: D,
|
|
41
|
+
hint: n,
|
|
42
|
+
hideLabel: B,
|
|
43
|
+
invalid: I,
|
|
44
|
+
readonly: z,
|
|
45
|
+
required: k,
|
|
46
|
+
togglePasswordVisibilityButtonProps: u,
|
|
47
|
+
size: N,
|
|
48
|
+
systemFeedback: o,
|
|
49
|
+
...c
|
|
50
|
+
} = d, t[0] = d, t[1] = p, t[2] = n, t[3] = e, t[4] = r, t[5] = c, t[6] = o, t[7] = S, t[8] = D, t[9] = B, t[10] = I, t[11] = z, t[12] = k, t[13] = N, t[14] = u) : (p = t[1], n = t[2], e = t[3], r = t[4], c = t[5], o = t[6], S = t[7], D = t[8], B = t[9], I = t[10], z = t[11], k = t[12], N = t[13], u = t[14]);
|
|
51
|
+
const K = S === void 0 ? "new-password" : S, a = D === void 0 ? !1 : D, ct = B === void 0 ? !1 : B, l = I === void 0 ? !1 : I, q = z === void 0 ? !1 : z, b = k === void 0 ? !1 : k, C = N === void 0 ? "medium" : N;
|
|
52
|
+
process.env.NODE_ENV !== "production" && Et({
|
|
53
|
+
id: e,
|
|
54
|
+
label: r
|
|
55
|
+
});
|
|
56
|
+
let f;
|
|
57
|
+
t[15] !== u ? (f = u || {}, t[15] = u, t[16] = f) : f = t[16];
|
|
58
|
+
let m, H, L;
|
|
59
|
+
t[17] !== f ? ({
|
|
60
|
+
hidePasswordText: L,
|
|
61
|
+
showPasswordText: H,
|
|
62
|
+
...m
|
|
63
|
+
} = f, t[17] = f, t[18] = m, t[19] = H, t[20] = L) : (m = t[18], H = t[19], L = t[20]);
|
|
64
|
+
const ut = L === void 0 ? "Hide password" : L, bt = H === void 0 ? "Show password" : H, [Q, ft] = gt(!1), A = `${e}-label`, w = `${e}-feedback`, T = `${e}-hint`, mt = n ? ` ${T}` : "";
|
|
65
|
+
let E;
|
|
66
|
+
t[21] !== l || t[22] !== o || t[23] !== w ? (E = [l && o && w].filter(Boolean).join(" ") || void 0, t[21] = l, t[22] = o, t[23] = w, t[24] = E) : E = t[24];
|
|
67
|
+
const U = E, W = Pt(ct);
|
|
68
|
+
let V;
|
|
69
|
+
t[25] !== p ? (V = J(s.root, p), t[25] = p, t[26] = V) : V = t[26];
|
|
70
|
+
const X = V, Y = C === "small";
|
|
71
|
+
let F;
|
|
72
|
+
t[27] !== l || t[28] !== Y ? (F = J(s.input, {
|
|
73
|
+
[s.inputSmall]: Y,
|
|
74
|
+
[s.inputInvalid]: l,
|
|
75
|
+
[s.inputHasActionButton]: !0
|
|
76
|
+
}), t[27] = l, t[28] = Y, t[29] = F) : F = t[29];
|
|
77
|
+
const Z = F;
|
|
78
|
+
let R;
|
|
79
|
+
t[30] !== a || t[31] !== W ? (R = J(s.label, {
|
|
80
|
+
[s.labelHidden]: W,
|
|
81
|
+
[s.labelDisabled]: a
|
|
82
|
+
}), t[30] = a, t[31] = W, t[32] = R) : R = t[32];
|
|
83
|
+
const tt = R, et = C === "small";
|
|
84
|
+
let j;
|
|
85
|
+
t[33] !== et ? (j = J(s.actionButton, {
|
|
86
|
+
[s.actionButtonSmall]: et
|
|
87
|
+
}), t[33] = et, t[34] = j) : j = t[34];
|
|
88
|
+
const st = j, wt = yt(null);
|
|
89
|
+
let O;
|
|
90
|
+
t[35] !== i ? (O = (dt) => {
|
|
91
|
+
wt.current = dt, typeof i == "function" ? i(dt) : i && (i.current = dt);
|
|
92
|
+
}, t[35] = i, t[36] = O) : O = t[36];
|
|
93
|
+
const lt = O;
|
|
94
|
+
let M;
|
|
95
|
+
t[37] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
|
|
96
|
+
ft(Ft);
|
|
97
|
+
}, t[37] = M) : M = t[37];
|
|
98
|
+
const _t = M;
|
|
99
|
+
let _;
|
|
100
|
+
t[38] !== b ? (_ = b && /* @__PURE__ */ $(xt, {}), t[38] = b, t[39] = _) : _ = t[39];
|
|
101
|
+
let h;
|
|
102
|
+
t[40] !== e || t[41] !== A || t[42] !== r || t[43] !== tt || t[44] !== _ ? (h = /* @__PURE__ */ rt("label", { className: tt, id: A, htmlFor: e, children: [
|
|
103
|
+
r,
|
|
104
|
+
_
|
|
105
|
+
] }), t[40] = e, t[41] = A, t[42] = r, t[43] = tt, t[44] = _, t[45] = h) : h = t[45];
|
|
106
|
+
let v;
|
|
107
|
+
t[46] !== n || t[47] !== T ? (v = n && /* @__PURE__ */ $("div", { className: s.hint, id: T, children: n }), t[46] = n, t[47] = T, t[48] = v) : v = t[48];
|
|
108
|
+
let g;
|
|
109
|
+
t[49] !== l || t[50] !== o || t[51] !== w ? (g = l && o && /* @__PURE__ */ $(Dt, { className: s.feedback, message: o, type: "invalid", id: w }), t[49] = l, t[50] = o, t[51] = w, t[52] = g) : g = t[52];
|
|
110
|
+
const ot = `${A}${mt}`, at = Q ? "text" : "password";
|
|
111
|
+
let y;
|
|
112
|
+
t[53] !== U || t[54] !== K || t[55] !== a || t[56] !== lt || t[57] !== e || t[58] !== Z || t[59] !== l || t[60] !== q || t[61] !== b || t[62] !== c || t[63] !== ot || t[64] !== at ? (y = /* @__PURE__ */ $("input", { className: Z, id: e, ...c, ref: lt, "aria-labelledby": ot, "aria-describedby": U, "aria-invalid": l, "aria-disabled": q, readOnly: q, required: b, disabled: a, autoComplete: K, type: at }), t[53] = U, t[54] = K, t[55] = a, t[56] = lt, t[57] = e, t[58] = Z, t[59] = l, t[60] = q, t[61] = b, t[62] = c, t[63] = ot, t[64] = at, t[65] = y) : y = t[65];
|
|
113
|
+
const it = Q ? "eye-closed" : "eye", nt = Q ? ut : bt;
|
|
114
|
+
let P;
|
|
115
|
+
t[66] !== st || t[67] !== a || t[68] !== m || t[69] !== C || t[70] !== it || t[71] !== nt ? (P = /* @__PURE__ */ $(St, { ...m, hideLabel: !0, theme: "light", iconName: it, variant: "ghost", className: st, size: C, onClick: _t, type: "button", disabled: a, children: nt }), t[66] = st, t[67] = a, t[68] = m, t[69] = C, t[70] = it, t[71] = nt, t[72] = P) : P = t[72];
|
|
116
|
+
let x;
|
|
117
|
+
t[73] !== y || t[74] !== P ? (x = /* @__PURE__ */ rt("div", { className: s.wrapper, children: [
|
|
118
|
+
y,
|
|
119
|
+
P
|
|
120
|
+
] }), t[73] = y, t[74] = P, t[75] = x) : x = t[75];
|
|
121
|
+
let G;
|
|
122
|
+
return t[76] !== X || t[77] !== h || t[78] !== v || t[79] !== g || t[80] !== x ? (G = /* @__PURE__ */ rt("div", { className: X, children: [
|
|
123
|
+
h,
|
|
124
|
+
v,
|
|
125
|
+
g,
|
|
126
|
+
x
|
|
127
|
+
] }), t[76] = X, t[77] = h, t[78] = v, t[79] = g, t[80] = x, t[81] = G) : G = t[81], G;
|
|
128
|
+
});
|
|
129
|
+
Vt.displayName = "DSInputPassword";
|
|
130
|
+
function Ft(d) {
|
|
131
|
+
return !d;
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
Vt as D,
|
|
135
|
+
Et as v
|
|
136
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as L, jsxs as gt } from "react/jsx-runtime";
|
|
3
|
+
import { d as Vt } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as R } from "./index.CEyLAtio.js";
|
|
5
|
+
import { forwardRef as Ot, useState as $t, useRef as Et, useEffect as kt } from "react";
|
|
6
|
+
import { g as Nt, a as qt } from "./helpers.BbWkXTr3.js";
|
|
7
|
+
import { u as jt } from "./useBreakpoint.CMOR9ZOB.js";
|
|
8
|
+
import { Asterisk as Ft } from "../asterisk.CR60hx8S.js";
|
|
9
|
+
import { D as At } from "./Button.CC0qEsuR.js";
|
|
10
|
+
import { DSSystemFeedback as Rt } from "../systemfeedback.CLQCbTF6.js";
|
|
11
|
+
import '../assets/InputSearch.Dwtb3Mhw.css';const Tt = "ds-input-search_root_563xs_1", zt = "ds-input-search_input_563xs_5", Mt = "ds-input-search_input--small_563xs_13", Wt = "ds-input-search_input--invalid_563xs_125", Gt = "ds-input-search_input--has-action-button_563xs_186", Jt = "ds-input-search_input--has-second-action-button_563xs_189", Kt = "ds-input-search_hint_563xs_231", Qt = "ds-input-search_label_563xs_231", Ut = "ds-input-search_wrapper_563xs_235", Xt = "ds-input-search_action-button_563xs_241", Yt = "ds-input-search_second-action-button_563xs_245", Zt = "ds-input-search_label--hidden_563xs_263", te = "ds-input-search_label--disabled_563xs_276", ee = "ds-input-search_feedback_563xs_296", s = {
|
|
12
|
+
root: Tt,
|
|
13
|
+
input: zt,
|
|
14
|
+
inputSmall: Mt,
|
|
15
|
+
inputInvalid: Wt,
|
|
16
|
+
inputHasActionButton: Gt,
|
|
17
|
+
inputHasSecondActionButton: Jt,
|
|
18
|
+
hint: Kt,
|
|
19
|
+
label: Qt,
|
|
20
|
+
wrapper: Ut,
|
|
21
|
+
actionButton: Xt,
|
|
22
|
+
secondActionButton: Yt,
|
|
23
|
+
labelHidden: Zt,
|
|
24
|
+
labelDisabled: te,
|
|
25
|
+
feedback: ee
|
|
26
|
+
}, se = ({
|
|
27
|
+
id: a,
|
|
28
|
+
label: i
|
|
29
|
+
}) => {
|
|
30
|
+
if (!a)
|
|
31
|
+
throw new Error(Nt("DSInputSearch", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputSearch component.'));
|
|
32
|
+
if (!i)
|
|
33
|
+
throw new Error(Nt("DSInputSearch", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`));
|
|
34
|
+
}, ne = (a) => !!qt(a, "form"), ae = Ot((a, i) => {
|
|
35
|
+
const t = Vt.c(103);
|
|
36
|
+
let l, d, e, b, f, m, _, c, H, P, V, O, $, q, j, p;
|
|
37
|
+
t[0] !== a ? ({
|
|
38
|
+
id: e,
|
|
39
|
+
label: b,
|
|
40
|
+
className: l,
|
|
41
|
+
clearButtonLabel: H,
|
|
42
|
+
disabled: P,
|
|
43
|
+
hint: d,
|
|
44
|
+
hideLabel: V,
|
|
45
|
+
invalid: O,
|
|
46
|
+
readonly: $,
|
|
47
|
+
required: q,
|
|
48
|
+
size: j,
|
|
49
|
+
systemFeedback: c,
|
|
50
|
+
value: p,
|
|
51
|
+
submitButtonProps: _,
|
|
52
|
+
onChange: f,
|
|
53
|
+
...m
|
|
54
|
+
} = a, t[0] = a, t[1] = l, t[2] = d, t[3] = e, t[4] = b, t[5] = f, t[6] = m, t[7] = _, t[8] = c, t[9] = H, t[10] = P, t[11] = V, t[12] = O, t[13] = $, t[14] = q, t[15] = j, t[16] = p) : (l = t[1], d = t[2], e = t[3], b = t[4], f = t[5], m = t[6], _ = t[7], c = t[8], H = t[9], P = t[10], V = t[11], O = t[12], $ = t[13], q = t[14], j = t[15], p = t[16]);
|
|
55
|
+
const lt = H === void 0 ? "Clear search field" : H, o = P === void 0 ? !1 : P, Ct = V === void 0 ? !1 : V, n = O === void 0 ? !1 : O, r = $ === void 0 ? !1 : $, v = q === void 0 ? !1 : q, u = j === void 0 ? "medium" : j;
|
|
56
|
+
process.env.NODE_ENV !== "production" && se({
|
|
57
|
+
id: e,
|
|
58
|
+
label: b
|
|
59
|
+
});
|
|
60
|
+
let S;
|
|
61
|
+
t[17] !== _ ? (S = _ || {}, t[17] = _, t[18] = S) : S = t[18];
|
|
62
|
+
let y, B, F;
|
|
63
|
+
t[19] !== S ? ({
|
|
64
|
+
label: F,
|
|
65
|
+
onClick: y,
|
|
66
|
+
...B
|
|
67
|
+
} = S, t[19] = S, t[20] = y, t[21] = B, t[22] = F) : (y = t[20], B = t[21], F = t[22]);
|
|
68
|
+
const ot = F === void 0 ? "Search" : F, [D, xt] = $t(p), ct = Et(null), T = Et(null);
|
|
69
|
+
let z;
|
|
70
|
+
t[23] !== i ? (z = (h) => {
|
|
71
|
+
T.current = h, typeof i == "function" ? i(h) : i && (i.current = h);
|
|
72
|
+
}, t[23] = i, t[24] = z) : z = t[24];
|
|
73
|
+
const rt = z, ut = jt(Ct);
|
|
74
|
+
let M, W;
|
|
75
|
+
t[25] !== p ? (M = () => {
|
|
76
|
+
xt(p);
|
|
77
|
+
}, W = [p], t[25] = p, t[26] = M, t[27] = W) : (M = t[26], W = t[27]), kt(M, W);
|
|
78
|
+
let G;
|
|
79
|
+
t[28] !== e ? (G = () => {
|
|
80
|
+
ct.current && !ne(ct.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(Nt("DSInputSearch", `The DSInputSearch component with the id "${e}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`));
|
|
81
|
+
}, t[28] = e, t[29] = G) : G = t[29];
|
|
82
|
+
let J;
|
|
83
|
+
t[30] === Symbol.for("react.memo_cache_sentinel") ? (J = [], t[30] = J) : J = t[30], kt(G, J);
|
|
84
|
+
const K = `${e}-label`, I = `${e}-feedback`, Q = `${e}-hint`, Lt = d ? ` ${Q}` : "";
|
|
85
|
+
let U;
|
|
86
|
+
t[31] !== n || t[32] !== c || t[33] !== I ? (U = [n && c && I].filter(Boolean).join(" ") || void 0, t[31] = n, t[32] = c, t[33] = I, t[34] = U) : U = t[34];
|
|
87
|
+
const dt = U, X = D !== "" && D !== void 0 && D !== null;
|
|
88
|
+
let Y;
|
|
89
|
+
t[35] !== l ? (Y = R(s.root, l), t[35] = l, t[36] = Y) : Y = t[36];
|
|
90
|
+
const pt = Y, ht = u === "small", bt = X && !r && !o;
|
|
91
|
+
let Z;
|
|
92
|
+
t[37] !== n || t[38] !== ht || t[39] !== bt ? (Z = R(s.input, {
|
|
93
|
+
[s.inputSmall]: ht,
|
|
94
|
+
[s.inputInvalid]: n,
|
|
95
|
+
[s.inputHasActionButton]: !0,
|
|
96
|
+
[s.inputHasSecondActionButton]: bt
|
|
97
|
+
}), t[37] = n, t[38] = ht, t[39] = bt, t[40] = Z) : Z = t[40];
|
|
98
|
+
const ft = Z;
|
|
99
|
+
let tt;
|
|
100
|
+
t[41] !== o || t[42] !== ut ? (tt = R(s.label, {
|
|
101
|
+
[s.labelHidden]: ut,
|
|
102
|
+
[s.labelDisabled]: o
|
|
103
|
+
}), t[41] = o, t[42] = ut, t[43] = tt) : tt = t[43];
|
|
104
|
+
const mt = tt, _t = u === "small";
|
|
105
|
+
let et;
|
|
106
|
+
t[44] !== _t ? (et = R(s.actionButton, {
|
|
107
|
+
[s.actionButtonSmall]: _t
|
|
108
|
+
}), t[44] = _t, t[45] = et) : et = t[45];
|
|
109
|
+
const vt = et, St = u === "small";
|
|
110
|
+
let st;
|
|
111
|
+
t[46] !== St ? (st = R(s.secondActionButton, {
|
|
112
|
+
[s.secondActionButtonSmall]: St
|
|
113
|
+
}), t[46] = St, t[47] = st) : st = t[47];
|
|
114
|
+
const yt = st, Ht = ie;
|
|
115
|
+
let nt;
|
|
116
|
+
t[48] === Symbol.for("react.memo_cache_sentinel") ? (nt = () => {
|
|
117
|
+
var wt;
|
|
118
|
+
if (!T.current)
|
|
119
|
+
return;
|
|
120
|
+
Ht(T.current, "");
|
|
121
|
+
const h = new Event("change", {
|
|
122
|
+
bubbles: !0
|
|
123
|
+
});
|
|
124
|
+
(wt = T.current) == null || wt.dispatchEvent(h);
|
|
125
|
+
}, t[48] = nt) : nt = t[48];
|
|
126
|
+
const Pt = nt;
|
|
127
|
+
let at;
|
|
128
|
+
t[49] !== f ? (at = (h) => {
|
|
129
|
+
xt(h.target.value), f && f(h);
|
|
130
|
+
}, t[49] = f, t[50] = at) : at = t[50];
|
|
131
|
+
const Bt = at;
|
|
132
|
+
let g;
|
|
133
|
+
t[51] !== v ? (g = v && /* @__PURE__ */ L(Ft, {}), t[51] = v, t[52] = g) : g = t[52];
|
|
134
|
+
let N;
|
|
135
|
+
t[53] !== e || t[54] !== K || t[55] !== b || t[56] !== mt || t[57] !== g ? (N = /* @__PURE__ */ gt("label", { className: mt, id: K, htmlFor: e, children: [
|
|
136
|
+
b,
|
|
137
|
+
g
|
|
138
|
+
] }), t[53] = e, t[54] = K, t[55] = b, t[56] = mt, t[57] = g, t[58] = N) : N = t[58];
|
|
139
|
+
let x;
|
|
140
|
+
t[59] !== d || t[60] !== Q ? (x = d && /* @__PURE__ */ L("div", { className: s.hint, id: Q, children: d }), t[59] = d, t[60] = Q, t[61] = x) : x = t[61];
|
|
141
|
+
let w;
|
|
142
|
+
t[62] !== n || t[63] !== c || t[64] !== I ? (w = n && c && /* @__PURE__ */ L(Rt, { className: s.feedback, message: c, type: "invalid", id: I }), t[62] = n, t[63] = c, t[64] = I, t[65] = w) : w = t[65];
|
|
143
|
+
const Dt = `${K}${Lt}`;
|
|
144
|
+
let E;
|
|
145
|
+
t[66] !== dt || t[67] !== o || t[68] !== rt || t[69] !== Bt || t[70] !== e || t[71] !== ft || t[72] !== D || t[73] !== n || t[74] !== r || t[75] !== v || t[76] !== m || t[77] !== Dt ? (E = /* @__PURE__ */ L("input", { className: ft, id: e, ...m, ref: rt, "aria-labelledby": Dt, "aria-describedby": dt, "aria-invalid": n, "aria-disabled": r, readOnly: r, required: v, disabled: o, type: "search", value: D, onChange: Bt }), t[66] = dt, t[67] = o, t[68] = rt, t[69] = Bt, t[70] = e, t[71] = ft, t[72] = D, t[73] = n, t[74] = r, t[75] = v, t[76] = m, t[77] = Dt, t[78] = E) : E = t[78];
|
|
146
|
+
let k;
|
|
147
|
+
t[79] !== yt || t[80] !== lt || t[81] !== o || t[82] !== X || t[83] !== r || t[84] !== u ? (k = X && !r && !o && /* @__PURE__ */ L(At, { hideLabel: !0, theme: "light", iconName: "cross", className: yt, variant: "ghost", size: u, onClick: Pt, type: "button", tabIndex: -1, children: lt }), t[79] = yt, t[80] = lt, t[81] = o, t[82] = X, t[83] = r, t[84] = u, t[85] = k) : k = t[85];
|
|
148
|
+
const It = o || r;
|
|
149
|
+
let A;
|
|
150
|
+
t[86] !== y || t[87] !== B || t[88] !== u || t[89] !== vt || t[90] !== ot || t[91] !== It ? (A = /* @__PURE__ */ L(At, { ...B, hideLabel: !0, theme: "light", iconName: "magnifying-glass", className: vt, variant: "ghost", size: u, onClick: y, type: "submit", disabled: It, children: ot }), t[86] = y, t[87] = B, t[88] = u, t[89] = vt, t[90] = ot, t[91] = It, t[92] = A) : A = t[92];
|
|
151
|
+
let C;
|
|
152
|
+
t[93] !== E || t[94] !== k || t[95] !== A ? (C = /* @__PURE__ */ gt("div", { className: s.wrapper, children: [
|
|
153
|
+
E,
|
|
154
|
+
k,
|
|
155
|
+
A
|
|
156
|
+
] }), t[93] = E, t[94] = k, t[95] = A, t[96] = C) : C = t[96];
|
|
157
|
+
let it;
|
|
158
|
+
return t[97] !== pt || t[98] !== N || t[99] !== x || t[100] !== w || t[101] !== C ? (it = /* @__PURE__ */ gt("div", { className: pt, ref: ct, children: [
|
|
159
|
+
N,
|
|
160
|
+
x,
|
|
161
|
+
w,
|
|
162
|
+
C
|
|
163
|
+
] }), t[97] = pt, t[98] = N, t[99] = x, t[100] = w, t[101] = C, t[102] = it) : it = t[102], it;
|
|
164
|
+
});
|
|
165
|
+
ae.displayName = "DSInputSearch";
|
|
166
|
+
function ie(a, i) {
|
|
167
|
+
const t = Object.getPrototypeOf(a), l = Object.getOwnPropertyDescriptor(t, "value");
|
|
168
|
+
l != null && l.set ? l.set.call(a, i) : a.value = i;
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
ae as D,
|
|
172
|
+
ne as i,
|
|
173
|
+
se as v
|
|
174
|
+
};
|