@fylib/adapter-angular 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +64 -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
@@ -48,8 +48,8 @@ FyTextComponent = __decorate([
48
48
  Component({
49
49
  selector: 'fy-text',
50
50
  standalone: true,
51
- template: `
52
- <span>{{ value() }}</span>
51
+ template: `
52
+ <span>{{ value() }}</span>
53
53
  `,
54
54
  encapsulation: ViewEncapsulation.None
55
55
  }),
@@ -136,122 +136,122 @@ FyToastComponent = __decorate([
136
136
  selector: 'fy-toast',
137
137
  standalone: true,
138
138
  imports: [CommonModule, FyIconComponent],
139
- template: `
140
- <div
141
- class="fy-toast"
142
- [class]="'fy-toast--' + type"
143
- [class]="composeAnimClasses(animationClassSuffix)"
144
- [style]="getHostStyles(customStyles)"
145
- >
146
- @if (showIcon) {
147
- <div class="fy-toast__icon">
148
- <fy-icon [name]="resolvedIcon" [color]="resolvedIconColor"></fy-icon>
149
- </div>
150
- }
151
-
152
- <div class="fy-toast__content">
153
- @if (title) { <div class="fy-toast__title">{{ title }}</div> }
154
- <div class="fy-toast__message">{{ message }}</div>
155
- </div>
156
-
157
- @if (closable) {
158
- <button class="fy-toast__close" (click)="close()">
159
- <fy-icon [name]="resolvedCloseIcon"></fy-icon>
160
- </button>
161
- }
162
- </div>
139
+ template: `
140
+ <div
141
+ class="fy-toast"
142
+ [class]="'fy-toast--' + type"
143
+ [class]="composeAnimClasses(animationClassSuffix)"
144
+ [style]="getHostStyles(customStyles)"
145
+ >
146
+ @if (showIcon) {
147
+ <div class="fy-toast__icon">
148
+ <fy-icon [name]="resolvedIcon" [color]="resolvedIconColor"></fy-icon>
149
+ </div>
150
+ }
151
+
152
+ <div class="fy-toast__content">
153
+ @if (title) { <div class="fy-toast__title">{{ title }}</div> }
154
+ <div class="fy-toast__message">{{ message }}</div>
155
+ </div>
156
+
157
+ @if (closable) {
158
+ <button class="fy-toast__close" (click)="close()">
159
+ <fy-icon [name]="resolvedCloseIcon"></fy-icon>
160
+ </button>
161
+ }
162
+ </div>
163
163
  `,
164
- styles: [`
165
- .fy-toast {
166
- display: flex;
167
- align-items: flex-start;
168
- gap: var(--fy-effects-toast-gap, var(--fy-spacing-sm, 8px));
169
- padding: var(--fy-effects-toast-padding, var(--fy-spacing-md, 12px));
170
- min-width: var(--fy-effects-toast-minWidth, 280px);
171
- max-width: var(--fy-effects-toast-maxWidth, 420px);
172
- background: var(--fy-effects-toast-background, #ffffff);
173
- border: 1px solid var(--fy-effects-toast-borderColor, rgba(0,0,0,0.1));
174
- border-radius: var(--fy-effects-toast-borderRadius, 8px);
175
- box-shadow: var(--fy-effects-toast-shadow, 0 4px 12px rgba(0,0,0,0.1));
176
- color: var(--fy-effects-toast-textColor, inherit);
177
- pointer-events: auto;
178
- margin-bottom: 8px;
179
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
180
- position: relative;
181
- }
182
-
183
- /* Animações base */
184
- .fy-anim-toast-in {
185
- animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
186
- }
187
-
188
- .fy-anim-toast-out {
189
- animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
190
- }
191
-
192
- @keyframes toast-in {
193
- from { transform: translateX(100%); opacity: 0; }
194
- to { transform: translateX(0); opacity: 1; }
195
- }
196
-
197
- @keyframes toast-out {
198
- from { transform: scale(1); opacity: 1; }
199
- to { transform: scale(0.8); opacity: 0; }
200
- }
201
-
202
- .fy-toast__icon {
203
- flex-shrink: 0;
204
- font-size: var(--fy-effects-toast-iconSize, 20px);
205
- display: flex;
206
- align-items: center;
207
- justify-content: center;
208
- }
209
-
210
- .fy-toast--info .fy-toast__icon { color: var(--fy-effects-toast-iconColor-info, var(--fy-colors-info, #007aff)); }
211
- .fy-toast--success .fy-toast__icon { color: var(--fy-effects-toast-iconColor-success, var(--fy-colors-success, #28cd41)); }
212
- .fy-toast--warning .fy-toast__icon { color: var(--fy-effects-toast-iconColor-warning, var(--fy-colors-warning, #ffcc00)); }
213
- .fy-toast--error .fy-toast__icon { color: var(--fy-effects-toast-iconColor-error, var(--fy-colors-danger, #ff3b30)); }
214
-
215
- .fy-toast__content {
216
- flex: 1;
217
- overflow: hidden;
218
- }
219
-
220
- .fy-toast__title {
221
- font-weight: var(--fy-effects-toast-titleFontWeight, var(--fy-typography-fontWeight-bold, 600));
222
- font-size: var(--fy-effects-toast-titleFontSize, var(--fy-typography-fontSize-md, 14px));
223
- margin-bottom: 2px;
224
- }
225
-
226
- .fy-toast__message {
227
- font-size: var(--fy-effects-toast-messageFontSize, var(--fy-typography-fontSize-sm, 13px));
228
- line-height: var(--fy-effects-toast-messageLineHeight, 1.4);
229
- opacity: 0.9;
230
- }
231
-
232
- .fy-toast__close {
233
- position: absolute;
234
- top: 4px;
235
- right: 4px;
236
- flex-shrink: 0;
237
- background: var(--fy-effects-toast-closeButtonBackground, transparent);
238
- border: var(--fy-effects-toast-closeButtonBorder, none);
239
- border-radius: var(--fy-effects-toast-closeButtonBorderRadius, 0);
240
- padding: 2px;
241
- cursor: pointer;
242
- opacity: var(--fy-effects-toast-closeButtonOpacity, 0.5);
243
- transition: opacity 0.2s;
244
- color: currentColor;
245
- display: flex;
246
- align-items: center;
247
- justify-content: center;
248
- width: var(--fy-effects-toast-closeButtonSize, 18px);
249
- height: var(--fy-effects-toast-closeButtonSize, 18px);
250
- }
251
-
252
- .fy-toast__close:hover {
253
- opacity: var(--fy-effects-toast-closeButtonHoverOpacity, 1);
254
- }
164
+ styles: [`
165
+ .fy-toast {
166
+ display: flex;
167
+ align-items: flex-start;
168
+ gap: var(--fy-effects-toast-gap, var(--fy-spacing-sm, 8px));
169
+ padding: var(--fy-effects-toast-padding, var(--fy-spacing-md, 12px));
170
+ min-width: var(--fy-effects-toast-minWidth, 280px);
171
+ max-width: var(--fy-effects-toast-maxWidth, 420px);
172
+ background: var(--fy-effects-toast-background, #ffffff);
173
+ border: 1px solid var(--fy-effects-toast-borderColor, rgba(0,0,0,0.1));
174
+ border-radius: var(--fy-effects-toast-borderRadius, 8px);
175
+ box-shadow: var(--fy-effects-toast-shadow, 0 4px 12px rgba(0,0,0,0.1));
176
+ color: var(--fy-effects-toast-textColor, inherit);
177
+ pointer-events: auto;
178
+ margin-bottom: 8px;
179
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
180
+ position: relative;
181
+ }
182
+
183
+ /* Animações base */
184
+ .fy-anim-toast-in {
185
+ animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
186
+ }
187
+
188
+ .fy-anim-toast-out {
189
+ animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
190
+ }
191
+
192
+ @keyframes toast-in {
193
+ from { transform: translateX(100%); opacity: 0; }
194
+ to { transform: translateX(0); opacity: 1; }
195
+ }
196
+
197
+ @keyframes toast-out {
198
+ from { transform: scale(1); opacity: 1; }
199
+ to { transform: scale(0.8); opacity: 0; }
200
+ }
201
+
202
+ .fy-toast__icon {
203
+ flex-shrink: 0;
204
+ font-size: var(--fy-effects-toast-iconSize, 20px);
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ }
209
+
210
+ .fy-toast--info .fy-toast__icon { color: var(--fy-effects-toast-iconColor-info, var(--fy-colors-info, #007aff)); }
211
+ .fy-toast--success .fy-toast__icon { color: var(--fy-effects-toast-iconColor-success, var(--fy-colors-success, #28cd41)); }
212
+ .fy-toast--warning .fy-toast__icon { color: var(--fy-effects-toast-iconColor-warning, var(--fy-colors-warning, #ffcc00)); }
213
+ .fy-toast--error .fy-toast__icon { color: var(--fy-effects-toast-iconColor-error, var(--fy-colors-danger, #ff3b30)); }
214
+
215
+ .fy-toast__content {
216
+ flex: 1;
217
+ overflow: hidden;
218
+ }
219
+
220
+ .fy-toast__title {
221
+ font-weight: var(--fy-effects-toast-titleFontWeight, var(--fy-typography-fontWeight-bold, 600));
222
+ font-size: var(--fy-effects-toast-titleFontSize, var(--fy-typography-fontSize-md, 14px));
223
+ margin-bottom: 2px;
224
+ }
225
+
226
+ .fy-toast__message {
227
+ font-size: var(--fy-effects-toast-messageFontSize, var(--fy-typography-fontSize-sm, 13px));
228
+ line-height: var(--fy-effects-toast-messageLineHeight, 1.4);
229
+ opacity: 0.9;
230
+ }
231
+
232
+ .fy-toast__close {
233
+ position: absolute;
234
+ top: 4px;
235
+ right: 4px;
236
+ flex-shrink: 0;
237
+ background: var(--fy-effects-toast-closeButtonBackground, transparent);
238
+ border: var(--fy-effects-toast-closeButtonBorder, none);
239
+ border-radius: var(--fy-effects-toast-closeButtonBorderRadius, 0);
240
+ padding: 2px;
241
+ cursor: pointer;
242
+ opacity: var(--fy-effects-toast-closeButtonOpacity, 0.5);
243
+ transition: opacity 0.2s;
244
+ color: currentColor;
245
+ display: flex;
246
+ align-items: center;
247
+ justify-content: center;
248
+ width: var(--fy-effects-toast-closeButtonSize, 18px);
249
+ height: var(--fy-effects-toast-closeButtonSize, 18px);
250
+ }
251
+
252
+ .fy-toast__close:hover {
253
+ opacity: var(--fy-effects-toast-closeButtonHoverOpacity, 1);
254
+ }
255
255
  `],
256
256
  encapsulation: ViewEncapsulation.None
257
257
  }),
@@ -25,16 +25,16 @@ let FyThemeVarsDirective = class FyThemeVarsDirective {
25
25
  if (!doc.getElementById('fy-reset-style')) {
26
26
  const style = doc.createElement('style');
27
27
  style.id = 'fy-reset-style';
28
- style.textContent = `
29
- *,*::before,*::after{box-sizing:border-box}
30
- html,body{height:100%}
31
- body{margin:0;padding:0;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
32
- h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd{margin:0}
33
- ul,ol{margin:0;padding:0;list-style:none}
34
- img,picture,video,canvas,svg{display:block;max-width:100%}
35
- input,button,textarea,select{font:inherit;color:inherit}
36
- a{text-decoration:none;color:inherit}
37
- table{border-collapse:collapse;border-spacing:0}
28
+ style.textContent = `
29
+ *,*::before,*::after{box-sizing:border-box}
30
+ html,body{height:100%}
31
+ body{margin:0;padding:0;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
32
+ h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd{margin:0}
33
+ ul,ol{margin:0;padding:0;list-style:none}
34
+ img,picture,video,canvas,svg{display:block;max-width:100%}
35
+ input,button,textarea,select{font:inherit;color:inherit}
36
+ a{text-decoration:none;color:inherit}
37
+ table{border-collapse:collapse;border-spacing:0}
38
38
  `;
39
39
  doc.head.appendChild(style);
40
40
  }
@@ -158,11 +158,11 @@ let FyWallpaperDirective = class FyWallpaperDirective {
158
158
  return;
159
159
  const style = this.document.createElement('style');
160
160
  style.id = 'fy-wallpaper-styles';
161
- style.innerHTML = `
162
- @keyframes fy-wallpaper-diagonal {
163
- from { background-position: 0 0; }
164
- to { background-position: 200px 200px; }
165
- }
161
+ style.innerHTML = `
162
+ @keyframes fy-wallpaper-diagonal {
163
+ from { background-position: 0 0; }
164
+ to { background-position: 200px 200px; }
165
+ }
166
166
  `;
167
167
  this.document.head.appendChild(style);
168
168
  }
@@ -177,76 +177,76 @@ FyLayoutComponent = __decorate([
177
177
  selector: 'fy-layout',
178
178
  standalone: true,
179
179
  imports: [CommonModule],
180
- template: `
181
- <div [class]="'fy-layout fy-layout--' + name" [ngStyle]="customStyles || null">
182
- <ng-content></ng-content>
183
- </div>
180
+ template: `
181
+ <div [class]="'fy-layout fy-layout--' + name" [ngStyle]="customStyles || null">
182
+ <ng-content></ng-content>
183
+ </div>
184
184
  `,
185
- styles: [`
186
- .fy-layout {
187
- display: flex;
188
- flex-direction: column;
189
- min-height: 100vh;
190
- width: 100%;
191
- overflow-x: hidden;
192
- background-color: var(--fy-colors-background);
193
- color: var(--fy-colors-text);
194
- font-family: var(--fy-typography-fontFamily-base, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
195
- transition: background-color 0.3s ease, color 0.3s ease;
196
- }
197
-
198
- /* App Layout specific styles */
199
- .fy-layout--app-layout {
200
- display: grid;
201
- grid-template-areas:
202
- "header"
203
- "content"
204
- "footer";
205
- grid-template-columns: 1fr;
206
- grid-template-rows: auto 1fr auto;
207
- gap: var(--fy-layout-gap, 0);
208
- }
209
-
210
- /* When sidebar slot is present, switch to two columns */
211
- .fy-layout--app-layout:has(.fy-slot--sidebar) {
212
- grid-template-areas:
213
- "header header"
214
- "sidebar content"
215
- "footer footer";
216
- grid-template-columns: var(--fy-layout-sidebar-width, 260px) 1fr;
217
- }
218
-
219
- /* Fixed Sidebar mode: Lock height to viewport and disable global scroll */
220
- .fy-layout--app-layout:has(.fy-slot--sidebar-fixed) {
221
- height: 100vh;
222
- min-height: 100vh;
223
- max-height: 100vh;
224
- overflow: hidden;
225
- }
226
-
227
- /* Ensure content area takes full height and scrolls internally in fixed mode */
228
- .fy-layout--app-layout:has(.fy-slot--sidebar-fixed) .fy-slot--content {
229
- height: 100%;
230
- overflow-y: auto;
231
- }
232
-
233
- @media (max-width: 768px) {
234
- .fy-layout--app-layout {
235
- grid-template-areas:
236
- "header"
237
- "content"
238
- "footer";
239
- grid-template-columns: 1fr;
240
- }
241
-
242
- .fy-layout--app-layout:has(.fy-slot--sidebar) {
243
- grid-template-areas:
244
- "header"
245
- "content"
246
- "footer";
247
- grid-template-columns: 1fr;
248
- }
249
- }
185
+ styles: [`
186
+ .fy-layout {
187
+ display: flex;
188
+ flex-direction: column;
189
+ min-height: 100vh;
190
+ width: 100%;
191
+ overflow-x: hidden;
192
+ background-color: var(--fy-colors-background);
193
+ color: var(--fy-colors-text);
194
+ font-family: var(--fy-typography-fontFamily-base, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
195
+ transition: background-color 0.3s ease, color 0.3s ease;
196
+ }
197
+
198
+ /* App Layout specific styles */
199
+ .fy-layout--app-layout {
200
+ display: grid;
201
+ grid-template-areas:
202
+ "header"
203
+ "content"
204
+ "footer";
205
+ grid-template-columns: 1fr;
206
+ grid-template-rows: auto 1fr auto;
207
+ gap: var(--fy-layout-gap, 0);
208
+ }
209
+
210
+ /* When sidebar slot is present, switch to two columns */
211
+ .fy-layout--app-layout:has(.fy-slot--sidebar) {
212
+ grid-template-areas:
213
+ "header header"
214
+ "sidebar content"
215
+ "footer footer";
216
+ grid-template-columns: var(--fy-layout-sidebar-width, 260px) 1fr;
217
+ }
218
+
219
+ /* Fixed Sidebar mode: Lock height to viewport and disable global scroll */
220
+ .fy-layout--app-layout:has(.fy-slot--sidebar-fixed) {
221
+ height: 100vh;
222
+ min-height: 100vh;
223
+ max-height: 100vh;
224
+ overflow: hidden;
225
+ }
226
+
227
+ /* Ensure content area takes full height and scrolls internally in fixed mode */
228
+ .fy-layout--app-layout:has(.fy-slot--sidebar-fixed) .fy-slot--content {
229
+ height: 100%;
230
+ overflow-y: auto;
231
+ }
232
+
233
+ @media (max-width: 768px) {
234
+ .fy-layout--app-layout {
235
+ grid-template-areas:
236
+ "header"
237
+ "content"
238
+ "footer";
239
+ grid-template-columns: 1fr;
240
+ }
241
+
242
+ .fy-layout--app-layout:has(.fy-slot--sidebar) {
243
+ grid-template-areas:
244
+ "header"
245
+ "content"
246
+ "footer";
247
+ grid-template-columns: 1fr;
248
+ }
249
+ }
250
250
  `],
251
251
  encapsulation: ViewEncapsulation.None
252
252
  }),