@cfx-dev/ui-components 2.0.9 → 2.1.0
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/assets/Box.css +1 -1
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/FlexShowcase.css +1 -0
- package/dist/assets/Pad.css +1 -1
- package/dist/assets/Separator.css +1 -1
- package/dist/assets/Spacer.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Layout/Box/Box.d.ts +4 -1
- package/dist/components/Layout/Box/Box.js +97 -31
- package/dist/components/Layout/Flex/Flex.d.ts +4 -5
- package/dist/components/Layout/Flex/Flex.js +64 -59
- package/dist/components/Layout/Flex/FlexShowcase.d.ts +6 -0
- package/dist/components/Layout/Flex/FlexShowcase.js +19 -0
- package/dist/components/Layout/Pad/Pad.js +30 -29
- package/dist/components/Separator/Separator.js +32 -31
- package/dist/components/Spacer/Spacer.js +21 -20
- package/dist/components/Table/Table.d.ts +21 -9
- package/dist/components/Table/Table.js +129 -70
- package/dist/components/Table/TableShowcase.js +7 -1
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +4 -0
- package/dist/components/ui.d.ts +60 -14
- package/dist/components/ui.js +52 -17
- package/dist/main.d.ts +1 -0
- package/dist/styles-scss/_ui.scss +29 -31
- package/dist/styles-scss/global.scss +1 -0
- package/dist/styles-scss/tokens.scss +26 -14
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { MPProps } from '../../ui';
|
|
2
3
|
|
|
3
|
-
export interface BoxProps {
|
|
4
|
+
export interface BoxProps extends MPProps {
|
|
4
5
|
noOverflow?: boolean;
|
|
5
6
|
noShrink?: boolean;
|
|
6
7
|
grow?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
fullHeight?: boolean;
|
|
7
10
|
/**
|
|
8
11
|
* Number values is treated like quant multiplier
|
|
9
12
|
* String value used as is
|
|
@@ -1,38 +1,104 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useContextualStyle as
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { useContextualStyle as j } from "../../Style/Style.js";
|
|
4
4
|
import { ui as d } from "../../ui.js";
|
|
5
|
-
import { clsx as
|
|
6
|
-
import '../../../assets/Box.css';const
|
|
7
|
-
root:
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"no-
|
|
5
|
+
import { clsx as H } from "../../../utils/clsx.js";
|
|
6
|
+
import '../../../assets/Box.css';const W = "_root_1bvck_1", z = "_grow_1bvck_13", o = {
|
|
7
|
+
root: W,
|
|
8
|
+
"full-width": "_full-width_1bvck_1",
|
|
9
|
+
"full-height": "_full-height_1bvck_4",
|
|
10
|
+
"no-overflow": "_no-overflow_1bvck_7",
|
|
11
|
+
"no-shrink": "_no-shrink_1bvck_10",
|
|
12
|
+
grow: z,
|
|
13
|
+
"no-grow": "_no-grow_1bvck_16"
|
|
12
14
|
};
|
|
13
|
-
function
|
|
14
|
-
return typeof
|
|
15
|
+
function b(r) {
|
|
16
|
+
return typeof r == "string" ? r : d.q(r);
|
|
15
17
|
}
|
|
16
|
-
const
|
|
18
|
+
const J = m.forwardRef(function(x, y) {
|
|
17
19
|
const {
|
|
18
|
-
noOverflow:
|
|
19
|
-
noShrink:
|
|
20
|
-
grow:
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
23
|
-
children:
|
|
24
|
-
className:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
noOverflow: S = !1,
|
|
21
|
+
noShrink: M = !1,
|
|
22
|
+
grow: e = void 0,
|
|
23
|
+
width: g,
|
|
24
|
+
height: a,
|
|
25
|
+
children: A,
|
|
26
|
+
className: N,
|
|
27
|
+
fullWidth: R,
|
|
28
|
+
fullHeight: q,
|
|
29
|
+
style: p,
|
|
30
|
+
// --- MPProps
|
|
31
|
+
m: l,
|
|
32
|
+
mt: s,
|
|
33
|
+
mr: n,
|
|
34
|
+
mb: f,
|
|
35
|
+
ml: i,
|
|
36
|
+
p: c,
|
|
37
|
+
pt: h,
|
|
38
|
+
pr: u,
|
|
39
|
+
pb: _,
|
|
40
|
+
pl: w
|
|
41
|
+
} = x, k = j(), B = H(o.root, N, {
|
|
42
|
+
[o["full-width"]]: R,
|
|
43
|
+
[o["full-height"]]: q,
|
|
44
|
+
[o["no-overflow"]]: S,
|
|
45
|
+
[o["no-shrink"]]: M,
|
|
46
|
+
[o["no-grow"]]: e === !1,
|
|
47
|
+
[o.grow]: e === !0
|
|
48
|
+
}), C = m.useMemo(() => d.getAllMPAttrs({
|
|
49
|
+
m: l,
|
|
50
|
+
mt: s,
|
|
51
|
+
mr: n,
|
|
52
|
+
mb: f,
|
|
53
|
+
ml: i,
|
|
54
|
+
p: c,
|
|
55
|
+
pt: h,
|
|
56
|
+
pr: u,
|
|
57
|
+
pb: _,
|
|
58
|
+
pl: w
|
|
59
|
+
}), [
|
|
60
|
+
l,
|
|
61
|
+
s,
|
|
62
|
+
n,
|
|
63
|
+
f,
|
|
64
|
+
i,
|
|
65
|
+
c,
|
|
66
|
+
h,
|
|
67
|
+
u,
|
|
68
|
+
_,
|
|
69
|
+
w
|
|
70
|
+
]), v = m.useMemo(() => d.getAllMPStyles({
|
|
71
|
+
m: l,
|
|
72
|
+
mt: s,
|
|
73
|
+
mr: n,
|
|
74
|
+
mb: f,
|
|
75
|
+
ml: i,
|
|
76
|
+
p: c,
|
|
77
|
+
pt: h,
|
|
78
|
+
pr: u,
|
|
79
|
+
pb: _,
|
|
80
|
+
pl: w
|
|
81
|
+
}), [
|
|
82
|
+
l,
|
|
83
|
+
s,
|
|
84
|
+
n,
|
|
85
|
+
f,
|
|
86
|
+
i,
|
|
87
|
+
c,
|
|
88
|
+
h,
|
|
89
|
+
u,
|
|
90
|
+
_,
|
|
91
|
+
w
|
|
92
|
+
]), O = m.useMemo(() => {
|
|
93
|
+
const t = {
|
|
94
|
+
...v,
|
|
95
|
+
...k,
|
|
96
|
+
...p || {}
|
|
97
|
+
};
|
|
98
|
+
return g && (t.width = b(g)), a && (t.height = b(a)), !t.width && e === !0 && (t.width = "1px"), t;
|
|
99
|
+
}, [e, a, v, p, g, k]);
|
|
100
|
+
return /* @__PURE__ */ P("div", { ...C, ref: y, className: B, style: O, children: A });
|
|
35
101
|
});
|
|
36
102
|
export {
|
|
37
|
-
|
|
103
|
+
J as Box
|
|
38
104
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '../Box/Box';
|
|
3
|
+
import { OffesetType } from '../../ui';
|
|
2
4
|
|
|
3
|
-
export interface FlexProps {
|
|
4
|
-
fullWidth?: boolean;
|
|
5
|
-
fullHeight?: boolean;
|
|
5
|
+
export interface FlexProps extends BoxProps {
|
|
6
6
|
centered?: boolean | 'axis' | 'cross-axis' | 'baseline-axis' | 'baseline-cross-axis';
|
|
7
7
|
vertical?: boolean;
|
|
8
8
|
reverseOrder?: boolean;
|
|
9
|
-
repell?: boolean;
|
|
10
9
|
stretch?: boolean;
|
|
11
10
|
wrap?: boolean;
|
|
12
11
|
spaceBetween?: boolean;
|
|
13
12
|
alignToEnd?: boolean;
|
|
14
13
|
alignToEndAxis?: boolean;
|
|
15
|
-
gap?:
|
|
14
|
+
gap?: OffesetType;
|
|
16
15
|
children?: React.ReactNode;
|
|
17
16
|
className?: string;
|
|
18
17
|
}
|
|
@@ -1,55 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"full-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"centered-
|
|
12
|
-
"
|
|
13
|
-
"baseline-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"align-to-end
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"gap-
|
|
25
|
-
"gap-
|
|
26
|
-
"gap-
|
|
27
|
-
"gap-
|
|
28
|
-
"gap-
|
|
29
|
-
"gap-
|
|
30
|
-
"gap-
|
|
31
|
-
"gap-
|
|
32
|
-
"gap-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { Box as u } from "../Box/Box.js";
|
|
4
|
+
import { clsx as b } from "../../../utils/clsx.js";
|
|
5
|
+
import { FlexRestricter as v } from "./FlexRestricter.js";
|
|
6
|
+
import '../../../assets/Flex.css';const z = "_root_w5him_1", R = "_centered_w5him_11", F = "_vertical_w5him_30", C = "_repell_w5him_36", N = "_wrap_w5him_39", B = "_stretch_w5him_51", E = "_horizontal_w5him_57", e = {
|
|
7
|
+
root: z,
|
|
8
|
+
"full-width": "_full-width_w5him_5",
|
|
9
|
+
"full-height": "_full-height_w5him_8",
|
|
10
|
+
centered: R,
|
|
11
|
+
"centered-axis": "_centered-axis_w5him_15",
|
|
12
|
+
"centered-cross-axis": "_centered-cross-axis_w5him_18",
|
|
13
|
+
"baseline-axis": "_baseline-axis_w5him_21",
|
|
14
|
+
"baseline-cross-axis": "_baseline-cross-axis_w5him_24",
|
|
15
|
+
"reverse-order": "_reverse-order_w5him_27",
|
|
16
|
+
vertical: F,
|
|
17
|
+
repell: C,
|
|
18
|
+
wrap: N,
|
|
19
|
+
"align-to-end": "_align-to-end_w5him_42",
|
|
20
|
+
"align-to-end-axis": "_align-to-end-axis_w5him_45",
|
|
21
|
+
"space-between": "_space-between_w5him_48",
|
|
22
|
+
stretch: B,
|
|
23
|
+
horizontal: E,
|
|
24
|
+
"gap-none": "_gap-none_w5him_63",
|
|
25
|
+
"gap-hairthin": "_gap-hairthin_w5him_66",
|
|
26
|
+
"gap-thin": "_gap-thin_w5him_69",
|
|
27
|
+
"gap-xxsmall": "_gap-xxsmall_w5him_72",
|
|
28
|
+
"gap-xsmall": "_gap-xsmall_w5him_75",
|
|
29
|
+
"gap-small": "_gap-small_w5him_78",
|
|
30
|
+
"gap-normal": "_gap-normal_w5him_81",
|
|
31
|
+
"gap-medium": "_gap-medium_w5him_84",
|
|
32
|
+
"gap-large": "_gap-large_w5him_87",
|
|
33
|
+
"gap-xlarge": "_gap-xlarge_w5him_90",
|
|
34
|
+
"gap-safezone": "_gap-safezone_w5him_93"
|
|
33
35
|
};
|
|
34
|
-
function
|
|
36
|
+
function T(r, s) {
|
|
35
37
|
const {
|
|
36
|
-
fullWidth: n = !1,
|
|
37
|
-
fullHeight: o = !1,
|
|
38
|
-
vertical: t = !1,
|
|
39
38
|
centered: a = !1,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
gap:
|
|
48
|
-
children:
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
[e["full-height"]]: o,
|
|
39
|
+
vertical: t = !1,
|
|
40
|
+
reverseOrder: n = !1,
|
|
41
|
+
stretch: l = !1,
|
|
42
|
+
wrap: o = !1,
|
|
43
|
+
spaceBetween: c = !1,
|
|
44
|
+
alignToEnd: m = !1,
|
|
45
|
+
alignToEndAxis: h = !1,
|
|
46
|
+
gap: p = "normal",
|
|
47
|
+
children: w,
|
|
48
|
+
className: g,
|
|
49
|
+
...x
|
|
50
|
+
} = r, d = b(e.root, g, e[`gap-${p}`], {
|
|
53
51
|
[e.centered]: a === !0,
|
|
54
52
|
[e["centered-axis"]]: a === "axis",
|
|
55
53
|
[e["centered-cross-axis"]]: a === "cross-axis",
|
|
@@ -57,21 +55,28 @@ function A(l, s) {
|
|
|
57
55
|
[e["baseline-cross-axis"]]: a === "baseline-cross-axis",
|
|
58
56
|
[e.vertical]: t,
|
|
59
57
|
[e.horizontal]: !t,
|
|
60
|
-
[e.
|
|
61
|
-
[e.
|
|
62
|
-
[e
|
|
63
|
-
[e["align-to-end"]]:
|
|
64
|
-
[e["
|
|
65
|
-
[e["
|
|
66
|
-
[e["reverse-order"]]: d
|
|
58
|
+
[e.stretch]: l,
|
|
59
|
+
[e.wrap]: o,
|
|
60
|
+
[e["align-to-end"]]: m,
|
|
61
|
+
[e["align-to-end-axis"]]: h,
|
|
62
|
+
[e["space-between"]]: c,
|
|
63
|
+
[e["reverse-order"]]: n
|
|
67
64
|
});
|
|
68
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ i(
|
|
66
|
+
u,
|
|
67
|
+
{
|
|
68
|
+
ref: s,
|
|
69
|
+
className: d,
|
|
70
|
+
...x,
|
|
71
|
+
children: w
|
|
72
|
+
}
|
|
73
|
+
);
|
|
69
74
|
}
|
|
70
|
-
const
|
|
75
|
+
const j = f.forwardRef(T), _ = j;
|
|
71
76
|
_.Restricted = function({
|
|
72
77
|
children: s
|
|
73
78
|
}) {
|
|
74
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(v, { children: s }) });
|
|
75
80
|
};
|
|
76
81
|
export {
|
|
77
82
|
_ as Flex
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlexProps } from './Flex';
|
|
3
|
+
|
|
4
|
+
declare function FlexShowcase(props: FlexProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const _default: React.MemoExoticComponent<typeof FlexShowcase>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { Flex as s } from "./Flex.js";
|
|
4
|
+
import '../../../assets/FlexShowcase.css';const t = "_box_1118n_1", o = {
|
|
5
|
+
box: t
|
|
6
|
+
};
|
|
7
|
+
function r(a) {
|
|
8
|
+
return /* @__PURE__ */ e(s, { gap: "large", vertical: !0, children: /* @__PURE__ */ c(s, { ...a, children: [
|
|
9
|
+
/* @__PURE__ */ e("div", { className: o.box }),
|
|
10
|
+
/* @__PURE__ */ e("div", { className: o.box }),
|
|
11
|
+
/* @__PURE__ */ e("div", { className: o.box }),
|
|
12
|
+
/* @__PURE__ */ e("div", { className: o.box }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: o.box })
|
|
14
|
+
] }) });
|
|
15
|
+
}
|
|
16
|
+
const d = l.memo(r);
|
|
17
|
+
export {
|
|
18
|
+
d as default
|
|
19
|
+
};
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as u } from "../../../utils/clsx.js";
|
|
3
|
-
import '../../../assets/Pad.css';const i = "
|
|
3
|
+
import '../../../assets/Pad.css';const i = "_root_1aquh_1", o = {
|
|
4
4
|
root: i,
|
|
5
|
-
"offset-none": "_offset-
|
|
6
|
-
"offset-hairthin": "_offset-
|
|
7
|
-
"offset-thin": "_offset-
|
|
8
|
-
"offset-xxsmall": "_offset-
|
|
9
|
-
"offset-xsmall": "_offset-
|
|
10
|
-
"offset-small": "_offset-
|
|
11
|
-
"offset-normal": "_offset-
|
|
12
|
-
"offset-
|
|
13
|
-
"offset-
|
|
14
|
-
"offset-
|
|
15
|
-
"
|
|
16
|
-
"only-
|
|
17
|
-
"only-
|
|
18
|
-
"only-
|
|
5
|
+
"offset-none": "_offset-none_1aquh_1",
|
|
6
|
+
"offset-hairthin": "_offset-hairthin_1aquh_4",
|
|
7
|
+
"offset-thin": "_offset-thin_1aquh_7",
|
|
8
|
+
"offset-xxsmall": "_offset-xxsmall_1aquh_10",
|
|
9
|
+
"offset-xsmall": "_offset-xsmall_1aquh_13",
|
|
10
|
+
"offset-small": "_offset-small_1aquh_16",
|
|
11
|
+
"offset-normal": "_offset-normal_1aquh_19",
|
|
12
|
+
"offset-medium": "_offset-medium_1aquh_22",
|
|
13
|
+
"offset-large": "_offset-large_1aquh_25",
|
|
14
|
+
"offset-xlarge": "_offset-xlarge_1aquh_28",
|
|
15
|
+
"offset-safezone": "_offset-safezone_1aquh_31",
|
|
16
|
+
"only-top": "_only-top_1aquh_34",
|
|
17
|
+
"only-left": "_only-left_1aquh_37",
|
|
18
|
+
"only-right": "_only-right_1aquh_40",
|
|
19
|
+
"only-bottom": "_only-bottom_1aquh_43"
|
|
19
20
|
};
|
|
20
|
-
function
|
|
21
|
+
function x(l) {
|
|
21
22
|
const {
|
|
22
|
-
top:
|
|
23
|
-
left:
|
|
23
|
+
top: f = !1,
|
|
24
|
+
left: e = !1,
|
|
24
25
|
right: s = !1,
|
|
25
|
-
bottom:
|
|
26
|
-
size:
|
|
27
|
-
children:
|
|
28
|
-
className:
|
|
29
|
-
} =
|
|
30
|
-
[o["only-top"]]:
|
|
31
|
-
[o["only-left"]]:
|
|
32
|
-
[o["only-right"]]:
|
|
33
|
-
[o["only-bottom"]]:
|
|
26
|
+
bottom: _ = !1,
|
|
27
|
+
size: a = "normal",
|
|
28
|
+
children: n,
|
|
29
|
+
className: h
|
|
30
|
+
} = l, t = !(f || e || s || _), r = u(o.root, h, o[`offset-${a}`], {
|
|
31
|
+
[o["only-top"]]: t || f,
|
|
32
|
+
[o["only-left"]]: t || e,
|
|
33
|
+
[o["only-right"]]: t || s,
|
|
34
|
+
[o["only-bottom"]]: t || _
|
|
34
35
|
});
|
|
35
|
-
return /* @__PURE__ */ m("div", { className:
|
|
36
|
+
return /* @__PURE__ */ m("div", { className: r, children: n });
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
x as Pad
|
|
39
40
|
};
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as l } from "../../utils/clsx.js";
|
|
3
|
-
import '../../assets/Separator.css';const
|
|
4
|
-
root:
|
|
5
|
-
"separator-offset-none": "_separator-offset-
|
|
6
|
-
"separator-offset-hairthin": "_separator-offset-
|
|
7
|
-
"separator-offset-thin": "_separator-offset-
|
|
8
|
-
"separator-offset-xxsmall": "_separator-offset-
|
|
9
|
-
"separator-offset-xsmall": "_separator-offset-
|
|
10
|
-
"separator-offset-small": "_separator-offset-
|
|
11
|
-
"separator-offset-normal": "_separator-offset-
|
|
12
|
-
"separator-offset-
|
|
13
|
-
"separator-offset-
|
|
14
|
-
"separator-offset-
|
|
15
|
-
separator:
|
|
3
|
+
import '../../assets/Separator.css';const p = "_root_dsunb_1", i = "_separator_dsunb_4", c = "_content_dsunb_42", d = "_thin_dsunb_45", m = "_vertical_dsunb_51", u = "_text_dsunb_98", s = {
|
|
4
|
+
root: p,
|
|
5
|
+
"separator-offset-none": "_separator-offset-none_dsunb_4",
|
|
6
|
+
"separator-offset-hairthin": "_separator-offset-hairthin_dsunb_7",
|
|
7
|
+
"separator-offset-thin": "_separator-offset-thin_dsunb_10",
|
|
8
|
+
"separator-offset-xxsmall": "_separator-offset-xxsmall_dsunb_13",
|
|
9
|
+
"separator-offset-xsmall": "_separator-offset-xsmall_dsunb_16",
|
|
10
|
+
"separator-offset-small": "_separator-offset-small_dsunb_19",
|
|
11
|
+
"separator-offset-normal": "_separator-offset-normal_dsunb_22",
|
|
12
|
+
"separator-offset-medium": "_separator-offset-medium_dsunb_25",
|
|
13
|
+
"separator-offset-large": "_separator-offset-large_dsunb_28",
|
|
14
|
+
"separator-offset-xlarge": "_separator-offset-xlarge_dsunb_31",
|
|
15
|
+
"separator-offset-safezone": "_separator-offset-safezone_dsunb_34",
|
|
16
|
+
separator: i,
|
|
16
17
|
content: c,
|
|
17
|
-
thin:
|
|
18
|
-
vertical:
|
|
19
|
-
text:
|
|
18
|
+
thin: d,
|
|
19
|
+
vertical: m,
|
|
20
|
+
text: u
|
|
20
21
|
};
|
|
21
|
-
function
|
|
22
|
+
function h(o) {
|
|
22
23
|
const {
|
|
23
|
-
content:
|
|
24
|
+
content: a,
|
|
24
25
|
thin: r = !1,
|
|
25
|
-
vertical:
|
|
26
|
-
offset:
|
|
27
|
-
} =
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
26
|
+
vertical: n = !1,
|
|
27
|
+
offset: f = "none"
|
|
28
|
+
} = o, e = l(s.root, s[`separator-offset-${f}`], {
|
|
29
|
+
[s.text]: !!a,
|
|
30
|
+
[s.thin]: r,
|
|
31
|
+
[s.vertical]: n
|
|
31
32
|
});
|
|
32
|
-
return
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
] }) : /* @__PURE__ */
|
|
33
|
+
return a ? /* @__PURE__ */ _("div", { className: e, children: [
|
|
34
|
+
/* @__PURE__ */ t("div", { className: s.separator }),
|
|
35
|
+
/* @__PURE__ */ t("div", { className: s.content, children: a }),
|
|
36
|
+
/* @__PURE__ */ t("div", { className: s.separator })
|
|
37
|
+
] }) : /* @__PURE__ */ t("div", { className: e, children: /* @__PURE__ */ t("div", { className: s.separator }) });
|
|
37
38
|
}
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
h as Separator
|
|
40
41
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as l } from "../../utils/clsx.js";
|
|
3
|
-
import '../../assets/Spacer.css';const r = "
|
|
3
|
+
import '../../assets/Spacer.css';const r = "_root_x8a9c_1", z = "_horizontal_x8a9c_1", c = "_vertical_x8a9c_37", e = {
|
|
4
4
|
root: r,
|
|
5
|
-
horizontal:
|
|
6
|
-
"size-none": "_size-
|
|
7
|
-
"size-hairthin": "_size-
|
|
8
|
-
"size-thin": "_size-
|
|
9
|
-
"size-xxsmall": "_size-
|
|
10
|
-
"size-xsmall": "_size-
|
|
11
|
-
"size-small": "_size-
|
|
12
|
-
"size-normal": "_size-
|
|
13
|
-
"size-
|
|
14
|
-
"size-
|
|
15
|
-
"size-
|
|
5
|
+
horizontal: z,
|
|
6
|
+
"size-none": "_size-none_x8a9c_4",
|
|
7
|
+
"size-hairthin": "_size-hairthin_x8a9c_7",
|
|
8
|
+
"size-thin": "_size-thin_x8a9c_10",
|
|
9
|
+
"size-xxsmall": "_size-xxsmall_x8a9c_13",
|
|
10
|
+
"size-xsmall": "_size-xsmall_x8a9c_16",
|
|
11
|
+
"size-small": "_size-small_x8a9c_19",
|
|
12
|
+
"size-normal": "_size-normal_x8a9c_22",
|
|
13
|
+
"size-medium": "_size-medium_x8a9c_25",
|
|
14
|
+
"size-large": "_size-large_x8a9c_28",
|
|
15
|
+
"size-xlarge": "_size-xlarge_x8a9c_31",
|
|
16
|
+
"size-safezone": "_size-safezone_x8a9c_34",
|
|
16
17
|
vertical: c
|
|
17
18
|
};
|
|
18
|
-
function x(
|
|
19
|
+
function x(s) {
|
|
19
20
|
const {
|
|
20
|
-
size:
|
|
21
|
-
vertical:
|
|
22
|
-
} =
|
|
23
|
-
[
|
|
24
|
-
[
|
|
21
|
+
size: i = "normal",
|
|
22
|
+
vertical: a = !1
|
|
23
|
+
} = s, _ = l(e.root, e[`size-${i}`], {
|
|
24
|
+
[e.horizontal]: !a,
|
|
25
|
+
[e.vertical]: a
|
|
25
26
|
});
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ o("div", { className: _ });
|
|
27
28
|
}
|
|
28
29
|
export {
|
|
29
30
|
x as Spacer
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export interface TableHeaderType {
|
|
4
|
+
text: string;
|
|
5
|
+
sortable?: boolean;
|
|
6
|
+
sortKey?: string;
|
|
7
|
+
}
|
|
8
|
+
export type TableRowType = Array<string | number | Date | React.ReactNode>;
|
|
9
|
+
export type DataContainerType = React.FC<{
|
|
10
|
+
item: string | number | Date | React.ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
interface TableHeaderItemProps {
|
|
13
|
+
item: TableHeaderType;
|
|
14
|
+
onSortClick?: (sortKey: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function TableHeaderItem(props: TableHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface TableProps {
|
|
18
|
+
headers: TableHeaderType[];
|
|
19
|
+
data: TableRowType[];
|
|
6
20
|
includeRadio?: boolean;
|
|
7
|
-
onSelectChange?: (rowIndex: number) => void;
|
|
8
|
-
dataContainer?:
|
|
9
|
-
|
|
10
|
-
}> | undefined;
|
|
11
|
-
useSort?: boolean;
|
|
21
|
+
onSelectChange?: (rowIndex: number | null) => void;
|
|
22
|
+
dataContainer?: DataContainerType;
|
|
23
|
+
selectedRow?: number | null;
|
|
12
24
|
sortBy?: string;
|
|
13
25
|
sortOrder?: 'asc' | 'desc';
|
|
14
26
|
onSortChange?: (sortBy: string, sortOrder: 'asc' | 'desc') => void;
|
|
15
27
|
}
|
|
16
|
-
export declare function Table({ headers, data, includeRadio, onSelectChange, dataContainer,
|
|
28
|
+
export declare function Table({ headers, data, includeRadio, onSelectChange, dataContainer, selectedRow: outerSelectedRow, sortBy: outerSortBy, sortOrder: outerSortOrder, onSortChange, }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
29
|
export {};
|