@axa-fr/design-system-slash-react 1.2.1-alpha.111 → 1.2.1-alpha.117
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/Button/Button.d.ts +11 -7
- package/dist/Button/Button.js +7 -7
- package/dist/Form/File/File.js +1 -1
- package/dist/Layout/Header/HeaderTitle/HeaderTitle.js +1 -1
- package/dist/ModalAgent/BooleanModal.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/Button/Button.css";
|
|
3
|
+
export type ButtonVariant = "primary" | "secondary" | "validated" | "danger" | "ghost" | "ghost-reverse";
|
|
4
|
+
export declare const Button: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
small?: boolean;
|
|
7
|
+
leftIcon?: ReactNode;
|
|
8
|
+
rightIcon?: ReactNode;
|
|
9
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
package/dist/Button/Button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import "@axa-fr/design-system-slash-css/dist/Button/Button.css";
|
|
5
|
+
const DEFAULT_CLASS_NAME = "af-btn";
|
|
6
|
+
export const Button = forwardRef(({ variant = "primary", small, leftIcon, rightIcon, className, children, ...props }, ref) => (_jsxs("button", { type: "button", className: classNames(DEFAULT_CLASS_NAME, variant !== "primary" && `${DEFAULT_CLASS_NAME}--${variant}`, small && `${DEFAULT_CLASS_NAME}--small`, className), ...props, ref: ref, children: [leftIcon, children, rightIcon] })));
|
|
7
|
+
Button.displayName = "Button";
|
package/dist/Form/File/File.js
CHANGED
|
@@ -55,6 +55,6 @@ const File = ({ className, classModifier, id, name, disabled, onChange, multiple
|
|
|
55
55
|
disabled,
|
|
56
56
|
});
|
|
57
57
|
const componentClassName = getComponentClassName(className, classModifier, "af-form__file-input");
|
|
58
|
-
return (_jsxs("div", { className: componentClassName, children: [_jsxs("div", { ...getRootProps({ className: "drop-box" }), children: [_jsx("input", { ...getInputProps({ id, name, readOnly, ...otherProps }) }), _jsx("div", { children: placeholder })] }),
|
|
58
|
+
return (_jsxs("div", { className: componentClassName, children: [_jsxs("div", { ...getRootProps({ className: "drop-box" }), children: [_jsx("input", { ...getInputProps({ id, name, readOnly, ...otherProps }) }), _jsx("div", { children: placeholder })] }), _jsx(Button, { className: "af-btn--file", leftIcon: _jsx("i", { className: `glyphicon glyphicon-${icon}` }), onClick: open, disabled: disabled, children: label })] }));
|
|
59
59
|
};
|
|
60
60
|
export { File };
|
|
@@ -11,7 +11,7 @@ const HeaderTitle = ({ children, classModifier, className, isSticky = true, cont
|
|
|
11
11
|
const componentClassName = getComponentClassName(className, getClassModifier(classModifier, isSticky), defaultClassName);
|
|
12
12
|
const isAnchorNavBarPresent = anchorNavBarItems && anchorNavBarItems.length > 0;
|
|
13
13
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames("af-container", componentClassName, {
|
|
14
|
-
[`${defaultClassName}
|
|
14
|
+
[`${defaultClassName}__withAnchorNavBar`]: isAnchorNavBarPresent,
|
|
15
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 };
|
|
@@ -7,7 +7,7 @@ import { Header } from "./components/Header";
|
|
|
7
7
|
const defaultClassName = "af-modal";
|
|
8
8
|
const BooleanModal = forwardRef(({ children, title, submitTitle = "Valider", cancelTitle = "Annuler", className = defaultClassName, classModifier, onCancel, onSubmit, closeButtonAriaLabel, ...props }, ref) => {
|
|
9
9
|
const componentClassName = getComponentClassName(className, classModifier, defaultClassName);
|
|
10
|
-
return (_jsxs(Modal, { className: componentClassName, onOutsideTap: onCancel, title: title, ref: ref, ...props, children: [_jsx(Header, { title: title, onCancel: onCancel, closeButtonAriaLabel: closeButtonAriaLabel }), _jsx(Body, { children: children }), _jsxs(Footer, { children: [_jsx(Button, {
|
|
10
|
+
return (_jsxs(Modal, { className: componentClassName, onOutsideTap: onCancel, title: title, ref: ref, ...props, children: [_jsx(Header, { title: title, onCancel: onCancel, closeButtonAriaLabel: closeButtonAriaLabel }), _jsx(Body, { children: children }), _jsxs(Footer, { children: [_jsx(Button, { variant: "secondary", onClick: onCancel, children: cancelTitle }), _jsx(Button, { onClick: onSubmit, variant: "validated", children: submitTitle })] })] }));
|
|
11
11
|
});
|
|
12
12
|
BooleanModal.displayName = "BooleanModal";
|
|
13
13
|
export { BooleanModal };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { Message } from "./Messages/Message";
|
|
1
2
|
import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
|
|
2
3
|
import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
|
|
3
4
|
import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
|
|
4
5
|
import "@fontsource/source-sans-pro";
|
|
5
|
-
import
|
|
6
|
+
import "@fontsource/source-sans-pro/700.css";
|
|
6
7
|
export { Action } from "./Action/Action";
|
|
7
8
|
export { Badge } from "./Badge/Badge";
|
|
8
9
|
export { Button } from "./Button/Button";
|
|
10
|
+
export type { ButtonVariant } from "./Button/Button";
|
|
9
11
|
export { Card } from "./Card/Card";
|
|
10
12
|
export { Divider } from "./Divider/Divider";
|
|
11
13
|
export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./Form/Checkbox";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Message } from "./Messages/Message";
|
|
1
2
|
import "@axa-fr/design-system-slash-css/dist/common/icons.scss";
|
|
2
3
|
import "@axa-fr/design-system-slash-css/dist/common/reboot.scss";
|
|
3
4
|
import "@axa-fr/design-system-slash-css/dist/common/tokens.css";
|
|
4
5
|
import "@fontsource/source-sans-pro";
|
|
5
|
-
import
|
|
6
|
+
import "@fontsource/source-sans-pro/700.css";
|
|
6
7
|
export { Action } from "./Action/Action";
|
|
7
8
|
export { Badge } from "./Badge/Badge";
|
|
8
9
|
export { Button } from "./Button/Button";
|
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.117",
|
|
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.117",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|