@cfx-dev/ui-components 0.0.22 → 0.0.23
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/components/Table/Table.d.ts +2 -2
- package/dist/components/Table/Table.js +6 -6
- package/dist/main.d.ts +1 -0
- package/dist/main.js +42 -40
- package/package.json +1 -1
|
@@ -13,5 +13,5 @@ interface ITableProps {
|
|
|
13
13
|
sortOrder?: 'asc' | 'desc';
|
|
14
14
|
onSortChange?: (sortBy: string, sortOrder: 'asc' | 'desc') => void;
|
|
15
15
|
}
|
|
16
|
-
declare function Table({ headers, data, includeRadio, onSelectChange, dataContainer, useSort, sortBy: initialSortBy, sortOrder: initialSortOrder, onSortChange, }: ITableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export
|
|
16
|
+
export declare function Table({ headers, data, includeRadio, onSelectChange, dataContainer, useSort, sortBy: initialSortBy, sortOrder: initialSortOrder, onSortChange, }: ITableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import d, { useState as i } from "react";
|
|
3
3
|
import { F, a as A } from "../../index.esm-BkynlSN6.js";
|
|
4
4
|
import '../../assets/Table.css';const E = "_selectedRow_1jg2j_23", _ = {
|
|
5
5
|
"table-responsive": "_table-responsive_1jg2j_1",
|
|
@@ -14,12 +14,12 @@ function S({
|
|
|
14
14
|
useSort: m = !1,
|
|
15
15
|
sortBy: j,
|
|
16
16
|
sortOrder: v = "asc",
|
|
17
|
-
onSortChange:
|
|
17
|
+
onSortChange: o
|
|
18
18
|
}) {
|
|
19
19
|
const [b, f] = i(null), [u, y] = i(j), [R, k] = i(v), O = (e) => {
|
|
20
20
|
const l = u === e && R === "asc" ? "desc" : "asc";
|
|
21
|
-
y(e), k(l),
|
|
22
|
-
}, $ =
|
|
21
|
+
y(e), k(l), o == null || o(e, l);
|
|
22
|
+
}, $ = d.useCallback((e) => {
|
|
23
23
|
f(parseInt(e.target.value, 10)), c == null || c(parseInt(e.target.value, 10));
|
|
24
24
|
}, [f, c]);
|
|
25
25
|
return /* @__PURE__ */ t("div", { className: _.table, children: /* @__PURE__ */ a("table", { children: [
|
|
@@ -48,7 +48,7 @@ function S({
|
|
|
48
48
|
) }),
|
|
49
49
|
e.map((l, B) => {
|
|
50
50
|
let r;
|
|
51
|
-
return
|
|
51
|
+
return d.isValidElement(l) ? r = l : p ? r = d.createElement(p, { item: l }) : r = String(l), /* @__PURE__ */ t("td", { children: r }, `item-${B}`);
|
|
52
52
|
})
|
|
53
53
|
]
|
|
54
54
|
},
|
|
@@ -57,5 +57,5 @@ function S({
|
|
|
57
57
|
] }) });
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
|
-
S as
|
|
60
|
+
S as Table
|
|
61
61
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { Spacer } from './components/Spacer/Spacer';
|
|
|
51
51
|
export { Style, useContextualStyle } from './components/Style/Style';
|
|
52
52
|
export { Switch } from './components/Switch/Switch';
|
|
53
53
|
export { Tabular } from './components/Tabular/Tabular';
|
|
54
|
+
export { Table } from './components/Table/Table';
|
|
54
55
|
export { Text, TextBlock } from './components/Text/Text';
|
|
55
56
|
export { Textarea } from './components/Textarea/Textarea';
|
|
56
57
|
export { Title, TITLE_OUTLET_ID } from './components/Title/Title';
|
package/dist/main.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mergeRefs as e } from "./utils/mergeRefs.js";
|
|
2
2
|
import { clsx as p } from "./utils/clsx.js";
|
|
3
3
|
import { getValue as m } from "./utils/getValue.js";
|
|
4
|
-
import { useDynamicRef as a, useGlobalKeyboardEvent as
|
|
5
|
-
import { identity as d, invoke as
|
|
6
|
-
import { Linkify as B, defaultLinkReplacer as k, defaultLinkReplacerx as R, isExternalUrl as O, linkify as
|
|
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
|
+
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 O, linkify as b, linkifyx as g, matchLinkNodes as D, matchLinks as h } 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
9
|
import { Checkbox as w } from "./components/Checkbox/Checkbox.js";
|
|
@@ -17,15 +17,15 @@ import { ControlBox as or } from "./components/ControlBox/ControlBox.js";
|
|
|
17
17
|
import { CountryFlag as tr } from "./components/CountryFlag/CountryFlag.js";
|
|
18
18
|
import { Decorate as xr } from "./components/Decorate/Decorate.js";
|
|
19
19
|
import { Dot as fr } from "./components/Dot/Dot.js";
|
|
20
|
-
import { FLYOUT_OUTLET_ID as
|
|
20
|
+
import { FLYOUT_OUTLET_ID as lr, Flyout as nr } from "./components/Flyout/Flyout.js";
|
|
21
21
|
import { Icon as sr } from "./components/Icon/Icon.js";
|
|
22
22
|
import { Indicator as cr } from "./components/Indicator/Indicator.js";
|
|
23
|
-
import { InfoPanel as
|
|
23
|
+
import { InfoPanel as Tr } from "./components/InfoPanel/InfoPanel.js";
|
|
24
24
|
import { Input as Lr } from "./components/Input/Input.js";
|
|
25
25
|
import { RichInput as yr } from "./components/Input/RichInput.js";
|
|
26
26
|
import { Interactive as kr } from "./components/Interactive/Interactive.js";
|
|
27
27
|
import { Island as Or } from "./components/Island/Island.js";
|
|
28
|
-
import { Box as
|
|
28
|
+
import { Box as gr } from "./components/Layout/Box/Box.js";
|
|
29
29
|
import { Center as hr } from "./components/Layout/Center/Center.js";
|
|
30
30
|
import { Flex as Er } from "./components/Layout/Flex/Flex.js";
|
|
31
31
|
import { FlexRestricter as _r } from "./components/Layout/Flex/FlexRestricter.js";
|
|
@@ -43,26 +43,27 @@ import { Prose as oo } from "./components/Prose/Prose.js";
|
|
|
43
43
|
import { Radio as to } from "./components/Radio/Radio.js";
|
|
44
44
|
import { Select as xo } from "./components/Select/Select.js";
|
|
45
45
|
import { Separator as fo } from "./components/Separator/Separator.js";
|
|
46
|
-
import { Shroud as
|
|
46
|
+
import { Shroud as lo } from "./components/Shroud/Shroud.js";
|
|
47
47
|
import { Spacer as io } from "./components/Spacer/Spacer.js";
|
|
48
48
|
import { Style as uo, useContextualStyle as co } from "./components/Style/Style.js";
|
|
49
|
-
import { Switch as
|
|
49
|
+
import { Switch as Io } from "./components/Switch/Switch.js";
|
|
50
50
|
import { Tabular as So } from "./components/Tabular/Tabular.js";
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
51
|
+
import { Table as Bo } from "./components/Table/Table.js";
|
|
52
|
+
import { Text as Ro, TextBlock as Oo } from "./components/Text/Text.js";
|
|
53
|
+
import { Textarea as go } from "./components/Textarea/Textarea.js";
|
|
54
|
+
import { TITLE_OUTLET_ID as ho, Title as Co } from "./components/Title/Title.js";
|
|
55
|
+
import { InputDropzone as Po } from "./components/InputDropzone/InputDropzone.js";
|
|
56
|
+
import { B as vo, I as Fo } from "./Icons-BlBKvJD8.js";
|
|
57
|
+
import { OnScreenSensor as Ao } from "./components/OnScreenSensor.js";
|
|
58
|
+
import { ui as Ko } from "./components/ui.js";
|
|
59
|
+
import { Symbols as wo } from "./components/Symbols.js";
|
|
59
60
|
export {
|
|
60
61
|
H as Avatar,
|
|
61
62
|
Q as BACKDROP_OUTLET_ID,
|
|
62
63
|
X as BackdropPortal,
|
|
63
64
|
$ as Badge,
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
gr as Box,
|
|
66
|
+
vo as BrandIcon,
|
|
66
67
|
Y as Button,
|
|
67
68
|
j as ButtonBar,
|
|
68
69
|
hr as Center,
|
|
@@ -71,16 +72,16 @@ export {
|
|
|
71
72
|
tr as CountryFlag,
|
|
72
73
|
xr as Decorate,
|
|
73
74
|
fr as Dot,
|
|
74
|
-
|
|
75
|
+
lr as FLYOUT_OUTLET_ID,
|
|
75
76
|
Er as Flex,
|
|
76
77
|
_r as FlexRestricter,
|
|
77
|
-
|
|
78
|
+
nr as Flyout,
|
|
78
79
|
sr as Icon,
|
|
79
|
-
|
|
80
|
+
Fo as Icons,
|
|
80
81
|
cr as Indicator,
|
|
81
|
-
|
|
82
|
+
Tr as InfoPanel,
|
|
82
83
|
Lr as Input,
|
|
83
|
-
|
|
84
|
+
Po as InputDropzone,
|
|
84
85
|
kr as Interactive,
|
|
85
86
|
Or as Island,
|
|
86
87
|
M as LinkButton,
|
|
@@ -89,7 +90,7 @@ export {
|
|
|
89
90
|
Mr as Modal,
|
|
90
91
|
jr as NavList,
|
|
91
92
|
Hr as OVERLAY_OUTLET_ID,
|
|
92
|
-
|
|
93
|
+
Ao as OnScreenSensor,
|
|
93
94
|
Jr as Overlay,
|
|
94
95
|
Fr as Pad,
|
|
95
96
|
Ar as Page,
|
|
@@ -101,17 +102,18 @@ export {
|
|
|
101
102
|
Kr as Scrollable,
|
|
102
103
|
xo as Select,
|
|
103
104
|
fo as Separator,
|
|
104
|
-
|
|
105
|
+
lo as Shroud,
|
|
105
106
|
io as Spacer,
|
|
106
107
|
uo as Style,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
Io as Switch,
|
|
109
|
+
wo as Symbols,
|
|
110
|
+
ho as TITLE_OUTLET_ID,
|
|
111
|
+
Bo as Table,
|
|
110
112
|
So as Tabular,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
Ro as Text,
|
|
114
|
+
Oo as TextBlock,
|
|
115
|
+
go as Textarea,
|
|
116
|
+
Co as Title,
|
|
115
117
|
wr as VirtualScrollable,
|
|
116
118
|
E as clamp,
|
|
117
119
|
P as clamp01,
|
|
@@ -120,27 +122,27 @@ export {
|
|
|
120
122
|
R as defaultLinkReplacerx,
|
|
121
123
|
m as getValue,
|
|
122
124
|
d as identity,
|
|
123
|
-
|
|
125
|
+
T as invoke,
|
|
124
126
|
O as isExternalUrl,
|
|
125
127
|
v as isFalseString,
|
|
126
128
|
F as isTrueString,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
b as linkify,
|
|
130
|
+
g as linkifyx,
|
|
131
|
+
D as matchLinkNodes,
|
|
130
132
|
h as matchLinks,
|
|
131
133
|
e as mergeRefs,
|
|
132
|
-
|
|
134
|
+
I as noop,
|
|
133
135
|
U as normalizeSlashes,
|
|
134
136
|
A as replaceRange,
|
|
135
137
|
L as returnFalse,
|
|
136
138
|
S as returnTrue,
|
|
137
139
|
z as splitByIndices,
|
|
138
|
-
|
|
140
|
+
Ko as ui,
|
|
139
141
|
K as unicodeCharAt,
|
|
140
142
|
co as useContextualStyle,
|
|
141
143
|
a as useDynamicRef,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
l as useGlobalKeyboardEvent,
|
|
145
|
+
n as useInstance,
|
|
144
146
|
i as useKeyboardClose,
|
|
145
147
|
s as useOutlet,
|
|
146
148
|
u as useWindowResize
|