@pronto-tools-and-more/components 12.16.0 → 12.18.0

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/main.js CHANGED
@@ -392,18 +392,27 @@ var BaseSideBar = ({ children }) => {
392
392
  return /* @__PURE__ */ React.createElement("aside", { className: "SideBar" }, ...children);
393
393
  };
394
394
 
395
+ // src/parts/FixTo/FixTo.ts
396
+ var fixTo = (to) => {
397
+ if (to && to.startsWith("/#/")) {
398
+ return to.slice(2);
399
+ }
400
+ return to;
401
+ };
402
+
395
403
  // src/parts/Button/Button.tsx
396
404
  var Button = ({
397
405
  message,
398
406
  to,
399
407
  className
400
408
  }) => {
409
+ const fixedTo = fixTo(to);
401
410
  const json = {
402
411
  type: "button",
403
412
  message,
404
413
  tap: {
405
414
  type: "navigate",
406
- path: to
415
+ path: fixedTo
407
416
  }
408
417
  };
409
418
  const fullClassName = `Button ${className || ""}`;
@@ -1106,11 +1115,12 @@ var Link = ({
1106
1115
  } else {
1107
1116
  fullMessage = `<span class="LinkContent">${message}</span>`;
1108
1117
  }
1118
+ const fixedTo = fixTo(to);
1109
1119
  const json = {
1110
1120
  type: "button",
1111
1121
  tap: {
1112
1122
  type: "navigate",
1113
- path: to
1123
+ path: fixedTo
1114
1124
  },
1115
1125
  message: fullMessage
1116
1126
  };
@@ -0,0 +1 @@
1
+ export declare const fixTo: (to: any) => any;
@@ -1,4 +1,4 @@
1
- export type LinkIconPosition = 'left' | 'right';
1
+ export type LinkIconPosition = "left" | "right";
2
2
  export declare const Link: ({ to, message, className, icon, iconPosition, }: {
3
3
  to: string;
4
4
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "12.16.0",
3
+ "version": "12.18.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",