@pismo/marola 2.1.64 → 2.1.66
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/Button-CJaBSdv1.js +135 -0
- package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
- package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
- package/dist/Popup-D267EI4e.js +1338 -0
- package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
- package/dist/RadioOption-DyRY8xlF.js +1094 -0
- package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/DropdownMenu.css +1 -1
- package/dist/assets/ToastCard.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
- package/dist/components/Alert/Alert.stories.d.ts +6 -6
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +311 -320
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
- package/dist/components/BankingCard/BankingCard.d.ts +0 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +56 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/DatePicker/DatePicker.js +742 -639
- package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
- package/dist/components/DatePicker/dateUtils.d.ts +2 -2
- package/dist/components/DatePicker/dateUtils.js +1 -1
- package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +372 -352
- package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
- package/dist/components/Draggable/Draggable.d.ts +0 -1
- package/dist/components/Draggable/Draggable.js +1 -1
- package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
- package/dist/components/Draggable/useDraggable.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +335 -320
- package/dist/components/InputSearch/InputSearch.d.ts +31 -31
- package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverBody.d.ts +0 -1
- package/dist/components/Popover/PopoverFooter.d.ts +0 -1
- package/dist/components/Popover/PopoverHeader.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.js +684 -769
- package/dist/components/RadioButton/RadioOption.d.ts +0 -1
- package/dist/components/RadioButton/RadioOption.js +3 -3
- package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
- package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +625 -591
- package/dist/components/Skeleton/Skeleton.d.ts +0 -1
- package/dist/components/Snackbar/Snackbar.js +295 -239
- package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +5 -5
- package/dist/components/Tabs/Tab.js +107 -98
- package/dist/components/Tabs/TabPanel.js +58 -55
- package/dist/components/Tabs/Tabs.js +246 -231
- package/dist/components/ToastCard/ToastCard.js +31 -31
- package/dist/components/Toggle/Toggle.js +147 -137
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +266 -325
- package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
- package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
- package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
- package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
- package/dist/getReactElementRef-iorwYm2A.js +19 -0
- package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/main.js +2 -2
- package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
- package/dist/react-BTbo_5A3.js +526 -0
- package/dist/setRef-Bo0HEdBB.js +6 -0
- package/dist/useButton-C2E_LFJp.js +90 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useList-BLW78Lq7.js +446 -0
- package/dist/utils/draggable.d.ts +2 -2
- package/dist/utils/iconsList.js +118 -112
- package/package.json +1 -1
- package/dist/Button-BrEDdtHO.js +0 -130
- package/dist/Popup-Dffqo7wT.js +0 -1246
- package/dist/RadioOption-DYovqiwF.js +0 -720
- package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
- package/dist/exactProp-SYjL19cU.js +0 -13
- package/dist/react-BvI-Sw9b.js +0 -509
- package/dist/useButton-CezPDte8.js +0 -105
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-nqLfZem8.js +0 -435
- package/dist/useSlotProps-CYHDC4TN.js +0 -834
- package/dist/useTimeout-DxF9kiZL.js +0 -36
|
@@ -1,285 +1,226 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { T as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const t = F.useContext(at);
|
|
1
|
+
import { jsx as h, jsxs as P, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { useRef as W, useState as O, useEffect as D, isValidElement as Y, cloneElement as G } from "react";
|
|
4
|
+
import { T as J, P as K, f as Q } from "../../Popup-D267EI4e.js";
|
|
5
|
+
import { c as L } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { P as d } from "../../ClassNameConfigurator-CVRWfyIa.js";
|
|
7
|
+
import '../../assets/Tooltip.css';function Z() {
|
|
8
|
+
const t = r.useContext(J);
|
|
10
9
|
if (!t)
|
|
11
10
|
throw new Error("Missing transition context");
|
|
12
11
|
const {
|
|
13
12
|
registerTransition: e,
|
|
14
13
|
requestedEnter: i,
|
|
15
|
-
onExited:
|
|
14
|
+
onExited: o
|
|
16
15
|
} = t;
|
|
17
|
-
return
|
|
18
|
-
onExited:
|
|
16
|
+
return r.useEffect(() => e(), [e]), {
|
|
17
|
+
onExited: o,
|
|
19
18
|
requestedEnter: i
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
function Y(t) {
|
|
21
|
+
function S(t) {
|
|
24
22
|
const {
|
|
25
23
|
children: e,
|
|
26
24
|
className: i,
|
|
27
|
-
enterAnimationName:
|
|
28
|
-
enterClassName:
|
|
29
|
-
exitAnimationName:
|
|
30
|
-
exitClassName:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
enterAnimationName: o,
|
|
26
|
+
enterClassName: f,
|
|
27
|
+
exitAnimationName: s,
|
|
28
|
+
exitClassName: g,
|
|
29
|
+
...a
|
|
30
|
+
} = t, {
|
|
31
|
+
requestedEnter: c,
|
|
32
|
+
onExited: y
|
|
33
|
+
} = Z(), u = r.useRef(!0);
|
|
34
|
+
r.useEffect(() => {
|
|
35
|
+
c && u.current && (u.current = !1);
|
|
36
|
+
}, [c]);
|
|
37
|
+
const _ = r.useCallback((E) => {
|
|
38
|
+
E.animationName === s ? (y(), u.current = !0) : E.animationName === o && (u.current = !1);
|
|
39
|
+
}, [y, s, o]);
|
|
40
|
+
return /* @__PURE__ */ h("div", {
|
|
41
|
+
onAnimationEnd: _,
|
|
42
|
+
className: L(i, c ? f : g),
|
|
43
|
+
...a,
|
|
45
44
|
children: e
|
|
46
|
-
})
|
|
45
|
+
});
|
|
47
46
|
}
|
|
48
|
-
process.env.NODE_ENV !== "production" && (
|
|
49
|
-
children:
|
|
50
|
-
className:
|
|
51
|
-
enterAnimationName:
|
|
52
|
-
enterClassName:
|
|
53
|
-
exitAnimationName:
|
|
54
|
-
exitClassName:
|
|
47
|
+
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
48
|
+
children: d.node,
|
|
49
|
+
className: d.string,
|
|
50
|
+
enterAnimationName: d.string,
|
|
51
|
+
enterClassName: d.string,
|
|
52
|
+
exitAnimationName: d.string,
|
|
53
|
+
exitClassName: d.string
|
|
55
54
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
top: "bottom"
|
|
61
|
-
}, ft = {
|
|
62
|
-
start: "end",
|
|
63
|
-
end: "start"
|
|
64
|
-
};
|
|
65
|
-
function Z(t, e) {
|
|
66
|
-
return typeof t == "function" ? t(e) : t;
|
|
55
|
+
function j(t, e) {
|
|
56
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...o) {
|
|
57
|
+
return t(...o) || e(...o);
|
|
58
|
+
};
|
|
67
59
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
60
|
+
function w() {
|
|
61
|
+
return w = Object.assign ? Object.assign.bind() : function(t) {
|
|
62
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
63
|
+
var i = arguments[e];
|
|
64
|
+
for (var o in i) ({}).hasOwnProperty.call(i, o) && (t[o] = i[o]);
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
}, w.apply(null, arguments);
|
|
70
68
|
}
|
|
71
69
|
function H(t) {
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return
|
|
70
|
+
const {
|
|
71
|
+
prototype: e = {}
|
|
72
|
+
} = t;
|
|
73
|
+
return !!e.isReactComponent;
|
|
76
74
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
75
|
+
function q(t, e, i, o, f) {
|
|
76
|
+
const s = t[e], g = f || e;
|
|
77
|
+
if (s == null || // When server-side rendering React doesn't warn either.
|
|
78
|
+
// This is not an accurate check for SSR.
|
|
79
|
+
// This is only in place for Emotion compat.
|
|
80
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
81
|
+
typeof window > "u")
|
|
82
|
+
return null;
|
|
83
|
+
let a;
|
|
84
|
+
const c = s.type;
|
|
85
|
+
return typeof c == "function" && !H(c) && (a = "Did you accidentally use a plain function component for an element instead?"), a !== void 0 ? new Error(`Invalid ${o} \`${g}\` supplied to \`${i}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
79
86
|
}
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
const V = j(d.element, q);
|
|
88
|
+
V.isRequired = j(d.element.isRequired, q);
|
|
89
|
+
const tt = "exact-prop: ";
|
|
90
|
+
function et(t) {
|
|
91
|
+
return process.env.NODE_ENV === "production" ? t : w({}, t, {
|
|
92
|
+
[tt]: (e) => {
|
|
93
|
+
const i = Object.keys(e).filter((o) => !t.hasOwnProperty(o));
|
|
94
|
+
return i.length > 0 ? new Error(`The following props are not supported: ${i.map((o) => `\`${o}\``).join(", ")}. Please remove them.`) : null;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
83
97
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
98
|
+
function k(t) {
|
|
99
|
+
return t && t.ownerDocument || document;
|
|
86
100
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
const a = H(t), n = dt(t), o = ht(n);
|
|
90
|
-
let c = n === "x" ? a === (i ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
|
|
91
|
-
return e.reference[o] > e.floating[o] && (c = $(c)), [c, $(c)];
|
|
101
|
+
function nt(t, e) {
|
|
102
|
+
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
92
103
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
const ot = typeof window < "u" ? r.useLayoutEffect : r.useEffect;
|
|
105
|
+
function it(t) {
|
|
106
|
+
const e = r.useRef(t);
|
|
107
|
+
return ot(() => {
|
|
108
|
+
e.current = t;
|
|
109
|
+
}), r.useRef((...i) => (
|
|
110
|
+
// @ts-expect-error hide `this`
|
|
111
|
+
(0, e.current)(...i)
|
|
112
|
+
)).current;
|
|
96
113
|
}
|
|
97
|
-
function
|
|
98
|
-
return
|
|
114
|
+
function rt(...t) {
|
|
115
|
+
return r.useMemo(() => t.every((e) => e == null) ? null : (e) => {
|
|
116
|
+
t.forEach((i) => {
|
|
117
|
+
nt(i, e);
|
|
118
|
+
});
|
|
119
|
+
}, t);
|
|
99
120
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
case "bottom":
|
|
105
|
-
return i ? e ? Q : K : e ? K : Q;
|
|
106
|
-
case "left":
|
|
107
|
-
case "right":
|
|
108
|
-
return e ? bt : vt;
|
|
109
|
-
default:
|
|
110
|
-
return [];
|
|
121
|
+
function at(t) {
|
|
122
|
+
if (parseInt(r.version, 10) >= 19) {
|
|
123
|
+
var e;
|
|
124
|
+
return (t == null || (e = t.props) == null ? void 0 : e.ref) || null;
|
|
111
125
|
}
|
|
126
|
+
return (t == null ? void 0 : t.ref) || null;
|
|
112
127
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
let o = wt(B(t), i === "start", a);
|
|
116
|
-
return n && (o = o.map((c) => c + "-" + n), e && (o = o.concat(o.map(z)))), o;
|
|
117
|
-
}
|
|
118
|
-
function $(t) {
|
|
119
|
-
return t.replace(/left|right|bottom|top/g, (e) => mt[e]);
|
|
120
|
-
}
|
|
121
|
-
function Pt(t) {
|
|
122
|
-
return {
|
|
123
|
-
top: 0,
|
|
124
|
-
right: 0,
|
|
125
|
-
bottom: 0,
|
|
126
|
-
left: 0,
|
|
127
|
-
...t
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function Nt(t) {
|
|
131
|
-
return typeof t != "number" ? Pt(t) : {
|
|
132
|
-
top: t,
|
|
133
|
-
right: t,
|
|
134
|
-
bottom: t,
|
|
135
|
-
left: t
|
|
136
|
-
};
|
|
128
|
+
function M(t) {
|
|
129
|
+
return t.substring(2).toLowerCase();
|
|
137
130
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
-
x: e,
|
|
141
|
-
y: i,
|
|
142
|
-
width: a,
|
|
143
|
-
height: n
|
|
144
|
-
} = t;
|
|
145
|
-
return {
|
|
146
|
-
width: a,
|
|
147
|
-
height: n,
|
|
148
|
-
top: i,
|
|
149
|
-
left: e,
|
|
150
|
-
right: e + a,
|
|
151
|
-
bottom: i + n,
|
|
152
|
-
x: e,
|
|
153
|
-
y: i
|
|
154
|
-
};
|
|
131
|
+
function st(t, e) {
|
|
132
|
+
return e.documentElement.clientWidth < t.clientX || e.documentElement.clientHeight < t.clientY;
|
|
155
133
|
}
|
|
156
|
-
|
|
157
|
-
var i;
|
|
158
|
-
e === void 0 && (e = {});
|
|
134
|
+
function x(t) {
|
|
159
135
|
const {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
width: c.floating.width,
|
|
181
|
-
height: c.floating.height
|
|
182
|
-
} : c.reference, P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l.floating)), d = await (o.isElement == null ? void 0 : o.isElement(P)) ? await (o.getScale == null ? void 0 : o.getScale(P)) || {
|
|
183
|
-
x: 1,
|
|
184
|
-
y: 1
|
|
185
|
-
} : {
|
|
186
|
-
x: 1,
|
|
187
|
-
y: 1
|
|
188
|
-
}, v = U(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
189
|
-
elements: l,
|
|
190
|
-
rect: g,
|
|
191
|
-
offsetParent: P,
|
|
192
|
-
strategy: p
|
|
193
|
-
}) : g);
|
|
194
|
-
return {
|
|
195
|
-
top: (b.top - v.top + r.top) / d.y,
|
|
196
|
-
bottom: (v.bottom - b.bottom + r.bottom) / d.y,
|
|
197
|
-
left: (b.left - v.left + r.left) / d.x,
|
|
198
|
-
right: (v.right - b.right + r.right) / d.x
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
const Ct = function(t) {
|
|
202
|
-
return t === void 0 && (t = {}), {
|
|
203
|
-
name: "flip",
|
|
204
|
-
options: t,
|
|
205
|
-
async fn(e) {
|
|
206
|
-
var i, a;
|
|
207
|
-
const {
|
|
208
|
-
placement: n,
|
|
209
|
-
middlewareData: o,
|
|
210
|
-
rects: c,
|
|
211
|
-
initialPlacement: l,
|
|
212
|
-
platform: p,
|
|
213
|
-
elements: h
|
|
214
|
-
} = e, {
|
|
215
|
-
mainAxis: s = !0,
|
|
216
|
-
crossAxis: u = !0,
|
|
217
|
-
fallbackPlacements: x,
|
|
218
|
-
fallbackStrategy: S = "bestFit",
|
|
219
|
-
fallbackAxisSideDirection: r = "none",
|
|
220
|
-
flipAlignment: R = !0,
|
|
221
|
-
...m
|
|
222
|
-
} = Z(t, e);
|
|
223
|
-
if ((i = o.arrow) != null && i.alignmentOffset)
|
|
224
|
-
return {};
|
|
225
|
-
const b = B(n), g = D(l), P = B(l) === l, d = await (p.isRTL == null ? void 0 : p.isRTL(h.floating)), v = x || (P || !R ? [$(l)] : xt(l)), T = r !== "none";
|
|
226
|
-
!x && T && v.push(...At(l, R, r, d));
|
|
227
|
-
const L = [l, ...v], M = await kt(e, m), E = [];
|
|
228
|
-
let w = ((a = o.flip) == null ? void 0 : a.overflows) || [];
|
|
229
|
-
if (s && E.push(M[b]), u) {
|
|
230
|
-
const k = yt(n, c, d);
|
|
231
|
-
E.push(M[k[0]], M[k[1]]);
|
|
232
|
-
}
|
|
233
|
-
if (w = [...w, {
|
|
234
|
-
placement: n,
|
|
235
|
-
overflows: E
|
|
236
|
-
}], !E.every((k) => k <= 0)) {
|
|
237
|
-
var V, N;
|
|
238
|
-
const k = (((V = o.flip) == null ? void 0 : V.index) || 0) + 1, q = L[k];
|
|
239
|
-
if (q && (!(u === "alignment" ? g !== D(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
240
|
-
// overflows the main axis.
|
|
241
|
-
w.every((f) => f.overflows[0] > 0 && D(f.placement) === g)))
|
|
242
|
-
return {
|
|
243
|
-
data: {
|
|
244
|
-
index: k,
|
|
245
|
-
overflows: w
|
|
246
|
-
},
|
|
247
|
-
reset: {
|
|
248
|
-
placement: q
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
let j = (N = w.filter((C) => C.overflows[0] <= 0).sort((C, f) => C.overflows[1] - f.overflows[1])[0]) == null ? void 0 : N.placement;
|
|
252
|
-
if (!j)
|
|
253
|
-
switch (S) {
|
|
254
|
-
case "bestFit": {
|
|
255
|
-
var W;
|
|
256
|
-
const C = (W = w.filter((f) => {
|
|
257
|
-
if (T) {
|
|
258
|
-
const A = D(f.placement);
|
|
259
|
-
return A === g || // Create a bias to the `y` side axis due to horizontal
|
|
260
|
-
// reading directions favoring greater width.
|
|
261
|
-
A === "y";
|
|
262
|
-
}
|
|
263
|
-
return !0;
|
|
264
|
-
}).map((f) => [f.placement, f.overflows.filter((A) => A > 0).reduce((A, tt) => A + tt, 0)]).sort((f, A) => f[1] - A[1])[0]) == null ? void 0 : W[0];
|
|
265
|
-
C && (j = C);
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
case "initialPlacement":
|
|
269
|
-
j = l;
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
if (n !== j)
|
|
273
|
-
return {
|
|
274
|
-
reset: {
|
|
275
|
-
placement: j
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
return {};
|
|
136
|
+
children: e,
|
|
137
|
+
disableReactTree: i = !1,
|
|
138
|
+
mouseEvent: o = "onClick",
|
|
139
|
+
onClickAway: f,
|
|
140
|
+
touchEvent: s = "onTouchEnd"
|
|
141
|
+
} = t, g = r.useRef(!1), a = r.useRef(null), c = r.useRef(!1), y = r.useRef(!1);
|
|
142
|
+
r.useEffect(() => (setTimeout(() => {
|
|
143
|
+
c.current = !0;
|
|
144
|
+
}, 0), () => {
|
|
145
|
+
c.current = !1;
|
|
146
|
+
}), []);
|
|
147
|
+
const u = rt(at(e), a), _ = it((n) => {
|
|
148
|
+
const p = y.current;
|
|
149
|
+
y.current = !1;
|
|
150
|
+
const l = k(a.current);
|
|
151
|
+
if (!c.current || !a.current || "clientX" in n && st(n, l))
|
|
152
|
+
return;
|
|
153
|
+
if (g.current) {
|
|
154
|
+
g.current = !1;
|
|
155
|
+
return;
|
|
280
156
|
}
|
|
157
|
+
let v;
|
|
158
|
+
n.composedPath ? v = n.composedPath().indexOf(a.current) > -1 : v = !l.documentElement.contains(
|
|
159
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
160
|
+
n.target
|
|
161
|
+
) || a.current.contains(
|
|
162
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
163
|
+
n.target
|
|
164
|
+
), !v && (i || !p) && f(n);
|
|
165
|
+
}), E = (n) => (p) => {
|
|
166
|
+
y.current = !0;
|
|
167
|
+
const l = e.props[n];
|
|
168
|
+
l && l(p);
|
|
169
|
+
}, b = {
|
|
170
|
+
ref: u
|
|
281
171
|
};
|
|
282
|
-
|
|
172
|
+
return s !== !1 && (b[s] = E(s)), r.useEffect(() => {
|
|
173
|
+
if (s !== !1) {
|
|
174
|
+
const n = M(s), p = k(a.current), l = () => {
|
|
175
|
+
g.current = !0;
|
|
176
|
+
};
|
|
177
|
+
return p.addEventListener(n, _), p.addEventListener("touchmove", l), () => {
|
|
178
|
+
p.removeEventListener(n, _), p.removeEventListener("touchmove", l);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}, [_, s]), o !== !1 && (b[o] = E(o)), r.useEffect(() => {
|
|
182
|
+
if (o !== !1) {
|
|
183
|
+
const n = M(o), p = k(a.current);
|
|
184
|
+
return p.addEventListener(n, _), () => {
|
|
185
|
+
p.removeEventListener(n, _);
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}, [_, o]), /* @__PURE__ */ h(r.Fragment, {
|
|
189
|
+
children: /* @__PURE__ */ r.cloneElement(e, b)
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
193
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
194
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
195
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
196
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
197
|
+
/**
|
|
198
|
+
* The wrapped element.
|
|
199
|
+
*/
|
|
200
|
+
children: V.isRequired,
|
|
201
|
+
/**
|
|
202
|
+
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
203
|
+
* This prop changes how portaled elements are handled.
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
disableReactTree: d.bool,
|
|
207
|
+
/**
|
|
208
|
+
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
209
|
+
* @default 'onClick'
|
|
210
|
+
*/
|
|
211
|
+
mouseEvent: d.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
212
|
+
/**
|
|
213
|
+
* Callback fired when a "click away" event is detected.
|
|
214
|
+
*/
|
|
215
|
+
onClickAway: d.func.isRequired,
|
|
216
|
+
/**
|
|
217
|
+
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
218
|
+
* @default 'onTouchEnd'
|
|
219
|
+
*/
|
|
220
|
+
touchEvent: d.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
221
|
+
});
|
|
222
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = et(x.propTypes));
|
|
223
|
+
const ut = "_tooltip_1ui81_79", lt = "_tooltip__container_1ui81_128", ct = "_tooltip__title_1ui81_134", pt = "_tooltip__content_1ui81_141", ft = "_tooltip__footer_1ui81_148", m = {
|
|
283
224
|
"u-typography-h1": "_u-typography-h1_1ui81_1",
|
|
284
225
|
"u-typography-h2": "_u-typography-h2_1ui81_8",
|
|
285
226
|
"u-typography-h3": "_u-typography-h3_1ui81_15",
|
|
@@ -295,15 +236,15 @@ const Ct = function(t) {
|
|
|
295
236
|
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1ui81_68",
|
|
296
237
|
"u-typography-base--underlined": "_u-typography-base--underlined_1ui81_71",
|
|
297
238
|
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1ui81_74",
|
|
298
|
-
tooltip:
|
|
239
|
+
tooltip: ut,
|
|
299
240
|
"tooltip--bottom": "_tooltip--bottom_1ui81_99",
|
|
300
241
|
"tooltip--top": "_tooltip--top_1ui81_106",
|
|
301
242
|
"tooltip--right": "_tooltip--right_1ui81_113",
|
|
302
243
|
"tooltip--left": "_tooltip--left_1ui81_120",
|
|
303
|
-
tooltip__container:
|
|
304
|
-
tooltip__title:
|
|
305
|
-
tooltip__content:
|
|
306
|
-
tooltip__footer:
|
|
244
|
+
tooltip__container: lt,
|
|
245
|
+
tooltip__title: ct,
|
|
246
|
+
tooltip__content: pt,
|
|
247
|
+
tooltip__footer: ft,
|
|
307
248
|
"tooltip__footer-button": "_tooltip__footer-button_1ui81_152",
|
|
308
249
|
"tooltip__footer-link": "_tooltip__footer-link_1ui81_172",
|
|
309
250
|
"tooltip--animation": "_tooltip--animation_1ui81_183",
|
|
@@ -311,99 +252,99 @@ const Ct = function(t) {
|
|
|
311
252
|
"tooltip--open-animation": "_tooltip--open-animation_1ui81_1",
|
|
312
253
|
"tooltip--anim-close": "_tooltip--anim-close_1ui81_186",
|
|
313
254
|
"tooltip--close-animation": "_tooltip--close-animation_1ui81_1"
|
|
314
|
-
},
|
|
255
|
+
}, gt = ({
|
|
315
256
|
arialRole: t,
|
|
316
257
|
children: e,
|
|
317
258
|
className: i,
|
|
318
|
-
style:
|
|
319
|
-
disableHoverListener:
|
|
320
|
-
onClose:
|
|
321
|
-
position:
|
|
322
|
-
open:
|
|
323
|
-
title:
|
|
324
|
-
content:
|
|
325
|
-
footer:
|
|
326
|
-
onTargetCreated:
|
|
327
|
-
popperZIndex:
|
|
328
|
-
...
|
|
259
|
+
style: o,
|
|
260
|
+
disableHoverListener: f,
|
|
261
|
+
onClose: s,
|
|
262
|
+
position: g = "bottom",
|
|
263
|
+
open: a,
|
|
264
|
+
title: c,
|
|
265
|
+
content: y,
|
|
266
|
+
footer: u,
|
|
267
|
+
onTargetCreated: _,
|
|
268
|
+
popperZIndex: E = 9999,
|
|
269
|
+
...b
|
|
329
270
|
}) => {
|
|
330
|
-
const
|
|
331
|
-
let
|
|
332
|
-
const [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}, [
|
|
336
|
-
const
|
|
337
|
-
!
|
|
338
|
-
const
|
|
339
|
-
|
|
271
|
+
const n = W(null), [p, l] = O(a || !1);
|
|
272
|
+
let v = p;
|
|
273
|
+
const [R, $] = O(g);
|
|
274
|
+
D(() => {
|
|
275
|
+
l(a || !1);
|
|
276
|
+
}, [a]);
|
|
277
|
+
const C = Y(e) ? e : /* @__PURE__ */ h("span", { children: e });
|
|
278
|
+
!y && y !== 0 && (v = !1);
|
|
279
|
+
const F = () => {
|
|
280
|
+
s == null || s(), !f && l(!1);
|
|
340
281
|
};
|
|
341
|
-
|
|
342
|
-
if (
|
|
343
|
-
const N =
|
|
344
|
-
|
|
282
|
+
D(() => {
|
|
283
|
+
if (n != null && n.current) {
|
|
284
|
+
const N = n == null ? void 0 : n.current;
|
|
285
|
+
_ == null || _(N);
|
|
345
286
|
}
|
|
346
|
-
}, [
|
|
287
|
+
}, [n, f]);
|
|
347
288
|
const T = () => {
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
},
|
|
352
|
-
padding:
|
|
353
|
-
zIndex:
|
|
354
|
-
},
|
|
355
|
-
...
|
|
356
|
-
ref:
|
|
357
|
-
onPointerEnter:
|
|
358
|
-
onPointerLeave:
|
|
359
|
-
},
|
|
289
|
+
f || l(!0);
|
|
290
|
+
}, A = () => {
|
|
291
|
+
f || l(!1);
|
|
292
|
+
}, I = {
|
|
293
|
+
padding: R.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
|
|
294
|
+
zIndex: E
|
|
295
|
+
}, U = L(m.tooltip, m[`tooltip--${R}`], i), X = {
|
|
296
|
+
...C.props,
|
|
297
|
+
ref: n,
|
|
298
|
+
onPointerEnter: f ? void 0 : () => l(!0),
|
|
299
|
+
onPointerLeave: f ? void 0 : () => l(!1)
|
|
300
|
+
}, z = () => ({
|
|
360
301
|
name: "currentPlacement",
|
|
361
|
-
fn: (N) => (
|
|
302
|
+
fn: (N) => ($(N.placement), N)
|
|
362
303
|
});
|
|
363
|
-
return /* @__PURE__ */
|
|
364
|
-
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
|
|
304
|
+
return /* @__PURE__ */ P(B, { children: [
|
|
305
|
+
G(C, X),
|
|
306
|
+
/* @__PURE__ */ h(
|
|
307
|
+
K,
|
|
367
308
|
{
|
|
368
309
|
disablePortal: !0,
|
|
369
|
-
...
|
|
370
|
-
open:
|
|
371
|
-
anchor:
|
|
372
|
-
style:
|
|
310
|
+
...b,
|
|
311
|
+
open: v,
|
|
312
|
+
anchor: n == null ? void 0 : n.current,
|
|
313
|
+
style: I,
|
|
373
314
|
role: t,
|
|
374
|
-
placement:
|
|
315
|
+
placement: R,
|
|
375
316
|
onPointerEnter: T,
|
|
376
|
-
onPointerLeave:
|
|
317
|
+
onPointerLeave: A,
|
|
377
318
|
"data-testid": "popup",
|
|
378
|
-
middleware: [
|
|
379
|
-
children: /* @__PURE__ */
|
|
380
|
-
|
|
319
|
+
middleware: [Q(), z()],
|
|
320
|
+
children: /* @__PURE__ */ h(
|
|
321
|
+
S,
|
|
381
322
|
{
|
|
382
|
-
className:
|
|
383
|
-
enterClassName:
|
|
384
|
-
exitClassName:
|
|
323
|
+
className: m["tooltip--animation"],
|
|
324
|
+
enterClassName: m["tooltip--anim-open"],
|
|
325
|
+
exitClassName: m["tooltip--anim-close"],
|
|
385
326
|
enterAnimationName: "tooltip--open-animation",
|
|
386
327
|
exitAnimationName: "tooltip--close-animation",
|
|
387
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ h(
|
|
388
329
|
"div",
|
|
389
330
|
{
|
|
390
|
-
className:
|
|
391
|
-
style:
|
|
331
|
+
className: U,
|
|
332
|
+
style: o,
|
|
392
333
|
onPointerEnter: T,
|
|
393
|
-
onPointerLeave:
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
334
|
+
onPointerLeave: A,
|
|
335
|
+
children: /* @__PURE__ */ h(x, { onClickAway: F, children: /* @__PURE__ */ P("div", { className: m.tooltip__container, children: [
|
|
336
|
+
c && /* @__PURE__ */ h("div", { className: m.tooltip__title, children: c }),
|
|
337
|
+
/* @__PURE__ */ h("div", { className: m.tooltip__content, children: y }),
|
|
338
|
+
u && /* @__PURE__ */ P("div", { className: m.tooltip__footer, children: [
|
|
339
|
+
u.type === "button" && u.onClick && /* @__PURE__ */ h("button", { onClick: u.onClick, className: m["tooltip__footer-button"], children: u.label }),
|
|
340
|
+
u.type === "link" && u.href && /* @__PURE__ */ h(
|
|
400
341
|
"a",
|
|
401
342
|
{
|
|
402
|
-
href:
|
|
403
|
-
className:
|
|
343
|
+
href: u.href,
|
|
344
|
+
className: m["tooltip__footer-link"],
|
|
404
345
|
target: "_blank",
|
|
405
346
|
rel: "noopener noreferrer",
|
|
406
|
-
children:
|
|
347
|
+
children: u.label
|
|
407
348
|
}
|
|
408
349
|
)
|
|
409
350
|
] })
|
|
@@ -417,5 +358,5 @@ const Ct = function(t) {
|
|
|
417
358
|
] });
|
|
418
359
|
};
|
|
419
360
|
export {
|
|
420
|
-
|
|
361
|
+
gt as Tooltip
|
|
421
362
|
};
|