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 CHANGED
@@ -1,30 +1,101 @@
1
- # React + TypeScript + Vite
1
+ # aquasis-fe-components
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
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
- Currently, two official plugins are available:
5
+ **Current version:** `3.2.9`
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
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
- ## Expanding the ESLint configuration
9
+ - React 19+
10
+ - `@tanstack/react-query` ^5
11
+ - `i18next` ^25.8 || ^26
12
+ - `react-i18next` ^16.5 || ^17
11
13
 
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
14
+ ## Install
13
15
 
14
- - Configure the top-level `parserOptions` property like this:
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
- ```js
17
- export default {
18
- // other rules...
19
- parserOptions: {
20
- ecmaVersion: 'latest',
21
- sourceType: 'module',
22
- project: ['./tsconfig.json', './tsconfig.node.json'],
23
- tsconfigRootDir: __dirname,
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
- - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29
- - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
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)