@stenajs-webui/core 19.0.0-next.7 → 19.0.0-next.8
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/components/layout/box/Box.d.ts +1 -0
- package/dist/index.es.js +37 -36
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "@stenajs-webui/theme";
|
|
3
3
|
import _ from "@emotion/styled";
|
|
4
4
|
import { forwardRef as p, useState as f, useCallback as h, useLayoutEffect as L, useRef as w, useEffect as m, useMemo as z } from "react";
|
|
5
|
-
import { jsx as
|
|
5
|
+
import { jsx as d, Fragment as I } from "react/jsx-runtime";
|
|
6
6
|
import F from "@emotion/is-prop-valid";
|
|
7
7
|
import { system as R, background as H, border as N, borderRight as P, borderLeft as V, borderTop as A, borderBottom as j, borderColor as U, borderRadius as q, borderStyle as W, borderWidth as B, boxShadow as K, flexbox as G, overflow as J, position as Q, layout as X, zIndex as Y, left as Z, right as ee, top as te, bottom as ne } from "styled-system";
|
|
8
8
|
import T from "classnames";
|
|
@@ -21,7 +21,7 @@ const ce = _.hr`
|
|
|
21
21
|
size: t = "100%",
|
|
22
22
|
width: n = "1px",
|
|
23
23
|
vertical: r = !1
|
|
24
|
-
}, o) => /* @__PURE__ */
|
|
24
|
+
}, o) => /* @__PURE__ */ d(ce, {
|
|
25
25
|
color: e,
|
|
26
26
|
size: t,
|
|
27
27
|
width: n,
|
|
@@ -78,12 +78,12 @@ const ce = _.hr`
|
|
|
78
78
|
opacityOnHover: c,
|
|
79
79
|
disabled: i,
|
|
80
80
|
children: u,
|
|
81
|
-
background:
|
|
81
|
+
background: a = "transparent",
|
|
82
82
|
hoverBackground: l,
|
|
83
83
|
focusBackground: g,
|
|
84
84
|
type: M = "button",
|
|
85
85
|
...O
|
|
86
|
-
}, k) => /* @__PURE__ */
|
|
86
|
+
}, k) => /* @__PURE__ */ d(ue, {
|
|
87
87
|
opacityOnHover: c,
|
|
88
88
|
title: r,
|
|
89
89
|
disabled: i,
|
|
@@ -93,7 +93,7 @@ const ce = _.hr`
|
|
|
93
93
|
disableFocusHighlight: e,
|
|
94
94
|
pointer: !!(t || n) && !s,
|
|
95
95
|
ref: k,
|
|
96
|
-
background:
|
|
96
|
+
background: a,
|
|
97
97
|
hoverBackground: l,
|
|
98
98
|
focusBackground: g,
|
|
99
99
|
type: M,
|
|
@@ -102,8 +102,9 @@ const ce = _.hr`
|
|
|
102
102
|
})), x = (e) => e == null ? 0 : typeof e == "boolean" ? e ? 1 : 0 : e, ie = {
|
|
103
103
|
box: "var(--swui-shadow-box)",
|
|
104
104
|
popover: "var(--swui-shadow-popover)",
|
|
105
|
-
modal: "var(--swui-shadow-modal)"
|
|
106
|
-
|
|
105
|
+
modal: "var(--swui-shadow-modal)",
|
|
106
|
+
bottom: "var(--swui-shadow-bottom)"
|
|
107
|
+
}, ae = ["spacing", "indent", "gap", "width", "height", "overflow", "display"], de = (e) => ae.includes(e), le = R({
|
|
107
108
|
row: {
|
|
108
109
|
property: "flexDirection",
|
|
109
110
|
transform: (e) => e ? "row" : "column"
|
|
@@ -128,7 +129,7 @@ const ce = _.hr`
|
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
}), b = _("div", {
|
|
131
|
-
shouldForwardProp: (e) => typeof e == "string" ?
|
|
132
|
+
shouldForwardProp: (e) => typeof e == "string" ? de(e) ? !1 : F(e) : !1
|
|
132
133
|
})`
|
|
133
134
|
--current-spacing: 0;
|
|
134
135
|
--current-indent: 0;
|
|
@@ -187,7 +188,7 @@ const ce = _.hr`
|
|
|
187
188
|
}) => e ? `border: ${e};` : ""}
|
|
188
189
|
}
|
|
189
190
|
`, Ge = p(function(t, n) {
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ d(b, {
|
|
191
192
|
ref: n,
|
|
192
193
|
...t
|
|
193
194
|
});
|
|
@@ -222,12 +223,12 @@ const ce = _.hr`
|
|
|
222
223
|
...n
|
|
223
224
|
}, r) {
|
|
224
225
|
const o = w(null), s = r != null ? r : o;
|
|
225
|
-
return pe(s, t), /* @__PURE__ */
|
|
226
|
+
return pe(s, t), /* @__PURE__ */ d(b, {
|
|
226
227
|
...n,
|
|
227
228
|
ref: r
|
|
228
229
|
});
|
|
229
230
|
}), Qe = p(function(t, n) {
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ d(b, {
|
|
231
232
|
row: !0,
|
|
232
233
|
ref: n,
|
|
233
234
|
...t
|
|
@@ -236,7 +237,7 @@ const ce = _.hr`
|
|
|
236
237
|
num: t = 1,
|
|
237
238
|
...n
|
|
238
239
|
}, r) {
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ d(b, {
|
|
240
241
|
indent: t,
|
|
241
242
|
ref: r,
|
|
242
243
|
...n
|
|
@@ -245,7 +246,7 @@ const ce = _.hr`
|
|
|
245
246
|
num: t = 1,
|
|
246
247
|
...n
|
|
247
248
|
}, r) {
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ d(b, {
|
|
249
250
|
spacing: t,
|
|
250
251
|
ref: r,
|
|
251
252
|
...n
|
|
@@ -262,7 +263,7 @@ const ce = _.hr`
|
|
|
262
263
|
vertical: r = !1
|
|
263
264
|
}) => {
|
|
264
265
|
const o = n * (e ? 0.5 : 1);
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ d(fe, {
|
|
266
267
|
style: {
|
|
267
268
|
["--current-size"]: o,
|
|
268
269
|
height: t ? 1 : void 0,
|
|
@@ -273,9 +274,9 @@ const ce = _.hr`
|
|
|
273
274
|
children: e,
|
|
274
275
|
nest: t,
|
|
275
276
|
render: n
|
|
276
|
-
}) => t ? /* @__PURE__ */
|
|
277
|
+
}) => t ? /* @__PURE__ */ d(I, {
|
|
277
278
|
children: n(e)
|
|
278
|
-
}) : /* @__PURE__ */
|
|
279
|
+
}) : /* @__PURE__ */ d(I, {
|
|
279
280
|
children: e
|
|
280
281
|
}), we = "_text_1iisw_1", ve = "_standard_1iisw_24", ge = "_bold_1iisw_27", be = "_caption_1iisw_31", $e = "_overline_1iisw_39", _e = "_large_1iisw_48", xe = "_medium_1iisw_53", ye = "_small_1iisw_58", Ee = "_smaller_1iisw_63", y = {
|
|
281
282
|
text: we,
|
|
@@ -297,8 +298,8 @@ const ce = _.hr`
|
|
|
297
298
|
whiteSpace: c,
|
|
298
299
|
wordBreak: i,
|
|
299
300
|
style: u,
|
|
300
|
-
...
|
|
301
|
-
}, l) => /* @__PURE__ */
|
|
301
|
+
...a
|
|
302
|
+
}, l) => /* @__PURE__ */ d("span", {
|
|
302
303
|
className: T(y.text, y[t], y[n], r),
|
|
303
304
|
ref: l,
|
|
304
305
|
style: {
|
|
@@ -308,18 +309,18 @@ const ce = _.hr`
|
|
|
308
309
|
wordBreak: i,
|
|
309
310
|
...u
|
|
310
311
|
},
|
|
311
|
-
...
|
|
312
|
+
...a,
|
|
312
313
|
children: e
|
|
313
|
-
})), tt = $, nt = (e) => /* @__PURE__ */
|
|
314
|
+
})), tt = $, nt = (e) => /* @__PURE__ */ d($, {
|
|
314
315
|
size: "small",
|
|
315
316
|
...e
|
|
316
|
-
}), rt = (e) => /* @__PURE__ */
|
|
317
|
+
}), rt = (e) => /* @__PURE__ */ d($, {
|
|
317
318
|
size: "smaller",
|
|
318
319
|
...e
|
|
319
|
-
}), ot = (e) => /* @__PURE__ */
|
|
320
|
+
}), ot = (e) => /* @__PURE__ */ d($, {
|
|
320
321
|
size: "medium",
|
|
321
322
|
...e
|
|
322
|
-
}), st = (e) => /* @__PURE__ */
|
|
323
|
+
}), st = (e) => /* @__PURE__ */ d($, {
|
|
323
324
|
size: "large",
|
|
324
325
|
...e
|
|
325
326
|
}), Ie = "_heading_1us7p_1", Se = "_h1_1us7p_14", Ce = "_h2_1us7p_19", De = "_h3_1us7p_24", Te = "_h4_1us7p_29", Me = "_h5_1us7p_34", Oe = "_h6_1us7p_39", S = {
|
|
@@ -340,9 +341,9 @@ const ce = _.hr`
|
|
|
340
341
|
children: c,
|
|
341
342
|
as: i,
|
|
342
343
|
...u
|
|
343
|
-
},
|
|
344
|
+
}, a) => {
|
|
344
345
|
const l = i != null ? i : e;
|
|
345
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ d(l, {
|
|
346
347
|
className: T(S.heading, S[e], t),
|
|
347
348
|
style: {
|
|
348
349
|
color: n,
|
|
@@ -350,35 +351,35 @@ const ce = _.hr`
|
|
|
350
351
|
wordBreak: o,
|
|
351
352
|
...s
|
|
352
353
|
},
|
|
353
|
-
ref:
|
|
354
|
+
ref: a,
|
|
354
355
|
...u,
|
|
355
356
|
children: c
|
|
356
357
|
});
|
|
357
|
-
}), ct = (e) => /* @__PURE__ */
|
|
358
|
+
}), ct = (e) => /* @__PURE__ */ d(ke, {
|
|
358
359
|
variant: "h2",
|
|
359
360
|
...e
|
|
360
361
|
}), Le = (e, t) => e === t, ut = (e, t, n = Le) => {
|
|
361
362
|
const r = h(
|
|
362
363
|
(u) => {
|
|
363
|
-
e.some((
|
|
364
|
+
e.some((a) => n(a, u)) || t([...e, u]);
|
|
364
365
|
},
|
|
365
366
|
[e, t, n]
|
|
366
367
|
), o = h(
|
|
367
368
|
(u) => {
|
|
368
369
|
t(
|
|
369
|
-
u.reduce((
|
|
370
|
+
u.reduce((a, l) => a.some((g) => n(g, l)) ? a : [...a, l], e)
|
|
370
371
|
);
|
|
371
372
|
},
|
|
372
373
|
[e, t, n]
|
|
373
374
|
), s = h(
|
|
374
375
|
(u) => {
|
|
375
|
-
const
|
|
376
|
-
|
|
376
|
+
const a = e.findIndex((l) => n(l, u));
|
|
377
|
+
a >= 0 && t(e.filter((l, g) => g !== a));
|
|
377
378
|
},
|
|
378
379
|
[e, t, n]
|
|
379
380
|
), c = h(
|
|
380
381
|
(u) => {
|
|
381
|
-
t(e.filter((
|
|
382
|
+
t(e.filter((a) => !u.some((l) => n(l, a))));
|
|
382
383
|
},
|
|
383
384
|
[e, t, n]
|
|
384
385
|
), i = h(
|
|
@@ -413,7 +414,7 @@ const ce = _.hr`
|
|
|
413
414
|
clearTimeout(o);
|
|
414
415
|
};
|
|
415
416
|
}, [e, t]), n;
|
|
416
|
-
},
|
|
417
|
+
}, at = (e, t) => {
|
|
417
418
|
const [n, r] = f(e);
|
|
418
419
|
return m(() => {
|
|
419
420
|
e && r(!0);
|
|
@@ -426,7 +427,7 @@ const ce = _.hr`
|
|
|
426
427
|
}, [e, t]), n;
|
|
427
428
|
};
|
|
428
429
|
let ze = 0;
|
|
429
|
-
const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`,
|
|
430
|
+
const C = (e) => `webui-${e ? e + "-" : ""}${++ze}`, dt = (e) => {
|
|
430
431
|
const [t, n] = f(() => C(e));
|
|
431
432
|
return m(() => n(C(e)), [e]), t;
|
|
432
433
|
}, v = (e, t, n) => {
|
|
@@ -575,8 +576,8 @@ export {
|
|
|
575
576
|
ut as useArraySet,
|
|
576
577
|
E as useBoolean,
|
|
577
578
|
it as useDebounce,
|
|
578
|
-
|
|
579
|
-
|
|
579
|
+
at as useDelayedFalse,
|
|
580
|
+
dt as useDomId,
|
|
580
581
|
pe as useElementDimensions,
|
|
581
582
|
lt as useElementFocus,
|
|
582
583
|
v as useEventListener,
|
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/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/PropsForwarder.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = \"var(--lhds-color-ui-300)\",\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n color={color}\n size={size}\n width={width}\n vertical={vertical}\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","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 { booleanOrNumberToNumber } 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};\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 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 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 :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\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 * 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 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 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={{ color, userSelect, whiteSpace, wordBreak, ...style }}\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\";\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","import { pickBy } from \"lodash\";\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","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":["SeparatorLineComponent","styled","hr","props","color","vertical","size","width","SeparatorLine","forwardRef","ref","ClickableElement","button","background","pointer","opacityOnHover","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","disabled","children","type","restProps","booleanOrNumberToNumber","num","shadows","box","popover","modal","excludedProps","isExcludedWebUiProp","propName","includes","system","row","property","transform","indent","spacing","gap","shadow","value","Box","shouldForwardProp","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","currentRef","Row","Indent","Spacing","InnerSpace","div","Space","half","horizontal","undefined","Nest","nest","render","_Fragment","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","styles","text","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","heading","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","key","getDataProps","pickBy","isDataPropMapper","isDataProp","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;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AAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;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/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/PropsForwarder.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = \"var(--lhds-color-ui-300)\",\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n color={color}\n size={size}\n width={width}\n vertical={vertical}\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","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 { booleanOrNumberToNumber } 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 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 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 :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\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 * 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 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 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={{ color, userSelect, whiteSpace, wordBreak, ...style }}\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\";\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","import { pickBy } from \"lodash\";\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","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":["SeparatorLineComponent","styled","hr","props","color","vertical","size","width","SeparatorLine","forwardRef","ref","ClickableElement","button","background","pointer","opacityOnHover","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","disabled","children","type","restProps","booleanOrNumberToNumber","num","shadows","box","popover","modal","bottom","excludedProps","isExcludedWebUiProp","propName","includes","system","row","property","transform","indent","spacing","gap","shadow","value","Box","shouldForwardProp","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","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","currentRef","Row","Indent","Spacing","InnerSpace","div","Space","half","horizontal","undefined","Nest","nest","render","_Fragment","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","styles","text","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","heading","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","key","getDataProps","pickBy","isDataPropMapper","isDataProp","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":";;;;;;;;;AAmBA,MAAMA,KAAyBC,EAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,sBAKfC,OAAUA,EAAMC;AAAAA,YAC1BD,OACTA,EAAME,WAAWF,EAAMG,QAAQ,SAASH,EAAMI,SAAS;AAAA,WAC/CJ,OACRA,EAAME,WAAWF,EAAMI,SAAS,QAAQJ,EAAMG,QAAQ;AAAA,GAG7CE,KAAgBC,EAC3B,CACE;AAAA,EACEL,OAAAA,IAAQ;AAAA,EACRE,MAAAA,IAAO;AAAA,EACPC,OAAAA,IAAQ;AAAA,EACRF,UAAAA,IAAW;AAJb,GAMAK,wBAGGV,IAAD;AAAA,EACE,OAAAI;AAAA,EACA,MAAAE;AAAA,EACA,OAAAC;AAAA,EACA,UAAAF;AAAA,EACA,KAAAK;AAAA,CANJ,CAVmC,GCgCjCC,KAAmBV,EAAOW;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKhB,CAAC;AAAA,EAAEC,YAAAA;AAAF,MAAmBA;AAAAA,IAChC,CAAC;AAAA,EAAEC,SAAAA;AAAF,MAAiBA,IAAU,qBAAqB;AAAA;AAAA;AAAA,MAG9CX,CAAAA,MAAWA,EAAMY,iBAAiB,kBAAkB;AAAA,MACrD,CAAC;AAAA,EAAEC,iBAAAA;AAAF,MAAyB,eAAcA;AAAAA;AAAAA;AAAAA,MAGxC,CAAC;AAAA,EAA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,CAC1B9N,MACM+N,GAAO/N,GAAOgO,EAAgB,GAEhCA,KAAmB,CAAClF,GAAY+E,MAAyBI,GAAWJ,CAAG,GAEvEI,KAAa,CAAuB5L,MACxCA,EAAS,WAAW,OAAO,KAAKA,EAAS,WAAW,OAAO,GCThD6L,KAA0B,CAACC,MAAkC;AACpE,MAAA;AACI,UAAAC,IAAI,WAAWD,CAAC;AAItB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf,GAEaC,KAAwB,CAACF,MAAkC;AAClE,MAAA;AACI,UAAAC,IAAI,SAASD,GAAG,EAAE;AAIxB,WAHI,MAAMC,CAAC,KAGPA,KAAK,OACA,SAEFA;AAAA;EACI;AAEf;"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._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_1us7p_1{--swui-heading-text-color: var(--swui-text-primary-color);--swui-heading-font-family: var(--swui-font-primary);--swui-heading-font-weight: var(--swui-font-weight-text-bold);font-size:var(--swui-heading-font-size);color:var(--swui-heading-text-color);letter-spacing:0;margin:0;line-height:var(--swui-heading-line-height);font-family:var(--swui-heading-font-family);font-weight:var(--swui-heading-font-weight)}._heading_1us7p_1._h1_1us7p_14{--swui-heading-font-size: 2.8rem;--swui-heading-line-height: 4rem}._heading_1us7p_1._h2_1us7p_19{--swui-heading-font-size: 2.4rem;--swui-heading-line-height: 3.2rem}._heading_1us7p_1._h3_1us7p_24{--swui-heading-font-size: 2rem;--swui-heading-line-height: 2.4rem}._heading_1us7p_1._h4_1us7p_29{--swui-heading-font-size: 1.8rem;--swui-heading-line-height: 2.4rem}._heading_1us7p_1._h5_1us7p_34{--swui-heading-font-size: 1.6rem;--swui-heading-line-height: 1.6rem}._heading_1us7p_1._h6_1us7p_39{--swui-heading-font-size: 1.4rem;--swui-heading-line-height: 1.6rem}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@stenajs-webui/theme");const L=require("@emotion/styled"),r=require("react"),l=require("react/jsx-runtime"),F=require("@emotion/is-prop-valid"),a=require("styled-system"),z=require("classnames"),N=require("react-dom"),C=require("lodash"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function P(e){if(e&&e.__esModule)return 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
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@stenajs-webui/theme");const L=require("@emotion/styled"),r=require("react"),l=require("react/jsx-runtime"),F=require("@emotion/is-prop-valid"),a=require("styled-system"),z=require("classnames"),N=require("react-dom"),C=require("lodash"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function P(e){if(e&&e.__esModule)return 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 v=$(L),q=$(F),I=$(z),H=P(N),A=v.default.hr`
|
|
3
3
|
display: flex;
|
|
4
4
|
border: 0;
|
|
5
5
|
margin: 0;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
background-color: ${e=>e.color};
|
|
8
8
|
height: ${e=>e.vertical?e.size||"100%":e.width||"1px"};
|
|
9
9
|
width: ${e=>e.vertical?e.width||"1px":e.size||"100%"};
|
|
10
|
-
`,V=r.forwardRef(({color:e="var(--lhds-color-ui-300)",size:t="100%",width:n="1px",vertical:s=!1},o)=>l.jsx(A,{color:e,size:t,width:n,vertical:s,ref:o})),U=
|
|
10
|
+
`,V=r.forwardRef(({color:e="var(--lhds-color-ui-300)",size:t="100%",width:n="1px",vertical:s=!1},o)=>l.jsx(A,{color:e,size:t,width:n,vertical:s,ref:o})),U=v.default.button`
|
|
11
11
|
display: inline-block;
|
|
12
12
|
user-select: none;
|
|
13
13
|
border: 0;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
${({width:e})=>e?`width: ${e};`:""}
|
|
31
31
|
${({height:e})=>e?`height: ${e};`:""}
|
|
32
32
|
${({borderRadius:e})=>e?`border-radius: ${e};`:""}
|
|
33
|
-
`,B=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:u,opacityOnHover:c,disabled:d,children:i,background:f="transparent",hoverBackground:m,focusBackground:
|
|
33
|
+
`,B=r.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:n,tooltip:s,disableOpacityOnClick:o,disablePointer:u,opacityOnHover:c,disabled:d,children:i,background:f="transparent",hoverBackground:m,focusBackground:p,type:T="button",...k},D)=>{const M=!!(t||n);return l.jsx(U,{opacityOnHover:c,title:s,disabled:d,disableOpacityOnClick:o,onClick:t,onDoubleClick:n,disableFocusHighlight:e,pointer:M&&!u,ref:D,background:f,hoverBackground:m,focusBackground:p,type:T,...k,children:i})}),g=e=>e==null?0:typeof e=="boolean"?e?1:0: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"],G=e=>W.includes(e),J=a.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},shadow:{property:"boxShadow",transform:e=>{var t;return(t=K[e])!=null?t:e}}}),b=v.default("div",{shouldForwardProp:e=>typeof e=="string"?G(e)?!1:q.default(e):!1})`
|
|
34
34
|
--current-spacing: 0;
|
|
35
35
|
--current-indent: 0;
|
|
36
36
|
--current-gap: 0;
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
${({focusWithinBackground:e})=>e?`background: ${e};`:""}
|
|
76
76
|
${({focusWithinBorder:e})=>e?`border: ${e};`:""}
|
|
77
77
|
}
|
|
78
|
-
`,Q=r.forwardRef(function(t,n){return l.jsx(b,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:s,height:o,bottom:u,top:c,left:d,right:i}=e.getBoundingClientRect();return{width:s,height:o,top:c,left:d,x:t,y:n,right:i,bottom:u}},X=(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,R=(e,t)=>{const[n,s]=r.useState(),o=r.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const u=O(e.current);(!n||!X(n,u))&&t&&t(u),s(u)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},Y=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null),u=s!=null?s:o;return R(u,t),l.jsx(b,{...n,ref:s})}),Z=r.forwardRef(function(t,n){return l.jsx(b,{row:!0,ref:n,...t})}),ee=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{indent:t,ref:s,...n})}),te=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{spacing:t,ref:s,...n})}),ne=
|
|
78
|
+
`,Q=r.forwardRef(function(t,n){return l.jsx(b,{ref:n,...t})}),O=e=>{const{x:t,y:n,width:s,height:o,bottom:u,top:c,left:d,right:i}=e.getBoundingClientRect();return{width:s,height:o,top:c,left:d,x:t,y:n,right:i,bottom:u}},X=(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,R=(e,t)=>{const[n,s]=r.useState(),o=r.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const u=O(e.current);(!n||!X(n,u))&&t&&t(u),s(u)}})},[e,n,s,t]);return r.useLayoutEffect(()=>{o()},[o]),{dimensions:n}},Y=r.forwardRef(function({onResize:t,...n},s){const o=r.useRef(null),u=s!=null?s:o;return R(u,t),l.jsx(b,{...n,ref:s})}),Z=r.forwardRef(function(t,n){return l.jsx(b,{row:!0,ref:n,...t})}),ee=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{indent:t,ref:s,...n})}),te=r.forwardRef(function({num:t=1,...n},s){return l.jsx(b,{spacing:t,ref:s,...n})}),ne=v.default.div`
|
|
79
79
|
--current-size: 1;
|
|
80
80
|
flex: none;
|
|
81
81
|
width: calc(var(--current-size) * var(--swui-metrics-space));
|
|
82
82
|
height: calc(var(--current-size) * var(--swui-metrics-space));
|
|
83
|
-
`,se=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return l.jsx(ne,{style:{["--current-size"]:o,height:t?1:void 0,width:s?1:void 0}})},re=({children:e,nest:t,render:n})=>t?l.jsx(l.Fragment,{children:n(e)}):l.jsx(l.Fragment,{children:e}),oe="_text_1iisw_1",ue="_standard_1iisw_24",ce="_bold_1iisw_27",ie="_caption_1iisw_31",ae="_overline_1iisw_39",de="_large_1iisw_48",le="_medium_1iisw_53",fe="_small_1iisw_58",me="_smaller_1iisw_63",_={text:oe,standard:ue,bold:ce,caption:ie,overline:ae,large:de,medium:le,small:fe,smaller:me},
|
|
83
|
+
`,se=({half:e=!1,horizontal:t=!1,num:n=1,vertical:s=!1})=>{const o=n*(e?.5:1);return l.jsx(ne,{style:{["--current-size"]:o,height:t?1:void 0,width:s?1:void 0}})},re=({children:e,nest:t,render:n})=>t?l.jsx(l.Fragment,{children:n(e)}):l.jsx(l.Fragment,{children:e}),oe="_text_1iisw_1",ue="_standard_1iisw_24",ce="_bold_1iisw_27",ie="_caption_1iisw_31",ae="_overline_1iisw_39",de="_large_1iisw_48",le="_medium_1iisw_53",fe="_small_1iisw_58",me="_smaller_1iisw_63",_={text:oe,standard:ue,bold:ce,caption:ie,overline:ae,large:de,medium:le,small:fe,smaller:me},w=r.forwardRef(({children:e,variant:t="standard",size:n="medium",className:s,color:o,userSelect:u,whiteSpace:c,wordBreak:d,style:i,...f},m)=>l.jsx("span",{className:I.default(_.text,_[t],_[n],s),ref:m,style:{color:o,userSelect:u,whiteSpace:c,wordBreak:d,...i},...f,children:e})),he=w,be=e=>l.jsx(w,{size:"small",...e}),we=e=>l.jsx(w,{size:"smaller",...e}),pe=e=>l.jsx(w,{size:"medium",...e}),ge=e=>l.jsx(w,{size:"large",...e}),ve="_heading_1us7p_1",xe="_h1_1us7p_14",_e="_h2_1us7p_19",$e="_h3_1us7p_24",Ee="_h4_1us7p_29",ye="_h5_1us7p_34",Se="_h6_1us7p_39",E={heading:ve,h1:xe,h2:_e,h3:$e,h4:Ee,h5:ye,h6:Se},j=r.forwardRef(({variant:e="h3",className:t,color:n,whiteSpace:s,wordBreak:o,style:u,children:c,as:d,...i},f)=>{const m=d!=null?d:e;return l.jsx(m,{className:I.default(E.heading,E[e],t),style:{color:n,whiteSpace:s,wordBreak:o,...u},ref:f,...i,children:c})}),Ce=e=>l.jsx(j,{variant:"h2",...e}),Ie=(e,t)=>e===t,Oe=(e,t,n=Ie)=>{const s=r.useCallback(i=>{e.some(f=>n(f,i))||t([...e,i])},[e,t,n]),o=r.useCallback(i=>{t(i.reduce((f,m)=>f.some(p=>n(p,m))?f:[...f,m],e))},[e,t,n]),u=r.useCallback(i=>{const f=e.findIndex(m=>n(m,i));f>=0&&t(e.filter((m,p)=>p!==f))},[e,t,n]),c=r.useCallback(i=>{t(e.filter(f=>!i.some(m=>n(m,f))))},[e,t,n]),d=r.useCallback(i=>{e.some(m=>n(m,i))?u(i):s(i)},[e,s,u,n]);return{add:s,addMultiple:o,remove:u,removeMultiple:c,toggle:d}},x=e=>{const[t,n]=r.useState(e),s=r.useCallback(()=>{n(!0)},[n]),o=r.useCallback(()=>{n(!1)},[n]),u=r.useCallback(()=>{n(c=>!c)},[n]);return[t,s,o,u]},Re=(e,t)=>{const[n,s]=r.useState(e);return r.useEffect(()=>{const o=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},je=(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 Te=0;const y=e=>`webui-${e?e+"-":""}${++Te}`,ke=e=>{const[t,n]=r.useState(()=>y(e));return r.useEffect(()=>n(y(e)),[e]),t},h=(e,t,n)=>{const s=r.useRef();r.useEffect(()=>{s.current=n},[n]),r.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const u=d=>{if(s.current)return s.current(d)};if(!e.current)return;const c=e.current;return c.addEventListener(t,u),()=>{c&&c.removeEventListener(t,u)}},[t,e])},De=e=>{const[t,n,s]=x(!1);r.useEffect(()=>{document.activeElement===H.findDOMNode(e.current)?n():s()},[e,s,n]),h(e,"focus",n),h(e,"blur",s);const o=r.useCallback(()=>{e.current&&e.current.focus()},[e]),u=r.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:o,blur:u}},Me=e=>{const[t,n,s]=x(!1);return h(e,"mouseover",n),h(e,"mouseout",s),t},Le=e=>{const[t,n,s]=x(!1);return h(e,"mouseenter",n),h(e,"mouseleave",s),t},Fe=(e,t)=>{const n=r.useRef(()=>{});r.useEffect(()=>{n.current=t},[t]),r.useEffect(()=>{const s=o=>{!e.filter(c=>c.current).every(c=>c.current&&!c.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])},ze=(e,t,n)=>{const s=r.useRef(()=>{});r.useEffect(()=>{s.current=t},[t]),r.useEffect(()=>{const o=u=>{!e.current||e.current.contains(u.target)||s.current(u)};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"],Ne=(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])},Pe=(e,t)=>{const[n,s]=r.useState(!1),{rootMargin:o,root:u,threshold:c}=t||{},d=r.useMemo(()=>new IntersectionObserver(([i])=>s(i.isIntersecting),{rootMargin:o,root:u,threshold:c}),[s,o,u,c]);return r.useEffect(()=>(e.current&&d.observe(e.current),()=>{d.disconnect()}),[d,e]),n},qe=e=>{const t=r.useRef(null);return r.useEffect(()=>{!e||(typeof e=="function"?e(t.current):e.current=t.current)}),t},He=(e,t,n=!0)=>{const[s,o]=r.useState(e),u=r.useRef(),c=r.useCallback((d,i=t)=>{o(d),n&&clearTimeout(u.current),u.current=setTimeout(()=>o(e),i)},[t,n,e]);return r.useEffect(()=>()=>{clearTimeout(u.current)},[]),[s,c]},Ae=e=>{throw new Error(`Switch unhandled case: ${e}`)},Ve=(e,t)=>t,Ue=e=>Object.keys(e).filter(t=>e[t]),Be=e=>C.pickBy(e,Ke),Ke=(e,t)=>We(t),We=e=>e.startsWith("data-")||e.startsWith("aria-"),Ge=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},Je=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};exports.Box=b;exports.Clickable=B;exports.Column=Q;exports.HeaderText=Ce;exports.Heading=j;exports.Indent=ee;exports.LargeText=ge;exports.Nest=re;exports.ResizeAwareBox=Y;exports.Row=Z;exports.SeparatorLine=V;exports.SmallText=be;exports.SmallerText=we;exports.Space=se;exports.Spacing=te;exports.StandardText=pe;exports.Text=w;exports.Txt=he;exports.booleanOrNumberToNumber=g;exports.exhaustSwitchCase=Ve;exports.exhaustSwitchCaseElseThrow=Ae;exports.getDataProps=Be;exports.getDimensionObject=O;exports.parseFloatElseUndefined=Ge;exports.parseIntElseUndefined=Je;exports.truthyKeysAsList=Ue;exports.useArraySet=Oe;exports.useBoolean=x;exports.useDebounce=Re;exports.useDelayedFalse=je;exports.useDomId=ke;exports.useElementDimensions=R;exports.useElementFocus=De;exports.useEventListener=h;exports.useForwardedRef=qe;exports.useMouseIsEntered=Le;exports.useMouseIsOver=Me;exports.useMultiOnClickOutside=Fe;exports.useOnClickOutside=ze;exports.useOnNoMouseMovement=Ne;exports.useOnScreen=Pe;exports.useTimeoutState=He;
|
|
84
84
|
//# 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/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/PropsForwarder.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = \"var(--lhds-color-ui-300)\",\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n color={color}\n size={size}\n width={width}\n vertical={vertical}\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","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 { booleanOrNumberToNumber } 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};\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 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 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 :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\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 * 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 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 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={{ color, userSelect, whiteSpace, wordBreak, ...style }}\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\";\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","import { pickBy } from \"lodash\";\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","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":["SeparatorLineComponent","styled","hr","props","color","vertical","size","width","SeparatorLine","forwardRef","ref","ClickableElement","button","background","pointer","opacityOnHover","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","shadows","box","popover","modal","excludedProps","isExcludedWebUiProp","propName","includes","system","row","property","transform","indent","spacing","gap","shadow","value","Box","shouldForwardProp","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","currentRef","Row","Indent","Spacing","InnerSpace","div","Space","half","horizontal","undefined","Nest","nest","render","_Fragment","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","styles","text","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","heading","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","key","getDataProps","pickBy","isDataPropMapper","isDataProp","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":"suBAmBMA,EAAyBC,EAAOC,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,yBAKLC,EAAMC;AAAAA,eAEnCD,EAAME,SAAWF,EAAMG,MAAQ,OAASH,EAAMI,OAAS;AAAA,cAEvDJ,EAAME,SAAWF,EAAMI,OAAS,MAAQJ,EAAMG,MAAQ;AAAA,EAG7CE,EAAgBC,aAC3B,CACE,CACEL,MAAAA,EAAQ,2BACRE,KAAAA,EAAO,OACPC,MAAAA,EAAQ,MACRF,SAAAA,EAAW,EAJb,EAMAK,UAGGV,EAAD,CACE,MAAAI,EACA,KAAAE,EACA,MAAAC,EACA,SAAAF,EACA,IAAAK,CAAA,CANJ,CAVmC,ECgCjCC,EAAmBV,EAAOW,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKhB,CAAC,CAAEC,WAAAA,CAAF,IAAmBA;AAAAA,IAChC,CAAC,CAAEC,QAAAA,CAAF,IAAiBA,EAAU,mBAAqB;AAAA;AAAA;AAAA,MAG9CX,GAAWA,EAAMY,eAAiB,gBAAkB;AAAA,MACrD,CAAC,CAAEC,gBAAAA,CAAF,IAAyB,eAAcA;AAAAA;AAAAA;AAAAA,MAGxC,CAAC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B,CAC7B5D,EACA6D,EACAC,EAAyB,KACD,CACxB,KAAM,CAACnK,EAAOsG,CAAQ,EAAIhE,WAAY+D,CAAY,EAC5C+D,EAAarH,EAAAA,SAEbsH,EAAgB7H,EAAA,YACpB,CAAC8H,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,CAClD,MAAA,IAAI,MAAM,0BAA0BA,GAAK,CACjD,EAEaC,GAAoB,CAAIC,EAAaC,IACzCA,ECLIC,GAAoBC,GAC/B,OAAO,KAAKA,CAAC,EAAE,OAAQC,GAAQD,EAAEC,EAAI,ECC1BC,GACX/N,GACMgO,SAAOhO,EAAOiO,EAAgB,EAEhCA,GAAmB,CAAClF,EAAY+E,IAAyBI,GAAWJ,CAAG,EAEvEI,GAAoC7L,GACxCA,EAAS,WAAW,OAAO,GAAKA,EAAS,WAAW,OAAO,ECThD8L,GAA2BC,GAAkC,CACpE,GAAA,CACI,MAAAC,EAAI,WAAWD,CAAC,EAItB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf,EAEaC,GAAyBF,GAAkC,CAClE,GAAA,CACI,MAAAC,EAAI,SAASD,EAAG,EAAE,EAIxB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,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/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/PropsForwarder.ts","../src/utils/parsers/NumberParser.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Property } from \"csstype\";\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\n\nexport interface SeparatorLineProps {\n color?: Property.Color;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\ninterface SeparatorLineComponentProps {\n color: string;\n vertical?: boolean;\n size?: string;\n width?: string;\n}\n\nconst SeparatorLineComponent = styled.hr<SeparatorLineComponentProps>`\n display: flex;\n border: 0;\n margin: 0;\n flex: none;\n background-color: ${(props) => props.color};\n height: ${(props) =>\n props.vertical ? props.size || \"100%\" : props.width || \"1px\"};\n width: ${(props) =>\n props.vertical ? props.width || \"1px\" : props.size || \"100%\"};\n`;\n\nexport const SeparatorLine = forwardRef<HTMLHRElement, SeparatorLineProps>(\n (\n {\n color = \"var(--lhds-color-ui-300)\",\n size = \"100%\",\n width = \"1px\",\n vertical = false,\n },\n ref\n ) => {\n return (\n <SeparatorLineComponent\n color={color}\n size={size}\n width={width}\n vertical={vertical}\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","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 { booleanOrNumberToNumber } 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 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 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 :hover {\n ${({ hoverBackground }) =>\n hoverBackground ? `background: ${hoverBackground};` : \"\"}\n ${({ hoverBorder }) => (hoverBorder ? `border: ${hoverBorder};` : \"\")}\n }\n :focus {\n ${({ focusBackground }) =>\n focusBackground ? `background: ${focusBackground};` : \"\"}\n ${({ focusBorder }) => (focusBorder ? `border: ${focusBorder};` : \"\")}\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 * 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 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 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={{ color, userSelect, whiteSpace, wordBreak, ...style }}\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\";\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","import { pickBy } from \"lodash\";\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","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":["SeparatorLineComponent","styled","hr","props","color","vertical","size","width","SeparatorLine","forwardRef","ref","ClickableElement","button","background","pointer","opacityOnHover","hoverBackground","disableOpacityOnClick","disableFocusHighlight","focusBackground","height","borderRadius","Clickable","onClick","onDblClick","tooltip","disablePointer","disabled","children","type","restProps","hasClickHandler","booleanOrNumberToNumber","num","shadows","box","popover","modal","bottom","excludedProps","isExcludedWebUiProp","propName","includes","system","row","property","transform","indent","spacing","gap","shadow","value","Box","shouldForwardProp","isPropValid","border","borderRight","borderLeft","borderTop","borderBottom","borderColor","borderStyle","borderWidth","boxShadow","flexbox","overflow","position","layout","zIndex","left","right","top","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","currentRef","Row","Indent","Spacing","InnerSpace","div","Space","half","horizontal","undefined","Nest","nest","render","_Fragment","Text","variant","className","userSelect","whiteSpace","wordBreak","style","spanProps","cx","styles","text","Txt","SmallText","SmallerText","StandardText","LargeText","Heading","as","hProps","Element","heading","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","key","getDataProps","pickBy","isDataPropMapper","isDataProp","parseFloatElseUndefined","s","f","parseIntElseUndefined"],"mappings":"suBAmBMA,EAAyBC,EAAOC,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,yBAKLC,EAAMC;AAAAA,eAEnCD,EAAME,SAAWF,EAAMG,MAAQ,OAASH,EAAMI,OAAS;AAAA,cAEvDJ,EAAME,SAAWF,EAAMI,OAAS,MAAQJ,EAAMG,MAAQ;AAAA,EAG7CE,EAAgBC,aAC3B,CACE,CACEL,MAAAA,EAAQ,2BACRE,KAAAA,EAAO,OACPC,MAAAA,EAAQ,MACRF,SAAAA,EAAW,EAJb,EAMAK,UAGGV,EAAD,CACE,MAAAI,EACA,KAAAE,EACA,MAAAC,EACA,SAAAF,EACA,IAAAK,CAAA,CANJ,CAVmC,ECgCjCC,EAAmBV,EAAOW,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKhB,CAAC,CAAEC,WAAAA,CAAF,IAAmBA;AAAAA,IAChC,CAAC,CAAEC,QAAAA,CAAF,IAAiBA,EAAU,mBAAqB;AAAA;AAAA;AAAA,MAG9CX,GAAWA,EAAMY,eAAiB,gBAAkB;AAAA,MACrD,CAAC,CAAEC,gBAAAA,CAAF,IAAyB,eAAcA;AAAAA;AAAAA;AAAAA,MAGxC,CAAC,CAAEC,sBAAAA,CAAF,IACAA,EAA0C,GAAlB;AAAA;AAAA;AAAA;AAAA,MAIzB,CAAC,CAAEC,sBAAAA,CAAF,IACDA,EACI,GACA;AAAA,MACJ,CAAC,CAAEC,gBAAAA,CAAF,IAAyB,eAAcA;AAAAA;AAAAA,IAE1C,CAAC,CAAEZ,MAAAA,CAAF,IAAeA,EAAS,UAASA,KAAW;AAAA,IAC7C,CAAC,CAAEa,OAAAA,CAAF,IAAgBA,EAAU,WAAUA,KAAY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kE,CAAO,CACvE,EACA,CAACL,EAAgBC,EAAwB9D,CAAY,CAAA,EAGvDS,OAAAA,EAAAA,UAAU,IACD,IAAM,CACX,aAAasD,EAAW,OAAQ,CAAA,EAEjC,CAAE,CAAA,EAEE,CAACnK,EAAOoK,CAAa,CAC9B,EC5BaG,GAA8BC,GAAe,CAClD,MAAA,IAAI,MAAM,0BAA0BA,GAAK,CACjD,EAEaC,GAAoB,CAAIC,EAAaC,IACzCA,ECLIC,GAAoBC,GAC/B,OAAO,KAAKA,CAAC,EAAE,OAAQC,GAAQD,EAAEC,EAAI,ECC1BC,GACX/N,GACMgO,SAAOhO,EAAOiO,EAAgB,EAEhCA,GAAmB,CAAClF,EAAY+E,IAAyBI,GAAWJ,CAAG,EAEvEI,GAAoC5L,GACxCA,EAAS,WAAW,OAAO,GAAKA,EAAS,WAAW,OAAO,ECThD6L,GAA2BC,GAAkC,CACpE,GAAA,CACI,MAAAC,EAAI,WAAWD,CAAC,EAItB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf,EAEaC,GAAyBF,GAAkC,CAClE,GAAA,CACI,MAAAC,EAAI,SAASD,EAAG,EAAE,EAIxB,OAHI,MAAMC,CAAC,GAGPA,GAAK,KACA,OAEFA,QACI,CAEf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/core",
|
|
3
|
-
"version": "19.0.0-next.
|
|
3
|
+
"version": "19.0.0-next.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "mattias800",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"files": [
|
|
58
58
|
"dist"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "a46f27d8b182e735c967e8b2bcbf0eceabf4b97a",
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
63
|
-
"@stenajs-webui/theme": "19.0.0-next.
|
|
63
|
+
"@stenajs-webui/theme": "19.0.0-next.8",
|
|
64
64
|
"classnames": "^2.3.1"
|
|
65
65
|
}
|
|
66
66
|
}
|