dssoca 0.5.0 → 0.9.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.
Files changed (56) hide show
  1. package/README.md +39 -13
  2. package/dist/components/Accordion.svelte +297 -0
  3. package/dist/components/Accordion.svelte.d.ts +51 -0
  4. package/dist/components/Badge.svelte +113 -18
  5. package/dist/components/Badge.svelte.d.ts +28 -2
  6. package/dist/components/BottomNav.svelte +254 -0
  7. package/dist/components/BottomNav.svelte.d.ts +32 -0
  8. package/dist/components/Button.svelte +147 -10
  9. package/dist/components/Button.svelte.d.ts +21 -4
  10. package/dist/components/Card.svelte +173 -8
  11. package/dist/components/Card.svelte.d.ts +16 -1
  12. package/dist/components/Container.svelte +55 -0
  13. package/dist/components/Container.svelte.d.ts +16 -0
  14. package/dist/components/EmptyState.svelte +91 -9
  15. package/dist/components/EmptyState.svelte.d.ts +20 -3
  16. package/dist/components/Heading.svelte +83 -0
  17. package/dist/components/Heading.svelte.d.ts +17 -0
  18. package/dist/components/Icon.svelte +199 -24
  19. package/dist/components/Icon.svelte.d.ts +70 -2
  20. package/dist/components/Image.svelte +428 -0
  21. package/dist/components/Image.svelte.d.ts +49 -0
  22. package/dist/components/Input.svelte +173 -39
  23. package/dist/components/Input.svelte.d.ts +22 -0
  24. package/dist/components/Link.svelte +183 -0
  25. package/dist/components/Link.svelte.d.ts +29 -0
  26. package/dist/components/LogStream.svelte +403 -47
  27. package/dist/components/LogStream.svelte.d.ts +35 -7
  28. package/dist/components/Menu.svelte +408 -0
  29. package/dist/components/Menu.svelte.d.ts +66 -0
  30. package/dist/components/MetricTile.svelte +124 -12
  31. package/dist/components/MetricTile.svelte.d.ts +20 -0
  32. package/dist/components/SegmentedControl.svelte +220 -0
  33. package/dist/components/SegmentedControl.svelte.d.ts +37 -0
  34. package/dist/components/ServiceCard.svelte +226 -30
  35. package/dist/components/ServiceCard.svelte.d.ts +13 -1
  36. package/dist/components/Sidebar.svelte +377 -40
  37. package/dist/components/Sidebar.svelte.d.ts +18 -7
  38. package/dist/components/Sparkline.svelte +198 -13
  39. package/dist/components/Sparkline.svelte.d.ts +20 -1
  40. package/dist/components/Spinner.svelte +124 -0
  41. package/dist/components/Spinner.svelte.d.ts +74 -0
  42. package/dist/components/Textarea.svelte +214 -0
  43. package/dist/components/Textarea.svelte.d.ts +38 -0
  44. package/dist/components/Toaster.svelte +209 -12
  45. package/dist/components/Toaster.svelte.d.ts +3 -0
  46. package/dist/components/Topbar.svelte +293 -42
  47. package/dist/components/Topbar.svelte.d.ts +48 -1
  48. package/dist/dssoca.config.d.ts +1 -1
  49. package/dist/dssoca.config.js +10 -0
  50. package/dist/index.d.ts +16 -3
  51. package/dist/index.js +18 -2
  52. package/dist/theme.css +406 -24
  53. package/dist/toast.svelte.d.ts +49 -5
  54. package/dist/toast.svelte.js +165 -9
  55. package/dist/tokens.css +597 -0
  56. package/package.json +25 -4
@@ -1,59 +1,234 @@
1
1
  <script module lang="ts">
2
- export const PATHS: Record<string, string> = {
3
- grid: '<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/>',
2
+ /** Curated glyph set. `target`'s centre dot is a filled circle in the *outline*
3
+ * variant — handled by the `variant` switch in markup, not a per-glyph fill hack. */
4
+ const BUILTIN_PATHS = {
5
+ grid: '<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/>',
4
6
  activity: '<path d="M3 12h4l3-8 4 16 3-8h4"/>',
5
7
  database: '<rect x="3" y="4" width="18" height="16"/><path d="M3 9h18M8 4v5"/>',
6
- logs: '<path d="M4 6h16M4 12h16M4 18h10"/>',
8
+ logs: '<path d="M4 6h16M4 12h16M4 18h10"/>',
7
9
  terminal: '<rect x="3" y="5" width="18" height="14"/><path d="M3 9h18M7 14h4"/>',
8
- settings: '<circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"/>',
9
- user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 4-7 8-7s8 3 8 7"/>',
10
- arrow: '<path d="M5 12h14M13 5l7 7-7 7"/>',
10
+ settings:
11
+ '<circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"/>',
12
+ user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 4-7 8-7s8 3 8 7"/>',
13
+ arrow: '<path d="M5 12h14M13 5l7 7-7 7"/>',
11
14
  external: '<path d="M7 17L17 7M9 7h8v8"/>',
12
- film: '<rect x="3" y="4" width="18" height="16"/><path d="M3 8h4M3 16h4M17 8h4M17 16h4M3 12h18"/>',
13
- note: '<rect x="4" y="3" width="16" height="18"/><path d="M8 8h8M8 12h8M8 16h6"/>',
14
- book: '<path d="M6 4h11a1 1 0 011 1v15H7a1 1 0 01-1-1z"/><path d="M17 20a2 2 0 002-2V6a2 2 0 00-2-2"/><path d="M9 8h5"/>',
15
- check: '<path d="M5 12l4 4L19 6"/>',
16
- cup: '<path d="M4 8h12v6a4 4 0 01-4 4H8a4 4 0 01-4-4z"/><path d="M16 10h2a2 2 0 010 4h-2M6 4v2M10 4v2M14 4v2"/>',
17
- wallet: '<rect x="3" y="6" width="18" height="14"/><path d="M3 10h18M17 14h2"/>',
18
- target: '<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" fill="currentColor"/>',
15
+ film: '<rect x="3" y="4" width="18" height="16"/><path d="M3 8h4M3 16h4M17 8h4M17 16h4M3 12h18"/>',
16
+ note: '<rect x="4" y="3" width="16" height="18"/><path d="M8 8h8M8 12h8M8 16h6"/>',
17
+ book: '<path d="M6 4h11a1 1 0 011 1v15H7a1 1 0 01-1-1z"/><path d="M17 20a2 2 0 002-2V6a2 2 0 00-2-2"/><path d="M9 8h5"/>',
18
+ check: '<path d="M5 12l4 4L19 6"/>',
19
+ cup: '<path d="M4 8h12v6a4 4 0 01-4 4H8a4 4 0 01-4-4z"/><path d="M16 10h2a2 2 0 010 4h-2M6 4v2M10 4v2M14 4v2"/>',
20
+ wallet: '<rect x="3" y="6" width="18" height="14"/><path d="M3 10h18M17 14h2"/>',
21
+ target:
22
+ '<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" class="ss-icon-dot"/>',
23
+ spinner: '<path d="M12 3a9 9 0 1 0 9 9" stroke-linecap="round"/>',
24
+ home: '<path d="M4 11l8-8 8 8"/><path d="M6 9v12h12V9"/><path d="M10 21v-6h4v6"/>',
25
+ briefcase: '<rect x="3" y="7" width="18" height="13"/><path d="M9 7V4h6v3M3 12h18"/>',
26
+ folder: '<path d="M3 5h7l2 3h9v13H3z"/><path d="M3 8h9"/>',
27
+ github:
28
+ '<path d="M7 3h10l2 2v6l-2 3h-4l1 2v5h-4v-5l1-2H7l-2-3V5l2-2z"/><path d="M9 8h1M14 8h1"/>',
29
+ linkedin:
30
+ '<rect x="3" y="3" width="18" height="18"/><path d="M8 16v-5M8 8v.01M12 16v-5h2l2 2v3"/>',
31
+ language: '<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3L8 12l4 9M12 3l4 9-4 9"/>',
32
+ 'color-swatch':
33
+ '<rect x="3" y="3" width="8" height="18"/><path d="M7 17v.01"/><path d="M11 19l8-8 2 2-8 8"/><path d="M13 21h8"/>',
34
+ } as const
35
+
36
+ export type IconName = keyof typeof BUILTIN_PATHS
37
+
38
+ /**
39
+ * The curated built-in glyphs plus any runtime-registered ones.
40
+ * (`PATHS` is kept as the public name for backward compatibility.)
41
+ */
42
+ export const PATHS: Record<string, string> = { ...BUILTIN_PATHS }
43
+
44
+ /**
45
+ * Register (or override) a glyph at runtime so `<Icon name="foo" />` resolves
46
+ * raw SVG inner markup that isn't part of the curated {@link IconName} union.
47
+ * The markup is rendered verbatim inside the icon's `<svg viewBox="0 0 24 24">`.
48
+ *
49
+ * registerIcon('heart', '<path d="M12 21 4 13a5 5 0 0 1 7-7l1 1 1-1a5 5 0 0 1 7 7z"/>')
50
+ * <Icon name={'heart' as IconName} />
51
+ */
52
+ export function registerIcon(name: string, paths: string): void {
53
+ PATHS[name] = paths
19
54
  }
20
55
 
21
- export type IconName = keyof typeof PATHS
56
+ /** Look a glyph up; built-ins first, then runtime registrations. */
57
+ export function resolveIcon(name: string): string | undefined {
58
+ return PATHS[name]
59
+ }
22
60
  </script>
23
61
 
24
62
  <script lang="ts">
25
63
  import { resolveComponentSize, type Size } from '../config.js'
26
64
 
65
+ /** Resolved px for each token size — used to keep absolute stroke optically constant. */
66
+ const SIZE_PX: Record<Size, number> = { sm: 14, md: 16, lg: 20 }
67
+ const DEFAULT_PX = SIZE_PX.md
68
+
27
69
  interface Props {
28
70
  name: IconName
29
71
  /** Token-driven size (sm|md|lg); inherits the active size when unset. */
30
72
  size?: Size
31
73
  /** Explicit pixel size — overrides the token sizing. */
32
74
  px?: number
33
- /** Accessible name; when set the icon is exposed to AT (role="img"). Omit for decorative icons (default: aria-hidden). */
75
+ /**
76
+ * Raw SVG inner markup escape hatch — rendered when `name` is not a known
77
+ * (built-in or runtime-registered) glyph. Lets callers pass one-off icons
78
+ * without registering them globally.
79
+ */
80
+ paths?: string
81
+ /** Accessible name; rendered as a real <title> and wired via aria-labelledby. */
34
82
  title?: string
83
+ /** Extended description, rendered as <desc> and appended to aria-labelledby. */
84
+ desc?: string
85
+ /**
86
+ * Mark the icon purely decorative (aria-hidden, no a11y name). Defaults to
87
+ * true when no `title` is given, false when a `title` is present.
88
+ */
89
+ decorative?: boolean
90
+ /** Spin the glyph (e.g. a loader). Honours prefers-reduced-motion. */
91
+ spin?: boolean
92
+ /** Quarter-turn rotation. */
93
+ rotate?: 0 | 90 | 180 | 270
94
+ /** Mirror the glyph. */
95
+ flip?: 'horizontal' | 'vertical'
96
+ /** outline (stroked, default) | solid (filled with currentColor). */
97
+ variant?: 'outline' | 'solid'
98
+ /** Stroke weight in viewBox units (default 2). */
99
+ strokeWidth?: number
100
+ /** Keep `strokeWidth` optically constant across sizes (recompute from resolved px). */
101
+ absoluteStroke?: boolean
35
102
  class?: string
36
103
  }
37
- let { name, size, px, title, class: cls = '' }: Props = $props()
104
+ let {
105
+ name,
106
+ size,
107
+ px,
108
+ paths,
109
+ title,
110
+ desc,
111
+ decorative,
112
+ spin = false,
113
+ rotate = 0,
114
+ flip,
115
+ variant = 'outline',
116
+ strokeWidth = 2,
117
+ absoluteStroke = false,
118
+ class: cls = '',
119
+ }: Props = $props()
38
120
 
39
121
  const dim = $derived(px != null ? `${px}px` : 'var(--ss-icon)')
122
+
123
+ // Resolve the glyph: explicit `paths` escape hatch → registered/built-in → warn.
124
+ const markup = $derived.by(() => {
125
+ if (paths != null) return paths
126
+ const found = resolveIcon(name)
127
+ if (found != null) return found
128
+ if (typeof console !== 'undefined') {
129
+ console.warn(
130
+ `[dssoca] Icon: unknown name "${name}" (no registered glyph). Rendering empty; pass \`paths\` or call registerIcon().`,
131
+ )
132
+ }
133
+ return ''
134
+ })
135
+
136
+ // Optically-constant stroke: recompute weight from the resolved px so a
137
+ // 2u stroke at the canonical 24-unit viewBox looks the same at 14/16/20px.
138
+ const resolvedPx = $derived(px != null ? px : (SIZE_PX[size ?? 'md'] ?? DEFAULT_PX))
139
+ const stroke = $derived(absoluteStroke ? (strokeWidth * 24) / resolvedPx : strokeWidth)
140
+
141
+ const isSolid = $derived(variant === 'solid')
142
+
143
+ // Decorative unless an explicit title (or explicit decorative=false) opts in.
144
+ const isDecorative = $derived(decorative ?? title == null)
145
+
146
+ // Unique ids for <title>/<desc>, wired through aria-labelledby.
147
+ const uid = $props.id()
148
+ const titleId = $derived(title ? `${uid}-t` : undefined)
149
+ const descId = $derived(desc ? `${uid}-d` : undefined)
150
+ const labelledBy = $derived([titleId, descId].filter(Boolean).join(' ') || undefined)
151
+ const labelled = $derived(!isDecorative && labelledBy != null)
152
+
153
+ const esc = (s: string) => s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
154
+
155
+ // <title>/<desc> are folded into the same @html string as the glyph so the
156
+ // SVG carries no Svelte {#if} comment anchors (keeps innerHTML clean for AT
157
+ // and tests). a11y ids still resolve via aria-labelledby above.
158
+ const inner = $derived(
159
+ (title ? `<title id="${titleId}">${esc(title)}</title>` : '') +
160
+ (desc ? `<desc id="${descId}">${esc(desc)}</desc>` : '') +
161
+ markup,
162
+ )
40
163
  </script>
41
164
 
42
165
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
43
166
  <svg
44
167
  viewBox="0 0 24 24"
45
- fill="none"
46
- stroke="currentColor"
47
- stroke-width="2"
168
+ fill={isSolid ? 'currentColor' : 'none'}
169
+ stroke={isSolid ? 'none' : 'currentColor'}
170
+ stroke-width={stroke}
48
171
  stroke-linecap="square"
49
172
  stroke-linejoin="miter"
50
- class={cls}
173
+ class="ss-icon {cls}"
174
+ class:spin
175
+ class:flip-h={flip === 'horizontal'}
176
+ class:flip-v={flip === 'vertical'}
51
177
  data-size-variant={resolveComponentSize('Icon', size)}
178
+ data-rotate={rotate || undefined}
52
179
  style="width:{dim};height:{dim}"
53
- role={title ? 'img' : undefined}
54
- aria-label={title}
55
- aria-hidden={title ? undefined : 'true'}
180
+ role={labelled ? 'img' : undefined}
181
+ aria-labelledby={labelled ? labelledBy : undefined}
182
+ aria-hidden={isDecorative ? 'true' : undefined}
56
183
  focusable="false"
57
184
  >
58
- {@html PATHS[name] ?? ''}
185
+ {@html inner}
59
186
  </svg>
187
+
188
+ <style>.ss-icon {
189
+ display: inline-block;
190
+ flex: none;
191
+ transform-origin: center;
192
+ }
193
+ .ss-icon :global(.ss-icon-dot) {
194
+ fill: currentColor;
195
+ stroke: none;
196
+ }
197
+
198
+ .ss-icon[data-rotate="90"] {
199
+ transform: rotate(90deg);
200
+ }
201
+
202
+ .ss-icon[data-rotate="180"] {
203
+ transform: rotate(180deg);
204
+ }
205
+
206
+ .ss-icon[data-rotate="270"] {
207
+ transform: rotate(270deg);
208
+ }
209
+
210
+ .ss-icon.flip-h {
211
+ transform: scaleX(-1);
212
+ }
213
+
214
+ .ss-icon.flip-v {
215
+ transform: scaleY(-1);
216
+ }
217
+
218
+ .ss-icon.spin {
219
+ animation: ss-icon-spin var(--ss-icon-spin-dur, 900ms) linear infinite;
220
+ }
221
+
222
+ @keyframes ss-icon-spin {
223
+ from {
224
+ transform: rotate(0deg);
225
+ }
226
+ to {
227
+ transform: rotate(360deg);
228
+ }
229
+ }
230
+ @media (prefers-reduced-motion: reduce) {
231
+ .ss-icon.spin {
232
+ animation: none;
233
+ }
234
+ }</style>
@@ -1,5 +1,48 @@
1
+ /** Curated glyph set. `target`'s centre dot is a filled circle in the *outline*
2
+ * variant — handled by the `variant` switch in markup, not a per-glyph fill hack. */
3
+ declare const BUILTIN_PATHS: {
4
+ readonly grid: "<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\"/>";
5
+ readonly activity: "<path d=\"M3 12h4l3-8 4 16 3-8h4\"/>";
6
+ readonly database: "<rect x=\"3\" y=\"4\" width=\"18\" height=\"16\"/><path d=\"M3 9h18M8 4v5\"/>";
7
+ readonly logs: "<path d=\"M4 6h16M4 12h16M4 18h10\"/>";
8
+ readonly terminal: "<rect x=\"3\" y=\"5\" width=\"18\" height=\"14\"/><path d=\"M3 9h18M7 14h4\"/>";
9
+ readonly settings: "<circle cx=\"12\" cy=\"12\" r=\"3\"/><path d=\"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1\"/>";
10
+ readonly user: "<circle cx=\"12\" cy=\"8\" r=\"4\"/><path d=\"M4 21c0-4 4-7 8-7s8 3 8 7\"/>";
11
+ readonly arrow: "<path d=\"M5 12h14M13 5l7 7-7 7\"/>";
12
+ readonly external: "<path d=\"M7 17L17 7M9 7h8v8\"/>";
13
+ readonly film: "<rect x=\"3\" y=\"4\" width=\"18\" height=\"16\"/><path d=\"M3 8h4M3 16h4M17 8h4M17 16h4M3 12h18\"/>";
14
+ readonly note: "<rect x=\"4\" y=\"3\" width=\"16\" height=\"18\"/><path d=\"M8 8h8M8 12h8M8 16h6\"/>";
15
+ readonly book: "<path d=\"M6 4h11a1 1 0 011 1v15H7a1 1 0 01-1-1z\"/><path d=\"M17 20a2 2 0 002-2V6a2 2 0 00-2-2\"/><path d=\"M9 8h5\"/>";
16
+ readonly check: "<path d=\"M5 12l4 4L19 6\"/>";
17
+ readonly cup: "<path d=\"M4 8h12v6a4 4 0 01-4 4H8a4 4 0 01-4-4z\"/><path d=\"M16 10h2a2 2 0 010 4h-2M6 4v2M10 4v2M14 4v2\"/>";
18
+ readonly wallet: "<rect x=\"3\" y=\"6\" width=\"18\" height=\"14\"/><path d=\"M3 10h18M17 14h2\"/>";
19
+ readonly target: "<circle cx=\"12\" cy=\"12\" r=\"9\"/><circle cx=\"12\" cy=\"12\" r=\"5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\" class=\"ss-icon-dot\"/>";
20
+ readonly spinner: "<path d=\"M12 3a9 9 0 1 0 9 9\" stroke-linecap=\"round\"/>";
21
+ readonly home: "<path d=\"M4 11l8-8 8 8\"/><path d=\"M6 9v12h12V9\"/><path d=\"M10 21v-6h4v6\"/>";
22
+ readonly briefcase: "<rect x=\"3\" y=\"7\" width=\"18\" height=\"13\"/><path d=\"M9 7V4h6v3M3 12h18\"/>";
23
+ readonly folder: "<path d=\"M3 5h7l2 3h9v13H3z\"/><path d=\"M3 8h9\"/>";
24
+ readonly github: "<path d=\"M7 3h10l2 2v6l-2 3h-4l1 2v5h-4v-5l1-2H7l-2-3V5l2-2z\"/><path d=\"M9 8h1M14 8h1\"/>";
25
+ readonly linkedin: "<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\"/><path d=\"M8 16v-5M8 8v.01M12 16v-5h2l2 2v3\"/>";
26
+ readonly language: "<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M3 12h18M12 3L8 12l4 9M12 3l4 9-4 9\"/>";
27
+ readonly 'color-swatch': "<rect x=\"3\" y=\"3\" width=\"8\" height=\"18\"/><path d=\"M7 17v.01\"/><path d=\"M11 19l8-8 2 2-8 8\"/><path d=\"M13 21h8\"/>";
28
+ };
29
+ export type IconName = keyof typeof BUILTIN_PATHS;
30
+ /**
31
+ * The curated built-in glyphs plus any runtime-registered ones.
32
+ * (`PATHS` is kept as the public name for backward compatibility.)
33
+ */
1
34
  export declare const PATHS: Record<string, string>;
2
- export type IconName = keyof typeof PATHS;
35
+ /**
36
+ * Register (or override) a glyph at runtime so `<Icon name="foo" />` resolves
37
+ * raw SVG inner markup that isn't part of the curated {@link IconName} union.
38
+ * The markup is rendered verbatim inside the icon's `<svg viewBox="0 0 24 24">`.
39
+ *
40
+ * registerIcon('heart', '<path d="M12 21 4 13a5 5 0 0 1 7-7l1 1 1-1a5 5 0 0 1 7 7z"/>')
41
+ * <Icon name={'heart' as IconName} />
42
+ */
43
+ export declare function registerIcon(name: string, paths: string): void;
44
+ /** Look a glyph up; built-ins first, then runtime registrations. */
45
+ export declare function resolveIcon(name: string): string | undefined;
3
46
  import { type Size } from '../config.js';
4
47
  interface Props {
5
48
  name: IconName;
@@ -7,8 +50,33 @@ interface Props {
7
50
  size?: Size;
8
51
  /** Explicit pixel size — overrides the token sizing. */
9
52
  px?: number;
10
- /** Accessible name; when set the icon is exposed to AT (role="img"). Omit for decorative icons (default: aria-hidden). */
53
+ /**
54
+ * Raw SVG inner markup escape hatch — rendered when `name` is not a known
55
+ * (built-in or runtime-registered) glyph. Lets callers pass one-off icons
56
+ * without registering them globally.
57
+ */
58
+ paths?: string;
59
+ /** Accessible name; rendered as a real <title> and wired via aria-labelledby. */
11
60
  title?: string;
61
+ /** Extended description, rendered as <desc> and appended to aria-labelledby. */
62
+ desc?: string;
63
+ /**
64
+ * Mark the icon purely decorative (aria-hidden, no a11y name). Defaults to
65
+ * true when no `title` is given, false when a `title` is present.
66
+ */
67
+ decorative?: boolean;
68
+ /** Spin the glyph (e.g. a loader). Honours prefers-reduced-motion. */
69
+ spin?: boolean;
70
+ /** Quarter-turn rotation. */
71
+ rotate?: 0 | 90 | 180 | 270;
72
+ /** Mirror the glyph. */
73
+ flip?: 'horizontal' | 'vertical';
74
+ /** outline (stroked, default) | solid (filled with currentColor). */
75
+ variant?: 'outline' | 'solid';
76
+ /** Stroke weight in viewBox units (default 2). */
77
+ strokeWidth?: number;
78
+ /** Keep `strokeWidth` optically constant across sizes (recompute from resolved px). */
79
+ absoluteStroke?: boolean;
12
80
  class?: string;
13
81
  }
14
82
  declare const Icon: import("svelte").Component<Props, {}, "">;