@abpjs/theme-shared 0.7.6 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -34,12 +34,15 @@ __export(index_exports, {
34
34
  AbpModalFooter: () => AbpModalFooter,
35
35
  AbpModalHeader: () => AbpModalHeader,
36
36
  Alert: () => Alert,
37
- Button: () => Button2,
38
- ChakraDialog: () => import_react8.Dialog,
37
+ Button: () => Button3,
38
+ ChakraDialog: () => import_react10.Dialog,
39
39
  Checkbox: () => Checkbox,
40
40
  ConfirmationDialog: () => ConfirmationDialog,
41
41
  ConfirmationProvider: () => ConfirmationProvider,
42
+ DEFAULT_STYLES: () => DEFAULT_STYLES,
43
+ ErrorComponent: () => ErrorComponent,
42
44
  FormField: () => FormField,
45
+ LoaderBar: () => LoaderBar,
43
46
  Modal: () => Modal,
44
47
  ModalBody: () => AbpModalBody,
45
48
  ModalFooter: () => AbpModalFooter,
@@ -53,7 +56,7 @@ __export(index_exports, {
53
56
  createAbpSystem: () => createAbpSystem,
54
57
  createErrorInterceptor: () => createErrorInterceptor,
55
58
  defaultAbpConfig: () => defaultAbpConfig,
56
- defineConfig: () => import_react15.defineConfig,
59
+ defineConfig: () => import_react17.defineConfig,
57
60
  getSeverityBg: () => getSeverityBg,
58
61
  getSeverityBorderColor: () => getSeverityBorderColor,
59
62
  getSeverityColorScheme: () => getSeverityColorPalette,
@@ -79,6 +82,94 @@ var Toaster;
79
82
  })(Status = Toaster2.Status || (Toaster2.Status = {}));
80
83
  })(Toaster || (Toaster = {}));
81
84
 
85
+ // src/constants/styles.ts
86
+ var DEFAULT_STYLES = `
87
+ .is-invalid .form-control {
88
+ border-color: #dc3545;
89
+ border-style: solid !important;
90
+ }
91
+
92
+ .is-invalid .invalid-feedback,
93
+ .is-invalid + * .invalid-feedback {
94
+ display: block;
95
+ }
96
+
97
+ .data-tables-filter {
98
+ text-align: right;
99
+ }
100
+
101
+ .pointer {
102
+ cursor: pointer;
103
+ }
104
+
105
+ .navbar .dropdown-submenu a::after {
106
+ transform: rotate(-90deg);
107
+ position: absolute;
108
+ right: 16px;
109
+ top: 18px;
110
+ }
111
+
112
+ .modal {
113
+ background-color: rgba(0, 0, 0, .6);
114
+ }
115
+
116
+ .abp-ellipsis {
117
+ display: inline-block;
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ white-space: nowrap;
121
+ }
122
+
123
+ /* <animations */
124
+
125
+ .fade-in-top {
126
+ animation: fadeInTop 0.4s ease-in-out;
127
+ }
128
+
129
+ .fade-out-top {
130
+ animation: fadeOutTop 0.4s ease-in-out;
131
+ }
132
+
133
+ @keyframes fadeInTop {
134
+ from {
135
+ transform: translateY(-5px);
136
+ opacity: 0;
137
+ }
138
+
139
+ to {
140
+ transform: translateY(5px);
141
+ opacity: 1;
142
+ }
143
+ }
144
+
145
+ @keyframes fadeOutTop {
146
+ to {
147
+ transform: translateY(-5px);
148
+ opacity: 0;
149
+ }
150
+ }
151
+
152
+ /* </animations */
153
+
154
+ /* Loader bar styles */
155
+ .abp-loader-bar {
156
+ position: fixed;
157
+ top: 0;
158
+ left: 0;
159
+ right: 0;
160
+ height: 3px;
161
+ z-index: 9999;
162
+ background-color: rgba(0, 0, 0, 0.1);
163
+ overflow: hidden;
164
+ }
165
+
166
+ .abp-progress {
167
+ height: 100%;
168
+ background-color: #3182ce;
169
+ transition: width 0.3s ease-out;
170
+ }
171
+ `;
172
+
82
173
  // src/contexts/toaster.context.tsx
83
174
  var import_react = require("react");
84
175
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -309,6 +400,7 @@ var DEFAULT_ERROR_MESSAGES = {
309
400
  function useErrorHandler(options = {}) {
310
401
  const { navigate, loginPath = "/account/login" } = options;
311
402
  const confirmation = useConfirmation();
403
+ const [errorComponentProps, setErrorComponentProps] = (0, import_react3.useState)(null);
312
404
  const navigateToLogin = (0, import_react3.useCallback)(() => {
313
405
  if (navigate) {
314
406
  navigate(loginPath);
@@ -320,6 +412,22 @@ function useErrorHandler(options = {}) {
320
412
  },
321
413
  [confirmation]
322
414
  );
415
+ const clearErrorComponent = (0, import_react3.useCallback)(() => {
416
+ setErrorComponentProps(null);
417
+ }, []);
418
+ const createErrorComponent = (0, import_react3.useCallback)(
419
+ (instance) => {
420
+ const props = {
421
+ title: instance.title || "Error",
422
+ details: instance.details || "An error has occurred.",
423
+ onDestroy: clearErrorComponent,
424
+ showCloseButton: true
425
+ };
426
+ setErrorComponentProps(props);
427
+ return props;
428
+ },
429
+ [clearErrorComponent]
430
+ );
323
431
  const handleError = (0, import_react3.useCallback)(
324
432
  async (error) => {
325
433
  if (error.status === 401) {
@@ -343,7 +451,10 @@ function useErrorHandler(options = {}) {
343
451
  return {
344
452
  handleError,
345
453
  showError,
346
- navigateToLogin
454
+ navigateToLogin,
455
+ createErrorComponent,
456
+ errorComponentProps,
457
+ clearErrorComponent
347
458
  };
348
459
  }
349
460
  function createErrorInterceptor(errorHandler) {
@@ -616,9 +727,132 @@ function ConfirmationDialog({ className }) {
616
727
  );
617
728
  }
618
729
 
619
- // src/components/modal/Modal.tsx
730
+ // src/components/errors/ErrorComponent.tsx
620
731
  var import_react8 = require("@chakra-ui/react");
621
732
  var import_jsx_runtime5 = require("react/jsx-runtime");
733
+ function ErrorComponent({
734
+ title = "Error",
735
+ details = "An error has occurred.",
736
+ onDestroy,
737
+ showCloseButton = true,
738
+ closeButtonText = "Go Back"
739
+ }) {
740
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Container, { maxW: "container.md", py: 20, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react8.VStack, { gap: 6, textAlign: "center", children: [
741
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
742
+ import_react8.Heading,
743
+ {
744
+ size: "4xl",
745
+ color: "red.500",
746
+ fontWeight: "bold",
747
+ children: title
748
+ }
749
+ ),
750
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Text, { fontSize: "lg", color: "gray.600", children: details }),
751
+ showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
752
+ import_react8.Button,
753
+ {
754
+ colorPalette: "blue",
755
+ size: "lg",
756
+ onClick: onDestroy,
757
+ children: closeButtonText
758
+ }
759
+ )
760
+ ] }) });
761
+ }
762
+
763
+ // src/components/loader-bar/LoaderBar.tsx
764
+ var import_react9 = require("react");
765
+ var import_core3 = require("@abpjs/core");
766
+ var import_jsx_runtime6 = require("react/jsx-runtime");
767
+ function LoaderBar({
768
+ containerClass = "abp-loader-bar",
769
+ progressClass = "abp-progress",
770
+ filter
771
+ }) {
772
+ const { loading } = (0, import_core3.useLoader)();
773
+ const [isLoading, setIsLoading] = (0, import_react9.useState)(false);
774
+ const [progressLevel, setProgressLevel] = (0, import_react9.useState)(0);
775
+ const intervalRef = (0, import_react9.useRef)(null);
776
+ (0, import_react9.useEffect)(() => {
777
+ if (loading) {
778
+ startLoading();
779
+ } else {
780
+ stopLoading();
781
+ }
782
+ }, [loading]);
783
+ (0, import_react9.useEffect)(() => {
784
+ return () => {
785
+ if (intervalRef.current) {
786
+ clearInterval(intervalRef.current);
787
+ }
788
+ };
789
+ }, []);
790
+ const startLoading = () => {
791
+ setIsLoading(true);
792
+ setProgressLevel(0);
793
+ if (intervalRef.current) {
794
+ clearInterval(intervalRef.current);
795
+ }
796
+ intervalRef.current = setInterval(() => {
797
+ setProgressLevel((prev) => {
798
+ if (prev >= 90) {
799
+ return prev + 0.5;
800
+ } else if (prev >= 75) {
801
+ return prev + 2;
802
+ } else if (prev >= 50) {
803
+ return prev + 5;
804
+ }
805
+ return prev + 10;
806
+ });
807
+ }, 300);
808
+ };
809
+ const stopLoading = () => {
810
+ setProgressLevel(100);
811
+ if (intervalRef.current) {
812
+ clearInterval(intervalRef.current);
813
+ intervalRef.current = null;
814
+ }
815
+ setTimeout(() => {
816
+ setIsLoading(false);
817
+ setProgressLevel(0);
818
+ }, 400);
819
+ };
820
+ if (!isLoading && progressLevel === 0) {
821
+ return null;
822
+ }
823
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
824
+ "div",
825
+ {
826
+ className: containerClass,
827
+ style: {
828
+ position: "fixed",
829
+ top: 0,
830
+ left: 0,
831
+ right: 0,
832
+ height: "3px",
833
+ zIndex: 9999,
834
+ backgroundColor: "rgba(0, 0, 0, 0.1)",
835
+ overflow: "hidden"
836
+ },
837
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
838
+ "div",
839
+ {
840
+ className: progressClass,
841
+ style: {
842
+ height: "100%",
843
+ backgroundColor: "#3182ce",
844
+ transition: "width 0.3s ease-out",
845
+ width: `${Math.min(progressLevel, 100)}%`
846
+ }
847
+ }
848
+ )
849
+ }
850
+ );
851
+ }
852
+
853
+ // src/components/modal/Modal.tsx
854
+ var import_react10 = require("@chakra-ui/react");
855
+ var import_jsx_runtime7 = require("react/jsx-runtime");
622
856
  function getSizeWidth(size) {
623
857
  switch (size) {
624
858
  case "sm":
@@ -655,8 +889,8 @@ function Modal({
655
889
  const handleOpenChange = (details) => {
656
890
  onVisibleChange?.(details.open);
657
891
  };
658
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
659
- import_react8.Dialog.Root,
892
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
893
+ import_react10.Dialog.Root,
660
894
  {
661
895
  open: visible,
662
896
  onOpenChange: handleOpenChange,
@@ -667,27 +901,27 @@ function Modal({
667
901
  motionPreset,
668
902
  trapFocus,
669
903
  preventScroll,
670
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react8.Portal, { children: [
671
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Backdrop, {}),
672
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
673
- import_react8.Dialog.Content,
904
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react10.Portal, { children: [
905
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Backdrop, {}),
906
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
907
+ import_react10.Dialog.Content,
674
908
  {
675
909
  className: modalClass,
676
910
  width: getSizeWidth(size),
677
911
  maxWidth: size === "full" ? "100vw" : void 0,
678
912
  maxHeight: size === "full" ? "100vh" : void 0,
679
913
  children: [
680
- (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
681
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react8.Flex, { justify: "space-between", align: "center", width: "100%", children: [
682
- header && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
683
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.CloseButton, { size: "sm" }) })
914
+ (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
915
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react10.Flex, { justify: "space-between", align: "center", width: "100%", children: [
916
+ header && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
917
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.CloseButton, { size: "sm" }) })
684
918
  ] }) }),
685
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Separator, {})
919
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Separator, {})
686
920
  ] }),
687
- children && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Body, { py: 4, children }),
688
- footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
689
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Separator, {}),
690
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
921
+ children && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Body, { py: 4, children }),
922
+ footer && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
923
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Separator, {}),
924
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
691
925
  ] })
692
926
  ]
693
927
  }
@@ -697,18 +931,18 @@ function Modal({
697
931
  );
698
932
  }
699
933
  function AbpModalHeader({ children, className }) {
700
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Text, { fontWeight: "bold", fontSize: "lg", className, children });
934
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Text, { fontWeight: "bold", fontSize: "lg", className, children });
701
935
  }
702
936
  function AbpModalBody({ children, className }) {
703
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Box, { color: "gray.600", className, children });
937
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Box, { color: "gray.600", className, children });
704
938
  }
705
939
  function AbpModalFooter({ children, className }) {
706
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Flex, { gap: 3, justify: "flex-end", className, children });
940
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.Flex, { gap: 3, justify: "flex-end", className, children });
707
941
  }
708
942
 
709
943
  // src/components/ui/Alert.tsx
710
- var import_react9 = require("@chakra-ui/react");
711
- var import_jsx_runtime6 = require("react/jsx-runtime");
944
+ var import_react11 = require("@chakra-ui/react");
945
+ var import_jsx_runtime8 = require("react/jsx-runtime");
712
946
  function Alert({
713
947
  status = "info",
714
948
  children,
@@ -719,30 +953,30 @@ function Alert({
719
953
  mb,
720
954
  borderRadius = "md"
721
955
  }) {
722
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
723
- import_react9.Alert.Root,
956
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
957
+ import_react11.Alert.Root,
724
958
  {
725
959
  status,
726
960
  className,
727
961
  mb,
728
962
  borderRadius,
729
963
  children: [
730
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Alert.Indicator, {}),
731
- title ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
732
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Alert.Title, { children: title }),
733
- (description || children) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Alert.Description, { children: description || children })
734
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Alert.Title, { children })
964
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Alert.Indicator, {}),
965
+ title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
966
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Alert.Title, { children: title }),
967
+ (description || children) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Alert.Description, { children: description || children })
968
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react11.Alert.Title, { children })
735
969
  ]
736
970
  }
737
971
  );
738
972
  }
739
973
 
740
974
  // src/components/ui/Button.tsx
741
- var import_react10 = require("react");
742
- var import_react11 = require("@chakra-ui/react");
743
- var import_jsx_runtime7 = require("react/jsx-runtime");
744
- var Button2 = (0, import_react10.forwardRef)(
745
- function Button3({
975
+ var import_react12 = require("react");
976
+ var import_react13 = require("@chakra-ui/react");
977
+ var import_jsx_runtime9 = require("react/jsx-runtime");
978
+ var Button3 = (0, import_react12.forwardRef)(
979
+ function Button4({
746
980
  children,
747
981
  type = "button",
748
982
  variant = "solid",
@@ -757,8 +991,8 @@ var Button2 = (0, import_react10.forwardRef)(
757
991
  mr,
758
992
  ml
759
993
  }, ref) {
760
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
761
- import_react11.Button,
994
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
995
+ import_react13.Button,
762
996
  {
763
997
  ref,
764
998
  type,
@@ -780,10 +1014,10 @@ var Button2 = (0, import_react10.forwardRef)(
780
1014
  );
781
1015
 
782
1016
  // src/components/ui/Checkbox.tsx
783
- var import_react12 = require("react");
784
- var import_react13 = require("@chakra-ui/react");
785
- var import_jsx_runtime8 = require("react/jsx-runtime");
786
- var Checkbox = (0, import_react12.forwardRef)(
1017
+ var import_react14 = require("react");
1018
+ var import_react15 = require("@chakra-ui/react");
1019
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1020
+ var Checkbox = (0, import_react14.forwardRef)(
787
1021
  function Checkbox2({
788
1022
  children,
789
1023
  checked,
@@ -800,8 +1034,8 @@ var Checkbox = (0, import_react12.forwardRef)(
800
1034
  onChange,
801
1035
  className
802
1036
  }, ref) {
803
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
804
- import_react13.Checkbox.Root,
1037
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1038
+ import_react15.Checkbox.Root,
805
1039
  {
806
1040
  checked,
807
1041
  defaultChecked,
@@ -813,8 +1047,8 @@ var Checkbox = (0, import_react12.forwardRef)(
813
1047
  size,
814
1048
  className,
815
1049
  children: [
816
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
817
- import_react13.Checkbox.HiddenInput,
1050
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1051
+ import_react15.Checkbox.HiddenInput,
818
1052
  {
819
1053
  ref,
820
1054
  id,
@@ -823,8 +1057,8 @@ var Checkbox = (0, import_react12.forwardRef)(
823
1057
  onChange
824
1058
  }
825
1059
  ),
826
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Checkbox.Control, {}),
827
- children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Checkbox.Label, { children })
1060
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react15.Checkbox.Control, {}),
1061
+ children && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react15.Checkbox.Label, { children })
828
1062
  ]
829
1063
  }
830
1064
  );
@@ -832,8 +1066,8 @@ var Checkbox = (0, import_react12.forwardRef)(
832
1066
  );
833
1067
 
834
1068
  // src/components/ui/FormField.tsx
835
- var import_react14 = require("@chakra-ui/react");
836
- var import_jsx_runtime9 = require("react/jsx-runtime");
1069
+ var import_react16 = require("@chakra-ui/react");
1070
+ var import_jsx_runtime11 = require("react/jsx-runtime");
837
1071
  function FormField({
838
1072
  label,
839
1073
  invalid = false,
@@ -845,22 +1079,22 @@ function FormField({
845
1079
  htmlFor,
846
1080
  className
847
1081
  }) {
848
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react14.Field.Root, { invalid, disabled, className, children: [
849
- label && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react14.Field.Label, { htmlFor, children: [
1082
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react16.Field.Root, { invalid, disabled, className, children: [
1083
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react16.Field.Label, { htmlFor, children: [
850
1084
  label,
851
- required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react14.Field.RequiredIndicator, {})
1085
+ required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react16.Field.RequiredIndicator, {})
852
1086
  ] }),
853
1087
  children,
854
- helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react14.Field.HelperText, { children: helperText }),
855
- invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react14.Field.ErrorText, { children: errorText })
1088
+ helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react16.Field.HelperText, { children: helperText }),
1089
+ invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react16.Field.ErrorText, { children: errorText })
856
1090
  ] });
857
1091
  }
858
1092
 
859
1093
  // src/providers/ThemeSharedProvider.tsx
860
- var import_react17 = require("@chakra-ui/react");
1094
+ var import_react19 = require("@chakra-ui/react");
861
1095
 
862
1096
  // src/theme/index.ts
863
- var import_react15 = require("@chakra-ui/react");
1097
+ var import_react17 = require("@chakra-ui/react");
864
1098
  var colors = {
865
1099
  brand: {
866
1100
  50: { value: "#e3f2fd" },
@@ -1063,7 +1297,7 @@ var semanticTokens = {
1063
1297
  // },
1064
1298
  // },
1065
1299
  };
1066
- var defaultAbpConfig = (0, import_react15.defineConfig)({
1300
+ var defaultAbpConfig = (0, import_react17.defineConfig)({
1067
1301
  theme: {
1068
1302
  tokens: {
1069
1303
  colors,
@@ -1085,20 +1319,20 @@ var defaultAbpConfig = (0, import_react15.defineConfig)({
1085
1319
  });
1086
1320
  function createAbpSystem(overrides) {
1087
1321
  if (overrides) {
1088
- return (0, import_react15.createSystem)(import_react15.defaultConfig, defaultAbpConfig, overrides);
1322
+ return (0, import_react17.createSystem)(import_react17.defaultConfig, defaultAbpConfig, overrides);
1089
1323
  }
1090
- return (0, import_react15.createSystem)(import_react15.defaultConfig, defaultAbpConfig);
1324
+ return (0, import_react17.createSystem)(import_react17.defaultConfig, defaultAbpConfig);
1091
1325
  }
1092
1326
  var abpSystem = createAbpSystem();
1093
1327
 
1094
1328
  // src/components/ui/color-mode.tsx
1095
- var import_react16 = require("@chakra-ui/react");
1329
+ var import_react18 = require("@chakra-ui/react");
1096
1330
  var import_next_themes = require("next-themes");
1097
- var React7 = __toESM(require("react"));
1331
+ var React8 = __toESM(require("react"));
1098
1332
  var import_lucide_react3 = require("lucide-react");
1099
- var import_jsx_runtime10 = require("react/jsx-runtime");
1333
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1100
1334
  function ColorModeProvider(props) {
1101
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
1335
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
1102
1336
  }
1103
1337
  function useColorMode() {
1104
1338
  const { resolvedTheme, setTheme, forcedTheme } = (0, import_next_themes.useTheme)();
@@ -1114,12 +1348,12 @@ function useColorMode() {
1114
1348
  }
1115
1349
  function ColorModeIcon() {
1116
1350
  const { colorMode } = useColorMode();
1117
- return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react3.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react3.Sun, {});
1351
+ return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react3.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react3.Sun, {});
1118
1352
  }
1119
- var ColorModeButton = React7.forwardRef(function ColorModeButton2(props, ref) {
1353
+ var ColorModeButton = React8.forwardRef(function ColorModeButton2(props, ref) {
1120
1354
  const { toggleColorMode } = useColorMode();
1121
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react16.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react16.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1122
- import_react16.IconButton,
1355
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react18.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react18.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1356
+ import_react18.IconButton,
1123
1357
  {
1124
1358
  onClick: toggleColorMode,
1125
1359
  variant: "ghost",
@@ -1133,14 +1367,14 @@ var ColorModeButton = React7.forwardRef(function ColorModeButton2(props, ref) {
1133
1367
  height: "5"
1134
1368
  }
1135
1369
  },
1136
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ColorModeIcon, {})
1370
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ColorModeIcon, {})
1137
1371
  }
1138
1372
  ) });
1139
1373
  });
1140
- var LightMode = React7.forwardRef(
1374
+ var LightMode = React8.forwardRef(
1141
1375
  function LightMode2(props, ref) {
1142
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1143
- import_react16.Span,
1376
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1377
+ import_react18.Span,
1144
1378
  {
1145
1379
  color: "fg",
1146
1380
  display: "contents",
@@ -1153,10 +1387,10 @@ var LightMode = React7.forwardRef(
1153
1387
  );
1154
1388
  }
1155
1389
  );
1156
- var DarkMode = React7.forwardRef(
1390
+ var DarkMode = React8.forwardRef(
1157
1391
  function DarkMode2(props, ref) {
1158
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1159
- import_react16.Span,
1392
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1393
+ import_react18.Span,
1160
1394
  {
1161
1395
  color: "fg",
1162
1396
  display: "contents",
@@ -1171,8 +1405,8 @@ var DarkMode = React7.forwardRef(
1171
1405
  );
1172
1406
 
1173
1407
  // src/providers/ThemeSharedProvider.tsx
1174
- var import_core3 = require("@abpjs/core");
1175
- var import_jsx_runtime11 = require("react/jsx-runtime");
1408
+ var import_core4 = require("@abpjs/core");
1409
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1176
1410
  function ThemeSharedProvider({
1177
1411
  children,
1178
1412
  renderToasts = true,
@@ -1184,15 +1418,15 @@ function ThemeSharedProvider({
1184
1418
  locale = "en-US"
1185
1419
  }) {
1186
1420
  const system = themeOverrides ? createAbpSystem(themeOverrides) : abpSystem;
1187
- const { endSide } = (0, import_core3.useDirection)();
1421
+ const { endSide } = (0, import_core4.useDirection)();
1188
1422
  toastPosition = `bottom-${endSide}`;
1189
- const content = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(ConfirmationProvider, { children: [
1423
+ const content = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ConfirmationProvider, { children: [
1190
1424
  children,
1191
- renderToasts && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastContainer, { position: toastPosition }),
1192
- renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ConfirmationDialog, {})
1425
+ renderToasts && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ToastContainer, { position: toastPosition }),
1426
+ renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ConfirmationDialog, {})
1193
1427
  ] }) });
1194
1428
  const colorModeProps = enableColorMode ? { defaultTheme: defaultColorMode } : { forcedTheme: "light" };
1195
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
1429
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react19.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react19.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
1196
1430
  }
1197
1431
 
1198
1432
  // src/utils/styles.ts
@@ -1276,7 +1510,10 @@ function injectThemeSharedStyles() {
1276
1510
  Checkbox,
1277
1511
  ConfirmationDialog,
1278
1512
  ConfirmationProvider,
1513
+ DEFAULT_STYLES,
1514
+ ErrorComponent,
1279
1515
  FormField,
1516
+ LoaderBar,
1280
1517
  Modal,
1281
1518
  ModalBody,
1282
1519
  ModalFooter,