@fylib/adapter-angular 0.1.0 → 0.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.
Files changed (28) hide show
  1. package/dist/components/accordion.component.js +128 -128
  2. package/dist/components/badge.component.js +43 -43
  3. package/dist/components/button.component.js +103 -103
  4. package/dist/components/card.component.js +103 -103
  5. package/dist/components/chart.component.js +72 -72
  6. package/dist/components/icon.component.js +29 -29
  7. package/dist/components/input.component.js +111 -111
  8. package/dist/components/modal.component.js +122 -122
  9. package/dist/components/nav-link.component.js +56 -56
  10. package/dist/components/notification-menu.component.js +388 -388
  11. package/dist/components/select.component.js +122 -122
  12. package/dist/components/table.component.js +371 -371
  13. package/dist/components/text.component.js +2 -2
  14. package/dist/components/toast.component.js +115 -115
  15. package/dist/directives/theme-vars.directive.js +10 -10
  16. package/dist/directives/wallpaper.directive.js +5 -5
  17. package/dist/layouts/layout.component.js +69 -69
  18. package/dist/layouts/slot.component.js +584 -584
  19. package/dist/schematics/collection.json +9 -0
  20. package/dist/schematics/ng-add/index.d.ts +2 -0
  21. package/dist/schematics/ng-add/index.js +80 -0
  22. package/dist/schematics/ng-add/index.js.map +1 -0
  23. package/dist/schematics/ng-add/schema.json +8 -0
  24. package/dist/schematics/templates/fylib/crypto.config.ts.template +7 -0
  25. package/dist/schematics/templates/fylib/logging.config.ts.template +9 -0
  26. package/dist/schematics/templates/fylib/sse.config.ts.template +7 -0
  27. package/dist/schematics/templates/fylib/theme.config.ts.template +9 -0
  28. package/package.json +46 -43
@@ -200,135 +200,135 @@ FyAccordionComponent = __decorate([
200
200
  selector: 'fy-accordion',
201
201
  standalone: true,
202
202
  imports: [CommonModule],
203
- template: `
204
- <div class="fy-accordion"
205
- [class.fy-accordion--bordered]="bordered"
206
- [class.fy-accordion--flush]="flush"
207
- role="presentation">
208
- @for (it of items; track it.id; let i = $index) {
209
- <section class="fy-accordion__item"
210
- [class.fy-accordion__item--active]="isActive(i)"
211
- [class.fy-accordion__item--disabled]="it.disabled">
212
- <header class="fy-accordion__header"
213
- (click)="toggle(i)"
214
- (keydown)="handleKeyDown($event, i)"
215
- [attr.aria-expanded]="isActive(i)"
216
- [attr.aria-controls]="'fy-accordion-panel-' + it.id"
217
- [attr.aria-disabled]="it.disabled || disabled"
218
- [attr.id]="'fy-accordion-header-' + it.id"
219
- [tabindex]="it.disabled || disabled ? -1 : 0"
220
- role="button">
221
- <div class="fy-accordion__header-main">
222
- <h4 class="fy-accordion__title">{{ it.title }}</h4>
223
- @if (it.subtitle) { <p class="fy-accordion__subtitle">{{ it.subtitle }}</p> }
224
- </div>
225
- <span class="fy-accordion__indicator"
226
- [class.fy-accordion__indicator--open]="isActive(i)"
227
- aria-hidden="true">▾</span>
228
- </header>
229
-
230
- <div
231
- class="fy-accordion__panel-wrapper"
232
- [ngClass]="getPanelClasses(i)"
233
- [attr.id]="'fy-accordion-panel-' + it.id"
234
- [attr.aria-labelledby]="'fy-accordion-header-' + it.id"
235
- [attr.aria-hidden]="!isActive(i)"
236
- role="region"
237
- >
238
- <div class="fy-accordion__panel">
239
- @if (!lazy || isActive(i)) {
240
- @if (it.content) {
241
- <div class="fy-accordion__content">{{ it.content }}</div>
242
- } @else {
243
- <ng-content select="[fy-accordion-item-content={{it.id}}]"></ng-content>
244
- }
245
- }
246
- </div>
247
- </div>
248
- </section>
249
- }
250
- </div>
203
+ template: `
204
+ <div class="fy-accordion"
205
+ [class.fy-accordion--bordered]="bordered"
206
+ [class.fy-accordion--flush]="flush"
207
+ role="presentation">
208
+ @for (it of items; track it.id; let i = $index) {
209
+ <section class="fy-accordion__item"
210
+ [class.fy-accordion__item--active]="isActive(i)"
211
+ [class.fy-accordion__item--disabled]="it.disabled">
212
+ <header class="fy-accordion__header"
213
+ (click)="toggle(i)"
214
+ (keydown)="handleKeyDown($event, i)"
215
+ [attr.aria-expanded]="isActive(i)"
216
+ [attr.aria-controls]="'fy-accordion-panel-' + it.id"
217
+ [attr.aria-disabled]="it.disabled || disabled"
218
+ [attr.id]="'fy-accordion-header-' + it.id"
219
+ [tabindex]="it.disabled || disabled ? -1 : 0"
220
+ role="button">
221
+ <div class="fy-accordion__header-main">
222
+ <h4 class="fy-accordion__title">{{ it.title }}</h4>
223
+ @if (it.subtitle) { <p class="fy-accordion__subtitle">{{ it.subtitle }}</p> }
224
+ </div>
225
+ <span class="fy-accordion__indicator"
226
+ [class.fy-accordion__indicator--open]="isActive(i)"
227
+ aria-hidden="true">▾</span>
228
+ </header>
229
+
230
+ <div
231
+ class="fy-accordion__panel-wrapper"
232
+ [ngClass]="getPanelClasses(i)"
233
+ [attr.id]="'fy-accordion-panel-' + it.id"
234
+ [attr.aria-labelledby]="'fy-accordion-header-' + it.id"
235
+ [attr.aria-hidden]="!isActive(i)"
236
+ role="region"
237
+ >
238
+ <div class="fy-accordion__panel">
239
+ @if (!lazy || isActive(i)) {
240
+ @if (it.content) {
241
+ <div class="fy-accordion__content">{{ it.content }}</div>
242
+ } @else {
243
+ <ng-content select="[fy-accordion-item-content={{it.id}}]"></ng-content>
244
+ }
245
+ }
246
+ </div>
247
+ </div>
248
+ </section>
249
+ }
250
+ </div>
251
251
  `,
252
- styles: [`
253
- .fy-accordion {
254
- display: flex;
255
- flex-direction: column;
256
- gap: 8px;
257
- }
258
- .fy-accordion--bordered {
259
- border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));
260
- border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));
261
- padding: 4px;
262
- background: var(--fy-effects-accordion-background, #fff);
263
- box-shadow: var(--fy-effects-accordion-shadow, none);
264
- }
265
- .fy-accordion--flush { border: none; padding: 0; }
266
-
267
- .fy-accordion__item {
268
- background: var(--fy-effects-accordion-background, #fff);
269
- border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));
270
- border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));
271
- overflow: hidden;
272
- }
273
- .fy-accordion--flush .fy-accordion__item {
274
- border: none;
275
- border-radius: 0;
276
- background: transparent;
277
- }
278
-
279
- .fy-accordion__header {
280
- display: flex;
281
- align-items: center;
282
- justify-content: space-between;
283
- gap: 8px;
284
- padding: 10px 12px;
285
- background: var(--fy-effects-accordion-headerBackground, transparent);
286
- cursor: pointer;
287
- user-select: none;
288
- }
289
- .fy-accordion__title {
290
- margin: 0;
291
- font-size: var(--fy-typography-fontSize-md, 14px);
292
- font-weight: var(--fy-typography-fontWeight-bold, 600);
293
- }
294
- .fy-accordion__subtitle {
295
- margin: 0;
296
- font-size: var(--fy-typography-fontSize-sm, 11px);
297
- opacity: .7;
298
- }
299
- .fy-accordion__header-main {
300
- display: flex;
301
- flex-direction: column;
302
- gap: 2px;
303
- }
304
- .fy-accordion__indicator {
305
- transition: transform .2s ease;
306
- }
307
- .fy-accordion__indicator--open { transform: rotate(180deg); }
308
-
309
- .fy-accordion__panel-wrapper {
310
- display: grid;
311
- grid-template-rows: 0fr;
312
- transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
313
- opacity: 0;
314
- overflow: hidden;
315
- }
316
-
317
- .fy-accordion__panel-wrapper--active {
318
- grid-template-rows: 1fr;
319
- opacity: 1;
320
- }
321
-
322
- .fy-accordion__panel {
323
- min-height: 0;
324
- border-top: 1px solid var(--fy-effects-accordion-dividerColor, rgba(0,0,0,0.08));
325
- padding: 0 12px;
326
- transition: padding 0.3s ease;
327
- }
328
-
329
- .fy-accordion__panel-wrapper--active .fy-accordion__panel {
330
- padding: 12px;
331
- }
252
+ styles: [`
253
+ .fy-accordion {
254
+ display: flex;
255
+ flex-direction: column;
256
+ gap: 8px;
257
+ }
258
+ .fy-accordion--bordered {
259
+ border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));
260
+ border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));
261
+ padding: 4px;
262
+ background: var(--fy-effects-accordion-background, #fff);
263
+ box-shadow: var(--fy-effects-accordion-shadow, none);
264
+ }
265
+ .fy-accordion--flush { border: none; padding: 0; }
266
+
267
+ .fy-accordion__item {
268
+ background: var(--fy-effects-accordion-background, #fff);
269
+ border: 1px solid var(--fy-effects-accordion-borderColor, rgba(0,0,0,0.1));
270
+ border-radius: var(--fy-effects-accordion-borderRadius, var(--fy-borderRadius-md));
271
+ overflow: hidden;
272
+ }
273
+ .fy-accordion--flush .fy-accordion__item {
274
+ border: none;
275
+ border-radius: 0;
276
+ background: transparent;
277
+ }
278
+
279
+ .fy-accordion__header {
280
+ display: flex;
281
+ align-items: center;
282
+ justify-content: space-between;
283
+ gap: 8px;
284
+ padding: 10px 12px;
285
+ background: var(--fy-effects-accordion-headerBackground, transparent);
286
+ cursor: pointer;
287
+ user-select: none;
288
+ }
289
+ .fy-accordion__title {
290
+ margin: 0;
291
+ font-size: var(--fy-typography-fontSize-md, 14px);
292
+ font-weight: var(--fy-typography-fontWeight-bold, 600);
293
+ }
294
+ .fy-accordion__subtitle {
295
+ margin: 0;
296
+ font-size: var(--fy-typography-fontSize-sm, 11px);
297
+ opacity: .7;
298
+ }
299
+ .fy-accordion__header-main {
300
+ display: flex;
301
+ flex-direction: column;
302
+ gap: 2px;
303
+ }
304
+ .fy-accordion__indicator {
305
+ transition: transform .2s ease;
306
+ }
307
+ .fy-accordion__indicator--open { transform: rotate(180deg); }
308
+
309
+ .fy-accordion__panel-wrapper {
310
+ display: grid;
311
+ grid-template-rows: 0fr;
312
+ transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
313
+ opacity: 0;
314
+ overflow: hidden;
315
+ }
316
+
317
+ .fy-accordion__panel-wrapper--active {
318
+ grid-template-rows: 1fr;
319
+ opacity: 1;
320
+ }
321
+
322
+ .fy-accordion__panel {
323
+ min-height: 0;
324
+ border-top: 1px solid var(--fy-effects-accordion-dividerColor, rgba(0,0,0,0.08));
325
+ padding: 0 12px;
326
+ transition: padding 0.3s ease;
327
+ }
328
+
329
+ .fy-accordion__panel-wrapper--active .fy-accordion__panel {
330
+ padding: 12px;
331
+ }
332
332
  `],
333
333
  encapsulation: ViewEncapsulation.None
334
334
  }),
@@ -61,50 +61,50 @@ FyBadgeComponent = __decorate([
61
61
  selector: 'fy-badge',
62
62
  standalone: true,
63
63
  imports: [CommonModule],
64
- template: `
65
- <span class="fy-badge" [class.fy-badge--shine]="shineClass()" [ngStyle]="badgeStyle()" >
66
- <ng-content></ng-content>
67
- @if (text) {
68
- <span>{{ text }}</span>
69
- }
70
- </span>
64
+ template: `
65
+ <span class="fy-badge" [class.fy-badge--shine]="shineClass()" [ngStyle]="badgeStyle()" >
66
+ <ng-content></ng-content>
67
+ @if (text) {
68
+ <span>{{ text }}</span>
69
+ }
70
+ </span>
71
71
  `,
72
- styles: [`
73
- .fy-badge {
74
- display: inline-flex;
75
- align-items: center;
76
- justify-content: center;
77
- padding: 0 6px;
78
- min-width: 16px;
79
- height: 16px;
80
- font-size: 10px;
81
- font-weight: 700;
82
- line-height: 1;
83
- border-radius: 8px;
84
- background-color: var(--fy-badge-background, #ff4757);
85
- color: var(--fy-badge-textColor, #fff);
86
- box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
87
- white-space: nowrap;
88
- }
89
- .fy-badge.fy-badge--shine {
90
- position: relative;
91
- overflow: hidden;
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
- }
72
+ styles: [`
73
+ .fy-badge {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ padding: 0 6px;
78
+ min-width: 16px;
79
+ height: 16px;
80
+ font-size: 10px;
81
+ font-weight: 700;
82
+ line-height: 1;
83
+ border-radius: 8px;
84
+ background-color: var(--fy-badge-background, #ff4757);
85
+ color: var(--fy-badge-textColor, #fff);
86
+ box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
87
+ white-space: nowrap;
88
+ }
89
+ .fy-badge.fy-badge--shine {
90
+ position: relative;
91
+ overflow: hidden;
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
108
  `],
109
109
  encapsulation: ViewEncapsulation.None
110
110
  })
@@ -160,110 +160,110 @@ FyButtonComponent = __decorate([
160
160
  selector: 'fy-button',
161
161
  standalone: true,
162
162
  imports: [CommonModule, FyIconComponent],
163
- template: `
164
- <button
165
- [class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
166
- [disabled]="disabled || loading"
167
- (click)="handleClick($event)"
168
- (mouseenter)="handleHover()"
169
- [style]="hostStyles"
170
- [attr.aria-busy]="loading"
171
- [attr.aria-live]="loading ? 'polite' : null"
172
- [attr.aria-label]="label || iconName || icon"
173
- >
174
- @if(loading) {
175
- <span class="fy-button__loader"></span>
176
- }
177
- @if(iconName && !loading) {
178
- <fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
179
- } @else if(icon && !loading) {
180
- <span [class]="'fy-button__icon ' + icon"></span>
181
- }
182
- @if (label) {
183
- <span class="fy-button__label">{{ label }}</span>
184
- }
185
- </button>
163
+ template: `
164
+ <button
165
+ [class]="'fy-button fy-button--' + variant + ' fy-button--' + size + animationClassSuffix"
166
+ [disabled]="disabled || loading"
167
+ (click)="handleClick($event)"
168
+ (mouseenter)="handleHover()"
169
+ [style]="hostStyles"
170
+ [attr.aria-busy]="loading"
171
+ [attr.aria-live]="loading ? 'polite' : null"
172
+ [attr.aria-label]="label || iconName || icon"
173
+ >
174
+ @if(loading) {
175
+ <span class="fy-button__loader"></span>
176
+ }
177
+ @if(iconName && !loading) {
178
+ <fy-icon [name]="iconName" [set]="iconSet" class="fy-button__icon"></fy-icon>
179
+ } @else if(icon && !loading) {
180
+ <span [class]="'fy-button__icon ' + icon"></span>
181
+ }
182
+ @if (label) {
183
+ <span class="fy-button__label">{{ label }}</span>
184
+ }
185
+ </button>
186
186
  `,
187
- styles: [`
188
- .fy-button {
189
- display: inline-flex;
190
- align-items: center;
191
- justify-content: center;
192
- padding: var(--fy-spacing-sm) var(--fy-spacing-md);
193
- border-radius: var(--fy-borderRadius-md);
194
- font-family: inherit;
195
- font-size: var(--fy-typography-fontSize-md);
196
- font-weight: var(--fy-typography-fontWeight-bold);
197
- cursor: pointer;
198
- transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
199
- border: 1px solid var(--fy-effects-button-borderColor, transparent);
200
- background: var(--fy-effects-button-background, var(--fy-colors-primary));
201
- color: var(--fy-effects-button-textColor, var(--fy-colors-white));
202
- outline: none;
203
- user-select: none;
204
- position: relative;
205
- overflow: hidden;
206
- gap: 8px;
207
- }
208
-
209
- .fy-animations-disabled, .fy-animations-disabled * {
210
- transition: none !important;
211
- animation: none !important;
212
- }
213
-
214
- .fy-button--secondary {
215
- background: none !important;
216
- background-color: var(--fy-colors-secondary) !important;
217
- color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;
218
- }
219
-
220
- .fy-button--ghost {
221
- background: none !important;
222
- background-color: transparent !important;
223
- color: var(--fy-colors-primary) !important;
224
- border-color: var(--fy-colors-primary) !important;
225
- }
226
-
227
- .fy-button--ghost:hover:not(:disabled) {
228
- background-color: rgba(var(--fy-colors-primary-rgb, 59, 130, 246), 0.1);
229
- }
230
-
231
- .fy-button--danger {
232
- background: none !important;
233
- background-color: var(--fy-colors-danger) !important;
234
- color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;
235
- }
236
-
237
- .fy-button--sm {
238
- padding: var(--fy-spacing-xs) var(--fy-spacing-sm);
239
- font-size: var(--fy-typography-fontSize-sm);
240
- }
241
-
242
- .fy-button--lg {
243
- padding: var(--fy-spacing-md) var(--fy-spacing-lg);
244
- font-size: var(--fy-typography-fontSize-lg);
245
- }
246
-
247
- .fy-button:disabled {
248
- opacity: 0.6;
249
- cursor: not-allowed;
250
- }
251
-
252
- .fy-button__loader {
253
- width: 16px;
254
- height: 16px;
255
- border: 2px solid currentColor;
256
- border-bottom-color: transparent;
257
- border-radius: 50%;
258
- display: inline-block;
259
- animation: fy-spin 0.8s linear infinite;
260
- flex-shrink: 0;
261
- }
262
-
263
- @keyframes fy-spin {
264
- from { transform: rotate(0deg); }
265
- to { transform: rotate(360deg); }
266
- }
187
+ styles: [`
188
+ .fy-button {
189
+ display: inline-flex;
190
+ align-items: center;
191
+ justify-content: center;
192
+ padding: var(--fy-spacing-sm) var(--fy-spacing-md);
193
+ border-radius: var(--fy-borderRadius-md);
194
+ font-family: inherit;
195
+ font-size: var(--fy-typography-fontSize-md);
196
+ font-weight: var(--fy-typography-fontWeight-bold);
197
+ cursor: pointer;
198
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
199
+ border: 1px solid var(--fy-effects-button-borderColor, transparent);
200
+ background: var(--fy-effects-button-background, var(--fy-colors-primary));
201
+ color: var(--fy-effects-button-textColor, var(--fy-colors-white));
202
+ outline: none;
203
+ user-select: none;
204
+ position: relative;
205
+ overflow: hidden;
206
+ gap: 8px;
207
+ }
208
+
209
+ .fy-animations-disabled, .fy-animations-disabled * {
210
+ transition: none !important;
211
+ animation: none !important;
212
+ }
213
+
214
+ .fy-button--secondary {
215
+ background: none !important;
216
+ background-color: var(--fy-colors-secondary) !important;
217
+ color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;
218
+ }
219
+
220
+ .fy-button--ghost {
221
+ background: none !important;
222
+ background-color: transparent !important;
223
+ color: var(--fy-colors-primary) !important;
224
+ border-color: var(--fy-colors-primary) !important;
225
+ }
226
+
227
+ .fy-button--ghost:hover:not(:disabled) {
228
+ background-color: rgba(var(--fy-colors-primary-rgb, 59, 130, 246), 0.1);
229
+ }
230
+
231
+ .fy-button--danger {
232
+ background: none !important;
233
+ background-color: var(--fy-colors-danger) !important;
234
+ color: var(--fy-effects-button-textColor, var(--fy-colors-white)) !important;
235
+ }
236
+
237
+ .fy-button--sm {
238
+ padding: var(--fy-spacing-xs) var(--fy-spacing-sm);
239
+ font-size: var(--fy-typography-fontSize-sm);
240
+ }
241
+
242
+ .fy-button--lg {
243
+ padding: var(--fy-spacing-md) var(--fy-spacing-lg);
244
+ font-size: var(--fy-typography-fontSize-lg);
245
+ }
246
+
247
+ .fy-button:disabled {
248
+ opacity: 0.6;
249
+ cursor: not-allowed;
250
+ }
251
+
252
+ .fy-button__loader {
253
+ width: 16px;
254
+ height: 16px;
255
+ border: 2px solid currentColor;
256
+ border-bottom-color: transparent;
257
+ border-radius: 50%;
258
+ display: inline-block;
259
+ animation: fy-spin 0.8s linear infinite;
260
+ flex-shrink: 0;
261
+ }
262
+
263
+ @keyframes fy-spin {
264
+ from { transform: rotate(0deg); }
265
+ to { transform: rotate(360deg); }
266
+ }
267
267
  `],
268
268
  encapsulation: ViewEncapsulation.None
269
269
  }),