@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,49 +1,44 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { Snippet } from 'svelte';
4
-
5
- interface Props {
6
- /** Icon size in pixels. */
7
- size?: number;
8
- /** CSS color value for the icon. */
9
- color?: string;
10
- /** Additional CSS classes. */
11
- class?: string;
12
- /** SVG content to render inside the icon wrapper. */
13
- children?: Snippet;
14
- }
15
-
16
- let {
17
- size = 16,
18
- color = 'currentColor',
19
- class: className = '',
20
- children,
21
- }: Props = $props();
22
- </script>
23
-
24
- <span
25
- class={cn('hyvui-icon', className)}
26
- style:width="{size}px"
27
- style:height="{size}px"
28
- style:color={color}
29
- aria-hidden="true"
30
- >
31
- {#if children}{@render children()}{/if}
32
- </span>
33
-
34
- <style>
35
- .hyvui-icon {
36
- display: inline-flex;
37
- align-items: center;
38
- justify-content: center;
39
- flex-shrink: 0;
40
- line-height: 0;
41
- }
42
-
43
- .hyvui-icon :global(svg) {
44
- width: 100%;
45
- height: 100%;
46
- fill: none;
47
- stroke: currentColor;
48
- }
49
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { Snippet } from 'svelte';
4
+
5
+ interface Props {
6
+ /** Icon size in pixels. */
7
+ size?: number;
8
+ /** CSS color value for the icon. */
9
+ color?: string;
10
+ /** Additional CSS classes. */
11
+ class?: string;
12
+ /** SVG content to render inside the icon wrapper. */
13
+ children?: Snippet;
14
+ }
15
+
16
+ let { size = 16, color = 'currentColor', class: className = '', children }: Props = $props();
17
+ </script>
18
+
19
+ <span
20
+ class={cn('hyvui-icon', className)}
21
+ style:width="{size}px"
22
+ style:height="{size}px"
23
+ style:color
24
+ aria-hidden="true"
25
+ >
26
+ {#if children}{@render children()}{/if}
27
+ </span>
28
+
29
+ <style>
30
+ .hyvui-icon {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ flex-shrink: 0;
35
+ line-height: 0;
36
+ }
37
+
38
+ .hyvui-icon :global(svg) {
39
+ width: 100%;
40
+ height: 100%;
41
+ fill: none;
42
+ stroke: currentColor;
43
+ }
44
+ </style>
@@ -1,44 +1,39 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { Snippet } from 'svelte';
4
-
5
- interface Props {
6
- /** HTML tag to render. */
7
- as?: string;
8
- /** Label color token. */
9
- color?: 'muted' | 'accent' | 'signal';
10
- /** Additional CSS classes. */
11
- class?: string;
12
- /** Label text content. */
13
- children?: Snippet;
14
- }
15
-
16
- let {
17
- as = 'span',
18
- color = 'muted',
19
- class: className = '',
20
- children,
21
- }: Props = $props();
22
-
23
- const colorMap: Record<string, string> = {
24
- muted: 'var(--muted-strong)',
25
- accent: 'var(--accent)',
26
- signal: 'var(--signal)',
27
- };
28
- </script>
29
-
30
- <svelte:element this={as} class={cn('hyvui-label', className)} style:color={colorMap[color]}>
31
- {#if children}{@render children()}{/if}
32
- </svelte:element>
33
-
34
- <style>
35
- .hyvui-label {
36
- font-family: var(--font-mono);
37
- font-size: 0.7rem;
38
- font-weight: 400;
39
- letter-spacing: 0.16em;
40
- text-transform: uppercase;
41
- line-height: 1.2;
42
- white-space: nowrap;
43
- }
44
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { Snippet } from 'svelte';
4
+
5
+ interface Props {
6
+ /** HTML tag to render. */
7
+ as?: string;
8
+ /** Label color token. */
9
+ color?: 'muted' | 'accent' | 'signal';
10
+ /** Additional CSS classes. */
11
+ class?: string;
12
+ /** Label text content. */
13
+ children?: Snippet;
14
+ }
15
+
16
+ let { as = 'span', color = 'muted', class: className = '', children }: Props = $props();
17
+
18
+ const colorMap: Record<string, string> = {
19
+ muted: 'var(--muted-strong)',
20
+ accent: 'var(--accent)',
21
+ signal: 'var(--signal)'
22
+ };
23
+ </script>
24
+
25
+ <svelte:element this={as} class={cn('hyvui-label', className)} style:color={colorMap[color]}>
26
+ {#if children}{@render children()}{/if}
27
+ </svelte:element>
28
+
29
+ <style>
30
+ .hyvui-label {
31
+ font-family: var(--font-mono);
32
+ font-size: 0.7rem;
33
+ font-weight: 400;
34
+ letter-spacing: 0.16em;
35
+ text-transform: uppercase;
36
+ line-height: 1.2;
37
+ white-space: nowrap;
38
+ }
39
+ </style>
@@ -1,87 +1,89 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { Snippet } from 'svelte';
4
-
5
- interface Props {
6
- /** Surface visual style. */
7
- variant?: 'base' | 'card' | 'panel';
8
- /** HTML tag to render. */
9
- as?: string;
10
- /** Adds a pseudoelement teal inset border on panel variant. */
11
- withInset?: boolean;
12
- /** Additional CSS classes. */
13
- class?: string;
14
- /** Surface content. */
15
- children?: Snippet;
16
- }
17
-
18
- let {
19
- variant = 'base',
20
- as = 'div',
21
- withInset = false,
22
- class: className = '',
23
- children,
24
- }: Props = $props();
25
- </script>
26
-
27
- <svelte:element
28
- this={as}
29
- class={cn(
30
- 'hyvui-surface',
31
- variant === 'card' && 'hyvui-surface-card',
32
- variant === 'panel' && 'hyvui-surface-panel',
33
- variant === 'base' && 'hyvui-surface-base',
34
- withInset && 'hyvui-surface-inset',
35
- className
36
- )}
37
- >
38
- {#if children}{@render children()}{/if}
39
- </svelte:element>
40
-
41
- <style>
42
- .hyvui-surface {
43
- position: relative;
44
- overflow: clip;
45
- border-radius: var(--radius-md);
46
- isolation: isolate;
47
- }
48
-
49
- .hyvui-surface::before {
50
- content: '';
51
- position: absolute;
52
- inset: 0;
53
- pointer-events: none;
54
- background:
55
- linear-gradient(180deg, rgba(240, 232, 218, 0.04), transparent 20%),
56
- linear-gradient(90deg, rgba(121, 166, 163, 0.03), transparent 30%);
57
- opacity: 0.8;
58
- }
59
-
60
- .hyvui-surface-base {
61
- background: var(--surface-soft);
62
- border: 1px solid var(--line);
63
- box-shadow: var(--surface-stroke);
64
- }
65
-
66
- .hyvui-surface-card {
67
- background: var(--surface-card);
68
- border: 1px solid rgba(255, 255, 255, 0.05);
69
- box-shadow: var(--surface-stroke), var(--shadow-card);
70
- backdrop-filter: blur(8px);
71
- }
72
-
73
- .hyvui-surface-panel {
74
- background: var(--surface-panel);
75
- border: 1px solid var(--line);
76
- box-shadow: var(--surface-stroke), var(--shadow-veil);
77
- backdrop-filter: blur(10px);
78
- }
79
-
80
- .hyvui-surface-inset::after {
81
- content: '';
82
- position: absolute;
83
- inset: 0.9rem;
84
- border: 1px solid rgba(121, 166, 163, 0.14);
85
- pointer-events: none;
86
- }
87
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { Snippet } from 'svelte';
4
+
5
+ interface Props {
6
+ /** Surface visual style. */
7
+ variant?: 'base' | 'card' | 'panel';
8
+ /** HTML tag to render. */
9
+ as?: string;
10
+ /** Adds a pseudoelement teal inset border on panel variant. */
11
+ withInset?: boolean;
12
+ /** Additional CSS classes. */
13
+ class?: string;
14
+ /** Surface content. */
15
+ children?: Snippet;
16
+ }
17
+
18
+ let {
19
+ variant = 'base',
20
+ as = 'div',
21
+ withInset = false,
22
+ class: className = '',
23
+ children
24
+ }: Props = $props();
25
+ </script>
26
+
27
+ <svelte:element
28
+ this={as}
29
+ class={cn(
30
+ 'hyvui-surface',
31
+ variant === 'card' && 'hyvui-surface-card',
32
+ variant === 'panel' && 'hyvui-surface-panel',
33
+ variant === 'base' && 'hyvui-surface-base',
34
+ withInset && 'hyvui-surface-inset',
35
+ className
36
+ )}
37
+ >
38
+ {#if children}{@render children()}{/if}
39
+ </svelte:element>
40
+
41
+ <style>
42
+ .hyvui-surface {
43
+ position: relative;
44
+ overflow: clip;
45
+ border-radius: var(--radius-md);
46
+ isolation: isolate;
47
+ max-inline-size: 100%;
48
+ min-width: 0;
49
+ }
50
+
51
+ .hyvui-surface::before {
52
+ content: '';
53
+ position: absolute;
54
+ inset: 0;
55
+ pointer-events: none;
56
+ background:
57
+ linear-gradient(180deg, rgba(240, 232, 218, 0.04), transparent 20%),
58
+ linear-gradient(90deg, rgba(121, 166, 163, 0.03), transparent 30%);
59
+ opacity: 0.8;
60
+ }
61
+
62
+ .hyvui-surface-base {
63
+ background: var(--surface-soft);
64
+ border: 1px solid var(--line);
65
+ box-shadow: var(--surface-stroke);
66
+ }
67
+
68
+ .hyvui-surface-card {
69
+ background: var(--surface-card);
70
+ border: 1px solid rgba(255, 255, 255, 0.05);
71
+ box-shadow: var(--surface-stroke), var(--shadow-card);
72
+ backdrop-filter: blur(8px);
73
+ }
74
+
75
+ .hyvui-surface-panel {
76
+ background: var(--surface-panel);
77
+ border: 1px solid var(--line);
78
+ box-shadow: var(--surface-stroke), var(--shadow-veil);
79
+ backdrop-filter: blur(10px);
80
+ }
81
+
82
+ .hyvui-surface-inset::after {
83
+ content: '';
84
+ position: absolute;
85
+ inset: 0.9rem;
86
+ border: 1px solid rgba(121, 166, 163, 0.14);
87
+ pointer-events: none;
88
+ }
89
+ </style>
@@ -1,98 +1,98 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { Snippet } from 'svelte';
4
- import type { Expression } from './text.js';
5
-
6
- interface Props {
7
- /** HTML tag to render. */
8
- as?: string;
9
- /** Typographic style variant. */
10
- variant?: 'heading' | 'body' | 'caption' | 'italic';
11
- /** Text color token. */
12
- color?: 'primary' | 'soft' | 'muted' | 'muted-strong' | 'accent' | 'signal';
13
- /** Compositional intent expression. Applied alongside the variant. */
14
- expression?: Expression;
15
- /** Additional CSS classes. */
16
- class?: string;
17
- /** Text content. */
18
- children?: Snippet;
19
- }
20
-
21
- let {
22
- as = 'p',
23
- variant = 'body',
24
- color = variant === 'heading' ? 'primary' : 'soft',
25
- expression,
26
- class: className = '',
27
- children,
28
- }: Props = $props();
29
-
30
- const colorMap: Record<string, string> = {
31
- primary: 'var(--text)',
32
- soft: 'var(--text-soft)',
33
- muted: 'var(--muted)',
34
- 'muted-strong': 'var(--muted-strong)',
35
- accent: 'var(--accent)',
36
- signal: 'var(--signal)',
37
- };
38
-
39
- const variantClass = $derived(
40
- cn(
41
- variant === 'heading' && 'hyvui-text-heading',
42
- variant === 'body' && 'hyvui-text-body',
43
- variant === 'caption' && 'hyvui-text-caption',
44
- variant === 'italic' && 'hyvui-text-italic',
45
- expression && `expr-${expression}`,
46
- className
47
- )
48
- );
49
- </script>
50
-
51
- <svelte:element this={as} class={variantClass} style:color={colorMap[color]}>
52
- {#if children}{@render children()}{/if}
53
- </svelte:element>
54
-
55
- <style>
56
- .hyvui-text-heading,
57
- .hyvui-text-body,
58
- .hyvui-text-caption,
59
- .hyvui-text-italic {
60
- margin: 0;
61
- }
62
-
63
- .hyvui-text-heading {
64
- font-family: var(--font-body);
65
- font-size: clamp(1.75rem, 4vw, 3.25rem);
66
- font-weight: 400;
67
- line-height: 0.95;
68
- letter-spacing: -0.045em;
69
- text-wrap: balance;
70
- }
71
-
72
- .hyvui-text-body {
73
- font-family: var(--font-body);
74
- font-size: 1.03rem;
75
- font-weight: 400;
76
- line-height: 1.62;
77
- max-width: 32rem;
78
- text-wrap: pretty;
79
- }
80
-
81
- .hyvui-text-caption {
82
- font-family: var(--font-mono);
83
- font-size: 0.7rem;
84
- font-weight: 400;
85
- letter-spacing: 0.16em;
86
- text-transform: uppercase;
87
- line-height: 1.2;
88
- }
89
-
90
- .hyvui-text-italic {
91
- font-family: var(--font-body);
92
- font-size: 1.02rem;
93
- font-style: italic;
94
- font-weight: 400;
95
- line-height: 1.64;
96
- text-wrap: pretty;
97
- }
98
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { Snippet } from 'svelte';
4
+ import type { Expression } from './text.js';
5
+
6
+ interface Props {
7
+ /** HTML tag to render. */
8
+ as?: string;
9
+ /** Typographic style variant. */
10
+ variant?: 'heading' | 'body' | 'caption' | 'italic';
11
+ /** Text color token. */
12
+ color?: 'primary' | 'soft' | 'muted' | 'muted-strong' | 'accent' | 'signal';
13
+ /** Compositional intent expression. Applied alongside the variant. */
14
+ expression?: Expression;
15
+ /** Additional CSS classes. */
16
+ class?: string;
17
+ /** Text content. */
18
+ children?: Snippet;
19
+ }
20
+
21
+ let {
22
+ as = 'p',
23
+ variant = 'body',
24
+ color = variant === 'heading' ? 'primary' : 'soft',
25
+ expression,
26
+ class: className = '',
27
+ children
28
+ }: Props = $props();
29
+
30
+ const colorMap: Record<string, string> = {
31
+ primary: 'var(--text)',
32
+ soft: 'var(--text-soft)',
33
+ muted: 'var(--muted)',
34
+ 'muted-strong': 'var(--muted-strong)',
35
+ accent: 'var(--accent)',
36
+ signal: 'var(--signal)'
37
+ };
38
+
39
+ const variantClass = $derived(
40
+ cn(
41
+ variant === 'heading' && 'hyvui-text-heading',
42
+ variant === 'body' && 'hyvui-text-body',
43
+ variant === 'caption' && 'hyvui-text-caption',
44
+ variant === 'italic' && 'hyvui-text-italic',
45
+ expression && `expr-${expression}`,
46
+ className
47
+ )
48
+ );
49
+ </script>
50
+
51
+ <svelte:element this={as} class={variantClass} style:color={colorMap[color]}>
52
+ {#if children}{@render children()}{/if}
53
+ </svelte:element>
54
+
55
+ <style>
56
+ .hyvui-text-heading,
57
+ .hyvui-text-body,
58
+ .hyvui-text-caption,
59
+ .hyvui-text-italic {
60
+ margin: 0;
61
+ }
62
+
63
+ .hyvui-text-heading {
64
+ font-family: var(--font-body);
65
+ font-size: clamp(1.75rem, 4vw, 3.25rem);
66
+ font-weight: 400;
67
+ line-height: 0.95;
68
+ letter-spacing: -0.045em;
69
+ text-wrap: balance;
70
+ }
71
+
72
+ .hyvui-text-body {
73
+ font-family: var(--font-body);
74
+ font-size: 1.03rem;
75
+ font-weight: 400;
76
+ line-height: 1.62;
77
+ max-width: 32rem;
78
+ text-wrap: pretty;
79
+ }
80
+
81
+ .hyvui-text-caption {
82
+ font-family: var(--font-mono);
83
+ font-size: 0.7rem;
84
+ font-weight: 400;
85
+ letter-spacing: 0.16em;
86
+ text-transform: uppercase;
87
+ line-height: 1.2;
88
+ }
89
+
90
+ .hyvui-text-italic {
91
+ font-family: var(--font-body);
92
+ font-size: 1.02rem;
93
+ font-style: italic;
94
+ font-weight: 400;
95
+ line-height: 1.64;
96
+ text-wrap: pretty;
97
+ }
98
+ </style>