@swr-data-lab/components 1.6.0 → 1.8.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 +13 -16
- package/.storybook/preview.ts +3 -0
- package/.storybook/vitest.setup.ts +9 -0
- package/package.json +8 -5
- package/src/Autocomplete/Autocomplete.stories.svelte +61 -0
- package/src/Autocomplete/Autocomplete.svelte +9 -7
- package/src/Button/Button.svelte +14 -10
- package/src/Card/Card.stories.svelte +5 -20
- package/src/Card/Card.svelte +17 -4
- package/src/ChartFooter/ChartFooter.mdx +17 -0
- package/src/ChartFooter/ChartFooter.stories.svelte +12 -20
- package/src/ChartFooter/ChartFooter.svelte +30 -22
- package/src/ChartHeader/ChartHeader.mdx +15 -0
- package/src/ChartHeader/ChartHeader.stories.svelte +14 -11
- package/src/ChartHeader/ChartHeader.svelte +19 -13
- package/src/DesignTokens/DesignTokens.mdx +15 -9
- package/src/DesignTokens/DesignTokens.svelte +2 -1
- package/src/DesignTokens/index.js +8 -1
- package/src/HighlightCard/HighlightCard.stories.svelte +5 -20
- package/src/HighlightCard/HighlightCard.svelte +15 -11
- package/src/Input/Input.svelte +1 -1
- package/src/Intro.mdx +2 -2
- package/src/Logotype/Logotype.stories.svelte +16 -0
- package/src/Logotype/Logotype.svelte +1 -0
- package/src/Middot/Middot.stories.svelte +16 -0
- package/src/Select/Select.mdx +25 -0
- package/src/Select/Select.stories.svelte +87 -147
- package/src/Select/Select.svelte +65 -73
- package/src/Select/Select.types.ts +8 -0
- package/src/Select/SelectStoriesTemplate.svelte +35 -0
- package/src/Switcher/Switcher.mdx +13 -0
- package/src/Switcher/Switcher.stories.svelte +29 -41
- package/src/Switcher/Switcher.svelte +58 -51
- package/src/index.js +1 -0
- package/src/styles/base.scss +52 -5
- package/vitest.workspace.ts +32 -0
- package/src/Autocomplete/Autocomplete.stories.js +0 -61
- package/src/Container/Container.svelte +0 -12
- package/src/Container/index.js +0 -2
- package/src/styles/_typography.scss +0 -49
- package/src/styles/_vars.scss +0 -30
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Story, Meta, Primary, Controls, Stories} from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as SwictherStories from './Switcher.stories.svelte';
|
|
4
|
+
|
|
5
|
+
<Meta of={SwictherStories}/>
|
|
6
|
+
|
|
7
|
+
# Switcher
|
|
8
|
+
|
|
9
|
+
Radio-like form component to choose exactly one of a given set of options.
|
|
10
|
+
|
|
11
|
+
<Controls/>
|
|
12
|
+
|
|
13
|
+
<Stories/>
|
|
@@ -1,55 +1,43 @@
|
|
|
1
1
|
<script context="module">
|
|
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 {
|
|
6
|
-
userEvent,
|
|
7
|
-
within,
|
|
8
|
-
expect,
|
|
9
|
-
} from '@storybook/test';
|
|
10
|
-
|
|
11
|
-
const { Story } = defineMeta({
|
|
12
|
-
title: 'Input Components/Switcher',
|
|
13
|
-
argTypes: {
|
|
14
|
-
size: {control: "text"}
|
|
15
|
-
},
|
|
16
|
-
tags: ['autodocs'],
|
|
17
|
-
})
|
|
5
|
+
import { userEvent, within, expect } from '@storybook/test';
|
|
18
6
|
|
|
7
|
+
const { Story } = defineMeta({
|
|
8
|
+
title: 'Form/Switcher',
|
|
9
|
+
component: Switcher
|
|
10
|
+
});
|
|
19
11
|
</script>
|
|
20
12
|
|
|
21
13
|
<Story name="Two Options">
|
|
22
14
|
<DesignTokens>
|
|
23
|
-
|
|
24
|
-
options={["Option A", "Option B"]}
|
|
25
|
-
groupName="two-options"
|
|
26
|
-
value="Option A"
|
|
27
|
-
size="default"
|
|
28
|
-
label="Label"
|
|
29
|
-
/>
|
|
15
|
+
<Switcher options={['Option A', 'Option B']} value="Option A" size="default" label="Label" />
|
|
30
16
|
</DesignTokens>
|
|
31
17
|
</Story>
|
|
32
18
|
|
|
33
|
-
<Story
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
19
|
+
<Story
|
|
20
|
+
name="Four Options"
|
|
21
|
+
play={async ({ canvasElement, step }) => {
|
|
22
|
+
const canvas = within(canvasElement);
|
|
23
|
+
await step('Clicking selects the expected option', async () => {
|
|
24
|
+
const optionA = canvas.getByLabelText('Apples');
|
|
25
|
+
const optionB = canvas.getByLabelText('Bananas');
|
|
26
|
+
await userEvent.click(optionA);
|
|
27
|
+
expect(optionA).toBeChecked();
|
|
28
|
+
expect(optionB).not.toBeChecked();
|
|
29
|
+
await userEvent.click(optionB);
|
|
30
|
+
expect(optionB).toBeChecked();
|
|
31
|
+
expect(optionA).not.toBeChecked();
|
|
32
|
+
});
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
46
35
|
<DesignTokens>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/>
|
|
36
|
+
<Switcher
|
|
37
|
+
options={['Apples', 'Oranges', 'Bananas', 'Peaches']}
|
|
38
|
+
value="Oranges"
|
|
39
|
+
label="Label"
|
|
40
|
+
size="small"
|
|
41
|
+
/>
|
|
54
42
|
</DesignTokens>
|
|
55
43
|
</Story>
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
interface SwitcherProps {
|
|
3
|
+
/**
|
|
4
|
+
* Human-readable label
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Available options
|
|
9
|
+
*/
|
|
10
|
+
options: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Display size
|
|
13
|
+
*/
|
|
14
|
+
size?: 'default' | 'small';
|
|
15
|
+
/**
|
|
16
|
+
* The currently-selected option
|
|
17
|
+
*/
|
|
18
|
+
value: string | null;
|
|
19
|
+
}
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
export let size: string = 'default';
|
|
21
|
+
let { label, options, size = 'default', value = $bindable(null) }: SwitcherProps = $props();
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
const groupId = $props.id();
|
|
24
|
+
const groupName = 'select-' + groupId;
|
|
15
25
|
|
|
16
26
|
function optionToID(o: string) {
|
|
17
|
-
// TODO: This should use $id() when it comes out, so
|
|
18
|
-
// input IDs are guaranteed unique across the app
|
|
19
|
-
// See: https://github.com/sveltejs/svelte/issues/13108
|
|
20
27
|
return `${groupName}-option-${o.replace(/ /g, '-').toLowerCase()}`;
|
|
21
28
|
}
|
|
22
29
|
</script>
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
Radio-like form component to choose exactly one of a given set of options.
|
|
26
|
-
@component
|
|
27
|
-
-->
|
|
28
|
-
|
|
29
|
-
<fieldset class="container" class:small={size === "small"}>
|
|
31
|
+
<fieldset class="container" class:small={size === 'small'}>
|
|
30
32
|
<legend>{label}</legend>
|
|
31
33
|
<ul>
|
|
32
34
|
{#each options as o (o)}
|
|
33
35
|
<li class:is-selected={o === value}>
|
|
34
36
|
<label for={optionToID(o)}>
|
|
35
37
|
{o}
|
|
36
|
-
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
37
|
-
<path
|
|
38
|
-
d="M19.7054 6.29119C20.0969 6.68077 20.0984 7.31393 19.7088 7.7054L9.75697 17.7054C9.56928 17.894 9.31416 18 9.04809 18C8.78201 18 8.52691 17.8939 8.33925 17.7053L4.2911 13.6365C3.90157 13.245 3.90318 12.6118 4.2947 12.2223C4.68621 11.8327 5.31938 11.8344 5.7089 12.2259L9.04825 15.5823L18.2912 6.2946C18.6808 5.90314 19.3139 5.90161 19.7054 6.29119Z"
|
|
39
|
-
fill="currentColor"
|
|
40
|
-
/>
|
|
41
|
-
</svg>
|
|
42
38
|
</label>
|
|
43
39
|
<input id={optionToID(o)} name={groupName} value={o} type="radio" bind:group={value} />
|
|
44
40
|
</li>
|
|
@@ -47,6 +43,8 @@ Radio-like form component to choose exactly one of a given set of options.
|
|
|
47
43
|
</fieldset>
|
|
48
44
|
|
|
49
45
|
<style lang="scss">
|
|
46
|
+
@use '../styles/base.scss';
|
|
47
|
+
|
|
50
48
|
fieldset {
|
|
51
49
|
border: 0;
|
|
52
50
|
font-family: var(--swr-sans);
|
|
@@ -54,29 +52,34 @@ Radio-like form component to choose exactly one of a given set of options.
|
|
|
54
52
|
|
|
55
53
|
legend {
|
|
56
54
|
font-size: var(--fs-small-2);
|
|
57
|
-
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
margin-bottom: 0.35em;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
ul {
|
|
61
60
|
width: 100%;
|
|
62
61
|
display: flex;
|
|
63
|
-
flex-direction:
|
|
64
|
-
border-radius: var(--br-small);
|
|
62
|
+
flex-direction: column;
|
|
65
63
|
overflow: hidden;
|
|
66
64
|
padding: 0;
|
|
67
65
|
margin: 0;
|
|
68
|
-
overflow: hidden;
|
|
69
66
|
border: 1px solid currentColor;
|
|
67
|
+
border-radius: var(--br-small);
|
|
68
|
+
|
|
69
|
+
@media (min-width: base.$break-phone) {
|
|
70
|
+
flex-flow: row;
|
|
71
|
+
}
|
|
70
72
|
|
|
71
73
|
&:focus-within,
|
|
72
74
|
&:active {
|
|
73
|
-
outline:
|
|
75
|
+
outline: 2px solid var(--blue-light-2);
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
li {
|
|
77
79
|
display: contents;
|
|
78
80
|
&:last-child label {
|
|
79
81
|
border-right: 0;
|
|
82
|
+
border-bottom: 0;
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
input {
|
|
@@ -84,42 +87,46 @@ Radio-like form component to choose exactly one of a given set of options.
|
|
|
84
87
|
left: -999px;
|
|
85
88
|
}
|
|
86
89
|
.small label {
|
|
87
|
-
font-size: var(--fs-small-1)
|
|
90
|
+
font-size: var(--fs-small-1);
|
|
91
|
+
height: 2.25em;
|
|
92
|
+
padding: 0 0.65em;
|
|
88
93
|
}
|
|
89
94
|
label {
|
|
90
95
|
font-size: var(--fs-base);
|
|
91
|
-
height: 2.5em;
|
|
92
96
|
line-height: 1;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
padding: 0 1em;
|
|
93
99
|
cursor: pointer;
|
|
94
100
|
margin: 0;
|
|
95
|
-
flex-basis: 0;
|
|
96
|
-
flex-grow: 1;
|
|
97
101
|
align-items: center;
|
|
98
102
|
display: flex;
|
|
99
|
-
justify-content: center;
|
|
100
103
|
color: currentColor;
|
|
101
104
|
position: relative;
|
|
102
105
|
transition: var(--fast);
|
|
103
|
-
text-underline-offset: 0.
|
|
104
|
-
border-
|
|
106
|
+
text-underline-offset: 0.2em;
|
|
107
|
+
border-bottom: 1px solid currentColor;
|
|
108
|
+
height: 2.25em;
|
|
109
|
+
@media (min-width: base.$break-phone) {
|
|
110
|
+
justify-content: center;
|
|
111
|
+
padding: 0 1em;
|
|
112
|
+
flex-basis: 0;
|
|
113
|
+
flex-grow: 1;
|
|
114
|
+
border-right: 1px solid currentColor;
|
|
115
|
+
border-bottom: 0;
|
|
116
|
+
}
|
|
117
|
+
@media (min-width: base.$break-tablet) {
|
|
118
|
+
height: 2.5em;
|
|
119
|
+
}
|
|
105
120
|
&:hover,
|
|
106
121
|
&:focus-visible {
|
|
107
122
|
text-decoration: underline;
|
|
108
123
|
}
|
|
109
|
-
svg {
|
|
110
|
-
position: absolute;
|
|
111
|
-
left: 0.65em;
|
|
112
|
-
width: 1em;
|
|
113
|
-
height: auto;
|
|
114
|
-
opacity: 0;
|
|
115
|
-
transition: var(--fast);
|
|
116
|
-
display: block;
|
|
117
|
-
}
|
|
118
124
|
.is-selected & {
|
|
119
|
-
background:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
background: rgb(247, 247, 247);
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
box-shadow: inset 5px 0px 0 0 var(--violet-dark-5);
|
|
128
|
+
@media (min-width: base.$break-phone) {
|
|
129
|
+
box-shadow: inset 0 -3px 0 0 var(--violet-dark-5);
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
132
|
}
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { default as Input } from './Input/Input.svelte';
|
|
|
6
6
|
export { default as Button } from './Button/Button.svelte';
|
|
7
7
|
export { default as Select } from './Select/Select.svelte';
|
|
8
8
|
export { default as DesignTokens } from './DesignTokens/DesignTokens.svelte';
|
|
9
|
+
export { tokens as tokens } from './DesignTokens/index.js';
|
|
9
10
|
export { default as ChartHeader } from './ChartHeader/ChartHeader.svelte';
|
|
10
11
|
export { default as ChartFooter } from './ChartFooter/ChartFooter.svelte';
|
|
11
12
|
export { default as Middot } from './Middot/Middot.svelte';
|
package/src/styles/base.scss
CHANGED
|
@@ -1,8 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
$break-phone: 510px;
|
|
2
|
+
$break-tablet: 992px;
|
|
3
|
+
$break-desktop-small: 1200px;
|
|
4
|
+
$break-desktop-large: 1400px;
|
|
5
|
+
$break-desktop-xl: 1400px;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
// TODO drop everything below
|
|
8
|
+
|
|
9
|
+
%caption {
|
|
10
|
+
font-family: var(--swr-sans);
|
|
11
|
+
font-size: 0.9rem;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
letter-spacing: 0.0045em;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
%caption-bold {
|
|
17
|
+
@extend %caption;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
%form-label {
|
|
22
|
+
@extend %caption;
|
|
23
|
+
display: block;
|
|
24
|
+
margin-bottom: 0.5em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
%copy {
|
|
28
|
+
font-family: var(--swr-sans);
|
|
29
|
+
font-size: 1.1rem;
|
|
30
|
+
line-height: 1.45;
|
|
31
|
+
letter-spacing: 0.0045em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
%copy-bold {
|
|
35
|
+
@extend %copy;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
%form-input {
|
|
40
|
+
@extend %copy;
|
|
41
|
+
height: 2.5em;
|
|
42
|
+
width: 100%;
|
|
43
|
+
border: 1px solid currentColor;
|
|
44
|
+
border-radius: var(--br-small);
|
|
45
|
+
background: transparent;
|
|
46
|
+
padding: 0 0.5em;
|
|
47
|
+
padding-top: 0.1em;
|
|
48
|
+
color: currentColor;
|
|
5
49
|
margin: 0;
|
|
6
|
-
|
|
7
|
-
|
|
50
|
+
display: block;
|
|
51
|
+
text-size-adjust: none;
|
|
52
|
+
&:focus-visible {
|
|
53
|
+
outline: 4px solid rgba(white, 0.4);
|
|
54
|
+
}
|
|
8
55
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { defineWorkspace } from 'vitest/config';
|
|
5
|
+
|
|
6
|
+
import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';
|
|
7
|
+
|
|
8
|
+
const dirname =
|
|
9
|
+
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
// More info at: https://storybook.js.org/docs/writing-tests/test-addon
|
|
12
|
+
export default defineWorkspace([
|
|
13
|
+
'vite.config.ts',
|
|
14
|
+
{
|
|
15
|
+
extends: 'vite.config.ts',
|
|
16
|
+
plugins: [
|
|
17
|
+
// The plugin will run tests for the stories defined in your Storybook config
|
|
18
|
+
// See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
|
|
19
|
+
storybookTest({ configDir: path.join(dirname, '.storybook') })
|
|
20
|
+
],
|
|
21
|
+
test: {
|
|
22
|
+
name: 'storybook',
|
|
23
|
+
browser: {
|
|
24
|
+
enabled: true,
|
|
25
|
+
headless: true,
|
|
26
|
+
name: 'chromium',
|
|
27
|
+
provider: 'playwright'
|
|
28
|
+
},
|
|
29
|
+
setupFiles: ['.storybook/vitest.setup.ts']
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { userEvent, within, expect, fn } from "@storybook/test"
|
|
2
|
-
import AutoComplete from "./index.js"
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Example/Autocomplete",
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
component: AutoComplete,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const testData = ["Apples", "Oranges", "Pears", "Peaches", "Bananas"].map((el) => {
|
|
11
|
-
return {
|
|
12
|
-
value: el,
|
|
13
|
-
label: el,
|
|
14
|
-
details: {},
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export const Basic = {
|
|
19
|
-
args: {
|
|
20
|
-
data: testData,
|
|
21
|
-
query: "",
|
|
22
|
-
placeholder: "Select a fruit",
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const Test = {
|
|
27
|
-
parameters: {
|
|
28
|
-
docs: {
|
|
29
|
-
story: {
|
|
30
|
-
autoplay: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
args: {
|
|
35
|
-
data: testData,
|
|
36
|
-
query: "",
|
|
37
|
-
placeholder: "Select a fruit",
|
|
38
|
-
},
|
|
39
|
-
play: async ({ canvasElement, step }) => {
|
|
40
|
-
const canvas = within(canvasElement)
|
|
41
|
-
const input = canvas.getByTestId("autocomplete-input")
|
|
42
|
-
await step("Select using the mouse", async () => {
|
|
43
|
-
await userEvent.click(input)
|
|
44
|
-
expect(input).toHaveFocus()
|
|
45
|
-
await userEvent.keyboard("ba")
|
|
46
|
-
const bananasOption = canvas.getByText("Bananas")
|
|
47
|
-
await userEvent.click(bananasOption)
|
|
48
|
-
expect(input).toHaveValue("Bananas")
|
|
49
|
-
})
|
|
50
|
-
await userEvent.clear(input)
|
|
51
|
-
await step("Select using the keyboard", async () => {
|
|
52
|
-
await userEvent.click(input)
|
|
53
|
-
expect(input).toHaveFocus()
|
|
54
|
-
await userEvent.keyboard("ap")
|
|
55
|
-
await userEvent.keyboard("{ArrowDown}")
|
|
56
|
-
await userEvent.keyboard("{Enter}")
|
|
57
|
-
expect(input).toHaveValue("Apples")
|
|
58
|
-
})
|
|
59
|
-
await userEvent.clear(input)
|
|
60
|
-
},
|
|
61
|
-
}
|
package/src/Container/index.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
%caption {
|
|
2
|
-
font-family: $swr-sans;
|
|
3
|
-
font-size: 0.9rem;
|
|
4
|
-
line-height: 1;
|
|
5
|
-
letter-spacing: 0.0045em;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
%caption-bold {
|
|
9
|
-
@extend %caption;
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
%form-label {
|
|
14
|
-
@extend %caption;
|
|
15
|
-
display: block;
|
|
16
|
-
margin-bottom: 0.5em;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
%copy {
|
|
20
|
-
font-family: $swr-sans;
|
|
21
|
-
font-size: 1.1rem;
|
|
22
|
-
line-height: 1.45;
|
|
23
|
-
letter-spacing: 0.0045em;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
%copy-bold {
|
|
27
|
-
@extend %copy;
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
%form-input {
|
|
32
|
-
@extend %copy;
|
|
33
|
-
height: $input-height;
|
|
34
|
-
width: 100%;
|
|
35
|
-
border: 1px solid currentColor;
|
|
36
|
-
border-radius: $border-radius-input;
|
|
37
|
-
background: transparent;
|
|
38
|
-
padding: 0 0.5em;
|
|
39
|
-
padding-top: 0.1em;
|
|
40
|
-
color: currentColor;
|
|
41
|
-
height: $input-height;
|
|
42
|
-
margin: 0;
|
|
43
|
-
display: block;
|
|
44
|
-
width: 100%;
|
|
45
|
-
text-size-adjust: none;
|
|
46
|
-
&:focus-visible {
|
|
47
|
-
outline: 4px solid rgba(white, 0.4);
|
|
48
|
-
}
|
|
49
|
-
}
|
package/src/styles/_vars.scss
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
$color-black: #0c0c0c;
|
|
2
|
-
$color-violetblue: #1d0b40;
|
|
3
|
-
$color-violetblue-hover: #2d155d;
|
|
4
|
-
$color-violet: #5920c0;
|
|
5
|
-
$color-blue: #3053d9;
|
|
6
|
-
$color-warmgrey: #dbd5cd;
|
|
7
|
-
$color-activeorange: #ff3300;
|
|
8
|
-
|
|
9
|
-
$border-radius-container: 8px;
|
|
10
|
-
$border-radius-input: 4px;
|
|
11
|
-
$input-height: 2.5rem;
|
|
12
|
-
$app-max-width: 40rem;
|
|
13
|
-
|
|
14
|
-
$swr-sans: 'SWR-VAR-Sans', serif;
|
|
15
|
-
$swr-text: 'SWR-VAR-Text', serif;
|
|
16
|
-
|
|
17
|
-
$transition-fast: 150ms;
|
|
18
|
-
|
|
19
|
-
// Breakpoints
|
|
20
|
-
$break-phone: 510px;
|
|
21
|
-
$break-tablet: 992px;
|
|
22
|
-
$break-desktop-small: 1200px;
|
|
23
|
-
$break-desktop-large: 1400px;
|
|
24
|
-
$break-desktop-xl: 1400px;
|
|
25
|
-
|
|
26
|
-
@mixin bp($point) {
|
|
27
|
-
@media (min-width: $point) {
|
|
28
|
-
@content;
|
|
29
|
-
}
|
|
30
|
-
}
|