aquasis-fe-components 3.2.7 → 3.2.9
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/README.md +92 -21
- package/dist/aquasis-fe-components.js +9129 -8987
- package/dist/aquasis-fe-components.umd.cjs +79 -79
- package/dist/index.css +1 -1
- package/dist/src/helpers/fluidScale.d.ts +8 -0
- package/dist/src/hooks/index.d.ts +1 -1
- package/dist/src/hooks/useFluidScale.d.ts +1 -0
- package/dist/src/i18n/locales/br.json.d.ts +1 -0
- package/dist/src/i18n/locales/en.json.d.ts +1 -0
- package/dist/src/i18n/locales/es.json.d.ts +1 -0
- package/dist/src/i18n/locales/jp.json.d.ts +1 -0
- package/dist/src/i18n/locales/pt.json.d.ts +1 -0
- package/dist/src/i18n/locales/ro.json.d.ts +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/lib/ProfileChip/ProfileChipOverflowMenu.d.ts +6 -0
- package/dist/src/lib/ProfileChip/index.d.ts +1 -1
- package/dist/src/themes/fluidTheme.d.ts +2 -0
- package/dist/src/types/profileChip.d.ts +13 -3
- package/package.json +28 -4
package/README.md
CHANGED
|
@@ -1,30 +1,101 @@
|
|
|
1
|
-
#
|
|
1
|
+
# aquasis-fe-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared React UI library for **AQUASIS** portals (GlobalAuth, WiseApps Portal, and related apps). Ships header controls, profile management, helpdesk, release notes, themes, and i18n.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Current version:** `3.2.9`
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
7
|
+
## Requirements
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
- React 19+
|
|
10
|
+
- `@tanstack/react-query` ^5
|
|
11
|
+
- `i18next` ^25.8 || ^26
|
|
12
|
+
- `react-i18next` ^16.5 || ^17
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
## Install
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add aquasis-fe-components
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Peer dependencies must be installed in the host application.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Import components and global styles once at the app root:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import {
|
|
28
|
+
Helpdesk,
|
|
29
|
+
LanguageSwitcher,
|
|
30
|
+
ProfileChipComponent,
|
|
31
|
+
ThemeModeToggle,
|
|
32
|
+
UserModal,
|
|
33
|
+
WhatsNews,
|
|
34
|
+
i18n,
|
|
35
|
+
} from "aquasis-fe-components";
|
|
36
|
+
import "aquasis-fe-components/dist/index.css";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Wrap the app with your Redux store, React Query, and i18n setup. Components that use **`ThemeProvider`** (via connectors) receive Ant Design themes aligned with the WiseApps Portal palette.
|
|
40
|
+
|
|
41
|
+
Configure API base URLs through component props (e.g. **`gauApiUrl`**) or **`setAquasisApiContext`**.
|
|
42
|
+
|
|
43
|
+
## Exported components
|
|
44
|
+
|
|
45
|
+
| Export | Description |
|
|
46
|
+
|--------|-------------|
|
|
47
|
+
| `ProfileChipComponent` | Header profile chip (avatar, edit profile, logout, optional overflow menu) |
|
|
48
|
+
| `LanguageSwitcher` | Pill language selector with flag and dropdown |
|
|
49
|
+
| `ThemeModeToggle` | Light/dark theme switch |
|
|
50
|
+
| `Helpdesk` | Support trigger and ticket modal |
|
|
51
|
+
| `UserModal` | Profile edit modal |
|
|
52
|
+
| `WhatsNews` | Release notes carousel modal |
|
|
53
|
+
| `i18n` | Shared i18next instance and locale files |
|
|
54
|
+
|
|
55
|
+
## Fluid scaling (3.2.9+)
|
|
56
|
+
|
|
57
|
+
Components scale proportionally on small viewports and when browser zoom is high. Importing the library CSS sets:
|
|
58
|
+
|
|
59
|
+
- **`--aquasis-fluid-scale`** — `clamp(0.5, 100vw / 1440, 1)`
|
|
60
|
+
- **`--aquasis-fluid-font-size`** — base root size for **`rem`**-based layout
|
|
61
|
+
|
|
62
|
+
`ThemeProvider` applies the same scale to Ant Design tokens automatically.
|
|
15
63
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
64
|
+
For custom portal layout (e.g. welcome cards), reuse the scale in the host app:
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { useFluidScale, computeFluidScale, FLUID_REFERENCE_WIDTH } from "aquasis-fe-components";
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Optional scope class for embedded surfaces (Storybook, iframes):
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<div class="aquasis-fe-fluid-scope">...</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Development
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm install
|
|
80
|
+
pnpm dev # Vite dev server
|
|
81
|
+
pnpm storybook # Component docs on :6006
|
|
82
|
+
pnpm build # Library build → dist/
|
|
83
|
+
pnpm lint
|
|
26
84
|
```
|
|
27
85
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
86
|
+
## Publish
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pnpm run publish:npm # latest tag
|
|
90
|
+
pnpm run publish-beta # beta tag
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Requires `.env` with `NPM_PUBLISH_TOKEN`.
|
|
94
|
+
|
|
95
|
+
## Changelog
|
|
96
|
+
|
|
97
|
+
See [changelog.md](./changelog.md).
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
ISC · [AQUASISPT/FrontendComponents](https://github.com/AQUASISPT/FrontendComponents)
|