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.
- package/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forty-cdk-carousel.mjs","sources":["../../../projects/forty-cdk/carousel/src/carousel-context.ts","../../../projects/forty-cdk/carousel/src/carousel-defaults.ts","../../../projects/forty-cdk/carousel/src/carousel.ts","../../../projects/forty-cdk/carousel/src/carousel-viewport.ts","../../../projects/forty-cdk/carousel/src/carousel-track.ts","../../../projects/forty-cdk/carousel/src/carousel-slide.ts","../../../projects/forty-cdk/carousel/src/carousel-previous.ts","../../../projects/forty-cdk/carousel/src/carousel-next.ts","../../../projects/forty-cdk/carousel/src/carousel-indicators.ts","../../../projects/forty-cdk/carousel/src/carousel-indicator.ts","../../../projects/forty-cdk/carousel/src/carousel-rotation-control.ts","../../../projects/forty-cdk/carousel/src/carousel-drag.ts","../../../projects/forty-cdk/carousel/src/forty-cdk-carousel.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport {\n type ListNavigationAction,\n type WritingDirection,\n type RovingTabindex,\n} from 'forty-cdk/core';\n\n/** Alignment of the active slide within the viewport. */\nexport type CarouselAlign = 'start' | 'center' | 'end';\n\n/** Internal handle for a registered slide. */\nexport interface ForCarouselSlideHandle {\n readonly host: HTMLElement;\n}\n\n/** Internal handle for a registered indicator (dot). */\nexport interface ForCarouselIndicatorHandle {\n readonly host: HTMLElement;\n readonly disabled: Signal<boolean>;\n}\n\n/**\n * Coordination contract owned by `ForCarousel`. Slides and indicators\n * register with the root so index lookups, geometry computations, and\n * keyboard navigation are all driven from a single source of truth.\n */\nexport interface ForCarouselContext {\n readonly activeIndex: Signal<number>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly dir: Signal<WritingDirection>;\n readonly loop: Signal<boolean>;\n readonly align: Signal<CarouselAlign>;\n readonly slidesPerView: Signal<number>;\n readonly slideCount: Signal<number>;\n readonly roving: RovingTabindex;\n\n /** Whether auto-rotation is currently \"on\" (user intent). Drives the rotation control's label. */\n readonly playing: Signal<boolean>;\n /** Whether the carousel is actively auto-rotating right now (`playing && !paused`). Drives the viewport's `aria-live`. */\n readonly rotating: Signal<boolean>;\n\n canScrollPrev(): boolean;\n canScrollNext(): boolean;\n scrollPrev(): void;\n scrollNext(): void;\n scrollTo(index: number): void;\n navigate(currentIndicator: HTMLElement, action: ListNavigationAction): void;\n\n /** Toggle auto-rotation on/off (the explicit, sticky user choice). Called by the rotation control. */\n toggleAutoplay(): void;\n\n registerSlide(handle: ForCarouselSlideHandle): void;\n unregisterSlide(handle: ForCarouselSlideHandle): void;\n registerIndicator(handle: ForCarouselIndicatorHandle): void;\n unregisterIndicator(handle: ForCarouselIndicatorHandle): void;\n\n setViewport(el: HTMLElement, id: string): void;\n viewportId(): string | null;\n\n indexOfSlide(host: HTMLElement): number;\n indexOfIndicator(host: HTMLElement): number;\n\n /** Resolve the positional slide `aria-label` (`\"N of M\"` by default). `position` is 1-based. */\n slideLabel(position: number): string;\n /** Resolve the indicator `aria-label` (`\"Go to slide N\"` by default). `position` is 1-based. */\n indicatorLabel(position: number): string;\n\n isCurrent(index: number): boolean;\n isInView(index: number): boolean;\n isFirstEnabledIndicator(el: HTMLElement): boolean;\n hasCurrentIndicator(): boolean;\n}\n\n/** DI token providing the carousel context to descendant pieces. */\nexport const FOR_CAROUSEL_CONTEXT = new InjectionToken<ForCarouselContext>('FOR_CAROUSEL_CONTEXT');\n\nexport function injectCarouselContext(piece: string): ForCarouselContext {\n const ctx = inject(FOR_CAROUSEL_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(`[forty-cdk/carousel] ${piece} must be used inside a [forCarousel] element.`);\n }\n return ctx;\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\nimport { type CarouselAlign } from './carousel-context';\n\n/**\n * Defaults inherited by descendant carousels in the surrounding injector scope.\n * Configure with `provideForCarouselDefaults` either at the application root\n * or in any component's `providers` array; partial overrides merge with\n * the parent scope.\n */\nexport interface ForCarouselDefaults {\n /**\n * Whether index wrap-around is enabled. When `true`, `next` past the last\n * slide wraps to index 0 and `prev` before index 0 wraps to the last slide.\n */\n loop: boolean;\n /**\n * Alignment of the active slide within the viewport. `'start'` (default):\n * the active slide's leading edge aligns with the viewport's leading edge.\n * `'center'` / `'end'` offset accordingly.\n */\n align: CarouselAlign;\n /**\n * Number of slides visible simultaneously in the viewport. Slide width is\n * set to `100% / slidesPerView` by the consumer's CSS.\n */\n slidesPerView: number;\n /**\n * When `true` (and the carousel is not looping), clamps the track offset so the\n * trailing slides align flush to the viewport's trailing edge instead of\n * overscrolling into empty space when `slidesPerView > 1`. The indicator/slide\n * mapping is unchanged — only the visual offset is contained. Default `false`.\n */\n containScroll: boolean;\n /** Whether the carousel auto-rotates on mount (when not under reduced-motion). Default `false`. */\n autoplay: boolean;\n /** Milliseconds between automatic slide advances. Default `5000`. */\n autoplayInterval: number;\n /**\n * Builds the default positional `aria-label` for each slide (`\"N of M\"`).\n * Override to localize centrally. `position` is the 1-based slide index and\n * `total` is the slide count. A per-slide `ariaLabel` still takes precedence.\n */\n slideLabel: (position: number, total: number) => string;\n /**\n * Builds the default `aria-label` for each indicator dot (`\"Go to slide N\"`).\n * Override to localize centrally. `position` is the 1-based slide index. A\n * per-indicator `ariaLabel` still takes precedence.\n */\n indicatorLabel: (position: number) => string;\n}\n\n/**\n * Library fallback for carousel defaults, read at the root injector when no\n * consumer has called `provideForCarouselDefaults`. Exported for the shared\n * defaults contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_CAROUSEL_FALLBACK_DEFAULTS: ForCarouselDefaults = {\n loop: false,\n align: 'start',\n slidesPerView: 1,\n containScroll: false,\n autoplay: false,\n autoplayInterval: 5000,\n slideLabel: (position, total) => `${position} of ${total}`,\n indicatorLabel: (position) => `Go to slide ${position}`,\n};\n\nconst { token, provideDefaults } = createDefaults<ForCarouselDefaults>(\n 'FOR_CAROUSEL_DEFAULTS',\n FOR_CAROUSEL_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved carousel defaults for the current scope. */\nexport const FOR_CAROUSEL_DEFAULTS = token;\n\n/**\n * Configures forty-cdk carousel 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 provideForCarouselDefaults(\n defaults: Partial<ForCarouselDefaults> = {},\n): Provider[] {\n return provideDefaults(defaults);\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n numberAttribute,\n PLATFORM_ID,\n signal,\n untracked,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport {\n Collection,\n firstEnabledHost,\n injectElementSize,\n type ListNavigationAction,\n moveIndex,\n type WritingDirection,\n injectPrefersReducedMotion,\n injectPauseController,\n type PauseController,\n reconcileRovingActive,\n RovingTabindex,\n injectTextDirection,\n} from 'forty-cdk/core';\nimport {\n type CarouselAlign,\n FOR_CAROUSEL_CONTEXT,\n type ForCarouselContext,\n type ForCarouselIndicatorHandle,\n type ForCarouselSlideHandle,\n} from './carousel-context';\nimport { FOR_CAROUSEL_DEFAULTS } from './carousel-defaults';\n\n/**\n * Root of the Carousel primitive. Owns the active index, slide collection,\n * indicator collection, roving tabindex tracker, and computed geometry CSS\n * variables. Provides the shared context to descendant pieces.\n *\n * Implements the [WAI-ARIA APG Carousel pattern](https://www.w3.org/WAI/ARIA/apg/patterns/carousel/).\n *\n * With no `[forCarouselIndicators]` rendered this is a basic carousel driven\n * by prev/next buttons only. Adding an indicator group enables APG picker\n * semantics: roving tabindex, arrow/Home/End navigation with automatic\n * activation.\n */\n@Directive({\n selector: '[forCarousel]',\n exportAs: 'forCarousel',\n host: {\n role: 'group',\n 'aria-roledescription': 'carousel',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-align]': 'align()',\n '[attr.dir]': 'dir()',\n '[style.--for-carousel-offset]': 'offset()',\n '[style.--for-carousel-active-index]': 'activeIndex()',\n '[style.--for-carousel-slide-count]': 'slideCount()',\n '[style.--for-carousel-slides-per-view]': 'slidesPerView()',\n '[style.--for-carousel-viewport-width]': 'viewportWidth()',\n '[style.--for-carousel-viewport-height]': 'viewportHeight()',\n '[attr.data-autoplay]': 'autoplay() ? \"\" : null',\n '[attr.data-rotating]': 'rotating() ? \"\" : null',\n '(pointerenter)': 'onAutoplayPause(\"hover\")',\n '(pointerleave)': 'onAutoplayResume(\"hover\")',\n '(focusin)': 'onAutoplayPause(\"focus\")',\n '(focusout)': 'onAutoplayFocusOut($event)',\n },\n providers: [{ provide: FOR_CAROUSEL_CONTEXT, useExisting: ForCarousel }],\n})\nexport class ForCarousel implements ForCarouselContext {\n readonly #defaults = inject(FOR_CAROUSEL_DEFAULTS);\n\n /**\n * Two-way bindable. The zero-based index of the current (leading) slide.\n * The `model()` change emitter (`(activeIndexChange)`) fires only on internal\n * navigation (prev/next button clicks, indicator arrow-key or click), never\n * on consumer writes via `[(activeIndex)]`.\n */\n readonly activeIndex = model<number>(0);\n\n /** Scroll axis. `'horizontal'` (default) or `'vertical'`. */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /**\n * Whether index wrap-around is enabled. When `true`, `next` past the last\n * slide wraps to index 0; `prev` before index 0 wraps to the last. Default\n * comes from `provideForCarouselDefaults` or the library fallback (`false`).\n */\n readonly loop = input(this.#defaults.loop, { transform: booleanAttribute });\n\n /**\n * Alignment of the active slide within the viewport. Affects the\n * `--for-carousel-offset` computation. Default from `provideForCarouselDefaults`\n * or `'start'`.\n */\n readonly align = input<CarouselAlign>(this.#defaults.align);\n\n /**\n * Number of slides simultaneously visible in the viewport. Slide width\n * should be set to `calc(100% / var(--for-carousel-slides-per-view))` in\n * the consumer's CSS. Default from `provideForCarouselDefaults` or `1`.\n */\n readonly slidesPerView = input(this.#defaults.slidesPerView, { transform: numberAttribute });\n\n /**\n * When `true` and the carousel is not looping, clamps `--for-carousel-offset` so the\n * trailing slides align flush to the viewport's trailing edge instead of overscrolling\n * into empty space (relevant when `slidesPerView > 1`). The one-indicator-per-slide\n * mapping is preserved — `activeIndex` still reaches the last slide; only the visual\n * offset is contained. No effect when `loop` is enabled or `slidesPerView` is 1.\n * Default from `provideForCarouselDefaults` or `false`.\n */\n readonly containScroll = input(this.#defaults.containScroll, { transform: booleanAttribute });\n\n /**\n * Accessible label for the carousel root (`role=\"group\"`). Should describe\n * the carousel's purpose without using the word \"carousel\" (APG guidance).\n * When null (default), no `aria-label` is emitted; use `aria-labelledby`\n * instead when a visible heading labels the carousel.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Whether the carousel auto-rotates. When `true` and the user has not\n * explicitly stopped it, rotation starts on mount — *unless*\n * `prefers-reduced-motion: reduce` is set, which suppresses auto-start\n * (the user can still start it via the rotation control). Default from\n * `provideForCarouselDefaults` or `false`.\n *\n * APG requires a `[forCarouselRotationControl]` to be present whenever\n * autoplay is enabled. The directive does not enforce this — see the README.\n */\n readonly autoplay = input(this.#defaults.autoplay, { transform: booleanAttribute });\n\n /**\n * Milliseconds between automatic slide advances while rotating. Values\n * `<= 0` disable the timer. Default from `provideForCarouselDefaults` or `5000`.\n */\n readonly autoplayInterval = input(this.#defaults.autoplayInterval, {\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 swaps\n * ArrowLeft / ArrowRight semantics on the indicator group in RTL.\n */\n readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n readonly dir = injectTextDirection(this._dirInput);\n\n /** Roving tabindex tracker for the indicator group. */\n readonly roving = new RovingTabindex();\n\n readonly #destroyRef = inject(DestroyRef);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n readonly #element = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #prefersReducedMotion = injectPrefersReducedMotion();\n\n readonly #userPlaying = signal<boolean | null>(null);\n\n /** Whether auto-rotation is \"on\" (user intent). Sticky once the user decides. */\n readonly playing = computed(\n () => this.#userPlaying() ?? (this.autoplay() && !this.#prefersReducedMotion()),\n );\n\n readonly #pause: PauseController<'hover' | 'focus' | 'visibility'> = injectPauseController();\n\n /** Whether the carousel is actively auto-rotating right now. */\n readonly rotating = computed(() => this.playing() && !this.#pause.paused());\n\n #timerHandle: ReturnType<typeof setInterval> | null = null;\n\n readonly #slides = new Collection<ForCarouselSlideHandle>();\n readonly #indicators = new Collection<ForCarouselIndicatorHandle>();\n\n readonly #viewportEl = signal<HTMLElement | null>(null);\n readonly #viewportId = signal<string | null>(null);\n readonly #viewportBox = injectElementSize(this.#viewportEl);\n\n /** Total number of registered slides. Reactive. */\n readonly slideCount = computed(() => this.#slides.items().length);\n\n readonly #firstEnabledIndicatorHost = computed(() => firstEnabledHost(this.#indicators.items()));\n\n /**\n * The `--for-carousel-offset` value to apply via `transform` on the track.\n * Pure arithmetic — no layout measurement — so it is safe in Vitest.\n */\n readonly offset = computed(() => {\n const perView = Math.max(1, this.slidesPerView());\n const slideSizePct = 100 / perView;\n const base = -(this.activeIndex() * slideSizePct);\n const align = this.align();\n const adjust =\n align === 'center' ? (100 - slideSizePct) / 2 : align === 'end' ? 100 - slideSizePct : 0;\n const raw = base + adjust;\n if (this.containScroll() && !this.loop()) {\n const minOffset = -(Math.max(0, this.slideCount() - perView) * slideSizePct);\n return `${Math.min(0, Math.max(minOffset, raw))}%`;\n }\n return `${raw}%`;\n });\n\n /** The measured viewport width, or `null` before first measurement / on the server. */\n readonly viewportWidth = computed(() => {\n const box = this.#viewportBox();\n return box ? `${box.width}px` : null;\n });\n\n /** The measured viewport height, or `null` before first measurement / on the server. */\n readonly viewportHeight = computed(() => {\n const box = this.#viewportBox();\n return box ? `${box.height}px` : null;\n });\n\n constructor() {\n reconcileRovingActive(this.roving, this.#indicators.items);\n\n effect(() => {\n const rotating = this.rotating();\n const interval = this.autoplayInterval();\n untracked(() => this.#syncTimer(rotating, interval));\n });\n this.#destroyRef.onDestroy(() => this.#clearTimer());\n\n if (isDevMode()) {\n let warned = false;\n effect(() => {\n const slides = this.slideCount();\n const indicators = this.#indicators.items().length;\n if (indicators === 0 || indicators === slides) {\n warned = false;\n } else if (!warned) {\n warned = true;\n console.warn(\n `[forty-cdk/carousel] ${indicators} [forCarouselIndicator] element(s) registered for ${slides} slide(s). ` +\n `The picker assumes one indicator per slide (indicator at DOM index i targets slide i); a mismatched count ` +\n `desynchronizes the active-indicator state. Render exactly one [forCarouselIndicator] per [forCarouselSlide].`,\n );\n }\n });\n }\n }\n\n /** Returns `true` when scrolling backward is possible given the current loop/index state. */\n canScrollPrev(): boolean {\n return moveIndex(this.activeIndex(), this.slideCount(), 'prev', { loop: this.loop() }) !== null;\n }\n\n /** Returns `true` when scrolling forward is possible given the current loop/index state. */\n canScrollNext(): boolean {\n return moveIndex(this.activeIndex(), this.slideCount(), 'next', { loop: this.loop() }) !== null;\n }\n\n /** Navigate to the previous slide. No-op at index 0 when not looping. */\n scrollPrev(): void {\n this.#move('prev');\n }\n\n /** Navigate to the next slide. No-op at the last index when not looping. */\n scrollNext(): void {\n this.#move('next');\n }\n\n /**\n * Navigate to the slide at `index`. Clamps to `[0, slideCount-1]` when not\n * looping; wraps modulo `slideCount` when looping.\n */\n scrollTo(index: number): void {\n const count = this.slideCount();\n if (count === 0) {\n return;\n }\n const target = this.loop()\n ? ((index % count) + count) % count\n : Math.max(0, Math.min(index, count - 1));\n this.activeIndex.set(target);\n }\n\n /**\n * Move focus from `currentIndicator` according to `action` and activate the\n * target slide (automatic activation). Used by `ForCarouselIndicator`'s\n * keydown handler.\n */\n navigate(currentIndicator: HTMLElement, action: ListNavigationAction): void {\n const indicators = this.#indicators.items();\n if (indicators.length === 0) {\n return;\n }\n const currentIndex = indicators.findIndex((i) => i.host === currentIndicator);\n const next = moveIndex(currentIndex < 0 ? 0 : currentIndex, indicators.length, action, {\n loop: this.loop(),\n isDisabled: (i) => indicators[i]!.disabled(),\n });\n if (next === null) {\n return;\n }\n indicators[next]!.host.focus();\n this.scrollTo(next);\n }\n\n registerSlide(handle: ForCarouselSlideHandle): void {\n this.#slides.register(handle);\n }\n\n unregisterSlide(handle: ForCarouselSlideHandle): void {\n this.#slides.unregister(handle);\n }\n\n registerIndicator(handle: ForCarouselIndicatorHandle): void {\n this.#indicators.register(handle);\n }\n\n unregisterIndicator(handle: ForCarouselIndicatorHandle): void {\n this.#indicators.unregister(handle);\n this.roving.unregister(handle.host);\n }\n\n /** Called by `ForCarouselViewport` at construction to wire the geometry observer. */\n setViewport(el: HTMLElement, id: string): void {\n this.#viewportEl.set(el);\n this.#viewportId.set(id);\n }\n\n /** The id of the registered viewport element, or `null` if none is mounted. */\n viewportId(): string | null {\n return this.#viewportId();\n }\n\n /** DOM-order index of the registered slide whose host equals `host`, or -1. */\n indexOfSlide(host: HTMLElement): number {\n return this.#slides.indexOfHost(host);\n }\n\n /** DOM-order index of the registered indicator whose host equals `host`, or -1. */\n indexOfIndicator(host: HTMLElement): number {\n return this.#indicators.indexOfHost(host);\n }\n\n /**\n * Resolve the positional slide `aria-label` from the scope's defaults\n * (`\"N of M\"` unless localized via `provideForCarouselDefaults`).\n * `position` is the 1-based slide index.\n */\n slideLabel(position: number): string {\n return this.#defaults.slideLabel(position, this.slideCount());\n }\n\n /**\n * Resolve the indicator `aria-label` from the scope's defaults\n * (`\"Go to slide N\"` unless localized via `provideForCarouselDefaults`).\n * `position` is the 1-based slide index.\n */\n indicatorLabel(position: number): string {\n return this.#defaults.indicatorLabel(position);\n }\n\n /** Returns `true` when `index` is the current active slide index. */\n isCurrent(index: number): boolean {\n return index === this.activeIndex();\n }\n\n /**\n * Returns `true` when `index` falls within the visible window\n * `[activeIndex, activeIndex + slidesPerView - 1]`.\n */\n isInView(index: number): boolean {\n const start = this.activeIndex();\n return index >= start && index < start + Math.max(1, this.slidesPerView());\n }\n\n /**\n * Returns `true` when `el` is the host of the first non-disabled indicator\n * in DOM order. Used by the tabindex fallback when no indicator is current.\n */\n isFirstEnabledIndicator(el: HTMLElement): boolean {\n return this.#firstEnabledIndicatorHost() === el;\n }\n\n /**\n * Returns `true` when at least one registered, non-disabled indicator\n * matches the current `activeIndex`. Used by the tabindex ladder to decide\n * whether the first-enabled fallback must reclaim the tab stop.\n *\n * Assumes the one-indicator-per-slide mapping the rest of the picker is built\n * on: the indicator at DOM index `i` targets slide `i`. A mismatched indicator\n * count is dev-guarded by a `console.warn` at construction.\n */\n hasCurrentIndicator(): boolean {\n const active = this.activeIndex();\n return this.#indicators.items().some((i, idx) => idx === active && !i.disabled());\n }\n\n /** Start auto-rotation (explicit, sticky). Overrides the reduced-motion auto-start gate. */\n play(): void {\n this.#userPlaying.set(true);\n }\n\n /** Stop auto-rotation (explicit, sticky). Hover/focus/visibility changes will not restart it. */\n pause(): void {\n this.#userPlaying.set(false);\n }\n\n /** Toggle auto-rotation. Called by `[forCarouselRotationControl]`. */\n toggleAutoplay(): void {\n this.#userPlaying.set(!this.playing());\n }\n\n protected onAutoplayPause(reason: 'hover' | 'focus'): void {\n this.#pause.apply(reason);\n }\n\n protected onAutoplayResume(reason: 'hover' | 'focus'): void {\n this.#pause.release(reason);\n }\n\n protected onAutoplayFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (next && this.#element.nativeElement.contains(next)) {\n return;\n }\n this.#pause.release('focus');\n }\n\n #syncTimer(rotating: boolean, interval: number): void {\n this.#clearTimer();\n if (this.#isBrowser && rotating && interval > 0) {\n this.#timerHandle = setInterval(() => this.#advance(), interval);\n }\n }\n\n #advance(): void {\n const count = this.slideCount();\n if (count > 0) {\n this.activeIndex.set((this.activeIndex() + 1) % count);\n }\n }\n\n #clearTimer(): void {\n if (this.#timerHandle !== null) {\n clearInterval(this.#timerHandle);\n this.#timerHandle = null;\n }\n }\n\n #move(action: ListNavigationAction): void {\n const next = moveIndex(this.activeIndex(), this.slideCount(), action, { loop: this.loop() });\n if (next !== null) {\n this.activeIndex.set(next);\n }\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport { hostId } from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * Clips the visible window of the carousel track. Acts as the APG-mandated\n * live region for screen-reader announcements. `aria-live` flips between\n * `\"off\"` while the carousel is actively auto-rotating (so advancing slides\n * do not bombard the screen reader) and `\"polite\"` at all other times so\n * manual navigation is announced. Also serves as the `aria-controls` target\n * for the prev/next buttons.\n *\n * Registers itself with the carousel root on construction so the root's\n * `injectElementSize` observer starts and prev/next's `aria-controls` resolves.\n * There must be exactly one viewport per carousel.\n */\n@Directive({\n selector: '[forCarouselViewport]',\n exportAs: 'forCarouselViewport',\n host: {\n '[id]': 'id()',\n 'aria-atomic': 'false',\n '[attr.aria-live]': 'ctx.rotating() ? \"off\" : \"polite\"',\n '[attr.data-orientation]': 'ctx.orientation()',\n },\n})\nexport class ForCarouselViewport {\n protected readonly ctx = injectCarouselContext('ForCarouselViewport');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The resolved id of this element — generated or adopted from a consumer-set static `id`. */\n readonly id = hostId('for-carousel-viewport');\n\n constructor() {\n this.ctx.setViewport(this.#host.nativeElement, this.id());\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * The flex container of slides. The consumer's CSS reads\n * `--for-carousel-offset` (inherited from the root) and applies it as a\n * `transform: translateX(...)` / `translateY(...)` on this element.\n * The directive adds no animation or transform itself.\n *\n * Reflects `data-orientation` so the consumer can select the correct CSS\n * axis via `[data-orientation=\"vertical\"] [forCarouselTrack] { ... }`.\n */\n@Directive({\n selector: '[forCarouselTrack]',\n exportAs: 'forCarouselTrack',\n host: {\n '[attr.data-orientation]': 'ctx.orientation()',\n },\n})\nexport class ForCarouselTrack {\n protected readonly ctx = injectCarouselContext('ForCarouselTrack');\n}\n","import { computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport { registerHandle } from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * One slide in the carousel track. Carries `role=\"group\"` and\n * `aria-roledescription=\"slide\"` per the WAI-ARIA APG Carousel pattern.\n *\n * The default `aria-label` is the positional `\"N of M\"` string (APG mandates\n * a positional label on each slide). Set `ariaLabel` to override with a\n * semantically richer label for the specific slide content.\n *\n * Off-view slides (outside `[activeIndex, activeIndex + slidesPerView - 1]`)\n * are hidden from the accessibility tree and focus order via\n * `aria-hidden=\"true\"` + `inert`.\n */\n@Directive({\n selector: '[forCarouselSlide]',\n exportAs: 'forCarouselSlide',\n host: {\n role: 'group',\n 'aria-roledescription': 'slide',\n '[attr.aria-label]': 'ariaLabel() || positionLabel()',\n '[attr.data-state]': 'current() ? \"active\" : \"inactive\"',\n '[attr.data-in-view]': 'inView() ? \"\" : null',\n '[attr.aria-hidden]': 'inView() ? null : \"true\"',\n '[attr.inert]': 'inView() ? null : \"\"',\n },\n})\nexport class ForCarouselSlide {\n protected readonly ctx = injectCarouselContext('ForCarouselSlide');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Override the default positional `aria-label` (`\"N of M\"`). Use this to\n * provide a semantically richer label when the slide's content has a\n * meaningful title (e.g. the product name). When `null` (default), the\n * positional label is used automatically. Localize that default format\n * app-wide via `provideForCarouselDefaults`'s `slideLabel`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n readonly #index = computed(() => this.ctx.indexOfSlide(this.#host.nativeElement));\n\n /** Whether this is the current (active) slide. */\n protected readonly current = computed(() => this.ctx.isCurrent(this.#index()));\n\n /** Whether this slide is within the visible window. */\n protected readonly inView = computed(() => this.ctx.isInView(this.#index()));\n\n /** The positional `\"N of M\"` label used when no explicit `ariaLabel` is set. */\n protected readonly positionLabel = computed(() => {\n const i = this.#index();\n return i < 0 ? null : this.ctx.slideLabel(i + 1);\n });\n\n constructor() {\n const handle = { host: this.#host.nativeElement };\n registerHandle(\n handle,\n (h) => this.ctx.registerSlide(h),\n (h) => this.ctx.unregisterSlide(h),\n );\n }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * Previous-slide button. Apply on a `<button>` so Enter/Space activation is\n * native. Disabled (via the native `disabled` attribute) at index 0 when the\n * carousel is not looping. When `loop` is `true` it is never disabled.\n *\n * Points `aria-controls` at the viewport's id so screen readers announce the\n * relationship. Clicking does not move focus (APG).\n */\n@Directive({\n selector: '[forCarouselPrevious]',\n exportAs: 'forCarouselPrevious',\n host: {\n type: 'button',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-controls]': 'ctx.viewportId()',\n '(click)': 'ctx.scrollPrev()',\n },\n})\nexport class ForCarouselPrevious {\n protected readonly ctx = injectCarouselContext('ForCarouselPrevious');\n\n /**\n * Accessible label for this button (e.g. \"Previous slide\"). When `null`\n * (default), no `aria-label` is emitted — the consumer should supply a\n * visible label or set this input.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly isDisabled = computed(() => !this.ctx.canScrollPrev());\n\n constructor() {\n reflectDisabled(this.isDisabled);\n }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * Next-slide button. Apply on a `<button>` so Enter/Space activation is\n * native. Disabled (via the native `disabled` attribute) at the last index\n * when the carousel is not looping. When `loop` is `true` it is never disabled.\n *\n * Points `aria-controls` at the viewport's id so screen readers announce the\n * relationship. Clicking does not move focus (APG).\n */\n@Directive({\n selector: '[forCarouselNext]',\n exportAs: 'forCarouselNext',\n host: {\n type: 'button',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-controls]': 'ctx.viewportId()',\n '(click)': 'ctx.scrollNext()',\n },\n})\nexport class ForCarouselNext {\n protected readonly ctx = injectCarouselContext('ForCarouselNext');\n\n /**\n * Accessible label for this button (e.g. \"Next slide\"). When `null`\n * (default), no `aria-label` is emitted — the consumer should supply a\n * visible label or set this input.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly isDisabled = computed(() => !this.ctx.canScrollNext());\n\n constructor() {\n reflectDisabled(this.isDisabled);\n }\n}\n","import { Directive, input } from '@angular/core';\n\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * The slide-picker group (dot navigation). Renders as `role=\"group\"` and\n * should receive an `ariaLabel` describing its purpose (e.g. \"Choose slide\n * to display\") per the WAI-ARIA APG Carousel pattern.\n *\n * Keyboard navigation (ArrowLeft/Right, Home/End) and automatic activation\n * live on each `[forCarouselIndicator]` child, not on this container.\n */\n@Directive({\n selector: '[forCarouselIndicators]',\n exportAs: 'forCarouselIndicators',\n host: {\n role: 'group',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.data-orientation]': 'ctx.orientation()',\n },\n})\nexport class ForCarouselIndicators {\n protected readonly ctx = injectCarouselContext('ForCarouselIndicators');\n\n /**\n * Accessible label for the picker group (e.g. \"Choose slide to display\").\n * APG recommends labelling the group so screen readers can distinguish it\n * from other landmarks.\n */\n readonly ariaLabel = input<string | null>(null);\n}\n","import { booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport { registerHandle, resolveListNavigation } from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * One indicator (dot) in the slide picker. Apply on a `<button>` so\n * Enter/Space activation is native. Uses roving tabindex — only the current\n * dot owns `tabindex=0`; all others have `tabindex=-1`. Arrow/Home/End\n * navigation activates the target slide automatically (APG \"grouped/tabbed\n * picker\" variant).\n *\n * The current indicator is marked with `aria-current=\"true\"` (truthy-only).\n * Disabled indicators receive `aria-disabled=\"true\"` and `data-disabled` but\n * stay focusable (custom-role rule) so assistive tech can announce them.\n */\n@Directive({\n selector: '[forCarouselIndicator]',\n exportAs: 'forCarouselIndicator',\n host: {\n type: 'button',\n '[attr.aria-label]': 'ariaLabel() || positionLabel()',\n '[attr.aria-current]': 'current() ? \"true\" : null',\n '[attr.data-state]': 'current() ? \"active\" : \"inactive\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.tabindex]': 'tabindex()',\n '(click)': 'onClick()',\n '(focus)': 'onFocus()',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ForCarouselIndicator {\n protected readonly ctx = injectCarouselContext('ForCarouselIndicator');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Override the default positional `aria-label` (e.g. `\"Go to slide 1\"`).\n * Use this to provide a more descriptive label when the slide has a title.\n * Localize that default format app-wide via `provideForCarouselDefaults`'s\n * `indicatorLabel`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Disables this indicator. Disabled indicators remain focusable (for\n * assistive tech) but ignore click and keyboard activation.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly #index = computed(() => this.ctx.indexOfIndicator(this.#host.nativeElement));\n\n /** Whether this indicator corresponds to the current active slide. */\n protected readonly current = computed(() => this.ctx.isCurrent(this.#index()));\n\n /** Default positional label used when no explicit `ariaLabel` is set. */\n protected readonly positionLabel = computed(() => {\n const i = this.#index();\n return i < 0 ? null : this.ctx.indicatorLabel(i + 1);\n });\n\n /**\n * APG roving tabindex: user-driven roving owns it once any indicator has\n * been focused. Before that, fall back to \"current slide's indicator, else\n * first enabled\".\n */\n protected readonly tabindex = computed<-1 | 0>(() => {\n if (this.disabled()) {\n return -1;\n }\n if (this.ctx.roving.hasActive()) {\n return this.ctx.roving.tabindexFor(this.#host.nativeElement);\n }\n if (this.current()) {\n return 0;\n }\n if (this.ctx.hasCurrentIndicator()) {\n return -1;\n }\n return this.ctx.isFirstEnabledIndicator(this.#host.nativeElement) ? 0 : -1;\n });\n\n constructor() {\n const handle = { host: this.#host.nativeElement, disabled: this.disabled };\n registerHandle(\n handle,\n (h) => this.ctx.registerIndicator(h),\n (h) => this.ctx.unregisterIndicator(h),\n );\n }\n\n protected onClick(): void {\n if (this.disabled()) {\n return;\n }\n this.ctx.scrollTo(this.#index());\n }\n\n protected onFocus(): void {\n if (this.disabled()) {\n return;\n }\n this.ctx.roving.setActive(this.#host.nativeElement);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n const action = resolveListNavigation(event, {\n orientation: this.ctx.orientation(),\n dir: this.ctx.dir(),\n });\n if (!action) {\n return;\n }\n event.preventDefault();\n this.ctx.navigate(this.#host.nativeElement, action);\n }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { injectCarouselContext } from './carousel-context';\n\n/**\n * Play/pause control for carousel auto-rotation. Apply on a `<button>` so\n * Enter/Space activation is native. Its accessible name swaps with the\n * rotation state — `stopLabel` while rotating, `startLabel` while stopped —\n * per the WAI-ARIA APG Carousel pattern, which forbids `aria-pressed` here.\n *\n * Place this control **first** in the carousel's DOM/tab order so assistive\n * technology users meet it before the rotating content (APG requirement).\n *\n * Reflects a boolean `data-playing` attribute (present while rotation is on)\n * as the styling hook for swapping a play/pause icon.\n */\n@Directive({\n selector: '[forCarouselRotationControl]',\n exportAs: 'forCarouselRotationControl',\n host: {\n type: 'button',\n '[attr.aria-label]': 'label()',\n '[attr.data-playing]': 'ctx.playing() ? \"\" : null',\n '(click)': 'ctx.toggleAutoplay()',\n },\n})\nexport class ForCarouselRotationControl {\n protected readonly ctx = injectCarouselContext('ForCarouselRotationControl');\n\n /** Accessible name shown while rotation is **stopped** (the button will start it). */\n readonly startLabel = input('Start automatic slide show');\n\n /** Accessible name shown while rotation is **playing** (the button will stop it). */\n readonly stopLabel = input('Stop automatic slide show');\n\n /** The current accessible name — `stopLabel` while playing, else `startLabel`. */\n protected readonly label = computed(() =>\n this.ctx.playing() ? this.stopLabel() : this.startLabel(),\n );\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n PLATFORM_ID,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport {\n attachSwipeDismiss,\n type SwipeDirection,\n type SwipeEventDetail,\n isScrollableAtEdge,\n injectPrefersReducedMotion,\n} from 'forty-cdk/core';\nimport { injectCarouselContext } from './carousel-context';\n\nconst FLICK_VELOCITY_PX_PER_MS = 0.4;\n\n/**\n * Opt-in pointer drag / swipe directive for the Carousel viewport. Apply on the\n * `[forCarouselViewport]` element to enable horizontal or vertical drag-to-navigate.\n *\n * Publishes `--for-carousel-drag` (px) during the gesture so the consumer can\n * compose it with `--for-carousel-offset` for live track motion. Reflects\n * `data-dragging` while the gesture is armed. Sets `touch-action` automatically\n * to free the cross axis for page scrolling.\n *\n * Under `prefers-reduced-motion: reduce` the live offset is suppressed, but the\n * gesture still snaps `activeIndex` on release (D3).\n */\n@Directive({\n selector: '[forCarouselDrag]',\n exportAs: 'forCarouselDrag',\n host: {\n '[style.--for-carousel-drag]': 'dragVar()',\n '[attr.data-dragging]': \"dragging() ? '' : null\",\n '[style.touch-action]': 'touchAction()',\n '(dragstart)': 'onDragStart($event)',\n },\n})\nexport class ForCarouselDrag {\n protected readonly ctx = injectCarouselContext('ForCarouselDrag');\n\n /** Disable pointer drag without removing the directive. Default `false`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #destroyRef = inject(DestroyRef);\n readonly #isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n readonly #prefersReducedMotion = injectPrefersReducedMotion();\n\n readonly #dragging = signal(false);\n readonly #dragPx = signal(0);\n\n /** Whether a drag gesture is currently armed (reflected as `data-dragging`). */\n readonly dragging = this.#dragging.asReadonly();\n\n /** `touch-action` for the viewport: capture the primary axis, free the cross axis. */\n readonly touchAction = computed<string | null>(() => {\n if (this.disabled()) return null;\n return this.ctx.orientation() === 'vertical' ? 'pan-x' : 'pan-y';\n });\n\n /** Live offset CSS var; suppressed at rest and under reduced motion (D3). */\n readonly dragVar = computed<string | null>(() => {\n if (this.#prefersReducedMotion()) return null;\n const px = this.#dragPx();\n return this.#dragging() && px !== 0 ? `${px}px` : null;\n });\n\n #startPrimary = 0;\n #lastPrimary = 0;\n #lastTime = 0;\n #velocity = 0;\n #slideSizePx = 0;\n\n constructor() {\n if (!this.#isBrowser) return;\n const cleanup = attachSwipeDismiss({\n element: this.#host.nativeElement,\n getDirections: () => this.#directions(),\n getThreshold: () => 1,\n onSwipeStart: (d) => this.#onStart(d),\n onSwipeMove: (d) => this.#onMove(d),\n onSwipeEnd: (d) => this.#onRelease(d),\n onSwipeCancel: (d) => this.#onRelease(d),\n });\n this.#destroyRef.onDestroy(cleanup);\n }\n\n protected onDragStart(event: Event): void {\n if (this.#dragging()) event.preventDefault();\n }\n\n #directions(): readonly SwipeDirection[] {\n if (this.disabled()) return [];\n return this.ctx.orientation() === 'vertical' ? ['up', 'down'] : ['left', 'right'];\n }\n\n #primary(event: PointerEvent): number {\n return this.ctx.orientation() === 'vertical' ? event.clientY : event.clientX;\n }\n\n /** +1 if a positive primary-axis delta moves toward a higher index, else -1. */\n #nextPerPx(): number {\n // horizontal LTR: finger left (clientX↓) → next → -1\n // horizontal RTL: finger right (clientX↑) → next → +1\n // vertical: finger up (clientY↓) → next → -1\n return this.ctx.orientation() === 'horizontal' && this.ctx.dir() === 'rtl' ? 1 : -1;\n }\n\n #onStart(detail: SwipeEventDetail): void {\n const target = detail.originalEvent.target as Element | null;\n if (target && isScrollableAtEdge(target, detail.direction, this.#host.nativeElement)) {\n this.#dragging.set(false);\n return;\n }\n const rect = this.#host.nativeElement.getBoundingClientRect();\n const axisSize = this.ctx.orientation() === 'vertical' ? rect.height : rect.width;\n this.#slideSizePx = axisSize / Math.max(1, this.ctx.slidesPerView());\n\n const p = this.#primary(detail.originalEvent);\n this.#startPrimary = p;\n this.#lastPrimary = p;\n this.#lastTime = detail.originalEvent.timeStamp || 0;\n this.#velocity = 0;\n this.#dragPx.set(0);\n this.#dragging.set(true);\n }\n\n #onMove(detail: SwipeEventDetail): void {\n if (!this.#dragging()) return;\n const event = detail.originalEvent;\n const p = this.#primary(event);\n const now = event.timeStamp || this.#lastTime + 1;\n const dt = Math.max(1, now - this.#lastTime);\n this.#velocity = (p - this.#lastPrimary) / dt;\n this.#lastPrimary = p;\n this.#lastTime = now;\n this.#dragPx.set(p - this.#startPrimary);\n }\n\n #onRelease(_detail: SwipeEventDetail): void {\n if (!this.#dragging()) return;\n const dragPx = this.#dragPx();\n this.#dragging.set(false);\n this.#dragPx.set(0);\n\n if (this.#slideSizePx <= 0) return;\n\n const sign = this.#nextPerPx();\n const slidesDragged = (dragPx * sign) / this.#slideSizePx;\n const velocityTowardNext = this.#velocity * sign;\n const target = resolveDragIndex(this.ctx.activeIndex(), slidesDragged, velocityTowardNext);\n this.ctx.scrollTo(target);\n }\n}\n\n/**\n * Pure nearest-index snap with velocity bias. `slidesDragged` is signed (positive\n * toward a higher index); `velocityTowardNext` is px/ms (positive toward a higher\n * index). A fast flick rounds toward the flick direction instead of to nearest.\n * Returns a raw (possibly out-of-range) index; the caller's `scrollTo` normalizes it.\n */\nfunction resolveDragIndex(\n activeIndex: number,\n slidesDragged: number,\n velocityTowardNext: number,\n): number {\n const float = activeIndex + slidesDragged;\n if (velocityTowardNext >= FLICK_VELOCITY_PX_PER_MS) return Math.ceil(float);\n if (velocityTowardNext <= -FLICK_VELOCITY_PX_PER_MS) return Math.floor(float);\n return Math.round(float);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AA0EA;MACa,oBAAoB,GAAG,IAAI,cAAc,CAAqB,sBAAsB;AAE3F,SAAU,qBAAqB,CAAC,KAAa,EAAA;AACjD,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,CAAA,6CAAA,CAA+C,CAAC;IAC/F;AACA,IAAA,OAAO,GAAG;AACZ;;AC9BA;;;;AAIG;AACI,MAAM,8BAA8B,GAAwB;AACjE,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,UAAU,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAA,EAAG,QAAQ,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;IAC1D,cAAc,EAAE,CAAC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IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,2BAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,wBAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,6BAA6B,EAAE,WAAW;AAC1C,wBAAA,sBAAsB,EAAE,wBAAwB;AAChD,wBAAA,sBAAsB,EAAE,eAAe;AACvC,wBAAA,aAAa,EAAE,qBAAqB;AACrC,qBAAA;AACF,iBAAA;;AAuHD;;;;;AAKG;AACH,SAAS,gBAAgB,CACvB,WAAmB,EACnB,aAAqB,EACrB,kBAA0B,EAAA;AAE1B,IAAA,MAAM,KAAK,GAAG,WAAW,GAAG,aAAa;IACzC,IAAI,kBAAkB,IAAI,wBAAwB;AAAE,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3E,IAAI,kBAAkB,IAAI,CAAC,wBAAwB;AAAE,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAC7E,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAC1B;;ACnLA;;AAEG;;;;"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, model, computed, Directive, inject } from '@angular/core';
|
|
3
|
+
import { FormUiControlBase, injectHiddenInput, createDefaults } from 'forty-cdk/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Injection key the `[forCheckboxIndicator]` uses to resolve its parent
|
|
7
|
+
* checkbox, decoupled from the concrete `ForCheckbox` class. `ForCheckbox`
|
|
8
|
+
* provides itself under this token, so a design system wrapping the checkbox
|
|
9
|
+
* by subclassing re-points it at the subclass with a single provider
|
|
10
|
+
* (`{ provide: FOR_CHECKBOX, useExisting: MtxCheckbox }`) and the indicator
|
|
11
|
+
* keeps resolving — see `docs/wrapping-form-primitives.md`.
|
|
12
|
+
*/
|
|
13
|
+
const FOR_CHECKBOX = new InjectionToken('FOR_CHECKBOX');
|
|
14
|
+
/**
|
|
15
|
+
* Headless checkbox implementing the
|
|
16
|
+
* [WAI-ARIA Checkbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/)
|
|
17
|
+
* with optional tri-state (`indeterminate`) support, plus Angular's
|
|
18
|
+
* `FormCheckboxControl` from `@angular/forms/signals` for `[formField]`
|
|
19
|
+
* auto-wiring.
|
|
20
|
+
*
|
|
21
|
+
* Apply on a `<button type="button">`. The directive forces `type="button"`
|
|
22
|
+
* to avoid accidental form submission; Enter and Space activation come from
|
|
23
|
+
* native button behavior (APG only mandates Space, and Enter is harmless on
|
|
24
|
+
* a non-submit button).
|
|
25
|
+
*
|
|
26
|
+
* Tri-state: when `indeterminate` is `true`, `aria-checked="mixed"` is
|
|
27
|
+
* announced regardless of `checked`. Activating an indeterminate checkbox
|
|
28
|
+
* clears `indeterminate` and toggles `checked` from its current value
|
|
29
|
+
* (matches native `<input type="checkbox">` behavior).
|
|
30
|
+
*
|
|
31
|
+
* The accessible name is the consumer's responsibility — wrap the button in a
|
|
32
|
+
* `<label>` or use `aria-labelledby` / `aria-label`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <button forCheckbox [(checked)]="agreed">
|
|
37
|
+
* <span class="indicator"></span>
|
|
38
|
+
* </button>
|
|
39
|
+
* I agree to the terms.
|
|
40
|
+
*
|
|
41
|
+
* <!-- With Signal Forms: -->
|
|
42
|
+
* <button forCheckbox [formField]="form.acceptTerms"></button>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
class ForCheckbox extends FormUiControlBase {
|
|
46
|
+
/** Two-way bindable on/off state. Required by `FormCheckboxControl`. */
|
|
47
|
+
checked = model(false, /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
49
|
+
/**
|
|
50
|
+
* Two-way bindable indeterminate state. When true, `aria-checked="mixed"`
|
|
51
|
+
* is announced regardless of `checked`. Activation clears it.
|
|
52
|
+
*
|
|
53
|
+
* Not part of `FormCheckboxControl` — the field's value stays binary.
|
|
54
|
+
* Indeterminate is a UI-only concern (e.g. a parent "select all" reflecting
|
|
55
|
+
* children with mixed selection).
|
|
56
|
+
*/
|
|
57
|
+
indeterminate = model(false, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
59
|
+
ariaChecked = computed(() => {
|
|
60
|
+
if (this.indeterminate())
|
|
61
|
+
return 'mixed';
|
|
62
|
+
return this.checked() ? 'true' : 'false';
|
|
63
|
+
}, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "ariaChecked" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/**
|
|
66
|
+
* Logical state reflected on `data-state`: `'checked'`, `'unchecked'`, or
|
|
67
|
+
* `'indeterminate'`. Exposed so `ForCheckboxIndicator` can mirror it without
|
|
68
|
+
* re-deriving the same mapping.
|
|
69
|
+
*/
|
|
70
|
+
dataState = computed(() => {
|
|
71
|
+
if (this.indeterminate())
|
|
72
|
+
return 'indeterminate';
|
|
73
|
+
return this.checked() ? 'checked' : 'unchecked';
|
|
74
|
+
}, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
|
|
76
|
+
constructor() {
|
|
77
|
+
super();
|
|
78
|
+
injectHiddenInput({
|
|
79
|
+
name: this.name,
|
|
80
|
+
// Matches native `<input type="checkbox">`: only `checked` contributes
|
|
81
|
+
// to form submission; `indeterminate` is purely a presentational flag.
|
|
82
|
+
values: computed(() => (this.checked() ? ['on'] : [])),
|
|
83
|
+
disabled: this.effectiveDisabled,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
onClick() {
|
|
87
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (this.indeterminate()) {
|
|
91
|
+
this.indeterminate.set(false);
|
|
92
|
+
}
|
|
93
|
+
this.checked.update((v) => !v);
|
|
94
|
+
}
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
96
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForCheckbox, isStandalone: true, selector: "[forCheckbox]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange" }, host: { attributes: { "role": "checkbox", "type": "button" }, listeners: { "click": "onClick()", "blur": "markTouched()" }, properties: { "attr.aria-checked": "ariaChecked()", "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.name": "name() || null", "attr.data-state": "dataState()", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.data-readonly": "readonly() ? \"\" : null" } }, providers: [{ provide: FOR_CHECKBOX, useExisting: ForCheckbox }], exportAs: ["forCheckbox"], usesInheritance: true, ngImport: i0 });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForCheckbox, decorators: [{
|
|
99
|
+
type: Directive,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: '[forCheckbox]',
|
|
102
|
+
exportAs: 'forCheckbox',
|
|
103
|
+
providers: [{ provide: FOR_CHECKBOX, useExisting: ForCheckbox }],
|
|
104
|
+
host: {
|
|
105
|
+
role: 'checkbox',
|
|
106
|
+
type: 'button',
|
|
107
|
+
'[attr.aria-checked]': 'ariaChecked()',
|
|
108
|
+
'[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
|
|
109
|
+
'[attr.aria-readonly]': 'readonly() ? "true" : null',
|
|
110
|
+
'[attr.aria-required]': 'required() ? "true" : null',
|
|
111
|
+
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
112
|
+
'[attr.aria-busy]': 'pending() ? "true" : null',
|
|
113
|
+
'[attr.name]': 'name() || null',
|
|
114
|
+
'[attr.data-state]': 'dataState()',
|
|
115
|
+
'[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
|
|
116
|
+
'[attr.data-readonly]': 'readonly() ? "" : null',
|
|
117
|
+
'(click)': 'onClick()',
|
|
118
|
+
'(blur)': 'markTouched()',
|
|
119
|
+
},
|
|
120
|
+
}]
|
|
121
|
+
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }] } });
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Optional indicator slot inside a `ForCheckbox`. Apply on the element
|
|
125
|
+
* the consumer wants to show only while the checkbox is `checked` or
|
|
126
|
+
* `indeterminate` (typically a check icon, dash, or filled square). The
|
|
127
|
+
* directive mirrors `data-state` from the parent so the consumer can
|
|
128
|
+
* style transitions without per-state bindings; hide the unchecked state
|
|
129
|
+
* via `[data-state="unchecked"] { display: none }` or `@if`.
|
|
130
|
+
*
|
|
131
|
+
* Purely a styling convenience — consumers happy with CSS `:has`
|
|
132
|
+
* selectors or `[data-state]` checks on the parent can skip it entirely.
|
|
133
|
+
*/
|
|
134
|
+
class ForCheckboxIndicator {
|
|
135
|
+
parent;
|
|
136
|
+
constructor() {
|
|
137
|
+
const parent = inject(FOR_CHECKBOX, { optional: true });
|
|
138
|
+
if (!parent) {
|
|
139
|
+
throw new Error('[forty-cdk/checkbox] ForCheckboxIndicator must be used inside a [forCheckbox] element.');
|
|
140
|
+
}
|
|
141
|
+
this.parent = parent;
|
|
142
|
+
}
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForCheckboxIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
144
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: ForCheckboxIndicator, isStandalone: true, selector: "[forCheckboxIndicator]", host: { properties: { "attr.data-state": "parent.dataState()" } }, exportAs: ["forCheckboxIndicator"], ngImport: i0 });
|
|
145
|
+
}
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForCheckboxIndicator, decorators: [{
|
|
147
|
+
type: Directive,
|
|
148
|
+
args: [{
|
|
149
|
+
selector: '[forCheckboxIndicator]',
|
|
150
|
+
exportAs: 'forCheckboxIndicator',
|
|
151
|
+
host: {
|
|
152
|
+
'[attr.data-state]': 'parent.dataState()',
|
|
153
|
+
},
|
|
154
|
+
}]
|
|
155
|
+
}], ctorParameters: () => [] });
|
|
156
|
+
|
|
157
|
+
const FALLBACK = {};
|
|
158
|
+
const { token, provideDefaults } = createDefaults('FOR_CHECKBOX_DEFAULTS', FALLBACK);
|
|
159
|
+
/** Token holding the resolved checkbox defaults for the current scope. */
|
|
160
|
+
const FOR_CHECKBOX_DEFAULTS = token;
|
|
161
|
+
/**
|
|
162
|
+
* Configures forty-cdk checkbox defaults for this injector scope. Partial
|
|
163
|
+
* overrides inherit unspecified keys from the parent scope (or library
|
|
164
|
+
* defaults at the root).
|
|
165
|
+
*/
|
|
166
|
+
function provideForCheckboxDefaults(defaults = {}) {
|
|
167
|
+
return provideDefaults(defaults);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Exact public names of every `ForCheckbox` input, its models included. Spread it into the
|
|
172
|
+
* `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the
|
|
173
|
+
* primitive's full surface — the Signal Forms members `[formField]` binds among them —
|
|
174
|
+
* without hand-maintaining the list. Always spread into an inline object literal as shown
|
|
175
|
+
* below: the literal is what keeps the entry statically analyzable for consumers compiling
|
|
176
|
+
* against the published package. An anti-drift spec fails when this list no longer matches
|
|
177
|
+
* the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported
|
|
178
|
+
* wrapping patterns.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* @Component({
|
|
183
|
+
* selector: 'button[myCheckbox]',
|
|
184
|
+
* template: '',
|
|
185
|
+
* hostDirectives: [
|
|
186
|
+
* {
|
|
187
|
+
* directive: ForCheckbox,
|
|
188
|
+
* inputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS],
|
|
189
|
+
* outputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS],
|
|
190
|
+
* },
|
|
191
|
+
* ],
|
|
192
|
+
* })
|
|
193
|
+
* export class MyCheckbox {}
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
const FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS = [
|
|
197
|
+
'checked',
|
|
198
|
+
'indeterminate',
|
|
199
|
+
'dirty',
|
|
200
|
+
'disabled',
|
|
201
|
+
'errors',
|
|
202
|
+
'invalid',
|
|
203
|
+
'name',
|
|
204
|
+
'pending',
|
|
205
|
+
'readonly',
|
|
206
|
+
'required',
|
|
207
|
+
'touched',
|
|
208
|
+
];
|
|
209
|
+
/**
|
|
210
|
+
* Exact public names of every `ForCheckbox` output, the Signal Forms `touch` output
|
|
211
|
+
* included. Spread it into the `outputs` array of the same `hostDirectives` entry as
|
|
212
|
+
* {@link FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS}.
|
|
213
|
+
*/
|
|
214
|
+
const FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS = [
|
|
215
|
+
'checkedChange',
|
|
216
|
+
'indeterminateChange',
|
|
217
|
+
'touchedChange',
|
|
218
|
+
'touch',
|
|
219
|
+
];
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Generated bundle index. Do not edit.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
export { FOR_CHECKBOX, FOR_CHECKBOX_DEFAULTS, FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS, FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS, ForCheckbox, ForCheckboxIndicator, provideForCheckboxDefaults };
|
|
226
|
+
//# sourceMappingURL=forty-cdk-checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forty-cdk-checkbox.mjs","sources":["../../../projects/forty-cdk/checkbox/src/checkbox.ts","../../../projects/forty-cdk/checkbox/src/checkbox-indicator.ts","../../../projects/forty-cdk/checkbox/src/checkbox-defaults.ts","../../../projects/forty-cdk/checkbox/src/checkbox-host-directive.ts","../../../projects/forty-cdk/checkbox/src/forty-cdk-checkbox.ts"],"sourcesContent":["import { computed, Directive, InjectionToken, model } from '@angular/core';\nimport type { FormCheckboxControl } from '@angular/forms/signals';\n\nimport { FormUiControlBase, injectHiddenInput } from 'forty-cdk/core';\n\n/**\n * Injection key the `[forCheckboxIndicator]` uses to resolve its parent\n * checkbox, decoupled from the concrete `ForCheckbox` class. `ForCheckbox`\n * provides itself under this token, so a design system wrapping the checkbox\n * by subclassing re-points it at the subclass with a single provider\n * (`{ provide: FOR_CHECKBOX, useExisting: MtxCheckbox }`) and the indicator\n * keeps resolving — see `docs/wrapping-form-primitives.md`.\n */\nexport const FOR_CHECKBOX = new InjectionToken<ForCheckbox>('FOR_CHECKBOX');\n\n/**\n * Headless checkbox implementing the\n * [WAI-ARIA Checkbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/)\n * with optional tri-state (`indeterminate`) support, plus Angular's\n * `FormCheckboxControl` from `@angular/forms/signals` for `[formField]`\n * auto-wiring.\n *\n * Apply on a `<button type=\"button\">`. The directive forces `type=\"button\"`\n * to avoid accidental form submission; Enter and Space activation come from\n * native button behavior (APG only mandates Space, and Enter is harmless on\n * a non-submit button).\n *\n * Tri-state: when `indeterminate` is `true`, `aria-checked=\"mixed\"` is\n * announced regardless of `checked`. Activating an indeterminate checkbox\n * clears `indeterminate` and toggles `checked` from its current value\n * (matches native `<input type=\"checkbox\">` behavior).\n *\n * The accessible name is the consumer's responsibility — wrap the button in a\n * `<label>` or use `aria-labelledby` / `aria-label`.\n *\n * @example\n * ```html\n * <button forCheckbox [(checked)]=\"agreed\">\n * <span class=\"indicator\"></span>\n * </button>\n * I agree to the terms.\n *\n * <!-- With Signal Forms: -->\n * <button forCheckbox [formField]=\"form.acceptTerms\"></button>\n * ```\n */\n@Directive({\n selector: '[forCheckbox]',\n exportAs: 'forCheckbox',\n providers: [{ provide: FOR_CHECKBOX, useExisting: ForCheckbox }],\n host: {\n role: 'checkbox',\n type: 'button',\n '[attr.aria-checked]': 'ariaChecked()',\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.name]': 'name() || null',\n '[attr.data-state]': 'dataState()',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'readonly() ? \"\" : null',\n '(click)': 'onClick()',\n '(blur)': 'markTouched()',\n },\n})\nexport class ForCheckbox extends FormUiControlBase implements FormCheckboxControl {\n /** Two-way bindable on/off state. Required by `FormCheckboxControl`. */\n readonly checked = model<boolean>(false);\n\n /**\n * Two-way bindable indeterminate state. When true, `aria-checked=\"mixed\"`\n * is announced regardless of `checked`. Activation clears it.\n *\n * Not part of `FormCheckboxControl` — the field's value stays binary.\n * Indeterminate is a UI-only concern (e.g. a parent \"select all\" reflecting\n * children with mixed selection).\n */\n readonly indeterminate = model<boolean>(false);\n\n protected readonly ariaChecked = computed<'true' | 'false' | 'mixed'>(() => {\n if (this.indeterminate()) return 'mixed';\n return this.checked() ? 'true' : 'false';\n });\n\n /**\n * Logical state reflected on `data-state`: `'checked'`, `'unchecked'`, or\n * `'indeterminate'`. Exposed so `ForCheckboxIndicator` can mirror it without\n * re-deriving the same mapping.\n */\n readonly dataState = computed<'checked' | 'unchecked' | 'indeterminate'>(() => {\n if (this.indeterminate()) return 'indeterminate';\n return this.checked() ? 'checked' : 'unchecked';\n });\n\n constructor() {\n super();\n injectHiddenInput({\n name: this.name,\n // Matches native `<input type=\"checkbox\">`: only `checked` contributes\n // to form submission; `indeterminate` is purely a presentational flag.\n values: computed(() => (this.checked() ? ['on'] : [])),\n disabled: this.effectiveDisabled,\n });\n }\n\n protected onClick(): void {\n if (this.effectiveDisabled() || this.readonly()) {\n return;\n }\n if (this.indeterminate()) {\n this.indeterminate.set(false);\n }\n this.checked.update((v) => !v);\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { FOR_CHECKBOX, type ForCheckbox } from './checkbox';\n\n/**\n * Optional indicator slot inside a `ForCheckbox`. Apply on the element\n * the consumer wants to show only while the checkbox is `checked` or\n * `indeterminate` (typically a check icon, dash, or filled square). The\n * directive mirrors `data-state` from the parent so the consumer can\n * style transitions without per-state bindings; hide the unchecked state\n * via `[data-state=\"unchecked\"] { display: none }` or `@if`.\n *\n * Purely a styling convenience — consumers happy with CSS `:has`\n * selectors or `[data-state]` checks on the parent can skip it entirely.\n */\n@Directive({\n selector: '[forCheckboxIndicator]',\n exportAs: 'forCheckboxIndicator',\n host: {\n '[attr.data-state]': 'parent.dataState()',\n },\n})\nexport class ForCheckboxIndicator {\n protected readonly parent: ForCheckbox;\n\n constructor() {\n const parent = inject(FOR_CHECKBOX, { optional: true });\n if (!parent) {\n throw new Error(\n '[forty-cdk/checkbox] ForCheckboxIndicator must be used inside a [forCheckbox] element.',\n );\n }\n this.parent = parent;\n }\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant checkboxes in the surrounding injector\n * scope. Configure with `provideForCheckboxDefaults`. The shape is a stub\n * today — present so future per-scope tuning can land without churning the\n * public surface.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface ForCheckboxDefaults {}\n\nconst FALLBACK: ForCheckboxDefaults = {};\n\nconst { token, provideDefaults } = createDefaults<ForCheckboxDefaults>(\n 'FOR_CHECKBOX_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved checkbox defaults for the current scope. */\nexport const FOR_CHECKBOX_DEFAULTS = token;\n\n/**\n * Configures forty-cdk checkbox 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 provideForCheckboxDefaults(\n defaults: Partial<ForCheckboxDefaults> = {},\n): Provider[] {\n return provideDefaults(defaults);\n}\n","/**\n * Exact public names of every `ForCheckbox` 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: 'button[myCheckbox]',\n * template: '',\n * hostDirectives: [\n * {\n * directive: ForCheckbox,\n * inputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS],\n * outputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS],\n * },\n * ],\n * })\n * export class MyCheckbox {}\n * ```\n */\nexport const FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS = [\n 'checked',\n 'indeterminate',\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 `ForCheckbox` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS = [\n 'checkedChange',\n 'indeterminateChange',\n 'touchedChange',\n 'touch',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAKA;;;;;;;AAOG;MACU,YAAY,GAAG,IAAI,cAAc,CAAc,cAAc;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AAsBG,MAAO,WAAY,SAAQ,iBAAiB,CAAA;;IAEvC,OAAO,GAAG,KAAK,CAAU,KAAK;gFAAC;AAExC;;;;;;;AAOG;IACM,aAAa,GAAG,KAAK,CAAU,KAAK;sFAAC;AAE3B,IAAA,WAAW,GAAG,QAAQ,CAA6B,MAAK;QACzE,IAAI,IAAI,CAAC,aAAa,EAAE;AAAE,YAAA,OAAO,OAAO;AACxC,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,GAAG,OAAO;IAC1C,CAAC;oFAAC;AAEF;;;;AAIG;AACM,IAAA,SAAS,GAAG,QAAQ,CAA4C,MAAK;QAC5E,IAAI,IAAI,CAAC,aAAa,EAAE;AAAE,YAAA,OAAO,eAAe;A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