@code0-tech/pictor 0.17.2 → 0.18.1
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/command/Command.style.css +1 -1
- package/dist/assets/components/progress/Progress.style.css +1 -1
- package/dist/components/command/Command.js +70 -63
- package/dist/components/form/InputWrapper.js +33 -33
- package/dist/components/form/PasswordInput.js +1 -1
- package/dist/components/form/TextInput.d.ts +1 -1
- package/dist/components/progress/ProgressCircle.d.ts +8 -0
- package/dist/components/progress/ProgressCircle.js +49 -0
- package/dist/components/progress/ProgressLinear.d.ts +12 -0
- package/dist/components/progress/{Progress.js → ProgressLinear.js} +15 -15
- package/dist/index.d.ts +2 -1
- package/dist/index.js +56 -54
- package/package.json +1 -1
- package/dist/components/progress/Progress.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
.command{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;padding:.563rem;box-sizing:border-box}.command__dialog{padding:0}.command__list:focus{outline:none}.
|
|
1
|
+
.command{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;padding:.563rem;box-sizing:border-box}.command__dialog{padding:0}.command__list:focus{outline:none}.command__empty{padding:1rem 0 1.777rem;text-align:center;font-size:.75rem;color:#ffffff80}.command__empty{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command [cmdk-group-heading]{padding:.422rem .563rem}.command__group{overflow:hidden;text-transform:uppercase;font-size:.563rem;padding:.422rem 0 0;color:#ffffff80}.command__group{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command__item{position:relative;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;font-size:.75rem;outline:none;color:#ffffffbf;border-radius:.578rem;padding:.422rem .422rem .422rem .75rem;gap:.563rem;text-transform:none}.command__item[data-disabled=true]{pointer-events:none;color:#ffffff40}.command__item[data-selected=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;width:100%}.command__item svg{pointer-events:none;width:1rem;height:1rem;flex-shrink:0}.command__separator{height:1px;margin:.422rem 0;background:#ffffff1a}.command__shortcut{margin-left:auto;font-size:.563rem;letter-spacing:.1rem;padding:0 .422rem;border-radius:.375rem!important;color:#ffffff80;background:#070514}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.progress{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;box-sizing:border-box;background:transparent;border-radius:1rem;width:100%;height:10px;position:relative;transform:translateZ(0)}.progress:before{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:var(--color);opacity:.1;content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit}.
|
|
1
|
+
.progress-linear{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;box-sizing:border-box;background:transparent;border-radius:1rem;width:100%;height:10px;position:relative;transform:translateZ(0)}.progress-linear:before{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:var(--color);opacity:.1;content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit}.progress-linear__dot{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;top:50%;transform:translate(50%) translateY(-50%);right:calc(100% - 1% * (var(--progress, 0)))}.progress-linear__indicator{position:absolute;background:var(--color);border-radius:inherit;background-position:left center;background-repeat:no-repeat;background-size:calc(100% * 100 / var(--progress, 100)) 100%;width:100%;height:100%;z-index:1}.progress-linear__indicator--prediction{background:repeating-linear-gradient(-45deg,rgba(0,0,0,.25),rgba(0,0,0,.25) 2.5px,transparent 2.5px,transparent 5px),var(--color);z-index:0;opacity:.25;background-position:left center;background-repeat:no-repeat;background-size:calc(100% * 100 / var(--progressPrediction, 100)) 100%}.progress-circle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--size);height:var(--size)}.progress-circle__circle{display:block;width:var(--size);height:var(--size);transform:translateZ(0)}.progress-circle__track{opacity:.1;stroke:var(--color);stroke-linecap:round}.progress-circle__prediction{opacity:.25;stroke:url(#circle-stripe-overlay);stroke-linecap:round;z-index:1}.progress-circle__range{stroke:var(--color);stroke-linecap:round;z-index:2}.progress-circle__dot{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { jsx as i, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { Command as a } from "cmdk";
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { mergeComponentProps as r } from "../../utils/component.js";
|
|
7
7
|
import "js-md5";
|
|
8
|
-
import { DialogPortal as
|
|
8
|
+
import { DialogPortal as h, DialogContent as g, Dialog as C, DialogOverlay as _ } from "../dialog/Dialog.js";
|
|
9
9
|
import '../../assets/components/form/FileInput.style.css';import '../../assets/components/form/DateInput.style.css';import '../../assets/components/form/SelectInput.style.css';import '../../assets/components/flex/Flex.style.css';import '../../assets/components/form/Input.style.css';import '../../assets/components/command/Command.style.css';/* empty css */
|
|
10
|
-
import { Badge as
|
|
10
|
+
import { Badge as $ } from "../badge/Badge.js";
|
|
11
11
|
import "@radix-ui/react-checkbox";
|
|
12
12
|
import "@tabler/icons-react";
|
|
13
13
|
/* empty css */
|
|
@@ -32,97 +32,104 @@ import "@radix-ui/react-radio-group";
|
|
|
32
32
|
import "../form/SwitchInput.js";
|
|
33
33
|
import "../form/TagInput.js";
|
|
34
34
|
import "../form/TextAreaInput.js";
|
|
35
|
-
import { TextInput as
|
|
36
|
-
const
|
|
35
|
+
import { TextInput as P } from "../form/TextInput.js";
|
|
36
|
+
const y = (e) => {
|
|
37
37
|
const t = c.c(4);
|
|
38
|
-
let m;
|
|
39
|
-
t[0] !== e ? (m = r("command", e), t[0] = e, t[1] = m) : m = t[1];
|
|
40
|
-
const o = m;
|
|
41
38
|
let n;
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
t[0] !== e ? (n = r("command", e), t[0] = e, t[1] = n) : n = t[1];
|
|
40
|
+
const m = n;
|
|
41
|
+
let o;
|
|
42
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
43
|
+
}, nt = (e) => {
|
|
44
44
|
const t = c.c(11);
|
|
45
|
+
let n;
|
|
46
|
+
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i(_, {}), t[0] = n) : n = t[0];
|
|
45
47
|
let m;
|
|
46
|
-
t[
|
|
48
|
+
t[1] !== e ? (m = /* @__PURE__ */ i(y, { ...e, h: "100%", children: e.children }), t[1] = e, t[2] = m) : m = t[2];
|
|
47
49
|
let o;
|
|
48
|
-
t[
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */ i(h, { className: "command__dialog", ...e.contentProps, children: o })
|
|
53
|
-
] }), t[3] = e.contentProps, t[4] = o, t[5] = n) : n = t[5];
|
|
50
|
+
t[3] !== e.contentProps || t[4] !== m ? (o = /* @__PURE__ */ u(h, { children: [
|
|
51
|
+
n,
|
|
52
|
+
/* @__PURE__ */ i(g, { className: "command__dialog", ...e.contentProps, children: m })
|
|
53
|
+
] }), t[3] = e.contentProps, t[4] = m, t[5] = o) : o = t[5];
|
|
54
54
|
let l;
|
|
55
|
-
return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !==
|
|
56
|
-
},
|
|
55
|
+
return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !== o ? (l = /* @__PURE__ */ i(C, { ...e.dialogProps, open: e.open, onOpenChange: e.onOpenChange, children: o }), t[6] = e.dialogProps, t[7] = e.onOpenChange, t[8] = e.open, t[9] = o, t[10] = l) : l = t[10], l;
|
|
56
|
+
}, ot = (e) => {
|
|
57
57
|
const t = c.c(4);
|
|
58
|
-
let m;
|
|
59
|
-
t[0] !== e ? (m = r("command__list", e), t[0] = e, t[1] = m) : m = t[1];
|
|
60
|
-
const o = m;
|
|
61
58
|
let n;
|
|
62
|
-
|
|
59
|
+
t[0] !== e ? (n = r("command__list", e), t[0] = e, t[1] = n) : n = t[1];
|
|
60
|
+
const m = n;
|
|
61
|
+
let o;
|
|
62
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a.List, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
63
63
|
}, mt = (e) => {
|
|
64
|
-
const t = c.c(
|
|
64
|
+
const t = c.c(11);
|
|
65
|
+
let n;
|
|
66
|
+
t[0] !== e.value ? (n = e.value?.toString(), t[0] = e.value, t[1] = n) : n = t[1];
|
|
65
67
|
let m;
|
|
66
|
-
t[
|
|
67
|
-
let o;
|
|
68
|
-
t[2] !== e ? (o = (d) => {
|
|
68
|
+
t[2] !== e ? (m = (s) => {
|
|
69
69
|
if (e.onChange) {
|
|
70
70
|
const f = {
|
|
71
71
|
target: {
|
|
72
|
-
value:
|
|
72
|
+
value: s
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
e.onChange(f);
|
|
76
76
|
}
|
|
77
|
-
}, t[2] = e, t[3] =
|
|
78
|
-
let
|
|
79
|
-
t[4]
|
|
77
|
+
}, t[2] = e, t[3] = m) : m = t[3];
|
|
78
|
+
let o;
|
|
79
|
+
t[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
|
|
80
|
+
style: {
|
|
81
|
+
background: "transparent",
|
|
82
|
+
boxShadow: "none"
|
|
83
|
+
}
|
|
84
|
+
}, t[4] = o) : o = t[4];
|
|
80
85
|
let l;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
let m;
|
|
85
|
-
t[0] !== e ? (m = r("command__empty", e), t[0] = e, t[1] = m) : m = t[1];
|
|
86
|
-
const o = m;
|
|
87
|
-
let n;
|
|
88
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(a.Empty, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
86
|
+
t[5] !== e ? (l = /* @__PURE__ */ i(P, { wrapperComponent: o, className: "command__input", ...e }), t[5] = e, t[6] = l) : l = t[6];
|
|
87
|
+
let d;
|
|
88
|
+
return t[7] !== n || t[8] !== m || t[9] !== l ? (d = /* @__PURE__ */ i(a.Input, { value: n, onValueChange: m, asChild: !0, children: l }), t[7] = n, t[8] = m, t[9] = l, t[10] = d) : d = t[10], d;
|
|
89
89
|
}, it = (e) => {
|
|
90
90
|
const t = c.c(4);
|
|
91
|
-
let m;
|
|
92
|
-
t[0] !== e ? (m = r("command__group", e), t[0] = e, t[1] = m) : m = t[1];
|
|
93
|
-
const o = m;
|
|
94
91
|
let n;
|
|
95
|
-
|
|
92
|
+
t[0] !== e ? (n = r("command__empty", e), t[0] = e, t[1] = n) : n = t[1];
|
|
93
|
+
const m = n;
|
|
94
|
+
let o;
|
|
95
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a.Empty, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
96
96
|
}, lt = (e) => {
|
|
97
97
|
const t = c.c(4);
|
|
98
|
-
let m;
|
|
99
|
-
t[0] !== e ? (m = r("command__item", e), t[0] = e, t[1] = m) : m = t[1];
|
|
100
|
-
const o = m;
|
|
101
98
|
let n;
|
|
102
|
-
|
|
99
|
+
t[0] !== e ? (n = r("command__group", e), t[0] = e, t[1] = n) : n = t[1];
|
|
100
|
+
const m = n;
|
|
101
|
+
let o;
|
|
102
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a.Group, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
103
103
|
}, ct = (e) => {
|
|
104
104
|
const t = c.c(4);
|
|
105
|
-
let m;
|
|
106
|
-
t[0] !== e ? (m = r("command__separator", e), t[0] = e, t[1] = m) : m = t[1];
|
|
107
|
-
const o = m;
|
|
108
105
|
let n;
|
|
109
|
-
|
|
106
|
+
t[0] !== e ? (n = r("command__item", e), t[0] = e, t[1] = n) : n = t[1];
|
|
107
|
+
const m = n;
|
|
108
|
+
let o;
|
|
109
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a.Item, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
110
110
|
}, at = (e) => {
|
|
111
|
+
const t = c.c(4);
|
|
112
|
+
let n;
|
|
113
|
+
t[0] !== e ? (n = r("command__separator", e), t[0] = e, t[1] = n) : n = t[1];
|
|
114
|
+
const m = n;
|
|
115
|
+
let o;
|
|
116
|
+
return t[2] !== m ? (o = /* @__PURE__ */ i(a.Separator, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
|
|
117
|
+
}, rt = (e) => {
|
|
111
118
|
const t = c.c(5);
|
|
112
|
-
let m;
|
|
113
|
-
t[0] !== e ? (m = r("command__shortcut", e), t[0] = e, t[1] = m) : m = t[1];
|
|
114
|
-
const o = m;
|
|
115
119
|
let n;
|
|
116
|
-
|
|
120
|
+
t[0] !== e ? (n = r("command__shortcut", e), t[0] = e, t[1] = n) : n = t[1];
|
|
121
|
+
const m = n;
|
|
122
|
+
let o;
|
|
123
|
+
return t[2] !== e.children || t[3] !== m ? (o = /* @__PURE__ */ i($, { ...m, children: e.children }), t[2] = e.children, t[3] = m, t[4] = o) : o = t[4], o;
|
|
117
124
|
};
|
|
118
125
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
y as Command,
|
|
127
|
+
nt as CommandDialog,
|
|
128
|
+
it as CommandEmpty,
|
|
129
|
+
lt as CommandGroup,
|
|
123
130
|
mt as CommandInput,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
ct as CommandItem,
|
|
132
|
+
ot as CommandList,
|
|
133
|
+
at as CommandSeparator,
|
|
134
|
+
rt as CommandShortcut
|
|
128
135
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as T, jsx as s, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { c as N } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
|
-
import
|
|
4
|
+
import p from "react";
|
|
5
5
|
import { mergeComponentProps as P } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
7
|
import { InputMessage as k } from "./InputMessage.js";
|
|
8
8
|
import { InputLabel as C } from "./InputLabel.js";
|
|
9
9
|
import { InputDescription as D } from "./InputDescription.js";
|
|
10
10
|
import '../../assets/components/form/InputWrapper.style.css';/* empty css */
|
|
11
|
-
const
|
|
11
|
+
const U = p.forwardRef((F, W) => {
|
|
12
12
|
const e = N.c(22), {
|
|
13
|
-
children:
|
|
14
|
-
left:
|
|
15
|
-
right:
|
|
13
|
+
children: a,
|
|
14
|
+
left: d,
|
|
15
|
+
right: c,
|
|
16
16
|
leftType: $,
|
|
17
17
|
rightType: x,
|
|
18
|
-
title:
|
|
19
|
-
description:
|
|
20
|
-
formValidation:
|
|
21
|
-
...
|
|
22
|
-
} = F, b = $ === void 0 ? "icon" : $,
|
|
23
|
-
let
|
|
24
|
-
e[0] !==
|
|
18
|
+
title: m,
|
|
19
|
+
description: f,
|
|
20
|
+
formValidation: u,
|
|
21
|
+
...h
|
|
22
|
+
} = F, b = $ === void 0 ? "icon" : $, I = x === void 0 ? "action" : x;
|
|
23
|
+
let g;
|
|
24
|
+
e[0] !== u ? (g = u === void 0 ? {
|
|
25
25
|
valid: !0,
|
|
26
26
|
notValidMessage: null,
|
|
27
27
|
setValue: null
|
|
28
|
-
} :
|
|
29
|
-
const t =
|
|
30
|
-
id:
|
|
31
|
-
...
|
|
32
|
-
"aria-labelledby":
|
|
28
|
+
} : u, e[0] = u, e[1] = g) : g = e[1];
|
|
29
|
+
const t = g, R = p.useId(), _ = (p.isValidElement(a) ? a.props.id : void 0) ?? h.id ?? R, E = `${_}-label`, M = m ? void 0 : h["aria-label"] ?? h.placeholder, j = {
|
|
30
|
+
id: _,
|
|
31
|
+
...m ? {
|
|
32
|
+
"aria-labelledby": E
|
|
33
33
|
} : {},
|
|
34
|
-
...
|
|
35
|
-
"aria-label":
|
|
34
|
+
...M ? {
|
|
35
|
+
"aria-label": M
|
|
36
36
|
} : {}
|
|
37
|
-
}, V =
|
|
37
|
+
}, V = m && /* @__PURE__ */ s(C, { htmlFor: _, id: E, children: m });
|
|
38
38
|
let i;
|
|
39
|
-
e[2] !==
|
|
40
|
-
const w = P(`input-wrapper ${t?.valid ? "" : "input-wrapper--not-valid"}`,
|
|
39
|
+
e[2] !== f ? (i = f && /* @__PURE__ */ s(D, { children: f }), e[2] = f, e[3] = i) : i = e[3];
|
|
40
|
+
const w = P(`input-wrapper ${t?.valid ? "" : "input-wrapper--not-valid"}`, h);
|
|
41
41
|
let l;
|
|
42
|
-
e[4] !==
|
|
43
|
-
const y =
|
|
42
|
+
e[4] !== d || e[5] !== b ? (l = d && /* @__PURE__ */ s("div", { className: `input-wrapper__left input__left--${b}`, children: d }), e[4] = d, e[5] = b, e[6] = l) : l = e[6];
|
|
43
|
+
const y = p.isValidElement(a) ? p.cloneElement(a, {
|
|
44
44
|
...j
|
|
45
|
-
}) :
|
|
45
|
+
}) : a;
|
|
46
46
|
let r;
|
|
47
|
-
e[7] !==
|
|
47
|
+
e[7] !== c || e[8] !== I ? (r = c && /* @__PURE__ */ s("div", { className: `input-wrapper__right input-wrapper__right--${I}`, children: c }), e[7] = c, e[8] = I, e[9] = r) : r = e[9];
|
|
48
48
|
let o;
|
|
49
|
-
e[10] !== w || e[11] !== l || e[12] !== y || e[13] !== r ? (o = /* @__PURE__ */
|
|
49
|
+
e[10] !== w || e[11] !== l || e[12] !== y || e[13] !== r ? (o = /* @__PURE__ */ T("div", { ...w, children: [
|
|
50
50
|
l,
|
|
51
51
|
y,
|
|
52
52
|
r
|
|
53
53
|
] }), e[10] = w, e[11] = l, e[12] = y, e[13] = r, e[14] = o) : o = e[14];
|
|
54
54
|
let n;
|
|
55
|
-
e[15] !== t ? (n = !t?.valid && t?.notValidMessage && /* @__PURE__ */
|
|
56
|
-
let
|
|
57
|
-
return e[17] !== o || e[18] !== n || e[19] !== V || e[20] !== i ? (
|
|
55
|
+
e[15] !== t ? (n = !t?.valid && t?.notValidMessage && /* @__PURE__ */ s(k, { children: t.notValidMessage }), e[15] = t, e[16] = n) : n = e[16];
|
|
56
|
+
let v;
|
|
57
|
+
return e[17] !== o || e[18] !== n || e[19] !== V || e[20] !== i ? (v = /* @__PURE__ */ T(L, { children: [
|
|
58
58
|
V,
|
|
59
59
|
i,
|
|
60
60
|
o,
|
|
61
61
|
n
|
|
62
|
-
] }), e[17] = o, e[18] = n, e[19] = V, e[20] = i, e[21] =
|
|
62
|
+
] }), e[17] = o, e[18] = n, e[19] = V, e[20] = i, e[21] = v) : v = e[21], v;
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
U as InputWrapper
|
|
66
66
|
};
|
|
@@ -5,7 +5,7 @@ import { IconEye as R, IconX as z } from "@tabler/icons-react";
|
|
|
5
5
|
import { Button as p } from "../button/Button.js";
|
|
6
6
|
import { clearInputElement as P } from "./Input.utils.js";
|
|
7
7
|
import { Flex as A } from "../flex/Flex.js";
|
|
8
|
-
import {
|
|
8
|
+
import { ProgressLinear as B } from "../progress/ProgressLinear.js";
|
|
9
9
|
import { InputMessage as D } from "./InputMessage.js";
|
|
10
10
|
import { ButtonGroup as C } from "../button-group/ButtonGroup.js";
|
|
11
11
|
const X = u.forwardRef((r, t) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { InputProps } from './Input';
|
|
3
|
-
export interface TextInputProps extends Omit<InputProps<string | null>, "
|
|
3
|
+
export interface TextInputProps extends Omit<InputProps<string | null>, "type"> {
|
|
4
4
|
clearable?: boolean;
|
|
5
5
|
onClear?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProgressRootProps } from '@ark-ui/react';
|
|
2
|
+
import { default as React, CSSProperties } from 'react';
|
|
3
|
+
import { ProgressProps } from './ProgressLinear';
|
|
4
|
+
export type ProgressCircleProps = ProgressProps & Omit<ProgressRootProps, 'value' | 'max' | 'color'> & {
|
|
5
|
+
size?: CSSProperties['width'];
|
|
6
|
+
thickness?: CSSProperties['strokeWidth'];
|
|
7
|
+
};
|
|
8
|
+
export declare const ProgressCircle: React.FC<ProgressCircleProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "../../utils/contextStore.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { mergeComponentProps as m } from "../../utils/component.js";
|
|
5
|
+
import "js-md5";
|
|
6
|
+
import { ProgressRoot as f, ProgressCircle as _, ProgressCircleTrack as P, ProgressCircleRange as c } from "@ark-ui/react";
|
|
7
|
+
import '../../assets/components/progress/Progress.style.css';/* empty css */
|
|
8
|
+
const u = (l) => {
|
|
9
|
+
const {
|
|
10
|
+
color: n = "white",
|
|
11
|
+
predictionValue: a = 0,
|
|
12
|
+
dot: p,
|
|
13
|
+
value: h,
|
|
14
|
+
max: g = 100,
|
|
15
|
+
size: d = 64,
|
|
16
|
+
thickness: i,
|
|
17
|
+
...t
|
|
18
|
+
} = l, o = (e) => typeof e == "number" ? `${e}px` : e;
|
|
19
|
+
return /* @__PURE__ */ s(f, { value: h, max: g, ...m("progress-circle", {
|
|
20
|
+
...t,
|
|
21
|
+
style: {
|
|
22
|
+
...t.style,
|
|
23
|
+
"--size": o(d),
|
|
24
|
+
"--thickness": i !== void 0 ? o(i) : "calc(var(--size) / 8)",
|
|
25
|
+
"--color": n
|
|
26
|
+
}
|
|
27
|
+
}), children: [
|
|
28
|
+
/* @__PURE__ */ s(_, { className: "progress-circle__circle", children: [
|
|
29
|
+
/* @__PURE__ */ r(P, { className: "progress-circle__track" }),
|
|
30
|
+
/* @__PURE__ */ r("svg", { style: {
|
|
31
|
+
position: "absolute",
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0,
|
|
34
|
+
overflow: "hidden"
|
|
35
|
+
}, children: /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ s("pattern", { id: "circle-stripe-overlay", width: "5", height: "5", patternUnits: "userSpaceOnUse", patternTransform: "rotate(-45)", children: [
|
|
36
|
+
/* @__PURE__ */ r("rect", { width: "5", height: "5", fill: "var(--color)" }),
|
|
37
|
+
/* @__PURE__ */ r("rect", { width: "2.5", height: "5", fill: "rgba(0, 0, 0, 0.25)" })
|
|
38
|
+
] }) }) }),
|
|
39
|
+
/* @__PURE__ */ r(c, { style: {
|
|
40
|
+
"--percent": a
|
|
41
|
+
}, className: "progress-circle__prediction" }),
|
|
42
|
+
/* @__PURE__ */ r(c, { className: "progress-circle__range" })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ r("div", { className: "progress-circle__dot", children: p })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
u as ProgressCircle
|
|
49
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 & {
|
|
5
|
+
value?: number | null;
|
|
6
|
+
max?: number;
|
|
7
|
+
color?: CSSProperties['background'];
|
|
8
|
+
dot?: React.ReactNode;
|
|
9
|
+
predictionValue?: number | null;
|
|
10
|
+
};
|
|
11
|
+
export type ProgressLinearProps = ProgressProps & Omit<Radix.ProgressProps, 'value' | 'max' | 'color'>;
|
|
12
|
+
export declare const ProgressLinear: React.FC<ProgressLinearProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../utils/contextStore.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { mergeComponentProps as
|
|
4
|
+
import { mergeComponentProps as d } from "../../utils/component.js";
|
|
5
5
|
import "js-md5";
|
|
6
6
|
import * as o from "@radix-ui/react-progress";
|
|
7
7
|
import '../../assets/components/progress/Progress.style.css';/* empty css */
|
|
@@ -9,19 +9,19 @@ const _ = (r) => {
|
|
|
9
9
|
const {
|
|
10
10
|
color: a = "white",
|
|
11
11
|
predictionValue: g,
|
|
12
|
-
dot:
|
|
13
|
-
...
|
|
14
|
-
} = r,
|
|
15
|
-
return /* @__PURE__ */ n(o.Progress, { ...
|
|
16
|
-
...
|
|
12
|
+
dot: l,
|
|
13
|
+
...i
|
|
14
|
+
} = r, t = Math.min(r.value ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, c = `translateX(-${100 - t}%)`, s = Math.min(r.predictionValue ?? 0, r.max ?? 100) / (r.max ?? 100) * 100, m = `translateX(-${100 - s}%)`;
|
|
15
|
+
return /* @__PURE__ */ n(o.Progress, { ...d("progress-linear", {
|
|
16
|
+
...i,
|
|
17
17
|
style: {
|
|
18
|
-
...
|
|
19
|
-
"--progress":
|
|
20
|
-
"--progressPrediction":
|
|
18
|
+
...i.style,
|
|
19
|
+
"--progress": t,
|
|
20
|
+
"--progressPrediction": s,
|
|
21
21
|
"--color": a
|
|
22
22
|
}
|
|
23
23
|
}), children: [
|
|
24
|
-
/* @__PURE__ */ e("div", { className: "
|
|
24
|
+
/* @__PURE__ */ e("div", { className: "progress-linear__dot", children: l }),
|
|
25
25
|
/* @__PURE__ */ n("div", { style: {
|
|
26
26
|
width: "100%",
|
|
27
27
|
height: "100%",
|
|
@@ -29,15 +29,15 @@ const _ = (r) => {
|
|
|
29
29
|
borderRadius: "inherit",
|
|
30
30
|
position: "relative"
|
|
31
31
|
}, children: [
|
|
32
|
-
/* @__PURE__ */ e(o.ProgressIndicator, { className: "
|
|
33
|
-
transform:
|
|
32
|
+
/* @__PURE__ */ e(o.ProgressIndicator, { className: "progress-linear__indicator", style: {
|
|
33
|
+
transform: c
|
|
34
34
|
} }),
|
|
35
|
-
typeof r.predictionValue == "number" && /* @__PURE__ */ e(o.ProgressIndicator, { className: "
|
|
36
|
-
transform:
|
|
35
|
+
typeof r.predictionValue == "number" && /* @__PURE__ */ e(o.ProgressIndicator, { className: "progress-linear__indicator progress-linear__indicator--prediction", style: {
|
|
36
|
+
transform: m
|
|
37
37
|
} })
|
|
38
38
|
] })
|
|
39
39
|
] });
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
_ as
|
|
42
|
+
_ as ProgressLinear
|
|
43
43
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ export * from './components/gantt/Gantt';
|
|
|
24
24
|
export * from './components/icon/Icon';
|
|
25
25
|
export * from './components/layout/Layout';
|
|
26
26
|
export * from './components/menu/Menu';
|
|
27
|
-
export * from './components/progress/
|
|
27
|
+
export * from './components/progress/ProgressLinear';
|
|
28
|
+
export * from './components/progress/ProgressCircle';
|
|
28
29
|
export * from './components/quote/Quote';
|
|
29
30
|
export * from './components/resizable/Resizable';
|
|
30
31
|
export * from './components/row/Row';
|
package/dist/index.js
CHANGED
|
@@ -50,26 +50,27 @@ import { Gantt as so, getRelativeValue as Do } from "./components/gantt/Gantt.js
|
|
|
50
50
|
import { Icon as Fo, resolveIcon as Po } from "./components/icon/Icon.js";
|
|
51
51
|
import { Layout as wo } from "./components/layout/Layout.js";
|
|
52
52
|
import { Menu as vo, MenuArrow as Vo, MenuCheckboxItem as Lo, MenuContent as Eo, MenuGroup as Ro, MenuItem as Go, MenuItemIndicator as yo, MenuLabel as zo, MenuPortal as Bo, MenuSeparator as Ho, MenuSub as ko, MenuSubContent as No, MenuSubTrigger as Qo, MenuTrigger as Jo } from "./components/menu/Menu.js";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
53
|
+
import { ProgressLinear as jo } from "./components/progress/ProgressLinear.js";
|
|
54
|
+
import { ProgressCircle as Ko } from "./components/progress/ProgressCircle.js";
|
|
55
|
+
import { Quote as Wo } from "./components/quote/Quote.js";
|
|
56
|
+
import { ResizableHandle as Yo, ResizablePanel as Zo, ResizablePanelGroup as _o } from "./components/resizable/Resizable.js";
|
|
57
|
+
import { Row as er } from "./components/row/Row.js";
|
|
58
|
+
import { AutoScrollArea as or, ScrollArea as rr, ScrollAreaCorner as nr, ScrollAreaScrollbar as ar, ScrollAreaThumb as pr, ScrollAreaViewport as ur } from "./components/scroll-area/ScrollArea.js";
|
|
59
|
+
import { SegmentedControl as lr, SegmentedControlItem as mr } from "./components/segmented-control/SegmentedControl.js";
|
|
60
|
+
import { Spacing as gr } from "./components/spacing/Spacing.js";
|
|
61
|
+
import { Tab as fr, TabContent as Cr, TabList as Tr, TabTrigger as dr } from "./components/tab/Tab.js";
|
|
62
|
+
import { Text as br } from "./components/text/Text.js";
|
|
63
|
+
import { Toast as sr, toast as Dr } from "./components/toast/Toast.js";
|
|
64
|
+
import { Tooltip as Fr, TooltipArrow as Pr, TooltipContent as Ar, TooltipPortal as wr, TooltipTrigger as hr } from "./components/tooltip/Tooltip.js";
|
|
65
|
+
import { ContextStore as Vr, ContextStoreProvider as Lr, useService as Er, useStore as Rr } from "./utils/contextStore.js";
|
|
66
|
+
import { ReactiveArrayService as yr, useReactiveArrayService as zr } from "./utils/reactiveArrayService.js";
|
|
67
|
+
import { mergeComponentProps as Hr } from "./utils/component.js";
|
|
68
|
+
import { Colors as Nr, hashToColor as Qr, withAlpha as Jr } from "./utils/color.js";
|
|
69
|
+
import { getSize as jr } from "./utils/size.js";
|
|
69
70
|
export {
|
|
70
71
|
o as Alert,
|
|
71
72
|
n as AuroraBackground,
|
|
72
|
-
|
|
73
|
+
or as AutoScrollArea,
|
|
73
74
|
p as Avatar,
|
|
74
75
|
i as Badge,
|
|
75
76
|
m as Breadcrumb,
|
|
@@ -87,7 +88,7 @@ export {
|
|
|
87
88
|
je as ColorInputSwatch,
|
|
88
89
|
qe as ColorInputTrigger,
|
|
89
90
|
Ke as ColorInputValueText,
|
|
90
|
-
|
|
91
|
+
Nr as Colors,
|
|
91
92
|
A as Command,
|
|
92
93
|
w as CommandDialog,
|
|
93
94
|
h as CommandEmpty,
|
|
@@ -110,8 +111,8 @@ export {
|
|
|
110
111
|
U as ContextMenuSubContent,
|
|
111
112
|
W as ContextMenuSubTrigger,
|
|
112
113
|
X as ContextMenuTrigger,
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
Vr as ContextStore,
|
|
115
|
+
Lr as ContextStoreProvider,
|
|
115
116
|
Z as DataTable,
|
|
116
117
|
$ as DataTableColumn,
|
|
117
118
|
ge as DataTableFilterInput,
|
|
@@ -196,22 +197,23 @@ export {
|
|
|
196
197
|
Ht as PinInput,
|
|
197
198
|
kt as PinInputField,
|
|
198
199
|
Nt as PinInputHiddenField,
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
Ko as ProgressCircle,
|
|
201
|
+
jo as ProgressLinear,
|
|
202
|
+
Wo as Quote,
|
|
201
203
|
Jt as RadioGroup,
|
|
202
204
|
jt as RadioInput,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
205
|
+
yr as ReactiveArrayService,
|
|
206
|
+
Yo as ResizableHandle,
|
|
207
|
+
Zo as ResizablePanel,
|
|
208
|
+
_o as ResizablePanelGroup,
|
|
209
|
+
er as Row,
|
|
210
|
+
rr as ScrollArea,
|
|
211
|
+
nr as ScrollAreaCorner,
|
|
212
|
+
ar as ScrollAreaScrollbar,
|
|
213
|
+
pr as ScrollAreaThumb,
|
|
214
|
+
ur as ScrollAreaViewport,
|
|
215
|
+
lr as SegmentedControl,
|
|
216
|
+
mr as SegmentedControlItem,
|
|
215
217
|
Kt as SelectContent,
|
|
216
218
|
Ut as SelectInput,
|
|
217
219
|
Wt as SelectItem,
|
|
@@ -220,40 +222,40 @@ export {
|
|
|
220
222
|
Zt as SelectTrigger,
|
|
221
223
|
_t as SelectValue,
|
|
222
224
|
$t as SelectViewport,
|
|
223
|
-
|
|
225
|
+
gr as Spacing,
|
|
224
226
|
to as SwitchInput,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
fr as Tab,
|
|
228
|
+
Cr as TabContent,
|
|
229
|
+
Tr as TabList,
|
|
230
|
+
dr as TabTrigger,
|
|
229
231
|
ro as TagInput,
|
|
230
232
|
no as TagInputMenu,
|
|
231
233
|
ao as TagInputMenuItem,
|
|
232
234
|
po as TagInputSubMenu,
|
|
233
235
|
uo as TagInputTrigger,
|
|
234
236
|
io as TagInputValue,
|
|
235
|
-
|
|
237
|
+
br as Text,
|
|
236
238
|
mo as TextAreaInput,
|
|
237
239
|
go as TextInput,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
sr as Toast,
|
|
241
|
+
Fr as Tooltip,
|
|
242
|
+
Pr as TooltipArrow,
|
|
243
|
+
Ar as TooltipContent,
|
|
244
|
+
wr as TooltipPortal,
|
|
245
|
+
hr as TooltipTrigger,
|
|
244
246
|
Ie as createFilterQueryLanguage,
|
|
245
247
|
mt as emailValidation,
|
|
246
248
|
Do as getRelativeValue,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
jr as getSize,
|
|
250
|
+
Qr as hashToColor,
|
|
251
|
+
Hr as mergeComponentProps,
|
|
250
252
|
zt as passwordValidation,
|
|
251
253
|
Po as resolveIcon,
|
|
252
|
-
|
|
254
|
+
Dr as toast,
|
|
253
255
|
me as useDataTablePagination,
|
|
254
256
|
fo as useForm,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
zr as useReactiveArrayService,
|
|
258
|
+
Er as useService,
|
|
259
|
+
Rr as useStore,
|
|
260
|
+
Jr as withAlpha
|
|
259
261
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
dot?: React.ReactNode;
|
|
7
|
-
predictionValue?: number | null;
|
|
8
|
-
};
|
|
9
|
-
export declare const Progress: React.FC<ProgressProps>;
|