@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,85 +1,85 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { Snippet } from 'svelte';
4
-
5
- interface Props {
6
- /** Additional CSS classes. */
7
- class?: string;
8
- /** Left slot content. */
9
- left?: Snippet;
10
- /** Center slot content. */
11
- center?: Snippet;
12
- /** Right slot content. */
13
- right?: Snippet;
14
- }
15
-
16
- let {
17
- class: className = '',
18
- left,
19
- center,
20
- right,
21
- }: Props = $props();
22
- </script>
23
-
24
- <header class={cn('hyvui-topbar', className)}>
25
- <div class="hyvui-topbar-left">
26
- {#if left}{@render left()}{/if}
27
- </div>
28
- <div class="hyvui-topbar-center">
29
- {#if center}{@render center()}{/if}
30
- </div>
31
- <div class="hyvui-topbar-right">
32
- {#if right}{@render right()}{/if}
33
- </div>
34
- </header>
35
-
36
- <style>
37
- .hyvui-topbar {
38
- display: grid;
39
- grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
40
- align-items: center;
41
- gap: var(--space-md);
42
- min-height: 4.5rem;
43
- padding: var(--space-sm) var(--shell-pad);
44
- background:
45
- linear-gradient(180deg, rgba(121, 166, 163, 0.06), transparent 68%),
46
- rgba(8, 9, 11, 0.86);
47
- border-bottom: 1px solid var(--line);
48
- backdrop-filter: blur(10px);
49
- }
50
-
51
- .hyvui-topbar-left {
52
- display: flex;
53
- align-items: center;
54
- gap: var(--space-sm);
55
- min-width: 0;
56
- }
57
-
58
- .hyvui-topbar-center {
59
- display: flex;
60
- align-items: center;
61
- justify-content: center;
62
- gap: var(--space-sm);
63
- min-width: 0;
64
- }
65
-
66
- .hyvui-topbar-right {
67
- display: flex;
68
- align-items: center;
69
- justify-content: flex-end;
70
- gap: var(--space-sm);
71
- min-width: 0;
72
- }
73
-
74
- @media (max-width: 720px) {
75
- .hyvui-topbar {
76
- grid-template-columns: 1fr;
77
- justify-items: stretch;
78
- }
79
-
80
- .hyvui-topbar-center,
81
- .hyvui-topbar-right {
82
- justify-content: flex-start;
83
- }
84
- }
85
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { Snippet } from 'svelte';
4
+
5
+ interface Props {
6
+ /** Additional CSS classes. */
7
+ class?: string;
8
+ /** Left slot content. */
9
+ left?: Snippet;
10
+ /** Center slot content. */
11
+ center?: Snippet;
12
+ /** Right slot content. */
13
+ right?: Snippet;
14
+ }
15
+
16
+ let { class: className = '', left, center, right }: Props = $props();
17
+ </script>
18
+
19
+ <header class={cn('hyvui-topbar', className)}>
20
+ <div class="hyvui-topbar-inner">
21
+ <div class="hyvui-topbar-left">
22
+ {#if left}{@render left()}{/if}
23
+ </div>
24
+ <div class="hyvui-topbar-center">
25
+ {#if center}{@render center()}{/if}
26
+ </div>
27
+ <div class="hyvui-topbar-right">
28
+ {#if right}{@render right()}{/if}
29
+ </div>
30
+ </div>
31
+ </header>
32
+
33
+ <style>
34
+ .hyvui-topbar {
35
+ min-height: 4.5rem;
36
+ background:
37
+ linear-gradient(180deg, rgba(121, 166, 163, 0.06), transparent 68%), rgba(8, 9, 11, 0.86);
38
+ border-bottom: 1px solid var(--line);
39
+ backdrop-filter: blur(10px);
40
+ container-type: inline-size;
41
+ }
42
+
43
+ .hyvui-topbar-inner {
44
+ display: grid;
45
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
46
+ align-items: center;
47
+ gap: var(--space-md);
48
+ padding: var(--space-sm) var(--shell-pad);
49
+ }
50
+
51
+ .hyvui-topbar-left {
52
+ display: flex;
53
+ align-items: center;
54
+ gap: var(--space-sm);
55
+ min-width: 0;
56
+ }
57
+
58
+ .hyvui-topbar-center {
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ gap: var(--space-sm);
63
+ min-width: 0;
64
+ }
65
+
66
+ .hyvui-topbar-right {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: flex-end;
70
+ gap: var(--space-sm);
71
+ min-width: 0;
72
+ }
73
+
74
+ @container (max-width: var(--cq-sm)) {
75
+ .hyvui-topbar-inner {
76
+ grid-template-columns: 1fr;
77
+ justify-items: stretch;
78
+ }
79
+
80
+ .hyvui-topbar-center,
81
+ .hyvui-topbar-right {
82
+ justify-content: flex-start;
83
+ }
84
+ }
85
+ </style>
@@ -1,76 +1,71 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import Button from '../inputs/Button.svelte';
4
- import Label from '../primitives/Label.svelte';
5
- import type { Snippet } from 'svelte';
6
-
7
- interface Props {
8
- /** Number of selected items. Bar is visible when count > 0. */
9
- count?: number;
10
- /** Additional CSS classes. */
11
- class?: string;
12
- /** Bulk action buttons slot. */
13
- actions?: Snippet;
14
- /** Fires when clear selection is clicked. */
15
- onclear?: () => void;
16
- }
17
-
18
- let {
19
- count = 0,
20
- class: className = '',
21
- actions,
22
- onclear,
23
- }: Props = $props();
24
- </script>
25
-
26
- {#if count > 0}
27
- <div class={cn('hyvui-action-bar', className)}>
28
- <Label color="accent">{count} selected</Label>
29
- {#if actions}
30
- <div class="hyvui-action-bar-actions">
31
- {@render actions()}
32
- </div>
33
- {/if}
34
- <Button variant="ghost" size="sm" onclick={() => onclear?.()}>clear selection</Button>
35
- </div>
36
- {/if}
37
-
38
- <style>
39
- .hyvui-action-bar {
40
- position: fixed;
41
- bottom: 1.5rem;
42
- left: 50%;
43
- transform: translateX(-50%);
44
- z-index: var(--z-overlay);
45
- display: flex;
46
- align-items: center;
47
- gap: 1rem;
48
- background: var(--surface-card);
49
- border: 1px solid rgba(255, 255, 255, 0.05);
50
- box-shadow: var(--shadow-veil);
51
- padding: 0.625rem 1.25rem;
52
- animation: actionbar-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
53
- }
54
-
55
- .hyvui-action-bar-actions {
56
- display: flex;
57
- gap: 0.5rem;
58
- }
59
-
60
- @keyframes actionbar-in {
61
- from {
62
- opacity: 0;
63
- transform: translateX(-50%) translateY(12px);
64
- }
65
- to {
66
- opacity: 1;
67
- transform: translateX(-50%) translateY(0);
68
- }
69
- }
70
-
71
- @media (prefers-reduced-motion: reduce) {
72
- .hyvui-action-bar {
73
- animation: none;
74
- }
75
- }
76
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import Button from '../inputs/Button.svelte';
4
+ import Label from '../primitives/Label.svelte';
5
+ import type { Snippet } from 'svelte';
6
+
7
+ interface Props {
8
+ /** Number of selected items. Bar is visible when count > 0. */
9
+ count?: number;
10
+ /** Additional CSS classes. */
11
+ class?: string;
12
+ /** Bulk action buttons slot. */
13
+ actions?: Snippet;
14
+ /** Fires when clear selection is clicked. */
15
+ onclear?: () => void;
16
+ }
17
+
18
+ let { count = 0, class: className = '', actions, onclear }: Props = $props();
19
+ </script>
20
+
21
+ {#if count > 0}
22
+ <div class={cn('hyvui-action-bar', className)}>
23
+ <Label color="accent">{count} selected</Label>
24
+ {#if actions}
25
+ <div class="hyvui-action-bar-actions">
26
+ {@render actions()}
27
+ </div>
28
+ {/if}
29
+ <Button variant="ghost" size="sm" onclick={() => onclear?.()}>clear selection</Button>
30
+ </div>
31
+ {/if}
32
+
33
+ <style>
34
+ .hyvui-action-bar {
35
+ position: fixed;
36
+ bottom: 1.5rem;
37
+ left: 50%;
38
+ transform: translateX(-50%);
39
+ z-index: var(--z-overlay);
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 1rem;
43
+ background: var(--surface-card);
44
+ border: 1px solid rgba(255, 255, 255, 0.05);
45
+ box-shadow: var(--shadow-veil);
46
+ padding: 0.625rem 1.25rem;
47
+ animation: actionbar-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
48
+ }
49
+
50
+ .hyvui-action-bar-actions {
51
+ display: flex;
52
+ gap: 0.5rem;
53
+ }
54
+
55
+ @keyframes actionbar-in {
56
+ from {
57
+ opacity: 0;
58
+ transform: translateX(-50%) translateY(12px);
59
+ }
60
+ to {
61
+ opacity: 1;
62
+ transform: translateX(-50%) translateY(0);
63
+ }
64
+ }
65
+
66
+ @media (prefers-reduced-motion: reduce) {
67
+ .hyvui-action-bar {
68
+ animation: none;
69
+ }
70
+ }
71
+ </style>
@@ -1,64 +1,63 @@
1
- <script lang="ts">
2
- import Modal from '../layout/Modal.svelte';
3
- import Button from '../inputs/Button.svelte';
4
- import Stack from '../layout/Stack.svelte';
5
- import type { Snippet } from 'svelte';
6
-
7
- interface Props {
8
- /** Controls dialog visibility. */
9
- open?: boolean;
10
- /** Action title. Names the action, never asks "are you sure?". */
11
- title?: string;
12
- /** Additional description. */
13
- description?: string;
14
- /** Confirm button label. */
15
- confirmLabel?: string;
16
- /** Cancel button label. */
17
- cancelLabel?: string;
18
- /** Makes the confirm button use the destructive variant. */
19
- destructive?: boolean;
20
- /** Additional CSS classes. */
21
- class?: string;
22
- /** Fires when the confirm button is clicked. */
23
- onconfirm?: () => void;
24
- /** Fires when the cancel button is clicked or dialog is dismissed. */
25
- oncancel?: () => void;
26
- }
27
-
28
- let {
29
- open = false,
30
- title = '',
31
- description = '',
32
- confirmLabel = 'confirm',
33
- cancelLabel = 'cancel',
34
- destructive = false,
35
- class: className = '',
36
- onconfirm,
37
- oncancel,
38
- }: Props = $props();
39
- </script>
40
-
41
- <Modal {open} {title} class={className} onclose={oncancel}>
42
- {#if description}
43
- <p class="hyvui-confirm-desc">{description}</p>
44
- {/if}
45
- {#snippet footer()}
46
- <Stack direction="horizontal" gap="0.75rem" justify="flex-end">
47
- <Button variant="ghost" onclick={() => oncancel?.()}>{cancelLabel}</Button>
48
- <Button
49
- variant={destructive ? 'destructive' : 'primary'}
50
- onclick={() => onconfirm?.()}
51
- >{confirmLabel}</Button>
52
- </Stack>
53
- {/snippet}
54
- </Modal>
55
-
56
- <style>
57
- .hyvui-confirm-desc {
58
- font-family: var(--font-body);
59
- font-size: 0.9rem;
60
- color: var(--text-soft);
61
- line-height: 1.6;
62
- margin: 0;
63
- }
64
- </style>
1
+ <script lang="ts">
2
+ import Modal from '../layout/Modal.svelte';
3
+ import Button from '../inputs/Button.svelte';
4
+ import Stack from '../layout/Stack.svelte';
5
+ import type { Snippet } from 'svelte';
6
+
7
+ interface Props {
8
+ /** Controls dialog visibility. */
9
+ open?: boolean;
10
+ /** Action title. Names the action, never asks "are you sure?". */
11
+ title?: string;
12
+ /** Additional description. */
13
+ description?: string;
14
+ /** Confirm button label. */
15
+ confirmLabel?: string;
16
+ /** Cancel button label. */
17
+ cancelLabel?: string;
18
+ /** Makes the confirm button use the destructive variant. */
19
+ destructive?: boolean;
20
+ /** Additional CSS classes. */
21
+ class?: string;
22
+ /** Fires when the confirm button is clicked. */
23
+ onconfirm?: () => void;
24
+ /** Fires when the cancel button is clicked or dialog is dismissed. */
25
+ oncancel?: () => void;
26
+ }
27
+
28
+ let {
29
+ open = false,
30
+ title = '',
31
+ description = '',
32
+ confirmLabel = 'confirm',
33
+ cancelLabel = 'cancel',
34
+ destructive = false,
35
+ class: className = '',
36
+ onconfirm,
37
+ oncancel
38
+ }: Props = $props();
39
+ </script>
40
+
41
+ <Modal {open} {title} class={className} onclose={oncancel}>
42
+ {#if description}
43
+ <p class="hyvui-confirm-desc">{description}</p>
44
+ {/if}
45
+ {#snippet footer()}
46
+ <Stack direction="horizontal" gap="0.75rem" justify="flex-end">
47
+ <Button variant="ghost" onclick={() => oncancel?.()}>{cancelLabel}</Button>
48
+ <Button variant={destructive ? 'destructive' : 'primary'} onclick={() => onconfirm?.()}
49
+ >{confirmLabel}</Button
50
+ >
51
+ </Stack>
52
+ {/snippet}
53
+ </Modal>
54
+
55
+ <style>
56
+ .hyvui-confirm-desc {
57
+ font-family: var(--font-body);
58
+ font-size: 0.9rem;
59
+ color: var(--text-soft);
60
+ line-height: 1.6;
61
+ margin: 0;
62
+ }
63
+ </style>