@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.
Files changed (77) hide show
  1. package/dist/Combination-Dp_plIQU.js +793 -0
  2. package/dist/{Icons-B26SczGZ.js → Icons-BlBKvJD8.js} +40 -98
  3. package/dist/{Rail-BCY3h7eP.js → Rail-CCuyJpf6.js} +11 -11
  4. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  5. package/dist/assets/InputDropzone.css +1 -0
  6. package/dist/assets/ItemPreview.css +1 -0
  7. package/dist/assets/Table.css +1 -0
  8. package/dist/components/BackdropPortal/BackdropPortal.d.ts +1 -0
  9. package/dist/components/BackdropPortal/BackdropPortal.js +9 -7
  10. package/dist/components/Badge/Badge.d.ts +2 -2
  11. package/dist/components/Button/Button.d.ts +2 -1
  12. package/dist/components/Button/Button.js +27 -25
  13. package/dist/components/Button/ButtonBar.d.ts +0 -1
  14. package/dist/components/Button/LinkButton.js +13 -13
  15. package/dist/components/Flyout/Flyout.d.ts +1 -0
  16. package/dist/components/Flyout/Flyout.js +28 -27
  17. package/dist/components/Input/Input.js +1 -1
  18. package/dist/components/Input/RichInput.js +2 -2
  19. package/dist/components/InputDropzone/InputDropzone.d.ts +14 -0
  20. package/dist/components/InputDropzone/InputDropzone.js +1103 -0
  21. package/dist/components/InputDropzone/ItemPreview.d.ts +8 -0
  22. package/dist/components/InputDropzone/ItemPreview.js +24 -0
  23. package/dist/components/Layout/Scrollable/Rail.js +3 -3
  24. package/dist/components/Layout/Scrollable/Scrollable.js +2 -2
  25. package/dist/components/Layout/Scrollable/VirtualScrollable.js +3 -4
  26. package/dist/components/Modal/Modal.d.ts +0 -2
  27. package/dist/components/Modal/Modal.js +3 -3
  28. package/dist/components/NavList/NavList.js +5 -5
  29. package/dist/components/OnScreenSensor.js +6 -6
  30. package/dist/components/Overlay/Overlay.d.ts +1 -0
  31. package/dist/components/Overlay/Overlay.js +16 -15
  32. package/dist/components/Select/Select.js +652 -663
  33. package/dist/components/Shroud/Shroud.js +20 -19
  34. package/dist/components/Switch/Switch.js +1 -1
  35. package/dist/components/Table/Table.d.ts +17 -0
  36. package/dist/components/Table/Table.js +61 -0
  37. package/dist/components/Tabular/Tabular.d.ts +1 -1
  38. package/dist/components/Text/Text.types.d.ts +0 -1
  39. package/dist/components/Title/Title.d.ts +1 -0
  40. package/dist/components/Title/Title.js +26 -25
  41. package/dist/{extends-Dk_bSU3E.js → extends-hS2Bh-Yp.js} +1 -2
  42. package/dist/{index-C75OpfGQ.js → index-2hJuj4UN.js} +2018 -2526
  43. package/dist/index-DQMInta3.js +663 -0
  44. package/dist/index.esm-BkynlSN6.js +72 -0
  45. package/dist/main.d.ts +17 -26
  46. package/dist/main.js +145 -122
  47. package/dist/{medium-Dc7QRuE0.js → medium-JVtzoF2c.js} +3 -3
  48. package/dist/style-guide/Colours/DarkThemeSwatches.d.ts +2 -0
  49. package/dist/style-guide/Colours/DarkThemeSwatches.js +110 -0
  50. package/dist/style-guide/Colours/LightThemeSwatches.d.ts +2 -0
  51. package/dist/style-guide/Colours/LightThemeSwatches.js +105 -0
  52. package/dist/style-guide/Colours/Swatches.d.ts +6 -0
  53. package/dist/style-guide/Colours/Swatches.js +48 -0
  54. package/dist/style-guide/Icons/IconDisplayGrid.d.ts +2 -0
  55. package/dist/style-guide/Icons/IconDisplayGrid.js +42 -0
  56. package/dist/style-guide/Icons/Icons.js +7 -0
  57. package/dist/tslib.es6-CBKHJX9H.js +151 -0
  58. package/dist/utils/functional.js +19 -6
  59. package/dist/utils/hooks.d.ts +2 -1
  60. package/dist/utils/hooks.js +77 -10
  61. package/dist/utils/links.js +1128 -12
  62. package/dist/utils/math.js +8 -3
  63. package/dist/utils/mergeRefs.d.ts +1 -1
  64. package/dist/utils/mergeRefs.js +2 -2
  65. package/dist/utils/outlet.js +19 -4
  66. package/dist/utils/string.js +42 -7
  67. package/package.json +7 -13
  68. package/dist/Combination-Dj-a6dCZ.js +0 -1462
  69. package/dist/components/Icons.js +0 -6
  70. package/dist/functional-C0pE183N.js +0 -30
  71. package/dist/hooks-GAujvL7d.js +0 -86
  72. package/dist/links-CgOD-Vfj.js +0 -1142
  73. package/dist/math-i2ceybzU.js +0 -16
  74. package/dist/outlet-B11a3Kgw.js +0 -27
  75. package/dist/string-NVxCUbqk.js +0 -54
  76. package/dist/tslib.es6-Dd_EkEfR.js +0 -48
  77. /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-GAujvL7d.js";
6
- import "../../../math-i2ceybzU.js";
7
- import { R as e } from "../../../Rail-BCY3h7eP.js";
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-BCY3h7eP.js";
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-Dk_bSU3E.js";
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-BCY3h7eP.js";
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,5 +1,3 @@
1
- import { default as React } from 'react';
2
-
3
1
  export interface ModalProps {
4
2
  children: React.ReactNode;
5
3
  onClose?: () => void;
@@ -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 { n } from "../../functional-C0pE183N.js";
6
- import { c as h } from "../../hooks-GAujvL7d.js";
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 { n as f } from "../../functional-C0pE183N.js";
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, n) {
12
+ }, k = d.forwardRef(function(e, r) {
13
13
  const {
14
- items: r,
14
+ items: n,
15
15
  activeItemId: s,
16
16
  onActivate: a = f
17
- } = e, m = r.map((o) => /* @__PURE__ */ l(
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: n, className: t.root, children: m });
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 p } from "react/jsx-runtime";
1
+ import { jsx as a } from "react/jsx-runtime";
2
2
  import t from "react";
3
- import { n as o } from "../functional-C0pE183N.js";
4
- import { u as s } from "../hooks-GAujvL7d.js";
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((a) => {
18
- const [r] = a;
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__ */ p("span", { ref: e, style: l });
22
+ }, []), /* @__PURE__ */ a("span", { ref: e, style: l });
23
23
  }
24
24
  export {
25
25
  h as OnScreenSensor
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ export declare const OVERLAY_OUTLET_ID = "overlay-outlet";
3
4
  export interface OverlayProps {
4
5
  children: React.ReactNode;
5
6
  className?: string;
@@ -1,28 +1,29 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import n from "react";
3
- import { F as i } from "../../Combination-Dj-a6dCZ.js";
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 { a as u } from "../../hooks-GAujvL7d.js";
7
- import '../../assets/Overlay.css';const f = "_root_15udb_1", _ = "_backdrop_15udb_9", p = "_content_15udb_27", a = {
8
- root: f,
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: r
17
- } = c, s = e(a.root, o), d = u("overlay-outlet");
18
- return /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t("div", { className: s, children: r }) });
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 = n.forwardRef(function(o, r) {
21
- return /* @__PURE__ */ t(m, { ref: r, onClick: o.onClick, className: e(a.backdrop, o.className), children: o.children });
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 = n.forwardRef(function(o, r) {
24
- return /* @__PURE__ */ t("div", { ref: r, className: e(a.content, o.className), children: /* @__PURE__ */ t(i, { children: o.children }) });
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
  };