@cfx-dev/ui-components 2.1.23 → 2.1.24
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/assets/Button.css +1 -1
- package/dist/assets/Link.css +1 -0
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Text.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Button/Button.js +78 -77
- package/dist/components/Button/ButtonShowcase.js +46 -33
- package/dist/components/Link/ButtonLink.d.ts +9 -0
- package/dist/components/Link/ButtonLink.js +26 -0
- package/dist/components/Link/Link.d.ts +13 -0
- package/dist/components/Link/Link.js +35 -0
- package/dist/components/Link/LinkShowcase.d.ts +5 -0
- package/dist/components/Link/LinkShowcase.js +62 -0
- package/dist/components/Link/index.d.ts +3 -0
- package/dist/components/Link/index.js +7 -0
- package/dist/components/Modal/Modal.js +34 -34
- package/dist/components/Table/Table.d.ts +2 -1
- package/dist/components/Table/Table.js +72 -71
- package/dist/components/Text/Text.js +5 -5
- package/dist/main.d.ts +3 -0
- package/dist/main.js +137 -132
- package/dist/styles-scss/global.scss +16 -8
- package/dist/styles-scss/tokens.scss +7 -0
- package/package.json +1 -1
|
@@ -1,108 +1,109 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as W, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { noop as
|
|
6
|
-
import '../../assets/Button.css';const M = "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
import { Icon as A } from "../Icon/Icon.js";
|
|
4
|
+
import { clsx as B } from "../../utils/clsx.js";
|
|
5
|
+
import { noop as y } from "../../utils/functional.js";
|
|
6
|
+
import '../../assets/Button.css';const q = "_unsetAll_13zdy_1", I = "_root_13zdy_5", M = "_fullWidth_13zdy_38", j = "_primary_13zdy_58", w = "_secondary_13zdy_79", F = "_linked_13zdy_121", R = "_quicklink_13zdy_150", v = "_icon_13zdy_157", D = "_icononly_13zdy_182", L = "_decorator_13zdy_187", o = {
|
|
7
|
+
unsetAll: q,
|
|
8
|
+
root: I,
|
|
9
|
+
fullWidth: M,
|
|
10
|
+
primary: j,
|
|
11
|
+
secondary: w,
|
|
12
|
+
"on-light": "_on-light_13zdy_100",
|
|
13
|
+
linked: F,
|
|
14
|
+
quicklink: R,
|
|
15
|
+
icon: v,
|
|
16
|
+
icononly: D,
|
|
17
|
+
decorator: L
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
+
function U(c) {
|
|
19
20
|
const {
|
|
20
21
|
text: t = null,
|
|
21
|
-
icon:
|
|
22
|
+
icon: l,
|
|
22
23
|
decorator: n = null
|
|
23
|
-
} =
|
|
24
|
-
return /* @__PURE__ */ g
|
|
24
|
+
} = c;
|
|
25
|
+
return /* @__PURE__ */ W(g, { children: [
|
|
25
26
|
t,
|
|
26
|
-
!!
|
|
27
|
-
!!n && /* @__PURE__ */
|
|
27
|
+
!!l && /* @__PURE__ */ r(A, { name: l, className: o.icon }),
|
|
28
|
+
!!n && /* @__PURE__ */ r("div", { className: o.decorator, children: n })
|
|
28
29
|
] });
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function E(c) {
|
|
31
32
|
const {
|
|
32
33
|
text: t = null,
|
|
33
|
-
icon:
|
|
34
|
+
icon: l,
|
|
34
35
|
theme: n = "default",
|
|
35
|
-
disabled:
|
|
36
|
-
className:
|
|
37
|
-
autofocus:
|
|
38
|
-
fullWidth:
|
|
39
|
-
tabIndex:
|
|
40
|
-
} =
|
|
41
|
-
return
|
|
42
|
-
[o.disabled]:
|
|
43
|
-
[o.icononly]: !!
|
|
36
|
+
disabled: s = !1,
|
|
37
|
+
className: d = "",
|
|
38
|
+
autofocus: u = !1,
|
|
39
|
+
fullWidth: a = !1,
|
|
40
|
+
tabIndex: i
|
|
41
|
+
} = c;
|
|
42
|
+
return B(o.unsetAll, o.root, o[n], d, {
|
|
43
|
+
[o.disabled]: s,
|
|
44
|
+
[o.icononly]: !!l && (t === null || typeof t > "u"),
|
|
44
45
|
[o.text]: !!t,
|
|
45
|
-
[o.autofocus]:
|
|
46
|
-
[o.fullWidth]:
|
|
46
|
+
[o.autofocus]: u || typeof i < "u",
|
|
47
|
+
[o.fullWidth]: a
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
+
const P = m.forwardRef(function(t, l) {
|
|
50
51
|
const {
|
|
51
52
|
text: n = null,
|
|
52
|
-
icon:
|
|
53
|
-
title:
|
|
54
|
-
type:
|
|
55
|
-
className:
|
|
56
|
-
theme:
|
|
53
|
+
icon: s,
|
|
54
|
+
title: d = "",
|
|
55
|
+
type: u = "button",
|
|
56
|
+
className: a = "",
|
|
57
|
+
theme: i = "default",
|
|
57
58
|
disabled: e = !1,
|
|
58
|
-
onClick:
|
|
59
|
-
onMouseDown: p =
|
|
60
|
-
onMouseUp:
|
|
61
|
-
autofocus:
|
|
62
|
-
tabIndex:
|
|
63
|
-
fullWidth:
|
|
64
|
-
ariaLabel:
|
|
65
|
-
} = t,
|
|
59
|
+
onClick: h = y,
|
|
60
|
+
onMouseDown: p = y,
|
|
61
|
+
onMouseUp: z = y,
|
|
62
|
+
autofocus: _ = !1,
|
|
63
|
+
tabIndex: f,
|
|
64
|
+
fullWidth: k = !1,
|
|
65
|
+
ariaLabel: b = ""
|
|
66
|
+
} = t, x = m.useMemo(() => E({
|
|
66
67
|
text: n,
|
|
67
|
-
icon:
|
|
68
|
-
theme:
|
|
68
|
+
icon: s,
|
|
69
|
+
theme: i,
|
|
69
70
|
disabled: e,
|
|
70
|
-
className:
|
|
71
|
-
autofocus:
|
|
72
|
-
fullWidth:
|
|
73
|
-
tabIndex:
|
|
71
|
+
className: a,
|
|
72
|
+
autofocus: _,
|
|
73
|
+
fullWidth: k,
|
|
74
|
+
tabIndex: f
|
|
74
75
|
}), [
|
|
75
|
-
f,
|
|
76
|
-
s,
|
|
77
|
-
y,
|
|
78
|
-
e,
|
|
79
|
-
i,
|
|
80
76
|
_,
|
|
77
|
+
a,
|
|
78
|
+
k,
|
|
79
|
+
e,
|
|
80
|
+
s,
|
|
81
|
+
f,
|
|
81
82
|
n,
|
|
82
|
-
|
|
83
|
-
]),
|
|
84
|
-
e ||
|
|
85
|
-
}, [e,
|
|
86
|
-
return /* @__PURE__ */
|
|
83
|
+
i
|
|
84
|
+
]), C = m.useCallback((N) => {
|
|
85
|
+
e || h(N);
|
|
86
|
+
}, [e, h]);
|
|
87
|
+
return /* @__PURE__ */ r(
|
|
87
88
|
"button",
|
|
88
89
|
{
|
|
89
|
-
ref:
|
|
90
|
+
ref: l,
|
|
90
91
|
disabled: e,
|
|
91
|
-
className:
|
|
92
|
-
onClick:
|
|
92
|
+
className: x,
|
|
93
|
+
onClick: C,
|
|
93
94
|
onMouseDown: p,
|
|
94
|
-
onMouseUp:
|
|
95
|
-
autoFocus:
|
|
96
|
-
tabIndex:
|
|
97
|
-
title:
|
|
98
|
-
type:
|
|
99
|
-
"aria-label":
|
|
100
|
-
children: /* @__PURE__ */
|
|
95
|
+
onMouseUp: z,
|
|
96
|
+
autoFocus: _,
|
|
97
|
+
tabIndex: f,
|
|
98
|
+
title: d,
|
|
99
|
+
type: u,
|
|
100
|
+
"aria-label": b,
|
|
101
|
+
children: /* @__PURE__ */ r(U, { ...t })
|
|
101
102
|
}
|
|
102
103
|
);
|
|
103
104
|
});
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
P as Button,
|
|
107
|
+
U as ButtonContent,
|
|
108
|
+
E as getButtonClassName
|
|
108
109
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { Flex as n } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as i } from "../Text/Text.js";
|
|
5
|
-
import { Button as
|
|
6
|
-
import { ButtonBar as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { Button as r } from "./Button.js";
|
|
6
|
+
import { ButtonBar as o } from "./ButtonBar.js";
|
|
7
|
+
import { LinkButton as c } from "./LinkButton.js";
|
|
8
|
+
function a() {
|
|
9
|
+
return /* @__PURE__ */ t(n, { gap: "large", vertical: !0, children: [
|
|
10
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
10
11
|
/* @__PURE__ */ e(i, { children: "Default" }),
|
|
11
12
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
12
|
-
|
|
13
|
+
r,
|
|
13
14
|
{
|
|
14
15
|
text: "Sign In",
|
|
15
16
|
theme: "default",
|
|
@@ -17,10 +18,10 @@ function o() {
|
|
|
17
18
|
}
|
|
18
19
|
) })
|
|
19
20
|
] }),
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
21
22
|
/* @__PURE__ */ e(i, { children: "Primary" }),
|
|
22
23
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
23
|
-
|
|
24
|
+
r,
|
|
24
25
|
{
|
|
25
26
|
text: "Sign In",
|
|
26
27
|
theme: "primary",
|
|
@@ -28,10 +29,10 @@ function o() {
|
|
|
28
29
|
}
|
|
29
30
|
) })
|
|
30
31
|
] }),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
32
33
|
/* @__PURE__ */ e(i, { children: "Secondary" }),
|
|
33
34
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
34
|
-
|
|
35
|
+
r,
|
|
35
36
|
{
|
|
36
37
|
text: "Sign In",
|
|
37
38
|
theme: "secondary",
|
|
@@ -39,10 +40,10 @@ function o() {
|
|
|
39
40
|
}
|
|
40
41
|
) })
|
|
41
42
|
] }),
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
43
44
|
/* @__PURE__ */ e(i, { children: "On Light" }),
|
|
44
45
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
45
|
-
|
|
46
|
+
r,
|
|
46
47
|
{
|
|
47
48
|
text: "Sign In",
|
|
48
49
|
theme: "on-light",
|
|
@@ -50,10 +51,10 @@ function o() {
|
|
|
50
51
|
}
|
|
51
52
|
) })
|
|
52
53
|
] }),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
54
55
|
/* @__PURE__ */ e(i, { children: "Quick Link" }),
|
|
55
56
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
56
|
-
|
|
57
|
+
r,
|
|
57
58
|
{
|
|
58
59
|
text: "Sign In",
|
|
59
60
|
theme: "quicklink",
|
|
@@ -61,20 +62,20 @@ function o() {
|
|
|
61
62
|
}
|
|
62
63
|
) })
|
|
63
64
|
] }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
65
66
|
/* @__PURE__ */ e(i, { children: "No Icon" }),
|
|
66
67
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
67
|
-
|
|
68
|
+
r,
|
|
68
69
|
{
|
|
69
70
|
text: "Sign In",
|
|
70
71
|
theme: "default"
|
|
71
72
|
}
|
|
72
73
|
) })
|
|
73
74
|
] }),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
75
76
|
/* @__PURE__ */ e(i, { children: "Full Width" }),
|
|
76
77
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
77
|
-
|
|
78
|
+
r,
|
|
78
79
|
{
|
|
79
80
|
text: "Sign In",
|
|
80
81
|
theme: "default",
|
|
@@ -83,11 +84,11 @@ function o() {
|
|
|
83
84
|
}
|
|
84
85
|
) })
|
|
85
86
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
87
88
|
/* @__PURE__ */ e(i, { children: "Linked" }),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ t(n, { p: 4, style: { backgroundColor: "var(--color-modal-background)" }, children: [
|
|
89
90
|
/* @__PURE__ */ e(
|
|
90
|
-
|
|
91
|
+
r,
|
|
91
92
|
{
|
|
92
93
|
text: "Sign In",
|
|
93
94
|
theme: "linked",
|
|
@@ -95,7 +96,7 @@ function o() {
|
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
98
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
99
|
+
r,
|
|
99
100
|
{
|
|
100
101
|
disabled: !0,
|
|
101
102
|
text: "Copy",
|
|
@@ -105,19 +106,31 @@ function o() {
|
|
|
105
106
|
)
|
|
106
107
|
] })
|
|
107
108
|
] }),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
110
|
+
/* @__PURE__ */ e(i, { children: "LinkButton - look like button but its anchor" }),
|
|
111
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
112
|
+
c,
|
|
113
|
+
{
|
|
114
|
+
to: "/",
|
|
115
|
+
text: "Sign In",
|
|
116
|
+
theme: "primary",
|
|
117
|
+
icon: "Users"
|
|
118
|
+
}
|
|
119
|
+
) })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
109
122
|
/* @__PURE__ */ e(i, { children: "Button Bar" }),
|
|
110
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
/* @__PURE__ */ e(
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
-
/* @__PURE__ */ e(
|
|
123
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ t(o, { children: [
|
|
124
|
+
/* @__PURE__ */ e(r, { text: "Sign In", theme: "primary", icon: "Users" }),
|
|
125
|
+
/* @__PURE__ */ e(r, { text: "Register", theme: "secondary", icon: "Users" }),
|
|
126
|
+
/* @__PURE__ */ e(r, { text: "Sign Out", theme: "on-light", icon: "Users" }),
|
|
127
|
+
/* @__PURE__ */ e(r, { text: "Create Account", theme: "default", icon: "Users" })
|
|
115
128
|
] }) })
|
|
116
129
|
] }),
|
|
117
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ t(n, { gap: "normal", vertical: !0, children: [
|
|
118
131
|
/* @__PURE__ */ e(i, { children: "Long text" }),
|
|
119
132
|
/* @__PURE__ */ e("div", { style: { maxWidth: "300px" }, children: /* @__PURE__ */ e(
|
|
120
|
-
|
|
133
|
+
r,
|
|
121
134
|
{
|
|
122
135
|
text: "Long text that should wrap around",
|
|
123
136
|
theme: "default",
|
|
@@ -127,7 +140,7 @@ function o() {
|
|
|
127
140
|
] })
|
|
128
141
|
] });
|
|
129
142
|
}
|
|
130
|
-
const
|
|
143
|
+
const x = l.memo(a);
|
|
131
144
|
export {
|
|
132
|
-
|
|
145
|
+
x as default
|
|
133
146
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LinkBaseProps } from './Link';
|
|
3
|
+
|
|
4
|
+
export type LinkProps = React.ButtonHTMLAttributes<HTMLButtonElement> & LinkBaseProps & {
|
|
5
|
+
type?: HTMLButtonElement['type'];
|
|
6
|
+
};
|
|
7
|
+
declare function ButtonLink(props: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: React.MemoExoticComponent<typeof ButtonLink>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { getLinkClassName as i } from "./Link.js";
|
|
4
|
+
function l(t) {
|
|
5
|
+
const {
|
|
6
|
+
className: c,
|
|
7
|
+
children: o,
|
|
8
|
+
type: a = "button",
|
|
9
|
+
disabled: e = !1,
|
|
10
|
+
...s
|
|
11
|
+
} = t, n = i(t);
|
|
12
|
+
return /* @__PURE__ */ r(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
...s,
|
|
16
|
+
className: n,
|
|
17
|
+
type: a,
|
|
18
|
+
"aria-disabled": e,
|
|
19
|
+
children: o
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
const b = m.memo(l);
|
|
24
|
+
export {
|
|
25
|
+
b as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface LinkBaseProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
unstyled?: boolean;
|
|
7
|
+
theme?: 'default' | 'secondary';
|
|
8
|
+
}
|
|
9
|
+
export declare function getLinkClassName(props: LinkBaseProps): string;
|
|
10
|
+
export type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & LinkBaseProps;
|
|
11
|
+
declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const _default: React.MemoExoticComponent<typeof Link>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { clsx as d } from "../../utils/clsx.js";
|
|
4
|
+
import '../../assets/Link.css';const u = "_unsetAll_6pbf7_1", f = "_root_6pbf7_5", i = "_unstyled_6pbf7_30", m = "_secondary_6pbf7_33", s = {
|
|
5
|
+
unsetAll: u,
|
|
6
|
+
root: f,
|
|
7
|
+
unstyled: i,
|
|
8
|
+
secondary: m
|
|
9
|
+
};
|
|
10
|
+
function _(t) {
|
|
11
|
+
const {
|
|
12
|
+
className: n,
|
|
13
|
+
disabled: e = !1,
|
|
14
|
+
unstyled: o = !1,
|
|
15
|
+
theme: l = "default"
|
|
16
|
+
} = t;
|
|
17
|
+
return d(s.unsetAll, s.root, s[l], {
|
|
18
|
+
[s.disabled]: e,
|
|
19
|
+
[s.unstyled]: o
|
|
20
|
+
}, n);
|
|
21
|
+
}
|
|
22
|
+
function y(t) {
|
|
23
|
+
const {
|
|
24
|
+
className: n,
|
|
25
|
+
children: e,
|
|
26
|
+
disabled: o = !1,
|
|
27
|
+
...l
|
|
28
|
+
} = t, a = _(t);
|
|
29
|
+
return /* @__PURE__ */ r("a", { ...l, "aria-disabled": o, className: a, children: e });
|
|
30
|
+
}
|
|
31
|
+
const A = c.memo(y);
|
|
32
|
+
export {
|
|
33
|
+
A as default,
|
|
34
|
+
_ as getLinkClassName
|
|
35
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { Flex as n } from "../Layout/Flex/Flex.js";
|
|
4
|
+
import { Text as r } from "../Text/Text.js";
|
|
5
|
+
import l from "./ButtonLink.js";
|
|
6
|
+
import t from "./Link.js";
|
|
7
|
+
function c() {
|
|
8
|
+
return /* @__PURE__ */ i(n, { gap: "large", vertical: !0, children: [
|
|
9
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
10
|
+
/* @__PURE__ */ e(r, { children: "Theme Default" }),
|
|
11
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { href: "/", children: "Link active" }) }),
|
|
12
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { href: "/", disabled: !0, children: "Link disable" }) }),
|
|
13
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { href: "/", unstyled: !0, children: "Link unstyled" }) })
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
16
|
+
/* @__PURE__ */ e(r, { children: "Theme secondary" }),
|
|
17
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { href: "/", theme: "secondary", children: "Link active" }) }),
|
|
18
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(t, { href: "/", theme: "secondary", disabled: !0, children: "Link disable" }) })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
21
|
+
/* @__PURE__ */ e(r, { children: "ButtonLink - look like link but its button" }),
|
|
22
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { children: "Link active" }) }),
|
|
23
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(l, { disabled: !0, children: "Link disable" }) })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
26
|
+
/* @__PURE__ */ e(r, { children: "Inside text" }),
|
|
27
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(r, { size: "large", as: "h2", children: [
|
|
28
|
+
"Out of link text. ",
|
|
29
|
+
/* @__PURE__ */ e(t, { href: "/", children: "Link text" })
|
|
30
|
+
] }) })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
33
|
+
/* @__PURE__ */ e(r, { children: "Inside typographic text" }),
|
|
34
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(r, { size: "large", as: "h2", typographic: !0, children: [
|
|
35
|
+
"Out of link text. ",
|
|
36
|
+
/* @__PURE__ */ e(t, { href: "/", children: "Link text" })
|
|
37
|
+
] }) })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
40
|
+
/* @__PURE__ */ e(r, { children: "Row a tag" }),
|
|
41
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("a", { href: "/", children: "Link text" }) })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
44
|
+
/* @__PURE__ */ e(r, { children: "Row a in text" }),
|
|
45
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(r, { size: "large", as: "h2", children: [
|
|
46
|
+
"Out of link text. ",
|
|
47
|
+
/* @__PURE__ */ e("a", { href: "/", children: "Link text" })
|
|
48
|
+
] }) })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i(n, { gap: "normal", vertical: !0, children: [
|
|
51
|
+
/* @__PURE__ */ e(r, { children: "Row a in typographic text" }),
|
|
52
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(r, { size: "large", as: "h2", typographic: !0, children: [
|
|
53
|
+
"Out of link text. ",
|
|
54
|
+
/* @__PURE__ */ e("a", { href: "/", children: "Link text" })
|
|
55
|
+
] }) })
|
|
56
|
+
] })
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
const f = d.memo(c);
|
|
60
|
+
export {
|
|
61
|
+
f as default
|
|
62
|
+
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import N from "react";
|
|
3
3
|
import "../Button/Button.js";
|
|
4
4
|
import { ButtonBar as k } from "../Button/ButtonBar.js";
|
|
5
5
|
import "../Button/LinkButton.js";
|
|
6
6
|
import y from "../IconButton/IconButton.js";
|
|
7
7
|
import { Overlay as c } from "../Overlay/Overlay.js";
|
|
8
|
-
import { Text as
|
|
9
|
-
import { clsx as
|
|
8
|
+
import { Text as m } from "../Text/Text.js";
|
|
9
|
+
import { clsx as l } from "../../utils/clsx.js";
|
|
10
10
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
11
|
-
import { useKeyboardClose as
|
|
11
|
+
import { useKeyboardClose as z } from "../../utils/hooks/useKeyboardClose.js";
|
|
12
12
|
import "../../index-2hJuj4UN.js";
|
|
13
|
-
import '../../assets/Modal.css';const B = "
|
|
13
|
+
import '../../assets/Modal.css';const B = "_root_zn44h_1", v = "_close_zn44h_37", x = "_header_zn44h_43", g = "_footer_zn44h_53", r = {
|
|
14
14
|
root: B,
|
|
15
|
-
"modal-appearance": "_modal-
|
|
15
|
+
"modal-appearance": "_modal-appearance_zn44h_1",
|
|
16
16
|
close: v,
|
|
17
17
|
header: x,
|
|
18
18
|
footer: g
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function p(t) {
|
|
21
21
|
const {
|
|
22
22
|
onClose: e,
|
|
23
|
-
children:
|
|
23
|
+
children: s,
|
|
24
24
|
className: o,
|
|
25
|
-
overlayClassName:
|
|
26
|
-
backdropClassName:
|
|
27
|
-
contentClassName:
|
|
28
|
-
ariaDescribedby:
|
|
25
|
+
overlayClassName: f,
|
|
26
|
+
backdropClassName: h,
|
|
27
|
+
contentClassName: _,
|
|
28
|
+
ariaDescribedby: b,
|
|
29
29
|
ariaLabelledby: u,
|
|
30
|
-
disableBackdropClose:
|
|
30
|
+
disableBackdropClose: i = !1,
|
|
31
31
|
disableFocusLock: C = !1
|
|
32
|
-
} = t,
|
|
33
|
-
|
|
34
|
-
}, [e,
|
|
35
|
-
return
|
|
32
|
+
} = t, d = N.useCallback(() => {
|
|
33
|
+
i || !e || e();
|
|
34
|
+
}, [e, i]);
|
|
35
|
+
return z(d), /* @__PURE__ */ n(c, { className: l(r.overlay, f), children: [
|
|
36
36
|
/* @__PURE__ */ a(
|
|
37
37
|
c.Backdrop,
|
|
38
38
|
{
|
|
39
|
-
onClick:
|
|
40
|
-
className:
|
|
39
|
+
onClick: d,
|
|
40
|
+
className: l(r.backdrop, h)
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
43
|
/* @__PURE__ */ a(
|
|
44
44
|
c.Content,
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
46
|
+
className: _,
|
|
47
47
|
disableFocusLock: C,
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ n(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
role: "dialog",
|
|
52
|
-
"aria-describedby":
|
|
52
|
+
"aria-describedby": b,
|
|
53
53
|
"aria-labelledby": u,
|
|
54
|
-
className:
|
|
54
|
+
className: l(r.root, o),
|
|
55
55
|
children: [
|
|
56
56
|
!!e && /* @__PURE__ */ a(y, { areaSize: "large", className: r.close, name: "Close", onClick: e }),
|
|
57
|
-
|
|
57
|
+
s
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
60
|
)
|
|
@@ -62,22 +62,22 @@ function f(t) {
|
|
|
62
62
|
)
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
p.Header = function(e) {
|
|
66
66
|
const {
|
|
67
|
-
title:
|
|
67
|
+
title: s,
|
|
68
68
|
description: o
|
|
69
69
|
} = e;
|
|
70
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ n("div", { className: r.header, children: [
|
|
71
71
|
/* @__PURE__ */ a(
|
|
72
|
-
|
|
72
|
+
m,
|
|
73
73
|
{
|
|
74
74
|
weight: "bold",
|
|
75
75
|
size: "large",
|
|
76
|
-
children:
|
|
76
|
+
children: s
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
79
|
o && /* @__PURE__ */ a(
|
|
80
|
-
|
|
80
|
+
m,
|
|
81
81
|
{
|
|
82
82
|
size: "small",
|
|
83
83
|
color: "secondary",
|
|
@@ -86,13 +86,13 @@ f.Header = function(e) {
|
|
|
86
86
|
)
|
|
87
87
|
] });
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
p.Footer = function(e) {
|
|
90
90
|
const {
|
|
91
|
-
className:
|
|
91
|
+
className: s,
|
|
92
92
|
...o
|
|
93
93
|
} = e;
|
|
94
|
-
return /* @__PURE__ */ a(k, { ...o, className:
|
|
94
|
+
return /* @__PURE__ */ a(k, { ...o, className: l(r.footer, s) });
|
|
95
95
|
};
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
p as Modal
|
|
98
98
|
};
|