colibri-ui 0.8.98 → 0.8.99
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/Accordion/index.js +4 -2
- package/Accordion/index.props.d.ts +2 -1
- package/Avatar/index.js +2 -5
- package/Avatar/index.props.d.ts +2 -1
- package/Badge/Control/index.props.d.ts +2 -1
- package/Badge/index.js +1 -2
- package/Button/index.js +0 -1
- package/Checkbox/index.js +4 -2
- package/Checkbox/index.props.d.ts +2 -1
- package/Chip/index.js +2 -4
- package/Chip/index.props.d.ts +2 -2
- package/ColorPicker/ColorPicker.d.ts +1 -1
- package/ColorPicker/ColorPicker.js +4 -2
- package/ColorPicker/index.props.d.ts +2 -1
- package/Counter/index.js +4 -2
- package/Counter/index.props.d.ts +2 -1
- package/Datepicker/index.d.ts +1 -1
- package/Datepicker/index.js +5 -3
- package/Datepicker/index.props.d.ts +2 -1
- package/DotsLoader/index.js +5 -2
- package/DotsLoader/index.props.d.ts +2 -1
- package/Dropdown/index.js +2 -2
- package/Dropdown/index.props.d.ts +2 -1
- package/Grid/index.js +3 -1
- package/Grid/index.props.d.ts +2 -1
- package/InputRadio/index.js +3 -3
- package/InputRadio/index.props.d.ts +2 -2
- package/Menu/components/MenuItem/index.js +0 -1
- package/Menu/components/MenuItem/index.props.d.ts +2 -1
- package/Menu/index.d.ts +1 -1
- package/Menu/index.js +4 -2
- package/Menu/index.props.d.ts +2 -1
- package/Modal/index.js +3 -1
- package/Modal/index.props.d.ts +2 -1
- package/MultiSelect/index.js +3 -1
- package/RadioGroup/Radio.js +2 -2
- package/RadioGroup/index.js +1 -1
- package/RadioGroup/index.props.d.ts +1 -1
- package/Select/index.d.ts +1 -1
- package/Select/index.js +4 -3
- package/Separator/index.js +6 -4
- package/Separator/index.props.d.ts +2 -1
- package/Skeleton/index.js +6 -2
- package/Skeleton/index.props.d.ts +3 -2
- package/Status/index.d.ts +1 -1
- package/Status/index.js +3 -1
- package/Status/index.props.d.ts +2 -1
- package/TextArea/index.js +0 -1
- package/TimeSelect/index.js +3 -1
- package/Tooltip/index.js +3 -1
- package/Tooltip/index.props.d.ts +2 -1
- package/base/FormField/index.d.ts +1 -1
- package/base/FormField/index.js +4 -2
- package/base/FormField/index.props.d.ts +2 -1
- package/esm/Accordion/index.js +4 -2
- package/esm/Accordion/index.props.d.ts +2 -1
- package/esm/Avatar/index.js +2 -5
- package/esm/Avatar/index.props.d.ts +2 -1
- package/esm/Badge/Control/index.props.d.ts +2 -1
- package/esm/Badge/index.js +1 -2
- package/esm/Button/index.js +0 -1
- package/esm/Checkbox/index.js +4 -2
- package/esm/Checkbox/index.props.d.ts +2 -1
- package/esm/Chip/index.js +2 -4
- package/esm/Chip/index.props.d.ts +2 -2
- package/esm/ColorPicker/ColorPicker.d.ts +1 -1
- package/esm/ColorPicker/ColorPicker.js +4 -2
- package/esm/ColorPicker/index.props.d.ts +2 -1
- package/esm/Counter/index.js +4 -2
- package/esm/Counter/index.props.d.ts +2 -1
- package/esm/Datepicker/index.d.ts +1 -1
- package/esm/Datepicker/index.js +5 -3
- package/esm/Datepicker/index.props.d.ts +2 -1
- package/esm/DotsLoader/index.js +5 -2
- package/esm/DotsLoader/index.props.d.ts +2 -1
- package/esm/Dropdown/index.js +2 -2
- package/esm/Dropdown/index.props.d.ts +2 -1
- package/esm/Grid/index.js +3 -1
- package/esm/Grid/index.props.d.ts +2 -1
- package/esm/InputRadio/index.js +3 -3
- package/esm/InputRadio/index.props.d.ts +2 -2
- package/esm/Menu/components/MenuItem/index.js +0 -1
- package/esm/Menu/components/MenuItem/index.props.d.ts +2 -1
- package/esm/Menu/index.d.ts +1 -1
- package/esm/Menu/index.js +4 -2
- package/esm/Menu/index.props.d.ts +2 -1
- package/esm/Modal/index.js +3 -1
- package/esm/Modal/index.props.d.ts +2 -1
- package/esm/MultiSelect/index.js +3 -1
- package/esm/RadioGroup/Radio.js +2 -2
- package/esm/RadioGroup/index.js +1 -1
- package/esm/RadioGroup/index.props.d.ts +1 -1
- package/esm/Select/index.d.ts +1 -1
- package/esm/Select/index.js +4 -3
- package/esm/Separator/index.js +6 -4
- package/esm/Separator/index.props.d.ts +2 -1
- package/esm/Skeleton/index.js +6 -2
- package/esm/Skeleton/index.props.d.ts +3 -2
- package/esm/Status/index.d.ts +1 -1
- package/esm/Status/index.js +3 -1
- package/esm/Status/index.props.d.ts +2 -1
- package/esm/TextArea/index.js +0 -1
- package/esm/TimeSelect/index.js +3 -1
- package/esm/Tooltip/index.js +3 -1
- package/esm/Tooltip/index.props.d.ts +2 -1
- package/esm/base/FormField/index.d.ts +1 -1
- package/esm/base/FormField/index.js +4 -2
- package/esm/base/FormField/index.props.d.ts +2 -1
- package/esm/helpers/testId.d.ts +18 -0
- package/esm/index.d.ts +1 -0
- package/helpers/testId.d.ts +18 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/Status/index.js
CHANGED
|
@@ -16,8 +16,10 @@ const Status = ({
|
|
|
16
16
|
showIndicator = true,
|
|
17
17
|
tag: Component = "span",
|
|
18
18
|
children,
|
|
19
|
-
type
|
|
19
|
+
type,
|
|
20
|
+
"data-testid": testId
|
|
20
21
|
}) => (/*#__PURE__*/React__default.default.createElement(Component, {
|
|
22
|
+
"data-testid": testId,
|
|
21
23
|
className: clsx__default.default(styles__default.default.root, {
|
|
22
24
|
[styles__default.default[`root_${type}`]]: Boolean(type)
|
|
23
25
|
}, className)
|
package/Status/index.props.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
2
3
|
export type StatusTag = "span" | "div";
|
|
3
4
|
export declare enum STATUS_TYPE {
|
|
4
5
|
SUCCESS = "success",
|
|
@@ -6,7 +7,7 @@ export declare enum STATUS_TYPE {
|
|
|
6
7
|
INFO = "info",
|
|
7
8
|
WARNING = "warning"
|
|
8
9
|
}
|
|
9
|
-
export type StatusProps = {
|
|
10
|
+
export type StatusProps = TestIdProps & {
|
|
10
11
|
className?: string;
|
|
11
12
|
indicator?: ReactNode;
|
|
12
13
|
showIndicator?: boolean;
|
package/TextArea/index.js
CHANGED
|
@@ -53,7 +53,6 @@ const TextArea = _a => {
|
|
|
53
53
|
hasError: hasError
|
|
54
54
|
}, /*#__PURE__*/React__default.default.createElement(TextareaAutosize__default.default, Object.assign({
|
|
55
55
|
ref: inputRef,
|
|
56
|
-
"data-testid": "textarea",
|
|
57
56
|
disabled: disabled,
|
|
58
57
|
minRows: minRows,
|
|
59
58
|
maxRows: maxRows,
|
package/TimeSelect/index.js
CHANGED
|
@@ -29,7 +29,8 @@ const TimeSelect = ({
|
|
|
29
29
|
zIndex,
|
|
30
30
|
hasError,
|
|
31
31
|
hint,
|
|
32
|
-
"aria-label": ariaLabel
|
|
32
|
+
"aria-label": ariaLabel,
|
|
33
|
+
"data-testid": testId
|
|
33
34
|
}) => {
|
|
34
35
|
const baseOptions = React.useMemo(() => helpers.generateSuggest(interval).map(item => ({
|
|
35
36
|
value: item.time,
|
|
@@ -45,6 +46,7 @@ const TimeSelect = ({
|
|
|
45
46
|
}), [baseOptions, currentDate, selectedDate, allowedTimeRange, interval]);
|
|
46
47
|
return /*#__PURE__*/React__default.default.createElement(index$1.Select, {
|
|
47
48
|
"aria-label": ariaLabel,
|
|
49
|
+
"data-testid": testId,
|
|
48
50
|
className: className,
|
|
49
51
|
customInputRoot: customInputRoot,
|
|
50
52
|
fontSize: fontSize,
|
package/Tooltip/index.js
CHANGED
|
@@ -18,7 +18,8 @@ const Tooltip = ({
|
|
|
18
18
|
withTail = false,
|
|
19
19
|
placement = "bottom",
|
|
20
20
|
strategy = "absolute",
|
|
21
|
-
className
|
|
21
|
+
className,
|
|
22
|
+
"data-testid": testId
|
|
22
23
|
}) => {
|
|
23
24
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
24
25
|
const arrowRef = React.useRef(null);
|
|
@@ -66,6 +67,7 @@ const Tooltip = ({
|
|
|
66
67
|
ref: refs.setFloating
|
|
67
68
|
}, getFloatingProps(), {
|
|
68
69
|
className: clsx__default.default(styles__default.default.tooltip, className),
|
|
70
|
+
"data-testid": testId,
|
|
69
71
|
style: Object.assign(Object.assign({}, floatingStyles), {
|
|
70
72
|
zIndex
|
|
71
73
|
})
|
package/Tooltip/index.props.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Placement, Strategy } from "@floating-ui/react";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
|
|
3
|
+
import type { PopupTestIdProps } from "../helpers/testId";
|
|
4
|
+
export type TooltipProps = PopupTestIdProps & {
|
|
4
5
|
content: ReactNode;
|
|
5
6
|
zIndex?: number;
|
|
6
7
|
placement?: Placement;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { FormFieldProps } from "./index.props";
|
|
3
|
-
export declare const FormField: ({ label, hint, children, hasError, hintId, htmlFor, labelId, required, className, ref, }: FormFieldProps) => React.JSX.Element;
|
|
3
|
+
export declare const FormField: ({ label, hint, children, hasError, hintId, htmlFor, labelId, required, className, ref, "data-testid": testId, }: FormFieldProps) => React.JSX.Element;
|
package/base/FormField/index.js
CHANGED
|
@@ -21,10 +21,12 @@ const FormField = ({
|
|
|
21
21
|
labelId,
|
|
22
22
|
required,
|
|
23
23
|
className,
|
|
24
|
-
ref
|
|
24
|
+
ref,
|
|
25
|
+
"data-testid": testId
|
|
25
26
|
}) => (/*#__PURE__*/React__default.default.createElement("div", {
|
|
26
27
|
className: clsx__default.default(styles__default.default.container, className),
|
|
27
|
-
ref: ref
|
|
28
|
+
ref: ref,
|
|
29
|
+
"data-testid": testId
|
|
28
30
|
}, label && (/*#__PURE__*/React__default.default.createElement(index.Typography, {
|
|
29
31
|
className: clsx__default.default(styles__default.default.label, {
|
|
30
32
|
[styles__default.default.label_required]: Boolean(required)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { PropsWithChildren } from "react";
|
|
3
|
-
|
|
3
|
+
import type { TestIdProps } from "../../helpers/testId";
|
|
4
|
+
export type FormFieldProps = PropsWithChildren<TestIdProps & {
|
|
4
5
|
className?: string;
|
|
5
6
|
hasError?: boolean;
|
|
6
7
|
hint?: ReactNode;
|
package/esm/Accordion/index.js
CHANGED
|
@@ -11,7 +11,8 @@ const Accordion = ({
|
|
|
11
11
|
children,
|
|
12
12
|
className,
|
|
13
13
|
tabIndex,
|
|
14
|
-
defaultOpen = false
|
|
14
|
+
defaultOpen = false,
|
|
15
|
+
"data-testid": testId
|
|
15
16
|
}) => {
|
|
16
17
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
17
18
|
const contentRef = useRef(null);
|
|
@@ -35,7 +36,8 @@ const Accordion = ({
|
|
|
35
36
|
return () => observer.disconnect();
|
|
36
37
|
}, [isOpen]);
|
|
37
38
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: clsx(styles.root, className)
|
|
39
|
+
className: clsx(styles.root, className),
|
|
40
|
+
"data-testid": testId
|
|
39
41
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: styles.header
|
|
41
43
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropsWithChildren, ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
|
+
export type AccordionProps = PropsWithChildren<TestIdProps & {
|
|
3
4
|
title: ReactNode;
|
|
4
5
|
className?: string;
|
|
5
6
|
boldTitle?: boolean;
|
package/esm/Avatar/index.js
CHANGED
|
@@ -84,7 +84,6 @@ const Avatar = /*#__PURE__*/memo(props => {
|
|
|
84
84
|
})
|
|
85
85
|
}, onClick && roleProps), /*#__PURE__*/React.createElement("img", Object.assign({
|
|
86
86
|
ref: ref,
|
|
87
|
-
"data-testid": "avatar",
|
|
88
87
|
alt: alt,
|
|
89
88
|
src: src,
|
|
90
89
|
className: clsx(styles.avatar, {
|
|
@@ -94,8 +93,7 @@ const Avatar = /*#__PURE__*/memo(props => {
|
|
|
94
93
|
}
|
|
95
94
|
if (hasInitials) {
|
|
96
95
|
return /*#__PURE__*/React.createElement("span", Object.assign({
|
|
97
|
-
ref: ref
|
|
98
|
-
"data-testid": "avatar"
|
|
96
|
+
ref: ref
|
|
99
97
|
}, roleProps, {
|
|
100
98
|
className: clsx(styles["avatar-initials"], {
|
|
101
99
|
[styles["avatar-bordered"]]: Boolean(bordered),
|
|
@@ -106,8 +104,7 @@ const Avatar = /*#__PURE__*/memo(props => {
|
|
|
106
104
|
}, initials.trim().slice(0, 2)));
|
|
107
105
|
}
|
|
108
106
|
return /*#__PURE__*/React.createElement("span", Object.assign({
|
|
109
|
-
ref: ref
|
|
110
|
-
"data-testid": "avatar"
|
|
107
|
+
ref: ref
|
|
111
108
|
}, roleProps, {
|
|
112
109
|
className: clsx(styles["avatar-stub"], {
|
|
113
110
|
[styles["avatar-bordered"]]: Boolean(bordered),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AvatarSize } from "./constants";
|
|
2
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
2
3
|
export declare enum AccountType {
|
|
3
4
|
Person = "person",
|
|
4
5
|
Organization = "org"
|
|
5
6
|
}
|
|
6
|
-
export type AvatarProps = {
|
|
7
|
+
export type AvatarProps = TestIdProps & {
|
|
7
8
|
accountType?: AccountType;
|
|
8
9
|
alt?: string;
|
|
9
10
|
size?: AvatarSize;
|
package/esm/Badge/index.js
CHANGED
|
@@ -24,8 +24,7 @@ const Badge = _a => {
|
|
|
24
24
|
className: clsx(styles.root, {
|
|
25
25
|
[styles[`root_direction_${direction}`]]: Boolean(direction),
|
|
26
26
|
[styles["root_invisible"]]: Boolean(invisible)
|
|
27
|
-
}, className)
|
|
28
|
-
"data-testid": "badge"
|
|
27
|
+
}, className)
|
|
29
28
|
}, displayValue)));
|
|
30
29
|
};
|
|
31
30
|
|
package/esm/Button/index.js
CHANGED
|
@@ -30,7 +30,6 @@ const Button = _a => {
|
|
|
30
30
|
[styles[`variant_${variant}_disabled`]]: Boolean(disabled)
|
|
31
31
|
}, className),
|
|
32
32
|
disabled: disabled,
|
|
33
|
-
"data-testid": "button",
|
|
34
33
|
type: type || "button"
|
|
35
34
|
}, props), icon && /*#__PURE__*/React.createElement("span", {
|
|
36
35
|
className: styles.icon
|
package/esm/Checkbox/index.js
CHANGED
|
@@ -16,9 +16,11 @@ const Checkbox = ({
|
|
|
16
16
|
variant = "primary",
|
|
17
17
|
className,
|
|
18
18
|
disabled,
|
|
19
|
-
hasError
|
|
19
|
+
hasError,
|
|
20
|
+
"data-testid": testId
|
|
20
21
|
}) => (/*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: styles.root
|
|
22
|
+
className: styles.root,
|
|
23
|
+
"data-testid": testId
|
|
22
24
|
}, /*#__PURE__*/React.createElement("label", {
|
|
23
25
|
className: styles.label,
|
|
24
26
|
htmlFor: id
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FocusEvent, ChangeEvent, ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
|
+
export interface CheckboxProps extends TestIdProps {
|
|
3
4
|
checked?: boolean;
|
|
4
5
|
className?: string;
|
|
5
6
|
disabled?: boolean;
|
package/esm/Chip/index.js
CHANGED
|
@@ -11,13 +11,11 @@ const Chip = _a => {
|
|
|
11
11
|
onClick,
|
|
12
12
|
onClickIcon,
|
|
13
13
|
size = "m",
|
|
14
|
-
testID = "chip",
|
|
15
14
|
variant = "primary"
|
|
16
15
|
} = _a,
|
|
17
|
-
props = __rest(_a, ["children", "iconEnd", "isActive", "onClick", "onClickIcon", "size", "
|
|
16
|
+
props = __rest(_a, ["children", "iconEnd", "isActive", "onClick", "onClickIcon", "size", "variant"]);
|
|
18
17
|
return /*#__PURE__*/React.createElement("span", Object.assign({
|
|
19
|
-
className: styles.chip
|
|
20
|
-
"data-testid": testID
|
|
18
|
+
className: styles.chip
|
|
21
19
|
}, props), /*#__PURE__*/React.createElement("span", {
|
|
22
20
|
className: clsx(styles.inner, styles[`inner_variant_${variant}`], {
|
|
23
21
|
[styles["inner_active"]]: iconEnd || isActive,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
1
2
|
export type ChipSize = "s" | "m" | "l";
|
|
2
3
|
export type ChipVariant = "primary" | "secondary" | "outline" | "pseudo" | "alert" | "success" | "clear";
|
|
3
|
-
export type ChipProps = {
|
|
4
|
+
export type ChipProps = TestIdProps & {
|
|
4
5
|
size?: ChipSize;
|
|
5
6
|
variant?: ChipVariant;
|
|
6
|
-
testID?: string;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
iconEnd?: React.ReactNode;
|
|
9
9
|
onClick?: () => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ColorPickerProps } from "./index.props";
|
|
3
|
-
export declare const ColorPicker: ({ value, onChange, presets, columns, disabled, placement, zIndex, labels: labelsProp, children, }: ColorPickerProps) => React.JSX.Element;
|
|
3
|
+
export declare const ColorPicker: ({ value, onChange, presets, columns, disabled, placement, zIndex, labels: labelsProp, children, "data-testid": testId, }: ColorPickerProps) => React.JSX.Element;
|
|
@@ -23,7 +23,8 @@ const ColorPicker = ({
|
|
|
23
23
|
placement = "bottom-start",
|
|
24
24
|
zIndex,
|
|
25
25
|
labels: labelsProp,
|
|
26
|
-
children
|
|
26
|
+
children,
|
|
27
|
+
"data-testid": testId
|
|
27
28
|
}) => {
|
|
28
29
|
var _a, _b;
|
|
29
30
|
const [isOpen, setOpen] = useState(false);
|
|
@@ -77,7 +78,8 @@ const ColorPicker = ({
|
|
|
77
78
|
}));
|
|
78
79
|
return /*#__PURE__*/React.createElement("span", {
|
|
79
80
|
ref: rootRef,
|
|
80
|
-
className: styles.root
|
|
81
|
+
className: styles.root,
|
|
82
|
+
"data-testid": testId
|
|
81
83
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
82
84
|
trigger: ["click"],
|
|
83
85
|
visible: isOpen,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import type { Placement } from "@floating-ui/react";
|
|
3
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
4
|
export interface ColorPickerPreset {
|
|
4
5
|
/** HEX color, for example `#d81b60`. */
|
|
5
6
|
value: string;
|
|
@@ -24,7 +25,7 @@ export interface ColorPickerLabels {
|
|
|
24
25
|
cancel: string;
|
|
25
26
|
save: string;
|
|
26
27
|
}
|
|
27
|
-
export interface ColorPickerProps {
|
|
28
|
+
export interface ColorPickerProps extends TestIdProps {
|
|
28
29
|
/** Current color in HEX. A color missing from `presets` is shown as an extra swatch. */
|
|
29
30
|
value?: string;
|
|
30
31
|
/** Called with the chosen color as lowercase `#rrggbb`. */
|
package/esm/Counter/index.js
CHANGED
|
@@ -12,7 +12,8 @@ const Counter = ({
|
|
|
12
12
|
fullWidth,
|
|
13
13
|
onChange,
|
|
14
14
|
disabled,
|
|
15
|
-
className
|
|
15
|
+
className,
|
|
16
|
+
"data-testid": testId
|
|
16
17
|
}) => {
|
|
17
18
|
const minusDisabled = disabled || value <= min;
|
|
18
19
|
const plusDisabled = disabled || value >= max;
|
|
@@ -25,7 +26,8 @@ const Counter = ({
|
|
|
25
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
27
|
className: clsx(styles.root, {
|
|
27
28
|
[styles["root_fullWidth"]]: Boolean(fullWidth)
|
|
28
|
-
}, className)
|
|
29
|
+
}, className),
|
|
30
|
+
"data-testid": testId
|
|
29
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
30
32
|
className: clsx(styles.control, {
|
|
31
33
|
[styles["control_fullWidth"]]: Boolean(fullWidth)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
export declare const Datepicker: ({ className, disabled, endPlaceholder, hasError, hint, label, placeholder, required, selectedDate, selectedRange, selectionMode, size, startPlaceholder, onChangeDate, onChangeRange, ...calendarProps }: Props) => React.JSX.Element;
|
|
3
|
+
export declare const Datepicker: ({ className, disabled, endPlaceholder, hasError, hint, label, placeholder, required, selectedDate, selectedRange, selectionMode, size, startPlaceholder, onChangeDate, onChangeRange, "data-testid": testId, ...calendarProps }: Props) => React.JSX.Element;
|
package/esm/Datepicker/index.js
CHANGED
|
@@ -20,11 +20,13 @@ const Datepicker = _a => {
|
|
|
20
20
|
size = "m",
|
|
21
21
|
startPlaceholder,
|
|
22
22
|
onChangeDate,
|
|
23
|
-
onChangeRange
|
|
23
|
+
onChangeRange,
|
|
24
|
+
"data-testid": testId
|
|
24
25
|
} = _a,
|
|
25
|
-
calendarProps = __rest(_a, ["className", "disabled", "endPlaceholder", "hasError", "hint", "label", "placeholder", "required", "selectedDate", "selectedRange", "selectionMode", "size", "startPlaceholder", "onChangeDate", "onChangeRange"]);
|
|
26
|
+
calendarProps = __rest(_a, ["className", "disabled", "endPlaceholder", "hasError", "hint", "label", "placeholder", "required", "selectedDate", "selectedRange", "selectionMode", "size", "startPlaceholder", "onChangeDate", "onChangeRange", "data-testid"]);
|
|
26
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: clsx(styles.root, className)
|
|
28
|
+
className: clsx(styles.root, className),
|
|
29
|
+
"data-testid": testId
|
|
28
30
|
}, /*#__PURE__*/React.createElement(DatePicker, Object.assign({}, calendarProps, {
|
|
29
31
|
disabled: disabled,
|
|
30
32
|
endPlaceholder: endPlaceholder,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { CalendarCommonProps } from "../Calendar";
|
|
3
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
4
|
export type DatepickerSize = "s" | "m" | "l";
|
|
4
5
|
export type DatepickerSelectionMode = "single" | "range";
|
|
5
6
|
export type DatepickerRangeValue = [string, string];
|
|
6
7
|
export type DatepickerCalendarProps = Omit<CalendarCommonProps, "className" | "size">;
|
|
7
|
-
export type Props = DatepickerCalendarProps & {
|
|
8
|
+
export type Props = DatepickerCalendarProps & TestIdProps & {
|
|
8
9
|
className?: string;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
endPlaceholder?: string;
|
package/esm/DotsLoader/index.js
CHANGED
|
@@ -2,8 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import styles from './DotsLoader.module.css';
|
|
4
4
|
|
|
5
|
-
const DotsLoader = (
|
|
6
|
-
|
|
5
|
+
const DotsLoader = ({
|
|
6
|
+
"data-testid": testId
|
|
7
|
+
}) => (/*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: styles.wrapper,
|
|
9
|
+
"data-testid": testId
|
|
7
10
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8
11
|
className: clsx({
|
|
9
12
|
[styles.dot]: true,
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
2
|
+
export type DotsLoaderProps = TestIdProps;
|
package/esm/Dropdown/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import styles from './Dropdown.module.css';
|
|
|
6
6
|
|
|
7
7
|
const Dropdown = ({
|
|
8
8
|
children,
|
|
9
|
+
"data-testid": testId,
|
|
9
10
|
zIndex,
|
|
10
11
|
fontSize,
|
|
11
12
|
disabled,
|
|
@@ -87,7 +88,7 @@ const Dropdown = ({
|
|
|
87
88
|
onClick: () => setOpen(false)
|
|
88
89
|
}, /*#__PURE__*/React.createElement("div", Object.assign({
|
|
89
90
|
ref: refs.setFloating,
|
|
90
|
-
"data-testid":
|
|
91
|
+
"data-testid": testId,
|
|
91
92
|
className: clsx(styles["popper-container"], styles[`placement-${finalPlacement}`]),
|
|
92
93
|
style: Object.assign(Object.assign({}, floatingStyles), {
|
|
93
94
|
zIndex,
|
|
@@ -97,7 +98,6 @@ const Dropdown = ({
|
|
|
97
98
|
role: "menu",
|
|
98
99
|
tabIndex: 0
|
|
99
100
|
}, getFloatingProps()), /*#__PURE__*/React.createElement("div", {
|
|
100
|
-
"data-testid": "overlay-container",
|
|
101
101
|
className: styles["overlay-container"],
|
|
102
102
|
onClick: onClickOverlay
|
|
103
103
|
}, overlay))))));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { Placement, Strategy } from "@floating-ui/react";
|
|
3
|
+
import type { PopupTestIdProps } from "../helpers/testId";
|
|
3
4
|
export type Trigger = "click" | "hover" | "focus";
|
|
4
|
-
export type DropdownProps = {
|
|
5
|
+
export type DropdownProps = PopupTestIdProps & {
|
|
5
6
|
defaultVisible?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
flip?: boolean;
|
package/esm/Grid/index.js
CHANGED
|
@@ -8,9 +8,11 @@ const Grid = ({
|
|
|
8
8
|
gridRowGap = "6",
|
|
9
9
|
gridColumnGap = "4",
|
|
10
10
|
gridItemMinWidth = "var(--component-grid-item-min-width)",
|
|
11
|
-
className
|
|
11
|
+
className,
|
|
12
|
+
"data-testid": testId
|
|
12
13
|
}) => (/*#__PURE__*/React.createElement("div", {
|
|
13
14
|
className: clsx(styles.root, className),
|
|
15
|
+
"data-testid": testId,
|
|
14
16
|
style: {
|
|
15
17
|
rowGap: `var(--space-${gridRowGap})`,
|
|
16
18
|
columnGap: `var(--space-${gridColumnGap})`,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
1
2
|
export type Space = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "8" | "10" | "12" | "16" | "20" | "24" | "32";
|
|
2
|
-
export type GridProps = {
|
|
3
|
+
export type GridProps = TestIdProps & {
|
|
3
4
|
className?: string;
|
|
4
5
|
gridRowGap?: Space;
|
|
5
6
|
gridColumnGap?: Space;
|
package/esm/InputRadio/index.js
CHANGED
|
@@ -23,9 +23,9 @@ const InputRadio = /*#__PURE__*/memo(_a => {
|
|
|
23
23
|
style,
|
|
24
24
|
text,
|
|
25
25
|
value,
|
|
26
|
-
testid
|
|
26
|
+
"data-testid": testId
|
|
27
27
|
} = _a,
|
|
28
|
-
rest = __rest(_a, ["checked", "children", "className", "containerClassName", "disabled", "error", "id", "name", "note", "onBlur", "onFocus", "onChange", "onClick", "onMouseEnter", "style", "text", "value", "testid"]);
|
|
28
|
+
rest = __rest(_a, ["checked", "children", "className", "containerClassName", "disabled", "error", "id", "name", "note", "onBlur", "onFocus", "onChange", "onClick", "onMouseEnter", "style", "text", "value", "data-testid"]);
|
|
29
29
|
return (
|
|
30
30
|
/*#__PURE__*/
|
|
31
31
|
// Keyboard activation of the nested radio dispatches a click that bubbles to the label.
|
|
@@ -36,7 +36,7 @@ const InputRadio = /*#__PURE__*/memo(_a => {
|
|
|
36
36
|
style: style,
|
|
37
37
|
onClick: onClick,
|
|
38
38
|
onMouseEnter: onMouseEnter,
|
|
39
|
-
"data-testid":
|
|
39
|
+
"data-testid": testId
|
|
40
40
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: clsx(styles.container, {
|
|
42
42
|
[styles["container_disabled"]]: Boolean(disabled),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChangeEvent, CSSProperties, FocusEvent, PropsWithChildren } from "react";
|
|
2
|
-
|
|
2
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
|
+
export type InputRadioProps = PropsWithChildren<TestIdProps & {
|
|
3
4
|
checked?: boolean;
|
|
4
5
|
className?: string;
|
|
5
6
|
containerClassName?: string;
|
|
@@ -16,5 +17,4 @@ export type InputRadioProps = PropsWithChildren<{
|
|
|
16
17
|
style?: CSSProperties;
|
|
17
18
|
text?: string;
|
|
18
19
|
value: string | number;
|
|
19
|
-
testid?: string;
|
|
20
20
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { KeyboardEvent, MouseEvent } from "react";
|
|
2
2
|
import type { MenuVariant } from "../../index.props";
|
|
3
|
-
|
|
3
|
+
import type { TestIdProps } from "../../../helpers/testId";
|
|
4
|
+
export interface MenuItemProps extends TestIdProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
isSelected?: boolean;
|
|
6
7
|
onClick?: (event: MouseEvent<Element> | KeyboardEvent<Element>) => void;
|
package/esm/Menu/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
export declare const Menu: ({ selected, variant, className, onClick, children, ref, }: Props) => React.JSX.Element;
|
|
3
|
+
export declare const Menu: ({ selected, variant, className, onClick, children, ref, "data-testid": testId, }: Props) => React.JSX.Element;
|
package/esm/Menu/index.js
CHANGED
|
@@ -8,7 +8,8 @@ const Menu = ({
|
|
|
8
8
|
className,
|
|
9
9
|
onClick,
|
|
10
10
|
children,
|
|
11
|
-
ref
|
|
11
|
+
ref,
|
|
12
|
+
"data-testid": testId
|
|
12
13
|
}) => {
|
|
13
14
|
const renderChild = useMemo(() => Children.map(children, child => {
|
|
14
15
|
if (! /*#__PURE__*/isValidElement(child)) return child;
|
|
@@ -28,7 +29,8 @@ const Menu = ({
|
|
|
28
29
|
return /*#__PURE__*/React.createElement("ul", {
|
|
29
30
|
ref: ref,
|
|
30
31
|
className: clsx(styles.menu, className),
|
|
31
|
-
role: "menu"
|
|
32
|
+
role: "menu",
|
|
33
|
+
"data-testid": testId
|
|
32
34
|
}, renderChild);
|
|
33
35
|
};
|
|
34
36
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactElement, KeyboardEvent, MouseEvent } from "react";
|
|
2
2
|
import type { MenuItemProps } from "./components/MenuItem/index.props";
|
|
3
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
3
4
|
export type MenuVariant = "primary";
|
|
4
|
-
export type Props = {
|
|
5
|
+
export type Props = TestIdProps & {
|
|
5
6
|
selected?: string[];
|
|
6
7
|
variant?: MenuVariant;
|
|
7
8
|
className?: string;
|
package/esm/Modal/index.js
CHANGED
|
@@ -23,7 +23,8 @@ const ModalRoot = ({
|
|
|
23
23
|
onClose,
|
|
24
24
|
title,
|
|
25
25
|
withinParent = false,
|
|
26
|
-
fillParent = false
|
|
26
|
+
fillParent = false,
|
|
27
|
+
"data-testid": testId
|
|
27
28
|
}) => {
|
|
28
29
|
const [dialog, setDialog] = useState(null);
|
|
29
30
|
const [container, setContainer] = useState(null);
|
|
@@ -91,6 +92,7 @@ const ModalRoot = ({
|
|
|
91
92
|
ref: setDialog,
|
|
92
93
|
role: "dialog",
|
|
93
94
|
"aria-modal": "true",
|
|
95
|
+
"data-testid": testId,
|
|
94
96
|
tabIndex: -1,
|
|
95
97
|
"aria-labelledby": titleCount > 0 ? titleId : undefined
|
|
96
98
|
}, /*#__PURE__*/React.createElement("div", {
|
package/esm/MultiSelect/index.js
CHANGED
|
@@ -32,7 +32,8 @@ const MultiSelect = ({
|
|
|
32
32
|
value = [],
|
|
33
33
|
type,
|
|
34
34
|
onChange,
|
|
35
|
-
"aria-label": ariaLabel
|
|
35
|
+
"aria-label": ariaLabel,
|
|
36
|
+
"data-testid": testId
|
|
36
37
|
}) => {
|
|
37
38
|
const [isOpen, setIsOpen] = useState(false);
|
|
38
39
|
const id = useId();
|
|
@@ -72,6 +73,7 @@ const MultiSelect = ({
|
|
|
72
73
|
})
|
|
73
74
|
}))), [preparedGroups]);
|
|
74
75
|
return /*#__PURE__*/React.createElement(FormField, {
|
|
76
|
+
"data-testid": testId,
|
|
75
77
|
className: clsx(styles["form-field"], {
|
|
76
78
|
[styles["full-width"]]: Boolean(fullWidth)
|
|
77
79
|
}, className),
|
package/esm/RadioGroup/Radio.js
CHANGED
|
@@ -14,7 +14,7 @@ const Radio = ({
|
|
|
14
14
|
onMouseEnter,
|
|
15
15
|
className,
|
|
16
16
|
disabled = false,
|
|
17
|
-
testId
|
|
17
|
+
"data-testid": testId
|
|
18
18
|
}) => (/*#__PURE__*/React.createElement(InputRadio, {
|
|
19
19
|
id: id,
|
|
20
20
|
value: value,
|
|
@@ -28,7 +28,7 @@ const Radio = ({
|
|
|
28
28
|
name: name,
|
|
29
29
|
className: className,
|
|
30
30
|
disabled: disabled,
|
|
31
|
-
testid: testId
|
|
31
|
+
"data-testid": testId
|
|
32
32
|
}));
|
|
33
33
|
|
|
34
34
|
export { Radio };
|
package/esm/RadioGroup/index.js
CHANGED