@abpjs/theme-shared 0.8.0 → 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/components/change-password/ChangePassword.d.ts +26 -0
- package/dist/components/change-password/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/modal/Modal.d.ts +9 -1
- package/dist/components/profile/Profile.d.ts +28 -0
- package/dist/components/profile/index.d.ts +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +436 -72
- package/dist/index.mjs +392 -19
- package/dist/models/index.d.ts +2 -0
- package/dist/models/setting-management.d.ts +17 -0
- package/dist/models/statistics.d.ts +25 -0
- package/package.json +4 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChangePasswordProps {
|
|
3
|
+
/** Whether the modal is visible */
|
|
4
|
+
visible: boolean;
|
|
5
|
+
/** Callback when visibility changes */
|
|
6
|
+
onVisibleChange: (visible: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Change password modal component.
|
|
10
|
+
* Translated from Angular ChangePasswordComponent (moved from theme-basic in v0.9.0).
|
|
11
|
+
*
|
|
12
|
+
* Provides a modal dialog for changing the user's password with:
|
|
13
|
+
* - Current password input
|
|
14
|
+
* - New password input with validation
|
|
15
|
+
* - Confirm new password with match validation
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <ChangePassword
|
|
20
|
+
* visible={isOpen}
|
|
21
|
+
* onVisibleChange={setIsOpen}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function ChangePassword({ visible, onVisibleChange, }: ChangePasswordProps): React.ReactElement;
|
|
26
|
+
export default ChangePassword;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ChangePassword';
|
|
@@ -9,12 +9,18 @@ export interface ModalProps {
|
|
|
9
9
|
visible: boolean;
|
|
10
10
|
/** Callback when visibility changes */
|
|
11
11
|
onVisibleChange?: (visible: boolean) => void;
|
|
12
|
+
/** Whether the modal is in a busy/loading state (v0.9.0) */
|
|
13
|
+
busy?: boolean;
|
|
12
14
|
/** Modal size */
|
|
13
15
|
size?: ModalSize;
|
|
14
16
|
/** Center the modal vertically */
|
|
15
17
|
centered?: boolean;
|
|
16
18
|
/** Custom CSS class for the modal container */
|
|
17
19
|
modalClass?: string;
|
|
20
|
+
/** Fixed height for the modal (v0.9.0) */
|
|
21
|
+
height?: number | string;
|
|
22
|
+
/** Minimum height for the modal (v0.9.0) */
|
|
23
|
+
minHeight?: number | string;
|
|
18
24
|
/** Header content */
|
|
19
25
|
header?: ReactNode;
|
|
20
26
|
/** Body content (children) */
|
|
@@ -31,6 +37,8 @@ export interface ModalProps {
|
|
|
31
37
|
closeOnEscape?: boolean;
|
|
32
38
|
/** Whether to scroll the modal body if content overflows */
|
|
33
39
|
scrollBehavior?: 'inside' | 'outside';
|
|
40
|
+
/** Callback when modal is initialized/opened (v0.9.0) */
|
|
41
|
+
onInit?: () => void;
|
|
34
42
|
/**
|
|
35
43
|
* Motion preset for modal animation.
|
|
36
44
|
* @default 'scale'
|
|
@@ -78,7 +86,7 @@ export interface ModalProps {
|
|
|
78
86
|
* }
|
|
79
87
|
* ```
|
|
80
88
|
*/
|
|
81
|
-
export declare function Modal({ visible, onVisibleChange, size, centered, modalClass, header, children, footer, showCloseButton, closeOnOverlayClick, closeOnEscape, scrollBehavior, motionPreset, trapFocus, preventScroll, }: ModalProps): React.ReactElement;
|
|
89
|
+
export declare function Modal({ visible, onVisibleChange, busy, size, centered, modalClass, height, minHeight, header, children, footer, showCloseButton, closeOnOverlayClick, closeOnEscape, scrollBehavior, motionPreset, trapFocus, preventScroll, onInit, }: ModalProps): React.ReactElement;
|
|
82
90
|
/**
|
|
83
91
|
* Re-export Chakra v3 dialog parts for convenience.
|
|
84
92
|
* Users can use these for more custom modal layouts.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ProfileProps {
|
|
3
|
+
/** Whether the modal is visible */
|
|
4
|
+
visible: boolean;
|
|
5
|
+
/** Callback when visibility changes */
|
|
6
|
+
onVisibleChange: (visible: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Profile modal component for editing user profile.
|
|
10
|
+
* Translated from Angular ProfileComponent (moved from theme-basic in v0.9.0).
|
|
11
|
+
*
|
|
12
|
+
* Provides a modal dialog for editing user profile with:
|
|
13
|
+
* - Username (required)
|
|
14
|
+
* - Email (required)
|
|
15
|
+
* - Name
|
|
16
|
+
* - Surname
|
|
17
|
+
* - Phone number
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Profile
|
|
22
|
+
* visible={isOpen}
|
|
23
|
+
* onVisibleChange={setIsOpen}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function Profile({ visible, onVisibleChange, }: ProfileProps): React.ReactElement;
|
|
28
|
+
export default Profile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Profile';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
* @abpjs/theme-shared
|
|
3
3
|
*
|
|
4
4
|
* ABP Framework Theme Shared components for React.
|
|
5
|
-
* Translated from @abp/ng.theme.shared v0.
|
|
5
|
+
* Translated from @abp/ng.theme.shared v0.9.0
|
|
6
6
|
*
|
|
7
7
|
* This package provides shared UI components, services, and utilities
|
|
8
8
|
* for theme/modal management in ABP Framework React applications.
|
|
9
|
+
*
|
|
10
|
+
* New in v0.9.0:
|
|
11
|
+
* - ChangePassword component (moved from theme-basic)
|
|
12
|
+
* - Profile component (moved from theme-basic)
|
|
13
|
+
* - Modal busy prop for preventing close during operations
|
|
14
|
+
* - Modal height/minHeight props
|
|
15
|
+
* - Modal onInit callback
|
|
9
16
|
*/
|
|
10
17
|
export * from './models';
|
|
11
18
|
export * from './constants';
|