@code0-tech/pictor 0.6.0 → 0.6.2
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/LICENSE +1 -1
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/gantt/Gantt.style.css +1 -0
- package/dist/assets/components/layout/Layout.style.css +1 -1
- package/dist/components/alert/Alert.d.ts +2 -2
- package/dist/components/alert/Alert.js +8 -7
- package/dist/components/avatar/Avatar.d.ts +2 -2
- package/dist/components/avatar/Avatar.js +30 -27
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +26 -23
- package/dist/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -14
- package/dist/components/button/Button.d.ts +3 -3
- package/dist/components/button/Button.js +13 -12
- package/dist/components/button-group/ButtonGroup.d.ts +2 -2
- package/dist/components/button-group/ButtonGroup.js +23 -20
- package/dist/components/card/Card.d.ts +3 -3
- package/dist/components/card/Card.js +19 -16
- package/dist/components/card/CardSection.d.ts +2 -2
- package/dist/components/card/CardSection.js +16 -13
- package/dist/components/col/Col.d.ts +2 -2
- package/dist/components/col/Col.js +22 -19
- package/dist/components/command/Command.d.ts +12 -12
- package/dist/components/command/Command.js +95 -82
- package/dist/components/container/Container.d.ts +2 -2
- package/dist/components/container/Container.js +13 -10
- package/dist/components/context-menu/ContextMenu.d.ts +13 -13
- package/dist/components/context-menu/ContextMenu.js +26 -25
- package/dist/components/data-table/DataTable.d.ts +2 -2
- package/dist/components/data-table/DataTable.js +18 -17
- package/dist/components/data-table/DataTableColumn.d.ts +2 -2
- package/dist/components/data-table/DataTableColumn.js +12 -11
- package/dist/components/data-table/DataTableFilterInput.js +4 -3
- package/dist/components/dialog/Dialog.d.ts +12 -12
- package/dist/components/dialog/Dialog.js +24 -23
- package/dist/components/editor/Editor.d.ts +2 -2
- package/dist/components/editor/Editor.js +4 -3
- package/dist/components/file-tabs/FileTabs.d.ts +5 -5
- package/dist/components/file-tabs/FileTabs.js +38 -35
- package/dist/components/flex/Flex.d.ts +2 -2
- package/dist/components/flex/Flex.js +16 -13
- package/dist/components/form/CheckboxInput.js +17 -15
- package/dist/components/form/Input.d.ts +3 -3
- package/dist/components/form/Input.js +4 -3
- package/dist/components/form/PinInput.d.ts +3 -3
- package/dist/components/form/PinInput.js +33 -30
- package/dist/components/form/RadioGroup.js +22 -19
- package/dist/components/form/RadioInput.d.ts +2 -2
- package/dist/components/form/RadioInput.js +19 -16
- package/dist/components/fullscreen/FullScreen.d.ts +2 -2
- package/dist/components/fullscreen/FullScreen.js +8 -6
- package/dist/components/gantt/Gantt.d.ts +12 -0
- package/dist/components/gantt/Gantt.js +92 -0
- package/dist/components/gantt/GanttFooter.d.ts +2 -0
- package/dist/components/gantt/GanttFooter.js +38 -0
- package/dist/components/gantt/GanttGroup.d.ts +8 -0
- package/dist/components/gantt/GanttGroup.js +134 -0
- package/dist/components/gantt/GanttHeader.d.ts +10 -0
- package/dist/components/gantt/GanttHeader.js +55 -0
- package/dist/components/gantt/GanttItem.d.ts +16 -0
- package/dist/components/gantt/GanttItem.js +23 -0
- package/dist/components/layout/Layout.d.ts +3 -3
- package/dist/components/layout/Layout.js +37 -33
- package/dist/components/menu/Menu.d.ts +15 -15
- package/dist/components/menu/Menu.js +35 -32
- package/dist/components/resizable/Resizable.d.ts +4 -4
- package/dist/components/resizable/Resizable.js +18 -17
- package/dist/components/row/Row.d.ts +2 -2
- package/dist/components/row/Row.js +15 -12
- package/dist/components/scroll-area/ScrollArea.d.ts +6 -6
- package/dist/components/scroll-area/ScrollArea.js +35 -32
- package/dist/components/segmented-control/SegmentedControl.d.ts +3 -3
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +3 -3
- package/dist/components/spacing/Spacing.js +12 -11
- package/dist/components/tab/Tab.d.ts +5 -5
- package/dist/components/tab/Tab.js +22 -21
- package/dist/components/text/Text.d.ts +3 -3
- package/dist/components/text/Text.js +14 -11
- package/dist/components/toast/Toast.d.ts +2 -2
- package/dist/components/toast/Toast.js +32 -31
- package/dist/components/tooltip/Tooltip.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.js +34 -31
- package/dist/index.d.ts +1 -0
- package/dist/index.js +151 -152
- package/dist/utils/color.d.ts +4 -0
- package/dist/utils/color.js +43 -0
- package/dist/utils/component.d.ts +105 -0
- package/dist/utils/component.js +130 -0
- package/dist/utils/index.d.ts +3 -4
- package/dist/utils/index.js +14 -18
- package/dist/utils/size.d.ts +4 -0
- package/dist/utils/size.js +21 -0
- package/dist/utils/utils.d.ts +0 -55
- package/dist/utils/utils.js +1 -159
- package/package.json +3 -3
- package/dist/utils/nonReactiveArrayService.d.ts +0 -19
- package/dist/utils/nonReactiveArrayService.js +0 -54
- package/dist/utils/objectStore.d.ts +0 -12
- package/dist/utils/objectStore.js +0 -34
- package/dist/utils/types.d.ts +0 -57
- package/dist/utils/types.js +0 -4
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import '../../assets/components/col/Col.style.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeComponentProps as g } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
8
|
+
const P = (r) => {
|
|
9
|
+
const o = f.c(6);
|
|
10
|
+
let l, t;
|
|
11
|
+
if (o[0] !== r) {
|
|
9
12
|
const {
|
|
10
13
|
children: n,
|
|
11
|
-
xs:
|
|
12
|
-
sm:
|
|
13
|
-
md:
|
|
14
|
-
lg:
|
|
15
|
-
xl:
|
|
14
|
+
xs: e,
|
|
15
|
+
sm: c,
|
|
16
|
+
md: i,
|
|
17
|
+
lg: $,
|
|
18
|
+
xl: s,
|
|
16
19
|
xxl: x,
|
|
17
|
-
...
|
|
18
|
-
} =
|
|
19
|
-
|
|
20
|
+
...p
|
|
21
|
+
} = r;
|
|
22
|
+
l = n, t = g(`col ${e ? `col-xs-${e}` : ""} ${c ? `col-sm-${c}` : ""} ${i ? `col-md-${i}` : ""} ${$ ? `col-lg-${$}` : ""} ${s ? `col-lg-${s}` : ""} ${x ? `col-xxl-${x}` : ""}`, p), o[0] = r, o[1] = l, o[2] = t;
|
|
20
23
|
} else
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
return
|
|
24
|
+
l = o[1], t = o[2];
|
|
25
|
+
let m;
|
|
26
|
+
return o[3] !== l || o[4] !== t ? (m = /* @__PURE__ */ d("div", { ...t, children: l }), o[3] = l, o[4] = t, o[5] = m) : m = o[5], m;
|
|
24
27
|
};
|
|
25
28
|
export {
|
|
26
|
-
|
|
29
|
+
P as Col
|
|
27
30
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentProps } from '../../utils';
|
|
4
4
|
import { Dialog, DialogContent } from '../dialog/Dialog';
|
|
5
5
|
import { Badge } from '../badge/Badge';
|
|
6
|
-
import { TextInputProps } from '../form
|
|
7
|
-
export type CommandProps =
|
|
6
|
+
import { TextInputProps } from '../form';
|
|
7
|
+
export type CommandProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive>;
|
|
8
8
|
export type CommandDialogProps = {
|
|
9
|
-
dialogProps?:
|
|
10
|
-
contentProps?:
|
|
9
|
+
dialogProps?: ComponentProps & React.ComponentProps<typeof Dialog>;
|
|
10
|
+
contentProps?: ComponentProps & React.ComponentProps<typeof DialogContent>;
|
|
11
11
|
open?: boolean;
|
|
12
12
|
onOpenChange?: () => void;
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export type CommandListProps =
|
|
16
|
-
export type CommandInputProps =
|
|
17
|
-
export type CommandEmptyProps =
|
|
18
|
-
export type CommandGroupProps =
|
|
19
|
-
export type CommandItemProps =
|
|
20
|
-
export type CommandSeparatorProps =
|
|
21
|
-
export type CommandShortcutProps =
|
|
15
|
+
export type CommandListProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive.List>;
|
|
16
|
+
export type CommandInputProps = TextInputProps;
|
|
17
|
+
export type CommandEmptyProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive.Empty>;
|
|
18
|
+
export type CommandGroupProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive.Group>;
|
|
19
|
+
export type CommandItemProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive.Item>;
|
|
20
|
+
export type CommandSeparatorProps = ComponentProps & React.ComponentProps<typeof CommandPrimitive.Separator>;
|
|
21
|
+
export type CommandShortcutProps = ComponentProps & React.ComponentProps<typeof Badge>;
|
|
22
22
|
export declare const Command: React.FC<CommandProps>;
|
|
23
23
|
export declare const CommandDialog: React.FC<CommandDialogProps>;
|
|
24
24
|
export declare const CommandList: React.FC<CommandListProps>;
|
|
@@ -1,103 +1,116 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
3
|
-
import { Command as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { Command as a } from "cmdk";
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeComponentProps as r } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
8
|
+
import { DialogContent as u, Dialog as h, DialogOverlay as C } from "../dialog/Dialog.js";
|
|
9
|
+
import '../../assets/components/form/Input.style.css';import '../../assets/components/command/Command.style.css';/* empty css */
|
|
10
|
+
import { Badge as g } from "../badge/Badge.js";
|
|
11
|
+
import "@radix-ui/react-checkbox";
|
|
12
|
+
import "@tabler/icons-react";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "../form/EmailInput.js";
|
|
15
|
+
import "../form/Input.js";
|
|
16
|
+
import "../form/InputSuggestion.js";
|
|
17
|
+
import "../form/NumberInput.js";
|
|
18
|
+
import "../form/PasswordInput.js";
|
|
19
|
+
import "@radix-ui/react-one-time-password-field";
|
|
20
|
+
import "@radix-ui/react-radio-group";
|
|
21
|
+
import "../form/SwitchInput.js";
|
|
22
|
+
import "../form/TextAreaInput.js";
|
|
23
|
+
import { TextInput as _ } from "../form/TextInput.js";
|
|
24
|
+
const $ = (e) => {
|
|
25
|
+
const t = c.c(4);
|
|
26
|
+
let m;
|
|
27
|
+
t[0] !== e ? (m = r("command", e), t[0] = e, t[1] = m) : m = t[1];
|
|
28
|
+
const o = m;
|
|
11
29
|
let n;
|
|
12
|
-
t[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
t[0] !== e.contentProps ? (c = e.contentProps ?? {}, t[0] = e.contentProps, t[1] = c) : c = t[1];
|
|
20
|
-
let i;
|
|
21
|
-
t[2] !== c ? (i = d("command__dialog", c), t[2] = c, t[3] = i) : i = t[3];
|
|
22
|
-
const u = i;
|
|
23
|
-
let f;
|
|
24
|
-
t[4] !== e ? (f = /* @__PURE__ */ m(P, { ...e, children: e.children }), t[4] = e, t[5] = f) : f = t[5];
|
|
25
|
-
let r;
|
|
26
|
-
t[6] !== u || t[7] !== f ? (r = /* @__PURE__ */ m(g, { ...u, children: f }), t[6] = u, t[7] = f, t[8] = r) : r = t[8];
|
|
27
|
-
let C;
|
|
28
|
-
return t[9] !== e.dialogProps || t[10] !== e.onOpenChange || t[11] !== e.open || t[12] !== r ? (C = /* @__PURE__ */ m(h, { ...n, open: o, onOpenChange: l, children: r }), t[9] = e.dialogProps, t[10] = e.onOpenChange, t[11] = e.open, t[12] = r, t[13] = C) : C = t[13], C;
|
|
29
|
-
}, L = (e) => {
|
|
30
|
-
const t = a.c(4);
|
|
30
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
31
|
+
}, F = (e) => {
|
|
32
|
+
const t = c.c(11);
|
|
33
|
+
let m;
|
|
34
|
+
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ l(C, {}), t[0] = m) : m = t[0];
|
|
35
|
+
let o;
|
|
36
|
+
t[1] !== e ? (o = /* @__PURE__ */ l($, { ...e, h: "100%", children: e.children }), t[1] = e, t[2] = o) : o = t[2];
|
|
31
37
|
let n;
|
|
32
|
-
t[
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
t[3] !== e.contentProps || t[4] !== o ? (n = /* @__PURE__ */ l(u, { className: "command__dialog", ...e.contentProps, children: o }), t[3] = e.contentProps, t[4] = o, t[5] = n) : n = t[5];
|
|
39
|
+
let i;
|
|
40
|
+
return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !== n ? (i = /* @__PURE__ */ s(h, { ...e.dialogProps, open: e.open, onOpenChange: e.onOpenChange, children: [
|
|
41
|
+
m,
|
|
42
|
+
n
|
|
43
|
+
] }), t[6] = e.dialogProps, t[7] = e.onOpenChange, t[8] = e.open, t[9] = n, t[10] = i) : i = t[10], i;
|
|
44
|
+
}, H = (e) => {
|
|
45
|
+
const t = c.c(4);
|
|
46
|
+
let m;
|
|
47
|
+
t[0] !== e ? (m = r("command__list", e), t[0] = e, t[1] = m) : m = t[1];
|
|
48
|
+
const o = m;
|
|
38
49
|
let n;
|
|
39
|
-
t[
|
|
50
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a.List, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
51
|
+
}, J = (e) => {
|
|
52
|
+
const t = c.c(10);
|
|
53
|
+
let m;
|
|
54
|
+
t[0] !== e.value ? (m = e.value?.toString(), t[0] = e.value, t[1] = m) : m = t[1];
|
|
40
55
|
let o;
|
|
41
|
-
t[2] !== e ? (o = (
|
|
56
|
+
t[2] !== e ? (o = (d) => {
|
|
42
57
|
if (e.onChange) {
|
|
43
58
|
const f = {
|
|
44
59
|
target: {
|
|
45
|
-
value:
|
|
60
|
+
value: d
|
|
46
61
|
}
|
|
47
62
|
};
|
|
48
63
|
e.onChange(f);
|
|
49
64
|
}
|
|
50
65
|
}, t[2] = e, t[3] = o) : o = t[3];
|
|
51
|
-
let
|
|
52
|
-
t[4] !== e ? (
|
|
53
|
-
let c;
|
|
54
|
-
t[6] !== l ? (c = /* @__PURE__ */ m($, { ...l }), t[6] = l, t[7] = c) : c = t[7];
|
|
66
|
+
let n;
|
|
67
|
+
t[4] !== e ? (n = /* @__PURE__ */ l(_, { className: "command__input", ...e }), t[4] = e, t[5] = n) : n = t[5];
|
|
55
68
|
let i;
|
|
56
|
-
return t[
|
|
57
|
-
},
|
|
58
|
-
const t =
|
|
69
|
+
return t[6] !== m || t[7] !== o || t[8] !== n ? (i = /* @__PURE__ */ l(a.Input, { value: m, onValueChange: o, asChild: !0, children: n }), t[6] = m, t[7] = o, t[8] = n, t[9] = i) : i = t[9], i;
|
|
70
|
+
}, K = (e) => {
|
|
71
|
+
const t = c.c(4);
|
|
72
|
+
let m;
|
|
73
|
+
t[0] !== e ? (m = r("command__empty", e), t[0] = e, t[1] = m) : m = t[1];
|
|
74
|
+
const o = m;
|
|
59
75
|
let n;
|
|
60
|
-
t[
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
76
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a.Empty, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
77
|
+
}, M = (e) => {
|
|
78
|
+
const t = c.c(4);
|
|
79
|
+
let m;
|
|
80
|
+
t[0] !== e ? (m = r("command__group", e), t[0] = e, t[1] = m) : m = t[1];
|
|
81
|
+
const o = m;
|
|
66
82
|
let n;
|
|
67
|
-
t[
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
83
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a.Group, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
84
|
+
}, Q = (e) => {
|
|
85
|
+
const t = c.c(4);
|
|
86
|
+
let m;
|
|
87
|
+
t[0] !== e ? (m = r("command__item", e), t[0] = e, t[1] = m) : m = t[1];
|
|
88
|
+
const o = m;
|
|
73
89
|
let n;
|
|
74
|
-
t[
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
90
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a.Item, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
91
|
+
}, U = (e) => {
|
|
92
|
+
const t = c.c(4);
|
|
93
|
+
let m;
|
|
94
|
+
t[0] !== e ? (m = r("command__separator", e), t[0] = e, t[1] = m) : m = t[1];
|
|
95
|
+
const o = m;
|
|
80
96
|
let n;
|
|
81
|
-
t[
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
97
|
+
return t[2] !== o ? (n = /* @__PURE__ */ l(a.Separator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
98
|
+
}, W = (e) => {
|
|
99
|
+
const t = c.c(5);
|
|
100
|
+
let m;
|
|
101
|
+
t[0] !== e ? (m = r("command__shortcut", e), t[0] = e, t[1] = m) : m = t[1];
|
|
102
|
+
const o = m;
|
|
87
103
|
let n;
|
|
88
|
-
t[
|
|
89
|
-
const o = n;
|
|
90
|
-
let l;
|
|
91
|
-
return t[2] !== e.children || t[3] !== o ? (l = /* @__PURE__ */ m(_, { ...o, children: e.children }), t[2] = e.children, t[3] = o, t[4] = l) : l = t[4], l;
|
|
104
|
+
return t[2] !== e.children || t[3] !== o ? (n = /* @__PURE__ */ l(g, { ...o, children: e.children }), t[2] = e.children, t[3] = o, t[4] = n) : n = t[4], n;
|
|
92
105
|
};
|
|
93
106
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
$ as Command,
|
|
108
|
+
F as CommandDialog,
|
|
109
|
+
K as CommandEmpty,
|
|
110
|
+
M as CommandGroup,
|
|
111
|
+
J as CommandInput,
|
|
112
|
+
Q as CommandItem,
|
|
113
|
+
H as CommandList,
|
|
114
|
+
U as CommandSeparator,
|
|
115
|
+
W as CommandShortcut
|
|
103
116
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface ContainerType extends
|
|
2
|
+
import { Component } from '../../utils';
|
|
3
|
+
export interface ContainerType extends Component<HTMLDivElement> {
|
|
4
4
|
children: ReactNode | ReactNode[];
|
|
5
5
|
}
|
|
6
6
|
export declare const Container: React.FC<ContainerType>;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as l } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import '../../assets/components/container/Container.style.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeComponentProps as p } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
8
|
+
const u = (i) => {
|
|
6
9
|
const t = l.c(6);
|
|
7
|
-
let
|
|
10
|
+
let r, o;
|
|
8
11
|
if (t[0] !== i) {
|
|
9
12
|
const {
|
|
10
|
-
children:
|
|
11
|
-
...
|
|
13
|
+
children: m,
|
|
14
|
+
...n
|
|
12
15
|
} = i;
|
|
13
|
-
|
|
16
|
+
r = m, o = p("container", n), t[0] = i, t[1] = r, t[2] = o;
|
|
14
17
|
} else
|
|
15
|
-
|
|
16
|
-
let
|
|
17
|
-
return t[3] !==
|
|
18
|
+
r = t[1], o = t[2];
|
|
19
|
+
let e;
|
|
20
|
+
return t[3] !== r || t[4] !== o ? (e = /* @__PURE__ */ c("div", { ...o, children: r }), t[3] = r, t[4] = o, t[5] = e) : e = t[5], e;
|
|
18
21
|
};
|
|
19
22
|
export {
|
|
20
|
-
|
|
23
|
+
u as Container
|
|
21
24
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, Color } from '../../utils';
|
|
3
3
|
import * as Radix from "@radix-ui/react-context-menu";
|
|
4
|
-
export type ContextMenuProps =
|
|
5
|
-
export type ContextMenuTriggerProps =
|
|
6
|
-
export type ContextMenuPortalProps =
|
|
7
|
-
export type ContextMenuContentProps =
|
|
4
|
+
export type ContextMenuProps = ComponentProps & Radix.ContextMenuProps;
|
|
5
|
+
export type ContextMenuTriggerProps = ComponentProps & Radix.ContextMenuTriggerProps;
|
|
6
|
+
export type ContextMenuPortalProps = ComponentProps & Radix.ContextMenuPortalProps;
|
|
7
|
+
export type ContextMenuContentProps = ComponentProps & Radix.ContextMenuContentProps & {
|
|
8
8
|
color?: Color;
|
|
9
9
|
};
|
|
10
|
-
export type ContextMenuLabelProps =
|
|
11
|
-
export type ContextMenuItemProps =
|
|
12
|
-
export type ContextMenuGroupProps =
|
|
13
|
-
export type ContextMenuSubProps =
|
|
14
|
-
export type ContextMenuSubTriggerProps =
|
|
15
|
-
export type ContextMenuSubContentProps =
|
|
10
|
+
export type ContextMenuLabelProps = ComponentProps & Radix.ContextMenuLabelProps;
|
|
11
|
+
export type ContextMenuItemProps = ComponentProps & Radix.ContextMenuItemProps;
|
|
12
|
+
export type ContextMenuGroupProps = ComponentProps & Radix.ContextMenuGroupProps;
|
|
13
|
+
export type ContextMenuSubProps = ComponentProps & Radix.ContextMenuSubProps;
|
|
14
|
+
export type ContextMenuSubTriggerProps = ComponentProps & Radix.ContextMenuSubTriggerProps;
|
|
15
|
+
export type ContextMenuSubContentProps = ComponentProps & Radix.ContextMenuSubContentProps & {
|
|
16
16
|
color?: Color;
|
|
17
17
|
};
|
|
18
|
-
export type ContextMenuSeparatorProps =
|
|
19
|
-
export type ContextMenuArrowProps =
|
|
18
|
+
export type ContextMenuSeparatorProps = ComponentProps & Radix.ContextMenuSeparatorProps;
|
|
19
|
+
export type ContextMenuArrowProps = ComponentProps & Radix.ContextMenuArrowProps;
|
|
20
20
|
export declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
21
21
|
export declare const ContextMenuTrigger: React.FC<ContextMenuTriggerProps>;
|
|
22
22
|
export declare const ContextMenuPortal: React.FC<ContextMenuPortalProps>;
|
|
@@ -2,87 +2,88 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as u } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import {
|
|
5
|
+
import { mergeComponentProps as i } from "../../utils/component.js";
|
|
6
|
+
import "js-md5";
|
|
6
7
|
import * as r from "@radix-ui/react-context-menu";
|
|
7
8
|
import '../../assets/components/context-menu/ContextMenu.style.css';/* empty css */
|
|
8
|
-
const
|
|
9
|
+
const $ = (n) => {
|
|
9
10
|
const t = u.c(4);
|
|
10
11
|
let o;
|
|
11
12
|
t[0] !== n ? (o = i("context-menu", n), t[0] = n, t[1] = o) : o = t[1];
|
|
12
13
|
const c = o;
|
|
13
14
|
let e;
|
|
14
15
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenu, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
15
|
-
},
|
|
16
|
+
}, b = (n) => {
|
|
16
17
|
const t = u.c(4);
|
|
17
18
|
let o;
|
|
18
19
|
t[0] !== n ? (o = i("context-menu__trigger", n), t[0] = n, t[1] = o) : o = t[1];
|
|
19
20
|
const c = o;
|
|
20
21
|
let e;
|
|
21
22
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuTrigger, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
22
|
-
},
|
|
23
|
+
}, S = (n) => {
|
|
23
24
|
const t = u.c(4);
|
|
24
25
|
let o;
|
|
25
26
|
t[0] !== n ? (o = i("context-menu__portal", n), t[0] = n, t[1] = o) : o = t[1];
|
|
26
27
|
const c = o;
|
|
27
28
|
let e;
|
|
28
29
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuPortal, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
29
|
-
},
|
|
30
|
+
}, T = (n) => {
|
|
30
31
|
const t = u.c(6), o = n.align, c = `context-menu__content context-menu__content--${n.color ?? "primary"}`;
|
|
31
32
|
let e;
|
|
32
33
|
t[0] !== n || t[1] !== c ? (e = i(c, n), t[0] = n, t[1] = c, t[2] = e) : e = t[2];
|
|
33
34
|
const x = e;
|
|
34
35
|
let s;
|
|
35
36
|
return t[3] !== n.align || t[4] !== x ? (s = /* @__PURE__ */ l(r.ContextMenuContent, { align: o, ...x }), t[3] = n.align, t[4] = x, t[5] = s) : s = t[5], s;
|
|
36
|
-
},
|
|
37
|
+
}, w = (n) => {
|
|
37
38
|
const t = u.c(4);
|
|
38
39
|
let o;
|
|
39
40
|
t[0] !== n ? (o = i("context-menu__label", n), t[0] = n, t[1] = o) : o = t[1];
|
|
40
41
|
const c = o;
|
|
41
42
|
let e;
|
|
42
43
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuLabel, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
43
|
-
},
|
|
44
|
+
}, P = (n) => {
|
|
44
45
|
const t = u.c(4);
|
|
45
46
|
let o;
|
|
46
47
|
t[0] !== n ? (o = i("context-menu__item", n), t[0] = n, t[1] = o) : o = t[1];
|
|
47
48
|
const c = o;
|
|
48
49
|
let e;
|
|
49
50
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuItem, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
50
|
-
},
|
|
51
|
+
}, y = (n) => {
|
|
51
52
|
const t = u.c(4);
|
|
52
53
|
let o;
|
|
53
54
|
t[0] !== n ? (o = i("context-menu__group", n), t[0] = n, t[1] = o) : o = t[1];
|
|
54
55
|
const c = o;
|
|
55
56
|
let e;
|
|
56
57
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuGroup, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
57
|
-
},
|
|
58
|
+
}, A = (n) => {
|
|
58
59
|
const t = u.c(4);
|
|
59
60
|
let o;
|
|
60
61
|
t[0] !== n ? (o = i("context-menu__sub", n), t[0] = n, t[1] = o) : o = t[1];
|
|
61
62
|
const c = o;
|
|
62
63
|
let e;
|
|
63
64
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuSub, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
64
|
-
},
|
|
65
|
+
}, G = (n) => {
|
|
65
66
|
const t = u.c(4);
|
|
66
67
|
let o;
|
|
67
68
|
t[0] !== n ? (o = i("context-menu__sub-trigger", n), t[0] = n, t[1] = o) : o = t[1];
|
|
68
69
|
const c = o;
|
|
69
70
|
let e;
|
|
70
71
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuSubTrigger, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
71
|
-
},
|
|
72
|
+
}, I = (n) => {
|
|
72
73
|
const t = u.c(6), o = n.align, c = `context-menu__sub-content context-menu__sub-content--${n.color ?? "primary"}`;
|
|
73
74
|
let e;
|
|
74
75
|
t[0] !== n || t[1] !== c ? (e = i(c, n), t[0] = n, t[1] = c, t[2] = e) : e = t[2];
|
|
75
76
|
const x = e;
|
|
76
77
|
let s;
|
|
77
78
|
return t[3] !== n.align || t[4] !== x ? (s = /* @__PURE__ */ l(r.ContextMenuSubContent, { align: o, ...x }), t[3] = n.align, t[4] = x, t[5] = s) : s = t[5], s;
|
|
78
|
-
},
|
|
79
|
+
}, L = (n) => {
|
|
79
80
|
const t = u.c(4);
|
|
80
81
|
let o;
|
|
81
82
|
t[0] !== n ? (o = i("context-menu__separator", n), t[0] = n, t[1] = o) : o = t[1];
|
|
82
83
|
const c = o;
|
|
83
84
|
let e;
|
|
84
85
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuSeparator, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
85
|
-
},
|
|
86
|
+
}, R = (n) => {
|
|
86
87
|
const t = u.c(4);
|
|
87
88
|
let o;
|
|
88
89
|
t[0] !== n ? (o = i("context-menu__arrow", n), t[0] = n, t[1] = o) : o = t[1];
|
|
@@ -91,16 +92,16 @@ const g = (n) => {
|
|
|
91
92
|
return t[2] !== c ? (e = /* @__PURE__ */ l(r.ContextMenuArrow, { ...c }), t[2] = c, t[3] = e) : e = t[3], e;
|
|
92
93
|
};
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
$ as ContextMenu,
|
|
96
|
+
R as ContextMenuArrow,
|
|
97
|
+
T as ContextMenuContent,
|
|
98
|
+
y as ContextMenuGroup,
|
|
99
|
+
P as ContextMenuItem,
|
|
100
|
+
w as ContextMenuLabel,
|
|
101
|
+
S as ContextMenuPortal,
|
|
102
|
+
L as ContextMenuSeparator,
|
|
103
|
+
A as ContextMenuSub,
|
|
104
|
+
I as ContextMenuSubContent,
|
|
105
|
+
G as ContextMenuSubTrigger,
|
|
106
|
+
b as ContextMenuTrigger
|
|
106
107
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Component } from '../../utils';
|
|
3
3
|
export type DataTableFilterOperator = "isOneOf" | "isNotOneOf";
|
|
4
4
|
export interface DataTableFilterProps {
|
|
5
5
|
[key: string]: {
|
|
@@ -10,7 +10,7 @@ export interface DataTableFilterProps {
|
|
|
10
10
|
export interface DataTableSortProps {
|
|
11
11
|
[key: string]: 'asc' | 'desc' | undefined;
|
|
12
12
|
}
|
|
13
|
-
export interface DataTableProps<T> extends Omit<
|
|
13
|
+
export interface DataTableProps<T> extends Omit<Component<HTMLTableElement>, 'data' | 'children' | 'onSelect'> {
|
|
14
14
|
data: Array<T>;
|
|
15
15
|
sort?: DataTableSortProps;
|
|
16
16
|
filter?: DataTableFilterProps;
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
1
|
+
import { jsxs as g, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import '../../assets/components/data-table/DataTable.style.css';/* empty css */
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { mergeComponentProps as C } from "../../utils/component.js";
|
|
6
|
+
import "js-md5";
|
|
7
|
+
const A = (l, m) => m.split(".").reduce((t, f) => {
|
|
7
8
|
if (t != null)
|
|
8
|
-
return Array.isArray(t) ? t.map((
|
|
9
|
-
}, l),
|
|
9
|
+
return Array.isArray(t) ? t.map((o) => o?.[f]).filter((o) => o !== void 0) : t[f];
|
|
10
|
+
}, l), w = (l) => {
|
|
10
11
|
const {
|
|
11
|
-
data:
|
|
12
|
+
data: m,
|
|
12
13
|
sort: t,
|
|
13
14
|
filter: f,
|
|
14
|
-
loading:
|
|
15
|
+
loading: o,
|
|
15
16
|
loadingComponent: j,
|
|
16
|
-
emptyComponent:
|
|
17
|
+
emptyComponent: d,
|
|
17
18
|
onSelect: u,
|
|
18
|
-
children:
|
|
19
|
+
children: O,
|
|
19
20
|
...b
|
|
20
|
-
} = l,
|
|
21
|
+
} = l, y = m.filter((i) => Object.entries(f || {}).every(([a, {
|
|
21
22
|
operator: n,
|
|
22
23
|
value: r
|
|
23
24
|
}]) => {
|
|
24
|
-
const e =
|
|
25
|
+
const e = A(i, a);
|
|
25
26
|
return n === "isOneOf" && !Array.isArray(r) && !Array.isArray(e) ? e === r : n === "isOneOf" && !Array.isArray(r) && Array.isArray(e) ? Array.from(e).includes(r) : n === "isOneOf" && Array.isArray(r) && !Array.isArray(e) ? Array.from(r).some((s) => s === e) : n === "isOneOf" && Array.isArray(r) && Array.isArray(e) ? Array.from(r).some((s) => Array.from(e).includes(s)) : !1;
|
|
26
|
-
})), c = h.useMemo(() => t ? [...
|
|
27
|
+
})), c = h.useMemo(() => t ? [...y].sort((i, a) => {
|
|
27
28
|
for (const [n, r] of Object.entries(t)) {
|
|
28
|
-
const e =
|
|
29
|
+
const e = A(i, n), s = A(a, n);
|
|
29
30
|
if (e < s) return r === "asc" ? -1 : 1;
|
|
30
31
|
if (e > s) return r === "asc" ? 1 : -1;
|
|
31
32
|
}
|
|
32
33
|
return 0;
|
|
33
|
-
}) :
|
|
34
|
+
}) : y, [y, t]);
|
|
34
35
|
return /* @__PURE__ */ g("table", { ...C("data-table", b), children: [
|
|
35
|
-
c.map((i,
|
|
36
|
-
c.length === 0 && !
|
|
36
|
+
c.map((i, a) => /* @__PURE__ */ p("tr", { className: "data-table__row", onClick: () => u?.(i), children: O?.(i, a) })),
|
|
37
|
+
c.length === 0 && !o && d ? /* @__PURE__ */ p("tr", { className: "data-table__row", onClick: () => u?.(void 0), children: d }) : null
|
|
37
38
|
] });
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
w as DataTable
|
|
41
42
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface DataTableColumnProps extends
|
|
2
|
+
import { Component } from '../../utils';
|
|
3
|
+
export interface DataTableColumnProps extends Component<HTMLTableCellElement> {
|
|
4
4
|
children?: React.ReactNode | React.ReactNode[];
|
|
5
5
|
}
|
|
6
6
|
export declare const DataTableColumn: React.FC<DataTableColumnProps>;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { mergeComponentProps as s } from "../../utils/component.js";
|
|
6
|
+
import "js-md5";
|
|
7
|
+
const h = (m) => {
|
|
8
|
+
const t = c.c(6);
|
|
9
|
+
let e, o;
|
|
9
10
|
if (t[0] !== m) {
|
|
10
11
|
const {
|
|
11
12
|
children: i,
|
|
12
13
|
...l
|
|
13
14
|
} = m;
|
|
14
|
-
e = i,
|
|
15
|
+
e = i, o = s("", l), t[0] = m, t[1] = e, t[2] = o;
|
|
15
16
|
} else
|
|
16
|
-
e = t[1],
|
|
17
|
-
let
|
|
18
|
-
return t[3] !== e || t[4] !==
|
|
17
|
+
e = t[1], o = t[2];
|
|
18
|
+
let r;
|
|
19
|
+
return t[3] !== e || t[4] !== o ? (r = /* @__PURE__ */ n("td", { ...o, children: e }), t[3] = e, t[4] = o, t[5] = r) : r = t[5], r;
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
h as DataTableColumn
|
|
22
23
|
};
|