@thl-ui/angular 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +65 -2
- package/fesm2022/thl-ui-angular.mjs +6840 -0
- package/fesm2022/thl-ui-angular.mjs.map +1 -0
- package/package.json +50 -4
- package/types/thl-ui-angular.d.ts +1665 -0
- package/types/thl-ui-angular.d.ts.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 thl-ui contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @thl-ui/angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
thl-ui for Angular: standalone admin UI components with signals, global config, 12 skins, dark mode and i18n.
|
|
4
|
+
|
|
5
|
+
Part of [thl-ui](https://thl.tandd.dev): one UI kit for React, Vue and Angular with a headless TypeScript core, global config, 12 skins, dark mode and i18n (en, ja, vi, zh).
|
|
6
|
+
|
|
7
|
+
**Live demo:** [thl-angular.tandd.dev](https://thl-angular.tandd.dev): the full admin template built with `@thl-ui/angular` from npm.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @thl-ui/angular @thl-ui/styles
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Peer dependencies: `@angular/core @angular/common @angular/forms`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// main.ts
|
|
21
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
22
|
+
import { provideZonelessChangeDetection } from '@angular/core';
|
|
23
|
+
import { provideThlUI } from '@thl-ui/angular';
|
|
24
|
+
import { AppComponent } from './app/app.component';
|
|
25
|
+
|
|
26
|
+
bootstrapApplication(AppComponent, {
|
|
27
|
+
providers: [provideZonelessChangeDetection(), provideThlUI({ locale: 'en', theme: 'default', colorMode: 'auto', persist: true })],
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Add the stylesheet in `angular.json` → `build.options.styles`: `"node_modules/@thl-ui/styles/dist/thl-ui.css"`.
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { Component, inject } from '@angular/core';
|
|
35
|
+
import { ThlButtonComponent, ThlToastService } from '@thl-ui/angular';
|
|
36
|
+
|
|
37
|
+
@Component({
|
|
38
|
+
selector: 'app-save',
|
|
39
|
+
imports: [ThlButtonComponent],
|
|
40
|
+
template: `<button thl-button variant="primary" (click)="toast.success('Saved')">Save</button>`,
|
|
41
|
+
})
|
|
42
|
+
export class SaveComponent {
|
|
43
|
+
readonly toast = inject(ThlToastService);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Standalone components with signal inputs, zoneless-ready. Services: `ThlConfigService`, `ThlI18nService`, `ThlToastService`, `ThlModalService`; pipe `thlT`. Form controls implement `ControlValueAccessor`.
|
|
48
|
+
|
|
49
|
+
## Live demos
|
|
50
|
+
|
|
51
|
+
| Framework | Package | Live demo |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| React ≥ 18 | [`@thl-ui/react`](https://www.npmjs.com/package/@thl-ui/react) | [thl-react.tandd.dev](https://thl-react.tandd.dev) |
|
|
54
|
+
| Vue ≥ 3.5 | [`@thl-ui/vue`](https://www.npmjs.com/package/@thl-ui/vue) | [thl-vue.tandd.dev](https://thl-vue.tandd.dev) |
|
|
55
|
+
| Angular ≥ 20 | [`@thl-ui/angular`](https://www.npmjs.com/package/@thl-ui/angular) | [thl-angular.tandd.dev](https://thl-angular.tandd.dev) |
|
|
56
|
+
|
|
57
|
+
Each demo is the full 74-page admin template, built with the packages installed from npm. Open the ⚙ panel to switch skin, layout, dark mode and language.
|
|
58
|
+
|
|
59
|
+
## Links
|
|
60
|
+
|
|
61
|
+
- Docs: [thl.tandd.dev/guide/angular](https://thl.tandd.dev/guide/angular) (English, 日本語, Tiếng Việt, 简体中文)
|
|
62
|
+
- Source and issues: [GitLab](https://gitlab.com/tandd.packages/thl-ui)
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|