ngx-tethys 19.0.13 → 19.1.0-next.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/CHANGELOG.md +29 -2
- package/action/action.component.d.ts +12 -20
- package/action/actions.component.d.ts +5 -7
- package/affix/affix.component.d.ts +7 -10
- package/alert/alert.component.d.ts +1 -1
- package/anchor/anchor-link.component.d.ts +8 -8
- package/anchor/anchor.component.d.ts +15 -21
- package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
- package/autocomplete/autocomplete.component.d.ts +10 -17
- package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
- package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
- package/avatar/avatar.component.d.ts +25 -39
- package/back-top/back-top.component.d.ts +9 -12
- package/badge/badge.component.d.ts +19 -59
- package/breadcrumb/breadcrumb.component.d.ts +15 -20
- package/button/button-icon.component.d.ts +3 -2
- package/button/button.component.d.ts +3 -2
- package/calendar/calendar-header.component.d.ts +9 -8
- package/calendar/calendar.component.d.ts +16 -16
- package/card/card.component.d.ts +5 -11
- package/card/content.component.d.ts +3 -8
- package/card/header.component.d.ts +7 -8
- package/carousel/carousel.component.d.ts +22 -27
- package/cascader/cascader-li.component.d.ts +13 -21
- package/cascader/cascader-search-option.component.d.ts +8 -16
- package/cascader/cascader.component.d.ts +58 -80
- package/checkbox/checkbox.component.d.ts +2 -5
- package/collapse/collapse-item.component.d.ts +12 -19
- package/collapse/collapse.component.d.ts +6 -12
- package/collapse/collapse.token.d.ts +3 -3
- package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
- package/color-picker/color-picker-panel.component.d.ts +7 -11
- package/color-picker/color-picker.component.d.ts +19 -35
- package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
- package/color-picker/parts/hue/hue.component.d.ts +6 -6
- package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
- package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
- package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
- package/comment/comment.component.d.ts +4 -5
- package/copy/copy.directive.d.ts +8 -9
- package/date-picker/abstract-picker.component.d.ts +8 -7
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
- package/date-picker/picker.component.d.ts +2 -1
- package/date-range/date-range.component.d.ts +2 -2
- package/dialog/body/dialog-body.component.d.ts +2 -6
- package/dialog/confirm/confirm.component.d.ts +2 -2
- package/dialog/footer/dialog-footer.component.d.ts +6 -9
- package/dialog/header/dialog-header.component.d.ts +9 -11
- package/divider/divider.component.d.ts +12 -16
- package/dot/dot.component.d.ts +5 -13
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag.directive.d.ts +2 -1
- package/drag-drop/drop-container.directive.d.ts +2 -1
- package/dropdown/dropdown-menu-item.directive.d.ts +3 -2
- package/dropdown/dropdown-menu.component.d.ts +2 -1
- package/dropdown/dropdown.directive.d.ts +2 -1
- package/empty/empty.component.d.ts +21 -27
- package/fesm2022/ngx-tethys-action.mjs +54 -91
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +29 -26
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +91 -118
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +117 -162
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +33 -46
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +104 -208
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +85 -87
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +72 -77
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +82 -99
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +313 -468
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +66 -71
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +16 -10
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +25 -28
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +81 -82
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +49 -58
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +45 -68
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +107 -95
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +161 -200
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +160 -152
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +25 -25
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +101 -114
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +268 -271
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +1 -1
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +17 -35
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +52 -74
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +106 -179
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +169 -201
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +230 -294
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +67 -70
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +196 -244
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +102 -105
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +34 -38
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +46 -28
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +75 -108
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +26 -46
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +114 -151
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +74 -107
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +80 -140
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +1 -1
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +69 -87
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +42 -64
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +104 -129
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +36 -33
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +91 -130
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +36 -40
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/form/form-group-error/form-group-error.component.d.ts +2 -3
- package/form/form-group-label.directive.d.ts +2 -1
- package/form/form-group.component.d.ts +17 -24
- package/form/form-submit.directive.d.ts +2 -2
- package/form/form.directive.d.ts +6 -8
- package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
- package/form/validator/confirm-validator.directive.d.ts +2 -2
- package/form/validator/unique-validator.directive.d.ts +2 -2
- package/fullscreen/fullscreen.component.d.ts +7 -7
- package/grid/flex.d.ts +14 -19
- package/grid/thy-col.directive.d.ts +6 -9
- package/grid/thy-grid-item.component.d.ts +3 -4
- package/grid/thy-grid.component.d.ts +11 -12
- package/grid/thy-row.directive.d.ts +12 -12
- package/icon/icon.component.d.ts +3 -2
- package/image/image.directive.d.ts +3 -2
- package/input/input-count.component.d.ts +4 -5
- package/input/input-group.component.d.ts +20 -20
- package/input/input-search.component.d.ts +15 -20
- package/input/input.component.d.ts +20 -21
- package/input/input.directive.d.ts +4 -6
- package/input-number/input-number.component.d.ts +21 -29
- package/layout/header.component.d.ts +4 -9
- package/layout/sidebar-header.component.d.ts +2 -1
- package/layout/sidebar.component.d.ts +8 -7
- package/list/list.component.d.ts +2 -1
- package/list/selection/selection-list.d.ts +4 -3
- package/loading/loading.component.d.ts +4 -10
- package/mention/mention.directive.d.ts +6 -7
- package/mention/suggestions/suggestions.component.d.ts +8 -9
- package/menu/group/menu-group.component.d.ts +16 -33
- package/menu/item/action/menu-item-action.component.d.ts +7 -8
- package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
- package/menu/item/menu-item.component.d.ts +4 -4
- package/menu/item/name/menu-item-name.component.d.ts +2 -3
- package/menu/menu.component.d.ts +3 -7
- package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
- package/nav/icon-nav/icon-nav.component.d.ts +3 -8
- package/nav/nav-ink-bar.directive.d.ts +4 -6
- package/nav/nav-item.directive.d.ts +7 -10
- package/nav/nav.component.d.ts +20 -48
- package/package.json +1 -1
- package/pagination/pagination.component.d.ts +48 -109
- package/popover/header/popover-header.component.d.ts +7 -6
- package/popover/popover.directive.d.ts +11 -18
- package/progress/progress-circle.component.d.ts +32 -21
- package/progress/progress-strip.component.d.ts +10 -14
- package/progress/progress.component.d.ts +15 -23
- package/property/examples/single/single.component.scss +6 -0
- package/property/properties.component.d.ts +6 -13
- package/property/property-item.component.d.ts +21 -26
- package/property/styles/properties.scss +124 -52
- package/property-operation/property-operation.component.d.ts +6 -5
- package/radio/button/radio-button.component.d.ts +2 -2
- package/radio/group/radio-group.component.d.ts +8 -7
- package/radio/radio.component.d.ts +2 -2
- package/radio/radio.token.d.ts +2 -2
- package/rate/rate-item.component.d.ts +2 -1
- package/rate/rate.component.d.ts +4 -3
- package/resizable/resizable.directive.d.ts +4 -9
- package/resizable/resize-handle.component.d.ts +2 -1
- package/resizable/resize-handles.component.d.ts +2 -1
- package/result/result.component.d.ts +9 -10
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.component.d.ts +2 -1
- package/select/custom-select/custom-select.component.d.ts +11 -10
- package/select/native-select/native-select.component.d.ts +2 -1
- package/shared/base-form-check.component.d.ts +3 -2
- package/shared/directives/thy-autofocus.directive.d.ts +3 -2
- package/shared/directives/thy-scroll.directive.d.ts +2 -1
- package/shared/directives/thy-show.d.ts +2 -1
- package/shared/option/group/option-group.component.d.ts +2 -1
- package/shared/option/list-option/list-option.component.d.ts +2 -7
- package/shared/option/option.component.d.ts +2 -1
- package/shared/select/select-control/select-control.component.d.ts +7 -6
- package/skeleton/skeleton-circle.component.d.ts +16 -19
- package/skeleton/skeleton-rectangle.component.d.ts +20 -23
- package/skeleton/skeleton.component.d.ts +5 -6
- package/skeleton/stylized/bullet-list.component.d.ts +11 -13
- package/skeleton/stylized/list.component.d.ts +10 -12
- package/skeleton/stylized/paragraph.component.d.ts +12 -14
- package/slide/slide-body/slide-body-section.component.d.ts +2 -1
- package/slider/slider.component.d.ts +17 -24
- package/space/space.component.d.ts +8 -8
- package/statistic/statistic.component.d.ts +35 -40
- package/stepper/step-header.component.d.ts +6 -10
- package/stepper/step.component.d.ts +6 -6
- package/stepper/stepper.component.d.ts +15 -20
- package/switch/switch.component.d.ts +24 -35
- package/table/table-column.component.d.ts +6 -5
- package/table/table-skeleton.component.d.ts +3 -10
- package/table/table.component.d.ts +11 -10
- package/tabs/tab-content.component.d.ts +4 -4
- package/tabs/tab.component.d.ts +4 -5
- package/tabs/tabs.component.d.ts +13 -15
- package/tag/tag.component.d.ts +10 -16
- package/time-picker/time-picker-panel.component.d.ts +3 -2
- package/time-picker/time-picker.component.d.ts +6 -5
- package/timeline/timeline-item.component.d.ts +9 -13
- package/timeline/timeline.component.d.ts +13 -17
- package/tooltip/tooltip.directive.d.ts +3 -2
- package/tree/tree-node.component.d.ts +6 -15
- package/tree/tree.component.d.ts +8 -7
- package/tree-select/tree-select.component.d.ts +8 -7
- package/typography/bg-color.directive.d.ts +3 -3
- package/typography/text/text.component.d.ts +2 -2
- package/typography/text-color.directive.d.ts +3 -3
- package/upload/file-drop.directive.d.ts +9 -11
- package/upload/file-select-base.d.ts +6 -10
- package/upload/file-select.component.d.ts +10 -20
- package/util/helpers/helpers.d.ts +2 -1
- package/vote/vote.component.d.ts +4 -3
- package/watermark/watermark.directive.d.ts +7 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, ViewChild, ContentChild, ChangeDetectionStrategy, Component, ViewEncapsulation, inject, ChangeDetectorRef, ElementRef, QueryList, DestroyRef, output, effect, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import { coerceBooleanProperty, isString } from 'ngx-tethys/util';
|
|
5
5
|
import { fromEvent } from 'rxjs';
|
|
@@ -12,10 +12,24 @@ import { ThyIconModule } from 'ngx-tethys/icon';
|
|
|
12
12
|
* @name thy-tab
|
|
13
13
|
*/
|
|
14
14
|
class ThyTab {
|
|
15
|
-
constructor() {
|
|
15
|
+
constructor() {
|
|
16
|
+
/**
|
|
17
|
+
* 选项标题
|
|
18
|
+
*/
|
|
19
|
+
this.thyTitle = input(undefined);
|
|
20
|
+
/**
|
|
21
|
+
* 选项的唯一标识
|
|
22
|
+
*/
|
|
23
|
+
this.id = input(undefined);
|
|
24
|
+
/**
|
|
25
|
+
* 是否禁用选项
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
29
|
+
}
|
|
16
30
|
ngOnInit() { }
|
|
17
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyTab, isStandalone: true, selector: "thy-tab", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "titleTemplateRef", first: true, predicate: ["title"], descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: ` <ng-template #content><ng-content></ng-content></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19
33
|
}
|
|
20
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, decorators: [{
|
|
21
35
|
type: Component,
|
|
@@ -30,13 +44,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
30
44
|
}], content: [{
|
|
31
45
|
type: ViewChild,
|
|
32
46
|
args: ['content', { static: true }]
|
|
33
|
-
}], thyTitle: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], id: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], thyDisabled: [{
|
|
38
|
-
type: Input,
|
|
39
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
40
47
|
}] } });
|
|
41
48
|
|
|
42
49
|
/**
|
|
@@ -44,14 +51,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
44
51
|
*/
|
|
45
52
|
class ThyTabContent {
|
|
46
53
|
constructor() {
|
|
47
|
-
this.content = null;
|
|
48
|
-
this.active = false;
|
|
49
|
-
this.tabPaneAnimated = true;
|
|
54
|
+
this.content = input(null);
|
|
55
|
+
this.active = input(false, { transform: coerceBooleanProperty });
|
|
56
|
+
this.tabPaneAnimated = input(true, { transform: coerceBooleanProperty });
|
|
50
57
|
}
|
|
51
58
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTabContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
52
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabContent, isStandalone: true, selector: "thy-tab-content, [thyTabContent]", inputs: { content: "content", active: "active", tabPaneAnimated: "tabPaneAnimated" }, host: { properties: { "attr.aria-hidden": "!active", "attr.tabindex": "active ? 0 : -1", "style.visibility": "tabPaneAnimated ? active ? null : \"hidden\" : null", "style.height": "tabPaneAnimated ? active ? null : 0 : null", "style.overflow-y": "tabPaneAnimated ? active ? null : \"none\" : null", "style.display": "!tabPaneAnimated ? active ? null : \"none\" : null" }, classAttribute: "thy-tab-content" }, exportAs: ["thyTabContent"], ngImport: i0, template: `
|
|
53
|
-
@if (active) {
|
|
54
|
-
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabContent, isStandalone: true, selector: "thy-tab-content, [thyTabContent]", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, tabPaneAnimated: { classPropertyName: "tabPaneAnimated", publicName: "tabPaneAnimated", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "!active()", "attr.tabindex": "active() ? 0 : -1", "style.visibility": "tabPaneAnimated() ? active() ? null : \"hidden\" : null", "style.height": "tabPaneAnimated() ? active() ? null : 0 : null", "style.overflow-y": "tabPaneAnimated() ? active() ? null : \"none\" : null", "style.display": "!tabPaneAnimated() ? active() ? null : \"none\" : null" }, classAttribute: "thy-tab-content" }, exportAs: ["thyTabContent"], ngImport: i0, template: `
|
|
60
|
+
@if (active()) {
|
|
61
|
+
<ng-template [ngTemplateOutlet]="content()"></ng-template>
|
|
55
62
|
}
|
|
56
63
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
57
64
|
}
|
|
@@ -64,28 +71,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
64
71
|
encapsulation: ViewEncapsulation.None,
|
|
65
72
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
66
73
|
template: `
|
|
67
|
-
@if (active) {
|
|
68
|
-
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
74
|
+
@if (active()) {
|
|
75
|
+
<ng-template [ngTemplateOutlet]="content()"></ng-template>
|
|
69
76
|
}
|
|
70
77
|
`,
|
|
71
78
|
host: {
|
|
72
79
|
class: 'thy-tab-content',
|
|
73
|
-
'[attr.aria-hidden]': '!active',
|
|
74
|
-
'[attr.tabindex]': 'active ? 0 : -1',
|
|
75
|
-
'[style.visibility]': 'tabPaneAnimated ? active ? null : "hidden" : null',
|
|
76
|
-
'[style.height]': 'tabPaneAnimated ? active ? null : 0 : null',
|
|
77
|
-
'[style.overflow-y]': 'tabPaneAnimated ? active ? null : "none" : null',
|
|
78
|
-
'[style.display]': '!tabPaneAnimated ? active ? null : "none" : null'
|
|
80
|
+
'[attr.aria-hidden]': '!active()',
|
|
81
|
+
'[attr.tabindex]': 'active() ? 0 : -1',
|
|
82
|
+
'[style.visibility]': 'tabPaneAnimated() ? active() ? null : "hidden" : null',
|
|
83
|
+
'[style.height]': 'tabPaneAnimated() ? active() ? null : 0 : null',
|
|
84
|
+
'[style.overflow-y]': 'tabPaneAnimated() ? active() ? null : "none" : null',
|
|
85
|
+
'[style.display]': '!tabPaneAnimated() ? active() ? null : "none" : null'
|
|
79
86
|
},
|
|
80
87
|
imports: [NgTemplateOutlet]
|
|
81
88
|
}]
|
|
82
|
-
}]
|
|
83
|
-
type: Input
|
|
84
|
-
}], active: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], tabPaneAnimated: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}] } });
|
|
89
|
+
}] });
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
92
|
* 选项卡切换组件
|
|
@@ -101,44 +102,50 @@ class ThyTabs {
|
|
|
101
102
|
* 标签类型
|
|
102
103
|
* @type 'pulled' | 'tabs' | 'pills' | 'lite'
|
|
103
104
|
*/
|
|
104
|
-
this.thyType = 'tabs';
|
|
105
|
+
this.thyType = input('tabs');
|
|
105
106
|
/**
|
|
106
107
|
* 选项卡的大小
|
|
107
108
|
* @type 'lg' | 'md' | 'sm'
|
|
108
109
|
*/
|
|
109
|
-
this.thySize = 'md';
|
|
110
|
+
this.thySize = input('md');
|
|
111
|
+
/**
|
|
112
|
+
* 激活的项
|
|
113
|
+
*/
|
|
114
|
+
this.thyActiveTab = input(0);
|
|
115
|
+
/**
|
|
116
|
+
* 附加操作
|
|
117
|
+
*/
|
|
118
|
+
this.thyExtra = input(undefined);
|
|
110
119
|
/**
|
|
111
120
|
* 选项卡的位置
|
|
112
121
|
* @type 'top' | 'left'
|
|
113
122
|
*/
|
|
114
|
-
this.thyPosition = 'top';
|
|
123
|
+
this.thyPosition = input('top');
|
|
115
124
|
/**
|
|
116
125
|
* 是否使用动画切换 Tabs
|
|
117
126
|
*/
|
|
118
|
-
this.thyAnimated = false;
|
|
127
|
+
this.thyAnimated = input(false, { transform: coerceBooleanProperty });
|
|
119
128
|
/**
|
|
120
129
|
* 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框
|
|
121
130
|
*/
|
|
122
|
-
this.thyResponsive = false;
|
|
131
|
+
this.thyResponsive = input(false, { transform: coerceBooleanProperty });
|
|
123
132
|
/**
|
|
124
133
|
* 激活的项发生改变时的回调
|
|
125
134
|
*/
|
|
126
|
-
this.thyActiveTabChange =
|
|
135
|
+
this.thyActiveTabChange = output();
|
|
127
136
|
this.activeTabIndex = 0;
|
|
128
137
|
this.transitionStarted = false;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this.activeTabId = undefined;
|
|
141
|
-
}
|
|
138
|
+
effect(() => {
|
|
139
|
+
const value = this.thyActiveTab();
|
|
140
|
+
if (isString(value)) {
|
|
141
|
+
this.activeTabId = value;
|
|
142
|
+
this.activeTabIndex = undefined;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this.activeTabIndex = value;
|
|
146
|
+
this.activeTabId = undefined;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
142
149
|
}
|
|
143
150
|
ngOnInit() {
|
|
144
151
|
const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');
|
|
@@ -149,23 +156,15 @@ class ThyTabs {
|
|
|
149
156
|
this.cd.markForCheck();
|
|
150
157
|
});
|
|
151
158
|
}
|
|
152
|
-
ngOnChanges(changes) {
|
|
153
|
-
const { thyActiveTab } = changes;
|
|
154
|
-
if (thyActiveTab && !thyActiveTab.firstChange && this.thyAnimated) {
|
|
155
|
-
const index = thyActiveTab?.currentValue?.index || Array.from(this.tabs).findIndex(k => k.id === thyActiveTab?.currentValue.id);
|
|
156
|
-
this.transitionStarted = this.activeTabIndex !== index;
|
|
157
|
-
this.activeTabIndex = index;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
159
|
ngAfterContentInit() {
|
|
161
160
|
this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {
|
|
162
|
-
this.thyAnimated && (this.transitionStarted = true);
|
|
161
|
+
this.thyAnimated() && (this.transitionStarted = true);
|
|
163
162
|
this.activeTabIndex = data.length - 1;
|
|
164
163
|
this.cd.markForCheck();
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
166
|
get tabPaneAnimated() {
|
|
168
|
-
return this.thyPosition === 'top' && this.thyAnimated;
|
|
167
|
+
return this.thyPosition() === 'top' && this.thyAnimated();
|
|
169
168
|
}
|
|
170
169
|
getTabContentMarginLeft() {
|
|
171
170
|
if (this.tabPaneAnimated) {
|
|
@@ -174,47 +173,30 @@ class ThyTabs {
|
|
|
174
173
|
return '';
|
|
175
174
|
}
|
|
176
175
|
activeTab(tab, index) {
|
|
177
|
-
if (tab.thyDisabled) {
|
|
176
|
+
if (tab.thyDisabled()) {
|
|
178
177
|
return;
|
|
179
178
|
}
|
|
180
|
-
this.activeTabId = tab.id || null;
|
|
181
|
-
this.thyAnimated && (this.transitionStarted = this.activeTabIndex !== index);
|
|
179
|
+
this.activeTabId = tab.id() || null;
|
|
180
|
+
this.thyAnimated() && (this.transitionStarted = this.activeTabIndex !== index);
|
|
182
181
|
this.activeTabIndex = index;
|
|
183
|
-
const
|
|
182
|
+
const id = tab.id();
|
|
183
|
+
const activeTab = id ? id : index;
|
|
184
184
|
this.thyActiveTabChange.emit(activeTab);
|
|
185
185
|
}
|
|
186
186
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabs, isStandalone: true, selector: "thy-tabs", inputs: { thyType: "thyType", thySize: "thySize", thyActiveTab: "thyActiveTab", thyExtra: "thyExtra", thyPosition: "thyPosition", thyAnimated:
|
|
187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabs, isStandalone: true, selector: "thy-tabs", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyActiveTab: { classPropertyName: "thyActiveTab", publicName: "thyActiveTab", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null }, thyPosition: { classPropertyName: "thyPosition", publicName: "thyPosition", isSignal: true, isRequired: false, transformFunction: null }, thyAnimated: { classPropertyName: "thyAnimated", publicName: "thyAnimated", isSignal: true, isRequired: false, transformFunction: null }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyActiveTabChange: "thyActiveTabChange" }, host: { properties: { "class.thy-tabs-top": "thyPosition() === 'top'", "class.thy-tabs-left": "thyPosition() === 'left'", "style.overflow": "transitionStarted ? \"hidden\" : null" }, classAttribute: "thy-tabs" }, queries: [{ propertyName: "tabs", predicate: ThyTab, descendants: true }], ngImport: i0, template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyPauseReCalculate", "thyInsideClosable", "thyPopoverOptions", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyTabContent, selector: "thy-tab-content, [thyTabContent]", inputs: ["content", "active", "tabPaneAnimated"], exportAs: ["thyTabContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
188
188
|
}
|
|
189
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTabs, decorators: [{
|
|
190
190
|
type: Component,
|
|
191
191
|
args: [{ selector: 'thy-tabs', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
192
192
|
class: 'thy-tabs',
|
|
193
|
-
'[class.thy-tabs-top]': `thyPosition === 'top'`,
|
|
194
|
-
'[class.thy-tabs-left]': `thyPosition === 'left'`,
|
|
193
|
+
'[class.thy-tabs-top]': `thyPosition() === 'top'`,
|
|
194
|
+
'[class.thy-tabs-left]': `thyPosition() === 'left'`,
|
|
195
195
|
'[style.overflow]': `transitionStarted ? "hidden" : null`
|
|
196
|
-
}, imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent], template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n" }]
|
|
197
|
-
}], propDecorators: { tabs: [{
|
|
196
|
+
}, imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent], template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n" }]
|
|
197
|
+
}], ctorParameters: () => [], propDecorators: { tabs: [{
|
|
198
198
|
type: ContentChildren,
|
|
199
199
|
args: [ThyTab, { descendants: true }]
|
|
200
|
-
}], thyType: [{
|
|
201
|
-
type: Input
|
|
202
|
-
}], thySize: [{
|
|
203
|
-
type: Input
|
|
204
|
-
}], thyActiveTab: [{
|
|
205
|
-
type: Input
|
|
206
|
-
}], thyExtra: [{
|
|
207
|
-
type: Input
|
|
208
|
-
}], thyPosition: [{
|
|
209
|
-
type: Input
|
|
210
|
-
}], thyAnimated: [{
|
|
211
|
-
type: Input,
|
|
212
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
213
|
-
}], thyResponsive: [{
|
|
214
|
-
type: Input,
|
|
215
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
216
|
-
}], thyActiveTabChange: [{
|
|
217
|
-
type: Output
|
|
218
200
|
}] } });
|
|
219
201
|
|
|
220
202
|
class ThyTabsModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab.component.ts","../../../src/tabs/tab-content.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy, Input, ViewChild, TemplateRef, ContentChild } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n @Input() thyTitle: string;\n\n /**\n * 选项的唯一标识\n */\n @Input() id: string;\n\n /**\n * 是否禁用选项\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active',\n '[attr.tabindex]': 'active ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated ? active ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated ? active ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated ? active ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated ? active ? null : \"none\" : null'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n @Input() content: TemplateRef<void> | null = null;\n\n @Input() active = false;\n\n @Input() tabPaneAnimated = true;\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n inject\n} from '@angular/core';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo, ThyTabActiveEvent } from './types';\nimport { ThyTabContent } from './tab-content.component';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition === 'top'`,\n '[class.thy-tabs-left]': `thyPosition === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, OnChanges, AfterContentInit {\n private cd = inject(ChangeDetectorRef);\n private el = inject(ElementRef);\n\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n @Input() thyType: ThyTabsType = 'tabs';\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n @Input() thySize: ThyTabsSize = 'md';\n\n /**\n * 激活的项\n */\n @Input()\n set thyActiveTab(value: ThyActiveTabInfo) {\n if (isString(value)) {\n this.activeTabId = value;\n this.activeTabIndex = undefined;\n } else {\n this.activeTabIndex = value;\n this.activeTabId = undefined;\n }\n }\n\n /**\n * 附加操作\n */\n @Input() thyExtra: TemplateRef<unknown>;\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n @Input() thyPosition: ThyTabsPosition = 'top';\n\n /**\n * 是否使用动画切换 Tabs\n */\n @Input({ transform: coerceBooleanProperty }) thyAnimated: boolean = false;\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n @Input({ transform: coerceBooleanProperty }) thyResponsive: boolean = false;\n\n /**\n * 激活的项发生改变时的回调\n */\n @Output() thyActiveTabChange: EventEmitter<ThyTabActiveEvent> = new EventEmitter<ThyTabActiveEvent>();\n\n activeTabIndex: number = 0;\n\n activeTabId: string;\n\n transitionStarted: boolean = false;\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyActiveTab } = changes;\n if (thyActiveTab && !thyActiveTab.firstChange && this.thyAnimated) {\n const index = thyActiveTab?.currentValue?.index || Array.from(this.tabs).findIndex(k => k.id === thyActiveTab?.currentValue.id);\n this.transitionStarted = this.activeTabIndex !== index;\n this.activeTabIndex = index;\n }\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated && (this.transitionStarted = true);\n this.activeTabIndex = data.length - 1;\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition === 'top' && this.thyAnimated;\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled) {\n return;\n }\n this.activeTabId = tab.id || null;\n this.thyAnimated && (this.transitionStarted = this.activeTabIndex !== index);\n this.activeTabIndex = index;\n const activeTab = tab.id ? tab.id : index;\n this.thyActiveTabChange.emit(activeTab);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyT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C,kBAAkB,EAAA,CAAA;sBAA3B;;;ME/FQ,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CACzE,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,MAAM,CAAA,EAAA,CAAA,CAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHZ,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAGnD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab.component.ts","../../../src/tabs/tab-content.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy, ViewChild, TemplateRef, ContentChild, input } from '@angular/core';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n readonly thyTitle = input<string>(undefined);\n\n /**\n * 选项的唯一标识\n */\n readonly id = input<string>(undefined);\n\n /**\n * 是否禁用选项\n * @default false\n */\n readonly thyDisabled = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, input } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active()) {\n <ng-template [ngTemplateOutlet]=\"content()\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active()',\n '[attr.tabindex]': 'active() ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated() ? active() ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated() ? active() ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated() ? active() ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated() ? active() ? null : \"none\" : null'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n readonly content = input<TemplateRef<void> | null>(null);\n\n readonly active = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n readonly tabPaneAnimated = input<boolean, ThyBooleanInput>(true, { transform: coerceBooleanProperty });\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n OnInit,\n QueryList,\n TemplateRef,\n effect,\n inject,\n input,\n output\n} from '@angular/core';\nimport { coerceBooleanProperty, isString, ThyBooleanInput } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo, ThyTabActiveEvent } from './types';\nimport { ThyTabContent } from './tab-content.component';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition() === 'top'`,\n '[class.thy-tabs-left]': `thyPosition() === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, AfterContentInit {\n private cd = inject(ChangeDetectorRef);\n private el = inject(ElementRef);\n\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n readonly thyType = input<ThyTabsType>('tabs');\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n readonly thySize = input<ThyTabsSize>('md');\n\n /**\n * 激活的项\n */\n readonly thyActiveTab = input<ThyActiveTabInfo>(0);\n\n /**\n * 附加操作\n */\n readonly thyExtra = input<TemplateRef<unknown>>(undefined);\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n readonly thyPosition = input<ThyTabsPosition>('top');\n\n /**\n * 是否使用动画切换 Tabs\n */\n readonly thyAnimated = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n readonly thyResponsive = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n /**\n * 激活的项发生改变时的回调\n */\n readonly thyActiveTabChange = output<ThyTabActiveEvent>();\n\n activeTabIndex: number = 0;\n\n activeTabId: string;\n\n transitionStarted: boolean = false;\n\n constructor() {\n effect(() => {\n const value = this.thyActiveTab();\n if (isString(value)) {\n this.activeTabId = value;\n this.activeTabIndex = undefined;\n } else {\n this.activeTabIndex = value;\n this.activeTabId = undefined;\n }\n });\n }\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated() && (this.transitionStarted = true);\n this.activeTabIndex = data.length - 1;\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition() === 'top' && this.thyAnimated();\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled()) {\n return;\n }\n this.activeTabId = tab.id() || null;\n this.thyAnimated() && (this.transitionStarted = this.activeTabIndex !== index);\n this.activeTabIndex = index;\n const id = tab.id();\n const activeTab = id ? id : index;\n this.thyActiveTabChange.emit(activeTab);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyTabs, ThyTab]\n})\nexport class ThyTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;AAG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,EAAA,IAAA,EAAA,aAAa,YAHZ,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAGnD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef,
|
|
2
|
+
import { inject, ElementRef, input, computed, effect, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { isThemeColor } from 'ngx-tethys/core';
|
|
5
|
-
import { hexToRgb, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
6
4
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
5
|
+
import { isThemeColor } from 'ngx-tethys/core';
|
|
6
|
+
import { coerceBooleanProperty, hexToRgb } from 'ngx-tethys/util';
|
|
7
7
|
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -13,102 +13,80 @@ import { ThyIconModule } from 'ngx-tethys/icon';
|
|
|
13
13
|
class ThyTag {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.elementRef = inject(ElementRef);
|
|
16
|
-
this.color = 'default';
|
|
17
16
|
this.hostRenderer = useHostRenderer();
|
|
17
|
+
/**
|
|
18
|
+
* 标签颜色,thyColor 的简写
|
|
19
|
+
* @type primary | success | info | warning | danger | default | light | string
|
|
20
|
+
* @default default
|
|
21
|
+
*/
|
|
22
|
+
this.thyTag = input('');
|
|
18
23
|
/**
|
|
19
24
|
* 标签形状
|
|
20
25
|
* @type pill | rectangle
|
|
21
26
|
*/
|
|
22
|
-
this.thyShape = 'rectangle';
|
|
27
|
+
this.thyShape = input('rectangle');
|
|
28
|
+
/**
|
|
29
|
+
* 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger
|
|
30
|
+
*/
|
|
31
|
+
this.thyColor = input('');
|
|
23
32
|
/**
|
|
24
33
|
* 标签主题,fill 为颜色填充,outline 为线框,weak-fill 为背景色0.1透明度效果
|
|
25
34
|
* @type outline | fill | weak-fill
|
|
26
35
|
*/
|
|
27
|
-
this.thyTheme = 'fill';
|
|
36
|
+
this.thyTheme = input('fill');
|
|
28
37
|
/**
|
|
29
38
|
* 标签大小
|
|
30
39
|
* @type sm | md | lg
|
|
31
40
|
*/
|
|
32
|
-
this.thySize = 'md';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (value) {
|
|
41
|
-
this.color = value;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger
|
|
46
|
-
*/
|
|
47
|
-
set thyColor(color) {
|
|
48
|
-
this.color = color;
|
|
49
|
-
}
|
|
50
|
-
ngOnInit() {
|
|
51
|
-
this.setColor();
|
|
52
|
-
}
|
|
53
|
-
ngOnChanges(changes) {
|
|
54
|
-
if (changes.thyColor && changes.thyColor.currentValue && !changes.thyColor.firstChange) {
|
|
55
|
-
this.setColor();
|
|
56
|
-
}
|
|
57
|
-
if (changes.thyTheme && changes.thyTheme.currentValue && !changes.thyTheme.firstChange) {
|
|
41
|
+
this.thySize = input('md');
|
|
42
|
+
/**
|
|
43
|
+
* 可 Hover 悬停的标签,设置为 true 时会有一个 Hover 效果
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
this.thyHoverable = input(false, { transform: coerceBooleanProperty });
|
|
47
|
+
this.color = computed(() => this.thyColor() || this.thyTag() || 'default');
|
|
48
|
+
effect(() => {
|
|
58
49
|
this.setColor();
|
|
59
|
-
}
|
|
50
|
+
});
|
|
60
51
|
}
|
|
61
52
|
setColor() {
|
|
62
53
|
this.elementRef.nativeElement.style.removeProperty('background-color');
|
|
63
54
|
this.elementRef.nativeElement.style.removeProperty('border-color');
|
|
64
55
|
this.elementRef.nativeElement.style.removeProperty('color');
|
|
65
56
|
this.hostRenderer.updateClass([]);
|
|
66
|
-
if (isThemeColor(this.color)) {
|
|
67
|
-
this.hostRenderer.updateClass([`thy-tag-${this.thyTheme === 'fill' ? '' : this.thyTheme + '-'}${this.color}`]);
|
|
57
|
+
if (isThemeColor(this.color())) {
|
|
58
|
+
this.hostRenderer.updateClass([`thy-tag-${this.thyTheme() === 'fill' ? '' : this.thyTheme() + '-'}${this.color()}`]);
|
|
68
59
|
}
|
|
69
60
|
else {
|
|
70
|
-
if (this.thyTheme === 'fill') {
|
|
71
|
-
this.elementRef.nativeElement.style.backgroundColor = this.color;
|
|
61
|
+
if (this.thyTheme() === 'fill') {
|
|
62
|
+
this.elementRef.nativeElement.style.backgroundColor = this.color();
|
|
72
63
|
}
|
|
73
|
-
else if (this.thyTheme === 'outline') {
|
|
74
|
-
this.elementRef.nativeElement.style.color = this.color;
|
|
75
|
-
this.elementRef.nativeElement.style['border-color'] = this.color;
|
|
64
|
+
else if (this.thyTheme() === 'outline') {
|
|
65
|
+
this.elementRef.nativeElement.style.color = this.color();
|
|
66
|
+
this.elementRef.nativeElement.style['border-color'] = this.color();
|
|
76
67
|
}
|
|
77
68
|
else {
|
|
78
|
-
this.elementRef.nativeElement.style.backgroundColor = hexToRgb(this.color, 0.1);
|
|
79
|
-
this.elementRef.nativeElement.style.color = this.color;
|
|
69
|
+
this.elementRef.nativeElement.style.backgroundColor = hexToRgb(this.color(), 0.1);
|
|
70
|
+
this.elementRef.nativeElement.style.color = this.color();
|
|
80
71
|
}
|
|
81
72
|
}
|
|
82
73
|
}
|
|
83
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyTag, isStandalone: true, selector: "thy-tag,[thyTag]", inputs: { thyTag: { classPropertyName: "thyTag", publicName: "thyTag", isSignal: true, isRequired: false, transformFunction: null }, thyShape: { classPropertyName: "thyShape", publicName: "thyShape", isSignal: true, isRequired: false, transformFunction: null }, thyColor: { classPropertyName: "thyColor", publicName: "thyColor", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyHoverable: { classPropertyName: "thyHoverable", publicName: "thyHoverable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-tag-pill": "thyShape() === \"pill\"", "class.thy-tag-outline": "thyTheme() === \"outline\"", "class.thy-tag-hover": "thyHoverable()", "class.thy-tag-md": "thySize() === \"md\"", "class.thy-tag-sm": "thySize() === \"sm\"", "class.thy-tag-xs": "thySize() === \"xs\"", "class.thy-tag-lg": "thySize() === \"lg\"" }, classAttribute: "thy-tag" }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
85
76
|
}
|
|
86
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTag, decorators: [{
|
|
87
78
|
type: Component,
|
|
88
79
|
args: [{ selector: 'thy-tag,[thyTag]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
89
80
|
class: 'thy-tag',
|
|
90
|
-
'[class.thy-tag-pill]': 'thyShape === "pill"',
|
|
91
|
-
'[class.thy-tag-outline]': 'thyTheme === "outline"',
|
|
92
|
-
'[class.thy-tag-hover]': 'thyHoverable',
|
|
93
|
-
'[class.thy-tag-md]': 'thySize === "md"',
|
|
94
|
-
'[class.thy-tag-sm]': 'thySize === "sm"',
|
|
95
|
-
'[class.thy-tag-xs]': 'thySize === "xs"',
|
|
96
|
-
'[class.thy-tag-lg]': 'thySize === "lg"'
|
|
81
|
+
'[class.thy-tag-pill]': 'thyShape() === "pill"',
|
|
82
|
+
'[class.thy-tag-outline]': 'thyTheme() === "outline"',
|
|
83
|
+
'[class.thy-tag-hover]': 'thyHoverable()',
|
|
84
|
+
'[class.thy-tag-md]': 'thySize() === "md"',
|
|
85
|
+
'[class.thy-tag-sm]': 'thySize() === "sm"',
|
|
86
|
+
'[class.thy-tag-xs]': 'thySize() === "xs"',
|
|
87
|
+
'[class.thy-tag-lg]': 'thySize() === "lg"'
|
|
97
88
|
}, template: "<ng-content></ng-content>\n" }]
|
|
98
|
-
}],
|
|
99
|
-
type: Input
|
|
100
|
-
}], thyShape: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], thyColor: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}], thyTheme: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}], thySize: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], thyHoverable: [{
|
|
109
|
-
type: Input,
|
|
110
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
111
|
-
}] } });
|
|
89
|
+
}], ctorParameters: () => [] });
|
|
112
90
|
|
|
113
91
|
/**
|
|
114
92
|
* @name thy-tags
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-tag.mjs","sources":["../../../src/tag/tag.component.ts","../../../src/tag/tag.component.html","../../../src/tag/tags.component.ts","../../../src/tag/tag.module.ts","../../../src/tag/ngx-tethys-tag.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ngx-tethys-tag.mjs","sources":["../../../src/tag/tag.component.ts","../../../src/tag/tag.component.html","../../../src/tag/tags.component.ts","../../../src/tag/tag.module.ts","../../../src/tag/ngx-tethys-tag.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input } from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { isThemeColor, ThyThemeColor } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, hexToRgb } from 'ngx-tethys/util';\n\nexport type ThyTagColor = ThyThemeColor | string;\n\nexport type ThyTagShape = 'pill' | 'rectangle';\n\nexport type ThyTagSize = 'sm' | 'md' | 'lg';\n\n/**\n * 标签组件\n * @name thy-tag,[thyTag]\n */\n@Component({\n selector: 'thy-tag,[thyTag]',\n templateUrl: './tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tag',\n '[class.thy-tag-pill]': 'thyShape() === \"pill\"',\n '[class.thy-tag-outline]': 'thyTheme() === \"outline\"',\n '[class.thy-tag-hover]': 'thyHoverable()',\n '[class.thy-tag-md]': 'thySize() === \"md\"',\n '[class.thy-tag-sm]': 'thySize() === \"sm\"',\n '[class.thy-tag-xs]': 'thySize() === \"xs\"',\n '[class.thy-tag-lg]': 'thySize() === \"lg\"'\n }\n})\nexport class ThyTag {\n private elementRef = inject(ElementRef);\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 标签颜色,thyColor 的简写\n * @type primary | success | info | warning | danger | default | light | string\n * @default default\n */\n readonly thyTag = input<ThyTagColor>('');\n\n /**\n * 标签形状\n * @type pill | rectangle\n */\n readonly thyShape = input<ThyTagShape>('rectangle');\n\n /**\n * 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger\n */\n readonly thyColor = input<ThyTagColor>('');\n\n /**\n * 标签主题,fill 为颜色填充,outline 为线框,weak-fill 为背景色0.1透明度效果\n * @type outline | fill | weak-fill\n */\n readonly thyTheme = input<'outline' | 'fill' | 'weak-fill'>('fill');\n\n /**\n * 标签大小\n * @type sm | md | lg\n */\n readonly thySize = input<ThyTagSize>('md');\n\n /**\n * 可 Hover 悬停的标签,设置为 true 时会有一个 Hover 效果\n * @default false\n */\n readonly thyHoverable = input(false, { transform: coerceBooleanProperty });\n\n protected readonly color = computed(() => this.thyColor() || this.thyTag() || 'default');\n\n constructor() {\n effect(() => {\n this.setColor();\n });\n }\n\n private setColor(): void {\n this.elementRef.nativeElement.style.removeProperty('background-color');\n this.elementRef.nativeElement.style.removeProperty('border-color');\n this.elementRef.nativeElement.style.removeProperty('color');\n this.hostRenderer.updateClass([]);\n\n if (isThemeColor(this.color())) {\n this.hostRenderer.updateClass([`thy-tag-${this.thyTheme() === 'fill' ? '' : this.thyTheme() + '-'}${this.color()}`]);\n } else {\n if (this.thyTheme() === 'fill') {\n this.elementRef.nativeElement.style.backgroundColor = this.color();\n } else if (this.thyTheme() === 'outline') {\n this.elementRef.nativeElement.style.color = this.color();\n this.elementRef.nativeElement.style['border-color'] = this.color();\n } else {\n this.elementRef.nativeElement.style.backgroundColor = hexToRgb(this.color(), 0.1);\n this.elementRef.nativeElement.style.color = this.color();\n }\n }\n }\n}\n","<ng-content></ng-content>\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * @name thy-tags\n */\n@Component({\n selector: 'thy-tags',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tags'\n }\n})\nexport class ThyTags implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTag } from './tag.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTags } from './tags.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTag, ThyTags],\n exports: [ThyTag, ThyTags]\n})\nexport class ThyTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;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