colibri-ui 0.8.97 → 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/NavigationMenu/NavigationMenu.d.ts +3 -0
- package/NavigationMenu/NavigationMenu.js +170 -0
- package/NavigationMenu/NavigationMenu.module.css +67 -0
- package/NavigationMenu/components/MoreMenu/MoreMenu.module.css +19 -0
- package/NavigationMenu/components/MoreMenu/index.d.ts +16 -0
- package/NavigationMenu/components/MoreMenu/index.js +155 -0
- package/NavigationMenu/components/NavigationLink/NavigationLink.module.css +59 -0
- package/NavigationMenu/components/NavigationLink/index.d.ts +16 -0
- package/NavigationMenu/components/NavigationLink/index.js +51 -0
- package/NavigationMenu/helpers.d.ts +9 -0
- package/NavigationMenu/helpers.js +20 -0
- package/NavigationMenu/index.d.ts +2 -0
- package/NavigationMenu/index.js +7 -0
- package/NavigationMenu/index.props.d.ts +40 -0
- package/NavigationMenu/package.json +9 -0
- package/NavigationMenu/splitItems.d.ts +30 -0
- package/NavigationMenu/splitItems.js +54 -0
- package/NavigationMenu/useOverflowSplit.d.ts +25 -0
- package/NavigationMenu/useOverflowSplit.js +63 -0
- 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/Theme/index.d.ts +8 -0
- package/Theme/themes/buenos_aires.d.ts +4 -0
- package/Theme/themes/buenos_aires.js +4 -0
- package/Theme/themes/jaipur.d.ts +4 -0
- package/Theme/themes/jaipur.js +4 -0
- 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/NavigationMenu/NavigationMenu.d.ts +3 -0
- package/esm/NavigationMenu/NavigationMenu.js +162 -0
- package/esm/NavigationMenu/NavigationMenu.module.css +67 -0
- package/esm/NavigationMenu/components/MoreMenu/MoreMenu.module.css +19 -0
- package/esm/NavigationMenu/components/MoreMenu/index.d.ts +16 -0
- package/esm/NavigationMenu/components/MoreMenu/index.js +147 -0
- package/esm/NavigationMenu/components/NavigationLink/NavigationLink.module.css +59 -0
- package/esm/NavigationMenu/components/NavigationLink/index.d.ts +16 -0
- package/esm/NavigationMenu/components/NavigationLink/index.js +41 -0
- package/esm/NavigationMenu/helpers.d.ts +9 -0
- package/esm/NavigationMenu/helpers.js +15 -0
- package/esm/NavigationMenu/index.d.ts +2 -0
- package/esm/NavigationMenu/index.js +1 -0
- package/esm/NavigationMenu/index.props.d.ts +40 -0
- package/esm/NavigationMenu/splitItems.d.ts +30 -0
- package/esm/NavigationMenu/splitItems.js +51 -0
- package/esm/NavigationMenu/useOverflowSplit.d.ts +25 -0
- package/esm/NavigationMenu/useOverflowSplit.js +61 -0
- 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/Theme/index.d.ts +8 -0
- package/esm/Theme/themes/buenos_aires.d.ts +4 -0
- package/esm/Theme/themes/buenos_aires.js +4 -0
- package/esm/Theme/themes/jaipur.d.ts +4 -0
- package/esm/Theme/themes/jaipur.js +4 -0
- 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 +3 -0
- package/esm/index.js +1 -0
- package/esm/theme_ba_variables.css +4 -0
- package/esm/theme_jaipur_variables.css +4 -0
- package/helpers/testId.d.ts +18 -0
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +1 -1
- package/theme_ba_variables.css +4 -0
- package/theme_jaipur_variables.css +4 -0
package/Accordion/index.js
CHANGED
|
@@ -19,7 +19,8 @@ const Accordion = ({
|
|
|
19
19
|
children,
|
|
20
20
|
className,
|
|
21
21
|
tabIndex,
|
|
22
|
-
defaultOpen = false
|
|
22
|
+
defaultOpen = false,
|
|
23
|
+
"data-testid": testId
|
|
23
24
|
}) => {
|
|
24
25
|
const [isOpen, setIsOpen] = React.useState(defaultOpen);
|
|
25
26
|
const contentRef = React.useRef(null);
|
|
@@ -43,7 +44,8 @@ const Accordion = ({
|
|
|
43
44
|
return () => observer.disconnect();
|
|
44
45
|
}, [isOpen]);
|
|
45
46
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
46
|
-
className: clsx__default.default(styles__default.default.root, className)
|
|
47
|
+
className: clsx__default.default(styles__default.default.root, className),
|
|
48
|
+
"data-testid": testId
|
|
47
49
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
48
50
|
className: styles__default.default.header
|
|
49
51
|
}, /*#__PURE__*/React__default.default.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/Avatar/index.js
CHANGED
|
@@ -92,7 +92,6 @@ const Avatar = /*#__PURE__*/React.memo(props => {
|
|
|
92
92
|
})
|
|
93
93
|
}, onClick && roleProps), /*#__PURE__*/React__default.default.createElement("img", Object.assign({
|
|
94
94
|
ref: ref,
|
|
95
|
-
"data-testid": "avatar",
|
|
96
95
|
alt: alt,
|
|
97
96
|
src: src,
|
|
98
97
|
className: clsx__default.default(styles__default.default.avatar, {
|
|
@@ -102,8 +101,7 @@ const Avatar = /*#__PURE__*/React.memo(props => {
|
|
|
102
101
|
}
|
|
103
102
|
if (hasInitials) {
|
|
104
103
|
return /*#__PURE__*/React__default.default.createElement("span", Object.assign({
|
|
105
|
-
ref: ref
|
|
106
|
-
"data-testid": "avatar"
|
|
104
|
+
ref: ref
|
|
107
105
|
}, roleProps, {
|
|
108
106
|
className: clsx__default.default(styles__default.default["avatar-initials"], {
|
|
109
107
|
[styles__default.default["avatar-bordered"]]: Boolean(bordered),
|
|
@@ -114,8 +112,7 @@ const Avatar = /*#__PURE__*/React.memo(props => {
|
|
|
114
112
|
}, initials.trim().slice(0, 2)));
|
|
115
113
|
}
|
|
116
114
|
return /*#__PURE__*/React__default.default.createElement("span", Object.assign({
|
|
117
|
-
ref: ref
|
|
118
|
-
"data-testid": "avatar"
|
|
115
|
+
ref: ref
|
|
119
116
|
}, roleProps, {
|
|
120
117
|
className: clsx__default.default(styles__default.default["avatar-stub"], {
|
|
121
118
|
[styles__default.default["avatar-bordered"]]: Boolean(bordered),
|
package/Avatar/index.props.d.ts
CHANGED
|
@@ -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/Badge/index.js
CHANGED
|
@@ -32,8 +32,7 @@ const Badge = _a => {
|
|
|
32
32
|
className: clsx__default.default(styles__default.default.root, {
|
|
33
33
|
[styles__default.default[`root_direction_${direction}`]]: Boolean(direction),
|
|
34
34
|
[styles__default.default["root_invisible"]]: Boolean(invisible)
|
|
35
|
-
}, className)
|
|
36
|
-
"data-testid": "badge"
|
|
35
|
+
}, className)
|
|
37
36
|
}, displayValue)));
|
|
38
37
|
};
|
|
39
38
|
|
package/Button/index.js
CHANGED
|
@@ -38,7 +38,6 @@ const Button = _a => {
|
|
|
38
38
|
[styles__default.default[`variant_${variant}_disabled`]]: Boolean(disabled)
|
|
39
39
|
}, className),
|
|
40
40
|
disabled: disabled,
|
|
41
|
-
"data-testid": "button",
|
|
42
41
|
type: type || "button"
|
|
43
42
|
}, props), icon && /*#__PURE__*/React__default.default.createElement("span", {
|
|
44
43
|
className: styles__default.default.icon
|
package/Checkbox/index.js
CHANGED
|
@@ -24,9 +24,11 @@ const Checkbox = ({
|
|
|
24
24
|
variant = "primary",
|
|
25
25
|
className,
|
|
26
26
|
disabled,
|
|
27
|
-
hasError
|
|
27
|
+
hasError,
|
|
28
|
+
"data-testid": testId
|
|
28
29
|
}) => (/*#__PURE__*/React__default.default.createElement("div", {
|
|
29
|
-
className: styles__default.default.root
|
|
30
|
+
className: styles__default.default.root,
|
|
31
|
+
"data-testid": testId
|
|
30
32
|
}, /*#__PURE__*/React__default.default.createElement("label", {
|
|
31
33
|
className: styles__default.default.label,
|
|
32
34
|
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/Chip/index.js
CHANGED
|
@@ -19,13 +19,11 @@ const Chip = _a => {
|
|
|
19
19
|
onClick,
|
|
20
20
|
onClickIcon,
|
|
21
21
|
size = "m",
|
|
22
|
-
testID = "chip",
|
|
23
22
|
variant = "primary"
|
|
24
23
|
} = _a,
|
|
25
|
-
props = tslib.__rest(_a, ["children", "iconEnd", "isActive", "onClick", "onClickIcon", "size", "
|
|
24
|
+
props = tslib.__rest(_a, ["children", "iconEnd", "isActive", "onClick", "onClickIcon", "size", "variant"]);
|
|
26
25
|
return /*#__PURE__*/React__default.default.createElement("span", Object.assign({
|
|
27
|
-
className: styles__default.default.chip
|
|
28
|
-
"data-testid": testID
|
|
26
|
+
className: styles__default.default.chip
|
|
29
27
|
}, props), /*#__PURE__*/React__default.default.createElement("span", {
|
|
30
28
|
className: clsx__default.default(styles__default.default.inner, styles__default.default[`inner_variant_${variant}`], {
|
|
31
29
|
[styles__default.default["inner_active"]]: iconEnd || isActive,
|
package/Chip/index.props.d.ts
CHANGED
|
@@ -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;
|
|
@@ -31,7 +31,8 @@ const ColorPicker = ({
|
|
|
31
31
|
placement = "bottom-start",
|
|
32
32
|
zIndex,
|
|
33
33
|
labels: labelsProp,
|
|
34
|
-
children
|
|
34
|
+
children,
|
|
35
|
+
"data-testid": testId
|
|
35
36
|
}) => {
|
|
36
37
|
var _a, _b;
|
|
37
38
|
const [isOpen, setOpen] = React.useState(false);
|
|
@@ -85,7 +86,8 @@ const ColorPicker = ({
|
|
|
85
86
|
}));
|
|
86
87
|
return /*#__PURE__*/React__default.default.createElement("span", {
|
|
87
88
|
ref: rootRef,
|
|
88
|
-
className: styles__default.default.root
|
|
89
|
+
className: styles__default.default.root,
|
|
90
|
+
"data-testid": testId
|
|
89
91
|
}, /*#__PURE__*/React__default.default.createElement(index$1.Dropdown, {
|
|
90
92
|
trigger: ["click"],
|
|
91
93
|
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/Counter/index.js
CHANGED
|
@@ -20,7 +20,8 @@ const Counter = ({
|
|
|
20
20
|
fullWidth,
|
|
21
21
|
onChange,
|
|
22
22
|
disabled,
|
|
23
|
-
className
|
|
23
|
+
className,
|
|
24
|
+
"data-testid": testId
|
|
24
25
|
}) => {
|
|
25
26
|
const minusDisabled = disabled || value <= min;
|
|
26
27
|
const plusDisabled = disabled || value >= max;
|
|
@@ -33,7 +34,8 @@ const Counter = ({
|
|
|
33
34
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
34
35
|
className: clsx__default.default(styles__default.default.root, {
|
|
35
36
|
[styles__default.default["root_fullWidth"]]: Boolean(fullWidth)
|
|
36
|
-
}, className)
|
|
37
|
+
}, className),
|
|
38
|
+
"data-testid": testId
|
|
37
39
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
38
40
|
className: clsx__default.default(styles__default.default.control, {
|
|
39
41
|
[styles__default.default["control_fullWidth"]]: Boolean(fullWidth)
|
package/Counter/index.props.d.ts
CHANGED
package/Datepicker/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 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/Datepicker/index.js
CHANGED
|
@@ -28,11 +28,13 @@ const Datepicker = _a => {
|
|
|
28
28
|
size = "m",
|
|
29
29
|
startPlaceholder,
|
|
30
30
|
onChangeDate,
|
|
31
|
-
onChangeRange
|
|
31
|
+
onChangeRange,
|
|
32
|
+
"data-testid": testId
|
|
32
33
|
} = _a,
|
|
33
|
-
calendarProps = tslib.__rest(_a, ["className", "disabled", "endPlaceholder", "hasError", "hint", "label", "placeholder", "required", "selectedDate", "selectedRange", "selectionMode", "size", "startPlaceholder", "onChangeDate", "onChangeRange"]);
|
|
34
|
+
calendarProps = tslib.__rest(_a, ["className", "disabled", "endPlaceholder", "hasError", "hint", "label", "placeholder", "required", "selectedDate", "selectedRange", "selectionMode", "size", "startPlaceholder", "onChangeDate", "onChangeRange", "data-testid"]);
|
|
34
35
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
35
|
-
className: clsx__default.default(styles__default.default.root, className)
|
|
36
|
+
className: clsx__default.default(styles__default.default.root, className),
|
|
37
|
+
"data-testid": testId
|
|
36
38
|
}, /*#__PURE__*/React__default.default.createElement(index.DatePicker, Object.assign({}, calendarProps, {
|
|
37
39
|
disabled: disabled,
|
|
38
40
|
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/DotsLoader/index.js
CHANGED
|
@@ -10,8 +10,11 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
10
10
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
11
11
|
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
12
12
|
|
|
13
|
-
const DotsLoader = (
|
|
14
|
-
|
|
13
|
+
const DotsLoader = ({
|
|
14
|
+
"data-testid": testId
|
|
15
|
+
}) => (/*#__PURE__*/React__default.default.createElement("div", {
|
|
16
|
+
className: styles__default.default.wrapper,
|
|
17
|
+
"data-testid": testId
|
|
15
18
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
16
19
|
className: clsx__default.default({
|
|
17
20
|
[styles__default.default.dot]: true,
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TestIdProps } from "../helpers/testId";
|
|
2
|
+
export type DotsLoaderProps = TestIdProps;
|
package/Dropdown/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
|
14
14
|
|
|
15
15
|
const Dropdown = ({
|
|
16
16
|
children,
|
|
17
|
+
"data-testid": testId,
|
|
17
18
|
zIndex,
|
|
18
19
|
fontSize,
|
|
19
20
|
disabled,
|
|
@@ -95,7 +96,7 @@ const Dropdown = ({
|
|
|
95
96
|
onClick: () => setOpen(false)
|
|
96
97
|
}, /*#__PURE__*/React__default.default.createElement("div", Object.assign({
|
|
97
98
|
ref: refs.setFloating,
|
|
98
|
-
"data-testid":
|
|
99
|
+
"data-testid": testId,
|
|
99
100
|
className: clsx__default.default(styles__default.default["popper-container"], styles__default.default[`placement-${finalPlacement}`]),
|
|
100
101
|
style: Object.assign(Object.assign({}, floatingStyles), {
|
|
101
102
|
zIndex,
|
|
@@ -105,7 +106,6 @@ const Dropdown = ({
|
|
|
105
106
|
role: "menu",
|
|
106
107
|
tabIndex: 0
|
|
107
108
|
}, getFloatingProps()), /*#__PURE__*/React__default.default.createElement("div", {
|
|
108
|
-
"data-testid": "overlay-container",
|
|
109
109
|
className: styles__default.default["overlay-container"],
|
|
110
110
|
onClick: onClickOverlay
|
|
111
111
|
}, 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/Grid/index.js
CHANGED
|
@@ -16,9 +16,11 @@ const Grid = ({
|
|
|
16
16
|
gridRowGap = "6",
|
|
17
17
|
gridColumnGap = "4",
|
|
18
18
|
gridItemMinWidth = "var(--component-grid-item-min-width)",
|
|
19
|
-
className
|
|
19
|
+
className,
|
|
20
|
+
"data-testid": testId
|
|
20
21
|
}) => (/*#__PURE__*/React__default.default.createElement("div", {
|
|
21
22
|
className: clsx__default.default(styles__default.default.root, className),
|
|
23
|
+
"data-testid": testId,
|
|
22
24
|
style: {
|
|
23
25
|
rowGap: `var(--space-${gridRowGap})`,
|
|
24
26
|
columnGap: `var(--space-${gridColumnGap})`,
|
package/Grid/index.props.d.ts
CHANGED
|
@@ -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/InputRadio/index.js
CHANGED
|
@@ -31,9 +31,9 @@ const InputRadio = /*#__PURE__*/React.memo(_a => {
|
|
|
31
31
|
style,
|
|
32
32
|
text,
|
|
33
33
|
value,
|
|
34
|
-
testid
|
|
34
|
+
"data-testid": testId
|
|
35
35
|
} = _a,
|
|
36
|
-
rest = tslib.__rest(_a, ["checked", "children", "className", "containerClassName", "disabled", "error", "id", "name", "note", "onBlur", "onFocus", "onChange", "onClick", "onMouseEnter", "style", "text", "value", "testid"]);
|
|
36
|
+
rest = tslib.__rest(_a, ["checked", "children", "className", "containerClassName", "disabled", "error", "id", "name", "note", "onBlur", "onFocus", "onChange", "onClick", "onMouseEnter", "style", "text", "value", "data-testid"]);
|
|
37
37
|
return (
|
|
38
38
|
/*#__PURE__*/
|
|
39
39
|
// Keyboard activation of the nested radio dispatches a click that bubbles to the label.
|
|
@@ -44,7 +44,7 @@ const InputRadio = /*#__PURE__*/React.memo(_a => {
|
|
|
44
44
|
style: style,
|
|
45
45
|
onClick: onClick,
|
|
46
46
|
onMouseEnter: onMouseEnter,
|
|
47
|
-
"data-testid":
|
|
47
|
+
"data-testid": testId
|
|
48
48
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
49
49
|
className: clsx__default.default(styles__default.default.container, {
|
|
50
50
|
[styles__default.default["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
|
}>;
|
|
@@ -33,7 +33,6 @@ const MenuItem = _a => {
|
|
|
33
33
|
ref: ref,
|
|
34
34
|
role: "menuitem",
|
|
35
35
|
tabIndex: disabled ? -1 : 0,
|
|
36
|
-
"data-testid": "menuitem",
|
|
37
36
|
"aria-disabled": disabled || undefined,
|
|
38
37
|
className: clsx__default.default(styles__default.default.item, {
|
|
39
38
|
[styles__default.default["item_disabled"]]: Boolean(disabled),
|
|
@@ -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/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/Menu/index.js
CHANGED
|
@@ -16,7 +16,8 @@ const Menu = ({
|
|
|
16
16
|
className,
|
|
17
17
|
onClick,
|
|
18
18
|
children,
|
|
19
|
-
ref
|
|
19
|
+
ref,
|
|
20
|
+
"data-testid": testId
|
|
20
21
|
}) => {
|
|
21
22
|
const renderChild = React.useMemo(() => React.Children.map(children, child => {
|
|
22
23
|
if (! /*#__PURE__*/React.isValidElement(child)) return child;
|
|
@@ -36,7 +37,8 @@ const Menu = ({
|
|
|
36
37
|
return /*#__PURE__*/React__default.default.createElement("ul", {
|
|
37
38
|
ref: ref,
|
|
38
39
|
className: clsx__default.default(styles__default.default.menu, className),
|
|
39
|
-
role: "menu"
|
|
40
|
+
role: "menu",
|
|
41
|
+
"data-testid": testId
|
|
40
42
|
}, renderChild);
|
|
41
43
|
};
|
|
42
44
|
|
package/Menu/index.props.d.ts
CHANGED
|
@@ -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/Modal/index.js
CHANGED
|
@@ -31,7 +31,8 @@ const ModalRoot = ({
|
|
|
31
31
|
onClose,
|
|
32
32
|
title,
|
|
33
33
|
withinParent = false,
|
|
34
|
-
fillParent = false
|
|
34
|
+
fillParent = false,
|
|
35
|
+
"data-testid": testId
|
|
35
36
|
}) => {
|
|
36
37
|
const [dialog, setDialog] = React.useState(null);
|
|
37
38
|
const [container, setContainer] = React.useState(null);
|
|
@@ -99,6 +100,7 @@ const ModalRoot = ({
|
|
|
99
100
|
ref: setDialog,
|
|
100
101
|
role: "dialog",
|
|
101
102
|
"aria-modal": "true",
|
|
103
|
+
"data-testid": testId,
|
|
102
104
|
tabIndex: -1,
|
|
103
105
|
"aria-labelledby": titleCount > 0 ? titleId : undefined
|
|
104
106
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
package/Modal/index.props.d.ts
CHANGED
package/MultiSelect/index.js
CHANGED
|
@@ -40,7 +40,8 @@ const MultiSelect = ({
|
|
|
40
40
|
value = [],
|
|
41
41
|
type,
|
|
42
42
|
onChange,
|
|
43
|
-
"aria-label": ariaLabel
|
|
43
|
+
"aria-label": ariaLabel,
|
|
44
|
+
"data-testid": testId
|
|
44
45
|
}) => {
|
|
45
46
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
46
47
|
const id = React.useId();
|
|
@@ -80,6 +81,7 @@ const MultiSelect = ({
|
|
|
80
81
|
})
|
|
81
82
|
}))), [preparedGroups]);
|
|
82
83
|
return /*#__PURE__*/React__default.default.createElement(index$1.FormField, {
|
|
84
|
+
"data-testid": testId,
|
|
83
85
|
className: clsx__default.default(styles__default.default["form-field"], {
|
|
84
86
|
[styles__default.default["full-width"]]: Boolean(fullWidth)
|
|
85
87
|
}, className),
|