@axa-fr/canopee-react 1.6.1-alpha.5 → 1.6.1-alpha.6

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.
Files changed (93) hide show
  1. package/dist/distributeur/Accordion/Accordion.js +8 -5
  2. package/dist/distributeur/Accordion/CollapseCard.d.ts +1 -0
  3. package/dist/distributeur/Accordion/CollapseCard.js +6 -2
  4. package/dist/distributeur/Accordion/Header.d.ts +1 -0
  5. package/dist/distributeur/Accordion/Header.js +6 -2
  6. package/dist/distributeur/Action/Action.d.ts +1 -0
  7. package/dist/distributeur/Action/Action.js +7 -2
  8. package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +2 -0
  9. package/dist/distributeur/Form/Checkbox/CheckboxItem.js +2 -2
  10. package/dist/distributeur/Form/Choice/Choice.d.ts +1 -0
  11. package/dist/distributeur/Form/Date/Date.d.ts +1 -0
  12. package/dist/distributeur/Form/Date/Date.js +6 -2
  13. package/dist/distributeur/Form/File/File.d.ts +1 -0
  14. package/dist/distributeur/Form/File/File.js +6 -2
  15. package/dist/distributeur/Form/Number/Number.d.ts +1 -0
  16. package/dist/distributeur/Form/Number/Number.js +6 -2
  17. package/dist/distributeur/Form/Pass/Pass.d.ts +3 -0
  18. package/dist/distributeur/Form/Pass/Pass.js +3 -0
  19. package/dist/distributeur/Form/Pass/PassInput.d.ts +3 -0
  20. package/dist/distributeur/Form/Pass/PassInput.js +3 -0
  21. package/dist/distributeur/Form/Radio/RadioItem.d.ts +1 -0
  22. package/dist/distributeur/Form/Select/SelectBase.d.ts +1 -0
  23. package/dist/distributeur/Form/Select/SelectBase.js +6 -2
  24. package/dist/distributeur/Form/Slider/Slider.d.ts +1 -0
  25. package/dist/distributeur/Form/Slider/Slider.js +6 -2
  26. package/dist/distributeur/Form/Text/Text.d.ts +1 -0
  27. package/dist/distributeur/Form/Text/Text.js +6 -2
  28. package/dist/distributeur/Form/Textarea/Textarea.d.ts +1 -0
  29. package/dist/distributeur/Form/Textarea/Textarea.js +6 -2
  30. package/dist/distributeur/Form/core/getOptionClassName.d.ts +1 -1
  31. package/dist/distributeur/Form/core/getOptionClassName.js +11 -9
  32. package/dist/distributeur/HelpButton/index.js +6 -2
  33. package/dist/distributeur/Layout/Header/Header.d.ts +1 -0
  34. package/dist/distributeur/Layout/Header/Header.js +6 -2
  35. package/dist/distributeur/Layout/Header/Infos/Infos.d.ts +1 -0
  36. package/dist/distributeur/Layout/Header/Infos/Infos.js +6 -2
  37. package/dist/distributeur/Layout/Header/Name/Name.d.ts +1 -0
  38. package/dist/distributeur/Layout/Header/Name/Name.js +6 -2
  39. package/dist/distributeur/Layout/Header/NavBar/NavBarBase.d.ts +1 -0
  40. package/dist/distributeur/Layout/Header/NavBar/NavBarBase.js +6 -2
  41. package/dist/distributeur/Layout/Header/User/User.d.ts +1 -0
  42. package/dist/distributeur/Layout/Header/User/User.js +6 -2
  43. package/dist/distributeur/Loader/Loader.d.ts +1 -0
  44. package/dist/distributeur/Loader/Loader.js +6 -2
  45. package/dist/distributeur/Messages/Message.js +5 -5
  46. package/dist/distributeur/ModalAgent/components/Body.d.ts +1 -0
  47. package/dist/distributeur/ModalAgent/components/Body.js +6 -2
  48. package/dist/distributeur/ModalAgent/components/Footer.d.ts +1 -0
  49. package/dist/distributeur/ModalAgent/components/Footer.js +6 -2
  50. package/dist/distributeur/ModalAgent/components/Header.d.ts +1 -0
  51. package/dist/distributeur/ModalAgent/components/Header.js +7 -2
  52. package/dist/distributeur/ModalAgent/components/HeaderBase.d.ts +1 -0
  53. package/dist/distributeur/ModalAgent/components/HeaderBase.js +6 -2
  54. package/dist/distributeur/Popover/AnimatedPopover.d.ts +1 -0
  55. package/dist/distributeur/Popover/AnimatedPopover.js +6 -2
  56. package/dist/distributeur/Popover/Popover.d.ts +1 -0
  57. package/dist/distributeur/Popover/Popover.types.d.ts +2 -0
  58. package/dist/distributeur/Popover/PopoverBase.d.ts +1 -0
  59. package/dist/distributeur/Popover/PopoverBase.js +1 -2
  60. package/dist/distributeur/Restitution/ArticleRestitution.d.ts +1 -0
  61. package/dist/distributeur/Restitution/ArticleRestitution.js +6 -2
  62. package/dist/distributeur/Restitution/HeaderRestitution.d.ts +1 -0
  63. package/dist/distributeur/Restitution/HeaderRestitution.js +6 -2
  64. package/dist/distributeur/Restitution/Restitution.d.ts +3 -1
  65. package/dist/distributeur/Restitution/Restitution.js +7 -3
  66. package/dist/distributeur/Restitution/SectionRestitution.d.ts +1 -0
  67. package/dist/distributeur/Restitution/SectionRestitution.js +6 -2
  68. package/dist/distributeur/Restitution/SectionRestitutionColumn.d.ts +1 -0
  69. package/dist/distributeur/Restitution/SectionRestitutionColumn.js +9 -2
  70. package/dist/distributeur/Restitution/SectionRestitutionRow.d.ts +1 -0
  71. package/dist/distributeur/Restitution/SectionRestitutionRow.js +10 -3
  72. package/dist/distributeur/Restitution/SectionRestitutionTitle.d.ts +1 -0
  73. package/dist/distributeur/Restitution/SectionRestitutionTitle.js +6 -2
  74. package/dist/distributeur/Steps/StepBase.d.ts +1 -0
  75. package/dist/distributeur/Steps/StepBase.js +7 -2
  76. package/dist/distributeur/Steps/Steps.d.ts +2 -1
  77. package/dist/distributeur/Steps/Steps.js +7 -3
  78. package/dist/distributeur/Table/TBody.d.ts +1 -0
  79. package/dist/distributeur/Table/TBody.js +6 -2
  80. package/dist/distributeur/Table/THead.d.ts +1 -0
  81. package/dist/distributeur/Table/THead.js +6 -2
  82. package/dist/distributeur/Table/Table.d.ts +3 -1
  83. package/dist/distributeur/Table/Table.js +6 -2
  84. package/dist/distributeur/Table/Td.d.ts +1 -0
  85. package/dist/distributeur/Table/Td.js +6 -2
  86. package/dist/distributeur/Table/Th.d.ts +3 -1
  87. package/dist/distributeur/Table/Th.js +7 -3
  88. package/dist/distributeur/Table/Tr.d.ts +1 -0
  89. package/dist/distributeur/Table/Tr.js +6 -2
  90. package/dist/distributeur/Tag/Tag.js +9 -9
  91. package/dist/distributeur/Title/Title.d.ts +1 -0
  92. package/dist/distributeur/Title/Title.js +6 -2
  93. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Tag/Tag.css";
3
3
  import { forwardRef, } from "react";
4
- import { getComponentClassNameWithUserClassname } from "../utilities/helpers/getComponentClassName";
4
+ import { getClassName } from "../utilities/helpers/getClassName";
5
5
  /**
6
6
  * Tag component to display a label with various styles.
7
7
  *
@@ -16,16 +16,16 @@ import { getComponentClassNameWithUserClassname } from "../utilities/helpers/get
16
16
  */
17
17
  export const Tag = forwardRef(({ children, className, classModifier, variant, ...otherProps }, ref) => {
18
18
  const actualModifier = variant || classModifier || "default";
19
- const componentClassName = getComponentClassNameWithUserClassname({
20
- userClassName: className,
21
- classModifier: actualModifier,
22
- componentClassName: "af-tag",
19
+ const componentClassName = getClassName({
20
+ baseClassName: "af-tag",
21
+ modifiers: [actualModifier],
22
+ className,
23
23
  });
24
24
  // Kept for backward compatibility. May be removed in a future version
25
- const badgeClassName = getComponentClassNameWithUserClassname({
26
- userClassName: className,
27
- classModifier: actualModifier,
28
- componentClassName: "af-badge",
25
+ const badgeClassName = getClassName({
26
+ baseClassName: "af-badge",
27
+ modifiers: [actualModifier],
28
+ className,
29
29
  });
30
30
  return (_jsx("span", { ref: ref, className: `${componentClassName} ${badgeClassName}`, ...otherProps, children: children }));
31
31
  });
@@ -2,6 +2,7 @@ import "@axa-fr/canopee-css/distributeur/Title/Title.css";
2
2
  import { type ComponentPropsWithRef, type PropsWithChildren, type ReactElement, type ReactNode } from "react";
3
3
  type Headings = "h2" | "h3" | "h4";
4
4
  type TitleProps = ComponentPropsWithRef<"h2"> & {
5
+ /** @deprecated Use `className` instead. */
5
6
  classModifier?: string;
6
7
  heading?: Headings;
7
8
  contentLeft?: ReactElement;
@@ -1,10 +1,14 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import "@axa-fr/canopee-css/distributeur/Title/Title.css";
3
3
  import { forwardRef, } from "react";
4
- import { getComponentClassName } from "../utilities";
4
+ import { getClassName } from "../utilities/helpers/getClassName";
5
5
  const baseClass = "af-title";
6
6
  export const Title = forwardRef(({ className, classModifier, children, heading: Heading = "h2", contentLeft, contentRight, ...otherProps }, ref) => {
7
- const componentClassName = getComponentClassName(className, classModifier, baseClass);
7
+ const componentClassName = getClassName({
8
+ baseClassName: baseClass,
9
+ modifiers: classModifier?.split(" "),
10
+ className,
11
+ });
8
12
  return (_jsxs("div", { className: `${baseClass}--container`, children: [_jsxs(Heading, { ref: ref, className: componentClassName, ...otherProps, children: [children, contentLeft] }), contentRight ? (_jsx("div", { className: "content-right", children: contentRight })) : null] }));
9
13
  });
10
14
  Title.displayName = "Title";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axa-fr/canopee-react",
3
- "version": "1.6.1-alpha.5",
3
+ "version": "1.6.1-alpha.6",
4
4
  "description": "Package React - Design System Canopée",
5
5
  "exports": {
6
6
  "./distributeur": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "homepage": "https://github.com/AxaFrance/design-system#readme",
51
51
  "peerDependencies": {
52
- "@axa-fr/canopee-css": "1.6.1-alpha.5",
52
+ "@axa-fr/canopee-css": "1.6.1-alpha.6",
53
53
  "@material-symbols/svg-400": ">= 0.19.0",
54
54
  "@material-symbols/svg-700": ">= 0.19.0",
55
55
  "react": ">= 18"