@hyvnt/hyvui 0.2.0 → 0.3.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/README.md +264 -253
- package/dist/components/ambient/CornerBrackets.svelte +83 -87
- package/dist/components/ambient/DataStream.svelte +111 -94
- package/dist/components/ambient/GlyphMark.svelte +69 -69
- package/dist/components/ambient/GridOverlay.svelte +26 -28
- package/dist/components/ambient/ParallaxLayer.svelte +37 -41
- package/dist/components/ambient/ScanBand.svelte +95 -91
- package/dist/components/ambient/SignalRing.svelte +100 -100
- package/dist/components/ambient/ThreadLine.svelte +71 -78
- package/dist/components/ambient/Vignette.svelte +24 -26
- package/dist/components/depth/DepthLayer.svelte +22 -27
- package/dist/components/depth/DepthStage.svelte +63 -62
- package/dist/components/depth/FloatCard.svelte +113 -104
- package/dist/components/depth/HorizonGrid.svelte +216 -160
- package/dist/components/depth/Plinth.svelte +52 -57
- package/dist/components/display/Avatar.svelte +64 -69
- package/dist/components/display/Badge.svelte +59 -63
- package/dist/components/display/Blockquote.svelte +31 -34
- package/dist/components/display/CodeBlock.svelte +71 -76
- package/dist/components/display/MetricCard.svelte +77 -83
- package/dist/components/display/Table.svelte +99 -104
- package/dist/components/feedback/Alert.svelte +71 -76
- package/dist/components/feedback/EmptyState.svelte +68 -68
- package/dist/components/feedback/ErrorState.svelte +73 -73
- package/dist/components/feedback/Skeleton.svelte +52 -52
- package/dist/components/feedback/StatusDot.svelte +49 -54
- package/dist/components/feedback/StatusLine.svelte +122 -122
- package/dist/components/feedback/Toast.svelte +130 -136
- package/dist/components/inputs/Button.svelte +240 -237
- package/dist/components/inputs/Checkbox.svelte +104 -105
- package/dist/components/inputs/FileUpload.svelte +165 -163
- package/dist/components/inputs/Input.svelte +145 -147
- package/dist/components/inputs/Select.svelte +156 -150
- package/dist/components/inputs/Textarea.svelte +153 -154
- package/dist/components/inputs/Toggle.svelte +120 -120
- package/dist/components/layout/Card.svelte +70 -76
- package/dist/components/layout/Drawer.svelte +133 -109
- package/dist/components/layout/Grid.svelte +118 -43
- package/dist/components/layout/Grid.svelte.d.ts +8 -2
- package/dist/components/layout/Modal.svelte +176 -159
- package/dist/components/layout/Panel.svelte +49 -54
- package/dist/components/layout/Popover.svelte +178 -67
- package/dist/components/layout/Popover.svelte.d.ts +10 -1
- package/dist/components/layout/Stack.svelte +53 -53
- package/dist/components/navigation/Breadcrumb.svelte +70 -73
- package/dist/components/navigation/DropdownMenu.svelte +167 -124
- package/dist/components/navigation/DropdownMenu.svelte.d.ts +12 -2
- package/dist/components/navigation/SidebarNav.svelte +86 -90
- package/dist/components/navigation/Tabs.svelte +81 -86
- package/dist/components/navigation/Topbar.svelte +85 -85
- package/dist/components/patterns/ActionBar.svelte +71 -76
- package/dist/components/patterns/ConfirmDialog.svelte +63 -64
- package/dist/components/patterns/PageHeader.svelte +109 -114
- package/dist/components/patterns/SearchBar.svelte +54 -59
- package/dist/components/patterns/TerminalBoot.svelte +104 -104
- package/dist/components/primitives/Divider.svelte +26 -29
- package/dist/components/primitives/Icon.svelte +44 -49
- package/dist/components/primitives/Label.svelte +39 -44
- package/dist/components/primitives/Surface.svelte +89 -87
- package/dist/components/primitives/Text.svelte +98 -98
- package/dist/components/scenes/ArchiveScene.svelte +92 -95
- package/dist/components/scenes/ArchiveScene.svelte.d.ts +7 -1
- package/dist/components/scenes/LogScene.svelte +72 -77
- package/dist/components/scenes/NarrativeScene.svelte +91 -92
- package/dist/components/scenes/ReadoutScene.svelte +120 -107
- package/dist/components/scenes/ReadoutScene.svelte.d.ts +3 -1
- package/dist/components/scenes/StageScene.svelte +97 -104
- package/dist/examples/FieldReport.svelte +226 -223
- package/dist/examples/ObservationDeck.svelte +333 -317
- package/dist/examples/SignalLost.svelte +191 -191
- package/dist/styles.css +113 -0
- package/dist/system/actions/echo.js +9 -9
- package/dist/system/actions/resolve.js +9 -9
- package/dist/system/actions/reveal.js +1 -1
- package/dist/system/actions/surface.js +13 -1
- package/dist/system/depth/depth.css +49 -49
- package/dist/system/depth/depth.js +1 -1
- package/dist/system/expressions.css +80 -80
- package/dist/system/override-template.css +72 -72
- package/dist/system/register.css +74 -74
- package/dist/system/scroll-lock.d.ts +6 -0
- package/dist/system/scroll-lock.js +23 -0
- package/dist/tokens/tokens.css +100 -86
- package/dist/tokens/tokens.js +4 -4
- package/dist/utils/motion.js +1 -1
- package/package.json +67 -60
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
></div>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Width of the skeleton element. */
|
|
6
|
+
width?: string;
|
|
7
|
+
/** Height of the skeleton element. */
|
|
8
|
+
height?: string;
|
|
9
|
+
/** Shape variant. */
|
|
10
|
+
variant?: 'text' | 'card' | 'circle' | 'custom';
|
|
11
|
+
/** Additional CSS classes. */
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
width = '100%',
|
|
17
|
+
height = '1rem',
|
|
18
|
+
variant = 'text',
|
|
19
|
+
class: className = ''
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
class={cn('hyvui-skeleton', variant === 'circle' && 'hyvui-skeleton-circle', className)}
|
|
25
|
+
style:width
|
|
26
|
+
style:height
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
></div>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
.hyvui-skeleton {
|
|
32
|
+
background: linear-gradient(
|
|
33
|
+
90deg,
|
|
34
|
+
var(--bg-elev) 0%,
|
|
35
|
+
rgba(199, 156, 87, 0.06) 50%,
|
|
36
|
+
var(--bg-elev) 100%
|
|
37
|
+
);
|
|
38
|
+
background-size: 200% 100%;
|
|
39
|
+
animation: shimmer 2s linear infinite;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hyvui-skeleton-circle {
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (prefers-reduced-motion: reduce) {
|
|
47
|
+
.hyvui-skeleton {
|
|
48
|
+
animation: none;
|
|
49
|
+
background: var(--bg-elev);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -1,54 +1,49 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.hyvui-status-dot-pulse {
|
|
51
|
-
animation: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Status state determining the dot color. */
|
|
6
|
+
status?: 'ok' | 'pend' | 'warn' | 'fail';
|
|
7
|
+
/** Enable pulse animation. */
|
|
8
|
+
pulse?: boolean;
|
|
9
|
+
/** Dot diameter in pixels. */
|
|
10
|
+
size?: number;
|
|
11
|
+
/** Additional CSS classes. */
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { status = 'ok', pulse = true, size = 6, class: className = '' }: Props = $props();
|
|
16
|
+
|
|
17
|
+
const colorMap: Record<string, string> = {
|
|
18
|
+
ok: 'var(--status-ok)',
|
|
19
|
+
pend: 'var(--status-pend)',
|
|
20
|
+
warn: 'var(--status-warn)',
|
|
21
|
+
fail: 'var(--status-fail)'
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<span
|
|
26
|
+
class={cn('hyvui-status-dot', pulse && 'hyvui-status-dot-pulse', className)}
|
|
27
|
+
style:width="{size}px"
|
|
28
|
+
style:height="{size}px"
|
|
29
|
+
style:background-color={colorMap[status]}
|
|
30
|
+
aria-label="{status} status"
|
|
31
|
+
></span>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
.hyvui-status-dot {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.hyvui-status-dot-pulse {
|
|
41
|
+
animation: pulse-dot 2s ease-in-out infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
.hyvui-status-dot-pulse {
|
|
46
|
+
animation: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<div
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<style>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Status determining the glyph and color. */
|
|
6
|
+
status?: 'ok' | 'pend' | 'warn' | 'fail';
|
|
7
|
+
/** Message text displayed after the status glyph. */
|
|
8
|
+
message?: string;
|
|
9
|
+
/** Controls visibility with stagger animation. */
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
/** When true, the full line inherits the status tone. */
|
|
12
|
+
tone?: 'split' | 'line';
|
|
13
|
+
/** Shows a blinking cursor after the message. */
|
|
14
|
+
cursor?: boolean;
|
|
15
|
+
/** Additional CSS classes. */
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
status = 'ok',
|
|
21
|
+
message = '',
|
|
22
|
+
visible = false,
|
|
23
|
+
tone = 'split',
|
|
24
|
+
cursor = false,
|
|
25
|
+
class: className = ''
|
|
26
|
+
}: Props = $props();
|
|
27
|
+
|
|
28
|
+
const glyphMap: Record<string, string> = {
|
|
29
|
+
ok: '[ OK ]',
|
|
30
|
+
pend: '[ .. ]',
|
|
31
|
+
warn: '[WARN]',
|
|
32
|
+
fail: '[FAIL]'
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const colorMap: Record<string, string> = {
|
|
36
|
+
ok: 'var(--status-ok)',
|
|
37
|
+
pend: 'var(--status-pend)',
|
|
38
|
+
warn: 'var(--status-warn)',
|
|
39
|
+
fail: 'var(--status-fail)'
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<div
|
|
44
|
+
class={cn(
|
|
45
|
+
'hyvui-status-line',
|
|
46
|
+
visible && 'hyvui-status-line-visible',
|
|
47
|
+
tone === 'line' && 'hyvui-status-line-tone-line',
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
style:color={tone === 'line' ? colorMap[status] : undefined}
|
|
51
|
+
aria-live="polite"
|
|
52
|
+
>
|
|
53
|
+
<span class="hyvui-status-glyph" style:color={tone === 'split' ? colorMap[status] : undefined}>
|
|
54
|
+
{glyphMap[status]}
|
|
55
|
+
</span>
|
|
56
|
+
<span class="hyvui-status-message">{message}</span>
|
|
57
|
+
{#if cursor}
|
|
58
|
+
<span class="hyvui-status-cursor" aria-hidden="true">_</span>
|
|
59
|
+
{/if}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
.hyvui-status-line {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: baseline;
|
|
66
|
+
gap: 0.75rem;
|
|
67
|
+
font-family: var(--font-mono);
|
|
68
|
+
font-size: 0.82rem;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transform: translateY(6px);
|
|
71
|
+
transition:
|
|
72
|
+
opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
|
|
73
|
+
transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.hyvui-status-line-visible {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
transform: translateY(0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hyvui-status-glyph {
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.hyvui-status-message {
|
|
88
|
+
color: var(--text-soft);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.hyvui-status-line-tone-line .hyvui-status-message,
|
|
92
|
+
.hyvui-status-line-tone-line .hyvui-status-glyph {
|
|
93
|
+
color: inherit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.hyvui-status-cursor {
|
|
97
|
+
color: var(--muted-strong);
|
|
98
|
+
animation: blink 1s step-end infinite;
|
|
99
|
+
margin-left: 2px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes blink {
|
|
103
|
+
50% {
|
|
104
|
+
opacity: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
.hyvui-status-line {
|
|
110
|
+
transition: none;
|
|
111
|
+
transform: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.hyvui-status-line-visible {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hyvui-status-cursor {
|
|
119
|
+
animation: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
</style>
|