@motion-proto/live-tokens 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.
Files changed (68) hide show
  1. package/README.md +41 -0
  2. package/dist-plugin/index.cjs +444 -0
  3. package/dist-plugin/index.d.cts +12 -0
  4. package/dist-plugin/index.d.ts +12 -0
  5. package/dist-plugin/index.js +407 -0
  6. package/package.json +86 -0
  7. package/src/components/Badge.svelte +82 -0
  8. package/src/components/Button.svelte +333 -0
  9. package/src/components/Card.svelte +83 -0
  10. package/src/components/CollapsibleSection.svelte +82 -0
  11. package/src/components/DetailNav.svelte +78 -0
  12. package/src/components/Dialog.svelte +269 -0
  13. package/src/components/InlineEditActions.svelte +73 -0
  14. package/src/components/Notification.svelte +308 -0
  15. package/src/components/ProgressBar.svelte +99 -0
  16. package/src/components/RadioButton.svelte +87 -0
  17. package/src/components/SectionDivider.svelte +121 -0
  18. package/src/components/TabBar.svelte +92 -0
  19. package/src/components/Toggle.svelte +86 -0
  20. package/src/components/Tooltip.svelte +64 -0
  21. package/src/lib/ColumnsOverlay.svelte +120 -0
  22. package/src/lib/LiveEditorOverlay.svelte +467 -0
  23. package/src/lib/columnsOverlay.ts +26 -0
  24. package/src/lib/cssVarSync.ts +72 -0
  25. package/src/lib/editorConfig.ts +9 -0
  26. package/src/lib/editorConfigStore.ts +14 -0
  27. package/src/lib/index.ts +51 -0
  28. package/src/lib/oklch.ts +129 -0
  29. package/src/lib/pageSource.ts +6 -0
  30. package/src/lib/tokenInit.ts +29 -0
  31. package/src/lib/tokenService.ts +144 -0
  32. package/src/lib/tokenTypes.ts +45 -0
  33. package/src/pages/Admin.svelte +100 -0
  34. package/src/pages/ShowcasePage.svelte +146 -0
  35. package/src/showcase/BackupBrowser.svelte +617 -0
  36. package/src/showcase/BezierCurveEditor.svelte +648 -0
  37. package/src/showcase/ColorEditPanel.svelte +498 -0
  38. package/src/showcase/ComponentsTab.svelte +107 -0
  39. package/src/showcase/EditorDialog.svelte +137 -0
  40. package/src/showcase/PaletteEditor.svelte +2579 -0
  41. package/src/showcase/PaletteSelector.svelte +627 -0
  42. package/src/showcase/SurfacesTab.svelte +409 -0
  43. package/src/showcase/TextTab.svelte +205 -0
  44. package/src/showcase/TokenFileManager.svelte +683 -0
  45. package/src/showcase/TokenMap.svelte +54 -0
  46. package/src/showcase/VariablesTab.svelte +2657 -0
  47. package/src/showcase/VisualsTab.svelte +233 -0
  48. package/src/showcase/curveEngine.ts +190 -0
  49. package/src/showcase/demos/BadgeDemo.svelte +58 -0
  50. package/src/showcase/demos/CardDemo.svelte +52 -0
  51. package/src/showcase/demos/ChoiceButtonsDemo.svelte +194 -0
  52. package/src/showcase/demos/CollapsibleSectionDemo.svelte +56 -0
  53. package/src/showcase/demos/DialogDemo.svelte +42 -0
  54. package/src/showcase/demos/InlineEditActionsDemo.svelte +27 -0
  55. package/src/showcase/demos/NotificationDemo.svelte +149 -0
  56. package/src/showcase/demos/ProgressBarDemo.svelte +56 -0
  57. package/src/showcase/demos/RadioButtonDemo.svelte +58 -0
  58. package/src/showcase/demos/SectionDividerDemo.svelte +79 -0
  59. package/src/showcase/demos/StandardButtonsDemo.svelte +457 -0
  60. package/src/showcase/demos/TabBarDemo.svelte +60 -0
  61. package/src/showcase/demos/TooltipDemo.svelte +54 -0
  62. package/src/showcase/editor.css +93 -0
  63. package/src/showcase/index.ts +17 -0
  64. package/src/styles/fonts/Domine/Domine-VariableFont_wght.ttf +0 -0
  65. package/src/styles/fonts/Domine/OFL.txt +97 -0
  66. package/src/styles/fonts/Domine/README.txt +66 -0
  67. package/src/styles/fonts.css +18 -0
  68. package/src/styles/form-controls.css +190 -0
@@ -0,0 +1,194 @@
1
+ <script lang="ts">
2
+ let selectedChoice = 'option-2';
3
+ function handleChoiceClick(choice: string) {
4
+ selectedChoice = choice;
5
+ }
6
+ </script>
7
+
8
+ <div class="demo-block">
9
+ <h2 class="component-title">Button-Based Choice Sets</h2>
10
+ <p class="demo-description">
11
+ Interactive example showing all 4 visual states. Click buttons to see selection state.
12
+ </p>
13
+
14
+ <div class="demo-section">
15
+ <h3 class="demo-subtitle">Interactive Example</h3>
16
+ <div class="choice-buttons-container">
17
+ <button
18
+ class="choice-button"
19
+ class:selected={selectedChoice === 'option-1'}
20
+ on:click={() => handleChoiceClick('option-1')}
21
+ >
22
+ <i class="fas fa-star"></i>
23
+ <span>Default/Hover</span>
24
+ </button>
25
+
26
+ <button
27
+ class="choice-button"
28
+ class:selected={selectedChoice === 'option-2'}
29
+ on:click={() => handleChoiceClick('option-2')}
30
+ >
31
+ <i class="fas fa-check"></i>
32
+ <span>Selected</span>
33
+ </button>
34
+
35
+ <button
36
+ class="choice-button"
37
+ class:selected={selectedChoice === 'option-3'}
38
+ on:click={() => handleChoiceClick('option-3')}
39
+ >
40
+ <i class="fas fa-heart"></i>
41
+ <span>Clickable</span>
42
+ </button>
43
+
44
+ <button
45
+ class="choice-button"
46
+ disabled
47
+ >
48
+ <i class="fas fa-ban"></i>
49
+ <span>Disabled</span>
50
+ </button>
51
+ </div>
52
+ </div>
53
+
54
+ <div class="demo-section">
55
+ <h3 class="demo-subtitle">State Reference</h3>
56
+ <div class="state-reference">
57
+ <div class="state-item">
58
+ <div class="state-label">Default</div>
59
+ <div class="state-details">
60
+ <code>background: --surface-neutral-high</code>
61
+ <code>border: 1px --border-neutral-default</code>
62
+ </div>
63
+ </div>
64
+
65
+ <div class="state-item">
66
+ <div class="state-label">Hover</div>
67
+ <div class="state-details">
68
+ <code>background: --surface-neutral-higher</code>
69
+ <code>border-color: --border-neutral-strong</code>
70
+ </div>
71
+ </div>
72
+
73
+ <div class="state-item">
74
+ <div class="state-label">Selected</div>
75
+ <div class="state-details">
76
+ <code>background: --surface-success-high</code>
77
+ <code>outline: 2px --border-success</code>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="state-item">
82
+ <div class="state-label">Disabled</div>
83
+ <div class="state-details">
84
+ <code>opacity: 0.4</code>
85
+ <code>cursor: not-allowed</code>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <style>
93
+ @import '../../styles/variables.css';
94
+
95
+ .choice-buttons-container {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ gap: var(--space-10);
99
+ }
100
+
101
+ .choice-button {
102
+ display: flex;
103
+ align-items: center;
104
+ gap: var(--space-8);
105
+ padding: var(--space-10) var(--space-16);
106
+ background: var(--ui-surface-high);
107
+ border: 1px solid var(--ui-border-default);
108
+ border-radius: var(--radius-lg);
109
+ outline: 2px solid transparent;
110
+ outline-offset: -1px;
111
+ font-size: var(--font-md);
112
+ font-weight: 500;
113
+ color: var(--ui-text-primary);
114
+ cursor: pointer;
115
+ transition: all 0.2s;
116
+ position: relative;
117
+ overflow: hidden;
118
+ }
119
+
120
+ .choice-button::before {
121
+ content: '';
122
+ position: absolute;
123
+ top: 0;
124
+ left: -100%;
125
+ width: 100%;
126
+ height: 100%;
127
+ background: linear-gradient(90deg, transparent, var(--ui-hover), transparent);
128
+ transition: left 0.5s ease;
129
+ }
130
+
131
+ .choice-button:hover::before {
132
+ left: 100%;
133
+ }
134
+
135
+ .choice-button i {
136
+ font-size: var(--font-lg);
137
+ color: var(--ui-text-secondary);
138
+ transition: color 0.2s;
139
+ }
140
+
141
+ .choice-button:hover:not(:disabled):not(.selected) {
142
+ background: var(--ui-surface-higher);
143
+ border-color: var(--ui-border-strong);
144
+ transform: translateY(-0.0625rem);
145
+ box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
146
+ }
147
+
148
+ .choice-button.selected {
149
+ background: var(--ui-surface-highest);
150
+ outline-color: var(--ui-border-strong);
151
+ }
152
+
153
+ .choice-button:disabled {
154
+ opacity: 0.4;
155
+ cursor: not-allowed;
156
+ }
157
+
158
+ .state-reference {
159
+ display: grid;
160
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
161
+ gap: var(--space-12);
162
+ }
163
+
164
+ .state-item {
165
+ background: var(--ui-surface-low);
166
+ border: 1px solid var(--ui-border-subtle);
167
+ border-radius: var(--radius-md);
168
+ padding: var(--space-12);
169
+ display: flex;
170
+ flex-direction: column;
171
+ gap: var(--space-8);
172
+ }
173
+
174
+ .state-label {
175
+ font-size: var(--font-sm);
176
+ font-weight: var(--font-weight-semibold);
177
+ color: var(--ui-text-primary);
178
+ }
179
+
180
+ .state-details {
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: var(--space-4);
184
+ }
185
+
186
+ .state-details code {
187
+ font-size: var(--font-xs);
188
+ color: var(--ui-text-tertiary);
189
+ background: var(--ui-surface-lowest);
190
+ padding: var(--space-2) var(--space-4);
191
+ border-radius: var(--radius-sm);
192
+ font-family: var(--ui-font-mono);
193
+ }
194
+ </style>
@@ -0,0 +1,56 @@
1
+ <script lang="ts">
2
+ import CollapsibleSection from '../../components/CollapsibleSection.svelte';
3
+ import TokenMap from '../TokenMap.svelte';
4
+
5
+ let demoExpanded = false;
6
+ </script>
7
+
8
+ <div class="demo-block">
9
+ <h2 class="component-title">Collapsible Section Component</h2>
10
+ <p class="demo-description">
11
+ Expandable section with chevron toggle. Import from <code>components/CollapsibleSection.svelte</code>
12
+ </p>
13
+
14
+ <div class="demo-section">
15
+ <div class="collapsible-demo-wrapper">
16
+ <CollapsibleSection
17
+ label="Click to expand"
18
+ expanded={demoExpanded}
19
+ on:toggle={() => demoExpanded = !demoExpanded}
20
+ />
21
+ {#if demoExpanded}
22
+ <div class="collapsible-demo-content">
23
+ <p style="margin: 0; color: var(--text-secondary);">
24
+ This content is revealed when the section is expanded. Any content can go here.
25
+ </p>
26
+ </div>
27
+ {/if}
28
+ </div>
29
+ </div>
30
+
31
+ <div class="demo-section">
32
+ <h3 class="demo-subtitle">Tokens</h3>
33
+ <TokenMap tokens={[
34
+ { label: 'Active BG', variable: '--surface-primary-lowest' },
35
+ { label: 'Active Border', variable: '--color-primary-400' },
36
+ { label: 'Label', variable: '--text-primary' },
37
+ { label: 'Toggle Icon', variable: '--text-muted' },
38
+ ]} />
39
+ </div>
40
+ </div>
41
+
42
+ <style>
43
+ @import '../../styles/variables.css';
44
+
45
+ .collapsible-demo-wrapper {
46
+ border: 1px solid var(--ui-border-subtle);
47
+ border-radius: var(--radius-md);
48
+ overflow: hidden;
49
+ }
50
+
51
+ .collapsible-demo-content {
52
+ padding: var(--space-12) var(--space-16);
53
+ background: var(--ui-surface-low);
54
+ border-top: 1px solid var(--ui-border-faint);
55
+ }
56
+ </style>
@@ -0,0 +1,42 @@
1
+ <script lang="ts">
2
+ import Button from '../../components/Button.svelte';
3
+ import Dialog from '../../components/Dialog.svelte';
4
+ import TokenMap from '../TokenMap.svelte';
5
+
6
+ let showDialog = false;
7
+ </script>
8
+
9
+ <div class="demo-block">
10
+ <h2 class="component-title">Dialog Component</h2>
11
+ <p class="demo-description">
12
+ Modal dialog with focus management and slide-in animation. Import from <code>components/Dialog.svelte</code>
13
+ </p>
14
+
15
+ <div class="demo-section">
16
+ <Button variant="secondary" icon="fas fa-external-link-alt" on:click={() => showDialog = true}>
17
+ Open Dialog
18
+ </Button>
19
+
20
+ <Dialog
21
+ bind:show={showDialog}
22
+ title="Sample Dialog"
23
+ confirmLabel="Save"
24
+ cancelLabel="Cancel"
25
+ on:confirm={() => showDialog = false}
26
+ >
27
+ <p style="color: var(--text-secondary); margin: 0;">This is the dialog body content. It supports any slotted content including forms, lists, or other components.</p>
28
+ </Dialog>
29
+ </div>
30
+
31
+ <div class="demo-section">
32
+ <h3 class="demo-subtitle">Tokens</h3>
33
+ <TokenMap tokens={[
34
+ { label: 'Surface', variable: '--surface-neutral-lowest' },
35
+ { label: 'Border', variable: '--border-neutral-strong' },
36
+ { label: 'Header BG', variable: '--empty' },
37
+ { label: 'Header Border', variable: '--border-neutral-subtle' },
38
+ { label: 'Title', variable: '--text-primary' },
39
+ { label: 'Close Icon', variable: '--text-secondary' },
40
+ ]} />
41
+ </div>
42
+ </div>
@@ -0,0 +1,27 @@
1
+ <script lang="ts">
2
+ import InlineEditActions from '../../components/InlineEditActions.svelte';
3
+ </script>
4
+
5
+ <div class="demo-block">
6
+ <h2 class="component-title">Inline Edit Actions</h2>
7
+ <p class="demo-description">
8
+ Confirm/cancel button pair for inline editing. Import from <code>components/InlineEditActions.svelte</code>
9
+ </p>
10
+
11
+ <div class="demo-section">
12
+ <div class="inline-edit-demo-row">
13
+ <span style="color: var(--text-secondary);">Editing value...</span>
14
+ <InlineEditActions onSave={() => {}} onCancel={() => {}} />
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <style>
20
+ @import '../../styles/variables.css';
21
+
22
+ .inline-edit-demo-row {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: var(--space-12);
26
+ }
27
+ </style>
@@ -0,0 +1,149 @@
1
+ <script lang="ts">
2
+ import Notification from '../../components/Notification.svelte';
3
+ import TokenMap from '../TokenMap.svelte';
4
+ </script>
5
+
6
+ <div class="demo-block">
7
+ <h2 class="component-title">Notification Components</h2>
8
+ <p class="demo-description">
9
+ Contextual feedback notifications with multiple variants. Import from <code>components/Notification.svelte</code>
10
+ </p>
11
+
12
+ <div class="demo-section">
13
+ <h3 class="demo-subtitle">Variants</h3>
14
+ <div class="notification-showcase">
15
+ <Notification
16
+ variant="info"
17
+ title="Information"
18
+ description="This is an informational message to keep you updated."
19
+ />
20
+
21
+ <Notification
22
+ variant="success"
23
+ title="Success"
24
+ description="Your action was completed successfully."
25
+ />
26
+
27
+ <Notification
28
+ variant="warning"
29
+ title="Warning"
30
+ description="Caution: This action may have unintended consequences."
31
+ />
32
+
33
+ <Notification
34
+ variant="danger"
35
+ title="Danger"
36
+ description="Critical error: Please address this issue immediately."
37
+ />
38
+ </div>
39
+ </div>
40
+
41
+ <div class="demo-section">
42
+ <h3 class="demo-subtitle">With Impact Text</h3>
43
+ <div class="notification-showcase">
44
+ <Notification
45
+ variant="warning"
46
+ title="Food Shortage"
47
+ description="Your kingdom is running low on food supplies."
48
+ impact="-2 to Economy until resolved"
49
+ />
50
+ </div>
51
+ </div>
52
+
53
+ <div class="demo-section">
54
+ <h3 class="demo-subtitle">With Action Button</h3>
55
+ <div class="notification-showcase">
56
+ <Notification
57
+ variant="info"
58
+ title="Settlement Unmapped"
59
+ description="This settlement has not been placed on the map yet."
60
+ actionText="Place on Map"
61
+ actionIcon="fas fa-map-marker-alt"
62
+ onAction={() => {}}
63
+ />
64
+
65
+ <Notification
66
+ variant="success"
67
+ title="Trade Agreement Available"
68
+ description="A neighboring faction has offered a trade deal."
69
+ actionText="View Details"
70
+ actionIcon="fas fa-handshake"
71
+ onAction={() => {}}
72
+ actionInline={true}
73
+ />
74
+ </div>
75
+ </div>
76
+
77
+ <div class="demo-section">
78
+ <h3 class="demo-subtitle">Compact Size & Emphasis</h3>
79
+ <div class="notification-showcase">
80
+ <Notification
81
+ variant="info"
82
+ title="Compact Notification"
83
+ description="A smaller notification for tighter spaces."
84
+ size="compact"
85
+ />
86
+
87
+ <Notification
88
+ variant="danger"
89
+ title="Emphasized Alert"
90
+ description="Important notifications can have emphasis styling."
91
+ emphasis={true}
92
+ />
93
+ </div>
94
+ </div>
95
+
96
+ <div class="demo-section">
97
+ <h3 class="demo-subtitle">Dismissible</h3>
98
+ <div class="notification-showcase">
99
+ <Notification
100
+ variant="success"
101
+ title="Dismissible Notification"
102
+ description="Click the X to dismiss this notification."
103
+ dismissible={true}
104
+ />
105
+ </div>
106
+ </div>
107
+
108
+ <div class="demo-section">
109
+ <h3 class="demo-subtitle">Tokens</h3>
110
+ <div class="token-sections">
111
+ <TokenMap title="info" tokens={[
112
+ { label: 'Header BG', variable: '--surface-info-low' },
113
+ { label: 'Border', variable: '--border-info' },
114
+ { label: 'Icon', variable: '--text-info' },
115
+ ]} />
116
+ <TokenMap title="success" tokens={[
117
+ { label: 'Header BG', variable: '--surface-success' },
118
+ { label: 'Border', variable: '--border-success' },
119
+ { label: 'Icon', variable: '--text-success' },
120
+ ]} />
121
+ <TokenMap title="warning" tokens={[
122
+ { label: 'Header BG', variable: '--surface-warning' },
123
+ { label: 'Border', variable: '--border-warning' },
124
+ { label: 'Icon', variable: '--text-warning' },
125
+ ]} />
126
+ <TokenMap title="danger" tokens={[
127
+ { label: 'Header BG', variable: '--surface-primary' },
128
+ { label: 'Border', variable: '--border-danger' },
129
+ { label: 'Icon', variable: '--text-danger' },
130
+ ]} />
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <style>
136
+ @import '../../styles/variables.css';
137
+
138
+ .notification-showcase {
139
+ display: flex;
140
+ flex-direction: column;
141
+ gap: var(--space-16);
142
+ }
143
+
144
+ .token-sections {
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: var(--space-16);
148
+ }
149
+ </style>
@@ -0,0 +1,56 @@
1
+ <script lang="ts">
2
+ import ProgressBar from '../../components/ProgressBar.svelte';
3
+ import TokenMap from '../TokenMap.svelte';
4
+ </script>
5
+
6
+ <div class="demo-block">
7
+ <h2 class="component-title">Progress Bar Component</h2>
8
+ <p class="demo-description">
9
+ Animated progress bar with variants. Import from <code>components/ProgressBar.svelte</code>
10
+ </p>
11
+
12
+ <div class="demo-section">
13
+ <div class="progress-demo-stack">
14
+ <ProgressBar value={25} label="Getting Started" variant="primary" />
15
+ <ProgressBar value={50} label="Halfway There" variant="info" />
16
+ <ProgressBar value={75} label="Almost Done" variant="warning" />
17
+ <ProgressBar value={100} label="Complete" variant="success" />
18
+ <ProgressBar value={33} label="Danger Zone" variant="danger" />
19
+ <ProgressBar value={60} variant="primary" size="compact" />
20
+ </div>
21
+ </div>
22
+
23
+ <div class="demo-section">
24
+ <h3 class="demo-subtitle">Tokens</h3>
25
+ <div class="token-sections">
26
+ <TokenMap title="track" tokens={[
27
+ { label: 'Background', variable: '--surface-neutral-low' },
28
+ { label: 'Border', variable: '--border-neutral-faint' },
29
+ { label: 'Label', variable: '--text-secondary' },
30
+ ]} />
31
+ <TokenMap title="fill colors" tokens={[
32
+ { label: 'Success', variable: '--border-success' },
33
+ { label: 'Warning', variable: '--border-warning' },
34
+ { label: 'Danger', variable: '--border-danger' },
35
+ { label: 'Info', variable: '--border-info' },
36
+ ]} />
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <style>
42
+ @import '../../styles/variables.css';
43
+
44
+ .progress-demo-stack {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: var(--space-16);
48
+ max-width: 400px;
49
+ }
50
+
51
+ .token-sections {
52
+ display: flex;
53
+ flex-direction: column;
54
+ gap: var(--space-16);
55
+ }
56
+ </style>
@@ -0,0 +1,58 @@
1
+ <script lang="ts">
2
+ import RadioButton from '../../components/RadioButton.svelte';
3
+ import TokenMap from '../TokenMap.svelte';
4
+
5
+ let selectedRadio = 'option-b';
6
+ </script>
7
+
8
+ <div class="demo-block">
9
+ <h2 class="component-title">Radio Button Component</h2>
10
+ <p class="demo-description">
11
+ Styled radio buttons with icon and color support. Import from <code>components/RadioButton.svelte</code>
12
+ </p>
13
+
14
+ <div class="demo-section">
15
+ <div class="radio-demo-row">
16
+ <RadioButton
17
+ icon="fas fa-shield-alt"
18
+ label="Defense"
19
+ color="var(--text-info)"
20
+ active={selectedRadio === 'option-a'}
21
+ on:click={() => selectedRadio = 'option-a'}
22
+ />
23
+ <RadioButton
24
+ icon="fas fa-coins"
25
+ label="Economy"
26
+ color="var(--text-accent)"
27
+ active={selectedRadio === 'option-b'}
28
+ on:click={() => selectedRadio = 'option-b'}
29
+ />
30
+ <RadioButton
31
+ icon="fas fa-users"
32
+ label="Loyalty"
33
+ color="var(--text-success)"
34
+ active={selectedRadio === 'option-c'}
35
+ on:click={() => selectedRadio = 'option-c'}
36
+ />
37
+ </div>
38
+ </div>
39
+
40
+ <div class="demo-section">
41
+ <h3 class="demo-subtitle">Tokens</h3>
42
+ <TokenMap tokens={[
43
+ { label: 'Dot Border', variable: '--border-neutral-default' },
44
+ { label: 'Label', variable: '--text-primary' },
45
+ { label: 'Surface', variable: '--surface-neutral-lowest' },
46
+ ]} />
47
+ </div>
48
+ </div>
49
+
50
+ <style>
51
+ @import '../../styles/variables.css';
52
+
53
+ .radio-demo-row {
54
+ display: flex;
55
+ gap: var(--space-16);
56
+ flex-wrap: wrap;
57
+ }
58
+ </style>
@@ -0,0 +1,79 @@
1
+ <script lang="ts">
2
+ import SectionDivider from '../../components/SectionDivider.svelte';
3
+ import TokenMap from '../TokenMap.svelte';
4
+
5
+ const dividerVariants: { variant: 'bg' | 'neutral' | 'alternate' | 'primary' | 'accent' | 'special'; label: string }[] = [
6
+ { variant: 'bg', label: 'Background' },
7
+ { variant: 'neutral', label: 'Neutral' },
8
+ { variant: 'alternate', label: 'Alternate' },
9
+ { variant: 'primary', label: 'Primary' },
10
+ { variant: 'accent', label: 'Accent' },
11
+ { variant: 'special', label: 'Special' },
12
+ ];
13
+ </script>
14
+
15
+ <div class="demo-block">
16
+ <h2 class="component-title">Section Divider Component</h2>
17
+ <p class="demo-description">
18
+ Full-width section banner with display font and palette variants. Import from <code>components/SectionDivider.svelte</code>
19
+ </p>
20
+
21
+ <div class="demo-section">
22
+ <h3 class="demo-subtitle">Variants</h3>
23
+ <div class="divider-showcase">
24
+ {#each dividerVariants as item}
25
+ <div class="divider-showcase-item">
26
+ <SectionDivider title={item.label} variant={item.variant} />
27
+ <span class="variant-label">variant="{item.variant}" &nbsp; surface-{item.variant}-highest → surface-{item.variant}</span>
28
+ </div>
29
+ {/each}
30
+ </div>
31
+ </div>
32
+
33
+ <div class="demo-section">
34
+ <h3 class="demo-subtitle">With Description</h3>
35
+ <div class="divider-showcase">
36
+ <SectionDivider
37
+ title="Community Modules"
38
+ variant="bg"
39
+ description="These modules were created by other authors and are no longer actively maintained."
40
+ />
41
+ </div>
42
+ </div>
43
+
44
+ <div class="demo-section">
45
+ <h3 class="demo-subtitle">Tokens (bg variant)</h3>
46
+ <TokenMap tokens={[
47
+ { label: 'Gradient High', variable: '--surface-bg-highest' },
48
+ { label: 'Gradient Mid', variable: '--surface-bg-higher' },
49
+ { label: 'Gradient Low', variable: '--surface-bg-high' },
50
+ { label: 'Gradient Base', variable: '--surface-bg' },
51
+ { label: 'Text Stroke', variable: '--surface-bg-lowest' },
52
+ ]} />
53
+ </div>
54
+ </div>
55
+
56
+ <style>
57
+ @import '../../styles/variables.css';
58
+
59
+ .divider-showcase {
60
+ display: flex;
61
+ flex-direction: column;
62
+ }
63
+
64
+ .divider-showcase-item {
65
+ display: flex;
66
+ flex-direction: column;
67
+ align-items: flex-start;
68
+ width: 100%;
69
+ }
70
+
71
+ .variant-label {
72
+ font-size: var(--font-xs);
73
+ color: var(--ui-text-tertiary);
74
+ font-family: var(--ui-font-mono);
75
+ background: var(--ui-surface-lowest);
76
+ padding: var(--space-2) var(--space-6);
77
+ border-radius: var(--radius-sm);
78
+ }
79
+ </style>