@cfx-dev/ui-components 0.0.19 → 0.0.21
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/Combination-Dp_plIQU.js +793 -0
- package/dist/{Icons-B26SczGZ.js → Icons-BlBKvJD8.js} +40 -98
- package/dist/{Rail-BCY3h7eP.js → Rail-CCuyJpf6.js} +11 -11
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/assets/InputDropzone.css +1 -0
- package/dist/assets/ItemPreview.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.d.ts +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.js +9 -7
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.js +27 -25
- package/dist/components/Button/ButtonBar.d.ts +0 -1
- package/dist/components/Button/LinkButton.js +13 -13
- package/dist/components/Flyout/Flyout.d.ts +1 -0
- package/dist/components/Flyout/Flyout.js +28 -27
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/RichInput.js +2 -2
- package/dist/components/InputDropzone/InputDropzone.d.ts +14 -0
- package/dist/components/InputDropzone/InputDropzone.js +1103 -0
- package/dist/components/InputDropzone/ItemPreview.d.ts +8 -0
- package/dist/components/InputDropzone/ItemPreview.js +24 -0
- package/dist/components/Layout/Scrollable/Rail.js +3 -3
- package/dist/components/Layout/Scrollable/Scrollable.js +2 -2
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +3 -4
- package/dist/components/Modal/Modal.d.ts +0 -2
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/NavList/NavList.js +5 -5
- package/dist/components/OnScreenSensor.js +6 -6
- package/dist/components/Overlay/Overlay.d.ts +1 -0
- package/dist/components/Overlay/Overlay.js +16 -15
- package/dist/components/Select/Select.js +652 -663
- package/dist/components/Shroud/Shroud.js +20 -19
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.d.ts +17 -0
- package/dist/components/Table/Table.js +61 -0
- package/dist/components/Tabular/Tabular.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +1 -0
- package/dist/components/Title/Title.js +26 -25
- package/dist/{extends-Dk_bSU3E.js → extends-hS2Bh-Yp.js} +1 -2
- package/dist/{index-C75OpfGQ.js → index-2hJuj4UN.js} +2018 -2526
- package/dist/index-DQMInta3.js +663 -0
- package/dist/index.esm-BkynlSN6.js +72 -0
- package/dist/main.d.ts +17 -26
- package/dist/main.js +145 -122
- package/dist/{medium-Dc7QRuE0.js → medium-JVtzoF2c.js} +3 -3
- package/dist/style-guide/Colours/DarkThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/DarkThemeSwatches.js +110 -0
- package/dist/style-guide/Colours/LightThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/LightThemeSwatches.js +105 -0
- package/dist/style-guide/Colours/Swatches.d.ts +6 -0
- package/dist/style-guide/Colours/Swatches.js +48 -0
- package/dist/style-guide/Icons/IconDisplayGrid.d.ts +2 -0
- package/dist/style-guide/Icons/IconDisplayGrid.js +42 -0
- package/dist/style-guide/Icons/Icons.js +7 -0
- package/dist/tslib.es6-CBKHJX9H.js +151 -0
- package/dist/utils/functional.js +19 -6
- package/dist/utils/hooks.d.ts +2 -1
- package/dist/utils/hooks.js +77 -10
- package/dist/utils/links.js +1128 -12
- package/dist/utils/math.js +8 -3
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +2 -2
- package/dist/utils/outlet.js +19 -4
- package/dist/utils/string.js +42 -7
- package/package.json +7 -13
- package/dist/Combination-Dj-a6dCZ.js +0 -1462
- package/dist/components/Icons.js +0 -6
- package/dist/functional-C0pE183N.js +0 -30
- package/dist/hooks-GAujvL7d.js +0 -86
- package/dist/links-CgOD-Vfj.js +0 -1142
- package/dist/math-i2ceybzU.js +0 -16
- package/dist/outlet-B11a3Kgw.js +0 -27
- package/dist/string-NVxCUbqk.js +0 -54
- package/dist/tslib.es6-Dd_EkEfR.js +0 -48
- /package/dist/{components → style-guide/Icons}/Icons.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FileWithPath } from 'react-dropzone';
|
|
2
|
+
|
|
3
|
+
export interface ItemPreviewProps {
|
|
4
|
+
file: FileWithPath;
|
|
5
|
+
onRemoveFile: (file: FileWithPath) => void;
|
|
6
|
+
removeAriaLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ItemPreview({ file, onRemoveFile, removeAriaLabel, }: ItemPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { Button as i } from "../Button/Button.js";
|
|
4
|
+
import { I as m } from "../../Icons-BlBKvJD8.js";
|
|
5
|
+
import '../../assets/ItemPreview.css';const h = "_root_15ual_1", p = "_filePath_15ual_13", n = {
|
|
6
|
+
root: h,
|
|
7
|
+
filePath: p
|
|
8
|
+
};
|
|
9
|
+
function P({
|
|
10
|
+
file: t,
|
|
11
|
+
onRemoveFile: a,
|
|
12
|
+
removeAriaLabel: o = ""
|
|
13
|
+
}) {
|
|
14
|
+
const r = c.useCallback(() => {
|
|
15
|
+
a(t);
|
|
16
|
+
}, [t, a]), e = c.useMemo(() => `${o}${o ? ", " : ""}${t.path}`, [o, t.path]);
|
|
17
|
+
return /* @__PURE__ */ l("div", { className: n.root, children: [
|
|
18
|
+
/* @__PURE__ */ s("span", { className: n.filePath, children: t.path }),
|
|
19
|
+
/* @__PURE__ */ s(i, { ariaLabel: e, size: "small", icon: m.exit, onClick: r })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
P as ItemPreview
|
|
24
|
+
};
|
|
@@ -2,9 +2,9 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../Interactive/Interactive.js";
|
|
4
4
|
import "../../../utils/clsx.js";
|
|
5
|
-
import "../../../hooks
|
|
6
|
-
import "../../../math
|
|
7
|
-
import { R as e } from "../../../Rail-
|
|
5
|
+
import "../../../utils/hooks.js";
|
|
6
|
+
import "../../../utils/math.js";
|
|
7
|
+
import { R as e } from "../../../Rail-CCuyJpf6.js";
|
|
8
8
|
export {
|
|
9
9
|
e as Rail
|
|
10
10
|
};
|
|
@@ -2,8 +2,8 @@ import { jsxs as j, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import r from "react";
|
|
3
3
|
import { useContextualStyle as W } from "../../Style/Style.js";
|
|
4
4
|
import { clsx as b } from "../../../utils/clsx.js";
|
|
5
|
-
import k from "../../../utils/mergeRefs.js";
|
|
6
|
-
import { s as o, R as w } from "../../../Rail-
|
|
5
|
+
import { mergeRefs as k } from "../../../utils/mergeRefs.js";
|
|
6
|
+
import { s as o, R as w } from "../../../Rail-CCuyJpf6.js";
|
|
7
7
|
const N = {
|
|
8
8
|
size: 0,
|
|
9
9
|
scrollPos: 0,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as R } from "react/jsx-runtime";
|
|
2
2
|
import N, { createElement as k, PureComponent as re } from "react";
|
|
3
|
-
import { _ as ie } from "../../../extends-
|
|
3
|
+
import { _ as ie } from "../../../extends-hS2Bh-Yp.js";
|
|
4
4
|
import { _ as ne } from "../../../inheritsLoose-A8WKSWDx.js";
|
|
5
5
|
import { clsx as oe } from "../../../utils/clsx.js";
|
|
6
6
|
import { Scrollable as le } from "./Scrollable.js";
|
|
7
|
-
import { s as se } from "../../../Rail-
|
|
7
|
+
import { s as se } from "../../../Rail-CCuyJpf6.js";
|
|
8
8
|
function $(r) {
|
|
9
|
-
if (r === void 0)
|
|
10
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
9
|
+
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
11
10
|
return r;
|
|
12
11
|
}
|
|
13
12
|
var q = Number.isNaN || function(t) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Button as _ } from "../Button/Button.js";
|
|
3
|
-
import { I as f } from "../../Icons-B26SczGZ.js";
|
|
4
3
|
import { Overlay as s } from "../Overlay/Overlay.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { I as f } from "../../Icons-BlBKvJD8.js";
|
|
5
|
+
import { noop as n } from "../../utils/functional.js";
|
|
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,
|
|
9
9
|
"modal-appearance": "_modal-appearance_1v8ee_1",
|
|
@@ -2,19 +2,19 @@ import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { Interactive as _ } from "../Interactive/Interactive.js";
|
|
4
4
|
import { clsx as v } from "../../utils/clsx.js";
|
|
5
|
-
import {
|
|
5
|
+
import { noop as f } from "../../utils/functional.js";
|
|
6
6
|
import { getValue as c } from "../../utils/getValue.js";
|
|
7
7
|
import '../../assets/NavList.css';const p = "_root_2ug76_1", u = "_item_2ug76_5", N = "_active_2ug76_23", g = "_icon_2ug76_33", t = {
|
|
8
8
|
root: p,
|
|
9
9
|
item: u,
|
|
10
10
|
active: N,
|
|
11
11
|
icon: g
|
|
12
|
-
}, k = d.forwardRef(function(e,
|
|
12
|
+
}, k = d.forwardRef(function(e, r) {
|
|
13
13
|
const {
|
|
14
|
-
items:
|
|
14
|
+
items: n,
|
|
15
15
|
activeItemId: s,
|
|
16
16
|
onActivate: a = f
|
|
17
|
-
} = e, m =
|
|
17
|
+
} = e, m = n.map((o) => /* @__PURE__ */ l(
|
|
18
18
|
_,
|
|
19
19
|
{
|
|
20
20
|
className: v(t.item, { [t.active]: o.id === s }),
|
|
@@ -26,7 +26,7 @@ import '../../assets/NavList.css';const p = "_root_2ug76_1", u = "_item_2ug76_5"
|
|
|
26
26
|
},
|
|
27
27
|
o.id
|
|
28
28
|
));
|
|
29
|
-
return /* @__PURE__ */ i("div", { ref:
|
|
29
|
+
return /* @__PURE__ */ i("div", { ref: r, className: t.root, children: m });
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
32
|
k as NavList
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import t from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { noop as o } from "../utils/functional.js";
|
|
4
|
+
import { useDynamicRef as s } from "../utils/hooks.js";
|
|
5
5
|
const l = {
|
|
6
6
|
width: "0",
|
|
7
7
|
height: "0"
|
|
@@ -14,12 +14,12 @@ function h(c) {
|
|
|
14
14
|
return t.useEffect(() => {
|
|
15
15
|
if (!e.current)
|
|
16
16
|
return;
|
|
17
|
-
const n = new IntersectionObserver((
|
|
18
|
-
const [r] =
|
|
17
|
+
const n = new IntersectionObserver((p) => {
|
|
18
|
+
const [r] = p;
|
|
19
19
|
r && (r.isIntersecting ? u.current() : m.current());
|
|
20
20
|
});
|
|
21
21
|
return n.observe(e.current), () => n.disconnect();
|
|
22
|
-
}, []), /* @__PURE__ */
|
|
22
|
+
}, []), /* @__PURE__ */ a("span", { ref: e, style: l });
|
|
23
23
|
}
|
|
24
24
|
export {
|
|
25
25
|
h as OnScreenSensor
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { F as i } from "../../Combination-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { F as i } from "../../Combination-Dp_plIQU.js";
|
|
4
4
|
import { Interactive as m } from "../Interactive/Interactive.js";
|
|
5
5
|
import { clsx as e } from "../../utils/clsx.js";
|
|
6
|
-
import {
|
|
7
|
-
import '../../assets/Overlay.css';const
|
|
8
|
-
root:
|
|
9
|
-
backdrop:
|
|
6
|
+
import { useOutlet as u } from "../../utils/hooks.js";
|
|
7
|
+
import '../../assets/Overlay.css';const _ = "_root_15udb_1", f = "_backdrop_15udb_9", p = "_content_15udb_27", n = {
|
|
8
|
+
root: _,
|
|
9
|
+
backdrop: f,
|
|
10
10
|
"backdrop-appearance": "_backdrop-appearance_15udb_1",
|
|
11
11
|
content: p
|
|
12
|
-
};
|
|
12
|
+
}, b = "overlay-outlet";
|
|
13
13
|
function l(c) {
|
|
14
14
|
const {
|
|
15
15
|
className: o,
|
|
16
|
-
children:
|
|
17
|
-
} = c, s = e(
|
|
18
|
-
return /* @__PURE__ */
|
|
16
|
+
children: t
|
|
17
|
+
} = c, s = e(n.root, o), d = u(b);
|
|
18
|
+
return /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("div", { className: s, children: t }) });
|
|
19
19
|
}
|
|
20
|
-
l.Backdrop =
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
l.Backdrop = a.forwardRef(function(o, t) {
|
|
21
|
+
return /* @__PURE__ */ r(m, { ref: t, onClick: o.onClick, className: e(n.backdrop, o.className), children: o.children });
|
|
22
22
|
});
|
|
23
|
-
l.Content =
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
l.Content = a.forwardRef(function(o, t) {
|
|
24
|
+
return /* @__PURE__ */ r("div", { ref: t, className: e(n.content, o.className), children: /* @__PURE__ */ r(i, { children: o.children }) });
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
+
b as OVERLAY_OUTLET_ID,
|
|
27
28
|
l as Overlay
|
|
28
29
|
};
|