@bitforgehq/ui 0.3.0 → 0.3.2
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 +598 -0
- package/README.md +18 -11
- package/ai/MANIFEST.index.json +306 -0
- package/ai/MANIFEST.json +8915 -3788
- package/ai/REFERENCE.index.json +476 -0
- package/ai/REFERENCE.json +5810 -2905
- package/ai/UI_GUIDE.md +212 -58
- package/ai/components/app-frame.md +328 -0
- 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 +119 -4
- 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/empty-state.md +99 -6
- package/ai/components/header.md +71 -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-toggle.md +287 -0
- package/ai/components/sidebar.md +541 -0
- package/ai/components/skeleton.md +215 -0
- package/ai/components/sparkline.md +188 -0
- package/ai/components/stat.md +297 -0
- package/ai/components/tab-group.md +226 -0
- package/ai/components/tab-panel.md +163 -0
- package/ai/components/table.md +697 -0
- package/ai/components/tabs.md +46 -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 +354 -0
- package/ai/components/tooltip.md +230 -0
- package/ai/components/top-nav.md +159 -0
- package/ai/reference/bf-app-frame-breakpoint.md +27 -0
- package/ai/reference/bf-app-frame-content-width.md +29 -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-empty-state-heading-level.md +1 -1
- package/ai/reference/bf-empty-state-heading.md +33 -0
- package/ai/reference/bf-labels.md +73 -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-sidebar-state-service.md +21 -0
- package/ai/reference/bf-sidebar-toggle-harness.md +32 -0
- package/ai/reference/bf-size.md +13 -0
- package/ai/reference/bf-skeleton-shape.md +28 -0
- package/ai/reference/bf-stat-appearance.md +33 -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-table-stack.md +29 -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_sidebar_state_storage.md +20 -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 +13 -4
- package/ai/reference/provide-bf-sidebar-state.md +20 -0
- package/ai/reference/slide-in-from-end.md +24 -0
- package/ai/reference/slide-out-to-end.md +24 -0
- package/bin/bf-ui.js +433 -3
- 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 +6566 -38
- package/fesm2022/bitforgehq-ui-overlay.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +634 -1
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +5708 -137
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +26766 -14470
- package/llms.txt +106 -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 +1895 -7
- package/types/bitforgehq-ui-testing.d.ts +782 -1
- package/types/bitforgehq-ui.d.ts +2393 -45
package/types/bitforgehq-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ElementRef, EnvironmentProviders, InjectionToken, Provider, Signal } from "@angular/core";
|
|
2
|
+
import { ElementRef, EnvironmentProviders, InjectionToken, Provider, Signal, TemplateRef } from "@angular/core";
|
|
3
3
|
import { FormCheckboxControl, FormValueControl, ValidationError } from "@angular/forms/signals";
|
|
4
4
|
/**
|
|
5
5
|
* The one control-height scale: sm 32 px, md 40 px, lg 48 px.
|
|
@@ -201,7 +201,7 @@ interface BfLabels {
|
|
|
201
201
|
*/
|
|
202
202
|
readonly refreshing: string;
|
|
203
203
|
/**
|
|
204
|
-
* bf-dialog's close button, and bf-sheet's screen-reader Close.
|
|
204
|
+
* bf-dialog's and bf-side-panel's close button, and bf-sheet's screen-reader Close.
|
|
205
205
|
* @default 'Close'
|
|
206
206
|
*/
|
|
207
207
|
readonly close: string;
|
|
@@ -222,7 +222,7 @@ interface BfLabels {
|
|
|
222
222
|
*/
|
|
223
223
|
readonly sheetPosition: (position: number, count: number) => string;
|
|
224
224
|
/**
|
|
225
|
-
* A dialog's name without an ariaLabel, a
|
|
225
|
+
* A dialog's or side panel's name without an ariaLabel, a title or a heading.
|
|
226
226
|
* @default 'Dialog'
|
|
227
227
|
*/
|
|
228
228
|
readonly dialog: string;
|
|
@@ -231,6 +231,282 @@ interface BfLabels {
|
|
|
231
231
|
* @default 'Notifications'
|
|
232
232
|
*/
|
|
233
233
|
readonly notifications: string;
|
|
234
|
+
/**
|
|
235
|
+
* bf-table's header checkbox, which selects or clears every row.
|
|
236
|
+
* @default 'Select all rows'
|
|
237
|
+
*/
|
|
238
|
+
readonly tableSelectAll: string;
|
|
239
|
+
/**
|
|
240
|
+
* The label of a stacked bf-table's sort select.
|
|
241
|
+
* @default 'Sort by'
|
|
242
|
+
*/
|
|
243
|
+
readonly tableSortBy: string;
|
|
244
|
+
/**
|
|
245
|
+
* A stacked bf-table's sort option for a column in ascending order.
|
|
246
|
+
* @default (column) => `${column}, ascending`
|
|
247
|
+
*/
|
|
248
|
+
readonly tableSortAscending: (column: string) => string;
|
|
249
|
+
/**
|
|
250
|
+
* A stacked bf-table's sort option for a column in descending order.
|
|
251
|
+
* @default (column) => `${column}, descending`
|
|
252
|
+
*/
|
|
253
|
+
readonly tableSortDescending: (column: string) => string;
|
|
254
|
+
/**
|
|
255
|
+
* bf-theme-switch's and bf-theme-menu-button's name without a label.
|
|
256
|
+
* @default 'Theme'
|
|
257
|
+
*/
|
|
258
|
+
readonly theme: string;
|
|
259
|
+
/**
|
|
260
|
+
* The theme choice that follows the system's colour scheme.
|
|
261
|
+
* @default 'System'
|
|
262
|
+
*/
|
|
263
|
+
readonly themeSystem: string;
|
|
264
|
+
/**
|
|
265
|
+
* The theme choice that forces the light colour scheme.
|
|
266
|
+
* @default 'Light'
|
|
267
|
+
*/
|
|
268
|
+
readonly themeLight: string;
|
|
269
|
+
/**
|
|
270
|
+
* The theme choice that forces the dark colour scheme.
|
|
271
|
+
* @default 'Dark'
|
|
272
|
+
*/
|
|
273
|
+
readonly themeDark: string;
|
|
274
|
+
/**
|
|
275
|
+
* bf-breadcrumb's navigation name.
|
|
276
|
+
* @default 'Breadcrumb'
|
|
277
|
+
*/
|
|
278
|
+
readonly breadcrumb: string;
|
|
279
|
+
/**
|
|
280
|
+
* bf-breadcrumb's ellipsis button, which shows the levels a `maxItems` trail hides.
|
|
281
|
+
* @default (count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`)
|
|
282
|
+
*/
|
|
283
|
+
readonly breadcrumbExpand: (count: number) => string;
|
|
284
|
+
/**
|
|
285
|
+
* bf-sidebar's and bf-top-nav's navigation name.
|
|
286
|
+
* @default 'Main'
|
|
287
|
+
*/
|
|
288
|
+
readonly navigation: string;
|
|
289
|
+
/**
|
|
290
|
+
* a[bfNavItem]'s announcement of its count badge.
|
|
291
|
+
* @default (count) => `${count} new`
|
|
292
|
+
*/
|
|
293
|
+
readonly navBadge: (count: number) => string;
|
|
294
|
+
/**
|
|
295
|
+
* bf-sidebar-toggle's name and tooltip while the sidebar is expanded.
|
|
296
|
+
* @default 'Collapse sidebar'
|
|
297
|
+
*/
|
|
298
|
+
readonly sidebarCollapse: string;
|
|
299
|
+
/**
|
|
300
|
+
* bf-sidebar-toggle's name and tooltip while the sidebar is an icon rail.
|
|
301
|
+
* @default 'Expand sidebar'
|
|
302
|
+
*/
|
|
303
|
+
readonly sidebarExpand: string;
|
|
304
|
+
/**
|
|
305
|
+
* bf-app-frame's skip link, the first stop of the tab order, which moves focus to the content.
|
|
306
|
+
* @default 'Skip to main content'
|
|
307
|
+
*/
|
|
308
|
+
readonly skipToContent: string;
|
|
309
|
+
/**
|
|
310
|
+
* bf-pagination's navigation name.
|
|
311
|
+
* @default 'Pagination'
|
|
312
|
+
*/
|
|
313
|
+
readonly pagination: string;
|
|
314
|
+
/**
|
|
315
|
+
* bf-pagination's button to the previous page.
|
|
316
|
+
* @default 'Previous page'
|
|
317
|
+
*/
|
|
318
|
+
readonly previousPage: string;
|
|
319
|
+
/**
|
|
320
|
+
* bf-pagination's button to the next page.
|
|
321
|
+
* @default 'Next page'
|
|
322
|
+
*/
|
|
323
|
+
readonly nextPage: string;
|
|
324
|
+
/**
|
|
325
|
+
* bf-pagination's compact position text, such as "Page 3 of 12".
|
|
326
|
+
* @default (page, count) => `Page ${page} of ${count}`
|
|
327
|
+
*/
|
|
328
|
+
readonly pageOf: (page: number, count: number) => string;
|
|
329
|
+
/**
|
|
330
|
+
* bf-pagination's name of one page button, such as "Page 3".
|
|
331
|
+
* @default (page) => `Page ${page}`
|
|
332
|
+
*/
|
|
333
|
+
readonly goToPage: (page: number) => string;
|
|
334
|
+
/**
|
|
335
|
+
* bf-tab-group's tablist name.
|
|
336
|
+
* @default 'Tabs'
|
|
337
|
+
*/
|
|
338
|
+
readonly tabGroup: string;
|
|
339
|
+
/**
|
|
340
|
+
* bf-calendar's button that shows the previous month.
|
|
341
|
+
* @default 'Previous month'
|
|
342
|
+
*/
|
|
343
|
+
readonly calendarPreviousMonth: string;
|
|
344
|
+
/**
|
|
345
|
+
* bf-calendar's button that shows the next month.
|
|
346
|
+
* @default 'Next month'
|
|
347
|
+
*/
|
|
348
|
+
readonly calendarNextMonth: string;
|
|
349
|
+
/**
|
|
350
|
+
* bf-calendar's title button in the day view, which opens the month view; read after the
|
|
351
|
+
* visible month and year.
|
|
352
|
+
* @default 'Choose month'
|
|
353
|
+
*/
|
|
354
|
+
readonly calendarChooseMonth: string;
|
|
355
|
+
/**
|
|
356
|
+
* bf-calendar's title button in the month view, which opens the year view; read after the
|
|
357
|
+
* visible year.
|
|
358
|
+
* @default 'Choose year'
|
|
359
|
+
*/
|
|
360
|
+
readonly calendarChooseYear: string;
|
|
361
|
+
/**
|
|
362
|
+
* bf-stat's hidden direction word before an upward delta, so colour is never the only signal.
|
|
363
|
+
* @default 'Up'
|
|
364
|
+
*/
|
|
365
|
+
readonly statTrendUp: string;
|
|
366
|
+
/**
|
|
367
|
+
* bf-stat's hidden direction word before a downward delta.
|
|
368
|
+
* @default 'Down'
|
|
369
|
+
*/
|
|
370
|
+
readonly statTrendDown: string;
|
|
371
|
+
/**
|
|
372
|
+
* bf-stat's hidden direction word before an unchanged (flat) delta.
|
|
373
|
+
* @default 'No change'
|
|
374
|
+
*/
|
|
375
|
+
readonly statTrendFlat: string;
|
|
376
|
+
/**
|
|
377
|
+
* bf-combobox's and bf-multi-combobox's list row when no option matches the typed text.
|
|
378
|
+
* @default 'No results'
|
|
379
|
+
*/
|
|
380
|
+
readonly comboboxEmpty: string;
|
|
381
|
+
/**
|
|
382
|
+
* bf-multi-combobox's remove button on a picked value's tag.
|
|
383
|
+
* @default (label) => `Remove ${label}`
|
|
384
|
+
*/
|
|
385
|
+
readonly comboboxRemove: (label: string) => string;
|
|
386
|
+
/**
|
|
387
|
+
* The day part of bf-date-input and bf-datetime-input; its first letter is the part's
|
|
388
|
+
* placeholder ("dd").
|
|
389
|
+
* @default 'Day'
|
|
390
|
+
*/
|
|
391
|
+
readonly dateInputDay: string;
|
|
392
|
+
/**
|
|
393
|
+
* The month part of bf-date-input and bf-datetime-input; its first letter is the part's
|
|
394
|
+
* placeholder ("mm").
|
|
395
|
+
* @default 'Month'
|
|
396
|
+
*/
|
|
397
|
+
readonly dateInputMonth: string;
|
|
398
|
+
/**
|
|
399
|
+
* The year part of bf-date-input and bf-datetime-input; its first letter is the part's
|
|
400
|
+
* placeholder ("yyyy").
|
|
401
|
+
* @default 'Year'
|
|
402
|
+
*/
|
|
403
|
+
readonly dateInputYear: string;
|
|
404
|
+
/**
|
|
405
|
+
* The button of bf-date-input and bf-datetime-input that opens the calendar, and the panel's name.
|
|
406
|
+
* @default 'Choose date'
|
|
407
|
+
*/
|
|
408
|
+
readonly dateInputOpenCalendar: string;
|
|
409
|
+
/**
|
|
410
|
+
* The error of bf-date-input and bf-datetime-input while the date is incomplete or does not
|
|
411
|
+
* exist (31 February).
|
|
412
|
+
* @default 'Enter a valid date'
|
|
413
|
+
*/
|
|
414
|
+
readonly dateInputInvalid: string;
|
|
415
|
+
/**
|
|
416
|
+
* The error of bf-date-input and bf-datetime-input for a typed date that `disabledDate` rules out.
|
|
417
|
+
* @default 'This date is not available'
|
|
418
|
+
*/
|
|
419
|
+
readonly dateInputUnavailable: string;
|
|
420
|
+
/**
|
|
421
|
+
* The hour part of bf-time-input and bf-datetime-input; its first letter is the part's
|
|
422
|
+
* placeholder ("hh").
|
|
423
|
+
* @default 'Hour'
|
|
424
|
+
*/
|
|
425
|
+
readonly timeInputHour: string;
|
|
426
|
+
/**
|
|
427
|
+
* The minute part of bf-time-input and bf-datetime-input; its first letter is the part's
|
|
428
|
+
* placeholder ("mm").
|
|
429
|
+
* @default 'Minute'
|
|
430
|
+
*/
|
|
431
|
+
readonly timeInputMinute: string;
|
|
432
|
+
/**
|
|
433
|
+
* The second part of bf-time-input with `seconds`; its first letter is the part's placeholder
|
|
434
|
+
* ("ss").
|
|
435
|
+
* @default 'Second'
|
|
436
|
+
*/
|
|
437
|
+
readonly timeInputSecond: string;
|
|
438
|
+
/**
|
|
439
|
+
* The AM/PM part of bf-time-input and bf-datetime-input under a 12-hour clock.
|
|
440
|
+
* @default 'AM/PM'
|
|
441
|
+
*/
|
|
442
|
+
readonly timeInputDayPeriod: string;
|
|
443
|
+
/**
|
|
444
|
+
* The button of bf-time-input that opens the list of times, and the list's name.
|
|
445
|
+
* @default 'Choose time'
|
|
446
|
+
*/
|
|
447
|
+
readonly timeInputOpenList: string;
|
|
448
|
+
/**
|
|
449
|
+
* The error of bf-time-input and bf-datetime-input while the time is incomplete.
|
|
450
|
+
* @default 'Enter a valid time'
|
|
451
|
+
*/
|
|
452
|
+
readonly timeInputInvalid: string;
|
|
453
|
+
/**
|
|
454
|
+
* The error of bf-time-input and bf-datetime-input below `min`, given the limit as the locale
|
|
455
|
+
* writes it.
|
|
456
|
+
* @default (time) => `Pick ${time} or later`
|
|
457
|
+
*/
|
|
458
|
+
readonly timeInputMin: (time: string) => string;
|
|
459
|
+
/**
|
|
460
|
+
* The error of bf-time-input and bf-datetime-input above `max`, given the limit as the locale
|
|
461
|
+
* writes it.
|
|
462
|
+
* @default (time) => `Pick ${time} or earlier`
|
|
463
|
+
*/
|
|
464
|
+
readonly timeInputMax: (time: string) => string;
|
|
465
|
+
/**
|
|
466
|
+
* The name of a chart from `@bitforgehq/ui/charts` that has no `label` (and no `bf-chart-card` title).
|
|
467
|
+
* @default 'Chart'
|
|
468
|
+
*/
|
|
469
|
+
readonly chart: string;
|
|
470
|
+
/**
|
|
471
|
+
* The name of a chart's legend, the group of buttons that show and hide its series.
|
|
472
|
+
* @default 'Legend'
|
|
473
|
+
*/
|
|
474
|
+
readonly chartLegend: string;
|
|
475
|
+
/**
|
|
476
|
+
* The name of a chart's plot, the focusable area whose arrow keys move between the values.
|
|
477
|
+
* @default 'Data points, arrow keys move between them'
|
|
478
|
+
*/
|
|
479
|
+
readonly chartValues: string;
|
|
480
|
+
/**
|
|
481
|
+
* A chart's button that shows its data as a table.
|
|
482
|
+
* @default 'Show data'
|
|
483
|
+
*/
|
|
484
|
+
readonly chartShowData: string;
|
|
485
|
+
/**
|
|
486
|
+
* A chart's button that hides its data table again.
|
|
487
|
+
* @default 'Hide data'
|
|
488
|
+
*/
|
|
489
|
+
readonly chartHideData: string;
|
|
490
|
+
/**
|
|
491
|
+
* The first column header of a chart's data table.
|
|
492
|
+
* @default 'Category'
|
|
493
|
+
*/
|
|
494
|
+
readonly chartCategory: string;
|
|
495
|
+
/**
|
|
496
|
+
* The value column header of a bf-donut-chart's data table.
|
|
497
|
+
* @default 'Value'
|
|
498
|
+
*/
|
|
499
|
+
readonly chartValue: string;
|
|
500
|
+
/**
|
|
501
|
+
* bf-chart-card's text when it has no data and no `empty` slot.
|
|
502
|
+
* @default 'No data to show'
|
|
503
|
+
*/
|
|
504
|
+
readonly chartEmpty: string;
|
|
505
|
+
/**
|
|
506
|
+
* bf-chart-card's text when its data failed to load and it has no `error` slot.
|
|
507
|
+
* @default 'The data could not be loaded'
|
|
508
|
+
*/
|
|
509
|
+
readonly chartError: string;
|
|
234
510
|
/** Default error text per validator kind (see `BfValidationMessages`). */
|
|
235
511
|
readonly validation: BfValidationMessages;
|
|
236
512
|
}
|
|
@@ -261,10 +537,19 @@ export declare const BF_LABELS: InjectionToken<BfLabels>;
|
|
|
261
537
|
* Replaces built-in strings, merged over the parent's (validation merged key by key); a key left
|
|
262
538
|
* out or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers
|
|
263
539
|
* every string. In a component's `providers` it covers that sub-tree's widgets and form controls
|
|
264
|
-
* (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `
|
|
265
|
-
*
|
|
266
|
-
* `
|
|
267
|
-
*
|
|
540
|
+
* (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,
|
|
541
|
+
* `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,
|
|
542
|
+
* `breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,
|
|
543
|
+
* `skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,
|
|
544
|
+
* `calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,
|
|
545
|
+
* `statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,
|
|
546
|
+
* `dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,
|
|
547
|
+
* `dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,
|
|
548
|
+
* `timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,
|
|
549
|
+
* `chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,
|
|
550
|
+
* `chartValue`, `chartEmpty`, `chartError`, `validation`); the overlay services (`ok`, `cancel`,
|
|
551
|
+
* `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,
|
|
552
|
+
* `notifications`) are root singletons and pick it up only when the caller passes its injector:
|
|
268
553
|
* `open(…, { injector: inject(Injector) })`.
|
|
269
554
|
*
|
|
270
555
|
* @param overrides The strings to replace; any key left out keeps the parent's.
|
|
@@ -273,6 +558,145 @@ export declare const BF_LABELS: InjectionToken<BfLabels>;
|
|
|
273
558
|
* @since 0.3.0
|
|
274
559
|
*/
|
|
275
560
|
export declare function provideBfLabels(overrides: BfLabelsOverrides): Provider;
|
|
561
|
+
/**
|
|
562
|
+
* The app's colour scheme choice: follow the system, or force light or dark.
|
|
563
|
+
*
|
|
564
|
+
* @summary The colour scheme choice, following the system or forcing light or dark
|
|
565
|
+
* @since 0.3.1
|
|
566
|
+
*/
|
|
567
|
+
type BfColorScheme = 'system' | 'light' | 'dark';
|
|
568
|
+
/** The key-value store the choice is kept in: `getItem`/`setItem` of the Web Storage API. */
|
|
569
|
+
type BfColorSchemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
570
|
+
/**
|
|
571
|
+
* A store in memory, gone with the app: where `localStorage` is unavailable, and in tests.
|
|
572
|
+
* Internal: `provideBfShellTesting()` (`@bitforgehq/ui/mobile`) uses it through
|
|
573
|
+
* `ɵcreateMemoryColorSchemeStorage`.
|
|
574
|
+
*/
|
|
575
|
+
declare function createMemoryColorSchemeStorage(): BfColorSchemeStorage;
|
|
576
|
+
/** `localStorage`, or `null` where there is none or reading it throws (storage disabled, SSR).
|
|
577
|
+
* Internal: `BF_SIDEBAR_STATE_STORAGE` (`sidebar-state.ts`) falls back the same way. */
|
|
578
|
+
declare function browserStorage(): Storage | null;
|
|
579
|
+
/**
|
|
580
|
+
* Where `BfColorSchemeService` keeps the colour scheme choice (the key `bf-theme`): `localStorage`
|
|
581
|
+
* when it is available, otherwise an in-memory map. Provide another store (a native preferences
|
|
582
|
+
* plugin, or an in-memory one in tests) to keep the choice elsewhere. `BF_THEME_STORAGE` from
|
|
583
|
+
* `@bitforgehq/ui/mobile` is this same token.
|
|
584
|
+
*
|
|
585
|
+
* @example
|
|
586
|
+
* providers: [{ provide: BF_COLOR_SCHEME_STORAGE, useValue: sessionStorage }]
|
|
587
|
+
* @summary Injection token for the store that keeps the colour scheme choice between visits
|
|
588
|
+
* @since 0.3.1
|
|
589
|
+
*/
|
|
590
|
+
export declare const BF_COLOR_SCHEME_STORAGE: InjectionToken<Pick<Storage, "getItem" | "setItem">>;
|
|
591
|
+
/**
|
|
592
|
+
* The app's colour scheme: the user's choice (system, light, dark), kept in
|
|
593
|
+
* `BF_COLOR_SCHEME_STORAGE` under `bf-theme`, and whether the app is dark now. With
|
|
594
|
+
* `provideBfColorScheme()` (or `provideBfShell()` in a Capacitor app) it toggles the `dark` class
|
|
595
|
+
* on `<html>` and stores every change; `prefers-color-scheme` is the source under `system` and is
|
|
596
|
+
* followed live. Without either, the signals still compute but nothing is written, so a page that
|
|
597
|
+
* merely injects the service never fights the host page's own theme. Storage and the media query are read in the browser only, so a server render
|
|
598
|
+
* starts at `system`, light, and writes nothing. No Capacitor: a desktop web app uses it as is,
|
|
599
|
+
* and the shell's `BfPlatformService.theme` and `dark` are these same signals.
|
|
600
|
+
*
|
|
601
|
+
* @example
|
|
602
|
+
* private readonly colorScheme = inject(BfColorSchemeService);
|
|
603
|
+
* toggle(): void { this.colorScheme.scheme.set(this.colorScheme.dark() ? 'light' : 'dark'); }
|
|
604
|
+
* @summary The app colour scheme choice and dark state, applied to html and stored
|
|
605
|
+
* @since 0.3.1
|
|
606
|
+
*/
|
|
607
|
+
export declare class BfColorSchemeService {
|
|
608
|
+
private readonly document;
|
|
609
|
+
private readonly storage;
|
|
610
|
+
private readonly injector;
|
|
611
|
+
private readonly browser;
|
|
612
|
+
/** The user's choice, stored when `provideBfColorScheme()` is provided; set it with
|
|
613
|
+
* `scheme.set(…)`. */
|
|
614
|
+
readonly scheme: import("@angular/core").WritableSignal<BfColorScheme>;
|
|
615
|
+
private readonly prefersDark;
|
|
616
|
+
/** Whether the system prefers dark (`prefers-color-scheme: dark`), followed live. */
|
|
617
|
+
readonly systemDark: Signal<boolean>;
|
|
618
|
+
/** Whether the app is dark now: the choice, or the system's under `system`. */
|
|
619
|
+
readonly dark: Signal<boolean>;
|
|
620
|
+
private claimed;
|
|
621
|
+
constructor();
|
|
622
|
+
/**
|
|
623
|
+
* Makes this service own `<html>` and the store, once: called by `provideBfColorScheme()` and
|
|
624
|
+
* by the shell's `BfPlatformService`. Nothing is written on the server.
|
|
625
|
+
* @internal
|
|
626
|
+
*/
|
|
627
|
+
claimDocument(): void;
|
|
628
|
+
private followSystem;
|
|
629
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfColorSchemeService, never>;
|
|
630
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Lets `BfColorSchemeService` own the app's colour scheme: it toggles `dark` on `<html>`, follows
|
|
634
|
+
* `prefers-color-scheme` under `system` and stores the choice (key `bf-theme`). For a desktop web
|
|
635
|
+
* app; a Capacitor app gets it from `provideBfShell()`. Add it to `ApplicationConfig.providers`
|
|
636
|
+
* and switch with `inject(BfColorSchemeService).scheme.set('dark')`.
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* export const appConfig: ApplicationConfig = { providers: [provideBfColorScheme()] };
|
|
640
|
+
* @returns The providers that make the service own `<html>` and start it with the app.
|
|
641
|
+
* @summary Applies the stored colour scheme choice to html, for desktop web apps
|
|
642
|
+
* @since 0.3.1
|
|
643
|
+
*/
|
|
644
|
+
export declare function provideBfColorScheme(): EnvironmentProviders;
|
|
645
|
+
/**
|
|
646
|
+
* Where `BfSidebarStateService` keeps whether the sidebar is collapsed (the key
|
|
647
|
+
* `bf-sidebar-collapsed`, `'true'` or `'false'`): `localStorage` when it is available, otherwise
|
|
648
|
+
* an in-memory map. Provide another store (`sessionStorage`, or an in-memory one in tests) to keep
|
|
649
|
+
* it elsewhere.
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* providers: [{ provide: BF_SIDEBAR_STATE_STORAGE, useValue: sessionStorage }]
|
|
653
|
+
* @summary Injection token for the store that keeps the collapsed sidebar between visits
|
|
654
|
+
* @since 0.3.2
|
|
655
|
+
*/
|
|
656
|
+
export declare const BF_SIDEBAR_STATE_STORAGE: InjectionToken<Pick<Storage, "getItem" | "setItem">>;
|
|
657
|
+
/**
|
|
658
|
+
* Whether the app's `bf-sidebar` is collapsed to an icon rail, remembered between visits: the app
|
|
659
|
+
* binds the sidebar's `[(collapsed)]` to `sidebarState.collapsed`. With `provideBfSidebarState()`
|
|
660
|
+
* every change is stored in `BF_SIDEBAR_STATE_STORAGE` under `bf-sidebar-collapsed`; without it
|
|
661
|
+
* the signal still holds the state but nothing is written. Storage is read in the browser only, so a
|
|
662
|
+
* server render starts expanded and writes nothing. The widgets never inject it.
|
|
663
|
+
*
|
|
664
|
+
* @example
|
|
665
|
+
* protected readonly sidebarState = inject(BfSidebarStateService);
|
|
666
|
+
* // <bf-sidebar [(collapsed)]="sidebarState.collapsed">…</bf-sidebar>
|
|
667
|
+
* @summary The sidebar's collapsed state, kept in storage between visits of the app
|
|
668
|
+
* @since 0.3.2
|
|
669
|
+
*/
|
|
670
|
+
export declare class BfSidebarStateService {
|
|
671
|
+
private readonly storage;
|
|
672
|
+
private readonly injector;
|
|
673
|
+
private readonly browser;
|
|
674
|
+
/** Whether the sidebar is collapsed: the stored state in the browser, else false. Bind it
|
|
675
|
+
* two-way to `bf-sidebar`'s `collapsed`. */
|
|
676
|
+
readonly collapsed: import("@angular/core").WritableSignal<boolean>;
|
|
677
|
+
private claimed;
|
|
678
|
+
/**
|
|
679
|
+
* Starts storing every change, once: called by `provideBfSidebarState()`. Nothing is written on
|
|
680
|
+
* the server.
|
|
681
|
+
* @internal
|
|
682
|
+
*/
|
|
683
|
+
claimStorage(): void;
|
|
684
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfSidebarStateService, never>;
|
|
685
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Lets `BfSidebarStateService` remember the collapsed sidebar: it stores every change of its
|
|
689
|
+
* `collapsed` signal (key `bf-sidebar-collapsed`, `localStorage` in the browser), so the app opens
|
|
690
|
+
* with the sidebar as the user left it. Add it to `ApplicationConfig.providers` and bind the
|
|
691
|
+
* sidebar's `[(collapsed)]` to `sidebarState.collapsed`.
|
|
692
|
+
*
|
|
693
|
+
* @example
|
|
694
|
+
* export const appConfig: ApplicationConfig = { providers: [provideBfSidebarState()] };
|
|
695
|
+
* @returns The providers that make the service store the state and start it with the app.
|
|
696
|
+
* @summary Remembers the collapsed sidebar between visits, for desktop web apps
|
|
697
|
+
* @since 0.3.2
|
|
698
|
+
*/
|
|
699
|
+
export declare function provideBfSidebarState(): EnvironmentProviders;
|
|
276
700
|
/**
|
|
277
701
|
* The diameter of a `bf-spinner`: sm, md or lg.
|
|
278
702
|
*
|
|
@@ -333,6 +757,15 @@ export declare class BfSpinnerComponent {
|
|
|
333
757
|
* @since 0.1.0
|
|
334
758
|
*/
|
|
335
759
|
type BfButtonVariant = 'primary' | 'tonal' | 'outline' | 'text' | 'danger';
|
|
760
|
+
/**
|
|
761
|
+
* Every value the `variant` input of a `bf-button` takes: the five `BfButtonVariant` styles plus
|
|
762
|
+
* `ghost`, the quiet neutral one. A new type, so `Record`s and exhaustive switches over
|
|
763
|
+
* `BfButtonVariant` keep compiling.
|
|
764
|
+
*
|
|
765
|
+
* @summary Every button style, the five variants plus the quiet neutral ghost
|
|
766
|
+
* @since 0.3.1
|
|
767
|
+
*/
|
|
768
|
+
type BfButtonAppearance = BfButtonVariant | 'ghost';
|
|
336
769
|
/**
|
|
337
770
|
* The height step of a `bf-button`; the same scale as every sized widget.
|
|
338
771
|
*
|
|
@@ -352,14 +785,15 @@ type BfButtonType = 'button' | 'submit' | 'reset';
|
|
|
352
785
|
* the internal `ɵBF_BUTTON_CLASSES` export so the two never drift. */
|
|
353
786
|
declare const BUTTON_CLASSES: {
|
|
354
787
|
readonly base: string;
|
|
355
|
-
readonly variant: Record<
|
|
356
|
-
readonly pressed: Record<
|
|
788
|
+
readonly variant: Record<BfButtonAppearance, string>;
|
|
789
|
+
readonly pressed: Record<BfButtonAppearance, string>;
|
|
790
|
+
readonly current: Record<BfButtonAppearance, string>;
|
|
357
791
|
readonly size: Record<BfSize, string>;
|
|
358
792
|
readonly padding: Record<BfSize, string>;
|
|
359
793
|
readonly textPadding: Record<BfSize, string>;
|
|
360
794
|
};
|
|
361
795
|
/**
|
|
362
|
-
* Pill-shaped action button with
|
|
796
|
+
* Pill-shaped action button with six variants, three sizes, a loading state and icon slots. Put
|
|
363
797
|
* the label in the default slot and icons in the `icon-start` / `icon-end` slots; never place a
|
|
364
798
|
* `bf-button` inside another interactive element. For navigation, put `bfButton` on your own `<a>`
|
|
365
799
|
* (with `href` or `routerLink`): it renders as a real link that looks like the button.
|
|
@@ -371,6 +805,7 @@ declare const BUTTON_CLASSES: {
|
|
|
371
805
|
* New task
|
|
372
806
|
* </bf-button>
|
|
373
807
|
* <a bfButton variant="outline" routerLink="/projects">All projects</a>
|
|
808
|
+
* <a bfButton variant="ghost" routerLink="/inbox" routerLinkActive ariaCurrentWhenActive="page">Inbox</a>
|
|
374
809
|
* @summary Pill-shaped action button with five variants, three sizes and a loading state
|
|
375
810
|
* @category Actions
|
|
376
811
|
* @since 0.1.0
|
|
@@ -379,8 +814,9 @@ declare const BUTTON_CLASSES: {
|
|
|
379
814
|
* @slot icon-end An icon after the label.
|
|
380
815
|
*/
|
|
381
816
|
export declare class BfButtonComponent {
|
|
382
|
-
/** Visual style: primary (filled), tonal (soft tint), outline, text, danger
|
|
383
|
-
|
|
817
|
+
/** Visual style: primary (filled), tonal (soft tint), outline, text, danger, or ghost (quiet
|
|
818
|
+
* neutral). On `a[bfButton]`, `ghost`, `text` and `outline` also show `aria-current="page"`. */
|
|
819
|
+
readonly variant: import("@angular/core").InputSignal<BfButtonAppearance>;
|
|
384
820
|
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,
|
|
385
821
|
* `md` by default). */
|
|
386
822
|
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
@@ -471,12 +907,17 @@ declare const ICON_BUTTON_CLASSES: {
|
|
|
471
907
|
};
|
|
472
908
|
/**
|
|
473
909
|
* Round button that holds a single icon, for toolbars, headers and list rows. The `label` is
|
|
474
|
-
* required because the icon alone gives assistive tech no name.
|
|
910
|
+
* required because the icon alone gives assistive tech no name. For navigation, put
|
|
911
|
+
* `bfIconButton` on your own `<a>` (with `href` or `routerLink`): it renders as a real link that
|
|
912
|
+
* looks like the icon button.
|
|
475
913
|
*
|
|
476
914
|
* @example
|
|
477
915
|
* <bf-icon-button label="Search" (clicked)="openSearch()">
|
|
478
916
|
* <bf-icon [icon]="Search" />
|
|
479
917
|
* </bf-icon-button>
|
|
918
|
+
* <a bfIconButton label="Edit project" routerLink="/projects/atlas/edit">
|
|
919
|
+
* <bf-icon [icon]="Pencil" />
|
|
920
|
+
* </a>
|
|
480
921
|
* @summary Round icon-only button for toolbars and rows, with a required accessible label
|
|
481
922
|
* @category Actions
|
|
482
923
|
* @since 0.1.0
|
|
@@ -488,25 +929,39 @@ export declare class BfIconButtonComponent {
|
|
|
488
929
|
/** Height step: sm 32, md 40, lg 48 px (square); unset follows `provideBfDefaults()`
|
|
489
930
|
* (`controlSize`, `md` by default). */
|
|
490
931
|
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
491
|
-
/** Native button type. */
|
|
932
|
+
/** Native button type. Ignored on `a[bfIconButton]`. */
|
|
492
933
|
readonly type: import("@angular/core").InputSignal<BfButtonType>;
|
|
493
|
-
/** Disables the control and swallows clicks.
|
|
934
|
+
/** Disables the control and swallows clicks. Ignored on `a[bfIconButton]`: a link is never
|
|
935
|
+
* disabled; render a disabled `bf-icon-button` instead. */
|
|
494
936
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
495
|
-
/** Accessible name announced instead of the icon
|
|
937
|
+
/** Accessible name announced instead of the icon; on `a[bfIconButton]`, the link's
|
|
938
|
+
* `aria-label`. */
|
|
496
939
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
497
|
-
/** Emitted on click while enabled
|
|
940
|
+
/** Emitted on click while enabled; on `a[bfIconButton]`, on every click (the link still
|
|
941
|
+
* navigates). */
|
|
498
942
|
readonly clicked: import("@angular/core").OutputEmitterRef<Event>;
|
|
499
943
|
private readonly defaults;
|
|
944
|
+
/** Whether the host is the consumer's `<a>` (`a[bfIconButton]`) rather than a
|
|
945
|
+
* `bf-icon-button` element. */
|
|
946
|
+
protected readonly isLink: boolean;
|
|
500
947
|
/** The size in effect: `size`, else the app's `controlSize` default. */
|
|
501
948
|
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
502
949
|
readonly classes: import("@angular/core").Signal<string>;
|
|
950
|
+
/** The host's classes: the whole icon button on a link (with `no-underline!`, so an unlayered
|
|
951
|
+
* global link rule cannot underline it), else the wrapper's display. */
|
|
952
|
+
readonly hostClasses: import("@angular/core").Signal<string>;
|
|
953
|
+
/**
|
|
954
|
+
* A click on `a[bfIconButton]` emits `clicked`; the browser (or `routerLink`) still follows it.
|
|
955
|
+
* @internal
|
|
956
|
+
*/
|
|
957
|
+
onHostClick(event: Event): void;
|
|
503
958
|
/**
|
|
504
959
|
* The inner button's click: emits `clicked` unless disabled.
|
|
505
960
|
* @internal
|
|
506
961
|
*/
|
|
507
962
|
onClick(event: Event): void;
|
|
508
963
|
static ɵfac: i0.ɵɵFactoryDeclaration<BfIconButtonComponent, never>;
|
|
509
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BfIconButtonComponent, "bf-icon-button", never, {
|
|
964
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfIconButtonComponent, "bf-icon-button, a[bfIconButton]", never, {
|
|
510
965
|
"variant": {
|
|
511
966
|
"alias": "variant";
|
|
512
967
|
"required": false;
|
|
@@ -543,6 +998,15 @@ export declare class BfIconButtonComponent {
|
|
|
543
998
|
* @since 0.1.0
|
|
544
999
|
*/
|
|
545
1000
|
type BfBadgeVariant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger';
|
|
1001
|
+
/**
|
|
1002
|
+
* Every tone the `variant` input of a `bf-badge` takes: the five `BfBadgeVariant` tones plus
|
|
1003
|
+
* `info`, for an informational label such as a category. A new type, so `Record`s and exhaustive
|
|
1004
|
+
* switches over `BfBadgeVariant` keep compiling.
|
|
1005
|
+
*
|
|
1006
|
+
* @summary Every badge tone, the five variants plus the informational info tone
|
|
1007
|
+
* @since 0.3.1
|
|
1008
|
+
*/
|
|
1009
|
+
type BfBadgeAppearance = BfBadgeVariant | 'info';
|
|
546
1010
|
/**
|
|
547
1011
|
* Status label ("On track", "At risk") or, with `count`, a compact numeric pill for unread counts.
|
|
548
1012
|
*
|
|
@@ -555,8 +1019,9 @@ type BfBadgeVariant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger';
|
|
|
555
1019
|
* @slot default The badge text, shown when no `count` is set.
|
|
556
1020
|
*/
|
|
557
1021
|
export declare class BfBadgeComponent {
|
|
558
|
-
/** Tint for the label style
|
|
559
|
-
|
|
1022
|
+
/** Tint for the label style: neutral, primary, success, warning, danger or info. Ignored when
|
|
1023
|
+
* `count` is set. */
|
|
1024
|
+
readonly variant: import("@angular/core").InputSignal<BfBadgeAppearance>;
|
|
560
1025
|
/** Switches to the count pill; values above 99 render as "99+". */
|
|
561
1026
|
readonly count: import("@angular/core").InputSignal<number | undefined>;
|
|
562
1027
|
/** What the count counts ("unread messages"), read by assistive tech after the number ("99+
|
|
@@ -2592,6 +3057,68 @@ export declare class BfSegmentedComponent<T = string> implements FormValueContro
|
|
|
2592
3057
|
"touch": "touch";
|
|
2593
3058
|
}, never, never, true, never>;
|
|
2594
3059
|
}
|
|
3060
|
+
/**
|
|
3061
|
+
* The colour scheme switch: System, Light and Dark as a three-option segmented control. It holds
|
|
3062
|
+
* a `BfColorScheme` and injects no service, so the app binds its own state, usually
|
|
3063
|
+
* `BfColorSchemeService.scheme` (`provideBfColorScheme()` on desktop, `provideBfShell()` in a
|
|
3064
|
+
* Capacitor app, where `BfPlatformService.theme` is the same signal).
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* <bf-theme-switch [(value)]="colorScheme.scheme" />
|
|
3068
|
+
* @summary Segmented System, Light and Dark switch bound two-way to the app colour scheme
|
|
3069
|
+
* @category Forms
|
|
3070
|
+
* @since 0.3.1
|
|
3071
|
+
*/
|
|
3072
|
+
export declare class BfThemeSwitchComponent implements FormValueControl<BfColorScheme> {
|
|
3073
|
+
private readonly labels;
|
|
3074
|
+
/** The colour scheme choice; bind it two-way, usually to `BfColorSchemeService.scheme`, or
|
|
3075
|
+
* with `[formField]`. */
|
|
3076
|
+
readonly value: import("@angular/core").ModelSignal<BfColorScheme>;
|
|
3077
|
+
/** Accessible name of the switch (not shown); empty falls back to the `theme` label. */
|
|
3078
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
3079
|
+
/** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,
|
|
3080
|
+
* `md` by default). */
|
|
3081
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
3082
|
+
/** Stretch the switch and share the width between the three segments. */
|
|
3083
|
+
readonly fullWidth: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3084
|
+
/** Emitted with the new choice right after the user picks another segment. */
|
|
3085
|
+
readonly changed: import("@angular/core").OutputEmitterRef<BfColorScheme>;
|
|
3086
|
+
/** The three segments, labelled by `themeSystem`, `themeLight` and `themeDark`. */
|
|
3087
|
+
protected readonly options: readonly BfSegmentOption<BfColorScheme>[];
|
|
3088
|
+
/** The group's accessible name: `label`, else the `theme` label. */
|
|
3089
|
+
protected readonly resolvedLabel: import("@angular/core").Signal<string>;
|
|
3090
|
+
/**
|
|
3091
|
+
* Takes the segment the user picked.
|
|
3092
|
+
* @internal
|
|
3093
|
+
*/
|
|
3094
|
+
select(next: BfColorScheme): void;
|
|
3095
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfThemeSwitchComponent, never>;
|
|
3096
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfThemeSwitchComponent, "bf-theme-switch", never, {
|
|
3097
|
+
"value": {
|
|
3098
|
+
"alias": "value";
|
|
3099
|
+
"required": false;
|
|
3100
|
+
"isSignal": true;
|
|
3101
|
+
};
|
|
3102
|
+
"label": {
|
|
3103
|
+
"alias": "label";
|
|
3104
|
+
"required": false;
|
|
3105
|
+
"isSignal": true;
|
|
3106
|
+
};
|
|
3107
|
+
"size": {
|
|
3108
|
+
"alias": "size";
|
|
3109
|
+
"required": false;
|
|
3110
|
+
"isSignal": true;
|
|
3111
|
+
};
|
|
3112
|
+
"fullWidth": {
|
|
3113
|
+
"alias": "fullWidth";
|
|
3114
|
+
"required": false;
|
|
3115
|
+
"isSignal": true;
|
|
3116
|
+
};
|
|
3117
|
+
}, {
|
|
3118
|
+
"value": "valueChange";
|
|
3119
|
+
"changed": "changed";
|
|
3120
|
+
}, never, never, true, never>;
|
|
3121
|
+
}
|
|
2595
3122
|
/**
|
|
2596
3123
|
* Container for `bf-list-item` rows. The inset style (default) wraps the rows in the warm
|
|
2597
3124
|
* background with rounded corners, as in the design's grouped lists.
|
|
@@ -2600,6 +3127,11 @@ export declare class BfSegmentedComponent<T = string> implements FormValueContro
|
|
|
2600
3127
|
* <bf-list>
|
|
2601
3128
|
* <bf-list-item title="Notifications" subtitle="Every Monday at 8:00" />
|
|
2602
3129
|
* </bf-list>
|
|
3130
|
+
* <bf-card>
|
|
3131
|
+
* <bf-list [inset]="false" divided class="-mx-card">
|
|
3132
|
+
* <bf-list-item title="Atlas rebrand" subtitle="Due Friday" />
|
|
3133
|
+
* </bf-list>
|
|
3134
|
+
* </bf-card>
|
|
2603
3135
|
* @summary Container for list rows, inset by default with rounded corners on a warm background
|
|
2604
3136
|
* @category Data display
|
|
2605
3137
|
* @since 0.1.0
|
|
@@ -2608,7 +3140,10 @@ export declare class BfSegmentedComponent<T = string> implements FormValueContro
|
|
|
2608
3140
|
export declare class BfListComponent {
|
|
2609
3141
|
/** Grouped look with the warm container; false renders rows on the page background. */
|
|
2610
3142
|
readonly inset: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2611
|
-
|
|
3143
|
+
/** Separates the rows with a `border` line instead of a gap, with square rows whose hover
|
|
3144
|
+
* reaches the list's edges. Off by default. */
|
|
3145
|
+
readonly divided: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3146
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
2612
3147
|
static ɵfac: i0.ɵɵFactoryDeclaration<BfListComponent, never>;
|
|
2613
3148
|
static ɵcmp: i0.ɵɵComponentDeclaration<BfListComponent, "bf-list", never, {
|
|
2614
3149
|
"inset": {
|
|
@@ -2616,6 +3151,11 @@ export declare class BfListComponent {
|
|
|
2616
3151
|
"required": false;
|
|
2617
3152
|
"isSignal": true;
|
|
2618
3153
|
};
|
|
3154
|
+
"divided": {
|
|
3155
|
+
"alias": "divided";
|
|
3156
|
+
"required": false;
|
|
3157
|
+
"isSignal": true;
|
|
3158
|
+
};
|
|
2619
3159
|
}, {}, never, ["*"], true, never>;
|
|
2620
3160
|
}
|
|
2621
3161
|
/**
|
|
@@ -2745,7 +3285,7 @@ type BfCardPadding = 'md' | 'lg';
|
|
|
2745
3285
|
* @since 0.1.0
|
|
2746
3286
|
* @slot header Content above the body, such as a title row.
|
|
2747
3287
|
* @slot default The card body.
|
|
2748
|
-
* @slot footer Content below the body, such as its actions.
|
|
3288
|
+
* @slot footer Content below the body, such as its actions; it sits on the card's bottom edge.
|
|
2749
3289
|
*/
|
|
2750
3290
|
export declare class BfCardComponent implements BfActionHost {
|
|
2751
3291
|
/** Surface treatment: raised (default), tint, ink, flat. */
|
|
@@ -3023,6 +3563,15 @@ export declare class BfAlertComponent {
|
|
|
3023
3563
|
* @since 0.3.0
|
|
3024
3564
|
*/
|
|
3025
3565
|
type BfEmptyStateHeadingLevel = 2 | 3;
|
|
3566
|
+
/**
|
|
3567
|
+
* The heading level a `bf-empty-state` title takes: a `BfEmptyStateHeadingLevel`, or `1` when the
|
|
3568
|
+
* empty state is the page itself (a not-found or no-access page). A new type, so `Record`s over
|
|
3569
|
+
* the released `BfEmptyStateHeadingLevel` keep compiling.
|
|
3570
|
+
*
|
|
3571
|
+
* @summary The heading level of an empty state title, one for a whole page
|
|
3572
|
+
* @since 0.3.2
|
|
3573
|
+
*/
|
|
3574
|
+
type BfEmptyStateHeading = BfEmptyStateHeadingLevel | 1;
|
|
3026
3575
|
/**
|
|
3027
3576
|
* Placeholder for a screen or list with nothing in it yet: an icon tile, a title, one sentence,
|
|
3028
3577
|
* and the action that fills it.
|
|
@@ -3043,8 +3592,8 @@ export declare class BfEmptyStateComponent {
|
|
|
3043
3592
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
3044
3593
|
/** One sentence on how to fill it. */
|
|
3045
3594
|
readonly description: import("@angular/core").InputSignal<string>;
|
|
3046
|
-
/** Heading level of the title so the empty state fits the page outline. */
|
|
3047
|
-
readonly headingLevel: import("@angular/core").InputSignal<
|
|
3595
|
+
/** Heading level of the title so the empty state fits the page outline; 1 when it is the page. */
|
|
3596
|
+
readonly headingLevel: import("@angular/core").InputSignal<BfEmptyStateHeading>;
|
|
3048
3597
|
static ɵfac: i0.ɵɵFactoryDeclaration<BfEmptyStateComponent, never>;
|
|
3049
3598
|
static ɵcmp: i0.ɵɵComponentDeclaration<BfEmptyStateComponent, "bf-empty-state", never, {
|
|
3050
3599
|
"title": {
|
|
@@ -3232,7 +3781,7 @@ export declare class BfTabComponent {
|
|
|
3232
3781
|
/** `aria-current` of the link form: `page` while the active tab's root page is shown, `true`
|
|
3233
3782
|
* while a child page of it is (the tab is the current section, not the current page), else
|
|
3234
3783
|
* `null`. */
|
|
3235
|
-
readonly current: import("@angular/core").Signal<"
|
|
3784
|
+
readonly current: import("@angular/core").Signal<"true" | "page" | null>;
|
|
3236
3785
|
/** The badge as announced after the label in the accessible name when `badge()` is set. */
|
|
3237
3786
|
readonly badgeAnnouncement: import("@angular/core").Signal<string | null>;
|
|
3238
3787
|
/**
|
|
@@ -3454,32 +4003,1811 @@ export declare class BfActionDirective {
|
|
|
3454
4003
|
static ɵfac: i0.ɵɵFactoryDeclaration<BfActionDirective, never>;
|
|
3455
4004
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BfActionDirective, "a[bfAction], button[bfAction]", never, {}, {}, never, never, true, never>;
|
|
3456
4005
|
}
|
|
3457
|
-
/**
|
|
3458
|
-
*
|
|
3459
|
-
|
|
3460
|
-
/**
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
*/
|
|
3464
|
-
declare
|
|
3465
|
-
/** The visual error state: any error text, or a field the form marked invalid after it was touched. */
|
|
3466
|
-
declare function fieldShowsError(errorText: string, invalid: boolean, touched: boolean): boolean;
|
|
4006
|
+
/** What a `bf-tab-panel` reads from its `bf-tab-group`; a token so the two files never import each
|
|
4007
|
+
* other. Internal: not exported from the package. */
|
|
4008
|
+
interface BfTabGroupHost {
|
|
4009
|
+
/** The value of the panel the group shows: `selected`, else the first enabled panel's. */
|
|
4010
|
+
readonly current: Signal<string>;
|
|
4011
|
+
}
|
|
4012
|
+
/** The enclosing `bf-tab-group`, as its panels inject it. */
|
|
4013
|
+
declare const BF_TAB_GROUP: InjectionToken<BfTabGroupHost>;
|
|
3467
4014
|
/**
|
|
3468
|
-
* `
|
|
3469
|
-
*
|
|
4015
|
+
* One tab of a `bf-tab-group` and the content it shows: `label` is the tab's text, `value` the
|
|
4016
|
+
* key the group's `selected` holds. Put the content in an `ng-template` inside the panel and it is
|
|
4017
|
+
* created only while the panel is selected (`keepAlive` keeps it once visited); plain content
|
|
4018
|
+
* renders at once and is only hidden. An icon in `bfSlot="icon"` shows in the tab before the label.
|
|
4019
|
+
*
|
|
4020
|
+
* @example
|
|
4021
|
+
* <bf-tab-panel value="activity" label="Activity" [badge]="3">
|
|
4022
|
+
* <bf-icon bfSlot="icon" [icon]="Activity" />
|
|
4023
|
+
* <ng-template><app-activity-feed /></ng-template>
|
|
4024
|
+
* </bf-tab-panel>
|
|
4025
|
+
* @summary One tab of a tab group with its label, badge, icon and lazy content
|
|
4026
|
+
* @category Navigation
|
|
4027
|
+
* @since 0.3.1
|
|
4028
|
+
* @slot icon An icon in the tab before the label, a `bf-icon`.
|
|
4029
|
+
* @slot default Content rendered at once and hidden while another tab is selected; put it in an
|
|
4030
|
+
* `ng-template` instead to create it only when the panel is shown.
|
|
3470
4031
|
*/
|
|
3471
|
-
declare
|
|
3472
|
-
/**
|
|
3473
|
-
|
|
4032
|
+
export declare class BfTabPanelComponent {
|
|
4033
|
+
/** The key of this panel; the group's `selected` holds it while the panel is shown. */
|
|
4034
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
4035
|
+
/** The tab's visible text, also its accessible name. */
|
|
4036
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4037
|
+
/** Disables the tab: it cannot be clicked and the arrow keys skip it. */
|
|
4038
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4039
|
+
/** A count shown as a pill after the tab's label, announced with `provideBfLabels()`'s
|
|
4040
|
+
* `tabBadge(count)` ("3 new"); `null` shows none. */
|
|
4041
|
+
readonly badge: import("@angular/core").InputSignal<number | null>;
|
|
4042
|
+
/** Keeps the content of an `ng-template` in the DOM, hidden, once the panel has been shown, so
|
|
4043
|
+
* its state (scroll, form input) survives switching tabs. */
|
|
4044
|
+
readonly keepAlive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4045
|
+
private readonly group;
|
|
4046
|
+
/** The panel's DOM id, which its tab's `aria-controls` names. */
|
|
4047
|
+
readonly panelId: string;
|
|
4048
|
+
/** The DOM id of this panel's tab, which the panel's `aria-labelledby` names. */
|
|
4049
|
+
readonly tabId: string;
|
|
4050
|
+
/** The icon slot as a template, for the group to render inside the tab. */
|
|
4051
|
+
readonly icon: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
|
|
4052
|
+
/** The consumer's lazy content, if any. */
|
|
4053
|
+
protected readonly content: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
4054
|
+
/** Whether the group shows this panel. */
|
|
4055
|
+
readonly isSelected: import("@angular/core").Signal<boolean>;
|
|
4056
|
+
/** Latches once the panel has been shown. */
|
|
4057
|
+
private readonly visited;
|
|
4058
|
+
/** Whether the `ng-template` content exists: while selected, or once visited with `keepAlive`.
|
|
4059
|
+
* `visited` is read first on every run, so the latch sees each selection. */
|
|
4060
|
+
protected readonly rendered: import("@angular/core").Signal<boolean>;
|
|
4061
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTabPanelComponent, never>;
|
|
4062
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTabPanelComponent, "bf-tab-panel", never, {
|
|
4063
|
+
"value": {
|
|
4064
|
+
"alias": "value";
|
|
4065
|
+
"required": true;
|
|
4066
|
+
"isSignal": true;
|
|
4067
|
+
};
|
|
4068
|
+
"label": {
|
|
4069
|
+
"alias": "label";
|
|
4070
|
+
"required": true;
|
|
4071
|
+
"isSignal": true;
|
|
4072
|
+
};
|
|
4073
|
+
"disabled": {
|
|
4074
|
+
"alias": "disabled";
|
|
4075
|
+
"required": false;
|
|
4076
|
+
"isSignal": true;
|
|
4077
|
+
};
|
|
4078
|
+
"badge": {
|
|
4079
|
+
"alias": "badge";
|
|
4080
|
+
"required": false;
|
|
4081
|
+
"isSignal": true;
|
|
4082
|
+
};
|
|
4083
|
+
"keepAlive": {
|
|
4084
|
+
"alias": "keepAlive";
|
|
4085
|
+
"required": false;
|
|
4086
|
+
"isSignal": true;
|
|
4087
|
+
};
|
|
4088
|
+
}, {}, ["content"], ["[bfSlot=icon]", "*"], true, never>;
|
|
4089
|
+
}
|
|
3474
4090
|
/**
|
|
3475
|
-
*
|
|
4091
|
+
* In-page tabs: a row of tabs over the content they switch, one `bf-tab-panel` per tab. The
|
|
4092
|
+
* `selected` model holds the shown panel's `value`; unset or unknown, the first enabled panel
|
|
4093
|
+
* shows. Selection follows focus: the arrow keys (mirrored under `dir="rtl"`), Home and End move
|
|
4094
|
+
* to a tab and show its panel. When the tabs do not fit, the row scrolls sideways.
|
|
3476
4095
|
*
|
|
3477
|
-
*
|
|
3478
|
-
*
|
|
3479
|
-
*
|
|
4096
|
+
* @example
|
|
4097
|
+
* <bf-tab-group label="Project" [(selected)]="tab">
|
|
4098
|
+
* <bf-tab-panel value="overview" label="Overview">…</bf-tab-panel>
|
|
4099
|
+
* <bf-tab-panel value="activity" label="Activity" [badge]="3">…</bf-tab-panel>
|
|
4100
|
+
* </bf-tab-group>
|
|
4101
|
+
* @summary In-page tabs that switch between content panels, with keyboard navigation and badges
|
|
4102
|
+
* @category Navigation
|
|
4103
|
+
* @since 0.3.1
|
|
4104
|
+
* @slot default The panels, each a `bf-tab-panel`.
|
|
4105
|
+
*/
|
|
4106
|
+
export declare class BfTabGroupComponent implements BfTabGroupHost {
|
|
4107
|
+
/** The shown panel's `value`; two-way bindable. Unset or unknown shows the first enabled panel
|
|
4108
|
+
* (the model keeps its value until the user picks a tab). */
|
|
4109
|
+
readonly selected: import("@angular/core").ModelSignal<string>;
|
|
4110
|
+
/** Accessible name of the tablist; empty falls back to `provideBfLabels()`'s `tabGroup`
|
|
4111
|
+
* ("Tabs"). */
|
|
4112
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4113
|
+
/** Height step of the tabs: sm 32, md 40, lg 48 px (at least 44 px under a coarse pointer);
|
|
4114
|
+
* unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */
|
|
4115
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
4116
|
+
/** Stretches the tabs to share the group's width. */
|
|
4117
|
+
readonly fitted: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4118
|
+
/** Emitted with the newly selected panel's `value` after a user change. */
|
|
4119
|
+
readonly changed: import("@angular/core").OutputEmitterRef<string>;
|
|
4120
|
+
/** The `bf-tab-panel` children, in document order. */
|
|
4121
|
+
readonly panels: import("@angular/core").Signal<readonly BfTabPanelComponent[]>;
|
|
4122
|
+
private readonly tabs;
|
|
4123
|
+
private readonly labels;
|
|
4124
|
+
private readonly defaults;
|
|
4125
|
+
/** The size in effect: `size`, else the app's `controlSize` default. */
|
|
4126
|
+
private readonly resolvedSize;
|
|
4127
|
+
/** The tablist's accessible name: `label`, else the `tabGroup` label. */
|
|
4128
|
+
readonly name: import("@angular/core").Signal<string>;
|
|
4129
|
+
/** The panel shown: the one whose `value` is `selected`, else the first enabled panel (else the
|
|
4130
|
+
* first panel). */
|
|
4131
|
+
private readonly currentPanel;
|
|
4132
|
+
/** The value of the panel shown; what each panel compares its own `value` with. */
|
|
4133
|
+
readonly current: import("@angular/core").Signal<string>;
|
|
4134
|
+
/** The panel whose tab owns the roving tab stop: the shown one, else (it is disabled) the first
|
|
4135
|
+
* enabled one. */
|
|
4136
|
+
protected readonly tabStop: import("@angular/core").Signal<BfTabPanelComponent | undefined>;
|
|
4137
|
+
protected readonly scrollerClasses = "-m-1 overflow-x-auto p-1";
|
|
4138
|
+
protected readonly listClasses = "flex w-max min-w-full border-b border-border";
|
|
4139
|
+
protected readonly badgeClasses = "flex h-5 min-w-5 shrink-0 items-center justify-center rounded-control bg-primary px-1.5 text-micro font-bold text-on-primary";
|
|
4140
|
+
/**
|
|
4141
|
+
* The classes of a panel's tab.
|
|
4142
|
+
* @internal
|
|
4143
|
+
*/
|
|
4144
|
+
tabClasses(panel: BfTabPanelComponent): string;
|
|
4145
|
+
/**
|
|
4146
|
+
* The badge as screen readers hear it after the label.
|
|
4147
|
+
* @internal
|
|
4148
|
+
*/
|
|
4149
|
+
badgeAnnouncement(count: number): string;
|
|
4150
|
+
/**
|
|
4151
|
+
* Shows `panel` and emits `changed`, unless it is disabled or already shown.
|
|
4152
|
+
* @internal
|
|
4153
|
+
*/
|
|
4154
|
+
select(panel: BfTabPanelComponent): void;
|
|
4155
|
+
/**
|
|
4156
|
+
* Arrow keys (mirrored under `dir="rtl"`), Home and End move focus and selection.
|
|
4157
|
+
* @internal
|
|
4158
|
+
*/
|
|
4159
|
+
onKeydown(event: KeyboardEvent): void;
|
|
4160
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTabGroupComponent, never>;
|
|
4161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTabGroupComponent, "bf-tab-group", never, {
|
|
4162
|
+
"selected": {
|
|
4163
|
+
"alias": "selected";
|
|
4164
|
+
"required": false;
|
|
4165
|
+
"isSignal": true;
|
|
4166
|
+
};
|
|
4167
|
+
"label": {
|
|
4168
|
+
"alias": "label";
|
|
4169
|
+
"required": false;
|
|
4170
|
+
"isSignal": true;
|
|
4171
|
+
};
|
|
4172
|
+
"size": {
|
|
4173
|
+
"alias": "size";
|
|
4174
|
+
"required": false;
|
|
4175
|
+
"isSignal": true;
|
|
4176
|
+
};
|
|
4177
|
+
"fitted": {
|
|
4178
|
+
"alias": "fitted";
|
|
4179
|
+
"required": false;
|
|
4180
|
+
"isSignal": true;
|
|
4181
|
+
};
|
|
4182
|
+
}, {
|
|
4183
|
+
"selected": "selectedChange";
|
|
4184
|
+
"changed": "changed";
|
|
4185
|
+
}, ["panels"], ["*"], true, never>;
|
|
4186
|
+
}
|
|
4187
|
+
/**
|
|
4188
|
+
* The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.
|
|
4189
|
+
*
|
|
4190
|
+
* @summary The heading level of a page header title, one for a page or two
|
|
4191
|
+
* @since 0.3.1
|
|
4192
|
+
*/
|
|
4193
|
+
type BfPageHeaderHeadingLevel = 1 | 2;
|
|
4194
|
+
/**
|
|
4195
|
+
* The top of a desktop page: a breadcrumb above, then the page title with its subtitle and
|
|
4196
|
+
* badges, and the page's actions at the inline end, wrapping under the title in a narrow window.
|
|
4197
|
+
*
|
|
4198
|
+
* @example
|
|
4199
|
+
* <bf-page-header title="Atlas rebrand" subtitle="12 of 18 tasks done">
|
|
4200
|
+
* <bf-badge bfSlot="meta" variant="success">On track</bf-badge>
|
|
4201
|
+
* <bf-button bfSlot="actions" (clicked)="create()">New task</bf-button>
|
|
4202
|
+
* </bf-page-header>
|
|
4203
|
+
* @summary Desktop page header with breadcrumb, title, subtitle, badges and a row of actions
|
|
4204
|
+
* @category Navigation
|
|
4205
|
+
* @since 0.3.1
|
|
4206
|
+
* @slot breadcrumb The trail above the title, such as `bf-breadcrumb`.
|
|
4207
|
+
* @slot title Rich title content inside the heading, when the `title` input is empty.
|
|
4208
|
+
* @slot meta Badges beside the title, wrapping under it when they do not fit.
|
|
4209
|
+
* @slot actions The page's buttons and menu buttons at the inline end.
|
|
4210
|
+
*/
|
|
4211
|
+
export declare class BfPageHeaderComponent {
|
|
4212
|
+
/** The page title, rendered as the heading; empty to use the `title` slot instead. */
|
|
4213
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
4214
|
+
/** One line under the title, such as a status or a count. */
|
|
4215
|
+
readonly subtitle: import("@angular/core").InputSignal<string>;
|
|
4216
|
+
/** Heading level of the title so the header fits the page outline. */
|
|
4217
|
+
readonly headingLevel: import("@angular/core").InputSignal<BfPageHeaderHeadingLevel>;
|
|
4218
|
+
protected readonly headingClasses = "text-title text-text min-w-0 wrap-break-word";
|
|
4219
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfPageHeaderComponent, never>;
|
|
4220
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfPageHeaderComponent, "bf-page-header", never, {
|
|
4221
|
+
"title": {
|
|
4222
|
+
"alias": "title";
|
|
4223
|
+
"required": false;
|
|
4224
|
+
"isSignal": true;
|
|
4225
|
+
};
|
|
4226
|
+
"subtitle": {
|
|
4227
|
+
"alias": "subtitle";
|
|
4228
|
+
"required": false;
|
|
4229
|
+
"isSignal": true;
|
|
4230
|
+
};
|
|
4231
|
+
"headingLevel": {
|
|
4232
|
+
"alias": "headingLevel";
|
|
4233
|
+
"required": false;
|
|
4234
|
+
"isSignal": true;
|
|
4235
|
+
};
|
|
4236
|
+
}, {}, never, ["[bfSlot=breadcrumb]", "[bfSlot=meta]", "[bfSlot=actions]", "[bfSlot=title]"], true, never>;
|
|
4237
|
+
}
|
|
4238
|
+
/**
|
|
4239
|
+
* Row of search, filters, a view switch and trailing actions above a list or table. Every
|
|
4240
|
+
* control projected into it is `sm` unless it sets `size` itself.
|
|
4241
|
+
*
|
|
4242
|
+
* @example
|
|
4243
|
+
* <bf-toolbar label="Project filters" [status]="results().length + ' results'">
|
|
4244
|
+
* <bf-input type="search" ariaLabel="Search projects" [(value)]="query" />
|
|
4245
|
+
* <bf-select ariaLabel="Status" [options]="statuses" [(value)]="status" />
|
|
4246
|
+
* <bf-segmented bfSlot="view" label="View" [options]="views" [(value)]="view" />
|
|
4247
|
+
* <bf-button bfSlot="actions" (clicked)="create()">New project</bf-button>
|
|
4248
|
+
* </bf-toolbar>
|
|
4249
|
+
* @summary Dense row of search, filters, view switch, result count and actions
|
|
4250
|
+
* @category Actions
|
|
4251
|
+
* @since 0.3.1
|
|
4252
|
+
* @slot default The search field and the filters (bf-input, bf-select, bf-chip-group), in order.
|
|
4253
|
+
* @slot view A view switch after the filters, such as a bf-segmented of list and grid.
|
|
4254
|
+
* @slot actions The trailing actions, kept together at the inline end of the row, beside the status.
|
|
4255
|
+
*/
|
|
4256
|
+
export declare class BfToolbarComponent {
|
|
4257
|
+
/** The group's accessible name, such as "Project filters"; unnamed when empty. */
|
|
4258
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4259
|
+
/** The result count or a short state, such as "24 results", announced politely on change. */
|
|
4260
|
+
readonly status: import("@angular/core").InputSignal<string>;
|
|
4261
|
+
readonly statusClasses: import("@angular/core").Signal<string>;
|
|
4262
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfToolbarComponent, never>;
|
|
4263
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfToolbarComponent, "bf-toolbar", never, {
|
|
4264
|
+
"label": {
|
|
4265
|
+
"alias": "label";
|
|
4266
|
+
"required": false;
|
|
4267
|
+
"isSignal": true;
|
|
4268
|
+
};
|
|
4269
|
+
"status": {
|
|
4270
|
+
"alias": "status";
|
|
4271
|
+
"required": false;
|
|
4272
|
+
"isSignal": true;
|
|
4273
|
+
};
|
|
4274
|
+
}, {}, never, ["*", "[bfSlot=view]", "[bfSlot=actions]"], true, never>;
|
|
4275
|
+
}
|
|
4276
|
+
/**
|
|
4277
|
+
* What a `bf-table` cell template receives: the row (`let-row`) and its position in `rows`.
|
|
4278
|
+
*
|
|
4279
|
+
* @summary The row and its index that a custom table cell template receives
|
|
4280
|
+
* @since 0.3.1
|
|
4281
|
+
*/
|
|
4282
|
+
interface BfTableCellContext<T> {
|
|
4283
|
+
/** The row the cell belongs to (`let-row`). */
|
|
4284
|
+
$implicit: T;
|
|
4285
|
+
/** The row's position in the table's `rows` (`let-index="index"`). */
|
|
4286
|
+
index: number;
|
|
4287
|
+
}
|
|
4288
|
+
/**
|
|
4289
|
+
* Replaces the default text of one `bf-table` column with a template, such as a badge, an avatar
|
|
4290
|
+
* or a link. `bfTableCell` names the column's `key`; bind `bfTableCellOf` to the table's rows so
|
|
4291
|
+
* `let-row` is typed as one of them (it is `unknown` otherwise).
|
|
4292
|
+
*
|
|
4293
|
+
* @example
|
|
4294
|
+
* <bf-table [rows]="tasks()" [columns]="columns">
|
|
4295
|
+
* <ng-template bfTableCell="status" [bfTableCellOf]="tasks()" let-task>
|
|
4296
|
+
* <bf-badge [variant]="task.done ? 'success' : 'neutral'">{{ task.status }}</bf-badge>
|
|
4297
|
+
* </ng-template>
|
|
4298
|
+
* </bf-table>
|
|
4299
|
+
* @summary Custom template for the cells of one table column, with the row typed
|
|
4300
|
+
* @since 0.3.1
|
|
4301
|
+
*/
|
|
4302
|
+
export declare class BfTableCellDirective<T = unknown> {
|
|
4303
|
+
/** The `key` of the column whose cells this template renders. */
|
|
4304
|
+
readonly bfTableCell: import("@angular/core").InputSignal<string>;
|
|
4305
|
+
/** The table's rows; only types `let-row`, the table never reads it. */
|
|
4306
|
+
readonly bfTableCellOf: import("@angular/core").InputSignal<readonly T[]>;
|
|
4307
|
+
/**
|
|
4308
|
+
* The cell template the table renders for each row.
|
|
4309
|
+
* @internal
|
|
4310
|
+
*/
|
|
4311
|
+
readonly template: TemplateRef<BfTableCellContext<T>>;
|
|
4312
|
+
/**
|
|
4313
|
+
* Types the template's context for the template type checker.
|
|
4314
|
+
* @internal
|
|
4315
|
+
* @param _directive The directive instance (unused).
|
|
4316
|
+
* @param _context The template's context.
|
|
4317
|
+
* @returns Always true.
|
|
4318
|
+
*/
|
|
4319
|
+
static ngTemplateContextGuard<T>(_directive: BfTableCellDirective<T>, _context: unknown): _context is BfTableCellContext<T>;
|
|
4320
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTableCellDirective<any>, never>;
|
|
4321
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BfTableCellDirective<any>, "ng-template[bfTableCell]", never, {
|
|
4322
|
+
"bfTableCell": {
|
|
4323
|
+
"alias": "bfTableCell";
|
|
4324
|
+
"required": true;
|
|
4325
|
+
"isSignal": true;
|
|
4326
|
+
};
|
|
4327
|
+
"bfTableCellOf": {
|
|
4328
|
+
"alias": "bfTableCellOf";
|
|
4329
|
+
"required": false;
|
|
4330
|
+
"isSignal": true;
|
|
4331
|
+
};
|
|
4332
|
+
}, {}, never, never, true, never>;
|
|
4333
|
+
}
|
|
4334
|
+
/**
|
|
4335
|
+
* Where a `bf-table` column lines up its header and cells: `start` for text, `end` for numbers.
|
|
4336
|
+
*
|
|
4337
|
+
* @summary The inline alignment of a table column, start for text or end for numbers
|
|
4338
|
+
* @since 0.3.1
|
|
4339
|
+
*/
|
|
4340
|
+
type BfTableAlign = 'start' | 'end';
|
|
4341
|
+
/**
|
|
4342
|
+
* The direction of a sorted `bf-table` column, as `aria-sort` names it.
|
|
4343
|
+
*
|
|
4344
|
+
* @summary The direction a sorted table column is in, ascending or descending
|
|
4345
|
+
* @since 0.3.1
|
|
4346
|
+
*/
|
|
4347
|
+
type BfTableSortDirection = 'ascending' | 'descending';
|
|
4348
|
+
/**
|
|
4349
|
+
* When a `bf-table` renders each row as a card of label/value pairs: `never` (the default),
|
|
4350
|
+
* `narrow` while the table is narrower than 36rem (a container query), or `coarse` under a coarse
|
|
4351
|
+
* pointer at any width.
|
|
4352
|
+
*
|
|
4353
|
+
* @summary When a table stacks its rows into cards: never, when narrow, or under touch
|
|
4354
|
+
* @since 0.3.2
|
|
4355
|
+
*/
|
|
4356
|
+
type BfTableStack = 'never' | 'narrow' | 'coarse';
|
|
4357
|
+
/**
|
|
4358
|
+
* One column of a `bf-table`: the row property it shows, its header and how it behaves.
|
|
4359
|
+
*
|
|
4360
|
+
* @summary One table column with its row key, header label, sorting and alignment
|
|
4361
|
+
* @since 0.3.1
|
|
4362
|
+
*/
|
|
4363
|
+
interface BfTableColumn {
|
|
4364
|
+
/** The row property the default cell shows; also the key a `bfTableCell` template names. */
|
|
4365
|
+
key: string;
|
|
4366
|
+
/** The header text. */
|
|
4367
|
+
label: string;
|
|
4368
|
+
/**
|
|
4369
|
+
* Whether the header is a button that sets the table's `sort`.
|
|
4370
|
+
* @default false
|
|
4371
|
+
*/
|
|
4372
|
+
sortable?: boolean;
|
|
4373
|
+
/**
|
|
4374
|
+
* The inline alignment of the header and cells; `end` also sets tabular figures.
|
|
4375
|
+
* @default 'start'
|
|
4376
|
+
*/
|
|
4377
|
+
align?: BfTableAlign;
|
|
4378
|
+
}
|
|
4379
|
+
/**
|
|
4380
|
+
* The column a `bf-table` is sorted by and the direction; the consumer sorts the rows.
|
|
4381
|
+
*
|
|
4382
|
+
* @summary The column key and direction a table is sorted by, set by its headers
|
|
4383
|
+
* @since 0.3.1
|
|
4384
|
+
*/
|
|
4385
|
+
interface BfTableSort {
|
|
4386
|
+
/** The `key` of the sorted column. */
|
|
4387
|
+
column: string;
|
|
4388
|
+
/** The sort direction. */
|
|
4389
|
+
direction: BfTableSortDirection;
|
|
4390
|
+
}
|
|
4391
|
+
/**
|
|
4392
|
+
* Returns the string that identifies a `bf-table` row in `selection` and in the `@for` track.
|
|
4393
|
+
*
|
|
4394
|
+
* @summary Function that returns the unique string key of one table row
|
|
4395
|
+
* @since 0.3.1
|
|
4396
|
+
*/
|
|
4397
|
+
type BfTableRowKey<T> = (row: T) => string;
|
|
4398
|
+
interface BfTableEntry<T> {
|
|
4399
|
+
row: T;
|
|
4400
|
+
key: string;
|
|
4401
|
+
index: number;
|
|
4402
|
+
}
|
|
4403
|
+
/**
|
|
4404
|
+
* Data table for desktop: column headers that set a sort, optional row selection with
|
|
4405
|
+
* checkboxes, custom cells from `bfTableCell` templates and an empty slot. It never sorts or
|
|
4406
|
+
* filters itself; the consumer sorts the rows in a `computed()` from `sort`. With `stack` it
|
|
4407
|
+
* renders each row as a tile of label/value pairs in a narrow space or under touch.
|
|
4408
|
+
*
|
|
4409
|
+
* @example
|
|
4410
|
+
* <bf-table label="Tasks" [rows]="sorted()" [columns]="columns" [(sort)]="sort" selectable [(selection)]="selected">
|
|
4411
|
+
* <ng-template bfTableCell="title" [bfTableCellOf]="sorted()" let-task>{{ task.title }}</ng-template>
|
|
4412
|
+
* <bf-empty-state bfSlot="empty" title="No tasks" />
|
|
4413
|
+
* </bf-table>
|
|
4414
|
+
* @summary Desktop data table with sortable headers, row selection, custom cells and an empty slot
|
|
4415
|
+
* @category Data display
|
|
4416
|
+
* @since 0.3.1
|
|
4417
|
+
* @slot empty Shown in one full-width row while `rows` is empty, such as a `bf-empty-state`.
|
|
4418
|
+
*/
|
|
4419
|
+
export declare class BfTableComponent<T = unknown> {
|
|
4420
|
+
/** The rows to show, already sorted and filtered by the consumer. */
|
|
4421
|
+
readonly rows: import("@angular/core").InputSignal<readonly T[]>;
|
|
4422
|
+
/** The columns, in order. */
|
|
4423
|
+
readonly columns: import("@angular/core").InputSignal<readonly BfTableColumn[]>;
|
|
4424
|
+
/** The unique string key of a row, used for `selection` and to track rows; by default the
|
|
4425
|
+
* row's `id` (a string or a number), else its index. */
|
|
4426
|
+
readonly rowKey: import("@angular/core").InputSignal<BfTableRowKey<T>>;
|
|
4427
|
+
/** The table's name, rendered as a visually hidden `caption`. */
|
|
4428
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4429
|
+
/** The sorted column and direction, `null` while unsorted; two-way bindable. A sortable header
|
|
4430
|
+
* sets it, and the consumer sorts `rows` from it. */
|
|
4431
|
+
readonly sort: import("@angular/core").ModelSignal<BfTableSort | null>;
|
|
4432
|
+
/** Adds a first column of checkboxes that select rows. */
|
|
4433
|
+
readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4434
|
+
/** The keys (`rowKey`) of the selected rows; two-way bindable. */
|
|
4435
|
+
readonly selection: import("@angular/core").ModelSignal<readonly string[]>;
|
|
4436
|
+
/** Accessible name of the header checkbox; empty falls back to `provideBfLabels()`'s
|
|
4437
|
+
* `tableSelectAll` ("Select all rows"). */
|
|
4438
|
+
readonly selectAllLabel: import("@angular/core").InputSignal<string>;
|
|
4439
|
+
/** Row height step: sm 40, md 48, lg 56 px (the header 32/40/48; at least 44 px under a coarse
|
|
4440
|
+
* pointer); unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */
|
|
4441
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
4442
|
+
/** When the rows render as cards of label/value pairs: `never`, `narrow` (the table is
|
|
4443
|
+
* narrower than 36rem) or `coarse` (under a coarse pointer, at any width). */
|
|
4444
|
+
readonly stack: import("@angular/core").InputSignal<BfTableStack>;
|
|
4445
|
+
protected readonly labels: import("@bitforgehq/ui").BfLabels;
|
|
4446
|
+
private readonly defaults;
|
|
4447
|
+
private readonly table;
|
|
4448
|
+
private readonly cells;
|
|
4449
|
+
private readonly id;
|
|
4450
|
+
/** The caption's id, which names the table while it can stack. */
|
|
4451
|
+
protected readonly captionId: string;
|
|
4452
|
+
/** The size in effect: `size`, else the app's `controlSize` default. */
|
|
4453
|
+
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
4454
|
+
/** The header checkbox's name: `selectAllLabel`, else the `tableSelectAll` label. */
|
|
4455
|
+
protected readonly selectAllName: import("@angular/core").Signal<string>;
|
|
4456
|
+
/** Each row with its key (the `rowKey`, else its index) and its index. */
|
|
4457
|
+
protected readonly entries: import("@angular/core").Signal<BfTableEntry<T>[]>;
|
|
4458
|
+
/** The custom cell template of each column key. */
|
|
4459
|
+
protected readonly templates: import("@angular/core").Signal<Map<string, TemplateRef<BfTableCellContext<unknown>>>>;
|
|
4460
|
+
protected readonly selectedKeys: import("@angular/core").Signal<Set<string>>;
|
|
4461
|
+
/** Whether every row is selected (and there is at least one). */
|
|
4462
|
+
protected readonly allSelected: import("@angular/core").Signal<boolean>;
|
|
4463
|
+
/** Whether some rows, but not all, are selected: the header checkbox is mixed. */
|
|
4464
|
+
protected readonly someSelected: import("@angular/core").Signal<boolean>;
|
|
4465
|
+
/** The number of columns, the selection column included: the empty row's `colspan`. */
|
|
4466
|
+
protected readonly columnCount: import("@angular/core").Signal<number>;
|
|
4467
|
+
/** Whether the table can stack its rows (any `stack` but `never`); it then sets explicit
|
|
4468
|
+
* table roles, because some browsers drop a table's semantics once its display changes. */
|
|
4469
|
+
protected readonly stacks: import("@angular/core").Signal<boolean>;
|
|
4470
|
+
/** The Sort by select's options: each sortable column ascending and descending. */
|
|
4471
|
+
protected readonly sortOptions: import("@angular/core").Signal<BfSelectOption<string>[]>;
|
|
4472
|
+
/** The Sort by select's value: the option of `sort`, `null` while unsorted. */
|
|
4473
|
+
protected readonly sortValue: import("@angular/core").Signal<string | null>;
|
|
4474
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
4475
|
+
protected readonly stackBarClasses: import("@angular/core").Signal<string>;
|
|
4476
|
+
protected readonly tableClasses: import("@angular/core").Signal<string>;
|
|
4477
|
+
protected readonly headClasses: import("@angular/core").Signal<string>;
|
|
4478
|
+
protected readonly bodyGroupClasses: import("@angular/core").Signal<string>;
|
|
4479
|
+
protected readonly sortButtonClasses: import("@angular/core").Signal<string>;
|
|
4480
|
+
protected readonly notStackedClasses: import("@angular/core").Signal<string>;
|
|
4481
|
+
protected readonly stackedOnlyClasses: import("@angular/core").Signal<string>;
|
|
4482
|
+
protected readonly stackEmptyClasses: import("@angular/core").Signal<string>;
|
|
4483
|
+
protected readonly selectHeadClasses: import("@angular/core").Signal<string>;
|
|
4484
|
+
protected readonly selectBodyClasses: import("@angular/core").Signal<string>;
|
|
4485
|
+
/** A body cell's height step, with the coarse-pointer height unless the table stacks there. */
|
|
4486
|
+
private readonly bodyHeight;
|
|
4487
|
+
/**
|
|
4488
|
+
* The classes of a column's header cell.
|
|
4489
|
+
* @internal
|
|
4490
|
+
*/
|
|
4491
|
+
headCellClasses(column: BfTableColumn): string;
|
|
4492
|
+
/**
|
|
4493
|
+
* The classes of a column's body cell; the first one is a stacked tile's title.
|
|
4494
|
+
* @internal
|
|
4495
|
+
*/
|
|
4496
|
+
bodyClasses(column: BfTableColumn, first: boolean): string;
|
|
4497
|
+
/**
|
|
4498
|
+
* The classes of the body row with this key.
|
|
4499
|
+
* @internal
|
|
4500
|
+
*/
|
|
4501
|
+
rowClasses(key: string): string;
|
|
4502
|
+
/**
|
|
4503
|
+
* The classes of a sortable header's arrow mark.
|
|
4504
|
+
* @internal
|
|
4505
|
+
*/
|
|
4506
|
+
arrowClasses(key: string): string;
|
|
4507
|
+
/**
|
|
4508
|
+
* The `aria-sort` of a column's header: its direction while sorted, else none.
|
|
4509
|
+
* @internal
|
|
4510
|
+
*/
|
|
4511
|
+
ariaSort(key: string): BfTableSortDirection | null;
|
|
4512
|
+
/**
|
|
4513
|
+
* The id of a row's first data cell, which names the row's checkbox.
|
|
4514
|
+
* @internal
|
|
4515
|
+
*/
|
|
4516
|
+
cellId(index: number): string;
|
|
4517
|
+
/**
|
|
4518
|
+
* The default text of a cell: the row's property `key` when it is a string, number or boolean,
|
|
4519
|
+
* else empty (render an object, such as a date, with a `bfTableCell` template).
|
|
4520
|
+
* @internal
|
|
4521
|
+
*/
|
|
4522
|
+
cellText(row: T, key: string): string;
|
|
4523
|
+
/**
|
|
4524
|
+
* Sorts by the column with this key: ascending first, then descending and ascending again.
|
|
4525
|
+
* @param key The column's `key`.
|
|
4526
|
+
*/
|
|
4527
|
+
sortBy(key: string): void;
|
|
4528
|
+
/**
|
|
4529
|
+
* Sorts by a Sort by option (`<key>:<direction>`) of a stacked table.
|
|
4530
|
+
* @internal
|
|
4531
|
+
*/
|
|
4532
|
+
sortFromOption(value: string): void;
|
|
4533
|
+
/**
|
|
4534
|
+
* Selects or clears every row; keys of rows not shown stay as they are.
|
|
4535
|
+
* @param selected True to select every row, false to clear them.
|
|
4536
|
+
*/
|
|
4537
|
+
selectAll(selected: boolean): void;
|
|
4538
|
+
/**
|
|
4539
|
+
* Selects or clears one row.
|
|
4540
|
+
* @param key The row's key.
|
|
4541
|
+
* @param selected True to select it, false to clear it.
|
|
4542
|
+
*/
|
|
4543
|
+
selectRow(key: string, selected: boolean): void;
|
|
4544
|
+
/**
|
|
4545
|
+
* ArrowUp / ArrowDown on a button, link or checkbox in a row move focus to the control at the
|
|
4546
|
+
* same place in the nearest row above or below that has one.
|
|
4547
|
+
* @internal
|
|
4548
|
+
*/
|
|
4549
|
+
onKeydown(event: KeyboardEvent): void;
|
|
4550
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTableComponent<any>, never>;
|
|
4551
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTableComponent<any>, "bf-table", never, {
|
|
4552
|
+
"rows": {
|
|
4553
|
+
"alias": "rows";
|
|
4554
|
+
"required": true;
|
|
4555
|
+
"isSignal": true;
|
|
4556
|
+
};
|
|
4557
|
+
"columns": {
|
|
4558
|
+
"alias": "columns";
|
|
4559
|
+
"required": true;
|
|
4560
|
+
"isSignal": true;
|
|
4561
|
+
};
|
|
4562
|
+
"rowKey": {
|
|
4563
|
+
"alias": "rowKey";
|
|
4564
|
+
"required": false;
|
|
4565
|
+
"isSignal": true;
|
|
4566
|
+
};
|
|
4567
|
+
"label": {
|
|
4568
|
+
"alias": "label";
|
|
4569
|
+
"required": false;
|
|
4570
|
+
"isSignal": true;
|
|
4571
|
+
};
|
|
4572
|
+
"sort": {
|
|
4573
|
+
"alias": "sort";
|
|
4574
|
+
"required": false;
|
|
4575
|
+
"isSignal": true;
|
|
4576
|
+
};
|
|
4577
|
+
"selectable": {
|
|
4578
|
+
"alias": "selectable";
|
|
4579
|
+
"required": false;
|
|
4580
|
+
"isSignal": true;
|
|
4581
|
+
};
|
|
4582
|
+
"selection": {
|
|
4583
|
+
"alias": "selection";
|
|
4584
|
+
"required": false;
|
|
4585
|
+
"isSignal": true;
|
|
4586
|
+
};
|
|
4587
|
+
"selectAllLabel": {
|
|
4588
|
+
"alias": "selectAllLabel";
|
|
4589
|
+
"required": false;
|
|
4590
|
+
"isSignal": true;
|
|
4591
|
+
};
|
|
4592
|
+
"size": {
|
|
4593
|
+
"alias": "size";
|
|
4594
|
+
"required": false;
|
|
4595
|
+
"isSignal": true;
|
|
4596
|
+
};
|
|
4597
|
+
"stack": {
|
|
4598
|
+
"alias": "stack";
|
|
4599
|
+
"required": false;
|
|
4600
|
+
"isSignal": true;
|
|
4601
|
+
};
|
|
4602
|
+
}, {
|
|
4603
|
+
"sort": "sortChange";
|
|
4604
|
+
"selection": "selectionChange";
|
|
4605
|
+
}, ["cells"], ["[bfSlot=empty]"], true, never>;
|
|
4606
|
+
}
|
|
4607
|
+
/**
|
|
4608
|
+
* The layout of a `bf-description-list`: `rows` (label beside value, divided) or `grid` (tiles).
|
|
4609
|
+
*
|
|
4610
|
+
* @summary The two description list layouts, divided label-value rows or a grid of tiles
|
|
4611
|
+
* @since 0.3.1
|
|
4612
|
+
*/
|
|
4613
|
+
type BfDescriptionListLayout = 'rows' | 'grid';
|
|
4614
|
+
/** What a `div[bfDescriptionItem]` reads from its `bf-description-list`. */
|
|
4615
|
+
interface BfDescriptionListHost {
|
|
4616
|
+
/** The list's layout. */
|
|
4617
|
+
readonly layout: Signal<BfDescriptionListLayout>;
|
|
4618
|
+
}
|
|
4619
|
+
/**
|
|
4620
|
+
* Provided by `bf-description-list` so each `div[bfDescriptionItem]` styles itself for the list's
|
|
4621
|
+
* layout, without `description-item.component.ts` importing `description-list.component.ts`.
|
|
4622
|
+
*/
|
|
4623
|
+
declare const BF_DESCRIPTION_LIST: InjectionToken<BfDescriptionListHost>;
|
|
4624
|
+
/**
|
|
4625
|
+
* A list of label-value pairs, such as a record's details: a native `dl` around
|
|
4626
|
+
* `div[bfDescriptionItem]`s, as divided rows (label beside value) or a grid of tiles.
|
|
4627
|
+
*
|
|
4628
|
+
* @example
|
|
4629
|
+
* <bf-description-list>
|
|
4630
|
+
* <div bfDescriptionItem label="Cuisine">Italian</div>
|
|
4631
|
+
* <div bfDescriptionItem label="Difficulty"><bf-badge variant="success">Easy</bf-badge></div>
|
|
4632
|
+
* </bf-description-list>
|
|
4633
|
+
* @summary Native description list of label-value pairs, as divided rows or a tile grid
|
|
4634
|
+
* @category Data display
|
|
4635
|
+
* @since 0.3.1
|
|
4636
|
+
* @slot default The pairs, each a `div[bfDescriptionItem]`.
|
|
4637
|
+
*/
|
|
4638
|
+
export declare class BfDescriptionListComponent implements BfDescriptionListHost {
|
|
4639
|
+
/** `rows` (default): label beside value, divided, stacked in a narrow list; `grid`: tiles with the label over the value. */
|
|
4640
|
+
readonly layout: import("@angular/core").InputSignal<BfDescriptionListLayout>;
|
|
4641
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
4642
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfDescriptionListComponent, never>;
|
|
4643
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfDescriptionListComponent, "bf-description-list", never, {
|
|
4644
|
+
"layout": {
|
|
4645
|
+
"alias": "layout";
|
|
4646
|
+
"required": false;
|
|
4647
|
+
"isSignal": true;
|
|
4648
|
+
};
|
|
4649
|
+
}, {}, never, ["*"], true, never>;
|
|
4650
|
+
}
|
|
4651
|
+
/**
|
|
4652
|
+
* One label-value pair of a `bf-description-list`: the `label` becomes the `dt`, the content the
|
|
4653
|
+
* `dd`. Put it on a `div` inside the list.
|
|
4654
|
+
*
|
|
4655
|
+
* @example
|
|
4656
|
+
* <bf-description-list>
|
|
4657
|
+
* <div bfDescriptionItem label="Servings">4</div>
|
|
4658
|
+
* </bf-description-list>
|
|
4659
|
+
* @summary One label and value pair of a description list, label as term, content as value
|
|
4660
|
+
* @category Data display
|
|
4661
|
+
* @since 0.3.1
|
|
4662
|
+
* @slot default The value: text or rich content such as a badge or a link.
|
|
4663
|
+
*/
|
|
4664
|
+
export declare class BfDescriptionItemComponent {
|
|
4665
|
+
/** The term, shown as the pair's label. */
|
|
4666
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4667
|
+
/** The enclosing list, which sets the layout; `rows` outside a list. */
|
|
4668
|
+
private readonly list;
|
|
4669
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
4670
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfDescriptionItemComponent, never>;
|
|
4671
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfDescriptionItemComponent, "div[bfDescriptionItem]", never, {
|
|
4672
|
+
"label": {
|
|
4673
|
+
"alias": "label";
|
|
4674
|
+
"required": true;
|
|
4675
|
+
"isSignal": true;
|
|
4676
|
+
};
|
|
4677
|
+
}, {}, never, ["*"], true, never>;
|
|
4678
|
+
}
|
|
4679
|
+
/**
|
|
4680
|
+
* The surface of a `bf-stat`: plain (on whatever holds it) or card (its own outlined tile).
|
|
4681
|
+
*
|
|
4682
|
+
* @summary The two stat surfaces, plain on its container or an outlined card tile
|
|
4683
|
+
* @since 0.3.1
|
|
4684
|
+
*/
|
|
4685
|
+
type BfStatVariant = 'plain' | 'card';
|
|
4686
|
+
/**
|
|
4687
|
+
* The surface of a `bf-stat`, as its `variant` input takes it: a `BfStatVariant` or tile (a
|
|
4688
|
+
* sunken, borderless tile for a stats row inside a raised card). A new type, so `Record`s over
|
|
4689
|
+
* the released `BfStatVariant` keep compiling.
|
|
4690
|
+
*
|
|
4691
|
+
* @summary The three stat surfaces, plain, an outlined card or a sunken tile
|
|
4692
|
+
* @since 0.3.2
|
|
4693
|
+
*/
|
|
4694
|
+
type BfStatAppearance = BfStatVariant | 'tile';
|
|
4695
|
+
/**
|
|
4696
|
+
* The direction of a `bf-stat` delta: up, down or flat (no change).
|
|
4697
|
+
*
|
|
4698
|
+
* @summary The three directions of a stat's delta pill, up, down or no change
|
|
4699
|
+
* @since 0.3.1
|
|
4700
|
+
*/
|
|
4701
|
+
type BfStatTrend = 'up' | 'down' | 'flat';
|
|
4702
|
+
/**
|
|
4703
|
+
* Which direction of a `bf-stat` delta is good: positive (up is good, such as revenue) or
|
|
4704
|
+
* negative (down is good, such as costs or churn).
|
|
4705
|
+
*
|
|
4706
|
+
* @summary Whether a rising or a falling figure is the good news for a stat
|
|
4707
|
+
* @since 0.3.1
|
|
4708
|
+
*/
|
|
4709
|
+
type BfStatTrendIntent = 'positive' | 'negative';
|
|
4710
|
+
/**
|
|
4711
|
+
* One figure with its label, such as a count, a duration or a total: a native `dl` pair with the
|
|
4712
|
+
* value set large, an optional icon tile at the start and a supporting line under the value.
|
|
4713
|
+
*
|
|
4714
|
+
* A `delta` with a `trend` adds a pill beside the value, toned by `trendIntent`.
|
|
4715
|
+
*
|
|
4716
|
+
* @example
|
|
4717
|
+
* <bf-stat label="Revenue" value="€48,200" delta="+12%" trend="up" />
|
|
4718
|
+
* <bf-stat label="Orders" value="1,204" variant="tile" />
|
|
4719
|
+
* <bf-stat label="Cook time" value="30 min" variant="card">
|
|
4720
|
+
* <bf-icon bfSlot="icon" [icon]="Flame" />
|
|
4721
|
+
* Oven at 200 °C
|
|
4722
|
+
* </bf-stat>
|
|
4723
|
+
* @summary One labelled figure with an optional icon tile and a supporting line
|
|
4724
|
+
* @category Data display
|
|
4725
|
+
* @since 0.3.1
|
|
4726
|
+
* @slot icon The icon in the tile at the start.
|
|
4727
|
+
* @slot default A supporting line under the value, such as a trend or a badge.
|
|
4728
|
+
*/
|
|
4729
|
+
export declare class BfStatComponent {
|
|
4730
|
+
/** What the figure measures, shown above it. */
|
|
4731
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4732
|
+
/** The figure, already formatted (`45 min`, `1,204`, `98%`). */
|
|
4733
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
4734
|
+
/** Surface: plain (default) on its container, card (an outlined tile) or tile (sunken, no border). */
|
|
4735
|
+
readonly variant: import("@angular/core").InputSignal<BfStatAppearance>;
|
|
4736
|
+
/** A change shown in a pill beside the value, already formatted (`+12%`); empty shows none. */
|
|
4737
|
+
readonly delta: import("@angular/core").InputSignal<string>;
|
|
4738
|
+
/** The delta's direction: an arrow mark and a hidden word; left unset, the pill is neutral. */
|
|
4739
|
+
readonly trend: import("@angular/core").InputSignal<BfStatTrend | undefined>;
|
|
4740
|
+
/** Whether up is good (positive, default) or down is good (negative, such as costs). */
|
|
4741
|
+
readonly trendIntent: import("@angular/core").InputSignal<BfStatTrendIntent>;
|
|
4742
|
+
private readonly labels;
|
|
4743
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
4744
|
+
/** @internal */
|
|
4745
|
+
readonly iconTileClasses: import("@angular/core").Signal<string>;
|
|
4746
|
+
/** @internal */
|
|
4747
|
+
readonly deltaClasses: import("@angular/core").Signal<string>;
|
|
4748
|
+
/** @internal */
|
|
4749
|
+
readonly markClasses: import("@angular/core").Signal<string>;
|
|
4750
|
+
/** @internal The direction read before the delta, so colour is never the only signal. */
|
|
4751
|
+
readonly trendWord: import("@angular/core").Signal<string>;
|
|
4752
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfStatComponent, never>;
|
|
4753
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfStatComponent, "bf-stat", never, {
|
|
4754
|
+
"label": {
|
|
4755
|
+
"alias": "label";
|
|
4756
|
+
"required": true;
|
|
4757
|
+
"isSignal": true;
|
|
4758
|
+
};
|
|
4759
|
+
"value": {
|
|
4760
|
+
"alias": "value";
|
|
4761
|
+
"required": true;
|
|
4762
|
+
"isSignal": true;
|
|
4763
|
+
};
|
|
4764
|
+
"variant": {
|
|
4765
|
+
"alias": "variant";
|
|
4766
|
+
"required": false;
|
|
4767
|
+
"isSignal": true;
|
|
4768
|
+
};
|
|
4769
|
+
"delta": {
|
|
4770
|
+
"alias": "delta";
|
|
4771
|
+
"required": false;
|
|
4772
|
+
"isSignal": true;
|
|
4773
|
+
};
|
|
4774
|
+
"trend": {
|
|
4775
|
+
"alias": "trend";
|
|
4776
|
+
"required": false;
|
|
4777
|
+
"isSignal": true;
|
|
4778
|
+
};
|
|
4779
|
+
"trendIntent": {
|
|
4780
|
+
"alias": "trendIntent";
|
|
4781
|
+
"required": false;
|
|
4782
|
+
"isSignal": true;
|
|
4783
|
+
};
|
|
4784
|
+
}, {}, never, ["[bfSlot=icon]", "*"], true, never>;
|
|
4785
|
+
}
|
|
4786
|
+
/**
|
|
4787
|
+
* What a `li[bfBreadcrumbItem]` reads from its enclosing `bf-breadcrumb`, provided through an
|
|
4788
|
+
* injection token so `breadcrumb.component.ts` and `breadcrumb-item.component.ts` never import each
|
|
4789
|
+
* other. Both methods read signals, so an item calls them in a `computed()`.
|
|
4790
|
+
*/
|
|
4791
|
+
interface BfBreadcrumbTrail {
|
|
4792
|
+
/**
|
|
4793
|
+
* Whether `item` is the last item of the trail: the current page.
|
|
4794
|
+
* @param item The item asking.
|
|
4795
|
+
*/
|
|
4796
|
+
isCurrent(item: object): boolean;
|
|
4797
|
+
/**
|
|
4798
|
+
* Whether `item` is one of the middle items a collapsed trail hides behind its ellipsis.
|
|
4799
|
+
* @param item The item asking.
|
|
4800
|
+
*/
|
|
4801
|
+
isHidden(item: object): boolean;
|
|
4802
|
+
}
|
|
4803
|
+
/** Provided by `bf-breadcrumb` for the items projected into it. */
|
|
4804
|
+
declare const BF_BREADCRUMB: InjectionToken<BfBreadcrumbTrail>;
|
|
4805
|
+
/**
|
|
4806
|
+
* Desktop breadcrumb trail: a `nav` named "Breadcrumb" around an ordered list of
|
|
4807
|
+
* `li[bfBreadcrumbItem]` levels, the last one the current page, a CSS chevron between them. With
|
|
4808
|
+
* `maxItems` set and a longer trail it keeps the first level and the last `maxItems - 1`, and hides
|
|
4809
|
+
* the middle ones behind an ellipsis button that shows them in place, or behind the consumer's own
|
|
4810
|
+
* `bfSlot="overflow"` content (a menu button of the hidden levels).
|
|
4811
|
+
*
|
|
4812
|
+
* @example
|
|
4813
|
+
* <bf-breadcrumb [maxItems]="3">
|
|
4814
|
+
* <li bfBreadcrumbItem><a routerLink="/">Home</a></li>
|
|
4815
|
+
* <li bfBreadcrumbItem><a routerLink="/projects">Projects</a></li>
|
|
4816
|
+
* <li bfBreadcrumbItem><a routerLink="/projects/atlas">Atlas</a></li>
|
|
4817
|
+
* <li bfBreadcrumbItem>Settings</li>
|
|
4818
|
+
* </bf-breadcrumb>
|
|
4819
|
+
* @summary Desktop breadcrumb trail of links to the current page, with optional collapsing
|
|
4820
|
+
* @category Navigation
|
|
4821
|
+
* @since 0.3.1
|
|
4822
|
+
* @slot default The levels, each a `li[bfBreadcrumbItem]`, the current page last.
|
|
4823
|
+
* @slot overflow Replaces the ellipsis button of a collapsed trail, e.g. a menu of the hidden levels.
|
|
4824
|
+
*/
|
|
4825
|
+
export declare class BfBreadcrumbComponent implements BfBreadcrumbTrail {
|
|
4826
|
+
private readonly labels;
|
|
4827
|
+
private readonly injector;
|
|
4828
|
+
/** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `breadcrumb`
|
|
4829
|
+
* ("Breadcrumb"). */
|
|
4830
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4831
|
+
/**
|
|
4832
|
+
* Collapse a trail longer than this: keep the first level and the last `maxItems - 1` and hide
|
|
4833
|
+
* the middle ones behind an ellipsis. `0` never collapses; values below 2 act as 2, so the
|
|
4834
|
+
* current page always stays.
|
|
4835
|
+
*/
|
|
4836
|
+
readonly maxItems: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
4837
|
+
/** The rendered navigation name: `label`, else the `breadcrumb` label. */
|
|
4838
|
+
protected readonly name: import("@angular/core").Signal<string>;
|
|
4839
|
+
private readonly items;
|
|
4840
|
+
private readonly itemElements;
|
|
4841
|
+
private readonly more;
|
|
4842
|
+
private readonly expanded;
|
|
4843
|
+
/** How many middle levels the trail hides right now; 0 when it shows all of them. */
|
|
4844
|
+
readonly hiddenCount: import("@angular/core").Signal<number>;
|
|
4845
|
+
protected readonly expandLabel: import("@angular/core").Signal<string>;
|
|
4846
|
+
protected readonly expandClasses: string;
|
|
4847
|
+
protected readonly separator = "size-1.5 shrink-0 rotate-45 border-t-[1.5px] border-r-[1.5px] border-text-subtle rtl:-rotate-135";
|
|
4848
|
+
constructor();
|
|
4849
|
+
/**
|
|
4850
|
+
* Whether `item` is the last level, the current page.
|
|
4851
|
+
* @internal
|
|
4852
|
+
*/
|
|
4853
|
+
isCurrent(item: object): boolean;
|
|
4854
|
+
/**
|
|
4855
|
+
* Whether `item` is one of the middle levels the collapsed trail hides.
|
|
4856
|
+
* @internal
|
|
4857
|
+
*/
|
|
4858
|
+
isHidden(item: object): boolean;
|
|
4859
|
+
/**
|
|
4860
|
+
* Shows every level in place and moves focus to the first one it revealed (its link).
|
|
4861
|
+
* @internal
|
|
4862
|
+
*/
|
|
4863
|
+
expand(): void;
|
|
4864
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfBreadcrumbComponent, never>;
|
|
4865
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfBreadcrumbComponent, "bf-breadcrumb", never, {
|
|
4866
|
+
"label": {
|
|
4867
|
+
"alias": "label";
|
|
4868
|
+
"required": false;
|
|
4869
|
+
"isSignal": true;
|
|
4870
|
+
};
|
|
4871
|
+
"maxItems": {
|
|
4872
|
+
"alias": "maxItems";
|
|
4873
|
+
"required": false;
|
|
4874
|
+
"isSignal": true;
|
|
4875
|
+
};
|
|
4876
|
+
}, {}, ["items", "itemElements"], ["[bfSlot=overflow]", "*"], true, never>;
|
|
4877
|
+
}
|
|
4878
|
+
declare const BREADCRUMB_SEPARATOR = "size-1.5 shrink-0 rotate-45 border-t-[1.5px] border-r-[1.5px] border-text-subtle rtl:-rotate-135";
|
|
4879
|
+
/**
|
|
4880
|
+
* One level of a `bf-breadcrumb` trail, on the consumer's own `<li>` so the list stays `ol > li`.
|
|
4881
|
+
* Project an `<a routerLink>` for an ancestor page, or plain text for the current page; the last
|
|
4882
|
+
* item is the current page (`aria-current="page"`, no link look, no separator), every other one is
|
|
4883
|
+
* followed by a chevron.
|
|
4884
|
+
*
|
|
4885
|
+
* @example
|
|
4886
|
+
* <li bfBreadcrumbItem><a routerLink="/projects">Projects</a></li>
|
|
4887
|
+
* <li bfBreadcrumbItem>Atlas</li>
|
|
4888
|
+
* @summary One level of a breadcrumb trail: a link, or the current page as text
|
|
4889
|
+
* @category Navigation
|
|
4890
|
+
* @since 0.3.1
|
|
4891
|
+
* @slot default The level: an `<a>` link to the page, or plain text for the current page.
|
|
4892
|
+
*/
|
|
4893
|
+
export declare class BfBreadcrumbItemComponent {
|
|
4894
|
+
private readonly trail;
|
|
4895
|
+
private readonly host;
|
|
4896
|
+
/** Whether this item is the last of the trail, the current page. */
|
|
4897
|
+
readonly current: import("@angular/core").Signal<boolean>;
|
|
4898
|
+
/** Whether a collapsed trail hides this item behind its ellipsis. */
|
|
4899
|
+
readonly hidden: import("@angular/core").Signal<boolean>;
|
|
4900
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
4901
|
+
protected readonly separator = "size-1.5 shrink-0 rotate-45 border-t-[1.5px] border-r-[1.5px] border-text-subtle rtl:-rotate-135";
|
|
4902
|
+
/**
|
|
4903
|
+
* Moves keyboard focus to the item's link (or other focusable content); an item without one
|
|
4904
|
+
* takes focus itself through `tabindex="-1"`. Called by `bf-breadcrumb` after the ellipsis
|
|
4905
|
+
* reveals the hidden levels.
|
|
4906
|
+
* @internal
|
|
4907
|
+
*/
|
|
4908
|
+
focus(): void;
|
|
4909
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfBreadcrumbItemComponent, never>;
|
|
4910
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfBreadcrumbItemComponent, "li[bfBreadcrumbItem]", never, {}, {}, never, ["*"], true, never>;
|
|
4911
|
+
}
|
|
4912
|
+
/**
|
|
4913
|
+
* The vertical navigation of a desktop app: a `nav` landmark with a `header` slot (the brand),
|
|
4914
|
+
* the destinations (`a[bfNavItem]` links, optionally in `bf-nav-group`s) and a `footer` slot.
|
|
4915
|
+
* `collapsed` turns it into an icon rail: put a `bf-sidebar-toggle` (`@bitforgehq/ui/overlay`) in
|
|
4916
|
+
* it, or bind `[(collapsed)]` to your own button. Below a breakpoint hide it
|
|
4917
|
+
* (`class="hidden md:flex"`) and drive a `bf-menu-button` from the same routes.
|
|
4918
|
+
*
|
|
4919
|
+
* @example
|
|
4920
|
+
* <bf-sidebar label="Main" [(collapsed)]="collapsed" class="hidden md:flex">
|
|
4921
|
+
* <a bfSlot="header" routerLink="/">Atlas</a>
|
|
4922
|
+
* <bf-nav-group label="Workspace">
|
|
4923
|
+
* <a bfNavItem routerLink="/inbox" routerLinkActive ariaCurrentWhenActive="page">
|
|
4924
|
+
* <bf-icon bfSlot="icon" [icon]="Inbox" />
|
|
4925
|
+
* Inbox
|
|
4926
|
+
* </a>
|
|
4927
|
+
* </bf-nav-group>
|
|
4928
|
+
* </bf-sidebar>
|
|
4929
|
+
* @summary Vertical app navigation with brand, grouped links, footer and an icon rail mode
|
|
4930
|
+
* @category Navigation
|
|
4931
|
+
* @since 0.3.1
|
|
4932
|
+
* @slot header The brand or app switcher above the destinations.
|
|
4933
|
+
* @slot default The destinations: `a[bfNavItem]` links and `bf-nav-group`s.
|
|
4934
|
+
* @slot footer Content under the destinations, such as settings or the account.
|
|
4935
|
+
*/
|
|
4936
|
+
export declare class BfSidebarComponent {
|
|
4937
|
+
/** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`
|
|
4938
|
+
* ("Main"). Name each landmark differently when a page has more than one. */
|
|
4939
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4940
|
+
/** Collapses the sidebar to an icon rail: items show their icon only, their label stays for
|
|
4941
|
+
* screen readers and becomes a tooltip. A `bf-sidebar-toggle` inside flips it; bind
|
|
4942
|
+
* `[(collapsed)]` to keep it in your state. */
|
|
4943
|
+
readonly collapsed: import("@angular/core").ModelSignal<boolean>;
|
|
4944
|
+
private readonly labels;
|
|
4945
|
+
/** The `nav` element's id, which `bf-sidebar-toggle` points `aria-controls` at.
|
|
4946
|
+
* @internal */
|
|
4947
|
+
readonly navId: string;
|
|
4948
|
+
/** The rendered navigation name: `label`, else the `navigation` label. */
|
|
4949
|
+
protected readonly name: import("@angular/core").Signal<string>;
|
|
4950
|
+
private readonly width;
|
|
4951
|
+
readonly hostClasses: import("@angular/core").Signal<string>;
|
|
4952
|
+
protected readonly regionClasses: import("@angular/core").Signal<string>;
|
|
4953
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfSidebarComponent, never>;
|
|
4954
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfSidebarComponent, "bf-sidebar", never, {
|
|
4955
|
+
"label": {
|
|
4956
|
+
"alias": "label";
|
|
4957
|
+
"required": false;
|
|
4958
|
+
"isSignal": true;
|
|
4959
|
+
};
|
|
4960
|
+
"collapsed": {
|
|
4961
|
+
"alias": "collapsed";
|
|
4962
|
+
"required": false;
|
|
4963
|
+
"isSignal": true;
|
|
4964
|
+
};
|
|
4965
|
+
}, {
|
|
4966
|
+
"collapsed": "collapsedChange";
|
|
4967
|
+
}, never, ["[bfSlot=header]", "*", "[bfSlot=footer]"], true, never>;
|
|
4968
|
+
}
|
|
4969
|
+
/**
|
|
4970
|
+
* The horizontal navigation of a desktop app with few sections: a `nav` landmark holding a row
|
|
4971
|
+
* of `a[bfNavItem]` links that wraps onto more lines in a narrow container. Each link marks the
|
|
4972
|
+
* current page from `aria-current="page"`, as in `bf-sidebar`.
|
|
4973
|
+
*
|
|
4974
|
+
* @example
|
|
4975
|
+
* <bf-top-nav label="Sections">
|
|
4976
|
+
* <a bfNavItem routerLink="/overview" routerLinkActive ariaCurrentWhenActive="page">Overview</a>
|
|
4977
|
+
* <a bfNavItem routerLink="/reports" routerLinkActive ariaCurrentWhenActive="page">Reports</a>
|
|
4978
|
+
* </bf-top-nav>
|
|
4979
|
+
* @summary Horizontal app navigation, a wrapping row of links for apps with few sections
|
|
4980
|
+
* @category Navigation
|
|
4981
|
+
* @since 0.3.1
|
|
4982
|
+
* @slot default The destinations, `a[bfNavItem]` links.
|
|
4983
|
+
*/
|
|
4984
|
+
export declare class BfTopNavComponent {
|
|
4985
|
+
/** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`
|
|
4986
|
+
* ("Main"). Name each landmark differently when a page has more than one. */
|
|
4987
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4988
|
+
private readonly labels;
|
|
4989
|
+
/** The rendered navigation name: `label`, else the `navigation` label. */
|
|
4990
|
+
protected readonly name: import("@angular/core").Signal<string>;
|
|
4991
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfTopNavComponent, never>;
|
|
4992
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfTopNavComponent, "bf-top-nav", never, {
|
|
4993
|
+
"label": {
|
|
4994
|
+
"alias": "label";
|
|
4995
|
+
"required": false;
|
|
4996
|
+
"isSignal": true;
|
|
4997
|
+
};
|
|
4998
|
+
}, {}, never, ["*"], true, never>;
|
|
4999
|
+
}
|
|
5000
|
+
/**
|
|
5001
|
+
* A titled group of `a[bfNavItem]` links inside a `bf-sidebar`: `label` is shown as a small
|
|
5002
|
+
* heading above them and names the group (`role="group"`) for screen readers, also while the
|
|
5003
|
+
* sidebar is collapsed and the heading is hidden.
|
|
5004
|
+
*
|
|
5005
|
+
* @example
|
|
5006
|
+
* <bf-nav-group label="Workspace">
|
|
5007
|
+
* <a bfNavItem routerLink="/inbox" routerLinkActive ariaCurrentWhenActive="page">Inbox</a>
|
|
5008
|
+
* <a bfNavItem routerLink="/projects" routerLinkActive ariaCurrentWhenActive="page">Projects</a>
|
|
5009
|
+
* </bf-nav-group>
|
|
5010
|
+
* @summary A titled group of sidebar links with a small heading that names it
|
|
5011
|
+
* @category Navigation
|
|
5012
|
+
* @since 0.3.1
|
|
5013
|
+
* @slot default The group's `a[bfNavItem]` links.
|
|
5014
|
+
*/
|
|
5015
|
+
export declare class BfNavGroupComponent {
|
|
5016
|
+
/** The group's heading and accessible name, such as "Workspace". */
|
|
5017
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
5018
|
+
private readonly nav;
|
|
5019
|
+
/** The heading's id, referenced by the group's `aria-labelledby`. */
|
|
5020
|
+
protected readonly headingId: string;
|
|
5021
|
+
private readonly form;
|
|
5022
|
+
readonly hostClasses: import("@angular/core").Signal<string>;
|
|
5023
|
+
protected readonly headingClasses: import("@angular/core").Signal<string>;
|
|
5024
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfNavGroupComponent, never>;
|
|
5025
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfNavGroupComponent, "bf-nav-group", never, {
|
|
5026
|
+
"label": {
|
|
5027
|
+
"alias": "label";
|
|
5028
|
+
"required": true;
|
|
5029
|
+
"isSignal": true;
|
|
5030
|
+
};
|
|
5031
|
+
}, {}, never, ["*"], true, never>;
|
|
5032
|
+
}
|
|
5033
|
+
/**
|
|
5034
|
+
* One destination of a `bf-sidebar` or `bf-top-nav`: put `bfNavItem` on your own `<a>` with
|
|
5035
|
+
* `routerLink`, `routerLinkActive` and `ariaCurrentWhenActive="page"`, and the item shows the
|
|
5036
|
+
* current page from `aria-current`. An icon goes in the `icon` slot, the label in the default
|
|
5037
|
+
* slot; `badge` adds a count. In a collapsed sidebar only the icon shows, the label stays for
|
|
5038
|
+
* screen readers and becomes the `title` tooltip.
|
|
5039
|
+
*
|
|
5040
|
+
* @example
|
|
5041
|
+
* <a bfNavItem routerLink="/inbox" routerLinkActive ariaCurrentWhenActive="page" [badge]="3">
|
|
5042
|
+
* <bf-icon bfSlot="icon" [icon]="Inbox" />
|
|
5043
|
+
* Inbox
|
|
5044
|
+
* </a>
|
|
5045
|
+
* @summary Navigation link for a sidebar or top nav, with icon, label and count
|
|
5046
|
+
* @category Navigation
|
|
5047
|
+
* @since 0.3.1
|
|
5048
|
+
* @slot icon An icon before the label, a `bf-icon`; the only thing shown while collapsed.
|
|
5049
|
+
* @slot default The label.
|
|
5050
|
+
*/
|
|
5051
|
+
export declare class BfNavItemComponent {
|
|
5052
|
+
/** Height step: sm 32, md 40, lg 48 px (44 px at least under a coarse pointer); unset follows
|
|
5053
|
+
* `provideBfDefaults()` (`controlSize`, `md` by default). */
|
|
5054
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
5055
|
+
/** A count shown as a pill at the inline end (a dot while collapsed), announced with
|
|
5056
|
+
* `provideBfLabels()`'s `navBadge(count)` ("3 new"); `null` shows none. */
|
|
5057
|
+
readonly badge: import("@angular/core").InputSignal<number | null>;
|
|
5058
|
+
private readonly defaults;
|
|
5059
|
+
private readonly labels;
|
|
5060
|
+
private readonly nav;
|
|
5061
|
+
/** The consumer's own `title`, kept while the item shows its label. */
|
|
5062
|
+
private readonly ownTitle;
|
|
5063
|
+
private readonly label;
|
|
5064
|
+
/** The projected label's text, for the collapsed `title`. */
|
|
5065
|
+
private readonly labelText;
|
|
5066
|
+
/** True while the enclosing sidebar is collapsed to an icon rail. */
|
|
5067
|
+
protected readonly collapsed: import("@angular/core").Signal<boolean>;
|
|
5068
|
+
private readonly form;
|
|
5069
|
+
/** The size in effect: `size`, else the app's `controlSize` default. */
|
|
5070
|
+
private readonly resolvedSize;
|
|
5071
|
+
readonly classes: import("@angular/core").Signal<string>;
|
|
5072
|
+
protected readonly labelClasses: import("@angular/core").Signal<string>;
|
|
5073
|
+
protected readonly badgeClasses: import("@angular/core").Signal<string>;
|
|
5074
|
+
/** The badge as screen readers hear it after the label. */
|
|
5075
|
+
protected readonly badgeAnnouncement: import("@angular/core").Signal<string>;
|
|
5076
|
+
/** Collapsed, the label as the pointer tooltip; else the consumer's own `title`, if any. */
|
|
5077
|
+
protected readonly hoverTitle: import("@angular/core").Signal<string | null>;
|
|
5078
|
+
constructor();
|
|
5079
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfNavItemComponent, never>;
|
|
5080
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfNavItemComponent, "a[bfNavItem]", never, {
|
|
5081
|
+
"size": {
|
|
5082
|
+
"alias": "size";
|
|
5083
|
+
"required": false;
|
|
5084
|
+
"isSignal": true;
|
|
5085
|
+
};
|
|
5086
|
+
"badge": {
|
|
5087
|
+
"alias": "badge";
|
|
5088
|
+
"required": false;
|
|
5089
|
+
"isSignal": true;
|
|
5090
|
+
};
|
|
5091
|
+
}, {}, never, ["[bfSlot=icon]", "*"], true, never>;
|
|
5092
|
+
}
|
|
5093
|
+
/**
|
|
5094
|
+
* The viewport width from which `bf-app-frame` shows its sidebar column instead of the narrow
|
|
5095
|
+
* header bar: Tailwind's `md` (768 px) or `lg` (1024 px).
|
|
5096
|
+
*
|
|
5097
|
+
* @summary The breakpoint where an app frame switches from its header bar to the sidebar
|
|
5098
|
+
* @since 0.3.2
|
|
5099
|
+
*/
|
|
5100
|
+
type BfAppFrameBreakpoint = 'md' | 'lg';
|
|
5101
|
+
/**
|
|
5102
|
+
* The maximum width of `bf-app-frame`'s content column: `md` 48rem, `lg` 64rem, `xl` 80rem, or
|
|
5103
|
+
* `full` for no limit.
|
|
5104
|
+
*
|
|
5105
|
+
* @summary The maximum width of an app frame's content column, from medium to full
|
|
5106
|
+
* @since 0.3.2
|
|
5107
|
+
*/
|
|
5108
|
+
type BfAppFrameContentWidth = 'md' | 'lg' | 'xl' | 'full';
|
|
5109
|
+
/**
|
|
5110
|
+
* The frame of a desktop web app: a skip link, a sticky full-height sidebar column from the
|
|
5111
|
+
* breakpoint up, a header bar with the brand, the narrow-screen menu and actions below it, and
|
|
5112
|
+
* the `main` landmark with a content column of a set maximum width.
|
|
5113
|
+
*
|
|
5114
|
+
* @example
|
|
5115
|
+
* <bf-app-frame>
|
|
5116
|
+
* <bf-sidebar bfSlot="sidebar" label="Main">…</bf-sidebar>
|
|
5117
|
+
* <span bfSlot="brand" class="text-heading">Atlas</span>
|
|
5118
|
+
* <bf-menu-button bfSlot="menu" [menu]="navMenu">Sections</bf-menu-button>
|
|
5119
|
+
* <router-outlet />
|
|
5120
|
+
* </bf-app-frame>
|
|
5121
|
+
* @summary Desktop app frame with skip link, sticky sidebar, narrow header and main content
|
|
5122
|
+
* @category Navigation
|
|
5123
|
+
* @since 0.3.2
|
|
5124
|
+
* @slot sidebar The `bf-sidebar`, shown from the breakpoint up; it fills the column's height.
|
|
5125
|
+
* @slot brand The app's name or logo in the narrow header bar.
|
|
5126
|
+
* @slot menu The narrow-screen navigation: a `bf-menu-button` of `a[bfMenuItem]` links.
|
|
5127
|
+
* @slot actions End actions of the narrow header bar, such as the theme menu.
|
|
5128
|
+
* @slot default The page: what the router shows, inside the `main` landmark.
|
|
5129
|
+
*/
|
|
5130
|
+
export declare class BfAppFrameComponent {
|
|
5131
|
+
/** The viewport width from which the sidebar column replaces the narrow header bar. */
|
|
5132
|
+
readonly breakpoint: import("@angular/core").InputSignal<BfAppFrameBreakpoint>;
|
|
5133
|
+
/** The maximum width of the content column (`md` 48rem, `lg` 64rem, `xl` 80rem, `full`). */
|
|
5134
|
+
readonly contentWidth: import("@angular/core").InputSignal<BfAppFrameContentWidth>;
|
|
5135
|
+
/** The id of the `main` landmark, the skip link's target; generated when left out. */
|
|
5136
|
+
readonly mainId: import("@angular/core").InputSignal<string>;
|
|
5137
|
+
protected readonly labels: import("@bitforgehq/ui").BfLabels;
|
|
5138
|
+
private readonly host;
|
|
5139
|
+
private readonly main;
|
|
5140
|
+
/** True when the frame sits inside another `main` landmark, so its own drops the role. */
|
|
5141
|
+
protected readonly nested: import("@angular/core").WritableSignal<boolean>;
|
|
5142
|
+
protected readonly sidebarClasses: import("@angular/core").Signal<string>;
|
|
5143
|
+
protected readonly headerClasses: import("@angular/core").Signal<string>;
|
|
5144
|
+
protected readonly paddingClasses: import("@angular/core").Signal<string>;
|
|
5145
|
+
protected readonly widthClasses: import("@angular/core").Signal<string>;
|
|
5146
|
+
constructor();
|
|
5147
|
+
/**
|
|
5148
|
+
* Moves focus to the content without following the href (see the template comment).
|
|
5149
|
+
*
|
|
5150
|
+
* @internal
|
|
5151
|
+
* @param event The skip link's click (also fired by Enter).
|
|
5152
|
+
*/
|
|
5153
|
+
skip(event: Event): void;
|
|
5154
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfAppFrameComponent, never>;
|
|
5155
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfAppFrameComponent, "bf-app-frame", never, {
|
|
5156
|
+
"breakpoint": {
|
|
5157
|
+
"alias": "breakpoint";
|
|
5158
|
+
"required": false;
|
|
5159
|
+
"isSignal": true;
|
|
5160
|
+
};
|
|
5161
|
+
"contentWidth": {
|
|
5162
|
+
"alias": "contentWidth";
|
|
5163
|
+
"required": false;
|
|
5164
|
+
"isSignal": true;
|
|
5165
|
+
};
|
|
5166
|
+
"mainId": {
|
|
5167
|
+
"alias": "mainId";
|
|
5168
|
+
"required": false;
|
|
5169
|
+
"isSignal": true;
|
|
5170
|
+
};
|
|
5171
|
+
}, {}, never, ["[bfSlot=sidebar]", "[bfSlot=brand]", "[bfSlot=menu]", "[bfSlot=actions]", "*"], true, never>;
|
|
5172
|
+
}
|
|
5173
|
+
/**
|
|
5174
|
+
* The shape of a `bf-skeleton`: text lines, a rectangle (an image, a chart, a field) or a circle
|
|
5175
|
+
* (an avatar).
|
|
5176
|
+
*
|
|
5177
|
+
* @summary The three skeleton shapes, text lines, a rectangle or a circle
|
|
5178
|
+
* @since 0.3.1
|
|
5179
|
+
*/
|
|
5180
|
+
type BfSkeletonShape = 'text' | 'rect' | 'circle';
|
|
5181
|
+
/**
|
|
5182
|
+
* Loading placeholder in the shape of the content to come: text lines, a rectangle or a circle,
|
|
5183
|
+
* on the sunken surface with a shimmer. It is hidden from assistive technology; mark the region it
|
|
5184
|
+
* stands in for with `aria-busy="true"` while it loads.
|
|
5185
|
+
*
|
|
5186
|
+
* @example
|
|
5187
|
+
* <div aria-busy="true">
|
|
5188
|
+
* <bf-skeleton shape="circle" />
|
|
5189
|
+
* <bf-skeleton [lines]="3" />
|
|
5190
|
+
* <bf-skeleton shape="rect" height="8rem" />
|
|
5191
|
+
* </div>
|
|
5192
|
+
* @summary Loading placeholder shaped as text lines, a rectangle or a circle, with a shimmer
|
|
5193
|
+
* @category Feedback
|
|
5194
|
+
* @since 0.3.1
|
|
5195
|
+
*/
|
|
5196
|
+
export declare class BfSkeletonComponent {
|
|
5197
|
+
/** What it stands in for: `text` lines (default), a `rect` (an image, a chart) or a `circle`
|
|
5198
|
+
* (an avatar). */
|
|
5199
|
+
readonly shape: import("@angular/core").InputSignal<BfSkeletonShape>;
|
|
5200
|
+
/** How many lines a `text` skeleton draws, the last one shorter when there are several;
|
|
5201
|
+
* ignored by the other shapes. */
|
|
5202
|
+
readonly lines: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5203
|
+
/** Width as a CSS length (`12rem`, `60%`); empty fills the container, a circle is 40 px. A
|
|
5204
|
+
* circle's height follows its width. */
|
|
5205
|
+
readonly width: import("@angular/core").InputSignal<string>;
|
|
5206
|
+
/** Height as a CSS length: of each line of `text` (default `0.75rem`) or of the `rect`
|
|
5207
|
+
* (default `6rem`); a circle ignores it. */
|
|
5208
|
+
readonly height: import("@angular/core").InputSignal<string>;
|
|
5209
|
+
protected readonly lineClasses = "relative overflow-hidden bg-surface-sunken after:absolute after:inset-0 after:bg-linear-to-r after:from-transparent after:via-surface/70 after:to-transparent after:content-[''] after:animate-skeleton-shimmer rtl:after:animate-skeleton-shimmer-rtl motion-reduce:after:hidden forced-colors:border forced-colors:border-[GrayText] block h-[var(--bf-skeleton-height,0.75rem)] w-full rounded-full";
|
|
5210
|
+
protected readonly lastLineClasses = "relative overflow-hidden bg-surface-sunken after:absolute after:inset-0 after:bg-linear-to-r after:from-transparent after:via-surface/70 after:to-transparent after:content-[''] after:animate-skeleton-shimmer rtl:after:animate-skeleton-shimmer-rtl motion-reduce:after:hidden forced-colors:border forced-colors:border-[GrayText] block h-[var(--bf-skeleton-height,0.75rem)] w-3/5 rounded-full";
|
|
5211
|
+
/** The line numbers 1…n of a text skeleton; `lines` below 1 draws one. */
|
|
5212
|
+
protected readonly lineList: import("@angular/core").Signal<number[]>;
|
|
5213
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
5214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfSkeletonComponent, never>;
|
|
5215
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfSkeletonComponent, "bf-skeleton", never, {
|
|
5216
|
+
"shape": {
|
|
5217
|
+
"alias": "shape";
|
|
5218
|
+
"required": false;
|
|
5219
|
+
"isSignal": true;
|
|
5220
|
+
};
|
|
5221
|
+
"lines": {
|
|
5222
|
+
"alias": "lines";
|
|
5223
|
+
"required": false;
|
|
5224
|
+
"isSignal": true;
|
|
5225
|
+
};
|
|
5226
|
+
"width": {
|
|
5227
|
+
"alias": "width";
|
|
5228
|
+
"required": false;
|
|
5229
|
+
"isSignal": true;
|
|
5230
|
+
};
|
|
5231
|
+
"height": {
|
|
5232
|
+
"alias": "height";
|
|
5233
|
+
"required": false;
|
|
5234
|
+
"isSignal": true;
|
|
5235
|
+
};
|
|
5236
|
+
}, {}, never, never, true, never>;
|
|
5237
|
+
}
|
|
5238
|
+
/** One slot of the page row: a page number, or a gap before or after the current page's run. */
|
|
5239
|
+
type BfPaginationItem = number | 'gap-start' | 'gap-end';
|
|
5240
|
+
type BfPaginationDirection = 'previous' | 'next';
|
|
5241
|
+
/**
|
|
5242
|
+
* Page navigation for a long list or table: Previous and Next buttons around the page numbers,
|
|
5243
|
+
* the current one marked, the hidden runs shown as an ellipsis. `compact` shows "Page 3 of 12"
|
|
5244
|
+
* between the arrows instead, for narrow screens. The page count comes from `pageCount`, or from
|
|
5245
|
+
* `total` and `pageSize`; the consumer shows the rows of `page`.
|
|
5246
|
+
*
|
|
5247
|
+
* @example
|
|
5248
|
+
* <bf-pagination [(page)]="page" [pageCount]="12" />
|
|
5249
|
+
* <bf-pagination [(page)]="page" [total]="invoices().length" [pageSize]="10" compact />
|
|
5250
|
+
* @summary Previous, next and numbered page buttons for a long list or table
|
|
5251
|
+
* @category Navigation
|
|
5252
|
+
* @since 0.3.1
|
|
5253
|
+
*/
|
|
5254
|
+
export declare class BfPaginationComponent {
|
|
5255
|
+
/** The current page, 1-based; two-way bindable. The buttons set it; show the rows of this page. */
|
|
5256
|
+
readonly page: import("@angular/core").ModelSignal<number>;
|
|
5257
|
+
/** The number of pages; wins over `total` and `pageSize` when above 0. */
|
|
5258
|
+
readonly pageCount: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5259
|
+
/** The number of items, used with `pageSize` while `pageCount` is 0. */
|
|
5260
|
+
readonly total: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5261
|
+
/** Items per page, used with `total` while `pageCount` is 0. */
|
|
5262
|
+
readonly pageSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5263
|
+
/** How many pages to show on each side of the current one. */
|
|
5264
|
+
readonly siblings: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
5265
|
+
/** Shows "Page 3 of 12" between the arrows instead of the page buttons, for narrow screens. */
|
|
5266
|
+
readonly compact: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5267
|
+
/** Button height step: sm 32, md 40, lg 48 px (44 px hit area under a coarse pointer); unset
|
|
5268
|
+
* follows `provideBfDefaults()` (`controlSize`, `md` by default). */
|
|
5269
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
5270
|
+
/** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `pagination`
|
|
5271
|
+
* ("Pagination"). */
|
|
5272
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
5273
|
+
protected readonly labels: import("@bitforgehq/ui").BfLabels;
|
|
5274
|
+
private readonly defaults;
|
|
5275
|
+
/** The size in effect: `size`, else the app's `controlSize` default. */
|
|
5276
|
+
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
5277
|
+
/** The navigation's name: `label`, else the `pagination` label. */
|
|
5278
|
+
protected readonly name: import("@angular/core").Signal<string>;
|
|
5279
|
+
/** The page count in effect, at least 1: `pageCount`, else `total` over `pageSize`. */
|
|
5280
|
+
protected readonly count: import("@angular/core").Signal<number>;
|
|
5281
|
+
/** The page shown as current: `page`, clamped to 1…count. */
|
|
5282
|
+
protected readonly current: import("@angular/core").Signal<number>;
|
|
5283
|
+
protected readonly items: import("@angular/core").Signal<BfPaginationItem[]>;
|
|
5284
|
+
protected readonly chevron: Record<BfPaginationDirection, string>;
|
|
5285
|
+
protected readonly pageClasses: import("@angular/core").Signal<string>;
|
|
5286
|
+
protected readonly gapClasses: import("@angular/core").Signal<string>;
|
|
5287
|
+
protected readonly statusClasses: import("@angular/core").Signal<string>;
|
|
5288
|
+
/**
|
|
5289
|
+
* The classes of the previous or next button.
|
|
5290
|
+
* @internal
|
|
5291
|
+
*/
|
|
5292
|
+
arrowClasses(disabled: boolean): string;
|
|
5293
|
+
/**
|
|
5294
|
+
* Goes to a page: sets `page` when it is another page within 1…count; else does nothing.
|
|
5295
|
+
* @param target The 1-based page to go to.
|
|
5296
|
+
*/
|
|
5297
|
+
go(target: number): void;
|
|
5298
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfPaginationComponent, never>;
|
|
5299
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfPaginationComponent, "bf-pagination", never, {
|
|
5300
|
+
"page": {
|
|
5301
|
+
"alias": "page";
|
|
5302
|
+
"required": false;
|
|
5303
|
+
"isSignal": true;
|
|
5304
|
+
};
|
|
5305
|
+
"pageCount": {
|
|
5306
|
+
"alias": "pageCount";
|
|
5307
|
+
"required": false;
|
|
5308
|
+
"isSignal": true;
|
|
5309
|
+
};
|
|
5310
|
+
"total": {
|
|
5311
|
+
"alias": "total";
|
|
5312
|
+
"required": false;
|
|
5313
|
+
"isSignal": true;
|
|
5314
|
+
};
|
|
5315
|
+
"pageSize": {
|
|
5316
|
+
"alias": "pageSize";
|
|
5317
|
+
"required": false;
|
|
5318
|
+
"isSignal": true;
|
|
5319
|
+
};
|
|
5320
|
+
"siblings": {
|
|
5321
|
+
"alias": "siblings";
|
|
5322
|
+
"required": false;
|
|
5323
|
+
"isSignal": true;
|
|
5324
|
+
};
|
|
5325
|
+
"compact": {
|
|
5326
|
+
"alias": "compact";
|
|
5327
|
+
"required": false;
|
|
5328
|
+
"isSignal": true;
|
|
5329
|
+
};
|
|
5330
|
+
"size": {
|
|
5331
|
+
"alias": "size";
|
|
5332
|
+
"required": false;
|
|
5333
|
+
"isSignal": true;
|
|
5334
|
+
};
|
|
5335
|
+
"label": {
|
|
5336
|
+
"alias": "label";
|
|
5337
|
+
"required": false;
|
|
5338
|
+
"isSignal": true;
|
|
5339
|
+
};
|
|
5340
|
+
}, {
|
|
5341
|
+
"page": "pageChange";
|
|
5342
|
+
}, never, never, true, never>;
|
|
5343
|
+
}
|
|
5344
|
+
/**
|
|
5345
|
+
* A weekday as `Date.getDay()` counts it: 0 Sunday, 1 Monday … 6 Saturday.
|
|
5346
|
+
*
|
|
5347
|
+
* @summary A weekday number from 0 for Sunday to 6 for Saturday, as Date counts
|
|
5348
|
+
* @since 0.3.1
|
|
5349
|
+
*/
|
|
5350
|
+
type BfCalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
5351
|
+
/**
|
|
5352
|
+
* Tells `bf-calendar` which dates cannot be picked, such as weekends or booked days.
|
|
5353
|
+
*
|
|
5354
|
+
* @summary A function that marks an ISO date as not pickable in a calendar
|
|
5355
|
+
* @since 0.3.1
|
|
5356
|
+
*/
|
|
5357
|
+
type BfCalendarDisabledDate = (iso: string) => boolean;
|
|
5358
|
+
/** The day grid, or one of the two jump views the title button opens. */
|
|
5359
|
+
type CalendarView = 'day' | 'month' | 'year';
|
|
5360
|
+
/** One cell of a calendar grid, as the template renders it. */
|
|
5361
|
+
interface CalendarCell {
|
|
5362
|
+
/** The ISO date, month or year the cell stands for. */
|
|
5363
|
+
readonly key: string;
|
|
5364
|
+
/** The visible text. */
|
|
5365
|
+
readonly text: string;
|
|
5366
|
+
/** The accessible name, when the visible text alone is too short. */
|
|
5367
|
+
readonly name: string | null;
|
|
5368
|
+
readonly disabled: boolean;
|
|
5369
|
+
readonly selected: boolean;
|
|
5370
|
+
readonly current: boolean;
|
|
5371
|
+
readonly tabStop: boolean;
|
|
5372
|
+
}
|
|
5373
|
+
/** One weekday column header: the short name shown, the full name in `abbr`. */
|
|
5374
|
+
interface CalendarWeekday {
|
|
5375
|
+
readonly short: string;
|
|
5376
|
+
readonly long: string;
|
|
5377
|
+
}
|
|
5378
|
+
/**
|
|
5379
|
+
* Inline month calendar for picking one date, an ARIA grid with full keyboard support. The value
|
|
5380
|
+
* is a plain ISO date string ('YYYY-MM-DD', never a Date with a time zone) or `null`; month and
|
|
5381
|
+
* weekday names come from `Intl` in the calendar's `locale`; implements the Signal Forms value
|
|
5382
|
+
* contract.
|
|
5383
|
+
*
|
|
5384
|
+
* @example
|
|
5385
|
+
* <bf-calendar label="Due date" min="2026-01-01" [(value)]="due" />
|
|
5386
|
+
* @summary Inline month calendar for picking one date, with month and year jumps
|
|
5387
|
+
* @category Forms
|
|
5388
|
+
* @since 0.3.1
|
|
5389
|
+
*/
|
|
5390
|
+
export declare class BfCalendarComponent implements FormValueControl<string | null> {
|
|
5391
|
+
private readonly defaults;
|
|
5392
|
+
private readonly document;
|
|
5393
|
+
private readonly injector;
|
|
5394
|
+
/** The strings in effect; the template reads the button names from them. */
|
|
5395
|
+
protected readonly labels: import("@bitforgehq/ui").BfLabels;
|
|
5396
|
+
/** The picked date as an ISO string ('YYYY-MM-DD'), `null` while none is picked; two-way
|
|
5397
|
+
* bindable and bound by `[formField]`. */
|
|
5398
|
+
readonly value: import("@angular/core").ModelSignal<string | null>;
|
|
5399
|
+
/** The month on show ('YYYY-MM'), two-way bindable; `null` shows the value's month, else
|
|
5400
|
+
* today's. The previous/next buttons, the month and year views and the keyboard set it. */
|
|
5401
|
+
readonly month: import("@angular/core").ModelSignal<string | null>;
|
|
5402
|
+
/** The earliest date that can be picked (ISO); earlier dates show disabled. */
|
|
5403
|
+
readonly min: import("@angular/core").InputSignal<string | undefined>;
|
|
5404
|
+
/** The latest date that can be picked (ISO); later dates show disabled. */
|
|
5405
|
+
readonly max: import("@angular/core").InputSignal<string | undefined>;
|
|
5406
|
+
/** Marks more dates as not pickable (weekends, booked days); called with each ISO date. */
|
|
5407
|
+
readonly disabledDate: import("@angular/core").InputSignal<BfCalendarDisabledDate | null>;
|
|
5408
|
+
/** The first column's weekday, 0 Sunday to 6 Saturday; unset follows the locale's week (else
|
|
5409
|
+
* Monday). */
|
|
5410
|
+
readonly firstDayOfWeek: import("@angular/core").InputSignal<BfCalendarWeekday | undefined>;
|
|
5411
|
+
/** BCP 47 locale of the month and weekday names and of the week; empty follows the
|
|
5412
|
+
* document's `lang`, else English. */
|
|
5413
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
5414
|
+
/** The date marked as today (ISO); unset is the device's local date. */
|
|
5415
|
+
readonly today: import("@angular/core").InputSignal<string | undefined>;
|
|
5416
|
+
/** Cell size: sm 32, md 40, lg 48 px (44 px under a coarse pointer); unset follows
|
|
5417
|
+
* `provideBfDefaults()` (`controlSize`, `md` by default). */
|
|
5418
|
+
readonly size: import("@angular/core").InputSignal<BfSize | undefined>;
|
|
5419
|
+
/** Disables the whole calendar: nothing is focusable or pickable. */
|
|
5420
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5421
|
+
/** Shows the value and lets the user browse the months, but blocks picking. */
|
|
5422
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5423
|
+
/** Marks the date required (`aria-required` on the day grid). */
|
|
5424
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5425
|
+
/** Field validity from Signal Forms. */
|
|
5426
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5427
|
+
/** Whether the user has left the calendar; errors show only once touched. */
|
|
5428
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5429
|
+
/** Validation errors from Signal Forms; the first message is shown once touched. */
|
|
5430
|
+
readonly errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
5431
|
+
/** Explicit error text; takes precedence over Signal Forms errors. */
|
|
5432
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
5433
|
+
/** Accessible name of the calendar (not rendered visibly), such as "Due date". */
|
|
5434
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
5435
|
+
/** Accessible name when `label` is not set. */
|
|
5436
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
5437
|
+
/** Id(s) of the element(s) that name the calendar (a visible heading) when `label` is not
|
|
5438
|
+
* set. */
|
|
5439
|
+
readonly ariaLabelledby: import("@angular/core").InputSignal<string>;
|
|
5440
|
+
/** Name of the bound field. Not rendered (the calendar has no native form element); kept so
|
|
5441
|
+
* Signal Forms can bind it. */
|
|
5442
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
5443
|
+
/** The calendar's id; generated when not set. */
|
|
5444
|
+
readonly id: import("@angular/core").InputSignal<string>;
|
|
5445
|
+
/** Emitted with the new date right after the user picks a different one. */
|
|
5446
|
+
readonly changed: import("@angular/core").OutputEmitterRef<string>;
|
|
5447
|
+
/** Emitted with the date the user picked (click, Enter or Space), also when it already was
|
|
5448
|
+
* the value, so a popover around the calendar can close. */
|
|
5449
|
+
readonly picked: import("@angular/core").OutputEmitterRef<string>;
|
|
5450
|
+
/** Emitted when focus leaves the calendar, so Signal Forms marks the field touched. */
|
|
5451
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
5452
|
+
private readonly root;
|
|
5453
|
+
/** Which grid is on show: the days, or the month or year jump view. */
|
|
5454
|
+
protected readonly view: import("@angular/core").WritableSignal<CalendarView>;
|
|
5455
|
+
/** The day the keyboard last moved to; the tab stop while it is in the shown month. */
|
|
5456
|
+
private readonly activeDate;
|
|
5457
|
+
/** The month the month view's tab stop is on (its year is the view's year). */
|
|
5458
|
+
private readonly activeMonth;
|
|
5459
|
+
/** The year the year view's tab stop is on. */
|
|
5460
|
+
private readonly activeYear;
|
|
5461
|
+
protected readonly resolvedSize: import("@angular/core").Signal<BfSize>;
|
|
5462
|
+
/** The locale in effect: `locale`, else the document's `lang`, else English. */
|
|
5463
|
+
readonly resolvedLocale: import("@angular/core").Signal<string>;
|
|
5464
|
+
/** The first column's weekday: `firstDayOfWeek`, else the locale's, else Monday. */
|
|
5465
|
+
readonly firstDay: import("@angular/core").Signal<number>;
|
|
5466
|
+
private readonly minDate;
|
|
5467
|
+
private readonly maxDate;
|
|
5468
|
+
private readonly todayDate;
|
|
5469
|
+
private readonly selectedDate;
|
|
5470
|
+
/** The month on show: `month`, else the value's month, else today's (kept inside min/max). */
|
|
5471
|
+
readonly shownMonth: import("@angular/core").Signal<string>;
|
|
5472
|
+
private readonly formats;
|
|
5473
|
+
/** The shown month and year, such as "October 2026". */
|
|
5474
|
+
protected readonly monthTitle: import("@angular/core").Signal<string>;
|
|
5475
|
+
/** The header's title: the month and year, the month view's year or the year view's year. */
|
|
5476
|
+
protected readonly title: import("@angular/core").Signal<string>;
|
|
5477
|
+
/** What the title button does, read after its text. */
|
|
5478
|
+
protected readonly titleAction: import("@angular/core").Signal<string>;
|
|
5479
|
+
protected readonly titleId: import("@angular/core").Signal<string>;
|
|
5480
|
+
/** Whether the previous month lies wholly before `min`. */
|
|
5481
|
+
protected readonly atStart: import("@angular/core").Signal<boolean>;
|
|
5482
|
+
/** Whether the next month lies wholly after `max`. */
|
|
5483
|
+
protected readonly atEnd: import("@angular/core").Signal<boolean>;
|
|
5484
|
+
/** The weekday column headers, from the first day of the week on. */
|
|
5485
|
+
protected readonly weekdays: import("@angular/core").Signal<CalendarWeekday[]>;
|
|
5486
|
+
/** The day that owns the grid's tab stop: the active day while it is in the shown month, else
|
|
5487
|
+
* the value, else today, else the first pickable-by-range day of the month. */
|
|
5488
|
+
readonly tabStopDate: import("@angular/core").Signal<string>;
|
|
5489
|
+
/** The day grid: weeks of seven cells, `null` for the neighbouring months' days. */
|
|
5490
|
+
protected readonly dayRows: import("@angular/core").Signal<(CalendarCell | null)[][]>;
|
|
5491
|
+
/** The month view: the twelve months of the active month's year, three to a row. */
|
|
5492
|
+
protected readonly monthRows: import("@angular/core").Signal<CalendarCell[][]>;
|
|
5493
|
+
/** The first and last year the year view lists: `min`'s and `max`'s, else 100 years around. */
|
|
5494
|
+
private readonly yearRange;
|
|
5495
|
+
/** The year view: the years of `yearRange`, four to a row. */
|
|
5496
|
+
protected readonly yearRows: import("@angular/core").Signal<CalendarCell[][]>;
|
|
5497
|
+
readonly errorText: import("@angular/core").Signal<string>;
|
|
5498
|
+
readonly showError: import("@angular/core").Signal<boolean>;
|
|
5499
|
+
/** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred
|
|
5500
|
+
* this calendar) holds the layout, so it never moves under the pointer. */
|
|
5501
|
+
protected readonly message: HeldMessage;
|
|
5502
|
+
/** The id of the error paragraph while there is an error, else null. */
|
|
5503
|
+
protected readonly errorId: import("@angular/core").Signal<string | null>;
|
|
5504
|
+
/** `aria-label` of the group: the `label`, else `ariaLabel`. */
|
|
5505
|
+
readonly ariaLabelAttr: import("@angular/core").Signal<string | null>;
|
|
5506
|
+
/** `aria-labelledby` of the group: only while no `label` names it. */
|
|
5507
|
+
readonly ariaLabelledbyAttr: import("@angular/core").Signal<string | null>;
|
|
5508
|
+
protected readonly frameClasses: import("@angular/core").Signal<string>;
|
|
5509
|
+
protected readonly bodyClasses: import("@angular/core").Signal<string>;
|
|
5510
|
+
protected readonly titleClasses: import("@angular/core").Signal<string>;
|
|
5511
|
+
protected readonly emptyCellClasses: import("@angular/core").Signal<string>;
|
|
5512
|
+
protected readonly weekdayClasses = "h-8 p-0 text-center align-middle text-label-xs font-normal text-text-muted";
|
|
5513
|
+
/**
|
|
5514
|
+
* The classes of the previous or next month button.
|
|
5515
|
+
* @internal
|
|
5516
|
+
*/
|
|
5517
|
+
navClasses(direction: 'previous' | 'next'): string;
|
|
5518
|
+
/**
|
|
5519
|
+
* The classes of a day cell.
|
|
5520
|
+
* @internal
|
|
5521
|
+
*/
|
|
5522
|
+
cellClasses(cell: CalendarCell): string;
|
|
5523
|
+
/**
|
|
5524
|
+
* The classes of a month or year cell: a little padding between the pills.
|
|
5525
|
+
* @internal
|
|
5526
|
+
*/
|
|
5527
|
+
pickCellClasses(cell: CalendarCell): string;
|
|
5528
|
+
/**
|
|
5529
|
+
* The classes of the mark inside a cell.
|
|
5530
|
+
* @internal
|
|
5531
|
+
*/
|
|
5532
|
+
markClasses(cell: CalendarCell, kind: 'day' | 'pick'): string;
|
|
5533
|
+
/**
|
|
5534
|
+
* Whether a date cannot be picked: it is outside `min`…`max` or `disabledDate` rules it out.
|
|
5535
|
+
* @param iso The ISO date to check.
|
|
5536
|
+
* @returns True when the date shows disabled.
|
|
5537
|
+
*/
|
|
5538
|
+
isDateDisabled(iso: string): boolean;
|
|
5539
|
+
/**
|
|
5540
|
+
* Focuses the cell that owns the tab stop of the grid on show; Signal Forms calls it from
|
|
5541
|
+
* `focusBoundControl()`.
|
|
5542
|
+
* @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.
|
|
5543
|
+
*/
|
|
5544
|
+
focus(options?: FocusOptions): void;
|
|
5545
|
+
/**
|
|
5546
|
+
* Picks `iso` as a click on its day would: ignored while disabled or read-only, and for an
|
|
5547
|
+
* invalid or disabled date. Shows its month.
|
|
5548
|
+
* @param iso The ISO date to pick.
|
|
5549
|
+
*/
|
|
5550
|
+
select(iso: string): void;
|
|
5551
|
+
/**
|
|
5552
|
+
* Shows the month `offset` months away (the previous/next buttons); ignored past `min`/`max`.
|
|
5553
|
+
* @internal
|
|
5554
|
+
*/
|
|
5555
|
+
showMonth(offset: number): void;
|
|
5556
|
+
/**
|
|
5557
|
+
* The title button: the day view opens the month view, the month view the year view.
|
|
5558
|
+
* @internal
|
|
5559
|
+
*/
|
|
5560
|
+
openNextView(): void;
|
|
5561
|
+
/**
|
|
5562
|
+
* A click on a day.
|
|
5563
|
+
* @internal
|
|
5564
|
+
*/
|
|
5565
|
+
pick(cell: CalendarCell): void;
|
|
5566
|
+
/**
|
|
5567
|
+
* A click (or Enter, Space) on a month of the month view: shows it in the day view.
|
|
5568
|
+
* @internal
|
|
5569
|
+
*/
|
|
5570
|
+
pickMonth(cell: CalendarCell): void;
|
|
5571
|
+
/**
|
|
5572
|
+
* A click (or Enter, Space) on a year of the year view: opens that year's month view.
|
|
5573
|
+
* @internal
|
|
5574
|
+
*/
|
|
5575
|
+
pickYear(cell: CalendarCell): void;
|
|
5576
|
+
/**
|
|
5577
|
+
* Escape in the month or year view returns to the day view (and stops there, so a popover
|
|
5578
|
+
* around the calendar stays open).
|
|
5579
|
+
* @internal
|
|
5580
|
+
*/
|
|
5581
|
+
onKeydown(event: KeyboardEvent): void;
|
|
5582
|
+
/**
|
|
5583
|
+
* Marks the field touched once focus leaves the calendar (not on moves between its cells).
|
|
5584
|
+
* @internal
|
|
5585
|
+
*/
|
|
5586
|
+
onFocusout(event: FocusEvent): void;
|
|
5587
|
+
/**
|
|
5588
|
+
* The day grid's keys: arrows by day and week (mirrored under RTL), Page Up/Down by month
|
|
5589
|
+
* (with Shift by year), Home/End to the week's ends, Enter/Space picks.
|
|
5590
|
+
* @internal
|
|
5591
|
+
*/
|
|
5592
|
+
onDayKeydown(event: KeyboardEvent): void;
|
|
5593
|
+
/**
|
|
5594
|
+
* The month view's keys: arrows by one month and by a row of three, Home/End to the row's
|
|
5595
|
+
* ends, Page Up/Down by a year, Enter/Space shows the month.
|
|
5596
|
+
* @internal
|
|
5597
|
+
*/
|
|
5598
|
+
onMonthKeydown(event: KeyboardEvent): void;
|
|
5599
|
+
/**
|
|
5600
|
+
* The year view's keys: arrows by one year and by a row of four, Home/End to the row's ends,
|
|
5601
|
+
* Page Up/Down by five rows, Enter/Space opens the year's months.
|
|
5602
|
+
* @internal
|
|
5603
|
+
*/
|
|
5604
|
+
onYearKeydown(event: KeyboardEvent): void;
|
|
5605
|
+
/** Moves the day grid's tab stop (and focus) to `iso`, showing its month. */
|
|
5606
|
+
private moveTo;
|
|
5607
|
+
/** +1 when ArrowRight moves forward, -1 under `dir="rtl"`, where the days run right to left. */
|
|
5608
|
+
private inlineStep;
|
|
5609
|
+
private cellMode;
|
|
5610
|
+
/** After the next render, focuses the tab stop of the grid on show; in the scrolling year view
|
|
5611
|
+
* it first scrolls the cell into the middle of the box (`center`, on opening) or just into view
|
|
5612
|
+
* (`nearest`, on a key move). */
|
|
5613
|
+
private focusAfterRender;
|
|
5614
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BfCalendarComponent, never>;
|
|
5615
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BfCalendarComponent, "bf-calendar", never, {
|
|
5616
|
+
"value": {
|
|
5617
|
+
"alias": "value";
|
|
5618
|
+
"required": false;
|
|
5619
|
+
"isSignal": true;
|
|
5620
|
+
};
|
|
5621
|
+
"month": {
|
|
5622
|
+
"alias": "month";
|
|
5623
|
+
"required": false;
|
|
5624
|
+
"isSignal": true;
|
|
5625
|
+
};
|
|
5626
|
+
"min": {
|
|
5627
|
+
"alias": "min";
|
|
5628
|
+
"required": false;
|
|
5629
|
+
"isSignal": true;
|
|
5630
|
+
};
|
|
5631
|
+
"max": {
|
|
5632
|
+
"alias": "max";
|
|
5633
|
+
"required": false;
|
|
5634
|
+
"isSignal": true;
|
|
5635
|
+
};
|
|
5636
|
+
"disabledDate": {
|
|
5637
|
+
"alias": "disabledDate";
|
|
5638
|
+
"required": false;
|
|
5639
|
+
"isSignal": true;
|
|
5640
|
+
};
|
|
5641
|
+
"firstDayOfWeek": {
|
|
5642
|
+
"alias": "firstDayOfWeek";
|
|
5643
|
+
"required": false;
|
|
5644
|
+
"isSignal": true;
|
|
5645
|
+
};
|
|
5646
|
+
"locale": {
|
|
5647
|
+
"alias": "locale";
|
|
5648
|
+
"required": false;
|
|
5649
|
+
"isSignal": true;
|
|
5650
|
+
};
|
|
5651
|
+
"today": {
|
|
5652
|
+
"alias": "today";
|
|
5653
|
+
"required": false;
|
|
5654
|
+
"isSignal": true;
|
|
5655
|
+
};
|
|
5656
|
+
"size": {
|
|
5657
|
+
"alias": "size";
|
|
5658
|
+
"required": false;
|
|
5659
|
+
"isSignal": true;
|
|
5660
|
+
};
|
|
5661
|
+
"disabled": {
|
|
5662
|
+
"alias": "disabled";
|
|
5663
|
+
"required": false;
|
|
5664
|
+
"isSignal": true;
|
|
5665
|
+
};
|
|
5666
|
+
"readonly": {
|
|
5667
|
+
"alias": "readonly";
|
|
5668
|
+
"required": false;
|
|
5669
|
+
"isSignal": true;
|
|
5670
|
+
};
|
|
5671
|
+
"required": {
|
|
5672
|
+
"alias": "required";
|
|
5673
|
+
"required": false;
|
|
5674
|
+
"isSignal": true;
|
|
5675
|
+
};
|
|
5676
|
+
"invalid": {
|
|
5677
|
+
"alias": "invalid";
|
|
5678
|
+
"required": false;
|
|
5679
|
+
"isSignal": true;
|
|
5680
|
+
};
|
|
5681
|
+
"touched": {
|
|
5682
|
+
"alias": "touched";
|
|
5683
|
+
"required": false;
|
|
5684
|
+
"isSignal": true;
|
|
5685
|
+
};
|
|
5686
|
+
"errors": {
|
|
5687
|
+
"alias": "errors";
|
|
5688
|
+
"required": false;
|
|
5689
|
+
"isSignal": true;
|
|
5690
|
+
};
|
|
5691
|
+
"errorMessage": {
|
|
5692
|
+
"alias": "errorMessage";
|
|
5693
|
+
"required": false;
|
|
5694
|
+
"isSignal": true;
|
|
5695
|
+
};
|
|
5696
|
+
"label": {
|
|
5697
|
+
"alias": "label";
|
|
5698
|
+
"required": false;
|
|
5699
|
+
"isSignal": true;
|
|
5700
|
+
};
|
|
5701
|
+
"ariaLabel": {
|
|
5702
|
+
"alias": "ariaLabel";
|
|
5703
|
+
"required": false;
|
|
5704
|
+
"isSignal": true;
|
|
5705
|
+
};
|
|
5706
|
+
"ariaLabelledby": {
|
|
5707
|
+
"alias": "ariaLabelledby";
|
|
5708
|
+
"required": false;
|
|
5709
|
+
"isSignal": true;
|
|
5710
|
+
};
|
|
5711
|
+
"name": {
|
|
5712
|
+
"alias": "name";
|
|
5713
|
+
"required": false;
|
|
5714
|
+
"isSignal": true;
|
|
5715
|
+
};
|
|
5716
|
+
"id": {
|
|
5717
|
+
"alias": "id";
|
|
5718
|
+
"required": false;
|
|
5719
|
+
"isSignal": true;
|
|
5720
|
+
};
|
|
5721
|
+
}, {
|
|
5722
|
+
"value": "valueChange";
|
|
5723
|
+
"month": "monthChange";
|
|
5724
|
+
"changed": "changed";
|
|
5725
|
+
"picked": "picked";
|
|
5726
|
+
"touch": "touch";
|
|
5727
|
+
}, never, never, true, never>;
|
|
5728
|
+
}
|
|
5729
|
+
/** An error as a field reads it: its kind and optional message; limit fields (`minLength`,
|
|
5730
|
+
* `context.requiredLength`, …) are read through type guards by `bfValidationMessage`. */
|
|
5731
|
+
type FieldErrorLike = Pick<ValidationError, 'kind' | 'message'>;
|
|
5732
|
+
/**
|
|
5733
|
+
* Explicit error message wins; otherwise, once the field was touched, the first form error's text:
|
|
5734
|
+
* its own `message`, else the default for its kind from `messages` (`BF_LABELS.validation`).
|
|
5735
|
+
*/
|
|
5736
|
+
declare function fieldErrorText(errorMessage: string, touched: boolean, errors: readonly FieldErrorLike[], messages: BfValidationMessages): string;
|
|
5737
|
+
/** The visual error state: any error text, or a field the form marked invalid after it was touched. */
|
|
5738
|
+
declare function fieldShowsError(errorText: string, invalid: boolean, touched: boolean): boolean;
|
|
5739
|
+
/**
|
|
5740
|
+
* `aria-describedby` targets: the help paragraph and the error paragraph under it, each while it
|
|
5741
|
+
* is rendered (`"<id>-help <id>-error"`, `"<id>-help"`, `"<id>-error"`), else none.
|
|
5742
|
+
*/
|
|
5743
|
+
declare function fieldDescribedBy(id: string, errorText: string, helpText: string): string | null;
|
|
5744
|
+
/** `aria-errormessage` target: the error paragraph while the control is invalid, else none. */
|
|
5745
|
+
declare function fieldErrorMessageId(id: string, errorText: string, showError: boolean): string | null;
|
|
5746
|
+
/**
|
|
5747
|
+
* Returns a document-unique id such as `bf-input-3`, for associating labels and hints with controls.
|
|
5748
|
+
*
|
|
5749
|
+
* The ids come from this module-level counter, so a server render and the client (or two server
|
|
5750
|
+
* renders in one process) number them differently: `@bitforgehq/ui` 0.x is client-rendered only,
|
|
5751
|
+
* and SSR, hydration and prerendering of pages that render its components are not supported.
|
|
3480
5752
|
* Hydration-stable ids are decided before 1.0.
|
|
3481
5753
|
*/
|
|
3482
5754
|
declare function uniqueId(prefix: string): string;
|
|
5755
|
+
/** One plain date's parts; `month` is 1–12. */
|
|
5756
|
+
interface CalendarDate {
|
|
5757
|
+
readonly year: number;
|
|
5758
|
+
readonly month: number;
|
|
5759
|
+
readonly day: number;
|
|
5760
|
+
}
|
|
5761
|
+
/** One calendar month's parts; `month` is 1–12. */
|
|
5762
|
+
interface CalendarMonth {
|
|
5763
|
+
readonly year: number;
|
|
5764
|
+
readonly month: number;
|
|
5765
|
+
}
|
|
5766
|
+
/** The number of days in `month` (1–12) of `year`, leap years included. */
|
|
5767
|
+
declare function daysInMonth(year: number, month: number): number;
|
|
5768
|
+
/** The parts of an ISO date 'YYYY-MM-DD', or `null` for anything else (a wrong day, a time). */
|
|
5769
|
+
declare function parseIsoDate(value: string | null | undefined): CalendarDate | null;
|
|
5770
|
+
/** The parts of an ISO month 'YYYY-MM', or `null` for anything else. */
|
|
5771
|
+
declare function parseIsoMonth(value: string | null | undefined): CalendarMonth | null;
|
|
5772
|
+
/** The ISO date of the parts: '2026-03-07'. */
|
|
5773
|
+
declare function formatIsoDate({ year, month, day }: CalendarDate): string;
|
|
5774
|
+
/** The ISO month of the parts: '2026-03'. */
|
|
5775
|
+
declare function formatIsoMonth({ year, month }: CalendarMonth): string;
|
|
5776
|
+
/** `iso` itself when it is a valid ISO date, else `null`. */
|
|
5777
|
+
declare function validIsoDate(iso: string | null | undefined): string | null;
|
|
5778
|
+
/** The month 'YYYY-MM' an ISO date falls in. */
|
|
5779
|
+
declare function isoMonthOf(iso: string): string;
|
|
5780
|
+
/** The first day of an ISO month. */
|
|
5781
|
+
declare function firstOfMonth(isoMonth: string): string;
|
|
5782
|
+
/** The last day of an ISO month. */
|
|
5783
|
+
declare function lastOfMonth(isoMonth: string): string;
|
|
5784
|
+
/** A Date at UTC midnight of the parts, for Intl.DateTimeFormat with `timeZone: 'UTC'`. */
|
|
5785
|
+
declare function toUtcDate({ year, month, day }: CalendarDate): Date;
|
|
5786
|
+
/** `iso` moved by `days` (negative goes back); an invalid `iso` is returned as it is. */
|
|
5787
|
+
declare function addDays(iso: string, days: number): string;
|
|
5788
|
+
/** `iso` moved by `months`, the day clamped to the target month's length (Jan 31 + 1 → Feb 28). */
|
|
5789
|
+
declare function addMonths(iso: string, months: number): string;
|
|
5790
|
+
/** `iso` moved by `years`, Feb 29 clamped to Feb 28 in a common year. */
|
|
5791
|
+
declare function addYears(iso: string, years: number): string;
|
|
5792
|
+
/** An ISO month moved by `months`. */
|
|
5793
|
+
declare function addIsoMonths(isoMonth: string, months: number): string;
|
|
5794
|
+
/** The weekday of an ISO date: 0 Sunday … 6 Saturday, as `Date.getDay()` counts. */
|
|
5795
|
+
declare function weekdayOf(iso: string): number;
|
|
5796
|
+
/** The first day of the week `iso` is in, for weeks starting on `firstDay` (0 Sunday … 6). */
|
|
5797
|
+
declare function startOfWeek(iso: string, firstDay: number): string;
|
|
5798
|
+
/** The last day of the week `iso` is in, for weeks starting on `firstDay`. */
|
|
5799
|
+
declare function endOfWeek(iso: string, firstDay: number): string;
|
|
5800
|
+
/**
|
|
5801
|
+
* The weeks of a month as rows of seven ISO dates from `firstDay` on, `null` for the days of the
|
|
5802
|
+
* neighbouring months: four to six rows.
|
|
5803
|
+
*/
|
|
5804
|
+
declare function monthWeeks(isoMonth: string, firstDay: number): (string | null)[][];
|
|
5805
|
+
/** -1, 0 or 1 as ISO date (or month) `a` falls before, on or after `b`. */
|
|
5806
|
+
declare function compareIso(a: string, b: string): number;
|
|
5807
|
+
/** `iso` kept inside `min`…`max` (either bound may be missing). */
|
|
5808
|
+
declare function clampIso(iso: string, min: string | null, max: string | null): string;
|
|
5809
|
+
/** The device's local calendar date of `now` (the day the user sees on their clock). */
|
|
5810
|
+
declare function localIsoDate(now?: Date): string;
|
|
3483
5811
|
/** The positioned, empty ::after that carries the extension; add one inset class beside it. */
|
|
3484
5812
|
declare const COARSE_HIT_BASE = "pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:content-['']";
|
|
3485
5813
|
/**
|
|
@@ -3487,6 +5815,26 @@ declare const COARSE_HIT_BASE = "pointer-coarse:after:absolute pointer-coarse:af
|
|
|
3487
5815
|
* (1.5 px border) position the ::after inside the border, so their inset adds the border back.
|
|
3488
5816
|
*/
|
|
3489
5817
|
declare const PILL_HIT: Record<BfSize, Record<'plain' | 'bordered', string>>;
|
|
5818
|
+
/** Where a nav item sits: a vertical sidebar or a horizontal top row. */
|
|
5819
|
+
type BfNavLayout = 'sidebar' | 'top';
|
|
5820
|
+
/** What `a[bfNavItem]`, `bf-nav-group` and `bf-sidebar-toggle` read from the enclosing `bf-sidebar`
|
|
5821
|
+
* or `bf-top-nav`. */
|
|
5822
|
+
interface BfNavHost {
|
|
5823
|
+
/** The host's layout: full-width rows in a sidebar, inline items in a top row. */
|
|
5824
|
+
readonly layout: BfNavLayout;
|
|
5825
|
+
/** True while the sidebar is collapsed to an icon rail; always false in a top nav. */
|
|
5826
|
+
readonly collapsed: Signal<boolean>;
|
|
5827
|
+
/** The id of the host's `nav` element (for a toggle's `aria-controls`); null in a top nav. */
|
|
5828
|
+
readonly navId: string | null;
|
|
5829
|
+
/** Writes the sidebar's `collapsed` model, as a user change; does nothing in a top nav. */
|
|
5830
|
+
setCollapsed(collapsed: boolean): void;
|
|
5831
|
+
}
|
|
5832
|
+
/**
|
|
5833
|
+
* Provided by `bf-sidebar` and `bf-top-nav`, so their items and groups follow the layout and the
|
|
5834
|
+
* collapsed state without the item files importing the container files. `bf-sidebar-toggle`
|
|
5835
|
+
* (`@bitforgehq/ui/overlay`) reads and flips the state through it, as the internal `ɵBF_NAV`.
|
|
5836
|
+
*/
|
|
5837
|
+
declare const BF_NAV: InjectionToken<BfNavHost>;
|
|
3490
5838
|
/**
|
|
3491
5839
|
* Removes what overlays and themes leave on a document: the `dark` and `cdk-global-scrollblock`
|
|
3492
5840
|
* classes on `<html>`, `inert` on the children of `<body>`, and every child of a
|
|
@@ -3496,4 +5844,4 @@ declare const PILL_HIT: Record<BfSize, Record<'plain' | 'bordered', string>>;
|
|
|
3496
5844
|
declare function resetBfDocument(document: Document): void;
|
|
3497
5845
|
/** Runs `resetBfDocument()` when the environment injector that holds it is destroyed. Internal. */
|
|
3498
5846
|
declare function provideBfDocumentReset(): EnvironmentProviders;
|
|
3499
|
-
export { type BfAlertVariant, type BfAutocapitalize, type BfAvatarSize, type BfAvatarVariant, type BfBadgeVariant, type BfButtonSize, type BfButtonType, type BfButtonVariant, type BfCardPadding, type BfCardVariant, type BfChipGroupMode, type BfChipVariant, type BfCompareWith, type BfDefaults, type BfDefaultsOptions, type BfEmptyStateHeadingLevel, type BfEnterKeyHint, type BfFieldControlState, type BfFieldSize, type BfIconButtonVariant, type BfInputAutocapitalize, type BfInputEnterKeyHint, type BfInputInputMode, type BfInputMode, type BfInputType, type BfLabels, type BfLabelsOverrides, type BfProgressSize, type BfProgressTone, type BfRadioGroupOrientation, type BfRadioOption, type BfSegmentOption, type BfSegmentedSize, type BfSelectOption, type BfSize, type BfSpinnerSize, type BfTabBarController, type BfTabBarHost, type BfTabLinks, type BfToggleLabelPosition, type BfValidationMessages, BUTTON_CLASSES as ɵBF_BUTTON_CLASSES, ICON_BUTTON_CLASSES as ɵBF_ICON_BUTTON_CLASSES, FIELD_BOX as ɵFIELD_BOX, FIELD_ICON_END as ɵFIELD_ICON_END, FIELD_ICON_START as ɵFIELD_ICON_START, FIELD_PADDING_END as ɵFIELD_PADDING_END, FIELD_PADDING_START as ɵFIELD_PADDING_START, PILL_HIT as ɵPILL_HIT, fieldDescribedBy as ɵfieldDescribedBy, fieldErrorMessageId as ɵfieldErrorMessageId, fieldErrorText as ɵfieldErrorText, fieldShowsError as ɵfieldShowsError, provideBfDocumentReset as ɵprovideBfDocumentReset, uniqueId as ɵuniqueId };
|
|
5847
|
+
export { type BfAlertVariant, type BfAppFrameBreakpoint, type BfAppFrameContentWidth, type BfAutocapitalize, type BfAvatarSize, type BfAvatarVariant, type BfBadgeAppearance, type BfBadgeVariant, type BfButtonAppearance, type BfButtonSize, type BfButtonType, type BfButtonVariant, type BfCalendarDisabledDate, type BfCalendarWeekday, type BfCardPadding, type BfCardVariant, type BfChipGroupMode, type BfChipVariant, type BfColorScheme, type BfCompareWith, type BfDefaults, type BfDefaultsOptions, type BfDescriptionListLayout, type BfEmptyStateHeading, type BfEmptyStateHeadingLevel, type BfEnterKeyHint, type BfFieldControlState, type BfFieldSize, type BfIconButtonVariant, type BfInputAutocapitalize, type BfInputEnterKeyHint, type BfInputInputMode, type BfInputMode, type BfInputType, type BfLabels, type BfLabelsOverrides, type BfPageHeaderHeadingLevel, type BfProgressSize, type BfProgressTone, type BfRadioGroupOrientation, type BfRadioOption, type BfSegmentOption, type BfSegmentedSize, type BfSelectOption, type BfSize, type BfSkeletonShape, type BfSpinnerSize, type BfStatAppearance, type BfStatTrend, type BfStatTrendIntent, type BfStatVariant, type BfTabBarController, type BfTabBarHost, type BfTabLinks, type BfTableAlign, type BfTableCellContext, type BfTableColumn, type BfTableRowKey, type BfTableSort, type BfTableSortDirection, type BfTableStack, type BfToggleLabelPosition, type BfValidationMessages, BUTTON_CLASSES as ɵBF_BUTTON_CLASSES, ICON_BUTTON_CLASSES as ɵBF_ICON_BUTTON_CLASSES, BF_NAV as ɵBF_NAV, type BfNavHost as ɵBfNavHost, FIELD_BOX as ɵFIELD_BOX, FIELD_ICON_END as ɵFIELD_ICON_END, FIELD_ICON_START as ɵFIELD_ICON_START, FIELD_PADDING_END as ɵFIELD_PADDING_END, FIELD_PADDING_START as ɵFIELD_PADDING_START, PILL_HIT as ɵPILL_HIT, compareIso as ɵcompareIso, createMemoryColorSchemeStorage as ɵcreateMemoryColorSchemeStorage, daysInMonth as ɵdaysInMonth, fieldDescribedBy as ɵfieldDescribedBy, fieldErrorMessageId as ɵfieldErrorMessageId, fieldErrorText as ɵfieldErrorText, fieldShowsError as ɵfieldShowsError, formatIsoDate as ɵformatIsoDate, localIsoDate as ɵlocalIsoDate, parseIsoDate as ɵparseIsoDate, provideBfDocumentReset as ɵprovideBfDocumentReset, uniqueId as ɵuniqueId, validIsoDate as ɵvalidIsoDate };
|