@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.
Files changed (86) hide show
  1. package/README.md +264 -253
  2. package/dist/components/ambient/CornerBrackets.svelte +83 -87
  3. package/dist/components/ambient/DataStream.svelte +111 -94
  4. package/dist/components/ambient/GlyphMark.svelte +69 -69
  5. package/dist/components/ambient/GridOverlay.svelte +26 -28
  6. package/dist/components/ambient/ParallaxLayer.svelte +37 -41
  7. package/dist/components/ambient/ScanBand.svelte +95 -91
  8. package/dist/components/ambient/SignalRing.svelte +100 -100
  9. package/dist/components/ambient/ThreadLine.svelte +71 -78
  10. package/dist/components/ambient/Vignette.svelte +24 -26
  11. package/dist/components/depth/DepthLayer.svelte +22 -27
  12. package/dist/components/depth/DepthStage.svelte +63 -62
  13. package/dist/components/depth/FloatCard.svelte +113 -104
  14. package/dist/components/depth/HorizonGrid.svelte +216 -160
  15. package/dist/components/depth/Plinth.svelte +52 -57
  16. package/dist/components/display/Avatar.svelte +64 -69
  17. package/dist/components/display/Badge.svelte +59 -63
  18. package/dist/components/display/Blockquote.svelte +31 -34
  19. package/dist/components/display/CodeBlock.svelte +71 -76
  20. package/dist/components/display/MetricCard.svelte +77 -83
  21. package/dist/components/display/Table.svelte +99 -104
  22. package/dist/components/feedback/Alert.svelte +71 -76
  23. package/dist/components/feedback/EmptyState.svelte +68 -68
  24. package/dist/components/feedback/ErrorState.svelte +73 -73
  25. package/dist/components/feedback/Skeleton.svelte +52 -52
  26. package/dist/components/feedback/StatusDot.svelte +49 -54
  27. package/dist/components/feedback/StatusLine.svelte +122 -122
  28. package/dist/components/feedback/Toast.svelte +130 -136
  29. package/dist/components/inputs/Button.svelte +240 -237
  30. package/dist/components/inputs/Checkbox.svelte +104 -105
  31. package/dist/components/inputs/FileUpload.svelte +165 -163
  32. package/dist/components/inputs/Input.svelte +145 -147
  33. package/dist/components/inputs/Select.svelte +156 -150
  34. package/dist/components/inputs/Textarea.svelte +153 -154
  35. package/dist/components/inputs/Toggle.svelte +120 -120
  36. package/dist/components/layout/Card.svelte +70 -76
  37. package/dist/components/layout/Drawer.svelte +133 -109
  38. package/dist/components/layout/Grid.svelte +118 -43
  39. package/dist/components/layout/Grid.svelte.d.ts +8 -2
  40. package/dist/components/layout/Modal.svelte +176 -159
  41. package/dist/components/layout/Panel.svelte +49 -54
  42. package/dist/components/layout/Popover.svelte +178 -67
  43. package/dist/components/layout/Popover.svelte.d.ts +10 -1
  44. package/dist/components/layout/Stack.svelte +53 -53
  45. package/dist/components/navigation/Breadcrumb.svelte +70 -73
  46. package/dist/components/navigation/DropdownMenu.svelte +167 -124
  47. package/dist/components/navigation/DropdownMenu.svelte.d.ts +12 -2
  48. package/dist/components/navigation/SidebarNav.svelte +86 -90
  49. package/dist/components/navigation/Tabs.svelte +81 -86
  50. package/dist/components/navigation/Topbar.svelte +85 -85
  51. package/dist/components/patterns/ActionBar.svelte +71 -76
  52. package/dist/components/patterns/ConfirmDialog.svelte +63 -64
  53. package/dist/components/patterns/PageHeader.svelte +109 -114
  54. package/dist/components/patterns/SearchBar.svelte +54 -59
  55. package/dist/components/patterns/TerminalBoot.svelte +104 -104
  56. package/dist/components/primitives/Divider.svelte +26 -29
  57. package/dist/components/primitives/Icon.svelte +44 -49
  58. package/dist/components/primitives/Label.svelte +39 -44
  59. package/dist/components/primitives/Surface.svelte +89 -87
  60. package/dist/components/primitives/Text.svelte +98 -98
  61. package/dist/components/scenes/ArchiveScene.svelte +92 -95
  62. package/dist/components/scenes/ArchiveScene.svelte.d.ts +7 -1
  63. package/dist/components/scenes/LogScene.svelte +72 -77
  64. package/dist/components/scenes/NarrativeScene.svelte +91 -92
  65. package/dist/components/scenes/ReadoutScene.svelte +120 -107
  66. package/dist/components/scenes/ReadoutScene.svelte.d.ts +3 -1
  67. package/dist/components/scenes/StageScene.svelte +97 -104
  68. package/dist/examples/FieldReport.svelte +226 -223
  69. package/dist/examples/ObservationDeck.svelte +333 -317
  70. package/dist/examples/SignalLost.svelte +191 -191
  71. package/dist/styles.css +113 -0
  72. package/dist/system/actions/echo.js +9 -9
  73. package/dist/system/actions/resolve.js +9 -9
  74. package/dist/system/actions/reveal.js +1 -1
  75. package/dist/system/actions/surface.js +13 -1
  76. package/dist/system/depth/depth.css +49 -49
  77. package/dist/system/depth/depth.js +1 -1
  78. package/dist/system/expressions.css +80 -80
  79. package/dist/system/override-template.css +72 -72
  80. package/dist/system/register.css +74 -74
  81. package/dist/system/scroll-lock.d.ts +6 -0
  82. package/dist/system/scroll-lock.js +23 -0
  83. package/dist/tokens/tokens.css +100 -86
  84. package/dist/tokens/tokens.js +4 -4
  85. package/dist/utils/motion.js +1 -1
  86. package/package.json +67 -60
@@ -1,52 +1,52 @@
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={width}
26
- style:height={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
+ <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
- 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 {
16
- status = 'ok',
17
- pulse = true,
18
- size = 6,
19
- class: className = '',
20
- }: Props = $props();
21
-
22
- const colorMap: Record<string, string> = {
23
- ok: 'var(--status-ok)',
24
- pend: 'var(--status-pend)',
25
- warn: 'var(--status-warn)',
26
- fail: 'var(--status-fail)',
27
- };
28
- </script>
29
-
30
- <span
31
- class={cn('hyvui-status-dot', pulse && 'hyvui-status-dot-pulse', className)}
32
- style:width="{size}px"
33
- style:height="{size}px"
34
- style:background-color={colorMap[status]}
35
- aria-label="{status} status"
36
- ></span>
37
-
38
- <style>
39
- .hyvui-status-dot {
40
- display: inline-block;
41
- border-radius: 50%;
42
- flex-shrink: 0;
43
- }
44
-
45
- .hyvui-status-dot-pulse {
46
- animation: pulse-dot 2s ease-in-out infinite;
47
- }
48
-
49
- @media (prefers-reduced-motion: reduce) {
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
- 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>
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>