@axa-fr/canopee-react 1.6.1-alpha.4 → 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.
- package/dist/distributeur/Accordion/Accordion.js +8 -5
- package/dist/distributeur/Accordion/CollapseCard.d.ts +1 -0
- package/dist/distributeur/Accordion/CollapseCard.js +6 -2
- package/dist/distributeur/Accordion/Header.d.ts +1 -0
- package/dist/distributeur/Accordion/Header.js +6 -2
- package/dist/distributeur/Action/Action.d.ts +1 -0
- package/dist/distributeur/Action/Action.js +7 -2
- package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +2 -0
- package/dist/distributeur/Form/Checkbox/CheckboxItem.js +2 -2
- package/dist/distributeur/Form/Choice/Choice.d.ts +1 -0
- package/dist/distributeur/Form/Date/Date.d.ts +1 -0
- package/dist/distributeur/Form/Date/Date.js +6 -2
- package/dist/distributeur/Form/File/File.d.ts +1 -0
- package/dist/distributeur/Form/File/File.js +6 -2
- package/dist/distributeur/Form/Number/Number.d.ts +1 -0
- package/dist/distributeur/Form/Number/Number.js +6 -2
- package/dist/distributeur/Form/Pass/Pass.d.ts +3 -0
- package/dist/distributeur/Form/Pass/Pass.js +3 -0
- package/dist/distributeur/Form/Pass/PassInput.d.ts +3 -0
- package/dist/distributeur/Form/Pass/PassInput.js +3 -0
- package/dist/distributeur/Form/Radio/RadioItem.d.ts +1 -0
- package/dist/distributeur/Form/Select/SelectBase.d.ts +1 -0
- package/dist/distributeur/Form/Select/SelectBase.js +6 -2
- package/dist/distributeur/Form/Slider/Slider.d.ts +1 -0
- package/dist/distributeur/Form/Slider/Slider.js +6 -2
- package/dist/distributeur/Form/Text/Text.d.ts +1 -0
- package/dist/distributeur/Form/Text/Text.js +6 -2
- package/dist/distributeur/Form/Textarea/Textarea.d.ts +1 -0
- package/dist/distributeur/Form/Textarea/Textarea.js +6 -2
- package/dist/distributeur/Form/core/getOptionClassName.d.ts +1 -1
- package/dist/distributeur/Form/core/getOptionClassName.js +11 -9
- package/dist/distributeur/HelpButton/index.js +6 -2
- package/dist/distributeur/Layout/Header/Header.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Header.js +6 -2
- package/dist/distributeur/Layout/Header/Infos/Infos.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Infos/Infos.js +6 -2
- package/dist/distributeur/Layout/Header/Name/Name.d.ts +1 -0
- package/dist/distributeur/Layout/Header/Name/Name.js +6 -2
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.d.ts +1 -0
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.js +6 -2
- package/dist/distributeur/Layout/Header/User/User.d.ts +1 -0
- package/dist/distributeur/Layout/Header/User/User.js +6 -2
- package/dist/distributeur/Loader/Loader.d.ts +1 -0
- package/dist/distributeur/Loader/Loader.js +6 -2
- package/dist/distributeur/MandatoryMention/MandatoryMention.d.ts +12 -0
- package/dist/distributeur/MandatoryMention/MandatoryMention.js +10 -0
- package/dist/distributeur/Messages/Message.js +5 -5
- package/dist/distributeur/ModalAgent/components/Body.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Body.js +6 -2
- package/dist/distributeur/ModalAgent/components/Footer.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Footer.js +6 -2
- package/dist/distributeur/ModalAgent/components/Header.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/Header.js +7 -2
- package/dist/distributeur/ModalAgent/components/HeaderBase.d.ts +1 -0
- package/dist/distributeur/ModalAgent/components/HeaderBase.js +6 -2
- package/dist/distributeur/Popover/AnimatedPopover.d.ts +1 -0
- package/dist/distributeur/Popover/AnimatedPopover.js +6 -2
- package/dist/distributeur/Popover/Popover.d.ts +1 -0
- package/dist/distributeur/Popover/Popover.types.d.ts +2 -0
- package/dist/distributeur/Popover/PopoverBase.d.ts +1 -0
- package/dist/distributeur/Popover/PopoverBase.js +1 -2
- package/dist/distributeur/Restitution/ArticleRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/ArticleRestitution.js +6 -2
- package/dist/distributeur/Restitution/HeaderRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/HeaderRestitution.js +6 -2
- package/dist/distributeur/Restitution/Restitution.d.ts +3 -1
- package/dist/distributeur/Restitution/Restitution.js +7 -3
- package/dist/distributeur/Restitution/SectionRestitution.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitution.js +6 -2
- package/dist/distributeur/Restitution/SectionRestitutionColumn.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionColumn.js +9 -2
- package/dist/distributeur/Restitution/SectionRestitutionRow.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionRow.js +10 -3
- package/dist/distributeur/Restitution/SectionRestitutionTitle.d.ts +1 -0
- package/dist/distributeur/Restitution/SectionRestitutionTitle.js +6 -2
- package/dist/distributeur/Steps/StepBase.d.ts +1 -0
- package/dist/distributeur/Steps/StepBase.js +7 -2
- package/dist/distributeur/Steps/Steps.d.ts +2 -1
- package/dist/distributeur/Steps/Steps.js +7 -3
- package/dist/distributeur/Table/TBody.d.ts +1 -0
- package/dist/distributeur/Table/TBody.js +6 -2
- package/dist/distributeur/Table/THead.d.ts +1 -0
- package/dist/distributeur/Table/THead.js +6 -2
- package/dist/distributeur/Table/Table.d.ts +3 -1
- package/dist/distributeur/Table/Table.js +6 -2
- package/dist/distributeur/Table/Td.d.ts +1 -0
- package/dist/distributeur/Table/Td.js +6 -2
- package/dist/distributeur/Table/Th.d.ts +3 -1
- package/dist/distributeur/Table/Th.js +7 -3
- package/dist/distributeur/Table/Tr.d.ts +1 -0
- package/dist/distributeur/Table/Tr.js +6 -2
- package/dist/distributeur/Tag/Tag.js +9 -9
- package/dist/distributeur/Title/Title.d.ts +1 -0
- package/dist/distributeur/Title/Title.js +6 -2
- package/dist/distributeur.d.ts +1 -0
- package/dist/distributeur.js +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
4
4
|
const Tr = ({ children, id, className, classModifier, ...otherProps }) => {
|
|
5
|
-
const componentClassName =
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: "af-table__tr",
|
|
7
|
+
modifiers: classModifier?.split(" "),
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
6
10
|
return (_jsx("tr", { className: componentClassName, ...otherProps, children: children }, id));
|
|
7
11
|
};
|
|
8
12
|
export { Tr };
|
|
@@ -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 {
|
|
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 =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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 {
|
|
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 =
|
|
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/dist/distributeur.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { Footer } from "./distributeur/Layout/Footer";
|
|
|
30
30
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, type AnchorNavBarItem, } from "./distributeur/Layout/Header";
|
|
31
31
|
export { MainContainer } from "./distributeur/Layout/MainContainer/MainContainer";
|
|
32
32
|
export { Link, type LinkProps } from "./distributeur/Link/Link";
|
|
33
|
+
export { MandatoryMention } from "./distributeur/MandatoryMention/MandatoryMention";
|
|
33
34
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./distributeur/ModalAgent";
|
|
34
35
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./distributeur/Restitution";
|
|
35
36
|
export { Step, StepBase, Steps, VerticalStep, type StepLinkOnClickHandler, type StepMode, } from "./distributeur/Steps";
|
package/dist/distributeur.js
CHANGED
|
@@ -29,6 +29,7 @@ export { Footer } from "./distributeur/Layout/Footer";
|
|
|
29
29
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./distributeur/Layout/Header";
|
|
30
30
|
export { MainContainer } from "./distributeur/Layout/MainContainer/MainContainer";
|
|
31
31
|
export { Link } from "./distributeur/Link/Link";
|
|
32
|
+
export { MandatoryMention } from "./distributeur/MandatoryMention/MandatoryMention";
|
|
32
33
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./distributeur/ModalAgent";
|
|
33
34
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./distributeur/Restitution";
|
|
34
35
|
export { Step, StepBase, Steps, VerticalStep, } from "./distributeur/Steps";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/canopee-react",
|
|
3
|
-
"version": "1.6.1-alpha.
|
|
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.
|
|
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"
|