@code0-tech/pictor 0.17.2 → 0.18.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/progress/Progress.style.css +1 -1
- package/dist/components/form/PasswordInput.js +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
|
-
.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}
|
|
@@ -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) => {
|
|
@@ -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>;
|