@axa-fr/design-system-look-and-feel-react 1.0.3-alpha.152 → 1.0.3-alpha.154
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/Text/Text.d.ts +1 -16
- package/dist/Form/Text/Text.js +1 -21
- package/dist/Form/TextArea/TextArea.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/Form/Text/index.d.ts +0 -1
- package/dist/Form/Text/index.js +0 -1
package/dist/Form/Text/Text.d.ts
CHANGED
@@ -1,16 +1 @@
|
|
1
|
-
|
2
|
-
import { ComponentPropsWithRef, MouseEventHandler } from "react";
|
3
|
-
type Props = ComponentPropsWithRef<"input"> & {
|
4
|
-
unit?: React.ReactNode;
|
5
|
-
classModifier?: string;
|
6
|
-
helper?: string;
|
7
|
-
error?: string;
|
8
|
-
description?: string;
|
9
|
-
label?: string;
|
10
|
-
buttonLabel?: string;
|
11
|
-
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
12
|
-
sideButtonLabel?: string;
|
13
|
-
onSideButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
14
|
-
};
|
15
|
-
declare const Text: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
16
|
-
export { Text };
|
1
|
+
export { TextInput } from "@axa-fr/design-system-apollo-react/lf";
|
package/dist/Form/Text/Text.js
CHANGED
@@ -1,21 +1 @@
|
|
1
|
-
|
2
|
-
import "@axa-fr/design-system-look-and-feel-css/dist/Form/Text/Text.scss";
|
3
|
-
import { forwardRef, useId, } from "react";
|
4
|
-
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
5
|
-
import { Button } from "../..";
|
6
|
-
import { Svg } from "../../Svg";
|
7
|
-
import { getComponentClassName } from "../../utilities";
|
8
|
-
import { InputError } from "../InputError";
|
9
|
-
const Text = forwardRef(({ unit, className, classModifier = "", label, description, helper, error, buttonLabel, onButtonClick, required, sideButtonLabel, onSideButtonClick, ...otherProps }, inputRef) => {
|
10
|
-
const componentClassName = getComponentClassName("af-form__input-text", className, classModifier +
|
11
|
-
(error || otherProps["aria-errormessage"] ? " error" : ""));
|
12
|
-
let inputId = useId();
|
13
|
-
inputId = otherProps.id || inputId;
|
14
|
-
const idDescription = useId();
|
15
|
-
const idError = useId();
|
16
|
-
const idHelp = useId();
|
17
|
-
const idLabel = useId();
|
18
|
-
return (_jsxs("div", { className: "af-form__input-container", children: [(label || description || buttonLabel) && (_jsxs("div", { className: "af-form__label-container", children: [_jsxs("div", { className: "af-form__label-header", children: [_jsxs("label", { htmlFor: inputId, id: idLabel, "aria-describedby": idDescription, className: "af-form__input-label", children: [label, " ", required && _jsx("span", { "aria-hidden": "true", children: " *" })] }), sideButtonLabel && (_jsx(Button, { className: "af-form__input-modify", variant: "ghost", onClick: onSideButtonClick, children: sideButtonLabel }))] }), description && (_jsx("span", { id: idDescription, className: "af-form__input-description", children: description })), buttonLabel && (_jsx(Button, { className: "af-form__input-more", variant: "ghost", iconLeft: _jsx(Svg, { src: infoIcon }), onClick: onButtonClick, children: buttonLabel }))] })), _jsxs("div", { className: "af-form__input-variant", children: [_jsx("input", { id: inputId, className: componentClassName, type: "text", ref: inputRef, "aria-labelledby": idLabel, "aria-errormessage": otherProps["aria-errormessage"] ?? idError, "aria-invalid": Boolean(error || otherProps["aria-errormessage"]), "aria-describedby": idHelp, ...otherProps }), unit] }), helper && (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })), !otherProps["aria-errormessage"] && error && (_jsx(InputError, { id: idError, message: error }))] }));
|
19
|
-
});
|
20
|
-
Text.displayName = "Text";
|
21
|
-
export { Text };
|
1
|
+
export { TextInput } from "@axa-fr/design-system-apollo-react/lf";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { forwardRef, useId, } from "react";
|
3
3
|
import infoIcon from "@material-symbols/svg-400/outlined/info.svg";
|
4
|
-
import { getComponentClassName } from "
|
4
|
+
import { getComponentClassName } from "../../utilities";
|
5
5
|
import { Button, Svg } from "../..";
|
6
6
|
import { InputError } from "../InputError";
|
7
7
|
const TextArea = forwardRef(({ className, classModifier = "", label, description, helper, error, buttonLabel, onButtonClick, required, ...otherProps }, inputRef) => {
|
package/dist/index.d.ts
CHANGED
@@ -14,7 +14,7 @@ export { ItemMessage } from "./Form/ItemMessage/ItemMessage";
|
|
14
14
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabel";
|
15
15
|
export { Radio, RadioSelect } from "./Form/Radio";
|
16
16
|
export { Select } from "./Form/Select";
|
17
|
-
export {
|
17
|
+
export { TextInput } from "./Form/Text/Text";
|
18
18
|
export { TextArea } from "./Form/TextArea";
|
19
19
|
export { DebugGrid } from "./Grid/DebugGrid";
|
20
20
|
export { IconBg } from "./IconBg";
|
package/dist/index.js
CHANGED
@@ -13,7 +13,7 @@ export { ItemMessage } from "./Form/ItemMessage/ItemMessage";
|
|
13
13
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabel";
|
14
14
|
export { Radio, RadioSelect } from "./Form/Radio";
|
15
15
|
export { Select } from "./Form/Select";
|
16
|
-
export {
|
16
|
+
export { TextInput } from "./Form/Text/Text";
|
17
17
|
export { TextArea } from "./Form/TextArea";
|
18
18
|
export { DebugGrid } from "./Grid/DebugGrid";
|
19
19
|
export { IconBg } from "./IconBg";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axa-fr/design-system-look-and-feel-react",
|
3
|
-
"version": "1.0.3-alpha.
|
3
|
+
"version": "1.0.3-alpha.154",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -47,10 +47,10 @@
|
|
47
47
|
},
|
48
48
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
49
49
|
"peerDependencies": {
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.154",
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
52
52
|
"react": ">= 18",
|
53
|
-
"@axa-fr/design-system-apollo-react": "1.0.3-alpha.
|
53
|
+
"@axa-fr/design-system-apollo-react": "1.0.3-alpha.154"
|
54
54
|
},
|
55
55
|
"peerDependenciesMeta": {
|
56
56
|
"@material-symbols/svg-400": {
|
@@ -1 +0,0 @@
|
|
1
|
-
export { Text } from "./Text";
|
package/dist/Form/Text/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { Text } from "./Text";
|