@salmexio/ui 0.4.0 → 1.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 +52 -3
- package/dist/dialogs/ContextMenu/ContextMenu.svelte +97 -94
- 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 -116
- package/dist/dialogs/Modal/Modal.svelte.d.ts +1 -1
- package/dist/feedback/Alert/Alert.svelte +119 -220
- package/dist/feedback/Alert/Alert.svelte.d.ts +1 -1
- package/dist/feedback/ProgressBar/ProgressBar.svelte +265 -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 +157 -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 +86 -151
- 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 +87 -104
- package/dist/forms/Checkbox/Checkbox.svelte.d.ts +1 -1
- package/dist/forms/Select/Select.svelte +137 -179
- 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 +161 -167
- 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 +66 -39
- 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/layout/ThermalBackground/ThermalBackground.svelte +313 -0
- package/dist/layout/ThermalBackground/ThermalBackground.svelte.d.ts +16 -0
- package/dist/layout/ThermalBackground/ThermalBackground.svelte.d.ts.map +1 -0
- package/dist/layout/ThermalBackground/index.d.ts +2 -0
- package/dist/layout/ThermalBackground/index.d.ts.map +1 -0
- package/dist/layout/ThermalBackground/index.js +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +1 -0
- package/dist/navigation/CommandPalette/CommandPalette.svelte +407 -189
- 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 +139 -192
- package/dist/navigation/Tabs/Tabs.svelte.d.ts +2 -2
- package/dist/primitives/Badge/Badge.svelte +85 -220
- 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 +214 -194
- 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 +329 -260
- package/package.json +5 -5
- package/dist/windowing/Window/Window.svelte +0 -637
- 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 -425
- 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
|
+
INFRARED — Clean text field with subtle borders and vermilion 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,29 +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
|
-
|
|
311
|
-
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);
|
|
312
311
|
}
|
|
313
312
|
|
|
314
|
-
.
|
|
315
|
-
color:
|
|
313
|
+
.sx-input-required {
|
|
314
|
+
color: var(--sx-color-red);
|
|
316
315
|
}
|
|
317
316
|
|
|
318
|
-
.
|
|
317
|
+
.sx-sr-only {
|
|
319
318
|
position: absolute;
|
|
320
319
|
width: 1px;
|
|
321
320
|
height: 1px;
|
|
@@ -327,182 +326,172 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
327
326
|
border: 0;
|
|
328
327
|
}
|
|
329
328
|
|
|
330
|
-
.
|
|
329
|
+
.sx-input-field-wrapper {
|
|
331
330
|
position: relative;
|
|
332
331
|
display: flex;
|
|
333
332
|
align-items: center;
|
|
334
|
-
background:
|
|
335
|
-
border: 1px solid
|
|
336
|
-
border-radius: var(--
|
|
337
|
-
box-shadow
|
|
338
|
-
inset 1px 1px 0 rgb(var(--salmex-button-highlight)),
|
|
339
|
-
inset -1px -1px 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 1px 1px 0 rgb(var(--salmex-button-highlight)),
|
|
348
|
-
inset -1px -1px 0 rgb(var(--salmex-button-shadow)),
|
|
349
|
-
0 0 0 2px rgb(var(--salmex-midnight-black)),
|
|
350
|
-
0 0 2px 4px 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
|
-
|
|
356
|
-
inset 1px 1px 0 rgb(var(--salmex-button-highlight)),
|
|
357
|
-
inset -1px -1px 0 rgb(var(--salmex-button-shadow)),
|
|
358
|
-
0 0 2px 3px rgb(var(--salmex-crown-yellow));
|
|
343
|
+
.sx-input-focused {
|
|
344
|
+
border-color: var(--sx-color-primary);
|
|
345
|
+
animation: sx-focus-breathe 2s ease-in-out infinite;
|
|
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);
|
|
351
|
+
animation: sx-error-shake 300ms ease-out;
|
|
363
352
|
}
|
|
364
353
|
|
|
365
|
-
.
|
|
366
|
-
border-color:
|
|
354
|
+
.sx-input-valid {
|
|
355
|
+
border-color: var(--sx-color-green);
|
|
367
356
|
}
|
|
368
357
|
|
|
369
|
-
.
|
|
370
|
-
opacity: 0.
|
|
358
|
+
.sx-input-disabled-wrap {
|
|
359
|
+
opacity: 0.5;
|
|
371
360
|
cursor: not-allowed;
|
|
372
|
-
background:
|
|
361
|
+
background: var(--sx-color-surface-2);
|
|
373
362
|
}
|
|
374
363
|
|
|
375
|
-
.
|
|
376
|
-
.
|
|
364
|
+
.sx-input-prefix,
|
|
365
|
+
.sx-input-suffix {
|
|
377
366
|
display: flex;
|
|
378
367
|
align-items: center;
|
|
379
368
|
flex-shrink: 0;
|
|
380
|
-
padding: 0 var(--
|
|
381
|
-
font-family: var(--
|
|
382
|
-
font-size: var(--
|
|
383
|
-
font-weight:
|
|
384
|
-
color:
|
|
385
|
-
border-right: 1px solid
|
|
369
|
+
padding: 0 var(--sx-space-3);
|
|
370
|
+
font-family: var(--sx-font-mono);
|
|
371
|
+
font-size: var(--sx-text-sm);
|
|
372
|
+
font-weight: 500;
|
|
373
|
+
color: var(--sx-color-text-secondary);
|
|
374
|
+
border-right: 1px solid var(--sx-color-border);
|
|
386
375
|
}
|
|
387
376
|
|
|
388
|
-
.
|
|
377
|
+
.sx-input-suffix {
|
|
389
378
|
border-right: none;
|
|
390
|
-
border-left: 1px solid
|
|
379
|
+
border-left: 1px solid var(--sx-color-border);
|
|
391
380
|
margin-left: 0;
|
|
392
381
|
}
|
|
393
382
|
|
|
394
|
-
.
|
|
383
|
+
.sx-input-icon-left {
|
|
395
384
|
display: flex;
|
|
396
385
|
align-items: center;
|
|
397
|
-
padding-left: var(--
|
|
398
|
-
color:
|
|
386
|
+
padding-left: var(--sx-space-3);
|
|
387
|
+
color: var(--sx-color-text-secondary);
|
|
399
388
|
}
|
|
400
389
|
|
|
401
|
-
.
|
|
390
|
+
.sx-input-field {
|
|
402
391
|
flex: 1;
|
|
403
392
|
min-width: 0;
|
|
404
393
|
border: none;
|
|
405
394
|
background: transparent;
|
|
406
|
-
color:
|
|
407
|
-
font-family: var(--
|
|
408
|
-
font-size: var(--
|
|
395
|
+
color: var(--sx-color-text);
|
|
396
|
+
font-family: var(--sx-font-body);
|
|
397
|
+
font-size: var(--sx-text-sm);
|
|
409
398
|
outline: none;
|
|
410
|
-
padding: var(--
|
|
399
|
+
padding: var(--sx-space-2) var(--sx-space-3);
|
|
411
400
|
}
|
|
412
401
|
|
|
413
402
|
/* Only the wrapper shows the focus ring; avoid double ring from global :focus-visible on the input */
|
|
414
|
-
.
|
|
403
|
+
.sx-input-field:focus-visible {
|
|
415
404
|
box-shadow: none;
|
|
416
405
|
}
|
|
417
406
|
|
|
418
|
-
.
|
|
419
|
-
color:
|
|
407
|
+
.sx-input-field::placeholder {
|
|
408
|
+
color: var(--sx-color-text-disabled);
|
|
420
409
|
}
|
|
421
410
|
|
|
422
|
-
.
|
|
411
|
+
.sx-input-field:disabled {
|
|
423
412
|
cursor: not-allowed;
|
|
424
413
|
}
|
|
425
414
|
|
|
426
|
-
.
|
|
427
|
-
padding-left: var(--
|
|
415
|
+
.sx-input-has-prefix {
|
|
416
|
+
padding-left: var(--sx-space-1);
|
|
428
417
|
}
|
|
429
418
|
|
|
430
|
-
.
|
|
431
|
-
padding-right: var(--
|
|
419
|
+
.sx-input-has-suffix {
|
|
420
|
+
padding-right: var(--sx-space-1);
|
|
432
421
|
}
|
|
433
422
|
|
|
434
|
-
.
|
|
435
|
-
padding-left: var(--
|
|
423
|
+
.sx-input-has-icon-left {
|
|
424
|
+
padding-left: var(--sx-space-1);
|
|
436
425
|
}
|
|
437
426
|
|
|
438
|
-
.
|
|
439
|
-
padding-right: var(--
|
|
427
|
+
.sx-input-has-right {
|
|
428
|
+
padding-right: var(--sx-space-1);
|
|
440
429
|
}
|
|
441
430
|
|
|
442
|
-
.
|
|
443
|
-
min-height:
|
|
431
|
+
.sx-input-sm .sx-input-field-wrapper {
|
|
432
|
+
min-height: 32px;
|
|
444
433
|
}
|
|
445
434
|
|
|
446
|
-
.
|
|
447
|
-
font-size: var(--
|
|
448
|
-
padding: var(--
|
|
435
|
+
.sx-input-sm .sx-input-field {
|
|
436
|
+
font-size: var(--sx-text-xs);
|
|
437
|
+
padding: var(--sx-space-1) var(--sx-space-2);
|
|
449
438
|
}
|
|
450
439
|
|
|
451
|
-
.
|
|
452
|
-
min-height:
|
|
440
|
+
.sx-input-md .sx-input-field-wrapper {
|
|
441
|
+
min-height: 40px;
|
|
453
442
|
}
|
|
454
443
|
|
|
455
|
-
.
|
|
456
|
-
min-height:
|
|
444
|
+
.sx-input-lg .sx-input-field-wrapper {
|
|
445
|
+
min-height: 48px;
|
|
457
446
|
}
|
|
458
447
|
|
|
459
|
-
.
|
|
460
|
-
font-size: var(--
|
|
461
|
-
padding: var(--
|
|
448
|
+
.sx-input-lg .sx-input-field {
|
|
449
|
+
font-size: var(--sx-text-base);
|
|
450
|
+
padding: var(--sx-space-3) var(--sx-space-4);
|
|
462
451
|
}
|
|
463
452
|
|
|
464
|
-
.
|
|
453
|
+
.sx-input-right {
|
|
465
454
|
display: flex;
|
|
466
455
|
align-items: center;
|
|
467
|
-
gap: var(--
|
|
456
|
+
gap: var(--sx-space-1);
|
|
468
457
|
flex-shrink: 0;
|
|
469
|
-
padding-right: var(--
|
|
458
|
+
padding-right: var(--sx-space-2);
|
|
470
459
|
}
|
|
471
460
|
|
|
472
|
-
.
|
|
473
|
-
.
|
|
474
|
-
.
|
|
461
|
+
.sx-input-icon-right,
|
|
462
|
+
.sx-input-icon-error,
|
|
463
|
+
.sx-input-icon-success {
|
|
475
464
|
display: flex;
|
|
476
465
|
align-items: center;
|
|
477
|
-
color:
|
|
466
|
+
color: var(--sx-color-text-secondary);
|
|
478
467
|
}
|
|
479
468
|
|
|
480
|
-
.
|
|
481
|
-
color:
|
|
469
|
+
.sx-input-icon-error {
|
|
470
|
+
color: var(--sx-color-red);
|
|
482
471
|
}
|
|
483
472
|
|
|
484
|
-
.
|
|
485
|
-
color:
|
|
473
|
+
.sx-input-icon-success {
|
|
474
|
+
color: var(--sx-color-green);
|
|
486
475
|
}
|
|
487
476
|
|
|
488
|
-
.
|
|
477
|
+
.sx-input-loading {
|
|
489
478
|
display: flex;
|
|
490
479
|
align-items: center;
|
|
491
|
-
color:
|
|
480
|
+
color: var(--sx-color-primary);
|
|
492
481
|
}
|
|
493
482
|
|
|
494
|
-
.
|
|
495
|
-
animation:
|
|
483
|
+
.sx-input-spinner {
|
|
484
|
+
animation: sx-spin-input 0.8s linear infinite;
|
|
496
485
|
}
|
|
497
486
|
|
|
498
|
-
@keyframes
|
|
487
|
+
@keyframes sx-spin-input {
|
|
499
488
|
to {
|
|
500
489
|
transform: rotate(360deg);
|
|
501
490
|
}
|
|
502
491
|
}
|
|
503
492
|
|
|
504
|
-
.
|
|
505
|
-
.
|
|
493
|
+
.sx-input-clear,
|
|
494
|
+
.sx-input-password-toggle {
|
|
506
495
|
display: flex;
|
|
507
496
|
align-items: center;
|
|
508
497
|
justify-content: center;
|
|
@@ -510,66 +499,71 @@ function handleKeyDown(e: KeyboardEvent) {
|
|
|
510
499
|
height: 28px;
|
|
511
500
|
padding: 0;
|
|
512
501
|
border: none;
|
|
502
|
+
border-radius: var(--sx-radius-sm);
|
|
513
503
|
background: transparent;
|
|
514
|
-
color:
|
|
504
|
+
color: var(--sx-color-text-secondary);
|
|
515
505
|
cursor: pointer;
|
|
516
|
-
transition: background var(--
|
|
506
|
+
transition: background var(--sx-transition-fast), color var(--sx-transition-fast);
|
|
517
507
|
}
|
|
518
508
|
|
|
519
|
-
.
|
|
520
|
-
.
|
|
521
|
-
background:
|
|
522
|
-
color:
|
|
509
|
+
.sx-input-clear:hover,
|
|
510
|
+
.sx-input-password-toggle:hover {
|
|
511
|
+
background: var(--sx-color-surface-2);
|
|
512
|
+
color: var(--sx-color-text);
|
|
523
513
|
}
|
|
524
514
|
|
|
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 2px 3px rgb(var(--salmex-crown-yellow));
|
|
515
|
+
.sx-input-clear:focus-visible,
|
|
516
|
+
.sx-input-password-toggle:focus-visible {
|
|
517
|
+
outline: 2px solid var(--sx-color-primary);
|
|
518
|
+
outline-offset: 2px;
|
|
534
519
|
}
|
|
535
520
|
|
|
536
|
-
.
|
|
521
|
+
.sx-input-footer {
|
|
537
522
|
display: flex;
|
|
538
523
|
justify-content: space-between;
|
|
539
524
|
align-items: center;
|
|
540
525
|
min-height: 1.25rem;
|
|
541
526
|
}
|
|
542
527
|
|
|
543
|
-
.
|
|
544
|
-
font-size: var(--
|
|
528
|
+
.sx-input-message {
|
|
529
|
+
font-size: var(--sx-text-xs);
|
|
545
530
|
margin: 0;
|
|
546
531
|
}
|
|
547
532
|
|
|
548
|
-
.
|
|
549
|
-
color:
|
|
550
|
-
font-weight:
|
|
533
|
+
.sx-input-message-error {
|
|
534
|
+
color: var(--sx-color-red);
|
|
535
|
+
font-weight: 500;
|
|
551
536
|
}
|
|
552
537
|
|
|
553
|
-
.
|
|
554
|
-
color:
|
|
538
|
+
.sx-input-message-success {
|
|
539
|
+
color: var(--sx-color-green);
|
|
555
540
|
}
|
|
556
541
|
|
|
557
|
-
.
|
|
558
|
-
color:
|
|
542
|
+
.sx-input-message-hint {
|
|
543
|
+
color: var(--sx-color-text-secondary);
|
|
559
544
|
}
|
|
560
545
|
|
|
561
|
-
.
|
|
562
|
-
font-size: var(--
|
|
563
|
-
font-family: var(--
|
|
564
|
-
color:
|
|
546
|
+
.sx-input-charcount {
|
|
547
|
+
font-size: var(--sx-text-xs);
|
|
548
|
+
font-family: var(--sx-font-mono);
|
|
549
|
+
color: var(--sx-color-text-secondary);
|
|
565
550
|
}
|
|
566
551
|
|
|
567
|
-
.
|
|
568
|
-
color:
|
|
552
|
+
.sx-input-charcount-warn {
|
|
553
|
+
color: var(--sx-color-secondary);
|
|
569
554
|
}
|
|
570
555
|
|
|
571
556
|
@media (prefers-reduced-motion: reduce) {
|
|
572
|
-
.
|
|
557
|
+
.sx-input-spinner {
|
|
558
|
+
animation: none;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.sx-input-focused {
|
|
562
|
+
animation: none;
|
|
563
|
+
box-shadow: 0 0 0 3px var(--sx-color-primary-ring);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.sx-input-error {
|
|
573
567
|
animation: none;
|
|
574
568
|
}
|
|
575
569
|
}
|
|
@@ -41,7 +41,7 @@ interface Props extends Omit<HTMLInputAttributes, 'class' | 'size' | 'inputmode'
|
|
|
41
41
|
/**
|
|
42
42
|
* TextInput
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* INFRARED — Clean text field with subtle borders and vermilion 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">;
|