asma-ui-core 3.96.0 → 3.97.0
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/dist/asma-ui-core.css +1 -1
- package/dist/components/inputs/input-field/StyledInputField.js +89 -84
- package/dist/components/inputs/input-field/StyledInputField.module.js +3 -3
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.module.js +3 -3
- package/dist/components/utils/popover/PopoverSheet.js +40 -40
- package/package.json +1 -1
|
@@ -4,140 +4,145 @@ import { CloseIcon as Ze } from "../../icons/close-icon/CloseIcon.js";
|
|
|
4
4
|
import { HelperRow as qe } from "../../../helpers/HelperRow.js";
|
|
5
5
|
import { useHelperRowBudget as Oe } from "../../../helpers/useHelperRowBudget.js";
|
|
6
6
|
import { useHelperSlot as et } from "../../../helpers/useHelperSlot.js";
|
|
7
|
-
import { floatingLabelClass as tt, floatingLabelLayoutStyle as nt, notchedLegendClass as ot, notchedOutlineClass as
|
|
8
|
-
import
|
|
9
|
-
import { Children as at, useCallback as st, useId as rt, useLayoutEffect as
|
|
10
|
-
import { jsx as o, jsxs as
|
|
11
|
-
import { useMergeRefs as
|
|
12
|
-
var Mt = ({ dataTest:
|
|
13
|
-
const be = rt(),
|
|
14
|
-
n || (
|
|
7
|
+
import { floatingLabelClass as tt, floatingLabelLayoutStyle as nt, notchedLegendClass as ot, notchedOutlineClass as Z, singleLineInputLayoutStyle as it, singleLineShellLayoutStyle as lt } from "../field-styles.js";
|
|
8
|
+
import y from "./StyledInputField.module.js";
|
|
9
|
+
import { Children as at, useCallback as st, useId as rt, useLayoutEffect as q, useRef as O, useState as D } from "react";
|
|
10
|
+
import { jsx as o, jsxs as S } from "react/jsx-runtime";
|
|
11
|
+
import { useMergeRefs as ee } from "@floating-ui/react";
|
|
12
|
+
var Mt = ({ dataTest: h, label: l, value: g, defaultValue: b, onChange: te, onBlur: ne, onFocus: oe, error: c, helperText: E, reserveHelperText: ie, expandHelperText: le = !0, disabled: s, readOnly: n, required: N, allowClear: ae, onClear: se, type: re = "text", placeholder: de, name: ce, id: pe, autoComplete: me, autoFocus: ue, multiline: r, rows: C, minRows: H, maxRows: R, size: he = "medium", fullWidth: P, className: ge, style: fe, sx: xe, inputRef: ye, slotProps: t, InputProps: T, onKeyDown: $, onClick: Se, variant: dt }) => {
|
|
13
|
+
const be = rt(), A = pe ?? be, j = `${A}-helper-text`, z = O(null), K = O(null), [He, Ie] = D(void 0), [I, U] = D(!1), [Le, V] = D(b != null && b !== ""), w = g !== void 0, Y = w ? g !== "" && g != null : Le, ve = !!s || !!n, _ = t?.input?.startAdornment ?? T?.startAdornment, f = at.count(_) > 0, d = f && Array.isArray(_), p = t?.input?.endAdornment ?? T?.endAdornment, L = !!(ae && Y && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = ye ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = ee([Ae]), _e = t?.input?.onMouseDown, G = t?.input?.onClick, Be = G ? { onClick: G } : {}, Fe = me ?? i.autoComplete, Me = ce ?? i.name, v = I || Y || f, ke = (e) => {
|
|
14
|
+
n || (w || V(e.target.value !== ""), te?.(e));
|
|
15
15
|
}, De = (e) => {
|
|
16
|
-
!s && !n &&
|
|
16
|
+
!s && !n && U(!0), oe?.(e);
|
|
17
17
|
}, Ee = (e) => {
|
|
18
|
-
!s && !n &&
|
|
18
|
+
!s && !n && U(!1), ne?.(e);
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
const e =
|
|
22
|
-
if (!r ||
|
|
20
|
+
q(() => {
|
|
21
|
+
const e = z.current;
|
|
22
|
+
if (!r || C != null || !e) return;
|
|
23
23
|
e.style.height = "auto";
|
|
24
|
-
const
|
|
25
|
-
e.style.height = `${Math.min(Xe, Math.max(
|
|
24
|
+
const u = getComputedStyle(e), x = Number.parseFloat(u.lineHeight) || 24, X = Number.parseFloat(u.paddingTop) + Number.parseFloat(u.paddingBottom), We = H ? H * x + X : 0, Xe = R ? R * x + X : Number.POSITIVE_INFINITY;
|
|
25
|
+
e.style.height = `${Math.min(Xe, Math.max(We, e.scrollHeight))}px`;
|
|
26
26
|
}, [
|
|
27
27
|
b,
|
|
28
|
-
|
|
28
|
+
R,
|
|
29
29
|
H,
|
|
30
30
|
r,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
C,
|
|
32
|
+
g
|
|
33
33
|
]);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}, [])]), { style: F, ...Pe } = i,
|
|
34
|
+
const J = ee([Ce, st((e) => {
|
|
35
|
+
z.current = e instanceof HTMLTextAreaElement ? e : null;
|
|
36
|
+
}, [])]), { style: F, ...Pe } = i, m = !r && !d, { height: ct, minHeight: pt, maxHeight: mt, paddingTop: ut, paddingBottom: ht, ...Te } = B ?? {}, $e = m ? {
|
|
37
37
|
...Te,
|
|
38
38
|
...lt()
|
|
39
39
|
} : d ? {
|
|
40
40
|
boxSizing: "border-box",
|
|
41
41
|
minHeight: 40,
|
|
42
42
|
...B
|
|
43
|
-
} : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop:
|
|
43
|
+
} : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: yt, paddingBottom: St, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = m ? {
|
|
44
44
|
...ze,
|
|
45
45
|
...it({
|
|
46
|
-
paddingLeft:
|
|
47
|
-
paddingRight: je ?? He ?? (
|
|
46
|
+
paddingLeft: f ? 40 : 14,
|
|
47
|
+
paddingRight: je ?? He ?? (L || p ? 40 : 14)
|
|
48
48
|
})
|
|
49
49
|
} : F;
|
|
50
|
-
|
|
51
|
-
if (!
|
|
52
|
-
const e =
|
|
53
|
-
Ie((x) => x ===
|
|
54
|
-
}
|
|
55
|
-
|
|
50
|
+
q(() => {
|
|
51
|
+
if (!m) return;
|
|
52
|
+
const e = K.current, u = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
|
|
53
|
+
Ie((x) => x === u ? x : u);
|
|
54
|
+
}, [
|
|
55
|
+
m,
|
|
56
|
+
L,
|
|
57
|
+
p
|
|
58
|
+
]);
|
|
59
|
+
const Ue = v || !l, { show: M, role: Ve } = et("StyledInputField", c, E, ie, n), { fieldRef: Ye, rowRef: Ge, rowStyle: Je } = Oe(le && M), Q = {
|
|
56
60
|
...Pe,
|
|
57
|
-
style:
|
|
58
|
-
id: i.id ??
|
|
61
|
+
style: m ? Ke : F,
|
|
62
|
+
id: i.id ?? A,
|
|
59
63
|
name: Me,
|
|
60
|
-
placeholder: Ue ?
|
|
64
|
+
placeholder: Ue ? de : void 0,
|
|
61
65
|
disabled: s,
|
|
62
66
|
readOnly: n,
|
|
63
|
-
required:
|
|
67
|
+
required: N,
|
|
64
68
|
autoComplete: Fe,
|
|
65
|
-
autoFocus:
|
|
66
|
-
value:
|
|
69
|
+
autoFocus: ue,
|
|
70
|
+
value: g,
|
|
67
71
|
defaultValue: b,
|
|
68
72
|
"aria-invalid": c ? !0 : void 0,
|
|
69
73
|
"aria-label": i["aria-label"] ?? (i["aria-labelledby"] ? void 0 : typeof l == "string" && l !== "" ? l : void 0),
|
|
70
|
-
"aria-describedby": M ?
|
|
74
|
+
"aria-describedby": M ? j : i["aria-describedby"],
|
|
71
75
|
onChange: ke,
|
|
72
76
|
onFocus: De,
|
|
73
77
|
onBlur: Ee,
|
|
74
|
-
onKeyDown: i.onKeyDown ||
|
|
75
|
-
|
|
78
|
+
onKeyDown: i.onKeyDown || $ ? (e) => {
|
|
79
|
+
$?.(e), e.defaultPrevented || i.onKeyDown?.(e);
|
|
76
80
|
} : void 0
|
|
77
|
-
},
|
|
78
|
-
"data-start-adornment":
|
|
79
|
-
"data-end-adornment":
|
|
81
|
+
}, W = a(y.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", d ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : r ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : a("w-full", y["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Re), Qe = !r && !d ? {
|
|
82
|
+
"data-start-adornment": f ? "true" : void 0,
|
|
83
|
+
"data-end-adornment": L || p ? "true" : void 0
|
|
80
84
|
} : {};
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
ref:
|
|
83
|
-
className: a("group relative
|
|
84
|
-
onClick:
|
|
85
|
+
return /* @__PURE__ */ S("div", {
|
|
86
|
+
ref: Ye,
|
|
87
|
+
className: a("group relative min-w-0 flex-col", ge),
|
|
88
|
+
onClick: Se,
|
|
85
89
|
style: {
|
|
86
|
-
|
|
90
|
+
display: P ? "flex" : "inline-flex",
|
|
91
|
+
width: P ? "100%" : 235,
|
|
87
92
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
88
93
|
letterSpacing: "0.00938em",
|
|
89
94
|
...k(xe),
|
|
90
95
|
...fe
|
|
91
96
|
},
|
|
92
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ S("div", {
|
|
93
98
|
className: "relative overflow-visible",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
-
className: a("relative flex",
|
|
99
|
+
children: [/* @__PURE__ */ S("div", {
|
|
100
|
+
className: a("relative flex", m && y.InputShell, r && "box-border items-center px-[14px] py-[16.5px]", d && a(y.AdornmentList, p && y["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
|
|
96
101
|
ref: we,
|
|
97
102
|
onMouseDown: _e,
|
|
98
103
|
...Be,
|
|
99
104
|
style: $e,
|
|
100
|
-
"data-testid": d ? `${
|
|
105
|
+
"data-testid": d ? `${h}-adornment-list` : `${h}-shell`,
|
|
101
106
|
children: [
|
|
102
|
-
|
|
107
|
+
f && /* @__PURE__ */ o("span", {
|
|
103
108
|
className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
|
|
104
|
-
children:
|
|
109
|
+
children: _
|
|
105
110
|
}),
|
|
106
111
|
r ? /* @__PURE__ */ o("textarea", {
|
|
107
|
-
...
|
|
108
|
-
ref:
|
|
109
|
-
"data-testid":
|
|
110
|
-
rows:
|
|
111
|
-
className:
|
|
112
|
+
...Q,
|
|
113
|
+
ref: J,
|
|
114
|
+
"data-testid": h,
|
|
115
|
+
rows: C ?? H ?? 2,
|
|
116
|
+
className: W
|
|
112
117
|
}) : /* @__PURE__ */ o("input", {
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
ref:
|
|
116
|
-
"data-testid":
|
|
117
|
-
type:
|
|
118
|
-
className:
|
|
118
|
+
...Q,
|
|
119
|
+
...Qe,
|
|
120
|
+
ref: J,
|
|
121
|
+
"data-testid": h,
|
|
122
|
+
type: re,
|
|
123
|
+
className: W
|
|
119
124
|
}),
|
|
120
|
-
|
|
125
|
+
L ? /* @__PURE__ */ o("button", {
|
|
121
126
|
type: "button",
|
|
122
127
|
tabIndex: -1,
|
|
123
128
|
"aria-label": "Clear",
|
|
124
|
-
"data-testid": `${
|
|
129
|
+
"data-testid": `${h}-clear`,
|
|
125
130
|
className: "asma-pressable absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
|
|
126
131
|
onClick: (e) => {
|
|
127
|
-
e.stopPropagation(), e.preventDefault(),
|
|
132
|
+
e.stopPropagation(), e.preventDefault(), w || V(!1), se?.();
|
|
128
133
|
},
|
|
129
134
|
children: /* @__PURE__ */ o(Ze, {
|
|
130
135
|
width: 18,
|
|
131
136
|
height: 18
|
|
132
137
|
})
|
|
133
|
-
}) :
|
|
134
|
-
ref:
|
|
138
|
+
}) : p && /* @__PURE__ */ o("span", {
|
|
139
|
+
ref: K,
|
|
135
140
|
className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
|
|
136
|
-
children:
|
|
141
|
+
children: p
|
|
137
142
|
}),
|
|
138
143
|
l ? /* @__PURE__ */ o("fieldset", {
|
|
139
144
|
"aria-hidden": !0,
|
|
140
|
-
className:
|
|
145
|
+
className: Z({
|
|
141
146
|
focused: I,
|
|
142
147
|
error: c,
|
|
143
148
|
disabled: s,
|
|
@@ -145,15 +150,15 @@ var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBl
|
|
|
145
150
|
notched: !0
|
|
146
151
|
}),
|
|
147
152
|
children: /* @__PURE__ */ o("legend", {
|
|
148
|
-
className: ot(
|
|
149
|
-
children: /* @__PURE__ */
|
|
153
|
+
className: ot(v),
|
|
154
|
+
children: /* @__PURE__ */ S("span", {
|
|
150
155
|
className: "inline-block px-[5px]",
|
|
151
|
-
children: [l,
|
|
156
|
+
children: [l, N && " *"]
|
|
152
157
|
})
|
|
153
158
|
})
|
|
154
159
|
}) : /* @__PURE__ */ o("div", {
|
|
155
160
|
"aria-hidden": !0,
|
|
156
|
-
className:
|
|
161
|
+
className: Z({
|
|
157
162
|
focused: I,
|
|
158
163
|
error: c,
|
|
159
164
|
disabled: s,
|
|
@@ -162,33 +167,33 @@ var Mt = ({ dataTest: m, label: l, value: u, defaultValue: b, onChange: ee, onBl
|
|
|
162
167
|
})
|
|
163
168
|
})
|
|
164
169
|
]
|
|
165
|
-
}), l && /* @__PURE__ */
|
|
166
|
-
htmlFor:
|
|
170
|
+
}), l && /* @__PURE__ */ S("label", {
|
|
171
|
+
htmlFor: A,
|
|
167
172
|
className: a(tt({
|
|
168
|
-
shrink:
|
|
173
|
+
shrink: v,
|
|
169
174
|
focused: I,
|
|
170
175
|
error: c,
|
|
171
176
|
disabled: s,
|
|
172
177
|
readOnly: n,
|
|
173
|
-
size:
|
|
178
|
+
size: he
|
|
174
179
|
}), t?.inputLabel?.className),
|
|
175
180
|
style: {
|
|
176
181
|
...k(t?.inputLabel?.sx),
|
|
177
182
|
...t?.inputLabel?.style,
|
|
178
|
-
...nt(
|
|
183
|
+
...nt(v)
|
|
179
184
|
},
|
|
180
|
-
children: [l,
|
|
185
|
+
children: [l, N && " *"]
|
|
181
186
|
})]
|
|
182
187
|
}), M && /* @__PURE__ */ o(qe, {
|
|
183
|
-
ref:
|
|
184
|
-
id:
|
|
188
|
+
ref: Ge,
|
|
189
|
+
id: j,
|
|
185
190
|
role: Ve,
|
|
186
191
|
error: c,
|
|
187
192
|
message: E,
|
|
188
193
|
hideErrorIcon: t?.formHelperText?.hideErrorIcon,
|
|
189
194
|
className: a("mr-[14px] box-border items-start", t?.formHelperText?.className),
|
|
190
195
|
style: {
|
|
191
|
-
...
|
|
196
|
+
...Je,
|
|
192
197
|
...k(t?.formHelperText?.sx)
|
|
193
198
|
}
|
|
194
199
|
})]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var n = "
|
|
1
|
+
var n = "_Input_1focb_1", t = "_InputShell_1focb_8", e = "_AdornmentList_1focb_36", _ = {
|
|
2
2
|
Input: n,
|
|
3
3
|
InputShell: t,
|
|
4
|
-
"Input--singleLine": "_Input--
|
|
4
|
+
"Input--singleLine": "_Input--singleLine_1focb_17",
|
|
5
5
|
AdornmentList: e,
|
|
6
|
-
"AdornmentList--endAdornment": "_AdornmentList--
|
|
6
|
+
"AdornmentList--endAdornment": "_AdornmentList--endAdornment_1focb_46"
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
_ as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var e = "
|
|
1
|
+
var e = "_styledSelectAutocompleteWrapper_f4sqa_1", t = {
|
|
2
2
|
styledSelectAutocompleteWrapper: e,
|
|
3
|
-
"select-custom-icon": "_select-custom-
|
|
4
|
-
"select-custom-icon-open": "_select-custom-icon-
|
|
3
|
+
"select-custom-icon": "_select-custom-icon_f4sqa_6",
|
|
4
|
+
"select-custom-icon-open": "_select-custom-icon-open_f4sqa_14"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
t as default
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { firstTabbable as
|
|
3
|
-
import { TOP_LAYER_PROPS as
|
|
4
|
-
import { StyledButton as
|
|
5
|
-
import { useMobileMediaQuery as
|
|
6
|
-
import { useDebouncedValue as
|
|
7
|
-
import { useFocusTrap as
|
|
8
|
-
import { formatResultsLabel as
|
|
9
|
-
import { StyledBottomSheet as
|
|
10
|
-
import { PopoverAnatomy as
|
|
11
|
-
import { useCallback as m, useEffect as b, useId as
|
|
1
|
+
import { cn as re } from "../../../helpers/cn.js";
|
|
2
|
+
import { firstTabbable as ne } from "../../../helpers/focusable.js";
|
|
3
|
+
import { TOP_LAYER_PROPS as ie, TOP_LAYER_RESET_STYLE as se, getOpenModalDialogAncestor as ae, shouldUsePopoverTopLayer as ce, useTopLayerRef as le } from "../../../hooks/useTopLayer.hook.js";
|
|
4
|
+
import { StyledButton as ue } from "../../inputs/button/StyledButton.js";
|
|
5
|
+
import { useMobileMediaQuery as de } from "../../../hooks/useMediaQuery.hook.js";
|
|
6
|
+
import { useDebouncedValue as fe } from "../../../hooks/useDebouncedValue.hook.js";
|
|
7
|
+
import { useFocusTrap as pe } from "../../../hooks/useFocusTrap.hook.js";
|
|
8
|
+
import { formatResultsLabel as me } from "../bottom-sheet/formatResultsLabel.js";
|
|
9
|
+
import { StyledBottomSheet as ge } from "../bottom-sheet/StyledBottomSheet.js";
|
|
10
|
+
import { PopoverAnatomy as ve } from "./PopoverAnatomy.js";
|
|
11
|
+
import { useCallback as m, useEffect as b, useId as he, useRef as y, useState as g } from "react";
|
|
12
12
|
import { Fragment as N, jsx as c, jsxs as W } from "react/jsx-runtime";
|
|
13
|
-
import { FloatingPortal as
|
|
14
|
-
var
|
|
13
|
+
import { FloatingPortal as xe, autoUpdate as _e, flip as Pe, offset as be, shift as ye, size as Re, useDismiss as Ee, useFloating as Se, useInteractions as Te, useMergeRefs as Ae } from "@floating-ui/react";
|
|
14
|
+
var Me = 240, we = {
|
|
15
15
|
info: 472,
|
|
16
16
|
action: 472
|
|
17
|
-
},
|
|
18
|
-
const a =
|
|
17
|
+
}, Fe = 0.6, B = "calc(100vw - 32px)", qe = ({ dataTest: s, renderTrigger: R, variant: E = "info", title: l, children: S, viewResultsAction: T, resetAction: A, footerActions: M, resultCount: v, closeLabel: w = "Lukk", ariaLabel: F, onOpenChange: I, className: O }) => {
|
|
18
|
+
const a = he(), L = `${a}-title`, [o, X] = g(!1), [H, U] = g(), [Y, $] = g(), u = de(), t = E === "action", j = u && !t, k = u && t, d = m((e) => {
|
|
19
19
|
X(e), I?.(e);
|
|
20
|
-
}, [I]), { refs: h, floatingStyles: q, context: z } =
|
|
20
|
+
}, [I]), { refs: h, floatingStyles: q, context: z } = Se({
|
|
21
21
|
open: o,
|
|
22
22
|
onOpenChange: d,
|
|
23
23
|
placement: "bottom-start",
|
|
24
24
|
strategy: "fixed",
|
|
25
|
-
whileElementsMounted:
|
|
25
|
+
whileElementsMounted: _e,
|
|
26
26
|
middleware: [
|
|
27
|
-
|
|
28
|
-
...j ? [] : [
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
be(8),
|
|
28
|
+
...j ? [] : [Pe({ padding: 8 })],
|
|
29
|
+
ye({ padding: 8 }),
|
|
30
|
+
Re({
|
|
31
31
|
padding: 8,
|
|
32
32
|
apply({ availableHeight: e }) {
|
|
33
|
-
$(Math.min(e, Math.round(window.innerHeight *
|
|
33
|
+
$(Math.min(e, Math.round(window.innerHeight * Fe)));
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
36
|
]
|
|
37
|
-
}), { getFloatingProps: V } =
|
|
37
|
+
}), { getFloatingProps: V } = Te([Ee(z, {
|
|
38
38
|
enabled: !k,
|
|
39
39
|
escapeKey: !0,
|
|
40
40
|
outsidePress: (e) => {
|
|
41
41
|
const i = f.current;
|
|
42
42
|
return !(i && e.target instanceof Node && i.contains(e.target));
|
|
43
43
|
}
|
|
44
|
-
})]), x =
|
|
44
|
+
})]), x = ce(H), C = y(null), [r, G] = g(null), K = m((e) => {
|
|
45
45
|
C.current = e, G(e);
|
|
46
|
-
}, []), Q =
|
|
46
|
+
}, []), Q = Ae([le(h.setFloating, x), K]), f = y(null), J = m((e) => {
|
|
47
47
|
f.current = e, h.setReference(e);
|
|
48
48
|
}, [h]), n = m(() => {
|
|
49
49
|
d(!1);
|
|
50
50
|
}, [d]);
|
|
51
|
-
|
|
51
|
+
pe(o && t && r !== null, C), b(() => {
|
|
52
52
|
if (!r) return;
|
|
53
53
|
const e = requestAnimationFrame(() => {
|
|
54
|
-
(t ?
|
|
54
|
+
(t ? ne(r) : r)?.focus({ preventScroll: !0 });
|
|
55
55
|
});
|
|
56
56
|
return () => {
|
|
57
57
|
cancelAnimationFrame(e);
|
|
@@ -96,21 +96,21 @@ var Ae = 240, Me = {
|
|
|
96
96
|
n();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
U(
|
|
99
|
+
U(ae(e.currentTarget)), d(!0);
|
|
100
100
|
},
|
|
101
101
|
"aria-expanded": o,
|
|
102
102
|
"aria-controls": o ? a : void 0,
|
|
103
103
|
"aria-haspopup": t ? "dialog" : void 0,
|
|
104
104
|
"aria-describedby": !t && o ? a : void 0
|
|
105
105
|
}
|
|
106
|
-
}, p = (e) => typeof e == "function" ? e({ close: n }) : e, Z =
|
|
106
|
+
}, p = (e) => typeof e == "function" ? e({ close: n }) : e, Z = fe(v, 500), ee = T ?? (v === void 0 ? void 0 : /* @__PURE__ */ c(ue, {
|
|
107
107
|
dataTest: `${s}-view-results`,
|
|
108
108
|
type: "button",
|
|
109
109
|
variant: "text",
|
|
110
110
|
onClick: n,
|
|
111
|
-
children:
|
|
112
|
-
})), te = u ? B :
|
|
113
|
-
return k ? /* @__PURE__ */ W(N, { children: [R(D), /* @__PURE__ */ c(
|
|
111
|
+
children: me(Z)
|
|
112
|
+
})), te = u ? B : we[E], oe = u ? B : void 0;
|
|
113
|
+
return k ? /* @__PURE__ */ W(N, { children: [R(D), /* @__PURE__ */ c(ge, {
|
|
114
114
|
id: a,
|
|
115
115
|
dataTest: s,
|
|
116
116
|
open: o,
|
|
@@ -124,7 +124,7 @@ var Ae = 240, Me = {
|
|
|
124
124
|
closeLabel: w,
|
|
125
125
|
className: O,
|
|
126
126
|
children: S
|
|
127
|
-
})] }) : /* @__PURE__ */ W(N, { children: [R(D), o && /* @__PURE__ */ c(
|
|
127
|
+
})] }) : /* @__PURE__ */ W(N, { children: [R(D), o && /* @__PURE__ */ c(xe, {
|
|
128
128
|
root: H,
|
|
129
129
|
children: /* @__PURE__ */ c("div", {
|
|
130
130
|
...V(),
|
|
@@ -136,17 +136,17 @@ var Ae = 240, Me = {
|
|
|
136
136
|
"aria-labelledby": t && l ? L : void 0,
|
|
137
137
|
"aria-label": t && !l ? F : void 0,
|
|
138
138
|
tabIndex: t ? void 0 : -1,
|
|
139
|
-
...x ?
|
|
139
|
+
...x ? ie : {},
|
|
140
140
|
style: {
|
|
141
|
-
...x ?
|
|
141
|
+
...x ? se : {},
|
|
142
142
|
...q,
|
|
143
|
-
minWidth:
|
|
144
|
-
width:
|
|
143
|
+
minWidth: Me,
|
|
144
|
+
width: oe,
|
|
145
145
|
maxWidth: te,
|
|
146
146
|
maxHeight: Y
|
|
147
147
|
},
|
|
148
|
-
className:
|
|
149
|
-
children: /* @__PURE__ */ c(
|
|
148
|
+
className: re("z-[1300]", "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]", O),
|
|
149
|
+
children: /* @__PURE__ */ c(ve, {
|
|
150
150
|
dataTest: s,
|
|
151
151
|
title: l,
|
|
152
152
|
titleId: L,
|
|
@@ -161,5 +161,5 @@ var Ae = 240, Me = {
|
|
|
161
161
|
})] });
|
|
162
162
|
};
|
|
163
163
|
export {
|
|
164
|
-
|
|
164
|
+
qe as PopoverSheet
|
|
165
165
|
};
|