forty-cdk 0.2.0 → 0.3.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/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, Provider } from '@angular/core';
|
|
3
|
+
import { WritingDirection } from 'forty-cdk/core';
|
|
4
|
+
import * as forty_cdk_pagination from 'forty-cdk/pagination';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One entry in the computed visible-page list: either a clickable page number
|
|
8
|
+
* or an ellipsis gap standing in for a collapsed run of pages.
|
|
9
|
+
*/
|
|
10
|
+
interface PaginationItem {
|
|
11
|
+
/** Discriminator: a real page button, or a non-interactive ellipsis gap. */
|
|
12
|
+
readonly type: 'page' | 'ellipsis';
|
|
13
|
+
/** 1-based page number. Present only when `type` is `'page'`. */
|
|
14
|
+
readonly value?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Coordination contract owned by `ForPagination`. Page buttons, previous, and
|
|
19
|
+
* next pieces inject it to read the current page / derived list and drive
|
|
20
|
+
* navigation from a single source of truth.
|
|
21
|
+
*/
|
|
22
|
+
interface ForPaginationContext {
|
|
23
|
+
/** Current 1-based page. */
|
|
24
|
+
readonly page: Signal<number>;
|
|
25
|
+
/** Total number of pages. */
|
|
26
|
+
readonly count: Signal<number>;
|
|
27
|
+
/** Whether the whole control is disabled. */
|
|
28
|
+
readonly disabled: Signal<boolean>;
|
|
29
|
+
/** The computed visible-page list (page numbers + ellipsis gaps). */
|
|
30
|
+
readonly items: Signal<readonly PaginationItem[]>;
|
|
31
|
+
/** Whether the current page is the first (no previous page). */
|
|
32
|
+
readonly isFirst: Signal<boolean>;
|
|
33
|
+
/** Whether the current page is the last (no next page). */
|
|
34
|
+
readonly isLast: Signal<boolean>;
|
|
35
|
+
/** Navigate to `page`, clamped to `[1, count]`. No-op when disabled. */
|
|
36
|
+
goToPage(page: number): void;
|
|
37
|
+
/** Navigate to the previous page. No-op at the first page or when disabled. */
|
|
38
|
+
previous(): void;
|
|
39
|
+
/** Navigate to the next page. No-op at the last page or when disabled. */
|
|
40
|
+
next(): void;
|
|
41
|
+
}
|
|
42
|
+
/** DI token providing the pagination context to descendant pieces. */
|
|
43
|
+
declare const FOR_PAGINATION_CONTEXT: InjectionToken<ForPaginationContext>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Headless pagination navigation landmark, implementing the
|
|
47
|
+
* [WAI-ARIA `navigation` landmark](https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/navigation.html)
|
|
48
|
+
* with [`aria-current="page"`](https://www.w3.org/TR/wai-aria-1.2/#aria-current) on the active page.
|
|
49
|
+
*
|
|
50
|
+
* Derives the visible page list (with ellipsis gaps) from `page`, `count`,
|
|
51
|
+
* `siblingCount`, and `boundaryCount`. Exposes `items()`, `isFirst()`,
|
|
52
|
+
* `isLast()`, and navigation methods for the consumer template to render.
|
|
53
|
+
*
|
|
54
|
+
* There is no roving tabindex — each page button, previous, and next are their
|
|
55
|
+
* own tab stops. RTL is visual-only: the resolved `dir` reflects on the host
|
|
56
|
+
* for CSS; navigation semantics (previous = decrement, next = increment) never
|
|
57
|
+
* change based on direction.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```html
|
|
61
|
+
* <nav forPagination [(page)]="page" [count]="20" ariaLabel="Pagination" #pg="forPagination">
|
|
62
|
+
* <button forPaginationPrevious ariaLabel="Previous page">‹</button>
|
|
63
|
+
* @for (item of pg.items(); track $index) {
|
|
64
|
+
* @if (item.type === 'page') {
|
|
65
|
+
* <button forPaginationItem [page]="item.value!">{{ item.value }}</button>
|
|
66
|
+
* } @else {
|
|
67
|
+
* <span aria-hidden="true">…</span>
|
|
68
|
+
* }
|
|
69
|
+
* }
|
|
70
|
+
* <button forPaginationNext ariaLabel="Next page">›</button>
|
|
71
|
+
* </nav>
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
declare class ForPagination implements ForPaginationContext {
|
|
75
|
+
#private;
|
|
76
|
+
/**
|
|
77
|
+
* Current 1-based page number. Two-way bindable via `[(page)]`. The implicit
|
|
78
|
+
* `pageChange` output emits whenever the directive updates this value (via
|
|
79
|
+
* clicks, previous, or next). Do not add a separate `pageChange` output.
|
|
80
|
+
*/
|
|
81
|
+
readonly page: _angular_core.ModelSignal<number>;
|
|
82
|
+
/**
|
|
83
|
+
* Total number of pages. Always bind as `[count]="n"` (a number, not a
|
|
84
|
+
* string). Required.
|
|
85
|
+
*/
|
|
86
|
+
readonly count: _angular_core.InputSignal<number>;
|
|
87
|
+
/**
|
|
88
|
+
* Pages shown on each side of the current page before collapsing to an
|
|
89
|
+
* ellipsis. Default read from `provideForPaginationDefaults` for the
|
|
90
|
+
* surrounding scope (library fallback: `1`).
|
|
91
|
+
*/
|
|
92
|
+
readonly siblingCount: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* Pages always shown at each end (first and last). Default read from
|
|
95
|
+
* `provideForPaginationDefaults` for the surrounding scope (library
|
|
96
|
+
* fallback: `1`).
|
|
97
|
+
*/
|
|
98
|
+
readonly boundaryCount: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
99
|
+
/** Whether the entire pagination control is disabled. */
|
|
100
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
101
|
+
/**
|
|
102
|
+
* Writing direction. When unset (default `null`), the inherited ambient
|
|
103
|
+
* direction is resolved from the nearest ancestor carrying a `dir` attribute
|
|
104
|
+
* (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.
|
|
105
|
+
* The resolved value is reflected to the host `dir` attribute. RTL affects
|
|
106
|
+
* visual layout only — previous/next semantics do not change.
|
|
107
|
+
*/
|
|
108
|
+
readonly _dirInput: _angular_core.InputSignal<WritingDirection | null>;
|
|
109
|
+
readonly dir: _angular_core.Signal<WritingDirection>;
|
|
110
|
+
/**
|
|
111
|
+
* Accessible label for the navigation landmark. Supply this (or point
|
|
112
|
+
* `aria-labelledby` at a visible label element) when the page contains more
|
|
113
|
+
* than one `<nav>`. A `null` or empty value emits no attribute.
|
|
114
|
+
*/
|
|
115
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
116
|
+
/** The computed visible-page list (page numbers + ellipsis gaps). */
|
|
117
|
+
readonly items: _angular_core.Signal<readonly PaginationItem[]>;
|
|
118
|
+
/** Whether the current page is the first (no previous page). */
|
|
119
|
+
readonly isFirst: _angular_core.Signal<boolean>;
|
|
120
|
+
/** Whether the current page is the last (no next page). */
|
|
121
|
+
readonly isLast: _angular_core.Signal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Navigate to `page`, clamped to `[1, count]`. No-op when disabled.
|
|
124
|
+
*/
|
|
125
|
+
goToPage(page: number): void;
|
|
126
|
+
/** Navigate to the previous page. No-op at the first page or when disabled. */
|
|
127
|
+
previous(): void;
|
|
128
|
+
/** Navigate to the next page. No-op at the last page or when disabled. */
|
|
129
|
+
next(): void;
|
|
130
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForPagination, never>;
|
|
131
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForPagination, "[forPagination]", ["forPagination"], { "page": { "alias": "page"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": true; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "boundaryCount": { "alias": "boundaryCount"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Page number button. Apply on a `<button>` so Enter/Space activation is
|
|
136
|
+
* native. Reflects `aria-current="page"` when this button represents the
|
|
137
|
+
* currently active page. Clicking calls `ctx.goToPage(page)`.
|
|
138
|
+
*/
|
|
139
|
+
declare class ForPaginationItem {
|
|
140
|
+
protected readonly ctx: forty_cdk_pagination.ForPaginationContext;
|
|
141
|
+
/** The 1-based page number this button navigates to. */
|
|
142
|
+
readonly page: _angular_core.InputSignal<number>;
|
|
143
|
+
/** Per-item disabled override (in addition to the root's `disabled`). */
|
|
144
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
145
|
+
/** Whether this item is effectively disabled (own or root disabled). */
|
|
146
|
+
readonly effectiveDisabled: _angular_core.Signal<boolean>;
|
|
147
|
+
/** Whether this button represents the currently active page. */
|
|
148
|
+
readonly isCurrent: _angular_core.Signal<boolean>;
|
|
149
|
+
constructor();
|
|
150
|
+
protected activate(): void;
|
|
151
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForPaginationItem, never>;
|
|
152
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForPaginationItem, "[forPaginationItem]", ["forPaginationItem"], { "page": { "alias": "page"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Previous-page button. Apply on a `<button>` so Enter/Space activation is
|
|
157
|
+
* native. Disabled (via the native `disabled` attribute) when the current page
|
|
158
|
+
* is the first page or the root is disabled. Clicking calls `ctx.previous()`.
|
|
159
|
+
*/
|
|
160
|
+
declare class ForPaginationPrevious {
|
|
161
|
+
protected readonly ctx: forty_cdk_pagination.ForPaginationContext;
|
|
162
|
+
/**
|
|
163
|
+
* Accessible label for this button (e.g. "Previous page"). When `null`
|
|
164
|
+
* (default), no `aria-label` is emitted — the consumer should supply a
|
|
165
|
+
* visible label or set this input.
|
|
166
|
+
*/
|
|
167
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
168
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
169
|
+
constructor();
|
|
170
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForPaginationPrevious, never>;
|
|
171
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForPaginationPrevious, "[forPaginationPrevious]", ["forPaginationPrevious"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Next-page button. Apply on a `<button>` so Enter/Space activation is
|
|
176
|
+
* native. Disabled (via the native `disabled` attribute) when the current page
|
|
177
|
+
* is the last page or the root is disabled. Clicking calls `ctx.next()`.
|
|
178
|
+
*/
|
|
179
|
+
declare class ForPaginationNext {
|
|
180
|
+
protected readonly ctx: forty_cdk_pagination.ForPaginationContext;
|
|
181
|
+
/**
|
|
182
|
+
* Accessible label for this button (e.g. "Next page"). When `null`
|
|
183
|
+
* (default), no `aria-label` is emitted — the consumer should supply a
|
|
184
|
+
* visible label or set this input.
|
|
185
|
+
*/
|
|
186
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
187
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
188
|
+
constructor();
|
|
189
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForPaginationNext, never>;
|
|
190
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForPaginationNext, "[forPaginationNext]", ["forPaginationNext"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Defaults inherited by descendant paginations in the surrounding injector
|
|
195
|
+
* scope. Configure with `provideForPaginationDefaults` at the application root
|
|
196
|
+
* or in any component's `providers`; partial overrides merge with the parent.
|
|
197
|
+
*/
|
|
198
|
+
interface ForPaginationDefaults {
|
|
199
|
+
/** Pages shown on each side of the current page before collapsing to an ellipsis. */
|
|
200
|
+
siblingCount: number;
|
|
201
|
+
/** Pages always shown at each end (first/last). */
|
|
202
|
+
boundaryCount: number;
|
|
203
|
+
}
|
|
204
|
+
/** Token holding the resolved pagination defaults for the current scope. */
|
|
205
|
+
declare const FOR_PAGINATION_DEFAULTS: _angular_core.InjectionToken<ForPaginationDefaults>;
|
|
206
|
+
/**
|
|
207
|
+
* Configures forty-cdk pagination defaults for this injector scope. Partial
|
|
208
|
+
* overrides inherit unspecified keys from the parent scope (or library defaults
|
|
209
|
+
* at the root).
|
|
210
|
+
*/
|
|
211
|
+
declare function provideForPaginationDefaults(defaults?: Partial<ForPaginationDefaults>): Provider[];
|
|
212
|
+
|
|
213
|
+
export { FOR_PAGINATION_CONTEXT, FOR_PAGINATION_DEFAULTS, ForPagination, ForPaginationItem, ForPaginationNext, ForPaginationPrevious, provideForPaginationDefaults };
|
|
214
|
+
export type { ForPaginationContext, ForPaginationDefaults, PaginationItem };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Provider } from '@angular/core';
|
|
3
|
+
import { WritingDirection } from 'forty-cdk/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Headless implementation of the
|
|
7
|
+
* [WAI-ARIA Window Splitter pattern](https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/):
|
|
8
|
+
* the focusable divider between two resizable panes. Carries `role="separator"`
|
|
9
|
+
* with live `aria-valuenow` / `aria-valuemin` / `aria-valuemax`, is tabbable,
|
|
10
|
+
* handles arrow keys / Page Up-Down / Home / End / (optional) Enter, and
|
|
11
|
+
* supports pointer drag with `setPointerCapture`. Emits `(resizing)` on every
|
|
12
|
+
* mutation and `(resizeCommit)` once per key release / drag end.
|
|
13
|
+
*
|
|
14
|
+
* It is essentially a 1-D slider wearing a separator role; the static
|
|
15
|
+
* `[forSeparator]` divider stays a separate, thinner primitive so a visual-only
|
|
16
|
+
* separator never pulls the drag / keyboard-resize code in.
|
|
17
|
+
*
|
|
18
|
+
* Pointer drag arms only after the pointer travels past a small dead-zone (a
|
|
19
|
+
* few px), so a plain click that fires a stray sub-threshold `pointermove`
|
|
20
|
+
* never mutates the value — `(resizing)` won't fire on a jittery click.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <!-- Vertical divider between two horizontally stacked panes. -->
|
|
25
|
+
* <div
|
|
26
|
+
* forPaneResizer
|
|
27
|
+
* orientation="vertical"
|
|
28
|
+
* [(value)]="size"
|
|
29
|
+
* [min]="100"
|
|
30
|
+
* [max]="700"
|
|
31
|
+
* [step]="8"
|
|
32
|
+
* [largeStep]="80"
|
|
33
|
+
* aria-controls="pane-a pane-b"
|
|
34
|
+
* ></div>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare class ForPaneResizer {
|
|
38
|
+
#private;
|
|
39
|
+
/**
|
|
40
|
+
* Axis the divider line runs along. `horizontal` splits content stacked
|
|
41
|
+
* vertically; `vertical` splits content arranged horizontally. Defaults to
|
|
42
|
+
* `horizontal`.
|
|
43
|
+
*
|
|
44
|
+
* `orientation` describes the *separator line*; the resize axis runs
|
|
45
|
+
* perpendicular to it. APG: a horizontal pane stack uses a vertical
|
|
46
|
+
* separator, and arrow keys move along the resize axis.
|
|
47
|
+
*/
|
|
48
|
+
readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
49
|
+
/**
|
|
50
|
+
* Disables the resizer: it drops out of tab order, no keyboard or pointer
|
|
51
|
+
* mutation fires, and `aria-disabled` / `data-disabled` are reflected.
|
|
52
|
+
*/
|
|
53
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
|
+
/**
|
|
55
|
+
* Two-way bindable. The current value along the resize axis. Units are
|
|
56
|
+
* consumer-defined (px, %, fr, rem, …) — the directive treats this as an
|
|
57
|
+
* opaque number constrained by `min` / `max`. Pointer drag adds raw px
|
|
58
|
+
* deltas, so use px units when wiring drag directly; keyboard navigation is
|
|
59
|
+
* unit-agnostic.
|
|
60
|
+
*
|
|
61
|
+
* The `model()` change emitter (`(valueChange)`) follows the project-wide
|
|
62
|
+
* contract: it fires only on internal updates (keyboard, drag), never on
|
|
63
|
+
* consumer writes via `[(value)]` — observe transitions without binding
|
|
64
|
+
* back. `(resizing)` carries the same value with a verb-named alias for
|
|
65
|
+
* one-way wiring.
|
|
66
|
+
*/
|
|
67
|
+
readonly value: _angular_core.ModelSignal<number>;
|
|
68
|
+
/** Lower bound for `value`. Default `0`. */
|
|
69
|
+
readonly min: _angular_core.InputSignal<number>;
|
|
70
|
+
/** Upper bound for `value`. Default `100` (matches a percentage default). */
|
|
71
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
72
|
+
/** Step applied by ArrowKeys along the resize axis. Default `1`. */
|
|
73
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
74
|
+
/** Step applied by `Page Up` / `Page Down`. Default `10`. */
|
|
75
|
+
readonly largeStep: _angular_core.InputSignal<number>;
|
|
76
|
+
/**
|
|
77
|
+
* Optional human-readable value for `aria-valuetext`. Use when the bare
|
|
78
|
+
* number is not meaningful to AT (e.g. `"30 percent of viewport"`). When
|
|
79
|
+
* `null`, AT reads `aria-valuenow`.
|
|
80
|
+
*/
|
|
81
|
+
readonly valueText: _angular_core.InputSignal<string | null>;
|
|
82
|
+
/**
|
|
83
|
+
* Space-separated list of element ids the resizer splits. Surfaces as
|
|
84
|
+
* `aria-controls`. Recommended per APG so AT can relate the resizer to the
|
|
85
|
+
* panes it affects.
|
|
86
|
+
*/
|
|
87
|
+
readonly controls: _angular_core.InputSignal<string | null>;
|
|
88
|
+
/**
|
|
89
|
+
* Opt-in `Enter` (and `Space`) toggle: collapses the value to `min` and
|
|
90
|
+
* restores the last non-min value on the next press. APG-optional behaviour
|
|
91
|
+
* for resizers that back a collapsible pane. Off by default — enabling it
|
|
92
|
+
* changes the meaning of `Enter`.
|
|
93
|
+
*/
|
|
94
|
+
readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* Reading direction. RTL inverts ArrowLeft / ArrowRight on a vertical
|
|
97
|
+
* separator (horizontal pane stack) and the horizontal axis of pointer
|
|
98
|
+
* drag. When unset (default `null`), the inherited ambient direction is
|
|
99
|
+
* resolved from the nearest ancestor carrying a `dir` attribute (or
|
|
100
|
+
* `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins and
|
|
101
|
+
* the resolved value is reflected to the host `dir` attribute.
|
|
102
|
+
*/
|
|
103
|
+
readonly _dirInput: _angular_core.InputSignal<WritingDirection | null>;
|
|
104
|
+
readonly dir: _angular_core.Signal<WritingDirection>;
|
|
105
|
+
/**
|
|
106
|
+
* Verb-named alias for the model change emitter. Fires on every value
|
|
107
|
+
* mutation (keyboard step, pointer-move tick). Emits the same value as
|
|
108
|
+
* `(valueChange)`; pick one or the other based on whether you want
|
|
109
|
+
* two-way binding (`[(value)]`) or one-shot observation.
|
|
110
|
+
*/
|
|
111
|
+
readonly resizing: _angular_core.OutputEmitterRef<number>;
|
|
112
|
+
/**
|
|
113
|
+
* Fires once at the end of a resize burst — when the user releases the
|
|
114
|
+
* pointer (or it is cancelled) or releases an arrow / page key. Useful for
|
|
115
|
+
* persisting the final size after a drag, where `(resizing)` may fire 60+
|
|
116
|
+
* times per second.
|
|
117
|
+
*/
|
|
118
|
+
readonly resizeCommit: _angular_core.OutputEmitterRef<number>;
|
|
119
|
+
constructor();
|
|
120
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
121
|
+
protected onKeyUp(_event: KeyboardEvent): void;
|
|
122
|
+
protected onPointerDown(event: PointerEvent): void;
|
|
123
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForPaneResizer, never>;
|
|
124
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForPaneResizer, "[forPaneResizer]", ["forPaneResizer"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "largeStep": { "alias": "largeStep"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "resizing": "resizing"; "resizeCommit": "resizeCommit"; }, never, never, true, never>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Defaults inherited by descendant pane resizers in the surrounding injector
|
|
129
|
+
* scope. Configure with `provideForPaneResizerDefaults`. The shape is a stub
|
|
130
|
+
* today — present so future per-scope tuning can land without churning the
|
|
131
|
+
* public surface.
|
|
132
|
+
*/
|
|
133
|
+
interface ForPaneResizerDefaults {
|
|
134
|
+
}
|
|
135
|
+
/** Token holding the resolved pane-resizer defaults for the current scope. */
|
|
136
|
+
declare const FOR_PANE_RESIZER_DEFAULTS: _angular_core.InjectionToken<ForPaneResizerDefaults>;
|
|
137
|
+
/**
|
|
138
|
+
* Configures forty-cdk pane-resizer defaults for this injector scope. Partial
|
|
139
|
+
* overrides inherit unspecified keys from the parent scope (or library
|
|
140
|
+
* defaults at the root).
|
|
141
|
+
*/
|
|
142
|
+
declare function provideForPaneResizerDefaults(defaults?: Partial<ForPaneResizerDefaults>): Provider[];
|
|
143
|
+
|
|
144
|
+
export { FOR_PANE_RESIZER_DEFAULTS, ForPaneResizer, provideForPaneResizerDefaults };
|
|
145
|
+
export type { ForPaneResizerDefaults };
|