@bitforgehq/ui 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/README.md +4 -4
  3. package/ai/MANIFEST.index.json +36 -0
  4. package/ai/MANIFEST.json +436 -24
  5. package/ai/REFERENCE.index.json +35 -0
  6. package/ai/REFERENCE.json +202 -10
  7. package/ai/UI_GUIDE.md +25 -4
  8. package/ai/components/app-frame.md +14 -7
  9. package/ai/components/badge.md +39 -2
  10. package/ai/components/header.md +9 -0
  11. package/ai/components/list-item.md +105 -9
  12. package/ai/components/step.md +112 -0
  13. package/ai/components/steps.md +124 -0
  14. package/ai/components/table.md +119 -5
  15. package/ai/components/timeline-event.md +144 -0
  16. package/ai/components/timeline.md +201 -0
  17. package/ai/components/toggle.md +11 -1
  18. package/ai/reference/bf-action-directive.md +3 -1
  19. package/ai/reference/bf-badge-emphasis.md +27 -0
  20. package/ai/reference/bf-labels.md +2 -0
  21. package/ai/reference/bf-select-harness.md +4 -0
  22. package/ai/reference/bf-step-heading-level.md +28 -0
  23. package/ai/reference/bf-table-align.md +1 -1
  24. package/ai/reference/bf-table-column-align.md +33 -0
  25. package/ai/reference/bf-table-column.md +7 -7
  26. package/ai/reference/bf-table-harness.md +18 -0
  27. package/ai/reference/bf-timeline-tone.md +31 -0
  28. package/ai/reference/bf-toggle-harness.md +55 -0
  29. package/ai/reference/provide-bf-labels.md +2 -2
  30. package/dark-ink.css +124 -0
  31. package/fesm2022/bitforgehq-ui-mobile.mjs +13 -3
  32. package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
  33. package/fesm2022/bitforgehq-ui-testing.mjs +55 -2
  34. package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
  35. package/fesm2022/bitforgehq-ui.mjs +714 -46
  36. package/fesm2022/bitforgehq-ui.mjs.map +1 -1
  37. package/llms-full.txt +1128 -26
  38. package/llms.txt +9 -0
  39. package/package.json +2 -1
  40. package/theme.css +37 -0
  41. package/types/bitforgehq-ui-testing.d.ts +90 -1
  42. package/types/bitforgehq-ui.d.ts +306 -18
@@ -1 +1 @@
1
- {"version":3,"file":"bitforgehq-ui.mjs","names":[],"sources":["../../../projects/ui/src/config/defaults.ts","../../../projects/ui/src/config/labels.ts","../../../projects/ui/src/config/color-scheme.ts","../../../projects/ui/src/config/sidebar-state.ts","../../../projects/ui/src/config/validation-messages.ts","../../../projects/ui/src/components/spinner/spinner.component.ts","../../../projects/ui/src/components/_shared/hit-classes.ts","../../../projects/ui/src/components/button/button.component.ts","../../../projects/ui/src/components/icon-button/icon-button.component.ts","../../../projects/ui/src/components/badge/badge.component.ts","../../../projects/ui/src/components/_shared/pointer-hold.ts","../../../projects/ui/src/components/field/field.component.ts","../../../projects/ui/src/components/_shared/field-classes.ts","../../../projects/ui/src/components/_shared/field-state.ts","../../../projects/ui/src/components/_shared/unique-id.ts","../../../projects/ui/src/components/input/input.component.ts","../../../projects/ui/src/components/textarea/textarea.component.ts","../../../projects/ui/src/components/_shared/choice.ts","../../../projects/ui/src/components/select/select.component.ts","../../../projects/ui/src/components/checkbox/checkbox.component.ts","../../../projects/ui/src/components/toggle/toggle.component.ts","../../../projects/ui/src/components/radio-group/radio-group.component.ts","../../../projects/ui/src/components/chip-group/chip-group.token.ts","../../../projects/ui/src/components/chip/chip.component.ts","../../../projects/ui/src/components/chip-group/chip-group.component.ts","../../../projects/ui/src/components/segmented/segmented.component.ts","../../../projects/ui/src/components/theme-switch/theme-switch.component.ts","../../../projects/ui/src/components/list/list.token.ts","../../../projects/ui/src/components/list/list.component.ts","../../../projects/ui/src/components/action/action-host.token.ts","../../../projects/ui/src/components/list/list-item.component.ts","../../../projects/ui/src/components/card/card.component.ts","../../../projects/ui/src/components/progress/progress.component.ts","../../../projects/ui/src/components/avatar/avatar.component.ts","../../../projects/ui/src/components/alert/alert.component.ts","../../../projects/ui/src/components/empty-state/empty-state.component.ts","../../../projects/ui/src/components/action-bar/action-bar.component.ts","../../../projects/ui/src/components/tab-bar/tab-bar.token.ts","../../../projects/ui/src/components/tab-bar/tab.component.ts","../../../projects/ui/src/components/tab-bar/tab-bar.component.ts","../../../projects/ui/src/components/action/action.directive.ts","../../../projects/ui/src/components/tab-group/tab-group.token.ts","../../../projects/ui/src/components/tab-group/tab-panel.component.ts","../../../projects/ui/src/components/tab-group/tab-group.component.ts","../../../projects/ui/src/components/page-header/page-header.component.ts","../../../projects/ui/src/components/toolbar/toolbar.component.ts","../../../projects/ui/src/components/table/table-cell.directive.ts","../../../projects/ui/src/components/table/table.component.ts","../../../projects/ui/src/components/description-list/description-list.token.ts","../../../projects/ui/src/components/description-list/description-list.component.ts","../../../projects/ui/src/components/description-list/description-item.component.ts","../../../projects/ui/src/components/stat/stat.component.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb.token.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb-item.component.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb.component.ts","../../../projects/ui/src/components/sidebar/nav.token.ts","../../../projects/ui/src/components/sidebar/sidebar.component.ts","../../../projects/ui/src/components/sidebar/top-nav.component.ts","../../../projects/ui/src/components/sidebar/nav-group.component.ts","../../../projects/ui/src/components/sidebar/nav-item.component.ts","../../../projects/ui/src/components/app-frame/app-frame.component.ts","../../../projects/ui/src/components/skeleton/skeleton.component.ts","../../../projects/ui/src/components/pagination/pagination.component.ts","../../../projects/ui/src/components/calendar/calendar-date.ts","../../../projects/ui/src/components/calendar/calendar.component.ts","../../../projects/ui/src/config/document-reset.ts"],"sourcesContent":["import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { BfSize } from './size';\n\n/**\n * App-wide widget defaults, read by every sized widget whose `size` input is left unset.\n *\n * @summary The default height steps of text fields and of actions and choice controls\n * @since 0.3.0\n */\nexport interface BfDefaults {\n /**\n * Height step of text fields: bf-input, bf-number-input, bf-select, bf-textarea.\n * @default 'md'\n */\n readonly fieldSize: BfSize;\n /**\n * Height step of actions and choice controls: bf-button, bf-icon-button, bf-chip, bf-segmented,\n * bf-checkbox, bf-toggle, bf-radio-group.\n * @default 'md'\n */\n readonly controlSize: BfSize;\n}\n\n/**\n * Options of `provideBfDefaults()`: any step left out keeps the parent injector's value.\n *\n * @summary The size steps provideBfDefaults sets, each one falling back to the parent\n * @since 0.3.0\n */\nexport interface BfDefaultsOptions extends Partial<BfDefaults> {\n /** Sets `fieldSize` and `controlSize` together; an explicit `fieldSize`/`controlSize` wins. */\n readonly size?: BfSize;\n}\n\n/**\n * Library defaults: compact `md` everywhere (desktop first).\n *\n * @summary The library's built-in widget defaults, the compact md step everywhere\n * @since 0.3.0\n */\nexport const BF_DEFAULT_VALUES: BfDefaults = { fieldSize: 'md', controlSize: 'md' };\n\n/**\n * The widget defaults in effect for the current injector; set them with `provideBfDefaults()`.\n *\n * @summary Injection token holding the widget defaults in effect for an injector\n * @since 0.3.0\n */\nexport const BF_DEFAULTS = new InjectionToken<BfDefaults>('BF_DEFAULTS', {\n providedIn: 'root',\n factory: () => BF_DEFAULT_VALUES,\n});\n\n/**\n * App-wide (ApplicationConfig) or sub-tree (a component's `providers`) widget defaults, merged\n * over the nearest parent's. Capacitor apps: `provideBfDefaults({ fieldSize: 'lg' })` keeps the\n * 0.2 phone look; `{ size: 'lg' }` enlarges every control.\n *\n * @param options The steps to set; any step left out keeps the parent's.\n * @returns The provider of `BF_DEFAULTS`.\n * @summary Sets the default field and control sizes for an app or a sub-tree\n * @since 0.3.0\n */\nexport function provideBfDefaults(options: BfDefaultsOptions): Provider {\n return {\n provide: BF_DEFAULTS,\n useFactory: (): BfDefaults => {\n const parent = inject(BF_DEFAULTS, { skipSelf: true, optional: true }) ?? BF_DEFAULT_VALUES;\n return {\n fieldSize: options.fieldSize ?? options.size ?? parent.fieldSize,\n controlSize: options.controlSize ?? options.size ?? parent.controlSize,\n };\n },\n };\n}\n","import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { BfValidationMessages } from './validation-messages';\n\n/**\n * Every built-in user-facing string of the library; replace any of them with `provideBfLabels()`.\n *\n * @summary Every built-in user-facing string of the library, one key per string\n * @since 0.3.0\n */\nexport interface BfLabels {\n /**\n * bf-spinner's accessible name (a loading bf-button's spinner is decorative and has none).\n * @default 'Loading'\n */\n readonly loading: string;\n /**\n * bf-alert's dismiss button.\n * @default 'Dismiss'\n */\n readonly dismiss: string;\n /**\n * bf-tab-bar's navigation name.\n * @default 'Main'\n */\n readonly tabBar: string;\n /**\n * bf-tab's announcement of a numeric badge.\n * @default (count) => `${count} new`\n */\n readonly tabBadge: (count: number) => string;\n /**\n * bf-back-button's label.\n * @default 'Back'\n */\n readonly back: string;\n /**\n * BfAlertDialogService's default button.\n * @default 'OK'\n */\n readonly ok: string;\n /**\n * BfActionSheetService's cancel row.\n * @default 'Cancel'\n */\n readonly cancel: string;\n /**\n * An action sheet's name when it has no title.\n * @default 'Actions'\n */\n readonly actions: string;\n /**\n * bf-sheet's name without an ariaLabel or heading.\n * @default 'Sheet'\n */\n readonly sheet: string;\n /**\n * bf-modal's name without an ariaLabel or heading.\n * @default 'Modal'\n */\n readonly modal: string;\n /**\n * bf-refresher's status while refreshing.\n * @default 'Refreshing'\n */\n readonly refreshing: string;\n /**\n * bf-dialog's and bf-side-panel's close button, and bf-sheet's screen-reader Close.\n * @default 'Close'\n */\n readonly close: string;\n /**\n * bf-sheet's grabber button below the top snap point: the next press expands the sheet.\n * @default 'Expand'\n */\n readonly expand: string;\n /**\n * bf-sheet's grabber button at the top snap point: the next press collapses the sheet.\n * @default 'Collapse'\n */\n readonly collapse: string;\n /**\n * bf-sheet's snap position (1-based), announced politely when it changes and part of the\n * grabber button's name.\n * @default (position, count) => `Sheet at ${position} of ${count}`\n */\n readonly sheetPosition: (position: number, count: number) => string;\n /**\n * A dialog's or side panel's name without an ariaLabel, a title or a heading.\n * @default 'Dialog'\n */\n readonly dialog: string;\n /**\n * The desktop toast stack's region name.\n * @default 'Notifications'\n */\n readonly notifications: string;\n /**\n * bf-table's header checkbox, which selects or clears every row.\n * @default 'Select all rows'\n */\n readonly tableSelectAll: string;\n /**\n * The label of a stacked bf-table's sort select.\n * @default 'Sort by'\n */\n readonly tableSortBy: string;\n /**\n * A stacked bf-table's sort option for a column in ascending order.\n * @default (column) => `${column}, ascending`\n */\n readonly tableSortAscending: (column: string) => string;\n /**\n * A stacked bf-table's sort option for a column in descending order.\n * @default (column) => `${column}, descending`\n */\n readonly tableSortDescending: (column: string) => string;\n /**\n * bf-theme-switch's and bf-theme-menu-button's name without a label.\n * @default 'Theme'\n */\n readonly theme: string;\n /**\n * The theme choice that follows the system's colour scheme.\n * @default 'System'\n */\n readonly themeSystem: string;\n /**\n * The theme choice that forces the light colour scheme.\n * @default 'Light'\n */\n readonly themeLight: string;\n /**\n * The theme choice that forces the dark colour scheme.\n * @default 'Dark'\n */\n readonly themeDark: string;\n\n /**\n * bf-breadcrumb's navigation name.\n * @default 'Breadcrumb'\n */\n readonly breadcrumb: string;\n /**\n * bf-breadcrumb's ellipsis button, which shows the levels a `maxItems` trail hides.\n * @default (count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`)\n */\n readonly breadcrumbExpand: (count: number) => string;\n\n /**\n * bf-sidebar's and bf-top-nav's navigation name.\n * @default 'Main'\n */\n readonly navigation: string;\n /**\n * a[bfNavItem]'s announcement of its count badge.\n * @default (count) => `${count} new`\n */\n readonly navBadge: (count: number) => string;\n /**\n * bf-sidebar-toggle's name and tooltip while the sidebar is expanded.\n * @default 'Collapse sidebar'\n */\n readonly sidebarCollapse: string;\n /**\n * bf-sidebar-toggle's name and tooltip while the sidebar is an icon rail.\n * @default 'Expand sidebar'\n */\n readonly sidebarExpand: string;\n /**\n * bf-app-frame's skip link, the first stop of the tab order, which moves focus to the content.\n * @default 'Skip to main content'\n */\n readonly skipToContent: string;\n\n /**\n * bf-pagination's navigation name.\n * @default 'Pagination'\n */\n readonly pagination: string;\n /**\n * bf-pagination's button to the previous page.\n * @default 'Previous page'\n */\n readonly previousPage: string;\n /**\n * bf-pagination's button to the next page.\n * @default 'Next page'\n */\n readonly nextPage: string;\n /**\n * bf-pagination's compact position text, such as \"Page 3 of 12\".\n * @default (page, count) => `Page ${page} of ${count}`\n */\n readonly pageOf: (page: number, count: number) => string;\n /**\n * bf-pagination's name of one page button, such as \"Page 3\".\n * @default (page) => `Page ${page}`\n */\n readonly goToPage: (page: number) => string;\n /**\n * bf-tab-group's tablist name.\n * @default 'Tabs'\n */\n readonly tabGroup: string;\n /**\n * bf-calendar's button that shows the previous month.\n * @default 'Previous month'\n */\n readonly calendarPreviousMonth: string;\n /**\n * bf-calendar's button that shows the next month.\n * @default 'Next month'\n */\n readonly calendarNextMonth: string;\n /**\n * bf-calendar's title button in the day view, which opens the month view; read after the\n * visible month and year.\n * @default 'Choose month'\n */\n readonly calendarChooseMonth: string;\n /**\n * bf-calendar's title button in the month view, which opens the year view; read after the\n * visible year.\n * @default 'Choose year'\n */\n readonly calendarChooseYear: string;\n /**\n * bf-stat's hidden direction word before an upward delta, so colour is never the only signal.\n * @default 'Up'\n */\n readonly statTrendUp: string;\n /**\n * bf-stat's hidden direction word before a downward delta.\n * @default 'Down'\n */\n readonly statTrendDown: string;\n /**\n * bf-stat's hidden direction word before an unchanged (flat) delta.\n * @default 'No change'\n */\n readonly statTrendFlat: string;\n /**\n * bf-combobox's and bf-multi-combobox's list row when no option matches the typed text.\n * @default 'No results'\n */\n readonly comboboxEmpty: string;\n /**\n * bf-multi-combobox's remove button on a picked value's tag.\n * @default (label) => `Remove ${label}`\n */\n readonly comboboxRemove: (label: string) => string;\n /**\n * The day part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"dd\").\n * @default 'Day'\n */\n readonly dateInputDay: string;\n /**\n * The month part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"mm\").\n * @default 'Month'\n */\n readonly dateInputMonth: string;\n /**\n * The year part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"yyyy\").\n * @default 'Year'\n */\n readonly dateInputYear: string;\n /**\n * The button of bf-date-input and bf-datetime-input that opens the calendar, and the panel's name.\n * @default 'Choose date'\n */\n readonly dateInputOpenCalendar: string;\n /**\n * The error of bf-date-input and bf-datetime-input while the date is incomplete or does not\n * exist (31 February).\n * @default 'Enter a valid date'\n */\n readonly dateInputInvalid: string;\n /**\n * The error of bf-date-input and bf-datetime-input for a typed date that `disabledDate` rules out.\n * @default 'This date is not available'\n */\n readonly dateInputUnavailable: string;\n /**\n * The hour part of bf-time-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"hh\").\n * @default 'Hour'\n */\n readonly timeInputHour: string;\n /**\n * The minute part of bf-time-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"mm\").\n * @default 'Minute'\n */\n readonly timeInputMinute: string;\n /**\n * The second part of bf-time-input with `seconds`; its first letter is the part's placeholder\n * (\"ss\").\n * @default 'Second'\n */\n readonly timeInputSecond: string;\n /**\n * The AM/PM part of bf-time-input and bf-datetime-input under a 12-hour clock.\n * @default 'AM/PM'\n */\n readonly timeInputDayPeriod: string;\n /**\n * The button of bf-time-input that opens the list of times, and the list's name.\n * @default 'Choose time'\n */\n readonly timeInputOpenList: string;\n /**\n * The error of bf-time-input and bf-datetime-input while the time is incomplete.\n * @default 'Enter a valid time'\n */\n readonly timeInputInvalid: string;\n /**\n * The error of bf-time-input and bf-datetime-input below `min`, given the limit as the locale\n * writes it.\n * @default (time) => `Pick ${time} or later`\n */\n readonly timeInputMin: (time: string) => string;\n /**\n * The error of bf-time-input and bf-datetime-input above `max`, given the limit as the locale\n * writes it.\n * @default (time) => `Pick ${time} or earlier`\n */\n readonly timeInputMax: (time: string) => string;\n /**\n * The name of a chart from `@bitforgehq/ui/charts` that has no `label` (and no `bf-chart-card` title).\n * @default 'Chart'\n */\n readonly chart: string;\n /**\n * The name of a chart's legend, the group of buttons that show and hide its series.\n * @default 'Legend'\n */\n readonly chartLegend: string;\n /**\n * The name of a chart's plot, the focusable area whose arrow keys move between the values.\n * @default 'Data points, arrow keys move between them'\n */\n readonly chartValues: string;\n /**\n * A chart's button that shows its data as a table.\n * @default 'Show data'\n */\n readonly chartShowData: string;\n /**\n * A chart's button that hides its data table again.\n * @default 'Hide data'\n */\n readonly chartHideData: string;\n /**\n * The first column header of a chart's data table.\n * @default 'Category'\n */\n readonly chartCategory: string;\n /**\n * The value column header of a bf-donut-chart's data table.\n * @default 'Value'\n */\n readonly chartValue: string;\n /**\n * bf-chart-card's text when it has no data and no `empty` slot.\n * @default 'No data to show'\n */\n readonly chartEmpty: string;\n /**\n * bf-chart-card's text when its data failed to load and it has no `error` slot.\n * @default 'The data could not be loaded'\n */\n readonly chartError: string;\n /** Default error text per validator kind (see `BfValidationMessages`). */\n readonly validation: BfValidationMessages;\n}\n\n/**\n * Options of `provideBfLabels()`: any key left out keeps the parent injector's string.\n *\n * @summary The strings provideBfLabels replaces, each one falling back to the parent\n * @since 0.3.0\n */\nexport type BfLabelsOverrides = Partial<Omit<BfLabels, 'validation'>> & {\n readonly validation?: Partial<BfValidationMessages>;\n};\n\n/**\n * The library's built-in English strings.\n *\n * @summary The library's built-in English strings, the labels every widget starts from\n * @since 0.3.0\n */\nexport const BF_DEFAULT_LABELS: BfLabels = {\n loading: 'Loading',\n dismiss: 'Dismiss',\n tabBar: 'Main',\n tabBadge: (count) => `${count} new`,\n back: 'Back',\n ok: 'OK',\n cancel: 'Cancel',\n actions: 'Actions',\n sheet: 'Sheet',\n modal: 'Modal',\n refreshing: 'Refreshing',\n close: 'Close',\n expand: 'Expand',\n collapse: 'Collapse',\n sheetPosition: (position, count) => `Sheet at ${position} of ${count}`,\n dialog: 'Dialog',\n notifications: 'Notifications',\n tableSelectAll: 'Select all rows',\n tableSortBy: 'Sort by',\n tableSortAscending: (column) => `${column}, ascending`,\n tableSortDescending: (column) => `${column}, descending`,\n\n theme: 'Theme',\n themeSystem: 'System',\n themeLight: 'Light',\n themeDark: 'Dark',\n\n breadcrumb: 'Breadcrumb',\n breadcrumbExpand: (count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`),\n\n navigation: 'Main',\n navBadge: (count) => `${count} new`,\n sidebarCollapse: 'Collapse sidebar',\n sidebarExpand: 'Expand sidebar',\n skipToContent: 'Skip to main content',\n\n pagination: 'Pagination',\n previousPage: 'Previous page',\n nextPage: 'Next page',\n pageOf: (page, count) => `Page ${page} of ${count}`,\n goToPage: (page) => `Page ${page}`,\n tabGroup: 'Tabs',\n calendarPreviousMonth: 'Previous month',\n calendarNextMonth: 'Next month',\n calendarChooseMonth: 'Choose month',\n calendarChooseYear: 'Choose year',\n statTrendUp: 'Up',\n statTrendDown: 'Down',\n statTrendFlat: 'No change',\n comboboxEmpty: 'No results',\n comboboxRemove: (label) => `Remove ${label}`,\n dateInputDay: 'Day',\n dateInputMonth: 'Month',\n dateInputYear: 'Year',\n dateInputOpenCalendar: 'Choose date',\n dateInputInvalid: 'Enter a valid date',\n dateInputUnavailable: 'This date is not available',\n timeInputHour: 'Hour',\n timeInputMinute: 'Minute',\n timeInputSecond: 'Second',\n timeInputDayPeriod: 'AM/PM',\n timeInputOpenList: 'Choose time',\n timeInputInvalid: 'Enter a valid time',\n timeInputMin: (time) => `Pick ${time} or later`,\n timeInputMax: (time) => `Pick ${time} or earlier`,\n chart: 'Chart',\n chartLegend: 'Legend',\n chartValues: 'Data points, arrow keys move between them',\n chartShowData: 'Show data',\n chartHideData: 'Hide data',\n chartCategory: 'Category',\n chartValue: 'Value',\n chartEmpty: 'No data to show',\n chartError: 'The data could not be loaded',\n validation: {\n required: 'Fill in this field',\n email: 'Enter a valid email address',\n pattern: 'Use the expected format',\n parse: 'Enter a valid number',\n min: (min) => `Enter ${min} or more`,\n max: (max) => `Enter ${max} or less`,\n minLength: (length) => `Use at least ${length} characters`,\n maxLength: (length) => `Use at most ${length} characters`,\n minDate: (date) => `Pick ${date.toLocaleDateString()} or later`,\n maxDate: (date) => `Pick ${date.toLocaleDateString()} or earlier`,\n fallback: 'Check this value',\n },\n};\n\n/**\n * The strings in effect for the current injector; set them with `provideBfLabels()`.\n *\n * @summary Injection token holding the user-facing strings in effect for an injector\n * @since 0.3.0\n */\nexport const BF_LABELS = new InjectionToken<BfLabels>('BF_LABELS', {\n providedIn: 'root',\n factory: () => BF_DEFAULT_LABELS,\n});\n\n/**\n * Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\n * out or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\n * every string. In a component's `providers` it covers that sub-tree's widgets and form controls\n * (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n * `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n * `breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n * `skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n * `calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n * `statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n * `dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n * `dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n * `timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n * `chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n * `chartValue`, `chartEmpty`, `chartError`, `validation`); the overlay services (`ok`, `cancel`,\n * `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,\n * `notifications`) are root singletons and pick it up only when the caller passes its injector:\n * `open(…, { injector: inject(Injector) })`.\n *\n * @param overrides The strings to replace; any key left out keeps the parent's.\n * @returns The provider of `BF_LABELS`.\n * @summary Replaces built-in strings for an app or a sub-tree, such as a translation\n * @since 0.3.0\n */\nexport function provideBfLabels(overrides: BfLabelsOverrides): Provider {\n return {\n provide: BF_LABELS,\n useFactory: (): BfLabels =>\n mergeLabels(\n inject(BF_LABELS, { skipSelf: true, optional: true }) ?? BF_DEFAULT_LABELS,\n overrides,\n ),\n };\n}\n\n/** Key by key, so an `undefined` override never blanks the parent's string. */\nfunction mergeLabels(parent: BfLabels, o: BfLabelsOverrides): BfLabels {\n const v = o.validation ?? {};\n const pv = parent.validation;\n return {\n loading: o.loading ?? parent.loading,\n dismiss: o.dismiss ?? parent.dismiss,\n tabBar: o.tabBar ?? parent.tabBar,\n tabBadge: o.tabBadge ?? parent.tabBadge,\n back: o.back ?? parent.back,\n ok: o.ok ?? parent.ok,\n cancel: o.cancel ?? parent.cancel,\n actions: o.actions ?? parent.actions,\n sheet: o.sheet ?? parent.sheet,\n modal: o.modal ?? parent.modal,\n refreshing: o.refreshing ?? parent.refreshing,\n close: o.close ?? parent.close,\n expand: o.expand ?? parent.expand,\n collapse: o.collapse ?? parent.collapse,\n sheetPosition: o.sheetPosition ?? parent.sheetPosition,\n dialog: o.dialog ?? parent.dialog,\n notifications: o.notifications ?? parent.notifications,\n tableSelectAll: o.tableSelectAll ?? parent.tableSelectAll,\n tableSortBy: o.tableSortBy ?? parent.tableSortBy,\n tableSortAscending: o.tableSortAscending ?? parent.tableSortAscending,\n tableSortDescending: o.tableSortDescending ?? parent.tableSortDescending,\n\n theme: o.theme ?? parent.theme,\n themeSystem: o.themeSystem ?? parent.themeSystem,\n themeLight: o.themeLight ?? parent.themeLight,\n themeDark: o.themeDark ?? parent.themeDark,\n\n breadcrumb: o.breadcrumb ?? parent.breadcrumb,\n breadcrumbExpand: o.breadcrumbExpand ?? parent.breadcrumbExpand,\n\n navigation: o.navigation ?? parent.navigation,\n navBadge: o.navBadge ?? parent.navBadge,\n sidebarCollapse: o.sidebarCollapse ?? parent.sidebarCollapse,\n sidebarExpand: o.sidebarExpand ?? parent.sidebarExpand,\n skipToContent: o.skipToContent ?? parent.skipToContent,\n\n pagination: o.pagination ?? parent.pagination,\n previousPage: o.previousPage ?? parent.previousPage,\n nextPage: o.nextPage ?? parent.nextPage,\n pageOf: o.pageOf ?? parent.pageOf,\n goToPage: o.goToPage ?? parent.goToPage,\n tabGroup: o.tabGroup ?? parent.tabGroup,\n calendarPreviousMonth: o.calendarPreviousMonth ?? parent.calendarPreviousMonth,\n calendarNextMonth: o.calendarNextMonth ?? parent.calendarNextMonth,\n calendarChooseMonth: o.calendarChooseMonth ?? parent.calendarChooseMonth,\n calendarChooseYear: o.calendarChooseYear ?? parent.calendarChooseYear,\n statTrendUp: o.statTrendUp ?? parent.statTrendUp,\n statTrendDown: o.statTrendDown ?? parent.statTrendDown,\n statTrendFlat: o.statTrendFlat ?? parent.statTrendFlat,\n comboboxEmpty: o.comboboxEmpty ?? parent.comboboxEmpty,\n comboboxRemove: o.comboboxRemove ?? parent.comboboxRemove,\n dateInputDay: o.dateInputDay ?? parent.dateInputDay,\n dateInputMonth: o.dateInputMonth ?? parent.dateInputMonth,\n dateInputYear: o.dateInputYear ?? parent.dateInputYear,\n dateInputOpenCalendar: o.dateInputOpenCalendar ?? parent.dateInputOpenCalendar,\n dateInputInvalid: o.dateInputInvalid ?? parent.dateInputInvalid,\n dateInputUnavailable: o.dateInputUnavailable ?? parent.dateInputUnavailable,\n timeInputHour: o.timeInputHour ?? parent.timeInputHour,\n timeInputMinute: o.timeInputMinute ?? parent.timeInputMinute,\n timeInputSecond: o.timeInputSecond ?? parent.timeInputSecond,\n timeInputDayPeriod: o.timeInputDayPeriod ?? parent.timeInputDayPeriod,\n timeInputOpenList: o.timeInputOpenList ?? parent.timeInputOpenList,\n timeInputInvalid: o.timeInputInvalid ?? parent.timeInputInvalid,\n timeInputMin: o.timeInputMin ?? parent.timeInputMin,\n timeInputMax: o.timeInputMax ?? parent.timeInputMax,\n chart: o.chart ?? parent.chart,\n chartLegend: o.chartLegend ?? parent.chartLegend,\n chartValues: o.chartValues ?? parent.chartValues,\n chartShowData: o.chartShowData ?? parent.chartShowData,\n chartHideData: o.chartHideData ?? parent.chartHideData,\n chartCategory: o.chartCategory ?? parent.chartCategory,\n chartValue: o.chartValue ?? parent.chartValue,\n chartEmpty: o.chartEmpty ?? parent.chartEmpty,\n chartError: o.chartError ?? parent.chartError,\n validation: {\n required: v.required ?? pv.required,\n email: v.email ?? pv.email,\n pattern: v.pattern ?? pv.pattern,\n parse: v.parse ?? pv.parse,\n min: v.min ?? pv.min,\n max: v.max ?? pv.max,\n minLength: v.minLength ?? pv.minLength,\n maxLength: v.maxLength ?? pv.maxLength,\n minDate: v.minDate ?? pv.minDate,\n maxDate: v.maxDate ?? pv.maxDate,\n fallback: v.fallback ?? pv.fallback,\n },\n };\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DOCUMENT,\n DestroyRef,\n type EnvironmentProviders,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n type Signal,\n computed,\n effect,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n signal,\n} from '@angular/core';\n\n/**\n * The app's colour scheme choice: follow the system, or force light or dark.\n *\n * @summary The colour scheme choice, following the system or forcing light or dark\n * @since 0.3.1\n */\nexport type BfColorScheme = 'system' | 'light' | 'dark';\n\nconst STORAGE_KEY = 'bf-theme';\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/** The key-value store the choice is kept in: `getItem`/`setItem` of the Web Storage API. */\ntype BfColorSchemeStorage = Pick<Storage, 'getItem' | 'setItem'>;\n\n/**\n * A store in memory, gone with the app: where `localStorage` is unavailable, and in tests.\n * Internal: `provideBfShellTesting()` (`@bitforgehq/ui/mobile`) uses it through\n * `ɵcreateMemoryColorSchemeStorage`.\n */\nexport function createMemoryColorSchemeStorage(): BfColorSchemeStorage {\n const values = new Map<string, string>();\n return {\n getItem: (key) => values.get(key) ?? null,\n setItem: (key, value) => {\n values.set(key, String(value));\n },\n };\n}\n\n/** `localStorage`, or `null` where there is none or reading it throws (storage disabled, SSR).\n * Internal: `BF_SIDEBAR_STATE_STORAGE` (`sidebar-state.ts`) falls back the same way. */\nexport function browserStorage(): Storage | null {\n try {\n return typeof window !== 'undefined' && window.localStorage ? window.localStorage : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Where `BfColorSchemeService` keeps the colour scheme choice (the key `bf-theme`): `localStorage`\n * when it is available, otherwise an in-memory map. Provide another store (a native preferences\n * plugin, or an in-memory one in tests) to keep the choice elsewhere. `BF_THEME_STORAGE` from\n * `@bitforgehq/ui/mobile` is this same token.\n *\n * @example\n * providers: [{ provide: BF_COLOR_SCHEME_STORAGE, useValue: sessionStorage }]\n * @summary Injection token for the store that keeps the colour scheme choice between visits\n * @since 0.3.1\n */\nexport const BF_COLOR_SCHEME_STORAGE = new InjectionToken<Pick<Storage, 'getItem' | 'setItem'>>(\n 'BF_COLOR_SCHEME_STORAGE',\n {\n providedIn: 'root',\n factory: () => browserStorage() ?? createMemoryColorSchemeStorage(),\n },\n);\n\nfunction readStored(storage: BfColorSchemeStorage): BfColorScheme {\n try {\n const stored = storage.getItem(STORAGE_KEY);\n return stored === 'light' || stored === 'dark' || stored === 'system' ? stored : 'system';\n } catch {\n // Storage may be unavailable (private browsing, disabled storage); fall through.\n return 'system';\n }\n}\n\nfunction persist(storage: BfColorSchemeStorage, scheme: BfColorScheme): void {\n try {\n storage.setItem(STORAGE_KEY, scheme);\n } catch {\n // Ignore persistence failures (e.g. storage disabled).\n }\n}\n\n/**\n * The app's colour scheme: the user's choice (system, light, dark), kept in\n * `BF_COLOR_SCHEME_STORAGE` under `bf-theme`, and whether the app is dark now. With\n * `provideBfColorScheme()` (or `provideBfShell()` in a Capacitor app) it toggles the `dark` class\n * on `<html>` and stores every change; `prefers-color-scheme` is the source under `system` and is\n * followed live. Without either, the signals still compute but nothing is written, so a page that\n * 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\n * starts at `system`, light, and writes nothing. No Capacitor: a desktop web app uses it as is,\n * and the shell's `BfPlatformService.theme` and `dark` are these same signals.\n *\n * @example\n * private readonly colorScheme = inject(BfColorSchemeService);\n * toggle(): void { this.colorScheme.scheme.set(this.colorScheme.dark() ? 'light' : 'dark'); }\n * @summary The app colour scheme choice and dark state, applied to html and stored\n * @since 0.3.1\n */\n@Injectable({ providedIn: 'root' })\nexport class BfColorSchemeService {\n private readonly document = inject(DOCUMENT);\n private readonly storage = inject(BF_COLOR_SCHEME_STORAGE);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** The user's choice, stored when `provideBfColorScheme()` is provided; set it with\n * `scheme.set(…)`. */\n readonly scheme = signal<BfColorScheme>(this.browser ? readStored(this.storage) : 'system');\n private readonly prefersDark = signal(false);\n /** Whether the system prefers dark (`prefers-color-scheme: dark`), followed live. */\n readonly systemDark: Signal<boolean> = this.prefersDark.asReadonly();\n /** Whether the app is dark now: the choice, or the system's under `system`. */\n readonly dark = computed(() =>\n this.scheme() === 'system' ? this.prefersDark() : this.scheme() === 'dark',\n );\n\n private claimed = false;\n\n constructor() {\n if (this.browser) {\n this.followSystem();\n }\n }\n\n /**\n * Makes this service own `<html>` and the store, once: called by `provideBfColorScheme()` and\n * by the shell's `BfPlatformService`. Nothing is written on the server.\n * @internal\n */\n claimDocument(): void {\n if (this.claimed || !this.browser) {\n return;\n }\n this.claimed = true;\n // Applied synchronously, so the class (and the stored choice) is in place before any change\n // detection runs; the effect keeps later changes in sync.\n const html = this.document.documentElement;\n html.classList.toggle('dark', this.dark());\n persist(this.storage, this.scheme());\n effect(\n () => {\n // effect-justified: <html> class and localStorage are external to any view\n html.classList.toggle('dark', this.dark());\n persist(this.storage, this.scheme());\n },\n { injector: this.injector },\n );\n }\n\n private followSystem(): void {\n const view = this.document.defaultView;\n if (!view || typeof view.matchMedia !== 'function') {\n return;\n }\n const query = view.matchMedia(DARK_QUERY);\n this.prefersDark.set(query.matches);\n const onChange = (event: MediaQueryListEvent): void => this.prefersDark.set(event.matches);\n query.addEventListener('change', onChange);\n inject(DestroyRef).onDestroy(() => query.removeEventListener('change', onChange));\n }\n}\n\n/**\n * Lets `BfColorSchemeService` own the app's colour scheme: it toggles `dark` on `<html>`, follows\n * `prefers-color-scheme` under `system` and stores the choice (key `bf-theme`). For a desktop web\n * app; a Capacitor app gets it from `provideBfShell()`. Add it to `ApplicationConfig.providers`\n * and switch with `inject(BfColorSchemeService).scheme.set('dark')`.\n *\n * @example\n * export const appConfig: ApplicationConfig = { providers: [provideBfColorScheme()] };\n * @returns The providers that make the service own `<html>` and start it with the app.\n * @summary Applies the stored colour scheme choice to html, for desktop web apps\n * @since 0.3.1\n */\nexport function provideBfColorScheme(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n inject(BfColorSchemeService).claimDocument();\n }),\n ]);\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n type EnvironmentProviders,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n effect,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n signal,\n} from '@angular/core';\nimport { browserStorage, createMemoryColorSchemeStorage } from './color-scheme';\n\nconst STORAGE_KEY = 'bf-sidebar-collapsed';\n\n/** The key-value store the state is kept in: `getItem`/`setItem` of the Web Storage API. */\ntype BfSidebarStateStorage = Pick<Storage, 'getItem' | 'setItem'>;\n\n/**\n * Where `BfSidebarStateService` keeps whether the sidebar is collapsed (the key\n * `bf-sidebar-collapsed`, `'true'` or `'false'`): `localStorage` when it is available, otherwise\n * an in-memory map. Provide another store (`sessionStorage`, or an in-memory one in tests) to keep\n * it elsewhere.\n *\n * @example\n * providers: [{ provide: BF_SIDEBAR_STATE_STORAGE, useValue: sessionStorage }]\n * @summary Injection token for the store that keeps the collapsed sidebar between visits\n * @since 0.3.2\n */\nexport const BF_SIDEBAR_STATE_STORAGE = new InjectionToken<Pick<Storage, 'getItem' | 'setItem'>>(\n 'BF_SIDEBAR_STATE_STORAGE',\n {\n providedIn: 'root',\n factory: () => browserStorage() ?? createMemoryColorSchemeStorage(),\n },\n);\n\nfunction readStored(storage: BfSidebarStateStorage): boolean {\n try {\n return storage.getItem(STORAGE_KEY) === 'true';\n } catch {\n // Storage may be unavailable (private browsing, disabled storage); start expanded.\n return false;\n }\n}\n\nfunction persist(storage: BfSidebarStateStorage, collapsed: boolean): void {\n try {\n storage.setItem(STORAGE_KEY, String(collapsed));\n } catch {\n // Ignore persistence failures (e.g. storage disabled).\n }\n}\n\n/**\n * Whether the app's `bf-sidebar` is collapsed to an icon rail, remembered between visits: the app\n * binds the sidebar's `[(collapsed)]` to `sidebarState.collapsed`. With `provideBfSidebarState()`\n * every change is stored in `BF_SIDEBAR_STATE_STORAGE` under `bf-sidebar-collapsed`; without it\n * the signal still holds the state but nothing is written. Storage is read in the browser only, so a\n * server render starts expanded and writes nothing. The widgets never inject it.\n *\n * @example\n * protected readonly sidebarState = inject(BfSidebarStateService);\n * // <bf-sidebar [(collapsed)]=\"sidebarState.collapsed\">…</bf-sidebar>\n * @summary The sidebar's collapsed state, kept in storage between visits of the app\n * @since 0.3.2\n */\n@Injectable({ providedIn: 'root' })\nexport class BfSidebarStateService {\n private readonly storage = inject(BF_SIDEBAR_STATE_STORAGE);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Whether the sidebar is collapsed: the stored state in the browser, else false. Bind it\n * two-way to `bf-sidebar`'s `collapsed`. */\n readonly collapsed = signal(this.browser ? readStored(this.storage) : false);\n\n private claimed = false;\n\n /**\n * Starts storing every change, once: called by `provideBfSidebarState()`. Nothing is written on\n * the server.\n * @internal\n */\n claimStorage(): void {\n if (this.claimed || !this.browser) {\n return;\n }\n this.claimed = true;\n effect(\n () => {\n const collapsed = this.collapsed();\n // effect-justified: localStorage is external to any view\n persist(this.storage, collapsed);\n },\n { injector: this.injector },\n );\n }\n}\n\n/**\n * Lets `BfSidebarStateService` remember the collapsed sidebar: it stores every change of its\n * `collapsed` signal (key `bf-sidebar-collapsed`, `localStorage` in the browser), so the app opens\n * with the sidebar as the user left it. Add it to `ApplicationConfig.providers` and bind the\n * sidebar's `[(collapsed)]` to `sidebarState.collapsed`.\n *\n * @example\n * export const appConfig: ApplicationConfig = { providers: [provideBfSidebarState()] };\n * @returns The providers that make the service store the state and start it with the app.\n * @summary Remembers the collapsed sidebar between visits, for desktop web apps\n * @since 0.3.2\n */\nexport function provideBfSidebarState(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n inject(BfSidebarStateService).claimStorage();\n }),\n ]);\n}\n","import type { ValidationError } from '@angular/forms/signals';\n\n/**\n * Default text per validator kind, part of `BfLabels`; override with `provideBfLabels()`.\n *\n * @summary The default error text of each validator kind, shown under a form field\n * @since 0.3.0\n */\nexport interface BfValidationMessages {\n /**\n * `required` (Signal Forms and Reactive Forms; `Validators.requiredTrue` reports `required` too).\n * @default 'Fill in this field'\n */\n readonly required: string;\n /**\n * `email`.\n * @default 'Enter a valid email address'\n */\n readonly email: string;\n /**\n * `pattern`.\n * @default 'Use the expected format'\n */\n readonly pattern: string;\n /**\n * `parse`: the text could not be read as a value (e.g. a number field).\n * @default 'Enter a valid number'\n */\n readonly parse: string;\n /**\n * `min`, given the lower limit.\n * @default (min) => `Enter ${min} or more`\n */\n readonly min: (min: number) => string;\n /**\n * `max`, given the upper limit.\n * @default (max) => `Enter ${max} or less`\n */\n readonly max: (max: number) => string;\n /**\n * `minLength` (Signal Forms) and `minlength` (Reactive Forms), given the required length.\n * @default (length) => `Use at least ${length} characters`\n */\n readonly minLength: (length: number) => string;\n /**\n * `maxLength` (Signal Forms) and `maxlength` (Reactive Forms), given the allowed length.\n * @default (length) => `Use at most ${length} characters`\n */\n readonly maxLength: (length: number) => string;\n /**\n * `minDate`, given the earliest date.\n * @default (date) => `Pick ${date.toLocaleDateString()} or later`\n */\n readonly minDate: (date: Date) => string;\n /**\n * `maxDate`, given the latest date.\n * @default (date) => `Pick ${date.toLocaleDateString()} or earlier`\n */\n readonly maxDate: (date: Date) => string;\n /**\n * Any other kind without its own message.\n * @default 'Check this value'\n */\n readonly fallback: string;\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === 'object' && value !== null;\n}\n\n/** A numeric field of the error itself (Signal Forms) or of its `context` (Reactive interop). */\nfunction numberField(error: ValidationError, key: string, contextKey: string): number | undefined {\n const own: unknown = Reflect.get(error, key);\n if (typeof own === 'number') {\n return own;\n }\n const context: unknown = Reflect.get(error, 'context');\n if (isRecord(context)) {\n const limit = context[contextKey];\n if (typeof limit === 'number') {\n return limit;\n }\n }\n return undefined;\n}\n\nfunction dateField(error: ValidationError, key: string): Date | undefined {\n const own: unknown = Reflect.get(error, key);\n return own instanceof Date ? own : undefined;\n}\n\nfunction withLimit<T>(\n limit: T | undefined,\n format: (limit: T) => string,\n fallback: string,\n): string {\n return limit === undefined ? fallback : format(limit);\n}\n\n/**\n * The text for one error: its own `message`, else the default for its `kind` (Signal Forms kinds\n * `required|email|pattern|parse|min|max|minLength|maxLength|minDate|maxDate`, and the Reactive\n * interop kinds `required|email|pattern|min|max|minlength|maxlength` whose limits sit\n * in `context`), else `fallback`. Reads limits through type guards, never `any`.\n *\n * @param error A Signal Forms error, or a Reactive Forms error adapted to one.\n * @param messages The default texts, usually `inject(BF_LABELS).validation`.\n * @returns The text to show under the field.\n * @summary Turns one validation error into the text a form field shows under it\n * @since 0.3.0\n */\nexport function bfValidationMessage(\n error: ValidationError,\n messages: BfValidationMessages,\n): string {\n if (error.message) {\n return error.message;\n }\n const { fallback } = messages;\n switch (error.kind) {\n case 'required':\n return messages.required;\n case 'email':\n return messages.email;\n case 'pattern':\n return messages.pattern;\n case 'parse':\n return messages.parse;\n case 'min':\n return withLimit(numberField(error, 'min', 'min'), messages.min, fallback);\n case 'max':\n return withLimit(numberField(error, 'max', 'max'), messages.max, fallback);\n case 'minLength':\n case 'minlength':\n return withLimit(\n numberField(error, 'minLength', 'requiredLength'),\n messages.minLength,\n fallback,\n );\n case 'maxLength':\n case 'maxlength':\n return withLimit(\n numberField(error, 'maxLength', 'requiredLength'),\n messages.maxLength,\n fallback,\n );\n case 'minDate':\n return withLimit(dateField(error, 'minDate'), messages.minDate, fallback);\n case 'maxDate':\n return withLimit(dateField(error, 'maxDate'), messages.maxDate, fallback);\n default:\n return fallback;\n }\n}\n","import { Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The diameter of a `bf-spinner`: sm, md or lg.\n *\n * @summary The three spinner diameters, from inline text to a page loading state\n * @since 0.1.0\n */\nexport type BfSpinnerSize = 'sm' | 'md' | 'lg';\n\n/* A CSS ring (no SVG): a faint `currentColor` track with a solid top arc. The ring (14/18/22 px)\n sits inset by a 1 px margin, so its margin box matches `bf-icon`'s sizes (16/20/24 px) and a\n spinner can stand in for an icon without a layout shift, while its outer edge stays close to the\n earlier SVG's (14/17.5/21 px). It rotates only when motion is allowed; under\n `prefers-reduced-motion` it pulses its opacity instead. Under forced colours the arc keeps a\n system-colour contrast against the track, which would otherwise be forced to one colour. */\nconst RING =\n 'block rounded-full border-solid border-current/25 border-t-current motion-safe:animate-spin motion-reduce:animate-pulse forced-colors:forced-color-adjust-none forced-colors:border-[GrayText] forced-colors:border-t-[CanvasText]';\nconst SIZE: Record<BfSpinnerSize, string> = {\n sm: 'size-3.5 m-px border-2',\n md: 'size-4.5 m-px border-2',\n lg: 'size-5.5 m-px border-[3px]',\n};\n/** The box of each size in px, as the deprecated `px` member reports it. */\nconst SIZE_PX: Record<BfSpinnerSize, number> = { sm: 16, md: 20, lg: 24 };\n\n/**\n * Indeterminate progress indicator. Inherits `currentColor`, so place it inside a colored parent\n * (a button, a muted paragraph) rather than coloring it directly.\n *\n * @example\n * <p class=\"flex items-center gap-2 text-text-muted\"><bf-spinner size=\"sm\" /> Loading recipes</p>\n * @summary Indeterminate loading spinner in three sizes that inherits its parent's text color\n * @category Feedback\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-spinner',\n host: { class: 'inline-flex shrink-0' },\n template: `\n <span\n class=\"inline-flex\"\n [attr.role]=\"decorative() ? null : 'status'\"\n [attr.aria-live]=\"decorative() ? null : 'polite'\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n >\n <span data-bf-spinner-ring [class]=\"ringClasses()\" aria-hidden=\"true\"></span>\n @if (!decorative()) {\n <span class=\"sr-only\">{{ name() }}</span>\n }\n </span>\n `,\n})\nexport class BfSpinnerComponent {\n /** Visual size: 16, 20 or 24 px (the `bf-icon` sizes). */\n readonly size = input<BfSpinnerSize>('md');\n /** Screen-reader text; keep it a short verb phrase. Empty falls back to `provideBfLabels()`'s\n * `loading` (\"Loading\"). Not rendered while `decorative`. */\n readonly label = input('');\n /** Hides the spinner from assistive tech (no status role, no live region, no label), for a\n * spinner inside a control that already reports its busy state, such as a loading `bf-button`. */\n readonly decorative = input(false, { transform: booleanAttribute });\n\n private readonly labels = inject(BF_LABELS);\n\n /** The spinner's box in px (16, 20 or 24) for its `size`.\n * @deprecated 0.3.0 use the size input; removed in 0.4.0 */\n readonly px = computed(() => SIZE_PX[this.size()]);\n /** @internal The ring's classes: the shared ring plus the size's box and border width. */\n readonly ringClasses = computed(() => `${RING} ${SIZE[this.size()]}`);\n /** The rendered screen-reader text: `label`, else the `loading` label. */\n readonly name = computed(() => this.label() || this.labels.loading);\n}\n","import type { BfSize } from '../../config/size';\n\n/* Touch-size hit areas for self-contained controls (buttons, chips, segments). Under a fine pointer\n the visual box is the hit area (sm 32 px is above the 24 px of WCAG 2.5.8), so dense desktop rows\n never overlap; under a coarse pointer an ::after extends it vertically to 44 px. Every part of the\n extension, not only the inset, sits behind `pointer-coarse:`. At `sm` it reaches up to 7.5 px past\n the visual edge (bordered), so stacked or wrapping rows of these controls need `gap-2` (8 px). Class strings stay literal so\n Tailwind finds them in the published bundle. */\n\n/** The positioned, empty ::after that carries the extension; add one inset class beside it. */\nexport const COARSE_HIT_BASE =\n \"pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:content-['']\";\n\n/**\n * Vertical hit extension of a 32/40/48 px pill, to 44 px under a coarse pointer. `bordered` boxes\n * (1.5 px border) position the ::after inside the border, so their inset adds the border back.\n */\nexport const PILL_HIT: Record<BfSize, Record<'plain' | 'bordered', string>> = {\n sm: {\n plain: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-1.5`,\n bordered: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-[calc(0.375rem+1.5px)]`,\n },\n md: {\n plain: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-0.5`,\n bordered: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-[calc(0.125rem+1.5px)]`,\n },\n lg: { plain: '', bordered: '' },\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BfSpinnerComponent } from '../spinner/spinner.component';\n\n/**\n * The visual style of a `bf-button`: primary (filled), tonal (soft tint), outline, text or danger.\n *\n * @summary The five visual styles of a button, from filled primary to plain text\n * @since 0.1.0\n */\nexport type BfButtonVariant = 'primary' | 'tonal' | 'outline' | 'text' | 'danger';\n/**\n * Every value the `variant` input of a `bf-button` takes: the five `BfButtonVariant` styles plus\n * `ghost`, the quiet neutral one. A new type, so `Record`s and exhaustive switches over\n * `BfButtonVariant` keep compiling.\n *\n * @summary Every button style, the five variants plus the quiet neutral ghost\n * @since 0.3.1\n */\nexport type BfButtonAppearance = BfButtonVariant | 'ghost';\n/**\n * The height step of a `bf-button`; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for buttons, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfButtonSize = BfSize;\n/**\n * The native `type` of a `bf-button`: button, submit or reset.\n *\n * @summary The native button types, for a plain action, a form submit or reset\n * @since 0.1.0\n */\nexport type BfButtonType = 'button' | 'submit' | 'reset';\n\nconst BASE =\n 'relative inline-flex max-w-full min-w-0 items-center justify-center gap-2 rounded-control font-bold whitespace-nowrap ' +\n 'transition-colors duration-150 select-none focus-visible:outline-hidden ' +\n 'focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:bg-surface-sunken disabled:text-text-disabled disabled:border-transparent';\n\nconst VARIANT: Record<BfButtonAppearance, string> = {\n primary: 'bg-primary text-on-primary hover:bg-primary-hover',\n tonal: 'bg-primary-soft text-primary-strong hover:bg-primary-soft-hover',\n outline:\n 'bg-surface text-text border-[1.5px] border-border-strong hover:border-text-muted focus-visible:border-primary',\n text: 'bg-transparent text-primary-text hover:text-primary-strong',\n /* The hover label is danger-soft: it holds 4.5:1 on danger in both modes, whatever on-primary a\n custom primary derives. */\n danger: 'bg-danger-soft text-danger hover:bg-danger hover:text-danger-soft',\n /* Quiet and neutral: no tint at rest, a neutral surface on hover. For secondary toolbar actions\n and navigation rows. */\n ghost: 'bg-transparent text-text-muted hover:bg-surface-muted hover:text-text',\n};\n\n/* Pressed (while the pointer or Space/Enter holds the button down): one step past the hover fill.\n The text variant also takes the hover label, so a touch press (no hover) reads the same. The\n `<button>` form guards with `enabled:`, the `a[bfButton]` link with plain `active:` (a link is\n never `:enabled`). Added only while the control can act (not disabled or loading). Under forced\n colours the system colours win, so nothing changes there. */\ntype BfButtonPressedForm = 'button' | 'link';\nconst PRESSED: Record<BfButtonPressedForm, Record<BfButtonAppearance, string>> = {\n button: {\n primary: 'enabled:active:bg-primary-pressed',\n tonal: 'enabled:active:bg-primary-soft-pressed',\n outline: 'enabled:active:bg-primary-soft-pressed',\n text: 'enabled:active:bg-primary-soft-pressed enabled:active:text-primary-strong',\n danger: 'enabled:active:bg-danger-pressed enabled:active:text-danger-soft',\n ghost: 'enabled:active:bg-surface-pressed enabled:active:text-text',\n },\n link: {\n primary: 'active:bg-primary-pressed',\n tonal: 'active:bg-primary-soft-pressed',\n outline: 'active:bg-primary-soft-pressed',\n text: 'active:bg-primary-soft-pressed active:text-primary-strong',\n danger: 'active:bg-danger-pressed active:text-danger-soft',\n ghost: 'active:bg-surface-pressed active:text-text',\n },\n};\n\n/* The current page (`aria-current=\"page\"`, which `routerLinkActive` with\n `ariaCurrentWhenActive=\"page\"` sets) on `a[bfButton]`: the quiet variants take the tonal fill, so\n a nav row shows where the user is without a [variant] switch; outline draws its border in\n primary. These rules come after hover and pressed in the stylesheet, so they carry their own\n hover and pressed steps. The filled variants are not nav items and stay as they are. Under forced colours an\n outline marks it, as the fill is dropped there. Links only: a <button> is never \"current\". */\nconst CURRENT_BASE =\n 'forced-colors:aria-[current=page]:outline-2 forced-colors:aria-[current=page]:outline-offset-2 forced-colors:aria-[current=page]:outline-[LinkText]';\nconst CURRENT_FILL =\n 'aria-[current=page]:bg-primary-soft aria-[current=page]:text-primary-strong aria-[current=page]:hover:bg-primary-soft-hover aria-[current=page]:hover:text-primary-strong aria-[current=page]:active:bg-primary-soft-pressed';\nconst CURRENT: Record<BfButtonAppearance, string> = {\n primary: '',\n tonal: '',\n danger: '',\n outline: `${CURRENT_BASE} aria-[current=page]:border-primary aria-[current=page]:text-primary-strong`,\n text: `${CURRENT_BASE} ${CURRENT_FILL}`,\n ghost: `${CURRENT_BASE} ${CURRENT_FILL}`,\n};\n\n/* Loading is not native `disabled` (that would drop keyboard focus to <body>): the button keeps its\n variant fill and reports itself through `aria-disabled` and `aria-busy`; only the cursor changes. */\ntype BfButtonState = 'idle' | 'loading';\nconst STATE: Record<BfButtonState, string> = {\n idle: 'cursor-pointer',\n loading: 'cursor-progress',\n};\n\n/* Heights 32/40/48 from the design. Under a coarse pointer PILL_HIT extends sm and md to 44 px\n without changing the visual; the outline variant's entry adds its 1.5 px border back. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 text-label-xs',\n md: 'h-10 text-label-sm',\n lg: 'h-12 text-label',\n};\n\nconst PADDING: Record<BfSize, string> = { sm: 'px-3.5', md: 'px-4.5', lg: 'px-6' };\n\n/* The text and ghost variants have no surface at rest, so they get tighter horizontal padding. */\nconst TEXT_PADDING: Record<BfSize, string> = { sm: 'px-2', md: 'px-3', lg: 'px-3' };\n\n/** The class maps of bf-button, shared with `bf-menu-button` (`@bitforgehq/ui/overlay`) through\n * the internal `ɵBF_BUTTON_CLASSES` export so the two never drift. */\nexport const BUTTON_CLASSES = {\n base: BASE,\n variant: VARIANT,\n pressed: PRESSED.button,\n current: CURRENT,\n size: SIZE,\n padding: PADDING,\n textPadding: TEXT_PADDING,\n} as const;\n\n/**\n * Pill-shaped action button with six variants, three sizes, a loading state and icon slots. Put\n * the label in the default slot and icons in the `icon-start` / `icon-end` slots; never place a\n * `bf-button` inside another interactive element. For navigation, put `bfButton` on your own `<a>`\n * (with `href` or `routerLink`): it renders as a real link that looks like the button.\n *\n * @example\n * <bf-button (clicked)=\"save()\">Save changes</bf-button>\n * <bf-button variant=\"tonal\" size=\"sm\" [loading]=\"saving()\">\n * <bf-icon bfSlot=\"icon-start\" [icon]=\"Plus\" />\n * New task\n * </bf-button>\n * <a bfButton variant=\"outline\" routerLink=\"/projects\">All projects</a>\n * <a bfButton variant=\"ghost\" routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">Inbox</a>\n * @summary Pill-shaped action button with five variants, three sizes and a loading state\n * @category Actions\n * @since 0.1.0\n * @slot icon-start An icon before the label.\n * @slot default The label.\n * @slot icon-end An icon after the label.\n */\n@Component({\n selector: 'bf-button, a[bfButton]',\n imports: [BfSpinnerComponent, NgTemplateOutlet],\n host: { '[class]': 'hostClasses()', '(click)': 'onHostClick($event)' },\n template: `\n @if (isLink) {\n <!-- a[bfButton]: the consumer's <a> is the control; no inner button. -->\n <ng-container *ngTemplateOutlet=\"content\" />\n } @else {\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"loading() ? 'true' : null\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content>\n @if (loading() && !isLink) {\n <!-- md = 20 px, the default bf-icon size, so the swap keeps the button's width. -->\n <bf-spinner size=\"md\" decorative />\n } @else {\n <ng-content select=\"[bfSlot=icon-start]\" />\n }\n <!-- The label truncates with an ellipsis in a narrow container; the icons keep their size. -->\n <span data-label class=\"max-w-full min-w-0 truncate empty:hidden\"><ng-content /></span>\n <ng-content select=\"[bfSlot=icon-end]\" />\n </ng-template>\n `,\n})\nexport class BfButtonComponent {\n /** Visual style: primary (filled), tonal (soft tint), outline, text, danger, or ghost (quiet\n * neutral). On `a[bfButton]`, `ghost`, `text` and `outline` also show `aria-current=\"page\"`. */\n readonly variant = input<BfButtonAppearance>('primary');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,\n * `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Native button type. Use `submit` inside a form. Ignored on `a[bfButton]`. */\n readonly type = input<BfButtonType>('button');\n /** Disables the control and swallows clicks. Ignored on `a[bfButton]`: a link is never\n * disabled; render a disabled `bf-button` instead. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows a spinner instead of the start icon and blocks activation. The button stays focusable\n * (`aria-disabled` and `aria-busy`, never native `disabled`) and keeps its variant fill. Ignored\n * on `a[bfButton]`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretches the button to its container's width. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n /** Emitted on click while enabled and not loading; on `a[bfButton]`, on every click (the link\n * still navigates). */\n readonly clicked = output<Event>();\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** Whether the host is the consumer's `<a>` (`a[bfButton]`) rather than a `bf-button` element. */\n protected readonly isLink =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.tagName === 'A';\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const padding = variant === 'text' || variant === 'ghost' ? TEXT_PADDING[size] : PADDING[size];\n const hit = PILL_HIT[size][variant === 'outline' ? 'bordered' : 'plain'];\n const width = this.fullWidth() ? 'w-full' : '';\n const state: BfButtonState = this.loading() && !this.isLink ? 'loading' : 'idle';\n const pressed = this.isLink\n ? PRESSED.link[variant]\n : this.disabled() || this.loading()\n ? ''\n : PRESSED.button[variant];\n const current = this.isLink ? CURRENT[variant] : '';\n return [BASE, VARIANT[variant], pressed, current, STATE[state], SIZE[size], hit, padding, width]\n .filter(Boolean)\n .join(' ');\n });\n\n /** The host's classes: the whole button on a link, else the wrapper's display and width. A link\n * adds `no-underline!`: important, so an unlayered global rule of the app\n * (`a { text-decoration: underline }`) cannot underline it, as it would beat a layered utility. */\n readonly hostClasses = computed(() => {\n if (this.isLink) {\n return `${this.classes()} no-underline!`;\n }\n return this.fullWidth() ? 'inline-flex max-w-full w-full' : 'inline-flex max-w-full';\n });\n\n /**\n * A click on `a[bfButton]` emits `clicked`; the browser (or `routerLink`) still follows it.\n * @internal\n */\n onHostClick(event: Event): void {\n if (this.isLink) {\n this.clicked.emit(event);\n }\n }\n\n /**\n * The inner button's click: emits `clicked` unless disabled or loading.\n * @internal\n */\n onClick(event: Event): void {\n if (this.loading()) {\n // Still focusable and clickable while loading: cancel the click so a submit button cannot\n // submit its form again.\n event.preventDefault();\n return;\n }\n if (this.disabled()) {\n return;\n }\n this.clicked.emit(event);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { type BfButtonType } from '../button/button.component';\n\n/**\n * The visual style of a `bf-icon-button`: tonal, primary, outline or text.\n *\n * @summary The four visual styles of an icon button, from tonal to plain text\n * @since 0.1.0\n */\nexport type BfIconButtonVariant = 'tonal' | 'primary' | 'outline' | 'text';\n\nconst BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-control transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:bg-surface-sunken disabled:text-text-disabled disabled:border-transparent';\n\nconst VARIANT: Record<BfIconButtonVariant, string> = {\n tonal: 'bg-primary-soft text-primary-strong hover:bg-primary-soft-hover',\n primary: 'bg-primary text-on-primary hover:bg-primary-hover',\n outline:\n 'bg-surface text-text border-[1.5px] border-border-strong hover:border-text-muted focus-visible:border-primary',\n text: 'bg-transparent text-text-muted hover:bg-surface-muted hover:text-text',\n};\n\n/* Pressed: one step past the hover fill (the text variant takes the soft pressed tint and the\n hover icon colour); added only while enabled. The `<button>` form guards with `enabled:`, the\n `a[bfIconButton]` link with plain `active:` (a link is never `:enabled`), as bf-button does. */\ntype BfIconButtonPressedForm = 'button' | 'link';\nconst PRESSED: Record<BfIconButtonPressedForm, Record<BfIconButtonVariant, string>> = {\n button: {\n tonal: 'enabled:active:bg-primary-soft-pressed',\n primary: 'enabled:active:bg-primary-pressed',\n outline: 'enabled:active:bg-primary-soft-pressed',\n text: 'enabled:active:bg-primary-soft-pressed enabled:active:text-text',\n },\n link: {\n tonal: 'active:bg-primary-soft-pressed',\n primary: 'active:bg-primary-pressed',\n outline: 'active:bg-primary-soft-pressed',\n text: 'active:bg-primary-soft-pressed active:text-text',\n },\n};\n\n/* Square boxes 32/40/48. Under a coarse pointer sm and md extend the hit area vertically to 44 px\n (PILL_HIT, as bf-button), so adjacent icon buttons in a toolbar don't overlap horizontally. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 w-8',\n md: 'h-10 w-10',\n lg: 'h-12 w-12',\n};\n\n/** The class maps of bf-icon-button, shared with `bf-menu-button` (`@bitforgehq/ui/overlay`)\n * through the internal `ɵBF_ICON_BUTTON_CLASSES` export so the two never drift. */\nexport const ICON_BUTTON_CLASSES = {\n base: BASE,\n variant: VARIANT,\n pressed: PRESSED.button,\n size: SIZE,\n} as const;\n\n/**\n * Round button that holds a single icon, for toolbars, headers and list rows. The `label` is\n * required because the icon alone gives assistive tech no name. For navigation, put\n * `bfIconButton` on your own `<a>` (with `href` or `routerLink`): it renders as a real link that\n * looks like the icon button.\n *\n * @example\n * <bf-icon-button label=\"Search\" (clicked)=\"openSearch()\">\n * <bf-icon [icon]=\"Search\" />\n * </bf-icon-button>\n * <a bfIconButton label=\"Edit project\" routerLink=\"/projects/atlas/edit\">\n * <bf-icon [icon]=\"Pencil\" />\n * </a>\n * @summary Round icon-only button for toolbars and rows, with a required accessible label\n * @category Actions\n * @since 0.1.0\n * @slot default The icon, a `bf-icon`.\n */\n@Component({\n selector: 'bf-icon-button, a[bfIconButton]',\n imports: [NgTemplateOutlet],\n host: {\n '[class]': 'hostClasses()',\n '[attr.aria-label]': 'isLink ? label() : null',\n '(click)': 'onHostClick($event)',\n },\n template: `\n @if (isLink) {\n <!-- a[bfIconButton]: the consumer's <a> is the control; no inner button. -->\n <ng-container *ngTemplateOutlet=\"content\" />\n } @else {\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"label()\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content><ng-content /></ng-template>\n `,\n})\nexport class BfIconButtonComponent {\n /** Visual style: tonal (soft tint, default), primary, outline, text. */\n readonly variant = input<BfIconButtonVariant>('tonal');\n /** Height step: sm 32, md 40, lg 48 px (square); unset follows `provideBfDefaults()`\n * (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Native button type. Ignored on `a[bfIconButton]`. */\n readonly type = input<BfButtonType>('button');\n /** Disables the control and swallows clicks. Ignored on `a[bfIconButton]`: a link is never\n * disabled; render a disabled `bf-icon-button` instead. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name announced instead of the icon; on `a[bfIconButton]`, the link's\n * `aria-label`. */\n readonly label = input.required<string>();\n\n /** Emitted on click while enabled; on `a[bfIconButton]`, on every click (the link still\n * navigates). */\n readonly clicked = output<Event>();\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** Whether the host is the consumer's `<a>` (`a[bfIconButton]`) rather than a\n * `bf-icon-button` element. */\n protected readonly isLink =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.tagName === 'A';\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const hit = PILL_HIT[size][variant === 'outline' ? 'bordered' : 'plain'];\n const pressed = this.isLink\n ? PRESSED.link[variant]\n : this.disabled()\n ? ''\n : PRESSED.button[variant];\n return [BASE, VARIANT[variant], pressed, SIZE[size], hit].filter(Boolean).join(' ');\n });\n\n /** The host's classes: the whole icon button on a link (with `no-underline!`, so an unlayered\n * global link rule cannot underline it), else the wrapper's display. */\n readonly hostClasses = computed(() =>\n this.isLink ? `${this.classes()} no-underline!` : 'inline-flex',\n );\n\n /**\n * A click on `a[bfIconButton]` emits `clicked`; the browser (or `routerLink`) still follows it.\n * @internal\n */\n onHostClick(event: Event): void {\n if (this.isLink) {\n this.clicked.emit(event);\n }\n }\n\n /**\n * The inner button's click: emits `clicked` unless disabled.\n * @internal\n */\n onClick(event: Event): void {\n if (this.disabled()) {\n return;\n }\n this.clicked.emit(event);\n }\n}\n","import { Component, computed, input } from '@angular/core';\n\n/**\n * The tone of a `bf-badge`: neutral, primary, success, warning or danger.\n *\n * @summary The five tones of a badge, from neutral counts to danger states\n * @since 0.1.0\n */\nexport type BfBadgeVariant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger';\n/**\n * Every tone the `variant` input of a `bf-badge` takes: the five `BfBadgeVariant` tones plus\n * `info`, for an informational label such as a category. A new type, so `Record`s and exhaustive\n * switches over `BfBadgeVariant` keep compiling.\n *\n * @summary Every badge tone, the five variants plus the informational info tone\n * @since 0.3.1\n */\nexport type BfBadgeAppearance = BfBadgeVariant | 'info';\n\nconst LABEL_BASE =\n 'inline-flex items-center rounded-control px-2.5 py-1.25 text-micro font-bold leading-none';\nconst COUNT_BASE =\n 'inline-flex h-box min-w-box items-center justify-center rounded-control bg-primary px-1.75 text-micro font-bold leading-none text-on-primary';\n\nconst VARIANT: Record<BfBadgeAppearance, string> = {\n neutral: 'bg-neutral-soft text-neutral',\n primary: 'bg-primary-soft text-primary-strong',\n success: 'bg-success-soft text-success',\n warning: 'bg-warning-soft text-warning',\n danger: 'bg-danger-soft text-danger',\n info: 'bg-info-soft text-info',\n};\n\n/**\n * Status label (\"On track\", \"At risk\") or, with `count`, a compact numeric pill for unread counts.\n *\n * @example\n * <bf-badge variant=\"warning\">At risk</bf-badge>\n * <bf-badge [count]=\"unread()\" countLabel=\"unread messages\" />\n * @summary Small status label in semantic tones, or a compact numeric pill for counts\n * @category Data display\n * @since 0.1.0\n * @slot default The badge text, shown when no `count` is set.\n */\n@Component({\n selector: 'bf-badge',\n host: { class: 'inline-flex' },\n template: `\n @if (countText(); as text) {\n <span [class]=\"countClasses\"\n >{{ text }}\n @if (countLabel()) {\n <span class=\"sr-only\"> {{ countLabel() }}</span>\n }\n </span>\n } @else {\n <span [class]=\"classes()\"><ng-content /></span>\n }\n `,\n})\nexport class BfBadgeComponent {\n /** Tint for the label style: neutral, primary, success, warning, danger or info. Ignored when\n * `count` is set. */\n readonly variant = input<BfBadgeAppearance>('neutral');\n /** Switches to the count pill; values above 99 render as \"99+\". */\n readonly count = input<number | undefined>(undefined);\n /** What the count counts (\"unread messages\"), read by assistive tech after the number (\"99+\n * unread messages\"); visually hidden. Only used with `count`. */\n readonly countLabel = input('');\n\n readonly classes = computed(() => `${LABEL_BASE} ${VARIANT[this.variant()]}`);\n readonly countText = computed(() => {\n const c = this.count();\n return c === undefined ? null : c > 99 ? '99+' : String(c);\n });\n readonly countClasses = COUNT_BASE;\n}\n","import {\n DOCUMENT,\n type Signal,\n type WritableSignal,\n computed,\n inject,\n linkedSignal,\n signal,\n} from '@angular/core';\n\n/*\n * Holds a layout-changing value (a field's error message) while a pointer button is down.\n *\n * A field is marked touched on blur, and a mouse press on another control (the form's Save button)\n * blurs it on mousedown. Showing the new error text right then pushes everything below the field\n * down by a line (about 22 px), so the mouseup lands off the button and its click is lost. While a\n * pointer is pressed anywhere in the document the held value keeps what it showed at the press;\n * it catches up one task after the release (after the click that release makes), or at once on\n * the first key press or button-less pointer move, in case the release never reached the page (a\n * native select's picker, a drag out of the window).\n */\n\n/** Per document: whether a pointer button is held down. */\nconst PRESSED = new WeakMap<Document, WritableSignal<boolean>>();\n\nfunction pointerPressed(doc: Document): Signal<boolean> {\n const known = PRESSED.get(doc);\n if (known) {\n return known;\n }\n const pressed = signal(false);\n PRESSED.set(doc, pressed);\n const view = doc.defaultView;\n // Server renders (no window) and non-DOM documents never hold.\n if (!view || typeof doc.addEventListener !== 'function') {\n return pressed;\n }\n const options: AddEventListenerOptions = { capture: true, passive: true };\n // A task later, so the click the release makes is dispatched before the layout moves.\n const release = (): void => {\n view.setTimeout(() => pressed.set(false));\n };\n // The primary mouse button, a touch or a pen: a right-click's context menu can swallow the\n // release, so it never starts a hold.\n doc.addEventListener(\n 'pointerdown',\n (event) => {\n if (event.button === 0 || event.pointerType === 'touch' || event.pointerType === 'pen') {\n pressed.set(true);\n }\n },\n options,\n );\n doc.addEventListener('pointerup', release, options);\n doc.addEventListener('pointercancel', release, options);\n doc.addEventListener('keydown', () => pressed.set(false), options);\n doc.addEventListener(\n 'pointermove',\n (event) => {\n if (event.buttons === 0 && pressed()) {\n pressed.set(false);\n }\n },\n options,\n );\n view.addEventListener('blur', release);\n return pressed;\n}\n\n/** A message paragraph that never moves the layout under a pressed pointer. */\nexport interface HeldMessage {\n /** The text to render: the current one, else (while pressed) the one still on screen. */\n readonly text: Signal<string>;\n /** Render it visually hidden (`sr-only`): a new message that arrived during the press. It is in\n * the DOM at once, so the ids that point at it resolve and assistive tech reads it; it becomes\n * visible, as the same element, once the press ends. */\n readonly hidden: Signal<boolean>;\n}\n\n/**\n * The paragraph state for a message `source` (an error text) under `heldWhilePressed`: a message\n * that appears during a press renders at once but visually hidden; one that disappears stays\n * visible until the press ends. Call it in an injection context.\n */\nexport function heldMessage(source: () => string): HeldMessage {\n const shown = heldWhilePressed(source);\n // Both read `shown` first, every time: a linkedSignal only remembers the values it was read\n // at, so skipping it while `source` is set would lose the text to hold when it disappears.\n return {\n text: computed(() => {\n const held = shown();\n return source() || held;\n }),\n hidden: computed(() => {\n const held = shown();\n return !held && Boolean(source());\n }),\n };\n}\n\n/**\n * `source`, except that while a pointer button is held down anywhere in the document it keeps the\n * value it had when the press began, and catches up once the press ends. Call it in an injection\n * context (a component field initializer).\n */\nexport function heldWhilePressed<T>(source: () => T): Signal<T> {\n const pressed = pointerPressed(inject(DOCUMENT));\n return linkedSignal<{ value: T; pressed: boolean }, T>({\n source: () => ({ value: source(), pressed: pressed() }),\n computation: (next, previous) => (next.pressed && previous ? previous.value : next.value),\n }).asReadonly();\n}\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\nimport { heldMessage } from '../_shared/pointer-hold';\n\n/**\n * Label, help text and error text around a form control, with the id wiring assistive tech needs.\n * The form widgets use it internally; use it directly only to dress a custom control the same way.\n *\n * @example\n * <bf-field #field label=\"Project name\" helpText=\"Shown to your team\" controlId=\"project\">\n * <input id=\"project\" [class]=\"controlClass\" [attr.aria-describedby]=\"field.describedBy()\" />\n * </bf-field>\n * @summary Label, help text and error text wrapper that wires ids for assistive tech\n * @category Forms\n * @since 0.1.0\n * @slot default The control the field labels, such as a native input styled with `bfFieldControlClass`.\n */\n@Component({\n selector: 'bf-field',\n host: { class: 'block' },\n // Label, help and error text break long words anywhere (a German or Finnish compound in a narrow\n // column) instead of running past the field's edge.\n template: `\n <div class=\"group/bf-field flex flex-col gap-1.5\">\n @if (label()) {\n <label\n [for]=\"controlId()\"\n class=\"text-caption text-text-muted group-focus-within/bf-field:text-primary-text wrap-anywhere\"\n [class.text-text-disabled]=\"disabled()\"\n >\n {{ label() }}\n @if (required()) {\n <span class=\"text-danger\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n <ng-content />\n @if (helpText()) {\n <p [id]=\"helpId()\" class=\"text-text-muted text-micro wrap-anywhere\">{{ helpText() }}</p>\n }\n @if (message.text(); as text) {\n <p\n [id]=\"errorId()\"\n class=\"text-danger text-micro wrap-anywhere\"\n [class.sr-only]=\"message.hidden()\"\n >\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfFieldComponent {\n /** Visible label; rendered as a `<label for>` pointing at `controlId`. */\n readonly label = input('');\n /** Helper text under the control; stays while `error` is shown. */\n readonly helpText = input('');\n /** Error text under the help text. One that appears while a pointer button is held down (the\n * press on a Save button that blurred the field) renders visually hidden until the press ends,\n * so assistive tech has it at once and the layout never moves under the pointer between\n * mousedown and mouseup. */\n readonly error = input('');\n /** Adds the required marker to the label. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Dims the label; the control carries its own disabled styling. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The id of the control inside the default slot. */\n readonly controlId = input.required<string>();\n\n readonly helpId = computed(() => `${this.controlId()}-help`);\n readonly errorId = computed(() => `${this.controlId()}-error`);\n /** The error paragraph: `error`, visually hidden while a press holds the layout. */\n protected readonly message = heldMessage(this.error);\n /** Value for the control's `aria-describedby`: the help id and the error id, each while it is\n * set (`\"<id>-help <id>-error\"`), else null; the paragraphs render whenever they are named. */\n readonly describedBy = computed(() => {\n const ids = [this.helpText() ? this.helpId() : '', this.error() ? this.errorId() : ''].filter(\n Boolean,\n );\n return ids.length > 0 ? ids.join(' ') : null;\n });\n}\n","import type { BfSize } from '../../config/size';\n\n/* Class maps of the single-line text fields (bf-input, bf-select, and bf-number-input from 0.3):\n one BfSize step each, in logical (RTL-ready) utilities. */\n\n/** Field box: height and type per step (32 / 40 / 48 px). */\nexport const FIELD_BOX: Record<BfSize, string> = {\n sm: 'h-8 text-label-xs',\n md: 'h-10 text-label-sm',\n lg: 'h-12 text-label',\n};\n\n/** Inline-start padding of the text, without and with an `icon-start` slot. */\nexport const FIELD_PADDING_START: Record<BfSize, Record<'text' | 'icon', string>> = {\n sm: { text: 'ps-3', icon: 'ps-9' },\n md: { text: 'ps-3.5', icon: 'ps-10' },\n lg: { text: 'ps-4', icon: 'ps-11' },\n};\n\n/** Inline-end padding of the text, without and with an `icon-end` slot. */\nexport const FIELD_PADDING_END: Record<BfSize, Record<'text' | 'icon', string>> = {\n sm: { text: 'pe-3', icon: 'pe-9' },\n md: { text: 'pe-3.5', icon: 'pe-10' },\n lg: { text: 'pe-4', icon: 'pe-11' },\n};\n\n/** Inset of the `icon-start` slot from the field's inline-start edge. */\nexport const FIELD_ICON_START: Record<BfSize, string> = {\n sm: 'start-3',\n md: 'start-3.5',\n lg: 'start-4',\n};\n\n/** Inset of the `icon-end` slot from the field's inline-end edge. */\nexport const FIELD_ICON_END: Record<BfSize, string> = {\n sm: 'end-3',\n md: 'end-3.5',\n lg: 'end-4',\n};\n\n/** Box of a text-entry control: shape, border width, surface, focus ring and the native states. */\nexport const FIELD_CONTROL_BASE =\n 'block w-full rounded-field border bg-surface text-text placeholder:text-text-muted ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'read-only:bg-surface-muted disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/**\n * The field state `bfFieldControlClass` styles a control for.\n *\n * @summary The size and state a custom field control is styled for by bfFieldControlClass\n * @since 0.3.0\n */\nexport interface BfFieldControlState {\n /** Height step: sm 32, md 40, lg 48 px, as `bf-input`'s `size`. */\n size: BfSize;\n /** Whether the control shows its error state (the danger border). */\n invalid: boolean;\n /** Whether the control is disabled; set the control's native `disabled` too. */\n disabled: boolean;\n /** Whether the control is read-only; set the control's native `readonly` too. */\n readonly: boolean;\n}\n\n/**\n * The class list `bf-input` puts on its native `<input>`, for a custom control inside `bf-field`\n * (a native input with a mask, a combobox, a date picker's text box) that must look like the\n * library's own fields: the same box, height and type per `size`, padding, focus ring and border,\n * with the danger border while `invalid`. The disabled and read-only styles come from the\n * control's native `disabled` / `readonly` attributes (`:disabled`, `:read-only`), so set those on\n * the control as well; the class list is the one `bf-input` renders in the same state.\n *\n * @example\n * <input [class]=\"controlClass()\" [id]=\"id\" [attr.aria-describedby]=\"field.describedBy()\" />\n * @param state The size and state to style the control for.\n * @returns The class list, as one string for `[class]`.\n * @summary The class list that makes a custom control look like a library text field\n * @since 0.3.0\n */\nexport function bfFieldControlClass(state: BfFieldControlState): string {\n return [\n FIELD_CONTROL_BASE,\n FIELD_BOX[state.size],\n FIELD_PADDING_START[state.size].text,\n FIELD_PADDING_END[state.size].text,\n state.invalid ? 'border-danger-border' : 'border-border-strong',\n ].join(' ');\n}\n","import type { ValidationError } from '@angular/forms/signals';\nimport { bfValidationMessage, type BfValidationMessages } from '../../config/validation-messages';\n\n/** An error as a field reads it: its kind and optional message; limit fields (`minLength`,\n * `context.requiredLength`, …) are read through type guards by `bfValidationMessage`. */\nexport type FieldErrorLike = Pick<ValidationError, 'kind' | 'message'>;\n\n/**\n * Explicit error message wins; otherwise, once the field was touched, the first form error's text:\n * its own `message`, else the default for its kind from `messages` (`BF_LABELS.validation`).\n */\nexport function fieldErrorText(\n errorMessage: string,\n touched: boolean,\n errors: readonly FieldErrorLike[],\n messages: BfValidationMessages,\n): string {\n if (errorMessage) {\n return errorMessage;\n }\n const first = errors[0];\n return touched && first ? bfValidationMessage(first, messages) : '';\n}\n\n/** The visual error state: any error text, or a field the form marked invalid after it was touched. */\nexport function fieldShowsError(errorText: string, invalid: boolean, touched: boolean): boolean {\n return Boolean(errorText) || (invalid && touched);\n}\n\n/**\n * `aria-describedby` targets: the help paragraph and the error paragraph under it, each while it\n * is rendered (`\"<id>-help <id>-error\"`, `\"<id>-help\"`, `\"<id>-error\"`), else none.\n */\nexport function fieldDescribedBy(id: string, errorText: string, helpText: string): string | null {\n const ids = [helpText ? `${id}-help` : '', errorText ? `${id}-error` : ''].filter(Boolean);\n return ids.length > 0 ? ids.join(' ') : null;\n}\n\n/** `aria-errormessage` target: the error paragraph while the control is invalid, else none. */\nexport function fieldErrorMessageId(\n id: string,\n errorText: string,\n showError: boolean,\n): string | null {\n return showError && errorText ? `${id}-error` : null;\n}\n","let counter = 0;\n\n/**\n * Returns a document-unique id such as `bf-input-3`, for associating labels and hints with controls.\n *\n * The ids come from this module-level counter, so a server render and the client (or two server\n * renders in one process) number them differently: `@bitforgehq/ui` 0.x is client-rendered only,\n * and SSR, hydration and prerendering of pages that render its components are not supported.\n * Hydration-stable ids are decided before 1.0.\n */\nexport function uniqueId(prefix: string): string {\n counter += 1;\n return `${prefix}-${counter}`;\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport {\n FIELD_BOX,\n FIELD_CONTROL_BASE,\n FIELD_ICON_END,\n FIELD_ICON_START,\n FIELD_PADDING_END,\n FIELD_PADDING_START,\n} from '../_shared/field-classes';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\n/**\n * The native `type` of a `bf-input`; the value stays a string (for numbers, use `bf-number-input`).\n *\n * @summary The native input types a text field supports, all bound as strings\n * @since 0.1.0\n */\nexport type BfInputType =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'search'\n | 'date'\n | 'time'\n | 'datetime-local'\n | 'month';\n/** Regex flags the native `pattern` attribute can express (it always compiles with `v`). */\nconst NATIVE_PATTERN_FLAGS = new Set(['', 'u', 'v']);\n\n/**\n * Native `inputmode`: the virtual keyboard a phone shows.\n *\n * @summary The virtual keyboards a phone can show for a text field\n * @since 0.2.0\n */\nexport type BfInputMode =\n 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n/**\n * Native `enterkeyhint`: the label of the virtual keyboard's Enter key.\n *\n * @summary The labels a phone keyboard can put on its Enter key\n * @since 0.2.0\n */\nexport type BfEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n/**\n * Native `autocapitalize`: how a virtual keyboard capitalises typed text.\n *\n * @summary How a phone keyboard capitalises the text typed into a field\n * @since 0.2.0\n */\nexport type BfAutocapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n/**\n * The `inputMode` of a `bf-input`: a `BfInputMode`, or `''` (the default) to leave the native\n * `inputmode` off.\n *\n * @summary A text field's virtual keyboard setting, a keyboard or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputInputMode = BfInputMode | '';\n/**\n * The `enterKeyHint` of a `bf-input` or `bf-number-input`: a `BfEnterKeyHint`, or `''` (the\n * default) to leave the native `enterkeyhint` off.\n *\n * @summary A field's Enter key label setting, a label or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputEnterKeyHint = BfEnterKeyHint | '';\n/**\n * The `autocapitalize` of a `bf-input`: a `BfAutocapitalize`, or `''` (the default) to leave the\n * native `autocapitalize` off.\n *\n * @summary A text field's capitalisation setting, a mode or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputAutocapitalize = BfAutocapitalize | '';\n/**\n * The height step of a text field; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for text fields, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfFieldSize = BfSize;\n\n/**\n * Single-line text field with label, help and error text, icon slots and Signal Forms binding.\n * Bind `[(value)]` directly or `[formField]` from a signal form; the field state (touched,\n * invalid, errors, disabled, readonly, required) flows in through the matching inputs.\n *\n * @example\n * <bf-input label=\"Email\" type=\"email\" placeholder=\"name@company.ch\" [(value)]=\"email\" />\n * <bf-input label=\"Email\" [formField]=\"signup.email\" />\n * @summary Single-line text field with label, help and error text, icon slots and Signal Forms binding\n * @category Forms\n * @since 0.1.0\n * @slot icon-start An icon inside the field, before the text.\n * @slot icon-end An icon inside the field, after the text.\n */\n@Component({\n selector: 'bf-input',\n imports: [BfFieldComponent],\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <div class=\"relative\">\n @if (iconStart()) {\n <span [class]=\"iconStartClasses()\">\n <ng-content select=\"[bfSlot=icon-start]\" />\n </span>\n }\n <input\n #el\n [id]=\"id()\"\n [type]=\"type()\"\n [name]=\"name()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [attr.step]=\"step() ?? null\"\n [attr.pattern]=\"patternAttr()\"\n [attr.inputmode]=\"inputMode() || null\"\n [attr.enterkeyhint]=\"enterKeyHint() || null\"\n [attr.spellcheck]=\"spellcheckAttr()\"\n [attr.autocapitalize]=\"autocapitalize() || null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (input)=\"value.set(el.value); changed.emit(el.value)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n @if (iconEnd()) {\n <span [class]=\"iconEndClasses()\">\n <ng-content select=\"[bfSlot=icon-end]\" />\n </span>\n }\n </div>\n </bf-field>\n `,\n})\nexport class BfInputComponent implements FormValueControl<string> {\n /** The text value; two-way bindable and bound by `[formField]`. */\n readonly value = model('');\n /** Native input type; the value stays a string. For numbers use `bf-number-input`, which binds\n * `number | null`. */\n readonly type = input<BfInputType>('text');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. a search field). Ignored when `label`\n * is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Example value shown while empty. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Makes the control read-only. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required (label marker and native attribute). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-input'));\n /** Reserve space for an icon in the `icon-start` slot. */\n readonly iconStart = input(false, { transform: booleanAttribute });\n /** Reserve space for an icon in the `icon-end` slot. */\n readonly iconEnd = input(false, { transform: booleanAttribute });\n /** Native autocomplete hint. */\n readonly autocomplete = input('');\n /** Maximum number of characters (native `maxlength`); bound by Signal Forms `maxLength()`. */\n readonly maxLength = input<number | undefined>(undefined);\n /** Minimum number of characters (native `minlength`); bound by Signal Forms `minLength()`. */\n readonly minLength = input<number | undefined>(undefined);\n /** Lowest value (native `min`), e.g. `2026-01-01` for a date or `0` for a number. */\n readonly min = input<string | undefined>(undefined);\n /** Highest value (native `max`), e.g. `2026-12-31` for a date or `100` for a number. */\n readonly max = input<string | undefined>(undefined);\n /** Step between valid values (native `step`), e.g. `0.5` or `any`. */\n readonly step = input<string | number | undefined>(undefined);\n /**\n * Patterns from Signal Forms `pattern()`; exactly one, with no flags or only `u`/`v`, is rendered\n * as the native `pattern`.\n */\n readonly pattern = input<readonly RegExp[]>([]);\n /** Virtual keyboard to show (native `inputmode`). */\n readonly inputMode = input<BfInputInputMode>('');\n /** Label of the virtual keyboard's Enter key (native `enterkeyhint`). */\n readonly enterKeyHint = input<BfInputEnterKeyHint>('');\n /** Spell checking on or off (native `spellcheck`); the browser decides while unset. */\n readonly spellcheck = input<boolean | undefined>(undefined);\n /** Capitalisation of typed text on virtual keyboards (native `autocapitalize`). */\n readonly autocapitalize = input<BfInputAutocapitalize>('');\n\n /** Emitted with the new text right after the user changes it (each keystroke or paste). */\n readonly changed = output<string>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n readonly iconStartClasses = computed(\n () =>\n `text-text-subtle pointer-events-none absolute inset-y-0 flex items-center ${FIELD_ICON_START[this.resolvedSize()]}`,\n );\n readonly iconEndClasses = computed(\n () =>\n `text-text-subtle absolute inset-y-0 flex items-center ${FIELD_ICON_END[this.resolvedSize()]}`,\n );\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n /**\n * Native `pattern`: only an unambiguous single pattern whose flags HTML can honour (none, `u` or\n * `v`; the browser compiles it anchored in `v` mode). Several patterns, or flags such as `i`,\n * are validated by the form alone, so the native check never rejects a value the form accepts.\n */\n readonly patternAttr = computed(() => {\n const patterns = this.pattern();\n const only = patterns.length === 1 ? patterns[0] : undefined;\n return only && NATIVE_PATTERN_FLAGS.has(only.flags) ? only.source : null;\n });\n readonly spellcheckAttr = computed(() => {\n const spellcheck = this.spellcheck();\n return spellcheck === undefined ? null : String(spellcheck);\n });\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n return [\n FIELD_CONTROL_BASE,\n FIELD_BOX[size],\n FIELD_PADDING_START[size][this.iconStart() ? 'icon' : 'text'],\n FIELD_PADDING_END[size][this.iconEnd() ? 'icon' : 'text'],\n this.showError() ? 'border-danger-border' : 'border-border-strong',\n ].join(' ');\n });\n\n /**\n * Focuses the native input; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","import {\n Component,\n DOCUMENT,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\nconst BASE =\n 'block w-full rounded-field border bg-surface text-text placeholder:text-text-muted ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'read-only:bg-surface-muted disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/* A textarea has no fixed height (rows and autoResize set it), so a step sets padding and type. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'px-3 py-1.5 text-label-xs',\n md: 'px-3.5 py-2 text-label-sm',\n lg: 'px-4 py-3 text-label leading-6', // multi-line text keeps 24 px lines (the forms-plugin line-height it had)\n};\n/* Auto-resize: sized to the content, between the bounds the host's custom properties carry (an\n unset one leaves its side unbounded); scrolls past the upper one. */\nconst GROWING =\n 'field-sizing-content resize-none overflow-y-auto [min-block-size:var(--bf-textarea-min-block-size)] [max-block-size:var(--bf-textarea-max-block-size)]';\n/* What a box of `n` lines adds to `n lh`: its block padding (read from the step's own `py-*`\n class in SIZE, one spacing step is 0.25rem, so the two can never drift) plus the 1 px border on\n both sides. */\nfunction blockChrome(size: BfSize): string {\n const step = /(?:^|\\s)py-(\\d+(?:\\.\\d+)?)(?:\\s|$)/.exec(SIZE[size])?.[1];\n return `${Number(step ?? 0) * 0.5}rem + 2px`;\n}\n\n/** `CSS.supports('field-sizing', 'content')` in `view`, false without a window or `CSS.supports`. */\nfunction supportsFieldSizing(view: (Window & typeof globalThis) | null): boolean {\n const css = view?.CSS;\n return typeof css?.supports === 'function' && css.supports('field-sizing', 'content');\n}\n\n/**\n * Multi-line text field with the same chrome and Signal Forms binding as `bf-input`.\n *\n * @example\n * <bf-textarea label=\"Notes\" [rows]=\"4\" [(value)]=\"notes\" />\n * @summary Multi-line text field with label, help and error text, and Signal Forms binding\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-textarea',\n imports: [BfFieldComponent],\n // The auto-resize bounds are custom properties on the host, which the textarea's classes read.\n host: {\n class: 'block',\n '[attr.id]': 'null',\n '[style.--bf-textarea-min-block-size]': 'minBlockSize()',\n '[style.--bf-textarea-max-block-size]': 'maxBlockSize()',\n },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <textarea\n #el\n [id]=\"id()\"\n [name]=\"name()\"\n [value]=\"value()\"\n [rows]=\"rows()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (input)=\"value.set(el.value); changed.emit(el.value)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n </bf-field>\n `,\n})\nexport class BfTextareaComponent implements FormValueControl<string> {\n /** The text value; two-way bindable and bound by `[formField]`. */\n readonly value = model('');\n /** Padding and type step: sm, md, lg (a textarea's height comes from `rows`); unset follows\n * `provideBfDefaults()` (`fieldSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. an inline comment box). Ignored when\n * `label` is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Example value shown while empty. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Makes the control read-only. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-textarea'));\n /** Visible rows; with `autoResize`, the rows the empty box starts at. */\n readonly rows = input(3);\n /** Grows with the content (CSS `field-sizing: content`) from `rows` up to `maxRows`. Where the\n * browser has no `field-sizing` it keeps the fixed `rows`. */\n readonly autoResize = input(false, { transform: booleanAttribute });\n /** With `autoResize`, the rows the box grows to at most; past them it scrolls. Unset, it grows\n * without a bound. */\n readonly maxRows = input<number | undefined>(undefined);\n /** Maximum number of characters (native `maxlength`); bound by Signal Forms `maxLength()`. */\n readonly maxLength = input<number | undefined>(undefined);\n /** Minimum number of characters (native `minlength`); bound by Signal Forms `minLength()`. */\n readonly minLength = input<number | undefined>(undefined);\n\n /** Emitted with the new text right after the user changes it (each keystroke or paste). */\n readonly changed = output<string>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLTextAreaElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n /** Whether the browser sizes a field to its content; read once. False on the server and where\n * `CSS.supports` is missing, so the box keeps its fixed `rows` there. */\n private readonly fieldSizing = supportsFieldSizing(inject(DOCUMENT).defaultView);\n /** Auto-resize in effect: asked for, and the browser can do it. */\n private readonly growing = computed(() => this.autoResize() && this.fieldSizing);\n /** The height of `n` lines of this step, padding and border included. */\n private blockSize(lines: number): string {\n return `calc(${lines}lh + ${blockChrome(this.resolvedSize())})`;\n }\n /** While growing: the empty box is as tall as `rows` lines. */\n protected readonly minBlockSize = computed(() =>\n this.growing() ? this.blockSize(this.rows()) : null,\n );\n /** While growing with `maxRows`: it stops at `maxRows` lines. */\n protected readonly maxBlockSize = computed(() => {\n const max = this.maxRows();\n return this.growing() && max !== undefined ? this.blockSize(max) : null;\n });\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly classes = computed(() =>\n [\n BASE,\n SIZE[this.resolvedSize()],\n this.showError() ? 'border-danger-border' : 'border-border-strong',\n this.growing() ? GROWING : 'resize-y',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /**\n * Focuses the native textarea; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","/**\n * Equality that matches a bound value to an option's value (`compareWith` of the choice controls).\n * Called as `compareWith(optionValue, value)`: the option's value first, the bound value second.\n *\n * @summary Equality of choice values, for options that are objects rather than primitives\n * @since 0.3.0\n */\nexport type BfCompareWith<T> = (optionValue: T, value: T) => boolean;\n\n/**\n * Index of the option whose value matches `value` under `compare`; `-1` for `null` (nothing\n * selected) or a value no option matches. An option whose value is `null` therefore never shows as\n * selected.\n */\nexport function choiceIndex<T>(\n options: readonly { readonly value: T }[],\n value: T | null,\n compare: BfCompareWith<T>,\n): number {\n return value === null ? -1 : options.findIndex((option) => compare(option.value, value));\n}\n\n/**\n * The native `value` of an option (`<option>`, radio): `String(value)` for a string, number or\n * boolean, so native reads, form posts and browser tests see the real value; the option index for\n * anything else (objects). The controls map a choice back by position, never by this key, so\n * duplicate keys still resolve to the right option.\n */\nexport function choiceKey(value: unknown, index: number): string {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n ? String(value)\n : String(index);\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex, choiceKey } from '../_shared/choice';\nimport { FIELD_BOX, FIELD_PADDING_START } from '../_shared/field-classes';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\n/**\n * One choice of `bf-select`; `value` is any type (a string by default).\n *\n * @summary One choice of a select with its value, its label and a disabled flag\n * @since 0.1.0\n */\nexport interface BfSelectOption<T = string> {\n /** The value the select's `value` takes when this option is chosen. */\n value: T;\n /** The text of the native `option`. */\n label: string;\n /** Whether this option cannot be chosen. */\n disabled?: boolean;\n}\n\nconst BASE =\n 'block w-full appearance-none rounded-field border bg-none text-text ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/* A native <select> always matches :read-only, so the read-only surface comes from this map rather\n than a read-only: variant as on bf-input. */\ntype BfSelectMode = 'editable' | 'readonly';\nconst MODE: Record<BfSelectMode, string> = {\n editable: 'cursor-pointer bg-surface',\n readonly: 'cursor-default bg-surface-muted',\n};\n\n/* Keys that open the picker or change a closed select's value; blocked while read-only, with or\n without Alt (Alt+ArrowDown/Up and F4 open the picker on Windows and Linux). Tab, Escape and\n Ctrl/Cmd shortcuts pass through. */\nconst PICKER_KEYS = new Set([\n 'F4',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n 'Enter',\n]);\n\n/* The text stops short of the chevron at the inline end. */\nconst PADDING_END: Record<BfSize, string> = { sm: 'pe-9', md: 'pe-10', lg: 'pe-11' };\n\n/* The chevron is a rotated square drawn with borders, so no icon dependency is needed. It points\n down, so it needs no mirroring; only its inset from the inline end follows the size. -70 %\n instead of -50 % centres the rotated square's visible corner rather than its box. */\nconst CHEVRON =\n 'relative after:pointer-events-none after:absolute after:top-1/2 after:h-2.5 after:w-2.5 ' +\n \"after:-translate-y-[70%] after:rotate-45 after:border-r-[1.5px] after:border-b-[1.5px] after:border-text-subtle after:content-['']\";\nconst CHEVRON_INSET: Record<BfSize, string> = {\n sm: 'after:end-3.5',\n md: 'after:end-4',\n lg: 'after:end-4.5',\n};\n\n/**\n * Native single-choice dropdown styled like the text field, with a placeholder option and\n * Signal Forms binding. Generic over the option value (a string by default); `null` means nothing\n * is selected.\n *\n * @example\n * <bf-select label=\"Project\" placeholder=\"Pick a project\" [options]=\"projects\" [(value)]=\"projectId\" />\n * <bf-select label=\"Team\" placeholder=\"Pick a team\" [options]=\"teams\" [formField]=\"task.teamId\" />\n * @summary Native single-choice dropdown styled like the text field, with Signal Forms binding\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-select',\n imports: [BfFieldComponent],\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <div [class]=\"wrapperClasses()\">\n <!-- Selection is driven entirely by [selected] on each <option>; a [value] binding on\n <select> would fight it once options are added, removed or reordered. A primitive\n option value is its native value, an object's is its index; a choice maps back by\n position, so any value type round-trips. -->\n <select\n #el\n [id]=\"id()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (mousedown)=\"onMousedown($event)\"\n (keydown)=\"onKeydown($event)\"\n (change)=\"onChange(el)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (placeholder()) {\n <option value=\"\" disabled [selected]=\"selectedIndex() === -1\">\n {{ placeholder() }}\n </option>\n } @else if (showEmptyOption()) {\n <option value=\"\" hidden disabled selected></option>\n }\n @for (option of options(); track $index) {\n <option\n [value]=\"key(option.value, $index)\"\n [disabled]=\"option.disabled ?? false\"\n [selected]=\"$index === selectedIndex()\"\n >\n {{ option.label }}\n </option>\n }\n </select>\n </div>\n </bf-field>\n `,\n})\nexport class BfSelectComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The options to choose from. */\n readonly options = input.required<readonly BfSelectOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. a table filter). Ignored when `label`\n * is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Disabled first option shown while nothing is selected. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the value but blocks changes; the select stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-select'));\n\n /** Emitted with the chosen value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLSelectElement>>('el');\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n readonly wrapperClasses = computed(() => `${CHEVRON} ${CHEVRON_INSET[this.resolvedSize()]}`);\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n readonly showEmptyOption = computed(() => !this.placeholder() && this.selectedIndex() === -1);\n private readonly labels = inject(BF_LABELS);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly classes = computed(() =>\n [\n BASE,\n FIELD_BOX[this.resolvedSize()],\n FIELD_PADDING_START[this.resolvedSize()].text,\n PADDING_END[this.resolvedSize()],\n MODE[this.readonly() ? 'readonly' : 'editable'],\n /* Plain hover sorts before focus: and disabled:, so the focus and disabled borders still win. */\n this.showError()\n ? 'border-danger-border hover:border-danger'\n : 'border-border-strong hover:border-text-muted',\n this.selectedIndex() === -1 ? 'text-text-muted' : '',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /** Native `value` of an option: its value for a primitive, its index for an object. */\n protected readonly key = choiceKey;\n\n /**\n * Focuses the native select; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: no picker on a mouse press. Cancelling the press also cancels its focus, so the\n * select is focused explicitly, like any other read-only control. Touch screens open the\n * platform picker without a cancellable press; a choice made there is reverted by `onChange`.\n * @internal\n */\n onMousedown(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n this.el().nativeElement.focus();\n }\n }\n\n /**\n * Read-only: no picker or value change from the keyboard (arrows, Enter, Space, F4, type-ahead).\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.readonly() || event.ctrlKey || event.metaKey) {\n return;\n }\n if (PICKER_KEYS.has(event.key) || (event.key.length === 1 && !event.altKey)) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the chosen option's value to the model and emits `changed`; while read-only, restores\n * the shown option instead.\n * @internal\n */\n onChange(el: HTMLSelectElement): void {\n // The placeholder or the hidden empty option, when rendered, is the first native option.\n const offset = this.placeholder() || this.showEmptyOption() ? 1 : 0;\n const index = this.selectedIndex();\n if (this.readonly()) {\n el.selectedIndex = index < 0 ? 0 : index + offset;\n return;\n }\n const option = this.options()[el.selectedIndex - offset];\n if (!option) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n // A value that matches no option (a `null` option value) reads as nothing selected; show that.\n if (this.selectedIndex() < 0) {\n el.selectedIndex = 0;\n }\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormCheckboxControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\nconst BOX_BASE =\n 'relative flex shrink-0 items-center justify-center rounded-checkbox border-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden ' +\n 'peer-disabled:border-surface-sunken peer-disabled:bg-surface-muted ' +\n \"after:absolute after:content-['']\";\n/* Box, check mark and dash per step: 18 / 22 / 24 px boxes. */\nconst BOX_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6' };\nconst CHECK: Record<BfSize, string> = {\n sm: 'after:h-[9px] after:w-[5px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n md: 'after:h-[11px] after:w-[6px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n lg: 'after:h-3 after:w-[7px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n};\nconst DASH: Record<BfSize, string> = {\n sm: 'after:h-0 after:w-2 after:border-b-2',\n md: 'after:h-0 after:w-[10px] after:border-b-2',\n lg: 'after:h-0 after:w-3 after:border-b-2',\n};\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n/* The error text lines up with the label: box plus the 10 px gap. */\nconst ERROR_INDENT: Record<BfSize, string> = { sm: 'ps-7', md: 'ps-8', lg: 'ps-8.5' };\n\n/* Read-only boxes rest on `surface-muted` like the read-only radio rings; a checked one keeps a\n `primary` border and mark (>= 4.8:1 on surface-muted and bg in both themes, above the 3:1\n non-text minimum), so it reads as checked but not as an editable filled box. */\ntype BfCheckboxBoxState = 'on' | 'readonlyOn' | 'error' | 'readonly' | 'off';\nconst BOX_STATE: Record<BfCheckboxBoxState, string> = {\n on: 'border-primary bg-primary after:border-on-primary after:opacity-100',\n readonlyOn: 'border-primary bg-surface-muted after:border-primary after:opacity-100',\n error: 'border-danger-border bg-surface after:border-on-primary after:opacity-0',\n readonly: 'border-border-strong bg-surface-muted after:border-on-primary after:opacity-0',\n off: 'border-border-strong bg-surface after:border-on-primary after:opacity-0',\n};\nconst BOX_HOVER: Record<BfCheckboxBoxState, string> = {\n on: 'group-hover/bf-checkbox:border-primary-hover group-hover/bf-checkbox:bg-primary-hover',\n readonlyOn: '',\n error: 'group-hover/bf-checkbox:border-danger',\n readonly: '',\n off: 'group-hover/bf-checkbox:border-text-muted',\n};\n/* Pressed boundary while the label (the named group) is held down; editable boxes only. */\nconst BOX_PRESSED = 'group-active/bf-checkbox:border-text';\n\n/* How the row responds to the pointer: only an editable row is a hover group with a pointer. */\ntype BfCheckboxMode = 'editable' | 'readonly' | 'disabled';\nconst LABEL_MODE: Record<BfCheckboxMode, string> = {\n editable: 'group/bf-checkbox cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\n\n/**\n * Checkbox with a 22 px rounded box and an optional label, implementing the Signal Forms\n * checkbox contract so `[formField]` binds `checked`.\n *\n * @example\n * <bf-checkbox [(checked)]=\"agree\">I agree to the terms</bf-checkbox>\n * <bf-checkbox label=\"Notify me\" [formField]=\"prefs.notify\" />\n * @summary Rounded checkbox with an optional label that binds to Signal Forms\n * @category Forms\n * @since 0.1.0\n * @slot default Rich label content next to the box, before the `label` text.\n */\n@Component({\n selector: 'bf-checkbox',\n host: { class: 'block', '[attr.id]': 'null' },\n // items-start keeps the label row only as wide as its content, so a click on empty space beside\n // it does not toggle the box.\n template: `\n <div class=\"flex flex-col items-start gap-1.5\">\n <label [for]=\"id()\" [class]=\"labelClasses()\">\n <input\n #el\n type=\"checkbox\"\n class=\"peer sr-only\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (click)=\"onClick($event)\"\n (change)=\"onChange(el.checked)\"\n (blur)=\"touch.emit()\"\n />\n <span data-box aria-hidden=\"true\" [class]=\"boxClasses()\"></span>\n <span data-text [class]=\"textClasses()\"><ng-content />{{ label() }}</span>\n </label>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" [class]=\"errorClasses()\">\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfCheckboxComponent implements FormCheckboxControl {\n /** Whether the box is checked; two-way bindable and bound by `[formField]`. */\n readonly checked = model(false);\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Accessible name when there is no visible `label`, e.g. a row-selection box. */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the control when no visible label is rendered (e.g. a\n * table column header). */\n readonly ariaLabelledby = input('');\n /** Height step of the row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Shows the mixed state (e.g. \"select all\" with some rows selected); two-way bindable. A user\n * change clears it, like the native checkbox, so the box and `aria-checked` agree. */\n readonly indeterminate = model(false);\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the state but blocks changes; the box stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-checkbox'));\n\n /** Emitted with the new checked state after a user change. */\n readonly changed = output<boolean>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n private readonly mode = computed<BfCheckboxMode>(() =>\n this.disabled() ? 'disabled' : this.readonly() ? 'readonly' : 'editable',\n );\n readonly labelClasses = computed(() =>\n [\n 'inline-flex min-w-6 items-center gap-2.5',\n ROW[this.resolvedSize()],\n LABEL_MODE[this.mode()],\n ].join(' '),\n );\n readonly textClasses = computed(\n () =>\n `text-text peer-disabled:text-text-disabled font-semibold empty:hidden ${TEXT[this.resolvedSize()]}`,\n );\n readonly errorClasses = computed(\n () => `text-danger text-micro ${ERROR_INDENT[this.resolvedSize()]}`,\n );\n readonly boxClasses = computed(() => {\n const on = this.checked() || this.indeterminate();\n const state: BfCheckboxBoxState = on\n ? this.readonly()\n ? 'readonlyOn'\n : 'on'\n : this.showError()\n ? 'error'\n : this.readonly()\n ? 'readonly'\n : 'off';\n const size = this.resolvedSize();\n return [\n BOX_BASE,\n BOX_SIZE[size],\n BOX_STATE[state],\n // Hovering the label (the named `group/bf-checkbox`) tints the box; a disabled or read-only\n // box has no hover. Named so a consumer's own `.group` ancestor (e.g. a card) does not also\n // tint it.\n this.mode() === 'editable' ? BOX_HOVER[state] : '',\n this.mode() === 'editable' ? BOX_PRESSED : '',\n this.indeterminate() ? DASH[size] : CHECK[size],\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n /**\n * Focuses the native checkbox; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the toggle. Space activates a checkbox through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the native checkbox state to `checked` and emits `changed`.\n * @internal\n */\n onChange(next: boolean): void {\n this.indeterminate.set(false);\n this.checked.set(next);\n this.changed.emit(next);\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormCheckboxControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/* The design's 3 px knob inset: a 1.5 px border (transparent except read-only off, so\n forced-colors mode draws the track) plus 1.5 px padding. */\nconst TRACK_BASE =\n 'relative flex shrink-0 items-center rounded-control border-[1.5px] p-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden';\nconst KNOB_BASE =\n 'block rounded-control border-[1.5px] border-transparent shadow-segment transition-transform';\n\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\n/* Track, knob and knob travel per step: the knob fills the track's inner height (track minus the\n 3 px inset each side) and travels the rest of its inner width, towards the inline end (mirrored\n under dir=\"rtl\"). */\nconst TRACK_SIZE: Record<BfSize, string> = { sm: 'h-6 w-10', md: 'h-7 w-12', lg: 'h-8 w-14' };\nconst KNOB_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6.5' };\nconst KNOB_TRAVEL: Record<BfSize, Record<'on' | 'off', string>> = {\n sm: { on: 'translate-x-4 rtl:-translate-x-4', off: 'translate-x-0' },\n md: { on: 'translate-x-5 rtl:-translate-x-5', off: 'translate-x-0' },\n lg: { on: 'translate-x-6 rtl:-translate-x-6', off: 'translate-x-0' },\n};\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n/* How the row responds to the pointer: only an editable row is a hover group with a pointer. */\ntype BfToggleMode = 'editable' | 'readonly' | 'disabled';\nconst LABEL_MODE: Record<BfToggleMode, string> = {\n editable: 'group/bf-toggle cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\n/* Track fill and border per mode and state. Disabled uses tokens, never opacity: a soft primary\n track when on, the sunken fill when off. Read-only rests on the muted surface like the other\n read-only controls, outlined in `primary` when on (>= 4.8:1 on bg and surface-muted in both\n themes) and in `control-off` when off (>= 3:1 on bg and surface), so the track keeps its\n non-text boundary; no hover. Enabled tracks darken while the label (the named `group/bf-toggle`)\n is hovered — named so a consumer's own `.group` ancestor (e.g. a card) does not also tint it. */\nconst TRACK_FILL: Record<BfToggleMode, Record<'on' | 'off', string>> = {\n editable: {\n on: 'border-transparent bg-primary group-hover/bf-toggle:bg-primary-hover',\n off: 'border-transparent bg-control-off group-hover/bf-toggle:bg-text-muted',\n },\n readonly: {\n on: 'border-primary bg-surface-muted',\n off: 'border-control-off bg-surface-muted',\n },\n disabled: {\n on: 'border-transparent bg-primary-soft',\n off: 'border-transparent bg-surface-sunken',\n },\n};\n\n/* Pressed boundary while the label (the named group) is held down; editable tracks only. */\nconst TRACK_PRESSED: Record<BfToggleMode, string> = {\n editable: 'group-active/bf-toggle:border-text',\n readonly: '',\n disabled: '',\n};\n\n/* Knob fill per mode and state; the knob carries the state (WCAG 1.4.11), so it reaches 3:1 on its\n track for any configured primary: on-primary on the primary track, primary-strong on the muted\n read-only track, surface on control-off. A disabled knob stays surface (exempt). */\nconst KNOB_FILL: Record<BfToggleMode, Record<'on' | 'off', string>> = {\n editable: { on: 'bg-on-primary', off: 'bg-surface' },\n readonly: { on: 'bg-primary-strong', off: 'bg-surface' },\n disabled: { on: 'bg-surface', off: 'bg-surface' },\n};\n\n/**\n * The side of a `bf-toggle`'s switch its label sits on: after it (`end`) or before it (`start`).\n *\n * @summary Whether a toggle's label sits after or before its switch\n * @since 0.3.0\n */\nexport type BfToggleLabelPosition = 'end' | 'start';\n\n/**\n * On/off switch for settings that apply immediately. Implements the Signal Forms checkbox contract.\n *\n * @example\n * <bf-toggle label=\"Notifications\" [(checked)]=\"notifications\" />\n * @summary On/off switch for settings that apply immediately, with Signal Forms binding\n * @category Forms\n * @since 0.1.0\n * @slot default Rich label content after the `label` text.\n */\n@Component({\n selector: 'bf-toggle',\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <!-- items-start keeps the end-positioned label (and its 44 px hit row) as wide as its content. -->\n <div class=\"flex flex-col items-start gap-1.5\">\n <label [for]=\"id()\" [class]=\"labelClasses()\">\n <input\n #el\n type=\"checkbox\"\n role=\"switch\"\n class=\"peer sr-only\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-checked]=\"checked() ? 'true' : 'false'\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (click)=\"onClick($event)\"\n (change)=\"onChange(el.checked)\"\n (blur)=\"touch.emit()\"\n />\n <span data-track aria-hidden=\"true\" [class]=\"trackClasses()\">\n <span data-knob [class]=\"knobClasses()\"></span>\n </span>\n @if (label()) {\n <span [class]=\"textClasses()\">{{ label() }}</span>\n }\n <ng-content />\n </label>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfToggleComponent implements FormCheckboxControl {\n /** Whether the switch is on; two-way bindable and bound by `[formField]`. */\n readonly checked = model(false);\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Accessible name when no visible label is rendered (e.g. a switch in a list row). */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the control when no visible label is rendered (e.g. a\n * table column header). */\n readonly ariaLabelledby = input('');\n /** Height step of the row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Put the label before the switch (as in settings lists). */\n readonly labelPosition = input<BfToggleLabelPosition>('end');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the state but blocks changes; the switch stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-toggle'));\n\n /** Emitted with the new state after a user change. */\n readonly changed = output<boolean>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n private readonly mode = computed<BfToggleMode>(() =>\n this.disabled() ? 'disabled' : this.readonly() ? 'readonly' : 'editable',\n );\n\n readonly labelClasses = computed(() =>\n [\n this.labelPosition() === 'start'\n ? 'flex w-full flex-row-reverse items-center justify-between gap-2.5'\n : 'inline-flex items-center gap-2.5',\n ROW[this.resolvedSize()],\n LABEL_MODE[this.mode()],\n ].join(' '),\n );\n readonly trackClasses = computed(() =>\n [\n TRACK_BASE,\n TRACK_SIZE[this.resolvedSize()],\n TRACK_FILL[this.mode()][this.checked() ? 'on' : 'off'],\n TRACK_PRESSED[this.mode()],\n ]\n .filter(Boolean)\n .join(' '),\n );\n /* min-w-0 and wrap-anywhere: a long label (or a large text size) wraps beside the track instead\n of overflowing the row (a start label would spill past the row's start edge). */\n readonly textClasses = computed(\n () =>\n `text-text peer-disabled:text-text-disabled min-w-0 font-semibold wrap-anywhere ${TEXT[this.resolvedSize()]}`,\n );\n readonly knobClasses = computed(() => {\n const on = this.checked();\n const fill = KNOB_FILL[this.mode()][on ? 'on' : 'off'];\n const size = this.resolvedSize();\n return `${KNOB_BASE} ${KNOB_SIZE[size]} ${fill} ${KNOB_TRAVEL[size][on ? 'on' : 'off']}`;\n });\n private readonly labels = inject(BF_LABELS);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n\n /**\n * Focuses the native switch; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the toggle. Space activates a switch through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the native switch state to `checked` and emits `changed`.\n * @internal\n */\n onChange(next: boolean): void {\n this.checked.set(next);\n this.changed.emit(next);\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChildren,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex, choiceKey } from '../_shared/choice';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * How a `bf-radio-group` lays out its options: stacked (`vertical`) or in a row (`horizontal`).\n *\n * @summary Whether a radio group stacks its options or sets them in a row\n * @since 0.3.0\n */\nexport type BfRadioGroupOrientation = 'vertical' | 'horizontal';\n\n/**\n * One choice of `bf-radio-group`; `value` is any type (a string by default).\n *\n * @summary One choice of a radio group with its value, label and optional description\n * @since 0.1.0\n */\nexport interface BfRadioOption<T = string> {\n /** The value the group's `value` takes when this option is chosen. */\n value: T;\n /** The visible label, also the radio's accessible name. */\n label: string;\n /** A second line under the label, linked to the radio with `aria-describedby`. */\n description?: string;\n /** Whether this option cannot be chosen. */\n disabled?: boolean;\n}\n\nconst RING_BASE =\n 'relative mt-0.5 flex shrink-0 items-center justify-center rounded-full border-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden peer-disabled:border-surface-sunken peer-disabled:bg-surface-muted';\n/* The dot is primary-strong, not primary: it carries the checked state inside its surface ring,\n and primary-strong reaches 3:1 there for any configured primary (a pale brand primary does not). */\nconst DOT_BASE = 'rounded-full bg-primary-strong forced-colors:bg-[CanvasText] transition-opacity';\n/* The label text sits in a wrapper span, so `peer-disabled:` cannot reach it; the row colours it\n instead and dims it while its radio is disabled. */\nconst OPTION_LABEL_BASE =\n 'inline-flex items-center gap-2.5 text-text has-[input:disabled]:text-text-disabled';\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\n/* Ring (18 / 22 / 24 px), dot and option label type per step. */\nconst RING_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6' };\nconst DOT_SIZE: Record<BfSize, string> = { sm: 'size-2.5', md: 'size-3', lg: 'size-3.5' };\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n\n/* How an option responds to the pointer. Only an editable option is a hover group with a pointer\n (named `group/bf-radio` so a consumer's own `.group` ancestor, e.g. a card, does not also tint\n the ring); a read-only one rests on the muted surface. */\ntype BfRadioMode = 'editable' | 'readonly' | 'disabled';\nconst OPTION_LABEL_MODE: Record<BfRadioMode, string> = {\n editable: 'group/bf-radio cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\nconst RING_FILL: Record<BfRadioMode, string> = {\n editable: 'bg-surface',\n readonly: 'bg-surface-muted',\n disabled: 'bg-surface',\n};\n\n/* Pressed boundary of an editable option's ring while its label is held down. */\nconst RING_PRESSED = 'group-active/bf-radio:border-text';\n\n/* Keys that move a native radio group's selection; blocked while read-only. */\nconst ARROW_KEYS = new Set(['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']);\n\n/**\n * A group of radio buttons for choosing one of a few options, with an optional description per\n * option. Implements the Signal Forms value contract; generic over the option value (a string by\n * default), `null` while nothing is selected.\n *\n * @example\n * <bf-radio-group label=\"View\" [options]=\"views\" [(value)]=\"view\" />\n * @summary Group of radio buttons for choosing one option, with optional per-option descriptions\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-radio-group',\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <fieldset\n [id]=\"id()\"\n role=\"radiogroup\"\n class=\"flex flex-col gap-1.5\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (label()) {\n <!-- A rendered legend is not a flex item of the fieldset, so the 6 px gap to the options is\n its own margin; gap-1.5 spaces the options and the error message. -->\n <legend class=\"text-caption text-text-muted mb-1.5\">{{ label() }}</legend>\n }\n <div data-options [class]=\"optionsClasses()\">\n @for (option of options(); track $index) {\n <label [class]=\"optionLabelClasses(option)\">\n <input\n #radio\n type=\"radio\"\n class=\"peer sr-only\"\n [name]=\"name()\"\n [value]=\"key(option.value, $index)\"\n [checked]=\"$index === selectedIndex()\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"onClick($event)\"\n (change)=\"onChange($index)\"\n (blur)=\"touch.emit()\"\n />\n <span aria-hidden=\"true\" [class]=\"ringClasses(option, $index)\">\n <span data-dot [class]=\"dotClasses($index)\"></span>\n </span>\n <span class=\"flex flex-col\">\n <span [class]=\"textClasses()\">{{ option.label }}</span>\n @if (option.description) {\n <span data-description class=\"text-caption text-text-muted\">{{\n option.description\n }}</span>\n }\n </span>\n </label>\n }\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n </fieldset>\n `,\n})\nexport class BfRadioGroupComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The options to choose from. */\n readonly options = input.required<readonly BfRadioOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Group label, rendered as the fieldset legend. */\n readonly label = input('');\n /**\n * Accessible name of the group when no visible `label` is rendered. Ignored when `label` is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the group when no visible `label` is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Height step of the option row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stack the options vertically (default) or in a row. */\n readonly orientation = input<BfRadioGroupOrientation>('vertical');\n /** Disables every option. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Shows the choice but blocks changes; the options stay focusable and the group exposes\n * `aria-readonly`.\n */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the group required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Shared name of the radio inputs; generated when not set. */\n readonly name = input(uniqueId('bf-radio'));\n /** Group id; generated when not set. */\n readonly id = input(uniqueId('bf-radio-group'));\n\n /** Emitted with the newly selected value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n /** The rendered radio inputs, in option order; used by `focus()`. */\n private readonly radios = viewChildren<ElementRef<HTMLInputElement>>('radio');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n readonly textClasses = computed(() => `font-semibold ${TEXT[this.resolvedSize()]}`);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /**\n * `aria-label` value: only when there is no visible label, so the legend stays the sole\n * accessible name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly optionsClasses = computed(() =>\n this.orientation() === 'horizontal'\n ? 'flex flex-row flex-wrap gap-x-6 gap-y-2'\n : 'flex flex-col items-start gap-1',\n );\n\n protected optionLabelClasses(option: BfRadioOption<T>): string {\n return `${OPTION_LABEL_BASE} ${ROW[this.resolvedSize()]} ${OPTION_LABEL_MODE[this.optionMode(option)]}`;\n }\n\n protected ringClasses(option: BfRadioOption<T>, index: number): string {\n const mode = this.optionMode(option);\n const fill = `${RING_SIZE[this.resolvedSize()]} ${RING_FILL[mode]}`;\n // Pressing an editable option's named `group/bf-radio` label draws the pressed boundary.\n const pressed = mode === 'editable' ? ` ${RING_PRESSED}` : '';\n if (index === this.selectedIndex()) {\n return `${RING_BASE} ${fill} border-primary${pressed}`;\n }\n // Hovering an editable option's named `group/bf-radio` label darkens its ring; the selected\n // one stays.\n const hover = mode === 'editable';\n const border = this.showError()\n ? `border-danger-border${hover ? ' group-hover/bf-radio:border-danger' : ''}`\n : `border-border-strong${hover ? ' group-hover/bf-radio:border-text-muted' : ''}`;\n return `${RING_BASE} ${fill} ${border}${pressed}`;\n }\n\n protected dotClasses(index: number): string {\n const shown = index === this.selectedIndex() ? 'opacity-100' : 'opacity-0';\n return `${DOT_BASE} ${DOT_SIZE[this.resolvedSize()]} ${shown}`;\n }\n\n /**\n * Focuses the checked radio, else the first enabled one; Signal Forms calls it from\n * `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n const all = this.options();\n const enabled = (option: BfRadioOption<T> | undefined) =>\n option !== undefined && !(this.disabled() || option.disabled);\n let index = this.selectedIndex();\n if (!enabled(all[index])) {\n index = all.findIndex(enabled);\n }\n this.radios()[index]?.nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the selection. Space activates a radio through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Read-only: arrow keys would move the native selection, so they do nothing.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly() && ARROW_KEYS.has(event.key)) {\n event.preventDefault();\n }\n }\n\n /** Native `value` of a radio: its option's value for a primitive, its index for an object. */\n protected readonly key = choiceKey;\n\n /**\n * Writes the value of the option at `index` to the model and emits `changed`.\n * @internal\n */\n onChange(index: number): void {\n const option = this.options()[index];\n if (!option) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n }\n\n private optionMode(option: BfRadioOption<T>): BfRadioMode {\n if (this.disabled() || option.disabled) {\n return 'disabled';\n }\n return this.readonly() ? 'readonly' : 'editable';\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/*\n * What `bf-chip` and `bf-chip-group` need from each other, through an injection token so the chip\n * never imports the group. Internal: not exported from the package.\n */\n\n/** A chip as its group sees it. */\nexport interface BfChipGroupItem {\n /** The value the chip stands for, compared with `Object.is`. */\n readonly value: Signal<unknown>;\n /** The chip's own `disabled` input. */\n readonly disabled: Signal<boolean>;\n /** Focuses the chip's button. */\n focus(options?: FocusOptions): void;\n}\n\n/** The enclosing `bf-chip-group`, as its chips inject it. */\nexport interface BfChipGroupHost {\n /** True in `single` mode: the chips are radios and the group owns the selection. */\n readonly radio: Signal<boolean>;\n /** Disables every chip of the group. */\n readonly disabled: Signal<boolean>;\n /** Single mode: whether `item` is the selected chip. */\n isSelected(item: BfChipGroupItem): boolean;\n /** Single mode: whether `item` owns the roving tab stop. */\n isTabStop(item: BfChipGroupItem): boolean;\n /** Single mode: selects `item`, as a click on it does. */\n select(item: BfChipGroupItem): void;\n}\n\nexport const BF_CHIP_GROUP = new InjectionToken<BfChipGroupHost>('BF_CHIP_GROUP');\n","import {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BF_CHIP_GROUP, type BfChipGroupItem } from '../chip-group/chip-group.token';\n\n/**\n * The colour of a `bf-chip`: tonal or ink.\n *\n * @summary The two chip colours, a soft tonal tint or a dark ink fill\n * @since 0.1.0\n */\nexport type BfChipVariant = 'tonal' | 'ink';\n\nconst BASE =\n 'relative inline-flex max-w-full min-w-0 items-center gap-1.5 rounded-control border-[1.5px] font-bold whitespace-nowrap ' +\n 'cursor-pointer transition-colors duration-150 select-none focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:border-transparent disabled:bg-surface-sunken disabled:text-text-disabled';\n\n/* Heights 32/40/48, the scale of bf-button, so a chip row lines up with the fields and buttons\n beside it. The chip always has a 1.5 px border, so its coarse-pointer hit extension (PILL_HIT)\n is the border-compensated one. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 px-3 text-label-xs',\n md: 'h-10 px-3.5 text-label-sm',\n lg: 'h-12 px-4.5 text-label',\n};\n\nconst OFF = 'bg-surface text-text border-border-strong enabled:hover:border-text-muted';\nconst ON: Record<BfChipVariant, string> = {\n tonal:\n 'bg-primary-soft text-primary-strong border-primary-soft enabled:hover:bg-primary-soft-hover enabled:hover:border-primary-soft-hover',\n ink: 'bg-text text-bg border-text enabled:hover:bg-text-secondary enabled:hover:border-text-secondary',\n};\n/* Pressed, added only while the chip can be pressed: off takes the pressed neutral surface, a\n selected tonal chip the soft pressed tint, a selected ink chip `text-secondary`. */\nconst PRESSED_OFF = 'enabled:active:bg-surface-pressed';\nconst PRESSED_ON: Record<BfChipVariant, string> = {\n tonal: 'enabled:active:bg-primary-soft-pressed enabled:active:border-primary-soft-pressed',\n ink: 'enabled:active:bg-text-secondary enabled:active:border-text-secondary',\n};\n\n/* Check mark drawn with two borders, shown only while selected. `before:block` is required: a\n pseudo-element defaults to `display: inline`, and an inline, non-replaced box ignores explicit\n width/height, which collapsed the mark to a thin vertical line instead of a check shape. */\nconst MARK =\n \"before:block before:h-[10px] before:w-[5px] before:-translate-y-px before:rotate-45 before:border-r-2 before:border-b-2 before:border-current before:content-['']\";\n\n/**\n * Toggleable filter chip. Selected chips carry a check mark and a tint (`tonal`) or the ink\n * treatment used by mobile filter rows (`ink`). For a single-choice row, put the chips in a\n * `bf-chip-group`, which makes them a radio group.\n *\n * @example\n * <bf-chip [(selected)]=\"filters.design\">Design</bf-chip>\n * <bf-chip variant=\"ink\" [selected]=\"view() === 'open'\" (changed)=\"setView('open')\">Open</bf-chip>\n * @summary Toggleable filter chip with a check mark when selected, in tonal or ink style\n * @category Forms\n * @since 0.1.0\n * @slot icon-start An icon before the label.\n * @slot default Rich label content, before the `label` text.\n */\n@Component({\n selector: 'bf-chip',\n host: { class: 'inline-flex max-w-full' },\n template: `\n <button\n #button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"radio() ? 'radio' : null\"\n [attr.aria-checked]=\"radio() ? (isSelected() ? 'true' : 'false') : null\"\n [attr.aria-pressed]=\"radio() ? null : isSelected() ? 'true' : 'false'\"\n [attr.tabindex]=\"tabIndex()\"\n [class]=\"classes()\"\n (click)=\"onClick()\"\n >\n @if (isSelected()) {\n <span aria-hidden=\"true\" [class]=\"markClasses\"></span>\n }\n <ng-content select=\"[bfSlot=icon-start]\" />\n <!-- The label truncates with an ellipsis in a narrow container; icon and mark keep their size. -->\n <span data-label class=\"max-w-full min-w-0 truncate\"><ng-content />{{ label() }}</span>\n </button>\n `,\n})\nexport class BfChipComponent implements BfChipGroupItem {\n /** Whether the chip is selected; two-way bindable. Inside a `single`-mode `bf-chip-group` the\n * group's `value` decides and this is ignored. */\n readonly selected = model(false);\n /** The value this chip stands for inside a `bf-chip-group` (compared with `Object.is`); unused\n * outside one. */\n readonly value = input<unknown>(undefined);\n /** Selected treatment: tonal tint (default) or ink. */\n readonly variant = input<BfChipVariant>('tonal');\n /** Disables the chip. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** When false, clicking an already selected chip does nothing (single-choice rows). */\n readonly deselectable = input(true, { transform: booleanAttribute });\n\n /** Emitted with the new state after a user toggle. */\n readonly changed = output<boolean>();\n /**\n * Emitted with the new state after a user toggle, together with `changed`.\n * @deprecated 0.3.0 use changed; removed in 0.4.0\n */\n readonly toggled = output<boolean>();\n\n readonly markClasses = `inline-block ${MARK}`;\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly group = inject(BF_CHIP_GROUP, { optional: true });\n private readonly button = viewChild.required<ElementRef<HTMLButtonElement>>('button');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** Inside a `single`-mode group: a radio whose selection the group owns. */\n protected readonly radio = computed(() => this.group?.radio() ?? false);\n /** Disabled by its own input or by its group. */\n protected readonly isDisabled = computed(\n () => this.disabled() || (this.group?.disabled() ?? false),\n );\n /** The selection shown: the group's in a single-mode group, else `selected`. */\n protected readonly isSelected = computed(() =>\n this.group && this.radio() ? this.group.isSelected(this) : this.selected(),\n );\n /** Roving tab stop in a single-mode group; the native order otherwise. */\n protected readonly tabIndex = computed(() => {\n if (!this.group || !this.radio()) {\n return null;\n }\n return this.group.isTabStop(this) ? 0 : -1;\n });\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const on = this.isSelected();\n const pressed = this.isDisabled() ? '' : on ? PRESSED_ON[variant] : PRESSED_OFF;\n return [BASE, SIZE[size], PILL_HIT[size].bordered, on ? ON[variant] : OFF, pressed]\n .filter(Boolean)\n .join(' ');\n });\n\n /**\n * Focuses the chip's button.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.button().nativeElement.focus(options);\n }\n\n /**\n * Whether `node` is this chip or inside it; the group finds the focused chip with it.\n * @internal\n */\n contains(node: Node | null): boolean {\n return node !== null && this.host.contains(node);\n }\n\n /**\n * Toggles `selected` and emits `changed`, unless disabled or selected and not `deselectable`;\n * in a single-mode group, selects this chip through the group instead.\n * @internal\n */\n onClick(): void {\n if (this.isDisabled()) {\n return;\n }\n if (this.group && this.radio()) {\n this.group.select(this);\n return;\n }\n if (!this.deselectable() && this.selected()) {\n return;\n }\n const next = !this.selected();\n this.selected.set(next);\n this.changed.emit(next);\n this.toggled.emit(next);\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n contentChildren,\n input,\n model,\n output,\n} from '@angular/core';\nimport { BfChipComponent } from '../chip/chip.component';\nimport { BF_CHIP_GROUP, type BfChipGroupHost, type BfChipGroupItem } from './chip-group.token';\n\n/**\n * How a `bf-chip-group` treats its chips: one selected at a time (`single`, a radio group) or\n * independent toggles (`multiple`).\n *\n * @summary Whether a chip group picks exactly one chip or lets each chip toggle alone\n * @since 0.3.0\n */\nexport type BfChipGroupMode = 'single' | 'multiple';\n\nconst NAVIGATION_KEYS = new Set(['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp', 'Home', 'End']);\n\n/**\n * A named row of `bf-chip`s. In `single` mode (the default) the chips are a radio group: the\n * group owns the selected chip's `value`, one chip is the tab stop and the arrow keys move the\n * selection. In `multiple` mode the chips stay independent toggles and the group only names them.\n * Not a Signal Forms control: for a form field use `bf-segmented` or `bf-radio-group`.\n *\n * @example\n * <bf-chip-group label=\"Status\" [(value)]=\"status\">\n * <bf-chip value=\"all\">All</bf-chip>\n * <bf-chip value=\"open\">Open</bf-chip>\n * <bf-chip value=\"done\">Done</bf-chip>\n * </bf-chip-group>\n * @summary Named row of chips that picks one like radios, or groups independent toggles\n * @category Forms\n * @since 0.3.0\n * @slot default The `bf-chip`s of the group, each with its `value`.\n */\n@Component({\n selector: 'bf-chip-group',\n providers: [{ provide: BF_CHIP_GROUP, useExisting: BfChipGroupComponent }],\n // gap-2: wrapping rows keep the 8 px the coarse-pointer hit extension of a chip needs.\n host: {\n class: 'flex flex-wrap items-center gap-2',\n '[attr.role]': \"radio() ? 'radiogroup' : 'group'\",\n '[attr.aria-label]': 'label() || null',\n '[attr.aria-labelledby]': 'label() ? null : ariaLabelledby() || null',\n '(keydown)': 'onKeydown($event)',\n },\n template: `<ng-content />`,\n})\nexport class BfChipGroupComponent<T = string> implements BfChipGroupHost {\n /** `single` (default): one chip selected, radio semantics; `multiple`: independent toggles. */\n readonly mode = input<BfChipGroupMode>('single');\n /** Accessible name of the group (required unless `ariaLabelledby` is set). */\n readonly label = input('');\n /** Id(s) of the element(s) that name the group (e.g. a visible heading) when `label` is not set. */\n readonly ariaLabelledby = input('');\n /** single: the selected chip's value (`null` = none); ignored in multiple mode. Two-way. Every\n * chip of a single-mode group needs a `value` (of type `T`); one without it cannot be selected. */\n readonly value = model<T | null>(null);\n /** Disables every chip of the group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** Emitted with the new value after a user change (single mode). */\n readonly changed = output<T | null>();\n\n /** The chips of the group, in document order. */\n private readonly chips = contentChildren(BfChipComponent, { descendants: true });\n\n /**\n * True in `single` mode.\n * @internal\n */\n readonly radio = computed(() => this.mode() === 'single');\n\n /** The enabled chips, in order. */\n private readonly enabled = computed(() =>\n this.disabled() ? [] : this.chips().filter((chip) => !chip.disabled()),\n );\n\n /** The chip matching `value`, else none. A chip without a `value` never matches, so chips\n * that all left it `undefined` cannot all read as selected. */\n private readonly selectedChip = computed(() => {\n const value = this.value();\n return value === null\n ? undefined\n : this.chips().find((chip) => chip.value() !== undefined && Object.is(chip.value(), value));\n });\n\n /** The chip that owns the roving tab stop: the selected enabled chip, else the first enabled. */\n private readonly tabStop = computed(() => {\n const selected = this.selectedChip();\n const enabled = this.enabled();\n return selected && enabled.includes(selected) ? selected : enabled[0];\n });\n\n /**\n * Whether `item` is the selected chip.\n * @internal\n */\n isSelected(item: BfChipGroupItem): boolean {\n return this.selectedChip() === item;\n }\n\n /**\n * Whether `item` owns the roving tab stop.\n * @internal\n */\n isTabStop(item: BfChipGroupItem): boolean {\n return this.tabStop() === item;\n }\n\n /**\n * Selects `item` and emits `changed`, unless it is disabled, already selected or has no\n * `value` (every chip of a single-mode group needs one).\n * @internal\n */\n select(item: BfChipGroupItem): void {\n const chip = this.enabled().find((candidate) => candidate === item);\n if (chip?.value() === undefined || chip === this.selectedChip()) {\n return;\n }\n // The chips' values are the group's values: a template binds both, so the checker cannot\n // tie the chip's `unknown` to `T`; the consumer's `[value]`s are the `T`s of `[(value)]`.\n const next = chip.value() as T;\n this.value.set(next);\n this.changed.emit(next);\n }\n\n /**\n * Single mode: the arrow keys, Home and End move focus and the selection, wrapping and skipping\n * disabled chips.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.radio() || !NAVIGATION_KEYS.has(event.key)) {\n return;\n }\n const enabled = this.enabled();\n if (enabled.length === 0) {\n return;\n }\n event.preventDefault();\n const target = event.target instanceof Node ? event.target : null;\n const from = enabled.findIndex((chip) => chip.contains(target));\n const last = enabled.length - 1;\n let index: number;\n switch (event.key) {\n case 'Home':\n index = 0;\n break;\n case 'End':\n index = last;\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n index = from === -1 || from === last ? 0 : from + 1;\n break;\n default:\n index = from <= 0 ? last : from - 1;\n }\n const next = enabled[index];\n if (next) {\n this.select(next);\n next.focus();\n }\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n type ElementRef,\n viewChildren,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex } from '../_shared/choice';\nimport { COARSE_HIT_BASE } from '../_shared/hit-classes';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * One segment of `bf-segmented`; `value` is any type (a string by default).\n *\n * @summary One segment of a segmented control with its value, its label and a disabled flag\n * @since 0.1.0\n */\nexport interface BfSegmentOption<T = string> {\n /** The value the control's `value` takes when this segment is selected. */\n value: T;\n /** The segment's visible label, also its accessible name. */\n label: string;\n /** Whether this segment cannot be selected. */\n disabled?: boolean;\n}\n\n/**\n * The height step of a `bf-segmented`; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for segmented controls, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfSegmentedSize = BfSize;\n\n/* min-w-min: an item shrinks down to its longest word, never below it, so a label wraps between\n its words (the item grows taller) and never breaks between letters or gets cut. When the\n segments cannot fit even then (the largest text sizes, a long compound word), the track grows\n past the control and the control scrolls sideways (see SCROLLER_CLASSES). */\nconst ITEM_BASE =\n 'relative inline-flex min-w-min items-center justify-center rounded-control py-1 font-bold transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface ' +\n `disabled:cursor-not-allowed disabled:text-text-disabled ${COARSE_HIT_BASE}`;\n/* Items are at least 24/32/40 px tall, so with the track's 4 px padding the control is 32/40/48,\n the height of the fields and buttons beside it. Under a coarse pointer the ::after extends each\n item's hit area vertically to 44 px (24 + 2 x 10, 32 + 2 x 6, 40 + 2 x 2) without changing the\n visual; under a fine pointer the item itself is the hit area. */\n/* Horizontal padding in px (12/14/18, the rem values at the default size): it stays put under\n iOS Dynamic Type, which scales rem, so a larger text size spends the segment's width on the\n label, not on its padding. */\nconst ITEM_SIZE: Record<BfSize, string> = {\n sm: 'min-h-6 px-[12px] text-label-xs pointer-coarse:after:-inset-y-2.5',\n md: 'min-h-8 px-[14px] text-label-sm pointer-coarse:after:-inset-y-1.5',\n lg: 'min-h-10 px-[18px] text-label pointer-coarse:after:-inset-y-0.5',\n};\n/* Disabled: the selected item keeps its surface pill (so the value stays readable) without the\n lift; the others take the sunken fill of the track. Text goes to text-disabled in both.\n Forced colours: the selected item opts out of adjustment and paints the system Highlight pair\n itself, because Chromium's Canvas text backplate would otherwise sit under HighlightText and hide\n the label; its transparent focus outline is then drawn in CanvasText. The others keep the\n automatic repaint in ButtonText on a transparent fill.\n The selected item also carries a 1.5 px inset primary-strong outline (>= 3:1 on surface and the\n sunken track), so the state never rests on the pill fill alone (1.18:1 on the track); inset, so\n the box and the hit maths stay. The focus ring sits on a 2 px surface offset, where it reaches\n 3:1, instead of on the track. Opted out of forced-colour adjustment, the selected item would keep\n those authored box-shadow colours, so under forced colours its outline and focus ring are drawn\n in CanvasText on a Canvas offset and the segment shadow is dropped: system colours only.\n Disabled selected: `disabled:inset-ring-text-disabled` and `forced-colors:inset-ring-[CanvasText]`\n both compile to a (0,1,0)+(:disabled) vs (0,2,0) pair, and the plain disabled rule wins, so a\n disabled selected item would otherwise keep the authored `text-disabled` outline under forced\n colours. `forced-colors:disabled:inset-ring-[GrayText]` matches that specificity and repaints it\n in the system's disabled-foreground colour instead. */\nconst ACTIVE =\n 'bg-surface text-text shadow-segment inset-ring-[1.5px] inset-ring-primary-strong disabled:shadow-none disabled:inset-ring-text-disabled forced-colors:forced-color-adjust-none forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:focus-visible:outline-[CanvasText] forced-colors:inset-ring-[CanvasText] forced-colors:disabled:inset-ring-[GrayText] forced-colors:shadow-none forced-colors:focus-visible:ring-[CanvasText] forced-colors:focus-visible:ring-offset-[Canvas]';\nconst INACTIVE =\n 'bg-transparent text-text-muted disabled:bg-surface-sunken forced-colors:bg-transparent forced-colors:text-[ButtonText]';\n/* Pointer affordance: an editable segment shows a pointer and a hover tint (the active one\n `surface-muted`, like the tab-bar active tab, except under forced colours, where its fill stays\n Highlight); a read-only one shows neither. Pressed, an editable segment takes the pressed\n neutral surface (the selected one only outside forced colours, where its fill stays Highlight)\n and an unselected one the `text` label, which holds 4.5:1 there. */\ntype BfSegmentedMode = 'editable' | 'readonly';\nconst ITEM_MODE: Record<BfSegmentedMode, Record<'active' | 'inactive', string>> = {\n editable: {\n active:\n 'cursor-pointer not-forced-colors:enabled:hover:bg-surface-muted not-forced-colors:enabled:active:bg-surface-pressed',\n inactive:\n 'cursor-pointer enabled:hover:text-text enabled:active:bg-surface-pressed enabled:active:text-text',\n },\n readonly: { active: 'cursor-default', inactive: 'cursor-default' },\n};\n/* The track never gets narrower than its segments' longest words (min-w-min), so it can overflow\n the scroller around it. Its horizontal padding and gap are px, like the segments'. */\nconst TRACK_BASE = 'min-w-min gap-[2px] rounded-control px-[4px] py-1';\n/* Track layout: shrink to the segments, or stretch and share the width. */\nconst TRACK_LAYOUT: Record<'fit' | 'full', string> = {\n fit: 'inline-flex',\n full: 'flex w-full',\n};\n/* The scroller around the track: it scrolls sideways only while the segments cannot fit (at the\n largest text sizes). Its 4 px padding, cancelled by a negative margin, keeps the focus ring\n (2 px offset + 4 px, 2 px past the track) inside the clip. */\nconst SCROLLER_CLASSES: Record<'fit' | 'full', string> = {\n fit: '-m-[4px] max-w-[calc(100%+8px)] overflow-x-auto p-[4px]',\n full: '-m-[4px] w-[calc(100%+8px)] overflow-x-auto p-[4px]',\n};\n/* Track fill: `surface-sunken`, or the muted read-only surface of the text fields. */\nconst TRACK_FILL: Record<BfSegmentedMode, string> = {\n editable: 'bg-surface-sunken',\n readonly: 'bg-surface-muted',\n};\n/* The error state outlines the track in `danger-border`, like the other fields' borders. */\nconst TRACK_OUTLINE: Record<'error' | 'none', string> = {\n error: 'ring-[1.5px] ring-danger-border',\n none: '',\n};\nconst NAVIGATION_KEYS = ['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp', 'Home', 'End'];\n\n/**\n * Segmented control for switching between two to four views. Behaves like a radio group for\n * keyboard and assistive tech; implements the Signal Forms value contract. Generic over the option\n * value (a string by default), `null` while nothing is selected.\n *\n * @example\n * <bf-segmented label=\"Range\" [options]=\"ranges\" [(value)]=\"range\" />\n * @summary Segmented control for switching between two to four views, keyboard-navigable like radios\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-segmented',\n // A column so the error text sits under the track; items-start keeps the track at its own width.\n host: {\n class: 'inline-flex max-w-full flex-col items-start gap-1.5',\n '[class.w-full]': 'fullWidth()',\n '[attr.id]': 'null',\n },\n template: `\n <div data-bf-segmented-scroller [class]=\"scrollerClasses()\">\n <div\n role=\"radiogroup\"\n tabindex=\"-1\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n [class]=\"trackClasses()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (option of options(); track $index) {\n <button\n #radio\n type=\"button\"\n role=\"radio\"\n [attr.aria-checked]=\"$index === selectedIndex() ? 'true' : 'false'\"\n [tabIndex]=\"$index === tabStop() ? 0 : -1\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n [class]=\"itemClasses($index)\"\n (click)=\"selectAt($index)\"\n (blur)=\"touch.emit()\"\n >\n <span data-label class=\"text-center\">{{ option.label }}</span>\n </button>\n }\n </div>\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n `,\n})\nexport class BfSegmentedComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The segments. */\n readonly options = input.required<readonly BfSegmentOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Height step of the control (track): sm 32, md 40, lg 48 px; unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretch the control and share the width between segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Disables every segment. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Shows the choice but blocks changes; the tab stop stays focusable and the group exposes\n * `aria-readonly`.\n */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the choice required (`aria-required` on the group). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Accessible name of the group (not rendered visibly). */\n readonly label = input('');\n /** Accessible name when `label` is not set. */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the group (e.g. a visible heading) when `label` is not set.\n */\n readonly ariaLabelledby = input('');\n /**\n * Name of the bound field. Not rendered, because the control has no native form element; kept so\n * Signal Forms can bind it.\n */\n readonly name = input('');\n /** Group id; generated when not set. */\n readonly id = input(uniqueId('bf-segmented'));\n\n /** Emitted with the newly selected value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n /** The rendered radio buttons, in option order; used to move focus after keyboard selection. */\n readonly radios = viewChildren<ElementRef<HTMLButtonElement>>('radio');\n\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n\n /** Index of the option that owns the roving tab stop: the selected enabled option, or the first\n * enabled option when nothing valid is selected; `-1` when every option is disabled. */\n readonly tabStop = computed(() => {\n const options = this.options();\n const selected = this.selectedIndex();\n if (selected >= 0 && !options[selected]?.disabled) {\n return selected;\n }\n return options.findIndex((o) => !o.disabled);\n });\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /** `aria-label`: the `label`, else `ariaLabel`. */\n readonly ariaLabelAttr = computed(() => this.label() || this.ariaLabel() || null);\n /** `aria-labelledby`: only while no `label` names the group. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n private readonly mode = computed<BfSegmentedMode>(() =>\n this.readonly() ? 'readonly' : 'editable',\n );\n /** The classes of the scroller around the track. */\n protected readonly scrollerClasses = computed(\n () => SCROLLER_CLASSES[this.fullWidth() ? 'full' : 'fit'],\n );\n\n readonly trackClasses = computed(() =>\n [\n TRACK_BASE,\n TRACK_LAYOUT[this.fullWidth() ? 'full' : 'fit'],\n TRACK_FILL[this.mode()],\n TRACK_OUTLINE[this.showError() ? 'error' : 'none'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /**\n * The classes of the segment at `index`.\n * @internal\n */\n itemClasses(index: number): string {\n const active = index === this.selectedIndex();\n return [\n ITEM_BASE,\n ITEM_SIZE[this.resolvedSize()],\n active ? ACTIVE : INACTIVE,\n ITEM_MODE[this.mode()][active ? 'active' : 'inactive'],\n this.fullWidth() ? 'flex-1' : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * Focuses the segment that owns the tab stop; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.focusRadio(this.tabStop(), options);\n }\n\n /**\n * Selects the option whose value matches `next` under `compareWith`, as a click would.\n * @param next The value of the option to select.\n */\n select(next: T): void {\n this.selectAt(choiceIndex(this.options(), next, this.compareWith()));\n }\n\n /**\n * Selects the option at `index` unless the control is disabled or read-only, the option is\n * missing, or it is already selected.\n * @param index The position of the option in `options`.\n */\n selectAt(index: number): void {\n const option = this.options()[index];\n if (this.disabled() || this.readonly() || !option || index === this.selectedIndex()) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n }\n\n /**\n * Arrow keys, Home and End move the selection, as in a radio group.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!NAVIGATION_KEYS.includes(event.key)) {\n return;\n }\n event.preventDefault();\n // Read-only: the value and the focused segment stay; Tab still leaves the group.\n if (this.readonly()) {\n return;\n }\n // Indexes of the enabled options, in order.\n const enabled = this.options().flatMap((o, i) => (o.disabled ? [] : [i]));\n if (enabled.length === 0) {\n return;\n }\n const index = enabled.indexOf(this.selectedIndex());\n let next: number | undefined;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n break;\n case 'Home':\n next = enabled[0];\n break;\n case 'End':\n next = enabled[enabled.length - 1];\n break;\n }\n if (next === undefined) {\n return;\n }\n this.selectAt(next);\n if (this.selectedIndex() === next) {\n this.focusRadio(next);\n }\n }\n\n private focusRadio(index: number, options?: FocusOptions): void {\n this.radios()[index]?.nativeElement.focus(options);\n }\n}\n","import { Component, booleanAttribute, computed, inject, input, model, output } from '@angular/core';\nimport { type FormValueControl } from '@angular/forms/signals';\nimport { type BfColorScheme } from '../../config/color-scheme';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BfSegmentedComponent, type BfSegmentOption } from '../segmented/segmented.component';\n\n/**\n * The colour scheme switch: System, Light and Dark as a three-option segmented control. It holds\n * a `BfColorScheme` and injects no service, so the app binds its own state, usually\n * `BfColorSchemeService.scheme` (`provideBfColorScheme()` on desktop, `provideBfShell()` in a\n * Capacitor app, where `BfPlatformService.theme` is the same signal).\n *\n * @example\n * <bf-theme-switch [(value)]=\"colorScheme.scheme\" />\n * @summary Segmented System, Light and Dark switch bound two-way to the app colour scheme\n * @category Forms\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-theme-switch',\n imports: [BfSegmentedComponent],\n host: { class: 'inline-flex max-w-full', '[class.w-full]': 'fullWidth()' },\n template: `\n <bf-segmented\n [label]=\"resolvedLabel()\"\n [options]=\"options\"\n [value]=\"value()\"\n [size]=\"size()\"\n [fullWidth]=\"fullWidth()\"\n (changed)=\"select($event)\"\n />\n `,\n})\nexport class BfThemeSwitchComponent implements FormValueControl<BfColorScheme> {\n private readonly labels = inject(BF_LABELS);\n\n /** The colour scheme choice; bind it two-way, usually to `BfColorSchemeService.scheme`, or\n * with `[formField]`. */\n readonly value = model<BfColorScheme>('system');\n /** Accessible name of the switch (not shown); empty falls back to the `theme` label. */\n readonly label = input('');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,\n * `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretch the switch and share the width between the three segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n /** Emitted with the new choice right after the user picks another segment. */\n readonly changed = output<BfColorScheme>();\n\n /** The three segments, labelled by `themeSystem`, `themeLight` and `themeDark`. */\n protected readonly options: readonly BfSegmentOption<BfColorScheme>[] = [\n { value: 'system', label: this.labels.themeSystem },\n { value: 'light', label: this.labels.themeLight },\n { value: 'dark', label: this.labels.themeDark },\n ];\n /** The group's accessible name: `label`, else the `theme` label. */\n protected readonly resolvedLabel = computed(() => this.label() || this.labels.theme);\n\n /**\n * Takes the segment the user picked.\n * @internal\n */\n select(next: BfColorScheme): void {\n this.value.set(next);\n this.changed.emit(next);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Provided by `bf-list` so a `bf-list-item` knows it sits inside a `role=\"list\"` container and may\n * claim `role=\"listitem\"`, without `list-item.component.ts` importing `list.component.ts`.\n */\nexport const BF_LIST = new InjectionToken<true>('BF_LIST');\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\nimport { BF_LIST } from './list.token';\n\ntype BfListLook = 'inset' | 'plain';\ntype BfListRows = 'spaced' | 'divided';\n/* `divided` (opt-in): no gap, a `border` line between rows, and the rows' own surfaces squared\n off, so the hover fill reaches the list's edges. A plain divided list gives its rows the card's\n inline padding, so a list pulled flush to a card's edges (`-mx-card`) keeps its text on the\n card's content edge. An inset divided list is one rounded surface: only its first and last rows\n keep the card radius. The row selectors reach the row's own box (`bf-list-item > *`). */\nconst CLASSES: Record<BfListLook, Record<BfListRows, string>> = {\n inset: {\n spaced: 'flex flex-col gap-1 rounded-card bg-bg p-1.5',\n divided:\n 'flex flex-col gap-0 rounded-card bg-surface p-0 divide-y divide-border [&>bf-list-item>*]:rounded-none [&>bf-list-item:first-child>*]:rounded-t-card [&>bf-list-item:last-child>*]:rounded-b-card',\n },\n plain: {\n spaced: 'flex flex-col gap-2 bg-transparent p-0',\n divided:\n 'flex flex-col gap-0 bg-transparent p-0 divide-y divide-border [&>bf-list-item>*]:rounded-none [&>bf-list-item>*]:px-card',\n },\n};\n\n/**\n * Container for `bf-list-item` rows. The inset style (default) wraps the rows in the warm\n * background with rounded corners, as in the design's grouped lists.\n *\n * @example\n * <bf-list>\n * <bf-list-item title=\"Notifications\" subtitle=\"Every Monday at 8:00\" />\n * </bf-list>\n * <bf-card>\n * <bf-list [inset]=\"false\" divided class=\"-mx-card\">\n * <bf-list-item title=\"Atlas rebrand\" subtitle=\"Due Friday\" />\n * </bf-list>\n * </bf-card>\n * @summary Container for list rows, inset by default with rounded corners on a warm background\n * @category Data display\n * @since 0.1.0\n * @slot default The rows, each a `bf-list-item`.\n */\n@Component({\n selector: 'bf-list',\n host: { class: 'block' },\n // Tells the projected rows they are inside a list, so each claims role=\"listitem\".\n providers: [{ provide: BF_LIST, useValue: true }],\n template: `<div role=\"list\" [class]=\"classes()\"><ng-content /></div>`,\n})\nexport class BfListComponent {\n /** Grouped look with the warm container; false renders rows on the page background. */\n readonly inset = input(true, { transform: booleanAttribute });\n /** Separates the rows with a `border` line instead of a gap, with square rows whose hover\n * reaches the list's edges. Off by default. */\n readonly divided = input(false, { transform: booleanAttribute });\n\n readonly classes = computed(\n () => CLASSES[this.inset() ? 'inset' : 'plain'][this.divided() ? 'divided' : 'spaced'],\n );\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Provided by the surfaces a `bfAction` stretches over (`bf-card`, `bf-list-item`), so the nearest\n * one, and only it, shows the clickable cues: a card holding navigation rows is not lit by the\n * rows' links. Kept in its own file so the directive and the surfaces never import each other.\n */\nexport interface BfActionHost {\n /** Called by a `bfAction` inside the surface; returns its unregister function. */\n registerAction(): () => void;\n /** Whether the surface's action has keyboard focus (`:focus-visible`), for the focus ring. */\n setActionFocusVisible(visible: boolean): void;\n}\n\nexport const BF_ACTION_HOST = new InjectionToken<BfActionHost>('BF_ACTION_HOST');\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { BF_ACTION_HOST, type BfActionHost } from '../action/action-host.token';\nimport { BF_LIST } from './list.token';\n\n/* Always `relative`: a bfAction link or button in the title slot stretches its ::after over the\n row. */\nconst ROW =\n 'relative flex w-full items-center gap-3 rounded-field bg-surface p-3.5 text-start text-text transition-colors';\nconst INTERACTIVE =\n 'cursor-pointer enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed enabled:active:after:border-text-muted focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed disabled:text-text-disabled';\n/* A row holding its own [bfAction] (a navigation row; it registers through BF_ACTION_HOST): the\n pointer, the hover fill and the pressed fill while its action is pressed, plus the focus ring\n while the action has keyboard focus. While pressed the chevron turns `text-muted`, because\n `text-subtle` misses 3:1 on `surface-pressed`. */\ntype BfRowAction = 'none' | 'action' | 'focused';\nconst ACTION: Record<BfRowAction, string> = {\n none: '',\n action:\n 'cursor-pointer hover:bg-surface-muted has-[[data-bf-action]:active]:bg-surface-pressed has-[[data-bf-action]:active]:after:border-text-muted',\n focused:\n 'cursor-pointer hover:bg-surface-muted has-[[data-bf-action]:active]:bg-surface-pressed has-[[data-bf-action]:active]:after:border-text-muted ring-4 ring-ring',\n};\n/* The chevron sits at the inline end and points there: right in LTR, mirrored to the left under\n dir=\"rtl\" (and nudged the other way). */\n/* The title, the title slot and the subtitle wrap (anywhere, for a long word or URL) so no text is\n lost at large text sizes; `truncate` keeps each on one line with an ellipsis. */\ntype BfRowText = 'wrap' | 'truncate';\nconst TEXT: Record<BfRowText, string> = {\n wrap: 'wrap-anywhere',\n truncate: 'truncate',\n};\nconst CHEVRON =\n \"after:ms-auto after:h-2.5 after:w-2.5 after:shrink-0 after:-translate-x-1 after:rotate-45 rtl:after:translate-x-1 rtl:after:-rotate-135 after:border-t-[1.5px] after:border-r-[1.5px] after:border-text-subtle after:content-['']\";\n\n/**\n * One row of a list: leading slot (avatar, icon tile), title and subtitle, trailing slot\n * (time, toggle, badge) and an optional chevron for rows that navigate. A navigation row puts a\n * `bfAction` link in the `title` slot, so the row stays a list item and the link covers it.\n *\n * @example\n * <bf-list-item subtitle=\"lena@studio.ch\" chevron>\n * <bf-avatar bfSlot=\"leading\" initials=\"LM\" />\n * <a bfSlot=\"title\" bfAction routerLink=\"/account\">Account</a>\n * </bf-list-item>\n * @summary List row with leading slot, title, subtitle, trailing slot and an optional chevron\n * @category Data display\n * @since 0.1.0\n * @slot leading Content before the text, such as an avatar or an icon.\n * @slot title Rich title content, instead of or next to the `title` text.\n * @slot default More content under the title and subtitle.\n * @slot trailing Content at the end, such as a toggle, a badge or a button.\n */\n@Component({\n selector: 'bf-list-item',\n // role=\"listitem\" only inside bf-list: a standalone row claiming it would have no list parent.\n host: { class: 'block', '[attr.role]': 'role' },\n providers: [{ provide: BF_ACTION_HOST, useExisting: BfListItemComponent }],\n imports: [NgTemplateOutlet],\n template: `\n @if (interactive()) {\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"classes()\"\n (click)=\"clicked.emit($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n } @else {\n <div [class]=\"classes()\"><ng-container *ngTemplateOutlet=\"content\" /></div>\n }\n <ng-template #content>\n <ng-content select=\"[bfSlot=leading]\" />\n <span class=\"flex min-w-0 flex-1 flex-col\">\n @if (title()) {\n <span class=\"text-label font-bold {{ textClasses() }}\">{{ title() }}</span>\n }\n <span class=\"text-label font-bold empty:hidden {{ textClasses() }}\"\n ><ng-content select=\"[bfSlot=title]\"\n /></span>\n @if (subtitle()) {\n <span class=\"text-caption text-text-muted {{ textClasses() }}\">{{ subtitle() }}</span>\n }\n <ng-content />\n </span>\n <!-- Above a stretched bfAction link, so a toggle or button here stays clickable. -->\n <span class=\"relative z-1 flex shrink-0 items-center gap-3 empty:hidden\"\n ><ng-content select=\"[bfSlot=trailing]\"\n /></span>\n </ng-template>\n `,\n})\nexport class BfListItemComponent implements BfActionHost {\n /** Primary text. For a navigation row, project an `<a bfSlot=\"title\" bfAction>` instead. */\n readonly title = input('');\n /** Secondary text under the title. */\n readonly subtitle = input('');\n /** Render the row as a button that emits `clicked` (an action row; a row that navigates puts a\n * `bfAction` link in the `title` slot instead). */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Show a trailing chevron (navigation rows). */\n readonly chevron = input(false, { transform: booleanAttribute });\n /** Disable an interactive row. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Keep the title, the title slot and the subtitle on one line each, cut with an ellipsis. By\n * default they wrap, so nothing is lost at large text sizes.\n */\n readonly truncate = input(false, { transform: booleanAttribute });\n\n /** Emitted when an interactive row is activated. */\n readonly clicked = output<Event>();\n\n /** `listitem` inside a `bf-list`, else no role. */\n protected readonly role = inject(BF_LIST, { optional: true }) ? 'listitem' : null;\n\n private readonly actions = signal(0);\n private readonly actionFocusVisible = signal(false);\n private readonly actionState = computed<BfRowAction>(() => {\n if (this.actions() === 0) {\n return 'none';\n }\n return this.actionFocusVisible() ? 'focused' : 'action';\n });\n\n /** Wrap or truncate classes of the title, the title slot and the subtitle. */\n protected readonly textClasses = computed(() => TEXT[this.truncate() ? 'truncate' : 'wrap']);\n\n readonly classes = computed(() =>\n [\n ROW,\n this.interactive() ? INTERACTIVE : ACTION[this.actionState()],\n this.chevron() ? CHEVRON : '',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /** @internal Called by a `bfAction` in the row. */\n registerAction(): () => void {\n this.actions.update((n) => n + 1);\n return () => this.actions.update((n) => n - 1);\n }\n\n /** @internal Called by the row's `bfAction` on focus and blur. */\n setActionFocusVisible(visible: boolean): void {\n this.actionFocusVisible.set(visible);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, booleanAttribute, computed, input, output, signal } from '@angular/core';\nimport { BF_ACTION_HOST, type BfActionHost } from '../action/action-host.token';\n\n/**\n * The surface of a `bf-card`: raised, tint, ink or flat.\n *\n * @summary The four card surfaces, from a raised panel to a flat outline\n * @since 0.1.0\n */\nexport type BfCardVariant = 'raised' | 'tint' | 'ink' | 'flat';\n/**\n * The inner padding of a `bf-card`: md or lg.\n *\n * @summary The two inner paddings of a card, regular and roomy\n * @since 0.1.0\n */\nexport type BfCardPadding = 'md' | 'lg';\n\n/* Always `relative`: a bfAction link or button inside stretches its ::after over this box. The\n footer takes the free space above it (`mt-auto`), so in a grid of equal-height cards every\n footer sits on the bottom edge. */\nconst BASE =\n 'relative flex h-full w-full flex-col gap-3 rounded-card text-start [&>[bfSlot=footer]]:mt-auto';\nconst VARIANT: Record<BfCardVariant, string> = {\n raised: 'bg-surface text-text shadow-raised',\n tint: 'bg-primary-soft text-text',\n ink: 'bg-text text-bg',\n flat: 'bg-surface text-text border-[1.5px] border-border-strong',\n};\nconst PADDING: Record<BfCardPadding, string> = { md: 'p-card', lg: 'p-card-lg' };\n/* Deprecated `interactive`: the whole card is a <button>. */\nconst INTERACTIVE =\n 'cursor-pointer transition-shadow hover:shadow-floating active:shadow-raised focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring';\n/* A card holding its own [bfAction] (it registers through BF_ACTION_HOST): the pointer and the\n hover elevation, dropping back to `raised` while the action is pressed, plus the focus ring\n while the action has keyboard focus. */\ntype BfCardAction = 'none' | 'action' | 'focused';\nconst ACTION: Record<BfCardAction, string> = {\n none: '',\n action:\n 'cursor-pointer transition-shadow hover:shadow-floating has-[[data-bf-action]:active]:shadow-raised',\n focused:\n 'cursor-pointer transition-shadow hover:shadow-floating has-[[data-bf-action]:active]:shadow-raised ring-4 ring-ring',\n};\n\n/**\n * Surface for a piece of content: a project summary, a stat, a focus prompt. Four variants from\n * the design: raised (default), tint, ink and flat. To make the whole card clickable, put a\n * `bfAction` link or button in its heading (the stretched-link pattern).\n *\n * @example\n * <bf-card>\n * <span bfSlot=\"header\" class=\"text-caption text-text-muted\">Project</span>\n * <h3 class=\"text-heading\"><a bfAction routerLink=\"/projects/atlas\">Atlas rebrand</a></h3>\n * <bf-progress [value]=\"68\" label=\"Progress\" />\n * </bf-card>\n * @summary Content surface with an optional header slot, in four visual styles from raised to flat\n * @category Data display\n * @since 0.1.0\n * @slot header Content above the body, such as a title row.\n * @slot default The card body.\n * @slot footer Content below the body, such as its actions; it sits on the card's bottom edge.\n */\n@Component({\n selector: 'bf-card',\n imports: [NgTemplateOutlet],\n host: { class: 'block' },\n providers: [{ provide: BF_ACTION_HOST, useExisting: BfCardComponent }],\n template: `\n @if (interactive()) {\n <button type=\"button\" [class]=\"classes()\" (click)=\"clicked.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n } @else {\n <div [class]=\"classes()\"><ng-container *ngTemplateOutlet=\"content\" /></div>\n }\n <ng-template #content>\n <ng-content select=\"[bfSlot=header]\" />\n <ng-content />\n <ng-content select=\"[bfSlot=footer]\" />\n </ng-template>\n `,\n})\nexport class BfCardComponent implements BfActionHost {\n /** Surface treatment: raised (default), tint, ink, flat. */\n readonly variant = input<BfCardVariant>('raised');\n /** Whole card is a button that emits `clicked`.\n * @deprecated 0.3.0 use a bfAction link or button in the card's heading; removed in 1.0.0 */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Inner padding: md 18 px (`--spacing-card`), lg 24 px (`--spacing-card-lg`). */\n readonly padding = input<BfCardPadding>('md');\n\n /** Emitted when an interactive card is activated.\n * @deprecated 0.3.0 use a bfAction link or button in the card's heading; removed in 1.0.0 */\n readonly clicked = output<Event>();\n\n private readonly actions = signal(0);\n private readonly actionFocusVisible = signal(false);\n\n readonly classes = computed(() =>\n [\n BASE,\n VARIANT[this.variant()],\n PADDING[this.padding()],\n this.interactive() ? INTERACTIVE : ACTION[this.actionState()],\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n private readonly actionState = computed<BfCardAction>(() => {\n if (this.actions() === 0) {\n return 'none';\n }\n return this.actionFocusVisible() ? 'focused' : 'action';\n });\n\n /** @internal Called by a `bfAction` in the card. */\n registerAction(): () => void {\n this.actions.update((n) => n + 1);\n return () => this.actions.update((n) => n - 1);\n }\n\n /** @internal Called by the card's `bfAction` on focus and blur. */\n setActionFocusVisible(visible: boolean): void {\n this.actionFocusVisible.set(visible);\n }\n}\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\n\n/**\n * The track height of a `bf-progress`: sm or md.\n *\n * @summary The two track heights of a progress bar, thin and regular\n * @since 0.1.0\n */\nexport type BfProgressSize = 'sm' | 'md';\n/**\n * The fill colour of a `bf-progress`: primary, success, warning or danger.\n *\n * @summary The four fill colours of a progress bar, from primary to danger\n * @since 0.1.0\n */\nexport type BfProgressTone = 'primary' | 'success' | 'warning' | 'danger';\n\nconst TRACK =\n '[grid-area:1/1] block w-full appearance-none overflow-hidden rounded-full bg-surface-sunken [&::-webkit-progress-bar]:bg-surface-sunken [&::-webkit-progress-bar]:rounded-full [&::-webkit-progress-value]:rounded-full [&::-webkit-progress-value]:transition-[width] motion-reduce:[&::-webkit-progress-value]:transition-none [&::-moz-progress-bar]:rounded-full indeterminate:[&::-moz-progress-bar]:bg-transparent';\nconst SIZE: Record<BfProgressSize, string> = { sm: 'h-2', md: 'h-2.5' };\nconst TONE: Record<BfProgressTone, string> = {\n /* primary-strong: the fill reaches 3:1 on the sunken track for any configured primary. */\n primary: '[&::-webkit-progress-value]:bg-primary-strong [&::-moz-progress-bar]:bg-primary-strong',\n success: '[&::-webkit-progress-value]:bg-success [&::-moz-progress-bar]:bg-success',\n warning: '[&::-webkit-progress-value]:bg-warning [&::-moz-progress-bar]:bg-warning',\n danger: '[&::-webkit-progress-value]:bg-danger [&::-moz-progress-bar]:bg-danger',\n};\n\n/* The indeterminate stripe: 40 % of the track, running across it; under reduced motion it stands\n still at the start, a static 40 % bar. It starts at the inline start and runs to the inline\n end, mirrored under dir=\"rtl\" by its own keyframes. Its fill follows the tone. It shares the track's grid\n cell rather than being positioned, so the host stays unpositioned: a positioned bar would sit\n above a card's stretched bfAction link and take its clicks. */\nconst STRIPE =\n 'pointer-events-none [grid-area:1/1] w-2/5 rounded-full animate-progress-indeterminate rtl:animate-progress-indeterminate-rtl motion-reduce:animate-none rtl:motion-reduce:animate-none forced-colors:bg-[CanvasText]';\nconst STRIPE_TONE: Record<BfProgressTone, string> = {\n primary: 'bg-primary-strong',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n};\n\n/**\n * Progress bar for completion and quotas, determinate by default, or `indeterminate` while the\n * amount of work is unknown.\n *\n * @example\n * <bf-progress [value]=\"68\" label=\"Atlas rebrand\" valueText=\"12 of 18 tasks\" />\n * <bf-progress indeterminate label=\"Uploading\" />\n * @summary Progress bar in two sizes and four tones for completion, quotas and unknown waits\n * @category Data display\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-progress',\n host: { class: 'grid overflow-hidden rounded-full' },\n template: `\n <progress\n max=\"100\"\n [attr.value]=\"indeterminate() ? null : percent()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-valuetext]=\"valueText() || null\"\n [class]=\"classes()\"\n ></progress>\n @if (indeterminate()) {\n <span data-stripe aria-hidden=\"true\" [class]=\"stripeClasses()\"></span>\n }\n `,\n})\nexport class BfProgressComponent {\n /** Completion in percent; clamped to 0–100. Without it (and without `indeterminate`) the bar\n * shows 0 %. Ignored while `indeterminate`. */\n readonly value = input<number | undefined>(undefined);\n /** The amount of work is unknown: the native bar carries no value (assistive tech announces it\n * as busy) and a stripe runs across the track, a static 40 % bar under reduced motion. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** The value in words for assistive tech (`aria-valuetext`), such as \"12 of 18 tasks\"; the\n * percentage is announced while it is empty. */\n readonly valueText = input('');\n /** Accessible name of the bar (\"Atlas rebrand\"). */\n readonly label = input.required<string>();\n /** Bar height: sm 8 px (default), md 10 px. */\n readonly size = input<BfProgressSize>('sm');\n /** Fill color by meaning. */\n readonly tone = input<BfProgressTone>('primary');\n\n readonly percent = computed(() => {\n const raw = this.value();\n if (raw === undefined || !Number.isFinite(raw)) {\n return 0;\n }\n return Math.min(100, Math.max(0, Math.round(raw)));\n });\n readonly classes = computed(() => `${TRACK} ${SIZE[this.size()]} ${TONE[this.tone()]}`);\n readonly stripeClasses = computed(() => `${STRIPE} ${STRIPE_TONE[this.tone()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/**\n * The size of a `bf-avatar`: sm, md or lg.\n *\n * @summary The three sizes of an avatar, from a list row to a profile header\n * @since 0.1.0\n */\nexport type BfAvatarSize = 'sm' | 'md' | 'lg';\n/**\n * The colour scheme of a `bf-avatar`: tint, ink, warning or neutral.\n *\n * @summary The four colour schemes of an avatar behind its initials or icon\n * @since 0.1.0\n */\nexport type BfAvatarVariant = 'tint' | 'ink' | 'warning' | 'neutral';\n\n/* min-w/min-h in ex (the initials' x-height, about 5.9 px at 11 px): Android's font scale is a text\n zoom that grows the rendered font but not em, rem or px lengths, and ex follows the rendered\n font, so the circle grows with its initials instead of cutting them off (53 px for the sm\n avatar's 22 px initials at scale 2.0). 4.5ex keeps headroom under every size step: with Manrope\n it is 26.7 px against sm's 30 px, 31.5 against md's 40 and 63 against lg's 84, so the default\n sizes (and iOS Dynamic Type, which scales both sides) are unchanged even with a theme font whose\n x-height is up to 10 % taller. */\nconst BASE =\n 'inline-flex min-h-[4.5ex] min-w-[4.5ex] shrink-0 items-center justify-center overflow-hidden rounded-full font-extrabold uppercase select-none';\nconst SIZE: Record<BfAvatarSize, string> = {\n sm: 'size-7.5 text-nano',\n md: 'h-10 w-10 text-label-xs',\n lg: 'size-21 text-avatar-lg',\n};\nconst VARIANT: Record<BfAvatarVariant, string> = {\n tint: 'bg-primary-soft text-primary-strong',\n ink: 'bg-text text-bg',\n warning: 'bg-warning-soft text-warning',\n neutral: 'bg-neutral-soft text-neutral',\n};\n\n/**\n * Round avatar showing a photo or initials.\n *\n * @example\n * <bf-avatar initials=\"LM\" />\n * <bf-avatar src=\"/lena.jpg\" alt=\"Lena Moser\" size=\"lg\" />\n * @summary Round avatar showing a photo or initials, in three sizes and four color variants\n * @category Data display\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-avatar',\n host: {\n class: 'inline-flex',\n '[attr.role]': \"alt() ? 'img' : null\",\n '[attr.aria-label]': 'alt() || null',\n '[attr.aria-hidden]': \"alt() ? null : 'true'\",\n },\n template: `\n @if (src()) {\n <img [src]=\"src()\" alt=\"\" [class]=\"classes() + ' object-cover'\" />\n } @else {\n <span aria-hidden=\"true\" [class]=\"classes()\">{{ initials() }}</span>\n }\n `,\n})\nexport class BfAvatarComponent {\n /** One or two letters shown when there is no image. */\n readonly initials = input('');\n /** Image URL; when set, the image replaces the initials. */\n readonly src = input('');\n /** Accessible name; when unset the avatar is decorative and hidden from assistive tech. */\n readonly alt = input('');\n /** Diameter: sm 30 px, md 40 px (default), lg 84 px; at least 4.5ex of the initials, so a text\n * zoom (Android font scale) grows the circle with its initials. */\n readonly size = input<BfAvatarSize>('md');\n /** Background treatment for the initials. */\n readonly variant = input<BfAvatarVariant>('tint');\n\n readonly classes = computed(() => `${BASE} ${SIZE[this.size()]} ${VARIANT[this.variant()]}`);\n}\n","import {\n Component,\n DestroyRef,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The tone of a `bf-alert`: neutral, success, warning or danger.\n *\n * @summary The four tones of an alert, from neutral information to a danger message\n * @since 0.1.0\n */\nexport type BfAlertVariant = 'neutral' | 'success' | 'warning' | 'danger';\n\nconst BASE = 'flex items-start gap-3 rounded-field border-[1.5px] p-4 text-label';\nconst VARIANT: Record<BfAlertVariant, string> = {\n neutral: 'bg-surface-sunken border-transparent text-text',\n success: 'bg-success-soft border-transparent text-success',\n warning: 'bg-warning-soft border-transparent text-warning',\n danger: 'bg-danger-soft border-danger-border text-danger',\n};\n/* While dismissible, the text column reserves the dismiss button's width, so a long word never\n runs under the ×. */\nconst CONTENT_BASE = 'flex min-w-0 flex-1 flex-col gap-1';\nconst CONTENT_DISMISS: Record<'dismissible' | 'static', string> = {\n dismissible: 'pe-10',\n static: '',\n};\n\n/**\n * Inline message for the outcome of an action or the state of a screen, in a polite `status`\n * region (`urgent` makes it an assertive `alert`; `announce` makes an inserted alert heard).\n *\n * @example\n * <bf-alert variant=\"success\" title=\"Saved\" announce>Your changes are live.</bf-alert>\n * <bf-alert variant=\"danger\" title=\"Sync failed\" urgent [dismissible]=\"true\" (dismissed)=\"clear()\">Check your connection.</bf-alert>\n * @summary Inline status message in four tones with a title and an optional dismiss button\n * @category Feedback\n * @since 0.1.0\n * @slot icon An icon before the text, such as a `bf-icon`.\n * @slot default The message, under the title.\n * @slot actions Buttons under the message, such as Retry.\n */\n@Component({\n selector: 'bf-alert',\n host: { class: 'block' },\n template: `\n <div class=\"relative\">\n <div [attr.role]=\"urgent() ? 'alert' : 'status'\" [class]=\"classes()\">\n @if (filled()) {\n <ng-content select=\"[bfSlot=icon]\" />\n <div [class]=\"contentClasses()\">\n @if (title()) {\n <p class=\"font-bold wrap-anywhere\">{{ title() }}</p>\n }\n <div class=\"font-medium wrap-anywhere\"><ng-content /></div>\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n }\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"dismissName()\"\n class=\"focus-visible:ring-ring text-heading rounded-control absolute end-3 top-3 flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center leading-none font-normal text-current transition-opacity after:absolute after:-inset-1.5 after:content-[''] hover:opacity-70 focus-visible:ring-4 focus-visible:outline-hidden\"\n (click)=\"dismissed.emit()\"\n >\n &times;\n </button>\n }\n </div>\n `,\n})\nexport class BfAlertComponent {\n /** Meaning of the message. */\n readonly variant = input<BfAlertVariant>('neutral');\n /** Bold first line. */\n readonly title = input('');\n /** Shows a dismiss button that emits `dismissed`; the host decides whether to hide the alert. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** `role=\"alert\"` (assertive) instead of `status`; for errors that need attention now. */\n readonly urgent = input(false, { transform: booleanAttribute });\n /** Renders the live region empty and fills it on the next frame, so an alert inserted after an\n * action is announced; read once, when the alert is created. */\n readonly announce = input(false, { transform: booleanAttribute });\n /** Accessible name of the dismiss button (empty falls back to `provideBfLabels()`'s `dismiss`,\n * \"Dismiss\"); with a `title` it becomes the label, a colon and the title (\"Dismiss: Saved\"). */\n readonly dismissLabel = input('');\n\n /** Emitted when the dismiss button is pressed. */\n readonly dismissed = output<void>();\n\n private readonly labels = inject(BF_LABELS);\n /** `announce` as it was when the alert was created; later changes are ignored. */\n private readonly deferred = linkedSignal<boolean, boolean>({\n source: this.announce,\n computation: (announce, previous) => previous?.value ?? announce,\n });\n private readonly frameReady = signal(false);\n /** Whether the live region holds its content (at once, or a frame later with `announce`). */\n protected readonly filled = computed(() => !this.deferred() || this.frameReady());\n\n /** The dismiss button's rendered name: `dismissLabel` (else the `dismiss` label), then the title. */\n readonly dismissName = computed(() => {\n const label = this.dismissLabel() || this.labels.dismiss;\n return this.title() ? `${label}: ${this.title()}` : label;\n });\n readonly classes = computed(() => `${BASE} ${VARIANT[this.variant()]}`);\n readonly contentClasses = computed(() =>\n [CONTENT_BASE, CONTENT_DISMISS[this.dismissible() ? 'dismissible' : 'static']]\n .filter(Boolean)\n .join(' '),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n // The empty region is in the accessibility tree by now; fill it a frame later so the change\n // is announced.\n afterNextRender(() => {\n if (!untracked(this.deferred)) {\n return;\n }\n const frame = requestAnimationFrame(() => this.frameReady.set(true));\n destroyRef.onDestroy(() => cancelAnimationFrame(frame));\n });\n }\n}\n","import { Component, input } from '@angular/core';\n\n/**\n * The heading level of a `bf-empty-state` title: `2` for a screen, `3` inside a section.\n *\n * @summary The heading level of an empty state title, two for a screen or three\n * @since 0.3.0\n */\nexport type BfEmptyStateHeadingLevel = 2 | 3;\n\n/**\n * The heading level a `bf-empty-state` title takes: a `BfEmptyStateHeadingLevel`, or `1` when the\n * empty state is the page itself (a not-found or no-access page). A new type, so `Record`s over\n * the released `BfEmptyStateHeadingLevel` keep compiling.\n *\n * @summary The heading level of an empty state title, one for a whole page\n * @since 0.3.2\n */\nexport type BfEmptyStateHeading = BfEmptyStateHeadingLevel | 1;\n\n/**\n * Placeholder for a screen or list with nothing in it yet: an icon tile, a title, one sentence,\n * and the action that fills it.\n *\n * @example\n * <bf-empty-state title=\"No tasks yet\" description=\"Add your first task to get started.\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"ListTodo\" size=\"lg\" />\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New task</bf-button>\n * </bf-empty-state>\n * @summary Placeholder for an empty screen or list with icon, title, message and action\n * @category Feedback\n * @since 0.1.0\n * @slot icon The icon in the tile above the title.\n * @slot actions Buttons under the description, such as Create.\n */\n@Component({\n selector: 'bf-empty-state',\n host: { class: 'block' },\n template: `\n <div class=\"flex flex-col items-center gap-3 px-6 py-12 text-center\">\n <div\n data-tile\n class=\"rounded-tile bg-surface-sunken text-text-muted flex h-16 w-16 items-center justify-center\"\n >\n <ng-content select=\"[bfSlot=icon]\" />\n </div>\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"text-heading text-text\">{{ title() }}</h1>\n }\n @case (3) {\n <h3 class=\"text-heading text-text\">{{ title() }}</h3>\n }\n @default {\n <h2 class=\"text-heading text-text\">{{ title() }}</h2>\n }\n }\n @if (description()) {\n <p class=\"text-body text-text-muted max-w-sm\">{{ description() }}</p>\n }\n <div class=\"mt-2 flex flex-wrap justify-center gap-2\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n `,\n})\nexport class BfEmptyStateComponent {\n /** What is missing, as a short title. */\n readonly title = input.required<string>();\n /** One sentence on how to fill it. */\n readonly description = input('');\n /** Heading level of the title so the empty state fits the page outline; 1 when it is the page. */\n readonly headingLevel = input<BfEmptyStateHeading>(2);\n}\n","import { Component, input } from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * Floating pill of actions that appears when items are selected. Position it yourself\n * (bottom-centre, above the safe area on mobile); the bar only styles itself.\n *\n * @example\n * <div class=\"fixed inset-x-0 bottom-6 flex justify-center\">\n * <bf-action-bar [label]=\"selected() + ' selected'\">\n * <bf-button variant=\"text\" size=\"sm\" (clicked)=\"clear()\">Clear</bf-button>\n * <bf-button size=\"sm\" (clicked)=\"complete()\">Mark done</bf-button>\n * </bf-action-bar>\n * </div>\n * @summary Floating pill of contextual actions that appears while items are selected\n * @category Actions\n * @since 0.1.0\n * @slot default The actions: buttons and icon buttons, laid out in the bar.\n */\n@Component({\n selector: 'bf-action-bar',\n host: { class: 'inline-flex max-w-full' },\n template: `\n <div\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n class=\"bg-surface text-text shadow-floating ps-card text-label-sm rounded-control inline-flex max-w-full min-w-0 flex-wrap items-center gap-1 py-1.5 pe-1.5 font-bold\"\n >\n <!-- The count never truncates: it keeps its width (breaking a long word only past the bar's\n width), and the actions wrap onto a second row when they do not fit beside it. -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"max-w-full shrink-0 pe-2.5 wrap-anywhere\">{{ label() }}</span>\n }\n <ng-content />\n </div>\n `,\n})\nexport class BfActionBarComponent {\n /** Leading text, e.g. \"2 selected\". */\n readonly label = input('');\n\n readonly labelId = uniqueId('bf-action-bar');\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * What `bf-tab` needs from its enclosing `bf-tab-bar`, provided through an injection token so\n * `tab-bar.component.ts` and `tab.component.ts` never import each other.\n *\n * @summary What each tab reads from its tab bar: the selection, tab stop and link mode\n * @since 0.1.0\n */\nexport interface BfTabBarHost {\n /** The id of the selected tab, the bar's `active` model. */\n readonly active: Signal<string>;\n /** The id of the tab shown as selected: `active`, or the controller's `current()` inside a\n * parent that provides `BF_TAB_BAR_CONTROLLER` (`bf-tabs`). Optional, so a custom `BF_TAB_BAR`\n * provider without it keeps working: `bf-tab` then reads `active`. */\n readonly selected?: Signal<string>;\n /** The id that currently owns the roving tab stop: the active enabled tab, or the first enabled\n * tab when nothing valid is selected. */\n readonly tabStop: Signal<string>;\n /** True when a router-aware parent provides `BF_TAB_LINKS`: the tabs render as links in a\n * `nav`, not as a `tablist`. */\n readonly linkMode: boolean;\n /**\n * The URL of tab `id` in link mode; `null` without `BF_TAB_LINKS`.\n * @param id The `id` of the tab.\n */\n linkHref(id: string): string | null;\n /**\n * Whether the current page is tab `id`'s root page (`aria-current=\"page\"`) rather than a\n * child page of it (`aria-current=\"true\"`); `true` without `BF_TAB_LINKS`.\n * @param id The `id` of the tab.\n */\n linkIsRoot(id: string): boolean;\n /**\n * Selects tab `id`, as a click on it would.\n * @param id The `id` of the tab.\n */\n select(id: string): void;\n}\n\n/**\n * The enclosing `bf-tab-bar`, as its tabs inject it.\n *\n * @summary Injection token through which each tab reaches its enclosing tab bar\n * @since 0.1.0\n */\nexport const BF_TAB_BAR = new InjectionToken<BfTabBarHost>('BF_TAB_BAR');\n\n/**\n * Provided by a router-aware parent (`bf-tabs`) to render the projected bar as a `nav` of links:\n * `href(id)` is the URL of tab `id`, used for the link's `href` (open in a new tab, copy the\n * link, see the URL). A plain click still goes through `bf-tab-bar`'s `select()`.\n *\n * @summary The URLs a router-aware parent gives a tab bar to render its tabs as links\n * @since 0.3.0\n */\nexport interface BfTabLinks {\n /**\n * The URL of tab `id`'s root page, the link's `href`.\n * @param id The `id` of the tab.\n */\n href(id: string): string;\n /**\n * Whether the current page is tab `id`'s root page; read in a reactive context, so back it\n * with signals.\n * @param id The `id` of the tab.\n */\n isRoot(id: string): boolean;\n}\n\n/**\n * The link source of a tab bar in link mode, provided by `bf-tabs`.\n *\n * @summary Injection token that turns a projected tab bar into a navigation of links\n * @since 0.3.0\n */\nexport const BF_TAB_LINKS = new InjectionToken<BfTabLinks>('BF_TAB_LINKS');\n\n/**\n * Provided by a parent that projects the bar and drives it (bf-tabs); the bar derives its state from it.\n *\n * @summary The state a parent that drives a projected tab bar gives it to derive from\n * @since 0.3.0\n */\nexport interface BfTabBarController extends BfTabLinks {\n /** The tab the parent shows: the in-flight navigation's target, else the current URL's; null when unknown. */\n readonly current: Signal<string | null>;\n /** Hide the bar (e.g. while the soft keyboard is open or about to open). */\n readonly hidden: Signal<boolean>;\n /** Animate hiding (iOS) or switch instantly. */\n readonly hideTransition: Signal<boolean>;\n /**\n * Called by the bar on a user selection of another tab.\n * @param id The `id` of the selected tab.\n */\n select(id: string): void;\n /**\n * Called by the bar on a user selection of the active tab.\n * @param id The `id` of the active tab.\n */\n reselect(id: string): void;\n}\n\n/**\n * The controller of a tab bar projected into a parent that drives it, provided by `bf-tabs`.\n *\n * @summary Injection token through which a parent drives the selection and hiding of its tab bar\n * @since 0.3.0\n */\nexport const BF_TAB_BAR_CONTROLLER = new InjectionToken<BfTabBarController>(\n 'BF_TAB_BAR_CONTROLLER',\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n type ElementRef,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { BF_TAB_BAR } from './tab-bar.token';\n\n/* Disabled uses tokens, never opacity: the capsule takes the sunken fill and the icon and label\n go to text-disabled (group-disabled, since both set their own colours). min-w-0 keeps a long label\n from widening the tab: it wraps to at most two lines, hyphenating a long word where the page's\n `lang` allows it (else breaking it where it must). The\n label's size and line height are capped at 200 % (22/28 px, in px because iOS Dynamic Type scales\n the root and so every rem); the 4 px vertical padding keeps a grown tab off the bar's edge. The\n capsule, the badge, the padding and the gaps are px too, so Dynamic Type grows only the label, up\n to its cap, and the bar tops out near 98 px (a capsule and two label lines), as UITabBar does. At\n compact heights (max-height 500px, phone landscape) the icon and the label sit side by side. The group is named (`group/bf-tab`) so a consumer's own\n `.group` ancestor (e.g. a card) does not also tint or dim it. The same classes serve the <button>\n (standalone, `:disabled`) and the <a> (inside bf-tabs, `aria-disabled=\"true\"`): each form only\n ever matches its own variant. */\nconst BUTTON =\n 'group/bf-tab flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-[4px] py-[4px] [@media(max-height:500px)]:flex-row [@media(max-height:500px)]:gap-[6px] rounded-control no-underline! focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed aria-disabled:cursor-not-allowed';\nconst CAPSULE_BASE =\n 'relative flex h-[30px] w-[52px] items-center justify-center rounded-control transition-colors group-disabled/bf-tab:bg-surface-sunken group-disabled/bf-tab:text-text-disabled group-aria-disabled/bf-tab:bg-surface-sunken group-aria-disabled/bf-tab:text-text-disabled';\n/* Hover tints the capsule; group-disabled comes later in the cascade, so a disabled tab keeps its\n sunken fill. A 1.5 px inset primary-strong outline marks the active capsule without relying on\n its fill (1.23:1 on the bar); a disabled active capsule outlines it in text-disabled. */\nconst CAPSULE_ACTIVE =\n 'bg-primary-soft text-primary-strong inset-ring-[1.5px] inset-ring-primary-strong group-hover/bf-tab:bg-primary-soft-hover group-disabled/bf-tab:inset-ring-text-disabled group-aria-disabled/bf-tab:inset-ring-text-disabled forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]';\nconst CAPSULE_INACTIVE =\n 'text-text-muted group-hover/bf-tab:bg-surface-muted group-hover/bf-tab:text-text';\n/* Pressed (the named group is the tab's button or link): the capsule takes the soft pressed tint,\n and an inactive capsule its hover icon colour; added only while the tab is enabled. */\nconst CAPSULE_PRESSED: Record<'active' | 'inactive', string> = {\n active: 'group-active/bf-tab:bg-primary-soft-pressed',\n inactive: 'group-active/bf-tab:bg-primary-soft-pressed group-active/bf-tab:text-text',\n};\nconst LABEL_BASE =\n 'text-nano text-[length:min(var(--text-nano),22px)] leading-[min(var(--text-nano--line-height),28px)] max-w-full line-clamp-2 px-[4px] text-center font-bold wrap-break-word hyphens-auto group-disabled/bf-tab:text-text-disabled group-aria-disabled/bf-tab:text-text-disabled';\nconst LABEL_ACTIVE = 'text-primary-strong';\nconst LABEL_INACTIVE = 'text-text-muted';\n\n/**\n * One destination inside `bf-tab-bar`: icon in the default slot, `label` under it, optional count\n * `badge`. A `button role=\"tab\"` in a standalone bar; inside `bf-tabs`, a link to the tab's URL\n * with `aria-current` while active: `page` on the tab's root page, `true` on a child page of it\n * (the current section, not the current page).\n *\n * @example\n * <bf-tab id=\"today\" label=\"Today\"><bf-icon [icon]=\"Sun\" /></bf-tab>\n * @summary One tab bar destination with an icon, a label and an optional count badge\n * @category Navigation\n * @since 0.1.0\n * @slot default The tab icon, a `bf-icon` above the label.\n */\n@Component({\n selector: 'bf-tab',\n imports: [NgTemplateOutlet],\n host: { class: 'flex min-w-0 flex-1', '[attr.id]': 'null' },\n template: `\n @if (bar.linkMode) {\n <!-- Inside bf-tabs: a link (Tab moves between tabs; Ctrl/Cmd-click opens a new tab). A\n disabled tab keeps the link role without an href, so it is skipped and inert. -->\n <a\n #control\n [id]=\"id()\"\n [attr.href]=\"disabled() ? null : bar.linkHref(id())\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-current]=\"current()\"\n [attr.aria-label]=\"accessibleName()\"\n [class]=\"buttonClasses()\"\n (click)=\"onLinkClick($event)\"\n ><ng-container *ngTemplateOutlet=\"content\"\n /></a>\n } @else {\n <button\n #control\n type=\"button\"\n role=\"tab\"\n [id]=\"id()\"\n [disabled]=\"disabled()\"\n [attr.aria-selected]=\"active() ? 'true' : 'false'\"\n [attr.aria-label]=\"accessibleName()\"\n [tabIndex]=\"bar.tabStop() === id() ? 0 : -1\"\n [class]=\"buttonClasses()\"\n (click)=\"bar.select(id())\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content>\n <span data-capsule [class]=\"capsuleClasses()\">\n <ng-content />\n @if (badge() !== null) {\n <span\n data-badge\n aria-hidden=\"true\"\n class=\"bg-primary text-on-primary text-nano absolute -end-[8px] -top-[4px] flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-[4px] text-[length:min(var(--text-nano),13px)] leading-none font-extrabold\"\n >{{ badge() }}</span\n >\n }\n </span>\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n </ng-template>\n `,\n})\nexport class BfTabComponent {\n /** Stable identifier; matches `bf-tab-bar`'s `active` when this tab is selected. It is a\n * selection key only, never reflected as the DOM `id` of more than the inner `<button>` (or\n * `<a>` inside `bf-tabs`). */\n readonly id = input.required<string>();\n /** Visible label under the icon. */\n readonly label = input.required<string>();\n /** Optional count shown as a badge on the icon capsule; announced to screen readers as part of\n * the tab's accessible name (`aria-label` \"{label}, {announcement}\", with `provideBfLabels()`'s\n * `tabBadge(n)`, `\"{n} new\"`, for a number, the string as-is otherwise) since the badge itself\n * is `aria-hidden`. */\n readonly badge = input<string | number | null>(null);\n /** Disables the tab: skipped by keyboard navigation, cannot be clicked. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** The enclosing `bf-tab-bar`, provided through `BF_TAB_BAR` so the two files don't import each other. */\n readonly bar = inject(BF_TAB_BAR);\n\n private readonly labels = inject(BF_LABELS);\n\n private readonly control = viewChild.required<ElementRef<HTMLElement>>('control');\n\n /** Whether this tab is the bar's current selection. */\n readonly active = computed(() => {\n // `selected` is optional on `BfTabBarHost`: a custom host without it shows `active`.\n const selected = this.bar.selected === undefined ? this.bar.active() : this.bar.selected();\n return selected === this.id();\n });\n\n /** `aria-current` of the link form: `page` while the active tab's root page is shown, `true`\n * while a child page of it is (the tab is the current section, not the current page), else\n * `null`. */\n readonly current = computed(() => {\n if (!this.active()) {\n return null;\n }\n return this.bar.linkIsRoot(this.id()) ? 'page' : 'true';\n });\n\n /** The badge as announced after the label in the accessible name when `badge()` is set. */\n readonly badgeAnnouncement = computed(() => {\n const badge = this.badge();\n if (badge === null) {\n return null;\n }\n return typeof badge === 'number' ? this.labels.tabBadge(badge) : badge;\n });\n\n /**\n * The tab's accessible name while a badge is set, `\"{label}, {announcement}\"` (\"Projects, 3\n * new\"), as `aria-label`: one string, so no browser inserts a pause before the comma (a visually\n * hidden span is block-level, and Chromium and WebKit join block children with a space). `null`\n * without a badge, so the name is the visible label.\n */\n readonly accessibleName = computed(() => {\n const announcement = this.badgeAnnouncement();\n return announcement === null ? null : `${this.label()}, ${announcement}`;\n });\n\n readonly buttonClasses = computed(() => BUTTON);\n readonly capsuleClasses = computed(() => {\n const state = this.active() ? 'active' : 'inactive';\n return [\n CAPSULE_BASE,\n this.active() ? CAPSULE_ACTIVE : CAPSULE_INACTIVE,\n this.disabled() ? '' : CAPSULE_PRESSED[state],\n ]\n .filter(Boolean)\n .join(' ');\n });\n readonly labelClasses = computed(\n () => `${LABEL_BASE} ${this.active() ? LABEL_ACTIVE : LABEL_INACTIVE}`,\n );\n\n /** Moves keyboard focus to this tab's button (or link); called by `bf-tab-bar` after arrow-key\n * selection. */\n focus(): void {\n this.control().nativeElement.focus();\n }\n\n /**\n * A plain primary click on the link selects the tab through the bar (so `bf-tabs` restores the\n * tab's stack, plays its haptic and pops to the root on reselect) instead of following `href`. A\n * modified or non-primary click (Ctrl/Cmd, Shift, Alt, middle) is left to the browser, which\n * opens the tab's URL in a new tab or window.\n * @internal\n */\n onLinkClick(event: MouseEvent): void {\n if (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {\n return;\n }\n event.preventDefault();\n this.bar.select(this.id());\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport {\n BF_TAB_BAR,\n BF_TAB_BAR_CONTROLLER,\n BF_TAB_LINKS,\n type BfTabBarHost,\n} from './tab-bar.token';\nimport { BfTabComponent } from './tab.component';\n\n/**\n * Floating pill tab bar for mobile apps (Meadow Sage): at least 64 px tall (it grows with a label\n * wrapped to two lines at large text sizes; at least 48 px, with icon and label side by side, at\n * compact heights such as phone landscape), inset 14 px from the sides and\n * 8 px above the bottom safe area (at least 12 px, so 20 px from the edge without an inset), one\n * `bf-tab` per destination. On its own it is a pure control with an `active` model and a `hidden`\n * input: a `tablist` whose selection follows focus with the arrow keys. Inside `bf-tabs`, which\n * provides `BF_TAB_LINKS` and `BF_TAB_BAR_CONTROLLER`, it is a `nav` of links with `aria-current`\n * on the active tab (`page` on its root page, `true` on a child page of it) whose selection and\n * hiding derive from the router and the keyboard; `active` is not written there.\n *\n * @example\n * <bf-tab-bar [(active)]=\"tab\" (changed)=\"go($event)\">\n * <bf-tab id=\"today\" label=\"Today\"><bf-icon [icon]=\"Sun\" /></bf-tab>\n * <bf-tab id=\"inbox\" label=\"Inbox\" [badge]=\"3\"><bf-icon [icon]=\"Inbox\" /></bf-tab>\n * </bf-tab-bar>\n * @summary Floating pill tab bar for mobile apps with arrow-key selection and count badges\n * @category Navigation\n * @since 0.1.0\n * @slot default The tabs, each a `bf-tab`.\n */\n@Component({\n selector: 'bf-tab-bar',\n // `hidden` is an input here: drop the static global attribute so the host never becomes\n // `display: none` instead of sliding out.\n host: { class: 'block', '[attr.hidden]': 'null' },\n providers: [{ provide: BF_TAB_BAR, useExisting: BfTabBarComponent }],\n template: `\n <nav\n [attr.aria-label]=\"name()\"\n [attr.aria-hidden]=\"isHidden() ? 'true' : null\"\n [attr.inert]=\"isHidden() ? '' : null\"\n [class]=\"navClasses()\"\n >\n <!-- Standalone: a tablist with a roving tab stop. With BF_TAB_LINKS: a plain group of links.\n At least 64 px, growing with a two-line label; at compact heights at least 48 px. In px,\n so iOS Dynamic Type (which scales the root) never grows the bar itself, as UITabBar. -->\n <div\n [attr.role]=\"linkMode ? null : 'tablist'\"\n [attr.tabindex]=\"linkMode ? null : -1\"\n class=\"flex min-h-[64px] items-stretch [@media(max-height:500px)]:min-h-[48px]\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </div>\n </nav>\n `,\n})\nexport class BfTabBarComponent implements BfTabBarHost {\n /** The active tab's id; two-way bindable. */\n readonly active = model('');\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `tabBar`\n * (\"Main\"). */\n readonly label = input('');\n private readonly labels = inject(BF_LABELS);\n /** The rendered navigation name: `label`, else the `tabBar` label. */\n readonly name = computed(() => this.label() || this.labels.tabBar);\n /** Floats fixed above the safe area with a shadow; false renders it inline in the layout flow. */\n readonly floating = input(true, { transform: booleanAttribute });\n /**\n * Slides the bar down out of view (e.g. while the soft keyboard is open); `aria-hidden` and inert\n * while hidden. Shadows the global `hidden` attribute on purpose: a static `<bf-tab-bar hidden>`\n * sets this input (the slide) and the attribute itself is removed from the host, so it never\n * becomes `display: none`.\n */\n readonly hidden = input(false, { transform: booleanAttribute });\n /** Animates hiding and showing (200 ms `translate-y`/`opacity`); false switches instantly. */\n readonly hideTransition = input(true, { transform: booleanAttribute });\n\n /** Emitted with the newly selected tab's id after a user change. */\n readonly changed = output<string>();\n /** Emitted with the active tab's id when the user selects the tab that is already active. */\n readonly reselected = output<string>();\n /**\n * Emitted with the newly selected tab's id after a user change, together with `changed`.\n * @deprecated 0.3.0 use changed; removed in 0.4.0\n */\n readonly tabChange = output<string>();\n /**\n * Emitted with the active tab's id on a reselect, together with `reselected`.\n * @deprecated 0.3.0 use reselected; removed in 0.4.0\n */\n readonly tabReselect = output<string>();\n\n /* `host`: only a parent in the template that declares this bar (`<bf-tabs><bf-tab-bar>`) turns\n it into links. A bar inside a routed page under `bf-tabs` (an in-page tab bar) is declared in\n the page's own view, so the lookup stops at the page and it stays a tablist. */\n private readonly links = inject(BF_TAB_LINKS, { optional: true, host: true });\n /** True inside a router-aware parent (`bf-tabs`): the tabs are links, not a tablist. */\n readonly linkMode = this.links !== null;\n\n /* `host`, as for `BF_TAB_LINKS`: only the parent that projects this bar drives it. */\n private readonly controller = inject(BF_TAB_BAR_CONTROLLER, { optional: true, host: true });\n\n private readonly hiddenState = signal(false);\n private readonly hideTransitionState = signal<boolean | null>(null);\n\n /** The id of the tab shown as selected: the controller's `current()` inside `bf-tabs` (empty\n * while it is unknown), else `active`. */\n readonly selected = computed(() => {\n const controller = this.controller;\n return controller ? (controller.current() ?? '') : this.active();\n });\n\n /** True while the bar is hidden, through the `hidden` input, `setHidden()` or the controller. */\n readonly isHidden = computed(\n () => this.hidden() || this.hiddenState() || (this.controller?.hidden() ?? false),\n );\n\n /** The `bf-tab` children projected into the bar, in document order. */\n readonly tabs = contentChildren(BfTabComponent);\n\n /** The id that currently owns the roving tab stop: the active enabled tab, or the first enabled\n * tab when nothing valid is selected (empty `active`, before a router binding resolves, or the\n * active tab is disabled). */\n readonly tabStop = computed(() => {\n const enabled = this.tabs().filter((t) => !t.disabled());\n if (enabled.length === 0) {\n return '';\n }\n const selected = enabled.find((t) => t.id() === this.selected());\n return (selected ?? enabled[0]).id();\n });\n\n readonly navClasses = computed(() => {\n const transition =\n this.hideTransitionState() ?? this.controller?.hideTransition() ?? this.hideTransition();\n return (\n 'bg-surface rounded-control' +\n (this.floating()\n ? ' fixed inset-x-3.5 bottom-[calc(max(var(--spacing-safe-bottom),12px)+8px)] z-(--bf-z-tabbar) shadow-floating'\n : ' shadow-raised') +\n (transition\n ? ' transition-[translate,opacity] duration-200 motion-reduce:transition-none'\n : '') +\n // Hidden: its own height plus 64 px, which clears its bottom offset (up to the safe area\n // plus 8 px) and the floating shadow.\n (this.isHidden() ? ' translate-y-[calc(100%+64px)] opacity-0 pointer-events-none' : '')\n );\n });\n\n /**\n * The imperative counterpart of the `hidden` input, for a parent that projects the bar and so\n * cannot bind it (`bf-tabs` provides `BF_TAB_BAR_CONTROLLER` instead). The bar is hidden while\n * the input, this or the controller's `hidden()` is true; `transition` overrides\n * `hideTransition` when given.\n * @param hidden Whether to hide the bar.\n * @param transition Whether the change animates (default: `hideTransition`).\n */\n setHidden(hidden: boolean, transition?: boolean): void {\n this.hiddenState.set(hidden);\n if (transition !== undefined) {\n this.hideTransitionState.set(transition);\n }\n }\n\n /**\n * Selects `id` and emits `changed`, or `reselected` when `id` is already selected; ignores\n * disabled or unknown tab ids. Inside `bf-tabs` it hands the selection to the controller\n * (`select`/`reselect`) instead of writing `active`.\n * @param id The `id` of the tab to select.\n */\n select(id: string): void {\n const tab = this.tabs().find((t) => t.id() === id);\n if (!tab || tab.disabled()) {\n return;\n }\n if (this.selected() !== id) {\n if (this.controller) {\n this.controller.select(id);\n } else {\n this.active.set(id);\n }\n this.changed.emit(id);\n this.tabChange.emit(id);\n } else {\n this.controller?.reselect(id);\n this.reselected.emit(id);\n this.tabReselect.emit(id);\n }\n }\n\n /**\n * The URL of tab `id` in link mode (`BF_TAB_LINKS`); `null` for a standalone bar.\n * @param id The `id` of the tab.\n */\n linkHref(id: string): string | null {\n return this.links ? this.links.href(id) : null;\n }\n\n /**\n * Whether the current page is tab `id`'s root page (link mode); `true` for a standalone bar.\n * @param id The `id` of the tab.\n */\n linkIsRoot(id: string): boolean {\n return this.links ? this.links.isRoot(id) : true;\n }\n\n /**\n * Arrow keys, Home and End move focus and selection along the tabs.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n // A nav of links moves with Tab, as links do; only a tablist has arrow-key selection.\n if (this.linkMode) {\n return;\n }\n const isNavigationKey = ['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key);\n if (!isNavigationKey) {\n return;\n }\n event.preventDefault();\n const enabled = this.tabs().filter((t) => !t.disabled());\n if (enabled.length === 0) {\n return;\n }\n const index = enabled.findIndex((t) => t.id() === this.selected());\n let next: BfTabComponent | undefined;\n switch (event.key) {\n case 'ArrowRight':\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n break;\n case 'ArrowLeft':\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n break;\n case 'Home':\n next = enabled[0];\n break;\n case 'End':\n next = enabled[enabled.length - 1];\n break;\n }\n if (!next) {\n return;\n }\n if (next.id() !== this.selected()) {\n this.select(next.id());\n }\n next.focus();\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport { BF_ACTION_HOST } from './action-host.token';\n\n/**\n * The one interactive element of a `bf-card` or `bf-list-item` (the stretched-link pattern): put\n * it on the `<a>` (navigation) or `<button>` (an action) that holds the card's heading text or the\n * row's title. Its `::after` stretches the hit area over the nearest positioned ancestor (the card\n * box, the row), so the whole surface is clickable while only the heading's link or button is\n * exposed: the heading stays a heading and the accessible name is the title alone. It registers\n * with the nearest card or row, which then draws the pointer, the hover and, while the action has\n * keyboard focus, the focus ring; a card is never lit by the actions of rows nested in it. Give\n * secondary controls inside the surface `class=\"relative z-1\"` so they stay clickable above the\n * stretched area.\n *\n * @example\n * <bf-card>\n * <h3 class=\"text-heading\"><a bfAction routerLink=\"/projects/atlas\">Atlas rebrand</a></h3>\n * </bf-card>\n * @summary Makes one link or button the click target of a whole card or list row\n * @since 0.3.0\n */\n@Directive({\n selector: 'a[bfAction], button[bfAction]',\n host: {\n 'data-bf-action': '',\n // A button[bfAction] gets the pointer a link has natively. The surface draws the focus ring\n // (a box-shadow); forced colours drop it, and the transparent outline on the ::after (around\n // the whole surface) becomes the visible indicator there.\n class:\n \"cursor-pointer after:absolute after:inset-0 after:content-[''] focus-visible:outline-none focus-visible:after:outline-hidden\",\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n },\n})\nexport class BfActionDirective {\n private readonly host = inject(BF_ACTION_HOST, { optional: true });\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n constructor() {\n const unregister = this.host?.registerAction();\n inject(DestroyRef).onDestroy(() => {\n this.host?.setActionFocusVisible(false);\n unregister?.();\n });\n }\n\n /**\n * Tells the host card or row whether its action has keyboard focus.\n * @internal\n */\n onFocus(): void {\n this.host?.setActionFocusVisible(this.element.matches(':focus-visible'));\n }\n\n /**\n * Tells the host card or row that its action lost focus.\n * @internal\n */\n onBlur(): void {\n this.host?.setActionFocusVisible(false);\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/** What a `bf-tab-panel` reads from its `bf-tab-group`; a token so the two files never import each\n * other. Internal: not exported from the package. */\nexport interface BfTabGroupHost {\n /** The value of the panel the group shows: `selected`, else the first enabled panel's. */\n readonly current: Signal<string>;\n}\n\n/** The enclosing `bf-tab-group`, as its panels inject it. */\nexport const BF_TAB_GROUP = new InjectionToken<BfTabGroupHost>('BF_TAB_GROUP');\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n viewChild,\n} from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_TAB_GROUP } from './tab-group.token';\n\n/**\n * One tab of a `bf-tab-group` and the content it shows: `label` is the tab's text, `value` the\n * key the group's `selected` holds. Put the content in an `ng-template` inside the panel and it is\n * created only while the panel is selected (`keepAlive` keeps it once visited); plain content\n * renders at once and is only hidden. An icon in `bfSlot=\"icon\"` shows in the tab before the label.\n *\n * @example\n * <bf-tab-panel value=\"activity\" label=\"Activity\" [badge]=\"3\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Activity\" />\n * <ng-template><app-activity-feed /></ng-template>\n * </bf-tab-panel>\n * @summary One tab of a tab group with its label, badge, icon and lazy content\n * @category Navigation\n * @since 0.3.1\n * @slot icon An icon in the tab before the label, a `bf-icon`.\n * @slot default Content rendered at once and hidden while another tab is selected; put it in an\n * `ng-template` instead to create it only when the panel is shown.\n */\n@Component({\n selector: 'bf-tab-panel',\n imports: [NgTemplateOutlet],\n host: {\n role: 'tabpanel',\n tabindex: '0',\n class: 'rounded-tile focus-visible:ring-ring focus-visible:outline-hidden focus-visible:ring-4',\n '[class.block]': 'isSelected()',\n '[attr.id]': 'panelId',\n '[attr.aria-labelledby]': 'tabId',\n '[hidden]': '!isSelected()',\n },\n template: `\n <!-- The icon slot, rendered by bf-tab-group inside this panel's tab. -->\n <ng-template #icon><ng-content select=\"[bfSlot=icon]\" /></ng-template>\n @if (rendered()) {\n @if (content(); as template) {\n <ng-container *ngTemplateOutlet=\"template\" />\n }\n }\n <ng-content />\n `,\n})\nexport class BfTabPanelComponent {\n /** The key of this panel; the group's `selected` holds it while the panel is shown. */\n readonly value = input.required<string>();\n /** The tab's visible text, also its accessible name. */\n readonly label = input.required<string>();\n /** Disables the tab: it cannot be clicked and the arrow keys skip it. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** A count shown as a pill after the tab's label, announced with `provideBfLabels()`'s\n * `tabBadge(count)` (\"3 new\"); `null` shows none. */\n readonly badge = input<number | null>(null);\n /** Keeps the content of an `ng-template` in the DOM, hidden, once the panel has been shown, so\n * its state (scroll, form input) survives switching tabs. */\n readonly keepAlive = input(false, { transform: booleanAttribute });\n\n private readonly group = inject(BF_TAB_GROUP);\n\n /** The panel's DOM id, which its tab's `aria-controls` names. */\n readonly panelId = uniqueId('bf-tab-panel');\n /** The DOM id of this panel's tab, which the panel's `aria-labelledby` names. */\n readonly tabId = `${this.panelId}-tab`;\n\n /** The icon slot as a template, for the group to render inside the tab. */\n readonly icon = viewChild<TemplateRef<unknown>>('icon');\n /** The consumer's lazy content, if any. */\n protected readonly content = contentChild(TemplateRef);\n\n /** Whether the group shows this panel. */\n readonly isSelected = computed(() => this.group.current() === this.value());\n /** Latches once the panel has been shown. */\n private readonly visited = linkedSignal<boolean, boolean>({\n source: this.isSelected,\n computation: (selected, previous) => selected || (previous?.value ?? false),\n });\n /** Whether the `ng-template` content exists: while selected, or once visited with `keepAlive`.\n * `visited` is read first on every run, so the latch sees each selection. */\n protected readonly rendered = computed(() => {\n const visited = this.visited();\n return this.isSelected() || (this.keepAlive() && visited);\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BF_TAB_GROUP, type BfTabGroupHost } from './tab-group.token';\nimport { BfTabPanelComponent } from './tab-panel.component';\n\n/* The tab is a button that projects the consumer's label and icon, so under a coarse pointer it\n grows to 44 px (`pointer-coarse:min-h-hit`) instead of extending an ::after over its neighbours\n (PROJECT_GUIDE hit areas); its ::after is the selected underline. Neutral `text-muted` at rest,\n a `surface-muted` fill with `text` on hover, `surface-pressed` while pressed (enabled only, so a\n disabled tab never reacts); the top corners round the fill, the bottom stays square on the line.\n shrink-0: a tab never squeezes its label; the row scrolls sideways instead (SCROLLER). */\nconst TAB_BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-t-tile font-bold whitespace-nowrap transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed ' +\n 'disabled:cursor-not-allowed disabled:text-text-disabled';\n/* Height steps 32/40/48 as a min-height, at least 44 px under a coarse pointer. */\nconst TAB_SIZE: Record<BfSize, string> = {\n sm: 'min-h-8 gap-1.5 px-3 text-label-xs pointer-coarse:min-h-hit',\n md: 'min-h-10 gap-2 px-3 text-label-sm pointer-coarse:min-h-hit',\n lg: 'min-h-12 gap-2 px-4 text-label pointer-coarse:min-h-hit',\n};\n/* Selected: `primary-text` and a 2 px `primary` underline (an ::after on the bottom edge), so the\n selection never rests on colour alone; the underline is `CanvasText` under forced colours. A\n disabled selected tab keeps the underline in `text-disabled`. */\nconst TAB_STATE: Record<'selected' | 'idle', string> = {\n selected:\n \"text-primary-text after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:content-[''] disabled:after:bg-text-disabled forced-colors:after:bg-[CanvasText]\",\n idle: 'text-text-muted enabled:hover:text-text enabled:active:text-text',\n};\n/* Fitted: the tabs share the row's width. */\nconst TAB_LAYOUT: Record<'fit' | 'fitted', string> = { fit: '', fitted: 'flex-1' };\n/* The count pill after the label (a[bfNavItem]'s pill): aria-hidden, the sr-only announcement\n beside it carries the count. */\nconst BADGE =\n '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';\n/* The row: at least the scroller's width, so the line under it spans the whole group, and as wide\n as its tabs (w-max), so it overflows the scroller when they do not fit. */\nconst LIST = 'flex w-max min-w-full border-b border-border';\n/* The scroller around the row: it scrolls sideways while the tabs do not fit. Its 4 px padding,\n cancelled by a negative margin, keeps the 4 px focus ring inside the clip (as bf-segmented). */\nconst SCROLLER = '-m-1 overflow-x-auto p-1';\nconst NAVIGATION_KEYS = ['ArrowRight', 'ArrowLeft', 'Home', 'End'];\n\n/**\n * In-page tabs: a row of tabs over the content they switch, one `bf-tab-panel` per tab. The\n * `selected` model holds the shown panel's `value`; unset or unknown, the first enabled panel\n * shows. Selection follows focus: the arrow keys (mirrored under `dir=\"rtl\"`), Home and End move\n * to a tab and show its panel. When the tabs do not fit, the row scrolls sideways.\n *\n * @example\n * <bf-tab-group label=\"Project\" [(selected)]=\"tab\">\n * <bf-tab-panel value=\"overview\" label=\"Overview\">…</bf-tab-panel>\n * <bf-tab-panel value=\"activity\" label=\"Activity\" [badge]=\"3\">…</bf-tab-panel>\n * </bf-tab-group>\n * @summary In-page tabs that switch between content panels, with keyboard navigation and badges\n * @category Navigation\n * @since 0.3.1\n * @slot default The panels, each a `bf-tab-panel`.\n */\n@Component({\n selector: 'bf-tab-group',\n imports: [NgTemplateOutlet],\n host: { class: 'flex min-w-0 flex-col gap-4' },\n providers: [{ provide: BF_TAB_GROUP, useExisting: BfTabGroupComponent }],\n template: `\n <div data-bf-tab-scroller [class]=\"scrollerClasses\">\n <!-- tabindex -1: the tabs hold the tab stop; the row only hears their arrow keys. -->\n <div\n role=\"tablist\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [class]=\"listClasses\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (panel of panels(); track panel) {\n <button\n #tab\n type=\"button\"\n role=\"tab\"\n [id]=\"panel.tabId\"\n [attr.aria-selected]=\"panel.isSelected() ? 'true' : 'false'\"\n [attr.aria-controls]=\"panel.panelId\"\n [tabIndex]=\"panel === tabStop() ? 0 : -1\"\n [disabled]=\"panel.disabled()\"\n [class]=\"tabClasses(panel)\"\n (click)=\"select(panel)\"\n >\n <span class=\"flex shrink-0 empty:hidden\"\n ><ng-container *ngTemplateOutlet=\"panel.icon() ?? null\"\n /></span>\n <span data-label>{{ panel.label() }}</span>\n @let badge = panel.badge();\n @if (badge !== null) {\n <span data-badge aria-hidden=\"true\" [class]=\"badgeClasses\">{{ badge }}</span>\n <!-- A leading comma, so the name reads \"Activity, 3 new\" and never runs together. -->\n <span class=\"sr-only\">, {{ badgeAnnouncement(badge) }}</span>\n }\n </button>\n }\n </div>\n </div>\n <ng-content />\n `,\n})\nexport class BfTabGroupComponent implements BfTabGroupHost {\n /** The shown panel's `value`; two-way bindable. Unset or unknown shows the first enabled panel\n * (the model keeps its value until the user picks a tab). */\n readonly selected = model('');\n /** Accessible name of the tablist; empty falls back to `provideBfLabels()`'s `tabGroup`\n * (\"Tabs\"). */\n readonly label = input('');\n /** Height step of the tabs: sm 32, md 40, lg 48 px (at least 44 px under a coarse pointer);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretches the tabs to share the group's width. */\n readonly fitted = input(false, { transform: booleanAttribute });\n\n /** Emitted with the newly selected panel's `value` after a user change. */\n readonly changed = output<string>();\n\n /** The `bf-tab-panel` children, in document order. */\n readonly panels = contentChildren(BfTabPanelComponent);\n private readonly tabs = viewChildren<ElementRef<HTMLButtonElement>>('tab');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n private readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n /** The tablist's accessible name: `label`, else the `tabGroup` label. */\n readonly name = computed(() => this.label() || this.labels.tabGroup);\n\n /** The panel shown: the one whose `value` is `selected`, else the first enabled panel (else the\n * first panel). */\n private readonly currentPanel = computed(() => {\n const panels = this.panels();\n return (\n panels.find((p) => p.value() === this.selected()) ??\n panels.find((p) => !p.disabled()) ??\n panels[0]\n );\n });\n /** The value of the panel shown; what each panel compares its own `value` with. */\n readonly current = computed(() => this.currentPanel()?.value() ?? '');\n\n /** The panel whose tab owns the roving tab stop: the shown one, else (it is disabled) the first\n * enabled one. */\n protected readonly tabStop = computed(() => {\n const current = this.currentPanel();\n return current && !current.disabled() ? current : this.panels().find((p) => !p.disabled());\n });\n\n protected readonly scrollerClasses = SCROLLER;\n protected readonly listClasses = LIST;\n protected readonly badgeClasses = BADGE;\n\n /**\n * The classes of a panel's tab.\n * @internal\n */\n tabClasses(panel: BfTabPanelComponent): string {\n return [\n TAB_BASE,\n TAB_SIZE[this.resolvedSize()],\n TAB_STATE[panel.isSelected() ? 'selected' : 'idle'],\n TAB_LAYOUT[this.fitted() ? 'fitted' : 'fit'],\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * The badge as screen readers hear it after the label.\n * @internal\n */\n badgeAnnouncement(count: number): string {\n return this.labels.tabBadge(count);\n }\n\n /**\n * Shows `panel` and emits `changed`, unless it is disabled or already shown.\n * @internal\n */\n select(panel: BfTabPanelComponent): void {\n if (panel.disabled() || panel.isSelected()) {\n return;\n }\n this.selected.set(panel.value());\n this.changed.emit(panel.value());\n }\n\n /**\n * Arrow keys (mirrored under `dir=\"rtl\"`), Home and End move focus and selection.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!NAVIGATION_KEYS.includes(event.key)) {\n return;\n }\n const panels = this.panels();\n const enabled = panels.filter((p) => !p.disabled());\n if (enabled.length === 0) {\n return;\n }\n event.preventDefault();\n const rtl =\n event.currentTarget instanceof Element &&\n event.currentTarget.closest('[dir]')?.getAttribute('dir') === 'rtl';\n // Forward is the reading direction: ArrowRight in ltr, ArrowLeft in rtl.\n const forward = event.key === (rtl ? 'ArrowLeft' : 'ArrowRight');\n const current = this.currentPanel();\n const index = current ? enabled.indexOf(current) : -1;\n let next: BfTabPanelComponent | undefined;\n if (event.key === 'Home') {\n next = enabled[0];\n } else if (event.key === 'End') {\n next = enabled[enabled.length - 1];\n } else if (forward) {\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n } else {\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n }\n if (!next) {\n return;\n }\n this.select(next);\n this.tabs()[panels.indexOf(next)]?.nativeElement.focus();\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, input } from '@angular/core';\n\n/**\n * The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.\n *\n * @summary The heading level of a page header title, one for a page or two\n * @since 0.3.1\n */\nexport type BfPageHeaderHeadingLevel = 1 | 2;\n\n/**\n * The top of a desktop page: a breadcrumb above, then the page title with its subtitle and\n * badges, and the page's actions at the inline end, wrapping under the title in a narrow window.\n *\n * @example\n * <bf-page-header title=\"Atlas rebrand\" subtitle=\"12 of 18 tasks done\">\n * <bf-badge bfSlot=\"meta\" variant=\"success\">On track</bf-badge>\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New task</bf-button>\n * </bf-page-header>\n * @summary Desktop page header with breadcrumb, title, subtitle, badges and a row of actions\n * @category Navigation\n * @since 0.3.1\n * @slot breadcrumb The trail above the title, such as `bf-breadcrumb`.\n * @slot title Rich title content inside the heading, when the `title` input is empty.\n * @slot meta Badges beside the title, wrapping under it when they do not fit.\n * @slot actions The page's buttons and menu buttons at the inline end.\n */\n@Component({\n selector: 'bf-page-header',\n imports: [NgTemplateOutlet],\n host: { class: 'block' },\n template: `\n <header class=\"flex flex-col gap-2\">\n <div data-breadcrumb class=\"empty:hidden\">\n <ng-content select=\"[bfSlot=breadcrumb]\" />\n </div>\n <div data-row class=\"flex flex-wrap items-center justify-between gap-4\">\n <div data-title-block class=\"flex min-w-0 flex-col gap-1\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1\">\n @if (headingLevel() === 2) {\n <h2 [class]=\"headingClasses\"><ng-container *ngTemplateOutlet=\"heading\" /></h2>\n } @else {\n <h1 [class]=\"headingClasses\"><ng-container *ngTemplateOutlet=\"heading\" /></h1>\n }\n <div data-meta class=\"flex flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=meta]\" />\n </div>\n </div>\n @if (subtitle()) {\n <p class=\"text-body text-text-muted\">{{ subtitle() }}</p>\n }\n </div>\n <div data-actions class=\"flex flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n </header>\n <!-- One copy of the title content, so the title slot projects into whichever heading renders. -->\n <ng-template #heading>\n @if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[bfSlot=title]\" />\n }\n </ng-template>\n `,\n})\nexport class BfPageHeaderComponent {\n /** The page title, rendered as the heading; empty to use the `title` slot instead. */\n readonly title = input('');\n /** One line under the title, such as a status or a count. */\n readonly subtitle = input('');\n /** Heading level of the title so the header fits the page outline. */\n readonly headingLevel = input<BfPageHeaderHeadingLevel>(1);\n\n protected readonly headingClasses = 'text-title text-text min-w-0 wrap-break-word';\n}\n","import { Component, computed, input } from '@angular/core';\nimport { provideBfDefaults } from '../../config/defaults';\n\n/* The status line: muted caption text while it has something to say; empty, it leaves the flow\n (`sr-only`, so no stray gap) but stays in the accessibility tree, so the live region is already\n registered when the first count arrives and that change is announced. */\nconst STATUS: Record<'shown' | 'empty', string> = {\n shown: 'text-caption text-text-muted',\n empty: 'sr-only',\n};\n\n/**\n * Row of search, filters, a view switch and trailing actions above a list or table. Every\n * control projected into it is `sm` unless it sets `size` itself.\n *\n * @example\n * <bf-toolbar label=\"Project filters\" [status]=\"results().length + ' results'\">\n * <bf-input type=\"search\" ariaLabel=\"Search projects\" [(value)]=\"query\" />\n * <bf-select ariaLabel=\"Status\" [options]=\"statuses\" [(value)]=\"status\" />\n * <bf-segmented bfSlot=\"view\" label=\"View\" [options]=\"views\" [(value)]=\"view\" />\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New project</bf-button>\n * </bf-toolbar>\n * @summary Dense row of search, filters, view switch, result count and actions\n * @category Actions\n * @since 0.3.1\n * @slot default The search field and the filters (bf-input, bf-select, bf-chip-group), in order.\n * @slot view A view switch after the filters, such as a bf-segmented of list and grid.\n * @slot actions The trailing actions, kept together at the inline end of the row, beside the status.\n */\n@Component({\n selector: 'bf-toolbar',\n host: {\n role: 'group',\n class: 'flex flex-wrap items-center gap-2',\n '[attr.aria-label]': 'label() || null',\n },\n // Component providers reach projected content too, so every control the consumer puts in the\n // row resolves its unset `size` against these defaults.\n providers: [provideBfDefaults({ size: 'sm' })],\n template: `\n <ng-content />\n <ng-content select=\"[bfSlot=view]\" />\n <!-- The status and the actions are one flex item that takes the rest of the row: on a narrow\n row they wrap together, the status at the start and the actions at the inline end, so the\n actions never sit alone on a row. With no actions the group dissolves (display: contents)\n and the status is a plain item of the row. -->\n <div\n data-end\n class=\"flex max-w-full grow flex-wrap items-center gap-2 has-[>div:empty]:contents\"\n >\n <span role=\"status\" [class]=\"statusClasses()\">{{ status() }}</span>\n <!-- One flex item, so the actions wrap together, never one by one. -->\n <div class=\"ms-auto flex max-w-full flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n `,\n})\nexport class BfToolbarComponent {\n /** The group's accessible name, such as \"Project filters\"; unnamed when empty. */\n readonly label = input('');\n /** The result count or a short state, such as \"24 results\", announced politely on change. */\n readonly status = input('');\n\n readonly statusClasses = computed(() => STATUS[this.status() ? 'shown' : 'empty']);\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * What a `bf-table` cell template receives: the row (`let-row`) and its position in `rows`.\n *\n * @summary The row and its index that a custom table cell template receives\n * @since 0.3.1\n */\nexport interface BfTableCellContext<T> {\n /** The row the cell belongs to (`let-row`). */\n $implicit: T;\n /** The row's position in the table's `rows` (`let-index=\"index\"`). */\n index: number;\n}\n\n/**\n * Replaces the default text of one `bf-table` column with a template, such as a badge, an avatar\n * or a link. `bfTableCell` names the column's `key`; bind `bfTableCellOf` to the table's rows so\n * `let-row` is typed as one of them (it is `unknown` otherwise).\n *\n * @example\n * <bf-table [rows]=\"tasks()\" [columns]=\"columns\">\n * <ng-template bfTableCell=\"status\" [bfTableCellOf]=\"tasks()\" let-task>\n * <bf-badge [variant]=\"task.done ? 'success' : 'neutral'\">{{ task.status }}</bf-badge>\n * </ng-template>\n * </bf-table>\n * @summary Custom template for the cells of one table column, with the row typed\n * @since 0.3.1\n */\n@Directive({ selector: 'ng-template[bfTableCell]' })\nexport class BfTableCellDirective<T = unknown> {\n /** The `key` of the column whose cells this template renders. */\n readonly bfTableCell = input.required<string>();\n /** The table's rows; only types `let-row`, the table never reads it. */\n readonly bfTableCellOf = input<readonly T[]>([]);\n\n /**\n * The cell template the table renders for each row.\n * @internal\n */\n readonly template = inject<TemplateRef<BfTableCellContext<T>>>(TemplateRef);\n\n /**\n * Types the template's context for the template type checker.\n * @internal\n * @param _directive The directive instance (unused).\n * @param _context The template's context.\n * @returns Always true.\n */\n static ngTemplateContextGuard<T>(\n _directive: BfTableCellDirective<T>,\n _context: unknown,\n ): _context is BfTableCellContext<T> {\n return true;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n type ElementRef,\n type TemplateRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BfCheckboxComponent } from '../checkbox/checkbox.component';\nimport { type BfSelectOption, BfSelectComponent } from '../select/select.component';\nimport { uniqueId } from '../_shared/unique-id';\nimport { type BfTableCellContext, BfTableCellDirective } from './table-cell.directive';\n\n/**\n * Where a `bf-table` column lines up its header and cells: `start` for text, `end` for numbers.\n *\n * @summary The inline alignment of a table column, start for text or end for numbers\n * @since 0.3.1\n */\nexport type BfTableAlign = 'start' | 'end';\n\n/**\n * The direction of a sorted `bf-table` column, as `aria-sort` names it.\n *\n * @summary The direction a sorted table column is in, ascending or descending\n * @since 0.3.1\n */\nexport type BfTableSortDirection = 'ascending' | 'descending';\n\n/**\n * When a `bf-table` renders each row as a card of label/value pairs: `never` (the default),\n * `narrow` while the table is narrower than 36rem (a container query), or `coarse` under a coarse\n * pointer at any width.\n *\n * @summary When a table stacks its rows into cards: never, when narrow, or under touch\n * @since 0.3.2\n */\nexport type BfTableStack = 'never' | 'narrow' | 'coarse';\n\n/**\n * One column of a `bf-table`: the row property it shows, its header and how it behaves.\n *\n * @summary One table column with its row key, header label, sorting and alignment\n * @since 0.3.1\n */\nexport interface BfTableColumn {\n /** The row property the default cell shows; also the key a `bfTableCell` template names. */\n key: string;\n /** The header text. */\n label: string;\n /**\n * Whether the header is a button that sets the table's `sort`.\n * @default false\n */\n sortable?: boolean;\n /**\n * The inline alignment of the header and cells; `end` also sets tabular figures.\n * @default 'start'\n */\n align?: BfTableAlign;\n}\n\n/**\n * The column a `bf-table` is sorted by and the direction; the consumer sorts the rows.\n *\n * @summary The column key and direction a table is sorted by, set by its headers\n * @since 0.3.1\n */\nexport interface BfTableSort {\n /** The `key` of the sorted column. */\n column: string;\n /** The sort direction. */\n direction: BfTableSortDirection;\n}\n\n/**\n * Returns the string that identifies a `bf-table` row in `selection` and in the `@for` track.\n *\n * @summary Function that returns the unique string key of one table row\n * @since 0.3.1\n */\nexport type BfTableRowKey<T> = (row: T) => string;\n\n/** A row's property, read without trusting the row's shape. */\nfunction readProperty(row: unknown, key: string): unknown {\n if (typeof row !== 'object' || row === null) {\n return undefined;\n }\n const value: unknown = Reflect.get(row, key);\n return value;\n}\n\n/** The default `rowKey`: the row's `id` when it is a string or a number, else `''` (the table\n * then falls back to the row's index). */\nfunction idRowKey(row: unknown): string {\n const id = readProperty(row, 'id');\n return typeof id === 'string' || typeof id === 'number' ? String(id) : '';\n}\n\n/* Row heights per step: the header 32/40/48 and the body rows 40/48/56 px, set as the cells'\n `height` (a table cell's height is its minimum). Under a coarse pointer every row is at least\n 44 px; a cell projects the consumer's content, so it grows, never an ::after over it. The\n checkboxes take the same step, so their rows (32/40/48) fit the body rows' 4 px padding. */\nconst HEAD_CELL: Record<BfSize, string> = {\n sm: 'h-8 pointer-coarse:h-hit',\n md: 'h-10 pointer-coarse:h-hit',\n lg: 'h-12',\n};\nconst BODY_CELL: Record<BfSize, string> = {\n sm: 'h-10 py-1 text-label-sm',\n md: 'h-12 py-1 text-body',\n lg: 'h-14 py-1 text-body',\n};\n/* The coarse-pointer row height of an sm row, only where the table does not stack (a stacked cell\n sizes to its content): never in a `stack=\"coarse\"` table, and only from a 36rem container up\n in a `stack=\"narrow\"` one (Tailwind sorts pointer-coarse: after the container variants, so a\n stacked h-auto could not override it). */\nconst BODY_TOUCH: Record<BfTableStack, string> = {\n never: 'pointer-coarse:h-hit',\n narrow: '@min-xl:pointer-coarse:h-hit',\n coarse: '',\n};\nconst ALIGN: Record<BfTableAlign, string> = {\n start: 'text-start',\n end: 'text-end tabular-nums',\n};\nconst HEAD_BASE = 'px-3 py-0 align-middle text-label-xs font-bold text-text-muted';\nconst BODY_BASE = 'px-3 align-middle font-medium text-text';\n/* The selection column: as narrow as its checkbox. */\nconst SELECT_CELL = 'w-0 ps-3 pe-0';\n/* A sortable header: a button around the label and the arrow mark, at least 24 px tall (44 px\n under a coarse pointer); its text is the column's own label, so a min-height, no ::after. */\nconst SORT_BUTTON =\n 'inline-flex min-h-6 cursor-pointer items-center gap-1.5 rounded-field -mx-1 px-1 font-bold transition-colors hover:text-text ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring pointer-coarse:min-h-hit';\n/* The sort arrow: a CSS chevron in the label's colour (no icon import), pointing up while\n ascending and down while descending. A vertical mark, so it does not mirror under rtl. Hidden but\n still taking its space while the column is not sorted, so the label never shifts. */\ntype BfTableSortMark = BfTableSortDirection | 'none';\nconst ARROW_BASE =\n 'inline-block size-1.5 shrink-0 border-r-[1.5px] border-b-[1.5px] border-current';\nconst ARROW: Record<BfTableSortMark, string> = {\n ascending: 'translate-y-0.5 -rotate-135',\n descending: '-translate-y-0.5 rotate-45',\n none: 'invisible rotate-45',\n};\n/* Body rows: a selected row takes the primary-soft fill; a selectable table's rows tint on\n hover (on devices that can hover). Without selection the rows stay still. */\ntype BfTableRowState = 'selected' | 'selectable' | 'static';\nconst ROW: Record<BfTableRowState, string> = {\n selected: 'bg-primary-soft hover:bg-primary-soft-hover',\n selectable: 'hover:bg-surface-muted',\n static: '',\n};\n/* A focused element ArrowUp / ArrowDown move from: a button, link or checkbox. Text entry, a\n select and the composite widgets (radio, combobox, slider, …) keep their own arrow keys. */\nconst FOCUSABLE =\n 'a[href], button:not(:disabled), input[type=\"checkbox\"]:not(:disabled), [tabindex]:not([tabindex=\"-1\"])';\nconst OWN_ARROWS = new Set(['radio', 'combobox', 'slider', 'spinbutton', 'listbox', 'menu', 'tab']);\n\n/* Stacked rows. Each part's classes apply only while the table stacks: below a 36rem container\n (`@max-xl:`, the host is the container) or under a coarse pointer (`pointer-coarse:`). The\n elements stay a table with explicit roles; only their display changes. The thead is visually\n hidden (screen readers still read the column headers), each body row is a sunken tile (the\n tile a raised card holds, see the card's Nesting surfaces), its selection checkbox and first\n cell form the tile's header, and every other cell shows its column label before its value\n through a `::before` reading `data-label` with empty alternative text, so assistive technology\n reads the header association, not the label twice. A visible bar above the tiles holds the\n select-all checkbox and a Sort by select, since the hidden header row's controls are not\n shown. */\nconst STACK_HOST: Record<BfTableStack, string> = {\n never: 'block',\n narrow: 'block @container',\n coarse: 'block',\n};\nconst STACK_BAR: Record<BfTableStack, string> = {\n never: 'hidden',\n narrow: 'hidden @max-xl:flex',\n coarse: 'hidden pointer-coarse:flex',\n};\nconst STACK_TABLE: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:block',\n coarse: 'pointer-coarse:block',\n};\nconst STACK_HEAD: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:sr-only',\n coarse: 'pointer-coarse:sr-only',\n};\n/* Shown only while stacked (the plain header label) or only while not (the sort button, the\n header checkbox), so the hidden header row holds no control a keyboard user could reach. */\nconst STACK_ONLY: Record<BfTableStack, string> = {\n never: 'hidden',\n narrow: 'hidden @max-xl:inline',\n coarse: 'hidden pointer-coarse:inline',\n};\nconst STACK_NEVER: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:hidden',\n coarse: 'pointer-coarse:hidden',\n};\nconst STACK_BODY: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:flex @max-xl:flex-col @max-xl:gap-2 @max-xl:divide-y-0',\n coarse:\n 'pointer-coarse:flex pointer-coarse:flex-col pointer-coarse:gap-2 pointer-coarse:divide-y-0',\n};\nconst STACK_ROW: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:grid @max-xl:items-center @max-xl:gap-x-3 @max-xl:rounded-tile @max-xl:px-3 @max-xl:py-2',\n coarse:\n 'pointer-coarse:grid pointer-coarse:items-center pointer-coarse:gap-x-3 pointer-coarse:rounded-tile pointer-coarse:px-3 pointer-coarse:py-2',\n};\n/* A selectable row's tile: the checkbox column, then the rest. */\nconst STACK_ROW_SELECTABLE: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:grid-cols-[auto_minmax(0,1fr)]',\n coarse: 'pointer-coarse:grid-cols-[auto_minmax(0,1fr)]',\n};\n/* An unselected row's tile fill (a selected one keeps primary-soft). */\nconst STACK_ROW_FILL: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:bg-surface-sunken',\n coarse: 'pointer-coarse:bg-surface-sunken',\n};\nconst STACK_SELECT_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:flex @max-xl:h-auto @max-xl:w-auto @max-xl:p-0',\n coarse: 'pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:w-auto pointer-coarse:p-0',\n};\n/* The first cell: the tile's title, without a label. */\nconst STACK_FIRST_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:block @max-xl:h-auto @max-xl:px-0 @max-xl:py-1 @max-xl:text-start @max-xl:font-bold',\n coarse:\n 'pointer-coarse:block pointer-coarse:h-auto pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-start pointer-coarse:font-bold',\n};\n/* Every other cell: the label at the start, the value at the end, on the tile's full width. */\nconst STACK_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:col-span-full @max-xl:flex @max-xl:h-auto @max-xl:items-baseline @max-xl:justify-between @max-xl:gap-3 @max-xl:px-0 @max-xl:py-1 @max-xl:text-end ' +\n '@max-xl:before:shrink-0 @max-xl:before:text-start @max-xl:before:text-label-xs @max-xl:before:font-bold @max-xl:before:text-text-muted @max-xl:before:content-[attr(data-label)_/_\"\"]',\n coarse:\n 'pointer-coarse:col-span-full pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:items-baseline pointer-coarse:justify-between pointer-coarse:gap-3 pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-end ' +\n 'pointer-coarse:before:shrink-0 pointer-coarse:before:text-start pointer-coarse:before:text-label-xs pointer-coarse:before:font-bold pointer-coarse:before:text-text-muted pointer-coarse:before:content-[attr(data-label)_/_\"\"]',\n};\nconst STACK_EMPTY: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:block',\n coarse: 'pointer-coarse:block',\n};\n\ninterface BfTableEntry<T> {\n row: T;\n key: string;\n index: number;\n}\n\n/**\n * Data table for desktop: column headers that set a sort, optional row selection with\n * checkboxes, custom cells from `bfTableCell` templates and an empty slot. It never sorts or\n * filters itself; the consumer sorts the rows in a `computed()` from `sort`. With `stack` it\n * renders each row as a tile of label/value pairs in a narrow space or under touch.\n *\n * @example\n * <bf-table label=\"Tasks\" [rows]=\"sorted()\" [columns]=\"columns\" [(sort)]=\"sort\" selectable [(selection)]=\"selected\">\n * <ng-template bfTableCell=\"title\" [bfTableCellOf]=\"sorted()\" let-task>{{ task.title }}</ng-template>\n * <bf-empty-state bfSlot=\"empty\" title=\"No tasks\" />\n * </bf-table>\n * @summary Desktop data table with sortable headers, row selection, custom cells and an empty slot\n * @category Data display\n * @since 0.3.1\n * @slot empty Shown in one full-width row while `rows` is empty, such as a `bf-empty-state`.\n */\n@Component({\n selector: 'bf-table',\n host: { '[class]': 'hostClasses()', '(keydown)': 'onKeydown($event)' },\n imports: [NgTemplateOutlet, BfCheckboxComponent, BfSelectComponent],\n // The wrapper scrolls sideways only when the columns cannot fit (a last resort: narrow screens\n // stack the rows with `stack`, or render them as a list, see the docs).\n template: `\n @if (stacks() && (selectable() || sortOptions().length > 0)) {\n <div data-bf-table-stack-bar [class]=\"stackBarClasses()\">\n @if (selectable()) {\n <bf-checkbox\n [size]=\"resolvedSize()\"\n [label]=\"selectAllName()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"entries().length === 0\"\n (changed)=\"selectAll($event)\"\n />\n }\n @if (sortOptions().length > 0) {\n <bf-select\n class=\"min-w-0 flex-1 basis-36\"\n [label]=\"labels.tableSortBy\"\n [options]=\"sortOptions()\"\n [value]=\"sortValue()\"\n (changed)=\"sortFromOption($event)\"\n />\n }\n </div>\n }\n <div data-bf-table-scroller class=\"max-w-full overflow-x-auto\">\n <table\n #table\n [attr.role]=\"stacks() ? 'table' : null\"\n [attr.aria-labelledby]=\"stacks() && label() ? captionId : null\"\n [class]=\"tableClasses()\"\n >\n @if (label()) {\n <caption class=\"sr-only\" [attr.id]=\"stacks() ? captionId : null\">\n {{\n label()\n }}\n </caption>\n }\n <thead [attr.role]=\"stacks() ? 'rowgroup' : null\" [class]=\"headClasses()\">\n <tr class=\"border-border border-b\" [attr.role]=\"stacks() ? 'row' : null\">\n @if (selectable()) {\n <th\n scope=\"col\"\n [attr.role]=\"stacks() ? 'columnheader' : null\"\n [class]=\"selectHeadClasses()\"\n >\n <bf-checkbox\n [class]=\"notStackedClasses()\"\n [size]=\"resolvedSize()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"entries().length === 0\"\n [ariaLabel]=\"selectAllName()\"\n (changed)=\"selectAll($event)\"\n />\n </th>\n }\n @for (column of columns(); track column.key) {\n <th\n scope=\"col\"\n [attr.role]=\"stacks() ? 'columnheader' : null\"\n [attr.data-bf-column]=\"column.key\"\n [attr.aria-sort]=\"ariaSort(column.key)\"\n [class]=\"headCellClasses(column)\"\n >\n @if (column.sortable) {\n <button type=\"button\" [class]=\"sortButtonClasses()\" (click)=\"sortBy(column.key)\">\n {{ column.label }}\n <span aria-hidden=\"true\" [class]=\"arrowClasses(column.key)\"></span>\n </button>\n @if (stacks()) {\n <span data-bf-stacked-label [class]=\"stackedOnlyClasses()\">{{\n column.label\n }}</span>\n }\n } @else {\n {{ column.label }}\n }\n </th>\n }\n </tr>\n </thead>\n <tbody [attr.role]=\"stacks() ? 'rowgroup' : null\" [class]=\"bodyGroupClasses()\">\n @for (entry of entries(); track entry.key) {\n <tr\n data-bf-table-row\n [attr.role]=\"stacks() ? 'row' : null\"\n [class]=\"rowClasses(entry.key)\"\n >\n @if (selectable()) {\n <td [attr.role]=\"stacks() ? 'cell' : null\" [class]=\"selectBodyClasses()\">\n <bf-checkbox\n [size]=\"resolvedSize()\"\n [checked]=\"selectedKeys().has(entry.key)\"\n [ariaLabelledby]=\"cellId(entry.index)\"\n (changed)=\"selectRow(entry.key, $event)\"\n />\n </td>\n }\n @for (column of columns(); track column.key; let first = $first) {\n <td\n data-bf-cell\n [attr.role]=\"stacks() ? 'cell' : null\"\n [attr.id]=\"first ? cellId(entry.index) : null\"\n [attr.data-label]=\"stacks() && !first ? column.label : null\"\n [class]=\"bodyClasses(column, first)\"\n >\n @if (templates().get(column.key); as template) {\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { $implicit: entry.row, index: entry.index }\n \"\n />\n } @else {\n {{ cellText(entry.row, column.key) }}\n }\n </td>\n }\n </tr>\n } @empty {\n <tr\n data-bf-table-empty\n [attr.role]=\"stacks() ? 'row' : null\"\n [class]=\"stackEmptyClasses()\"\n >\n <td\n [attr.role]=\"stacks() ? 'cell' : null\"\n [attr.colspan]=\"columnCount()\"\n [class]=\"stackEmptyClasses()\"\n >\n <ng-content select=\"[bfSlot=empty]\" />\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n `,\n})\nexport class BfTableComponent<T = unknown> {\n /** The rows to show, already sorted and filtered by the consumer. */\n readonly rows = input.required<readonly T[]>();\n /** The columns, in order. */\n readonly columns = input.required<readonly BfTableColumn[]>();\n /** The unique string key of a row, used for `selection` and to track rows; by default the\n * row's `id` (a string or a number), else its index. */\n readonly rowKey = input<BfTableRowKey<T>>(idRowKey);\n /** The table's name, rendered as a visually hidden `caption`. */\n readonly label = input('');\n /** The sorted column and direction, `null` while unsorted; two-way bindable. A sortable header\n * sets it, and the consumer sorts `rows` from it. */\n readonly sort = model<BfTableSort | null>(null);\n /** Adds a first column of checkboxes that select rows. */\n readonly selectable = input(false, { transform: booleanAttribute });\n /** The keys (`rowKey`) of the selected rows; two-way bindable. */\n readonly selection = model<readonly string[]>([]);\n /** Accessible name of the header checkbox; empty falls back to `provideBfLabels()`'s\n * `tableSelectAll` (\"Select all rows\"). */\n readonly selectAllLabel = input('');\n /** Row height step: sm 40, md 48, lg 56 px (the header 32/40/48; at least 44 px under a coarse\n * pointer); unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** When the rows render as cards of label/value pairs: `never`, `narrow` (the table is\n * narrower than 36rem) or `coarse` (under a coarse pointer, at any width). */\n readonly stack = input<BfTableStack>('never');\n\n protected readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly table = viewChild.required<ElementRef<HTMLTableElement>>('table');\n private readonly cells = contentChildren<BfTableCellDirective>(BfTableCellDirective);\n private readonly id = uniqueId('bf-table');\n /** The caption's id, which names the table while it can stack. */\n protected readonly captionId = `${this.id}-caption`;\n\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The header checkbox's name: `selectAllLabel`, else the `tableSelectAll` label. */\n protected readonly selectAllName = computed(\n () => this.selectAllLabel() || this.labels.tableSelectAll,\n );\n /** Each row with its key (the `rowKey`, else its index) and its index. */\n protected readonly entries = computed<BfTableEntry<T>[]>(() => {\n const rowKey = this.rowKey();\n return this.rows().map((row, index) => ({ row, key: rowKey(row) || String(index), index }));\n });\n /** The custom cell template of each column key. */\n protected readonly templates = computed(\n () =>\n new Map<string, TemplateRef<BfTableCellContext<unknown>>>(\n this.cells().map((cell) => [cell.bfTableCell(), cell.template]),\n ),\n );\n protected readonly selectedKeys = computed(() => new Set(this.selection()));\n /** Whether every row is selected (and there is at least one). */\n protected readonly allSelected = computed(() => {\n const entries = this.entries();\n const selected = this.selectedKeys();\n return entries.length > 0 && entries.every((entry) => selected.has(entry.key));\n });\n /** Whether some rows, but not all, are selected: the header checkbox is mixed. */\n protected readonly someSelected = computed(() => {\n const selected = this.selectedKeys();\n return !this.allSelected() && this.entries().some((entry) => selected.has(entry.key));\n });\n /** The number of columns, the selection column included: the empty row's `colspan`. */\n protected readonly columnCount = computed(\n () => this.columns().length + (this.selectable() ? 1 : 0),\n );\n /** Whether the table can stack its rows (any `stack` but `never`); it then sets explicit\n * table roles, because some browsers drop a table's semantics once its display changes. */\n protected readonly stacks = computed(() => this.stack() !== 'never');\n /** The Sort by select's options: each sortable column ascending and descending. */\n protected readonly sortOptions = computed<BfSelectOption[]>(() =>\n this.columns()\n .filter((column) => column.sortable)\n .flatMap((column) => [\n { value: `${column.key}:ascending`, label: this.labels.tableSortAscending(column.label) },\n { value: `${column.key}:descending`, label: this.labels.tableSortDescending(column.label) },\n ]),\n );\n /** The Sort by select's value: the option of `sort`, `null` while unsorted. */\n protected readonly sortValue = computed(() => {\n const sort = this.sort();\n return sort ? `${sort.column}:${sort.direction}` : null;\n });\n protected readonly hostClasses = computed(() => STACK_HOST[this.stack()]);\n protected readonly stackBarClasses = computed(\n () => `${STACK_BAR[this.stack()]} flex-wrap items-end justify-between gap-x-4 gap-y-2 pb-3`,\n );\n protected readonly tableClasses = computed(\n () => `w-full border-collapse ${STACK_TABLE[this.stack()]}`,\n );\n protected readonly headClasses = computed(() => STACK_HEAD[this.stack()]);\n protected readonly bodyGroupClasses = computed(\n () => `divide-border divide-y ${STACK_BODY[this.stack()]}`,\n );\n protected readonly sortButtonClasses = computed(\n () => `${SORT_BUTTON} ${STACK_NEVER[this.stack()]}`,\n );\n protected readonly notStackedClasses = computed(() => STACK_NEVER[this.stack()]);\n protected readonly stackedOnlyClasses = computed(() => STACK_ONLY[this.stack()]);\n protected readonly stackEmptyClasses = computed(() => STACK_EMPTY[this.stack()]);\n protected readonly selectHeadClasses = computed(\n () => `${HEAD_BASE} ${HEAD_CELL[this.resolvedSize()]} ${SELECT_CELL}`,\n );\n protected readonly selectBodyClasses = computed(\n () => `${BODY_BASE} ${this.bodyHeight()} ${SELECT_CELL} ${STACK_SELECT_CELL[this.stack()]}`,\n );\n /** A body cell's height step, with the coarse-pointer height unless the table stacks there. */\n private readonly bodyHeight = computed(() => {\n const size = this.resolvedSize();\n const touch = size === 'sm' ? BODY_TOUCH[this.stack()] : '';\n return touch ? `${BODY_CELL[size]} ${touch}` : BODY_CELL[size];\n });\n\n /**\n * The classes of a column's header cell.\n * @internal\n */\n headCellClasses(column: BfTableColumn): string {\n return `${HEAD_BASE} ${HEAD_CELL[this.resolvedSize()]} ${ALIGN[column.align ?? 'start']}`;\n }\n\n /**\n * The classes of a column's body cell; the first one is a stacked tile's title.\n * @internal\n */\n bodyClasses(column: BfTableColumn, first: boolean): string {\n const stacked = (first ? STACK_FIRST_CELL : STACK_CELL)[this.stack()];\n return `${BODY_BASE} ${this.bodyHeight()} ${ALIGN[column.align ?? 'start']} ${stacked}`.trim();\n }\n\n /**\n * The classes of the body row with this key.\n * @internal\n */\n rowClasses(key: string): string {\n const state: BfTableRowState = this.selectedKeys().has(key)\n ? 'selected'\n : this.selectable()\n ? 'selectable'\n : 'static';\n const stack = this.stack();\n const tile = [\n STACK_ROW[stack],\n this.selectable() ? STACK_ROW_SELECTABLE[stack] : '',\n state === 'selected' ? '' : STACK_ROW_FILL[stack],\n ]\n .filter(Boolean)\n .join(' ');\n return `transition-colors ${ROW[state]} ${tile}`.trim();\n }\n\n /**\n * The classes of a sortable header's arrow mark.\n * @internal\n */\n arrowClasses(key: string): string {\n const sort = this.sort();\n return `${ARROW_BASE} ${ARROW[sort?.column === key ? sort.direction : 'none']}`;\n }\n\n /**\n * The `aria-sort` of a column's header: its direction while sorted, else none.\n * @internal\n */\n ariaSort(key: string): BfTableSortDirection | null {\n const sort = this.sort();\n return sort?.column === key ? sort.direction : null;\n }\n\n /**\n * The id of a row's first data cell, which names the row's checkbox.\n * @internal\n */\n cellId(index: number): string {\n return `${this.id}-row-${index}`;\n }\n\n /**\n * The default text of a cell: the row's property `key` when it is a string, number or boolean,\n * else empty (render an object, such as a date, with a `bfTableCell` template).\n * @internal\n */\n cellText(row: T, key: string): string {\n const value = readProperty(row, key);\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'bigint'\n ? String(value)\n : '';\n }\n\n /**\n * Sorts by the column with this key: ascending first, then descending and ascending again.\n * @param key The column's `key`.\n */\n sortBy(key: string): void {\n const sort = this.sort();\n const direction: BfTableSortDirection =\n sort?.column === key && sort.direction === 'ascending' ? 'descending' : 'ascending';\n this.sort.set({ column: key, direction });\n }\n\n /**\n * Sorts by a Sort by option (`<key>:<direction>`) of a stacked table.\n * @internal\n */\n sortFromOption(value: string): void {\n const at = value.lastIndexOf(':');\n const direction = value.slice(at + 1);\n if (at > 0 && (direction === 'ascending' || direction === 'descending')) {\n this.sort.set({ column: value.slice(0, at), direction });\n }\n }\n\n /**\n * Selects or clears every row; keys of rows not shown stay as they are.\n * @param selected True to select every row, false to clear them.\n */\n selectAll(selected: boolean): void {\n const keys = this.entries().map((entry) => entry.key);\n const shown = new Set(keys);\n const kept = this.selection().filter((key) => !shown.has(key));\n this.selection.set(selected ? [...kept, ...keys] : kept);\n }\n\n /**\n * Selects or clears one row.\n * @param key The row's key.\n * @param selected True to select it, false to clear it.\n */\n selectRow(key: string, selected: boolean): void {\n const rest = this.selection().filter((k) => k !== key);\n this.selection.set(selected ? [...rest, key] : rest);\n }\n\n /**\n * ArrowUp / ArrowDown on a button, link or checkbox in a row move focus to the control at the\n * same place in the nearest row above or below that has one.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {\n return;\n }\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\n return;\n }\n const target = event.target;\n if (!(target instanceof HTMLElement) || !target.matches(FOCUSABLE)) {\n return;\n }\n if (OWN_ARROWS.has(target.getAttribute('role') ?? '')) {\n return;\n }\n const table = this.table().nativeElement;\n const cell = target.closest('td, th');\n const row = cell?.parentElement;\n if (!(cell instanceof HTMLTableCellElement) || !(row instanceof HTMLTableRowElement)) {\n return;\n }\n if (cell.closest('table') !== table) {\n return;\n }\n const position = [...cell.querySelectorAll(FOCUSABLE)].indexOf(target);\n const rows = [...table.rows];\n const step = event.key === 'ArrowDown' ? 1 : -1;\n for (let i = rows.indexOf(row) + step; i >= 0 && i < rows.length; i += step) {\n const controls = [...(rows[i]?.cells[cell.cellIndex]?.querySelectorAll(FOCUSABLE) ?? [])];\n const next = controls[Math.min(position, controls.length - 1)];\n // A stacked table hides the header row's checkbox; skip it.\n if (next instanceof HTMLElement && next.checkVisibility?.() !== false) {\n event.preventDefault();\n next.focus();\n return;\n }\n }\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * The layout of a `bf-description-list`: `rows` (label beside value, divided) or `grid` (tiles).\n *\n * @summary The two description list layouts, divided label-value rows or a grid of tiles\n * @since 0.3.1\n */\nexport type BfDescriptionListLayout = 'rows' | 'grid';\n\n/** What a `div[bfDescriptionItem]` reads from its `bf-description-list`. */\nexport interface BfDescriptionListHost {\n /** The list's layout. */\n readonly layout: Signal<BfDescriptionListLayout>;\n}\n\n/**\n * Provided by `bf-description-list` so each `div[bfDescriptionItem]` styles itself for the list's\n * layout, without `description-item.component.ts` importing `description-list.component.ts`.\n */\nexport const BF_DESCRIPTION_LIST = new InjectionToken<BfDescriptionListHost>('BF_DESCRIPTION_LIST');\n","import { Component, computed, input } from '@angular/core';\nimport {\n BF_DESCRIPTION_LIST,\n type BfDescriptionListHost,\n type BfDescriptionListLayout,\n} from './description-list.token';\n\n/* `rows`: a `border` line between the items, as a divided `bf-list`. `grid`: as many columns of at\n least 10rem as fit, so the tiles wrap without a breakpoint. The host is an inline-size\n container: the rows put label and value side by side only once the list itself is 28rem wide\n (`@md:` on the item), so a narrow pane stacks them whatever the viewport. */\nconst LAYOUT: Record<BfDescriptionListLayout, string> = {\n rows: 'flex flex-col divide-y divide-border',\n grid: 'grid grid-cols-[repeat(auto-fit,minmax(10rem,1fr))] gap-x-6 gap-y-4',\n};\n\n/**\n * A list of label-value pairs, such as a record's details: a native `dl` around\n * `div[bfDescriptionItem]`s, as divided rows (label beside value) or a grid of tiles.\n *\n * @example\n * <bf-description-list>\n * <div bfDescriptionItem label=\"Cuisine\">Italian</div>\n * <div bfDescriptionItem label=\"Difficulty\"><bf-badge variant=\"success\">Easy</bf-badge></div>\n * </bf-description-list>\n * @summary Native description list of label-value pairs, as divided rows or a tile grid\n * @category Data display\n * @since 0.3.1\n * @slot default The pairs, each a `div[bfDescriptionItem]`.\n */\n@Component({\n selector: 'bf-description-list',\n host: { class: 'block @container' },\n // Tells the projected items which layout to draw.\n providers: [{ provide: BF_DESCRIPTION_LIST, useExisting: BfDescriptionListComponent }],\n template: `<dl [class]=\"classes()\"><ng-content /></dl>`,\n})\nexport class BfDescriptionListComponent implements BfDescriptionListHost {\n /** `rows` (default): label beside value, divided, stacked in a narrow list; `grid`: tiles with the label over the value. */\n readonly layout = input<BfDescriptionListLayout>('rows');\n\n readonly classes = computed(() => LAYOUT[this.layout()]);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { BF_DESCRIPTION_LIST, type BfDescriptionListLayout } from './description-list.token';\n\n/* `rows`: label over value until the list is 28rem wide (`@md:`, the list is the container), then\n a one-third label column beside the value, on a shared baseline. `grid`: a tile, label over\n value. */\nconst ITEM: Record<BfDescriptionListLayout, string> = {\n rows: 'grid gap-1 py-3 @md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] @md:items-baseline @md:gap-4',\n grid: 'flex min-w-0 flex-col gap-1',\n};\n\n/**\n * One label-value pair of a `bf-description-list`: the `label` becomes the `dt`, the content the\n * `dd`. Put it on a `div` inside the list.\n *\n * @example\n * <bf-description-list>\n * <div bfDescriptionItem label=\"Servings\">4</div>\n * </bf-description-list>\n * @summary One label and value pair of a description list, label as term, content as value\n * @category Data display\n * @since 0.3.1\n * @slot default The value: text or rich content such as a badge or a link.\n */\n@Component({\n selector: 'div[bfDescriptionItem]',\n host: { '[class]': 'classes()' },\n template: `\n <dt class=\"text-caption text-text-muted\">{{ label() }}</dt>\n <dd class=\"text-body text-text ms-0 min-w-0 wrap-anywhere\"><ng-content /></dd>\n `,\n})\nexport class BfDescriptionItemComponent {\n /** The term, shown as the pair's label. */\n readonly label = input.required<string>();\n\n /** The enclosing list, which sets the layout; `rows` outside a list. */\n private readonly list = inject(BF_DESCRIPTION_LIST, { optional: true });\n\n readonly classes = computed(() => ITEM[this.list?.layout() ?? 'rows']);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The surface of a `bf-stat`: plain (on whatever holds it) or card (its own outlined tile).\n *\n * @summary The two stat surfaces, plain on its container or an outlined card tile\n * @since 0.3.1\n */\nexport type BfStatVariant = 'plain' | 'card';\n\n/**\n * The surface of a `bf-stat`, as its `variant` input takes it: a `BfStatVariant` or tile (a\n * sunken, borderless tile for a stats row inside a raised card). A new type, so `Record`s over\n * the released `BfStatVariant` keep compiling.\n *\n * @summary The three stat surfaces, plain, an outlined card or a sunken tile\n * @since 0.3.2\n */\nexport type BfStatAppearance = BfStatVariant | 'tile';\n\n/**\n * The direction of a `bf-stat` delta: up, down or flat (no change).\n *\n * @summary The three directions of a stat's delta pill, up, down or no change\n * @since 0.3.1\n */\nexport type BfStatTrend = 'up' | 'down' | 'flat';\n\n/**\n * Which direction of a `bf-stat` delta is good: positive (up is good, such as revenue) or\n * negative (down is good, such as costs or churn).\n *\n * @summary Whether a rising or a falling figure is the good news for a stat\n * @since 0.3.1\n */\nexport type BfStatTrendIntent = 'positive' | 'negative';\n\ntype DeltaTone = 'good' | 'bad' | 'neutral';\n\n/* `h-full`: in a grid of stats every card stretches to the row's height. */\nconst BASE = 'flex h-full items-start gap-3 text-start';\n/* `card` is the `flat` bf-card surface: `surface`, the card radius and padding, a 1.5 px\n `border-strong` edge. `tile` is one level down, for a row inside a raised card: `surface-sunken`\n with the card radius and padding and no border. */\nconst VARIANT: Record<BfStatAppearance, string> = {\n plain: '',\n card: 'rounded-card bg-surface p-card border-[1.5px] border-border-strong',\n tile: 'rounded-card bg-surface-sunken p-card',\n};\n/* The icon tile is sunken; on a sunken stat tile it takes the raised `surface` instead, so it\n still shows. */\nconst ICON_TILE =\n 'rounded-tile text-text-muted flex size-10 shrink-0 items-center justify-center empty:hidden';\nconst ICON_TILE_SURFACE: Record<BfStatAppearance, string> = {\n plain: 'bg-surface-sunken',\n card: 'bg-surface-sunken',\n tile: 'bg-surface',\n};\n/* The delta pill sits in the value's dd, so it is read with the value. It takes the badge's label\n shape and type and is toned by whether the change is good. */\nconst DELTA_BASE =\n 'inline-flex items-center gap-1 rounded-control px-2 py-1 text-micro font-bold leading-none tabular-nums';\nconst DELTA_TONE: Record<DeltaTone, string> = {\n good: 'bg-success-soft text-success',\n bad: 'bg-danger-soft text-danger',\n neutral: 'bg-neutral-soft text-neutral',\n};\n/* The arrow mark, drawn with borders in `currentColor` (so it shows in forced colours): a chevron\n rotated to point up or down, or a dash for no change. Vertical, so it never mirrors in RTL. */\nconst MARK: Record<BfStatTrend, string> = {\n up: 'size-1.5 shrink-0 translate-y-0.5 rotate-45 border-t-[1.5px] border-l-[1.5px] border-current',\n down: 'size-1.5 shrink-0 -translate-y-0.5 rotate-45 border-b-[1.5px] border-r-[1.5px] border-current',\n flat: 'w-2 shrink-0 border-t-[1.5px] border-current',\n};\n\n/**\n * One figure with its label, such as a count, a duration or a total: a native `dl` pair with the\n * value set large, an optional icon tile at the start and a supporting line under the value.\n *\n * A `delta` with a `trend` adds a pill beside the value, toned by `trendIntent`.\n *\n * @example\n * <bf-stat label=\"Revenue\" value=\"€48,200\" delta=\"+12%\" trend=\"up\" />\n * <bf-stat label=\"Orders\" value=\"1,204\" variant=\"tile\" />\n * <bf-stat label=\"Cook time\" value=\"30 min\" variant=\"card\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Flame\" />\n * Oven at 200 °C\n * </bf-stat>\n * @summary One labelled figure with an optional icon tile and a supporting line\n * @category Data display\n * @since 0.3.1\n * @slot icon The icon in the tile at the start.\n * @slot default A supporting line under the value, such as a trend or a badge.\n */\n@Component({\n selector: 'bf-stat',\n host: { class: 'block' },\n template: `\n <div [class]=\"classes()\">\n <span data-tile [class]=\"iconTileClasses()\"><ng-content select=\"[bfSlot=icon]\" /></span>\n <dl class=\"flex min-w-0 flex-col gap-1\">\n <dt class=\"text-caption text-text-muted\">{{ label() }}</dt>\n <dd\n class=\"text-title text-text ms-0 flex flex-wrap items-center gap-x-2 gap-y-1 wrap-anywhere tabular-nums\"\n >\n {{ value() }}\n @if (delta()) {\n <span data-delta [class]=\"deltaClasses()\">\n @if (trend()) {\n <span aria-hidden=\"true\" [class]=\"markClasses()\"></span\n ><span class=\"sr-only\">{{ trendWord() }} </span>\n }\n {{ delta() }}</span\n >\n }\n </dd>\n <dd class=\"text-caption text-text-muted ms-0 empty:hidden\"><ng-content /></dd>\n </dl>\n </div>\n `,\n})\nexport class BfStatComponent {\n /** What the figure measures, shown above it. */\n readonly label = input.required<string>();\n /** The figure, already formatted (`45 min`, `1,204`, `98%`). */\n readonly value = input.required<string>();\n /** Surface: plain (default) on its container, card (an outlined tile) or tile (sunken, no border). */\n readonly variant = input<BfStatAppearance>('plain');\n\n /** A change shown in a pill beside the value, already formatted (`+12%`); empty shows none. */\n readonly delta = input('');\n /** The delta's direction: an arrow mark and a hidden word; left unset, the pill is neutral. */\n readonly trend = input<BfStatTrend | undefined>(undefined);\n /** Whether up is good (positive, default) or down is good (negative, such as costs). */\n readonly trendIntent = input<BfStatTrendIntent>('positive');\n\n private readonly labels = inject(BF_LABELS);\n\n readonly classes = computed(() => [BASE, VARIANT[this.variant()]].filter(Boolean).join(' '));\n\n /** @internal */\n readonly iconTileClasses = computed(() => `${ICON_TILE} ${ICON_TILE_SURFACE[this.variant()]}`);\n\n /** @internal */\n readonly deltaClasses = computed(() => {\n const trend = this.trend();\n const tone: DeltaTone =\n trend === undefined || trend === 'flat'\n ? 'neutral'\n : (trend === 'up') === (this.trendIntent() === 'positive')\n ? 'good'\n : 'bad';\n return `${DELTA_BASE} ${DELTA_TONE[tone]}`;\n });\n\n /** @internal */\n readonly markClasses = computed(() => {\n const trend = this.trend();\n return trend ? MARK[trend] : '';\n });\n\n /** @internal The direction read before the delta, so colour is never the only signal. */\n readonly trendWord = computed(() => {\n const words: Record<BfStatTrend, string> = {\n up: this.labels.statTrendUp,\n down: this.labels.statTrendDown,\n flat: this.labels.statTrendFlat,\n };\n const trend = this.trend();\n return trend ? words[trend] : '';\n });\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * What a `li[bfBreadcrumbItem]` reads from its enclosing `bf-breadcrumb`, provided through an\n * injection token so `breadcrumb.component.ts` and `breadcrumb-item.component.ts` never import each\n * other. Both methods read signals, so an item calls them in a `computed()`.\n */\nexport interface BfBreadcrumbTrail {\n /**\n * Whether `item` is the last item of the trail: the current page.\n * @param item The item asking.\n */\n isCurrent(item: object): boolean;\n /**\n * Whether `item` is one of the middle items a collapsed trail hides behind its ellipsis.\n * @param item The item asking.\n */\n isHidden(item: object): boolean;\n}\n\n/** Provided by `bf-breadcrumb` for the items projected into it. */\nexport const BF_BREADCRUMB = new InjectionToken<BfBreadcrumbTrail>('BF_BREADCRUMB');\n","import { Component, ElementRef, computed, inject } from '@angular/core';\nimport { BF_BREADCRUMB } from './breadcrumb.token';\n\n/* The wrapper around the consumer's content. A projected `<a>` (a direct child) takes the link\n look: text-muted, text with an underline on hover, the focus ring. It is at least 24 px tall\n under a fine pointer and 44 px under a coarse one (a min height, never an ::after, because it\n projects consumer content). Every level is padded 4 px (px-1) and a link cancels it (-mx-1) and\n pads itself instead, so a link's text lines up with a plain-text level, its ring gets room and\n it never overflows the item. Long labels wrap anywhere, so nothing is lost at large text sizes. */\ntype BfBreadcrumbItemState = 'ancestor' | 'current';\nconst CONTENT: Record<BfBreadcrumbItemState, string> = {\n ancestor:\n 'inline-flex min-w-0 items-center px-1 wrap-anywhere text-text-muted ' +\n '[&>a]:-mx-1 [&>a]:inline-flex [&>a]:min-h-6 [&>a]:items-center [&>a]:rounded-tile [&>a]:px-1 ' +\n '[&>a]:text-text-muted [&>a]:underline-offset-4 [&>a]:transition-colors ' +\n '[&>a]:hover:text-text [&>a]:hover:underline ' +\n '[&>a]:focus-visible:ring-4 [&>a]:focus-visible:ring-ring [&>a]:focus-visible:outline-hidden ' +\n '[&>a]:pointer-coarse:min-h-hit',\n current: 'inline-flex min-w-0 items-center px-1 wrap-anywhere font-semibold text-text',\n};\n\n/* The separator after every item but the current page: a CSS chevron (two borders of a rotated\n square) pointing to the inline end, mirrored under dir=\"rtl\". Not an icon, which a widget never\n imports, and aria-hidden, so it is never announced. */\nexport const BREADCRUMB_SEPARATOR =\n 'size-1.5 shrink-0 rotate-45 border-t-[1.5px] border-r-[1.5px] border-text-subtle rtl:-rotate-135';\n\n/**\n * One level of a `bf-breadcrumb` trail, on the consumer's own `<li>` so the list stays `ol > li`.\n * Project an `<a routerLink>` for an ancestor page, or plain text for the current page; the last\n * item is the current page (`aria-current=\"page\"`, no link look, no separator), every other one is\n * followed by a chevron.\n *\n * @example\n * <li bfBreadcrumbItem><a routerLink=\"/projects\">Projects</a></li>\n * <li bfBreadcrumbItem>Atlas</li>\n * @summary One level of a breadcrumb trail: a link, or the current page as text\n * @category Navigation\n * @since 0.3.1\n * @slot default The level: an `<a>` link to the page, or plain text for the current page.\n */\n@Component({\n selector: 'li[bfBreadcrumbItem]',\n host: {\n class: 'inline-flex min-w-0 items-center gap-2',\n '[attr.hidden]': 'hidden() ? \"\" : null',\n },\n template: `\n <span [attr.aria-current]=\"current() ? 'page' : null\" [class]=\"classes()\"><ng-content /></span>\n @if (!current()) {\n <span aria-hidden=\"true\" data-bf-separator [class]=\"separator\"></span>\n }\n `,\n})\nexport class BfBreadcrumbItemComponent {\n private readonly trail = inject(BF_BREADCRUMB);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether this item is the last of the trail, the current page. */\n readonly current = computed(() => this.trail.isCurrent(this));\n /** Whether a collapsed trail hides this item behind its ellipsis. */\n readonly hidden = computed(() => this.trail.isHidden(this));\n\n protected readonly classes = computed(() => CONTENT[this.current() ? 'current' : 'ancestor']);\n protected readonly separator = BREADCRUMB_SEPARATOR;\n\n /**\n * Moves keyboard focus to the item's link (or other focusable content); an item without one\n * takes focus itself through `tabindex=\"-1\"`. Called by `bf-breadcrumb` after the ellipsis\n * reveals the hidden levels.\n * @internal\n */\n focus(): void {\n const host = this.host.nativeElement;\n const target = host.querySelector<HTMLElement>('a[href], button, [tabindex]');\n if (target) {\n target.focus();\n return;\n }\n host.setAttribute('tabindex', '-1');\n host.focus();\n }\n}\n","import {\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n afterRenderEffect,\n computed,\n contentChildren,\n inject,\n input,\n linkedSignal,\n numberAttribute,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { COARSE_HIT_BASE } from '../_shared/hit-classes';\nimport { BREADCRUMB_SEPARATOR, BfBreadcrumbItemComponent } from './breadcrumb-item.component';\nimport { BF_BREADCRUMB, type BfBreadcrumbTrail } from './breadcrumb.token';\n\n/* The ellipsis button: 24 px under a fine pointer, extended to 44 px tall by an ::after under a\n coarse one (a self-contained control). A `bfSlot=\"overflow\"` element projected before it (a\n menu button of the hidden levels) replaces it: the sibling selector hides the button whenever\n the slot wrapper is not empty. */\nconst EXPAND =\n 'relative inline-flex h-6 min-w-6 cursor-pointer items-center justify-center rounded-tile px-1.5 ' +\n 'font-bold leading-none text-text-muted transition-colors hover:bg-surface-muted hover:text-text ' +\n 'active:bg-surface-pressed focus-visible:ring-4 focus-visible:ring-ring focus-visible:outline-hidden ' +\n '[[data-bf-overflow]:not(:empty)+&]:hidden ' +\n `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-2.5`;\n\n/**\n * Desktop breadcrumb trail: a `nav` named \"Breadcrumb\" around an ordered list of\n * `li[bfBreadcrumbItem]` levels, the last one the current page, a CSS chevron between them. With\n * `maxItems` set and a longer trail it keeps the first level and the last `maxItems - 1`, and hides\n * the middle ones behind an ellipsis button that shows them in place, or behind the consumer's own\n * `bfSlot=\"overflow\"` content (a menu button of the hidden levels).\n *\n * @example\n * <bf-breadcrumb [maxItems]=\"3\">\n * <li bfBreadcrumbItem><a routerLink=\"/\">Home</a></li>\n * <li bfBreadcrumbItem><a routerLink=\"/projects\">Projects</a></li>\n * <li bfBreadcrumbItem><a routerLink=\"/projects/atlas\">Atlas</a></li>\n * <li bfBreadcrumbItem>Settings</li>\n * </bf-breadcrumb>\n * @summary Desktop breadcrumb trail of links to the current page, with optional collapsing\n * @category Navigation\n * @since 0.3.1\n * @slot default The levels, each a `li[bfBreadcrumbItem]`, the current page last.\n * @slot overflow Replaces the ellipsis button of a collapsed trail, e.g. a menu of the hidden levels.\n */\n@Component({\n selector: 'bf-breadcrumb',\n host: { class: 'block' },\n providers: [{ provide: BF_BREADCRUMB, useExisting: BfBreadcrumbComponent }],\n template: `\n <nav [attr.aria-label]=\"name()\">\n <ol class=\"text-label-sm flex flex-wrap items-center gap-x-2 gap-y-1\">\n <!-- Moved after the first item once rendered (see the constructor). -->\n <li\n #more\n data-bf-breadcrumb-more\n class=\"inline-flex items-center gap-2\"\n [attr.hidden]=\"hiddenCount() > 0 ? null : ''\"\n >\n <span data-bf-overflow class=\"contents\"><ng-content select=\"[bfSlot=overflow]\" /></span>\n <button\n type=\"button\"\n [attr.aria-label]=\"expandLabel()\"\n [class]=\"expandClasses\"\n (click)=\"expand()\"\n >\n …\n </button>\n <span aria-hidden=\"true\" data-bf-separator [class]=\"separator\"></span>\n </li>\n <ng-content />\n </ol>\n </nav>\n `,\n})\nexport class BfBreadcrumbComponent implements BfBreadcrumbTrail {\n private readonly labels = inject(BF_LABELS);\n private readonly injector = inject(Injector);\n\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `breadcrumb`\n * (\"Breadcrumb\"). */\n readonly label = input('');\n /**\n * Collapse a trail longer than this: keep the first level and the last `maxItems - 1` and hide\n * the middle ones behind an ellipsis. `0` never collapses; values below 2 act as 2, so the\n * current page always stays.\n */\n readonly maxItems = input(0, { transform: numberAttribute });\n\n /** The rendered navigation name: `label`, else the `breadcrumb` label. */\n protected readonly name = computed(() => this.label() || this.labels.breadcrumb);\n\n private readonly items = contentChildren(BfBreadcrumbItemComponent);\n private readonly itemElements = contentChildren(BfBreadcrumbItemComponent, {\n read: ElementRef,\n });\n private readonly more = viewChild.required<ElementRef<HTMLElement>>('more');\n\n /* Reset when the trail changes (a new page), so a long trail starts collapsed again. */\n private readonly expanded = linkedSignal({ source: this.items, computation: () => false });\n\n /** How many middle levels the trail hides right now; 0 when it shows all of them. */\n readonly hiddenCount = computed(() => {\n const max = this.maxItems();\n const count = this.items().length;\n if (this.expanded() || !(max > 0)) {\n return 0;\n }\n const keep = Math.max(2, Math.floor(max));\n return count > keep ? count - keep : 0;\n });\n\n protected readonly expandLabel = computed(() => this.labels.breadcrumbExpand(this.hiddenCount()));\n protected readonly expandClasses = EXPAND;\n protected readonly separator = BREADCRUMB_SEPARATOR;\n\n constructor() {\n /* The ellipsis item is rendered by this template but belongs after the first projected level,\n which content projection cannot interleave: move it there after each render that changes the\n levels (and so it stays in the reading and Tab order between them). */\n afterRenderEffect({\n write: () => {\n const first = this.itemElements()[0]?.nativeElement as HTMLElement | undefined;\n const more = this.more().nativeElement;\n if (first && first.nextElementSibling !== more) {\n first.after(more);\n }\n },\n });\n }\n\n /**\n * Whether `item` is the last level, the current page.\n * @internal\n */\n isCurrent(item: object): boolean {\n const items = this.items();\n return items.length > 0 && items[items.length - 1] === item;\n }\n\n /**\n * Whether `item` is one of the middle levels the collapsed trail hides.\n * @internal\n */\n isHidden(item: object): boolean {\n const index = this.items().indexOf(item as BfBreadcrumbItemComponent);\n return index >= 1 && index <= this.hiddenCount();\n }\n\n /**\n * Shows every level in place and moves focus to the first one it revealed (its link).\n * @internal\n */\n expand(): void {\n const firstHidden = this.items()[1];\n this.expanded.set(true);\n afterNextRender({ write: () => firstHidden?.focus() }, { injector: this.injector });\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/** Where a nav item sits: a vertical sidebar or a horizontal top row. */\nexport type BfNavLayout = 'sidebar' | 'top';\n\n/** What `a[bfNavItem]`, `bf-nav-group` and `bf-sidebar-toggle` read from the enclosing `bf-sidebar`\n * or `bf-top-nav`. */\nexport interface BfNavHost {\n /** The host's layout: full-width rows in a sidebar, inline items in a top row. */\n readonly layout: BfNavLayout;\n /** True while the sidebar is collapsed to an icon rail; always false in a top nav. */\n readonly collapsed: Signal<boolean>;\n /** The id of the host's `nav` element (for a toggle's `aria-controls`); null in a top nav. */\n readonly navId: string | null;\n /** Writes the sidebar's `collapsed` model, as a user change; does nothing in a top nav. */\n setCollapsed(collapsed: boolean): void;\n}\n\n/**\n * Provided by `bf-sidebar` and `bf-top-nav`, so their items and groups follow the layout and the\n * collapsed state without the item files importing the container files. `bf-sidebar-toggle`\n * (`@bitforgehq/ui/overlay`) reads and flips the state through it, as the internal `ɵBF_NAV`.\n */\nexport const BF_NAV = new InjectionToken<BfNavHost>('BF_NAV');\n","import { Component, computed, inject, input, model } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_NAV, type BfNavHost } from './nav.token';\n\n/* Display and width on the host only, so a consumer's `hidden md:flex` decides the display (in\n the stylesheet `hidden` comes after `flex`). Collapsed, the width follows the icon rail. */\ntype BfSidebarWidth = 'expanded' | 'collapsed';\nconst HOST: Record<BfSidebarWidth, string> = {\n expanded: 'flex shrink-0 flex-col w-60',\n collapsed: 'flex shrink-0 flex-col w-auto',\n};\n\n/* The default region scrolls on its own; its 4 px padding (pulled back with a negative margin)\n keeps the items' focus ring inside the scroll box, which would clip it. Collapsed, every region\n centres its content in the rail. */\nconst REGION: Record<BfSidebarWidth, string> = {\n expanded: 'items-stretch',\n collapsed: 'items-center',\n};\n\n/**\n * The vertical navigation of a desktop app: a `nav` landmark with a `header` slot (the brand),\n * the destinations (`a[bfNavItem]` links, optionally in `bf-nav-group`s) and a `footer` slot.\n * `collapsed` turns it into an icon rail: put a `bf-sidebar-toggle` (`@bitforgehq/ui/overlay`) in\n * it, or bind `[(collapsed)]` to your own button. Below a breakpoint hide it\n * (`class=\"hidden md:flex\"`) and drive a `bf-menu-button` from the same routes.\n *\n * @example\n * <bf-sidebar label=\"Main\" [(collapsed)]=\"collapsed\" class=\"hidden md:flex\">\n * <a bfSlot=\"header\" routerLink=\"/\">Atlas</a>\n * <bf-nav-group label=\"Workspace\">\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Inbox\" />\n * Inbox\n * </a>\n * </bf-nav-group>\n * </bf-sidebar>\n * @summary Vertical app navigation with brand, grouped links, footer and an icon rail mode\n * @category Navigation\n * @since 0.3.1\n * @slot header The brand or app switcher above the destinations.\n * @slot default The destinations: `a[bfNavItem]` links and `bf-nav-group`s.\n * @slot footer Content under the destinations, such as settings or the account.\n */\n@Component({\n selector: 'bf-sidebar',\n host: { '[class]': 'hostClasses()', '[attr.data-collapsed]': \"collapsed() ? '' : null\" },\n // The items and groups read the layout and the collapsed state through BF_NAV, so this file\n // and theirs never import each other.\n providers: [\n {\n provide: BF_NAV,\n useFactory: (): BfNavHost => {\n const sidebar = inject(BfSidebarComponent);\n return {\n layout: 'sidebar',\n collapsed: sidebar.collapsed,\n navId: sidebar.navId,\n setCollapsed: (collapsed) => sidebar.collapsed.set(collapsed),\n };\n },\n },\n ],\n template: `\n <nav\n [id]=\"navId\"\n [attr.aria-label]=\"name()\"\n class=\"border-border bg-surface flex min-h-0 flex-1 flex-col gap-6 border-e p-3\"\n >\n <div data-header class=\"flex shrink-0 flex-col empty:hidden {{ regionClasses() }}\">\n <ng-content select=\"[bfSlot=header]\" />\n </div>\n <div\n data-items\n class=\"-m-1 flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-1 {{ regionClasses() }}\"\n >\n <ng-content />\n </div>\n <div data-footer class=\"flex shrink-0 flex-col gap-1 empty:hidden {{ regionClasses() }}\">\n <ng-content select=\"[bfSlot=footer]\" />\n </div>\n </nav>\n `,\n})\nexport class BfSidebarComponent {\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`\n * (\"Main\"). Name each landmark differently when a page has more than one. */\n readonly label = input('');\n /** Collapses the sidebar to an icon rail: items show their icon only, their label stays for\n * screen readers and becomes a tooltip. A `bf-sidebar-toggle` inside flips it; bind\n * `[(collapsed)]` to keep it in your state. */\n readonly collapsed = model(false);\n\n private readonly labels = inject(BF_LABELS);\n\n /** The `nav` element's id, which `bf-sidebar-toggle` points `aria-controls` at.\n * @internal */\n readonly navId = uniqueId('bf-sidebar');\n\n /** The rendered navigation name: `label`, else the `navigation` label. */\n protected readonly name = computed(() => this.label() || this.labels.navigation);\n private readonly width = computed<BfSidebarWidth>(() =>\n this.collapsed() ? 'collapsed' : 'expanded',\n );\n readonly hostClasses = computed(() => HOST[this.width()]);\n protected readonly regionClasses = computed(() => REGION[this.width()]);\n}\n","import { Component, computed, inject, input, signal } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { BF_NAV, type BfNavHost } from './nav.token';\n\n/**\n * The horizontal navigation of a desktop app with few sections: a `nav` landmark holding a row\n * of `a[bfNavItem]` links that wraps onto more lines in a narrow container. Each link marks the\n * current page from `aria-current=\"page\"`, as in `bf-sidebar`.\n *\n * @example\n * <bf-top-nav label=\"Sections\">\n * <a bfNavItem routerLink=\"/overview\" routerLinkActive ariaCurrentWhenActive=\"page\">Overview</a>\n * <a bfNavItem routerLink=\"/reports\" routerLinkActive ariaCurrentWhenActive=\"page\">Reports</a>\n * </bf-top-nav>\n * @summary Horizontal app navigation, a wrapping row of links for apps with few sections\n * @category Navigation\n * @since 0.3.1\n * @slot default The destinations, `a[bfNavItem]` links.\n */\n@Component({\n selector: 'bf-top-nav',\n host: { class: 'block' },\n // The items lay out inline through BF_NAV; a top nav never collapses.\n providers: [\n {\n provide: BF_NAV,\n useFactory: (): BfNavHost => ({\n layout: 'top',\n collapsed: signal(false).asReadonly(),\n navId: null,\n setCollapsed: () => undefined,\n }),\n },\n ],\n template: `\n <nav [attr.aria-label]=\"name()\" class=\"flex flex-wrap items-center gap-1\">\n <ng-content />\n </nav>\n `,\n})\nexport class BfTopNavComponent {\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`\n * (\"Main\"). Name each landmark differently when a page has more than one. */\n readonly label = input('');\n\n private readonly labels = inject(BF_LABELS);\n\n /** The rendered navigation name: `label`, else the `navigation` label. */\n protected readonly name = computed(() => this.label() || this.labels.navigation);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_NAV } from './nav.token';\n\n/* The heading is small muted text over the items. In a collapsed sidebar it is hidden visually\n but stays the group's name for screen readers; the rail centres the items. */\ntype BfNavGroupForm = 'expanded' | 'collapsed';\nconst HEADING: Record<BfNavGroupForm, string> = {\n expanded: 'px-3 pb-1 text-caption text-text-muted',\n collapsed: 'sr-only',\n};\nconst HOST: Record<BfNavGroupForm, string> = {\n expanded: 'flex flex-col items-stretch gap-1',\n collapsed: 'flex flex-col items-center gap-1',\n};\n\n/**\n * A titled group of `a[bfNavItem]` links inside a `bf-sidebar`: `label` is shown as a small\n * heading above them and names the group (`role=\"group\"`) for screen readers, also while the\n * sidebar is collapsed and the heading is hidden.\n *\n * @example\n * <bf-nav-group label=\"Workspace\">\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">Inbox</a>\n * <a bfNavItem routerLink=\"/projects\" routerLinkActive ariaCurrentWhenActive=\"page\">Projects</a>\n * </bf-nav-group>\n * @summary A titled group of sidebar links with a small heading that names it\n * @category Navigation\n * @since 0.3.1\n * @slot default The group's `a[bfNavItem]` links.\n */\n@Component({\n selector: 'bf-nav-group',\n host: { role: 'group', '[attr.aria-labelledby]': 'headingId', '[class]': 'hostClasses()' },\n template: `\n <span data-heading [id]=\"headingId\" [class]=\"headingClasses()\">{{ label() }}</span>\n <ng-content />\n `,\n})\nexport class BfNavGroupComponent {\n /** The group's heading and accessible name, such as \"Workspace\". */\n readonly label = input.required<string>();\n\n private readonly nav = inject(BF_NAV, { optional: true });\n\n /** The heading's id, referenced by the group's `aria-labelledby`. */\n protected readonly headingId = uniqueId('bf-nav-group');\n private readonly form = computed<BfNavGroupForm>(() =>\n this.nav?.collapsed() ? 'collapsed' : 'expanded',\n );\n readonly hostClasses = computed(() => HOST[this.form()]);\n protected readonly headingClasses = computed(() => HEADING[this.form()]);\n}\n","import {\n Component,\n DestroyRef,\n type ElementRef,\n HostAttributeToken,\n afterNextRender,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BUTTON_CLASSES } from '../button/button.component';\nimport { BF_NAV, type BfNavLayout } from './nav.token';\n\n/* The consumer's <a> is the control. Neutral at rest and on hover (bf-button's ghost variant),\n one step darker while pressed (plain `active:`, a link is never `:enabled`), and the tonal fill\n for the current page from `aria-current=\"page\"` (bf-button's ghost CURRENT map, with its own\n hover and pressed steps and the forced-colours outline), so a nav item and an `a[bfButton]`\n ghost link never drift. `no-underline!` is important, so an unlayered global\n `a { text-decoration: underline }` cannot underline it. */\nconst BASE =\n 'relative flex items-center rounded-control font-bold no-underline! transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n `${BUTTON_CLASSES.variant.ghost} active:bg-surface-pressed active:text-text ${BUTTON_CLASSES.current.ghost}`;\n\n/* Height steps 32/40/48 as a min-height: the item projects its label, so under a coarse pointer\n it grows to 44 px (`pointer-coarse:min-h-hit`) instead of extending an ::after over its\n neighbours (PROJECT_GUIDE hit areas). */\nconst HEIGHT: Record<BfSize, string> = {\n sm: 'min-h-8 gap-2 text-label-xs pointer-coarse:min-h-hit',\n md: 'min-h-10 gap-3 text-label-sm pointer-coarse:min-h-hit',\n lg: 'min-h-12 gap-3 text-label pointer-coarse:min-h-hit',\n};\nconst PADDING: Record<BfSize, string> = { sm: 'px-3', md: 'px-3', lg: 'px-4' };\n/* Collapsed (an icon rail): a square of the height step, the icon centred, no inline padding. */\nconst SQUARE: Record<BfSize, string> = {\n sm: 'w-8 px-0 pointer-coarse:min-w-hit',\n md: 'w-10 px-0 pointer-coarse:min-w-hit',\n lg: 'w-12 px-0 pointer-coarse:min-w-hit',\n};\n\n/* A full-width row in a sidebar, an inline item in a top nav, a centred square in a rail. */\ntype BfNavItemForm = BfNavLayout | 'collapsed';\nconst FORM: Record<BfNavItemForm, string> = {\n sidebar: 'w-full',\n top: 'shrink-0',\n collapsed: 'justify-center self-center',\n};\n\n/* The label truncates in a narrow sidebar; collapsed it stays in the DOM as screen-reader text,\n so the accessible name never changes. */\nconst LABEL: Record<BfNavItemForm, string> = {\n sidebar: 'min-w-0 flex-1 truncate text-start',\n top: 'min-w-0 truncate',\n collapsed: 'sr-only',\n};\n\n/* The count pill at the inline end; collapsed, a dot on the icon's inline-end corner. Both are\n aria-hidden: the sr-only announcement beside them carries the count. */\nconst BADGE: Record<'pill' | 'dot', string> = {\n pill: 'ms-auto 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',\n dot: 'absolute end-1.5 top-1.5 size-2 rounded-control bg-primary forced-colors:bg-[CanvasText]',\n};\n\n/**\n * One destination of a `bf-sidebar` or `bf-top-nav`: put `bfNavItem` on your own `<a>` with\n * `routerLink`, `routerLinkActive` and `ariaCurrentWhenActive=\"page\"`, and the item shows the\n * current page from `aria-current`. An icon goes in the `icon` slot, the label in the default\n * slot; `badge` adds a count. In a collapsed sidebar only the icon shows, the label stays for\n * screen readers and becomes the `title` tooltip.\n *\n * @example\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\" [badge]=\"3\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Inbox\" />\n * Inbox\n * </a>\n * @summary Navigation link for a sidebar or top nav, with icon, label and count\n * @category Navigation\n * @since 0.3.1\n * @slot icon An icon before the label, a `bf-icon`; the only thing shown while collapsed.\n * @slot default The label.\n */\n@Component({\n selector: 'a[bfNavItem]',\n host: { '[class]': 'classes()', '[attr.title]': 'hoverTitle()' },\n template: `\n <span class=\"flex shrink-0 empty:hidden\"><ng-content select=\"[bfSlot=icon]\" /></span>\n <span #label data-label [class]=\"labelClasses()\"><ng-content /></span>\n @if (badge() !== null) {\n <span data-badge aria-hidden=\"true\" [class]=\"badgeClasses()\">{{\n collapsed() ? '' : badge()\n }}</span>\n <span class=\"sr-only\">{{ badgeAnnouncement() }}</span>\n }\n `,\n})\nexport class BfNavItemComponent {\n /** Height step: sm 32, md 40, lg 48 px (44 px at least under a coarse pointer); unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** A count shown as a pill at the inline end (a dot while collapsed), announced with\n * `provideBfLabels()`'s `navBadge(count)` (\"3 new\"); `null` shows none. */\n readonly badge = input<number | null>(null);\n\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly labels = inject(BF_LABELS);\n private readonly nav = inject(BF_NAV, { optional: true });\n /** The consumer's own `title`, kept while the item shows its label. */\n private readonly ownTitle = inject(new HostAttributeToken('title'), { optional: true });\n private readonly label = viewChild.required<ElementRef<HTMLElement>>('label');\n /** The projected label's text, for the collapsed `title`. */\n private readonly labelText = signal('');\n\n /** True while the enclosing sidebar is collapsed to an icon rail. */\n protected readonly collapsed = computed(() => this.nav?.collapsed() ?? false);\n private readonly form = computed<BfNavItemForm>(() =>\n this.collapsed() ? 'collapsed' : (this.nav?.layout ?? 'sidebar'),\n );\n /** The size in effect: `size`, else the app's `controlSize` default. */\n private readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const form = this.form();\n return [\n BASE,\n HEIGHT[size],\n form === 'collapsed' ? SQUARE[size] : PADDING[size],\n FORM[form],\n ].join(' ');\n });\n protected readonly labelClasses = computed(() => LABEL[this.form()]);\n protected readonly badgeClasses = computed(() => BADGE[this.collapsed() ? 'dot' : 'pill']);\n /** The badge as screen readers hear it after the label. */\n protected readonly badgeAnnouncement = computed(() => {\n const badge = this.badge();\n return badge === null ? '' : this.labels.navBadge(badge);\n });\n /** Collapsed, the label as the pointer tooltip; else the consumer's own `title`, if any. */\n protected readonly hoverTitle = computed(() =>\n this.collapsed() && this.labelText() ? this.labelText() : this.ownTitle,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n // Browser only: read the projected label's text and follow later changes (a translated or\n // bound label), so the collapsed tooltip always names the item.\n afterNextRender(() => {\n const element = this.label().nativeElement;\n const sync = (): void => this.labelText.set(element.textContent?.trim() ?? '');\n sync();\n const observer = new MutationObserver(sync);\n observer.observe(element, { childList: true, subtree: true, characterData: true });\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n}\n","import {\n Component,\n ElementRef,\n afterNextRender,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * The viewport width from which `bf-app-frame` shows its sidebar column instead of the narrow\n * header bar: Tailwind's `md` (768 px) or `lg` (1024 px).\n *\n * @summary The breakpoint where an app frame switches from its header bar to the sidebar\n * @since 0.3.2\n */\nexport type BfAppFrameBreakpoint = 'md' | 'lg';\n\n/**\n * The maximum width of `bf-app-frame`'s content column: `md` 48rem, `lg` 64rem, `xl` 80rem, or\n * `full` for no limit.\n *\n * @summary The maximum width of an app frame's content column, from medium to full\n * @since 0.3.2\n */\nexport type BfAppFrameContentWidth = 'md' | 'lg' | 'xl' | 'full';\n\n/* Per breakpoint: the sidebar column shows from it up (its `hidden` loses to the variant), the\n header bar only below it, and the content padding grows with it. Whole class names, so\n Tailwind finds them. */\nconst SIDEBAR: Record<BfAppFrameBreakpoint, string> = {\n md: 'hidden md:flex',\n lg: 'hidden lg:flex',\n};\nconst HEADER: Record<BfAppFrameBreakpoint, string> = {\n md: 'flex md:hidden',\n lg: 'flex lg:hidden',\n};\nconst PADDING: Record<BfAppFrameBreakpoint, string> = {\n md: 'p-4 md:p-8',\n lg: 'p-4 lg:p-8',\n};\n\nconst WIDTH: Record<BfAppFrameContentWidth, string> = {\n md: 'max-w-3xl',\n lg: 'max-w-5xl',\n xl: 'max-w-7xl',\n full: 'max-w-none',\n};\n\n/**\n * The frame of a desktop web app: a skip link, a sticky full-height sidebar column from the\n * breakpoint up, a header bar with the brand, the narrow-screen menu and actions below it, and\n * the `main` landmark with a content column of a set maximum width.\n *\n * @example\n * <bf-app-frame>\n * <bf-sidebar bfSlot=\"sidebar\" label=\"Main\">…</bf-sidebar>\n * <span bfSlot=\"brand\" class=\"text-heading\">Atlas</span>\n * <bf-menu-button bfSlot=\"menu\" [menu]=\"navMenu\">Sections</bf-menu-button>\n * <router-outlet />\n * </bf-app-frame>\n * @summary Desktop app frame with skip link, sticky sidebar, narrow header and main content\n * @category Navigation\n * @since 0.3.2\n * @slot sidebar The `bf-sidebar`, shown from the breakpoint up; it fills the column's height.\n * @slot brand The app's name or logo in the narrow header bar.\n * @slot menu The narrow-screen navigation: a `bf-menu-button` of `a[bfMenuItem]` links.\n * @slot actions End actions of the narrow header bar, such as the theme menu.\n * @slot default The page: what the router shows, inside the `main` landmark.\n */\n@Component({\n selector: 'bf-app-frame',\n host: { class: 'bg-bg text-text relative flex' },\n template: `\n <!-- The skip link focuses the content by script: under <base href=\"/\"> a bare \"#id\" link\n resolves against the base, so following it would load the root URL instead of moving\n focus. The href stays for its link semantics and a copied or middle-clicked URL. -->\n <a\n data-skip-link\n [href]=\"'#' + mainId()\"\n class=\"bg-surface text-text text-label-sm shadow-floating rounded-control focus-visible:ring-ring absolute start-4 top-4 z-50 px-4 py-2 font-bold not-focus:sr-only focus-visible:ring-4 focus-visible:outline-hidden\"\n (click)=\"skip($event)\"\n >{{ labels.skipToContent }}</a\n >\n <!-- From the breakpoint up the sidebar column sticks to the viewport at its full height (or\n the frame's, when a consumer gives it one); the bf-sidebar stretches to fill it and\n scrolls its own destinations. -->\n <div data-sidebar class=\"sticky top-0 h-dvh max-h-full shrink-0 {{ sidebarClasses() }}\">\n <ng-content select=\"[bfSlot=sidebar]\" />\n </div>\n <div data-column class=\"flex min-w-0 flex-1 flex-col\">\n <header\n data-bar\n class=\"bg-surface border-border sticky top-0 z-10 min-h-14 items-center gap-3 border-b px-4 py-2 {{\n headerClasses()\n }}\"\n >\n <div data-brand class=\"flex min-w-0 items-center empty:hidden\">\n <ng-content select=\"[bfSlot=brand]\" />\n </div>\n <div data-menu class=\"flex items-center empty:hidden\">\n <ng-content select=\"[bfSlot=menu]\" />\n </div>\n <div data-actions class=\"ms-auto flex items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </header>\n <!-- A div with the main role rather than <main>: nested inside another page's main (a docs\n preview) it drops the role, so the document keeps exactly one main landmark. -->\n <div\n #main\n data-main\n [id]=\"mainId()\"\n tabindex=\"-1\"\n [attr.role]=\"nested() ? null : 'main'\"\n class=\"min-w-0 flex-1 outline-hidden {{ paddingClasses() }}\"\n >\n <div data-content class=\"mx-auto w-full {{ widthClasses() }}\">\n <ng-content />\n </div>\n </div>\n </div>\n `,\n})\nexport class BfAppFrameComponent {\n /** The viewport width from which the sidebar column replaces the narrow header bar. */\n readonly breakpoint = input<BfAppFrameBreakpoint>('md');\n /** The maximum width of the content column (`md` 48rem, `lg` 64rem, `xl` 80rem, `full`). */\n readonly contentWidth = input<BfAppFrameContentWidth>('xl');\n /** The id of the `main` landmark, the skip link's target; generated when left out. */\n readonly mainId = input(uniqueId('bf-app-frame-main'));\n\n protected readonly labels = inject(BF_LABELS);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly main = viewChild.required<ElementRef<HTMLElement>>('main');\n\n /** True when the frame sits inside another `main` landmark, so its own drops the role. */\n protected readonly nested = signal(false);\n\n protected readonly sidebarClasses = computed(() => SIDEBAR[this.breakpoint()]);\n protected readonly headerClasses = computed(() => HEADER[this.breakpoint()]);\n protected readonly paddingClasses = computed(() => PADDING[this.breakpoint()]);\n protected readonly widthClasses = computed(() => WIDTH[this.contentWidth()]);\n\n constructor() {\n // Browser only: an ancestor main landmark (a docs page around a demo) means this one is not\n // the page's main.\n afterNextRender({\n read: () =>\n this.nested.set(\n this.host.nativeElement.parentElement?.closest('main, [role=\"main\"]') != null,\n ),\n });\n }\n\n /**\n * Moves focus to the content without following the href (see the template comment).\n *\n * @internal\n * @param event The skip link's click (also fired by Enter).\n */\n skip(event: Event): void {\n event.preventDefault();\n this.main().nativeElement.focus();\n }\n}\n","import { Component, computed, input, numberAttribute } from '@angular/core';\n\n/**\n * The shape of a `bf-skeleton`: text lines, a rectangle (an image, a chart, a field) or a circle\n * (an avatar).\n *\n * @summary The three skeleton shapes, text lines, a rectangle or a circle\n * @since 0.3.1\n */\nexport type BfSkeletonShape = 'text' | 'rect' | 'circle';\n\n/* Every placeholder bar: the sunken surface with a shimmer, a soft `surface` highlight that sweeps\n across it on an ::after (from the inline start, the other way under rtl). Under reduced motion\n the highlight is hidden, so the bar stays still. Forced colours drop backgrounds, so a GrayText\n border draws the shape there. */\nconst BAR =\n 'relative overflow-hidden bg-surface-sunken ' +\n \"after:absolute after:inset-0 after:bg-linear-to-r after:from-transparent after:via-surface/70 after:to-transparent after:content-[''] \" +\n 'after:animate-skeleton-shimmer rtl:after:animate-skeleton-shimmer-rtl motion-reduce:after:hidden ' +\n 'forced-colors:border forced-colors:border-[GrayText]';\n\n/* The host per shape. `text` is a column of lines; `rect` is one bar 6rem tall unless `height`\n says otherwise; `circle` is a 40 px disc unless `width` says otherwise (its height follows). The\n `--bf-skeleton-height` custom property carries `height`. */\nconst HOST: Record<BfSkeletonShape, string> = {\n text: 'flex flex-col gap-2',\n rect: `${BAR} block h-[var(--bf-skeleton-height,6rem)] rounded-field`,\n circle: `${BAR} inline-block size-10 shrink-0 rounded-full`,\n};\n\n/* One line of `text`: 12 px tall unless `height` says otherwise, fully round. The last of several\n lines is shorter, as a paragraph's last line is. */\nconst LINE = `${BAR} block h-[var(--bf-skeleton-height,0.75rem)] w-full rounded-full`;\nconst LAST_LINE = `${BAR} block h-[var(--bf-skeleton-height,0.75rem)] w-3/5 rounded-full`;\n\n/**\n * Loading placeholder in the shape of the content to come: text lines, a rectangle or a circle,\n * on the sunken surface with a shimmer. It is hidden from assistive technology; mark the region it\n * stands in for with `aria-busy=\"true\"` while it loads.\n *\n * @example\n * <div aria-busy=\"true\">\n * <bf-skeleton shape=\"circle\" />\n * <bf-skeleton [lines]=\"3\" />\n * <bf-skeleton shape=\"rect\" height=\"8rem\" />\n * </div>\n * @summary Loading placeholder shaped as text lines, a rectangle or a circle, with a shimmer\n * @category Feedback\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-skeleton',\n host: {\n 'aria-hidden': 'true',\n '[class]': 'hostClasses()',\n '[style.width]': 'width() || null',\n '[style.height]': \"shape() === 'circle' ? width() || null : null\",\n '[style.--bf-skeleton-height]': 'height() || null',\n },\n template: `\n @if (shape() === 'text') {\n @for (n of lineList(); track n; let last = $last) {\n <span data-bf-skeleton-line [class]=\"last && n > 1 ? lastLineClasses : lineClasses\"></span>\n }\n }\n `,\n})\nexport class BfSkeletonComponent {\n /** What it stands in for: `text` lines (default), a `rect` (an image, a chart) or a `circle`\n * (an avatar). */\n readonly shape = input<BfSkeletonShape>('text');\n /** How many lines a `text` skeleton draws, the last one shorter when there are several;\n * ignored by the other shapes. */\n readonly lines = input(1, { transform: numberAttribute });\n /** Width as a CSS length (`12rem`, `60%`); empty fills the container, a circle is 40 px. A\n * circle's height follows its width. */\n readonly width = input('');\n /** Height as a CSS length: of each line of `text` (default `0.75rem`) or of the `rect`\n * (default `6rem`); a circle ignores it. */\n readonly height = input('');\n\n protected readonly lineClasses = LINE;\n protected readonly lastLineClasses = LAST_LINE;\n\n /** The line numbers 1…n of a text skeleton; `lines` below 1 draws one. */\n protected readonly lineList = computed(() => {\n const count = Math.max(1, Math.floor(this.lines()) || 1);\n return Array.from({ length: count }, (_, i) => i + 1);\n });\n\n protected readonly hostClasses = computed(() => HOST[this.shape()]);\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BUTTON_CLASSES } from '../button/button.component';\nimport { ICON_BUTTON_CLASSES } from '../icon-button/icon-button.component';\n\n/** One slot of the page row: a page number, or a gap before or after the current page's run. */\ntype BfPaginationItem = number | 'gap-start' | 'gap-end';\n\n/** The inclusive range from `from` to `to`, empty when `to` is below `from`. */\nfunction range(from: number, to: number): number[] {\n return to < from ? [] : Array.from({ length: to - from + 1 }, (_, i) => from + i);\n}\n\n/**\n * The page row: the first and the last page, the current one with `siblings` on each side, and a\n * gap for every run of hidden pages. A gap that would hide a single page shows that page instead,\n * so the row keeps the same number of slots (`2 × siblings + 5`) wherever the current page is.\n */\nfunction pageItems(page: number, count: number, siblings: number): BfPaginationItem[] {\n const start = Math.max(Math.min(page - siblings, count - siblings * 2 - 2), 3);\n const end = Math.min(Math.max(page + siblings, siblings * 2 + 3), count - 2);\n return [\n 1,\n ...(start > 3 ? ['gap-start' as const] : count > 2 ? [2] : []),\n ...range(start, end),\n ...(end < count - 2 ? ['gap-end' as const] : count - 1 > 2 ? [count - 1] : []),\n ...(count > 1 ? [count] : []),\n ];\n}\n\n/* The previous / next buttons: the text bf-icon-button (a square 32/40/48 px box) with a CSS\n chevron. At the first or last page the button stays focusable (`aria-disabled`, never native\n `disabled`, so focus is not dropped to <body> when Next reaches the last page) and only greys\n out: the hover and pressed fills are left off, and the `aria-disabled:` cursor beats the base\n `cursor-pointer`. */\ntype BfPaginationArrowState = 'enabled' | 'disabled';\nconst ARROW_STATE: Record<BfPaginationArrowState, string> = {\n enabled: `${ICON_BUTTON_CLASSES.variant.text} ${ICON_BUTTON_CLASSES.pressed.text}`,\n disabled: 'bg-transparent text-text-disabled aria-disabled:cursor-not-allowed',\n};\n\n/* The chevron: two 1.5 px borders of an 8 px box turned 45°, in the button's text colour (no icon\n import). Previous points to the inline start, next to the inline end; both mirror under rtl. The\n nudge centres the turned box optically. */\ntype BfPaginationDirection = 'previous' | 'next';\nconst CHEVRON_BASE = 'block size-2 border-t-[1.5px] border-r-[1.5px] border-current';\nconst CHEVRON: Record<BfPaginationDirection, string> = {\n previous: `${CHEVRON_BASE} translate-x-0.5 -rotate-135 rtl:-translate-x-0.5 rtl:rotate-45`,\n next: `${CHEVRON_BASE} -translate-x-0.5 rotate-45 rtl:translate-x-0.5 rtl:-rotate-135`,\n};\n\n/* A page button: the ghost bf-button's look on the icon button's box, at least as wide as it is\n tall (32/40/48 px) and growing for long numbers. The current page (`aria-current=\"page\"`) takes\n the tonal fill, as a current `a[bfButton]` ghost link does, with an outline under forced\n colours. */\nconst PAGE_SIZE: Record<BfSize, string> = {\n sm: 'h-8 min-w-8 px-1.5 text-label-xs',\n md: 'h-10 min-w-10 px-2 text-label-sm',\n lg: 'h-12 min-w-12 px-2.5 text-label',\n};\nconst PAGE =\n `${ICON_BUTTON_CLASSES.base} font-bold tabular-nums ` +\n `${BUTTON_CLASSES.variant.ghost} ${BUTTON_CLASSES.pressed.ghost} ${BUTTON_CLASSES.current.ghost}`;\n\n/* The gap between page runs: an ellipsis in a page-sized box, never announced. */\nconst GAP_SIZE: Record<BfSize, string> = {\n sm: 'h-8 min-w-8 text-label-xs',\n md: 'h-10 min-w-10 text-label-sm',\n lg: 'h-12 min-w-12 text-label',\n};\nconst GAP = 'inline-flex items-center justify-center font-bold text-text-muted select-none';\n\n/* The compact position text between the arrows (\"Page 3 of 12\"). */\nconst STATUS_SIZE: Record<BfSize, string> = {\n sm: 'text-label-xs',\n md: 'text-label-sm',\n lg: 'text-label',\n};\nconst STATUS = 'px-2 font-bold whitespace-nowrap text-text-muted tabular-nums';\n\n/**\n * Page navigation for a long list or table: Previous and Next buttons around the page numbers,\n * the current one marked, the hidden runs shown as an ellipsis. `compact` shows \"Page 3 of 12\"\n * between the arrows instead, for narrow screens. The page count comes from `pageCount`, or from\n * `total` and `pageSize`; the consumer shows the rows of `page`.\n *\n * @example\n * <bf-pagination [(page)]=\"page\" [pageCount]=\"12\" />\n * <bf-pagination [(page)]=\"page\" [total]=\"invoices().length\" [pageSize]=\"10\" compact />\n * @summary Previous, next and numbered page buttons for a long list or table\n * @category Navigation\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-pagination',\n host: { class: 'block' },\n template: `\n <nav\n [attr.aria-label]=\"name()\"\n [attr.data-bf-page]=\"current()\"\n [attr.data-bf-page-count]=\"count()\"\n >\n <ul class=\"flex flex-wrap items-center gap-x-1 gap-y-2\">\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-previous\n [attr.aria-label]=\"labels.previousPage\"\n [attr.aria-disabled]=\"current() <= 1 ? 'true' : null\"\n [class]=\"arrowClasses(current() <= 1)\"\n (click)=\"go(current() - 1)\"\n >\n <span aria-hidden=\"true\" [class]=\"chevron.previous\"></span>\n </button>\n </li>\n @if (compact()) {\n <li [class]=\"statusClasses()\">\n <span aria-live=\"polite\">{{ labels.pageOf(current(), count()) }}</span>\n </li>\n } @else {\n @for (item of items(); track item) {\n @if (item === 'gap-start' || item === 'gap-end') {\n <li aria-hidden=\"true\" data-bf-pagination-gap [class]=\"gapClasses()\">…</li>\n } @else {\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-page\n [attr.aria-label]=\"labels.goToPage(item)\"\n [attr.aria-current]=\"item === current() ? 'page' : null\"\n [class]=\"pageClasses()\"\n (click)=\"go(item)\"\n >\n {{ item }}\n </button>\n </li>\n }\n }\n }\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-next\n [attr.aria-label]=\"labels.nextPage\"\n [attr.aria-disabled]=\"current() >= count() ? 'true' : null\"\n [class]=\"arrowClasses(current() >= count())\"\n (click)=\"go(current() + 1)\"\n >\n <span aria-hidden=\"true\" [class]=\"chevron.next\"></span>\n </button>\n </li>\n </ul>\n </nav>\n `,\n})\nexport class BfPaginationComponent {\n /** The current page, 1-based; two-way bindable. The buttons set it; show the rows of this page. */\n readonly page = model(1);\n /** The number of pages; wins over `total` and `pageSize` when above 0. */\n readonly pageCount = input(0, { transform: numberAttribute });\n /** The number of items, used with `pageSize` while `pageCount` is 0. */\n readonly total = input(0, { transform: numberAttribute });\n /** Items per page, used with `total` while `pageCount` is 0. */\n readonly pageSize = input(10, { transform: numberAttribute });\n /** How many pages to show on each side of the current one. */\n readonly siblings = input(1, { transform: numberAttribute });\n /** Shows \"Page 3 of 12\" between the arrows instead of the page buttons, for narrow screens. */\n readonly compact = input(false, { transform: booleanAttribute });\n /** Button height step: sm 32, md 40, lg 48 px (44 px hit area under a coarse pointer); unset\n * follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `pagination`\n * (\"Pagination\"). */\n readonly label = input('');\n\n protected readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The navigation's name: `label`, else the `pagination` label. */\n protected readonly name = computed(() => this.label() || this.labels.pagination);\n /** The page count in effect, at least 1: `pageCount`, else `total` over `pageSize`. */\n protected readonly count = computed(() => {\n const pageCount = Math.floor(this.pageCount());\n if (pageCount > 0) {\n return pageCount;\n }\n const pageSize = this.pageSize();\n const total = this.total();\n return pageSize > 0 && total > 0 ? Math.ceil(total / pageSize) : 1;\n });\n /** The page shown as current: `page`, clamped to 1…count. */\n protected readonly current = computed(() =>\n Math.min(Math.max(1, Math.floor(this.page()) || 1), this.count()),\n );\n protected readonly items = computed(() =>\n pageItems(this.current(), this.count(), Math.max(0, Math.floor(this.siblings()) || 0)),\n );\n protected readonly chevron = CHEVRON;\n protected readonly pageClasses = computed(() => {\n const size = this.resolvedSize();\n return `${PAGE} ${PAGE_SIZE[size]} ${PILL_HIT[size].plain}`;\n });\n protected readonly gapClasses = computed(() => `${GAP} ${GAP_SIZE[this.resolvedSize()]}`);\n protected readonly statusClasses = computed(\n () => `${STATUS} ${STATUS_SIZE[this.resolvedSize()]}`,\n );\n\n /**\n * The classes of the previous or next button.\n * @internal\n */\n arrowClasses(disabled: boolean): string {\n const size = this.resolvedSize();\n const state: BfPaginationArrowState = disabled ? 'disabled' : 'enabled';\n return [\n ICON_BUTTON_CLASSES.base,\n ICON_BUTTON_CLASSES.size[size],\n ARROW_STATE[state],\n PILL_HIT[size].plain,\n ].join(' ');\n }\n\n /**\n * Goes to a page: sets `page` when it is another page within 1…count; else does nothing.\n * @param target The 1-based page to go to.\n */\n go(target: number): void {\n if (target < 1 || target > this.count() || target === this.current()) {\n return;\n }\n this.page.set(target);\n }\n}\n","/*\n * Plain-date arithmetic for bf-calendar (and the date inputs built on it). A date is an ISO\n * string 'YYYY-MM-DD' and a month 'YYYY-MM', never a Date with a time of day, so no time zone or\n * daylight-saving shift can move a day. The arithmetic goes through UTC day numbers; a Date is\n * only built (at UTC midnight) to hand to Intl.DateTimeFormat with `timeZone: 'UTC'`. Years\n * 1–9999 only, so every string compares in calendar order.\n */\n\n/** One plain date's parts; `month` is 1–12. */\nexport interface CalendarDate {\n readonly year: number;\n readonly month: number;\n readonly day: number;\n}\n\n/** One calendar month's parts; `month` is 1–12. */\nexport interface CalendarMonth {\n readonly year: number;\n readonly month: number;\n}\n\nconst DAY_MS = 86_400_000;\nconst ISO_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst ISO_MONTH = /^(\\d{4})-(\\d{2})$/;\n\nfunction pad(value: number, length: number): string {\n return String(value).padStart(length, '0');\n}\n\n/** The number of days in `month` (1–12) of `year`, leap years included. */\nexport function daysInMonth(year: number, month: number): number {\n return month === 2\n ? (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n ? 29\n : 28\n : [4, 6, 9, 11].includes(month)\n ? 30\n : 31;\n}\n\n/** The parts of an ISO date 'YYYY-MM-DD', or `null` for anything else (a wrong day, a time). */\nexport function parseIsoDate(value: string | null | undefined): CalendarDate | null {\n const match = ISO_DATE.exec(value ?? '');\n if (!match) {\n return null;\n }\n const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];\n if (year < 1 || month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) {\n return null;\n }\n return { year, month, day };\n}\n\n/** The parts of an ISO month 'YYYY-MM', or `null` for anything else. */\nexport function parseIsoMonth(value: string | null | undefined): CalendarMonth | null {\n const match = ISO_MONTH.exec(value ?? '');\n if (!match) {\n return null;\n }\n const [year, month] = [Number(match[1]), Number(match[2])];\n return year >= 1 && month >= 1 && month <= 12 ? { year, month } : null;\n}\n\n/** The ISO date of the parts: '2026-03-07'. */\nexport function formatIsoDate({ year, month, day }: CalendarDate): string {\n return `${pad(year, 4)}-${pad(month, 2)}-${pad(day, 2)}`;\n}\n\n/** The ISO month of the parts: '2026-03'. */\nexport function formatIsoMonth({ year, month }: CalendarMonth): string {\n return `${pad(year, 4)}-${pad(month, 2)}`;\n}\n\n/** `iso` itself when it is a valid ISO date, else `null`. */\nexport function validIsoDate(iso: string | null | undefined): string | null {\n return parseIsoDate(iso) ? (iso ?? null) : null;\n}\n\n/** The month 'YYYY-MM' an ISO date falls in. */\nexport function isoMonthOf(iso: string): string {\n return iso.slice(0, 7);\n}\n\n/** The first day of an ISO month. */\nexport function firstOfMonth(isoMonth: string): string {\n return `${isoMonth}-01`;\n}\n\n/** The last day of an ISO month. */\nexport function lastOfMonth(isoMonth: string): string {\n const parts = parseIsoMonth(isoMonth);\n return parts ? `${isoMonth}-${pad(daysInMonth(parts.year, parts.month), 2)}` : `${isoMonth}-01`;\n}\n\n/** A Date at UTC midnight of the parts, for Intl.DateTimeFormat with `timeZone: 'UTC'`. */\nexport function toUtcDate({ year, month, day }: CalendarDate): Date {\n const date = new Date(0);\n // setUTCFullYear, not Date.UTC: Date.UTC maps the years 0–99 to 1900–1999.\n date.setUTCFullYear(year, month - 1, day);\n return date;\n}\n\nfunction dayNumber(date: CalendarDate): number {\n return Math.round(toUtcDate(date).getTime() / DAY_MS);\n}\n\nfunction fromDayNumber(days: number): CalendarDate {\n const date = new Date(days * DAY_MS);\n return { year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate() };\n}\n\n/** Keeps a year inside 1–9999, so a result always formats as a four-digit ISO year. */\nfunction inYearRange(date: CalendarDate): CalendarDate {\n if (date.year < 1) {\n return { year: 1, month: 1, day: 1 };\n }\n return date.year > 9999 ? { year: 9999, month: 12, day: 31 } : date;\n}\n\n/** `iso` moved by `days` (negative goes back); an invalid `iso` is returned as it is. */\nexport function addDays(iso: string, days: number): string {\n const parts = parseIsoDate(iso);\n return parts ? formatIsoDate(inYearRange(fromDayNumber(dayNumber(parts) + days))) : iso;\n}\n\n/** `iso` moved by `months`, the day clamped to the target month's length (Jan 31 + 1 → Feb 28). */\nexport function addMonths(iso: string, months: number): string {\n const parts = parseIsoDate(iso);\n if (!parts) {\n return iso;\n }\n const index = parts.year * 12 + (parts.month - 1) + months;\n const year = Math.floor(index / 12);\n const month = index - year * 12 + 1;\n return formatIsoDate(\n inYearRange({ year, month, day: Math.min(parts.day, daysInMonth(year, month)) }),\n );\n}\n\n/** `iso` moved by `years`, Feb 29 clamped to Feb 28 in a common year. */\nexport function addYears(iso: string, years: number): string {\n return addMonths(iso, years * 12);\n}\n\n/** An ISO month moved by `months`. */\nexport function addIsoMonths(isoMonth: string, months: number): string {\n return isoMonthOf(addMonths(firstOfMonth(isoMonth), months));\n}\n\n/** The weekday of an ISO date: 0 Sunday … 6 Saturday, as `Date.getDay()` counts. */\nexport function weekdayOf(iso: string): number {\n const parts = parseIsoDate(iso);\n return parts ? toUtcDate(parts).getUTCDay() : 0;\n}\n\n/** The first day of the week `iso` is in, for weeks starting on `firstDay` (0 Sunday … 6). */\nexport function startOfWeek(iso: string, firstDay: number): string {\n return addDays(iso, -((weekdayOf(iso) - firstDay + 7) % 7));\n}\n\n/** The last day of the week `iso` is in, for weeks starting on `firstDay`. */\nexport function endOfWeek(iso: string, firstDay: number): string {\n return addDays(startOfWeek(iso, firstDay), 6);\n}\n\n/**\n * The weeks of a month as rows of seven ISO dates from `firstDay` on, `null` for the days of the\n * neighbouring months: four to six rows.\n */\nexport function monthWeeks(isoMonth: string, firstDay: number): (string | null)[][] {\n const parts = parseIsoMonth(isoMonth);\n if (!parts) {\n return [];\n }\n const lead = (weekdayOf(firstOfMonth(isoMonth)) - firstDay + 7) % 7;\n const length = daysInMonth(parts.year, parts.month);\n const cells: (string | null)[] = [\n ...Array.from({ length: lead }, () => null),\n ...Array.from({ length }, (_, i) => formatIsoDate({ ...parts, day: i + 1 })),\n ];\n while (cells.length % 7 !== 0) {\n cells.push(null);\n }\n return Array.from({ length: cells.length / 7 }, (_, row) => cells.slice(row * 7, row * 7 + 7));\n}\n\n/** -1, 0 or 1 as ISO date (or month) `a` falls before, on or after `b`. */\nexport function compareIso(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/** `iso` kept inside `min`…`max` (either bound may be missing). */\nexport function clampIso(iso: string, min: string | null, max: string | null): string {\n if (min && compareIso(iso, min) < 0) {\n return min;\n }\n return max && compareIso(iso, max) > 0 ? max : iso;\n}\n\n/** The device's local calendar date of `now` (the day the user sees on their clock). */\nexport function localIsoDate(now: Date = new Date()): string {\n return formatIsoDate({ year: now.getFullYear(), month: now.getMonth() + 1, day: now.getDate() });\n}\n","import {\n Component,\n DOCUMENT,\n type ElementRef,\n Injector,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\nimport {\n addDays,\n addIsoMonths,\n addMonths,\n addYears,\n clampIso,\n compareIso,\n endOfWeek,\n firstOfMonth,\n isoMonthOf,\n lastOfMonth,\n localIsoDate,\n monthWeeks,\n parseIsoDate,\n parseIsoMonth,\n startOfWeek,\n toUtcDate,\n validIsoDate,\n} from './calendar-date';\n\n/**\n * A weekday as `Date.getDay()` counts it: 0 Sunday, 1 Monday … 6 Saturday.\n *\n * @summary A weekday number from 0 for Sunday to 6 for Saturday, as Date counts\n * @since 0.3.1\n */\nexport type BfCalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n/**\n * Tells `bf-calendar` which dates cannot be picked, such as weekends or booked days.\n *\n * @summary A function that marks an ISO date as not pickable in a calendar\n * @since 0.3.1\n */\nexport type BfCalendarDisabledDate = (iso: string) => boolean;\n\n/** The day grid, or one of the two jump views the title button opens. */\ntype CalendarView = 'day' | 'month' | 'year';\n\n/** One cell of a calendar grid, as the template renders it. */\ninterface CalendarCell {\n /** The ISO date, month or year the cell stands for. */\n readonly key: string;\n /** The visible text. */\n readonly text: string;\n /** The accessible name, when the visible text alone is too short. */\n readonly name: string | null;\n readonly disabled: boolean;\n readonly selected: boolean;\n readonly current: boolean;\n readonly tabStop: boolean;\n}\n\n/** One weekday column header: the short name shown, the full name in `abbr`. */\ninterface CalendarWeekday {\n readonly short: string;\n readonly long: string;\n}\n\n/* The calendar's width is seven day columns, so the header and the month and year views line up\n with the day grid; max-w-full lets it shrink in a narrow column (the columns get narrower, the\n rows keep their height). Under a coarse pointer every day cell is 44 px (the hit area). */\nconst FRAME_SIZE: Record<BfSize, string> = {\n sm: 'w-56 pointer-coarse:w-77',\n md: 'w-70 pointer-coarse:w-77',\n lg: 'w-84',\n};\n/* The body holds the weekday row (2rem) and six week rows, whatever the month, so the calendar\n keeps its height when a month has four or five weeks (a popover around it never jumps), and the\n month and year views fill the same box. */\nconst BODY_SIZE: Record<BfSize, string> = {\n sm: 'h-56 pointer-coarse:h-74',\n md: 'h-68 pointer-coarse:h-74',\n lg: 'h-80',\n};\n/* A cell's height, which is its hit area: 32/40/48, at least 44 px under a coarse pointer. */\nconst CELL_SIZE: Record<BfSize, string> = {\n sm: 'h-8 pointer-coarse:h-hit',\n md: 'h-10 pointer-coarse:h-hit',\n lg: 'h-12',\n};\n/* The round mark inside a day cell (the visible box); it keeps the step's size under a coarse\n pointer, the cell around it grows. */\nconst DAY_MARK_SIZE: Record<BfSize, string> = {\n sm: 'size-8 text-label-xs',\n md: 'size-10 text-label-sm',\n lg: 'size-12 text-label',\n};\n/* The pill inside a month or year cell: the cell's width, the day mark's height. */\nconst PICK_MARK_SIZE: Record<BfSize, string> = {\n sm: 'h-8 w-full text-label-xs',\n md: 'h-10 w-full text-label-sm',\n lg: 'h-12 w-full text-label',\n};\n/* The previous/next buttons: square, the step's size, 44 px under a coarse pointer. */\nconst NAV_SIZE: Record<BfSize, string> = {\n sm: 'size-8 pointer-coarse:size-hit',\n md: 'size-10 pointer-coarse:size-hit',\n lg: 'size-12',\n};\nconst TITLE_SIZE: Record<BfSize, string> = {\n sm: 'h-8 px-2 text-label-sm pointer-coarse:h-hit',\n md: 'h-10 px-3 text-label pointer-coarse:h-hit',\n lg: 'h-12 px-3 text-label',\n};\n\nconst BUTTON_FOCUS =\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed disabled:text-text-disabled';\n/* Hover and press tints apply only while enabled; an aria-disabled previous/next button (the\n month past `min` or `max`) keeps its focus but shows no tint and the not-allowed cursor. */\nconst NAV_BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-control text-text-muted transition-colors duration-150 select-none ' +\n 'not-aria-disabled:enabled:hover:bg-surface-muted not-aria-disabled:enabled:hover:text-text not-aria-disabled:enabled:active:bg-surface-pressed ' +\n `aria-disabled:cursor-not-allowed aria-disabled:text-text-disabled ${BUTTON_FOCUS}`;\n/* CSS chevrons (two borders of a rotated square) pointing along the inline axis, mirrored under\n dir=\"rtl\" so \"previous\" always points to where the earlier month sits. */\nconst CHEVRON =\n \"before:size-2 before:border-t-[1.5px] before:border-r-[1.5px] before:border-current before:content-['']\";\nconst CHEVRON_DIRECTION: Record<'previous' | 'next', string> = {\n previous:\n 'before:translate-x-0.5 before:-rotate-135 rtl:before:-translate-x-0.5 rtl:before:rotate-45',\n next: 'before:-translate-x-0.5 before:rotate-45 rtl:before:translate-x-0.5 rtl:before:-rotate-135',\n};\nconst TITLE_BASE =\n 'relative inline-flex min-w-0 items-center gap-2 rounded-control font-bold text-text transition-colors duration-150 select-none';\nconst TITLE_BUTTON =\n `cursor-pointer enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed ${BUTTON_FOCUS} ` +\n \"after:size-1.5 after:shrink-0 after:border-r-[1.5px] after:border-b-[1.5px] after:border-current after:content-['']\";\n/* The title button's caret points down in the day view (it opens a list) and up in the month\n view (the view it opened). */\nconst TITLE_CARET: Record<'closed' | 'open', string> = {\n closed: 'after:-translate-y-0.5 after:rotate-45',\n open: 'after:translate-y-0.5 after:-rotate-135',\n};\n\n/* Cells: the <td> is the focusable gridcell and the hit area; the mark inside it is the visual.\n The focus ring is drawn on the mark (group-focus-visible), the td's own outline stays hidden,\n which Tailwind turns into a transparent outline that forced colours paint. */\nconst CELL_BASE = 'group p-0 text-center align-middle outline-hidden select-none';\nconst MARK_BASE =\n 'inline-flex max-w-full items-center justify-center rounded-control tabular-nums transition-colors duration-150 group-focus-visible:ring-4 group-focus-visible:ring-ring';\ntype CalendarCellState = 'plain' | 'current' | 'selected' | 'disabled' | 'disabledSelected';\n/* Selected: the primary fill (under forced colours the system Highlight pair, painted by the mark\n itself). Today (`current`): a 1.5 px inset primary-strong ring and bold text, so it never rests\n on colour alone. Disabled: text-disabled; a disabled selected date keeps a muted pill. */\nconst MARK_STATE: Record<CalendarCellState, string> = {\n plain: 'text-text',\n current:\n 'font-bold text-text inset-ring-[1.5px] inset-ring-primary-strong forced-colors:inset-ring-[CanvasText]',\n selected:\n 'bg-primary font-bold text-on-primary forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:forced-color-adjust-none',\n disabled: 'text-text-disabled',\n disabledSelected:\n 'bg-surface-sunken text-text-disabled inset-ring-[1.5px] inset-ring-text-disabled forced-colors:inset-ring-[GrayText]',\n};\n/* Pointer affordance per cell: an editable, pickable cell shows a pointer and hover and press\n tints (the selected one darker primary steps); read-only shows the default cursor and no tint;\n a disabled date the not-allowed cursor. */\ntype CalendarCellMode = 'pickable' | 'readonly' | 'disabled';\nconst CELL_MODE: Record<CalendarCellMode, string> = {\n pickable: 'cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\nconst MARK_HOVER: Record<'plain' | 'selected', string> = {\n plain: 'group-hover:bg-surface-muted group-active:bg-surface-pressed',\n selected:\n 'not-forced-colors:group-hover:bg-primary-hover not-forced-colors:group-active:bg-primary-pressed',\n};\nconst WEEKDAY = 'h-8 p-0 text-center align-middle text-label-xs font-normal text-text-muted';\n/* Only the year view scrolls (its list is longer than the box); its 4 px block padding keeps the\n focus ring of the first and last row inside the clip. The day and month views fit the box and\n never clip a focus ring. */\nconst BODY_SCROLL: Record<'scroll' | 'fixed', string> = {\n scroll: 'overflow-y-auto py-1',\n fixed: '',\n};\n/* The error state outlines the body in `danger-border`, like the other fields' borders. */\nconst BODY_OUTLINE: Record<'error' | 'none', string> = {\n error: 'rounded-card ring-[1.5px] ring-danger-border',\n none: '',\n};\n\n/** How many years the year view lists before and after the shown one without `min`/`max`. */\nconst YEAR_SPAN = 100;\n\n/**\n * The first weekday of `locale` from its week info (`getWeekInfo()`, or the older `weekInfo`\n * property), as `Date.getDay()` counts it; `undefined` where the runtime has neither.\n */\nfunction localeFirstDay(locale: string): number | undefined {\n // Neither member is in the ES2022 typings yet, so both are read through Reflect.\n const tag = new Intl.Locale(locale);\n const getWeekInfo: unknown = Reflect.get(tag, 'getWeekInfo');\n const info: unknown =\n typeof getWeekInfo === 'function'\n ? Reflect.apply(getWeekInfo, tag, [])\n : Reflect.get(tag, 'weekInfo');\n if (typeof info === 'object' && info !== null && 'firstDay' in info) {\n return typeof info.firstDay === 'number' ? info.firstDay % 7 : undefined;\n }\n return undefined;\n}\n\n/** `locale` when the runtime accepts the tag, else `null`. */\nfunction supportedLocale(locale: string): string | null {\n try {\n return locale ? new Intl.Locale(locale).toString() : null;\n } catch {\n return null;\n }\n}\n\nfunction formatter(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n return new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' });\n}\n\n/** Formats an ISO date (or the first day of an ISO month or of a year) with `format`. */\nfunction formatIso(format: Intl.DateTimeFormat, iso: string): string {\n const parts = parseIsoDate(\n iso.length === 4 ? `${iso}-01-01` : iso.length === 7 ? `${iso}-01` : iso,\n );\n return parts ? format.format(toUtcDate(parts)) : iso;\n}\n\nfunction rows<T>(items: readonly T[], size: number): T[][] {\n return Array.from({ length: Math.ceil(items.length / size) }, (_, i) =>\n items.slice(i * size, i * size + size),\n );\n}\n\n/**\n * Inline month calendar for picking one date, an ARIA grid with full keyboard support. The value\n * is a plain ISO date string ('YYYY-MM-DD', never a Date with a time zone) or `null`; month and\n * weekday names come from `Intl` in the calendar's `locale`; implements the Signal Forms value\n * contract.\n *\n * @example\n * <bf-calendar label=\"Due date\" min=\"2026-01-01\" [(value)]=\"due\" />\n * @summary Inline month calendar for picking one date, with month and year jumps\n * @category Forms\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-calendar',\n host: {\n class: 'inline-flex max-w-full flex-col items-start gap-1.5',\n '[attr.id]': 'null',\n },\n template: `\n <div\n #root\n role=\"group\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-describedby]=\"errorId()\"\n [class]=\"frameClasses()\"\n (keydown)=\"onKeydown($event)\"\n (focusout)=\"onFocusout($event)\"\n >\n <div class=\"flex items-center gap-1\">\n @if (view() === 'year') {\n <span [class]=\"titleClasses()\">\n <span [id]=\"titleId()\" class=\"truncate\">{{ title() }}</span>\n </span>\n } @else {\n <button\n type=\"button\"\n data-bf-calendar-title\n [disabled]=\"disabled()\"\n [class]=\"titleClasses()\"\n (click)=\"openNextView()\"\n >\n <span [id]=\"titleId()\" class=\"truncate\">{{ title() }}</span>\n <span class=\"sr-only\">, {{ titleAction() }}</span>\n </button>\n }\n @if (view() === 'day') {\n <span class=\"flex-1\"></span>\n <button\n type=\"button\"\n data-bf-calendar-previous\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"atStart() ? 'true' : null\"\n [attr.aria-label]=\"labels.calendarPreviousMonth\"\n [class]=\"navClasses('previous')\"\n (click)=\"showMonth(-1)\"\n ></button>\n <button\n type=\"button\"\n data-bf-calendar-next\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"atEnd() ? 'true' : null\"\n [attr.aria-label]=\"labels.calendarNextMonth\"\n [class]=\"navClasses('next')\"\n (click)=\"showMonth(1)\"\n ></button>\n }\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">{{ monthTitle() }}</p>\n <div [class]=\"bodyClasses()\">\n @switch (view()) {\n @case ('day') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"day\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (keydown)=\"onDayKeydown($event)\"\n >\n <thead>\n <tr>\n @for (weekday of weekdays(); track $index) {\n <th scope=\"col\" [attr.abbr]=\"weekday.long\" [class]=\"weekdayClasses\">\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of dayRows(); track $index) {\n <tr>\n @for (cell of week; track $index) {\n @if (cell) {\n <td\n [attr.data-date]=\"cell.key\"\n [tabindex]=\"cell.tabStop && !disabled() ? 0 : -1\"\n [attr.aria-label]=\"cell.name\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled ? 'true' : null\"\n [class]=\"cellClasses(cell)\"\n (click)=\"pick(cell)\"\n >\n <span aria-hidden=\"true\" [class]=\"markClasses(cell, 'day')\">{{\n cell.text\n }}</span>\n </td>\n } @else {\n <td [class]=\"emptyCellClasses()\"></td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('month') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"month\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n (keydown)=\"onMonthKeydown($event)\"\n >\n <tbody>\n @for (row of monthRows(); track $index) {\n <tr>\n @for (cell of row; track cell.key) {\n <td\n [attr.data-month]=\"cell.key\"\n [tabindex]=\"cell.tabStop ? 0 : -1\"\n [attr.aria-label]=\"cell.name\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled ? 'true' : null\"\n [class]=\"pickCellClasses(cell)\"\n (click)=\"pickMonth(cell)\"\n >\n <span aria-hidden=\"true\" [class]=\"markClasses(cell, 'pick')\">{{\n cell.text\n }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('year') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"year\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n (keydown)=\"onYearKeydown($event)\"\n >\n <tbody>\n @for (row of yearRows(); track $index) {\n <tr>\n @for (cell of row; track cell.key) {\n <td\n [attr.data-year]=\"cell.key\"\n [tabindex]=\"cell.tabStop ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [class]=\"pickCellClasses(cell)\"\n (click)=\"pickYear(cell)\"\n >\n <span [class]=\"markClasses(cell, 'pick')\">{{ cell.text }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n }\n </div>\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n `,\n})\nexport class BfCalendarComponent implements FormValueControl<string | null> {\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly document = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n /** The strings in effect; the template reads the button names from them. */\n protected readonly labels = inject(BF_LABELS);\n\n /** The picked date as an ISO string ('YYYY-MM-DD'), `null` while none is picked; two-way\n * bindable and bound by `[formField]`. */\n readonly value = model<string | null>(null);\n /** The month on show ('YYYY-MM'), two-way bindable; `null` shows the value's month, else\n * today's. The previous/next buttons, the month and year views and the keyboard set it. */\n readonly month = model<string | null>(null);\n /** The earliest date that can be picked (ISO); earlier dates show disabled. */\n readonly min = input<string | undefined>(undefined);\n /** The latest date that can be picked (ISO); later dates show disabled. */\n readonly max = input<string | undefined>(undefined);\n /** Marks more dates as not pickable (weekends, booked days); called with each ISO date. */\n readonly disabledDate = input<BfCalendarDisabledDate | null>(null);\n /** The first column's weekday, 0 Sunday to 6 Saturday; unset follows the locale's week (else\n * Monday). */\n readonly firstDayOfWeek = input<BfCalendarWeekday | undefined>(undefined);\n /** BCP 47 locale of the month and weekday names and of the week; empty follows the\n * document's `lang`, else English. */\n readonly locale = input('');\n /** The date marked as today (ISO); unset is the device's local date. */\n readonly today = input<string | undefined>(undefined);\n /** Cell size: sm 32, md 40, lg 48 px (44 px under a coarse pointer); unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Disables the whole calendar: nothing is focusable or pickable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the value and lets the user browse the months, but blocks picking. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the date required (`aria-required` on the day grid). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the calendar; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Accessible name of the calendar (not rendered visibly), such as \"Due date\". */\n readonly label = input('');\n /** Accessible name when `label` is not set. */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the calendar (a visible heading) when `label` is not\n * set. */\n readonly ariaLabelledby = input('');\n /** Name of the bound field. Not rendered (the calendar has no native form element); kept so\n * Signal Forms can bind it. */\n readonly name = input('');\n /** The calendar's id; generated when not set. */\n readonly id = input(uniqueId('bf-calendar'));\n\n /** Emitted with the new date right after the user picks a different one. */\n readonly changed = output<string>();\n /** Emitted with the date the user picked (click, Enter or Space), also when it already was\n * the value, so a popover around the calendar can close. */\n readonly picked = output<string>();\n /** Emitted when focus leaves the calendar, so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly root = viewChild.required<ElementRef<HTMLElement>>('root');\n\n /** Which grid is on show: the days, or the month or year jump view. */\n protected readonly view = signal<CalendarView>('day');\n /** The day the keyboard last moved to; the tab stop while it is in the shown month. */\n private readonly activeDate = signal<string | null>(null);\n /** The month the month view's tab stop is on (its year is the view's year). */\n private readonly activeMonth = signal('');\n /** The year the year view's tab stop is on. */\n private readonly activeYear = signal(0);\n\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The locale in effect: `locale`, else the document's `lang`, else English. */\n readonly resolvedLocale = computed(\n () =>\n supportedLocale(this.locale()) ?? supportedLocale(this.document.documentElement.lang) ?? 'en',\n );\n /** The first column's weekday: `firstDayOfWeek`, else the locale's, else Monday. */\n readonly firstDay = computed(\n () => this.firstDayOfWeek() ?? localeFirstDay(this.resolvedLocale()) ?? 1,\n );\n private readonly minDate = computed(() => validIsoDate(this.min()));\n private readonly maxDate = computed(() => validIsoDate(this.max()));\n private readonly todayDate = computed(() => validIsoDate(this.today()) ?? localIsoDate());\n private readonly selectedDate = computed(() => validIsoDate(this.value()));\n\n /** The month on show: `month`, else the value's month, else today's (kept inside min/max). */\n readonly shownMonth = computed(() => {\n const month = this.month();\n if (parseIsoMonth(month) && month) {\n return month;\n }\n const value = this.selectedDate();\n return isoMonthOf(value ?? clampIso(this.todayDate(), this.minDate(), this.maxDate()));\n });\n\n private readonly formats = computed(() => {\n const locale = this.resolvedLocale();\n return {\n title: formatter(locale, { month: 'long', year: 'numeric' }),\n year: formatter(locale, { year: 'numeric' }),\n month: formatter(locale, { month: 'long' }),\n day: formatter(locale, { day: 'numeric' }),\n full: formatter(locale, { dateStyle: 'full' }),\n weekdayShort: formatter(locale, { weekday: 'short' }),\n weekdayLong: formatter(locale, { weekday: 'long' }),\n };\n });\n\n /** The shown month and year, such as \"October 2026\". */\n protected readonly monthTitle = computed(() =>\n formatIso(this.formats().title, this.shownMonth()),\n );\n /** The header's title: the month and year, the month view's year or the year view's year. */\n protected readonly title = computed(() => {\n switch (this.view()) {\n case 'month':\n return formatIso(this.formats().year, this.activeMonth().slice(0, 4));\n case 'year':\n return formatIso(this.formats().year, String(this.activeYear()).padStart(4, '0'));\n default:\n return this.monthTitle();\n }\n });\n /** What the title button does, read after its text. */\n protected readonly titleAction = computed(() =>\n this.view() === 'day' ? this.labels.calendarChooseMonth : this.labels.calendarChooseYear,\n );\n protected readonly titleId = computed(() => `${this.id()}-title`);\n\n /** Whether the previous month lies wholly before `min`. */\n protected readonly atStart = computed(() => {\n const min = this.minDate();\n return min !== null && compareIso(lastOfMonth(addIsoMonths(this.shownMonth(), -1)), min) < 0;\n });\n /** Whether the next month lies wholly after `max`. */\n protected readonly atEnd = computed(() => {\n const max = this.maxDate();\n return max !== null && compareIso(firstOfMonth(addIsoMonths(this.shownMonth(), 1)), max) > 0;\n });\n\n /** The weekday column headers, from the first day of the week on. */\n protected readonly weekdays = computed<CalendarWeekday[]>(() => {\n const { weekdayShort, weekdayLong } = this.formats();\n // 2023-01-01 was a Sunday, so 2023-01-(1 + n) is weekday n.\n return Array.from({ length: 7 }, (_, i) => {\n const iso = `2023-01-0${((this.firstDay() + i) % 7) + 1}`;\n return { short: formatIso(weekdayShort, iso), long: formatIso(weekdayLong, iso) };\n });\n });\n\n /** The day that owns the grid's tab stop: the active day while it is in the shown month, else\n * the value, else today, else the first pickable-by-range day of the month. */\n readonly tabStopDate = computed(() => {\n const month = this.shownMonth();\n const inMonth = (iso: string | null): iso is string => !!iso && isoMonthOf(iso) === month;\n const candidates = [this.activeDate(), this.selectedDate(), this.todayDate()];\n const found = candidates.find(inMonth);\n if (found) {\n return found;\n }\n const clamped = clampIso(firstOfMonth(month), this.minDate(), this.maxDate());\n return inMonth(clamped) ? clamped : firstOfMonth(month);\n });\n\n /** The day grid: weeks of seven cells, `null` for the neighbouring months' days. */\n protected readonly dayRows = computed<(CalendarCell | null)[][]>(() => {\n const { day, full } = this.formats();\n const selected = this.selectedDate();\n const today = this.todayDate();\n const tabStop = this.tabStopDate();\n return monthWeeks(this.shownMonth(), this.firstDay()).map((week) =>\n week.map((iso) =>\n iso\n ? {\n key: iso,\n text: formatIso(day, iso),\n name: formatIso(full, iso),\n disabled: this.isDateDisabled(iso),\n selected: iso === selected,\n current: iso === today,\n tabStop: iso === tabStop,\n }\n : null,\n ),\n );\n });\n\n /** The month view: the twelve months of the active month's year, three to a row. */\n protected readonly monthRows = computed<CalendarCell[][]>(() => {\n const { month, title } = this.formats();\n const active = this.activeMonth();\n const year = active.slice(0, 4);\n const shown = this.shownMonth();\n const todayMonth = isoMonthOf(this.todayDate());\n const min = this.minDate();\n const max = this.maxDate();\n const cells = Array.from({ length: 12 }, (_, i): CalendarCell => {\n const key = `${year}-${String(i + 1).padStart(2, '0')}`;\n return {\n key,\n text: formatIso(month, key),\n name: formatIso(title, key),\n disabled:\n (min !== null && compareIso(lastOfMonth(key), min) < 0) ||\n (max !== null && compareIso(firstOfMonth(key), max) > 0),\n selected: key === shown,\n current: key === todayMonth,\n tabStop: key === active,\n };\n });\n return rows(cells, 3);\n });\n\n /** The first and last year the year view lists: `min`'s and `max`'s, else 100 years around. */\n private readonly yearRange = computed(() => {\n const shown = Number(this.shownMonth().slice(0, 4));\n const min = this.minDate();\n const max = this.maxDate();\n return {\n first: min ? Number(min.slice(0, 4)) : Math.max(1, shown - YEAR_SPAN),\n last: max ? Number(max.slice(0, 4)) : Math.min(9999, shown + YEAR_SPAN),\n };\n });\n\n /** The year view: the years of `yearRange`, four to a row. */\n protected readonly yearRows = computed<CalendarCell[][]>(() => {\n const { year } = this.formats();\n const { first, last } = this.yearRange();\n const shown = Number(this.shownMonth().slice(0, 4));\n const todayYear = Number(this.todayDate().slice(0, 4));\n const active = this.activeYear();\n const cells = Array.from({ length: Math.max(0, last - first + 1) }, (_, i): CalendarCell => {\n const value = first + i;\n return {\n key: String(value),\n text: formatIso(year, String(value).padStart(4, '0')),\n name: null,\n disabled: false,\n selected: value === shown,\n current: value === todayYear,\n tabStop: value === active,\n };\n });\n return rows(cells, 4);\n });\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this calendar) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph while there is an error, else null. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /** `aria-label` of the group: the `label`, else `ariaLabel`. */\n readonly ariaLabelAttr = computed(() => this.label() || this.ariaLabel() || null);\n /** `aria-labelledby` of the group: only while no `label` names it. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n\n protected readonly frameClasses = computed(\n () => `flex max-w-full flex-col gap-2 ${FRAME_SIZE[this.resolvedSize()]}`,\n );\n protected readonly bodyClasses = computed(() =>\n [\n BODY_SCROLL[this.view() === 'year' ? 'scroll' : 'fixed'],\n BODY_SIZE[this.resolvedSize()],\n BODY_OUTLINE[this.showError() ? 'error' : 'none'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n protected readonly titleClasses = computed(() =>\n [\n TITLE_BASE,\n TITLE_SIZE[this.resolvedSize()],\n this.view() === 'year' ? '' : TITLE_BUTTON,\n this.view() === 'year' ? '' : TITLE_CARET[this.view() === 'day' ? 'closed' : 'open'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n protected readonly emptyCellClasses = computed(\n () => `${CELL_BASE} ${CELL_SIZE[this.resolvedSize()]}`,\n );\n protected readonly weekdayClasses = WEEKDAY;\n\n /**\n * The classes of the previous or next month button.\n * @internal\n */\n navClasses(direction: 'previous' | 'next'): string {\n return `${NAV_BASE} ${NAV_SIZE[this.resolvedSize()]} ${CHEVRON} ${CHEVRON_DIRECTION[direction]}`;\n }\n\n /**\n * The classes of a day cell.\n * @internal\n */\n cellClasses(cell: CalendarCell): string {\n return `${CELL_BASE} ${CELL_SIZE[this.resolvedSize()]} ${CELL_MODE[this.cellMode(cell)]}`;\n }\n\n /**\n * The classes of a month or year cell: a little padding between the pills.\n * @internal\n */\n pickCellClasses(cell: CalendarCell): string {\n return `${this.cellClasses(cell)} px-1`;\n }\n\n /**\n * The classes of the mark inside a cell.\n * @internal\n */\n markClasses(cell: CalendarCell, kind: 'day' | 'pick'): string {\n const state: CalendarCellState = cell.disabled\n ? cell.selected\n ? 'disabledSelected'\n : 'disabled'\n : cell.selected\n ? 'selected'\n : cell.current\n ? 'current'\n : 'plain';\n const pickable = this.cellMode(cell) === 'pickable';\n return [\n MARK_BASE,\n kind === 'day' ? DAY_MARK_SIZE[this.resolvedSize()] : PICK_MARK_SIZE[this.resolvedSize()],\n MARK_STATE[state],\n pickable ? MARK_HOVER[cell.selected ? 'selected' : 'plain'] : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * Whether a date cannot be picked: it is outside `min`…`max` or `disabledDate` rules it out.\n * @param iso The ISO date to check.\n * @returns True when the date shows disabled.\n */\n isDateDisabled(iso: string): boolean {\n const min = this.minDate();\n const max = this.maxDate();\n return (\n (min !== null && compareIso(iso, min) < 0) ||\n (max !== null && compareIso(iso, max) > 0) ||\n this.disabledDate()?.(iso) === true\n );\n }\n\n /**\n * Focuses the cell that owns the tab stop of the grid on show; Signal Forms calls it from\n * `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.root()\n .nativeElement.querySelector<HTMLElement>('[data-bf-calendar-grid] td[tabindex=\"0\"]')\n ?.focus(options);\n }\n\n /**\n * Picks `iso` as a click on its day would: ignored while disabled or read-only, and for an\n * invalid or disabled date. Shows its month.\n * @param iso The ISO date to pick.\n */\n select(iso: string): void {\n if (this.disabled() || this.readonly() || !parseIsoDate(iso) || this.isDateDisabled(iso)) {\n return;\n }\n this.activeDate.set(iso);\n if (isoMonthOf(iso) !== this.shownMonth()) {\n this.month.set(isoMonthOf(iso));\n }\n const changed = iso !== this.value();\n if (changed) {\n this.value.set(iso);\n this.changed.emit(iso);\n }\n this.picked.emit(iso);\n }\n\n /**\n * Shows the month `offset` months away (the previous/next buttons); ignored past `min`/`max`.\n * @internal\n */\n showMonth(offset: number): void {\n if (this.disabled() || (offset < 0 ? this.atStart() : this.atEnd())) {\n return;\n }\n this.month.set(addIsoMonths(this.shownMonth(), offset));\n }\n\n /**\n * The title button: the day view opens the month view, the month view the year view.\n * @internal\n */\n openNextView(): void {\n if (this.view() === 'day') {\n this.activeMonth.set(this.shownMonth());\n this.view.set('month');\n } else {\n this.activeYear.set(Number(this.activeMonth().slice(0, 4)));\n this.view.set('year');\n }\n this.focusAfterRender('center');\n }\n\n /**\n * A click on a day.\n * @internal\n */\n pick(cell: CalendarCell): void {\n if (this.disabled()) {\n return;\n }\n // The clicked day takes the tab stop even when it cannot be picked, so the arrow keys go on\n // from where focus is.\n this.activeDate.set(cell.key);\n this.select(cell.key);\n }\n\n /**\n * A click (or Enter, Space) on a month of the month view: shows it in the day view.\n * @internal\n */\n pickMonth(cell: CalendarCell): void {\n if (cell.disabled || this.disabled()) {\n return;\n }\n this.month.set(cell.key);\n this.view.set('day');\n this.focusAfterRender();\n }\n\n /**\n * A click (or Enter, Space) on a year of the year view: opens that year's month view.\n * @internal\n */\n pickYear(cell: CalendarCell): void {\n if (this.disabled()) {\n return;\n }\n const month = `${cell.key.padStart(4, '0')}${this.activeMonth().slice(4)}`;\n const min = this.minDate();\n const max = this.maxDate();\n this.activeMonth.set(\n clampIso(month, min ? isoMonthOf(min) : null, max ? isoMonthOf(max) : null),\n );\n this.view.set('month');\n this.focusAfterRender();\n }\n\n /**\n * Escape in the month or year view returns to the day view (and stops there, so a popover\n * around the calendar stays open).\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.view() !== 'day') {\n event.preventDefault();\n event.stopPropagation();\n this.view.set('day');\n this.focusAfterRender();\n }\n }\n\n /**\n * Marks the field touched once focus leaves the calendar (not on moves between its cells).\n * @internal\n */\n onFocusout(event: FocusEvent): void {\n const next = event.relatedTarget;\n if (!(next instanceof Node) || !this.root().nativeElement.contains(next)) {\n this.touch.emit();\n }\n }\n\n /**\n * The day grid's keys: arrows by day and week (mirrored under RTL), Page Up/Down by month\n * (with Shift by year), Home/End to the week's ends, Enter/Space picks.\n * @internal\n */\n onDayKeydown(event: KeyboardEvent): void {\n const focused = event.target instanceof HTMLElement ? event.target.dataset['date'] : undefined;\n const from = focused ?? this.tabStopDate();\n const step = this.inlineStep();\n let target: string;\n switch (event.key) {\n case 'ArrowLeft':\n target = addDays(from, -step);\n break;\n case 'ArrowRight':\n target = addDays(from, step);\n break;\n case 'ArrowUp':\n target = addDays(from, -7);\n break;\n case 'ArrowDown':\n target = addDays(from, 7);\n break;\n case 'PageUp':\n target = event.shiftKey ? addYears(from, -1) : addMonths(from, -1);\n break;\n case 'PageDown':\n target = event.shiftKey ? addYears(from, 1) : addMonths(from, 1);\n break;\n case 'Home':\n target = startOfWeek(from, this.firstDay());\n break;\n case 'End':\n target = endOfWeek(from, this.firstDay());\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.select(from);\n return;\n default:\n return;\n }\n event.preventDefault();\n this.moveTo(clampIso(target, this.minDate(), this.maxDate()));\n }\n\n /**\n * The month view's keys: arrows by one month and by a row of three, Home/End to the row's\n * ends, Page Up/Down by a year, Enter/Space shows the month.\n * @internal\n */\n onMonthKeydown(event: KeyboardEvent): void {\n const active = this.activeMonth();\n const index = Number(active.slice(5, 7)) - 1;\n const step = this.inlineStep();\n const offsets: Record<string, number> = {\n ArrowLeft: -step,\n ArrowRight: step,\n ArrowUp: -3,\n ArrowDown: 3,\n Home: -(index % 3),\n End: 2 - (index % 3),\n PageUp: -12,\n PageDown: 12,\n };\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n const cell = this.monthRows()\n .flat()\n .find((c) => c.key === active);\n if (cell) {\n this.pickMonth(cell);\n }\n return;\n }\n const offset = offsets[event.key];\n if (offset === undefined) {\n return;\n }\n event.preventDefault();\n const min = this.minDate();\n const max = this.maxDate();\n this.activeMonth.set(\n clampIso(\n addIsoMonths(active, offset),\n min ? isoMonthOf(min) : null,\n max ? isoMonthOf(max) : null,\n ),\n );\n this.focusAfterRender();\n }\n\n /**\n * The year view's keys: arrows by one year and by a row of four, Home/End to the row's ends,\n * Page Up/Down by five rows, Enter/Space opens the year's months.\n * @internal\n */\n onYearKeydown(event: KeyboardEvent): void {\n const active = this.activeYear();\n const { first, last } = this.yearRange();\n const column = (active - first) % 4;\n const step = this.inlineStep();\n const offsets: Record<string, number> = {\n ArrowLeft: -step,\n ArrowRight: step,\n ArrowUp: -4,\n ArrowDown: 4,\n Home: -column,\n End: 3 - column,\n PageUp: -20,\n PageDown: 20,\n };\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.pickYear({\n key: String(active),\n text: '',\n name: null,\n disabled: false,\n selected: false,\n current: false,\n tabStop: true,\n });\n return;\n }\n const offset = offsets[event.key];\n if (offset === undefined) {\n return;\n }\n event.preventDefault();\n this.activeYear.set(Math.min(last, Math.max(first, active + offset)));\n this.focusAfterRender('nearest');\n }\n\n /** Moves the day grid's tab stop (and focus) to `iso`, showing its month. */\n private moveTo(iso: string): void {\n this.activeDate.set(iso);\n if (isoMonthOf(iso) !== this.shownMonth()) {\n this.month.set(isoMonthOf(iso));\n }\n this.focusAfterRender();\n }\n\n /** +1 when ArrowRight moves forward, -1 under `dir=\"rtl\"`, where the days run right to left. */\n private inlineStep(): number {\n const root = this.root().nativeElement;\n const dir = root.closest('[dir]')?.getAttribute('dir');\n const rtl = dir ? dir === 'rtl' : getComputedStyle(root).direction === 'rtl';\n return rtl ? -1 : 1;\n }\n\n private cellMode(cell: CalendarCell): CalendarCellMode {\n if (cell.disabled || this.disabled()) {\n return 'disabled';\n }\n // Read-only blocks picking a date, not browsing: month and year cells stay pickable.\n return this.readonly() && this.view() === 'day' ? 'readonly' : 'pickable';\n }\n\n /** After the next render, focuses the tab stop of the grid on show; in the scrolling year view\n * it first scrolls the cell into the middle of the box (`center`, on opening) or just into view\n * (`nearest`, on a key move). */\n private focusAfterRender(scroll: 'center' | 'nearest' = 'nearest'): void {\n afterNextRender(\n {\n write: () => {\n const root = this.root().nativeElement;\n const cell = root.querySelector<HTMLElement>('[data-bf-calendar-grid] td[tabindex=\"0\"]');\n const body = cell?.closest('table')?.parentElement;\n if (!cell || !body) {\n return;\n }\n const top =\n cell.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop;\n const bottom = top + cell.offsetHeight;\n if (scroll === 'center') {\n body.scrollTop = top - (body.clientHeight - cell.offsetHeight) / 2;\n } else if (top < body.scrollTop) {\n body.scrollTop = top;\n } else if (bottom > body.scrollTop + body.clientHeight) {\n body.scrollTop = bottom - body.clientHeight;\n }\n cell.focus({ preventScroll: true });\n },\n },\n { injector: this.injector },\n );\n }\n}\n","import {\n DOCUMENT,\n DestroyRef,\n type EnvironmentProviders,\n inject,\n provideEnvironmentInitializer,\n} from '@angular/core';\n\n/**\n * Removes what overlays and themes leave on a document: the `dark` and `cdk-global-scrollblock`\n * classes on `<html>`, `inert` on the children of `<body>`, and every child of a\n * `.cdk-overlay-container`. Internal: shared by `provideBfTesting()` (`@bitforgehq/ui/testing`)\n * and `provideBfShellTesting()` (`@bitforgehq/ui/mobile`).\n */\nexport function resetBfDocument(document: Document): void {\n document.documentElement.classList.remove('dark', 'cdk-global-scrollblock');\n for (const child of Array.from(document.body.children)) {\n child.removeAttribute('inert');\n }\n for (const container of Array.from(document.querySelectorAll('.cdk-overlay-container'))) {\n container.replaceChildren();\n }\n}\n\n/** Runs `resetBfDocument()` when the environment injector that holds it is destroyed. Internal. */\nexport function provideBfDocumentReset(): EnvironmentProviders {\n return provideEnvironmentInitializer(() => {\n const document = inject(DOCUMENT);\n inject(DestroyRef).onDestroy(() => resetBfDocument(document));\n });\n}\n"],"mappings":";;;AAwCA,MAAa,oBAAgC;CAAE,WAAW;CAAM,aAAa;AAAI;AAQjF,MAAa,cAAc,IAAI,eAA2B,eAAe;CACvE,YAAY;CACZ,eAAe;AAChB,CAAA;AAYD,SAAgB,kBAAkB,SAA0B;CAC1D,OAAO;EACL,SAAS;EACT,kBAA6B;GAC3B,MAAM,SAAS,OAAO,aAAa;IAAE,UAAU;IAAM,UAAU;GAA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AAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;ACnf5E,SAAgB,gBAAgB,UAAkB;CAChD,SAAS,gBAAgB,UAAU,OAAO,QAAQ,wBAAwB;CAC1E,KAAK,MAAM,SAAS,MAAM,KAAK,SAAS,KAAK,QAAQ,GACnD,MAAM,gBAAgB,OAAO;CAE/B,KAAK,MAAM,aAAa,MAAM,KAAK,SAAS,iBAAiB,wBAAwB,CAAC,GACpF,UAAU,gBAAe;AAE7B;AAGA,SAAgB,yBAAsB;CACpC,OAAO,oCAAmC;EACxC,MAAM,WAAW,OAAO,QAAQ;EAChC,OAAO,UAAU,CAAC,CAAC,gBAAgB,gBAAgB,QAAQ,CAAC;CAC9D,CAAC;AACH"}
1
+ {"version":3,"file":"bitforgehq-ui.mjs","names":[],"sources":["../../../projects/ui/src/config/defaults.ts","../../../projects/ui/src/config/labels.ts","../../../projects/ui/src/config/color-scheme.ts","../../../projects/ui/src/config/sidebar-state.ts","../../../projects/ui/src/config/validation-messages.ts","../../../projects/ui/src/components/spinner/spinner.component.ts","../../../projects/ui/src/components/_shared/hit-classes.ts","../../../projects/ui/src/components/button/button.component.ts","../../../projects/ui/src/components/icon-button/icon-button.component.ts","../../../projects/ui/src/components/badge/badge.component.ts","../../../projects/ui/src/components/_shared/pointer-hold.ts","../../../projects/ui/src/components/field/field.component.ts","../../../projects/ui/src/components/_shared/field-classes.ts","../../../projects/ui/src/components/_shared/field-state.ts","../../../projects/ui/src/components/_shared/unique-id.ts","../../../projects/ui/src/components/input/input.component.ts","../../../projects/ui/src/components/textarea/textarea.component.ts","../../../projects/ui/src/components/_shared/choice.ts","../../../projects/ui/src/components/select/select.component.ts","../../../projects/ui/src/components/checkbox/checkbox.component.ts","../../../projects/ui/src/components/toggle/toggle.component.ts","../../../projects/ui/src/components/radio-group/radio-group.component.ts","../../../projects/ui/src/components/chip-group/chip-group.token.ts","../../../projects/ui/src/components/chip/chip.component.ts","../../../projects/ui/src/components/chip-group/chip-group.component.ts","../../../projects/ui/src/components/segmented/segmented.component.ts","../../../projects/ui/src/components/theme-switch/theme-switch.component.ts","../../../projects/ui/src/components/list/list.token.ts","../../../projects/ui/src/components/list/list.component.ts","../../../projects/ui/src/components/action/action-host.token.ts","../../../projects/ui/src/components/list/list-item.component.ts","../../../projects/ui/src/components/card/card.component.ts","../../../projects/ui/src/components/progress/progress.component.ts","../../../projects/ui/src/components/avatar/avatar.component.ts","../../../projects/ui/src/components/alert/alert.component.ts","../../../projects/ui/src/components/empty-state/empty-state.component.ts","../../../projects/ui/src/components/action-bar/action-bar.component.ts","../../../projects/ui/src/components/tab-bar/tab-bar.token.ts","../../../projects/ui/src/components/tab-bar/tab.component.ts","../../../projects/ui/src/components/tab-bar/tab-bar.component.ts","../../../projects/ui/src/components/action/action.directive.ts","../../../projects/ui/src/components/tab-group/tab-group.token.ts","../../../projects/ui/src/components/tab-group/tab-panel.component.ts","../../../projects/ui/src/components/tab-group/tab-group.component.ts","../../../projects/ui/src/components/page-header/page-header.component.ts","../../../projects/ui/src/components/toolbar/toolbar.component.ts","../../../projects/ui/src/components/table/table-cell.directive.ts","../../../projects/ui/src/components/table/table.component.ts","../../../projects/ui/src/components/description-list/description-list.token.ts","../../../projects/ui/src/components/description-list/description-list.component.ts","../../../projects/ui/src/components/description-list/description-item.component.ts","../../../projects/ui/src/components/stat/stat.component.ts","../../../projects/ui/src/components/timeline/timeline.token.ts","../../../projects/ui/src/components/timeline/timeline.component.ts","../../../projects/ui/src/components/timeline/timeline-event.component.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb.token.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb-item.component.ts","../../../projects/ui/src/components/breadcrumb/breadcrumb.component.ts","../../../projects/ui/src/components/sidebar/nav.token.ts","../../../projects/ui/src/components/sidebar/sidebar.component.ts","../../../projects/ui/src/components/sidebar/top-nav.component.ts","../../../projects/ui/src/components/sidebar/nav-group.component.ts","../../../projects/ui/src/components/sidebar/nav-item.component.ts","../../../projects/ui/src/components/app-frame/app-frame.component.ts","../../../projects/ui/src/components/skeleton/skeleton.component.ts","../../../projects/ui/src/components/pagination/pagination.component.ts","../../../projects/ui/src/components/calendar/calendar-date.ts","../../../projects/ui/src/components/calendar/calendar.component.ts","../../../projects/ui/src/components/steps/steps.token.ts","../../../projects/ui/src/components/steps/step.component.ts","../../../projects/ui/src/components/steps/steps.component.ts","../../../projects/ui/src/config/document-reset.ts"],"sourcesContent":["import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { BfSize } from './size';\n\n/**\n * App-wide widget defaults, read by every sized widget whose `size` input is left unset.\n *\n * @summary The default height steps of text fields and of actions and choice controls\n * @since 0.3.0\n */\nexport interface BfDefaults {\n /**\n * Height step of text fields: bf-input, bf-number-input, bf-select, bf-textarea.\n * @default 'md'\n */\n readonly fieldSize: BfSize;\n /**\n * Height step of actions and choice controls: bf-button, bf-icon-button, bf-chip, bf-segmented,\n * bf-checkbox, bf-toggle, bf-radio-group.\n * @default 'md'\n */\n readonly controlSize: BfSize;\n}\n\n/**\n * Options of `provideBfDefaults()`: any step left out keeps the parent injector's value.\n *\n * @summary The size steps provideBfDefaults sets, each one falling back to the parent\n * @since 0.3.0\n */\nexport interface BfDefaultsOptions extends Partial<BfDefaults> {\n /** Sets `fieldSize` and `controlSize` together; an explicit `fieldSize`/`controlSize` wins. */\n readonly size?: BfSize;\n}\n\n/**\n * Library defaults: compact `md` everywhere (desktop first).\n *\n * @summary The library's built-in widget defaults, the compact md step everywhere\n * @since 0.3.0\n */\nexport const BF_DEFAULT_VALUES: BfDefaults = { fieldSize: 'md', controlSize: 'md' };\n\n/**\n * The widget defaults in effect for the current injector; set them with `provideBfDefaults()`.\n *\n * @summary Injection token holding the widget defaults in effect for an injector\n * @since 0.3.0\n */\nexport const BF_DEFAULTS = new InjectionToken<BfDefaults>('BF_DEFAULTS', {\n providedIn: 'root',\n factory: () => BF_DEFAULT_VALUES,\n});\n\n/**\n * App-wide (ApplicationConfig) or sub-tree (a component's `providers`) widget defaults, merged\n * over the nearest parent's. Capacitor apps: `provideBfDefaults({ fieldSize: 'lg' })` keeps the\n * 0.2 phone look; `{ size: 'lg' }` enlarges every control.\n *\n * @param options The steps to set; any step left out keeps the parent's.\n * @returns The provider of `BF_DEFAULTS`.\n * @summary Sets the default field and control sizes for an app or a sub-tree\n * @since 0.3.0\n */\nexport function provideBfDefaults(options: BfDefaultsOptions): Provider {\n return {\n provide: BF_DEFAULTS,\n useFactory: (): BfDefaults => {\n const parent = inject(BF_DEFAULTS, { skipSelf: true, optional: true }) ?? BF_DEFAULT_VALUES;\n return {\n fieldSize: options.fieldSize ?? options.size ?? parent.fieldSize,\n controlSize: options.controlSize ?? options.size ?? parent.controlSize,\n };\n },\n };\n}\n","import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { BfValidationMessages } from './validation-messages';\n\n/**\n * Every built-in user-facing string of the library; replace any of them with `provideBfLabels()`.\n *\n * @summary Every built-in user-facing string of the library, one key per string\n * @since 0.3.0\n */\nexport interface BfLabels {\n /**\n * bf-spinner's accessible name (a loading bf-button's spinner is decorative and has none).\n * @default 'Loading'\n */\n readonly loading: string;\n /**\n * bf-alert's dismiss button.\n * @default 'Dismiss'\n */\n readonly dismiss: string;\n /**\n * bf-tab-bar's navigation name.\n * @default 'Main'\n */\n readonly tabBar: string;\n /**\n * bf-tab's announcement of a numeric badge.\n * @default (count) => `${count} new`\n */\n readonly tabBadge: (count: number) => string;\n /**\n * bf-back-button's label.\n * @default 'Back'\n */\n readonly back: string;\n /**\n * BfAlertDialogService's default button.\n * @default 'OK'\n */\n readonly ok: string;\n /**\n * BfActionSheetService's cancel row.\n * @default 'Cancel'\n */\n readonly cancel: string;\n /**\n * An action sheet's name when it has no title.\n * @default 'Actions'\n */\n readonly actions: string;\n /**\n * bf-sheet's name without an ariaLabel or heading.\n * @default 'Sheet'\n */\n readonly sheet: string;\n /**\n * bf-modal's name without an ariaLabel or heading.\n * @default 'Modal'\n */\n readonly modal: string;\n /**\n * bf-refresher's status while refreshing.\n * @default 'Refreshing'\n */\n readonly refreshing: string;\n /**\n * bf-dialog's and bf-side-panel's close button, and bf-sheet's screen-reader Close.\n * @default 'Close'\n */\n readonly close: string;\n /**\n * bf-sheet's grabber button below the top snap point: the next press expands the sheet.\n * @default 'Expand'\n */\n readonly expand: string;\n /**\n * bf-sheet's grabber button at the top snap point: the next press collapses the sheet.\n * @default 'Collapse'\n */\n readonly collapse: string;\n /**\n * bf-sheet's snap position (1-based), announced politely when it changes and part of the\n * grabber button's name.\n * @default (position, count) => `Sheet at ${position} of ${count}`\n */\n readonly sheetPosition: (position: number, count: number) => string;\n /**\n * A dialog's or side panel's name without an ariaLabel, a title or a heading.\n * @default 'Dialog'\n */\n readonly dialog: string;\n /**\n * The desktop toast stack's region name.\n * @default 'Notifications'\n */\n readonly notifications: string;\n /**\n * bf-table's header checkbox, which selects or clears every row.\n * @default 'Select all rows'\n */\n readonly tableSelectAll: string;\n /**\n * The label of a stacked bf-table's sort select.\n * @default 'Sort by'\n */\n readonly tableSortBy: string;\n /**\n * A stacked bf-table's first sort option: rows in the order given, no column sorted.\n * @default 'Not sorted'\n */\n readonly tableSortNone: string;\n /**\n * A stacked bf-table's sort option for a column in ascending order.\n * @default (column) => `${column}, ascending`\n */\n readonly tableSortAscending: (column: string) => string;\n /**\n * A stacked bf-table's sort option for a column in descending order.\n * @default (column) => `${column}, descending`\n */\n readonly tableSortDescending: (column: string) => string;\n /**\n * bf-theme-switch's and bf-theme-menu-button's name without a label.\n * @default 'Theme'\n */\n readonly theme: string;\n /**\n * The theme choice that follows the system's colour scheme.\n * @default 'System'\n */\n readonly themeSystem: string;\n /**\n * The theme choice that forces the light colour scheme.\n * @default 'Light'\n */\n readonly themeLight: string;\n /**\n * The theme choice that forces the dark colour scheme.\n * @default 'Dark'\n */\n readonly themeDark: string;\n\n /**\n * bf-breadcrumb's navigation name.\n * @default 'Breadcrumb'\n */\n readonly breadcrumb: string;\n /**\n * bf-breadcrumb's ellipsis button, which shows the levels a `maxItems` trail hides.\n * @default (count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`)\n */\n readonly breadcrumbExpand: (count: number) => string;\n\n /**\n * bf-sidebar's and bf-top-nav's navigation name.\n * @default 'Main'\n */\n readonly navigation: string;\n /**\n * a[bfNavItem]'s announcement of its count badge.\n * @default (count) => `${count} new`\n */\n readonly navBadge: (count: number) => string;\n /**\n * bf-sidebar-toggle's name and tooltip while the sidebar is expanded.\n * @default 'Collapse sidebar'\n */\n readonly sidebarCollapse: string;\n /**\n * bf-sidebar-toggle's name and tooltip while the sidebar is an icon rail.\n * @default 'Expand sidebar'\n */\n readonly sidebarExpand: string;\n /**\n * bf-app-frame's skip link, the first stop of the tab order, which moves focus to the content.\n * @default 'Skip to main content'\n */\n readonly skipToContent: string;\n\n /**\n * bf-pagination's navigation name.\n * @default 'Pagination'\n */\n readonly pagination: string;\n /**\n * bf-pagination's button to the previous page.\n * @default 'Previous page'\n */\n readonly previousPage: string;\n /**\n * bf-pagination's button to the next page.\n * @default 'Next page'\n */\n readonly nextPage: string;\n /**\n * bf-pagination's compact position text, such as \"Page 3 of 12\".\n * @default (page, count) => `Page ${page} of ${count}`\n */\n readonly pageOf: (page: number, count: number) => string;\n /**\n * bf-pagination's name of one page button, such as \"Page 3\".\n * @default (page) => `Page ${page}`\n */\n readonly goToPage: (page: number) => string;\n /**\n * bf-tab-group's tablist name.\n * @default 'Tabs'\n */\n readonly tabGroup: string;\n /**\n * bf-calendar's button that shows the previous month.\n * @default 'Previous month'\n */\n readonly calendarPreviousMonth: string;\n /**\n * bf-calendar's button that shows the next month.\n * @default 'Next month'\n */\n readonly calendarNextMonth: string;\n /**\n * bf-calendar's title button in the day view, which opens the month view; read after the\n * visible month and year.\n * @default 'Choose month'\n */\n readonly calendarChooseMonth: string;\n /**\n * bf-calendar's title button in the month view, which opens the year view; read after the\n * visible year.\n * @default 'Choose year'\n */\n readonly calendarChooseYear: string;\n /**\n * bf-stat's hidden direction word before an upward delta, so colour is never the only signal.\n * @default 'Up'\n */\n readonly statTrendUp: string;\n /**\n * bf-stat's hidden direction word before a downward delta.\n * @default 'Down'\n */\n readonly statTrendDown: string;\n /**\n * bf-stat's hidden direction word before an unchanged (flat) delta.\n * @default 'No change'\n */\n readonly statTrendFlat: string;\n /**\n * bf-combobox's and bf-multi-combobox's list row when no option matches the typed text.\n * @default 'No results'\n */\n readonly comboboxEmpty: string;\n /**\n * bf-multi-combobox's remove button on a picked value's tag.\n * @default (label) => `Remove ${label}`\n */\n readonly comboboxRemove: (label: string) => string;\n /**\n * The day part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"dd\").\n * @default 'Day'\n */\n readonly dateInputDay: string;\n /**\n * The month part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"mm\").\n * @default 'Month'\n */\n readonly dateInputMonth: string;\n /**\n * The year part of bf-date-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"yyyy\").\n * @default 'Year'\n */\n readonly dateInputYear: string;\n /**\n * The button of bf-date-input and bf-datetime-input that opens the calendar, and the panel's name.\n * @default 'Choose date'\n */\n readonly dateInputOpenCalendar: string;\n /**\n * The error of bf-date-input and bf-datetime-input while the date is incomplete or does not\n * exist (31 February).\n * @default 'Enter a valid date'\n */\n readonly dateInputInvalid: string;\n /**\n * The error of bf-date-input and bf-datetime-input for a typed date that `disabledDate` rules out.\n * @default 'This date is not available'\n */\n readonly dateInputUnavailable: string;\n /**\n * The hour part of bf-time-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"hh\").\n * @default 'Hour'\n */\n readonly timeInputHour: string;\n /**\n * The minute part of bf-time-input and bf-datetime-input; its first letter is the part's\n * placeholder (\"mm\").\n * @default 'Minute'\n */\n readonly timeInputMinute: string;\n /**\n * The second part of bf-time-input with `seconds`; its first letter is the part's placeholder\n * (\"ss\").\n * @default 'Second'\n */\n readonly timeInputSecond: string;\n /**\n * The AM/PM part of bf-time-input and bf-datetime-input under a 12-hour clock.\n * @default 'AM/PM'\n */\n readonly timeInputDayPeriod: string;\n /**\n * The button of bf-time-input that opens the list of times, and the list's name.\n * @default 'Choose time'\n */\n readonly timeInputOpenList: string;\n /**\n * The error of bf-time-input and bf-datetime-input while the time is incomplete.\n * @default 'Enter a valid time'\n */\n readonly timeInputInvalid: string;\n /**\n * The error of bf-time-input and bf-datetime-input below `min`, given the limit as the locale\n * writes it.\n * @default (time) => `Pick ${time} or later`\n */\n readonly timeInputMin: (time: string) => string;\n /**\n * The error of bf-time-input and bf-datetime-input above `max`, given the limit as the locale\n * writes it.\n * @default (time) => `Pick ${time} or earlier`\n */\n readonly timeInputMax: (time: string) => string;\n /**\n * The name of a chart from `@bitforgehq/ui/charts` that has no `label` (and no `bf-chart-card` title).\n * @default 'Chart'\n */\n readonly chart: string;\n /**\n * The name of a chart's legend, the group of buttons that show and hide its series.\n * @default 'Legend'\n */\n readonly chartLegend: string;\n /**\n * The name of a chart's plot, the focusable area whose arrow keys move between the values.\n * @default 'Data points, arrow keys move between them'\n */\n readonly chartValues: string;\n /**\n * A chart's button that shows its data as a table.\n * @default 'Show data'\n */\n readonly chartShowData: string;\n /**\n * A chart's button that hides its data table again.\n * @default 'Hide data'\n */\n readonly chartHideData: string;\n /**\n * The first column header of a chart's data table.\n * @default 'Category'\n */\n readonly chartCategory: string;\n /**\n * The value column header of a bf-donut-chart's data table.\n * @default 'Value'\n */\n readonly chartValue: string;\n /**\n * bf-chart-card's text when it has no data and no `empty` slot.\n * @default 'No data to show'\n */\n readonly chartEmpty: string;\n /**\n * bf-chart-card's text when its data failed to load and it has no `error` slot.\n * @default 'The data could not be loaded'\n */\n readonly chartError: string;\n /**\n * bf-list-item's visually hidden state text before the title of an `unread` row.\n * @default 'Unread'\n */\n readonly listItemUnread: string;\n /** Default error text per validator kind (see `BfValidationMessages`). */\n readonly validation: BfValidationMessages;\n}\n\n/**\n * Options of `provideBfLabels()`: any key left out keeps the parent injector's string.\n *\n * @summary The strings provideBfLabels replaces, each one falling back to the parent\n * @since 0.3.0\n */\nexport type BfLabelsOverrides = Partial<Omit<BfLabels, 'validation'>> & {\n readonly validation?: Partial<BfValidationMessages>;\n};\n\n/**\n * The library's built-in English strings.\n *\n * @summary The library's built-in English strings, the labels every widget starts from\n * @since 0.3.0\n */\nexport const BF_DEFAULT_LABELS: BfLabels = {\n loading: 'Loading',\n dismiss: 'Dismiss',\n tabBar: 'Main',\n tabBadge: (count) => `${count} new`,\n back: 'Back',\n ok: 'OK',\n cancel: 'Cancel',\n actions: 'Actions',\n sheet: 'Sheet',\n modal: 'Modal',\n refreshing: 'Refreshing',\n close: 'Close',\n expand: 'Expand',\n collapse: 'Collapse',\n sheetPosition: (position, count) => `Sheet at ${position} of ${count}`,\n dialog: 'Dialog',\n notifications: 'Notifications',\n tableSelectAll: 'Select all rows',\n tableSortBy: 'Sort by',\n tableSortNone: 'Not sorted',\n tableSortAscending: (column) => `${column}, ascending`,\n tableSortDescending: (column) => `${column}, descending`,\n\n theme: 'Theme',\n themeSystem: 'System',\n themeLight: 'Light',\n themeDark: 'Dark',\n\n breadcrumb: 'Breadcrumb',\n breadcrumbExpand: (count) => (count === 1 ? 'Show 1 more level' : `Show ${count} more levels`),\n\n navigation: 'Main',\n navBadge: (count) => `${count} new`,\n sidebarCollapse: 'Collapse sidebar',\n sidebarExpand: 'Expand sidebar',\n skipToContent: 'Skip to main content',\n\n pagination: 'Pagination',\n previousPage: 'Previous page',\n nextPage: 'Next page',\n pageOf: (page, count) => `Page ${page} of ${count}`,\n goToPage: (page) => `Page ${page}`,\n tabGroup: 'Tabs',\n calendarPreviousMonth: 'Previous month',\n calendarNextMonth: 'Next month',\n calendarChooseMonth: 'Choose month',\n calendarChooseYear: 'Choose year',\n statTrendUp: 'Up',\n statTrendDown: 'Down',\n statTrendFlat: 'No change',\n comboboxEmpty: 'No results',\n comboboxRemove: (label) => `Remove ${label}`,\n dateInputDay: 'Day',\n dateInputMonth: 'Month',\n dateInputYear: 'Year',\n dateInputOpenCalendar: 'Choose date',\n dateInputInvalid: 'Enter a valid date',\n dateInputUnavailable: 'This date is not available',\n timeInputHour: 'Hour',\n timeInputMinute: 'Minute',\n timeInputSecond: 'Second',\n timeInputDayPeriod: 'AM/PM',\n timeInputOpenList: 'Choose time',\n timeInputInvalid: 'Enter a valid time',\n timeInputMin: (time) => `Pick ${time} or later`,\n timeInputMax: (time) => `Pick ${time} or earlier`,\n chart: 'Chart',\n chartLegend: 'Legend',\n chartValues: 'Data points, arrow keys move between them',\n chartShowData: 'Show data',\n chartHideData: 'Hide data',\n chartCategory: 'Category',\n chartValue: 'Value',\n chartEmpty: 'No data to show',\n chartError: 'The data could not be loaded',\n listItemUnread: 'Unread',\n validation: {\n required: 'Fill in this field',\n email: 'Enter a valid email address',\n pattern: 'Use the expected format',\n parse: 'Enter a valid number',\n min: (min) => `Enter ${min} or more`,\n max: (max) => `Enter ${max} or less`,\n minLength: (length) => `Use at least ${length} characters`,\n maxLength: (length) => `Use at most ${length} characters`,\n minDate: (date) => `Pick ${date.toLocaleDateString()} or later`,\n maxDate: (date) => `Pick ${date.toLocaleDateString()} or earlier`,\n fallback: 'Check this value',\n },\n};\n\n/**\n * The strings in effect for the current injector; set them with `provideBfLabels()`.\n *\n * @summary Injection token holding the user-facing strings in effect for an injector\n * @since 0.3.0\n */\nexport const BF_LABELS = new InjectionToken<BfLabels>('BF_LABELS', {\n providedIn: 'root',\n factory: () => BF_DEFAULT_LABELS,\n});\n\n/**\n * Replaces built-in strings, merged over the parent's (validation merged key by key); a key left\n * out or set to `undefined` keeps the parent's string. In `ApplicationConfig.providers` it covers\n * every string. In a component's `providers` it covers that sub-tree's widgets and form controls\n * (`loading`, `dismiss`, `tabBar`, `tabBadge`, `back`, `refreshing`, `tableSelectAll`, `tableSortBy`,\n * `tableSortNone`, `tableSortAscending`, `tableSortDescending`, `theme`, `themeSystem`, `themeLight`, `themeDark`,\n * `breadcrumb`, `breadcrumbExpand`, `navigation`, `navBadge`, `sidebarCollapse`, `sidebarExpand`,\n * `skipToContent`, `pagination`, `previousPage`, `nextPage`, `pageOf`, `goToPage`, `tabGroup`,\n * `calendarPreviousMonth`, `calendarNextMonth`, `calendarChooseMonth`, `calendarChooseYear`,\n * `statTrendUp`, `statTrendDown`, `statTrendFlat`, `comboboxEmpty`, `comboboxRemove`,\n * `dateInputDay`, `dateInputMonth`, `dateInputYear`, `dateInputOpenCalendar`, `dateInputInvalid`,\n * `dateInputUnavailable`, `timeInputHour`, `timeInputMinute`, `timeInputSecond`,\n * `timeInputDayPeriod`, `timeInputOpenList`, `timeInputInvalid`, `timeInputMin`, `timeInputMax`,\n * `chart`, `chartLegend`, `chartValues`, `chartShowData`, `chartHideData`, `chartCategory`,\n * `chartValue`, `chartEmpty`, `chartError`, `listItemUnread`, `validation`); the overlay services (`ok`, `cancel`,\n * `actions`, `sheet`, `modal`, `close`, `expand`, `collapse`, `sheetPosition`, `dialog`,\n * `notifications`) are root singletons and pick it up only when the caller passes its injector:\n * `open(…, { injector: inject(Injector) })`.\n *\n * @param overrides The strings to replace; any key left out keeps the parent's.\n * @returns The provider of `BF_LABELS`.\n * @summary Replaces built-in strings for an app or a sub-tree, such as a translation\n * @since 0.3.0\n */\nexport function provideBfLabels(overrides: BfLabelsOverrides): Provider {\n return {\n provide: BF_LABELS,\n useFactory: (): BfLabels =>\n mergeLabels(\n inject(BF_LABELS, { skipSelf: true, optional: true }) ?? BF_DEFAULT_LABELS,\n overrides,\n ),\n };\n}\n\n/** Key by key, so an `undefined` override never blanks the parent's string. */\nfunction mergeLabels(parent: BfLabels, o: BfLabelsOverrides): BfLabels {\n const v = o.validation ?? {};\n const pv = parent.validation;\n return {\n loading: o.loading ?? parent.loading,\n dismiss: o.dismiss ?? parent.dismiss,\n tabBar: o.tabBar ?? parent.tabBar,\n tabBadge: o.tabBadge ?? parent.tabBadge,\n back: o.back ?? parent.back,\n ok: o.ok ?? parent.ok,\n cancel: o.cancel ?? parent.cancel,\n actions: o.actions ?? parent.actions,\n sheet: o.sheet ?? parent.sheet,\n modal: o.modal ?? parent.modal,\n refreshing: o.refreshing ?? parent.refreshing,\n close: o.close ?? parent.close,\n expand: o.expand ?? parent.expand,\n collapse: o.collapse ?? parent.collapse,\n sheetPosition: o.sheetPosition ?? parent.sheetPosition,\n dialog: o.dialog ?? parent.dialog,\n notifications: o.notifications ?? parent.notifications,\n tableSelectAll: o.tableSelectAll ?? parent.tableSelectAll,\n tableSortBy: o.tableSortBy ?? parent.tableSortBy,\n tableSortNone: o.tableSortNone ?? parent.tableSortNone,\n tableSortAscending: o.tableSortAscending ?? parent.tableSortAscending,\n tableSortDescending: o.tableSortDescending ?? parent.tableSortDescending,\n\n theme: o.theme ?? parent.theme,\n themeSystem: o.themeSystem ?? parent.themeSystem,\n themeLight: o.themeLight ?? parent.themeLight,\n themeDark: o.themeDark ?? parent.themeDark,\n\n breadcrumb: o.breadcrumb ?? parent.breadcrumb,\n breadcrumbExpand: o.breadcrumbExpand ?? parent.breadcrumbExpand,\n\n navigation: o.navigation ?? parent.navigation,\n navBadge: o.navBadge ?? parent.navBadge,\n sidebarCollapse: o.sidebarCollapse ?? parent.sidebarCollapse,\n sidebarExpand: o.sidebarExpand ?? parent.sidebarExpand,\n skipToContent: o.skipToContent ?? parent.skipToContent,\n\n pagination: o.pagination ?? parent.pagination,\n previousPage: o.previousPage ?? parent.previousPage,\n nextPage: o.nextPage ?? parent.nextPage,\n pageOf: o.pageOf ?? parent.pageOf,\n goToPage: o.goToPage ?? parent.goToPage,\n tabGroup: o.tabGroup ?? parent.tabGroup,\n calendarPreviousMonth: o.calendarPreviousMonth ?? parent.calendarPreviousMonth,\n calendarNextMonth: o.calendarNextMonth ?? parent.calendarNextMonth,\n calendarChooseMonth: o.calendarChooseMonth ?? parent.calendarChooseMonth,\n calendarChooseYear: o.calendarChooseYear ?? parent.calendarChooseYear,\n statTrendUp: o.statTrendUp ?? parent.statTrendUp,\n statTrendDown: o.statTrendDown ?? parent.statTrendDown,\n statTrendFlat: o.statTrendFlat ?? parent.statTrendFlat,\n comboboxEmpty: o.comboboxEmpty ?? parent.comboboxEmpty,\n comboboxRemove: o.comboboxRemove ?? parent.comboboxRemove,\n dateInputDay: o.dateInputDay ?? parent.dateInputDay,\n dateInputMonth: o.dateInputMonth ?? parent.dateInputMonth,\n dateInputYear: o.dateInputYear ?? parent.dateInputYear,\n dateInputOpenCalendar: o.dateInputOpenCalendar ?? parent.dateInputOpenCalendar,\n dateInputInvalid: o.dateInputInvalid ?? parent.dateInputInvalid,\n dateInputUnavailable: o.dateInputUnavailable ?? parent.dateInputUnavailable,\n timeInputHour: o.timeInputHour ?? parent.timeInputHour,\n timeInputMinute: o.timeInputMinute ?? parent.timeInputMinute,\n timeInputSecond: o.timeInputSecond ?? parent.timeInputSecond,\n timeInputDayPeriod: o.timeInputDayPeriod ?? parent.timeInputDayPeriod,\n timeInputOpenList: o.timeInputOpenList ?? parent.timeInputOpenList,\n timeInputInvalid: o.timeInputInvalid ?? parent.timeInputInvalid,\n timeInputMin: o.timeInputMin ?? parent.timeInputMin,\n timeInputMax: o.timeInputMax ?? parent.timeInputMax,\n chart: o.chart ?? parent.chart,\n chartLegend: o.chartLegend ?? parent.chartLegend,\n chartValues: o.chartValues ?? parent.chartValues,\n chartShowData: o.chartShowData ?? parent.chartShowData,\n chartHideData: o.chartHideData ?? parent.chartHideData,\n chartCategory: o.chartCategory ?? parent.chartCategory,\n chartValue: o.chartValue ?? parent.chartValue,\n chartEmpty: o.chartEmpty ?? parent.chartEmpty,\n chartError: o.chartError ?? parent.chartError,\n listItemUnread: o.listItemUnread ?? parent.listItemUnread,\n validation: {\n required: v.required ?? pv.required,\n email: v.email ?? pv.email,\n pattern: v.pattern ?? pv.pattern,\n parse: v.parse ?? pv.parse,\n min: v.min ?? pv.min,\n max: v.max ?? pv.max,\n minLength: v.minLength ?? pv.minLength,\n maxLength: v.maxLength ?? pv.maxLength,\n minDate: v.minDate ?? pv.minDate,\n maxDate: v.maxDate ?? pv.maxDate,\n fallback: v.fallback ?? pv.fallback,\n },\n };\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DOCUMENT,\n DestroyRef,\n type EnvironmentProviders,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n type Signal,\n computed,\n effect,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n signal,\n} from '@angular/core';\n\n/**\n * The app's colour scheme choice: follow the system, or force light or dark.\n *\n * @summary The colour scheme choice, following the system or forcing light or dark\n * @since 0.3.1\n */\nexport type BfColorScheme = 'system' | 'light' | 'dark';\n\nconst STORAGE_KEY = 'bf-theme';\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/** The key-value store the choice is kept in: `getItem`/`setItem` of the Web Storage API. */\ntype BfColorSchemeStorage = Pick<Storage, 'getItem' | 'setItem'>;\n\n/**\n * A store in memory, gone with the app: where `localStorage` is unavailable, and in tests.\n * Internal: `provideBfShellTesting()` (`@bitforgehq/ui/mobile`) uses it through\n * `ɵcreateMemoryColorSchemeStorage`.\n */\nexport function createMemoryColorSchemeStorage(): BfColorSchemeStorage {\n const values = new Map<string, string>();\n return {\n getItem: (key) => values.get(key) ?? null,\n setItem: (key, value) => {\n values.set(key, String(value));\n },\n };\n}\n\n/** `localStorage`, or `null` where there is none or reading it throws (storage disabled, SSR).\n * Internal: `BF_SIDEBAR_STATE_STORAGE` (`sidebar-state.ts`) falls back the same way. */\nexport function browserStorage(): Storage | null {\n try {\n return typeof window !== 'undefined' && window.localStorage ? window.localStorage : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Where `BfColorSchemeService` keeps the colour scheme choice (the key `bf-theme`): `localStorage`\n * when it is available, otherwise an in-memory map. Provide another store (a native preferences\n * plugin, or an in-memory one in tests) to keep the choice elsewhere. `BF_THEME_STORAGE` from\n * `@bitforgehq/ui/mobile` is this same token.\n *\n * @example\n * providers: [{ provide: BF_COLOR_SCHEME_STORAGE, useValue: sessionStorage }]\n * @summary Injection token for the store that keeps the colour scheme choice between visits\n * @since 0.3.1\n */\nexport const BF_COLOR_SCHEME_STORAGE = new InjectionToken<Pick<Storage, 'getItem' | 'setItem'>>(\n 'BF_COLOR_SCHEME_STORAGE',\n {\n providedIn: 'root',\n factory: () => browserStorage() ?? createMemoryColorSchemeStorage(),\n },\n);\n\nfunction readStored(storage: BfColorSchemeStorage): BfColorScheme {\n try {\n const stored = storage.getItem(STORAGE_KEY);\n return stored === 'light' || stored === 'dark' || stored === 'system' ? stored : 'system';\n } catch {\n // Storage may be unavailable (private browsing, disabled storage); fall through.\n return 'system';\n }\n}\n\nfunction persist(storage: BfColorSchemeStorage, scheme: BfColorScheme): void {\n try {\n storage.setItem(STORAGE_KEY, scheme);\n } catch {\n // Ignore persistence failures (e.g. storage disabled).\n }\n}\n\n/**\n * The app's colour scheme: the user's choice (system, light, dark), kept in\n * `BF_COLOR_SCHEME_STORAGE` under `bf-theme`, and whether the app is dark now. With\n * `provideBfColorScheme()` (or `provideBfShell()` in a Capacitor app) it toggles the `dark` class\n * on `<html>` and stores every change; `prefers-color-scheme` is the source under `system` and is\n * followed live. Without either, the signals still compute but nothing is written, so a page that\n * 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\n * starts at `system`, light, and writes nothing. No Capacitor: a desktop web app uses it as is,\n * and the shell's `BfPlatformService.theme` and `dark` are these same signals.\n *\n * @example\n * private readonly colorScheme = inject(BfColorSchemeService);\n * toggle(): void { this.colorScheme.scheme.set(this.colorScheme.dark() ? 'light' : 'dark'); }\n * @summary The app colour scheme choice and dark state, applied to html and stored\n * @since 0.3.1\n */\n@Injectable({ providedIn: 'root' })\nexport class BfColorSchemeService {\n private readonly document = inject(DOCUMENT);\n private readonly storage = inject(BF_COLOR_SCHEME_STORAGE);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** The user's choice, stored when `provideBfColorScheme()` is provided; set it with\n * `scheme.set(…)`. */\n readonly scheme = signal<BfColorScheme>(this.browser ? readStored(this.storage) : 'system');\n private readonly prefersDark = signal(false);\n /** Whether the system prefers dark (`prefers-color-scheme: dark`), followed live. */\n readonly systemDark: Signal<boolean> = this.prefersDark.asReadonly();\n /** Whether the app is dark now: the choice, or the system's under `system`. */\n readonly dark = computed(() =>\n this.scheme() === 'system' ? this.prefersDark() : this.scheme() === 'dark',\n );\n\n private claimed = false;\n\n constructor() {\n if (this.browser) {\n this.followSystem();\n }\n }\n\n /**\n * Makes this service own `<html>` and the store, once: called by `provideBfColorScheme()` and\n * by the shell's `BfPlatformService`. Nothing is written on the server.\n * @internal\n */\n claimDocument(): void {\n if (this.claimed || !this.browser) {\n return;\n }\n this.claimed = true;\n // Applied synchronously, so the class (and the stored choice) is in place before any change\n // detection runs; the effect keeps later changes in sync.\n const html = this.document.documentElement;\n html.classList.toggle('dark', this.dark());\n persist(this.storage, this.scheme());\n effect(\n () => {\n // effect-justified: <html> class and localStorage are external to any view\n html.classList.toggle('dark', this.dark());\n persist(this.storage, this.scheme());\n },\n { injector: this.injector },\n );\n }\n\n private followSystem(): void {\n const view = this.document.defaultView;\n if (!view || typeof view.matchMedia !== 'function') {\n return;\n }\n const query = view.matchMedia(DARK_QUERY);\n this.prefersDark.set(query.matches);\n const onChange = (event: MediaQueryListEvent): void => this.prefersDark.set(event.matches);\n query.addEventListener('change', onChange);\n inject(DestroyRef).onDestroy(() => query.removeEventListener('change', onChange));\n }\n}\n\n/**\n * Lets `BfColorSchemeService` own the app's colour scheme: it toggles `dark` on `<html>`, follows\n * `prefers-color-scheme` under `system` and stores the choice (key `bf-theme`). For a desktop web\n * app; a Capacitor app gets it from `provideBfShell()`. Add it to `ApplicationConfig.providers`\n * and switch with `inject(BfColorSchemeService).scheme.set('dark')`.\n *\n * @example\n * export const appConfig: ApplicationConfig = { providers: [provideBfColorScheme()] };\n * @returns The providers that make the service own `<html>` and start it with the app.\n * @summary Applies the stored colour scheme choice to html, for desktop web apps\n * @since 0.3.1\n */\nexport function provideBfColorScheme(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n inject(BfColorSchemeService).claimDocument();\n }),\n ]);\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n type EnvironmentProviders,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n effect,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n signal,\n} from '@angular/core';\nimport { browserStorage, createMemoryColorSchemeStorage } from './color-scheme';\n\nconst STORAGE_KEY = 'bf-sidebar-collapsed';\n\n/** The key-value store the state is kept in: `getItem`/`setItem` of the Web Storage API. */\ntype BfSidebarStateStorage = Pick<Storage, 'getItem' | 'setItem'>;\n\n/**\n * Where `BfSidebarStateService` keeps whether the sidebar is collapsed (the key\n * `bf-sidebar-collapsed`, `'true'` or `'false'`): `localStorage` when it is available, otherwise\n * an in-memory map. Provide another store (`sessionStorage`, or an in-memory one in tests) to keep\n * it elsewhere.\n *\n * @example\n * providers: [{ provide: BF_SIDEBAR_STATE_STORAGE, useValue: sessionStorage }]\n * @summary Injection token for the store that keeps the collapsed sidebar between visits\n * @since 0.3.2\n */\nexport const BF_SIDEBAR_STATE_STORAGE = new InjectionToken<Pick<Storage, 'getItem' | 'setItem'>>(\n 'BF_SIDEBAR_STATE_STORAGE',\n {\n providedIn: 'root',\n factory: () => browserStorage() ?? createMemoryColorSchemeStorage(),\n },\n);\n\nfunction readStored(storage: BfSidebarStateStorage): boolean {\n try {\n return storage.getItem(STORAGE_KEY) === 'true';\n } catch {\n // Storage may be unavailable (private browsing, disabled storage); start expanded.\n return false;\n }\n}\n\nfunction persist(storage: BfSidebarStateStorage, collapsed: boolean): void {\n try {\n storage.setItem(STORAGE_KEY, String(collapsed));\n } catch {\n // Ignore persistence failures (e.g. storage disabled).\n }\n}\n\n/**\n * Whether the app's `bf-sidebar` is collapsed to an icon rail, remembered between visits: the app\n * binds the sidebar's `[(collapsed)]` to `sidebarState.collapsed`. With `provideBfSidebarState()`\n * every change is stored in `BF_SIDEBAR_STATE_STORAGE` under `bf-sidebar-collapsed`; without it\n * the signal still holds the state but nothing is written. Storage is read in the browser only, so a\n * server render starts expanded and writes nothing. The widgets never inject it.\n *\n * @example\n * protected readonly sidebarState = inject(BfSidebarStateService);\n * // <bf-sidebar [(collapsed)]=\"sidebarState.collapsed\">…</bf-sidebar>\n * @summary The sidebar's collapsed state, kept in storage between visits of the app\n * @since 0.3.2\n */\n@Injectable({ providedIn: 'root' })\nexport class BfSidebarStateService {\n private readonly storage = inject(BF_SIDEBAR_STATE_STORAGE);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Whether the sidebar is collapsed: the stored state in the browser, else false. Bind it\n * two-way to `bf-sidebar`'s `collapsed`. */\n readonly collapsed = signal(this.browser ? readStored(this.storage) : false);\n\n private claimed = false;\n\n /**\n * Starts storing every change, once: called by `provideBfSidebarState()`. Nothing is written on\n * the server.\n * @internal\n */\n claimStorage(): void {\n if (this.claimed || !this.browser) {\n return;\n }\n this.claimed = true;\n effect(\n () => {\n const collapsed = this.collapsed();\n // effect-justified: localStorage is external to any view\n persist(this.storage, collapsed);\n },\n { injector: this.injector },\n );\n }\n}\n\n/**\n * Lets `BfSidebarStateService` remember the collapsed sidebar: it stores every change of its\n * `collapsed` signal (key `bf-sidebar-collapsed`, `localStorage` in the browser), so the app opens\n * with the sidebar as the user left it. Add it to `ApplicationConfig.providers` and bind the\n * sidebar's `[(collapsed)]` to `sidebarState.collapsed`.\n *\n * @example\n * export const appConfig: ApplicationConfig = { providers: [provideBfSidebarState()] };\n * @returns The providers that make the service store the state and start it with the app.\n * @summary Remembers the collapsed sidebar between visits, for desktop web apps\n * @since 0.3.2\n */\nexport function provideBfSidebarState(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n inject(BfSidebarStateService).claimStorage();\n }),\n ]);\n}\n","import type { ValidationError } from '@angular/forms/signals';\n\n/**\n * Default text per validator kind, part of `BfLabels`; override with `provideBfLabels()`.\n *\n * @summary The default error text of each validator kind, shown under a form field\n * @since 0.3.0\n */\nexport interface BfValidationMessages {\n /**\n * `required` (Signal Forms and Reactive Forms; `Validators.requiredTrue` reports `required` too).\n * @default 'Fill in this field'\n */\n readonly required: string;\n /**\n * `email`.\n * @default 'Enter a valid email address'\n */\n readonly email: string;\n /**\n * `pattern`.\n * @default 'Use the expected format'\n */\n readonly pattern: string;\n /**\n * `parse`: the text could not be read as a value (e.g. a number field).\n * @default 'Enter a valid number'\n */\n readonly parse: string;\n /**\n * `min`, given the lower limit.\n * @default (min) => `Enter ${min} or more`\n */\n readonly min: (min: number) => string;\n /**\n * `max`, given the upper limit.\n * @default (max) => `Enter ${max} or less`\n */\n readonly max: (max: number) => string;\n /**\n * `minLength` (Signal Forms) and `minlength` (Reactive Forms), given the required length.\n * @default (length) => `Use at least ${length} characters`\n */\n readonly minLength: (length: number) => string;\n /**\n * `maxLength` (Signal Forms) and `maxlength` (Reactive Forms), given the allowed length.\n * @default (length) => `Use at most ${length} characters`\n */\n readonly maxLength: (length: number) => string;\n /**\n * `minDate`, given the earliest date.\n * @default (date) => `Pick ${date.toLocaleDateString()} or later`\n */\n readonly minDate: (date: Date) => string;\n /**\n * `maxDate`, given the latest date.\n * @default (date) => `Pick ${date.toLocaleDateString()} or earlier`\n */\n readonly maxDate: (date: Date) => string;\n /**\n * Any other kind without its own message.\n * @default 'Check this value'\n */\n readonly fallback: string;\n}\n\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === 'object' && value !== null;\n}\n\n/** A numeric field of the error itself (Signal Forms) or of its `context` (Reactive interop). */\nfunction numberField(error: ValidationError, key: string, contextKey: string): number | undefined {\n const own: unknown = Reflect.get(error, key);\n if (typeof own === 'number') {\n return own;\n }\n const context: unknown = Reflect.get(error, 'context');\n if (isRecord(context)) {\n const limit = context[contextKey];\n if (typeof limit === 'number') {\n return limit;\n }\n }\n return undefined;\n}\n\nfunction dateField(error: ValidationError, key: string): Date | undefined {\n const own: unknown = Reflect.get(error, key);\n return own instanceof Date ? own : undefined;\n}\n\nfunction withLimit<T>(\n limit: T | undefined,\n format: (limit: T) => string,\n fallback: string,\n): string {\n return limit === undefined ? fallback : format(limit);\n}\n\n/**\n * The text for one error: its own `message`, else the default for its `kind` (Signal Forms kinds\n * `required|email|pattern|parse|min|max|minLength|maxLength|minDate|maxDate`, and the Reactive\n * interop kinds `required|email|pattern|min|max|minlength|maxlength` whose limits sit\n * in `context`), else `fallback`. Reads limits through type guards, never `any`.\n *\n * @param error A Signal Forms error, or a Reactive Forms error adapted to one.\n * @param messages The default texts, usually `inject(BF_LABELS).validation`.\n * @returns The text to show under the field.\n * @summary Turns one validation error into the text a form field shows under it\n * @since 0.3.0\n */\nexport function bfValidationMessage(\n error: ValidationError,\n messages: BfValidationMessages,\n): string {\n if (error.message) {\n return error.message;\n }\n const { fallback } = messages;\n switch (error.kind) {\n case 'required':\n return messages.required;\n case 'email':\n return messages.email;\n case 'pattern':\n return messages.pattern;\n case 'parse':\n return messages.parse;\n case 'min':\n return withLimit(numberField(error, 'min', 'min'), messages.min, fallback);\n case 'max':\n return withLimit(numberField(error, 'max', 'max'), messages.max, fallback);\n case 'minLength':\n case 'minlength':\n return withLimit(\n numberField(error, 'minLength', 'requiredLength'),\n messages.minLength,\n fallback,\n );\n case 'maxLength':\n case 'maxlength':\n return withLimit(\n numberField(error, 'maxLength', 'requiredLength'),\n messages.maxLength,\n fallback,\n );\n case 'minDate':\n return withLimit(dateField(error, 'minDate'), messages.minDate, fallback);\n case 'maxDate':\n return withLimit(dateField(error, 'maxDate'), messages.maxDate, fallback);\n default:\n return fallback;\n }\n}\n","import { Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The diameter of a `bf-spinner`: sm, md or lg.\n *\n * @summary The three spinner diameters, from inline text to a page loading state\n * @since 0.1.0\n */\nexport type BfSpinnerSize = 'sm' | 'md' | 'lg';\n\n/* A CSS ring (no SVG): a faint `currentColor` track with a solid top arc. The ring (14/18/22 px)\n sits inset by a 1 px margin, so its margin box matches `bf-icon`'s sizes (16/20/24 px) and a\n spinner can stand in for an icon without a layout shift, while its outer edge stays close to the\n earlier SVG's (14/17.5/21 px). It rotates only when motion is allowed; under\n `prefers-reduced-motion` it pulses its opacity instead. Under forced colours the arc keeps a\n system-colour contrast against the track, which would otherwise be forced to one colour. */\nconst RING =\n 'block rounded-full border-solid border-current/25 border-t-current motion-safe:animate-spin motion-reduce:animate-pulse forced-colors:forced-color-adjust-none forced-colors:border-[GrayText] forced-colors:border-t-[CanvasText]';\nconst SIZE: Record<BfSpinnerSize, string> = {\n sm: 'size-3.5 m-px border-2',\n md: 'size-4.5 m-px border-2',\n lg: 'size-5.5 m-px border-[3px]',\n};\n/** The box of each size in px, as the deprecated `px` member reports it. */\nconst SIZE_PX: Record<BfSpinnerSize, number> = { sm: 16, md: 20, lg: 24 };\n\n/**\n * Indeterminate progress indicator. Inherits `currentColor`, so place it inside a colored parent\n * (a button, a muted paragraph) rather than coloring it directly.\n *\n * @example\n * <p class=\"flex items-center gap-2 text-text-muted\"><bf-spinner size=\"sm\" /> Loading recipes</p>\n * @summary Indeterminate loading spinner in three sizes that inherits its parent's text color\n * @category Feedback\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-spinner',\n host: { class: 'inline-flex shrink-0' },\n template: `\n <span\n class=\"inline-flex\"\n [attr.role]=\"decorative() ? null : 'status'\"\n [attr.aria-live]=\"decorative() ? null : 'polite'\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n >\n <span data-bf-spinner-ring [class]=\"ringClasses()\" aria-hidden=\"true\"></span>\n @if (!decorative()) {\n <span class=\"sr-only\">{{ name() }}</span>\n }\n </span>\n `,\n})\nexport class BfSpinnerComponent {\n /** Visual size: 16, 20 or 24 px (the `bf-icon` sizes). */\n readonly size = input<BfSpinnerSize>('md');\n /** Screen-reader text; keep it a short verb phrase. Empty falls back to `provideBfLabels()`'s\n * `loading` (\"Loading\"). Not rendered while `decorative`. */\n readonly label = input('');\n /** Hides the spinner from assistive tech (no status role, no live region, no label), for a\n * spinner inside a control that already reports its busy state, such as a loading `bf-button`. */\n readonly decorative = input(false, { transform: booleanAttribute });\n\n private readonly labels = inject(BF_LABELS);\n\n /** The spinner's box in px (16, 20 or 24) for its `size`.\n * @deprecated 0.3.0 use the size input; removed in 0.4.0 */\n readonly px = computed(() => SIZE_PX[this.size()]);\n /** @internal The ring's classes: the shared ring plus the size's box and border width. */\n readonly ringClasses = computed(() => `${RING} ${SIZE[this.size()]}`);\n /** The rendered screen-reader text: `label`, else the `loading` label. */\n readonly name = computed(() => this.label() || this.labels.loading);\n}\n","import type { BfSize } from '../../config/size';\n\n/* Touch-size hit areas for self-contained controls (buttons, chips, segments). Under a fine pointer\n the visual box is the hit area (sm 32 px is above the 24 px of WCAG 2.5.8), so dense desktop rows\n never overlap; under a coarse pointer an ::after extends it vertically to 44 px. Every part of the\n extension, not only the inset, sits behind `pointer-coarse:`. At `sm` it reaches up to 7.5 px past\n the visual edge (bordered), so stacked or wrapping rows of these controls need `gap-2` (8 px). Class strings stay literal so\n Tailwind finds them in the published bundle. */\n\n/** The positioned, empty ::after that carries the extension; add one inset class beside it. */\nexport const COARSE_HIT_BASE =\n \"pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:content-['']\";\n\n/**\n * Vertical hit extension of a 32/40/48 px pill, to 44 px under a coarse pointer. `bordered` boxes\n * (1.5 px border) position the ::after inside the border, so their inset adds the border back.\n */\nexport const PILL_HIT: Record<BfSize, Record<'plain' | 'bordered', string>> = {\n sm: {\n plain: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-1.5`,\n bordered: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-[calc(0.375rem+1.5px)]`,\n },\n md: {\n plain: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-0.5`,\n bordered: `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-[calc(0.125rem+1.5px)]`,\n },\n lg: { plain: '', bordered: '' },\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BfSpinnerComponent } from '../spinner/spinner.component';\n\n/**\n * The visual style of a `bf-button`: primary (filled), tonal (soft tint), outline, text or danger.\n *\n * @summary The five visual styles of a button, from filled primary to plain text\n * @since 0.1.0\n */\nexport type BfButtonVariant = 'primary' | 'tonal' | 'outline' | 'text' | 'danger';\n/**\n * Every value the `variant` input of a `bf-button` takes: the five `BfButtonVariant` styles plus\n * `ghost`, the quiet neutral one. A new type, so `Record`s and exhaustive switches over\n * `BfButtonVariant` keep compiling.\n *\n * @summary Every button style, the five variants plus the quiet neutral ghost\n * @since 0.3.1\n */\nexport type BfButtonAppearance = BfButtonVariant | 'ghost';\n/**\n * The height step of a `bf-button`; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for buttons, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfButtonSize = BfSize;\n/**\n * The native `type` of a `bf-button`: button, submit or reset.\n *\n * @summary The native button types, for a plain action, a form submit or reset\n * @since 0.1.0\n */\nexport type BfButtonType = 'button' | 'submit' | 'reset';\n\nconst BASE =\n 'relative inline-flex max-w-full min-w-0 items-center justify-center gap-2 rounded-control font-bold whitespace-nowrap ' +\n 'transition-colors duration-150 select-none focus-visible:outline-hidden ' +\n 'focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:bg-surface-sunken disabled:text-text-disabled disabled:border-transparent';\n\nconst VARIANT: Record<BfButtonAppearance, string> = {\n primary: 'bg-primary text-on-primary hover:bg-primary-hover',\n tonal: 'bg-primary-soft text-primary-strong hover:bg-primary-soft-hover',\n outline:\n 'bg-surface text-text border-[1.5px] border-border-strong hover:border-text-muted focus-visible:border-primary',\n text: 'bg-transparent text-primary-text hover:text-primary-strong',\n /* The hover label is danger-soft: it holds 4.5:1 on danger in both modes, whatever on-primary a\n custom primary derives. */\n danger: 'bg-danger-soft text-danger hover:bg-danger hover:text-danger-soft',\n /* Quiet and neutral: no tint at rest, a neutral surface on hover. For secondary toolbar actions\n and navigation rows. */\n ghost: 'bg-transparent text-text-muted hover:bg-surface-muted hover:text-text',\n};\n\n/* Pressed (while the pointer or Space/Enter holds the button down): one step past the hover fill.\n The text variant also takes the hover label, so a touch press (no hover) reads the same. The\n `<button>` form guards with `enabled:`, the `a[bfButton]` link with plain `active:` (a link is\n never `:enabled`). Added only while the control can act (not disabled or loading). Under forced\n colours the system colours win, so nothing changes there. */\ntype BfButtonPressedForm = 'button' | 'link';\nconst PRESSED: Record<BfButtonPressedForm, Record<BfButtonAppearance, string>> = {\n button: {\n primary: 'enabled:active:bg-primary-pressed',\n tonal: 'enabled:active:bg-primary-soft-pressed',\n outline: 'enabled:active:bg-primary-soft-pressed',\n text: 'enabled:active:bg-primary-soft-pressed enabled:active:text-primary-strong',\n danger: 'enabled:active:bg-danger-pressed enabled:active:text-danger-soft',\n ghost: 'enabled:active:bg-surface-pressed enabled:active:text-text',\n },\n link: {\n primary: 'active:bg-primary-pressed',\n tonal: 'active:bg-primary-soft-pressed',\n outline: 'active:bg-primary-soft-pressed',\n text: 'active:bg-primary-soft-pressed active:text-primary-strong',\n danger: 'active:bg-danger-pressed active:text-danger-soft',\n ghost: 'active:bg-surface-pressed active:text-text',\n },\n};\n\n/* The current page (`aria-current=\"page\"`, which `routerLinkActive` with\n `ariaCurrentWhenActive=\"page\"` sets) on `a[bfButton]`: the quiet variants take the tonal fill, so\n a nav row shows where the user is without a [variant] switch; outline draws its border in\n primary. These rules come after hover and pressed in the stylesheet, so they carry their own\n hover and pressed steps. The filled variants are not nav items and stay as they are. Under forced colours an\n outline marks it, as the fill is dropped there. Links only: a <button> is never \"current\". */\nconst CURRENT_BASE =\n 'forced-colors:aria-[current=page]:outline-2 forced-colors:aria-[current=page]:outline-offset-2 forced-colors:aria-[current=page]:outline-[LinkText]';\nconst CURRENT_FILL =\n 'aria-[current=page]:bg-primary-soft aria-[current=page]:text-primary-strong aria-[current=page]:hover:bg-primary-soft-hover aria-[current=page]:hover:text-primary-strong aria-[current=page]:active:bg-primary-soft-pressed';\nconst CURRENT: Record<BfButtonAppearance, string> = {\n primary: '',\n tonal: '',\n danger: '',\n outline: `${CURRENT_BASE} aria-[current=page]:border-primary aria-[current=page]:text-primary-strong`,\n text: `${CURRENT_BASE} ${CURRENT_FILL}`,\n ghost: `${CURRENT_BASE} ${CURRENT_FILL}`,\n};\n\n/* Loading is not native `disabled` (that would drop keyboard focus to <body>): the button keeps its\n variant fill and reports itself through `aria-disabled` and `aria-busy`; only the cursor changes. */\ntype BfButtonState = 'idle' | 'loading';\nconst STATE: Record<BfButtonState, string> = {\n idle: 'cursor-pointer',\n loading: 'cursor-progress',\n};\n\n/* Heights 32/40/48 from the design. Under a coarse pointer PILL_HIT extends sm and md to 44 px\n without changing the visual; the outline variant's entry adds its 1.5 px border back. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 text-label-xs',\n md: 'h-10 text-label-sm',\n lg: 'h-12 text-label',\n};\n\nconst PADDING: Record<BfSize, string> = { sm: 'px-3.5', md: 'px-4.5', lg: 'px-6' };\n\n/* The text and ghost variants have no surface at rest, so they get tighter horizontal padding. */\nconst TEXT_PADDING: Record<BfSize, string> = { sm: 'px-2', md: 'px-3', lg: 'px-3' };\n\n/** The class maps of bf-button, shared with `bf-menu-button` (`@bitforgehq/ui/overlay`) through\n * the internal `ɵBF_BUTTON_CLASSES` export so the two never drift. */\nexport const BUTTON_CLASSES = {\n base: BASE,\n variant: VARIANT,\n pressed: PRESSED.button,\n current: CURRENT,\n size: SIZE,\n padding: PADDING,\n textPadding: TEXT_PADDING,\n} as const;\n\n/**\n * Pill-shaped action button with six variants, three sizes, a loading state and icon slots. Put\n * the label in the default slot and icons in the `icon-start` / `icon-end` slots; never place a\n * `bf-button` inside another interactive element. For navigation, put `bfButton` on your own `<a>`\n * (with `href` or `routerLink`): it renders as a real link that looks like the button.\n *\n * @example\n * <bf-button (clicked)=\"save()\">Save changes</bf-button>\n * <bf-button variant=\"tonal\" size=\"sm\" [loading]=\"saving()\">\n * <bf-icon bfSlot=\"icon-start\" [icon]=\"Plus\" />\n * New task\n * </bf-button>\n * <a bfButton variant=\"outline\" routerLink=\"/projects\">All projects</a>\n * <a bfButton variant=\"ghost\" routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">Inbox</a>\n * @summary Pill-shaped action button with five variants, three sizes and a loading state\n * @category Actions\n * @since 0.1.0\n * @slot icon-start An icon before the label.\n * @slot default The label.\n * @slot icon-end An icon after the label.\n */\n@Component({\n selector: 'bf-button, a[bfButton]',\n imports: [BfSpinnerComponent, NgTemplateOutlet],\n host: { '[class]': 'hostClasses()', '(click)': 'onHostClick($event)' },\n template: `\n @if (isLink) {\n <!-- a[bfButton]: the consumer's <a> is the control; no inner button. -->\n <ng-container *ngTemplateOutlet=\"content\" />\n } @else {\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"loading() ? 'true' : null\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content>\n @if (loading() && !isLink) {\n <!-- md = 20 px, the default bf-icon size, so the swap keeps the button's width. -->\n <bf-spinner size=\"md\" decorative />\n } @else {\n <ng-content select=\"[bfSlot=icon-start]\" />\n }\n <!-- The label truncates with an ellipsis in a narrow container; the icons keep their size. -->\n <span data-label class=\"max-w-full min-w-0 truncate empty:hidden\"><ng-content /></span>\n <ng-content select=\"[bfSlot=icon-end]\" />\n </ng-template>\n `,\n})\nexport class BfButtonComponent {\n /** Visual style: primary (filled), tonal (soft tint), outline, text, danger, or ghost (quiet\n * neutral). On `a[bfButton]`, `ghost`, `text` and `outline` also show `aria-current=\"page\"`. */\n readonly variant = input<BfButtonAppearance>('primary');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,\n * `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Native button type. Use `submit` inside a form. Ignored on `a[bfButton]`. */\n readonly type = input<BfButtonType>('button');\n /** Disables the control and swallows clicks. Ignored on `a[bfButton]`: a link is never\n * disabled; render a disabled `bf-button` instead. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows a spinner instead of the start icon and blocks activation. The button stays focusable\n * (`aria-disabled` and `aria-busy`, never native `disabled`) and keeps its variant fill. Ignored\n * on `a[bfButton]`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretches the button to its container's width. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n /** Emitted on click while enabled and not loading; on `a[bfButton]`, on every click (the link\n * still navigates). */\n readonly clicked = output<Event>();\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** Whether the host is the consumer's `<a>` (`a[bfButton]`) rather than a `bf-button` element. */\n protected readonly isLink =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.tagName === 'A';\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const padding = variant === 'text' || variant === 'ghost' ? TEXT_PADDING[size] : PADDING[size];\n const hit = PILL_HIT[size][variant === 'outline' ? 'bordered' : 'plain'];\n const width = this.fullWidth() ? 'w-full' : '';\n const state: BfButtonState = this.loading() && !this.isLink ? 'loading' : 'idle';\n const pressed = this.isLink\n ? PRESSED.link[variant]\n : this.disabled() || this.loading()\n ? ''\n : PRESSED.button[variant];\n const current = this.isLink ? CURRENT[variant] : '';\n return [BASE, VARIANT[variant], pressed, current, STATE[state], SIZE[size], hit, padding, width]\n .filter(Boolean)\n .join(' ');\n });\n\n /** The host's classes: the whole button on a link, else the wrapper's display and width. A link\n * adds `no-underline!`: important, so an unlayered global rule of the app\n * (`a { text-decoration: underline }`) cannot underline it, as it would beat a layered utility. */\n readonly hostClasses = computed(() => {\n if (this.isLink) {\n return `${this.classes()} no-underline!`;\n }\n return this.fullWidth() ? 'inline-flex max-w-full w-full' : 'inline-flex max-w-full';\n });\n\n /**\n * A click on `a[bfButton]` emits `clicked`; the browser (or `routerLink`) still follows it.\n * @internal\n */\n onHostClick(event: Event): void {\n if (this.isLink) {\n this.clicked.emit(event);\n }\n }\n\n /**\n * The inner button's click: emits `clicked` unless disabled or loading.\n * @internal\n */\n onClick(event: Event): void {\n if (this.loading()) {\n // Still focusable and clickable while loading: cancel the click so a submit button cannot\n // submit its form again.\n event.preventDefault();\n return;\n }\n if (this.disabled()) {\n return;\n }\n this.clicked.emit(event);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { type BfButtonType } from '../button/button.component';\n\n/**\n * The visual style of a `bf-icon-button`: tonal, primary, outline or text.\n *\n * @summary The four visual styles of an icon button, from tonal to plain text\n * @since 0.1.0\n */\nexport type BfIconButtonVariant = 'tonal' | 'primary' | 'outline' | 'text';\n\nconst BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-control transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:bg-surface-sunken disabled:text-text-disabled disabled:border-transparent';\n\nconst VARIANT: Record<BfIconButtonVariant, string> = {\n tonal: 'bg-primary-soft text-primary-strong hover:bg-primary-soft-hover',\n primary: 'bg-primary text-on-primary hover:bg-primary-hover',\n outline:\n 'bg-surface text-text border-[1.5px] border-border-strong hover:border-text-muted focus-visible:border-primary',\n text: 'bg-transparent text-text-muted hover:bg-surface-muted hover:text-text',\n};\n\n/* Pressed: one step past the hover fill (the text variant takes the soft pressed tint and the\n hover icon colour); added only while enabled. The `<button>` form guards with `enabled:`, the\n `a[bfIconButton]` link with plain `active:` (a link is never `:enabled`), as bf-button does. */\ntype BfIconButtonPressedForm = 'button' | 'link';\nconst PRESSED: Record<BfIconButtonPressedForm, Record<BfIconButtonVariant, string>> = {\n button: {\n tonal: 'enabled:active:bg-primary-soft-pressed',\n primary: 'enabled:active:bg-primary-pressed',\n outline: 'enabled:active:bg-primary-soft-pressed',\n text: 'enabled:active:bg-primary-soft-pressed enabled:active:text-text',\n },\n link: {\n tonal: 'active:bg-primary-soft-pressed',\n primary: 'active:bg-primary-pressed',\n outline: 'active:bg-primary-soft-pressed',\n text: 'active:bg-primary-soft-pressed active:text-text',\n },\n};\n\n/* Square boxes 32/40/48. Under a coarse pointer sm and md extend the hit area vertically to 44 px\n (PILL_HIT, as bf-button), so adjacent icon buttons in a toolbar don't overlap horizontally. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 w-8',\n md: 'h-10 w-10',\n lg: 'h-12 w-12',\n};\n\n/** The class maps of bf-icon-button, shared with `bf-menu-button` (`@bitforgehq/ui/overlay`)\n * through the internal `ɵBF_ICON_BUTTON_CLASSES` export so the two never drift. */\nexport const ICON_BUTTON_CLASSES = {\n base: BASE,\n variant: VARIANT,\n pressed: PRESSED.button,\n size: SIZE,\n} as const;\n\n/**\n * Round button that holds a single icon, for toolbars, headers and list rows. The `label` is\n * required because the icon alone gives assistive tech no name. For navigation, put\n * `bfIconButton` on your own `<a>` (with `href` or `routerLink`): it renders as a real link that\n * looks like the icon button.\n *\n * @example\n * <bf-icon-button label=\"Search\" (clicked)=\"openSearch()\">\n * <bf-icon [icon]=\"Search\" />\n * </bf-icon-button>\n * <a bfIconButton label=\"Edit project\" routerLink=\"/projects/atlas/edit\">\n * <bf-icon [icon]=\"Pencil\" />\n * </a>\n * @summary Round icon-only button for toolbars and rows, with a required accessible label\n * @category Actions\n * @since 0.1.0\n * @slot default The icon, a `bf-icon`.\n */\n@Component({\n selector: 'bf-icon-button, a[bfIconButton]',\n imports: [NgTemplateOutlet],\n host: {\n '[class]': 'hostClasses()',\n '[attr.aria-label]': 'isLink ? label() : null',\n '(click)': 'onHostClick($event)',\n },\n template: `\n @if (isLink) {\n <!-- a[bfIconButton]: the consumer's <a> is the control; no inner button. -->\n <ng-container *ngTemplateOutlet=\"content\" />\n } @else {\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"label()\"\n [class]=\"classes()\"\n (click)=\"onClick($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content><ng-content /></ng-template>\n `,\n})\nexport class BfIconButtonComponent {\n /** Visual style: tonal (soft tint, default), primary, outline, text. */\n readonly variant = input<BfIconButtonVariant>('tonal');\n /** Height step: sm 32, md 40, lg 48 px (square); unset follows `provideBfDefaults()`\n * (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Native button type. Ignored on `a[bfIconButton]`. */\n readonly type = input<BfButtonType>('button');\n /** Disables the control and swallows clicks. Ignored on `a[bfIconButton]`: a link is never\n * disabled; render a disabled `bf-icon-button` instead. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name announced instead of the icon; on `a[bfIconButton]`, the link's\n * `aria-label`. */\n readonly label = input.required<string>();\n\n /** Emitted on click while enabled; on `a[bfIconButton]`, on every click (the link still\n * navigates). */\n readonly clicked = output<Event>();\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** Whether the host is the consumer's `<a>` (`a[bfIconButton]`) rather than a\n * `bf-icon-button` element. */\n protected readonly isLink =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.tagName === 'A';\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const hit = PILL_HIT[size][variant === 'outline' ? 'bordered' : 'plain'];\n const pressed = this.isLink\n ? PRESSED.link[variant]\n : this.disabled()\n ? ''\n : PRESSED.button[variant];\n return [BASE, VARIANT[variant], pressed, SIZE[size], hit].filter(Boolean).join(' ');\n });\n\n /** The host's classes: the whole icon button on a link (with `no-underline!`, so an unlayered\n * global link rule cannot underline it), else the wrapper's display. */\n readonly hostClasses = computed(() =>\n this.isLink ? `${this.classes()} no-underline!` : 'inline-flex',\n );\n\n /**\n * A click on `a[bfIconButton]` emits `clicked`; the browser (or `routerLink`) still follows it.\n * @internal\n */\n onHostClick(event: Event): void {\n if (this.isLink) {\n this.clicked.emit(event);\n }\n }\n\n /**\n * The inner button's click: emits `clicked` unless disabled.\n * @internal\n */\n onClick(event: Event): void {\n if (this.disabled()) {\n return;\n }\n this.clicked.emit(event);\n }\n}\n","import { Component, computed, input } from '@angular/core';\n\n/**\n * The tone of a `bf-badge`: neutral, primary, success, warning or danger.\n *\n * @summary The five tones of a badge, from neutral counts to danger states\n * @since 0.1.0\n */\nexport type BfBadgeVariant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger';\n/**\n * Every tone the `variant` input of a `bf-badge` takes: the five `BfBadgeVariant` tones plus\n * `info`, for an informational label such as a category. A new type, so `Record`s and exhaustive\n * switches over `BfBadgeVariant` keep compiling.\n *\n * @summary Every badge tone, the five variants plus the informational info tone\n * @since 0.3.1\n */\nexport type BfBadgeAppearance = BfBadgeVariant | 'info';\n/**\n * How loud a `bf-badge` is: `soft`, a pale tint with tinted text (the default), or `strong`, a\n * solid fill with contrasting text for the one state that must stand out, such as \"Critical\".\n *\n * @summary The two badge emphases, the soft tint or the solid strong fill\n * @since 0.4.0\n */\nexport type BfBadgeEmphasis = 'soft' | 'strong';\n\nconst LABEL_BASE =\n 'inline-flex items-center rounded-control px-2.5 py-1.25 text-micro font-bold leading-none';\nconst COUNT_BASE =\n 'inline-flex h-box min-w-box items-center justify-center rounded-control px-1.75 text-micro font-bold leading-none';\n/** The soft count pill: primary whatever the variant (the look before `emphasis`). */\nconst COUNT_SOFT = 'bg-primary text-on-primary';\n/* A solid fill vanishes in forced colours (backgrounds turn Canvas), so a strong badge keeps a\n CanvasText outline there and still reads as a filled pill next to a soft one. */\nconst STRONG_FORCED = 'forced-colors:outline forced-colors:outline-[CanvasText]';\n\nconst VARIANT: Record<BfBadgeAppearance, string> = {\n neutral: 'bg-neutral-soft text-neutral',\n primary: 'bg-primary-soft text-primary-strong',\n success: 'bg-success-soft text-success',\n warning: 'bg-warning-soft text-warning',\n danger: 'bg-danger-soft text-danger',\n info: 'bg-info-soft text-info',\n};\n\n/** Solid fills for `emphasis=\"strong\"`; primary reuses the brand fill. Each pair is >= 4.5:1. */\nconst STRONG: Record<BfBadgeAppearance, string> = {\n neutral: 'bg-neutral-strong text-on-neutral-strong',\n primary: 'bg-primary text-on-primary',\n success: 'bg-success-strong text-on-success-strong',\n warning: 'bg-warning-strong text-on-warning-strong',\n danger: 'bg-danger-strong text-on-danger-strong',\n info: 'bg-info-strong text-on-info-strong',\n};\n\n/**\n * Status label (\"On track\", \"At risk\") or, with `count`, a compact numeric pill for unread counts.\n *\n * @example\n * <bf-badge variant=\"warning\">At risk</bf-badge>\n * <bf-badge variant=\"danger\" emphasis=\"strong\">Critical</bf-badge>\n * <bf-badge [count]=\"unread()\" countLabel=\"unread messages\" />\n * @summary Small status label in semantic tones, or a compact numeric pill for counts\n * @category Data display\n * @since 0.1.0\n * @slot default The badge text, shown when no `count` is set.\n */\n@Component({\n selector: 'bf-badge',\n host: { class: 'inline-flex' },\n template: `\n @if (countText(); as text) {\n <span [class]=\"countClasses()\"\n >{{ text }}\n @if (countLabel()) {\n <span class=\"sr-only\"> {{ countLabel() }}</span>\n }\n </span>\n } @else {\n <span [class]=\"classes()\"><ng-content /></span>\n }\n `,\n})\nexport class BfBadgeComponent {\n /** Tint for the label style: neutral, primary, success, warning, danger or info. Ignored by a\n * soft count pill; a strong one takes its fill from it. */\n readonly variant = input<BfBadgeAppearance>('neutral');\n /** `soft` (a pale tint, the default) or `strong` (a solid fill with contrasting text, also for\n * the count pill). */\n readonly emphasis = input<BfBadgeEmphasis>('soft');\n /** Switches to the count pill; values above 99 render as \"99+\". */\n readonly count = input<number | undefined>(undefined);\n /** What the count counts (\"unread messages\"), read by assistive tech after the number (\"99+\n * unread messages\"); visually hidden. Only used with `count`. */\n readonly countLabel = input('');\n\n readonly classes = computed(() =>\n this.emphasis() === 'strong'\n ? `${LABEL_BASE} ${STRONG[this.variant()]} ${STRONG_FORCED}`\n : `${LABEL_BASE} ${VARIANT[this.variant()]}`,\n );\n readonly countText = computed(() => {\n const c = this.count();\n return c === undefined ? null : c > 99 ? '99+' : String(c);\n });\n readonly countClasses = computed(() =>\n this.emphasis() === 'strong'\n ? `${COUNT_BASE} ${STRONG[this.variant()]} ${STRONG_FORCED}`\n : `${COUNT_BASE} ${COUNT_SOFT}`,\n );\n}\n","import {\n DOCUMENT,\n type Signal,\n type WritableSignal,\n computed,\n inject,\n linkedSignal,\n signal,\n} from '@angular/core';\n\n/*\n * Holds a layout-changing value (a field's error message) while a pointer button is down.\n *\n * A field is marked touched on blur, and a mouse press on another control (the form's Save button)\n * blurs it on mousedown. Showing the new error text right then pushes everything below the field\n * down by a line (about 22 px), so the mouseup lands off the button and its click is lost. While a\n * pointer is pressed anywhere in the document the held value keeps what it showed at the press;\n * it catches up one task after the release (after the click that release makes), or at once on\n * the first key press or button-less pointer move, in case the release never reached the page (a\n * native select's picker, a drag out of the window).\n */\n\n/** Per document: whether a pointer button is held down. */\nconst PRESSED = new WeakMap<Document, WritableSignal<boolean>>();\n\nfunction pointerPressed(doc: Document): Signal<boolean> {\n const known = PRESSED.get(doc);\n if (known) {\n return known;\n }\n const pressed = signal(false);\n PRESSED.set(doc, pressed);\n const view = doc.defaultView;\n // Server renders (no window) and non-DOM documents never hold.\n if (!view || typeof doc.addEventListener !== 'function') {\n return pressed;\n }\n const options: AddEventListenerOptions = { capture: true, passive: true };\n // A task later, so the click the release makes is dispatched before the layout moves.\n const release = (): void => {\n view.setTimeout(() => pressed.set(false));\n };\n // The primary mouse button, a touch or a pen: a right-click's context menu can swallow the\n // release, so it never starts a hold.\n doc.addEventListener(\n 'pointerdown',\n (event) => {\n if (event.button === 0 || event.pointerType === 'touch' || event.pointerType === 'pen') {\n pressed.set(true);\n }\n },\n options,\n );\n doc.addEventListener('pointerup', release, options);\n doc.addEventListener('pointercancel', release, options);\n doc.addEventListener('keydown', () => pressed.set(false), options);\n doc.addEventListener(\n 'pointermove',\n (event) => {\n if (event.buttons === 0 && pressed()) {\n pressed.set(false);\n }\n },\n options,\n );\n view.addEventListener('blur', release);\n return pressed;\n}\n\n/** A message paragraph that never moves the layout under a pressed pointer. */\nexport interface HeldMessage {\n /** The text to render: the current one, else (while pressed) the one still on screen. */\n readonly text: Signal<string>;\n /** Render it visually hidden (`sr-only`): a new message that arrived during the press. It is in\n * the DOM at once, so the ids that point at it resolve and assistive tech reads it; it becomes\n * visible, as the same element, once the press ends. */\n readonly hidden: Signal<boolean>;\n}\n\n/**\n * The paragraph state for a message `source` (an error text) under `heldWhilePressed`: a message\n * that appears during a press renders at once but visually hidden; one that disappears stays\n * visible until the press ends. Call it in an injection context.\n */\nexport function heldMessage(source: () => string): HeldMessage {\n const shown = heldWhilePressed(source);\n // Both read `shown` first, every time: a linkedSignal only remembers the values it was read\n // at, so skipping it while `source` is set would lose the text to hold when it disappears.\n return {\n text: computed(() => {\n const held = shown();\n return source() || held;\n }),\n hidden: computed(() => {\n const held = shown();\n return !held && Boolean(source());\n }),\n };\n}\n\n/**\n * `source`, except that while a pointer button is held down anywhere in the document it keeps the\n * value it had when the press began, and catches up once the press ends. Call it in an injection\n * context (a component field initializer).\n */\nexport function heldWhilePressed<T>(source: () => T): Signal<T> {\n const pressed = pointerPressed(inject(DOCUMENT));\n return linkedSignal<{ value: T; pressed: boolean }, T>({\n source: () => ({ value: source(), pressed: pressed() }),\n computation: (next, previous) => (next.pressed && previous ? previous.value : next.value),\n }).asReadonly();\n}\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\nimport { heldMessage } from '../_shared/pointer-hold';\n\n/**\n * Label, help text and error text around a form control, with the id wiring assistive tech needs.\n * The form widgets use it internally; use it directly only to dress a custom control the same way.\n *\n * @example\n * <bf-field #field label=\"Project name\" helpText=\"Shown to your team\" controlId=\"project\">\n * <input id=\"project\" [class]=\"controlClass\" [attr.aria-describedby]=\"field.describedBy()\" />\n * </bf-field>\n * @summary Label, help text and error text wrapper that wires ids for assistive tech\n * @category Forms\n * @since 0.1.0\n * @slot default The control the field labels, such as a native input styled with `bfFieldControlClass`.\n */\n@Component({\n selector: 'bf-field',\n host: { class: 'block' },\n // Label, help and error text break long words anywhere (a German or Finnish compound in a narrow\n // column) instead of running past the field's edge.\n template: `\n <div class=\"group/bf-field flex flex-col gap-1.5\">\n @if (label()) {\n <label\n [for]=\"controlId()\"\n class=\"text-caption text-text-muted group-focus-within/bf-field:text-primary-text wrap-anywhere\"\n [class.text-text-disabled]=\"disabled()\"\n >\n {{ label() }}\n @if (required()) {\n <span class=\"text-danger\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n <ng-content />\n @if (helpText()) {\n <p [id]=\"helpId()\" class=\"text-text-muted text-micro wrap-anywhere\">{{ helpText() }}</p>\n }\n @if (message.text(); as text) {\n <p\n [id]=\"errorId()\"\n class=\"text-danger text-micro wrap-anywhere\"\n [class.sr-only]=\"message.hidden()\"\n >\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfFieldComponent {\n /** Visible label; rendered as a `<label for>` pointing at `controlId`. */\n readonly label = input('');\n /** Helper text under the control; stays while `error` is shown. */\n readonly helpText = input('');\n /** Error text under the help text. One that appears while a pointer button is held down (the\n * press on a Save button that blurred the field) renders visually hidden until the press ends,\n * so assistive tech has it at once and the layout never moves under the pointer between\n * mousedown and mouseup. */\n readonly error = input('');\n /** Adds the required marker to the label. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Dims the label; the control carries its own disabled styling. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The id of the control inside the default slot. */\n readonly controlId = input.required<string>();\n\n readonly helpId = computed(() => `${this.controlId()}-help`);\n readonly errorId = computed(() => `${this.controlId()}-error`);\n /** The error paragraph: `error`, visually hidden while a press holds the layout. */\n protected readonly message = heldMessage(this.error);\n /** Value for the control's `aria-describedby`: the help id and the error id, each while it is\n * set (`\"<id>-help <id>-error\"`), else null; the paragraphs render whenever they are named. */\n readonly describedBy = computed(() => {\n const ids = [this.helpText() ? this.helpId() : '', this.error() ? this.errorId() : ''].filter(\n Boolean,\n );\n return ids.length > 0 ? ids.join(' ') : null;\n });\n}\n","import type { BfSize } from '../../config/size';\n\n/* Class maps of the single-line text fields (bf-input, bf-select, and bf-number-input from 0.3):\n one BfSize step each, in logical (RTL-ready) utilities. */\n\n/** Field box: height and type per step (32 / 40 / 48 px). */\nexport const FIELD_BOX: Record<BfSize, string> = {\n sm: 'h-8 text-label-xs',\n md: 'h-10 text-label-sm',\n lg: 'h-12 text-label',\n};\n\n/** Inline-start padding of the text, without and with an `icon-start` slot. */\nexport const FIELD_PADDING_START: Record<BfSize, Record<'text' | 'icon', string>> = {\n sm: { text: 'ps-3', icon: 'ps-9' },\n md: { text: 'ps-3.5', icon: 'ps-10' },\n lg: { text: 'ps-4', icon: 'ps-11' },\n};\n\n/** Inline-end padding of the text, without and with an `icon-end` slot. */\nexport const FIELD_PADDING_END: Record<BfSize, Record<'text' | 'icon', string>> = {\n sm: { text: 'pe-3', icon: 'pe-9' },\n md: { text: 'pe-3.5', icon: 'pe-10' },\n lg: { text: 'pe-4', icon: 'pe-11' },\n};\n\n/** Inset of the `icon-start` slot from the field's inline-start edge. */\nexport const FIELD_ICON_START: Record<BfSize, string> = {\n sm: 'start-3',\n md: 'start-3.5',\n lg: 'start-4',\n};\n\n/** Inset of the `icon-end` slot from the field's inline-end edge. */\nexport const FIELD_ICON_END: Record<BfSize, string> = {\n sm: 'end-3',\n md: 'end-3.5',\n lg: 'end-4',\n};\n\n/** Box of a text-entry control: shape, border width, surface, focus ring and the native states. */\nexport const FIELD_CONTROL_BASE =\n 'block w-full rounded-field border bg-surface text-text placeholder:text-text-muted ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'read-only:bg-surface-muted disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/**\n * The field state `bfFieldControlClass` styles a control for.\n *\n * @summary The size and state a custom field control is styled for by bfFieldControlClass\n * @since 0.3.0\n */\nexport interface BfFieldControlState {\n /** Height step: sm 32, md 40, lg 48 px, as `bf-input`'s `size`. */\n size: BfSize;\n /** Whether the control shows its error state (the danger border). */\n invalid: boolean;\n /** Whether the control is disabled; set the control's native `disabled` too. */\n disabled: boolean;\n /** Whether the control is read-only; set the control's native `readonly` too. */\n readonly: boolean;\n}\n\n/**\n * The class list `bf-input` puts on its native `<input>`, for a custom control inside `bf-field`\n * (a native input with a mask, a combobox, a date picker's text box) that must look like the\n * library's own fields: the same box, height and type per `size`, padding, focus ring and border,\n * with the danger border while `invalid`. The disabled and read-only styles come from the\n * control's native `disabled` / `readonly` attributes (`:disabled`, `:read-only`), so set those on\n * the control as well; the class list is the one `bf-input` renders in the same state.\n *\n * @example\n * <input [class]=\"controlClass()\" [id]=\"id\" [attr.aria-describedby]=\"field.describedBy()\" />\n * @param state The size and state to style the control for.\n * @returns The class list, as one string for `[class]`.\n * @summary The class list that makes a custom control look like a library text field\n * @since 0.3.0\n */\nexport function bfFieldControlClass(state: BfFieldControlState): string {\n return [\n FIELD_CONTROL_BASE,\n FIELD_BOX[state.size],\n FIELD_PADDING_START[state.size].text,\n FIELD_PADDING_END[state.size].text,\n state.invalid ? 'border-danger-border' : 'border-border-strong',\n ].join(' ');\n}\n","import type { ValidationError } from '@angular/forms/signals';\nimport { bfValidationMessage, type BfValidationMessages } from '../../config/validation-messages';\n\n/** An error as a field reads it: its kind and optional message; limit fields (`minLength`,\n * `context.requiredLength`, …) are read through type guards by `bfValidationMessage`. */\nexport type FieldErrorLike = Pick<ValidationError, 'kind' | 'message'>;\n\n/**\n * Explicit error message wins; otherwise, once the field was touched, the first form error's text:\n * its own `message`, else the default for its kind from `messages` (`BF_LABELS.validation`).\n */\nexport function fieldErrorText(\n errorMessage: string,\n touched: boolean,\n errors: readonly FieldErrorLike[],\n messages: BfValidationMessages,\n): string {\n if (errorMessage) {\n return errorMessage;\n }\n const first = errors[0];\n return touched && first ? bfValidationMessage(first, messages) : '';\n}\n\n/** The visual error state: any error text, or a field the form marked invalid after it was touched. */\nexport function fieldShowsError(errorText: string, invalid: boolean, touched: boolean): boolean {\n return Boolean(errorText) || (invalid && touched);\n}\n\n/**\n * `aria-describedby` targets: the help paragraph and the error paragraph under it, each while it\n * is rendered (`\"<id>-help <id>-error\"`, `\"<id>-help\"`, `\"<id>-error\"`), else none.\n */\nexport function fieldDescribedBy(id: string, errorText: string, helpText: string): string | null {\n const ids = [helpText ? `${id}-help` : '', errorText ? `${id}-error` : ''].filter(Boolean);\n return ids.length > 0 ? ids.join(' ') : null;\n}\n\n/** `aria-errormessage` target: the error paragraph while the control is invalid, else none. */\nexport function fieldErrorMessageId(\n id: string,\n errorText: string,\n showError: boolean,\n): string | null {\n return showError && errorText ? `${id}-error` : null;\n}\n","let counter = 0;\n\n/**\n * Returns a document-unique id such as `bf-input-3`, for associating labels and hints with controls.\n *\n * The ids come from this module-level counter, so a server render and the client (or two server\n * renders in one process) number them differently: `@bitforgehq/ui` 0.x is client-rendered only,\n * and SSR, hydration and prerendering of pages that render its components are not supported.\n * Hydration-stable ids are decided before 1.0.\n */\nexport function uniqueId(prefix: string): string {\n counter += 1;\n return `${prefix}-${counter}`;\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport {\n FIELD_BOX,\n FIELD_CONTROL_BASE,\n FIELD_ICON_END,\n FIELD_ICON_START,\n FIELD_PADDING_END,\n FIELD_PADDING_START,\n} from '../_shared/field-classes';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\n/**\n * The native `type` of a `bf-input`; the value stays a string (for numbers, use `bf-number-input`).\n *\n * @summary The native input types a text field supports, all bound as strings\n * @since 0.1.0\n */\nexport type BfInputType =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'search'\n | 'date'\n | 'time'\n | 'datetime-local'\n | 'month';\n/** Regex flags the native `pattern` attribute can express (it always compiles with `v`). */\nconst NATIVE_PATTERN_FLAGS = new Set(['', 'u', 'v']);\n\n/**\n * Native `inputmode`: the virtual keyboard a phone shows.\n *\n * @summary The virtual keyboards a phone can show for a text field\n * @since 0.2.0\n */\nexport type BfInputMode =\n 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n/**\n * Native `enterkeyhint`: the label of the virtual keyboard's Enter key.\n *\n * @summary The labels a phone keyboard can put on its Enter key\n * @since 0.2.0\n */\nexport type BfEnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n/**\n * Native `autocapitalize`: how a virtual keyboard capitalises typed text.\n *\n * @summary How a phone keyboard capitalises the text typed into a field\n * @since 0.2.0\n */\nexport type BfAutocapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n/**\n * The `inputMode` of a `bf-input`: a `BfInputMode`, or `''` (the default) to leave the native\n * `inputmode` off.\n *\n * @summary A text field's virtual keyboard setting, a keyboard or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputInputMode = BfInputMode | '';\n/**\n * The `enterKeyHint` of a `bf-input` or `bf-number-input`: a `BfEnterKeyHint`, or `''` (the\n * default) to leave the native `enterkeyhint` off.\n *\n * @summary A field's Enter key label setting, a label or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputEnterKeyHint = BfEnterKeyHint | '';\n/**\n * The `autocapitalize` of a `bf-input`: a `BfAutocapitalize`, or `''` (the default) to leave the\n * native `autocapitalize` off.\n *\n * @summary A text field's capitalisation setting, a mode or empty to leave it off\n * @since 0.3.0\n */\nexport type BfInputAutocapitalize = BfAutocapitalize | '';\n/**\n * The height step of a text field; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for text fields, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfFieldSize = BfSize;\n\n/**\n * Single-line text field with label, help and error text, icon slots and Signal Forms binding.\n * Bind `[(value)]` directly or `[formField]` from a signal form; the field state (touched,\n * invalid, errors, disabled, readonly, required) flows in through the matching inputs.\n *\n * @example\n * <bf-input label=\"Email\" type=\"email\" placeholder=\"name@company.ch\" [(value)]=\"email\" />\n * <bf-input label=\"Email\" [formField]=\"signup.email\" />\n * @summary Single-line text field with label, help and error text, icon slots and Signal Forms binding\n * @category Forms\n * @since 0.1.0\n * @slot icon-start An icon inside the field, before the text.\n * @slot icon-end An icon inside the field, after the text.\n */\n@Component({\n selector: 'bf-input',\n imports: [BfFieldComponent],\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <div class=\"relative\">\n @if (iconStart()) {\n <span [class]=\"iconStartClasses()\">\n <ng-content select=\"[bfSlot=icon-start]\" />\n </span>\n }\n <input\n #el\n [id]=\"id()\"\n [type]=\"type()\"\n [name]=\"name()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [attr.step]=\"step() ?? null\"\n [attr.pattern]=\"patternAttr()\"\n [attr.inputmode]=\"inputMode() || null\"\n [attr.enterkeyhint]=\"enterKeyHint() || null\"\n [attr.spellcheck]=\"spellcheckAttr()\"\n [attr.autocapitalize]=\"autocapitalize() || null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (input)=\"value.set(el.value); changed.emit(el.value)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n @if (iconEnd()) {\n <span [class]=\"iconEndClasses()\">\n <ng-content select=\"[bfSlot=icon-end]\" />\n </span>\n }\n </div>\n </bf-field>\n `,\n})\nexport class BfInputComponent implements FormValueControl<string> {\n /** The text value; two-way bindable and bound by `[formField]`. */\n readonly value = model('');\n /** Native input type; the value stays a string. For numbers use `bf-number-input`, which binds\n * `number | null`. */\n readonly type = input<BfInputType>('text');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. a search field). Ignored when `label`\n * is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Example value shown while empty. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Makes the control read-only. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required (label marker and native attribute). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-input'));\n /** Reserve space for an icon in the `icon-start` slot. */\n readonly iconStart = input(false, { transform: booleanAttribute });\n /** Reserve space for an icon in the `icon-end` slot. */\n readonly iconEnd = input(false, { transform: booleanAttribute });\n /** Native autocomplete hint. */\n readonly autocomplete = input('');\n /** Maximum number of characters (native `maxlength`); bound by Signal Forms `maxLength()`. */\n readonly maxLength = input<number | undefined>(undefined);\n /** Minimum number of characters (native `minlength`); bound by Signal Forms `minLength()`. */\n readonly minLength = input<number | undefined>(undefined);\n /** Lowest value (native `min`), e.g. `2026-01-01` for a date or `0` for a number. */\n readonly min = input<string | undefined>(undefined);\n /** Highest value (native `max`), e.g. `2026-12-31` for a date or `100` for a number. */\n readonly max = input<string | undefined>(undefined);\n /** Step between valid values (native `step`), e.g. `0.5` or `any`. */\n readonly step = input<string | number | undefined>(undefined);\n /**\n * Patterns from Signal Forms `pattern()`; exactly one, with no flags or only `u`/`v`, is rendered\n * as the native `pattern`.\n */\n readonly pattern = input<readonly RegExp[]>([]);\n /** Virtual keyboard to show (native `inputmode`). */\n readonly inputMode = input<BfInputInputMode>('');\n /** Label of the virtual keyboard's Enter key (native `enterkeyhint`). */\n readonly enterKeyHint = input<BfInputEnterKeyHint>('');\n /** Spell checking on or off (native `spellcheck`); the browser decides while unset. */\n readonly spellcheck = input<boolean | undefined>(undefined);\n /** Capitalisation of typed text on virtual keyboards (native `autocapitalize`). */\n readonly autocapitalize = input<BfInputAutocapitalize>('');\n\n /** Emitted with the new text right after the user changes it (each keystroke or paste). */\n readonly changed = output<string>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n readonly iconStartClasses = computed(\n () =>\n `text-text-subtle pointer-events-none absolute inset-y-0 flex items-center ${FIELD_ICON_START[this.resolvedSize()]}`,\n );\n readonly iconEndClasses = computed(\n () =>\n `text-text-subtle absolute inset-y-0 flex items-center ${FIELD_ICON_END[this.resolvedSize()]}`,\n );\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n /**\n * Native `pattern`: only an unambiguous single pattern whose flags HTML can honour (none, `u` or\n * `v`; the browser compiles it anchored in `v` mode). Several patterns, or flags such as `i`,\n * are validated by the form alone, so the native check never rejects a value the form accepts.\n */\n readonly patternAttr = computed(() => {\n const patterns = this.pattern();\n const only = patterns.length === 1 ? patterns[0] : undefined;\n return only && NATIVE_PATTERN_FLAGS.has(only.flags) ? only.source : null;\n });\n readonly spellcheckAttr = computed(() => {\n const spellcheck = this.spellcheck();\n return spellcheck === undefined ? null : String(spellcheck);\n });\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n return [\n FIELD_CONTROL_BASE,\n FIELD_BOX[size],\n FIELD_PADDING_START[size][this.iconStart() ? 'icon' : 'text'],\n FIELD_PADDING_END[size][this.iconEnd() ? 'icon' : 'text'],\n this.showError() ? 'border-danger-border' : 'border-border-strong',\n ].join(' ');\n });\n\n /**\n * Focuses the native input; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","import {\n Component,\n DOCUMENT,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\nconst BASE =\n 'block w-full rounded-field border bg-surface text-text placeholder:text-text-muted ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'read-only:bg-surface-muted disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/* A textarea has no fixed height (rows and autoResize set it), so a step sets padding and type. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'px-3 py-1.5 text-label-xs',\n md: 'px-3.5 py-2 text-label-sm',\n lg: 'px-4 py-3 text-label leading-6', // multi-line text keeps 24 px lines (the forms-plugin line-height it had)\n};\n/* Auto-resize: sized to the content, between the bounds the host's custom properties carry (an\n unset one leaves its side unbounded); scrolls past the upper one. */\nconst GROWING =\n 'field-sizing-content resize-none overflow-y-auto [min-block-size:var(--bf-textarea-min-block-size)] [max-block-size:var(--bf-textarea-max-block-size)]';\n/* What a box of `n` lines adds to `n lh`: its block padding (read from the step's own `py-*`\n class in SIZE, one spacing step is 0.25rem, so the two can never drift) plus the 1 px border on\n both sides. */\nfunction blockChrome(size: BfSize): string {\n const step = /(?:^|\\s)py-(\\d+(?:\\.\\d+)?)(?:\\s|$)/.exec(SIZE[size])?.[1];\n return `${Number(step ?? 0) * 0.5}rem + 2px`;\n}\n\n/** `CSS.supports('field-sizing', 'content')` in `view`, false without a window or `CSS.supports`. */\nfunction supportsFieldSizing(view: (Window & typeof globalThis) | null): boolean {\n const css = view?.CSS;\n return typeof css?.supports === 'function' && css.supports('field-sizing', 'content');\n}\n\n/**\n * Multi-line text field with the same chrome and Signal Forms binding as `bf-input`.\n *\n * @example\n * <bf-textarea label=\"Notes\" [rows]=\"4\" [(value)]=\"notes\" />\n * @summary Multi-line text field with label, help and error text, and Signal Forms binding\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-textarea',\n imports: [BfFieldComponent],\n // The auto-resize bounds are custom properties on the host, which the textarea's classes read.\n host: {\n class: 'block',\n '[attr.id]': 'null',\n '[style.--bf-textarea-min-block-size]': 'minBlockSize()',\n '[style.--bf-textarea-max-block-size]': 'maxBlockSize()',\n },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <textarea\n #el\n [id]=\"id()\"\n [name]=\"name()\"\n [value]=\"value()\"\n [rows]=\"rows()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (input)=\"value.set(el.value); changed.emit(el.value)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n </bf-field>\n `,\n})\nexport class BfTextareaComponent implements FormValueControl<string> {\n /** The text value; two-way bindable and bound by `[formField]`. */\n readonly value = model('');\n /** Padding and type step: sm, md, lg (a textarea's height comes from `rows`); unset follows\n * `provideBfDefaults()` (`fieldSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. an inline comment box). Ignored when\n * `label` is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Example value shown while empty. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Makes the control read-only. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-textarea'));\n /** Visible rows; with `autoResize`, the rows the empty box starts at. */\n readonly rows = input(3);\n /** Grows with the content (CSS `field-sizing: content`) from `rows` up to `maxRows`. Where the\n * browser has no `field-sizing` it keeps the fixed `rows`. */\n readonly autoResize = input(false, { transform: booleanAttribute });\n /** With `autoResize`, the rows the box grows to at most; past them it scrolls. Unset, it grows\n * without a bound. */\n readonly maxRows = input<number | undefined>(undefined);\n /** Maximum number of characters (native `maxlength`); bound by Signal Forms `maxLength()`. */\n readonly maxLength = input<number | undefined>(undefined);\n /** Minimum number of characters (native `minlength`); bound by Signal Forms `minLength()`. */\n readonly minLength = input<number | undefined>(undefined);\n\n /** Emitted with the new text right after the user changes it (each keystroke or paste). */\n readonly changed = output<string>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLTextAreaElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n /** Whether the browser sizes a field to its content; read once. False on the server and where\n * `CSS.supports` is missing, so the box keeps its fixed `rows` there. */\n private readonly fieldSizing = supportsFieldSizing(inject(DOCUMENT).defaultView);\n /** Auto-resize in effect: asked for, and the browser can do it. */\n private readonly growing = computed(() => this.autoResize() && this.fieldSizing);\n /** The height of `n` lines of this step, padding and border included. */\n private blockSize(lines: number): string {\n return `calc(${lines}lh + ${blockChrome(this.resolvedSize())})`;\n }\n /** While growing: the empty box is as tall as `rows` lines. */\n protected readonly minBlockSize = computed(() =>\n this.growing() ? this.blockSize(this.rows()) : null,\n );\n /** While growing with `maxRows`: it stops at `maxRows` lines. */\n protected readonly maxBlockSize = computed(() => {\n const max = this.maxRows();\n return this.growing() && max !== undefined ? this.blockSize(max) : null;\n });\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly classes = computed(() =>\n [\n BASE,\n SIZE[this.resolvedSize()],\n this.showError() ? 'border-danger-border' : 'border-border-strong',\n this.growing() ? GROWING : 'resize-y',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /**\n * Focuses the native textarea; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","/**\n * Equality that matches a bound value to an option's value (`compareWith` of the choice controls).\n * Called as `compareWith(optionValue, value)`: the option's value first, the bound value second.\n *\n * @summary Equality of choice values, for options that are objects rather than primitives\n * @since 0.3.0\n */\nexport type BfCompareWith<T> = (optionValue: T, value: T) => boolean;\n\n/**\n * Index of the option whose value matches `value` under `compare`; `-1` for `null` (nothing\n * selected) or a value no option matches. An option whose value is `null` therefore never shows as\n * selected.\n */\nexport function choiceIndex<T>(\n options: readonly { readonly value: T }[],\n value: T | null,\n compare: BfCompareWith<T>,\n): number {\n return value === null ? -1 : options.findIndex((option) => compare(option.value, value));\n}\n\n/**\n * The native `value` of an option (`<option>`, radio): `String(value)` for a string, number or\n * boolean, so native reads, form posts and browser tests see the real value; the option index for\n * anything else (objects). The controls map a choice back by position, never by this key, so\n * duplicate keys still resolve to the right option.\n */\nexport function choiceKey(value: unknown, index: number): string {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n ? String(value)\n : String(index);\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex, choiceKey } from '../_shared/choice';\nimport { FIELD_BOX, FIELD_PADDING_START } from '../_shared/field-classes';\nimport {\n fieldDescribedBy,\n fieldErrorMessageId,\n fieldErrorText,\n fieldShowsError,\n} from '../_shared/field-state';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BfFieldComponent } from '../field/field.component';\n\n/**\n * One choice of `bf-select`; `value` is any type (a string by default).\n *\n * @summary One choice of a select with its value, its label and a disabled flag\n * @since 0.1.0\n */\nexport interface BfSelectOption<T = string> {\n /** The value the select's `value` takes when this option is chosen. */\n value: T;\n /** The text of the native `option`. */\n label: string;\n /** Whether this option cannot be chosen. */\n disabled?: boolean;\n}\n\nconst BASE =\n 'block w-full appearance-none rounded-field border bg-none text-text ' +\n 'transition-colors focus:outline-hidden focus:border-primary focus:ring-2 focus:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:border-surface-sunken disabled:bg-surface-muted disabled:text-text-disabled';\n\n/* A native <select> always matches :read-only, so the read-only surface comes from this map rather\n than a read-only: variant as on bf-input. */\ntype BfSelectMode = 'editable' | 'readonly';\nconst MODE: Record<BfSelectMode, string> = {\n editable: 'cursor-pointer bg-surface',\n readonly: 'cursor-default bg-surface-muted',\n};\n\n/* Keys that open the picker or change a closed select's value; blocked while read-only, with or\n without Alt (Alt+ArrowDown/Up and F4 open the picker on Windows and Linux). Tab, Escape and\n Ctrl/Cmd shortcuts pass through. */\nconst PICKER_KEYS = new Set([\n 'F4',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n 'Enter',\n]);\n\n/* The text stops short of the chevron at the inline end. */\nconst PADDING_END: Record<BfSize, string> = { sm: 'pe-9', md: 'pe-10', lg: 'pe-11' };\n\n/* The chevron is a rotated square drawn with borders, so no icon dependency is needed. It points\n down, so it needs no mirroring; only its inset from the inline end follows the size. -70 %\n instead of -50 % centres the rotated square's visible corner rather than its box. */\nconst CHEVRON =\n 'relative after:pointer-events-none after:absolute after:top-1/2 after:h-2.5 after:w-2.5 ' +\n \"after:-translate-y-[70%] after:rotate-45 after:border-r-[1.5px] after:border-b-[1.5px] after:border-text-subtle after:content-['']\";\nconst CHEVRON_INSET: Record<BfSize, string> = {\n sm: 'after:end-3.5',\n md: 'after:end-4',\n lg: 'after:end-4.5',\n};\n\n/**\n * Native single-choice dropdown styled like the text field, with a placeholder option and\n * Signal Forms binding. Generic over the option value (a string by default); `null` means nothing\n * is selected.\n *\n * @example\n * <bf-select label=\"Project\" placeholder=\"Pick a project\" [options]=\"projects\" [(value)]=\"projectId\" />\n * <bf-select label=\"Team\" placeholder=\"Pick a team\" [options]=\"teams\" [formField]=\"task.teamId\" />\n * @summary Native single-choice dropdown styled like the text field, with Signal Forms binding\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-select',\n imports: [BfFieldComponent],\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <bf-field\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [error]=\"errorText()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [controlId]=\"id()\"\n >\n <div [class]=\"wrapperClasses()\">\n <!-- Selection is driven entirely by [selected] on each <option>; a [value] binding on\n <select> would fight it once options are added, removed or reordered. A primitive\n option value is its native value, an object's is its index; a choice maps back by\n position, so any value type round-trips. -->\n <select\n #el\n [id]=\"id()\"\n [name]=\"name()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-errormessage]=\"errorMessageId()\"\n [class]=\"classes()\"\n (mousedown)=\"onMousedown($event)\"\n (keydown)=\"onKeydown($event)\"\n (change)=\"onChange(el)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (placeholder()) {\n <option value=\"\" disabled [selected]=\"selectedIndex() === -1\">\n {{ placeholder() }}\n </option>\n } @else if (showEmptyOption()) {\n <option value=\"\" hidden disabled selected></option>\n }\n @for (option of options(); track $index) {\n <option\n [value]=\"key(option.value, $index)\"\n [disabled]=\"option.disabled ?? false\"\n [selected]=\"$index === selectedIndex()\"\n >\n {{ option.label }}\n </option>\n }\n </select>\n </div>\n </bf-field>\n `,\n})\nexport class BfSelectComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The options to choose from. */\n readonly options = input.required<readonly BfSelectOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`fieldSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Visible label above the control. */\n readonly label = input('');\n /**\n * Accessible name when no visible label is rendered (e.g. a table filter). Ignored when `label`\n * is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the field when no visible label is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Disabled first option shown while nothing is selected. */\n readonly placeholder = input('');\n /** Helper text under the control. */\n readonly helpText = input('');\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the value but blocks changes; the select stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-select'));\n\n /** Emitted with the chosen value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted when the control gains focus. */\n readonly focused = output<FocusEvent>();\n /** Emitted when the control loses focus. */\n readonly blurred = output<FocusEvent>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLSelectElement>>('el');\n\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `fieldSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.fieldSize);\n readonly wrapperClasses = computed(() => `${CHEVRON} ${CHEVRON_INSET[this.resolvedSize()]}`);\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n readonly showEmptyOption = computed(() => !this.placeholder() && this.selectedIndex() === -1);\n private readonly labels = inject(BF_LABELS);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n readonly describedBy = computed(() =>\n fieldDescribedBy(this.id(), this.errorText(), this.helpText()),\n );\n /** `aria-errormessage`: the error paragraph while `aria-invalid` is set. */\n readonly errorMessageId = computed(() =>\n fieldErrorMessageId(this.id(), this.errorText(), this.showError()),\n );\n /**\n * `aria-label` value: only when there is no visible label, so the label stays the sole accessible\n * name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly classes = computed(() =>\n [\n BASE,\n FIELD_BOX[this.resolvedSize()],\n FIELD_PADDING_START[this.resolvedSize()].text,\n PADDING_END[this.resolvedSize()],\n MODE[this.readonly() ? 'readonly' : 'editable'],\n /* Plain hover sorts before focus: and disabled:, so the focus and disabled borders still win. */\n this.showError()\n ? 'border-danger-border hover:border-danger'\n : 'border-border-strong hover:border-text-muted',\n this.selectedIndex() === -1 ? 'text-text-muted' : '',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /** Native `value` of an option: its value for a primitive, its index for an object. */\n protected readonly key = choiceKey;\n\n /**\n * Focuses the native select; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: no picker on a mouse press. Cancelling the press also cancels its focus, so the\n * select is focused explicitly, like any other read-only control. Touch screens open the\n * platform picker without a cancellable press; a choice made there is reverted by `onChange`.\n * @internal\n */\n onMousedown(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n this.el().nativeElement.focus();\n }\n }\n\n /**\n * Read-only: no picker or value change from the keyboard (arrows, Enter, Space, F4, type-ahead).\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.readonly() || event.ctrlKey || event.metaKey) {\n return;\n }\n if (PICKER_KEYS.has(event.key) || (event.key.length === 1 && !event.altKey)) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the chosen option's value to the model and emits `changed`; while read-only, restores\n * the shown option instead.\n * @internal\n */\n onChange(el: HTMLSelectElement): void {\n // The placeholder or the hidden empty option, when rendered, is the first native option.\n const offset = this.placeholder() || this.showEmptyOption() ? 1 : 0;\n const index = this.selectedIndex();\n if (this.readonly()) {\n el.selectedIndex = index < 0 ? 0 : index + offset;\n return;\n }\n const option = this.options()[el.selectedIndex - offset];\n if (!option) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n // A value that matches no option (a `null` option value) reads as nothing selected; show that.\n if (this.selectedIndex() < 0) {\n el.selectedIndex = 0;\n }\n }\n\n /**\n * Marks the field touched and emits `blurred`.\n * @internal\n */\n onBlur(event: FocusEvent): void {\n this.blurred.emit(event);\n this.touch.emit();\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormCheckboxControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\nconst BOX_BASE =\n 'relative flex shrink-0 items-center justify-center rounded-checkbox border-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden ' +\n 'peer-disabled:border-surface-sunken peer-disabled:bg-surface-muted ' +\n \"after:absolute after:content-['']\";\n/* Box, check mark and dash per step: 18 / 22 / 24 px boxes. */\nconst BOX_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6' };\nconst CHECK: Record<BfSize, string> = {\n sm: 'after:h-[9px] after:w-[5px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n md: 'after:h-[11px] after:w-[6px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n lg: 'after:h-3 after:w-[7px] after:-translate-y-px after:rotate-45 after:border-r-2 after:border-b-2',\n};\nconst DASH: Record<BfSize, string> = {\n sm: 'after:h-0 after:w-2 after:border-b-2',\n md: 'after:h-0 after:w-[10px] after:border-b-2',\n lg: 'after:h-0 after:w-3 after:border-b-2',\n};\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n/* The error text lines up with the label: box plus the 10 px gap. */\nconst ERROR_INDENT: Record<BfSize, string> = { sm: 'ps-7', md: 'ps-8', lg: 'ps-8.5' };\n\n/* Read-only boxes rest on `surface-muted` like the read-only radio rings; a checked one keeps a\n `primary` border and mark (>= 4.8:1 on surface-muted and bg in both themes, above the 3:1\n non-text minimum), so it reads as checked but not as an editable filled box. */\ntype BfCheckboxBoxState = 'on' | 'readonlyOn' | 'error' | 'readonly' | 'off';\nconst BOX_STATE: Record<BfCheckboxBoxState, string> = {\n on: 'border-primary bg-primary after:border-on-primary after:opacity-100',\n readonlyOn: 'border-primary bg-surface-muted after:border-primary after:opacity-100',\n error: 'border-danger-border bg-surface after:border-on-primary after:opacity-0',\n readonly: 'border-border-strong bg-surface-muted after:border-on-primary after:opacity-0',\n off: 'border-border-strong bg-surface after:border-on-primary after:opacity-0',\n};\nconst BOX_HOVER: Record<BfCheckboxBoxState, string> = {\n on: 'group-hover/bf-checkbox:border-primary-hover group-hover/bf-checkbox:bg-primary-hover',\n readonlyOn: '',\n error: 'group-hover/bf-checkbox:border-danger',\n readonly: '',\n off: 'group-hover/bf-checkbox:border-text-muted',\n};\n/* Pressed boundary while the label (the named group) is held down; editable boxes only. */\nconst BOX_PRESSED = 'group-active/bf-checkbox:border-text';\n\n/* How the row responds to the pointer: only an editable row is a hover group with a pointer. */\ntype BfCheckboxMode = 'editable' | 'readonly' | 'disabled';\nconst LABEL_MODE: Record<BfCheckboxMode, string> = {\n editable: 'group/bf-checkbox cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\n\n/**\n * Checkbox with a 22 px rounded box and an optional label, implementing the Signal Forms\n * checkbox contract so `[formField]` binds `checked`.\n *\n * @example\n * <bf-checkbox [(checked)]=\"agree\">I agree to the terms</bf-checkbox>\n * <bf-checkbox label=\"Notify me\" [formField]=\"prefs.notify\" />\n * @summary Rounded checkbox with an optional label that binds to Signal Forms\n * @category Forms\n * @since 0.1.0\n * @slot default Rich label content next to the box, before the `label` text.\n */\n@Component({\n selector: 'bf-checkbox',\n host: { class: 'block', '[attr.id]': 'null' },\n // items-start keeps the label row only as wide as its content, so a click on empty space beside\n // it does not toggle the box.\n template: `\n <div class=\"flex flex-col items-start gap-1.5\">\n <label [for]=\"id()\" [class]=\"labelClasses()\">\n <input\n #el\n type=\"checkbox\"\n class=\"peer sr-only\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (click)=\"onClick($event)\"\n (change)=\"onChange(el.checked)\"\n (blur)=\"touch.emit()\"\n />\n <span data-box aria-hidden=\"true\" [class]=\"boxClasses()\"></span>\n <span data-text [class]=\"textClasses()\"><ng-content />{{ label() }}</span>\n </label>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" [class]=\"errorClasses()\">\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfCheckboxComponent implements FormCheckboxControl {\n /** Whether the box is checked; two-way bindable and bound by `[formField]`. */\n readonly checked = model(false);\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Accessible name when there is no visible `label`, e.g. a row-selection box. */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the control when no visible label is rendered (e.g. a\n * table column header). */\n readonly ariaLabelledby = input('');\n /** Height step of the row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Shows the mixed state (e.g. \"select all\" with some rows selected); two-way bindable. A user\n * change clears it, like the native checkbox, so the box and `aria-checked` agree. */\n readonly indeterminate = model(false);\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the state but blocks changes; the box stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-checkbox'));\n\n /** Emitted with the new checked state after a user change. */\n readonly changed = output<boolean>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n private readonly mode = computed<BfCheckboxMode>(() =>\n this.disabled() ? 'disabled' : this.readonly() ? 'readonly' : 'editable',\n );\n readonly labelClasses = computed(() =>\n [\n 'inline-flex min-w-6 items-center gap-2.5',\n ROW[this.resolvedSize()],\n LABEL_MODE[this.mode()],\n ].join(' '),\n );\n readonly textClasses = computed(\n () =>\n `text-text peer-disabled:text-text-disabled font-semibold empty:hidden ${TEXT[this.resolvedSize()]}`,\n );\n readonly errorClasses = computed(\n () => `text-danger text-micro ${ERROR_INDENT[this.resolvedSize()]}`,\n );\n readonly boxClasses = computed(() => {\n const on = this.checked() || this.indeterminate();\n const state: BfCheckboxBoxState = on\n ? this.readonly()\n ? 'readonlyOn'\n : 'on'\n : this.showError()\n ? 'error'\n : this.readonly()\n ? 'readonly'\n : 'off';\n const size = this.resolvedSize();\n return [\n BOX_BASE,\n BOX_SIZE[size],\n BOX_STATE[state],\n // Hovering the label (the named `group/bf-checkbox`) tints the box; a disabled or read-only\n // box has no hover. Named so a consumer's own `.group` ancestor (e.g. a card) does not also\n // tint it.\n this.mode() === 'editable' ? BOX_HOVER[state] : '',\n this.mode() === 'editable' ? BOX_PRESSED : '',\n this.indeterminate() ? DASH[size] : CHECK[size],\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n /**\n * Focuses the native checkbox; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the toggle. Space activates a checkbox through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the native checkbox state to `checked` and emits `changed`.\n * @internal\n */\n onChange(next: boolean): void {\n this.indeterminate.set(false);\n this.checked.set(next);\n this.changed.emit(next);\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChild,\n inject,\n} from '@angular/core';\nimport { type FormCheckboxControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/* The design's 3 px knob inset: a 1.5 px border (transparent except read-only off, so\n forced-colors mode draws the track) plus 1.5 px padding. */\nconst TRACK_BASE =\n 'relative flex shrink-0 items-center rounded-control border-[1.5px] p-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden';\nconst KNOB_BASE =\n 'block rounded-control border-[1.5px] border-transparent shadow-segment transition-transform';\n\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. The sm track is 40 px wide, so a label-less sm switch (a table\n cell) also takes a 44 px min-width under a coarse pointer, the track centred in it. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit pointer-coarse:min-w-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\n/* Track, knob and knob travel per step: the knob fills the track's inner height (track minus the\n 3 px inset each side) and travels the rest of its inner width, towards the inline end (mirrored\n under dir=\"rtl\"). */\nconst TRACK_SIZE: Record<BfSize, string> = { sm: 'h-6 w-10', md: 'h-7 w-12', lg: 'h-8 w-14' };\nconst KNOB_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6.5' };\nconst KNOB_TRAVEL: Record<BfSize, Record<'on' | 'off', string>> = {\n sm: { on: 'translate-x-4 rtl:-translate-x-4', off: 'translate-x-0' },\n md: { on: 'translate-x-5 rtl:-translate-x-5', off: 'translate-x-0' },\n lg: { on: 'translate-x-6 rtl:-translate-x-6', off: 'translate-x-0' },\n};\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n/* How the row responds to the pointer: only an editable row is a hover group with a pointer. */\ntype BfToggleMode = 'editable' | 'readonly' | 'disabled';\nconst LABEL_MODE: Record<BfToggleMode, string> = {\n editable: 'group/bf-toggle cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\n/* Track fill and border per mode and state. Disabled uses tokens, never opacity: a soft primary\n track when on, the sunken fill when off. Read-only rests on the muted surface like the other\n read-only controls, outlined in `primary` when on (>= 4.8:1 on bg and surface-muted in both\n themes) and in `control-off` when off (>= 3:1 on bg and surface), so the track keeps its\n non-text boundary; no hover. Enabled tracks darken while the label (the named `group/bf-toggle`)\n is hovered — named so a consumer's own `.group` ancestor (e.g. a card) does not also tint it. */\nconst TRACK_FILL: Record<BfToggleMode, Record<'on' | 'off', string>> = {\n editable: {\n on: 'border-transparent bg-primary group-hover/bf-toggle:bg-primary-hover',\n off: 'border-transparent bg-control-off group-hover/bf-toggle:bg-text-muted',\n },\n readonly: {\n on: 'border-primary bg-surface-muted',\n off: 'border-control-off bg-surface-muted',\n },\n disabled: {\n on: 'border-transparent bg-primary-soft',\n off: 'border-transparent bg-surface-sunken',\n },\n};\n\n/* Pressed boundary while the label (the named group) is held down; editable tracks only. */\nconst TRACK_PRESSED: Record<BfToggleMode, string> = {\n editable: 'group-active/bf-toggle:border-text',\n readonly: '',\n disabled: '',\n};\n\n/* Knob fill per mode and state; the knob carries the state (WCAG 1.4.11), so it reaches 3:1 on its\n track for any configured primary: on-primary on the primary track, primary-strong on the muted\n read-only track, surface on control-off. A disabled knob stays surface (exempt). */\nconst KNOB_FILL: Record<BfToggleMode, Record<'on' | 'off', string>> = {\n editable: { on: 'bg-on-primary', off: 'bg-surface' },\n readonly: { on: 'bg-primary-strong', off: 'bg-surface' },\n disabled: { on: 'bg-surface', off: 'bg-surface' },\n};\n\n/**\n * The side of a `bf-toggle`'s switch its label sits on: after it (`end`) or before it (`start`).\n *\n * @summary Whether a toggle's label sits after or before its switch\n * @since 0.3.0\n */\nexport type BfToggleLabelPosition = 'end' | 'start';\n\n/**\n * On/off switch for settings that apply immediately. Implements the Signal Forms checkbox contract.\n *\n * @example\n * <bf-toggle label=\"Notifications\" [(checked)]=\"notifications\" />\n * @summary On/off switch for settings that apply immediately, with Signal Forms binding\n * @category Forms\n * @since 0.1.0\n * @slot default Rich label content after the `label` text.\n */\n@Component({\n selector: 'bf-toggle',\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <!-- items-start keeps the end-positioned label (and its 44 px hit row) as wide as its content. -->\n <div class=\"flex flex-col items-start gap-1.5\">\n <label [for]=\"id()\" [class]=\"labelClasses()\">\n <input\n #el\n type=\"checkbox\"\n role=\"switch\"\n class=\"peer sr-only\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-checked]=\"checked() ? 'true' : 'false'\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (click)=\"onClick($event)\"\n (change)=\"onChange(el.checked)\"\n (blur)=\"touch.emit()\"\n />\n <span data-track aria-hidden=\"true\" [class]=\"trackClasses()\">\n <span data-knob [class]=\"knobClasses()\"></span>\n </span>\n @if (label()) {\n <span [class]=\"textClasses()\">{{ label() }}</span>\n }\n <ng-content />\n </label>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n </div>\n `,\n})\nexport class BfToggleComponent implements FormCheckboxControl {\n /** Whether the switch is on; two-way bindable and bound by `[formField]`. */\n readonly checked = model(false);\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Accessible name when no visible label is rendered (e.g. a switch in a list row). */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the control when no visible label is rendered (e.g. a\n * table column header). */\n readonly ariaLabelledby = input('');\n /** Height step of the row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Put the label before the switch (as in settings lists). */\n readonly labelPosition = input<BfToggleLabelPosition>('end');\n /** Disables the control. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the state but blocks changes; the switch stays focusable and exposes `aria-readonly`. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the control required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Native name attribute. */\n readonly name = input('');\n /** Control id; generated when not set. */\n readonly id = input(uniqueId('bf-toggle'));\n\n /** Emitted with the new state after a user change. */\n readonly changed = output<boolean>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly el = viewChild.required<ElementRef<HTMLInputElement>>('el');\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n private readonly mode = computed<BfToggleMode>(() =>\n this.disabled() ? 'disabled' : this.readonly() ? 'readonly' : 'editable',\n );\n\n readonly labelClasses = computed(() =>\n [\n this.labelPosition() === 'start'\n ? 'flex w-full flex-row-reverse items-center justify-between gap-2.5'\n : 'inline-flex items-center justify-center gap-2.5',\n ROW[this.resolvedSize()],\n LABEL_MODE[this.mode()],\n ].join(' '),\n );\n readonly trackClasses = computed(() =>\n [\n TRACK_BASE,\n TRACK_SIZE[this.resolvedSize()],\n TRACK_FILL[this.mode()][this.checked() ? 'on' : 'off'],\n TRACK_PRESSED[this.mode()],\n ]\n .filter(Boolean)\n .join(' '),\n );\n /* min-w-0 and wrap-anywhere: a long label (or a large text size) wraps beside the track instead\n of overflowing the row (a start label would spill past the row's start edge). */\n readonly textClasses = computed(\n () =>\n `text-text peer-disabled:text-text-disabled min-w-0 font-semibold wrap-anywhere ${TEXT[this.resolvedSize()]}`,\n );\n readonly knobClasses = computed(() => {\n const on = this.checked();\n const fill = KNOB_FILL[this.mode()][on ? 'on' : 'off'];\n const size = this.resolvedSize();\n return `${KNOB_BASE} ${KNOB_SIZE[size]} ${fill} ${KNOB_TRAVEL[size][on ? 'on' : 'off']}`;\n });\n private readonly labels = inject(BF_LABELS);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n\n /**\n * Focuses the native switch; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.el().nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the toggle. Space activates a switch through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Writes the native switch state to `checked` and emits `changed`.\n * @internal\n */\n onChange(next: boolean): void {\n this.checked.set(next);\n this.changed.emit(next);\n }\n}\n","import {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n viewChildren,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex, choiceKey } from '../_shared/choice';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * How a `bf-radio-group` lays out its options: stacked (`vertical`) or in a row (`horizontal`).\n *\n * @summary Whether a radio group stacks its options or sets them in a row\n * @since 0.3.0\n */\nexport type BfRadioGroupOrientation = 'vertical' | 'horizontal';\n\n/**\n * One choice of `bf-radio-group`; `value` is any type (a string by default).\n *\n * @summary One choice of a radio group with its value, label and optional description\n * @since 0.1.0\n */\nexport interface BfRadioOption<T = string> {\n /** The value the group's `value` takes when this option is chosen. */\n value: T;\n /** The visible label, also the radio's accessible name. */\n label: string;\n /** A second line under the label, linked to the radio with `aria-describedby`. */\n description?: string;\n /** Whether this option cannot be chosen. */\n disabled?: boolean;\n}\n\nconst RING_BASE =\n 'relative mt-0.5 flex shrink-0 items-center justify-center rounded-full border-[1.5px] transition-colors ' +\n 'peer-focus-visible:ring-4 peer-focus-visible:ring-ring peer-focus-visible:outline-hidden peer-disabled:border-surface-sunken peer-disabled:bg-surface-muted';\n/* The dot is primary-strong, not primary: it carries the checked state inside its surface ring,\n and primary-strong reaches 3:1 there for any configured primary (a pale brand primary does not). */\nconst DOT_BASE = 'rounded-full bg-primary-strong forced-colors:bg-[CanvasText] transition-opacity';\n/* The label text sits in a wrapper span, so `peer-disabled:` cannot reach it; the row colours it\n instead and dims it while its radio is disabled. */\nconst OPTION_LABEL_BASE =\n 'inline-flex items-center gap-2.5 text-text has-[input:disabled]:text-text-disabled';\n/* Row height per step: the visual row under a fine pointer (sm 32 is above the 24 px of WCAG 2.5.8),\n 44 px under a coarse pointer (lg is 48 already). A min-height, never ::after, because the row\n projects the consumer's label. */\nconst ROW: Record<BfSize, string> = {\n sm: 'min-h-8 pointer-coarse:min-h-hit',\n md: 'min-h-10 pointer-coarse:min-h-hit',\n lg: 'min-h-12',\n};\n/* Ring (18 / 22 / 24 px), dot and option label type per step. */\nconst RING_SIZE: Record<BfSize, string> = { sm: 'size-4.5', md: 'size-box', lg: 'size-6' };\nconst DOT_SIZE: Record<BfSize, string> = { sm: 'size-2.5', md: 'size-3', lg: 'size-3.5' };\nconst TEXT: Record<BfSize, string> = { sm: 'text-label-sm', md: 'text-label', lg: 'text-label' };\n\n/* How an option responds to the pointer. Only an editable option is a hover group with a pointer\n (named `group/bf-radio` so a consumer's own `.group` ancestor, e.g. a card, does not also tint\n the ring); a read-only one rests on the muted surface. */\ntype BfRadioMode = 'editable' | 'readonly' | 'disabled';\nconst OPTION_LABEL_MODE: Record<BfRadioMode, string> = {\n editable: 'group/bf-radio cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\nconst RING_FILL: Record<BfRadioMode, string> = {\n editable: 'bg-surface',\n readonly: 'bg-surface-muted',\n disabled: 'bg-surface',\n};\n\n/* Pressed boundary of an editable option's ring while its label is held down. */\nconst RING_PRESSED = 'group-active/bf-radio:border-text';\n\n/* Keys that move a native radio group's selection; blocked while read-only. */\nconst ARROW_KEYS = new Set(['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']);\n\n/**\n * A group of radio buttons for choosing one of a few options, with an optional description per\n * option. Implements the Signal Forms value contract; generic over the option value (a string by\n * default), `null` while nothing is selected.\n *\n * @example\n * <bf-radio-group label=\"View\" [options]=\"views\" [(value)]=\"view\" />\n * @summary Group of radio buttons for choosing one option, with optional per-option descriptions\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-radio-group',\n host: { class: 'block', '[attr.id]': 'null' },\n template: `\n <fieldset\n [id]=\"id()\"\n role=\"radiogroup\"\n class=\"flex flex-col gap-1.5\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (label()) {\n <!-- A rendered legend is not a flex item of the fieldset, so the 6 px gap to the options is\n its own margin; gap-1.5 spaces the options and the error message. -->\n <legend class=\"text-caption text-text-muted mb-1.5\">{{ label() }}</legend>\n }\n <div data-options [class]=\"optionsClasses()\">\n @for (option of options(); track $index) {\n <label [class]=\"optionLabelClasses(option)\">\n <input\n #radio\n type=\"radio\"\n class=\"peer sr-only\"\n [name]=\"name()\"\n [value]=\"key(option.value, $index)\"\n [checked]=\"$index === selectedIndex()\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"onClick($event)\"\n (change)=\"onChange($index)\"\n (blur)=\"touch.emit()\"\n />\n <span aria-hidden=\"true\" [class]=\"ringClasses(option, $index)\">\n <span data-dot [class]=\"dotClasses($index)\"></span>\n </span>\n <span class=\"flex flex-col\">\n <span [class]=\"textClasses()\">{{ option.label }}</span>\n @if (option.description) {\n <span data-description class=\"text-caption text-text-muted\">{{\n option.description\n }}</span>\n }\n </span>\n </label>\n }\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n </fieldset>\n `,\n})\nexport class BfRadioGroupComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The options to choose from. */\n readonly options = input.required<readonly BfRadioOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Group label, rendered as the fieldset legend. */\n readonly label = input('');\n /**\n * Accessible name of the group when no visible `label` is rendered. Ignored when `label` is set.\n */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the group when no visible `label` is rendered. Ignored when\n * `label` is set.\n */\n readonly ariaLabelledby = input('');\n /** Height step of the option row: sm 32, md 40, lg 48 px (44 px under a coarse pointer for sm and md);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stack the options vertically (default) or in a row. */\n readonly orientation = input<BfRadioGroupOrientation>('vertical');\n /** Disables every option. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Shows the choice but blocks changes; the options stay focusable and the group exposes\n * `aria-readonly`.\n */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the group required. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Shared name of the radio inputs; generated when not set. */\n readonly name = input(uniqueId('bf-radio'));\n /** Group id; generated when not set. */\n readonly id = input(uniqueId('bf-radio-group'));\n\n /** Emitted with the newly selected value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n /** The rendered radio inputs, in option order; used by `focus()`. */\n private readonly radios = viewChildren<ElementRef<HTMLInputElement>>('radio');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n readonly textClasses = computed(() => `font-semibold ${TEXT[this.resolvedSize()]}`);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /**\n * `aria-label` value: only when there is no visible label, so the legend stays the sole\n * accessible name.\n */\n readonly ariaLabelAttr = computed(() => (this.label() ? null : this.ariaLabel() || null));\n /** `aria-labelledby` value, under the same rule as `ariaLabelAttr`. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n readonly optionsClasses = computed(() =>\n this.orientation() === 'horizontal'\n ? 'flex flex-row flex-wrap gap-x-6 gap-y-2'\n : 'flex flex-col items-start gap-1',\n );\n\n protected optionLabelClasses(option: BfRadioOption<T>): string {\n return `${OPTION_LABEL_BASE} ${ROW[this.resolvedSize()]} ${OPTION_LABEL_MODE[this.optionMode(option)]}`;\n }\n\n protected ringClasses(option: BfRadioOption<T>, index: number): string {\n const mode = this.optionMode(option);\n const fill = `${RING_SIZE[this.resolvedSize()]} ${RING_FILL[mode]}`;\n // Pressing an editable option's named `group/bf-radio` label draws the pressed boundary.\n const pressed = mode === 'editable' ? ` ${RING_PRESSED}` : '';\n if (index === this.selectedIndex()) {\n return `${RING_BASE} ${fill} border-primary${pressed}`;\n }\n // Hovering an editable option's named `group/bf-radio` label darkens its ring; the selected\n // one stays.\n const hover = mode === 'editable';\n const border = this.showError()\n ? `border-danger-border${hover ? ' group-hover/bf-radio:border-danger' : ''}`\n : `border-border-strong${hover ? ' group-hover/bf-radio:border-text-muted' : ''}`;\n return `${RING_BASE} ${fill} ${border}${pressed}`;\n }\n\n protected dotClasses(index: number): string {\n const shown = index === this.selectedIndex() ? 'opacity-100' : 'opacity-0';\n return `${DOT_BASE} ${DOT_SIZE[this.resolvedSize()]} ${shown}`;\n }\n\n /**\n * Focuses the checked radio, else the first enabled one; Signal Forms calls it from\n * `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n const all = this.options();\n const enabled = (option: BfRadioOption<T> | undefined) =>\n option !== undefined && !(this.disabled() || option.disabled);\n let index = this.selectedIndex();\n if (!enabled(all[index])) {\n index = all.findIndex(enabled);\n }\n this.radios()[index]?.nativeElement.focus(options);\n }\n\n /**\n * Read-only: cancels the selection. Space activates a radio through a click, so this covers it.\n * @internal\n */\n onClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /**\n * Read-only: arrow keys would move the native selection, so they do nothing.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly() && ARROW_KEYS.has(event.key)) {\n event.preventDefault();\n }\n }\n\n /** Native `value` of a radio: its option's value for a primitive, its index for an object. */\n protected readonly key = choiceKey;\n\n /**\n * Writes the value of the option at `index` to the model and emits `changed`.\n * @internal\n */\n onChange(index: number): void {\n const option = this.options()[index];\n if (!option) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n }\n\n private optionMode(option: BfRadioOption<T>): BfRadioMode {\n if (this.disabled() || option.disabled) {\n return 'disabled';\n }\n return this.readonly() ? 'readonly' : 'editable';\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/*\n * What `bf-chip` and `bf-chip-group` need from each other, through an injection token so the chip\n * never imports the group. Internal: not exported from the package.\n */\n\n/** A chip as its group sees it. */\nexport interface BfChipGroupItem {\n /** The value the chip stands for, compared with `Object.is`. */\n readonly value: Signal<unknown>;\n /** The chip's own `disabled` input. */\n readonly disabled: Signal<boolean>;\n /** Focuses the chip's button. */\n focus(options?: FocusOptions): void;\n}\n\n/** The enclosing `bf-chip-group`, as its chips inject it. */\nexport interface BfChipGroupHost {\n /** True in `single` mode: the chips are radios and the group owns the selection. */\n readonly radio: Signal<boolean>;\n /** Disables every chip of the group. */\n readonly disabled: Signal<boolean>;\n /** Single mode: whether `item` is the selected chip. */\n isSelected(item: BfChipGroupItem): boolean;\n /** Single mode: whether `item` owns the roving tab stop. */\n isTabStop(item: BfChipGroupItem): boolean;\n /** Single mode: selects `item`, as a click on it does. */\n select(item: BfChipGroupItem): void;\n}\n\nexport const BF_CHIP_GROUP = new InjectionToken<BfChipGroupHost>('BF_CHIP_GROUP');\n","import {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BF_CHIP_GROUP, type BfChipGroupItem } from '../chip-group/chip-group.token';\n\n/**\n * The colour of a `bf-chip`: tonal or ink.\n *\n * @summary The two chip colours, a soft tonal tint or a dark ink fill\n * @since 0.1.0\n */\nexport type BfChipVariant = 'tonal' | 'ink';\n\nconst BASE =\n 'relative inline-flex max-w-full min-w-0 items-center gap-1.5 rounded-control border-[1.5px] font-bold whitespace-nowrap ' +\n 'cursor-pointer transition-colors duration-150 select-none focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'disabled:cursor-not-allowed disabled:border-transparent disabled:bg-surface-sunken disabled:text-text-disabled';\n\n/* Heights 32/40/48, the scale of bf-button, so a chip row lines up with the fields and buttons\n beside it. The chip always has a 1.5 px border, so its coarse-pointer hit extension (PILL_HIT)\n is the border-compensated one. */\nconst SIZE: Record<BfSize, string> = {\n sm: 'h-8 px-3 text-label-xs',\n md: 'h-10 px-3.5 text-label-sm',\n lg: 'h-12 px-4.5 text-label',\n};\n\nconst OFF = 'bg-surface text-text border-border-strong enabled:hover:border-text-muted';\nconst ON: Record<BfChipVariant, string> = {\n tonal:\n 'bg-primary-soft text-primary-strong border-primary-soft enabled:hover:bg-primary-soft-hover enabled:hover:border-primary-soft-hover',\n ink: 'bg-text text-bg border-text enabled:hover:bg-text-secondary enabled:hover:border-text-secondary',\n};\n/* Pressed, added only while the chip can be pressed: off takes the pressed neutral surface, a\n selected tonal chip the soft pressed tint, a selected ink chip `text-secondary`. */\nconst PRESSED_OFF = 'enabled:active:bg-surface-pressed';\nconst PRESSED_ON: Record<BfChipVariant, string> = {\n tonal: 'enabled:active:bg-primary-soft-pressed enabled:active:border-primary-soft-pressed',\n ink: 'enabled:active:bg-text-secondary enabled:active:border-text-secondary',\n};\n\n/* Check mark drawn with two borders, shown only while selected. `before:block` is required: a\n pseudo-element defaults to `display: inline`, and an inline, non-replaced box ignores explicit\n width/height, which collapsed the mark to a thin vertical line instead of a check shape. */\nconst MARK =\n \"before:block before:h-[10px] before:w-[5px] before:-translate-y-px before:rotate-45 before:border-r-2 before:border-b-2 before:border-current before:content-['']\";\n\n/**\n * Toggleable filter chip. Selected chips carry a check mark and a tint (`tonal`) or the ink\n * treatment used by mobile filter rows (`ink`). For a single-choice row, put the chips in a\n * `bf-chip-group`, which makes them a radio group.\n *\n * @example\n * <bf-chip [(selected)]=\"filters.design\">Design</bf-chip>\n * <bf-chip variant=\"ink\" [selected]=\"view() === 'open'\" (changed)=\"setView('open')\">Open</bf-chip>\n * @summary Toggleable filter chip with a check mark when selected, in tonal or ink style\n * @category Forms\n * @since 0.1.0\n * @slot icon-start An icon before the label.\n * @slot default Rich label content, before the `label` text.\n */\n@Component({\n selector: 'bf-chip',\n host: { class: 'inline-flex max-w-full' },\n template: `\n <button\n #button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"radio() ? 'radio' : null\"\n [attr.aria-checked]=\"radio() ? (isSelected() ? 'true' : 'false') : null\"\n [attr.aria-pressed]=\"radio() ? null : isSelected() ? 'true' : 'false'\"\n [attr.tabindex]=\"tabIndex()\"\n [class]=\"classes()\"\n (click)=\"onClick()\"\n >\n @if (isSelected()) {\n <span aria-hidden=\"true\" [class]=\"markClasses\"></span>\n }\n <ng-content select=\"[bfSlot=icon-start]\" />\n <!-- The label truncates with an ellipsis in a narrow container; icon and mark keep their size. -->\n <span data-label class=\"max-w-full min-w-0 truncate\"><ng-content />{{ label() }}</span>\n </button>\n `,\n})\nexport class BfChipComponent implements BfChipGroupItem {\n /** Whether the chip is selected; two-way bindable. Inside a `single`-mode `bf-chip-group` the\n * group's `value` decides and this is ignored. */\n readonly selected = model(false);\n /** The value this chip stands for inside a `bf-chip-group` (compared with `Object.is`); unused\n * outside one. */\n readonly value = input<unknown>(undefined);\n /** Selected treatment: tonal tint (default) or ink. */\n readonly variant = input<BfChipVariant>('tonal');\n /** Disables the chip. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Label text; the default slot works too. */\n readonly label = input('');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`, `md`\n * by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** When false, clicking an already selected chip does nothing (single-choice rows). */\n readonly deselectable = input(true, { transform: booleanAttribute });\n\n /** Emitted with the new state after a user toggle. */\n readonly changed = output<boolean>();\n /**\n * Emitted with the new state after a user toggle, together with `changed`.\n * @deprecated 0.3.0 use changed; removed in 0.4.0\n */\n readonly toggled = output<boolean>();\n\n readonly markClasses = `inline-block ${MARK}`;\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly group = inject(BF_CHIP_GROUP, { optional: true });\n private readonly button = viewChild.required<ElementRef<HTMLButtonElement>>('button');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** Inside a `single`-mode group: a radio whose selection the group owns. */\n protected readonly radio = computed(() => this.group?.radio() ?? false);\n /** Disabled by its own input or by its group. */\n protected readonly isDisabled = computed(\n () => this.disabled() || (this.group?.disabled() ?? false),\n );\n /** The selection shown: the group's in a single-mode group, else `selected`. */\n protected readonly isSelected = computed(() =>\n this.group && this.radio() ? this.group.isSelected(this) : this.selected(),\n );\n /** Roving tab stop in a single-mode group; the native order otherwise. */\n protected readonly tabIndex = computed(() => {\n if (!this.group || !this.radio()) {\n return null;\n }\n return this.group.isTabStop(this) ? 0 : -1;\n });\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const variant = this.variant();\n const on = this.isSelected();\n const pressed = this.isDisabled() ? '' : on ? PRESSED_ON[variant] : PRESSED_OFF;\n return [BASE, SIZE[size], PILL_HIT[size].bordered, on ? ON[variant] : OFF, pressed]\n .filter(Boolean)\n .join(' ');\n });\n\n /**\n * Focuses the chip's button.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.button().nativeElement.focus(options);\n }\n\n /**\n * Whether `node` is this chip or inside it; the group finds the focused chip with it.\n * @internal\n */\n contains(node: Node | null): boolean {\n return node !== null && this.host.contains(node);\n }\n\n /**\n * Toggles `selected` and emits `changed`, unless disabled or selected and not `deselectable`;\n * in a single-mode group, selects this chip through the group instead.\n * @internal\n */\n onClick(): void {\n if (this.isDisabled()) {\n return;\n }\n if (this.group && this.radio()) {\n this.group.select(this);\n return;\n }\n if (!this.deselectable() && this.selected()) {\n return;\n }\n const next = !this.selected();\n this.selected.set(next);\n this.changed.emit(next);\n this.toggled.emit(next);\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n contentChildren,\n input,\n model,\n output,\n} from '@angular/core';\nimport { BfChipComponent } from '../chip/chip.component';\nimport { BF_CHIP_GROUP, type BfChipGroupHost, type BfChipGroupItem } from './chip-group.token';\n\n/**\n * How a `bf-chip-group` treats its chips: one selected at a time (`single`, a radio group) or\n * independent toggles (`multiple`).\n *\n * @summary Whether a chip group picks exactly one chip or lets each chip toggle alone\n * @since 0.3.0\n */\nexport type BfChipGroupMode = 'single' | 'multiple';\n\nconst NAVIGATION_KEYS = new Set(['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp', 'Home', 'End']);\n\n/**\n * A named row of `bf-chip`s. In `single` mode (the default) the chips are a radio group: the\n * group owns the selected chip's `value`, one chip is the tab stop and the arrow keys move the\n * selection. In `multiple` mode the chips stay independent toggles and the group only names them.\n * Not a Signal Forms control: for a form field use `bf-segmented` or `bf-radio-group`.\n *\n * @example\n * <bf-chip-group label=\"Status\" [(value)]=\"status\">\n * <bf-chip value=\"all\">All</bf-chip>\n * <bf-chip value=\"open\">Open</bf-chip>\n * <bf-chip value=\"done\">Done</bf-chip>\n * </bf-chip-group>\n * @summary Named row of chips that picks one like radios, or groups independent toggles\n * @category Forms\n * @since 0.3.0\n * @slot default The `bf-chip`s of the group, each with its `value`.\n */\n@Component({\n selector: 'bf-chip-group',\n providers: [{ provide: BF_CHIP_GROUP, useExisting: BfChipGroupComponent }],\n // gap-2: wrapping rows keep the 8 px the coarse-pointer hit extension of a chip needs.\n host: {\n class: 'flex flex-wrap items-center gap-2',\n '[attr.role]': \"radio() ? 'radiogroup' : 'group'\",\n '[attr.aria-label]': 'label() || null',\n '[attr.aria-labelledby]': 'label() ? null : ariaLabelledby() || null',\n '(keydown)': 'onKeydown($event)',\n },\n template: `<ng-content />`,\n})\nexport class BfChipGroupComponent<T = string> implements BfChipGroupHost {\n /** `single` (default): one chip selected, radio semantics; `multiple`: independent toggles. */\n readonly mode = input<BfChipGroupMode>('single');\n /** Accessible name of the group (required unless `ariaLabelledby` is set). */\n readonly label = input('');\n /** Id(s) of the element(s) that name the group (e.g. a visible heading) when `label` is not set. */\n readonly ariaLabelledby = input('');\n /** single: the selected chip's value (`null` = none); ignored in multiple mode. Two-way. Every\n * chip of a single-mode group needs a `value` (of type `T`); one without it cannot be selected. */\n readonly value = model<T | null>(null);\n /** Disables every chip of the group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** Emitted with the new value after a user change (single mode). */\n readonly changed = output<T | null>();\n\n /** The chips of the group, in document order. */\n private readonly chips = contentChildren(BfChipComponent, { descendants: true });\n\n /**\n * True in `single` mode.\n * @internal\n */\n readonly radio = computed(() => this.mode() === 'single');\n\n /** The enabled chips, in order. */\n private readonly enabled = computed(() =>\n this.disabled() ? [] : this.chips().filter((chip) => !chip.disabled()),\n );\n\n /** The chip matching `value`, else none. A chip without a `value` never matches, so chips\n * that all left it `undefined` cannot all read as selected. */\n private readonly selectedChip = computed(() => {\n const value = this.value();\n return value === null\n ? undefined\n : this.chips().find((chip) => chip.value() !== undefined && Object.is(chip.value(), value));\n });\n\n /** The chip that owns the roving tab stop: the selected enabled chip, else the first enabled. */\n private readonly tabStop = computed(() => {\n const selected = this.selectedChip();\n const enabled = this.enabled();\n return selected && enabled.includes(selected) ? selected : enabled[0];\n });\n\n /**\n * Whether `item` is the selected chip.\n * @internal\n */\n isSelected(item: BfChipGroupItem): boolean {\n return this.selectedChip() === item;\n }\n\n /**\n * Whether `item` owns the roving tab stop.\n * @internal\n */\n isTabStop(item: BfChipGroupItem): boolean {\n return this.tabStop() === item;\n }\n\n /**\n * Selects `item` and emits `changed`, unless it is disabled, already selected or has no\n * `value` (every chip of a single-mode group needs one).\n * @internal\n */\n select(item: BfChipGroupItem): void {\n const chip = this.enabled().find((candidate) => candidate === item);\n if (chip?.value() === undefined || chip === this.selectedChip()) {\n return;\n }\n // The chips' values are the group's values: a template binds both, so the checker cannot\n // tie the chip's `unknown` to `T`; the consumer's `[value]`s are the `T`s of `[(value)]`.\n const next = chip.value() as T;\n this.value.set(next);\n this.changed.emit(next);\n }\n\n /**\n * Single mode: the arrow keys, Home and End move focus and the selection, wrapping and skipping\n * disabled chips.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.radio() || !NAVIGATION_KEYS.has(event.key)) {\n return;\n }\n const enabled = this.enabled();\n if (enabled.length === 0) {\n return;\n }\n event.preventDefault();\n const target = event.target instanceof Node ? event.target : null;\n const from = enabled.findIndex((chip) => chip.contains(target));\n const last = enabled.length - 1;\n let index: number;\n switch (event.key) {\n case 'Home':\n index = 0;\n break;\n case 'End':\n index = last;\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n index = from === -1 || from === last ? 0 : from + 1;\n break;\n default:\n index = from <= 0 ? last : from - 1;\n }\n const next = enabled[index];\n if (next) {\n this.select(next);\n next.focus();\n }\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n input,\n model,\n output,\n type ElementRef,\n viewChildren,\n inject,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { type BfCompareWith, choiceIndex } from '../_shared/choice';\nimport { COARSE_HIT_BASE } from '../_shared/hit-classes';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * One segment of `bf-segmented`; `value` is any type (a string by default).\n *\n * @summary One segment of a segmented control with its value, its label and a disabled flag\n * @since 0.1.0\n */\nexport interface BfSegmentOption<T = string> {\n /** The value the control's `value` takes when this segment is selected. */\n value: T;\n /** The segment's visible label, also its accessible name. */\n label: string;\n /** Whether this segment cannot be selected. */\n disabled?: boolean;\n}\n\n/**\n * The height step of a `bf-segmented`; the same scale as every sized widget.\n *\n * @deprecated 0.3.0 use BfSize; removed in 1.0.0\n * @summary Former name of the shared size scale for segmented controls, kept until 1.0.0\n * @since 0.1.0\n */\nexport type BfSegmentedSize = BfSize;\n\n/* min-w-min: an item shrinks down to its longest word, never below it, so a label wraps between\n its words (the item grows taller) and never breaks between letters or gets cut. When the\n segments cannot fit even then (the largest text sizes, a long compound word), the track grows\n past the control and the control scrolls sideways (see SCROLLER_CLASSES). */\nconst ITEM_BASE =\n 'relative inline-flex min-w-min items-center justify-center rounded-control py-1 font-bold transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface ' +\n `disabled:cursor-not-allowed disabled:text-text-disabled ${COARSE_HIT_BASE}`;\n/* Items are at least 24/32/40 px tall, so with the track's 4 px padding the control is 32/40/48,\n the height of the fields and buttons beside it. Under a coarse pointer the ::after extends each\n item's hit area vertically to 44 px (24 + 2 x 10, 32 + 2 x 6, 40 + 2 x 2) without changing the\n visual; under a fine pointer the item itself is the hit area. */\n/* Horizontal padding in px (12/14/18, the rem values at the default size): it stays put under\n iOS Dynamic Type, which scales rem, so a larger text size spends the segment's width on the\n label, not on its padding. */\nconst ITEM_SIZE: Record<BfSize, string> = {\n sm: 'min-h-6 px-[12px] text-label-xs pointer-coarse:after:-inset-y-2.5',\n md: 'min-h-8 px-[14px] text-label-sm pointer-coarse:after:-inset-y-1.5',\n lg: 'min-h-10 px-[18px] text-label pointer-coarse:after:-inset-y-0.5',\n};\n/* Disabled: the selected item keeps its surface pill (so the value stays readable) without the\n lift; the others take the sunken fill of the track. Text goes to text-disabled in both.\n Forced colours: the selected item opts out of adjustment and paints the system Highlight pair\n itself, because Chromium's Canvas text backplate would otherwise sit under HighlightText and hide\n the label; its transparent focus outline is then drawn in CanvasText. The others keep the\n automatic repaint in ButtonText on a transparent fill.\n The selected item also carries a 1.5 px inset primary-strong outline (>= 3:1 on surface and the\n sunken track), so the state never rests on the pill fill alone (1.18:1 on the track); inset, so\n the box and the hit maths stay. The focus ring sits on a 2 px surface offset, where it reaches\n 3:1, instead of on the track. Opted out of forced-colour adjustment, the selected item would keep\n those authored box-shadow colours, so under forced colours its outline and focus ring are drawn\n in CanvasText on a Canvas offset and the segment shadow is dropped: system colours only.\n Disabled selected: `disabled:inset-ring-text-disabled` and `forced-colors:inset-ring-[CanvasText]`\n both compile to a (0,1,0)+(:disabled) vs (0,2,0) pair, and the plain disabled rule wins, so a\n disabled selected item would otherwise keep the authored `text-disabled` outline under forced\n colours. `forced-colors:disabled:inset-ring-[GrayText]` matches that specificity and repaints it\n in the system's disabled-foreground colour instead. */\nconst ACTIVE =\n 'bg-surface text-text shadow-segment inset-ring-[1.5px] inset-ring-primary-strong disabled:shadow-none disabled:inset-ring-text-disabled forced-colors:forced-color-adjust-none forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:focus-visible:outline-[CanvasText] forced-colors:inset-ring-[CanvasText] forced-colors:disabled:inset-ring-[GrayText] forced-colors:shadow-none forced-colors:focus-visible:ring-[CanvasText] forced-colors:focus-visible:ring-offset-[Canvas]';\nconst INACTIVE =\n 'bg-transparent text-text-muted disabled:bg-surface-sunken forced-colors:bg-transparent forced-colors:text-[ButtonText]';\n/* Pointer affordance: an editable segment shows a pointer and a hover tint (the active one\n `surface-muted`, like the tab-bar active tab, except under forced colours, where its fill stays\n Highlight); a read-only one shows neither. Pressed, an editable segment takes the pressed\n neutral surface (the selected one only outside forced colours, where its fill stays Highlight)\n and an unselected one the `text` label, which holds 4.5:1 there. */\ntype BfSegmentedMode = 'editable' | 'readonly';\nconst ITEM_MODE: Record<BfSegmentedMode, Record<'active' | 'inactive', string>> = {\n editable: {\n active:\n 'cursor-pointer not-forced-colors:enabled:hover:bg-surface-muted not-forced-colors:enabled:active:bg-surface-pressed',\n inactive:\n 'cursor-pointer enabled:hover:text-text enabled:active:bg-surface-pressed enabled:active:text-text',\n },\n readonly: { active: 'cursor-default', inactive: 'cursor-default' },\n};\n/* The track never gets narrower than its segments' longest words (min-w-min), so it can overflow\n the scroller around it. Its horizontal padding and gap are px, like the segments'. */\nconst TRACK_BASE = 'min-w-min gap-[2px] rounded-control px-[4px] py-1';\n/* Track layout: shrink to the segments, or stretch and share the width. */\nconst TRACK_LAYOUT: Record<'fit' | 'full', string> = {\n fit: 'inline-flex',\n full: 'flex w-full',\n};\n/* The scroller around the track: it scrolls sideways only while the segments cannot fit (at the\n largest text sizes). Its 4 px padding, cancelled by a negative margin, keeps the focus ring\n (2 px offset + 4 px, 2 px past the track) inside the clip. */\nconst SCROLLER_CLASSES: Record<'fit' | 'full', string> = {\n fit: '-m-[4px] max-w-[calc(100%+8px)] overflow-x-auto p-[4px]',\n full: '-m-[4px] w-[calc(100%+8px)] overflow-x-auto p-[4px]',\n};\n/* Track fill: `surface-sunken`, or the muted read-only surface of the text fields. */\nconst TRACK_FILL: Record<BfSegmentedMode, string> = {\n editable: 'bg-surface-sunken',\n readonly: 'bg-surface-muted',\n};\n/* The error state outlines the track in `danger-border`, like the other fields' borders. */\nconst TRACK_OUTLINE: Record<'error' | 'none', string> = {\n error: 'ring-[1.5px] ring-danger-border',\n none: '',\n};\nconst NAVIGATION_KEYS = ['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp', 'Home', 'End'];\n\n/**\n * Segmented control for switching between two to four views. Behaves like a radio group for\n * keyboard and assistive tech; implements the Signal Forms value contract. Generic over the option\n * value (a string by default), `null` while nothing is selected.\n *\n * @example\n * <bf-segmented label=\"Range\" [options]=\"ranges\" [(value)]=\"range\" />\n * @summary Segmented control for switching between two to four views, keyboard-navigable like radios\n * @category Forms\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-segmented',\n // A column so the error text sits under the track; items-start keeps the track at its own width.\n host: {\n class: 'inline-flex max-w-full flex-col items-start gap-1.5',\n '[class.w-full]': 'fullWidth()',\n '[attr.id]': 'null',\n },\n template: `\n <div data-bf-segmented-scroller [class]=\"scrollerClasses()\">\n <div\n role=\"radiogroup\"\n tabindex=\"-1\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-describedby]=\"errorId()\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n [class]=\"trackClasses()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (option of options(); track $index) {\n <button\n #radio\n type=\"button\"\n role=\"radio\"\n [attr.aria-checked]=\"$index === selectedIndex() ? 'true' : 'false'\"\n [tabIndex]=\"$index === tabStop() ? 0 : -1\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n [class]=\"itemClasses($index)\"\n (click)=\"selectAt($index)\"\n (blur)=\"touch.emit()\"\n >\n <span data-label class=\"text-center\">{{ option.label }}</span>\n </button>\n }\n </div>\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n `,\n})\nexport class BfSegmentedComponent<T = string> implements FormValueControl<T | null> {\n /** The selected option's value, `null` while nothing is selected; two-way bindable and bound by\n * `[formField]`. */\n readonly value = model<T | null>(null);\n /** The segments. */\n readonly options = input.required<readonly BfSegmentOption<T>[]>();\n /** Equality for matching `value` to an option (default `Object.is`); pass one for object values. */\n readonly compareWith = input<BfCompareWith<T>>(Object.is);\n /** Height step of the control (track): sm 32, md 40, lg 48 px; unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretch the control and share the width between segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Disables every segment. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Shows the choice but blocks changes; the tab stop stays focusable and the group exposes\n * `aria-readonly`.\n */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the choice required (`aria-required` on the group). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the field; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Accessible name of the group (not rendered visibly). */\n readonly label = input('');\n /** Accessible name when `label` is not set. */\n readonly ariaLabel = input('');\n /**\n * Id(s) of the element(s) that name the group (e.g. a visible heading) when `label` is not set.\n */\n readonly ariaLabelledby = input('');\n /**\n * Name of the bound field. Not rendered, because the control has no native form element; kept so\n * Signal Forms can bind it.\n */\n readonly name = input('');\n /** Group id; generated when not set. */\n readonly id = input(uniqueId('bf-segmented'));\n\n /** Emitted with the newly selected value after a user change (never `null`). */\n readonly changed = output<T>();\n /** Emitted on blur so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n /** The rendered radio buttons, in option order; used to move focus after keyboard selection. */\n readonly radios = viewChildren<ElementRef<HTMLButtonElement>>('radio');\n\n /** Index of the option matching `value`, `-1` while nothing (or `null`) is selected. */\n readonly selectedIndex = computed(() =>\n choiceIndex(this.options(), this.value(), this.compareWith()),\n );\n\n /** Index of the option that owns the roving tab stop: the selected enabled option, or the first\n * enabled option when nothing valid is selected; `-1` when every option is disabled. */\n readonly tabStop = computed(() => {\n const options = this.options();\n const selected = this.selectedIndex();\n if (selected >= 0 && !options[selected]?.disabled) {\n return selected;\n }\n return options.findIndex((o) => !o.disabled);\n });\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this control) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph (`aria-describedby`) while there is an error, else null; the\n * paragraph renders whenever it is named. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /** `aria-label`: the `label`, else `ariaLabel`. */\n readonly ariaLabelAttr = computed(() => this.label() || this.ariaLabel() || null);\n /** `aria-labelledby`: only while no `label` names the group. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n private readonly mode = computed<BfSegmentedMode>(() =>\n this.readonly() ? 'readonly' : 'editable',\n );\n /** The classes of the scroller around the track. */\n protected readonly scrollerClasses = computed(\n () => SCROLLER_CLASSES[this.fullWidth() ? 'full' : 'fit'],\n );\n\n readonly trackClasses = computed(() =>\n [\n TRACK_BASE,\n TRACK_LAYOUT[this.fullWidth() ? 'full' : 'fit'],\n TRACK_FILL[this.mode()],\n TRACK_OUTLINE[this.showError() ? 'error' : 'none'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /**\n * The classes of the segment at `index`.\n * @internal\n */\n itemClasses(index: number): string {\n const active = index === this.selectedIndex();\n return [\n ITEM_BASE,\n ITEM_SIZE[this.resolvedSize()],\n active ? ACTIVE : INACTIVE,\n ITEM_MODE[this.mode()][active ? 'active' : 'inactive'],\n this.fullWidth() ? 'flex-1' : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * Focuses the segment that owns the tab stop; Signal Forms calls it from `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.focusRadio(this.tabStop(), options);\n }\n\n /**\n * Selects the option whose value matches `next` under `compareWith`, as a click would.\n * @param next The value of the option to select.\n */\n select(next: T): void {\n this.selectAt(choiceIndex(this.options(), next, this.compareWith()));\n }\n\n /**\n * Selects the option at `index` unless the control is disabled or read-only, the option is\n * missing, or it is already selected.\n * @param index The position of the option in `options`.\n */\n selectAt(index: number): void {\n const option = this.options()[index];\n if (this.disabled() || this.readonly() || !option || index === this.selectedIndex()) {\n return;\n }\n this.value.set(option.value);\n this.changed.emit(option.value);\n }\n\n /**\n * Arrow keys, Home and End move the selection, as in a radio group.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!NAVIGATION_KEYS.includes(event.key)) {\n return;\n }\n event.preventDefault();\n // Read-only: the value and the focused segment stay; Tab still leaves the group.\n if (this.readonly()) {\n return;\n }\n // Indexes of the enabled options, in order.\n const enabled = this.options().flatMap((o, i) => (o.disabled ? [] : [i]));\n if (enabled.length === 0) {\n return;\n }\n const index = enabled.indexOf(this.selectedIndex());\n let next: number | undefined;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n break;\n case 'Home':\n next = enabled[0];\n break;\n case 'End':\n next = enabled[enabled.length - 1];\n break;\n }\n if (next === undefined) {\n return;\n }\n this.selectAt(next);\n if (this.selectedIndex() === next) {\n this.focusRadio(next);\n }\n }\n\n private focusRadio(index: number, options?: FocusOptions): void {\n this.radios()[index]?.nativeElement.focus(options);\n }\n}\n","import { Component, booleanAttribute, computed, inject, input, model, output } from '@angular/core';\nimport { type FormValueControl } from '@angular/forms/signals';\nimport { type BfColorScheme } from '../../config/color-scheme';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BfSegmentedComponent, type BfSegmentOption } from '../segmented/segmented.component';\n\n/**\n * The colour scheme switch: System, Light and Dark as a three-option segmented control. It holds\n * a `BfColorScheme` and injects no service, so the app binds its own state, usually\n * `BfColorSchemeService.scheme` (`provideBfColorScheme()` on desktop, `provideBfShell()` in a\n * Capacitor app, where `BfPlatformService.theme` is the same signal).\n *\n * @example\n * <bf-theme-switch [(value)]=\"colorScheme.scheme\" />\n * @summary Segmented System, Light and Dark switch bound two-way to the app colour scheme\n * @category Forms\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-theme-switch',\n imports: [BfSegmentedComponent],\n host: { class: 'inline-flex max-w-full', '[class.w-full]': 'fullWidth()' },\n template: `\n <bf-segmented\n [label]=\"resolvedLabel()\"\n [options]=\"options\"\n [value]=\"value()\"\n [size]=\"size()\"\n [fullWidth]=\"fullWidth()\"\n (changed)=\"select($event)\"\n />\n `,\n})\nexport class BfThemeSwitchComponent implements FormValueControl<BfColorScheme> {\n private readonly labels = inject(BF_LABELS);\n\n /** The colour scheme choice; bind it two-way, usually to `BfColorSchemeService.scheme`, or\n * with `[formField]`. */\n readonly value = model<BfColorScheme>('system');\n /** Accessible name of the switch (not shown); empty falls back to the `theme` label. */\n readonly label = input('');\n /** Height step: sm 32, md 40, lg 48 px; unset follows `provideBfDefaults()` (`controlSize`,\n * `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretch the switch and share the width between the three segments. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n /** Emitted with the new choice right after the user picks another segment. */\n readonly changed = output<BfColorScheme>();\n\n /** The three segments, labelled by `themeSystem`, `themeLight` and `themeDark`. */\n protected readonly options: readonly BfSegmentOption<BfColorScheme>[] = [\n { value: 'system', label: this.labels.themeSystem },\n { value: 'light', label: this.labels.themeLight },\n { value: 'dark', label: this.labels.themeDark },\n ];\n /** The group's accessible name: `label`, else the `theme` label. */\n protected readonly resolvedLabel = computed(() => this.label() || this.labels.theme);\n\n /**\n * Takes the segment the user picked.\n * @internal\n */\n select(next: BfColorScheme): void {\n this.value.set(next);\n this.changed.emit(next);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Provided by `bf-list` so a `bf-list-item` knows it sits inside a `role=\"list\"` container and may\n * claim `role=\"listitem\"`, without `list-item.component.ts` importing `list.component.ts`.\n */\nexport const BF_LIST = new InjectionToken<true>('BF_LIST');\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\nimport { BF_LIST } from './list.token';\n\ntype BfListLook = 'inset' | 'plain';\ntype BfListRows = 'spaced' | 'divided';\n/* `divided` (opt-in): no gap, a `border` line between rows, and the rows' own surfaces squared\n off, so the hover fill reaches the list's edges. A plain divided list gives its rows the card's\n inline padding, so a list pulled flush to a card's edges (`-mx-card`) keeps its text on the\n card's content edge. An inset divided list is one rounded surface: only its first and last rows\n keep the card radius. The row selectors reach the row's own box (`bf-list-item > *`). */\nconst CLASSES: Record<BfListLook, Record<BfListRows, string>> = {\n inset: {\n spaced: 'flex flex-col gap-1 rounded-card bg-bg p-1.5',\n divided:\n 'flex flex-col gap-0 rounded-card bg-surface p-0 divide-y divide-border [&>bf-list-item>*]:rounded-none [&>bf-list-item:first-child>*]:rounded-t-card [&>bf-list-item:last-child>*]:rounded-b-card',\n },\n plain: {\n spaced: 'flex flex-col gap-2 bg-transparent p-0',\n divided:\n 'flex flex-col gap-0 bg-transparent p-0 divide-y divide-border [&>bf-list-item>*]:rounded-none [&>bf-list-item>*]:px-card',\n },\n};\n\n/**\n * Container for `bf-list-item` rows. The inset style (default) wraps the rows in the warm\n * background with rounded corners, as in the design's grouped lists.\n *\n * @example\n * <bf-list>\n * <bf-list-item title=\"Notifications\" subtitle=\"Every Monday at 8:00\" />\n * </bf-list>\n * <bf-card>\n * <bf-list [inset]=\"false\" divided class=\"-mx-card\">\n * <bf-list-item title=\"Atlas rebrand\" subtitle=\"Due Friday\" />\n * </bf-list>\n * </bf-card>\n * @summary Container for list rows, inset by default with rounded corners on a warm background\n * @category Data display\n * @since 0.1.0\n * @slot default The rows, each a `bf-list-item`.\n */\n@Component({\n selector: 'bf-list',\n host: { class: 'block' },\n // Tells the projected rows they are inside a list, so each claims role=\"listitem\".\n providers: [{ provide: BF_LIST, useValue: true }],\n template: `<div role=\"list\" [class]=\"classes()\"><ng-content /></div>`,\n})\nexport class BfListComponent {\n /** Grouped look with the warm container; false renders rows on the page background. */\n readonly inset = input(true, { transform: booleanAttribute });\n /** Separates the rows with a `border` line instead of a gap, with square rows whose hover\n * reaches the list's edges. Off by default. */\n readonly divided = input(false, { transform: booleanAttribute });\n\n readonly classes = computed(\n () => CLASSES[this.inset() ? 'inset' : 'plain'][this.divided() ? 'divided' : 'spaced'],\n );\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Provided by the surfaces a `bfAction` stretches over (`bf-card`, `bf-list-item`), so the nearest\n * one, and only it, shows the clickable cues: a card holding navigation rows is not lit by the\n * rows' links. Kept in its own file so the directive and the surfaces never import each other.\n */\nexport interface BfActionHost {\n /** Called by a `bfAction` inside the surface; returns its unregister function. */\n registerAction(): () => void;\n /** Whether the surface's action has keyboard focus (`:focus-visible`), for the focus ring. */\n setActionFocusVisible(visible: boolean): void;\n /**\n * The id of an element whose text starts the action's accessible name (a list row's visually\n * hidden \"Unread\"), or `null`; the action then names itself `aria-labelledby=\"<id> <own id>\"`.\n */\n readonly actionLabelPrefix?: Signal<string | null>;\n}\n\nexport const BF_ACTION_HOST = new InjectionToken<BfActionHost>('BF_ACTION_HOST');\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_ACTION_HOST, type BfActionHost } from '../action/action-host.token';\nimport { BF_LIST } from './list.token';\n\n/* Always `relative`: a bfAction link or button in the title slot stretches its ::after over the\n row. */\nconst ROW =\n 'relative flex w-full items-center gap-3 rounded-field bg-surface p-3.5 text-start text-text transition-colors';\nconst INTERACTIVE =\n 'cursor-pointer enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed enabled:active:after:border-text-muted focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed disabled:text-text-disabled';\n/* A row holding its own [bfAction] (a navigation row; it registers through BF_ACTION_HOST): the\n pointer, the hover fill and the pressed fill while its action is pressed, plus the focus ring\n while the action has keyboard focus. While pressed the chevron turns `text-muted`, because\n `text-subtle` misses 3:1 on `surface-pressed`. */\ntype BfRowAction = 'none' | 'action' | 'focused';\nconst ACTION: Record<BfRowAction, string> = {\n none: '',\n action:\n 'cursor-pointer hover:bg-surface-muted has-[[data-bf-action]:active]:bg-surface-pressed has-[[data-bf-action]:active]:after:border-text-muted',\n focused:\n 'cursor-pointer hover:bg-surface-muted has-[[data-bf-action]:active]:bg-surface-pressed has-[[data-bf-action]:active]:after:border-text-muted ring-4 ring-ring',\n};\n/* The chevron sits at the inline end and points there: right in LTR, mirrored to the left under\n dir=\"rtl\" (and nudged the other way). */\n/* The title, the title slot and the subtitle wrap (anywhere, for a long word or URL) so no text is\n lost at large text sizes; `truncate` keeps each on one line with an ellipsis. */\ntype BfRowText = 'wrap' | 'truncate';\nconst TEXT: Record<BfRowText, string> = {\n wrap: 'wrap-anywhere',\n truncate: 'truncate',\n};\n/* An unread row's dot: 6 px, 10 px before the text column (-start-2.5), so it sits in the row's\n 14 px inline-start padding, or the 12 px gap after a leading slot, with 4 px clear on each side\n and no extra padding: read and unread rows keep their text aligned. On the title line: it is\n absolute with no top, so its block position is its static one (the top of the text column,\n where the title line starts) plus half the 20 px title line less its 6 px (mt-[7px]). */\nconst UNREAD_DOT =\n 'absolute -start-2.5 mt-[7px] size-1.5 rounded-full bg-primary forced-colors:bg-[CanvasText]';\nconst CHEVRON =\n \"after:ms-auto after:h-2.5 after:w-2.5 after:shrink-0 after:-translate-x-1 after:rotate-45 rtl:after:translate-x-1 rtl:after:-rotate-135 after:border-t-[1.5px] after:border-r-[1.5px] after:border-text-subtle after:content-['']\";\n\n/**\n * One row of a list: leading slot (avatar, icon tile), title and subtitle, trailing slot\n * (time, toggle, badge) and an optional chevron for rows that navigate. A navigation row puts a\n * `bfAction` link in the `title` slot, so the row stays a list item and the link covers it.\n * `unread` marks a row not yet opened with a dot and a bolder title.\n *\n * @example\n * <bf-list-item subtitle=\"lena@studio.ch\" chevron>\n * <bf-avatar bfSlot=\"leading\" initials=\"LM\" />\n * <a bfSlot=\"title\" bfAction routerLink=\"/account\">Account</a>\n * </bf-list-item>\n * @summary List row with leading slot, title, subtitle, trailing slot and an optional chevron\n * @category Data display\n * @since 0.1.0\n * @slot leading Content before the text, such as an avatar or an icon.\n * @slot title Rich title content, instead of or next to the `title` text.\n * @slot default More content under the title and subtitle.\n * @slot trailing Content at the end, such as a toggle, a badge or a button.\n */\n@Component({\n selector: 'bf-list-item',\n // role=\"listitem\" only inside bf-list: a standalone row claiming it would have no list parent.\n host: { class: 'block', '[attr.role]': 'role' },\n providers: [{ provide: BF_ACTION_HOST, useExisting: BfListItemComponent }],\n imports: [NgTemplateOutlet],\n template: `\n @if (interactive()) {\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"classes()\"\n (click)=\"clicked.emit($event)\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n } @else {\n <div [class]=\"classes()\"><ng-container *ngTemplateOutlet=\"content\" /></div>\n }\n <ng-template #content>\n <ng-content select=\"[bfSlot=leading]\" />\n <span class=\"relative flex min-w-0 flex-1 flex-col\">\n @if (unreadId(); as id) {\n <!-- Read before the title; with a bfAction the link's name takes it (aria-labelledby),\n so the text itself is hidden from the tree to be read once. -->\n <span [class]=\"unreadDot\"\n ><span [id]=\"id\" class=\"sr-only\" [attr.aria-hidden]=\"hasAction() ? 'true' : null\"\n >{{ labels.listItemUnread }},\n </span></span\n >\n }\n @if (title()) {\n <span class=\"text-label {{ titleWeight() }} {{ textClasses() }}\">{{ title() }}</span>\n }\n <span class=\"text-label {{ titleWeight() }} empty:hidden {{ textClasses() }}\"\n ><ng-content select=\"[bfSlot=title]\"\n /></span>\n @if (subtitle()) {\n <span class=\"text-caption text-text-muted {{ textClasses() }}\">{{ subtitle() }}</span>\n }\n <ng-content />\n </span>\n <!-- Above a stretched bfAction link, so a toggle or button here stays clickable. -->\n <span class=\"relative z-1 flex shrink-0 items-center gap-3 empty:hidden\"\n ><ng-content select=\"[bfSlot=trailing]\"\n /></span>\n </ng-template>\n `,\n})\nexport class BfListItemComponent implements BfActionHost {\n /** Primary text. For a navigation row, project an `<a bfSlot=\"title\" bfAction>` instead. */\n readonly title = input('');\n /** Secondary text under the title. */\n readonly subtitle = input('');\n /** Render the row as a button that emits `clicked` (an action row; a row that navigates puts a\n * `bfAction` link in the `title` slot instead). */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Show a trailing chevron (navigation rows). */\n readonly chevron = input(false, { transform: booleanAttribute });\n /** Disable an interactive row. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Keep the title, the title slot and the subtitle on one line each, cut with an ellipsis. By\n * default they wrap, so nothing is lost at large text sizes.\n */\n readonly truncate = input(false, { transform: booleanAttribute });\n /** Mark the row as not yet opened: a dot at the inline start, a bolder title and a visually\n * hidden state (the `listItemUnread` label) read before the title. */\n readonly unread = input(false, { transform: booleanAttribute });\n\n /** Emitted when an interactive row is activated. */\n readonly clicked = output<Event>();\n\n /** `listitem` inside a `bf-list`, else no role. */\n protected readonly role = inject(BF_LIST, { optional: true }) ? 'listitem' : null;\n protected readonly labels = inject(BF_LABELS);\n protected readonly unreadDot = UNREAD_DOT;\n\n private readonly actions = signal(0);\n private readonly actionFocusVisible = signal(false);\n private readonly actionState = computed<BfRowAction>(() => {\n if (this.actions() === 0) {\n return 'none';\n }\n return this.actionFocusVisible() ? 'focused' : 'action';\n });\n protected readonly hasAction = computed(() => this.actions() > 0);\n\n /* Created on the first unread render only, so a row that is never unread takes no id. */\n private unreadIdValue: string | undefined;\n /** The id of the unread state text, while `unread` is set. */\n protected readonly unreadId = computed(() =>\n this.unread() ? (this.unreadIdValue ??= uniqueId('bf-list-item-unread')) : null,\n );\n /** @internal The unread state starts the name of the row's `bfAction`. */\n readonly actionLabelPrefix = computed(() => (this.hasAction() ? this.unreadId() : null));\n\n /** The title weight: bolder on an unread row. */\n protected readonly titleWeight = computed(() => (this.unread() ? 'font-extrabold' : 'font-bold'));\n\n /** Wrap or truncate classes of the title, the title slot and the subtitle. */\n protected readonly textClasses = computed(() => TEXT[this.truncate() ? 'truncate' : 'wrap']);\n\n readonly classes = computed(() =>\n [\n ROW,\n this.interactive() ? INTERACTIVE : ACTION[this.actionState()],\n this.chevron() ? CHEVRON : '',\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n /** @internal Called by a `bfAction` in the row. */\n registerAction(): () => void {\n this.actions.update((n) => n + 1);\n return () => this.actions.update((n) => n - 1);\n }\n\n /** @internal Called by the row's `bfAction` on focus and blur. */\n setActionFocusVisible(visible: boolean): void {\n this.actionFocusVisible.set(visible);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, booleanAttribute, computed, input, output, signal } from '@angular/core';\nimport { BF_ACTION_HOST, type BfActionHost } from '../action/action-host.token';\n\n/**\n * The surface of a `bf-card`: raised, tint, ink or flat.\n *\n * @summary The four card surfaces, from a raised panel to a flat outline\n * @since 0.1.0\n */\nexport type BfCardVariant = 'raised' | 'tint' | 'ink' | 'flat';\n/**\n * The inner padding of a `bf-card`: md or lg.\n *\n * @summary The two inner paddings of a card, regular and roomy\n * @since 0.1.0\n */\nexport type BfCardPadding = 'md' | 'lg';\n\n/* Always `relative`: a bfAction link or button inside stretches its ::after over this box. The\n footer takes the free space above it (`mt-auto`), so in a grid of equal-height cards every\n footer sits on the bottom edge. */\nconst BASE =\n 'relative flex h-full w-full flex-col gap-3 rounded-card text-start [&>[bfSlot=footer]]:mt-auto';\nconst VARIANT: Record<BfCardVariant, string> = {\n raised: 'bg-surface text-text shadow-raised',\n tint: 'bg-primary-soft text-text',\n ink: 'bg-text text-bg',\n flat: 'bg-surface text-text border-[1.5px] border-border-strong',\n};\nconst PADDING: Record<BfCardPadding, string> = { md: 'p-card', lg: 'p-card-lg' };\n/* Deprecated `interactive`: the whole card is a <button>. */\nconst INTERACTIVE =\n 'cursor-pointer transition-shadow hover:shadow-floating active:shadow-raised focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring';\n/* A card holding its own [bfAction] (it registers through BF_ACTION_HOST): the pointer and the\n hover elevation, dropping back to `raised` while the action is pressed, plus the focus ring\n while the action has keyboard focus. */\ntype BfCardAction = 'none' | 'action' | 'focused';\nconst ACTION: Record<BfCardAction, string> = {\n none: '',\n action:\n 'cursor-pointer transition-shadow hover:shadow-floating has-[[data-bf-action]:active]:shadow-raised',\n focused:\n 'cursor-pointer transition-shadow hover:shadow-floating has-[[data-bf-action]:active]:shadow-raised ring-4 ring-ring',\n};\n\n/**\n * Surface for a piece of content: a project summary, a stat, a focus prompt. Four variants from\n * the design: raised (default), tint, ink and flat. To make the whole card clickable, put a\n * `bfAction` link or button in its heading (the stretched-link pattern).\n *\n * @example\n * <bf-card>\n * <span bfSlot=\"header\" class=\"text-caption text-text-muted\">Project</span>\n * <h3 class=\"text-heading\"><a bfAction routerLink=\"/projects/atlas\">Atlas rebrand</a></h3>\n * <bf-progress [value]=\"68\" label=\"Progress\" />\n * </bf-card>\n * @summary Content surface with an optional header slot, in four visual styles from raised to flat\n * @category Data display\n * @since 0.1.0\n * @slot header Content above the body, such as a title row.\n * @slot default The card body.\n * @slot footer Content below the body, such as its actions; it sits on the card's bottom edge.\n */\n@Component({\n selector: 'bf-card',\n imports: [NgTemplateOutlet],\n host: { class: 'block' },\n providers: [{ provide: BF_ACTION_HOST, useExisting: BfCardComponent }],\n template: `\n @if (interactive()) {\n <button type=\"button\" [class]=\"classes()\" (click)=\"clicked.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n } @else {\n <div [class]=\"classes()\"><ng-container *ngTemplateOutlet=\"content\" /></div>\n }\n <ng-template #content>\n <ng-content select=\"[bfSlot=header]\" />\n <ng-content />\n <ng-content select=\"[bfSlot=footer]\" />\n </ng-template>\n `,\n})\nexport class BfCardComponent implements BfActionHost {\n /** Surface treatment: raised (default), tint, ink, flat. */\n readonly variant = input<BfCardVariant>('raised');\n /** Whole card is a button that emits `clicked`.\n * @deprecated 0.3.0 use a bfAction link or button in the card's heading; removed in 1.0.0 */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Inner padding: md 18 px (`--spacing-card`), lg 24 px (`--spacing-card-lg`). */\n readonly padding = input<BfCardPadding>('md');\n\n /** Emitted when an interactive card is activated.\n * @deprecated 0.3.0 use a bfAction link or button in the card's heading; removed in 1.0.0 */\n readonly clicked = output<Event>();\n\n private readonly actions = signal(0);\n private readonly actionFocusVisible = signal(false);\n\n readonly classes = computed(() =>\n [\n BASE,\n VARIANT[this.variant()],\n PADDING[this.padding()],\n this.interactive() ? INTERACTIVE : ACTION[this.actionState()],\n ]\n .filter(Boolean)\n .join(' '),\n );\n\n private readonly actionState = computed<BfCardAction>(() => {\n if (this.actions() === 0) {\n return 'none';\n }\n return this.actionFocusVisible() ? 'focused' : 'action';\n });\n\n /** @internal Called by a `bfAction` in the card. */\n registerAction(): () => void {\n this.actions.update((n) => n + 1);\n return () => this.actions.update((n) => n - 1);\n }\n\n /** @internal Called by the card's `bfAction` on focus and blur. */\n setActionFocusVisible(visible: boolean): void {\n this.actionFocusVisible.set(visible);\n }\n}\n","import { Component, booleanAttribute, computed, input } from '@angular/core';\n\n/**\n * The track height of a `bf-progress`: sm or md.\n *\n * @summary The two track heights of a progress bar, thin and regular\n * @since 0.1.0\n */\nexport type BfProgressSize = 'sm' | 'md';\n/**\n * The fill colour of a `bf-progress`: primary, success, warning or danger.\n *\n * @summary The four fill colours of a progress bar, from primary to danger\n * @since 0.1.0\n */\nexport type BfProgressTone = 'primary' | 'success' | 'warning' | 'danger';\n\nconst TRACK =\n '[grid-area:1/1] block w-full appearance-none overflow-hidden rounded-full bg-surface-sunken [&::-webkit-progress-bar]:bg-surface-sunken [&::-webkit-progress-bar]:rounded-full [&::-webkit-progress-value]:rounded-full [&::-webkit-progress-value]:transition-[width] motion-reduce:[&::-webkit-progress-value]:transition-none [&::-moz-progress-bar]:rounded-full indeterminate:[&::-moz-progress-bar]:bg-transparent';\nconst SIZE: Record<BfProgressSize, string> = { sm: 'h-2', md: 'h-2.5' };\nconst TONE: Record<BfProgressTone, string> = {\n /* primary-strong: the fill reaches 3:1 on the sunken track for any configured primary. */\n primary: '[&::-webkit-progress-value]:bg-primary-strong [&::-moz-progress-bar]:bg-primary-strong',\n success: '[&::-webkit-progress-value]:bg-success [&::-moz-progress-bar]:bg-success',\n warning: '[&::-webkit-progress-value]:bg-warning [&::-moz-progress-bar]:bg-warning',\n danger: '[&::-webkit-progress-value]:bg-danger [&::-moz-progress-bar]:bg-danger',\n};\n\n/* The indeterminate stripe: 40 % of the track, running across it; under reduced motion it stands\n still at the start, a static 40 % bar. It starts at the inline start and runs to the inline\n end, mirrored under dir=\"rtl\" by its own keyframes. Its fill follows the tone. It shares the track's grid\n cell rather than being positioned, so the host stays unpositioned: a positioned bar would sit\n above a card's stretched bfAction link and take its clicks. */\nconst STRIPE =\n 'pointer-events-none [grid-area:1/1] w-2/5 rounded-full animate-progress-indeterminate rtl:animate-progress-indeterminate-rtl motion-reduce:animate-none rtl:motion-reduce:animate-none forced-colors:bg-[CanvasText]';\nconst STRIPE_TONE: Record<BfProgressTone, string> = {\n primary: 'bg-primary-strong',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n};\n\n/**\n * Progress bar for completion and quotas, determinate by default, or `indeterminate` while the\n * amount of work is unknown.\n *\n * @example\n * <bf-progress [value]=\"68\" label=\"Atlas rebrand\" valueText=\"12 of 18 tasks\" />\n * <bf-progress indeterminate label=\"Uploading\" />\n * @summary Progress bar in two sizes and four tones for completion, quotas and unknown waits\n * @category Data display\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-progress',\n host: { class: 'grid overflow-hidden rounded-full' },\n template: `\n <progress\n max=\"100\"\n [attr.value]=\"indeterminate() ? null : percent()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-valuetext]=\"valueText() || null\"\n [class]=\"classes()\"\n ></progress>\n @if (indeterminate()) {\n <span data-stripe aria-hidden=\"true\" [class]=\"stripeClasses()\"></span>\n }\n `,\n})\nexport class BfProgressComponent {\n /** Completion in percent; clamped to 0–100. Without it (and without `indeterminate`) the bar\n * shows 0 %. Ignored while `indeterminate`. */\n readonly value = input<number | undefined>(undefined);\n /** The amount of work is unknown: the native bar carries no value (assistive tech announces it\n * as busy) and a stripe runs across the track, a static 40 % bar under reduced motion. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** The value in words for assistive tech (`aria-valuetext`), such as \"12 of 18 tasks\"; the\n * percentage is announced while it is empty. */\n readonly valueText = input('');\n /** Accessible name of the bar (\"Atlas rebrand\"). */\n readonly label = input.required<string>();\n /** Bar height: sm 8 px (default), md 10 px. */\n readonly size = input<BfProgressSize>('sm');\n /** Fill color by meaning. */\n readonly tone = input<BfProgressTone>('primary');\n\n readonly percent = computed(() => {\n const raw = this.value();\n if (raw === undefined || !Number.isFinite(raw)) {\n return 0;\n }\n return Math.min(100, Math.max(0, Math.round(raw)));\n });\n readonly classes = computed(() => `${TRACK} ${SIZE[this.size()]} ${TONE[this.tone()]}`);\n readonly stripeClasses = computed(() => `${STRIPE} ${STRIPE_TONE[this.tone()]}`);\n}\n","import { Component, computed, input } from '@angular/core';\n\n/**\n * The size of a `bf-avatar`: sm, md or lg.\n *\n * @summary The three sizes of an avatar, from a list row to a profile header\n * @since 0.1.0\n */\nexport type BfAvatarSize = 'sm' | 'md' | 'lg';\n/**\n * The colour scheme of a `bf-avatar`: tint, ink, warning or neutral.\n *\n * @summary The four colour schemes of an avatar behind its initials or icon\n * @since 0.1.0\n */\nexport type BfAvatarVariant = 'tint' | 'ink' | 'warning' | 'neutral';\n\n/* min-w/min-h in ex (the initials' x-height, about 5.9 px at 11 px): Android's font scale is a text\n zoom that grows the rendered font but not em, rem or px lengths, and ex follows the rendered\n font, so the circle grows with its initials instead of cutting them off (53 px for the sm\n avatar's 22 px initials at scale 2.0). 4.5ex keeps headroom under every size step: with Manrope\n it is 26.7 px against sm's 30 px, 31.5 against md's 40 and 63 against lg's 84, so the default\n sizes (and iOS Dynamic Type, which scales both sides) are unchanged even with a theme font whose\n x-height is up to 10 % taller. */\nconst BASE =\n 'inline-flex min-h-[4.5ex] min-w-[4.5ex] shrink-0 items-center justify-center overflow-hidden rounded-full font-extrabold uppercase select-none';\nconst SIZE: Record<BfAvatarSize, string> = {\n sm: 'size-7.5 text-nano',\n md: 'h-10 w-10 text-label-xs',\n lg: 'size-21 text-avatar-lg',\n};\nconst VARIANT: Record<BfAvatarVariant, string> = {\n tint: 'bg-primary-soft text-primary-strong',\n ink: 'bg-text text-bg',\n warning: 'bg-warning-soft text-warning',\n neutral: 'bg-neutral-soft text-neutral',\n};\n\n/**\n * Round avatar showing a photo or initials.\n *\n * @example\n * <bf-avatar initials=\"LM\" />\n * <bf-avatar src=\"/lena.jpg\" alt=\"Lena Moser\" size=\"lg\" />\n * @summary Round avatar showing a photo or initials, in three sizes and four color variants\n * @category Data display\n * @since 0.1.0\n */\n@Component({\n selector: 'bf-avatar',\n host: {\n class: 'inline-flex',\n '[attr.role]': \"alt() ? 'img' : null\",\n '[attr.aria-label]': 'alt() || null',\n '[attr.aria-hidden]': \"alt() ? null : 'true'\",\n },\n template: `\n @if (src()) {\n <img [src]=\"src()\" alt=\"\" [class]=\"classes() + ' object-cover'\" />\n } @else {\n <span aria-hidden=\"true\" [class]=\"classes()\">{{ initials() }}</span>\n }\n `,\n})\nexport class BfAvatarComponent {\n /** One or two letters shown when there is no image. */\n readonly initials = input('');\n /** Image URL; when set, the image replaces the initials. */\n readonly src = input('');\n /** Accessible name; when unset the avatar is decorative and hidden from assistive tech. */\n readonly alt = input('');\n /** Diameter: sm 30 px, md 40 px (default), lg 84 px; at least 4.5ex of the initials, so a text\n * zoom (Android font scale) grows the circle with its initials. */\n readonly size = input<BfAvatarSize>('md');\n /** Background treatment for the initials. */\n readonly variant = input<BfAvatarVariant>('tint');\n\n readonly classes = computed(() => `${BASE} ${SIZE[this.size()]} ${VARIANT[this.variant()]}`);\n}\n","import {\n Component,\n DestroyRef,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The tone of a `bf-alert`: neutral, success, warning or danger.\n *\n * @summary The four tones of an alert, from neutral information to a danger message\n * @since 0.1.0\n */\nexport type BfAlertVariant = 'neutral' | 'success' | 'warning' | 'danger';\n\nconst BASE = 'flex items-start gap-3 rounded-field border-[1.5px] p-4 text-label';\nconst VARIANT: Record<BfAlertVariant, string> = {\n neutral: 'bg-surface-sunken border-transparent text-text',\n success: 'bg-success-soft border-transparent text-success',\n warning: 'bg-warning-soft border-transparent text-warning',\n danger: 'bg-danger-soft border-danger-border text-danger',\n};\n/* While dismissible, the text column reserves the dismiss button's width, so a long word never\n runs under the ×. */\nconst CONTENT_BASE = 'flex min-w-0 flex-1 flex-col gap-1';\nconst CONTENT_DISMISS: Record<'dismissible' | 'static', string> = {\n dismissible: 'pe-10',\n static: '',\n};\n\n/**\n * Inline message for the outcome of an action or the state of a screen, in a polite `status`\n * region (`urgent` makes it an assertive `alert`; `announce` makes an inserted alert heard).\n *\n * @example\n * <bf-alert variant=\"success\" title=\"Saved\" announce>Your changes are live.</bf-alert>\n * <bf-alert variant=\"danger\" title=\"Sync failed\" urgent [dismissible]=\"true\" (dismissed)=\"clear()\">Check your connection.</bf-alert>\n * @summary Inline status message in four tones with a title and an optional dismiss button\n * @category Feedback\n * @since 0.1.0\n * @slot icon An icon before the text, such as a `bf-icon`.\n * @slot default The message, under the title.\n * @slot actions Buttons under the message, such as Retry.\n */\n@Component({\n selector: 'bf-alert',\n host: { class: 'block' },\n template: `\n <div class=\"relative\">\n <div [attr.role]=\"urgent() ? 'alert' : 'status'\" [class]=\"classes()\">\n @if (filled()) {\n <ng-content select=\"[bfSlot=icon]\" />\n <div [class]=\"contentClasses()\">\n @if (title()) {\n <p class=\"font-bold wrap-anywhere\">{{ title() }}</p>\n }\n <div class=\"font-medium wrap-anywhere\"><ng-content /></div>\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n }\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"dismissName()\"\n class=\"focus-visible:ring-ring text-heading rounded-control absolute end-3 top-3 flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center leading-none font-normal text-current transition-opacity after:absolute after:-inset-1.5 after:content-[''] hover:opacity-70 focus-visible:ring-4 focus-visible:outline-hidden\"\n (click)=\"dismissed.emit()\"\n >\n &times;\n </button>\n }\n </div>\n `,\n})\nexport class BfAlertComponent {\n /** Meaning of the message. */\n readonly variant = input<BfAlertVariant>('neutral');\n /** Bold first line. */\n readonly title = input('');\n /** Shows a dismiss button that emits `dismissed`; the host decides whether to hide the alert. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** `role=\"alert\"` (assertive) instead of `status`; for errors that need attention now. */\n readonly urgent = input(false, { transform: booleanAttribute });\n /** Renders the live region empty and fills it on the next frame, so an alert inserted after an\n * action is announced; read once, when the alert is created. */\n readonly announce = input(false, { transform: booleanAttribute });\n /** Accessible name of the dismiss button (empty falls back to `provideBfLabels()`'s `dismiss`,\n * \"Dismiss\"); with a `title` it becomes the label, a colon and the title (\"Dismiss: Saved\"). */\n readonly dismissLabel = input('');\n\n /** Emitted when the dismiss button is pressed. */\n readonly dismissed = output<void>();\n\n private readonly labels = inject(BF_LABELS);\n /** `announce` as it was when the alert was created; later changes are ignored. */\n private readonly deferred = linkedSignal<boolean, boolean>({\n source: this.announce,\n computation: (announce, previous) => previous?.value ?? announce,\n });\n private readonly frameReady = signal(false);\n /** Whether the live region holds its content (at once, or a frame later with `announce`). */\n protected readonly filled = computed(() => !this.deferred() || this.frameReady());\n\n /** The dismiss button's rendered name: `dismissLabel` (else the `dismiss` label), then the title. */\n readonly dismissName = computed(() => {\n const label = this.dismissLabel() || this.labels.dismiss;\n return this.title() ? `${label}: ${this.title()}` : label;\n });\n readonly classes = computed(() => `${BASE} ${VARIANT[this.variant()]}`);\n readonly contentClasses = computed(() =>\n [CONTENT_BASE, CONTENT_DISMISS[this.dismissible() ? 'dismissible' : 'static']]\n .filter(Boolean)\n .join(' '),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n // The empty region is in the accessibility tree by now; fill it a frame later so the change\n // is announced.\n afterNextRender(() => {\n if (!untracked(this.deferred)) {\n return;\n }\n const frame = requestAnimationFrame(() => this.frameReady.set(true));\n destroyRef.onDestroy(() => cancelAnimationFrame(frame));\n });\n }\n}\n","import { Component, input } from '@angular/core';\n\n/**\n * The heading level of a `bf-empty-state` title: `2` for a screen, `3` inside a section.\n *\n * @summary The heading level of an empty state title, two for a screen or three\n * @since 0.3.0\n */\nexport type BfEmptyStateHeadingLevel = 2 | 3;\n\n/**\n * The heading level a `bf-empty-state` title takes: a `BfEmptyStateHeadingLevel`, or `1` when the\n * empty state is the page itself (a not-found or no-access page). A new type, so `Record`s over\n * the released `BfEmptyStateHeadingLevel` keep compiling.\n *\n * @summary The heading level of an empty state title, one for a whole page\n * @since 0.3.2\n */\nexport type BfEmptyStateHeading = BfEmptyStateHeadingLevel | 1;\n\n/**\n * Placeholder for a screen or list with nothing in it yet: an icon tile, a title, one sentence,\n * and the action that fills it.\n *\n * @example\n * <bf-empty-state title=\"No tasks yet\" description=\"Add your first task to get started.\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"ListTodo\" size=\"lg\" />\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New task</bf-button>\n * </bf-empty-state>\n * @summary Placeholder for an empty screen or list with icon, title, message and action\n * @category Feedback\n * @since 0.1.0\n * @slot icon The icon in the tile above the title.\n * @slot actions Buttons under the description, such as Create.\n */\n@Component({\n selector: 'bf-empty-state',\n host: { class: 'block' },\n template: `\n <div class=\"flex flex-col items-center gap-3 px-6 py-12 text-center\">\n <div\n data-tile\n class=\"rounded-tile bg-surface-sunken text-text-muted flex h-16 w-16 items-center justify-center\"\n >\n <ng-content select=\"[bfSlot=icon]\" />\n </div>\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"text-heading text-text\">{{ title() }}</h1>\n }\n @case (3) {\n <h3 class=\"text-heading text-text\">{{ title() }}</h3>\n }\n @default {\n <h2 class=\"text-heading text-text\">{{ title() }}</h2>\n }\n }\n @if (description()) {\n <p class=\"text-body text-text-muted max-w-sm\">{{ description() }}</p>\n }\n <div class=\"mt-2 flex flex-wrap justify-center gap-2\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n `,\n})\nexport class BfEmptyStateComponent {\n /** What is missing, as a short title. */\n readonly title = input.required<string>();\n /** One sentence on how to fill it. */\n readonly description = input('');\n /** Heading level of the title so the empty state fits the page outline; 1 when it is the page. */\n readonly headingLevel = input<BfEmptyStateHeading>(2);\n}\n","import { Component, input } from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * Floating pill of actions that appears when items are selected. Position it yourself\n * (bottom-centre, above the safe area on mobile); the bar only styles itself.\n *\n * @example\n * <div class=\"fixed inset-x-0 bottom-6 flex justify-center\">\n * <bf-action-bar [label]=\"selected() + ' selected'\">\n * <bf-button variant=\"text\" size=\"sm\" (clicked)=\"clear()\">Clear</bf-button>\n * <bf-button size=\"sm\" (clicked)=\"complete()\">Mark done</bf-button>\n * </bf-action-bar>\n * </div>\n * @summary Floating pill of contextual actions that appears while items are selected\n * @category Actions\n * @since 0.1.0\n * @slot default The actions: buttons and icon buttons, laid out in the bar.\n */\n@Component({\n selector: 'bf-action-bar',\n host: { class: 'inline-flex max-w-full' },\n template: `\n <div\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n class=\"bg-surface text-text shadow-floating ps-card text-label-sm rounded-control inline-flex max-w-full min-w-0 flex-wrap items-center gap-1 py-1.5 pe-1.5 font-bold\"\n >\n <!-- The count never truncates: it keeps its width (breaking a long word only past the bar's\n width), and the actions wrap onto a second row when they do not fit beside it. -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"max-w-full shrink-0 pe-2.5 wrap-anywhere\">{{ label() }}</span>\n }\n <ng-content />\n </div>\n `,\n})\nexport class BfActionBarComponent {\n /** Leading text, e.g. \"2 selected\". */\n readonly label = input('');\n\n readonly labelId = uniqueId('bf-action-bar');\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * What `bf-tab` needs from its enclosing `bf-tab-bar`, provided through an injection token so\n * `tab-bar.component.ts` and `tab.component.ts` never import each other.\n *\n * @summary What each tab reads from its tab bar: the selection, tab stop and link mode\n * @since 0.1.0\n */\nexport interface BfTabBarHost {\n /** The id of the selected tab, the bar's `active` model. */\n readonly active: Signal<string>;\n /** The id of the tab shown as selected: `active`, or the controller's `current()` inside a\n * parent that provides `BF_TAB_BAR_CONTROLLER` (`bf-tabs`). Optional, so a custom `BF_TAB_BAR`\n * provider without it keeps working: `bf-tab` then reads `active`. */\n readonly selected?: Signal<string>;\n /** The id that currently owns the roving tab stop: the active enabled tab, or the first enabled\n * tab when nothing valid is selected. */\n readonly tabStop: Signal<string>;\n /** True when a router-aware parent provides `BF_TAB_LINKS`: the tabs render as links in a\n * `nav`, not as a `tablist`. */\n readonly linkMode: boolean;\n /**\n * The URL of tab `id` in link mode; `null` without `BF_TAB_LINKS`.\n * @param id The `id` of the tab.\n */\n linkHref(id: string): string | null;\n /**\n * Whether the current page is tab `id`'s root page (`aria-current=\"page\"`) rather than a\n * child page of it (`aria-current=\"true\"`); `true` without `BF_TAB_LINKS`.\n * @param id The `id` of the tab.\n */\n linkIsRoot(id: string): boolean;\n /**\n * Selects tab `id`, as a click on it would.\n * @param id The `id` of the tab.\n */\n select(id: string): void;\n}\n\n/**\n * The enclosing `bf-tab-bar`, as its tabs inject it.\n *\n * @summary Injection token through which each tab reaches its enclosing tab bar\n * @since 0.1.0\n */\nexport const BF_TAB_BAR = new InjectionToken<BfTabBarHost>('BF_TAB_BAR');\n\n/**\n * Provided by a router-aware parent (`bf-tabs`) to render the projected bar as a `nav` of links:\n * `href(id)` is the URL of tab `id`, used for the link's `href` (open in a new tab, copy the\n * link, see the URL). A plain click still goes through `bf-tab-bar`'s `select()`.\n *\n * @summary The URLs a router-aware parent gives a tab bar to render its tabs as links\n * @since 0.3.0\n */\nexport interface BfTabLinks {\n /**\n * The URL of tab `id`'s root page, the link's `href`.\n * @param id The `id` of the tab.\n */\n href(id: string): string;\n /**\n * Whether the current page is tab `id`'s root page; read in a reactive context, so back it\n * with signals.\n * @param id The `id` of the tab.\n */\n isRoot(id: string): boolean;\n}\n\n/**\n * The link source of a tab bar in link mode, provided by `bf-tabs`.\n *\n * @summary Injection token that turns a projected tab bar into a navigation of links\n * @since 0.3.0\n */\nexport const BF_TAB_LINKS = new InjectionToken<BfTabLinks>('BF_TAB_LINKS');\n\n/**\n * Provided by a parent that projects the bar and drives it (bf-tabs); the bar derives its state from it.\n *\n * @summary The state a parent that drives a projected tab bar gives it to derive from\n * @since 0.3.0\n */\nexport interface BfTabBarController extends BfTabLinks {\n /** The tab the parent shows: the in-flight navigation's target, else the current URL's; null when unknown. */\n readonly current: Signal<string | null>;\n /** Hide the bar (e.g. while the soft keyboard is open or about to open). */\n readonly hidden: Signal<boolean>;\n /** Animate hiding (iOS) or switch instantly. */\n readonly hideTransition: Signal<boolean>;\n /**\n * Called by the bar on a user selection of another tab.\n * @param id The `id` of the selected tab.\n */\n select(id: string): void;\n /**\n * Called by the bar on a user selection of the active tab.\n * @param id The `id` of the active tab.\n */\n reselect(id: string): void;\n}\n\n/**\n * The controller of a tab bar projected into a parent that drives it, provided by `bf-tabs`.\n *\n * @summary Injection token through which a parent drives the selection and hiding of its tab bar\n * @since 0.3.0\n */\nexport const BF_TAB_BAR_CONTROLLER = new InjectionToken<BfTabBarController>(\n 'BF_TAB_BAR_CONTROLLER',\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n type ElementRef,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { BF_TAB_BAR } from './tab-bar.token';\n\n/* Disabled uses tokens, never opacity: the capsule takes the sunken fill and the icon and label\n go to text-disabled (group-disabled, since both set their own colours). min-w-0 keeps a long label\n from widening the tab: it wraps to at most two lines, hyphenating a long word where the page's\n `lang` allows it (else breaking it where it must). The\n label's size and line height are capped at 200 % (22/28 px, in px because iOS Dynamic Type scales\n the root and so every rem); the 4 px vertical padding keeps a grown tab off the bar's edge. The\n capsule, the badge, the padding and the gaps are px too, so Dynamic Type grows only the label, up\n to its cap, and the bar tops out near 98 px (a capsule and two label lines), as UITabBar does. At\n compact heights (max-height 500px, phone landscape) the icon and the label sit side by side. The group is named (`group/bf-tab`) so a consumer's own\n `.group` ancestor (e.g. a card) does not also tint or dim it. The same classes serve the <button>\n (standalone, `:disabled`) and the <a> (inside bf-tabs, `aria-disabled=\"true\"`): each form only\n ever matches its own variant. */\nconst BUTTON =\n 'group/bf-tab flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-[4px] py-[4px] [@media(max-height:500px)]:flex-row [@media(max-height:500px)]:gap-[6px] rounded-control no-underline! focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed aria-disabled:cursor-not-allowed';\nconst CAPSULE_BASE =\n 'relative flex h-[30px] w-[52px] items-center justify-center rounded-control transition-colors group-disabled/bf-tab:bg-surface-sunken group-disabled/bf-tab:text-text-disabled group-aria-disabled/bf-tab:bg-surface-sunken group-aria-disabled/bf-tab:text-text-disabled';\n/* Hover tints the capsule; group-disabled comes later in the cascade, so a disabled tab keeps its\n sunken fill. A 1.5 px inset primary-strong outline marks the active capsule without relying on\n its fill (1.23:1 on the bar); a disabled active capsule outlines it in text-disabled. */\nconst CAPSULE_ACTIVE =\n 'bg-primary-soft text-primary-strong inset-ring-[1.5px] inset-ring-primary-strong group-hover/bf-tab:bg-primary-soft-hover group-disabled/bf-tab:inset-ring-text-disabled group-aria-disabled/bf-tab:inset-ring-text-disabled forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]';\nconst CAPSULE_INACTIVE =\n 'text-text-muted group-hover/bf-tab:bg-surface-muted group-hover/bf-tab:text-text';\n/* Pressed (the named group is the tab's button or link): the capsule takes the soft pressed tint,\n and an inactive capsule its hover icon colour; added only while the tab is enabled. */\nconst CAPSULE_PRESSED: Record<'active' | 'inactive', string> = {\n active: 'group-active/bf-tab:bg-primary-soft-pressed',\n inactive: 'group-active/bf-tab:bg-primary-soft-pressed group-active/bf-tab:text-text',\n};\nconst LABEL_BASE =\n 'text-nano text-[length:min(var(--text-nano),22px)] leading-[min(var(--text-nano--line-height),28px)] max-w-full line-clamp-2 px-[4px] text-center font-bold wrap-break-word hyphens-auto group-disabled/bf-tab:text-text-disabled group-aria-disabled/bf-tab:text-text-disabled';\nconst LABEL_ACTIVE = 'text-primary-strong';\nconst LABEL_INACTIVE = 'text-text-muted';\n\n/**\n * One destination inside `bf-tab-bar`: icon in the default slot, `label` under it, optional count\n * `badge`. A `button role=\"tab\"` in a standalone bar; inside `bf-tabs`, a link to the tab's URL\n * with `aria-current` while active: `page` on the tab's root page, `true` on a child page of it\n * (the current section, not the current page).\n *\n * @example\n * <bf-tab id=\"today\" label=\"Today\"><bf-icon [icon]=\"Sun\" /></bf-tab>\n * @summary One tab bar destination with an icon, a label and an optional count badge\n * @category Navigation\n * @since 0.1.0\n * @slot default The tab icon, a `bf-icon` above the label.\n */\n@Component({\n selector: 'bf-tab',\n imports: [NgTemplateOutlet],\n host: { class: 'flex min-w-0 flex-1', '[attr.id]': 'null' },\n template: `\n @if (bar.linkMode) {\n <!-- Inside bf-tabs: a link (Tab moves between tabs; Ctrl/Cmd-click opens a new tab). A\n disabled tab keeps the link role without an href, so it is skipped and inert. -->\n <a\n #control\n [id]=\"id()\"\n [attr.href]=\"disabled() ? null : bar.linkHref(id())\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-current]=\"current()\"\n [attr.aria-label]=\"accessibleName()\"\n [class]=\"buttonClasses()\"\n (click)=\"onLinkClick($event)\"\n ><ng-container *ngTemplateOutlet=\"content\"\n /></a>\n } @else {\n <button\n #control\n type=\"button\"\n role=\"tab\"\n [id]=\"id()\"\n [disabled]=\"disabled()\"\n [attr.aria-selected]=\"active() ? 'true' : 'false'\"\n [attr.aria-label]=\"accessibleName()\"\n [tabIndex]=\"bar.tabStop() === id() ? 0 : -1\"\n [class]=\"buttonClasses()\"\n (click)=\"bar.select(id())\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </button>\n }\n <ng-template #content>\n <span data-capsule [class]=\"capsuleClasses()\">\n <ng-content />\n @if (badge() !== null) {\n <span\n data-badge\n aria-hidden=\"true\"\n class=\"bg-primary text-on-primary text-nano absolute -end-[8px] -top-[4px] flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-[4px] text-[length:min(var(--text-nano),13px)] leading-none font-extrabold\"\n >{{ badge() }}</span\n >\n }\n </span>\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n </ng-template>\n `,\n})\nexport class BfTabComponent {\n /** Stable identifier; matches `bf-tab-bar`'s `active` when this tab is selected. It is a\n * selection key only, never reflected as the DOM `id` of more than the inner `<button>` (or\n * `<a>` inside `bf-tabs`). */\n readonly id = input.required<string>();\n /** Visible label under the icon. */\n readonly label = input.required<string>();\n /** Optional count shown as a badge on the icon capsule; announced to screen readers as part of\n * the tab's accessible name (`aria-label` \"{label}, {announcement}\", with `provideBfLabels()`'s\n * `tabBadge(n)`, `\"{n} new\"`, for a number, the string as-is otherwise) since the badge itself\n * is `aria-hidden`. */\n readonly badge = input<string | number | null>(null);\n /** Disables the tab: skipped by keyboard navigation, cannot be clicked. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** The enclosing `bf-tab-bar`, provided through `BF_TAB_BAR` so the two files don't import each other. */\n readonly bar = inject(BF_TAB_BAR);\n\n private readonly labels = inject(BF_LABELS);\n\n private readonly control = viewChild.required<ElementRef<HTMLElement>>('control');\n\n /** Whether this tab is the bar's current selection. */\n readonly active = computed(() => {\n // `selected` is optional on `BfTabBarHost`: a custom host without it shows `active`.\n const selected = this.bar.selected === undefined ? this.bar.active() : this.bar.selected();\n return selected === this.id();\n });\n\n /** `aria-current` of the link form: `page` while the active tab's root page is shown, `true`\n * while a child page of it is (the tab is the current section, not the current page), else\n * `null`. */\n readonly current = computed(() => {\n if (!this.active()) {\n return null;\n }\n return this.bar.linkIsRoot(this.id()) ? 'page' : 'true';\n });\n\n /** The badge as announced after the label in the accessible name when `badge()` is set. */\n readonly badgeAnnouncement = computed(() => {\n const badge = this.badge();\n if (badge === null) {\n return null;\n }\n return typeof badge === 'number' ? this.labels.tabBadge(badge) : badge;\n });\n\n /**\n * The tab's accessible name while a badge is set, `\"{label}, {announcement}\"` (\"Projects, 3\n * new\"), as `aria-label`: one string, so no browser inserts a pause before the comma (a visually\n * hidden span is block-level, and Chromium and WebKit join block children with a space). `null`\n * without a badge, so the name is the visible label.\n */\n readonly accessibleName = computed(() => {\n const announcement = this.badgeAnnouncement();\n return announcement === null ? null : `${this.label()}, ${announcement}`;\n });\n\n readonly buttonClasses = computed(() => BUTTON);\n readonly capsuleClasses = computed(() => {\n const state = this.active() ? 'active' : 'inactive';\n return [\n CAPSULE_BASE,\n this.active() ? CAPSULE_ACTIVE : CAPSULE_INACTIVE,\n this.disabled() ? '' : CAPSULE_PRESSED[state],\n ]\n .filter(Boolean)\n .join(' ');\n });\n readonly labelClasses = computed(\n () => `${LABEL_BASE} ${this.active() ? LABEL_ACTIVE : LABEL_INACTIVE}`,\n );\n\n /** Moves keyboard focus to this tab's button (or link); called by `bf-tab-bar` after arrow-key\n * selection. */\n focus(): void {\n this.control().nativeElement.focus();\n }\n\n /**\n * A plain primary click on the link selects the tab through the bar (so `bf-tabs` restores the\n * tab's stack, plays its haptic and pops to the root on reselect) instead of following `href`. A\n * modified or non-primary click (Ctrl/Cmd, Shift, Alt, middle) is left to the browser, which\n * opens the tab's URL in a new tab or window.\n * @internal\n */\n onLinkClick(event: MouseEvent): void {\n if (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {\n return;\n }\n event.preventDefault();\n this.bar.select(this.id());\n }\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport {\n BF_TAB_BAR,\n BF_TAB_BAR_CONTROLLER,\n BF_TAB_LINKS,\n type BfTabBarHost,\n} from './tab-bar.token';\nimport { BfTabComponent } from './tab.component';\n\n/**\n * Floating pill tab bar for mobile apps (Meadow Sage): at least 64 px tall (it grows with a label\n * wrapped to two lines at large text sizes; at least 48 px, with icon and label side by side, at\n * compact heights such as phone landscape), inset 14 px from the sides and\n * 8 px above the bottom safe area (at least 12 px, so 20 px from the edge without an inset), one\n * `bf-tab` per destination. On its own it is a pure control with an `active` model and a `hidden`\n * input: a `tablist` whose selection follows focus with the arrow keys. Inside `bf-tabs`, which\n * provides `BF_TAB_LINKS` and `BF_TAB_BAR_CONTROLLER`, it is a `nav` of links with `aria-current`\n * on the active tab (`page` on its root page, `true` on a child page of it) whose selection and\n * hiding derive from the router and the keyboard; `active` is not written there.\n *\n * @example\n * <bf-tab-bar [(active)]=\"tab\" (changed)=\"go($event)\">\n * <bf-tab id=\"today\" label=\"Today\"><bf-icon [icon]=\"Sun\" /></bf-tab>\n * <bf-tab id=\"inbox\" label=\"Inbox\" [badge]=\"3\"><bf-icon [icon]=\"Inbox\" /></bf-tab>\n * </bf-tab-bar>\n * @summary Floating pill tab bar for mobile apps with arrow-key selection and count badges\n * @category Navigation\n * @since 0.1.0\n * @slot default The tabs, each a `bf-tab`.\n */\n@Component({\n selector: 'bf-tab-bar',\n // `hidden` is an input here: drop the static global attribute so the host never becomes\n // `display: none` instead of sliding out.\n host: { class: 'block', '[attr.hidden]': 'null' },\n providers: [{ provide: BF_TAB_BAR, useExisting: BfTabBarComponent }],\n template: `\n <nav\n [attr.aria-label]=\"name()\"\n [attr.aria-hidden]=\"isHidden() ? 'true' : null\"\n [attr.inert]=\"isHidden() ? '' : null\"\n [class]=\"navClasses()\"\n >\n <!-- Standalone: a tablist with a roving tab stop. With BF_TAB_LINKS: a plain group of links.\n At least 64 px, growing with a two-line label; at compact heights at least 48 px. In px,\n so iOS Dynamic Type (which scales the root) never grows the bar itself, as UITabBar. -->\n <div\n [attr.role]=\"linkMode ? null : 'tablist'\"\n [attr.tabindex]=\"linkMode ? null : -1\"\n class=\"flex min-h-[64px] items-stretch [@media(max-height:500px)]:min-h-[48px]\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-content />\n </div>\n </nav>\n `,\n})\nexport class BfTabBarComponent implements BfTabBarHost {\n /** The active tab's id; two-way bindable. */\n readonly active = model('');\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `tabBar`\n * (\"Main\"). */\n readonly label = input('');\n private readonly labels = inject(BF_LABELS);\n /** The rendered navigation name: `label`, else the `tabBar` label. */\n readonly name = computed(() => this.label() || this.labels.tabBar);\n /** Floats fixed above the safe area with a shadow; false renders it inline in the layout flow. */\n readonly floating = input(true, { transform: booleanAttribute });\n /**\n * Slides the bar down out of view (e.g. while the soft keyboard is open); `aria-hidden` and inert\n * while hidden. Shadows the global `hidden` attribute on purpose: a static `<bf-tab-bar hidden>`\n * sets this input (the slide) and the attribute itself is removed from the host, so it never\n * becomes `display: none`.\n */\n readonly hidden = input(false, { transform: booleanAttribute });\n /** Animates hiding and showing (200 ms `translate-y`/`opacity`); false switches instantly. */\n readonly hideTransition = input(true, { transform: booleanAttribute });\n\n /** Emitted with the newly selected tab's id after a user change. */\n readonly changed = output<string>();\n /** Emitted with the active tab's id when the user selects the tab that is already active. */\n readonly reselected = output<string>();\n /**\n * Emitted with the newly selected tab's id after a user change, together with `changed`.\n * @deprecated 0.3.0 use changed; removed in 0.4.0\n */\n readonly tabChange = output<string>();\n /**\n * Emitted with the active tab's id on a reselect, together with `reselected`.\n * @deprecated 0.3.0 use reselected; removed in 0.4.0\n */\n readonly tabReselect = output<string>();\n\n /* `host`: only a parent in the template that declares this bar (`<bf-tabs><bf-tab-bar>`) turns\n it into links. A bar inside a routed page under `bf-tabs` (an in-page tab bar) is declared in\n the page's own view, so the lookup stops at the page and it stays a tablist. */\n private readonly links = inject(BF_TAB_LINKS, { optional: true, host: true });\n /** True inside a router-aware parent (`bf-tabs`): the tabs are links, not a tablist. */\n readonly linkMode = this.links !== null;\n\n /* `host`, as for `BF_TAB_LINKS`: only the parent that projects this bar drives it. */\n private readonly controller = inject(BF_TAB_BAR_CONTROLLER, { optional: true, host: true });\n\n private readonly hiddenState = signal(false);\n private readonly hideTransitionState = signal<boolean | null>(null);\n\n /** The id of the tab shown as selected: the controller's `current()` inside `bf-tabs` (empty\n * while it is unknown), else `active`. */\n readonly selected = computed(() => {\n const controller = this.controller;\n return controller ? (controller.current() ?? '') : this.active();\n });\n\n /** True while the bar is hidden, through the `hidden` input, `setHidden()` or the controller. */\n readonly isHidden = computed(\n () => this.hidden() || this.hiddenState() || (this.controller?.hidden() ?? false),\n );\n\n /** The `bf-tab` children projected into the bar, in document order. */\n readonly tabs = contentChildren(BfTabComponent);\n\n /** The id that currently owns the roving tab stop: the active enabled tab, or the first enabled\n * tab when nothing valid is selected (empty `active`, before a router binding resolves, or the\n * active tab is disabled). */\n readonly tabStop = computed(() => {\n const enabled = this.tabs().filter((t) => !t.disabled());\n if (enabled.length === 0) {\n return '';\n }\n const selected = enabled.find((t) => t.id() === this.selected());\n return (selected ?? enabled[0]).id();\n });\n\n readonly navClasses = computed(() => {\n const transition =\n this.hideTransitionState() ?? this.controller?.hideTransition() ?? this.hideTransition();\n return (\n 'bg-surface rounded-control' +\n (this.floating()\n ? ' fixed inset-x-3.5 bottom-[calc(max(var(--spacing-safe-bottom),12px)+8px)] z-(--bf-z-tabbar) shadow-floating'\n : ' shadow-raised') +\n (transition\n ? ' transition-[translate,opacity] duration-200 motion-reduce:transition-none'\n : '') +\n // Hidden: its own height plus 64 px, which clears its bottom offset (up to the safe area\n // plus 8 px) and the floating shadow.\n (this.isHidden() ? ' translate-y-[calc(100%+64px)] opacity-0 pointer-events-none' : '')\n );\n });\n\n /**\n * The imperative counterpart of the `hidden` input, for a parent that projects the bar and so\n * cannot bind it (`bf-tabs` provides `BF_TAB_BAR_CONTROLLER` instead). The bar is hidden while\n * the input, this or the controller's `hidden()` is true; `transition` overrides\n * `hideTransition` when given.\n * @param hidden Whether to hide the bar.\n * @param transition Whether the change animates (default: `hideTransition`).\n */\n setHidden(hidden: boolean, transition?: boolean): void {\n this.hiddenState.set(hidden);\n if (transition !== undefined) {\n this.hideTransitionState.set(transition);\n }\n }\n\n /**\n * Selects `id` and emits `changed`, or `reselected` when `id` is already selected; ignores\n * disabled or unknown tab ids. Inside `bf-tabs` it hands the selection to the controller\n * (`select`/`reselect`) instead of writing `active`.\n * @param id The `id` of the tab to select.\n */\n select(id: string): void {\n const tab = this.tabs().find((t) => t.id() === id);\n if (!tab || tab.disabled()) {\n return;\n }\n if (this.selected() !== id) {\n if (this.controller) {\n this.controller.select(id);\n } else {\n this.active.set(id);\n }\n this.changed.emit(id);\n this.tabChange.emit(id);\n } else {\n this.controller?.reselect(id);\n this.reselected.emit(id);\n this.tabReselect.emit(id);\n }\n }\n\n /**\n * The URL of tab `id` in link mode (`BF_TAB_LINKS`); `null` for a standalone bar.\n * @param id The `id` of the tab.\n */\n linkHref(id: string): string | null {\n return this.links ? this.links.href(id) : null;\n }\n\n /**\n * Whether the current page is tab `id`'s root page (link mode); `true` for a standalone bar.\n * @param id The `id` of the tab.\n */\n linkIsRoot(id: string): boolean {\n return this.links ? this.links.isRoot(id) : true;\n }\n\n /**\n * Arrow keys, Home and End move focus and selection along the tabs.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n // A nav of links moves with Tab, as links do; only a tablist has arrow-key selection.\n if (this.linkMode) {\n return;\n }\n const isNavigationKey = ['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key);\n if (!isNavigationKey) {\n return;\n }\n event.preventDefault();\n const enabled = this.tabs().filter((t) => !t.disabled());\n if (enabled.length === 0) {\n return;\n }\n const index = enabled.findIndex((t) => t.id() === this.selected());\n let next: BfTabComponent | undefined;\n switch (event.key) {\n case 'ArrowRight':\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n break;\n case 'ArrowLeft':\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n break;\n case 'Home':\n next = enabled[0];\n break;\n case 'End':\n next = enabled[enabled.length - 1];\n break;\n }\n if (!next) {\n return;\n }\n if (next.id() !== this.selected()) {\n this.select(next.id());\n }\n next.focus();\n }\n}\n","import { DestroyRef, Directive, ElementRef, afterRenderEffect, inject } from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_ACTION_HOST } from './action-host.token';\n\n/**\n * The one interactive element of a `bf-card` or `bf-list-item` (the stretched-link pattern): put\n * it on the `<a>` (navigation) or `<button>` (an action) that holds the card's heading text or the\n * row's title. Its `::after` stretches the hit area over the nearest positioned ancestor (the card\n * box, the row), so the whole surface is clickable while only the heading's link or button is\n * exposed: the heading stays a heading and the accessible name is the title alone. It registers\n * with the nearest card or row, which then draws the pointer, the hover and, while the action has\n * keyboard focus, the focus ring; a card is never lit by the actions of rows nested in it. Give\n * secondary controls inside the surface `class=\"relative z-1\"` so they stay clickable above the\n * stretched area. When the surface marks a state that belongs in the name (an `unread` list\n * row), the directive names the element `aria-labelledby=\"<state id> <own id>\"`, so the link reads\n * \"Unread, Account\", and restores the element's own `aria-labelledby` when the state goes.\n *\n * @example\n * <bf-card>\n * <h3 class=\"text-heading\"><a bfAction routerLink=\"/projects/atlas\">Atlas rebrand</a></h3>\n * </bf-card>\n * @summary Makes one link or button the click target of a whole card or list row\n * @since 0.3.0\n */\n@Directive({\n selector: 'a[bfAction], button[bfAction]',\n host: {\n 'data-bf-action': '',\n // A button[bfAction] gets the pointer a link has natively. The surface draws the focus ring\n // (a box-shadow); forced colours drop it, and the transparent outline on the ::after (around\n // the whole surface) becomes the visible indicator there.\n class:\n \"cursor-pointer after:absolute after:inset-0 after:content-[''] focus-visible:outline-none focus-visible:after:outline-hidden\",\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n },\n})\nexport class BfActionDirective {\n private readonly host = inject(BF_ACTION_HOST, { optional: true });\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n constructor() {\n // The consumer's own aria-labelledby (static attributes are set before the directive runs).\n const own = this.element.getAttribute('aria-labelledby');\n let prefixed = false;\n afterRenderEffect({\n write: () => {\n const prefix = this.host?.actionLabelPrefix?.() ?? null;\n if (prefix) {\n this.element.id ||= uniqueId('bf-action');\n this.element.setAttribute('aria-labelledby', `${prefix} ${own ?? this.element.id}`);\n prefixed = true;\n } else if (prefixed) {\n if (own === null) this.element.removeAttribute('aria-labelledby');\n else this.element.setAttribute('aria-labelledby', own);\n prefixed = false;\n }\n },\n });\n const unregister = this.host?.registerAction();\n inject(DestroyRef).onDestroy(() => {\n this.host?.setActionFocusVisible(false);\n unregister?.();\n });\n }\n\n /**\n * Tells the host card or row whether its action has keyboard focus.\n * @internal\n */\n onFocus(): void {\n this.host?.setActionFocusVisible(this.element.matches(':focus-visible'));\n }\n\n /**\n * Tells the host card or row that its action lost focus.\n * @internal\n */\n onBlur(): void {\n this.host?.setActionFocusVisible(false);\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/** What a `bf-tab-panel` reads from its `bf-tab-group`; a token so the two files never import each\n * other. Internal: not exported from the package. */\nexport interface BfTabGroupHost {\n /** The value of the panel the group shows: `selected`, else the first enabled panel's. */\n readonly current: Signal<string>;\n}\n\n/** The enclosing `bf-tab-group`, as its panels inject it. */\nexport const BF_TAB_GROUP = new InjectionToken<BfTabGroupHost>('BF_TAB_GROUP');\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n viewChild,\n} from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_TAB_GROUP } from './tab-group.token';\n\n/**\n * One tab of a `bf-tab-group` and the content it shows: `label` is the tab's text, `value` the\n * key the group's `selected` holds. Put the content in an `ng-template` inside the panel and it is\n * created only while the panel is selected (`keepAlive` keeps it once visited); plain content\n * renders at once and is only hidden. An icon in `bfSlot=\"icon\"` shows in the tab before the label.\n *\n * @example\n * <bf-tab-panel value=\"activity\" label=\"Activity\" [badge]=\"3\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Activity\" />\n * <ng-template><app-activity-feed /></ng-template>\n * </bf-tab-panel>\n * @summary One tab of a tab group with its label, badge, icon and lazy content\n * @category Navigation\n * @since 0.3.1\n * @slot icon An icon in the tab before the label, a `bf-icon`.\n * @slot default Content rendered at once and hidden while another tab is selected; put it in an\n * `ng-template` instead to create it only when the panel is shown.\n */\n@Component({\n selector: 'bf-tab-panel',\n imports: [NgTemplateOutlet],\n host: {\n role: 'tabpanel',\n tabindex: '0',\n class: 'rounded-tile focus-visible:ring-ring focus-visible:outline-hidden focus-visible:ring-4',\n '[class.block]': 'isSelected()',\n '[attr.id]': 'panelId',\n '[attr.aria-labelledby]': 'tabId',\n '[hidden]': '!isSelected()',\n },\n template: `\n <!-- The icon slot, rendered by bf-tab-group inside this panel's tab. -->\n <ng-template #icon><ng-content select=\"[bfSlot=icon]\" /></ng-template>\n @if (rendered()) {\n @if (content(); as template) {\n <ng-container *ngTemplateOutlet=\"template\" />\n }\n }\n <ng-content />\n `,\n})\nexport class BfTabPanelComponent {\n /** The key of this panel; the group's `selected` holds it while the panel is shown. */\n readonly value = input.required<string>();\n /** The tab's visible text, also its accessible name. */\n readonly label = input.required<string>();\n /** Disables the tab: it cannot be clicked and the arrow keys skip it. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** A count shown as a pill after the tab's label, announced with `provideBfLabels()`'s\n * `tabBadge(count)` (\"3 new\"); `null` shows none. */\n readonly badge = input<number | null>(null);\n /** Keeps the content of an `ng-template` in the DOM, hidden, once the panel has been shown, so\n * its state (scroll, form input) survives switching tabs. */\n readonly keepAlive = input(false, { transform: booleanAttribute });\n\n private readonly group = inject(BF_TAB_GROUP);\n\n /** The panel's DOM id, which its tab's `aria-controls` names. */\n readonly panelId = uniqueId('bf-tab-panel');\n /** The DOM id of this panel's tab, which the panel's `aria-labelledby` names. */\n readonly tabId = `${this.panelId}-tab`;\n\n /** The icon slot as a template, for the group to render inside the tab. */\n readonly icon = viewChild<TemplateRef<unknown>>('icon');\n /** The consumer's lazy content, if any. */\n protected readonly content = contentChild(TemplateRef);\n\n /** Whether the group shows this panel. */\n readonly isSelected = computed(() => this.group.current() === this.value());\n /** Latches once the panel has been shown. */\n private readonly visited = linkedSignal<boolean, boolean>({\n source: this.isSelected,\n computation: (selected, previous) => selected || (previous?.value ?? false),\n });\n /** Whether the `ng-template` content exists: while selected, or once visited with `keepAlive`.\n * `visited` is read first on every run, so the latch sees each selection. */\n protected readonly rendered = computed(() => {\n const visited = this.visited();\n return this.isSelected() || (this.keepAlive() && visited);\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n type ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BF_TAB_GROUP, type BfTabGroupHost } from './tab-group.token';\nimport { BfTabPanelComponent } from './tab-panel.component';\n\n/* The tab is a button that projects the consumer's label and icon, so under a coarse pointer it\n grows to 44 px (`pointer-coarse:min-h-hit`) instead of extending an ::after over its neighbours\n (PROJECT_GUIDE hit areas); its ::after is the selected underline. Neutral `text-muted` at rest,\n a `surface-muted` fill with `text` on hover, `surface-pressed` while pressed (enabled only, so a\n disabled tab never reacts); the top corners round the fill, the bottom stays square on the line.\n shrink-0: a tab never squeezes its label; the row scrolls sideways instead (SCROLLER). */\nconst TAB_BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-t-tile font-bold whitespace-nowrap transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n 'enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed ' +\n 'disabled:cursor-not-allowed disabled:text-text-disabled';\n/* Height steps 32/40/48 as a min-height, at least 44 px under a coarse pointer. */\nconst TAB_SIZE: Record<BfSize, string> = {\n sm: 'min-h-8 gap-1.5 px-3 text-label-xs pointer-coarse:min-h-hit',\n md: 'min-h-10 gap-2 px-3 text-label-sm pointer-coarse:min-h-hit',\n lg: 'min-h-12 gap-2 px-4 text-label pointer-coarse:min-h-hit',\n};\n/* Selected: `primary-text` and a 2 px `primary` underline (an ::after on the bottom edge), so the\n selection never rests on colour alone; the underline is `CanvasText` under forced colours. A\n disabled selected tab keeps the underline in `text-disabled`. */\nconst TAB_STATE: Record<'selected' | 'idle', string> = {\n selected:\n \"text-primary-text after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:content-[''] disabled:after:bg-text-disabled forced-colors:after:bg-[CanvasText]\",\n idle: 'text-text-muted enabled:hover:text-text enabled:active:text-text',\n};\n/* Fitted: the tabs share the row's width. */\nconst TAB_LAYOUT: Record<'fit' | 'fitted', string> = { fit: '', fitted: 'flex-1' };\n/* The count pill after the label (a[bfNavItem]'s pill): aria-hidden, the sr-only announcement\n beside it carries the count. */\nconst BADGE =\n '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';\n/* The row: at least the scroller's width, so the line under it spans the whole group, and as wide\n as its tabs (w-max), so it overflows the scroller when they do not fit. */\nconst LIST = 'flex w-max min-w-full border-b border-border';\n/* The scroller around the row: it scrolls sideways while the tabs do not fit. Its 4 px padding,\n cancelled by a negative margin, keeps the 4 px focus ring inside the clip (as bf-segmented). */\nconst SCROLLER = '-m-1 overflow-x-auto p-1';\nconst NAVIGATION_KEYS = ['ArrowRight', 'ArrowLeft', 'Home', 'End'];\n\n/**\n * In-page tabs: a row of tabs over the content they switch, one `bf-tab-panel` per tab. The\n * `selected` model holds the shown panel's `value`; unset or unknown, the first enabled panel\n * shows. Selection follows focus: the arrow keys (mirrored under `dir=\"rtl\"`), Home and End move\n * to a tab and show its panel. When the tabs do not fit, the row scrolls sideways.\n *\n * @example\n * <bf-tab-group label=\"Project\" [(selected)]=\"tab\">\n * <bf-tab-panel value=\"overview\" label=\"Overview\">…</bf-tab-panel>\n * <bf-tab-panel value=\"activity\" label=\"Activity\" [badge]=\"3\">…</bf-tab-panel>\n * </bf-tab-group>\n * @summary In-page tabs that switch between content panels, with keyboard navigation and badges\n * @category Navigation\n * @since 0.3.1\n * @slot default The panels, each a `bf-tab-panel`.\n */\n@Component({\n selector: 'bf-tab-group',\n imports: [NgTemplateOutlet],\n host: { class: 'flex min-w-0 flex-col gap-4' },\n providers: [{ provide: BF_TAB_GROUP, useExisting: BfTabGroupComponent }],\n template: `\n <div data-bf-tab-scroller [class]=\"scrollerClasses\">\n <!-- tabindex -1: the tabs hold the tab stop; the row only hears their arrow keys. -->\n <div\n role=\"tablist\"\n tabindex=\"-1\"\n [attr.aria-label]=\"name()\"\n [class]=\"listClasses\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (panel of panels(); track panel) {\n <button\n #tab\n type=\"button\"\n role=\"tab\"\n [id]=\"panel.tabId\"\n [attr.aria-selected]=\"panel.isSelected() ? 'true' : 'false'\"\n [attr.aria-controls]=\"panel.panelId\"\n [tabIndex]=\"panel === tabStop() ? 0 : -1\"\n [disabled]=\"panel.disabled()\"\n [class]=\"tabClasses(panel)\"\n (click)=\"select(panel)\"\n >\n <span class=\"flex shrink-0 empty:hidden\"\n ><ng-container *ngTemplateOutlet=\"panel.icon() ?? null\"\n /></span>\n <span data-label>{{ panel.label() }}</span>\n @let badge = panel.badge();\n @if (badge !== null) {\n <span data-badge aria-hidden=\"true\" [class]=\"badgeClasses\">{{ badge }}</span>\n <!-- A leading comma, so the name reads \"Activity, 3 new\" and never runs together. -->\n <span class=\"sr-only\">, {{ badgeAnnouncement(badge) }}</span>\n }\n </button>\n }\n </div>\n </div>\n <ng-content />\n `,\n})\nexport class BfTabGroupComponent implements BfTabGroupHost {\n /** The shown panel's `value`; two-way bindable. Unset or unknown shows the first enabled panel\n * (the model keeps its value until the user picks a tab). */\n readonly selected = model('');\n /** Accessible name of the tablist; empty falls back to `provideBfLabels()`'s `tabGroup`\n * (\"Tabs\"). */\n readonly label = input('');\n /** Height step of the tabs: sm 32, md 40, lg 48 px (at least 44 px under a coarse pointer);\n * unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Stretches the tabs to share the group's width. */\n readonly fitted = input(false, { transform: booleanAttribute });\n\n /** Emitted with the newly selected panel's `value` after a user change. */\n readonly changed = output<string>();\n\n /** The `bf-tab-panel` children, in document order. */\n readonly panels = contentChildren(BfTabPanelComponent);\n private readonly tabs = viewChildren<ElementRef<HTMLButtonElement>>('tab');\n\n private readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n /** The size in effect: `size`, else the app's `controlSize` default. */\n private readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n /** The tablist's accessible name: `label`, else the `tabGroup` label. */\n readonly name = computed(() => this.label() || this.labels.tabGroup);\n\n /** The panel shown: the one whose `value` is `selected`, else the first enabled panel (else the\n * first panel). */\n private readonly currentPanel = computed(() => {\n const panels = this.panels();\n return (\n panels.find((p) => p.value() === this.selected()) ??\n panels.find((p) => !p.disabled()) ??\n panels[0]\n );\n });\n /** The value of the panel shown; what each panel compares its own `value` with. */\n readonly current = computed(() => this.currentPanel()?.value() ?? '');\n\n /** The panel whose tab owns the roving tab stop: the shown one, else (it is disabled) the first\n * enabled one. */\n protected readonly tabStop = computed(() => {\n const current = this.currentPanel();\n return current && !current.disabled() ? current : this.panels().find((p) => !p.disabled());\n });\n\n protected readonly scrollerClasses = SCROLLER;\n protected readonly listClasses = LIST;\n protected readonly badgeClasses = BADGE;\n\n /**\n * The classes of a panel's tab.\n * @internal\n */\n tabClasses(panel: BfTabPanelComponent): string {\n return [\n TAB_BASE,\n TAB_SIZE[this.resolvedSize()],\n TAB_STATE[panel.isSelected() ? 'selected' : 'idle'],\n TAB_LAYOUT[this.fitted() ? 'fitted' : 'fit'],\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * The badge as screen readers hear it after the label.\n * @internal\n */\n badgeAnnouncement(count: number): string {\n return this.labels.tabBadge(count);\n }\n\n /**\n * Shows `panel` and emits `changed`, unless it is disabled or already shown.\n * @internal\n */\n select(panel: BfTabPanelComponent): void {\n if (panel.disabled() || panel.isSelected()) {\n return;\n }\n this.selected.set(panel.value());\n this.changed.emit(panel.value());\n }\n\n /**\n * Arrow keys (mirrored under `dir=\"rtl\"`), Home and End move focus and selection.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (!NAVIGATION_KEYS.includes(event.key)) {\n return;\n }\n const panels = this.panels();\n const enabled = panels.filter((p) => !p.disabled());\n if (enabled.length === 0) {\n return;\n }\n event.preventDefault();\n const rtl =\n event.currentTarget instanceof Element &&\n event.currentTarget.closest('[dir]')?.getAttribute('dir') === 'rtl';\n // Forward is the reading direction: ArrowRight in ltr, ArrowLeft in rtl.\n const forward = event.key === (rtl ? 'ArrowLeft' : 'ArrowRight');\n const current = this.currentPanel();\n const index = current ? enabled.indexOf(current) : -1;\n let next: BfTabPanelComponent | undefined;\n if (event.key === 'Home') {\n next = enabled[0];\n } else if (event.key === 'End') {\n next = enabled[enabled.length - 1];\n } else if (forward) {\n next = index === -1 ? enabled[0] : enabled[(index + 1) % enabled.length];\n } else {\n next =\n index === -1\n ? enabled[enabled.length - 1]\n : enabled[(index - 1 + enabled.length) % enabled.length];\n }\n if (!next) {\n return;\n }\n this.select(next);\n this.tabs()[panels.indexOf(next)]?.nativeElement.focus();\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, input } from '@angular/core';\n\n/**\n * The heading level of a `bf-page-header` title: `1` for the page, `2` for a section header.\n *\n * @summary The heading level of a page header title, one for a page or two\n * @since 0.3.1\n */\nexport type BfPageHeaderHeadingLevel = 1 | 2;\n\n/**\n * The top of a desktop page: a breadcrumb above, then the page title with its subtitle and\n * badges, and the page's actions at the inline end, wrapping under the title in a narrow window.\n *\n * @example\n * <bf-page-header title=\"Atlas rebrand\" subtitle=\"12 of 18 tasks done\">\n * <bf-badge bfSlot=\"meta\" variant=\"success\">On track</bf-badge>\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New task</bf-button>\n * </bf-page-header>\n * @summary Desktop page header with breadcrumb, title, subtitle, badges and a row of actions\n * @category Navigation\n * @since 0.3.1\n * @slot breadcrumb The trail above the title, such as `bf-breadcrumb`.\n * @slot title Rich title content inside the heading, when the `title` input is empty.\n * @slot meta Badges beside the title, wrapping under it when they do not fit.\n * @slot actions The page's buttons and menu buttons at the inline end.\n */\n@Component({\n selector: 'bf-page-header',\n imports: [NgTemplateOutlet],\n host: { class: 'block' },\n template: `\n <header class=\"flex flex-col gap-2\">\n <div data-breadcrumb class=\"empty:hidden\">\n <ng-content select=\"[bfSlot=breadcrumb]\" />\n </div>\n <div data-row class=\"flex flex-wrap items-center justify-between gap-4\">\n <div data-title-block class=\"flex min-w-0 flex-col gap-1\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1\">\n @if (headingLevel() === 2) {\n <h2 [class]=\"headingClasses\"><ng-container *ngTemplateOutlet=\"heading\" /></h2>\n } @else {\n <h1 [class]=\"headingClasses\"><ng-container *ngTemplateOutlet=\"heading\" /></h1>\n }\n <div data-meta class=\"flex flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=meta]\" />\n </div>\n </div>\n @if (subtitle()) {\n <p class=\"text-body text-text-muted\">{{ subtitle() }}</p>\n }\n </div>\n <div data-actions class=\"flex flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n </header>\n <!-- One copy of the title content, so the title slot projects into whichever heading renders. -->\n <ng-template #heading>\n @if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[bfSlot=title]\" />\n }\n </ng-template>\n `,\n})\nexport class BfPageHeaderComponent {\n /** The page title, rendered as the heading; empty to use the `title` slot instead. */\n readonly title = input('');\n /** One line under the title, such as a status or a count. */\n readonly subtitle = input('');\n /** Heading level of the title so the header fits the page outline. */\n readonly headingLevel = input<BfPageHeaderHeadingLevel>(1);\n\n protected readonly headingClasses = 'text-title text-text min-w-0 wrap-break-word';\n}\n","import { Component, computed, input } from '@angular/core';\nimport { provideBfDefaults } from '../../config/defaults';\n\n/* The status line: muted caption text while it has something to say; empty, it leaves the flow\n (`sr-only`, so no stray gap) but stays in the accessibility tree, so the live region is already\n registered when the first count arrives and that change is announced. */\nconst STATUS: Record<'shown' | 'empty', string> = {\n shown: 'text-caption text-text-muted',\n empty: 'sr-only',\n};\n\n/**\n * Row of search, filters, a view switch and trailing actions above a list or table. Every\n * control projected into it is `sm` unless it sets `size` itself.\n *\n * @example\n * <bf-toolbar label=\"Project filters\" [status]=\"results().length + ' results'\">\n * <bf-input type=\"search\" ariaLabel=\"Search projects\" [(value)]=\"query\" />\n * <bf-select ariaLabel=\"Status\" [options]=\"statuses\" [(value)]=\"status\" />\n * <bf-segmented bfSlot=\"view\" label=\"View\" [options]=\"views\" [(value)]=\"view\" />\n * <bf-button bfSlot=\"actions\" (clicked)=\"create()\">New project</bf-button>\n * </bf-toolbar>\n * @summary Dense row of search, filters, view switch, result count and actions\n * @category Actions\n * @since 0.3.1\n * @slot default The search field and the filters (bf-input, bf-select, bf-chip-group), in order.\n * @slot view A view switch after the filters, such as a bf-segmented of list and grid.\n * @slot actions The trailing actions, kept together at the inline end of the row, beside the status.\n */\n@Component({\n selector: 'bf-toolbar',\n host: {\n role: 'group',\n class: 'flex flex-wrap items-center gap-2',\n '[attr.aria-label]': 'label() || null',\n },\n // Component providers reach projected content too, so every control the consumer puts in the\n // row resolves its unset `size` against these defaults.\n providers: [provideBfDefaults({ size: 'sm' })],\n template: `\n <ng-content />\n <ng-content select=\"[bfSlot=view]\" />\n <!-- The status and the actions are one flex item that takes the rest of the row: on a narrow\n row they wrap together, the status at the start and the actions at the inline end, so the\n actions never sit alone on a row. With no actions the group dissolves (display: contents)\n and the status is a plain item of the row. -->\n <div\n data-end\n class=\"flex max-w-full grow flex-wrap items-center gap-2 has-[>div:empty]:contents\"\n >\n <span role=\"status\" [class]=\"statusClasses()\">{{ status() }}</span>\n <!-- One flex item, so the actions wrap together, never one by one. -->\n <div class=\"ms-auto flex max-w-full flex-wrap items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </div>\n `,\n})\nexport class BfToolbarComponent {\n /** The group's accessible name, such as \"Project filters\"; unnamed when empty. */\n readonly label = input('');\n /** The result count or a short state, such as \"24 results\", announced politely on change. */\n readonly status = input('');\n\n readonly statusClasses = computed(() => STATUS[this.status() ? 'shown' : 'empty']);\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * What a `bf-table` cell template receives: the row (`let-row`) and its position in `rows`.\n *\n * @summary The row and its index that a custom table cell template receives\n * @since 0.3.1\n */\nexport interface BfTableCellContext<T> {\n /** The row the cell belongs to (`let-row`). */\n $implicit: T;\n /** The row's position in the table's `rows` (`let-index=\"index\"`). */\n index: number;\n}\n\n/**\n * Replaces the default text of one `bf-table` column with a template, such as a badge, an avatar\n * or a link. `bfTableCell` names the column's `key`; bind `bfTableCellOf` to the table's rows so\n * `let-row` is typed as one of them (it is `unknown` otherwise).\n *\n * @example\n * <bf-table [rows]=\"tasks()\" [columns]=\"columns\">\n * <ng-template bfTableCell=\"status\" [bfTableCellOf]=\"tasks()\" let-task>\n * <bf-badge [variant]=\"task.done ? 'success' : 'neutral'\">{{ task.status }}</bf-badge>\n * </ng-template>\n * </bf-table>\n * @summary Custom template for the cells of one table column, with the row typed\n * @since 0.3.1\n */\n@Directive({ selector: 'ng-template[bfTableCell]' })\nexport class BfTableCellDirective<T = unknown> {\n /** The `key` of the column whose cells this template renders. */\n readonly bfTableCell = input.required<string>();\n /** The table's rows; only types `let-row`, the table never reads it. */\n readonly bfTableCellOf = input<readonly T[]>([]);\n\n /**\n * The cell template the table renders for each row.\n * @internal\n */\n readonly template = inject<TemplateRef<BfTableCellContext<T>>>(TemplateRef);\n\n /**\n * Types the template's context for the template type checker.\n * @internal\n * @param _directive The directive instance (unused).\n * @param _context The template's context.\n * @returns Always true.\n */\n static ngTemplateContextGuard<T>(\n _directive: BfTableCellDirective<T>,\n _context: unknown,\n ): _context is BfTableCellContext<T> {\n return true;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n type ElementRef,\n type TemplateRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BfCheckboxComponent } from '../checkbox/checkbox.component';\nimport { type BfSelectOption, BfSelectComponent } from '../select/select.component';\nimport { uniqueId } from '../_shared/unique-id';\nimport { type BfTableCellContext, BfTableCellDirective } from './table-cell.directive';\n\n/**\n * Where a `bf-table` column lines up its header and cells: `start` for text, `end` for numbers.\n *\n * @summary The inline alignment of a table column, start for text or end for numbers\n * @since 0.3.1\n */\nexport type BfTableAlign = 'start' | 'end';\n\n/**\n * Where a `bf-table` column lines up its header and cells: a `BfTableAlign`, or `center` for a\n * column of controls such as the toggles of a settings matrix. A new type, so `Record`s over the\n * released `BfTableAlign` keep compiling.\n *\n * @summary The inline alignment of a table column: start, end, or centred for controls\n * @since 0.4.0\n */\nexport type BfTableColumnAlign = BfTableAlign | 'center';\n\n/**\n * The direction of a sorted `bf-table` column, as `aria-sort` names it.\n *\n * @summary The direction a sorted table column is in, ascending or descending\n * @since 0.3.1\n */\nexport type BfTableSortDirection = 'ascending' | 'descending';\n\n/**\n * When a `bf-table` renders each row as a card of label/value pairs: `never` (the default),\n * `narrow` while the table is narrower than 36rem (a container query), or `coarse` under a coarse\n * pointer at any width.\n *\n * @summary When a table stacks its rows into cards: never, when narrow, or under touch\n * @since 0.3.2\n */\nexport type BfTableStack = 'never' | 'narrow' | 'coarse';\n\n/**\n * One column of a `bf-table`: the row property it shows, its header and how it behaves.\n *\n * @summary One table column with its row key, header label, sorting and alignment\n * @since 0.3.1\n */\nexport interface BfTableColumn {\n /** The row property the default cell shows; also the key a `bfTableCell` template names. */\n key: string;\n /** The header text. */\n label: string;\n /**\n * Whether the header is a button that sets the table's `sort`.\n * @default false\n */\n sortable?: boolean;\n /**\n * The inline alignment of the header and cells; `end` also sets tabular figures, `center`\n * centres a cell's control (a toggle, a checkbox) in the column.\n * @default 'start'\n */\n align?: BfTableColumnAlign;\n}\n\n/**\n * The column a `bf-table` is sorted by and the direction; the consumer sorts the rows.\n *\n * @summary The column key and direction a table is sorted by, set by its headers\n * @since 0.3.1\n */\nexport interface BfTableSort {\n /** The `key` of the sorted column. */\n column: string;\n /** The sort direction. */\n direction: BfTableSortDirection;\n}\n\n/**\n * Returns the string that identifies a `bf-table` row in `selection` and in the `@for` track.\n *\n * @summary Function that returns the unique string key of one table row\n * @since 0.3.1\n */\nexport type BfTableRowKey<T> = (row: T) => string;\n\n/** A row's property, read without trusting the row's shape. */\nfunction readProperty(row: unknown, key: string): unknown {\n if (typeof row !== 'object' || row === null) {\n return undefined;\n }\n const value: unknown = Reflect.get(row, key);\n return value;\n}\n\n/** The default `rowKey`: the row's `id` when it is a string or a number, else `''` (the table\n * then falls back to the row's index). */\nfunction idRowKey(row: unknown): string {\n const id = readProperty(row, 'id');\n return typeof id === 'string' || typeof id === 'number' ? String(id) : '';\n}\n\n/* Row heights per step: the header 32/40/48 and the body rows 40/48/56 px, set as the cells'\n `height` (a table cell's height is its minimum). Under a coarse pointer every row is at least\n 44 px; a cell projects the consumer's content, so it grows, never an ::after over it. The\n checkboxes take the same step, so their rows (32/40/48) fit the body rows' 4 px padding. */\nconst HEAD_CELL: Record<BfSize, string> = {\n sm: 'h-8 pointer-coarse:h-hit',\n md: 'h-10 pointer-coarse:h-hit',\n lg: 'h-12',\n};\nconst BODY_CELL: Record<BfSize, string> = {\n sm: 'h-10 py-1 text-label-sm',\n md: 'h-12 py-1 text-body',\n lg: 'h-14 py-1 text-body',\n};\n/* The coarse-pointer row height of an sm row, only where the table does not stack (a stacked cell\n sizes to its content): never in a `stack=\"coarse\"` table, and only from a 36rem container up\n in a `stack=\"narrow\"` one (Tailwind sorts pointer-coarse: after the container variants, so a\n stacked h-auto could not override it). */\nconst BODY_TOUCH: Record<BfTableStack, string> = {\n never: 'pointer-coarse:h-hit',\n narrow: '@min-xl:pointer-coarse:h-hit',\n coarse: '',\n};\nconst ALIGN: Record<BfTableColumnAlign, string> = {\n start: 'text-start',\n end: 'text-end tabular-nums',\n center: 'text-center',\n};\n/* A centred column's body cell: its text centred, and each element in it (a block-level\n bf-toggle or bf-checkbox) as wide as its content and centred, except while stacked, where the\n control sits at the tile's end like any value, centred on the label's line (a control has no\n text baseline to share with the label). */\nconst CENTER_CELL: Record<BfTableStack, string> = {\n never: '[&>*]:mx-auto [&>*]:w-fit',\n narrow: '@min-xl:[&>*]:mx-auto [&>*]:w-fit @max-xl:items-center',\n coarse: 'not-pointer-coarse:[&>*]:mx-auto [&>*]:w-fit pointer-coarse:items-center',\n};\nconst HEAD_BASE = 'px-3 py-0 align-middle text-label-xs font-bold text-text-muted';\nconst BODY_BASE = 'px-3 align-middle font-medium text-text';\n/* The selection column: as narrow as its checkbox. */\nconst SELECT_CELL = 'w-0 ps-3 pe-0';\n/* A sortable header: a button around the label and the arrow mark, at least 24 px tall (44 px\n under a coarse pointer); its text is the column's own label, so a min-height, no ::after. */\nconst SORT_BUTTON =\n 'inline-flex min-h-6 cursor-pointer items-center gap-1.5 rounded-field -mx-1 px-1 font-bold transition-colors hover:text-text ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring pointer-coarse:min-h-hit';\n/* The sort arrow: a CSS chevron in the label's colour (no icon import), pointing up while\n ascending and down while descending. A vertical mark, so it does not mirror under rtl. Hidden but\n still taking its space while the column is not sorted, so the label never shifts. */\ntype BfTableSortMark = BfTableSortDirection | 'none';\nconst ARROW_BASE =\n 'inline-block size-1.5 shrink-0 border-r-[1.5px] border-b-[1.5px] border-current';\nconst ARROW: Record<BfTableSortMark, string> = {\n ascending: 'translate-y-0.5 -rotate-135',\n descending: '-translate-y-0.5 rotate-45',\n none: 'invisible rotate-45',\n};\n/* Body rows: a selected row takes the primary-soft fill; a selectable table's rows tint on\n hover (on devices that can hover). Without selection the rows stay still. */\ntype BfTableRowState = 'selected' | 'selectable' | 'static';\nconst ROW: Record<BfTableRowState, string> = {\n selected: 'bg-primary-soft hover:bg-primary-soft-hover',\n selectable: 'hover:bg-surface-muted',\n static: '',\n};\n/* A focused element ArrowUp / ArrowDown move from: a button, link or checkbox. Text entry, a\n select and the composite widgets (radio, combobox, slider, …) keep their own arrow keys. */\nconst FOCUSABLE =\n 'a[href], button:not(:disabled), input[type=\"checkbox\"]:not(:disabled), [tabindex]:not([tabindex=\"-1\"])';\nconst OWN_ARROWS = new Set(['radio', 'combobox', 'slider', 'spinbutton', 'listbox', 'menu', 'tab']);\n\n/* Stacked rows. Each part's classes apply only while the table stacks: below a 36rem container\n (`@max-xl:`, the host is the container) or under a coarse pointer (`pointer-coarse:`). The\n elements stay a table with explicit roles; only their display changes. The thead is visually\n hidden (screen readers still read the column headers), each body row is a sunken tile (the\n tile a raised card holds, see the card's Nesting surfaces), its selection checkbox and first\n cell form the tile's header, and every other cell shows its column label before its value\n through a `::before` reading `data-label` with empty alternative text, so assistive technology\n reads the header association, not the label twice. A visible bar above the tiles holds the\n select-all checkbox and a Sort by select, since the hidden header row's controls are not\n shown. */\nconst STACK_HOST: Record<BfTableStack, string> = {\n never: 'block',\n narrow: 'block @container',\n coarse: 'block',\n};\nconst STACK_BAR: Record<BfTableStack, string> = {\n never: 'hidden',\n narrow: 'hidden @max-xl:flex',\n coarse: 'hidden pointer-coarse:flex',\n};\nconst STACK_TABLE: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:block',\n coarse: 'pointer-coarse:block',\n};\nconst STACK_HEAD: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:sr-only',\n coarse: 'pointer-coarse:sr-only',\n};\n/* Shown only while stacked (the plain header label) or only while not (the sort button, the\n header checkbox), so the hidden header row holds no control a keyboard user could reach. */\nconst STACK_ONLY: Record<BfTableStack, string> = {\n never: 'hidden',\n narrow: 'hidden @max-xl:inline',\n coarse: 'hidden pointer-coarse:inline',\n};\nconst STACK_NEVER: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:hidden',\n coarse: 'pointer-coarse:hidden',\n};\nconst STACK_BODY: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:flex @max-xl:flex-col @max-xl:gap-2 @max-xl:divide-y-0',\n coarse:\n 'pointer-coarse:flex pointer-coarse:flex-col pointer-coarse:gap-2 pointer-coarse:divide-y-0',\n};\nconst STACK_ROW: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:grid @max-xl:items-center @max-xl:gap-x-3 @max-xl:rounded-tile @max-xl:px-3 @max-xl:py-2',\n coarse:\n 'pointer-coarse:grid pointer-coarse:items-center pointer-coarse:gap-x-3 pointer-coarse:rounded-tile pointer-coarse:px-3 pointer-coarse:py-2',\n};\n/* A selectable row's tile: the checkbox column, then the rest. */\nconst STACK_ROW_SELECTABLE: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:grid-cols-[auto_minmax(0,1fr)]',\n coarse: 'pointer-coarse:grid-cols-[auto_minmax(0,1fr)]',\n};\n/* An unselected row's tile fill (a selected one keeps primary-soft). */\nconst STACK_ROW_FILL: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:bg-surface-sunken',\n coarse: 'pointer-coarse:bg-surface-sunken',\n};\nconst STACK_SELECT_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:flex @max-xl:h-auto @max-xl:w-auto @max-xl:p-0',\n coarse: 'pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:w-auto pointer-coarse:p-0',\n};\n/* The first cell: the tile's title, without a label. */\nconst STACK_FIRST_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:block @max-xl:h-auto @max-xl:px-0 @max-xl:py-1 @max-xl:text-start @max-xl:font-bold',\n coarse:\n 'pointer-coarse:block pointer-coarse:h-auto pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-start pointer-coarse:font-bold',\n};\n/* Every other cell: the label at the start, the value at the end, on the tile's full width. */\nconst STACK_CELL: Record<BfTableStack, string> = {\n never: '',\n narrow:\n '@max-xl:col-span-full @max-xl:flex @max-xl:h-auto @max-xl:justify-between @max-xl:gap-3 @max-xl:px-0 @max-xl:py-1 @max-xl:text-end ' +\n '@max-xl:before:shrink-0 @max-xl:before:text-start @max-xl:before:text-label-xs @max-xl:before:font-bold @max-xl:before:text-text-muted @max-xl:before:content-data-label',\n coarse:\n 'pointer-coarse:col-span-full pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:justify-between pointer-coarse:gap-3 pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-end ' +\n 'pointer-coarse:before:shrink-0 pointer-coarse:before:text-start pointer-coarse:before:text-label-xs pointer-coarse:before:font-bold pointer-coarse:before:text-text-muted pointer-coarse:before:content-data-label',\n};\n/* A stacked cell's label and value share a baseline (text values); a centred column's control is\n centred on the label's line instead (CENTER_CELL). */\nconst STACK_CELL_BASELINE: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:items-baseline',\n coarse: 'pointer-coarse:items-baseline',\n};\n/* The Not sorted option's value in the Sort by select; a column option always holds a colon. */\nconst SORT_NONE = '';\nconst STACK_EMPTY: Record<BfTableStack, string> = {\n never: '',\n narrow: '@max-xl:block',\n coarse: 'pointer-coarse:block',\n};\n\ninterface BfTableEntry<T> {\n row: T;\n key: string;\n index: number;\n}\n\n/**\n * Data table for desktop: column headers that set a sort, optional row selection with\n * checkboxes, custom cells from `bfTableCell` templates and an empty slot. It never sorts or\n * filters itself; the consumer sorts the rows in a `computed()` from `sort`. With `stack` it\n * renders each row as a tile of label/value pairs in a narrow space or under touch.\n *\n * @example\n * <bf-table label=\"Tasks\" [rows]=\"sorted()\" [columns]=\"columns\" [(sort)]=\"sort\" selectable [(selection)]=\"selected\">\n * <ng-template bfTableCell=\"title\" [bfTableCellOf]=\"sorted()\" let-task>{{ task.title }}</ng-template>\n * <bf-empty-state bfSlot=\"empty\" title=\"No tasks\" />\n * </bf-table>\n * @summary Desktop data table with sortable headers, row selection, custom cells and an empty slot\n * @category Data display\n * @since 0.3.1\n * @slot empty Shown in one full-width row while `rows` is empty, such as a `bf-empty-state`.\n */\n@Component({\n selector: 'bf-table',\n host: { '[class]': 'hostClasses()', '(keydown)': 'onKeydown($event)' },\n imports: [NgTemplateOutlet, BfCheckboxComponent, BfSelectComponent],\n // The wrapper scrolls sideways only when the columns cannot fit (a last resort: narrow screens\n // stack the rows with `stack`, or render them as a list, see the docs).\n template: `\n @if (stacks() && (selectable() || sortOptions().length > 0)) {\n <div data-bf-table-stack-bar [class]=\"stackBarClasses()\">\n @if (selectable()) {\n <bf-checkbox\n [size]=\"resolvedSize()\"\n [label]=\"selectAllName()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"entries().length === 0\"\n (changed)=\"selectAll($event)\"\n />\n }\n @if (sortOptions().length > 0) {\n <bf-select\n class=\"min-w-0 flex-1 basis-36\"\n [label]=\"labels.tableSortBy\"\n [options]=\"sortOptions()\"\n [value]=\"sortValue()\"\n (changed)=\"sortFromOption($event)\"\n />\n }\n </div>\n }\n <div data-bf-table-scroller class=\"max-w-full overflow-x-auto\">\n <table\n #table\n [attr.role]=\"stacks() ? 'table' : null\"\n [attr.aria-labelledby]=\"stacks() && label() ? captionId : null\"\n [class]=\"tableClasses()\"\n >\n @if (label()) {\n <caption class=\"sr-only\" [attr.id]=\"stacks() ? captionId : null\">\n {{\n label()\n }}\n </caption>\n }\n <thead [attr.role]=\"stacks() ? 'rowgroup' : null\" [class]=\"headClasses()\">\n <tr class=\"border-border border-b\" [attr.role]=\"stacks() ? 'row' : null\">\n @if (selectable()) {\n <th\n scope=\"col\"\n [attr.role]=\"stacks() ? 'columnheader' : null\"\n [class]=\"selectHeadClasses()\"\n >\n <bf-checkbox\n [class]=\"notStackedClasses()\"\n [size]=\"resolvedSize()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"entries().length === 0\"\n [ariaLabel]=\"selectAllName()\"\n (changed)=\"selectAll($event)\"\n />\n </th>\n }\n @for (column of columns(); track column.key) {\n <th\n scope=\"col\"\n [attr.role]=\"stacks() ? 'columnheader' : null\"\n [attr.data-bf-column]=\"column.key\"\n [attr.aria-sort]=\"ariaSort(column.key)\"\n [class]=\"headCellClasses(column)\"\n >\n @if (column.sortable) {\n <button type=\"button\" [class]=\"sortButtonClasses()\" (click)=\"sortBy(column.key)\">\n {{ column.label }}\n <span aria-hidden=\"true\" [class]=\"arrowClasses(column.key)\"></span>\n </button>\n @if (stacks()) {\n <span data-bf-stacked-label [class]=\"stackedOnlyClasses()\">{{\n column.label\n }}</span>\n }\n } @else {\n {{ column.label }}\n }\n </th>\n }\n </tr>\n </thead>\n <tbody [attr.role]=\"stacks() ? 'rowgroup' : null\" [class]=\"bodyGroupClasses()\">\n @for (entry of entries(); track entry.key) {\n <tr\n data-bf-table-row\n [attr.role]=\"stacks() ? 'row' : null\"\n [class]=\"rowClasses(entry.key)\"\n >\n @if (selectable()) {\n <td [attr.role]=\"stacks() ? 'cell' : null\" [class]=\"selectBodyClasses()\">\n <bf-checkbox\n [size]=\"resolvedSize()\"\n [checked]=\"selectedKeys().has(entry.key)\"\n [ariaLabelledby]=\"cellId(entry.index)\"\n (changed)=\"selectRow(entry.key, $event)\"\n />\n </td>\n }\n @for (column of columns(); track column.key; let first = $first) {\n <td\n data-bf-cell\n [attr.role]=\"stacks() ? 'cell' : null\"\n [attr.id]=\"first ? cellId(entry.index) : null\"\n [attr.data-label]=\"stacks() && !first ? column.label : null\"\n [class]=\"bodyClasses(column, first)\"\n >\n @if (templates().get(column.key); as template) {\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { $implicit: entry.row, index: entry.index }\n \"\n />\n } @else {\n {{ cellText(entry.row, column.key) }}\n }\n </td>\n }\n </tr>\n } @empty {\n <tr\n data-bf-table-empty\n [attr.role]=\"stacks() ? 'row' : null\"\n [class]=\"stackEmptyClasses()\"\n >\n <td\n [attr.role]=\"stacks() ? 'cell' : null\"\n [attr.colspan]=\"columnCount()\"\n [class]=\"stackEmptyClasses()\"\n >\n <ng-content select=\"[bfSlot=empty]\" />\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n `,\n})\nexport class BfTableComponent<T = unknown> {\n /** The rows to show, already sorted and filtered by the consumer. */\n readonly rows = input.required<readonly T[]>();\n /** The columns, in order. */\n readonly columns = input.required<readonly BfTableColumn[]>();\n /** The unique string key of a row, used for `selection` and to track rows; by default the\n * row's `id` (a string or a number), else its index. */\n readonly rowKey = input<BfTableRowKey<T>>(idRowKey);\n /** The table's name, rendered as a visually hidden `caption`. */\n readonly label = input('');\n /** The sorted column and direction, `null` while unsorted; two-way bindable. A sortable header\n * sets it, and the consumer sorts `rows` from it. */\n readonly sort = model<BfTableSort | null>(null);\n /** Adds a first column of checkboxes that select rows. */\n readonly selectable = input(false, { transform: booleanAttribute });\n /** The keys (`rowKey`) of the selected rows; two-way bindable. */\n readonly selection = model<readonly string[]>([]);\n /** Accessible name of the header checkbox; empty falls back to `provideBfLabels()`'s\n * `tableSelectAll` (\"Select all rows\"). */\n readonly selectAllLabel = input('');\n /** Row height step: sm 40, md 48, lg 56 px (the header 32/40/48; at least 44 px under a coarse\n * pointer); unset follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** When the rows render as cards of label/value pairs: `never`, `narrow` (the table is\n * narrower than 36rem) or `coarse` (under a coarse pointer, at any width). */\n readonly stack = input<BfTableStack>('never');\n\n protected readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly table = viewChild.required<ElementRef<HTMLTableElement>>('table');\n private readonly cells = contentChildren<BfTableCellDirective>(BfTableCellDirective);\n private readonly id = uniqueId('bf-table');\n /** The caption's id, which names the table while it can stack. */\n protected readonly captionId = `${this.id}-caption`;\n\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The header checkbox's name: `selectAllLabel`, else the `tableSelectAll` label. */\n protected readonly selectAllName = computed(\n () => this.selectAllLabel() || this.labels.tableSelectAll,\n );\n /** Each row with its key (the `rowKey`, else its index) and its index. */\n protected readonly entries = computed<BfTableEntry<T>[]>(() => {\n const rowKey = this.rowKey();\n return this.rows().map((row, index) => ({ row, key: rowKey(row) || String(index), index }));\n });\n /** The custom cell template of each column key. */\n protected readonly templates = computed(\n () =>\n new Map<string, TemplateRef<BfTableCellContext<unknown>>>(\n this.cells().map((cell) => [cell.bfTableCell(), cell.template]),\n ),\n );\n protected readonly selectedKeys = computed(() => new Set(this.selection()));\n /** Whether every row is selected (and there is at least one). */\n protected readonly allSelected = computed(() => {\n const entries = this.entries();\n const selected = this.selectedKeys();\n return entries.length > 0 && entries.every((entry) => selected.has(entry.key));\n });\n /** Whether some rows, but not all, are selected: the header checkbox is mixed. */\n protected readonly someSelected = computed(() => {\n const selected = this.selectedKeys();\n return !this.allSelected() && this.entries().some((entry) => selected.has(entry.key));\n });\n /** The number of columns, the selection column included: the empty row's `colspan`. */\n protected readonly columnCount = computed(\n () => this.columns().length + (this.selectable() ? 1 : 0),\n );\n /** Whether the table can stack its rows (any `stack` but `never`); it then sets explicit\n * table roles, because some browsers drop a table's semantics once its display changes. */\n protected readonly stacks = computed(() => this.stack() !== 'never');\n /** The Sort by select's options: Not sorted (`''`), then each sortable column ascending and\n * descending; none without a sortable column. */\n protected readonly sortOptions = computed<BfSelectOption[]>(() => {\n const sortable = this.columns().filter((column) => column.sortable);\n if (sortable.length === 0) {\n return [];\n }\n return [\n { value: SORT_NONE, label: this.labels.tableSortNone },\n ...sortable.flatMap((column) => [\n { value: `${column.key}:ascending`, label: this.labels.tableSortAscending(column.label) },\n { value: `${column.key}:descending`, label: this.labels.tableSortDescending(column.label) },\n ]),\n ];\n });\n /** The Sort by select's value: the option of `sort`, Not sorted while `sort` is null. */\n protected readonly sortValue = computed(() => {\n const sort = this.sort();\n return sort ? `${sort.column}:${sort.direction}` : SORT_NONE;\n });\n protected readonly hostClasses = computed(() => STACK_HOST[this.stack()]);\n protected readonly stackBarClasses = computed(\n () => `${STACK_BAR[this.stack()]} flex-wrap items-end justify-between gap-x-4 gap-y-2 pb-3`,\n );\n protected readonly tableClasses = computed(\n () => `w-full border-collapse ${STACK_TABLE[this.stack()]}`,\n );\n protected readonly headClasses = computed(() => STACK_HEAD[this.stack()]);\n protected readonly bodyGroupClasses = computed(\n () => `divide-border divide-y ${STACK_BODY[this.stack()]}`,\n );\n protected readonly sortButtonClasses = computed(\n () => `${SORT_BUTTON} ${STACK_NEVER[this.stack()]}`,\n );\n protected readonly notStackedClasses = computed(() => STACK_NEVER[this.stack()]);\n protected readonly stackedOnlyClasses = computed(() => STACK_ONLY[this.stack()]);\n protected readonly stackEmptyClasses = computed(() => STACK_EMPTY[this.stack()]);\n protected readonly selectHeadClasses = computed(\n () => `${HEAD_BASE} ${HEAD_CELL[this.resolvedSize()]} ${SELECT_CELL}`,\n );\n protected readonly selectBodyClasses = computed(\n () => `${BODY_BASE} ${this.bodyHeight()} ${SELECT_CELL} ${STACK_SELECT_CELL[this.stack()]}`,\n );\n /** A body cell's height step, with the coarse-pointer height unless the table stacks there. */\n private readonly bodyHeight = computed(() => {\n const size = this.resolvedSize();\n const touch = size === 'sm' ? BODY_TOUCH[this.stack()] : '';\n return touch ? `${BODY_CELL[size]} ${touch}` : BODY_CELL[size];\n });\n\n /**\n * The classes of a column's header cell.\n * @internal\n */\n headCellClasses(column: BfTableColumn): string {\n return `${HEAD_BASE} ${HEAD_CELL[this.resolvedSize()]} ${ALIGN[column.align ?? 'start']}`;\n }\n\n /**\n * The classes of a column's body cell; the first one is a stacked tile's title.\n * @internal\n */\n bodyClasses(column: BfTableColumn, first: boolean): string {\n const stack = this.stack();\n const align = column.align ?? 'start';\n const center = align === 'center' ? CENTER_CELL[stack] : '';\n const stacked = first\n ? STACK_FIRST_CELL[stack]\n : `${STACK_CELL[stack]} ${center ? '' : STACK_CELL_BASELINE[stack]}`;\n return `${BODY_BASE} ${this.bodyHeight()} ${ALIGN[align]} ${center} ${stacked}`\n .replace(/\\s+/g, ' ')\n .trim();\n }\n\n /**\n * The classes of the body row with this key.\n * @internal\n */\n rowClasses(key: string): string {\n const state: BfTableRowState = this.selectedKeys().has(key)\n ? 'selected'\n : this.selectable()\n ? 'selectable'\n : 'static';\n const stack = this.stack();\n const tile = [\n STACK_ROW[stack],\n this.selectable() ? STACK_ROW_SELECTABLE[stack] : '',\n state === 'selected' ? '' : STACK_ROW_FILL[stack],\n ]\n .filter(Boolean)\n .join(' ');\n return `transition-colors ${ROW[state]} ${tile}`.trim();\n }\n\n /**\n * The classes of a sortable header's arrow mark.\n * @internal\n */\n arrowClasses(key: string): string {\n const sort = this.sort();\n return `${ARROW_BASE} ${ARROW[sort?.column === key ? sort.direction : 'none']}`;\n }\n\n /**\n * The `aria-sort` of a column's header: its direction while sorted, else none.\n * @internal\n */\n ariaSort(key: string): BfTableSortDirection | null {\n const sort = this.sort();\n return sort?.column === key ? sort.direction : null;\n }\n\n /**\n * The id of a row's first data cell, which names the row's checkbox.\n * @internal\n */\n cellId(index: number): string {\n return `${this.id}-row-${index}`;\n }\n\n /**\n * The default text of a cell: the row's property `key` when it is a string, number or boolean,\n * else empty (render an object, such as a date, with a `bfTableCell` template).\n * @internal\n */\n cellText(row: T, key: string): string {\n const value = readProperty(row, key);\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'bigint'\n ? String(value)\n : '';\n }\n\n /**\n * Sorts by the column with this key: ascending first, then descending and ascending again.\n * @param key The column's `key`.\n */\n sortBy(key: string): void {\n const sort = this.sort();\n const direction: BfTableSortDirection =\n sort?.column === key && sort.direction === 'ascending' ? 'descending' : 'ascending';\n this.sort.set({ column: key, direction });\n }\n\n /**\n * Sorts by a Sort by option (`<key>:<direction>`) of a stacked table; Not sorted sets `sort` to\n * null.\n * @internal\n */\n sortFromOption(value: string): void {\n if (value === SORT_NONE) {\n this.sort.set(null);\n return;\n }\n const at = value.lastIndexOf(':');\n const direction = value.slice(at + 1);\n if (at > 0 && (direction === 'ascending' || direction === 'descending')) {\n this.sort.set({ column: value.slice(0, at), direction });\n }\n }\n\n /**\n * Selects or clears every row; keys of rows not shown stay as they are.\n * @param selected True to select every row, false to clear them.\n */\n selectAll(selected: boolean): void {\n const keys = this.entries().map((entry) => entry.key);\n const shown = new Set(keys);\n const kept = this.selection().filter((key) => !shown.has(key));\n this.selection.set(selected ? [...kept, ...keys] : kept);\n }\n\n /**\n * Selects or clears one row.\n * @param key The row's key.\n * @param selected True to select it, false to clear it.\n */\n selectRow(key: string, selected: boolean): void {\n const rest = this.selection().filter((k) => k !== key);\n this.selection.set(selected ? [...rest, key] : rest);\n }\n\n /**\n * ArrowUp / ArrowDown on a button, link or checkbox in a row move focus to the control at the\n * same place in the nearest row above or below that has one.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {\n return;\n }\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\n return;\n }\n const target = event.target;\n if (!(target instanceof HTMLElement) || !target.matches(FOCUSABLE)) {\n return;\n }\n if (OWN_ARROWS.has(target.getAttribute('role') ?? '')) {\n return;\n }\n const table = this.table().nativeElement;\n const cell = target.closest('td, th');\n const row = cell?.parentElement;\n if (!(cell instanceof HTMLTableCellElement) || !(row instanceof HTMLTableRowElement)) {\n return;\n }\n if (cell.closest('table') !== table) {\n return;\n }\n const position = [...cell.querySelectorAll(FOCUSABLE)].indexOf(target);\n const rows = [...table.rows];\n const step = event.key === 'ArrowDown' ? 1 : -1;\n for (let i = rows.indexOf(row) + step; i >= 0 && i < rows.length; i += step) {\n const controls = [...(rows[i]?.cells[cell.cellIndex]?.querySelectorAll(FOCUSABLE) ?? [])];\n const next = controls[Math.min(position, controls.length - 1)];\n // A stacked table hides the header row's checkbox; skip it.\n if (next instanceof HTMLElement && next.checkVisibility?.() !== false) {\n event.preventDefault();\n next.focus();\n return;\n }\n }\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * The layout of a `bf-description-list`: `rows` (label beside value, divided) or `grid` (tiles).\n *\n * @summary The two description list layouts, divided label-value rows or a grid of tiles\n * @since 0.3.1\n */\nexport type BfDescriptionListLayout = 'rows' | 'grid';\n\n/** What a `div[bfDescriptionItem]` reads from its `bf-description-list`. */\nexport interface BfDescriptionListHost {\n /** The list's layout. */\n readonly layout: Signal<BfDescriptionListLayout>;\n}\n\n/**\n * Provided by `bf-description-list` so each `div[bfDescriptionItem]` styles itself for the list's\n * layout, without `description-item.component.ts` importing `description-list.component.ts`.\n */\nexport const BF_DESCRIPTION_LIST = new InjectionToken<BfDescriptionListHost>('BF_DESCRIPTION_LIST');\n","import { Component, computed, input } from '@angular/core';\nimport {\n BF_DESCRIPTION_LIST,\n type BfDescriptionListHost,\n type BfDescriptionListLayout,\n} from './description-list.token';\n\n/* `rows`: a `border` line between the items, as a divided `bf-list`. `grid`: as many columns of at\n least 10rem as fit, so the tiles wrap without a breakpoint. The host is an inline-size\n container: the rows put label and value side by side only once the list itself is 28rem wide\n (`@md:` on the item), so a narrow pane stacks them whatever the viewport. */\nconst LAYOUT: Record<BfDescriptionListLayout, string> = {\n rows: 'flex flex-col divide-y divide-border',\n grid: 'grid grid-cols-[repeat(auto-fit,minmax(10rem,1fr))] gap-x-6 gap-y-4',\n};\n\n/**\n * A list of label-value pairs, such as a record's details: a native `dl` around\n * `div[bfDescriptionItem]`s, as divided rows (label beside value) or a grid of tiles.\n *\n * @example\n * <bf-description-list>\n * <div bfDescriptionItem label=\"Cuisine\">Italian</div>\n * <div bfDescriptionItem label=\"Difficulty\"><bf-badge variant=\"success\">Easy</bf-badge></div>\n * </bf-description-list>\n * @summary Native description list of label-value pairs, as divided rows or a tile grid\n * @category Data display\n * @since 0.3.1\n * @slot default The pairs, each a `div[bfDescriptionItem]`.\n */\n@Component({\n selector: 'bf-description-list',\n host: { class: 'block @container' },\n // Tells the projected items which layout to draw.\n providers: [{ provide: BF_DESCRIPTION_LIST, useExisting: BfDescriptionListComponent }],\n template: `<dl [class]=\"classes()\"><ng-content /></dl>`,\n})\nexport class BfDescriptionListComponent implements BfDescriptionListHost {\n /** `rows` (default): label beside value, divided, stacked in a narrow list; `grid`: tiles with the label over the value. */\n readonly layout = input<BfDescriptionListLayout>('rows');\n\n readonly classes = computed(() => LAYOUT[this.layout()]);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { BF_DESCRIPTION_LIST, type BfDescriptionListLayout } from './description-list.token';\n\n/* `rows`: label over value until the list is 28rem wide (`@md:`, the list is the container), then\n a one-third label column beside the value, on a shared baseline. `grid`: a tile, label over\n value. */\nconst ITEM: Record<BfDescriptionListLayout, string> = {\n rows: 'grid gap-1 py-3 @md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] @md:items-baseline @md:gap-4',\n grid: 'flex min-w-0 flex-col gap-1',\n};\n\n/**\n * One label-value pair of a `bf-description-list`: the `label` becomes the `dt`, the content the\n * `dd`. Put it on a `div` inside the list.\n *\n * @example\n * <bf-description-list>\n * <div bfDescriptionItem label=\"Servings\">4</div>\n * </bf-description-list>\n * @summary One label and value pair of a description list, label as term, content as value\n * @category Data display\n * @since 0.3.1\n * @slot default The value: text or rich content such as a badge or a link.\n */\n@Component({\n selector: 'div[bfDescriptionItem]',\n host: { '[class]': 'classes()' },\n template: `\n <dt class=\"text-caption text-text-muted\">{{ label() }}</dt>\n <dd class=\"text-body text-text ms-0 min-w-0 wrap-anywhere\"><ng-content /></dd>\n `,\n})\nexport class BfDescriptionItemComponent {\n /** The term, shown as the pair's label. */\n readonly label = input.required<string>();\n\n /** The enclosing list, which sets the layout; `rows` outside a list. */\n private readonly list = inject(BF_DESCRIPTION_LIST, { optional: true });\n\n readonly classes = computed(() => ITEM[this.list?.layout() ?? 'rows']);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\n\n/**\n * The surface of a `bf-stat`: plain (on whatever holds it) or card (its own outlined tile).\n *\n * @summary The two stat surfaces, plain on its container or an outlined card tile\n * @since 0.3.1\n */\nexport type BfStatVariant = 'plain' | 'card';\n\n/**\n * The surface of a `bf-stat`, as its `variant` input takes it: a `BfStatVariant` or tile (a\n * sunken, borderless tile for a stats row inside a raised card). A new type, so `Record`s over\n * the released `BfStatVariant` keep compiling.\n *\n * @summary The three stat surfaces, plain, an outlined card or a sunken tile\n * @since 0.3.2\n */\nexport type BfStatAppearance = BfStatVariant | 'tile';\n\n/**\n * The direction of a `bf-stat` delta: up, down or flat (no change).\n *\n * @summary The three directions of a stat's delta pill, up, down or no change\n * @since 0.3.1\n */\nexport type BfStatTrend = 'up' | 'down' | 'flat';\n\n/**\n * Which direction of a `bf-stat` delta is good: positive (up is good, such as revenue) or\n * negative (down is good, such as costs or churn).\n *\n * @summary Whether a rising or a falling figure is the good news for a stat\n * @since 0.3.1\n */\nexport type BfStatTrendIntent = 'positive' | 'negative';\n\ntype DeltaTone = 'good' | 'bad' | 'neutral';\n\n/* `h-full`: in a grid of stats every card stretches to the row's height. */\nconst BASE = 'flex h-full items-start gap-3 text-start';\n/* `card` is the `flat` bf-card surface: `surface`, the card radius and padding, a 1.5 px\n `border-strong` edge. `tile` is one level down, for a row inside a raised card: `surface-sunken`\n with the card radius and padding and no border. */\nconst VARIANT: Record<BfStatAppearance, string> = {\n plain: '',\n card: 'rounded-card bg-surface p-card border-[1.5px] border-border-strong',\n tile: 'rounded-card bg-surface-sunken p-card',\n};\n/* The icon tile is sunken; on a sunken stat tile it takes the raised `surface` instead, so it\n still shows. */\nconst ICON_TILE =\n 'rounded-tile text-text-muted flex size-10 shrink-0 items-center justify-center empty:hidden';\nconst ICON_TILE_SURFACE: Record<BfStatAppearance, string> = {\n plain: 'bg-surface-sunken',\n card: 'bg-surface-sunken',\n tile: 'bg-surface',\n};\n/* The delta pill sits in the value's dd, so it is read with the value. It takes the badge's label\n shape and type and is toned by whether the change is good. */\nconst DELTA_BASE =\n 'inline-flex items-center gap-1 rounded-control px-2 py-1 text-micro font-bold leading-none tabular-nums';\nconst DELTA_TONE: Record<DeltaTone, string> = {\n good: 'bg-success-soft text-success',\n bad: 'bg-danger-soft text-danger',\n neutral: 'bg-neutral-soft text-neutral',\n};\n/* The arrow mark, drawn with borders in `currentColor` (so it shows in forced colours): a chevron\n rotated to point up or down, or a dash for no change. Vertical, so it never mirrors in RTL. */\nconst MARK: Record<BfStatTrend, string> = {\n up: 'size-1.5 shrink-0 translate-y-0.5 rotate-45 border-t-[1.5px] border-l-[1.5px] border-current',\n down: 'size-1.5 shrink-0 -translate-y-0.5 rotate-45 border-b-[1.5px] border-r-[1.5px] border-current',\n flat: 'w-2 shrink-0 border-t-[1.5px] border-current',\n};\n\n/**\n * One figure with its label, such as a count, a duration or a total: a native `dl` pair with the\n * value set large, an optional icon tile at the start and a supporting line under the value.\n *\n * A `delta` with a `trend` adds a pill beside the value, toned by `trendIntent`.\n *\n * @example\n * <bf-stat label=\"Revenue\" value=\"€48,200\" delta=\"+12%\" trend=\"up\" />\n * <bf-stat label=\"Orders\" value=\"1,204\" variant=\"tile\" />\n * <bf-stat label=\"Cook time\" value=\"30 min\" variant=\"card\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Flame\" />\n * Oven at 200 °C\n * </bf-stat>\n * @summary One labelled figure with an optional icon tile and a supporting line\n * @category Data display\n * @since 0.3.1\n * @slot icon The icon in the tile at the start.\n * @slot default A supporting line under the value, such as a trend or a badge.\n */\n@Component({\n selector: 'bf-stat',\n host: { class: 'block' },\n template: `\n <div [class]=\"classes()\">\n <span data-tile [class]=\"iconTileClasses()\"><ng-content select=\"[bfSlot=icon]\" /></span>\n <dl class=\"flex min-w-0 flex-col gap-1\">\n <dt class=\"text-caption text-text-muted\">{{ label() }}</dt>\n <dd\n class=\"text-title text-text ms-0 flex flex-wrap items-center gap-x-2 gap-y-1 wrap-anywhere tabular-nums\"\n >\n {{ value() }}\n @if (delta()) {\n <span data-delta [class]=\"deltaClasses()\">\n @if (trend()) {\n <span aria-hidden=\"true\" [class]=\"markClasses()\"></span\n ><span class=\"sr-only\">{{ trendWord() }} </span>\n }\n {{ delta() }}</span\n >\n }\n </dd>\n <dd class=\"text-caption text-text-muted ms-0 empty:hidden\"><ng-content /></dd>\n </dl>\n </div>\n `,\n})\nexport class BfStatComponent {\n /** What the figure measures, shown above it. */\n readonly label = input.required<string>();\n /** The figure, already formatted (`45 min`, `1,204`, `98%`). */\n readonly value = input.required<string>();\n /** Surface: plain (default) on its container, card (an outlined tile) or tile (sunken, no border). */\n readonly variant = input<BfStatAppearance>('plain');\n\n /** A change shown in a pill beside the value, already formatted (`+12%`); empty shows none. */\n readonly delta = input('');\n /** The delta's direction: an arrow mark and a hidden word; left unset, the pill is neutral. */\n readonly trend = input<BfStatTrend | undefined>(undefined);\n /** Whether up is good (positive, default) or down is good (negative, such as costs). */\n readonly trendIntent = input<BfStatTrendIntent>('positive');\n\n private readonly labels = inject(BF_LABELS);\n\n readonly classes = computed(() => [BASE, VARIANT[this.variant()]].filter(Boolean).join(' '));\n\n /** @internal */\n readonly iconTileClasses = computed(() => `${ICON_TILE} ${ICON_TILE_SURFACE[this.variant()]}`);\n\n /** @internal */\n readonly deltaClasses = computed(() => {\n const trend = this.trend();\n const tone: DeltaTone =\n trend === undefined || trend === 'flat'\n ? 'neutral'\n : (trend === 'up') === (this.trendIntent() === 'positive')\n ? 'good'\n : 'bad';\n return `${DELTA_BASE} ${DELTA_TONE[tone]}`;\n });\n\n /** @internal */\n readonly markClasses = computed(() => {\n const trend = this.trend();\n return trend ? MARK[trend] : '';\n });\n\n /** @internal The direction read before the delta, so colour is never the only signal. */\n readonly trendWord = computed(() => {\n const words: Record<BfStatTrend, string> = {\n up: this.labels.statTrendUp,\n down: this.labels.statTrendDown,\n flat: this.labels.statTrendFlat,\n };\n const trend = this.trend();\n return trend ? words[trend] : '';\n });\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/** The default format of an event's time: a medium date and a short time (12 Oct 2026, 14:30). */\nexport const TIMELINE_TIME_FORMAT: Intl.DateTimeFormatOptions = {\n dateStyle: 'medium',\n timeStyle: 'short',\n};\n\n/** What a `bf-timeline-event` reads from its `bf-timeline`. */\nexport interface BfTimelineHost {\n /** The `Intl.DateTimeFormat` options of the events' times. */\n readonly timeFormat: Signal<Intl.DateTimeFormatOptions>;\n /** The locale of the events' times, `''` for the app's `LOCALE_ID`. */\n readonly locale: Signal<string>;\n}\n\n/**\n * Provided by `bf-timeline` so each `bf-timeline-event` claims `role=\"listitem\"` and formats its\n * time with the timeline's options, without `timeline-event.component.ts` importing\n * `timeline.component.ts`.\n */\nexport const BF_TIMELINE = new InjectionToken<BfTimelineHost>('BF_TIMELINE');\n","import { Component, input } from '@angular/core';\nimport { BF_TIMELINE, TIMELINE_TIME_FORMAT, type BfTimelineHost } from './timeline.token';\n\n/**\n * A dated history of events, newest first or oldest first as the consumer orders them: who did\n * what and when, each event a `bf-timeline-event` with a marker on a vertical line.\n *\n * @example\n * <bf-timeline label=\"History\">\n * <bf-timeline-event actor=\"Lena Meier\" time=\"2026-10-28T14:30:00Z\" tone=\"success\">\n * Marked the finding as fixed\n * </bf-timeline-event>\n * </bf-timeline>\n * @summary Dated list of events with who did what and when, on a vertical line\n * @category Data display\n * @since 0.4.0\n * @slot default The events, each a `bf-timeline-event`, in the order to show them.\n */\n@Component({\n selector: 'bf-timeline',\n host: { class: 'block' },\n // Tells the projected events they are inside a timeline (role=\"listitem\", the time format).\n providers: [{ provide: BF_TIMELINE, useExisting: BfTimelineComponent }],\n template: `<div role=\"list\" class=\"flex flex-col\" [attr.aria-label]=\"label() || null\">\n <ng-content />\n </div>`,\n})\nexport class BfTimelineComponent implements BfTimelineHost {\n /** The list's accessible name, such as \"History\"; empty leaves the list unnamed (a visible\n * heading above it already names the section). */\n readonly label = input('');\n /** `Intl.DateTimeFormat` options of every event's time; by default a medium date and a short\n * time (`dateStyle: 'medium'`, `timeStyle: 'short'`). */\n readonly timeFormat = input<Intl.DateTimeFormatOptions>(TIMELINE_TIME_FORMAT);\n /** BCP 47 locale of the times, such as `de-CH`; empty follows the app's `LOCALE_ID`. */\n readonly locale = input('');\n}\n","import { Component, LOCALE_ID, computed, inject, input } from '@angular/core';\nimport { BF_TIMELINE, TIMELINE_TIME_FORMAT } from './timeline.token';\n\n/**\n * The colour of a `bf-timeline-event`'s marker: `neutral` (the default), `primary`, or a status\n * (`success`, `warning`, `danger`, `info`), such as danger for a failed CI run.\n *\n * @summary The marker colour of a timeline event, neutral, primary or a status\n * @since 0.4.0\n */\nexport type BfTimelineTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';\n\n/* The marker dot's fill per tone: the status tokens (each >= 3:1 on surface and bg); neutral is\n `text-subtle`, the token of non-text marks. Under forced colours the dot is `CanvasText`. */\nconst TONE: Record<BfTimelineTone, string> = {\n neutral: 'bg-text-subtle',\n primary: 'bg-primary',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n info: 'bg-info',\n};\n/* The 10 px dot, centred on the first line of the text (`text-body` is 24 px tall). */\nconst DOT =\n 'relative mt-[calc(0.75rem-5px)] size-2.5 shrink-0 rounded-control forced-colors:bg-[CanvasText]';\n/* The marker column draws the line: from this event's dot centre (top 0.75rem) to the next\n event's (0.75rem into it), a 1 px `border` line; the last event of a timeline has none. */\nconst MARKER =\n 'relative flex w-2.5 shrink-0 justify-center before:absolute before:top-3 before:-bottom-3 ' +\n \"before:start-[calc(50%-0.5px)] before:border-s before:border-border before:content-[''] \" +\n 'group-last/bf-timeline-event:before:hidden';\n/* Links in the event text (a PR, a repository, a CVE): `primary-text`, underlined, a thicker\n underline on hover and the focus ring on keyboard focus. */\nconst TEXT =\n 'text-body text-text wrap-anywhere ' +\n '[&_a]:rounded-tile [&_a]:text-primary-text [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:decoration-2 ' +\n '[&_a]:focus-visible:ring-4 [&_a]:focus-visible:ring-ring [&_a]:focus-visible:outline-hidden';\n\n/** A Date of `time`, `null` when it is empty or no valid date. */\nfunction toDate(time: Date | string | null): Date | null {\n if (time === null || time === '') {\n return null;\n }\n const date = typeof time === 'string' ? new Date(time) : time;\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/** `date` in `locale` with `options`; the fallback locale, then the default options, when the\n * runtime refuses either, and `''` when it refuses both, so a bad input never throws. */\nfunction formatDate(\n date: Date,\n locales: readonly string[],\n options: Intl.DateTimeFormatOptions,\n): string {\n for (const locale of locales) {\n for (const format of [options, TIMELINE_TIME_FORMAT]) {\n try {\n return new Intl.DateTimeFormat(locale, format).format(date);\n } catch {\n // An unknown locale tag (RangeError) or a clash of options (TypeError): try the next.\n }\n }\n }\n return '';\n}\n\n/**\n * One event of a `bf-timeline`: a marker coloured by `tone`, the event text (the default slot,\n * which may hold links), then who did it (`actor`) and when (`time`, in a `time` element).\n *\n * @example\n * <bf-timeline-event actor=\"CI\" time=\"2026-10-28T09:12:00Z\" tone=\"danger\">\n * CI failed on <a href=\"/pulls/123\">PR #123</a>\n * </bf-timeline-event>\n * @summary One timeline event with a coloured marker, its text, actor and time\n * @category Data display\n * @since 0.4.0\n * @slot default The event text; links in it take the link style.\n * @slot end Content at the inline end on a wide timeline and below the text on a narrow one, such as a button.\n */\n@Component({\n selector: 'bf-timeline-event',\n // role=\"listitem\" only inside bf-timeline: a standalone event claiming it would have no list.\n host: { class: 'group/bf-timeline-event flex gap-3', '[attr.role]': 'role' },\n template: `\n <span aria-hidden=\"true\" [class]=\"markerClasses\"><span [class]=\"dotClasses()\"></span></span>\n <!-- The end slot wraps under the text once the text would get narrower than 16rem. -->\n <div\n class=\"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2 pb-5 group-last/bf-timeline-event:pb-0\"\n >\n <div class=\"min-w-0 flex-[1_1_16rem]\">\n <div [class]=\"textClasses\"><ng-content /></div>\n @if (actor() || timeLabel()) {\n <p class=\"text-caption text-text-muted mt-0.5 wrap-anywhere\">\n @if (actor()) {\n <span>{{ actor() }}</span>\n }\n @if (actor() && timeLabel()) {\n <span aria-hidden=\"true\"> · </span>\n }\n @if (datetime(); as machine) {\n <time [attr.datetime]=\"machine\">{{ timeLabel() }}</time>\n } @else if (timeLabel()) {\n <span>{{ timeLabel() }}</span>\n }\n </p>\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=end]\" />\n </div>\n </div>\n `,\n})\nexport class BfTimelineEventComponent {\n /** Who did it, such as a person or a bot; empty for a system event. */\n readonly actor = input('');\n /** When it happened: a Date or an ISO 8601 string; empty or invalid shows no time. */\n readonly time = input<Date | string | null>(null);\n /** Shown in place of the formatted time, such as \"vor 2 Std.\"; the `time` element's `datetime`\n * keeps the exact value. */\n readonly timeText = input('');\n /** The marker's colour. */\n readonly tone = input<BfTimelineTone>('neutral');\n\n private readonly timeline = inject(BF_TIMELINE, { optional: true });\n private readonly appLocale = inject(LOCALE_ID);\n\n /** `listitem` inside a `bf-timeline`, else no role. */\n protected readonly role = this.timeline ? 'listitem' : null;\n\n private readonly date = computed(() => toDate(this.time()));\n /** The `time` element's machine value: the ISO string as given, a Date's ISO string, else null. */\n protected readonly datetime = computed(() => {\n const date = this.date();\n if (!date) {\n return null;\n }\n const time = this.time();\n return typeof time === 'string' ? time : date.toISOString();\n });\n /** The visible time: `timeText`, else the date formatted with the timeline's options. */\n protected readonly timeLabel = computed(() => {\n const date = this.date();\n if (this.timeText()) {\n return this.timeText();\n }\n if (!date) {\n return '';\n }\n const locales = [this.timeline?.locale() ?? '', this.appLocale, 'en'].filter(Boolean);\n return formatDate(date, locales, this.timeline?.timeFormat() ?? TIMELINE_TIME_FORMAT);\n });\n protected readonly markerClasses = MARKER;\n protected readonly textClasses = TEXT;\n readonly dotClasses = computed(() => `${DOT} ${TONE[this.tone()]}`);\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * What a `li[bfBreadcrumbItem]` reads from its enclosing `bf-breadcrumb`, provided through an\n * injection token so `breadcrumb.component.ts` and `breadcrumb-item.component.ts` never import each\n * other. Both methods read signals, so an item calls them in a `computed()`.\n */\nexport interface BfBreadcrumbTrail {\n /**\n * Whether `item` is the last item of the trail: the current page.\n * @param item The item asking.\n */\n isCurrent(item: object): boolean;\n /**\n * Whether `item` is one of the middle items a collapsed trail hides behind its ellipsis.\n * @param item The item asking.\n */\n isHidden(item: object): boolean;\n}\n\n/** Provided by `bf-breadcrumb` for the items projected into it. */\nexport const BF_BREADCRUMB = new InjectionToken<BfBreadcrumbTrail>('BF_BREADCRUMB');\n","import { Component, ElementRef, computed, inject } from '@angular/core';\nimport { BF_BREADCRUMB } from './breadcrumb.token';\n\n/* The wrapper around the consumer's content. A projected `<a>` (a direct child) takes the link\n look: text-muted, text with an underline on hover, the focus ring. It is at least 24 px tall\n under a fine pointer and 44 px under a coarse one (a min height, never an ::after, because it\n projects consumer content). Every level is padded 4 px (px-1) and a link cancels it (-mx-1) and\n pads itself instead, so a link's text lines up with a plain-text level, its ring gets room and\n it never overflows the item. Long labels wrap anywhere, so nothing is lost at large text sizes. */\ntype BfBreadcrumbItemState = 'ancestor' | 'current';\nconst CONTENT: Record<BfBreadcrumbItemState, string> = {\n ancestor:\n 'inline-flex min-w-0 items-center px-1 wrap-anywhere text-text-muted ' +\n '[&>a]:-mx-1 [&>a]:inline-flex [&>a]:min-h-6 [&>a]:items-center [&>a]:rounded-tile [&>a]:px-1 ' +\n '[&>a]:text-text-muted [&>a]:underline-offset-4 [&>a]:transition-colors ' +\n '[&>a]:hover:text-text [&>a]:hover:underline ' +\n '[&>a]:focus-visible:ring-4 [&>a]:focus-visible:ring-ring [&>a]:focus-visible:outline-hidden ' +\n '[&>a]:pointer-coarse:min-h-hit',\n current: 'inline-flex min-w-0 items-center px-1 wrap-anywhere font-semibold text-text',\n};\n\n/* The separator after every item but the current page: a CSS chevron (two borders of a rotated\n square) pointing to the inline end, mirrored under dir=\"rtl\". Not an icon, which a widget never\n imports, and aria-hidden, so it is never announced. */\nexport const BREADCRUMB_SEPARATOR =\n 'size-1.5 shrink-0 rotate-45 border-t-[1.5px] border-r-[1.5px] border-text-subtle rtl:-rotate-135';\n\n/**\n * One level of a `bf-breadcrumb` trail, on the consumer's own `<li>` so the list stays `ol > li`.\n * Project an `<a routerLink>` for an ancestor page, or plain text for the current page; the last\n * item is the current page (`aria-current=\"page\"`, no link look, no separator), every other one is\n * followed by a chevron.\n *\n * @example\n * <li bfBreadcrumbItem><a routerLink=\"/projects\">Projects</a></li>\n * <li bfBreadcrumbItem>Atlas</li>\n * @summary One level of a breadcrumb trail: a link, or the current page as text\n * @category Navigation\n * @since 0.3.1\n * @slot default The level: an `<a>` link to the page, or plain text for the current page.\n */\n@Component({\n selector: 'li[bfBreadcrumbItem]',\n host: {\n class: 'inline-flex min-w-0 items-center gap-2',\n '[attr.hidden]': 'hidden() ? \"\" : null',\n },\n template: `\n <span [attr.aria-current]=\"current() ? 'page' : null\" [class]=\"classes()\"><ng-content /></span>\n @if (!current()) {\n <span aria-hidden=\"true\" data-bf-separator [class]=\"separator\"></span>\n }\n `,\n})\nexport class BfBreadcrumbItemComponent {\n private readonly trail = inject(BF_BREADCRUMB);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether this item is the last of the trail, the current page. */\n readonly current = computed(() => this.trail.isCurrent(this));\n /** Whether a collapsed trail hides this item behind its ellipsis. */\n readonly hidden = computed(() => this.trail.isHidden(this));\n\n protected readonly classes = computed(() => CONTENT[this.current() ? 'current' : 'ancestor']);\n protected readonly separator = BREADCRUMB_SEPARATOR;\n\n /**\n * Moves keyboard focus to the item's link (or other focusable content); an item without one\n * takes focus itself through `tabindex=\"-1\"`. Called by `bf-breadcrumb` after the ellipsis\n * reveals the hidden levels.\n * @internal\n */\n focus(): void {\n const host = this.host.nativeElement;\n const target = host.querySelector<HTMLElement>('a[href], button, [tabindex]');\n if (target) {\n target.focus();\n return;\n }\n host.setAttribute('tabindex', '-1');\n host.focus();\n }\n}\n","import {\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n afterRenderEffect,\n computed,\n contentChildren,\n inject,\n input,\n linkedSignal,\n numberAttribute,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { COARSE_HIT_BASE } from '../_shared/hit-classes';\nimport { BREADCRUMB_SEPARATOR, BfBreadcrumbItemComponent } from './breadcrumb-item.component';\nimport { BF_BREADCRUMB, type BfBreadcrumbTrail } from './breadcrumb.token';\n\n/* The ellipsis button: 24 px under a fine pointer, extended to 44 px tall by an ::after under a\n coarse one (a self-contained control). A `bfSlot=\"overflow\"` element projected before it (a\n menu button of the hidden levels) replaces it: the sibling selector hides the button whenever\n the slot wrapper is not empty. */\nconst EXPAND =\n 'relative inline-flex h-6 min-w-6 cursor-pointer items-center justify-center rounded-tile px-1.5 ' +\n 'font-bold leading-none text-text-muted transition-colors hover:bg-surface-muted hover:text-text ' +\n 'active:bg-surface-pressed focus-visible:ring-4 focus-visible:ring-ring focus-visible:outline-hidden ' +\n '[[data-bf-overflow]:not(:empty)+&]:hidden ' +\n `${COARSE_HIT_BASE} pointer-coarse:after:-inset-y-2.5`;\n\n/**\n * Desktop breadcrumb trail: a `nav` named \"Breadcrumb\" around an ordered list of\n * `li[bfBreadcrumbItem]` levels, the last one the current page, a CSS chevron between them. With\n * `maxItems` set and a longer trail it keeps the first level and the last `maxItems - 1`, and hides\n * the middle ones behind an ellipsis button that shows them in place, or behind the consumer's own\n * `bfSlot=\"overflow\"` content (a menu button of the hidden levels).\n *\n * @example\n * <bf-breadcrumb [maxItems]=\"3\">\n * <li bfBreadcrumbItem><a routerLink=\"/\">Home</a></li>\n * <li bfBreadcrumbItem><a routerLink=\"/projects\">Projects</a></li>\n * <li bfBreadcrumbItem><a routerLink=\"/projects/atlas\">Atlas</a></li>\n * <li bfBreadcrumbItem>Settings</li>\n * </bf-breadcrumb>\n * @summary Desktop breadcrumb trail of links to the current page, with optional collapsing\n * @category Navigation\n * @since 0.3.1\n * @slot default The levels, each a `li[bfBreadcrumbItem]`, the current page last.\n * @slot overflow Replaces the ellipsis button of a collapsed trail, e.g. a menu of the hidden levels.\n */\n@Component({\n selector: 'bf-breadcrumb',\n host: { class: 'block' },\n providers: [{ provide: BF_BREADCRUMB, useExisting: BfBreadcrumbComponent }],\n template: `\n <nav [attr.aria-label]=\"name()\">\n <ol class=\"text-label-sm flex flex-wrap items-center gap-x-2 gap-y-1\">\n <!-- Moved after the first item once rendered (see the constructor). -->\n <li\n #more\n data-bf-breadcrumb-more\n class=\"inline-flex items-center gap-2\"\n [attr.hidden]=\"hiddenCount() > 0 ? null : ''\"\n >\n <span data-bf-overflow class=\"contents\"><ng-content select=\"[bfSlot=overflow]\" /></span>\n <button\n type=\"button\"\n [attr.aria-label]=\"expandLabel()\"\n [class]=\"expandClasses\"\n (click)=\"expand()\"\n >\n …\n </button>\n <span aria-hidden=\"true\" data-bf-separator [class]=\"separator\"></span>\n </li>\n <ng-content />\n </ol>\n </nav>\n `,\n})\nexport class BfBreadcrumbComponent implements BfBreadcrumbTrail {\n private readonly labels = inject(BF_LABELS);\n private readonly injector = inject(Injector);\n\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `breadcrumb`\n * (\"Breadcrumb\"). */\n readonly label = input('');\n /**\n * Collapse a trail longer than this: keep the first level and the last `maxItems - 1` and hide\n * the middle ones behind an ellipsis. `0` never collapses; values below 2 act as 2, so the\n * current page always stays.\n */\n readonly maxItems = input(0, { transform: numberAttribute });\n\n /** The rendered navigation name: `label`, else the `breadcrumb` label. */\n protected readonly name = computed(() => this.label() || this.labels.breadcrumb);\n\n private readonly items = contentChildren(BfBreadcrumbItemComponent);\n private readonly itemElements = contentChildren(BfBreadcrumbItemComponent, {\n read: ElementRef,\n });\n private readonly more = viewChild.required<ElementRef<HTMLElement>>('more');\n\n /* Reset when the trail changes (a new page), so a long trail starts collapsed again. */\n private readonly expanded = linkedSignal({ source: this.items, computation: () => false });\n\n /** How many middle levels the trail hides right now; 0 when it shows all of them. */\n readonly hiddenCount = computed(() => {\n const max = this.maxItems();\n const count = this.items().length;\n if (this.expanded() || !(max > 0)) {\n return 0;\n }\n const keep = Math.max(2, Math.floor(max));\n return count > keep ? count - keep : 0;\n });\n\n protected readonly expandLabel = computed(() => this.labels.breadcrumbExpand(this.hiddenCount()));\n protected readonly expandClasses = EXPAND;\n protected readonly separator = BREADCRUMB_SEPARATOR;\n\n constructor() {\n /* The ellipsis item is rendered by this template but belongs after the first projected level,\n which content projection cannot interleave: move it there after each render that changes the\n levels (and so it stays in the reading and Tab order between them). */\n afterRenderEffect({\n write: () => {\n const first = this.itemElements()[0]?.nativeElement as HTMLElement | undefined;\n const more = this.more().nativeElement;\n if (first && first.nextElementSibling !== more) {\n first.after(more);\n }\n },\n });\n }\n\n /**\n * Whether `item` is the last level, the current page.\n * @internal\n */\n isCurrent(item: object): boolean {\n const items = this.items();\n return items.length > 0 && items[items.length - 1] === item;\n }\n\n /**\n * Whether `item` is one of the middle levels the collapsed trail hides.\n * @internal\n */\n isHidden(item: object): boolean {\n const index = this.items().indexOf(item as BfBreadcrumbItemComponent);\n return index >= 1 && index <= this.hiddenCount();\n }\n\n /**\n * Shows every level in place and moves focus to the first one it revealed (its link).\n * @internal\n */\n expand(): void {\n const firstHidden = this.items()[1];\n this.expanded.set(true);\n afterNextRender({ write: () => firstHidden?.focus() }, { injector: this.injector });\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/** Where a nav item sits: a vertical sidebar or a horizontal top row. */\nexport type BfNavLayout = 'sidebar' | 'top';\n\n/** What `a[bfNavItem]`, `bf-nav-group` and `bf-sidebar-toggle` read from the enclosing `bf-sidebar`\n * or `bf-top-nav`. */\nexport interface BfNavHost {\n /** The host's layout: full-width rows in a sidebar, inline items in a top row. */\n readonly layout: BfNavLayout;\n /** True while the sidebar is collapsed to an icon rail; always false in a top nav. */\n readonly collapsed: Signal<boolean>;\n /** The id of the host's `nav` element (for a toggle's `aria-controls`); null in a top nav. */\n readonly navId: string | null;\n /** Writes the sidebar's `collapsed` model, as a user change; does nothing in a top nav. */\n setCollapsed(collapsed: boolean): void;\n}\n\n/**\n * Provided by `bf-sidebar` and `bf-top-nav`, so their items and groups follow the layout and the\n * collapsed state without the item files importing the container files. `bf-sidebar-toggle`\n * (`@bitforgehq/ui/overlay`) reads and flips the state through it, as the internal `ɵBF_NAV`.\n */\nexport const BF_NAV = new InjectionToken<BfNavHost>('BF_NAV');\n","import { Component, computed, inject, input, model } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_NAV, type BfNavHost } from './nav.token';\n\n/* Display and width on the host only, so a consumer's `hidden md:flex` decides the display (in\n the stylesheet `hidden` comes after `flex`). Collapsed, the width follows the icon rail. */\ntype BfSidebarWidth = 'expanded' | 'collapsed';\nconst HOST: Record<BfSidebarWidth, string> = {\n expanded: 'flex shrink-0 flex-col w-60',\n collapsed: 'flex shrink-0 flex-col w-auto',\n};\n\n/* The default region scrolls on its own; its 4 px padding (pulled back with a negative margin)\n keeps the items' focus ring inside the scroll box, which would clip it. Collapsed, every region\n centres its content in the rail. */\nconst REGION: Record<BfSidebarWidth, string> = {\n expanded: 'items-stretch',\n collapsed: 'items-center',\n};\n\n/**\n * The vertical navigation of a desktop app: a `nav` landmark with a `header` slot (the brand),\n * the destinations (`a[bfNavItem]` links, optionally in `bf-nav-group`s) and a `footer` slot.\n * `collapsed` turns it into an icon rail: put a `bf-sidebar-toggle` (`@bitforgehq/ui/overlay`) in\n * it, or bind `[(collapsed)]` to your own button. Below a breakpoint hide it\n * (`class=\"hidden md:flex\"`) and drive a `bf-menu-button` from the same routes.\n *\n * @example\n * <bf-sidebar label=\"Main\" [(collapsed)]=\"collapsed\" class=\"hidden md:flex\">\n * <a bfSlot=\"header\" routerLink=\"/\">Atlas</a>\n * <bf-nav-group label=\"Workspace\">\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Inbox\" />\n * Inbox\n * </a>\n * </bf-nav-group>\n * </bf-sidebar>\n * @summary Vertical app navigation with brand, grouped links, footer and an icon rail mode\n * @category Navigation\n * @since 0.3.1\n * @slot header The brand or app switcher above the destinations.\n * @slot default The destinations: `a[bfNavItem]` links and `bf-nav-group`s.\n * @slot footer Content under the destinations, such as settings or the account.\n */\n@Component({\n selector: 'bf-sidebar',\n host: { '[class]': 'hostClasses()', '[attr.data-collapsed]': \"collapsed() ? '' : null\" },\n // The items and groups read the layout and the collapsed state through BF_NAV, so this file\n // and theirs never import each other.\n providers: [\n {\n provide: BF_NAV,\n useFactory: (): BfNavHost => {\n const sidebar = inject(BfSidebarComponent);\n return {\n layout: 'sidebar',\n collapsed: sidebar.collapsed,\n navId: sidebar.navId,\n setCollapsed: (collapsed) => sidebar.collapsed.set(collapsed),\n };\n },\n },\n ],\n template: `\n <nav\n [id]=\"navId\"\n [attr.aria-label]=\"name()\"\n class=\"border-border bg-surface flex min-h-0 flex-1 flex-col gap-6 border-e p-3\"\n >\n <div data-header class=\"flex shrink-0 flex-col empty:hidden {{ regionClasses() }}\">\n <ng-content select=\"[bfSlot=header]\" />\n </div>\n <div\n data-items\n class=\"-m-1 flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-1 {{ regionClasses() }}\"\n >\n <ng-content />\n </div>\n <div data-footer class=\"flex shrink-0 flex-col gap-1 empty:hidden {{ regionClasses() }}\">\n <ng-content select=\"[bfSlot=footer]\" />\n </div>\n </nav>\n `,\n})\nexport class BfSidebarComponent {\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`\n * (\"Main\"). Name each landmark differently when a page has more than one. */\n readonly label = input('');\n /** Collapses the sidebar to an icon rail: items show their icon only, their label stays for\n * screen readers and becomes a tooltip. A `bf-sidebar-toggle` inside flips it; bind\n * `[(collapsed)]` to keep it in your state. */\n readonly collapsed = model(false);\n\n private readonly labels = inject(BF_LABELS);\n\n /** The `nav` element's id, which `bf-sidebar-toggle` points `aria-controls` at.\n * @internal */\n readonly navId = uniqueId('bf-sidebar');\n\n /** The rendered navigation name: `label`, else the `navigation` label. */\n protected readonly name = computed(() => this.label() || this.labels.navigation);\n private readonly width = computed<BfSidebarWidth>(() =>\n this.collapsed() ? 'collapsed' : 'expanded',\n );\n readonly hostClasses = computed(() => HOST[this.width()]);\n protected readonly regionClasses = computed(() => REGION[this.width()]);\n}\n","import { Component, computed, inject, input, signal } from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { BF_NAV, type BfNavHost } from './nav.token';\n\n/**\n * The horizontal navigation of a desktop app with few sections: a `nav` landmark holding a row\n * of `a[bfNavItem]` links that wraps onto more lines in a narrow container. Each link marks the\n * current page from `aria-current=\"page\"`, as in `bf-sidebar`.\n *\n * @example\n * <bf-top-nav label=\"Sections\">\n * <a bfNavItem routerLink=\"/overview\" routerLinkActive ariaCurrentWhenActive=\"page\">Overview</a>\n * <a bfNavItem routerLink=\"/reports\" routerLinkActive ariaCurrentWhenActive=\"page\">Reports</a>\n * </bf-top-nav>\n * @summary Horizontal app navigation, a wrapping row of links for apps with few sections\n * @category Navigation\n * @since 0.3.1\n * @slot default The destinations, `a[bfNavItem]` links.\n */\n@Component({\n selector: 'bf-top-nav',\n host: { class: 'block' },\n // The items lay out inline through BF_NAV; a top nav never collapses.\n providers: [\n {\n provide: BF_NAV,\n useFactory: (): BfNavHost => ({\n layout: 'top',\n collapsed: signal(false).asReadonly(),\n navId: null,\n setCollapsed: () => undefined,\n }),\n },\n ],\n template: `\n <nav [attr.aria-label]=\"name()\" class=\"flex flex-wrap items-center gap-1\">\n <ng-content />\n </nav>\n `,\n})\nexport class BfTopNavComponent {\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `navigation`\n * (\"Main\"). Name each landmark differently when a page has more than one. */\n readonly label = input('');\n\n private readonly labels = inject(BF_LABELS);\n\n /** The rendered navigation name: `label`, else the `navigation` label. */\n protected readonly name = computed(() => this.label() || this.labels.navigation);\n}\n","import { Component, computed, inject, input } from '@angular/core';\nimport { uniqueId } from '../_shared/unique-id';\nimport { BF_NAV } from './nav.token';\n\n/* The heading is small muted text over the items. In a collapsed sidebar it is hidden visually\n but stays the group's name for screen readers; the rail centres the items. */\ntype BfNavGroupForm = 'expanded' | 'collapsed';\nconst HEADING: Record<BfNavGroupForm, string> = {\n expanded: 'px-3 pb-1 text-caption text-text-muted',\n collapsed: 'sr-only',\n};\nconst HOST: Record<BfNavGroupForm, string> = {\n expanded: 'flex flex-col items-stretch gap-1',\n collapsed: 'flex flex-col items-center gap-1',\n};\n\n/**\n * A titled group of `a[bfNavItem]` links inside a `bf-sidebar`: `label` is shown as a small\n * heading above them and names the group (`role=\"group\"`) for screen readers, also while the\n * sidebar is collapsed and the heading is hidden.\n *\n * @example\n * <bf-nav-group label=\"Workspace\">\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\">Inbox</a>\n * <a bfNavItem routerLink=\"/projects\" routerLinkActive ariaCurrentWhenActive=\"page\">Projects</a>\n * </bf-nav-group>\n * @summary A titled group of sidebar links with a small heading that names it\n * @category Navigation\n * @since 0.3.1\n * @slot default The group's `a[bfNavItem]` links.\n */\n@Component({\n selector: 'bf-nav-group',\n host: { role: 'group', '[attr.aria-labelledby]': 'headingId', '[class]': 'hostClasses()' },\n template: `\n <span data-heading [id]=\"headingId\" [class]=\"headingClasses()\">{{ label() }}</span>\n <ng-content />\n `,\n})\nexport class BfNavGroupComponent {\n /** The group's heading and accessible name, such as \"Workspace\". */\n readonly label = input.required<string>();\n\n private readonly nav = inject(BF_NAV, { optional: true });\n\n /** The heading's id, referenced by the group's `aria-labelledby`. */\n protected readonly headingId = uniqueId('bf-nav-group');\n private readonly form = computed<BfNavGroupForm>(() =>\n this.nav?.collapsed() ? 'collapsed' : 'expanded',\n );\n readonly hostClasses = computed(() => HOST[this.form()]);\n protected readonly headingClasses = computed(() => HEADING[this.form()]);\n}\n","import {\n Component,\n DestroyRef,\n type ElementRef,\n HostAttributeToken,\n afterNextRender,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { BUTTON_CLASSES } from '../button/button.component';\nimport { BF_NAV, type BfNavLayout } from './nav.token';\n\n/* The consumer's <a> is the control. Neutral at rest and on hover (bf-button's ghost variant),\n one step darker while pressed (plain `active:`, a link is never `:enabled`), and the tonal fill\n for the current page from `aria-current=\"page\"` (bf-button's ghost CURRENT map, with its own\n hover and pressed steps and the forced-colours outline), so a nav item and an `a[bfButton]`\n ghost link never drift. `no-underline!` is important, so an unlayered global\n `a { text-decoration: underline }` cannot underline it. */\nconst BASE =\n 'relative flex items-center rounded-control font-bold no-underline! transition-colors duration-150 select-none ' +\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring ' +\n `${BUTTON_CLASSES.variant.ghost} active:bg-surface-pressed active:text-text ${BUTTON_CLASSES.current.ghost}`;\n\n/* Height steps 32/40/48 as a min-height: the item projects its label, so under a coarse pointer\n it grows to 44 px (`pointer-coarse:min-h-hit`) instead of extending an ::after over its\n neighbours (PROJECT_GUIDE hit areas). */\nconst HEIGHT: Record<BfSize, string> = {\n sm: 'min-h-8 gap-2 text-label-xs pointer-coarse:min-h-hit',\n md: 'min-h-10 gap-3 text-label-sm pointer-coarse:min-h-hit',\n lg: 'min-h-12 gap-3 text-label pointer-coarse:min-h-hit',\n};\nconst PADDING: Record<BfSize, string> = { sm: 'px-3', md: 'px-3', lg: 'px-4' };\n/* Collapsed (an icon rail): a square of the height step, the icon centred, no inline padding. */\nconst SQUARE: Record<BfSize, string> = {\n sm: 'w-8 px-0 pointer-coarse:min-w-hit',\n md: 'w-10 px-0 pointer-coarse:min-w-hit',\n lg: 'w-12 px-0 pointer-coarse:min-w-hit',\n};\n\n/* A full-width row in a sidebar, an inline item in a top nav, a centred square in a rail. */\ntype BfNavItemForm = BfNavLayout | 'collapsed';\nconst FORM: Record<BfNavItemForm, string> = {\n sidebar: 'w-full',\n top: 'shrink-0',\n collapsed: 'justify-center self-center',\n};\n\n/* The label truncates in a narrow sidebar; collapsed it stays in the DOM as screen-reader text,\n so the accessible name never changes. */\nconst LABEL: Record<BfNavItemForm, string> = {\n sidebar: 'min-w-0 flex-1 truncate text-start',\n top: 'min-w-0 truncate',\n collapsed: 'sr-only',\n};\n\n/* The count pill at the inline end; collapsed, a dot on the icon's inline-end corner. Both are\n aria-hidden: the sr-only announcement beside them carries the count. */\nconst BADGE: Record<'pill' | 'dot', string> = {\n pill: 'ms-auto 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',\n dot: 'absolute end-1.5 top-1.5 size-2 rounded-control bg-primary forced-colors:bg-[CanvasText]',\n};\n\n/**\n * One destination of a `bf-sidebar` or `bf-top-nav`: put `bfNavItem` on your own `<a>` with\n * `routerLink`, `routerLinkActive` and `ariaCurrentWhenActive=\"page\"`, and the item shows the\n * current page from `aria-current`. An icon goes in the `icon` slot, the label in the default\n * slot; `badge` adds a count. In a collapsed sidebar only the icon shows, the label stays for\n * screen readers and becomes the `title` tooltip.\n *\n * @example\n * <a bfNavItem routerLink=\"/inbox\" routerLinkActive ariaCurrentWhenActive=\"page\" [badge]=\"3\">\n * <bf-icon bfSlot=\"icon\" [icon]=\"Inbox\" />\n * Inbox\n * </a>\n * @summary Navigation link for a sidebar or top nav, with icon, label and count\n * @category Navigation\n * @since 0.3.1\n * @slot icon An icon before the label, a `bf-icon`; the only thing shown while collapsed.\n * @slot default The label.\n */\n@Component({\n selector: 'a[bfNavItem]',\n host: { '[class]': 'classes()', '[attr.title]': 'hoverTitle()' },\n template: `\n <span class=\"flex shrink-0 empty:hidden\"><ng-content select=\"[bfSlot=icon]\" /></span>\n <span #label data-label [class]=\"labelClasses()\"><ng-content /></span>\n @if (badge() !== null) {\n <span data-badge aria-hidden=\"true\" [class]=\"badgeClasses()\">{{\n collapsed() ? '' : badge()\n }}</span>\n <span class=\"sr-only\">{{ badgeAnnouncement() }}</span>\n }\n `,\n})\nexport class BfNavItemComponent {\n /** Height step: sm 32, md 40, lg 48 px (44 px at least under a coarse pointer); unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** A count shown as a pill at the inline end (a dot while collapsed), announced with\n * `provideBfLabels()`'s `navBadge(count)` (\"3 new\"); `null` shows none. */\n readonly badge = input<number | null>(null);\n\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly labels = inject(BF_LABELS);\n private readonly nav = inject(BF_NAV, { optional: true });\n /** The consumer's own `title`, kept while the item shows its label. */\n private readonly ownTitle = inject(new HostAttributeToken('title'), { optional: true });\n private readonly label = viewChild.required<ElementRef<HTMLElement>>('label');\n /** The projected label's text, for the collapsed `title`. */\n private readonly labelText = signal('');\n\n /** True while the enclosing sidebar is collapsed to an icon rail. */\n protected readonly collapsed = computed(() => this.nav?.collapsed() ?? false);\n private readonly form = computed<BfNavItemForm>(() =>\n this.collapsed() ? 'collapsed' : (this.nav?.layout ?? 'sidebar'),\n );\n /** The size in effect: `size`, else the app's `controlSize` default. */\n private readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n\n readonly classes = computed(() => {\n const size = this.resolvedSize();\n const form = this.form();\n return [\n BASE,\n HEIGHT[size],\n form === 'collapsed' ? SQUARE[size] : PADDING[size],\n FORM[form],\n ].join(' ');\n });\n protected readonly labelClasses = computed(() => LABEL[this.form()]);\n protected readonly badgeClasses = computed(() => BADGE[this.collapsed() ? 'dot' : 'pill']);\n /** The badge as screen readers hear it after the label. */\n protected readonly badgeAnnouncement = computed(() => {\n const badge = this.badge();\n return badge === null ? '' : this.labels.navBadge(badge);\n });\n /** Collapsed, the label as the pointer tooltip; else the consumer's own `title`, if any. */\n protected readonly hoverTitle = computed(() =>\n this.collapsed() && this.labelText() ? this.labelText() : this.ownTitle,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n // Browser only: read the projected label's text and follow later changes (a translated or\n // bound label), so the collapsed tooltip always names the item.\n afterNextRender(() => {\n const element = this.label().nativeElement;\n const sync = (): void => this.labelText.set(element.textContent?.trim() ?? '');\n sync();\n const observer = new MutationObserver(sync);\n observer.observe(element, { childList: true, subtree: true, characterData: true });\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n}\n","import {\n Component,\n ElementRef,\n afterNextRender,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { BF_LABELS } from '../../config/labels';\nimport { uniqueId } from '../_shared/unique-id';\n\n/**\n * The viewport width from which `bf-app-frame` shows its sidebar column instead of the narrow\n * header bar: Tailwind's `md` (768 px) or `lg` (1024 px).\n *\n * @summary The breakpoint where an app frame switches from its header bar to the sidebar\n * @since 0.3.2\n */\nexport type BfAppFrameBreakpoint = 'md' | 'lg';\n\n/**\n * The maximum width of `bf-app-frame`'s content column: `md` 48rem, `lg` 64rem, `xl` 80rem, or\n * `full` for no limit.\n *\n * @summary The maximum width of an app frame's content column, from medium to full\n * @since 0.3.2\n */\nexport type BfAppFrameContentWidth = 'md' | 'lg' | 'xl' | 'full';\n\n/* Per breakpoint: the sidebar column shows from it up (its `hidden` loses to the variant), the\n header bar only below it, and the content padding grows with it. Whole class names, so\n Tailwind finds them. */\nconst SIDEBAR: Record<BfAppFrameBreakpoint, string> = {\n md: 'hidden md:flex',\n lg: 'hidden lg:flex',\n};\nconst HEADER: Record<BfAppFrameBreakpoint, string> = {\n md: 'flex md:hidden',\n lg: 'flex lg:hidden',\n};\nconst PADDING: Record<BfAppFrameBreakpoint, string> = {\n md: 'p-4 md:p-8',\n lg: 'p-4 lg:p-8',\n};\n\nconst WIDTH: Record<BfAppFrameContentWidth, string> = {\n md: 'max-w-3xl',\n lg: 'max-w-5xl',\n xl: 'max-w-7xl',\n full: 'max-w-none',\n};\n\n/**\n * The frame of a desktop web app: a skip link, a sticky full-height sidebar column from the\n * breakpoint up, a header bar with the narrow-screen menu, the brand and actions below it, and\n * the `main` landmark with a content column of a set maximum width.\n *\n * @example\n * <bf-app-frame>\n * <bf-sidebar bfSlot=\"sidebar\" label=\"Main\">…</bf-sidebar>\n * <bf-menu-button bfSlot=\"menu\" [menu]=\"navMenu\">Sections</bf-menu-button>\n * <span bfSlot=\"brand\" class=\"text-heading\">Atlas</span>\n * <router-outlet />\n * </bf-app-frame>\n * @summary Desktop app frame with skip link, sticky sidebar, narrow header and main content\n * @category Navigation\n * @since 0.3.2\n * @slot sidebar The `bf-sidebar`, shown from the breakpoint up; it fills the column's height.\n * @slot brand The app's name or logo in the narrow header bar, after the menu.\n * @slot menu The narrow-screen navigation: a `bf-menu-button` of `a[bfMenuItem]` links, at the\n * header bar's inline start.\n * @slot actions End actions of the narrow header bar, such as the theme menu.\n * @slot default The page: what the router shows, inside the `main` landmark.\n */\n@Component({\n selector: 'bf-app-frame',\n host: { class: 'bg-bg text-text relative flex' },\n template: `\n <!-- The skip link focuses the content by script: under <base href=\"/\"> a bare \"#id\" link\n resolves against the base, so following it would load the root URL instead of moving\n focus. The href stays for its link semantics and a copied or middle-clicked URL. -->\n <a\n data-skip-link\n [href]=\"'#' + mainId()\"\n class=\"bg-surface text-text text-label-sm shadow-floating rounded-control focus-visible:ring-ring absolute start-4 top-4 z-50 px-4 py-2 font-bold not-focus:sr-only focus-visible:ring-4 focus-visible:outline-hidden\"\n (click)=\"skip($event)\"\n >{{ labels.skipToContent }}</a\n >\n <!-- From the breakpoint up the sidebar column sticks to the viewport at its full height (or\n the frame's, when a consumer gives it one); the bf-sidebar stretches to fill it and\n scrolls its own destinations. -->\n <div data-sidebar class=\"sticky top-0 h-dvh max-h-full shrink-0 {{ sidebarClasses() }}\">\n <ng-content select=\"[bfSlot=sidebar]\" />\n </div>\n <div data-column class=\"flex min-w-0 flex-1 flex-col\">\n <header\n data-bar\n class=\"bg-surface border-border sticky top-0 z-10 min-h-14 items-center gap-3 border-b px-4 py-2 {{\n headerClasses()\n }}\"\n >\n <!-- The menu at the inline start, then the brand: the top app bar convention, and the\n menu comes first in the tab order too. -->\n <div data-menu class=\"flex items-center empty:hidden\">\n <ng-content select=\"[bfSlot=menu]\" />\n </div>\n <div data-brand class=\"flex min-w-0 items-center empty:hidden\">\n <ng-content select=\"[bfSlot=brand]\" />\n </div>\n <div data-actions class=\"ms-auto flex items-center gap-2 empty:hidden\">\n <ng-content select=\"[bfSlot=actions]\" />\n </div>\n </header>\n <!-- A div with the main role rather than <main>: nested inside another page's main (a docs\n preview) it drops the role, so the document keeps exactly one main landmark. -->\n <div\n #main\n data-main\n [id]=\"mainId()\"\n tabindex=\"-1\"\n [attr.role]=\"nested() ? null : 'main'\"\n class=\"min-w-0 flex-1 outline-hidden {{ paddingClasses() }}\"\n >\n <div data-content class=\"mx-auto w-full {{ widthClasses() }}\">\n <ng-content />\n </div>\n </div>\n </div>\n `,\n})\nexport class BfAppFrameComponent {\n /** The viewport width from which the sidebar column replaces the narrow header bar. */\n readonly breakpoint = input<BfAppFrameBreakpoint>('md');\n /** The maximum width of the content column (`md` 48rem, `lg` 64rem, `xl` 80rem, `full`). */\n readonly contentWidth = input<BfAppFrameContentWidth>('xl');\n /** The id of the `main` landmark, the skip link's target; generated when left out. */\n readonly mainId = input(uniqueId('bf-app-frame-main'));\n\n protected readonly labels = inject(BF_LABELS);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly main = viewChild.required<ElementRef<HTMLElement>>('main');\n\n /** True when the frame sits inside another `main` landmark, so its own drops the role. */\n protected readonly nested = signal(false);\n\n protected readonly sidebarClasses = computed(() => SIDEBAR[this.breakpoint()]);\n protected readonly headerClasses = computed(() => HEADER[this.breakpoint()]);\n protected readonly paddingClasses = computed(() => PADDING[this.breakpoint()]);\n protected readonly widthClasses = computed(() => WIDTH[this.contentWidth()]);\n\n constructor() {\n // Browser only: an ancestor main landmark (a docs page around a demo) means this one is not\n // the page's main.\n afterNextRender({\n read: () =>\n this.nested.set(\n this.host.nativeElement.parentElement?.closest('main, [role=\"main\"]') != null,\n ),\n });\n }\n\n /**\n * Moves focus to the content without following the href (see the template comment).\n *\n * @internal\n * @param event The skip link's click (also fired by Enter).\n */\n skip(event: Event): void {\n event.preventDefault();\n this.main().nativeElement.focus();\n }\n}\n","import { Component, computed, input, numberAttribute } from '@angular/core';\n\n/**\n * The shape of a `bf-skeleton`: text lines, a rectangle (an image, a chart, a field) or a circle\n * (an avatar).\n *\n * @summary The three skeleton shapes, text lines, a rectangle or a circle\n * @since 0.3.1\n */\nexport type BfSkeletonShape = 'text' | 'rect' | 'circle';\n\n/* Every placeholder bar: the sunken surface with a shimmer, a soft `surface` highlight that sweeps\n across it on an ::after (from the inline start, the other way under rtl). Under reduced motion\n the highlight is hidden, so the bar stays still. Forced colours drop backgrounds, so a GrayText\n border draws the shape there. */\nconst BAR =\n 'relative overflow-hidden bg-surface-sunken ' +\n \"after:absolute after:inset-0 after:bg-linear-to-r after:from-transparent after:via-surface/70 after:to-transparent after:content-[''] \" +\n 'after:animate-skeleton-shimmer rtl:after:animate-skeleton-shimmer-rtl motion-reduce:after:hidden ' +\n 'forced-colors:border forced-colors:border-[GrayText]';\n\n/* The host per shape. `text` is a column of lines; `rect` is one bar 6rem tall unless `height`\n says otherwise; `circle` is a 40 px disc unless `width` says otherwise (its height follows). The\n `--bf-skeleton-height` custom property carries `height`. */\nconst HOST: Record<BfSkeletonShape, string> = {\n text: 'flex flex-col gap-2',\n rect: `${BAR} block h-[var(--bf-skeleton-height,6rem)] rounded-field`,\n circle: `${BAR} inline-block size-10 shrink-0 rounded-full`,\n};\n\n/* One line of `text`: 12 px tall unless `height` says otherwise, fully round. The last of several\n lines is shorter, as a paragraph's last line is. */\nconst LINE = `${BAR} block h-[var(--bf-skeleton-height,0.75rem)] w-full rounded-full`;\nconst LAST_LINE = `${BAR} block h-[var(--bf-skeleton-height,0.75rem)] w-3/5 rounded-full`;\n\n/**\n * Loading placeholder in the shape of the content to come: text lines, a rectangle or a circle,\n * on the sunken surface with a shimmer. It is hidden from assistive technology; mark the region it\n * stands in for with `aria-busy=\"true\"` while it loads.\n *\n * @example\n * <div aria-busy=\"true\">\n * <bf-skeleton shape=\"circle\" />\n * <bf-skeleton [lines]=\"3\" />\n * <bf-skeleton shape=\"rect\" height=\"8rem\" />\n * </div>\n * @summary Loading placeholder shaped as text lines, a rectangle or a circle, with a shimmer\n * @category Feedback\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-skeleton',\n host: {\n 'aria-hidden': 'true',\n '[class]': 'hostClasses()',\n '[style.width]': 'width() || null',\n '[style.height]': \"shape() === 'circle' ? width() || null : null\",\n '[style.--bf-skeleton-height]': 'height() || null',\n },\n template: `\n @if (shape() === 'text') {\n @for (n of lineList(); track n; let last = $last) {\n <span data-bf-skeleton-line [class]=\"last && n > 1 ? lastLineClasses : lineClasses\"></span>\n }\n }\n `,\n})\nexport class BfSkeletonComponent {\n /** What it stands in for: `text` lines (default), a `rect` (an image, a chart) or a `circle`\n * (an avatar). */\n readonly shape = input<BfSkeletonShape>('text');\n /** How many lines a `text` skeleton draws, the last one shorter when there are several;\n * ignored by the other shapes. */\n readonly lines = input(1, { transform: numberAttribute });\n /** Width as a CSS length (`12rem`, `60%`); empty fills the container, a circle is 40 px. A\n * circle's height follows its width. */\n readonly width = input('');\n /** Height as a CSS length: of each line of `text` (default `0.75rem`) or of the `rect`\n * (default `6rem`); a circle ignores it. */\n readonly height = input('');\n\n protected readonly lineClasses = LINE;\n protected readonly lastLineClasses = LAST_LINE;\n\n /** The line numbers 1…n of a text skeleton; `lines` below 1 draws one. */\n protected readonly lineList = computed(() => {\n const count = Math.max(1, Math.floor(this.lines()) || 1);\n return Array.from({ length: count }, (_, i) => i + 1);\n });\n\n protected readonly hostClasses = computed(() => HOST[this.shape()]);\n}\n","import {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n} from '@angular/core';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { PILL_HIT } from '../_shared/hit-classes';\nimport { BUTTON_CLASSES } from '../button/button.component';\nimport { ICON_BUTTON_CLASSES } from '../icon-button/icon-button.component';\n\n/** One slot of the page row: a page number, or a gap before or after the current page's run. */\ntype BfPaginationItem = number | 'gap-start' | 'gap-end';\n\n/** The inclusive range from `from` to `to`, empty when `to` is below `from`. */\nfunction range(from: number, to: number): number[] {\n return to < from ? [] : Array.from({ length: to - from + 1 }, (_, i) => from + i);\n}\n\n/**\n * The page row: the first and the last page, the current one with `siblings` on each side, and a\n * gap for every run of hidden pages. A gap that would hide a single page shows that page instead,\n * so the row keeps the same number of slots (`2 × siblings + 5`) wherever the current page is.\n */\nfunction pageItems(page: number, count: number, siblings: number): BfPaginationItem[] {\n const start = Math.max(Math.min(page - siblings, count - siblings * 2 - 2), 3);\n const end = Math.min(Math.max(page + siblings, siblings * 2 + 3), count - 2);\n return [\n 1,\n ...(start > 3 ? ['gap-start' as const] : count > 2 ? [2] : []),\n ...range(start, end),\n ...(end < count - 2 ? ['gap-end' as const] : count - 1 > 2 ? [count - 1] : []),\n ...(count > 1 ? [count] : []),\n ];\n}\n\n/* The previous / next buttons: the text bf-icon-button (a square 32/40/48 px box) with a CSS\n chevron. At the first or last page the button stays focusable (`aria-disabled`, never native\n `disabled`, so focus is not dropped to <body> when Next reaches the last page) and only greys\n out: the hover and pressed fills are left off, and the `aria-disabled:` cursor beats the base\n `cursor-pointer`. */\ntype BfPaginationArrowState = 'enabled' | 'disabled';\nconst ARROW_STATE: Record<BfPaginationArrowState, string> = {\n enabled: `${ICON_BUTTON_CLASSES.variant.text} ${ICON_BUTTON_CLASSES.pressed.text}`,\n disabled: 'bg-transparent text-text-disabled aria-disabled:cursor-not-allowed',\n};\n\n/* The chevron: two 1.5 px borders of an 8 px box turned 45°, in the button's text colour (no icon\n import). Previous points to the inline start, next to the inline end; both mirror under rtl. The\n nudge centres the turned box optically. */\ntype BfPaginationDirection = 'previous' | 'next';\nconst CHEVRON_BASE = 'block size-2 border-t-[1.5px] border-r-[1.5px] border-current';\nconst CHEVRON: Record<BfPaginationDirection, string> = {\n previous: `${CHEVRON_BASE} translate-x-0.5 -rotate-135 rtl:-translate-x-0.5 rtl:rotate-45`,\n next: `${CHEVRON_BASE} -translate-x-0.5 rotate-45 rtl:translate-x-0.5 rtl:-rotate-135`,\n};\n\n/* A page button: the ghost bf-button's look on the icon button's box, at least as wide as it is\n tall (32/40/48 px) and growing for long numbers. The current page (`aria-current=\"page\"`) takes\n the tonal fill, as a current `a[bfButton]` ghost link does, with an outline under forced\n colours. */\nconst PAGE_SIZE: Record<BfSize, string> = {\n sm: 'h-8 min-w-8 px-1.5 text-label-xs',\n md: 'h-10 min-w-10 px-2 text-label-sm',\n lg: 'h-12 min-w-12 px-2.5 text-label',\n};\nconst PAGE =\n `${ICON_BUTTON_CLASSES.base} font-bold tabular-nums ` +\n `${BUTTON_CLASSES.variant.ghost} ${BUTTON_CLASSES.pressed.ghost} ${BUTTON_CLASSES.current.ghost}`;\n\n/* The gap between page runs: an ellipsis in a page-sized box, never announced. */\nconst GAP_SIZE: Record<BfSize, string> = {\n sm: 'h-8 min-w-8 text-label-xs',\n md: 'h-10 min-w-10 text-label-sm',\n lg: 'h-12 min-w-12 text-label',\n};\nconst GAP = 'inline-flex items-center justify-center font-bold text-text-muted select-none';\n\n/* The compact position text between the arrows (\"Page 3 of 12\"). */\nconst STATUS_SIZE: Record<BfSize, string> = {\n sm: 'text-label-xs',\n md: 'text-label-sm',\n lg: 'text-label',\n};\nconst STATUS = 'px-2 font-bold whitespace-nowrap text-text-muted tabular-nums';\n\n/**\n * Page navigation for a long list or table: Previous and Next buttons around the page numbers,\n * the current one marked, the hidden runs shown as an ellipsis. `compact` shows \"Page 3 of 12\"\n * between the arrows instead, for narrow screens. The page count comes from `pageCount`, or from\n * `total` and `pageSize`; the consumer shows the rows of `page`.\n *\n * @example\n * <bf-pagination [(page)]=\"page\" [pageCount]=\"12\" />\n * <bf-pagination [(page)]=\"page\" [total]=\"invoices().length\" [pageSize]=\"10\" compact />\n * @summary Previous, next and numbered page buttons for a long list or table\n * @category Navigation\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-pagination',\n host: { class: 'block' },\n template: `\n <nav\n [attr.aria-label]=\"name()\"\n [attr.data-bf-page]=\"current()\"\n [attr.data-bf-page-count]=\"count()\"\n >\n <ul class=\"flex flex-wrap items-center gap-x-1 gap-y-2\">\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-previous\n [attr.aria-label]=\"labels.previousPage\"\n [attr.aria-disabled]=\"current() <= 1 ? 'true' : null\"\n [class]=\"arrowClasses(current() <= 1)\"\n (click)=\"go(current() - 1)\"\n >\n <span aria-hidden=\"true\" [class]=\"chevron.previous\"></span>\n </button>\n </li>\n @if (compact()) {\n <li [class]=\"statusClasses()\">\n <span aria-live=\"polite\">{{ labels.pageOf(current(), count()) }}</span>\n </li>\n } @else {\n @for (item of items(); track item) {\n @if (item === 'gap-start' || item === 'gap-end') {\n <li aria-hidden=\"true\" data-bf-pagination-gap [class]=\"gapClasses()\">…</li>\n } @else {\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-page\n [attr.aria-label]=\"labels.goToPage(item)\"\n [attr.aria-current]=\"item === current() ? 'page' : null\"\n [class]=\"pageClasses()\"\n (click)=\"go(item)\"\n >\n {{ item }}\n </button>\n </li>\n }\n }\n }\n <li class=\"inline-flex\">\n <button\n type=\"button\"\n data-bf-pagination-next\n [attr.aria-label]=\"labels.nextPage\"\n [attr.aria-disabled]=\"current() >= count() ? 'true' : null\"\n [class]=\"arrowClasses(current() >= count())\"\n (click)=\"go(current() + 1)\"\n >\n <span aria-hidden=\"true\" [class]=\"chevron.next\"></span>\n </button>\n </li>\n </ul>\n </nav>\n `,\n})\nexport class BfPaginationComponent {\n /** The current page, 1-based; two-way bindable. The buttons set it; show the rows of this page. */\n readonly page = model(1);\n /** The number of pages; wins over `total` and `pageSize` when above 0. */\n readonly pageCount = input(0, { transform: numberAttribute });\n /** The number of items, used with `pageSize` while `pageCount` is 0. */\n readonly total = input(0, { transform: numberAttribute });\n /** Items per page, used with `total` while `pageCount` is 0. */\n readonly pageSize = input(10, { transform: numberAttribute });\n /** How many pages to show on each side of the current one. */\n readonly siblings = input(1, { transform: numberAttribute });\n /** Shows \"Page 3 of 12\" between the arrows instead of the page buttons, for narrow screens. */\n readonly compact = input(false, { transform: booleanAttribute });\n /** Button height step: sm 32, md 40, lg 48 px (44 px hit area under a coarse pointer); unset\n * follows `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Accessible name of the navigation; empty falls back to `provideBfLabels()`'s `pagination`\n * (\"Pagination\"). */\n readonly label = input('');\n\n protected readonly labels = inject(BF_LABELS);\n private readonly defaults = inject(BF_DEFAULTS);\n\n /** The size in effect: `size`, else the app's `controlSize` default. */\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The navigation's name: `label`, else the `pagination` label. */\n protected readonly name = computed(() => this.label() || this.labels.pagination);\n /** The page count in effect, at least 1: `pageCount`, else `total` over `pageSize`. */\n protected readonly count = computed(() => {\n const pageCount = Math.floor(this.pageCount());\n if (pageCount > 0) {\n return pageCount;\n }\n const pageSize = this.pageSize();\n const total = this.total();\n return pageSize > 0 && total > 0 ? Math.ceil(total / pageSize) : 1;\n });\n /** The page shown as current: `page`, clamped to 1…count. */\n protected readonly current = computed(() =>\n Math.min(Math.max(1, Math.floor(this.page()) || 1), this.count()),\n );\n protected readonly items = computed(() =>\n pageItems(this.current(), this.count(), Math.max(0, Math.floor(this.siblings()) || 0)),\n );\n protected readonly chevron = CHEVRON;\n protected readonly pageClasses = computed(() => {\n const size = this.resolvedSize();\n return `${PAGE} ${PAGE_SIZE[size]} ${PILL_HIT[size].plain}`;\n });\n protected readonly gapClasses = computed(() => `${GAP} ${GAP_SIZE[this.resolvedSize()]}`);\n protected readonly statusClasses = computed(\n () => `${STATUS} ${STATUS_SIZE[this.resolvedSize()]}`,\n );\n\n /**\n * The classes of the previous or next button.\n * @internal\n */\n arrowClasses(disabled: boolean): string {\n const size = this.resolvedSize();\n const state: BfPaginationArrowState = disabled ? 'disabled' : 'enabled';\n return [\n ICON_BUTTON_CLASSES.base,\n ICON_BUTTON_CLASSES.size[size],\n ARROW_STATE[state],\n PILL_HIT[size].plain,\n ].join(' ');\n }\n\n /**\n * Goes to a page: sets `page` when it is another page within 1…count; else does nothing.\n * @param target The 1-based page to go to.\n */\n go(target: number): void {\n if (target < 1 || target > this.count() || target === this.current()) {\n return;\n }\n this.page.set(target);\n }\n}\n","/*\n * Plain-date arithmetic for bf-calendar (and the date inputs built on it). A date is an ISO\n * string 'YYYY-MM-DD' and a month 'YYYY-MM', never a Date with a time of day, so no time zone or\n * daylight-saving shift can move a day. The arithmetic goes through UTC day numbers; a Date is\n * only built (at UTC midnight) to hand to Intl.DateTimeFormat with `timeZone: 'UTC'`. Years\n * 1–9999 only, so every string compares in calendar order.\n */\n\n/** One plain date's parts; `month` is 1–12. */\nexport interface CalendarDate {\n readonly year: number;\n readonly month: number;\n readonly day: number;\n}\n\n/** One calendar month's parts; `month` is 1–12. */\nexport interface CalendarMonth {\n readonly year: number;\n readonly month: number;\n}\n\nconst DAY_MS = 86_400_000;\nconst ISO_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst ISO_MONTH = /^(\\d{4})-(\\d{2})$/;\n\nfunction pad(value: number, length: number): string {\n return String(value).padStart(length, '0');\n}\n\n/** The number of days in `month` (1–12) of `year`, leap years included. */\nexport function daysInMonth(year: number, month: number): number {\n return month === 2\n ? (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n ? 29\n : 28\n : [4, 6, 9, 11].includes(month)\n ? 30\n : 31;\n}\n\n/** The parts of an ISO date 'YYYY-MM-DD', or `null` for anything else (a wrong day, a time). */\nexport function parseIsoDate(value: string | null | undefined): CalendarDate | null {\n const match = ISO_DATE.exec(value ?? '');\n if (!match) {\n return null;\n }\n const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];\n if (year < 1 || month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) {\n return null;\n }\n return { year, month, day };\n}\n\n/** The parts of an ISO month 'YYYY-MM', or `null` for anything else. */\nexport function parseIsoMonth(value: string | null | undefined): CalendarMonth | null {\n const match = ISO_MONTH.exec(value ?? '');\n if (!match) {\n return null;\n }\n const [year, month] = [Number(match[1]), Number(match[2])];\n return year >= 1 && month >= 1 && month <= 12 ? { year, month } : null;\n}\n\n/** The ISO date of the parts: '2026-03-07'. */\nexport function formatIsoDate({ year, month, day }: CalendarDate): string {\n return `${pad(year, 4)}-${pad(month, 2)}-${pad(day, 2)}`;\n}\n\n/** The ISO month of the parts: '2026-03'. */\nexport function formatIsoMonth({ year, month }: CalendarMonth): string {\n return `${pad(year, 4)}-${pad(month, 2)}`;\n}\n\n/** `iso` itself when it is a valid ISO date, else `null`. */\nexport function validIsoDate(iso: string | null | undefined): string | null {\n return parseIsoDate(iso) ? (iso ?? null) : null;\n}\n\n/** The month 'YYYY-MM' an ISO date falls in. */\nexport function isoMonthOf(iso: string): string {\n return iso.slice(0, 7);\n}\n\n/** The first day of an ISO month. */\nexport function firstOfMonth(isoMonth: string): string {\n return `${isoMonth}-01`;\n}\n\n/** The last day of an ISO month. */\nexport function lastOfMonth(isoMonth: string): string {\n const parts = parseIsoMonth(isoMonth);\n return parts ? `${isoMonth}-${pad(daysInMonth(parts.year, parts.month), 2)}` : `${isoMonth}-01`;\n}\n\n/** A Date at UTC midnight of the parts, for Intl.DateTimeFormat with `timeZone: 'UTC'`. */\nexport function toUtcDate({ year, month, day }: CalendarDate): Date {\n const date = new Date(0);\n // setUTCFullYear, not Date.UTC: Date.UTC maps the years 0–99 to 1900–1999.\n date.setUTCFullYear(year, month - 1, day);\n return date;\n}\n\nfunction dayNumber(date: CalendarDate): number {\n return Math.round(toUtcDate(date).getTime() / DAY_MS);\n}\n\nfunction fromDayNumber(days: number): CalendarDate {\n const date = new Date(days * DAY_MS);\n return { year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate() };\n}\n\n/** Keeps a year inside 1–9999, so a result always formats as a four-digit ISO year. */\nfunction inYearRange(date: CalendarDate): CalendarDate {\n if (date.year < 1) {\n return { year: 1, month: 1, day: 1 };\n }\n return date.year > 9999 ? { year: 9999, month: 12, day: 31 } : date;\n}\n\n/** `iso` moved by `days` (negative goes back); an invalid `iso` is returned as it is. */\nexport function addDays(iso: string, days: number): string {\n const parts = parseIsoDate(iso);\n return parts ? formatIsoDate(inYearRange(fromDayNumber(dayNumber(parts) + days))) : iso;\n}\n\n/** `iso` moved by `months`, the day clamped to the target month's length (Jan 31 + 1 → Feb 28). */\nexport function addMonths(iso: string, months: number): string {\n const parts = parseIsoDate(iso);\n if (!parts) {\n return iso;\n }\n const index = parts.year * 12 + (parts.month - 1) + months;\n const year = Math.floor(index / 12);\n const month = index - year * 12 + 1;\n return formatIsoDate(\n inYearRange({ year, month, day: Math.min(parts.day, daysInMonth(year, month)) }),\n );\n}\n\n/** `iso` moved by `years`, Feb 29 clamped to Feb 28 in a common year. */\nexport function addYears(iso: string, years: number): string {\n return addMonths(iso, years * 12);\n}\n\n/** An ISO month moved by `months`. */\nexport function addIsoMonths(isoMonth: string, months: number): string {\n return isoMonthOf(addMonths(firstOfMonth(isoMonth), months));\n}\n\n/** The weekday of an ISO date: 0 Sunday … 6 Saturday, as `Date.getDay()` counts. */\nexport function weekdayOf(iso: string): number {\n const parts = parseIsoDate(iso);\n return parts ? toUtcDate(parts).getUTCDay() : 0;\n}\n\n/** The first day of the week `iso` is in, for weeks starting on `firstDay` (0 Sunday … 6). */\nexport function startOfWeek(iso: string, firstDay: number): string {\n return addDays(iso, -((weekdayOf(iso) - firstDay + 7) % 7));\n}\n\n/** The last day of the week `iso` is in, for weeks starting on `firstDay`. */\nexport function endOfWeek(iso: string, firstDay: number): string {\n return addDays(startOfWeek(iso, firstDay), 6);\n}\n\n/**\n * The weeks of a month as rows of seven ISO dates from `firstDay` on, `null` for the days of the\n * neighbouring months: four to six rows.\n */\nexport function monthWeeks(isoMonth: string, firstDay: number): (string | null)[][] {\n const parts = parseIsoMonth(isoMonth);\n if (!parts) {\n return [];\n }\n const lead = (weekdayOf(firstOfMonth(isoMonth)) - firstDay + 7) % 7;\n const length = daysInMonth(parts.year, parts.month);\n const cells: (string | null)[] = [\n ...Array.from({ length: lead }, () => null),\n ...Array.from({ length }, (_, i) => formatIsoDate({ ...parts, day: i + 1 })),\n ];\n while (cells.length % 7 !== 0) {\n cells.push(null);\n }\n return Array.from({ length: cells.length / 7 }, (_, row) => cells.slice(row * 7, row * 7 + 7));\n}\n\n/** -1, 0 or 1 as ISO date (or month) `a` falls before, on or after `b`. */\nexport function compareIso(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/** `iso` kept inside `min`…`max` (either bound may be missing). */\nexport function clampIso(iso: string, min: string | null, max: string | null): string {\n if (min && compareIso(iso, min) < 0) {\n return min;\n }\n return max && compareIso(iso, max) > 0 ? max : iso;\n}\n\n/** The device's local calendar date of `now` (the day the user sees on their clock). */\nexport function localIsoDate(now: Date = new Date()): string {\n return formatIsoDate({ year: now.getFullYear(), month: now.getMonth() + 1, day: now.getDate() });\n}\n","import {\n Component,\n DOCUMENT,\n type ElementRef,\n Injector,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { type FormValueControl, type ValidationError } from '@angular/forms/signals';\nimport { BF_DEFAULTS } from '../../config/defaults';\nimport { BF_LABELS } from '../../config/labels';\nimport { type BfSize } from '../../config/size';\nimport { fieldErrorText, fieldShowsError } from '../_shared/field-state';\nimport { heldMessage } from '../_shared/pointer-hold';\nimport { uniqueId } from '../_shared/unique-id';\nimport {\n addDays,\n addIsoMonths,\n addMonths,\n addYears,\n clampIso,\n compareIso,\n endOfWeek,\n firstOfMonth,\n isoMonthOf,\n lastOfMonth,\n localIsoDate,\n monthWeeks,\n parseIsoDate,\n parseIsoMonth,\n startOfWeek,\n toUtcDate,\n validIsoDate,\n} from './calendar-date';\n\n/**\n * A weekday as `Date.getDay()` counts it: 0 Sunday, 1 Monday … 6 Saturday.\n *\n * @summary A weekday number from 0 for Sunday to 6 for Saturday, as Date counts\n * @since 0.3.1\n */\nexport type BfCalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n/**\n * Tells `bf-calendar` which dates cannot be picked, such as weekends or booked days.\n *\n * @summary A function that marks an ISO date as not pickable in a calendar\n * @since 0.3.1\n */\nexport type BfCalendarDisabledDate = (iso: string) => boolean;\n\n/** The day grid, or one of the two jump views the title button opens. */\ntype CalendarView = 'day' | 'month' | 'year';\n\n/** One cell of a calendar grid, as the template renders it. */\ninterface CalendarCell {\n /** The ISO date, month or year the cell stands for. */\n readonly key: string;\n /** The visible text. */\n readonly text: string;\n /** The accessible name, when the visible text alone is too short. */\n readonly name: string | null;\n readonly disabled: boolean;\n readonly selected: boolean;\n readonly current: boolean;\n readonly tabStop: boolean;\n}\n\n/** One weekday column header: the short name shown, the full name in `abbr`. */\ninterface CalendarWeekday {\n readonly short: string;\n readonly long: string;\n}\n\n/* The calendar's width is seven day columns, so the header and the month and year views line up\n with the day grid; max-w-full lets it shrink in a narrow column (the columns get narrower, the\n rows keep their height). Under a coarse pointer every day cell is 44 px (the hit area). */\nconst FRAME_SIZE: Record<BfSize, string> = {\n sm: 'w-56 pointer-coarse:w-77',\n md: 'w-70 pointer-coarse:w-77',\n lg: 'w-84',\n};\n/* The body holds the weekday row (2rem) and six week rows, whatever the month, so the calendar\n keeps its height when a month has four or five weeks (a popover around it never jumps), and the\n month and year views fill the same box. */\nconst BODY_SIZE: Record<BfSize, string> = {\n sm: 'h-56 pointer-coarse:h-74',\n md: 'h-68 pointer-coarse:h-74',\n lg: 'h-80',\n};\n/* A cell's height, which is its hit area: 32/40/48, at least 44 px under a coarse pointer. */\nconst CELL_SIZE: Record<BfSize, string> = {\n sm: 'h-8 pointer-coarse:h-hit',\n md: 'h-10 pointer-coarse:h-hit',\n lg: 'h-12',\n};\n/* The round mark inside a day cell (the visible box); it keeps the step's size under a coarse\n pointer, the cell around it grows. */\nconst DAY_MARK_SIZE: Record<BfSize, string> = {\n sm: 'size-8 text-label-xs',\n md: 'size-10 text-label-sm',\n lg: 'size-12 text-label',\n};\n/* The pill inside a month or year cell: the cell's width, the day mark's height. */\nconst PICK_MARK_SIZE: Record<BfSize, string> = {\n sm: 'h-8 w-full text-label-xs',\n md: 'h-10 w-full text-label-sm',\n lg: 'h-12 w-full text-label',\n};\n/* The previous/next buttons: square, the step's size, 44 px under a coarse pointer. */\nconst NAV_SIZE: Record<BfSize, string> = {\n sm: 'size-8 pointer-coarse:size-hit',\n md: 'size-10 pointer-coarse:size-hit',\n lg: 'size-12',\n};\nconst TITLE_SIZE: Record<BfSize, string> = {\n sm: 'h-8 px-2 text-label-sm pointer-coarse:h-hit',\n md: 'h-10 px-3 text-label pointer-coarse:h-hit',\n lg: 'h-12 px-3 text-label',\n};\n\nconst BUTTON_FOCUS =\n 'focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring disabled:cursor-not-allowed disabled:text-text-disabled';\n/* Hover and press tints apply only while enabled; an aria-disabled previous/next button (the\n month past `min` or `max`) keeps its focus but shows no tint and the not-allowed cursor. */\nconst NAV_BASE =\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-control text-text-muted transition-colors duration-150 select-none ' +\n 'not-aria-disabled:enabled:hover:bg-surface-muted not-aria-disabled:enabled:hover:text-text not-aria-disabled:enabled:active:bg-surface-pressed ' +\n `aria-disabled:cursor-not-allowed aria-disabled:text-text-disabled ${BUTTON_FOCUS}`;\n/* CSS chevrons (two borders of a rotated square) pointing along the inline axis, mirrored under\n dir=\"rtl\" so \"previous\" always points to where the earlier month sits. */\nconst CHEVRON =\n \"before:size-2 before:border-t-[1.5px] before:border-r-[1.5px] before:border-current before:content-['']\";\nconst CHEVRON_DIRECTION: Record<'previous' | 'next', string> = {\n previous:\n 'before:translate-x-0.5 before:-rotate-135 rtl:before:-translate-x-0.5 rtl:before:rotate-45',\n next: 'before:-translate-x-0.5 before:rotate-45 rtl:before:translate-x-0.5 rtl:before:-rotate-135',\n};\nconst TITLE_BASE =\n 'relative inline-flex min-w-0 items-center gap-2 rounded-control font-bold text-text transition-colors duration-150 select-none';\nconst TITLE_BUTTON =\n `cursor-pointer enabled:hover:bg-surface-muted enabled:active:bg-surface-pressed ${BUTTON_FOCUS} ` +\n \"after:size-1.5 after:shrink-0 after:border-r-[1.5px] after:border-b-[1.5px] after:border-current after:content-['']\";\n/* The title button's caret points down in the day view (it opens a list) and up in the month\n view (the view it opened). */\nconst TITLE_CARET: Record<'closed' | 'open', string> = {\n closed: 'after:-translate-y-0.5 after:rotate-45',\n open: 'after:translate-y-0.5 after:-rotate-135',\n};\n\n/* Cells: the <td> is the focusable gridcell and the hit area; the mark inside it is the visual.\n The focus ring is drawn on the mark (group-focus-visible), the td's own outline stays hidden,\n which Tailwind turns into a transparent outline that forced colours paint. */\nconst CELL_BASE = 'group p-0 text-center align-middle outline-hidden select-none';\nconst MARK_BASE =\n 'inline-flex max-w-full items-center justify-center rounded-control tabular-nums transition-colors duration-150 group-focus-visible:ring-4 group-focus-visible:ring-ring';\ntype CalendarCellState = 'plain' | 'current' | 'selected' | 'disabled' | 'disabledSelected';\n/* Selected: the primary fill (under forced colours the system Highlight pair, painted by the mark\n itself). Today (`current`): a 1.5 px inset primary-strong ring and bold text, so it never rests\n on colour alone. Disabled: text-disabled; a disabled selected date keeps a muted pill. */\nconst MARK_STATE: Record<CalendarCellState, string> = {\n plain: 'text-text',\n current:\n 'font-bold text-text inset-ring-[1.5px] inset-ring-primary-strong forced-colors:inset-ring-[CanvasText]',\n selected:\n 'bg-primary font-bold text-on-primary forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:forced-color-adjust-none',\n disabled: 'text-text-disabled',\n disabledSelected:\n 'bg-surface-sunken text-text-disabled inset-ring-[1.5px] inset-ring-text-disabled forced-colors:inset-ring-[GrayText]',\n};\n/* Pointer affordance per cell: an editable, pickable cell shows a pointer and hover and press\n tints (the selected one darker primary steps); read-only shows the default cursor and no tint;\n a disabled date the not-allowed cursor. */\ntype CalendarCellMode = 'pickable' | 'readonly' | 'disabled';\nconst CELL_MODE: Record<CalendarCellMode, string> = {\n pickable: 'cursor-pointer',\n readonly: 'cursor-default',\n disabled: 'cursor-not-allowed',\n};\nconst MARK_HOVER: Record<'plain' | 'selected', string> = {\n plain: 'group-hover:bg-surface-muted group-active:bg-surface-pressed',\n selected:\n 'not-forced-colors:group-hover:bg-primary-hover not-forced-colors:group-active:bg-primary-pressed',\n};\nconst WEEKDAY = 'h-8 p-0 text-center align-middle text-label-xs font-normal text-text-muted';\n/* Only the year view scrolls (its list is longer than the box); its 4 px block padding keeps the\n focus ring of the first and last row inside the clip. The day and month views fit the box and\n never clip a focus ring. */\nconst BODY_SCROLL: Record<'scroll' | 'fixed', string> = {\n scroll: 'overflow-y-auto py-1',\n fixed: '',\n};\n/* The error state outlines the body in `danger-border`, like the other fields' borders. */\nconst BODY_OUTLINE: Record<'error' | 'none', string> = {\n error: 'rounded-card ring-[1.5px] ring-danger-border',\n none: '',\n};\n\n/** How many years the year view lists before and after the shown one without `min`/`max`. */\nconst YEAR_SPAN = 100;\n\n/**\n * The first weekday of `locale` from its week info (`getWeekInfo()`, or the older `weekInfo`\n * property), as `Date.getDay()` counts it; `undefined` where the runtime has neither.\n */\nfunction localeFirstDay(locale: string): number | undefined {\n // Neither member is in the ES2022 typings yet, so both are read through Reflect.\n const tag = new Intl.Locale(locale);\n const getWeekInfo: unknown = Reflect.get(tag, 'getWeekInfo');\n const info: unknown =\n typeof getWeekInfo === 'function'\n ? Reflect.apply(getWeekInfo, tag, [])\n : Reflect.get(tag, 'weekInfo');\n if (typeof info === 'object' && info !== null && 'firstDay' in info) {\n return typeof info.firstDay === 'number' ? info.firstDay % 7 : undefined;\n }\n return undefined;\n}\n\n/** `locale` when the runtime accepts the tag, else `null`. */\nfunction supportedLocale(locale: string): string | null {\n try {\n return locale ? new Intl.Locale(locale).toString() : null;\n } catch {\n return null;\n }\n}\n\nfunction formatter(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n return new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' });\n}\n\n/** Formats an ISO date (or the first day of an ISO month or of a year) with `format`. */\nfunction formatIso(format: Intl.DateTimeFormat, iso: string): string {\n const parts = parseIsoDate(\n iso.length === 4 ? `${iso}-01-01` : iso.length === 7 ? `${iso}-01` : iso,\n );\n return parts ? format.format(toUtcDate(parts)) : iso;\n}\n\nfunction rows<T>(items: readonly T[], size: number): T[][] {\n return Array.from({ length: Math.ceil(items.length / size) }, (_, i) =>\n items.slice(i * size, i * size + size),\n );\n}\n\n/**\n * Inline month calendar for picking one date, an ARIA grid with full keyboard support. The value\n * is a plain ISO date string ('YYYY-MM-DD', never a Date with a time zone) or `null`; month and\n * weekday names come from `Intl` in the calendar's `locale`; implements the Signal Forms value\n * contract.\n *\n * @example\n * <bf-calendar label=\"Due date\" min=\"2026-01-01\" [(value)]=\"due\" />\n * @summary Inline month calendar for picking one date, with month and year jumps\n * @category Forms\n * @since 0.3.1\n */\n@Component({\n selector: 'bf-calendar',\n host: {\n class: 'inline-flex max-w-full flex-col items-start gap-1.5',\n '[attr.id]': 'null',\n },\n template: `\n <div\n #root\n role=\"group\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabelAttr()\"\n [attr.aria-labelledby]=\"ariaLabelledbyAttr()\"\n [attr.aria-describedby]=\"errorId()\"\n [class]=\"frameClasses()\"\n (keydown)=\"onKeydown($event)\"\n (focusout)=\"onFocusout($event)\"\n >\n <div class=\"flex items-center gap-1\">\n @if (view() === 'year') {\n <span [class]=\"titleClasses()\">\n <span [id]=\"titleId()\" class=\"truncate\">{{ title() }}</span>\n </span>\n } @else {\n <button\n type=\"button\"\n data-bf-calendar-title\n [disabled]=\"disabled()\"\n [class]=\"titleClasses()\"\n (click)=\"openNextView()\"\n >\n <span [id]=\"titleId()\" class=\"truncate\">{{ title() }}</span>\n <span class=\"sr-only\">, {{ titleAction() }}</span>\n </button>\n }\n @if (view() === 'day') {\n <span class=\"flex-1\"></span>\n <button\n type=\"button\"\n data-bf-calendar-previous\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"atStart() ? 'true' : null\"\n [attr.aria-label]=\"labels.calendarPreviousMonth\"\n [class]=\"navClasses('previous')\"\n (click)=\"showMonth(-1)\"\n ></button>\n <button\n type=\"button\"\n data-bf-calendar-next\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"atEnd() ? 'true' : null\"\n [attr.aria-label]=\"labels.calendarNextMonth\"\n [class]=\"navClasses('next')\"\n (click)=\"showMonth(1)\"\n ></button>\n }\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">{{ monthTitle() }}</p>\n <div [class]=\"bodyClasses()\">\n @switch (view()) {\n @case ('day') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"day\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"showError() ? 'true' : null\"\n [attr.aria-errormessage]=\"showError() ? errorId() : null\"\n (keydown)=\"onDayKeydown($event)\"\n >\n <thead>\n <tr>\n @for (weekday of weekdays(); track $index) {\n <th scope=\"col\" [attr.abbr]=\"weekday.long\" [class]=\"weekdayClasses\">\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of dayRows(); track $index) {\n <tr>\n @for (cell of week; track $index) {\n @if (cell) {\n <td\n [attr.data-date]=\"cell.key\"\n [tabindex]=\"cell.tabStop && !disabled() ? 0 : -1\"\n [attr.aria-label]=\"cell.name\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled ? 'true' : null\"\n [class]=\"cellClasses(cell)\"\n (click)=\"pick(cell)\"\n >\n <span aria-hidden=\"true\" [class]=\"markClasses(cell, 'day')\">{{\n cell.text\n }}</span>\n </td>\n } @else {\n <td [class]=\"emptyCellClasses()\"></td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('month') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"month\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n (keydown)=\"onMonthKeydown($event)\"\n >\n <tbody>\n @for (row of monthRows(); track $index) {\n <tr>\n @for (cell of row; track cell.key) {\n <td\n [attr.data-month]=\"cell.key\"\n [tabindex]=\"cell.tabStop ? 0 : -1\"\n [attr.aria-label]=\"cell.name\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [attr.aria-disabled]=\"cell.disabled ? 'true' : null\"\n [class]=\"pickCellClasses(cell)\"\n (click)=\"pickMonth(cell)\"\n >\n <span aria-hidden=\"true\" [class]=\"markClasses(cell, 'pick')\">{{\n cell.text\n }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('year') {\n <table\n role=\"grid\"\n tabindex=\"-1\"\n data-bf-calendar-grid=\"year\"\n class=\"w-full table-fixed border-collapse outline-hidden\"\n [attr.aria-labelledby]=\"titleId()\"\n (keydown)=\"onYearKeydown($event)\"\n >\n <tbody>\n @for (row of yearRows(); track $index) {\n <tr>\n @for (cell of row; track cell.key) {\n <td\n [attr.data-year]=\"cell.key\"\n [tabindex]=\"cell.tabStop ? 0 : -1\"\n [attr.aria-selected]=\"cell.selected ? 'true' : 'false'\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [class]=\"pickCellClasses(cell)\"\n (click)=\"pickYear(cell)\"\n >\n <span [class]=\"markClasses(cell, 'pick')\">{{ cell.text }}</span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n }\n </div>\n </div>\n @if (message.text(); as text) {\n <p [id]=\"id() + '-error'\" [class.sr-only]=\"message.hidden()\" class=\"text-danger text-micro\">\n {{ text }}\n </p>\n }\n `,\n})\nexport class BfCalendarComponent implements FormValueControl<string | null> {\n private readonly defaults = inject(BF_DEFAULTS);\n private readonly document = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n /** The strings in effect; the template reads the button names from them. */\n protected readonly labels = inject(BF_LABELS);\n\n /** The picked date as an ISO string ('YYYY-MM-DD'), `null` while none is picked; two-way\n * bindable and bound by `[formField]`. */\n readonly value = model<string | null>(null);\n /** The month on show ('YYYY-MM'), two-way bindable; `null` shows the value's month, else\n * today's. The previous/next buttons, the month and year views and the keyboard set it. */\n readonly month = model<string | null>(null);\n /** The earliest date that can be picked (ISO); earlier dates show disabled. */\n readonly min = input<string | undefined>(undefined);\n /** The latest date that can be picked (ISO); later dates show disabled. */\n readonly max = input<string | undefined>(undefined);\n /** Marks more dates as not pickable (weekends, booked days); called with each ISO date. */\n readonly disabledDate = input<BfCalendarDisabledDate | null>(null);\n /** The first column's weekday, 0 Sunday to 6 Saturday; unset follows the locale's week (else\n * Monday). */\n readonly firstDayOfWeek = input<BfCalendarWeekday | undefined>(undefined);\n /** BCP 47 locale of the month and weekday names and of the week; empty follows the\n * document's `lang`, else English. */\n readonly locale = input('');\n /** The date marked as today (ISO); unset is the device's local date. */\n readonly today = input<string | undefined>(undefined);\n /** Cell size: sm 32, md 40, lg 48 px (44 px under a coarse pointer); unset follows\n * `provideBfDefaults()` (`controlSize`, `md` by default). */\n readonly size = input<BfSize | undefined>(undefined);\n /** Disables the whole calendar: nothing is focusable or pickable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Shows the value and lets the user browse the months, but blocks picking. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Marks the date required (`aria-required` on the day grid). */\n readonly required = input(false, { transform: booleanAttribute });\n /** Field validity from Signal Forms. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has left the calendar; errors show only once touched. */\n readonly touched = input(false, { transform: booleanAttribute });\n /** Validation errors from Signal Forms; the first message is shown once touched. */\n readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Explicit error text; takes precedence over Signal Forms errors. */\n readonly errorMessage = input('');\n /** Accessible name of the calendar (not rendered visibly), such as \"Due date\". */\n readonly label = input('');\n /** Accessible name when `label` is not set. */\n readonly ariaLabel = input('');\n /** Id(s) of the element(s) that name the calendar (a visible heading) when `label` is not\n * set. */\n readonly ariaLabelledby = input('');\n /** Name of the bound field. Not rendered (the calendar has no native form element); kept so\n * Signal Forms can bind it. */\n readonly name = input('');\n /** The calendar's id; generated when not set. */\n readonly id = input(uniqueId('bf-calendar'));\n\n /** Emitted with the new date right after the user picks a different one. */\n readonly changed = output<string>();\n /** Emitted with the date the user picked (click, Enter or Space), also when it already was\n * the value, so a popover around the calendar can close. */\n readonly picked = output<string>();\n /** Emitted when focus leaves the calendar, so Signal Forms marks the field touched. */\n readonly touch = output<void>();\n\n private readonly root = viewChild.required<ElementRef<HTMLElement>>('root');\n\n /** Which grid is on show: the days, or the month or year jump view. */\n protected readonly view = signal<CalendarView>('day');\n /** The day the keyboard last moved to; the tab stop while it is in the shown month. */\n private readonly activeDate = signal<string | null>(null);\n /** The month the month view's tab stop is on (its year is the view's year). */\n private readonly activeMonth = signal('');\n /** The year the year view's tab stop is on. */\n private readonly activeYear = signal(0);\n\n protected readonly resolvedSize = computed(() => this.size() ?? this.defaults.controlSize);\n /** The locale in effect: `locale`, else the document's `lang`, else English. */\n readonly resolvedLocale = computed(\n () =>\n supportedLocale(this.locale()) ?? supportedLocale(this.document.documentElement.lang) ?? 'en',\n );\n /** The first column's weekday: `firstDayOfWeek`, else the locale's, else Monday. */\n readonly firstDay = computed(\n () => this.firstDayOfWeek() ?? localeFirstDay(this.resolvedLocale()) ?? 1,\n );\n private readonly minDate = computed(() => validIsoDate(this.min()));\n private readonly maxDate = computed(() => validIsoDate(this.max()));\n private readonly todayDate = computed(() => validIsoDate(this.today()) ?? localIsoDate());\n private readonly selectedDate = computed(() => validIsoDate(this.value()));\n\n /** The month on show: `month`, else the value's month, else today's (kept inside min/max). */\n readonly shownMonth = computed(() => {\n const month = this.month();\n if (parseIsoMonth(month) && month) {\n return month;\n }\n const value = this.selectedDate();\n return isoMonthOf(value ?? clampIso(this.todayDate(), this.minDate(), this.maxDate()));\n });\n\n private readonly formats = computed(() => {\n const locale = this.resolvedLocale();\n return {\n title: formatter(locale, { month: 'long', year: 'numeric' }),\n year: formatter(locale, { year: 'numeric' }),\n month: formatter(locale, { month: 'long' }),\n day: formatter(locale, { day: 'numeric' }),\n full: formatter(locale, { dateStyle: 'full' }),\n weekdayShort: formatter(locale, { weekday: 'short' }),\n weekdayLong: formatter(locale, { weekday: 'long' }),\n };\n });\n\n /** The shown month and year, such as \"October 2026\". */\n protected readonly monthTitle = computed(() =>\n formatIso(this.formats().title, this.shownMonth()),\n );\n /** The header's title: the month and year, the month view's year or the year view's year. */\n protected readonly title = computed(() => {\n switch (this.view()) {\n case 'month':\n return formatIso(this.formats().year, this.activeMonth().slice(0, 4));\n case 'year':\n return formatIso(this.formats().year, String(this.activeYear()).padStart(4, '0'));\n default:\n return this.monthTitle();\n }\n });\n /** What the title button does, read after its text. */\n protected readonly titleAction = computed(() =>\n this.view() === 'day' ? this.labels.calendarChooseMonth : this.labels.calendarChooseYear,\n );\n protected readonly titleId = computed(() => `${this.id()}-title`);\n\n /** Whether the previous month lies wholly before `min`. */\n protected readonly atStart = computed(() => {\n const min = this.minDate();\n return min !== null && compareIso(lastOfMonth(addIsoMonths(this.shownMonth(), -1)), min) < 0;\n });\n /** Whether the next month lies wholly after `max`. */\n protected readonly atEnd = computed(() => {\n const max = this.maxDate();\n return max !== null && compareIso(firstOfMonth(addIsoMonths(this.shownMonth(), 1)), max) > 0;\n });\n\n /** The weekday column headers, from the first day of the week on. */\n protected readonly weekdays = computed<CalendarWeekday[]>(() => {\n const { weekdayShort, weekdayLong } = this.formats();\n // 2023-01-01 was a Sunday, so 2023-01-(1 + n) is weekday n.\n return Array.from({ length: 7 }, (_, i) => {\n const iso = `2023-01-0${((this.firstDay() + i) % 7) + 1}`;\n return { short: formatIso(weekdayShort, iso), long: formatIso(weekdayLong, iso) };\n });\n });\n\n /** The day that owns the grid's tab stop: the active day while it is in the shown month, else\n * the value, else today, else the first pickable-by-range day of the month. */\n readonly tabStopDate = computed(() => {\n const month = this.shownMonth();\n const inMonth = (iso: string | null): iso is string => !!iso && isoMonthOf(iso) === month;\n const candidates = [this.activeDate(), this.selectedDate(), this.todayDate()];\n const found = candidates.find(inMonth);\n if (found) {\n return found;\n }\n const clamped = clampIso(firstOfMonth(month), this.minDate(), this.maxDate());\n return inMonth(clamped) ? clamped : firstOfMonth(month);\n });\n\n /** The day grid: weeks of seven cells, `null` for the neighbouring months' days. */\n protected readonly dayRows = computed<(CalendarCell | null)[][]>(() => {\n const { day, full } = this.formats();\n const selected = this.selectedDate();\n const today = this.todayDate();\n const tabStop = this.tabStopDate();\n return monthWeeks(this.shownMonth(), this.firstDay()).map((week) =>\n week.map((iso) =>\n iso\n ? {\n key: iso,\n text: formatIso(day, iso),\n name: formatIso(full, iso),\n disabled: this.isDateDisabled(iso),\n selected: iso === selected,\n current: iso === today,\n tabStop: iso === tabStop,\n }\n : null,\n ),\n );\n });\n\n /** The month view: the twelve months of the active month's year, three to a row. */\n protected readonly monthRows = computed<CalendarCell[][]>(() => {\n const { month, title } = this.formats();\n const active = this.activeMonth();\n const year = active.slice(0, 4);\n const shown = this.shownMonth();\n const todayMonth = isoMonthOf(this.todayDate());\n const min = this.minDate();\n const max = this.maxDate();\n const cells = Array.from({ length: 12 }, (_, i): CalendarCell => {\n const key = `${year}-${String(i + 1).padStart(2, '0')}`;\n return {\n key,\n text: formatIso(month, key),\n name: formatIso(title, key),\n disabled:\n (min !== null && compareIso(lastOfMonth(key), min) < 0) ||\n (max !== null && compareIso(firstOfMonth(key), max) > 0),\n selected: key === shown,\n current: key === todayMonth,\n tabStop: key === active,\n };\n });\n return rows(cells, 3);\n });\n\n /** The first and last year the year view lists: `min`'s and `max`'s, else 100 years around. */\n private readonly yearRange = computed(() => {\n const shown = Number(this.shownMonth().slice(0, 4));\n const min = this.minDate();\n const max = this.maxDate();\n return {\n first: min ? Number(min.slice(0, 4)) : Math.max(1, shown - YEAR_SPAN),\n last: max ? Number(max.slice(0, 4)) : Math.min(9999, shown + YEAR_SPAN),\n };\n });\n\n /** The year view: the years of `yearRange`, four to a row. */\n protected readonly yearRows = computed<CalendarCell[][]>(() => {\n const { year } = this.formats();\n const { first, last } = this.yearRange();\n const shown = Number(this.shownMonth().slice(0, 4));\n const todayYear = Number(this.todayDate().slice(0, 4));\n const active = this.activeYear();\n const cells = Array.from({ length: Math.max(0, last - first + 1) }, (_, i): CalendarCell => {\n const value = first + i;\n return {\n key: String(value),\n text: formatIso(year, String(value).padStart(4, '0')),\n name: null,\n disabled: false,\n selected: value === shown,\n current: value === todayYear,\n tabStop: value === active,\n };\n });\n return rows(cells, 4);\n });\n\n readonly errorText = computed(() =>\n fieldErrorText(this.errorMessage(), this.touched(), this.errors(), this.labels.validation),\n );\n readonly showError = computed(() =>\n fieldShowsError(this.errorText(), this.invalid(), this.touched()),\n );\n /** The error paragraph: `errorText`, visually hidden while a press elsewhere (that blurred\n * this calendar) holds the layout, so it never moves under the pointer. */\n protected readonly message = heldMessage(this.errorText);\n /** The id of the error paragraph while there is an error, else null. */\n protected readonly errorId = computed(() => (this.errorText() ? `${this.id()}-error` : null));\n /** `aria-label` of the group: the `label`, else `ariaLabel`. */\n readonly ariaLabelAttr = computed(() => this.label() || this.ariaLabel() || null);\n /** `aria-labelledby` of the group: only while no `label` names it. */\n readonly ariaLabelledbyAttr = computed(() =>\n this.label() ? null : this.ariaLabelledby() || null,\n );\n\n protected readonly frameClasses = computed(\n () => `flex max-w-full flex-col gap-2 ${FRAME_SIZE[this.resolvedSize()]}`,\n );\n protected readonly bodyClasses = computed(() =>\n [\n BODY_SCROLL[this.view() === 'year' ? 'scroll' : 'fixed'],\n BODY_SIZE[this.resolvedSize()],\n BODY_OUTLINE[this.showError() ? 'error' : 'none'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n protected readonly titleClasses = computed(() =>\n [\n TITLE_BASE,\n TITLE_SIZE[this.resolvedSize()],\n this.view() === 'year' ? '' : TITLE_BUTTON,\n this.view() === 'year' ? '' : TITLE_CARET[this.view() === 'day' ? 'closed' : 'open'],\n ]\n .filter(Boolean)\n .join(' '),\n );\n protected readonly emptyCellClasses = computed(\n () => `${CELL_BASE} ${CELL_SIZE[this.resolvedSize()]}`,\n );\n protected readonly weekdayClasses = WEEKDAY;\n\n /**\n * The classes of the previous or next month button.\n * @internal\n */\n navClasses(direction: 'previous' | 'next'): string {\n return `${NAV_BASE} ${NAV_SIZE[this.resolvedSize()]} ${CHEVRON} ${CHEVRON_DIRECTION[direction]}`;\n }\n\n /**\n * The classes of a day cell.\n * @internal\n */\n cellClasses(cell: CalendarCell): string {\n return `${CELL_BASE} ${CELL_SIZE[this.resolvedSize()]} ${CELL_MODE[this.cellMode(cell)]}`;\n }\n\n /**\n * The classes of a month or year cell: a little padding between the pills.\n * @internal\n */\n pickCellClasses(cell: CalendarCell): string {\n return `${this.cellClasses(cell)} px-1`;\n }\n\n /**\n * The classes of the mark inside a cell.\n * @internal\n */\n markClasses(cell: CalendarCell, kind: 'day' | 'pick'): string {\n const state: CalendarCellState = cell.disabled\n ? cell.selected\n ? 'disabledSelected'\n : 'disabled'\n : cell.selected\n ? 'selected'\n : cell.current\n ? 'current'\n : 'plain';\n const pickable = this.cellMode(cell) === 'pickable';\n return [\n MARK_BASE,\n kind === 'day' ? DAY_MARK_SIZE[this.resolvedSize()] : PICK_MARK_SIZE[this.resolvedSize()],\n MARK_STATE[state],\n pickable ? MARK_HOVER[cell.selected ? 'selected' : 'plain'] : '',\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n /**\n * Whether a date cannot be picked: it is outside `min`…`max` or `disabledDate` rules it out.\n * @param iso The ISO date to check.\n * @returns True when the date shows disabled.\n */\n isDateDisabled(iso: string): boolean {\n const min = this.minDate();\n const max = this.maxDate();\n return (\n (min !== null && compareIso(iso, min) < 0) ||\n (max !== null && compareIso(iso, max) > 0) ||\n this.disabledDate()?.(iso) === true\n );\n }\n\n /**\n * Focuses the cell that owns the tab stop of the grid on show; Signal Forms calls it from\n * `focusBoundControl()`.\n * @param options Passed on to the native `focus()`, such as `{ preventScroll: true }`.\n */\n focus(options?: FocusOptions): void {\n this.root()\n .nativeElement.querySelector<HTMLElement>('[data-bf-calendar-grid] td[tabindex=\"0\"]')\n ?.focus(options);\n }\n\n /**\n * Picks `iso` as a click on its day would: ignored while disabled or read-only, and for an\n * invalid or disabled date. Shows its month.\n * @param iso The ISO date to pick.\n */\n select(iso: string): void {\n if (this.disabled() || this.readonly() || !parseIsoDate(iso) || this.isDateDisabled(iso)) {\n return;\n }\n this.activeDate.set(iso);\n if (isoMonthOf(iso) !== this.shownMonth()) {\n this.month.set(isoMonthOf(iso));\n }\n const changed = iso !== this.value();\n if (changed) {\n this.value.set(iso);\n this.changed.emit(iso);\n }\n this.picked.emit(iso);\n }\n\n /**\n * Shows the month `offset` months away (the previous/next buttons); ignored past `min`/`max`.\n * @internal\n */\n showMonth(offset: number): void {\n if (this.disabled() || (offset < 0 ? this.atStart() : this.atEnd())) {\n return;\n }\n this.month.set(addIsoMonths(this.shownMonth(), offset));\n }\n\n /**\n * The title button: the day view opens the month view, the month view the year view.\n * @internal\n */\n openNextView(): void {\n if (this.view() === 'day') {\n this.activeMonth.set(this.shownMonth());\n this.view.set('month');\n } else {\n this.activeYear.set(Number(this.activeMonth().slice(0, 4)));\n this.view.set('year');\n }\n this.focusAfterRender('center');\n }\n\n /**\n * A click on a day.\n * @internal\n */\n pick(cell: CalendarCell): void {\n if (this.disabled()) {\n return;\n }\n // The clicked day takes the tab stop even when it cannot be picked, so the arrow keys go on\n // from where focus is.\n this.activeDate.set(cell.key);\n this.select(cell.key);\n }\n\n /**\n * A click (or Enter, Space) on a month of the month view: shows it in the day view.\n * @internal\n */\n pickMonth(cell: CalendarCell): void {\n if (cell.disabled || this.disabled()) {\n return;\n }\n this.month.set(cell.key);\n this.view.set('day');\n this.focusAfterRender();\n }\n\n /**\n * A click (or Enter, Space) on a year of the year view: opens that year's month view.\n * @internal\n */\n pickYear(cell: CalendarCell): void {\n if (this.disabled()) {\n return;\n }\n const month = `${cell.key.padStart(4, '0')}${this.activeMonth().slice(4)}`;\n const min = this.minDate();\n const max = this.maxDate();\n this.activeMonth.set(\n clampIso(month, min ? isoMonthOf(min) : null, max ? isoMonthOf(max) : null),\n );\n this.view.set('month');\n this.focusAfterRender();\n }\n\n /**\n * Escape in the month or year view returns to the day view (and stops there, so a popover\n * around the calendar stays open).\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.view() !== 'day') {\n event.preventDefault();\n event.stopPropagation();\n this.view.set('day');\n this.focusAfterRender();\n }\n }\n\n /**\n * Marks the field touched once focus leaves the calendar (not on moves between its cells).\n * @internal\n */\n onFocusout(event: FocusEvent): void {\n const next = event.relatedTarget;\n if (!(next instanceof Node) || !this.root().nativeElement.contains(next)) {\n this.touch.emit();\n }\n }\n\n /**\n * The day grid's keys: arrows by day and week (mirrored under RTL), Page Up/Down by month\n * (with Shift by year), Home/End to the week's ends, Enter/Space picks.\n * @internal\n */\n onDayKeydown(event: KeyboardEvent): void {\n const focused = event.target instanceof HTMLElement ? event.target.dataset['date'] : undefined;\n const from = focused ?? this.tabStopDate();\n const step = this.inlineStep();\n let target: string;\n switch (event.key) {\n case 'ArrowLeft':\n target = addDays(from, -step);\n break;\n case 'ArrowRight':\n target = addDays(from, step);\n break;\n case 'ArrowUp':\n target = addDays(from, -7);\n break;\n case 'ArrowDown':\n target = addDays(from, 7);\n break;\n case 'PageUp':\n target = event.shiftKey ? addYears(from, -1) : addMonths(from, -1);\n break;\n case 'PageDown':\n target = event.shiftKey ? addYears(from, 1) : addMonths(from, 1);\n break;\n case 'Home':\n target = startOfWeek(from, this.firstDay());\n break;\n case 'End':\n target = endOfWeek(from, this.firstDay());\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.select(from);\n return;\n default:\n return;\n }\n event.preventDefault();\n this.moveTo(clampIso(target, this.minDate(), this.maxDate()));\n }\n\n /**\n * The month view's keys: arrows by one month and by a row of three, Home/End to the row's\n * ends, Page Up/Down by a year, Enter/Space shows the month.\n * @internal\n */\n onMonthKeydown(event: KeyboardEvent): void {\n const active = this.activeMonth();\n const index = Number(active.slice(5, 7)) - 1;\n const step = this.inlineStep();\n const offsets: Record<string, number> = {\n ArrowLeft: -step,\n ArrowRight: step,\n ArrowUp: -3,\n ArrowDown: 3,\n Home: -(index % 3),\n End: 2 - (index % 3),\n PageUp: -12,\n PageDown: 12,\n };\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n const cell = this.monthRows()\n .flat()\n .find((c) => c.key === active);\n if (cell) {\n this.pickMonth(cell);\n }\n return;\n }\n const offset = offsets[event.key];\n if (offset === undefined) {\n return;\n }\n event.preventDefault();\n const min = this.minDate();\n const max = this.maxDate();\n this.activeMonth.set(\n clampIso(\n addIsoMonths(active, offset),\n min ? isoMonthOf(min) : null,\n max ? isoMonthOf(max) : null,\n ),\n );\n this.focusAfterRender();\n }\n\n /**\n * The year view's keys: arrows by one year and by a row of four, Home/End to the row's ends,\n * Page Up/Down by five rows, Enter/Space opens the year's months.\n * @internal\n */\n onYearKeydown(event: KeyboardEvent): void {\n const active = this.activeYear();\n const { first, last } = this.yearRange();\n const column = (active - first) % 4;\n const step = this.inlineStep();\n const offsets: Record<string, number> = {\n ArrowLeft: -step,\n ArrowRight: step,\n ArrowUp: -4,\n ArrowDown: 4,\n Home: -column,\n End: 3 - column,\n PageUp: -20,\n PageDown: 20,\n };\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.pickYear({\n key: String(active),\n text: '',\n name: null,\n disabled: false,\n selected: false,\n current: false,\n tabStop: true,\n });\n return;\n }\n const offset = offsets[event.key];\n if (offset === undefined) {\n return;\n }\n event.preventDefault();\n this.activeYear.set(Math.min(last, Math.max(first, active + offset)));\n this.focusAfterRender('nearest');\n }\n\n /** Moves the day grid's tab stop (and focus) to `iso`, showing its month. */\n private moveTo(iso: string): void {\n this.activeDate.set(iso);\n if (isoMonthOf(iso) !== this.shownMonth()) {\n this.month.set(isoMonthOf(iso));\n }\n this.focusAfterRender();\n }\n\n /** +1 when ArrowRight moves forward, -1 under `dir=\"rtl\"`, where the days run right to left. */\n private inlineStep(): number {\n const root = this.root().nativeElement;\n const dir = root.closest('[dir]')?.getAttribute('dir');\n const rtl = dir ? dir === 'rtl' : getComputedStyle(root).direction === 'rtl';\n return rtl ? -1 : 1;\n }\n\n private cellMode(cell: CalendarCell): CalendarCellMode {\n if (cell.disabled || this.disabled()) {\n return 'disabled';\n }\n // Read-only blocks picking a date, not browsing: month and year cells stay pickable.\n return this.readonly() && this.view() === 'day' ? 'readonly' : 'pickable';\n }\n\n /** After the next render, focuses the tab stop of the grid on show; in the scrolling year view\n * it first scrolls the cell into the middle of the box (`center`, on opening) or just into view\n * (`nearest`, on a key move). */\n private focusAfterRender(scroll: 'center' | 'nearest' = 'nearest'): void {\n afterNextRender(\n {\n write: () => {\n const root = this.root().nativeElement;\n const cell = root.querySelector<HTMLElement>('[data-bf-calendar-grid] td[tabindex=\"0\"]');\n const body = cell?.closest('table')?.parentElement;\n if (!cell || !body) {\n return;\n }\n const top =\n cell.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop;\n const bottom = top + cell.offsetHeight;\n if (scroll === 'center') {\n body.scrollTop = top - (body.clientHeight - cell.offsetHeight) / 2;\n } else if (top < body.scrollTop) {\n body.scrollTop = top;\n } else if (bottom > body.scrollTop + body.clientHeight) {\n body.scrollTop = bottom - body.clientHeight;\n }\n cell.focus({ preventScroll: true });\n },\n },\n { injector: this.injector },\n );\n }\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Provided by `bf-steps` so each `bf-step` knows its number and may claim `role=\"listitem\"`,\n * without `step.component.ts` importing `steps.component.ts`.\n */\nexport interface BfStepsHost {\n /** The number of the first step. */\n readonly start: Signal<number>;\n /** How many steps the list holds. */\n readonly count: Signal<number>;\n /** The zero-based position of a step among the list's steps, or -1. */\n indexOf(step: object): number;\n}\n\nexport const BF_STEPS = new InjectionToken<BfStepsHost>('BF_STEPS');\n","import { Component, computed, inject, input } from '@angular/core';\nimport { BF_STEPS } from './steps.token';\n\n/**\n * The heading level of a `bf-step` title, for a guide whose steps hold enough content (screenshots,\n * code) that a screen-reader user moves between them by heading.\n *\n * @summary The heading level a step title can take, two, three or four\n * @since 0.4.0\n */\nexport type BfStepHeadingLevel = 2 | 3 | 4;\n\n/* The marker column: a numbered circle over the line that joins it to the next step's circle.\n The line is hidden on the last step (its host is the list's last child). In forced colours the\n circle's fill gives way, so a CanvasText outline keeps its shape. */\nconst MARKER =\n 'flex size-6 shrink-0 items-center justify-center rounded-full bg-primary-soft text-label-sm font-bold text-primary-strong forced-colors:outline forced-colors:outline-[CanvasText]';\nconst LINE = 'my-1 w-0 flex-1 border-s border-border group-last/bf-step:hidden';\n/* pt-0.5: the 20 px title line centred on the 24 px circle. */\nconst TITLE = 'pt-0.5 text-label font-bold text-text wrap-anywhere';\n\n/**\n * One step of a `bf-steps` list: a numbered marker, a short instruction as its title and the\n * step's details in the content.\n *\n * @example\n * <bf-steps>\n * <bf-step title=\"Install the app\">Download it from the App Store or Google Play.</bf-step>\n * <bf-step title=\"Sign in\">Use your work email address.</bf-step>\n * </bf-steps>\n * @summary One numbered step of an instruction list, with a title and its details\n * @category Data display\n * @since 0.4.0\n * @slot default The step's details: text, a code snippet, an image or a button.\n */\n@Component({\n selector: 'bf-step',\n // role=\"listitem\" only inside bf-steps: a lone step claiming it would have no list parent.\n host: {\n class: 'group/bf-step block',\n '[attr.role]': 'role',\n '[attr.aria-posinset]': 'positionInSet()',\n '[attr.aria-setsize]': 'setSize()',\n },\n template: `\n <div class=\"flex gap-3\">\n <div class=\"flex shrink-0 flex-col items-center\">\n <span aria-hidden=\"true\" [class]=\"markerClasses\">{{ number() }}</span>\n <span [class]=\"lineClasses\"></span>\n </div>\n <div class=\"min-w-0 flex-1 pb-6 group-last/bf-step:pb-0\">\n @if (title()) {\n @switch (headingLevel()) {\n @case (2) {\n <h2 [class]=\"titleClasses\">{{ title() }}</h2>\n }\n @case (3) {\n <h3 [class]=\"titleClasses\">{{ title() }}</h3>\n }\n @case (4) {\n <h4 [class]=\"titleClasses\">{{ title() }}</h4>\n }\n @default {\n <p [class]=\"titleClasses\">{{ title() }}</p>\n }\n }\n }\n <div class=\"text-body text-text-secondary mt-1 wrap-anywhere empty:hidden\">\n <ng-content />\n </div>\n </div>\n </div>\n `,\n})\nexport class BfStepComponent {\n private readonly steps = inject(BF_STEPS, { optional: true });\n\n /** The step's short instruction (\"Install the app\"), shown next to the number. */\n readonly title = input('');\n /** Renders the title as a heading of this level instead of text; leave it off for short steps. */\n readonly headingLevel = input<BfStepHeadingLevel | undefined>(undefined);\n\n /** `listitem` inside a `bf-steps`, else no role. */\n protected readonly role = this.steps ? 'listitem' : null;\n protected readonly markerClasses = MARKER;\n protected readonly lineClasses = LINE;\n protected readonly titleClasses = TITLE;\n\n /** The step's number: the list's `start` plus its position. */\n protected readonly number = computed(() => {\n const steps = this.steps;\n return steps ? steps.start() + Math.max(steps.indexOf(this), 0) : 1;\n });\n /* A list that starts at 1 lets the list semantics count (\"1 of 3\"); a continued one states the\n position, so the announcement matches the visible number. */\n protected readonly positionInSet = computed(() =>\n this.steps && this.steps.start() !== 1 ? this.number() : null,\n );\n protected readonly setSize = computed(() => {\n const steps = this.steps;\n return steps && steps.start() !== 1 ? steps.start() - 1 + steps.count() : null;\n });\n}\n","import { Component, computed, contentChildren, input, numberAttribute } from '@angular/core';\nimport { BfStepComponent } from './step.component';\nimport { BF_STEPS, type BfStepsHost } from './steps.token';\n\n/**\n * Numbered instructions a user follows in order, such as setting up an app on a phone: an\n * ordered list of `bf-step` items, each with a numbered marker joined to the next by a line.\n *\n * @example\n * <bf-steps>\n * <bf-step title=\"Install the app\">Download it from the App Store or Google Play.</bf-step>\n * <bf-step title=\"Sign in\">Use your work email address.</bf-step>\n * <bf-step title=\"Turn on notifications\">Allow them when the app asks.</bf-step>\n * </bf-steps>\n * @summary Numbered instruction steps a user follows in order, with joined markers\n * @category Data display\n * @since 0.4.0\n * @slot default The steps, each a `bf-step`.\n */\n@Component({\n selector: 'bf-steps',\n host: { class: 'block' },\n // Tells the projected steps their number and that they sit in a list (role=\"listitem\").\n providers: [{ provide: BF_STEPS, useExisting: BfStepsComponent }],\n template: `<div role=\"list\" class=\"flex flex-col\"><ng-content /></div>`,\n})\nexport class BfStepsComponent implements BfStepsHost {\n /** The number of the first step, for a list continued from an earlier one. */\n readonly start = input(1, { transform: numberAttribute });\n\n private readonly steps = contentChildren(BfStepComponent);\n\n /** @internal How many steps the list holds. */\n readonly count = computed(() => this.steps().length);\n\n /** @internal The zero-based position of a step, read by the step for its number. */\n indexOf(step: object): number {\n return this.steps().findIndex((item) => item === step);\n }\n}\n","import {\n DOCUMENT,\n DestroyRef,\n type EnvironmentProviders,\n inject,\n provideEnvironmentInitializer,\n} from '@angular/core';\n\n/**\n * Removes what overlays and themes leave on a document: the `dark` and `cdk-global-scrollblock`\n * classes on `<html>`, `inert` on the children of `<body>`, and every child of a\n * `.cdk-overlay-container`. Internal: shared by `provideBfTesting()` (`@bitforgehq/ui/testing`)\n * and `provideBfShellTesting()` (`@bitforgehq/ui/mobile`).\n */\nexport function resetBfDocument(document: Document): void {\n document.documentElement.classList.remove('dark', 'cdk-global-scrollblock');\n for (const child of Array.from(document.body.children)) {\n child.removeAttribute('inert');\n }\n for (const container of Array.from(document.querySelectorAll('.cdk-overlay-container'))) {\n container.replaceChildren();\n }\n}\n\n/** Runs `resetBfDocument()` when the environment injector that holds it is destroyed. Internal. */\nexport function provideBfDocumentReset(): EnvironmentProviders {\n return provideEnvironmentInitializer(() => {\n const document = inject(DOCUMENT);\n inject(DestroyRef).onDestroy(() => resetBfDocument(document));\n });\n}\n"],"mappings":";;;AAwCA,MAAa,oBAAgC;CAAE,WAAW;CAAM,aAAa;AAAI;AAQjF,MAAa,cAAc,IAAI,eAA2B,eAAe;CACvE,YAAY;CACZ,eAAe;AAChB,CAAA;AAYD,SAAgB,kBAAkB,SAA0B;CAC1D,OAAO;EACL,SAAS;EACT,kBAA6B;GAC3B,MAAM,SAAS,OAAO,aAAa;IAAE,UAAU;IAAM,UAAU;GAAI,CAAE,KAAK;GAC1E,OAAO;IACL,WAAW,QAAQ,aAAa,QAAQ,QAAQ,OAAO;IACvD,aAAa,QAAQ,eAAe,QAAQ,QAAQ,OAAO;GAC5D;EACH;CACD;AACH;AC2UA,MAAa,oBAA8B;CACzC,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW,UAAU,GAAG,MAAK;CAC7B,MAAM;CACN,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,OAAO;CACP,YAAY;CACZ,OAAO;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