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 @@
1
+ {"version":3,"file":"forty-cdk-scroll-area.mjs","sources":["../../../projects/forty-cdk/scroll-area/src/scroll-area-context.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-defaults.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-viewport.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-content.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-scrollbar.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-thumb.ts","../../../projects/forty-cdk/scroll-area/src/scroll-area-corner.ts","../../../projects/forty-cdk/scroll-area/src/forty-cdk-scroll-area.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { type WritingDirection } from 'forty-cdk/core';\n\nexport type ForScrollAreaType = 'auto' | 'always' | 'scroll' | 'hover';\nexport type ForScrollbarOrientation = 'horizontal' | 'vertical';\n\nexport interface ForScrollAreaContext {\n readonly type: Signal<ForScrollAreaType>;\n readonly scrollHideDelay: Signal<number>;\n readonly dir: Signal<WritingDirection>;\n\n /** The scrolling element (registered by `ForScrollAreaViewport`). */\n readonly viewport: Signal<HTMLElement | null>;\n /** The content element (registered by `ForScrollAreaContent`, observed by the viewport). */\n readonly content: Signal<HTMLElement | null>;\n /** Live scroll offset of the viewport. */\n readonly scrollLeft: Signal<number>;\n readonly scrollTop: Signal<number>;\n /** Live size measurements of the viewport. */\n readonly clientWidth: Signal<number>;\n readonly clientHeight: Signal<number>;\n readonly scrollWidth: Signal<number>;\n readonly scrollHeight: Signal<number>;\n\n /** True while the user is hovering anywhere on the root (for `type=\"hover\"`). */\n readonly hovering: Signal<boolean>;\n /** True for a short window after the most recent scroll (for `type=\"scroll\"`). */\n readonly scrolling: Signal<boolean>;\n\n registerViewport(el: HTMLElement | null): void;\n registerContent(el: HTMLElement): void;\n unregisterContent(el: HTMLElement): void;\n reportScroll(left: number, top: number): void;\n reportSize(clientW: number, clientH: number, scrollW: number, scrollH: number): void;\n noteUserScroll(): void;\n}\n\nexport const FOR_SCROLL_AREA_CONTEXT = new InjectionToken<ForScrollAreaContext>(\n 'FOR_SCROLL_AREA_CONTEXT',\n);\n\nexport function injectScrollAreaContext(piece: string): ForScrollAreaContext {\n const ctx = inject(FOR_SCROLL_AREA_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n `[forty-cdk/scroll-area] ${piece} must be used inside a [forScrollArea] element.`,\n );\n }\n return ctx;\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant scroll areas in the surrounding injector\n * scope. Configure with `provideForScrollAreaDefaults` either at the\n * application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForScrollAreaDefaults {\n /**\n * Milliseconds after the most recent scroll before the synthetic\n * scrollbars fade. Applies when `type` is `'scroll'` or `'hover'`.\n */\n scrollHideDelay: number;\n}\n\n/**\n * Library fallback for scroll area defaults, read at the root injector when no\n * consumer has called `provideForScrollAreaDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_SCROLL_AREA_FALLBACK_DEFAULTS: ForScrollAreaDefaults = {\n scrollHideDelay: 600,\n};\n\nconst { token, provideDefaults } = createDefaults<ForScrollAreaDefaults>(\n 'FOR_SCROLL_AREA_DEFAULTS',\n FOR_SCROLL_AREA_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved scroll-area defaults for the current scope. */\nexport const FOR_SCROLL_AREA_DEFAULTS = token;\n\n/**\n * Configures forty-cdk scroll-area 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 provideForScrollAreaDefaults(\n defaults: Partial<ForScrollAreaDefaults> = {},\n): Provider[] {\n return provideDefaults(defaults);\n}\n","import { DestroyRef, Directive, inject, input, numberAttribute, signal } from '@angular/core';\n\nimport { type WritingDirection, injectTextDirection } from 'forty-cdk/core';\nimport {\n FOR_SCROLL_AREA_CONTEXT,\n type ForScrollAreaContext,\n type ForScrollAreaType,\n} from './scroll-area-context';\nimport { FOR_SCROLL_AREA_DEFAULTS } from './scroll-area-defaults';\n\n/**\n * Root of the custom-scrollbar primitive. Owns the viewport reference,\n * scroll geometry signals, and visibility state for the synthetic\n * scrollbars.\n *\n * Native scrollbars on the inner viewport are hidden via styles injected\n * by `[forScrollAreaViewport]` (the only place in forty-cdk that\n * imperatively touches CSS); the consumer styles `[forScrollAreaThumb]`\n * however they like.\n *\n * @example\n * ```html\n * <div forScrollArea>\n * <div forScrollAreaViewport>\n * <div forScrollAreaContent>… long content …</div>\n * </div>\n * <div forScrollAreaScrollbar orientation=\"vertical\">\n * <div forScrollAreaThumb></div>\n * </div>\n * <div forScrollAreaScrollbar orientation=\"horizontal\">\n * <div forScrollAreaThumb></div>\n * </div>\n * <div forScrollAreaCorner></div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[forScrollArea]',\n exportAs: 'forScrollArea',\n host: {\n '[attr.data-type]': 'type()',\n '[attr.dir]': 'dir()',\n '(pointerenter)': 'onPointerEnter()',\n '(pointerleave)': 'onPointerLeave()',\n },\n providers: [{ provide: FOR_SCROLL_AREA_CONTEXT, useExisting: ForScrollArea }],\n})\nexport class ForScrollArea implements ForScrollAreaContext {\n readonly #defaults = inject(FOR_SCROLL_AREA_DEFAULTS);\n\n /**\n * When the synthetic scrollbars are visible:\n * - `auto`: shown whenever the axis overflows, regardless of interaction;\n * self-hides when the content fits.\n * - `always`: the scrollbar (and corner) stay mounted and\n * `data-state=\"visible\"` regardless of overflow — a stable, always-painted\n * track. When the axis does not overflow the thumb fills\n * the full track and dragging is a no-op. The library is headless and does\n * not own layout, so to actually *reserve* the gutter (no content shift\n * when crossing the overflow boundary) the consumer lays the scrollbar out\n * in flow — see the ScrollArea README's grid example.\n * - `scroll`: shown during scroll, faded after `scrollHideDelay` ms.\n * - `hover`: shown while the cursor is over the area (and during scroll).\n */\n readonly type = input<ForScrollAreaType>('hover');\n\n /**\n * ms after the most recent scroll before scrollbars fade (only\n * `type=\"scroll\"` and `\"hover\"`). The default is read from\n * `provideForScrollAreaDefaults` for the surrounding scope.\n */\n readonly scrollHideDelay = input(this.#defaults.scrollHideDelay, {\n transform: numberAttribute,\n });\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 positions\n * the vertical scrollbar on the left in RTL.\n */\n readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n readonly dir = injectTextDirection(this._dirInput);\n\n readonly #viewport = signal<HTMLElement | null>(null);\n readonly viewport = this.#viewport.asReadonly();\n\n readonly #content = signal<HTMLElement | null>(null);\n readonly content = this.#content.asReadonly();\n\n readonly #scrollLeft = signal(0);\n readonly #scrollTop = signal(0);\n readonly scrollLeft = this.#scrollLeft.asReadonly();\n readonly scrollTop = this.#scrollTop.asReadonly();\n\n readonly #clientW = signal(0);\n readonly #clientH = signal(0);\n readonly #scrollW = signal(0);\n readonly #scrollH = signal(0);\n readonly clientWidth = this.#clientW.asReadonly();\n readonly clientHeight = this.#clientH.asReadonly();\n readonly scrollWidth = this.#scrollW.asReadonly();\n readonly scrollHeight = this.#scrollH.asReadonly();\n\n readonly #hovering = signal(false);\n readonly hovering = this.#hovering.asReadonly();\n\n readonly #scrolling = signal(false);\n readonly scrolling = this.#scrolling.asReadonly();\n #scrollTimer: ReturnType<typeof setTimeout> | null = null;\n\n registerViewport(el: HTMLElement | null): void {\n this.#viewport.set(el);\n }\n\n registerContent(el: HTMLElement): void {\n this.#content.set(el);\n }\n\n unregisterContent(el: HTMLElement): void {\n // Only clear if the unregistering element is the one we currently track,\n // so a late teardown of an old content piece doesn't blow away a freshly\n // registered replacement.\n if (this.#content() === el) {\n this.#content.set(null);\n }\n }\n\n reportScroll(left: number, top: number): void {\n this.#scrollLeft.set(left);\n this.#scrollTop.set(top);\n }\n\n reportSize(clientW: number, clientH: number, scrollW: number, scrollH: number): void {\n this.#clientW.set(clientW);\n this.#clientH.set(clientH);\n this.#scrollW.set(scrollW);\n this.#scrollH.set(scrollH);\n }\n\n noteUserScroll(): void {\n this.#scrolling.set(true);\n if (this.#scrollTimer !== null) clearTimeout(this.#scrollTimer);\n this.#scrollTimer = setTimeout(\n () => {\n this.#scrollTimer = null;\n this.#scrolling.set(false);\n },\n Math.max(0, this.scrollHideDelay()),\n );\n }\n\n protected onPointerEnter(): void {\n this.#hovering.set(true);\n }\n\n protected onPointerLeave(): void {\n this.#hovering.set(false);\n }\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n if (this.#scrollTimer !== null) clearTimeout(this.#scrollTimer);\n });\n }\n}\n","import {\n DOCUMENT,\n PLATFORM_ID,\n afterNextRender,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\nconst HIDE_NATIVE_SCROLLBARS_STYLE_ID = 'for-scroll-area-hide-native';\nconst HIDE_NATIVE_SCROLLBARS_CSS = `\n [forScrollAreaViewport] {\n overflow: scroll;\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n [forScrollAreaViewport]::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n }\n`;\n\nfunction injectHidingStylesOnce(doc: Document): void {\n if (doc.getElementById(HIDE_NATIVE_SCROLLBARS_STYLE_ID)) return;\n const style = doc.createElement('style');\n style.id = HIDE_NATIVE_SCROLLBARS_STYLE_ID;\n style.textContent = HIDE_NATIVE_SCROLLBARS_CSS;\n doc.head.appendChild(style);\n}\n\n/**\n * The actually-scrolling element. Hides native scrollbars (the only place\n * in forty-cdk that ships CSS — see README), tracks scroll position, and\n * reports geometry to the root so the synthetic scrollbar can render.\n */\n@Directive({\n selector: '[forScrollAreaViewport]',\n exportAs: 'forScrollAreaViewport',\n host: {\n '(scroll)': 'onScroll()',\n },\n})\nexport class ForScrollAreaViewport {\n readonly #ctx = injectScrollAreaContext('ForScrollAreaViewport');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly #document = inject(DOCUMENT);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n if (this.#isBrowser) {\n injectHidingStylesOnce(this.#document);\n }\n this.#ctx.registerViewport(this.#host);\n inject(DestroyRef).onDestroy(() => this.#ctx.registerViewport(null));\n\n afterNextRender(() => {\n this.#syncScroll();\n this.#syncSize();\n });\n\n // Track size changes via ResizeObserver — simpler / lighter than\n // polling, and consistent with the rest of the library's reactive\n // patterns. Browser-only API; no-op on server.\n //\n // The content element is observed only when the consumer explicitly\n // marks it with `[forScrollAreaContent]`. Without that marker we skip\n // content observation entirely (rather than guessing `firstElementChild`,\n // which silently breaks on layered / multi-sibling layouts).\n if (this.#isBrowser && typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.#syncSize());\n ro.observe(this.#host);\n inject(DestroyRef).onDestroy(() => ro.disconnect());\n\n // Re-attach the observer whenever the registered content element\n // changes (registers, unregisters, or swaps). `effect` is the right\n // primitive here: this is a DOM imperative side effect, not derived\n // state — see CLAUDE.md \"Never propagate state inside `effect()`\".\n let observedContent: HTMLElement | null = null;\n effect(() => {\n const next = this.#ctx.content();\n if (next === observedContent) return;\n if (observedContent) ro.unobserve(observedContent);\n if (next) ro.observe(next);\n observedContent = next;\n });\n }\n }\n\n protected onScroll(): void {\n this.#syncScroll();\n this.#ctx.noteUserScroll();\n }\n\n #syncScroll(): void {\n this.#ctx.reportScroll(this.#host.scrollLeft, this.#host.scrollTop);\n }\n\n #syncSize(): void {\n this.#ctx.reportSize(\n this.#host.clientWidth,\n this.#host.clientHeight,\n this.#host.scrollWidth,\n this.#host.scrollHeight,\n );\n this.#syncScroll();\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\n/**\n * Marks the content element inside `[forScrollAreaViewport]`. The viewport\n * observes this element with a `ResizeObserver` so `scrollWidth` /\n * `scrollHeight` updates when content reflows.\n *\n * Required for the synthetic scrollbar to react to content resizes — without\n * it, the viewport falls back to no observation and scrollbars stay sized to\n * whatever the layout reported on first render.\n */\n@Directive({\n selector: '[forScrollAreaContent]',\n exportAs: 'forScrollAreaContent',\n})\nexport class ForScrollAreaContent {\n readonly #ctx = injectScrollAreaContext('ForScrollAreaContent');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n constructor() {\n this.#ctx.registerContent(this.#host);\n inject(DestroyRef).onDestroy(() => this.#ctx.unregisterContent(this.#host));\n }\n}\n","import { computed, Directive, ElementRef, inject, input, signal } from '@angular/core';\n\nimport { injectElementSize } from 'forty-cdk/core';\nimport { injectScrollAreaContext, type ForScrollbarOrientation } from './scroll-area-context';\n\n/**\n * Synthetic scrollbar track. Reflects `data-orientation`, `data-state`\n * (`visible` / `hidden`), and exposes its host element via the orientation\n * input so the thumb can compute geometry.\n *\n * The element is fully removed (`hidden`) when the corresponding axis has\n * no overflow *and* `type` is not `'always'` — there is no scrollbar to\n * render. Under `type=\"always\"` the track stays painted regardless of\n * overflow, so the consumer's reserved gutter is never empty.\n * Visibility is enforced with an inline `display: none` (which beats any\n * author `display` rule a consumer applies via a class) in addition to the\n * `hidden` attribute that removes it from the a11y tree.\n */\n@Directive({\n selector: '[forScrollAreaScrollbar]',\n exportAs: 'forScrollAreaScrollbar',\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-state]': 'state()',\n '[hidden]': '!painted()',\n '[style.display]': 'painted() ? null : \"none\"',\n },\n})\nexport class ForScrollAreaScrollbar {\n readonly orientation = input.required<ForScrollbarOrientation>();\n readonly ctx = injectScrollAreaContext('ForScrollAreaScrollbar');\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /**\n * Reactive size of the track itself, measured independently of the viewport.\n * The thumb's size and travel are computed against the *track* length, which\n * the consumer is free to lay out shorter than the viewport (e.g. insets, a\n * reserved corner, padding), so the viewport's reported client dimensions are\n * not a substitute — the track must be observed directly.\n *\n * The target is a constant (`this.host` never changes), so `injectElementSize`'s\n * target-swap branch is dead weight here; it is reused only for its\n * `ResizeObserver` plumbing and change-deduped emission.\n */\n readonly #hostRef = signal<HTMLElement | null>(this.host);\n readonly size = injectElementSize(this.#hostRef);\n\n readonly #dragging = signal(false);\n /** True while the thumb is being dragged. Pins the track visible / painted. */\n readonly dragging = this.#dragging.asReadonly();\n\n /**\n * Marks the track as actively dragged so an in-flight drag is never aborted\n * by the scrollbar self-hiding (`type=\"hover\"` / `\"scroll\"` fading the track,\n * or a consumer `display:none` on `data-state=\"hidden\"`). Called by the thumb\n * on pointer-down / drag-end.\n */\n setDragging(dragging: boolean): void {\n this.#dragging.set(dragging);\n }\n\n readonly hasOverflow = computed<boolean>(() => {\n if (this.orientation() === 'horizontal') {\n return this.ctx.scrollWidth() - this.ctx.clientWidth() > 1;\n }\n return this.ctx.scrollHeight() - this.ctx.clientHeight() > 1;\n });\n\n /**\n * Whether the track is rendered at all. `'always'` keeps it painted\n * unconditionally (a stable, always-present track); every\n * other `type` paints only the axis that actually overflows. An in-flight\n * thumb drag also pins it painted so the gesture is never aborted by the\n * track self-removing. Gates both the `hidden` attribute and the inline\n * `display: none` self-removal.\n */\n readonly painted = computed<boolean>(\n () => this.dragging() || this.ctx.type() === 'always' || this.hasOverflow(),\n );\n\n /**\n * `'visible' | 'hidden'`. An in-flight thumb drag forces `'visible'` so a\n * consumer fade on `data-state=\"hidden\"` can't hide the track mid-gesture.\n * Otherwise: `'always'` resolves to `'visible'` regardless of overflow — the\n * track is permanently present. `'auto'` shows whenever the axis overflows;\n * `'hover'` / `'scroll'` additionally gate on the interaction signals. A\n * non-overflowing axis is `'hidden'` for every mode except `'always'`.\n */\n readonly state = computed<'visible' | 'hidden'>(() => {\n if (this.dragging()) return 'visible';\n switch (this.ctx.type()) {\n case 'always':\n return 'visible';\n case 'auto':\n return this.hasOverflow() ? 'visible' : 'hidden';\n case 'hover':\n return this.hasOverflow() && (this.ctx.hovering() || this.ctx.scrolling())\n ? 'visible'\n : 'hidden';\n case 'scroll':\n return this.hasOverflow() && this.ctx.scrolling() ? 'visible' : 'hidden';\n }\n });\n}\n","import {\n computed,\n DestroyRef,\n DOCUMENT,\n Directive,\n ElementRef,\n inject,\n signal,\n} from '@angular/core';\n\nimport { ForScrollAreaScrollbar } from './scroll-area-scrollbar';\n\nconst MIN_THUMB_SIZE = 8;\n\nfunction injectRequiredScrollbar(): ForScrollAreaScrollbar {\n const scrollbar = inject(ForScrollAreaScrollbar, { optional: true });\n if (!scrollbar) {\n throw new Error(\n '[forty-cdk/scroll-area] ForScrollAreaThumb must be used inside a [forScrollAreaScrollbar] element.',\n );\n }\n return scrollbar;\n}\n\n/**\n * The draggable thumb inside a `[forScrollAreaScrollbar]`. Sizes itself\n * proportionally to viewport / content and translates along the track\n * based on `scrollLeft` / `scrollTop`. Pointer-drag scrolls the viewport\n * proportionally.\n */\n@Directive({\n selector: '[forScrollAreaThumb]',\n exportAs: 'forScrollAreaThumb',\n host: {\n '[style.position]': '\"absolute\"',\n '[style.width.px]': 'widthPx()',\n '[style.height.px]': 'heightPx()',\n '[style.left.px]': 'leftPx()',\n '[style.top.px]': 'topPx()',\n '[style.transform]': 'transformValue()',\n '[attr.data-orientation]': 'scrollbar.orientation()',\n '[attr.data-state]': 'scrollbar.state()',\n '(pointerdown)': 'onPointerDown($event)',\n '(lostpointercapture)': 'onLostPointerCapture()',\n },\n})\nexport class ForScrollAreaThumb {\n readonly scrollbar = injectRequiredScrollbar();\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly #document = inject(DOCUMENT);\n\n readonly #dragging = signal(false);\n #dragStartPointer = 0;\n #dragStartScroll = 0;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.#endDrag());\n }\n\n /** Track length in CSS pixels (reactive — derived from the scrollbar's measured size). */\n readonly #trackLength = computed<number>(() => {\n const size = this.scrollbar.size();\n if (!size) return 0;\n return this.scrollbar.orientation() === 'horizontal' ? size.width : size.height;\n });\n\n readonly #ratio = computed<number>(() => {\n const ctx = this.scrollbar.ctx;\n if (this.scrollbar.orientation() === 'horizontal') {\n const sw = ctx.scrollWidth();\n if (sw <= 0) return 0;\n return Math.min(1, ctx.clientWidth() / sw);\n }\n const sh = ctx.scrollHeight();\n if (sh <= 0) return 0;\n return Math.min(1, ctx.clientHeight() / sh);\n });\n\n readonly #thumbSize = computed<number>(() => {\n const tl = this.#trackLength();\n const r = this.#ratio();\n if (tl === 0 || r === 0) return 0;\n return Math.max(MIN_THUMB_SIZE, Math.floor(tl * r));\n });\n\n readonly #thumbOffset = computed<number>(() => {\n const ctx = this.scrollbar.ctx;\n const tl = this.#trackLength();\n const tsz = this.#thumbSize();\n if (this.scrollbar.orientation() === 'horizontal') {\n const max = ctx.scrollWidth() - ctx.clientWidth();\n if (max <= 0) return 0;\n const left = this.#normalizeScrollLeft(ctx.scrollLeft(), max);\n return (left / max) * (tl - tsz) || 0;\n }\n const max = ctx.scrollHeight() - ctx.clientHeight();\n if (max <= 0) return 0;\n return (ctx.scrollTop() / max) * (tl - tsz) || 0;\n });\n\n /**\n * Normalise the viewport's `scrollLeft` to a left-edge-origin value in\n * `[0, max]`. In LTR `scrollLeft` is already left-origin. In RTL the browser\n * reports `scrollLeft` in the negative model (`0` at rest with the content's\n * right edge flush, `-max` when scrolled fully left), so a left-origin\n * position is `scrollLeft + max` — `max` at rest (thumb pinned to the right)\n * down to `0` when scrolled forward.\n */\n #normalizeScrollLeft(scrollLeft: number, max: number): number {\n return this.scrollbar.ctx.dir() === 'rtl' ? scrollLeft + max : scrollLeft;\n }\n\n protected widthPx(): number | null {\n return this.scrollbar.orientation() === 'horizontal' ? this.#thumbSize() : null;\n }\n protected heightPx(): number | null {\n return this.scrollbar.orientation() === 'vertical' ? this.#thumbSize() : null;\n }\n protected leftPx(): number | null {\n return this.scrollbar.orientation() === 'horizontal' ? 0 : null;\n }\n protected topPx(): number | null {\n return this.scrollbar.orientation() === 'vertical' ? 0 : null;\n }\n protected transformValue(): string {\n if (this.scrollbar.orientation() === 'horizontal') {\n return `translateX(${this.#thumbOffset()}px)`;\n }\n return `translateY(${this.#thumbOffset()}px)`;\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (event.button !== 0) return;\n event.preventDefault();\n this.#dragging.set(true);\n this.scrollbar.setDragging(true);\n this.#host.setPointerCapture(event.pointerId);\n this.#dragStartPointer =\n this.scrollbar.orientation() === 'horizontal' ? event.clientX : event.clientY;\n const ctx = this.scrollbar.ctx;\n this.#dragStartScroll =\n this.scrollbar.orientation() === 'horizontal' ? ctx.scrollLeft() : ctx.scrollTop();\n // Listen on the owner document, not the thumb element: pointer capture is\n // set on the thumb (so the gesture stays bound to this pointer), but the\n // captured node can be removed mid-drag when the scrollbar self-hides\n // (`type=\"hover\"` / `\"scroll\"`). Document-level listeners keep firing after\n // that removal, so the drag is not silently aborted. `lostpointercapture`\n // tears the gesture down if capture is otherwise lost.\n const doc = this.#document;\n doc.addEventListener('pointermove', this.#onPointerMove);\n doc.addEventListener('pointerup', this.#onPointerUp);\n doc.addEventListener('pointercancel', this.#onPointerUp);\n }\n\n protected onLostPointerCapture(): void {\n this.#endDrag();\n }\n\n readonly #onPointerMove = (event: PointerEvent): void => {\n if (!this.#dragging()) return;\n const ctx = this.scrollbar.ctx;\n const viewport = ctx.viewport();\n if (!viewport) return;\n const tl = this.#trackLength();\n const tsz = this.#thumbSize();\n if (tl - tsz <= 0) return;\n if (this.scrollbar.orientation() === 'horizontal') {\n const delta = event.clientX - this.#dragStartPointer;\n const scrollMax = ctx.scrollWidth() - ctx.clientWidth();\n const scrollDelta = (delta / (tl - tsz)) * scrollMax;\n viewport.scrollLeft = this.#dragStartScroll + scrollDelta;\n } else {\n const delta = event.clientY - this.#dragStartPointer;\n const scrollMax = ctx.scrollHeight() - ctx.clientHeight();\n const scrollDelta = (delta / (tl - tsz)) * scrollMax;\n viewport.scrollTop = this.#dragStartScroll + scrollDelta;\n }\n };\n\n readonly #onPointerUp = (event: PointerEvent): void => {\n this.#endDrag();\n if (this.#host.hasPointerCapture(event.pointerId)) {\n this.#host.releasePointerCapture(event.pointerId);\n }\n };\n\n #endDrag(): void {\n this.#dragging.set(false);\n this.scrollbar.setDragging(false);\n const doc = this.#document;\n doc.removeEventListener('pointermove', this.#onPointerMove);\n doc.removeEventListener('pointerup', this.#onPointerUp);\n doc.removeEventListener('pointercancel', this.#onPointerUp);\n }\n}\n","import { computed, Directive } from '@angular/core';\n\nimport { injectScrollAreaContext } from './scroll-area-context';\n\n/**\n * Filler in the corner where horizontal and vertical scrollbars meet.\n * Shown when both axes overflow, or unconditionally under `type=\"always\"`\n * (both tracks are permanently present then). Visibility is enforced with an\n * inline `display: none` (which beats any author `display` rule a consumer\n * applies via a class) in addition to the `hidden` attribute that removes it\n * from the a11y tree.\n */\n@Directive({\n selector: '[forScrollAreaCorner]',\n exportAs: 'forScrollAreaCorner',\n host: {\n '[hidden]': '!visible()',\n '[style.display]': 'visible() ? null : \"none\"',\n },\n})\nexport class ForScrollAreaCorner {\n protected readonly ctx = injectScrollAreaContext('ForScrollAreaCorner');\n\n protected readonly visible = computed<boolean>(() => {\n if (this.ctx.type() === 'always') return true;\n const hOverflow = this.ctx.scrollWidth() - this.ctx.clientWidth() > 1;\n const vOverflow = this.ctx.scrollHeight() - this.ctx.clientHeight() > 1;\n return hOverflow && vOverflow;\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAsCa,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBA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A,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,YAAA,EAAA,eAAA,EAAA,6BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,UAAU,EAAE,YAAY;AACxB,wBAAA,iBAAiB,EAAE,2BAA2B;AAC/C,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -0,0 +1,205 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, Directive, input, computed } from '@angular/core';
3
+ import { TextValueControlBase, reflectDisabled, createDefaults } from 'forty-cdk/core';
4
+
5
+ /**
6
+ * Headless `role="searchbox"` text input implementing Angular's
7
+ * `FormValueControl<string>` from `@angular/forms/signals`, so it auto-wires
8
+ * with `[formField]` and auto-associates inside a `[forField]` (label /
9
+ * description / error) with no extra markup. Reuses the exact form-value
10
+ * wiring of `[forInput]` — same IME handling, same value mirror, same
11
+ * validation reflection.
12
+ *
13
+ * Apply on a native `<input>`. The element keeps its own `type`, caret, IME
14
+ * composition, and native form submission — the directive only bridges the
15
+ * value to a signal, reflects validation state, and emits `role="searchbox"`.
16
+ *
17
+ * Pair with `[forSearchClear]` (passing the exported instance) for an inline
18
+ * clear-button affordance that hides itself while the value is empty.
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <input forSearch #s="forSearch" [(value)]="q" />
23
+ * <button [forSearchClear]="s">×</button>
24
+ *
25
+ * <!-- With Signal Forms + Field (auto-wired): -->
26
+ * <div forField>
27
+ * <label forLabel>Search</label>
28
+ * <input forSearch [formField]="search.query" />
29
+ * </div>
30
+ * ```
31
+ */
32
+ class ForSearch extends TextValueControlBase {
33
+ #host = inject(ElementRef);
34
+ /**
35
+ * Resets the value to `''`. Typically called by `[forSearchClear]` when the
36
+ * user activates the clear button, but can also be called programmatically.
37
+ */
38
+ clear() {
39
+ this.value.set('');
40
+ this.#host.nativeElement.value = '';
41
+ }
42
+ /**
43
+ * Moves focus to the native input element. Called by `[forSearchClear]`
44
+ * after clearing so the user can continue typing without chasing the caret.
45
+ */
46
+ focusInput() {
47
+ this.#host.nativeElement.focus();
48
+ }
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSearch, deps: null, target: i0.ɵɵFactoryTarget.Directive });
50
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: ForSearch, isStandalone: true, selector: "input[forSearch]", host: { attributes: { "role": "searchbox" }, listeners: { "input": "onInput($event)", "compositionstart": "onCompositionStart()", "compositionend": "onCompositionEnd()", "blur": "onBlur()" }, properties: { "attr.aria-disabled": "effectiveDisabled() ? \"true\" : null", "attr.aria-readonly": "readonly() ? \"true\" : null", "attr.aria-required": "required() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.aria-busy": "pending() ? \"true\" : null", "attr.readonly": "readonly() ? \"\" : null", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.data-readonly": "readonly() ? \"\" : null", "attr.name": "name() || null", "attr.data-empty": "value() === \"\" ? \"\" : null" } }, exportAs: ["forSearch"], usesInheritance: true, ngImport: i0 });
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSearch, decorators: [{
53
+ type: Directive,
54
+ args: [{
55
+ selector: 'input[forSearch]',
56
+ exportAs: 'forSearch',
57
+ host: {
58
+ role: 'searchbox',
59
+ '[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
60
+ '[attr.aria-readonly]': 'readonly() ? "true" : null',
61
+ '[attr.aria-required]': 'required() ? "true" : null',
62
+ '[attr.aria-invalid]': 'invalid() ? "true" : null',
63
+ '[attr.aria-busy]': 'pending() ? "true" : null',
64
+ '[attr.readonly]': 'readonly() ? "" : null',
65
+ '[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
66
+ '[attr.data-readonly]': 'readonly() ? "" : null',
67
+ '[attr.name]': 'name() || null',
68
+ '[attr.data-empty]': 'value() === "" ? "" : null',
69
+ '(input)': 'onInput($event)',
70
+ '(compositionstart)': 'onCompositionStart()',
71
+ '(compositionend)': 'onCompositionEnd()',
72
+ '(blur)': 'onBlur()',
73
+ },
74
+ }]
75
+ }] });
76
+
77
+ /**
78
+ * Optional clear button for `[forSearch]`. Apply on a `<button>` element and
79
+ * pass the exported search instance through the selector input:
80
+ * `[forSearchClear]="s"` where `#s="forSearch"` is on the `<input>`.
81
+ *
82
+ * The button self-hides while the value is `''`, so consumers can leave it
83
+ * inline in the template without an extra `@if`. Visibility is enforced with
84
+ * an inline `display: none` (which beats any author `display` rule applied via
85
+ * a class) in addition to the `hidden` attribute that removes the element from
86
+ * the accessibility tree. This mirrors `[forComboboxClear]`'s approach.
87
+ *
88
+ * On activation (click) the button clears the value to `''` and refocuses the
89
+ * input so the user can continue typing without chasing the caret.
90
+ *
91
+ * The `aria-label="Clear"` default is set as a static host attribute. Consumers
92
+ * who want a different label can override it with their own `aria-label` on the
93
+ * same element — the consumer's attribute wins per Angular's host-binding
94
+ * precedence rules.
95
+ *
96
+ * The button stays in the natural tab order (no `tabindex="-1"`) unlike
97
+ * `[forComboboxClear]`, which lives inside an `aria-activedescendant` flow.
98
+ */
99
+ class ForSearchClear {
100
+ /**
101
+ * The `[forSearch]` instance to operate on. Pass the exported reference:
102
+ * `<input forSearch #s="forSearch" /> <button [forSearchClear]="s">`.
103
+ */
104
+ search = input.required({ ...(ngDevMode ? { debugName: "search" } : /* istanbul ignore next */ {}), alias: 'forSearchClear' });
105
+ /** `true` while there is text to clear; drives the self-hide logic. */
106
+ hasContent = computed(() => this.search().value().length > 0, /* @ts-ignore */
107
+ ...(ngDevMode ? [{ debugName: "hasContent" }] : /* istanbul ignore next */ []));
108
+ /**
109
+ * Disabled when the search field is disabled or read-only — the clear action
110
+ * is unavailable in those states.
111
+ */
112
+ isDisabled = computed(() => this.search().effectiveDisabled() || this.search().readonly(), /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
114
+ constructor() {
115
+ reflectDisabled(this.isDisabled);
116
+ }
117
+ onClick() {
118
+ if (this.isDisabled()) {
119
+ return;
120
+ }
121
+ this.search().clear();
122
+ this.search().focusInput();
123
+ }
124
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive });
125
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForSearchClear, isStandalone: true, selector: "[forSearchClear]", inputs: { search: { classPropertyName: "search", publicName: "forSearchClear", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "type": "button", "aria-label": "Clear" }, listeners: { "click": "onClick()" }, properties: { "hidden": "!hasContent()", "style.display": "hasContent() ? null : \"none\"" } }, exportAs: ["forSearchClear"], ngImport: i0 });
126
+ }
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForSearchClear, decorators: [{
128
+ type: Directive,
129
+ args: [{
130
+ selector: '[forSearchClear]',
131
+ exportAs: 'forSearchClear',
132
+ host: {
133
+ type: 'button',
134
+ 'aria-label': 'Clear',
135
+ '[hidden]': '!hasContent()',
136
+ '[style.display]': 'hasContent() ? null : "none"',
137
+ '(click)': 'onClick()',
138
+ },
139
+ }]
140
+ }], ctorParameters: () => [], propDecorators: { search: [{ type: i0.Input, args: [{ isSignal: true, alias: "forSearchClear", required: true }] }] } });
141
+
142
+ const FALLBACK = {};
143
+ const { token, provideDefaults } = createDefaults('FOR_SEARCH_DEFAULTS', FALLBACK);
144
+ /** Token holding the resolved search-field defaults for the current scope. */
145
+ const FOR_SEARCH_DEFAULTS = token;
146
+ /**
147
+ * Configures forty-cdk search-field defaults for this injector scope. Partial
148
+ * overrides inherit unspecified keys from the parent scope (or library
149
+ * defaults at the root).
150
+ */
151
+ function provideForSearchDefaults(defaults = {}) {
152
+ return provideDefaults(defaults);
153
+ }
154
+
155
+ /**
156
+ * Exact public names of every `ForSearch` input, its models included. Spread it into the
157
+ * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the
158
+ * primitive's full surface — the Signal Forms members `[formField]` binds among them —
159
+ * without hand-maintaining the list. Always spread into an inline object literal as shown
160
+ * below: the literal is what keeps the entry statically analyzable for consumers compiling
161
+ * against the published package. An anti-drift spec fails when this list no longer matches
162
+ * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported
163
+ * wrapping patterns.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * @Component({
168
+ * selector: 'input[mySearch]',
169
+ * template: '',
170
+ * hostDirectives: [
171
+ * {
172
+ * directive: ForSearch,
173
+ * inputs: [...FOR_SEARCH_HOST_DIRECTIVE_INPUTS],
174
+ * outputs: [...FOR_SEARCH_HOST_DIRECTIVE_OUTPUTS],
175
+ * },
176
+ * ],
177
+ * })
178
+ * export class MySearch {}
179
+ * ```
180
+ */
181
+ const FOR_SEARCH_HOST_DIRECTIVE_INPUTS = [
182
+ 'value',
183
+ 'dirty',
184
+ 'disabled',
185
+ 'errors',
186
+ 'invalid',
187
+ 'name',
188
+ 'pending',
189
+ 'readonly',
190
+ 'required',
191
+ 'touched',
192
+ ];
193
+ /**
194
+ * Exact public names of every `ForSearch` output, the Signal Forms `touch` output
195
+ * included. Spread it into the `outputs` array of the same `hostDirectives` entry as
196
+ * {@link FOR_SEARCH_HOST_DIRECTIVE_INPUTS}.
197
+ */
198
+ const FOR_SEARCH_HOST_DIRECTIVE_OUTPUTS = ['valueChange', 'touchedChange', 'touch'];
199
+
200
+ /**
201
+ * Generated bundle index. Do not edit.
202
+ */
203
+
204
+ export { FOR_SEARCH_DEFAULTS, FOR_SEARCH_HOST_DIRECTIVE_INPUTS, FOR_SEARCH_HOST_DIRECTIVE_OUTPUTS, ForSearch, ForSearchClear, provideForSearchDefaults };
205
+ //# sourceMappingURL=forty-cdk-search.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forty-cdk-search.mjs","sources":["../../../projects/forty-cdk/search/src/search.ts","../../../projects/forty-cdk/search/src/search-clear.ts","../../../projects/forty-cdk/search/src/search-defaults.ts","../../../projects/forty-cdk/search/src/search-host-directive.ts","../../../projects/forty-cdk/search/src/forty-cdk-search.ts"],"sourcesContent":["import { Directive, ElementRef, inject } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { TextValueControlBase } from 'forty-cdk/core';\n\n/**\n * Headless `role=\"searchbox\"` text input implementing Angular's\n * `FormValueControl<string>` from `@angular/forms/signals`, so it auto-wires\n * with `[formField]` and auto-associates inside a `[forField]` (label /\n * description / error) with no extra markup. Reuses the exact form-value\n * wiring of `[forInput]` — same IME handling, same value mirror, same\n * validation reflection.\n *\n * Apply on a native `<input>`. The element keeps its own `type`, caret, IME\n * composition, and native form submission — the directive only bridges the\n * value to a signal, reflects validation state, and emits `role=\"searchbox\"`.\n *\n * Pair with `[forSearchClear]` (passing the exported instance) for an inline\n * clear-button affordance that hides itself while the value is empty.\n *\n * @example\n * ```html\n * <input forSearch #s=\"forSearch\" [(value)]=\"q\" />\n * <button [forSearchClear]=\"s\">×</button>\n *\n * <!-- With Signal Forms + Field (auto-wired): -->\n * <div forField>\n * <label forLabel>Search</label>\n * <input forSearch [formField]=\"search.query\" />\n * </div>\n * ```\n */\n@Directive({\n selector: 'input[forSearch]',\n exportAs: 'forSearch',\n host: {\n role: 'searchbox',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : null',\n '[attr.aria-required]': 'required() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.aria-busy]': 'pending() ? \"true\" : null',\n '[attr.readonly]': 'readonly() ? \"\" : null',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'readonly() ? \"\" : null',\n '[attr.name]': 'name() || null',\n '[attr.data-empty]': 'value() === \"\" ? \"\" : null',\n '(input)': 'onInput($event)',\n '(compositionstart)': 'onCompositionStart()',\n '(compositionend)': 'onCompositionEnd()',\n '(blur)': 'onBlur()',\n },\n})\nexport class ForSearch extends TextValueControlBase implements FormValueControl<string> {\n readonly #host = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n /**\n * Resets the value to `''`. Typically called by `[forSearchClear]` when the\n * user activates the clear button, but can also be called programmatically.\n */\n clear(): void {\n this.value.set('');\n this.#host.nativeElement.value = '';\n }\n\n /**\n * Moves focus to the native input element. Called by `[forSearchClear]`\n * after clearing so the user can continue typing without chasing the caret.\n */\n focusInput(): void {\n this.#host.nativeElement.focus();\n }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\nimport type { ForSearch } from './search';\n\n/**\n * Optional clear button for `[forSearch]`. Apply on a `<button>` element and\n * pass the exported search instance through the selector input:\n * `[forSearchClear]=\"s\"` where `#s=\"forSearch\"` is on the `<input>`.\n *\n * The button self-hides while the value is `''`, so consumers can leave it\n * inline in the template without an extra `@if`. Visibility is enforced with\n * an inline `display: none` (which beats any author `display` rule applied via\n * a class) in addition to the `hidden` attribute that removes the element from\n * the accessibility tree. This mirrors `[forComboboxClear]`'s approach.\n *\n * On activation (click) the button clears the value to `''` and refocuses the\n * input so the user can continue typing without chasing the caret.\n *\n * The `aria-label=\"Clear\"` default is set as a static host attribute. Consumers\n * who want a different label can override it with their own `aria-label` on the\n * same element — the consumer's attribute wins per Angular's host-binding\n * precedence rules.\n *\n * The button stays in the natural tab order (no `tabindex=\"-1\"`) unlike\n * `[forComboboxClear]`, which lives inside an `aria-activedescendant` flow.\n */\n@Directive({\n selector: '[forSearchClear]',\n exportAs: 'forSearchClear',\n host: {\n type: 'button',\n 'aria-label': 'Clear',\n '[hidden]': '!hasContent()',\n '[style.display]': 'hasContent() ? null : \"none\"',\n '(click)': 'onClick()',\n },\n})\nexport class ForSearchClear {\n /**\n * The `[forSearch]` instance to operate on. Pass the exported reference:\n * `<input forSearch #s=\"forSearch\" /> <button [forSearchClear]=\"s\">`.\n */\n readonly search = input.required<ForSearch>({ alias: 'forSearchClear' });\n\n /** `true` while there is text to clear; drives the self-hide logic. */\n protected readonly hasContent = computed(() => this.search().value().length > 0);\n\n /**\n * Disabled when the search field is disabled or read-only — the clear action\n * is unavailable in those states.\n */\n protected readonly isDisabled = computed(\n () => this.search().effectiveDisabled() || this.search().readonly(),\n );\n\n constructor() {\n reflectDisabled(this.isDisabled);\n }\n\n protected onClick(): void {\n if (this.isDisabled()) {\n return;\n }\n this.search().clear();\n this.search().focusInput();\n }\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant `[forSearch]` controls in the surrounding\n * injector scope. Configure with `provideForSearchDefaults`. The shape is a\n * stub today — present so future per-scope tuning can land without churning\n * the public surface.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface ForSearchDefaults {}\n\nconst FALLBACK: ForSearchDefaults = {};\n\nconst { token, provideDefaults } = createDefaults<ForSearchDefaults>(\n 'FOR_SEARCH_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved search-field defaults for the current scope. */\nexport const FOR_SEARCH_DEFAULTS = token;\n\n/**\n * Configures forty-cdk search-field 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 provideForSearchDefaults(defaults: Partial<ForSearchDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","/**\n * Exact public names of every `ForSearch` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n * selector: 'input[mySearch]',\n * template: '',\n * hostDirectives: [\n * {\n * directive: ForSearch,\n * inputs: [...FOR_SEARCH_HOST_DIRECTIVE_INPUTS],\n * outputs: [...FOR_SEARCH_HOST_DIRECTIVE_OUTPUTS],\n * },\n * ],\n * })\n * export class MySearch {}\n * ```\n */\nexport const FOR_SEARCH_HOST_DIRECTIVE_INPUTS = [\n 'value',\n 'dirty',\n 'disabled',\n 'errors',\n 'invalid',\n 'name',\n 'pending',\n 'readonly',\n 'required',\n 'touched',\n] as const;\n\n/**\n * Exact public names of every `ForSearch` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_SEARCH_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_SEARCH_HOST_DIRECTIVE_OUTPUTS = ['valueChange', 'touchedChange', 'touch'] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAsBG,MAAO,SAAU,SAAQ,oBAAoB,CAAA;AACxC,IAAA,KAAK,GAAG,MAAM,CAA+B,UAAU,CAAC;AAEjE;;;AAGG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,GAAG,EAAE;IACrC;AAE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