allaw-ui 1.0.159 → 1.0.162

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.
@@ -9,6 +9,7 @@ export interface CheckboxFormProps {
9
9
  isRequired?: boolean;
10
10
  linkText?: string;
11
11
  linkUrl?: string;
12
+ onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
12
13
  size?: "default" | "small";
13
14
  style?: "default" | "light";
14
15
  markType?: "cross" | "check";
@@ -3,7 +3,7 @@ import Checkbox from "../../atoms/checkboxes/Checkbox";
3
3
  import Paragraph from "../../atoms/typography/Paragraph";
4
4
  import "./CheckboxForm.css";
5
5
  var CheckboxForm = function (_a) {
6
- var _b = _a.checked, checked = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.color, color = _c === void 0 ? "noir" : _c, label = _a.label, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, linkText = _a.linkText, linkUrl = _a.linkUrl, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.style, style = _f === void 0 ? "default" : _f, _g = _a.markType, markType = _g === void 0 ? "cross" : _g;
6
+ var _b = _a.checked, checked = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.color, color = _c === void 0 ? "noir" : _c, label = _a.label, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, linkText = _a.linkText, linkUrl = _a.linkUrl, onLinkClick = _a.onLinkClick, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.style, style = _f === void 0 ? "default" : _f, _g = _a.markType, markType = _g === void 0 ? "cross" : _g;
7
7
  var checkboxId = "checkbox-".concat(Math.random().toString(36).substr(2, 9));
8
8
  var handleCheckboxChange = function (checked) {
9
9
  if (onChange) {
@@ -16,7 +16,7 @@ var CheckboxForm = function (_a) {
16
16
  label && (React.createElement("label", { htmlFor: checkboxId, className: "checkbox-form-label-container" },
17
17
  React.createElement(Paragraph, { variant: "semiBold", color: color, text: React.createElement(React.Fragment, null,
18
18
  React.createElement("span", null, label),
19
- linkText && linkUrl && (React.createElement("a", { href: linkUrl, target: "_blank", rel: "noopener noreferrer", className: "checkbox-form-link", onClick: function (e) { return e.stopPropagation(); } }, linkText))), size: size }),
19
+ linkText && linkUrl && (React.createElement("a", { href: linkUrl, target: "_blank", rel: "noopener noreferrer", className: "checkbox-form-link", onClick: onLinkClick }, linkText))), size: size }),
20
20
  isRequired && (React.createElement("span", { className: "checkbox-form-required" },
21
21
  "\u00A0",
22
22
  "*"))))));
@@ -7,9 +7,9 @@ declare const meta: {
7
7
  layout: string;
8
8
  };
9
9
  args: {
10
- onLogin: import("@vitest/spy").Mock<[], void>;
11
- onLogout: import("@vitest/spy").Mock<[], void>;
12
- onCreateAccount: import("@vitest/spy").Mock<[], void>;
10
+ onLogin: import("@vitest/spy").Mock<(...args: any[]) => any>;
11
+ onLogout: import("@vitest/spy").Mock<(...args: any[]) => any>;
12
+ onCreateAccount: import("@vitest/spy").Mock<(...args: any[]) => any>;
13
13
  };
14
14
  };
15
15
  export default meta;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.159",
3
+ "version": "1.0.162",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",