@salmexio/ui 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.
- package/README.md +7 -0
- package/dist/app.html +11 -0
- package/dist/feedback/Alert/Alert.svelte +538 -0
- package/dist/feedback/Alert/Alert.svelte.d.ts +30 -0
- package/dist/feedback/Alert/Alert.svelte.d.ts.map +1 -0
- package/dist/feedback/Alert/index.d.ts +2 -0
- package/dist/feedback/Alert/index.d.ts.map +1 -0
- package/dist/feedback/Alert/index.js +1 -0
- package/dist/feedback/Spinner/Spinner.svelte +421 -0
- package/dist/feedback/Spinner/Spinner.svelte.d.ts +25 -0
- package/dist/feedback/Spinner/Spinner.svelte.d.ts.map +1 -0
- package/dist/feedback/Spinner/index.d.ts +2 -0
- package/dist/feedback/Spinner/index.d.ts.map +1 -0
- package/dist/feedback/Spinner/index.js +1 -0
- package/dist/feedback/index.d.ts +3 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +2 -0
- package/dist/forms/TextInput/TextInput.svelte +576 -0
- package/dist/forms/TextInput/TextInput.svelte.d.ts +50 -0
- package/dist/forms/TextInput/TextInput.svelte.d.ts.map +1 -0
- package/dist/forms/TextInput/index.d.ts +2 -0
- package/dist/forms/TextInput/index.d.ts.map +1 -0
- package/dist/forms/TextInput/index.js +1 -0
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/layout/Card/Card.svelte +283 -0
- package/dist/layout/Card/Card.svelte.d.ts +35 -0
- package/dist/layout/Card/Card.svelte.d.ts.map +1 -0
- package/dist/layout/Card/index.d.ts +2 -0
- package/dist/layout/Card/index.d.ts.map +1 -0
- package/dist/layout/Card/index.js +1 -0
- package/dist/layout/Container/Container.svelte +202 -0
- package/dist/layout/Container/Container.svelte.d.ts +25 -0
- package/dist/layout/Container/Container.svelte.d.ts.map +1 -0
- package/dist/layout/Container/index.d.ts +2 -0
- package/dist/layout/Container/index.d.ts.map +1 -0
- package/dist/layout/Container/index.js +1 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/navigation/Tabs/Tabs.svelte +448 -0
- package/dist/navigation/Tabs/Tabs.svelte.d.ts +59 -0
- package/dist/navigation/Tabs/Tabs.svelte.d.ts.map +1 -0
- package/dist/navigation/Tabs/index.d.ts +3 -0
- package/dist/navigation/Tabs/index.d.ts.map +1 -0
- package/dist/navigation/Tabs/index.js +1 -0
- package/dist/navigation/index.d.ts +3 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/primitives/Badge/Badge.svelte +351 -0
- package/dist/primitives/Badge/Badge.svelte.d.ts +35 -0
- package/dist/primitives/Badge/Badge.svelte.d.ts.map +1 -0
- package/dist/primitives/Badge/index.d.ts +2 -0
- package/dist/primitives/Badge/index.d.ts.map +1 -0
- package/dist/primitives/Badge/index.js +1 -0
- package/dist/primitives/Button/Button.svelte +383 -0
- package/dist/primitives/Button/Button.svelte.d.ts +47 -0
- package/dist/primitives/Button/Button.svelte.d.ts.map +1 -0
- package/dist/primitives/Button/index.d.ts +2 -0
- package/dist/primitives/Button/index.d.ts.map +1 -0
- package/dist/primitives/Button/index.js +1 -0
- package/dist/primitives/index.d.ts +3 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +2 -0
- package/dist/routes/+layout.svelte +5 -0
- package/dist/routes/+layout.svelte.d.ts +6 -0
- package/dist/routes/+layout.svelte.d.ts.map +1 -0
- package/dist/routes/+page.svelte +6 -0
- package/dist/routes/+page.svelte.d.ts +27 -0
- package/dist/routes/+page.svelte.d.ts.map +1 -0
- package/dist/styles/tokens.css +340 -0
- package/dist/utils/cn.d.ts +9 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +29 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component Button
|
|
3
|
+
|
|
4
|
+
Win2K × Basquiat - Bold 3D button with neo-expressionist flair.
|
|
5
|
+
Raw structure, expressive energy, world-class accessibility.
|
|
6
|
+
|
|
7
|
+
@example
|
|
8
|
+
<Button variant="default" size="md" onclick={() => handleClick()}>
|
|
9
|
+
Click me
|
|
10
|
+
</Button>
|
|
11
|
+
|
|
12
|
+
@example
|
|
13
|
+
<Button variant="primary" disabled>
|
|
14
|
+
<Icon slot="icon-left" />
|
|
15
|
+
With Icon
|
|
16
|
+
</Button>
|
|
17
|
+
-->
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import type { Snippet } from 'svelte';
|
|
20
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
21
|
+
import { cn } from '../../utils/cn.js';
|
|
22
|
+
|
|
23
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
24
|
+
type ButtonVariant = 'default' | 'primary' | 'flat';
|
|
25
|
+
|
|
26
|
+
interface Props extends Omit<HTMLButtonAttributes, 'class'> {
|
|
27
|
+
/** Visual variant of the button */
|
|
28
|
+
variant?: ButtonVariant;
|
|
29
|
+
/** Size of the button */
|
|
30
|
+
size?: ButtonSize;
|
|
31
|
+
/** Whether the button takes full width */
|
|
32
|
+
fullWidth?: boolean;
|
|
33
|
+
/** Icon to display on the left */
|
|
34
|
+
iconLeft?: Snippet;
|
|
35
|
+
/** Icon to display on the right */
|
|
36
|
+
iconRight?: Snippet;
|
|
37
|
+
/** Whether this is an icon-only button (requires aria-label) */
|
|
38
|
+
iconOnly?: boolean;
|
|
39
|
+
/** Additional CSS classes */
|
|
40
|
+
class?: string;
|
|
41
|
+
/** Button content */
|
|
42
|
+
children?: Snippet;
|
|
43
|
+
/** Test ID for e2e testing */
|
|
44
|
+
testId?: string;
|
|
45
|
+
/** Keyboard shortcut hint (e.g., "Ctrl+S") */
|
|
46
|
+
shortcut?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let {
|
|
50
|
+
variant = 'default',
|
|
51
|
+
size = 'md',
|
|
52
|
+
fullWidth = false,
|
|
53
|
+
disabled = false,
|
|
54
|
+
type = 'button',
|
|
55
|
+
iconLeft,
|
|
56
|
+
iconRight,
|
|
57
|
+
iconOnly = false,
|
|
58
|
+
class: className = '',
|
|
59
|
+
children,
|
|
60
|
+
testId,
|
|
61
|
+
shortcut,
|
|
62
|
+
...restProps
|
|
63
|
+
}: Props = $props();
|
|
64
|
+
|
|
65
|
+
const isDisabled = $derived(disabled);
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<button
|
|
69
|
+
{type}
|
|
70
|
+
class={cn(
|
|
71
|
+
'salmex-btn',
|
|
72
|
+
`salmex-btn-${variant}`,
|
|
73
|
+
`salmex-btn-${size}`,
|
|
74
|
+
iconOnly && 'salmex-btn-icon-only',
|
|
75
|
+
fullWidth && !iconOnly && 'salmex-btn-full-width',
|
|
76
|
+
className
|
|
77
|
+
)}
|
|
78
|
+
disabled={isDisabled}
|
|
79
|
+
aria-disabled={isDisabled}
|
|
80
|
+
data-testid={testId}
|
|
81
|
+
{...restProps}
|
|
82
|
+
>
|
|
83
|
+
<span class="salmex-btn-content">
|
|
84
|
+
{#if iconLeft}
|
|
85
|
+
<span class="salmex-btn-icon" aria-hidden="true">
|
|
86
|
+
{@render iconLeft()}
|
|
87
|
+
</span>
|
|
88
|
+
{/if}
|
|
89
|
+
|
|
90
|
+
{#if children}
|
|
91
|
+
{@render children()}
|
|
92
|
+
{/if}
|
|
93
|
+
|
|
94
|
+
{#if iconRight}
|
|
95
|
+
<span class="salmex-btn-icon" aria-hidden="true">
|
|
96
|
+
{@render iconRight()}
|
|
97
|
+
</span>
|
|
98
|
+
{/if}
|
|
99
|
+
|
|
100
|
+
{#if shortcut}
|
|
101
|
+
<span class="salmex-btn-shortcut" aria-label="Keyboard shortcut: {shortcut}">
|
|
102
|
+
{shortcut}
|
|
103
|
+
</span>
|
|
104
|
+
{/if}
|
|
105
|
+
</span>
|
|
106
|
+
</button>
|
|
107
|
+
|
|
108
|
+
<style>
|
|
109
|
+
/* ========================================
|
|
110
|
+
BASE BUTTON - Basquiat × Win2K 3D
|
|
111
|
+
======================================== */
|
|
112
|
+
.salmex-btn {
|
|
113
|
+
position: relative;
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
gap: var(--salmex-space-2);
|
|
118
|
+
font-family: var(--salmex-font-system);
|
|
119
|
+
font-weight: 700;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
user-select: none;
|
|
122
|
+
-webkit-tap-highlight-color: transparent;
|
|
123
|
+
|
|
124
|
+
/* Canvas-like button surface */
|
|
125
|
+
background: rgb(var(--salmex-button-face));
|
|
126
|
+
border: none;
|
|
127
|
+
|
|
128
|
+
/* Bold 3D effect - stronger than original Win2K */
|
|
129
|
+
box-shadow:
|
|
130
|
+
/* Top-left highlight */
|
|
131
|
+
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
132
|
+
inset 3px 3px 0 rgb(var(--salmex-button-light)),
|
|
133
|
+
/* Bottom-right shadow */
|
|
134
|
+
inset -2px -2px 0 rgb(var(--salmex-button-dark-edge)),
|
|
135
|
+
inset -3px -3px 0 rgb(var(--salmex-button-shadow)),
|
|
136
|
+
/* Outer bold border */
|
|
137
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
138
|
+
/* Flat shadow - Basquiat style */
|
|
139
|
+
4px 4px 0 rgb(0 0 0 / 0.25);
|
|
140
|
+
|
|
141
|
+
transition: all var(--salmex-transition-fast);
|
|
142
|
+
text-transform: uppercase;
|
|
143
|
+
letter-spacing: 0.3px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Focus - use global yellow ring (visible in light and dark) */
|
|
147
|
+
.salmex-btn:focus-visible {
|
|
148
|
+
outline: none;
|
|
149
|
+
box-shadow:
|
|
150
|
+
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
151
|
+
inset 3px 3px 0 rgb(var(--salmex-button-light)),
|
|
152
|
+
inset -2px -2px 0 rgb(var(--salmex-button-dark-edge)),
|
|
153
|
+
inset -3px -3px 0 rgb(var(--salmex-button-shadow)),
|
|
154
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
155
|
+
4px 4px 0 rgb(0 0 0 / 0.25),
|
|
156
|
+
0 0 0 2px rgb(var(--salmex-midnight-black)),
|
|
157
|
+
0 0 0 5px rgb(var(--salmex-crown-yellow));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:global([data-theme='dark']) .salmex-btn:focus-visible {
|
|
161
|
+
box-shadow:
|
|
162
|
+
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
163
|
+
inset 3px 3px 0 rgb(var(--salmex-button-light)),
|
|
164
|
+
inset -2px -2px 0 rgb(var(--salmex-button-dark-edge)),
|
|
165
|
+
inset -3px -3px 0 rgb(var(--salmex-button-shadow)),
|
|
166
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
167
|
+
4px 4px 0 rgb(0 0 0 / 0.25),
|
|
168
|
+
0 0 0 3px rgb(var(--salmex-crown-yellow));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Hover state - energetic highlight */
|
|
172
|
+
.salmex-btn:hover:not(:disabled) {
|
|
173
|
+
background: rgb(var(--salmex-button-light));
|
|
174
|
+
transform: translateY(-1px);
|
|
175
|
+
box-shadow:
|
|
176
|
+
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
177
|
+
inset 3px 3px 0 rgb(var(--salmex-button-light)),
|
|
178
|
+
inset -2px -2px 0 rgb(var(--salmex-button-dark-edge)),
|
|
179
|
+
inset -3px -3px 0 rgb(var(--salmex-button-shadow)),
|
|
180
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
181
|
+
5px 5px 0 rgb(0 0 0 / 0.3);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Active (pressed) state - inverted shadow */
|
|
185
|
+
.salmex-btn:active:not(:disabled) {
|
|
186
|
+
box-shadow:
|
|
187
|
+
/* Inverted shadows */
|
|
188
|
+
inset -2px -2px 0 rgb(var(--salmex-button-highlight)),
|
|
189
|
+
inset -3px -3px 0 rgb(var(--salmex-button-light)),
|
|
190
|
+
inset 2px 2px 0 rgb(var(--salmex-button-dark-edge)),
|
|
191
|
+
inset 3px 3px 0 rgb(var(--salmex-button-shadow)),
|
|
192
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
193
|
+
2px 2px 0 rgb(0 0 0 / 0.3);
|
|
194
|
+
|
|
195
|
+
/* Shift down-right for pressed effect */
|
|
196
|
+
transform: translate(2px, 2px);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Disabled state */
|
|
200
|
+
.salmex-btn:disabled {
|
|
201
|
+
opacity: 0.5;
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
color: rgb(var(--salmex-text-disabled));
|
|
204
|
+
filter: grayscale(0.5);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ========================================
|
|
208
|
+
SIZE VARIANTS
|
|
209
|
+
======================================== */
|
|
210
|
+
.salmex-btn-sm {
|
|
211
|
+
height: 28px;
|
|
212
|
+
padding: 0 var(--salmex-space-3);
|
|
213
|
+
font-size: var(--salmex-font-size-xs);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.salmex-btn-md {
|
|
217
|
+
height: 36px;
|
|
218
|
+
padding: 0 var(--salmex-space-5);
|
|
219
|
+
font-size: var(--salmex-font-size-base);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.salmex-btn-lg {
|
|
223
|
+
height: 44px;
|
|
224
|
+
padding: 0 var(--salmex-space-6);
|
|
225
|
+
font-size: var(--salmex-font-size-md);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* Icon-only variants */
|
|
229
|
+
.salmex-btn-icon-only.salmex-btn-sm {
|
|
230
|
+
width: 28px;
|
|
231
|
+
padding: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.salmex-btn-icon-only.salmex-btn-md {
|
|
235
|
+
width: 36px;
|
|
236
|
+
padding: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.salmex-btn-icon-only.salmex-btn-lg {
|
|
240
|
+
width: 44px;
|
|
241
|
+
padding: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* Full width */
|
|
245
|
+
.salmex-btn-full-width {
|
|
246
|
+
width: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* ========================================
|
|
250
|
+
VARIANT STYLES - Neo-Expressionist
|
|
251
|
+
======================================== */
|
|
252
|
+
|
|
253
|
+
/* Default variant - bold canvas */
|
|
254
|
+
.salmex-btn-default {
|
|
255
|
+
color: rgb(var(--salmex-text-primary));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Primary variant - electric blue with yellow accent */
|
|
259
|
+
.salmex-btn-primary {
|
|
260
|
+
background: linear-gradient(135deg,
|
|
261
|
+
rgb(var(--salmex-electric-blue)),
|
|
262
|
+
rgb(var(--salmex-titlebar-bold))
|
|
263
|
+
);
|
|
264
|
+
color: rgb(var(--salmex-chalk-white));
|
|
265
|
+
font-weight: 900;
|
|
266
|
+
|
|
267
|
+
box-shadow:
|
|
268
|
+
inset 2px 2px 0 rgba(255, 255, 255, 0.3),
|
|
269
|
+
inset 3px 3px 0 rgba(255, 255, 255, 0.15),
|
|
270
|
+
inset -2px -2px 0 rgba(0, 0, 0, 0.4),
|
|
271
|
+
inset -3px -3px 0 rgba(0, 0, 0, 0.2),
|
|
272
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
273
|
+
4px 4px 0 rgb(0 0 0 / 0.35);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Yellow accent underline on primary */
|
|
277
|
+
.salmex-btn-primary::after {
|
|
278
|
+
content: '';
|
|
279
|
+
position: absolute;
|
|
280
|
+
bottom: 4px;
|
|
281
|
+
left: 10%;
|
|
282
|
+
width: 80%;
|
|
283
|
+
height: 2px;
|
|
284
|
+
background: rgb(var(--salmex-crown-yellow));
|
|
285
|
+
opacity: 0.7;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.salmex-btn-primary:hover:not(:disabled) {
|
|
289
|
+
background: linear-gradient(135deg,
|
|
290
|
+
rgb(var(--salmex-primary-light)),
|
|
291
|
+
rgb(var(--salmex-electric-blue))
|
|
292
|
+
);
|
|
293
|
+
transform: translateY(-1px);
|
|
294
|
+
box-shadow:
|
|
295
|
+
inset 2px 2px 0 rgba(255, 255, 255, 0.3),
|
|
296
|
+
inset 3px 3px 0 rgba(255, 255, 255, 0.15),
|
|
297
|
+
inset -2px -2px 0 rgba(0, 0, 0, 0.4),
|
|
298
|
+
inset -3px -3px 0 rgba(0, 0, 0, 0.2),
|
|
299
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
300
|
+
5px 5px 0 rgb(0 0 0 / 0.4);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.salmex-btn-primary:active:not(:disabled) {
|
|
304
|
+
transform: translate(2px, 2px);
|
|
305
|
+
box-shadow:
|
|
306
|
+
inset -2px -2px 0 rgba(255, 255, 255, 0.3),
|
|
307
|
+
inset -3px -3px 0 rgba(255, 255, 255, 0.15),
|
|
308
|
+
inset 2px 2px 0 rgba(0, 0, 0, 0.4),
|
|
309
|
+
inset 3px 3px 0 rgba(0, 0, 0, 0.2),
|
|
310
|
+
0 0 0 2px rgb(var(--salmex-border-dark)),
|
|
311
|
+
2px 2px 0 rgb(0 0 0 / 0.3);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Flat variant - minimal but bold on interaction */
|
|
315
|
+
.salmex-btn-flat {
|
|
316
|
+
background: transparent;
|
|
317
|
+
box-shadow: none;
|
|
318
|
+
color: rgb(var(--salmex-text-primary));
|
|
319
|
+
font-weight: 600;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.salmex-btn-flat:hover:not(:disabled) {
|
|
323
|
+
background: rgb(var(--salmex-hover-layer) / 0.15);
|
|
324
|
+
box-shadow:
|
|
325
|
+
inset 1px 1px 0 rgb(var(--salmex-button-highlight)),
|
|
326
|
+
inset -1px -1px 0 rgb(var(--salmex-button-shadow)),
|
|
327
|
+
0 0 0 1px rgb(var(--salmex-border-light));
|
|
328
|
+
color: rgb(var(--salmex-electric-blue));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.salmex-btn-flat:active:not(:disabled) {
|
|
332
|
+
background: rgb(var(--salmex-button-face));
|
|
333
|
+
box-shadow:
|
|
334
|
+
inset -1px -1px 0 rgb(var(--salmex-button-highlight)),
|
|
335
|
+
inset 1px 1px 0 rgb(var(--salmex-button-shadow));
|
|
336
|
+
transform: translate(1px, 1px);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/* ========================================
|
|
340
|
+
CONTENT & LAYOUT
|
|
341
|
+
======================================== */
|
|
342
|
+
.salmex-btn-content {
|
|
343
|
+
display: inline-flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
gap: var(--salmex-space-2);
|
|
346
|
+
position: relative;
|
|
347
|
+
z-index: 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.salmex-btn-icon {
|
|
351
|
+
display: inline-flex;
|
|
352
|
+
flex-shrink: 0;
|
|
353
|
+
line-height: 0;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.salmex-btn-shortcut {
|
|
357
|
+
margin-left: var(--salmex-space-3);
|
|
358
|
+
font-size: 0.8em;
|
|
359
|
+
opacity: 0.8;
|
|
360
|
+
font-family: var(--salmex-font-mono);
|
|
361
|
+
font-weight: 600;
|
|
362
|
+
padding: 2px 6px;
|
|
363
|
+
background: rgba(0, 0, 0, 0.1);
|
|
364
|
+
border-radius: 2px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* ========================================
|
|
368
|
+
REDUCED MOTION
|
|
369
|
+
======================================== */
|
|
370
|
+
@media (prefers-reduced-motion: reduce) {
|
|
371
|
+
.salmex-btn {
|
|
372
|
+
transition: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.salmex-btn:hover:not(:disabled) {
|
|
376
|
+
transform: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.salmex-btn:active:not(:disabled) {
|
|
380
|
+
transform: none;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
type ButtonVariant = 'default' | 'primary' | 'flat';
|
|
5
|
+
interface Props extends Omit<HTMLButtonAttributes, 'class'> {
|
|
6
|
+
/** Visual variant of the button */
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
/** Size of the button */
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
/** Whether the button takes full width */
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
/** Icon to display on the left */
|
|
13
|
+
iconLeft?: Snippet;
|
|
14
|
+
/** Icon to display on the right */
|
|
15
|
+
iconRight?: Snippet;
|
|
16
|
+
/** Whether this is an icon-only button (requires aria-label) */
|
|
17
|
+
iconOnly?: boolean;
|
|
18
|
+
/** Additional CSS classes */
|
|
19
|
+
class?: string;
|
|
20
|
+
/** Button content */
|
|
21
|
+
children?: Snippet;
|
|
22
|
+
/** Test ID for e2e testing */
|
|
23
|
+
testId?: string;
|
|
24
|
+
/** Keyboard shortcut hint (e.g., "Ctrl+S") */
|
|
25
|
+
shortcut?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Button
|
|
29
|
+
*
|
|
30
|
+
* Win2K × Basquiat - Bold 3D button with neo-expressionist flair.
|
|
31
|
+
* Raw structure, expressive energy, world-class accessibility.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <Button variant="default" size="md" onclick={() => handleClick()}>
|
|
35
|
+
* Click me
|
|
36
|
+
* </Button>
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <Button variant="primary" disabled>
|
|
40
|
+
* <Icon slot="icon-left" />
|
|
41
|
+
* With Icon
|
|
42
|
+
* </Button>
|
|
43
|
+
*/
|
|
44
|
+
declare const Button: import("svelte").Component<Props, {}, "">;
|
|
45
|
+
type Button = ReturnType<typeof Button>;
|
|
46
|
+
export default Button;
|
|
47
|
+
//# sourceMappingURL=Button.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/primitives/Button/Button.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACrC,KAAK,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpD,UAAU,KAAM,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAC1D,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,yBAAyB;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAkEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Button } from './Button.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"+layout.svelte.d.ts","sourceRoot":"","sources":["../../src/routes/+layout.svelte.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,MAAM;cAR2C,OAAO,QAAQ,EAAE,OAAO;UAQ3B,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default Page;
|
|
2
|
+
type Page = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Page: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
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> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=+page.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"+page.svelte.d.ts","sourceRoot":"","sources":["../../src/routes/+page.svelte.js"],"names":[],"mappings":";;;;;;;;AAoBA;;;;mBAAgH;6CATnE,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"}
|