@cdevhub/ngx-tw 0.2.0 → 0.2.1
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/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +8 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +8 -2
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +8 -9
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +10 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +2 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +6 -2
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +10 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +3 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +5 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +11 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/package.json +4 -1
- package/theme/_dark.css +16 -12
- package/theme/_semantic.css +3 -2
- package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
- package/types/cdevhub-ngx-tw-select.d.ts +1 -1
- package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
|
@@ -491,13 +491,13 @@ class TabsComponent {
|
|
|
491
491
|
this.scrollCleanup = () => el.removeEventListener('scroll', onScroll);
|
|
492
492
|
}
|
|
493
493
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: TabsComponent, isStandalone: true, selector: "tw-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, fitted: { classPropertyName: "fitted", publicName: "fitted", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", closed: "closed" }, host: { properties: { "class": "rootClasses()" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "triggerElements", predicate: TabTriggerElementDirective, descendants: true, isSignal: true }, { propertyName: "tablistInnerRef", first: true, predicate: ["tablistInner"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Tablist container -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance \u2014 native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabTriggerElementDirective, selector: "[twTabTriggerElement]", inputs: ["isActive", "isDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
494
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: TabsComponent, isStandalone: true, selector: "tw-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, fitted: { classPropertyName: "fitted", publicName: "fitted", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", closed: "closed" }, host: { properties: { "class": "rootClasses()" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "triggerElements", predicate: TabTriggerElementDirective, descendants: true, isSignal: true }, { propertyName: "tablistInnerRef", first: true, predicate: ["tablistInner"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Tablist container. WAI-ARIA tablist owns roving focus on the tab elements\n inside; the container itself relays keydown but isn't tabbable. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance \u2014 native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabTriggerElementDirective, selector: "[twTabTriggerElement]", inputs: ["isActive", "isDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
495
495
|
}
|
|
496
496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TabsComponent, decorators: [{
|
|
497
497
|
type: Component,
|
|
498
498
|
args: [{ selector: 'tw-tabs', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, TabTriggerElementDirective], host: {
|
|
499
499
|
'[class]': 'rootClasses()',
|
|
500
|
-
}, template: "<!-- Tablist container -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance \u2014 native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n" }]
|
|
500
|
+
}, template: "<!-- Tablist container. WAI-ARIA tablist owns roving focus on the tab elements\n inside; the container itself relays keydown but isn't tabbable. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance \u2014 native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n" }]
|
|
501
501
|
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], fitted: [{ type: i0.Input, args: [{ isSignal: true, alias: "fitted", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], closed: [{ type: i0.Output, args: ["closed"] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }], triggerElements: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => TabTriggerElementDirective), { isSignal: true }] }], tablistInnerRef: [{ type: i0.ViewChild, args: ['tablistInner', { isSignal: true }] }] } });
|
|
502
502
|
|
|
503
503
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-tabs.mjs","sources":["../../../projects/ngx-tw/tabs/tabs.ts","../../../projects/ngx-tw/tabs/tabs.html","../../../projects/ngx-tw/tabs/cdevhub-ngx-tw-tabs.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n viewChildren,\n type AfterViewInit,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport { twMerge } from 'tailwind-merge';\nimport {\n getActiveTriggerClasses,\n getInactiveTriggerClasses,\n tabTriggerVariants,\n type TabTriggerVariant,\n type TwColor,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the tab strip. */\nexport type TabsVariant = TabTriggerVariant;\n\n// ── tv() config (component-local slots only — trigger config is shared) ──\n\nconst tabsLayoutVariants = tv(\n {\n slots: {\n root: 'flex',\n tablist: 'relative flex shrink-0',\n tablistInner: 'flex overflow-x-auto',\n panel: 'min-w-0 flex-1',\n scrollButton:\n 'inline-flex items-center justify-center shrink-0 cursor-pointer transition-colors duration-normal motion-reduce:transition-none disabled:opacity-30 disabled:cursor-default hover:bg-surface-muted',\n closeButton:\n 'inline-flex items-center justify-center rounded-md cursor-pointer transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n variants: {\n variant: {\n underline: {\n tablist: 'border-b border-border',\n tablistInner: 'gap-0',\n panel: 'pt-4',\n },\n enclosed: {\n tablist: 'border-b border-border',\n tablistInner: 'gap-0',\n panel: 'pt-4',\n },\n pill: {\n tablist: 'bg-surface-muted rounded-xl p-1',\n tablistInner: 'gap-1',\n panel: 'pt-4',\n },\n },\n // Square interactive-target scale: see CLAUDE.md \"Icon Sizing\".\n size: {\n xs: { scrollButton: 'size-5', closeButton: 'size-6' },\n sm: { scrollButton: 'size-5', closeButton: 'size-7' },\n md: { scrollButton: 'size-6', closeButton: 'size-8' },\n lg: { scrollButton: 'size-7', closeButton: 'size-9' },\n xl: { scrollButton: 'size-8', closeButton: 'size-9' },\n },\n orientation: {\n horizontal: {\n root: 'flex-col',\n tablist: '',\n tablistInner: 'flex-row',\n },\n vertical: {\n root: 'flex-row',\n tablistInner: 'flex-col overflow-y-auto overflow-x-hidden',\n },\n },\n },\n compoundVariants: [\n {\n variant: 'underline',\n orientation: 'vertical',\n class: {\n tablist: 'border-b-0 border-r border-border',\n panel: 'pt-0 pl-4',\n },\n },\n {\n variant: 'enclosed',\n orientation: 'vertical',\n class: {\n tablist: 'border-b-0 border-r border-border',\n panel: 'pt-0 pl-4',\n },\n },\n {\n variant: 'pill',\n orientation: 'vertical',\n class: {\n panel: 'pt-0 pl-4',\n },\n },\n ],\n defaultVariants: {\n variant: 'underline',\n size: 'md',\n orientation: 'horizontal',\n },\n },\n { twMerge: true },\n);\n\n// ── Per-variant/orientation trigger additions (vertical underline/enclosed\n// re-route the active border axis, hence these compound overrides). ──\n\nfunction getTriggerOrientationExtras(\n variant: TabsVariant,\n orientation: 'horizontal' | 'vertical',\n): string {\n if (orientation !== 'vertical') return '';\n switch (variant) {\n case 'underline':\n return 'border-b-0 -mb-0 border-r-2 border-transparent -mr-px';\n case 'enclosed':\n return '-mb-0 -mr-px';\n case 'pill':\n return '';\n }\n}\n\n// ── Directives ──\n\n@Directive({ selector: 'ng-template[twTabTrigger]' })\nexport class TabTriggerDirective {\n readonly templateRef = inject(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[twTabContent]' })\nexport class TabContentDirective {\n readonly templateRef = inject(TemplateRef);\n}\n\n// ── TabComponent ──\n\n@Component({\n selector: 'tw-tab',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-template #implicitContent>\n <ng-content />\n </ng-template>\n `,\n host: {\n 'style': 'display: none',\n },\n})\nexport class TabComponent {\n /** Unique identifier for this tab. Used to match the active tab value. */\n readonly value = input.required<string>();\n\n /** Plain text label shown in the trigger. Ignored when a custom trigger template is provided. */\n readonly label = input('');\n\n /** When true, the tab cannot be selected and is skipped by keyboard navigation. Defaults to false. */\n readonly disabled = input(false);\n\n /** When true, a close button is rendered in the tab trigger. Defaults to false. */\n readonly closable = input(false);\n\n /** When true, the tab panel content is only instantiated when the tab becomes active for the first time. Defaults to false. */\n readonly lazy = input(false);\n\n /** @internal Custom trigger template, if provided. */\n readonly triggerTemplate = contentChild(TabTriggerDirective);\n\n /** @internal Custom content template, if provided via twTabContent. */\n readonly contentTemplate = contentChild(TabContentDirective);\n\n /** @internal Implicit content template wrapping ng-content. */\n readonly implicitContentTemplate = viewChild<TemplateRef<unknown>>('implicitContent');\n}\n\n// ── Tab trigger element wrapper ──\n\n@Directive({\n selector: '[twTabTriggerElement]',\n host: {\n '[attr.tabindex]': 'tabIndex()',\n },\n})\nexport class TabTriggerElementDirective implements FocusableOption {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n readonly isActive = input(false);\n readonly isDisabled = input(false);\n\n readonly tabIndex = computed(() => this.isActive() ? 0 : -1);\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * FocusableOption getter. NOTE: we cannot expose the `isDisabled` input\n * signal directly — the signal function itself is always truthy, which would\n * make FocusKeyManager treat every trigger as disabled. We resolve the\n * signal here so the manager skips the right items.\n */\n get disabled(): boolean {\n return this.isDisabled();\n }\n}\n\n// ── TabsComponent ──\n\nlet nextId = 0;\n\n@Component({\n selector: 'tw-tabs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, TabTriggerElementDirective],\n templateUrl: './tabs.html',\n host: {\n '[class]': 'rootClasses()',\n },\n})\nexport class TabsComponent implements AfterViewInit {\n /** Controls the visual style of the tab strip. Defaults to 'underline'. */\n readonly variant = input<TabsVariant>('underline');\n\n /** Sets the semantic color for active tab indicators and highlights. Defaults to 'primary'. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding, font size, and icon size of tab triggers. Defaults to 'md'. */\n readonly size = input<TwSize>('md');\n\n /** Layout direction of the tab strip. Defaults to 'horizontal'. */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /** When true, tab triggers stretch to fill the available width equally. Defaults to false. */\n readonly fitted = input(false);\n\n /** The value of the currently active tab. Two-way bound. Updates when the user selects a tab. */\n readonly value = model<string>('');\n\n /** Fires when a closable tab's close button is clicked. Payload is the tab's value. */\n readonly closed = output<string>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** @internal */\n readonly tabs = contentChildren(TabComponent);\n\n /** @internal */\n readonly triggerElements = viewChildren(TabTriggerElementDirective);\n\n /** @internal */\n readonly tablistInnerRef = viewChild<ElementRef<HTMLElement>>('tablistInner');\n\n private readonly componentId = `tw-tabs-${nextId++}`;\n\n // ── Active tab tracking ──\n\n readonly activeValue = linkedSignal(() => this.value());\n\n // ── Lazy tab tracking — Set of tab values that have been activated at least once ──\n readonly activatedTabs = signal(new Set<string>());\n\n // ── Scroll overflow signals ──\n readonly canScrollStart = signal(false);\n readonly canScrollEnd = signal(false);\n\n private resizeObserver: ResizeObserver | null = null;\n private scrollCleanup: (() => void) | null = null;\n\n // ── Variant classes ──\n\n private readonly layoutResult = computed(() =>\n tabsLayoutVariants({\n variant: this.variant(),\n size: this.size(),\n orientation: this.orientation(),\n }),\n );\n\n private readonly triggerResult = computed(() =>\n tabTriggerVariants({\n variant: this.variant(),\n color: this.color(),\n size: this.size(),\n fitted: this.fitted(),\n }),\n );\n\n readonly rootClasses = computed(() => this.layoutResult().root());\n readonly tablistClasses = computed(() => this.layoutResult().tablist());\n readonly tablistInnerClasses = computed(() => this.layoutResult().tablistInner());\n readonly baseTriggerClasses = computed(() => this.triggerResult().trigger());\n readonly panelClasses = computed(() => this.layoutResult().panel());\n readonly scrollButtonClasses = computed(() => this.layoutResult().scrollButton());\n readonly closeButtonClasses = computed(() => this.layoutResult().closeButton());\n\n // ── Per-trigger active/inactive class computation ──\n\n /** @internal Get combined trigger classes for a given tab. */\n getTriggerClasses(_tabValue: string, isActive: boolean): string {\n const base = this.baseTriggerClasses();\n const orientationExtras = getTriggerOrientationExtras(this.variant(), this.orientation());\n const state = isActive\n ? getActiveTriggerClasses(this.variant(), this.color(), this.orientation())\n : getInactiveTriggerClasses(this.variant());\n return twMerge(base, orientationExtras, state);\n }\n\n // ── ID generation ──\n getTabId(tabValue: string): string {\n return `${this.componentId}-tab-${tabValue}`;\n }\n\n getPanelId(tabValue: string): string {\n return `${this.componentId}-panel-${tabValue}`;\n }\n\n // ── Tab visibility ──\n\n isTabActive(tabValue: string): boolean {\n return this.activeValue() === tabValue;\n }\n\n shouldRenderPanel(tab: TabComponent): boolean {\n const value = tab.value();\n if (!tab.lazy()) {\n return true;\n }\n // Lazy: render only if it has been activated at least once\n return this.activatedTabs().has(value);\n }\n\n // ── Selection ──\n\n selectTab(tab: TabComponent): void {\n if (tab.disabled()) return;\n const val = tab.value();\n this.activeValue.set(val);\n this.value.set(val);\n\n // Mark as activated for lazy tabs\n this.activatedTabs.update(set => {\n const next = new Set(set);\n next.add(val);\n return next;\n });\n\n // Announce to screen readers\n const tabsArr = this.tabs();\n const idx = tabsArr.findIndex(t => t.value() === val);\n this.liveAnnouncer.announce(\n `${tab.label() || val} tab, ${idx + 1} of ${tabsArr.length}`,\n );\n }\n\n closeTab(tab: TabComponent, event: Event): void {\n event.stopPropagation();\n if (event instanceof KeyboardEvent) {\n event.preventDefault();\n }\n const val = tab.value();\n this.closed.emit(val);\n\n // If closing the active tab, activate nearest enabled sibling\n if (this.isTabActive(val)) {\n const tabsArr = this.tabs();\n const idx = tabsArr.findIndex(t => t.value() === val);\n const next = this.findNearestEnabledTab(tabsArr, idx);\n if (next) {\n this.selectTab(next);\n }\n }\n }\n\n private findNearestEnabledTab(tabs: readonly TabComponent[], fromIndex: number): TabComponent | null {\n // Search forward first, then backward\n for (let i = fromIndex + 1; i < tabs.length; i++) {\n if (!tabs[i].disabled()) return tabs[i];\n }\n for (let i = fromIndex - 1; i >= 0; i--) {\n if (!tabs[i].disabled()) return tabs[i];\n }\n return null;\n }\n\n // ── Keyboard navigation (CDK FocusKeyManager) ──\n\n private keyManager: FocusKeyManager<TabTriggerElementDirective> | null = null;\n\n /**\n * @internal Handles keyboard navigation. The manager handles Arrow/Home/End;\n * we layer Enter/Space to select the focused tab (the wrapper is a `<div role=\"tab\">`\n * so we lose the native button activation) and Delete to close a closable tab.\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.keyManager) return;\n const triggers = this.triggerElements();\n if (triggers.length === 0) return;\n\n // Sync active item with the trigger DOM-focused by the user. We accept\n // either `event.target` (which works under shadow DOM) or the currently\n // active tab's index as a safety net (e.g. when the event was dispatched\n // on the tablist container itself, not a trigger).\n const focusedIdx = triggers.findIndex(\n t => t.elementRef.nativeElement === event.target,\n );\n const activeIdx = focusedIdx >= 0\n ? focusedIdx\n : this.tabs().findIndex(t => t.value() === this.activeValue());\n if (activeIdx >= 0 && activeIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(activeIdx);\n }\n\n // Enter / Space select the focused tab (we no longer get this for free\n // because the trigger is a div, not a button — see DOM restructure below).\n if (event.key === 'Enter' || event.key === ' ') {\n if (focusedIdx >= 0) {\n event.preventDefault();\n this.selectTab(this.tabs()[focusedIdx]);\n }\n return;\n }\n\n // Delete on a closable tab dismisses it (APG-recommended). Keyboard users\n // who don't want to traverse to the close button can dismiss inline.\n if (event.key === 'Delete' && focusedIdx >= 0) {\n const tab = this.tabs()[focusedIdx];\n if (tab.closable() && !tab.disabled()) {\n event.preventDefault();\n this.closeTab(tab, event);\n return;\n }\n }\n\n // Let the manager handle arrow/home/end navigation.\n const before = this.keyManager.activeItemIndex;\n this.keyManager.onKeydown(event);\n const after = this.keyManager.activeItemIndex;\n if (after !== null && after !== before && after >= 0) {\n // Automatic activation pattern (APG): selection follows focus.\n this.selectTab(this.tabs()[after]);\n }\n }\n\n // ── Scrolling ──\n\n scrollStart(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n el.scrollBy({ top: -120, behavior: 'smooth' });\n } else {\n el.scrollBy({ left: -120, behavior: 'smooth' });\n }\n }\n\n scrollEnd(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n el.scrollBy({ top: 120, behavior: 'smooth' });\n } else {\n el.scrollBy({ left: 120, behavior: 'smooth' });\n }\n }\n\n private updateScrollState(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n this.canScrollStart.set(el.scrollTop > 0);\n this.canScrollEnd.set(el.scrollTop + el.clientHeight < el.scrollHeight - 1);\n } else {\n this.canScrollStart.set(el.scrollLeft > 0);\n this.canScrollEnd.set(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);\n }\n }\n\n ngAfterViewInit(): void {\n this.initializeActiveTab();\n }\n\n constructor() {\n afterNextRender(() => {\n this.setupScrollDetection();\n });\n\n // Rebuild FocusKeyManager whenever triggers or orientation change.\n effect((onCleanup) => {\n const triggers = this.triggerElements();\n const orientation = this.orientation();\n if (triggers.length === 0) {\n this.keyManager = null;\n return;\n }\n const manager = new FocusKeyManager(triggers)\n .withWrap()\n .withHomeAndEnd();\n if (orientation === 'vertical') {\n manager.withVerticalOrientation();\n } else {\n manager.withHorizontalOrientation('ltr');\n }\n this.keyManager = manager;\n\n // Initialise the manager's active index to the active tab so the first\n // arrow press moves from the active item, not from -1.\n untracked(() => {\n const activeVal = this.activeValue();\n const tabs = this.tabs();\n const idx = tabs.findIndex(t => t.value() === activeVal);\n if (idx >= 0) {\n manager.setActiveItem(idx);\n }\n });\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n\n this.destroyRef.onDestroy(() => {\n this.resizeObserver?.disconnect();\n this.scrollCleanup?.();\n });\n }\n\n private initializeActiveTab(): void {\n // If no value was provided, default to the first enabled tab\n if (!this.activeValue()) {\n const first = this.tabs().find(t => !t.disabled());\n if (first) {\n this.activeValue.set(first.value());\n this.value.set(first.value());\n }\n }\n\n // Mark the initial active tab as activated (for lazy tracking)\n const val = this.activeValue();\n if (val) {\n this.activatedTabs.update(set => {\n const next = new Set(set);\n next.add(val);\n return next;\n });\n }\n }\n\n private setupScrollDetection(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n\n // Initial check\n this.updateScrollState();\n\n // ResizeObserver for container size changes\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n this.updateScrollState();\n });\n this.resizeObserver.observe(el);\n }\n\n // Scroll event for scroll position changes\n const onScroll = () => this.updateScrollState();\n el.addEventListener('scroll', onScroll, { passive: true });\n this.scrollCleanup = () => el.removeEventListener('scroll', onScroll);\n }\n}\n","<!-- Tablist container -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance — native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAuCA;AAEA,MAAM,kBAAkB,GAAG,EAAE,CAC3B;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,MAAM;AACZ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abs/tabs.html","../../../projects/ngx-tw/tabs/cdevhub-ngx-tw-tabs.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n viewChildren,\n type AfterViewInit,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport { twMerge } from 'tailwind-merge';\nimport {\n getActiveTriggerClasses,\n getInactiveTriggerClasses,\n tabTriggerVariants,\n type TabTriggerVariant,\n type TwColor,\n type TwSize,\n} from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the tab strip. */\nexport type TabsVariant = TabTriggerVariant;\n\n// ── tv() config (component-local slots only — trigger config is shared) ──\n\nconst tabsLayoutVariants = tv(\n {\n slots: {\n root: 'flex',\n tablist: 'relative flex shrink-0',\n tablistInner: 'flex overflow-x-auto',\n panel: 'min-w-0 flex-1',\n scrollButton:\n 'inline-flex items-center justify-center shrink-0 cursor-pointer transition-colors duration-normal motion-reduce:transition-none disabled:opacity-30 disabled:cursor-default hover:bg-surface-muted',\n closeButton:\n 'inline-flex items-center justify-center rounded-md cursor-pointer transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n variants: {\n variant: {\n underline: {\n tablist: 'border-b border-border',\n tablistInner: 'gap-0',\n panel: 'pt-4',\n },\n enclosed: {\n tablist: 'border-b border-border',\n tablistInner: 'gap-0',\n panel: 'pt-4',\n },\n pill: {\n tablist: 'bg-surface-muted rounded-xl p-1',\n tablistInner: 'gap-1',\n panel: 'pt-4',\n },\n },\n // Square interactive-target scale: see CLAUDE.md \"Icon Sizing\".\n size: {\n xs: { scrollButton: 'size-5', closeButton: 'size-6' },\n sm: { scrollButton: 'size-5', closeButton: 'size-7' },\n md: { scrollButton: 'size-6', closeButton: 'size-8' },\n lg: { scrollButton: 'size-7', closeButton: 'size-9' },\n xl: { scrollButton: 'size-8', closeButton: 'size-9' },\n },\n orientation: {\n horizontal: {\n root: 'flex-col',\n tablist: '',\n tablistInner: 'flex-row',\n },\n vertical: {\n root: 'flex-row',\n tablistInner: 'flex-col overflow-y-auto overflow-x-hidden',\n },\n },\n },\n compoundVariants: [\n {\n variant: 'underline',\n orientation: 'vertical',\n class: {\n tablist: 'border-b-0 border-r border-border',\n panel: 'pt-0 pl-4',\n },\n },\n {\n variant: 'enclosed',\n orientation: 'vertical',\n class: {\n tablist: 'border-b-0 border-r border-border',\n panel: 'pt-0 pl-4',\n },\n },\n {\n variant: 'pill',\n orientation: 'vertical',\n class: {\n panel: 'pt-0 pl-4',\n },\n },\n ],\n defaultVariants: {\n variant: 'underline',\n size: 'md',\n orientation: 'horizontal',\n },\n },\n { twMerge: true },\n);\n\n// ── Per-variant/orientation trigger additions (vertical underline/enclosed\n// re-route the active border axis, hence these compound overrides). ──\n\nfunction getTriggerOrientationExtras(\n variant: TabsVariant,\n orientation: 'horizontal' | 'vertical',\n): string {\n if (orientation !== 'vertical') return '';\n switch (variant) {\n case 'underline':\n return 'border-b-0 -mb-0 border-r-2 border-transparent -mr-px';\n case 'enclosed':\n return '-mb-0 -mr-px';\n case 'pill':\n return '';\n }\n}\n\n// ── Directives ──\n\n@Directive({ selector: 'ng-template[twTabTrigger]' })\nexport class TabTriggerDirective {\n readonly templateRef = inject(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[twTabContent]' })\nexport class TabContentDirective {\n readonly templateRef = inject(TemplateRef);\n}\n\n// ── TabComponent ──\n\n@Component({\n selector: 'tw-tab',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-template #implicitContent>\n <ng-content />\n </ng-template>\n `,\n host: {\n 'style': 'display: none',\n },\n})\nexport class TabComponent {\n /** Unique identifier for this tab. Used to match the active tab value. */\n readonly value = input.required<string>();\n\n /** Plain text label shown in the trigger. Ignored when a custom trigger template is provided. */\n readonly label = input('');\n\n /** When true, the tab cannot be selected and is skipped by keyboard navigation. Defaults to false. */\n readonly disabled = input(false);\n\n /** When true, a close button is rendered in the tab trigger. Defaults to false. */\n readonly closable = input(false);\n\n /** When true, the tab panel content is only instantiated when the tab becomes active for the first time. Defaults to false. */\n readonly lazy = input(false);\n\n /** @internal Custom trigger template, if provided. */\n readonly triggerTemplate = contentChild(TabTriggerDirective);\n\n /** @internal Custom content template, if provided via twTabContent. */\n readonly contentTemplate = contentChild(TabContentDirective);\n\n /** @internal Implicit content template wrapping ng-content. */\n readonly implicitContentTemplate = viewChild<TemplateRef<unknown>>('implicitContent');\n}\n\n// ── Tab trigger element wrapper ──\n\n@Directive({\n selector: '[twTabTriggerElement]',\n host: {\n '[attr.tabindex]': 'tabIndex()',\n },\n})\nexport class TabTriggerElementDirective implements FocusableOption {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n readonly isActive = input(false);\n readonly isDisabled = input(false);\n\n readonly tabIndex = computed(() => this.isActive() ? 0 : -1);\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * FocusableOption getter. NOTE: we cannot expose the `isDisabled` input\n * signal directly — the signal function itself is always truthy, which would\n * make FocusKeyManager treat every trigger as disabled. We resolve the\n * signal here so the manager skips the right items.\n */\n get disabled(): boolean {\n return this.isDisabled();\n }\n}\n\n// ── TabsComponent ──\n\nlet nextId = 0;\n\n@Component({\n selector: 'tw-tabs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, TabTriggerElementDirective],\n templateUrl: './tabs.html',\n host: {\n '[class]': 'rootClasses()',\n },\n})\nexport class TabsComponent implements AfterViewInit {\n /** Controls the visual style of the tab strip. Defaults to 'underline'. */\n readonly variant = input<TabsVariant>('underline');\n\n /** Sets the semantic color for active tab indicators and highlights. Defaults to 'primary'. */\n readonly color = input<TwColor>('primary');\n\n /** Controls padding, font size, and icon size of tab triggers. Defaults to 'md'. */\n readonly size = input<TwSize>('md');\n\n /** Layout direction of the tab strip. Defaults to 'horizontal'. */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /** When true, tab triggers stretch to fill the available width equally. Defaults to false. */\n readonly fitted = input(false);\n\n /** The value of the currently active tab. Two-way bound. Updates when the user selects a tab. */\n readonly value = model<string>('');\n\n /** Fires when a closable tab's close button is clicked. Payload is the tab's value. */\n readonly closed = output<string>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** @internal */\n readonly tabs = contentChildren(TabComponent);\n\n /** @internal */\n readonly triggerElements = viewChildren(TabTriggerElementDirective);\n\n /** @internal */\n readonly tablistInnerRef = viewChild<ElementRef<HTMLElement>>('tablistInner');\n\n private readonly componentId = `tw-tabs-${nextId++}`;\n\n // ── Active tab tracking ──\n\n readonly activeValue = linkedSignal(() => this.value());\n\n // ── Lazy tab tracking — Set of tab values that have been activated at least once ──\n readonly activatedTabs = signal(new Set<string>());\n\n // ── Scroll overflow signals ──\n readonly canScrollStart = signal(false);\n readonly canScrollEnd = signal(false);\n\n private resizeObserver: ResizeObserver | null = null;\n private scrollCleanup: (() => void) | null = null;\n\n // ── Variant classes ──\n\n private readonly layoutResult = computed(() =>\n tabsLayoutVariants({\n variant: this.variant(),\n size: this.size(),\n orientation: this.orientation(),\n }),\n );\n\n private readonly triggerResult = computed(() =>\n tabTriggerVariants({\n variant: this.variant(),\n color: this.color(),\n size: this.size(),\n fitted: this.fitted(),\n }),\n );\n\n readonly rootClasses = computed(() => this.layoutResult().root());\n readonly tablistClasses = computed(() => this.layoutResult().tablist());\n readonly tablistInnerClasses = computed(() => this.layoutResult().tablistInner());\n readonly baseTriggerClasses = computed(() => this.triggerResult().trigger());\n readonly panelClasses = computed(() => this.layoutResult().panel());\n readonly scrollButtonClasses = computed(() => this.layoutResult().scrollButton());\n readonly closeButtonClasses = computed(() => this.layoutResult().closeButton());\n\n // ── Per-trigger active/inactive class computation ──\n\n /** @internal Get combined trigger classes for a given tab. */\n getTriggerClasses(_tabValue: string, isActive: boolean): string {\n const base = this.baseTriggerClasses();\n const orientationExtras = getTriggerOrientationExtras(this.variant(), this.orientation());\n const state = isActive\n ? getActiveTriggerClasses(this.variant(), this.color(), this.orientation())\n : getInactiveTriggerClasses(this.variant());\n return twMerge(base, orientationExtras, state);\n }\n\n // ── ID generation ──\n getTabId(tabValue: string): string {\n return `${this.componentId}-tab-${tabValue}`;\n }\n\n getPanelId(tabValue: string): string {\n return `${this.componentId}-panel-${tabValue}`;\n }\n\n // ── Tab visibility ──\n\n isTabActive(tabValue: string): boolean {\n return this.activeValue() === tabValue;\n }\n\n shouldRenderPanel(tab: TabComponent): boolean {\n const value = tab.value();\n if (!tab.lazy()) {\n return true;\n }\n // Lazy: render only if it has been activated at least once\n return this.activatedTabs().has(value);\n }\n\n // ── Selection ──\n\n selectTab(tab: TabComponent): void {\n if (tab.disabled()) return;\n const val = tab.value();\n this.activeValue.set(val);\n this.value.set(val);\n\n // Mark as activated for lazy tabs\n this.activatedTabs.update(set => {\n const next = new Set(set);\n next.add(val);\n return next;\n });\n\n // Announce to screen readers\n const tabsArr = this.tabs();\n const idx = tabsArr.findIndex(t => t.value() === val);\n this.liveAnnouncer.announce(\n `${tab.label() || val} tab, ${idx + 1} of ${tabsArr.length}`,\n );\n }\n\n closeTab(tab: TabComponent, event: Event): void {\n event.stopPropagation();\n if (event instanceof KeyboardEvent) {\n event.preventDefault();\n }\n const val = tab.value();\n this.closed.emit(val);\n\n // If closing the active tab, activate nearest enabled sibling\n if (this.isTabActive(val)) {\n const tabsArr = this.tabs();\n const idx = tabsArr.findIndex(t => t.value() === val);\n const next = this.findNearestEnabledTab(tabsArr, idx);\n if (next) {\n this.selectTab(next);\n }\n }\n }\n\n private findNearestEnabledTab(tabs: readonly TabComponent[], fromIndex: number): TabComponent | null {\n // Search forward first, then backward\n for (let i = fromIndex + 1; i < tabs.length; i++) {\n if (!tabs[i].disabled()) return tabs[i];\n }\n for (let i = fromIndex - 1; i >= 0; i--) {\n if (!tabs[i].disabled()) return tabs[i];\n }\n return null;\n }\n\n // ── Keyboard navigation (CDK FocusKeyManager) ──\n\n private keyManager: FocusKeyManager<TabTriggerElementDirective> | null = null;\n\n /**\n * @internal Handles keyboard navigation. The manager handles Arrow/Home/End;\n * we layer Enter/Space to select the focused tab (the wrapper is a `<div role=\"tab\">`\n * so we lose the native button activation) and Delete to close a closable tab.\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this.keyManager) return;\n const triggers = this.triggerElements();\n if (triggers.length === 0) return;\n\n // Sync active item with the trigger DOM-focused by the user. We accept\n // either `event.target` (which works under shadow DOM) or the currently\n // active tab's index as a safety net (e.g. when the event was dispatched\n // on the tablist container itself, not a trigger).\n const focusedIdx = triggers.findIndex(\n t => t.elementRef.nativeElement === event.target,\n );\n const activeIdx = focusedIdx >= 0\n ? focusedIdx\n : this.tabs().findIndex(t => t.value() === this.activeValue());\n if (activeIdx >= 0 && activeIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(activeIdx);\n }\n\n // Enter / Space select the focused tab (we no longer get this for free\n // because the trigger is a div, not a button — see DOM restructure below).\n if (event.key === 'Enter' || event.key === ' ') {\n if (focusedIdx >= 0) {\n event.preventDefault();\n this.selectTab(this.tabs()[focusedIdx]);\n }\n return;\n }\n\n // Delete on a closable tab dismisses it (APG-recommended). Keyboard users\n // who don't want to traverse to the close button can dismiss inline.\n if (event.key === 'Delete' && focusedIdx >= 0) {\n const tab = this.tabs()[focusedIdx];\n if (tab.closable() && !tab.disabled()) {\n event.preventDefault();\n this.closeTab(tab, event);\n return;\n }\n }\n\n // Let the manager handle arrow/home/end navigation.\n const before = this.keyManager.activeItemIndex;\n this.keyManager.onKeydown(event);\n const after = this.keyManager.activeItemIndex;\n if (after !== null && after !== before && after >= 0) {\n // Automatic activation pattern (APG): selection follows focus.\n this.selectTab(this.tabs()[after]);\n }\n }\n\n // ── Scrolling ──\n\n scrollStart(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n el.scrollBy({ top: -120, behavior: 'smooth' });\n } else {\n el.scrollBy({ left: -120, behavior: 'smooth' });\n }\n }\n\n scrollEnd(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n el.scrollBy({ top: 120, behavior: 'smooth' });\n } else {\n el.scrollBy({ left: 120, behavior: 'smooth' });\n }\n }\n\n private updateScrollState(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n\n const isVertical = this.orientation() === 'vertical';\n if (isVertical) {\n this.canScrollStart.set(el.scrollTop > 0);\n this.canScrollEnd.set(el.scrollTop + el.clientHeight < el.scrollHeight - 1);\n } else {\n this.canScrollStart.set(el.scrollLeft > 0);\n this.canScrollEnd.set(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);\n }\n }\n\n ngAfterViewInit(): void {\n this.initializeActiveTab();\n }\n\n constructor() {\n afterNextRender(() => {\n this.setupScrollDetection();\n });\n\n // Rebuild FocusKeyManager whenever triggers or orientation change.\n effect((onCleanup) => {\n const triggers = this.triggerElements();\n const orientation = this.orientation();\n if (triggers.length === 0) {\n this.keyManager = null;\n return;\n }\n const manager = new FocusKeyManager(triggers)\n .withWrap()\n .withHomeAndEnd();\n if (orientation === 'vertical') {\n manager.withVerticalOrientation();\n } else {\n manager.withHorizontalOrientation('ltr');\n }\n this.keyManager = manager;\n\n // Initialise the manager's active index to the active tab so the first\n // arrow press moves from the active item, not from -1.\n untracked(() => {\n const activeVal = this.activeValue();\n const tabs = this.tabs();\n const idx = tabs.findIndex(t => t.value() === activeVal);\n if (idx >= 0) {\n manager.setActiveItem(idx);\n }\n });\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n\n this.destroyRef.onDestroy(() => {\n this.resizeObserver?.disconnect();\n this.scrollCleanup?.();\n });\n }\n\n private initializeActiveTab(): void {\n // If no value was provided, default to the first enabled tab\n if (!this.activeValue()) {\n const first = this.tabs().find(t => !t.disabled());\n if (first) {\n this.activeValue.set(first.value());\n this.value.set(first.value());\n }\n }\n\n // Mark the initial active tab as activated (for lazy tracking)\n const val = this.activeValue();\n if (val) {\n this.activatedTabs.update(set => {\n const next = new Set(set);\n next.add(val);\n return next;\n });\n }\n }\n\n private setupScrollDetection(): void {\n const el = this.tablistInnerRef()?.nativeElement;\n if (!el) return;\n\n // Initial check\n this.updateScrollState();\n\n // ResizeObserver for container size changes\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n this.updateScrollState();\n });\n this.resizeObserver.observe(el);\n }\n\n // Scroll event for scroll position changes\n const onScroll = () => this.updateScrollState();\n el.addEventListener('scroll', onScroll, { passive: true });\n this.scrollCleanup = () => el.removeEventListener('scroll', onScroll);\n }\n}\n","<!-- Tablist container. WAI-ARIA tablist owns roving focus on the tab elements\n inside; the container itself relays keydown but isn't tabbable. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n [class]=\"tablistClasses()\"\n role=\"tablist\"\n [attr.aria-orientation]=\"orientation()\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Scroll start button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollStart()\"\n (click)=\"scrollStart()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n\n <!-- Scrollable trigger strip -->\n <div #tablistInner [class]=\"tablistInnerClasses()\" style=\"scrollbar-width: none\">\n @for (tab of tabs(); track tab.value()) {\n <!-- Trigger is rendered as <div role=\"tab\"> (not <button>) so the close\n affordance can be a native <button> child without nesting interactive\n content (invalid HTML). Activation is wired explicitly via (click)\n and the parent tablist (keydown.enter / keydown.space). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n role=\"tab\"\n twTabTriggerElement\n [isActive]=\"isTabActive(tab.value())\"\n [isDisabled]=\"tab.disabled()\"\n [id]=\"getTabId(tab.value())\"\n [attr.aria-selected]=\"isTabActive(tab.value())\"\n [attr.aria-controls]=\"getPanelId(tab.value())\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [class]=\"getTriggerClasses(tab.value(), isTabActive(tab.value()))\"\n [class.opacity-50]=\"tab.disabled()\"\n [class.pointer-events-none]=\"tab.disabled()\"\n (click)=\"selectTab(tab)\"\n >\n <!-- Custom trigger template or default label -->\n @if (tab.triggerTemplate(); as triggerDir) {\n <ng-container\n [ngTemplateOutlet]=\"triggerDir.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: { active: isTabActive(tab.value()), disabled: tab.disabled(), value: tab.value() } }\"\n />\n } @else {\n {{ tab.label() }}\n }\n\n <!-- Close affordance — native <button> so it is keyboard-focusable.\n Valid because the trigger is a <div role=\"tab\">, not a button. -->\n @if (tab.closable() && !tab.disabled()) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Close ' + (tab.label() || tab.value())\"\n [class]=\"closeButtonClasses()\"\n (click)=\"closeTab(tab, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"/>\n </svg>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Scroll end button (horizontal only) -->\n @if (orientation() === 'horizontal' && (canScrollStart() || canScrollEnd())) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class]=\"scrollButtonClasses()\"\n [disabled]=\"!canScrollEnd()\"\n (click)=\"scrollEnd()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4 shrink-0\">\n <path fill-rule=\"evenodd\" d=\"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n </button>\n }\n</div>\n\n<!-- Tab panels -->\n@for (tab of tabs(); track tab.value()) {\n @if (shouldRenderPanel(tab)) {\n <div\n role=\"tabpanel\"\n [id]=\"getPanelId(tab.value())\"\n [attr.aria-labelledby]=\"getTabId(tab.value())\"\n [class]=\"panelClasses()\"\n [hidden]=\"!isTabActive(tab.value())\"\n tabindex=\"0\"\n >\n @if (tab.contentTemplate(); as contentDir) {\n <ng-container [ngTemplateOutlet]=\"contentDir.templateRef\" />\n } @else if (tab.implicitContentTemplate(); as implicitTpl) {\n <ng-container [ngTemplateOutlet]=\"implicitTpl\" />\n }\n </div>\n }\n}\n\n<!-- Hidden projection slot for tw-tab children -->\n<div style=\"display: none\">\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAuCA;AAEA,MAAM,kBAAkB,GAAG,EAAE,CAC3B;AACE,IAAA,KAAK,EAAE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used. `@ts-ignore` suppresses whichever error fires and is
|
|
60
60
|
// a no-op when neither does.
|
|
61
61
|
/** Density of a standalone textarea. Maps to the inline-padding + font scale (`xs` … `xl`). Ignored inside a `<tw-form-field>` — the wrapper's `size` carries density. Defaults to `'md'`. */
|
|
62
|
-
//
|
|
62
|
+
// TS4113 (CI) vs TS4114 (local) divergence means neither directive matches
|
|
63
|
+
// both, so we intentionally pick `@ts-ignore` over `@ts-expect-error`; see
|
|
64
|
+
// the longer comment above for the full reasoning.
|
|
65
|
+
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
|
|
66
|
+
// @ts-ignore — see comment above.
|
|
63
67
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
64
68
|
/** Grows the textarea with its content (composed from CDK's `CdkTextareaAutosize`). When `true` the user-resize handle is forced off — autosize owns the height. Defaults to `false`. */
|
|
65
69
|
autosize = input(false, { ...(ngDevMode ? { debugName: "autosize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-textarea.mjs","sources":["../../../projects/ngx-tw/textarea/textarea.ts","../../../projects/ngx-tw/textarea/cdevhub-ngx-tw-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n type Signal,\n} from '@angular/core';\nimport { CdkTextareaAutosize } from '@angular/cdk/text-field';\nimport { tv } from 'tailwind-variants';\nimport type { TwSize } from '@cdevhub/ngx-tw/core';\nimport { TW_FORM_FIELD_CONTROL } from '@cdevhub/ngx-tw/form-field';\nimport { InputDirective } from '@cdevhub/ngx-tw/input';\n\n/**\n * How the user-resize handle behaves on the textarea. `'vertical'` (the\n * default) lets users drag the bottom edge to grow the textarea; `'none'`\n * locks the size; `'both'` allows free resizing on both axes (rarely useful\n * inside a form-field — the textarea can overflow the wrapper). Horizontal\n * is intentionally omitted — it breaks form-field layout in practice.\n */\nexport type TwTextareaResize = 'none' | 'vertical' | 'both';\n\nconst textareaVariants = tv(\n {\n base: '',\n variants: {\n resize: {\n none: 'resize-none',\n vertical: 'resize-y',\n both: 'resize',\n },\n },\n defaultVariants: {\n resize: 'vertical',\n },\n },\n { twMerge: true },\n);\n\n/**\n * Adapts a native `<textarea>` into an ngx-tw form-field-compatible multi-line\n * control. Extends {@link InputDirective} — inherits its form-field\n * integration, error-state machinery, autofill / focus tracking, ARIA wiring,\n * and standalone styling. Adds textarea-specific behavior: autosize composition\n * via CDK's `CdkTextareaAutosize`, a `resize` axis for the user-resize handle,\n * `rows` / `minRows` / `maxRows`, and `maxLength` with a `valueLength` signal\n * for character counters.\n *\n * Like `InputDirective`, this directive deliberately does NOT implement\n * `ControlValueAccessor`. Angular's built-in `DefaultValueAccessor` attaches to\n * the native `<textarea>` and handles value I/O for template-driven\n * (`ngModel`), reactive (`FormControl` / `formControlName`), and signal-forms\n * (`formField`) bindings — no library glue required.\n *\n * Form-control input-cap exception applies (codified in CLAUDE.md): ARIA +\n * forms baseline plus textarea-specific surface exceeds the 5–6 cap;\n * `checkbox` is the canonical 12+ exemplar.\n */\n@Directive({\n selector: 'textarea[twTextarea]',\n exportAs: 'twTextarea',\n hostDirectives: [\n {\n directive: CdkTextareaAutosize,\n inputs: [\n 'cdkAutosizeMinRows: minRows',\n 'cdkAutosizeMaxRows: maxRows',\n ],\n },\n ],\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => TextareaDirective),\n },\n ],\n host: {\n '[class]': 'classes() + \" \" + textareaClasses()',\n '[attr.id]': 'id()',\n '[attr.rows]': 'rows()',\n '[attr.maxlength]': 'maxLength() ?? null',\n '[disabled]': 'disabled()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '(input)': '_onInput()',\n },\n})\nexport class TextareaDirective extends InputDirective {\n private readonly cdkAutosize = inject(CdkTextareaAutosize, {\n self: true,\n optional: true,\n });\n\n // @internal Re-declares the `size` input inherited from `InputDirective` so\n // it lands on this directive's own `ɵdir` input metadata. ng-packagr emits\n // `ɵdir` with only the child's directly declared inputs, so without this the\n // consumer-side strict template-check rejects `<textarea twTextarea\n // [size]=\"…\">` with NG8002. Both signals share the same `'md'` default and\n // the inherited `classes()` computed reads through polymorphism, so runtime\n // behaviour is unchanged.\n //\n // The `@ts-ignore` is needed for a CI-only quirk: under\n // `noImplicitOverride`, partial compilation resolves `InputDirective`\n // through the just-built `dist/` d.ts on CI, where TypeScript decides the\n // base member isn't visible and rejects `override` with TS4113. Locally\n // the same resolution sees the member, so `@ts-expect-error` would itself\n // flag as unused. `@ts-ignore` suppresses whichever error fires and is\n // a no-op when neither does.\n /** Density of a standalone textarea. Maps to the inline-padding + font scale (`xs` … `xl`). Ignored inside a `<tw-form-field>` — the wrapper's `size` carries density. Defaults to `'md'`. */\n // @ts-ignore — TS4113 (CI) vs TS4114 (local); see comment above.\n override readonly size = input<TwSize>('md');\n\n /** Grows the textarea with its content (composed from CDK's `CdkTextareaAutosize`). When `true` the user-resize handle is forced off — autosize owns the height. Defaults to `false`. */\n readonly autosize = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n\n /** Minimum number of rows the textarea collapses to when `autosize` is `true`. Ignored when autosize is off. Defaults to `1`. */\n readonly minRows = input<number, unknown>(1, { transform: numberAttribute });\n\n /** Maximum number of rows the textarea expands to before scrolling, when `autosize` is `true`. `undefined` removes the cap. Ignored when autosize is off. Defaults to `undefined`. */\n readonly maxRows = input<number | undefined, unknown>(undefined, {\n transform: (v) => (v === undefined || v === null || v === '' ? undefined : numberAttribute(v)),\n });\n\n /** Number of rows for the initial render height (native `rows` attribute). Browsers honor this even when `autosize` is `true`, so first paint uses this value. Defaults to `3`. */\n readonly rows = input<number, unknown>(3, { transform: numberAttribute });\n\n /** Controls the user-resize handle: `'none'` locks the size, `'vertical'` (default) allows vertical drag, `'both'` allows both axes. Forced to `'none'` when `autosize` is `true`. Horizontal-only is intentionally not supported. */\n readonly resize = input<TwTextareaResize>('vertical');\n\n /** Maximum character count. Mirrors to the native `maxlength` attribute when defined and is exposed via the `valueLength` signal so consumers can render a \"X / N\" hint. Defaults to `undefined`. */\n readonly maxLength = input<number | undefined, unknown>(undefined, {\n transform: (v) => (v === undefined || v === null || v === '' ? undefined : numberAttribute(v)),\n });\n\n /** Current value length, updates on every `input` event. Wire `<span twHint align=\"end\">{{ ta.valueLength() }} / {{ ta.maxLength() }}</span>` for a character counter. */\n readonly valueLength: Signal<number> = computed(() => this.value()?.length ?? 0);\n\n /** @internal Textarea-specific Tailwind classes (resize axis). Combined with the inherited `classes()` in the host `[class]` binding. */\n readonly textareaClasses = computed(() =>\n // Short-circuit the resize/autosize conflict deterministically — don't\n // rely on tv variant emission order or twMerge \"last wins\" semantics.\n this.autosize()\n ? textareaVariants({ resize: 'none' })\n : textareaVariants({ resize: this.resize() }),\n );\n\n constructor() {\n super();\n\n // Wire the autosize toggle. The CDK directive is always mounted via\n // hostDirectives; we just flip its `enabled` setter based on our input.\n effect(() => {\n if (this.cdkAutosize) {\n this.cdkAutosize.enabled = this.autosize();\n }\n });\n }\n\n /** Triggers a CDK autosize recalculation. Useful after programmatic value changes that bypass the native `(input)` event (e.g., clipboard write APIs). No-op when `autosize` is `false`. */\n resizeToFitContent(force = false): void {\n if (this.cdkAutosize && this.autosize()) {\n this.cdkAutosize.resizeToFitContent(force);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0BA,MAAM,gBAAgB,GAAG,EAAE,CACzB;AACE,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,QAAQ,EAAE;AACR,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,M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A,YAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,SAAA,EAAA,oBAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAYU,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBA7B7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,mBAAmB;AAC9B,4BAAA,MAAM,EAAE;gCACN,6BAA6B;gCAC7B,6BAA6B;AAC9B,6BAAA;AACF,yBAAA;AACF,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AACjD,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,qCAAqC;AAChD,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,kBAAkB,EAAE,qBAAqB;AACzC,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACF,iBAAA;;;AC1FD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-textarea.mjs","sources":["../../../projects/ngx-tw/textarea/textarea.ts","../../../projects/ngx-tw/textarea/cdevhub-ngx-tw-textarea.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n numberAttribute,\n type Signal,\n} from '@angular/core';\nimport { CdkTextareaAutosize } from '@angular/cdk/text-field';\nimport { tv } from 'tailwind-variants';\nimport type { TwSize } from '@cdevhub/ngx-tw/core';\nimport { TW_FORM_FIELD_CONTROL } from '@cdevhub/ngx-tw/form-field';\nimport { InputDirective } from '@cdevhub/ngx-tw/input';\n\n/**\n * How the user-resize handle behaves on the textarea. `'vertical'` (the\n * default) lets users drag the bottom edge to grow the textarea; `'none'`\n * locks the size; `'both'` allows free resizing on both axes (rarely useful\n * inside a form-field — the textarea can overflow the wrapper). Horizontal\n * is intentionally omitted — it breaks form-field layout in practice.\n */\nexport type TwTextareaResize = 'none' | 'vertical' | 'both';\n\nconst textareaVariants = tv(\n {\n base: '',\n variants: {\n resize: {\n none: 'resize-none',\n vertical: 'resize-y',\n both: 'resize',\n },\n },\n defaultVariants: {\n resize: 'vertical',\n },\n },\n { twMerge: true },\n);\n\n/**\n * Adapts a native `<textarea>` into an ngx-tw form-field-compatible multi-line\n * control. Extends {@link InputDirective} — inherits its form-field\n * integration, error-state machinery, autofill / focus tracking, ARIA wiring,\n * and standalone styling. Adds textarea-specific behavior: autosize composition\n * via CDK's `CdkTextareaAutosize`, a `resize` axis for the user-resize handle,\n * `rows` / `minRows` / `maxRows`, and `maxLength` with a `valueLength` signal\n * for character counters.\n *\n * Like `InputDirective`, this directive deliberately does NOT implement\n * `ControlValueAccessor`. Angular's built-in `DefaultValueAccessor` attaches to\n * the native `<textarea>` and handles value I/O for template-driven\n * (`ngModel`), reactive (`FormControl` / `formControlName`), and signal-forms\n * (`formField`) bindings — no library glue required.\n *\n * Form-control input-cap exception applies (codified in CLAUDE.md): ARIA +\n * forms baseline plus textarea-specific surface exceeds the 5–6 cap;\n * `checkbox` is the canonical 12+ exemplar.\n */\n@Directive({\n selector: 'textarea[twTextarea]',\n exportAs: 'twTextarea',\n hostDirectives: [\n {\n directive: CdkTextareaAutosize,\n inputs: [\n 'cdkAutosizeMinRows: minRows',\n 'cdkAutosizeMaxRows: maxRows',\n ],\n },\n ],\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => TextareaDirective),\n },\n ],\n host: {\n '[class]': 'classes() + \" \" + textareaClasses()',\n '[attr.id]': 'id()',\n '[attr.rows]': 'rows()',\n '[attr.maxlength]': 'maxLength() ?? null',\n '[disabled]': 'disabled()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '(input)': '_onInput()',\n },\n})\nexport class TextareaDirective extends InputDirective {\n private readonly cdkAutosize = inject(CdkTextareaAutosize, {\n self: true,\n optional: true,\n });\n\n // @internal Re-declares the `size` input inherited from `InputDirective` so\n // it lands on this directive's own `ɵdir` input metadata. ng-packagr emits\n // `ɵdir` with only the child's directly declared inputs, so without this the\n // consumer-side strict template-check rejects `<textarea twTextarea\n // [size]=\"…\">` with NG8002. Both signals share the same `'md'` default and\n // the inherited `classes()` computed reads through polymorphism, so runtime\n // behaviour is unchanged.\n //\n // The `@ts-ignore` is needed for a CI-only quirk: under\n // `noImplicitOverride`, partial compilation resolves `InputDirective`\n // through the just-built `dist/` d.ts on CI, where TypeScript decides the\n // base member isn't visible and rejects `override` with TS4113. Locally\n // the same resolution sees the member, so `@ts-expect-error` would itself\n // flag as unused. `@ts-ignore` suppresses whichever error fires and is\n // a no-op when neither does.\n /** Density of a standalone textarea. Maps to the inline-padding + font scale (`xs` … `xl`). Ignored inside a `<tw-form-field>` — the wrapper's `size` carries density. Defaults to `'md'`. */\n // TS4113 (CI) vs TS4114 (local) divergence means neither directive matches\n // both, so we intentionally pick `@ts-ignore` over `@ts-expect-error`; see\n // the longer comment above for the full reasoning.\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n // @ts-ignore — see comment above.\n override readonly size = input<TwSize>('md');\n\n /** Grows the textarea with its content (composed from CDK's `CdkTextareaAutosize`). When `true` the user-resize handle is forced off — autosize owns the height. Defaults to `false`. */\n readonly autosize = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n\n /** Minimum number of rows the textarea collapses to when `autosize` is `true`. Ignored when autosize is off. Defaults to `1`. */\n readonly minRows = input<number, unknown>(1, { transform: numberAttribute });\n\n /** Maximum number of rows the textarea expands to before scrolling, when `autosize` is `true`. `undefined` removes the cap. Ignored when autosize is off. Defaults to `undefined`. */\n readonly maxRows = input<number | undefined, unknown>(undefined, {\n transform: (v) => (v === undefined || v === null || v === '' ? undefined : numberAttribute(v)),\n });\n\n /** Number of rows for the initial render height (native `rows` attribute). Browsers honor this even when `autosize` is `true`, so first paint uses this value. Defaults to `3`. */\n readonly rows = input<number, unknown>(3, { transform: numberAttribute });\n\n /** Controls the user-resize handle: `'none'` locks the size, `'vertical'` (default) allows vertical drag, `'both'` allows both axes. Forced to `'none'` when `autosize` is `true`. Horizontal-only is intentionally not supported. */\n readonly resize = input<TwTextareaResize>('vertical');\n\n /** Maximum character count. Mirrors to the native `maxlength` attribute when defined and is exposed via the `valueLength` signal so consumers can render a \"X / N\" hint. Defaults to `undefined`. */\n readonly maxLength = input<number | undefined, unknown>(undefined, {\n transform: (v) => (v === undefined || v === null || v === '' ? undefined : numberAttribute(v)),\n });\n\n /** Current value length, updates on every `input` event. Wire `<span twHint align=\"end\">{{ ta.valueLength() }} / {{ ta.maxLength() }}</span>` for a character counter. */\n readonly valueLength: Signal<number> = computed(() => this.value()?.length ?? 0);\n\n /** @internal Textarea-specific Tailwind classes (resize axis). Combined with the inherited `classes()` in the host `[class]` binding. */\n readonly textareaClasses = computed(() =>\n // Short-circuit the resize/autosize conflict deterministically — don't\n // rely on tv variant emission order or twMerge \"last wins\" semantics.\n this.autosize()\n ? textareaVariants({ resize: 'none' })\n : textareaVariants({ resize: this.resize() }),\n );\n\n constructor() {\n super();\n\n // Wire the autosize toggle. The CDK directive is always mounted via\n // hostDirectives; we just flip its `enabled` setter based on our input.\n effect(() => {\n if (this.cdkAutosize) {\n this.cdkAutosize.enabled = this.autosize();\n }\n });\n }\n\n /** Triggers a CDK autosize recalculation. Useful after programmatic value changes that bypass the native `(input)` event (e.g., clipboard write APIs). No-op when `autosize` is `false`. */\n resizeToFitContent(force = false): void {\n if (this.cdkAutosize && this.autosize()) {\n this.cdkAutosize.resizeToFitContent(force);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0BA,MAAM,gBAAgB,GAAG,EAAE,CACzB;AACE,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,QAAQ,EAAE;AACR,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,MAAM,EAAE,UAAU;AACnB,KAAA;AACF,CAAA,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB;AAED;;;;;;;;;;;;;;;;;;AAkBG;AA8BG,MAAO,iBAAkB,SAAQ,cAAc,CAAA;AAClC,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,EAAE;AACzD,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;AAuBgB,IAAA,IAAI,GAAG,KAAK,CAAS,IAAI,2EAAC;;IAGnC,QAAQ,GAAG,KAAK,CAAmB,KAAK,gFAC/C,SAAS,EAAE,gBAAgB,EAAA,CAC3B;;IAGO,OAAO,GAAG,KAAK,CAAkB,CAAC,+EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;AAGnE,IAAA,OAAO,GAAG,KAAK,CAA8B,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,SAAA,EAAA,8BAAA,EAAA,CAAA,EAC7D,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,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E,qCAAqC;AAChD,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,kBAAkB,EAAE,qBAAqB;AACzC,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACF,iBAAA;;;AC1FD;;AAEG;;;;"}
|
|
@@ -11,6 +11,9 @@ import { tv } from 'tailwind-variants';
|
|
|
11
11
|
* Per-call configuration for {@link ToastService} methods. Also used as the
|
|
12
12
|
* payload of {@link TW_TOAST_DEFAULT_OPTIONS} for app-wide defaults.
|
|
13
13
|
*/
|
|
14
|
+
// `R` is a phantom result-type kept for parity with `ToastRef<D, R>` / service
|
|
15
|
+
// generics — consumers pass it through `ToastConfig<D, R>` so the resulting
|
|
16
|
+
// `ToastRef.afterClosed()` is correctly typed.
|
|
14
17
|
class ToastConfig {
|
|
15
18
|
/** Severity of the toast. Defaults to `'info'`. */
|
|
16
19
|
severity = 'info';
|
|
@@ -598,6 +601,10 @@ class ToastContainerComponent {
|
|
|
598
601
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
599
602
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: ToastContainerComponent, isStandalone: true, selector: "tw-toast-container", host: { attributes: { "role": "region" }, properties: { "class": "hostClasses()", "attr.aria-label": "regionLabel()", "attr.data-position": "position()" } }, ngImport: i0, template: `
|
|
600
603
|
@for (entry of orderedEntries(); track entry.ref.id) {
|
|
604
|
+
<!-- Toast entry wrapper; the projected <tw-toast> is the focusable affordance.
|
|
605
|
+
This element only forwards pointer/focus events so the container can
|
|
606
|
+
pause auto-dismiss while the user is interacting. -->
|
|
607
|
+
<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->
|
|
601
608
|
<div
|
|
602
609
|
class="pointer-events-auto w-full max-w-sm"
|
|
603
610
|
[attr.data-toast-id]="entry.ref.id"
|
|
@@ -676,6 +683,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
676
683
|
},
|
|
677
684
|
template: `
|
|
678
685
|
@for (entry of orderedEntries(); track entry.ref.id) {
|
|
686
|
+
<!-- Toast entry wrapper; the projected <tw-toast> is the focusable affordance.
|
|
687
|
+
This element only forwards pointer/focus events so the container can
|
|
688
|
+
pause auto-dismiss while the user is interacting. -->
|
|
689
|
+
<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->
|
|
679
690
|
<div
|
|
680
691
|
class="pointer-events-auto w-full max-w-sm"
|
|
681
692
|
[attr.data-toast-id]="entry.ref.id"
|