@cfx-dev/ui-components 5.0.8 → 5.0.10

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.
@@ -6,6 +6,7 @@ export interface LinkButtonProps extends BtnExtendedProps {
6
6
  to: string;
7
7
  isHrefProp?: boolean;
8
8
  target?: string;
9
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
9
10
  Component?: React.ElementType;
10
11
  }
11
12
  export declare function LinkButton(props: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import o from "react";
3
- import { isExternalUrl as b } from "../../utils/links.js";
4
- import { getButtonClassName as h, ButtonContent as B } from "./Button.js";
5
- function M(e) {
3
+ import { isExternalUrl as h } from "../../utils/links.js";
4
+ import { getButtonClassName as B, ButtonContent as N } from "./Button.js";
5
+ function P(e) {
6
6
  const {
7
7
  to: t,
8
8
  title: f = "",
@@ -12,8 +12,9 @@ function M(e) {
12
12
  isHrefProp: a = !1,
13
13
  Component: c,
14
14
  disabled: l = !1,
15
- ref: C
16
- } = e, d = o.useMemo(() => h(e), [e]), r = b(t), k = r ? "a" : c || "a", p = o.useMemo(() => r || a ? { href: t } : { to: t }, [t, r, a]), x = o.useCallback((i) => {
15
+ ref: C,
16
+ rel: d = "noopener noreferrer"
17
+ } = e, k = o.useMemo(() => B(e), [e]), r = h(t), p = r ? "a" : c || "a", x = o.useMemo(() => r || a ? { href: t } : { to: t }, [t, r, a]), b = o.useCallback((i) => {
17
18
  if (l) {
18
19
  i.preventDefault();
19
20
  return;
@@ -21,20 +22,20 @@ function M(e) {
21
22
  n && n(i);
22
23
  }, [l, n]);
23
24
  return /* @__PURE__ */ s(
24
- k,
25
+ p,
25
26
  {
26
27
  ref: C,
27
- className: d,
28
+ className: k,
28
29
  tabIndex: m,
29
30
  title: f,
30
31
  target: u,
31
- rel: "noopener noreferrer",
32
- onClickCapture: x,
33
- ...p,
34
- children: /* @__PURE__ */ s(B, { ...e })
32
+ rel: d,
33
+ onClickCapture: b,
34
+ ...x,
35
+ children: /* @__PURE__ */ s(N, { ...e })
35
36
  }
36
37
  );
37
38
  }
38
39
  export {
39
- M as LinkButton
40
+ P as LinkButton
40
41
  };
@@ -1,2 +1,2 @@
1
1
  export { Modal } from './Modal';
2
- export type { ModalProps, ModalHeaderProps, ModalFooterProps, } from './Modal';
2
+ export type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalThemeType, } from './Modal';
package/dist/main.d.ts CHANGED
@@ -83,7 +83,7 @@ export type { ScrollableProps, VirtualScrollableProps, RailProps, } from './comp
83
83
  export { Loaf } from './components/Loaf';
84
84
  export type { LoafProps, LoafSize, LoafColor, } from './components/Loaf';
85
85
  export { Modal } from './components/Modal';
86
- export type { ModalProps, ModalHeaderProps, ModalFooterProps, } from './components/Modal';
86
+ export type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalThemeType, } from './components/Modal';
87
87
  export { NavList } from './components/NavList';
88
88
  export type { NavListProps, NavListItem } from './components/NavList';
89
89
  export { Overlay, OVERLAY_OUTLET_ID } from './components/Overlay';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "5.0.8",
4
+ "version": "5.0.10",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",