@axa-fr/design-system-look-and-feel-react 1.0.5-ci.93 → 1.0.5-ci.95

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.
@@ -12,6 +12,7 @@ type ButtonProps = {
12
12
  variant?: Variants;
13
13
  iconLeft?: ReactNode;
14
14
  iconRight?: ReactNode;
15
+ loading?: boolean;
15
16
  } & ComponentPropsWithoutRef<"button">;
16
- export declare const ButtonClient: ({ children, className, disabled, variant, iconLeft, iconRight, ...args }: PropsWithChildren<ButtonProps>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const ButtonClient: ({ children, className, disabled, variant, iconLeft, iconRight, loading, ...args }: PropsWithChildren<ButtonProps>) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -1,6 +1,7 @@
1
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "@axa-fr/design-system-look-and-feel-css/dist/Button/Button.scss";
3
3
  import classNames from "classnames";
4
+ import { Loader } from "../Loader";
4
5
  export var Variants;
5
6
  (function (Variants) {
6
7
  Variants["primary"] = "primary";
@@ -10,6 +11,6 @@ export var Variants;
10
11
  Variants["tertiary"] = "tertiary";
11
12
  Variants["ghost"] = "ghost";
12
13
  })(Variants || (Variants = {}));
13
- export const ButtonClient = ({ children, className, disabled, variant, iconLeft, iconRight, ...args }) => {
14
- return (_jsxs("button", { className: classNames("af-btn-client", variant && `af-btn-client--${variant.toString()}`, className), disabled: disabled, type: "button", ...args, children: [iconLeft, children, iconRight] }));
14
+ export const ButtonClient = ({ children, className, disabled, variant, iconLeft, iconRight, loading, ...args }) => {
15
+ return (_jsxs("button", { className: classNames("af-btn-client", variant && `af-btn-client--${variant.toString()}`, className), disabled: disabled || loading, type: "button", ...args, children: [iconLeft, children, iconRight, loading && _jsx(Loader, { size: 24, border: 3, variant: "gray" })] }));
15
16
  };
package/package.json CHANGED
@@ -1,17 +1,27 @@
1
1
  {
2
2
  "name": "@axa-fr/design-system-look-and-feel-react",
3
- "version": "1.0.5-ci.93",
3
+ "version": "1.0.5-ci.95",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
9
+ "development": {
10
+ "import": "./src/index.ts"
11
+ },
12
+ "default": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
11
16
  },
12
17
  "./utilities": {
13
- "import": "./dist/utilities.js",
14
- "types": "./dist/utilities.d.ts"
18
+ "development": {
19
+ "import": "./src/utilities.ts"
20
+ },
21
+ "default": {
22
+ "import": "./dist/utilities.js",
23
+ "types": "./dist/utilities.d.ts"
24
+ }
15
25
  }
16
26
  },
17
27
  "files": [
@@ -44,7 +54,7 @@
44
54
  },
45
55
  "homepage": "https://github.com/AxaFrance/design-system#readme",
46
56
  "peerDependencies": {
47
- "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.93",
57
+ "@axa-fr/design-system-look-and-feel-css": "1.0.5-ci.95",
48
58
  "@material-symbols/svg-400": ">= 0.19.0",
49
59
  "react": ">= 18"
50
60
  },