@bitforgehq/ui 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +482 -0
- package/README.md +17 -11
- package/ai/MANIFEST.index.json +288 -0
- package/ai/MANIFEST.json +8716 -3926
- package/ai/REFERENCE.index.json +413 -0
- package/ai/REFERENCE.json +4710 -2047
- package/ai/UI_GUIDE.md +185 -57
- package/ai/components/back-button.md +42 -2
- package/ai/components/badge.md +17 -7
- package/ai/components/bar-chart.md +188 -0
- package/ai/components/breadcrumb-item.md +121 -0
- package/ai/components/breadcrumb.md +277 -0
- package/ai/components/button.md +82 -15
- package/ai/components/calendar.md +300 -0
- package/ai/components/card.md +63 -2
- package/ai/components/chart-card.md +283 -0
- package/ai/components/combobox.md +411 -0
- package/ai/components/date-input.md +396 -0
- package/ai/components/datetime-input.md +215 -0
- package/ai/components/description-item.md +111 -0
- package/ai/components/description-list.md +160 -0
- package/ai/components/donut-chart.md +169 -0
- package/ai/components/header.md +67 -2
- package/ai/components/icon-button.md +74 -16
- package/ai/components/icon.md +63 -7
- package/ai/components/line-chart.md +234 -0
- package/ai/components/list.md +70 -6
- package/ai/components/menu.md +5 -0
- package/ai/components/multi-combobox.md +257 -0
- package/ai/components/nav-group.md +178 -0
- package/ai/components/nav-item.md +210 -0
- package/ai/components/page-header.md +237 -0
- package/ai/components/pagination.md +173 -0
- package/ai/components/popover.md +250 -0
- package/ai/components/side-panel.md +391 -0
- package/ai/components/sidebar.md +363 -0
- package/ai/components/skeleton.md +215 -0
- package/ai/components/sparkline.md +188 -0
- package/ai/components/stat.md +233 -0
- package/ai/components/tab-group.md +226 -0
- package/ai/components/tab-panel.md +163 -0
- package/ai/components/table.md +568 -0
- package/ai/components/tabs.md +42 -2
- package/ai/components/theme-menu-button.md +182 -0
- package/ai/components/theme-switch.md +170 -0
- package/ai/components/time-input.md +240 -0
- package/ai/components/toolbar.md +289 -0
- package/ai/components/tooltip.md +230 -0
- package/ai/components/top-nav.md +159 -0
- package/ai/reference/bf-badge-appearance.md +36 -0
- package/ai/reference/bf-badge-variant.md +1 -1
- package/ai/reference/bf-bar-chart-orientation.md +27 -0
- package/ai/reference/bf-button-appearance.md +36 -0
- package/ai/reference/bf-button-variant.md +1 -1
- package/ai/reference/bf-calendar-disabled-date.md +23 -0
- package/ai/reference/bf-calendar-harness.md +51 -0
- package/ai/reference/bf-calendar-weekday.md +31 -0
- package/ai/reference/bf-chart-card-heading-level.md +26 -0
- package/ai/reference/bf-chart-curve.md +28 -0
- package/ai/reference/bf-chart-harness.md +51 -0
- package/ai/reference/bf-chart-legend-position.md +30 -0
- package/ai/reference/bf-chart-series.md +23 -0
- package/ai/reference/bf-chart-value-format.md +23 -0
- package/ai/reference/bf-color-scheme-service.md +30 -0
- package/ai/reference/bf-color-scheme.md +31 -0
- package/ai/reference/bf-combobox-filter.md +27 -0
- package/ai/reference/bf-combobox-harness.md +89 -0
- package/ai/reference/bf-combobox-option.md +33 -0
- package/ai/reference/bf-compare-with.md +2 -0
- package/ai/reference/bf-date-input-harness.md +67 -0
- package/ai/reference/bf-date-input-picker.md +27 -0
- package/ai/reference/bf-date-time-input-harness.md +76 -0
- package/ai/reference/bf-date-time-input-picker.md +27 -0
- package/ai/reference/bf-description-list-layout.md +26 -0
- package/ai/reference/bf-donut-slice.md +22 -0
- package/ai/reference/bf-labels.md +67 -20
- package/ai/reference/bf-menu-button-variant.md +1 -0
- package/ai/reference/bf-menu-placement.md +1 -0
- package/ai/reference/bf-overlay-options.md +28 -27
- package/ai/reference/bf-overlay-placement.md +34 -0
- package/ai/reference/bf-overlay-position.md +1 -1
- package/ai/reference/bf-overlay-service.md +5 -3
- package/ai/reference/bf-page-header-heading-level.md +26 -0
- package/ai/reference/bf-pagination-harness.md +61 -0
- package/ai/reference/bf-platform-service.md +17 -15
- package/ai/reference/bf-popover-harness.md +42 -0
- package/ai/reference/bf-popover-placement.md +28 -0
- package/ai/reference/bf-popover-trigger-directive.md +56 -0
- package/ai/reference/bf-side-panel-config.md +35 -0
- package/ai/reference/bf-side-panel-harness.md +34 -0
- package/ai/reference/bf-side-panel-ref.md +44 -0
- package/ai/reference/bf-side-panel-service.md +43 -0
- package/ai/reference/bf-side-panel-template-context.md +32 -0
- package/ai/reference/bf-side-panel-width.md +28 -0
- package/ai/reference/bf-size.md +12 -0
- package/ai/reference/bf-skeleton-shape.md +28 -0
- package/ai/reference/bf-stat-trend-intent.md +27 -0
- package/ai/reference/bf-stat-trend.md +27 -0
- package/ai/reference/bf-stat-variant.md +26 -0
- package/ai/reference/bf-tab-group-harness.md +44 -0
- package/ai/reference/bf-table-align.md +26 -0
- package/ai/reference/bf-table-cell-context.md +24 -0
- package/ai/reference/bf-table-cell-directive.md +22 -0
- package/ai/reference/bf-table-column.md +28 -0
- package/ai/reference/bf-table-harness.md +77 -0
- package/ai/reference/bf-table-row-key.md +21 -0
- package/ai/reference/bf-table-sort-direction.md +26 -0
- package/ai/reference/bf-table-sort.md +27 -0
- package/ai/reference/bf-theme.md +5 -4
- package/ai/reference/bf-time-input-harness.md +67 -0
- package/ai/reference/bf-time-input-hour-cycle.md +27 -0
- package/ai/reference/bf-time-input-picker.md +27 -0
- package/ai/reference/bf-tooltip-directive.md +43 -0
- package/ai/reference/bf-tooltip-harness.md +43 -0
- package/ai/reference/bf-tooltip-placement.md +28 -0
- package/ai/reference/bf_color_scheme_storage.md +20 -0
- package/ai/reference/bf_side_panel_data.md +17 -0
- package/ai/reference/bf_theme_storage.md +3 -1
- package/ai/reference/provide-bf-color-scheme.md +20 -0
- package/ai/reference/provide-bf-labels.md +12 -4
- package/ai/reference/slide-in-from-end.md +24 -0
- package/ai/reference/slide-out-to-end.md +24 -0
- package/fesm2022/bitforgehq-ui-charts.mjs +3045 -0
- package/fesm2022/bitforgehq-ui-charts.mjs.map +1 -0
- package/fesm2022/bitforgehq-ui-icons.mjs +107 -3
- package/fesm2022/bitforgehq-ui-icons.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-mobile.mjs +14 -59
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-overlay.mjs +6436 -33
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +618 -1
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +5092 -153
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +25177 -14398
- package/llms.txt +95 -1
- package/package.json +7 -3
- package/theme.css +101 -0
- package/types/bitforgehq-ui-charts.d.ts +967 -0
- package/types/bitforgehq-ui-icons.d.ts +13 -1
- package/types/bitforgehq-ui-mobile.d.ts +25 -18
- package/types/bitforgehq-ui-overlay.d.ts +1844 -7
- package/types/bitforgehq-ui-testing.d.ts +748 -1
- package/types/bitforgehq-ui.d.ts +2136 -44
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { ComponentRef, DestroyRef, EnvironmentProviders, InjectionToken, Injector, Signal, StaticProvider, TemplateRef, Type } from "@angular/core";
|
|
3
3
|
import { LiveAnnouncer } from "@angular/cdk/a11y";
|
|
4
|
-
import { BfSize } from "@bitforgehq/ui";
|
|
4
|
+
import { BfCalendarDisabledDate, BfColorScheme, BfCompareWith, BfSize } from "@bitforgehq/ui";
|
|
5
5
|
import * as i1 from "@angular/cdk/menu";
|
|
6
|
+
import { FormValueControl, ValidationError } from "@angular/forms/signals";
|
|
6
7
|
/**
|
|
7
8
|
* The `data` passed to `BfOverlayService.open()`, injectable in the overlay's content.
|
|
8
9
|
*
|
|
@@ -173,6 +174,14 @@ export declare class BfOverlayStack {
|
|
|
173
174
|
* @since 0.2.0
|
|
174
175
|
*/
|
|
175
176
|
type BfOverlayPosition = 'bottom' | 'center' | 'top' | 'fullscreen';
|
|
177
|
+
/**
|
|
178
|
+
* Where an overlay panel sits: a `BfOverlayPosition`, or `end`, full height against the inline
|
|
179
|
+
* end edge of the viewport (the right in a left-to-right page, the left under `dir="rtl"`).
|
|
180
|
+
*
|
|
181
|
+
* @summary Where an overlay panel sits: a viewport position or full height at the end
|
|
182
|
+
* @since 0.3.1
|
|
183
|
+
*/
|
|
184
|
+
type BfOverlayPlacement = BfOverlayPosition | 'end';
|
|
176
185
|
/**
|
|
177
186
|
* The ARIA role of an overlay panel: a `dialog`, an `alertdialog` or a passive `status`.
|
|
178
187
|
*
|
|
@@ -266,10 +275,10 @@ interface BfOverlayOptions {
|
|
|
266
275
|
*/
|
|
267
276
|
restoreFocus?: boolean;
|
|
268
277
|
/**
|
|
269
|
-
* Placement of the panel (default `center`).
|
|
278
|
+
* Placement of the panel (default `center`); `end` is full height at the inline end edge.
|
|
270
279
|
* @default 'center'
|
|
271
280
|
*/
|
|
272
|
-
position?:
|
|
281
|
+
position?: BfOverlayPlacement;
|
|
273
282
|
/**
|
|
274
283
|
* Closes the overlay when the URL path changes (default true; false for passive overlays): a
|
|
275
284
|
* router navigation, a link, the browser's back and forward buttons. Query- or fragment-only
|
|
@@ -302,6 +311,15 @@ interface BfOverlayOptions {
|
|
|
302
311
|
* @default false
|
|
303
312
|
*/
|
|
304
313
|
passive?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* A modal overlay (default true) has a backdrop, traps focus, is `aria-modal`, blocks document
|
|
316
|
+
* scroll and makes the page behind it `inert`. A non-modal one (a side panel beside the page)
|
|
317
|
+
* has none of these and is not in `BfOverlayStack`: focus moves in, the page stays usable,
|
|
318
|
+
* `Escape` closes it only while focus is inside it, and on close focus returns to the opener
|
|
319
|
+
* only from inside it. Ignored for passive overlays.
|
|
320
|
+
* @default true
|
|
321
|
+
*/
|
|
322
|
+
modal?: boolean;
|
|
305
323
|
/**
|
|
306
324
|
* Enter animation of the panel (default `fadeIn`); return null for none.
|
|
307
325
|
* @default fadeIn
|
|
@@ -335,6 +353,13 @@ interface BfOverlayTemplateContext {
|
|
|
335
353
|
/** The `data` the overlay was opened with (`let-data="data"`). */
|
|
336
354
|
data: unknown;
|
|
337
355
|
}
|
|
356
|
+
/** The elements Tab stops at (without a negative tabindex). */
|
|
357
|
+
declare const TABBABLE: string;
|
|
358
|
+
/**
|
|
359
|
+
* Where an overlay's initial focus goes inside `panel`: the `[autofocus]`/`[cdkFocusInitial]` mark,
|
|
360
|
+
* else the first tabbable element that is not the container's own chrome. Shared with the popover.
|
|
361
|
+
*/
|
|
362
|
+
declare function firstTabbable(panel: HTMLElement): HTMLElement | null;
|
|
338
363
|
/**
|
|
339
364
|
* Opens overlays on the Angular CDK `Overlay`: a component or template in a panel with a
|
|
340
365
|
* backdrop, a focus trap, `role`/`aria-modal`/`aria-labelledby`, `Escape` and backdrop click
|
|
@@ -348,9 +373,11 @@ interface BfOverlayTemplateContext {
|
|
|
348
373
|
* close on it (`dismissOnEscape: false` without `onEscape`, or an `onEscape` that keeps it open)
|
|
349
374
|
* swallows Android web back for as long as it is open, as a non-dismissible sheet swallows the
|
|
350
375
|
* hardware back button. A navigation to another URL path closes every non-passive
|
|
351
|
-
* overlay (`closeOnNavigation`, read from `Location`, so no router is needed).
|
|
352
|
-
*
|
|
353
|
-
*
|
|
376
|
+
* overlay (`closeOnNavigation`, read from `Location`, so no router is needed). `modal: false`
|
|
377
|
+
* (a side panel beside the page) drops the backdrop, the trap, `aria-modal`, the scroll lock and
|
|
378
|
+
* the `inert` page. The content injects `BF_OVERLAY_DATA` and `BfOverlayRef` (plus any
|
|
379
|
+
* `providers`). `BfDialogService`, `BfSidePanelService` and the `/mobile` sheet, modal, toast,
|
|
380
|
+
* action sheet and alert services build on it.
|
|
354
381
|
*
|
|
355
382
|
* @example
|
|
356
383
|
* const ref = inject(BfOverlayService).open(ConfirmComponent, {
|
|
@@ -534,6 +561,26 @@ export declare function fadeUp(el: HTMLElement, distance?: string): Animation;
|
|
|
534
561
|
* @since 0.2.0
|
|
535
562
|
*/
|
|
536
563
|
export declare function fadeDown(el: HTMLElement, distance?: string): Animation;
|
|
564
|
+
/**
|
|
565
|
+
* Slides `el` in from beyond the inline end edge of the viewport (the right, the left under
|
|
566
|
+
* `dir="rtl"`) by its own width: the enter animation of a side panel.
|
|
567
|
+
*
|
|
568
|
+
* @param el The element to animate, usually the overlay panel.
|
|
569
|
+
* @returns The running animation.
|
|
570
|
+
* @summary Slides an element in from the inline end, the enter animation of a side panel
|
|
571
|
+
* @since 0.3.1
|
|
572
|
+
*/
|
|
573
|
+
export declare function slideInFromEnd(el: HTMLElement): Animation;
|
|
574
|
+
/**
|
|
575
|
+
* Slides `el` out past the inline end edge of the viewport by its own width (the reverse of
|
|
576
|
+
* `slideInFromEnd`): the exit animation of a side panel.
|
|
577
|
+
*
|
|
578
|
+
* @param el The element to animate, usually the overlay panel.
|
|
579
|
+
* @returns The running animation.
|
|
580
|
+
* @summary Slides an element out past the inline end, the exit animation of a side panel
|
|
581
|
+
* @since 0.3.1
|
|
582
|
+
*/
|
|
583
|
+
export declare function slideOutToEnd(el: HTMLElement): Animation;
|
|
537
584
|
/**
|
|
538
585
|
* Names an overlay panel by the first heading inside it that is not `aria-hidden` or `hidden`:
|
|
539
586
|
* gives the heading an id when it has none (`bf-overlay-title-<n>`), points the panel's
|
|
@@ -1511,4 +1558,1794 @@ export declare class BfMenuButtonComponent {
|
|
|
1511
1558
|
"closed": "closed";
|
|
1512
1559
|
}, never, ["[bfSlot=icon-start]", "*"], true, never>;
|
|
1513
1560
|
}
|
|
1514
|
-
|
|
1561
|
+
/** One choice of the theme menu: the scheme and its label. */
|
|
1562
|
+
interface ThemeChoice {
|
|
1563
|
+
readonly value: BfColorScheme;
|
|
1564
|
+
readonly label: string;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* The colour scheme switch as a menu button, for a crowded top bar: a `bf-menu-button` whose menu
|
|
1568
|
+
* holds System, Light and Dark as radio items, the current one marked with a dot. It holds a
|
|
1569
|
+
* `BfColorScheme` and injects no service, so the app binds its own state, usually
|
|
1570
|
+
* `BfColorSchemeService.scheme` (`BfPlatformService.theme` in a Capacitor app). The button shows
|
|
1571
|
+
* `label` ("Theme") next to an optional icon, or only the icon with `iconOnly`.
|
|
1572
|
+
*
|
|
1573
|
+
* @example
|
|
1574
|
+
* <bf-theme-menu-button iconOnly variant="text" [(value)]="colorScheme.scheme">
|
|
1575
|
+
* <bf-icon bfSlot="icon" [icon]="colorScheme.dark() ? Moon : Sun" />
|
|
1576
|
+
* </bf-theme-menu-button>
|
|
1577
|
+
* @summary Menu button with System, Light and Dark radio items bound to the colour scheme
|
|
1578
|
+
* @category Overlays
|
|
1579
|
+
* @since 0.3.1
|
|
1580
|
+
* @slot icon The icon before the label, or the whole button with `iconOnly` (a sun or a moon).
|
|
1581
|
+
*/
|
|
1582
|
+
export declare class BfThemeMenuButtonComponent {
|
|
1583
|
+
private readonly labels;
|
|
1584
|
+
/** The colour scheme choice; bind it two-way, usually to `BfColorSchemeService.scheme`. */
|
|
1585
|
+
readonly value: import("@angular/core").ModelSignal<BfColorScheme>;
|
|
1586
|
+
/** The button's text, and its accessible name with `iconOnly`; empty falls back to the `theme`
|
|
1587
|
+
* label. */
|
|
1588
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1589
|
+
/** Square button holding only the projected icon, like `bf-icon-button`. */
|
|
1590
|
+
readonly iconOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1591
|
+
/** Visual style: outline (default), text, tonal. */
|
|
1592
|
+
readonly variant: import("@angular/core").InputSignal<BfMenuButtonVariant>;
|
|
1593
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,
|
|
1594
|
+
* `md` by default). */
|
|
1595
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
1596
|
+
/** Where the menu opens against the button; it flips when it would overflow. */
|
|
1597
|
+
readonly placement: import("@angular/core").InputSignal<BfMenuPlacement>;
|
|
1598
|
+
/** Emitted with the new choice right after the user picks another item. */
|
|
1599
|
+
readonly changed: import("@angular/core").OutputEmitterRef<BfColorScheme>;
|
|
1600
|
+
/** The three items, labelled by `themeSystem`, `themeLight` and `themeDark`. */
|
|
1601
|
+
protected readonly choices: readonly ThemeChoice[];
|
|
1602
|
+
/** The button's name: `label`, else the `theme` label. */
|
|
1603
|
+
protected readonly resolvedLabel: import("@angular/core").Signal<string>;
|
|
1604
|
+
/**
|
|
1605
|
+
* Takes the item the user picked; the current choice again changes nothing.
|
|
1606
|
+
* @internal
|
|
1607
|
+
*/
|
|
1608
|
+
select(next: BfColorScheme): void;
|
|
1609
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfThemeMenuButtonComponent, never>;
|
|
1610
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfThemeMenuButtonComponent, "bf-theme-menu-button", never, {
|
|
1611
|
+
"value": {
|
|
1612
|
+
"alias": "value";
|
|
1613
|
+
"required": false;
|
|
1614
|
+
"isSignal": true;
|
|
1615
|
+
};
|
|
1616
|
+
"label": {
|
|
1617
|
+
"alias": "label";
|
|
1618
|
+
"required": false;
|
|
1619
|
+
"isSignal": true;
|
|
1620
|
+
};
|
|
1621
|
+
"iconOnly": {
|
|
1622
|
+
"alias": "iconOnly";
|
|
1623
|
+
"required": false;
|
|
1624
|
+
"isSignal": true;
|
|
1625
|
+
};
|
|
1626
|
+
"variant": {
|
|
1627
|
+
"alias": "variant";
|
|
1628
|
+
"required": false;
|
|
1629
|
+
"isSignal": true;
|
|
1630
|
+
};
|
|
1631
|
+
"size": {
|
|
1632
|
+
"alias": "size";
|
|
1633
|
+
"required": false;
|
|
1634
|
+
"isSignal": true;
|
|
1635
|
+
};
|
|
1636
|
+
"placement": {
|
|
1637
|
+
"alias": "placement";
|
|
1638
|
+
"required": false;
|
|
1639
|
+
"isSignal": true;
|
|
1640
|
+
};
|
|
1641
|
+
}, {
|
|
1642
|
+
"value": "valueChange";
|
|
1643
|
+
"changed": "changed";
|
|
1644
|
+
}, never, ["[bfSlot=icon]"], true, never>;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Layout of a side panel opened with `BfSidePanelService`: a title row with a close button, a
|
|
1648
|
+
* scrolling body and a footer of actions kept at the bottom. The panel is labelled by the title,
|
|
1649
|
+
* and the body becomes focusable only while its content overflows, so keyboard users can scroll
|
|
1650
|
+
* it (a region named by the title).
|
|
1651
|
+
*
|
|
1652
|
+
* @example
|
|
1653
|
+
* const ref = inject(BfSidePanelService).open(InvoiceDetailsComponent, { data: invoice });
|
|
1654
|
+
* // InvoiceDetailsComponent template:
|
|
1655
|
+
* // <bf-side-panel title="INV-204"> …details…
|
|
1656
|
+
* // <div bfSlot="footer">…buttons…</div> </bf-side-panel>
|
|
1657
|
+
* @summary Desktop panel sliding in from the end edge, with a title, body and footer actions
|
|
1658
|
+
* @category Overlays
|
|
1659
|
+
* @since 0.3.1
|
|
1660
|
+
* @slot header More header content after the title, such as a status badge.
|
|
1661
|
+
* @slot default The panel body.
|
|
1662
|
+
* @slot footer The actions, aligned at the end and kept at the bottom.
|
|
1663
|
+
*/
|
|
1664
|
+
export declare class BfSidePanelComponent {
|
|
1665
|
+
private readonly labels;
|
|
1666
|
+
private readonly context;
|
|
1667
|
+
private readonly ref;
|
|
1668
|
+
/** Heading of the panel, rendered as the `h2` the side panel is labelled by. */
|
|
1669
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
1670
|
+
/** Accessible name of the close button; empty uses `provideBfLabels()`'s `close` ("Close"). */
|
|
1671
|
+
readonly closeLabel: import("@angular/core").InputSignal<string>;
|
|
1672
|
+
/** True while the body's content is taller than the body (it scrolls). */
|
|
1673
|
+
protected readonly overflowing: import("@angular/core").WritableSignal<boolean>;
|
|
1674
|
+
protected readonly titleId: string;
|
|
1675
|
+
protected readonly closeIcon: import("lucide").IconNode;
|
|
1676
|
+
private readonly width;
|
|
1677
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
1678
|
+
protected readonly closeName: import("@angular/core").Signal<string>;
|
|
1679
|
+
private readonly body;
|
|
1680
|
+
private readonly content;
|
|
1681
|
+
constructor();
|
|
1682
|
+
/** Closes the panel with no result (does nothing outside `BfSidePanelService`). */
|
|
1683
|
+
protected close(): void;
|
|
1684
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfSidePanelComponent, never>;
|
|
1685
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfSidePanelComponent, "bf-side-panel", never, {
|
|
1686
|
+
"title": {
|
|
1687
|
+
"alias": "title";
|
|
1688
|
+
"required": false;
|
|
1689
|
+
"isSignal": true;
|
|
1690
|
+
};
|
|
1691
|
+
"closeLabel": {
|
|
1692
|
+
"alias": "closeLabel";
|
|
1693
|
+
"required": false;
|
|
1694
|
+
"isSignal": true;
|
|
1695
|
+
};
|
|
1696
|
+
}, {}, never, ["[bfSlot=header]", "*", "[bfSlot=footer]"], true, never>;
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* The side panel's width scale: `sm` 360 px, `md` 480 px, `lg` 640 px (22.5, 30 and 40 rem), each
|
|
1700
|
+
* never wider than the viewport.
|
|
1701
|
+
*
|
|
1702
|
+
* @summary The side panel widths, from a 360 px detail list to a 640 px form
|
|
1703
|
+
* @since 0.3.1
|
|
1704
|
+
*/
|
|
1705
|
+
type BfSidePanelWidth = 'sm' | 'md' | 'lg';
|
|
1706
|
+
/**
|
|
1707
|
+
* The `data` passed to `BfSidePanelService.open()`, injectable in the panel's content.
|
|
1708
|
+
*
|
|
1709
|
+
* @summary Injection token carrying the data a side panel was opened with, for its content
|
|
1710
|
+
* @since 0.3.1
|
|
1711
|
+
*/
|
|
1712
|
+
export declare const BF_SIDE_PANEL_DATA: InjectionToken<unknown>;
|
|
1713
|
+
/** @internal What `BfSidePanelService` tells the `bf-side-panel` inside its content. */
|
|
1714
|
+
interface BfSidePanelContext {
|
|
1715
|
+
/** Id the `bf-side-panel` title renders with; the panel's `aria-labelledby` points to it. */
|
|
1716
|
+
readonly titleId: string;
|
|
1717
|
+
readonly width: BfSidePanelWidth;
|
|
1718
|
+
}
|
|
1719
|
+
/** @internal Provided by `BfSidePanelService` to the panel's content. */
|
|
1720
|
+
declare const BF_SIDE_PANEL_CONTEXT: InjectionToken<BfSidePanelContext>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Handle to an open side panel, returned by `BfSidePanelService.open()` and injectable in the
|
|
1723
|
+
* panel's content (`inject(BfSidePanelRef)`). `close(result)` slides the panel out, detaches it
|
|
1724
|
+
* and resolves `afterClosed` with `result`; later calls are ignored. Closing with `Escape`, the
|
|
1725
|
+
* backdrop, the `bf-side-panel` close button or a navigation resolves `undefined`.
|
|
1726
|
+
*
|
|
1727
|
+
* @example
|
|
1728
|
+
* const ref = inject(BfSidePanelService).open<InvoiceDetailsComponent, Invoice, Invoice>(
|
|
1729
|
+
* InvoiceDetailsComponent,
|
|
1730
|
+
* { data: invoice },
|
|
1731
|
+
* );
|
|
1732
|
+
* const saved = await ref.afterClosed;
|
|
1733
|
+
*
|
|
1734
|
+
* @summary Handle on an open side panel that closes it and resolves with its result
|
|
1735
|
+
* @since 0.3.1
|
|
1736
|
+
*/
|
|
1737
|
+
export declare class BfSidePanelRef<R = unknown, C = unknown> {
|
|
1738
|
+
private readonly overlayRef;
|
|
1739
|
+
private readonly instance;
|
|
1740
|
+
/** Unique id of the side panel (its overlay's `bf-overlay-N`). */
|
|
1741
|
+
readonly id: string;
|
|
1742
|
+
/** Resolves with the result given to `close()`, or `undefined`, once the panel is detached. */
|
|
1743
|
+
readonly afterClosed: Promise<R | undefined>;
|
|
1744
|
+
/** True once the panel has been detached. */
|
|
1745
|
+
readonly closed: Signal<boolean>;
|
|
1746
|
+
/** @internal Created by `BfSidePanelService`; apps never construct it. */
|
|
1747
|
+
constructor(overlayRef: BfOverlayRef<unknown>, instance?: () => C | null);
|
|
1748
|
+
/** The content component; `null` for a panel opened from a template. */
|
|
1749
|
+
get componentInstance(): C | null;
|
|
1750
|
+
/**
|
|
1751
|
+
* Closes the panel with an optional result; ignored once closing.
|
|
1752
|
+
* @param result The value `afterClosed` resolves with.
|
|
1753
|
+
*/
|
|
1754
|
+
close(result?: R): void;
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
* Context of a template opened with `BfSidePanelService.open()`: `let-ref` and `let-data="data"`.
|
|
1758
|
+
*
|
|
1759
|
+
* @summary The context a template opened as a side panel receives: its ref and its data
|
|
1760
|
+
* @since 0.3.1
|
|
1761
|
+
*/
|
|
1762
|
+
interface BfSidePanelTemplateContext<D = unknown, R = unknown> {
|
|
1763
|
+
/** The panel's ref (`let-ref`), to close it with a result. */
|
|
1764
|
+
$implicit: BfSidePanelRef<R>;
|
|
1765
|
+
/** The `data` the panel was opened with (`let-data="data"`). */
|
|
1766
|
+
data: D;
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Options of `BfSidePanelService.open()`.
|
|
1770
|
+
*
|
|
1771
|
+
* @summary Options of a side panel: its data, width, modality, name and injector
|
|
1772
|
+
* @since 0.3.1
|
|
1773
|
+
*/
|
|
1774
|
+
interface BfSidePanelConfig<D = unknown> {
|
|
1775
|
+
/** Injected into the content as `BF_SIDE_PANEL_DATA` (and a template's `data`). */
|
|
1776
|
+
data?: D;
|
|
1777
|
+
/**
|
|
1778
|
+
* Width of the `bf-side-panel` in the content (default `md`, 480 px), capped at the viewport.
|
|
1779
|
+
* @default 'md'
|
|
1780
|
+
*/
|
|
1781
|
+
width?: BfSidePanelWidth;
|
|
1782
|
+
/**
|
|
1783
|
+
* A modal panel (default true) has a scrim, traps focus and makes the page behind it inert;
|
|
1784
|
+
* `false` keeps the page usable beside it.
|
|
1785
|
+
* @default true
|
|
1786
|
+
*/
|
|
1787
|
+
modal?: boolean;
|
|
1788
|
+
/** Accessible name, when the content renders no `bf-side-panel` title and no heading. */
|
|
1789
|
+
ariaLabel?: string;
|
|
1790
|
+
/**
|
|
1791
|
+
* Parent of the content's injector and source of its labels (default the root injector). Pass
|
|
1792
|
+
* the opener's `inject(Injector)` so a feature-level `provideBfLabels()` reaches the panel.
|
|
1793
|
+
*/
|
|
1794
|
+
injector?: Injector;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Opens side panels on the overlay core: a component or template in a full-height pane that
|
|
1798
|
+
* slides in from the inline end edge (the right, the left under `dir="rtl"`; a cross-fade under
|
|
1799
|
+
* reduced motion), labelled by its `bf-side-panel` title, with focus moved in, `Escape` closing
|
|
1800
|
+
* it and focus returned to the opener. A modal panel (the default) adds a scrim that closes it on
|
|
1801
|
+
* a click, traps focus, locks document scroll and makes the page behind it `inert`, as a dialog
|
|
1802
|
+
* does; `modal: false` keeps the page usable and scrollable beside it, and `Escape` closes it
|
|
1803
|
+
* only while focus is inside it. A navigation to another URL path closes it. Desktop only.
|
|
1804
|
+
*
|
|
1805
|
+
* @example
|
|
1806
|
+
* const ref = inject(BfSidePanelService).open(InvoiceDetailsComponent, {
|
|
1807
|
+
* data: invoice,
|
|
1808
|
+
* width: 'lg',
|
|
1809
|
+
* });
|
|
1810
|
+
* const saved = await ref.afterClosed;
|
|
1811
|
+
* @since 0.3.1
|
|
1812
|
+
* @summary Opens a full-height panel from the end edge, modal or beside the page
|
|
1813
|
+
*/
|
|
1814
|
+
export declare class BfSidePanelService {
|
|
1815
|
+
private readonly overlays;
|
|
1816
|
+
private readonly injector;
|
|
1817
|
+
/**
|
|
1818
|
+
* Opens `component` as a side panel; it injects `BfSidePanelRef` and `BF_SIDE_PANEL_DATA`.
|
|
1819
|
+
* @param component The component to render; it injects `BfSidePanelRef` and `BF_SIDE_PANEL_DATA`.
|
|
1820
|
+
* @param config The panel's data, width, modality, name and injector.
|
|
1821
|
+
*/
|
|
1822
|
+
open<C, D = unknown, R = unknown>(component: Type<C>, config?: BfSidePanelConfig<D>): BfSidePanelRef<R, C>;
|
|
1823
|
+
/**
|
|
1824
|
+
* Opens `template` as a side panel; its context is `{ $implicit: ref, data }`.
|
|
1825
|
+
* @param template The template to render, with the context `{ $implicit: ref, data }`.
|
|
1826
|
+
* @param config The panel's data, width, modality, name and injector.
|
|
1827
|
+
*/
|
|
1828
|
+
open<D = unknown, R = unknown>(template: TemplateRef<BfSidePanelTemplateContext<D, R>>, config?: BfSidePanelConfig<D>): BfSidePanelRef<R>;
|
|
1829
|
+
/**
|
|
1830
|
+
* A panel without an `ariaLabel` whose content rendered no `bf-side-panel` title (the core then
|
|
1831
|
+
* drops the dangling `aria-labelledby`) is named by the first heading in its content, also one
|
|
1832
|
+
* that renders later, and by the `dialog` label until then.
|
|
1833
|
+
*/
|
|
1834
|
+
private nameUnlabelledPanel;
|
|
1835
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfSidePanelService, never>;
|
|
1836
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* The small dark pill of a tooltip (role `tooltip`). A `[bfTooltip]` directive renders it in the
|
|
1840
|
+
* CDK overlay beside its element while the pointer rests on it or it has keyboard focus, so you
|
|
1841
|
+
* rarely place it yourself; the directive is how you add a tooltip.
|
|
1842
|
+
*
|
|
1843
|
+
* @example
|
|
1844
|
+
* <bf-icon-button label="Copy link" bfTooltip="Copy link"><bf-icon [icon]="link" /></bf-icon-button>
|
|
1845
|
+
* @summary Short hint beside a control on hover or keyboard focus, for desktop
|
|
1846
|
+
* @category Overlays
|
|
1847
|
+
* @since 0.3.1
|
|
1848
|
+
*/
|
|
1849
|
+
export declare class BfTooltipComponent {
|
|
1850
|
+
/** The tooltip's text: a few words that repeat or explain the control's name. */
|
|
1851
|
+
readonly text: import("@angular/core").InputSignal<string>;
|
|
1852
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTooltipComponent, never>;
|
|
1853
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTooltipComponent, "bf-tooltip", never, {
|
|
1854
|
+
"text": {
|
|
1855
|
+
"alias": "text";
|
|
1856
|
+
"required": false;
|
|
1857
|
+
"isSignal": true;
|
|
1858
|
+
};
|
|
1859
|
+
}, {}, never, never, true, never>;
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* Which side of its element a tooltip sits on; `start` and `end` follow the text direction.
|
|
1863
|
+
*
|
|
1864
|
+
* @summary Which side of its element a tooltip sits on: top, bottom, start or end
|
|
1865
|
+
* @since 0.3.1
|
|
1866
|
+
*/
|
|
1867
|
+
type BfTooltipPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
1868
|
+
/**
|
|
1869
|
+
* Shows a short `bf-tooltip` beside an element: after a 500 ms rest of a fine pointer, at once on
|
|
1870
|
+
* keyboard focus. It hides when the pointer leaves (it stays while the pointer moves onto the
|
|
1871
|
+
* tooltip itself), on blur and on `Escape`, and while it shows, the focusable element (the host,
|
|
1872
|
+
* or the first control inside it, so it works on a `bf-icon-button`) is described by it
|
|
1873
|
+
* (`aria-describedby`). Nothing shows under a coarse pointer (touch), so never put information
|
|
1874
|
+
* only in a tooltip. The tooltip flips to the opposite side when it would overflow the viewport.
|
|
1875
|
+
*
|
|
1876
|
+
* @example
|
|
1877
|
+
* <bf-icon-button label="Archive" bfTooltip="Archive" bfTooltipPlacement="bottom">
|
|
1878
|
+
* <bf-icon [icon]="archive" />
|
|
1879
|
+
* </bf-icon-button>
|
|
1880
|
+
* @summary Adds a hover and keyboard-focus tooltip to any control on desktop
|
|
1881
|
+
* @since 0.3.1
|
|
1882
|
+
*/
|
|
1883
|
+
export declare class BfTooltipDirective {
|
|
1884
|
+
private readonly overlay;
|
|
1885
|
+
private readonly document;
|
|
1886
|
+
private readonly injector;
|
|
1887
|
+
private readonly dir;
|
|
1888
|
+
private readonly host;
|
|
1889
|
+
/** The tooltip's text; empty shows no tooltip. */
|
|
1890
|
+
readonly bfTooltip: import("@angular/core").InputSignal<string>;
|
|
1891
|
+
/** The side it shows on (flipping when it would overflow), read each time it shows. */
|
|
1892
|
+
readonly bfTooltipPlacement: import("@angular/core").InputSignal<BfTooltipPlacement>;
|
|
1893
|
+
private readonly id;
|
|
1894
|
+
private anchored;
|
|
1895
|
+
private described;
|
|
1896
|
+
private keys;
|
|
1897
|
+
private showTimer;
|
|
1898
|
+
private hideTimer;
|
|
1899
|
+
constructor();
|
|
1900
|
+
/** Whether the tooltip is showing. */
|
|
1901
|
+
isShown(): boolean;
|
|
1902
|
+
/** Shows the tooltip now (no delay). Does nothing under a coarse pointer or without text. */
|
|
1903
|
+
show(): void;
|
|
1904
|
+
/** Hides the tooltip now and cancels a pending show. */
|
|
1905
|
+
hide(): void;
|
|
1906
|
+
/** @internal */
|
|
1907
|
+
pointerEntered(): void;
|
|
1908
|
+
/** @internal */
|
|
1909
|
+
pointerLeft(): void;
|
|
1910
|
+
/** @internal */
|
|
1911
|
+
focused(event: FocusEvent): void;
|
|
1912
|
+
private clearTimers;
|
|
1913
|
+
/** No hover under a coarse pointer: a tooltip would only show after a tap, over the finger. */
|
|
1914
|
+
private coarsePointer;
|
|
1915
|
+
private focusVisible;
|
|
1916
|
+
/** The element the tooltip describes: the host when it takes focus, else its first control. */
|
|
1917
|
+
private describedElement;
|
|
1918
|
+
private describe;
|
|
1919
|
+
private undescribe;
|
|
1920
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTooltipDirective, never>;
|
|
1921
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BfTooltipDirective, "[bfTooltip]", never, {
|
|
1922
|
+
"bfTooltip": {
|
|
1923
|
+
"alias": "bfTooltip";
|
|
1924
|
+
"required": true;
|
|
1925
|
+
"isSignal": true;
|
|
1926
|
+
};
|
|
1927
|
+
"bfTooltipPlacement": {
|
|
1928
|
+
"alias": "bfTooltipPlacement";
|
|
1929
|
+
"required": false;
|
|
1930
|
+
"isSignal": true;
|
|
1931
|
+
};
|
|
1932
|
+
}, {}, never, never, true, never>;
|
|
1933
|
+
}
|
|
1934
|
+
/**
|
|
1935
|
+
* The popover panel's surface without its padding, shared with the picker panels of the date and
|
|
1936
|
+
* time inputs. It scrolls past the viewport minus 1 rem each side; the panel itself takes focus
|
|
1937
|
+
* only when it holds no control, so it draws no ring. Internal to the overlay entry.
|
|
1938
|
+
*/
|
|
1939
|
+
declare const POPOVER_SURFACE: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* Non-modal panel anchored to a trigger, for filters, details or a small form (role `dialog`).
|
|
1942
|
+
* Put it in an `ng-template` that a `[bfPopoverTriggerFor]` opens; it takes the id the trigger's
|
|
1943
|
+
* `aria-controls` points at and is named by `bfPopoverLabel`, else by its first heading, else by
|
|
1944
|
+
* the trigger.
|
|
1945
|
+
*
|
|
1946
|
+
* @example
|
|
1947
|
+
* <button type="button" [bfPopoverTriggerFor]="details">Details</button>
|
|
1948
|
+
* <ng-template #details>
|
|
1949
|
+
* <bf-popover><h2 class="text-label">Delivery</h2><p>Arrives Thursday.</p></bf-popover>
|
|
1950
|
+
* </ng-template>
|
|
1951
|
+
* @summary Anchored, non-modal panel for filters, details or a small form
|
|
1952
|
+
* @category Overlays
|
|
1953
|
+
* @since 0.3.1
|
|
1954
|
+
* @slot default The panel's content: a heading, text, fields and actions.
|
|
1955
|
+
*/
|
|
1956
|
+
export declare class BfPopoverComponent {
|
|
1957
|
+
/** The `bfPopoverTriggerFor` that opened this panel. */
|
|
1958
|
+
private readonly trigger;
|
|
1959
|
+
protected readonly id: string;
|
|
1960
|
+
protected readonly label: import("@angular/core").Signal<string>;
|
|
1961
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfPopoverComponent, never>;
|
|
1962
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfPopoverComponent, "bf-popover", never, {}, {}, never, ["*"], true, never>;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Where a popover opens against its trigger; `start`/`end` follow the text direction.
|
|
1966
|
+
*
|
|
1967
|
+
* @summary Where a popover opens against its trigger, above or below, at either end
|
|
1968
|
+
* @since 0.3.1
|
|
1969
|
+
*/
|
|
1970
|
+
type BfPopoverPlacement = 'below-start' | 'below-end' | 'above-start' | 'above-end';
|
|
1971
|
+
/**
|
|
1972
|
+
* Opens an `ng-template` (usually a `bf-popover`) as a non-modal panel anchored to the element:
|
|
1973
|
+
* a click (`Enter` or `Space` on a button) toggles it, focus moves to its first control, `Tab`
|
|
1974
|
+
* moves through it and on out (closing it, past the trigger), and `Escape`, a click outside or a
|
|
1975
|
+
* navigation to another URL path close it, returning focus to the trigger. The control it
|
|
1976
|
+
* decorates (the host, or the first control inside it, such as a `bf-button`'s button) carries
|
|
1977
|
+
* `aria-haspopup="dialog"`, `aria-expanded` and, while open, `aria-controls`. Export it as
|
|
1978
|
+
* `bfPopoverTrigger` to open and close it from code or from inside the panel.
|
|
1979
|
+
*
|
|
1980
|
+
* @example
|
|
1981
|
+
* <button type="button" [bfPopoverTriggerFor]="filters" #trigger="bfPopoverTrigger">Filters</button>
|
|
1982
|
+
* <ng-template #filters>
|
|
1983
|
+
* <bf-popover><h2>Filters</h2>…<button (click)="trigger.close()">Apply</button></bf-popover>
|
|
1984
|
+
* </ng-template>
|
|
1985
|
+
* @summary Opens an anchored, non-modal popover panel from any element or button
|
|
1986
|
+
* @since 0.3.1
|
|
1987
|
+
*/
|
|
1988
|
+
export declare class BfPopoverTriggerDirective {
|
|
1989
|
+
private readonly overlay;
|
|
1990
|
+
private readonly document;
|
|
1991
|
+
private readonly injector;
|
|
1992
|
+
private readonly viewContainer;
|
|
1993
|
+
private readonly location;
|
|
1994
|
+
private readonly dir;
|
|
1995
|
+
private readonly host;
|
|
1996
|
+
/** The `ng-template` holding the panel (a `bf-popover`) this element opens. */
|
|
1997
|
+
readonly bfPopoverTriggerFor: import("@angular/core").InputSignal<TemplateRef<unknown>>;
|
|
1998
|
+
/** Where the panel opens (flipping when it would overflow), read each time it opens. */
|
|
1999
|
+
readonly bfPopoverPlacement: import("@angular/core").InputSignal<BfPopoverPlacement>;
|
|
2000
|
+
/** Accessible name of the panel. Empty: its first heading names it, else the trigger. */
|
|
2001
|
+
readonly bfPopoverLabel: import("@angular/core").InputSignal<string>;
|
|
2002
|
+
/** Emits when the panel opens. */
|
|
2003
|
+
readonly bfPopoverOpened: import("@angular/core").OutputEmitterRef<void>;
|
|
2004
|
+
/** Emits when the panel closes (`Escape`, a click outside, `Tab` out, a navigation or code). */
|
|
2005
|
+
readonly bfPopoverClosed: import("@angular/core").OutputEmitterRef<void>;
|
|
2006
|
+
private readonly openState;
|
|
2007
|
+
/** Whether the panel is open. */
|
|
2008
|
+
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
2009
|
+
/** The id the `bf-popover` panel takes, which the trigger's `aria-controls` points at. */
|
|
2010
|
+
readonly panelId: string;
|
|
2011
|
+
private anchored;
|
|
2012
|
+
private subscriptions;
|
|
2013
|
+
private stopNavigation;
|
|
2014
|
+
private stopHeading;
|
|
2015
|
+
constructor();
|
|
2016
|
+
/** Opens the panel and moves focus into it; does nothing while it is open. */
|
|
2017
|
+
open(): void;
|
|
2018
|
+
/**
|
|
2019
|
+
* Closes the panel; does nothing while it is closed.
|
|
2020
|
+
* @param restoreFocus Moves focus back to the trigger (default true).
|
|
2021
|
+
*/
|
|
2022
|
+
close(restoreFocus?: boolean): void;
|
|
2023
|
+
/** Opens the panel when it is closed, closes it when it is open. */
|
|
2024
|
+
toggle(): void;
|
|
2025
|
+
/** The id of the trigger's control (assigned when it has none), which names a bare panel. */
|
|
2026
|
+
private labelId;
|
|
2027
|
+
/** The element that takes focus and carries the ARIA state: the host, or its first control. */
|
|
2028
|
+
private control;
|
|
2029
|
+
/**
|
|
2030
|
+
* `Tab` is not trapped: past the panel's last control it closes the panel and continues from the
|
|
2031
|
+
* trigger (the browser moves on to the control after it); `Shift+Tab` before the first control
|
|
2032
|
+
* closes it onto the trigger.
|
|
2033
|
+
*/
|
|
2034
|
+
private tabbed;
|
|
2035
|
+
/**
|
|
2036
|
+
* Names the panel before focus moves in, so it is announced with its name: `bfPopoverLabel`
|
|
2037
|
+
* (bound by `bf-popover` itself), else its first heading (watched while it has none yet), else
|
|
2038
|
+
* the trigger.
|
|
2039
|
+
*/
|
|
2040
|
+
private name;
|
|
2041
|
+
private teardown;
|
|
2042
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfPopoverTriggerDirective, never>;
|
|
2043
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BfPopoverTriggerDirective, "[bfPopoverTriggerFor]", ["bfPopoverTrigger"], {
|
|
2044
|
+
"bfPopoverTriggerFor": {
|
|
2045
|
+
"alias": "bfPopoverTriggerFor";
|
|
2046
|
+
"required": true;
|
|
2047
|
+
"isSignal": true;
|
|
2048
|
+
};
|
|
2049
|
+
"bfPopoverPlacement": {
|
|
2050
|
+
"alias": "bfPopoverPlacement";
|
|
2051
|
+
"required": false;
|
|
2052
|
+
"isSignal": true;
|
|
2053
|
+
};
|
|
2054
|
+
"bfPopoverLabel": {
|
|
2055
|
+
"alias": "bfPopoverLabel";
|
|
2056
|
+
"required": false;
|
|
2057
|
+
"isSignal": true;
|
|
2058
|
+
};
|
|
2059
|
+
}, {
|
|
2060
|
+
"bfPopoverOpened": "bfPopoverOpened";
|
|
2061
|
+
"bfPopoverClosed": "bfPopoverClosed";
|
|
2062
|
+
}, never, never, true, never>;
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* One choice of `bf-combobox` and `bf-multi-combobox`; `value` is any type (a string by default).
|
|
2066
|
+
*
|
|
2067
|
+
* @summary One combobox choice with its value, label, description, group and disabled flag
|
|
2068
|
+
* @since 0.3.1
|
|
2069
|
+
*/
|
|
2070
|
+
interface BfComboboxOption<T = string> {
|
|
2071
|
+
/** The value the combobox takes when this option is picked. */
|
|
2072
|
+
value: T;
|
|
2073
|
+
/** The option's text in the list, and the field's text once it is picked. */
|
|
2074
|
+
label: string;
|
|
2075
|
+
/** A second, muted line under the label (an email, a role). */
|
|
2076
|
+
description?: string;
|
|
2077
|
+
/** Whether this option cannot be picked; it stays in the list, skipped by the arrow keys. */
|
|
2078
|
+
disabled?: boolean;
|
|
2079
|
+
/** The heading this option is listed under; options with the same group are listed together. */
|
|
2080
|
+
group?: string;
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Whether an option matches the typed query (the `filter` of the comboboxes). Called only for a
|
|
2084
|
+
* query that is not empty.
|
|
2085
|
+
*
|
|
2086
|
+
* @summary Decides whether a combobox option matches the text typed into the field
|
|
2087
|
+
* @since 0.3.1
|
|
2088
|
+
*/
|
|
2089
|
+
type BfComboboxFilter<T = string> = (option: BfComboboxOption<T>, query: string) => boolean;
|
|
2090
|
+
/** Lower case without accents (`É` → `e`), so `"zoe"` finds `"Zoë"`. */
|
|
2091
|
+
declare function foldText(text: string): string;
|
|
2092
|
+
/** The default `filter`: the option's label contains the query, ignoring case and accents. */
|
|
2093
|
+
declare function labelContains(option: BfComboboxOption<unknown>, query: string): boolean;
|
|
2094
|
+
/** A visible option and the ids the listbox gives it. */
|
|
2095
|
+
interface ComboboxItem<T> {
|
|
2096
|
+
/** The option. */
|
|
2097
|
+
option: BfComboboxOption<T>;
|
|
2098
|
+
/** Its position in `options`, which keys its id. */
|
|
2099
|
+
index: number;
|
|
2100
|
+
/** The option element's id, which `aria-activedescendant` names while it is active. */
|
|
2101
|
+
id: string;
|
|
2102
|
+
}
|
|
2103
|
+
/** A run of visible options under one heading (`label` null: the ungrouped options). */
|
|
2104
|
+
interface ComboboxSection<T> {
|
|
2105
|
+
/** The group's heading, or null for the options without a group. */
|
|
2106
|
+
label: string | null;
|
|
2107
|
+
/** The heading's id, which names the `role="group"`. */
|
|
2108
|
+
id: string;
|
|
2109
|
+
/** The options in the section, in their `options` order. */
|
|
2110
|
+
items: ComboboxItem<T>[];
|
|
2111
|
+
}
|
|
2112
|
+
/** What the combobox core reads from the component that owns it. */
|
|
2113
|
+
interface ComboboxHost<T> {
|
|
2114
|
+
/** The options to choose from. */
|
|
2115
|
+
options: Signal<readonly BfComboboxOption<T>[]>;
|
|
2116
|
+
/** The match function, or null for no local filtering. */
|
|
2117
|
+
filter: Signal<BfComboboxFilter<T> | null>;
|
|
2118
|
+
/** Whether an option is picked (shows `aria-selected` and the check mark). */
|
|
2119
|
+
isSelected(option: BfComboboxOption<T>): boolean;
|
|
2120
|
+
/** Picks an option the user chose with `Enter` or a click. */
|
|
2121
|
+
pick(item: ComboboxItem<T>): void;
|
|
2122
|
+
/** The element the panel is anchored to and as wide as: the field box. */
|
|
2123
|
+
anchor(): HTMLElement;
|
|
2124
|
+
/** The panel component to open (the internal listbox). */
|
|
2125
|
+
panel: Type<unknown>;
|
|
2126
|
+
/** The listbox's accessible name: `aria-label` and `aria-labelledby` values. */
|
|
2127
|
+
listboxLabel: Signal<string | null>;
|
|
2128
|
+
/** The listbox's `aria-labelledby` value. */
|
|
2129
|
+
listboxLabelledby: Signal<string | null>;
|
|
2130
|
+
/** Whether the list allows several picks (`aria-multiselectable`). */
|
|
2131
|
+
multiple: boolean;
|
|
2132
|
+
/** Whether a request is running: the panel shows a spinner row. */
|
|
2133
|
+
loading: Signal<boolean>;
|
|
2134
|
+
/** The empty row's text. */
|
|
2135
|
+
emptyText: Signal<string>;
|
|
2136
|
+
/** The size of the field, which the option rows follow. */
|
|
2137
|
+
size: Signal<BfSize>;
|
|
2138
|
+
/** Emits the query each time the user changes it. */
|
|
2139
|
+
queried(query: string): void;
|
|
2140
|
+
}
|
|
2141
|
+
/**
|
|
2142
|
+
* The state and behaviour `bf-combobox` and `bf-multi-combobox` share: the query, the filtered and
|
|
2143
|
+
* grouped options, the active option, the keyboard and the anchored panel. Created in a field
|
|
2144
|
+
* initializer of the component (it injects the overlay and the component's view container), so
|
|
2145
|
+
* each component keeps its own typed value model. Internal to the overlay entry.
|
|
2146
|
+
*/
|
|
2147
|
+
declare class ComboboxCore<T> {
|
|
2148
|
+
readonly host: ComboboxHost<T>;
|
|
2149
|
+
private readonly overlay;
|
|
2150
|
+
private readonly injector;
|
|
2151
|
+
private readonly viewContainer;
|
|
2152
|
+
private readonly dir;
|
|
2153
|
+
/** The listbox's id, which the input's `aria-controls` names. */
|
|
2154
|
+
readonly listboxId: string;
|
|
2155
|
+
/** The text typed since the last pick; null while the field shows its value. */
|
|
2156
|
+
private readonly queryState;
|
|
2157
|
+
readonly query: Signal<string | null>;
|
|
2158
|
+
private readonly openState;
|
|
2159
|
+
/** Whether the panel is open. */
|
|
2160
|
+
readonly isOpen: Signal<boolean>;
|
|
2161
|
+
/** The `index` of the active option, null for none. */
|
|
2162
|
+
private readonly activeIndex;
|
|
2163
|
+
/** The options that match the query, ungrouped first, then each group in first-seen order. */
|
|
2164
|
+
readonly sections: Signal<ComboboxSection<T>[]>;
|
|
2165
|
+
/** The visible options in list order: the order the arrow keys move through. */
|
|
2166
|
+
readonly items: Signal<ComboboxItem<T>[]>;
|
|
2167
|
+
/** The active option while it is visible and the panel is open. */
|
|
2168
|
+
readonly active: Signal<ComboboxItem<T> | null>;
|
|
2169
|
+
/** `aria-controls`: the listbox while it is rendered. */
|
|
2170
|
+
readonly controls: Signal<string | null>;
|
|
2171
|
+
private anchored;
|
|
2172
|
+
private subscriptions;
|
|
2173
|
+
constructor(host: ComboboxHost<T>);
|
|
2174
|
+
/**
|
|
2175
|
+
* Sets the typed text and emits `queried` when it changed; null shows the value again.
|
|
2176
|
+
* @param query The text, or null.
|
|
2177
|
+
*/
|
|
2178
|
+
setQuery(query: string | null): void;
|
|
2179
|
+
/**
|
|
2180
|
+
* The user typed: the text becomes the query, the panel opens and the first match is active.
|
|
2181
|
+
* @param text The input's text.
|
|
2182
|
+
*/
|
|
2183
|
+
typed(text: string): void;
|
|
2184
|
+
/** Opens the panel anchored to the field; does nothing while it is open. */
|
|
2185
|
+
open(): void;
|
|
2186
|
+
/** Closes the panel; does nothing while it is closed. */
|
|
2187
|
+
close(): void;
|
|
2188
|
+
/** Follows the field's size and place while open (chips that wrap make it taller). */
|
|
2189
|
+
reposition(): void;
|
|
2190
|
+
/**
|
|
2191
|
+
* Makes an option the active one (the pointer moved over it); a disabled one is skipped.
|
|
2192
|
+
* @param item The option.
|
|
2193
|
+
*/
|
|
2194
|
+
activate(item: ComboboxItem<T>): void;
|
|
2195
|
+
/**
|
|
2196
|
+
* Picks an option the user clicked; a disabled one does nothing.
|
|
2197
|
+
* @param item The option.
|
|
2198
|
+
*/
|
|
2199
|
+
choose(item: ComboboxItem<T>): void;
|
|
2200
|
+
/**
|
|
2201
|
+
* The list keys: arrows open and move (wrapping), `Home`/`End` move to the ends of the open
|
|
2202
|
+
* list, `Enter` picks the active option. Returns whether the key was handled (and cancelled).
|
|
2203
|
+
* @param event The input's keydown.
|
|
2204
|
+
*/
|
|
2205
|
+
keydown(event: KeyboardEvent): boolean;
|
|
2206
|
+
/** Moves the active option by `step` through the enabled ones, wrapping at the ends. */
|
|
2207
|
+
private move;
|
|
2208
|
+
private firstEnabled;
|
|
2209
|
+
private teardown;
|
|
2210
|
+
}
|
|
2211
|
+
/** Equality of an option's value and a picked value under `compareWith`, never for `null`. */
|
|
2212
|
+
declare function sameValue<T>(compare: BfCompareWith<T>, optionValue: T, value: T | null): boolean;
|
|
2213
|
+
/**
|
|
2214
|
+
* Text field with a filtered list of options to pick one value from (the ARIA combobox pattern).
|
|
2215
|
+
* Typing filters the list by label, ignoring case and accents; the arrow keys move through it
|
|
2216
|
+
* and `Enter` picks. Generic over the option value (a string by default); `null` means nothing is
|
|
2217
|
+
* picked. For several values use `bf-multi-combobox`.
|
|
2218
|
+
*
|
|
2219
|
+
* @example
|
|
2220
|
+
* <bf-combobox label="Assignee" placeholder="Search people" [options]="people" [(value)]="assigneeId" />
|
|
2221
|
+
* <bf-combobox label="Owner" [options]="people" [formField]="task.ownerId" />
|
|
2222
|
+
* @summary Text field that filters a list of options as you type and picks one
|
|
2223
|
+
* @category Forms
|
|
2224
|
+
* @since 0.3.1
|
|
2225
|
+
*/
|
|
2226
|
+
export declare class BfComboboxComponent<T = string> implements FormValueControl<T | null> {
|
|
2227
|
+
/** The picked option's value, `null` while nothing is picked; two-way bindable and bound by
|
|
2228
|
+
* `[formField]`. */
|
|
2229
|
+
readonly value: import("@angular/core").ModelSignal<T | null>;
|
|
2230
|
+
/** The options to choose from; with server search, the latest results (keep the picked one). */
|
|
2231
|
+
readonly options: import("@angular/core").InputSignal<readonly BfComboboxOption<T>[]>;
|
|
2232
|
+
/** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */
|
|
2233
|
+
readonly compareWith: import("@angular/core").InputSignal<BfCompareWith<T>>;
|
|
2234
|
+
/** Whether an option matches the typed text (default: its label contains it, ignoring case and
|
|
2235
|
+
* accents); `null` shows `options` unfiltered, for results filtered by a server. */
|
|
2236
|
+
readonly filter: import("@angular/core").InputSignal<BfComboboxFilter<T> | null>;
|
|
2237
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`
|
|
2238
|
+
* by default). */
|
|
2239
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
2240
|
+
/** Visible label above the field. */
|
|
2241
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2242
|
+
/** Accessible name when no visible label is rendered. Ignored when `label` is set. */
|
|
2243
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
2244
|
+
/** Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when
|
|
2245
|
+
* `label` is set. */
|
|
2246
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
2247
|
+
/** Hint text shown in the empty field. */
|
|
2248
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
2249
|
+
/** Helper text under the field. */
|
|
2250
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
2251
|
+
/** Explicit error text; takes precedence over Signal Forms errors. */
|
|
2252
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
2253
|
+
/** Text of the list's row when no option matches; empty uses the `comboboxEmpty` label. */
|
|
2254
|
+
readonly emptyLabel: import("@angular/core").InputSignal<string>;
|
|
2255
|
+
/** Shows a loading row in the list, while a server search for the typed text runs. */
|
|
2256
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2257
|
+
/** Disables the field. */
|
|
2258
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2259
|
+
/** Shows the value but blocks changes; the field stays focusable and the list never opens. */
|
|
2260
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2261
|
+
/** Marks the field required. */
|
|
2262
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2263
|
+
/** Field validity from Signal Forms. */
|
|
2264
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2265
|
+
/** Whether the user has left the field. */
|
|
2266
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2267
|
+
/** Validation errors from Signal Forms. */
|
|
2268
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
2269
|
+
/** Native name attribute of the text input. */
|
|
2270
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
2271
|
+
/** Input id; generated when not set. */
|
|
2272
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
2273
|
+
/** Emitted with the new value after the user picks an option, or `null` after clearing the text. */
|
|
2274
|
+
readonly changed: import("@angular/core").OutputEmitterRef<T | null>;
|
|
2275
|
+
/** Emitted with the typed text each time the user changes it (`''` once it is cleared), for a
|
|
2276
|
+
* server search. */
|
|
2277
|
+
readonly queried: import("@angular/core").OutputEmitterRef<string>;
|
|
2278
|
+
/** Emitted when the input gains focus. */
|
|
2279
|
+
readonly focused: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
2280
|
+
/** Emitted when the input loses focus. */
|
|
2281
|
+
readonly blurred: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
2282
|
+
/** Emitted on blur so Signal Forms marks the field touched. */
|
|
2283
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
2284
|
+
private readonly el;
|
|
2285
|
+
private readonly anchorEl;
|
|
2286
|
+
private readonly defaults;
|
|
2287
|
+
private readonly labels;
|
|
2288
|
+
/** The label of the last option the user picked, for a value no current option matches (the
|
|
2289
|
+
* results of a later server search). */
|
|
2290
|
+
private readonly pickedLabel;
|
|
2291
|
+
/** The size in effect: `size`, else the app's `fieldSize` default. */
|
|
2292
|
+
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
2293
|
+
protected readonly core: ComboboxCore<T>;
|
|
2294
|
+
/** The picked option's label, `''` while nothing is picked. */
|
|
2295
|
+
readonly valueLabel: import("@angular/core").Signal<string>;
|
|
2296
|
+
/** The input's text: what the user is typing, else the picked option's label. */
|
|
2297
|
+
protected readonly text: import("@angular/core").Signal<string>;
|
|
2298
|
+
readonly errorText: import("@angular/core").Signal<string>;
|
|
2299
|
+
readonly showError: import("@angular/core").Signal<boolean>;
|
|
2300
|
+
readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
2301
|
+
/** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */
|
|
2302
|
+
readonly errorMessageId: import("@angular/core").Signal<string | null>;
|
|
2303
|
+
/** `aria-label` value: only when there is no visible label. */
|
|
2304
|
+
readonly ariaLabelAttr: import("@angular/core").Signal<string | null>;
|
|
2305
|
+
/** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */
|
|
2306
|
+
readonly ariaLabelledbyAttr: import("@angular/core").Signal<string | null>;
|
|
2307
|
+
readonly wrapperClasses: import("@angular/core").Signal<string>;
|
|
2308
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
2309
|
+
/**
|
|
2310
|
+
* Focuses the input; Signal Forms calls it from `focusBoundControl()`.
|
|
2311
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
2312
|
+
*/
|
|
2313
|
+
focus(options?: FocusOptions): void;
|
|
2314
|
+
/**
|
|
2315
|
+
* Typing filters the list and opens it.
|
|
2316
|
+
* @internal
|
|
2317
|
+
*/
|
|
2318
|
+
onInput(el: HTMLInputElement): void;
|
|
2319
|
+
/**
|
|
2320
|
+
* Opens the list on a click into the field.
|
|
2321
|
+
* @internal
|
|
2322
|
+
*/
|
|
2323
|
+
onClick(): void;
|
|
2324
|
+
/**
|
|
2325
|
+
* The list keys (arrows, `Home`, `End`, `Enter`), and `Escape` on a closed list, which drops the
|
|
2326
|
+
* typed text. `Escape` on an open list is the panel's: it closes it.
|
|
2327
|
+
* @internal
|
|
2328
|
+
*/
|
|
2329
|
+
onKeydown(event: KeyboardEvent): void;
|
|
2330
|
+
/**
|
|
2331
|
+
* Leaving the field closes the list. Typed text that names an option exactly picks it; empty
|
|
2332
|
+
* text clears the value; any other text reverts to the picked option's label. Marks the field
|
|
2333
|
+
* touched.
|
|
2334
|
+
* @internal
|
|
2335
|
+
*/
|
|
2336
|
+
onBlur(event: FocusEvent): void;
|
|
2337
|
+
/** Picks an option (Enter or a click): the value, the field's text, and the list closes. */
|
|
2338
|
+
private pick;
|
|
2339
|
+
private set;
|
|
2340
|
+
/**
|
|
2341
|
+
* Drops the typed text and writes the field's text to the input at once: a pick can follow the
|
|
2342
|
+
* last keystroke before change detection has run, when the binding alone would see no change.
|
|
2343
|
+
*/
|
|
2344
|
+
private resetQuery;
|
|
2345
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfComboboxComponent<any>, never>;
|
|
2346
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfComboboxComponent<any>, "bf-combobox", never, {
|
|
2347
|
+
"value": {
|
|
2348
|
+
"alias": "value";
|
|
2349
|
+
"required": false;
|
|
2350
|
+
"isSignal": true;
|
|
2351
|
+
};
|
|
2352
|
+
"options": {
|
|
2353
|
+
"alias": "options";
|
|
2354
|
+
"required": true;
|
|
2355
|
+
"isSignal": true;
|
|
2356
|
+
};
|
|
2357
|
+
"compareWith": {
|
|
2358
|
+
"alias": "compareWith";
|
|
2359
|
+
"required": false;
|
|
2360
|
+
"isSignal": true;
|
|
2361
|
+
};
|
|
2362
|
+
"filter": {
|
|
2363
|
+
"alias": "filter";
|
|
2364
|
+
"required": false;
|
|
2365
|
+
"isSignal": true;
|
|
2366
|
+
};
|
|
2367
|
+
"size": {
|
|
2368
|
+
"alias": "size";
|
|
2369
|
+
"required": false;
|
|
2370
|
+
"isSignal": true;
|
|
2371
|
+
};
|
|
2372
|
+
"label": {
|
|
2373
|
+
"alias": "label";
|
|
2374
|
+
"required": false;
|
|
2375
|
+
"isSignal": true;
|
|
2376
|
+
};
|
|
2377
|
+
"ariaLabel": {
|
|
2378
|
+
"alias": "ariaLabel";
|
|
2379
|
+
"required": false;
|
|
2380
|
+
"isSignal": true;
|
|
2381
|
+
};
|
|
2382
|
+
"ariaLabelledby": {
|
|
2383
|
+
"alias": "ariaLabelledby";
|
|
2384
|
+
"required": false;
|
|
2385
|
+
"isSignal": true;
|
|
2386
|
+
};
|
|
2387
|
+
"placeholder": {
|
|
2388
|
+
"alias": "placeholder";
|
|
2389
|
+
"required": false;
|
|
2390
|
+
"isSignal": true;
|
|
2391
|
+
};
|
|
2392
|
+
"helpText": {
|
|
2393
|
+
"alias": "helpText";
|
|
2394
|
+
"required": false;
|
|
2395
|
+
"isSignal": true;
|
|
2396
|
+
};
|
|
2397
|
+
"errorMessage": {
|
|
2398
|
+
"alias": "errorMessage";
|
|
2399
|
+
"required": false;
|
|
2400
|
+
"isSignal": true;
|
|
2401
|
+
};
|
|
2402
|
+
"emptyLabel": {
|
|
2403
|
+
"alias": "emptyLabel";
|
|
2404
|
+
"required": false;
|
|
2405
|
+
"isSignal": true;
|
|
2406
|
+
};
|
|
2407
|
+
"loading": {
|
|
2408
|
+
"alias": "loading";
|
|
2409
|
+
"required": false;
|
|
2410
|
+
"isSignal": true;
|
|
2411
|
+
};
|
|
2412
|
+
"disabled": {
|
|
2413
|
+
"alias": "disabled";
|
|
2414
|
+
"required": false;
|
|
2415
|
+
"isSignal": true;
|
|
2416
|
+
};
|
|
2417
|
+
"readonly": {
|
|
2418
|
+
"alias": "readonly";
|
|
2419
|
+
"required": false;
|
|
2420
|
+
"isSignal": true;
|
|
2421
|
+
};
|
|
2422
|
+
"required": {
|
|
2423
|
+
"alias": "required";
|
|
2424
|
+
"required": false;
|
|
2425
|
+
"isSignal": true;
|
|
2426
|
+
};
|
|
2427
|
+
"invalid": {
|
|
2428
|
+
"alias": "invalid";
|
|
2429
|
+
"required": false;
|
|
2430
|
+
"isSignal": true;
|
|
2431
|
+
};
|
|
2432
|
+
"touched": {
|
|
2433
|
+
"alias": "touched";
|
|
2434
|
+
"required": false;
|
|
2435
|
+
"isSignal": true;
|
|
2436
|
+
};
|
|
2437
|
+
"errors": {
|
|
2438
|
+
"alias": "errors";
|
|
2439
|
+
"required": false;
|
|
2440
|
+
"isSignal": true;
|
|
2441
|
+
};
|
|
2442
|
+
"name": {
|
|
2443
|
+
"alias": "name";
|
|
2444
|
+
"required": false;
|
|
2445
|
+
"isSignal": true;
|
|
2446
|
+
};
|
|
2447
|
+
"id": {
|
|
2448
|
+
"alias": "id";
|
|
2449
|
+
"required": false;
|
|
2450
|
+
"isSignal": true;
|
|
2451
|
+
};
|
|
2452
|
+
}, {
|
|
2453
|
+
"value": "valueChange";
|
|
2454
|
+
"changed": "changed";
|
|
2455
|
+
"queried": "queried";
|
|
2456
|
+
"focused": "focused";
|
|
2457
|
+
"blurred": "blurred";
|
|
2458
|
+
"touch": "touch";
|
|
2459
|
+
}, never, never, true, never>;
|
|
2460
|
+
}
|
|
2461
|
+
/** A picked value as a tag: its label, for the tag and its remove button's name. */
|
|
2462
|
+
interface BfMultiComboboxTag<T> {
|
|
2463
|
+
value: T;
|
|
2464
|
+
label: string;
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Text field with a filtered list of options to pick several values from, shown as removable tags
|
|
2468
|
+
* inside the field (the ARIA combobox pattern with a multi-select listbox). Typing filters the
|
|
2469
|
+
* list by label, ignoring case and accents; `Enter` or a click adds or removes the active option
|
|
2470
|
+
* and the list stays open. Generic over the option value (a string by default); the value is an
|
|
2471
|
+
* array, empty while nothing is picked. For one value use `bf-combobox`.
|
|
2472
|
+
*
|
|
2473
|
+
* @example
|
|
2474
|
+
* <bf-multi-combobox label="Labels" placeholder="Add labels" [options]="labels" [(value)]="picked" />
|
|
2475
|
+
* <bf-multi-combobox label="Reviewers" [options]="people" [formField]="task.reviewerIds" />
|
|
2476
|
+
* @summary Text field that filters options as you type and picks several as tags
|
|
2477
|
+
* @category Forms
|
|
2478
|
+
* @since 0.3.1
|
|
2479
|
+
*/
|
|
2480
|
+
export declare class BfMultiComboboxComponent<T = string> implements FormValueControl<readonly T[]> {
|
|
2481
|
+
/** The picked options' values in the order they were picked, empty while nothing is picked;
|
|
2482
|
+
* two-way bindable and bound by `[formField]`. */
|
|
2483
|
+
readonly value: import("@angular/core").ModelSignal<readonly T[]>;
|
|
2484
|
+
/** The options to choose from; with server search, the latest results. */
|
|
2485
|
+
readonly options: import("@angular/core").InputSignal<readonly BfComboboxOption<T>[]>;
|
|
2486
|
+
/** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */
|
|
2487
|
+
readonly compareWith: import("@angular/core").InputSignal<BfCompareWith<T>>;
|
|
2488
|
+
/** Whether an option matches the typed text (default: its label contains it, ignoring case and
|
|
2489
|
+
* accents); `null` shows `options` unfiltered, for results filtered by a server. */
|
|
2490
|
+
readonly filter: import("@angular/core").InputSignal<BfComboboxFilter<T> | null>;
|
|
2491
|
+
/** Height step of the field (its minimum height): sm 32, md 40, lg 48 px; unset follows
|
|
2492
|
+
* `provideBfDefaults()` (`fieldSize`, `md` by default). */
|
|
2493
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
2494
|
+
/** Visible label above the field. */
|
|
2495
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2496
|
+
/** Accessible name when no visible label is rendered. Ignored when `label` is set. */
|
|
2497
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
2498
|
+
/** Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when
|
|
2499
|
+
* `label` is set. */
|
|
2500
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
2501
|
+
/** Hint text shown while nothing is picked. */
|
|
2502
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
2503
|
+
/** Helper text under the field. */
|
|
2504
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
2505
|
+
/** Explicit error text; takes precedence over Signal Forms errors. */
|
|
2506
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
2507
|
+
/** Text of the list's row when no option matches; empty uses the `comboboxEmpty` label. */
|
|
2508
|
+
readonly emptyLabel: import("@angular/core").InputSignal<string>;
|
|
2509
|
+
/** Shows a loading row in the list, while a server search for the typed text runs. */
|
|
2510
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2511
|
+
/** Disables the field and its tags. */
|
|
2512
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2513
|
+
/** Shows the tags but blocks changes: no remove buttons, and the list never opens. */
|
|
2514
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2515
|
+
/** Marks the field required (at least one value). */
|
|
2516
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2517
|
+
/** Field validity from Signal Forms. */
|
|
2518
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2519
|
+
/** Whether the user has left the field. */
|
|
2520
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2521
|
+
/** Validation errors from Signal Forms. */
|
|
2522
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
2523
|
+
/** Native name attribute of the text input. */
|
|
2524
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
2525
|
+
/** Input id; generated when not set. */
|
|
2526
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
2527
|
+
/** Emitted with the new values after the user adds or removes one. */
|
|
2528
|
+
readonly changed: import("@angular/core").OutputEmitterRef<readonly T[]>;
|
|
2529
|
+
/** Emitted with the typed text each time the user changes it (`''` once it is cleared), for a
|
|
2530
|
+
* server search. */
|
|
2531
|
+
readonly queried: import("@angular/core").OutputEmitterRef<string>;
|
|
2532
|
+
/** Emitted when the input gains focus. */
|
|
2533
|
+
readonly focused: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
2534
|
+
/** Emitted when the input loses focus. */
|
|
2535
|
+
readonly blurred: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
2536
|
+
/** Emitted on blur so Signal Forms marks the field touched. */
|
|
2537
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
2538
|
+
private readonly el;
|
|
2539
|
+
private readonly anchorEl;
|
|
2540
|
+
private readonly defaults;
|
|
2541
|
+
protected readonly labels: import("@bitforgehq/ui").BfLabels;
|
|
2542
|
+
/** The labels of the options the user picked, for values no current option matches (the
|
|
2543
|
+
* results of a later server search). */
|
|
2544
|
+
private readonly pickedLabels;
|
|
2545
|
+
/** The size in effect: `size`, else the app's `fieldSize` default. */
|
|
2546
|
+
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
2547
|
+
protected readonly core: ComboboxCore<T>;
|
|
2548
|
+
/** The picked values with their labels, in `value` order. */
|
|
2549
|
+
protected readonly tags: import("@angular/core").Signal<BfMultiComboboxTag<T>[]>;
|
|
2550
|
+
/** Whether the user can change the value (not disabled, not read-only). */
|
|
2551
|
+
protected readonly editable: import("@angular/core").Signal<boolean>;
|
|
2552
|
+
readonly errorText: import("@angular/core").Signal<string>;
|
|
2553
|
+
readonly showError: import("@angular/core").Signal<boolean>;
|
|
2554
|
+
readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
2555
|
+
/** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */
|
|
2556
|
+
readonly errorMessageId: import("@angular/core").Signal<string | null>;
|
|
2557
|
+
/** `aria-label` value: only when there is no visible label. */
|
|
2558
|
+
readonly ariaLabelAttr: import("@angular/core").Signal<string | null>;
|
|
2559
|
+
/** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */
|
|
2560
|
+
readonly ariaLabelledbyAttr: import("@angular/core").Signal<string | null>;
|
|
2561
|
+
readonly boxClasses: import("@angular/core").Signal<string>;
|
|
2562
|
+
protected readonly inputClasses: string;
|
|
2563
|
+
protected readonly tagClasses: string;
|
|
2564
|
+
protected readonly removeClasses: string;
|
|
2565
|
+
protected readonly crossClasses: string;
|
|
2566
|
+
constructor();
|
|
2567
|
+
/**
|
|
2568
|
+
* Focuses the input; Signal Forms calls it from `focusBoundControl()`.
|
|
2569
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
2570
|
+
*/
|
|
2571
|
+
focus(options?: FocusOptions): void;
|
|
2572
|
+
/**
|
|
2573
|
+
* Typing filters the list and opens it.
|
|
2574
|
+
* @internal
|
|
2575
|
+
*/
|
|
2576
|
+
onInput(el: HTMLInputElement): void;
|
|
2577
|
+
/**
|
|
2578
|
+
* Opens the list on a click into the input.
|
|
2579
|
+
* @internal
|
|
2580
|
+
*/
|
|
2581
|
+
onClick(): void;
|
|
2582
|
+
/**
|
|
2583
|
+
* A press on the box itself (not a tag's button, not the input) focuses the input and opens the
|
|
2584
|
+
* list.
|
|
2585
|
+
* @internal
|
|
2586
|
+
*/
|
|
2587
|
+
onBoxMousedown(event: MouseEvent): void;
|
|
2588
|
+
/**
|
|
2589
|
+
* The list keys (arrows, `Home`, `End`, `Enter`), `Backspace` in the empty input (removes the last
|
|
2590
|
+
* tag) and `Escape` on a closed list (drops the typed text).
|
|
2591
|
+
* @internal
|
|
2592
|
+
*/
|
|
2593
|
+
onKeydown(event: KeyboardEvent): void;
|
|
2594
|
+
/**
|
|
2595
|
+
* Leaving the field closes the list and drops the typed text; marks the field touched.
|
|
2596
|
+
* @internal
|
|
2597
|
+
*/
|
|
2598
|
+
onBlur(event: FocusEvent): void;
|
|
2599
|
+
/**
|
|
2600
|
+
* Removes the value at `index` (a tag's remove button) and returns focus to the input.
|
|
2601
|
+
* @internal
|
|
2602
|
+
*/
|
|
2603
|
+
remove(index: number): void;
|
|
2604
|
+
/** Adds a picked option, or removes it when it is picked already; the typed text clears and the
|
|
2605
|
+
* list stays open. */
|
|
2606
|
+
private toggle;
|
|
2607
|
+
private indexOf;
|
|
2608
|
+
/**
|
|
2609
|
+
* Drops the typed text and writes the field's text to the input at once: a pick can follow the
|
|
2610
|
+
* last keystroke before change detection has run, when the binding alone would see no change.
|
|
2611
|
+
*/
|
|
2612
|
+
private resetQuery;
|
|
2613
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfMultiComboboxComponent<any>, never>;
|
|
2614
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfMultiComboboxComponent<any>, "bf-multi-combobox", never, {
|
|
2615
|
+
"value": {
|
|
2616
|
+
"alias": "value";
|
|
2617
|
+
"required": false;
|
|
2618
|
+
"isSignal": true;
|
|
2619
|
+
};
|
|
2620
|
+
"options": {
|
|
2621
|
+
"alias": "options";
|
|
2622
|
+
"required": true;
|
|
2623
|
+
"isSignal": true;
|
|
2624
|
+
};
|
|
2625
|
+
"compareWith": {
|
|
2626
|
+
"alias": "compareWith";
|
|
2627
|
+
"required": false;
|
|
2628
|
+
"isSignal": true;
|
|
2629
|
+
};
|
|
2630
|
+
"filter": {
|
|
2631
|
+
"alias": "filter";
|
|
2632
|
+
"required": false;
|
|
2633
|
+
"isSignal": true;
|
|
2634
|
+
};
|
|
2635
|
+
"size": {
|
|
2636
|
+
"alias": "size";
|
|
2637
|
+
"required": false;
|
|
2638
|
+
"isSignal": true;
|
|
2639
|
+
};
|
|
2640
|
+
"label": {
|
|
2641
|
+
"alias": "label";
|
|
2642
|
+
"required": false;
|
|
2643
|
+
"isSignal": true;
|
|
2644
|
+
};
|
|
2645
|
+
"ariaLabel": {
|
|
2646
|
+
"alias": "ariaLabel";
|
|
2647
|
+
"required": false;
|
|
2648
|
+
"isSignal": true;
|
|
2649
|
+
};
|
|
2650
|
+
"ariaLabelledby": {
|
|
2651
|
+
"alias": "ariaLabelledby";
|
|
2652
|
+
"required": false;
|
|
2653
|
+
"isSignal": true;
|
|
2654
|
+
};
|
|
2655
|
+
"placeholder": {
|
|
2656
|
+
"alias": "placeholder";
|
|
2657
|
+
"required": false;
|
|
2658
|
+
"isSignal": true;
|
|
2659
|
+
};
|
|
2660
|
+
"helpText": {
|
|
2661
|
+
"alias": "helpText";
|
|
2662
|
+
"required": false;
|
|
2663
|
+
"isSignal": true;
|
|
2664
|
+
};
|
|
2665
|
+
"errorMessage": {
|
|
2666
|
+
"alias": "errorMessage";
|
|
2667
|
+
"required": false;
|
|
2668
|
+
"isSignal": true;
|
|
2669
|
+
};
|
|
2670
|
+
"emptyLabel": {
|
|
2671
|
+
"alias": "emptyLabel";
|
|
2672
|
+
"required": false;
|
|
2673
|
+
"isSignal": true;
|
|
2674
|
+
};
|
|
2675
|
+
"loading": {
|
|
2676
|
+
"alias": "loading";
|
|
2677
|
+
"required": false;
|
|
2678
|
+
"isSignal": true;
|
|
2679
|
+
};
|
|
2680
|
+
"disabled": {
|
|
2681
|
+
"alias": "disabled";
|
|
2682
|
+
"required": false;
|
|
2683
|
+
"isSignal": true;
|
|
2684
|
+
};
|
|
2685
|
+
"readonly": {
|
|
2686
|
+
"alias": "readonly";
|
|
2687
|
+
"required": false;
|
|
2688
|
+
"isSignal": true;
|
|
2689
|
+
};
|
|
2690
|
+
"required": {
|
|
2691
|
+
"alias": "required";
|
|
2692
|
+
"required": false;
|
|
2693
|
+
"isSignal": true;
|
|
2694
|
+
};
|
|
2695
|
+
"invalid": {
|
|
2696
|
+
"alias": "invalid";
|
|
2697
|
+
"required": false;
|
|
2698
|
+
"isSignal": true;
|
|
2699
|
+
};
|
|
2700
|
+
"touched": {
|
|
2701
|
+
"alias": "touched";
|
|
2702
|
+
"required": false;
|
|
2703
|
+
"isSignal": true;
|
|
2704
|
+
};
|
|
2705
|
+
"errors": {
|
|
2706
|
+
"alias": "errors";
|
|
2707
|
+
"required": false;
|
|
2708
|
+
"isSignal": true;
|
|
2709
|
+
};
|
|
2710
|
+
"name": {
|
|
2711
|
+
"alias": "name";
|
|
2712
|
+
"required": false;
|
|
2713
|
+
"isSignal": true;
|
|
2714
|
+
};
|
|
2715
|
+
"id": {
|
|
2716
|
+
"alias": "id";
|
|
2717
|
+
"required": false;
|
|
2718
|
+
"isSignal": true;
|
|
2719
|
+
};
|
|
2720
|
+
}, {
|
|
2721
|
+
"value": "valueChange";
|
|
2722
|
+
"changed": "changed";
|
|
2723
|
+
"queried": "queried";
|
|
2724
|
+
"focused": "focused";
|
|
2725
|
+
"blurred": "blurred";
|
|
2726
|
+
"touch": "touch";
|
|
2727
|
+
}, never, never, true, never>;
|
|
2728
|
+
}
|
|
2729
|
+
/**
|
|
2730
|
+
* How `bf-date-input` picks a date besides typing: `calendar` adds a button that opens a
|
|
2731
|
+
* `bf-calendar` in a popover, `none` keeps the field typed only.
|
|
2732
|
+
*
|
|
2733
|
+
* @summary Whether a date input offers a calendar popover besides typing
|
|
2734
|
+
* @since 0.3.1
|
|
2735
|
+
*/
|
|
2736
|
+
type BfDateInputPicker = 'calendar' | 'none';
|
|
2737
|
+
/**
|
|
2738
|
+
* Date field typed part by part (day, month and year in the locale's order) with a calendar
|
|
2739
|
+
* popover, valued as an ISO date string and bound like any other field.
|
|
2740
|
+
*
|
|
2741
|
+
* @example
|
|
2742
|
+
* <bf-date-input label="Due date" min="2026-01-01" [(value)]="due" />
|
|
2743
|
+
* <bf-date-input label="Birthday" picker="none" [formField]="profile.birthday" />
|
|
2744
|
+
* @summary Typed date field with a calendar popover, valued as an ISO date string
|
|
2745
|
+
* @category Forms
|
|
2746
|
+
* @since 0.3.1
|
|
2747
|
+
*/
|
|
2748
|
+
export declare class BfDateInputComponent implements FormValueControl<string | null> {
|
|
2749
|
+
/** The date as an ISO string ('YYYY-MM-DD'), `null` while empty or incomplete; two-way bindable
|
|
2750
|
+
* and bound by `[formField]`. */
|
|
2751
|
+
readonly value: import("@angular/core").ModelSignal<string | null>;
|
|
2752
|
+
/** The earliest valid date (ISO): earlier dates show an error, and the calendar stops there. */
|
|
2753
|
+
readonly min: import("@angular/core").InputSignal<string | undefined>;
|
|
2754
|
+
/** The latest valid date (ISO): later dates show an error, and the calendar stops there. */
|
|
2755
|
+
readonly max: import("@angular/core").InputSignal<string | undefined>;
|
|
2756
|
+
/** Rules out more dates (weekends, booked days): disabled in the calendar, an error when typed. */
|
|
2757
|
+
readonly disabledDate: import("@angular/core").InputSignal<BfCalendarDisabledDate | null>;
|
|
2758
|
+
/** `calendar` adds the button that opens a calendar popover; `none` keeps the field typed only. */
|
|
2759
|
+
readonly picker: import("@angular/core").InputSignal<BfDateInputPicker>;
|
|
2760
|
+
/** Renders the platform's date picker (`input type="date"`) under a coarse pointer (touch). */
|
|
2761
|
+
readonly native: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2762
|
+
/** BCP 47 locale of the part order, the separators and the calendar; empty follows the
|
|
2763
|
+
* document's `lang`, else English. */
|
|
2764
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
2765
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`
|
|
2766
|
+
* by default). */
|
|
2767
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
2768
|
+
/** Visible label above the field. */
|
|
2769
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2770
|
+
/** Accessible name when no visible label is rendered. Ignored when `label` is set. */
|
|
2771
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
2772
|
+
/** Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when
|
|
2773
|
+
* `label` is set. */
|
|
2774
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
2775
|
+
/** Helper text under the field. */
|
|
2776
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
2777
|
+
/** Explicit error text; takes precedence over the field's own errors and Signal Forms errors. */
|
|
2778
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
2779
|
+
/** Disables the field and its calendar button. */
|
|
2780
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2781
|
+
/** Shows the date but blocks changes; the parts stay focusable and expose `aria-readonly`. */
|
|
2782
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2783
|
+
/** Marks the field required. */
|
|
2784
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2785
|
+
/** Field validity from Signal Forms. */
|
|
2786
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2787
|
+
/** Whether the user has left the field. */
|
|
2788
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2789
|
+
/** Validation errors from Signal Forms. */
|
|
2790
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
2791
|
+
/** Native name attribute of the platform input (`native` under a coarse pointer). */
|
|
2792
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
2793
|
+
/** Field id; generated when not set. */
|
|
2794
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
2795
|
+
/** Emitted with the new date right after a user change: `null` once it is cleared or incomplete. */
|
|
2796
|
+
readonly changed: import("@angular/core").OutputEmitterRef<string | null>;
|
|
2797
|
+
/** Emitted when focus leaves the field (not into its calendar), so Signal Forms marks it touched. */
|
|
2798
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
2799
|
+
private readonly field;
|
|
2800
|
+
/**
|
|
2801
|
+
* Focuses the first empty part (else the first part); Signal Forms calls it from
|
|
2802
|
+
* `focusBoundControl()`.
|
|
2803
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
2804
|
+
*/
|
|
2805
|
+
focus(options?: FocusOptions): void;
|
|
2806
|
+
/** Opens the calendar popover; does nothing without a picker, or while disabled or read-only. */
|
|
2807
|
+
openPicker(): void;
|
|
2808
|
+
/** Closes the calendar popover, focus back on its button; does nothing while it is closed. */
|
|
2809
|
+
closePicker(): void;
|
|
2810
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfDateInputComponent, never>;
|
|
2811
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfDateInputComponent, "bf-date-input", never, {
|
|
2812
|
+
"value": {
|
|
2813
|
+
"alias": "value";
|
|
2814
|
+
"required": false;
|
|
2815
|
+
"isSignal": true;
|
|
2816
|
+
};
|
|
2817
|
+
"min": {
|
|
2818
|
+
"alias": "min";
|
|
2819
|
+
"required": false;
|
|
2820
|
+
"isSignal": true;
|
|
2821
|
+
};
|
|
2822
|
+
"max": {
|
|
2823
|
+
"alias": "max";
|
|
2824
|
+
"required": false;
|
|
2825
|
+
"isSignal": true;
|
|
2826
|
+
};
|
|
2827
|
+
"disabledDate": {
|
|
2828
|
+
"alias": "disabledDate";
|
|
2829
|
+
"required": false;
|
|
2830
|
+
"isSignal": true;
|
|
2831
|
+
};
|
|
2832
|
+
"picker": {
|
|
2833
|
+
"alias": "picker";
|
|
2834
|
+
"required": false;
|
|
2835
|
+
"isSignal": true;
|
|
2836
|
+
};
|
|
2837
|
+
"native": {
|
|
2838
|
+
"alias": "native";
|
|
2839
|
+
"required": false;
|
|
2840
|
+
"isSignal": true;
|
|
2841
|
+
};
|
|
2842
|
+
"locale": {
|
|
2843
|
+
"alias": "locale";
|
|
2844
|
+
"required": false;
|
|
2845
|
+
"isSignal": true;
|
|
2846
|
+
};
|
|
2847
|
+
"size": {
|
|
2848
|
+
"alias": "size";
|
|
2849
|
+
"required": false;
|
|
2850
|
+
"isSignal": true;
|
|
2851
|
+
};
|
|
2852
|
+
"label": {
|
|
2853
|
+
"alias": "label";
|
|
2854
|
+
"required": false;
|
|
2855
|
+
"isSignal": true;
|
|
2856
|
+
};
|
|
2857
|
+
"ariaLabel": {
|
|
2858
|
+
"alias": "ariaLabel";
|
|
2859
|
+
"required": false;
|
|
2860
|
+
"isSignal": true;
|
|
2861
|
+
};
|
|
2862
|
+
"ariaLabelledby": {
|
|
2863
|
+
"alias": "ariaLabelledby";
|
|
2864
|
+
"required": false;
|
|
2865
|
+
"isSignal": true;
|
|
2866
|
+
};
|
|
2867
|
+
"helpText": {
|
|
2868
|
+
"alias": "helpText";
|
|
2869
|
+
"required": false;
|
|
2870
|
+
"isSignal": true;
|
|
2871
|
+
};
|
|
2872
|
+
"errorMessage": {
|
|
2873
|
+
"alias": "errorMessage";
|
|
2874
|
+
"required": false;
|
|
2875
|
+
"isSignal": true;
|
|
2876
|
+
};
|
|
2877
|
+
"disabled": {
|
|
2878
|
+
"alias": "disabled";
|
|
2879
|
+
"required": false;
|
|
2880
|
+
"isSignal": true;
|
|
2881
|
+
};
|
|
2882
|
+
"readonly": {
|
|
2883
|
+
"alias": "readonly";
|
|
2884
|
+
"required": false;
|
|
2885
|
+
"isSignal": true;
|
|
2886
|
+
};
|
|
2887
|
+
"required": {
|
|
2888
|
+
"alias": "required";
|
|
2889
|
+
"required": false;
|
|
2890
|
+
"isSignal": true;
|
|
2891
|
+
};
|
|
2892
|
+
"invalid": {
|
|
2893
|
+
"alias": "invalid";
|
|
2894
|
+
"required": false;
|
|
2895
|
+
"isSignal": true;
|
|
2896
|
+
};
|
|
2897
|
+
"touched": {
|
|
2898
|
+
"alias": "touched";
|
|
2899
|
+
"required": false;
|
|
2900
|
+
"isSignal": true;
|
|
2901
|
+
};
|
|
2902
|
+
"errors": {
|
|
2903
|
+
"alias": "errors";
|
|
2904
|
+
"required": false;
|
|
2905
|
+
"isSignal": true;
|
|
2906
|
+
};
|
|
2907
|
+
"name": {
|
|
2908
|
+
"alias": "name";
|
|
2909
|
+
"required": false;
|
|
2910
|
+
"isSignal": true;
|
|
2911
|
+
};
|
|
2912
|
+
"id": {
|
|
2913
|
+
"alias": "id";
|
|
2914
|
+
"required": false;
|
|
2915
|
+
"isSignal": true;
|
|
2916
|
+
};
|
|
2917
|
+
}, {
|
|
2918
|
+
"value": "valueChange";
|
|
2919
|
+
"changed": "changed";
|
|
2920
|
+
"touch": "touch";
|
|
2921
|
+
}, never, never, true, never>;
|
|
2922
|
+
}
|
|
2923
|
+
/**
|
|
2924
|
+
* How `bf-time-input` picks a time besides typing: `list` adds a button that opens a list of
|
|
2925
|
+
* times every `step` minutes, `none` keeps the field typed only.
|
|
2926
|
+
*
|
|
2927
|
+
* @summary Whether a time input offers a popover list of times besides typing
|
|
2928
|
+
* @since 0.3.1
|
|
2929
|
+
*/
|
|
2930
|
+
type BfTimeInputPicker = 'list' | 'none';
|
|
2931
|
+
/**
|
|
2932
|
+
* The clock of a time field: `h12` counts 1–12 with an AM/PM part, `h23` counts 0–23.
|
|
2933
|
+
*
|
|
2934
|
+
* @summary A twelve-hour clock with AM and PM, or a twenty-four-hour clock
|
|
2935
|
+
* @since 0.3.1
|
|
2936
|
+
*/
|
|
2937
|
+
type BfTimeInputHourCycle = 'h12' | 'h23';
|
|
2938
|
+
/**
|
|
2939
|
+
* Time field typed part by part (hour, minute, optional seconds, AM/PM under a 12-hour clock)
|
|
2940
|
+
* with a popover list of times, valued as an ISO time string.
|
|
2941
|
+
*
|
|
2942
|
+
* @example
|
|
2943
|
+
* <bf-time-input label="Start" [step]="15" [(value)]="start" />
|
|
2944
|
+
* <bf-time-input label="Alarm" hourCycle="h12" [formField]="settings.alarm" />
|
|
2945
|
+
* @summary Typed time-of-day field with a popover list of times, valued as an ISO string
|
|
2946
|
+
* @category Forms
|
|
2947
|
+
* @since 0.3.1
|
|
2948
|
+
*/
|
|
2949
|
+
export declare class BfTimeInputComponent implements FormValueControl<string | null> {
|
|
2950
|
+
/** The time as an ISO string ('HH:mm', 'HH:mm:ss' with `seconds`), `null` while empty or
|
|
2951
|
+
* incomplete; two-way bindable and bound by `[formField]`. */
|
|
2952
|
+
readonly value: import("@angular/core").ModelSignal<string | null>;
|
|
2953
|
+
/** The earliest valid time ('HH:mm'): earlier times show an error and are disabled in the list. */
|
|
2954
|
+
readonly min: import("@angular/core").InputSignal<string | undefined>;
|
|
2955
|
+
/** The latest valid time ('HH:mm'): later times show an error and are disabled in the list. */
|
|
2956
|
+
readonly max: import("@angular/core").InputSignal<string | undefined>;
|
|
2957
|
+
/** Minutes between the times of the list, from midnight (1–720). */
|
|
2958
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2959
|
+
/** Adds a seconds part; the value becomes 'HH:mm:ss'. */
|
|
2960
|
+
readonly seconds: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2961
|
+
/** Forces a 12-hour (`h12`, with AM/PM) or 24-hour (`h23`) clock; unset follows the locale. */
|
|
2962
|
+
readonly hourCycle: import("@angular/core").InputSignal<BfTimeInputHourCycle | undefined>;
|
|
2963
|
+
/** `list` adds the button that opens the list of times; `none` keeps the field typed only. */
|
|
2964
|
+
readonly picker: import("@angular/core").InputSignal<BfTimeInputPicker>;
|
|
2965
|
+
/** Renders the platform's time picker (`input type="time"`) under a coarse pointer (touch). */
|
|
2966
|
+
readonly native: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2967
|
+
/** BCP 47 locale of the part order, the separators, the clock and the AM/PM names; empty
|
|
2968
|
+
* follows the document's `lang`, else English. */
|
|
2969
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
2970
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`
|
|
2971
|
+
* by default). */
|
|
2972
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
2973
|
+
/** Visible label above the field. */
|
|
2974
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2975
|
+
/** Accessible name when no visible label is rendered. Ignored when `label` is set. */
|
|
2976
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
2977
|
+
/** Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when
|
|
2978
|
+
* `label` is set. */
|
|
2979
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
2980
|
+
/** Helper text under the field. */
|
|
2981
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
2982
|
+
/** Explicit error text; takes precedence over the field's own errors and Signal Forms errors. */
|
|
2983
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
2984
|
+
/** Disables the field and its list button. */
|
|
2985
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2986
|
+
/** Shows the time but blocks changes; the parts stay focusable and expose `aria-readonly`. */
|
|
2987
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2988
|
+
/** Marks the field required. */
|
|
2989
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2990
|
+
/** Field validity from Signal Forms. */
|
|
2991
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2992
|
+
/** Whether the user has left the field. */
|
|
2993
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2994
|
+
/** Validation errors from Signal Forms. */
|
|
2995
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
2996
|
+
/** Native name attribute of the platform input (`native` under a coarse pointer). */
|
|
2997
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
2998
|
+
/** Field id; generated when not set. */
|
|
2999
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
3000
|
+
/** Emitted with the new time right after a user change: `null` once it is cleared or incomplete. */
|
|
3001
|
+
readonly changed: import("@angular/core").OutputEmitterRef<string | null>;
|
|
3002
|
+
/** Emitted when focus leaves the field (not into its list), so Signal Forms marks it touched. */
|
|
3003
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
3004
|
+
private readonly field;
|
|
3005
|
+
/**
|
|
3006
|
+
* Focuses the first empty part (else the first part); Signal Forms calls it from
|
|
3007
|
+
* `focusBoundControl()`.
|
|
3008
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
3009
|
+
*/
|
|
3010
|
+
focus(options?: FocusOptions): void;
|
|
3011
|
+
/** Opens the list of times; does nothing without a picker, or while disabled or read-only. */
|
|
3012
|
+
openPicker(): void;
|
|
3013
|
+
/** Closes the list of times, focus back on its button; does nothing while it is closed. */
|
|
3014
|
+
closePicker(): void;
|
|
3015
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTimeInputComponent, never>;
|
|
3016
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTimeInputComponent, "bf-time-input", never, {
|
|
3017
|
+
"value": {
|
|
3018
|
+
"alias": "value";
|
|
3019
|
+
"required": false;
|
|
3020
|
+
"isSignal": true;
|
|
3021
|
+
};
|
|
3022
|
+
"min": {
|
|
3023
|
+
"alias": "min";
|
|
3024
|
+
"required": false;
|
|
3025
|
+
"isSignal": true;
|
|
3026
|
+
};
|
|
3027
|
+
"max": {
|
|
3028
|
+
"alias": "max";
|
|
3029
|
+
"required": false;
|
|
3030
|
+
"isSignal": true;
|
|
3031
|
+
};
|
|
3032
|
+
"step": {
|
|
3033
|
+
"alias": "step";
|
|
3034
|
+
"required": false;
|
|
3035
|
+
"isSignal": true;
|
|
3036
|
+
};
|
|
3037
|
+
"seconds": {
|
|
3038
|
+
"alias": "seconds";
|
|
3039
|
+
"required": false;
|
|
3040
|
+
"isSignal": true;
|
|
3041
|
+
};
|
|
3042
|
+
"hourCycle": {
|
|
3043
|
+
"alias": "hourCycle";
|
|
3044
|
+
"required": false;
|
|
3045
|
+
"isSignal": true;
|
|
3046
|
+
};
|
|
3047
|
+
"picker": {
|
|
3048
|
+
"alias": "picker";
|
|
3049
|
+
"required": false;
|
|
3050
|
+
"isSignal": true;
|
|
3051
|
+
};
|
|
3052
|
+
"native": {
|
|
3053
|
+
"alias": "native";
|
|
3054
|
+
"required": false;
|
|
3055
|
+
"isSignal": true;
|
|
3056
|
+
};
|
|
3057
|
+
"locale": {
|
|
3058
|
+
"alias": "locale";
|
|
3059
|
+
"required": false;
|
|
3060
|
+
"isSignal": true;
|
|
3061
|
+
};
|
|
3062
|
+
"size": {
|
|
3063
|
+
"alias": "size";
|
|
3064
|
+
"required": false;
|
|
3065
|
+
"isSignal": true;
|
|
3066
|
+
};
|
|
3067
|
+
"label": {
|
|
3068
|
+
"alias": "label";
|
|
3069
|
+
"required": false;
|
|
3070
|
+
"isSignal": true;
|
|
3071
|
+
};
|
|
3072
|
+
"ariaLabel": {
|
|
3073
|
+
"alias": "ariaLabel";
|
|
3074
|
+
"required": false;
|
|
3075
|
+
"isSignal": true;
|
|
3076
|
+
};
|
|
3077
|
+
"ariaLabelledby": {
|
|
3078
|
+
"alias": "ariaLabelledby";
|
|
3079
|
+
"required": false;
|
|
3080
|
+
"isSignal": true;
|
|
3081
|
+
};
|
|
3082
|
+
"helpText": {
|
|
3083
|
+
"alias": "helpText";
|
|
3084
|
+
"required": false;
|
|
3085
|
+
"isSignal": true;
|
|
3086
|
+
};
|
|
3087
|
+
"errorMessage": {
|
|
3088
|
+
"alias": "errorMessage";
|
|
3089
|
+
"required": false;
|
|
3090
|
+
"isSignal": true;
|
|
3091
|
+
};
|
|
3092
|
+
"disabled": {
|
|
3093
|
+
"alias": "disabled";
|
|
3094
|
+
"required": false;
|
|
3095
|
+
"isSignal": true;
|
|
3096
|
+
};
|
|
3097
|
+
"readonly": {
|
|
3098
|
+
"alias": "readonly";
|
|
3099
|
+
"required": false;
|
|
3100
|
+
"isSignal": true;
|
|
3101
|
+
};
|
|
3102
|
+
"required": {
|
|
3103
|
+
"alias": "required";
|
|
3104
|
+
"required": false;
|
|
3105
|
+
"isSignal": true;
|
|
3106
|
+
};
|
|
3107
|
+
"invalid": {
|
|
3108
|
+
"alias": "invalid";
|
|
3109
|
+
"required": false;
|
|
3110
|
+
"isSignal": true;
|
|
3111
|
+
};
|
|
3112
|
+
"touched": {
|
|
3113
|
+
"alias": "touched";
|
|
3114
|
+
"required": false;
|
|
3115
|
+
"isSignal": true;
|
|
3116
|
+
};
|
|
3117
|
+
"errors": {
|
|
3118
|
+
"alias": "errors";
|
|
3119
|
+
"required": false;
|
|
3120
|
+
"isSignal": true;
|
|
3121
|
+
};
|
|
3122
|
+
"name": {
|
|
3123
|
+
"alias": "name";
|
|
3124
|
+
"required": false;
|
|
3125
|
+
"isSignal": true;
|
|
3126
|
+
};
|
|
3127
|
+
"id": {
|
|
3128
|
+
"alias": "id";
|
|
3129
|
+
"required": false;
|
|
3130
|
+
"isSignal": true;
|
|
3131
|
+
};
|
|
3132
|
+
}, {
|
|
3133
|
+
"value": "valueChange";
|
|
3134
|
+
"changed": "changed";
|
|
3135
|
+
"touch": "touch";
|
|
3136
|
+
}, never, never, true, never>;
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* How `bf-datetime-input` picks a date and time besides typing: `popover` adds a button that
|
|
3140
|
+
* opens a calendar and a list of times side by side, `none` keeps the field typed only.
|
|
3141
|
+
*
|
|
3142
|
+
* @summary Whether a date and time input offers a calendar and time list popover
|
|
3143
|
+
* @since 0.3.1
|
|
3144
|
+
*/
|
|
3145
|
+
type BfDateTimeInputPicker = 'popover' | 'none';
|
|
3146
|
+
/**
|
|
3147
|
+
* Date and time field typed part by part, with a popover holding a calendar and a list of
|
|
3148
|
+
* times, valued as a local ISO date and time without a zone.
|
|
3149
|
+
*
|
|
3150
|
+
* @example
|
|
3151
|
+
* <bf-datetime-input label="Meeting" [step]="15" [(value)]="meeting" />
|
|
3152
|
+
* <bf-datetime-input label="Publish at" [formField]="post.publishAt" />
|
|
3153
|
+
* @summary Typed date and time field with a calendar and time list in one popover
|
|
3154
|
+
* @category Forms
|
|
3155
|
+
* @since 0.3.1
|
|
3156
|
+
*/
|
|
3157
|
+
export declare class BfDateTimeInputComponent implements FormValueControl<string | null> {
|
|
3158
|
+
/** The local date and time as an ISO string without a zone ('YYYY-MM-DDTHH:mm'), `null` while
|
|
3159
|
+
* empty or incomplete; two-way bindable and bound by `[formField]`. */
|
|
3160
|
+
readonly value: import("@angular/core").ModelSignal<string | null>;
|
|
3161
|
+
/** The earliest valid date and time ('YYYY-MM-DDTHH:mm'): earlier values show an error, and the
|
|
3162
|
+
* calendar and the list stop there. */
|
|
3163
|
+
readonly min: import("@angular/core").InputSignal<string | undefined>;
|
|
3164
|
+
/** The latest valid date and time ('YYYY-MM-DDTHH:mm'): later values show an error, and the
|
|
3165
|
+
* calendar and the list stop there. */
|
|
3166
|
+
readonly max: import("@angular/core").InputSignal<string | undefined>;
|
|
3167
|
+
/** Rules out more dates (weekends, booked days): disabled in the calendar, an error when typed. */
|
|
3168
|
+
readonly disabledDate: import("@angular/core").InputSignal<BfCalendarDisabledDate | null>;
|
|
3169
|
+
/** Minutes between the times of the list, from midnight (1–720). */
|
|
3170
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
3171
|
+
/** Forces a 12-hour (`h12`, with AM/PM) or 24-hour (`h23`) clock; unset follows the locale. */
|
|
3172
|
+
readonly hourCycle: import("@angular/core").InputSignal<BfTimeInputHourCycle | undefined>;
|
|
3173
|
+
/** `popover` adds the button that opens the calendar and the time list; `none` keeps the field
|
|
3174
|
+
* typed only. */
|
|
3175
|
+
readonly picker: import("@angular/core").InputSignal<BfDateTimeInputPicker>;
|
|
3176
|
+
/** Renders the platform's picker (`input type="datetime-local"`) under a coarse pointer (touch). */
|
|
3177
|
+
readonly native: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3178
|
+
/** BCP 47 locale of the part order, the separators, the clock and the calendar; empty follows
|
|
3179
|
+
* the document's `lang`, else English. */
|
|
3180
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
3181
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`
|
|
3182
|
+
* by default). */
|
|
3183
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
3184
|
+
/** Visible label above the field. */
|
|
3185
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
3186
|
+
/** Accessible name when no visible label is rendered. Ignored when `label` is set. */
|
|
3187
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
3188
|
+
/** Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when
|
|
3189
|
+
* `label` is set. */
|
|
3190
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
3191
|
+
/** Helper text under the field. */
|
|
3192
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
3193
|
+
/** Explicit error text; takes precedence over the field's own errors and Signal Forms errors. */
|
|
3194
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
3195
|
+
/** Disables the field and its picker button. */
|
|
3196
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3197
|
+
/** Shows the value but blocks changes; the parts stay focusable and expose `aria-readonly`. */
|
|
3198
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3199
|
+
/** Marks the field required. */
|
|
3200
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3201
|
+
/** Field validity from Signal Forms. */
|
|
3202
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3203
|
+
/** Whether the user has left the field. */
|
|
3204
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3205
|
+
/** Validation errors from Signal Forms. */
|
|
3206
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
3207
|
+
/** Native name attribute of the platform input (`native` under a coarse pointer). */
|
|
3208
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
3209
|
+
/** Field id; generated when not set. */
|
|
3210
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
3211
|
+
/** Emitted with the new value right after a user change: `null` once it is cleared or
|
|
3212
|
+
* incomplete. */
|
|
3213
|
+
readonly changed: import("@angular/core").OutputEmitterRef<string | null>;
|
|
3214
|
+
/** Emitted when focus leaves the field (not into its popover), so Signal Forms marks it touched. */
|
|
3215
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
3216
|
+
private readonly field;
|
|
3217
|
+
/**
|
|
3218
|
+
* Focuses the first empty part (else the first part); Signal Forms calls it from
|
|
3219
|
+
* `focusBoundControl()`.
|
|
3220
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
3221
|
+
*/
|
|
3222
|
+
focus(options?: FocusOptions): void;
|
|
3223
|
+
/** Opens the calendar and time popover; does nothing without a picker, or while disabled or
|
|
3224
|
+
* read-only. */
|
|
3225
|
+
openPicker(): void;
|
|
3226
|
+
/** Closes the popover, focus back on its button; does nothing while it is closed. */
|
|
3227
|
+
closePicker(): void;
|
|
3228
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfDateTimeInputComponent, never>;
|
|
3229
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfDateTimeInputComponent, "bf-datetime-input", never, {
|
|
3230
|
+
"value": {
|
|
3231
|
+
"alias": "value";
|
|
3232
|
+
"required": false;
|
|
3233
|
+
"isSignal": true;
|
|
3234
|
+
};
|
|
3235
|
+
"min": {
|
|
3236
|
+
"alias": "min";
|
|
3237
|
+
"required": false;
|
|
3238
|
+
"isSignal": true;
|
|
3239
|
+
};
|
|
3240
|
+
"max": {
|
|
3241
|
+
"alias": "max";
|
|
3242
|
+
"required": false;
|
|
3243
|
+
"isSignal": true;
|
|
3244
|
+
};
|
|
3245
|
+
"disabledDate": {
|
|
3246
|
+
"alias": "disabledDate";
|
|
3247
|
+
"required": false;
|
|
3248
|
+
"isSignal": true;
|
|
3249
|
+
};
|
|
3250
|
+
"step": {
|
|
3251
|
+
"alias": "step";
|
|
3252
|
+
"required": false;
|
|
3253
|
+
"isSignal": true;
|
|
3254
|
+
};
|
|
3255
|
+
"hourCycle": {
|
|
3256
|
+
"alias": "hourCycle";
|
|
3257
|
+
"required": false;
|
|
3258
|
+
"isSignal": true;
|
|
3259
|
+
};
|
|
3260
|
+
"picker": {
|
|
3261
|
+
"alias": "picker";
|
|
3262
|
+
"required": false;
|
|
3263
|
+
"isSignal": true;
|
|
3264
|
+
};
|
|
3265
|
+
"native": {
|
|
3266
|
+
"alias": "native";
|
|
3267
|
+
"required": false;
|
|
3268
|
+
"isSignal": true;
|
|
3269
|
+
};
|
|
3270
|
+
"locale": {
|
|
3271
|
+
"alias": "locale";
|
|
3272
|
+
"required": false;
|
|
3273
|
+
"isSignal": true;
|
|
3274
|
+
};
|
|
3275
|
+
"size": {
|
|
3276
|
+
"alias": "size";
|
|
3277
|
+
"required": false;
|
|
3278
|
+
"isSignal": true;
|
|
3279
|
+
};
|
|
3280
|
+
"label": {
|
|
3281
|
+
"alias": "label";
|
|
3282
|
+
"required": false;
|
|
3283
|
+
"isSignal": true;
|
|
3284
|
+
};
|
|
3285
|
+
"ariaLabel": {
|
|
3286
|
+
"alias": "ariaLabel";
|
|
3287
|
+
"required": false;
|
|
3288
|
+
"isSignal": true;
|
|
3289
|
+
};
|
|
3290
|
+
"ariaLabelledby": {
|
|
3291
|
+
"alias": "ariaLabelledby";
|
|
3292
|
+
"required": false;
|
|
3293
|
+
"isSignal": true;
|
|
3294
|
+
};
|
|
3295
|
+
"helpText": {
|
|
3296
|
+
"alias": "helpText";
|
|
3297
|
+
"required": false;
|
|
3298
|
+
"isSignal": true;
|
|
3299
|
+
};
|
|
3300
|
+
"errorMessage": {
|
|
3301
|
+
"alias": "errorMessage";
|
|
3302
|
+
"required": false;
|
|
3303
|
+
"isSignal": true;
|
|
3304
|
+
};
|
|
3305
|
+
"disabled": {
|
|
3306
|
+
"alias": "disabled";
|
|
3307
|
+
"required": false;
|
|
3308
|
+
"isSignal": true;
|
|
3309
|
+
};
|
|
3310
|
+
"readonly": {
|
|
3311
|
+
"alias": "readonly";
|
|
3312
|
+
"required": false;
|
|
3313
|
+
"isSignal": true;
|
|
3314
|
+
};
|
|
3315
|
+
"required": {
|
|
3316
|
+
"alias": "required";
|
|
3317
|
+
"required": false;
|
|
3318
|
+
"isSignal": true;
|
|
3319
|
+
};
|
|
3320
|
+
"invalid": {
|
|
3321
|
+
"alias": "invalid";
|
|
3322
|
+
"required": false;
|
|
3323
|
+
"isSignal": true;
|
|
3324
|
+
};
|
|
3325
|
+
"touched": {
|
|
3326
|
+
"alias": "touched";
|
|
3327
|
+
"required": false;
|
|
3328
|
+
"isSignal": true;
|
|
3329
|
+
};
|
|
3330
|
+
"errors": {
|
|
3331
|
+
"alias": "errors";
|
|
3332
|
+
"required": false;
|
|
3333
|
+
"isSignal": true;
|
|
3334
|
+
};
|
|
3335
|
+
"name": {
|
|
3336
|
+
"alias": "name";
|
|
3337
|
+
"required": false;
|
|
3338
|
+
"isSignal": true;
|
|
3339
|
+
};
|
|
3340
|
+
"id": {
|
|
3341
|
+
"alias": "id";
|
|
3342
|
+
"required": false;
|
|
3343
|
+
"isSignal": true;
|
|
3344
|
+
};
|
|
3345
|
+
}, {
|
|
3346
|
+
"value": "valueChange";
|
|
3347
|
+
"changed": "changed";
|
|
3348
|
+
"touch": "touch";
|
|
3349
|
+
}, never, never, true, never>;
|
|
3350
|
+
}
|
|
3351
|
+
export { type BfComboboxFilter, type BfComboboxOption, type BfConfirmButton, type BfConfirmButtonRole, type BfConfirmOptions, type BfConfirmSize, type BfDateInputPicker, type BfDateTimeInputPicker, type BfDesktopToastConfig, type BfDesktopToastOptions, type BfDesktopToastPosition, type BfDialogConfig, type BfDialogRole, type BfDialogSize, type BfDialogTemplateContext, type BfMenuButtonVariant, type BfMenuPlacement, type BfOverlayAutoFocus, type BfOverlayController, type BfOverlayHost, type BfOverlayOptions, type BfOverlayPlacement, type BfOverlayPosition, type BfOverlayRole, type BfOverlayStackOptions, type BfOverlayTemplateContext, type BfPopoverPlacement, type BfSidePanelConfig, type BfSidePanelTemplateContext, type BfSidePanelWidth, type BfStackedOverlay, type BfTimeInputHourCycle, type BfTimeInputPicker, type BfToastAction, type BfToastController, type BfToastDismissReason, type BfTooltipPlacement, type ɵBfToastHandle, type ɵBfToastPresenter, type ɵBfToastQueueOptions, type ɵBfToastRequest, type ɵBfToastView, labelPanelByHeading as ɵlabelPanelByHeading, watchPanelHeading as ɵwatchPanelHeading };
|