@cfx-dev/ui-components 0.0.23 → 0.0.24
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/main.d.ts +2 -0
- package/dist/main.js +117 -114
- package/dist/utils/execution.d.ts +3 -0
- package/dist/utils/execution.js +20 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -6,9 +6,11 @@ export { noop, returnTrue, returnFalse, identity, invoke, } from './utils/functi
|
|
|
6
6
|
export { isExternalUrl, matchLinks, matchLinkNodes, defaultLinkReplacerx, defaultLinkReplacer, linkifyx, linkify, Linkify, } from './utils/links';
|
|
7
7
|
export { clamp01, clamp, } from './utils/math';
|
|
8
8
|
export { unicodeCharAt, splitByIndices, replaceRange, normalizeSlashes, isTrueString, isFalseString, } from './utils/string';
|
|
9
|
+
export { debounce, throttle, } from './utils/execution';
|
|
9
10
|
export type { ValueOrGetter } from './utils/getValue';
|
|
10
11
|
export type { ILinkSubstitute, ILinkMatch, LinkifyProps, } from './utils/links';
|
|
11
12
|
export type { OutletPosition } from './utils/hooks';
|
|
13
|
+
export type { SetTimeoutReturn } from './utils/execution';
|
|
12
14
|
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
13
15
|
export { Button } from './components/Button/Button';
|
|
14
16
|
export { LinkButton } from './components/Button/LinkButton';
|
package/dist/main.js
CHANGED
|
@@ -3,133 +3,135 @@ import { clsx as p } from "./utils/clsx.js";
|
|
|
3
3
|
import { getValue as m } from "./utils/getValue.js";
|
|
4
4
|
import { useDynamicRef as a, useGlobalKeyboardEvent as l, useInstance as n, useKeyboardClose as i, useOutlet as s, useWindowResize as u } from "./utils/hooks.js";
|
|
5
5
|
import { identity as d, invoke as T, noop as I, returnFalse as L, returnTrue as S } from "./utils/functional.js";
|
|
6
|
-
import { Linkify as B, defaultLinkReplacer as k, defaultLinkReplacerx as R, isExternalUrl as
|
|
6
|
+
import { Linkify as B, defaultLinkReplacer as k, defaultLinkReplacerx as R, isExternalUrl as b, linkify as O, linkifyx as g, matchLinkNodes as h, matchLinks as D } from "./utils/links.js";
|
|
7
7
|
import { clamp as E, clamp01 as P } from "./utils/math.js";
|
|
8
8
|
import { isFalseString as v, isTrueString as F, normalizeSlashes as U, replaceRange as A, splitByIndices as z, unicodeCharAt as K } from "./utils/string.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
9
|
+
import { debounce as w, throttle as N } from "./utils/execution.js";
|
|
10
|
+
import { Checkbox as G } from "./components/Checkbox/Checkbox.js";
|
|
11
|
+
import { Button as W } from "./components/Button/Button.js";
|
|
12
|
+
import { LinkButton as q } from "./components/Button/LinkButton.js";
|
|
13
|
+
import { ButtonBar as J } from "./components/Button/ButtonBar.js";
|
|
14
|
+
import { Avatar as X } from "./components/Avatar/Avatar.js";
|
|
15
|
+
import { BACKDROP_OUTLET_ID as $, BackdropPortal as oo } from "./components/BackdropPortal/BackdropPortal.js";
|
|
16
|
+
import { Badge as eo } from "./components/Badge/Badge.js";
|
|
17
|
+
import { ControlBox as po } from "./components/ControlBox/ControlBox.js";
|
|
18
|
+
import { CountryFlag as mo } from "./components/CountryFlag/CountryFlag.js";
|
|
19
|
+
import { Decorate as ao } from "./components/Decorate/Decorate.js";
|
|
20
|
+
import { Dot as no } from "./components/Dot/Dot.js";
|
|
21
|
+
import { FLYOUT_OUTLET_ID as so, Flyout as uo } from "./components/Flyout/Flyout.js";
|
|
22
|
+
import { Icon as To } from "./components/Icon/Icon.js";
|
|
23
|
+
import { Indicator as Lo } from "./components/Indicator/Indicator.js";
|
|
24
|
+
import { InfoPanel as yo } from "./components/InfoPanel/InfoPanel.js";
|
|
25
|
+
import { Input as ko } from "./components/Input/Input.js";
|
|
26
|
+
import { RichInput as bo } from "./components/Input/RichInput.js";
|
|
27
|
+
import { Interactive as go } from "./components/Interactive/Interactive.js";
|
|
28
|
+
import { Island as Do } from "./components/Island/Island.js";
|
|
29
|
+
import { Box as Eo } from "./components/Layout/Box/Box.js";
|
|
30
|
+
import { Center as _o } from "./components/Layout/Center/Center.js";
|
|
31
|
+
import { Flex as Fo } from "./components/Layout/Flex/Flex.js";
|
|
32
|
+
import { FlexRestricter as Ao } from "./components/Layout/Flex/FlexRestricter.js";
|
|
33
|
+
import { Pad as Ko } from "./components/Layout/Pad/Pad.js";
|
|
34
|
+
import { Page as wo } from "./components/Layout/Page/Page.js";
|
|
35
|
+
import { Scrollable as Yo } from "./components/Layout/Scrollable/Scrollable.js";
|
|
36
|
+
import { VirtualScrollable as Mo } from "./components/Layout/Scrollable/VirtualScrollable.js";
|
|
37
|
+
import { Loaf as jo } from "./components/Loaf/Loaf.js";
|
|
38
|
+
import { Modal as Ho } from "./components/Modal/Modal.js";
|
|
39
|
+
import { NavList as Qo } from "./components/NavList/NavList.js";
|
|
40
|
+
import { OVERLAY_OUTLET_ID as Zo, Overlay as $o } from "./components/Overlay/Overlay.js";
|
|
41
|
+
import { Popover as rr } from "./components/Popover/Popover.js";
|
|
42
|
+
import { PremiumBadge as tr } from "./components/PremiumBadge/PremiumBadge.js";
|
|
43
|
+
import { Prose as xr } from "./components/Prose/Prose.js";
|
|
44
|
+
import { Radio as fr } from "./components/Radio/Radio.js";
|
|
45
|
+
import { Select as lr } from "./components/Select/Select.js";
|
|
46
|
+
import { Separator as ir } from "./components/Separator/Separator.js";
|
|
47
|
+
import { Shroud as ur } from "./components/Shroud/Shroud.js";
|
|
48
|
+
import { Spacer as dr } from "./components/Spacer/Spacer.js";
|
|
49
|
+
import { Style as Ir, useContextualStyle as Lr } from "./components/Style/Style.js";
|
|
50
|
+
import { Switch as yr } from "./components/Switch/Switch.js";
|
|
51
|
+
import { Tabular as kr } from "./components/Tabular/Tabular.js";
|
|
52
|
+
import { Table as br } from "./components/Table/Table.js";
|
|
53
|
+
import { Text as gr, TextBlock as hr } from "./components/Text/Text.js";
|
|
54
|
+
import { Textarea as Cr } from "./components/Textarea/Textarea.js";
|
|
55
|
+
import { TITLE_OUTLET_ID as Pr, Title as _r } from "./components/Title/Title.js";
|
|
56
|
+
import { InputDropzone as Fr } from "./components/InputDropzone/InputDropzone.js";
|
|
57
|
+
import { B as Ar, I as zr } from "./Icons-BlBKvJD8.js";
|
|
58
|
+
import { OnScreenSensor as Vr } from "./components/OnScreenSensor.js";
|
|
59
|
+
import { ui as Nr } from "./components/ui.js";
|
|
60
|
+
import { Symbols as Gr } from "./components/Symbols.js";
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
62
|
+
X as Avatar,
|
|
63
|
+
$ as BACKDROP_OUTLET_ID,
|
|
64
|
+
oo as BackdropPortal,
|
|
65
|
+
eo as Badge,
|
|
66
|
+
Eo as Box,
|
|
67
|
+
Ar as BrandIcon,
|
|
68
|
+
W as Button,
|
|
69
|
+
J as ButtonBar,
|
|
70
|
+
_o as Center,
|
|
71
|
+
G as Checkbox,
|
|
72
|
+
po as ControlBox,
|
|
73
|
+
mo as CountryFlag,
|
|
74
|
+
ao as Decorate,
|
|
75
|
+
no as Dot,
|
|
76
|
+
so as FLYOUT_OUTLET_ID,
|
|
77
|
+
Fo as Flex,
|
|
78
|
+
Ao as FlexRestricter,
|
|
79
|
+
uo as Flyout,
|
|
80
|
+
To as Icon,
|
|
81
|
+
zr as Icons,
|
|
82
|
+
Lo as Indicator,
|
|
83
|
+
yo as InfoPanel,
|
|
84
|
+
ko as Input,
|
|
85
|
+
Fr as InputDropzone,
|
|
86
|
+
go as Interactive,
|
|
87
|
+
Do as Island,
|
|
88
|
+
q as LinkButton,
|
|
88
89
|
B as Linkify,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
90
|
+
jo as Loaf,
|
|
91
|
+
Ho as Modal,
|
|
92
|
+
Qo as NavList,
|
|
93
|
+
Zo as OVERLAY_OUTLET_ID,
|
|
94
|
+
Vr as OnScreenSensor,
|
|
95
|
+
$o as Overlay,
|
|
96
|
+
Ko as Pad,
|
|
97
|
+
wo as Page,
|
|
98
|
+
rr as Popover,
|
|
99
|
+
tr as PremiumBadge,
|
|
100
|
+
xr as Prose,
|
|
101
|
+
fr as Radio,
|
|
102
|
+
bo as RichInput,
|
|
103
|
+
Yo as Scrollable,
|
|
104
|
+
lr as Select,
|
|
105
|
+
ir as Separator,
|
|
106
|
+
ur as Shroud,
|
|
107
|
+
dr as Spacer,
|
|
108
|
+
Ir as Style,
|
|
109
|
+
yr as Switch,
|
|
110
|
+
Gr as Symbols,
|
|
111
|
+
Pr as TITLE_OUTLET_ID,
|
|
112
|
+
br as Table,
|
|
113
|
+
kr as Tabular,
|
|
114
|
+
gr as Text,
|
|
115
|
+
hr as TextBlock,
|
|
116
|
+
Cr as Textarea,
|
|
117
|
+
_r as Title,
|
|
118
|
+
Mo as VirtualScrollable,
|
|
118
119
|
E as clamp,
|
|
119
120
|
P as clamp01,
|
|
120
121
|
p as clsx,
|
|
122
|
+
w as debounce,
|
|
121
123
|
k as defaultLinkReplacer,
|
|
122
124
|
R as defaultLinkReplacerx,
|
|
123
125
|
m as getValue,
|
|
124
126
|
d as identity,
|
|
125
127
|
T as invoke,
|
|
126
|
-
|
|
128
|
+
b as isExternalUrl,
|
|
127
129
|
v as isFalseString,
|
|
128
130
|
F as isTrueString,
|
|
129
|
-
|
|
131
|
+
O as linkify,
|
|
130
132
|
g as linkifyx,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
h as matchLinkNodes,
|
|
134
|
+
D as matchLinks,
|
|
133
135
|
e as mergeRefs,
|
|
134
136
|
I as noop,
|
|
135
137
|
U as normalizeSlashes,
|
|
@@ -137,9 +139,10 @@ export {
|
|
|
137
139
|
L as returnFalse,
|
|
138
140
|
S as returnTrue,
|
|
139
141
|
z as splitByIndices,
|
|
140
|
-
|
|
142
|
+
N as throttle,
|
|
143
|
+
Nr as ui,
|
|
141
144
|
K as unicodeCharAt,
|
|
142
|
-
|
|
145
|
+
Lr as useContextualStyle,
|
|
143
146
|
a as useDynamicRef,
|
|
144
147
|
l as useGlobalKeyboardEvent,
|
|
145
148
|
n as useInstance,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type SetTimeoutReturn = ReturnType<typeof setTimeout>;
|
|
2
|
+
export declare function debounce<A extends unknown[]>(fn: (...args: A) => void, time: number): (...args: A) => void;
|
|
3
|
+
export declare function throttle<A extends unknown[]>(fn: (...args: A) => void, time: number): (...args: A) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function n(e, l) {
|
|
2
|
+
let t = null;
|
|
3
|
+
return (...u) => {
|
|
4
|
+
t !== null && clearTimeout(t), t = setTimeout(() => {
|
|
5
|
+
t = null, e(...u);
|
|
6
|
+
}, l);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function r(e, l) {
|
|
10
|
+
let t = null;
|
|
11
|
+
return (...u) => {
|
|
12
|
+
t === null && (t = setTimeout(() => {
|
|
13
|
+
t = null;
|
|
14
|
+
}, l), e(...u));
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
n as debounce,
|
|
19
|
+
r as throttle
|
|
20
|
+
};
|