@dillingerstaffing/strand-svelte 0.14.0 → 0.15.1
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/dist/css/strand-ui.css +2784 -223
- package/dist/index.js +1285 -1244
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Alert/Alert.svelte +14 -0
- package/src/components/Avatar/Avatar.svelte +13 -0
- package/src/components/Badge/Badge.svelte +15 -0
- package/src/components/Breadcrumb/Breadcrumb.svelte +18 -0
- package/src/components/Button/Button.svelte +14 -0
- package/src/components/Card/Card.svelte +15 -0
- package/src/components/Checkbox/Checkbox.svelte +13 -0
- package/src/components/CodeBlock/CodeBlock.svelte +89 -1
- package/src/components/Container/Container.svelte +14 -0
- package/src/components/DataReadout/DataReadout.svelte +12 -0
- package/src/components/Dialog/Dialog.svelte +15 -0
- package/src/components/Divider/Divider.svelte +12 -0
- package/src/components/FormField/FormField.svelte +14 -0
- package/src/components/Grid/Grid.svelte +16 -0
- package/src/components/Input/Input.svelte +12 -0
- package/src/components/InstrumentViewport/InstrumentViewport.svelte +19 -0
- package/src/components/InstrumentViewport/InstrumentViewport.test.ts +12 -0
- package/src/components/Link/Link.svelte +13 -0
- package/src/components/Nav/Nav.svelte +19 -0
- package/src/components/Progress/Progress.svelte +13 -0
- package/src/components/Radio/Radio.svelte +14 -0
- package/src/components/ScrollReveal/ScrollReveal.svelte +14 -0
- package/src/components/Section/Section.svelte +16 -0
- package/src/components/Select/Select.svelte +17 -0
- package/src/components/Skeleton/Skeleton.svelte +14 -0
- package/src/components/Slider/Slider.svelte +13 -0
- package/src/components/Spinner/Spinner.svelte +12 -0
- package/src/components/Stack/Stack.svelte +15 -0
- package/src/components/Switch/Switch.svelte +13 -0
- package/src/components/Table/Table.svelte +21 -0
- package/src/components/Tabs/Tabs.svelte +20 -0
- package/src/components/Tag/Tag.svelte +14 -0
- package/src/components/Textarea/Textarea.svelte +13 -0
- package/src/components/Toast/Toast.svelte +12 -0
- package/src/components/Toast/ToastProvider.svelte +14 -0
- package/src/components/Tooltip/Tooltip.svelte +14 -0
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Toggle switch for binary on/off settings with optional inline label.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Switch } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
let darkMode = false;
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Switch bind:checked={darkMode} label="Dark mode" />
|
|
13
|
+
```
|
|
14
|
+
-->
|
|
2
15
|
<script lang="ts">
|
|
3
16
|
/** Controlled checked state */
|
|
4
17
|
export let checked: boolean = false
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Data table with column definitions, sortable headers, and row rendering.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Table } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
|
|
10
|
+
const columns = [
|
|
11
|
+
{ key: 'name', header: 'Name', sortable: true },
|
|
12
|
+
{ key: 'role', header: 'Role' },
|
|
13
|
+
];
|
|
14
|
+
const data = [
|
|
15
|
+
{ name: 'Jane', role: 'Engineer' },
|
|
16
|
+
{ name: 'Alex', role: 'Designer' },
|
|
17
|
+
];
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<Table {columns} {data} onsort={(key, dir) => console.log(key, dir)} />
|
|
21
|
+
```
|
|
22
|
+
-->
|
|
2
23
|
<script lang="ts">
|
|
3
24
|
export interface TableColumn {
|
|
4
25
|
/** Unique key matching the data field */
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Tabbed content switcher with keyboard navigation and ARIA tab pattern.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Tabs } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
let activeTab = 'overview';
|
|
10
|
+
const tabs = [
|
|
11
|
+
{ id: 'overview', label: 'Overview' },
|
|
12
|
+
{ id: 'details', label: 'Details' },
|
|
13
|
+
];
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Tabs {tabs} bind:activeTab>
|
|
17
|
+
<div slot="overview"><p>Overview content</p></div>
|
|
18
|
+
<div slot="details"><p>Details content</p></div>
|
|
19
|
+
</Tabs>
|
|
20
|
+
```
|
|
21
|
+
-->
|
|
2
22
|
<script lang="ts">
|
|
3
23
|
export interface TabItem {
|
|
4
24
|
id: string
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Compact label for categorization, filtering, or status display.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Tag } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<Tag variant="solid" status="teal" removable onremove={() => {}}>
|
|
12
|
+
Active
|
|
13
|
+
</Tag>
|
|
14
|
+
```
|
|
15
|
+
-->
|
|
2
16
|
<script lang="ts">
|
|
3
17
|
/** Visual style variant */
|
|
4
18
|
export let variant: 'solid' | 'outlined' = 'solid'
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Multi-line text input with auto-resize, character count, and error state.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Textarea } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
let text = '';
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Textarea bind:value={text} maxLength={500} showCount autoResize />
|
|
13
|
+
```
|
|
14
|
+
-->
|
|
2
15
|
<script lang="ts">
|
|
3
16
|
/** Auto-resize to fit content */
|
|
4
17
|
export let autoResize: boolean = false
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Standalone notification message with status indicator and optional dismiss.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Toast } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<Toast status="success" message="Changes saved." ondismiss={() => {}} />
|
|
12
|
+
```
|
|
13
|
+
-->
|
|
2
14
|
<script lang="ts">
|
|
3
15
|
import type { ToastStatus } from './useToast'
|
|
4
16
|
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Context provider that manages toast notifications for its subtree.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { ToastProvider } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<ToastProvider>
|
|
12
|
+
<App />
|
|
13
|
+
</ToastProvider>
|
|
14
|
+
```
|
|
15
|
+
-->
|
|
2
16
|
<script lang="ts">
|
|
3
17
|
import { onDestroy } from 'svelte'
|
|
4
18
|
import { createToastContext } from './useToast'
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
<!--! Strand Svelte | MIT License | dillingerstaffing.com -->
|
|
2
|
+
<!--
|
|
3
|
+
Hover/focus-triggered text popup anchored to a trigger element.
|
|
4
|
+
|
|
5
|
+
@example
|
|
6
|
+
```svelte
|
|
7
|
+
<script>
|
|
8
|
+
import { Tooltip, Button } from '@dillingerstaffing/strand-svelte';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<Tooltip content="Save your progress" position="top">
|
|
12
|
+
<Button variant="primary">Save</Button>
|
|
13
|
+
</Tooltip>
|
|
14
|
+
```
|
|
15
|
+
-->
|
|
2
16
|
<script lang="ts">
|
|
3
17
|
/** Tooltip text */
|
|
4
18
|
export let content: string
|