@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
package/dist/utils/math.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export declare function mergeRefs<T = any>(...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined)[]): React.RefCallback<T>;
|
package/dist/utils/mergeRefs.js
CHANGED
package/dist/utils/outlet.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
|
|
19
|
+
u as attachOutlet,
|
|
20
|
+
l as createOutlet
|
|
6
21
|
};
|
package/dist/utils/string.js
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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.
|
|
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
|
}
|