@ukpc-lib/react 0.1.18 → 0.1.20

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 (60) hide show
  1. package/README.md +114 -114
  2. package/package.json +100 -100
  3. package/dist/components/GlobalMenu/components/Dropdown.d.ts +0 -8
  4. package/dist/components/GlobalMenu/components/MenuItem.d.ts +0 -15
  5. package/dist/components/GlobalMenu/helpers/index.d.ts +0 -0
  6. package/dist/components/GlobalMenu/icons/IconCollapsed.d.ts +0 -2
  7. package/dist/components/GlobalMenu/icons/IconDown.d.ts +0 -3
  8. package/dist/components/GlobalMenu/icons/IconExpand.d.ts +0 -2
  9. package/dist/components/GlobalMenu/icons/IconLogout.d.ts +0 -2
  10. package/dist/components/GlobalMenu/index.d.ts +0 -7
  11. package/dist/components/GlobalMenu/models/MenuItemDto.d.ts +0 -8
  12. package/dist/components/GlobalMenu/models/index.d.ts +0 -1
  13. package/dist/components/LanguageSwitcher/index.d.ts +0 -1
  14. package/dist/components/LogoutConfirmModal/index.d.ts +0 -7
  15. package/dist/components/NoData/index.d.ts +0 -2
  16. package/dist/components/NotFoundPage/index.d.ts +0 -4
  17. package/dist/components/PopUp/index.d.ts +0 -8
  18. package/dist/components/PopUp/types.d.ts +0 -26
  19. package/dist/components/ShadownDom/index.d.ts +0 -8
  20. package/dist/components/StyledAutocomplete/AutocompleteOption.d.ts +0 -11
  21. package/dist/components/StyledAutocomplete/StyledAutocomplete.d.ts +0 -29
  22. package/dist/components/StyledAutocomplete/helpers.d.ts +0 -1
  23. package/dist/components/StyledAutocomplete/index.d.ts +0 -3
  24. package/dist/components/StyledAutocomplete/types.d.ts +0 -46
  25. package/dist/components/StyledAutocomplete/useStyledAutocomplete.d.ts +0 -28
  26. package/dist/components/StyledDateRangePicker/BlockIcon.d.ts +0 -4
  27. package/dist/components/StyledDateRangePicker/index.d.ts +0 -13
  28. package/dist/components/Toast/ToastConfig.d.ts +0 -2
  29. package/dist/components/Toast/icons/ErrorIcon.d.ts +0 -1
  30. package/dist/components/Toast/icons/SuccessIcon.d.ts +0 -1
  31. package/dist/components/Toast/icons/WarningIcon.d.ts +0 -1
  32. package/dist/components/Toast/index.d.ts +0 -5
  33. package/dist/components/Topbar/icons/MessageIcon.d.ts +0 -4
  34. package/dist/components/Topbar/icons/NotificationIcon.d.ts +0 -3
  35. package/dist/components/Topbar/index.d.ts +0 -29
  36. package/dist/components/UnauthorizedPage/index.d.ts +0 -1
  37. package/dist/components/index.cjs +0 -65
  38. package/dist/components/index.d.ts +0 -9
  39. package/dist/components/index.js +0 -10045
  40. package/dist/index.css +0 -1
  41. package/dist/index.es-02587e7d.js +0 -19565
  42. package/dist/index.es-0621a3fe.cjs +0 -173
  43. package/dist/share/AuthProvider/index.d.ts +0 -20
  44. package/dist/share/helpers/index.d.ts +0 -1
  45. package/dist/share/hooks/index.d.ts +0 -1
  46. package/dist/share/hooks/useGetPermission.d.ts +0 -1
  47. package/dist/share/index.cjs +0 -1
  48. package/dist/share/index.d.ts +0 -5
  49. package/dist/share/index.js +0 -78
  50. package/dist/share/interceptor/index.d.ts +0 -7
  51. package/dist/share/interceptor/interceptor.const.d.ts +0 -6
  52. package/dist/share/permissions/HasPermission.d.ts +0 -9
  53. package/dist/share/permissions/PermissionRoute.d.ts +0 -9
  54. package/dist/share/permissions/index.d.ts +0 -2
  55. package/web-components-bundle/global-menu/index.cjs +0 -91
  56. package/web-components-bundle/global-menu/index.js +0 -18099
  57. package/web-components-bundle/global-topbar/index.cjs +0 -3
  58. package/web-components-bundle/global-topbar/index.js +0 -228
  59. package/web-components-bundle/index-3a3447c8.cjs +0 -69
  60. package/web-components-bundle/index-688657b9.js +0 -9352
package/README.md CHANGED
@@ -1,114 +1,114 @@
1
- # @ukpc-lib/react
2
-
3
- @ukpc-lib is a comprehensive npm library designed to provide a suite of reusable components, themes, colors, hooks, and auth providers for UKPC applications. It aims to streamline development and ensure consistency across different projects.
4
-
5
- ## Installation
6
-
7
- ### React
8
-
9
- To install package, use the following command:
10
-
11
- ```bash
12
- npm install @ukpc-lib/react
13
- ```
14
-
15
- ### .NET
16
-
17
- With .NET applications, you can import the script and use it as follows:
18
-
19
- Topbar:
20
- https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-topbar/index.js
21
-
22
- Global Menu:
23
- https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-menu/index.js
24
-
25
- ## Usage
26
-
27
- **To ensure the correct display, you should use the layout as shown below:**
28
-
29
- ### React
30
-
31
- After installation, you can start using components by importing it into your project. Here's an example of how to use Global Menu:
32
-
33
- ```js
34
- import { GlobalMenu } from '@ukpc-lib/react/components';
35
- import { useAuth } from '@ukpc-lib/react/share';
36
- import { Outlet } from 'react-router-dom';
37
- import TopBar from './TopBar';
38
-
39
- export default function PrivateLayout() {
40
- const { logout } = useAuth();
41
-
42
- return (
43
- <div style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
44
- <div style={{ height: '64px' }}>
45
- <TopBar />
46
- </div>
47
- <div
48
- style={{
49
- display: 'flex',
50
- flexDirection: 'row',
51
- flex: 1,
52
- overflow: 'hidden',
53
- }}
54
- >
55
- <GlobalMenu
56
- baseUrl="https://saas.dev-intelli-park.com"
57
- menuPath="/global-menu-config/api/v1/menu-items/user"
58
- logout={logout}
59
- />
60
- <div style={{ flex: 1, padding: '40px', overflow: 'auto' }}>
61
- <Outlet />
62
- </div>
63
- </div>
64
- </div>
65
- );
66
- }
67
- ```
68
-
69
- ### .NET
70
-
71
- ```js
72
- <div style="display: flex; flex-direction: column; height: 100vh;">
73
- <div style="height: 64px;">
74
- <global-topbar
75
- base-url="@baseurl"
76
- user="@userJson"
77
- logo="logoURL"
78
- ></global-topbar>
79
- </div>
80
- <div style="display: flex; flex-direction: row; flex: 1; overflow: hidden;">
81
- <global-menu
82
- menu-path="/global-menu-config/api/v1/menu-items/user"
83
- base-url="@baseurl"
84
- logout="logout"
85
- ></global-menu>
86
- <div style="flex: 1; padding: 40px; overflow: auto;">
87
- <Outlet />
88
- </div>
89
- </div>
90
- </div>
91
- ```
92
-
93
- ## API
94
-
95
- #### Global menu:
96
-
97
- - `baseUrl`: This is the root path where the global menu resources are located.
98
- - `menuPath`: This is appended to the `baseUrl` to form the full URL to the menu resource.
99
- - `logout()`: A method that logs out the current user. When called, it will clear the user's session and redirect them to the login page.
100
-
101
- #### Topbar:
102
-
103
- - `baseUrl`: This is the root path where the global topbar resources are located.
104
- - `user`: A JSON string representing the current user.
105
- - `logo`: The URL of the logo image to be displayed on the topbar.
106
-
107
- ## Details documentation of Components and Shared Authentication Logic Links
108
-
109
- - [Components](./docs/components.md)
110
- - [Shared Logic](./docs/share.md)
111
-
112
- ## Contributing
113
-
114
- We always welcome community contributions. If you want to contribute, please create a Pull Request and we will review it.
1
+ # @ukpc-lib/react
2
+
3
+ @ukpc-lib is a comprehensive npm library designed to provide a suite of reusable components, themes, colors, hooks, and auth providers for UKPC applications. It aims to streamline development and ensure consistency across different projects.
4
+
5
+ ## Installation
6
+
7
+ ### React
8
+
9
+ To install package, use the following command:
10
+
11
+ ```bash
12
+ npm install @ukpc-lib/react
13
+ ```
14
+
15
+ ### .NET
16
+
17
+ With .NET applications, you can import the script and use it as follows:
18
+
19
+ Topbar:
20
+ https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-topbar/index.js
21
+
22
+ Global Menu:
23
+ https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-menu/index.js
24
+
25
+ ## Usage
26
+
27
+ **To ensure the correct display, you should use the layout as shown below:**
28
+
29
+ ### React
30
+
31
+ After installation, you can start using components by importing it into your project. Here's an example of how to use Global Menu:
32
+
33
+ ```js
34
+ import { GlobalMenu } from '@ukpc-lib/react/components';
35
+ import { useAuth } from '@ukpc-lib/react/share';
36
+ import { Outlet } from 'react-router-dom';
37
+ import TopBar from './TopBar';
38
+
39
+ export default function PrivateLayout() {
40
+ const { logout } = useAuth();
41
+
42
+ return (
43
+ <div style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
44
+ <div style={{ height: '64px' }}>
45
+ <TopBar />
46
+ </div>
47
+ <div
48
+ style={{
49
+ display: 'flex',
50
+ flexDirection: 'row',
51
+ flex: 1,
52
+ overflow: 'hidden',
53
+ }}
54
+ >
55
+ <GlobalMenu
56
+ baseUrl="https://saas.dev-intelli-park.com"
57
+ menuPath="/global-menu-config/api/v1/menu-items/user"
58
+ logout={logout}
59
+ />
60
+ <div style={{ flex: 1, padding: '40px', overflow: 'auto' }}>
61
+ <Outlet />
62
+ </div>
63
+ </div>
64
+ </div>
65
+ );
66
+ }
67
+ ```
68
+
69
+ ### .NET
70
+
71
+ ```js
72
+ <div style="display: flex; flex-direction: column; height: 100vh;">
73
+ <div style="height: 64px;">
74
+ <global-topbar
75
+ base-url="@baseurl"
76
+ user="@userJson"
77
+ logo="logoURL"
78
+ ></global-topbar>
79
+ </div>
80
+ <div style="display: flex; flex-direction: row; flex: 1; overflow: hidden;">
81
+ <global-menu
82
+ menu-path="/global-menu-config/api/v1/menu-items/user"
83
+ base-url="@baseurl"
84
+ logout="logout"
85
+ ></global-menu>
86
+ <div style="flex: 1; padding: 40px; overflow: auto;">
87
+ <Outlet />
88
+ </div>
89
+ </div>
90
+ </div>
91
+ ```
92
+
93
+ ## API
94
+
95
+ #### Global menu:
96
+
97
+ - `baseUrl`: This is the root path where the global menu resources are located.
98
+ - `menuPath`: This is appended to the `baseUrl` to form the full URL to the menu resource.
99
+ - `logout()`: A method that logs out the current user. When called, it will clear the user's session and redirect them to the login page.
100
+
101
+ #### Topbar:
102
+
103
+ - `baseUrl`: This is the root path where the global topbar resources are located.
104
+ - `user`: A JSON string representing the current user.
105
+ - `logo`: The URL of the logo image to be displayed on the topbar.
106
+
107
+ ## Details documentation of Components and Shared Authentication Logic Links
108
+
109
+ - [Components](./docs/components.md)
110
+ - [Shared Logic](./docs/share.md)
111
+
112
+ ## Contributing
113
+
114
+ We always welcome community contributions. If you want to contribute, please create a Pull Request and we will review it.
package/package.json CHANGED
@@ -1,100 +1,100 @@
1
- {
2
- "name": "@ukpc-lib/react",
3
- "private": false,
4
- "version": "0.1.18",
5
- "type": "module",
6
- "main": "./dist/",
7
- "module": "./dist/",
8
- "exports": {
9
- "./components": {
10
- "import": "./dist/components/index.js",
11
- "require": "./dist/components/index.cjs",
12
- "types": "./dist/components/index.d.ts"
13
- },
14
- "./share": {
15
- "import": "./dist/share/index.js",
16
- "require": "./dist/share/index.cjs",
17
- "types": "./dist/share/index.d.ts"
18
- }
19
- },
20
- "typesVersions": {
21
- "*": {
22
- "*": [
23
- "./dist/*/index.d.ts"
24
- ]
25
- }
26
- },
27
- "files": [
28
- "dist",
29
- "web-components-bundle"
30
- ],
31
- "scripts": {
32
- "dev": "vite --open --port 3000",
33
- "build": "npm run build-react && npm run build-wc",
34
- "build-react": "tsc && vite build --config vite.config.react.ts",
35
- "build-wc": "tsc && vite build --config vite.config.wc.ts --mode production",
36
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
37
- "preview": "vite preview",
38
- "publish": "npm publish --access public",
39
- "build-publish": "npm run build && npm version patch && npm run build && npm run publish && git push"
40
- },
41
- "dependencies": {
42
- "@emotion/react": "^11.11.3",
43
- "@emotion/styled": "^11.11.0",
44
- "@mui/icons-material": "^5.15.4",
45
- "@mui/material": "^5.15.4",
46
- "@r2wc/react-to-web-component": "^2.0.3",
47
- "@rollup/plugin-replace": "^5.0.5",
48
- "axios": "^1.6.5",
49
- "bootstrap-daterangepicker": "^3.1.0",
50
- "cssnano": "^6.0.3",
51
- "framer-motion": "^10.18.0",
52
- "jquery": "^3.7.1",
53
- "moment": "^2.30.1",
54
- "react-bootstrap-daterangepicker": "^8.0.0",
55
- "react-query": "^3.39.3",
56
- "react-router-dom": "^6.21.3",
57
- "react-shadow": "^20.4.0",
58
- "react-svg": "^16.1.32",
59
- "react-toastify": "^10.0.4",
60
- "react-window": "^1.8.10",
61
- "react-window-infinite-loader": "^1.0.9",
62
- "simplebar-react": "^3.2.4",
63
- "usehooks-ts": "^2.15.1",
64
- "vite-plugin-css-injected-by-js": "^3.3.1"
65
- },
66
- "devDependencies": {
67
- "@types/node": "^20.8.10",
68
- "@types/react": "^18.2.15",
69
- "@types/react-dom": "^18.2.7",
70
- "@types/react-window-infinite-loader": "^1.0.9",
71
- "@typescript-eslint/eslint-plugin": "^6.0.0",
72
- "@typescript-eslint/parser": "^6.0.0",
73
- "@vitejs/plugin-react-swc": "^3.3.2",
74
- "autoprefixer": "^10.4.16",
75
- "eslint": "^8.45.0",
76
- "eslint-plugin-react-hooks": "^4.6.0",
77
- "eslint-plugin-react-refresh": "^0.4.3",
78
- "postcss": "^8.4.33",
79
- "prettier": "^3.0.3",
80
- "react": "^18.2.0",
81
- "react-dom": "^18.2.0",
82
- "tailwindcss": "^3.4.1",
83
- "typescript": "^5.0.2",
84
- "vite": "^4.5.1",
85
- "vite-plugin-css-injected-by-js": "^3.3.1",
86
- "vite-plugin-dts": "^3.7.0",
87
- "vite-plugin-lib-inject-css": "^1.3.0"
88
- },
89
- "peerDependencies": {
90
- "@mui/material": "^5.15.4",
91
- "react": "^18.2.0",
92
- "react-dom": "^18.2.0",
93
- "react-query": "^3.39.3",
94
- "react-router-dom": "^6.21.3",
95
- "tailwindcss": "^3.4.1"
96
- },
97
- "author": "Thinh Phung",
98
- "description": "![Screenshot 2024-01-22 at 11 40 08](https://github.com/UKParkingControl/LibShareJS/assets/153060345/99004010-67a2-436b-a5b7-317992137205)",
99
- "license": "ISC"
100
- }
1
+ {
2
+ "name": "@ukpc-lib/react",
3
+ "private": false,
4
+ "version": "0.1.20",
5
+ "type": "module",
6
+ "main": "./dist/",
7
+ "module": "./dist/",
8
+ "exports": {
9
+ "./components": {
10
+ "import": "./dist/components/index.js",
11
+ "require": "./dist/components/index.cjs",
12
+ "types": "./dist/components/index.d.ts"
13
+ },
14
+ "./share": {
15
+ "import": "./dist/share/index.js",
16
+ "require": "./dist/share/index.cjs",
17
+ "types": "./dist/share/index.d.ts"
18
+ }
19
+ },
20
+ "typesVersions": {
21
+ "*": {
22
+ "*": [
23
+ "./dist/*/index.d.ts"
24
+ ]
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "web-components-bundle"
30
+ ],
31
+ "scripts": {
32
+ "dev": "vite --open --port 3000",
33
+ "build": "npm run build-react && npm run build-wc",
34
+ "build-react": "tsc && vite build --config vite.config.react.ts",
35
+ "build-wc": "tsc && vite build --config vite.config.wc.ts --mode production",
36
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
37
+ "preview": "vite preview",
38
+ "publish": "npm publish --access public",
39
+ "build-publish": "npm run build && npm version patch && npm run build && npm run publish && git push"
40
+ },
41
+ "dependencies": {
42
+ "@emotion/react": "^11.11.3",
43
+ "@emotion/styled": "^11.11.0",
44
+ "@mui/icons-material": "^5.15.4",
45
+ "@mui/material": "^5.15.4",
46
+ "@r2wc/react-to-web-component": "^2.0.3",
47
+ "@rollup/plugin-replace": "^5.0.5",
48
+ "axios": "^1.6.5",
49
+ "bootstrap-daterangepicker": "^3.1.0",
50
+ "cssnano": "^6.0.3",
51
+ "framer-motion": "^10.18.0",
52
+ "jquery": "^3.7.1",
53
+ "moment": "^2.30.1",
54
+ "react-bootstrap-daterangepicker": "^8.0.0",
55
+ "react-query": "^3.39.3",
56
+ "react-router-dom": "^6.21.3",
57
+ "react-shadow": "^20.4.0",
58
+ "react-svg": "^16.1.32",
59
+ "react-toastify": "^10.0.4",
60
+ "react-window": "^1.8.10",
61
+ "react-window-infinite-loader": "^1.0.9",
62
+ "simplebar-react": "^3.2.4",
63
+ "usehooks-ts": "^2.15.1",
64
+ "vite-plugin-css-injected-by-js": "^3.3.1"
65
+ },
66
+ "devDependencies": {
67
+ "@types/node": "^20.8.10",
68
+ "@types/react": "^18.2.15",
69
+ "@types/react-dom": "^18.2.7",
70
+ "@types/react-window-infinite-loader": "^1.0.9",
71
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
72
+ "@typescript-eslint/parser": "^6.0.0",
73
+ "@vitejs/plugin-react-swc": "^3.3.2",
74
+ "autoprefixer": "^10.4.16",
75
+ "eslint": "^8.45.0",
76
+ "eslint-plugin-react-hooks": "^4.6.0",
77
+ "eslint-plugin-react-refresh": "^0.4.3",
78
+ "postcss": "^8.4.33",
79
+ "prettier": "^3.0.3",
80
+ "react": "^18.2.0",
81
+ "react-dom": "^18.2.0",
82
+ "tailwindcss": "^3.4.1",
83
+ "typescript": "^5.0.2",
84
+ "vite": "^4.5.1",
85
+ "vite-plugin-css-injected-by-js": "^3.3.1",
86
+ "vite-plugin-dts": "^3.7.0",
87
+ "vite-plugin-lib-inject-css": "^1.3.0"
88
+ },
89
+ "peerDependencies": {
90
+ "@mui/material": "^5.15.4",
91
+ "react": "^18.2.0",
92
+ "react-dom": "^18.2.0",
93
+ "react-query": "^3.39.3",
94
+ "react-router-dom": "^6.21.3",
95
+ "tailwindcss": "^3.4.1"
96
+ },
97
+ "author": "Thinh Phung",
98
+ "description": "![Screenshot 2024-01-22 at 11 40 08](https://github.com/UKParkingControl/LibShareJS/assets/153060345/99004010-67a2-436b-a5b7-317992137205)",
99
+ "license": "ISC"
100
+ }
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- type DropdownProps = {
3
- children: React.ReactNode;
4
- parentRef: React.RefObject<HTMLDivElement>;
5
- onlyChild?: boolean;
6
- };
7
- export default function Dropdown(props: DropdownProps): import("react").ReactNode;
8
- export {};
@@ -1,15 +0,0 @@
1
- import { MenuItemDto } from '../models';
2
- export type OwnMenuItemProps = {
3
- replacePath?(path: string): string;
4
- ssr?: boolean;
5
- };
6
- type MenuItemProps = {
7
- item: MenuItemDto;
8
- level?: number;
9
- isActive(id: number): boolean;
10
- isCollapsed: boolean;
11
- expanded(id: number): boolean;
12
- toggleExpand: (id: number) => void;
13
- } & OwnMenuItemProps;
14
- export default function MenuItem({ item, level, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
15
- export {};
File without changes
@@ -1,2 +0,0 @@
1
- declare function IconCollapsed(): import("react/jsx-runtime").JSX.Element;
2
- export default IconCollapsed;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function IconDown(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
- export default IconDown;
@@ -1,2 +0,0 @@
1
- declare function IconExpand(): import("react/jsx-runtime").JSX.Element;
2
- export default IconExpand;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export default function IconLogout(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { OwnMenuItemProps } from './components/MenuItem';
2
- export type GlobalMenuProps = {
3
- baseUrl: string;
4
- menuPath?: string;
5
- logout?(): void;
6
- } & OwnMenuItemProps;
7
- export declare function GlobalMenu(props: GlobalMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export interface MenuItemDto {
2
- id: number;
3
- name: string;
4
- path?: string;
5
- icon?: string;
6
- parentKey: number | null;
7
- children?: MenuItemDto[];
8
- }
@@ -1 +0,0 @@
1
- export * from './MenuItemDto';
@@ -1 +0,0 @@
1
- export default function LanguageSwitcher(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- type LogoutConfirmModalProps = {
2
- isOpen: boolean;
3
- onClose: () => void;
4
- onConfirm: () => void;
5
- };
6
- declare function LogoutConfirmModal({ isOpen, onClose, onConfirm, }: LogoutConfirmModalProps): import("react/jsx-runtime").JSX.Element | null;
7
- export default LogoutConfirmModal;
@@ -1,2 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- export declare const NoData: FC<PropsWithChildren>;
@@ -1,4 +0,0 @@
1
- declare const NotFoundPage: ({ rootPath }: {
2
- rootPath: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default NotFoundPage;
@@ -1,8 +0,0 @@
1
- import { PopUpBaseProps, usePopUpProps } from './types';
2
- export declare function PopUpBase(props: PopUpBaseProps): import("react/jsx-runtime").JSX.Element;
3
- export declare function usePopUp(props?: boolean | usePopUpProps): {
4
- setTrue: () => void;
5
- open: boolean;
6
- onClose: () => void;
7
- onConfirm: (() => void) | undefined;
8
- };
@@ -1,26 +0,0 @@
1
- import { SxProps, TypographyProps, Theme, DialogProps, DialogActionsProps } from "@mui/material";
2
- import { ReactNode } from "react";
3
- export type PopUpBaseProps = IPopUp & {
4
- title?: ReactNode;
5
- subTitle?: ReactNode;
6
- desc: ReactNode;
7
- fixOverflow?: boolean;
8
- minWidthButton?: number;
9
- subTitleProps?: TypographyProps;
10
- contentProps?: SxProps<Theme>;
11
- titleProps?: SxProps<Theme>;
12
- hideTitle?: boolean;
13
- };
14
- export type IPopUp = {
15
- open: boolean;
16
- onClose?(): void;
17
- onConfirm?: () => void;
18
- dialogProps?: Omit<DialogProps, 'open' | 'onClose'>;
19
- dialogActionsProps?: DialogActionsProps;
20
- customActions?: ReactNode;
21
- hideConfirm?: boolean;
22
- hideClose?: boolean;
23
- };
24
- export type usePopUpProps = {
25
- onConfirm?(): void;
26
- };
@@ -1,8 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- type OwnProps = {
3
- styles?: string[];
4
- };
5
- type ElementProps = React.HTMLProps<HTMLElement>;
6
- type Props = PropsWithChildren<OwnProps & ElementProps>;
7
- export declare function ShadowDomWrapper({ children, styles, ...props }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,11 +0,0 @@
1
- import { StackProps } from '@mui/material';
2
- import { ReactNode } from 'react';
3
- type Props<T> = {
4
- option: T;
5
- renderOption(option: T): ReactNode;
6
- onClick?(option: T): any;
7
- stackProps?: StackProps;
8
- select?: boolean;
9
- };
10
- export declare function AutocompleteOption<T>(props: Props<T>): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,29 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Paging } from './types';
3
- export type StyledAutocompleteProps<T> = {
4
- disabledAllOption?: boolean;
5
- readOnly?: boolean;
6
- disabled?: boolean;
7
- isSync?: boolean;
8
- label?: React.ReactNode;
9
- value?: T;
10
- placeholder?: string;
11
- onChange?(value?: T): any;
12
- isEqual?(option?: T, value?: T): boolean;
13
- getOptionLabel(option: T): string;
14
- renderOptionTooltip?(option: T): ReactNode;
15
- handleChangeSearch?(text: string): void;
16
- searchLoading: boolean;
17
- loading?: boolean;
18
- paging: Paging<T>;
19
- error?: boolean;
20
- helperText?: ReactNode;
21
- hasNextPage: boolean;
22
- isNextPageLoading: boolean;
23
- loadNextPage(searchText: string): void;
24
- wrapperWidth?: string | number;
25
- isRequired?: boolean;
26
- itemsNumber?: number;
27
- placeHolderColor?: string;
28
- };
29
- export declare function StyledAutocomplete<T>(props: StyledAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function activeStyles<T>(props: T, active?: boolean): T | undefined;
@@ -1,3 +0,0 @@
1
- export * from './StyledAutocomplete';
2
- export * from './AutocompleteOption';
3
- export * from './useStyledAutocomplete';