@code0-tech/pictor 0.0.0-mvp.21 → 0.0.0-mvp.23

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.
Files changed (107) hide show
  1. package/dist/assets/components/alert/Alert.style.css +1 -1
  2. package/dist/assets/components/badge/Badge.style.css +1 -1
  3. package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -1
  4. package/dist/assets/components/button/Button.style.css +1 -1
  5. package/dist/assets/components/button-group/ButtonGroup.style.css +1 -1
  6. package/dist/assets/components/card/Card.style.css +1 -1
  7. package/dist/assets/components/command/Command.style.css +1 -1
  8. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -1
  9. package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -1
  10. package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -1
  11. package/dist/assets/components/d-layout/DLayout.style.css +1 -1
  12. package/dist/assets/components/dialog/Dialog.style.css +1 -1
  13. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
  14. package/dist/assets/components/form/Input.style.css +1 -1
  15. package/dist/assets/components/menu/Menu.style.css +1 -1
  16. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
  17. package/dist/assets/components/tab/Tab.style.css +1 -1
  18. package/dist/assets/components/text/Text.style.css +1 -1
  19. package/dist/assets/components/toast/Toast.style.css +1 -1
  20. package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
  21. package/dist/components/badge/Badge.d.ts +1 -0
  22. package/dist/components/badge/Badge.js +12 -11
  23. package/dist/components/button/Button.d.ts +1 -1
  24. package/dist/components/d-flow/input/DFlowInputDataType.js +32 -32
  25. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +22 -22
  26. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +11 -11
  27. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +1 -1
  28. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +29 -16
  29. package/dist/components/d-flow/tab/DFlowTabDefault.js +59 -53
  30. package/dist/components/d-member/DNamespaceMember.service.js +6 -4
  31. package/dist/components/d-member/DNamespaceMember.view.js +13 -11
  32. package/dist/components/d-member/DNamespaceMemberCard.d.ts +10 -0
  33. package/dist/components/d-member/DNamespaceMemberCard.js +16 -0
  34. package/dist/components/d-member/DNamespaceMemberContent.d.ts +10 -0
  35. package/dist/components/d-member/DNamespaceMemberContent.js +176 -0
  36. package/dist/components/d-member/DNamespaceMemberList.d.ts +12 -0
  37. package/dist/components/d-member/DNamespaceMemberList.js +23 -0
  38. package/dist/components/d-member/index.d.ts +2 -0
  39. package/dist/components/d-member/index.js +6 -2
  40. package/dist/components/d-organization/DOrganizationCard.d.ts +3 -2
  41. package/dist/components/d-organization/DOrganizationList.d.ts +3 -4
  42. package/dist/components/d-organization/DOrganizationList.js +7 -7
  43. package/dist/components/d-organization/DOrganizatonContent.d.ts +5 -4
  44. package/dist/components/d-organization/DOrganizatonContent.js +40 -25
  45. package/dist/components/d-organization/index.js +22 -7
  46. package/dist/components/d-project/DNamespaceProjectCard.d.ts +5 -5
  47. package/dist/components/d-project/DNamespaceProjectCard.js +13 -11
  48. package/dist/components/d-project/DNamespaceProjectContent.d.ts +2 -1
  49. package/dist/components/d-project/DNamespaceProjectContent.js +36 -42
  50. package/dist/components/d-project/DNamespaceProjectList.d.ts +3 -3
  51. package/dist/components/d-project/DNamespaceProjectList.js +1 -1
  52. package/dist/components/d-project/index.js +11 -17
  53. package/dist/components/d-role/DNamespaceRole.view.d.ts +4 -1
  54. package/dist/components/d-role/DNamespaceRole.view.js +6 -3
  55. package/dist/components/d-role/DNamespaceRoleCard.d.ts +11 -0
  56. package/dist/components/d-role/DNamespaceRoleCard.js +17 -0
  57. package/dist/components/d-role/DNamespaceRoleContent.d.ts +10 -0
  58. package/dist/components/d-role/DNamespaceRoleContent.js +156 -0
  59. package/dist/components/d-role/DNamespaceRoleList.d.ts +12 -0
  60. package/dist/components/d-role/DNamespaceRoleList.js +24 -0
  61. package/dist/components/d-role/DNamespaceRolePermissions.d.ts +5 -0
  62. package/dist/components/d-role/DNamespaceRolePermissions.js +129 -0
  63. package/dist/components/d-role/index.d.ts +2 -0
  64. package/dist/components/d-role/index.js +6 -2
  65. package/dist/components/d-runtime/DRuntimeCard.d.ts +3 -1
  66. package/dist/components/d-runtime/DRuntimeCard.js +13 -12
  67. package/dist/components/d-runtime/DRuntimeContent.d.ts +3 -1
  68. package/dist/components/d-runtime/DRuntimeContent.js +25 -20
  69. package/dist/components/d-runtime/DRuntimeList.d.ts +5 -3
  70. package/dist/components/d-runtime/DRuntimeList.js +21 -15
  71. package/dist/components/d-user/DUser.service.d.ts +1 -0
  72. package/dist/components/d-user/DUser.service.js +5 -2
  73. package/dist/components/d-user/DUserCard.d.ts +2 -1
  74. package/dist/components/d-user/DUserContent.d.ts +2 -1
  75. package/dist/components/d-user/DUserContent.js +45 -45
  76. package/dist/components/d-user/DUserInput.d.ts +5 -0
  77. package/dist/components/d-user/DUserInput.js +97 -0
  78. package/dist/components/d-user/DUserList.d.ts +2 -3
  79. package/dist/components/d-user/DUserList.js +4 -4
  80. package/dist/components/d-user/DUserMenu.js +7 -6
  81. package/dist/components/d-user/index.d.ts +1 -0
  82. package/dist/components/d-user/index.js +11 -9
  83. package/dist/components/dialog/Dialog.d.ts +2 -1
  84. package/dist/components/dialog/Dialog.js +67 -59
  85. package/dist/components/form/EmailInput.js +12 -11
  86. package/dist/components/form/Input.d.ts +17 -5
  87. package/dist/components/form/Input.js +420 -137
  88. package/dist/components/form/Input.selection.hook.d.ts +17 -0
  89. package/dist/components/form/Input.selection.hook.js +78 -0
  90. package/dist/components/form/Input.syntax.hook.d.ts +27 -0
  91. package/dist/components/form/Input.syntax.hook.js +80 -0
  92. package/dist/components/form/Input.utils.d.ts +11 -0
  93. package/dist/components/form/Input.utils.js +33 -0
  94. package/dist/components/form/InputSuggestion.d.ts +14 -6
  95. package/dist/components/form/InputSuggestion.js +126 -72
  96. package/dist/components/form/InputSyntax.d.ts +19 -0
  97. package/dist/components/form/InputSyntax.js +52 -0
  98. package/dist/components/form/PasswordInput.js +11 -10
  99. package/dist/components/form/TextInput.js +11 -10
  100. package/dist/components/form/index.js +26 -27
  101. package/dist/components/form/inputSyntaxMapping.d.ts +3 -0
  102. package/dist/components/form/inputSyntaxMapping.js +42 -0
  103. package/dist/components/menu/Menu.d.ts +7 -3
  104. package/dist/components/menu/Menu.js +22 -22
  105. package/dist/components/tooltip/Tooltip.js +33 -33
  106. package/dist/index.js +200 -189
  107. package/package.json +16 -16
@@ -1,10 +1,10 @@
1
1
  import { jsx as d, jsxs as p } from "react/jsx-runtime";
2
2
  import { c as V } from "../../_virtual/compiler-runtime.js";
3
- import B from "react";
4
- import { Flex as h } from "../flex/Flex.js";
5
- import { Avatar as E } from "../avatar/Avatar.js";
6
- import { useUserSession as k } from "./DUser.session.hook.js";
7
- import { useService as w } from "../../utils/contextStore.js";
3
+ import w from "react";
4
+ import { Flex as u } from "../flex/Flex.js";
5
+ import { Avatar as B } from "../avatar/Avatar.js";
6
+ import { useUserSession as E } from "./DUser.session.hook.js";
7
+ import { useService as k } from "../../utils/contextStore.js";
8
8
  import "merge-props";
9
9
  import { DUserReactiveService as F } from "./DUser.service.js";
10
10
  import { Text as R } from "../text/Text.js";
@@ -13,71 +13,71 @@ import { IconMailCheck as M } from "@tabler/icons-react";
13
13
  import "../button/Button.js";
14
14
  const Z = (D) => {
15
15
  const e = V.c(37), {
16
- userId: u,
17
- onRemove: A
18
- } = D, z = A === void 0 ? T : A, b = w(F), I = k(), [U, $] = B.useState(!1);
16
+ userId: x,
17
+ onRemove: z
18
+ } = D, A = z === void 0 ? O : z, b = k(F), I = E(), [U, T] = w.useState(!1);
19
+ let h;
20
+ e[0] !== x || e[1] !== b ? (h = b.getById(x), e[0] = x, e[1] = b, e[2] = h) : h = e[2];
21
+ const r = h, j = I?.user?.id === r.id;
19
22
  let y;
20
- e[0] !== u || e[1] !== b ? (y = b.getById(u), e[0] = u, e[1] = b, e[2] = y) : y = e[2];
21
- const t = y, j = I?.user?.id === t.id;
22
- let g;
23
- e[3] === Symbol.for("react.memo_cache_sentinel") ? (g = {
23
+ e[3] === Symbol.for("react.memo_cache_sentinel") ? (y = {
24
24
  gap: ".7rem"
25
- }, e[3] = g) : g = e[3];
26
- let r;
27
- e[4] !== t.username ? (r = /* @__PURE__ */ d(E, { identifier: t.username, bg: "transparent" }), e[4] = t.username, e[5] = r) : r = e[5];
28
- let v;
29
- e[6] === Symbol.for("react.memo_cache_sentinel") ? (v = {
25
+ }, e[3] = y) : y = e[3];
26
+ let t;
27
+ e[4] !== r.username ? (t = /* @__PURE__ */ d(B, { identifier: r.username, bg: "transparent" }), e[4] = r.username, e[5] = t) : t = e[5];
28
+ let g;
29
+ e[6] === Symbol.for("react.memo_cache_sentinel") ? (g = {
30
30
  gap: ".35rem",
31
31
  flexDirection: "column"
32
- }, e[6] = v) : v = e[6];
33
- let S;
34
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (S = {
32
+ }, e[6] = g) : g = e[6];
33
+ let v;
34
+ e[7] === Symbol.for("react.memo_cache_sentinel") ? (v = {
35
35
  gap: "0.35rem"
36
- }, e[7] = S) : S = e[7];
36
+ }, e[7] = v) : v = e[7];
37
37
  let i;
38
- e[8] !== t.username ? (i = /* @__PURE__ */ d(R, { size: "md", hierarchy: "primary", children: t.username }), e[8] = t.username, e[9] = i) : i = e[9];
38
+ e[8] !== r.username ? (i = /* @__PURE__ */ d(R, { size: "md", hierarchy: "primary", children: r.username }), e[8] = r.username, e[9] = i) : i = e[9];
39
39
  let l;
40
- e[10] !== t.admin ? (l = t.admin ? /* @__PURE__ */ d(C, { color: "secondary", children: "Admin" }) : null, e[10] = t.admin, e[11] = l) : l = e[11];
40
+ e[10] !== r.admin ? (l = r.admin ? /* @__PURE__ */ d(C, { color: "secondary", children: "Owner" }) : null, e[10] = r.admin, e[11] = l) : l = e[11];
41
41
  let s;
42
- e[12] !== i || e[13] !== l ? (s = /* @__PURE__ */ p(h, { align: "center", style: S, children: [
42
+ e[12] !== i || e[13] !== l ? (s = /* @__PURE__ */ p(u, { align: "center", style: v, children: [
43
43
  i,
44
44
  l
45
45
  ] }), e[12] = i, e[13] = l, e[14] = s) : s = e[14];
46
- let n;
47
- e[15] !== t.email ? (n = /* @__PURE__ */ d(R, { size: "md", hierarchy: "tertiary", children: t.email }), e[15] = t.email, e[16] = n) : n = e[16];
48
46
  let m;
49
- e[17] !== s || e[18] !== n ? (m = /* @__PURE__ */ p(h, { style: v, children: [
47
+ e[15] !== r.email ? (m = /* @__PURE__ */ d(R, { size: "sm", hierarchy: "tertiary", children: r.email }), e[15] = r.email, e[16] = m) : m = e[16];
48
+ let n;
49
+ e[17] !== s || e[18] !== m ? (n = /* @__PURE__ */ p(u, { style: g, children: [
50
50
  s,
51
- n
52
- ] }), e[17] = s, e[18] = n, e[19] = m) : m = e[19];
53
- let o;
54
- e[20] !== m || e[21] !== r ? (o = /* @__PURE__ */ p(h, { style: g, align: "center", children: [
55
- r,
56
51
  m
57
- ] }), e[20] = m, e[21] = r, e[22] = o) : o = e[22];
58
- let _;
59
- e[23] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
52
+ ] }), e[17] = s, e[18] = m, e[19] = n) : n = e[19];
53
+ let o;
54
+ e[20] !== n || e[21] !== t ? (o = /* @__PURE__ */ p(u, { style: y, align: "center", children: [
55
+ t,
56
+ n
57
+ ] }), e[20] = n, e[21] = t, e[22] = o) : o = e[22];
58
+ let S;
59
+ e[23] === Symbol.for("react.memo_cache_sentinel") ? (S = {
60
60
  gap: "1.3rem"
61
- }, e[23] = _) : _ = e[23];
61
+ }, e[23] = S) : S = e[23];
62
62
  let c;
63
- e[24] !== t.emailVerifiedAt ? (c = t.emailVerifiedAt ? /* @__PURE__ */ p(C, { color: "secondary", children: [
63
+ e[24] !== r.emailVerifiedAt ? (c = r?.emailVerifiedAt ? /* @__PURE__ */ p(C, { color: "primary", children: [
64
64
  /* @__PURE__ */ d(M, { size: 16 }),
65
- /* @__PURE__ */ d(R, { size: "xs", children: "Email verified" })
66
- ] }) : null, e[24] = t.emailVerifiedAt, e[25] = c) : c = e[25];
65
+ /* @__PURE__ */ d(R, { size: "xs", hierarchy: "tertiary", children: "Email verified" })
66
+ ] }) : null, e[24] = r.emailVerifiedAt, e[25] = c) : c = e[25];
67
67
  let a;
68
- e[26] !== j || e[27] !== z || e[28] !== U || e[29] !== u ? (a = null, e[26] = j, e[27] = z, e[28] = U, e[29] = u, e[30] = a) : a = e[30];
68
+ e[26] !== j || e[27] !== A || e[28] !== U || e[29] !== r ? (a = null, e[26] = j, e[27] = A, e[28] = U, e[29] = r, e[30] = a) : a = e[30];
69
69
  let f;
70
- e[31] !== c || e[32] !== a ? (f = /* @__PURE__ */ p(h, { style: _, align: "center", children: [
70
+ e[31] !== c || e[32] !== a ? (f = /* @__PURE__ */ p(u, { style: S, align: "center", children: [
71
71
  c,
72
72
  a
73
73
  ] }), e[31] = c, e[32] = a, e[33] = f) : f = e[33];
74
- let x;
75
- return e[34] !== o || e[35] !== f ? (x = /* @__PURE__ */ p(h, { justify: "space-between", align: "center", children: [
74
+ let _;
75
+ return e[34] !== o || e[35] !== f ? (_ = /* @__PURE__ */ p(u, { justify: "space-between", align: "center", children: [
76
76
  o,
77
77
  f
78
- ] }), e[34] = o, e[35] = f, e[36] = x) : x = e[36], x;
78
+ ] }), e[34] = o, e[35] = f, e[36] = _) : _ = e[36], _;
79
79
  };
80
- function T() {
80
+ function O() {
81
81
  }
82
82
  export {
83
83
  Z as DUserContent
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { TextInputProps } from '../form';
3
+ export interface DUserInputProps extends TextInputProps {
4
+ }
5
+ export declare const DUserInput: React.FC<DUserInputProps>;
@@ -0,0 +1,97 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import v from "react";
3
+ import "../../_virtual/compiler-runtime.js";
4
+ import "@radix-ui/react-checkbox";
5
+ import "merge-props";
6
+ import { IconArrowUp as x, IconArrowDown as S, IconCornerDownLeft as b } 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 I } 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 L, useStore as U } from "../../utils/contextStore.js";
20
+ import { DUserReactiveService as g } from "./DUser.service.js";
21
+ import { MenuLabel as D, MenuItem as w } from "../menu/Menu.js";
22
+ import { Flex as s } from "../flex/Flex.js";
23
+ import { Spacing as z } from "../spacing/Spacing.js";
24
+ const $ = (p) => {
25
+ const {
26
+ ...h
27
+ } = p, u = L(g), d = U(g), f = v.useMemo(() => u.values().map((r) => ({
28
+ value: r.username || "",
29
+ children: /* @__PURE__ */ o(s, { align: "end", style: {
30
+ gap: "0.35rem"
31
+ }, children: [
32
+ /* @__PURE__ */ e(l, { children: r.username }),
33
+ /* @__PURE__ */ e(l, { size: "xs", hierarchy: "tertiary", children: r.email })
34
+ ] }),
35
+ insertMode: "insert",
36
+ valueData: r,
37
+ groupBy: "Users"
38
+ })), [d]);
39
+ return /* @__PURE__ */ e(I, { placeholder: "Enter users", suggestionsEmptyState: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(l, { children: "No user found" }) }), onLastTokenChange: (r) => {
40
+ u.getByUsername(r);
41
+ }, suggestionsFooter: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ o(s, { style: {
42
+ gap: ".35rem"
43
+ }, children: [
44
+ /* @__PURE__ */ o(s, { align: "center", style: {
45
+ gap: "0.35rem"
46
+ }, children: [
47
+ /* @__PURE__ */ o(s, { children: [
48
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(x, { size: 12 }) }),
49
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(S, { size: 12 }) })
50
+ ] }),
51
+ "move"
52
+ ] }),
53
+ /* @__PURE__ */ e(z, { spacing: "xxs" }),
54
+ /* @__PURE__ */ o(s, { align: "center", style: {
55
+ gap: ".35rem"
56
+ }, children: [
57
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(b, { size: 12 }) }),
58
+ "insert"
59
+ ] })
60
+ ] }) }), filterSuggestionsByLastToken: !0, enforceUniqueSuggestions: !0, transformSyntax: (r, a = []) => {
61
+ let t = 0;
62
+ return a.map((i, y) => {
63
+ if (typeof i == "object") {
64
+ const c = {
65
+ type: "block",
66
+ start: t,
67
+ end: t + i.value.length,
68
+ visualLength: 1,
69
+ content: /* @__PURE__ */ e(m, { color: "info", border: !0, children: /* @__PURE__ */ o(l, { style: {
70
+ color: "inherit"
71
+ }, children: [
72
+ "@",
73
+ i.value
74
+ ] }) })
75
+ };
76
+ return t += i.value.length, c;
77
+ }
78
+ const n = i ?? "";
79
+ if (n.length) {
80
+ if (y == a.length - 1) {
81
+ const c = {
82
+ type: "text",
83
+ start: t,
84
+ end: t + n.length,
85
+ visualLength: n.length,
86
+ content: n
87
+ };
88
+ return t += n.length, c;
89
+ }
90
+ return t += n.length, {};
91
+ }
92
+ });
93
+ }, ...h, suggestions: f });
94
+ };
95
+ export {
96
+ $ as DUserInput
97
+ };
@@ -1,10 +1,9 @@
1
- import { User } from '@code0-tech/sagittarius-graphql-types';
2
1
  import { DUserView } from './DUser.view';
3
2
  import { default as React } from 'react';
4
3
  import { Card } from '../card/Card';
5
4
  export interface DUserListProps extends Omit<Card, "children" | "onSelect"> {
6
5
  filter?: (user: DUserView, index: number) => boolean;
7
- onSelect?: (userId: User['id']) => void;
8
- onRemove?: (userId: User['id']) => void;
6
+ onSelect?: (user: DUserView) => void;
7
+ onRemove?: (user: DUserView) => void;
9
8
  }
10
9
  export declare const DUserList: React.FC<DUserListProps>;
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import p from "react";
2
+ import d from "react";
3
3
  import { useService as u, useStore as l } from "../../utils/contextStore.js";
4
4
  import "merge-props";
5
5
  import { DUserReactiveService as t } from "./DUser.service.js";
@@ -12,9 +12,9 @@ const k = (i) => {
12
12
  onRemove: s,
13
13
  onSelect: o,
14
14
  ...c
15
- } = i, n = u(t), d = l(t), f = p.useMemo(() => n.values(), [d]);
16
- return /* @__PURE__ */ e(v, { ...c, children: f.filter(m).map((r) => r && r.id && /* @__PURE__ */ e(S, { border: !0, hover: !0, onClick: () => {
17
- o && o(r.id);
15
+ } = i, n = u(t), f = l(t), p = d.useMemo(() => n.values(), [f]);
16
+ return /* @__PURE__ */ e(v, { ...c, children: p.filter(m).map((r) => r && r.id && /* @__PURE__ */ e(S, { border: !0, hover: !0, onClick: () => {
17
+ o && o(r);
18
18
  }, children: /* @__PURE__ */ e(a, { onRemove: s, userId: r?.id }) }, r.id)) });
19
19
  };
20
20
  export {
@@ -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 x } from "../../utils/contextStore.js";
6
- import { Avatar as y } from "../avatar/Avatar.js";
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 z = (t) => {
10
- const n = f(s), a = x(s), r = o.useMemo(() => n.getById(t.userId), [a, n]);
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(y, { src: r?.avatarPath ?? "", identifier: r?.username ?? "" }),
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
- z as default
28
+ C as default
28
29
  };
@@ -3,4 +3,5 @@ export * from './DUser.view';
3
3
  export * from './DUserMenu';
4
4
  export * from './DUserCard';
5
5
  export * from './DUserList';
6
+ export * from './DUserInput';
6
7
  export * from './DUser.session.hook';
@@ -1,5 +1,5 @@
1
- import { DUserReactiveService as a } from "./DUser.service.js";
2
- import { DUserView as n } from "./DUser.view.js";
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 d } from "./DUserCard.js";
14
+ import { DUserCard as v } from "./DUserCard.js";
15
15
  import { DUserList as w } from "./DUserList.js";
16
- import { setUserSession as L, useUserSession as R } from "./DUser.session.hook.js";
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
- d as DUserCard,
19
+ v as DUserCard,
20
+ I as DUserInput,
19
21
  w as DUserList,
20
- a as DUserReactiveService,
21
- n as DUserView,
22
- L as setUserSession,
23
- R as useUserSession
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/types';
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 r from "@radix-ui/react-dialog";
4
- import { mergeCode0Props as s } from "../../utils/utils.js";
5
- import { IconX as d } from "@tabler/icons-react";
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
- const v = (i) => {
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] !== i ? (e = s("dialog", i), t[0] = i, t[1] = e) : e = t[1];
15
+ t[0] !== l ? (e = r("dialog", l), t[0] = l, t[1] = e) : e = t[1];
11
16
  const o = e;
12
- let l;
13
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Root, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
14
- }, P = (i) => {
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] !== i ? (e = s("dialog__trigger", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
20
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Trigger, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
21
- }, x = (i) => {
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] !== i ? (e = s("dialog__portal", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
27
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Portal, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
28
- }, _ = (i) => {
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] !== i ? (e = s("dialog__close", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
34
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Close, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
35
- }, m = (i) => {
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] !== i ? (e = s("dialog__overlay", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
41
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Overlay, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
42
- }, y = (i) => {
43
- const t = c.c(9);
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(m, {}), t[0] = e) : e = t[0];
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] !== i ? (o = s("dialog__content", i), t[1] = i, t[2] = o) : o = t[2];
48
- const l = o;
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] !== i.showCloseButton ? (a = i.showCloseButton && /* @__PURE__ */ n(_, { children: /* @__PURE__ */ n(d, { size: 16 }) }), t[3] = i.showCloseButton, t[4] = a) : a = t[4];
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[5] !== i.children || t[6] !== l || t[7] !== a ? (f = /* @__PURE__ */ g(r.Portal, { children: [
60
+ return t[6] !== l.children || t[7] !== i || t[8] !== a ? (f = /* @__PURE__ */ g(s.Portal, { children: [
53
61
  e,
54
- /* @__PURE__ */ g(r.Content, { ...l, children: [
62
+ /* @__PURE__ */ g(s.Content, { ...i, children: [
55
63
  a,
56
- i.children
64
+ l.children
57
65
  ] })
58
- ] }), t[5] = i.children, t[6] = l, t[7] = a, t[8] = f) : f = t[8], f;
59
- }, T = (i) => {
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] !== i ? (e = s("dialog__title", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
65
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Title, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
66
- }, w = (i) => {
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] !== i ? (e = s("dialog__description", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
72
- return t[2] !== o ? (l = /* @__PURE__ */ n(r.Description, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
73
- }, B = (i) => {
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] !== i ? (e = s("dialog__header", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
79
- return t[2] !== o ? (l = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
80
- }, j = (i) => {
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] !== i ? (e = s("dialog__footer", i), t[0] = i, t[1] = e) : e = t[1];
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 l;
86
- return t[2] !== o ? (l = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
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
- v as Dialog,
90
- _ as DialogClose,
91
- y as DialogContent,
92
- w as DialogDescription,
93
- j as DialogFooter,
94
- B as DialogHeader,
95
- m as DialogOverlay,
96
- x as DialogPortal,
97
- T as DialogTitle,
98
- P as DialogTrigger
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 o from "react";
3
- import { Input as l, setElementKey as m } from "./Input.js";
4
- import { IconX as s } from "@tabler/icons-react";
5
- import { Button as f } from "../button/Button.js";
6
- const z = /(?:[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])+)\])/, d = (t) => z.test(t), g = o.forwardRef((t, x) => {
7
- x = x || o.useRef(null);
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 && m(x.current, "value", "", "change");
14
- }, a = [n];
15
- return r && a.push(/* @__PURE__ */ e(f, { onClick: i, children: /* @__PURE__ */ e(s, { size: 13 }) })), /* @__PURE__ */ e(l, { right: a, type: "email", ref: x, ...c });
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
- g as EmailInput,
19
- d as emailValidation
19
+ I as EmailInput,
20
+ g as emailValidation
20
21
  };
@@ -1,16 +1,21 @@
1
- import { default as React, ForwardRefExoticComponent } from 'react';
2
- import { Code0Component } from '../../utils/types';
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
- export declare const setElementKey: (element: HTMLElement, key: string, value: any, event: string) => void;
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
- transformValue?: (value: T) => React.ReactNode | T;
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 declare const Input: ForwardRefExoticComponent<InputProps<any>>;
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>>;