@swr-data-lab/components 1.10.0 → 1.11.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/.storybook/main.ts +7 -13
- package/.storybook/preview.ts +1 -1
- package/package.json +68 -69
- package/src/Autocomplete/Autocomplete.stories.svelte +2 -3
- package/src/Autocomplete/Autocomplete.svelte +0 -3
- package/src/Button/Button.stories.svelte +1 -2
- package/src/Caption/Caption.stories.svelte +1 -2
- package/src/Card/Card.stories.svelte +1 -2
- package/src/ChartFooter/ChartFooter.mdx +1 -1
- package/src/ChartFooter/ChartFooter.stories.svelte +1 -2
- package/src/ChartHeader/ChartHeader.mdx +1 -1
- package/src/ChartHeader/ChartHeader.stories.svelte +2 -3
- package/src/Copy/Copy.stories.svelte +1 -2
- package/src/DesignTokens/DesignTokens.mdx +1 -1
- package/src/DesignTokens/DesignTokens.svelte +9 -1
- package/src/FormLabel/FormLabel.mdx +13 -0
- package/src/FormLabel/FormLabel.stories.svelte +50 -0
- package/src/FormLabel/FormLabel.svelte +36 -0
- package/src/FormLabel/index.ts +2 -0
- package/src/Headline/Headline.stories.svelte +1 -2
- package/src/HighlightCard/HighlightCard.stories.svelte +1 -2
- package/src/Input/Input.svelte +3 -4
- package/src/Intro.mdx +1 -1
- package/src/Logotype/Logotype.stories.svelte +1 -2
- package/src/Middot/Middot.stories.svelte +1 -2
- package/src/Note/Note.stories.svelte +1 -2
- package/src/Select/Select.mdx +1 -1
- package/src/Select/Select.stories.svelte +4 -4
- package/src/Select/SelectStoriesTemplate.svelte +2 -6
- package/src/Switcher/Switcher.mdx +1 -1
- package/src/Switcher/Switcher.stories.svelte +2 -3
- package/src/Switcher/Switcher.svelte +3 -7
- package/src/styles/base.scss +0 -8
- package/vitest.workspace.ts +1 -1
package/.storybook/main.ts
CHANGED
|
@@ -11,20 +11,14 @@ const config: StorybookConfig = {
|
|
|
11
11
|
'../src/**/*.mdx'
|
|
12
12
|
],
|
|
13
13
|
|
|
14
|
-
addons: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
getAbsolutePath('@storybook/addon-links'),
|
|
22
|
-
getAbsolutePath('@storybook/addon-essentials'),
|
|
23
|
-
getAbsolutePath('@chromatic-com/storybook'),
|
|
24
|
-
getAbsolutePath('@storybook/experimental-addon-test')
|
|
25
|
-
],
|
|
14
|
+
addons: [{
|
|
15
|
+
name: getAbsolutePath("@storybook/addon-svelte-csf"),
|
|
16
|
+
options: {
|
|
17
|
+
legacyTemplate: true
|
|
18
|
+
}
|
|
19
|
+
}, getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@chromatic-com/storybook'), getAbsolutePath('@storybook/addon-vitest'), getAbsolutePath("@storybook/addon-docs")],
|
|
26
20
|
framework: {
|
|
27
|
-
name:
|
|
21
|
+
name: getAbsolutePath("@storybook/sveltekit"),
|
|
28
22
|
options: {}
|
|
29
23
|
},
|
|
30
24
|
|
package/.storybook/preview.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"version": "1.10.0"
|
|
2
|
+
"name": "@swr-data-lab/components",
|
|
3
|
+
"description": "SWR Data Lab component library",
|
|
4
|
+
"author": "SWR Data Lab",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "restricted"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "vite dev",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
13
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
14
|
+
"storybook": "storybook dev -p 6006",
|
|
15
|
+
"start": "storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "storybook build --disable-telemetry",
|
|
17
|
+
"test-storybook": "vitest run --project=storybook",
|
|
18
|
+
"test-storybook:ci": "concurrently -k -s first -n \"Storybook,Test\" -c \"magenta,blue\" \"npm run build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && npm run test-storybook\"",
|
|
19
|
+
"semantic-release": "semantic-release"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"svelte-select": "^5.8.3"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@chromatic-com/storybook": "^4.0.0-next.6",
|
|
26
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
27
|
+
"@semantic-release/git": "^10.0.1",
|
|
28
|
+
"@semantic-release/npm": "^12.0.1",
|
|
29
|
+
"@storybook/addon-docs": "^9.0.0-beta.11",
|
|
30
|
+
"@storybook/addon-links": "^9.0.0-beta.11",
|
|
31
|
+
"@storybook/addon-svelte-csf": "^5.0.0-next.30",
|
|
32
|
+
"@storybook/addon-vitest": "^9.0.0-beta.11",
|
|
33
|
+
"@storybook/sveltekit": "^9.0.0-beta.11",
|
|
34
|
+
"@storybook/test-runner": "^0.23.0-next.1",
|
|
35
|
+
"@sveltejs/adapter-auto": "^3.0.0",
|
|
36
|
+
"@sveltejs/kit": "^2.0.0",
|
|
37
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
38
|
+
"@vitest/browser": "^3.1.1",
|
|
39
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
40
|
+
"concurrently": "^9.0.1",
|
|
41
|
+
"http-server": "^14.1.1",
|
|
42
|
+
"playwright": "^1.51.1",
|
|
43
|
+
"sass-embedded": "^1.78.0",
|
|
44
|
+
"semantic-release": "^24.1.2",
|
|
45
|
+
"storybook": "^9.0.0-beta.11",
|
|
46
|
+
"svelte": "^5.23.0",
|
|
47
|
+
"svelte-check": "^4.0.0",
|
|
48
|
+
"typescript": "^5.0.0",
|
|
49
|
+
"vite": "^6.0.0",
|
|
50
|
+
"vitest": "^3.1.1",
|
|
51
|
+
"wait-on": "^8.0.1"
|
|
52
|
+
},
|
|
53
|
+
"type": "module",
|
|
54
|
+
"release": {
|
|
55
|
+
"plugins": [
|
|
56
|
+
"@semantic-release/commit-analyzer",
|
|
57
|
+
"@semantic-release/release-notes-generator",
|
|
58
|
+
"@semantic-release/npm"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"exports": {
|
|
62
|
+
".": {
|
|
63
|
+
"svelte": "./src/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"version": "1.11.0",
|
|
67
|
+
"overrides": {
|
|
68
|
+
"storybook": "$storybook"
|
|
69
|
+
}
|
|
71
70
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script module>
|
|
2
2
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import { userEvent, within, expect } from '
|
|
3
|
+
import { userEvent, within, expect } from 'storybook/test';
|
|
4
4
|
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
5
5
|
|
|
6
6
|
import Autocomplete from './Autocomplete.svelte';
|
|
7
7
|
|
|
8
8
|
const { Story } = defineMeta({
|
|
9
|
-
title: 'Deprecated/Autocomplete'
|
|
10
|
-
component: Autocomplete
|
|
9
|
+
title: 'Deprecated/Autocomplete'
|
|
11
10
|
});
|
|
12
11
|
|
|
13
12
|
const testData = ['Apples', 'Oranges', 'Pears', 'Peaches', 'Bananas'].map((el) => {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<script context="module">
|
|
2
2
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
3
|
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
|
-
import { expect } from '
|
|
4
|
+
import { expect } from 'storybook/test';
|
|
5
5
|
import ChartHeader from './ChartHeader.svelte';
|
|
6
6
|
|
|
7
7
|
const { Story } = defineMeta({
|
|
8
|
-
title: 'Chart/ChartHeader'
|
|
9
|
-
component: ChartHeader
|
|
8
|
+
title: 'Chart/ChartHeader'
|
|
10
9
|
});
|
|
11
10
|
</script>
|
|
12
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Title, Story, ColorPalette, ColorItem, Meta, Typeset, Canvas } from '@storybook/blocks';
|
|
1
|
+
import { Title, Story, ColorPalette, ColorItem, Meta, Typeset, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import { shades, scales, typography } from "./Tokens"
|
|
3
3
|
|
|
4
4
|
import * as HeadlineStories from "../Headline/Headline.stories.svelte"
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
2
3
|
import { shades } from './Tokens';
|
|
3
4
|
|
|
5
|
+
interface DesignTokensProps {
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
}
|
|
8
|
+
let { children }: DesignTokensProps = $props();
|
|
9
|
+
|
|
4
10
|
const rules = [
|
|
5
11
|
...Object.keys(shades).map((key) => {
|
|
6
12
|
return Object.entries(shades[key])
|
|
@@ -16,7 +22,9 @@
|
|
|
16
22
|
</script>
|
|
17
23
|
|
|
18
24
|
<div class="container" style={rules.join(';')}>
|
|
19
|
-
|
|
25
|
+
{#if children}
|
|
26
|
+
{@render children()}
|
|
27
|
+
{/if}
|
|
20
28
|
</div>
|
|
21
29
|
|
|
22
30
|
<style lang="scss">
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Story, Meta, Primary, Controls, Stories } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import * as FormLabelStories from './FormLabel.stories.svelte';
|
|
4
|
+
|
|
5
|
+
<Meta of={FormLabelStories}/>
|
|
6
|
+
|
|
7
|
+
# Form Label
|
|
8
|
+
|
|
9
|
+
Standard form label. The `htmlFor` prop is required to semantically link the label to the form element it describes.
|
|
10
|
+
|
|
11
|
+
<Controls />
|
|
12
|
+
|
|
13
|
+
<Stories/>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script context="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
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Story name="Default">
|
|
16
|
+
<DesignTokens>
|
|
17
|
+
<FormLabel htmlFor="">Deine Gemeinde</FormLabel>
|
|
18
|
+
</DesignTokens>
|
|
19
|
+
</Story>
|
|
20
|
+
|
|
21
|
+
<Story
|
|
22
|
+
name="With Select"
|
|
23
|
+
play={async ({ canvasElement, step }) => {
|
|
24
|
+
const canvas = within(canvasElement);
|
|
25
|
+
const label = canvas.getByTestId('label-container');
|
|
26
|
+
const input = canvas.getByPlaceholderText('...');
|
|
27
|
+
await step('Label renders children', async () => {
|
|
28
|
+
await userEvent.click(label);
|
|
29
|
+
expect(label).toHaveTextContent('Deine Gemeinde');
|
|
30
|
+
});
|
|
31
|
+
await step('Clicking the label focuses the input', async () => {
|
|
32
|
+
await userEvent.click(label);
|
|
33
|
+
expect(input).toHaveFocus();
|
|
34
|
+
});
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<DesignTokens>
|
|
38
|
+
<FormLabel htmlFor="select-gemeinde">Deine Gemeinde</FormLabel>
|
|
39
|
+
<Select
|
|
40
|
+
inputId="select-gemeinde"
|
|
41
|
+
placeholder="..."
|
|
42
|
+
value={undefined}
|
|
43
|
+
items={[
|
|
44
|
+
{ value: 'konstanz', label: 'Konstanz' },
|
|
45
|
+
{ value: 'stuttgart', label: 'Stuttgart' },
|
|
46
|
+
{ value: 'heidelberg', label: 'Heidelberg' }
|
|
47
|
+
]}
|
|
48
|
+
></Select>
|
|
49
|
+
</DesignTokens>
|
|
50
|
+
</Story>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface FormLabelProps {
|
|
5
|
+
as?: string;
|
|
6
|
+
htmlFor?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
let { as = 'label', htmlFor, children }: FormLabelProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if as == 'legend'}
|
|
13
|
+
<legend class="container" data-testid="label-container">
|
|
14
|
+
{#if children}
|
|
15
|
+
{@render children()}
|
|
16
|
+
{/if}
|
|
17
|
+
</legend>
|
|
18
|
+
{/if}
|
|
19
|
+
{#if as == 'label'}
|
|
20
|
+
<label class="container" for={htmlFor} data-testid="label-container">
|
|
21
|
+
{#if children}
|
|
22
|
+
{@render children()}
|
|
23
|
+
{/if}
|
|
24
|
+
</label>
|
|
25
|
+
{/if}
|
|
26
|
+
|
|
27
|
+
<style>
|
|
28
|
+
.container {
|
|
29
|
+
font-family: var(--swr-text);
|
|
30
|
+
font-size: var(--fs-small-1);
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
margin-bottom: 0.25em;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
letter-spacing: 0.005em;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
package/src/Input/Input.svelte
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
3
|
+
|
|
2
4
|
export let label: string = '';
|
|
3
5
|
export let name: string = '';
|
|
4
6
|
export let placeholder: string = '';
|
|
@@ -6,16 +8,13 @@
|
|
|
6
8
|
</script>
|
|
7
9
|
|
|
8
10
|
<div class="container">
|
|
9
|
-
<
|
|
11
|
+
<FormLabel htmlFor={name}>{label}</FormLabel>
|
|
10
12
|
<input {name} type="text" {placeholder} bind:value />
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
15
|
<style lang="scss">
|
|
14
16
|
@use '../styles/base.scss';
|
|
15
17
|
|
|
16
|
-
label {
|
|
17
|
-
@extend %form-label;
|
|
18
|
-
}
|
|
19
18
|
input {
|
|
20
19
|
@extend %form-input;
|
|
21
20
|
}
|
package/src/Intro.mdx
CHANGED
package/src/Select/Select.mdx
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script context="module" lang="ts">
|
|
2
2
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
3
|
import Select from './Select.svelte';
|
|
4
|
+
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
4
5
|
import StoryTemplate from './SelectStoriesTemplate.svelte';
|
|
5
6
|
import jobsData from './mock_data/jobs.json';
|
|
6
7
|
|
|
7
8
|
const { Story } = defineMeta({
|
|
8
|
-
title: 'Form/Select'
|
|
9
|
-
component: Select
|
|
9
|
+
title: 'Form/Select'
|
|
10
10
|
});
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import { userEvent, within, expect } from '
|
|
14
|
+
import { userEvent, within, expect } from 'storybook/test';
|
|
15
15
|
import { type SelectItem } from './Select.types';
|
|
16
16
|
let selectedItem: SelectItem | undefined = undefined;
|
|
17
17
|
</script>
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
>
|
|
149
149
|
<StoryTemplate>
|
|
150
150
|
{#snippet demoComponent()}
|
|
151
|
-
<
|
|
151
|
+
<FormLabel htmlFor="job-select">Berufe</FormLabel>
|
|
152
152
|
<Select
|
|
153
153
|
bind:value={selectedItem}
|
|
154
154
|
inputId="job-select"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Select from './Select.svelte';
|
|
3
|
+
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
3
4
|
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
4
5
|
|
|
5
6
|
let { args = null, selectedItem = $bindable(), demoComponent = null } = $props();
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
{#if demoComponent}
|
|
10
11
|
{@render demoComponent()}
|
|
11
12
|
{:else}
|
|
12
|
-
<
|
|
13
|
+
<FormLabel htmlFor={args.inputId}>Select</FormLabel>
|
|
13
14
|
<Select {...args} bind:value={selectedItem} />
|
|
14
15
|
{/if}
|
|
15
16
|
</DesignTokens>
|
|
@@ -20,11 +21,6 @@ value = {JSON.stringify(selectedItem, null, ' ')}</pre>
|
|
|
20
21
|
{/if}
|
|
21
22
|
|
|
22
23
|
<style>
|
|
23
|
-
label {
|
|
24
|
-
display: block;
|
|
25
|
-
font-family: var(--swr-sans);
|
|
26
|
-
margin-bottom: 0.25em;
|
|
27
|
-
}
|
|
28
24
|
.output {
|
|
29
25
|
display: block;
|
|
30
26
|
margin-top: 1rem;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
3
|
import Switcher from './Switcher.svelte';
|
|
4
4
|
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
5
|
-
import { userEvent, within, expect } from '
|
|
5
|
+
import { userEvent, within, expect } from 'storybook/test';
|
|
6
6
|
|
|
7
7
|
const { Story } = defineMeta({
|
|
8
|
-
title: 'Form/Switcher'
|
|
9
|
-
component: Switcher
|
|
8
|
+
title: 'Form/Switcher'
|
|
10
9
|
});
|
|
11
10
|
</script>
|
|
12
11
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
3
|
+
|
|
2
4
|
interface SwitcherProps {
|
|
3
5
|
/**
|
|
4
6
|
* Human-readable label
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
</script>
|
|
30
32
|
|
|
31
33
|
<fieldset class="container" class:small={size === 'small'}>
|
|
32
|
-
<legend>{label}</
|
|
34
|
+
<FormLabel as="legend">{label}</FormLabel>
|
|
33
35
|
<ul>
|
|
34
36
|
{#each options as o (o)}
|
|
35
37
|
<li class:is-selected={o === value}>
|
|
@@ -50,12 +52,6 @@
|
|
|
50
52
|
font-family: var(--swr-sans);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
legend {
|
|
54
|
-
font-size: var(--fs-small-2);
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
margin-bottom: 0.35em;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
55
|
ul {
|
|
60
56
|
width: 100%;
|
|
61
57
|
display: flex;
|
package/src/styles/base.scss
CHANGED
|
@@ -7,14 +7,6 @@ $bp-l: 1024px;
|
|
|
7
7
|
$bp-xl: 1440px;
|
|
8
8
|
|
|
9
9
|
// TODO drop everything below
|
|
10
|
-
%form-label {
|
|
11
|
-
font-family: var(--swr-sans);
|
|
12
|
-
font-size: 0.9rem;
|
|
13
|
-
line-height: 1;
|
|
14
|
-
letter-spacing: 0.0045em;
|
|
15
|
-
display: block;
|
|
16
|
-
margin-bottom: 0.5em;
|
|
17
|
-
}
|
|
18
10
|
|
|
19
11
|
%form-input {
|
|
20
12
|
font-family: var(--swr-sans);
|
package/vitest.workspace.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
3
3
|
|
|
4
4
|
import { defineWorkspace } from 'vitest/config';
|
|
5
5
|
|
|
6
|
-
import { storybookTest } from '@storybook/
|
|
6
|
+
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
7
7
|
|
|
8
8
|
const dirname =
|
|
9
9
|
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|