@ng-doc/ui-kit 22.0.0-beta.1 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -29
- package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs +43 -22
- package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs +24 -13
- package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs +62 -22
- package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs +39 -14
- package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs +30 -18
- package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs +12 -9
- package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button.mjs +15 -24
- package/fesm2022/ng-doc-ui-kit-components-button.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs +13 -13
- package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs +14 -9
- package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-combobox.mjs +30 -26
- package/fesm2022/ng-doc-ui-kit-components-combobox.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs +37 -38
- package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-data-list.mjs +32 -39
- package/fesm2022/ng-doc-ui-kit-components-data-list.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs +23 -20
- package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dot.mjs +20 -16
- package/fesm2022/ng-doc-ui-kit-components-dot.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs +120 -125
- package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-expander.mjs +17 -17
- package/fesm2022/ng-doc-ui-kit-components-expander.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs +4 -4
- package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs +16 -17
- package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs +20 -12
- package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-icon.mjs +175 -54
- package/fesm2022/ng-doc-ui-kit-components-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs +43 -46
- package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-label.mjs +14 -16
- package/fesm2022/ng-doc-ui-kit-components-label.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-line.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-components-line.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-list.mjs +24 -8
- package/fesm2022/ng-doc-ui-kit-components-list.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs +9 -4
- package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs +39 -18
- package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-option-group.mjs +22 -27
- package/fesm2022/ng-doc-ui-kit-components-option-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-option.mjs +28 -22
- package/fesm2022/ng-doc-ui-kit-components-option.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs +56 -52
- package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs +19 -21
- package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-pane.mjs +91 -69
- package/fesm2022/ng-doc-ui-kit-components-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-selection.mjs +173 -76
- package/fesm2022/ng-doc-ui-kit-components-selection.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs +23 -22
- package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-spinner.mjs +14 -12
- package/fesm2022/ng-doc-ui-kit-components-spinner.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs +86 -61
- package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs +16 -13
- package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tag.mjs +23 -24
- package/fesm2022/ng-doc-ui-kit-components-tag.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-text.mjs +37 -52
- package/fesm2022/ng-doc-ui-kit-components-text.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-toggle.mjs +82 -57
- package/fesm2022/ng-doc-ui-kit-components-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs +13 -10
- package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs +30 -26
- package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-data.mjs +8 -5
- package/fesm2022/ng-doc-ui-kit-directives-data.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs +19 -18
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs +7 -9
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs +22 -19
- package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs +30 -25
- package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs +13 -16
- package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs +90 -0
- package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs.map +1 -0
- package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs +34 -28
- package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs +10 -12
- package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs +9 -12
- package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs +16 -22
- package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs +105 -101
- package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives.mjs +1 -1
- package/fesm2022/ng-doc-ui-kit-interceptors.mjs +24 -21
- package/fesm2022/ng-doc-ui-kit-interceptors.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-observables.mjs +2 -58
- package/fesm2022/ng-doc-ui-kit-observables.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-dialog.mjs +14 -8
- package/fesm2022/ng-doc-ui-kit-services-dialog.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-notify.mjs +13 -8
- package/fesm2022/ng-doc-ui-kit-services-notify.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs +15 -11
- package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-overlay.mjs +20 -9
- package/fesm2022/ng-doc-ui-kit-services-overlay.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-scroll.mjs +11 -13
- package/fesm2022/ng-doc-ui-kit-services-scroll.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-tokens.mjs +29 -3
- package/fesm2022/ng-doc-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-types.mjs +0 -1
- package/fesm2022/ng-doc-ui-kit-types.mjs.map +1 -1
- package/package.json +31 -33
- package/styles/main.css +275 -38
- package/types/ng-doc-ui-kit-cdk-combobox-host.d.ts +16 -8
- package/types/ng-doc-ui-kit-classes-base-input.d.ts +12 -1
- package/types/ng-doc-ui-kit-classes-overlay-ref.d.ts +27 -4
- package/types/ng-doc-ui-kit-components-blockquote.d.ts +22 -5
- package/types/ng-doc-ui-kit-components-button-icon.d.ts +23 -5
- package/types/ng-doc-ui-kit-components-button-toggle.d.ts +5 -1
- package/types/ng-doc-ui-kit-components-button.d.ts +6 -6
- package/types/ng-doc-ui-kit-components-checkbox.d.ts +5 -3
- package/types/ng-doc-ui-kit-components-clear-control.d.ts +7 -0
- package/types/ng-doc-ui-kit-components-combobox.d.ts +19 -9
- package/types/ng-doc-ui-kit-components-data-list-group.d.ts +16 -11
- package/types/ng-doc-ui-kit-components-data-list.d.ts +21 -11
- package/types/ng-doc-ui-kit-components-dialog-outlet.d.ts +11 -6
- package/types/ng-doc-ui-kit-components-dot.d.ts +10 -5
- package/types/ng-doc-ui-kit-components-dropdown.d.ts +39 -27
- package/types/ng-doc-ui-kit-components-expander.d.ts +9 -7
- package/types/ng-doc-ui-kit-components-floated-content.d.ts +8 -6
- package/types/ng-doc-ui-kit-components-focus-control.d.ts +10 -4
- package/types/ng-doc-ui-kit-components-icon.d.ts +49 -14
- package/types/ng-doc-ui-kit-components-input-wrapper.d.ts +31 -17
- package/types/ng-doc-ui-kit-components-label.d.ts +8 -5
- package/types/ng-doc-ui-kit-components-line.d.ts +3 -0
- package/types/ng-doc-ui-kit-components-list.d.ts +14 -3
- package/types/ng-doc-ui-kit-components-magnifier-controller.d.ts +5 -1
- package/types/ng-doc-ui-kit-components-magnifier.d.ts +19 -4
- package/types/ng-doc-ui-kit-components-option-group.d.ts +12 -8
- package/types/ng-doc-ui-kit-components-option.d.ts +9 -2
- package/types/ng-doc-ui-kit-components-overlay-container.d.ts +18 -15
- package/types/ng-doc-ui-kit-components-overlay-pointer.d.ts +10 -6
- package/types/ng-doc-ui-kit-components-pane.d.ts +25 -9
- package/types/ng-doc-ui-kit-components-selection.d.ts +59 -21
- package/types/ng-doc-ui-kit-components-sidenav.d.ts +17 -8
- package/types/ng-doc-ui-kit-components-spinner.d.ts +7 -3
- package/types/ng-doc-ui-kit-components-tab-group.d.ts +43 -22
- package/types/ng-doc-ui-kit-components-tab-routes-group.d.ts +4 -2
- package/types/ng-doc-ui-kit-components-tag.d.ts +13 -6
- package/types/ng-doc-ui-kit-components-text.d.ts +21 -19
- package/types/ng-doc-ui-kit-components-toggle.d.ts +13 -7
- package/types/ng-doc-ui-kit-components-wrapper.d.ts +3 -0
- package/types/ng-doc-ui-kit-directives-autofocus.d.ts +7 -5
- package/types/ng-doc-ui-kit-directives-checked-change.d.ts +15 -11
- package/types/ng-doc-ui-kit-directives-data.d.ts +6 -4
- package/types/ng-doc-ui-kit-directives-dropdown-handler.d.ts +5 -3
- package/types/ng-doc-ui-kit-directives-dropdown-origin.d.ts +0 -2
- package/types/ng-doc-ui-kit-directives-event-switcher.d.ts +11 -6
- package/types/ng-doc-ui-kit-directives-focus-catcher.d.ts +11 -8
- package/types/ng-doc-ui-kit-directives-focusable.d.ts +6 -3
- package/types/ng-doc-ui-kit-directives-fullscreen.d.ts +39 -0
- package/types/ng-doc-ui-kit-directives-hotkey.d.ts +14 -7
- package/types/ng-doc-ui-kit-directives-input-number.d.ts +3 -2
- package/types/ng-doc-ui-kit-directives-input-string.d.ts +2 -2
- package/types/ng-doc-ui-kit-directives-radio-group.d.ts +4 -0
- package/types/ng-doc-ui-kit-directives-rotator.d.ts +8 -8
- package/types/ng-doc-ui-kit-directives-tooltip.d.ts +35 -23
- package/types/ng-doc-ui-kit-directives.d.ts +1 -1
- package/types/ng-doc-ui-kit-interceptors.d.ts +18 -2
- package/types/ng-doc-ui-kit-interfaces.d.ts +20 -4
- package/types/ng-doc-ui-kit-observables.d.ts +2 -19
- package/types/ng-doc-ui-kit-services-dialog.d.ts +10 -1
- package/types/ng-doc-ui-kit-services-notify.d.ts +9 -1
- package/types/ng-doc-ui-kit-services-overlay-strategy.d.ts +5 -3
- package/types/ng-doc-ui-kit-services-overlay.d.ts +14 -3
- package/types/ng-doc-ui-kit-services-scroll.d.ts +4 -5
- package/types/ng-doc-ui-kit-types.d.ts +2 -2
- package/fesm2022/ng-doc-ui-kit-decorators.mjs +0 -53
- package/fesm2022/ng-doc-ui-kit-decorators.mjs.map +0 -1
- package/fesm2022/ng-doc-ui-kit-directives-let.mjs +0 -43
- package/fesm2022/ng-doc-ui-kit-directives-let.mjs.map +0 -1
- package/types/ng-doc-ui-kit-decorators.d.ts +0 -12
- package/types/ng-doc-ui-kit-directives-let.d.ts +0 -22
|
@@ -1,83 +1,108 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { NgDocSelectionHostDirective, NgDocSelectionComponent, NgDocSelectionOriginDirective } from '@ng-doc/ui-kit/components/selection';
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component, contentChildren, viewChildren, linkedSignal, computed, untracked } from '@angular/core';
|
|
3
|
+
import { NgDocSelectionComponent, NgDocSelectionHostDirective, NgDocSelectionOriginDirective } from '@ng-doc/ui-kit/components/selection';
|
|
5
4
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
6
|
-
import { startWith } from 'rxjs/operators';
|
|
7
5
|
|
|
6
|
+
/** One tab of an `ng-doc-tab-group`: its label, its id and the content of its panel. */
|
|
8
7
|
class NgDocTabComponent {
|
|
9
8
|
constructor() {
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
/** Label of the tab: a string or a template. */
|
|
10
|
+
this.label = input('', /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
12
|
+
/** Id the group's `openedTab` refers to. */
|
|
13
|
+
this.id = input(0, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
15
|
+
/** Content of the tab's panel. */
|
|
16
|
+
this.content = input('', /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
14
18
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocTabComponent, isStandalone: true, selector: "ng-doc-tab, a[ng-doc-tab]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17
21
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabComponent, decorators: [{
|
|
19
23
|
type: Component,
|
|
20
|
-
args: [{ selector: 'ng-doc-tab, a[ng-doc-tab]', template: '', changeDetection: ChangeDetectionStrategy.OnPush
|
|
21
|
-
}], propDecorators: { label: [{
|
|
22
|
-
type: Input
|
|
23
|
-
}], id: [{
|
|
24
|
-
type: Input
|
|
25
|
-
}], content: [{
|
|
26
|
-
type: Input
|
|
27
|
-
}] } });
|
|
24
|
+
args: [{ selector: 'ng-doc-tab, a[ng-doc-tab]', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
25
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
28
26
|
|
|
27
|
+
let nextId = 0;
|
|
28
|
+
/**
|
|
29
|
+
* Tabs as a segmented control over one panel. It follows the WAI-ARIA tabs pattern: the arrow keys,
|
|
30
|
+
* Home and End move between the tabs and select them. The highlight of the open tab slides to
|
|
31
|
+
* the newly opened one.
|
|
32
|
+
*/
|
|
29
33
|
class NgDocTabGroupComponent {
|
|
30
34
|
constructor() {
|
|
31
|
-
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
/** Id of the tab to open; the first tab opens when it is not set or matches no tab. */
|
|
36
|
+
this.openedTab = input(undefined, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "openedTab" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** The tabs of the group. */
|
|
39
|
+
this.tabs = contentChildren(NgDocTabComponent, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Header buttons of the tabs, in order. */
|
|
42
|
+
this.tabElements = viewChildren('headerTab', /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "tabElements" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/**
|
|
45
|
+
* The open tab. It follows `openedTab` and the tab list; a tab the user selects stays open as
|
|
46
|
+
* long as it is in the group and `openedTab` does not change.
|
|
47
|
+
*/
|
|
48
|
+
this.selectedTab = linkedSignal({ ...(ngDevMode ? { debugName: "selectedTab" } : /* istanbul ignore next */ {}), source: () => ({ tabs: this.tabs(), opened: this.openedTab() }),
|
|
49
|
+
computation: ({ tabs, opened }, previous) => {
|
|
50
|
+
const kept = previous?.value && previous.source.opened === opened && tabs.includes(previous.value)
|
|
51
|
+
? previous.value
|
|
52
|
+
: undefined;
|
|
53
|
+
return (kept ??
|
|
54
|
+
(opened !== undefined && opened !== null
|
|
55
|
+
? tabs.find((tab) => tab.id() === opened)
|
|
56
|
+
: undefined) ??
|
|
57
|
+
tabs[0]);
|
|
58
|
+
} });
|
|
59
|
+
/** Index of the open tab, or -1. */
|
|
60
|
+
this.selectedIndex = computed(() => {
|
|
61
|
+
const selected = this.selectedTab();
|
|
62
|
+
return selected ? this.tabs().indexOf(selected) : -1;
|
|
63
|
+
}, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** Prefix of the ids that tie the tabs to the panel. */
|
|
66
|
+
this.idPrefix = `ng-doc-tab-group-${nextId++}`;
|
|
57
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Opens a tab.
|
|
70
|
+
* @param tab - The tab to open.
|
|
71
|
+
*/
|
|
58
72
|
selectTab(tab) {
|
|
59
|
-
this.selectedTab
|
|
73
|
+
untracked(() => this.selectedTab.set(tab));
|
|
60
74
|
}
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Moves the selection with the keyboard and focuses the new tab.
|
|
77
|
+
* @param event - The key press on a tab.
|
|
78
|
+
*/
|
|
79
|
+
onKeydown(event) {
|
|
80
|
+
const tabs = this.tabs();
|
|
81
|
+
const current = Math.max(this.selectedIndex(), 0);
|
|
82
|
+
const next = {
|
|
83
|
+
ArrowRight: (current + 1) % tabs.length,
|
|
84
|
+
ArrowLeft: (current - 1 + tabs.length) % tabs.length,
|
|
85
|
+
Home: 0,
|
|
86
|
+
End: tabs.length - 1,
|
|
87
|
+
}[event.key];
|
|
88
|
+
if (next !== undefined && tabs[next]) {
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
this.selectTab(tabs[next]);
|
|
91
|
+
this.tabElements()[next]?.nativeElement.focus();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocTabGroupComponent, isStandalone: true, selector: "ng-doc-tab-group", inputs: { openedTab: { classPropertyName: "openedTab", publicName: "openedTab", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tabs", predicate: NgDocTabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabElements", predicate: ["headerTab"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ng-doc-tabs-header\">\n <div class=\"ng-doc-tabs-wrapper\" role=\"tablist\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (tab of tabs(); track tab; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-tab\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"tab === selectedTab()\"\n [attr.aria-controls]=\"idPrefix + '-panel'\"\n [attr.tabindex]=\"tab === selectedTab() ? 0 : -1\"\n [class.selected]=\"tab === selectedTab()\"\n [ngDocSelectionOrigin]=\"tab === selectedTab()\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onKeydown($event)\"\n #headerTab>\n <span class=\"ng-doc-tab-text\">\n <ng-container *polymorpheusOutlet=\"tab.label() as text; context: {}\">{{\n text\n }}</ng-container>\n </span>\n </button>\n }\n </div>\n</div>\n\n<div\n class=\"ng-doc-body-wrapper\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel'\"\n [attr.aria-labelledby]=\"selectedIndex() >= 0 ? idPrefix + '-tab-' + selectedIndex() : null\">\n <div *polymorpheusOutlet=\"selectedTab()?.content() ?? '' as text; context: {}\">\n {{ text }}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;background:var(--ng-doc-tab-group-header-background, var(--ng-doc-tab-group-background));border-radius:var(--ng-doc-tab-group-border-radius);border:var(--ng-doc-tab-group-border);overflow:hidden}:host .ng-doc-tabs-header{display:flex;align-items:center;flex-shrink:0;min-height:var(--ng-doc-code-header-height, 40px);padding:var(--ng-doc-space-1) var(--ng-doc-space-2);background:var(--ng-doc-tab-group-tabs-background, transparent);border-bottom:1px solid var(--ng-doc-border-color)}:host .ng-doc-tabs-wrapper{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;display:inline-flex;gap:2px;max-width:100%;padding:3px;border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-2);overflow-x:auto;scrollbar-width:none}:host ng-doc-selection{border-radius:var(--ng-doc-radius-sm);background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}:host .ng-doc-tab{position:relative;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:0;border-radius:var(--ng-doc-radius-sm);background:none;font:inherit;font-size:13px;font-weight:500;line-height:18px;color:var(--ng-doc-text-muted);white-space:nowrap;cursor:pointer}:host .ng-doc-tab:hover{color:var(--ng-doc-heading-color)}:host .ng-doc-tab:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}:host .ng-doc-tab.selected{color:var(--ng-doc-heading-color)}:host .ng-doc-tab .ng-doc-tab-text{display:inline-flex;align-items:center;gap:6px}:host ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}:host .ng-doc-body-wrapper{position:relative;background-color:var(--ng-doc-tab-group-background);height:100%;overflow:hidden}:host-context([data-theme=dark]) ng-doc-selection,:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}@media(prefers-color-scheme:dark){:host-context([data-theme=auto]) ng-doc-selection,:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: NgDocSelectionComponent, selector: "ng-doc-selection", inputs: ["align"] }, { kind: "directive", type: NgDocSelectionHostDirective, selector: "[ngDocSelectionHost]" }, { kind: "directive", type: NgDocSelectionOriginDirective, selector: "[ngDocSelectionOrigin]", inputs: ["ngDocSelectionOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
63
96
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabGroupComponent, decorators: [{
|
|
65
98
|
type: Component,
|
|
66
99
|
args: [{ selector: 'ng-doc-tab-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
67
|
-
|
|
100
|
+
PolymorpheusOutlet,
|
|
68
101
|
NgDocSelectionComponent,
|
|
102
|
+
NgDocSelectionHostDirective,
|
|
69
103
|
NgDocSelectionOriginDirective,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}], ctorParameters: () => [], propDecorators: { openedTab: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], tabElements: [{
|
|
75
|
-
type: ViewChildren,
|
|
76
|
-
args: ['headerTab']
|
|
77
|
-
}], tabs: [{
|
|
78
|
-
type: ContentChildren,
|
|
79
|
-
args: [NgDocTabComponent]
|
|
80
|
-
}] } });
|
|
104
|
+
], template: "<div class=\"ng-doc-tabs-header\">\n <div class=\"ng-doc-tabs-wrapper\" role=\"tablist\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (tab of tabs(); track tab; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-tab\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"tab === selectedTab()\"\n [attr.aria-controls]=\"idPrefix + '-panel'\"\n [attr.tabindex]=\"tab === selectedTab() ? 0 : -1\"\n [class.selected]=\"tab === selectedTab()\"\n [ngDocSelectionOrigin]=\"tab === selectedTab()\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onKeydown($event)\"\n #headerTab>\n <span class=\"ng-doc-tab-text\">\n <ng-container *polymorpheusOutlet=\"tab.label() as text; context: {}\">{{\n text\n }}</ng-container>\n </span>\n </button>\n }\n </div>\n</div>\n\n<div\n class=\"ng-doc-body-wrapper\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel'\"\n [attr.aria-labelledby]=\"selectedIndex() >= 0 ? idPrefix + '-tab-' + selectedIndex() : null\">\n <div *polymorpheusOutlet=\"selectedTab()?.content() ?? '' as text; context: {}\">\n {{ text }}\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;background:var(--ng-doc-tab-group-header-background, var(--ng-doc-tab-group-background));border-radius:var(--ng-doc-tab-group-border-radius);border:var(--ng-doc-tab-group-border);overflow:hidden}:host .ng-doc-tabs-header{display:flex;align-items:center;flex-shrink:0;min-height:var(--ng-doc-code-header-height, 40px);padding:var(--ng-doc-space-1) var(--ng-doc-space-2);background:var(--ng-doc-tab-group-tabs-background, transparent);border-bottom:1px solid var(--ng-doc-border-color)}:host .ng-doc-tabs-wrapper{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;display:inline-flex;gap:2px;max-width:100%;padding:3px;border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-2);overflow-x:auto;scrollbar-width:none}:host ng-doc-selection{border-radius:var(--ng-doc-radius-sm);background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}:host .ng-doc-tab{position:relative;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:0;border-radius:var(--ng-doc-radius-sm);background:none;font:inherit;font-size:13px;font-weight:500;line-height:18px;color:var(--ng-doc-text-muted);white-space:nowrap;cursor:pointer}:host .ng-doc-tab:hover{color:var(--ng-doc-heading-color)}:host .ng-doc-tab:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}:host .ng-doc-tab.selected{color:var(--ng-doc-heading-color)}:host .ng-doc-tab .ng-doc-tab-text{display:inline-flex;align-items:center;gap:6px}:host ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}:host .ng-doc-body-wrapper{position:relative;background-color:var(--ng-doc-tab-group-background);height:100%;overflow:hidden}:host-context([data-theme=dark]) ng-doc-selection,:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}@media(prefers-color-scheme:dark){:host-context([data-theme=auto]) ng-doc-selection,:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~.ng-doc-tab.selected{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}}\n"] }]
|
|
105
|
+
}], propDecorators: { openedTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "openedTab", required: false }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgDocTabComponent), { isSignal: true }] }], tabElements: [{ type: i0.ViewChildren, args: ['headerTab', { isSignal: true }] }] } });
|
|
81
106
|
|
|
82
107
|
/**
|
|
83
108
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-tab-group.mjs","sources":["../../../../libs/ui-kit/components/tab-group/tab/tab.component.ts","../../../../libs/ui-kit/components/tab-group/tab-group.component.ts","../../../../libs/ui-kit/components/tab-group/tab-group.component.html","../../../../libs/ui-kit/components/tab-group/ng-doc-ui-kit-components-tab-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\n\n@Component({\n selector: 'ng-doc-tab, a[ng-doc-tab]',\n template: '',\n styleUrls: ['./tab.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class NgDocTabComponent<T> {\n @Input()\n label: NgDocContent = '';\n\n @Input()\n id: T | number = 0;\n\n /** Expander content */\n @Input()\n content: NgDocContent = '';\n}\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n inject,\n Input,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n NgDocSelectionOriginDirective,\n} from '@ng-doc/ui-kit/components/selection';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\nimport { startWith } from 'rxjs/operators';\n\nimport { NgDocTabComponent } from './tab/tab.component';\n\n@Component({\n selector: 'ng-doc-tab-group',\n templateUrl: './tab-group.component.html',\n styleUrls: ['./tab-group.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocSelectionHostDirective,\n NgDocSelectionComponent,\n NgDocSelectionOriginDirective,\n PolymorpheusOutlet,\n ],\n})\nexport class NgDocTabGroupComponent<T = number> implements AfterContentInit, AfterViewInit {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n @Input()\n openedTab!: T;\n\n @ViewChildren('headerTab')\n tabElements: QueryList<ElementRef> = new QueryList<ElementRef>();\n\n @ContentChildren(NgDocTabComponent)\n tabs: QueryList<NgDocTabComponent<T>> = new QueryList<NgDocTabComponent<T>>();\n\n selectedTab?: NgDocTabComponent<T>;\n\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {}\n\n ngAfterContentInit(): void {\n this.tabs.changes\n .pipe(startWith(this.tabs), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n const tabToOpen: NgDocTabComponent<T> | undefined = this.openedTab\n ? this.tabs.find((tab: NgDocTabComponent<T>) => tab.id === this.openedTab)\n : this.tabs.get(0);\n\n tabToOpen && this.selectTab(tabToOpen);\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n ngAfterViewInit(): void {\n this.tabElements.changes\n .pipe(startWith(this.tabElements), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.changeDetectorRef.detectChanges());\n }\n\n get selectedIndex(): number {\n return this.selectedTab ? this.tabs.toArray().indexOf(this.selectedTab) : -1;\n }\n\n get selectedHeaderTab(): ElementRef | null {\n return this.selectedTab ? this.tabElements.get(this.selectedIndex) ?? null : null;\n }\n\n selectTab(tab: NgDocTabComponent<T>) {\n this.selectedTab = tab;\n }\n}\n","<div class=\"ng-doc-tabs-wrapper\" ngDocSelectionHost>\n <ng-doc-selection></ng-doc-selection>\n @for (tab of tabs; track tab) {\n <div\n class=\"ng-doc-tab\"\n [class.selected]=\"tab === selectedTab\"\n (click)=\"selectTab(tab)\"\n [ngDocSelectionOrigin]=\"tab === selectedTab\"\n #headerTab>\n <div class=\"ng-doc-tab-text\">\n <ng-container *polymorpheusOutlet=\"tab.label; context: {}\">{{ tab.label }}</ng-container>\n </div>\n </div>\n }\n</div>\n\n<div class=\"ng-doc-body-wrapper\">\n <div *polymorpheusOutlet=\"selectedTab?.content ?? '' as text; context: {}\">\n {{ text }}\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,iBAAiB,CAAA;AAP9B,IAAA,WAAA,GAAA;QASE,IAAA,CAAA,KAAK,GAAiB,EAAE;QAGxB,IAAA,CAAA,EAAE,GAAe,CAAC;;QAIlB,IAAA,CAAA,OAAO,GAAiB,EAAE;AAC3B,IAAA;8GAVY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,+IALlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,YAC3B,EAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA;;sBAGf;;sBAGA;;sBAIA;;;MCmBU,sBAAsB,CAAA;AAgBjC,IAAA,WAAA,GAAA;AAfiB,QAAA,IAAA,CAAA,iBAAiB,GAAG,MA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;2FAGT,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAZlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,2BAA2B;wBAC3B,uBAAuB;wBACvB,6BAA6B;wBAC7B,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,opBAAA,EAAA,MAAA,EAAA,CAAA,wwCAAA,CAAA,EAAA;;sBAKA;;sBAGA,YAAY;uBAAC,WAAW;;sBAGxB,eAAe;uBAAC,iBAAiB;;;AE9CpC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-tab-group.mjs","sources":["../../../../libs/ui-kit/components/tab-group/tab/tab.component.ts","../../../../libs/ui-kit/components/tab-group/tab-group.component.ts","../../../../libs/ui-kit/components/tab-group/tab-group.component.html","../../../../libs/ui-kit/components/tab-group/ng-doc-ui-kit-components-tab-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\n\n/** One tab of an `ng-doc-tab-group`: its label, its id and the content of its panel. */\n@Component({\n selector: 'ng-doc-tab, a[ng-doc-tab]',\n template: '',\n styleUrls: ['./tab.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocTabComponent<T> {\n /** Label of the tab: a string or a template. */\n readonly label = input<NgDocContent>('');\n\n /** Id the group's `openedTab` refers to. */\n readonly id = input<T | number>(0);\n\n /** Content of the tab's panel. */\n readonly content = input<NgDocContent>('');\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n input,\n linkedSignal,\n Signal,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport {\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n NgDocSelectionOriginDirective,\n} from '@ng-doc/ui-kit/components/selection';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\nimport { NgDocTabComponent } from './tab/tab.component';\n\nlet nextId = 0;\n\n/**\n * Tabs as a segmented control over one panel. It follows the WAI-ARIA tabs pattern: the arrow keys,\n * Home and End move between the tabs and select them. The highlight of the open tab slides to\n * the newly opened one.\n */\n@Component({\n selector: 'ng-doc-tab-group',\n templateUrl: './tab-group.component.html',\n styleUrls: ['./tab-group.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n PolymorpheusOutlet,\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n NgDocSelectionOriginDirective,\n ],\n})\nexport class NgDocTabGroupComponent<T = number> {\n /** Id of the tab to open; the first tab opens when it is not set or matches no tab. */\n readonly openedTab = input<T | undefined>(undefined);\n\n /** The tabs of the group. */\n readonly tabs: Signal<ReadonlyArray<NgDocTabComponent<T>>> =\n contentChildren<NgDocTabComponent<T>>(NgDocTabComponent);\n\n /** Header buttons of the tabs, in order. */\n readonly tabElements: Signal<ReadonlyArray<ElementRef<HTMLElement>>> =\n viewChildren<ElementRef<HTMLElement>>('headerTab');\n\n /**\n * The open tab. It follows `openedTab` and the tab list; a tab the user selects stays open as\n * long as it is in the group and `openedTab` does not change.\n */\n readonly selectedTab = linkedSignal<\n { tabs: ReadonlyArray<NgDocTabComponent<T>>; opened: T | undefined },\n NgDocTabComponent<T> | undefined\n >({\n source: () => ({ tabs: this.tabs(), opened: this.openedTab() }),\n computation: ({ tabs, opened }, previous) => {\n const kept: NgDocTabComponent<T> | undefined =\n previous?.value && previous.source.opened === opened && tabs.includes(previous.value)\n ? previous.value\n : undefined;\n\n return (\n kept ??\n (opened !== undefined && opened !== null\n ? tabs.find((tab: NgDocTabComponent<T>) => tab.id() === opened)\n : undefined) ??\n tabs[0]\n );\n },\n });\n\n /** Index of the open tab, or -1. */\n readonly selectedIndex: Signal<number> = computed(() => {\n const selected: NgDocTabComponent<T> | undefined = this.selectedTab();\n\n return selected ? this.tabs().indexOf(selected) : -1;\n });\n\n /** Prefix of the ids that tie the tabs to the panel. */\n protected readonly idPrefix: string = `ng-doc-tab-group-${nextId++}`;\n\n /**\n * Opens a tab.\n * @param tab - The tab to open.\n */\n selectTab(tab: NgDocTabComponent<T>): void {\n untracked(() => this.selectedTab.set(tab));\n }\n\n /**\n * Moves the selection with the keyboard and focuses the new tab.\n * @param event - The key press on a tab.\n */\n protected onKeydown(event: KeyboardEvent): void {\n const tabs: ReadonlyArray<NgDocTabComponent<T>> = this.tabs();\n const current: number = Math.max(this.selectedIndex(), 0);\n const next: number | undefined = {\n ArrowRight: (current + 1) % tabs.length,\n ArrowLeft: (current - 1 + tabs.length) % tabs.length,\n Home: 0,\n End: tabs.length - 1,\n }[event.key];\n\n if (next !== undefined && tabs[next]) {\n event.preventDefault();\n this.selectTab(tabs[next]);\n this.tabElements()[next]?.nativeElement.focus();\n }\n }\n}\n","<div class=\"ng-doc-tabs-header\">\n <div class=\"ng-doc-tabs-wrapper\" role=\"tablist\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (tab of tabs(); track tab; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-tab\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"tab === selectedTab()\"\n [attr.aria-controls]=\"idPrefix + '-panel'\"\n [attr.tabindex]=\"tab === selectedTab() ? 0 : -1\"\n [class.selected]=\"tab === selectedTab()\"\n [ngDocSelectionOrigin]=\"tab === selectedTab()\"\n (click)=\"selectTab(tab)\"\n (keydown)=\"onKeydown($event)\"\n #headerTab>\n <span class=\"ng-doc-tab-text\">\n <ng-container *polymorpheusOutlet=\"tab.label() as text; context: {}\">{{\n text\n }}</ng-container>\n </span>\n </button>\n }\n </div>\n</div>\n\n<div\n class=\"ng-doc-body-wrapper\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel'\"\n [attr.aria-labelledby]=\"selectedIndex() >= 0 ? idPrefix + '-tab-' + selectedIndex() : null\">\n <div *polymorpheusOutlet=\"selectedTab()?.content() ?? '' as text; context: {}\">\n {{ text }}\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;MAOa,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;;QAQW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE;kFAAC;;QAG/B,IAAA,CAAA,EAAE,GAAG,KAAK,CAAa,CAAC;+EAAC;;QAGzB,IAAA,CAAA,OAAO,GAAG,KAAK,CAAe,EAAE;oFAAC;AAC3C,IAAA;8GATY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,scAJlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAID,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,EAAA,QAAA,EAC3B,EAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA;;;ACajD,IAAI,MAAM,GAAG,CAAC;AAEd;;;;AAIG;MAaU,sBAAsB,CAAA;AAZnC,IAAA,WAAA,GAAA;;QAcW,IAAA,CAAA,SAAS,GAAG,KAAK,CAAgB,SAAS;sFAAC;;QAG3C,IAAA,CAAA,IAAI,GACX,eAAe,CAAuB,iBAAiB;iFAAC;;QAGjD,IAAA,CAAA,WAAW,GAClB,YAAY,CAA0B,WAAW;wFAAC;AAEpD;;;AAGG;QACM,IAAA,CAAA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EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,iBAAiB,yEAIjB,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElDrD;;AAEG;;;;"}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@ng-doc/ui-kit/components/selection';
|
|
4
4
|
import { NgDocSelectionOriginDirective, NgDocSelectionComponent, NgDocSelectionHostDirective } from '@ng-doc/ui-kit/components/selection';
|
|
5
5
|
|
|
6
|
+
/** A link of an `ng-doc-tab-routes-group`; the active one is underlined and marked current. */
|
|
6
7
|
class NgDocTabRouteComponent {
|
|
7
8
|
constructor() {
|
|
8
|
-
|
|
9
|
+
/** Whether the link's route is active. */
|
|
10
|
+
this.isActive = input(false, /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
9
12
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocTabRouteComponent, isStandalone: true, selector: "a[ng-doc-tab-route]", inputs: { isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-current": "isActive() ? \"page\" : null" } }, hostDirectives: [{ directive: i1.NgDocSelectionOriginDirective, inputs: ["ngDocSelectionOrigin", "isActive"] }], ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;padding:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2) calc(var(--ng-doc-base-gutter) * 2);cursor:pointer;white-space:nowrap;text-decoration:none;font-weight:500;flex-shrink:0;color:var(--ng-doc-text-muted)}:host[aria-current=page],:host:hover{color:var(--ng-doc-heading-color)}:host:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--ng-doc-focus-ring-color);border-radius:var(--ng-doc-radius-sm)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
15
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabRouteComponent, decorators: [{
|
|
14
17
|
type: Component,
|
|
15
18
|
args: [{ selector: 'a[ng-doc-tab-route]', imports: [], hostDirectives: [
|
|
16
19
|
{ directive: NgDocSelectionOriginDirective, inputs: ['ngDocSelectionOrigin: isActive'] },
|
|
17
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
21
|
+
'[attr.aria-current]': 'isActive() ? "page" : null',
|
|
22
|
+
}, template: "<ng-content></ng-content>\n", styles: [":host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;padding:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2) calc(var(--ng-doc-base-gutter) * 2);cursor:pointer;white-space:nowrap;text-decoration:none;font-weight:500;flex-shrink:0;color:var(--ng-doc-text-muted)}:host[aria-current=page],:host:hover{color:var(--ng-doc-heading-color)}:host:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--ng-doc-focus-ring-color);border-radius:var(--ng-doc-radius-sm)}\n"] }]
|
|
23
|
+
}], propDecorators: { isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }] } });
|
|
21
24
|
|
|
22
25
|
class NgDocTabRoutesGroupComponent {
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabRoutesGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: NgDocTabRoutesGroupComponent, isStandalone: true, selector: "ng-doc-tab-routes-group", hostDirectives: [{ directive: i1.NgDocSelectionHostDirective }], ngImport: i0, template: "<ng-doc-selection></ng-doc-selection>\n<ng-content></ng-content>\n", styles: [":host{position:relative;display:flex;border-bottom:1px solid var(--ng-doc-base-4);overflow-x:auto;scrollbar-width:none}ng-doc-selection:not([data-ng-doc-placed])~::ng-deep [aria-current=page]:after{content:\"\";position:absolute;inset:auto 0 0;border-bottom:var(--ng-doc-selection-border)}\n"], dependencies: [{ kind: "component", type: NgDocSelectionComponent, selector: "ng-doc-selection", inputs: ["align"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
28
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabRoutesGroupComponent, decorators: [{
|
|
27
30
|
type: Component,
|
|
28
|
-
args: [{ selector: 'ng-doc-tab-routes-group', imports: [NgDocSelectionComponent], hostDirectives: [NgDocSelectionHostDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-doc-selection></ng-doc-selection>\n<ng-content></ng-content>\n", styles: [":host{position:relative;display:flex;border-bottom:1px solid var(--ng-doc-base-4)}\n"] }]
|
|
31
|
+
args: [{ selector: 'ng-doc-tab-routes-group', imports: [NgDocSelectionComponent], hostDirectives: [NgDocSelectionHostDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-doc-selection></ng-doc-selection>\n<ng-content></ng-content>\n", styles: [":host{position:relative;display:flex;border-bottom:1px solid var(--ng-doc-base-4);overflow-x:auto;scrollbar-width:none}ng-doc-selection:not([data-ng-doc-placed])~::ng-deep [aria-current=page]:after{content:\"\";position:absolute;inset:auto 0 0;border-bottom:var(--ng-doc-selection-border)}\n"] }]
|
|
29
32
|
}] });
|
|
30
33
|
|
|
31
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-tab-routes-group.mjs","sources":["../../../../libs/ui-kit/components/tab-routes-group/tab-route/tab-route.component.ts","../../../../libs/ui-kit/components/tab-routes-group/tab-route/tab-route.component.html","../../../../libs/ui-kit/components/tab-routes-group/tab-routes-group.component.ts","../../../../libs/ui-kit/components/tab-routes-group/tab-routes-group.component.html","../../../../libs/ui-kit/components/tab-routes-group/ng-doc-ui-kit-components-tab-routes-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-tab-routes-group.mjs","sources":["../../../../libs/ui-kit/components/tab-routes-group/tab-route/tab-route.component.ts","../../../../libs/ui-kit/components/tab-routes-group/tab-route/tab-route.component.html","../../../../libs/ui-kit/components/tab-routes-group/tab-routes-group.component.ts","../../../../libs/ui-kit/components/tab-routes-group/tab-routes-group.component.html","../../../../libs/ui-kit/components/tab-routes-group/ng-doc-ui-kit-components-tab-routes-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgDocSelectionOriginDirective } from '@ng-doc/ui-kit/components/selection';\n\n/** A link of an `ng-doc-tab-routes-group`; the active one is underlined and marked current. */\n@Component({\n selector: 'a[ng-doc-tab-route]',\n imports: [],\n templateUrl: './tab-route.component.html',\n styleUrl: './tab-route.component.scss',\n hostDirectives: [\n { directive: NgDocSelectionOriginDirective, inputs: ['ngDocSelectionOrigin: isActive'] },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-current]': 'isActive() ? \"page\" : null',\n },\n})\nexport class NgDocTabRouteComponent {\n /** Whether the link's route is active. */\n readonly isActive = input<boolean>(false);\n}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport {\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n} from '@ng-doc/ui-kit/components/selection';\n\n@Component({\n selector: 'ng-doc-tab-routes-group',\n templateUrl: './tab-routes-group.component.html',\n styleUrl: './tab-routes-group.component.scss',\n imports: [NgDocSelectionComponent],\n hostDirectives: [NgDocSelectionHostDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocTabRoutesGroupComponent {}\n","<ng-doc-selection></ng-doc-selection>\n<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;MAca,sBAAsB,CAAA;AAbnC,IAAA,WAAA,GAAA;;QAeW,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;AAC1C,IAAA;8GAHY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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A;;2FAItB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBARxC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAG1B,CAAC,uBAAuB,CAAC,EAAA,cAAA,EAClB,CAAC,2BAA2B,CAAC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,oEAAA,EAAA,MAAA,EAAA,CAAA,qSAAA,CAAA,EAAA;;;AEZjD;;AAEG;;;;"}
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A small label. The `default` mod is a solid fill of the colour; the `light` mod is a soft chip
|
|
6
|
+
* whose text mixes the colour toward the heading colour, so it stays readable in every theme.
|
|
7
|
+
*/
|
|
4
8
|
class NgDocTagComponent {
|
|
5
9
|
constructor() {
|
|
6
|
-
|
|
7
|
-
this.
|
|
8
|
-
|
|
10
|
+
/** Colour of the tag. */
|
|
11
|
+
this.color = input('primary', /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
13
|
+
/** Size of the tag. */
|
|
14
|
+
this.size = input('medium', /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
16
|
+
/** `default` fills the tag with the colour, `light` makes a soft chip of it. */
|
|
17
|
+
this.mod = input('default', /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "mod" }] : /* istanbul ignore next */ []));
|
|
9
19
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocTagComponent, isStandalone: true, selector: "ng-doc-tag", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, mod: { classPropertyName: "mod", publicName: "mod", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-color": "color()", "attr.data-ng-doc-size": "size()", "attr.data-ng-doc-mod": "mod()" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);display:inline-flex;align-items:center;padding:0 var(--ng-doc-space-2);border-radius:var(--ng-doc-radius-sm);border:var(--ng-doc-tag-border, none);color:var(--ng-doc-tag-color);background:color-mix(in srgb,var(--ng-doc-tag-background) var(--ng-doc-tag-background-opacity, 100%),transparent);white-space:nowrap;--ng-doc-icon-color: var(--ng-doc-tag-color);--ng-doc-font-size: 14px}:host[data-ng-doc-size=small]{height:18px;padding:0 6px;--ng-doc-font-size: 11px;--ng-doc-font-weight: 500;--ng-doc-line-height: 18px}:host[data-ng-doc-color=info]{--ng-doc-tag-background: var(--ng-doc-info);--ng-doc-tag-color: var(--ng-doc-info-text)}:host[data-ng-doc-color=warning]{--ng-doc-tag-background: var(--ng-doc-warning);--ng-doc-tag-color: var(--ng-doc-warning-text)}:host[data-ng-doc-color=alert]{--ng-doc-tag-background: var(--ng-doc-alert);--ng-doc-tag-color: var(--ng-doc-alert-text)}:host[data-ng-doc-color=link]{--ng-doc-tag-background: var(--ng-doc-link-color);--ng-doc-tag-color: var(--ng-doc-primary-text)}:host[data-ng-doc-color=success]{--ng-doc-tag-background: var(--ng-doc-success);--ng-doc-tag-color: var(--ng-doc-success-text)}:host[data-ng-doc-mod=light]{background:color-mix(in oklab,var(--ng-doc-tag-background) var(--ng-doc-tag-background-opacity, var(--ng-doc-mix-chip)),var(--ng-doc-background));--ng-doc-tag-color: color-mix( in oklab, var(--ng-doc-tag-background) var(--ng-doc-mix-strong), var(--ng-doc-heading-color) )}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
22
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTagComponent, decorators: [{
|
|
14
24
|
type: Component,
|
|
15
|
-
args: [{ selector: 'ng-doc-tag', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}], size: [{
|
|
22
|
-
type: Input
|
|
23
|
-
}, {
|
|
24
|
-
type: HostBinding,
|
|
25
|
-
args: ['attr.data-ng-doc-size']
|
|
26
|
-
}], mod: [{
|
|
27
|
-
type: Input
|
|
28
|
-
}, {
|
|
29
|
-
type: HostBinding,
|
|
30
|
-
args: ['attr.data-ng-doc-mod']
|
|
31
|
-
}] } });
|
|
25
|
+
args: [{ selector: 'ng-doc-tag', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
26
|
+
'[attr.data-ng-doc-color]': 'color()',
|
|
27
|
+
'[attr.data-ng-doc-size]': 'size()',
|
|
28
|
+
'[attr.data-ng-doc-mod]': 'mod()',
|
|
29
|
+
}, template: "<ng-content></ng-content>\n", styles: [":host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);display:inline-flex;align-items:center;padding:0 var(--ng-doc-space-2);border-radius:var(--ng-doc-radius-sm);border:var(--ng-doc-tag-border, none);color:var(--ng-doc-tag-color);background:color-mix(in srgb,var(--ng-doc-tag-background) var(--ng-doc-tag-background-opacity, 100%),transparent);white-space:nowrap;--ng-doc-icon-color: var(--ng-doc-tag-color);--ng-doc-font-size: 14px}:host[data-ng-doc-size=small]{height:18px;padding:0 6px;--ng-doc-font-size: 11px;--ng-doc-font-weight: 500;--ng-doc-line-height: 18px}:host[data-ng-doc-color=info]{--ng-doc-tag-background: var(--ng-doc-info);--ng-doc-tag-color: var(--ng-doc-info-text)}:host[data-ng-doc-color=warning]{--ng-doc-tag-background: var(--ng-doc-warning);--ng-doc-tag-color: var(--ng-doc-warning-text)}:host[data-ng-doc-color=alert]{--ng-doc-tag-background: var(--ng-doc-alert);--ng-doc-tag-color: var(--ng-doc-alert-text)}:host[data-ng-doc-color=link]{--ng-doc-tag-background: var(--ng-doc-link-color);--ng-doc-tag-color: var(--ng-doc-primary-text)}:host[data-ng-doc-color=success]{--ng-doc-tag-background: var(--ng-doc-success);--ng-doc-tag-color: var(--ng-doc-success-text)}:host[data-ng-doc-mod=light]{background:color-mix(in oklab,var(--ng-doc-tag-background) var(--ng-doc-tag-background-opacity, var(--ng-doc-mix-chip)),var(--ng-doc-background));--ng-doc-tag-color: color-mix( in oklab, var(--ng-doc-tag-background) var(--ng-doc-mix-strong), var(--ng-doc-heading-color) )}\n"] }]
|
|
30
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], mod: [{ type: i0.Input, args: [{ isSignal: true, alias: "mod", required: false }] }] } });
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-tag.mjs","sources":["../../../../libs/ui-kit/components/tag/tag.component.ts","../../../../libs/ui-kit/components/tag/tag.component.html","../../../../libs/ui-kit/components/tag/ng-doc-ui-kit-components-tag.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-tag.mjs","sources":["../../../../libs/ui-kit/components/tag/tag.component.ts","../../../../libs/ui-kit/components/tag/tag.component.html","../../../../libs/ui-kit/components/tag/ng-doc-ui-kit-components-tag.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgDocColor, NgDocTagSize } from '@ng-doc/ui-kit/types';\n\n/**\n * A small label. The `default` mod is a solid fill of the colour; the `light` mod is a soft chip\n * whose text mixes the colour toward the heading colour, so it stays readable in every theme.\n */\n@Component({\n selector: 'ng-doc-tag',\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-ng-doc-color]': 'color()',\n '[attr.data-ng-doc-size]': 'size()',\n '[attr.data-ng-doc-mod]': 'mod()',\n },\n})\nexport class NgDocTagComponent {\n /** Colour of the tag. */\n readonly color = input<NgDocColor>('primary');\n\n /** Size of the tag. */\n readonly size = input<NgDocTagSize>('medium');\n\n /** `default` fills the tag with the colour, `light` makes a soft chip of it. */\n readonly mod = input<'default' | 'light'>('default');\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;;AAGG;MAYU,iBAAiB,CAAA;AAX9B,IAAA,WAAA,GAAA;;QAaW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAa,SAAS;kFAAC;;QAGpC,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,QAAQ;iFAAC;;QAGpC,IAAA,CAAA,GAAG,GAAG,KAAK,CAAsB,SAAS;gFAAC;AACrD,IAAA;8GATY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,ojBClB9B,6BACA,EAAA,MAAA,EAAA,CAAA,6mDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDiBa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAX7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,eAAA,EAGL,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,0BAA0B,EAAE,SAAS;AACrC,wBAAA,yBAAyB,EAAE,QAAQ;AACnC,wBAAA,wBAAwB,EAAE,OAAO;AAClC,qBAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,6mDAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
|
|
@@ -1,83 +1,68 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive,
|
|
2
|
+
import { Directive, input, contentChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/** Using to display content on the left side */
|
|
5
5
|
class NgDocTextLeftDirective {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.1", type: NgDocTextLeftDirective, isStandalone: true, selector: "[ngDocTextLeft]", ngImport: i0 }); }
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextLeftDirective, decorators: [{
|
|
10
10
|
type: Directive,
|
|
11
11
|
args: [{
|
|
12
12
|
selector: '[ngDocTextLeft]',
|
|
13
|
-
standalone: true,
|
|
14
13
|
}]
|
|
15
14
|
}] });
|
|
16
15
|
|
|
17
16
|
/** Using to display content on the right side */
|
|
18
17
|
class NgDocTextRightDirective {
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextRightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.1", type: NgDocTextRightDirective, isStandalone: true, selector: "[ngDocTextRight]", ngImport: i0 }); }
|
|
21
20
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextRightDirective, decorators: [{
|
|
23
22
|
type: Directive,
|
|
24
23
|
args: [{
|
|
25
24
|
selector: '[ngDocTextRight]',
|
|
26
|
-
standalone: true,
|
|
27
25
|
}]
|
|
28
26
|
}] });
|
|
29
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Text with the UI Kit typography, optionally with content on its left or right side
|
|
30
|
+
* (`ngDocTextLeft`, `ngDocTextRight`).
|
|
31
|
+
*/
|
|
30
32
|
class NgDocTextComponent {
|
|
31
33
|
constructor() {
|
|
32
|
-
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
33
34
|
/** Text size */
|
|
34
|
-
this.size = 'medium'
|
|
35
|
+
this.size = input('medium', /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
35
37
|
/** Text color */
|
|
36
|
-
this.color = 'normal'
|
|
38
|
+
this.color = input('normal', /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
37
40
|
/** Text align */
|
|
38
|
-
this.align = 'left'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
this.align = input('left', /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/** Positions the side content absolutely, so it does not take space from the text. */
|
|
44
|
+
this.absoluteContent = input(false, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "absoluteContent" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** Content projected with `ngDocTextLeft`. */
|
|
47
|
+
this.leftContent = contentChild(NgDocTextLeftDirective, /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "leftContent" }] : /* istanbul ignore next */ []));
|
|
49
|
+
/** Content projected with `ngDocTextRight`. */
|
|
50
|
+
this.rightContent = contentChild(NgDocTextRightDirective, /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "rightContent" }] : /* istanbul ignore next */ []));
|
|
44
52
|
}
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocTextComponent, isStandalone: true, selector: "[ng-doc-text]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, absoluteContent: { classPropertyName: "absoluteContent", publicName: "absoluteContent", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-text-size": "size()", "attr.data-ng-doc-text-color": "color()", "attr.data-ng-doc-text-align": "align()", "attr.data-ng-doc-text-absolute": "absoluteContent()" }, classAttribute: "ngde" }, queries: [{ propertyName: "leftContent", first: true, predicate: NgDocTextLeftDirective, descendants: true, isSignal: true }, { propertyName: "rightContent", first: true, predicate: NgDocTextRightDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (leftContent()) {\n <span class=\"ng-doc-text-left\">\n <ng-content select=\"[ngDocTextLeft]\"></ng-content>\n </span>\n}\n<span class=\"ng-doc-text\">\n <ng-content></ng-content>\n</span>\n@if (rightContent()) {\n <span class=\"ng-doc-text-right\">\n <ng-content select=\"[ngDocTextRight]\"></ng-content>\n </span>\n}\n", styles: ["::ng-deep :root{--ng-doc-text-left-width: auto;--ng-doc-text-right-width: auto}:host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;display:flex;align-items:center}:host[data-ng-doc-text-size=small]{--ng-doc-font-size: 14px;--ng-doc-line-height: 18px}:host[data-ng-doc-text-color=muted]{--ng-doc-text: var(--ng-doc-text-muted)}:host[data-ng-doc-text-align=center] .ng-doc-text{text-align:center}:host[data-ng-doc-text-align=right] .ng-doc-text{text-align:right}:host[data-ng-doc-text-absolute=true] .ng-doc-text-left{position:absolute;transform:translate(calc(-100% - var(--ng-doc-base-gutter)))}:host[data-ng-doc-text-absolute=true] .ng-doc-text-right{position:absolute;right:0;transform:translate(calc(100% + var(--ng-doc-base-gutter)))}:hostspan{display:inline-flex}:hostspan .ng-doc-text{width:auto}:host .ng-doc-text-left,:host .ng-doc-text-right{display:flex;justify-content:center;flex-shrink:0;min-height:var(--ng-doc-line-height);align-items:center}:host .ng-doc-text-left ::ng-deep>ng-doc-svg-icon,:host .ng-doc-text-right ::ng-deep>ng-doc-svg-icon{display:flex;min-height:var(--ng-doc-line-height)}:host .ng-doc-text{width:100%}:host .ng-doc-text:empty{display:none}:host[data-ng-doc-text-absolute=false] .ng-doc-text-left:not(:empty){width:var(--ng-doc-text-left-width)}:host[data-ng-doc-text-absolute=false] .ng-doc-text-left:not(:empty)~.ng-doc-text{margin-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-text-absolute=false] .ng-doc-text-right:not(:empty){width:var(--ng-doc-text-right-width);margin-left:var(--ng-doc-base-gutter)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
47
55
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTextComponent, decorators: [{
|
|
49
57
|
type: Component,
|
|
50
|
-
args: [{ selector: '[ng-doc-text]', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, {
|
|
59
|
-
type: HostBinding,
|
|
60
|
-
args: ['attr.data-ng-doc-text-color']
|
|
61
|
-
}], align: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}, {
|
|
64
|
-
type: HostBinding,
|
|
65
|
-
args: ['attr.data-ng-doc-text-align']
|
|
66
|
-
}], absoluteContent: [{
|
|
67
|
-
type: Input
|
|
68
|
-
}, {
|
|
69
|
-
type: HostBinding,
|
|
70
|
-
args: ['attr.data-ng-doc-text-absolute']
|
|
71
|
-
}], leftContent: [{
|
|
72
|
-
type: ContentChild,
|
|
73
|
-
args: [NgDocTextLeftDirective]
|
|
74
|
-
}], rightContent: [{
|
|
75
|
-
type: ContentChild,
|
|
76
|
-
args: [NgDocTextRightDirective]
|
|
77
|
-
}], ngDocElement: [{
|
|
78
|
-
type: HostBinding,
|
|
79
|
-
args: ['class.ngde']
|
|
80
|
-
}] } });
|
|
58
|
+
args: [{ selector: '[ng-doc-text]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
59
|
+
class: 'ngde',
|
|
60
|
+
'[attr.data-ng-doc-text-size]': 'size()',
|
|
61
|
+
'[attr.data-ng-doc-text-color]': 'color()',
|
|
62
|
+
'[attr.data-ng-doc-text-align]': 'align()',
|
|
63
|
+
'[attr.data-ng-doc-text-absolute]': 'absoluteContent()',
|
|
64
|
+
}, template: "@if (leftContent()) {\n <span class=\"ng-doc-text-left\">\n <ng-content select=\"[ngDocTextLeft]\"></ng-content>\n </span>\n}\n<span class=\"ng-doc-text\">\n <ng-content></ng-content>\n</span>\n@if (rightContent()) {\n <span class=\"ng-doc-text-right\">\n <ng-content select=\"[ngDocTextRight]\"></ng-content>\n </span>\n}\n", styles: ["::ng-deep :root{--ng-doc-text-left-width: auto;--ng-doc-text-right-width: auto}:host{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);position:relative;display:flex;align-items:center}:host[data-ng-doc-text-size=small]{--ng-doc-font-size: 14px;--ng-doc-line-height: 18px}:host[data-ng-doc-text-color=muted]{--ng-doc-text: var(--ng-doc-text-muted)}:host[data-ng-doc-text-align=center] .ng-doc-text{text-align:center}:host[data-ng-doc-text-align=right] .ng-doc-text{text-align:right}:host[data-ng-doc-text-absolute=true] .ng-doc-text-left{position:absolute;transform:translate(calc(-100% - var(--ng-doc-base-gutter)))}:host[data-ng-doc-text-absolute=true] .ng-doc-text-right{position:absolute;right:0;transform:translate(calc(100% + var(--ng-doc-base-gutter)))}:hostspan{display:inline-flex}:hostspan .ng-doc-text{width:auto}:host .ng-doc-text-left,:host .ng-doc-text-right{display:flex;justify-content:center;flex-shrink:0;min-height:var(--ng-doc-line-height);align-items:center}:host .ng-doc-text-left ::ng-deep>ng-doc-svg-icon,:host .ng-doc-text-right ::ng-deep>ng-doc-svg-icon{display:flex;min-height:var(--ng-doc-line-height)}:host .ng-doc-text{width:100%}:host .ng-doc-text:empty{display:none}:host[data-ng-doc-text-absolute=false] .ng-doc-text-left:not(:empty){width:var(--ng-doc-text-left-width)}:host[data-ng-doc-text-absolute=false] .ng-doc-text-left:not(:empty)~.ng-doc-text{margin-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-text-absolute=false] .ng-doc-text-right:not(:empty){width:var(--ng-doc-text-right-width);margin-left:var(--ng-doc-base-gutter)}\n"] }]
|
|
65
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], absoluteContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "absoluteContent", required: false }] }], leftContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgDocTextLeftDirective), { isSignal: true }] }], rightContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgDocTextRightDirective), { isSignal: true }] }] } });
|
|
81
66
|
|
|
82
67
|
/**
|
|
83
68
|
* Generated bundle index. Do not edit.
|