@cfx-dev/ui-components 4.2.24 → 4.3.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/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +6 -4
- package/dist/main.js +66 -65
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import
|
|
3
|
+
import a from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as t } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Slider as l } from "./Slider.js";
|
|
@@ -1,186 +1,140 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { P } from "../../
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return function(c) {
|
|
10
|
-
if (t == null || t(c), e === !1 || !c.defaultPrevented)
|
|
11
|
-
return o == null ? void 0 : o(c);
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function E(t, o) {
|
|
15
|
-
typeof t == "function" ? t(o) : t != null && (t.current = o);
|
|
16
|
-
}
|
|
17
|
-
function O(...t) {
|
|
18
|
-
return (o) => t.forEach((e) => E(e, o));
|
|
19
|
-
}
|
|
20
|
-
function q(...t) {
|
|
21
|
-
return u.useCallback(O(...t), t);
|
|
22
|
-
}
|
|
23
|
-
function z(t, o = []) {
|
|
24
|
-
let e = [];
|
|
25
|
-
function r(h, n) {
|
|
26
|
-
const s = u.createContext(n), i = e.length;
|
|
27
|
-
e = [...e, n];
|
|
28
|
-
function f(a) {
|
|
29
|
-
const { scope: p, children: b, ...d } = a, S = (p == null ? void 0 : p[t][i]) || s, m = u.useMemo(() => d, Object.values(d));
|
|
30
|
-
return /* @__PURE__ */ l(S.Provider, { value: m, children: b });
|
|
31
|
-
}
|
|
32
|
-
function w(a, p) {
|
|
33
|
-
const b = (p == null ? void 0 : p[t][i]) || s, d = u.useContext(b);
|
|
34
|
-
if (d) return d;
|
|
35
|
-
if (n !== void 0) return n;
|
|
36
|
-
throw new Error(`\`${a}\` must be used within \`${h}\``);
|
|
37
|
-
}
|
|
38
|
-
return f.displayName = h + "Provider", [f, w];
|
|
39
|
-
}
|
|
40
|
-
const c = () => {
|
|
41
|
-
const h = e.map((n) => u.createContext(n));
|
|
42
|
-
return function(s) {
|
|
43
|
-
const i = (s == null ? void 0 : s[t]) || h;
|
|
44
|
-
return u.useMemo(
|
|
45
|
-
() => ({ [`__scope${t}`]: { ...s, [t]: i } }),
|
|
46
|
-
[s, i]
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
return c.scopeName = t, [r, A(c, ...o)];
|
|
51
|
-
}
|
|
52
|
-
function A(...t) {
|
|
53
|
-
const o = t[0];
|
|
54
|
-
if (t.length === 1) return o;
|
|
55
|
-
const e = () => {
|
|
56
|
-
const r = t.map((c) => ({
|
|
57
|
-
useScope: c(),
|
|
58
|
-
scopeName: c.scopeName
|
|
59
|
-
}));
|
|
60
|
-
return function(h) {
|
|
61
|
-
const n = r.reduce((s, { useScope: i, scopeName: f }) => {
|
|
62
|
-
const a = i(h)[`__scope${f}`];
|
|
63
|
-
return { ...s, ...a };
|
|
64
|
-
}, {});
|
|
65
|
-
return u.useMemo(() => ({ [`__scope${o.scopeName}`]: n }), [n]);
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
return e.scopeName = o.scopeName, e;
|
|
69
|
-
}
|
|
70
|
-
var x = "Switch", [D, ct] = z(x), [F, L] = D(x), v = u.forwardRef(
|
|
71
|
-
(t, o) => {
|
|
1
|
+
import { jsxs as I, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import M from "react";
|
|
4
|
+
import { u as k, d as H, c as j, P as x, e as A, f as q } from "../../index-BHuChyf5.js";
|
|
5
|
+
import { u as z } from "../../index-BZPx6jYI.js";
|
|
6
|
+
import { clsx as P } from "../../utils/clsx.js";
|
|
7
|
+
var m = "Switch", [L, et] = j(m), [O, $] = L(m), y = r.forwardRef(
|
|
8
|
+
(e, s) => {
|
|
72
9
|
const {
|
|
73
|
-
__scopeSwitch:
|
|
74
|
-
name:
|
|
10
|
+
__scopeSwitch: t,
|
|
11
|
+
name: o,
|
|
75
12
|
checked: c,
|
|
76
|
-
defaultChecked:
|
|
77
|
-
required:
|
|
78
|
-
disabled:
|
|
79
|
-
value:
|
|
80
|
-
onCheckedChange:
|
|
81
|
-
|
|
82
|
-
|
|
13
|
+
defaultChecked: w,
|
|
14
|
+
required: u,
|
|
15
|
+
disabled: a,
|
|
16
|
+
value: h = "on",
|
|
17
|
+
onCheckedChange: _,
|
|
18
|
+
form: n,
|
|
19
|
+
...S
|
|
20
|
+
} = e, [d, l] = r.useState(null), b = k(s, (f) => l(f)), v = r.useRef(!1), R = d ? n || !!d.closest("form") : !0, [p, B] = H({
|
|
83
21
|
prop: c,
|
|
84
|
-
defaultProp:
|
|
85
|
-
onChange:
|
|
22
|
+
defaultProp: w ?? !1,
|
|
23
|
+
onChange: _,
|
|
24
|
+
caller: m
|
|
86
25
|
});
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
26
|
+
return /* @__PURE__ */ I(O, { scope: t, checked: p, disabled: a, children: [
|
|
27
|
+
/* @__PURE__ */ i(
|
|
28
|
+
x.button,
|
|
90
29
|
{
|
|
91
30
|
type: "button",
|
|
92
31
|
role: "switch",
|
|
93
|
-
"aria-checked":
|
|
94
|
-
"aria-required":
|
|
95
|
-
"data-state":
|
|
96
|
-
"data-disabled":
|
|
97
|
-
disabled:
|
|
98
|
-
value:
|
|
99
|
-
...
|
|
32
|
+
"aria-checked": p,
|
|
33
|
+
"aria-required": u,
|
|
34
|
+
"data-state": g(p),
|
|
35
|
+
"data-disabled": a ? "" : void 0,
|
|
36
|
+
disabled: a,
|
|
37
|
+
value: h,
|
|
38
|
+
...S,
|
|
100
39
|
ref: b,
|
|
101
|
-
onClick:
|
|
102
|
-
|
|
40
|
+
onClick: A(e.onClick, (f) => {
|
|
41
|
+
B((U) => !U), R && (v.current = f.isPropagationStopped(), v.current || f.stopPropagation());
|
|
103
42
|
})
|
|
104
43
|
}
|
|
105
44
|
),
|
|
106
|
-
|
|
107
|
-
|
|
45
|
+
R && /* @__PURE__ */ i(
|
|
46
|
+
E,
|
|
108
47
|
{
|
|
109
|
-
control:
|
|
110
|
-
bubbles: !
|
|
111
|
-
name:
|
|
112
|
-
value:
|
|
113
|
-
checked:
|
|
114
|
-
required:
|
|
115
|
-
disabled:
|
|
48
|
+
control: d,
|
|
49
|
+
bubbles: !v.current,
|
|
50
|
+
name: o,
|
|
51
|
+
value: h,
|
|
52
|
+
checked: p,
|
|
53
|
+
required: u,
|
|
54
|
+
disabled: a,
|
|
55
|
+
form: n,
|
|
116
56
|
style: { transform: "translateX(-100%)" }
|
|
117
57
|
}
|
|
118
58
|
)
|
|
119
59
|
] });
|
|
120
60
|
}
|
|
121
61
|
);
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
(
|
|
125
|
-
const { __scopeSwitch:
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
|
|
62
|
+
y.displayName = m;
|
|
63
|
+
var T = "SwitchThumb", N = r.forwardRef(
|
|
64
|
+
(e, s) => {
|
|
65
|
+
const { __scopeSwitch: t, ...o } = e, c = $(T, t);
|
|
66
|
+
return /* @__PURE__ */ i(
|
|
67
|
+
x.span,
|
|
128
68
|
{
|
|
129
|
-
"data-state":
|
|
69
|
+
"data-state": g(c.checked),
|
|
130
70
|
"data-disabled": c.disabled ? "" : void 0,
|
|
131
|
-
...
|
|
132
|
-
ref:
|
|
71
|
+
...o,
|
|
72
|
+
ref: s
|
|
133
73
|
}
|
|
134
74
|
);
|
|
135
75
|
}
|
|
136
76
|
);
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
...s,
|
|
158
|
-
position: "absolute",
|
|
159
|
-
pointerEvents: "none",
|
|
160
|
-
opacity: 0,
|
|
161
|
-
margin: 0
|
|
77
|
+
N.displayName = T;
|
|
78
|
+
var D = "SwitchBubbleInput", E = r.forwardRef(
|
|
79
|
+
({
|
|
80
|
+
__scopeSwitch: e,
|
|
81
|
+
control: s,
|
|
82
|
+
checked: t,
|
|
83
|
+
bubbles: o = !0,
|
|
84
|
+
...c
|
|
85
|
+
}, w) => {
|
|
86
|
+
const u = r.useRef(null), a = k(u, w), h = z(t), _ = q(s);
|
|
87
|
+
return r.useEffect(() => {
|
|
88
|
+
const n = u.current;
|
|
89
|
+
if (!n) return;
|
|
90
|
+
const S = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(
|
|
91
|
+
S,
|
|
92
|
+
"checked"
|
|
93
|
+
).set;
|
|
94
|
+
if (h !== t && l) {
|
|
95
|
+
const b = new Event("click", { bubbles: o });
|
|
96
|
+
l.call(n, t), n.dispatchEvent(b);
|
|
162
97
|
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
98
|
+
}, [h, t, o]), /* @__PURE__ */ i(
|
|
99
|
+
"input",
|
|
100
|
+
{
|
|
101
|
+
type: "checkbox",
|
|
102
|
+
"aria-hidden": !0,
|
|
103
|
+
defaultChecked: t,
|
|
104
|
+
...c,
|
|
105
|
+
tabIndex: -1,
|
|
106
|
+
ref: a,
|
|
107
|
+
style: {
|
|
108
|
+
...c.style,
|
|
109
|
+
..._,
|
|
110
|
+
position: "absolute",
|
|
111
|
+
pointerEvents: "none",
|
|
112
|
+
opacity: 0,
|
|
113
|
+
margin: 0
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
E.displayName = D;
|
|
120
|
+
function g(e) {
|
|
121
|
+
return e ? "checked" : "unchecked";
|
|
168
122
|
}
|
|
169
|
-
var
|
|
170
|
-
const
|
|
171
|
-
switchUnset:
|
|
172
|
-
switchRoot:
|
|
173
|
-
switchThumb:
|
|
123
|
+
var F = y, W = N;
|
|
124
|
+
const X = "cfxui__Switch__switchUnset__c8b03", G = "cfxui__Switch__switchRoot__f2911", J = "cfxui__Switch__switchThumb__9cbf5", C = {
|
|
125
|
+
switchUnset: X,
|
|
126
|
+
switchRoot: G,
|
|
127
|
+
switchThumb: J
|
|
174
128
|
};
|
|
175
|
-
function
|
|
129
|
+
function K(e) {
|
|
176
130
|
const {
|
|
177
|
-
classNameRoot:
|
|
178
|
-
classNameThumb:
|
|
179
|
-
...
|
|
180
|
-
} =
|
|
181
|
-
return /* @__PURE__ */
|
|
131
|
+
classNameRoot: s,
|
|
132
|
+
classNameThumb: t,
|
|
133
|
+
...o
|
|
134
|
+
} = e;
|
|
135
|
+
return /* @__PURE__ */ i(F, { ...o, className: P(C.switchRoot, C.switchUnset, s), children: /* @__PURE__ */ i(W, { className: P(C.switchThumb, t) }) });
|
|
182
136
|
}
|
|
183
|
-
const
|
|
137
|
+
const ot = M.memo(K);
|
|
184
138
|
export {
|
|
185
|
-
|
|
139
|
+
ot as default
|
|
186
140
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TableBodyProps extends React.PropsWithChildren {
|
|
4
|
+
className?: string;
|
|
5
|
+
ref?: React.Ref<HTMLTableSectionElement>;
|
|
6
|
+
}
|
|
7
|
+
declare function TableBody(props: TableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TableBody;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as a } from "../../utils/clsx.js";
|
|
3
|
+
import { s as l } from "../../Table.module-DHI1mXN2.js";
|
|
4
|
+
function d(o) {
|
|
5
|
+
const {
|
|
6
|
+
className: s,
|
|
7
|
+
children: r,
|
|
8
|
+
ref: t
|
|
9
|
+
} = o;
|
|
10
|
+
return /* @__PURE__ */ e("tbody", { ref: t, className: a(l.tableBody, s), children: r });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
d as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlexProps } from '../Layout/Flex';
|
|
3
|
+
|
|
4
|
+
export interface TableCellProps extends React.PropsWithChildren, FlexProps {
|
|
5
|
+
onClick?: (event: React.MouseEvent<HTMLTableCellElement>) => void;
|
|
6
|
+
as?: 'td' | 'th';
|
|
7
|
+
className?: string;
|
|
8
|
+
ref?: React.Ref<HTMLTableCellElement>;
|
|
9
|
+
}
|
|
10
|
+
declare function TableCell(props: TableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default TableCell;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { stringPropFormater as c } from "../Layout/Box/Box.js";
|
|
3
|
+
import h from "../Layout/Flex/Flex.js";
|
|
4
|
+
import { clsx as y } from "../../utils/clsx.js";
|
|
5
|
+
import { ui as t } from "../../utils/ui/ui.js";
|
|
6
|
+
import { s } from "../../Table.module-DHI1mXN2.js";
|
|
7
|
+
function R(p) {
|
|
8
|
+
const {
|
|
9
|
+
onClick: i,
|
|
10
|
+
className: m,
|
|
11
|
+
children: d,
|
|
12
|
+
ref: f,
|
|
13
|
+
width: o,
|
|
14
|
+
display: r,
|
|
15
|
+
as: l = "td",
|
|
16
|
+
...e
|
|
17
|
+
} = p, n = l === "th";
|
|
18
|
+
return typeof e.px > "u" && (e.px = 4), typeof e.py > "u" && (e.py = l === "th" ? void 0 : 1.5), /* @__PURE__ */ a(
|
|
19
|
+
l,
|
|
20
|
+
{
|
|
21
|
+
ref: f,
|
|
22
|
+
tabIndex: -1,
|
|
23
|
+
role: n ? "columnheader" : "cell",
|
|
24
|
+
onClick: i,
|
|
25
|
+
className: y(
|
|
26
|
+
s.tableCell,
|
|
27
|
+
m,
|
|
28
|
+
t.getResponsiveClassnames("width", o),
|
|
29
|
+
t.getResponsiveClassnames("display", r),
|
|
30
|
+
{
|
|
31
|
+
[s.header]: n,
|
|
32
|
+
[s.interactive]: !!i
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
style: {
|
|
36
|
+
...t.getResponsiveStyles("width", o),
|
|
37
|
+
...t.getResponsiveStyles("display", r, c)
|
|
38
|
+
},
|
|
39
|
+
children: /* @__PURE__ */ a(
|
|
40
|
+
h,
|
|
41
|
+
{
|
|
42
|
+
height: "100%",
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
className: s.tableCellContent,
|
|
45
|
+
...e,
|
|
46
|
+
children: d
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
R as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TableCellProps } from './TableCell';
|
|
3
|
+
|
|
4
|
+
export interface TableCellCheckboxProps extends TableCellProps {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
isPlaceholder?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function TableCellCheckbox(props: TableCellCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const _default: React.MemoExoticComponent<typeof TableCellCheckbox>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import c from "../Checkbox/Checkbox.js";
|
|
4
|
+
import { clsx as i } from "../../utils/clsx.js";
|
|
5
|
+
import f from "./TableCell.js";
|
|
6
|
+
import { s as p } from "../../Table.module-DHI1mXN2.js";
|
|
7
|
+
function b(l) {
|
|
8
|
+
const {
|
|
9
|
+
checked: o = !1,
|
|
10
|
+
isPlaceholder: s,
|
|
11
|
+
disabled: r = !1,
|
|
12
|
+
className: a,
|
|
13
|
+
...t
|
|
14
|
+
} = l;
|
|
15
|
+
return /* @__PURE__ */ e(f, { width: 2, px: 0, pl: 4, className: i(p.tableCellCheckbox, a), ...t, children: !s && /* @__PURE__ */ e(c, { disabled: r, size: "small", checked: o }) });
|
|
16
|
+
}
|
|
17
|
+
const u = m.memo(b);
|
|
18
|
+
export {
|
|
19
|
+
u as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TableHeaderProps extends React.PropsWithChildren {
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
ref?: React.Ref<HTMLTableSectionElement>;
|
|
7
|
+
}
|
|
8
|
+
declare function TableHeader(props: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default TableHeader;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as c } from "../../utils/clsx.js";
|
|
3
|
+
import { s as e } from "../../Table.module-DHI1mXN2.js";
|
|
4
|
+
function d(s) {
|
|
5
|
+
const {
|
|
6
|
+
sticky: a = !1,
|
|
7
|
+
className: r,
|
|
8
|
+
children: t,
|
|
9
|
+
ref: l
|
|
10
|
+
} = s;
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
12
|
+
"thead",
|
|
13
|
+
{
|
|
14
|
+
ref: l,
|
|
15
|
+
className: c(e.tableHeader, r, {
|
|
16
|
+
[e.sticky]: a
|
|
17
|
+
}),
|
|
18
|
+
children: t
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
d as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconButtonProps } from '../IconButton';
|
|
3
|
+
|
|
4
|
+
declare function TableIconButton(props: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const _default: React.MemoExoticComponent<typeof TableIconButton>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import e from "../IconButton/IconButton.js";
|
|
4
|
+
import { clsx as r } from "../../utils/clsx.js";
|
|
5
|
+
import { s as t } from "../../Table.module-DHI1mXN2.js";
|
|
6
|
+
function l(o) {
|
|
7
|
+
const {
|
|
8
|
+
className: n,
|
|
9
|
+
color: s = "inherit"
|
|
10
|
+
} = o, c = r(t.tableIcon, t.iconButton, n);
|
|
11
|
+
return /* @__PURE__ */ m(e, { ...o, className: c, color: s });
|
|
12
|
+
}
|
|
13
|
+
const I = a.memo(l);
|
|
14
|
+
export {
|
|
15
|
+
I as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TableRootProps extends React.PropsWithChildren {
|
|
4
|
+
className?: string;
|
|
5
|
+
ref?: React.Ref<HTMLTableElement>;
|
|
6
|
+
}
|
|
7
|
+
declare function TableRoot(props: TableRootProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TableRoot;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as s } from "../../utils/clsx.js";
|
|
3
|
+
import { s as l } from "../../Table.module-DHI1mXN2.js";
|
|
4
|
+
function f(r) {
|
|
5
|
+
const {
|
|
6
|
+
className: o,
|
|
7
|
+
children: e,
|
|
8
|
+
ref: t
|
|
9
|
+
} = r;
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
"table",
|
|
12
|
+
{
|
|
13
|
+
"aria-readonly": "true",
|
|
14
|
+
role: "grid",
|
|
15
|
+
ref: t,
|
|
16
|
+
className: s(l.tableRoot, o),
|
|
17
|
+
children: e
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
f as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColorType } from '../../utils/ui';
|
|
3
|
+
|
|
4
|
+
export interface TableRowProps extends React.PropsWithChildren {
|
|
5
|
+
size?: 'small' | 'normal' | 'large';
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
color?: ColorType;
|
|
8
|
+
onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
ref?: React.Ref<HTMLTableRowElement>;
|
|
11
|
+
}
|
|
12
|
+
declare function TableRow(props: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default TableRow;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as d } from "../../utils/clsx.js";
|
|
3
|
+
import { getColor as r } from "../../utils/color.js";
|
|
4
|
+
import { s as o } from "../../Table.module-DHI1mXN2.js";
|
|
5
|
+
function u(l) {
|
|
6
|
+
const {
|
|
7
|
+
size: s = "normal",
|
|
8
|
+
selected: a,
|
|
9
|
+
color: t,
|
|
10
|
+
onClick: c,
|
|
11
|
+
className: i,
|
|
12
|
+
children: n,
|
|
13
|
+
ref: m
|
|
14
|
+
} = l, b = t ? 0.2 : 0, e = t || "secondary";
|
|
15
|
+
return /* @__PURE__ */ p(
|
|
16
|
+
"tr",
|
|
17
|
+
{
|
|
18
|
+
tabIndex: -1,
|
|
19
|
+
role: "row",
|
|
20
|
+
ref: m,
|
|
21
|
+
onClick: c,
|
|
22
|
+
className: d(o.tableRow, o[s], i, {
|
|
23
|
+
[o.interactive]: !!c,
|
|
24
|
+
[o.selected]: !!a
|
|
25
|
+
}),
|
|
26
|
+
style: {
|
|
27
|
+
"--base-bg-color": r({
|
|
28
|
+
color: e,
|
|
29
|
+
opacity: b
|
|
30
|
+
}),
|
|
31
|
+
"--hover-bg-color": r({
|
|
32
|
+
color: e,
|
|
33
|
+
opacity: 0.3
|
|
34
|
+
}),
|
|
35
|
+
"--selected-bg-color": r({
|
|
36
|
+
color: e,
|
|
37
|
+
opacity: 0.4
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
children: n
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
u as default
|
|
46
|
+
};
|