@stenajs-webui/core 20.6.5 → 20.6.6
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/index.es.js +65 -66
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
package/dist/index.es.js
CHANGED
|
@@ -5,13 +5,12 @@ import { forwardRef as h, useState as g, useCallback as p, useLayoutEffect as H,
|
|
|
5
5
|
import y from "@emotion/styled";
|
|
6
6
|
import F from "@emotion/is-prop-valid";
|
|
7
7
|
import { system as N, background as P, border as V, borderRight as A, borderLeft as G, borderTop as j, borderBottom as U, borderColor as q, borderRadius as W, borderStyle as B, borderWidth as K, boxShadow as J, flexbox as Q, overflow as X, position as Y, layout as Z, zIndex as ee, left as te, right as ne, top as re, bottom as se } from "styled-system";
|
|
8
|
-
import oe from "lodash
|
|
8
|
+
import { pickBy as oe, debounce as ce } from "lodash-es";
|
|
9
9
|
import O from "classnames";
|
|
10
|
-
import * as
|
|
11
|
-
import ue from "lodash/debounce";
|
|
10
|
+
import * as ue from "react-dom";
|
|
12
11
|
const ie = "_separatorLine_nzfcz_1", ae = {
|
|
13
12
|
separatorLine: ie
|
|
14
|
-
},
|
|
13
|
+
}, Ze = h(
|
|
15
14
|
({
|
|
16
15
|
color: e = R("--lhds-color-ui-300"),
|
|
17
16
|
size: t = "100%",
|
|
@@ -54,7 +53,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
54
53
|
${({ width: e }) => e ? `width: ${e};` : ""}
|
|
55
54
|
${({ height: e }) => e ? `height: ${e};` : ""}
|
|
56
55
|
${({ borderRadius: e }) => e ? `border-radius: ${e};` : ""}
|
|
57
|
-
`,
|
|
56
|
+
`, et = h(
|
|
58
57
|
({
|
|
59
58
|
disableFocusHighlight: e,
|
|
60
59
|
onClick: t,
|
|
@@ -188,7 +187,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
188
187
|
${({ focusWithinBackground: e }) => e ? `background: ${e};` : ""}
|
|
189
188
|
${({ focusWithinBorder: e }) => e ? `border: ${e};` : ""}
|
|
190
189
|
}
|
|
191
|
-
`,
|
|
190
|
+
`, tt = h(function(t, n) {
|
|
192
191
|
return /* @__PURE__ */ i(b, { ref: n, ...t });
|
|
193
192
|
}), ge = (e) => {
|
|
194
193
|
const { x: t, y: n, width: r, height: s, bottom: o, top: c, left: a, right: u } = e.getBoundingClientRect();
|
|
@@ -216,16 +215,16 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
216
215
|
}, [s]), {
|
|
217
216
|
dimensions: n
|
|
218
217
|
};
|
|
219
|
-
},
|
|
218
|
+
}, nt = h(
|
|
220
219
|
function({ onResize: t, ...n }, r) {
|
|
221
220
|
const s = v(null);
|
|
222
221
|
return we(r ?? s, t), /* @__PURE__ */ i(b, { ...n, ref: r });
|
|
223
222
|
}
|
|
224
|
-
),
|
|
223
|
+
), rt = h(function(t, n) {
|
|
225
224
|
return /* @__PURE__ */ i(b, { row: !0, ref: n, ...t });
|
|
226
|
-
}),
|
|
225
|
+
}), st = h(function({ num: t = 1, ...n }, r) {
|
|
227
226
|
return /* @__PURE__ */ i(b, { indent: t, ref: r, ...n });
|
|
228
|
-
}),
|
|
227
|
+
}), ot = h(
|
|
229
228
|
function({ num: t = 1, ...n }, r) {
|
|
230
229
|
return /* @__PURE__ */ i(b, { spacing: t, ref: r, ...n });
|
|
231
230
|
}
|
|
@@ -234,7 +233,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
234
233
|
flex: none;
|
|
235
234
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
236
235
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
237
|
-
`,
|
|
236
|
+
`, ct = ({
|
|
238
237
|
half: e = !1,
|
|
239
238
|
horizontal: t = !1,
|
|
240
239
|
num: n = 1,
|
|
@@ -251,9 +250,9 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
251
250
|
}
|
|
252
251
|
}
|
|
253
252
|
);
|
|
254
|
-
},
|
|
253
|
+
}, ut = ({ children: e, nest: t, render: n }) => t ? /* @__PURE__ */ i(I, { children: n(e) }) : /* @__PURE__ */ i(I, { children: e }), _e = "_visuallyHidden_1gevf_1", $e = {
|
|
255
254
|
visuallyHidden: _e
|
|
256
|
-
}, xe = (e) => oe(e, ye), ye = (e, t) => Ee(t), Ee = (e) => e.startsWith("data-") || e.startsWith("aria-"),
|
|
255
|
+
}, xe = (e) => oe(e, ye), ye = (e, t) => Ee(t), Ee = (e) => e.startsWith("data-") || e.startsWith("aria-"), it = ({
|
|
257
256
|
children: e,
|
|
258
257
|
...t
|
|
259
258
|
}) => /* @__PURE__ */ i("span", { className: $e.visuallyHidden, ...xe(t), children: e }), Ie = "_text_1iisw_1", Se = "_standard_1iisw_24", Ce = "_bold_1iisw_27", Te = "_caption_1iisw_31", Me = "_overline_1iisw_39", Oe = "_large_1iisw_48", De = "_medium_1iisw_53", Le = "_small_1iisw_58", ke = "_smaller_1iisw_63", x = {
|
|
@@ -296,7 +295,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
296
295
|
children: e
|
|
297
296
|
}
|
|
298
297
|
)
|
|
299
|
-
),
|
|
298
|
+
), at = _, dt = (e) => /* @__PURE__ */ i(_, { size: "small", ...e }), lt = (e) => /* @__PURE__ */ i(_, { size: "smaller", ...e }), mt = (e) => /* @__PURE__ */ i(_, { size: "medium", ...e }), pt = (e) => /* @__PURE__ */ i(_, { size: "large", ...e }), Re = "_heading_1cnsg_1", He = "_h1_1cnsg_10", ze = "_h2_1cnsg_14", Fe = "_h3_1cnsg_18", Ne = "_h4_1cnsg_22", Pe = "_h5_1cnsg_26", Ve = "_h6_1cnsg_30", C = {
|
|
300
299
|
heading: Re,
|
|
301
300
|
h1: He,
|
|
302
301
|
h2: ze,
|
|
@@ -325,7 +324,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
325
324
|
children: c
|
|
326
325
|
}
|
|
327
326
|
)
|
|
328
|
-
),
|
|
327
|
+
), ht = (e) => /* @__PURE__ */ i(Ae, { variant: "h2", ...e }), Ge = (e, t) => e === t, ft = (e, t, n = Ge) => {
|
|
329
328
|
const r = p(
|
|
330
329
|
(u) => {
|
|
331
330
|
e.some((d) => n(d, u)) || t([...e, u]);
|
|
@@ -371,7 +370,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
371
370
|
n((c) => !c);
|
|
372
371
|
}, [n]);
|
|
373
372
|
return [t, r, s, o];
|
|
374
|
-
},
|
|
373
|
+
}, gt = (e, t) => {
|
|
375
374
|
const [n, r] = g(e);
|
|
376
375
|
return l(() => {
|
|
377
376
|
const s = setTimeout(() => {
|
|
@@ -381,7 +380,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
381
380
|
clearTimeout(s);
|
|
382
381
|
};
|
|
383
382
|
}, [e, t]), n;
|
|
384
|
-
},
|
|
383
|
+
}, vt = (e, t) => {
|
|
385
384
|
const [n, r] = g(e);
|
|
386
385
|
return l(() => {
|
|
387
386
|
e && r(!0);
|
|
@@ -394,7 +393,7 @@ const ie = "_separatorLine_nzfcz_1", ae = {
|
|
|
394
393
|
}, [e, t]), n;
|
|
395
394
|
};
|
|
396
395
|
let je = 0;
|
|
397
|
-
const T = (e) => `webui-${e ? e + "-" : ""}${++je}`,
|
|
396
|
+
const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, wt = (e) => {
|
|
398
397
|
const [t, n] = g(() => T(e));
|
|
399
398
|
return l(() => n(T(e)), [e]), t;
|
|
400
399
|
}, w = (e, t, n) => {
|
|
@@ -415,10 +414,10 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
415
414
|
c && c.removeEventListener(t, o);
|
|
416
415
|
};
|
|
417
416
|
}, [t, e]);
|
|
418
|
-
},
|
|
417
|
+
}, bt = (e) => {
|
|
419
418
|
const [t, n, r] = E(!1);
|
|
420
419
|
l(() => {
|
|
421
|
-
document.activeElement ===
|
|
420
|
+
document.activeElement === ue.findDOMNode(e.current) ? n() : r();
|
|
422
421
|
}, [e, r, n]), w(e, "focus", n), w(e, "blur", r);
|
|
423
422
|
const s = p(() => {
|
|
424
423
|
e.current && e.current.focus();
|
|
@@ -426,13 +425,13 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
426
425
|
e.current && e.current.blur();
|
|
427
426
|
}, [e]);
|
|
428
427
|
return { isInFocus: t, focus: s, blur: o };
|
|
429
|
-
},
|
|
428
|
+
}, _t = (e) => {
|
|
430
429
|
const [t, n, r] = E(!1);
|
|
431
430
|
return w(e, "mouseover", n), w(e, "mouseout", r), t;
|
|
432
|
-
},
|
|
431
|
+
}, $t = (e) => {
|
|
433
432
|
const [t, n, r] = E(!1);
|
|
434
433
|
return w(e, "mouseenter", n), w(e, "mouseleave", r), t;
|
|
435
|
-
},
|
|
434
|
+
}, xt = (e, t) => {
|
|
436
435
|
const n = v(() => {
|
|
437
436
|
});
|
|
438
437
|
l(() => {
|
|
@@ -445,7 +444,7 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
445
444
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
446
445
|
};
|
|
447
446
|
}, [...e]);
|
|
448
|
-
},
|
|
447
|
+
}, yt = (e, t, n) => {
|
|
449
448
|
const r = v(() => {
|
|
450
449
|
});
|
|
451
450
|
l(() => {
|
|
@@ -458,20 +457,20 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
458
457
|
document.removeEventListener("mousedown", s, n), document.removeEventListener("touchstart", s, n);
|
|
459
458
|
};
|
|
460
459
|
}, [e, n]);
|
|
461
|
-
}, M = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"],
|
|
460
|
+
}, M = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Et = (e, t) => {
|
|
462
461
|
const n = v(() => {
|
|
463
462
|
});
|
|
464
463
|
l(() => {
|
|
465
464
|
n.current = e;
|
|
466
465
|
}, [e]), l(() => {
|
|
467
|
-
const r =
|
|
466
|
+
const r = ce(n.current, t);
|
|
468
467
|
return M.forEach((s) => window.addEventListener(s, r)), () => {
|
|
469
468
|
M.forEach(
|
|
470
469
|
(s) => window.removeEventListener(s, r)
|
|
471
470
|
);
|
|
472
471
|
};
|
|
473
472
|
}, [t]);
|
|
474
|
-
},
|
|
473
|
+
}, It = (e, t) => {
|
|
475
474
|
const [n, r] = g(!1), { rootMargin: s, root: o, threshold: c } = t || {}, a = z(() => new IntersectionObserver(
|
|
476
475
|
([u]) => r(u.isIntersecting),
|
|
477
476
|
{
|
|
@@ -483,12 +482,12 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
483
482
|
return l(() => (e.current && a.observe(e.current), () => {
|
|
484
483
|
a.disconnect();
|
|
485
484
|
}), [a, e]), n;
|
|
486
|
-
},
|
|
485
|
+
}, St = (e) => {
|
|
487
486
|
const t = v(null);
|
|
488
487
|
return l(() => {
|
|
489
488
|
e && (typeof e == "function" ? e(t.current) : e.current = t.current);
|
|
490
489
|
}), t;
|
|
491
|
-
},
|
|
490
|
+
}, Ct = (e, t, n = !0) => {
|
|
492
491
|
const [r, s] = g(e), o = v(), c = p(
|
|
493
492
|
(a, u = t) => {
|
|
494
493
|
s(a), n && clearTimeout(o.current), o.current = setTimeout(() => s(e), u);
|
|
@@ -498,15 +497,15 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
498
497
|
return l(() => () => {
|
|
499
498
|
clearTimeout(o.current);
|
|
500
499
|
}, []), [r, c];
|
|
501
|
-
},
|
|
500
|
+
}, Tt = (e) => {
|
|
502
501
|
throw new Error(`Switch unhandled case: ${e}`);
|
|
503
|
-
},
|
|
502
|
+
}, Mt = (e, t) => t, Ot = (e) => Object.keys(e).filter((t) => e[t]), Dt = (e) => {
|
|
504
503
|
try {
|
|
505
504
|
const t = parseFloat(e);
|
|
506
505
|
return isNaN(t) || t == null ? void 0 : t;
|
|
507
506
|
} catch {
|
|
508
507
|
}
|
|
509
|
-
},
|
|
508
|
+
}, Lt = (e) => {
|
|
510
509
|
try {
|
|
511
510
|
const t = parseInt(e, 10);
|
|
512
511
|
return isNaN(t) || t == null ? void 0 : t;
|
|
@@ -515,47 +514,47 @@ const T = (e) => `webui-${e ? e + "-" : ""}${++je}`, bt = (e) => {
|
|
|
515
514
|
};
|
|
516
515
|
export {
|
|
517
516
|
b as Box,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
517
|
+
et as Clickable,
|
|
518
|
+
tt as Column,
|
|
519
|
+
ht as HeaderText,
|
|
521
520
|
Ae as Heading,
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
521
|
+
st as Indent,
|
|
522
|
+
pt as LargeText,
|
|
523
|
+
ut as Nest,
|
|
524
|
+
nt as ResizeAwareBox,
|
|
525
|
+
rt as Row,
|
|
526
|
+
it as ScreenReaderOnlyText,
|
|
527
|
+
Ze as SeparatorLine,
|
|
528
|
+
dt as SmallText,
|
|
529
|
+
lt as SmallerText,
|
|
530
|
+
ct as Space,
|
|
531
|
+
ot as Spacing,
|
|
532
|
+
mt as StandardText,
|
|
534
533
|
_ as Text,
|
|
535
|
-
|
|
534
|
+
at as Txt,
|
|
536
535
|
$ as booleanOrNumberToNumber,
|
|
537
|
-
|
|
538
|
-
|
|
536
|
+
Mt as exhaustSwitchCase,
|
|
537
|
+
Tt as exhaustSwitchCaseElseThrow,
|
|
539
538
|
xe as getDataProps,
|
|
540
539
|
ge as getDimensionObject,
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
540
|
+
Dt as parseFloatElseUndefined,
|
|
541
|
+
Lt as parseIntElseUndefined,
|
|
542
|
+
Ot as truthyKeysAsList,
|
|
543
|
+
ft as useArraySet,
|
|
545
544
|
E as useBoolean,
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
545
|
+
gt as useDebounce,
|
|
546
|
+
vt as useDelayedFalse,
|
|
547
|
+
wt as useDomId,
|
|
549
548
|
we as useElementDimensions,
|
|
550
|
-
|
|
549
|
+
bt as useElementFocus,
|
|
551
550
|
w as useEventListener,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
551
|
+
St as useForwardedRef,
|
|
552
|
+
$t as useMouseIsEntered,
|
|
553
|
+
_t as useMouseIsOver,
|
|
554
|
+
xt as useMultiOnClickOutside,
|
|
555
|
+
yt as useOnClickOutside,
|
|
556
|
+
Et as useOnNoMouseMovement,
|
|
557
|
+
It as useOnScreen,
|
|
558
|
+
Ct as useTimeoutState
|
|
560
559
|
};
|
|
561
560
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport styles from \"./SeparatorLine.module.css\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <hr\n className={styles.separatorLine}\n aria-hidden={true}\n color={color}\n style={{\n backgroundColor: color,\n height: vertical ? size || \"100%\" : width || \"1px\",\n width: vertical ? width || \"1px\" : size || \"100%\",\n }}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n\nexport const numberToMetricCalc = (num: number): string | undefined => {\n if (num === 0) {\n return undefined;\n }\n return `calc(${num} * var(--swui-metrics-space))`;\n};\n\nexport const booleanOrNumberToMetricCalc = (\n num: number | boolean | undefined\n): string | undefined => numberToMetricCalc(booleanOrNumberToNumber(num));\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport {\n booleanOrNumberToMetricCalc,\n booleanOrNumberToNumber,\n} from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n property: \"columnGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n rowGap: {\n property: \"rowGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import pickBy from \"lodash/pickBy\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n textAlign?: Property.TextAlign;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n ...style,\n }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import debounce from \"lodash/debounce\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","styles","ClickableElement","styled","background","pointer","props","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","booleanOrNumberToNumber","num","numberToMetricCalc","booleanOrNumberToMetricCalc","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","Text","variant","className","userSelect","whiteSpace","wordBreak","textAlign","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;;;;;;;;;GAaaA,KAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,OAAAC,IAAQC,EAAS,qBAAqB;AAAA,IACtC,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,UAAAC,IAAW;AAAA,KAEbC,MAGE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,GAAO;AAAA,MAClB,eAAa;AAAA,MACb,OAAAP;AAAA,MACA,OAAO;AAAA,QACL,iBAAiBA;AAAA,QACjB,QAAQI,IAAWF,KAAQ,SAASC,KAAS;AAAA,QAC7C,OAAOC,IAAWD,KAAS,QAAQD,KAAQ;AAAA,MAC7C;AAAA,MACA,KAAAG;AAAA,IAAA;AAAA,EAAA;AAIR,GC0BMG,KAAmBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKhB,CAAC,EAAE,YAAAC,EAAW,MAAMA,CAAU;AAAA,IAC1C,CAAC,EAAE,SAAAC,EAAA,MAAeA,IAAU,qBAAqB,EAAG;AAAA;AAAA;AAAA,MAGlD,CAACC,MAAWA,EAAM,iBAAiB,kBAAkB,EAAG;AAAA,MACxD,CAAC,EAAE,iBAAAC,EAAsB,MAAA,eAAeA,CAAe,GAAG;AAAA;AAAA;AAAA,MAG1D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7H;AAAA,IACpB,CAAC8H,GAAaC,IAAUL,MAAmB;AACzC,MAAA5D,EAASgE,CAAQ,GACbH,KACF,aAAaC,EAAW,OAAQ,GAElCA,EAAW,UAAU,WAAW,MAAM9D,EAASD,CAAY,GAAGkE,CAAO;AAAA,IACvE;AAAA,IACA,CAACL,GAAgBC,GAAwB9D,CAAY;AAAA,EAAA;AAGvD,SAAAS,EAAU,MACD,MAAM;AACX,iBAAasD,EAAW,OAAQ;AAAA,EAAA,GAEjC,CAAE,CAAA,GAEE,CAACnK,GAAOoK,CAAa;AAC9B,GC5BaG,KAA6B,CAACC,MAAe;AACxD,QAAM,IAAI,MAAM,0BAA0BA,CAAG,EAAE;AACjD,GAEaC,KAAoB,CAAIC,GAAaC,MACzCA,GCLIC,KAAmB,CAACC,MAC/B,OAAO,KAAKA,CAAC,EAAE,OAAO,CAAC/G,MAAQ+G,EAAE/G,CAAG,CAAC,GCD1BgH,KAA0B,CAACC,MAAkC;AACpE,MAAA;AACI,UAAAC,IAAI,WAAWD,CAAC;AAItB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA,UACG;AAAA,EAAC;AAEf,GAEaC,KAAwB,CAACF,MAAkC;AAClE,MAAA;AACI,UAAAC,IAAI,SAASD,GAAG,EAAE;AAIxB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA,UACG;AAAA,EAAC;AAEf;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport styles from \"./SeparatorLine.module.css\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <hr\n className={styles.separatorLine}\n aria-hidden={true}\n color={color}\n style={{\n backgroundColor: color,\n height: vertical ? size || \"100%\" : width || \"1px\",\n width: vertical ? width || \"1px\" : size || \"100%\",\n }}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n\nexport const numberToMetricCalc = (num: number): string | undefined => {\n if (num === 0) {\n return undefined;\n }\n return `calc(${num} * var(--swui-metrics-space))`;\n};\n\nexport const booleanOrNumberToMetricCalc = (\n num: number | boolean | undefined\n): string | undefined => numberToMetricCalc(booleanOrNumberToNumber(num));\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport {\n booleanOrNumberToMetricCalc,\n booleanOrNumberToNumber,\n} from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n property: \"columnGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n rowGap: {\n property: \"rowGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash-es\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n textAlign?: Property.TextAlign;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n ...style,\n }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash-es\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","styles","ClickableElement","styled","background","pointer","props","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","booleanOrNumberToNumber","num","numberToMetricCalc","booleanOrNumberToMetricCalc","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","Text","variant","className","userSelect","whiteSpace","wordBreak","textAlign","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;;;;;;;;GAaaA,KAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,OAAAC,IAAQC,EAAS,qBAAqB;AAAA,IACtC,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,UAAAC,IAAW;AAAA,KAEbC,MAGE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,GAAO;AAAA,MAClB,eAAa;AAAA,MACb,OAAAP;AAAA,MACA,OAAO;AAAA,QACL,iBAAiBA;AAAA,QACjB,QAAQI,IAAWF,KAAQ,SAASC,KAAS;AAAA,QAC7C,OAAOC,IAAWD,KAAS,QAAQD,KAAQ;AAAA,MAC7C;AAAA,MACA,KAAAG;AAAA,IAAA;AAAA,EAAA;AAIR,GC0BMG,KAAmBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKhB,CAAC,EAAE,YAAAC,EAAW,MAAMA,CAAU;AAAA,IAC1C,CAAC,EAAE,SAAAC,EAAA,MAAeA,IAAU,qBAAqB,EAA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B,CACD,GAEMA;AACT,GCrBaC,KAAkB,CAC7B5D,GACA6D,GACAC,IAAyB,OACD;AACxB,QAAM,CAAClK,GAAOqG,CAAQ,IAAIhE,EAAY+D,CAAY,GAC5C+D,IAAarH,KAEbsH,IAAgB7H;AAAA,IACpB,CAAC8H,GAAaC,IAAUL,MAAmB;AACzC,MAAA5D,EAASgE,CAAQ,GACbH,KACF,aAAaC,EAAW,OAAQ,GAElCA,EAAW,UAAU,WAAW,MAAM9D,EAASD,CAAY,GAAGkE,CAAO;AAAA,IACvE;AAAA,IACA,CAACL,GAAgBC,GAAwB9D,CAAY;AAAA,EAAA;AAGvD,SAAAS,EAAU,MACD,MAAM;AACX,iBAAasD,EAAW,OAAQ;AAAA,EAAA,GAEjC,CAAE,CAAA,GAEE,CAACnK,GAAOoK,CAAa;AAC9B,GC5BaG,KAA6B,CAACC,MAAe;AACxD,QAAM,IAAI,MAAM,0BAA0BA,CAAG,EAAE;AACjD,GAEaC,KAAoB,CAAIC,GAAaC,MACzCA,GCLIC,KAAmB,CAACC,MAC/B,OAAO,KAAKA,CAAC,EAAE,OAAO,CAAC/G,MAAQ+G,EAAE/G,CAAG,CAAC,GCD1BgH,KAA0B,CAACC,MAAkC;AACpE,MAAA;AACI,UAAAC,IAAI,WAAWD,CAAC;AAItB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA,UACG;AAAA,EAAC;AAEf,GAEaC,KAAwB,CAACF,MAAkC;AAClE,MAAA;AACI,UAAAC,IAAI,SAASD,GAAG,EAAE;AAIxB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA,UACG;AAAA,EAAC;AAEf;"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1cnsg_1{font-size:2rem;color:var(--swui-text-primary-color);letter-spacing:0;margin:0;line-height:var(--swui-line-height);font-family:var(--swui-font-primary);font-weight:var(--swui-font-weight-text-bold)}._heading_1cnsg_1._h1_1cnsg_10{font-size:2.8rem}._heading_1cnsg_1._h2_1cnsg_14{font-size:2.4rem}._heading_1cnsg_1._h3_1cnsg_18{font-size:2rem}._heading_1cnsg_1._h4_1cnsg_22{font-size:1.8rem}._heading_1cnsg_1._h5_1cnsg_26{font-size:1.6rem}._heading_1cnsg_1._h6_1cnsg_30{font-size:1.4rem}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("@stenajs-webui/theme"),d=require("react/jsx-runtime"),r=require("react"),_=require("@emotion/styled"),N=require("@emotion/is-prop-valid"),i=require("styled-system"),C=require("lodash-es"),O=require("classnames"),z=require("react-dom");function H(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const q=H(z),P="_separatorLine_nzfcz_1",A={separatorLine:P},V=r.forwardRef(({color:e=F.cssColor("--lhds-color-ui-300"),size:t="100%",width:n="1px",vertical:s=!1},o)=>d.jsx("hr",{className:A.separatorLine,"aria-hidden":!0,color:e,style:{backgroundColor:e,height:s?t||"100%":n||"1px",width:s?n||"1px":t||"100%"},ref:o})),U=_.button`
|
|
3
3
|
display: inline-block;
|
|
4
4
|
user-select: none;
|
|
5
5
|
border: 0;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
${({width:e})=>e?`width: ${e};`:""}
|
|
23
23
|
${({height:e})=>e?`height: ${e};`:""}
|
|
24
24
|
${({borderRadius:e})=>e?`border-radius: ${e};`:""}
|
|
25
|
-
`,
|
|
25
|
+
`,B=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:c,opacityOnHover:u,disabled:l,children:a,background:f="transparent",hoverBackground:m,focusBackground:h,type:j="button",...D},M)=>{const L=!!(t||n);return d.jsx(U,{opacityOnHover:u,title:s,disabled:l,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:L&&!c,ref:M,background:f,hoverBackground:m,focusBackground:h,type:j,...D,children:a})}),g=e=>e==null?0:typeof e=="boolean"?e?1:0:e,G=e=>{if(e!==0)return`calc(${e} * var(--swui-metrics-space))`},y=e=>G(g(e)),K={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)",bottom:"var(--swui-shadow-bottom)"},W=["spacing","indent","gap","width","height","overflow","display"],J=e=>W.includes(e),Q=i.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:g},spacing:{property:"--current-spacing",transform:g},gap:{property:"--current-gap",transform:g},columnGap:{property:"columnGap",transform:y},rowGap:{property:"rowGap",transform:y},shadow:{property:"boxShadow",transform:e=>K[e]??e}}),b=_("div",{shouldForwardProp:e=>typeof e=="string"?J(e)?!1:N(e):!1})`
|
|
26
26
|
--current-spacing: 0;
|
|
27
27
|
--current-indent: 0;
|
|
28
28
|
--current-gap: 0;
|
|
29
29
|
box-sizing: border-box;
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
|
-
${
|
|
32
|
+
${Q};
|
|
33
33
|
${i.background};
|
|
34
34
|
${i.border};
|
|
35
35
|
${i.borderRight};
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
${({focusWithinBackground:e})=>e?`background: ${e};`:""}
|
|
71
71
|
${({focusWithinBorder:e})=>e?`border: ${e};`:""}
|
|
72
72
|
}
|
|
73
|
-
`,
|
|
73
|
+
`,X=r.forwardRef(function(t,n){return d.jsx(b,{ref:n,...t})}),R=e=>{const{x:t,y:n,width:s,height:o,bottom:c,top:u,left:l,right:a}=e.getBoundingClientRect();return{width:s,height:o,top:u,left:l,x:t,y:n,right:a,bottom:c}},Y=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height&&e.bottom===t.bottom&&e.top===t.top&&e.left===t.left&&e.right===t.right,T=(e,t)=>{const[n,s]=r.useState(),o=r.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const c=R(e.current);(!n||!Y(n,c))&&t&&t(c),s(c)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},Z=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null);return T(s??o,t),d.jsx(b,{...n,ref:s})}),ee=r.forwardRef(function(t,n){return d.jsx(b,{row:!0,ref:n,...t})}),te=r.forwardRef(function({num:t=1,...n},s){return d.jsx(b,{indent:t,ref:s,...n})}),ne=r.forwardRef(function({num:t=1,...n},s){return d.jsx(b,{spacing:t,ref:s,...n})}),se=_.div`
|
|
74
74
|
--current-size: 1;
|
|
75
75
|
flex: none;
|
|
76
76
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
77
77
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
78
|
-
`,
|
|
78
|
+
`,re=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return d.jsx(se,{style:{"--current-size":o,height:t?1:void 0,width:s?1:void 0}})},oe=({children:e,nest:t,render:n})=>t?d.jsx(d.Fragment,{children:n(e)}):d.jsx(d.Fragment,{children:e}),ce="_visuallyHidden_1gevf_1",ue={visuallyHidden:ce},I=e=>C.pickBy(e,ae),ae=(e,t)=>ie(t),ie=e=>e.startsWith("data-")||e.startsWith("aria-"),de=({children:e,...t})=>d.jsx("span",{className:ue.visuallyHidden,...I(t),children:e}),le="_text_1iisw_1",fe="_standard_1iisw_24",me="_bold_1iisw_27",he="_caption_1iisw_31",pe="_overline_1iisw_39",be="_large_1iisw_48",we="_medium_1iisw_53",ge="_small_1iisw_58",ve="_smaller_1iisw_63",x={text:le,standard:fe,bold:me,caption:he,overline:pe,large:be,medium:we,small:ge,smaller:ve},w=r.forwardRef(({children:e,variant:t="standard",size:n="medium",className:s,color:o,userSelect:c,whiteSpace:u,wordBreak:l,textAlign:a,style:f,...m},h)=>d.jsx("span",{className:O(x.text,x[t],x[n],s),ref:h,style:{color:o,userSelect:c,whiteSpace:u,wordBreak:l,textAlign:a,...f},...m,children:e})),xe=w,_e=e=>d.jsx(w,{size:"small",...e}),ye=e=>d.jsx(w,{size:"smaller",...e}),$e=e=>d.jsx(w,{size:"medium",...e}),Ee=e=>d.jsx(w,{size:"large",...e}),Se="_heading_1cnsg_1",Ce="_h1_1cnsg_10",Oe="_h2_1cnsg_14",Re="_h3_1cnsg_18",Te="_h4_1cnsg_22",Ie="_h5_1cnsg_26",ke="_h6_1cnsg_30",$={heading:Se,h1:Ce,h2:Oe,h3:Re,h4:Te,h5:Ie,h6:ke},k=r.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:s,wordBreak:o,style:c,children:u,as:l,...a},f)=>{const m=l??e;return d.jsx(m,{className:O($.heading,$[e],t),style:{color:n,whiteSpace:s,wordBreak:o,...c},ref:f,...a,children:u})}),je=e=>d.jsx(k,{variant:"h2",...e}),De=(e,t)=>e===t,Me=(e,t,n=De)=>{const s=r.useCallback(a=>{e.some(f=>n(f,a))||t([...e,a])},[e,t,n]),o=r.useCallback(a=>{t(a.reduce((f,m)=>f.some(h=>n(h,m))?f:[...f,m],e))},[e,t,n]),c=r.useCallback(a=>{const f=e.findIndex(m=>n(m,a));f>=0&&t(e.filter((m,h)=>h!==f))},[e,t,n]),u=r.useCallback(a=>{t(e.filter(f=>!a.some(m=>n(m,f))))},[e,t,n]),l=r.useCallback(a=>{e.some(m=>n(m,a))?c(a):s(a)},[e,s,c,n]);return{add:s,addMultiple:o,remove:c,removeMultiple:u,toggle:l}},v=e=>{const[t,n]=r.useState(e),s=r.useCallback(()=>{n(!0)},[n]),o=r.useCallback(()=>{n(!1)},[n]),c=r.useCallback(()=>{n(u=>!u)},[n]);return[t,s,o,c]},Le=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{const o=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},Fe=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{e&&s(!0);const o=setTimeout(()=>{e||s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n};let Ne=0;const E=e=>`webui-${e?e+"-":""}${++Ne}`,ze=e=>{const[t,n]=r.useState(()=>E(e));return r.useEffect(()=>n(E(e)),[e]),t},p=(e,t,n)=>{const s=r.useRef();r.useEffect(()=>{s.current=n},[n]),r.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const c=l=>{if(s.current)return s.current(l)};if(!e.current)return;const u=e.current;return u.addEventListener(t,c),()=>{u&&u.removeEventListener(t,c)}},[t,e])},He=e=>{const[t,n,s]=v(!1);r.useEffect(()=>{document.activeElement===q.findDOMNode(e.current)?n():s()},[e,s,n]),p(e,"focus",n),p(e,"blur",s);const o=r.useCallback(()=>{e.current&&e.current.focus()},[e]),c=r.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:o,blur:c}},qe=e=>{const[t,n,s]=v(!1);return p(e,"mouseover",n),p(e,"mouseout",s),t},Pe=e=>{const[t,n,s]=v(!1);return p(e,"mouseenter",n),p(e,"mouseleave",s),t},Ae=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=t},[t]),r.useEffect(()=>{const s=o=>{e.filter(u=>u.current).every(u=>u.current&&!u.current.contains(o.target))&&n.current(o)};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[...e])},Ve=(e,t,n)=>{const s=r.useRef(()=>{});r.useEffect(()=>{s.current=t},[t]),r.useEffect(()=>{const o=c=>{!e.current||e.current.contains(c.target)||s.current(c)};return document.addEventListener("mousedown",o,n),document.addEventListener("touchstart",o,n),()=>{document.removeEventListener("mousedown",o,n),document.removeEventListener("touchstart",o,n)}},[e,n])},S=["mousemove","mousedown","keydown","touchstart","scroll"],Ue=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=e},[e]),r.useEffect(()=>{const s=C.debounce(n.current,t);return S.forEach(o=>window.addEventListener(o,s)),()=>{S.forEach(o=>window.removeEventListener(o,s))}},[t])},Be=(e,t)=>{const[n,s]=r.useState(!1),{rootMargin:o,root:c,threshold:u}=t||{},l=r.useMemo(()=>new IntersectionObserver(([a])=>s(a.isIntersecting),{rootMargin:o,root:c,threshold:u}),[s,o,c,u]);return r.useEffect(()=>(e.current&&l.observe(e.current),()=>{l.disconnect()}),[l,e]),n},Ge=e=>{const t=r.useRef(null);return r.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},Ke=(e,t,n=!0)=>{const[s,o]=r.useState(e),c=r.useRef(),u=r.useCallback((l,a=t)=>{o(l),n&&clearTimeout(c.current),c.current=setTimeout(()=>o(e),a)},[t,n,e]);return r.useEffect(()=>()=>{clearTimeout(c.current)},[]),[s,u]},We=e=>{throw new Error(`Switch unhandled case: ${e}`)},Je=(e,t)=>t,Qe=e=>Object.keys(e).filter(t=>e[t]),Xe=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Ye=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=b;exports.Clickable=B;exports.Column=X;exports.HeaderText=je;exports.Heading=k;exports.Indent=te;exports.LargeText=Ee;exports.Nest=oe;exports.ResizeAwareBox=Z;exports.Row=ee;exports.ScreenReaderOnlyText=de;exports.SeparatorLine=V;exports.SmallText=_e;exports.SmallerText=ye;exports.Space=re;exports.Spacing=ne;exports.StandardText=$e;exports.Text=w;exports.Txt=xe;exports.booleanOrNumberToNumber=g;exports.exhaustSwitchCase=Je;exports.exhaustSwitchCaseElseThrow=We;exports.getDataProps=I;exports.getDimensionObject=R;exports.parseFloatElseUndefined=Xe;exports.parseIntElseUndefined=Ye;exports.truthyKeysAsList=Qe;exports.useArraySet=Me;exports.useBoolean=v;exports.useDebounce=Le;exports.useDelayedFalse=Fe;exports.useDomId=ze;exports.useElementDimensions=T;exports.useElementFocus=He;exports.useEventListener=p;exports.useForwardedRef=Ge;exports.useMouseIsEntered=Pe;exports.useMouseIsOver=qe;exports.useMultiOnClickOutside=Ae;exports.useOnClickOutside=Ve;exports.useOnNoMouseMovement=Ue;exports.useOnScreen=Be;exports.useTimeoutState=Ke;
|
|
79
79
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport styles from \"./SeparatorLine.module.css\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <hr\n className={styles.separatorLine}\n aria-hidden={true}\n color={color}\n style={{\n backgroundColor: color,\n height: vertical ? size || \"100%\" : width || \"1px\",\n width: vertical ? width || \"1px\" : size || \"100%\",\n }}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n\nexport const numberToMetricCalc = (num: number): string | undefined => {\n if (num === 0) {\n return undefined;\n }\n return `calc(${num} * var(--swui-metrics-space))`;\n};\n\nexport const booleanOrNumberToMetricCalc = (\n num: number | boolean | undefined\n): string | undefined => numberToMetricCalc(booleanOrNumberToNumber(num));\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport {\n booleanOrNumberToMetricCalc,\n booleanOrNumberToNumber,\n} from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n property: \"columnGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n rowGap: {\n property: \"rowGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import pickBy from \"lodash/pickBy\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n textAlign?: Property.TextAlign;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n ...style,\n }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import debounce from \"lodash/debounce\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","styles","ClickableElement","styled","background","pointer","props","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","numberToMetricCalc","booleanOrNumberToMetricCalc","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","Text","variant","className","userSelect","whiteSpace","wordBreak","textAlign","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","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C,GAGPA,GAAK,KACA,OAEFA,OACG,CAAC,CAEf"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/decorators/separatorline/SeparatorLine.tsx","../src/components/interaction/Clickable.tsx","../src/utils/BooleanOrNumberToNumber.ts","../src/components/layout/box/Box.tsx","../src/components/layout/column/Column.tsx","../src/hooks/UseElementDimensions.ts","../src/components/layout/box/ResizeAwareBox.tsx","../src/components/layout/row/Row.tsx","../src/components/layout/indent/Indent.tsx","../src/components/layout/spacing/Spacing.tsx","../src/components/layout/space/Space.tsx","../src/components/util/Nest.tsx","../src/utils/PropsForwarder.ts","../src/components/accessibility/ScreenReaderOnlyText.tsx","../src/components/text/Text.tsx","../src/components/deprecated-text/SmallText.tsx","../src/components/deprecated-text/SmallerText.tsx","../src/components/deprecated-text/StandardText.tsx","../src/components/deprecated-text/LargeText.tsx","../src/components/heading/Heading.tsx","../src/components/deprecated-text/HeaderText.tsx","../src/hooks/UseArraySet.ts","../src/hooks/UseBoolean.ts","../src/hooks/UseDebounce.ts","../src/hooks/UseDelayedFalse.ts","../src/hooks/UseDomId.ts","../src/hooks/UseEventListener.ts","../src/hooks/UseElementFocus.ts","../src/hooks/UseMouseIsOver.ts","../src/hooks/UseMouseIsEntered.ts","../src/hooks/UseMultiOnClickOutside.ts","../src/hooks/UseOnClickOutside.ts","../src/hooks/UseOnNoMouseInput.ts","../src/hooks/UseOnScreen.ts","../src/hooks/UseForwardedRef.ts","../src/hooks/UseTimeoutState.ts","../src/utils/SwitchCaseExhauster.ts","../src/utils/TruthyKeysAsList.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport styles from \"./SeparatorLine.module.css\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = cssColor(\"--lhds-color-ui-300\"),\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <hr\n className={styles.separatorLine}\n aria-hidden={true}\n color={color}\n style={{\n backgroundColor: color,\n height: vertical ? size || \"100%\" : width || \"1px\",\n width: vertical ? width || \"1px\" : size || \"100%\",\n }}\n ref={ref}\n />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\nimport { CSSProperties, forwardRef, MouseEventHandler } from \"react\";\nimport { ButtonElementProps } from \"../../types/ElementProps\";\n\nexport interface ClickableProps extends ButtonElementProps {\n /** Callback function called when clicking on click area. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /** Callback function called when double clicking on click area. */\n onDblClick?: MouseEventHandler<HTMLButtonElement>;\n /** Adds a title to the click area. */\n tooltip?: string;\n /** If set, there is no opacity applies when clicking on the click area. */\n disableOpacityOnClick?: boolean;\n /** Mouse does not turn into pointer when hovering over click area. */\n disablePointer?: boolean;\n /** When set, click area receives opacity when mouse hovers over it. */\n opacityOnHover?: boolean;\n /** Custom style on div with click event. */\n style?: CSSProperties;\n /** Disables shadow when element is focused. */\n disableFocusHighlight?: boolean;\n /** Disables the HTML button element. */\n disabled?: boolean;\n /**\n * Sets the background of the box.\n */\n background?: string;\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: string;\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: string;\n /**\n * The width.\n */\n width?: string;\n /**\n * The height.\n */\n height?: string;\n /**\n * Border radius\n */\n borderRadius?: string;\n}\n\ninterface ClickableElementProps {\n disableOpacityOnClick?: boolean;\n opacityOnHover?: boolean;\n disableFocusHighlight?: boolean;\n pointer?: boolean;\n background?: string;\n focusBackground?: string;\n hoverBackground?: string;\n width?: string;\n height?: string;\n borderRadius?: string;\n}\n\nconst ClickableElement = styled.button<ClickableElementProps>`\n display: inline-block;\n user-select: none;\n border: 0;\n padding: 0;\n background: ${({ background }) => background};\n ${({ pointer }) => (pointer ? \"cursor: pointer;\" : \"\")}\n\n :hover {\n ${(props) => (props.opacityOnHover ? \"opacity: 0.7;\" : \"\")};\n ${({ hoverBackground }) => `background: ${hoverBackground};`}\n }\n :active {\n ${({ disableOpacityOnClick }) =>\n !disableOpacityOnClick ? \"opacity: 0.5;\" : \"\"}\n }\n :focus {\n outline: 0;\n ${({ disableFocusHighlight }) =>\n disableFocusHighlight\n ? \"\"\n : \"box-shadow: 0 0 3pt 2pt rgba(0, 0, 100, 0.3);\"}\n ${({ focusBackground }) => `background: ${focusBackground};`}\n }\n ${({ width }) => (width ? `width: ${width};` : \"\")}\n ${({ height }) => (height ? `height: ${height};` : \"\")}\n ${({ borderRadius }) =>\n borderRadius ? `border-radius: ${borderRadius};` : \"\"}\n`;\n\nexport const Clickable = forwardRef<HTMLButtonElement, ClickableProps>(\n (\n {\n disableFocusHighlight,\n onClick,\n onDblClick,\n tooltip,\n disableOpacityOnClick,\n disablePointer,\n opacityOnHover,\n disabled,\n children,\n background = \"transparent\",\n hoverBackground,\n focusBackground,\n type = \"button\",\n ...restProps\n },\n ref\n ) => {\n const hasClickHandler = !!(onClick || onDblClick);\n\n return (\n <ClickableElement\n opacityOnHover={opacityOnHover}\n title={tooltip}\n disabled={disabled}\n disableOpacityOnClick={disableOpacityOnClick}\n onClick={onClick}\n onDoubleClick={onDblClick}\n disableFocusHighlight={disableFocusHighlight}\n pointer={hasClickHandler && !disablePointer}\n ref={ref}\n background={background}\n hoverBackground={hoverBackground}\n focusBackground={focusBackground}\n type={type}\n {...restProps}\n >\n {children}\n </ClickableElement>\n );\n }\n);\n","export const booleanOrNumberToNumber = (\n num: number | boolean | undefined\n): number => {\n if (num == null) {\n return 0;\n }\n if (typeof num === \"boolean\") {\n return num ? 1 : 0;\n }\n return num;\n};\n\nexport const numberToMetricCalc = (num: number): string | undefined => {\n if (num === 0) {\n return undefined;\n }\n return `calc(${num} * var(--swui-metrics-space))`;\n};\n\nexport const booleanOrNumberToMetricCalc = (\n num: number | boolean | undefined\n): string | undefined => numberToMetricCalc(booleanOrNumberToNumber(num));\n","import isPropValid from \"@emotion/is-prop-valid\";\nimport styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\n\nimport {\n background,\n BackgroundProps,\n border,\n borderBottom,\n BorderBottomProps,\n borderColor,\n borderLeft,\n BorderLeftProps,\n borderRadius,\n BorderRadiusProps,\n borderRight,\n BorderRightProps,\n borderStyle,\n BorderStyleProps,\n borderTop,\n BorderTopProps,\n borderWidth,\n BorderWidthProps,\n bottom,\n BottomProps,\n boxShadow,\n BoxShadowProps,\n flexbox,\n FlexboxProps,\n layout,\n LayoutProps,\n left,\n LeftProps,\n overflow,\n OverflowProps,\n position,\n PositionProps,\n ResponsiveValue,\n right,\n RightProps,\n system,\n TLengthStyledSystem,\n top,\n TopProps,\n zIndex,\n ZIndexProps,\n} from \"styled-system\";\nimport { DivProps } from \"../../../types/ElementProps\";\nimport {\n booleanOrNumberToMetricCalc,\n booleanOrNumberToNumber,\n} from \"../../../utils/BooleanOrNumberToNumber\";\n\ninterface StyledSystemProps\n extends BorderRadiusProps,\n BorderStyleProps,\n BorderWidthProps,\n BorderLeftProps,\n BorderRightProps,\n BorderTopProps,\n BorderBottomProps,\n FlexboxProps,\n LayoutProps,\n OverflowProps,\n PositionProps,\n ZIndexProps,\n LeftProps,\n RightProps,\n TopProps,\n BottomProps {}\n\nconst shadows = {\n box: \"var(--swui-shadow-box)\",\n popover: \"var(--swui-shadow-popover)\",\n modal: \"var(--swui-shadow-modal)\",\n bottom: \"var(--swui-shadow-bottom)\",\n};\n\ntype ShadowType = keyof typeof shadows;\n\nexport interface BoxProps extends StyledSystemProps, DivProps {\n /**\n * If true, children are placed in a row.\n */\n row?: ResponsiveValue<boolean>;\n\n /**\n * Adds spacing over and under content.\n */\n spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing left and right of content.\n */\n indent?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds spacing between children.\n */\n gap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between columns.\n */\n columnGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds gap between rows.\n */\n rowGap?: ResponsiveValue<boolean | TLengthStyledSystem>;\n\n /**\n * Adds a shadow around the box.\n */\n shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;\n\n /**\n * Sets the background of the box.\n */\n background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;\n\n /**\n * Sets the border of the box.\n */\n border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;\n\n /**\n * Sets the border color of the box.\n */\n borderColor?: ResponsiveValue<Property.BorderColor>;\n\n /**\n * Sets the background of the box when hovering with mouse.\n */\n hoverBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when hovering with mouse.\n */\n hoverBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when the box is in focus.\n */\n focusBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when the box is in focus.\n */\n focusBorder?: Property.Border<TLengthStyledSystem>;\n\n /**\n * Sets the background of the box when focus is within the box.\n */\n focusWithinBackground?: Property.Background<TLengthStyledSystem>;\n\n /**\n * Sets the border of the box when focus is within the box.\n */\n focusWithinBorder?: Property.Border<TLengthStyledSystem>;\n}\n\nconst excludedProps = [\n \"spacing\",\n \"indent\",\n \"gap\",\n \"width\",\n \"height\",\n \"overflow\",\n \"display\",\n];\n\nconst isExcludedWebUiProp = (propName: string) =>\n excludedProps.includes(propName);\n\nconst box = system({\n row: {\n property: \"flexDirection\",\n transform: (row: boolean) => (row ? \"row\" : \"column\"),\n },\n indent: {\n // @ts-ignore\n property: \"--current-indent\",\n transform: booleanOrNumberToNumber,\n },\n spacing: {\n // @ts-ignore\n property: \"--current-spacing\",\n transform: booleanOrNumberToNumber,\n },\n gap: {\n // @ts-ignore\n property: \"--current-gap\",\n transform: booleanOrNumberToNumber,\n },\n columnGap: {\n property: \"columnGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n rowGap: {\n property: \"rowGap\",\n transform: booleanOrNumberToMetricCalc,\n },\n shadow: {\n property: \"boxShadow\",\n transform: (value) => shadows[value] ?? value,\n },\n});\n\ntype InnerProps = BoxProps & BoxShadowProps & BackgroundProps;\n\nexport const Box = styled(\"div\", {\n shouldForwardProp: (propName) =>\n typeof propName === \"string\"\n ? isExcludedWebUiProp(propName)\n ? false\n : isPropValid(propName)\n : false,\n})<InnerProps>`\n --current-spacing: 0;\n --current-indent: 0;\n --current-gap: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n ${box};\n ${background};\n ${border};\n ${borderRight};\n ${borderLeft};\n ${borderTop};\n ${borderBottom};\n ${borderColor};\n ${borderRadius};\n ${borderStyle};\n ${borderWidth};\n ${boxShadow};\n ${flexbox};\n ${overflow};\n ${position};\n ${layout};\n ${zIndex};\n ${left};\n ${right};\n ${top};\n ${bottom};\n\n gap: calc(var(--current-gap) * var(--swui-metrics-space));\n\n padding: calc(var(--current-spacing) * var(--swui-metrics-spacing))\n calc(var(--current-indent) * var(--swui-metrics-indent));\n\n :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\n }\n\n :focus-within {\n ${({ focusWithinBackground }) =>\n focusWithinBackground ? `background: ${focusWithinBackground};` : \"\"}\n ${({ focusWithinBorder }) =>\n focusWithinBorder ? `border: ${focusWithinBorder};` : \"\"}\n }\n`;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Column = forwardRef<HTMLDivElement, BoxProps>(function Column(\n props,\n ref\n) {\n return <Box ref={ref} {...props} />;\n});\n","import { RefObject, useCallback, useLayoutEffect, useState } from \"react\";\n\nexport interface ElementDimensions {\n width: number;\n height: number;\n top: number;\n left: number;\n x: number;\n y: number;\n right: number;\n bottom: number;\n}\n\nexport const getDimensionObject = (node: HTMLElement): ElementDimensions => {\n const { x, y, width, height, bottom, top, left, right } =\n node.getBoundingClientRect();\n\n return {\n width,\n height,\n top,\n left,\n x,\n y,\n right,\n bottom,\n };\n};\n\nconst isEqualDimensions = (\n a: ElementDimensions,\n b: ElementDimensions\n): boolean =>\n a.x === b.x &&\n a.y === b.y &&\n a.width === b.width &&\n a.height === b.height &&\n a.bottom === b.bottom &&\n a.top === b.top &&\n a.left === b.left &&\n a.right === b.right;\n\nexport const useElementDimensions = (\n ref: RefObject<HTMLElement>,\n onResizeElement?: (dimensions: ElementDimensions) => void\n) => {\n const [dimensions, setDimensions] = useState<ElementDimensions | undefined>();\n\n const updateDimensions = useCallback(() => {\n window.requestAnimationFrame(() => {\n if (ref.current) {\n const newDimensions = getDimensionObject(ref.current);\n if (!dimensions || !isEqualDimensions(dimensions, newDimensions)) {\n if (onResizeElement) {\n onResizeElement(newDimensions);\n }\n }\n setDimensions(newDimensions);\n }\n });\n }, [ref, dimensions, setDimensions, onResizeElement]);\n\n useLayoutEffect(() => {\n updateDimensions();\n }, [updateDimensions]);\n\n return {\n dimensions,\n };\n};\n","import * as React from \"react\";\nimport { forwardRef, RefObject, useRef } from \"react\";\nimport { Box, BoxProps } from \"./Box\";\nimport {\n ElementDimensions,\n useElementDimensions,\n} from \"../../../hooks/UseElementDimensions\";\n\nexport interface ResizeAwareBoxProps extends BoxProps {\n onResize?: (dimensions: ElementDimensions) => void;\n}\n\nexport const ResizeAwareBox = forwardRef<HTMLDivElement, ResizeAwareBoxProps>(\n function ResizeAwareBox({ onResize, ...boxProps }, ref) {\n const localRef = useRef<HTMLDivElement>(null);\n const currentRef = (ref as RefObject<HTMLDivElement>) ?? localRef;\n useElementDimensions(currentRef, onResize);\n\n return <Box {...boxProps} ref={ref} />;\n }\n);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\n\nexport const Row = forwardRef<HTMLDivElement, BoxProps>(function Row(\n props,\n ref\n) {\n return <Box row ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface IndentProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Indent = forwardRef<HTMLDivElement, IndentProps>(function Indent(\n { num = 1, ...props },\n ref\n) {\n return <Box indent={num} ref={ref} {...props} />;\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { Box, BoxProps } from \"../box/Box\";\nimport { ResponsiveValue, TLengthStyledSystem } from \"styled-system\";\n\nexport interface SpacingProps extends BoxProps {\n num?: ResponsiveValue<boolean | TLengthStyledSystem>;\n}\n\nexport const Spacing = forwardRef<HTMLDivElement, SpacingProps>(\n function Spacing({ num = 1, ...props }, ref) {\n return <Box spacing={num} ref={ref} {...props} />;\n }\n);\n","import styled from \"@emotion/styled\";\nimport * as React from \"react\";\n\nexport interface SpaceProps {\n half?: boolean;\n horizontal?: boolean;\n num?: number;\n vertical?: boolean;\n}\n\nconst InnerSpace = styled.div`\n --current-size: 1;\n flex: none;\n width: calc(var(--current-size) * var(--swui-metrics-space));\n height: calc(var(--current-size) * var(--swui-metrics-space));\n`;\n\nexport const Space: React.VFC<SpaceProps> = ({\n half = false,\n horizontal = false,\n num = 1,\n vertical = false,\n}) => {\n const size = num * (half ? 0.5 : 1);\n\n return (\n <InnerSpace\n style={{\n [\"--current-size\" as string]: size,\n height: horizontal ? 1 : undefined,\n width: vertical ? 1 : undefined,\n }}\n />\n );\n};\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\n\ninterface Props {\n nest?: boolean;\n render: (children: ReactNode) => ReactNode;\n children?: ReactNode;\n}\n\nexport const Nest: React.FC<Props> = ({ children, nest, render }) => {\n if (nest) {\n return <>{render(children)}</>;\n }\n return <>{children}</>;\n};\n","import { pickBy } from \"lodash-es\";\n\nexport const getDataProps = <T extends Record<string, unknown>>(\n props: Record<string, unknown> | {}\n): T => pickBy(props, isDataPropMapper) as T;\n\nconst isDataPropMapper = (_: unknown, key: string): boolean => isDataProp(key);\n\nconst isDataProp = <TProp extends string>(propName: TProp): boolean =>\n propName.startsWith(\"data-\") || propName.startsWith(\"aria-\");\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./ScreenReaderOnlyText.module.css\";\nimport { getDataProps } from \"../../utils/PropsForwarder\";\n\nexport interface ScreenReaderOnlyTextProps {\n children?: ReactNode;\n}\n\nexport const ScreenReaderOnlyText: React.FC<ScreenReaderOnlyTextProps> = ({\n children,\n ...props\n}) => {\n return (\n <span className={styles.visuallyHidden} {...getDataProps(props)}>\n {children}\n </span>\n );\n};\n","import * as React from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Text.module.css\";\nimport { SpanProps } from \"../../types/ElementProps\";\nimport { Property } from \"csstype\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps extends SpanProps {\n variant?: TextVariant;\n size?: TextSize;\n userSelect?: Property.UserSelect;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n textAlign?: Property.TextAlign;\n color?: string;\n}\n\nexport type TextVariant = \"standard\" | \"caption\" | \"overline\" | \"bold\";\nexport type TextSize = \"large\" | \"medium\" | \"small\" | \"smaller\";\n\nexport const Text = forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n children,\n variant = \"standard\",\n size = \"medium\",\n className,\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n style,\n ...spanProps\n },\n ref\n ) => {\n return (\n <span\n className={cx(styles.text, styles[variant], styles[size], className)}\n ref={ref}\n style={{\n color,\n userSelect,\n whiteSpace,\n wordBreak,\n textAlign,\n ...style,\n }}\n {...spanProps}\n >\n {children}\n </span>\n );\n }\n);\n\nexport const Txt = Text;\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"small\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const SmallerText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"smaller\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const StandardText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"medium\"} {...props} />;\n};\n","import * as React from \"react\";\nimport { Text, TextProps } from \"../text/Text\";\n\n/**\n * @deprecated Please use `Text` instead.\n */\nexport const LargeText: React.FC<Omit<TextProps, \"size\">> = (props) => {\n return <Text size={\"large\"} {...props} />;\n};\n","import cx from \"classnames\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { H1Props } from \"../../types/ElementProps\";\nimport styles from \"./Heading.module.css\";\n\nexport interface HeadingProps extends H1Props {\n variant?: HeadingVariant;\n whiteSpace?: Property.WhiteSpace;\n wordBreak?: Property.WordBreak;\n as?: HeadingVariant;\n}\n\nexport type HeadingVariant = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\n (\n {\n variant = \"h3\",\n className,\n color,\n whiteSpace,\n wordBreak,\n style,\n children,\n as,\n ...hProps\n },\n ref\n ) => {\n const Element = as ?? variant;\n return (\n <Element\n className={cx(styles.heading, styles[variant], className)}\n style={{ color, whiteSpace, wordBreak, ...style }}\n ref={ref}\n {...hProps}\n >\n {children}\n </Element>\n );\n }\n);\n","import * as React from \"react\";\nimport { Heading, HeadingProps } from \"../heading/Heading\";\n\n/**\n * @deprecated Please use `Heading` instead.\n */\nexport const HeaderText: React.FC<Omit<HeadingProps, \"variant\">> = (props) => {\n return <Heading variant={\"h2\"} {...props} />;\n};\n","import { useCallback } from \"react\";\n\ntype ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;\n\nconst defaultComparator = <T>(a: T, b: T) => a === b;\n\nexport const useArraySet = <T>(\n list: Array<T>,\n setList: (list: Array<T>) => void,\n comparator: ArrayItemEqualsComparator<T> = defaultComparator\n) => {\n const add = useCallback(\n (item: T) => {\n if (!list.some((l) => comparator(l, item))) {\n setList([...list, item]);\n }\n },\n [list, setList, comparator]\n );\n\n const addMultiple = useCallback(\n (items: Array<T>) => {\n setList(\n items.reduce((list, item) => {\n if (!list.some((l) => comparator(l, item))) {\n return [...list, item];\n }\n return list;\n }, list)\n );\n },\n [list, setList, comparator]\n );\n\n const remove = useCallback(\n (item: T) => {\n const index = list.findIndex((l) => comparator(l, item));\n if (index >= 0) {\n setList(list.filter((_, i) => i !== index));\n }\n },\n [list, setList, comparator]\n );\n\n const removeMultiple = useCallback(\n (items: Array<T>) => {\n setList(list.filter((item) => !items.some((l) => comparator(l, item))));\n },\n [list, setList, comparator]\n );\n\n const toggle = useCallback(\n (item: T) => {\n const found = list.some((l) => comparator(l, item));\n if (found) {\n remove(item);\n } else {\n add(item);\n }\n },\n [list, add, remove, comparator]\n );\n\n return {\n add,\n addMultiple,\n remove,\n removeMultiple,\n toggle,\n };\n};\n","import { useCallback, useState } from \"react\";\n\ntype Value = boolean;\ntype SetTrue = () => void;\ntype SetFalse = () => void;\ntype ToggleValue = () => void;\ntype BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];\n\nexport const useBoolean = (initialValue: Value): BooleanHook => {\n const [value, setValue] = useState(initialValue);\n\n const setTrue = useCallback(() => {\n setValue(true);\n }, [setValue]);\n\n const setFalse = useCallback(() => {\n setValue(false);\n }, [setValue]);\n\n const toggle = useCallback(() => {\n setValue((v) => !v);\n }, [setValue]);\n\n return [value, setTrue, setFalse, toggle];\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]); // Only re-call effect if value or delay changes\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nexport const useDelayedFalse = (value: boolean, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<boolean>(value);\n\n useEffect(() => {\n if (value) {\n setDebouncedValue(true);\n }\n\n const handler = setTimeout(() => {\n if (!value) {\n setDebouncedValue(value);\n }\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n};\n","import { useEffect, useState } from \"react\";\n\nlet id = 0;\nconst genId = (componentName?: string) =>\n `webui-${componentName ? componentName + \"-\" : \"\"}${++id}`;\n\n/** @deprecated use useId-hook from React 18 */\nexport const useDomId = (componentName?: string): string => {\n const [id, setId] = useState<string | null>(() => genId(componentName));\n useEffect(() => setId(genId(componentName)), [componentName]);\n return id!;\n};\n","import { RefObject, useEffect, useRef } from \"react\";\n\ntype EventHandler<TEventName extends keyof HTMLElementEventMap> = (\n event: HTMLElementEventMap[TEventName]\n) => void;\n\nexport const useEventListener = <TEventName extends keyof HTMLElementEventMap>(\n ref: RefObject<HTMLElement>,\n eventName: TEventName,\n handler: EventHandler<TEventName>\n) => {\n // Create a ref that stores handler\n const savedHandler = useRef<EventHandler<TEventName>>();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n // Make sure element supports addEventListener\n const isSupported = ref.current && ref.current.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener: EventHandler<TEventName> = (event) => {\n if (savedHandler.current) {\n return savedHandler.current(event);\n }\n };\n\n // Add event listener\n if (!ref.current) {\n return;\n }\n\n const element = ref.current;\n element.addEventListener(eventName, eventListener);\n\n // Remove event listener on cleanup\n return () => {\n if (element) {\n element.removeEventListener(eventName, eventListener);\n }\n };\n }, [eventName, ref]); // Re-run if eventName or element changes\n};\n","import { RefObject, useCallback, useEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useElementFocus = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [isInFocus, setIsInFocus, setIsNotInFocus] = useBoolean(false);\n\n useEffect(() => {\n if (document.activeElement === ReactDOM.findDOMNode(ref.current)) {\n setIsInFocus();\n } else {\n setIsNotInFocus();\n }\n }, [ref, setIsNotInFocus, setIsInFocus]);\n\n useEventListener(ref, \"focus\", setIsInFocus);\n useEventListener(ref, \"blur\", setIsNotInFocus);\n\n const focus = useCallback(() => {\n if (ref.current) {\n ref.current.focus();\n }\n }, [ref]);\n\n const blur = useCallback(() => {\n if (ref.current) {\n ref.current.blur();\n }\n }, [ref]);\n\n return { isInFocus, focus, blur };\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsOver = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsOver, setMouseIsOver, setMouseIsNotOver] = useBoolean(false);\n\n useEventListener(ref, \"mouseover\", setMouseIsOver);\n useEventListener(ref, \"mouseout\", setMouseIsNotOver);\n\n return mouseIsOver;\n};\n","import { RefObject } from \"react\";\nimport { useBoolean } from \"./UseBoolean\";\nimport { useEventListener } from \"./UseEventListener\";\n\nexport const useMouseIsEntered = <TElement extends HTMLElement>(\n ref: RefObject<TElement>\n) => {\n const [mouseIsEntered, setMouseIsEntered, setMouseIsNotEntered] =\n useBoolean(false);\n\n useEventListener(ref, \"mouseenter\", setMouseIsEntered);\n useEventListener(ref, \"mouseleave\", setMouseIsNotEntered);\n\n return mouseIsEntered;\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useMultiOnClickOutside = (\n refs: Array<React.RefObject<any>>,\n handler: (event: TouchEvent | MouseEvent) => void\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n\n const allNotContains = refs\n .filter((ref) => ref.current)\n .every((ref) => {\n return ref.current && !ref.current.contains(event.target);\n });\n\n if (!allNotContains) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs]);\n};\n","import * as React from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useOnClickOutside = (\n ref: React.RefObject<any>,\n handler: (event: TouchEvent | MouseEvent) => void,\n options?: AddEventListenerOptions\n) => {\n const eventHandler = useRef<(event: TouchEvent | MouseEvent) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = handler;\n }, [handler]);\n\n useEffect(() => {\n const listener = (event: TouchEvent | MouseEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n\n eventHandler.current(event);\n };\n\n document.addEventListener(\"mousedown\", listener, options);\n document.addEventListener(\"touchstart\", listener, options);\n\n return () => {\n document.removeEventListener(\"mousedown\", listener, options);\n document.removeEventListener(\"touchstart\", listener, options);\n };\n }, [ref, options]);\n};\n","import { debounce } from \"lodash-es\";\nimport { useEffect, useRef } from \"react\";\n\nconst events = [\"mousemove\", \"mousedown\", \"keydown\", \"touchstart\", \"scroll\"];\n\nexport const useOnNoMouseMovement = (callback: () => void, delay: number) => {\n const eventHandler = useRef<(event: Event) => void>(() => {\n return;\n });\n\n useEffect(() => {\n eventHandler.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const onIdleChange = debounce(eventHandler.current, delay);\n events.forEach((event) => window.addEventListener(event, onIdleChange));\n\n return () => {\n events.forEach((event) =>\n window.removeEventListener(event, onIdleChange)\n );\n };\n }, [delay]);\n};\n","import { RefObject, useEffect, useMemo, useState } from \"react\";\n\nexport const useOnScreen = (\n ref: RefObject<Element>,\n options?: IntersectionObserverInit\n) => {\n const [isVisible, setIsVisible] = useState(false);\n\n const { rootMargin, root, threshold } = options || {};\n\n const observer = useMemo(() => {\n return new IntersectionObserver(\n ([entry]) => setIsVisible(entry.isIntersecting),\n {\n rootMargin,\n root,\n threshold,\n }\n );\n }, [setIsVisible, rootMargin, root, threshold]);\n\n useEffect(() => {\n if (ref.current) {\n observer.observe(ref.current);\n }\n return () => {\n observer.disconnect();\n };\n }, [observer, ref]);\n\n return isVisible;\n};\n","import {\n MutableRefObject,\n RefCallback,\n RefObject,\n useEffect,\n useRef,\n} from \"react\";\n\nexport const useForwardedRef = <T>(\n ref: RefCallback<T> | MutableRefObject<T> | null\n): RefObject<NonNullable<T>> => {\n const innerRef = useRef<T>(null) as MutableRefObject<NonNullable<T>>;\n\n useEffect(() => {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(innerRef.current);\n } else {\n ref.current = innerRef.current;\n }\n });\n\n return innerRef;\n};\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const useTimeoutState = <S>(\n initialValue: S,\n defaultTimeout: number,\n clearTimeoutOnSetValue = true\n): [S, (v: S) => void] => {\n const [value, setValue] = useState<S>(initialValue);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const wrappedSetter = useCallback(\n (newValue: S, timeout = defaultTimeout) => {\n setValue(newValue);\n if (clearTimeoutOnSetValue) {\n clearTimeout(timeoutRef.current!);\n }\n timeoutRef.current = setTimeout(() => setValue(initialValue), timeout);\n },\n [defaultTimeout, clearTimeoutOnSetValue, initialValue]\n );\n\n useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current!);\n };\n }, []);\n\n return [value, wrappedSetter];\n};\n","export const exhaustSwitchCaseElseThrow = (arg: never) => {\n throw new Error(`Switch unhandled case: ${arg}`);\n};\n\nexport const exhaustSwitchCase = <T>(_arg: never, fallback: T) => {\n return fallback;\n};\n","export const truthyKeysAsList = (r: Record<string, boolean>): Array<string> =>\n Object.keys(r).filter((key) => r[key]);\n","export const parseFloatElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseFloat(s);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n\nexport const parseIntElseUndefined = (s: string): number | undefined => {\n try {\n const f = parseInt(s, 10);\n if (isNaN(f)) {\n return undefined;\n }\n if (f == null) {\n return undefined;\n }\n return f;\n } catch (e) {}\n return undefined;\n};\n"],"names":["SeparatorLine","forwardRef","color","cssColor","size","width","vertical","ref","jsx","styles","ClickableElement","styled","background","pointer","props","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","opacityOnHover","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","numberToMetricCalc","booleanOrNumberToMetricCalc","shadows","excludedProps","isExcludedWebUiProp","propName","box","system","row","value","Box","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","bottom","hoverBorder","focusBorder","focusWithinBackground","focusWithinBorder","Column","getDimensionObject","node","x","y","isEqualDimensions","a","b","useElementDimensions","onResizeElement","dimensions","setDimensions","useState","updateDimensions","useCallback","newDimensions","useLayoutEffect","ResizeAwareBox","onResize","boxProps","localRef","useRef","Row","Indent","Spacing","InnerSpace","Space","half","horizontal","Nest","nest","render","Fragment","getDataProps","pickBy","isDataPropMapper","_","key","isDataProp","ScreenReaderOnlyText","Text","variant","className","userSelect","whiteSpace","wordBreak","textAlign","style","spanProps","cx","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","HeaderText","defaultComparator","useArraySet","list","setList","comparator","add","item","l","addMultiple","items","remove","index","i","removeMultiple","toggle","useBoolean","initialValue","setValue","setTrue","setFalse","v","useDebounce","delay","debouncedValue","setDebouncedValue","useEffect","handler","useDelayedFalse","id","genId","componentName","useDomId","setId","useEventListener","eventName","savedHandler","eventListener","event","element","useElementFocus","isInFocus","setIsInFocus","setIsNotInFocus","ReactDOM","focus","blur","useMouseIsOver","mouseIsOver","setMouseIsOver","setMouseIsNotOver","useMouseIsEntered","mouseIsEntered","setMouseIsEntered","setMouseIsNotEntered","useMultiOnClickOutside","refs","eventHandler","listener","useOnClickOutside","options","events","useOnNoMouseMovement","callback","onIdleChange","debounce","useOnScreen","isVisible","setIsVisible","rootMargin","root","threshold","observer","useMemo","entry","useForwardedRef","innerRef","useTimeoutState","defaultTimeout","clearTimeoutOnSetValue","timeoutRef","wrappedSetter","newValue","timeout","exhaustSwitchCaseElseThrow","arg","exhaustSwitchCase","_arg","fallback","truthyKeysAsList","r","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":"qpBAaaA,EAAgBC,EAAA,WAC3B,CACE,CACE,MAAAC,EAAQC,WAAS,qBAAqB,EACtC,KAAAC,EAAO,OACP,MAAAC,EAAQ,MACR,SAAAC,EAAW,IAEbC,IAGEC,EAAA,IAAC,KAAA,CACC,UAAWC,EAAO,cAClB,cAAa,GACb,MAAAP,EACA,MAAO,CACL,gB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EAAIoM,EAAS,OAAO,EAEpBpM,EAAI,QAAUoM,EAAS,QACzB,CACD,EAEMA,CACT,ECrBaC,GAAkB,CAC7B5D,EACA6D,EACAC,EAAyB,KACD,CACxB,KAAM,CAACnK,EAAOsG,CAAQ,EAAIjE,WAAYgE,CAAY,EAC5C+D,EAAatH,EAAAA,SAEbuH,EAAgB9H,EAAA,YACpB,CAAC+H,EAAaC,EAAUL,IAAmB,CACzC5D,EAASgE,CAAQ,EACbH,GACF,aAAaC,EAAW,OAAQ,EAElCA,EAAW,QAAU,WAAW,IAAM9D,EAASD,CAAY,EAAGkE,CAAO,CACvE,EACA,CAACL,EAAgBC,EAAwB9D,CAAY,CAAA,EAGvDS,OAAAA,EAAAA,UAAU,IACD,IAAM,CACX,aAAasD,EAAW,OAAQ,CAAA,EAEjC,CAAE,CAAA,EAEE,CAACpK,EAAOqK,CAAa,CAC9B,EC5BaG,GAA8BC,GAAe,CACxD,MAAM,IAAI,MAAM,0BAA0BA,CAAG,EAAE,CACjD,EAEaC,GAAoB,CAAIC,EAAaC,IACzCA,ECLIC,GAAoBC,GAC/B,OAAO,KAAKA,CAAC,EAAE,OAAQhH,GAAQgH,EAAEhH,CAAG,CAAC,ECD1BiH,GAA2BC,GAAkC,CACpE,GAAA,CACI,MAAAC,EAAI,WAAWD,CAAC,EAItB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,OACG,CAAC,CAEf,EAEaC,GAAyBF,GAAkC,CAClE,GAAA,CACI,MAAAC,EAAI,SAASD,EAAG,EAAE,EAIxB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,OACG,CAAC,CAEf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/core",
|
|
3
|
-
"version": "20.6.
|
|
3
|
+
"version": "20.6.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "mattias800",
|
|
@@ -33,12 +33,11 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@emotion/react": ">=11.1.5",
|
|
35
35
|
"@emotion/styled": ">=11.3.0",
|
|
36
|
-
"@types/lodash": ">=4.
|
|
36
|
+
"@types/lodash-es": ">=4.17.12",
|
|
37
37
|
"@types/react": ">=18.0.14",
|
|
38
38
|
"@types/react-dom": ">=18.0.5",
|
|
39
39
|
"@types/styled-system": ">=5.1.10",
|
|
40
40
|
"csstype": ">=3.0.8",
|
|
41
|
-
"lodash": ">=4.17.21",
|
|
42
41
|
"prop-types": ">=15.5.4",
|
|
43
42
|
"react": ">=18.2.0",
|
|
44
43
|
"react-dom": ">=18.2.0",
|
|
@@ -49,12 +48,11 @@
|
|
|
49
48
|
"@emotion/styled": "^11.3.0",
|
|
50
49
|
"@testing-library/react-hooks": "^2.0.1",
|
|
51
50
|
"@types/jest": "^23.1.5",
|
|
52
|
-
"@types/lodash": "^4.
|
|
51
|
+
"@types/lodash-es": "^4.17.12",
|
|
53
52
|
"@types/react": "^18.0.14",
|
|
54
53
|
"@types/react-dom": "^18.0.5",
|
|
55
54
|
"@types/styled-system": "^5.1.10",
|
|
56
55
|
"csstype": "^3.0.8",
|
|
57
|
-
"lodash": "^4.17.21",
|
|
58
56
|
"prop-types": "^15.5.4",
|
|
59
57
|
"react": "^18.2.0",
|
|
60
58
|
"react-dom": "^18.2.0",
|
|
@@ -64,10 +62,11 @@
|
|
|
64
62
|
"files": [
|
|
65
63
|
"dist"
|
|
66
64
|
],
|
|
67
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c47927fdd399e3fc8e9546dbb58eb62abb6a8621",
|
|
68
66
|
"dependencies": {
|
|
69
67
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
70
|
-
"@stenajs-webui/theme": "20.6.
|
|
71
|
-
"classnames": "^2.3.1"
|
|
68
|
+
"@stenajs-webui/theme": "20.6.6",
|
|
69
|
+
"classnames": "^2.3.1",
|
|
70
|
+
"lodash-es": "^4.17.21"
|
|
72
71
|
}
|
|
73
72
|
}
|