@axa-fr/design-system-slash-react 1.2.1-alpha.104 → 1.2.1-alpha.105
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/Layout/Footer/Footer.d.ts +2 -1
- package/dist/Layout/Footer/Footer.js +4 -2
- package/dist/Layout/Header/AnchorNavBar/AnchorNavBar.d.ts +1 -0
- package/dist/Layout/Header/AnchorNavBar/AnchorNavBar.js +2 -1
- package/dist/Layout/Header/Header.js +2 -1
- package/dist/Layout/Header/HeaderTitle/HeaderTitle.js +4 -4
- package/dist/Layout/Header/NavBar/NavBarBase.js +9 -8
- package/dist/Layout/Header/NavBar/index.d.ts +1 -0
- package/dist/Layout/Header/NavBar/index.js +1 -0
- package/dist/Layout/MainContainer/MainContainer.d.ts +6 -0
- package/dist/Layout/MainContainer/MainContainer.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "@axa-fr/design-system-slash-css/dist/Layout/Footer/Footer.
|
|
1
|
+
import "@axa-fr/design-system-slash-css/dist/Layout/Footer/Footer.css";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
2
3
|
type FooterProps = {
|
|
3
4
|
href?: string;
|
|
4
5
|
title?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
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
|
-
import "@axa-fr/design-system-slash-css/dist/Layout/Footer/Footer.
|
|
3
|
+
import "@axa-fr/design-system-slash-css/dist/Layout/Footer/Footer.css";
|
|
4
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
|
-
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
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) => (_jsxs("footer", { ref: ref, className: classNames("af-container", className), ...props, 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] })) : null] })));
|
|
6
8
|
Footer.displayName = "Footer";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/AnchorNavBar/AnchorNavBar.css";
|
|
3
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
3
4
|
export type AnchorNavBarItem = {
|
|
4
5
|
name: string;
|
|
5
6
|
isActive?: boolean;
|
|
@@ -5,9 +5,10 @@ import { Svg } from "../../../Svg";
|
|
|
5
5
|
import { Link } from "../../../Link/Link";
|
|
6
6
|
import { linkClassName } from "../../../Link/linkClassName";
|
|
7
7
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/AnchorNavBar/AnchorNavBar.css";
|
|
8
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
8
9
|
const defaultClassName = "af-anchor-navbar";
|
|
9
10
|
export const AnchorNavBar = ({ items }) => {
|
|
10
|
-
return (_jsx("nav", { className: defaultClassName, children: _jsx("ul", { children: items.map((item) => {
|
|
11
|
+
return (_jsx("nav", { className: classNames("af-container", defaultClassName), children: _jsx("ul", { children: items.map((item) => {
|
|
11
12
|
if (item.render) {
|
|
12
13
|
return (_jsx("li", { children: _jsx(Link, { render: item.render, className: classNames(`${linkClassName} ${defaultClassName}-link`, {
|
|
13
14
|
[`${defaultClassName}-link--active`]: item.isActive,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/Header.scss";
|
|
3
|
+
import classNames from "classnames";
|
|
3
4
|
import { getComponentClassName } from "../../utilities";
|
|
4
5
|
const defaultClassName = "af-header";
|
|
5
6
|
const Header = ({ classModifier, className, children }) => {
|
|
6
7
|
const componentClassName = getComponentClassName(className, classModifier, defaultClassName);
|
|
7
|
-
return (_jsx("div", { className:
|
|
8
|
+
return (_jsx("div", { className: classNames("af-container", componentClassName), children: _jsx("header", { className: `${defaultClassName}__content`, role: "banner", children: children }) }));
|
|
8
9
|
};
|
|
9
10
|
export { Header };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/HeaderTitle/HeaderTitle.scss";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { getComponentClassName } from "../../../utilities";
|
|
@@ -10,8 +10,8 @@ const defaultClassName = "af-title-bar";
|
|
|
10
10
|
const HeaderTitle = ({ children, classModifier, className, isSticky = true, contentLeft, contentRight, subtitle, title, toggleMenu, anchorNavBarItems, }) => {
|
|
11
11
|
const componentClassName = getComponentClassName(className, getClassModifier(classModifier, isSticky), defaultClassName);
|
|
12
12
|
const isAnchorNavBarPresent = anchorNavBarItems && anchorNavBarItems.length > 0;
|
|
13
|
-
return (_jsxs("div", { className: classNames(componentClassName, {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames("af-container", componentClassName, {
|
|
14
|
+
[`${defaultClassName}__shadow`]: isAnchorNavBarPresent,
|
|
15
|
+
}), children: [Boolean(toggleMenu) && (_jsx("div", { className: "burger-container", children: _jsx(ToggleButton, { idControl: "mainmenu", children: _jsx(Action, { className: "btn af-title-bar__mobile-menu af-btn--circle", id: "togglemenu", icon: "menu-hamburger", title: "Toggle menu", onClick: toggleMenu }) }) })), _jsxs("div", { className: `${defaultClassName}__leftSection`, children: [contentLeft, _jsxs("h1", { className: `${defaultClassName}__title`, children: [title, subtitle ? (_jsx("span", { className: `${defaultClassName}__subtitle`, children: subtitle })) : null] }), children] }), contentRight ? (_jsx("div", { className: `${defaultClassName}__rightSection`, children: contentRight })) : null] }), isAnchorNavBarPresent ? (_jsx(AnchorNavBar, { items: anchorNavBarItems })) : null] }));
|
|
16
16
|
};
|
|
17
17
|
export { HeaderTitle };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
2
3
|
import { getComponentClassName } from "../../../utilities";
|
|
3
4
|
const defaultClassName = "af-nav-container";
|
|
4
5
|
const NavBarBase = ({ isVisible = true, onClick, id = "mainmenu", toggleMenuId = "togglemenu", isMenuFocused, className, classModifier, handleKeys, onFocus, onBlur, children, }) => {
|
|
5
6
|
const componentClassName = getComponentClassName(className, classModifier, defaultClassName);
|
|
6
|
-
return (_jsxs("div", { className: componentClassName, children: [_jsx("button", { "aria-controls": id, "aria-haspopup": "true", type: "button", onClick: onClick, className: `mask fade ${isVisible ? "show" : ""}`, id: `open-${toggleMenuId}`, "aria-label": "Open Menu" }),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
return (_jsxs("div", { className: classNames("af-container", componentClassName), children: [_jsx("button", { "aria-controls": id, "aria-haspopup": "true", type: "button", onClick: onClick, className: `mask fade ${isVisible ? "show" : ""}`, id: `open-${toggleMenuId}`, "aria-label": "Open Menu" }), _jsxs("nav", { className: `af-nav af-drawer left ${isVisible ? "show" : ""}`, role: "navigation", "aria-label": "Menu principal", children: [_jsxs("div", { className: "af-nav__aside-header", children: [_jsx("h4", { className: "af-nav__aside-title", children: "Menu" }), _jsx("button", { "aria-controls": id, "aria-haspopup": "true", onClick: onClick, type: "button", className: "af-nav__aside-close", id: `close-${toggleMenuId}`, "aria-label": "Close Menu", children: "\u00D7" })] }), _jsx("ul", { onKeyDown: (e) => {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
handleKeys(e.key);
|
|
10
|
+
}, onFocus: (e) => {
|
|
11
|
+
onFocus({ e });
|
|
12
|
+
}, onBlur: (e) => {
|
|
13
|
+
onBlur({ e });
|
|
14
|
+
}, className: `af-nav__list ${isMenuFocused ? "af-nav__list--focused" : ""}`, role: "menubar", id: id, children: children })] })] }));
|
|
14
15
|
};
|
|
15
16
|
export { NavBarBase };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/NavBar/NavBar.scss";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
2
3
|
export { NavBar } from "./NavBar";
|
|
3
4
|
export { NavBarBase } from "./NavBarBase";
|
|
4
5
|
export { NavBarItem, NavBarItemBase, NavBarItemLink } from "./NavBarItem";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@axa-fr/design-system-slash-css/dist/Layout/Header/NavBar/NavBar.scss";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
2
3
|
export { NavBar } from "./NavBar";
|
|
3
4
|
export { NavBarBase } from "./NavBarBase";
|
|
4
5
|
export { NavBarItem, NavBarItemBase, NavBarItemLink } from "./NavBarItem";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, PropsWithChildren } from "react";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/Layout/MainContainer/MainContainer.css";
|
|
3
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
4
|
+
type MainContainerProps = ComponentPropsWithoutRef<"main"> & PropsWithChildren;
|
|
5
|
+
export declare const MainContainer: ({ children, ...othersProps }: MainContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/Layout/MainContainer/MainContainer.css";
|
|
3
|
+
import "@axa-fr/design-system-slash-css/dist/common/breakpoints.css";
|
|
4
|
+
export const MainContainer = ({ children, ...othersProps }) => (_jsx("main", { className: "af-container", ...othersProps, children: children }));
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { Text, TextInput } from "./Form/Text";
|
|
|
24
24
|
export { Textarea, TextareaInput } from "./Form/Textarea";
|
|
25
25
|
export { Footer } from "./Layout/Footer";
|
|
26
26
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./Layout/Header";
|
|
27
|
+
export { MainContainer } from "./Layout/MainContainer/MainContainer";
|
|
27
28
|
export { Link, type LinkProps } from "./Link/Link";
|
|
28
29
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./ModalAgent";
|
|
29
30
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./Restitution";
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { Text, TextInput } from "./Form/Text";
|
|
|
24
24
|
export { Textarea, TextareaInput } from "./Form/Textarea";
|
|
25
25
|
export { Footer } from "./Layout/Footer";
|
|
26
26
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./Layout/Header";
|
|
27
|
+
export { MainContainer } from "./Layout/MainContainer/MainContainer";
|
|
27
28
|
export { Link } from "./Link/Link";
|
|
28
29
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./ModalAgent";
|
|
29
30
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./Restitution";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "1.2.1-alpha.
|
|
3
|
+
"version": "1.2.1-alpha.105",
|
|
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.1-alpha.
|
|
50
|
+
"@axa-fr/design-system-slash-css": "1.2.1-alpha.105",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|