@code0-tech/pictor 0.15.0 → 0.17.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/alert/Alert.style.css +1 -1
- package/dist/assets/components/avatar/Avatar.style.css +1 -1
- package/dist/assets/components/badge/Badge.style.css +1 -1
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -1
- package/dist/assets/components/button/Button.style.css +1 -1
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -1
- package/dist/assets/components/card/Card.style.css +1 -1
- package/dist/assets/components/chart/Chart.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -1
- package/dist/assets/components/data-table/DataTable.style.css +1 -1
- package/dist/assets/components/dialog/Dialog.style.css +1 -1
- package/dist/assets/components/editor/Editor.styles.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/ColorInput.style.css +1 -0
- package/dist/assets/components/form/DateInput.style.css +1 -1
- package/dist/assets/components/form/EditorInput.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/form/InputWrapper.style.css +1 -1
- package/dist/assets/components/form/SelectInput.style.css +1 -1
- package/dist/assets/components/json-view/JsonView.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/resizable/Resizable.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/assets/components/spacing/Spacing.style.css +1 -1
- package/dist/assets/components/tab/Tab.style.css +1 -1
- package/dist/assets/components/text/Text.style.css +1 -1
- package/dist/assets/components/toast/Toast.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/alert/Alert.js +33 -31
- package/dist/components/chart/Chart.d.ts +32 -0
- package/dist/components/chart/Chart.js +157 -0
- package/dist/components/chart/LineChart.d.ts +27 -0
- package/dist/components/chart/LineChart.js +76 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.js +8 -0
- package/dist/components/command/Command.js +20 -22
- package/dist/components/form/ColorInput.d.ts +33 -0
- package/dist/components/form/ColorInput.js +355 -0
- package/dist/components/form/DateInput.js +82 -86
- package/dist/components/form/EditorInput.d.ts +26 -10
- package/dist/components/form/EditorInput.js +520 -148
- package/dist/components/form/EmailInput.js +16 -15
- package/dist/components/form/Input.d.ts +0 -20
- package/dist/components/form/Input.js +48 -425
- package/dist/components/form/InputLabel.d.ts +2 -1
- package/dist/components/form/InputLabel.js +20 -9
- package/dist/components/form/InputWrapper.d.ts +0 -1
- package/dist/components/form/InputWrapper.js +52 -48
- package/dist/components/form/NumberInput.js +17 -16
- package/dist/components/form/PasswordInput.js +23 -22
- package/dist/components/form/TagInput.d.ts +30 -0
- package/dist/components/form/TagInput.js +117 -0
- package/dist/components/form/TextInput.js +12 -11
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +83 -69
- package/dist/components/layout/Layout.js +37 -37
- package/dist/components/menu/Menu.d.ts +2 -2
- package/dist/components/menu/Menu.js +87 -87
- package/dist/components/scroll-area/ScrollArea.js +1 -1
- package/dist/components/toast/Toast.js +61 -61
- package/dist/index.d.ts +1 -0
- package/dist/index.js +247 -227
- package/dist/utils/index.js +11 -11
- package/dist/utils/size.d.ts +3 -3
- package/dist/utils/size.js +12 -6
- package/package.json +26 -20
- package/dist/components/form/Input.syntax.hook.d.ts +0 -10
- package/dist/components/form/Input.syntax.hook.js +0 -14
- package/dist/components/form/InputContentEditable.hook.d.ts +0 -52
- package/dist/components/form/InputContentEditable.hook.js +0 -449
- package/dist/components/form/InputSuggestion.d.ts +0 -27
- package/dist/components/form/InputSuggestion.js +0 -218
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as p, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { c as L } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import * as j from "react";
|
|
4
|
+
import * as S from "recharts";
|
|
5
|
+
import '../../assets/components/chart/Chart.style.css';/* empty css */
|
|
6
|
+
import "../../utils/contextStore.js";
|
|
7
|
+
import { mergeComponentProps as I } from "../../utils/component.js";
|
|
8
|
+
import "js-md5";
|
|
9
|
+
const A = j.createContext(null), D = () => {
|
|
10
|
+
const o = j.useContext(A);
|
|
11
|
+
if (!o)
|
|
12
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
13
|
+
return o;
|
|
14
|
+
}, H = (o) => {
|
|
15
|
+
const t = L.c(21), {
|
|
16
|
+
id: c,
|
|
17
|
+
className: l,
|
|
18
|
+
children: i,
|
|
19
|
+
config: e,
|
|
20
|
+
initialDimension: r,
|
|
21
|
+
style: _,
|
|
22
|
+
...h
|
|
23
|
+
} = o;
|
|
24
|
+
let v;
|
|
25
|
+
t[0] !== r ? (v = r === void 0 ? {
|
|
26
|
+
width: 320,
|
|
27
|
+
height: 200
|
|
28
|
+
} : r, t[0] = r, t[1] = v) : v = t[1];
|
|
29
|
+
const a = v, n = j.useId(), d = `chart-${c ?? n.replace(/:/g, "")}`;
|
|
30
|
+
let f;
|
|
31
|
+
t[2] !== e ? (f = Object.entries(e).reduce(k, {}), t[2] = e, t[3] = f) : f = t[3];
|
|
32
|
+
const g = f, x = A;
|
|
33
|
+
let s;
|
|
34
|
+
t[4] !== e ? (s = {
|
|
35
|
+
config: e
|
|
36
|
+
}, t[4] = e, t[5] = s) : s = t[5];
|
|
37
|
+
const $ = "chart";
|
|
38
|
+
let m;
|
|
39
|
+
t[6] !== g || t[7] !== _ ? (m = {
|
|
40
|
+
...g,
|
|
41
|
+
..._
|
|
42
|
+
}, t[6] = g, t[7] = _, t[8] = m) : m = t[8];
|
|
43
|
+
const b = I("chart", h);
|
|
44
|
+
let u;
|
|
45
|
+
t[9] !== i || t[10] !== a ? (u = /* @__PURE__ */ p(S.ResponsiveContainer, { initialDimension: a, children: i }), t[9] = i, t[10] = a, t[11] = u) : u = t[11];
|
|
46
|
+
let C;
|
|
47
|
+
t[12] !== d || t[13] !== m || t[14] !== b || t[15] !== u ? (C = /* @__PURE__ */ p("div", { "data-slot": $, "data-chart": d, style: m, ...b, children: u }), t[12] = d, t[13] = m, t[14] = b, t[15] = u, t[16] = C) : C = t[16];
|
|
48
|
+
let N;
|
|
49
|
+
return t[17] !== x.Provider || t[18] !== s || t[19] !== C ? (N = /* @__PURE__ */ p(x.Provider, { value: s, children: C }), t[17] = x.Provider, t[18] = s, t[19] = C, t[20] = N) : N = t[20], N;
|
|
50
|
+
}, J = (o) => {
|
|
51
|
+
const t = L.c(31);
|
|
52
|
+
let c, l, i, e, r, _, h;
|
|
53
|
+
t[0] !== o ? ({
|
|
54
|
+
active: c,
|
|
55
|
+
payload: e,
|
|
56
|
+
className: l,
|
|
57
|
+
hideLabel: _,
|
|
58
|
+
hideIndicator: h,
|
|
59
|
+
label: i,
|
|
60
|
+
...r
|
|
61
|
+
} = o, t[0] = o, t[1] = c, t[2] = l, t[3] = i, t[4] = e, t[5] = r, t[6] = _, t[7] = h) : (c = t[1], l = t[2], i = t[3], e = t[4], r = t[5], _ = t[6], h = t[7]);
|
|
62
|
+
const v = _ === void 0 ? !1 : _, a = h === void 0 ? !1 : h, {
|
|
63
|
+
config: n
|
|
64
|
+
} = D();
|
|
65
|
+
if (!c || !e?.length)
|
|
66
|
+
return null;
|
|
67
|
+
const [d] = e, f = `${d?.dataKey ?? d?.name ?? "value"}`;
|
|
68
|
+
let g;
|
|
69
|
+
t[8] !== n || t[9] !== d || t[10] !== f ? (g = K(n, d, f), t[8] = n, t[9] = d, t[10] = f, t[11] = g) : g = t[11];
|
|
70
|
+
const s = typeof i == "string" ? n[i]?.label ?? i : g?.label;
|
|
71
|
+
let $;
|
|
72
|
+
t[12] !== l ? ($ = I("chart__tooltip", {
|
|
73
|
+
className: l
|
|
74
|
+
}), t[12] = l, t[13] = $) : $ = t[13];
|
|
75
|
+
let m;
|
|
76
|
+
t[14] !== v || t[15] !== s ? (m = !v && s && /* @__PURE__ */ p("div", { className: "chart__tooltip-label", children: s }), t[14] = v, t[15] = s, t[16] = m) : m = t[16];
|
|
77
|
+
let b;
|
|
78
|
+
if (t[17] !== n || t[18] !== a || t[19] !== e) {
|
|
79
|
+
let N;
|
|
80
|
+
t[21] !== n || t[22] !== a ? (N = (y, E) => {
|
|
81
|
+
const P = K(n, y, `${y.name ?? y.dataKey ?? "value"}`), R = y.payload?.fill ?? y.color;
|
|
82
|
+
return /* @__PURE__ */ w("div", { className: "chart__tooltip-row chart__tooltip-row--dot", children: [
|
|
83
|
+
P?.icon ? /* @__PURE__ */ p(P.icon, {}) : !a && /* @__PURE__ */ p("div", { ...I("chart__tooltip-indicator chart__tooltip-indicator--dot", {
|
|
84
|
+
style: {
|
|
85
|
+
"--color-bg": R,
|
|
86
|
+
"--color-border": R
|
|
87
|
+
}
|
|
88
|
+
}) }),
|
|
89
|
+
/* @__PURE__ */ w("div", { className: "chart__tooltip-content", children: [
|
|
90
|
+
/* @__PURE__ */ p("div", { className: "chart__tooltip-meta", children: /* @__PURE__ */ p("span", { className: "chart__tooltip-name", children: P?.label ?? y.name }) }),
|
|
91
|
+
y.value != null && /* @__PURE__ */ p("span", { className: "chart__tooltip-value", children: typeof y.value == "number" ? y.value.toLocaleString() : String(y.value) })
|
|
92
|
+
] })
|
|
93
|
+
] }, E);
|
|
94
|
+
}, t[21] = n, t[22] = a, t[23] = N) : N = t[23], b = e.filter(q).map(N), t[17] = n, t[18] = a, t[19] = e, t[20] = b;
|
|
95
|
+
} else
|
|
96
|
+
b = t[20];
|
|
97
|
+
let u;
|
|
98
|
+
t[24] !== b ? (u = /* @__PURE__ */ p("div", { className: "chart__tooltip-body", children: b }), t[24] = b, t[25] = u) : u = t[25];
|
|
99
|
+
let C;
|
|
100
|
+
return t[26] !== r || t[27] !== $ || t[28] !== m || t[29] !== u ? (C = /* @__PURE__ */ w("div", { ...$, ...r, children: [
|
|
101
|
+
m,
|
|
102
|
+
u
|
|
103
|
+
] }), t[26] = r, t[27] = $, t[28] = m, t[29] = u, t[30] = C) : C = t[30], C;
|
|
104
|
+
}, M = (o) => {
|
|
105
|
+
const t = L.c(13), {
|
|
106
|
+
className: c,
|
|
107
|
+
hideIcon: l,
|
|
108
|
+
payload: i,
|
|
109
|
+
verticalAlign: e
|
|
110
|
+
} = o, r = l === void 0 ? !1 : l, _ = e === void 0 ? "bottom" : e, {
|
|
111
|
+
config: h
|
|
112
|
+
} = D();
|
|
113
|
+
if (!i?.length)
|
|
114
|
+
return null;
|
|
115
|
+
const v = `chart__legend ${_ === "top" ? "chart__legend--top" : "chart__legend--bottom"}`;
|
|
116
|
+
let a;
|
|
117
|
+
t[0] !== c || t[1] !== v ? (a = I(v, {
|
|
118
|
+
className: c
|
|
119
|
+
}), t[0] = c, t[1] = v, t[2] = a) : a = t[2];
|
|
120
|
+
let n;
|
|
121
|
+
if (t[3] !== h || t[4] !== r || t[5] !== i) {
|
|
122
|
+
let f;
|
|
123
|
+
t[7] !== h || t[8] !== r ? (f = (g, x) => {
|
|
124
|
+
const s = K(h, g, `${g.dataKey ?? "value"}`);
|
|
125
|
+
return /* @__PURE__ */ w("div", { className: "chart__legend-item", children: [
|
|
126
|
+
s?.icon && !r ? /* @__PURE__ */ p(s.icon, {}) : /* @__PURE__ */ p("div", { className: "chart__legend-swatch", style: {
|
|
127
|
+
backgroundColor: g.color
|
|
128
|
+
} }),
|
|
129
|
+
s?.label
|
|
130
|
+
] }, x);
|
|
131
|
+
}, t[7] = h, t[8] = r, t[9] = f) : f = t[9], n = i.filter(F).map(f), t[3] = h, t[4] = r, t[5] = i, t[6] = n;
|
|
132
|
+
} else
|
|
133
|
+
n = t[6];
|
|
134
|
+
let d;
|
|
135
|
+
return t[10] !== a || t[11] !== n ? (d = /* @__PURE__ */ p("div", { ...a, children: n }), t[10] = a, t[11] = n, t[12] = d) : d = t[12], d;
|
|
136
|
+
}, K = (o, t, c) => {
|
|
137
|
+
if (typeof t != "object" || t === null) return o[c];
|
|
138
|
+
const l = t, i = [c, typeof l.dataKey == "string" ? l.dataKey : void 0, typeof l.name == "string" ? l.name : void 0];
|
|
139
|
+
for (const e of i)
|
|
140
|
+
if (e && e in o)
|
|
141
|
+
return o[e];
|
|
142
|
+
};
|
|
143
|
+
function k(o, t) {
|
|
144
|
+
const [c, l] = t;
|
|
145
|
+
return l.color && (o[`--color-${c}`] = l.color), o;
|
|
146
|
+
}
|
|
147
|
+
function q(o) {
|
|
148
|
+
return o.type !== "none";
|
|
149
|
+
}
|
|
150
|
+
function F(o) {
|
|
151
|
+
return o.type !== "none";
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
H as ChartContainer,
|
|
155
|
+
M as ChartLegendContent,
|
|
156
|
+
J as ChartTooltipContent
|
|
157
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChartContainer, ChartConfig } from './Chart';
|
|
2
|
+
import { Component } from 'utils';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as RechartsPrimitive from "recharts";
|
|
5
|
+
export type ChartLines = Omit<React.ComponentProps<typeof RechartsPrimitive.Line>, "dataKey" | "name"> & {
|
|
6
|
+
dataKey: string;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
color?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
};
|
|
11
|
+
export type LineChartProps<TData extends Record<string, unknown>> = Omit<React.ComponentProps<typeof RechartsPrimitive.LineChart>, "data"> & Omit<Component<HTMLDivElement>, "height"> & {
|
|
12
|
+
data: TData[];
|
|
13
|
+
lines: ChartLines[];
|
|
14
|
+
xKey: string;
|
|
15
|
+
config?: ChartConfig;
|
|
16
|
+
showDots?: boolean;
|
|
17
|
+
curveType?: React.ComponentProps<typeof RechartsPrimitive.Line>["type"];
|
|
18
|
+
containerProps?: Omit<React.ComponentProps<typeof ChartContainer>, "children" | "config">;
|
|
19
|
+
grid?: React.ComponentProps<typeof RechartsPrimitive.CartesianGrid> | false;
|
|
20
|
+
xAxis?: Omit<React.ComponentProps<typeof RechartsPrimitive.XAxis>, "dataKey">;
|
|
21
|
+
yAxis?: React.ComponentProps<typeof RechartsPrimitive.YAxis>;
|
|
22
|
+
tooltip?: React.ComponentProps<typeof RechartsPrimitive.Tooltip> | false;
|
|
23
|
+
legend?: React.ComponentProps<typeof RechartsPrimitive.Legend> | false;
|
|
24
|
+
};
|
|
25
|
+
type LineChartComponent = <TData extends Record<string, unknown>>(props: LineChartProps<TData>) => React.ReactElement;
|
|
26
|
+
export declare const LineChart: LineChartComponent;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as o, jsxs as X } from "react/jsx-runtime";
|
|
2
|
+
import { c as Y } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import * as d from "recharts";
|
|
4
|
+
import { ChartTooltipContent as q, ChartLegendContent as z, ChartContainer as B } from "./Chart.js";
|
|
5
|
+
const Q = (a) => {
|
|
6
|
+
const e = Y.c(48);
|
|
7
|
+
let m, p, r, y, c, l, t, h, s, n, C, g, u;
|
|
8
|
+
e[0] !== a ? ({
|
|
9
|
+
data: y,
|
|
10
|
+
lines: t,
|
|
11
|
+
xKey: g,
|
|
12
|
+
config: m,
|
|
13
|
+
showDots: s,
|
|
14
|
+
curveType: r,
|
|
15
|
+
containerProps: p,
|
|
16
|
+
grid: c,
|
|
17
|
+
xAxis: C,
|
|
18
|
+
yAxis: u,
|
|
19
|
+
tooltip: n,
|
|
20
|
+
legend: l,
|
|
21
|
+
...h
|
|
22
|
+
} = a, e[0] = a, e[1] = m, e[2] = p, e[3] = r, e[4] = y, e[5] = c, e[6] = l, e[7] = t, e[8] = h, e[9] = s, e[10] = n, e[11] = C, e[12] = g, e[13] = u) : (m = e[1], p = e[2], r = e[3], y = e[4], c = e[5], l = e[6], t = e[7], h = e[8], s = e[9], n = e[10], C = e[11], g = e[12], u = e[13]);
|
|
23
|
+
const W = F;
|
|
24
|
+
let P;
|
|
25
|
+
e[14] !== m || e[15] !== t ? (P = m ?? t.reduce((f, i) => (f[i.dataKey] = {
|
|
26
|
+
label: i.label ?? i.name ?? i.dataKey,
|
|
27
|
+
color: W(i)
|
|
28
|
+
}, f), {}), e[14] = m, e[15] = t, e[16] = P) : P = e[16];
|
|
29
|
+
const D = P;
|
|
30
|
+
let x;
|
|
31
|
+
e[17] !== C || e[18] !== g ? (x = /* @__PURE__ */ o(d.XAxis, { dataKey: g, ...C }), e[17] = C, e[18] = g, e[19] = x) : x = e[19];
|
|
32
|
+
let k;
|
|
33
|
+
e[20] !== u ? (k = /* @__PURE__ */ o(d.YAxis, { ...u }), e[20] = u, e[21] = k) : k = e[21];
|
|
34
|
+
let v;
|
|
35
|
+
e[22] !== c ? (v = c !== !1 && /* @__PURE__ */ o(d.CartesianGrid, { strokeDasharray: "4 4", ...c }), e[22] = c, e[23] = v) : v = e[23];
|
|
36
|
+
let K;
|
|
37
|
+
e[24] !== n ? (K = n !== !1 && /* @__PURE__ */ o(d.Tooltip, { ...n, content: n?.content ?? /* @__PURE__ */ o(q, {}) }), e[24] = n, e[25] = K) : K = e[25];
|
|
38
|
+
let L;
|
|
39
|
+
e[26] !== l ? (L = l !== !1 && /* @__PURE__ */ o(d.Legend, { ...l, content: l?.content ?? /* @__PURE__ */ o(z, {}) }), e[26] = l, e[27] = L) : L = e[27];
|
|
40
|
+
let b;
|
|
41
|
+
if (e[28] !== r || e[29] !== t || e[30] !== s) {
|
|
42
|
+
let f;
|
|
43
|
+
e[32] !== r || e[33] !== s ? (f = (i) => {
|
|
44
|
+
const {
|
|
45
|
+
dataKey: j,
|
|
46
|
+
label: R,
|
|
47
|
+
type: $,
|
|
48
|
+
strokeWidth: w,
|
|
49
|
+
name: E,
|
|
50
|
+
dot: G,
|
|
51
|
+
color: H,
|
|
52
|
+
stroke: I,
|
|
53
|
+
...N
|
|
54
|
+
} = i, S = typeof R == "string" || typeof R == "number" ? String(R) : E ?? j;
|
|
55
|
+
return /* @__PURE__ */ o(d.Line, { dataKey: j, name: S, stroke: W(i) ?? `var(--color-${j}, currentColor)`, type: $ ?? r ?? "monotone", strokeWidth: w ?? 2, dot: G ?? s, ...N }, j);
|
|
56
|
+
}, e[32] = r, e[33] = s, e[34] = f) : f = e[34], b = t.map(f), e[28] = r, e[29] = t, e[30] = s, e[31] = b;
|
|
57
|
+
} else
|
|
58
|
+
b = e[31];
|
|
59
|
+
let A;
|
|
60
|
+
e[35] !== y || e[36] !== h || e[37] !== x || e[38] !== k || e[39] !== v || e[40] !== K || e[41] !== L || e[42] !== b ? (A = /* @__PURE__ */ X(d.LineChart, { data: y, ...h, children: [
|
|
61
|
+
x,
|
|
62
|
+
k,
|
|
63
|
+
v,
|
|
64
|
+
K,
|
|
65
|
+
L,
|
|
66
|
+
b
|
|
67
|
+
] }), e[35] = y, e[36] = h, e[37] = x, e[38] = k, e[39] = v, e[40] = K, e[41] = L, e[42] = b, e[43] = A) : A = e[43];
|
|
68
|
+
let T;
|
|
69
|
+
return e[44] !== p || e[45] !== D || e[46] !== A ? (T = /* @__PURE__ */ o(B, { config: D, ...p, children: A }), e[44] = p, e[45] = D, e[46] = A, e[47] = T) : T = e[47], T;
|
|
70
|
+
};
|
|
71
|
+
function F(a) {
|
|
72
|
+
return a.color ?? (typeof a.stroke == "string" ? a.stroke : void 0);
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
Q as LineChart
|
|
76
|
+
};
|
|
@@ -6,19 +6,17 @@ import "react";
|
|
|
6
6
|
import { mergeComponentProps as r } from "../../utils/component.js";
|
|
7
7
|
import "js-md5";
|
|
8
8
|
import { DialogPortal as u, DialogContent as h, Dialog as g, DialogOverlay as C } from "../dialog/Dialog.js";
|
|
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/
|
|
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
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 */
|
|
14
|
+
import "../form/ColorInput.js";
|
|
14
15
|
import "@ark-ui/react";
|
|
15
16
|
import "@internationalized/date";
|
|
16
17
|
import "../form/InputWrapper.js";
|
|
17
18
|
/* empty css */
|
|
18
|
-
|
|
19
|
-
import "@radix-ui/react-dropdown-menu";
|
|
20
|
-
import "@radix-ui/react-scroll-area";
|
|
21
|
-
/* empty css */
|
|
19
|
+
import "../menu/Menu.js";
|
|
22
20
|
import "@radix-ui/react-select";
|
|
23
21
|
/* empty css */
|
|
24
22
|
/* empty css */
|
|
@@ -27,12 +25,12 @@ import "../form/EditorInput.js";
|
|
|
27
25
|
import "../form/EmailInput.js";
|
|
28
26
|
/* empty css */
|
|
29
27
|
import "../form/Input.js";
|
|
30
|
-
import "../form/InputSuggestion.js";
|
|
31
28
|
import "../form/NumberInput.js";
|
|
32
29
|
import "../form/PasswordInput.js";
|
|
33
30
|
import "@radix-ui/react-one-time-password-field";
|
|
34
31
|
import "@radix-ui/react-radio-group";
|
|
35
32
|
import "../form/SwitchInput.js";
|
|
33
|
+
import "../form/TagInput.js";
|
|
36
34
|
import "../form/TextAreaInput.js";
|
|
37
35
|
import { TextInput as $ } from "../form/TextInput.js";
|
|
38
36
|
const P = (e) => {
|
|
@@ -42,7 +40,7 @@ const P = (e) => {
|
|
|
42
40
|
const o = m;
|
|
43
41
|
let n;
|
|
44
42
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
45
|
-
},
|
|
43
|
+
}, et = (e) => {
|
|
46
44
|
const t = c.c(11);
|
|
47
45
|
let m;
|
|
48
46
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i(C, {}), t[0] = m) : m = t[0];
|
|
@@ -55,14 +53,14 @@ const P = (e) => {
|
|
|
55
53
|
] }), t[3] = e.contentProps, t[4] = o, t[5] = n) : n = t[5];
|
|
56
54
|
let l;
|
|
57
55
|
return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !== n ? (l = /* @__PURE__ */ i(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] = l) : l = t[10], l;
|
|
58
|
-
},
|
|
56
|
+
}, nt = (e) => {
|
|
59
57
|
const t = c.c(4);
|
|
60
58
|
let m;
|
|
61
59
|
t[0] !== e ? (m = r("command__list", e), t[0] = e, t[1] = m) : m = t[1];
|
|
62
60
|
const o = m;
|
|
63
61
|
let n;
|
|
64
62
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a.List, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
65
|
-
},
|
|
63
|
+
}, mt = (e) => {
|
|
66
64
|
const t = c.c(10);
|
|
67
65
|
let m;
|
|
68
66
|
t[0] !== e.value ? (m = e.value?.toString(), t[0] = e.value, t[1] = m) : m = t[1];
|
|
@@ -81,35 +79,35 @@ const P = (e) => {
|
|
|
81
79
|
t[4] !== e ? (n = /* @__PURE__ */ i($, { className: "command__input", ...e }), t[4] = e, t[5] = n) : n = t[5];
|
|
82
80
|
let l;
|
|
83
81
|
return t[6] !== m || t[7] !== o || t[8] !== n ? (l = /* @__PURE__ */ i(a.Input, { value: m, onValueChange: o, asChild: !0, children: n }), t[6] = m, t[7] = o, t[8] = n, t[9] = l) : l = t[9], l;
|
|
84
|
-
},
|
|
82
|
+
}, ot = (e) => {
|
|
85
83
|
const t = c.c(4);
|
|
86
84
|
let m;
|
|
87
85
|
t[0] !== e ? (m = r("command__empty", e), t[0] = e, t[1] = m) : m = t[1];
|
|
88
86
|
const o = m;
|
|
89
87
|
let n;
|
|
90
88
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a.Empty, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
91
|
-
},
|
|
89
|
+
}, it = (e) => {
|
|
92
90
|
const t = c.c(4);
|
|
93
91
|
let m;
|
|
94
92
|
t[0] !== e ? (m = r("command__group", e), t[0] = e, t[1] = m) : m = t[1];
|
|
95
93
|
const o = m;
|
|
96
94
|
let n;
|
|
97
95
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a.Group, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
98
|
-
},
|
|
96
|
+
}, lt = (e) => {
|
|
99
97
|
const t = c.c(4);
|
|
100
98
|
let m;
|
|
101
99
|
t[0] !== e ? (m = r("command__item", e), t[0] = e, t[1] = m) : m = t[1];
|
|
102
100
|
const o = m;
|
|
103
101
|
let n;
|
|
104
102
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a.Item, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
105
|
-
},
|
|
103
|
+
}, ct = (e) => {
|
|
106
104
|
const t = c.c(4);
|
|
107
105
|
let m;
|
|
108
106
|
t[0] !== e ? (m = r("command__separator", e), t[0] = e, t[1] = m) : m = t[1];
|
|
109
107
|
const o = m;
|
|
110
108
|
let n;
|
|
111
109
|
return t[2] !== o ? (n = /* @__PURE__ */ i(a.Separator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
112
|
-
},
|
|
110
|
+
}, at = (e) => {
|
|
113
111
|
const t = c.c(5);
|
|
114
112
|
let m;
|
|
115
113
|
t[0] !== e ? (m = r("command__shortcut", e), t[0] = e, t[1] = m) : m = t[1];
|
|
@@ -119,12 +117,12 @@ const P = (e) => {
|
|
|
119
117
|
};
|
|
120
118
|
export {
|
|
121
119
|
P as Command,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
et as CommandDialog,
|
|
121
|
+
ot as CommandEmpty,
|
|
122
|
+
it as CommandGroup,
|
|
123
|
+
mt as CommandInput,
|
|
124
|
+
lt as CommandItem,
|
|
125
|
+
nt as CommandList,
|
|
126
|
+
ct as CommandSeparator,
|
|
127
|
+
at as CommandShortcut
|
|
130
128
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ColorPicker, Color } from '@ark-ui/react';
|
|
2
|
+
import { ComponentProps } from '../../utils';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { InputWrapperProps } from './InputWrapper';
|
|
5
|
+
import { MenuContentProps, MenuTriggerProps } from '../menu/Menu';
|
|
6
|
+
type ColorNotation = "rgba" | "hsla" | "hexa";
|
|
7
|
+
interface ValueChangeDetails {
|
|
8
|
+
value: Color;
|
|
9
|
+
valueAsString: string;
|
|
10
|
+
}
|
|
11
|
+
export type ColorProps = InputWrapperProps & {
|
|
12
|
+
placeholder?: React.ReactNode;
|
|
13
|
+
name?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
closeOnSelect?: boolean;
|
|
17
|
+
onValueChange?: (details: ValueChangeDetails) => void;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export type ColorInputControlProps = ComponentProps & ColorPicker.ControlProps;
|
|
21
|
+
export type ColorInputSwatchProps = ComponentProps & ColorPicker.ValueSwatchProps;
|
|
22
|
+
export type ColorInputValueTextProps = ComponentProps & Omit<React.HTMLProps<HTMLSpanElement>, "value">;
|
|
23
|
+
export type ColorInputTriggerProps = ComponentProps & MenuTriggerProps;
|
|
24
|
+
export type ColorInputContentProps = ComponentProps & MenuContentProps & {
|
|
25
|
+
defaultNotation?: ColorNotation;
|
|
26
|
+
};
|
|
27
|
+
export declare const ColorInput: React.FC<ColorProps>;
|
|
28
|
+
export declare const ColorInputControl: React.FC<ColorInputControlProps>;
|
|
29
|
+
export declare const ColorInputSwatch: React.FC<ColorInputSwatchProps>;
|
|
30
|
+
export declare const ColorInputValueText: React.FC<ColorInputValueTextProps>;
|
|
31
|
+
export declare const ColorInputTrigger: React.FC<ColorInputTriggerProps>;
|
|
32
|
+
export declare const ColorInputContent: React.FC<ColorInputContentProps>;
|
|
33
|
+
export {};
|