@axa-fr/design-system-slash-react 1.2.1-alpha.119 → 1.2.1-alpha.122
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/Link/Link.d.ts +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/Link/LinkAnchor.d.ts +5 -3
- package/dist/Link/LinkAnchor.js +4 -2
- package/package.json +2 -2
package/dist/Link/Link.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "@axa-fr/design-system-slash-css/dist/Link/Link.
|
|
1
|
+
import "@axa-fr/design-system-slash-css/dist/Link/Link.css";
|
|
2
2
|
import { type CustomLinkProps } from "./CustomLink";
|
|
3
3
|
import { type LinkComponentProps } from "./LinkAnchor";
|
|
4
4
|
export type LinkProps = LinkComponentProps | CustomLinkProps;
|
package/dist/Link/Link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "@axa-fr/design-system-slash-css/dist/Link/Link.
|
|
2
|
+
import "@axa-fr/design-system-slash-css/dist/Link/Link.css";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { CustomLink } from "./CustomLink";
|
|
5
5
|
import { LinkAnchor } from "./LinkAnchor";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ComponentPropsWithRef,
|
|
1
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
2
|
+
import { Svg } from "../Svg";
|
|
2
3
|
type AnchorLinkProps = {
|
|
3
|
-
leftIcon?:
|
|
4
|
-
rightIcon?:
|
|
4
|
+
leftIcon?: ReactElement<typeof Svg>;
|
|
5
|
+
rightIcon?: ReactElement<typeof Svg>;
|
|
5
6
|
className?: string;
|
|
6
7
|
disabled?: boolean;
|
|
8
|
+
variant?: "default" | "reverse";
|
|
7
9
|
};
|
|
8
10
|
type LinkComponentProps = ComponentPropsWithRef<"a"> & AnchorLinkProps;
|
|
9
11
|
declare const LinkAnchor: import("react").ForwardRefExoticComponent<Omit<LinkComponentProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
package/dist/Link/LinkAnchor.js
CHANGED
|
@@ -2,8 +2,10 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { linkClassName } from "./linkClassName";
|
|
5
|
-
const LinkAnchor = forwardRef(({ className, target, rel, leftIcon, children, rightIcon, disabled, ...restProps }, ref) => {
|
|
6
|
-
const finalClassName = classnames(linkClassName, className
|
|
5
|
+
const LinkAnchor = forwardRef(({ className, target, rel, leftIcon, children, rightIcon, disabled, variant, ...restProps }, ref) => {
|
|
6
|
+
const finalClassName = classnames(linkClassName, className, {
|
|
7
|
+
[`${linkClassName}--reverse`]: variant === "reverse",
|
|
8
|
+
});
|
|
7
9
|
return (_jsxs("a", { className: finalClassName, rel: target === "_blank" ? "noopener noreferrer" : rel, "aria-disabled": disabled ?? restProps["aria-disabled"], ref: ref, target: target, ...restProps, children: [leftIcon, children, rightIcon] }));
|
|
8
10
|
});
|
|
9
11
|
LinkAnchor.displayName = "LinkAnchor";
|
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.122",
|
|
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.122",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|