@abpjs/theme-shared 0.7.6 → 0.9.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,16 +34,21 @@ __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_react11.Dialog,
39
+ ChangePassword: () => ChangePassword,
39
40
  Checkbox: () => Checkbox,
40
41
  ConfirmationDialog: () => ConfirmationDialog,
41
42
  ConfirmationProvider: () => ConfirmationProvider,
43
+ DEFAULT_STYLES: () => DEFAULT_STYLES,
44
+ ErrorComponent: () => ErrorComponent,
42
45
  FormField: () => FormField,
46
+ LoaderBar: () => LoaderBar,
43
47
  Modal: () => Modal,
44
48
  ModalBody: () => AbpModalBody,
45
49
  ModalFooter: () => AbpModalFooter,
46
50
  ModalHeader: () => AbpModalHeader,
51
+ Profile: () => Profile,
47
52
  THEME_SHARED_STYLES: () => THEME_SHARED_STYLES,
48
53
  ThemeSharedProvider: () => ThemeSharedProvider,
49
54
  ToastContainer: () => ToastContainer,
@@ -53,7 +58,7 @@ __export(index_exports, {
53
58
  createAbpSystem: () => createAbpSystem,
54
59
  createErrorInterceptor: () => createErrorInterceptor,
55
60
  defaultAbpConfig: () => defaultAbpConfig,
56
- defineConfig: () => import_react15.defineConfig,
61
+ defineConfig: () => import_react22.defineConfig,
57
62
  getSeverityBg: () => getSeverityBg,
58
63
  getSeverityBorderColor: () => getSeverityBorderColor,
59
64
  getSeverityColorScheme: () => getSeverityColorPalette,
@@ -79,6 +84,94 @@ var Toaster;
79
84
  })(Status = Toaster2.Status || (Toaster2.Status = {}));
80
85
  })(Toaster || (Toaster = {}));
81
86
 
87
+ // src/constants/styles.ts
88
+ var DEFAULT_STYLES = `
89
+ .is-invalid .form-control {
90
+ border-color: #dc3545;
91
+ border-style: solid !important;
92
+ }
93
+
94
+ .is-invalid .invalid-feedback,
95
+ .is-invalid + * .invalid-feedback {
96
+ display: block;
97
+ }
98
+
99
+ .data-tables-filter {
100
+ text-align: right;
101
+ }
102
+
103
+ .pointer {
104
+ cursor: pointer;
105
+ }
106
+
107
+ .navbar .dropdown-submenu a::after {
108
+ transform: rotate(-90deg);
109
+ position: absolute;
110
+ right: 16px;
111
+ top: 18px;
112
+ }
113
+
114
+ .modal {
115
+ background-color: rgba(0, 0, 0, .6);
116
+ }
117
+
118
+ .abp-ellipsis {
119
+ display: inline-block;
120
+ overflow: hidden;
121
+ text-overflow: ellipsis;
122
+ white-space: nowrap;
123
+ }
124
+
125
+ /* <animations */
126
+
127
+ .fade-in-top {
128
+ animation: fadeInTop 0.4s ease-in-out;
129
+ }
130
+
131
+ .fade-out-top {
132
+ animation: fadeOutTop 0.4s ease-in-out;
133
+ }
134
+
135
+ @keyframes fadeInTop {
136
+ from {
137
+ transform: translateY(-5px);
138
+ opacity: 0;
139
+ }
140
+
141
+ to {
142
+ transform: translateY(5px);
143
+ opacity: 1;
144
+ }
145
+ }
146
+
147
+ @keyframes fadeOutTop {
148
+ to {
149
+ transform: translateY(-5px);
150
+ opacity: 0;
151
+ }
152
+ }
153
+
154
+ /* </animations */
155
+
156
+ /* Loader bar styles */
157
+ .abp-loader-bar {
158
+ position: fixed;
159
+ top: 0;
160
+ left: 0;
161
+ right: 0;
162
+ height: 3px;
163
+ z-index: 9999;
164
+ background-color: rgba(0, 0, 0, 0.1);
165
+ overflow: hidden;
166
+ }
167
+
168
+ .abp-progress {
169
+ height: 100%;
170
+ background-color: #3182ce;
171
+ transition: width 0.3s ease-out;
172
+ }
173
+ `;
174
+
82
175
  // src/contexts/toaster.context.tsx
83
176
  var import_react = require("react");
84
177
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -309,6 +402,7 @@ var DEFAULT_ERROR_MESSAGES = {
309
402
  function useErrorHandler(options = {}) {
310
403
  const { navigate, loginPath = "/account/login" } = options;
311
404
  const confirmation = useConfirmation();
405
+ const [errorComponentProps, setErrorComponentProps] = (0, import_react3.useState)(null);
312
406
  const navigateToLogin = (0, import_react3.useCallback)(() => {
313
407
  if (navigate) {
314
408
  navigate(loginPath);
@@ -320,6 +414,22 @@ function useErrorHandler(options = {}) {
320
414
  },
321
415
  [confirmation]
322
416
  );
417
+ const clearErrorComponent = (0, import_react3.useCallback)(() => {
418
+ setErrorComponentProps(null);
419
+ }, []);
420
+ const createErrorComponent = (0, import_react3.useCallback)(
421
+ (instance) => {
422
+ const props = {
423
+ title: instance.title || "Error",
424
+ details: instance.details || "An error has occurred.",
425
+ onDestroy: clearErrorComponent,
426
+ showCloseButton: true
427
+ };
428
+ setErrorComponentProps(props);
429
+ return props;
430
+ },
431
+ [clearErrorComponent]
432
+ );
323
433
  const handleError = (0, import_react3.useCallback)(
324
434
  async (error) => {
325
435
  if (error.status === 401) {
@@ -343,7 +453,10 @@ function useErrorHandler(options = {}) {
343
453
  return {
344
454
  handleError,
345
455
  showError,
346
- navigateToLogin
456
+ navigateToLogin,
457
+ createErrorComponent,
458
+ errorComponentProps,
459
+ clearErrorComponent
347
460
  };
348
461
  }
349
462
  function createErrorInterceptor(errorHandler) {
@@ -616,9 +729,133 @@ function ConfirmationDialog({ className }) {
616
729
  );
617
730
  }
618
731
 
619
- // src/components/modal/Modal.tsx
732
+ // src/components/errors/ErrorComponent.tsx
620
733
  var import_react8 = require("@chakra-ui/react");
621
734
  var import_jsx_runtime5 = require("react/jsx-runtime");
735
+ function ErrorComponent({
736
+ title = "Error",
737
+ details = "An error has occurred.",
738
+ onDestroy,
739
+ showCloseButton = true,
740
+ closeButtonText = "Go Back"
741
+ }) {
742
+ 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: [
743
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
744
+ import_react8.Heading,
745
+ {
746
+ size: "4xl",
747
+ color: "red.500",
748
+ fontWeight: "bold",
749
+ children: title
750
+ }
751
+ ),
752
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Text, { fontSize: "lg", color: "gray.600", children: details }),
753
+ showCloseButton && onDestroy && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
754
+ import_react8.Button,
755
+ {
756
+ colorPalette: "blue",
757
+ size: "lg",
758
+ onClick: onDestroy,
759
+ children: closeButtonText
760
+ }
761
+ )
762
+ ] }) });
763
+ }
764
+
765
+ // src/components/loader-bar/LoaderBar.tsx
766
+ var import_react9 = require("react");
767
+ var import_core3 = require("@abpjs/core");
768
+ var import_jsx_runtime6 = require("react/jsx-runtime");
769
+ function LoaderBar({
770
+ containerClass = "abp-loader-bar",
771
+ progressClass = "abp-progress",
772
+ filter
773
+ }) {
774
+ const { loading } = (0, import_core3.useLoader)();
775
+ const [isLoading, setIsLoading] = (0, import_react9.useState)(false);
776
+ const [progressLevel, setProgressLevel] = (0, import_react9.useState)(0);
777
+ const intervalRef = (0, import_react9.useRef)(null);
778
+ (0, import_react9.useEffect)(() => {
779
+ if (loading) {
780
+ startLoading();
781
+ } else {
782
+ stopLoading();
783
+ }
784
+ }, [loading]);
785
+ (0, import_react9.useEffect)(() => {
786
+ return () => {
787
+ if (intervalRef.current) {
788
+ clearInterval(intervalRef.current);
789
+ }
790
+ };
791
+ }, []);
792
+ const startLoading = () => {
793
+ setIsLoading(true);
794
+ setProgressLevel(0);
795
+ if (intervalRef.current) {
796
+ clearInterval(intervalRef.current);
797
+ }
798
+ intervalRef.current = setInterval(() => {
799
+ setProgressLevel((prev) => {
800
+ if (prev >= 90) {
801
+ return prev + 0.5;
802
+ } else if (prev >= 75) {
803
+ return prev + 2;
804
+ } else if (prev >= 50) {
805
+ return prev + 5;
806
+ }
807
+ return prev + 10;
808
+ });
809
+ }, 300);
810
+ };
811
+ const stopLoading = () => {
812
+ setProgressLevel(100);
813
+ if (intervalRef.current) {
814
+ clearInterval(intervalRef.current);
815
+ intervalRef.current = null;
816
+ }
817
+ setTimeout(() => {
818
+ setIsLoading(false);
819
+ setProgressLevel(0);
820
+ }, 400);
821
+ };
822
+ if (!isLoading && progressLevel === 0) {
823
+ return null;
824
+ }
825
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
826
+ "div",
827
+ {
828
+ className: containerClass,
829
+ style: {
830
+ position: "fixed",
831
+ top: 0,
832
+ left: 0,
833
+ right: 0,
834
+ height: "3px",
835
+ zIndex: 9999,
836
+ backgroundColor: "rgba(0, 0, 0, 0.1)",
837
+ overflow: "hidden"
838
+ },
839
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
840
+ "div",
841
+ {
842
+ className: progressClass,
843
+ style: {
844
+ height: "100%",
845
+ backgroundColor: "#3182ce",
846
+ transition: "width 0.3s ease-out",
847
+ width: `${Math.min(progressLevel, 100)}%`
848
+ }
849
+ }
850
+ )
851
+ }
852
+ );
853
+ }
854
+
855
+ // src/components/modal/Modal.tsx
856
+ var import_react10 = __toESM(require("react"));
857
+ var import_react11 = require("@chakra-ui/react");
858
+ var import_jsx_runtime7 = require("react/jsx-runtime");
622
859
  function getSizeWidth(size) {
623
860
  switch (size) {
624
861
  case "sm":
@@ -638,9 +875,12 @@ function getSizeWidth(size) {
638
875
  function Modal({
639
876
  visible,
640
877
  onVisibleChange,
878
+ busy = false,
641
879
  size = "md",
642
880
  centered = true,
643
881
  modalClass,
882
+ height,
883
+ minHeight,
644
884
  header,
645
885
  children,
646
886
  footer,
@@ -650,44 +890,61 @@ function Modal({
650
890
  scrollBehavior = "inside",
651
891
  motionPreset = "scale",
652
892
  trapFocus = true,
653
- preventScroll = true
893
+ preventScroll = true,
894
+ onInit
654
895
  }) {
896
+ const prevVisibleRef = import_react10.default.useRef(false);
897
+ const onInitRef = import_react10.default.useRef(onInit);
898
+ import_react10.default.useEffect(() => {
899
+ onInitRef.current = onInit;
900
+ }, [onInit]);
901
+ import_react10.default.useEffect(() => {
902
+ if (visible && !prevVisibleRef.current && onInitRef.current) {
903
+ onInitRef.current();
904
+ }
905
+ prevVisibleRef.current = visible;
906
+ }, [visible]);
655
907
  const handleOpenChange = (details) => {
908
+ if (busy && !details.open) {
909
+ return;
910
+ }
656
911
  onVisibleChange?.(details.open);
657
912
  };
658
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
659
- import_react8.Dialog.Root,
913
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
914
+ import_react11.Dialog.Root,
660
915
  {
661
916
  open: visible,
662
917
  onOpenChange: handleOpenChange,
663
918
  placement: centered ? "center" : "top",
664
- closeOnInteractOutside: closeOnOverlayClick,
665
- closeOnEscape,
919
+ closeOnInteractOutside: closeOnOverlayClick && !busy,
920
+ closeOnEscape: closeOnEscape && !busy,
666
921
  scrollBehavior,
667
922
  motionPreset,
668
923
  trapFocus,
669
924
  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,
925
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react11.Portal, { children: [
926
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Backdrop, {}),
927
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
928
+ import_react11.Dialog.Content,
674
929
  {
675
930
  className: modalClass,
676
931
  width: getSizeWidth(size),
677
932
  maxWidth: size === "full" ? "100vw" : void 0,
678
933
  maxHeight: size === "full" ? "100vh" : void 0,
934
+ height,
935
+ minHeight,
679
936
  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" }) })
937
+ (header || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
938
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react11.Flex, { justify: "space-between", align: "center", width: "100%", children: [
939
+ header && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Text, { fontWeight: "bold", fontSize: "lg", children: header }) }),
940
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.CloseButton, { size: "sm" }) })
684
941
  ] }) }),
685
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Separator, {})
942
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Separator, {})
686
943
  ] }),
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 }) })
944
+ children && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Body, { py: 4, children }),
945
+ footer && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
946
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Separator, {}),
947
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Dialog.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Flex, { gap: 3, justify: "flex-end", w: "100%", children: footer }) })
691
948
  ] })
692
949
  ]
693
950
  }
@@ -697,18 +954,18 @@ function Modal({
697
954
  );
698
955
  }
699
956
  function AbpModalHeader({ children, className }) {
700
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Text, { fontWeight: "bold", fontSize: "lg", className, children });
957
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Text, { fontWeight: "bold", fontSize: "lg", className, children });
701
958
  }
702
959
  function AbpModalBody({ children, className }) {
703
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Box, { color: "gray.600", className, children });
960
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Box, { color: "gray.600", className, children });
704
961
  }
705
962
  function AbpModalFooter({ children, className }) {
706
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react8.Flex, { gap: 3, justify: "flex-end", className, children });
963
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react11.Flex, { gap: 3, justify: "flex-end", className, children });
707
964
  }
708
965
 
709
966
  // src/components/ui/Alert.tsx
710
- var import_react9 = require("@chakra-ui/react");
711
- var import_jsx_runtime6 = require("react/jsx-runtime");
967
+ var import_react12 = require("@chakra-ui/react");
968
+ var import_jsx_runtime8 = require("react/jsx-runtime");
712
969
  function Alert({
713
970
  status = "info",
714
971
  children,
@@ -719,30 +976,30 @@ function Alert({
719
976
  mb,
720
977
  borderRadius = "md"
721
978
  }) {
722
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
723
- import_react9.Alert.Root,
979
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
980
+ import_react12.Alert.Root,
724
981
  {
725
982
  status,
726
983
  className,
727
984
  mb,
728
985
  borderRadius,
729
986
  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 })
987
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react12.Alert.Indicator, {}),
988
+ title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
989
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react12.Alert.Title, { children: title }),
990
+ (description || children) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react12.Alert.Description, { children: description || children })
991
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react12.Alert.Title, { children })
735
992
  ]
736
993
  }
737
994
  );
738
995
  }
739
996
 
740
997
  // 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({
998
+ var import_react13 = require("react");
999
+ var import_react14 = require("@chakra-ui/react");
1000
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1001
+ var Button3 = (0, import_react13.forwardRef)(
1002
+ function Button4({
746
1003
  children,
747
1004
  type = "button",
748
1005
  variant = "solid",
@@ -757,8 +1014,8 @@ var Button2 = (0, import_react10.forwardRef)(
757
1014
  mr,
758
1015
  ml
759
1016
  }, ref) {
760
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
761
- import_react11.Button,
1017
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1018
+ import_react14.Button,
762
1019
  {
763
1020
  ref,
764
1021
  type,
@@ -780,10 +1037,10 @@ var Button2 = (0, import_react10.forwardRef)(
780
1037
  );
781
1038
 
782
1039
  // 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)(
1040
+ var import_react15 = require("react");
1041
+ var import_react16 = require("@chakra-ui/react");
1042
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1043
+ var Checkbox = (0, import_react15.forwardRef)(
787
1044
  function Checkbox2({
788
1045
  children,
789
1046
  checked,
@@ -800,8 +1057,8 @@ var Checkbox = (0, import_react12.forwardRef)(
800
1057
  onChange,
801
1058
  className
802
1059
  }, ref) {
803
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
804
- import_react13.Checkbox.Root,
1060
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1061
+ import_react16.Checkbox.Root,
805
1062
  {
806
1063
  checked,
807
1064
  defaultChecked,
@@ -813,8 +1070,8 @@ var Checkbox = (0, import_react12.forwardRef)(
813
1070
  size,
814
1071
  className,
815
1072
  children: [
816
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
817
- import_react13.Checkbox.HiddenInput,
1073
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1074
+ import_react16.Checkbox.HiddenInput,
818
1075
  {
819
1076
  ref,
820
1077
  id,
@@ -823,8 +1080,8 @@ var Checkbox = (0, import_react12.forwardRef)(
823
1080
  onChange
824
1081
  }
825
1082
  ),
826
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Checkbox.Control, {}),
827
- children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Checkbox.Label, { children })
1083
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react16.Checkbox.Control, {}),
1084
+ children && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react16.Checkbox.Label, { children })
828
1085
  ]
829
1086
  }
830
1087
  );
@@ -832,8 +1089,8 @@ var Checkbox = (0, import_react12.forwardRef)(
832
1089
  );
833
1090
 
834
1091
  // src/components/ui/FormField.tsx
835
- var import_react14 = require("@chakra-ui/react");
836
- var import_jsx_runtime9 = require("react/jsx-runtime");
1092
+ var import_react17 = require("@chakra-ui/react");
1093
+ var import_jsx_runtime11 = require("react/jsx-runtime");
837
1094
  function FormField({
838
1095
  label,
839
1096
  invalid = false,
@@ -845,22 +1102,361 @@ function FormField({
845
1102
  htmlFor,
846
1103
  className
847
1104
  }) {
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: [
1105
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react17.Field.Root, { invalid, disabled, className, children: [
1106
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react17.Field.Label, { htmlFor, children: [
850
1107
  label,
851
- required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react14.Field.RequiredIndicator, {})
1108
+ required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.Field.RequiredIndicator, {})
852
1109
  ] }),
853
1110
  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 })
1111
+ helperText && !invalid && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.Field.HelperText, { children: helperText }),
1112
+ invalid && errorText && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react17.Field.ErrorText, { children: errorText })
856
1113
  ] });
857
1114
  }
858
1115
 
1116
+ // src/components/change-password/ChangePassword.tsx
1117
+ var import_react18 = require("react");
1118
+ var import_react19 = require("@chakra-ui/react");
1119
+ var import_react_hook_form = require("react-hook-form");
1120
+ var import_core4 = require("@abpjs/core");
1121
+ var import_lucide_react3 = require("lucide-react");
1122
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1123
+ function ChangePassword({
1124
+ visible,
1125
+ onVisibleChange
1126
+ }) {
1127
+ const { t } = (0, import_core4.useLocalization)();
1128
+ const { changePassword } = (0, import_core4.useProfile)();
1129
+ const toaster = useToaster();
1130
+ const {
1131
+ register,
1132
+ handleSubmit,
1133
+ watch,
1134
+ reset,
1135
+ formState: { errors, isSubmitting }
1136
+ } = (0, import_react_hook_form.useForm)({
1137
+ defaultValues: {
1138
+ password: "",
1139
+ newPassword: "",
1140
+ repeatNewPassword: ""
1141
+ }
1142
+ });
1143
+ const newPassword = watch("newPassword");
1144
+ (0, import_react18.useEffect)(() => {
1145
+ if (visible) {
1146
+ reset();
1147
+ }
1148
+ }, [visible, reset]);
1149
+ const onSubmit = async (data) => {
1150
+ try {
1151
+ await changePassword({
1152
+ currentPassword: data.password,
1153
+ newPassword: data.newPassword
1154
+ });
1155
+ toaster.success(
1156
+ t("AbpIdentity::PasswordChangedMessage") || "Password changed successfully",
1157
+ t("AbpUi::Success") || "Success"
1158
+ );
1159
+ onVisibleChange(false);
1160
+ } catch (error) {
1161
+ toaster.error(
1162
+ error instanceof Error ? error.message : "An error occurred",
1163
+ t("AbpIdentity::PasswordChangeFailed") || "Failed to change password"
1164
+ );
1165
+ }
1166
+ };
1167
+ const handleClose = () => {
1168
+ if (!isSubmitting) {
1169
+ onVisibleChange(false);
1170
+ }
1171
+ };
1172
+ const passwordValidation = {
1173
+ required: t("AbpIdentity::ThisFieldIsRequired") || "This field is required",
1174
+ minLength: {
1175
+ value: 6,
1176
+ message: t("AbpIdentity::PasswordTooShort") || "Password must be at least 6 characters"
1177
+ },
1178
+ validate: {
1179
+ hasLowercase: (value) => /[a-z]/.test(value) || t("AbpIdentity::PasswordRequiresLower") || "Password must contain a lowercase letter",
1180
+ hasUppercase: (value) => /[A-Z]/.test(value) || t("AbpIdentity::PasswordRequiresUpper") || "Password must contain an uppercase letter",
1181
+ hasNumber: (value) => /[0-9]/.test(value) || t("AbpIdentity::PasswordRequiresDigit") || "Password must contain a number",
1182
+ hasSpecial: (value) => /[!@#$%^&*(),.?":{}|<>]/.test(value) || t("AbpIdentity::PasswordRequiresNonAlphanumeric") || "Password must contain a special character"
1183
+ }
1184
+ };
1185
+ const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1186
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: isSubmitting, children: t("AbpIdentity::Cancel") || "Cancel" }),
1187
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1188
+ import_react19.Button,
1189
+ {
1190
+ colorPalette: "blue",
1191
+ type: "submit",
1192
+ loading: isSubmitting,
1193
+ form: "change-password-form",
1194
+ children: [
1195
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react3.Check, { size: 16 }),
1196
+ t("AbpIdentity::Save") || "Save"
1197
+ ]
1198
+ }
1199
+ )
1200
+ ] });
1201
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1202
+ Modal,
1203
+ {
1204
+ visible,
1205
+ onVisibleChange,
1206
+ busy: isSubmitting,
1207
+ header: t("AbpIdentity::ChangePassword") || "Change Password",
1208
+ footer: modalFooter,
1209
+ centered: true,
1210
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("form", { id: "change-password-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.VStack, { gap: 4, children: [
1211
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Root, { invalid: !!errors.password, children: [
1212
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Label, { children: [
1213
+ t("AbpIdentity::DisplayName:CurrentPassword") || "Current Password",
1214
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.RequiredIndicator, {})
1215
+ ] }),
1216
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1217
+ import_react19.Input,
1218
+ {
1219
+ type: "password",
1220
+ ...register("password", {
1221
+ required: t("AbpIdentity::ThisFieldIsRequired") || "This field is required"
1222
+ })
1223
+ }
1224
+ ),
1225
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.ErrorText, { children: errors.password?.message })
1226
+ ] }),
1227
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Root, { invalid: !!errors.newPassword, children: [
1228
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Label, { children: [
1229
+ t("AbpIdentity::DisplayName:NewPassword") || "New Password",
1230
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.RequiredIndicator, {})
1231
+ ] }),
1232
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1233
+ import_react19.Input,
1234
+ {
1235
+ type: "password",
1236
+ ...register("newPassword", passwordValidation)
1237
+ }
1238
+ ),
1239
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.ErrorText, { children: errors.newPassword?.message })
1240
+ ] }),
1241
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Root, { invalid: !!errors.repeatNewPassword, children: [
1242
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react19.Field.Label, { children: [
1243
+ t("AbpIdentity::DisplayName:NewPasswordConfirm") || "Confirm New Password",
1244
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.RequiredIndicator, {})
1245
+ ] }),
1246
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1247
+ import_react19.Input,
1248
+ {
1249
+ type: "password",
1250
+ ...register("repeatNewPassword", {
1251
+ required: t("AbpIdentity::ThisFieldIsRequired") || "This field is required",
1252
+ validate: (value) => value === newPassword || t("AbpIdentity::Identity.PasswordConfirmationFailed") || "Passwords do not match"
1253
+ })
1254
+ }
1255
+ ),
1256
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react19.Field.ErrorText, { children: errors.repeatNewPassword?.message })
1257
+ ] })
1258
+ ] }) })
1259
+ }
1260
+ );
1261
+ }
1262
+
1263
+ // src/components/profile/Profile.tsx
1264
+ var import_react20 = require("react");
1265
+ var import_react21 = require("@chakra-ui/react");
1266
+ var import_react_hook_form2 = require("react-hook-form");
1267
+ var import_core5 = require("@abpjs/core");
1268
+ var import_lucide_react4 = require("lucide-react");
1269
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1270
+ function Profile({
1271
+ visible,
1272
+ onVisibleChange
1273
+ }) {
1274
+ const { t } = (0, import_core5.useLocalization)();
1275
+ const { profile, fetchProfile, updateProfile, loading } = (0, import_core5.useProfile)();
1276
+ const toaster = useToaster();
1277
+ const {
1278
+ register,
1279
+ handleSubmit,
1280
+ reset,
1281
+ formState: { errors, isSubmitting }
1282
+ } = (0, import_react_hook_form2.useForm)({
1283
+ defaultValues: {
1284
+ userName: "",
1285
+ email: "",
1286
+ name: "",
1287
+ surname: "",
1288
+ phoneNumber: ""
1289
+ }
1290
+ });
1291
+ const modalBusy = isSubmitting || loading;
1292
+ (0, import_react20.useEffect)(() => {
1293
+ if (visible) {
1294
+ fetchProfile().then(() => {
1295
+ });
1296
+ }
1297
+ }, [visible, fetchProfile]);
1298
+ (0, import_react20.useEffect)(() => {
1299
+ if (profile) {
1300
+ reset({
1301
+ userName: profile.userName || "",
1302
+ email: profile.email || "",
1303
+ name: profile.name || "",
1304
+ surname: profile.surname || "",
1305
+ phoneNumber: profile.phoneNumber || ""
1306
+ });
1307
+ }
1308
+ }, [profile, reset]);
1309
+ const onSubmit = async (data) => {
1310
+ try {
1311
+ await updateProfile(data);
1312
+ toaster.success(
1313
+ t("AbpIdentity::ProfileUpdatedMessage") || "Profile updated successfully",
1314
+ t("AbpUi::Success") || "Success"
1315
+ );
1316
+ onVisibleChange(false);
1317
+ } catch (error) {
1318
+ toaster.error(
1319
+ error instanceof Error ? error.message : "An error occurred",
1320
+ t("AbpIdentity::ProfileUpdateFailed") || "Failed to update profile"
1321
+ );
1322
+ }
1323
+ };
1324
+ const handleClose = () => {
1325
+ if (!modalBusy) {
1326
+ onVisibleChange(false);
1327
+ }
1328
+ };
1329
+ const modalFooter = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1330
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Button, { variant: "ghost", mr: 3, onClick: handleClose, disabled: modalBusy, children: t("AbpIdentity::Cancel") || "Cancel" }),
1331
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1332
+ import_react21.Button,
1333
+ {
1334
+ colorPalette: "blue",
1335
+ type: "submit",
1336
+ loading: modalBusy,
1337
+ form: "profile-form",
1338
+ children: [
1339
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.Check, { size: 16 }),
1340
+ t("AbpIdentity::Save") || "Save"
1341
+ ]
1342
+ }
1343
+ )
1344
+ ] });
1345
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1346
+ Modal,
1347
+ {
1348
+ visible,
1349
+ onVisibleChange,
1350
+ busy: modalBusy,
1351
+ header: t("AbpIdentity::PersonalInfo") || "Personal Info",
1352
+ footer: modalFooter,
1353
+ size: "lg",
1354
+ centered: true,
1355
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("form", { id: "profile-form", onSubmit: handleSubmit(onSubmit), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.VStack, { gap: 4, children: [
1356
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Root, { invalid: !!errors.userName, children: [
1357
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Label, { children: [
1358
+ t("AbpIdentity::DisplayName:UserName") || "Username",
1359
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.RequiredIndicator, {})
1360
+ ] }),
1361
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1362
+ import_react21.Input,
1363
+ {
1364
+ type: "text",
1365
+ ...register("userName", {
1366
+ required: t("AbpIdentity::ThisFieldIsRequired") || "This field is required",
1367
+ maxLength: {
1368
+ value: 256,
1369
+ message: "Maximum 256 characters"
1370
+ }
1371
+ })
1372
+ }
1373
+ ),
1374
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.ErrorText, { children: errors.userName?.message })
1375
+ ] }),
1376
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.HStack, { gap: 4, w: "full", children: [
1377
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Root, { invalid: !!errors.name, flex: 1, children: [
1378
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.Label, { children: t("AbpIdentity::DisplayName:Name") || "Name" }),
1379
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1380
+ import_react21.Input,
1381
+ {
1382
+ type: "text",
1383
+ ...register("name", {
1384
+ maxLength: {
1385
+ value: 64,
1386
+ message: "Maximum 64 characters"
1387
+ }
1388
+ })
1389
+ }
1390
+ ),
1391
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.ErrorText, { children: errors.name?.message })
1392
+ ] }),
1393
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Root, { invalid: !!errors.surname, flex: 1, children: [
1394
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.Label, { children: t("AbpIdentity::DisplayName:Surname") || "Surname" }),
1395
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1396
+ import_react21.Input,
1397
+ {
1398
+ type: "text",
1399
+ ...register("surname", {
1400
+ maxLength: {
1401
+ value: 64,
1402
+ message: "Maximum 64 characters"
1403
+ }
1404
+ })
1405
+ }
1406
+ ),
1407
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.ErrorText, { children: errors.surname?.message })
1408
+ ] })
1409
+ ] }),
1410
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Root, { invalid: !!errors.email, children: [
1411
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Label, { children: [
1412
+ t("AbpIdentity::DisplayName:EmailAddress") || "Email Address",
1413
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.RequiredIndicator, {})
1414
+ ] }),
1415
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1416
+ import_react21.Input,
1417
+ {
1418
+ type: "email",
1419
+ ...register("email", {
1420
+ required: t("AbpIdentity::ThisFieldIsRequired") || "This field is required",
1421
+ pattern: {
1422
+ value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
1423
+ message: t("AbpIdentity::InvalidEmail") || "Invalid email address"
1424
+ },
1425
+ maxLength: {
1426
+ value: 256,
1427
+ message: "Maximum 256 characters"
1428
+ }
1429
+ })
1430
+ }
1431
+ ),
1432
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.ErrorText, { children: errors.email?.message })
1433
+ ] }),
1434
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Field.Root, { invalid: !!errors.phoneNumber, children: [
1435
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.Label, { children: t("AbpIdentity::DisplayName:PhoneNumber") || "Phone Number" }),
1436
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1437
+ import_react21.Input,
1438
+ {
1439
+ type: "tel",
1440
+ ...register("phoneNumber", {
1441
+ maxLength: {
1442
+ value: 16,
1443
+ message: "Maximum 16 characters"
1444
+ }
1445
+ })
1446
+ }
1447
+ ),
1448
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react21.Field.ErrorText, { children: errors.phoneNumber?.message })
1449
+ ] })
1450
+ ] }) })
1451
+ }
1452
+ );
1453
+ }
1454
+
859
1455
  // src/providers/ThemeSharedProvider.tsx
860
- var import_react17 = require("@chakra-ui/react");
1456
+ var import_react24 = require("@chakra-ui/react");
861
1457
 
862
1458
  // src/theme/index.ts
863
- var import_react15 = require("@chakra-ui/react");
1459
+ var import_react22 = require("@chakra-ui/react");
864
1460
  var colors = {
865
1461
  brand: {
866
1462
  50: { value: "#e3f2fd" },
@@ -1063,7 +1659,7 @@ var semanticTokens = {
1063
1659
  // },
1064
1660
  // },
1065
1661
  };
1066
- var defaultAbpConfig = (0, import_react15.defineConfig)({
1662
+ var defaultAbpConfig = (0, import_react22.defineConfig)({
1067
1663
  theme: {
1068
1664
  tokens: {
1069
1665
  colors,
@@ -1085,20 +1681,20 @@ var defaultAbpConfig = (0, import_react15.defineConfig)({
1085
1681
  });
1086
1682
  function createAbpSystem(overrides) {
1087
1683
  if (overrides) {
1088
- return (0, import_react15.createSystem)(import_react15.defaultConfig, defaultAbpConfig, overrides);
1684
+ return (0, import_react22.createSystem)(import_react22.defaultConfig, defaultAbpConfig, overrides);
1089
1685
  }
1090
- return (0, import_react15.createSystem)(import_react15.defaultConfig, defaultAbpConfig);
1686
+ return (0, import_react22.createSystem)(import_react22.defaultConfig, defaultAbpConfig);
1091
1687
  }
1092
1688
  var abpSystem = createAbpSystem();
1093
1689
 
1094
1690
  // src/components/ui/color-mode.tsx
1095
- var import_react16 = require("@chakra-ui/react");
1691
+ var import_react23 = require("@chakra-ui/react");
1096
1692
  var import_next_themes = require("next-themes");
1097
- var React7 = __toESM(require("react"));
1098
- var import_lucide_react3 = require("lucide-react");
1099
- var import_jsx_runtime10 = require("react/jsx-runtime");
1693
+ var React11 = __toESM(require("react"));
1694
+ var import_lucide_react5 = require("lucide-react");
1695
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1100
1696
  function ColorModeProvider(props) {
1101
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
1697
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_next_themes.ThemeProvider, { attribute: "class", disableTransitionOnChange: true, ...props });
1102
1698
  }
1103
1699
  function useColorMode() {
1104
1700
  const { resolvedTheme, setTheme, forcedTheme } = (0, import_next_themes.useTheme)();
@@ -1114,12 +1710,12 @@ function useColorMode() {
1114
1710
  }
1115
1711
  function ColorModeIcon() {
1116
1712
  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, {});
1713
+ return colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Moon, {}) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Sun, {});
1118
1714
  }
1119
- var ColorModeButton = React7.forwardRef(function ColorModeButton2(props, ref) {
1715
+ var ColorModeButton = React11.forwardRef(function ColorModeButton2(props, ref) {
1120
1716
  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,
1717
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react23.ClientOnly, { fallback: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react23.Skeleton, { boxSize: "9" }), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1718
+ import_react23.IconButton,
1123
1719
  {
1124
1720
  onClick: toggleColorMode,
1125
1721
  variant: "ghost",
@@ -1133,14 +1729,14 @@ var ColorModeButton = React7.forwardRef(function ColorModeButton2(props, ref) {
1133
1729
  height: "5"
1134
1730
  }
1135
1731
  },
1136
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ColorModeIcon, {})
1732
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ColorModeIcon, {})
1137
1733
  }
1138
1734
  ) });
1139
1735
  });
1140
- var LightMode = React7.forwardRef(
1736
+ var LightMode = React11.forwardRef(
1141
1737
  function LightMode2(props, ref) {
1142
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1143
- import_react16.Span,
1738
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1739
+ import_react23.Span,
1144
1740
  {
1145
1741
  color: "fg",
1146
1742
  display: "contents",
@@ -1153,10 +1749,10 @@ var LightMode = React7.forwardRef(
1153
1749
  );
1154
1750
  }
1155
1751
  );
1156
- var DarkMode = React7.forwardRef(
1752
+ var DarkMode = React11.forwardRef(
1157
1753
  function DarkMode2(props, ref) {
1158
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1159
- import_react16.Span,
1754
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1755
+ import_react23.Span,
1160
1756
  {
1161
1757
  color: "fg",
1162
1758
  display: "contents",
@@ -1171,8 +1767,8 @@ var DarkMode = React7.forwardRef(
1171
1767
  );
1172
1768
 
1173
1769
  // src/providers/ThemeSharedProvider.tsx
1174
- var import_core3 = require("@abpjs/core");
1175
- var import_jsx_runtime11 = require("react/jsx-runtime");
1770
+ var import_core6 = require("@abpjs/core");
1771
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1176
1772
  function ThemeSharedProvider({
1177
1773
  children,
1178
1774
  renderToasts = true,
@@ -1184,15 +1780,15 @@ function ThemeSharedProvider({
1184
1780
  locale = "en-US"
1185
1781
  }) {
1186
1782
  const system = themeOverrides ? createAbpSystem(themeOverrides) : abpSystem;
1187
- const { endSide } = (0, import_core3.useDirection)();
1783
+ const { endSide } = (0, import_core6.useDirection)();
1188
1784
  toastPosition = `bottom-${endSide}`;
1189
- const content = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(ConfirmationProvider, { children: [
1785
+ const content = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToasterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ConfirmationProvider, { children: [
1190
1786
  children,
1191
- renderToasts && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToastContainer, { position: toastPosition }),
1192
- renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ConfirmationDialog, {})
1787
+ renderToasts && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ToastContainer, { position: toastPosition }),
1788
+ renderConfirmation && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ConfirmationDialog, {})
1193
1789
  ] }) });
1194
1790
  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 }) }) });
1791
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react24.ChakraProvider, { value: system, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react24.LocaleProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ColorModeProvider, { ...colorModeProps, children: content }) }) });
1196
1792
  }
1197
1793
 
1198
1794
  // src/utils/styles.ts
@@ -1273,14 +1869,19 @@ function injectThemeSharedStyles() {
1273
1869
  Alert,
1274
1870
  Button,
1275
1871
  ChakraDialog,
1872
+ ChangePassword,
1276
1873
  Checkbox,
1277
1874
  ConfirmationDialog,
1278
1875
  ConfirmationProvider,
1876
+ DEFAULT_STYLES,
1877
+ ErrorComponent,
1279
1878
  FormField,
1879
+ LoaderBar,
1280
1880
  Modal,
1281
1881
  ModalBody,
1282
1882
  ModalFooter,
1283
1883
  ModalHeader,
1884
+ Profile,
1284
1885
  THEME_SHARED_STYLES,
1285
1886
  ThemeSharedProvider,
1286
1887
  ToastContainer,