@cfx-dev/ui-components 1.0.1 → 1.1.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/README.md +38 -38
- package/dist/Button.module-Cv-7p0xt.js +16 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/Flyout.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Island.css +1 -1
- package/dist/assets/Pad.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RichInput.css +1 -1
- package/dist/assets/Spacer.css +1 -1
- package/dist/assets/Textarea.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/ButtonBar.js +1 -1
- package/dist/components/Flyout/Flyout.js +39 -39
- package/dist/components/Input/Input.d.ts +0 -1
- package/dist/components/Input/Input.js +58 -61
- package/dist/components/Input/RichInput.js +27 -27
- package/dist/components/InputDropzone/InputDropzone.js +122 -119
- package/dist/components/InputDropzone/ItemPreview.js +1 -1
- package/dist/components/Island/Island.js +23 -23
- package/dist/components/Layout/Flex/Flex.d.ts +1 -1
- package/dist/components/Layout/Flex/Flex.js +44 -43
- package/dist/components/Layout/Pad/Pad.d.ts +1 -1
- package/dist/components/Layout/Pad/Pad.js +30 -29
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Modal/Modal.js +25 -23
- package/dist/components/Overlay/Overlay.js +13 -13
- package/dist/components/Popover/Popover.js +18 -18
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +239 -229
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Spacer/Spacer.js +13 -12
- package/dist/components/Table/Table.js +41 -35
- package/dist/components/Text/Text.types.d.ts +1 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -1
- package/dist/components/Textarea/Textarea.js +37 -40
- package/dist/iconBase-Bipuk9tK.js +112 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +112 -113
- package/dist/style-guide/Icons/IconDisplayGrid.js +3 -3
- package/dist/style-guide/Icons/Icons.d.ts +14 -13
- package/dist/style-guide/Icons/Icons.js +36 -7
- package/dist/style-guide/Icons/NewIcons/UpArrow.d.ts +5 -0
- package/dist/style-guide/Icons/NewIcons/UpArrow.js +27 -0
- package/dist/styles-scss/_ui.scss +167 -195
- package/dist/styles-scss/assets/images/checkered_dark.svg +7 -7
- package/dist/styles-scss/assets/images/checkered_light.svg +7 -7
- package/dist/styles-scss/global.scss +73 -75
- package/dist/styles-scss/theme_dark.scss +24 -24
- package/dist/styles-scss/theme_light.scss +54 -54
- package/dist/styles-scss/themes.scss +2 -2
- package/dist/styles-scss/tokens.scss +272 -274
- package/dist/utils/string.d.ts +16 -1
- package/dist/utils/string.js +46 -39
- package/package.json +71 -72
- package/dist/Button.module-Z6njvP9Z.js +0 -17
- package/dist/Icons-CIXYyG0c.js +0 -106
- package/dist/index.esm-BkynlSN6.js +0 -72
|
@@ -12,7 +12,7 @@ export interface FlexProps {
|
|
|
12
12
|
spaceBetween?: boolean;
|
|
13
13
|
alignToEnd?: boolean;
|
|
14
14
|
alignToEndAxis?: boolean;
|
|
15
|
-
gap?: 'none' | 'thin' | 'small' | 'normal' | 'large' | 'xlarge';
|
|
15
|
+
gap?: 'none' | 'thin' | 'small' | 'normal' | 'medium' | 'large' | 'xlarge';
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { clsx as
|
|
2
|
+
import b from "react";
|
|
3
|
+
import { clsx as v } from "../../../utils/clsx.js";
|
|
4
4
|
import { FlexRestricter as R } from "./FlexRestricter.js";
|
|
5
|
-
import '../../../assets/Flex.css';const F = "
|
|
5
|
+
import '../../../assets/Flex.css';const F = "_root_pd612_1", z = "_centered_pd612_11", C = "_vertical_pd612_30", N = "_repell_pd612_36", E = "_wrap_pd612_39", T = "_stretch_pd612_51", j = "_horizontal_pd612_57", e = {
|
|
6
6
|
root: F,
|
|
7
|
-
"full-width": "_full-
|
|
8
|
-
"full-height": "_full-
|
|
7
|
+
"full-width": "_full-width_pd612_5",
|
|
8
|
+
"full-height": "_full-height_pd612_8",
|
|
9
9
|
centered: z,
|
|
10
|
-
"centered-axis": "_centered-
|
|
11
|
-
"centered-cross-axis": "_centered-cross-
|
|
12
|
-
"baseline-axis": "_baseline-
|
|
13
|
-
"baseline-cross-axis": "_baseline-cross-
|
|
14
|
-
"reverse-order": "_reverse-
|
|
10
|
+
"centered-axis": "_centered-axis_pd612_15",
|
|
11
|
+
"centered-cross-axis": "_centered-cross-axis_pd612_18",
|
|
12
|
+
"baseline-axis": "_baseline-axis_pd612_21",
|
|
13
|
+
"baseline-cross-axis": "_baseline-cross-axis_pd612_24",
|
|
14
|
+
"reverse-order": "_reverse-order_pd612_27",
|
|
15
15
|
vertical: C,
|
|
16
16
|
repell: N,
|
|
17
17
|
wrap: E,
|
|
18
|
-
"align-to-end": "_align-to-
|
|
19
|
-
"align-to-end-axis": "_align-to-end-
|
|
20
|
-
"space-between": "_space-
|
|
18
|
+
"align-to-end": "_align-to-end_pd612_42",
|
|
19
|
+
"align-to-end-axis": "_align-to-end-axis_pd612_45",
|
|
20
|
+
"space-between": "_space-between_pd612_48",
|
|
21
21
|
stretch: T,
|
|
22
22
|
horizontal: j,
|
|
23
|
-
"gap-none": "_gap-
|
|
24
|
-
"gap-thin": "_gap-
|
|
25
|
-
"gap-xsmall": "_gap-
|
|
26
|
-
"gap-small": "_gap-
|
|
27
|
-
"gap-normal": "_gap-
|
|
28
|
-
"gap-
|
|
29
|
-
"gap-
|
|
23
|
+
"gap-none": "_gap-none_pd612_63",
|
|
24
|
+
"gap-thin": "_gap-thin_pd612_66",
|
|
25
|
+
"gap-xsmall": "_gap-xsmall_pd612_69",
|
|
26
|
+
"gap-small": "_gap-small_pd612_72",
|
|
27
|
+
"gap-normal": "_gap-normal_pd612_75",
|
|
28
|
+
"gap-medium": "_gap-medium_pd612_78",
|
|
29
|
+
"gap-large": "_gap-large_pd612_81",
|
|
30
|
+
"gap-xlarge": "_gap-xlarge_pd612_84"
|
|
30
31
|
};
|
|
31
32
|
function A(l, s) {
|
|
32
33
|
const {
|
|
33
|
-
fullWidth:
|
|
34
|
+
fullWidth: n = !1,
|
|
34
35
|
fullHeight: o = !1,
|
|
35
36
|
vertical: t = !1,
|
|
36
37
|
centered: a = !1,
|
|
37
38
|
repell: i = !1,
|
|
38
|
-
stretch:
|
|
39
|
-
wrap:
|
|
40
|
-
alignToEnd:
|
|
41
|
-
alignToEndAxis:
|
|
42
|
-
spaceBetween:
|
|
43
|
-
reverseOrder:
|
|
44
|
-
gap:
|
|
45
|
-
children:
|
|
46
|
-
className:
|
|
47
|
-
} = l,
|
|
48
|
-
[e["full-width"]]:
|
|
39
|
+
stretch: p = !1,
|
|
40
|
+
wrap: d = !1,
|
|
41
|
+
alignToEnd: c = !1,
|
|
42
|
+
alignToEndAxis: g = !1,
|
|
43
|
+
spaceBetween: x = !1,
|
|
44
|
+
reverseOrder: f = !1,
|
|
45
|
+
gap: h = "normal",
|
|
46
|
+
children: m,
|
|
47
|
+
className: u
|
|
48
|
+
} = l, w = v(e.root, u, e[`gap-${h}`], {
|
|
49
|
+
[e["full-width"]]: n,
|
|
49
50
|
[e["full-height"]]: o,
|
|
50
51
|
[e.centered]: a === !0,
|
|
51
52
|
[e["centered-axis"]]: a === "axis",
|
|
@@ -55,21 +56,21 @@ function A(l, s) {
|
|
|
55
56
|
[e.vertical]: t,
|
|
56
57
|
[e.horizontal]: !t,
|
|
57
58
|
[e.repell]: i,
|
|
58
|
-
[e.stretch]:
|
|
59
|
-
[e.wrap]:
|
|
60
|
-
[e["align-to-end"]]:
|
|
61
|
-
[e["align-to-end-axis"]]:
|
|
62
|
-
[e["space-between"]]:
|
|
63
|
-
[e["reverse-order"]]:
|
|
59
|
+
[e.stretch]: p,
|
|
60
|
+
[e.wrap]: d,
|
|
61
|
+
[e["align-to-end"]]: c,
|
|
62
|
+
[e["align-to-end-axis"]]: g,
|
|
63
|
+
[e["space-between"]]: x,
|
|
64
|
+
[e["reverse-order"]]: f
|
|
64
65
|
});
|
|
65
|
-
return /* @__PURE__ */ r("div", { ref: s, className:
|
|
66
|
+
return /* @__PURE__ */ r("div", { ref: s, className: w, children: m });
|
|
66
67
|
}
|
|
67
|
-
const B =
|
|
68
|
-
|
|
68
|
+
const B = b.forwardRef(A), _ = B;
|
|
69
|
+
_.Restricted = function({
|
|
69
70
|
children: s
|
|
70
71
|
}) {
|
|
71
|
-
return /* @__PURE__ */ r(
|
|
72
|
+
return /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(R, { children: s }) });
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
_ as Flex
|
|
75
76
|
};
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import '../../../assets/Pad.css';const
|
|
4
|
-
root:
|
|
5
|
-
"offset-none": "_offset-
|
|
6
|
-
"offset-thin": "_offset-
|
|
7
|
-
"offset-xsmall": "_offset-
|
|
8
|
-
"offset-small": "_offset-
|
|
9
|
-
"offset-normal": "_offset-
|
|
10
|
-
"offset-
|
|
11
|
-
"offset-
|
|
12
|
-
"
|
|
13
|
-
"only-
|
|
14
|
-
"only-
|
|
15
|
-
"only-
|
|
2
|
+
import { clsx as y } from "../../../utils/clsx.js";
|
|
3
|
+
import '../../../assets/Pad.css';const c = "_root_1lf8m_1", o = {
|
|
4
|
+
root: c,
|
|
5
|
+
"offset-none": "_offset-none_1lf8m_1",
|
|
6
|
+
"offset-thin": "_offset-thin_1lf8m_4",
|
|
7
|
+
"offset-xsmall": "_offset-xsmall_1lf8m_7",
|
|
8
|
+
"offset-small": "_offset-small_1lf8m_10",
|
|
9
|
+
"offset-normal": "_offset-normal_1lf8m_13",
|
|
10
|
+
"offset-medium": "_offset-medium_1lf8m_16",
|
|
11
|
+
"offset-large": "_offset-large_1lf8m_19",
|
|
12
|
+
"offset-xlarge": "_offset-xlarge_1lf8m_22",
|
|
13
|
+
"only-top": "_only-top_1lf8m_25",
|
|
14
|
+
"only-left": "_only-left_1lf8m_28",
|
|
15
|
+
"only-right": "_only-right_1lf8m_31",
|
|
16
|
+
"only-bottom": "_only-bottom_1lf8m_34"
|
|
16
17
|
};
|
|
17
|
-
function
|
|
18
|
+
function p(_) {
|
|
18
19
|
const {
|
|
19
|
-
top:
|
|
20
|
-
left:
|
|
21
|
-
right:
|
|
22
|
-
bottom:
|
|
23
|
-
size:
|
|
24
|
-
children:
|
|
25
|
-
className:
|
|
26
|
-
} = _,
|
|
27
|
-
[o["only-top"]]:
|
|
28
|
-
[o["only-left"]]:
|
|
29
|
-
[o["only-right"]]:
|
|
30
|
-
[o["only-bottom"]]:
|
|
20
|
+
top: l = !1,
|
|
21
|
+
left: t = !1,
|
|
22
|
+
right: e = !1,
|
|
23
|
+
bottom: s = !1,
|
|
24
|
+
size: m = "normal",
|
|
25
|
+
children: n,
|
|
26
|
+
className: r
|
|
27
|
+
} = _, f = !(l || t || e || s), a = y(o.root, r, o[`offset-${m}`], {
|
|
28
|
+
[o["only-top"]]: f || l,
|
|
29
|
+
[o["only-left"]]: f || t,
|
|
30
|
+
[o["only-right"]]: f || e,
|
|
31
|
+
[o["only-bottom"]]: f || s
|
|
31
32
|
});
|
|
32
|
-
return /* @__PURE__ */ i("div", { className:
|
|
33
|
+
return /* @__PURE__ */ i("div", { className: a, children: n });
|
|
33
34
|
}
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
p as Pad
|
|
36
37
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Button as p } from "../Button/Button.js";
|
|
3
3
|
import { Overlay as s } from "../Overlay/Overlay.js";
|
|
4
|
-
import {
|
|
5
|
-
import { noop as
|
|
4
|
+
import { Icons as _ } from "../../style-guide/Icons/Icons.js";
|
|
5
|
+
import { noop as f } from "../../utils/functional.js";
|
|
6
6
|
import { useKeyboardClose as h } from "../../utils/hooks.js";
|
|
7
7
|
import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27", u = "_header_1v8ee_37", N = "_footer_1v8ee_47", r = {
|
|
8
8
|
root: v,
|
|
@@ -11,32 +11,34 @@ import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27"
|
|
|
11
11
|
header: u,
|
|
12
12
|
footer: N
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function c(a) {
|
|
15
15
|
const {
|
|
16
|
-
onClose:
|
|
17
|
-
children:
|
|
18
|
-
backdropClassName:
|
|
19
|
-
contentClassName:
|
|
20
|
-
disableBackdropClose:
|
|
21
|
-
} = a
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
onClose: o,
|
|
17
|
+
children: n,
|
|
18
|
+
backdropClassName: l,
|
|
19
|
+
contentClassName: d,
|
|
20
|
+
disableBackdropClose: i = !1
|
|
21
|
+
} = a;
|
|
22
|
+
h(o || f);
|
|
23
|
+
const m = i ? void 0 : o;
|
|
24
|
+
return /* @__PURE__ */ t(s, { children: [
|
|
25
|
+
/* @__PURE__ */ e(s.Backdrop, { onClick: m, className: l }),
|
|
26
|
+
/* @__PURE__ */ e(s.Content, { className: d, children: /* @__PURE__ */ t("div", { className: r.root, children: [
|
|
27
|
+
!!o && /* @__PURE__ */ e("div", { className: r.close, children: /* @__PURE__ */ e(p, { size: "large", theme: "transparent", icon: _.exit, onClick: o }) }),
|
|
28
|
+
n
|
|
27
29
|
] }) })
|
|
28
30
|
] });
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
children:
|
|
32
|
+
c.Header = function({
|
|
33
|
+
children: o
|
|
32
34
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ e("div", { className: r.header, children: o });
|
|
34
36
|
};
|
|
35
|
-
|
|
36
|
-
children:
|
|
37
|
+
c.Footer = function({
|
|
38
|
+
children: o
|
|
37
39
|
}) {
|
|
38
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ e("div", { className: r.footer, children: o });
|
|
39
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
c as Modal
|
|
42
44
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
|
-
import { F as
|
|
3
|
+
import { F as s } from "../../Combination-Dp_plIQU.js";
|
|
4
4
|
import { Interactive as m } from "../Interactive/Interactive.js";
|
|
5
|
-
import { clsx as
|
|
5
|
+
import { clsx as r } from "../../utils/clsx.js";
|
|
6
6
|
import { useOutlet as u } from "../../utils/hooks.js";
|
|
7
|
-
import '../../assets/Overlay.css';const _ = "_root_15udb_1", f = "_backdrop_15udb_9",
|
|
7
|
+
import '../../assets/Overlay.css';const _ = "_root_15udb_1", f = "_backdrop_15udb_9", k = "_content_15udb_27", e = {
|
|
8
8
|
root: _,
|
|
9
9
|
backdrop: f,
|
|
10
10
|
"backdrop-appearance": "_backdrop-appearance_15udb_1",
|
|
11
|
-
content:
|
|
11
|
+
content: k
|
|
12
12
|
}, b = "overlay-outlet";
|
|
13
|
-
function l(
|
|
13
|
+
function l(n) {
|
|
14
14
|
const {
|
|
15
15
|
className: o,
|
|
16
|
-
children:
|
|
17
|
-
} =
|
|
18
|
-
return /* @__PURE__ */
|
|
16
|
+
children: c
|
|
17
|
+
} = n, d = r(e.root, o), i = u(b);
|
|
18
|
+
return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t("div", { className: d, children: c }) });
|
|
19
19
|
}
|
|
20
|
-
l.Backdrop = a.forwardRef(function(o,
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
l.Backdrop = a.forwardRef(function(o, c) {
|
|
21
|
+
return o.onClick ? /* @__PURE__ */ t(m, { ref: c, onClick: o.onClick, className: r(e.backdrop, o.className), children: o.children }) : /* @__PURE__ */ t("div", { ref: c, className: r(e.backdrop, o.className), children: o.children });
|
|
22
22
|
});
|
|
23
|
-
l.Content = a.forwardRef(function(o,
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
l.Content = a.forwardRef(function(o, c) {
|
|
24
|
+
return /* @__PURE__ */ t("div", { ref: c, className: r(e.content, o.className), children: /* @__PURE__ */ t(s, { children: o.children }) });
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
27
|
b as OVERLAY_OUTLET_ID,
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Interactive as
|
|
1
|
+
import { jsxs as l, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import j from "react";
|
|
3
|
+
import { Interactive as d } from "../Interactive/Interactive.js";
|
|
4
4
|
import { clsx as t } from "../../utils/clsx.js";
|
|
5
|
-
import '../../assets/Popover.css';const
|
|
6
|
-
root:
|
|
7
|
-
active:
|
|
8
|
-
popover:
|
|
9
|
-
appearance:
|
|
10
|
-
"pos-top-right": "_pos-top-
|
|
11
|
-
}, R =
|
|
5
|
+
import '../../assets/Popover.css';const u = "_root_1vjg7_1", h = "_active_1vjg7_4", x = "_popover_1vjg7_4", N = "_appearance_1vjg7_1", o = {
|
|
6
|
+
root: u,
|
|
7
|
+
active: h,
|
|
8
|
+
popover: x,
|
|
9
|
+
appearance: N,
|
|
10
|
+
"pos-top-right": "_pos-top-right_1vjg7_30"
|
|
11
|
+
}, R = j.forwardRef(function(r, s) {
|
|
12
12
|
const {
|
|
13
13
|
at: c,
|
|
14
14
|
popover: p,
|
|
15
15
|
children: a,
|
|
16
16
|
active: n = !1,
|
|
17
|
-
onMouseEnter:
|
|
18
|
-
onMouseLeave:
|
|
17
|
+
onMouseEnter: v,
|
|
18
|
+
onMouseLeave: i,
|
|
19
19
|
onMouseDown: _
|
|
20
20
|
} = r, e = n, m = t(o.root, {
|
|
21
21
|
[o.active]: e
|
|
22
|
-
}),
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
22
|
+
}), f = t(o.popover, o[`pos-${c}`]);
|
|
23
|
+
return /* @__PURE__ */ l(
|
|
24
|
+
d,
|
|
25
25
|
{
|
|
26
26
|
ref: s,
|
|
27
27
|
className: m,
|
|
28
|
-
onMouseEnter:
|
|
29
|
-
onMouseLeave:
|
|
28
|
+
onMouseEnter: v,
|
|
29
|
+
onMouseLeave: i,
|
|
30
30
|
onMouseDown: _,
|
|
31
31
|
children: [
|
|
32
32
|
a(e),
|
|
33
|
-
e && /* @__PURE__ */
|
|
33
|
+
e && /* @__PURE__ */ g("div", { className: f, children: p })
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
);
|
|
@@ -12,5 +12,5 @@ export interface SelectProps<T = string> {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
size?: 'normal' | 'small';
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
15
|
+
export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare const Select2: <T extends string | number>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|