@axa-fr/design-system-look-and-feel-react 1.0.5-ci.39 → 1.0.5-ci.41

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,6 +9,8 @@ type Props = ComponentPropsWithRef<"input"> & {
9
9
  label?: string;
10
10
  buttonLabel?: string;
11
11
  onButtonClick?: MouseEventHandler<HTMLButtonElement>;
12
+ sideButtonLabel?: string;
13
+ onSideButtonClick?: MouseEventHandler<HTMLButtonElement>;
12
14
  };
13
15
  declare const Text: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
14
16
  export { Text };
@@ -7,7 +7,7 @@ import { Variants } from "../../Button/Button";
7
7
  import { Svg } from "../../Svg";
8
8
  import { getComponentClassName } from "../../utilities";
9
9
  import { InputError } from "../InputError";
10
- const Text = forwardRef(({ unit, className, classModifier = "", label, description, helper, error, buttonLabel, onButtonClick, required, ...otherProps }, inputRef) => {
10
+ const Text = forwardRef(({ unit, className, classModifier = "", label, description, helper, error, buttonLabel, onButtonClick, required, sideButtonLabel, onSideButtonClick, ...otherProps }, inputRef) => {
11
11
  const componentClassName = getComponentClassName("af-form__input-text", className, classModifier +
12
12
  (error || otherProps["aria-errormessage"] ? " error" : ""));
13
13
  let inputId = useId();
@@ -16,7 +16,7 @@ const Text = forwardRef(({ unit, className, classModifier = "", label, descripti
16
16
  const idError = useId();
17
17
  const idHelp = useId();
18
18
  const idLabel = useId();
19
- return (_jsxs("div", { className: "af-form__input-container", children: [(label || description || buttonLabel) && (_jsxs("div", { className: "af-form__label-container", children: [_jsxs("label", { htmlFor: inputId, id: idLabel, "aria-describedby": idDescription, className: "af-form__input-label", children: [label, " ", required && _jsx("span", { "aria-hidden": "true", children: " *" })] }), description && (_jsx("span", { id: idDescription, className: "af-form__input-description", children: description })), buttonLabel && (_jsx(Button, { className: "af-form__input-more", variant: Variants.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
+ 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: Variants.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: Variants.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 }))] }));
20
20
  });
21
21
  Text.displayName = "Text";
22
22
  export { Text };
package/dist/index.d.ts CHANGED
@@ -6,12 +6,15 @@ export { Alert } from "./Alert/Alert";
6
6
  export type { AlertType } from "./Alert/Alert";
7
7
  export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
8
8
  export { Card } from "./Card";
9
+ export { Divider } from "./Divider";
9
10
  export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
10
11
  export { FileUpload } from "./Form/FileUpload";
12
+ export { InputError } from "./Form/InputError";
11
13
  export { Radio, RadioSelect } from "./Form/Radio";
12
14
  export { Select } from "./Form/Select";
13
15
  export { Text as TextInput } from "./Form/Text";
14
16
  export { TextArea } from "./Form/TextArea";
17
+ export { DebugGrid } from "./Grid/DebugGrid";
15
18
  export { IconBg } from "./IconBg";
16
19
  export { Footer } from "./Layout/Footer/Footer";
17
20
  export { Header } from "./Layout/Header";
@@ -22,6 +25,8 @@ export { ContentItemDuo } from "./List/ContentItemDuo";
22
25
  export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
23
26
  export { ContentTabItem, ContentTabList } from "./List/ContentTabList";
24
27
  export { Loader } from "./Loader";
28
+ export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal";
29
+ export type { ModalCoreBodyProps, ModalCoreFooterProps, ModalCoreHeaderProps, ModalCoreProps, ModalProps, } from "./Modal";
25
30
  export { Pagination } from "./Pagination/Pagination";
26
31
  export { Skeleton } from "./Skeleton/Skeleton";
27
32
  export { SkeletonList } from "./SkeletonList/SkeletonList";
@@ -30,7 +35,3 @@ export { Svg } from "./Svg";
30
35
  export { TabsClient as Tabs, Direction as TabsDirection } from "./Tabs/Tabs";
31
36
  export { Tag } from "./Tag";
32
37
  export { Title, TitleSize, type TitleLevel } from "./Title";
33
- export { DebugGrid } from "./Grid/DebugGrid";
34
- export { Divider } from "./Divider";
35
- export { Modal, ModalCore, ModalCoreHeader, ModalCoreFooter, ModalCoreBody, } from "./Modal";
36
- export type { ModalProps, ModalCoreProps, ModalCoreHeaderProps, ModalCoreFooterProps, ModalCoreBodyProps, } from "./Modal";
package/dist/index.js CHANGED
@@ -5,12 +5,15 @@ export { AccordionCore } from "./AccordionCore";
5
5
  export { Alert } from "./Alert/Alert";
6
6
  export { ButtonClient as Button, Variants as ButtonVariants, } from "./Button/Button";
7
7
  export { Card } from "./Card";
8
+ export { Divider } from "./Divider";
8
9
  export { Checkbox, CheckboxSelect } from "./Form/Checkbox";
9
10
  export { FileUpload } from "./Form/FileUpload";
11
+ export { InputError } from "./Form/InputError";
10
12
  export { Radio, RadioSelect } from "./Form/Radio";
11
13
  export { Select } from "./Form/Select";
12
14
  export { Text as TextInput } from "./Form/Text";
13
15
  export { TextArea } from "./Form/TextArea";
16
+ export { DebugGrid } from "./Grid/DebugGrid";
14
17
  export { IconBg } from "./IconBg";
15
18
  export { Footer } from "./Layout/Footer/Footer";
16
19
  export { Header } from "./Layout/Header";
@@ -21,6 +24,7 @@ export { ContentItemDuo } from "./List/ContentItemDuo";
21
24
  export { ContentItemMono, ContentItemMonoSize } from "./List/ContentItemMono";
22
25
  export { ContentTabItem, ContentTabList } from "./List/ContentTabList";
23
26
  export { Loader } from "./Loader";
27
+ export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./Modal";
24
28
  export { Pagination } from "./Pagination/Pagination";
25
29
  export { Skeleton } from "./Skeleton/Skeleton";
26
30
  export { SkeletonList } from "./SkeletonList/SkeletonList";
@@ -29,6 +33,3 @@ export { Svg } from "./Svg";
29
33
  export { TabsClient as Tabs, Direction as TabsDirection } from "./Tabs/Tabs";
30
34
  export { Tag } from "./Tag";
31
35
  export { Title, TitleSize } from "./Title";
32
- export { DebugGrid } from "./Grid/DebugGrid";
33
- export { Divider } from "./Divider";
34
- export { Modal, ModalCore, ModalCoreHeader, ModalCoreFooter, ModalCoreBody, } from "./Modal";
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.5-ci.39",
3
+ "version": "1.0.5-ci.41",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://github.com/AxaFrance/design-system#readme",
47
47
  "peerDependencies": {
48
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.39",
48
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.41",
49
49
  "@material-symbols/svg-400": ">= 0.19.0",
50
50
  "react": ">= 18"
51
51
  },