@konce-pt/angular 0.8.5 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/fesm2022/konce-pt-angular-roadmap.mjs +2 -2
- package/fesm2022/konce-pt-angular.mjs +410 -213
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +11 -11
- package/src/lib/button/llms.txt +53 -9
- package/src/lib/button-group/llms.txt +17 -1
- package/src/lib/dialog/llms.txt +10 -0
- package/src/lib/progress/llms.txt +81 -5
- package/types/konce-pt-angular.d.ts +97 -21
- package/types/konce-pt-angular.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konce-pt/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
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,16 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"tslib": "^2.3.0",
|
|
49
|
-
"@konce-pt/
|
|
50
|
-
"@konce-pt/backdrop": "0.
|
|
51
|
-
"@konce-pt/datetime": "0.
|
|
52
|
-
"@konce-pt/
|
|
53
|
-
"@konce-pt/
|
|
54
|
-
"@konce-pt/
|
|
55
|
-
"@konce-pt/
|
|
56
|
-
"@konce-pt/table": "0.
|
|
57
|
-
"@konce-pt/roadmap": "0.
|
|
58
|
-
"@konce-pt/
|
|
49
|
+
"@konce-pt/chat": "0.9.0",
|
|
50
|
+
"@konce-pt/backdrop": "0.9.0",
|
|
51
|
+
"@konce-pt/datetime": "0.9.0",
|
|
52
|
+
"@konce-pt/chart": "0.9.0",
|
|
53
|
+
"@konce-pt/mention": "0.9.0",
|
|
54
|
+
"@konce-pt/map": "0.9.0",
|
|
55
|
+
"@konce-pt/icons": "0.9.0",
|
|
56
|
+
"@konce-pt/table": "0.9.0",
|
|
57
|
+
"@konce-pt/roadmap": "0.9.0",
|
|
58
|
+
"@konce-pt/i18n": "0.9.0"
|
|
59
59
|
},
|
|
60
60
|
"module": "fesm2022/konce-pt-angular.mjs",
|
|
61
61
|
"typings": "types/konce-pt-angular.d.ts",
|
package/src/lib/button/llms.txt
CHANGED
|
@@ -1,33 +1,76 @@
|
|
|
1
1
|
# KptButton (kpt-button)
|
|
2
2
|
|
|
3
|
-
The Koncept UI button. It renders a native `<button>` (semantics + form submit)
|
|
4
|
-
Standalone, OnPush, signals. Import: `import { KptButton } from '@konce-pt/angular';`
|
|
3
|
+
The Koncept UI button. It renders a native `<button>` (semantics + form submit), or an `<a>` when
|
|
4
|
+
you pass `href`. Standalone, OnPush, signals. Import: `import { KptButton } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
6
|
## Selector
|
|
7
7
|
`kpt-button`
|
|
8
8
|
|
|
9
|
+
## DOM
|
|
10
|
+
<kpt-button class="kpt-button-host">
|
|
11
|
+
<button class="kpt-button" type="button" data-variant="filled" data-size="md">
|
|
12
|
+
<kpt-icon class="kpt-button__icon kpt-icon-host">…</kpt-icon>
|
|
13
|
+
<span class="kpt-button__content">…</span>
|
|
14
|
+
<kpt-icon class="kpt-button__icon kpt-button__icon--end kpt-icon-host">…</kpt-icon>
|
|
15
|
+
</button>
|
|
16
|
+
</kpt-button>
|
|
17
|
+
|
|
9
18
|
## Inputs (input signals)
|
|
10
|
-
- `variant`: 'filled' | 'tonal' | 'outline' | 'text' | 'danger' (default 'filled')
|
|
11
|
-
- `size`: 'sm' | 'md' | 'lg' (default 'md')
|
|
19
|
+
- `variant`: 'filled' | 'elevated' | 'tonal' | 'outline' | 'text' | 'link' | 'danger' | 'success' | 'warning' | 'info' (default 'filled')
|
|
20
|
+
- `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' (default 'md')
|
|
12
21
|
- `type`: 'button' | 'submit' | 'reset' (default 'button')
|
|
13
22
|
- `disabled`: boolean (booleanAttribute)
|
|
14
23
|
- `loading`: boolean — a spinner + blocked interaction, sets aria-busy
|
|
15
24
|
- `fullWidth`: boolean — the full width of the container
|
|
25
|
+
- `icon` / `iconEnd`: string — a name from the icon registry
|
|
26
|
+
- `iconClass` / `iconEndClass`: string — an extra class on that icon
|
|
27
|
+
- `href`: string — renders an `<a>` instead of a `<button>`
|
|
28
|
+
- `target` / `rel`: string — only meaningful together with `href`
|
|
16
29
|
|
|
17
30
|
## Events
|
|
18
31
|
None of its own — the native `click` bubbles out of the inner `<button>`; bind `(click)` on `<kpt-button>`.
|
|
19
32
|
|
|
33
|
+
## Icons
|
|
34
|
+
Two ways in, one result. `icon` and `iconEnd` take a name from the icon registry and the component
|
|
35
|
+
renders it; anything put in the slot is laid out the same way. Both get the gap from
|
|
36
|
+
`--kpt-button-gap` and a size that follows `size` (0.875rem at `xs` up to 1.5rem at `xl`) — the
|
|
37
|
+
content box is a flex container, so an icon sits on the centre line rather than on the text baseline.
|
|
38
|
+
|
|
39
|
+
`loading` replaces the leading icon with the spinner instead of standing next to it, and the
|
|
40
|
+
spinner takes that icon's size, so the label does not jump when loading starts. The trailing icon
|
|
41
|
+
stays put — it usually marks direction rather than the action.
|
|
42
|
+
|
|
43
|
+
`iconClass` / `iconEndClass` add a class next to the permanent `.kpt-button__icon` hook, for the
|
|
44
|
+
cases where one instance needs a different colour or a rotation.
|
|
45
|
+
|
|
46
|
+
## Link and the `link` variant
|
|
47
|
+
Two different things. `variant="link"` only changes the looks — underline, transparent background,
|
|
48
|
+
no side padding, so it sits inside a sentence. `href` changes the element: the component renders
|
|
49
|
+
`<a class="kpt-button">` instead of `<button>`, and the two combine freely (a filled button can be
|
|
50
|
+
a link, a `link` variant can be a plain button).
|
|
51
|
+
|
|
52
|
+
A disabled link loses its `href` rather than just gaining an attribute — otherwise it would stay
|
|
53
|
+
clickable and reachable with the keyboard; it also gets `aria-disabled="true"` and `tabindex="-1"`.
|
|
54
|
+
`target="_blank"` without an explicit `rel` gets `rel="noopener noreferrer"`.
|
|
55
|
+
|
|
20
56
|
## Examples
|
|
21
57
|
<kpt-button (click)="save()">Save</kpt-button>
|
|
22
|
-
<kpt-button
|
|
58
|
+
<kpt-button icon="device-floppy" (click)="save()">Save</kpt-button>
|
|
59
|
+
<kpt-button iconEnd="chevron-right" variant="outline">Next</kpt-button>
|
|
60
|
+
<kpt-button icon="printer" variant="text" size="sm">Print</kpt-button>
|
|
61
|
+
<kpt-button variant="success">Approve</kpt-button>
|
|
62
|
+
<kpt-button variant="link" href="/docs">Documentation</kpt-button>
|
|
23
63
|
<kpt-button variant="danger" [loading]="deleting()">Delete</kpt-button>
|
|
64
|
+
<kpt-button variant="outline"><kpt-icon name="printer" />Print</kpt-button>
|
|
24
65
|
<form (submit)="onSubmit()"><kpt-button type="submit">Send</kpt-button></form>
|
|
25
66
|
|
|
26
67
|
## Tokens (styling)
|
|
27
|
-
`--kpt-button-radius`, `--kpt-button-font-weight`, `--kpt-button-gap`,
|
|
28
|
-
`--kpt-button-filled-{bg,fg,bg-hover,bg-active}`, `--kpt-button-
|
|
29
|
-
`--kpt-button-
|
|
30
|
-
|
|
68
|
+
`--kpt-button-radius`, `--kpt-button-font-weight`, `--kpt-button-gap`, and one group per variant:
|
|
69
|
+
`--kpt-button-filled-{bg,fg,bg-hover,bg-active}`, `--kpt-button-elevated-{bg,fg,bg-hover}`,
|
|
70
|
+
`--kpt-button-tonal-{bg,fg,bg-hover}`, `--kpt-button-outline-{border,fg,bg-hover}`,
|
|
71
|
+
`--kpt-button-text-{fg,bg-hover}`, `--kpt-button-link-{fg,fg-hover}`,
|
|
72
|
+
`--kpt-button-danger-{bg,fg,bg-hover}` and the same triplet for success, warning and info.
|
|
73
|
+
The elevated variant also reaches for `--kpt-shadow-sm` and `--kpt-shadow-md`.
|
|
31
74
|
|
|
32
75
|
## The state layer (hover / active)
|
|
33
76
|
Hover and active feedback is carried by an `::after` pseudo-element (`opacity` 0 → 1),
|
|
@@ -43,4 +86,5 @@ invisible. That is why the button carries `position: relative` and `isolation: i
|
|
|
43
86
|
## Accessibility
|
|
44
87
|
- A native `<button>` — full keyboard and screen reader support.
|
|
45
88
|
- `loading` sets `aria-busy="true"` and disables the button (`disabled`).
|
|
89
|
+
- An `<a>` matches no `:disabled`, so the disabled look keys off `[aria-disabled='true']` as well.
|
|
46
90
|
- The focus ring comes from `@konce-pt/styles` (`--kpt-color-focus-ring`).
|
|
@@ -5,10 +5,26 @@ Import: `import { KptButtonGroup, KptOption } from '@konce-pt/angular';`
|
|
|
5
5
|
|
|
6
6
|
## Inputs
|
|
7
7
|
- `options`: KptOption<T>[]; `value`: model<T>; `size`: 'sm'|'md'|'lg'; `disabled`/`invalid`/`touched`; `touch`
|
|
8
|
+
- `iconOnly`: boolean — hides the labels and leaves the icons alone
|
|
9
|
+
|
|
10
|
+
## Icons
|
|
11
|
+
An option carries its icon by name: `KptOption.icon` is a key from the icon registry, and the group
|
|
12
|
+
renders it before the label. The item is a flex box, so the icon gets the `--kpt-button-gap` spacing
|
|
13
|
+
and a size that follows `size` (1rem at `sm` up to 1.25rem at `lg`) — the same scale as `kpt-button`,
|
|
14
|
+
so a group standing next to a button matches it.
|
|
15
|
+
|
|
16
|
+
`iconOnly` drops the label from the page but keeps it as the accessible name: the item gets both
|
|
17
|
+
`aria-label` and `title`, so a screen reader still says "Grid" and a mouse user gets a tooltip.
|
|
18
|
+
Each item also becomes a square, because a lone icon inside a 1rem side padding looks adrift.
|
|
19
|
+
|
|
20
|
+
The icon takes its colour from `currentColor`, so the active item — filled with
|
|
21
|
+
`--kpt-color-primary` — flips the icon to `--kpt-color-on-primary` with no extra rule.
|
|
8
22
|
|
|
9
23
|
## Examples
|
|
10
24
|
<kpt-button-group [(value)]="view" [options]="[{label:'List',value:'list'},{label:'Grid',value:'grid'}]" />
|
|
25
|
+
<kpt-button-group [(value)]="view" [options]="[{icon:'list',label:'List',value:'list'}]" />
|
|
26
|
+
<kpt-button-group [(value)]="align" [options]="alignOptions" iconOnly />
|
|
11
27
|
<kpt-button-group [formField]="f.period" [options]="periods" />
|
|
12
28
|
|
|
13
29
|
## Tokens
|
|
14
|
-
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-muted`.
|
|
30
|
+
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-muted`, `--kpt-button-gap`.
|
package/src/lib/dialog/llms.txt
CHANGED
|
@@ -9,6 +9,9 @@ Import: `import { KptDialog } from '@konce-pt/angular';`
|
|
|
9
9
|
## Inputs
|
|
10
10
|
- `open`: model<boolean> — two-way `[(open)]`
|
|
11
11
|
- `header`: string; `dismissible`: boolean (Esc/× closes it; default true)
|
|
12
|
+
- `size`: 'sm' | 'md' | 'lg' (default 'md') — 24rem / 32rem / 48rem, always capped at the viewport
|
|
13
|
+
(`min(var(--_width), calc(100vw - 2rem))`). Reach for `lg` when the content cannot sensibly be
|
|
14
|
+
narrowed: code, a table, two columns side by side.
|
|
12
15
|
|
|
13
16
|
## Slots
|
|
14
17
|
- the default content → the body; an element with the `kptDialogFooter` attribute → the footer
|
|
@@ -60,6 +63,13 @@ moved inside the `<dialog>` (see the section above), so clipping the dialog woul
|
|
|
60
63
|
panels of `kpt-select` or `kpt-datepicker`. It is not needed for scrolling either:
|
|
61
64
|
once it is a flex column, nothing sticks out of the dialog.
|
|
62
65
|
|
|
66
|
+
## The footer wraps
|
|
67
|
+
|
|
68
|
+
`[kptDialogFooter]` is a flex row with `flex-wrap: wrap`, and the wrapping is not cosmetic.
|
|
69
|
+
A dialog that does not fit its buttons does not let them stick out — they get **clipped**, because
|
|
70
|
+
the browser gives `<dialog>` its own scrolling box. Four buttons in an `sm` dialog are enough for
|
|
71
|
+
the first one to become unreadable with no way to reach it. Wrapping turns that into a second row.
|
|
72
|
+
|
|
63
73
|
A pinned action bar inside the content (say "Cancel / Save" in `kpt-map-create-dialog`)
|
|
64
74
|
is done with `position: sticky` — the scrolling container is `.kpt-dialog__body`.
|
|
65
75
|
The negative side margins have to match its padding (`--kpt-space-6`),
|
|
@@ -1,16 +1,92 @@
|
|
|
1
1
|
# KptProgress (kpt-progress)
|
|
2
2
|
|
|
3
|
-
A progress indicator — linear or circular, determinate (
|
|
3
|
+
A progress indicator — linear or circular, determinate (`min`–`max`) or indeterminate (`value` = null).
|
|
4
4
|
Import: `import { KptProgress } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
+
## DOM
|
|
7
|
+
<!-- linear, with a label, a buffer and a value -->
|
|
8
|
+
<kpt-progress class="kpt-progress-host" data-type="linear" data-size="md" data-variant="primary" data-label-position="top">
|
|
9
|
+
<span class="kpt-progress__label">Loading…</span>
|
|
10
|
+
<div class="kpt-progress__linear" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="80">
|
|
11
|
+
<div class="kpt-progress__buffer" style="width: 92%"></div>
|
|
12
|
+
<div class="kpt-progress__bar" style="width: 80%"></div>
|
|
13
|
+
</div>
|
|
14
|
+
<span class="kpt-progress__value" aria-hidden="true">80%</span>
|
|
15
|
+
</kpt-progress>
|
|
16
|
+
|
|
17
|
+
<!-- circular -->
|
|
18
|
+
<kpt-progress class="kpt-progress-host" data-type="circular" data-size="md" data-variant="success">
|
|
19
|
+
<svg class="kpt-progress__circular" viewBox="0 0 40 40" role="progressbar" aria-valuenow="75">
|
|
20
|
+
<circle class="kpt-progress__track" cx="20" cy="20" r="16"></circle>
|
|
21
|
+
<circle class="kpt-progress__bar" cx="20" cy="20" r="16" style="stroke-dasharray: 100.531; stroke-dashoffset: 25.1327"></circle>
|
|
22
|
+
</svg>
|
|
23
|
+
<span class="kpt-progress__value" aria-hidden="true">75%</span>
|
|
24
|
+
</kpt-progress>
|
|
25
|
+
|
|
26
|
+
The label, the track and the value are siblings straight under the host — there is no wrapper element.
|
|
27
|
+
`data-variant`, `data-type`, `data-size` and `data-label-position` all sit on the host, which is also
|
|
28
|
+
where the private `--_color` and `--_thickness` are resolved.
|
|
29
|
+
|
|
6
30
|
## Inputs
|
|
7
|
-
- `value`: number|null (null
|
|
8
|
-
- `
|
|
31
|
+
- `value`: number|null (default null) — a value on the `min`–`max` scale, or null for indeterminate
|
|
32
|
+
- `min`: number (default 0); `max`: number (default 100)
|
|
33
|
+
- `variant`: 'primary'|'success'|'danger'|'warning'|'info' (default 'primary')
|
|
34
|
+
- `type`: 'linear'|'circular' (default 'linear')
|
|
35
|
+
- `size`: 'sm'|'md'|'lg' (default 'md') — track thickness, and arc width on the circular variant
|
|
36
|
+
- `diameter`: number (default 40) — the circular variant's size in pixels
|
|
37
|
+
- `bufferValue`: number|null (default null) — a second, dimmed bar behind the main one; linear only
|
|
38
|
+
- `showValue`: boolean (default false) — turns the value area on; projected content needs it too
|
|
39
|
+
- `valueFormat`: 'percent'|'fraction'|'none' (default 'percent')
|
|
40
|
+
- `label`: string — descriptive text next to the bar; it also becomes the `aria-label`
|
|
41
|
+
- `labelPosition`: 'top'|'bottom'|'end' (default 'top') — ignored by the circular variant
|
|
42
|
+
|
|
43
|
+
## Value label
|
|
44
|
+
`showValue` opens the value area; `valueFormat` decides what goes in it — `percent` renders `80%`,
|
|
45
|
+
`fraction` renders `152 / 160` from `value` and `max`, `none` leaves it empty. Both strings come from
|
|
46
|
+
the `KptMessages` dictionary (`progress.percent`, `progress.fraction`), so a new locale can reshape them.
|
|
47
|
+
|
|
48
|
+
Projected content replaces the formatted value instead of adding to it, which is how a circle shows
|
|
49
|
+
a headline number over a caption. Projection still requires `showValue`, because that input is what
|
|
50
|
+
renders the element the content lands in.
|
|
51
|
+
|
|
52
|
+
The circular variant always centres the value over the arc; `label` is not drawn there, it only feeds
|
|
53
|
+
the accessible name.
|
|
54
|
+
|
|
55
|
+
## How the arc is drawn
|
|
56
|
+
The circle lives in a fixed `viewBox="0 0 40 40"` with `r=16`, so the circumference is computed from
|
|
57
|
+
that radius, not from `diameter` — the SVG scales, the maths does not change. The arc is the dash
|
|
58
|
+
offset: full circumference means empty, zero means complete. `size` only changes `stroke-width`, and
|
|
59
|
+
the widest step still fits inside the box, so no arc is ever clipped.
|
|
60
|
+
|
|
61
|
+
Values outside the range are clamped rather than rejected, `max` ≤ `min` collapses to zero, and the
|
|
62
|
+
buffer is never allowed behind the main bar — a computed percentage that briefly overshoots cannot
|
|
63
|
+
break the drawing.
|
|
9
64
|
|
|
10
65
|
## Examples
|
|
11
66
|
<kpt-progress [value]="60" />
|
|
12
|
-
<kpt-progress
|
|
67
|
+
<kpt-progress [value]="80" label="Loading…" showValue />
|
|
68
|
+
<kpt-progress [value]="152" [max]="160" size="lg" showValue valueFormat="fraction" labelPosition="bottom" />
|
|
69
|
+
<kpt-progress [value]="65" showValue labelPosition="end" />
|
|
70
|
+
<kpt-progress [value]="38" [bufferValue]="62" />
|
|
71
|
+
<kpt-progress type="circular" [value]="80" showValue />
|
|
72
|
+
<kpt-progress type="circular" [value]="72" [diameter]="140" size="lg" showValue>
|
|
73
|
+
<strong>29</strong>
|
|
74
|
+
<small>Excellent</small>
|
|
75
|
+
</kpt-progress>
|
|
13
76
|
<kpt-progress [value]="null" />
|
|
14
77
|
|
|
15
78
|
## Tokens
|
|
16
|
-
`--kpt-color-
|
|
79
|
+
The semantic colour of each variant (`--kpt-color-primary` / `-success` / `-danger` / `-warning` /
|
|
80
|
+
`-info`), plus the component layer: `--kpt-progress-track-bg`, `--kpt-progress-thickness-sm`,
|
|
81
|
+
`--kpt-progress-thickness-md`, `--kpt-progress-thickness-lg`, `--kpt-progress-buffer-opacity`,
|
|
82
|
+
`--kpt-progress-label-fg`, `--kpt-progress-value-fg`, `--kpt-progress-gap`.
|
|
83
|
+
|
|
84
|
+
## Accessibility
|
|
85
|
+
`role="progressbar"` with `aria-valuemin`, `aria-valuemax` and `aria-valuenow`; an indeterminate bar
|
|
86
|
+
leaves the value out, which is how a screen reader learns the progress is unknown rather than zero.
|
|
87
|
+
`valueFormat="fraction"` also sets `aria-valuetext`, so the reader says "152 / 160" instead of
|
|
88
|
+
announcing the raw number as a percentage. The visible value is `aria-hidden`, so it is never read
|
|
89
|
+
twice. The accessible name comes from `label`, or from the dictionary when there is none.
|
|
90
|
+
|
|
91
|
+
Under `prefers-reduced-motion: reduce` the indeterminate animation slows down instead of stopping —
|
|
92
|
+
a frozen progress indicator reads as a hung application.
|
|
@@ -17,32 +17,50 @@ import { KptColumnFilter, KptColumnSummary } from '@konce-pt/table';
|
|
|
17
17
|
export { KptColumnFilter, KptColumnFilterType, KptColumnSummary, KptSummaryFn } from '@konce-pt/table';
|
|
18
18
|
import * as _konce_pt_angular from '@konce-pt/angular';
|
|
19
19
|
|
|
20
|
-
type KptButtonVariant = 'filled' | 'tonal' | 'outline' | 'text' | 'danger';
|
|
21
|
-
type KptButtonSize = 'sm' | 'md' | 'lg';
|
|
20
|
+
type KptButtonVariant = 'filled' | 'elevated' | 'tonal' | 'outline' | 'text' | 'link' | 'danger' | 'success' | 'warning' | 'info';
|
|
21
|
+
type KptButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
22
22
|
/**
|
|
23
|
-
* Przycisk Koncept UI. Renderuje natywny `<button>` (
|
|
24
|
-
*
|
|
23
|
+
* Przycisk Koncept UI. Renderuje natywny `<button>` (semantyka + submit formularza)
|
|
24
|
+
* albo `<a>`, gdy podasz `href`.
|
|
25
|
+
*
|
|
26
|
+
* Ikonę można podać nazwą (`icon`/`iconEnd`) albo wstawić do slotu — oba sposoby dostają
|
|
27
|
+
* ten sam odstęp i tę samą skalę. Przy `loading` spinner zajmuje miejsce ikony wiodącej.
|
|
25
28
|
*
|
|
26
29
|
* @example
|
|
27
|
-
* <kpt-button
|
|
28
|
-
* <kpt-button
|
|
30
|
+
* <kpt-button (click)="save()">Zapisz</kpt-button>
|
|
31
|
+
* <kpt-button icon="device-floppy" (click)="save()">Zapisz</kpt-button>
|
|
32
|
+
* <kpt-button iconEnd="chevron-right" variant="outline">Dalej</kpt-button>
|
|
33
|
+
* <kpt-button variant="link" href="/docs">Dokumentacja</kpt-button>
|
|
34
|
+
* <kpt-button variant="danger" [loading]="deleting()">Usuń</kpt-button>
|
|
29
35
|
*/
|
|
30
36
|
declare class KptButton {
|
|
31
|
-
/** Wariant wizualny. */
|
|
32
37
|
readonly variant: _angular_core.InputSignal<KptButtonVariant>;
|
|
33
|
-
/** Rozmiar. */
|
|
34
38
|
readonly size: _angular_core.InputSignal<KptButtonSize>;
|
|
35
|
-
/** Typ natywnego przycisku (istotne w formularzach). */
|
|
36
39
|
readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
37
|
-
/** Wyłączony. */
|
|
38
40
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
|
-
/** Stan ładowania — pokazuje spinner i blokuje interakcję. */
|
|
40
41
|
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
41
|
-
/** Rozciągnięcie na całą szerokość kontenera. */
|
|
42
42
|
readonly fullWidth: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
43
|
+
/** Nazwa ikony wiodącej z rejestru (`KptIconRegistry`). */
|
|
44
|
+
readonly icon: _angular_core.InputSignal<string | undefined>;
|
|
45
|
+
/** Nazwa ikony zamykającej — zwykle znacznik kierunku, nie akcja. */
|
|
46
|
+
readonly iconEnd: _angular_core.InputSignal<string | undefined>;
|
|
47
|
+
/** Klasa dokładana do ikony wiodącej; obok stałego haka `.kpt-button__icon`. */
|
|
48
|
+
readonly iconClass: _angular_core.InputSignal<string | undefined>;
|
|
49
|
+
readonly iconEndClass: _angular_core.InputSignal<string | undefined>;
|
|
50
|
+
/** Podany adres zamienia `<button>` na `<a>`. */
|
|
51
|
+
readonly href: _angular_core.InputSignal<string | undefined>;
|
|
52
|
+
readonly target: _angular_core.InputSignal<string | undefined>;
|
|
53
|
+
readonly rel: _angular_core.InputSignal<string | undefined>;
|
|
43
54
|
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
55
|
+
/** Spinner zajmuje miejsce ikony wiodącej, więc przy ładowaniu jej nie renderujemy. */
|
|
56
|
+
protected readonly showLeadingIcon: _angular_core.Signal<boolean>;
|
|
57
|
+
protected readonly leadingIconClass: _angular_core.Signal<string>;
|
|
58
|
+
protected readonly trailingIconClass: _angular_core.Signal<string>;
|
|
59
|
+
/** `target="_blank"` bez `rel` to wektor na `window.opener` — dokładamy domyślne. */
|
|
60
|
+
protected readonly effectiveRel: _angular_core.Signal<string | null>;
|
|
61
|
+
private iconClasses;
|
|
44
62
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptButton, never>;
|
|
45
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptButton, "kpt-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptButton, "kpt-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconEnd": { "alias": "iconEnd"; "required": false; "isSignal": true; }; "iconClass": { "alias": "iconClass"; "required": false; "isSignal": true; }; "iconEndClass": { "alias": "iconEndClass"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
/**
|
|
@@ -84,13 +102,19 @@ interface KptOption<T = unknown> {
|
|
|
84
102
|
label: string;
|
|
85
103
|
value: T;
|
|
86
104
|
disabled?: boolean;
|
|
105
|
+
/** Nazwa ikony z rejestru. Renderuje ją dziś wyłącznie `kpt-button-group`. */
|
|
106
|
+
icon?: string;
|
|
87
107
|
}
|
|
88
108
|
|
|
89
109
|
/**
|
|
90
110
|
* Segmentowana grupa przycisków (toggle) — pojedynczy wybór z opcji. Signal Forms.
|
|
91
111
|
*
|
|
112
|
+
* Pozycja może mieć ikonę (`KptOption.icon`); `iconOnly` chowa etykietę, ale zostawia ją
|
|
113
|
+
* w nazwie dostępnej, więc czytnik ekranu dalej wie, co wybiera.
|
|
114
|
+
*
|
|
92
115
|
* @example
|
|
93
116
|
* <kpt-button-group [(value)]="view" [options]="[{label:'Lista',value:'list'},{label:'Siatka',value:'grid'}]" />
|
|
117
|
+
* <kpt-button-group [(value)]="view" [options]="[{icon:'list',label:'Lista',value:'list'}]" iconOnly />
|
|
94
118
|
* <kpt-button-group [formField]="f.period" [options]="periods" />
|
|
95
119
|
*/
|
|
96
120
|
declare class KptButtonGroup<T = unknown> implements FormValueControl<T> {
|
|
@@ -100,10 +124,12 @@ declare class KptButtonGroup<T = unknown> implements FormValueControl<T> {
|
|
|
100
124
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
101
125
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
102
126
|
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
127
|
+
/** Chowa etykiety — zostaje sama ikona, a `label` zasila `aria-label` i `title`. */
|
|
128
|
+
readonly iconOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
103
129
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
104
130
|
protected select(opt: KptOption<T>): void;
|
|
105
131
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptButtonGroup<any>, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptButtonGroup<any>, "kpt-button-group", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
132
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptButtonGroup<any>, "kpt-button-group", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
107
133
|
}
|
|
108
134
|
|
|
109
135
|
/**
|
|
@@ -469,24 +495,66 @@ declare class KptSpinner {
|
|
|
469
495
|
}
|
|
470
496
|
|
|
471
497
|
type KptProgressVariant = 'primary' | 'success' | 'danger' | 'warning' | 'info';
|
|
498
|
+
type KptProgressType = 'linear' | 'circular';
|
|
499
|
+
type KptProgressSize = 'sm' | 'md' | 'lg';
|
|
500
|
+
/** Postać etykiety wartości: procent, „ile z ilu" albo brak. */
|
|
501
|
+
type KptProgressValueFormat = 'percent' | 'fraction' | 'none';
|
|
502
|
+
/** Gdzie siada wiersz etykiety względem paska (tylko `type="linear"`). */
|
|
503
|
+
type KptProgressLabelPosition = 'top' | 'bottom' | 'end';
|
|
472
504
|
/**
|
|
473
|
-
* Wskaźnik postępu — liniowy lub kołowy, określony (
|
|
505
|
+
* Wskaźnik postępu — liniowy lub kołowy, określony (`min`–`max`) lub nieokreślony (`value` = null).
|
|
506
|
+
*
|
|
507
|
+
* Etykietę wartości włącza `showValue`; rzutowana treść zastępuje sformatowaną wartość,
|
|
508
|
+
* więc w środku koła można pokazać cokolwiek.
|
|
474
509
|
*
|
|
475
510
|
* @example
|
|
476
511
|
* <kpt-progress [value]="60" />
|
|
477
|
-
* <kpt-progress
|
|
512
|
+
* <kpt-progress [value]="80" label="Ładowanie…" showValue />
|
|
513
|
+
* <kpt-progress [value]="152" [max]="160" showValue valueFormat="fraction" labelPosition="bottom" />
|
|
514
|
+
* <kpt-progress [value]="38" [bufferValue]="62" />
|
|
515
|
+
* <kpt-progress type="circular" [value]="75" variant="success" showValue />
|
|
478
516
|
* <kpt-progress [value]="null" /> <!-- indeterminate -->
|
|
479
517
|
*/
|
|
480
518
|
declare class KptProgress {
|
|
481
|
-
/**
|
|
519
|
+
/** Wartość w skali `min`–`max` albo null = postęp nieokreślony. */
|
|
482
520
|
readonly value: _angular_core.InputSignal<number | null>;
|
|
521
|
+
readonly min: _angular_core.InputSignal<number>;
|
|
522
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
483
523
|
readonly variant: _angular_core.InputSignal<KptProgressVariant>;
|
|
484
|
-
readonly type: _angular_core.InputSignal<
|
|
524
|
+
readonly type: _angular_core.InputSignal<KptProgressType>;
|
|
525
|
+
/** Grubość toru: `sm` 0.25rem, `md` 0.5rem, `lg` 0.75rem. */
|
|
526
|
+
readonly size: _angular_core.InputSignal<KptProgressSize>;
|
|
527
|
+
/** Średnica wariantu kołowego w pikselach. */
|
|
485
528
|
readonly diameter: _angular_core.InputSignal<number>;
|
|
529
|
+
/** Postęp buforowania — drugi, przygaszony pasek pod głównym (tylko liniowy). */
|
|
530
|
+
readonly bufferValue: _angular_core.InputSignal<number | null>;
|
|
531
|
+
/** Włącza obszar etykiety wartości — razem z nim renderuje się rzutowana treść. */
|
|
532
|
+
readonly showValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
533
|
+
readonly valueFormat: _angular_core.InputSignal<KptProgressValueFormat>;
|
|
534
|
+
/** Tekst opisowy obok paska; służy też za `aria-label`. */
|
|
535
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
536
|
+
readonly labelPosition: _angular_core.InputSignal<KptProgressLabelPosition>;
|
|
537
|
+
private readonly i18n;
|
|
486
538
|
protected readonly circumference: number;
|
|
539
|
+
protected readonly indeterminate: _angular_core.Signal<boolean>;
|
|
540
|
+
/** Ułamek 0–1. Odporny na `max` ≤ `min` i na wartości spoza zakresu. */
|
|
541
|
+
protected readonly ratio: _angular_core.Signal<number>;
|
|
542
|
+
protected readonly percent: _angular_core.Signal<number>;
|
|
543
|
+
/** Bufor nigdy nie cofa się za pasek główny — inaczej wyglądałby jak błąd renderowania. */
|
|
544
|
+
protected readonly bufferRatio: _angular_core.Signal<number>;
|
|
487
545
|
protected readonly offset: _angular_core.Signal<number>;
|
|
546
|
+
/** Tekst widoczny w etykiecie; pusty dla postępu nieokreślonego i `valueFormat="none"`. */
|
|
547
|
+
protected readonly valueText: _angular_core.Signal<string>;
|
|
548
|
+
/**
|
|
549
|
+
* Czytnik ekranu domyślnie odczytuje `aria-valuenow` jako procent, więc przy formacie „ile z ilu"
|
|
550
|
+
* podajemy mu ten sam napis, który widzi użytkownik.
|
|
551
|
+
*/
|
|
552
|
+
protected readonly ariaValueText: _angular_core.Signal<string | null>;
|
|
553
|
+
protected readonly ariaLabel: _angular_core.Signal<string>;
|
|
554
|
+
private toRatio;
|
|
555
|
+
private fractionText;
|
|
488
556
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptProgress, never>;
|
|
489
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptProgress, "kpt-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "diameter": { "alias": "diameter"; "required": false; "isSignal": true; }; }, {}, never,
|
|
557
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptProgress, "kpt-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "diameter": { "alias": "diameter"; "required": false; "isSignal": true; }; "bufferValue": { "alias": "bufferValue"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
490
558
|
}
|
|
491
559
|
|
|
492
560
|
type KptSkeletonVariant = 'text' | 'circle' | 'rect';
|
|
@@ -3060,6 +3128,8 @@ declare class KptAlert {
|
|
|
3060
3128
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptAlert, "kpt-alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
3061
3129
|
}
|
|
3062
3130
|
|
|
3131
|
+
/** Szerokość okna. `md` to wartość domyślna i zarazem jedyna, jaką okno miało wcześniej. */
|
|
3132
|
+
type KptDialogSize = 'sm' | 'md' | 'lg';
|
|
3063
3133
|
/**
|
|
3064
3134
|
* Okno modalne na natywnym `<dialog>` (focus trap, ESC, backdrop w standardzie).
|
|
3065
3135
|
* Sterowane sygnałem `open` (dwukierunkowe). Stopkę wstaw z atrybutem `kptDialogFooter`.
|
|
@@ -3077,6 +3147,12 @@ declare class KptDialog {
|
|
|
3077
3147
|
/** Otwarcie okna (dwukierunkowe). */
|
|
3078
3148
|
readonly open: _angular_core.ModelSignal<boolean>;
|
|
3079
3149
|
readonly header: _angular_core.InputSignal<string>;
|
|
3150
|
+
/**
|
|
3151
|
+
* Szerokość okna: `sm` 24rem, `md` 32rem (domyślna), `lg` 48rem — zawsze przycięta do szerokości
|
|
3152
|
+
* okna przeglądarki. `lg` jest dla treści, której nie da się sensownie zwęzić: kodu, tabeli,
|
|
3153
|
+
* porównania dwóch kolumn.
|
|
3154
|
+
*/
|
|
3155
|
+
readonly size: _angular_core.InputSignal<KptDialogSize>;
|
|
3080
3156
|
/** Pozwala zamknąć klawiszem Esc / przyciskiem ×. */
|
|
3081
3157
|
readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
3082
3158
|
protected readonly i18n: KptI18n;
|
|
@@ -3097,7 +3173,7 @@ declare class KptDialog {
|
|
|
3097
3173
|
private releaseOverlayContainer;
|
|
3098
3174
|
protected onCancel(event: Event): void;
|
|
3099
3175
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptDialog, never>;
|
|
3100
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDialog, "kpt-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["*", "[kptDialogFooter]"], true, never>;
|
|
3176
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDialog, "kpt-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["*", "[kptDialogFooter]"], true, never>;
|
|
3101
3177
|
}
|
|
3102
3178
|
|
|
3103
3179
|
interface KptToast {
|
|
@@ -3562,5 +3638,5 @@ declare class KptSpeedDial<T = unknown> {
|
|
|
3562
3638
|
}
|
|
3563
3639
|
|
|
3564
3640
|
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAuth, KptAuthProviderDef, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBackdrop, KptBadge, KptBottomSheet, KptBreadcrumb, KptBreakpointObserver, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCellEditDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMention, KptMentions, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPeek, KptPeekTrigger, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptShellNavToggle, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n, provideKptIcons };
|
|
3565
|
-
export type { KptAlertVariant, KptAuthLayout, KptAuthMode, KptAuthProvider, KptAuthProviderLayout, KptAuthResetValue, KptAuthSignInValue, KptAuthSignUpValue, KptAvatarItem, KptAvatarShape, KptAvatarSize, KptBadgeSize, KptBadgeVariant, KptBreadcrumbItem, KptBreakpoint, KptButtonSize, KptButtonVariant, KptCardVariant, KptCellEditEvent, KptChipTextTransform, KptChipVariant, KptColumn, KptColumnEdit, KptColumnEditType, KptConfirmOptions, KptConfirmRequest, KptDatepickerMode, KptDatepickerView, KptDividerOrientation, KptDrawerPosition, KptFormFieldControl, KptGalleriaItem, KptInputType, KptMenuItem, KptMeterItem, KptOption, KptPeekPlacement, KptProgressVariant, KptRichTool, KptRichToolbar, KptSidenavMode, KptSkeletonVariant, KptSliderValue, KptSpeedDialDirection, KptSplitterOrientation, KptTableLazyState, KptTimelineItem, KptToast, KptToastOptions, KptTooltipPosition, KptTreeNode };
|
|
3641
|
+
export type { KptAlertVariant, KptAuthLayout, KptAuthMode, KptAuthProvider, KptAuthProviderLayout, KptAuthResetValue, KptAuthSignInValue, KptAuthSignUpValue, KptAvatarItem, KptAvatarShape, KptAvatarSize, KptBadgeSize, KptBadgeVariant, KptBreadcrumbItem, KptBreakpoint, KptButtonSize, KptButtonVariant, KptCardVariant, KptCellEditEvent, KptChipTextTransform, KptChipVariant, KptColumn, KptColumnEdit, KptColumnEditType, KptConfirmOptions, KptConfirmRequest, KptDatepickerMode, KptDatepickerView, KptDialogSize, KptDividerOrientation, KptDrawerPosition, KptFormFieldControl, KptGalleriaItem, KptInputType, KptMenuItem, KptMeterItem, KptOption, KptPeekPlacement, KptProgressLabelPosition, KptProgressSize, KptProgressType, KptProgressValueFormat, KptProgressVariant, KptRichTool, KptRichToolbar, KptSidenavMode, KptSkeletonVariant, KptSliderValue, KptSpeedDialDirection, KptSplitterOrientation, KptTableLazyState, KptTimelineItem, KptToast, KptToastOptions, KptTooltipPosition, KptTreeNode };
|
|
3566
3642
|
//# sourceMappingURL=konce-pt-angular.d.ts.map
|