@konce-pt/angular 0.5.0 → 0.6.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/README.md +3 -1
- package/dist/README.md +3 -1
- package/dist/charts/src/lib/llms.txt +51 -0
- package/dist/fesm2022/konce-pt-angular-grid.mjs +218 -0
- package/dist/fesm2022/konce-pt-angular-grid.mjs.map +1 -0
- package/dist/grid/src/lib/llms.txt +91 -0
- package/dist/package.json +5 -1
- package/dist/types/konce-pt-angular-grid.d.ts +136 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ npm i @konce-pt/angular @konce-pt/tokens @konce-pt/styles @angular/cdk
|
|
|
41
41
|
# or: pnpm add / yarn add
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
`@angular/core`, `@angular/common` and `@angular/forms` (all `^22`) are already in an Angular app; **`@angular/cdk` (`^22`) is a required peer** — overlay components (select, autocomplete, datepicker, date-range, dialog, drawer, tooltip, popover, menu…) build on the CDK Overlay — so install it explicitly (above). Optional: `@konce-pt/validators` for the Polish-market validators (NIP, REGON, PESEL, IBAN, postal code).
|
|
44
|
+
`@angular/core`, `@angular/common` and `@angular/forms` (all `^22`) are already in an Angular app; **`@angular/cdk` (`^22`) is a required peer** — overlay components (select, autocomplete, datepicker, date-range, dialog, drawer, tooltip, popover, menu…) build on the CDK Overlay — so install it explicitly (above). Optional: `@konce-pt/validators` for the Polish-market validators (NIP, REGON, PESEL, IBAN, postal code). Optional: [`@konce-pt/grid`](https://www.npmjs.com/package/@konce-pt/grid) for the mobile-first layout system — its Angular directives live in `@konce-pt/angular/grid`.
|
|
45
45
|
|
|
46
46
|
## Setup
|
|
47
47
|
|
|
@@ -280,6 +280,8 @@ Język UI to domyślnie **angielski** i działa **bez żadnej konfiguracji** —
|
|
|
280
280
|
|
|
281
281
|
Motyw ciemny: `<html data-theme="dark">`; nadpisania `--kpt-color-*` w `styles.scss`. Pełny zestaw ikon Tabler: `provideKptTablerIcons()` z `@konce-pt/angular/icons`.
|
|
282
282
|
|
|
283
|
+
Układ strony: `@konce-pt/grid` (osobna paczka CSS) plus dyrektywy `[kptGrid]`, `[kptCol]`, `[kptFlex]` z `@konce-pt/angular/grid` — siatka mobile-first, utilities flexbox i opcjonalne container queries.
|
|
284
|
+
|
|
283
285
|
### Internacjonalizacja (i18n)
|
|
284
286
|
|
|
285
287
|
Etykiety komponentów są dostępne po **angielsku (domyślnie)** i **polsku**. Serwis `KptI18n` jest `providedIn: 'root'`, więc **angielski działa od razu, bez providera**. `provideKptI18n(...)` wołasz tylko, by wystartować po polsku (lub w innym języku) albo zarejestrować/nadpisać słowniki. Wszystkie napisy (aria-label, stany puste, paginator, kalendarze, menu edytora) pochodzą z tego serwisu opartego o sygnały — zmiana języka odświeża UI natychmiast (zoneless).
|
package/dist/README.md
CHANGED
|
@@ -41,7 +41,7 @@ npm i @konce-pt/angular @konce-pt/tokens @konce-pt/styles @angular/cdk
|
|
|
41
41
|
# or: pnpm add / yarn add
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
`@angular/core`, `@angular/common` and `@angular/forms` (all `^22`) are already in an Angular app; **`@angular/cdk` (`^22`) is a required peer** — overlay components (select, autocomplete, datepicker, date-range, dialog, drawer, tooltip, popover, menu…) build on the CDK Overlay — so install it explicitly (above). Optional: `@konce-pt/validators` for the Polish-market validators (NIP, REGON, PESEL, IBAN, postal code).
|
|
44
|
+
`@angular/core`, `@angular/common` and `@angular/forms` (all `^22`) are already in an Angular app; **`@angular/cdk` (`^22`) is a required peer** — overlay components (select, autocomplete, datepicker, date-range, dialog, drawer, tooltip, popover, menu…) build on the CDK Overlay — so install it explicitly (above). Optional: `@konce-pt/validators` for the Polish-market validators (NIP, REGON, PESEL, IBAN, postal code). Optional: [`@konce-pt/grid`](https://www.npmjs.com/package/@konce-pt/grid) for the mobile-first layout system — its Angular directives live in `@konce-pt/angular/grid`.
|
|
45
45
|
|
|
46
46
|
## Setup
|
|
47
47
|
|
|
@@ -280,6 +280,8 @@ Język UI to domyślnie **angielski** i działa **bez żadnej konfiguracji** —
|
|
|
280
280
|
|
|
281
281
|
Motyw ciemny: `<html data-theme="dark">`; nadpisania `--kpt-color-*` w `styles.scss`. Pełny zestaw ikon Tabler: `provideKptTablerIcons()` z `@konce-pt/angular/icons`.
|
|
282
282
|
|
|
283
|
+
Układ strony: `@konce-pt/grid` (osobna paczka CSS) plus dyrektywy `[kptGrid]`, `[kptCol]`, `[kptFlex]` z `@konce-pt/angular/grid` — siatka mobile-first, utilities flexbox i opcjonalne container queries.
|
|
284
|
+
|
|
283
285
|
### Internacjonalizacja (i18n)
|
|
284
286
|
|
|
285
287
|
Etykiety komponentów są dostępne po **angielsku (domyślnie)** i **polsku**. Serwis `KptI18n` jest `providedIn: 'root'`, więc **angielski działa od razu, bez providera**. `provideKptI18n(...)` wołasz tylko, by wystartować po polsku (lub w innym języku) albo zarejestrować/nadpisać słowniki. Wszystkie napisy (aria-label, stany puste, paginator, kalendarze, menu edytora) pochodzą z tego serwisu opartego o sygnały — zmiana języka odświeża UI natychmiast (zoneless).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# KptChart (kpt-chart)
|
|
2
|
+
|
|
3
|
+
Wykres SVG w czystym Angularze (sygnały, zoneless), bez zależności typu Chart.js/D3.
|
|
4
|
+
Rdzeń obliczeń to czysty TypeScript (przenośny do React w Fazie 2).
|
|
5
|
+
Import: `import { KptChart } from '@konce-pt/angular/charts';`
|
|
6
|
+
|
|
7
|
+
## Typy wykresów (config.type)
|
|
8
|
+
- `line` — liniowy; interpolacja `linear` | `cubic` | `cubic-monotonic`; `area?: boolean`, `points?: boolean`,
|
|
9
|
+
`crosshair?: boolean` (hover punktu → pionowa prowadnica + podświetlona pigułka etykiety osi X)
|
|
10
|
+
- `bar` — słupkowy; `orientation: 'vertical' | 'horizontal'`, `borderRadius?: px`
|
|
11
|
+
- `pie` — kołowy
|
|
12
|
+
- `doughnut` — pierścieniowy; `innerRadius?: 0..1` (domyślnie 0.6)
|
|
13
|
+
- `polarArea` — równe kąty, promień ∝ wartość
|
|
14
|
+
- `radar` — osie promieniowe + wielokąt serii
|
|
15
|
+
|
|
16
|
+
## Wejścia
|
|
17
|
+
- `config: KptChartConfig` (wymagane) — jeden obiekt sterujący całością
|
|
18
|
+
- `width` / `height`: jednostki viewBoxa (600×360); wykres skaluje się do kontenera
|
|
19
|
+
|
|
20
|
+
## KptChartConfig (skrót)
|
|
21
|
+
- `labels: string[]`, `series: { name; data: number[]; color? }[]`
|
|
22
|
+
- `legend`: `{ display?, position: top|bottom|left|right, align: start|center|end, pointStyle: circle|rect|rectRot|triangle|line, title? }`
|
|
23
|
+
- `title` / `subtitle`: `{ display?, text, align, color?, font?, padding? }`
|
|
24
|
+
- `tooltip`: `{ enabled?, format?(ctx: {series,label,value}): string }`
|
|
25
|
+
- `animation`: `{ enabled?, duration=400, delay=0, stagger=60 }`
|
|
26
|
+
|
|
27
|
+
## Interakcje
|
|
28
|
+
- Hover na punkcie/słupku/wycinku → tooltip (seria, etykieta, wartość); dymek clampowany do krawędzi.
|
|
29
|
+
- Klik w legendę → ukrycie/pokazanie serii (pie/doughnut/polar: ukrycie wycinka) z przeliczeniem skali.
|
|
30
|
+
- Hover na legendzie → podświetlenie serii, wygaszenie pozostałych.
|
|
31
|
+
|
|
32
|
+
## Animacje
|
|
33
|
+
Linia: `stroke-dasharray/offset`. Słupki: `scaleY/scaleX` (origin od osi). Wycinki/radar: `scale` od środka.
|
|
34
|
+
Stagger `delay = index * stagger`. Wyłączane przez `animation.enabled=false` i `prefers-reduced-motion`.
|
|
35
|
+
|
|
36
|
+
## Przykład
|
|
37
|
+
<kpt-chart [config]="{
|
|
38
|
+
type: 'line',
|
|
39
|
+
labels: ['Sty','Lut','Mar'],
|
|
40
|
+
series: [{ name: 'Sprzedaż', data: [12, 19, 7] }],
|
|
41
|
+
interpolation: 'cubic-monotonic',
|
|
42
|
+
legend: { position: 'top' }
|
|
43
|
+
}" />
|
|
44
|
+
|
|
45
|
+
## Tokeny / stylowanie
|
|
46
|
+
Paleta z tokenów semantycznych (`--kpt-color-primary|info|success|warning|danger` + skala).
|
|
47
|
+
SCSS w `@layer kpt.components`, klasy `kpt-chart__*`. Kolory serii nadpisywalne przez `series[].color`.
|
|
48
|
+
|
|
49
|
+
## Rdzeń (pure TS, opcjonalnie)
|
|
50
|
+
Eksport funkcji: `linePath`, `areaPath`, `barLayout`, `pieSlices`, `polarSlices`, `radarGrid`,
|
|
51
|
+
`radarPoints`, `niceScale`, `seriesColor`, `KPT_CHART_PALETTE` — do własnych rozszerzeń/SSR.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Siatka Koncept UI — CSS Grid sterowany custom properties z `@konce-pt/grid`.
|
|
6
|
+
* Dyrektywa, nie komponent: nie dokłada elementu do DOM i działa na dowolnym
|
|
7
|
+
* tagu (`<section>`, `<ul>`, `<main>`). Alias `kpt-grid` dla zgodności.
|
|
8
|
+
*
|
|
9
|
+
* Zmiana `columns` nie manipuluje klasami — ustawia zmienną inline, a układ
|
|
10
|
+
* przelicza natywny silnik CSS.
|
|
11
|
+
*
|
|
12
|
+
* Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <div kptGrid [columns]="18" gap="1.5rem">
|
|
16
|
+
* <div [kptCol]="18" [kptColLg]="5">Sidebar</div>
|
|
17
|
+
* <div [kptCol]="18" [kptColLg]="13">Treść</div>
|
|
18
|
+
* </div>
|
|
19
|
+
*/
|
|
20
|
+
class KptGrid {
|
|
21
|
+
/** Liczba kolumn — baza mobile-first. Domyślnie 12 (z CSS). */
|
|
22
|
+
columns = input(undefined, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
24
|
+
/** Liczba kolumn od breakpointa SM (>= 640px). */
|
|
25
|
+
columnsSm = input(undefined, /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "columnsSm" }] : /* istanbul ignore next */ []));
|
|
27
|
+
/** Liczba kolumn od breakpointa MD (>= 768px). */
|
|
28
|
+
columnsMd = input(undefined, /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "columnsMd" }] : /* istanbul ignore next */ []));
|
|
30
|
+
/** Liczba kolumn od breakpointa LG (>= 1024px). */
|
|
31
|
+
columnsLg = input(undefined, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "columnsLg" }] : /* istanbul ignore next */ []));
|
|
33
|
+
/** Liczba kolumn od breakpointa XL (>= 1280px). */
|
|
34
|
+
columnsXl = input(undefined, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "columnsXl" }] : /* istanbul ignore next */ []));
|
|
36
|
+
/** Liczba kolumn od breakpointa 2XL (>= 1536px). */
|
|
37
|
+
columns2xl = input(undefined, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "columns2xl" }] : /* istanbul ignore next */ []));
|
|
39
|
+
/** Odstęp w obu osiach, np. `'1.5rem'` albo `'var(--kpt-space-6)'`. */
|
|
40
|
+
gap = input(undefined, /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
42
|
+
/** Odstęp między kolumnami — nadpisuje `gap` w poziomie. */
|
|
43
|
+
gapX = input(undefined, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "gapX" }] : /* istanbul ignore next */ []));
|
|
45
|
+
/** Odstęp między wierszami — nadpisuje `gap` w pionie. */
|
|
46
|
+
gapY = input(undefined, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "gapY" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/**
|
|
49
|
+
* Tryb kontenerowy: spany dzieci reagują na szerokość TEJ siatki, nie okna.
|
|
50
|
+
* Liczba kolumn i odstępy nadal idą za viewportem — `@container` nie potrafi
|
|
51
|
+
* odpytać elementu o jego własny kontener.
|
|
52
|
+
*/
|
|
53
|
+
container = input(false, { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptGrid, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
55
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: KptGrid, isStandalone: true, selector: "[kptGrid], kpt-grid", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, columnsSm: { classPropertyName: "columnsSm", publicName: "columnsSm", isSignal: true, isRequired: false, transformFunction: null }, columnsMd: { classPropertyName: "columnsMd", publicName: "columnsMd", isSignal: true, isRequired: false, transformFunction: null }, columnsLg: { classPropertyName: "columnsLg", publicName: "columnsLg", isSignal: true, isRequired: false, transformFunction: null }, columnsXl: { classPropertyName: "columnsXl", publicName: "columnsXl", isSignal: true, isRequired: false, transformFunction: null }, columns2xl: { classPropertyName: "columns2xl", publicName: "columns2xl", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, gapX: { classPropertyName: "gapX", publicName: "gapX", isSignal: true, isRequired: false, transformFunction: null }, gapY: { classPropertyName: "gapY", publicName: "gapY", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-container": "container() ? \"\" : null", "style.--kpt-grid-columns": "columns() ?? null", "style.--kpt-grid-columns-sm": "columnsSm() ?? null", "style.--kpt-grid-columns-md": "columnsMd() ?? null", "style.--kpt-grid-columns-lg": "columnsLg() ?? null", "style.--kpt-grid-columns-xl": "columnsXl() ?? null", "style.--kpt-grid-columns-2xl": "columns2xl() ?? null", "style.--kpt-gap": "gap() ?? null", "style.--kpt-gap-x": "gapX() ?? null", "style.--kpt-gap-y": "gapY() ?? null" }, classAttribute: "kpt-grid" }, ngImport: i0 });
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptGrid, decorators: [{
|
|
58
|
+
type: Directive,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: '[kptGrid], kpt-grid',
|
|
61
|
+
host: {
|
|
62
|
+
class: 'kpt-grid',
|
|
63
|
+
'[attr.data-container]': 'container() ? "" : null',
|
|
64
|
+
'[style.--kpt-grid-columns]': 'columns() ?? null',
|
|
65
|
+
'[style.--kpt-grid-columns-sm]': 'columnsSm() ?? null',
|
|
66
|
+
'[style.--kpt-grid-columns-md]': 'columnsMd() ?? null',
|
|
67
|
+
'[style.--kpt-grid-columns-lg]': 'columnsLg() ?? null',
|
|
68
|
+
'[style.--kpt-grid-columns-xl]': 'columnsXl() ?? null',
|
|
69
|
+
'[style.--kpt-grid-columns-2xl]': 'columns2xl() ?? null',
|
|
70
|
+
'[style.--kpt-gap]': 'gap() ?? null',
|
|
71
|
+
'[style.--kpt-gap-x]': 'gapX() ?? null',
|
|
72
|
+
'[style.--kpt-gap-y]': 'gapY() ?? null',
|
|
73
|
+
},
|
|
74
|
+
}]
|
|
75
|
+
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], columnsSm: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsSm", required: false }] }], columnsMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsMd", required: false }] }], columnsLg: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsLg", required: false }] }], columnsXl: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsXl", required: false }] }], columns2xl: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns2xl", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], gapX: [{ type: i0.Input, args: [{ isSignal: true, alias: "gapX", required: false }] }], gapY: [{ type: i0.Input, args: [{ isSignal: true, alias: "gapY", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }] } });
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Kolumna siatki `kptGrid` — rozpiętość mobile-first z nadpisaniami per breakpoint.
|
|
79
|
+
*
|
|
80
|
+
* Wartość podana dla mniejszego breakpointa obowiązuje aż do następnego, który ją
|
|
81
|
+
* nadpisze: `[kptCol]="12" [kptColLg]="5"` daje 12 na mobile, tablecie i `md`,
|
|
82
|
+
* a dopiero od `lg` — 5.
|
|
83
|
+
*
|
|
84
|
+
* Dyrektywa ustawia wyłącznie custom properties inline; nie dodaje ani nie usuwa klas.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* <div kptGrid>
|
|
88
|
+
* <div [kptCol]="12" [kptColSm]="6" [kptColMd]="4">Karta</div>
|
|
89
|
+
* </div>
|
|
90
|
+
*/
|
|
91
|
+
class KptCol {
|
|
92
|
+
/** Rozpiętość kolumny — baza mobile-first. */
|
|
93
|
+
span = input(undefined, { ...(ngDevMode ? { debugName: "span" } : /* istanbul ignore next */ {}), alias: 'kptCol' });
|
|
94
|
+
/** Rozpiętość od breakpointa SM (>= 640px). */
|
|
95
|
+
spanSm = input(undefined, { ...(ngDevMode ? { debugName: "spanSm" } : /* istanbul ignore next */ {}), alias: 'kptColSm' });
|
|
96
|
+
/** Rozpiętość od breakpointa MD (>= 768px). */
|
|
97
|
+
spanMd = input(undefined, { ...(ngDevMode ? { debugName: "spanMd" } : /* istanbul ignore next */ {}), alias: 'kptColMd' });
|
|
98
|
+
/** Rozpiętość od breakpointa LG (>= 1024px). */
|
|
99
|
+
spanLg = input(undefined, { ...(ngDevMode ? { debugName: "spanLg" } : /* istanbul ignore next */ {}), alias: 'kptColLg' });
|
|
100
|
+
/** Rozpiętość od breakpointa XL (>= 1280px). */
|
|
101
|
+
spanXl = input(undefined, { ...(ngDevMode ? { debugName: "spanXl" } : /* istanbul ignore next */ {}), alias: 'kptColXl' });
|
|
102
|
+
/** Rozpiętość od breakpointa 2XL (>= 1536px). */
|
|
103
|
+
span2xl = input(undefined, { ...(ngDevMode ? { debugName: "span2xl" } : /* istanbul ignore next */ {}), alias: 'kptCol2xl' });
|
|
104
|
+
/** Numer linii, od której zaczyna się kolumna (1-based) — pozwala robić offsety. */
|
|
105
|
+
start = input(undefined, { ...(ngDevMode ? { debugName: "start" } : /* istanbul ignore next */ {}), alias: 'kptColStart' });
|
|
106
|
+
/** Kolejność wizualna (`order`). Nie zmienia kolejności w DOM ani dla czytników ekranu. */
|
|
107
|
+
order = input(undefined, { ...(ngDevMode ? { debugName: "order" } : /* istanbul ignore next */ {}), alias: 'kptColOrder' });
|
|
108
|
+
/** Wyrównanie w poprzek osi (`align-self`): `start`, `end`, `center`, `stretch`, `baseline`. */
|
|
109
|
+
self = input(undefined, { ...(ngDevMode ? { debugName: "self" } : /* istanbul ignore next */ {}), alias: 'kptColSelf' });
|
|
110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptCol, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
111
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: KptCol, isStandalone: true, selector: "[kptCol], [kptColSm], [kptColMd], [kptColLg], [kptColXl], [kptCol2xl], [kptColStart], [kptColOrder], [kptColSelf]", inputs: { span: { classPropertyName: "span", publicName: "kptCol", isSignal: true, isRequired: false, transformFunction: null }, spanSm: { classPropertyName: "spanSm", publicName: "kptColSm", isSignal: true, isRequired: false, transformFunction: null }, spanMd: { classPropertyName: "spanMd", publicName: "kptColMd", isSignal: true, isRequired: false, transformFunction: null }, spanLg: { classPropertyName: "spanLg", publicName: "kptColLg", isSignal: true, isRequired: false, transformFunction: null }, spanXl: { classPropertyName: "spanXl", publicName: "kptColXl", isSignal: true, isRequired: false, transformFunction: null }, span2xl: { classPropertyName: "span2xl", publicName: "kptCol2xl", isSignal: true, isRequired: false, transformFunction: null }, start: { classPropertyName: "start", publicName: "kptColStart", isSignal: true, isRequired: false, transformFunction: null }, order: { classPropertyName: "order", publicName: "kptColOrder", isSignal: true, isRequired: false, transformFunction: null }, self: { classPropertyName: "self", publicName: "kptColSelf", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--kpt-col": "span() ?? null", "style.--kpt-col-sm": "spanSm() ?? null", "style.--kpt-col-md": "spanMd() ?? null", "style.--kpt-col-lg": "spanLg() ?? null", "style.--kpt-col-xl": "spanXl() ?? null", "style.--kpt-col-2xl": "span2xl() ?? null", "style.--kpt-col-start": "start() ?? null", "style.--kpt-order": "order() ?? null", "style.--kpt-self": "self() ?? null" } }, ngImport: i0 });
|
|
112
|
+
}
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptCol, decorators: [{
|
|
114
|
+
type: Directive,
|
|
115
|
+
args: [{
|
|
116
|
+
selector: '[kptCol], [kptColSm], [kptColMd], [kptColLg], [kptColXl], [kptCol2xl], [kptColStart], [kptColOrder], [kptColSelf]',
|
|
117
|
+
host: {
|
|
118
|
+
'[style.--kpt-col]': 'span() ?? null',
|
|
119
|
+
'[style.--kpt-col-sm]': 'spanSm() ?? null',
|
|
120
|
+
'[style.--kpt-col-md]': 'spanMd() ?? null',
|
|
121
|
+
'[style.--kpt-col-lg]': 'spanLg() ?? null',
|
|
122
|
+
'[style.--kpt-col-xl]': 'spanXl() ?? null',
|
|
123
|
+
'[style.--kpt-col-2xl]': 'span2xl() ?? null',
|
|
124
|
+
'[style.--kpt-col-start]': 'start() ?? null',
|
|
125
|
+
'[style.--kpt-order]': 'order() ?? null',
|
|
126
|
+
'[style.--kpt-self]': 'self() ?? null',
|
|
127
|
+
},
|
|
128
|
+
}]
|
|
129
|
+
}], propDecorators: { span: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptCol", required: false }] }], spanSm: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColSm", required: false }] }], spanMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColMd", required: false }] }], spanLg: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColLg", required: false }] }], spanXl: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColXl", required: false }] }], span2xl: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptCol2xl", required: false }] }], start: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColStart", required: false }] }], order: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColOrder", required: false }] }], self: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptColSelf", required: false }] }] } });
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Kontener flexbox Koncept UI — te same zmienne i breakpointy co `kptGrid`.
|
|
133
|
+
* Dla wartości bez odpowiednika w inputach (`grow`, `shrink`, `order` na dziecku)
|
|
134
|
+
* używa się klas utility: `kpt-grow-1`, `kpt-order-first`, `kpt-self-end`.
|
|
135
|
+
*
|
|
136
|
+
* Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* <div kptFlex direction="column" directionMd="row" justify="space-between" gap="1rem">
|
|
140
|
+
* <span>Lewa</span>
|
|
141
|
+
* <span class="kpt-order-first kpt-order-md-none">Prawa</span>
|
|
142
|
+
* </div>
|
|
143
|
+
*/
|
|
144
|
+
class KptFlex {
|
|
145
|
+
/** Kierunek osi głównej — baza mobile-first. */
|
|
146
|
+
direction = input(undefined, /* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
148
|
+
/** Kierunek od breakpointa MD (>= 768px). */
|
|
149
|
+
directionMd = input(undefined, /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "directionMd" }] : /* istanbul ignore next */ []));
|
|
151
|
+
/** Kierunek od breakpointa LG (>= 1024px). */
|
|
152
|
+
directionLg = input(undefined, /* @ts-ignore */
|
|
153
|
+
...(ngDevMode ? [{ debugName: "directionLg" }] : /* istanbul ignore next */ []));
|
|
154
|
+
/** Zawijanie elementów. */
|
|
155
|
+
wrap = input(undefined, /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
157
|
+
/** Rozkład wzdłuż osi głównej (`justify-content`). */
|
|
158
|
+
justify = input(undefined, /* @ts-ignore */
|
|
159
|
+
...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
|
|
160
|
+
/** Rozkład wzdłuż osi głównej od breakpointa MD. */
|
|
161
|
+
justifyMd = input(undefined, /* @ts-ignore */
|
|
162
|
+
...(ngDevMode ? [{ debugName: "justifyMd" }] : /* istanbul ignore next */ []));
|
|
163
|
+
/** Wyrównanie w poprzek osi (`align-items`). */
|
|
164
|
+
align = input(undefined, /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
166
|
+
/** Wyrównanie w poprzek osi od breakpointa MD. */
|
|
167
|
+
alignMd = input(undefined, /* @ts-ignore */
|
|
168
|
+
...(ngDevMode ? [{ debugName: "alignMd" }] : /* istanbul ignore next */ []));
|
|
169
|
+
/** Odstęp w obu osiach. */
|
|
170
|
+
gap = input(undefined, /* @ts-ignore */
|
|
171
|
+
...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
172
|
+
/** Odstęp w poziomie. */
|
|
173
|
+
gapX = input(undefined, /* @ts-ignore */
|
|
174
|
+
...(ngDevMode ? [{ debugName: "gapX" }] : /* istanbul ignore next */ []));
|
|
175
|
+
/** Odstęp w pionie. */
|
|
176
|
+
gapY = input(undefined, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "gapY" }] : /* istanbul ignore next */ []));
|
|
178
|
+
/** Tryb kontenerowy — zmienne dzieci reagują na szerokość tego kontenera. */
|
|
179
|
+
container = input(false, { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptFlex, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
181
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: KptFlex, isStandalone: true, selector: "[kptFlex]", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, directionMd: { classPropertyName: "directionMd", publicName: "directionMd", isSignal: true, isRequired: false, transformFunction: null }, directionLg: { classPropertyName: "directionLg", publicName: "directionLg", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, justifyMd: { classPropertyName: "justifyMd", publicName: "justifyMd", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, alignMd: { classPropertyName: "alignMd", publicName: "alignMd", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, gapX: { classPropertyName: "gapX", publicName: "gapX", isSignal: true, isRequired: false, transformFunction: null }, gapY: { classPropertyName: "gapY", publicName: "gapY", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-container": "container() ? \"\" : null", "style.--kpt-flex-direction": "direction() ?? null", "style.--kpt-flex-direction-md": "directionMd() ?? null", "style.--kpt-flex-direction-lg": "directionLg() ?? null", "style.--kpt-flex-wrap": "wrap() ?? null", "style.--kpt-justify": "justify() ?? null", "style.--kpt-justify-md": "justifyMd() ?? null", "style.--kpt-align": "align() ?? null", "style.--kpt-align-md": "alignMd() ?? null", "style.--kpt-gap": "gap() ?? null", "style.--kpt-gap-x": "gapX() ?? null", "style.--kpt-gap-y": "gapY() ?? null" }, classAttribute: "kpt-flex" }, ngImport: i0 });
|
|
182
|
+
}
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: KptFlex, decorators: [{
|
|
184
|
+
type: Directive,
|
|
185
|
+
args: [{
|
|
186
|
+
selector: '[kptFlex]',
|
|
187
|
+
host: {
|
|
188
|
+
class: 'kpt-flex',
|
|
189
|
+
'[attr.data-container]': 'container() ? "" : null',
|
|
190
|
+
'[style.--kpt-flex-direction]': 'direction() ?? null',
|
|
191
|
+
'[style.--kpt-flex-direction-md]': 'directionMd() ?? null',
|
|
192
|
+
'[style.--kpt-flex-direction-lg]': 'directionLg() ?? null',
|
|
193
|
+
'[style.--kpt-flex-wrap]': 'wrap() ?? null',
|
|
194
|
+
'[style.--kpt-justify]': 'justify() ?? null',
|
|
195
|
+
'[style.--kpt-justify-md]': 'justifyMd() ?? null',
|
|
196
|
+
'[style.--kpt-align]': 'align() ?? null',
|
|
197
|
+
'[style.--kpt-align-md]': 'alignMd() ?? null',
|
|
198
|
+
'[style.--kpt-gap]': 'gap() ?? null',
|
|
199
|
+
'[style.--kpt-gap-x]': 'gapX() ?? null',
|
|
200
|
+
'[style.--kpt-gap-y]': 'gapY() ?? null',
|
|
201
|
+
},
|
|
202
|
+
}]
|
|
203
|
+
}], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], directionMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "directionMd", required: false }] }], directionLg: [{ type: i0.Input, args: [{ isSignal: true, alias: "directionLg", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], justifyMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "justifyMd", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], alignMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignMd", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], gapX: [{ type: i0.Input, args: [{ isSignal: true, alias: "gapX", required: false }] }], gapY: [{ type: i0.Input, args: [{ isSignal: true, alias: "gapY", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }] } });
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* Public API — @konce-pt/angular/grid
|
|
207
|
+
* Ergonomia Angulara nad arkuszem @konce-pt/grid (sygnały, zoneless).
|
|
208
|
+
* Dyrektywy ustawiają wyłącznie custom properties — układ liczy natywny CSS.
|
|
209
|
+
*/
|
|
210
|
+
/** Komplet dyrektyw układu — `imports: [...KPT_GRID_IMPORTS]`. */
|
|
211
|
+
const KPT_GRID_IMPORTS = [KptGrid, KptCol, KptFlex];
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Generated bundle index. Do not edit.
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
export { KPT_GRID_IMPORTS, KptCol, KptFlex, KptGrid };
|
|
218
|
+
//# sourceMappingURL=konce-pt-angular-grid.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"konce-pt-angular-grid.mjs","sources":["../../grid/src/lib/grid.directive.ts","../../grid/src/lib/col.directive.ts","../../grid/src/lib/flex.directive.ts","../../grid/src/public-api.ts","../../grid/src/konce-pt-angular-grid.ts"],"sourcesContent":["import { Directive, booleanAttribute, input } from '@angular/core';\n\n/**\n * Siatka Koncept UI — CSS Grid sterowany custom properties z `@konce-pt/grid`.\n * Dyrektywa, nie komponent: nie dokłada elementu do DOM i działa na dowolnym\n * tagu (`<section>`, `<ul>`, `<main>`). Alias `kpt-grid` dla zgodności.\n *\n * Zmiana `columns` nie manipuluje klasami — ustawia zmienną inline, a układ\n * przelicza natywny silnik CSS.\n *\n * Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).\n *\n * @example\n * <div kptGrid [columns]=\"18\" gap=\"1.5rem\">\n * <div [kptCol]=\"18\" [kptColLg]=\"5\">Sidebar</div>\n * <div [kptCol]=\"18\" [kptColLg]=\"13\">Treść</div>\n * </div>\n */\n@Directive({\n selector: '[kptGrid], kpt-grid',\n host: {\n class: 'kpt-grid',\n '[attr.data-container]': 'container() ? \"\" : null',\n '[style.--kpt-grid-columns]': 'columns() ?? null',\n '[style.--kpt-grid-columns-sm]': 'columnsSm() ?? null',\n '[style.--kpt-grid-columns-md]': 'columnsMd() ?? null',\n '[style.--kpt-grid-columns-lg]': 'columnsLg() ?? null',\n '[style.--kpt-grid-columns-xl]': 'columnsXl() ?? null',\n '[style.--kpt-grid-columns-2xl]': 'columns2xl() ?? null',\n '[style.--kpt-gap]': 'gap() ?? null',\n '[style.--kpt-gap-x]': 'gapX() ?? null',\n '[style.--kpt-gap-y]': 'gapY() ?? null',\n },\n})\nexport class KptGrid {\n /** Liczba kolumn — baza mobile-first. Domyślnie 12 (z CSS). */\n readonly columns = input<number | undefined>(undefined);\n /** Liczba kolumn od breakpointa SM (>= 640px). */\n readonly columnsSm = input<number | undefined>(undefined);\n /** Liczba kolumn od breakpointa MD (>= 768px). */\n readonly columnsMd = input<number | undefined>(undefined);\n /** Liczba kolumn od breakpointa LG (>= 1024px). */\n readonly columnsLg = input<number | undefined>(undefined);\n /** Liczba kolumn od breakpointa XL (>= 1280px). */\n readonly columnsXl = input<number | undefined>(undefined);\n /** Liczba kolumn od breakpointa 2XL (>= 1536px). */\n readonly columns2xl = input<number | undefined>(undefined);\n\n /** Odstęp w obu osiach, np. `'1.5rem'` albo `'var(--kpt-space-6)'`. */\n readonly gap = input<string | undefined>(undefined);\n /** Odstęp między kolumnami — nadpisuje `gap` w poziomie. */\n readonly gapX = input<string | undefined>(undefined);\n /** Odstęp między wierszami — nadpisuje `gap` w pionie. */\n readonly gapY = input<string | undefined>(undefined);\n\n /**\n * Tryb kontenerowy: spany dzieci reagują na szerokość TEJ siatki, nie okna.\n * Liczba kolumn i odstępy nadal idą za viewportem — `@container` nie potrafi\n * odpytać elementu o jego własny kontener.\n */\n readonly container = input(false, { transform: booleanAttribute });\n}\n","import { Directive, input } from '@angular/core';\n\n/** Rozpiętość kolumny: liczba, `'full'` (cała szerokość) albo dowolna wartość CSS. */\nexport type KptColSpan = number | string;\n\n/**\n * Kolumna siatki `kptGrid` — rozpiętość mobile-first z nadpisaniami per breakpoint.\n *\n * Wartość podana dla mniejszego breakpointa obowiązuje aż do następnego, który ją\n * nadpisze: `[kptCol]=\"12\" [kptColLg]=\"5\"` daje 12 na mobile, tablecie i `md`,\n * a dopiero od `lg` — 5.\n *\n * Dyrektywa ustawia wyłącznie custom properties inline; nie dodaje ani nie usuwa klas.\n *\n * @example\n * <div kptGrid>\n * <div [kptCol]=\"12\" [kptColSm]=\"6\" [kptColMd]=\"4\">Karta</div>\n * </div>\n */\n@Directive({\n selector: '[kptCol], [kptColSm], [kptColMd], [kptColLg], [kptColXl], [kptCol2xl], [kptColStart], [kptColOrder], [kptColSelf]',\n host: {\n '[style.--kpt-col]': 'span() ?? null',\n '[style.--kpt-col-sm]': 'spanSm() ?? null',\n '[style.--kpt-col-md]': 'spanMd() ?? null',\n '[style.--kpt-col-lg]': 'spanLg() ?? null',\n '[style.--kpt-col-xl]': 'spanXl() ?? null',\n '[style.--kpt-col-2xl]': 'span2xl() ?? null',\n '[style.--kpt-col-start]': 'start() ?? null',\n '[style.--kpt-order]': 'order() ?? null',\n '[style.--kpt-self]': 'self() ?? null',\n },\n})\nexport class KptCol {\n /** Rozpiętość kolumny — baza mobile-first. */\n readonly span = input<KptColSpan | undefined>(undefined, { alias: 'kptCol' });\n /** Rozpiętość od breakpointa SM (>= 640px). */\n readonly spanSm = input<KptColSpan | undefined>(undefined, { alias: 'kptColSm' });\n /** Rozpiętość od breakpointa MD (>= 768px). */\n readonly spanMd = input<KptColSpan | undefined>(undefined, { alias: 'kptColMd' });\n /** Rozpiętość od breakpointa LG (>= 1024px). */\n readonly spanLg = input<KptColSpan | undefined>(undefined, { alias: 'kptColLg' });\n /** Rozpiętość od breakpointa XL (>= 1280px). */\n readonly spanXl = input<KptColSpan | undefined>(undefined, { alias: 'kptColXl' });\n /** Rozpiętość od breakpointa 2XL (>= 1536px). */\n readonly span2xl = input<KptColSpan | undefined>(undefined, { alias: 'kptCol2xl' });\n\n /** Numer linii, od której zaczyna się kolumna (1-based) — pozwala robić offsety. */\n readonly start = input<number | string | undefined>(undefined, { alias: 'kptColStart' });\n /** Kolejność wizualna (`order`). Nie zmienia kolejności w DOM ani dla czytników ekranu. */\n readonly order = input<number | string | undefined>(undefined, { alias: 'kptColOrder' });\n /** Wyrównanie w poprzek osi (`align-self`): `start`, `end`, `center`, `stretch`, `baseline`. */\n readonly self = input<string | undefined>(undefined, { alias: 'kptColSelf' });\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\n\nexport type KptFlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';\nexport type KptFlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';\nexport type KptAlignment = 'start' | 'end' | 'center' | 'stretch' | 'baseline' | 'space-between' | 'space-around' | 'space-evenly';\n\n/**\n * Kontener flexbox Koncept UI — te same zmienne i breakpointy co `kptGrid`.\n * Dla wartości bez odpowiednika w inputach (`grow`, `shrink`, `order` na dziecku)\n * używa się klas utility: `kpt-grow-1`, `kpt-order-first`, `kpt-self-end`.\n *\n * Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).\n *\n * @example\n * <div kptFlex direction=\"column\" directionMd=\"row\" justify=\"space-between\" gap=\"1rem\">\n * <span>Lewa</span>\n * <span class=\"kpt-order-first kpt-order-md-none\">Prawa</span>\n * </div>\n */\n@Directive({\n selector: '[kptFlex]',\n host: {\n class: 'kpt-flex',\n '[attr.data-container]': 'container() ? \"\" : null',\n '[style.--kpt-flex-direction]': 'direction() ?? null',\n '[style.--kpt-flex-direction-md]': 'directionMd() ?? null',\n '[style.--kpt-flex-direction-lg]': 'directionLg() ?? null',\n '[style.--kpt-flex-wrap]': 'wrap() ?? null',\n '[style.--kpt-justify]': 'justify() ?? null',\n '[style.--kpt-justify-md]': 'justifyMd() ?? null',\n '[style.--kpt-align]': 'align() ?? null',\n '[style.--kpt-align-md]': 'alignMd() ?? null',\n '[style.--kpt-gap]': 'gap() ?? null',\n '[style.--kpt-gap-x]': 'gapX() ?? null',\n '[style.--kpt-gap-y]': 'gapY() ?? null',\n },\n})\nexport class KptFlex {\n /** Kierunek osi głównej — baza mobile-first. */\n readonly direction = input<KptFlexDirection | undefined>(undefined);\n /** Kierunek od breakpointa MD (>= 768px). */\n readonly directionMd = input<KptFlexDirection | undefined>(undefined);\n /** Kierunek od breakpointa LG (>= 1024px). */\n readonly directionLg = input<KptFlexDirection | undefined>(undefined);\n /** Zawijanie elementów. */\n readonly wrap = input<KptFlexWrap | undefined>(undefined);\n\n /** Rozkład wzdłuż osi głównej (`justify-content`). */\n readonly justify = input<KptAlignment | undefined>(undefined);\n /** Rozkład wzdłuż osi głównej od breakpointa MD. */\n readonly justifyMd = input<KptAlignment | undefined>(undefined);\n /** Wyrównanie w poprzek osi (`align-items`). */\n readonly align = input<KptAlignment | undefined>(undefined);\n /** Wyrównanie w poprzek osi od breakpointa MD. */\n readonly alignMd = input<KptAlignment | undefined>(undefined);\n\n /** Odstęp w obu osiach. */\n readonly gap = input<string | undefined>(undefined);\n /** Odstęp w poziomie. */\n readonly gapX = input<string | undefined>(undefined);\n /** Odstęp w pionie. */\n readonly gapY = input<string | undefined>(undefined);\n\n /** Tryb kontenerowy — zmienne dzieci reagują na szerokość tego kontenera. */\n readonly container = input(false, { transform: booleanAttribute });\n}\n","/*\n * Public API — @konce-pt/angular/grid\n * Ergonomia Angulara nad arkuszem @konce-pt/grid (sygnały, zoneless).\n * Dyrektywy ustawiają wyłącznie custom properties — układ liczy natywny CSS.\n */\nexport { KptGrid } from './lib/grid.directive';\nexport { KptCol } from './lib/col.directive';\nexport type { KptColSpan } from './lib/col.directive';\nexport { KptFlex } from './lib/flex.directive';\nexport type { KptFlexDirection, KptFlexWrap, KptAlignment } from './lib/flex.directive';\n\nimport { KptGrid } from './lib/grid.directive';\nimport { KptCol } from './lib/col.directive';\nimport { KptFlex } from './lib/flex.directive';\n\n/** Komplet dyrektyw układu — `imports: [...KPT_GRID_IMPORTS]`. */\nexport const KPT_GRID_IMPORTS = [KptGrid, KptCol, KptFlex] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;AAeG;MAiBU,OAAO,CAAA;;IAET,OAAO,GAAG,KAAK,CAAqB,SAAS;gFAAC;;IAE9C,SAAS,GAAG,KAAK,CAAqB,SAAS;kFAAC;;IAEhD,SAAS,GAAG,KAAK,CAAqB,SAAS;kFAAC;;IAEhD,SAAS,GAAG,KAAK,CAAqB,SAAS;kFAAC;;IAEhD,SAAS,GAAG,KAAK,CAAqB,SAAS;kFAAC;;IAEhD,UAAU,GAAG,KAAK,CAAqB,SAAS;mFAAC;;IAGjD,GAAG,GAAG,KAAK,CAAqB,SAAS;4EAAC;;IAE1C,IAAI,GAAG,KAAK,CAAqB,SAAS;6EAAC;;IAE3C,IAAI,GAAG,KAAK,CAAqB,SAAS;6EAAC;AAEpD;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;uGA1BvD,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,C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C,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,uBAAuB,EAAE,yBAAyB;AAClD,wBAAA,8BAA8B,EAAE,qBAAqB;AACrD,wBAAA,iCAAiC,EAAE,uBAAuB;AAC1D,wBAAA,iCAAiC,EAAE,uBAAuB;AAC1D,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,uBAAuB,EAAE,mBAAmB;AAC5C,wBAAA,0BAA0B,EAAE,qBAAqB;AACjD,wBAAA,qBAAqB,EAAE,iBAAiB;AACxC,wBAAA,wBAAwB,EAAE,mBAAmB;AAC7C,wBAAA,mBAAmB,EAAE,eAAe;AACpC,wBAAA,qBAAqB,EAAE,gBAAgB;AACvC,wBAAA,qBAAqB,EAAE,gBAAgB;AACxC,qBAAA;AACF,iBAAA;;;ACpCD;;;;AAIG;AAWH;AACO,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO;;AChBzD;;AAEG;;;;"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# KptGrid / KptCol / KptFlex (@konce-pt/angular/grid)
|
|
2
|
+
|
|
3
|
+
Ergonomia Angulara nad arkuszem `@konce-pt/grid`. Dyrektywy ustawiają wyłącznie
|
|
4
|
+
custom properties inline — nie dodają ani nie usuwają klas, układ przelicza
|
|
5
|
+
natywny silnik CSS.
|
|
6
|
+
|
|
7
|
+
Import: `import { KptGrid, KptCol, KptFlex } from '@konce-pt/angular/grid';`
|
|
8
|
+
Skrót: `import { KPT_GRID_IMPORTS } from '@konce-pt/angular/grid';` → `imports: [...KPT_GRID_IMPORTS]`
|
|
9
|
+
|
|
10
|
+
Wymaga arkusza: `import '@konce-pt/grid';` (Angular CLI: `angular.json` → `styles[]`).
|
|
11
|
+
|
|
12
|
+
## Breakpointy (mobile-first)
|
|
13
|
+
`sm` >= 640px, `md` >= 768px, `lg` >= 1024px, `xl` >= 1280px, `2xl` >= 1536px.
|
|
14
|
+
Wartość obowiązuje od swojego breakpointa w górę, dopóki nie nadpisze jej kolejna:
|
|
15
|
+
`[kptCol]="12" [kptColLg]="5"` daje 12 na mobile, `sm` i `md`, a 5 dopiero od `lg`.
|
|
16
|
+
|
|
17
|
+
## KptGrid — selektor `[kptGrid]`, `kpt-grid`
|
|
18
|
+
Klasa hosta: `kpt-grid`.
|
|
19
|
+
- `columns`: number — liczba kolumn (domyślnie 12 z CSS). Warianty: `columnsSm`,
|
|
20
|
+
`columnsMd`, `columnsLg`, `columnsXl`, `columns2xl`.
|
|
21
|
+
- `gap`: string — odstęp w obu osiach, np. `'1.5rem'`, `'var(--kpt-space-6)'`.
|
|
22
|
+
- `gapX`, `gapY`: string — odstęp w jednej osi, nadpisuje `gap`.
|
|
23
|
+
- `container`: boolean — tryb container queries (patrz niżej).
|
|
24
|
+
|
|
25
|
+
## KptCol — selektor `[kptCol]`, `[kptColSm]` … `[kptColSelf]`
|
|
26
|
+
- `kptCol`: number | string — rozpiętość, baza mobile-first.
|
|
27
|
+
- `kptColSm`, `kptColMd`, `kptColLg`, `kptColXl`, `kptCol2xl` — nadpisania per breakpoint.
|
|
28
|
+
- `kptColStart`: number — linia siatki, od której zaczyna się kolumna (1-based); tak robi się offsety.
|
|
29
|
+
- `kptColOrder`: number — kolejność wizualna. Nie zmienia DOM: czytniki ekranu
|
|
30
|
+
i nawigacja klawiaturą idą za DOM, więc nie przenoś nim treści interaktywnej.
|
|
31
|
+
- `kptColSelf`: string — `align-self` (`start`, `end`, `center`, `stretch`, `baseline`).
|
|
32
|
+
|
|
33
|
+
## KptFlex — selektor `[kptFlex]`
|
|
34
|
+
Klasa hosta: `kpt-flex`. Te same zmienne i breakpointy co grid, jeden wymiar.
|
|
35
|
+
- `direction`: 'row' | 'row-reverse' | 'column' | 'column-reverse' (+ `directionMd`, `directionLg`)
|
|
36
|
+
- `wrap`: 'wrap' | 'nowrap' | 'wrap-reverse'
|
|
37
|
+
- `justify`, `align` (+ `justifyMd`, `alignMd`): `start` | `end` | `center` | `stretch` |
|
|
38
|
+
`baseline` | `space-between` | `space-around` | `space-evenly`
|
|
39
|
+
- `gap`, `gapX`, `gapY`: string
|
|
40
|
+
- `container`: boolean
|
|
41
|
+
|
|
42
|
+
Wartości bez odpowiednika w inputach podaje się klasami utility z `@konce-pt/grid`:
|
|
43
|
+
`kpt-grow-1`, `kpt-shrink-0`, `kpt-order-first`, `kpt-self-end`, `kpt-gap-6`.
|
|
44
|
+
|
|
45
|
+
## Tryb kontenerowy (`container`)
|
|
46
|
+
Spany dzieci reagują na szerokość TEJ siatki zamiast okna — karta w wąskim
|
|
47
|
+
sidebarze układa się jednokolumnowo, choć viewport jest szeroki.
|
|
48
|
+
|
|
49
|
+
Ograniczenie CSS, nie paczki: `@container` odpytuje najbliższy kontener przodka,
|
|
50
|
+
więc element nie może odpytać własnego. Responsywne są zmienne dziecka (span,
|
|
51
|
+
start, order, self); liczba kolumn i odstępy nadal idą za viewportem.
|
|
52
|
+
|
|
53
|
+
## Przykłady
|
|
54
|
+
<div kptGrid>
|
|
55
|
+
<div [kptCol]="12" [kptColSm]="6" [kptColMd]="4">Karta</div>
|
|
56
|
+
<div [kptCol]="12" [kptColSm]="6" [kptColMd]="4">Karta</div>
|
|
57
|
+
<div [kptCol]="12" [kptColMd]="4">Karta</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- 18 kolumn bez rekompilacji SCSS -->
|
|
61
|
+
<div kptGrid [columns]="18" gap="1.5rem">
|
|
62
|
+
<div [kptCol]="18" [kptColLg]="5">Sidebar</div>
|
|
63
|
+
<div [kptCol]="18" [kptColLg]="13">Treść</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- offset i zmiana kolejności na mobile -->
|
|
67
|
+
<div kptGrid>
|
|
68
|
+
<div [kptCol]="6" [kptColStart]="4">start 4, span 6</div>
|
|
69
|
+
<div [kptCol]="12" [kptColMd]="6" class="kpt-order-first kpt-order-md-none">drugi w DOM</div>
|
|
70
|
+
<div [kptCol]="12" [kptColMd]="6">pierwszy w DOM</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<!-- flexbox -->
|
|
74
|
+
<div kptFlex direction="column" directionMd="row" justify="space-between" align="center" gap="1rem">
|
|
75
|
+
<span>Lewa</span>
|
|
76
|
+
<span>Prawa</span>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<!-- układ formularza (preset CSS, bez klas na dzieciach) -->
|
|
80
|
+
<form class="kpt-grid kpt-form-grid">
|
|
81
|
+
<kpt-form-field label="Imię"><kpt-input [(value)]="firstName" /></kpt-form-field>
|
|
82
|
+
<kpt-form-field label="Nazwisko"><kpt-input [(value)]="lastName" /></kpt-form-field>
|
|
83
|
+
<kpt-form-field label="Notatki" class="kpt-col-md-12"><kpt-input [(value)]="notes" /></kpt-form-field>
|
|
84
|
+
</form>
|
|
85
|
+
|
|
86
|
+
## Custom properties
|
|
87
|
+
Siatka: `--kpt-grid-columns`, `--kpt-gap`, `--kpt-gap-x`, `--kpt-gap-y`,
|
|
88
|
+
`--kpt-justify`, `--kpt-align`, `--kpt-content`, `--kpt-flex-direction`, `--kpt-flex-wrap`.
|
|
89
|
+
Dziecko: `--kpt-col`, `--kpt-col-start`, `--kpt-order`, `--kpt-self`, `--kpt-flex`,
|
|
90
|
+
`--kpt-grow`, `--kpt-shrink`.
|
|
91
|
+
Każda ma warianty per breakpoint: `--kpt-col` → `--kpt-col-md`.
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konce-pt/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Open-source Angular 22 component library on Signals & Signal Forms — 70+ components, rich data table, zoneless, fully tokenized. Selektory kpt-*, klasy Kpt*.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "konce.pt",
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
"types": "./types/konce-pt-angular-charts.d.ts",
|
|
48
48
|
"default": "./fesm2022/konce-pt-angular-charts.mjs"
|
|
49
49
|
},
|
|
50
|
+
"./grid": {
|
|
51
|
+
"types": "./types/konce-pt-angular-grid.d.ts",
|
|
52
|
+
"default": "./fesm2022/konce-pt-angular-grid.mjs"
|
|
53
|
+
},
|
|
50
54
|
"./package.json": {
|
|
51
55
|
"default": "./package.json"
|
|
52
56
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Siatka Koncept UI — CSS Grid sterowany custom properties z `@konce-pt/grid`.
|
|
5
|
+
* Dyrektywa, nie komponent: nie dokłada elementu do DOM i działa na dowolnym
|
|
6
|
+
* tagu (`<section>`, `<ul>`, `<main>`). Alias `kpt-grid` dla zgodności.
|
|
7
|
+
*
|
|
8
|
+
* Zmiana `columns` nie manipuluje klasami — ustawia zmienną inline, a układ
|
|
9
|
+
* przelicza natywny silnik CSS.
|
|
10
|
+
*
|
|
11
|
+
* Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <div kptGrid [columns]="18" gap="1.5rem">
|
|
15
|
+
* <div [kptCol]="18" [kptColLg]="5">Sidebar</div>
|
|
16
|
+
* <div [kptCol]="18" [kptColLg]="13">Treść</div>
|
|
17
|
+
* </div>
|
|
18
|
+
*/
|
|
19
|
+
declare class KptGrid {
|
|
20
|
+
/** Liczba kolumn — baza mobile-first. Domyślnie 12 (z CSS). */
|
|
21
|
+
readonly columns: _angular_core.InputSignal<number | undefined>;
|
|
22
|
+
/** Liczba kolumn od breakpointa SM (>= 640px). */
|
|
23
|
+
readonly columnsSm: _angular_core.InputSignal<number | undefined>;
|
|
24
|
+
/** Liczba kolumn od breakpointa MD (>= 768px). */
|
|
25
|
+
readonly columnsMd: _angular_core.InputSignal<number | undefined>;
|
|
26
|
+
/** Liczba kolumn od breakpointa LG (>= 1024px). */
|
|
27
|
+
readonly columnsLg: _angular_core.InputSignal<number | undefined>;
|
|
28
|
+
/** Liczba kolumn od breakpointa XL (>= 1280px). */
|
|
29
|
+
readonly columnsXl: _angular_core.InputSignal<number | undefined>;
|
|
30
|
+
/** Liczba kolumn od breakpointa 2XL (>= 1536px). */
|
|
31
|
+
readonly columns2xl: _angular_core.InputSignal<number | undefined>;
|
|
32
|
+
/** Odstęp w obu osiach, np. `'1.5rem'` albo `'var(--kpt-space-6)'`. */
|
|
33
|
+
readonly gap: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
/** Odstęp między kolumnami — nadpisuje `gap` w poziomie. */
|
|
35
|
+
readonly gapX: _angular_core.InputSignal<string | undefined>;
|
|
36
|
+
/** Odstęp między wierszami — nadpisuje `gap` w pionie. */
|
|
37
|
+
readonly gapY: _angular_core.InputSignal<string | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* Tryb kontenerowy: spany dzieci reagują na szerokość TEJ siatki, nie okna.
|
|
40
|
+
* Liczba kolumn i odstępy nadal idą za viewportem — `@container` nie potrafi
|
|
41
|
+
* odpytać elementu o jego własny kontener.
|
|
42
|
+
*/
|
|
43
|
+
readonly container: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
44
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptGrid, never>;
|
|
45
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KptGrid, "[kptGrid], kpt-grid", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "columnsSm": { "alias": "columnsSm"; "required": false; "isSignal": true; }; "columnsMd": { "alias": "columnsMd"; "required": false; "isSignal": true; }; "columnsLg": { "alias": "columnsLg"; "required": false; "isSignal": true; }; "columnsXl": { "alias": "columnsXl"; "required": false; "isSignal": true; }; "columns2xl": { "alias": "columns2xl"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "gapX": { "alias": "gapX"; "required": false; "isSignal": true; }; "gapY": { "alias": "gapY"; "required": false; "isSignal": true; }; "container": { "alias": "container"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Rozpiętość kolumny: liczba, `'full'` (cała szerokość) albo dowolna wartość CSS. */
|
|
49
|
+
type KptColSpan = number | string;
|
|
50
|
+
/**
|
|
51
|
+
* Kolumna siatki `kptGrid` — rozpiętość mobile-first z nadpisaniami per breakpoint.
|
|
52
|
+
*
|
|
53
|
+
* Wartość podana dla mniejszego breakpointa obowiązuje aż do następnego, który ją
|
|
54
|
+
* nadpisze: `[kptCol]="12" [kptColLg]="5"` daje 12 na mobile, tablecie i `md`,
|
|
55
|
+
* a dopiero od `lg` — 5.
|
|
56
|
+
*
|
|
57
|
+
* Dyrektywa ustawia wyłącznie custom properties inline; nie dodaje ani nie usuwa klas.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <div kptGrid>
|
|
61
|
+
* <div [kptCol]="12" [kptColSm]="6" [kptColMd]="4">Karta</div>
|
|
62
|
+
* </div>
|
|
63
|
+
*/
|
|
64
|
+
declare class KptCol {
|
|
65
|
+
/** Rozpiętość kolumny — baza mobile-first. */
|
|
66
|
+
readonly span: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
67
|
+
/** Rozpiętość od breakpointa SM (>= 640px). */
|
|
68
|
+
readonly spanSm: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
69
|
+
/** Rozpiętość od breakpointa MD (>= 768px). */
|
|
70
|
+
readonly spanMd: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
71
|
+
/** Rozpiętość od breakpointa LG (>= 1024px). */
|
|
72
|
+
readonly spanLg: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
73
|
+
/** Rozpiętość od breakpointa XL (>= 1280px). */
|
|
74
|
+
readonly spanXl: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
75
|
+
/** Rozpiętość od breakpointa 2XL (>= 1536px). */
|
|
76
|
+
readonly span2xl: _angular_core.InputSignal<KptColSpan | undefined>;
|
|
77
|
+
/** Numer linii, od której zaczyna się kolumna (1-based) — pozwala robić offsety. */
|
|
78
|
+
readonly start: _angular_core.InputSignal<string | number | undefined>;
|
|
79
|
+
/** Kolejność wizualna (`order`). Nie zmienia kolejności w DOM ani dla czytników ekranu. */
|
|
80
|
+
readonly order: _angular_core.InputSignal<string | number | undefined>;
|
|
81
|
+
/** Wyrównanie w poprzek osi (`align-self`): `start`, `end`, `center`, `stretch`, `baseline`. */
|
|
82
|
+
readonly self: _angular_core.InputSignal<string | undefined>;
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptCol, never>;
|
|
84
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KptCol, "[kptCol], [kptColSm], [kptColMd], [kptColLg], [kptColXl], [kptCol2xl], [kptColStart], [kptColOrder], [kptColSelf]", never, { "span": { "alias": "kptCol"; "required": false; "isSignal": true; }; "spanSm": { "alias": "kptColSm"; "required": false; "isSignal": true; }; "spanMd": { "alias": "kptColMd"; "required": false; "isSignal": true; }; "spanLg": { "alias": "kptColLg"; "required": false; "isSignal": true; }; "spanXl": { "alias": "kptColXl"; "required": false; "isSignal": true; }; "span2xl": { "alias": "kptCol2xl"; "required": false; "isSignal": true; }; "start": { "alias": "kptColStart"; "required": false; "isSignal": true; }; "order": { "alias": "kptColOrder"; "required": false; "isSignal": true; }; "self": { "alias": "kptColSelf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type KptFlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
88
|
+
type KptFlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
89
|
+
type KptAlignment = 'start' | 'end' | 'center' | 'stretch' | 'baseline' | 'space-between' | 'space-around' | 'space-evenly';
|
|
90
|
+
/**
|
|
91
|
+
* Kontener flexbox Koncept UI — te same zmienne i breakpointy co `kptGrid`.
|
|
92
|
+
* Dla wartości bez odpowiednika w inputach (`grow`, `shrink`, `order` na dziecku)
|
|
93
|
+
* używa się klas utility: `kpt-grow-1`, `kpt-order-first`, `kpt-self-end`.
|
|
94
|
+
*
|
|
95
|
+
* Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* <div kptFlex direction="column" directionMd="row" justify="space-between" gap="1rem">
|
|
99
|
+
* <span>Lewa</span>
|
|
100
|
+
* <span class="kpt-order-first kpt-order-md-none">Prawa</span>
|
|
101
|
+
* </div>
|
|
102
|
+
*/
|
|
103
|
+
declare class KptFlex {
|
|
104
|
+
/** Kierunek osi głównej — baza mobile-first. */
|
|
105
|
+
readonly direction: _angular_core.InputSignal<KptFlexDirection | undefined>;
|
|
106
|
+
/** Kierunek od breakpointa MD (>= 768px). */
|
|
107
|
+
readonly directionMd: _angular_core.InputSignal<KptFlexDirection | undefined>;
|
|
108
|
+
/** Kierunek od breakpointa LG (>= 1024px). */
|
|
109
|
+
readonly directionLg: _angular_core.InputSignal<KptFlexDirection | undefined>;
|
|
110
|
+
/** Zawijanie elementów. */
|
|
111
|
+
readonly wrap: _angular_core.InputSignal<KptFlexWrap | undefined>;
|
|
112
|
+
/** Rozkład wzdłuż osi głównej (`justify-content`). */
|
|
113
|
+
readonly justify: _angular_core.InputSignal<KptAlignment | undefined>;
|
|
114
|
+
/** Rozkład wzdłuż osi głównej od breakpointa MD. */
|
|
115
|
+
readonly justifyMd: _angular_core.InputSignal<KptAlignment | undefined>;
|
|
116
|
+
/** Wyrównanie w poprzek osi (`align-items`). */
|
|
117
|
+
readonly align: _angular_core.InputSignal<KptAlignment | undefined>;
|
|
118
|
+
/** Wyrównanie w poprzek osi od breakpointa MD. */
|
|
119
|
+
readonly alignMd: _angular_core.InputSignal<KptAlignment | undefined>;
|
|
120
|
+
/** Odstęp w obu osiach. */
|
|
121
|
+
readonly gap: _angular_core.InputSignal<string | undefined>;
|
|
122
|
+
/** Odstęp w poziomie. */
|
|
123
|
+
readonly gapX: _angular_core.InputSignal<string | undefined>;
|
|
124
|
+
/** Odstęp w pionie. */
|
|
125
|
+
readonly gapY: _angular_core.InputSignal<string | undefined>;
|
|
126
|
+
/** Tryb kontenerowy — zmienne dzieci reagują na szerokość tego kontenera. */
|
|
127
|
+
readonly container: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
128
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptFlex, never>;
|
|
129
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KptFlex, "[kptFlex]", never, { "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "directionMd": { "alias": "directionMd"; "required": false; "isSignal": true; }; "directionLg": { "alias": "directionLg"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "justify": { "alias": "justify"; "required": false; "isSignal": true; }; "justifyMd": { "alias": "justifyMd"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "alignMd": { "alias": "alignMd"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "gapX": { "alias": "gapX"; "required": false; "isSignal": true; }; "gapY": { "alias": "gapY"; "required": false; "isSignal": true; }; "container": { "alias": "container"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Komplet dyrektyw układu — `imports: [...KPT_GRID_IMPORTS]`. */
|
|
133
|
+
declare const KPT_GRID_IMPORTS: readonly [typeof KptGrid, typeof KptCol, typeof KptFlex];
|
|
134
|
+
|
|
135
|
+
export { KPT_GRID_IMPORTS, KptCol, KptFlex, KptGrid };
|
|
136
|
+
export type { KptAlignment, KptColSpan, KptFlexDirection, KptFlexWrap };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konce-pt/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Open-source Angular 22 component library on Signals & Signal Forms — 70+ components, rich data table, zoneless, fully tokenized. Selektory kpt-*, klasy Kpt*.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "konce.pt",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"./charts": {
|
|
47
47
|
"types": "./dist/types/konce-pt-angular-charts.d.ts",
|
|
48
48
|
"default": "./dist/fesm2022/konce-pt-angular-charts.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./grid": {
|
|
51
|
+
"types": "./dist/types/konce-pt-angular-grid.d.ts",
|
|
52
|
+
"default": "./dist/fesm2022/konce-pt-angular-grid.mjs"
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
"peerDependencies": {
|