@code0-tech/pictor 0.0.0-mvp.22 → 0.0.0-mvp.24
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/aurora/Aurora.style.css +1 -0
- package/dist/assets/components/badge/Badge.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/command/Command.style.css +1 -1
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -1
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -1
- package/dist/assets/components/dialog/Dialog.style.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.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/tooltip/Tooltip.style.css +1 -1
- package/dist/components/aurora/Aurora.d.ts +5 -0
- package/dist/components/aurora/Aurora.js +23 -0
- package/dist/components/badge/Badge.d.ts +1 -0
- package/dist/components/badge/Badge.js +12 -11
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/d-flow/DFlow.view.d.ts +6 -2
- package/dist/components/d-flow/DFlow.view.js +52 -17
- package/dist/components/d-flow/control/DFlowControl.js +38 -38
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +1 -1
- package/dist/components/d-flow/export/DFlowExport.d.ts +6 -0
- package/dist/components/d-flow/export/DFlowExport.js +24 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +32 -32
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +22 -22
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +11 -11
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +29 -16
- package/dist/components/d-flow/tab/DFlowTabDefault.js +59 -53
- package/dist/components/d-flow/type/DFlowType.view.d.ts +1 -1
- package/dist/components/d-member/DNamespaceMember.view.js +13 -11
- package/dist/components/d-member/DNamespaceMemberCard.d.ts +10 -0
- package/dist/components/d-member/DNamespaceMemberCard.js +16 -0
- package/dist/components/d-member/DNamespaceMemberContent.d.ts +10 -0
- package/dist/components/d-member/DNamespaceMemberContent.js +176 -0
- package/dist/components/d-member/DNamespaceMemberList.d.ts +12 -0
- package/dist/components/d-member/DNamespaceMemberList.js +23 -0
- package/dist/components/d-member/index.d.ts +2 -0
- package/dist/components/d-member/index.js +6 -2
- package/dist/components/d-organization/DOrganizatonContent.js +29 -14
- package/dist/components/d-organization/index.js +22 -7
- package/dist/components/d-project/DNamespaceProjectContent.js +36 -42
- package/dist/components/d-role/DNamespaceRole.view.d.ts +4 -1
- package/dist/components/d-role/DNamespaceRole.view.js +6 -3
- package/dist/components/d-role/DNamespaceRoleCard.d.ts +11 -0
- package/dist/components/d-role/DNamespaceRoleCard.js +17 -0
- package/dist/components/d-role/DNamespaceRoleContent.d.ts +10 -0
- package/dist/components/d-role/DNamespaceRoleContent.js +156 -0
- package/dist/components/d-role/DNamespaceRoleList.d.ts +12 -0
- package/dist/components/d-role/DNamespaceRoleList.js +24 -0
- package/dist/components/d-role/DNamespaceRolePermissions.d.ts +5 -0
- package/dist/components/d-role/DNamespaceRolePermissions.js +129 -0
- package/dist/components/d-role/index.d.ts +2 -0
- package/dist/components/d-role/index.js +6 -2
- package/dist/components/d-runtime/DRuntimeCard.d.ts +1 -0
- package/dist/components/d-runtime/DRuntimeCard.js +13 -12
- package/dist/components/d-runtime/DRuntimeContent.d.ts +1 -0
- package/dist/components/d-runtime/DRuntimeContent.js +25 -20
- package/dist/components/d-runtime/DRuntimeList.d.ts +2 -1
- package/dist/components/d-runtime/DRuntimeList.js +17 -14
- package/dist/components/d-user/DUser.service.d.ts +1 -0
- package/dist/components/d-user/DUser.service.js +5 -2
- package/dist/components/d-user/DUserContent.js +25 -25
- package/dist/components/d-user/DUserInput.d.ts +7 -0
- package/dist/components/d-user/DUserInput.js +98 -0
- package/dist/components/d-user/DUserMenu.js +7 -6
- package/dist/components/d-user/index.d.ts +1 -0
- package/dist/components/d-user/index.js +11 -9
- package/dist/components/dialog/Dialog.d.ts +2 -1
- package/dist/components/dialog/Dialog.js +67 -59
- package/dist/components/form/EmailInput.js +12 -11
- package/dist/components/form/Input.d.ts +17 -5
- package/dist/components/form/Input.js +420 -137
- package/dist/components/form/Input.selection.hook.d.ts +17 -0
- package/dist/components/form/Input.selection.hook.js +78 -0
- package/dist/components/form/Input.syntax.hook.d.ts +27 -0
- package/dist/components/form/Input.syntax.hook.js +80 -0
- package/dist/components/form/Input.utils.d.ts +11 -0
- package/dist/components/form/Input.utils.js +33 -0
- package/dist/components/form/InputSuggestion.d.ts +14 -6
- package/dist/components/form/InputSuggestion.js +126 -72
- package/dist/components/form/InputSyntax.d.ts +19 -0
- package/dist/components/form/InputSyntax.js +52 -0
- package/dist/components/form/PasswordInput.js +11 -10
- package/dist/components/form/TextInput.js +11 -10
- package/dist/components/form/index.js +26 -27
- package/dist/components/form/inputSyntaxMapping.d.ts +3 -0
- package/dist/components/form/inputSyntaxMapping.js +42 -0
- package/dist/components/menu/Menu.d.ts +7 -3
- package/dist/components/menu/Menu.js +22 -22
- package/dist/components/tooltip/Tooltip.js +33 -33
- package/dist/index.d.ts +1 -0
- package/dist/index.js +250 -239
- package/dist/utils/generics.js +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextInputProps } from '../form';
|
|
3
|
+
import { DUserView } from './DUser.view';
|
|
4
|
+
export interface DUserInputProps extends TextInputProps {
|
|
5
|
+
filter?: (user: DUserView, index: number) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const DUserInput: React.FC<DUserInputProps>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import "../../_virtual/compiler-runtime.js";
|
|
4
|
+
import "@radix-ui/react-checkbox";
|
|
5
|
+
import "merge-props";
|
|
6
|
+
import { IconArrowUp as S, IconArrowDown as b, IconCornerDownLeft as I } from "@tabler/icons-react";
|
|
7
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
8
|
+
import "../form/EmailInput.js";
|
|
9
|
+
import "../form/Input.js";
|
|
10
|
+
import "../form/InputSuggestion.js";
|
|
11
|
+
import "../form/NumberInput.js";
|
|
12
|
+
import "../form/PasswordInput.js";
|
|
13
|
+
import "@radix-ui/react-one-time-password-field";
|
|
14
|
+
import "@radix-ui/react-radio-group";
|
|
15
|
+
import "../form/SwitchInput.js";
|
|
16
|
+
import { TextInput as L } from "../form/TextInput.js";
|
|
17
|
+
import { Badge as m } from "../badge/Badge.js";
|
|
18
|
+
import { Text as l } from "../text/Text.js";
|
|
19
|
+
import { useService as U, useStore as D } from "../../utils/contextStore.js";
|
|
20
|
+
import { DUserReactiveService as g } from "./DUser.service.js";
|
|
21
|
+
import { MenuLabel as w, MenuItem as z } from "../menu/Menu.js";
|
|
22
|
+
import { Flex as s } from "../flex/Flex.js";
|
|
23
|
+
import { Spacing as B } from "../spacing/Spacing.js";
|
|
24
|
+
const P = (p) => {
|
|
25
|
+
const {
|
|
26
|
+
filter: h = () => !0,
|
|
27
|
+
...d
|
|
28
|
+
} = p, u = U(g), f = D(g), y = x.useMemo(() => u.values().filter(h).map((r) => ({
|
|
29
|
+
value: r.username || "",
|
|
30
|
+
children: /* @__PURE__ */ o(s, { align: "end", style: {
|
|
31
|
+
gap: "0.35rem"
|
|
32
|
+
}, children: [
|
|
33
|
+
/* @__PURE__ */ e(l, { children: r.username }),
|
|
34
|
+
/* @__PURE__ */ e(l, { size: "xs", hierarchy: "tertiary", children: r.email })
|
|
35
|
+
] }),
|
|
36
|
+
insertMode: "insert",
|
|
37
|
+
valueData: r,
|
|
38
|
+
groupBy: "Users"
|
|
39
|
+
})), [f]);
|
|
40
|
+
return /* @__PURE__ */ e(L, { placeholder: "Enter users", suggestionsEmptyState: /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(l, { children: "No user found" }) }), onLastTokenChange: (r) => {
|
|
41
|
+
u.getByUsername(r);
|
|
42
|
+
}, suggestionsFooter: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ o(s, { style: {
|
|
43
|
+
gap: ".35rem"
|
|
44
|
+
}, children: [
|
|
45
|
+
/* @__PURE__ */ o(s, { align: "center", style: {
|
|
46
|
+
gap: "0.35rem"
|
|
47
|
+
}, children: [
|
|
48
|
+
/* @__PURE__ */ o(s, { children: [
|
|
49
|
+
/* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(S, { size: 12 }) }),
|
|
50
|
+
/* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(b, { size: 12 }) })
|
|
51
|
+
] }),
|
|
52
|
+
"move"
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ e(B, { spacing: "xxs" }),
|
|
55
|
+
/* @__PURE__ */ o(s, { align: "center", style: {
|
|
56
|
+
gap: ".35rem"
|
|
57
|
+
}, children: [
|
|
58
|
+
/* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(I, { size: 12 }) }),
|
|
59
|
+
"insert"
|
|
60
|
+
] })
|
|
61
|
+
] }) }), filterSuggestionsByLastToken: !0, enforceUniqueSuggestions: !0, transformSyntax: (r, a = []) => {
|
|
62
|
+
let t = 0;
|
|
63
|
+
return a.map((i, v) => {
|
|
64
|
+
if (typeof i == "object") {
|
|
65
|
+
const c = {
|
|
66
|
+
type: "block",
|
|
67
|
+
start: t,
|
|
68
|
+
end: t + i.value.length,
|
|
69
|
+
visualLength: 1,
|
|
70
|
+
content: /* @__PURE__ */ e(m, { color: "info", border: !0, children: /* @__PURE__ */ o(l, { style: {
|
|
71
|
+
color: "inherit"
|
|
72
|
+
}, children: [
|
|
73
|
+
"@",
|
|
74
|
+
i.value
|
|
75
|
+
] }) })
|
|
76
|
+
};
|
|
77
|
+
return t += i.value.length, c;
|
|
78
|
+
}
|
|
79
|
+
const n = i ?? "";
|
|
80
|
+
if (n.length) {
|
|
81
|
+
if (v == a.length - 1) {
|
|
82
|
+
const c = {
|
|
83
|
+
type: "text",
|
|
84
|
+
start: t,
|
|
85
|
+
end: t + n.length,
|
|
86
|
+
visualLength: n.length,
|
|
87
|
+
content: n
|
|
88
|
+
};
|
|
89
|
+
return t += n.length, c;
|
|
90
|
+
}
|
|
91
|
+
return t += n.length, {};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}, ...d, suggestions: y });
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
P as DUserInput
|
|
98
|
+
};
|
|
@@ -2,17 +2,18 @@ import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "react";
|
|
3
3
|
import { Menu as l, MenuTrigger as u, MenuPortal as d, MenuContent as h } from "../menu/Menu.js";
|
|
4
4
|
import { DUserReactiveService as s } from "./DUser.service.js";
|
|
5
|
-
import { useService as f, useStore as
|
|
6
|
-
import
|
|
5
|
+
import { useService as f, useStore as p } from "../../utils/contextStore.js";
|
|
6
|
+
import "merge-props";
|
|
7
|
+
import { Avatar as x } from "../avatar/Avatar.js";
|
|
7
8
|
import { Text as c } from "../text/Text.js";
|
|
8
9
|
import { Flex as m } from "../flex/Flex.js";
|
|
9
|
-
const
|
|
10
|
-
const n = f(s), a =
|
|
10
|
+
const C = (t) => {
|
|
11
|
+
const n = f(s), a = p(s), r = o.useMemo(() => n.getById(t.userId), [a, n]);
|
|
11
12
|
return o.useMemo(() => /* @__PURE__ */ i(l, { ...t, children: [
|
|
12
13
|
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ i(m, { align: "center", style: {
|
|
13
14
|
gap: ".5rem"
|
|
14
15
|
}, children: [
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
+
/* @__PURE__ */ e(x, { src: r?.avatarPath ?? "", identifier: r?.username ?? "" }),
|
|
16
17
|
/* @__PURE__ */ i(m, { style: {
|
|
17
18
|
flexDirection: "column"
|
|
18
19
|
}, children: [
|
|
@@ -24,5 +25,5 @@ const z = (t) => {
|
|
|
24
25
|
] }), [r]);
|
|
25
26
|
};
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
C as default
|
|
28
29
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DUserReactiveService as
|
|
2
|
-
import { DUserView as
|
|
1
|
+
import { DUserReactiveService as S } from "./DUser.service.js";
|
|
2
|
+
import { DUserView as c } from "./DUser.view.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../_virtual/compiler-runtime.js";
|
|
@@ -11,14 +11,16 @@ import "js-md5";
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { DUserCard as
|
|
14
|
+
import { DUserCard as v } from "./DUserCard.js";
|
|
15
15
|
import { DUserList as w } from "./DUserList.js";
|
|
16
|
-
import {
|
|
16
|
+
import { DUserInput as I } from "./DUserInput.js";
|
|
17
|
+
import { setUserSession as R, useUserSession as V } from "./DUser.session.hook.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
v as DUserCard,
|
|
20
|
+
I as DUserInput,
|
|
19
21
|
w as DUserList,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
S as DUserReactiveService,
|
|
23
|
+
c as DUserView,
|
|
24
|
+
R as setUserSession,
|
|
25
|
+
V as useUserSession
|
|
24
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Code0Component, Code0ComponentProps } from '../../utils
|
|
1
|
+
import { Code0Component, Code0ComponentProps } from '../../utils';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
4
|
export type DialogProps = Code0ComponentProps & React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
@@ -12,6 +12,7 @@ export type DialogHeaderProps = Code0ComponentProps & React.ComponentProps<"div"
|
|
|
12
12
|
export type DialogFooterProps = Code0ComponentProps & React.ComponentProps<"div">;
|
|
13
13
|
export type DialogContentProps = Code0ComponentProps & React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
14
14
|
showCloseButton?: boolean;
|
|
15
|
+
title?: string;
|
|
15
16
|
};
|
|
16
17
|
export type DialogStickyContentProps = Code0Component<HTMLDivElement> & {
|
|
17
18
|
children: React.ReactNode | React.ReactNode[];
|
|
@@ -1,99 +1,107 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import * as s from "@radix-ui/react-dialog";
|
|
4
|
+
import "../../utils/contextStore.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeCode0Props as r } from "../../utils/utils.js";
|
|
7
|
+
import { IconX as m } from "@tabler/icons-react";
|
|
6
8
|
import '../../assets/components/dialog/Dialog.style.css';/* empty css */
|
|
7
|
-
|
|
9
|
+
import { Button as d } from "../button/Button.js";
|
|
10
|
+
import { Flex as _ } from "../flex/Flex.js";
|
|
11
|
+
import { Text as h } from "../text/Text.js";
|
|
12
|
+
const b = (l) => {
|
|
8
13
|
const t = c.c(4);
|
|
9
14
|
let e;
|
|
10
|
-
t[0] !==
|
|
15
|
+
t[0] !== l ? (e = r("dialog", l), t[0] = l, t[1] = e) : e = t[1];
|
|
11
16
|
const o = e;
|
|
12
|
-
let
|
|
13
|
-
return t[2] !== o ? (
|
|
14
|
-
},
|
|
17
|
+
let i;
|
|
18
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Root, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
19
|
+
}, z = (l) => {
|
|
15
20
|
const t = c.c(4);
|
|
16
21
|
let e;
|
|
17
|
-
t[0] !==
|
|
22
|
+
t[0] !== l ? (e = r("dialog__trigger", l), t[0] = l, t[1] = e) : e = t[1];
|
|
18
23
|
const o = e;
|
|
19
|
-
let
|
|
20
|
-
return t[2] !== o ? (
|
|
21
|
-
},
|
|
24
|
+
let i;
|
|
25
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Trigger, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
26
|
+
}, F = (l) => {
|
|
22
27
|
const t = c.c(4);
|
|
23
28
|
let e;
|
|
24
|
-
t[0] !==
|
|
29
|
+
t[0] !== l ? (e = r("dialog__portal", l), t[0] = l, t[1] = e) : e = t[1];
|
|
25
30
|
const o = e;
|
|
26
|
-
let
|
|
27
|
-
return t[2] !== o ? (
|
|
28
|
-
},
|
|
31
|
+
let i;
|
|
32
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Portal, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
33
|
+
}, u = (l) => {
|
|
29
34
|
const t = c.c(4);
|
|
30
35
|
let e;
|
|
31
|
-
t[0] !==
|
|
36
|
+
t[0] !== l ? (e = r("dialog__close", l), t[0] = l, t[1] = e) : e = t[1];
|
|
32
37
|
const o = e;
|
|
33
|
-
let
|
|
34
|
-
return t[2] !== o ? (
|
|
35
|
-
},
|
|
38
|
+
let i;
|
|
39
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Close, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
40
|
+
}, D = (l) => {
|
|
36
41
|
const t = c.c(4);
|
|
37
42
|
let e;
|
|
38
|
-
t[0] !==
|
|
43
|
+
t[0] !== l ? (e = r("dialog__overlay", l), t[0] = l, t[1] = e) : e = t[1];
|
|
39
44
|
const o = e;
|
|
40
|
-
let
|
|
41
|
-
return t[2] !== o ? (
|
|
42
|
-
},
|
|
43
|
-
const t = c.c(
|
|
45
|
+
let i;
|
|
46
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Overlay, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
47
|
+
}, O = (l) => {
|
|
48
|
+
const t = c.c(10);
|
|
44
49
|
let e;
|
|
45
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n(
|
|
50
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n(D, {}), t[0] = e) : e = t[0];
|
|
46
51
|
let o;
|
|
47
|
-
t[1] !==
|
|
48
|
-
const
|
|
52
|
+
t[1] !== l ? (o = r("dialog__content", l), t[1] = l, t[2] = o) : o = t[2];
|
|
53
|
+
const i = o;
|
|
49
54
|
let a;
|
|
50
|
-
t[3] !==
|
|
55
|
+
t[3] !== l.showCloseButton || t[4] !== l.title ? (a = l.showCloseButton && /* @__PURE__ */ g(_, { align: "center", justify: "space-between", children: [
|
|
56
|
+
/* @__PURE__ */ n(h, { hierarchy: "primary", size: "xl", children: l.title }),
|
|
57
|
+
/* @__PURE__ */ n(u, { asChild: !0, children: /* @__PURE__ */ n(d, { children: /* @__PURE__ */ n(m, { size: 16 }) }) })
|
|
58
|
+
] }), t[3] = l.showCloseButton, t[4] = l.title, t[5] = a) : a = t[5];
|
|
51
59
|
let f;
|
|
52
|
-
return t[
|
|
60
|
+
return t[6] !== l.children || t[7] !== i || t[8] !== a ? (f = /* @__PURE__ */ g(s.Portal, { children: [
|
|
53
61
|
e,
|
|
54
|
-
/* @__PURE__ */ g(
|
|
62
|
+
/* @__PURE__ */ g(s.Content, { ...i, children: [
|
|
55
63
|
a,
|
|
56
|
-
|
|
64
|
+
l.children
|
|
57
65
|
] })
|
|
58
|
-
] }), t[
|
|
59
|
-
},
|
|
66
|
+
] }), t[6] = l.children, t[7] = i, t[8] = a, t[9] = f) : f = t[9], f;
|
|
67
|
+
}, R = (l) => {
|
|
60
68
|
const t = c.c(4);
|
|
61
69
|
let e;
|
|
62
|
-
t[0] !==
|
|
70
|
+
t[0] !== l ? (e = r("dialog__title", l), t[0] = l, t[1] = e) : e = t[1];
|
|
63
71
|
const o = e;
|
|
64
|
-
let
|
|
65
|
-
return t[2] !== o ? (
|
|
66
|
-
},
|
|
72
|
+
let i;
|
|
73
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Title, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
74
|
+
}, E = (l) => {
|
|
67
75
|
const t = c.c(4);
|
|
68
76
|
let e;
|
|
69
|
-
t[0] !==
|
|
77
|
+
t[0] !== l ? (e = r("dialog__description", l), t[0] = l, t[1] = e) : e = t[1];
|
|
70
78
|
const o = e;
|
|
71
|
-
let
|
|
72
|
-
return t[2] !== o ? (
|
|
73
|
-
},
|
|
79
|
+
let i;
|
|
80
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n(s.Description, { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
81
|
+
}, H = (l) => {
|
|
74
82
|
const t = c.c(4);
|
|
75
83
|
let e;
|
|
76
|
-
t[0] !==
|
|
84
|
+
t[0] !== l ? (e = r("dialog__header", l), t[0] = l, t[1] = e) : e = t[1];
|
|
77
85
|
const o = e;
|
|
78
|
-
let
|
|
79
|
-
return t[2] !== o ? (
|
|
80
|
-
},
|
|
86
|
+
let i;
|
|
87
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
88
|
+
}, I = (l) => {
|
|
81
89
|
const t = c.c(4);
|
|
82
90
|
let e;
|
|
83
|
-
t[0] !==
|
|
91
|
+
t[0] !== l ? (e = r("dialog__footer", l), t[0] = l, t[1] = e) : e = t[1];
|
|
84
92
|
const o = e;
|
|
85
|
-
let
|
|
86
|
-
return t[2] !== o ? (
|
|
93
|
+
let i;
|
|
94
|
+
return t[2] !== o ? (i = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = i) : i = t[3], i;
|
|
87
95
|
};
|
|
88
96
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
b as Dialog,
|
|
98
|
+
u as DialogClose,
|
|
99
|
+
O as DialogContent,
|
|
100
|
+
E as DialogDescription,
|
|
101
|
+
I as DialogFooter,
|
|
102
|
+
H as DialogHeader,
|
|
103
|
+
D as DialogOverlay,
|
|
104
|
+
F as DialogPortal,
|
|
105
|
+
R as DialogTitle,
|
|
106
|
+
z as DialogTrigger
|
|
99
107
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Input as
|
|
4
|
-
import { IconX as
|
|
5
|
-
import { Button as
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { Input as m } from "./Input.js";
|
|
4
|
+
import { IconX as l } from "@tabler/icons-react";
|
|
5
|
+
import { Button as s } from "../button/Button.js";
|
|
6
|
+
import { setElementKey as f } from "./Input.utils.js";
|
|
7
|
+
const p = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/, g = (t) => p.test(t), I = a.forwardRef((t, x) => {
|
|
8
|
+
x = x || a.useRef(null);
|
|
8
9
|
const {
|
|
9
10
|
clearable: r = !1,
|
|
10
11
|
right: n,
|
|
11
12
|
...c
|
|
12
13
|
} = t, i = () => {
|
|
13
|
-
x.current &&
|
|
14
|
-
},
|
|
15
|
-
return r &&
|
|
14
|
+
x.current && f(x.current, "value", "", "change");
|
|
15
|
+
}, o = [n];
|
|
16
|
+
return r && o.push(/* @__PURE__ */ e(s, { onClick: i, children: /* @__PURE__ */ e(l, { size: 13 }) })), /* @__PURE__ */ e(m, { right: o, type: "email", ref: x, ...c });
|
|
16
17
|
});
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
I as EmailInput,
|
|
20
|
+
g as emailValidation
|
|
20
21
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { default as React
|
|
2
|
-
import { Code0Component } from '../../utils
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../utils';
|
|
3
3
|
import { ValidationProps } from './useForm';
|
|
4
4
|
import { InputSuggestion } from './InputSuggestion';
|
|
5
|
-
|
|
5
|
+
import { InputSyntaxSegment } from './Input.syntax.hook';
|
|
6
6
|
export type Code0Input = Omit<Omit<Omit<Code0Component<HTMLInputElement>, "left">, "right">, "title">;
|
|
7
7
|
export interface InputProps<T> extends Code0Input, ValidationProps<T> {
|
|
8
8
|
suggestions?: InputSuggestion[];
|
|
9
9
|
suggestionsHeader?: React.ReactNode;
|
|
10
10
|
suggestionsFooter?: React.ReactNode;
|
|
11
11
|
onSuggestionSelect?: (suggestion: InputSuggestion) => void;
|
|
12
|
-
|
|
12
|
+
transformSyntax?: (value: T, appliedSyntaxParts?: (InputSuggestion | any)[]) => InputSyntaxSegment[];
|
|
13
|
+
validationUsesSuggestions?: boolean;
|
|
13
14
|
disableOnValue?: (value: T) => boolean;
|
|
15
|
+
filterSuggestionsByLastToken?: boolean;
|
|
16
|
+
onLastTokenChange?: (token: string | null) => void;
|
|
17
|
+
enforceUniqueSuggestions?: boolean;
|
|
18
|
+
suggestionsEmptyState?: React.ReactNode;
|
|
14
19
|
wrapperComponent?: Code0Component<HTMLDivElement>;
|
|
15
20
|
right?: React.ReactNode;
|
|
16
21
|
left?: React.ReactNode;
|
|
@@ -19,4 +24,11 @@ export interface InputProps<T> extends Code0Input, ValidationProps<T> {
|
|
|
19
24
|
title?: React.ReactNode;
|
|
20
25
|
description?: React.ReactNode;
|
|
21
26
|
}
|
|
22
|
-
export
|
|
27
|
+
export type InputActiveSuggestionSpan = {
|
|
28
|
+
id: number;
|
|
29
|
+
suggestion: InputSuggestion;
|
|
30
|
+
text: string;
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
33
|
+
};
|
|
34
|
+
export declare const Input: React.FC<InputProps<any>>;
|