@yimingliao/cms 0.0.129 → 0.0.131

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 (84) hide show
  1. package/dist/export/client/index.js +2 -1
  2. package/dist/export/server/index.js +0 -6
  3. package/dist/export/server/r2/index.js +0 -19
  4. package/dist/export/server/sftp/index.js +0 -18
  5. package/dist/src/client/infrastructure/contexts/admin.js +5 -4
  6. package/dist/src/client/infrastructure/contexts/theme.js +5 -5
  7. package/dist/src/client/infrastructure/toast/error-display.js +15 -3
  8. package/dist/src/client/interfaces/components/shadcn/avatar.js +5 -4
  9. package/dist/src/client/interfaces/components/shadcn/button.js +3 -2
  10. package/dist/src/client/interfaces/components/shadcn/card.js +9 -8
  11. package/dist/src/client/interfaces/components/shadcn/collapsible.js +4 -3
  12. package/dist/src/client/interfaces/components/shadcn/dropdown-menu.js +36 -29
  13. package/dist/src/client/interfaces/components/shadcn/input-group.js +8 -7
  14. package/dist/src/client/interfaces/components/shadcn/input.js +3 -2
  15. package/dist/src/client/interfaces/components/shadcn/label.js +3 -2
  16. package/dist/src/client/interfaces/components/shadcn/pagination.js +21 -18
  17. package/dist/src/client/interfaces/components/shadcn/select.js +47 -40
  18. package/dist/src/client/interfaces/components/shadcn/separator.js +3 -2
  19. package/dist/src/client/interfaces/components/shadcn/sheet.js +36 -27
  20. package/dist/src/client/interfaces/components/shadcn/sidebar.js +120 -105
  21. package/dist/src/client/interfaces/components/shadcn/skeleton.js +2 -1
  22. package/dist/src/client/interfaces/components/shadcn/spinner.js +2 -1
  23. package/dist/src/client/interfaces/components/shadcn/textarea.js +3 -2
  24. package/dist/src/client/interfaces/components/shadcn/tooltip.js +13 -10
  25. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js +35 -23
  26. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js +20 -14
  27. package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/pagination.js +35 -26
  28. package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header-title.js +10 -1
  29. package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header.js +21 -15
  30. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch-create.js +2 -1
  31. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch.js +19 -14
  32. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/create.js +2 -1
  33. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/edit.js +2 -1
  34. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/index.js +34 -29
  35. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/show.js +43 -37
  36. package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/trash.js +24 -18
  37. package/dist/src/client/interfaces/components/ui/buttons/button.js +8 -4
  38. package/dist/src/client/interfaces/components/ui/buttons/return-button.js +5 -4
  39. package/dist/src/client/interfaces/components/ui/features/expandable-list/expand-bar.js +9 -6
  40. package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list-content.js +14 -8
  41. package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list.js +22 -17
  42. package/dist/src/client/interfaces/components/ui/form/containers/fields-container.js +5 -4
  43. package/dist/src/client/interfaces/components/ui/form/containers/main-fields.js +5 -4
  44. package/dist/src/client/interfaces/components/ui/form/containers/side-fields.js +5 -4
  45. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-display.js +80 -57
  46. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-input.js +114 -91
  47. package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields.js +4 -3
  48. package/dist/src/client/interfaces/components/ui/form/field-body.js +31 -28
  49. package/dist/src/client/interfaces/components/ui/form/field.js +12 -1
  50. package/dist/src/client/interfaces/components/ui/form/form.js +2 -1
  51. package/dist/src/client/interfaces/components/ui/form/index-field.js +49 -42
  52. package/dist/src/client/interfaces/components/ui/form/slug-field.js +45 -38
  53. package/dist/src/client/interfaces/components/ui/inputs/array-input.js +63 -52
  54. package/dist/src/client/interfaces/components/ui/inputs/checkbox.js +41 -38
  55. package/dist/src/client/interfaces/components/ui/inputs/input.js +20 -17
  56. package/dist/src/client/interfaces/components/ui/inputs/password-input.js +6 -5
  57. package/dist/src/client/interfaces/components/ui/inputs/search-input.js +6 -5
  58. package/dist/src/client/interfaces/components/ui/inputs/select.js +19 -13
  59. package/dist/src/client/interfaces/components/ui/inputs/textarea.js +3 -2
  60. package/dist/src/client/interfaces/components/ui/layouts/content-container.js +5 -4
  61. package/dist/src/client/interfaces/components/ui/layouts/layout-skeleton.js +20 -7
  62. package/dist/src/client/interfaces/components/ui/layouts/navbar/i18n-selector.js +8 -1
  63. package/dist/src/client/interfaces/components/ui/layouts/navbar/nav-user.js +60 -34
  64. package/dist/src/client/interfaces/components/ui/layouts/navbar/navbar.js +39 -26
  65. package/dist/src/client/interfaces/components/ui/layouts/navbar/sign-out-button.js +6 -2
  66. package/dist/src/client/interfaces/components/ui/layouts/navbar/theme-selector.js +22 -1
  67. package/dist/src/client/interfaces/components/ui/layouts/sidebar/nav-main.js +43 -27
  68. package/dist/src/client/interfaces/pages/auth/change-password.js +81 -70
  69. package/dist/src/client/interfaces/pages/auth/email-unverified.js +39 -21
  70. package/dist/src/client/interfaces/pages/auth/forgot-password.js +41 -26
  71. package/dist/src/client/interfaces/pages/auth/reset-password.js +60 -51
  72. package/dist/src/client/interfaces/pages/auth/sign-in.js +46 -37
  73. package/dist/src/client/interfaces/pages/auth/verify-email.js +2 -1
  74. package/dist/types/export/server/r2/index.d.ts +1 -1
  75. package/dist/types/export/server/r2/index.d.ts.map +1 -1
  76. package/dist/types/export/server/sftp/index.d.ts +1 -1
  77. package/dist/types/export/server/sftp/index.d.ts.map +1 -1
  78. package/dist/types/src/server/index.d.ts +1 -1
  79. package/dist/types/src/server/index.d.ts.map +1 -1
  80. package/dist/types/src/server/infrastructure/index.d.ts +1 -1
  81. package/dist/types/src/server/infrastructure/index.d.ts.map +1 -1
  82. package/dist/types/src/server/infrastructure/storage/index.d.ts +0 -2
  83. package/dist/types/src/server/infrastructure/storage/index.d.ts.map +1 -1
  84. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import 'mime-types';
2
3
  import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
3
4
  import 'react';
@@ -44,49 +45,55 @@ function IndexField({
44
45
  if (!setFormData) return;
45
46
  setFormData((p) => ({ ...p, index: availableIndex }));
46
47
  };
47
- return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React.createElement(
48
- Checkbox,
49
- {
50
- id: isIndexActive ? void 0 : id,
51
- fieldName: "isIndexActive",
52
- formData,
53
- setFormData,
54
- isLoading,
55
- isDisabled,
56
- onClick: toggleCheckbox
57
- }
58
- ), !isDisplay ? /* @__PURE__ */ React.createElement(
59
- Input,
60
- {
61
- id: isIndexActive ? id : void 0,
62
- fieldName: "index",
63
- value: index || 1,
64
- setFormData,
65
- type: "number",
66
- min: 1,
67
- required: isIndexActive,
68
- isDisabled: !isIndexActive || isDisabled,
69
- className: cn(!isIndexActive && "text-transparent"),
70
- inputGroupClassName: cn(
71
- isIndexActive ? "opacity-100" : "opacity-50 cursor-not-allowed"
48
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
49
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
50
+ /* @__PURE__ */ jsx(
51
+ Checkbox,
52
+ {
53
+ id: isIndexActive ? void 0 : id,
54
+ fieldName: "isIndexActive",
55
+ formData,
56
+ setFormData,
57
+ isLoading,
58
+ isDisabled,
59
+ onClick: toggleCheckbox
60
+ }
72
61
  ),
73
- isError
74
- }
75
- ) : /* @__PURE__ */ React.createElement(
76
- FieldBody,
77
- {
78
- isEmpty: !isIndexActive,
79
- backgroundClassName: "!bg-base-200"
80
- },
81
- index
82
- )), !isDisplay && /* @__PURE__ */ React.createElement("div", { className: "mx-2" }, /* @__PURE__ */ React.createElement(
83
- ExpandableList,
84
- {
85
- isDisabled: !isIndexActive,
86
- item: index,
87
- items: ensureArray(existingIndexes)
88
- }
89
- )));
62
+ !isDisplay ? /* @__PURE__ */ jsx(
63
+ Input,
64
+ {
65
+ id: isIndexActive ? id : void 0,
66
+ fieldName: "index",
67
+ value: index || 1,
68
+ setFormData,
69
+ type: "number",
70
+ min: 1,
71
+ required: isIndexActive,
72
+ isDisabled: !isIndexActive || isDisabled,
73
+ className: cn(!isIndexActive && "text-transparent"),
74
+ inputGroupClassName: cn(
75
+ isIndexActive ? "opacity-100" : "opacity-50 cursor-not-allowed"
76
+ ),
77
+ isError
78
+ }
79
+ ) : /* @__PURE__ */ jsx(
80
+ FieldBody,
81
+ {
82
+ isEmpty: !isIndexActive,
83
+ backgroundClassName: "!bg-base-200",
84
+ children: index
85
+ }
86
+ )
87
+ ] }),
88
+ !isDisplay && /* @__PURE__ */ jsx("div", { className: "mx-2", children: /* @__PURE__ */ jsx(
89
+ ExpandableList,
90
+ {
91
+ isDisabled: !isIndexActive,
92
+ item: index,
93
+ items: ensureArray(existingIndexes)
94
+ }
95
+ ) })
96
+ ] });
90
97
  }
91
98
 
92
99
  export { IndexField };
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import 'mime-types';
2
3
  import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
3
4
  import 'react';
@@ -43,45 +44,51 @@ function SlugField({
43
44
  if (!setFormData) return;
44
45
  setFormData((p) => ({ ...p, slug: null }));
45
46
  };
46
- return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React.createElement(
47
- Checkbox,
48
- {
49
- id: isSlugActive ? void 0 : id,
50
- fieldName: "isSlugActive",
51
- formData,
52
- setFormData,
53
- isLoading,
54
- isDisabled,
55
- onClick: toggleCheckbox,
56
- className: "mt-2"
57
- }
58
- ), !isDisplay ? /* @__PURE__ */ React.createElement(
59
- Textarea,
60
- {
61
- id: isSlugActive ? id : void 0,
62
- fieldName: "slug",
63
- value: slug,
64
- setFormData,
65
- required: isSlugActive,
66
- isDisabled: !isSlugActive || isDisabled,
67
- onKeyDown: (e) => {
68
- if (e.key === "Enter") return e.preventDefault();
69
- },
70
- className: cn(
71
- "resize-none break-all",
72
- !isSlugActive && "text-transparent"
47
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
48
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
49
+ /* @__PURE__ */ jsx(
50
+ Checkbox,
51
+ {
52
+ id: isSlugActive ? void 0 : id,
53
+ fieldName: "isSlugActive",
54
+ formData,
55
+ setFormData,
56
+ isLoading,
57
+ isDisabled,
58
+ onClick: toggleCheckbox,
59
+ className: "mt-2"
60
+ }
73
61
  ),
74
- isError: isUnavailable || isError
75
- }
76
- ) : /* @__PURE__ */ React.createElement(FieldBody, { isEmpty: !isSlugActive, backgroundClassName: "!bg-base-200" }, slug)), !isDisplay && /* @__PURE__ */ React.createElement("div", { className: "mx-2" }, /* @__PURE__ */ React.createElement(
77
- ExpandableList,
78
- {
79
- isDisabled: !isSlugActive,
80
- isUnique: true,
81
- item: slug,
82
- items: ensureArray(existingSlugs)
83
- }
84
- )));
62
+ !isDisplay ? /* @__PURE__ */ jsx(
63
+ Textarea,
64
+ {
65
+ id: isSlugActive ? id : void 0,
66
+ fieldName: "slug",
67
+ value: slug,
68
+ setFormData,
69
+ required: isSlugActive,
70
+ isDisabled: !isSlugActive || isDisabled,
71
+ onKeyDown: (e) => {
72
+ if (e.key === "Enter") return e.preventDefault();
73
+ },
74
+ className: cn(
75
+ "resize-none break-all",
76
+ !isSlugActive && "text-transparent"
77
+ ),
78
+ isError: isUnavailable || isError
79
+ }
80
+ ) : /* @__PURE__ */ jsx(FieldBody, { isEmpty: !isSlugActive, backgroundClassName: "!bg-base-200", children: slug })
81
+ ] }),
82
+ !isDisplay && /* @__PURE__ */ jsx("div", { className: "mx-2", children: /* @__PURE__ */ jsx(
83
+ ExpandableList,
84
+ {
85
+ isDisabled: !isSlugActive,
86
+ isUnique: true,
87
+ item: slug,
88
+ items: ensureArray(existingSlugs)
89
+ }
90
+ ) })
91
+ ] });
85
92
  }
86
93
 
87
94
  export { SlugField };
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { CircleX, CirclePlus } from 'lucide-react';
2
3
  import 'react';
3
4
  import 'ua-parser-js';
@@ -38,60 +39,70 @@ function ArrayInput({
38
39
  const errorIndexes = new Set(
39
40
  errors.filter((e) => e.startsWith(fieldName ?? "")).map((e) => e.split(".").pop()).map(Number)
40
41
  );
41
- return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1" }, values.map((value, index) => {
42
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: values.map((value, index) => {
42
43
  const isError = errorIndexes.has(index);
43
- return /* @__PURE__ */ React.createElement("div", { key: index, className: "relative" }, /* @__PURE__ */ React.createElement("div", { className: "flex-center absolute top-0 left-0 z-10 h-full" }, /* @__PURE__ */ React.createElement("span", { className: "min-w-10 pl-0.5 text-center text-sm opacity-50" }, Array.isArray(rawValue) && rawValue.length === 0 ? "0" : index + 1), /* @__PURE__ */ React.createElement(Separator, { orientation: "vertical" })), /* @__PURE__ */ React.createElement(
44
- Textarea,
45
- {
46
- disabled: isDisabled,
47
- placeholder: isLoading ? "" : placeholder,
48
- value,
49
- onChange: (e) => {
50
- if (!setFormData || !fieldName) return;
51
- const copy = [...values];
52
- copy[index] = e.target.value;
53
- setFormData((p) => ({ ...p, [fieldName]: copy }));
54
- },
55
- onKeyDown: (e) => {
56
- if (e.key === "Enter" && !isResizable) {
57
- e.preventDefault();
58
- }
59
- },
60
- isError,
61
- className: cn("pr-20 pl-13", !isResizable && "resize-none"),
62
- ...props
63
- }
64
- ), /* @__PURE__ */ React.createElement("div", { className: "flex-center absolute top-1 right-1 gap-1" }, /* @__PURE__ */ React.createElement(
65
- Button,
66
- {
67
- variant: "outline",
68
- type: "button",
69
- size: "icon-sm",
70
- className: "rounded-sm",
71
- onClick: () => {
72
- if (!setFormData || !fieldName) return;
73
- const copy = values.filter((_, i) => i !== index);
74
- setFormData((p) => ({ ...p, [fieldName]: copy }));
75
- }
76
- },
77
- /* @__PURE__ */ React.createElement(CircleX, { className: "text-destructive" })
78
- ), /* @__PURE__ */ React.createElement(
79
- Button,
80
- {
81
- variant: "outline",
82
- type: "button",
83
- size: "icon-sm",
84
- className: "rounded-sm",
85
- onClick: () => {
86
- if (!setFormData || !fieldName) return;
87
- const copy = [...values];
88
- copy.splice(index + 1, 0, "");
89
- setFormData((p) => ({ ...p, [fieldName]: copy }));
44
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
45
+ /* @__PURE__ */ jsxs("div", { className: "flex-center absolute top-0 left-0 z-10 h-full", children: [
46
+ /* @__PURE__ */ jsx("span", { className: "min-w-10 pl-0.5 text-center text-sm opacity-50", children: Array.isArray(rawValue) && rawValue.length === 0 ? "0" : index + 1 }),
47
+ /* @__PURE__ */ jsx(Separator, { orientation: "vertical" })
48
+ ] }),
49
+ /* @__PURE__ */ jsx(
50
+ Textarea,
51
+ {
52
+ disabled: isDisabled,
53
+ placeholder: isLoading ? "" : placeholder,
54
+ value,
55
+ onChange: (e) => {
56
+ if (!setFormData || !fieldName) return;
57
+ const copy = [...values];
58
+ copy[index] = e.target.value;
59
+ setFormData((p) => ({ ...p, [fieldName]: copy }));
60
+ },
61
+ onKeyDown: (e) => {
62
+ if (e.key === "Enter" && !isResizable) {
63
+ e.preventDefault();
64
+ }
65
+ },
66
+ isError,
67
+ className: cn("pr-20 pl-13", !isResizable && "resize-none"),
68
+ ...props
90
69
  }
91
- },
92
- /* @__PURE__ */ React.createElement(CirclePlus, { className: "text-success" })
93
- )));
94
- }));
70
+ ),
71
+ /* @__PURE__ */ jsxs("div", { className: "flex-center absolute top-1 right-1 gap-1", children: [
72
+ /* @__PURE__ */ jsx(
73
+ Button,
74
+ {
75
+ variant: "outline",
76
+ type: "button",
77
+ size: "icon-sm",
78
+ className: "rounded-sm",
79
+ onClick: () => {
80
+ if (!setFormData || !fieldName) return;
81
+ const copy = values.filter((_, i) => i !== index);
82
+ setFormData((p) => ({ ...p, [fieldName]: copy }));
83
+ },
84
+ children: /* @__PURE__ */ jsx(CircleX, { className: "text-destructive" })
85
+ }
86
+ ),
87
+ /* @__PURE__ */ jsx(
88
+ Button,
89
+ {
90
+ variant: "outline",
91
+ type: "button",
92
+ size: "icon-sm",
93
+ className: "rounded-sm",
94
+ onClick: () => {
95
+ if (!setFormData || !fieldName) return;
96
+ const copy = [...values];
97
+ copy.splice(index + 1, 0, "");
98
+ setFormData((p) => ({ ...p, [fieldName]: copy }));
99
+ },
100
+ children: /* @__PURE__ */ jsx(CirclePlus, { className: "text-success" })
101
+ }
102
+ )
103
+ ] })
104
+ ] }, index);
105
+ }) });
95
106
  }
96
107
 
97
108
  export { ArrayInput };
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import 'react';
2
3
  import 'ua-parser-js';
3
4
  import { cn } from '../../../../applications/shadcn/utils.js';
@@ -31,7 +32,7 @@ function Checkbox({
31
32
  }) {
32
33
  isDisabled = isDisabled || isLoading || isDisplay;
33
34
  const isChecked = !!formData?.[fieldName ?? ""];
34
- return /* @__PURE__ */ React.createElement(
35
+ return /* @__PURE__ */ jsxs(
35
36
  "div",
36
37
  {
37
38
  className: cn(
@@ -44,44 +45,46 @@ function Checkbox({
44
45
  "shadow-inner",
45
46
  !isChecked || isLoading ? "bg-secondary" : "bg-success",
46
47
  "transition"
47
- )
48
- },
49
- /* @__PURE__ */ React.createElement(
50
- "div",
51
- {
52
- className: cn(
53
- "size-4",
54
- "rounded-full",
55
- "bg-white",
56
- "shadow",
57
- isChecked && "translate-x-6",
58
- isLoading && "opacity-0",
59
- !isDisabled && "group-hover:scale-95 group-active:scale-90",
60
- "duration-200"
61
- )
62
- }
63
- ),
64
- isLoading && /* @__PURE__ */ React.createElement("span", { className: "absolute top-1 left-1" }, /* @__PURE__ */ React.createElement(Spinner, null)),
65
- /* @__PURE__ */ React.createElement(
66
- "input",
67
- {
68
- type: "checkbox",
69
- onChange: (e) => {
70
- if (!setFormData || !fieldName) return;
71
- setFormData((p) => ({ ...p, [fieldName]: e.target.checked }));
72
- },
73
- checked: isChecked,
74
- disabled: isDisabled,
75
- className: cn(
76
- "absolute top-0 left-0",
77
- "h-full w-full",
78
- "rounded-full",
79
- "opacity-0",
80
- isDisabled ? "cursor-not-allowed" : "cursor-pointer"
48
+ ),
49
+ children: [
50
+ /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ className: cn(
54
+ "size-4",
55
+ "rounded-full",
56
+ "bg-white",
57
+ "shadow",
58
+ isChecked && "translate-x-6",
59
+ isLoading && "opacity-0",
60
+ !isDisabled && "group-hover:scale-95 group-active:scale-90",
61
+ "duration-200"
62
+ )
63
+ }
81
64
  ),
82
- ...props
83
- }
84
- )
65
+ isLoading && /* @__PURE__ */ jsx("span", { className: "absolute top-1 left-1", children: /* @__PURE__ */ jsx(Spinner, {}) }),
66
+ /* @__PURE__ */ jsx(
67
+ "input",
68
+ {
69
+ type: "checkbox",
70
+ onChange: (e) => {
71
+ if (!setFormData || !fieldName) return;
72
+ setFormData((p) => ({ ...p, [fieldName]: e.target.checked }));
73
+ },
74
+ checked: isChecked,
75
+ disabled: isDisabled,
76
+ className: cn(
77
+ "absolute top-0 left-0",
78
+ "h-full w-full",
79
+ "rounded-full",
80
+ "opacity-0",
81
+ isDisabled ? "cursor-not-allowed" : "cursor-pointer"
82
+ ),
83
+ ...props
84
+ }
85
+ )
86
+ ]
87
+ }
85
88
  );
86
89
  }
87
90
 
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import 'react';
2
3
  import 'ua-parser-js';
3
4
  import { cn } from '../../../../applications/shadcn/utils.js';
@@ -30,26 +31,28 @@ function Input({
30
31
  children,
31
32
  ...props
32
33
  }) {
33
- return /* @__PURE__ */ React.createElement(
34
+ return /* @__PURE__ */ jsxs(
34
35
  InputGroup,
35
36
  {
36
37
  "data-disabled": isDisabled || isLoading,
37
- className: cn("h-10", inputGroupClassName)
38
- },
39
- isLoading ? /* @__PURE__ */ React.createElement(InputGroupAddon, null, /* @__PURE__ */ React.createElement(Spinner, null)) : /* @__PURE__ */ React.createElement(
40
- InputGroupInput,
41
- {
42
- disabled: isDisabled || isLoading,
43
- "aria-invalid": isError,
44
- onChange: (e) => {
45
- if (!setFormData || !fieldName) return;
46
- setFormData((p) => ({ ...p, [fieldName]: e.target.value }));
47
- },
48
- className: cn("h-10", className),
49
- ...props
50
- }
51
- ),
52
- children
38
+ className: cn("h-10", inputGroupClassName),
39
+ children: [
40
+ isLoading ? /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
41
+ InputGroupInput,
42
+ {
43
+ disabled: isDisabled || isLoading,
44
+ "aria-invalid": isError,
45
+ onChange: (e) => {
46
+ if (!setFormData || !fieldName) return;
47
+ setFormData((p) => ({ ...p, [fieldName]: e.target.value }));
48
+ },
49
+ className: cn("h-10", className),
50
+ ...props
51
+ }
52
+ ),
53
+ children
54
+ ]
55
+ }
53
56
  );
54
57
  }
55
58
 
@@ -1,3 +1,4 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { Eye, EyeOff } from 'lucide-react';
2
3
  import { useState } from 'react';
3
4
  import '@radix-ui/react-avatar';
@@ -21,16 +22,16 @@ function PasswordInput({
21
22
  ...props
22
23
  }) {
23
24
  const [showPassword, setShowPassword] = useState(false);
24
- return /* @__PURE__ */ React.createElement(Input, { type: showPassword ? "text" : "password", ...props }, /* @__PURE__ */ React.createElement(InputGroupAddon, { align: "inline-end" }, /* @__PURE__ */ React.createElement(
25
+ return /* @__PURE__ */ jsx(Input, { type: showPassword ? "text" : "password", ...props, children: /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(
25
26
  InputGroupButton,
26
27
  {
27
28
  "aria-label": showPassword ? "Hide password" : "Show password",
28
29
  title: showPassword ? "Hide password" : "Show password",
29
30
  size: "icon-xs",
30
- onClick: () => setShowPassword((prev) => !prev)
31
- },
32
- showPassword ? /* @__PURE__ */ React.createElement(Eye, null) : /* @__PURE__ */ React.createElement(EyeOff, null)
33
- )));
31
+ onClick: () => setShowPassword((prev) => !prev),
32
+ children: showPassword ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeOff, {})
33
+ }
34
+ ) }) });
34
35
  }
35
36
 
36
37
  export { PasswordInput };
@@ -1,3 +1,4 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import { Search } from 'lucide-react';
3
4
  import { useRef, useState } from 'react';
@@ -38,7 +39,7 @@ function SearchInput({
38
39
  setInputValue(e.target.value);
39
40
  if (!isComposingRef.current) setSearchString(e.target.value);
40
41
  };
41
- return /* @__PURE__ */ React.createElement("div", { className: "relative size-full" }, /* @__PURE__ */ React.createElement(
42
+ return /* @__PURE__ */ jsx("div", { className: "relative size-full", children: /* @__PURE__ */ jsx(
42
43
  Input,
43
44
  {
44
45
  isDisabled,
@@ -49,10 +50,10 @@ function SearchInput({
49
50
  onCompositionStart: () => isComposingRef.current = true,
50
51
  onCompositionEnd: handleCompositionEnd,
51
52
  className: "w-full pr-9",
52
- ...props
53
- },
54
- /* @__PURE__ */ React.createElement(InputGroupAddon, { align: "inline-end" }, isLoading ? /* @__PURE__ */ React.createElement(Spinner, null) : /* @__PURE__ */ React.createElement(Search, null))
55
- ));
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: isLoading ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsx(Search, {}) })
55
+ }
56
+ ) });
56
57
  }
57
58
 
58
59
  export { SearchInput };
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import 'react';
2
3
  import 'ua-parser-js';
3
4
  import { cn } from '../../../../applications/shadcn/utils.js';
@@ -29,7 +30,7 @@ function Select({
29
30
  children,
30
31
  ...props
31
32
  }) {
32
- return /* @__PURE__ */ React.createElement(
33
+ return /* @__PURE__ */ jsxs(
33
34
  Select$1,
34
35
  {
35
36
  onValueChange: (value) => {
@@ -37,17 +38,22 @@ function Select({
37
38
  setFormData((p) => ({ ...p, [fieldName]: value }));
38
39
  },
39
40
  disabled: isDisabled || isLoading,
40
- ...props
41
- },
42
- /* @__PURE__ */ React.createElement(
43
- SelectTrigger,
44
- {
45
- className: cn("w-full", className),
46
- disabled: isDisabled || isLoading
47
- },
48
- /* @__PURE__ */ React.createElement(SelectValue, { placeholder })
49
- ),
50
- /* @__PURE__ */ React.createElement(SelectContent, null, /* @__PURE__ */ React.createElement(SelectGroup, null, label && /* @__PURE__ */ React.createElement(SelectLabel, null, label), children))
41
+ ...props,
42
+ children: [
43
+ /* @__PURE__ */ jsx(
44
+ SelectTrigger,
45
+ {
46
+ className: cn("w-full", className),
47
+ disabled: isDisabled || isLoading,
48
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsxs(SelectGroup, { children: [
52
+ label && /* @__PURE__ */ jsx(SelectLabel, { children: label }),
53
+ children
54
+ ] }) })
55
+ ]
56
+ }
51
57
  );
52
58
  }
53
59
  function Option({
@@ -55,7 +61,7 @@ function Option({
55
61
  isDisabled = false,
56
62
  children
57
63
  }) {
58
- return /* @__PURE__ */ React.createElement(SelectItem, { value, disabled: isDisabled }, children);
64
+ return /* @__PURE__ */ jsx(SelectItem, { value, disabled: isDisabled, children });
59
65
  }
60
66
 
61
67
  export { Option, Select };
@@ -1,3 +1,4 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
1
2
  import { useRef, useEffect } from 'react';
2
3
  import '@radix-ui/react-avatar';
3
4
  import 'ua-parser-js';
@@ -39,7 +40,7 @@ function Textarea({
39
40
  if (!textareaRef.current) return;
40
41
  resetHeight(textareaRef.current);
41
42
  }, [props.value, isLoading]);
42
- return /* @__PURE__ */ React.createElement(React.Fragment, null, isLoading ? /* @__PURE__ */ React.createElement(InputGroup, { "data-disabled": isDisabled, className: "h-10" }, /* @__PURE__ */ React.createElement(InputGroupAddon, null, /* @__PURE__ */ React.createElement(Spinner, null))) : /* @__PURE__ */ React.createElement(
43
+ return /* @__PURE__ */ jsx(Fragment, { children: isLoading ? /* @__PURE__ */ jsx(InputGroup, { "data-disabled": isDisabled, className: "h-10", children: /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Spinner, {}) }) }) : /* @__PURE__ */ jsx(
43
44
  Textarea$1,
44
45
  {
45
46
  ref: textareaRef,
@@ -53,7 +54,7 @@ function Textarea({
53
54
  },
54
55
  ...props
55
56
  }
56
- ));
57
+ ) });
57
58
  }
58
59
 
59
60
  export { Textarea };
@@ -1,3 +1,4 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { useTranslator } from 'intor/react';
2
3
  import 'react';
3
4
  import 'ua-parser-js';
@@ -14,7 +15,7 @@ function ContentContainer({
14
15
  }) {
15
16
  const { t } = useTranslator();
16
17
  const ABOVE_HEIGHT = NAVBAR_HEIGHT + PAGE_HEADER_HEIGHT;
17
- return /* @__PURE__ */ React.createElement(
18
+ return /* @__PURE__ */ jsx(
18
19
  "div",
19
20
  {
20
21
  style: {
@@ -27,9 +28,9 @@ function ContentContainer({
27
28
  "px-6 pt-6",
28
29
  isFixHeight ? "pb-6" : "flex-1 pb-64"
29
30
  ),
30
- ...props
31
- },
32
- isNotFound ? /* @__PURE__ */ React.createElement("p", { className: "text-muted-foreground" }, t("ui.no-data.text")) : children
31
+ ...props,
32
+ children: isNotFound ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: t("ui.no-data.text") }) : children
33
+ }
33
34
  );
34
35
  }
35
36