@code0-tech/pictor 0.14.0 → 0.16.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/LICENSE +19 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -1
- package/dist/assets/components/chart/Chart.style.css +1 -0
- package/dist/assets/components/form/ColorInput.style.css +1 -0
- package/dist/assets/components/form/DateInput.style.css +1 -0
- 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 +46 -37
- package/dist/components/form/ColorInput.d.ts +33 -0
- package/dist/components/form/ColorInput.js +355 -0
- package/dist/components/form/DateInput.d.ts +37 -0
- package/dist/components/form/DateInput.js +285 -0
- package/dist/components/form/Input.js +229 -221
- package/dist/components/form/InputLabel.d.ts +2 -1
- package/dist/components/form/InputLabel.js +20 -9
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +76 -61
- package/dist/components/toast/Toast.js +61 -61
- package/dist/index.d.ts +1 -0
- package/dist/index.js +242 -221
- package/package.json +32 -24
package/LICENSE
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
Copyright 2023-2026 Code0 UG (haftungsbeschränkt)
|
|
2
2
|
|
|
3
|
+
This license applies to all files in this repository EXCEPT the contents of the
|
|
4
|
+
directories (and any derived build artifacts) covered by the "Excluded Assets" section
|
|
5
|
+
at the bottom of this file.
|
|
6
|
+
|
|
3
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
8
|
|
|
5
9
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
10
|
|
|
7
11
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Excluded Assets
|
|
16
|
+
|
|
17
|
+
The contents of the directory "src/components/icon/codezero" (and any build
|
|
18
|
+
artifacts derived from it, such as the corresponding files in the published
|
|
19
|
+
package) are NOT covered by the MIT license above. These files include brand
|
|
20
|
+
logos and trademarks that are the property of their respective owners and are
|
|
21
|
+
used by Code0 UG (haftungsbeschränkt) under permission.
|
|
22
|
+
|
|
23
|
+
No license or right to use, copy, modify, distribute, sublicense, or otherwise
|
|
24
|
+
exploit these excluded assets is granted to any third party. All rights are
|
|
25
|
+
reserved by their respective owners. Any use of these assets requires the prior
|
|
26
|
+
written permission of the respective rights holder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}.avatar--identicon>div>div{--color: inherit;background:transparent;width:calc(var(--size) *
|
|
1
|
+
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}.avatar--identicon>div>div{--color: inherit;background:transparent;width:calc(var(--size) * .75px);height:calc(var(--size) * .75px)}.avatar--identicon>div>div>span>svg{width:calc(var(--size) * .75px);height:calc(var(--size) * .75px)}.avatar--identicon>div>div>span,.avatar--identicon>div>div>p{color:var(--color);font-size:calc(var(--size) * .75px)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart{display:flex;justify-content:center;aspect-ratio:16/9;font-size:.7rem}.chart{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.chart .recharts-cartesian-axis-tick text,.chart .recharts-cartesian-axis-label text{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.chart .recharts-cartesian-axis-tick text{fill:#ffffffbf}.chart .recharts-cartesian-grid line,.chart .recharts-polar-grid line,.chart .recharts-reference-line line,.chart .recharts-reference-line path{stroke:#bfbfbf1a}.chart .recharts-curve.recharts-tooltip-cursor{stroke:#bfbfbf1a}.chart .recharts-dot,.chart .recharts-sector{stroke:transparent}.chart .recharts-layer,.chart .recharts-sector,.chart .recharts-surface{outline:none}.chart .recharts-radial-bar-background-sector,.chart .recharts-rectangle.recharts-tooltip-cursor{fill:#100e1d}.chart__tooltip{display:grid;min-width:8rem;align-items:start;gap:.35rem;padding:.7rem;font-size:.7rem}.chart__tooltip{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.chart__tooltip-label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.chart__tooltip-body{display:grid;gap:.35rem}.chart__tooltip-row{display:flex;flex-wrap:wrap;width:100%;align-items:stretch;gap:.7rem}.chart__tooltip-row>svg{width:.7rem;height:.7rem;color:#ffffffbf}.chart__tooltip-row--dot{align-items:center}.chart__tooltip-indicator{flex-shrink:0;border-radius:1rem;border:1px solid var(--color-border);background:var(--color-bg)}.chart__tooltip-indicator--dot{border-radius:.175rem;width:.7rem;height:.7rem}.chart__tooltip-content{display:flex;flex:1;justify-content:space-between;align-items:center;line-height:1;gap:.7rem}.chart__tooltip-meta{display:grid;gap:.35rem;min-width:0}.chart__tooltip-name{color:#ffffffbf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chart__tooltip-value{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;color:#fff;font-variant-numeric:tabular-nums;flex-shrink:0}.chart__legend{display:flex;align-items:center;justify-content:center;gap:1rem}.chart__legend--top{padding-bottom:.7rem}.chart__legend--bottom{padding-top:.7rem}.chart__legend-item{display:flex;align-items:center;gap:.35rem}.chart__legend-item>svg{width:.7rem;height:.7rem;color:#ffffffbf}.chart__legend-swatch{width:.5rem;height:.5rem;flex-shrink:0;border-radius:2px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.color-input__control{flex:1;min-width:0;align-self:stretch;display:flex;align-items:center;gap:.7rem}.color-input__swatch-wrapper{position:relative;width:20px;height:20px;border-radius:.3rem;overflow:hidden;flex-shrink:0;box-shadow:inset 0 0 0 1px #ffffff1a}.color-input__transparency-grid{position:absolute;inset:0}.color-input__swatch{width:100%;height:100%}.color-input__swatch--empty{background:linear-gradient(to top right,transparent calc(50% - 1px),rgba(255,255,255,.4),transparent calc(50% + 1px))}.color-input__value-text{font-variant-numeric:tabular-nums}.color-input__value-text{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.color-input__value-text--placeholder{opacity:.5}.color-input__trigger{cursor:pointer;display:flex;align-items:center}.color-input__content{padding:.35rem}.color-input__body{display:flex;flex-direction:column;gap:.7rem;width:240px;max-width:100%}.color-input__area{position:relative;width:100%;height:140px;border-radius:.65rem;overflow:hidden}.color-input__area-background{width:100%;height:100%;border-radius:inherit}.color-input__area-thumb{width:14px;height:14px;border-radius:50%;border:2px solid #ffffff;box-shadow:0 0 0 1px #00000059}.color-input__area-thumb:focus{outline:none}.color-input__sliders{display:flex;flex-direction:column;gap:.7rem}.color-input__channel-slider{position:relative;height:14px;border-radius:999px;overflow:hidden}.color-input__channel-slider:focus{outline:none}.color-input__channel-slider-grid{position:absolute;inset:0;border-radius:inherit}.color-input__channel-slider-track{width:100%;height:100%;border-radius:inherit}.color-input__channel-slider-thumb{width:14px;height:14px;border-radius:50%;border:2px solid #ffffff;box-shadow:0 0 0 1px #00000059;transform:translate(-50%,-50%)}.color-input__channel-slider-thumb:focus{outline:none}.color-input__channels{display:flex;flex-direction:column;gap:.7rem}.color-input__notation{width:100%}.color-input__notation .segmented-control__item{flex:1;text-align:center;justify-content:center;font-size:.8rem}.color-input__actions{width:100%;gap:.7rem;margin-top:.35rem}.color-input__actions .button{flex:1;gap:.35rem;justify-content:center;align-items:center}.color-input__channel-row{display:flex;align-items:flex-end;gap:.35rem}.color-input__channel{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1;min-width:0}.color-input__channel--hex{align-items:stretch}.color-input__channel--hex .color-input__channel-label{text-align:center}.color-input__channel-label{font-size:.7rem;opacity:.6}.color-input__channel-label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.color-input__channel-input{width:100%;min-width:0;text-align:center;padding:.35rem;border-radius:.65rem;font-variant-numeric:tabular-nums}.color-input__channel-input{background:#070514;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.color-input__channel-input:focus{outline:none}.color-input__channel-input{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;font-size:.8rem}.color-input__channel-input:focus,.color-input__channel-input[data-focus]{background:#bfbfbf33;box-shadow:inset 0 1px 1px #ffffff1a;outline:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.date-input__control{flex:1;min-width:0;align-self:stretch;display:flex;align-items:center}.date-input__segment-group{flex:1;min-width:0;display:flex;align-items:center}.date-input__segment{padding:0 1px;border-radius:.65rem;font-variant-numeric:tabular-nums}.date-input__segment:focus{outline:none}.date-input__segment{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.date-input__segment[data-placeholder]{opacity:.5}.date-input__segment:focus,.date-input__segment[data-focus]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.date-input__trigger{cursor:pointer;display:flex;align-items:center}.date-input__view-control{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.35rem}.date-input__prev-trigger,.date-input__next-trigger,.date-input__view-trigger{cursor:pointer;background:none;border:none;padding:.35rem .7rem;border-radius:.65rem}.date-input__prev-trigger,.date-input__next-trigger,.date-input__view-trigger{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.date-input__prev-trigger:focus,.date-input__next-trigger:focus,.date-input__view-trigger:focus{outline:none}.date-input__prev-trigger,.date-input__next-trigger,.date-input__view-trigger{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;box-shadow:none}.date-input__prev-trigger:hover,.date-input__prev-trigger[data-focus=true],.date-input__next-trigger:hover,.date-input__next-trigger[data-focus=true],.date-input__view-trigger:hover,.date-input__view-trigger[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none}.date-input__table{width:100%;border-collapse:collapse}.date-input__table-header{font-size:.8rem;padding:.35rem;text-align:center;opacity:.6}.date-input__table-header{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.date-input__cell{border-radius:.65rem;padding:.35rem;cursor:pointer;width:100%;display:flex;align-items:center;justify-content:center;font-size:.8rem}.date-input__cell{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.date-input__cell:focus{outline:none}.date-input__cell{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.date-input__cell:disabled,.date-input__cell[data-disabled],.date-input__cell[aria-disabled=true],.date-input__cell--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.date-input__cell{box-shadow:none}.date-input__cell:focus,.date-input__cell:hover,.date-input__cell[data-focus=true],.date-input__cell[data-selected]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none}.date-input__cell[data-outside-range]{opacity:.4}.date-input__time{display:flex;align-items:center;justify-content:center;gap:.35rem;padding:.7rem .35rem .35rem}.date-input__time-separator{font-size:.8rem}.date-input__time-separator{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as y } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { mergeComponentProps as
|
|
5
|
+
import { mergeComponentProps as u } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
|
-
import { IconCircleX as
|
|
7
|
+
import { IconCircleX as v, IconAlertCircle as x, IconCircleCheck as g, IconInfoCircle as j, IconCircleDot as f } from "@tabler/icons-react";
|
|
8
8
|
import '../../assets/components/alert/Alert.style.css';/* empty css */
|
|
9
|
-
const
|
|
10
|
-
const e =
|
|
11
|
-
let o, i, c,
|
|
12
|
-
if (e[0] !==
|
|
9
|
+
const P = (a) => {
|
|
10
|
+
const e = y.c(14);
|
|
11
|
+
let t, o, s, i, c, l;
|
|
12
|
+
if (e[0] !== a) {
|
|
13
13
|
const {
|
|
14
|
-
color:
|
|
15
|
-
children:
|
|
16
|
-
...
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
e[
|
|
21
|
-
primary: /* @__PURE__ */ r(
|
|
22
|
-
secondary: /* @__PURE__ */ r(
|
|
23
|
-
tertiary: /* @__PURE__ */ r(
|
|
24
|
-
info: /* @__PURE__ */ r(
|
|
25
|
-
success: /* @__PURE__ */ r(
|
|
26
|
-
warning: /* @__PURE__ */ r(
|
|
27
|
-
error: /* @__PURE__ */ r(
|
|
28
|
-
}, e[
|
|
14
|
+
color: C,
|
|
15
|
+
children: z,
|
|
16
|
+
...I
|
|
17
|
+
} = a;
|
|
18
|
+
t = z, o = C === void 0 ? "secondary" : C;
|
|
19
|
+
let m;
|
|
20
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
21
|
+
primary: /* @__PURE__ */ r(f, { size: 16 }),
|
|
22
|
+
secondary: /* @__PURE__ */ r(f, { size: 16 }),
|
|
23
|
+
tertiary: /* @__PURE__ */ r(f, { size: 16 }),
|
|
24
|
+
info: /* @__PURE__ */ r(j, { size: 16 }),
|
|
25
|
+
success: /* @__PURE__ */ r(g, { size: 16 }),
|
|
26
|
+
warning: /* @__PURE__ */ r(x, { size: 16 }),
|
|
27
|
+
error: /* @__PURE__ */ r(v, { size: 16 })
|
|
28
|
+
}, e[7] = m) : m = e[7], s = m;
|
|
29
|
+
const d = o === "error";
|
|
30
|
+
i = d ? "alert" : "status", c = d ? "assertive" : "polite", l = u(`alert alert--${o}`, I), e[0] = a, e[1] = t, e[2] = o, e[3] = s, e[4] = i, e[5] = c, e[6] = l;
|
|
29
31
|
} else
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
let
|
|
33
|
-
return e[
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
] }), e[
|
|
32
|
+
t = e[1], o = e[2], s = e[3], i = e[4], c = e[5], l = e[6];
|
|
33
|
+
const p = s[o];
|
|
34
|
+
let n;
|
|
35
|
+
return e[8] !== t || e[9] !== i || e[10] !== c || e[11] !== l || e[12] !== p ? (n = /* @__PURE__ */ h("div", { role: i, "aria-live": c, ...l, children: [
|
|
36
|
+
p,
|
|
37
|
+
t
|
|
38
|
+
] }), e[8] = t, e[9] = i, e[10] = c, e[11] = l, e[12] = p, e[13] = n) : n = e[13], n;
|
|
37
39
|
};
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
P as Alert
|
|
40
42
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component } from '../../utils';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as RechartsPrimitive from "recharts";
|
|
4
|
+
interface ChartItem {
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
icon?: React.ComponentType;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export type ChartConfig = Record<string, ChartItem>;
|
|
10
|
+
interface ChartContainerProps extends Component<HTMLDivElement> {
|
|
11
|
+
config: ChartConfig;
|
|
12
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
13
|
+
initialDimension?: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const ChartContainer: React.FC<ChartContainerProps>;
|
|
19
|
+
interface ChartTooltipContentProps extends Omit<React.ComponentProps<typeof RechartsPrimitive.Tooltip>, "content">, Omit<React.ComponentProps<"div">, "content"> {
|
|
20
|
+
payload?: RechartsPrimitive.TooltipPayload;
|
|
21
|
+
label?: string | number;
|
|
22
|
+
hideLabel?: boolean;
|
|
23
|
+
hideIndicator?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const ChartTooltipContent: React.FC<ChartTooltipContentProps>;
|
|
26
|
+
interface ChartLegendContentProps extends Omit<React.ComponentProps<"div">, "dangerouslySetInnerHTML"> {
|
|
27
|
+
payload?: ReadonlyArray<RechartsPrimitive.LegendPayload>;
|
|
28
|
+
verticalAlign?: "top" | "bottom" | "middle";
|
|
29
|
+
hideIcon?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const ChartLegendContent: React.FC<ChartLegendContentProps>;
|
|
32
|
+
export {};
|
|
@@ -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
|
+
};
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import { Command as
|
|
3
|
+
import { Command as r } from "cmdk";
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { mergeComponentProps as
|
|
6
|
+
import { mergeComponentProps as a } 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/
|
|
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/scroll-area/ScrollArea.style.css';import '../../assets/components/menu/Menu.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";
|
|
15
|
+
import "@ark-ui/react";
|
|
16
|
+
import "@internationalized/date";
|
|
17
|
+
import "../form/InputWrapper.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
import "@radix-ui/react-dropdown-menu";
|
|
21
|
+
import "@radix-ui/react-scroll-area";
|
|
22
|
+
/* empty css */
|
|
23
|
+
import "@radix-ui/react-select";
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
|
+
import "../button/Button.js";
|
|
14
27
|
import "../form/EditorInput.js";
|
|
15
28
|
import "../form/EmailInput.js";
|
|
16
|
-
import "@ark-ui/react";
|
|
17
29
|
/* empty css */
|
|
18
30
|
import "../form/Input.js";
|
|
19
31
|
import "../form/InputSuggestion.js";
|
|
@@ -21,20 +33,17 @@ import "../form/NumberInput.js";
|
|
|
21
33
|
import "../form/PasswordInput.js";
|
|
22
34
|
import "@radix-ui/react-one-time-password-field";
|
|
23
35
|
import "@radix-ui/react-radio-group";
|
|
24
|
-
import "@radix-ui/react-select";
|
|
25
|
-
import "../form/InputWrapper.js";
|
|
26
|
-
/* empty css */
|
|
27
36
|
import "../form/SwitchInput.js";
|
|
28
37
|
import "../form/TextAreaInput.js";
|
|
29
38
|
import { TextInput as $ } from "../form/TextInput.js";
|
|
30
39
|
const P = (e) => {
|
|
31
40
|
const t = c.c(4);
|
|
32
41
|
let m;
|
|
33
|
-
t[0] !== e ? (m =
|
|
42
|
+
t[0] !== e ? (m = a("command", e), t[0] = e, t[1] = m) : m = t[1];
|
|
34
43
|
const o = m;
|
|
35
44
|
let n;
|
|
36
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
37
|
-
},
|
|
45
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
46
|
+
}, ot = (e) => {
|
|
38
47
|
const t = c.c(11);
|
|
39
48
|
let m;
|
|
40
49
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i(C, {}), t[0] = m) : m = t[0];
|
|
@@ -47,14 +56,14 @@ const P = (e) => {
|
|
|
47
56
|
] }), t[3] = e.contentProps, t[4] = o, t[5] = n) : n = t[5];
|
|
48
57
|
let l;
|
|
49
58
|
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;
|
|
50
|
-
},
|
|
59
|
+
}, it = (e) => {
|
|
51
60
|
const t = c.c(4);
|
|
52
61
|
let m;
|
|
53
|
-
t[0] !== e ? (m =
|
|
62
|
+
t[0] !== e ? (m = a("command__list", e), t[0] = e, t[1] = m) : m = t[1];
|
|
54
63
|
const o = m;
|
|
55
64
|
let n;
|
|
56
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
57
|
-
},
|
|
65
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r.List, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
66
|
+
}, lt = (e) => {
|
|
58
67
|
const t = c.c(10);
|
|
59
68
|
let m;
|
|
60
69
|
t[0] !== e.value ? (m = e.value?.toString(), t[0] = e.value, t[1] = m) : m = t[1];
|
|
@@ -72,51 +81,51 @@ const P = (e) => {
|
|
|
72
81
|
let n;
|
|
73
82
|
t[4] !== e ? (n = /* @__PURE__ */ i($, { className: "command__input", ...e }), t[4] = e, t[5] = n) : n = t[5];
|
|
74
83
|
let l;
|
|
75
|
-
return t[6] !== m || t[7] !== o || t[8] !== n ? (l = /* @__PURE__ */ i(
|
|
76
|
-
},
|
|
84
|
+
return t[6] !== m || t[7] !== o || t[8] !== n ? (l = /* @__PURE__ */ i(r.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;
|
|
85
|
+
}, ct = (e) => {
|
|
77
86
|
const t = c.c(4);
|
|
78
87
|
let m;
|
|
79
|
-
t[0] !== e ? (m =
|
|
88
|
+
t[0] !== e ? (m = a("command__empty", e), t[0] = e, t[1] = m) : m = t[1];
|
|
80
89
|
const o = m;
|
|
81
90
|
let n;
|
|
82
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
83
|
-
},
|
|
91
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r.Empty, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
92
|
+
}, rt = (e) => {
|
|
84
93
|
const t = c.c(4);
|
|
85
94
|
let m;
|
|
86
|
-
t[0] !== e ? (m =
|
|
95
|
+
t[0] !== e ? (m = a("command__group", e), t[0] = e, t[1] = m) : m = t[1];
|
|
87
96
|
const o = m;
|
|
88
97
|
let n;
|
|
89
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
90
|
-
},
|
|
98
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r.Group, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
99
|
+
}, at = (e) => {
|
|
91
100
|
const t = c.c(4);
|
|
92
101
|
let m;
|
|
93
|
-
t[0] !== e ? (m =
|
|
102
|
+
t[0] !== e ? (m = a("command__item", e), t[0] = e, t[1] = m) : m = t[1];
|
|
94
103
|
const o = m;
|
|
95
104
|
let n;
|
|
96
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
97
|
-
},
|
|
105
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r.Item, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
106
|
+
}, dt = (e) => {
|
|
98
107
|
const t = c.c(4);
|
|
99
108
|
let m;
|
|
100
|
-
t[0] !== e ? (m =
|
|
109
|
+
t[0] !== e ? (m = a("command__separator", e), t[0] = e, t[1] = m) : m = t[1];
|
|
101
110
|
const o = m;
|
|
102
111
|
let n;
|
|
103
|
-
return t[2] !== o ? (n = /* @__PURE__ */ i(
|
|
104
|
-
},
|
|
112
|
+
return t[2] !== o ? (n = /* @__PURE__ */ i(r.Separator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
|
|
113
|
+
}, ft = (e) => {
|
|
105
114
|
const t = c.c(5);
|
|
106
115
|
let m;
|
|
107
|
-
t[0] !== e ? (m =
|
|
116
|
+
t[0] !== e ? (m = a("command__shortcut", e), t[0] = e, t[1] = m) : m = t[1];
|
|
108
117
|
const o = m;
|
|
109
118
|
let n;
|
|
110
119
|
return t[2] !== e.children || t[3] !== o ? (n = /* @__PURE__ */ i(_, { ...o, children: e.children }), t[2] = e.children, t[3] = o, t[4] = n) : n = t[4], n;
|
|
111
120
|
};
|
|
112
121
|
export {
|
|
113
122
|
P as Command,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
ot as CommandDialog,
|
|
124
|
+
ct as CommandEmpty,
|
|
125
|
+
rt as CommandGroup,
|
|
126
|
+
lt as CommandInput,
|
|
127
|
+
at as CommandItem,
|
|
128
|
+
it as CommandList,
|
|
129
|
+
dt as CommandSeparator,
|
|
130
|
+
ft as CommandShortcut
|
|
122
131
|
};
|
|
@@ -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 {};
|