@cfx-dev/ui-components 2.1.7 → 2.1.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._rootUnset_1cbhk_1{all:unset}._root_1cbhk_1{width:100%;box-sizing:border-box;display:flex;align-items:center;gap:calc(var(--quant) * 1.5);padding:var(--offset-medium) var(--offset-large);background-color:var(--bg-color);border-left:solid calc(var(--quant) * .75) var(--border-color);border-radius:var(--border-radius-small)}._root_1cbhk_1{transition:all .25s ease,outline-offset 0s,outline 0s}._root_1cbhk_1._interactive_1cbhk_19{cursor:pointer}._root_1cbhk_1._interactive_1cbhk_19:hover ._interactiveIcon_1cbhk_22{opacity:1;transform:translate(0)}._root_1cbhk_1._interactive_1cbhk_19:focus-visible,._root_1cbhk_1._interactive_1cbhk_19:focus-visible:hover{outline-offset:var(--info-panel-focus-border-size, initial);outline:var(--info-panel-focus-border-size, initial) solid var(--border-color)}._root_1cbhk_1._interactive_1cbhk_19:focus-visible ._interactiveIcon_1cbhk_22,._root_1cbhk_1._interactive_1cbhk_19:focus-visible:hover ._interactiveIcon_1cbhk_22{opacity:1;transform:translate(0)}._root_1cbhk_1._type-neutral_1cbhk_34{--bg-color: var(--color-info-panel-background);--border-color: var(--color-info-panel-border)}._root_1cbhk_1._type-neutral_1cbhk_34._interactive_1cbhk_19:hover{--bg-color: var(--color-info-panel-background-hover)}._root_1cbhk_1._type-error_1cbhk_41{--bg-color: var(--color-info-panel-error-background);--border-color: var(--color-info-panel-error-border)}._root_1cbhk_1._type-error_1cbhk_41._interactive_1cbhk_19:hover{--bg-color: var(--color-info-panel-error-background-hover)}._root_1cbhk_1._type-success_1cbhk_48{--bg-color: var(--color-info-panel-success-background);--border-color: var(--color-info-panel-success-border)}._root_1cbhk_1._type-success_1cbhk_48._interactive_1cbhk_19:hover{--bg-color: var(--color-info-panel-success-background-hover)}._root_1cbhk_1._type-warning_1cbhk_55{--bg-color: var(--color-info-panel-warning-background);--border-color: var(--color-info-panel-warning-border)}._root_1cbhk_1._type-warning_1cbhk_55._interactive_1cbhk_19:hover{--bg-color: var(--color-info-panel-warning-background-hover)}._root_1cbhk_1._size-small_1cbhk_62{min-height:var(--control-height-small);padding:var(--offset-small) var(--offset-small)}._root_1cbhk_1._size-large_1cbhk_66{gap:var(--offset-normal);min-height:var(--control-height-large)}._root_1cbhk_1 ._icon_1cbhk_70{flex-shrink:0;color:var(--border-color)}._root_1cbhk_1 ._content_1cbhk_74{flex-grow:1}._root_1cbhk_1 ._interactiveIcon_1cbhk_22{opacity:0;transform:translate(calc(-1 * var(--quant)))}._root_1cbhk_1 ._interactiveIcon_1cbhk_22{transition:all .25s ease,outline-offset 0s,outline 0s}
|
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._root_w22bc_1{flex-shrink:0;position:relative;display:flex;flex-direction:column;max-width:calc((var(--width) - var(--offset-safezone) * 2) * 1);min-width:calc(var(--quant) * 50);max-height:calc((var(--height) - var(--offset-safezone) * 2) * 1);padding:calc(var(--quant) * 6);background-color:var(--color-modal-background);border-radius:var(--border-radius-small);overflow:hidden;animation-name:_modal-appearance_w22bc_1;animation-duration:.2s}@media (min-width: 768px){._root_w22bc_1{min-width:calc(var(--quant) * 80)}}@media (min-width: 1280px){._root_w22bc_1{min-width:calc(var(--quant) * 100)}}@keyframes _modal-appearance_w22bc_1{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}._root_w22bc_1 ._close_w22bc_36{position:absolute;top:calc(var(--quant) * 2);right:calc(var(--quant) * 2.5);z-index:1}._root_w22bc_1 ._header_w22bc_42{display:flex;flex-direction:column;gap:calc(var(--quant) * 2.5);padding-bottom:calc(var(--quant) * 4)}._root_w22bc_1 ._header_w22bc_42 a{border-bottom:1px solid rgba(var(--color-secondary),1);font-weight:700}._root_w22bc_1 ._footer_w22bc_52{padding-top:calc(var(--quant) * 6)}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import '../../assets/InfoPanel.css';const
|
|
6
|
-
rootUnset:
|
|
7
|
-
root:
|
|
8
|
-
interactive:
|
|
9
|
-
interactiveIcon:
|
|
10
|
-
"type-neutral": "_type-
|
|
11
|
-
"type-error": "_type-
|
|
12
|
-
"type-success": "_type-
|
|
13
|
-
"type-warning": "_type-
|
|
14
|
-
"size-small": "_size-
|
|
15
|
-
"size-large": "_size-
|
|
16
|
-
icon:
|
|
17
|
-
content:
|
|
2
|
+
import b from "react";
|
|
3
|
+
import { Icon as c } from "../Icon/Icon.js";
|
|
4
|
+
import { clsx as h } from "../../utils/clsx.js";
|
|
5
|
+
import '../../assets/InfoPanel.css';const k = "_rootUnset_1cbhk_1", u = "_root_1cbhk_1", v = "_interactive_1cbhk_19", y = "_interactiveIcon_1cbhk_22", f = "_icon_1cbhk_70", x = "_content_1cbhk_74", t = {
|
|
6
|
+
rootUnset: k,
|
|
7
|
+
root: u,
|
|
8
|
+
interactive: v,
|
|
9
|
+
interactiveIcon: y,
|
|
10
|
+
"type-neutral": "_type-neutral_1cbhk_34",
|
|
11
|
+
"type-error": "_type-error_1cbhk_41",
|
|
12
|
+
"type-success": "_type-success_1cbhk_48",
|
|
13
|
+
"type-warning": "_type-warning_1cbhk_55",
|
|
14
|
+
"size-small": "_size-small_1cbhk_62",
|
|
15
|
+
"size-large": "_size-large_1cbhk_66",
|
|
16
|
+
icon: f,
|
|
17
|
+
content: x
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function z(s) {
|
|
20
20
|
const {
|
|
21
21
|
type: r = "neutral",
|
|
22
22
|
size: a = "normal",
|
|
@@ -25,7 +25,7 @@ function d(c) {
|
|
|
25
25
|
ariaLabel: _,
|
|
26
26
|
icon: n,
|
|
27
27
|
children: l
|
|
28
|
-
} =
|
|
28
|
+
} = s, m = h(
|
|
29
29
|
t.rootUnset,
|
|
30
30
|
t.root,
|
|
31
31
|
i,
|
|
@@ -43,14 +43,14 @@ function d(c) {
|
|
|
43
43
|
onClick: e,
|
|
44
44
|
"aria-label": _,
|
|
45
45
|
children: [
|
|
46
|
-
n && /* @__PURE__ */ o(
|
|
46
|
+
n && /* @__PURE__ */ o(c, { size: "xxsmall", name: n, className: t.icon }),
|
|
47
47
|
/* @__PURE__ */ o("div", { className: t.content, children: l }),
|
|
48
|
-
e && /* @__PURE__ */ o(
|
|
48
|
+
e && /* @__PURE__ */ o(c, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
|
-
const U =
|
|
53
|
+
const U = b.memo(z);
|
|
54
54
|
export {
|
|
55
55
|
U as default
|
|
56
56
|
};
|
|
@@ -1,69 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import N from "react";
|
|
3
3
|
import "../Button/Button.js";
|
|
4
|
-
import { ButtonBar as
|
|
4
|
+
import { ButtonBar as k } from "../Button/ButtonBar.js";
|
|
5
5
|
import "../Button/LinkButton.js";
|
|
6
|
-
import
|
|
6
|
+
import y from "../IconButton/IconButton.js";
|
|
7
7
|
import { Overlay as t } 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 w } 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_w22bc_1", v = "_close_w22bc_36", x = "_header_w22bc_42", g = "_footer_w22bc_52", r = {
|
|
14
14
|
root: B,
|
|
15
|
-
"modal-appearance": "_modal-
|
|
16
|
-
close:
|
|
15
|
+
"modal-appearance": "_modal-appearance_w22bc_1",
|
|
16
|
+
close: v,
|
|
17
17
|
header: x,
|
|
18
18
|
footer: g
|
|
19
19
|
};
|
|
20
|
-
function p(
|
|
20
|
+
function p(c) {
|
|
21
21
|
const {
|
|
22
22
|
onClose: o,
|
|
23
|
-
children:
|
|
23
|
+
children: s,
|
|
24
24
|
className: e,
|
|
25
|
+
overlayClassName: b,
|
|
25
26
|
backdropClassName: f,
|
|
26
|
-
contentClassName:
|
|
27
|
-
ariaDescribedby:
|
|
28
|
-
ariaLabelledby:
|
|
29
|
-
disableBackdropClose:
|
|
30
|
-
disableFocusLock:
|
|
31
|
-
} =
|
|
32
|
-
|
|
33
|
-
}, [o,
|
|
34
|
-
return
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
"div",
|
|
27
|
+
contentClassName: _,
|
|
28
|
+
ariaDescribedby: h,
|
|
29
|
+
ariaLabelledby: u,
|
|
30
|
+
disableBackdropClose: n = !1,
|
|
31
|
+
disableFocusLock: C = !1
|
|
32
|
+
} = c, d = N.useCallback(() => {
|
|
33
|
+
n || !o || o();
|
|
34
|
+
}, [o, n]);
|
|
35
|
+
return w(d), /* @__PURE__ */ i(t, { className: l(r.overlay, b), children: [
|
|
36
|
+
/* @__PURE__ */ a(
|
|
37
|
+
t.Backdrop,
|
|
38
38
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"aria-labelledby": b,
|
|
42
|
-
className: m(s.root, e),
|
|
43
|
-
children: [
|
|
44
|
-
!!o && /* @__PURE__ */ r(N, { className: s.close, name: "Close", onClick: o }),
|
|
45
|
-
a
|
|
46
|
-
]
|
|
39
|
+
onClick: d,
|
|
40
|
+
className: l(r.backdrop, f)
|
|
47
41
|
}
|
|
48
|
-
)
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
|
+
t.Content,
|
|
45
|
+
{
|
|
46
|
+
className: _,
|
|
47
|
+
disableFocusLock: C,
|
|
48
|
+
children: /* @__PURE__ */ i(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
role: "dialog",
|
|
52
|
+
"aria-describedby": h,
|
|
53
|
+
"aria-labelledby": u,
|
|
54
|
+
className: l(r.root, e),
|
|
55
|
+
children: [
|
|
56
|
+
!!o && /* @__PURE__ */ a(y, { className: r.close, name: "Close", onClick: o }),
|
|
57
|
+
s
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
)
|
|
49
63
|
] });
|
|
50
64
|
}
|
|
51
65
|
p.Header = function(o) {
|
|
52
66
|
const {
|
|
53
|
-
title:
|
|
67
|
+
title: s,
|
|
54
68
|
description: e
|
|
55
69
|
} = o;
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
70
|
+
return /* @__PURE__ */ i("div", { className: r.header, children: [
|
|
71
|
+
/* @__PURE__ */ a(
|
|
72
|
+
m,
|
|
59
73
|
{
|
|
60
74
|
weight: "bold",
|
|
61
75
|
size: "large",
|
|
62
|
-
children:
|
|
76
|
+
children: s
|
|
63
77
|
}
|
|
64
78
|
),
|
|
65
|
-
e && /* @__PURE__ */
|
|
66
|
-
|
|
79
|
+
e && /* @__PURE__ */ a(
|
|
80
|
+
m,
|
|
67
81
|
{
|
|
68
82
|
size: "small",
|
|
69
83
|
color: "secondary",
|
|
@@ -74,10 +88,10 @@ p.Header = function(o) {
|
|
|
74
88
|
};
|
|
75
89
|
p.Footer = function(o) {
|
|
76
90
|
const {
|
|
77
|
-
className:
|
|
91
|
+
className: s,
|
|
78
92
|
...e
|
|
79
93
|
} = o;
|
|
80
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ a(k, { ...e, className: l(r.footer, s) });
|
|
81
95
|
};
|
|
82
96
|
export {
|
|
83
97
|
p as Modal
|