@cfx-dev/ui-components 0.0.17 → 0.0.19
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/components/Button/LinkButton.d.ts +19 -0
- package/dist/components/Button/LinkButton.js +48 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +99 -97
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonSize, ButtonTheme } from './Button';
|
|
3
|
+
|
|
4
|
+
export interface LinkButtonProps {
|
|
5
|
+
to: string;
|
|
6
|
+
text?: React.ReactNode;
|
|
7
|
+
title?: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
theme?: ButtonTheme;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onClick?(): void;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
target?: string;
|
|
16
|
+
Component?: React.ElementType;
|
|
17
|
+
decorator?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const LinkButton: React.ForwardRefExoticComponent<LinkButtonProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as R, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { clsx as j } from "../../utils/clsx.js";
|
|
4
|
+
import { n as B } from "../../functional-C0pE183N.js";
|
|
5
|
+
import { i as E } from "../../links-CgOD-Vfj.js";
|
|
6
|
+
import { s as o } from "../../Button.module-Z6njvP9Z.js";
|
|
7
|
+
const P = l.forwardRef(function(i, c) {
|
|
8
|
+
const {
|
|
9
|
+
to: e,
|
|
10
|
+
text: n = null,
|
|
11
|
+
icon: t = null,
|
|
12
|
+
title: m = "",
|
|
13
|
+
className: d = "",
|
|
14
|
+
theme: f = "default",
|
|
15
|
+
size: p = "normal",
|
|
16
|
+
disabled: u = !1,
|
|
17
|
+
tabIndex: x,
|
|
18
|
+
target: k = "",
|
|
19
|
+
onClick: C = B,
|
|
20
|
+
decorator: s = null,
|
|
21
|
+
Component: h
|
|
22
|
+
} = i, N = j(o.root, o[f], o[p], d, {
|
|
23
|
+
[o.disabled]: u,
|
|
24
|
+
[o.icon]: !!t && !n,
|
|
25
|
+
[o.text]: !!n
|
|
26
|
+
}), r = E(e), b = r ? "a" : h || "a", L = l.useMemo(() => r ? { href: e } : { to: e }, [e, r]);
|
|
27
|
+
return /* @__PURE__ */ R(
|
|
28
|
+
b,
|
|
29
|
+
{
|
|
30
|
+
ref: c,
|
|
31
|
+
className: N,
|
|
32
|
+
tabIndex: x,
|
|
33
|
+
title: m,
|
|
34
|
+
target: k,
|
|
35
|
+
rel: "noopener noreferrer",
|
|
36
|
+
onClickCapture: C,
|
|
37
|
+
...L,
|
|
38
|
+
children: [
|
|
39
|
+
!!t && /* @__PURE__ */ a("span", { className: o["icon-node"], children: t }),
|
|
40
|
+
n,
|
|
41
|
+
!!s && /* @__PURE__ */ a("div", { className: o.decorator, children: s })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
P as LinkButton
|
|
48
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as links from './utils/links';
|
|
|
8
8
|
import * as math from './utils/math';
|
|
9
9
|
import * as outlet from './utils/outlet';
|
|
10
10
|
import * as string from './utils/string';
|
|
11
|
+
export type { ValueOrGetter } from './utils/getValue';
|
|
11
12
|
export declare const utils: {
|
|
12
13
|
clsx: typeof clsx;
|
|
13
14
|
getValue: typeof getValue;
|
|
@@ -21,6 +22,7 @@ export declare const utils: {
|
|
|
21
22
|
};
|
|
22
23
|
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
23
24
|
export { Button } from './components/Button/Button';
|
|
25
|
+
export { LinkButton } from './components/Button/LinkButton';
|
|
24
26
|
export { ButtonBar } from './components/Button/ButtonBar';
|
|
25
27
|
export { Avatar } from './components/Avatar/Avatar';
|
|
26
28
|
export { BackdropPortal } from './components/BackdropPortal/BackdropPortal';
|
package/dist/main.js
CHANGED
|
@@ -8,53 +8,54 @@ import f from "./utils/mergeRefs.js";
|
|
|
8
8
|
import { o as x } from "./outlet-B11a3Kgw.js";
|
|
9
9
|
import { s as a } from "./string-NVxCUbqk.js";
|
|
10
10
|
import { Checkbox as P } from "./components/Checkbox/Checkbox.js";
|
|
11
|
-
import { Button as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
11
|
+
import { Button as y } from "./components/Button/Button.js";
|
|
12
|
+
import { LinkButton as v } from "./components/Button/LinkButton.js";
|
|
13
|
+
import { ButtonBar as T } from "./components/Button/ButtonBar.js";
|
|
14
|
+
import { Avatar as R } from "./components/Avatar/Avatar.js";
|
|
15
|
+
import { BackdropPortal as D } from "./components/BackdropPortal/BackdropPortal.js";
|
|
16
|
+
import { Badge as V } from "./components/Badge/Badge.js";
|
|
17
|
+
import { ControlBox as A } from "./components/ControlBox/ControlBox.js";
|
|
18
|
+
import { CountryFlag as N } from "./components/CountryFlag/CountryFlag.js";
|
|
19
|
+
import { Decorate as q } from "./components/Decorate/Decorate.js";
|
|
20
|
+
import { Dot as E } from "./components/Dot/Dot.js";
|
|
21
|
+
import { Flyout as H } from "./components/Flyout/Flyout.js";
|
|
22
|
+
import { Icon as K } from "./components/Icon/Icon.js";
|
|
23
|
+
import { Indicator as U } from "./components/Indicator/Indicator.js";
|
|
24
|
+
import { InfoPanel as X } from "./components/InfoPanel/InfoPanel.js";
|
|
25
|
+
import { Input as Z } from "./components/Input/Input.js";
|
|
26
|
+
import { RichInput as $ } from "./components/Input/RichInput.js";
|
|
27
|
+
import { Interactive as ro } from "./components/Interactive/Interactive.js";
|
|
28
|
+
import { Island as eo } from "./components/Island/Island.js";
|
|
29
|
+
import { Box as po } from "./components/Layout/Box/Box.js";
|
|
30
|
+
import { Center as xo } from "./components/Layout/Center/Center.js";
|
|
31
|
+
import { Flex as lo } from "./components/Layout/Flex/Flex.js";
|
|
32
|
+
import { FlexRestricter as io } from "./components/Layout/Flex/FlexRestricter.js";
|
|
33
|
+
import { Pad as co } from "./components/Layout/Pad/Pad.js";
|
|
34
|
+
import { Page as Bo } from "./components/Layout/Page/Page.js";
|
|
35
|
+
import { Scrollable as Io } from "./components/Layout/Scrollable/Scrollable.js";
|
|
36
|
+
import { VirtualScrollable as ho } from "./components/Layout/Scrollable/VirtualScrollable.js";
|
|
37
|
+
import { Loaf as ko } from "./components/Loaf/Loaf.js";
|
|
38
|
+
import { Modal as bo } from "./components/Modal/Modal.js";
|
|
39
|
+
import { NavList as Co } from "./components/NavList/NavList.js";
|
|
40
|
+
import { Overlay as Fo } from "./components/Overlay/Overlay.js";
|
|
41
|
+
import { Popover as Lo } from "./components/Popover/Popover.js";
|
|
42
|
+
import { PremiumBadge as Oo } from "./components/PremiumBadge/PremiumBadge.js";
|
|
43
|
+
import { Prose as wo } from "./components/Prose/Prose.js";
|
|
44
|
+
import { Radio as Mo } from "./components/Radio/Radio.js";
|
|
45
|
+
import { Select as jo } from "./components/Select/Select.js";
|
|
46
|
+
import { Separator as zo } from "./components/Separator/Separator.js";
|
|
47
|
+
import { Shroud as Go } from "./components/Shroud/Shroud.js";
|
|
48
|
+
import { Spacer as Jo } from "./components/Spacer/Spacer.js";
|
|
49
|
+
import { Style as Qo, useContextualStyle as Uo } from "./components/Style/Style.js";
|
|
50
|
+
import { Switch as Xo } from "./components/Switch/Switch.js";
|
|
51
|
+
import { Tabular as Zo } from "./components/Tabular/Tabular.js";
|
|
52
|
+
import { Text as $o, TextBlock as or } from "./components/Text/Text.js";
|
|
53
|
+
import { Textarea as tr } from "./components/Textarea/Textarea.js";
|
|
54
|
+
import { Title as mr } from "./components/Title/Title.js";
|
|
55
|
+
import { B as fr, I as xr } from "./Icons-B26SczGZ.js";
|
|
56
|
+
import { OnScreenSensor as lr } from "./components/OnScreenSensor.js";
|
|
57
|
+
import { ui as ir } from "./components/ui.js";
|
|
58
|
+
import { Symbols as cr } from "./components/Symbols.js";
|
|
58
59
|
const I = {
|
|
59
60
|
clsx: o,
|
|
60
61
|
getValue: t,
|
|
@@ -67,56 +68,57 @@ const I = {
|
|
|
67
68
|
string: a
|
|
68
69
|
};
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
R as Avatar,
|
|
72
|
+
D as BackdropPortal,
|
|
73
|
+
V as Badge,
|
|
74
|
+
po as Box,
|
|
75
|
+
fr as BrandIcon,
|
|
76
|
+
y as Button,
|
|
77
|
+
T as ButtonBar,
|
|
78
|
+
xo as Center,
|
|
78
79
|
P as Checkbox,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
co as
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Oo as
|
|
103
|
-
wo as
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
jo as
|
|
108
|
-
zo as
|
|
109
|
-
Go as
|
|
110
|
-
Jo as
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Zo as
|
|
115
|
-
|
|
116
|
-
or as
|
|
117
|
-
tr as
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
80
|
+
A as ControlBox,
|
|
81
|
+
N as CountryFlag,
|
|
82
|
+
q as Decorate,
|
|
83
|
+
E as Dot,
|
|
84
|
+
lo as Flex,
|
|
85
|
+
io as FlexRestricter,
|
|
86
|
+
H as Flyout,
|
|
87
|
+
K as Icon,
|
|
88
|
+
xr as Icons,
|
|
89
|
+
U as Indicator,
|
|
90
|
+
X as InfoPanel,
|
|
91
|
+
Z as Input,
|
|
92
|
+
ro as Interactive,
|
|
93
|
+
eo as Island,
|
|
94
|
+
v as LinkButton,
|
|
95
|
+
ko as Loaf,
|
|
96
|
+
bo as Modal,
|
|
97
|
+
Co as NavList,
|
|
98
|
+
lr as OnScreenSensor,
|
|
99
|
+
Fo as Overlay,
|
|
100
|
+
co as Pad,
|
|
101
|
+
Bo as Page,
|
|
102
|
+
Lo as Popover,
|
|
103
|
+
Oo as PremiumBadge,
|
|
104
|
+
wo as Prose,
|
|
105
|
+
Mo as Radio,
|
|
106
|
+
$ as RichInput,
|
|
107
|
+
Io as Scrollable,
|
|
108
|
+
jo as Select,
|
|
109
|
+
zo as Separator,
|
|
110
|
+
Go as Shroud,
|
|
111
|
+
Jo as Spacer,
|
|
112
|
+
Qo as Style,
|
|
113
|
+
Xo as Switch,
|
|
114
|
+
cr as Symbols,
|
|
115
|
+
Zo as Tabular,
|
|
116
|
+
$o as Text,
|
|
117
|
+
or as TextBlock,
|
|
118
|
+
tr as Textarea,
|
|
119
|
+
mr as Title,
|
|
120
|
+
ho as VirtualScrollable,
|
|
121
|
+
ir as ui,
|
|
122
|
+
Uo as useContextualStyle,
|
|
121
123
|
I as utils
|
|
122
124
|
};
|