@salmexio/ui 0.3.1 → 1.0.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 +52 -3
- package/dist/dialogs/ContextMenu/ContextMenu.svelte +96 -93
- package/dist/dialogs/ContextMenu/ContextMenu.svelte.d.ts +3 -2
- package/dist/dialogs/ContextMenu/ContextMenu.svelte.d.ts.map +1 -1
- package/dist/dialogs/Modal/Modal.svelte +112 -102
- package/dist/dialogs/Modal/Modal.svelte.d.ts +1 -1
- package/dist/feedback/Alert/Alert.svelte +115 -221
- package/dist/feedback/Alert/Alert.svelte.d.ts +1 -1
- package/dist/feedback/ProgressBar/ProgressBar.svelte +246 -0
- package/dist/feedback/ProgressBar/ProgressBar.svelte.d.ts +40 -0
- package/dist/feedback/ProgressBar/ProgressBar.svelte.d.ts.map +1 -0
- package/dist/feedback/ProgressBar/index.d.ts +2 -0
- package/dist/feedback/ProgressBar/index.d.ts.map +1 -0
- package/dist/feedback/ProgressBar/index.js +1 -0
- package/dist/feedback/Skeleton/Skeleton.svelte +153 -0
- package/dist/feedback/Skeleton/Skeleton.svelte.d.ts +37 -0
- package/dist/feedback/Skeleton/Skeleton.svelte.d.ts.map +1 -0
- package/dist/feedback/Skeleton/index.d.ts +2 -0
- package/dist/feedback/Skeleton/index.d.ts.map +1 -0
- package/dist/feedback/Skeleton/index.js +1 -0
- package/dist/feedback/Spinner/Spinner.svelte +88 -154
- package/dist/feedback/Spinner/Spinner.svelte.d.ts +5 -3
- package/dist/feedback/Spinner/Spinner.svelte.d.ts.map +1 -1
- package/dist/feedback/Toast/Toaster.svelte +431 -0
- package/dist/feedback/Toast/Toaster.svelte.d.ts +22 -0
- package/dist/feedback/Toast/Toaster.svelte.d.ts.map +1 -0
- package/dist/feedback/Toast/index.d.ts +4 -0
- package/dist/feedback/Toast/index.d.ts.map +1 -0
- package/dist/feedback/Toast/index.js +2 -0
- package/dist/feedback/Toast/toastStore.d.ts +34 -0
- package/dist/feedback/Toast/toastStore.d.ts.map +1 -0
- package/dist/feedback/Toast/toastStore.js +43 -0
- package/dist/feedback/index.d.ts +4 -0
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/index.js +3 -0
- package/dist/forms/Checkbox/Checkbox.svelte +82 -103
- package/dist/forms/Checkbox/Checkbox.svelte.d.ts +1 -1
- package/dist/forms/Select/Select.svelte +136 -177
- package/dist/forms/Select/Select.svelte.d.ts +1 -1
- package/dist/forms/Slider/Slider.svelte +356 -0
- package/dist/forms/Slider/Slider.svelte.d.ts +50 -0
- package/dist/forms/Slider/Slider.svelte.d.ts.map +1 -0
- package/dist/forms/Slider/index.d.ts +2 -0
- package/dist/forms/Slider/index.d.ts.map +1 -0
- package/dist/forms/Slider/index.js +1 -0
- package/dist/forms/TextInput/TextInput.svelte +148 -164
- package/dist/forms/TextInput/TextInput.svelte.d.ts +1 -1
- package/dist/forms/Textarea/Textarea.svelte +615 -0
- package/dist/forms/Textarea/Textarea.svelte.d.ts +47 -0
- package/dist/forms/Textarea/Textarea.svelte.d.ts.map +1 -0
- package/dist/forms/Textarea/index.d.ts +2 -0
- package/dist/forms/Textarea/index.d.ts.map +1 -0
- package/dist/forms/Textarea/index.js +1 -0
- package/dist/forms/Toggle/Toggle.svelte +239 -0
- package/dist/forms/Toggle/Toggle.svelte.d.ts +39 -0
- package/dist/forms/Toggle/Toggle.svelte.d.ts.map +1 -0
- package/dist/forms/Toggle/index.d.ts +2 -0
- package/dist/forms/Toggle/index.d.ts.map +1 -0
- package/dist/forms/Toggle/index.js +1 -0
- package/dist/forms/index.d.ts +3 -0
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +3 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/layout/Card/Card.svelte +64 -40
- package/dist/layout/Card/Card.svelte.d.ts +1 -1
- package/dist/layout/Card/Card.svelte.d.ts.map +1 -1
- package/dist/layout/Container/Container.svelte +71 -71
- package/dist/layout/Container/Container.svelte.d.ts +2 -2
- package/dist/navigation/CommandPalette/CommandPalette.svelte +410 -181
- package/dist/navigation/CommandPalette/CommandPalette.svelte.d.ts +8 -3
- package/dist/navigation/CommandPalette/CommandPalette.svelte.d.ts.map +1 -1
- package/dist/navigation/Tabs/Tabs.svelte +94 -178
- package/dist/navigation/Tabs/Tabs.svelte.d.ts +2 -2
- package/dist/primitives/Badge/Badge.svelte +85 -223
- package/dist/primitives/Badge/Badge.svelte.d.ts +2 -2
- package/dist/primitives/Badge/Badge.svelte.d.ts.map +1 -1
- package/dist/primitives/Button/Button.svelte +138 -208
- package/dist/primitives/Button/Button.svelte.d.ts +3 -3
- package/dist/primitives/Button/Button.svelte.d.ts.map +1 -1
- package/dist/primitives/Tooltip/Tooltip.svelte +260 -0
- package/dist/primitives/Tooltip/Tooltip.svelte.d.ts +36 -0
- package/dist/primitives/Tooltip/Tooltip.svelte.d.ts.map +1 -0
- package/dist/primitives/Tooltip/index.d.ts +2 -0
- package/dist/primitives/Tooltip/index.d.ts.map +1 -0
- package/dist/primitives/Tooltip/index.js +1 -0
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -0
- package/dist/styles/tokens.css +200 -259
- package/package.json +5 -5
- package/dist/windowing/Window/Window.svelte +0 -602
- package/dist/windowing/Window/Window.svelte.d.ts +0 -65
- package/dist/windowing/Window/Window.svelte.d.ts.map +0 -1
- package/dist/windowing/Window/index.d.ts +0 -2
- package/dist/windowing/Window/index.d.ts.map +0 -1
- package/dist/windowing/Window/index.js +0 -1
- package/dist/windowing/WindowManager/WindowManager.svelte +0 -410
- package/dist/windowing/WindowManager/WindowManager.svelte.d.ts +0 -38
- package/dist/windowing/WindowManager/WindowManager.svelte.d.ts.map +0 -1
- package/dist/windowing/WindowManager/index.d.ts +0 -2
- package/dist/windowing/WindowManager/index.d.ts.map +0 -1
- package/dist/windowing/WindowManager/index.js +0 -1
- package/dist/windowing/index.d.ts +0 -5
- package/dist/windowing/index.d.ts.map +0 -1
- package/dist/windowing/index.js +0 -3
- package/dist/windowing/windowStore.svelte.d.ts +0 -49
- package/dist/windowing/windowStore.svelte.d.ts.map +0 -1
- package/dist/windowing/windowStore.svelte.js +0 -170
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component TextInput
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Neo-Brutalist Dark — Clean text field with subtle borders and cyan accents.
|
|
5
5
|
Label, error, hint, prefix/suffix, clearable, password toggle. Full a11y.
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
@@ -151,33 +151,33 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
151
151
|
|
|
152
152
|
<div
|
|
153
153
|
class={cn(
|
|
154
|
-
'
|
|
155
|
-
`
|
|
156
|
-
disabled && '
|
|
154
|
+
'sx-input-wrapper',
|
|
155
|
+
`sx-input-${size}`,
|
|
156
|
+
disabled && 'sx-input-disabled',
|
|
157
157
|
className
|
|
158
158
|
)}
|
|
159
159
|
>
|
|
160
|
-
<label for={id} class={cn('
|
|
160
|
+
<label for={id} class={cn('sx-input-label', hideLabel && 'sx-sr-only')}>
|
|
161
161
|
{label}
|
|
162
162
|
{#if required}
|
|
163
|
-
<span class="
|
|
163
|
+
<span class="sx-input-required" aria-hidden="true">*</span>
|
|
164
164
|
{/if}
|
|
165
165
|
</label>
|
|
166
166
|
|
|
167
167
|
<div
|
|
168
168
|
class={cn(
|
|
169
|
-
'
|
|
170
|
-
isFocused && '
|
|
171
|
-
showError && '
|
|
172
|
-
showSuccess && '
|
|
173
|
-
disabled && '
|
|
169
|
+
'sx-input-field-wrapper',
|
|
170
|
+
isFocused && 'sx-input-focused',
|
|
171
|
+
showError && 'sx-input-error',
|
|
172
|
+
showSuccess && 'sx-input-valid',
|
|
173
|
+
disabled && 'sx-input-disabled-wrap'
|
|
174
174
|
)}
|
|
175
175
|
>
|
|
176
176
|
{#if prefix}
|
|
177
|
-
<span class="
|
|
177
|
+
<span class="sx-input-prefix" aria-hidden="true">{prefix}</span>
|
|
178
178
|
{/if}
|
|
179
179
|
{#if iconLeft}
|
|
180
|
-
<span class="
|
|
180
|
+
<span class="sx-input-icon-left" aria-hidden="true">
|
|
181
181
|
{@render iconLeft()}
|
|
182
182
|
</span>
|
|
183
183
|
{/if}
|
|
@@ -202,11 +202,11 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
202
202
|
aria-required={required}
|
|
203
203
|
data-testid={testId}
|
|
204
204
|
class={cn(
|
|
205
|
-
'
|
|
206
|
-
prefix && '
|
|
207
|
-
suffix && '
|
|
208
|
-
iconLeft && '
|
|
209
|
-
hasRightContent && '
|
|
205
|
+
'sx-input-field',
|
|
206
|
+
prefix && 'sx-input-has-prefix',
|
|
207
|
+
suffix && 'sx-input-has-suffix',
|
|
208
|
+
iconLeft && 'sx-input-has-icon-left',
|
|
209
|
+
hasRightContent && 'sx-input-has-right'
|
|
210
210
|
)}
|
|
211
211
|
oninput={handleInput}
|
|
212
212
|
onblur={handleBlur}
|
|
@@ -215,24 +215,24 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
215
215
|
{...restProps}
|
|
216
216
|
/>
|
|
217
217
|
|
|
218
|
-
<div class="
|
|
218
|
+
<div class="sx-input-right">
|
|
219
219
|
{#if loading}
|
|
220
|
-
<span class="
|
|
221
|
-
<svg class="
|
|
220
|
+
<span class="sx-input-loading" aria-hidden="true">
|
|
221
|
+
<svg class="sx-input-spinner" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
|
222
222
|
<circle cx="12" cy="12" r="10" stroke-opacity="0.25"/>
|
|
223
223
|
<path d="M12 2a10 10 0 0 1 10 10" stroke-linecap="round"/>
|
|
224
224
|
</svg>
|
|
225
225
|
</span>
|
|
226
226
|
{:else if showError}
|
|
227
|
-
<span class="
|
|
227
|
+
<span class="sx-input-icon-error" aria-hidden="true">
|
|
228
228
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>
|
|
229
229
|
</span>
|
|
230
230
|
{:else if showSuccess}
|
|
231
|
-
<span class="
|
|
231
|
+
<span class="sx-input-icon-success" aria-hidden="true">
|
|
232
232
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
|
233
233
|
</span>
|
|
234
234
|
{:else if iconRight}
|
|
235
|
-
<span class="
|
|
235
|
+
<span class="sx-input-icon-right" aria-hidden="true">
|
|
236
236
|
{@render iconRight()}
|
|
237
237
|
</span>
|
|
238
238
|
{/if}
|
|
@@ -240,7 +240,7 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
240
240
|
{#if clearable && value && !disabled && !readonly}
|
|
241
241
|
<button
|
|
242
242
|
type="button"
|
|
243
|
-
class="
|
|
243
|
+
class="sx-input-clear"
|
|
244
244
|
onclick={handleClear}
|
|
245
245
|
aria-label="Clear input"
|
|
246
246
|
tabindex={-1}
|
|
@@ -252,7 +252,7 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
252
252
|
{#if showPasswordToggle && type === 'password'}
|
|
253
253
|
<button
|
|
254
254
|
type="button"
|
|
255
|
-
class="
|
|
255
|
+
class="sx-input-password-toggle"
|
|
256
256
|
onclick={togglePassword}
|
|
257
257
|
aria-label={passwordVisible ? 'Hide password' : 'Show password'}
|
|
258
258
|
aria-pressed={passwordVisible}
|
|
@@ -268,24 +268,24 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
268
268
|
</div>
|
|
269
269
|
|
|
270
270
|
{#if suffix}
|
|
271
|
-
<span class="
|
|
271
|
+
<span class="sx-input-suffix" aria-hidden="true">{suffix}</span>
|
|
272
272
|
{/if}
|
|
273
273
|
</div>
|
|
274
274
|
|
|
275
|
-
<div class="
|
|
276
|
-
<div class="
|
|
275
|
+
<div class="sx-input-footer">
|
|
276
|
+
<div class="sx-input-messages">
|
|
277
277
|
{#if showError}
|
|
278
|
-
<p id={errorId} class="
|
|
278
|
+
<p id={errorId} class="sx-input-message sx-input-message-error" role="alert" aria-live="assertive">
|
|
279
279
|
{error}
|
|
280
280
|
</p>
|
|
281
281
|
{:else if showSuccess}
|
|
282
|
-
<p class="
|
|
282
|
+
<p class="sx-input-message sx-input-message-success" role="status" aria-live="polite">{successMessage}</p>
|
|
283
283
|
{:else if hint}
|
|
284
|
-
<p id={hintId} class="
|
|
284
|
+
<p id={hintId} class="sx-input-message sx-input-message-hint">{hint}</p>
|
|
285
285
|
{/if}
|
|
286
286
|
</div>
|
|
287
287
|
{#if showCharCount && maxLength !== undefined}
|
|
288
|
-
<span class="
|
|
288
|
+
<span class="sx-input-charcount" class:sx-input-charcount-warn={value.length > maxLength * 0.9}>
|
|
289
289
|
{value.length}/{maxLength}
|
|
290
290
|
</span>
|
|
291
291
|
{/if}
|
|
@@ -293,30 +293,28 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
293
293
|
</div>
|
|
294
294
|
|
|
295
295
|
<style>
|
|
296
|
-
.
|
|
296
|
+
.sx-input-wrapper {
|
|
297
297
|
display: flex;
|
|
298
298
|
flex-direction: column;
|
|
299
|
-
gap: var(--
|
|
299
|
+
gap: var(--sx-space-1);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
.
|
|
303
|
-
opacity: 0.
|
|
302
|
+
.sx-input-disabled {
|
|
303
|
+
opacity: 0.5;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.
|
|
307
|
-
font-family: var(--
|
|
308
|
-
font-weight:
|
|
309
|
-
font-size: var(--
|
|
310
|
-
text-
|
|
311
|
-
letter-spacing: 0.3px;
|
|
312
|
-
color: rgb(var(--salmex-text-primary));
|
|
306
|
+
.sx-input-label {
|
|
307
|
+
font-family: var(--sx-font-body);
|
|
308
|
+
font-weight: 500;
|
|
309
|
+
font-size: var(--sx-text-sm);
|
|
310
|
+
color: var(--sx-color-text-secondary);
|
|
313
311
|
}
|
|
314
312
|
|
|
315
|
-
.
|
|
316
|
-
color:
|
|
313
|
+
.sx-input-required {
|
|
314
|
+
color: var(--sx-color-red);
|
|
317
315
|
}
|
|
318
316
|
|
|
319
|
-
.
|
|
317
|
+
.sx-sr-only {
|
|
320
318
|
position: absolute;
|
|
321
319
|
width: 1px;
|
|
322
320
|
height: 1px;
|
|
@@ -328,181 +326,171 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
328
326
|
border: 0;
|
|
329
327
|
}
|
|
330
328
|
|
|
331
|
-
.
|
|
329
|
+
.sx-input-field-wrapper {
|
|
332
330
|
position: relative;
|
|
333
331
|
display: flex;
|
|
334
332
|
align-items: center;
|
|
335
|
-
background:
|
|
336
|
-
border:
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
inset -2px -2px 0 rgb(var(--salmex-button-shadow));
|
|
340
|
-
transition: box-shadow var(--salmex-transition-fast), border-color var(--salmex-transition-fast);
|
|
333
|
+
background: var(--sx-color-surface);
|
|
334
|
+
border: 1px solid var(--sx-color-border-strong);
|
|
335
|
+
border-radius: var(--sx-radius-md);
|
|
336
|
+
transition: border-color var(--sx-transition-fast), box-shadow var(--sx-transition-fast);
|
|
341
337
|
}
|
|
342
338
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
border-color: rgb(var(--salmex-midnight-black));
|
|
346
|
-
box-shadow:
|
|
347
|
-
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
348
|
-
inset -2px -2px 0 rgb(var(--salmex-button-shadow)),
|
|
349
|
-
0 0 0 2px rgb(var(--salmex-midnight-black)),
|
|
350
|
-
0 0 0 5px rgb(var(--salmex-crown-yellow));
|
|
339
|
+
.sx-input-field-wrapper:hover:not(.sx-input-disabled-wrap):not(.sx-input-focused):not(.sx-input-error) {
|
|
340
|
+
border-color: var(--sx-color-border-hover);
|
|
351
341
|
}
|
|
352
342
|
|
|
353
|
-
|
|
354
|
-
border-color:
|
|
355
|
-
box-shadow:
|
|
356
|
-
inset 2px 2px 0 rgb(var(--salmex-button-highlight)),
|
|
357
|
-
inset -2px -2px 0 rgb(var(--salmex-button-shadow)),
|
|
358
|
-
0 0 0 3px rgb(var(--salmex-crown-yellow));
|
|
343
|
+
.sx-input-focused {
|
|
344
|
+
border-color: var(--sx-color-cyan);
|
|
345
|
+
box-shadow: 0 0 0 3px var(--sx-color-cyan-ring);
|
|
359
346
|
}
|
|
360
347
|
|
|
361
|
-
.
|
|
362
|
-
border-color:
|
|
348
|
+
.sx-input-error {
|
|
349
|
+
border-color: var(--sx-color-red);
|
|
350
|
+
box-shadow: 0 0 0 3px var(--sx-color-red-ring);
|
|
363
351
|
}
|
|
364
352
|
|
|
365
|
-
.
|
|
366
|
-
border-color:
|
|
353
|
+
.sx-input-valid {
|
|
354
|
+
border-color: var(--sx-color-green);
|
|
367
355
|
}
|
|
368
356
|
|
|
369
|
-
.
|
|
370
|
-
opacity: 0.
|
|
357
|
+
.sx-input-disabled-wrap {
|
|
358
|
+
opacity: 0.5;
|
|
371
359
|
cursor: not-allowed;
|
|
372
|
-
background:
|
|
360
|
+
background: var(--sx-color-surface-2);
|
|
373
361
|
}
|
|
374
362
|
|
|
375
|
-
.
|
|
376
|
-
.
|
|
363
|
+
.sx-input-prefix,
|
|
364
|
+
.sx-input-suffix {
|
|
377
365
|
display: flex;
|
|
378
366
|
align-items: center;
|
|
379
367
|
flex-shrink: 0;
|
|
380
|
-
padding: 0 var(--
|
|
381
|
-
font-family: var(--
|
|
382
|
-
font-size: var(--
|
|
383
|
-
font-weight:
|
|
384
|
-
color:
|
|
385
|
-
border-right:
|
|
368
|
+
padding: 0 var(--sx-space-3);
|
|
369
|
+
font-family: var(--sx-font-mono);
|
|
370
|
+
font-size: var(--sx-text-sm);
|
|
371
|
+
font-weight: 500;
|
|
372
|
+
color: var(--sx-color-text-secondary);
|
|
373
|
+
border-right: 1px solid var(--sx-color-border);
|
|
386
374
|
}
|
|
387
375
|
|
|
388
|
-
.
|
|
376
|
+
.sx-input-suffix {
|
|
389
377
|
border-right: none;
|
|
390
|
-
border-left:
|
|
378
|
+
border-left: 1px solid var(--sx-color-border);
|
|
391
379
|
margin-left: 0;
|
|
392
380
|
}
|
|
393
381
|
|
|
394
|
-
.
|
|
382
|
+
.sx-input-icon-left {
|
|
395
383
|
display: flex;
|
|
396
384
|
align-items: center;
|
|
397
|
-
padding-left: var(--
|
|
398
|
-
color:
|
|
385
|
+
padding-left: var(--sx-space-3);
|
|
386
|
+
color: var(--sx-color-text-secondary);
|
|
399
387
|
}
|
|
400
388
|
|
|
401
|
-
.
|
|
389
|
+
.sx-input-field {
|
|
402
390
|
flex: 1;
|
|
403
391
|
min-width: 0;
|
|
404
392
|
border: none;
|
|
405
393
|
background: transparent;
|
|
406
|
-
color:
|
|
407
|
-
font-family: var(--
|
|
408
|
-
font-size: var(--
|
|
394
|
+
color: var(--sx-color-text);
|
|
395
|
+
font-family: var(--sx-font-body);
|
|
396
|
+
font-size: var(--sx-text-sm);
|
|
409
397
|
outline: none;
|
|
410
|
-
padding: var(--
|
|
398
|
+
padding: var(--sx-space-2) var(--sx-space-3);
|
|
411
399
|
}
|
|
412
400
|
|
|
413
401
|
/* Only the wrapper shows the focus ring; avoid double ring from global :focus-visible on the input */
|
|
414
|
-
.
|
|
402
|
+
.sx-input-field:focus-visible {
|
|
415
403
|
box-shadow: none;
|
|
416
404
|
}
|
|
417
405
|
|
|
418
|
-
.
|
|
419
|
-
color:
|
|
406
|
+
.sx-input-field::placeholder {
|
|
407
|
+
color: var(--sx-color-text-disabled);
|
|
420
408
|
}
|
|
421
409
|
|
|
422
|
-
.
|
|
410
|
+
.sx-input-field:disabled {
|
|
423
411
|
cursor: not-allowed;
|
|
424
412
|
}
|
|
425
413
|
|
|
426
|
-
.
|
|
427
|
-
padding-left: var(--
|
|
414
|
+
.sx-input-has-prefix {
|
|
415
|
+
padding-left: var(--sx-space-1);
|
|
428
416
|
}
|
|
429
417
|
|
|
430
|
-
.
|
|
431
|
-
padding-right: var(--
|
|
418
|
+
.sx-input-has-suffix {
|
|
419
|
+
padding-right: var(--sx-space-1);
|
|
432
420
|
}
|
|
433
421
|
|
|
434
|
-
.
|
|
435
|
-
padding-left: var(--
|
|
422
|
+
.sx-input-has-icon-left {
|
|
423
|
+
padding-left: var(--sx-space-1);
|
|
436
424
|
}
|
|
437
425
|
|
|
438
|
-
.
|
|
439
|
-
padding-right: var(--
|
|
426
|
+
.sx-input-has-right {
|
|
427
|
+
padding-right: var(--sx-space-1);
|
|
440
428
|
}
|
|
441
429
|
|
|
442
|
-
.
|
|
430
|
+
.sx-input-sm .sx-input-field-wrapper {
|
|
443
431
|
min-height: 32px;
|
|
444
432
|
}
|
|
445
433
|
|
|
446
|
-
.
|
|
447
|
-
font-size: var(--
|
|
448
|
-
padding: var(--
|
|
434
|
+
.sx-input-sm .sx-input-field {
|
|
435
|
+
font-size: var(--sx-text-xs);
|
|
436
|
+
padding: var(--sx-space-1) var(--sx-space-2);
|
|
449
437
|
}
|
|
450
438
|
|
|
451
|
-
.
|
|
439
|
+
.sx-input-md .sx-input-field-wrapper {
|
|
452
440
|
min-height: 40px;
|
|
453
441
|
}
|
|
454
442
|
|
|
455
|
-
.
|
|
443
|
+
.sx-input-lg .sx-input-field-wrapper {
|
|
456
444
|
min-height: 48px;
|
|
457
445
|
}
|
|
458
446
|
|
|
459
|
-
.
|
|
460
|
-
font-size: var(--
|
|
461
|
-
padding: var(--
|
|
447
|
+
.sx-input-lg .sx-input-field {
|
|
448
|
+
font-size: var(--sx-text-base);
|
|
449
|
+
padding: var(--sx-space-3) var(--sx-space-4);
|
|
462
450
|
}
|
|
463
451
|
|
|
464
|
-
.
|
|
452
|
+
.sx-input-right {
|
|
465
453
|
display: flex;
|
|
466
454
|
align-items: center;
|
|
467
|
-
gap: var(--
|
|
455
|
+
gap: var(--sx-space-1);
|
|
468
456
|
flex-shrink: 0;
|
|
469
|
-
padding-right: var(--
|
|
457
|
+
padding-right: var(--sx-space-2);
|
|
470
458
|
}
|
|
471
459
|
|
|
472
|
-
.
|
|
473
|
-
.
|
|
474
|
-
.
|
|
460
|
+
.sx-input-icon-right,
|
|
461
|
+
.sx-input-icon-error,
|
|
462
|
+
.sx-input-icon-success {
|
|
475
463
|
display: flex;
|
|
476
464
|
align-items: center;
|
|
477
|
-
color:
|
|
465
|
+
color: var(--sx-color-text-secondary);
|
|
478
466
|
}
|
|
479
467
|
|
|
480
|
-
.
|
|
481
|
-
color:
|
|
468
|
+
.sx-input-icon-error {
|
|
469
|
+
color: var(--sx-color-red);
|
|
482
470
|
}
|
|
483
471
|
|
|
484
|
-
.
|
|
485
|
-
color:
|
|
472
|
+
.sx-input-icon-success {
|
|
473
|
+
color: var(--sx-color-green);
|
|
486
474
|
}
|
|
487
475
|
|
|
488
|
-
.
|
|
476
|
+
.sx-input-loading {
|
|
489
477
|
display: flex;
|
|
490
478
|
align-items: center;
|
|
491
|
-
color:
|
|
479
|
+
color: var(--sx-color-cyan);
|
|
492
480
|
}
|
|
493
481
|
|
|
494
|
-
.
|
|
495
|
-
animation:
|
|
482
|
+
.sx-input-spinner {
|
|
483
|
+
animation: sx-spin-input 0.8s linear infinite;
|
|
496
484
|
}
|
|
497
485
|
|
|
498
|
-
@keyframes
|
|
486
|
+
@keyframes sx-spin-input {
|
|
499
487
|
to {
|
|
500
488
|
transform: rotate(360deg);
|
|
501
489
|
}
|
|
502
490
|
}
|
|
503
491
|
|
|
504
|
-
.
|
|
505
|
-
.
|
|
492
|
+
.sx-input-clear,
|
|
493
|
+
.sx-input-password-toggle {
|
|
506
494
|
display: flex;
|
|
507
495
|
align-items: center;
|
|
508
496
|
justify-content: center;
|
|
@@ -510,66 +498,62 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
510
498
|
height: 28px;
|
|
511
499
|
padding: 0;
|
|
512
500
|
border: none;
|
|
501
|
+
border-radius: var(--sx-radius-sm);
|
|
513
502
|
background: transparent;
|
|
514
|
-
color:
|
|
503
|
+
color: var(--sx-color-text-secondary);
|
|
515
504
|
cursor: pointer;
|
|
516
|
-
transition: background var(--
|
|
505
|
+
transition: background var(--sx-transition-fast), color var(--sx-transition-fast);
|
|
517
506
|
}
|
|
518
507
|
|
|
519
|
-
.
|
|
520
|
-
.
|
|
521
|
-
background:
|
|
522
|
-
color:
|
|
508
|
+
.sx-input-clear:hover,
|
|
509
|
+
.sx-input-password-toggle:hover {
|
|
510
|
+
background: var(--sx-color-surface-2);
|
|
511
|
+
color: var(--sx-color-text);
|
|
523
512
|
}
|
|
524
513
|
|
|
525
|
-
.
|
|
526
|
-
.
|
|
527
|
-
outline:
|
|
528
|
-
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
:global([data-theme='dark']) .salmex-input-clear:focus-visible,
|
|
532
|
-
:global([data-theme='dark']) .salmex-input-password-toggle:focus-visible {
|
|
533
|
-
box-shadow: 0 0 0 3px rgb(var(--salmex-crown-yellow));
|
|
514
|
+
.sx-input-clear:focus-visible,
|
|
515
|
+
.sx-input-password-toggle:focus-visible {
|
|
516
|
+
outline: 2px solid var(--sx-color-cyan);
|
|
517
|
+
outline-offset: 2px;
|
|
534
518
|
}
|
|
535
519
|
|
|
536
|
-
.
|
|
520
|
+
.sx-input-footer {
|
|
537
521
|
display: flex;
|
|
538
522
|
justify-content: space-between;
|
|
539
523
|
align-items: center;
|
|
540
524
|
min-height: 1.25rem;
|
|
541
525
|
}
|
|
542
526
|
|
|
543
|
-
.
|
|
544
|
-
font-size: var(--
|
|
527
|
+
.sx-input-message {
|
|
528
|
+
font-size: var(--sx-text-xs);
|
|
545
529
|
margin: 0;
|
|
546
530
|
}
|
|
547
531
|
|
|
548
|
-
.
|
|
549
|
-
color:
|
|
550
|
-
font-weight:
|
|
532
|
+
.sx-input-message-error {
|
|
533
|
+
color: var(--sx-color-red);
|
|
534
|
+
font-weight: 500;
|
|
551
535
|
}
|
|
552
536
|
|
|
553
|
-
.
|
|
554
|
-
color:
|
|
537
|
+
.sx-input-message-success {
|
|
538
|
+
color: var(--sx-color-green);
|
|
555
539
|
}
|
|
556
540
|
|
|
557
|
-
.
|
|
558
|
-
color:
|
|
541
|
+
.sx-input-message-hint {
|
|
542
|
+
color: var(--sx-color-text-secondary);
|
|
559
543
|
}
|
|
560
544
|
|
|
561
|
-
.
|
|
562
|
-
font-size: var(--
|
|
563
|
-
font-family: var(--
|
|
564
|
-
color:
|
|
545
|
+
.sx-input-charcount {
|
|
546
|
+
font-size: var(--sx-text-xs);
|
|
547
|
+
font-family: var(--sx-font-mono);
|
|
548
|
+
color: var(--sx-color-text-secondary);
|
|
565
549
|
}
|
|
566
550
|
|
|
567
|
-
.
|
|
568
|
-
color:
|
|
551
|
+
.sx-input-charcount-warn {
|
|
552
|
+
color: var(--sx-color-gold);
|
|
569
553
|
}
|
|
570
554
|
|
|
571
555
|
@media (prefers-reduced-motion: reduce) {
|
|
572
|
-
.
|
|
556
|
+
.sx-input-spinner {
|
|
573
557
|
animation: none;
|
|
574
558
|
}
|
|
575
559
|
}
|
|
@@ -41,7 +41,7 @@ interface Props extends Omit<HTMLInputAttributes, 'class' | 'size' | 'inputmode'
|
|
|
41
41
|
/**
|
|
42
42
|
* TextInput
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* Neo-Brutalist Dark — Clean text field with subtle borders and cyan accents.
|
|
45
45
|
* Label, error, hint, prefix/suffix, clearable, password toggle. Full a11y.
|
|
46
46
|
*/
|
|
47
47
|
declare const TextInput: import("svelte").Component<Props, {}, "value">;
|