@code0-tech/pictor 0.7.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/form/FileInput.style.css +1 -0
- package/dist/assets/components/progress/Progress.style.css +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +7 -7
- package/dist/components/button/Button.js +11 -11
- package/dist/components/command/Command.js +19 -17
- package/dist/components/data-table/DataTable.js +15 -15
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +15 -15
- package/dist/components/editor/Editor.js +13 -13
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/FileInput.d.ts +32 -0
- package/dist/components/form/FileInput.js +124 -0
- package/dist/components/form/InputContentEditable.hook.js +11 -11
- package/dist/components/form/InputWrapper.js +15 -15
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +4 -4
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextAreaInput.js +6 -6
- package/dist/components/form/TextInput.js +6 -6
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.js +58 -45
- package/dist/components/form/useForm.js +2 -2
- package/dist/components/fullscreen/FullScreen.js +2 -2
- package/dist/components/gantt/GanttGroup.js +17 -17
- package/dist/components/progress/Progress.d.ts +8 -0
- package/dist/components/progress/Progress.js +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +180 -165
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +81 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +55 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +58 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/utils/reactiveArrayService.js +4 -4
- package/package.json +12 -7
|
@@ -401,8 +401,8 @@ const F = "input__token", K = "input__token--selected", q = "aria-data", O = "
|
|
|
401
401
|
s(r.current);
|
|
402
402
|
}, e[15] = r, e[16] = s, e[17] = w) : w = e[17];
|
|
403
403
|
const V = w, G = me;
|
|
404
|
-
let
|
|
405
|
-
e[18] !== r || e[19] !== s ? (
|
|
404
|
+
let _;
|
|
405
|
+
e[18] !== r || e[19] !== s ? (_ = (i) => {
|
|
406
406
|
const g = r.current;
|
|
407
407
|
if (!g || document.activeElement !== g)
|
|
408
408
|
return !1;
|
|
@@ -414,26 +414,26 @@ const F = "input__token", K = "input__token--selected", q = "aria-data", O = "
|
|
|
414
414
|
return i.preventDefault(), i.stopPropagation(), $(g), !0;
|
|
415
415
|
}
|
|
416
416
|
return i.key === "Enter" ? (i.preventDefault(), !0) : !1;
|
|
417
|
-
}, e[18] = r, e[19] = s, e[20] =
|
|
418
|
-
const X =
|
|
419
|
-
let
|
|
420
|
-
e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
417
|
+
}, e[18] = r, e[19] = s, e[20] = _) : _ = e[20];
|
|
418
|
+
const X = _;
|
|
419
|
+
let L;
|
|
420
|
+
e[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => {
|
|
421
421
|
const i = u.current;
|
|
422
422
|
return u.current = null, i;
|
|
423
|
-
}, e[21] =
|
|
424
|
-
let
|
|
425
|
-
return e[22] !== y || e[23] !== d || e[24] !== V || e[25] !== X || e[26] !== S || e[27] !== p || e[28] !== s ? (
|
|
423
|
+
}, e[21] = L) : L = e[21];
|
|
424
|
+
let M;
|
|
425
|
+
return e[22] !== y || e[23] !== d || e[24] !== V || e[25] !== X || e[26] !== S || e[27] !== p || e[28] !== s ? (M = {
|
|
426
426
|
editorHtml: d,
|
|
427
427
|
setEditorHtml: c,
|
|
428
428
|
initializeFromExternalValue: p,
|
|
429
429
|
updateEditorState: s,
|
|
430
|
-
takePendingSelection:
|
|
430
|
+
takePendingSelection: L,
|
|
431
431
|
applySuggestionValueSyntax: y,
|
|
432
432
|
handlePaste: S,
|
|
433
433
|
handleChange: V,
|
|
434
434
|
handleKeyDownCapture: G,
|
|
435
435
|
handleKeyDown: X
|
|
436
|
-
}, e[22] = y, e[23] = d, e[24] = V, e[25] = X, e[26] = S, e[27] = p, e[28] = s, e[29] =
|
|
436
|
+
}, e[22] = y, e[23] = d, e[24] = V, e[25] = X, e[26] = S, e[27] = p, e[28] = s, e[29] = M) : M = e[29], M;
|
|
437
437
|
};
|
|
438
438
|
function pe(t) {
|
|
439
439
|
return typeof t != "string";
|
|
@@ -10,18 +10,18 @@ import { InputDescription as F } from "./InputDescription.js";
|
|
|
10
10
|
import '../../assets/components/form/InputWrapper.style.css';/* empty css */
|
|
11
11
|
const K = N.forwardRef((C, L) => {
|
|
12
12
|
const e = j.c(29), {
|
|
13
|
-
children:
|
|
14
|
-
wrapperComponent:
|
|
15
|
-
left:
|
|
16
|
-
right:
|
|
13
|
+
children: w,
|
|
14
|
+
wrapperComponent: f,
|
|
15
|
+
left: m,
|
|
16
|
+
right: d,
|
|
17
17
|
leftType: M,
|
|
18
18
|
rightType: T,
|
|
19
|
-
title:
|
|
19
|
+
title: c,
|
|
20
20
|
description: u,
|
|
21
21
|
formValidation: h
|
|
22
22
|
} = C;
|
|
23
23
|
let g;
|
|
24
|
-
e[0] !==
|
|
24
|
+
e[0] !== f ? (g = f === void 0 ? {} : f, e[0] = f, e[1] = g) : g = e[1];
|
|
25
25
|
const V = g, x = M === void 0 ? "icon" : M, y = T === void 0 ? "action" : T;
|
|
26
26
|
let v;
|
|
27
27
|
e[2] !== h ? (v = h === void 0 ? {
|
|
@@ -31,31 +31,31 @@ const K = N.forwardRef((C, L) => {
|
|
|
31
31
|
} : h, e[2] = h, e[3] = v) : v = e[3];
|
|
32
32
|
const t = v;
|
|
33
33
|
let i;
|
|
34
|
-
e[4] !==
|
|
34
|
+
e[4] !== c ? (i = c && /* @__PURE__ */ a(E, { children: c }), e[4] = c, e[5] = i) : i = e[5];
|
|
35
35
|
let r;
|
|
36
36
|
e[6] !== u ? (r = u && /* @__PURE__ */ a(F, { children: u }), e[6] = u, e[7] = r) : r = e[7];
|
|
37
37
|
const I = `input-wrapper ${t?.valid ? "" : "input-wrapper--not-valid"}`;
|
|
38
38
|
let l;
|
|
39
39
|
e[8] !== I || e[9] !== V ? (l = b(I, V), e[8] = I, e[9] = V, e[10] = l) : l = e[10];
|
|
40
40
|
let o;
|
|
41
|
-
e[11] !==
|
|
41
|
+
e[11] !== m || e[12] !== x ? (o = m && /* @__PURE__ */ a("div", { className: `input-wrapper__left input__left--${x}`, children: m }), e[11] = m, e[12] = x, e[13] = o) : o = e[13];
|
|
42
42
|
let p;
|
|
43
|
-
e[14] !==
|
|
43
|
+
e[14] !== d || e[15] !== y ? (p = d && /* @__PURE__ */ a("div", { className: `input-wrapper__right input-wrapper__right--${y}`, children: d }), e[14] = d, e[15] = y, e[16] = p) : p = e[16];
|
|
44
44
|
let n;
|
|
45
|
-
e[17] !==
|
|
45
|
+
e[17] !== w || e[18] !== o || e[19] !== p || e[20] !== l ? (n = /* @__PURE__ */ $("div", { ...l, children: [
|
|
46
46
|
o,
|
|
47
|
-
|
|
47
|
+
w,
|
|
48
48
|
p
|
|
49
|
-
] }), e[17] =
|
|
49
|
+
] }), e[17] = w, e[18] = o, e[19] = p, e[20] = l, e[21] = n) : n = e[21];
|
|
50
50
|
let s;
|
|
51
51
|
e[22] !== t ? (s = !t?.valid && t?.notValidMessage && /* @__PURE__ */ a(D, { children: t.notValidMessage }), e[22] = t, e[23] = s) : s = e[23];
|
|
52
|
-
let
|
|
53
|
-
return e[24] !== n || e[25] !== s || e[26] !== i || e[27] !== r ? (
|
|
52
|
+
let _;
|
|
53
|
+
return e[24] !== n || e[25] !== s || e[26] !== i || e[27] !== r ? (_ = /* @__PURE__ */ $(R, { children: [
|
|
54
54
|
i,
|
|
55
55
|
r,
|
|
56
56
|
n,
|
|
57
57
|
s
|
|
58
|
-
] }), e[24] = n, e[25] = s, e[26] = i, e[27] = r, e[28] =
|
|
58
|
+
] }), e[24] = n, e[25] = s, e[26] = i, e[27] = r, e[28] = _) : _ = e[28], _;
|
|
59
59
|
});
|
|
60
60
|
export {
|
|
61
61
|
K as InputWrapper
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import u from "react";
|
|
3
3
|
import { Input as i } from "./Input.js";
|
|
4
4
|
import { IconMinus as a, IconPlus as l } from "@tabler/icons-react";
|
|
5
5
|
import { Button as e } from "../button/Button.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const N = u.forwardRef((o, t) => {
|
|
7
|
+
t = t || u.useRef(null);
|
|
8
8
|
const {
|
|
9
9
|
step: r = 1,
|
|
10
10
|
...c
|
|
11
11
|
} = o;
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
}, children: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
}, children: /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ n(i, { className: "number-input", right: /* @__PURE__ */ n(e, { variant: "none", onClick: () => {
|
|
13
|
+
t.current && (t.current.value || (t.current.value = "0"), t.current.value = (Number.parseInt(t.current.value) + r).toString());
|
|
14
|
+
}, children: /* @__PURE__ */ n(l, { size: 13 }) }), left: /* @__PURE__ */ n(e, { variant: "none", onClick: () => {
|
|
15
|
+
t.current && (t.current.value || (t.current.value = "0"), t.current.value = (Number.parseInt(t.current.value) - r).toString());
|
|
16
|
+
}, children: /* @__PURE__ */ n(a, { size: 13 }) }), leftType: "action", type: "number", ref: t, ...c });
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
N as NumberInput
|
|
20
20
|
};
|
|
@@ -6,7 +6,7 @@ import { Button as p } from "../button/Button.js";
|
|
|
6
6
|
import { clearInputElement as w } from "./Input.utils.js";
|
|
7
7
|
import { Flex as o } from "../flex/Flex.js";
|
|
8
8
|
import { Text as a } from "../text/Text.js";
|
|
9
|
-
const
|
|
9
|
+
const v = u.forwardRef((n, e) => {
|
|
10
10
|
e = e || u.useRef(null);
|
|
11
11
|
const {
|
|
12
12
|
clearable: m = !0,
|
|
@@ -57,12 +57,12 @@ const A = u.forwardRef((n, e) => {
|
|
|
57
57
|
] })
|
|
58
58
|
] })
|
|
59
59
|
] });
|
|
60
|
-
}),
|
|
60
|
+
}), A = (n) => {
|
|
61
61
|
if (!n) return "12345";
|
|
62
62
|
let e = null;
|
|
63
63
|
return n.length < 8 && (e = (e ?? "") + "1"), /[a-z]/.test(n) || (e = (e ?? "") + "2"), /[A-Z]/.test(n) || (e = (e ?? "") + "3"), /[0-9]/.test(n) || (e = (e ?? "") + "4"), /[^A-Za-z0-9]/.test(n) || (e = (e ?? "") + "5"), e;
|
|
64
64
|
};
|
|
65
65
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
v as PasswordInput,
|
|
67
|
+
A as passwordValidation
|
|
68
68
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import e from "react";
|
|
3
3
|
import { Input as p } from "./Input.js";
|
|
4
4
|
const m = e.forwardRef((r, t) => {
|
|
5
5
|
t = t || e.useRef(null);
|
|
6
6
|
const {
|
|
7
|
-
value:
|
|
8
|
-
initialValue:
|
|
9
|
-
...
|
|
7
|
+
value: l,
|
|
8
|
+
initialValue: o,
|
|
9
|
+
...u
|
|
10
10
|
} = r;
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ n(p, { wrapperComponent: {
|
|
12
12
|
className: "switch-input"
|
|
13
|
-
}, type: "checkbox", right: null, left: null, ref: t, value:
|
|
13
|
+
}, type: "checkbox", right: null, left: null, ref: t, value: l, ...o ? {
|
|
14
14
|
defaultChecked: !0
|
|
15
|
-
} : {}, ...
|
|
15
|
+
} : {}, ...u });
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
18
|
m as SwitchInput
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
3
|
import { Input as u } from "./Input.js";
|
|
4
4
|
import { IconX as f } from "@tabler/icons-react";
|
|
5
5
|
import { Button as p } from "../button/Button.js";
|
|
6
6
|
import { clearInputElement as s } from "./Input.utils.js";
|
|
7
|
-
const
|
|
7
|
+
const R = a.forwardRef((r, t) => {
|
|
8
8
|
t = t || a.useRef(null);
|
|
9
9
|
const {
|
|
10
10
|
clearable: i = !1,
|
|
11
11
|
right: l,
|
|
12
12
|
...m
|
|
13
|
-
} = r, c = (
|
|
14
|
-
s(t.current), r.onClear && r.onClear(
|
|
13
|
+
} = r, c = (e) => {
|
|
14
|
+
s(t.current), r.onClear && r.onClear(e);
|
|
15
15
|
}, n = [l];
|
|
16
|
-
return i && n.push(/* @__PURE__ */
|
|
16
|
+
return i && n.push(/* @__PURE__ */ o(p, { variant: "none", onClick: (e) => c(e), children: /* @__PURE__ */ o(f, { size: 13 }) })), /* @__PURE__ */ o(u, { right: n, type: "textarea", ref: t, ...m });
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
R as TextAreaInput
|
|
20
20
|
};
|
|
@@ -4,17 +4,17 @@ import { Input as u } from "./Input.js";
|
|
|
4
4
|
import { IconX as f } from "@tabler/icons-react";
|
|
5
5
|
import { Button as p } from "../button/Button.js";
|
|
6
6
|
import { clearInputElement as s } from "./Input.utils.js";
|
|
7
|
-
const
|
|
7
|
+
const R = i.forwardRef((r, t) => {
|
|
8
8
|
t = t || i.useRef(null);
|
|
9
9
|
const {
|
|
10
10
|
clearable: l = !1,
|
|
11
|
-
right:
|
|
12
|
-
...
|
|
11
|
+
right: a,
|
|
12
|
+
...m
|
|
13
13
|
} = r, c = (o) => {
|
|
14
14
|
s(t.current), r.onClear && r.onClear(o);
|
|
15
|
-
}, n = [
|
|
16
|
-
return l && n.push(/* @__PURE__ */ e(p, { variant: "none", onClick: (o) => c(o), children: /* @__PURE__ */ e(f, { size: 13 }) })), /* @__PURE__ */ e(u, { right: n, type: "text", ref: t, ...
|
|
15
|
+
}, n = [a];
|
|
16
|
+
return l && n.push(/* @__PURE__ */ e(p, { variant: "none", onClick: (o) => c(o), children: /* @__PURE__ */ e(f, { size: 13 }) })), /* @__PURE__ */ e(u, { right: n, type: "text", ref: t, ...m });
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
R as TextInput
|
|
20
20
|
};
|
|
@@ -1,52 +1,65 @@
|
|
|
1
1
|
import { CheckboxInput as o } from "./CheckboxInput.js";
|
|
2
2
|
import { EditorInput as p } from "./EditorInput.js";
|
|
3
|
-
import { EmailInput as u, emailValidation as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
3
|
+
import { EmailInput as u, emailValidation as I } from "./EmailInput.js";
|
|
4
|
+
import { FileInput as m, FileInputContext as l, FileInputDropzone as x, FileInputHiddenInput as f, FileInputItem as a, FileInputItemDeleteTrigger as F, FileInputItemGroup as d, FileInputItemName as S, FileInputItemPreview as g, FileInputItemPreviewImage as c, FileInputItemSizeText as s, FileInputTrigger as P } from "./FileInput.js";
|
|
5
|
+
import { Input as w } from "./Input.js";
|
|
6
|
+
import { InputDescription as b } from "./InputDescription.js";
|
|
7
|
+
import { InputLabel as V } from "./InputLabel.js";
|
|
8
|
+
import { InputMessage as h } from "./InputMessage.js";
|
|
9
|
+
import { InputSuggestionMenuContent as z, InputSuggestionMenuContentItems as E } from "./InputSuggestion.js";
|
|
10
|
+
import { NumberInput as H } from "./NumberInput.js";
|
|
11
|
+
import { PasswordInput as R, passwordValidation as k } from "./PasswordInput.js";
|
|
12
|
+
import { PinInput as A, PinInputField as L, PinInputHiddenField as j } from "./PinInput.js";
|
|
13
|
+
import { RadioGroup as B } from "./RadioGroup.js";
|
|
14
|
+
import { RadioInput as K } from "./RadioInput.js";
|
|
15
|
+
import { SelectContent as Q, SelectInput as U, SelectItem as W, SelectItemText as X, SelectPortal as Y, SelectTrigger as Z, SelectValue as _, SelectViewport as $ } from "./SelectInput.js";
|
|
16
|
+
import { SwitchInput as te } from "./SwitchInput.js";
|
|
17
|
+
import { TextAreaInput as re } from "./TextAreaInput.js";
|
|
18
|
+
import { TextInput as ne } from "./TextInput.js";
|
|
19
|
+
import { useForm as Ie } from "./useForm.js";
|
|
20
|
+
import { buildDefaultSyntax as me } from "./Input.syntax.hook.js";
|
|
20
21
|
export {
|
|
21
22
|
o as CheckboxInput,
|
|
22
23
|
p as EditorInput,
|
|
23
24
|
u as EmailInput,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
W as
|
|
25
|
+
m as FileInput,
|
|
26
|
+
l as FileInputContext,
|
|
27
|
+
x as FileInputDropzone,
|
|
28
|
+
f as FileInputHiddenInput,
|
|
29
|
+
a as FileInputItem,
|
|
30
|
+
F as FileInputItemDeleteTrigger,
|
|
31
|
+
d as FileInputItemGroup,
|
|
32
|
+
S as FileInputItemName,
|
|
33
|
+
g as FileInputItemPreview,
|
|
34
|
+
c as FileInputItemPreviewImage,
|
|
35
|
+
s as FileInputItemSizeText,
|
|
36
|
+
P as FileInputTrigger,
|
|
37
|
+
w as Input,
|
|
38
|
+
b as InputDescription,
|
|
39
|
+
V as InputLabel,
|
|
40
|
+
h as InputMessage,
|
|
41
|
+
z as InputSuggestionMenuContent,
|
|
42
|
+
E as InputSuggestionMenuContentItems,
|
|
43
|
+
H as NumberInput,
|
|
44
|
+
R as PasswordInput,
|
|
45
|
+
A as PinInput,
|
|
46
|
+
L as PinInputField,
|
|
47
|
+
j as PinInputHiddenField,
|
|
48
|
+
B as RadioGroup,
|
|
49
|
+
K as RadioInput,
|
|
50
|
+
Q as SelectContent,
|
|
51
|
+
U as SelectInput,
|
|
52
|
+
W as SelectItem,
|
|
53
|
+
X as SelectItemText,
|
|
54
|
+
Y as SelectPortal,
|
|
55
|
+
Z as SelectTrigger,
|
|
56
|
+
_ as SelectValue,
|
|
57
|
+
$ as SelectViewport,
|
|
58
|
+
te as SwitchInput,
|
|
59
|
+
re as TextAreaInput,
|
|
60
|
+
ne as TextInput,
|
|
61
|
+
me as buildDefaultSyntax,
|
|
62
|
+
I as emailValidation,
|
|
63
|
+
k as passwordValidation,
|
|
64
|
+
Ie as useForm
|
|
52
65
|
};
|
|
@@ -5,7 +5,7 @@ import l from "react";
|
|
|
5
5
|
import { mergeComponentProps as f } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
7
|
import '../../assets/components/fullscreen/FullScreen.style.css';/* empty css */
|
|
8
|
-
const
|
|
8
|
+
const M = (i) => {
|
|
9
9
|
const e = m.c(7), t = l.useRef(null);
|
|
10
10
|
let r, o;
|
|
11
11
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
@@ -24,5 +24,5 @@ const R = (i) => {
|
|
|
24
24
|
return e[4] !== i.children || e[5] !== n ? (d = /* @__PURE__ */ u("div", { ...n, ref: t, children: i.children }), e[4] = i.children, e[5] = n, e[6] = d) : d = e[6], d;
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
M as FullScreen
|
|
28
28
|
};
|
|
@@ -7,8 +7,8 @@ import { withAlpha as Q, hashToColor as U } from "../../utils/color.js";
|
|
|
7
7
|
import { GanttFooter as st } from "./GanttFooter.js";
|
|
8
8
|
import { GanttItem as at } from "./GanttItem.js";
|
|
9
9
|
import { GanttHeader as lt } from "./GanttHeader.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const I = (e, t, n, R, l, S) => {
|
|
11
|
+
const _ = Math.max(0, e - n), H = Math.min(l, t - n), V = _ / l * S, f = (H - _) / l * S;
|
|
12
12
|
return {
|
|
13
13
|
left: V,
|
|
14
14
|
width: f
|
|
@@ -19,11 +19,11 @@ const _ = (e, t, n, R, l, S) => {
|
|
|
19
19
|
stepWidth: R,
|
|
20
20
|
rowHeight: l,
|
|
21
21
|
step: S,
|
|
22
|
-
start:
|
|
22
|
+
start: _,
|
|
23
23
|
end: H,
|
|
24
24
|
hideScaling: V,
|
|
25
25
|
children: f
|
|
26
|
-
} = e, u = R === void 0 ? "50px" : R,
|
|
26
|
+
} = e, u = R === void 0 ? "50px" : R, C = l === void 0 ? "50px" : l, r = S === void 0 ? 1 : S, i = _ === void 0 ? 1 : _, o = H === void 0 ? 999999999 : H, s = V === void 0 ? !1 : V, K = J.useRef(null), [X, Y] = J.useState(0), g = parseInt(u), a = o - i, O = Math.ceil(a / r), d = O * g, F = n?.filter(dt) ?? [], E = F.length === 0 ? r : F.reduce(ct, 0) / F.length;
|
|
27
27
|
let k;
|
|
28
28
|
t[0] !== n || t[1] !== i ? (k = n && n.length > 0 ? Math.min(...n.map(pt)) : i, t[0] = n, t[1] = i, t[2] = k) : k = t[2];
|
|
29
29
|
const h = k;
|
|
@@ -32,14 +32,14 @@ const _ = (e, t, n, R, l, S) => {
|
|
|
32
32
|
const c = z, Z = n && n.length > 0 ? Math.ceil((c - i) / r) : O, tt = Math.ceil(X / g), p = Math.max(tt, Z + 2);
|
|
33
33
|
let L, N;
|
|
34
34
|
t[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => {
|
|
35
|
-
const
|
|
35
|
+
const G = () => {
|
|
36
36
|
Y(K.current?.offsetWidth ?? 0);
|
|
37
37
|
};
|
|
38
|
-
return
|
|
38
|
+
return G(), window.addEventListener("resize", G), () => window.removeEventListener("resize", G);
|
|
39
39
|
}, N = [], t[6] = L, t[7] = N) : (L = t[6], N = t[7]), J.useEffect(L, N);
|
|
40
40
|
let w, x, v, $, m, b;
|
|
41
|
-
if (t[8] !==
|
|
42
|
-
const
|
|
41
|
+
if (t[8] !== E || t[9] !== f || t[10] !== p || t[11] !== o || t[12] !== s || t[13] !== c || t[14] !== h || t[15] !== n || t[16] !== e.id || t[17] !== C || t[18] !== i || t[19] !== r || t[20] !== u || t[21] !== g || t[22] !== a || t[23] !== d) {
|
|
42
|
+
const G = n?.length ? n.sort(mt).reduce(ft, []) : [], D = `repeat(${p}, ${u})`;
|
|
43
43
|
let T;
|
|
44
44
|
t[30] !== D ? (T = {
|
|
45
45
|
display: "grid",
|
|
@@ -48,11 +48,11 @@ const _ = (e, t, n, R, l, S) => {
|
|
|
48
48
|
minHeight: "100%"
|
|
49
49
|
}, t[30] = D, t[31] = T) : T = t[31];
|
|
50
50
|
const et = T;
|
|
51
|
-
w = e.id, x = e.id, v = K, $ = et, t[32] !==
|
|
51
|
+
w = e.id, x = e.id, v = K, $ = et, t[32] !== E || t[33] !== p || t[34] !== s || t[35] !== i || t[36] !== r || t[37] !== u ? (m = !s && /* @__PURE__ */ W(lt, { columnCount: p, start: i, step: r, avgDuration: E, stepWidth: u }), t[32] = E, t[33] = p, t[34] = s, t[35] = i, t[36] = r, t[37] = u, t[38] = m) : m = t[38];
|
|
52
52
|
let j;
|
|
53
|
-
t[39] !== f || t[40] !== p || t[41] !== o || t[42] !== s || t[43] !== c || t[44] !== h || t[45] !== e.id || t[46] !==
|
|
53
|
+
t[39] !== f || t[40] !== p || t[41] !== o || t[42] !== s || t[43] !== c || t[44] !== h || t[45] !== e.id || t[46] !== C || t[47] !== i || t[48] !== r || t[49] !== g || t[50] !== a || t[51] !== d ? (j = (nt, it) => /* @__PURE__ */ B("div", { style: {
|
|
54
54
|
gridColumn: "1 / -1",
|
|
55
|
-
height:
|
|
55
|
+
height: C,
|
|
56
56
|
position: "relative",
|
|
57
57
|
backgroundColor: "transparent"
|
|
58
58
|
}, children: [
|
|
@@ -77,8 +77,8 @@ const _ = (e, t, n, R, l, S) => {
|
|
|
77
77
|
${Q(U(e.id.replace("target", "source")), 0.5)} 4px
|
|
78
78
|
)
|
|
79
79
|
`,
|
|
80
|
-
left: `${
|
|
81
|
-
width: `${
|
|
80
|
+
left: `${I(h, h + r, i, o, a, d).left}px`,
|
|
81
|
+
width: `${I(h, h + r, i, o, a, d).width}px`
|
|
82
82
|
} }),
|
|
83
83
|
/* @__PURE__ */ W("div", { className: "gantt__group-wrapper", style: {
|
|
84
84
|
backgroundImage: `
|
|
@@ -90,15 +90,15 @@ const _ = (e, t, n, R, l, S) => {
|
|
|
90
90
|
${Q(U(e.id.replace("target", "source")), 0.5)} 4px
|
|
91
91
|
)
|
|
92
92
|
`,
|
|
93
|
-
left: `${
|
|
94
|
-
width: `${
|
|
93
|
+
left: `${I(c - r, c, i, o, a, d).left}px`,
|
|
94
|
+
width: `${I(c - r, c, i, o, a, d).width}px`
|
|
95
95
|
} })
|
|
96
96
|
] }),
|
|
97
97
|
nt.map((M, A) => {
|
|
98
|
-
const q =
|
|
98
|
+
const q = I(M.start, M.end, i, o, a, d);
|
|
99
99
|
return q.width > 0 && /* @__PURE__ */ W(at, { id: M.id, w: `${q.width}px`, left: `${q.left}px`, children: f?.(M, A) }, M.id);
|
|
100
100
|
})
|
|
101
|
-
] }, `row-${it}`), t[39] = f, t[40] = p, t[41] = o, t[42] = s, t[43] = c, t[44] = h, t[45] = e.id, t[46] =
|
|
101
|
+
] }, `row-${it}`), t[39] = f, t[40] = p, t[41] = o, t[42] = s, t[43] = c, t[44] = h, t[45] = e.id, t[46] = C, t[47] = i, t[48] = r, t[49] = g, t[50] = a, t[51] = d, t[52] = j) : j = t[52], b = G.map(j), t[8] = E, t[9] = f, t[10] = p, t[11] = o, t[12] = s, t[13] = c, t[14] = h, t[15] = n, t[16] = e.id, t[17] = C, t[18] = i, t[19] = r, t[20] = u, t[21] = g, t[22] = a, t[23] = d, t[24] = w, t[25] = x, t[26] = v, t[27] = $, t[28] = m, t[29] = b;
|
|
102
102
|
} else
|
|
103
103
|
w = t[24], x = t[25], v = t[26], $ = t[27], m = t[28], b = t[29];
|
|
104
104
|
let y;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentProps } from '../../utils';
|
|
2
|
+
import { default as React, CSSProperties } from 'react';
|
|
3
|
+
import * as Radix from "@radix-ui/react-progress";
|
|
4
|
+
export type ProgressProps = ComponentProps & Radix.ProgressProps & {
|
|
5
|
+
color?: CSSProperties['background'];
|
|
6
|
+
predictionValue?: number | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "../../utils/contextStore.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { mergeComponentProps as l } from "../../utils/component.js";
|
|
5
|
+
import "js-md5";
|
|
6
|
+
import { Progress as d, ProgressIndicator as n } from "../../node_modules/@radix-ui/react-progress/dist/index.js";
|
|
7
|
+
import '../../assets/components/progress/Progress.style.css';/* empty css */
|
|
8
|
+
const y = (r) => {
|
|
9
|
+
const {
|
|
10
|
+
color: a = "white",
|
|
11
|
+
predictionValue: g,
|
|
12
|
+
...o
|
|
13
|
+
} = r, t = Math.min(r.value ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, m = `translateX(-${100 - t}%)`, s = Math.min(r.predictionValue ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, c = `translateX(-${100 - s}%)`;
|
|
14
|
+
return /* @__PURE__ */ i(d, { ...l("progress", {
|
|
15
|
+
...o,
|
|
16
|
+
style: {
|
|
17
|
+
...o.style,
|
|
18
|
+
"--progress": t,
|
|
19
|
+
"--progressPrediction": s,
|
|
20
|
+
"--color": a
|
|
21
|
+
}
|
|
22
|
+
}), children: [
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "progress__dot" }),
|
|
24
|
+
/* @__PURE__ */ i("div", { style: {
|
|
25
|
+
width: "100%",
|
|
26
|
+
height: "100%",
|
|
27
|
+
overflow: "hidden",
|
|
28
|
+
borderRadius: "inherit",
|
|
29
|
+
position: "relative"
|
|
30
|
+
}, children: [
|
|
31
|
+
/* @__PURE__ */ e(n, { className: "progress__indicator", style: {
|
|
32
|
+
transform: m
|
|
33
|
+
} }),
|
|
34
|
+
typeof r.predictionValue == "number" && /* @__PURE__ */ e(n, { className: "progress__indicator progress__indicator--prediction", style: {
|
|
35
|
+
transform: c
|
|
36
|
+
} })
|
|
37
|
+
] })
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
y as Progress
|
|
42
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './components/fullscreen/FullScreen';
|
|
|
21
21
|
export * from './components/gantt/Gantt';
|
|
22
22
|
export * from './components/layout/Layout';
|
|
23
23
|
export * from './components/menu/Menu';
|
|
24
|
+
export * from './components/progress/Progress';
|
|
24
25
|
export * from './components/quote/Quote';
|
|
25
26
|
export * from './components/resizable/Resizable';
|
|
26
27
|
export * from './components/row/Row';
|