dssoca 0.2.0 → 0.8.2
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 +54 -18
- package/dist/components/Accordion.svelte +281 -0
- package/dist/components/Accordion.svelte.d.ts +47 -0
- package/dist/components/Badge.svelte +144 -7
- package/dist/components/Badge.svelte.d.ts +31 -2
- package/dist/components/BottomNav.svelte +216 -0
- package/dist/components/BottomNav.svelte.d.ts +30 -0
- package/dist/components/Button.svelte +187 -6
- package/dist/components/Button.svelte.d.ts +24 -4
- package/dist/components/Card.svelte +203 -8
- package/dist/components/Card.svelte.d.ts +21 -1
- package/dist/components/EmptyState.svelte +123 -36
- package/dist/components/EmptyState.svelte.d.ts +17 -1
- package/dist/components/Icon.svelte +191 -12
- package/dist/components/Icon.svelte.d.ts +69 -2
- package/dist/components/Image.svelte +430 -0
- package/dist/components/Image.svelte.d.ts +49 -0
- package/dist/components/Input.svelte +206 -18
- package/dist/components/Input.svelte.d.ts +29 -0
- package/dist/components/Link.svelte +148 -0
- package/dist/components/Link.svelte.d.ts +22 -0
- package/dist/components/LogStream.svelte +403 -21
- package/dist/components/LogStream.svelte.d.ts +37 -6
- package/dist/components/Menu.svelte +355 -0
- package/dist/components/Menu.svelte.d.ts +46 -0
- package/dist/components/MetricTile.svelte +161 -7
- package/dist/components/MetricTile.svelte.d.ts +23 -0
- package/dist/components/SegmentedControl.svelte +208 -0
- package/dist/components/SegmentedControl.svelte.d.ts +30 -0
- package/dist/components/ServiceCard.svelte +270 -9
- package/dist/components/ServiceCard.svelte.d.ts +16 -1
- package/dist/components/Sidebar.svelte +391 -25
- package/dist/components/Sidebar.svelte.d.ts +20 -6
- package/dist/components/Sparkline.svelte +213 -6
- package/dist/components/Sparkline.svelte.d.ts +24 -0
- package/dist/components/Toaster.svelte +273 -60
- package/dist/components/Toaster.svelte.d.ts +9 -16
- package/dist/components/Topbar.svelte +273 -17
- package/dist/components/Topbar.svelte.d.ts +23 -0
- package/dist/config.d.ts +32 -14
- package/dist/config.js +43 -17
- package/dist/dssoca.config.d.ts +50 -0
- package/dist/dssoca.config.js +45 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.js +14 -4
- package/dist/theme.css +587 -382
- package/dist/toast.svelte.d.ts +49 -5
- package/dist/toast.svelte.js +165 -9
- package/package.json +17 -3
- package/dist/components/PassocaMark.svelte +0 -15
- package/dist/components/PassocaMark.svelte.d.ts +0 -7
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import type { HTMLInputAttributes, FullAutoFill } from 'svelte/elements'
|
|
4
|
+
import { resolveComponentSize, type Size } from '../config.js'
|
|
5
|
+
|
|
2
6
|
interface Props {
|
|
3
7
|
label?: string
|
|
4
8
|
id?: string
|
|
@@ -9,6 +13,32 @@
|
|
|
9
13
|
required?: boolean
|
|
10
14
|
disabled?: boolean
|
|
11
15
|
oninput?: (e: Event & { currentTarget: HTMLInputElement }) => void
|
|
16
|
+
/** Token size (sm|md|lg); inherits the global size when unset. */
|
|
17
|
+
size?: Size
|
|
18
|
+
/** Marks the field invalid for assistive tech (aria-invalid). */
|
|
19
|
+
invalid?: boolean
|
|
20
|
+
/** id(s) of element(s) describing the field (aria-describedby) — e.g. hint/error text. */
|
|
21
|
+
describedby?: string
|
|
22
|
+
/** Supplementary helper text rendered under the input. */
|
|
23
|
+
hint?: string
|
|
24
|
+
/** Error text rendered under the input; its presence implies aria-invalid and is announced to AT. */
|
|
25
|
+
error?: string
|
|
26
|
+
/** Decorative leading content rendered inside the field, before the input. */
|
|
27
|
+
prefix?: Snippet
|
|
28
|
+
/** Decorative trailing content rendered inside the field, after the input. */
|
|
29
|
+
suffix?: Snippet
|
|
30
|
+
/** Renders a button to clear the value; hidden when empty/readonly/disabled. */
|
|
31
|
+
clearable?: boolean
|
|
32
|
+
/** Native readonly — value visible but not editable; rendered muted. */
|
|
33
|
+
readonly?: boolean
|
|
34
|
+
/** Native autocomplete hint. */
|
|
35
|
+
autocomplete?: FullAutoFill
|
|
36
|
+
/** Native inputmode hint for on-screen keyboards. */
|
|
37
|
+
inputmode?: HTMLInputAttributes['inputmode']
|
|
38
|
+
/** Native maxlength. */
|
|
39
|
+
maxlength?: number
|
|
40
|
+
/** Any remaining native input attributes / event handlers are forwarded. */
|
|
41
|
+
[key: string]: unknown
|
|
12
42
|
}
|
|
13
43
|
let {
|
|
14
44
|
label,
|
|
@@ -20,34 +50,192 @@
|
|
|
20
50
|
required = false,
|
|
21
51
|
disabled = false,
|
|
22
52
|
oninput,
|
|
53
|
+
size,
|
|
54
|
+
invalid,
|
|
55
|
+
describedby,
|
|
56
|
+
hint,
|
|
57
|
+
error,
|
|
58
|
+
prefix,
|
|
59
|
+
suffix,
|
|
60
|
+
clearable = false,
|
|
61
|
+
readonly = false,
|
|
62
|
+
autocomplete,
|
|
63
|
+
inputmode,
|
|
64
|
+
maxlength,
|
|
65
|
+
...rest
|
|
23
66
|
}: Props = $props()
|
|
67
|
+
|
|
68
|
+
// Guarantee a label↔input association even when no `id` is passed.
|
|
69
|
+
const uid = $props.id()
|
|
70
|
+
const inputId = $derived(id ?? uid)
|
|
71
|
+
const hintId = $derived(`${inputId}-hint`)
|
|
72
|
+
const errorId = $derived(`${inputId}-error`)
|
|
73
|
+
|
|
74
|
+
// error wins, then hint, then any caller-supplied describedby — order matters for AT.
|
|
75
|
+
const describedBy = $derived(
|
|
76
|
+
[error ? errorId : null, hint ? hintId : null, describedby]
|
|
77
|
+
.filter(Boolean)
|
|
78
|
+
.join(' ') || undefined,
|
|
79
|
+
)
|
|
80
|
+
const isInvalid = $derived(invalid || Boolean(error) || undefined)
|
|
81
|
+
const resolvedSize = $derived(resolveComponentSize('Input', size))
|
|
82
|
+
|
|
83
|
+
// The .ss-field wrapper carries the border/focus ring; show the clear button only when useful.
|
|
84
|
+
const showClear = $derived(clearable && !!value && !readonly && !disabled)
|
|
85
|
+
|
|
86
|
+
let inputEl = $state<HTMLInputElement>()
|
|
87
|
+
function clear() {
|
|
88
|
+
value = ''
|
|
89
|
+
inputEl?.focus()
|
|
90
|
+
}
|
|
24
91
|
</script>
|
|
25
92
|
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
<
|
|
93
|
+
<div class="ss-field" data-size-variant={resolvedSize} class:invalid={isInvalid} class:disabled>
|
|
94
|
+
{#if label}
|
|
95
|
+
<label class="lbl" for={inputId}>
|
|
96
|
+
{label}
|
|
97
|
+
{#if required}<span class="req" aria-hidden="true">*</span>{/if}
|
|
98
|
+
</label>
|
|
99
|
+
{/if}
|
|
100
|
+
|
|
101
|
+
<div class="control">
|
|
102
|
+
{#if prefix}<span class="affix prefix" aria-hidden="true">{@render prefix()}</span>{/if}
|
|
29
103
|
<input
|
|
104
|
+
bind:this={inputEl}
|
|
30
105
|
class="ss-input"
|
|
31
|
-
{
|
|
106
|
+
id={inputId}
|
|
32
107
|
{name}
|
|
33
108
|
{type}
|
|
34
109
|
bind:value
|
|
35
110
|
{placeholder}
|
|
36
111
|
{required}
|
|
37
112
|
{disabled}
|
|
113
|
+
{readonly}
|
|
114
|
+
{autocomplete}
|
|
115
|
+
{inputmode}
|
|
116
|
+
{maxlength}
|
|
117
|
+
aria-invalid={isInvalid}
|
|
118
|
+
aria-describedby={describedBy}
|
|
38
119
|
{oninput}
|
|
120
|
+
{...rest}
|
|
39
121
|
/>
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
class="
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
122
|
+
{#if showClear}
|
|
123
|
+
<button type="button" class="clear" aria-label="Clear" onclick={clear}>×</button>
|
|
124
|
+
{/if}
|
|
125
|
+
{#if suffix}<span class="affix suffix" aria-hidden="true">{@render suffix()}</span>{/if}
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{#if error}<span class="msg error" id={errorId} role="alert">{error}</span>{/if}
|
|
129
|
+
{#if hint}<span class="msg hint" id={hintId}>{hint}</span>{/if}
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<style>.ss-field {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
gap: 6px;
|
|
136
|
+
}
|
|
137
|
+
.ss-field .lbl {
|
|
138
|
+
font-family: var(--ss-font-mono);
|
|
139
|
+
font-size: var(--ss-ui-xs);
|
|
140
|
+
color: var(--ss-fg-muted);
|
|
141
|
+
text-transform: uppercase;
|
|
142
|
+
letter-spacing: 0.08em;
|
|
143
|
+
}
|
|
144
|
+
.ss-field .lbl .req {
|
|
145
|
+
color: var(--ss-red);
|
|
146
|
+
margin-left: 2px;
|
|
147
|
+
}
|
|
148
|
+
.ss-field .control {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: var(--ss-gap-sm);
|
|
152
|
+
background: transparent;
|
|
153
|
+
color: var(--ss-fg);
|
|
154
|
+
border: 1px solid var(--ss-line);
|
|
155
|
+
padding: 0 var(--ss-input-px);
|
|
156
|
+
transition: border-color var(--ss-dur-fast) var(--ss-ease), box-shadow var(--ss-dur-fast) var(--ss-ease);
|
|
157
|
+
}
|
|
158
|
+
.ss-field .control:focus-within {
|
|
159
|
+
border-color: var(--ss-primary);
|
|
160
|
+
box-shadow: 0 0 0 3px var(--ss-primary-soft);
|
|
161
|
+
}
|
|
162
|
+
.ss-field.invalid .control {
|
|
163
|
+
border-color: var(--ss-red);
|
|
164
|
+
}
|
|
165
|
+
.ss-field.invalid .control:focus-within {
|
|
166
|
+
border-color: var(--ss-red);
|
|
167
|
+
box-shadow: 0 0 0 3px rgba(var(--ss-red-rgb), 0.22);
|
|
168
|
+
}
|
|
169
|
+
.ss-field.disabled .control {
|
|
170
|
+
border-color: var(--ss-line);
|
|
171
|
+
}
|
|
172
|
+
.ss-field .affix {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
flex: none;
|
|
176
|
+
color: var(--ss-fg-faint);
|
|
177
|
+
font-size: var(--ss-input-font);
|
|
178
|
+
}
|
|
179
|
+
.ss-field .clear {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
flex: none;
|
|
184
|
+
font-family: var(--ss-font-body);
|
|
185
|
+
font-size: var(--ss-input-font);
|
|
186
|
+
line-height: 1;
|
|
187
|
+
background: transparent;
|
|
188
|
+
border: none;
|
|
189
|
+
color: var(--ss-fg-faint);
|
|
190
|
+
padding: 0;
|
|
191
|
+
margin: 0;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
transition: color var(--ss-dur-fast) var(--ss-ease);
|
|
194
|
+
}
|
|
195
|
+
.ss-field .clear:hover {
|
|
196
|
+
color: var(--ss-fg);
|
|
197
|
+
}
|
|
198
|
+
.ss-field .clear:focus-visible {
|
|
199
|
+
outline: none;
|
|
200
|
+
color: var(--ss-fg);
|
|
201
|
+
box-shadow: 0 0 0 2px var(--ss-primary-soft);
|
|
202
|
+
}
|
|
203
|
+
.ss-field .msg {
|
|
204
|
+
font-family: var(--ss-font-mono);
|
|
205
|
+
font-size: var(--ss-ui-xs);
|
|
206
|
+
letter-spacing: 0.02em;
|
|
207
|
+
}
|
|
208
|
+
.ss-field .msg.hint {
|
|
209
|
+
color: var(--ss-fg-faint);
|
|
210
|
+
}
|
|
211
|
+
.ss-field .msg.error {
|
|
212
|
+
color: var(--ss-red);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.ss-input {
|
|
216
|
+
font-family: var(--ss-font-body);
|
|
217
|
+
font-size: var(--ss-input-font);
|
|
218
|
+
background: transparent;
|
|
219
|
+
color: var(--ss-fg);
|
|
220
|
+
border: none;
|
|
221
|
+
padding: var(--ss-input-py) 0;
|
|
222
|
+
width: 100%;
|
|
223
|
+
min-width: 0;
|
|
224
|
+
transition: color var(--ss-dur-fast) var(--ss-ease);
|
|
225
|
+
}
|
|
226
|
+
.ss-input:focus {
|
|
227
|
+
outline: none;
|
|
228
|
+
}
|
|
229
|
+
.ss-input::placeholder {
|
|
230
|
+
font-style: italic;
|
|
231
|
+
color: var(--ss-fg-faint);
|
|
232
|
+
}
|
|
233
|
+
.ss-input[readonly] {
|
|
234
|
+
color: var(--ss-fg-muted);
|
|
235
|
+
cursor: default;
|
|
236
|
+
}
|
|
237
|
+
.ss-input:disabled {
|
|
238
|
+
color: var(--ss-fg-faint);
|
|
239
|
+
cursor: not-allowed;
|
|
240
|
+
-webkit-text-fill-color: var(--ss-fg-faint);
|
|
241
|
+
}</style>
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLInputAttributes, FullAutoFill } from 'svelte/elements';
|
|
3
|
+
import { type Size } from '../config.js';
|
|
1
4
|
interface Props {
|
|
2
5
|
label?: string;
|
|
3
6
|
id?: string;
|
|
@@ -10,6 +13,32 @@ interface Props {
|
|
|
10
13
|
oninput?: (e: Event & {
|
|
11
14
|
currentTarget: HTMLInputElement;
|
|
12
15
|
}) => void;
|
|
16
|
+
/** Token size (sm|md|lg); inherits the global size when unset. */
|
|
17
|
+
size?: Size;
|
|
18
|
+
/** Marks the field invalid for assistive tech (aria-invalid). */
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
/** id(s) of element(s) describing the field (aria-describedby) — e.g. hint/error text. */
|
|
21
|
+
describedby?: string;
|
|
22
|
+
/** Supplementary helper text rendered under the input. */
|
|
23
|
+
hint?: string;
|
|
24
|
+
/** Error text rendered under the input; its presence implies aria-invalid and is announced to AT. */
|
|
25
|
+
error?: string;
|
|
26
|
+
/** Decorative leading content rendered inside the field, before the input. */
|
|
27
|
+
prefix?: Snippet;
|
|
28
|
+
/** Decorative trailing content rendered inside the field, after the input. */
|
|
29
|
+
suffix?: Snippet;
|
|
30
|
+
/** Renders a button to clear the value; hidden when empty/readonly/disabled. */
|
|
31
|
+
clearable?: boolean;
|
|
32
|
+
/** Native readonly — value visible but not editable; rendered muted. */
|
|
33
|
+
readonly?: boolean;
|
|
34
|
+
/** Native autocomplete hint. */
|
|
35
|
+
autocomplete?: FullAutoFill;
|
|
36
|
+
/** Native inputmode hint for on-screen keyboards. */
|
|
37
|
+
inputmode?: HTMLInputAttributes['inputmode'];
|
|
38
|
+
/** Native maxlength. */
|
|
39
|
+
maxlength?: number;
|
|
40
|
+
/** Any remaining native input attributes / event handlers are forwarded. */
|
|
41
|
+
[key: string]: unknown;
|
|
13
42
|
}
|
|
14
43
|
declare const Input: import("svelte").Component<Props, {}, "value">;
|
|
15
44
|
type Input = ReturnType<typeof Input>;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements'
|
|
4
|
+
import { resolveComponentSize, type Size } from '../config.js'
|
|
5
|
+
import Icon from './Icon.svelte'
|
|
6
|
+
|
|
7
|
+
interface Props extends HTMLAnchorAttributes {
|
|
8
|
+
/** Visual treatment: `inline` (animated underline) or `button` (solid primary). */
|
|
9
|
+
variant?: 'inline' | 'button'
|
|
10
|
+
/**
|
|
11
|
+
* Open in a new tab with safe `rel`. Auto-detected for absolute http(s)
|
|
12
|
+
* URLs when left undefined; pass `false` to force same-tab even off-site.
|
|
13
|
+
*/
|
|
14
|
+
external?: boolean
|
|
15
|
+
/** Token size (sm|md|lg); inherits the global size when unset. */
|
|
16
|
+
size?: Size
|
|
17
|
+
/** Destination URL. */
|
|
18
|
+
href?: string
|
|
19
|
+
children?: Snippet
|
|
20
|
+
/** Bound reference to the underlying <a>. */
|
|
21
|
+
el?: HTMLAnchorElement
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
variant = 'inline',
|
|
26
|
+
external,
|
|
27
|
+
size,
|
|
28
|
+
href,
|
|
29
|
+
children,
|
|
30
|
+
el = $bindable(),
|
|
31
|
+
target,
|
|
32
|
+
rel,
|
|
33
|
+
...rest
|
|
34
|
+
}: Props = $props()
|
|
35
|
+
|
|
36
|
+
// Off-site detection: absolute http(s) URL, or a protocol-relative one.
|
|
37
|
+
// Honoured only when `external` is left undefined (explicit wins).
|
|
38
|
+
const looksExternal = $derived(
|
|
39
|
+
typeof href === 'string' && /^(https?:)?\/\//i.test(href),
|
|
40
|
+
)
|
|
41
|
+
const isExternal = $derived(external ?? looksExternal)
|
|
42
|
+
|
|
43
|
+
// External links open in a new tab and carry the security rel; callers can
|
|
44
|
+
// still override target/rel explicitly via the forwarded attributes.
|
|
45
|
+
const resolvedTarget = $derived(target ?? (isExternal ? '_blank' : undefined))
|
|
46
|
+
const resolvedRel = $derived(rel ?? (isExternal ? 'noopener noreferrer' : undefined))
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<a
|
|
50
|
+
bind:this={el}
|
|
51
|
+
{href}
|
|
52
|
+
class="ss-link {variant}"
|
|
53
|
+
class:external={isExternal}
|
|
54
|
+
data-size-variant={resolveComponentSize('Link', size)}
|
|
55
|
+
target={resolvedTarget}
|
|
56
|
+
rel={resolvedRel}
|
|
57
|
+
{...rest}
|
|
58
|
+
>
|
|
59
|
+
{#if children}<span class="label">{@render children()}</span>{/if}
|
|
60
|
+
{#if isExternal}
|
|
61
|
+
<Icon name="external" {size} class="ss-link-ext" />
|
|
62
|
+
<span class="sr-only"> (opens in a new tab)</span>
|
|
63
|
+
{/if}
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
<style>@charset "UTF-8";
|
|
67
|
+
.ss-link {
|
|
68
|
+
font-family: var(--ss-font-body);
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
color: var(--ss-primary);
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
position: relative;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: var(--ss-gap-sm);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: color var(--ss-dur-fast) var(--ss-ease);
|
|
78
|
+
}
|
|
79
|
+
.ss-link:focus-visible {
|
|
80
|
+
outline: 2px solid var(--ss-primary);
|
|
81
|
+
outline-offset: 2px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ── inline: animated underline that reveals on hover/focus, with a glow ── */
|
|
85
|
+
.ss-link.inline .label {
|
|
86
|
+
position: relative;
|
|
87
|
+
}
|
|
88
|
+
.ss-link.inline .label::after {
|
|
89
|
+
content: "";
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 0;
|
|
92
|
+
right: 0;
|
|
93
|
+
bottom: -1px;
|
|
94
|
+
height: 1px;
|
|
95
|
+
background: var(--ss-primary);
|
|
96
|
+
transform: scaleX(0);
|
|
97
|
+
transform-origin: left center;
|
|
98
|
+
transition: transform var(--ss-dur-slow) var(--ss-ease), height var(--ss-dur-fast) var(--ss-ease), box-shadow var(--ss-dur-slow) var(--ss-ease);
|
|
99
|
+
}
|
|
100
|
+
.ss-link.inline:hover .label::after, .ss-link.inline:focus-visible .label::after {
|
|
101
|
+
transform: scaleX(1);
|
|
102
|
+
height: 2px;
|
|
103
|
+
box-shadow: var(--ss-shadow-glow);
|
|
104
|
+
}
|
|
105
|
+
.ss-link.inline:visited {
|
|
106
|
+
color: var(--ss-fg-muted);
|
|
107
|
+
}
|
|
108
|
+
.ss-link.inline:visited .label::after {
|
|
109
|
+
background: var(--ss-fg-muted);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ── button: a link that looks like a solid primary button (no underline) ── */
|
|
113
|
+
.ss-link.button {
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
color: var(--ss-fg-on-primary);
|
|
116
|
+
background: var(--ss-primary);
|
|
117
|
+
border: 1px solid var(--ss-primary);
|
|
118
|
+
padding: var(--ss-control-py) var(--ss-control-px);
|
|
119
|
+
line-height: 1;
|
|
120
|
+
transition: background var(--ss-dur-fast) var(--ss-ease), border-color var(--ss-dur-fast) var(--ss-ease), box-shadow var(--ss-dur-fast) var(--ss-ease);
|
|
121
|
+
}
|
|
122
|
+
.ss-link.button:hover {
|
|
123
|
+
background: var(--ss-primary-hover);
|
|
124
|
+
border-color: var(--ss-primary-hover);
|
|
125
|
+
box-shadow: var(--ss-shadow-glow);
|
|
126
|
+
}
|
|
127
|
+
.ss-link.button .label::after {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
.ss-link.button:visited {
|
|
131
|
+
color: var(--ss-fg-on-primary);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:global(.ss-link .ss-link-ext) {
|
|
135
|
+
color: currentColor;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.sr-only {
|
|
139
|
+
position: absolute;
|
|
140
|
+
width: 1px;
|
|
141
|
+
height: 1px;
|
|
142
|
+
padding: 0;
|
|
143
|
+
margin: -1px;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
clip: rect(0, 0, 0, 0);
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
border: 0;
|
|
148
|
+
}</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
|
+
import { type Size } from '../config.js';
|
|
4
|
+
interface Props extends HTMLAnchorAttributes {
|
|
5
|
+
/** Visual treatment: `inline` (animated underline) or `button` (solid primary). */
|
|
6
|
+
variant?: 'inline' | 'button';
|
|
7
|
+
/**
|
|
8
|
+
* Open in a new tab with safe `rel`. Auto-detected for absolute http(s)
|
|
9
|
+
* URLs when left undefined; pass `false` to force same-tab even off-site.
|
|
10
|
+
*/
|
|
11
|
+
external?: boolean;
|
|
12
|
+
/** Token size (sm|md|lg); inherits the global size when unset. */
|
|
13
|
+
size?: Size;
|
|
14
|
+
/** Destination URL. */
|
|
15
|
+
href?: string;
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
/** Bound reference to the underlying <a>. */
|
|
18
|
+
el?: HTMLAnchorElement;
|
|
19
|
+
}
|
|
20
|
+
declare const Link: import("svelte").Component<Props, {}, "el">;
|
|
21
|
+
type Link = ReturnType<typeof Link>;
|
|
22
|
+
export default Link;
|