@lumx/core 4.3.2-alpha.8 → 4.4.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 (97) hide show
  1. package/js/components/Badge/BadgeWrapperTests.d.ts +9 -0
  2. package/js/components/Badge/Tests.d.ts +12 -0
  3. package/js/components/Button/Button.d.ts +48 -0
  4. package/js/components/Button/ButtonRoot.d.ts +55 -0
  5. package/js/components/Button/ButtonRootTests.d.ts +12 -0
  6. package/js/components/Button/IconButton.d.ts +45 -0
  7. package/js/components/Button/IconButtonTests.d.ts +15 -0
  8. package/js/components/Button/Tests.d.ts +15 -0
  9. package/js/components/Checkbox/Tests.d.ts +15 -0
  10. package/js/components/Checkbox/index.d.ts +49 -0
  11. package/js/components/Divider/Tests.d.ts +12 -0
  12. package/js/components/Divider/index.d.ts +27 -0
  13. package/js/components/Flag/Tests.d.ts +14 -0
  14. package/js/components/Flag/index.d.ts +34 -0
  15. package/js/components/FlexBox/Tests.d.ts +13 -0
  16. package/js/components/FlexBox/constants.d.ts +4 -0
  17. package/js/components/FlexBox/index.d.ts +50 -0
  18. package/js/components/FlexBox/types.d.ts +7 -0
  19. package/js/components/GridColumn/GridColumn.d.ts +48 -0
  20. package/js/components/GridColumn/GridColumnTests.d.ts +12 -0
  21. package/js/components/Heading/Tests.d.ts +11 -0
  22. package/js/components/Heading/constants.d.ts +21 -0
  23. package/js/components/Heading/index.d.ts +44 -0
  24. package/js/components/Heading/utils.d.ts +8 -0
  25. package/js/components/Icon/Tests.d.ts +14 -0
  26. package/js/components/Icon/constants.d.ts +1 -0
  27. package/js/components/Icon/index.d.ts +41 -0
  28. package/js/components/InputHelper/Tests.d.ts +12 -0
  29. package/js/components/InputHelper/constants.d.ts +3 -0
  30. package/js/components/InputHelper/index.d.ts +26 -0
  31. package/js/components/InputLabel/Tests.d.ts +12 -0
  32. package/js/components/InputLabel/index.d.ts +25 -0
  33. package/js/components/Link/Tests.d.ts +8 -0
  34. package/js/components/Message/Tests.d.ts +14 -0
  35. package/js/components/Message/index.d.ts +75 -0
  36. package/js/components/ProgressCircular/Stories.d.ts +30 -0
  37. package/js/components/ProgressCircular/Tests.d.ts +11 -0
  38. package/js/components/ProgressCircular/index.d.ts +52 -0
  39. package/js/components/ProgressLinear/Stories.d.ts +11 -0
  40. package/js/components/ProgressLinear/Tests.d.ts +11 -0
  41. package/js/components/ProgressLinear/index.d.ts +27 -0
  42. package/js/components/RadioButton/Tests.d.ts +15 -0
  43. package/js/components/RadioButton/index.d.ts +45 -0
  44. package/js/components/RawClickable/Tests.d.ts +14 -0
  45. package/js/components/RawClickable/index.d.ts +14 -0
  46. package/js/components/Skeleton/SkeletonCircle.d.ts +32 -0
  47. package/js/components/Skeleton/SkeletonCircleTests.d.ts +12 -0
  48. package/js/components/Skeleton/SkeletonRectangle.d.ts +47 -0
  49. package/js/components/Skeleton/SkeletonRectangleTests.d.ts +13 -0
  50. package/js/components/Skeleton/SkeletonTypography.d.ts +37 -0
  51. package/js/components/Skeleton/SkeletonTypographyTests.d.ts +13 -0
  52. package/js/components/Skeleton/index.d.ts +3 -0
  53. package/js/components/Switch/Tests.d.ts +15 -0
  54. package/js/components/Switch/index.d.ts +47 -0
  55. package/js/components/Table/TableCell.d.ts +55 -0
  56. package/js/components/Table/TableCellTests.d.ts +11 -0
  57. package/js/components/Table/Tests.d.ts +11 -0
  58. package/js/components/Table/constants.d.ts +9 -0
  59. package/js/components/Text/Tests.d.ts +10 -0
  60. package/js/components/Text/index.d.ts +935 -0
  61. package/js/components/Thumbnail/Tests.d.ts +11 -0
  62. package/js/components/Thumbnail/index.d.ts +84 -0
  63. package/js/components/Thumbnail/types.d.ts +45 -0
  64. package/js/components/Thumbnail/utils.d.ts +79 -0
  65. package/js/components/Toolbar/Tests.d.ts +12 -0
  66. package/js/constants/enums/index.d.ts +9 -0
  67. package/js/constants/enums/index.js +10 -1
  68. package/js/constants/index.js +1 -1
  69. package/js/types/AriaAttributes.d.ts +29 -2
  70. package/js/types/PartialBy.d.ts +12 -0
  71. package/js/types/index.d.ts +2 -0
  72. package/js/types/jsx/PropsToOverride.d.ts +2 -0
  73. package/js/utils/classNames/bem/block.d.ts +3 -2
  74. package/js/utils/classNames/bem/element.d.ts +3 -2
  75. package/js/utils/classNames/bem/index.d.ts +5 -4
  76. package/package.json +32 -9
  77. package/stories/controls/color.d.ts +15 -0
  78. package/stories/controls/element.d.ts +16 -0
  79. package/stories/controls/focusPoint.d.ts +8 -0
  80. package/stories/controls/icons.d.ts +66 -0
  81. package/stories/controls/image.d.ts +96 -0
  82. package/stories/controls/selectArgType.d.ts +7 -0
  83. package/stories/controls/theme.d.ts +7 -0
  84. package/stories/controls/typography.d.ts +8 -0
  85. package/stories/controls/withUndefined.d.ts +1 -0
  86. package/stories/types.d.ts +48 -0
  87. package/stories/utils/combinations.d.ts +100 -0
  88. package/stories/utils/concatPath.d.ts +10 -0
  89. package/stories/utils/disableArgTypes.d.ts +7 -0
  90. package/stories/utils/initDemoShadowDOMPortal.d.ts +5 -0
  91. package/stories/utils/lorem.d.ts +7 -0
  92. package/stories/utils/toFlattenProps.d.ts +12 -0
  93. package/stories/utils/withCategory.d.ts +4 -0
  94. package/testing/commonTestsSuiteTL.d.ts +87 -0
  95. package/testing/index.d.ts +1 -0
  96. package/testing/queries.d.ts +4 -0
  97. package/js/utils/events/index.js +0 -2
@@ -0,0 +1,41 @@
1
+ import { ColorWithVariants, ColorVariant } from '../../constants';
2
+ import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';
3
+ import { ICON_SIZES } from './constants';
4
+ export declare const COMPONENT_NAME = "Icon";
5
+ export declare const IconClassName: LumxClassName<typeof COMPONENT_NAME>;
6
+ export type IconSizes = (typeof ICON_SIZES)[number];
7
+ /**
8
+ * Defines the props of the component.
9
+ */
10
+ export interface IconProps extends HasClassName, HasTheme {
11
+ /** Color variant. */
12
+ color?: ColorWithVariants;
13
+ /** Lightened or darkened variant of the selected icon color. */
14
+ colorVariant?: ColorVariant;
15
+ /** Whether the icon has a shape. */
16
+ hasShape?: boolean;
17
+ /**
18
+ * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
19
+ * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
20
+ */
21
+ icon: string;
22
+ /** Size variant. */
23
+ size?: IconSizes;
24
+ /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
25
+ alt?: string;
26
+ /** Vertical alignment of the icon (only applies for icons nested in Text/Heading). */
27
+ verticalAlign?: null | 'middle';
28
+ /** reference to the root element */
29
+ ref?: CommonRef;
30
+ }
31
+ /**
32
+ * Icon component.
33
+ *
34
+ * @param props Component props.
35
+ */
36
+ export declare const Icon: {
37
+ (props: IconProps): import("react").JSX.Element;
38
+ displayName: string;
39
+ className: "lumx-icon";
40
+ defaultProps: Partial<IconProps>;
41
+ };
@@ -0,0 +1,12 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { InputHelperProps } from '.';
3
+ type SetupProps = Partial<InputHelperProps>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<InputHelperProps>) => {
8
+ helper: HTMLElement;
9
+ props: InputHelperProps;
10
+ };
11
+ declare const _default: (renderOptions: SetupOptions<InputHelperProps>) => void;
12
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export declare const INPUT_HELPER_CONFIGURATION: Record<string, {
2
+ color: string;
3
+ }>;
@@ -0,0 +1,26 @@
1
+ import { Kind } from '../../constants';
2
+ import type { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';
3
+ export declare const COMPONENT_NAME = "InputHelper";
4
+ export declare const InputHelperClassName: LumxClassName<typeof COMPONENT_NAME>;
5
+ /**
6
+ * Defines the props of the component.
7
+ */
8
+ export interface InputHelperProps extends HasClassName, HasTheme {
9
+ /** Helper content. */
10
+ children: JSXElement;
11
+ /** Helper variant. */
12
+ kind?: Kind;
13
+ /** ref to the root element `p` */
14
+ ref?: CommonRef;
15
+ /** id for the input helper */
16
+ id?: string;
17
+ }
18
+ /**
19
+ * InputHelper component.
20
+ */
21
+ export declare function InputHelper(props: InputHelperProps): import("react").JSX.Element;
22
+ export declare namespace InputHelper {
23
+ var displayName: string;
24
+ var className: "lumx-input-helper";
25
+ var defaultProps: Partial<InputHelperProps>;
26
+ }
@@ -0,0 +1,12 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { InputLabelProps } from '.';
3
+ type SetupProps = Partial<InputLabelProps>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<InputLabelProps>) => {
8
+ label: HTMLElement;
9
+ props: InputLabelProps;
10
+ };
11
+ declare const _default: (renderOptions: SetupOptions<InputLabelProps>) => void;
12
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';
2
+ import { Typography } from '../../constants';
3
+ export declare const COMPONENT_NAME = "InputLabel";
4
+ export declare const InputLabelClassName: LumxClassName<typeof COMPONENT_NAME>;
5
+ export interface InputLabelProps extends HasClassName, HasTheme {
6
+ /** Typography variant. */
7
+ typography?: Typography;
8
+ /** Label content. */
9
+ children: JSXElement;
10
+ /** Native htmlFor property. */
11
+ htmlFor: string;
12
+ /** Whether the component is required or not. */
13
+ isRequired?: boolean;
14
+ /** ref to the root element */
15
+ ref?: CommonRef;
16
+ }
17
+ /**
18
+ * InputLabel component.
19
+ */
20
+ export declare function InputLabel(props: InputLabelProps): import("react").JSX.Element;
21
+ export declare namespace InputLabel {
22
+ var displayName: string;
23
+ var className: "lumx-input-label";
24
+ var defaultProps: Partial<InputLabelProps>;
25
+ }
@@ -0,0 +1,8 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
3
+ props: any;
4
+ link: HTMLElement;
5
+ wrapper: Partial<import("../../../testing").SetupResult>;
6
+ };
7
+ declare const _default: (renderOptions: SetupOptions<any>) => void;
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { MessageProps } from '.';
3
+ type SetupProps = Partial<MessageProps>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<MessageProps>) => {
8
+ message: HTMLElement;
9
+ icon: HTMLElement | null;
10
+ closeButton: HTMLElement | null;
11
+ props: MessageProps;
12
+ };
13
+ declare const _default: (renderOptions: SetupOptions<MessageProps>) => void;
14
+ export default _default;
@@ -0,0 +1,75 @@
1
+ import { Kind } from '../../constants';
2
+ import type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';
3
+ /**
4
+ * Defines the props of the component.
5
+ */
6
+ export interface MessageProps extends HasClassName {
7
+ /** Content. */
8
+ children?: JSXElement;
9
+ /** Whether the message has a background or not. */
10
+ hasBackground?: boolean;
11
+ /** Message variant. */
12
+ kind?: Kind;
13
+ /** Message custom icon SVG path. */
14
+ icon?: string;
15
+ /** Reference to the message container element. */
16
+ ref?: CommonRef;
17
+ /**
18
+ * Displays a close button.
19
+ *
20
+ * NB: only available if `kind === 'info' && hasBackground === true`
21
+ */
22
+ closeButtonProps?: {
23
+ /** The callback called when the button is clicked */
24
+ onClick: () => void;
25
+ /** The label of the close button. */
26
+ label: string;
27
+ };
28
+ }
29
+ /**
30
+ * Component display name.
31
+ */
32
+ export declare const COMPONENT_NAME = "Message";
33
+ /**
34
+ * Component default class name and class prefix.
35
+ */
36
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
37
+ export declare const block: {
38
+ (additionalClasses: import("classnames/types").ClassValue[]): string;
39
+ (modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
40
+ }, element: {
41
+ (elem: string, additionalClasses: import("classnames/types").ClassValue[]): string;
42
+ (elem: string, modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
43
+ };
44
+ /**
45
+ * Associative map from message kind to color and icon.
46
+ */
47
+ export declare const CONFIG: {
48
+ error: {
49
+ color: "red";
50
+ icon: string;
51
+ };
52
+ info: {
53
+ color: "blue";
54
+ icon: string;
55
+ };
56
+ success: {
57
+ color: "green";
58
+ icon: string;
59
+ };
60
+ warning: {
61
+ color: "yellow";
62
+ icon: string;
63
+ };
64
+ };
65
+ /**
66
+ * Message component.
67
+ *
68
+ * @param props Component props.
69
+ * @return JSX element.
70
+ */
71
+ export declare const Message: {
72
+ (props: MessageProps): import("react").JSX.Element;
73
+ displayName: string;
74
+ className: "lumx-message";
75
+ };
@@ -0,0 +1,30 @@
1
+ import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
+ import { type ProgressCircularSize } from '.';
3
+ export declare function setup({ component, decorators: { withCombinations }, overrides, }: SetupStoriesOptions<{
4
+ overrides: 'Inline';
5
+ decorators: 'withCombinations';
6
+ }>): {
7
+ meta: {
8
+ component: any;
9
+ args: Partial<import(".").ProgressCircularProps>;
10
+ argTypes: {
11
+ size: {
12
+ control: {
13
+ type: "select" | "inline-radio";
14
+ };
15
+ options: ProgressCircularSize[];
16
+ mapping: Record<string, ProgressCircularSize> | undefined;
17
+ };
18
+ };
19
+ };
20
+ /** Default progress circular */
21
+ Default: {};
22
+ /** All sizes */
23
+ AllSizes: {
24
+ decorators: ((story: any, context: any) => any)[];
25
+ };
26
+ /** Inline display variant to use inside text */
27
+ Inline: {
28
+ [x: string]: any;
29
+ };
30
+ };
@@ -0,0 +1,11 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ /**
3
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
4
+ */
5
+ export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
6
+ props: any;
7
+ element: HTMLElement;
8
+ wrapper: Partial<import("../../../testing").SetupResult>;
9
+ };
10
+ declare const _default: (renderOptions: SetupOptions<any>) => void;
11
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import type { CommonRef, GenericProps, HasClassName, HasTheme, LumxClassName } from '../../types';
2
+ import { Size } from '../../constants';
3
+ /**
4
+ * Progress sizes.
5
+ */
6
+ export type ProgressCircularSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm'>;
7
+ /**
8
+ * Defines the props of the component.
9
+ */
10
+ export interface ProgressCircularProps extends HasTheme, HasClassName {
11
+ /**
12
+ * Progress circular size.
13
+ */
14
+ size?: ProgressCircularSize;
15
+ /**
16
+ * Progress display type (inline or block).
17
+ * @default 'block'
18
+ */
19
+ display?: 'inline' | 'block';
20
+ /** Component ref */
21
+ ref?: CommonRef;
22
+ /** additional props for the svg */
23
+ svgProps?: GenericProps;
24
+ /** additional props for the circle */
25
+ circleProps?: GenericProps;
26
+ }
27
+ /**
28
+ * Component display name.
29
+ */
30
+ export declare const COMPONENT_NAME = "ProgressCircular";
31
+ /**
32
+ * Component default class name and class prefix.
33
+ */
34
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
35
+ export declare const block: {
36
+ (additionalClasses: import("classnames/types").ClassValue[]): string;
37
+ (modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
38
+ }, element: {
39
+ (elem: string, additionalClasses: import("classnames/types").ClassValue[]): string;
40
+ (elem: string, modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
41
+ };
42
+ /**
43
+ * Component default props.
44
+ */
45
+ export declare const DEFAULT_PROPS: Partial<ProgressCircularProps>;
46
+ /**
47
+ * ProgressCircular component.
48
+ *
49
+ * @param props Component props.
50
+ * @return JSX element.
51
+ */
52
+ export declare const ProgressCircular: (props: ProgressCircularProps) => import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
+ export declare function setup({ component, }: SetupStoriesOptions<{
3
+ decorators?: never;
4
+ }>): {
5
+ meta: {
6
+ component: any;
7
+ args: Partial<import(".").ProgressLinearProps>;
8
+ };
9
+ /** Default progress linear */
10
+ Default: {};
11
+ };
@@ -0,0 +1,11 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ /**
3
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
4
+ */
5
+ export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
6
+ props: any;
7
+ element: HTMLElement;
8
+ wrapper: Partial<import("../../../testing").SetupResult>;
9
+ };
10
+ declare const _default: (renderOptions: SetupOptions<any>) => void;
11
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';
2
+ /**
3
+ * Defines the props of the component.
4
+ */
5
+ export interface ProgressLinearProps extends HasTheme, HasClassName {
6
+ /** Component ref */
7
+ ref?: CommonRef;
8
+ }
9
+ /**
10
+ * Component display name.
11
+ */
12
+ export declare const COMPONENT_NAME = "ProgressLinear";
13
+ /**
14
+ * Component default class name and class prefix.
15
+ */
16
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
17
+ /**
18
+ * Component default props.
19
+ */
20
+ export declare const DEFAULT_PROPS: Partial<ProgressLinearProps>;
21
+ /**
22
+ * ProgressLinear component.
23
+ *
24
+ * @param props Component props.
25
+ * @return JSX element.
26
+ */
27
+ export declare const ProgressLinear: (props: ProgressLinearProps) => import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { RadioButtonProps } from '.';
3
+ type SetupProps = Partial<RadioButtonProps>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<RadioButtonProps>) => {
8
+ radioButton: HTMLElement;
9
+ helper: HTMLElement | null;
10
+ label: HTMLElement | null;
11
+ input: HTMLElement;
12
+ props: RadioButtonProps;
13
+ };
14
+ declare const _default: (renderOptions: SetupOptions<RadioButtonProps>) => void;
15
+ export default _default;
@@ -0,0 +1,45 @@
1
+ import type { JSXElement, LumxClassName, HasTheme, HasAriaDisabled, HasDisabled, HasClassName, HasChecked, CommonRef } from '../../types';
2
+ /**
3
+ * Defines the props of the component.
4
+ */
5
+ export interface RadioButtonProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {
6
+ /** Helper text. */
7
+ helper?: string;
8
+ /** Native input id property. */
9
+ id?: string;
10
+ /** Label content. */
11
+ label?: JSXElement;
12
+ /** Native input name property. */
13
+ name?: string;
14
+ /** Native input value property. */
15
+ value?: string;
16
+ /** optional props for input */
17
+ inputProps?: Record<string, any>;
18
+ /** Native input ref. */
19
+ inputRef?: CommonRef;
20
+ /** Native input id. */
21
+ inputId: string;
22
+ /** On change callback. */
23
+ handleChange?(value?: string, name?: string, event?: any): void;
24
+ /** reference to the root element */
25
+ ref?: CommonRef;
26
+ }
27
+ /**
28
+ * Component display name.
29
+ */
30
+ export declare const COMPONENT_NAME = "RadioButton";
31
+ /**
32
+ * Component default class name and class prefix.
33
+ */
34
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
35
+ /**
36
+ * Component default props.
37
+ */
38
+ export declare const DEFAULT_PROPS: Partial<RadioButtonProps>;
39
+ /**
40
+ * RadioButton component.
41
+ *
42
+ * @param props Component props.
43
+ * @return JSX element.
44
+ */
45
+ export declare const RadioButton: (props: RadioButtonProps) => import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { RawClickableProps } from '.';
2
+ import { SetupOptions } from '../../../testing';
3
+ type SetupProps = Partial<RawClickableProps<any>>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, screen, ...options }: SetupOptions<RawClickableProps<any>>) => {
8
+ element: HTMLElement;
9
+ props: Omit<any, "ref"> & {
10
+ as?: any;
11
+ } & Record<string, unknown> & import(".").BaseClickableProps;
12
+ };
13
+ declare const _default: (renderOptions: SetupOptions<RawClickableProps<any>>) => void;
14
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { CommonRef, HasPolymorphicAs, HasRequiredLinkHref, HasDisabled, JSXElement, ElementType, HasAriaDisabled } from '../../types';
2
+ export type ClickableElement = 'a' | 'button' | ElementType;
3
+ export interface BaseClickableProps extends HasDisabled, HasAriaDisabled {
4
+ children?: JSXElement;
5
+ handleClick?: (event?: any) => void;
6
+ handleKeyPress?: (event?: any) => void;
7
+ ref?: CommonRef;
8
+ }
9
+ export type RawClickableProps<E extends ClickableElement> = HasPolymorphicAs<E> & HasRequiredLinkHref<E> & BaseClickableProps;
10
+ /**
11
+ * Render clickable element (link, button or custom element)
12
+ * (also does some basic disabled state handling)
13
+ */
14
+ export declare const RawClickable: <E extends ClickableElement>(props: RawClickableProps<E>) => import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';
2
+ import type { GlobalSize, ColorPalette } from '../../constants';
3
+ /**
4
+ * Defines the props of the component.
5
+ */
6
+ export interface SkeletonCircleProps extends HasTheme, HasClassName {
7
+ /** Size variant. */
8
+ size: GlobalSize;
9
+ /** The color of the skeleton. */
10
+ color?: ColorPalette;
11
+ /** Reference to the root element. */
12
+ ref?: CommonRef;
13
+ }
14
+ /**
15
+ * Component display name.
16
+ */
17
+ export declare const COMPONENT_NAME = "SkeletonCircle";
18
+ /**
19
+ * Component default class name and class prefix.
20
+ */
21
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
22
+ /**
23
+ * Component default props.
24
+ */
25
+ export declare const DEFAULT_PROPS: Partial<SkeletonCircleProps>;
26
+ /**
27
+ * SkeletonCircle component.
28
+ *
29
+ * @param props Component props.
30
+ * @return JSX element.
31
+ */
32
+ export declare const SkeletonCircle: (props: SkeletonCircleProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { SkeletonCircleProps } from './SkeletonCircle';
3
+ type SetupProps = Partial<SkeletonCircleProps>;
4
+ /**
5
+ * Mounts the SkeletonCircle component and returns common DOM elements needed in tests.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<SkeletonCircleProps>) => {
8
+ skeletonCircle: HTMLElement;
9
+ props: SkeletonCircleProps;
10
+ };
11
+ declare const _default: (renderOptions: SetupOptions<SkeletonCircleProps>) => void;
12
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import type { LumxClassName, HasTheme, HasClassName, CommonRef, ValueOf } from '../../types';
2
+ import type { GlobalSize, ColorPalette, AspectRatio } from '../../constants';
3
+ /**
4
+ * Skeleton variants.
5
+ */
6
+ export declare const SkeletonRectangleVariant: {
7
+ readonly squared: "squared";
8
+ readonly rounded: "rounded";
9
+ readonly pill: "pill";
10
+ };
11
+ export type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleVariant>;
12
+ /**
13
+ * Defines the props of the component.
14
+ */
15
+ export interface SkeletonRectangleProps extends HasTheme, HasClassName {
16
+ /** Aspect ratio (use with width and not height). */
17
+ aspectRatio?: Extract<AspectRatio, 'square' | 'horizontal' | 'vertical' | 'wide'>;
18
+ /** Height size. */
19
+ height?: GlobalSize;
20
+ /** Border variant. */
21
+ variant?: SkeletonRectangleVariant;
22
+ /** Width size. */
23
+ width?: GlobalSize;
24
+ /** The color of the skeleton. */
25
+ color?: ColorPalette;
26
+ /** Reference to the root element. */
27
+ ref?: CommonRef;
28
+ }
29
+ /**
30
+ * Component display name.
31
+ */
32
+ export declare const COMPONENT_NAME = "SkeletonRectangle";
33
+ /**
34
+ * Component default class name and class prefix.
35
+ */
36
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
37
+ /**
38
+ * Component default props.
39
+ */
40
+ export declare const DEFAULT_PROPS: Partial<SkeletonRectangleProps>;
41
+ /**
42
+ * SkeletonRectangle component.
43
+ *
44
+ * @param props Component props.
45
+ * @return JSX element.
46
+ */
47
+ export declare const SkeletonRectangle: (props: SkeletonRectangleProps) => import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { SkeletonRectangleProps } from './SkeletonRectangle';
3
+ type SetupProps = Partial<SkeletonRectangleProps>;
4
+ /**
5
+ * Mounts the SkeletonRectangle component and returns common DOM elements needed in tests.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<SkeletonRectangleProps>) => {
8
+ skeletonRectangle: HTMLElement;
9
+ inner: HTMLElement | null;
10
+ props: SkeletonRectangleProps;
11
+ };
12
+ declare const _default: (renderOptions: SetupOptions<SkeletonRectangleProps>) => void;
13
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';
3
+ import type { ColorPalette, TypographyInterface } from '../../constants';
4
+ /**
5
+ * Defines the props of the component.
6
+ */
7
+ export interface SkeletonTypographyProps extends HasTheme, HasClassName {
8
+ /** Typography variant. */
9
+ typography: TypographyInterface;
10
+ /** Width CSS property. */
11
+ width?: CSSProperties['width'];
12
+ /** The color of the skeleton. */
13
+ color?: ColorPalette;
14
+ /** Reference to the root element. */
15
+ ref?: CommonRef;
16
+ /** Style object. */
17
+ style?: CSSProperties;
18
+ }
19
+ /**
20
+ * Component display name.
21
+ */
22
+ export declare const COMPONENT_NAME = "SkeletonTypography";
23
+ /**
24
+ * Component default class name and class prefix.
25
+ */
26
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
27
+ /**
28
+ * Component default props.
29
+ */
30
+ export declare const DEFAULT_PROPS: Partial<SkeletonTypographyProps>;
31
+ /**
32
+ * SkeletonTypography component.
33
+ *
34
+ * @param props Component props.
35
+ * @return JSX element.
36
+ */
37
+ export declare const SkeletonTypography: (props: SkeletonTypographyProps) => import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { SkeletonTypographyProps } from './SkeletonTypography';
3
+ type SetupProps = Partial<SkeletonTypographyProps>;
4
+ /**
5
+ * Mounts the SkeletonTypography component and returns common DOM elements needed in tests.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<SkeletonTypographyProps>) => {
8
+ skeletonTypography: HTMLElement;
9
+ inner: HTMLElement | null;
10
+ props: SkeletonTypographyProps;
11
+ };
12
+ declare const _default: (renderOptions: SetupOptions<SkeletonTypographyProps>) => void;
13
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { SkeletonCircle, type SkeletonCircleProps, COMPONENT_NAME as SKELETON_CIRCLE_COMPONENT_NAME, CLASSNAME as SKELETON_CIRCLE_CLASSNAME, DEFAULT_PROPS as SKELETON_CIRCLE_DEFAULT_PROPS, } from './SkeletonCircle';
2
+ export { SkeletonRectangle, type SkeletonRectangleProps, SkeletonRectangleVariant, COMPONENT_NAME as SKELETON_RECTANGLE_COMPONENT_NAME, CLASSNAME as SKELETON_RECTANGLE_CLASSNAME, DEFAULT_PROPS as SKELETON_RECTANGLE_DEFAULT_PROPS, } from './SkeletonRectangle';
3
+ export { SkeletonTypography, type SkeletonTypographyProps, COMPONENT_NAME as SKELETON_TYPOGRAPHY_COMPONENT_NAME, CLASSNAME as SKELETON_TYPOGRAPHY_CLASSNAME, DEFAULT_PROPS as SKELETON_TYPOGRAPHY_DEFAULT_PROPS, } from './SkeletonTypography';
@@ -0,0 +1,15 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ import { SwitchProps } from '.';
3
+ type SetupProps = Partial<SwitchProps>;
4
+ /**
5
+ * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
6
+ */
7
+ export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<SwitchProps>) => {
8
+ switchWrapper: HTMLElement;
9
+ helper: HTMLElement | null;
10
+ label: HTMLElement | null;
11
+ input: HTMLElement;
12
+ props: SwitchProps;
13
+ };
14
+ declare const _default: (renderOptions: SetupOptions<SwitchProps>) => void;
15
+ export default _default;