@axa-fr/design-system-slash-react 1.1.1-alpha.30 → 1.1.1-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Form/Radio/RadioInput.d.ts +2 -6
- package/dist/Form/core/FieldForm.d.ts +2 -2
- package/dist/Form/core/FieldForm.js +3 -2
- package/dist/Layout/Header/NavBar/NavBarItem/NavBarItem.d.ts +7 -1
- package/dist/Layout/Header/NavBar/NavBarItem/NavBarItemBase.d.ts +1 -1
- package/dist/Layout/Header/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/Layout/Header/ToggleButton/ToggleButton.js +1 -1
- package/dist/Tabs/components/TabsStateless.d.ts +2 -2
- package/dist/Tabs/components/TabsStateless.js +1 -1
- package/package.json +14 -2
|
@@ -31,16 +31,12 @@ declare const RadioInput: import("react").ForwardRefExoticComponent<Omit<{
|
|
|
31
31
|
roleContainer?: string;
|
|
32
32
|
ariaLabelContainer?: string;
|
|
33
33
|
isLabelContainerLinkedToInput?: boolean;
|
|
34
|
-
} & Omit<Omit<Omit<Omit<Omit<
|
|
35
|
-
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
36
|
-
}, "type" | "checked"> & {
|
|
34
|
+
} & Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "checked"> & {
|
|
37
35
|
classModifier?: string;
|
|
38
36
|
optionClassName?: string;
|
|
39
37
|
label?: import("react").ReactNode;
|
|
40
38
|
isChecked?: boolean;
|
|
41
|
-
}, "ref"> & import("react").RefAttributes<HTMLInputElement>, "
|
|
42
|
-
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
43
|
-
}, "label" | "className" | "id"> & {
|
|
39
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>, "label" | "className" | "id"> & {
|
|
44
40
|
options: import("../core").Option[];
|
|
45
41
|
mode?: keyof typeof RadioModes;
|
|
46
42
|
}, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseSyntheticEvent, Dispatch, ReactNode, SetStateAction } from "react";
|
|
1
|
+
import { type BaseSyntheticEvent, type Dispatch, type ReactElement, type ReactNode, type SetStateAction } from "react";
|
|
2
2
|
import { FormClassManager } from "./FormClassManager";
|
|
3
3
|
import { MessageTypes } from "./MessageTypes";
|
|
4
4
|
type TMessage = {
|
|
@@ -49,7 +49,7 @@ export declare const eventWrapper: ({ wrapper, props }: EventWrapperProps) => {
|
|
|
49
49
|
onFocus: (ev: BaseSyntheticEvent) => void;
|
|
50
50
|
};
|
|
51
51
|
type AddPropsClone = Omit<RenderChildrenProps, "children"> & {
|
|
52
|
-
child:
|
|
52
|
+
child: ReactElement<Record<string, unknown>>;
|
|
53
53
|
classModifier: string;
|
|
54
54
|
name: string;
|
|
55
55
|
getMessageClassModifierFn?: typeof FormClassManager.getMessageClassModifier;
|
|
@@ -100,7 +100,8 @@ export const renderedChildren = ({ children, wrapper, message, messageType, }) =
|
|
|
100
100
|
};
|
|
101
101
|
if (child.props.children) {
|
|
102
102
|
const subChildren = renderedChildren({
|
|
103
|
-
children: child.props
|
|
103
|
+
children: child.props
|
|
104
|
+
.children,
|
|
104
105
|
wrapper,
|
|
105
106
|
message,
|
|
106
107
|
messageType,
|
|
@@ -118,7 +119,7 @@ export const renderedChildren = ({ children, wrapper, message, messageType, }) =
|
|
|
118
119
|
messageType,
|
|
119
120
|
classModifier: props.classModifier,
|
|
120
121
|
wrapper,
|
|
121
|
-
child,
|
|
122
|
+
child: child,
|
|
122
123
|
}),
|
|
123
124
|
});
|
|
124
125
|
});
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ComponentProps, ReactElement } from "react";
|
|
2
2
|
import { NavBarItemBase } from "./NavBarItemBase";
|
|
3
|
+
type ChildrenProps = {
|
|
4
|
+
classModifier?: string;
|
|
5
|
+
tabIndex?: number;
|
|
6
|
+
hasFocus?: boolean;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
3
9
|
type Props = Omit<ComponentProps<typeof NavBarItemBase>, "handleKeys" | "isMenuOpen" | "position"> & {
|
|
4
10
|
ariaLabel?: string;
|
|
5
|
-
children?: ReactElement | ReactElement[];
|
|
11
|
+
children?: ReactElement<ChildrenProps> | ReactElement<ChildrenProps>[];
|
|
6
12
|
};
|
|
7
13
|
declare const NavBarItem: ({ children, hasFocus, actionElt, ariaLabel, tabIndex, role, className, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
14
|
export { NavBarItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, KeyboardEvent, ReactElement } from "react";
|
|
2
2
|
type Props = HTMLAttributes<HTMLLIElement> & {
|
|
3
|
-
actionElt: ReactElement
|
|
3
|
+
actionElt: ReactElement<HTMLAttributes<HTMLElement>>;
|
|
4
4
|
handleKeys: (event: KeyboardEvent<HTMLLIElement>) => void;
|
|
5
5
|
hasFocus?: boolean;
|
|
6
6
|
isMenuOpen?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
type Props = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
idControl: string;
|
|
5
5
|
};
|
|
6
|
-
declare const ToggleButton: ({ children, idControl }: Props) => false |
|
|
6
|
+
declare const ToggleButton: ({ children, idControl }: Props) => false | ReactElement<HTMLAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
7
7
|
export { ToggleButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode, type MouseEvent } from "react";
|
|
2
2
|
export interface TabsStatelessProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
activeIndex: string;
|
|
@@ -6,7 +6,7 @@ export interface TabsStatelessProps {
|
|
|
6
6
|
classModifier?: string;
|
|
7
7
|
}
|
|
8
8
|
export interface TabsStatelessHandlers {
|
|
9
|
-
onChange: (event:
|
|
9
|
+
onChange: (event: MouseEvent<HTMLButtonElement>, index: string) => void;
|
|
10
10
|
}
|
|
11
11
|
type Props = TabsStatelessProps & TabsStatelessHandlers;
|
|
12
12
|
declare const TabsStateless: ({ activeIndex, className, classModifier, children, onChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Children, isValidElement } from "react";
|
|
2
|
+
import { Children, isValidElement, } from "react";
|
|
3
3
|
import { getComponentClassName } from "../..";
|
|
4
4
|
import { Pane } from "./Pane";
|
|
5
5
|
import { Title } from "./Title";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "1.1.1-alpha.
|
|
3
|
+
"version": "1.1.1-alpha.35",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@axa-fr/design-system-slash-css": "1.1.1-alpha.
|
|
47
|
+
"@axa-fr/design-system-slash-css": "1.1.1-alpha.35",
|
|
48
48
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
49
49
|
"react": ">= 18"
|
|
50
50
|
},
|
|
@@ -70,5 +70,17 @@
|
|
|
70
70
|
},
|
|
71
71
|
"volta": {
|
|
72
72
|
"extends": "../../package.json"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@testing-library/dom": "^10.4.0",
|
|
76
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
77
|
+
"@testing-library/react": "^16.2.0",
|
|
78
|
+
"@testing-library/user-event": "^14.6.1",
|
|
79
|
+
"@types/jest": "^29.5.14",
|
|
80
|
+
"@types/jest-axe": "^3.5.9",
|
|
81
|
+
"@vitest/coverage-v8": "^3.0.7",
|
|
82
|
+
"@vitest/ui": "^3.0.7",
|
|
83
|
+
"jest-axe": "^9.0.0",
|
|
84
|
+
"vitest": "^3.0.7"
|
|
73
85
|
}
|
|
74
86
|
}
|