@code0-tech/pictor 0.6.1 → 0.6.3

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