@swr-data-lab/components 1.13.1 → 1.13.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/package.json +2 -4
- package/dist/Autocomplete/Autocomplete.stories.svelte +0 -61
- package/dist/Autocomplete/Autocomplete.stories.svelte.d.ts +0 -27
- package/dist/Button/Button.stories.svelte +0 -19
- package/dist/Button/Button.stories.svelte.d.ts +0 -19
- package/dist/Caption/Caption.stories.svelte +0 -24
- package/dist/Caption/Caption.stories.svelte.d.ts +0 -27
- package/dist/Card/Card.stories.svelte +0 -17
- package/dist/Card/Card.stories.svelte.d.ts +0 -19
- package/dist/ChartFooter/ChartFooter.stories.svelte +0 -32
- package/dist/ChartFooter/ChartFooter.stories.svelte.d.ts +0 -27
- package/dist/ChartHeader/ChartHeader.stories.svelte +0 -31
- package/dist/ChartHeader/ChartHeader.stories.svelte.d.ts +0 -27
- package/dist/ChartList/ChartList.stories.svelte +0 -48
- package/dist/ChartList/ChartList.stories.svelte.d.ts +0 -27
- package/dist/Copy/Copy.stories.svelte +0 -32
- package/dist/Copy/Copy.stories.svelte.d.ts +0 -27
- package/dist/FormLabel/FormLabel.stories.svelte +0 -52
- package/dist/FormLabel/FormLabel.stories.svelte.d.ts +0 -27
- package/dist/Headline/Headline.stories.svelte +0 -17
- package/dist/Headline/Headline.stories.svelte.d.ts +0 -27
- package/dist/HighlightCard/HighlightCard.stories.svelte +0 -55
- package/dist/HighlightCard/HighlightCard.stories.svelte.d.ts +0 -19
- package/dist/Logotype/Logotype.stories.svelte +0 -14
- package/dist/Logotype/Logotype.stories.svelte.d.ts +0 -19
- package/dist/Middot/Middot.stories.svelte +0 -14
- package/dist/Middot/Middot.stories.svelte.d.ts +0 -19
- package/dist/Note/Note.stories.svelte +0 -23
- package/dist/Note/Note.stories.svelte.d.ts +0 -27
- package/dist/Select/Select.stories.svelte +0 -202
- package/dist/Select/Select.stories.svelte.d.ts +0 -19
- package/dist/Select/SelectStoriesTemplate.svelte +0 -31
- package/dist/Select/SelectStoriesTemplate.svelte.d.ts +0 -15
- package/dist/Switcher/Switcher.stories.svelte +0 -44
- package/dist/Switcher/Switcher.stories.svelte.d.ts +0 -27
- package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte +0 -27
- package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte.d.ts +0 -19
- package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte +0 -74
- package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte.d.ts +0 -19
- package/dist/maplibre/Map/Map.stories.svelte +0 -113
- package/dist/maplibre/Map/Map.stories.svelte.d.ts +0 -19
- package/dist/maplibre/MapControl/MapControl.stories.svelte +0 -46
- package/dist/maplibre/MapControl/MapControl.stories.svelte.d.ts +0 -19
- package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte +0 -39
- package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte.d.ts +0 -18
- package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte +0 -37
- package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte.d.ts +0 -19
- package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte +0 -68
- package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte.d.ts +0 -19
- package/dist/maplibre/Source/MapSource.stories.svelte +0 -7
- package/dist/maplibre/Source/MapSource.stories.svelte.d.ts +0 -19
- package/dist/maplibre/Tooltip/Tooltip.stories.svelte +0 -186
- package/dist/maplibre/Tooltip/Tooltip.stories.svelte.d.ts +0 -19
- package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte +0 -62
- package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte.d.ts +0 -19
- package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte +0 -44
- package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte.d.ts +0 -19
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +0 -27
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte.d.ts +0 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swr-data-lab/components",
|
|
3
3
|
"description": "SWR Data Lab component library",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.2",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -81,9 +81,7 @@
|
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
83
|
"files": [
|
|
84
|
-
"
|
|
85
|
-
"!./dist/**/*.test.*",
|
|
86
|
-
"!./dist/**/*.stories.*"
|
|
84
|
+
"dist/"
|
|
87
85
|
],
|
|
88
86
|
"sideEffects": [
|
|
89
87
|
"**/*.css"
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import { userEvent, within, expect } from 'storybook/test';
|
|
4
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
5
|
-
|
|
6
|
-
import Autocomplete from './Autocomplete.svelte';
|
|
7
|
-
|
|
8
|
-
const { Story } = defineMeta({
|
|
9
|
-
title: 'Deprecated/Autocomplete',
|
|
10
|
-
component: Autocomplete
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const testData = ['Apples', 'Oranges', 'Pears', 'Peaches', 'Bananas'].map((el) => {
|
|
14
|
-
return {
|
|
15
|
-
value: el,
|
|
16
|
-
label: el,
|
|
17
|
-
details: {}
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<Story
|
|
23
|
-
name="Basic"
|
|
24
|
-
asChild
|
|
25
|
-
play={async ({ canvasElement, step }) => {
|
|
26
|
-
const canvas = within(canvasElement);
|
|
27
|
-
const input = canvas.getByTestId('autocomplete-input');
|
|
28
|
-
await step('Select using the mouse', async () => {
|
|
29
|
-
await userEvent.click(input);
|
|
30
|
-
expect(input).toHaveFocus();
|
|
31
|
-
await userEvent.keyboard('ba');
|
|
32
|
-
const bananasOption = canvas.getByText('Bananas');
|
|
33
|
-
await userEvent.click(bananasOption);
|
|
34
|
-
expect(input).toHaveValue('Bananas');
|
|
35
|
-
});
|
|
36
|
-
await userEvent.clear(input);
|
|
37
|
-
await step('Select using the keyboard', async () => {
|
|
38
|
-
await userEvent.click(input);
|
|
39
|
-
expect(input).toHaveFocus();
|
|
40
|
-
await userEvent.keyboard('ap');
|
|
41
|
-
await userEvent.keyboard('{ArrowDown}');
|
|
42
|
-
await userEvent.keyboard('{Enter}');
|
|
43
|
-
expect(input).toHaveValue('Apples');
|
|
44
|
-
});
|
|
45
|
-
await userEvent.clear(input);
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
<DesignTokens>
|
|
49
|
-
<div class="container">
|
|
50
|
-
<Autocomplete label="" name="test" data={testData} query="" placeholder="Select a fruit"
|
|
51
|
-
></Autocomplete>
|
|
52
|
-
</div>
|
|
53
|
-
</DesignTokens>
|
|
54
|
-
</Story>
|
|
55
|
-
|
|
56
|
-
<style>
|
|
57
|
-
.container {
|
|
58
|
-
background: var(--violet-dark-5);
|
|
59
|
-
padding: 5%;
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Autocomplete;
|
|
2
|
-
type Autocomplete = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const Autocomplete: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import Autocomplete from './Autocomplete.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
2
|
-
import Button from './Button.svelte';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
const { Story } = defineMeta({
|
|
5
|
-
title: 'Form/Button',
|
|
6
|
-
component: Button
|
|
7
|
-
});
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<Story name="Basic" asChild>
|
|
11
|
-
<DesignTokens>
|
|
12
|
-
<Button label="This is a button label"></Button>
|
|
13
|
-
</DesignTokens>
|
|
14
|
-
</Story>
|
|
15
|
-
<Story name="Disabled" asChild>
|
|
16
|
-
<DesignTokens>
|
|
17
|
-
<Button disabled label="This button is disabled"></Button>
|
|
18
|
-
</DesignTokens>
|
|
19
|
-
</Story>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Button from './Button.svelte';
|
|
2
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Button: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {}, {}, string>;
|
|
18
|
-
type Button = InstanceType<typeof Button>;
|
|
19
|
-
export default Button;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
|
|
5
|
-
import Caption from './Caption.svelte';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Typography/Caption',
|
|
9
|
-
component: Caption
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Story name="Default" asChild>
|
|
14
|
-
<DesignTokens>
|
|
15
|
-
<Caption>Björn Schittenhelm, Apotheker aus Holzgerlingen (Kreis Böblingen)</Caption>
|
|
16
|
-
</DesignTokens>
|
|
17
|
-
</Story>
|
|
18
|
-
<Story name="Bold" asChild>
|
|
19
|
-
<DesignTokens>
|
|
20
|
-
<Caption weight="bold">
|
|
21
|
-
Björn Schittenhelm, Apotheker aus Holzgerlingen (Kreis Böblingen)
|
|
22
|
-
</Caption>
|
|
23
|
-
</DesignTokens>
|
|
24
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Caption;
|
|
2
|
-
type Caption = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const Caption: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import Caption from './Caption.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
2
|
-
import Card from './Card.svelte';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
const { Story } = defineMeta({
|
|
5
|
-
title: 'Display/Card/Base',
|
|
6
|
-
component: Card
|
|
7
|
-
});
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<Story name="Basic card" asChild>
|
|
11
|
-
<DesignTokens>
|
|
12
|
-
<Card>
|
|
13
|
-
<h1>Any content</h1>
|
|
14
|
-
<p>can be added to a basic <code>Card</code> component.</p>
|
|
15
|
-
</Card>
|
|
16
|
-
</DesignTokens>
|
|
17
|
-
</Story>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Card from './Card.svelte';
|
|
2
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Card: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {}, {}, string>;
|
|
18
|
-
type Card = InstanceType<typeof Card>;
|
|
19
|
-
export default Card;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
|
|
5
|
-
import ChartFooter from './ChartFooter.svelte';
|
|
6
|
-
import Middot from '../Middot/Middot.svelte';
|
|
7
|
-
|
|
8
|
-
const { Story } = defineMeta({
|
|
9
|
-
title: 'Chart/ChartFooter',
|
|
10
|
-
component: ChartFooter
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Story name="One-up" asChild>
|
|
15
|
-
<DesignTokens>
|
|
16
|
-
<ChartFooter layout="one-up">
|
|
17
|
-
Daten: <a href="#1">Zensus 2022</a>
|
|
18
|
-
(Durchschnittsmieten und Einwohnerzahlen),
|
|
19
|
-
<a href="#1">OpenStreetMap</a> (Kartenmaterial) <Middot /> In unserer Darstellung wurde das Zensusgitter
|
|
20
|
-
auf bewohnte Gebiete begrenzt.
|
|
21
|
-
</ChartFooter>
|
|
22
|
-
</DesignTokens>
|
|
23
|
-
</Story>
|
|
24
|
-
|
|
25
|
-
<Story name="Two-up" asChild>
|
|
26
|
-
<DesignTokens>
|
|
27
|
-
<ChartFooter layout="two-up">
|
|
28
|
-
Daten: <a href="#1">Zensus 2022</a>
|
|
29
|
-
(Durchschnittsmieten und Einwohnerzahlen)
|
|
30
|
-
</ChartFooter>
|
|
31
|
-
</DesignTokens>
|
|
32
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default ChartFooter;
|
|
2
|
-
type ChartFooter = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ChartFooter: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import ChartFooter from './ChartFooter.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
import { expect } from 'storybook/test';
|
|
5
|
-
import ChartHeader from './ChartHeader.svelte';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Chart/ChartHeader',
|
|
9
|
-
component: ChartHeader
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Story
|
|
14
|
-
name="Default"
|
|
15
|
-
asChild
|
|
16
|
-
play={async ({ step }) => {
|
|
17
|
-
await step('Container has ID attribute derived from title prop', async () => {
|
|
18
|
-
const containerEl = document.querySelector('#mehr-uber-60-jahrige-in-allen-berufen');
|
|
19
|
-
expect(containerEl).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
<DesignTokens>
|
|
24
|
-
<ChartHeader
|
|
25
|
-
title="Mehr über-60-Jährige in allen Berufen"
|
|
26
|
-
subtitle="Veränderung des Anteils der Beschäftigen über 60 Jahren in allen Berufsgruppen seit 2013 (Bundesweit)"
|
|
27
|
-
>
|
|
28
|
-
Arbitrary HTML content can go here
|
|
29
|
-
</ChartHeader>
|
|
30
|
-
</DesignTokens>
|
|
31
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default ChartHeader;
|
|
2
|
-
type ChartHeader = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ChartHeader: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import ChartHeader from './ChartHeader.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import { within, expect } from 'storybook/test';
|
|
4
|
-
|
|
5
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
6
|
-
|
|
7
|
-
import ChartList from './ChartList.svelte';
|
|
8
|
-
|
|
9
|
-
const { Story } = defineMeta({
|
|
10
|
-
title: 'Meta/ChartList',
|
|
11
|
-
component: ChartList
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const testCharts = [
|
|
15
|
-
{ title: 'Baden-Württemberg Loosers', slug: 'bw-loosers' },
|
|
16
|
-
{ title: 'Baden-Württemberg Winners', slug: 'bw-winners' },
|
|
17
|
-
{ title: 'Rheinland-Pfalz Loosers', slug: 'rp-loosers' },
|
|
18
|
-
{ title: 'Rheinland-Pfalz Winners', slug: 'rp-winners' }
|
|
19
|
-
];
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<Story
|
|
23
|
-
name="Default"
|
|
24
|
-
asChild
|
|
25
|
-
play={async ({ canvasElement, step }) => {
|
|
26
|
-
const canvas = within(canvasElement);
|
|
27
|
-
|
|
28
|
-
await step('Project title renders', async () => {
|
|
29
|
-
const titleEl = canvas.getByTestId('chartlist-project-title');
|
|
30
|
-
expect(titleEl).toHaveTextContent('Grafiken für p110: Wie sieht der Wald von morgen aus?');
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
await step('All chart list items render', async () => {
|
|
34
|
-
testCharts.forEach((c) => {
|
|
35
|
-
const el = canvas.getByText(c.title);
|
|
36
|
-
expect(el).toBeTruthy();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
<DesignTokens>
|
|
42
|
-
<ChartList
|
|
43
|
-
baseUrl="https://static.datenhub.net/apps/p110_wald-klimawandel/main"
|
|
44
|
-
charts={testCharts}
|
|
45
|
-
project="p110: Wie sieht der Wald von morgen aus?"
|
|
46
|
-
/>
|
|
47
|
-
</DesignTokens>
|
|
48
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default ChartList;
|
|
2
|
-
type ChartList = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ChartList: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import ChartList from './ChartList.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
|
|
5
|
-
import Copy from './Copy.svelte';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Typography/Copy',
|
|
9
|
-
component: Copy
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Story name="Default" asChild>
|
|
14
|
-
<DesignTokens>
|
|
15
|
-
<Copy>
|
|
16
|
-
Björn Schittenhelm, Apotheker aus Holzgerlingen (Kreis Böblingen), bedient derzeit
|
|
17
|
-
größtenteils Allergiegeplagte: "Wir gehen nahtlos von der Erkältungssaison in die Pollensaison
|
|
18
|
-
hinein. Wir merken definitiv eine Veränderung über die letzten Jahre: Die Pollensaison wird
|
|
19
|
-
länger, die Grippesaison wird länger und dadurch überlappt sich das Ganze."
|
|
20
|
-
</Copy>
|
|
21
|
-
</DesignTokens>
|
|
22
|
-
</Story>
|
|
23
|
-
<Story name="Bold" asChild>
|
|
24
|
-
<DesignTokens>
|
|
25
|
-
<Copy weight="bold">
|
|
26
|
-
Björn Schittenhelm, Apotheker aus Holzgerlingen (Kreis Böblingen), bedient derzeit
|
|
27
|
-
größtenteils Allergiegeplagte: "Wir gehen nahtlos von der Erkältungssaison in die Pollensaison
|
|
28
|
-
hinein. Wir merken definitiv eine Veränderung über die letzten Jahre: Die Pollensaison wird
|
|
29
|
-
länger, die Grippesaison wird länger und dadurch überlappt sich das Ganze."
|
|
30
|
-
</Copy>
|
|
31
|
-
</DesignTokens>
|
|
32
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Copy;
|
|
2
|
-
type Copy = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const Copy: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import Copy from './Copy.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import { userEvent, within, expect } from 'storybook/test';
|
|
4
|
-
|
|
5
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
6
|
-
|
|
7
|
-
import FormLabel from './FormLabel.svelte';
|
|
8
|
-
import Select from '../Select/Select.svelte';
|
|
9
|
-
|
|
10
|
-
const { Story } = defineMeta({
|
|
11
|
-
title: 'Form/Label',
|
|
12
|
-
component: FormLabel
|
|
13
|
-
});
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<Story name="Default" asChild>
|
|
17
|
-
<DesignTokens>
|
|
18
|
-
<FormLabel htmlFor="">Deine Gemeinde</FormLabel>
|
|
19
|
-
</DesignTokens>
|
|
20
|
-
</Story>
|
|
21
|
-
|
|
22
|
-
<Story
|
|
23
|
-
name="With Select"
|
|
24
|
-
asChild
|
|
25
|
-
play={async ({ canvasElement, step }) => {
|
|
26
|
-
const canvas = within(canvasElement);
|
|
27
|
-
const label = canvas.getByTestId('label-container');
|
|
28
|
-
const input = canvas.getByPlaceholderText('...');
|
|
29
|
-
await step('Label renders children', async () => {
|
|
30
|
-
await userEvent.click(label);
|
|
31
|
-
expect(label).toHaveTextContent('Deine Gemeinde');
|
|
32
|
-
});
|
|
33
|
-
await step('Clicking the label focuses the input', async () => {
|
|
34
|
-
await userEvent.click(label);
|
|
35
|
-
expect(input).toHaveFocus();
|
|
36
|
-
});
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<DesignTokens>
|
|
40
|
-
<FormLabel htmlFor="select-gemeinde">Deine Gemeinde</FormLabel>
|
|
41
|
-
<Select
|
|
42
|
-
inputId="select-gemeinde"
|
|
43
|
-
placeholder="..."
|
|
44
|
-
value={undefined}
|
|
45
|
-
items={[
|
|
46
|
-
{ value: 'konstanz', label: 'Konstanz' },
|
|
47
|
-
{ value: 'stuttgart', label: 'Stuttgart' },
|
|
48
|
-
{ value: 'heidelberg', label: 'Heidelberg' }
|
|
49
|
-
]}
|
|
50
|
-
></Select>
|
|
51
|
-
</DesignTokens>
|
|
52
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default FormLabel;
|
|
2
|
-
type FormLabel = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const FormLabel: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import FormLabel from './FormLabel.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
|
|
5
|
-
import Headline from './Headline.svelte';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Typography/Headline',
|
|
9
|
-
component: Headline
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Story name="Default" asChild>
|
|
14
|
-
<DesignTokens>
|
|
15
|
-
<Headline>Baden-Württemberg heizt überdurchschnittlich viel mit Wärmepumpe</Headline>
|
|
16
|
-
</DesignTokens>
|
|
17
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Headline;
|
|
2
|
-
type Headline = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const Headline: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import Headline from './Headline.svelte';
|
|
15
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
-
$$bindings?: Bindings;
|
|
18
|
-
} & Exports;
|
|
19
|
-
(internal: unknown, props: {
|
|
20
|
-
$$events?: Events;
|
|
21
|
-
$$slots?: Slots;
|
|
22
|
-
}): Exports & {
|
|
23
|
-
$set?: any;
|
|
24
|
-
$on?: any;
|
|
25
|
-
};
|
|
26
|
-
z_$$bindings?: Bindings;
|
|
27
|
-
}
|