@kayf/ui 0.1.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.
- package/dist/components/AuroraCard/AuroraCard.d.ts +22 -0
- package/dist/components/BeamButton/BeamButton.d.ts +40 -0
- package/dist/components/GlitchText/GlitchText.d.ts +44 -0
- package/dist/components/HudPanel/HudPanel.d.ts +23 -0
- package/dist/components/SpotlightCard/SpotlightCard.d.ts +12 -0
- package/dist/core/KayfElement.d.ts +20 -0
- package/dist/core/tokens.d.ts +31 -0
- package/dist/index.d.ts +9 -0
- package/dist/kayf-ui.cjs.js +1309 -0
- package/dist/kayf-ui.cjs.js.map +1 -0
- package/dist/kayf-ui.esm.js +1296 -0
- package/dist/kayf-ui.esm.js.map +1 -0
- package/dist/kayf-ui.umd.js +1315 -0
- package/dist/kayf-ui.umd.js.map +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { KayfElement } from '../../core/KayfElement';
|
|
2
|
+
export declare class AuroraCard extends KayfElement {
|
|
3
|
+
private _canvas;
|
|
4
|
+
private _ctx;
|
|
5
|
+
private _blobs;
|
|
6
|
+
private _raf;
|
|
7
|
+
private _resizeOb;
|
|
8
|
+
static get observedAttributes(): string[];
|
|
9
|
+
get speedValue(): number;
|
|
10
|
+
get blurSize(): number;
|
|
11
|
+
get opacityValue(): number;
|
|
12
|
+
get isStatic(): boolean;
|
|
13
|
+
get colorList(): number[][];
|
|
14
|
+
protected styles(): string;
|
|
15
|
+
protected template(): string;
|
|
16
|
+
protected setup(): void;
|
|
17
|
+
protected cleanup(): void;
|
|
18
|
+
private _initBlobs;
|
|
19
|
+
private _resize;
|
|
20
|
+
private _startLoop;
|
|
21
|
+
private _drawFrame;
|
|
22
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { KayfElement } from '../../core/KayfElement';
|
|
2
|
+
import { ColorVariant } from '../../core/tokens';
|
|
3
|
+
/**
|
|
4
|
+
* <kayf-beam-button>
|
|
5
|
+
*
|
|
6
|
+
* Атрибуты:
|
|
7
|
+
* color — cyan | violet | emerald | amber | red (default: cyan)
|
|
8
|
+
* variant — solid | outline | ghost (default: outline)
|
|
9
|
+
* size — sm | md | lg (default: md)
|
|
10
|
+
* disabled — boolean
|
|
11
|
+
* loading — boolean, показывает spinner
|
|
12
|
+
*
|
|
13
|
+
* Слоты:
|
|
14
|
+
* (default) — текст кнопки
|
|
15
|
+
* icon-left — иконка слева
|
|
16
|
+
* icon-right — иконка справа
|
|
17
|
+
*
|
|
18
|
+
* События:
|
|
19
|
+
* kayf-click — не срабатывает если disabled/loading
|
|
20
|
+
*
|
|
21
|
+
* Пример:
|
|
22
|
+
* <kayf-beam-button color="cyan" variant="solid" size="lg">
|
|
23
|
+
* Launch Eclipse
|
|
24
|
+
* </kayf-beam-button>
|
|
25
|
+
*/
|
|
26
|
+
type Variant = 'solid' | 'outline' | 'ghost';
|
|
27
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
28
|
+
export declare class BeamButton extends KayfElement {
|
|
29
|
+
static get observedAttributes(): string[];
|
|
30
|
+
get color(): ColorVariant;
|
|
31
|
+
get variant(): Variant;
|
|
32
|
+
get size(): Size;
|
|
33
|
+
get isDisabled(): boolean;
|
|
34
|
+
get isLoading(): boolean;
|
|
35
|
+
protected styles(): string;
|
|
36
|
+
protected template(): string;
|
|
37
|
+
protected setup(): void;
|
|
38
|
+
protected cleanup(): void;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { KayfElement } from '../../core/KayfElement';
|
|
2
|
+
import { ColorVariant } from '../../core/tokens';
|
|
3
|
+
/**
|
|
4
|
+
* <kayf-glitch-text>
|
|
5
|
+
*
|
|
6
|
+
* Атрибуты:
|
|
7
|
+
* color - cyan | violet | emerald | amber | red | white (default: cyan)
|
|
8
|
+
* intensity - subtle | medium | hard (default: medium)
|
|
9
|
+
* speed - slow | normal | fast (default: normal)
|
|
10
|
+
* text - fallback текст, если slot пустой
|
|
11
|
+
* static - boolean, отключает анимации
|
|
12
|
+
* uppercase - boolean, включает text-transform: uppercase
|
|
13
|
+
*
|
|
14
|
+
* Пример:
|
|
15
|
+
* <kayf-glitch-text color="violet" intensity="hard">
|
|
16
|
+
* SIGNAL LOST
|
|
17
|
+
* </kayf-glitch-text>
|
|
18
|
+
*/
|
|
19
|
+
type Intensity = 'subtle' | 'medium' | 'hard';
|
|
20
|
+
type Speed = 'slow' | 'normal' | 'fast';
|
|
21
|
+
export declare class GlitchText extends KayfElement {
|
|
22
|
+
private _wrap?;
|
|
23
|
+
private _slot?;
|
|
24
|
+
private _layerA?;
|
|
25
|
+
private _layerB?;
|
|
26
|
+
private _onSlotChange?;
|
|
27
|
+
private _onEnter?;
|
|
28
|
+
private _observer?;
|
|
29
|
+
private _burstInterval;
|
|
30
|
+
private _burstTimeout;
|
|
31
|
+
static get observedAttributes(): string[];
|
|
32
|
+
get color(): ColorVariant;
|
|
33
|
+
get intensity(): Intensity;
|
|
34
|
+
get speed(): Speed;
|
|
35
|
+
get isStatic(): boolean;
|
|
36
|
+
get isUppercase(): boolean;
|
|
37
|
+
protected styles(): string;
|
|
38
|
+
protected template(): string;
|
|
39
|
+
protected setup(): void;
|
|
40
|
+
protected cleanup(): void;
|
|
41
|
+
private _resolveText;
|
|
42
|
+
private _burst;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { KayfElement } from '../../core/KayfElement';
|
|
2
|
+
import { ColorVariant } from '../../core/tokens';
|
|
3
|
+
export declare class HudPanel extends KayfElement {
|
|
4
|
+
private _panel?;
|
|
5
|
+
private _spot?;
|
|
6
|
+
private _titleSlot?;
|
|
7
|
+
private _metaSlot?;
|
|
8
|
+
private _footerSlot?;
|
|
9
|
+
private _onMove?;
|
|
10
|
+
private _onLeave?;
|
|
11
|
+
private _onSlotChange?;
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
get color(): ColorVariant;
|
|
14
|
+
get glowLevel(): string;
|
|
15
|
+
get radius(): number;
|
|
16
|
+
get padding(): number;
|
|
17
|
+
protected styles(): string;
|
|
18
|
+
protected template(): string;
|
|
19
|
+
protected setup(): void;
|
|
20
|
+
protected cleanup(): void;
|
|
21
|
+
private _syncSlotState;
|
|
22
|
+
private _slotHasContent;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KayfElement } from '../../core/KayfElement';
|
|
2
|
+
import { ColorVariant } from '../../core/tokens';
|
|
3
|
+
export declare class SpotlightCard extends KayfElement {
|
|
4
|
+
static get observedAttributes(): string[];
|
|
5
|
+
get color(): ColorVariant;
|
|
6
|
+
get glowLevel(): string;
|
|
7
|
+
get radius(): number;
|
|
8
|
+
protected styles(): string;
|
|
9
|
+
protected template(): string;
|
|
10
|
+
protected setup(): void;
|
|
11
|
+
protected cleanup(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KayfElement - базовый класс для всех компонентов.
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class KayfElement extends HTMLElement {
|
|
5
|
+
protected root: ShadowRoot;
|
|
6
|
+
constructor();
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
protected update(): void;
|
|
12
|
+
protected abstract template(): string;
|
|
13
|
+
protected styles(): string;
|
|
14
|
+
protected render(): void;
|
|
15
|
+
protected setup(): void;
|
|
16
|
+
protected cleanup(): void;
|
|
17
|
+
protected attr(name: string, fallback?: string): string;
|
|
18
|
+
protected numAttr(name: string, fallback?: number): number;
|
|
19
|
+
protected boolAttr(name: string): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const tokens: {
|
|
2
|
+
readonly colors: {
|
|
3
|
+
readonly cyan: "#00d4ff";
|
|
4
|
+
readonly violet: "#7c3aed";
|
|
5
|
+
readonly emerald: "#10b981";
|
|
6
|
+
readonly amber: "#f59e0b";
|
|
7
|
+
readonly red: "#ef4444";
|
|
8
|
+
readonly white: "#e8e8f0";
|
|
9
|
+
};
|
|
10
|
+
readonly glow: {
|
|
11
|
+
readonly cyan: "rgba(0, 212, 255, 0.2)";
|
|
12
|
+
readonly violet: "rgba(124, 58, 237, 0.2)";
|
|
13
|
+
readonly emerald: "rgba(16, 185, 129, 0.2)";
|
|
14
|
+
readonly amber: "rgba(245, 158, 11, 0.2)";
|
|
15
|
+
readonly red: "rgba(239, 68, 68, 0.2)";
|
|
16
|
+
readonly white: "rgba(232, 232, 240, 0.2)";
|
|
17
|
+
};
|
|
18
|
+
readonly spotlight: {
|
|
19
|
+
readonly cyan: "rgba(0, 212, 255, 0.12)";
|
|
20
|
+
readonly violet: "rgba(124, 58, 237, 0.12)";
|
|
21
|
+
readonly emerald: "rgba(16, 185, 129, 0.12)";
|
|
22
|
+
readonly amber: "rgba(245, 158, 11, 0.12)";
|
|
23
|
+
readonly red: "rgba(239, 68, 68, 0.12)";
|
|
24
|
+
readonly white: "rgba(232, 232, 240, 0.12)";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ColorVariant = keyof typeof tokens.colors;
|
|
28
|
+
export declare const baseCSS = "\n :host {\n --kayf-cyan: #00d4ff;\n --kayf-violet: #7c3aed;\n --kayf-emerald: #10b981;\n --kayf-amber: #f59e0b;\n --kayf-red: #ef4444;\n --kayf-bg: #050508;\n --kayf-surface: rgba(255, 255, 255, 0.03);\n --kayf-border: rgba(255, 255, 255, 0.07);\n --kayf-text: #e8e8f0;\n --kayf-muted: rgba(232, 232, 240, 0.4);\n --kayf-font-sans: 'Syne', system-ui, sans-serif;\n --kayf-font-mono: 'JetBrains Mono', monospace;\n }\n";
|
|
29
|
+
export declare function getColor(v: ColorVariant | string): string;
|
|
30
|
+
export declare function getGlow(v: ColorVariant | string): string;
|
|
31
|
+
export declare function getSpotlight(v: ColorVariant | string): string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { KayfElement } from './core/KayfElement';
|
|
2
|
+
export { tokens, baseCSS, getColor, getGlow, getSpotlight } from './core/tokens';
|
|
3
|
+
export type { ColorVariant } from './core/tokens';
|
|
4
|
+
export { SpotlightCard } from './components/SpotlightCard/SpotlightCard';
|
|
5
|
+
export { BeamButton } from './components/BeamButton/BeamButton';
|
|
6
|
+
export { AuroraCard } from './components/AuroraCard/AuroraCard';
|
|
7
|
+
export { GlitchText } from './components/GlitchText/GlitchText';
|
|
8
|
+
export { HudPanel } from './components/HudPanel/HudPanel';
|
|
9
|
+
export declare const version = "0.1.0";
|