@stenajs-webui/core 17.6.0 → 17.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/decorators/separatorline/SeparatorLine.d.ts +9 -9
  3. package/dist/components/deprecated-text/HeaderText.d.ts +6 -6
  4. package/dist/components/deprecated-text/LargeText.d.ts +6 -6
  5. package/dist/components/deprecated-text/SmallText.d.ts +6 -6
  6. package/dist/components/deprecated-text/SmallerText.d.ts +6 -6
  7. package/dist/components/deprecated-text/StandardText.d.ts +6 -6
  8. package/dist/components/heading/Heading.d.ts +11 -11
  9. package/dist/components/interaction/Clickable.d.ts +48 -48
  10. package/dist/components/layout/box/Box.d.ts +75 -75
  11. package/dist/components/layout/box/ResizeAwareBox.d.ts +7 -7
  12. package/dist/components/layout/column/Column.d.ts +3 -3
  13. package/dist/components/layout/indent/Indent.d.ts +7 -7
  14. package/dist/components/layout/row/Row.d.ts +3 -3
  15. package/dist/components/layout/space/Space.d.ts +8 -8
  16. package/dist/components/layout/spacing/Spacing.d.ts +7 -7
  17. package/dist/components/text/Text.d.ts +15 -15
  18. package/dist/components/util/Nest.d.ts +9 -9
  19. package/dist/hooks/UseArraySet.d.ts +9 -9
  20. package/dist/hooks/UseBoolean.d.ts +7 -7
  21. package/dist/hooks/UseDebounce.d.ts +1 -1
  22. package/dist/hooks/UseDelayedFalse.d.ts +1 -1
  23. package/dist/hooks/UseDomId.d.ts +2 -1
  24. package/dist/hooks/UseElementDimensions.d.ts +15 -15
  25. package/dist/hooks/UseElementFocus.d.ts +6 -6
  26. package/dist/hooks/UseEventListener.d.ts +4 -4
  27. package/dist/hooks/UseForwardedRef.d.ts +2 -2
  28. package/dist/hooks/UseMouseIsEntered.d.ts +2 -2
  29. package/dist/hooks/UseMouseIsOver.d.ts +2 -2
  30. package/dist/hooks/UseMultiOnClickOutside.d.ts +2 -2
  31. package/dist/hooks/UseOnClickOutside.d.ts +2 -2
  32. package/dist/hooks/UseOnNoMouseInput.d.ts +1 -1
  33. package/dist/hooks/UseOnScreen.d.ts +2 -2
  34. package/dist/hooks/UseTimeoutState.d.ts +1 -1
  35. package/dist/index.d.ts +44 -44
  36. package/dist/index.es.js +711 -690
  37. package/dist/index.es.js.map +1 -1
  38. package/dist/index.js +80 -793
  39. package/dist/index.js.map +1 -1
  40. package/dist/storybook-helpers/storybook-controls.d.ts +46 -46
  41. package/dist/types/DeepPartial.d.ts +3 -3
  42. package/dist/types/ElementProps.d.ts +18 -18
  43. package/dist/types/FlattenUnion.d.ts +5 -5
  44. package/dist/types/Omit.d.ts +1 -1
  45. package/dist/types/PickByValue.d.ts +3 -3
  46. package/dist/utils/BooleanOrNumberToNumber.d.ts +1 -1
  47. package/dist/utils/PropsForwarder.d.ts +1 -1
  48. package/dist/utils/SwitchCaseExhauster.d.ts +2 -2
  49. package/dist/utils/TruthyKeysAsList.d.ts +1 -1
  50. package/dist/utils/parsers/NumberParser.d.ts +2 -2
  51. package/package.json +7 -10
  52. package/dist/components/decorators/separatorline/SeparatorLine.stories.d.ts +0 -29
  53. package/dist/components/heading/Heading.stories.d.ts +0 -16
  54. package/dist/components/interaction/Clickable.stories.d.ts +0 -13
  55. package/dist/components/layout/box/Box.stories.d.ts +0 -68
  56. package/dist/components/layout/box/ResponsiveBox.stories.d.ts +0 -10
  57. package/dist/components/layout/column/Column.stories.d.ts +0 -13
  58. package/dist/components/layout/indent/Indent.stories.d.ts +0 -8
  59. package/dist/components/layout/row/Row.stories.d.ts +0 -8
  60. package/dist/components/layout/space/Space.stories.d.ts +0 -8
  61. package/dist/components/layout/spacing/Spacing.stories.d.ts +0 -8
  62. package/dist/components/text/Text.stories.d.ts +0 -31
  63. package/dist/components/util/__tests__/Nest.test.d.ts +0 -0
  64. package/dist/hooks/__tests__/UseArraySet.test.d.ts +0 -1
  65. package/dist/hooks/__tests__/UseBoolean.test.d.ts +0 -1
  66. package/dist/hooks/__tests__/UseDebounce.test.d.ts +0 -1
  67. package/dist/hooks/__tests__/UseMultiOnClickOutside.test.d.ts +0 -1
  68. package/dist/hooks/__tests__/UseOnClickOutside.test.d.ts +0 -1
  69. package/dist/utils/__tests__/PropsForwarder.test.d.ts +0 -1
  70. package/dist/utils/__tests__/TruthyKeysAsList.test.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ # v17.9.0 (Fri Jul 01 2022)
2
+
3
+ #### 🏠 Internal
4
+
5
+ - Use vite builder for storybook [#477](https://github.com/StenaIT/stenajs-webui/pull/477) ([@lindskogen](https://github.com/lindskogen))
6
+
7
+ #### Authors: 1
8
+
9
+ - Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
10
+
11
+ ---
12
+
13
+ # v17.8.0 (Fri Jul 01 2022)
14
+
15
+ #### 🚀 Enhancement
16
+
17
+ - Replace useDomId with useId [#476](https://github.com/StenaIT/stenajs-webui/pull/476) ([@lindskogen](https://github.com/lindskogen))
18
+
19
+ #### Authors: 1
20
+
21
+ - Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
22
+
23
+ ---
24
+
25
+ # v17.7.0 (Fri Jul 01 2022)
26
+
27
+ #### 🚀 Enhancement
28
+
29
+ - Build packages with vite [#475](https://github.com/StenaIT/stenajs-webui/pull/475) ([@lindskogen](https://github.com/lindskogen))
30
+
31
+ #### Authors: 1
32
+
33
+ - Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
34
+
35
+ ---
36
+
1
37
  # v17.0.0 (Fri Jun 17 2022)
2
38
 
3
39
  #### 💥 Breaking Change
@@ -1,9 +1,9 @@
1
- import { Property } from "csstype";
2
- import * as React from "react";
3
- export interface SeparatorLineProps {
4
- color?: Property.Color;
5
- vertical?: boolean;
6
- size?: string;
7
- width?: string;
8
- }
9
- export declare const SeparatorLine: React.ForwardRefExoticComponent<SeparatorLineProps & React.RefAttributes<HTMLHRElement>>;
1
+ import { Property } from "csstype";
2
+ import * as React from "react";
3
+ export interface SeparatorLineProps {
4
+ color?: Property.Color;
5
+ vertical?: boolean;
6
+ size?: string;
7
+ width?: string;
8
+ }
9
+ export declare const SeparatorLine: React.ForwardRefExoticComponent<SeparatorLineProps & React.RefAttributes<HTMLHRElement>>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { HeadingProps } from "../heading/Heading";
3
- /**
4
- * @deprecated Please use `Heading` instead.
5
- */
6
- export declare const HeaderText: React.FC<Omit<HeadingProps, "variant">>;
1
+ import * as React from "react";
2
+ import { HeadingProps } from "../heading/Heading";
3
+ /**
4
+ * @deprecated Please use `Heading` instead.
5
+ */
6
+ export declare const HeaderText: React.FC<Omit<HeadingProps, "variant">>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { TextProps } from "../text/Text";
3
- /**
4
- * @deprecated Please use `Text` instead.
5
- */
6
- export declare const LargeText: React.FC<Omit<TextProps, "size">>;
1
+ import * as React from "react";
2
+ import { TextProps } from "../text/Text";
3
+ /**
4
+ * @deprecated Please use `Text` instead.
5
+ */
6
+ export declare const LargeText: React.FC<Omit<TextProps, "size">>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { TextProps } from "../text/Text";
3
- /**
4
- * @deprecated Please use `Text` instead.
5
- */
6
- export declare const SmallText: React.FC<Omit<TextProps, "size">>;
1
+ import * as React from "react";
2
+ import { TextProps } from "../text/Text";
3
+ /**
4
+ * @deprecated Please use `Text` instead.
5
+ */
6
+ export declare const SmallText: React.FC<Omit<TextProps, "size">>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { TextProps } from "../text/Text";
3
- /**
4
- * @deprecated Please use `Text` instead.
5
- */
6
- export declare const SmallerText: React.FC<Omit<TextProps, "size">>;
1
+ import * as React from "react";
2
+ import { TextProps } from "../text/Text";
3
+ /**
4
+ * @deprecated Please use `Text` instead.
5
+ */
6
+ export declare const SmallerText: React.FC<Omit<TextProps, "size">>;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { TextProps } from "../text/Text";
3
- /**
4
- * @deprecated Please use `Text` instead.
5
- */
6
- export declare const StandardText: React.FC<Omit<TextProps, "size">>;
1
+ import * as React from "react";
2
+ import { TextProps } from "../text/Text";
3
+ /**
4
+ * @deprecated Please use `Text` instead.
5
+ */
6
+ export declare const StandardText: React.FC<Omit<TextProps, "size">>;
@@ -1,11 +1,11 @@
1
- import { Property } from "csstype";
2
- import * as React from "react";
3
- import { H1Props } from "../../types/ElementProps";
4
- export interface HeadingProps extends H1Props {
5
- variant?: HeadingVariant;
6
- whiteSpace?: Property.WhiteSpace;
7
- wordBreak?: Property.WordBreak;
8
- as?: HeadingVariant;
9
- }
10
- export declare type HeadingVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
11
- export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
1
+ import { Property } from "csstype";
2
+ import * as React from "react";
3
+ import { H1Props } from "../../types/ElementProps";
4
+ export interface HeadingProps extends H1Props {
5
+ variant?: HeadingVariant;
6
+ whiteSpace?: Property.WhiteSpace;
7
+ wordBreak?: Property.WordBreak;
8
+ as?: HeadingVariant;
9
+ }
10
+ export declare type HeadingVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
11
+ export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -1,48 +1,48 @@
1
- import * as React from "react";
2
- import { CSSProperties, MouseEventHandler } from "react";
3
- import { ButtonElementProps } from "../../types/ElementProps";
4
- export interface ClickableProps extends ButtonElementProps {
5
- /** Callback function called when clicking on click area. */
6
- onClick?: MouseEventHandler<HTMLButtonElement>;
7
- /** Callback function called when double clicking on click area. */
8
- onDblClick?: MouseEventHandler<HTMLButtonElement>;
9
- /** Adds a title to the click area. */
10
- tooltip?: string;
11
- /** If set, there is no opacity applies when clicking on the click area. */
12
- disableOpacityOnClick?: boolean;
13
- /** Mouse does not turn into pointer when hovering over click area. */
14
- disablePointer?: boolean;
15
- /** When set, click area receives opacity when mouse hovers over it. */
16
- opacityOnHover?: boolean;
17
- /** Custom style on div with click event. */
18
- style?: CSSProperties;
19
- /** Disables shadow when element is focused. */
20
- disableFocusHighlight?: boolean;
21
- /** Disables the HTML button element. */
22
- disabled?: boolean;
23
- /**
24
- * Sets the background of the box.
25
- */
26
- background?: string;
27
- /**
28
- * Sets the background of the box when the box is in focus.
29
- */
30
- focusBackground?: string;
31
- /**
32
- * Sets the background of the box when hovering with mouse.
33
- */
34
- hoverBackground?: string;
35
- /**
36
- * The width.
37
- */
38
- width?: string;
39
- /**
40
- * The height.
41
- */
42
- height?: string;
43
- /**
44
- * Border radius
45
- */
46
- borderRadius?: string;
47
- }
48
- export declare const Clickable: React.ForwardRefExoticComponent<ClickableProps & React.RefAttributes<HTMLButtonElement>>;
1
+ import * as React from "react";
2
+ import { CSSProperties, MouseEventHandler } from "react";
3
+ import { ButtonElementProps } from "../../types/ElementProps";
4
+ export interface ClickableProps extends ButtonElementProps {
5
+ /** Callback function called when clicking on click area. */
6
+ onClick?: MouseEventHandler<HTMLButtonElement>;
7
+ /** Callback function called when double clicking on click area. */
8
+ onDblClick?: MouseEventHandler<HTMLButtonElement>;
9
+ /** Adds a title to the click area. */
10
+ tooltip?: string;
11
+ /** If set, there is no opacity applies when clicking on the click area. */
12
+ disableOpacityOnClick?: boolean;
13
+ /** Mouse does not turn into pointer when hovering over click area. */
14
+ disablePointer?: boolean;
15
+ /** When set, click area receives opacity when mouse hovers over it. */
16
+ opacityOnHover?: boolean;
17
+ /** Custom style on div with click event. */
18
+ style?: CSSProperties;
19
+ /** Disables shadow when element is focused. */
20
+ disableFocusHighlight?: boolean;
21
+ /** Disables the HTML button element. */
22
+ disabled?: boolean;
23
+ /**
24
+ * Sets the background of the box.
25
+ */
26
+ background?: string;
27
+ /**
28
+ * Sets the background of the box when the box is in focus.
29
+ */
30
+ focusBackground?: string;
31
+ /**
32
+ * Sets the background of the box when hovering with mouse.
33
+ */
34
+ hoverBackground?: string;
35
+ /**
36
+ * The width.
37
+ */
38
+ width?: string;
39
+ /**
40
+ * The height.
41
+ */
42
+ height?: string;
43
+ /**
44
+ * Border radius
45
+ */
46
+ borderRadius?: string;
47
+ }
48
+ export declare const Clickable: React.ForwardRefExoticComponent<ClickableProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,75 +1,75 @@
1
- /// <reference types="react" />
2
- import { Property } from "csstype";
3
- import { BackgroundProps, BorderBottomProps, BorderLeftProps, BorderRadiusProps, BorderRightProps, BorderStyleProps, BorderTopProps, BorderWidthProps, BottomProps, BoxShadowProps, FlexboxProps, LayoutProps, LeftProps, OverflowProps, PositionProps, ResponsiveValue, RightProps, TLengthStyledSystem, TopProps, ZIndexProps } from "styled-system";
4
- import { DivProps } from "../../../types/ElementProps";
5
- interface StyledSystemProps extends BorderRadiusProps, BorderStyleProps, BorderWidthProps, BorderLeftProps, BorderRightProps, BorderTopProps, BorderBottomProps, FlexboxProps, LayoutProps, OverflowProps, PositionProps, ZIndexProps, LeftProps, RightProps, TopProps, BottomProps {
6
- }
7
- declare const shadows: {
8
- box: string;
9
- popover: string;
10
- modal: string;
11
- };
12
- declare type ShadowType = keyof typeof shadows;
13
- export interface BoxProps extends StyledSystemProps, DivProps {
14
- /**
15
- * If true, children are placed in a row.
16
- */
17
- row?: ResponsiveValue<boolean>;
18
- /**
19
- * Adds spacing over and under content.
20
- */
21
- spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;
22
- /**
23
- * Adds spacing left and right of content.
24
- */
25
- indent?: ResponsiveValue<boolean | TLengthStyledSystem>;
26
- /**
27
- * Adds spacing between children.
28
- */
29
- gap?: ResponsiveValue<boolean | TLengthStyledSystem>;
30
- /**
31
- * Adds a shadow around the box.
32
- */
33
- shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;
34
- /**
35
- * Sets the background of the box.
36
- */
37
- background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;
38
- /**
39
- * Sets the border of the box.
40
- */
41
- border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;
42
- /**
43
- * Sets the border color of the box.
44
- */
45
- borderColor?: ResponsiveValue<Property.BorderColor>;
46
- /**
47
- * Sets the background of the box when hovering with mouse.
48
- */
49
- hoverBackground?: Property.Background<TLengthStyledSystem>;
50
- /**
51
- * Sets the border of the box when hovering with mouse.
52
- */
53
- hoverBorder?: Property.Border<TLengthStyledSystem>;
54
- /**
55
- * Sets the background of the box when the box is in focus.
56
- */
57
- focusBackground?: Property.Background<TLengthStyledSystem>;
58
- /**
59
- * Sets the border of the box when the box is in focus.
60
- */
61
- focusBorder?: Property.Border<TLengthStyledSystem>;
62
- /**
63
- * Sets the background of the box when focus is within the box.
64
- */
65
- focusWithinBackground?: Property.Background<TLengthStyledSystem>;
66
- /**
67
- * Sets the border of the box when focus is within the box.
68
- */
69
- focusWithinBorder?: Property.Border<TLengthStyledSystem>;
70
- }
71
- export declare const Box: import("@emotion/styled").StyledComponent<{
72
- theme?: import("@emotion/react").Theme | undefined;
73
- as?: import("react").ElementType<any> | undefined;
74
- } & BoxProps & BoxShadowProps<Required<import("styled-system").Theme<TLengthStyledSystem>>> & BackgroundProps<Required<import("styled-system").Theme<TLengthStyledSystem>>, import("csstype").Property.Background<TLengthStyledSystem>>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
- export {};
1
+ /// <reference types="react" />
2
+ import { Property } from "csstype";
3
+ import { BackgroundProps, BorderBottomProps, BorderLeftProps, BorderRadiusProps, BorderRightProps, BorderStyleProps, BorderTopProps, BorderWidthProps, BottomProps, BoxShadowProps, FlexboxProps, LayoutProps, LeftProps, OverflowProps, PositionProps, ResponsiveValue, RightProps, TLengthStyledSystem, TopProps, ZIndexProps } from "styled-system";
4
+ import { DivProps } from "../../../types/ElementProps";
5
+ interface StyledSystemProps extends BorderRadiusProps, BorderStyleProps, BorderWidthProps, BorderLeftProps, BorderRightProps, BorderTopProps, BorderBottomProps, FlexboxProps, LayoutProps, OverflowProps, PositionProps, ZIndexProps, LeftProps, RightProps, TopProps, BottomProps {
6
+ }
7
+ declare const shadows: {
8
+ box: string;
9
+ popover: string;
10
+ modal: string;
11
+ };
12
+ declare type ShadowType = keyof typeof shadows;
13
+ export interface BoxProps extends StyledSystemProps, DivProps {
14
+ /**
15
+ * If true, children are placed in a row.
16
+ */
17
+ row?: ResponsiveValue<boolean>;
18
+ /**
19
+ * Adds spacing over and under content.
20
+ */
21
+ spacing?: ResponsiveValue<boolean | TLengthStyledSystem>;
22
+ /**
23
+ * Adds spacing left and right of content.
24
+ */
25
+ indent?: ResponsiveValue<boolean | TLengthStyledSystem>;
26
+ /**
27
+ * Adds spacing between children.
28
+ */
29
+ gap?: ResponsiveValue<boolean | TLengthStyledSystem>;
30
+ /**
31
+ * Adds a shadow around the box.
32
+ */
33
+ shadow?: ResponsiveValue<Property.BoxShadow | ShadowType>;
34
+ /**
35
+ * Sets the background of the box.
36
+ */
37
+ background?: ResponsiveValue<Property.Background<TLengthStyledSystem>>;
38
+ /**
39
+ * Sets the border of the box.
40
+ */
41
+ border?: ResponsiveValue<Property.Border<TLengthStyledSystem>>;
42
+ /**
43
+ * Sets the border color of the box.
44
+ */
45
+ borderColor?: ResponsiveValue<Property.BorderColor>;
46
+ /**
47
+ * Sets the background of the box when hovering with mouse.
48
+ */
49
+ hoverBackground?: Property.Background<TLengthStyledSystem>;
50
+ /**
51
+ * Sets the border of the box when hovering with mouse.
52
+ */
53
+ hoverBorder?: Property.Border<TLengthStyledSystem>;
54
+ /**
55
+ * Sets the background of the box when the box is in focus.
56
+ */
57
+ focusBackground?: Property.Background<TLengthStyledSystem>;
58
+ /**
59
+ * Sets the border of the box when the box is in focus.
60
+ */
61
+ focusBorder?: Property.Border<TLengthStyledSystem>;
62
+ /**
63
+ * Sets the background of the box when focus is within the box.
64
+ */
65
+ focusWithinBackground?: Property.Background<TLengthStyledSystem>;
66
+ /**
67
+ * Sets the border of the box when focus is within the box.
68
+ */
69
+ focusWithinBorder?: Property.Border<TLengthStyledSystem>;
70
+ }
71
+ export declare const Box: import("@emotion/styled").StyledComponent<{
72
+ theme?: import("@emotion/react").Theme | undefined;
73
+ as?: import("react").ElementType<any> | undefined;
74
+ } & BoxProps & BoxShadowProps<Required<import("styled-system").Theme<TLengthStyledSystem>>> & BackgroundProps<Required<import("styled-system").Theme<TLengthStyledSystem>>, Property.Background<TLengthStyledSystem>>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
+ export {};
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import { BoxProps } from "./Box";
3
- import { ElementDimensions } from "../../../hooks/UseElementDimensions";
4
- export interface ResizeAwareBoxProps extends BoxProps {
5
- onResize?: (dimensions: ElementDimensions) => void;
6
- }
7
- export declare const ResizeAwareBox: React.ForwardRefExoticComponent<ResizeAwareBoxProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { BoxProps } from "./Box";
3
+ import { ElementDimensions } from "../../../hooks/UseElementDimensions";
4
+ export interface ResizeAwareBoxProps extends BoxProps {
5
+ onResize?: (dimensions: ElementDimensions) => void;
6
+ }
7
+ export declare const ResizeAwareBox: React.ForwardRefExoticComponent<ResizeAwareBoxProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,3 @@
1
- import * as React from "react";
2
- import { BoxProps } from "../box/Box";
3
- export declare const Column: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { BoxProps } from "../box/Box";
3
+ export declare const Column: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import { BoxProps } from "../box/Box";
3
- import { ResponsiveValue, TLengthStyledSystem } from "styled-system";
4
- export interface IndentProps extends BoxProps {
5
- num?: ResponsiveValue<boolean | TLengthStyledSystem>;
6
- }
7
- export declare const Indent: React.ForwardRefExoticComponent<IndentProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { BoxProps } from "../box/Box";
3
+ import { ResponsiveValue, TLengthStyledSystem } from "styled-system";
4
+ export interface IndentProps extends BoxProps {
5
+ num?: ResponsiveValue<boolean | TLengthStyledSystem>;
6
+ }
7
+ export declare const Indent: React.ForwardRefExoticComponent<IndentProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,3 @@
1
- import * as React from "react";
2
- import { BoxProps } from "../box/Box";
3
- export declare const Row: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { BoxProps } from "../box/Box";
3
+ export declare const Row: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,8 +1,8 @@
1
- import * as React from "react";
2
- export interface SpaceProps {
3
- half?: boolean;
4
- horizontal?: boolean;
5
- num?: number;
6
- vertical?: boolean;
7
- }
8
- export declare const Space: React.VFC<SpaceProps>;
1
+ import * as React from "react";
2
+ export interface SpaceProps {
3
+ half?: boolean;
4
+ horizontal?: boolean;
5
+ num?: number;
6
+ vertical?: boolean;
7
+ }
8
+ export declare const Space: React.VFC<SpaceProps>;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import { BoxProps } from "../box/Box";
3
- import { ResponsiveValue, TLengthStyledSystem } from "styled-system";
4
- export interface SpacingProps extends BoxProps {
5
- num?: ResponsiveValue<boolean | TLengthStyledSystem>;
6
- }
7
- export declare const Spacing: React.ForwardRefExoticComponent<SpacingProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { BoxProps } from "../box/Box";
3
+ import { ResponsiveValue, TLengthStyledSystem } from "styled-system";
4
+ export interface SpacingProps extends BoxProps {
5
+ num?: ResponsiveValue<boolean | TLengthStyledSystem>;
6
+ }
7
+ export declare const Spacing: React.ForwardRefExoticComponent<SpacingProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,15 +1,15 @@
1
- import * as React from "react";
2
- import { SpanProps } from "../../types/ElementProps";
3
- import { Property } from "csstype";
4
- export interface TextProps extends SpanProps {
5
- variant?: TextVariant;
6
- size?: TextSize;
7
- userSelect?: Property.UserSelect;
8
- whiteSpace?: Property.WhiteSpace;
9
- wordBreak?: Property.WordBreak;
10
- color?: string;
11
- }
12
- export declare type TextVariant = "standard" | "caption" | "overline" | "bold";
13
- export declare type TextSize = "large" | "medium" | "small" | "smaller";
14
- export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
15
- export declare const Txt: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
1
+ import * as React from "react";
2
+ import { SpanProps } from "../../types/ElementProps";
3
+ import { Property } from "csstype";
4
+ export interface TextProps extends SpanProps {
5
+ variant?: TextVariant;
6
+ size?: TextSize;
7
+ userSelect?: Property.UserSelect;
8
+ whiteSpace?: Property.WhiteSpace;
9
+ wordBreak?: Property.WordBreak;
10
+ color?: string;
11
+ }
12
+ export declare type TextVariant = "standard" | "caption" | "overline" | "bold";
13
+ export declare type TextSize = "large" | "medium" | "small" | "smaller";
14
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
15
+ export declare const Txt: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,9 +1,9 @@
1
- import * as React from "react";
2
- import { ReactNode } from "react";
3
- interface Props {
4
- nest?: boolean;
5
- render: (children: ReactNode) => ReactNode;
6
- children?: ReactNode;
7
- }
8
- export declare const Nest: React.FC<Props>;
9
- export {};
1
+ import * as React from "react";
2
+ import { ReactNode } from "react";
3
+ interface Props {
4
+ nest?: boolean;
5
+ render: (children: ReactNode) => ReactNode;
6
+ children?: ReactNode;
7
+ }
8
+ export declare const Nest: React.FC<Props>;
9
+ export {};
@@ -1,9 +1,9 @@
1
- declare type ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;
2
- export declare const useArraySet: <T>(list: T[], setList: (list: T[]) => void, comparator?: ArrayItemEqualsComparator<T>) => {
3
- add: (item: T) => void;
4
- addMultiple: (items: T[]) => void;
5
- remove: (item: T) => void;
6
- removeMultiple: (items: T[]) => void;
7
- toggle: (item: T) => void;
8
- };
9
- export {};
1
+ declare type ArrayItemEqualsComparator<T> = (a: T, b: T) => boolean;
2
+ export declare const useArraySet: <T>(list: T[], setList: (list: T[]) => void, comparator?: ArrayItemEqualsComparator<T>) => {
3
+ add: (item: T) => void;
4
+ addMultiple: (items: T[]) => void;
5
+ remove: (item: T) => void;
6
+ removeMultiple: (items: T[]) => void;
7
+ toggle: (item: T) => void;
8
+ };
9
+ export {};
@@ -1,7 +1,7 @@
1
- declare type Value = boolean;
2
- declare type SetTrue = () => void;
3
- declare type SetFalse = () => void;
4
- declare type ToggleValue = () => void;
5
- declare type BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];
6
- export declare const useBoolean: (initialValue: Value) => BooleanHook;
7
- export {};
1
+ declare type Value = boolean;
2
+ declare type SetTrue = () => void;
3
+ declare type SetFalse = () => void;
4
+ declare type ToggleValue = () => void;
5
+ declare type BooleanHook = [Value, SetTrue, SetFalse, ToggleValue];
6
+ export declare const useBoolean: (initialValue: Value) => BooleanHook;
7
+ export {};
@@ -1 +1 @@
1
- export declare const useDebounce: <T>(value: T, delay: number) => T;
1
+ export declare const useDebounce: <T>(value: T, delay: number) => T;
@@ -1 +1 @@
1
- export declare const useDelayedFalse: (value: boolean, delay: number) => boolean;
1
+ export declare const useDelayedFalse: (value: boolean, delay: number) => boolean;
@@ -1 +1,2 @@
1
- export declare const useDomId: (componentName?: string) => string;
1
+ /** @deprecated use useId-hook from React 18 */
2
+ export declare const useDomId: (componentName?: string) => string;
@@ -1,15 +1,15 @@
1
- import { RefObject } from "react";
2
- export interface ElementDimensions {
3
- width: number;
4
- height: number;
5
- top: number;
6
- left: number;
7
- x: number;
8
- y: number;
9
- right: number;
10
- bottom: number;
11
- }
12
- export declare const getDimensionObject: (node: HTMLElement) => ElementDimensions;
13
- export declare const useElementDimensions: (ref: RefObject<HTMLElement>, onResizeElement?: ((dimensions: ElementDimensions) => void) | undefined) => {
14
- dimensions: ElementDimensions | undefined;
15
- };
1
+ import { RefObject } from "react";
2
+ export interface ElementDimensions {
3
+ width: number;
4
+ height: number;
5
+ top: number;
6
+ left: number;
7
+ x: number;
8
+ y: number;
9
+ right: number;
10
+ bottom: number;
11
+ }
12
+ export declare const getDimensionObject: (node: HTMLElement) => ElementDimensions;
13
+ export declare const useElementDimensions: (ref: RefObject<HTMLElement>, onResizeElement?: ((dimensions: ElementDimensions) => void) | undefined) => {
14
+ dimensions: ElementDimensions | undefined;
15
+ };
@@ -1,6 +1,6 @@
1
- import { RefObject } from "react";
2
- export declare const useElementFocus: <TElement extends HTMLElement>(ref: RefObject<TElement>) => {
3
- isInFocus: boolean;
4
- focus: () => void;
5
- blur: () => void;
6
- };
1
+ import { RefObject } from "react";
2
+ export declare const useElementFocus: <TElement extends HTMLElement>(ref: RefObject<TElement>) => {
3
+ isInFocus: boolean;
4
+ focus: () => void;
5
+ blur: () => void;
6
+ };