@axa-fr/design-system-slash-react 1.2.0-alpha.5 → 1.2.0

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.
@@ -12,6 +12,6 @@ export type AlertCoreComponentProps = {
12
12
  onClose?: MouseEventHandler<HTMLButtonElement>;
13
13
  className?: string;
14
14
  classModifier?: "error" | "danger" | "info" | "success";
15
- ariaLabel?: string;
15
+ closeButtonAriaLabel?: string;
16
16
  };
17
- export declare const Alert: ({ className, onClose, icon, title, children, classModifier, ariaLabel, }: PropsWithChildren<AlertCoreComponentProps>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const Alert: ({ className, onClose, icon, title, children, classModifier, closeButtonAriaLabel, }: PropsWithChildren<AlertCoreComponentProps>) => import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ export var TypeIcons;
8
8
  TypeIcons["info"] = "glyphicon glyphicon-info-sign";
9
9
  TypeIcons["success"] = "glyphicon glyphicon-ok";
10
10
  })(TypeIcons || (TypeIcons = {}));
11
- export const Alert = ({ className, onClose, icon, title, children, classModifier = "error", ariaLabel = "close", }) => {
11
+ export const Alert = ({ className, onClose, icon, title, children, classModifier = "error", closeButtonAriaLabel = "close", }) => {
12
12
  const componentClassName = getComponentClassName(className, classModifier, "af-alert");
13
- return (_jsxs("div", { className: componentClassName, role: "alert", children: [_jsxs("div", { className: "af-alert__title", children: [_jsx("div", { className: "af-alert__title-icon", children: _jsx("i", { role: "presentation", className: icon || TypeIcons[classModifier] }) }), _jsx("div", { className: "af-alert__title-text", children: title }), onClose && (_jsx("button", { type: "button", className: "af-alert__title-icon-close", onClick: onClose, "aria-label": ariaLabel, children: _jsx("i", { className: "glyphicon glyphicon-close" }) }))] }), children && (_jsxs("div", { className: "af-alert__content", children: [_jsx("div", { className: "af-alert__content-left" }), _jsx("div", { className: "af-alert__content-right", children: children })] }))] }));
13
+ return (_jsxs("div", { className: componentClassName, role: "alert", children: [_jsxs("div", { className: "af-alert__title", children: [_jsx("div", { className: "af-alert__title-icon", children: _jsx("i", { role: "presentation", className: icon || TypeIcons[classModifier] }) }), _jsx("div", { className: "af-alert__title-text", children: title }), onClose && (_jsx("button", { type: "button", className: "af-alert__title-icon-close", onClick: onClose, "aria-label": closeButtonAriaLabel, children: _jsx("i", { className: "glyphicon glyphicon-close" }) }))] }), children && (_jsxs("div", { className: "af-alert__content", children: [_jsx("div", { className: "af-alert__content-left" }), _jsx("div", { className: "af-alert__content-right", children: children })] }))] }));
14
14
  };
@@ -5,7 +5,7 @@ import "@axa-fr/design-system-slash-css/dist/Form/Checkbox/Checkbox.scss";
5
5
  const CheckboxItem = forwardRef(({ disabled = false, value = "", id, children, label, isChecked, className, classModifier, ...otherProps }, inputRef) => {
6
6
  const newLabel = children || label;
7
7
  const generatedId = useId();
8
- const newId = id ?? generatedId;
8
+ const newId = id ?? generatedId; // id is required on this component
9
9
  const optionClassName = getOptionClassName(className ?? "", classModifier ?? "", "af-form__checkbox", disabled);
10
10
  return (_jsxs("div", { className: optionClassName, children: [_jsx("input", { ...otherProps, className: "af-form__input-checkbox", value: value, id: newId, disabled: disabled, checked: isChecked, type: "checkbox", ref: inputRef }), _jsxs("label", { className: "af-form__label", htmlFor: newId, children: [_jsx("span", { className: "af-form__indicator", children: _jsx("i", { className: "glyphicon glyphicon-ok" }) }), _jsx("span", { className: "af-form__description", children: newLabel })] })] }));
11
11
  });
@@ -292,6 +292,20 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
292
292
  size?: number | undefined | undefined;
293
293
  forceDisplayPlaceholder?: boolean | undefined;
294
294
  }, "ref"> & import("react").RefAttributes<HTMLSelectElement> & {
295
+ /**
296
+ * @deprecated Use `children` instead
297
+ * Instead of
298
+ * ```jsx
299
+ * <SelectBase options={[{ value: "1", label: "Option 1" }]} />
300
+ * ```
301
+ * you can now do something like :
302
+ * ```jsx
303
+ * <SelectBase>
304
+ * <option value="1">Option 1</option>
305
+ * </SelectBase>
306
+ * ```
307
+ * It allows you to use the `optgroup` tag for example.
308
+ */
295
309
  options?: OptionHTMLAttributes<HTMLOptionElement>[];
296
310
  mode?: "default" | "base";
297
311
  } & {
@@ -304,6 +318,20 @@ declare const Select: import("react").ForwardRefExoticComponent<(Omit<Omit<{
304
318
  forceDisplayPlaceholder?: boolean;
305
319
  placeholder?: string;
306
320
  }, "ref"> & import("react").RefAttributes<HTMLSelectElement> & {
321
+ /**
322
+ * @deprecated Use `children` instead
323
+ * Instead of
324
+ * ```jsx
325
+ * <SelectBase options={[{ value: "1", label: "Option 1" }]} />
326
+ * ```
327
+ * you can now do something like :
328
+ * ```jsx
329
+ * <SelectBase>
330
+ * <option value="1">Option 1</option>
331
+ * </SelectBase>
332
+ * ```
333
+ * It allows you to use the `optgroup` tag for example.
334
+ */
307
335
  options?: OptionHTMLAttributes<HTMLOptionElement>[];
308
336
  mode?: "default" | "base";
309
337
  } & {
@@ -1,6 +1,23 @@
1
1
  import "@axa-fr/design-system-slash-css/dist/Form/Select/Select.scss";
2
2
  import { OptionHTMLAttributes } from "react";
3
+ /**
4
+ * @deprecated Use Select instead
5
+ */
3
6
  declare const SelectBase: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & {
7
+ /**
8
+ * @deprecated Use `children` instead
9
+ * Instead of
10
+ * ```jsx
11
+ * <SelectBase options={[{ value: "1", label: "Option 1" }]} />
12
+ * ```
13
+ * you can now do something like :
14
+ * ```jsx
15
+ * <SelectBase>
16
+ * <option value="1">Option 1</option>
17
+ * </SelectBase>
18
+ * ```
19
+ * It allows you to use the `optgroup` tag for example.
20
+ */
4
21
  options?: OptionHTMLAttributes<HTMLOptionElement>[];
5
22
  classModifier?: string;
6
23
  } & import("react").RefAttributes<HTMLSelectElement>>;
@@ -2,6 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-slash-css/dist/Form/Select/Select.scss";
3
3
  import { forwardRef, } from "react";
4
4
  import { getComponentClassName } from "../../utilities";
5
+ /**
6
+ * @deprecated Use Select instead
7
+ */
5
8
  const SelectBase = forwardRef(({ options, id, className, classModifier, required, children, ...otherProps }, inputRef) => {
6
9
  const componentClassName = getComponentClassName(className, classModifier, "af-form__input-select");
7
10
  return (_jsxs("div", { className: "af-form__select-container", children: [_jsx("select", { ...otherProps, id: id, className: componentClassName, ref: inputRef, required: classModifier?.includes("required") || required, children: children ??
@@ -5,5 +5,19 @@ type Props = ComponentPropsWithRef<typeof SelectBase> & {
5
5
  forceDisplayPlaceholder?: boolean;
6
6
  placeholder?: string;
7
7
  };
8
+ /**
9
+ * @deprecated Use `SelectDefault` instead
10
+ * Instead of
11
+ * ```jsx
12
+ * <SelectDefaultWithOptions options={[{ value: "1", label: "Option 1" }]} />
13
+ * ```
14
+ * you can now do something like :
15
+ * ```jsx
16
+ * <SelectDefault>
17
+ * <option value="1">Option 1</option>
18
+ * </SelectDefault>
19
+ * ```
20
+ * It allows you to use the `optgroup` tag for example.
21
+ */
8
22
  export declare const SelectDefaultWithOptions: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
9
23
  export {};
@@ -1,6 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useId, useMemo, useState, } from "react";
3
3
  import { SelectBase } from "./SelectBase";
4
+ /**
5
+ * @deprecated Use `SelectDefault` instead
6
+ * Instead of
7
+ * ```jsx
8
+ * <SelectDefaultWithOptions options={[{ value: "1", label: "Option 1" }]} />
9
+ * ```
10
+ * you can now do something like :
11
+ * ```jsx
12
+ * <SelectDefault>
13
+ * <option value="1">Option 1</option>
14
+ * </SelectDefault>
15
+ * ```
16
+ * It allows you to use the `optgroup` tag for example.
17
+ */
4
18
  export const SelectDefaultWithOptions = forwardRef(({ onChange, forceDisplayPlaceholder = false, value, placeholder = "- Select -", options, id, ...otherProps }, inputRef) => {
5
19
  const [hasHandleChangeOnce, setHasHandleChangeOnce] = useState(false);
6
20
  const generatedId = useId();
@@ -138,6 +138,7 @@ export const FieldForm = ({ children, message = "", messageType = MessageTypes.e
138
138
  setState,
139
139
  setStateMemoryFn,
140
140
  ]);
141
+ // for particular case on particular browers which does not throw onFocus or onBlur event
141
142
  const onChange = () => onChangeByStateFn(setState, state?.hasChange);
142
143
  const onBlur = () => setState(setStateOnBlurFn());
143
144
  const onFocus = () => setState(setStateOnFocusFn({ message, messageType }));
@@ -5,6 +5,7 @@ type FooterProps = {
5
5
  alt?: string;
6
6
  icon?: string;
7
7
  className?: string;
8
+ version?: string;
8
9
  };
9
10
  export declare const Footer: import("react").ForwardRefExoticComponent<FooterProps & {
10
11
  children?: import("react").ReactNode | undefined;
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import logo from "@axa-fr/design-system-slash-css/logo-axa.svg";
3
3
  import "@axa-fr/design-system-slash-css/dist/Layout/Footer/Footer.scss";
4
4
  import { forwardRef } from "react";
5
- export const Footer = forwardRef(({ className = "af-footer", href = "https://www.axa.fr/", title = "Site Axa", icon = logo, alt = "Logo Axa", children = `© ${new Date().getFullYear()} AXA Tous droits réservés`, ...props }, ref) => (_jsx("footer", { ref: ref, className: className, ...props, children: _jsxs("div", { className: "container-fluid container", children: [Boolean(icon) && (_jsx("a", { className: "af-logo", href: href, title: title, target: "blank", rel: "noopener noreferrer", children: _jsx("img", { className: "af-logo__brand", src: icon, alt: alt }) })), _jsx("div", { className: "af-footer-content", children: children })] }) })));
5
+ export const Footer = forwardRef(({ className = "af-footer", href = "https://www.axa.fr/", title = "Site Axa", icon = logo, alt = "Logo Axa", version, children = `© ${new Date().getFullYear()} AXA Tous droits réservés`, ...props }, ref) => (_jsx("footer", { ref: ref, className: className, ...props, children: _jsxs("div", { className: "container-fluid container", children: [Boolean(icon) && (_jsx("a", { className: "af-logo", href: href, title: title, target: "blank", rel: "noopener noreferrer", children: _jsx("img", { className: "af-logo__brand", src: icon, alt: alt }) })), _jsx("div", { className: "af-footer-content", children: children }), version && (_jsxs("span", { className: "af-footer-version", children: ["Version ", version] }))] }) })));
6
6
  Footer.displayName = "Footer";
@@ -8,6 +8,9 @@ export const NavBarItemBase = ({ tabIndex = -1, role = "menuitem", children, has
8
8
  useEffect(() => {
9
9
  handleLinkFocus(ref?.current, hasFocus, isMenuOpen);
10
10
  }, [hasFocus, isMenuOpen]);
11
+ /* On ajoute la classe permettant définir l'état ouvert sur l'élément
12
+ * si celui a le focus, si le menu est ouvert et s'il possède des éléments enfants
13
+ */
11
14
  const openClass = useMemo(() => (hasFocus && isMenuOpen && children ? "af-nav__item--open" : ""), [children, hasFocus, isMenuOpen]);
12
15
  return (_jsxs("li", { className: `${componentClassName} ${openClass}`, role: "none", onKeyDown: (e) => {
13
16
  e.preventDefault();
@@ -3,7 +3,9 @@ import { forwardRef } from "react";
3
3
  import { getComponentClassName } from "..";
4
4
  const Modal = forwardRef(({ className, title = "", onOutsideTap, children, classModifier, ...props }, ref) => {
5
5
  const componentClassName = getComponentClassName(className, classModifier, "af-modal");
6
- return (_jsx("dialog", { "aria-label": title, className: componentClassName, onClick: onOutsideTap, ref: ref, ...props, children: _jsx("div", { className: "af-modal__dialog", onClick: (event) => event.stopPropagation(), children: _jsx("div", { className: "af-modal__content", children: children }) }) }));
6
+ return (
7
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
8
+ _jsx("dialog", { "aria-label": title, className: componentClassName, onClick: onOutsideTap, ref: ref, ...props, children: _jsx("div", { className: "af-modal__dialog", onClick: (event) => event.stopPropagation(), children: _jsx("div", { className: "af-modal__content", children: children }) }) }));
7
9
  });
8
10
  Modal.displayName = "Modal";
9
11
  export { Modal };
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
3
  import React, { useRef } from "react";
3
4
  import { arrow, FloatingArrow, offset, useFloating, } from "@floating-ui/react";
4
5
  import { getComponentClassName } from "../utilities";
package/dist/Svg/Svg.js CHANGED
@@ -14,6 +14,7 @@ export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
14
14
  if (hasError) {
15
15
  setHasError(false);
16
16
  }
17
+ // eslint-disable-next-line react-hooks/exhaustive-deps
17
18
  }, [src]);
18
19
  useLayoutEffect(() => {
19
20
  if (hasError) {
@@ -25,6 +26,8 @@ export const Svg = ({ src, alt, width = 24, height = 24, ...props }) => {
25
26
  const svg = document.createElement("svg");
26
27
  parent.appendChild(svg);
27
28
  cloneAttributes(root, svg);
29
+ // Default SVG size was 24px with @material-design-icons/svg. With @material-symbols/svg-400 this is now 48px (with no native way to change it)
30
+ // In order not to break existing CSS, we manually set the default value back to 24px
28
31
  svg.setAttribute("width", width.toString());
29
32
  svg.setAttribute("height", height.toString());
30
33
  svgInjector(svg, {
@@ -2,10 +2,25 @@ export type Props = {
2
2
  id?: string;
3
3
  className?: string;
4
4
  classModifier?: string;
5
+ /**
6
+ * Text displayed before the per-page select
7
+ */
5
8
  displayLabel?: string;
9
+ /**
10
+ * Text displayed after the per-page select
11
+ */
6
12
  elementsLabel?: string;
13
+ /**
14
+ * Possible values for the number of items displayed per page
15
+ */
7
16
  items?: number[];
17
+ /**
18
+ * Number of items displayed per page
19
+ */
8
20
  numberItems?: number;
21
+ /**
22
+ * Aria label for the the per-page select
23
+ */
9
24
  selectAriaLabel?: string;
10
25
  onChange: (e: {
11
26
  value: number;
@@ -4,11 +4,33 @@ import { PaginationButton } from "./PaginationButton";
4
4
  export type PagerComponentProps = Pick<ComponentPropsWithoutRef<typeof PaginationButton>, "onChange"> & {
5
5
  className?: string;
6
6
  classModifier?: string;
7
+ /**
8
+ * Total number of pages in the table
9
+ */
7
10
  numberPages?: number;
11
+ /**
12
+ * Current page
13
+ */
8
14
  currentPage?: number;
15
+ /**
16
+ * "default" or "light".
17
+ * Default displays the first, last, previous and next pages.
18
+ * Light displays only previous and next buttons, and "{currentPage} {ofLabel} {numberPages}"
19
+ * @default "default"
20
+ */
9
21
  mode?: "default" | "light";
22
+ /**
23
+ * Label for the previous button
24
+ */
10
25
  previousLabel?: string;
26
+ /**
27
+ * Label for the next button
28
+ */
11
29
  nextLabel?: string;
30
+ /**
31
+ * Label for text betweeen current page a total number of pages. Only used in "light" mode
32
+ * @default "sur"
33
+ */
12
34
  ofLabel?: string;
13
35
  };
14
36
  declare const Pager: ({ className, classModifier, numberPages, currentPage, onChange, mode, previousLabel, nextLabel, ofLabel, }: PagerComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,9 +5,15 @@ type TableProps = ComponentPropsWithoutRef<"table"> & {
5
5
  };
6
6
  declare const Table: {
7
7
  ({ className, classModifier, children, ...othersProps }: TableProps): import("react/jsx-runtime").JSX.Element;
8
+ /**
9
+ * @deprecated Use Table.THead instead
10
+ */
8
11
  Header: ({ children, className, classModifier, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
9
12
  classModifier?: string;
10
13
  }) => import("react/jsx-runtime").JSX.Element;
14
+ /**
15
+ * @deprecated Use Table.TBody instead
16
+ */
11
17
  Body: ({ children, className, classModifier, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
12
18
  classModifier?: string;
13
19
  }) => import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,13 @@ const Table = ({ className, classModifier, children, ...othersProps }) => {
10
10
  const componentClassName = getComponentClassName(className, classModifier, "af-table");
11
11
  return (_jsx("table", { className: componentClassName, ...othersProps, children: children }));
12
12
  };
13
+ /**
14
+ * @deprecated Use Table.THead instead
15
+ */
13
16
  Table.Header = THead;
17
+ /**
18
+ * @deprecated Use Table.TBody instead
19
+ */
14
20
  Table.Body = TBody;
15
21
  Table.THead = THead;
16
22
  Table.TBody = TBody;
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable react/no-array-index-key */
2
3
  import { Children, isValidElement, } from "react";
3
4
  import { getComponentClassName } from "../..";
4
5
  import { Pane } from "./Pane";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
2
1
  import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
2
+ import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
3
3
  import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
4
4
  import "@fontsource/source-sans-pro";
5
5
  export { Action } from "./Action/Action";
@@ -8,10 +8,11 @@ export { Badge } from "./Badge/Badge";
8
8
  export { Button } from "./Button/Button";
9
9
  export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./Form/Checkbox";
10
10
  export { Choice, ChoiceInput } from "./Form/Choice";
11
- export { Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
11
+ export { LegacyField as Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
12
12
  export { Date, DateInput } from "./Form/Date";
13
13
  export { File, FileInput, FileTable, type FilePreview } from "./Form/File";
14
14
  export { MultiSelect, MultiSelectInput } from "./Form/MultiSelect";
15
+ export { NestedQuestion } from "./Form/NestedQuestion/NestedQuestion";
15
16
  export { Number, NumberInput } from "./Form/Number";
16
17
  export { Pass, PassInput } from "./Form/Pass";
17
18
  export { Radio, RadioInput, RadioItem, RadioModes } from "./Form/Radio";
@@ -19,7 +20,6 @@ export { Select, SelectBase, SelectInput } from "./Form/Select";
19
20
  export { Slider, SliderInput } from "./Form/Slider";
20
21
  export { Text, TextInput } from "./Form/Text";
21
22
  export { Textarea, TextareaInput } from "./Form/Textarea";
22
- export { NestedQuestion } from "./Form/NestedQuestion/NestedQuestion";
23
23
  export { Footer } from "./Layout/Footer";
24
24
  export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./Layout/Header";
25
25
  export { Link, type LinkProps } from "./Link/Link";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
2
1
  import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
2
+ import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
3
3
  import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
4
4
  import "@fontsource/source-sans-pro";
5
5
  export { Action } from "./Action/Action";
@@ -8,10 +8,11 @@ export { Badge } from "./Badge/Badge";
8
8
  export { Button } from "./Button/Button";
9
9
  export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./Form/Checkbox";
10
10
  export { Choice, ChoiceInput } from "./Form/Choice";
11
- export { Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
11
+ export { LegacyField as Field, FieldError, FieldForm, FieldInput, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./Form/core";
12
12
  export { Date, DateInput } from "./Form/Date";
13
13
  export { File, FileInput, FileTable } from "./Form/File";
14
14
  export { MultiSelect, MultiSelectInput } from "./Form/MultiSelect";
15
+ export { NestedQuestion } from "./Form/NestedQuestion/NestedQuestion";
15
16
  export { Number, NumberInput } from "./Form/Number";
16
17
  export { Pass, PassInput } from "./Form/Pass";
17
18
  export { Radio, RadioInput, RadioItem, RadioModes } from "./Form/Radio";
@@ -19,7 +20,6 @@ export { Select, SelectBase, SelectInput } from "./Form/Select";
19
20
  export { Slider, SliderInput } from "./Form/Slider";
20
21
  export { Text, TextInput } from "./Form/Text";
21
22
  export { Textarea, TextareaInput } from "./Form/Textarea";
22
- export { NestedQuestion } from "./Form/NestedQuestion/NestedQuestion";
23
23
  export { Footer } from "./Layout/Footer";
24
24
  export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./Layout/Header";
25
25
  export { Link } from "./Link/Link";
@@ -13,6 +13,7 @@ const listClassModifier = (classModifier) => {
13
13
  };
14
14
  export const getComponentClassName = (className, classModifier, defaultClassName) => {
15
15
  const classNameToUse = className || defaultClassName;
16
+ // Fail fast, when no className or defaultClassName we don't want to loop on modifier
16
17
  if (!classNameToUse) {
17
18
  return "";
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-slash-react",
3
- "version": "1.2.0-alpha.5",
3
+ "version": "1.2.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "homepage": "https://github.com/AxaFrance/design-system#readme",
49
49
  "peerDependencies": {
50
- "@axa-fr/design-system-slash-css": "1.2.0-alpha.5",
50
+ "@axa-fr/design-system-slash-css": "1.2.0",
51
51
  "@material-symbols/svg-400": ">= 0.19.0",
52
52
  "react": ">= 18"
53
53
  },