@getmicdrop/svelte-components 5.0.0 → 5.1.1
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/dist/primitives/Button/Button.stories.svelte +46 -79
- package/dist/primitives/Button/Button.stories.svelte.d.ts.map +1 -1
- package/dist/primitives/Button/Button.svelte +11 -5
- package/dist/primitives/Button/Button.svelte.d.ts +2 -0
- package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
- package/dist/primitives/Button/ButtonVariantShowcase.svelte +137 -0
- package/dist/primitives/Button/ButtonVariantShowcase.svelte.d.ts +27 -0
- package/dist/primitives/Button/ButtonVariantShowcase.svelte.d.ts.map +1 -0
- package/dist/recipes/SuperLogin/SuperLogin.svelte +5 -5
- package/dist/stories/ButtonAuditDashboard.stories.svelte +14 -0
- package/dist/stories/ButtonAuditDashboard.stories.svelte.d.ts +28 -0
- package/dist/stories/ButtonAuditDashboard.stories.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonAuditDashboard.svelte +444 -0
- package/dist/stories/ButtonAuditDashboard.svelte.d.ts +7 -0
- package/dist/stories/ButtonAuditDashboard.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonAuditReview.stories.svelte +14 -0
- package/dist/stories/ButtonAuditReview.stories.svelte.d.ts +28 -0
- package/dist/stories/ButtonAuditReview.stories.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonAuditReview.svelte +463 -0
- package/dist/stories/ButtonAuditReview.svelte.d.ts +7 -0
- package/dist/stories/ButtonAuditReview.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonGridView.stories.svelte +14 -0
- package/dist/stories/ButtonGridView.stories.svelte.d.ts +28 -0
- package/dist/stories/ButtonGridView.stories.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonGridView.svelte +146 -0
- package/dist/stories/ButtonGridView.svelte.d.ts +7 -0
- package/dist/stories/ButtonGridView.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonShowcase.stories.svelte +14 -0
- package/dist/stories/ButtonShowcase.stories.svelte.d.ts +28 -0
- package/dist/stories/ButtonShowcase.stories.svelte.d.ts.map +1 -0
- package/dist/stories/ButtonShowcase.svelte +529 -0
- package/dist/stories/ButtonShowcase.svelte.d.ts +7 -0
- package/dist/stories/ButtonShowcase.svelte.d.ts.map +1 -0
- package/dist/stories/DesignSystemAudit.stories.svelte +4 -12
- package/dist/stories/DesignSystemAudit.stories.svelte.d.ts.map +1 -1
- package/dist/stories/button-audit-manifest.json +11187 -0
- package/package.json +5 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import ButtonShowcase from "./ButtonShowcase.svelte";
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: "Design System/Button Showcase",
|
|
7
|
+
component: ButtonShowcase,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Story name="Complete Reference" />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default ButtonShowcase;
|
|
2
|
+
type ButtonShowcase = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const ButtonShowcase: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import ButtonShowcase from "./ButtonShowcase.svelte";
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=ButtonShowcase.stories.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonShowcase.stories.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/ButtonShowcase.stories.svelte.js"],"names":[],"mappings":";;;;;;;;AA4BA;;;;mBAA0H;2BAxB7F,yBAAyB;6CAeT,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../primitives/Button/Button.svelte';
|
|
3
|
+
|
|
4
|
+
// Icons for demo
|
|
5
|
+
import Add from '../assets/svg/add-main.svg';
|
|
6
|
+
import ArrowLeft from '../assets/svg/arrow-left-02.svg';
|
|
7
|
+
import DeleteIcon from '../assets/svg/delete-02.svg';
|
|
8
|
+
|
|
9
|
+
// Dark mode toggle
|
|
10
|
+
let isDark = $state(false);
|
|
11
|
+
|
|
12
|
+
function toggleDarkMode() {
|
|
13
|
+
isDark = !isDark;
|
|
14
|
+
if (isDark) {
|
|
15
|
+
document.documentElement.classList.add('dark');
|
|
16
|
+
} else {
|
|
17
|
+
document.documentElement.classList.remove('dark');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Interactive state demos
|
|
22
|
+
let saveLoading = $state(false);
|
|
23
|
+
let saveSuccess = $state(false);
|
|
24
|
+
let inviteLoading = $state(false);
|
|
25
|
+
let inviteSuccess = $state(false);
|
|
26
|
+
|
|
27
|
+
function demoSave() {
|
|
28
|
+
saveLoading = true;
|
|
29
|
+
saveSuccess = false;
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
saveLoading = false;
|
|
32
|
+
saveSuccess = true;
|
|
33
|
+
setTimeout(() => { saveSuccess = false; }, 2000);
|
|
34
|
+
}, 1500);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function demoInvite() {
|
|
38
|
+
inviteLoading = true;
|
|
39
|
+
inviteSuccess = false;
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
inviteLoading = false;
|
|
42
|
+
inviteSuccess = true;
|
|
43
|
+
setTimeout(() => { inviteSuccess = false; }, 2000);
|
|
44
|
+
}, 1500);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<div class="p-8 space-y-12 bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors">
|
|
49
|
+
<!-- Header with Dark Mode Toggle -->
|
|
50
|
+
<div class="max-w-5xl flex items-start justify-between gap-4">
|
|
51
|
+
<div>
|
|
52
|
+
<h1 class="text-3xl font-bold text-gray-900 dark:text-white mb-2">Button Catalog</h1>
|
|
53
|
+
<p class="text-gray-600 dark:text-gray-300">
|
|
54
|
+
Real buttons as they appear in the app. Click interactive buttons to see their behavior.
|
|
55
|
+
<strong>Use these nicknames when telling Claude what button you want.</strong>
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
<button
|
|
59
|
+
onclick={toggleDarkMode}
|
|
60
|
+
class="flex items-center gap-2 px-4 py-2 rounded-lg border-2 transition-all font-medium
|
|
61
|
+
{isDark
|
|
62
|
+
? 'bg-gray-800 border-yellow-400 text-yellow-400 hover:bg-gray-700'
|
|
63
|
+
: 'bg-white border-gray-300 text-gray-700 hover:border-blue-500 hover:text-blue-600'}"
|
|
64
|
+
>
|
|
65
|
+
{#if isDark}
|
|
66
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
67
|
+
<path d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"/>
|
|
68
|
+
</svg>
|
|
69
|
+
Light Mode
|
|
70
|
+
{:else}
|
|
71
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
72
|
+
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"/>
|
|
73
|
+
</svg>
|
|
74
|
+
Dark Mode
|
|
75
|
+
{/if}
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<!-- ============================================ -->
|
|
80
|
+
<!-- LOGIN PAGE BUTTONS -->
|
|
81
|
+
<!-- ============================================ -->
|
|
82
|
+
<section class="space-y-4">
|
|
83
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Login Page</h2>
|
|
84
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Found on: /login, /signup, /forgot-password</p>
|
|
85
|
+
|
|
86
|
+
<div class="grid gap-6">
|
|
87
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
88
|
+
<div class="w-64">
|
|
89
|
+
<Button size="xl-medium">Log in</Button>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="flex-1">
|
|
92
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Login button"</p>
|
|
93
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Primary login action. Blue, full-width, medium height.</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
98
|
+
<div class="w-64">
|
|
99
|
+
<Button variant="outline" size="xl-medium">Send me a login link</Button>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="flex-1">
|
|
102
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Magic link button" or "Secondary login button"</p>
|
|
103
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Alternative login option. Blue outline, full-width.</p>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
108
|
+
<div class="w-64">
|
|
109
|
+
<Button size="xl-medium">Create account</Button>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="flex-1">
|
|
112
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Signup button"</p>
|
|
113
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Account creation. Same style as login button.</p>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</section>
|
|
118
|
+
|
|
119
|
+
<!-- ============================================ -->
|
|
120
|
+
<!-- FORM BUTTONS (with behaviors) -->
|
|
121
|
+
<!-- ============================================ -->
|
|
122
|
+
<section class="space-y-4">
|
|
123
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Form Buttons (Interactive - Click to see behavior!)</h2>
|
|
124
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Found on: Performer Profile, Venue Settings, any edit form</p>
|
|
125
|
+
|
|
126
|
+
<div class="grid gap-6">
|
|
127
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
128
|
+
<div class="w-48">
|
|
129
|
+
<Button
|
|
130
|
+
onclick={demoSave}
|
|
131
|
+
loading={saveLoading}
|
|
132
|
+
success={saveSuccess}
|
|
133
|
+
successText="Saved!"
|
|
134
|
+
>
|
|
135
|
+
Save Changes
|
|
136
|
+
</Button>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="flex-1">
|
|
139
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Save button with feedback"</p>
|
|
140
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Click to see: Loading spinner → "Saved!" confirmation. Used after editing profiles, settings.</p>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
145
|
+
<div class="w-48">
|
|
146
|
+
<Button>Save</Button>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="flex-1">
|
|
149
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Simple save button"</p>
|
|
150
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Basic save without loading/success feedback. For quick actions.</p>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
155
|
+
<div class="w-48 flex gap-2">
|
|
156
|
+
<Button variant="ghost">Cancel</Button>
|
|
157
|
+
<Button>Save</Button>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="flex-1">
|
|
160
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Cancel/Save pair"</p>
|
|
161
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Standard form footer. Ghost cancel + solid save.</p>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</section>
|
|
166
|
+
|
|
167
|
+
<!-- ============================================ -->
|
|
168
|
+
<!-- MODAL BUTTONS -->
|
|
169
|
+
<!-- ============================================ -->
|
|
170
|
+
<section class="space-y-4">
|
|
171
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Modal / Dialog Buttons</h2>
|
|
172
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Found on: Confirmation dialogs, edit modals, delete warnings</p>
|
|
173
|
+
|
|
174
|
+
<div class="grid gap-6">
|
|
175
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
176
|
+
<div class="w-48 flex gap-2 justify-end">
|
|
177
|
+
<Button variant="ghost">Cancel</Button>
|
|
178
|
+
<Button>Confirm</Button>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="flex-1">
|
|
181
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Confirm modal"</p>
|
|
182
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Standard confirmation. Ghost cancel, solid confirm.</p>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
187
|
+
<div class="w-48 flex gap-2 justify-end">
|
|
188
|
+
<Button variant="alternative">Cancel</Button>
|
|
189
|
+
<Button variant="red">Delete</Button>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="flex-1">
|
|
192
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Delete confirmation"</p>
|
|
193
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Dangerous action warning. Gray cancel, red delete.</p>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
198
|
+
<div class="w-48 flex gap-2 justify-end">
|
|
199
|
+
<Button variant="alternative">No, keep it</Button>
|
|
200
|
+
<Button variant="red">Yes, remove</Button>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="flex-1">
|
|
203
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Remove confirmation"</p>
|
|
204
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Removing something (like from a list). Less scary than delete.</p>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
209
|
+
<div class="w-48">
|
|
210
|
+
<Button>Done</Button>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="flex-1">
|
|
213
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Done button"</p>
|
|
214
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Close a modal after viewing (not editing). Single action.</p>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</section>
|
|
219
|
+
|
|
220
|
+
<!-- ============================================ -->
|
|
221
|
+
<!-- ACTION BUTTONS -->
|
|
222
|
+
<!-- ============================================ -->
|
|
223
|
+
<section class="space-y-4">
|
|
224
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Action Buttons</h2>
|
|
225
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Found on: Table rows, cards, toolbars</p>
|
|
226
|
+
|
|
227
|
+
<div class="grid gap-6">
|
|
228
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
229
|
+
<div class="w-48">
|
|
230
|
+
<Button
|
|
231
|
+
onclick={demoInvite}
|
|
232
|
+
loading={inviteLoading}
|
|
233
|
+
success={inviteSuccess}
|
|
234
|
+
successText="Invited!"
|
|
235
|
+
>
|
|
236
|
+
Invite
|
|
237
|
+
</Button>
|
|
238
|
+
</div>
|
|
239
|
+
<div class="flex-1">
|
|
240
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Invite button"</p>
|
|
241
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Click to see loading → success. Send invitation to performer/venue.</p>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
246
|
+
<div class="w-48">
|
|
247
|
+
<Button beforeIcon={Add}>Add Performer</Button>
|
|
248
|
+
</div>
|
|
249
|
+
<div class="flex-1">
|
|
250
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Add button with icon"</p>
|
|
251
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Creating new items. Plus icon + text.</p>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
256
|
+
<div class="w-48">
|
|
257
|
+
<Button variant="alternative">Edit</Button>
|
|
258
|
+
</div>
|
|
259
|
+
<div class="flex-1">
|
|
260
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Edit button"</p>
|
|
261
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Secondary action. White with gray border.</p>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
266
|
+
<div class="w-48">
|
|
267
|
+
<Button variant="outline">View Details</Button>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="flex-1">
|
|
270
|
+
<p class="font-semibold text-gray-900 dark:text-white">"View button" or "Details button"</p>
|
|
271
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Navigate to detail page. Blue outline.</p>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
276
|
+
<div class="w-48">
|
|
277
|
+
<Button beforeIcon={ArrowLeft} variant="ghost">Back</Button>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="flex-1">
|
|
280
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Back button"</p>
|
|
281
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Navigate back. Ghost style with arrow icon.</p>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</section>
|
|
286
|
+
|
|
287
|
+
<!-- ============================================ -->
|
|
288
|
+
<!-- DANGER BUTTONS -->
|
|
289
|
+
<!-- ============================================ -->
|
|
290
|
+
<section class="space-y-4">
|
|
291
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Danger / Warning Buttons</h2>
|
|
292
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">For removing, deleting, signing out</p>
|
|
293
|
+
|
|
294
|
+
<div class="grid gap-6">
|
|
295
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
296
|
+
<div class="w-48">
|
|
297
|
+
<Button variant="red">Delete</Button>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="flex-1">
|
|
300
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Delete button" (solid red)</p>
|
|
301
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Permanent deletion. Red solid - most dangerous looking.</p>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
306
|
+
<div class="w-48">
|
|
307
|
+
<Button variant="red-outline">Remove</Button>
|
|
308
|
+
</div>
|
|
309
|
+
<div class="flex-1">
|
|
310
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Remove button" (red outline)</p>
|
|
311
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Removing from list/association. Less scary than solid red.</p>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
316
|
+
<div class="w-48">
|
|
317
|
+
<Button variant="red-outline" beforeIcon={DeleteIcon}>Delete Event</Button>
|
|
318
|
+
</div>
|
|
319
|
+
<div class="flex-1">
|
|
320
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Delete with icon"</p>
|
|
321
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Delete action with trash icon for clarity.</p>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
326
|
+
<div class="w-48">
|
|
327
|
+
<Button variant="ghost-red">Sign out</Button>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="flex-1">
|
|
330
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Sign out button"</p>
|
|
331
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Logout action. Subtle red text, no background.</p>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
336
|
+
<div class="w-48">
|
|
337
|
+
<Button variant="ghost-red">Cancel subscription</Button>
|
|
338
|
+
</div>
|
|
339
|
+
<div class="flex-1">
|
|
340
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Cancel subscription"</p>
|
|
341
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Account-level dangerous action. Subtle but red.</p>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</section>
|
|
346
|
+
|
|
347
|
+
<!-- ============================================ -->
|
|
348
|
+
<!-- TOGGLE / FILTER BUTTONS -->
|
|
349
|
+
<!-- ============================================ -->
|
|
350
|
+
<section class="space-y-4">
|
|
351
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Toggle / Filter Buttons</h2>
|
|
352
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Found on: Filter bars, tab-like selections</p>
|
|
353
|
+
|
|
354
|
+
<div class="grid gap-6">
|
|
355
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
356
|
+
<div class="w-64 flex gap-2">
|
|
357
|
+
<Button variant="toggle" active={true}>Upcoming</Button>
|
|
358
|
+
<Button variant="toggle">Past</Button>
|
|
359
|
+
<Button variant="toggle">All</Button>
|
|
360
|
+
</div>
|
|
361
|
+
<div class="flex-1">
|
|
362
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Filter tabs" or "Toggle group"</p>
|
|
363
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">One active at a time. Like tabs but smaller.</p>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
368
|
+
<div class="w-64 flex gap-2">
|
|
369
|
+
<Button variant="toggle" active={true} size="sm">Active</Button>
|
|
370
|
+
<Button variant="toggle" size="sm">Inactive</Button>
|
|
371
|
+
</div>
|
|
372
|
+
<div class="flex-1">
|
|
373
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Small filter toggles"</p>
|
|
374
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Compact version for tight spaces.</p>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
</section>
|
|
379
|
+
|
|
380
|
+
<!-- ============================================ -->
|
|
381
|
+
<!-- LINK-STYLE BUTTONS -->
|
|
382
|
+
<!-- ============================================ -->
|
|
383
|
+
<section class="space-y-4">
|
|
384
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Link-Style Buttons</h2>
|
|
385
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">For inline actions that look like text links</p>
|
|
386
|
+
|
|
387
|
+
<div class="grid gap-6">
|
|
388
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
389
|
+
<div class="w-48">
|
|
390
|
+
<Button variant="link">Forgot password?</Button>
|
|
391
|
+
</div>
|
|
392
|
+
<div class="flex-1">
|
|
393
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Link button" or "Text link"</p>
|
|
394
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Looks like a link but is a button. For inline actions.</p>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
<div class="flex items-center gap-6 p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
399
|
+
<div class="w-48">
|
|
400
|
+
<Button variant="link" size="sm">Learn more</Button>
|
|
401
|
+
</div>
|
|
402
|
+
<div class="flex-1">
|
|
403
|
+
<p class="font-semibold text-gray-900 dark:text-white">"Learn more link"</p>
|
|
404
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Small text link for supplementary actions.</p>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
</section>
|
|
409
|
+
|
|
410
|
+
<!-- ============================================ -->
|
|
411
|
+
<!-- SIZE COMPARISON -->
|
|
412
|
+
<!-- ============================================ -->
|
|
413
|
+
<section class="space-y-4">
|
|
414
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Size Comparison</h2>
|
|
415
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">All sizes side-by-side for reference</p>
|
|
416
|
+
|
|
417
|
+
<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700">
|
|
418
|
+
<div class="flex items-end gap-4 flex-wrap">
|
|
419
|
+
<div class="text-center">
|
|
420
|
+
<Button size="xs">Extra Small</Button>
|
|
421
|
+
<p class="text-xs text-gray-400 dark:text-gray-500 mt-2">xs - Compact UI</p>
|
|
422
|
+
</div>
|
|
423
|
+
<div class="text-center">
|
|
424
|
+
<Button size="sm">Small</Button>
|
|
425
|
+
<p class="text-xs text-gray-400 dark:text-gray-500 mt-2">sm - Table rows</p>
|
|
426
|
+
</div>
|
|
427
|
+
<div class="text-center">
|
|
428
|
+
<Button size="md">Medium</Button>
|
|
429
|
+
<p class="text-xs text-gray-400 dark:text-gray-500 mt-2">md - Default</p>
|
|
430
|
+
</div>
|
|
431
|
+
<div class="text-center">
|
|
432
|
+
<Button size="lg">Large</Button>
|
|
433
|
+
<p class="text-xs text-gray-400 dark:text-gray-500 mt-2">lg - Emphasis</p>
|
|
434
|
+
</div>
|
|
435
|
+
<div class="text-center">
|
|
436
|
+
<Button size="xl">Extra Large</Button>
|
|
437
|
+
<p class="text-xs text-gray-400 dark:text-gray-500 mt-2">xl - Hero buttons</p>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 max-w-sm">
|
|
443
|
+
<p class="font-medium text-gray-900 dark:text-white mb-3">Full-width buttons (for forms)</p>
|
|
444
|
+
<div class="space-y-3">
|
|
445
|
+
<Button size="xl-medium">Log in</Button>
|
|
446
|
+
<p class="text-xs text-gray-400 dark:text-gray-500">xl-medium - Login/signup forms</p>
|
|
447
|
+
<Button size="full">Submit Application</Button>
|
|
448
|
+
<p class="text-xs text-gray-400 dark:text-gray-500">full - Larger form submit</p>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
</section>
|
|
452
|
+
|
|
453
|
+
<!-- ============================================ -->
|
|
454
|
+
<!-- QUICK NICKNAME REFERENCE -->
|
|
455
|
+
<!-- ============================================ -->
|
|
456
|
+
<section class="space-y-4">
|
|
457
|
+
<h2 class="text-xl font-bold text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-2">Quick Nickname Reference</h2>
|
|
458
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Copy these phrases when asking Claude for buttons</p>
|
|
459
|
+
|
|
460
|
+
<div class="overflow-x-auto">
|
|
461
|
+
<table class="w-full text-sm text-gray-900 dark:text-gray-200">
|
|
462
|
+
<thead class="bg-gray-100 dark:bg-gray-700">
|
|
463
|
+
<tr>
|
|
464
|
+
<th class="text-left p-3 font-semibold">Say this to Claude</th>
|
|
465
|
+
<th class="text-left p-3 font-semibold">You'll get</th>
|
|
466
|
+
<th class="text-left p-3 font-semibold">Where it's used</th>
|
|
467
|
+
</tr>
|
|
468
|
+
</thead>
|
|
469
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
470
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
471
|
+
<td class="p-3 font-medium">"Login button"</td>
|
|
472
|
+
<td class="p-3">Blue, full-width</td>
|
|
473
|
+
<td class="p-3">Login page, signup</td>
|
|
474
|
+
</tr>
|
|
475
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
476
|
+
<td class="p-3 font-medium">"Magic link button"</td>
|
|
477
|
+
<td class="p-3">Blue outline, full-width</td>
|
|
478
|
+
<td class="p-3">Login page secondary</td>
|
|
479
|
+
</tr>
|
|
480
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
481
|
+
<td class="p-3 font-medium">"Save button with feedback"</td>
|
|
482
|
+
<td class="p-3">Loading → "Saved!"</td>
|
|
483
|
+
<td class="p-3">Profile, settings forms</td>
|
|
484
|
+
</tr>
|
|
485
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
486
|
+
<td class="p-3 font-medium">"Cancel/Save pair"</td>
|
|
487
|
+
<td class="p-3">Ghost + solid side by side</td>
|
|
488
|
+
<td class="p-3">Any form footer</td>
|
|
489
|
+
</tr>
|
|
490
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
491
|
+
<td class="p-3 font-medium">"Delete confirmation"</td>
|
|
492
|
+
<td class="p-3">Gray cancel + red delete</td>
|
|
493
|
+
<td class="p-3">Delete modals</td>
|
|
494
|
+
</tr>
|
|
495
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
496
|
+
<td class="p-3 font-medium">"Add button with icon"</td>
|
|
497
|
+
<td class="p-3">Plus icon + text</td>
|
|
498
|
+
<td class="p-3">Creating new things</td>
|
|
499
|
+
</tr>
|
|
500
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
501
|
+
<td class="p-3 font-medium">"Edit button"</td>
|
|
502
|
+
<td class="p-3">White with gray border</td>
|
|
503
|
+
<td class="p-3">Table rows, cards</td>
|
|
504
|
+
</tr>
|
|
505
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
506
|
+
<td class="p-3 font-medium">"Back button"</td>
|
|
507
|
+
<td class="p-3">Arrow + ghost style</td>
|
|
508
|
+
<td class="p-3">Navigation</td>
|
|
509
|
+
</tr>
|
|
510
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
511
|
+
<td class="p-3 font-medium">"Sign out button"</td>
|
|
512
|
+
<td class="p-3">Subtle red text</td>
|
|
513
|
+
<td class="p-3">User menu, settings</td>
|
|
514
|
+
</tr>
|
|
515
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
516
|
+
<td class="p-3 font-medium">"Filter tabs"</td>
|
|
517
|
+
<td class="p-3">Toggle group</td>
|
|
518
|
+
<td class="p-3">List filtering</td>
|
|
519
|
+
</tr>
|
|
520
|
+
<tr class="bg-white dark:bg-gray-800">
|
|
521
|
+
<td class="p-3 font-medium">"Link button"</td>
|
|
522
|
+
<td class="p-3">Text that looks like link</td>
|
|
523
|
+
<td class="p-3">Inline actions</td>
|
|
524
|
+
</tr>
|
|
525
|
+
</tbody>
|
|
526
|
+
</table>
|
|
527
|
+
</div>
|
|
528
|
+
</section>
|
|
529
|
+
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default ButtonShowcase;
|
|
2
|
+
type ButtonShowcase = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Record<string, never>>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const ButtonShowcase: import("svelte").Component<Record<string, never>, {}, "">;
|
|
7
|
+
//# sourceMappingURL=ButtonShowcase.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonShowcase.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/ButtonShowcase.svelte.js"],"names":[],"mappings":";;;;;AA8gBA,wFAA6D"}
|
|
@@ -10,11 +10,7 @@
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// Mock data for components
|
|
16
|
-
const mockCalendarEvents = [];
|
|
17
|
-
const today = new Date();
|
|
13
|
+
// Note: MiniMonthCalendar removed - component not in svelte-components, exists in venue-calendar-npm
|
|
18
14
|
</script>
|
|
19
15
|
|
|
20
16
|
<Story name="Overview">
|
|
@@ -141,13 +137,9 @@ theme: {
|
|
|
141
137
|
|
|
142
138
|
<div class="border border-gray-200 dark:border-gray-700 rounded-lg p-4 bg-white dark:bg-gray-800">
|
|
143
139
|
<h4 class="font-medium text-gray-700 dark:text-gray-300 mb-3">Live Preview:</h4>
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
month={today.getMonth()}
|
|
148
|
-
year={today.getFullYear()}
|
|
149
|
-
/>
|
|
150
|
-
</div>
|
|
140
|
+
<p class="text-sm text-gray-500 dark:text-gray-400 italic">
|
|
141
|
+
MiniMonthCalendar component lives in venue-calendar-npm package. See that package's Storybook for live preview.
|
|
142
|
+
</p>
|
|
151
143
|
</div>
|
|
152
144
|
</div>
|
|
153
145
|
</Story>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignSystemAudit.stories.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/DesignSystemAudit.stories.svelte.js"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"DesignSystemAudit.stories.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/stories/DesignSystemAudit.stories.svelte.js"],"names":[],"mappings":";;;;;;;;AAmbA;;;;mBAA6H;6CAThF,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,eAAe,QAAQ,CAAC"}
|