@konce-pt/angular 0.2.0 → 0.4.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/README.md +60 -1
- package/dist/README.md +60 -1
- package/dist/fesm2022/konce-pt-angular.mjs +3081 -482
- package/dist/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/lib/accordion/llms.txt +2 -0
- package/dist/src/lib/card/llms.txt +21 -0
- package/dist/src/lib/confirm/llms.txt +4 -0
- package/dist/src/lib/data-table/llms.txt +40 -6
- package/dist/src/lib/date-range/llms.txt +14 -5
- package/dist/src/lib/datepicker/llms.txt +22 -4
- package/dist/src/lib/fieldset/llms.txt +2 -0
- package/dist/src/lib/form-field/llms.txt +20 -0
- package/dist/src/lib/i18n/llms.txt +35 -0
- package/dist/src/lib/icon/llms.txt +3 -1
- package/dist/src/lib/megamenu/llms.txt +2 -0
- package/dist/src/lib/menubar/llms.txt +2 -0
- package/dist/src/lib/paginator/llms.txt +4 -0
- package/dist/src/lib/panel/llms.txt +2 -0
- package/dist/src/lib/rich-text/llms.txt +31 -5
- package/dist/src/lib/select/llms.txt +4 -0
- package/dist/src/lib/slider/llms.txt +8 -1
- package/dist/src/lib/stepper/llms.txt +2 -0
- package/dist/src/lib/switch/llms.txt +5 -1
- package/dist/src/lib/switch-group/llms.txt +24 -0
- package/dist/src/lib/tabs/llms.txt +2 -0
- package/dist/types/konce-pt-angular.d.ts +780 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
+
<img src="https://ui.konce.pt/images/koncept_ui_lib.png" alt="Koncept UI — Angular component library" width="100%" />
|
|
4
|
+
|
|
3
5
|
# Koncept UI — Angular
|
|
4
6
|
|
|
5
7
|
**Open-source Angular 22 component library built on Signals & Signal Forms.**
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
- 🎨 **100% tokenized** — every style is a `var(--kpt-*)` CSS custom property. Light/dark theme, neutral OKLCH palette. Swap the brand by swapping one token layer.
|
|
31
33
|
- 🧩 **Standalone components** — no NgModules. Import only what you use; tree-shakeable.
|
|
32
34
|
- ♿ **Built on Angular CDK** — overlays, a11y, focus management, virtual scrolling.
|
|
35
|
+
- 🌍 **i18n built in** — English (default) & Polish out of the box, runtime locale switch, add any language with one JSON.
|
|
33
36
|
|
|
34
37
|
## Installation
|
|
35
38
|
|
|
@@ -153,7 +156,7 @@ All visuals are driven by `var(--kpt-*)` tokens (three tiers: primitives → sem
|
|
|
153
156
|
}
|
|
154
157
|
```
|
|
155
158
|
|
|
156
|
-
**Common token names:** surfaces `--kpt-color-surface`, `--kpt-color-surface-sunken|raised|variant`; text `--kpt-color-on-surface`, `--kpt-color-on-surface-muted
|
|
159
|
+
**Common token names:** surfaces `--kpt-color-surface`, `--kpt-color-surface-sunken|raised|variant|hover|selected`; text `--kpt-color-on-surface`, `--kpt-color-on-surface-muted` (aliases `--kpt-color-text`, `--kpt-color-text-muted|subtle|inverse`); borders `--kpt-color-border`, `--kpt-color-border-strong`; accent roles in full — `{primary,danger,success,warning,info}` each with `-hover`, `-contrast`, `-subtle`, `-border`; radii `--kpt-radius-sm|md|lg|xl|full|none`; elevation `--kpt-elevation-1..4` (aliases `--kpt-shadow-sm|md|lg`). There is no `--kpt-color-bg`.
|
|
157
160
|
|
|
158
161
|
## Icons
|
|
159
162
|
|
|
@@ -164,6 +167,40 @@ import { provideKptTablerIcons } from '@konce-pt/angular/icons';
|
|
|
164
167
|
// providers: [provideKptTablerIcons()]
|
|
165
168
|
```
|
|
166
169
|
|
|
170
|
+
## Internationalization (i18n)
|
|
171
|
+
|
|
172
|
+
Component labels ship in **English (default)** and **Polish**. All user-facing strings — aria-labels, empty states, paginator, calendars, rich-text menus — read from a signal-based service, so switching locale updates the UI instantly (zoneless-friendly).
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
import { provideKptI18n } from '@konce-pt/angular';
|
|
176
|
+
// providers: [provideKptI18n({ locale: 'pl' })] // Polish UI
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Switch at runtime:
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
import { inject } from '@angular/core';
|
|
183
|
+
import { KptI18n } from '@konce-pt/angular';
|
|
184
|
+
|
|
185
|
+
const i18n = inject(KptI18n);
|
|
186
|
+
i18n.setLocale('en');
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Add any language with one JSON** (shape = the `KptMessages` contract; missing keys fall back to English):
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
import de from './i18n/de.json';
|
|
193
|
+
provideKptI18n({ locale: 'de', messages: { de } });
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Override individual labels** of an existing language:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
provideKptI18n({ messages: { en: { paginator: { rowsPerPage: 'Rows per page:' } } } });
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Calendar weekday/month names come from the browser's `Intl` API for the active locale. Per-component label inputs (e.g. `emptyMessage`, `acceptLabel`) still take precedence over the dictionary.
|
|
203
|
+
|
|
167
204
|
## Documentation
|
|
168
205
|
|
|
169
206
|
- **Storybook** — interactive docs for every component.
|
|
@@ -190,6 +227,7 @@ import { provideKptTablerIcons } from '@konce-pt/angular/icons';
|
|
|
190
227
|
- 📊 **Flagowa tabela danych** — sortowanie, filtr, paginacja, virtual scroll, zaznaczanie, przestawianie/zamrażanie kolumn, eksport CSV, szablony komórek.
|
|
191
228
|
- 🎨 **100% na tokenach** — każdy styl to `var(--kpt-*)`. Motyw jasny/ciemny, neutralna paleta OKLCH.
|
|
192
229
|
- 🧩 **Standalone** — bez NgModules, tree-shaking.
|
|
230
|
+
- 🌍 **Wbudowane i18n** — angielski (domyślny) i polski, przełączanie języka w runtime, dowolny język jednym plikiem JSON.
|
|
193
231
|
|
|
194
232
|
### Instalacja
|
|
195
233
|
|
|
@@ -215,6 +253,27 @@ npm i @konce-pt/angular @konce-pt/tokens @konce-pt/styles
|
|
|
215
253
|
|
|
216
254
|
Motyw ciemny: `<html data-theme="dark">`; nadpisania `--kpt-color-*` w `styles.scss`. Pełny zestaw ikon Tabler: `provideKptTablerIcons()` z `@konce-pt/angular/icons`.
|
|
217
255
|
|
|
256
|
+
### Internacjonalizacja (i18n)
|
|
257
|
+
|
|
258
|
+
Etykiety komponentów są dostępne po **angielsku (domyślnie)** i **polsku**. Wszystkie napisy (aria-label, stany puste, paginator, kalendarze, menu edytora) pochodzą z serwisu opartego o sygnały — zmiana języka odświeża UI natychmiast (zoneless).
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
import { provideKptI18n } from '@konce-pt/angular';
|
|
262
|
+
// providers: [provideKptI18n({ locale: 'pl' })] // polski interfejs
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Przełączanie w runtime: `inject(KptI18n).setLocale('en')`.
|
|
266
|
+
|
|
267
|
+
**Własny język jednym plikiem JSON** (kształt = kontrakt `KptMessages`; brakujące klucze spadają na EN):
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
import de from './i18n/de.json';
|
|
271
|
+
provideKptI18n({ locale: 'de', messages: { de } });
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Nadpisanie pojedynczych etykiet: `provideKptI18n({ messages: { pl: { paginator: { rowsPerPage: 'Na stronie:' } } } })`.
|
|
275
|
+
Nazwy dni/miesięcy w kalendarzach pochodzą z `Intl` wg locale. Inputy etykiet per-komponent (np. `emptyMessage`) mają priorytet nad słownikiem.
|
|
276
|
+
|
|
218
277
|
### Komponenty (70+)
|
|
219
278
|
|
|
220
279
|
Formularze (Signal Forms), przyciski i akcje, layout, nawigacja, dane (z flagową `kpt-data-table`), feedback i overlay — pełna lista w tabeli powyżej. Każdy komponent ma plik `llms.txt` z opisem API obok źródła.
|
package/dist/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
+
<img src="https://ui.konce.pt/images/koncept_ui_lib.png" alt="Koncept UI — Angular component library" width="100%" />
|
|
4
|
+
|
|
3
5
|
# Koncept UI — Angular
|
|
4
6
|
|
|
5
7
|
**Open-source Angular 22 component library built on Signals & Signal Forms.**
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
- 🎨 **100% tokenized** — every style is a `var(--kpt-*)` CSS custom property. Light/dark theme, neutral OKLCH palette. Swap the brand by swapping one token layer.
|
|
31
33
|
- 🧩 **Standalone components** — no NgModules. Import only what you use; tree-shakeable.
|
|
32
34
|
- ♿ **Built on Angular CDK** — overlays, a11y, focus management, virtual scrolling.
|
|
35
|
+
- 🌍 **i18n built in** — English (default) & Polish out of the box, runtime locale switch, add any language with one JSON.
|
|
33
36
|
|
|
34
37
|
## Installation
|
|
35
38
|
|
|
@@ -153,7 +156,7 @@ All visuals are driven by `var(--kpt-*)` tokens (three tiers: primitives → sem
|
|
|
153
156
|
}
|
|
154
157
|
```
|
|
155
158
|
|
|
156
|
-
**Common token names:** surfaces `--kpt-color-surface`, `--kpt-color-surface-sunken|raised|variant`; text `--kpt-color-on-surface`, `--kpt-color-on-surface-muted
|
|
159
|
+
**Common token names:** surfaces `--kpt-color-surface`, `--kpt-color-surface-sunken|raised|variant|hover|selected`; text `--kpt-color-on-surface`, `--kpt-color-on-surface-muted` (aliases `--kpt-color-text`, `--kpt-color-text-muted|subtle|inverse`); borders `--kpt-color-border`, `--kpt-color-border-strong`; accent roles in full — `{primary,danger,success,warning,info}` each with `-hover`, `-contrast`, `-subtle`, `-border`; radii `--kpt-radius-sm|md|lg|xl|full|none`; elevation `--kpt-elevation-1..4` (aliases `--kpt-shadow-sm|md|lg`). There is no `--kpt-color-bg`.
|
|
157
160
|
|
|
158
161
|
## Icons
|
|
159
162
|
|
|
@@ -164,6 +167,40 @@ import { provideKptTablerIcons } from '@konce-pt/angular/icons';
|
|
|
164
167
|
// providers: [provideKptTablerIcons()]
|
|
165
168
|
```
|
|
166
169
|
|
|
170
|
+
## Internationalization (i18n)
|
|
171
|
+
|
|
172
|
+
Component labels ship in **English (default)** and **Polish**. All user-facing strings — aria-labels, empty states, paginator, calendars, rich-text menus — read from a signal-based service, so switching locale updates the UI instantly (zoneless-friendly).
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
import { provideKptI18n } from '@konce-pt/angular';
|
|
176
|
+
// providers: [provideKptI18n({ locale: 'pl' })] // Polish UI
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Switch at runtime:
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
import { inject } from '@angular/core';
|
|
183
|
+
import { KptI18n } from '@konce-pt/angular';
|
|
184
|
+
|
|
185
|
+
const i18n = inject(KptI18n);
|
|
186
|
+
i18n.setLocale('en');
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Add any language with one JSON** (shape = the `KptMessages` contract; missing keys fall back to English):
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
import de from './i18n/de.json';
|
|
193
|
+
provideKptI18n({ locale: 'de', messages: { de } });
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Override individual labels** of an existing language:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
provideKptI18n({ messages: { en: { paginator: { rowsPerPage: 'Rows per page:' } } } });
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Calendar weekday/month names come from the browser's `Intl` API for the active locale. Per-component label inputs (e.g. `emptyMessage`, `acceptLabel`) still take precedence over the dictionary.
|
|
203
|
+
|
|
167
204
|
## Documentation
|
|
168
205
|
|
|
169
206
|
- **Storybook** — interactive docs for every component.
|
|
@@ -190,6 +227,7 @@ import { provideKptTablerIcons } from '@konce-pt/angular/icons';
|
|
|
190
227
|
- 📊 **Flagowa tabela danych** — sortowanie, filtr, paginacja, virtual scroll, zaznaczanie, przestawianie/zamrażanie kolumn, eksport CSV, szablony komórek.
|
|
191
228
|
- 🎨 **100% na tokenach** — każdy styl to `var(--kpt-*)`. Motyw jasny/ciemny, neutralna paleta OKLCH.
|
|
192
229
|
- 🧩 **Standalone** — bez NgModules, tree-shaking.
|
|
230
|
+
- 🌍 **Wbudowane i18n** — angielski (domyślny) i polski, przełączanie języka w runtime, dowolny język jednym plikiem JSON.
|
|
193
231
|
|
|
194
232
|
### Instalacja
|
|
195
233
|
|
|
@@ -215,6 +253,27 @@ npm i @konce-pt/angular @konce-pt/tokens @konce-pt/styles
|
|
|
215
253
|
|
|
216
254
|
Motyw ciemny: `<html data-theme="dark">`; nadpisania `--kpt-color-*` w `styles.scss`. Pełny zestaw ikon Tabler: `provideKptTablerIcons()` z `@konce-pt/angular/icons`.
|
|
217
255
|
|
|
256
|
+
### Internacjonalizacja (i18n)
|
|
257
|
+
|
|
258
|
+
Etykiety komponentów są dostępne po **angielsku (domyślnie)** i **polsku**. Wszystkie napisy (aria-label, stany puste, paginator, kalendarze, menu edytora) pochodzą z serwisu opartego o sygnały — zmiana języka odświeża UI natychmiast (zoneless).
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
import { provideKptI18n } from '@konce-pt/angular';
|
|
262
|
+
// providers: [provideKptI18n({ locale: 'pl' })] // polski interfejs
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Przełączanie w runtime: `inject(KptI18n).setLocale('en')`.
|
|
266
|
+
|
|
267
|
+
**Własny język jednym plikiem JSON** (kształt = kontrakt `KptMessages`; brakujące klucze spadają na EN):
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
import de from './i18n/de.json';
|
|
271
|
+
provideKptI18n({ locale: 'de', messages: { de } });
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Nadpisanie pojedynczych etykiet: `provideKptI18n({ messages: { pl: { paginator: { rowsPerPage: 'Na stronie:' } } } })`.
|
|
275
|
+
Nazwy dni/miesięcy w kalendarzach pochodzą z `Intl` wg locale. Inputy etykiet per-komponent (np. `emptyMessage`) mają priorytet nad słownikiem.
|
|
276
|
+
|
|
218
277
|
### Komponenty (70+)
|
|
219
278
|
|
|
220
279
|
Formularze (Signal Forms), przyciski i akcje, layout, nawigacja, dane (z flagową `kpt-data-table`), feedback i overlay — pełna lista w tabeli powyżej. Każdy komponent ma plik `llms.txt` z opisem API obok źródła.
|