@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
@@ -1,5 +1,10 @@
1
- import { a as m, c as p } from "../math-i2ceybzU.js";
1
+ function u(r) {
2
+ return r < 0 ? 0 : r > 1 ? 1 : r;
3
+ }
4
+ function a(r, t, n) {
5
+ return Math.min(n, Math.max(t, r));
6
+ }
2
7
  export {
3
- m as clamp,
4
- p as clamp01
8
+ a as clamp,
9
+ u as clamp01
5
10
  };
@@ -1,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- export default function mergeRefs<T = any>(...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined)[]): React.RefCallback<T>;
3
+ export declare function mergeRefs<T = any>(...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined)[]): React.RefCallback<T>;
@@ -1,4 +1,4 @@
1
- function f(...e) {
1
+ function o(...e) {
2
2
  return (t) => {
3
3
  e.forEach((n) => {
4
4
  typeof n == "function" ? n(t) : n != null && (n.current = t);
@@ -6,5 +6,5 @@ function f(...e) {
6
6
  };
7
7
  }
8
8
  export {
9
- f as default
9
+ o as mergeRefs
10
10
  };
@@ -1,6 +1,21 @@
1
- import "../index-C75OpfGQ.js";
2
- import { a as r, c } from "../outlet-B11a3Kgw.js";
1
+ import { R as o } from "../index-2hJuj4UN.js";
2
+ function u(t) {
3
+ let e = null;
4
+ if (typeof window < "u" && (e = document.getElementById(t)), !e)
5
+ throw new Error(`Attempted to connect the outlet to the DOM node with ID #${t}, but no such node exists.`);
6
+ return ({
7
+ children: n
8
+ }) => o.createPortal(n, e);
9
+ }
10
+ function l() {
11
+ let t = null;
12
+ if (typeof window < "u" && (t = document.createElement("div"), document.body.appendChild(t)), !t)
13
+ throw new Error("Attempted to create an outlet, but no such outlet exists.");
14
+ return ({
15
+ children: e
16
+ }) => o.createPortal(e, t);
17
+ }
3
18
  export {
4
- r as attachOutlet,
5
- c as createOutlet
19
+ u as attachOutlet,
20
+ l as createOutlet
6
21
  };
@@ -1,9 +1,44 @@
1
- import { b as e, i, n as r, r as n, a as l, u as t } from "../string-NVxCUbqk.js";
1
+ function p(t, e) {
2
+ const r = t.charCodeAt(e);
3
+ let n;
4
+ return r >= 55296 && r <= 56319 && t.length > e + 1 && (n = t.charCodeAt(e + 1), n >= 56320 && n <= 57343) ? t.substring(e, e + 2) : t[e];
5
+ }
6
+ function A(t, e) {
7
+ return t[e];
8
+ }
9
+ function b(t, e) {
10
+ return t - e;
11
+ }
12
+ function C(t, e, r = !1) {
13
+ const n = r ? p : A, c = e.filter((u, h, g) => g.lastIndexOf(u) !== h ? !1 : u < t.length && u > 0).sort(b);
14
+ if (c.length === 0)
15
+ return /* @__PURE__ */ new Map([[0, t]]);
16
+ const l = /* @__PURE__ */ new Map();
17
+ let o = "", i = 0, s = 0, a = 0, f = 0;
18
+ for (; s < t.length; ) {
19
+ const u = n(t, s);
20
+ o += u, s += u.length, i += 1, c[a] === i && (l.set(f, o), o = "", f = c[a], a += 1);
21
+ }
22
+ return o && l.set(f, o), l;
23
+ }
24
+ function I(t, e, r, n) {
25
+ const c = t.substring(0, r), l = t.substring(n);
26
+ return `${c}${e}${l}`;
27
+ }
28
+ function S(t) {
29
+ return t.replace(/\\/g, "/");
30
+ }
31
+ function d(t) {
32
+ return !!t || t === "true" || t === "1";
33
+ }
34
+ function w(t) {
35
+ return !t || t === "false" || t === "0";
36
+ }
2
37
  export {
3
- e as isFalseString,
4
- i as isTrueString,
5
- r as normalizeSlashes,
6
- n as replaceRange,
7
- l as splitByIndices,
8
- t as unicodeCharAt
38
+ w as isFalseString,
39
+ d as isTrueString,
40
+ S as normalizeSlashes,
41
+ I as replaceRange,
42
+ C as splitByIndices,
43
+ p as unicodeCharAt
9
44
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "0.0.19",
4
+ "version": "0.0.21",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",
@@ -23,26 +23,17 @@
23
23
  "storybook": "storybook dev -p 6006",
24
24
  "build-storybook": "storybook build"
25
25
  },
26
- "peerDependencies": {
27
- "@fontsource/montserrat": "^4.5.12",
28
- "@fontsource/rubik": "^4.5.11",
29
- "@radix-ui/react-select": "^1.0.0",
30
- "autolinker": "^3.14.3",
31
- "flag-icons": "^6.1.1",
32
- "react": "^18.2.0",
33
- "react-dom": "^18.2.0",
34
- "react-focus-lock": "^2.9.1",
35
- "react-icons": "^4.4.0",
36
- "react-window": "^1.8.8"
37
- },
38
26
  "dependencies": {
39
27
  "@fontsource/montserrat": "^4.5.12",
40
28
  "@fontsource/rubik": "^4.5.11",
41
29
  "@radix-ui/react-select": "^1.0.0",
30
+ "@storybook/addon-docs": "^8.1.10",
31
+ "@storybook/addons": "^7.6.17",
42
32
  "autolinker": "^3.14.3",
43
33
  "flag-icons": "^6.1.1",
44
34
  "react": "^18.2.0",
45
35
  "react-dom": "^18.2.0",
36
+ "react-dropzone": "^14.2.3",
46
37
  "react-focus-lock": "^2.9.1",
47
38
  "react-icons": "^4.4.0",
48
39
  "react-window": "^1.8.8"
@@ -74,5 +65,8 @@
74
65
  "vite-plugin-lib-inject-css": "^2.1.1",
75
66
  "vite-plugin-static-copy": "^1.0.5",
76
67
  "vitest": "^1.6.0"
68
+ },
69
+ "resolutions": {
70
+ "jackspeak": "2.1.1"
77
71
  }
78
72
  }