feat: add @sda/flair-elements-ui library
Angular 19+ standalone library with 61 components, 15 directives, and 8 services for decorative visual effects, animations, and micro-interactions. Components include particle systems, flow fields, aurora effects, tilt/holographic/spotlight cards, text effects, dividers, scroll animations, generative art, celebrations, image treatments, morphing shapes, terminal output, and pattern textures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
35
src/components/fl-glow-badge/fl-glow-badge.component.scss
Normal file
35
src/components/fl-glow-badge/fl-glow-badge.component.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.fl-glow-badge__inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 9999px;
|
||||
background: currentColor;
|
||||
color: white;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
will-change: box-shadow;
|
||||
|
||||
&--pulse {
|
||||
animation: fl-glow-badge-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fl-glow-badge-pulse {
|
||||
0%, 100% {
|
||||
filter: brightness(1);
|
||||
}
|
||||
50% {
|
||||
filter: brightness(1.3);
|
||||
}
|
||||
}
|
||||
|
||||
:host.fl-glow-badge--reduced-motion {
|
||||
.fl-glow-badge__inner--pulse {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
42
src/components/fl-glow-badge/fl-glow-badge.component.ts
Normal file
42
src/components/fl-glow-badge/fl-glow-badge.component.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import {
|
||||
Component, ChangeDetectionStrategy, input, inject, computed,
|
||||
DestroyRef,
|
||||
} from '@angular/core';
|
||||
import { ReducedMotionService } from '../../services/reduced-motion.service';
|
||||
|
||||
@Component({
|
||||
selector: 'fl-glow-badge',
|
||||
standalone: true,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<div
|
||||
class="fl-glow-badge__inner"
|
||||
[style.color]="color()"
|
||||
[style.box-shadow]="boxShadow()"
|
||||
[class.fl-glow-badge__inner--pulse]="pulse()"
|
||||
>
|
||||
<ng-content />
|
||||
</div>
|
||||
`,
|
||||
styleUrl: './fl-glow-badge.component.scss',
|
||||
host: {
|
||||
'class': 'fl-glow-badge',
|
||||
'[class.fl-glow-badge--reduced-motion]': 'reducedMotion.reduced()',
|
||||
},
|
||||
})
|
||||
export class FlGlowBadgeComponent {
|
||||
private reducedMotion = inject(ReducedMotionService);
|
||||
private destroyRef = inject(DestroyRef);
|
||||
|
||||
// Inputs
|
||||
readonly color = input('#3b82f6');
|
||||
readonly glowSize = input(10);
|
||||
readonly pulse = input(false);
|
||||
|
||||
// Computed
|
||||
readonly boxShadow = computed(() => {
|
||||
const size = this.glowSize();
|
||||
const c = this.color();
|
||||
return `0 0 ${size}px ${c}, 0 0 ${size * 2}px ${c}`;
|
||||
});
|
||||
}
|
||||
1
src/components/fl-glow-badge/index.ts
Normal file
1
src/components/fl-glow-badge/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './fl-glow-badge.component';
|
||||
Reference in New Issue
Block a user