@axa-fr/design-system-apollo-react 1.0.3-alpha.209 → 1.0.3-alpha.211
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/Tag/TagApollo.d.ts +2 -0
- package/dist/Tag/TagApollo.js +2 -0
- package/dist/Tag/TagCommon.d.ts +14 -0
- package/dist/Tag/TagCommon.js +14 -0
- package/dist/Tag/TagLF.d.ts +2 -0
- package/dist/Tag/TagLF.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/indexLF.d.ts +1 -0
- package/dist/indexLF.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare const tagVariants: {
|
|
3
|
+
readonly info: "info";
|
|
4
|
+
readonly success: "success";
|
|
5
|
+
readonly warning: "warning";
|
|
6
|
+
readonly error: "error";
|
|
7
|
+
readonly neutral: "neutral";
|
|
8
|
+
};
|
|
9
|
+
export type TagVariants = keyof typeof tagVariants;
|
|
10
|
+
type TagProps = ComponentProps<"div"> & {
|
|
11
|
+
variant?: TagVariants;
|
|
12
|
+
};
|
|
13
|
+
export declare const Tag: ({ children, className, variant, ...divProps }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { getComponentClassName } from "../utilities/getComponentClassName";
|
|
4
|
+
export const tagVariants = {
|
|
5
|
+
info: "info",
|
|
6
|
+
success: "success",
|
|
7
|
+
warning: "warning",
|
|
8
|
+
error: "error",
|
|
9
|
+
neutral: "neutral",
|
|
10
|
+
};
|
|
11
|
+
export const Tag = ({ children, className, variant = "info", ...divProps }) => {
|
|
12
|
+
const componentClassName = useMemo(() => getComponentClassName("af-tag", className, variant), [className, variant]);
|
|
13
|
+
return (_jsx("div", { className: componentClassName, ...divProps, children: _jsx("span", { className: "af-tag__label", children: children }) }));
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Button, buttonVariants, type ButtonVariants, } from "./Button/ButtonApo
|
|
|
6
6
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkApollo";
|
|
7
7
|
export { Svg } from "./Svg/Svg";
|
|
8
8
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerApollo";
|
|
9
|
+
export { Tag, type TagVariants, tagVariants } from "./Tag/TagApollo";
|
|
9
10
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
10
11
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
11
12
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { Button, buttonVariants, } from "./Button/ButtonApollo";
|
|
|
6
6
|
export { Link, linkVariants } from "./Link/LinkApollo";
|
|
7
7
|
export { Svg } from "./Svg/Svg";
|
|
8
8
|
export { Spinner, spinnerVariants, } from "./Spinner/SpinnerApollo";
|
|
9
|
+
export { Tag, tagVariants } from "./Tag/TagApollo";
|
|
9
10
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
10
11
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
|
|
11
12
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
|
package/dist/indexLF.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { Button, buttonVariants, type ButtonVariants } from "./Button/ButtonLF";
|
|
|
5
5
|
export { Link, linkVariants, type LinkVariants } from "./Link/LinkLF";
|
|
6
6
|
export { Svg } from "./Svg/Svg";
|
|
7
7
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./Spinner/SpinnerLF";
|
|
8
|
+
export { Tag, type TagVariants, tagVariants } from "./Tag/TagLF";
|
|
8
9
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
9
10
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
10
11
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
package/dist/indexLF.js
CHANGED
|
@@ -5,6 +5,7 @@ export { Button, buttonVariants } from "./Button/ButtonLF";
|
|
|
5
5
|
export { Link, linkVariants } from "./Link/LinkLF";
|
|
6
6
|
export { Svg } from "./Svg/Svg";
|
|
7
7
|
export { Spinner, spinnerVariants, } from "./Spinner/SpinnerLF";
|
|
8
|
+
export { Tag, tagVariants } from "./Tag/TagLF";
|
|
8
9
|
export { DebugGrid } from "./Grid/DebugGrid";
|
|
9
10
|
export { ItemMessage } from "./Form/ItemMessage/ItemMessageLF";
|
|
10
11
|
export { ItemLabel } from "./Form/ItemLabel/ItemLabelLF";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.211",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.3-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.3-alpha.211",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.3-alpha.211",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|