@fylib/adapter-angular 0.2.5 → 0.2.7
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/dist/components/accordion.component.d.ts +3 -0
- package/dist/components/accordion.component.js +105 -194
- package/dist/components/badge.component.d.ts +3 -0
- package/dist/components/badge.component.js +30 -81
- package/dist/components/button.component.d.ts +3 -0
- package/dist/components/button.component.js +79 -194
- package/dist/components/card.component.d.ts +3 -0
- package/dist/components/card.component.js +76 -147
- package/dist/components/chart.component.d.ts +3 -0
- package/dist/components/chart.component.js +81 -141
- package/dist/components/icon.component.d.ts +3 -0
- package/dist/components/icon.component.js +39 -62
- package/dist/components/input.component.d.ts +3 -0
- package/dist/components/input.component.js +120 -221
- package/dist/components/modal.component.d.ts +3 -0
- package/dist/components/modal.component.js +121 -247
- package/dist/components/nav-link.component.d.ts +3 -0
- package/dist/components/nav-link.component.js +43 -92
- package/dist/components/notification-menu.component.d.ts +3 -0
- package/dist/components/notification-menu.component.js +205 -367
- package/dist/components/select.component.d.ts +3 -0
- package/dist/components/select.component.js +116 -188
- package/dist/components/table.component.d.ts +3 -0
- package/dist/components/table.component.js +235 -332
- package/dist/components/text.component.d.ts +3 -0
- package/dist/components/text.component.js +22 -32
- package/dist/components/toast.component.d.ts +3 -0
- package/dist/components/toast.component.js +58 -163
- package/dist/directives/animation.directive.d.ts +3 -0
- package/dist/directives/animation.directive.js +15 -22
- package/dist/directives/theme-vars.directive.d.ts +3 -0
- package/dist/directives/theme-vars.directive.js +12 -19
- package/dist/directives/wallpaper.directive.d.ts +3 -0
- package/dist/directives/wallpaper.directive.js +19 -31
- package/dist/layouts/layout.component.d.ts +3 -0
- package/dist/layouts/layout.component.js +36 -130
- package/dist/layouts/slot.component.d.ts +3 -0
- package/dist/layouts/slot.component.js +240 -596
- package/dist/services/fylib.service.d.ts +3 -0
- package/dist/services/fylib.service.js +19 -26
- package/dist/services/notification.service.d.ts +3 -0
- package/dist/services/notification.service.js +13 -16
- package/dist/services/sse.service.d.ts +3 -0
- package/dist/services/sse.service.js +11 -18
- package/dist/services/webclient.service.d.ts +3 -0
- package/dist/services/webclient.service.js +9 -12
- package/package.json +4 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { AccordionProps, AccordionItem, AccordionExpandMode } from '@fylib/catalog';
|
|
3
3
|
import { BaseFyComponent, FyComponentBaseInputs } from '../base/base-component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class FyAccordionComponent extends BaseFyComponent<'fy-accordion'> implements AccordionProps, FyComponentBaseInputs {
|
|
5
6
|
constructor();
|
|
6
7
|
items: AccordionItem[];
|
|
@@ -29,4 +30,6 @@ export declare class FyAccordionComponent extends BaseFyComponent<'fy-accordion'
|
|
|
29
30
|
isActive(i: number): boolean;
|
|
30
31
|
handleKeyDown(event: KeyboardEvent, index: number): void;
|
|
31
32
|
toggle(i: number): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FyAccordionComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FyAccordionComponent, "fy-accordion", never, { "items": { "alias": "items"; "required": false; }; "activeIndex": { "alias": "activeIndex"; "required": false; }; "expandMode": { "alias": "expandMode"; "required": false; }; "size": { "alias": "size"; "required": false; }; "status": { "alias": "status"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "flush": { "alias": "flush"; "required": false; }; "animated": { "alias": "animated"; "required": false; }; "lazy": { "alias": "lazy"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "onOpen": { "alias": "onOpen"; "required": false; }; "onClose": { "alias": "onClose"; "required": false; }; "onChange": { "alias": "onChange"; "required": false; }; "activeAnimations": { "alias": "activeAnimations"; "required": false; }; "activeEffects": { "alias": "activeEffects"; "required": false; }; "customStyles": { "alias": "customStyles"; "required": false; }; }, { "fyOpen": "fyOpen"; "fyClose": "fyClose"; "fyChange": "fyChange"; }, never, ["[fy-accordion-item-content={{it.id}}]"], true, never>;
|
|
32
35
|
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
1
|
import { Component, Input, Output, EventEmitter, ViewEncapsulation, HostBinding, inject } from '@angular/core';
|
|
11
2
|
import { CommonModule } from '@angular/common';
|
|
12
3
|
import { AccordionDefinition } from '@fylib/catalog';
|
|
13
4
|
import { BaseFyComponent } from '../base/base-component';
|
|
14
5
|
import { FyLibService } from '../services/fylib.service';
|
|
15
|
-
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
export class FyAccordionComponent extends BaseFyComponent {
|
|
16
9
|
constructor() {
|
|
17
10
|
super(inject(FyLibService), 'fy-accordion');
|
|
18
11
|
this.items = AccordionDefinition.defaultProps.items;
|
|
@@ -104,103 +97,9 @@ let FyAccordionComponent = class FyAccordionComponent extends BaseFyComponent {
|
|
|
104
97
|
this.onChange(emitValue);
|
|
105
98
|
this.fyChange.emit(emitValue);
|
|
106
99
|
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
__metadata("design:type", Array)
|
|
111
|
-
], FyAccordionComponent.prototype, "items", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
Input(),
|
|
114
|
-
__metadata("design:type", Object)
|
|
115
|
-
], FyAccordionComponent.prototype, "activeIndex", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
Input(),
|
|
118
|
-
__metadata("design:type", String)
|
|
119
|
-
], FyAccordionComponent.prototype, "expandMode", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
Input(),
|
|
122
|
-
__metadata("design:type", Object)
|
|
123
|
-
], FyAccordionComponent.prototype, "size", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
Input(),
|
|
126
|
-
__metadata("design:type", Object)
|
|
127
|
-
], FyAccordionComponent.prototype, "status", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
Input(),
|
|
130
|
-
__metadata("design:type", Boolean)
|
|
131
|
-
], FyAccordionComponent.prototype, "bordered", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
Input(),
|
|
134
|
-
__metadata("design:type", Boolean)
|
|
135
|
-
], FyAccordionComponent.prototype, "flush", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
Input(),
|
|
138
|
-
__metadata("design:type", Boolean)
|
|
139
|
-
], FyAccordionComponent.prototype, "animated", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
Input(),
|
|
142
|
-
__metadata("design:type", Boolean)
|
|
143
|
-
], FyAccordionComponent.prototype, "lazy", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
Input(),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], FyAccordionComponent.prototype, "iconPosition", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
Input(),
|
|
150
|
-
__metadata("design:type", Boolean)
|
|
151
|
-
], FyAccordionComponent.prototype, "disabled", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
Input(),
|
|
154
|
-
__metadata("design:type", Function)
|
|
155
|
-
], FyAccordionComponent.prototype, "onOpen", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
Input(),
|
|
158
|
-
__metadata("design:type", Function)
|
|
159
|
-
], FyAccordionComponent.prototype, "onClose", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
Input(),
|
|
162
|
-
__metadata("design:type", Function)
|
|
163
|
-
], FyAccordionComponent.prototype, "onChange", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
Input(),
|
|
166
|
-
__metadata("design:type", Object)
|
|
167
|
-
], FyAccordionComponent.prototype, "activeAnimations", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
Input(),
|
|
170
|
-
__metadata("design:type", Object)
|
|
171
|
-
], FyAccordionComponent.prototype, "activeEffects", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
Input(),
|
|
174
|
-
__metadata("design:type", Object)
|
|
175
|
-
], FyAccordionComponent.prototype, "customStyles", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
Output(),
|
|
178
|
-
__metadata("design:type", Object)
|
|
179
|
-
], FyAccordionComponent.prototype, "fyOpen", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
Output(),
|
|
182
|
-
__metadata("design:type", Object)
|
|
183
|
-
], FyAccordionComponent.prototype, "fyClose", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
Output(),
|
|
186
|
-
__metadata("design:type", Object)
|
|
187
|
-
], FyAccordionComponent.prototype, "fyChange", void 0);
|
|
188
|
-
__decorate([
|
|
189
|
-
HostBinding('class.fy-animations-disabled'),
|
|
190
|
-
__metadata("design:type", Object),
|
|
191
|
-
__metadata("design:paramtypes", [])
|
|
192
|
-
], FyAccordionComponent.prototype, "animationsDisabled", null);
|
|
193
|
-
__decorate([
|
|
194
|
-
HostBinding('style'),
|
|
195
|
-
__metadata("design:type", String),
|
|
196
|
-
__metadata("design:paramtypes", [])
|
|
197
|
-
], FyAccordionComponent.prototype, "hostStyles", null);
|
|
198
|
-
FyAccordionComponent = __decorate([
|
|
199
|
-
Component({
|
|
200
|
-
selector: 'fy-accordion',
|
|
201
|
-
standalone: true,
|
|
202
|
-
imports: [CommonModule],
|
|
203
|
-
template: `
|
|
100
|
+
}
|
|
101
|
+
FyAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
102
|
+
FyAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FyAccordionComponent, isStandalone: true, selector: "fy-accordion", inputs: { items: "items", activeIndex: "activeIndex", expandMode: "expandMode", size: "size", status: "status", bordered: "bordered", flush: "flush", animated: "animated", lazy: "lazy", iconPosition: "iconPosition", disabled: "disabled", onOpen: "onOpen", onClose: "onClose", onChange: "onChange", activeAnimations: "activeAnimations", activeEffects: "activeEffects", customStyles: "customStyles" }, outputs: { fyOpen: "fyOpen", fyClose: "fyClose", fyChange: "fyChange" }, host: { properties: { "class.fy-animations-disabled": "this.animationsDisabled", "style": "this.hostStyles" } }, usesInheritance: true, ngImport: i0, template: `
|
|
204
103
|
<div class="fy-accordion"
|
|
205
104
|
[class.fy-accordion--bordered]="bordered"
|
|
206
105
|
[class.fy-accordion--flush]="flush"
|
|
@@ -248,90 +147,102 @@ FyAccordionComponent = __decorate([
|
|
|
248
147
|
</section>
|
|
249
148
|
}
|
|
250
149
|
</div>
|
|
251
|
-
`,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
gap: 2px;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
150
|
+
`, isInline: true, styles: ["\n .fy-accordion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n .fy-accordion--bordered { \n border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));\n border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));\n padding: 4px;\n background: var(--fy-effects-accordion-background, #fff);\n box-shadow: var(--fy-effects-accordion-shadow, none);\n }\n .fy-accordion--flush { border: none; padding: 0; }\n\n .fy-accordion__item {\n background: var(--fy-effects-accordion-background, #fff);\n border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));\n border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));\n overflow: hidden;\n }\n .fy-accordion--flush .fy-accordion__item {\n border: none;\n border-radius: 0;\n background: transparent;\n }\n\n .fy-accordion__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 10px 12px;\n background: var(--fy-effects-accordion-headerBackground, transparent);\n cursor: pointer;\n user-select: none;\n }\n .fy-accordion__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-md, 14px);\n font-weight: var(--fy-typography-fontWeight-bold, 600);\n }\n .fy-accordion__subtitle {\n margin: 0;\n font-size: var(--fy-typography-fontSize-sm, 11px);\n opacity: .7;\n }\n .fy-accordion__header-main {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n .fy-accordion__indicator {\n transition: transform .2s ease;\n }\n .fy-accordion__indicator--open { transform: rotate(180deg); }\n\n .fy-accordion__panel-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;\n opacity: 0;\n overflow: hidden;\n }\n\n .fy-accordion__panel-wrapper--active {\n grid-template-rows: 1fr;\n opacity: 1;\n }\n\n .fy-accordion__panel {\n min-height: 0;\n border-top: 1px solid var(--fy-effects-accordion-dividerColor, rgba(0,0,0,0.08));\n padding: 0 12px;\n transition: padding 0.3s ease;\n }\n\n .fy-accordion__panel-wrapper--active .fy-accordion__panel {\n padding: 12px;\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyAccordionComponent, decorators: [{
|
|
152
|
+
type: Component,
|
|
153
|
+
args: [{ selector: 'fy-accordion', standalone: true, imports: [CommonModule], template: `
|
|
154
|
+
<div class="fy-accordion"
|
|
155
|
+
[class.fy-accordion--bordered]="bordered"
|
|
156
|
+
[class.fy-accordion--flush]="flush"
|
|
157
|
+
role="presentation">
|
|
158
|
+
@for (it of items; track it.id; let i = $index) {
|
|
159
|
+
<section class="fy-accordion__item"
|
|
160
|
+
[class.fy-accordion__item--active]="isActive(i)"
|
|
161
|
+
[class.fy-accordion__item--disabled]="it.disabled">
|
|
162
|
+
<header class="fy-accordion__header"
|
|
163
|
+
(click)="toggle(i)"
|
|
164
|
+
(keydown)="handleKeyDown($event, i)"
|
|
165
|
+
[attr.aria-expanded]="isActive(i)"
|
|
166
|
+
[attr.aria-controls]="'fy-accordion-panel-' + it.id"
|
|
167
|
+
[attr.aria-disabled]="it.disabled || disabled"
|
|
168
|
+
[attr.id]="'fy-accordion-header-' + it.id"
|
|
169
|
+
[tabindex]="it.disabled || disabled ? -1 : 0"
|
|
170
|
+
role="button">
|
|
171
|
+
<div class="fy-accordion__header-main">
|
|
172
|
+
<h4 class="fy-accordion__title">{{ it.title }}</h4>
|
|
173
|
+
@if (it.subtitle) { <p class="fy-accordion__subtitle">{{ it.subtitle }}</p> }
|
|
174
|
+
</div>
|
|
175
|
+
<span class="fy-accordion__indicator"
|
|
176
|
+
[class.fy-accordion__indicator--open]="isActive(i)"
|
|
177
|
+
aria-hidden="true">▾</span>
|
|
178
|
+
</header>
|
|
179
|
+
|
|
180
|
+
<div
|
|
181
|
+
class="fy-accordion__panel-wrapper"
|
|
182
|
+
[ngClass]="getPanelClasses(i)"
|
|
183
|
+
[attr.id]="'fy-accordion-panel-' + it.id"
|
|
184
|
+
[attr.aria-labelledby]="'fy-accordion-header-' + it.id"
|
|
185
|
+
[attr.aria-hidden]="!isActive(i)"
|
|
186
|
+
role="region"
|
|
187
|
+
>
|
|
188
|
+
<div class="fy-accordion__panel">
|
|
189
|
+
@if (!lazy || isActive(i)) {
|
|
190
|
+
@if (it.content) {
|
|
191
|
+
<div class="fy-accordion__content">{{ it.content }}</div>
|
|
192
|
+
} @else {
|
|
193
|
+
<ng-content select="[fy-accordion-item-content={{it.id}}]"></ng-content>
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</section>
|
|
199
|
+
}
|
|
200
|
+
</div>
|
|
201
|
+
`, encapsulation: ViewEncapsulation.None, styles: ["\n .fy-accordion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n .fy-accordion--bordered { \n border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));\n border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));\n padding: 4px;\n background: var(--fy-effects-accordion-background, #fff);\n box-shadow: var(--fy-effects-accordion-shadow, none);\n }\n .fy-accordion--flush { border: none; padding: 0; }\n\n .fy-accordion__item {\n background: var(--fy-effects-accordion-background, #fff);\n border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));\n border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));\n overflow: hidden;\n }\n .fy-accordion--flush .fy-accordion__item {\n border: none;\n border-radius: 0;\n background: transparent;\n }\n\n .fy-accordion__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 10px 12px;\n background: var(--fy-effects-accordion-headerBackground, transparent);\n cursor: pointer;\n user-select: none;\n }\n .fy-accordion__title {\n margin: 0;\n font-size: var(--fy-typography-fontSize-md, 14px);\n font-weight: var(--fy-typography-fontWeight-bold, 600);\n }\n .fy-accordion__subtitle {\n margin: 0;\n font-size: var(--fy-typography-fontSize-sm, 11px);\n opacity: .7;\n }\n .fy-accordion__header-main {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n .fy-accordion__indicator {\n transition: transform .2s ease;\n }\n .fy-accordion__indicator--open { transform: rotate(180deg); }\n\n .fy-accordion__panel-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;\n opacity: 0;\n overflow: hidden;\n }\n\n .fy-accordion__panel-wrapper--active {\n grid-template-rows: 1fr;\n opacity: 1;\n }\n\n .fy-accordion__panel {\n min-height: 0;\n border-top: 1px solid var(--fy-effects-accordion-dividerColor, rgba(0,0,0,0.08));\n padding: 0 12px;\n transition: padding 0.3s ease;\n }\n\n .fy-accordion__panel-wrapper--active .fy-accordion__panel {\n padding: 12px;\n }\n "] }]
|
|
202
|
+
}], ctorParameters: () => [], propDecorators: { items: [{
|
|
203
|
+
type: Input
|
|
204
|
+
}], activeIndex: [{
|
|
205
|
+
type: Input
|
|
206
|
+
}], expandMode: [{
|
|
207
|
+
type: Input
|
|
208
|
+
}], size: [{
|
|
209
|
+
type: Input
|
|
210
|
+
}], status: [{
|
|
211
|
+
type: Input
|
|
212
|
+
}], bordered: [{
|
|
213
|
+
type: Input
|
|
214
|
+
}], flush: [{
|
|
215
|
+
type: Input
|
|
216
|
+
}], animated: [{
|
|
217
|
+
type: Input
|
|
218
|
+
}], lazy: [{
|
|
219
|
+
type: Input
|
|
220
|
+
}], iconPosition: [{
|
|
221
|
+
type: Input
|
|
222
|
+
}], disabled: [{
|
|
223
|
+
type: Input
|
|
224
|
+
}], onOpen: [{
|
|
225
|
+
type: Input
|
|
226
|
+
}], onClose: [{
|
|
227
|
+
type: Input
|
|
228
|
+
}], onChange: [{
|
|
229
|
+
type: Input
|
|
230
|
+
}], activeAnimations: [{
|
|
231
|
+
type: Input
|
|
232
|
+
}], activeEffects: [{
|
|
233
|
+
type: Input
|
|
234
|
+
}], customStyles: [{
|
|
235
|
+
type: Input
|
|
236
|
+
}], fyOpen: [{
|
|
237
|
+
type: Output
|
|
238
|
+
}], fyClose: [{
|
|
239
|
+
type: Output
|
|
240
|
+
}], fyChange: [{
|
|
241
|
+
type: Output
|
|
242
|
+
}], animationsDisabled: [{
|
|
243
|
+
type: HostBinding,
|
|
244
|
+
args: ['class.fy-animations-disabled']
|
|
245
|
+
}], hostStyles: [{
|
|
246
|
+
type: HostBinding,
|
|
247
|
+
args: ['style']
|
|
248
|
+
}] } });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
export declare class FyBadgeComponent {
|
|
2
3
|
private fylib;
|
|
3
4
|
text?: string;
|
|
@@ -7,4 +8,6 @@ export declare class FyBadgeComponent {
|
|
|
7
8
|
shine?: boolean | null;
|
|
8
9
|
badgeStyle: import("@angular/core").Signal<Record<string, string>>;
|
|
9
10
|
shineClass: import("@angular/core").Signal<boolean>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FyBadgeComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FyBadgeComponent, "fy-badge", never, { "text": { "alias": "text"; "required": false; }; "background": { "alias": "background"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "shine": { "alias": "shine"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
13
|
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
1
|
import { Component, Input, ViewEncapsulation, inject, computed } from '@angular/core';
|
|
11
2
|
import { CommonModule } from '@angular/common';
|
|
12
3
|
import { FyLibService } from '../services/fylib.service';
|
|
13
|
-
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
export class FyBadgeComponent {
|
|
14
7
|
constructor() {
|
|
15
8
|
this.fylib = inject(FyLibService);
|
|
16
9
|
this.badgeStyle = computed(() => {
|
|
@@ -27,86 +20,42 @@ let FyBadgeComponent = class FyBadgeComponent {
|
|
|
27
20
|
if (br)
|
|
28
21
|
style['border-radius'] = br;
|
|
29
22
|
return style;
|
|
30
|
-
});
|
|
23
|
+
}, ...(ngDevMode ? [{ debugName: "badgeStyle" }] : /* istanbul ignore next */ []));
|
|
31
24
|
this.shineClass = computed(() => {
|
|
32
25
|
const tokens = this.fylib.tokens();
|
|
33
26
|
const badgeTokens = tokens?.effects?.badge || tokens?.badge || {};
|
|
34
27
|
const shineToken = badgeTokens.animation === 'shine';
|
|
35
28
|
return this.shine ?? shineToken;
|
|
36
|
-
});
|
|
29
|
+
}, ...(ngDevMode ? [{ debugName: "shineClass" }] : /* istanbul ignore next */ []));
|
|
37
30
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], FyBadgeComponent.prototype, "text", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
Input(),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], FyBadgeComponent.prototype, "background", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Input(),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], FyBadgeComponent.prototype, "textColor", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
Input(),
|
|
53
|
-
__metadata("design:type", Object)
|
|
54
|
-
], FyBadgeComponent.prototype, "borderRadius", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
Input(),
|
|
57
|
-
__metadata("design:type", Object)
|
|
58
|
-
], FyBadgeComponent.prototype, "shine", void 0);
|
|
59
|
-
FyBadgeComponent = __decorate([
|
|
60
|
-
Component({
|
|
61
|
-
selector: 'fy-badge',
|
|
62
|
-
standalone: true,
|
|
63
|
-
imports: [CommonModule],
|
|
64
|
-
template: `
|
|
31
|
+
}
|
|
32
|
+
FyBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
FyBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FyBadgeComponent, isStandalone: true, selector: "fy-badge", inputs: { text: "text", background: "background", textColor: "textColor", borderRadius: "borderRadius", shine: "shine" }, ngImport: i0, template: `
|
|
65
34
|
<span class="fy-badge" [class.fy-badge--shine]="shineClass()" [ngStyle]="badgeStyle()" >
|
|
66
35
|
<ng-content></ng-content>
|
|
67
36
|
@if (text) {
|
|
68
37
|
<span>{{ text }}</span>
|
|
69
38
|
}
|
|
70
39
|
</span>
|
|
71
|
-
`,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
font-weight: 700
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.fy-badge.fy-badge--shine::after {
|
|
94
|
-
content: '';
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: 0;
|
|
97
|
-
bottom: 0;
|
|
98
|
-
left: -150%;
|
|
99
|
-
width: 50%;
|
|
100
|
-
background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
|
|
101
|
-
transform: skewX(-20deg);
|
|
102
|
-
animation: fy-badge-shine 2.4s linear infinite;
|
|
103
|
-
}
|
|
104
|
-
@keyframes fy-badge-shine {
|
|
105
|
-
0% { left: -150%; }
|
|
106
|
-
100% { left: 200%; }
|
|
107
|
-
}
|
|
108
|
-
`],
|
|
109
|
-
encapsulation: ViewEncapsulation.None
|
|
110
|
-
})
|
|
111
|
-
], FyBadgeComponent);
|
|
112
|
-
export { FyBadgeComponent };
|
|
40
|
+
`, isInline: true, styles: ["\n .fy-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n min-width: 16px;\n height: 16px;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n border-radius: 8px;\n background-color: var(--fy-badge-background, #ff4757);\n color: var(--fy-badge-textColor, #fff);\n box-shadow: 0 0 0 1px rgba(0,0,0,0.06);\n white-space: nowrap;\n }\n .fy-badge.fy-badge--shine {\n position: relative;\n overflow: hidden;\n }\n .fy-badge.fy-badge--shine::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -150%;\n width: 50%;\n background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);\n transform: skewX(-20deg);\n animation: fy-badge-shine 2.4s linear infinite;\n }\n @keyframes fy-badge-shine {\n 0% { left: -150%; }\n 100% { left: 200%; }\n }\n "], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FyBadgeComponent, decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ selector: 'fy-badge', standalone: true, imports: [CommonModule], template: `
|
|
44
|
+
<span class="fy-badge" [class.fy-badge--shine]="shineClass()" [ngStyle]="badgeStyle()" >
|
|
45
|
+
<ng-content></ng-content>
|
|
46
|
+
@if (text) {
|
|
47
|
+
<span>{{ text }}</span>
|
|
48
|
+
}
|
|
49
|
+
</span>
|
|
50
|
+
`, encapsulation: ViewEncapsulation.None, styles: ["\n .fy-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n min-width: 16px;\n height: 16px;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n border-radius: 8px;\n background-color: var(--fy-badge-background, #ff4757);\n color: var(--fy-badge-textColor, #fff);\n box-shadow: 0 0 0 1px rgba(0,0,0,0.06);\n white-space: nowrap;\n }\n .fy-badge.fy-badge--shine {\n position: relative;\n overflow: hidden;\n }\n .fy-badge.fy-badge--shine::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -150%;\n width: 50%;\n background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);\n transform: skewX(-20deg);\n animation: fy-badge-shine 2.4s linear infinite;\n }\n @keyframes fy-badge-shine {\n 0% { left: -150%; }\n 100% { left: 200%; }\n }\n "] }]
|
|
51
|
+
}], propDecorators: { text: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], background: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], textColor: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], borderRadius: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], shine: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}] } });
|
|
@@ -3,6 +3,7 @@ import { ButtonProps } from '@fylib/catalog';
|
|
|
3
3
|
import { ButtonHoverAnimationName, ButtonClickAnimationName, ButtonStateAnimationName } from '@fylib/animation';
|
|
4
4
|
import { EffectName } from '@fylib/config';
|
|
5
5
|
import { BaseFyComponent, FyComponentBaseInputs } from '../base/base-component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class FyButtonComponent extends BaseFyComponent<'fy-button'> implements ButtonProps, FyComponentBaseInputs {
|
|
7
8
|
constructor();
|
|
8
9
|
label: string | undefined;
|
|
@@ -30,4 +31,6 @@ export declare class FyButtonComponent extends BaseFyComponent<'fy-button'> impl
|
|
|
30
31
|
get animationClassSuffix(): string;
|
|
31
32
|
handleClick(event: MouseEvent): void;
|
|
32
33
|
handleHover(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FyButtonComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FyButtonComponent, "fy-button", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "iconSet": { "alias": "iconSet"; "required": false; }; "activeAnimations": { "alias": "activeAnimations"; "required": false; }; "activeEffects": { "alias": "activeEffects"; "required": false; }; "customStyles": { "alias": "customStyles"; "required": false; }; "hoverAnimation": { "alias": "hoverAnimation"; "required": false; }; "clickAnimation": { "alias": "clickAnimation"; "required": false; }; "successAnimation": { "alias": "successAnimation"; "required": false; }; "errorAnimation": { "alias": "errorAnimation"; "required": false; }; "hoverEffect": { "alias": "hoverEffect"; "required": false; }; "clickEffect": { "alias": "clickEffect"; "required": false; }; "successEffect": { "alias": "successEffect"; "required": false; }; "errorEffect": { "alias": "errorEffect"; "required": false; }; }, { "fyClick": "fyClick"; }, never, never, true, never>;
|
|
33
36
|
}
|