@axa-fr/canopee-react 2.0.0-alpha.78 → 2.0.0-alpha.79

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.
@@ -9,7 +9,7 @@ const Date = ({ className, defaultValue, value, hasInfobulle, ...otherProps }) =
9
9
  modifiers: [hasInfobulle && "hasinfobulle"],
10
10
  className,
11
11
  });
12
- return (_jsx("input", { className: componentClassName, type: "date", defaultValue: formatDateInputValue(defaultValue), value: formatDateInputValue(value), ...otherProps }));
12
+ return (_jsx("input", { className: `${componentClassName} af-form__input-text`, type: "date", defaultValue: formatDateInputValue(defaultValue), value: formatDateInputValue(value), ...otherProps }));
13
13
  };
14
14
  Date.displayName = "Date";
15
15
  export { Date };
@@ -2,6 +2,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import {} from "react";
3
3
  import { Field } from "../core";
4
4
  import { Date } from "./Date";
5
- const DateInput = ({ children, ...otherProps }) => (_jsx(Field, { fieldClassNameSuffix: "date", ...otherProps, renderInput: ({ id, inputClassName, ariaInvalid, errorId, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, className: inputClassName, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] })) }));
5
+ const DateInput = ({ children, ...otherProps }) => (_jsx(Field, { ...otherProps, renderInput: ({ id, inputClassName, ariaInvalid, errorId, ...props }) => (_jsxs(_Fragment, { children: [_jsx(Date, { id: id, className: inputClassName, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...props }), children] })) }));
6
6
  DateInput.displayName = "DateInput";
7
7
  export { DateInput };
@@ -20,12 +20,10 @@ export const Field = ({ classNameContainerInput = "col-md-10", classNameContaine
20
20
  required && "required",
21
21
  forceDisplayMessage && FormClassManager.getModifier(messageType),
22
22
  ];
23
- const inputClassName = [
24
- ...fieldModifiers,
25
- hasInfobulle && `af-form__input-${fieldClassNameSuffix}--hasinfobulle`,
26
- ]
27
- .filter(Boolean)
28
- .join(" ");
23
+ const inputClassName = getClassName({
24
+ baseClassName: `af-form__input-${fieldClassNameSuffix}`,
25
+ modifiers: [...fieldModifiers, hasInfobulle && `hasinfobulle`],
26
+ });
29
27
  const fieldContainerClassName = getClassName({
30
28
  baseClassName: `af-form__${fieldClassNameSuffix}`,
31
29
  modifiers: fieldModifiers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "2.0.0-alpha.78",
3
+ "version": "2.0.0-alpha.79",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "homepage": "https://github.com/AxaFrance/design-system#readme",
55
55
  "peerDependencies": {
56
- "@axa-fr/canopee-css": "2.0.0-alpha.78",
56
+ "@axa-fr/canopee-css": "2.0.0-alpha.79",
57
57
  "@material-symbols/svg-400": ">= 0.19.0",
58
58
  "@material-symbols/svg-700": ">= 0.19.0",
59
59
  "react": ">= 19"