@konce-pt/angular 0.7.10 → 0.7.12

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 (87) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/charts/src/lib/llms.txt +30 -30
  3. package/fesm2022/konce-pt-angular.mjs +1403 -368
  4. package/fesm2022/konce-pt-angular.mjs.map +1 -1
  5. package/grid/src/lib/llms.txt +48 -48
  6. package/map/src/lib/llms.txt +446 -446
  7. package/package.json +1 -1
  8. package/roadmap/src/lib/llms.txt +74 -74
  9. package/src/lib/accordion/llms.txt +9 -9
  10. package/src/lib/alert/llms.txt +10 -10
  11. package/src/lib/app-shell/llms.txt +59 -59
  12. package/src/lib/auth/llms.txt +104 -0
  13. package/src/lib/autocomplete/llms.txt +8 -8
  14. package/src/lib/avatar/llms.txt +9 -9
  15. package/src/lib/avatar-group/llms.txt +8 -8
  16. package/src/lib/badge/llms.txt +9 -9
  17. package/src/lib/bottom-sheet/llms.txt +14 -14
  18. package/src/lib/breadcrumb/llms.txt +7 -7
  19. package/src/lib/breakpoint/llms.txt +21 -21
  20. package/src/lib/button/llms.txt +34 -34
  21. package/src/lib/button-group/llms.txt +5 -5
  22. package/src/lib/card/llms.txt +27 -27
  23. package/src/lib/carousel/llms.txt +11 -11
  24. package/src/lib/checkbox/llms.txt +7 -7
  25. package/src/lib/chip/llms.txt +6 -6
  26. package/src/lib/chips-input/llms.txt +9 -9
  27. package/src/lib/color-picker/llms.txt +7 -7
  28. package/src/lib/confirm/llms.txt +11 -11
  29. package/src/lib/context-menu/llms.txt +10 -10
  30. package/src/lib/data-table/llms.txt +170 -170
  31. package/src/lib/data-view/llms.txt +8 -8
  32. package/src/lib/date-range/llms.txt +25 -25
  33. package/src/lib/datepicker/llms.txt +48 -48
  34. package/src/lib/dialog/llms.txt +62 -62
  35. package/src/lib/divider/llms.txt +9 -9
  36. package/src/lib/drawer/llms.txt +18 -18
  37. package/src/lib/empty/llms.txt +9 -9
  38. package/src/lib/fab/llms.txt +12 -12
  39. package/src/lib/fieldset/llms.txt +9 -9
  40. package/src/lib/file-upload/llms.txt +10 -10
  41. package/src/lib/form-field/llms.txt +45 -45
  42. package/src/lib/galleria/llms.txt +7 -7
  43. package/src/lib/i18n/llms.txt +21 -21
  44. package/src/lib/icon/llms.txt +20 -20
  45. package/src/lib/icon-button/llms.txt +8 -8
  46. package/src/lib/image/llms.txt +9 -9
  47. package/src/lib/input/llms.txt +27 -25
  48. package/src/lib/input-mask/llms.txt +10 -10
  49. package/src/lib/input-number/llms.txt +34 -34
  50. package/src/lib/input-otp/llms.txt +11 -11
  51. package/src/lib/knob/llms.txt +14 -14
  52. package/src/lib/listbox/llms.txt +8 -8
  53. package/src/lib/megamenu/llms.txt +13 -13
  54. package/src/lib/menu/llms.txt +26 -26
  55. package/src/lib/menubar/llms.txt +10 -10
  56. package/src/lib/meter-group/llms.txt +8 -8
  57. package/src/lib/order-list/llms.txt +8 -8
  58. package/src/lib/paginator/llms.txt +12 -12
  59. package/src/lib/panel/llms.txt +12 -12
  60. package/src/lib/password/llms.txt +12 -9
  61. package/src/lib/pick-list/llms.txt +8 -8
  62. package/src/lib/popover/llms.txt +8 -8
  63. package/src/lib/progress/llms.txt +6 -6
  64. package/src/lib/radio-group/llms.txt +5 -5
  65. package/src/lib/rating/llms.txt +6 -6
  66. package/src/lib/rich-text/llms.txt +51 -32
  67. package/src/lib/scroll-top/llms.txt +7 -7
  68. package/src/lib/select/llms.txt +26 -26
  69. package/src/lib/sidenav/llms.txt +24 -24
  70. package/src/lib/skeleton/llms.txt +6 -6
  71. package/src/lib/slider/llms.txt +17 -17
  72. package/src/lib/speed-dial/llms.txt +7 -7
  73. package/src/lib/spinner/llms.txt +5 -5
  74. package/src/lib/split-button/llms.txt +15 -15
  75. package/src/lib/splitter/llms.txt +11 -11
  76. package/src/lib/stepper/llms.txt +10 -10
  77. package/src/lib/switch/llms.txt +10 -10
  78. package/src/lib/switch-group/llms.txt +16 -16
  79. package/src/lib/tabs/llms.txt +10 -10
  80. package/src/lib/textarea/llms.txt +5 -5
  81. package/src/lib/timeline/llms.txt +10 -10
  82. package/src/lib/toast/llms.txt +10 -10
  83. package/src/lib/toolbar/llms.txt +31 -31
  84. package/src/lib/tooltip/llms.txt +21 -21
  85. package/src/lib/tree/llms.txt +6 -6
  86. package/types/konce-pt-angular.d.ts +316 -7
  87. package/types/konce-pt-angular.d.ts.map +1 -1
@@ -1,16 +1,16 @@
1
1
  # KptDatepicker (kpt-datepicker)
2
2
 
3
- Wybór daty/godziny z własnym kalendarzem (CDK Overlay), Signal Forms. Granulacja przez
4
- `selectionMode`: data (domyślnie), miesiąc+rok, rok, miesiąc, data+godzina, sama godzina.
5
- Panel jest stosem widoków **dekady → lata → miesiące → dni**: klik w komórkę schodzi poziom niżej,
6
- klik w tytuł wchodzi poziom wyżej. Poziom startowy ustawia `startView` — do daty urodzenia
7
- `startView="decade"` (dekada → rok → miesiąc → dzień, cztery kliknięcia zamiast setek strzałek).
8
- Godzina na tarczy zegara (dwa etapy: godziny → minuty, klik lub przeciąganie), format 12/24h.
9
- Wyświetlanie wg `displayFormat` ('pl'/'iso'). Tydzień od poniedziałku, dziś zaznaczone, zakres min/max.
10
- Wymaga stylów overlay CDK: `import '@angular/cdk/overlay-prebuilt.css';`
3
+ Picking a date/time with a custom calendar (CDK Overlay), Signal Forms. The granularity comes from
4
+ `selectionMode`: date (the default), month+year, year, month, date+time, time only.
5
+ The panel is a stack of views — **decade → years → months → days**: clicking a cell goes one level down,
6
+ clicking the title goes one level up. The starting level is set by `startView` — for a date of birth use
7
+ `startView="decade"` (decade → year → month → day, four clicks instead of hundreds of arrow presses).
8
+ The time is picked on a clock dial (two stages: hours → minutes, click or drag), in 12/24h format.
9
+ Display follows `displayFormat` ('pl'/'iso'). The week starts on Monday, today is marked, min/max range supported.
10
+ Requires the CDK overlay styles: `import '@angular/cdk/overlay-prebuilt.css';`
11
11
  Import: `import { KptDatepicker } from '@konce-pt/angular';`
12
12
 
13
- ## Użycie
13
+ ## Usage
14
14
  <kpt-datepicker [formField]="f.birthDate" startView="decade" minDate="1920-01-01" />
15
15
  <kpt-datepicker [formField]="f.date" minDate="1900-01-01" maxDate="2030-12-31" />
16
16
  <kpt-datepicker selectionMode="monthYear" [(value)]="period" />
@@ -18,50 +18,50 @@ Import: `import { KptDatepicker } from '@konce-pt/angular';`
18
18
  <kpt-datepicker selectionMode="datetime" [hourFormat]="12" [(value)]="meetingAt" />
19
19
  <kpt-datepicker selectionMode="time" [(value)]="alarm" />
20
20
 
21
- ## Wejścia
21
+ ## Inputs
22
22
  - `value`: model<string>; `minDate`/`maxDate`: string|null; `placeholder`: string
23
- - `selectionMode`: 'date' | 'monthYear' | 'year' | 'month' | 'datetime' | 'time' (domyślnie 'date').
24
- Format wartości zależny od trybu: 'RRRR-MM-DD' / 'RRRR-MM' / 'RRRR' / 'MM' / 'RRRR-MM-DDTHH:mm' (datetime) / 'HH:mm' (time).
25
- - `startView`: 'day' | 'month' | 'year' | 'decade' | null (domyślnie null) — poziom, od którego
26
- otwiera się panel. `null` = poziom, na którym tryb zatwierdza wartość: 'day' dla 'date'/'datetime',
27
- 'month' dla 'monthYear'/'month', 'year' dla 'year'. Poniżej tego poziomu nie zejdzie —
28
- `startView="day"` w trybie 'year' jest podnoszony do 'year'. Tryb 'month' zostaje na 'month'
29
- (wartość to samo 'MM', nie ma po czym nawigować), tryb 'time' ignoruje input.
30
- - `hourFormat`: 12 | 24 (domyślnie 24) — tarcza z AM/PM (12) lub pierścieniem 13–00 (24); wartość zawsze 24h.
31
- - `minuteStep`: number (domyślnie 1) — snap minut na tarczy.
32
- - `monthDisplay`: 'long' | 'number' (domyślnie 'long') — w trybie 'month' i etykietach miesięcy: słownie (styczeń) lub liczbą (01)
33
- - `displayFormat`: 'pl' | 'iso' (domyślnie 'pl') — format wyświetlania i domyślnego placeholdera
34
- - `disabled`/`invalid`/`touched`: boolean; output `touch`.
35
- - `open`: model (dwukierunkowe `[(open)]`, output `(openChange)`) — stan kalendarza. Pozwala otworzyć
36
- go z zewnątrz i wiedzieć, kiedy user skończył wybierać. Do tego drugiego **nie używaj `touch`**:
37
- leci on także z blur triggera, czyli już przy naciśnięciu myszy na dniu w panelu (panel jest
38
- w kontenerze CDK Overlay przy `<body>`, poza DOM-em kontrolki). Tak robi edycja inline
39
- w `kpt-data-table` — patrz `data-table/llms.txt`.
40
- - `ariaLabel`: string|null — nazwa dostępna, gdy pola nie opisuje `<label for>`
41
- (np. dwie godziny w jednym wierszu edytora). Bez niej czytnik ekranu ogłasza samą wartość.
42
- - Ikona w polu: kalendarz, a w trybie 'time' zegar.
43
- - Panel: przycisk czyszczenia (×), tarcza zegara z „Gotowe".
23
+ - `selectionMode`: 'date' | 'monthYear' | 'year' | 'month' | 'datetime' | 'time' (default 'date').
24
+ The value format depends on the mode: 'YYYY-MM-DD' / 'YYYY-MM' / 'YYYY' / 'MM' / 'YYYY-MM-DDTHH:mm' (datetime) / 'HH:mm' (time).
25
+ - `startView`: 'day' | 'month' | 'year' | 'decade' | null (default null) — the level the panel
26
+ opens at. `null` = the level at which the mode commits a value: 'day' for 'date'/'datetime',
27
+ 'month' for 'monthYear'/'month', 'year' for 'year'. It will not go below that level —
28
+ `startView="day"` in 'year' mode is raised to 'year'. The 'month' mode stays on 'month'
29
+ (the value is just 'MM', there is nothing to navigate), and the 'time' mode ignores the input.
30
+ - `hourFormat`: 12 | 24 (default 24) — an AM/PM dial (12) or one with a 13–00 ring (24); the value is always 24h.
31
+ - `minuteStep`: number (default 1) — minute snapping on the dial.
32
+ - `monthDisplay`: 'long' | 'number' (default 'long') — in 'month' mode and in month labels: as a word (January) or a number (01)
33
+ - `displayFormat`: 'pl' | 'iso' (default 'pl') — the display format and the default placeholder
34
+ - `disabled`/`invalid`/`touched`: boolean; the `touch` output.
35
+ - `open`: model (two-way `[(open)]`, the `(openChange)` output) — the calendar state. It lets you open
36
+ it from outside and know when the user is done choosing. For the latter **do not use `touch`**:
37
+ it also fires on the trigger's blur, that is, the moment the mouse goes down on a day in the panel (the panel
38
+ lives in a CDK Overlay container next to `<body>`, outside the control's DOM). That is what inline editing
39
+ in `kpt-data-table` does — see `data-table/llms.txt`.
40
+ - `ariaLabel`: string|null — the accessible name when no `<label for>` describes the field
41
+ (two times in one editor row, for instance). Without it a screen reader announces the value alone.
42
+ - The icon in the field: a calendar, and a clock in 'time' mode.
43
+ - The panel: a clear button (×), the clock dial with "Done".
44
44
 
45
- ## Zachowanie (stos widoków)
46
- Nagłówek panelu ma zawsze kształt `‹ tytuł ›`; strzałki przesuwają stronę bieżącego poziomu,
47
- a tytuł jest przyciskiem wchodzącym poziom wyżej:
45
+ ## Behavior (the view stack)
46
+ The panel header always has the shape `‹ title ›`; the arrows move the current level's page,
47
+ and the title is a button that goes one level up:
48
48
 
49
- dzień ‹ [czerwiec] [1979] › strzałki ±1 miesiąc; chipy → miesiące / lata
50
- miesiąc ‹ [1979] › strzałki ±1 rok; chip → lata
51
- rok ‹ [1970 – 1979] › strzałki ±10 lat; chip → dekady
52
- dekada ‹ 1920 – 2039 › strzałki ±120 lat; szczyt stosu, tytuł nieklikalny
49
+ day ‹ [June] [1979] › arrows ±1 month; the chips → months / years
50
+ month ‹ [1979] › arrows ±1 year; the chip → years
51
+ year ‹ [1970 – 1979] › arrows ±10 years; the chip → decades
52
+ decade ‹ 1920 – 2039 › arrows ±120 years; the top of the stack, the title is not clickable
53
53
 
54
- Strona lat to **pełna dekada** (10 komórek, 1970–1979), strona dekad to 12 dekad (1920–2039).
55
- Klik w komórkę powyżej poziomu zatwierdzania schodzi niżej; na poziomie zatwierdzania ustawia
56
- wartość i zamyka panel. Komórka obejmująca dziś dostaje obrys (jak „dziś" w siatce dni).
57
- Strzałka gaśnie (`disabled`), gdy cała sąsiednia strona wypada poza `minDate`/`maxDate`.
54
+ A year page is a **full decade** (10 cells, 1970–1979), a decade page holds 12 decades (1920–2039).
55
+ Clicking a cell above the committing level goes down; on the committing level it sets
56
+ the value and closes the panel. The cell containing today gets an outline (like "today" in the day grid).
57
+ An arrow dims (`disabled`) when the whole neighboring page falls outside `minDate`/`maxDate`.
58
58
 
59
59
  ## i18n
60
- Nazwy dni tygodnia i miesięcy są wyliczane z `Intl` wg aktywnego locale i18n (nie ze słownika).
61
- Etykiety nawigacji/aria („poprzednie dekady", „wybierz rok"…) i „Gotowe" z i18n
62
- (namespace `datepicker` + `common`). Domyślnie EN;
63
- konfiguracja przez `provideKptI18n` — patrz `i18n/llms.txt`. Uwaga: `displayFormat` ('pl'/'iso')
64
- steruje wyłącznie formatem daty i jest niezależny od języka etykiet.
60
+ Weekday and month names are derived from `Intl` per the active i18n locale (not from the dictionary).
61
+ The navigation/aria labels ("previous decades", "choose a year"…) and "Done" come from i18n
62
+ (the `datepicker` + `common` namespaces). English by default;
63
+ configured through `provideKptI18n` — see `i18n/llms.txt`. Note: `displayFormat` ('pl'/'iso')
64
+ controls the date format only and is independent of the label language.
65
65
 
66
- ## Tokeny
66
+ ## Tokens
67
67
  `--kpt-form-field-{bg,text,border,border-focus,border-error,radius}`.
@@ -1,68 +1,68 @@
1
- # KptDialog (kpt-dialog)
2
-
3
- Okno modalne na natywnym `<dialog>` (focus trap, Esc, backdrop w standardzie).
4
- Import: `import { KptDialog } from '@konce-pt/angular';`
5
-
6
- ## Selektor
7
- `kpt-dialog`
8
-
9
- ## Wejścia
10
- - `open`: model<boolean> — dwukierunkowe `[(open)]`
11
- - `header`: string; `dismissible`: boolean (Esc/× zamyka; domyślnie true)
12
-
13
- ## Sloty
14
- - treść domyślna → body; element z atrybutem `kptDialogFooter` → stopka
15
-
16
- ## Przykład
17
- <kpt-dialog [(open)]="confirmOpen" header="Usunąć?">
18
- Nieodwracalne.
19
- <div kptDialogFooter>
20
- <kpt-button variant="text" (click)="confirmOpen.set(false)">Anuluj</kpt-button>
21
- <kpt-button variant="danger" (click)="remove()">Usuń</kpt-button>
22
- </div>
23
- </kpt-dialog>
24
-
25
- ## Tokeny
26
- `--kpt-color-surface-raised`, `--kpt-color-overlay-scrim` (::backdrop), `--kpt-elevation-4`.
27
- Uwaga: globalny reset zeruje margin — komponent przywraca `margin:auto` (centrowanie).
28
-
29
- ## Kontrolki na CDK Overlay w środku okna
30
-
31
- `kpt-dialog` stoi na natywnym `<dialog>` i otwiera się przez `showModal()`, co wynosi je
32
- do **warstwy szczytowej** przeglądarki — a ta jest ponad całym drzewem dokumentu i żaden
33
- `z-index` jej nie przebije. Kontener CDK Overlay wisi domyślnie na `<body>`, więc panele
34
- `kpt-select`, `kpt-datepicker`, `kpt-autocomplete` i `kpt-menu` otwierałyby się w środku
35
- okna NIEWIDOCZNE, schowane za jego tłem.
36
-
37
- Dlatego `kpt-dialog` na czas otwarcia przenosi kontener overlayów do wnętrza `<dialog>`
38
- i oddaje go na miejsce przy zamknięciu (również gdy komponent zostanie zniszczony
39
- z otwartym oknem). Nie trzeba nic konfigurować — kontrolki overlayowe działają w oknie
40
- tak samo jak poza nim.
1
+ # KptDialog (kpt-dialog)
41
2
 
42
- ## Układ i przewijanie
3
+ A modal window on the native `<dialog>` (focus trap, Esc, a backdrop out of the box).
4
+ Import: `import { KptDialog } from '@konce-pt/angular';`
43
5
 
44
- Otwarte okno jest kolumną flex: nagłówek (`.kpt-dialog__header`) i stopka
45
- (`[kptDialogFooter]`) stoją nieruchomo, a przewija się wyłącznie `.kpt-dialog__body`.
46
- Pasek przewijania biegnie więc tylko wzdłuż treści, nie wzdłuż całego okna.
6
+ ## Selector
7
+ `kpt-dialog`
47
8
 
48
- Treść dostaje `flex: 0 1 auto` (domyślne) + `min-height: 0`, celowo **nie** `flex: 1`
49
- jak w `kpt-drawer`. Szuflada wypełnia wysokość ekranu, okno ma kurczyć się do treści:
50
- krótkie (`kpt-confirm` — dwa zdania i dwa przyciski) zostaje krótkie, długie zatrzymuje się
51
- na `max-height: calc(100vh - 4rem)` i przewija samą treść.
9
+ ## Inputs
10
+ - `open`: model<boolean> — two-way `[(open)]`
11
+ - `header`: string; `dismissible`: boolean (Esc/× closes it; default true)
52
12
 
53
- Deklaracja `display: flex` jest scopowana `&[open]` i musi taka zostać. Regułę
54
- `dialog:not([open]) { display: none }` daje arkusz przeglądarki, a każda deklaracja
55
- autorska ją bije — także z `@layer`. Niescopowane `display: flex` zostawiłoby wszystkie
56
- zamknięte okna widoczne na stronie.
13
+ ## Slots
14
+ - the default content → the body; an element with the `kptDialogFooter` attribute → the footer
57
15
 
58
- `.kpt-dialog` nie dostaje `overflow: hidden` — kontener CDK Overlay jest na czas otwarcia
59
- przeniesiony do wnętrza `<dialog>` (patrz sekcja wyżej), więc przycięcie okna ucięłoby
60
- panele `kpt-select` czy `kpt-datepicker`. Do samego przewijania nie jest potrzebne:
61
- po przejściu na flex nic nie wystaje poza okno.
16
+ ## Example
17
+ <kpt-dialog [(open)]="confirmOpen" header="Delete this?">
18
+ This cannot be undone.
19
+ <div kptDialogFooter>
20
+ <kpt-button variant="text" (click)="confirmOpen.set(false)">Cancel</kpt-button>
21
+ <kpt-button variant="danger" (click)="remove()">Delete</kpt-button>
22
+ </div>
23
+ </kpt-dialog>
62
24
 
63
- Przypięty pasek akcji wewnątrz treści (np. „Anuluj / Zapisz" w `kpt-map-create-dialog`)
64
- robi się przez `position: sticky` — kontenerem przewijania jest `.kpt-dialog__body`.
65
- Ujemne marginesy boczne muszą zgadzać się z jego paddingiem (`--kpt-space-6`),
66
- a przesunięcie `bottom` musi być lustrem ujemnego marginesu dolnego
67
- (`bottom: calc(var(--kpt-space-6) * -1)`) — przyklejanie liczy się dla marginesowego
68
- pudełka, więc przy `bottom: 0` pod paskiem przesuwałby się skrawek treści.
25
+ ## Tokens
26
+ `--kpt-color-surface-raised`, `--kpt-color-overlay-scrim` (::backdrop), `--kpt-elevation-4`.
27
+ Note: the global reset zeroes the margin — the component restores `margin:auto` (centering).
28
+
29
+ ## CDK Overlay controls inside the dialog
30
+
31
+ `kpt-dialog` stands on the native `<dialog>` and opens through `showModal()`, which lifts it
32
+ into the browser's **top layer** — and that sits above the entire document tree, where no
33
+ `z-index` can reach it. The CDK Overlay container hangs off `<body>` by default, so the panels of
34
+ `kpt-select`, `kpt-datepicker`, `kpt-autocomplete` and `kpt-menu` would open inside the
35
+ dialog INVISIBLE, hidden behind its background.
36
+
37
+ That is why, while it is open, `kpt-dialog` moves the overlay container inside the `<dialog>`
38
+ and puts it back on close (including when the component is destroyed
39
+ with the dialog open). Nothing needs configuring — overlay controls behave inside the dialog
40
+ exactly as they do outside it.
41
+
42
+ ## Layout and scrolling
43
+
44
+ An open dialog is a flex column: the header (`.kpt-dialog__header`) and the footer
45
+ (`[kptDialogFooter]`) stay put, and only `.kpt-dialog__body` scrolls.
46
+ The scrollbar therefore runs alongside the content, not alongside the whole dialog.
47
+
48
+ The content gets `flex: 0 1 auto` (the default) + `min-height: 0`, deliberately **not** `flex: 1`
49
+ as in `kpt-drawer`. A drawer fills the height of the screen, a dialog is meant to shrink to its content:
50
+ a short one (`kpt-confirm` — two sentences and two buttons) stays short, a long one stops
51
+ at `max-height: calc(100vh - 4rem)` and scrolls the content alone.
52
+
53
+ The `display: flex` declaration is scoped with `&[open]` and has to stay that way. The
54
+ `dialog:not([open]) { display: none }` rule comes from the browser stylesheet, and any author
55
+ declaration beats it — including one inside `@layer`. An unscoped `display: flex` would leave every
56
+ closed dialog visible on the page.
57
+
58
+ `.kpt-dialog` does not get `overflow: hidden` — while it is open the CDK Overlay container is
59
+ moved inside the `<dialog>` (see the section above), so clipping the dialog would cut off the
60
+ panels of `kpt-select` or `kpt-datepicker`. It is not needed for scrolling either:
61
+ once it is a flex column, nothing sticks out of the dialog.
62
+
63
+ A pinned action bar inside the content (say "Cancel / Save" in `kpt-map-create-dialog`)
64
+ is done with `position: sticky` — the scrolling container is `.kpt-dialog__body`.
65
+ The negative side margins have to match its padding (`--kpt-space-6`),
66
+ and the `bottom` offset has to mirror the negative bottom margin
67
+ (`bottom: calc(var(--kpt-space-6) * -1)`) — stickiness is computed for the margin
68
+ box, so with `bottom: 0` a sliver of content would slide underneath the bar.
@@ -1,19 +1,19 @@
1
1
  # KptDivider (kpt-divider)
2
2
 
3
- Separator (linia pozioma lub pionowa). `role="separator"`.
3
+ A separator (a horizontal or vertical line). `role="separator"`.
4
4
  Import: `import { KptDivider } from '@konce-pt/angular';`
5
5
 
6
- ## Selektor
6
+ ## Selector
7
7
  `kpt-divider`
8
8
 
9
- ## Wejścia
10
- - `orientation`: 'horizontal' | 'vertical' (domyślnie 'horizontal')
11
- - `inset`: boolean — odstęp od krawędzi kontenera
9
+ ## Inputs
10
+ - `orientation`: 'horizontal' | 'vertical' (default 'horizontal')
11
+ - `inset`: boolean — inset from the container edges
12
12
 
13
- ## Przykład
13
+ ## Example
14
14
  <kpt-divider />
15
15
  <kpt-divider inset />
16
- <kpt-divider orientation="vertical" /> <!-- w kontenerze flex -->
16
+ <kpt-divider orientation="vertical" /> <!-- inside a flex container -->
17
17
 
18
- ## Tokeny
19
- Kolor z `--kpt-color-border`. Pionowy wymaga rodzica flex (align-self: stretch).
18
+ ## Tokens
19
+ Color from `--kpt-color-border`. The vertical one needs a flex parent (align-self: stretch).
@@ -1,26 +1,26 @@
1
1
  # KptDrawer (kpt-drawer)
2
2
 
3
- Panel wysuwany (drawer / off-canvas) sterowany sygnałem `open`. Niezależny od app-shell
4
- (pozycja fixed + backdrop, animacja transform). Import: `import { KptDrawer } from '@konce-pt/angular';`
3
+ A sliding panel (drawer / off-canvas) driven by the `open` signal. Independent of the app shell
4
+ (fixed position + a backdrop, a transform animation). Import: `import { KptDrawer } from '@konce-pt/angular';`
5
5
 
6
- ## Wejścia / model
7
- - `open`: model<boolean> (dwukierunkowe)
6
+ ## Inputs / model
7
+ - `open`: model<boolean> (two-way)
8
8
  - `position`: 'left' | 'right' | 'top' | 'bottom' (KptDrawerPosition)
9
- - `header`: string; `dismissible`: boolean (× i Esc); `closeOnBackdrop`: boolean
10
- - Treść przez projekcję `<ng-content>`.
9
+ - `header`: string; `dismissible`: boolean (× and Esc); `closeOnBackdrop`: boolean
10
+ - Content through the `<ng-content>` projection.
11
11
 
12
- ## Przykład
12
+ ## Example
13
13
  <kpt-button (click)="menuOpen.set(true)">Menu</kpt-button>
14
- <kpt-drawer [(open)]="menuOpen" position="right" header="Filtry">…</kpt-drawer>
14
+ <kpt-drawer [(open)]="menuOpen" position="right" header="Filters">…</kpt-drawer>
15
15
 
16
- ## Stan zamknięty / a11y
17
- Panel jest zawsze w DOM (bez `@if`), chowany `transform` **i** `visibility: hidden` — bez
18
- `display: none`, żeby zachować animację wjazdu i wyjazdu. `visibility` wyjmuje zamknięty panel
19
- z kolejki Tab i z drzewa dostępności bez `inert`, i to już na pierwszej klatce, bez czekania
20
- na JavaScript. Obie deklaracje stanu zamkniętego siedzą w regule **bazowej**, nie w
21
- `[data-position]` — atrybut pozycji Angular ustawia dopiero w przebiegu aktualizacji, więc panel
22
- warunkowany atrybutem mignąłby na ekranie i wyjechał animacją. `prefers-reduced-motion: reduce`
23
- zdejmuje przejścia.
16
+ ## The closed state / a11y
17
+ The panel is always in the DOM (no `@if`), hidden with `transform` **and** `visibility: hidden` — never
18
+ `display: none`, so that the slide-in and slide-out animations survive. `visibility` takes the closed panel
19
+ out of the tab order and out of the accessibility tree without `inert`, and it does so on the very first frame,
20
+ without waiting for JavaScript. Both closed-state declarations live in the **base** rule, not in
21
+ `[data-position]` — Angular only sets the position attribute during the update pass, so a panel gated on that
22
+ attribute would flash on screen and then animate away. `prefers-reduced-motion: reduce`
23
+ drops the transitions.
24
24
 
25
- ## Tokeny
26
- Panel `--kpt-color-surface-raised`, `--kpt-elevation-4`; backdrop półprzezroczysty.
25
+ ## Tokens
26
+ The panel `--kpt-color-surface-raised`, `--kpt-elevation-4`; a semi-transparent backdrop.
@@ -1,17 +1,17 @@
1
1
  # KptEmpty (kpt-empty)
2
2
 
3
- Stan pusty (empty state) — ikona, tytuł, opis i opcjonalne akcje (projekcja).
3
+ An empty state — an icon, a title, a description and optional actions (content projection).
4
4
  Import: `import { KptEmpty } from '@konce-pt/angular';`
5
5
 
6
- ## Wejścia
7
- - `icon`: string | null (domyślnie 'info-circle')
6
+ ## Inputs
7
+ - `icon`: string | null (default 'info-circle')
8
8
  - `title`: string; `description`: string
9
- - Akcje: `<ng-content>` (np. przyciski).
9
+ - Actions: `<ng-content>` (buttons, for instance).
10
10
 
11
- ## Przykład
12
- <kpt-empty icon="search" title="Brak wyników" description="Zmień kryteria.">
13
- <kpt-button>Wyczyść filtry</kpt-button>
11
+ ## Example
12
+ <kpt-empty icon="search" title="No results" description="Change your criteria.">
13
+ <kpt-button>Clear filters</kpt-button>
14
14
  </kpt-empty>
15
15
 
16
- ## Tokeny
17
- Ikona w kółku `--kpt-color-muted`; tekst `--kpt-color-on-surface(-muted)`.
16
+ ## Tokens
17
+ The icon sits in a `--kpt-color-muted` circle; text `--kpt-color-on-surface(-muted)`.
@@ -1,18 +1,18 @@
1
1
  # KptFab (kpt-fab)
2
2
 
3
- Floating Action Button — okrągły, wyniesiony przycisk akcji. Import: `import { KptFab } from '@konce-pt/angular';`
3
+ A floating action button — a round, raised action button. Import: `import { KptFab } from '@konce-pt/angular';`
4
4
 
5
- ## Wejścia
6
- - `variant`: 'filled' | 'tonal' (domyślnie 'filled')
7
- - `size`: 'md' | 'mini' (domyślnie 'md')
8
- - `extended`: boolean (pigułka z tekstem)
5
+ ## Inputs
6
+ - `variant`: 'filled' | 'tonal' (default 'filled')
7
+ - `size`: 'md' | 'mini' (default 'md')
8
+ - `extended`: boolean (a pill with text)
9
9
  - `disabled`: boolean; `type`: 'button' | 'submit' | 'reset'
10
- - `ariaLabel`: string (wymagane dla wariantu okrągłego, bez tekstu)
10
+ - `ariaLabel`: string (required for the round, textless variant)
11
11
 
12
- ## Przykład
13
- <kpt-fab ariaLabel="Dodaj"><kpt-icon name="plus" /></kpt-fab>
14
- <kpt-fab extended><kpt-icon name="plus" /> Nowy</kpt-fab>
15
- <kpt-fab variant="tonal" size="mini" ariaLabel="Edytuj"><kpt-icon name="copy" /></kpt-fab>
12
+ ## Example
13
+ <kpt-fab ariaLabel="Add"><kpt-icon name="plus" /></kpt-fab>
14
+ <kpt-fab extended><kpt-icon name="plus" /> New</kpt-fab>
15
+ <kpt-fab variant="tonal" size="mini" ariaLabel="Edit"><kpt-icon name="copy" /></kpt-fab>
16
16
 
17
- ## Tokeny
18
- Tło `--kpt-color-primary` / `--kpt-color-primary-container` (tonal); cień `--kpt-elevation-3`.
17
+ ## Tokens
18
+ Background `--kpt-color-primary` / `--kpt-color-primary-container` (tonal); shadow `--kpt-elevation-3`.
@@ -1,17 +1,17 @@
1
1
  # KptFieldset (kpt-fieldset)
2
2
 
3
- Grupa pól z legendą (`<fieldset>`+`<legend>`), opcjonalnie zwijana.
3
+ A group of fields with a legend (`<fieldset>`+`<legend>`), optionally collapsible.
4
4
  Import: `import { KptFieldset } from '@konce-pt/angular';`
5
5
 
6
- ## Wejścia / model
6
+ ## Inputs / model
7
7
  - `legend`: string
8
8
  - `toggleable`: boolean; `collapsed`: model<boolean>
9
- - `animated`: boolean (domyślnie true) — animacja zwijania (CSS grid, czysty CSS)
10
- - `animationDuration`: number (domyślnie 500) — czas animacji w ms
11
- - Treść: `<ng-content>`.
9
+ - `animated`: boolean (default true) — the collapse animation (CSS grid, pure CSS)
10
+ - `animationDuration`: number (default 500) — animation time in ms
11
+ - Content: `<ng-content>`.
12
12
 
13
- ## Przykład
14
- <kpt-fieldset legend="Dane osobowe" toggleable>…</kpt-fieldset>
13
+ ## Example
14
+ <kpt-fieldset legend="Personal details" toggleable>…</kpt-fieldset>
15
15
 
16
- ## Tokeny
17
- Ramka `--kpt-color-border`; radius `--kpt-radius-md`.
16
+ ## Tokens
17
+ Border `--kpt-color-border`; radius `--kpt-radius-md`.
@@ -1,23 +1,23 @@
1
1
  # KptFileUpload (kpt-file-upload)
2
2
 
3
- Wgrywanie plików (drag-drop + wybór) na Signal Forms. Wartość = File[].
3
+ File upload (drag-and-drop + picker) on Signal Forms. The value is a File[].
4
4
  Import: `import { KptFileUpload } from '@konce-pt/angular';`
5
5
 
6
- ## Wejścia / model
7
- - `value`: model<File[]> (lub `formField`)
8
- - `accept`: string (np. 'image/*')
6
+ ## Inputs / model
7
+ - `value`: model<File[]> (or `formField`)
8
+ - `accept`: string (e.g. 'image/*')
9
9
  - `multiple`: boolean
10
10
  - `disabled`/`invalid`/`touched`: boolean; `touch`: output
11
11
 
12
- ## Przykład
12
+ ## Example
13
13
  <kpt-file-upload [formField]="f.files" accept="image/*" multiple />
14
14
  <kpt-file-upload [(value)]="files" />
15
15
 
16
16
  files = signal<File[]>([]);
17
17
 
18
- ## Zachowanie
19
- Strefa reaguje na klik i na przeciągnięcie plików. Przy `multiple=false` przechowuje tylko pierwszy plik.
20
- Lista plików pokazuje nazwę, rozmiar i przycisk usuwania.
18
+ ## Behavior
19
+ The zone responds both to a click and to files dragged onto it. With `multiple=false` it keeps only the first file.
20
+ The file list shows the name, the size and a remove button.
21
21
 
22
- ## Tokeny
23
- Strefa `--kpt-form-field-border` (przerywana), stan dragover `--kpt-color-primary`.
22
+ ## Tokens
23
+ The zone uses `--kpt-form-field-border` (dashed), the dragover state `--kpt-color-primary`.
@@ -1,40 +1,40 @@
1
1
  # KptFormField (kpt-form-field)
2
2
 
3
- Wrapper pola formularza: etykieta, podpowiedź i komunikat błędu wokół dowolnej kontrolki
4
- (np. `kpt-input`). Prezentacyjny — stan błędu przekazuje się przez `error`.
3
+ A form field wrapper: the label, the hint and the error message around any control
4
+ (`kpt-input`, for instance). Presentational — the error state is passed in through `error`.
5
5
  Import: `import { KptFormField } from '@konce-pt/angular';`
6
6
 
7
- ## Selektor
7
+ ## Selector
8
8
  `kpt-form-field`
9
9
 
10
- ## Wejścia (input signals)
11
- - `label`: string — tekst etykiety
12
- - `hint`: string — podpowiedź (ukrywana, gdy jest błąd)
13
- - `error`: string | null — komunikat błędu; gdy niepusty, pole jest oznaczone jako nieprawidłowe
14
- - `required`: boolean — gwiazdka przy etykiecie
15
- - `controlId`: string — id kontrolki dla powiązania `label[for]`
16
- - `labelType`: 'fixed' | 'over' | 'in' | 'on' — wariant etykiety (domyślnie `fixed`)
17
-
18
- ## Warianty etykiety (labelType)
19
- - `fixed` (domyślny) — statyczna etykieta nad kontrolką (jak dotychczas).
20
- - `over` — Float Label: etykieta unosi się nad obramowanie pola.
21
- - `in` — Float Label: etykieta unosi się do górnej części wewnątrz pola (pole wyższe, styl „filled").
22
- - `on` — Float Label: etykieta siada na górnym obramowaniu (notch, styl „outlined").
23
-
24
- Warianty float mają animowane przejście etykiety (pozycja spoczynkowa w miejscu placeholdera →
25
- uniesiona). Uniesienie następuje przy focusie kontrolki **lub** gdy pole ma wartość. Wykrywanie
26
- wypełnienia jest po stronie komponentu (zdarzenia `input`/`change` + wartość początkowa) — **nie**
27
- wymaga ustawiania placeholdera na kontrolce.
10
+ ## Inputs (input signals)
11
+ - `label`: string — the label text
12
+ - `hint`: string — a hint (hidden while there is an error)
13
+ - `error`: string | null — the error message; when non-empty, the field is marked invalid
14
+ - `required`: boolean — an asterisk next to the label
15
+ - `controlId`: string — the control's id, for the `label[for]` association
16
+ - `labelType`: 'fixed' | 'over' | 'in' | 'on' — the label variant (default `fixed`)
17
+
18
+ ## Label variants (labelType)
19
+ - `fixed` (the default) — a static label above the control (as before).
20
+ - `over` — a float label: the label rises above the field's border.
21
+ - `in` — a float label: the label rises into the upper part inside the field (a taller field, the "filled" style).
22
+ - `on` — a float label: the label sits on the top border (a notch, the "outlined" style).
23
+
24
+ The float variants animate the label's transition (from its resting position where the placeholder is →
25
+ raised). It rises when the control takes focus **or** when the field has a value. Detecting whether
26
+ it is filled happens inside the component (`input`/`change` events + the initial value) — it does **not**
27
+ require setting a placeholder on the control.
28
28
 
29
29
  <kpt-form-field label="E-mail" labelType="over">
30
30
  <kpt-input />
31
31
  </kpt-form-field>
32
32
 
33
- ### Kontrolki bez natywnego `input`/`textarea`
33
+ ### Controls with no native `input`/`textarea`
34
34
 
35
- Wartości `kpt-select` nie da się odczytać z DOM (panel żyje w overlayu), więc taka kontrolka
36
- zgłasza wypełnienie sama — dostarcza token `KPT_FORM_FIELD_CONTROL` z sygnałem `filled`.
37
- `kpt-select` robi to z pudełka; własna kontrolka wymaga:
35
+ The value of `kpt-select` cannot be read from the DOM (the panel lives in an overlay), so such a control
36
+ reports being filled itself — it provides the `KPT_FORM_FIELD_CONTROL` token with a `filled` signal.
37
+ `kpt-select` does this out of the box; a custom control needs:
38
38
 
39
39
  import { KPT_FORM_FIELD_CONTROL, type KptFormFieldControl } from '@konce-pt/angular';
40
40
 
@@ -45,36 +45,36 @@ zgłasza wypełnienie sama — dostarcza token `KPT_FORM_FIELD_CONTROL` z sygna
45
45
  readonly filled = computed(() => this.value() != null);
46
46
  }
47
47
 
48
- Gdy kontrolka dostarczy token, `kpt-form-field` przestaje zaglądać do DOM i ufa wyłącznie
49
- sygnałowi `filled` — dlatego etykieta unosi się natychmiast po zmianie wartości.
48
+ Once a control provides the token, `kpt-form-field` stops looking into the DOM and trusts the
49
+ `filled` signal alone — which is why the label rises the instant the value changes.
50
50
 
51
- ## Projekcja
52
- Kontrolkę umieszcza się w treści (ng-content):
51
+ ## Content projection
52
+ The control goes into the content (ng-content):
53
53
 
54
- <kpt-form-field label="E-mail" [error]="emailError()" hint="Adres firmowy" required controlId="f-email">
54
+ <kpt-form-field label="E-mail" [error]="emailError()" hint="Your work address" required controlId="f-email">
55
55
  <kpt-input [formField]="loginForm.email" type="email" id="f-email" />
56
56
  </kpt-form-field>
57
57
 
58
- ## Integracja z Signal Forms
59
- `error` zwykle pochodzi z pola formularza, np.:
58
+ ## Integration with Signal Forms
59
+ `error` usually comes from a form field, for example:
60
60
 
61
61
  emailError = computed(() => {
62
62
  const s = loginForm.email();
63
63
  return s.touched() && s.invalid() ? s.errors()[0]?.message ?? null : null;
64
64
  });
65
65
 
66
- Bramka `touched()` dotyczy wyłącznie komunikatu — walidatorów nie warunkuj (`when:` na
67
- `state.touched()` sprawia, że `valid()` kłamie na nietkniętym formularzu). Kontrolki `kpt-*`
68
- same bramkują swój stan wizualny tak samo. Pełny przepływ submit: sekcja
69
- `## Formularz od zera (Signal Forms)` w głównym llms.txt.
66
+ The `touched()` gate applies to the message only — do not gate the validators (`when:` on
67
+ `state.touched()` makes `valid()` lie on an untouched form). The `kpt-*` controls gate their own
68
+ visual state the same way. The full submit flow: the
69
+ `## A form from scratch (Signal Forms)` section in the root llms.txt.
70
70
 
71
- ## Tokeny
71
+ ## Tokens
72
72
  `--kpt-form-field-label`, `--kpt-form-field-hint`, `--kpt-form-field-error`, `--kpt-color-danger`.
73
- Warianty float dodatkowo: `--kpt-form-field-placeholder` (etykieta spoczynkowa),
74
- `--kpt-form-field-border-focus` (uniesiona), `--kpt-form-field-border-error` (stan błędu),
75
- `--kpt-form-field-bg` (maska notcha w `on`). Animacja: `--kpt-motion-duration-fast`,
76
- `--kpt-motion-easing-standard`; respektuje `prefers-reduced-motion`.
77
-
78
- ## Dostępność
79
- - Komunikat błędu ma `role="alert"`.
80
- - Powiąż `controlId` z `id` kontrolki, aby etykieta była klikalna (`label[for]`).
73
+ The float variants add: `--kpt-form-field-placeholder` (the resting label),
74
+ `--kpt-form-field-border-focus` (raised), `--kpt-form-field-border-error` (the error state),
75
+ `--kpt-form-field-bg` (the notch mask in `on`). Animation: `--kpt-motion-duration-fast`,
76
+ `--kpt-motion-easing-standard`; it respects `prefers-reduced-motion`.
77
+
78
+ ## Accessibility
79
+ - The error message carries `role="alert"`.
80
+ - Tie `controlId` to the control's `id` so the label is clickable (`label[for]`).