@piying-lib/angular-daisyui 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension/index.d.ts +163 -11
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs +446 -29
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs.map +1 -1
- package/fesm2022/{piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs → piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs} +2 -1
- package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs.map +1 -0
- package/fesm2022/piying-lib-angular-daisyui-field-control.mjs +218 -17
- package/fesm2022/piying-lib-angular-daisyui-field-control.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs +113 -27
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs +147 -9
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-service.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs +47 -4
- package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs.map +1 -1
- package/field-control/index.d.ts +162 -10
- package/field-group/index.d.ts +97 -13
- package/non-field-control/index.d.ts +150 -0
- package/package.json +2 -2
- package/preset-css/css/style.css +1 -1
- package/preset-css/css/style.split.css +1 -1
- package/preset-css/json/manifest.json +747 -851
- package/preset-css/ts/accordion.ts +9 -9
- package/preset-css/ts/alert.ts +12 -12
- package/preset-css/ts/avatar.ts +7 -7
- package/preset-css/ts/badge.ts +20 -20
- package/preset-css/ts/breadcrumbs.ts +1 -3
- package/preset-css/ts/browser-mockup.ts +1 -4
- package/preset-css/ts/button.ts +27 -27
- package/preset-css/ts/calendar.ts +1 -5
- package/preset-css/ts/card.ts +15 -15
- package/preset-css/ts/carousel.ts +9 -9
- package/preset-css/ts/chat-bubble.ts +17 -17
- package/preset-css/ts/checkbox.ts +16 -16
- package/preset-css/ts/code-mockup.ts +1 -3
- package/preset-css/ts/collapse.ts +9 -9
- package/preset-css/ts/countdown.ts +1 -3
- package/preset-css/ts/diff.ts +1 -6
- package/preset-css/ts/divider.ts +15 -15
- package/preset-css/ts/dock.ts +10 -10
- package/preset-css/ts/drawer-sidebar.ts +11 -11
- package/preset-css/ts/dropdown.ts +14 -14
- package/preset-css/ts/fab-speed-dial.ts +1 -6
- package/preset-css/ts/fieldset.ts +1 -5
- package/preset-css/ts/file-input.ts +17 -17
- package/preset-css/ts/filter.ts +1 -4
- package/preset-css/ts/footer.ts +7 -7
- package/preset-css/ts/hero.ts +1 -5
- package/preset-css/ts/hover-3-d-card.ts +1 -3
- package/preset-css/ts/hover-gallery.ts +1 -3
- package/preset-css/ts/index.ts +1 -1
- package/preset-css/ts/indicator.ts +10 -10
- package/preset-css/ts/join-group-items.ts +6 -6
- package/preset-css/ts/kbd.ts +1 -8
- package/preset-css/ts/label.ts +1 -4
- package/preset-css/ts/link.ts +12 -12
- package/preset-css/ts/list.ts +1 -6
- package/preset-css/ts/loading.ts +14 -14
- package/preset-css/ts/mask.ts +20 -20
- package/preset-css/ts/menu.ts +17 -17
- package/preset-css/ts/modal.ts +13 -13
- package/preset-css/ts/navbar.ts +1 -6
- package/preset-css/ts/pagination.ts +1 -6
- package/preset-css/ts/phone-mockup.ts +5 -5
- package/preset-css/ts/progress.ts +11 -11
- package/preset-css/ts/radial-progress.ts +1 -3
- package/preset-css/ts/radio.ts +16 -16
- package/preset-css/ts/range-slider.ts +16 -16
- package/preset-css/ts/rating.ts +10 -10
- package/preset-css/ts/select.ts +17 -17
- package/preset-css/ts/skeleton.ts +1 -4
- package/preset-css/ts/stack.ts +1 -7
- package/preset-css/ts/stat.ts +11 -11
- package/preset-css/ts/status.ts +16 -16
- package/preset-css/ts/steps.ts +15 -15
- package/preset-css/ts/swap.ts +9 -9
- package/preset-css/ts/table.ts +11 -11
- package/preset-css/ts/tabs.ts +17 -17
- package/preset-css/ts/text-input.ts +17 -17
- package/preset-css/ts/text-rotate.ts +1 -3
- package/preset-css/ts/textarea.ts +17 -17
- package/preset-css/ts/theme-controller.ts +1 -3
- package/preset-css/ts/timeline.ts +11 -11
- package/preset-css/ts/toast.ts +9 -9
- package/preset-css/ts/toggle.ts +16 -16
- package/preset-css/ts/tooltip.ts +17 -17
- package/preset-css/ts/validator.ts +1 -4
- package/preset-css/ts/window-mockup.ts +1 -3
- package/service/index.d.ts +1 -1
- package/wrapper/index.d.ts +23 -2
- package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs.map +0 -1
|
@@ -11,13 +11,22 @@ import { CssPrefixPipe, MergeClassPipe, TwPrefixPipe } from '@piying-lib/angular
|
|
|
11
11
|
import { PurePipe } from '@cyia/ngx-common/pipe';
|
|
12
12
|
import { FormsModule } from '@angular/forms';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* 警告提示组件
|
|
16
|
+
* 用于显示重要的提示信息,支持多种样式、颜色和布局方向
|
|
17
|
+
* 常用于操作反馈、错误提示、成功通知等场景
|
|
18
|
+
*/
|
|
14
19
|
class AlertNFCC {
|
|
15
20
|
static __version = 2;
|
|
16
21
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
17
22
|
templateRef = viewChild.required('templateRef');
|
|
23
|
+
/** 样式风格 */
|
|
18
24
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
25
|
+
/** 颜色主题 */
|
|
19
26
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
27
|
+
/** 方向 */
|
|
20
28
|
direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
|
|
29
|
+
/** 内容 */
|
|
21
30
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
22
31
|
#theme = inject(ThemeService);
|
|
23
32
|
wrapperClass$ = computed(() => {
|
|
@@ -31,13 +40,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
31
40
|
args: [{ selector: 'app-alert', imports: [AttributesDirective, NgClass, SelectorlessOutlet], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div role=\"alert\" [attributes]=\"attr()\" [ngClass]=\"wrapperClass$()\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </div>\n</ng-template>\n" }]
|
|
32
41
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
33
42
|
|
|
43
|
+
/**
|
|
44
|
+
* 头像组件
|
|
45
|
+
* 用于显示用户头像、图标或占位符,支持在线/离线状态指示
|
|
46
|
+
* 可用于个人资料、列表项、评论等场景
|
|
47
|
+
*/
|
|
34
48
|
class AvatarNFCC {
|
|
35
49
|
static __version = 2;
|
|
36
50
|
templateRef = viewChild.required('templateRef');
|
|
51
|
+
/** 占位符文本或内容 */
|
|
37
52
|
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
53
|
+
/** 占位符 CSS 类名 */
|
|
38
54
|
placeholderClass = input('', ...(ngDevMode ? [{ debugName: "placeholderClass" }] : []));
|
|
55
|
+
/** 图片 URL */
|
|
39
56
|
imgUrl = input(...(ngDevMode ? [undefined, { debugName: "imgUrl" }] : []));
|
|
57
|
+
/** 包装器 CSS 类名 */
|
|
40
58
|
wrapperClass = input('w-24 rounded', ...(ngDevMode ? [{ debugName: "wrapperClass" }] : []));
|
|
59
|
+
/** 状态指示 */
|
|
41
60
|
status = input(...(ngDevMode ? [undefined, { debugName: "status" }] : []));
|
|
42
61
|
#theme = inject(ThemeService);
|
|
43
62
|
mainClass$$ = computed(() => {
|
|
@@ -51,13 +70,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
51
70
|
args: [{ selector: 'app-avatar', imports: [AttributesDirective, NgClass], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div [attributes]=\"attr()\" [ngClass]=\"mainClass$$()\">\n <div [class]=\"wrapperClass()\">\n @if (imgUrl()) {\n <img [src]=\"imgUrl()\" />\n } @else {\n <span [class]=\"placeholderClass()\">{{ placeholder() }}</span>\n }\n </div>\n </div>\n</ng-template>\n" }]
|
|
52
71
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], placeholderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderClass", required: false }] }], imgUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgUrl", required: false }] }], wrapperClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperClass", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
53
72
|
|
|
73
|
+
/**
|
|
74
|
+
* 徽章组件
|
|
75
|
+
* 用于显示数量标签、状态标记或重要提示,如未读消息数、通知提示等
|
|
76
|
+
* 支持多种样式风格和颜色尺寸配置
|
|
77
|
+
*/
|
|
54
78
|
class BadgeNFCC {
|
|
55
79
|
static __version = 2;
|
|
56
80
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
57
81
|
templateRef = viewChild.required('templateRef');
|
|
82
|
+
/** 样式风格 */
|
|
58
83
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
84
|
+
/** 颜色主题 */
|
|
59
85
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
86
|
+
/** 尺寸大小 */
|
|
60
87
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
88
|
+
/** 内容 */
|
|
61
89
|
content = input('Badge', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
62
90
|
#theme = inject(ThemeService);
|
|
63
91
|
wrapperClass$ = computed(() => {
|
|
@@ -71,10 +99,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
71
99
|
args: [{ selector: 'app-badge', imports: [AttributesDirective, NgClass, SelectorlessOutlet, EventsDirective], template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n <span [attributes]=\"attr()\" [ngClass]=\"wrapperClass$()\" [events]=\"events()\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></span>\n</ng-template>\n" }]
|
|
72
100
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
73
101
|
|
|
102
|
+
/**
|
|
103
|
+
* 面包屑导航组件
|
|
104
|
+
* 用于显示页面层级结构和当前位置,帮助用户了解所处位置并快速返回上级页面
|
|
105
|
+
* 支持自定义标签、图标和 URL 配置
|
|
106
|
+
*/
|
|
74
107
|
class BreadcrumbsNFCC {
|
|
75
108
|
static __version = 2;
|
|
76
109
|
templateRef = viewChild.required('templateRef');
|
|
110
|
+
/** 面包屑选项列表 */
|
|
77
111
|
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
112
|
+
/** 选项 CSS 类名 */
|
|
78
113
|
optionClass = input(...(ngDevMode ? [undefined, { debugName: "optionClass" }] : []));
|
|
79
114
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: BreadcrumbsNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
115
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: BreadcrumbsNFCC, isStandalone: true, selector: "app-breadcrumbs", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionClass: { classPropertyName: "optionClass", publicName: "optionClass", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #displayTemp let-item>\n @if (item.icon) {\n <mat-icon\n [inline]=\"item.icon.inline\"\n [fontIcon]=\"item.icon.fontIcon\"\n [fontSet]=\"item.icon.fontSet\"\n [svgIcon]=\"item.icon.svgIcon\"\n ></mat-icon>\n }\n @if (item.label) {\n <span>{{ item.label }}</span>\n }\n @if (item.templateRef) {\n <ng-container *ngTemplateOutlet=\"item.templateRef; context: { $implicit: item }\"></ng-container>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: ('breadcrumbs' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <ul>\n @for (item of options(); track $index) {\n <li [class]=\"optionClass()\">\n @if (item.url && item.extraLink) {\n <a [href]=\"item.url\" class=\"{{ 'link' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n </a>\n } @else if (item.url) {\n <a\n [routerLink]=\"item.url\"\n routerLinkActive=\"{{ 'breadcrumbs-item-activate' | cssPrefix }}\"\n class=\"{{ 'link' | cssPrefix }}\"\n >\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container\n ></a>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n }\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
|
|
@@ -92,18 +127,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
92
127
|
], template: "<ng-template #displayTemp let-item>\n @if (item.icon) {\n <mat-icon\n [inline]=\"item.icon.inline\"\n [fontIcon]=\"item.icon.fontIcon\"\n [fontSet]=\"item.icon.fontSet\"\n [svgIcon]=\"item.icon.svgIcon\"\n ></mat-icon>\n }\n @if (item.label) {\n <span>{{ item.label }}</span>\n }\n @if (item.templateRef) {\n <ng-container *ngTemplateOutlet=\"item.templateRef; context: { $implicit: item }\"></ng-container>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: ('breadcrumbs' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <ul>\n @for (item of options(); track $index) {\n <li [class]=\"optionClass()\">\n @if (item.url && item.extraLink) {\n <a [href]=\"item.url\" class=\"{{ 'link' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n </a>\n } @else if (item.url) {\n <a\n [routerLink]=\"item.url\"\n routerLinkActive=\"{{ 'breadcrumbs-item-activate' | cssPrefix }}\"\n class=\"{{ 'link' | cssPrefix }}\"\n >\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container\n ></a>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n }\n </li>\n }\n </ul>\n </div>\n</ng-template>\n" }]
|
|
93
128
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionClass", required: false }] }] } });
|
|
94
129
|
|
|
130
|
+
/**
|
|
131
|
+
* 按钮组件
|
|
132
|
+
* 用于触发操作或提交表单,是最常用的操作控件
|
|
133
|
+
* 支持多种颜色、样式、尺寸、形状以及加载状态
|
|
134
|
+
*/
|
|
95
135
|
class ButtonNFCC {
|
|
96
136
|
static __version = 2;
|
|
97
137
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
98
138
|
templateRef = viewChild.required('templateRef');
|
|
139
|
+
/** 颜色主题 */
|
|
99
140
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
141
|
+
/** 按钮样式风格 */
|
|
100
142
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
143
|
+
/** 尺寸大小 */
|
|
101
144
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
145
|
+
/** 形状 */
|
|
102
146
|
shape = input(...(ngDevMode ? [undefined, { debugName: "shape" }] : []));
|
|
147
|
+
/** 是否激活状态 */
|
|
103
148
|
active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : []));
|
|
149
|
+
/** 按钮内容 */
|
|
104
150
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
151
|
+
/** 点击事件处理函数 */
|
|
105
152
|
clicked = input(...(ngDevMode ? [undefined, { debugName: "clicked" }] : []));
|
|
153
|
+
/** 是否禁用 */
|
|
106
154
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
155
|
+
/** 是否禁用加载图标 */
|
|
107
156
|
disableLoadingIcon = input(false, ...(ngDevMode ? [{ debugName: "disableLoadingIcon" }] : []));
|
|
108
157
|
isLoading$ = signal(false, ...(ngDevMode ? [{ debugName: "isLoading$" }] : []));
|
|
109
158
|
async onClick(event) {
|
|
@@ -123,26 +172,28 @@ class ButtonNFCC {
|
|
|
123
172
|
return this.#theme.setClass(this.#theme.addPrefix('btn'), this.#theme.setColor('btn', this.color()), this.#theme.setSize('btn', this.size()), this.style() ? this.#theme.addPrefix(`btn-${this.style()}`) : undefined, this.shape() ? this.#theme.addPrefix(`btn-${this.shape()}`) : undefined, this.active() ? this.#theme.addPrefix(`btn-active`) : undefined);
|
|
124
173
|
}, ...(ngDevMode ? [{ debugName: "wrapperClass$" }] : []));
|
|
125
174
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ButtonNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ButtonNFCC, isStandalone: true, selector: "app-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, clicked: { classPropertyName: "clicked", publicName: "clicked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableLoadingIcon: { classPropertyName: "disableLoadingIcon", publicName: "disableLoadingIcon", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n @let forAttr = attr()?.for;\n @let isDisabled = isLoading$() || disabled();\n @if (forAttr) {\n <label\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"\n attr()?.class\n | mergeClass: wrapperClass$() : (isDisabled ? ('btn-disabled' | cssPrefix) : undefined)\n \"\n (click)=\"onClick($event)\"\n
|
|
175
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ButtonNFCC, isStandalone: true, selector: "app-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, clicked: { classPropertyName: "clicked", publicName: "clicked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableLoadingIcon: { classPropertyName: "disableLoadingIcon", publicName: "disableLoadingIcon", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n @let forAttr = attr()?.for;\n @let isDisabled = isLoading$() || disabled();\n @if (forAttr) {\n <label\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"\n attr()?.class\n | mergeClass: wrapperClass$() : (isDisabled ? ('btn-disabled' | cssPrefix) : undefined)\n \"\n (click)=\"onClick($event)\"\n tabindex=\"-1\"\n role=\"button\"\n aria-disabled=\"true\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></label>\n } @else {\n <button\n [attributes]=\"attr()\"\n [excludes]=\"['class', 'type']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$()\"\n (click)=\"onClick($event)\"\n [disabled]=\"isLoading$() || disabled()\"\n [type]=\"attr()?.type ?? 'button'\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </button>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: TwPrefixPipe, name: "twPrefix" }] });
|
|
127
176
|
}
|
|
128
177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ButtonNFCC, decorators: [{
|
|
129
178
|
type: Component,
|
|
130
|
-
args: [{ selector: 'app-button', imports: [
|
|
131
|
-
AttributesDirective,
|
|
132
|
-
NgClass,
|
|
133
|
-
CssPrefixPipe,
|
|
134
|
-
SelectorlessOutlet,
|
|
135
|
-
MergeClassPipe,
|
|
136
|
-
TwPrefixPipe,
|
|
137
|
-
], template: "<ng-template #templateRef let-attr=\"attributes\">\n @let forAttr = attr()?.for;\n @let isDisabled = isLoading$() || disabled();\n @if (forAttr) {\n <label\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"\n attr()?.class\n | mergeClass: wrapperClass$() : (isDisabled ? ('btn-disabled' | cssPrefix) : undefined)\n \"\n (click)=\"onClick($event)\"\n [ngClass]=\"wrapperClass$()\"\n tabindex=\"-1\"\n role=\"button\"\n aria-disabled=\"true\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></label>\n } @else {\n <button\n [attributes]=\"attr()\"\n [excludes]=\"['class', 'type']\"\n [class]=\"attr()?.class\"\n (click)=\"onClick($event)\"\n [disabled]=\"isLoading$() || disabled()\"\n [ngClass]=\"wrapperClass$()\"\n [type]=\"attr()?.type ?? 'button'\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </button>\n }\n</ng-template>\n" }]
|
|
179
|
+
args: [{ selector: 'app-button', imports: [AttributesDirective, CssPrefixPipe, SelectorlessOutlet, MergeClassPipe, TwPrefixPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @let forAttr = attr()?.for;\n @let isDisabled = isLoading$() || disabled();\n @if (forAttr) {\n <label\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"\n attr()?.class\n | mergeClass: wrapperClass$() : (isDisabled ? ('btn-disabled' | cssPrefix) : undefined)\n \"\n (click)=\"onClick($event)\"\n tabindex=\"-1\"\n role=\"button\"\n aria-disabled=\"true\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></label>\n } @else {\n <button\n [attributes]=\"attr()\"\n [excludes]=\"['class', 'type']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$()\"\n (click)=\"onClick($event)\"\n [disabled]=\"isLoading$() || disabled()\"\n [type]=\"attr()?.type ?? 'button'\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </button>\n }\n</ng-template>\n" }]
|
|
138
180
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], clicked: [{ type: i0.Input, args: [{ isSignal: true, alias: "clicked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableLoadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableLoadingIcon", required: false }] }] } });
|
|
139
181
|
|
|
182
|
+
/**
|
|
183
|
+
* 分割线组件
|
|
184
|
+
* 用于在内容之间添加视觉分隔,支持水平/垂直方向和内容位置调整
|
|
185
|
+
* 常用于表单、列表、段落之间的分隔
|
|
186
|
+
*/
|
|
140
187
|
class DividerNFCC {
|
|
141
188
|
static __version = 2;
|
|
142
189
|
templateRef = viewChild.required('templateRef');
|
|
190
|
+
/** 颜色主题 */
|
|
143
191
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
192
|
+
/** 方向 */
|
|
144
193
|
direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
|
|
194
|
+
/** 内容位置 */
|
|
145
195
|
contentPosition = input(...(ngDevMode ? [undefined, { debugName: "contentPosition" }] : []));
|
|
196
|
+
/** 分割线内容 */
|
|
146
197
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
147
198
|
#theme = inject(ThemeService);
|
|
148
199
|
wrapperClass$$ = computed(() => {
|
|
@@ -186,8 +237,11 @@ class FabItem {
|
|
|
186
237
|
class FabNFCC {
|
|
187
238
|
static __version = 2;
|
|
188
239
|
templateRef = viewChild.required('templateRef');
|
|
240
|
+
/** 选项列表 */
|
|
189
241
|
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
242
|
+
/** 是否启用花朵式展开 */
|
|
190
243
|
flower = input(false, ...(ngDevMode ? [{ debugName: "flower" }] : []));
|
|
244
|
+
/** 点击选项后是否自动关闭 */
|
|
191
245
|
autoClose = input(true, ...(ngDevMode ? [{ debugName: "autoClose" }] : []));
|
|
192
246
|
resolvedOptions$$ = computed(() => {
|
|
193
247
|
return (this.options()?.map((option) => {
|
|
@@ -235,10 +289,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
235
289
|
], template: "<ng-template #iconTemp let-item let-disableButton=\"disableButton\">\n @if (item.option.templateRef) {\n <ng-container\n *ngTemplateOutlet=\"item.option.templateRef; context: { $implicit: item }\"\n ></ng-container>\n } @else if (item.option.label) {\n @if (disableButton) {\n <span [class]=\"item.option.class | mergeClass: commonClass()\" (click)=\"item.onClick($event)\">\n {{ item.option.label }}\n </span>\n } @else {\n <button\n [class]=\"item.option.class\"\n (click)=\"item.onClick($event)\"\n [disabled]=\"item.isLoading$()\"\n >\n {{ item.option.label }}\n </button>\n }\n } @else {\n @let icon = item.option.icon;\n <mat-icon\n [class]=\"item.option.class\"\n (click)=\"item.onClick($event)\"\n [ariaDisabled]=\"item.isLoading$()\"\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n class=\"{{ 'fab' | cssPrefix }}\"\n [ngClass]=\"wrapperClass()\"\n >\n @let defaultIcon = defaultIcon$$();\n <div tabindex=\"0\" role=\"button\">\n <ng-container\n *ngTemplateOutlet=\"iconTemp; context: { $implicit: defaultIcon, disableButton: true }\"\n ></ng-container>\n </div>\n @if (closeIcon$$(); as closeIcon) {\n <div class=\"{{ 'fab-close' | cssPrefix }}\" role=\"button\" tabindex=\"0\">\n <ng-container\n *ngTemplateOutlet=\"iconTemp; context: { $implicit: closeIcon, disableButton: true }\"\n ></ng-container>\n </div>\n }\n @if (mainIcon$$(); as mainIcon) {\n <div class=\"{{ 'fab-main-action' | cssPrefix }}\">\n <ng-container *ngTemplateOutlet=\"iconTemp; context: { $implicit: mainIcon }\"></ng-container>\n </div>\n }\n\n @for (item of resolvedOptions$$(); track $index) {\n <ng-container *ngTemplateOutlet=\"iconTemp; context: { $implicit: item }\"></ng-container>\n }\n </div>\n</ng-template>\n" }]
|
|
236
290
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], flower: [{ type: i0.Input, args: [{ isSignal: true, alias: "flower", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], commonClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "commonClass", required: false }] }], defaultIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultIcon", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], mainIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainIcon", required: false }] }] } });
|
|
237
291
|
|
|
292
|
+
/**
|
|
293
|
+
* 键盘按键组件
|
|
294
|
+
* 用于展示键盘快捷键或组合键提示,常见于帮助文档、教程或功能说明中
|
|
295
|
+
* 可显示单个按键或按键组合
|
|
296
|
+
*/
|
|
238
297
|
class KbdNFCC {
|
|
239
298
|
static __version = 2;
|
|
240
299
|
templateRef = viewChild.required('templateRef');
|
|
300
|
+
/** 尺寸大小 */
|
|
241
301
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
302
|
+
/** 内容 */
|
|
242
303
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
243
304
|
#theme = inject(ThemeService);
|
|
244
305
|
wrapperClass$ = computed(() => {
|
|
@@ -252,10 +313,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
252
313
|
args: [{ selector: 'app-kbd', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <kbd\n [class]=\"attr()?.class | mergeClass: ('kbd' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [ngClass]=\"wrapperClass$()\"\n >{{ content() }}</kbd\n >\n</ng-template>\n" }]
|
|
253
314
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
254
315
|
|
|
316
|
+
/**
|
|
317
|
+
* 加载指示器组件
|
|
318
|
+
* 用于在数据加载、请求处理等异步操作期间显示加载状态
|
|
319
|
+
* 提供多种样式类型(-spinner、dots、ring 等)供选择
|
|
320
|
+
*/
|
|
255
321
|
class LoadingNFCC {
|
|
256
322
|
static __version = 2;
|
|
257
323
|
templateRef = viewChild.required('templateRef');
|
|
324
|
+
/** 尺寸大小 */
|
|
258
325
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
326
|
+
/** 加载类型 */
|
|
259
327
|
type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
|
|
260
328
|
#theme = inject(ThemeService);
|
|
261
329
|
wrapperClass$$ = computed(() => {
|
|
@@ -269,11 +337,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
269
337
|
args: [{ selector: 'app-loading', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <span\n [class]=\"attr()?.class | mergeClass: ('loading' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [ngClass]=\"wrapperClass$$()\"\n ></span>\n</ng-template>\n" }]
|
|
270
338
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
271
339
|
|
|
340
|
+
/**
|
|
341
|
+
* 进度条组件
|
|
342
|
+
* 用于显示操作完成的进度或数据加载的百分比
|
|
343
|
+
* 支持自定义颜色和进度值显示
|
|
344
|
+
*/
|
|
272
345
|
class ProgressNFCC {
|
|
273
346
|
static __version = 2;
|
|
274
347
|
templateRef = viewChild.required('templateRef');
|
|
348
|
+
/** 颜色主题 */
|
|
275
349
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
350
|
+
/** 进度值 */
|
|
276
351
|
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
352
|
+
/** 最大值 */
|
|
277
353
|
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
278
354
|
#theme = inject(ThemeService);
|
|
279
355
|
wrapperClass$ = computed(() => {
|
|
@@ -290,13 +366,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
290
366
|
args: [{ selector: 'app-progress', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe, PurePipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @if (isNumber | pure: value()) {\n <progress\n [value]=\"value()\"\n [max]=\"max()\"\n [class]=\"attr()?.class | mergeClass: ('progress' | cssPrefix)\"\n [ngClass]=\"wrapperClass$()\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n ></progress>\n } @else {\n <progress\n [max]=\"max()\"\n [class]=\"attr()?.class | mergeClass: ('progress' | cssPrefix)\"\n [ngClass]=\"wrapperClass$()\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n ></progress>\n }\n</ng-template>\n" }]
|
|
291
367
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
|
|
292
368
|
|
|
369
|
+
/**
|
|
370
|
+
* 环形进度组件
|
|
371
|
+
* 用于显示圆形的进度指示器,适合空间受限或需要美观展示的场景
|
|
372
|
+
* 支持自定义线宽和进度值配置
|
|
373
|
+
*/
|
|
293
374
|
class RadialProgressNFCC {
|
|
294
375
|
static __version = 2;
|
|
295
376
|
templateRef = viewChild.required('templateRef');
|
|
377
|
+
/** 进度值 */
|
|
296
378
|
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
379
|
+
/** 进度值映射函数 */
|
|
297
380
|
valueMap = input((value) => {
|
|
298
381
|
return `${value * 100}%`;
|
|
299
382
|
}, ...(ngDevMode ? [{ debugName: "valueMap" }] : []));
|
|
383
|
+
/** 线宽 */
|
|
300
384
|
strokeWidth = input(...(ngDevMode ? [undefined, { debugName: "strokeWidth" }] : []));
|
|
301
385
|
value$$ = computed(() => {
|
|
302
386
|
return this.value() * 100;
|
|
@@ -320,13 +404,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
320
404
|
args: [{ selector: 'app-radial-progress', imports: [AttributesDirective, NgStyle, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [aria-valuenow]=\"value$$()\"\n role=\"progressbar\"\n [ngStyle]=\"wrapperStyle$$()\"\n [class]=\"attr()?.class | mergeClass: ('radial-progress' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n {{ valueMap()(value()) }}\n </div>\n</ng-template>\n" }]
|
|
321
405
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueMap", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
|
|
322
406
|
|
|
407
|
+
/**
|
|
408
|
+
* 状态指示器组件
|
|
409
|
+
* 用于显示对象的当前状态(如在线、离线、完成等),常用于列表项或卡片中
|
|
410
|
+
* 支持多种动画效果(ping、bounce)增强视觉提示
|
|
411
|
+
*/
|
|
323
412
|
class StatusNFCC {
|
|
324
413
|
static __version = 2;
|
|
325
414
|
templateRef = viewChild.required('templateRef');
|
|
415
|
+
/** 内容 */
|
|
326
416
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
417
|
+
/** 颜色主题 */
|
|
327
418
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
419
|
+
/** 尺寸大小 */
|
|
328
420
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
421
|
+
/** 是否启用 ping 动画效果 */
|
|
329
422
|
animatePing = input(...(ngDevMode ? [undefined, { debugName: "animatePing" }] : []));
|
|
423
|
+
/** 是否启用 bounce 动画效果 */
|
|
330
424
|
animateBounce = input(...(ngDevMode ? [undefined, { debugName: "animateBounce" }] : []));
|
|
331
425
|
#theme = inject(ThemeService);
|
|
332
426
|
wrapperClass$ = computed(() => {
|
|
@@ -340,9 +434,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
340
434
|
args: [{ selector: 'app-status', imports: [AttributesDirective, NgClass, CssPrefixPipe, TwPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: 'flex items-center gap-2'\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n @if (animatePing()) {\n <div class=\"{{ 'inline-grid *:[grid-area:1/1]' | twPrefix }}\">\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n </div>\n } @else {\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n }\n @if (content(); as value) {\n <span>\n {{ value }}\n </span>\n }\n </div>\n</ng-template>\n" }]
|
|
341
435
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], animatePing: [{ type: i0.Input, args: [{ isSignal: true, alias: "animatePing", required: false }] }], animateBounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateBounce", required: false }] }] } });
|
|
342
436
|
|
|
437
|
+
/**
|
|
438
|
+
* 主题控制器组件
|
|
439
|
+
* 用于切换应用的主题样式,通常与主题切换功能配合使用
|
|
440
|
+
* 可通过配置不同的主题值来改变整体配色方案
|
|
441
|
+
*/
|
|
343
442
|
class ThemeControllerNFCC {
|
|
344
443
|
static __version = 2;
|
|
345
444
|
templateRef = viewChild.required('templateRef');
|
|
445
|
+
/** 主题值 */
|
|
346
446
|
value = input('synthwave', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
347
447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThemeControllerNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
348
448
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: ThemeControllerNFCC, isStandalone: true, selector: "app-theme-controller", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <input\n type=\"checkbox\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('toggle theme-controller' | cssPrefix)\"\n [value]=\"value()\"\n />\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
|
|
@@ -352,16 +452,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
352
452
|
args: [{ selector: 'app-theme-controller', imports: [AttributesDirective, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <input\n type=\"checkbox\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('toggle theme-controller' | cssPrefix)\"\n [value]=\"value()\"\n />\n</ng-template>\n" }]
|
|
353
453
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
354
454
|
|
|
455
|
+
/**
|
|
456
|
+
* 下拉菜单组件
|
|
457
|
+
* 用于在有限空间内展示多个操作选项或列表项
|
|
458
|
+
* 支持悬停或点击触发,可配置菜单对齐方式和显示位置
|
|
459
|
+
*/
|
|
355
460
|
class DropdownNFCC {
|
|
356
461
|
static __version = 2;
|
|
357
462
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
358
463
|
templateRef = viewChild.required('templateRef');
|
|
464
|
+
/** 标题内容 */
|
|
359
465
|
title = input('Default', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
466
|
+
/** 标题 CSS 类名 */
|
|
360
467
|
titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : []));
|
|
468
|
+
/** 对齐方式 */
|
|
361
469
|
align = input(...(ngDevMode ? [undefined, { debugName: "align" }] : []));
|
|
470
|
+
/** 位置 */
|
|
362
471
|
position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
|
|
472
|
+
/** 触发动作 */
|
|
363
473
|
triggerAction = input(...(ngDevMode ? [undefined, { debugName: "triggerAction" }] : []));
|
|
474
|
+
/** 内容 */
|
|
364
475
|
content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : []));
|
|
476
|
+
/** 内容 CSS 类名 */
|
|
365
477
|
contentClass = input(...(ngDevMode ? [undefined, { debugName: "contentClass" }] : []));
|
|
366
478
|
#theme = inject(ThemeService);
|
|
367
479
|
wrapperClass$ = computed(() => {
|
|
@@ -383,19 +495,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
383
495
|
], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class\"\n [ngClass]=\"wrapperClass$()\"\n >\n <div\n tabindex=\"0\"\n role=\"button\"\n class=\"{{ 'btn' | cssPrefix | mergeClass: ('m-1' | twPrefix) : titleClass() }}\"\n >\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: title }\"\n ></ng-template>\n </div>\n <div tabindex=\"-1\" class=\"{{ 'dropdown-content' | cssPrefix | mergeClass: contentClass() }}\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </div>\n </div>\n</ng-template>\n" }]
|
|
384
496
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], triggerAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerAction", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }] } });
|
|
385
497
|
|
|
498
|
+
/**
|
|
499
|
+
* 统计数据显示组件
|
|
500
|
+
* 用于展示关键数据指标,支持标题、数值、描述和图标的组合展示
|
|
501
|
+
* 常用于数据报表、仪表盘等数据可视化场景
|
|
502
|
+
*/
|
|
386
503
|
class StatNFCC {
|
|
387
504
|
static __version = 2;
|
|
388
505
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
389
506
|
PiyingView = PiyingView;
|
|
390
507
|
templateRef = viewChild.required('templateRef');
|
|
391
508
|
parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
|
|
509
|
+
/** 标题内容 */
|
|
392
510
|
title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
511
|
+
/** 标题 CSS 类名 */
|
|
393
512
|
titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : []));
|
|
513
|
+
/** 数值内容 */
|
|
394
514
|
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
515
|
+
/** 数值 CSS 类名 */
|
|
395
516
|
valueClass = input(...(ngDevMode ? [undefined, { debugName: "valueClass" }] : []));
|
|
517
|
+
/** 描述内容 */
|
|
396
518
|
desc = input(...(ngDevMode ? [undefined, { debugName: "desc" }] : []));
|
|
519
|
+
/** 描述 CSS 类名 */
|
|
397
520
|
descClass = input(...(ngDevMode ? [undefined, { debugName: "descClass" }] : []));
|
|
521
|
+
/** 图标内容 */
|
|
398
522
|
figure = input(...(ngDevMode ? [undefined, { debugName: "figure" }] : []));
|
|
523
|
+
/** 图标 CSS 类名 */
|
|
399
524
|
figureClass = input(...(ngDevMode ? [undefined, { debugName: "figureClass" }] : []));
|
|
400
525
|
templateInput = (schema) => {
|
|
401
526
|
return {
|
|
@@ -420,16 +545,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
420
545
|
], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"'stat' | cssPrefix | mergeClass: attr?.().class\"\n [attributes]=\"attr?.()\"\n [excludes]=\"['class']\"\n >\n @if (title()) {\n <div [class]=\"'stat-title' | cssPrefix | mergeClass: titleClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: title\"\n ></ng-template>\n </div>\n }\n @if (value()) {\n <div [class]=\"'stat-value' | cssPrefix | mergeClass: valueClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: value\"\n ></ng-template>\n </div>\n }\n @if (desc()) {\n <div [class]=\"'stat-desc' | cssPrefix | mergeClass: descClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: desc\"\n ></ng-template>\n </div>\n }\n @if (figure()) {\n <div [class]=\"'stat-figure' | cssPrefix | mergeClass: figureClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: figure\"\n ></ng-template>\n </div>\n }\n </div>\n</ng-template>\n" }]
|
|
421
546
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueClass", required: false }] }], desc: [{ type: i0.Input, args: [{ isSignal: true, alias: "desc", required: false }] }], descClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "descClass", required: false }] }], figure: [{ type: i0.Input, args: [{ isSignal: true, alias: "figure", required: false }] }], figureClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "figureClass", required: false }] }] } });
|
|
422
547
|
|
|
548
|
+
/**
|
|
549
|
+
* 表单提交按钮组件
|
|
550
|
+
* 用于表单提交、重置等操作,具有与按钮组件相同的样式特性
|
|
551
|
+
* 常用于表单底部操作区域
|
|
552
|
+
*/
|
|
423
553
|
class InputButtonNFCC {
|
|
424
554
|
static __version = 2;
|
|
425
555
|
templateRef = viewChild.required('templateRef');
|
|
556
|
+
/** 按钮类型 */
|
|
426
557
|
type = input('submit', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
558
|
+
/** 颜色主题 */
|
|
427
559
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
560
|
+
/** 按钮样式风格 */
|
|
428
561
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
562
|
+
/** 尺寸大小 */
|
|
429
563
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
564
|
+
/** 形状 */
|
|
430
565
|
shape = input(...(ngDevMode ? [undefined, { debugName: "shape" }] : []));
|
|
566
|
+
/** 是否激活状态 */
|
|
431
567
|
active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : []));
|
|
568
|
+
/** 点击事件处理函数 */
|
|
432
569
|
clicked = input(...(ngDevMode ? [undefined, { debugName: "clicked" }] : []));
|
|
570
|
+
/** 是否禁用 */
|
|
433
571
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
434
572
|
isLoading$ = signal(false, ...(ngDevMode ? [{ debugName: "isLoading$" }] : []));
|
|
435
573
|
async onClick(event) {
|