@cngx/ui 0.1.0-rc.1 → 0.1.0-rc.2
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/cngx-ui-mat-tabs.mjs +20 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +98 -11
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +110 -12
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +1 -1
- package/package.json +1 -1
- package/stepper/README.md +24 -0
- package/types/cngx-ui-mat-tabs.d.ts +5 -0
- package/types/cngx-ui-stepper.d.ts +66 -6
- package/types/cngx-ui-tabs.d.ts +83 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, inject, ElementRef, Injector, contentChildren, contentChild, signal, afterRenderEffect, isDevMode, afterNextRender, linkedSignal, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, DestroyRef,
|
|
3
|
+
import { input, inject, ElementRef, Injector, contentChildren, contentChild, signal, afterRenderEffect, isDevMode, afterNextRender, linkedSignal, ViewEncapsulation, ChangeDetectionStrategy, Component, computed, viewChild, DestroyRef, effect, untracked } from '@angular/core';
|
|
4
4
|
import * as i2 from '@cngx/common/a11y';
|
|
5
5
|
import { CNGX_FOCUSABLE_SELECTOR, CngxLiveRegion, CngxFocusRestore, CngxActiveDescendant } from '@cngx/common/a11y';
|
|
6
6
|
import * as i1 from '@cngx/common/tabs';
|
|
@@ -9,8 +9,9 @@ import { CngxClickOutside } from '@cngx/common/interactive';
|
|
|
9
9
|
import { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* CNGX tab-group organism.
|
|
13
|
-
*
|
|
12
|
+
* CNGX tab-group organism. \
|
|
13
|
+
* Thin shell over {@link CngxTabGroupPresenter}
|
|
14
|
+
* and `CngxFocusRestore` via `hostDirectives`. The APG tablist keyboard
|
|
14
15
|
* model (automatic activation: arrow keys move focus AND select; Home/End
|
|
15
16
|
* jump to first/last; the active tab is the lone tab stop) lives in
|
|
16
17
|
* {@link createTabKeyboardNav}, deriving the roving stop from the
|
|
@@ -22,7 +23,12 @@ import { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';
|
|
|
22
23
|
* host directive: its `role="status"` would clobber the wrapper's
|
|
23
24
|
* `role="group"` landmark.
|
|
24
25
|
*
|
|
26
|
+
* @playground Material theme coverage across all skins ./examples/material-theme-coverage/skins-coverage.component.ts
|
|
27
|
+
* @playground Overflow "More" menu under resize ./examples/overflow-resize/overflow-resize.component.ts
|
|
28
|
+
* @playground Async commit-action (optimistic / pessimistic) ./examples/async-commit/async-commit.component.ts
|
|
29
|
+
* @playground Dismissable + addable tabs ./examples/dynamic-tabs/dynamic-tabs.component.ts
|
|
25
30
|
* @playground Form error aggregation ./examples/form-errors/form-errors.component.ts
|
|
31
|
+
* @playground Routed tabs with a CanDeactivate guard ./examples/routed-outlet/routed-outlet.component.ts
|
|
26
32
|
* @see {@link CngxMatTabs} for the Material `<mat-tab-group>` variant with `[cngxMatTabError]`.
|
|
27
33
|
*
|
|
28
34
|
* @category ui/tabs
|
|
@@ -33,12 +39,12 @@ import { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';
|
|
|
33
39
|
* @relatedTo CngxTabOverflow, CngxTabGroupPresenter, CngxTab, CngxFocusRestore
|
|
34
40
|
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
35
41
|
* <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
|
|
36
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
37
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
38
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
39
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
40
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
41
|
-
* <example-url>http://localhost:4200/#/ui/tabs/tab-
|
|
42
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/all-skins-side-by-side</example-url>
|
|
43
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/contained</example-url>
|
|
44
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/line</example-url>
|
|
45
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/pill</example-url>
|
|
46
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/pill-vs-toggle-group</example-url>
|
|
47
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-skins/vertical-skins</example-url>
|
|
42
48
|
*/
|
|
43
49
|
class CngxTabGroup {
|
|
44
50
|
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
@@ -406,7 +412,7 @@ class CngxTabGroup {
|
|
|
406
412
|
return this.tabDirectiveById().get(id)?.contentTemplate()?.templateRef ?? null;
|
|
407
413
|
}
|
|
408
414
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTabGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CngxTabGroup, isStandalone: true, selector: "cngx-tab-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, skin: { classPropertyName: "skin", publicName: "skin", isSignal: true, isRequired: false, transformFunction: null }, iconLayout: { classPropertyName: "iconLayout", publicName: "iconLayout", isSignal: true, isRequired: false, transformFunction: null }, panelMode: { classPropertyName: "panelMode", publicName: "panelMode", isSignal: true, isRequired: false, transformFunction: null }, fitted: { classPropertyName: "fitted", publicName: "fitted", isSignal: true, isRequired: false, transformFunction: null }, tabAlign: { classPropertyName: "tabAlign", publicName: "tabAlign", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, addable: { classPropertyName: "addable", publicName: "addable", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-roledescription": "announcements.tabsRoleDescription()", "attr.aria-orientation": "presenter.orientation()", "attr.data-orientation": "presenter.orientation()", "attr.data-skin": "hostAttrs.resolvedSkin()", "attr.data-icon-layout": "hostAttrs.resolvedIconLayout()", "attr.data-panel-mode": "hostAttrs.resolvedPanelMode()", "attr.data-fitted": "hostAttrs.resolvedFitted() ? '' : null", "attr.data-tab-align": "hostAttrs.resolvedTabAlign()", "attr.aria-label": "announcements.resolvedAriaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "class.cngx-tabs": "true" }, classAttribute: "cngx-tab-group" }, providers: [{ provide: CNGX_TAB_PANEL_HOST, useExisting: CngxTabGroup }], queries: [{ propertyName: "tabDirectives", predicate: CngxTab, descendants: true, isSignal: true }, { propertyName: "errorBadgeSlot", first: true, predicate: CngxTabErrorBadge, descendants: true, isSignal: true }, { propertyName: "rejectionIconSlot", first: true, predicate: CngxTabRejectionIcon, descendants: true, isSignal: true }, { propertyName: "busySpinnerSlot", first: true, predicate: CngxTabBusySpinner, descendants: true, isSignal: true }, { propertyName: "iconSlot", first: true, predicate: CngxTabIcon, descendants: true, isSignal: true }, { propertyName: "closeIconSlot", first: true, predicate: CngxTabCloseIcon, descendants: true, isSignal: true }, { propertyName: "addIconSlot", first: true, predicate: CngxTabAddIcon, descendants: true, isSignal: true }], exportAs: ["cngxTabGroup"], hostDirectives: [{ directive: i1.CngxTabGroupPresenter, inputs: ["activeIndex", "activeIndex", "orientation", "orientation", "loop", "loop", "commitAction", "commitAction", "commitMode", "commitMode"], outputs: ["activeIndexChange", "activeIndexChange", "tabClose", "tabClose", "tabAdd", "tabAdd"] }, { directive: i2.CngxFocusRestore }], ngImport: i0, template: "<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <div class=\"cngx-tabs__tab-wrapper\" role=\"presentation\">\n <button\n type=\"button\"\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n [class.cngx-tabs__tab--closable]=\"dismiss.isTabClosable(tab)\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.tabindex]=\"tabTabindex(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [attr.aria-keyshortcuts]=\"dismiss.isTabClosable(tab) ? 'Delete' : null\"\n (click)=\"handleHeaderClick(tab)\"\n (keydown)=\"handleTabKeydown(tab, $event)\"\n >\n @let iconTpl = templates.icon();\n @if (iconTpl) {\n <span class=\"cngx-tabs__icon\" aria-hidden=\"true\">\n <ng-container\n *ngTemplateOutlet=\"iconTpl; context: iconContextFor(tab, i)\"\n ></ng-container>\n </span>\n }\n <span class=\"cngx-tabs__text\">\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @let subLabelTpl = subLabelTemplateFor(tab.id);\n @if (subLabelTpl || tab.subLabel()) {\n <span class=\"cngx-tabs__sublabel\">\n @if (subLabelTpl) {\n <ng-container *ngTemplateOutlet=\"subLabelTpl\"></ng-container>\n } @else {\n {{ tab.subLabel() }}\n }\n </span>\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n @if (dismiss.isTabClosable(tab)) {\n <button\n type=\"button\"\n class=\"cngx-tabs__close\"\n tabindex=\"-1\"\n [attr.aria-label]=\"dismiss.closeButtonLabel(tab)\"\n (click)=\"dismiss.handleClose(tab, $event)\"\n >\n @let closeIconTpl = templates.closeIcon();\n @if (closeIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"closeIconTpl; context: dismiss.closeIconContextFor(tab)\"\n ></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.closeIcon }}</span>\n }\n </button>\n }\n </div>\n }\n</div>\n@if (dismiss.resolvedAddable()) {\n <button\n type=\"button\"\n class=\"cngx-tabs__add\"\n [attr.aria-label]=\"i18n.addTab\"\n (click)=\"dismiss.handleAdd()\"\n >\n @let addIconTpl = templates.addIcon();\n @if (addIconTpl) {\n <ng-container *ngTemplateOutlet=\"addIconTpl\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.addIcon }}</span>\n }\n </button>\n}\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [attr.tabindex]=\"panelTabindex(tab)\"\n [hidden]=\"!isSelected(tab)\"\n >\n @if (shouldRenderContent(tab)) {\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.tokens{@property --cngx-tab-strip-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.87 0 0);}@property --cngx-tab-indicator-thickness{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-transition-duration{syntax: \"<time>\"; inherits: false; initial-value: .15s;}@property --cngx-tab-hover-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-badge-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-error-badge-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-badge-font-size{syntax: \"*\"; inherits: false; initial-value: .75em;}@property --cngx-tab-badge-font-weight{syntax: \"<number>\"; inherits: false; initial-value: 700;}@property --cngx-tab-radius{syntax: \"*\"; inherits: true; initial-value: .5rem;}@property --cngx-tab-active-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-inactive-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 0 0);}@property --cngx-tab-surface-border-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.87 0 0);}@property --cngx-tab-surface-border-width{syntax: \"<length>\"; inherits: true; initial-value: 1px;}@property --cngx-tab-pill-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-pill-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.95 0 0);}@property --cngx-tab-segmented-track-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 0 0);}@property --cngx-tab-segmented-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.93 0 0);}@property --cngx-tab-segmented-active-shadow{syntax: \"*\"; inherits: true; initial-value: 0 1px 2px oklch(0 0 0 / .06);}@property --cngx-tab-pill-outline-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-pill-outline-bg{syntax: \"<color>\"; inherits: true; initial-value: color-mix(in oklch,oklch(.66 .19 50) 12%,transparent);}@property --cngx-tab-pill-radius{syntax: \"<length>\"; inherits: true; initial-value: 100px;}@property --cngx-tab-contained-accent-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-contained-accent-thickness{syntax: \"<length>\"; inherits: true; initial-value: 3px;}}@layer cngx.components{@scope(.cngx-tab-group){:scope{font:inherit;--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-strip-border: 1px solid var(--cngx-color-border, oklch(.88 .005 250))}.cngx-tabs__panel{container-type:inline-size;container-name:var(--cngx-tab-panel-container-name, cngx-tab-panel)}.cngx-tabs__strip{border-bottom:var(--cngx-tab-strip-border, 1px solid currentColor);gap:0;padding:0}.cngx-tabs__tab{position:relative;--cngx-tab-padding: .625rem 1rem;--cngx-tab-focus-ring: var(--cngx-tab-focus-ring-width, 2px) solid var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-focus-offset: -2px;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);transition:color var(--cngx-tab-transition-duration, .15s) ease,background var(--cngx-tab-transition-duration, .15s) ease,box-shadow var(--cngx-tab-transition-duration, .15s) ease}:where(:scope[data-orientation=vertical]) .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem}.cngx-tabs__tab:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color))}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color);box-shadow:none}.cngx-tabs__tab[aria-selected=true]:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:var(--cngx-tab-strip-border, 1px solid currentColor);padding:0}:scope[data-orientation=vertical] .cngx-tabs__tab:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;border-start-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-end-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-start-end-radius:0;border-end-end-radius:0;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]:after{transform:scaleY(1)}.cngx-tabs__badge{width:var(--cngx-tab-badge-size, 1.25rem);height:var(--cngx-tab-badge-size, 1.25rem);border-radius:50%;color:var(--cngx-tab-error-badge-text-color, oklch(1 0 0));font-size:var(--cngx-tab-badge-font-size, .75em);font-weight:var(--cngx-tab-badge-font-weight, 700);line-height:1}.cngx-tabs__icon{display:inline-flex;align-items:center;flex:0 0 auto}:scope[data-icon-layout=start] .cngx-tabs__tab{flex-direction:row}:scope[data-icon-layout=end] .cngx-tabs__tab{flex-direction:row-reverse}:scope[data-icon-layout=top] .cngx-tabs__tab{flex-direction:column;align-items:center;text-align:center}:scope[data-icon-layout=start] .cngx-tabs__icon,:scope[data-icon-layout=end] .cngx-tabs__icon{align-self:flex-start;min-height:calc(var(--cngx-tab-label-line-height, 1.4) * 1em)}:scope[data-icon-layout=only] .cngx-tabs__text,:scope[data-icon-layout=only] .cngx-tabs__label,:scope[data-icon-layout=only] .cngx-tabs__sublabel{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.cngx-tabs__tab,.cngx-tabs__tab:before,.cngx-tabs__tab:after{transition:none!important}}}@scope(.cngx-tab-group[data-skin=contained]){:scope{--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-inactive-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-surface-border-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-tab-contained-accent-color: var(--cngx-color-primary, oklch(.66 .19 50))}.cngx-tabs__tab:after{display:none}.cngx-tabs__strip{border-bottom:0;gap:0;padding:0}.cngx-tabs__strip-wrapper{position:relative;z-index:1}.cngx-tabs__tab{--cngx-tab-padding: .625rem 1.25rem;background:var(--cngx-tab-inactive-bg, oklch(.97 0 0));border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-bottom:0;border-radius:0;margin-bottom:0;margin-inline-end:-1px}.cngx-tabs__tab[aria-selected=true]{font-weight:var(--cngx-tab-active-font-weight, 600)}.cngx-tabs__tab:before{content:\"\";position:absolute;inset-inline:0;top:-1px;height:var(--cngx-tab-contained-accent-thickness, 3px);background:var(--cngx-tab-contained-accent-color, oklch(.66 .19 50));transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:color-mix(in oklch,var(--cngx-tab-inactive-bg, oklch(.97 0 0)) 60%,var(--cngx-tab-active-bg, oklch(1 0 0)))}.cngx-tabs__tab+.cngx-tabs__tab{margin-inline-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:none;margin-bottom:0;position:relative;z-index:1}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleX(1)}.cngx-tabs__panels{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-block-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1);background:var(--cngx-tab-active-bg, oklch(1 0 0))}}@scope(.cngx-tab-group[data-skin=contained][data-orientation=vertical]){:scope[data-orientation=vertical]{--cngx-tab-vertical-gap: 0;align-items:stretch}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:0;padding:0}.cngx-tabs__tab{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab:before{inset-inline:auto;inset-inline-start:-1px;inset-block:0;width:var(--cngx-tab-contained-accent-thickness, 3px);height:auto;transform:scaleY(0)}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleY(1)}.cngx-tabs__tab[aria-selected=true]{border-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1);margin-inline-end:0}.cngx-tabs__tab-wrapper:last-child .cngx-tabs__tab{margin-bottom:0}.cngx-tabs__panels{border-block-start:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-inline-start:0;margin-block-start:0}}@scope(.cngx-tab-group[data-skin=pill]){:scope{--cngx-tab-active-bg: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-active-color: var(--cngx-color-on-primary, oklch(1 0 0));--cngx-tab-pill-hover-bg: color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-pill-hover-bg, oklch(.95 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(.66 .19 50));color:var(--cngx-tab-pill-active-color, oklch(1 0 0));box-shadow:none}}@scope(.cngx-tab-group[data-skin=pill][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border-inline-end:0;margin-inline-end:0;justify-content:center;text-align:center}}@scope(.cngx-tab-group[data-skin=pill-outline]){:scope{--cngx-tab-pill-outline-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-outline-bg: color-mix( in oklch, var(--cngx-tab-pill-outline-color, oklch(.66 .19 50)) 12%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){border-color:var(--cngx-tab-surface-border-color, oklch(.87 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-pill-outline-bg);border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));box-shadow:none}}@scope(.cngx-tab-group[data-skin=segmented]){:scope{--cngx-tab-segmented-track-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-segmented-hover-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 45% )}.cngx-tabs__strip{background:var(--cngx-tab-segmented-track-bg, oklch(.96 0 0));border-bottom:0;border-radius:var(--cngx-tab-radius, .5rem);gap:var(--cngx-tab-segmented-gap, .25rem);padding:var(--cngx-tab-segmented-track-padding, .25rem);flex:0 1 auto;align-self:start}:scope[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__strip{flex:1 1 auto}:scope[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline:auto}:scope[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline-start:auto}.cngx-tabs__tab{--cngx-tab-padding: .5rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:calc(var(--cngx-tab-radius, .5rem) - .125rem);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-segmented-hover-bg, oklch(.93 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:var(--cngx-tab-segmented-active-shadow, 0 1px 2px oklch(0 0 0 / .06))}}@scope(.cngx-tab-group[data-skin=segmented][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;align-self:start;padding:var(--cngx-tab-segmented-track-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem;border-inline-end:0;margin-inline-end:0}}@scope(.cngx-tab-group[data-skin=pill-outline][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;margin-bottom:0;margin-inline-end:0;justify-content:center;text-align:center}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]{border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50))}}}@media(prefers-color-scheme:dark){.cngx-tab-group[data-skin=segmented]{--cngx-tab-segmented-active-shadow: 0 1px 3px oklch(0 0 0 / .3)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
415
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CngxTabGroup, isStandalone: true, selector: "cngx-tab-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, skin: { classPropertyName: "skin", publicName: "skin", isSignal: true, isRequired: false, transformFunction: null }, iconLayout: { classPropertyName: "iconLayout", publicName: "iconLayout", isSignal: true, isRequired: false, transformFunction: null }, panelMode: { classPropertyName: "panelMode", publicName: "panelMode", isSignal: true, isRequired: false, transformFunction: null }, fitted: { classPropertyName: "fitted", publicName: "fitted", isSignal: true, isRequired: false, transformFunction: null }, tabAlign: { classPropertyName: "tabAlign", publicName: "tabAlign", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, addable: { classPropertyName: "addable", publicName: "addable", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-roledescription": "announcements.tabsRoleDescription()", "attr.aria-orientation": "presenter.orientation()", "attr.data-orientation": "presenter.orientation()", "attr.data-skin": "hostAttrs.resolvedSkin()", "attr.data-icon-layout": "hostAttrs.resolvedIconLayout()", "attr.data-panel-mode": "hostAttrs.resolvedPanelMode()", "attr.data-fitted": "hostAttrs.resolvedFitted() ? '' : null", "attr.data-tab-align": "hostAttrs.resolvedTabAlign()", "attr.aria-label": "announcements.resolvedAriaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "class.cngx-tabs": "true" }, classAttribute: "cngx-tab-group" }, providers: [{ provide: CNGX_TAB_PANEL_HOST, useExisting: CngxTabGroup }], queries: [{ propertyName: "tabDirectives", predicate: CngxTab, descendants: true, isSignal: true }, { propertyName: "errorBadgeSlot", first: true, predicate: CngxTabErrorBadge, descendants: true, isSignal: true }, { propertyName: "rejectionIconSlot", first: true, predicate: CngxTabRejectionIcon, descendants: true, isSignal: true }, { propertyName: "busySpinnerSlot", first: true, predicate: CngxTabBusySpinner, descendants: true, isSignal: true }, { propertyName: "iconSlot", first: true, predicate: CngxTabIcon, descendants: true, isSignal: true }, { propertyName: "closeIconSlot", first: true, predicate: CngxTabCloseIcon, descendants: true, isSignal: true }, { propertyName: "addIconSlot", first: true, predicate: CngxTabAddIcon, descendants: true, isSignal: true }], exportAs: ["cngxTabGroup"], hostDirectives: [{ directive: i1.CngxTabGroupPresenter, inputs: ["activeIndex", "activeIndex", "orientation", "orientation", "loop", "loop", "commitAction", "commitAction", "commitMode", "commitMode"], outputs: ["activeIndexChange", "activeIndexChange", "tabClose", "tabClose", "tabAdd", "tabAdd"] }, { directive: i2.CngxFocusRestore }], ngImport: i0, template: "<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <div class=\"cngx-tabs__tab-wrapper\" role=\"presentation\">\n <button\n type=\"button\"\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n [class.cngx-tabs__tab--closable]=\"dismiss.isTabClosable(tab)\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.tabindex]=\"tabTabindex(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [attr.aria-keyshortcuts]=\"dismiss.isTabClosable(tab) ? 'Delete' : null\"\n (click)=\"handleHeaderClick(tab)\"\n (keydown)=\"handleTabKeydown(tab, $event)\"\n >\n @let iconTpl = templates.icon();\n @if (iconTpl) {\n <span class=\"cngx-tabs__icon\" aria-hidden=\"true\">\n <ng-container\n *ngTemplateOutlet=\"iconTpl; context: iconContextFor(tab, i)\"\n ></ng-container>\n </span>\n }\n <span class=\"cngx-tabs__text\">\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @let subLabelTpl = subLabelTemplateFor(tab.id);\n @if (subLabelTpl || tab.subLabel()) {\n <span class=\"cngx-tabs__sublabel\">\n @if (subLabelTpl) {\n <ng-container *ngTemplateOutlet=\"subLabelTpl\"></ng-container>\n } @else {\n {{ tab.subLabel() }}\n }\n </span>\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n @if (dismiss.isTabClosable(tab)) {\n <button\n type=\"button\"\n class=\"cngx-tabs__close\"\n tabindex=\"-1\"\n [attr.aria-label]=\"dismiss.closeButtonLabel(tab)\"\n (click)=\"dismiss.handleClose(tab, $event)\"\n >\n @let closeIconTpl = templates.closeIcon();\n @if (closeIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"closeIconTpl; context: dismiss.closeIconContextFor(tab)\"\n ></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.closeIcon }}</span>\n }\n </button>\n }\n </div>\n }\n</div>\n@if (dismiss.resolvedAddable()) {\n <button\n type=\"button\"\n class=\"cngx-tabs__add\"\n [attr.aria-label]=\"i18n.addTab\"\n (click)=\"dismiss.handleAdd()\"\n >\n @let addIconTpl = templates.addIcon();\n @if (addIconTpl) {\n <ng-container *ngTemplateOutlet=\"addIconTpl\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.addIcon }}</span>\n }\n </button>\n}\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [attr.tabindex]=\"panelTabindex(tab)\"\n [hidden]=\"!isSelected(tab)\"\n >\n @if (shouldRenderContent(tab)) {\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.tokens{@property --cngx-tab-strip-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.87 0 0);}@property --cngx-tab-indicator-thickness{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-transition-duration{syntax: \"<time>\"; inherits: false; initial-value: .15s;}@property --cngx-tab-hover-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-badge-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-error-badge-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-badge-font-size{syntax: \"*\"; inherits: false; initial-value: .75em;}@property --cngx-tab-badge-font-weight{syntax: \"<number>\"; inherits: false; initial-value: 700;}@property --cngx-tab-radius{syntax: \"*\"; inherits: true; initial-value: .5rem;}@property --cngx-tab-active-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-inactive-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 0 0);}@property --cngx-tab-surface-border-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.87 0 0);}@property --cngx-tab-surface-border-width{syntax: \"<length>\"; inherits: true; initial-value: 1px;}@property --cngx-tab-pill-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-pill-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.95 0 0);}@property --cngx-tab-segmented-track-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 0 0);}@property --cngx-tab-segmented-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.93 0 0);}@property --cngx-tab-segmented-active-shadow{syntax: \"*\"; inherits: true; initial-value: 0 1px 2px oklch(0 0 0 / .06);}@property --cngx-tab-pill-outline-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-pill-outline-bg{syntax: \"<color>\"; inherits: true; initial-value: color-mix(in oklch,oklch(.66 .19 50) 12%,transparent);}@property --cngx-tab-pill-radius{syntax: \"<length>\"; inherits: true; initial-value: 100px;}@property --cngx-tab-contained-accent-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-contained-accent-thickness{syntax: \"<length>\"; inherits: true; initial-value: 3px;}}@layer cngx.components{@scope(.cngx-tab-group){:scope{font:inherit;--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-strip-border: 1px solid var(--cngx-color-border, oklch(.88 .005 250))}.cngx-tabs__panel{container-type:inline-size;container-name:var(--cngx-tab-panel-container-name, cngx-tab-panel)}.cngx-tabs__strip{border-bottom:var(--cngx-tab-strip-border, 1px solid currentColor);gap:0;padding:0}.cngx-tabs__tab{position:relative;--cngx-tab-padding: .625rem 1rem;--cngx-tab-focus-ring: var(--cngx-tab-focus-ring-width, 2px) solid var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-focus-offset: -2px;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);transition:color var(--cngx-tab-transition-duration, .15s) ease,background var(--cngx-tab-transition-duration, .15s) ease,box-shadow var(--cngx-tab-transition-duration, .15s) ease}:where(:scope[data-orientation=vertical]) .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem}.cngx-tabs__tab:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color))}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color);box-shadow:none}.cngx-tabs__tab[aria-selected=true]:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:var(--cngx-tab-strip-border, 1px solid currentColor);padding:0}:scope[data-orientation=vertical] .cngx-tabs__tab:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;border-start-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-end-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-start-end-radius:0;border-end-end-radius:0;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]:after{transform:scaleY(1)}.cngx-tabs__badge{width:var(--cngx-tab-badge-size, 1.25rem);height:var(--cngx-tab-badge-size, 1.25rem);border-radius:50%;color:var(--cngx-tab-error-badge-text-color, oklch(1 0 0));font-size:var(--cngx-tab-badge-font-size, .75em);font-weight:var(--cngx-tab-badge-font-weight, 700);line-height:1}.cngx-tabs__icon{display:inline-flex;align-items:center;flex:0 0 auto}:scope[data-icon-layout=start] .cngx-tabs__tab{flex-direction:row}:scope[data-icon-layout=end] .cngx-tabs__tab{flex-direction:row-reverse}:scope[data-icon-layout=top] .cngx-tabs__tab{flex-direction:column;align-items:center;text-align:center}:scope[data-icon-layout=start] .cngx-tabs__icon,:scope[data-icon-layout=end] .cngx-tabs__icon{align-self:flex-start;min-height:calc(var(--cngx-tab-label-line-height, 1.4) * 1em)}:scope[data-icon-layout=only] .cngx-tabs__text,:scope[data-icon-layout=only] .cngx-tabs__label,:scope[data-icon-layout=only] .cngx-tabs__sublabel{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.cngx-tabs__tab,.cngx-tabs__tab:before,.cngx-tabs__tab:after{transition:none!important}}}@scope(.cngx-tab-group[data-skin=contained]){:scope{--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-inactive-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-surface-border-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-tab-contained-accent-color: var(--cngx-color-primary, oklch(.66 .19 50))}.cngx-tabs__tab:after{display:none}.cngx-tabs__strip{border-bottom:0;gap:0;padding:0}.cngx-tabs__strip-wrapper{position:relative;z-index:1}.cngx-tabs__tab{--cngx-tab-padding: .625rem 1.25rem;background:var(--cngx-tab-inactive-bg, oklch(.97 0 0));border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-bottom:0;border-radius:0;margin-bottom:0;margin-inline-end:-1px}.cngx-tabs__tab[aria-selected=true]{font-weight:var(--cngx-tab-active-font-weight, 600)}.cngx-tabs__tab:before{content:\"\";position:absolute;inset-inline:0;top:-1px;height:var(--cngx-tab-contained-accent-thickness, 3px);background:var(--cngx-tab-contained-accent-color, oklch(.66 .19 50));transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:color-mix(in oklch,var(--cngx-tab-inactive-bg, oklch(.97 0 0)) 60%,var(--cngx-tab-active-bg, oklch(1 0 0)))}.cngx-tabs__tab+.cngx-tabs__tab{margin-inline-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:none;margin-bottom:0;position:relative;z-index:1}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleX(1)}.cngx-tabs__panels{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-block-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1);background:var(--cngx-tab-active-bg, oklch(1 0 0))}}@scope(.cngx-tab-group[data-skin=contained][data-orientation=vertical]){:scope[data-orientation=vertical]{--cngx-tab-vertical-gap: 0;align-items:stretch}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:0;padding:0}.cngx-tabs__tab{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab:before{inset-inline:auto;inset-inline-start:-1px;inset-block:0;width:var(--cngx-tab-contained-accent-thickness, 3px);height:auto;transform:scaleY(0)}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleY(1)}.cngx-tabs__tab[aria-selected=true]{border-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1);margin-inline-end:0}.cngx-tabs__tab-wrapper:last-child .cngx-tabs__tab{margin-bottom:0}.cngx-tabs__panels{border-block-start:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-inline-start:0;margin-block-start:0}}@scope(.cngx-tab-group[data-skin=pill]){:scope{--cngx-tab-active-bg: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-active-color: var(--cngx-color-on-primary, oklch(1 0 0));--cngx-tab-pill-hover-bg: color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-pill-hover-bg, oklch(.95 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(.66 .19 50));color:var(--cngx-tab-pill-active-color, oklch(1 0 0));box-shadow:none}}@scope(.cngx-tab-group[data-skin=pill][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border-inline-end:0;margin-inline-end:0;justify-content:center;text-align:center}}@scope(.cngx-tab-group[data-skin=pill-outline]){:scope{--cngx-tab-pill-outline-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-outline-bg: color-mix( in oklch, var(--cngx-tab-pill-outline-color, oklch(.66 .19 50)) 12%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){border-color:var(--cngx-tab-surface-border-color, oklch(.87 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-pill-outline-bg);border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));box-shadow:none}}@scope(.cngx-tab-group[data-skin=segmented]){:scope{--cngx-tab-segmented-track-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-segmented-hover-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 45% )}.cngx-tabs__strip{background:var(--cngx-tab-segmented-track-bg, oklch(.96 0 0));border-bottom:0;border-radius:var(--cngx-tab-radius, .5rem);gap:var(--cngx-tab-segmented-gap, .25rem);padding:var(--cngx-tab-segmented-track-padding, .25rem);flex:0 1 auto;align-self:start}:scope[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__strip{flex:1 1 auto}:scope[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline:auto}:scope[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline-start:auto}.cngx-tabs__tab{--cngx-tab-padding: .5rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:calc(var(--cngx-tab-radius, .5rem) - .125rem);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-segmented-hover-bg, oklch(.93 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:var(--cngx-tab-segmented-active-shadow, 0 1px 2px oklch(0 0 0 / .06))}}@scope(.cngx-tab-group[data-skin=segmented][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;align-self:start;padding:var(--cngx-tab-segmented-track-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem;border-inline-end:0;margin-inline-end:0}}@scope(.cngx-tab-group[data-skin=pill-outline][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;margin-bottom:0;margin-inline-end:0;justify-content:center;text-align:center}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]{border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50))}}}@media(prefers-color-scheme:dark){.cngx-tab-group[data-skin=segmented]{--cngx-tab-segmented-active-shadow: 0 1px 3px oklch(0 0 0 / .3)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
410
416
|
}
|
|
411
417
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTabGroup, decorators: [{
|
|
412
418
|
type: Component,
|
|
@@ -431,11 +437,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
431
437
|
'[attr.aria-label]': 'announcements.resolvedAriaLabel()',
|
|
432
438
|
'[attr.aria-labelledby]': 'ariaLabelledBy()',
|
|
433
439
|
'[class.cngx-tabs]': 'true',
|
|
434
|
-
}, template: "<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <div class=\"cngx-tabs__tab-wrapper\" role=\"presentation\">\n <button\n type=\"button\"\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n [class.cngx-tabs__tab--closable]=\"dismiss.isTabClosable(tab)\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.tabindex]=\"tabTabindex(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [attr.aria-keyshortcuts]=\"dismiss.isTabClosable(tab) ? 'Delete' : null\"\n (click)=\"handleHeaderClick(tab)\"\n (keydown)=\"handleTabKeydown(tab, $event)\"\n >\n @let iconTpl = templates.icon();\n @if (iconTpl) {\n <span class=\"cngx-tabs__icon\" aria-hidden=\"true\">\n <ng-container\n *ngTemplateOutlet=\"iconTpl; context: iconContextFor(tab, i)\"\n ></ng-container>\n </span>\n }\n <span class=\"cngx-tabs__text\">\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @let subLabelTpl = subLabelTemplateFor(tab.id);\n @if (subLabelTpl || tab.subLabel()) {\n <span class=\"cngx-tabs__sublabel\">\n @if (subLabelTpl) {\n <ng-container *ngTemplateOutlet=\"subLabelTpl\"></ng-container>\n } @else {\n {{ tab.subLabel() }}\n }\n </span>\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n @if (dismiss.isTabClosable(tab)) {\n <button\n type=\"button\"\n class=\"cngx-tabs__close\"\n tabindex=\"-1\"\n [attr.aria-label]=\"dismiss.closeButtonLabel(tab)\"\n (click)=\"dismiss.handleClose(tab, $event)\"\n >\n @let closeIconTpl = templates.closeIcon();\n @if (closeIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"closeIconTpl; context: dismiss.closeIconContextFor(tab)\"\n ></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.closeIcon }}</span>\n }\n </button>\n }\n </div>\n }\n</div>\n@if (dismiss.resolvedAddable()) {\n <button\n type=\"button\"\n class=\"cngx-tabs__add\"\n [attr.aria-label]=\"i18n.addTab\"\n (click)=\"dismiss.handleAdd()\"\n >\n @let addIconTpl = templates.addIcon();\n @if (addIconTpl) {\n <ng-container *ngTemplateOutlet=\"addIconTpl\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.addIcon }}</span>\n }\n </button>\n}\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [attr.tabindex]=\"panelTabindex(tab)\"\n [hidden]=\"!isSelected(tab)\"\n >\n @if (shouldRenderContent(tab)) {\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.tokens{@property --cngx-tab-strip-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.87 0 0);}@property --cngx-tab-indicator-thickness{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-transition-duration{syntax: \"<time>\"; inherits: false; initial-value: .15s;}@property --cngx-tab-hover-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-badge-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-error-badge-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-badge-font-size{syntax: \"*\"; inherits: false; initial-value: .75em;}@property --cngx-tab-badge-font-weight{syntax: \"<number>\"; inherits: false; initial-value: 700;}@property --cngx-tab-radius{syntax: \"*\"; inherits: true; initial-value: .5rem;}@property --cngx-tab-active-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-inactive-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 0 0);}@property --cngx-tab-surface-border-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.87 0 0);}@property --cngx-tab-surface-border-width{syntax: \"<length>\"; inherits: true; initial-value: 1px;}@property --cngx-tab-pill-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-pill-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.95 0 0);}@property --cngx-tab-segmented-track-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 0 0);}@property --cngx-tab-segmented-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.93 0 0);}@property --cngx-tab-segmented-active-shadow{syntax: \"*\"; inherits: true; initial-value: 0 1px 2px oklch(0 0 0 / .06);}@property --cngx-tab-pill-outline-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-pill-outline-bg{syntax: \"<color>\"; inherits: true; initial-value: color-mix(in oklch,oklch(.66 .19 50) 12%,transparent);}@property --cngx-tab-pill-radius{syntax: \"<length>\"; inherits: true; initial-value: 100px;}@property --cngx-tab-contained-accent-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-contained-accent-thickness{syntax: \"<length>\"; inherits: true; initial-value: 3px;}}@layer cngx.components{@scope(.cngx-tab-group){:scope{font:inherit;--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-strip-border: 1px solid var(--cngx-color-border, oklch(.88 .005 250))}.cngx-tabs__panel{container-type:inline-size;container-name:var(--cngx-tab-panel-container-name, cngx-tab-panel)}.cngx-tabs__strip{border-bottom:var(--cngx-tab-strip-border, 1px solid currentColor);gap:0;padding:0}.cngx-tabs__tab{position:relative;--cngx-tab-padding: .625rem 1rem;--cngx-tab-focus-ring: var(--cngx-tab-focus-ring-width, 2px) solid var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-focus-offset: -2px;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);transition:color var(--cngx-tab-transition-duration, .15s) ease,background var(--cngx-tab-transition-duration, .15s) ease,box-shadow var(--cngx-tab-transition-duration, .15s) ease}:where(:scope[data-orientation=vertical]) .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem}.cngx-tabs__tab:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color))}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color);box-shadow:none}.cngx-tabs__tab[aria-selected=true]:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:var(--cngx-tab-strip-border, 1px solid currentColor);padding:0}:scope[data-orientation=vertical] .cngx-tabs__tab:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;border-start-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-end-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-start-end-radius:0;border-end-end-radius:0;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]:after{transform:scaleY(1)}.cngx-tabs__badge{width:var(--cngx-tab-badge-size, 1.25rem);height:var(--cngx-tab-badge-size, 1.25rem);border-radius:50%;color:var(--cngx-tab-error-badge-text-color, oklch(1 0 0));font-size:var(--cngx-tab-badge-font-size, .75em);font-weight:var(--cngx-tab-badge-font-weight, 700);line-height:1}.cngx-tabs__icon{display:inline-flex;align-items:center;flex:0 0 auto}:scope[data-icon-layout=start] .cngx-tabs__tab{flex-direction:row}:scope[data-icon-layout=end] .cngx-tabs__tab{flex-direction:row-reverse}:scope[data-icon-layout=top] .cngx-tabs__tab{flex-direction:column;align-items:center;text-align:center}:scope[data-icon-layout=start] .cngx-tabs__icon,:scope[data-icon-layout=end] .cngx-tabs__icon{align-self:flex-start;min-height:calc(var(--cngx-tab-label-line-height, 1.4) * 1em)}:scope[data-icon-layout=only] .cngx-tabs__text,:scope[data-icon-layout=only] .cngx-tabs__label,:scope[data-icon-layout=only] .cngx-tabs__sublabel{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.cngx-tabs__tab,.cngx-tabs__tab:before,.cngx-tabs__tab:after{transition:none!important}}}@scope(.cngx-tab-group[data-skin=contained]){:scope{--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-inactive-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-surface-border-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-tab-contained-accent-color: var(--cngx-color-primary, oklch(.66 .19 50))}.cngx-tabs__tab:after{display:none}.cngx-tabs__strip{border-bottom:0;gap:0;padding:0}.cngx-tabs__strip-wrapper{position:relative;z-index:1}.cngx-tabs__tab{--cngx-tab-padding: .625rem 1.25rem;background:var(--cngx-tab-inactive-bg, oklch(.97 0 0));border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-bottom:0;border-radius:0;margin-bottom:0;margin-inline-end:-1px}.cngx-tabs__tab[aria-selected=true]{font-weight:var(--cngx-tab-active-font-weight, 600)}.cngx-tabs__tab:before{content:\"\";position:absolute;inset-inline:0;top:-1px;height:var(--cngx-tab-contained-accent-thickness, 3px);background:var(--cngx-tab-contained-accent-color, oklch(.66 .19 50));transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:color-mix(in oklch,var(--cngx-tab-inactive-bg, oklch(.97 0 0)) 60%,var(--cngx-tab-active-bg, oklch(1 0 0)))}.cngx-tabs__tab+.cngx-tabs__tab{margin-inline-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:none;margin-bottom:0;position:relative;z-index:1}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleX(1)}.cngx-tabs__panels{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-block-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1);background:var(--cngx-tab-active-bg, oklch(1 0 0))}}@scope(.cngx-tab-group[data-skin=contained][data-orientation=vertical]){:scope[data-orientation=vertical]{--cngx-tab-vertical-gap: 0;align-items:stretch}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:0;padding:0}.cngx-tabs__tab{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab:before{inset-inline:auto;inset-inline-start:-1px;inset-block:0;width:var(--cngx-tab-contained-accent-thickness, 3px);height:auto;transform:scaleY(0)}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleY(1)}.cngx-tabs__tab[aria-selected=true]{border-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1);margin-inline-end:0}.cngx-tabs__tab-wrapper:last-child .cngx-tabs__tab{margin-bottom:0}.cngx-tabs__panels{border-block-start:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-inline-start:0;margin-block-start:0}}@scope(.cngx-tab-group[data-skin=pill]){:scope{--cngx-tab-active-bg: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-active-color: var(--cngx-color-on-primary, oklch(1 0 0));--cngx-tab-pill-hover-bg: color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-pill-hover-bg, oklch(.95 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(.66 .19 50));color:var(--cngx-tab-pill-active-color, oklch(1 0 0));box-shadow:none}}@scope(.cngx-tab-group[data-skin=pill][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border-inline-end:0;margin-inline-end:0;justify-content:center;text-align:center}}@scope(.cngx-tab-group[data-skin=pill-outline]){:scope{--cngx-tab-pill-outline-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-outline-bg: color-mix( in oklch, var(--cngx-tab-pill-outline-color, oklch(.66 .19 50)) 12%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){border-color:var(--cngx-tab-surface-border-color, oklch(.87 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-pill-outline-bg);border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));box-shadow:none}}@scope(.cngx-tab-group[data-skin=segmented]){:scope{--cngx-tab-segmented-track-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-segmented-hover-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 45% )}.cngx-tabs__strip{background:var(--cngx-tab-segmented-track-bg, oklch(.96 0 0));border-bottom:0;border-radius:var(--cngx-tab-radius, .5rem);gap:var(--cngx-tab-segmented-gap, .25rem);padding:var(--cngx-tab-segmented-track-padding, .25rem);flex:0 1 auto;align-self:start}:scope[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__strip{flex:1 1 auto}:scope[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline:auto}:scope[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline-start:auto}.cngx-tabs__tab{--cngx-tab-padding: .5rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:calc(var(--cngx-tab-radius, .5rem) - .125rem);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-segmented-hover-bg, oklch(.93 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:var(--cngx-tab-segmented-active-shadow, 0 1px 2px oklch(0 0 0 / .06))}}@scope(.cngx-tab-group[data-skin=segmented][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;align-self:start;padding:var(--cngx-tab-segmented-track-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem;border-inline-end:0;margin-inline-end:0}}@scope(.cngx-tab-group[data-skin=pill-outline][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;margin-bottom:0;margin-inline-end:0;justify-content:center;text-align:center}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]{border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50))}}}@media(prefers-color-scheme:dark){.cngx-tab-group[data-skin=segmented]{--cngx-tab-segmented-active-shadow: 0 1px 3px oklch(0 0 0 / .3)}}\n"] }]
|
|
440
|
+
}, template: "<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <div class=\"cngx-tabs__tab-wrapper\" role=\"presentation\">\n <button\n type=\"button\"\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n [class.cngx-tabs__tab--closable]=\"dismiss.isTabClosable(tab)\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.tabindex]=\"tabTabindex(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [attr.aria-keyshortcuts]=\"dismiss.isTabClosable(tab) ? 'Delete' : null\"\n (click)=\"handleHeaderClick(tab)\"\n (keydown)=\"handleTabKeydown(tab, $event)\"\n >\n @let iconTpl = templates.icon();\n @if (iconTpl) {\n <span class=\"cngx-tabs__icon\" aria-hidden=\"true\">\n <ng-container\n *ngTemplateOutlet=\"iconTpl; context: iconContextFor(tab, i)\"\n ></ng-container>\n </span>\n }\n <span class=\"cngx-tabs__text\">\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @let subLabelTpl = subLabelTemplateFor(tab.id);\n @if (subLabelTpl || tab.subLabel()) {\n <span class=\"cngx-tabs__sublabel\">\n @if (subLabelTpl) {\n <ng-container *ngTemplateOutlet=\"subLabelTpl\"></ng-container>\n } @else {\n {{ tab.subLabel() }}\n }\n </span>\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n @if (dismiss.isTabClosable(tab)) {\n <button\n type=\"button\"\n class=\"cngx-tabs__close\"\n tabindex=\"-1\"\n [attr.aria-label]=\"dismiss.closeButtonLabel(tab)\"\n (click)=\"dismiss.handleClose(tab, $event)\"\n >\n @let closeIconTpl = templates.closeIcon();\n @if (closeIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"closeIconTpl; context: dismiss.closeIconContextFor(tab)\"\n ></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.closeIcon }}</span>\n }\n </button>\n }\n </div>\n }\n</div>\n@if (dismiss.resolvedAddable()) {\n <button\n type=\"button\"\n class=\"cngx-tabs__add\"\n [attr.aria-label]=\"i18n.addTab\"\n (click)=\"dismiss.handleAdd()\"\n >\n @let addIconTpl = templates.addIcon();\n @if (addIconTpl) {\n <ng-container *ngTemplateOutlet=\"addIconTpl\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ glyphs.addIcon }}</span>\n }\n </button>\n}\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [attr.tabindex]=\"panelTabindex(tab)\"\n [hidden]=\"!isSelected(tab)\"\n >\n @if (shouldRenderContent(tab)) {\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.tokens{@property --cngx-tab-strip-border{syntax: \"*\"; inherits: true; initial-value: 1px solid oklch(.87 0 0);}@property --cngx-tab-indicator-thickness{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-transition-duration{syntax: \"<time>\"; inherits: false; initial-value: .15s;}@property --cngx-tab-hover-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-badge-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-error-badge-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-badge-font-size{syntax: \"*\"; inherits: false; initial-value: .75em;}@property --cngx-tab-badge-font-weight{syntax: \"<number>\"; inherits: false; initial-value: 700;}@property --cngx-tab-radius{syntax: \"*\"; inherits: true; initial-value: .5rem;}@property --cngx-tab-active-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-inactive-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.97 0 0);}@property --cngx-tab-surface-border-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.87 0 0);}@property --cngx-tab-surface-border-width{syntax: \"<length>\"; inherits: true; initial-value: 1px;}@property --cngx-tab-pill-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-pill-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.95 0 0);}@property --cngx-tab-segmented-track-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.96 0 0);}@property --cngx-tab-segmented-hover-bg{syntax: \"<color>\"; inherits: true; initial-value: oklch(.93 0 0);}@property --cngx-tab-segmented-active-shadow{syntax: \"*\"; inherits: true; initial-value: 0 1px 2px oklch(0 0 0 / .06);}@property --cngx-tab-pill-outline-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-pill-outline-bg{syntax: \"<color>\"; inherits: true; initial-value: color-mix(in oklch,oklch(.66 .19 50) 12%,transparent);}@property --cngx-tab-pill-radius{syntax: \"<length>\"; inherits: true; initial-value: 100px;}@property --cngx-tab-contained-accent-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-contained-accent-thickness{syntax: \"<length>\"; inherits: true; initial-value: 3px;}}@layer cngx.components{@scope(.cngx-tab-group){:scope{font:inherit;--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-strip-border: 1px solid var(--cngx-color-border, oklch(.88 .005 250))}.cngx-tabs__panel{container-type:inline-size;container-name:var(--cngx-tab-panel-container-name, cngx-tab-panel)}.cngx-tabs__strip{border-bottom:var(--cngx-tab-strip-border, 1px solid currentColor);gap:0;padding:0}.cngx-tabs__tab{position:relative;--cngx-tab-padding: .625rem 1rem;--cngx-tab-focus-ring: var(--cngx-tab-focus-ring-width, 2px) solid var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-focus-offset: -2px;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);transition:color var(--cngx-tab-transition-duration, .15s) ease,background var(--cngx-tab-transition-duration, .15s) ease,box-shadow var(--cngx-tab-transition-duration, .15s) ease}:where(:scope[data-orientation=vertical]) .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem}.cngx-tabs__tab:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color))}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color);box-shadow:none}.cngx-tabs__tab[aria-selected=true]:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:var(--cngx-tab-strip-border, 1px solid currentColor);padding:0}:scope[data-orientation=vertical] .cngx-tabs__tab:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;border-start-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-end-start-radius:var(--cngx-tab-indicator-thickness, 2px);border-start-end-radius:0;border-end-end-radius:0;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]:after{transform:scaleY(1)}.cngx-tabs__badge{width:var(--cngx-tab-badge-size, 1.25rem);height:var(--cngx-tab-badge-size, 1.25rem);border-radius:50%;color:var(--cngx-tab-error-badge-text-color, oklch(1 0 0));font-size:var(--cngx-tab-badge-font-size, .75em);font-weight:var(--cngx-tab-badge-font-weight, 700);line-height:1}.cngx-tabs__icon{display:inline-flex;align-items:center;flex:0 0 auto}:scope[data-icon-layout=start] .cngx-tabs__tab{flex-direction:row}:scope[data-icon-layout=end] .cngx-tabs__tab{flex-direction:row-reverse}:scope[data-icon-layout=top] .cngx-tabs__tab{flex-direction:column;align-items:center;text-align:center}:scope[data-icon-layout=start] .cngx-tabs__icon,:scope[data-icon-layout=end] .cngx-tabs__icon{align-self:flex-start;min-height:calc(var(--cngx-tab-label-line-height, 1.4) * 1em)}:scope[data-icon-layout=only] .cngx-tabs__text,:scope[data-icon-layout=only] .cngx-tabs__label,:scope[data-icon-layout=only] .cngx-tabs__sublabel{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.cngx-tabs__tab,.cngx-tabs__tab:before,.cngx-tabs__tab:after{transition:none!important}}}@scope(.cngx-tab-group[data-skin=contained]){:scope{--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-inactive-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-surface-border-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-tab-contained-accent-color: var(--cngx-color-primary, oklch(.66 .19 50))}.cngx-tabs__tab:after{display:none}.cngx-tabs__strip{border-bottom:0;gap:0;padding:0}.cngx-tabs__strip-wrapper{position:relative;z-index:1}.cngx-tabs__tab{--cngx-tab-padding: .625rem 1.25rem;background:var(--cngx-tab-inactive-bg, oklch(.97 0 0));border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-bottom:0;border-radius:0;margin-bottom:0;margin-inline-end:-1px}.cngx-tabs__tab[aria-selected=true]{font-weight:var(--cngx-tab-active-font-weight, 600)}.cngx-tabs__tab:before{content:\"\";position:absolute;inset-inline:0;top:-1px;height:var(--cngx-tab-contained-accent-thickness, 3px);background:var(--cngx-tab-contained-accent-color, oklch(.66 .19 50));transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:color-mix(in oklch,var(--cngx-tab-inactive-bg, oklch(.97 0 0)) 60%,var(--cngx-tab-active-bg, oklch(1 0 0)))}.cngx-tabs__tab+.cngx-tabs__tab{margin-inline-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:none;margin-bottom:0;position:relative;z-index:1}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleX(1)}.cngx-tabs__panels{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-block-start:calc(var(--cngx-tab-surface-border-width, 1px) * -1);background:var(--cngx-tab-active-bg, oklch(1 0 0))}}@scope(.cngx-tab-group[data-skin=contained][data-orientation=vertical]){:scope[data-orientation=vertical]{--cngx-tab-vertical-gap: 0;align-items:stretch}:scope[data-orientation=vertical] .cngx-tabs__strip{border-bottom:0;border-inline-end:0;padding:0}.cngx-tabs__tab{border:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-radius:0;margin-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1)}.cngx-tabs__tab:before{inset-inline:auto;inset-inline-start:-1px;inset-block:0;width:var(--cngx-tab-contained-accent-thickness, 3px);height:auto;transform:scaleY(0)}.cngx-tabs__tab[aria-selected=true]:before{transform:scaleY(1)}.cngx-tabs__tab[aria-selected=true]{border-inline-end:0;margin-bottom:calc(var(--cngx-tab-surface-border-width, 1px) * -1);margin-inline-end:0}.cngx-tabs__tab-wrapper:last-child .cngx-tabs__tab{margin-bottom:0}.cngx-tabs__panels{border-block-start:var(--cngx-tab-surface-border-width, 1px) solid var(--cngx-tab-surface-border-color, oklch(.87 0 0));border-inline-start:0;margin-block-start:0}}@scope(.cngx-tab-group[data-skin=pill]){:scope{--cngx-tab-active-bg: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-active-color: var(--cngx-color-on-primary, oklch(1 0 0));--cngx-tab-pill-hover-bg: color-mix( in oklch, var(--cngx-color-primary, oklch(.66 .19 50)) 8%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-pill-hover-bg, oklch(.95 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(.66 .19 50));color:var(--cngx-tab-pill-active-color, oklch(1 0 0));box-shadow:none}}@scope(.cngx-tab-group[data-skin=pill][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border-inline-end:0;margin-inline-end:0;justify-content:center;text-align:center}}@scope(.cngx-tab-group[data-skin=pill-outline]){:scope{--cngx-tab-pill-outline-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-tab-pill-outline-bg: color-mix( in oklch, var(--cngx-tab-pill-outline-color, oklch(.66 .19 50)) 12%, transparent )}.cngx-tabs__strip{border-bottom:0;gap:var(--cngx-tab-pill-gap, .375rem);padding:var(--cngx-tab-pill-strip-padding, .25rem)}.cngx-tabs__tab{--cngx-tab-padding: .4375rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;border-radius:var(--cngx-tab-pill-radius, 100px);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){border-color:var(--cngx-tab-surface-border-color, oklch(.87 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-pill-outline-bg);border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50));box-shadow:none}}@scope(.cngx-tab-group[data-skin=segmented]){:scope{--cngx-tab-segmented-track-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 25% );--cngx-tab-active-bg: var(--cngx-color-surface, oklch(1 0 0));--cngx-tab-segmented-hover-bg: color-mix( in oklch, var(--cngx-color-surface, oklch(1 0 0)), var(--cngx-color-border, oklch(.88 .005 250)) 45% )}.cngx-tabs__strip{background:var(--cngx-tab-segmented-track-bg, oklch(.96 0 0));border-bottom:0;border-radius:var(--cngx-tab-radius, .5rem);gap:var(--cngx-tab-segmented-gap, .25rem);padding:var(--cngx-tab-segmented-track-padding, .25rem);flex:0 1 auto;align-self:start}:scope[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__strip{flex:1 1 auto}:scope[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline:auto}:scope[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{margin-inline-start:auto}.cngx-tabs__tab{--cngx-tab-padding: .5rem .875rem;--cngx-tab-focus-offset: 1px;background:transparent;border:0;border-radius:calc(var(--cngx-tab-radius, .5rem) - .125rem);margin-bottom:0}.cngx-tabs__tab:after{display:none}.cngx-tabs__tab:hover:not([aria-disabled=true]):not([aria-selected=true]){background:var(--cngx-tab-segmented-hover-bg, oklch(.93 0 0))}.cngx-tabs__tab[aria-selected=true]{background:var(--cngx-tab-active-bg, oklch(1 0 0));color:var(--cngx-tab-active-color, currentColor);box-shadow:var(--cngx-tab-segmented-active-shadow, 0 1px 2px oklch(0 0 0 / .06))}}@scope(.cngx-tab-group[data-skin=segmented][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;align-self:start;padding:var(--cngx-tab-segmented-track-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .5rem 1rem;border-inline-end:0;margin-inline-end:0}}@scope(.cngx-tab-group[data-skin=pill-outline][data-orientation=vertical]){:scope[data-orientation=vertical] .cngx-tabs__strip{border-inline-end:0;padding:var(--cngx-tab-pill-strip-padding, .25rem)}:scope[data-orientation=vertical] .cngx-tabs__tab{--cngx-tab-padding: .4375rem 1rem;border:var(--cngx-tab-surface-border-width, 1px) solid transparent;margin-bottom:0;margin-inline-end:0;justify-content:center;text-align:center}:scope[data-orientation=vertical] .cngx-tabs__tab[aria-selected=true]{border-color:var(--cngx-tab-pill-outline-color, oklch(.66 .19 50))}}}@media(prefers-color-scheme:dark){.cngx-tab-group[data-skin=segmented]{--cngx-tab-segmented-active-shadow: 0 1px 3px oklch(0 0 0 / .3)}}\n"] }]
|
|
435
441
|
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], skin: [{ type: i0.Input, args: [{ isSignal: true, alias: "skin", required: false }] }], iconLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLayout", required: false }] }], panelMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelMode", required: false }] }], fitted: [{ type: i0.Input, args: [{ isSignal: true, alias: "fitted", required: false }] }], tabAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabAlign", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], addable: [{ type: i0.Input, args: [{ isSignal: true, alias: "addable", required: false }] }], tabDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CngxTab), { ...{
|
|
436
442
|
descendants: true,
|
|
437
443
|
}, isSignal: true }] }], errorBadgeSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabErrorBadge), { isSignal: true }] }], rejectionIconSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabRejectionIcon), { isSignal: true }] }], busySpinnerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabBusySpinner), { isSignal: true }] }], iconSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabIcon), { isSignal: true }] }], closeIconSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabCloseIcon), { isSignal: true }] }], addIconSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTabAddIcon), { isSignal: true }] }] } });
|
|
438
444
|
|
|
445
|
+
/**
|
|
446
|
+
* CNGX tab-nav organism. \
|
|
447
|
+
* A `role="navigation"` landmark that wraps consumer-authored
|
|
448
|
+
* `<a cngxTabLink routerLink>` anchors into a tab bar. Native parallel of
|
|
449
|
+
* `[cngxMatTabNav]` in `@cngx/ui/mat-tabs`, and the link-driven sibling of
|
|
450
|
+
* the programmatic `<cngx-tab-group>` tablist: a navigation of natively
|
|
451
|
+
* focusable links is a different WAI-ARIA pattern than an automatic-
|
|
452
|
+
* activation tablist, so it is a separate organism, not a skin flag.
|
|
453
|
+
*
|
|
454
|
+
* Thin shell over {@link CngxTabGroupPresenter} via `hostDirectives` - the
|
|
455
|
+
* registry, `activeIndex`, and `activeId` come from the same brain the
|
|
456
|
+
* tablist organism and the Material bridge compose. There is no keyboard
|
|
457
|
+
* model and no commit gating: links are natural `Tab` stops, `Enter`
|
|
458
|
+
* activates the `routerLink`, and the router runs `CanDeactivate` natively.
|
|
459
|
+
* Add `[cngxTabsRouteSync]` to drive the active link from the route - it
|
|
460
|
+
* reflects `NavigationEnd` onto `activeIndex`; its commit-action stays
|
|
461
|
+
* dormant because nothing here calls `presenter.select()`.
|
|
462
|
+
*
|
|
463
|
+
* `CngxLiveRegion` is mounted as a child `<span>` rather than a host
|
|
464
|
+
* directive: its `role="status"` would clobber the host's `role="navigation"`
|
|
465
|
+
* landmark. Its content is the active link's label (Pillar 2 - the active
|
|
466
|
+
* change is announced).
|
|
467
|
+
*
|
|
468
|
+
* ```html
|
|
469
|
+
* <cngx-tab-nav cngxTabsRouteSync aria-label="Sections">
|
|
470
|
+
* <a cngxTabLink id="overview" routerLink="overview">Overview</a>
|
|
471
|
+
* <a cngxTabLink id="profile" routerLink="profile">Profile</a>
|
|
472
|
+
* </cngx-tab-nav>
|
|
473
|
+
* <router-outlet></router-outlet>
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* @playground Native router tabs with a CanDeactivate guard ./examples/routed-nav/routed-nav.component.ts
|
|
477
|
+
* @see {@link CngxTabGroup} for the programmatic tablist organism.
|
|
478
|
+
*
|
|
479
|
+
* @category ui/tabs
|
|
480
|
+
* @docsKind primary
|
|
481
|
+
* @wcag AA
|
|
482
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/tabs/tab-nav.component.ts
|
|
483
|
+
* @since 0.1.0
|
|
484
|
+
* @relatedTo CngxTabLink, CngxTabsRouteSync, CngxTabGroup, CngxMatTabNav
|
|
485
|
+
*/
|
|
486
|
+
class CngxTabNav {
|
|
487
|
+
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
488
|
+
ariaLabelledBy = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
489
|
+
/**
|
|
490
|
+
* Visual skin. Cascade `input ?? config ?? 'line'`, reflected onto
|
|
491
|
+
* `[data-skin]`. Resolved inline (single axis) rather than via
|
|
492
|
+
* `createTabsHostAttrs`: that helper resolves five tablist axes the nav
|
|
493
|
+
* does not use, so pulling it here would fabricate dead inputs - inline
|
|
494
|
+
* resolution is Komposition statt Konfiguration (Pillar 3).
|
|
495
|
+
*/
|
|
496
|
+
skin = input(undefined, ...(ngDevMode ? [{ debugName: "skin" }] : /* istanbul ignore next */ []));
|
|
497
|
+
presenter = inject(CNGX_TAB_GROUP_HOST);
|
|
498
|
+
config = injectTabsConfig();
|
|
499
|
+
resolvedSkin = computed(() => this.skin() ?? this.config.skin ?? 'line', ...(ngDevMode ? [{ debugName: "resolvedSkin" }] : /* istanbul ignore next */ []));
|
|
500
|
+
/**
|
|
501
|
+
* Active link's accessible label, fed to the polite live region. Derived
|
|
502
|
+
* from `activeId` through the registered handle (Pillar 1 - single
|
|
503
|
+
* source, the route-fed active index). Empty string before any link is
|
|
504
|
+
* active so the region stays silent.
|
|
505
|
+
*/
|
|
506
|
+
liveAnnouncement = computed(() => {
|
|
507
|
+
const id = this.presenter.activeId();
|
|
508
|
+
if (id === null) {
|
|
509
|
+
return '';
|
|
510
|
+
}
|
|
511
|
+
return this.presenter.tabs().find((tab) => tab.id === id)?.label() ?? '';
|
|
512
|
+
}, ...(ngDevMode ? [{ debugName: "liveAnnouncement" }] : /* istanbul ignore next */ []));
|
|
513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTabNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxTabNav, isStandalone: true, selector: "cngx-tab-nav", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, skin: { classPropertyName: "skin", publicName: "skin", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.data-skin": "resolvedSkin()", "attr.data-orientation": "presenter.orientation()", "attr.aria-orientation": "presenter.orientation()", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()" }, classAttribute: "cngx-tab-nav" }, exportAs: ["cngxTabNav"], hostDirectives: [{ directive: i1.CngxTabGroupPresenter, inputs: ["activeIndex", "activeIndex", "orientation", "orientation"], outputs: ["activeIndexChange", "activeIndexChange"] }], ngImport: i0, template: "<ng-content></ng-content>\n<span class=\"cngx-tab-nav__live-region cngx-sr-only\" cngxLiveRegion>{{ liveAnnouncement() }}</span>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.components{@scope(.cngx-tab-nav){:scope{display:flex;align-items:stretch;gap:var(--cngx-tab-gap, 0);border-bottom:var( --cngx-tab-strip-border, 1px solid var(--cngx-color-border, oklch(.88 .005 250)) );--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}:scope[data-orientation=vertical]{flex-direction:column;border-bottom:0;border-inline-end:var( --cngx-tab-strip-border, 1px solid var(--cngx-color-border, oklch(.88 .005 250)) )}.cngx-tab-nav__link{position:relative;display:inline-flex;align-items:center;gap:var(--cngx-tab-affordance-gap, .375rem);padding:var(--cngx-tab-padding, .625rem 1rem);color:var(--cngx-tab-color, inherit);font:inherit;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);text-decoration:none;cursor:pointer;transition:color var(--cngx-tab-transition-duration, .15s) ease}.cngx-tab-nav__link:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tab-nav__link:hover:not(.cngx-tab-nav__link--active){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color, currentColor))}.cngx-tab-nav__link:focus-visible{outline:var( --cngx-tab-focus-ring, 2px solid var(--cngx-color-primary, oklch(.66 .19 50)) );outline-offset:var(--cngx-tab-focus-offset, -2px)}.cngx-tab-nav__link--active{color:var(--cngx-tab-active-color, currentColor)}.cngx-tab-nav__link--active:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tab-nav__link:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tab-nav__link--active:after{transform:scaleY(1)}.cngx-tab-nav__link--error{color:var(--cngx-tab-error-badge-color, oklch(.55 .2 27))}.cngx-tab-nav__link--error:before{content:var(--cngx-tab-rejection-icon-text, \"!\");font-size:var(--cngx-tab-rejection-icon-font-size, .75em);font-weight:700;color:var(--cngx-tab-error-badge-color, oklch(.55 .2 27))}}}@media(prefers-reduced-motion:reduce){.cngx-tab-nav__link,.cngx-tab-nav__link:after{transition:none!important}}\n"], dependencies: [{ kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
515
|
+
}
|
|
516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTabNav, decorators: [{
|
|
517
|
+
type: Component,
|
|
518
|
+
args: [{ selector: 'cngx-tab-nav', exportAs: 'cngxTabNav', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CngxLiveRegion], encapsulation: ViewEncapsulation.None, hostDirectives: [
|
|
519
|
+
{
|
|
520
|
+
directive: CngxTabGroupPresenter,
|
|
521
|
+
inputs: ['activeIndex', 'orientation'],
|
|
522
|
+
outputs: ['activeIndexChange'],
|
|
523
|
+
},
|
|
524
|
+
], host: {
|
|
525
|
+
class: 'cngx-tab-nav',
|
|
526
|
+
role: 'navigation',
|
|
527
|
+
'[attr.data-skin]': 'resolvedSkin()',
|
|
528
|
+
'[attr.data-orientation]': 'presenter.orientation()',
|
|
529
|
+
'[attr.aria-orientation]': 'presenter.orientation()',
|
|
530
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
531
|
+
'[attr.aria-labelledby]': 'ariaLabelledBy()',
|
|
532
|
+
}, template: "<ng-content></ng-content>\n<span class=\"cngx-tab-nav__live-region cngx-sr-only\" cngxLiveRegion>{{ liveAnnouncement() }}</span>\n", styles: ["@layer cngx.tokens{@property --cngx-tab-gap{syntax: \"*\"; inherits: false; initial-value: .5rem;}@property --cngx-tab-strip-padding{syntax: \"*\"; inherits: false; initial-value: .5rem 0;}@property --cngx-tab-strip-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-padding{syntax: \"*\"; inherits: false; initial-value: .5rem .75rem;}@property --cngx-tab-bg{syntax: \"<color>\"; inherits: false; initial-value: transparent;}@property --cngx-tab-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-active-indicator-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-tab-active-indicator-width{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-disabled-opacity{syntax: \"<number>\"; inherits: false; initial-value: .55;}@property --cngx-tab-focus-ring{syntax: \"*\"; inherits: false; initial-value: 2px solid currentColor;}@property --cngx-tab-focus-offset{syntax: \"<length>\"; inherits: false; initial-value: 2px;}@property --cngx-tab-error-badge-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-busy-spinner-size{syntax: \"*\"; inherits: false; initial-value: 1rem;}@property --cngx-tab-busy-spinner-color{syntax: \"*\"; inherits: true; initial-value: currentColor;}@property --cngx-tab-rejection-icon-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-rejection-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.45 .15 25);}@property --cngx-tab-rejection-icon-text{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-tab-rejection-icon-font-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}@property --cngx-tab-rejected-outline{syntax: \"*\"; inherits: false; initial-value: 2px solid oklch(.45 .15 25);}@property --cngx-tab-rejected-outline-offset{syntax: \"<length>\"; inherits: false; initial-value: 1px;}@property --cngx-tab-rejected-pulse-duration{syntax: \"<time>\"; inherits: false; initial-value: .6s;}@property --cngx-tab-rejected-pulse-bg{syntax: \"<color>\"; inherits: false; initial-value: oklch(.45 .15 25 / .18);}@property --cngx-tab-affordance-size{syntax: \"*\"; inherits: false; initial-value: 1.25rem;}@property --cngx-tab-affordance-radius{syntax: \"*\"; inherits: false; initial-value: 50%;}@property --cngx-tab-affordance-hover-bg{syntax: \"*\"; inherits: false; initial-value: color-mix(in oklch,currentColor 14%,transparent);}@property --cngx-tab-label-line-height{syntax: \"*\"; inherits: true; initial-value: 1.4;}@property --cngx-tab-sublabel-font-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-tab-sublabel-color{syntax: \"*\"; inherits: true; initial-value: color-mix(in oklab,currentColor 65%,transparent);}:root{--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}}@layer cngx.components{cngx-tab-group{display:block}.cngx-tabs__strip-wrapper{display:flex;flex-direction:row;align-items:stretch;position:relative}.cngx-tabs__strip{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;flex:1 1 auto;min-width:0;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-strip-padding, .5rem 0);background:var(--cngx-tab-strip-bg, transparent);overflow-x:hidden;overflow-y:hidden;scroll-snap-type:x proximity}.cngx-tabs__tab{display:inline-flex;align-items:center;gap:var(--cngx-tab-gap, .5rem);padding:var(--cngx-tab-padding, .5rem .75rem);border:0;background:var(--cngx-tab-bg, transparent);color:var(--cngx-tab-color, currentColor);cursor:pointer;font:inherit;text-align:start;white-space:nowrap;scroll-snap-align:start}.cngx-tabs__tab[aria-selected=true]{color:var(--cngx-tab-active-color, currentColor);box-shadow:inset 0 calc(var(--cngx-tab-active-indicator-width, 2px) * -1) 0 var(--cngx-tab-active-indicator-color, oklch(.66 .19 50))}.cngx-tabs__tab[aria-disabled=true]{cursor:not-allowed;opacity:var(--cngx-tab-disabled-opacity, .55)}.cngx-tabs__tab:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}.cngx-tabs__tab[aria-busy=true]{cursor:progress}.cngx-tabs__text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.cngx-tabs__label{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--cngx-tab-label-line-height, 1.4)}.cngx-tabs__sublabel{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--cngx-tab-sublabel-font-size, .8125rem);color:var(--cngx-tab-sublabel-color, color-mix(in oklab, currentColor 65%, transparent))}.cngx-tabs__tab-wrapper{position:relative;display:inline-flex;align-items:stretch}.cngx-tabs__tab--closable{padding-inline-end:calc(var(--cngx-tab-affordance-size, 1.25rem) + var(--cngx-tab-gap, .5rem) * 2)}.cngx-tabs__close,.cngx-tabs__add{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:var(--cngx-tab-affordance-size, 1.25rem);height:var(--cngx-tab-affordance-size, 1.25rem);padding:0;border:0;border-radius:var(--cngx-tab-affordance-radius, 50%);background:transparent;color:inherit;font:inherit;line-height:1;cursor:pointer}.cngx-tabs__close{position:absolute;inset-inline-end:var(--cngx-tab-gap, .5rem);top:50%;transform:translateY(-50%);z-index:1}.cngx-tabs__add{margin-inline-start:var(--cngx-tab-gap, .5rem);align-self:center}.cngx-tabs__close:hover,.cngx-tabs__add:hover{background:var( --cngx-tab-affordance-hover-bg, color-mix(in oklch, currentColor 14%, transparent) )}.cngx-tabs__close:focus-visible,.cngx-tabs__add:focus-visible{outline:var(--cngx-tab-focus-ring, 2px solid currentColor);outline-offset:var(--cngx-tab-focus-offset, 2px)}cngx-tab-group[data-orientation=vertical] .cngx-tabs__add{margin-inline-start:0;margin-block-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--cngx-tab-error-badge-color, oklch(.45 .15 25));margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__busy-spinner{display:inline-block;width:var(--cngx-tab-busy-spinner-size, 1rem);height:var(--cngx-tab-busy-spinner-size, 1rem);border:2px solid transparent;border-top-color:var(--cngx-tab-busy-spinner-color, currentColor);border-right-color:var(--cngx-tab-busy-spinner-color, currentColor);border-radius:50%;flex:0 0 auto;margin-inline-start:var(--cngx-tab-gap, .5rem);animation:cngx-tabs-spin .75s linear infinite}.cngx-tabs__panels{display:block}.cngx-tabs__panel{display:block;padding:var(--cngx-tab-padding, .5rem .75rem)}.cngx-tabs__panel[hidden]{display:none}.cngx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}cngx-tab-group[data-orientation=vertical]{display:grid;grid-template-columns:max-content 1fr;gap:var(--cngx-tab-vertical-gap, 1rem);align-items:start}cngx-tab-group[data-orientation=vertical] .cngx-tabs__strip{flex-direction:column;flex-wrap:nowrap;overflow-x:hidden;overflow-y:hidden;scroll-snap-type:y proximity}cngx-tab-group[data-orientation=vertical] .cngx-tabs__tab{scroll-snap-align:start;white-space:normal;box-sizing:border-box;min-inline-size:100%}cngx-tab-group[data-orientation=vertical] .cngx-tabs__label{min-inline-size:auto;overflow:visible;text-overflow:clip}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab-wrapper{flex:1 1 0}cngx-tab-group[data-fitted]:not([data-orientation=vertical]) .cngx-tabs__tab{inline-size:100%;justify-content:center;text-align:center}cngx-tab-group[data-tab-align=center]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:center}cngx-tab-group[data-tab-align=end]:not([data-orientation=vertical]) .cngx-tabs__strip{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.cngx-tabs__busy-spinner{animation:none!important}}.cngx-tabs__rejection-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:var(--cngx-tab-rejection-icon-size, 1.25rem);height:var(--cngx-tab-rejection-icon-size, 1.25rem);border-radius:50%;background:var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25));color:var(--cngx-tab-rejection-icon-text, oklch(1 0 0));font-size:var(--cngx-tab-rejection-icon-font-size, .875rem);font-weight:700;line-height:1;margin-inline-start:var(--cngx-tab-gap, .5rem)}.cngx-tabs__tab.cngx-tab--rejected{outline:var( --cngx-tab-rejected-outline, 2px solid var(--cngx-tab-rejection-icon-color, oklch(.45 .15 25)) );outline-offset:var(--cngx-tab-rejected-outline-offset, 1px)}@media(prefers-reduced-motion:no-preference){.cngx-tabs__tab.cngx-tab--rejected{animation:cngx-tab-pulse-error var(--cngx-tab-rejected-pulse-duration, .6s) ease-out}}}@keyframes cngx-tabs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes cngx-tab-pulse-error{0%{background:var(--cngx-tab-bg, transparent)}50%{background:var(--cngx-tab-rejected-pulse-bg, oklch(.45 .15 25 / .18))}to{background:var(--cngx-tab-bg, transparent)}}\n", "@layer cngx.components{@scope(.cngx-tab-nav){:scope{display:flex;align-items:stretch;gap:var(--cngx-tab-gap, 0);border-bottom:var( --cngx-tab-strip-border, 1px solid var(--cngx-color-border, oklch(.88 .005 250)) );--cngx-tab-active-indicator-color: var(--cngx-color-primary, oklch(.66 .19 50))}:scope[data-orientation=vertical]{flex-direction:column;border-bottom:0;border-inline-end:var( --cngx-tab-strip-border, 1px solid var(--cngx-color-border, oklch(.88 .005 250)) )}.cngx-tab-nav__link{position:relative;display:inline-flex;align-items:center;gap:var(--cngx-tab-affordance-gap, .375rem);padding:var(--cngx-tab-padding, .625rem 1rem);color:var(--cngx-tab-color, inherit);font:inherit;font-size:var(--cngx-tab-font-size, .875rem);font-weight:var(--cngx-tab-font-weight, 500);text-decoration:none;cursor:pointer;transition:color var(--cngx-tab-transition-duration, .15s) ease}.cngx-tab-nav__link:after{content:\"\";position:absolute;inset-inline:0;bottom:0;block-size:var(--cngx-tab-indicator-thickness, 2px);background:var(--cngx-tab-active-indicator-color, currentColor);border-radius:var(--cngx-tab-indicator-thickness, 2px) var(--cngx-tab-indicator-thickness, 2px) 0 0;transform:scaleX(0);transition:transform var(--cngx-tab-transition-duration, .15s) ease}.cngx-tab-nav__link:hover:not(.cngx-tab-nav__link--active){color:var(--cngx-tab-hover-color, var(--cngx-tab-active-color, currentColor))}.cngx-tab-nav__link:focus-visible{outline:var( --cngx-tab-focus-ring, 2px solid var(--cngx-color-primary, oklch(.66 .19 50)) );outline-offset:var(--cngx-tab-focus-offset, -2px)}.cngx-tab-nav__link--active{color:var(--cngx-tab-active-color, currentColor)}.cngx-tab-nav__link--active:after{transform:scaleX(1)}:scope[data-orientation=vertical] .cngx-tab-nav__link:after{inset-inline:auto;inset-block:0;inset-inline-end:0;inline-size:var(--cngx-tab-indicator-thickness, 2px);block-size:auto;transform:scaleY(0)}:scope[data-orientation=vertical] .cngx-tab-nav__link--active:after{transform:scaleY(1)}.cngx-tab-nav__link--error{color:var(--cngx-tab-error-badge-color, oklch(.55 .2 27))}.cngx-tab-nav__link--error:before{content:var(--cngx-tab-rejection-icon-text, \"!\");font-size:var(--cngx-tab-rejection-icon-font-size, .75em);font-weight:700;color:var(--cngx-tab-error-badge-color, oklch(.55 .2 27))}}}@media(prefers-reduced-motion:reduce){.cngx-tab-nav__link,.cngx-tab-nav__link:after{transition:none!important}}\n"] }]
|
|
533
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], skin: [{ type: i0.Input, args: [{ isSignal: true, alias: "skin", required: false }] }] } });
|
|
534
|
+
|
|
439
535
|
/**
|
|
440
536
|
* Structural equal for `hiddenTabs` - same ids in same order.
|
|
441
537
|
*
|
|
@@ -505,6 +601,8 @@ function mapBoolEqual(a, b) {
|
|
|
505
601
|
* @since 0.1.0
|
|
506
602
|
* @relatedTo CngxTabGroup, CngxPopover, CngxActiveDescendant
|
|
507
603
|
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
|
|
604
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/all-skins-horizontal</example-url>
|
|
605
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/all-skins-vertical</example-url>
|
|
508
606
|
*/
|
|
509
607
|
class CngxTabOverflow {
|
|
510
608
|
// Projected via <ng-content>, so DI walks up to the parent's injector.
|
|
@@ -754,5 +852,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
754
852
|
* Generated bundle index. Do not edit.
|
|
755
853
|
*/
|
|
756
854
|
|
|
757
|
-
export { CngxTabGroup, CngxTabOverflow };
|
|
855
|
+
export { CngxTabGroup, CngxTabNav, CngxTabOverflow };
|
|
758
856
|
//# sourceMappingURL=cngx-ui-tabs.mjs.map
|