forty-cdk 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/accordion/README.md +122 -0
  2. package/aspect-ratio/README.md +76 -0
  3. package/avatar/README.md +100 -0
  4. package/breadcrumbs/README.md +49 -0
  5. package/breakpoints/README.md +81 -0
  6. package/button/README.md +49 -0
  7. package/calendar/README.md +458 -0
  8. package/carousel/README.md +358 -0
  9. package/checkbox/README.md +146 -0
  10. package/combobox/README.md +535 -0
  11. package/context-menu/README.md +139 -0
  12. package/date-field/README.md +184 -0
  13. package/date-picker/README.md +338 -0
  14. package/dialog/README.md +388 -0
  15. package/disclosure/README.md +114 -0
  16. package/drag-drop/README.md +359 -0
  17. package/drawer/README.md +560 -0
  18. package/dropdown-menu/README.md +176 -0
  19. package/fesm2022/forty-cdk-accordion.mjs +348 -0
  20. package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
  21. package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
  22. package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
  23. package/fesm2022/forty-cdk-avatar.mjs +308 -0
  24. package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
  25. package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
  26. package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
  27. package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
  28. package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
  29. package/fesm2022/forty-cdk-button.mjs +134 -0
  30. package/fesm2022/forty-cdk-button.mjs.map +1 -0
  31. package/fesm2022/forty-cdk-calendar.mjs +2034 -0
  32. package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
  33. package/fesm2022/forty-cdk-carousel.mjs +968 -0
  34. package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
  35. package/fesm2022/forty-cdk-checkbox.mjs +226 -0
  36. package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
  37. package/fesm2022/forty-cdk-combobox.mjs +2596 -0
  38. package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
  39. package/fesm2022/forty-cdk-context-menu.mjs +413 -0
  40. package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
  41. package/fesm2022/forty-cdk-core.mjs +9022 -0
  42. package/fesm2022/forty-cdk-core.mjs.map +1 -0
  43. package/fesm2022/forty-cdk-date-field.mjs +744 -0
  44. package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
  45. package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
  46. package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
  47. package/fesm2022/forty-cdk-dialog.mjs +707 -0
  48. package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
  49. package/fesm2022/forty-cdk-disclosure.mjs +190 -0
  50. package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
  51. package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
  52. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
  53. package/fesm2022/forty-cdk-drawer.mjs +1641 -0
  54. package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
  55. package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
  56. package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
  57. package/fesm2022/forty-cdk-field.mjs +425 -0
  58. package/fesm2022/forty-cdk-field.mjs.map +1 -0
  59. package/fesm2022/forty-cdk-fieldset.mjs +164 -0
  60. package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
  61. package/fesm2022/forty-cdk-file-upload.mjs +221 -0
  62. package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
  63. package/fesm2022/forty-cdk-hover-card.mjs +496 -0
  64. package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
  65. package/fesm2022/forty-cdk-input.mjs +274 -0
  66. package/fesm2022/forty-cdk-input.mjs.map +1 -0
  67. package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
  68. package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
  69. package/fesm2022/forty-cdk-listbox.mjs +1279 -0
  70. package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
  71. package/fesm2022/forty-cdk-menu.mjs +1439 -0
  72. package/fesm2022/forty-cdk-menu.mjs.map +1 -0
  73. package/fesm2022/forty-cdk-menubar.mjs +787 -0
  74. package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
  75. package/fesm2022/forty-cdk-meter.mjs +211 -0
  76. package/fesm2022/forty-cdk-meter.mjs.map +1 -0
  77. package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
  78. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
  79. package/fesm2022/forty-cdk-number-input.mjs +559 -0
  80. package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
  81. package/fesm2022/forty-cdk-otp-input.mjs +527 -0
  82. package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
  83. package/fesm2022/forty-cdk-pagination.mjs +323 -0
  84. package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
  85. package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
  86. package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
  87. package/fesm2022/forty-cdk-popover.mjs +698 -0
  88. package/fesm2022/forty-cdk-popover.mjs.map +1 -0
  89. package/fesm2022/forty-cdk-progress.mjs +226 -0
  90. package/fesm2022/forty-cdk-progress.mjs.map +1 -0
  91. package/fesm2022/forty-cdk-radio-group.mjs +378 -0
  92. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
  93. package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
  94. package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
  95. package/fesm2022/forty-cdk-search.mjs +205 -0
  96. package/fesm2022/forty-cdk-search.mjs.map +1 -0
  97. package/fesm2022/forty-cdk-select.mjs +1661 -0
  98. package/fesm2022/forty-cdk-select.mjs.map +1 -0
  99. package/fesm2022/forty-cdk-separator.mjs +82 -0
  100. package/fesm2022/forty-cdk-separator.mjs.map +1 -0
  101. package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
  102. package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
  103. package/fesm2022/forty-cdk-slider.mjs +803 -0
  104. package/fesm2022/forty-cdk-slider.mjs.map +1 -0
  105. package/fesm2022/forty-cdk-stepper.mjs +886 -0
  106. package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
  107. package/fesm2022/forty-cdk-switch.mjs +137 -0
  108. package/fesm2022/forty-cdk-switch.mjs.map +1 -0
  109. package/fesm2022/forty-cdk-table.mjs +1518 -0
  110. package/fesm2022/forty-cdk-table.mjs.map +1 -0
  111. package/fesm2022/forty-cdk-tabs.mjs +400 -0
  112. package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
  113. package/fesm2022/forty-cdk-time-field.mjs +593 -0
  114. package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
  115. package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
  116. package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
  117. package/fesm2022/forty-cdk-toast.mjs +1153 -0
  118. package/fesm2022/forty-cdk-toast.mjs.map +1 -0
  119. package/fesm2022/forty-cdk-toggle.mjs +516 -0
  120. package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
  121. package/fesm2022/forty-cdk-toolbar.mjs +374 -0
  122. package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
  123. package/fesm2022/forty-cdk-tooltip.mjs +672 -0
  124. package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
  125. package/fesm2022/forty-cdk-tree.mjs +2007 -0
  126. package/fesm2022/forty-cdk-tree.mjs.map +1 -0
  127. package/fesm2022/forty-cdk-virtualization.mjs +1 -1
  128. package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
  129. package/fesm2022/forty-cdk.mjs +0 -43310
  130. package/fesm2022/forty-cdk.mjs.map +1 -1
  131. package/field/README.md +97 -0
  132. package/fieldset/README.md +86 -0
  133. package/file-upload/README.md +73 -0
  134. package/hover-card/README.md +171 -0
  135. package/input/README.md +156 -0
  136. package/listbox/README.md +424 -0
  137. package/menu/README.md +181 -0
  138. package/menubar/README.md +140 -0
  139. package/meter/README.md +128 -0
  140. package/navigation-menu/README.md +253 -0
  141. package/number-input/README.md +171 -0
  142. package/otp-input/README.md +198 -0
  143. package/package.json +213 -1
  144. package/pagination/README.md +61 -0
  145. package/pane-resizer/README.md +136 -0
  146. package/popover/README.md +262 -0
  147. package/progress/README.md +115 -0
  148. package/radio-group/README.md +129 -0
  149. package/scroll-area/README.md +184 -0
  150. package/search/README.md +42 -0
  151. package/select/README.md +488 -0
  152. package/separator/README.md +84 -0
  153. package/signal-forms/README.md +72 -0
  154. package/slider/README.md +152 -0
  155. package/stepper/README.md +292 -0
  156. package/switch/README.md +116 -0
  157. package/table/README.md +769 -0
  158. package/tabs/README.md +130 -0
  159. package/time-field/README.md +157 -0
  160. package/time-picker/README.md +172 -0
  161. package/toast/README.md +398 -0
  162. package/toggle/README.md +224 -0
  163. package/toolbar/README.md +109 -0
  164. package/tooltip/README.md +274 -0
  165. package/tree/README.md +708 -0
  166. package/types/forty-cdk-accordion.d.ts +242 -0
  167. package/types/forty-cdk-aspect-ratio.d.ts +59 -0
  168. package/types/forty-cdk-avatar.d.ts +133 -0
  169. package/types/forty-cdk-breadcrumbs.d.ts +92 -0
  170. package/types/forty-cdk-breakpoints.d.ts +141 -0
  171. package/types/forty-cdk-button.d.ts +80 -0
  172. package/types/forty-cdk-calendar.d.ts +914 -0
  173. package/types/forty-cdk-carousel.d.ts +530 -0
  174. package/types/forty-cdk-checkbox.d.ts +141 -0
  175. package/types/forty-cdk-combobox.d.ts +1259 -0
  176. package/types/forty-cdk-context-menu.d.ts +313 -0
  177. package/types/forty-cdk-core.d.ts +5774 -0
  178. package/types/forty-cdk-date-field.d.ts +307 -0
  179. package/types/forty-cdk-date-picker.d.ts +622 -0
  180. package/types/forty-cdk-dialog.d.ts +546 -0
  181. package/types/forty-cdk-disclosure.d.ts +127 -0
  182. package/types/forty-cdk-drag-drop.d.ts +456 -0
  183. package/types/forty-cdk-drawer.d.ts +871 -0
  184. package/types/forty-cdk-dropdown-menu.d.ts +242 -0
  185. package/types/forty-cdk-field.d.ts +236 -0
  186. package/types/forty-cdk-fieldset.d.ts +119 -0
  187. package/types/forty-cdk-file-upload.d.ts +124 -0
  188. package/types/forty-cdk-hover-card.d.ts +320 -0
  189. package/types/forty-cdk-input.d.ts +169 -0
  190. package/types/forty-cdk-internationalized-date.d.ts +1 -1
  191. package/types/forty-cdk-listbox.d.ts +513 -0
  192. package/types/forty-cdk-menu.d.ts +629 -0
  193. package/types/forty-cdk-menubar.d.ts +451 -0
  194. package/types/forty-cdk-meter.d.ts +122 -0
  195. package/types/forty-cdk-navigation-menu.d.ts +514 -0
  196. package/types/forty-cdk-number-input.d.ts +319 -0
  197. package/types/forty-cdk-otp-input.d.ts +248 -0
  198. package/types/forty-cdk-pagination.d.ts +214 -0
  199. package/types/forty-cdk-pane-resizer.d.ts +145 -0
  200. package/types/forty-cdk-popover.d.ts +509 -0
  201. package/types/forty-cdk-progress.d.ts +143 -0
  202. package/types/forty-cdk-radio-group.d.ts +222 -0
  203. package/types/forty-cdk-scroll-area.d.ts +258 -0
  204. package/types/forty-cdk-search.d.ts +142 -0
  205. package/types/forty-cdk-select.d.ts +899 -0
  206. package/types/forty-cdk-separator.d.ts +59 -0
  207. package/types/forty-cdk-signal-forms.d.ts +58 -0
  208. package/types/forty-cdk-slider.d.ts +379 -0
  209. package/types/forty-cdk-stepper.d.ts +650 -0
  210. package/types/forty-cdk-switch.d.ts +87 -0
  211. package/types/forty-cdk-table.d.ts +723 -0
  212. package/types/forty-cdk-tabs.d.ts +235 -0
  213. package/types/forty-cdk-time-field.d.ts +307 -0
  214. package/types/forty-cdk-time-picker.d.ts +578 -0
  215. package/types/forty-cdk-toast.d.ts +598 -0
  216. package/types/forty-cdk-toggle.d.ts +310 -0
  217. package/types/forty-cdk-toolbar.d.ts +217 -0
  218. package/types/forty-cdk-tooltip.d.ts +436 -0
  219. package/types/forty-cdk-tree.d.ts +688 -0
  220. package/types/forty-cdk.d.ts +1 -19743
@@ -0,0 +1,374 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, input, booleanAttribute, computed, Directive, ElementRef } from '@angular/core';
3
+ import { createDefaults, injectTextDirection, RovingTabindex, Collection, firstEnabledHost, reconcileRovingActive, nextEnabledHandle, FOR_HOST_ROVING_CONTEXT, registerHandle, reflectDisabled, resolveListNavigation } from 'forty-cdk/core';
4
+
5
+ const FOR_TOOLBAR_CONTEXT = new InjectionToken('FOR_TOOLBAR_CONTEXT');
6
+
7
+ /**
8
+ * Library fallback for toolbar defaults, read at the root injector when no
9
+ * consumer has called `provideForToolbarDefaults`. Exported for the shared defaults
10
+ * contract spec; not re-exported from the primitive's public entry.
11
+ */
12
+ const FOR_TOOLBAR_FALLBACK_DEFAULTS = {
13
+ loop: true,
14
+ };
15
+ const { token, provideDefaults } = createDefaults('FOR_TOOLBAR_DEFAULTS', FOR_TOOLBAR_FALLBACK_DEFAULTS);
16
+ /** Token holding the resolved toolbar defaults for the current scope. */
17
+ const FOR_TOOLBAR_DEFAULTS = token;
18
+ /**
19
+ * Configures forty-cdk toolbar defaults for this injector scope. Partial
20
+ * overrides inherit unspecified keys from the parent scope (or library
21
+ * defaults at the root).
22
+ */
23
+ function provideForToolbarDefaults(defaults = {}) {
24
+ return provideDefaults(defaults);
25
+ }
26
+
27
+ /**
28
+ * Headless implementation of the
29
+ * [WAI-ARIA Toolbar pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/).
30
+ *
31
+ * Hosts buttons, links, separators, and (optionally) a `[forToggleGroup]`
32
+ * for grouped toggles. Manages roving tabindex across all interactive
33
+ * children so the toolbar takes a single Tab stop and arrow keys move
34
+ * focus inside.
35
+ *
36
+ * Composition with `ForToggleGroup` is automatic: items inside a
37
+ * `[forToggleGroup]` whose ancestor is `[forToolbar]` register with the
38
+ * toolbar's roving and use its keyboard navigation, so arrow keys move
39
+ * fluidly across the whole bar.
40
+ *
41
+ * @example
42
+ * ```html
43
+ * <div forToolbar aria-label="Formatting">
44
+ * <button forToolbarButton>Undo</button>
45
+ * <button forToolbarButton>Redo</button>
46
+ * <span forToolbarSeparator></span>
47
+ * <div forToggleGroup multiple>
48
+ * <button forToggleGroupItem value="bold">B</button>
49
+ * <button forToggleGroupItem value="italic">I</button>
50
+ * </div>
51
+ * <span forToolbarSeparator></span>
52
+ * <a forToolbarLink href="/help">Help</a>
53
+ * </div>
54
+ * ```
55
+ */
56
+ class ForToolbar {
57
+ #defaults = inject(FOR_TOOLBAR_DEFAULTS);
58
+ /**
59
+ * Manual `aria-label` for the toolbar. Use this when no visible label element
60
+ * exists; otherwise prefer pointing `aria-labelledby` at one. A `null`
61
+ * (default) or empty value emits no attribute. Matches the uniform labelling
62
+ * input on `ForListbox` / `ForMenubar`.
63
+ */
64
+ ariaLabel = input(null, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
66
+ orientation = input('horizontal', /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
68
+ /**
69
+ * Writing direction. When unset (default `null`), the inherited ambient
70
+ * direction is resolved from the nearest ancestor carrying a `dir` attribute
71
+ * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.
72
+ * The resolved value is reflected to the host `dir` attribute and swaps
73
+ * ArrowLeft / ArrowRight semantics in RTL.
74
+ */
75
+ _dirInput = input(null, { ...(ngDevMode ? { debugName: "_dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
76
+ dir = injectTextDirection(this._dirInput);
77
+ /**
78
+ * Whether arrow navigation wraps around past the first / last enabled
79
+ * item. Default `true`. The default is read from `provideForToolbarDefaults`
80
+ * for the surrounding scope.
81
+ */
82
+ loop = input(this.#defaults.loop, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
83
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
84
+ /**
85
+ * Roving-tabindex tracker shared by every toolbar item (buttons, links, and
86
+ * nested toggle-group items). Items promote themselves to active on
87
+ * `(focus)` and read `active()` in their tabindex computed, so re-entry
88
+ * (Shift+Tab back into the toolbar) restores the last focused item —
89
+ * matching Tabs / Tree. Before any focus, `active()` is `null` and the
90
+ * tabindex falls back to the first-enabled entry point.
91
+ */
92
+ roving = new RovingTabindex();
93
+ #items = new Collection();
94
+ #firstEnabledHost = computed(() => firstEnabledHost(this.#items.items()), /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "#firstEnabledHost" }] : /* istanbul ignore next */ []));
96
+ constructor() {
97
+ reconcileRovingActive(this.roving, this.#items.items);
98
+ }
99
+ navigate(currentItem, action) {
100
+ if (this.disabled()) {
101
+ return;
102
+ }
103
+ const target = nextEnabledHandle(this.#items.items(), currentItem, action, {
104
+ loop: this.loop(),
105
+ });
106
+ target?.host.focus();
107
+ }
108
+ isFirstFocusableItem(el) {
109
+ return this.#firstEnabledHost() === el;
110
+ }
111
+ registerItem(handle) {
112
+ this.#items.register(handle);
113
+ }
114
+ unregisterItem(handle) {
115
+ this.#items.unregister(handle);
116
+ this.roving.unregister(handle.host);
117
+ }
118
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbar, deps: [], target: i0.ɵɵFactoryTarget.Directive });
119
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToolbar, isStandalone: true, selector: "[forToolbar]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, _dirInput: { classPropertyName: "_dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "toolbar" }, properties: { "attr.aria-label": "ariaLabel() || null", "attr.aria-orientation": "orientation()", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.data-orientation": "orientation()", "attr.data-disabled": "disabled() ? \"\" : null", "attr.dir": "dir()" } }, providers: [
120
+ { provide: FOR_TOOLBAR_CONTEXT, useExisting: ForToolbar },
121
+ { provide: FOR_HOST_ROVING_CONTEXT, useExisting: FOR_TOOLBAR_CONTEXT },
122
+ ], exportAs: ["forToolbar"], ngImport: i0 });
123
+ }
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbar, decorators: [{
125
+ type: Directive,
126
+ args: [{
127
+ selector: '[forToolbar]',
128
+ exportAs: 'forToolbar',
129
+ host: {
130
+ role: 'toolbar',
131
+ '[attr.aria-label]': 'ariaLabel() || null',
132
+ '[attr.aria-orientation]': 'orientation()',
133
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
134
+ '[attr.data-orientation]': 'orientation()',
135
+ '[attr.data-disabled]': 'disabled() ? "" : null',
136
+ '[attr.dir]': 'dir()',
137
+ },
138
+ providers: [
139
+ { provide: FOR_TOOLBAR_CONTEXT, useExisting: ForToolbar },
140
+ { provide: FOR_HOST_ROVING_CONTEXT, useExisting: FOR_TOOLBAR_CONTEXT },
141
+ ],
142
+ }]
143
+ }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], _dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
144
+
145
+ /**
146
+ * Plain push button inside `[forToolbar]`. Apply on `<button>` so Enter /
147
+ * Space activate via native semantics. The directive forces `type="button"`
148
+ * to avoid accidental form submission inside a `<form>`.
149
+ */
150
+ class ForToolbarButton {
151
+ toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });
152
+ #host = inject(ElementRef);
153
+ /** Per-item disabled (in addition to the toolbar's `disabled`). */
154
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
155
+ effectiveDisabled = computed(() => this.disabled() || (this.toolbar?.disabled() ?? false), /* @ts-ignore */
156
+ ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
157
+ /**
158
+ * Tabindex per APG: once any toolbar item has been focused, the roving
159
+ * tracker owns the tab stop so re-entry restores the last focused item;
160
+ * before that, fall back to the first-enabled entry point. Disabled items
161
+ * are always -1; a button used outside a toolbar keeps its natural 0.
162
+ */
163
+ tabindex = computed(() => {
164
+ if (this.effectiveDisabled() || !this.toolbar) {
165
+ return this.effectiveDisabled() ? -1 : 0;
166
+ }
167
+ if (this.toolbar.roving.hasActive()) {
168
+ return this.toolbar.roving.tabindexFor(this.#host.nativeElement);
169
+ }
170
+ return this.toolbar.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;
171
+ }, /* @ts-ignore */
172
+ ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
173
+ constructor() {
174
+ if (!this.toolbar) {
175
+ throw new Error('[forty-cdk/toolbar] ForToolbarButton must be used inside a [forToolbar] element.');
176
+ }
177
+ const toolbar = this.toolbar;
178
+ const handle = {
179
+ host: this.#host.nativeElement,
180
+ disabled: this.effectiveDisabled,
181
+ };
182
+ registerHandle(handle, (h) => toolbar.registerItem(h), (h) => toolbar.unregisterItem(h));
183
+ reflectDisabled(this.effectiveDisabled);
184
+ }
185
+ onFocus() {
186
+ if (this.effectiveDisabled() || !this.toolbar) {
187
+ return;
188
+ }
189
+ this.toolbar.roving.setActive(this.#host.nativeElement);
190
+ }
191
+ onKeyDown(event) {
192
+ if (this.effectiveDisabled() || !this.toolbar) {
193
+ return;
194
+ }
195
+ const action = resolveListNavigation(event, {
196
+ orientation: this.toolbar.orientation(),
197
+ dir: this.toolbar.dir(),
198
+ });
199
+ if (!action) {
200
+ return;
201
+ }
202
+ event.preventDefault();
203
+ this.toolbar.navigate(this.#host.nativeElement, action);
204
+ }
205
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
206
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToolbarButton, isStandalone: true, selector: "[forToolbarButton]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "focus": "onFocus()", "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "tabindex()", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.data-orientation": "toolbar?.orientation()" } }, exportAs: ["forToolbarButton"], ngImport: i0 });
207
+ }
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarButton, decorators: [{
209
+ type: Directive,
210
+ args: [{
211
+ selector: '[forToolbarButton]',
212
+ exportAs: 'forToolbarButton',
213
+ host: {
214
+ type: 'button',
215
+ '[attr.tabindex]': 'tabindex()',
216
+ '[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
217
+ '[attr.data-orientation]': 'toolbar?.orientation()',
218
+ '(focus)': 'onFocus()',
219
+ '(keydown)': 'onKeyDown($event)',
220
+ },
221
+ }]
222
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
223
+
224
+ /**
225
+ * Hyperlink inside `[forToolbar]`. Apply on `<a>`. Honors the toolbar's
226
+ * roving tabindex and arrow-key navigation; `Enter` follows the link via
227
+ * native semantics.
228
+ */
229
+ class ForToolbarLink {
230
+ toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });
231
+ #host = inject(ElementRef);
232
+ /**
233
+ * When true the link is announced as disabled and clicks are suppressed.
234
+ * Native `<a>` doesn't have a `disabled` attribute — we rely on
235
+ * `aria-disabled` and prevent navigation in the click handler.
236
+ */
237
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
238
+ /**
239
+ * Tabindex per APG: once any toolbar item has been focused, the roving
240
+ * tracker owns the tab stop so re-entry restores the last focused item;
241
+ * before that, fall back to the first-enabled entry point. Disabled links
242
+ * are always -1; a link used outside a toolbar keeps its natural 0.
243
+ */
244
+ tabindex = computed(() => {
245
+ if (this.disabled() || !this.toolbar) {
246
+ return this.disabled() ? -1 : 0;
247
+ }
248
+ if (this.toolbar.roving.hasActive()) {
249
+ return this.toolbar.roving.tabindexFor(this.#host.nativeElement);
250
+ }
251
+ return this.toolbar.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;
252
+ }, /* @ts-ignore */
253
+ ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
254
+ constructor() {
255
+ if (!this.toolbar) {
256
+ throw new Error('[forty-cdk/toolbar] ForToolbarLink must be used inside a [forToolbar] element.');
257
+ }
258
+ const toolbar = this.toolbar;
259
+ const handle = {
260
+ host: this.#host.nativeElement,
261
+ disabled: this.disabled,
262
+ };
263
+ registerHandle(handle, (h) => toolbar.registerItem(h), (h) => toolbar.unregisterItem(h));
264
+ }
265
+ onClick(event) {
266
+ if (this.disabled()) {
267
+ event.preventDefault();
268
+ }
269
+ }
270
+ onFocus() {
271
+ if (this.disabled() || !this.toolbar) {
272
+ return;
273
+ }
274
+ this.toolbar.roving.setActive(this.#host.nativeElement);
275
+ }
276
+ onKeyDown(event) {
277
+ if (this.disabled() || !this.toolbar) {
278
+ return;
279
+ }
280
+ const action = resolveListNavigation(event, {
281
+ orientation: this.toolbar.orientation(),
282
+ dir: this.toolbar.dir(),
283
+ });
284
+ if (!action) {
285
+ return;
286
+ }
287
+ event.preventDefault();
288
+ this.toolbar.navigate(this.#host.nativeElement, action);
289
+ }
290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
291
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToolbarLink, isStandalone: true, selector: "[forToolbarLink]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "keydown": "onKeyDown($event)", "click": "onClick($event)" }, properties: { "attr.tabindex": "tabindex()", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"\" : null", "attr.data-orientation": "toolbar?.orientation()" } }, exportAs: ["forToolbarLink"], ngImport: i0 });
292
+ }
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarLink, decorators: [{
294
+ type: Directive,
295
+ args: [{
296
+ selector: '[forToolbarLink]',
297
+ exportAs: 'forToolbarLink',
298
+ host: {
299
+ '[attr.tabindex]': 'tabindex()',
300
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
301
+ '[attr.data-disabled]': 'disabled() ? "" : null',
302
+ '[attr.data-orientation]': 'toolbar?.orientation()',
303
+ '(focus)': 'onFocus()',
304
+ '(keydown)': 'onKeyDown($event)',
305
+ '(click)': 'onClick($event)',
306
+ },
307
+ }]
308
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
309
+
310
+ /**
311
+ * Visual separator inside a toolbar. Defaults `orientation` to the opposite
312
+ * of the toolbar's main axis (a vertical line in a horizontal toolbar, and
313
+ * vice versa) — pass `orientation` explicitly to override.
314
+ *
315
+ * Reflects the same role / aria-orientation / data-orientation contract as
316
+ * `ForSeparator`, but anchored to the toolbar's cross-axis so an unconfigured
317
+ * separator renders perpendicular to the toolbar.
318
+ */
319
+ class ForToolbarSeparator {
320
+ #toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });
321
+ /**
322
+ * Axis the separator divides along. When omitted, falls back to the
323
+ * cross-axis of the parent toolbar (horizontal toolbar → vertical
324
+ * separator, and vice versa).
325
+ */
326
+ orientation = input(undefined, /* @ts-ignore */
327
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
328
+ /**
329
+ * When true, the separator is purely visual: it gets `role="none"` and no
330
+ * `aria-orientation`, so assistive tech treats surrounding content as a
331
+ * single flow.
332
+ */
333
+ decorative = input(false, { ...(ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
334
+ /**
335
+ * Cross-axis of the parent toolbar — the orientation an unconfigured
336
+ * separator inherits.
337
+ */
338
+ defaultOrientation = computed(() => this.#toolbar?.orientation() === 'vertical' ? 'horizontal' : 'vertical', /* @ts-ignore */
339
+ ...(ngDevMode ? [{ debugName: "defaultOrientation" }] : /* istanbul ignore next */ []));
340
+ effectiveOrientation = computed(() => this.orientation() ?? this.defaultOrientation(), /* @ts-ignore */
341
+ ...(ngDevMode ? [{ debugName: "effectiveOrientation" }] : /* istanbul ignore next */ []));
342
+ ariaOrientation() {
343
+ if (this.decorative()) {
344
+ return null;
345
+ }
346
+ return this.effectiveOrientation() === 'vertical' ? 'vertical' : null;
347
+ }
348
+ constructor() {
349
+ if (!this.#toolbar) {
350
+ throw new Error('[forty-cdk/toolbar] ForToolbarSeparator must be used inside a [forToolbar] element.');
351
+ }
352
+ }
353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
354
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToolbarSeparator, isStandalone: true, selector: "[forToolbarSeparator]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "decorative() ? \"none\" : \"separator\"", "attr.aria-orientation": "ariaOrientation()", "attr.data-orientation": "effectiveOrientation()" } }, exportAs: ["forToolbarSeparator"], ngImport: i0 });
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToolbarSeparator, decorators: [{
357
+ type: Directive,
358
+ args: [{
359
+ selector: '[forToolbarSeparator]',
360
+ exportAs: 'forToolbarSeparator',
361
+ host: {
362
+ '[attr.role]': 'decorative() ? "none" : "separator"',
363
+ '[attr.aria-orientation]': 'ariaOrientation()',
364
+ '[attr.data-orientation]': 'effectiveOrientation()',
365
+ },
366
+ }]
367
+ }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }] } });
368
+
369
+ /**
370
+ * Generated bundle index. Do not edit.
371
+ */
372
+
373
+ export { FOR_TOOLBAR_CONTEXT, FOR_TOOLBAR_DEFAULTS, ForToolbar, ForToolbarButton, ForToolbarLink, ForToolbarSeparator, provideForToolbarDefaults };
374
+ //# sourceMappingURL=forty-cdk-toolbar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forty-cdk-toolbar.mjs","sources":["../../../projects/forty-cdk/toolbar/src/toolbar-context.ts","../../../projects/forty-cdk/toolbar/src/toolbar-defaults.ts","../../../projects/forty-cdk/toolbar/src/toolbar.ts","../../../projects/forty-cdk/toolbar/src/toolbar-button.ts","../../../projects/forty-cdk/toolbar/src/toolbar-link.ts","../../../projects/forty-cdk/toolbar/src/toolbar-separator.ts","../../../projects/forty-cdk/toolbar/src/forty-cdk-toolbar.ts"],"sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\n\nimport { type HostRovingContext, type HostRovingItemHandle } from 'forty-cdk/core';\n\n/**\n * Per-item handle stored in the toolbar's `Collection`. Buttons, links, and\n * toggle-group items (when nested) register themselves on construction so the\n * toolbar can run roving-tabindex and arrow-key navigation in DOM order.\n *\n * Extends the lifted `HostRovingItemHandle` so any `_internal/` consumer\n * that registers against the toolbar via `FOR_HOST_ROVING_CONTEXT` works\n * without a toolbar-specific handle type.\n */\nexport type ForToolbarItemHandle = HostRovingItemHandle;\n\n/**\n * Coordination contract owned by `ForToolbar`.\n *\n * Extends the neutral `HostRovingContext` (the lifted \"host owns roving\n * navigation for embedded items\" contract in `_internal/`) plus\n * toolbar-specific extras (`loop`). Toolbar provides both\n * `FOR_TOOLBAR_CONTEXT` and `FOR_HOST_ROVING_CONTEXT` from the same\n * instance via `useExisting`, so any neutral consumer (e.g.\n * `ForToggleGroupItem`) and any toolbar-specific consumer pull the same\n * object without taking a cross-primitive import.\n */\nexport interface ForToolbarContext extends HostRovingContext {\n readonly loop: Signal<boolean>;\n}\n\nexport const FOR_TOOLBAR_CONTEXT = new InjectionToken<ForToolbarContext>('FOR_TOOLBAR_CONTEXT');\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant toolbars in the surrounding injector\n * scope. Configure with `provideForToolbarDefaults` either at the\n * application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForToolbarDefaults {\n /**\n * Whether arrow navigation wraps around past the first / last enabled\n * item. Matches the WAI-ARIA Toolbar APG default.\n */\n loop: boolean;\n}\n\n/**\n * Library fallback for toolbar defaults, read at the root injector when no\n * consumer has called `provideForToolbarDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_TOOLBAR_FALLBACK_DEFAULTS: ForToolbarDefaults = {\n loop: true,\n};\n\nconst { token, provideDefaults } = createDefaults<ForToolbarDefaults>(\n 'FOR_TOOLBAR_DEFAULTS',\n FOR_TOOLBAR_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved toolbar defaults for the current scope. */\nexport const FOR_TOOLBAR_DEFAULTS = token;\n\n/**\n * Configures forty-cdk toolbar defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForToolbarDefaults(defaults: Partial<ForToolbarDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\n\nimport {\n Collection,\n firstEnabledHost,\n type ListNavigationAction,\n type WritingDirection,\n nextEnabledHandle,\n FOR_HOST_ROVING_CONTEXT,\n reconcileRovingActive,\n RovingTabindex,\n injectTextDirection,\n} from 'forty-cdk/core';\nimport {\n FOR_TOOLBAR_CONTEXT,\n type ForToolbarContext,\n type ForToolbarItemHandle,\n} from './toolbar-context';\nimport { FOR_TOOLBAR_DEFAULTS } from './toolbar-defaults';\n\n/**\n * Headless implementation of the\n * [WAI-ARIA Toolbar pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/).\n *\n * Hosts buttons, links, separators, and (optionally) a `[forToggleGroup]`\n * for grouped toggles. Manages roving tabindex across all interactive\n * children so the toolbar takes a single Tab stop and arrow keys move\n * focus inside.\n *\n * Composition with `ForToggleGroup` is automatic: items inside a\n * `[forToggleGroup]` whose ancestor is `[forToolbar]` register with the\n * toolbar's roving and use its keyboard navigation, so arrow keys move\n * fluidly across the whole bar.\n *\n * @example\n * ```html\n * <div forToolbar aria-label=\"Formatting\">\n * <button forToolbarButton>Undo</button>\n * <button forToolbarButton>Redo</button>\n * <span forToolbarSeparator></span>\n * <div forToggleGroup multiple>\n * <button forToggleGroupItem value=\"bold\">B</button>\n * <button forToggleGroupItem value=\"italic\">I</button>\n * </div>\n * <span forToolbarSeparator></span>\n * <a forToolbarLink href=\"/help\">Help</a>\n * </div>\n * ```\n */\n@Directive({\n selector: '[forToolbar]',\n exportAs: 'forToolbar',\n host: {\n role: 'toolbar',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.dir]': 'dir()',\n },\n providers: [\n { provide: FOR_TOOLBAR_CONTEXT, useExisting: ForToolbar },\n { provide: FOR_HOST_ROVING_CONTEXT, useExisting: FOR_TOOLBAR_CONTEXT },\n ],\n})\nexport class ForToolbar implements ForToolbarContext {\n readonly #defaults = inject(FOR_TOOLBAR_DEFAULTS);\n\n /**\n * Manual `aria-label` for the toolbar. Use this when no visible label element\n * exists; otherwise prefer pointing `aria-labelledby` at one. A `null`\n * (default) or empty value emits no attribute. Matches the uniform labelling\n * input on `ForListbox` / `ForMenubar`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /**\n * Writing direction. When unset (default `null`), the inherited ambient\n * direction is resolved from the nearest ancestor carrying a `dir` attribute\n * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.\n * The resolved value is reflected to the host `dir` attribute and swaps\n * ArrowLeft / ArrowRight semantics in RTL.\n */\n readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n readonly dir = injectTextDirection(this._dirInput);\n /**\n * Whether arrow navigation wraps around past the first / last enabled\n * item. Default `true`. The default is read from `provideForToolbarDefaults`\n * for the surrounding scope.\n */\n readonly loop = input(this.#defaults.loop, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Roving-tabindex tracker shared by every toolbar item (buttons, links, and\n * nested toggle-group items). Items promote themselves to active on\n * `(focus)` and read `active()` in their tabindex computed, so re-entry\n * (Shift+Tab back into the toolbar) restores the last focused item —\n * matching Tabs / Tree. Before any focus, `active()` is `null` and the\n * tabindex falls back to the first-enabled entry point.\n */\n readonly roving = new RovingTabindex();\n\n readonly #items = new Collection<ForToolbarItemHandle>();\n\n readonly #firstEnabledHost = computed(() => firstEnabledHost(this.#items.items()));\n\n constructor() {\n reconcileRovingActive(this.roving, this.#items.items);\n }\n\n navigate(currentItem: HTMLElement, action: ListNavigationAction): void {\n if (this.disabled()) {\n return;\n }\n const target = nextEnabledHandle(this.#items.items(), currentItem, action, {\n loop: this.loop(),\n });\n target?.host.focus();\n }\n\n isFirstFocusableItem(el: HTMLElement): boolean {\n return this.#firstEnabledHost() === el;\n }\n\n registerItem(handle: ForToolbarItemHandle): void {\n this.#items.register(handle);\n }\n\n unregisterItem(handle: ForToolbarItemHandle): void {\n this.#items.unregister(handle);\n this.roving.unregister(handle.host);\n }\n}\n","import { booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport { registerHandle, reflectDisabled, resolveListNavigation } from 'forty-cdk/core';\nimport { FOR_TOOLBAR_CONTEXT } from './toolbar-context';\n\n/**\n * Plain push button inside `[forToolbar]`. Apply on `<button>` so Enter /\n * Space activate via native semantics. The directive forces `type=\"button\"`\n * to avoid accidental form submission inside a `<form>`.\n */\n@Directive({\n selector: '[forToolbarButton]',\n exportAs: 'forToolbarButton',\n host: {\n type: 'button',\n '[attr.tabindex]': 'tabindex()',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.data-orientation]': 'toolbar?.orientation()',\n '(focus)': 'onFocus()',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ForToolbarButton {\n protected readonly toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Per-item disabled (in addition to the toolbar's `disabled`). */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly effectiveDisabled = computed(\n () => this.disabled() || (this.toolbar?.disabled() ?? false),\n );\n\n /**\n * Tabindex per APG: once any toolbar item has been focused, the roving\n * tracker owns the tab stop so re-entry restores the last focused item;\n * before that, fall back to the first-enabled entry point. Disabled items\n * are always -1; a button used outside a toolbar keeps its natural 0.\n */\n readonly tabindex = computed<-1 | 0>(() => {\n if (this.effectiveDisabled() || !this.toolbar) {\n return this.effectiveDisabled() ? -1 : 0;\n }\n if (this.toolbar.roving.hasActive()) {\n return this.toolbar.roving.tabindexFor(this.#host.nativeElement);\n }\n return this.toolbar.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;\n });\n\n constructor() {\n if (!this.toolbar) {\n throw new Error(\n '[forty-cdk/toolbar] ForToolbarButton must be used inside a [forToolbar] element.',\n );\n }\n const toolbar = this.toolbar;\n const handle = {\n host: this.#host.nativeElement,\n disabled: this.effectiveDisabled,\n };\n registerHandle(\n handle,\n (h) => toolbar.registerItem(h),\n (h) => toolbar.unregisterItem(h),\n );\n reflectDisabled(this.effectiveDisabled);\n }\n\n protected onFocus(): void {\n if (this.effectiveDisabled() || !this.toolbar) {\n return;\n }\n this.toolbar.roving.setActive(this.#host.nativeElement);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.effectiveDisabled() || !this.toolbar) {\n return;\n }\n const action = resolveListNavigation(event, {\n orientation: this.toolbar.orientation(),\n dir: this.toolbar.dir(),\n });\n if (!action) {\n return;\n }\n event.preventDefault();\n this.toolbar.navigate(this.#host.nativeElement, action);\n }\n}\n","import { booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport { registerHandle, resolveListNavigation } from 'forty-cdk/core';\nimport { FOR_TOOLBAR_CONTEXT } from './toolbar-context';\n\n/**\n * Hyperlink inside `[forToolbar]`. Apply on `<a>`. Honors the toolbar's\n * roving tabindex and arrow-key navigation; `Enter` follows the link via\n * native semantics.\n */\n@Directive({\n selector: '[forToolbarLink]',\n exportAs: 'forToolbarLink',\n host: {\n '[attr.tabindex]': 'tabindex()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.data-orientation]': 'toolbar?.orientation()',\n '(focus)': 'onFocus()',\n '(keydown)': 'onKeyDown($event)',\n '(click)': 'onClick($event)',\n },\n})\nexport class ForToolbarLink {\n protected readonly toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * When true the link is announced as disabled and clicks are suppressed.\n * Native `<a>` doesn't have a `disabled` attribute — we rely on\n * `aria-disabled` and prevent navigation in the click handler.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Tabindex per APG: once any toolbar item has been focused, the roving\n * tracker owns the tab stop so re-entry restores the last focused item;\n * before that, fall back to the first-enabled entry point. Disabled links\n * are always -1; a link used outside a toolbar keeps its natural 0.\n */\n readonly tabindex = computed<-1 | 0>(() => {\n if (this.disabled() || !this.toolbar) {\n return this.disabled() ? -1 : 0;\n }\n if (this.toolbar.roving.hasActive()) {\n return this.toolbar.roving.tabindexFor(this.#host.nativeElement);\n }\n return this.toolbar.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;\n });\n\n constructor() {\n if (!this.toolbar) {\n throw new Error(\n '[forty-cdk/toolbar] ForToolbarLink must be used inside a [forToolbar] element.',\n );\n }\n const toolbar = this.toolbar;\n const handle = {\n host: this.#host.nativeElement,\n disabled: this.disabled,\n };\n registerHandle(\n handle,\n (h) => toolbar.registerItem(h),\n (h) => toolbar.unregisterItem(h),\n );\n }\n\n protected onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n }\n }\n\n protected onFocus(): void {\n if (this.disabled() || !this.toolbar) {\n return;\n }\n this.toolbar.roving.setActive(this.#host.nativeElement);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.disabled() || !this.toolbar) {\n return;\n }\n const action = resolveListNavigation(event, {\n orientation: this.toolbar.orientation(),\n dir: this.toolbar.dir(),\n });\n if (!action) {\n return;\n }\n event.preventDefault();\n this.toolbar.navigate(this.#host.nativeElement, action);\n }\n}\n","import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\n\nimport { FOR_TOOLBAR_CONTEXT } from './toolbar-context';\n\n/**\n * Visual separator inside a toolbar. Defaults `orientation` to the opposite\n * of the toolbar's main axis (a vertical line in a horizontal toolbar, and\n * vice versa) — pass `orientation` explicitly to override.\n *\n * Reflects the same role / aria-orientation / data-orientation contract as\n * `ForSeparator`, but anchored to the toolbar's cross-axis so an unconfigured\n * separator renders perpendicular to the toolbar.\n */\n@Directive({\n selector: '[forToolbarSeparator]',\n exportAs: 'forToolbarSeparator',\n host: {\n '[attr.role]': 'decorative() ? \"none\" : \"separator\"',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '[attr.data-orientation]': 'effectiveOrientation()',\n },\n})\nexport class ForToolbarSeparator {\n readonly #toolbar = inject(FOR_TOOLBAR_CONTEXT, { optional: true });\n\n /**\n * Axis the separator divides along. When omitted, falls back to the\n * cross-axis of the parent toolbar (horizontal toolbar → vertical\n * separator, and vice versa).\n */\n readonly orientation = input<'horizontal' | 'vertical' | undefined>(undefined);\n\n /**\n * When true, the separator is purely visual: it gets `role=\"none\"` and no\n * `aria-orientation`, so assistive tech treats surrounding content as a\n * single flow.\n */\n readonly decorative = input(false, { transform: booleanAttribute });\n\n /**\n * Cross-axis of the parent toolbar — the orientation an unconfigured\n * separator inherits.\n */\n readonly defaultOrientation = computed<'horizontal' | 'vertical'>(() =>\n this.#toolbar?.orientation() === 'vertical' ? 'horizontal' : 'vertical',\n );\n\n protected readonly effectiveOrientation = computed<'horizontal' | 'vertical'>(\n () => this.orientation() ?? this.defaultOrientation(),\n );\n\n protected ariaOrientation(): 'vertical' | null {\n if (this.decorative()) {\n return null;\n }\n return this.effectiveOrientation() === 'vertical' ? 'vertical' : null;\n }\n\n constructor() {\n if (!this.#toolbar) {\n throw new Error(\n '[forty-cdk/toolbar] ForToolbarSeparator must be used inside a [forToolbar] element.',\n );\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MA8Ba,mBAAmB,GAAG,IAAI,cAAc,CAAoB,qBAAqB;;ACZ9F;;;;AAIG;AACI,MAAM,6BAA6B,GAAuB;AAC/D,IAAA,IAAI,EAAE,IAAI;CACX;AAED,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,cAAc,CAC/C,sBAAsB,EACtB,6BAA6B,CAC9B;AAED;AACO,MAAM,oBAAoB,GAAG;AAEpC;;;;AAIG;AACG,SAAU,yBAAyB,CAAC,QAAA,GAAwC,EAAE,EAAA;AAClF,IAAA,OAAO,eAAe,CAAC,QAAQ,CAAC;AAClC;;ACtBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;MAkBU,UAAU,CAAA;AACZ,IAAA,SAAS,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAEjD;;;;;AAKG;IACM,SAAS,GAAG,KAAK,CAAgB,IAAI;kFAAC;IAEtC,WAAW,GAAG,KAAK,CAA4B,YAAY;oFAAC;AAErE;;;;;;AAMG;IACM,SAAS,GAAG,KAAK,CAA0B,IAAI,iFAAI,KAAK,EAAE,KAAK,EAAA,CAAG;AAClE,IAAA,GAAG,GAAG,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC;AAClD;;;;AAIG;AACM,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,gBAAgB,GAAG;IAClE,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjE;;;;;;;AAOG;AACM,IA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