@code0-tech/pictor 0.6.1 → 0.6.2
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 +1 -1
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/gantt/Gantt.style.css +1 -0
- package/dist/assets/components/layout/Layout.style.css +1 -1
- package/dist/components/alert/Alert.d.ts +2 -2
- package/dist/components/alert/Alert.js +8 -7
- package/dist/components/avatar/Avatar.d.ts +2 -2
- package/dist/components/avatar/Avatar.js +30 -27
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +26 -23
- package/dist/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -14
- package/dist/components/button/Button.d.ts +3 -3
- package/dist/components/button/Button.js +13 -12
- package/dist/components/button-group/ButtonGroup.d.ts +2 -2
- package/dist/components/button-group/ButtonGroup.js +23 -20
- package/dist/components/card/Card.d.ts +3 -3
- package/dist/components/card/Card.js +19 -16
- package/dist/components/card/CardSection.d.ts +2 -2
- package/dist/components/card/CardSection.js +16 -13
- package/dist/components/col/Col.d.ts +2 -2
- package/dist/components/col/Col.js +22 -19
- package/dist/components/command/Command.d.ts +12 -12
- package/dist/components/command/Command.js +95 -82
- package/dist/components/container/Container.d.ts +2 -2
- package/dist/components/container/Container.js +13 -10
- package/dist/components/context-menu/ContextMenu.d.ts +13 -13
- package/dist/components/context-menu/ContextMenu.js +26 -25
- package/dist/components/data-table/DataTable.d.ts +2 -2
- package/dist/components/data-table/DataTable.js +18 -17
- package/dist/components/data-table/DataTableColumn.d.ts +2 -2
- package/dist/components/data-table/DataTableColumn.js +12 -11
- package/dist/components/data-table/DataTableFilterInput.js +4 -3
- package/dist/components/dialog/Dialog.d.ts +12 -12
- package/dist/components/dialog/Dialog.js +24 -23
- package/dist/components/editor/Editor.d.ts +2 -2
- package/dist/components/editor/Editor.js +4 -3
- package/dist/components/file-tabs/FileTabs.d.ts +5 -5
- package/dist/components/file-tabs/FileTabs.js +38 -35
- package/dist/components/flex/Flex.d.ts +2 -2
- package/dist/components/flex/Flex.js +16 -13
- package/dist/components/form/CheckboxInput.js +17 -15
- package/dist/components/form/Input.d.ts +3 -3
- package/dist/components/form/Input.js +4 -3
- package/dist/components/form/PinInput.d.ts +3 -3
- package/dist/components/form/PinInput.js +33 -30
- package/dist/components/form/RadioGroup.js +22 -19
- package/dist/components/form/RadioInput.d.ts +2 -2
- package/dist/components/form/RadioInput.js +19 -16
- package/dist/components/fullscreen/FullScreen.d.ts +2 -2
- package/dist/components/fullscreen/FullScreen.js +8 -6
- package/dist/components/gantt/Gantt.d.ts +12 -0
- package/dist/components/gantt/Gantt.js +92 -0
- package/dist/components/gantt/GanttFooter.d.ts +2 -0
- package/dist/components/gantt/GanttFooter.js +38 -0
- package/dist/components/gantt/GanttGroup.d.ts +8 -0
- package/dist/components/gantt/GanttGroup.js +134 -0
- package/dist/components/gantt/GanttHeader.d.ts +10 -0
- package/dist/components/gantt/GanttHeader.js +55 -0
- package/dist/components/gantt/GanttItem.d.ts +16 -0
- package/dist/components/gantt/GanttItem.js +23 -0
- package/dist/components/layout/Layout.d.ts +3 -3
- package/dist/components/layout/Layout.js +37 -33
- package/dist/components/menu/Menu.d.ts +15 -15
- package/dist/components/menu/Menu.js +35 -32
- package/dist/components/resizable/Resizable.d.ts +4 -4
- package/dist/components/resizable/Resizable.js +18 -17
- package/dist/components/row/Row.d.ts +2 -2
- package/dist/components/row/Row.js +15 -12
- package/dist/components/scroll-area/ScrollArea.d.ts +6 -6
- package/dist/components/scroll-area/ScrollArea.js +35 -32
- package/dist/components/segmented-control/SegmentedControl.d.ts +3 -3
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +3 -3
- package/dist/components/spacing/Spacing.js +12 -11
- package/dist/components/tab/Tab.d.ts +5 -5
- package/dist/components/tab/Tab.js +22 -21
- package/dist/components/text/Text.d.ts +3 -3
- package/dist/components/text/Text.js +14 -11
- package/dist/components/toast/Toast.d.ts +2 -2
- package/dist/components/toast/Toast.js +32 -31
- package/dist/components/tooltip/Tooltip.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.js +34 -31
- package/dist/index.d.ts +1 -0
- package/dist/index.js +151 -152
- package/dist/utils/color.d.ts +4 -0
- package/dist/utils/color.js +43 -0
- package/dist/utils/component.d.ts +105 -0
- package/dist/utils/component.js +130 -0
- package/dist/utils/index.d.ts +3 -4
- package/dist/utils/index.js +14 -18
- package/dist/utils/size.d.ts +4 -0
- package/dist/utils/size.js +21 -0
- package/dist/utils/utils.d.ts +0 -55
- package/dist/utils/utils.js +1 -159
- package/package.json +3 -3
- package/dist/utils/nonReactiveArrayService.d.ts +0 -19
- package/dist/utils/nonReactiveArrayService.js +0 -54
- package/dist/utils/objectStore.d.ts +0 -12
- package/dist/utils/objectStore.js +0 -34
- package/dist/utils/types.d.ts +0 -57
- package/dist/utils/types.js +0 -4
|
@@ -8,7 +8,8 @@ import { DataTableFilterSuggestionMenu as j } from "./DataTableFilterSuggestionM
|
|
|
8
8
|
import { MenuItem as G } from "../menu/Menu.js";
|
|
9
9
|
import "../../utils/contextStore.js";
|
|
10
10
|
import "react";
|
|
11
|
-
import
|
|
11
|
+
import "merge-props";
|
|
12
|
+
import { hashToColor as X } from "../../utils/color.js";
|
|
12
13
|
const $ = {
|
|
13
14
|
"=": "isOneOf",
|
|
14
15
|
"!=": "isNotOneOf"
|
|
@@ -42,7 +43,7 @@ const $ = {
|
|
|
42
43
|
}
|
|
43
44
|
return e.next(), null;
|
|
44
45
|
}
|
|
45
|
-
}),
|
|
46
|
+
}), Ne = (r) => {
|
|
46
47
|
const e = Q.c(17), {
|
|
47
48
|
filterTokens: n,
|
|
48
49
|
onChange: k
|
|
@@ -207,6 +208,6 @@ function ne(r) {
|
|
|
207
208
|
return r.docChanged && r.newDoc.lines > 1 ? [] : r;
|
|
208
209
|
}
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
Ne as DataTableFilterInput,
|
|
211
212
|
Z as createFilterQueryLanguage
|
|
212
213
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, ComponentProps } from '../../utils';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
-
export type DialogProps =
|
|
5
|
-
export type DialogTriggerProps =
|
|
6
|
-
export type DialogPortalProps =
|
|
7
|
-
export type DialogCloseProps =
|
|
8
|
-
export type DialogOverlayProps =
|
|
9
|
-
export type DialogTitleProps =
|
|
10
|
-
export type DialogDescriptionProps =
|
|
11
|
-
export type DialogHeaderProps =
|
|
12
|
-
export type DialogFooterProps =
|
|
13
|
-
export type DialogContentProps =
|
|
4
|
+
export type DialogProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
5
|
+
export type DialogTriggerProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Trigger>;
|
|
6
|
+
export type DialogPortalProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Portal>;
|
|
7
|
+
export type DialogCloseProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Close>;
|
|
8
|
+
export type DialogOverlayProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Overlay>;
|
|
9
|
+
export type DialogTitleProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Title>;
|
|
10
|
+
export type DialogDescriptionProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Description>;
|
|
11
|
+
export type DialogHeaderProps = ComponentProps & React.ComponentProps<"div">;
|
|
12
|
+
export type DialogFooterProps = ComponentProps & React.ComponentProps<"div">;
|
|
13
|
+
export type DialogContentProps = ComponentProps & React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
14
14
|
showCloseButton?: boolean;
|
|
15
15
|
title?: string;
|
|
16
16
|
};
|
|
17
|
-
export type DialogStickyContentProps =
|
|
17
|
+
export type DialogStickyContentProps = Component<HTMLDivElement> & {
|
|
18
18
|
children: React.ReactNode | React.ReactNode[];
|
|
19
19
|
};
|
|
20
20
|
export declare const Dialog: React.FC<DialogProps>;
|
|
@@ -3,27 +3,28 @@ import { c } from "../../_virtual/compiler-runtime.js";
|
|
|
3
3
|
import * as s from "@radix-ui/react-dialog";
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import {
|
|
6
|
+
import { mergeComponentProps as r } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
7
8
|
import { IconX as g } from "@tabler/icons-react";
|
|
8
9
|
import '../../assets/components/dialog/Dialog.style.css';/* empty css */
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Flex as
|
|
10
|
+
import { Button as m } from "../button/Button.js";
|
|
11
|
+
import { Flex as d } from "../flex/Flex.js";
|
|
11
12
|
import { Text as _ } from "../text/Text.js";
|
|
12
|
-
const
|
|
13
|
+
const j = (i) => {
|
|
13
14
|
const t = c.c(4);
|
|
14
15
|
let l;
|
|
15
16
|
t[0] !== i ? (l = r("dialog", i), t[0] = i, t[1] = l) : l = t[1];
|
|
16
17
|
const o = l;
|
|
17
18
|
let e;
|
|
18
19
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Root, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
19
|
-
},
|
|
20
|
+
}, z = (i) => {
|
|
20
21
|
const t = c.c(4);
|
|
21
22
|
let l;
|
|
22
23
|
t[0] !== i ? (l = r("dialog__trigger", i), t[0] = i, t[1] = l) : l = t[1];
|
|
23
24
|
const o = l;
|
|
24
25
|
let e;
|
|
25
26
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Trigger, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
26
|
-
},
|
|
27
|
+
}, F = (i) => {
|
|
27
28
|
const t = c.c(4);
|
|
28
29
|
let l;
|
|
29
30
|
t[0] !== i ? (l = r("dialog__portal", i), t[0] = i, t[1] = l) : l = t[1];
|
|
@@ -37,50 +38,50 @@ const P = (i) => {
|
|
|
37
38
|
const o = l;
|
|
38
39
|
let e;
|
|
39
40
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Close, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
40
|
-
},
|
|
41
|
+
}, O = (i) => {
|
|
41
42
|
const t = c.c(4);
|
|
42
43
|
let l;
|
|
43
44
|
t[0] !== i ? (l = r("dialog__overlay", i), t[0] = i, t[1] = l) : l = t[1];
|
|
44
45
|
const o = l;
|
|
45
46
|
let e;
|
|
46
47
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Overlay, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
47
|
-
},
|
|
48
|
+
}, R = (i) => {
|
|
48
49
|
const t = c.c(9);
|
|
49
50
|
let l;
|
|
50
51
|
t[0] !== i ? (l = r("dialog__content", i), t[0] = i, t[1] = l) : l = t[1];
|
|
51
52
|
const o = l;
|
|
52
53
|
let e;
|
|
53
|
-
t[2] !== i.showCloseButton || t[3] !== i.title ? (e = i.showCloseButton && /* @__PURE__ */ f(
|
|
54
|
+
t[2] !== i.showCloseButton || t[3] !== i.title ? (e = i.showCloseButton && /* @__PURE__ */ f(d, { align: "center", justify: "space-between", children: [
|
|
54
55
|
/* @__PURE__ */ n(_, { hierarchy: "primary", size: "xl", children: i.title }),
|
|
55
|
-
/* @__PURE__ */ n(u, { asChild: !0, children: /* @__PURE__ */ n(
|
|
56
|
+
/* @__PURE__ */ n(u, { asChild: !0, children: /* @__PURE__ */ n(m, { children: /* @__PURE__ */ n(g, { size: 16 }) }) })
|
|
56
57
|
] }), t[2] = i.showCloseButton, t[3] = i.title, t[4] = e) : e = t[4];
|
|
57
58
|
let a;
|
|
58
59
|
return t[5] !== i.children || t[6] !== o || t[7] !== e ? (a = /* @__PURE__ */ f(s.Content, { ...o, children: [
|
|
59
60
|
e,
|
|
60
61
|
i.children
|
|
61
62
|
] }), t[5] = i.children, t[6] = o, t[7] = e, t[8] = a) : a = t[8], a;
|
|
62
|
-
},
|
|
63
|
+
}, b = (i) => {
|
|
63
64
|
const t = c.c(4);
|
|
64
65
|
let l;
|
|
65
66
|
t[0] !== i ? (l = r("dialog__title", i), t[0] = i, t[1] = l) : l = t[1];
|
|
66
67
|
const o = l;
|
|
67
68
|
let e;
|
|
68
69
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Title, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
69
|
-
},
|
|
70
|
+
}, E = (i) => {
|
|
70
71
|
const t = c.c(4);
|
|
71
72
|
let l;
|
|
72
73
|
t[0] !== i ? (l = r("dialog__description", i), t[0] = i, t[1] = l) : l = t[1];
|
|
73
74
|
const o = l;
|
|
74
75
|
let e;
|
|
75
76
|
return t[2] !== o ? (e = /* @__PURE__ */ n(s.Description, { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
76
|
-
},
|
|
77
|
+
}, H = (i) => {
|
|
77
78
|
const t = c.c(4);
|
|
78
79
|
let l;
|
|
79
80
|
t[0] !== i ? (l = r("dialog__header", i), t[0] = i, t[1] = l) : l = t[1];
|
|
80
81
|
const o = l;
|
|
81
82
|
let e;
|
|
82
83
|
return t[2] !== o ? (e = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
83
|
-
},
|
|
84
|
+
}, I = (i) => {
|
|
84
85
|
const t = c.c(4);
|
|
85
86
|
let l;
|
|
86
87
|
t[0] !== i ? (l = r("dialog__footer", i), t[0] = i, t[1] = l) : l = t[1];
|
|
@@ -89,14 +90,14 @@ const P = (i) => {
|
|
|
89
90
|
return t[2] !== o ? (e = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = e) : e = t[3], e;
|
|
90
91
|
};
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
j as Dialog,
|
|
93
94
|
u as DialogClose,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
R as DialogContent,
|
|
96
|
+
E as DialogDescription,
|
|
97
|
+
I as DialogFooter,
|
|
98
|
+
H as DialogHeader,
|
|
99
|
+
O as DialogOverlay,
|
|
100
|
+
F as DialogPortal,
|
|
101
|
+
b as DialogTitle,
|
|
102
|
+
z as DialogTrigger
|
|
102
103
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Component } from '../../utils';
|
|
3
3
|
import { ValidationProps } from '../form';
|
|
4
4
|
import { Extension } from '@uiw/react-codemirror';
|
|
5
5
|
import { StreamLanguage, TagStyle } from '@codemirror/language';
|
|
@@ -12,7 +12,7 @@ export interface EditorRendererProps {
|
|
|
12
12
|
export interface EditorTokenHighlights {
|
|
13
13
|
[tokenName: string]: (props: EditorRendererProps) => React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export interface EditorInputProps extends Omit<
|
|
15
|
+
export interface EditorInputProps extends Omit<Component<HTMLDivElement>, 'onChange' | 'defaultValue' | 'value'>, ValidationProps<any> {
|
|
16
16
|
language?: 'json' | StreamLanguage<unknown>;
|
|
17
17
|
tokenizer?: EditorTokenizer;
|
|
18
18
|
tokenHighlights?: EditorTokenHighlights;
|
|
@@ -2,7 +2,8 @@ import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import m, { isValidElement as me } from "react";
|
|
3
3
|
import { createPortal as K } from "react-dom";
|
|
4
4
|
import "../../utils/contextStore.js";
|
|
5
|
-
import {
|
|
5
|
+
import { mergeComponentProps as he } from "../../utils/component.js";
|
|
6
|
+
import { hashToColor as w } from "../../utils/color.js";
|
|
6
7
|
import fe, { Prec as _, keymap as J, ViewPlugin as ge, RangeSetBuilder as pe, Decoration as F, EditorView as ye, WidgetType as be } from "@uiw/react-codemirror";
|
|
7
8
|
import { json as ve, jsonParseLinter as Se } from "@codemirror/lang-json";
|
|
8
9
|
import { syntaxTree as L } from "@codemirror/language";
|
|
@@ -52,7 +53,7 @@ class X extends be {
|
|
|
52
53
|
return t.type === this.type && t.rawValue === this.rawValue;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
const De = (i) => me(i) || typeof i == "string" || typeof i == "number" || Array.isArray(i),
|
|
56
|
+
const De = (i) => me(i) || typeof i == "string" || typeof i == "number" || Array.isArray(i), dr = (i) => {
|
|
56
57
|
const {
|
|
57
58
|
language: t,
|
|
58
59
|
tokenizer: f,
|
|
@@ -321,5 +322,5 @@ const De = (i) => me(i) || typeof i == "string" || typeof i == "number" || Array
|
|
|
321
322
|
] });
|
|
322
323
|
};
|
|
323
324
|
export {
|
|
324
|
-
|
|
325
|
+
dr as Editor
|
|
325
326
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from '@radix-ui/react-tabs';
|
|
3
|
-
import {
|
|
4
|
-
type FileTabsProps =
|
|
5
|
-
type FileTabsListProps =
|
|
3
|
+
import { ComponentProps } from '../../utils';
|
|
4
|
+
type FileTabsProps = ComponentProps & TabsProps;
|
|
5
|
+
type FileTabsListProps = ComponentProps & TabsListProps & {
|
|
6
6
|
controls?: React.ReactNode;
|
|
7
7
|
};
|
|
8
|
-
type FileTabsTriggerProps =
|
|
8
|
+
type FileTabsTriggerProps = ComponentProps & TabsTriggerProps & {
|
|
9
9
|
onClose?: () => void;
|
|
10
10
|
closable?: boolean;
|
|
11
11
|
};
|
|
12
|
-
type FileTabsContentProps =
|
|
12
|
+
type FileTabsContentProps = ComponentProps & TabsContentProps;
|
|
13
13
|
export declare const FileTabs: React.FC<FileTabsProps>;
|
|
14
14
|
export declare const FileTabsList: React.FC<FileTabsListProps>;
|
|
15
15
|
export declare const FileTabsTrigger: React.FC<FileTabsTriggerProps>;
|
|
@@ -1,71 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as b } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { Tabs as g, List as T, Trigger as v, Content as C } from "@radix-ui/react-tabs";
|
|
4
|
-
import
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeComponentProps as h } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
5
8
|
import '../../assets/components/file-tabs/FileTabs.style.css';/* empty css */
|
|
6
9
|
import { IconX as S } from "@tabler/icons-react";
|
|
7
10
|
import { ScrollAreaViewport as x, ScrollAreaScrollbar as A, ScrollAreaThumb as F, ScrollArea as $ } from "../scroll-area/ScrollArea.js";
|
|
8
|
-
const
|
|
11
|
+
const R = (t) => {
|
|
9
12
|
const e = b.c(4);
|
|
10
13
|
let i;
|
|
11
14
|
e[0] !== t ? (i = h("file-tabs", t), e[0] = t, e[1] = i) : i = e[1];
|
|
12
15
|
let l;
|
|
13
|
-
return e[2] !== i ? (l = /* @__PURE__ */
|
|
14
|
-
},
|
|
16
|
+
return e[2] !== i ? (l = /* @__PURE__ */ o(g, { "data-slot": "tabs", ...i }), e[2] = i, e[3] = l) : l = e[3], l;
|
|
17
|
+
}, V = (t) => {
|
|
15
18
|
const e = b.c(10);
|
|
16
19
|
let i;
|
|
17
20
|
e[0] !== t ? (i = h("file-tabs__list", t), e[0] = t, e[1] = i) : i = e[1];
|
|
18
21
|
let l;
|
|
19
|
-
e[2] !== t.children ? (l = /* @__PURE__ */
|
|
22
|
+
e[2] !== t.children ? (l = /* @__PURE__ */ d("div", { className: "file-tabs__list-content", children: [
|
|
20
23
|
" ",
|
|
21
24
|
t.children
|
|
22
25
|
] }), e[2] = t.children, e[3] = l) : l = e[3];
|
|
23
|
-
let n;
|
|
24
|
-
e[4] !== t.controls ? (n = t.controls ? /* @__PURE__ */ a("div", { className: "file-tabs__list-controls", children: t.controls }) : null, e[4] = t.controls, e[5] = n) : n = e[5];
|
|
25
26
|
let c;
|
|
26
|
-
|
|
27
|
+
e[4] !== t.controls ? (c = t.controls ? /* @__PURE__ */ o("div", { className: "file-tabs__list-controls", children: t.controls }) : null, e[4] = t.controls, e[5] = c) : c = e[5];
|
|
28
|
+
let n;
|
|
29
|
+
return e[6] !== i || e[7] !== l || e[8] !== c ? (n = /* @__PURE__ */ d(T, { "data-slot": "tabs", ...i, children: [
|
|
27
30
|
l,
|
|
28
|
-
|
|
29
|
-
] }), e[6] = i, e[7] = l, e[8] =
|
|
30
|
-
},
|
|
31
|
+
c
|
|
32
|
+
] }), e[6] = i, e[7] = l, e[8] = c, e[9] = n) : n = e[9], n;
|
|
33
|
+
}, X = (t) => {
|
|
31
34
|
const e = b.c(10), i = t.value;
|
|
32
35
|
let l;
|
|
33
36
|
e[0] !== t ? (l = h("file-tabs__trigger", t), e[0] = t, e[1] = l) : l = e[1];
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
e[2] !== t.closable || e[3] !== t.onClose ? (
|
|
37
|
+
const c = l;
|
|
38
|
+
let n;
|
|
39
|
+
e[2] !== t.closable || e[3] !== t.onClose ? (n = t.closable ? /* @__PURE__ */ o("div", { className: "file-tabs__trigger-icon", onClick: t.onClose, children: /* @__PURE__ */ o(S, { size: 12 }) }) : null, e[2] = t.closable, e[3] = t.onClose, e[4] = n) : n = e[4];
|
|
37
40
|
let s;
|
|
38
|
-
return e[5] !== t.children || e[6] !== t.value || e[7] !==
|
|
41
|
+
return e[5] !== t.children || e[6] !== t.value || e[7] !== c || e[8] !== n ? (s = /* @__PURE__ */ d(v, { "data-slot": "tabs", "data-value": i, ...c, children: [
|
|
39
42
|
t.children,
|
|
40
|
-
|
|
41
|
-
] }), e[5] = t.children, e[6] = t.value, e[7] =
|
|
42
|
-
},
|
|
43
|
+
n
|
|
44
|
+
] }), e[5] = t.children, e[6] = t.value, e[7] = c, e[8] = n, e[9] = s) : s = e[9], s;
|
|
45
|
+
}, q = (t) => {
|
|
43
46
|
const e = b.c(15);
|
|
44
|
-
let i, l,
|
|
47
|
+
let i, l, c, n;
|
|
45
48
|
if (e[0] !== t) {
|
|
46
49
|
const {
|
|
47
50
|
children: _,
|
|
48
51
|
...u
|
|
49
52
|
} = t;
|
|
50
|
-
l = _, i = C,
|
|
53
|
+
l = _, i = C, n = "tabs", c = h("file-tabs__content", u), e[0] = t, e[1] = i, e[2] = l, e[3] = c, e[4] = n;
|
|
51
54
|
} else
|
|
52
|
-
i = e[1], l = e[2],
|
|
53
|
-
const s =
|
|
54
|
-
let
|
|
55
|
-
e[5] !== l ? (
|
|
55
|
+
i = e[1], l = e[2], c = e[3], n = e[4];
|
|
56
|
+
const s = c;
|
|
57
|
+
let a;
|
|
58
|
+
e[5] !== l ? (a = /* @__PURE__ */ o(x, { children: l }), e[5] = l, e[6] = a) : a = e[6];
|
|
56
59
|
let f;
|
|
57
|
-
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */
|
|
60
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ o(A, { orientation: "vertical", children: /* @__PURE__ */ o(F, {}) }), e[7] = f) : f = e[7];
|
|
58
61
|
let r;
|
|
59
|
-
e[8] !==
|
|
60
|
-
|
|
62
|
+
e[8] !== a ? (r = /* @__PURE__ */ d($, { h: "100%", children: [
|
|
63
|
+
a,
|
|
61
64
|
f
|
|
62
|
-
] }), e[8] =
|
|
63
|
-
let
|
|
64
|
-
return e[10] !== i || e[11] !==
|
|
65
|
+
] }), e[8] = a, e[9] = r) : r = e[9];
|
|
66
|
+
let m;
|
|
67
|
+
return e[10] !== i || e[11] !== n || e[12] !== s || e[13] !== r ? (m = /* @__PURE__ */ o(i, { "data-slot": n, ...s, children: r }), e[10] = i, e[11] = n, e[12] = s, e[13] = r, e[14] = m) : m = e[14], m;
|
|
65
68
|
};
|
|
66
69
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
R as FileTabs,
|
|
71
|
+
q as FileTabsContent,
|
|
72
|
+
V as FileTabsList,
|
|
73
|
+
X as FileTabsTrigger
|
|
71
74
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component } from '../../utils';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
interface FlexType extends
|
|
3
|
+
interface FlexType extends Component<HTMLDivElement> {
|
|
4
4
|
children: React.ReactNode | React.ReactNode[];
|
|
5
5
|
}
|
|
6
6
|
export declare const Flex: React.FC<FlexType>;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c
|
|
3
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import "../../utils/contextStore.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { mergeComponentProps as p } from "../../utils/component.js";
|
|
6
|
+
import "js-md5";
|
|
4
7
|
import '../../assets/components/flex/Flex.style.css';/* empty css */
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
if (
|
|
8
|
+
const g = (i) => {
|
|
9
|
+
const t = c.c(6);
|
|
10
|
+
let e, r;
|
|
11
|
+
if (t[0] !== i) {
|
|
9
12
|
const {
|
|
10
|
-
children:
|
|
11
|
-
...
|
|
13
|
+
children: m,
|
|
14
|
+
...l
|
|
12
15
|
} = i;
|
|
13
|
-
|
|
16
|
+
e = m, r = p("flex", l), t[0] = i, t[1] = e, t[2] = r;
|
|
14
17
|
} else
|
|
15
|
-
|
|
18
|
+
e = t[1], r = t[2];
|
|
16
19
|
let o;
|
|
17
|
-
return
|
|
20
|
+
return t[3] !== e || t[4] !== r ? (o = /* @__PURE__ */ n("div", { ...r, children: e }), t[3] = e, t[4] = r, t[5] = o) : o = t[5], o;
|
|
18
21
|
};
|
|
19
22
|
export {
|
|
20
|
-
|
|
23
|
+
g as Flex
|
|
21
24
|
};
|
|
@@ -4,11 +4,13 @@ import z from "react";
|
|
|
4
4
|
import { Checkbox as y, CheckboxIndicator as D } from "@radix-ui/react-checkbox";
|
|
5
5
|
import { InputLabel as F } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as L } from "./InputDescription.js";
|
|
7
|
-
import
|
|
7
|
+
import "../../utils/contextStore.js";
|
|
8
|
+
import { mergeComponentProps as E } from "../../utils/component.js";
|
|
9
|
+
import "js-md5";
|
|
8
10
|
import { InputMessage as P } from "./InputMessage.js";
|
|
9
11
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
12
|
import { IconMinus as T, IconCheck as q } from "@tabler/icons-react";
|
|
11
|
-
const
|
|
13
|
+
const ee = (l) => {
|
|
12
14
|
const e = $.c(40), {
|
|
13
15
|
title: b,
|
|
14
16
|
description: _,
|
|
@@ -33,10 +35,10 @@ const Y = (l) => {
|
|
|
33
35
|
let c;
|
|
34
36
|
e[9] !== _ ? (c = _ ? /* @__PURE__ */ n(L, { children: _ }) : null, e[9] = _, e[10] = c) : c = e[10];
|
|
35
37
|
const V = `input ${i?.valid ? "" : "input--not-valid"} checkbox-input`;
|
|
36
|
-
let s;
|
|
37
|
-
e[11] !== V ? (s = E(V, {}), e[11] = V, e[12] = s) : s = e[12];
|
|
38
38
|
let r;
|
|
39
|
-
e[
|
|
39
|
+
e[11] !== V ? (r = E(V, {}), e[11] = V, e[12] = r) : r = e[12];
|
|
40
|
+
let s;
|
|
41
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = () => R(A), e[13] = s) : s = e[13];
|
|
40
42
|
const I = y, M = E("checkbox-input__button", N);
|
|
41
43
|
let a;
|
|
42
44
|
e[14] !== t ? (a = t === "indeterminate" && /* @__PURE__ */ n(T, { size: 16 }), e[14] = t, e[15] = a) : a = e[15];
|
|
@@ -51,20 +53,20 @@ const Y = (l) => {
|
|
|
51
53
|
e[21] !== I || e[22] !== t || e[23] !== f || e[24] !== M ? (u = /* @__PURE__ */ n(I, { checked: t, defaultChecked: t, ...M, children: f }), e[21] = I, e[22] = t, e[23] = f, e[24] = M, e[25] = u) : u = e[25];
|
|
52
54
|
let d;
|
|
53
55
|
e[26] !== l.label ? (d = /* @__PURE__ */ n("div", { className: "input__right input__right--action}", children: l.label }), e[26] = l.label, e[27] = d) : d = e[27];
|
|
54
|
-
let
|
|
55
|
-
e[28] !== u || e[29] !== d || e[30] !==
|
|
56
|
+
let p;
|
|
57
|
+
e[28] !== u || e[29] !== d || e[30] !== r || e[31] !== s ? (p = /* @__PURE__ */ j("div", { ...r, onClick: s, children: [
|
|
56
58
|
u,
|
|
57
59
|
d
|
|
58
|
-
] }), e[28] = u, e[29] = d, e[30] =
|
|
59
|
-
let
|
|
60
|
-
e[33] !== i ? (
|
|
60
|
+
] }), e[28] = u, e[29] = d, e[30] = r, e[31] = s, e[32] = p) : p = e[32];
|
|
61
|
+
let h;
|
|
62
|
+
e[33] !== i ? (h = !i?.valid && i?.notValidMessage ? /* @__PURE__ */ n(P, { children: i.notValidMessage }) : null, e[33] = i, e[34] = h) : h = e[34];
|
|
61
63
|
let C;
|
|
62
|
-
return e[35] !==
|
|
64
|
+
return e[35] !== p || e[36] !== h || e[37] !== o || e[38] !== c ? (C = /* @__PURE__ */ j(S, { children: [
|
|
63
65
|
o,
|
|
64
66
|
c,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
] }), e[35] =
|
|
67
|
+
p,
|
|
68
|
+
h
|
|
69
|
+
] }), e[35] = p, e[36] = h, e[37] = o, e[38] = c, e[39] = C) : C = e[39], C;
|
|
68
70
|
};
|
|
69
71
|
function w(l) {
|
|
70
72
|
}
|
|
@@ -72,5 +74,5 @@ function A(l) {
|
|
|
72
74
|
return !l;
|
|
73
75
|
}
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
ee as CheckboxInput
|
|
76
78
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Component } from '../../utils';
|
|
3
3
|
import { ValidationProps } from './useForm';
|
|
4
4
|
import { InputSuggestion } from './InputSuggestion';
|
|
5
5
|
import { InputSyntaxSegment } from './Input.syntax.hook';
|
|
6
|
-
export type Code0Input = Omit<
|
|
6
|
+
export type Code0Input = Omit<Component<HTMLInputElement>, "left" | "right" | "title" | "defaultValue" | "value">;
|
|
7
7
|
export interface InputProps<T> extends Code0Input, ValidationProps<T> {
|
|
8
8
|
suggestions?: InputSuggestion[];
|
|
9
9
|
suggestionsHeader?: React.ReactNode;
|
|
@@ -16,7 +16,7 @@ export interface InputProps<T> extends Code0Input, ValidationProps<T> {
|
|
|
16
16
|
onLastTokenChange?: (token: string | null) => void;
|
|
17
17
|
enforceUniqueSuggestions?: boolean;
|
|
18
18
|
suggestionsEmptyState?: React.ReactNode;
|
|
19
|
-
wrapperComponent?:
|
|
19
|
+
wrapperComponent?: Component<HTMLDivElement>;
|
|
20
20
|
right?: React.ReactNode;
|
|
21
21
|
left?: React.ReactNode;
|
|
22
22
|
leftType?: "action" | "placeholder" | "icon";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs as j, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import l, { useRef as k, useState as q, useMemo as D, useEffect as T, useLayoutEffect as _e } from "react";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
|
-
import {
|
|
4
|
+
import { mergeComponentProps as ue } from "../../utils/component.js";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
6
7
|
import { InputLabel as et } from "./InputLabel.js";
|
|
7
8
|
import { InputDescription as tt } from "./InputDescription.js";
|
|
@@ -428,7 +429,7 @@ const W = (u) => {
|
|
|
428
429
|
] }),
|
|
429
430
|
!L?.valid && L?.notValidMessage && /* @__PURE__ */ p(nt, { children: L.notValidMessage })
|
|
430
431
|
] });
|
|
431
|
-
}),
|
|
432
|
+
}), Mt = mt;
|
|
432
433
|
export {
|
|
433
|
-
|
|
434
|
+
Mt as Input
|
|
434
435
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OneTimePasswordFieldHiddenInputProps, OneTimePasswordFieldInputProps, OneTimePasswordFieldProps } from '@radix-ui/react-one-time-password-field';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps } from '../../utils';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
4
|
import { InputProps } from './Input';
|
|
5
5
|
type PinInputProps = Omit<InputProps<string | null>, "wrapperComponent" | "type" | "left" | "right" | "leftType" | "rightType"> & OneTimePasswordFieldProps;
|
|
6
|
-
type PinInputFieldProps =
|
|
7
|
-
type PinInputHiddenFieldProps =
|
|
6
|
+
type PinInputFieldProps = ComponentProps & OneTimePasswordFieldInputProps;
|
|
7
|
+
type PinInputHiddenFieldProps = ComponentProps & OneTimePasswordFieldHiddenInputProps;
|
|
8
8
|
export declare const PinInput: React.FC<PinInputProps>;
|
|
9
9
|
export declare const PinInputField: React.FC<PinInputFieldProps>;
|
|
10
10
|
export declare const PinInputHiddenField: React.FC<PinInputHiddenFieldProps>;
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as F, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import { c as I } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { OneTimePasswordFieldInput as C, OneTimePasswordFieldHiddenInput as M, OneTimePasswordField as T } from "@radix-ui/react-one-time-password-field";
|
|
4
|
-
import
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeComponentProps as V } from "../../utils/component.js";
|
|
7
|
+
import "js-md5";
|
|
5
8
|
import { InputLabel as _ } from "./InputLabel.js";
|
|
6
9
|
import { InputDescription as $ } from "./InputDescription.js";
|
|
7
10
|
import { InputMessage as w } from "./InputMessage.js";
|
|
8
11
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
9
|
-
const
|
|
12
|
+
const B = (n) => {
|
|
10
13
|
const e = I.c(26);
|
|
11
|
-
let t, i,
|
|
12
|
-
if (e[0] !==
|
|
14
|
+
let t, i, d, l, o, s;
|
|
15
|
+
if (e[0] !== n) {
|
|
13
16
|
const {
|
|
14
|
-
title:
|
|
15
|
-
description:
|
|
17
|
+
title: p,
|
|
18
|
+
description: c,
|
|
16
19
|
disabled: b,
|
|
17
20
|
formValidation: P,
|
|
18
21
|
...g
|
|
19
|
-
} =
|
|
22
|
+
} = n;
|
|
20
23
|
i = P === void 0 ? {
|
|
21
24
|
valid: !0,
|
|
22
25
|
notValidMessage: null,
|
|
23
26
|
setValue: O
|
|
24
|
-
} : P, e[7] !==
|
|
27
|
+
} : P, e[7] !== p ? (o = p ? /* @__PURE__ */ r(_, { children: p }) : null, e[7] = p, e[8] = o) : o = e[8], e[9] !== c ? (s = c ? /* @__PURE__ */ r($, { children: c }) : null, e[9] = c, e[10] = s) : s = e[10];
|
|
25
28
|
const h = `${i?.valid ? "" : "input--not-valid"}`;
|
|
26
|
-
e[11] !== h ? (
|
|
29
|
+
e[11] !== h ? (l = V(h, {}), e[11] = h, e[12] = l) : l = e[12], t = T, d = V("pin-input", {
|
|
27
30
|
...g,
|
|
28
31
|
onValueChange: (v) => {
|
|
29
32
|
g.onValueChange && g.onValueChange(v), i.setValue(v);
|
|
30
33
|
}
|
|
31
|
-
}), e[0] =
|
|
34
|
+
}), e[0] = n, e[1] = t, e[2] = i, e[3] = d, e[4] = l, e[5] = o, e[6] = s;
|
|
32
35
|
} else
|
|
33
|
-
t = e[1], i = e[2],
|
|
36
|
+
t = e[1], i = e[2], d = e[3], l = e[4], o = e[5], s = e[6];
|
|
34
37
|
let a;
|
|
35
|
-
e[13] !== t || e[14] !==
|
|
38
|
+
e[13] !== t || e[14] !== d ? (a = /* @__PURE__ */ r(t, { ...d }), e[13] = t, e[14] = d, e[15] = a) : a = e[15];
|
|
39
|
+
let m;
|
|
40
|
+
e[16] !== l || e[17] !== a ? (m = /* @__PURE__ */ r("div", { ...l, children: a }), e[16] = l, e[17] = a, e[18] = m) : m = e[18];
|
|
36
41
|
let u;
|
|
37
|
-
e[
|
|
42
|
+
e[19] !== i ? (u = !i?.valid && i?.notValidMessage ? /* @__PURE__ */ r(w, { children: i.notValidMessage }) : null, e[19] = i, e[20] = u) : u = e[20];
|
|
38
43
|
let f;
|
|
39
|
-
e[
|
|
40
|
-
let m;
|
|
41
|
-
return e[21] !== o || e[22] !== s || e[23] !== u || e[24] !== f ? (m = /* @__PURE__ */ F(x, { children: [
|
|
44
|
+
return e[21] !== o || e[22] !== s || e[23] !== m || e[24] !== u ? (f = /* @__PURE__ */ F(x, { children: [
|
|
42
45
|
o,
|
|
43
46
|
s,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
] }), e[21] = o, e[22] = s, e[23] =
|
|
47
|
-
},
|
|
47
|
+
m,
|
|
48
|
+
u
|
|
49
|
+
] }), e[21] = o, e[22] = s, e[23] = m, e[24] = u, e[25] = f) : f = e[25], f;
|
|
50
|
+
}, G = (n) => {
|
|
48
51
|
const e = I.c(4);
|
|
49
52
|
let t;
|
|
50
|
-
e[0] !==
|
|
53
|
+
e[0] !== n ? (t = V("input pin-input__field", n), e[0] = n, e[1] = t) : t = e[1];
|
|
51
54
|
let i;
|
|
52
|
-
return e[2] !== t ? (i = /* @__PURE__ */
|
|
53
|
-
},
|
|
55
|
+
return e[2] !== t ? (i = /* @__PURE__ */ r(C, { ...t }), e[2] = t, e[3] = i) : i = e[3], i;
|
|
56
|
+
}, J = (n) => {
|
|
54
57
|
const e = I.c(4);
|
|
55
58
|
let t;
|
|
56
|
-
e[0] !==
|
|
59
|
+
e[0] !== n ? (t = V("pin-input__hidden-field", n), e[0] = n, e[1] = t) : t = e[1];
|
|
57
60
|
let i;
|
|
58
|
-
return e[2] !== t ? (i = /* @__PURE__ */
|
|
61
|
+
return e[2] !== t ? (i = /* @__PURE__ */ r(M, { ...t }), e[2] = t, e[3] = i) : i = e[3], i;
|
|
59
62
|
};
|
|
60
|
-
function O(
|
|
63
|
+
function O(n) {
|
|
61
64
|
}
|
|
62
65
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
B as PinInput,
|
|
67
|
+
G as PinInputField,
|
|
68
|
+
J as PinInputHiddenField
|
|
66
69
|
};
|