@pismo/marola 2.1.23 → 2.1.25
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/DatePicker.module-CnuDEiKF.js +44 -0
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/DoubleInput.css +1 -0
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Tooltip.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +17 -7
- package/dist/components/DatePicker/DatePicker.js +864 -855
- package/dist/components/DatePicker/DatePicker.stories.d.ts +17 -10
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderDualCalendarHeader.js +1 -1
- package/dist/components/DatePicker/renderHeader.js +1 -1
- package/dist/components/DatePicker/renderNavigatorInput.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/DoubleInput/DoubleInput.d.ts +21 -0
- package/dist/components/DoubleInput/DoubleInput.js +25 -0
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +21 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.js +274 -273
- package/dist/components/InputSearch/InputSearch.d.ts +1 -0
- package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +27 -27
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +230 -220
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +137 -134
- package/dist/utils/inputNumberAsText.d.ts +1 -1
- package/dist/utils/inputNumberAsText.js +13 -9
- package/package.json +1 -1
- package/dist/DatePicker.module-C9zgeg52.js +0 -46
- /package/dist/components/Typography/{typography.test.d.ts → Typography.test.d.ts} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as y, jsxs as q, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import * as F from "react";
|
|
3
3
|
import { useRef as ot, useState as G, useEffect as J, isValidElement as nt, cloneElement as it } from "react";
|
|
4
|
-
import { T as
|
|
4
|
+
import { T as at, P as rt } from "../../Popup-Dffqo7wT.js";
|
|
5
5
|
import { c as X } from "../../clsx-OuTLNxxd.js";
|
|
6
|
-
import { b as lt, _ as st, P as
|
|
6
|
+
import { b as lt, _ as st, P as R } from "../../useSlotProps-CYHDC4TN.js";
|
|
7
7
|
import { C as ct } from "../../ClickAwayListener-Z08peX_P.js";
|
|
8
8
|
import '../../assets/Tooltip.css';function pt() {
|
|
9
|
-
const t =
|
|
9
|
+
const t = F.useContext(at);
|
|
10
10
|
if (!t)
|
|
11
11
|
throw new Error("Missing transition context");
|
|
12
12
|
const {
|
|
13
13
|
registerTransition: e,
|
|
14
14
|
requestedEnter: i,
|
|
15
|
-
onExited:
|
|
15
|
+
onExited: a
|
|
16
16
|
} = t;
|
|
17
|
-
return
|
|
18
|
-
onExited:
|
|
17
|
+
return F.useEffect(() => e(), [e]), {
|
|
18
|
+
onExited: a,
|
|
19
19
|
requestedEnter: i
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -24,34 +24,34 @@ function Y(t) {
|
|
|
24
24
|
const {
|
|
25
25
|
children: e,
|
|
26
26
|
className: i,
|
|
27
|
-
enterAnimationName:
|
|
28
|
-
enterClassName:
|
|
27
|
+
enterAnimationName: a,
|
|
28
|
+
enterClassName: n,
|
|
29
29
|
exitAnimationName: o,
|
|
30
|
-
exitClassName:
|
|
31
|
-
} = t,
|
|
32
|
-
requestedEnter:
|
|
33
|
-
onExited:
|
|
34
|
-
} = pt(),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
onAnimationEnd:
|
|
43
|
-
className: X(i,
|
|
44
|
-
},
|
|
30
|
+
exitClassName: s
|
|
31
|
+
} = t, r = lt(t, ft), {
|
|
32
|
+
requestedEnter: p,
|
|
33
|
+
onExited: h
|
|
34
|
+
} = pt(), l = F.useRef(!0);
|
|
35
|
+
F.useEffect(() => {
|
|
36
|
+
p && l.current && (l.current = !1);
|
|
37
|
+
}, [p]);
|
|
38
|
+
const f = F.useCallback((x) => {
|
|
39
|
+
x.animationName === o ? (h(), l.current = !0) : x.animationName === a && (l.current = !1);
|
|
40
|
+
}, [h, o, a]);
|
|
41
|
+
return /* @__PURE__ */ y("div", st({
|
|
42
|
+
onAnimationEnd: f,
|
|
43
|
+
className: X(i, p ? n : s)
|
|
44
|
+
}, r, {
|
|
45
45
|
children: e
|
|
46
46
|
}));
|
|
47
47
|
}
|
|
48
48
|
process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
49
|
-
children:
|
|
50
|
-
className:
|
|
51
|
-
enterAnimationName:
|
|
52
|
-
enterClassName:
|
|
53
|
-
exitAnimationName:
|
|
54
|
-
exitClassName:
|
|
49
|
+
children: R.node,
|
|
50
|
+
className: R.string,
|
|
51
|
+
enterAnimationName: R.string,
|
|
52
|
+
enterClassName: R.string,
|
|
53
|
+
exitAnimationName: R.string,
|
|
54
|
+
exitClassName: R.string
|
|
55
55
|
});
|
|
56
56
|
const mt = {
|
|
57
57
|
left: "right",
|
|
@@ -65,36 +65,36 @@ const mt = {
|
|
|
65
65
|
function Z(t, e) {
|
|
66
66
|
return typeof t == "function" ? t(e) : t;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function L(t) {
|
|
69
69
|
return t.split("-")[0];
|
|
70
70
|
}
|
|
71
71
|
function H(t) {
|
|
72
72
|
return t.split("-")[1];
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function ht(t) {
|
|
75
75
|
return t === "x" ? "y" : "x";
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function _t(t) {
|
|
78
78
|
return t === "y" ? "height" : "width";
|
|
79
79
|
}
|
|
80
80
|
const gt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
81
|
-
function
|
|
82
|
-
return gt.has(
|
|
81
|
+
function D(t) {
|
|
82
|
+
return gt.has(L(t)) ? "y" : "x";
|
|
83
83
|
}
|
|
84
84
|
function dt(t) {
|
|
85
|
-
return
|
|
85
|
+
return ht(D(t));
|
|
86
86
|
}
|
|
87
87
|
function yt(t, e, i) {
|
|
88
88
|
i === void 0 && (i = !1);
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
return e.reference[o] > e.floating[o] && (
|
|
89
|
+
const a = H(t), n = dt(t), o = _t(n);
|
|
90
|
+
let s = n === "x" ? a === (i ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
|
|
91
|
+
return e.reference[o] > e.floating[o] && (s = V(s)), [s, V(s)];
|
|
92
92
|
}
|
|
93
93
|
function xt(t) {
|
|
94
|
-
const e =
|
|
95
|
-
return [
|
|
94
|
+
const e = V(t);
|
|
95
|
+
return [I(t), e, I(e)];
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function I(t) {
|
|
98
98
|
return t.replace(/start|end/g, (e) => ut[e]);
|
|
99
99
|
}
|
|
100
100
|
const K = ["left", "right"], Q = ["right", "left"], bt = ["top", "bottom"], vt = ["bottom", "top"];
|
|
@@ -110,12 +110,12 @@ function wt(t, e, i) {
|
|
|
110
110
|
return [];
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function At(t, e, i,
|
|
114
|
-
const
|
|
115
|
-
let o = wt(
|
|
116
|
-
return
|
|
113
|
+
function At(t, e, i, a) {
|
|
114
|
+
const n = H(t);
|
|
115
|
+
let o = wt(L(t), i === "start", a);
|
|
116
|
+
return n && (o = o.map((s) => s + "-" + n), e && (o = o.concat(o.map(I)))), o;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function V(t) {
|
|
119
119
|
return t.replace(/left|right|bottom|top/g, (e) => mt[e]);
|
|
120
120
|
}
|
|
121
121
|
function Pt(t) {
|
|
@@ -139,16 +139,16 @@ function U(t) {
|
|
|
139
139
|
const {
|
|
140
140
|
x: e,
|
|
141
141
|
y: i,
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
142
|
+
width: a,
|
|
143
|
+
height: n
|
|
144
144
|
} = t;
|
|
145
145
|
return {
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
146
|
+
width: a,
|
|
147
|
+
height: n,
|
|
148
148
|
top: i,
|
|
149
149
|
left: e,
|
|
150
|
-
right: e +
|
|
151
|
-
bottom: i +
|
|
150
|
+
right: e + a,
|
|
151
|
+
bottom: i + n,
|
|
152
152
|
x: e,
|
|
153
153
|
y: i
|
|
154
154
|
};
|
|
@@ -157,45 +157,45 @@ async function kt(t, e) {
|
|
|
157
157
|
var i;
|
|
158
158
|
e === void 0 && (e = {});
|
|
159
159
|
const {
|
|
160
|
-
x:
|
|
161
|
-
y:
|
|
160
|
+
x: a,
|
|
161
|
+
y: n,
|
|
162
162
|
platform: o,
|
|
163
|
-
rects:
|
|
164
|
-
elements:
|
|
165
|
-
strategy:
|
|
163
|
+
rects: s,
|
|
164
|
+
elements: r,
|
|
165
|
+
strategy: p
|
|
166
166
|
} = t, {
|
|
167
|
-
boundary:
|
|
168
|
-
rootBoundary:
|
|
169
|
-
elementContext:
|
|
170
|
-
altBoundary:
|
|
171
|
-
padding:
|
|
172
|
-
} = Z(e, t),
|
|
173
|
-
element: (i = await (o.isElement == null ? void 0 : o.isElement(
|
|
174
|
-
boundary:
|
|
175
|
-
rootBoundary:
|
|
176
|
-
strategy:
|
|
177
|
-
})),
|
|
178
|
-
x:
|
|
179
|
-
y:
|
|
180
|
-
width:
|
|
181
|
-
height:
|
|
182
|
-
} :
|
|
167
|
+
boundary: h = "clippingAncestors",
|
|
168
|
+
rootBoundary: l = "viewport",
|
|
169
|
+
elementContext: f = "floating",
|
|
170
|
+
altBoundary: x = !1,
|
|
171
|
+
padding: c = 0
|
|
172
|
+
} = Z(e, t), b = Nt(c), w = r[x ? f === "floating" ? "reference" : "floating" : f], g = U(await o.getClippingRect({
|
|
173
|
+
element: (i = await (o.isElement == null ? void 0 : o.isElement(w))) == null || i ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(r.floating)),
|
|
174
|
+
boundary: h,
|
|
175
|
+
rootBoundary: l,
|
|
176
|
+
strategy: p
|
|
177
|
+
})), A = f === "floating" ? {
|
|
178
|
+
x: a,
|
|
179
|
+
y: n,
|
|
180
|
+
width: s.floating.width,
|
|
181
|
+
height: s.floating.height
|
|
182
|
+
} : s.reference, P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(r.floating)), v = await (o.isElement == null ? void 0 : o.isElement(P)) ? await (o.getScale == null ? void 0 : o.getScale(P)) || {
|
|
183
183
|
x: 1,
|
|
184
184
|
y: 1
|
|
185
185
|
} : {
|
|
186
186
|
x: 1,
|
|
187
187
|
y: 1
|
|
188
|
-
},
|
|
189
|
-
elements:
|
|
190
|
-
rect:
|
|
188
|
+
}, d = U(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
189
|
+
elements: r,
|
|
190
|
+
rect: A,
|
|
191
191
|
offsetParent: P,
|
|
192
|
-
strategy:
|
|
193
|
-
}) :
|
|
192
|
+
strategy: p
|
|
193
|
+
}) : A);
|
|
194
194
|
return {
|
|
195
|
-
top: (
|
|
196
|
-
bottom: (
|
|
197
|
-
left: (
|
|
198
|
-
right: (
|
|
195
|
+
top: (g.top - d.top + b.top) / v.y,
|
|
196
|
+
bottom: (d.bottom - g.bottom + b.bottom) / v.y,
|
|
197
|
+
left: (g.left - d.left + b.left) / v.x,
|
|
198
|
+
right: (d.right - g.right + b.right) / v.x
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
const Ct = function(t) {
|
|
@@ -203,202 +203,212 @@ const Ct = function(t) {
|
|
|
203
203
|
name: "flip",
|
|
204
204
|
options: t,
|
|
205
205
|
async fn(e) {
|
|
206
|
-
var i,
|
|
206
|
+
var i, a;
|
|
207
207
|
const {
|
|
208
|
-
placement:
|
|
208
|
+
placement: n,
|
|
209
209
|
middlewareData: o,
|
|
210
|
-
rects:
|
|
211
|
-
initialPlacement:
|
|
212
|
-
platform:
|
|
213
|
-
elements:
|
|
210
|
+
rects: s,
|
|
211
|
+
initialPlacement: r,
|
|
212
|
+
platform: p,
|
|
213
|
+
elements: h
|
|
214
214
|
} = e, {
|
|
215
|
-
mainAxis:
|
|
216
|
-
crossAxis:
|
|
217
|
-
fallbackPlacements:
|
|
218
|
-
fallbackStrategy:
|
|
219
|
-
fallbackAxisSideDirection:
|
|
220
|
-
flipAlignment:
|
|
221
|
-
...
|
|
215
|
+
mainAxis: l = !0,
|
|
216
|
+
crossAxis: f = !0,
|
|
217
|
+
fallbackPlacements: x,
|
|
218
|
+
fallbackStrategy: c = "bestFit",
|
|
219
|
+
fallbackAxisSideDirection: b = "none",
|
|
220
|
+
flipAlignment: _ = !0,
|
|
221
|
+
...w
|
|
222
222
|
} = Z(t, e);
|
|
223
223
|
if ((i = o.arrow) != null && i.alignmentOffset)
|
|
224
224
|
return {};
|
|
225
|
-
const
|
|
226
|
-
!
|
|
227
|
-
const
|
|
228
|
-
let
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
|
|
225
|
+
const g = L(n), A = D(r), P = L(r) === r, v = await (p.isRTL == null ? void 0 : p.isRTL(h.floating)), d = x || (P || !_ ? [V(r)] : xt(r)), T = b !== "none";
|
|
226
|
+
!x && T && d.push(...At(r, _, b, v));
|
|
227
|
+
const B = [r, ...d], M = await kt(e, w), S = [];
|
|
228
|
+
let N = ((a = o.flip) == null ? void 0 : a.overflows) || [];
|
|
229
|
+
if (l && S.push(M[g]), f) {
|
|
230
|
+
const E = yt(n, s, v);
|
|
231
|
+
S.push(M[E[0]], M[E[1]]);
|
|
232
232
|
}
|
|
233
|
-
if (
|
|
234
|
-
placement:
|
|
235
|
-
overflows:
|
|
236
|
-
}], !
|
|
237
|
-
var
|
|
238
|
-
const
|
|
239
|
-
if (
|
|
233
|
+
if (N = [...N, {
|
|
234
|
+
placement: n,
|
|
235
|
+
overflows: S
|
|
236
|
+
}], !S.every((E) => E <= 0)) {
|
|
237
|
+
var C, z;
|
|
238
|
+
const E = (((C = o.flip) == null ? void 0 : C.index) || 0) + 1, $ = B[E];
|
|
239
|
+
if ($ && (!(f === "alignment" ? A !== D($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
240
240
|
// overflows the main axis.
|
|
241
|
-
|
|
241
|
+
N.every((m) => m.overflows[0] > 0 && D(m.placement) === A)))
|
|
242
242
|
return {
|
|
243
243
|
data: {
|
|
244
|
-
index:
|
|
245
|
-
overflows:
|
|
244
|
+
index: E,
|
|
245
|
+
overflows: N
|
|
246
246
|
},
|
|
247
247
|
reset: {
|
|
248
|
-
placement:
|
|
248
|
+
placement: $
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
let
|
|
252
|
-
if (!
|
|
253
|
-
switch (
|
|
251
|
+
let j = (z = N.filter((O) => O.overflows[0] <= 0).sort((O, m) => O.overflows[1] - m.overflows[1])[0]) == null ? void 0 : z.placement;
|
|
252
|
+
if (!j)
|
|
253
|
+
switch (c) {
|
|
254
254
|
case "bestFit": {
|
|
255
255
|
var W;
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
const
|
|
259
|
-
return
|
|
256
|
+
const O = (W = N.filter((m) => {
|
|
257
|
+
if (T) {
|
|
258
|
+
const k = D(m.placement);
|
|
259
|
+
return k === A || // Create a bias to the `y` side axis due to horizontal
|
|
260
260
|
// reading directions favoring greater width.
|
|
261
|
-
|
|
261
|
+
k === "y";
|
|
262
262
|
}
|
|
263
263
|
return !0;
|
|
264
|
-
}).map((
|
|
265
|
-
|
|
264
|
+
}).map((m) => [m.placement, m.overflows.filter((k) => k > 0).reduce((k, tt) => k + tt, 0)]).sort((m, k) => m[1] - k[1])[0]) == null ? void 0 : W[0];
|
|
265
|
+
O && (j = O);
|
|
266
266
|
break;
|
|
267
267
|
}
|
|
268
268
|
case "initialPlacement":
|
|
269
|
-
|
|
269
|
+
j = r;
|
|
270
270
|
break;
|
|
271
271
|
}
|
|
272
|
-
if (
|
|
272
|
+
if (n !== j)
|
|
273
273
|
return {
|
|
274
274
|
reset: {
|
|
275
|
-
placement:
|
|
275
|
+
placement: j
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
return {};
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
|
-
}, Et = Ct, Ot = "
|
|
283
|
-
"u-typography-h1": "_u-typography-
|
|
284
|
-
"u-typography-h2": "_u-typography-
|
|
285
|
-
"u-typography-h3": "_u-typography-
|
|
286
|
-
"u-typography-h4": "_u-typography-
|
|
287
|
-
"u-typography-h5": "_u-typography-
|
|
288
|
-
"u-typography-h6": "_u-typography-
|
|
289
|
-
"u-typography-base": "_u-typography-
|
|
290
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
291
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
292
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
293
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
294
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
295
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
296
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
297
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
282
|
+
}, Et = Ct, Ot = "_tooltip_1fhar_79", St = "_tooltip__container_1fhar_125", Rt = "_tooltip__title_1fhar_131", Tt = "_tooltip__content_1fhar_138", Mt = "_tooltip__footer_1fhar_145", u = {
|
|
283
|
+
"u-typography-h1": "_u-typography-h1_1fhar_1",
|
|
284
|
+
"u-typography-h2": "_u-typography-h2_1fhar_8",
|
|
285
|
+
"u-typography-h3": "_u-typography-h3_1fhar_15",
|
|
286
|
+
"u-typography-h4": "_u-typography-h4_1fhar_22",
|
|
287
|
+
"u-typography-h5": "_u-typography-h5_1fhar_29",
|
|
288
|
+
"u-typography-h6": "_u-typography-h6_1fhar_36",
|
|
289
|
+
"u-typography-base": "_u-typography-base_1fhar_43",
|
|
290
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1fhar_49",
|
|
291
|
+
"u-typography-base--xl": "_u-typography-base--xl_1fhar_53",
|
|
292
|
+
"u-typography-base--lg": "_u-typography-base--lg_1fhar_57",
|
|
293
|
+
"u-typography-base--sm": "_u-typography-base--sm_1fhar_61",
|
|
294
|
+
"u-typography-base--bold": "_u-typography-base--bold_1fhar_65",
|
|
295
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1fhar_68",
|
|
296
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1fhar_71",
|
|
297
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1fhar_74",
|
|
298
298
|
tooltip: Ot,
|
|
299
|
-
"tooltip--bottom": "_tooltip--
|
|
300
|
-
"tooltip--top": "_tooltip--
|
|
301
|
-
"tooltip--right": "_tooltip--
|
|
302
|
-
"tooltip--left": "_tooltip--
|
|
299
|
+
"tooltip--bottom": "_tooltip--bottom_1fhar_96",
|
|
300
|
+
"tooltip--top": "_tooltip--top_1fhar_103",
|
|
301
|
+
"tooltip--right": "_tooltip--right_1fhar_110",
|
|
302
|
+
"tooltip--left": "_tooltip--left_1fhar_117",
|
|
303
303
|
tooltip__container: St,
|
|
304
304
|
tooltip__title: Rt,
|
|
305
305
|
tooltip__content: Tt,
|
|
306
306
|
tooltip__footer: Mt,
|
|
307
|
-
"tooltip__footer-button": "_tooltip__footer-
|
|
308
|
-
"tooltip__footer-link": "_tooltip__footer-
|
|
309
|
-
"
|
|
310
|
-
"tooltip--anim-open": "_tooltip--anim-
|
|
311
|
-
"tooltip--open-animation": "_tooltip--open-
|
|
312
|
-
"tooltip--anim-close": "_tooltip--anim-
|
|
313
|
-
"tooltip--close-animation": "_tooltip--close-
|
|
307
|
+
"tooltip__footer-button": "_tooltip__footer-button_1fhar_149",
|
|
308
|
+
"tooltip__footer-link": "_tooltip__footer-link_1fhar_169",
|
|
309
|
+
"tooltip--animation": "_tooltip--animation_1fhar_180",
|
|
310
|
+
"tooltip--anim-open": "_tooltip--anim-open_1fhar_180",
|
|
311
|
+
"tooltip--open-animation": "_tooltip--open-animation_1fhar_1",
|
|
312
|
+
"tooltip--anim-close": "_tooltip--anim-close_1fhar_183",
|
|
313
|
+
"tooltip--close-animation": "_tooltip--close-animation_1fhar_1"
|
|
314
314
|
}, $t = ({
|
|
315
315
|
arialRole: t,
|
|
316
316
|
children: e,
|
|
317
317
|
className: i,
|
|
318
|
+
style: a,
|
|
318
319
|
disableHoverListener: n,
|
|
319
|
-
onClose:
|
|
320
|
-
position:
|
|
321
|
-
open:
|
|
322
|
-
title:
|
|
323
|
-
content:
|
|
324
|
-
footer:
|
|
325
|
-
onTargetCreated:
|
|
326
|
-
...
|
|
320
|
+
onClose: o,
|
|
321
|
+
position: s = "bottom",
|
|
322
|
+
open: r,
|
|
323
|
+
title: p,
|
|
324
|
+
content: h,
|
|
325
|
+
footer: l,
|
|
326
|
+
onTargetCreated: f,
|
|
327
|
+
...x
|
|
327
328
|
}) => {
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
const [
|
|
329
|
+
const c = ot(null), [b, _] = G(r || !1);
|
|
330
|
+
let w = b;
|
|
331
|
+
const [g, A] = G(s);
|
|
331
332
|
J(() => {
|
|
332
|
-
|
|
333
|
-
}, [
|
|
334
|
-
const
|
|
335
|
-
!
|
|
336
|
-
const
|
|
337
|
-
|
|
333
|
+
_(r || !1);
|
|
334
|
+
}, [r]);
|
|
335
|
+
const P = nt(e) ? e : /* @__PURE__ */ y("span", { children: e });
|
|
336
|
+
!h && h !== 0 && (w = !1);
|
|
337
|
+
const v = () => {
|
|
338
|
+
o == null || o(), !n && _(!1);
|
|
338
339
|
};
|
|
339
340
|
J(() => {
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
|
|
341
|
+
if (c != null && c.current) {
|
|
342
|
+
const C = c == null ? void 0 : c.current;
|
|
343
|
+
f == null || f(C);
|
|
343
344
|
}
|
|
344
|
-
}, [
|
|
345
|
+
}, [c, n]);
|
|
345
346
|
const d = () => {
|
|
346
|
-
n ||
|
|
347
|
-
},
|
|
348
|
-
n ||
|
|
349
|
-
},
|
|
350
|
-
padding:
|
|
347
|
+
n || _(!0);
|
|
348
|
+
}, T = () => {
|
|
349
|
+
n || _(!1);
|
|
350
|
+
}, B = {
|
|
351
|
+
padding: g.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
|
|
351
352
|
zIndex: 1
|
|
352
|
-
},
|
|
353
|
-
...
|
|
354
|
-
ref:
|
|
355
|
-
onPointerEnter: n ? void 0 : () =>
|
|
356
|
-
onPointerLeave: n ? void 0 : () =>
|
|
357
|
-
},
|
|
353
|
+
}, M = X(u.tooltip, u[`tooltip--${g}`], i), S = {
|
|
354
|
+
...P.props,
|
|
355
|
+
ref: c,
|
|
356
|
+
onPointerEnter: n ? void 0 : () => _(!0),
|
|
357
|
+
onPointerLeave: n ? void 0 : () => _(!1)
|
|
358
|
+
}, N = () => ({
|
|
358
359
|
name: "currentPlacement",
|
|
359
|
-
fn: (
|
|
360
|
+
fn: (C) => (A(C.placement), C)
|
|
360
361
|
});
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
it(
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
|
|
362
|
+
return /* @__PURE__ */ q(et, { children: [
|
|
363
|
+
it(P, S),
|
|
364
|
+
/* @__PURE__ */ y(
|
|
365
|
+
rt,
|
|
365
366
|
{
|
|
366
367
|
disablePortal: !0,
|
|
367
|
-
...
|
|
368
|
-
open:
|
|
369
|
-
anchor:
|
|
370
|
-
style:
|
|
368
|
+
...x,
|
|
369
|
+
open: w,
|
|
370
|
+
anchor: c == null ? void 0 : c.current,
|
|
371
|
+
style: B,
|
|
371
372
|
role: t,
|
|
372
|
-
placement:
|
|
373
|
+
placement: g,
|
|
373
374
|
onPointerEnter: d,
|
|
374
|
-
onPointerLeave:
|
|
375
|
+
onPointerLeave: T,
|
|
375
376
|
"data-testid": "popup",
|
|
376
|
-
middleware: [Et(),
|
|
377
|
-
children: /* @__PURE__ */
|
|
377
|
+
middleware: [Et(), N()],
|
|
378
|
+
children: /* @__PURE__ */ y(
|
|
378
379
|
Y,
|
|
379
380
|
{
|
|
380
|
-
className:
|
|
381
|
-
enterClassName:
|
|
382
|
-
exitClassName:
|
|
381
|
+
className: u["tooltip--animation"],
|
|
382
|
+
enterClassName: u["tooltip--anim-open"],
|
|
383
|
+
exitClassName: u["tooltip--anim-close"],
|
|
383
384
|
enterAnimationName: "tooltip--open-animation",
|
|
384
385
|
exitAnimationName: "tooltip--close-animation",
|
|
385
|
-
children: /* @__PURE__ */
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
386
|
+
children: /* @__PURE__ */ y(
|
|
387
|
+
"div",
|
|
388
|
+
{
|
|
389
|
+
className: M,
|
|
390
|
+
style: a,
|
|
391
|
+
onPointerEnter: d,
|
|
392
|
+
onPointerLeave: T,
|
|
393
|
+
children: /* @__PURE__ */ y(ct, { onClickAway: v, children: /* @__PURE__ */ q("div", { className: u.tooltip__container, children: [
|
|
394
|
+
p && /* @__PURE__ */ y("div", { className: u.tooltip__title, children: p }),
|
|
395
|
+
/* @__PURE__ */ y("div", { className: u.tooltip__content, children: h }),
|
|
396
|
+
l && /* @__PURE__ */ q("div", { className: u.tooltip__footer, children: [
|
|
397
|
+
l.type === "button" && l.onClick && /* @__PURE__ */ y("button", { onClick: l.onClick, className: u["tooltip__footer-button"], children: l.label }),
|
|
398
|
+
l.type === "link" && l.href && /* @__PURE__ */ y(
|
|
399
|
+
"a",
|
|
400
|
+
{
|
|
401
|
+
href: l.href,
|
|
402
|
+
className: u["tooltip__footer-link"],
|
|
403
|
+
target: "_blank",
|
|
404
|
+
rel: "noopener noreferrer",
|
|
405
|
+
children: l.label
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
] })
|
|
409
|
+
] }) })
|
|
410
|
+
}
|
|
411
|
+
)
|
|
402
412
|
}
|
|
403
413
|
)
|
|
404
414
|
}
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { TooltipProps } from './Tooltip';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, position, open: openProp, title, content, footer, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ arialRole, children: childrenProp, className, style, disableHoverListener, onClose, position, open: openProp, title, content, footer, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './components/ConfirmationDialog/ConfirmationDialog';
|
|
|
17
17
|
export * from './components/DatePicker/DatePicker';
|
|
18
18
|
export * from './components/Description/Description';
|
|
19
19
|
export * from './components/Dialog/Dialog';
|
|
20
|
+
export * from './components/DoubleInput/DoubleInput';
|
|
20
21
|
export * from './components/Draggable/Draggable';
|
|
21
22
|
export * from './components/EllipsisTooltip/EllipsisTooltip';
|
|
22
23
|
export * from './components/Fieldset/Fieldset';
|