@axa-fr/design-system-apollo-react 1.0.5-alpha.343 → 1.0.5-alpha.344

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.
@@ -1,7 +1,7 @@
1
1
  import { type ComponentProps, type ComponentPropsWithRef, type ComponentType } from "react";
2
+ import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
2
3
  import { ItemLabel } from "../ItemLabel/ItemLabelCommon";
3
4
  import { ItemMessage } from "../ItemMessage/ItemMessageCommon";
4
- import { InputTextAtom } from "../InputTextAtom/InputTextAtomCommon";
5
5
  type InputTextProps = ComponentPropsWithRef<"input"> & {
6
6
  unit?: React.ReactNode;
7
7
  classModifier?: string;
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useId, } from "react";
3
3
  import { getComponentClassName } from "../../utilities/getComponentClassName";
4
- const InputText = forwardRef(({ unit, className, classModifier = "", helper, error, success, label, description, buttonLabel, onButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, "aria-errormessage": ariaErrormessage, ...otherProps }) => {
4
+ const InputText = forwardRef(({ unit, className, classModifier = "", helper, error, success, label, description, buttonLabel, onButtonClick, required, sideButtonLabel, onSideButtonClick, ItemLabelComponent, ItemMessageComponent, InputTextAtomComponent, "aria-errormessage": ariaErrormessage, ...otherProps }, inputRef) => {
5
5
  const componentClassName = getComponentClassName("af-form__input-text", className, classModifier + (error || ariaErrormessage ? " error" : ""));
6
6
  let inputId = useId();
7
7
  inputId = otherProps.id || inputId;
8
8
  const idMessage = useId();
9
9
  const idHelp = useId();
10
10
  const idLabel = useId();
11
- return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId, idLabel: idLabel }), _jsx(InputTextAtomComponent, { unit: unit, className: componentClassName, error: error, required: required, idMessage: idMessage, idHelp: idHelp, idLabel: idLabel, ...otherProps }), helper && (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })), _jsx(ItemMessageComponent, { id: idMessage, message: error || success, messageType: error ? "error" : "success" })] }));
11
+ return (_jsxs("div", { className: "af-form__input-container", children: [_jsx(ItemLabelComponent, { label: label, description: description, buttonLabel: buttonLabel, onButtonClick: onButtonClick, sideButtonLabel: sideButtonLabel, onSideButtonClick: onSideButtonClick, required: required, inputId: inputId, idLabel: idLabel }), _jsx(InputTextAtomComponent, { ref: inputRef, unit: unit, className: componentClassName, error: error, required: required, idMessage: idMessage, idHelp: idHelp, idLabel: idLabel, ...otherProps }), helper && (_jsx("span", { id: idHelp, className: "af-form__input-helper", children: helper })), _jsx(ItemMessageComponent, { id: idMessage, message: error || success, messageType: error ? "error" : "success" })] }));
12
12
  });
13
13
  InputText.displayName = "InputText";
14
14
  export { InputText };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-apollo-react",
3
- "version": "1.0.5-alpha.343",
3
+ "version": "1.0.5-alpha.344",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "homepage": "https://github.com/AxaFrance/design-system#readme",
48
48
  "peerDependencies": {
49
- "@axa-fr/design-system-apollo-css": "1.0.5-alpha.343",
50
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.343",
49
+ "@axa-fr/design-system-apollo-css": "1.0.5-alpha.344",
50
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.344",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },