forty-cdk 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/breakpoints/README.md +22 -1
- package/combobox/README.md +1 -1
- package/context-menu/README.md +2 -2
- package/date-picker/README.md +2 -2
- package/dropdown-menu/README.md +3 -3
- package/fesm2022/forty-cdk-accordion.mjs +140 -140
- package/fesm2022/forty-cdk-aspect-ratio.mjs +43 -43
- package/fesm2022/forty-cdk-avatar.mjs +128 -128
- package/fesm2022/forty-cdk-breadcrumbs.mjs +70 -70
- package/fesm2022/forty-cdk-breakpoints.mjs +59 -58
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -1
- package/fesm2022/forty-cdk-button.mjs +152 -152
- package/fesm2022/forty-cdk-calendar.mjs +587 -587
- package/fesm2022/forty-cdk-carousel.mjs +336 -336
- package/fesm2022/forty-cdk-checkbox.mjs +110 -110
- package/fesm2022/forty-cdk-combobox.mjs +1305 -1356
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -1
- package/fesm2022/forty-cdk-context-menu.mjs +279 -326
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-core-overlay.mjs +4748 -0
- package/fesm2022/forty-cdk-core-overlay.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +3581 -7873
- package/fesm2022/forty-cdk-core.mjs.map +1 -1
- package/fesm2022/forty-cdk-date-field.mjs +477 -477
- package/fesm2022/forty-cdk-date-picker.mjs +593 -618
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -1
- package/fesm2022/forty-cdk-dialog.mjs +265 -264
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -1
- package/fesm2022/forty-cdk-disclosure.mjs +66 -66
- package/fesm2022/forty-cdk-drag-drop.mjs +329 -329
- package/fesm2022/forty-cdk-drawer.mjs +873 -872
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -1
- package/fesm2022/forty-cdk-dropdown-menu.mjs +225 -273
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-field.mjs +216 -216
- package/fesm2022/forty-cdk-fieldset.mjs +105 -105
- package/fesm2022/forty-cdk-file-upload.mjs +88 -88
- package/fesm2022/forty-cdk-hover-card.mjs +191 -190
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -1
- package/fesm2022/forty-cdk-input.mjs +129 -129
- package/fesm2022/forty-cdk-internationalized-date.mjs +90 -90
- package/fesm2022/forty-cdk-listbox.mjs +376 -395
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -1
- package/fesm2022/forty-cdk-menu.mjs +721 -787
- package/fesm2022/forty-cdk-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-menubar.mjs +455 -444
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -1
- package/fesm2022/forty-cdk-meter.mjs +66 -66
- package/fesm2022/forty-cdk-navigation-menu.mjs +490 -489
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-number-input.mjs +350 -350
- package/fesm2022/forty-cdk-otp-input.mjs +178 -178
- package/fesm2022/forty-cdk-pagination.mjs +142 -142
- package/fesm2022/forty-cdk-pane-resizer.mjs +140 -140
- package/fesm2022/forty-cdk-popover.mjs +257 -256
- package/fesm2022/forty-cdk-popover.mjs.map +1 -1
- package/fesm2022/forty-cdk-progress.mjs +94 -94
- package/fesm2022/forty-cdk-radio-group.mjs +159 -159
- package/fesm2022/forty-cdk-scroll-area.mjs +294 -294
- package/fesm2022/forty-cdk-search.mjs +178 -178
- package/fesm2022/forty-cdk-select.mjs +704 -778
- package/fesm2022/forty-cdk-select.mjs.map +1 -1
- package/fesm2022/forty-cdk-separator.mjs +33 -33
- package/fesm2022/forty-cdk-shared.mjs +5 -4
- package/fesm2022/forty-cdk-shared.mjs.map +1 -1
- package/fesm2022/forty-cdk-slider.mjs +253 -253
- package/fesm2022/forty-cdk-stepper.mjs +315 -315
- package/fesm2022/forty-cdk-switch.mjs +65 -65
- package/fesm2022/forty-cdk-table-virtualization.mjs +119 -119
- package/fesm2022/forty-cdk-table.mjs +1656 -1649
- package/fesm2022/forty-cdk-table.mjs.map +1 -1
- package/fesm2022/forty-cdk-tabs.mjs +141 -141
- package/fesm2022/forty-cdk-time-field.mjs +505 -505
- package/fesm2022/forty-cdk-time-picker.mjs +314 -349
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -1
- package/fesm2022/forty-cdk-toast.mjs +581 -581
- package/fesm2022/forty-cdk-toggle.mjs +224 -224
- package/fesm2022/forty-cdk-toolbar.mjs +140 -140
- package/fesm2022/forty-cdk-tooltip.mjs +255 -254
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -1
- package/fesm2022/forty-cdk-tree.mjs +572 -571
- package/fesm2022/forty-cdk-tree.mjs.map +1 -1
- package/fesm2022/forty-cdk-virtual-reorder.mjs +67 -67
- package/fesm2022/forty-cdk-virtualization.mjs +156 -156
- package/fesm2022/forty-cdk-visually-hidden.mjs +4 -4
- package/fesm2022/forty-cdk.mjs +3 -3
- package/menu/README.md +4 -3
- package/menubar/README.md +7 -7
- package/package.json +5 -1
- package/select/README.md +30 -1
- package/shared/README.md +1 -1
- package/table/README.md +3 -3
- package/time-picker/README.md +29 -0
- package/types/forty-cdk-breakpoints.d.ts +1 -0
- package/types/forty-cdk-combobox.d.ts +48 -49
- package/types/forty-cdk-context-menu.d.ts +25 -57
- package/types/forty-cdk-core-overlay.d.ts +3596 -0
- package/types/forty-cdk-core.d.ts +454 -3390
- package/types/forty-cdk-date-picker.d.ts +37 -48
- package/types/forty-cdk-dialog.d.ts +2 -1
- package/types/forty-cdk-drawer.d.ts +3 -2
- package/types/forty-cdk-dropdown-menu.d.ts +24 -58
- package/types/forty-cdk-hover-card.d.ts +2 -1
- package/types/forty-cdk-menu.d.ts +48 -114
- package/types/forty-cdk-menubar.d.ts +41 -54
- package/types/forty-cdk-popover.d.ts +2 -1
- package/types/forty-cdk-select.d.ts +22 -45
- package/types/forty-cdk-shared.d.ts +2 -1
- package/types/forty-cdk-table.d.ts +120 -118
- package/types/forty-cdk-time-picker.d.ts +18 -40
- package/types/forty-cdk-tooltip.d.ts +2 -1
- package/types/forty-cdk-visually-hidden.d.ts +1 -1
- package/visually-hidden/README.md +47 -0
package/README.md
CHANGED
|
@@ -43,13 +43,13 @@ Two packages are regular dependencies, installed automatically and never declare
|
|
|
43
43
|
|
|
44
44
|
**The package name itself exports nothing.** `import { … } from 'forty-cdk'` resolves to no symbol, and your editor will not auto-import anything under the bare package name — by design, so that every symbol has exactly one import path. There are three specifiers you do import from:
|
|
45
45
|
|
|
46
|
-
| Specifier | What it exports
|
|
47
|
-
| ---------------------------------- |
|
|
48
|
-
| `forty-cdk/<primitive>` | The primitive's directives, components, context tokens and defaults provider — `ForDialog` from `forty-cdk/dialog`, `ForAccordion` from `forty-cdk/accordion`, and so on for every entry in the tables below.
|
|
49
|
-
| [`forty-cdk/shared`](shared) | The cross-primitive contract types a primitive's public API references — `WritingDirection`, `VetoableEvent`, `DateAdapter`, `FloatingSide`, … — declared once and published once.
|
|
50
|
-
| `forty-cdk/internationalized-date` | The `@internationalized/date` adapters, kept apart so that optional peer stays genuinely optional.
|
|
46
|
+
| Specifier | What it exports |
|
|
47
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| `forty-cdk/<primitive>` | The primitive's directives, components, context tokens and defaults provider — `ForDialog` from `forty-cdk/dialog`, `ForAccordion` from `forty-cdk/accordion`, and so on for every entry in the tables below. |
|
|
49
|
+
| [`forty-cdk/shared`](shared) | The cross-primitive contract types a primitive's public API references — `WritingDirection`, `VetoableEvent`, `DateAdapter`, `FloatingSide`, … — declared once and published once. Eight ship from their own primitive instead; that README names them. |
|
|
50
|
+
| `forty-cdk/internationalized-date` | The `@internationalized/date` adapters, kept apart so that optional peer stays genuinely optional. |
|
|
51
51
|
|
|
52
|
-
`forty-cdk/core`
|
|
52
|
+
`forty-cdk/core` and `forty-cdk/core-overlay` resolve too, but neither is **public**: together they hold the engines and DI singletons the library refactors freely, and they exist so every primitive resolves that shared implementation to one compiled module. They are two rather than one for a bundling reason you get for free: a published module is a bundler's chunk-splitting unit, so keeping the positioning engine (`@floating-ui/dom` and the overlay shells) in its own module means a lazy route that renders no overlay does not load it. Measured on a seven-lazy-route app, that is **41.7 kB raw / 12.1 kB transfer** a non-overlay route no longer pays. If a symbol you need is not exported by the three specifiers above, it is internal by design — [open an issue](https://github.com/tutkli/forty-cdk/issues) rather than importing from either.
|
|
53
53
|
|
|
54
54
|
## Errors
|
|
55
55
|
|
|
@@ -156,7 +156,7 @@ The tables below group the primitives by purpose. The link on each name opens th
|
|
|
156
156
|
| [Separator](separator) | A static, optionally semantic divider between groups of content, horizontal or vertical. |
|
|
157
157
|
| [Aspect Ratio](aspect-ratio) | A container that keeps its content at a fixed width-to-height ratio. |
|
|
158
158
|
| [Avatar](avatar) | A user image with a graceful fallback across its loading lifecycle. |
|
|
159
|
-
| [Visually Hidden](visually-hidden) | Hides content visually while keeping it in the accessibility tree — screen-reader-only labels
|
|
159
|
+
| [Visually Hidden](visually-hidden) | Hides content visually while keeping it in the accessibility tree — screen-reader-only labels, plus the injectable `LiveAnnouncer`. |
|
|
160
160
|
|
|
161
161
|
### Feedback
|
|
162
162
|
|
|
@@ -171,7 +171,7 @@ Headless — no DOM or ARIA of their own; an `inject*` / provider API that other
|
|
|
171
171
|
|
|
172
172
|
| Utility | What it is |
|
|
173
173
|
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
174
|
-
| [Breakpoints](breakpoints) | A signal-first, zoneless, SSR-safe viewport breakpoint observer (`injectBreakpoints`).
|
|
174
|
+
| [Breakpoints](breakpoints) | A signal-first, zoneless, SSR-safe viewport breakpoint observer (`injectBreakpoints`), plus the `prefers-reduced-motion` detector. |
|
|
175
175
|
| [Drag & Drop](drag-drop) | Headless, accessible drag-and-drop for sortable lists and cross-list transfers, keyboard and pointer driven. |
|
|
176
176
|
| [Virtualization](virtualization) | A headless windowing core (`injectVirtualizer`) plus a `[forVirtualViewport]` layer that renders only the visible slice of huge lists. |
|
|
177
177
|
| [Table Virtualization](table-virtualization) | `[forTableVirtualized]`, the adapter that windows a `[forTable]` grid — its own entry point because it composes both the table and the windowing core. |
|
package/breakpoints/README.md
CHANGED
|
@@ -82,6 +82,27 @@ Now `injectBreakpoints()` autocompletes `'mobile' | 'tablet' | 'laptop' | 'deskt
|
|
|
82
82
|
| `active` | the largest breakpoint whose `min-width` matches, or `null` below the smallest |
|
|
83
83
|
| `matches(query)` | escape hatch for an arbitrary media query (orientation, `prefers-*`, …) |
|
|
84
84
|
|
|
85
|
+
### `injectPrefersReducedMotion`
|
|
86
|
+
|
|
87
|
+
The same shape for a different query: `injectPrefersReducedMotion()` returns a `Signal<boolean>` that is `true` while the user has asked their OS to suppress animation, and flips if they change the setting mid-session. Call it from an injection context, like `injectBreakpoints()`.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { computed } from '@angular/core';
|
|
91
|
+
import { injectPrefersReducedMotion } from 'forty-cdk/breakpoints';
|
|
92
|
+
|
|
93
|
+
export class Panel {
|
|
94
|
+
private readonly reducedMotion = injectPrefersReducedMotion();
|
|
95
|
+
|
|
96
|
+
protected readonly transition = computed(() =>
|
|
97
|
+
this.reducedMotion() ? 'none' : 'transform 200ms ease-out',
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
It is published here because forty-cdk ships no styles: the animation on a `data-state` change is yours, so honouring the preference is yours too — and a signal is what a `computed()` or a `[style]` binding can branch on, which a CSS `@media` block cannot. Treat `true` as "skip the animated path entirely", not "shorten the duration": the setting asks for no motion, not less of it.
|
|
103
|
+
|
|
104
|
+
`bp.matches('(prefers-reduced-motion: reduce)')` resolves to the same thing. Prefer the named helper — it is the one the library's own motion-bearing primitives (drag gestures, carousel, drawer) read, so the query string stays spelled in one place.
|
|
105
|
+
|
|
85
106
|
## SSR
|
|
86
107
|
|
|
87
|
-
On the server (or where `matchMedia` is unavailable) every query signal reads `false` and `active` reads `null`. No `matchMedia` access happens server-side, so the helper is safe under Angular Universal.
|
|
108
|
+
On the server (or where `matchMedia` is unavailable) every query signal reads `false` and `active` reads `null`. No `matchMedia` access happens server-side, so the helper is safe under Angular Universal. `injectPrefersReducedMotion()` reads `false` there for the same reason: the server render takes the animated branch, and the client applies the real preference on its first observation.
|
package/combobox/README.md
CHANGED
|
@@ -582,7 +582,7 @@ When `[totalCount]` is omitted, the directive falls back to `options().length` a
|
|
|
582
582
|
`[forCombobox]` exposes a `dir: 'ltr' | 'rtl'` input (default `'ltr'`). It drives:
|
|
583
583
|
|
|
584
584
|
- **Chip keyboard navigation** — ArrowLeft / ArrowRight roles swap so they follow the visual order of the chip cluster, not the DOM order. See _Chip keyboard_ above.
|
|
585
|
-
- **Default popover placement** — `align` defaults to `'start'` in LTR and `'end'` in RTL so the listbox anchors to the visually-leading edge of the input (`side` defaults to `'bottom'` in both). A consumer-provided `[align]` is honoured as-is — no automatic flip — so advanced layouts can pin an alignment regardless of writing direction.
|
|
585
|
+
- **Default popover placement** — `align` defaults to `'start'` in LTR and `'end'` in RTL so the listbox anchors to the visually-leading edge of the input (`side` defaults to `'bottom'` in both). A consumer-provided `[align]` is honoured as-is — no automatic flip — so advanced layouts can pin an alignment regardless of writing direction. `provideForComboboxDefaults({ align })` pins it for a whole scope the same way; its default is `null`, which is what "follow the writing direction" is spelled as there. `side` is scope-defaultable through the same provider, with the plain `'bottom'` fallback — writing direction does not enter into it.
|
|
586
586
|
|
|
587
587
|
The native `<input>` handles caret movement and BiDi from the document's CSS `direction` already, so there's nothing extra to do for the typed text itself.
|
|
588
588
|
|
package/context-menu/README.md
CHANGED
|
@@ -120,8 +120,8 @@ Both triggers carry `[menuPositioning]`, a partial `{ side, align, sideOffset, a
|
|
|
120
120
|
| Property | Type | Description |
|
|
121
121
|
| --------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
122
122
|
| `open` | `model<boolean>` | Two-way bindable. Whether the menu is shown.<br>**Default:** `false` |
|
|
123
|
-
| `side` | `input<string>` | Anchor side relative to the pointer.<br>**Default:** `'bottom'`
|
|
124
|
-
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`).<br>**Default:** `'start'`
|
|
123
|
+
| `side` | `input<string>` | Anchor side relative to the pointer. The default is read from `provideForContextMenuDefaults` for the surrounding scope.<br>**Default:** `'bottom'` |
|
|
124
|
+
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`). The default is read from `provideForContextMenuDefaults` for the surrounding scope.<br>**Default:** `'start'` |
|
|
125
125
|
| `sideOffset` | `input<number>` | Gap (px) between the pointer and the menu along the main axis.<br>**Default:** `0` |
|
|
126
126
|
| `alignOffset` | `input<number>` | Gap (px) along the cross axis (parallel to `side`).<br>**Default:** `0` |
|
|
127
127
|
| `fallbackAxisSideDirection` | `input<'none' \| 'start' \| 'end'>` | When both sides of the preferred axis overflow, lets `flip` drop the menu to a perpendicular side instead of clipping. `'none'` keeps only the opposite same-axis placement. The default is read from `provideForContextMenuDefaults` for the surrounding scope — set it once for the whole app rather than per call site.<br>**Default:** `'none'` |
|
package/date-picker/README.md
CHANGED
|
@@ -157,7 +157,7 @@ The library is styleless: presence in the DOM is the consumer's job (`@if (open(
|
|
|
157
157
|
| `formatOptions` | `input<Intl.DateTimeFormatOptions>` | Options for the text rendered by `[forDatePickerValue]`.<br>**Default:** `{ year: 'numeric', month: 'long', day: 'numeric' }` |
|
|
158
158
|
| `locale` | `input<string \| null>` | BCP 47 locale for the text rendered by `[forDatePickerValue]`. Not forwarded to the projected calendar — bind its `[locale]` too.<br>**Default:** `null` → runtime locale |
|
|
159
159
|
| `placeholder` | `input<string>` | Fallback text for `[forDatePickerValue]` when empty.<br>**Default:** `''` |
|
|
160
|
-
| `side` / `align` | `input` | Anchored placement (popover mode only)
|
|
160
|
+
| `side` / `align` | `input` | Anchored placement (popover mode only). Defaults from `provideForDatePickerDefaults` / `provideForDateRangePickerDefaults`.<br>**Default:** `'bottom'` / `'start'` |
|
|
161
161
|
| `dir` | `input<'ltr' \| 'rtl' \| null>` | Writing direction.<br>**Default:** `null` resolves the ambient direction; reflected to the host `dir` |
|
|
162
162
|
|
|
163
163
|
Plus the shared `FormUiControl` inputs from the base (`disabled`, `readonly`, `required`, `invalid`, `pending`, `dirty`, `name`, `errors`, and the `touched` model) and the floating tunables (`sideOffset`, `alignOffset`, `avoidCollisions`, `collisionPadding`, `sticky`, `hideWhenDetached`).
|
|
@@ -322,7 +322,7 @@ readonly booking = form(this.model, (p) => required(p.stay));
|
|
|
322
322
|
- **Native submission.** When `name` is set, two hidden inputs `<name>-start` / `<name>-end` mirror the committed endpoints as ISO `YYYY-MM-DD` for native `<form>` posts.
|
|
323
323
|
- **Bounds naming.** `minDate` / `maxDate` (not `min` / `max`) for the same reason as `ForDatePicker` — and additionally because `FormUiControl.min` / `max` are typed `NonNullable<TValue>` (the range object itself), which is meaningless as a bound.
|
|
324
324
|
|
|
325
|
-
Defaults are configured with `provideForDateRangePickerDefaults` (`sideOffset` / `collisionPadding`), and both wrapper patterns work via the exported `FOR_DATE_RANGE_PICKER_HOST_DIRECTIVE_INPUTS` / `FOR_DATE_RANGE_PICKER_HOST_DIRECTIVE_OUTPUTS` tuples — see [Wrapping form primitives](../../../docs/wrapping-form-primitives.md).
|
|
325
|
+
Defaults are configured with `provideForDateRangePickerDefaults` (`side` / `align` / `sideOffset` / `collisionPadding`), and both wrapper patterns work via the exported `FOR_DATE_RANGE_PICKER_HOST_DIRECTIVE_INPUTS` / `FOR_DATE_RANGE_PICKER_HOST_DIRECTIVE_OUTPUTS` tuples — see [Wrapping form primitives](../../../docs/wrapping-form-primitives.md).
|
|
326
326
|
|
|
327
327
|
## Keyboard
|
|
328
328
|
|
package/dropdown-menu/README.md
CHANGED
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
`,
|
|
70
70
|
})
|
|
71
71
|
export class DemoOptions {
|
|
72
|
-
readonly alignment = signal<string>('left');
|
|
72
|
+
readonly alignment = signal<string | null>('left');
|
|
73
73
|
cut() {
|
|
74
74
|
/* ... */
|
|
75
75
|
}
|
|
@@ -136,8 +136,8 @@ Angular resolves `ng-template` DI at the template's **declaration** site, not wh
|
|
|
136
136
|
| Property | Type | Description |
|
|
137
137
|
| --------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
138
138
|
| `open` | `model<boolean>` | Two-way bindable. Whether the menu is shown.<br>**Default:** `false` |
|
|
139
|
-
| `side` | `input<string>` | Anchor side of `[forMenuContent]` against the trigger.<br>**Default:** `'bottom'`
|
|
140
|
-
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`).<br>**Default:** `'start'`
|
|
139
|
+
| `side` | `input<string>` | Anchor side of `[forMenuContent]` against the trigger. The default is read from `provideForDropdownMenuDefaults` for the surrounding scope.<br>**Default:** `'bottom'` |
|
|
140
|
+
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`). The default is read from `provideForDropdownMenuDefaults` for the surrounding scope.<br>**Default:** `'start'` |
|
|
141
141
|
| `sideOffset` | `input<number>` | Gap (px) between the trigger and the content along the main axis.<br>**Default:** `4` |
|
|
142
142
|
| `alignOffset` | `input<number>` | Gap (px) along the cross axis (parallel to `side`).<br>**Default:** `0` |
|
|
143
143
|
| `fallbackAxisSideDirection` | `input<'none' \| 'start' \| 'end'>` | When both sides of the preferred axis overflow, lets `flip` drop the menu to a perpendicular side instead of clipping. `'none'` keeps only the opposite same-axis placement. The default is read from `provideForDropdownMenuDefaults` for the surrounding scope — set it once for the whole app rather than per call site.<br>**Default:** `'none'` |
|
|
@@ -2,16 +2,16 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, inject, input, booleanAttribute, model, Directive, computed, signal, ElementRef } from '@angular/core';
|
|
3
3
|
import { orphanContextError, assertRootContext, Collection, injectTextDirection, moveIndex, IdGenerator, adoptHostId, hostButtonType, registerHandle, reflectDisabled, resolveListNavigation, hostLabelledBy } from 'forty-cdk/core';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
15
|
const FOR_ACCORDION_CONTEXT = new InjectionToken('FOR_ACCORDION_CONTEXT');
|
|
16
16
|
const FOR_ACCORDION_ITEM_CONTEXT = new InjectionToken('FOR_ACCORDION_ITEM_CONTEXT');
|
|
17
17
|
function injectAccordionContext(piece) {
|
|
@@ -46,76 +46,76 @@ function injectAccordionItemContext(piece) {
|
|
|
46
46
|
return ctx;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
71
|
class ForAccordion {
|
|
72
72
|
#triggers = new Collection();
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
82
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
88
|
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
94
|
orientation = input('vertical', /* @ts-ignore */
|
|
95
95
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
104
|
_dirInput = input(null, { ...(ngDevMode ? { debugName: "_dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
|
|
105
105
|
dir = injectTextDirection(this._dirInput);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
112
|
loop = input(true, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
119
|
value = model([], /* @ts-ignore */
|
|
120
120
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
121
121
|
isExpanded(itemValue) {
|
|
@@ -181,32 +181,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
181
181
|
}]
|
|
182
182
|
}], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], _dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
189
|
class ForAccordionItem {
|
|
190
190
|
parent = injectAccordionContext('ForAccordionItem');
|
|
191
191
|
#idGen = inject(IdGenerator);
|
|
192
|
-
|
|
192
|
+
|
|
193
193
|
value = input.required(/* @ts-ignore */
|
|
194
194
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
202
|
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'disabled' });
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
210
|
disabled = computed(() => this.disabledInput() || this.parent.disabled(), /* @ts-ignore */
|
|
211
211
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
212
212
|
#triggerId = signal(this.#idGen.next('for-accordion-trigger'), /* @ts-ignore */
|
|
@@ -217,15 +217,15 @@ class ForAccordionItem {
|
|
|
217
217
|
contentId = this.#contentId.asReadonly();
|
|
218
218
|
expanded = computed(() => this.parent.isExpanded(this.value()), /* @ts-ignore */
|
|
219
219
|
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
225
|
adoptTriggerId(el) {
|
|
226
226
|
adoptHostId(el, this.#triggerId);
|
|
227
227
|
}
|
|
228
|
-
|
|
228
|
+
|
|
229
229
|
adoptContentId(el) {
|
|
230
230
|
adoptHostId(el, this.#contentId);
|
|
231
231
|
}
|
|
@@ -252,38 +252,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
252
252
|
}]
|
|
253
253
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
268
|
class ForAccordionTrigger {
|
|
269
269
|
buttonType = hostButtonType();
|
|
270
270
|
#host = inject(ElementRef);
|
|
271
271
|
parent = injectAccordionContext('ForAccordionTrigger');
|
|
272
272
|
item = injectAccordionItemContext('ForAccordionTrigger');
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
287
|
ariaDisabled = computed(() => {
|
|
288
288
|
if (this.item.disabled()) {
|
|
289
289
|
return false;
|
|
@@ -334,20 +334,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
334
334
|
}]
|
|
335
335
|
}], ctorParameters: () => [] });
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
351
|
class ForAccordionContent {
|
|
352
352
|
parent = injectAccordionContext('ForAccordionContent');
|
|
353
353
|
item = injectAccordionItemContext('ForAccordionContent');
|
|
@@ -376,9 +376,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
376
376
|
}]
|
|
377
377
|
}], ctorParameters: () => [] });
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
382
|
|
|
383
383
|
export { FOR_ACCORDION_CONTEXT, FOR_ACCORDION_ITEM_CONTEXT, ForAccordion, ForAccordionContent, ForAccordionItem, ForAccordionTrigger };
|
|
384
384
|
//# sourceMappingURL=forty-cdk-accordion.mjs.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, numberAttribute, computed, Directive } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
34
|
class ForAspectRatio {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
41
|
ratio = input(1, { ...(ngDevMode ? { debugName: "ratio" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
46
|
resolvedRatio = computed(() => {
|
|
47
47
|
const value = this.ratio();
|
|
48
48
|
return String(Number.isFinite(value) && value > 0 ? value : 1);
|
|
@@ -62,9 +62,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
62
62
|
}]
|
|
63
63
|
}], propDecorators: { ratio: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratio", required: false }] }] } });
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
68
|
|
|
69
69
|
export { ForAspectRatio };
|
|
70
70
|
//# sourceMappingURL=forty-cdk-aspect-ratio.mjs.map
|