@swr-data-lab/components 1.13.0 → 1.13.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/Autocomplete/Autocomplete.stories.svelte.d.ts +27 -0
- package/dist/Autocomplete/Autocomplete.svelte +237 -0
- package/dist/Autocomplete/Autocomplete.svelte.d.ts +34 -0
- package/dist/Autocomplete/index.d.ts +2 -0
- package/dist/Button/Button.stories.svelte +19 -0
- package/dist/Button/Button.stories.svelte.d.ts +19 -0
- package/dist/Button/Button.svelte +38 -0
- package/dist/Button/Button.svelte.d.ts +10 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Caption/Caption.stories.svelte.d.ts +27 -0
- package/dist/Caption/Caption.svelte +21 -0
- package/dist/Caption/Caption.svelte.d.ts +8 -0
- package/dist/Caption/index.js +2 -0
- package/dist/Card/Card.stories.svelte +17 -0
- package/dist/Card/Card.stories.svelte.d.ts +19 -0
- package/dist/Card/Card.svelte +25 -0
- package/dist/Card/Card.svelte.d.ts +7 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/ChartFooter/ChartFooter.stories.svelte.d.ts +27 -0
- package/dist/ChartFooter/ChartFooter.svelte +38 -0
- package/dist/ChartFooter/ChartFooter.svelte.d.ts +8 -0
- package/dist/ChartFooter/index.d.ts +2 -0
- package/dist/ChartHeader/ChartHeader.stories.svelte.d.ts +27 -0
- package/{src → dist}/ChartHeader/ChartHeader.svelte +4 -12
- package/dist/ChartHeader/ChartHeader.svelte.d.ts +9 -0
- package/dist/ChartHeader/index.d.ts +2 -0
- package/dist/ChartList/ChartList.stories.svelte.d.ts +27 -0
- package/{src → dist}/ChartList/ChartList.svelte +2 -16
- package/dist/ChartList/ChartList.svelte.d.ts +14 -0
- package/dist/ChartList/index.js +2 -0
- package/dist/Copy/Copy.stories.svelte.d.ts +27 -0
- package/dist/Copy/Copy.svelte +21 -0
- package/dist/Copy/Copy.svelte.d.ts +8 -0
- package/dist/Copy/index.js +2 -0
- package/dist/DesignTokens/DesignTokens.svelte +58 -0
- package/dist/DesignTokens/DesignTokens.svelte.d.ts +7 -0
- package/dist/DesignTokens/Tokens.d.ts +26 -0
- package/dist/DesignTokens/Tokens.js +171 -0
- package/dist/DesignTokens/index.d.ts +8 -0
- package/dist/FormLabel/FormLabel.stories.svelte.d.ts +27 -0
- package/{src → dist}/FormLabel/FormLabel.svelte +2 -9
- package/dist/FormLabel/FormLabel.svelte.d.ts +9 -0
- package/dist/FormLabel/index.js +2 -0
- package/dist/Headline/Headline.stories.svelte.d.ts +27 -0
- package/{src → dist}/Headline/Headline.svelte +2 -7
- package/dist/Headline/Headline.svelte.d.ts +7 -0
- package/dist/Headline/index.js +2 -0
- package/{src → dist}/HighlightCard/HighlightCard.stories.svelte +7 -9
- package/dist/HighlightCard/HighlightCard.stories.svelte.d.ts +19 -0
- package/dist/HighlightCard/HighlightCard.svelte +54 -0
- package/dist/HighlightCard/HighlightCard.svelte.d.ts +9 -0
- package/dist/HighlightCard/index.d.ts +2 -0
- package/dist/Input/Input.svelte +32 -0
- package/dist/Input/Input.svelte.d.ts +23 -0
- package/dist/Input/index.d.ts +2 -0
- package/dist/Logotype/Logotype.stories.svelte +14 -0
- package/dist/Logotype/Logotype.stories.svelte.d.ts +19 -0
- package/dist/Logotype/Logotype.svelte.d.ts +26 -0
- package/dist/Middot/Middot.stories.svelte +14 -0
- package/dist/Middot/Middot.stories.svelte.d.ts +19 -0
- package/dist/Middot/Middot.svelte.d.ts +26 -0
- package/dist/Middot/index.d.ts +2 -0
- package/dist/Note/Note.stories.svelte.d.ts +27 -0
- package/dist/Note/Note.svelte +28 -0
- package/dist/Note/Note.svelte.d.ts +7 -0
- package/dist/Note/index.js +2 -0
- package/{src → dist}/Select/Select.stories.svelte +12 -15
- package/dist/Select/Select.stories.svelte.d.ts +19 -0
- package/dist/Select/Select.svelte +39 -0
- package/dist/Select/Select.svelte.d.ts +4 -0
- package/{src/Select/Select.types.ts → dist/Select/Select.types.d.ts} +1 -2
- package/dist/Select/Select.types.js +1 -0
- package/dist/Select/SelectStoriesTemplate.svelte.d.ts +15 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/Switcher/Switcher.stories.svelte.d.ts +27 -0
- package/dist/Switcher/Switcher.svelte +111 -0
- package/dist/Switcher/Switcher.svelte.d.ts +21 -0
- package/dist/Switcher/index.d.ts +2 -0
- package/dist/assets/close-circle.svg.svelte.d.ts +26 -0
- package/dist/assets/grow.svg.svelte.d.ts +26 -0
- package/dist/assets/hand-pointer.svg.svelte.d.ts +26 -0
- package/dist/assets/shrink.svg.svelte.d.ts +26 -0
- package/dist/assets/tap.svg.svelte.d.ts +26 -0
- package/dist/assets/times-circle-solid.svg.svelte.d.ts +26 -0
- package/dist/index.d.ts +29 -0
- package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte +27 -0
- package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte.d.ts +19 -0
- package/dist/maplibre/AttributionControl/AttributionControl.svelte +15 -0
- package/dist/maplibre/AttributionControl/AttributionControl.svelte.d.ts +8 -0
- package/dist/maplibre/AttributionControl/index.d.ts +2 -0
- package/dist/maplibre/GeocoderControl/GeocoderAPIs.d.ts +6 -0
- package/dist/maplibre/GeocoderControl/GeocoderAPIs.js +40 -0
- package/{src → dist}/maplibre/GeocoderControl/GeocoderControl.stories.svelte +10 -14
- package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte.d.ts +19 -0
- package/dist/maplibre/GeocoderControl/GeocoderControl.svelte +25 -0
- package/dist/maplibre/GeocoderControl/GeocoderControl.svelte.d.ts +27 -0
- package/dist/maplibre/GeocoderControl/index.d.ts +2 -0
- package/dist/maplibre/Map/FallbackStyle.d.ts +3 -0
- package/dist/maplibre/Map/FallbackStyle.js +15 -0
- package/{src → dist}/maplibre/Map/Map.stories.svelte +19 -24
- package/dist/maplibre/Map/Map.stories.svelte.d.ts +19 -0
- package/dist/maplibre/Map/Map.svelte +91 -0
- package/dist/maplibre/Map/Map.svelte.d.ts +23 -0
- package/dist/maplibre/Map/index.d.ts +2 -0
- package/dist/maplibre/MapControl/MapControl.stories.svelte +46 -0
- package/dist/maplibre/MapControl/MapControl.stories.svelte.d.ts +19 -0
- package/dist/maplibre/MapControl/MapControl.svelte +29 -0
- package/dist/maplibre/MapControl/MapControl.svelte.d.ts +11 -0
- package/dist/maplibre/MapControl/index.d.ts +2 -0
- package/dist/maplibre/MapStyle/SWRDataLabLight.d.ts +3 -0
- package/dist/maplibre/MapStyle/SWRDataLabLight.js +60 -0
- package/{src → dist}/maplibre/MapStyle/SWRDataLabLight.stories.svelte +10 -12
- package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte.d.ts +18 -0
- package/dist/maplibre/MapStyle/components/Admin.d.ts +1 -0
- package/dist/maplibre/MapStyle/components/Admin.js +170 -0
- package/dist/maplibre/MapStyle/components/Buildings.d.ts +1 -0
- package/dist/maplibre/MapStyle/components/Buildings.js +21 -0
- package/dist/maplibre/MapStyle/components/Landuse.d.ts +1 -0
- package/dist/maplibre/MapStyle/components/Landuse.js +497 -0
- package/dist/maplibre/MapStyle/components/Natural.d.ts +1 -0
- package/dist/maplibre/MapStyle/components/Natural.js +1 -0
- package/dist/maplibre/MapStyle/components/PlaceLabels.d.ts +4 -0
- package/dist/maplibre/MapStyle/components/PlaceLabels.js +194 -0
- package/dist/maplibre/MapStyle/components/Roads.d.ts +8 -0
- package/dist/maplibre/MapStyle/components/Roads.js +2327 -0
- package/dist/maplibre/MapStyle/components/Transit.d.ts +7 -0
- package/dist/maplibre/MapStyle/components/Transit.js +499 -0
- package/dist/maplibre/MapStyle/components/Walking.d.ts +1 -0
- package/dist/maplibre/MapStyle/components/Walking.js +1530 -0
- package/dist/maplibre/MapStyle/index.d.ts +2 -0
- package/dist/maplibre/MapStyle/tokens.d.ts +20 -0
- package/dist/maplibre/MapStyle/tokens.js +20 -0
- package/{src → dist}/maplibre/NavigationControl/NavigationControl.stories.svelte +9 -11
- package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte.d.ts +19 -0
- package/dist/maplibre/NavigationControl/NavigationControl.svelte +9 -0
- package/dist/maplibre/NavigationControl/NavigationControl.svelte.d.ts +12 -0
- package/dist/maplibre/NavigationControl/index.d.ts +2 -0
- package/{src → dist}/maplibre/ScaleControl/ScaleControl.stories.svelte +10 -13
- package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte.d.ts +19 -0
- package/dist/maplibre/ScaleControl/ScaleControl.svelte +9 -0
- package/dist/maplibre/ScaleControl/ScaleControl.svelte.d.ts +9 -0
- package/dist/maplibre/ScaleControl/index.d.ts +2 -0
- package/dist/maplibre/Source/MapSource.stories.svelte +7 -0
- package/dist/maplibre/Source/MapSource.stories.svelte.d.ts +19 -0
- package/dist/maplibre/Source/MapSource.svelte +43 -0
- package/dist/maplibre/Source/MapSource.svelte.d.ts +13 -0
- package/dist/maplibre/Source/index.d.ts +2 -0
- package/dist/maplibre/Source/source.d.ts +28 -0
- package/dist/maplibre/Source/source.js +76 -0
- package/{src → dist}/maplibre/Tooltip/Tooltip.stories.svelte +17 -23
- package/dist/maplibre/Tooltip/Tooltip.stories.svelte.d.ts +19 -0
- package/dist/maplibre/Tooltip/Tooltip.svelte +46 -0
- package/dist/maplibre/Tooltip/Tooltip.svelte.d.ts +25 -0
- package/dist/maplibre/Tooltip/index.d.ts +2 -0
- package/{src → dist}/maplibre/VectorLayer/VectorLayer.stories.svelte +11 -14
- package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte.d.ts +19 -0
- package/dist/maplibre/VectorLayer/VectorLayer.svelte +73 -0
- package/dist/maplibre/VectorLayer/VectorLayer.svelte.d.ts +21 -0
- package/dist/maplibre/VectorLayer/index.d.ts +2 -0
- package/{src → dist}/maplibre/VectorTileSource/VectorTileSource.stories.svelte +11 -13
- package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte.d.ts +19 -0
- package/dist/maplibre/VectorTileSource/VectorTileSource.svelte +13 -0
- package/dist/maplibre/VectorTileSource/VectorTileSource.svelte.d.ts +11 -0
- package/dist/maplibre/VectorTileSource/index.d.ts +2 -0
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +27 -0
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte.d.ts +19 -0
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte +44 -0
- package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte.d.ts +19 -0
- package/dist/maplibre/WithLinkLocation/index.d.ts +2 -0
- package/dist/maplibre/context.svelte.d.ts +33 -0
- package/dist/maplibre/context.svelte.js +73 -0
- package/{src/maplibre/types.ts → dist/maplibre/types.d.ts} +3 -5
- package/dist/maplibre/types.js +1 -0
- package/dist/maplibre/utils.d.ts +4 -0
- package/dist/maplibre/utils.js +34 -0
- package/dist/utils/formatDate.d.ts +5 -0
- package/dist/utils/formatNumber.d.ts +18 -0
- package/dist/utils/getColorsBetween.d.ts +9 -0
- package/dist/utils/getComparisonDiffs.d.ts +6 -0
- package/dist/utils/getEmbedContext.d.ts +7 -0
- package/dist/utils/getEmbedContext.js +27 -0
- package/dist/utils/getLaenderFromTopo.d.ts +10 -0
- package/dist/utils/getLaenderNicenameFromAgs.d.ts +7 -0
- package/dist/utils/isSvelteComponent.d.ts +7 -0
- package/dist/utils/prepareSophoraModel.d.ts +2 -0
- package/dist/utils/scrollIntoViewWithOffset.d.ts +7 -0
- package/dist/utils/slugify.d.ts +1 -0
- package/dist/utils/slugify.js +11 -0
- package/dist/utils/topoToGeo.d.ts +7 -0
- package/package.json +30 -7
- package/.storybook/blocks/Mermaid.jsx +0 -9
- package/.storybook/main.ts +0 -34
- package/.storybook/preview-head.html +0 -13
- package/.storybook/preview.ts +0 -47
- package/.storybook/vitest.setup.ts +0 -9
- package/src/Autocomplete/Autocomplete.svelte +0 -237
- package/src/Button/Button.stories.svelte +0 -21
- package/src/Button/Button.svelte +0 -52
- package/src/Caption/Caption.svelte +0 -29
- package/src/Card/Card.stories.svelte +0 -19
- package/src/Card/Card.svelte +0 -34
- package/src/ChartFooter/ChartFooter.svelte +0 -46
- package/src/Copy/Copy.svelte +0 -29
- package/src/DesignTokens/DesignTokens.svelte +0 -71
- package/src/DesignTokens/Tokens.ts +0 -186
- package/src/HighlightCard/HighlightCard.svelte +0 -65
- package/src/Input/Input.svelte +0 -21
- package/src/Logotype/Logotype.stories.svelte +0 -16
- package/src/Middot/Middot.stories.svelte +0 -16
- package/src/Note/Note.svelte +0 -38
- package/src/Select/Select.svelte +0 -76
- package/src/Switcher/Switcher.svelte +0 -130
- package/src/maplibre/AttributionControl/AttributionControl.stories.svelte +0 -29
- package/src/maplibre/AttributionControl/AttributionControl.svelte +0 -45
- package/src/maplibre/GeocoderControl/GeocoderAPIs.ts +0 -49
- package/src/maplibre/GeocoderControl/GeocoderControl.svelte +0 -211
- package/src/maplibre/Map/FallbackStyle.ts +0 -18
- package/src/maplibre/Map/Map.svelte +0 -287
- package/src/maplibre/MapControl/MapControl.stories.svelte +0 -56
- package/src/maplibre/MapControl/MapControl.svelte +0 -41
- package/src/maplibre/MapStyle/SWRDataLabLight.ts +0 -72
- package/src/maplibre/MapStyle/components/Admin.ts +0 -173
- package/src/maplibre/MapStyle/components/Buildings.ts +0 -23
- package/src/maplibre/MapStyle/components/Landuse.ts +0 -499
- package/src/maplibre/MapStyle/components/Natural.ts +0 -1
- package/src/maplibre/MapStyle/components/PlaceLabels.ts +0 -199
- package/src/maplibre/MapStyle/components/Roads.ts +0 -2345
- package/src/maplibre/MapStyle/components/Transit.ts +0 -507
- package/src/maplibre/MapStyle/components/Walking.ts +0 -1538
- package/src/maplibre/MapStyle/tokens.ts +0 -21
- package/src/maplibre/NavigationControl/NavigationControl.svelte +0 -36
- package/src/maplibre/ScaleControl/ScaleControl.svelte +0 -25
- package/src/maplibre/Source/MapSource.stories.svelte +0 -9
- package/src/maplibre/Source/MapSource.svelte +0 -61
- package/src/maplibre/Source/source.ts +0 -89
- package/src/maplibre/Tooltip/Tooltip.svelte +0 -183
- package/src/maplibre/VectorLayer/VectorLayer.svelte +0 -146
- package/src/maplibre/VectorTileSource/VectorTileSource.svelte +0 -24
- package/src/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +0 -29
- package/src/maplibre/WithLinkLocation/WithLinkLocation.svelte +0 -83
- package/src/maplibre/context.svelte.ts +0 -89
- package/src/maplibre/utils.ts +0 -52
- package/src/utils/getEmbedContext.js +0 -28
- package/src/utils/slugify.ts +0 -12
- package/static/favicon.png +0 -0
- package/svelte.config.js +0 -18
- package/tsconfig.json +0 -19
- package/vite.config.ts +0 -6
- package/vitest.workspace.ts +0 -32
- /package/{src → dist}/Autocomplete/Autocomplete.stories.svelte +0 -0
- /package/{src → dist}/Autocomplete/index.js +0 -0
- /package/{src → dist}/Button/index.js +0 -0
- /package/{src → dist}/Caption/Caption.stories.svelte +0 -0
- /package/{src/Caption/index.ts → dist/Caption/index.d.ts} +0 -0
- /package/{src → dist}/Card/index.js +0 -0
- /package/{src → dist}/ChartFooter/ChartFooter.mdx +0 -0
- /package/{src → dist}/ChartFooter/ChartFooter.stories.svelte +0 -0
- /package/{src → dist}/ChartFooter/index.js +0 -0
- /package/{src → dist}/ChartHeader/ChartHeader.mdx +0 -0
- /package/{src → dist}/ChartHeader/ChartHeader.stories.svelte +0 -0
- /package/{src → dist}/ChartHeader/index.js +0 -0
- /package/{src → dist}/ChartList/ChartList.mdx +0 -0
- /package/{src → dist}/ChartList/ChartList.stories.svelte +0 -0
- /package/{src/ChartList/index.ts → dist/ChartList/index.d.ts} +0 -0
- /package/{src → dist}/Copy/Copy.stories.svelte +0 -0
- /package/{src/Copy/index.ts → dist/Copy/index.d.ts} +0 -0
- /package/{src → dist}/DesignTokens/DesignTokens.mdx +0 -0
- /package/{src → dist}/DesignTokens/index.js +0 -0
- /package/{src → dist}/FormLabel/FormLabel.mdx +0 -0
- /package/{src → dist}/FormLabel/FormLabel.stories.svelte +0 -0
- /package/{src/FormLabel/index.ts → dist/FormLabel/index.d.ts} +0 -0
- /package/{src → dist}/Headline/Headline.stories.svelte +0 -0
- /package/{src/Headline/index.ts → dist/Headline/index.d.ts} +0 -0
- /package/{src → dist}/HighlightCard/index.js +0 -0
- /package/{src → dist}/Input/index.js +0 -0
- /package/{src → dist}/Intro.mdx +0 -0
- /package/{src → dist}/Logotype/Logotype.svelte +0 -0
- /package/{src → dist}/Middot/Middot.svelte +0 -0
- /package/{src → dist}/Middot/index.js +0 -0
- /package/{src → dist}/Note/Note.stories.svelte +0 -0
- /package/{src/Note/index.ts → dist/Note/index.d.ts} +0 -0
- /package/{src → dist}/Select/Select.mdx +0 -0
- /package/{src → dist}/Select/SelectStoriesTemplate.svelte +0 -0
- /package/{src → dist}/Select/index.js +0 -0
- /package/{src → dist}/Select/mock_data/jobs.json +0 -0
- /package/{src → dist}/Switcher/Switcher.mdx +0 -0
- /package/{src → dist}/Switcher/Switcher.stories.svelte +0 -0
- /package/{src → dist}/Switcher/index.js +0 -0
- /package/{src → dist}/app.d.ts +0 -0
- /package/{src → dist}/app.html +0 -0
- /package/{src → dist}/assets/close-circle.svg.svelte +0 -0
- /package/{src → dist}/assets/grow.svg.svelte +0 -0
- /package/{src → dist}/assets/hand-pointer.svg.svelte +0 -0
- /package/{src → dist}/assets/shrink.svg.svelte +0 -0
- /package/{src → dist}/assets/tap.svg.svelte +0 -0
- /package/{src → dist}/assets/times-circle-solid.svg.svelte +0 -0
- /package/{src → dist}/index.js +0 -0
- /package/{src → dist}/maplibre/AttributionControl/index.js +0 -0
- /package/{src → dist}/maplibre/GeocoderControl/index.js +0 -0
- /package/{src → dist}/maplibre/Map/index.js +0 -0
- /package/{src → dist}/maplibre/MapControl/MapControl.mdx +0 -0
- /package/{src → dist}/maplibre/MapControl/index.js +0 -0
- /package/{src → dist}/maplibre/MapStyle/SWRDataLabLight.mdx +0 -0
- /package/{src → dist}/maplibre/MapStyle/index.js +0 -0
- /package/{src → dist}/maplibre/Maplibre.mdx +0 -0
- /package/{src → dist}/maplibre/NavigationControl/index.js +0 -0
- /package/{src → dist}/maplibre/ScaleControl/index.js +0 -0
- /package/{src → dist}/maplibre/Source/index.js +0 -0
- /package/{src → dist}/maplibre/Tooltip/index.js +0 -0
- /package/{src → dist}/maplibre/VectorLayer/index.js +0 -0
- /package/{src → dist}/maplibre/VectorTileSource/VectorTileSource.mdx +0 -0
- /package/{src → dist}/maplibre/VectorTileSource/index.js +0 -0
- /package/{src → dist}/maplibre/WithLinkLocation/WithLinkLocation.mdx +0 -0
- /package/{src → dist}/maplibre/WithLinkLocation/index.js +0 -0
- /package/{src → dist}/styles/base.scss +0 -0
- /package/{src → dist}/utils/formatDate.js +0 -0
- /package/{src → dist}/utils/formatNumber.js +0 -0
- /package/{src → dist}/utils/getColorsBetween.js +0 -0
- /package/{src → dist}/utils/getComparisonDiffs.js +0 -0
- /package/{src → dist}/utils/getLaenderFromTopo.js +0 -0
- /package/{src → dist}/utils/getLaenderNicenameFromAgs.js +0 -0
- /package/{src → dist}/utils/isSvelteComponent.js +0 -0
- /package/{src → dist}/utils/prepareSophoraModel.js +0 -0
- /package/{src → dist}/utils/scrollIntoViewWithOffset.js +0 -0
- /package/{src → dist}/utils/topoToGeo.js +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { shades } from './Tokens';
|
|
4
|
-
|
|
5
|
-
interface DesignTokensProps {
|
|
6
|
-
children?: Snippet;
|
|
7
|
-
}
|
|
8
|
-
let { children }: DesignTokensProps = $props();
|
|
9
|
-
|
|
10
|
-
const rules = [
|
|
11
|
-
...Object.keys(shades).map((key) => {
|
|
12
|
-
return Object.entries(shades[key])
|
|
13
|
-
.map(([shade, value]) => {
|
|
14
|
-
const [ldb, index] = shade.split(/(\d+)/);
|
|
15
|
-
return ldb === 'base'
|
|
16
|
-
? `--${key}-${ldb}: ${value}`
|
|
17
|
-
: `--${key}-${ldb}-${index}: ${value}`;
|
|
18
|
-
})
|
|
19
|
-
.join(';');
|
|
20
|
-
})
|
|
21
|
-
];
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class="container" style={rules.join(';')}>
|
|
25
|
-
{#if children}
|
|
26
|
-
{@render children()}
|
|
27
|
-
{/if}
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<style lang="scss">
|
|
31
|
-
@use '../styles/base.scss';
|
|
32
|
-
|
|
33
|
-
:global(*) {
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.container {
|
|
39
|
-
display: contents;
|
|
40
|
-
--fast: 150ms;
|
|
41
|
-
--slow: 300ms;
|
|
42
|
-
--app-max-width: 40rem;
|
|
43
|
-
--br-large: 8px;
|
|
44
|
-
--br-small: 4px;
|
|
45
|
-
--input-height: 2.5rem;
|
|
46
|
-
--swr-text: 'SWR-VAR-Text', sans-serif;
|
|
47
|
-
--swr-sans: 'SWR-VAR-Sans', sans-serif;
|
|
48
|
-
|
|
49
|
-
// Type scale copied 1:1 from swr.de
|
|
50
|
-
|
|
51
|
-
--fs-small-3: 0.75rem;
|
|
52
|
-
--fs-small-2: 0.875rem;
|
|
53
|
-
--fs-small-1: 1rem;
|
|
54
|
-
--fs-base: 1.125rem;
|
|
55
|
-
--fs-large-1: 1.25rem;
|
|
56
|
-
--fs-large-2: 1.5rem;
|
|
57
|
-
--fs-large-3: 1.75rem;
|
|
58
|
-
--fs-large-4: 2.25rem;
|
|
59
|
-
|
|
60
|
-
@media (min-width: base.$bp-m) {
|
|
61
|
-
--fs-small-3: 0.75rem;
|
|
62
|
-
--fs-small-2: 0.875rem;
|
|
63
|
-
--fs-small-1: 1rem;
|
|
64
|
-
--fs-base: 1.25rem;
|
|
65
|
-
--fs-large-1: 1.5rem;
|
|
66
|
-
--fs-large-2: 2rem;
|
|
67
|
-
--fs-large-3: 2.5rem;
|
|
68
|
-
--fs-large-4: 3.5rem;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
interface ColourMap {
|
|
2
|
-
[index: string]: ColourPalette | ColourList;
|
|
3
|
-
}
|
|
4
|
-
interface ColourPalette {
|
|
5
|
-
[index: string]: string;
|
|
6
|
-
}
|
|
7
|
-
interface ColourList {
|
|
8
|
-
[index: number]: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const shades: ColourMap = {
|
|
12
|
-
violet: {
|
|
13
|
-
light5: '#f3eefa',
|
|
14
|
-
light4: '#e5dbf5',
|
|
15
|
-
light3: '#d4c5ee',
|
|
16
|
-
light2: '#bba4e5',
|
|
17
|
-
light1: '#9670db',
|
|
18
|
-
base: '#8257D1',
|
|
19
|
-
dark1: '#7f4cdf',
|
|
20
|
-
dark2: '#6830cf',
|
|
21
|
-
dark3: '#441993',
|
|
22
|
-
dark4: '#301268',
|
|
23
|
-
dark5: '#1D0B40'
|
|
24
|
-
},
|
|
25
|
-
red: {
|
|
26
|
-
light5: '#ffcfcc',
|
|
27
|
-
light4: '#FFB9A8',
|
|
28
|
-
light3: '#FF9B82',
|
|
29
|
-
light2: '#FF7957',
|
|
30
|
-
light1: '#FF4D20',
|
|
31
|
-
base: '#E92F02',
|
|
32
|
-
dark1: '#C52A04',
|
|
33
|
-
dark2: '#A22406',
|
|
34
|
-
dark3: '#801F09',
|
|
35
|
-
dark4: '#5F1A0B',
|
|
36
|
-
dark5: '#3F150D'
|
|
37
|
-
},
|
|
38
|
-
teal: {
|
|
39
|
-
light5: '#E5FBFF',
|
|
40
|
-
light4: '#B9EDF6',
|
|
41
|
-
light3: '#8CDEEC',
|
|
42
|
-
light2: '#5BCFE1',
|
|
43
|
-
light1: '#26BED6',
|
|
44
|
-
base: '#07ABC5',
|
|
45
|
-
dark1: '#0698B0',
|
|
46
|
-
dark2: '#04859C',
|
|
47
|
-
dark3: '#037389',
|
|
48
|
-
dark4: '#016275',
|
|
49
|
-
dark5: '#005163'
|
|
50
|
-
},
|
|
51
|
-
yellow: {
|
|
52
|
-
light1: '#FFFDB2',
|
|
53
|
-
light2: '#FEF67C',
|
|
54
|
-
light3: '#FDEF3E',
|
|
55
|
-
light4: '#FAE617',
|
|
56
|
-
light5: '#F5DF13',
|
|
57
|
-
base: '#EFD710',
|
|
58
|
-
dark1: '#E3CA0D',
|
|
59
|
-
dark2: '#DCC10A',
|
|
60
|
-
dark3: '#D1B406',
|
|
61
|
-
dark4: '#C9AC03',
|
|
62
|
-
dark5: '#C2A300'
|
|
63
|
-
},
|
|
64
|
-
forest: {
|
|
65
|
-
light5: '#EFFBE9',
|
|
66
|
-
light4: '#CEE9D1',
|
|
67
|
-
light3: '#ADD6BA',
|
|
68
|
-
light2: '#8CC4A3',
|
|
69
|
-
light1: '#6BB28B',
|
|
70
|
-
base: '#499F73',
|
|
71
|
-
dark1: '#278D5B',
|
|
72
|
-
dark2: '#137848',
|
|
73
|
-
dark3: '#0C643A',
|
|
74
|
-
dark4: '#06502D',
|
|
75
|
-
dark5: '#003D20'
|
|
76
|
-
},
|
|
77
|
-
pink: {
|
|
78
|
-
light5: '#FFCCF5',
|
|
79
|
-
light4: '#FFADE7',
|
|
80
|
-
light3: '#FF8CD7',
|
|
81
|
-
light2: '#FF66C6',
|
|
82
|
-
light1: '#FF30AC',
|
|
83
|
-
base: '#E9028D',
|
|
84
|
-
dark1: '#C7047F',
|
|
85
|
-
dark2: '#A50771',
|
|
86
|
-
dark3: '#830963',
|
|
87
|
-
dark4: '#620B55',
|
|
88
|
-
dark5: '#400E47'
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
orange: {
|
|
92
|
-
light5: '#FFEECC',
|
|
93
|
-
light4: '#FFD584',
|
|
94
|
-
light3: '#FFBA35',
|
|
95
|
-
light2: '#F4A101',
|
|
96
|
-
light1: '#DA8F03',
|
|
97
|
-
base: '#C17D05',
|
|
98
|
-
dark1: '#A86C07',
|
|
99
|
-
dark2: '#905B09',
|
|
100
|
-
dark3: '#794B0B',
|
|
101
|
-
dark4: '#623B0D',
|
|
102
|
-
dark5: '#4C2C0F'
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
plum: {
|
|
106
|
-
light5: '#F1CCFF',
|
|
107
|
-
light4: '#E9AEFF',
|
|
108
|
-
light3: '#E08EFF',
|
|
109
|
-
light2: '#D76CFF',
|
|
110
|
-
light1: '#CB42FF',
|
|
111
|
-
base: '#B600FB',
|
|
112
|
-
dark1: '#9903D4',
|
|
113
|
-
dark2: '#7C05AE',
|
|
114
|
-
dark3: '#610889',
|
|
115
|
-
dark4: '#450A65',
|
|
116
|
-
dark5: '#400E47'
|
|
117
|
-
},
|
|
118
|
-
apple: {
|
|
119
|
-
light5: '#EFFBEA',
|
|
120
|
-
light4: '#C5F0B1',
|
|
121
|
-
light3: '#98E472',
|
|
122
|
-
light2: '#65D62B',
|
|
123
|
-
light1: '#5BC128',
|
|
124
|
-
base: '#53AD26',
|
|
125
|
-
dark1: '#4A9825',
|
|
126
|
-
dark2: '#438523',
|
|
127
|
-
dark3: '#3B7122',
|
|
128
|
-
dark4: '#335E20',
|
|
129
|
-
dark5: '#2C4C1F'
|
|
130
|
-
},
|
|
131
|
-
blue: {
|
|
132
|
-
light5: '#CCDCFF',
|
|
133
|
-
light4: '#B1C5F9',
|
|
134
|
-
light3: '#97AEF2',
|
|
135
|
-
light2: '#7D97EC',
|
|
136
|
-
light1: '#6280E5',
|
|
137
|
-
base: '#4768DF',
|
|
138
|
-
dark1: '#2F51D2',
|
|
139
|
-
dark2: '#2A3FAC',
|
|
140
|
-
dark3: '#262D87',
|
|
141
|
-
dark4: '#211C64',
|
|
142
|
-
dark5: '#1D0B40'
|
|
143
|
-
},
|
|
144
|
-
gray: {
|
|
145
|
-
light5: 'hsl(225, 2%, 95%)',
|
|
146
|
-
light3: 'hsl(225, 2%, 77%)',
|
|
147
|
-
base: 'hsl(227, 2%, 50%)',
|
|
148
|
-
dark2: 'hsl(236, 2%, 38%)',
|
|
149
|
-
dark3: 'hsl(236, 2%, 32%)',
|
|
150
|
-
dark4: 'hsl(236, 2%, 22%)',
|
|
151
|
-
dark5: 'hsl(236, 2%, 5%)'
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
const scales: ColourMap = {
|
|
156
|
-
red_blue: [...Object.values(shades.red).reverse(), ...Object.values(shades.blue)],
|
|
157
|
-
red_violet: [...Object.values(shades.red).reverse(), ...Object.values(shades.violet)],
|
|
158
|
-
violet_teal: [...Object.values(shades.violet).reverse(), ...Object.values(shades.teal)],
|
|
159
|
-
orange_teal: [...Object.values(shades.orange).reverse(), ...Object.values(shades.teal)],
|
|
160
|
-
red_forest: [...Object.values(shades.red).reverse(), ...Object.values(shades.forest)],
|
|
161
|
-
red_apple: [...Object.values(shades.red).reverse(), ...Object.values(shades.apple)],
|
|
162
|
-
red_teal: [...Object.values(shades.red).reverse(), ...Object.values(shades.violet)],
|
|
163
|
-
violet_orange: [...Object.values(shades.violet).reverse(), ...Object.values(shades.orange)],
|
|
164
|
-
orange_blue: [...Object.values(shades.orange).reverse(), ...Object.values(shades.blue)],
|
|
165
|
-
teal_pink: [...Object.values(shades.teal).reverse(), ...Object.values(shades.pink)],
|
|
166
|
-
blue_pink: [...Object.values(shades.blue).reverse(), ...Object.values(shades.pink)],
|
|
167
|
-
apple_plum: [...Object.values(shades.apple).reverse(), ...Object.values(shades.plum)],
|
|
168
|
-
forest_plum: [...Object.values(shades.forest).reverse(), ...Object.values(shades.plum)]
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const typography = {
|
|
172
|
-
wide: {
|
|
173
|
-
sizes: {
|
|
174
|
-
'fs-small-3': '0.75rem',
|
|
175
|
-
'fs-small-2': '0.875rem',
|
|
176
|
-
'fs-small-1': '1rem',
|
|
177
|
-
'fs-base': '1.25rem',
|
|
178
|
-
'fs-large-1': '1.5rem',
|
|
179
|
-
'fs-large-2': '2rem',
|
|
180
|
-
'fs-large-3': '2.5rem',
|
|
181
|
-
'fs-large-4': '3.5rem'
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export { shades, scales, typography };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Card from '../Card/Card.svelte';
|
|
3
|
-
|
|
4
|
-
interface HighlightCardProps {
|
|
5
|
-
topline?: string;
|
|
6
|
-
value?: string;
|
|
7
|
-
unit?: string;
|
|
8
|
-
subline?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { topline, value, unit, subline }: HighlightCardProps = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Card>
|
|
15
|
-
<div class="card-wrapper">
|
|
16
|
-
{#if topline}
|
|
17
|
-
<div class="top">
|
|
18
|
-
{@html topline}
|
|
19
|
-
</div>
|
|
20
|
-
{/if}
|
|
21
|
-
<div class="middle">
|
|
22
|
-
<span class="underline">
|
|
23
|
-
{value}
|
|
24
|
-
</span>
|
|
25
|
-
{unit}
|
|
26
|
-
</div>
|
|
27
|
-
{#if subline}
|
|
28
|
-
<div class="bottom">
|
|
29
|
-
{@html subline}
|
|
30
|
-
</div>
|
|
31
|
-
{/if}
|
|
32
|
-
</div>
|
|
33
|
-
</Card>
|
|
34
|
-
|
|
35
|
-
<style lang="scss">
|
|
36
|
-
.card-wrapper {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
height: 100%;
|
|
40
|
-
min-height: 200px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.top {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: flex-end;
|
|
46
|
-
flex: 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.middle {
|
|
50
|
-
font-size: var(--fs-large-4);
|
|
51
|
-
font-weight: 700;
|
|
52
|
-
padding-bottom: 0.2em;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.bottom {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: flex-start;
|
|
58
|
-
flex: 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.underline {
|
|
62
|
-
width: fit-content;
|
|
63
|
-
background: linear-gradient(to bottom, transparent 90%, var(--red-base) 90%);
|
|
64
|
-
}
|
|
65
|
-
</style>
|
package/src/Input/Input.svelte
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
3
|
-
|
|
4
|
-
export let label: string = '';
|
|
5
|
-
export let name: string = '';
|
|
6
|
-
export let placeholder: string = '';
|
|
7
|
-
export let value: string = '';
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<div class="container">
|
|
11
|
-
<FormLabel htmlFor={name}>{label}</FormLabel>
|
|
12
|
-
<input {name} type="text" {placeholder} bind:value />
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<style lang="scss">
|
|
16
|
-
@use '../styles/base.scss';
|
|
17
|
-
|
|
18
|
-
input {
|
|
19
|
-
@extend %form-input;
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script context="module" lang="ts">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import Logotype from './Logotype.svelte';
|
|
4
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
5
|
-
|
|
6
|
-
const { Story } = defineMeta({
|
|
7
|
-
title: 'Chart/Logotype',
|
|
8
|
-
component: Logotype
|
|
9
|
-
});
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Story name="Basic" asChild>
|
|
13
|
-
<DesignTokens>
|
|
14
|
-
<Logotype></Logotype>
|
|
15
|
-
</DesignTokens>
|
|
16
|
-
</Story>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script context="module" lang="ts">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import Middot from './Middot.svelte';
|
|
4
|
-
import DesignTokens from '../DesignTokens/DesignTokens.svelte';
|
|
5
|
-
|
|
6
|
-
const { Story } = defineMeta({
|
|
7
|
-
title: 'Chart/Middot',
|
|
8
|
-
component: Middot
|
|
9
|
-
});
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Story name="Basic" asChild>
|
|
13
|
-
<DesignTokens>
|
|
14
|
-
<Middot></Middot>
|
|
15
|
-
</DesignTokens>
|
|
16
|
-
</Story>
|
package/src/Note/Note.svelte
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
interface NoteProps {
|
|
5
|
-
children?: Snippet;
|
|
6
|
-
}
|
|
7
|
-
let { children }: NoteProps = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<div class="container">
|
|
11
|
-
{#if children}
|
|
12
|
-
{@render children()}
|
|
13
|
-
{/if}
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<style lang="scss">
|
|
17
|
-
.container {
|
|
18
|
-
font-family: var(--swr-sans);
|
|
19
|
-
font-size: var(--fs-small-2);
|
|
20
|
-
line-height: 1.4;
|
|
21
|
-
letter-spacing: 0.001em;
|
|
22
|
-
color: var(--gray-base);
|
|
23
|
-
|
|
24
|
-
:global(*) {
|
|
25
|
-
color: inherit;
|
|
26
|
-
}
|
|
27
|
-
:global(p) {
|
|
28
|
-
margin-bottom: 0.5em;
|
|
29
|
-
}
|
|
30
|
-
:global(a),
|
|
31
|
-
:global(summary) {
|
|
32
|
-
&:hover,
|
|
33
|
-
&:focus-visible {
|
|
34
|
-
color: var(--gray-dark-3);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
</style>
|
package/src/Select/Select.svelte
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Select from 'svelte-select';
|
|
3
|
-
import { type SelectItem } from './Select.types';
|
|
4
|
-
|
|
5
|
-
interface SelectProps {
|
|
6
|
-
/**
|
|
7
|
-
* The input field's ID. Should be unique across the page.
|
|
8
|
-
*/
|
|
9
|
-
inputId: string;
|
|
10
|
-
/**
|
|
11
|
-
* The input field's placeholder text
|
|
12
|
-
*/
|
|
13
|
-
placeholder: string;
|
|
14
|
-
/**
|
|
15
|
-
* The list of select options
|
|
16
|
-
*/
|
|
17
|
-
items: SelectItem[];
|
|
18
|
-
/**
|
|
19
|
-
* Define custom item groupings. By default items are grouped by their `group` key
|
|
20
|
-
*/
|
|
21
|
-
groupBy?: ((item: SelectItem) => string) | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Whether group names should be selectable
|
|
24
|
-
*/
|
|
25
|
-
groupHeaderSelectable?: boolean;
|
|
26
|
-
clearable?: boolean;
|
|
27
|
-
value: SelectItem | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
let {
|
|
31
|
-
inputId = 'select',
|
|
32
|
-
placeholder = 'Bitte auswählen',
|
|
33
|
-
items = [],
|
|
34
|
-
groupBy,
|
|
35
|
-
groupHeaderSelectable = false,
|
|
36
|
-
clearable = true,
|
|
37
|
-
value = $bindable(undefined)
|
|
38
|
-
}: SelectProps = $props();
|
|
39
|
-
|
|
40
|
-
const groupByFn = groupBy || ((item: SelectItem) => item.group as string);
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<div class="container">
|
|
44
|
-
<Select
|
|
45
|
-
{items}
|
|
46
|
-
groupBy={items.length > 0 && items.every((item) => item.group) ? groupByFn : undefined}
|
|
47
|
-
id={inputId}
|
|
48
|
-
{placeholder}
|
|
49
|
-
{groupHeaderSelectable}
|
|
50
|
-
{clearable}
|
|
51
|
-
class="container"
|
|
52
|
-
bind:value
|
|
53
|
-
>
|
|
54
|
-
<div class="item" slot="item" let:item>
|
|
55
|
-
<slot name="item" {item}>
|
|
56
|
-
{item.label}
|
|
57
|
-
</slot>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="selection" slot="selection" let:selection>
|
|
60
|
-
<slot name="selection" {selection}>
|
|
61
|
-
{selection.label}
|
|
62
|
-
</slot>
|
|
63
|
-
</div>
|
|
64
|
-
</Select>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<style lang="scss">
|
|
68
|
-
.item {
|
|
69
|
-
font-family: var(--swr-sans);
|
|
70
|
-
color: var(--violet-dark-5);
|
|
71
|
-
}
|
|
72
|
-
.selection {
|
|
73
|
-
font-family: var(--swr-sans);
|
|
74
|
-
color: var(--violet-dark-5);
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import FormLabel from '../FormLabel/FormLabel.svelte';
|
|
3
|
-
|
|
4
|
-
interface SwitcherProps {
|
|
5
|
-
/**
|
|
6
|
-
* Human-readable label
|
|
7
|
-
*/
|
|
8
|
-
label: string;
|
|
9
|
-
/**
|
|
10
|
-
* Available options
|
|
11
|
-
*/
|
|
12
|
-
options: string[];
|
|
13
|
-
/**
|
|
14
|
-
* Display size
|
|
15
|
-
*/
|
|
16
|
-
size?: 'default' | 'small';
|
|
17
|
-
/**
|
|
18
|
-
* The currently-selected option
|
|
19
|
-
*/
|
|
20
|
-
value: string | null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let { label, options, size = 'default', value = $bindable(null) }: SwitcherProps = $props();
|
|
24
|
-
|
|
25
|
-
const groupId = $props.id();
|
|
26
|
-
const groupName = 'select-' + groupId;
|
|
27
|
-
|
|
28
|
-
function optionToID(o: string) {
|
|
29
|
-
return `${groupName}-option-${o.replace(/ /g, '-').toLowerCase()}`;
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<fieldset class="container" class:small={size === 'small'}>
|
|
34
|
-
<FormLabel as="legend">{label}</FormLabel>
|
|
35
|
-
<ul>
|
|
36
|
-
{#each options as o (o)}
|
|
37
|
-
<li class:is-selected={o === value}>
|
|
38
|
-
<label for={optionToID(o)}>
|
|
39
|
-
{o}
|
|
40
|
-
</label>
|
|
41
|
-
<input id={optionToID(o)} name={groupName} value={o} type="radio" bind:group={value} />
|
|
42
|
-
</li>
|
|
43
|
-
{/each}
|
|
44
|
-
</ul>
|
|
45
|
-
</fieldset>
|
|
46
|
-
|
|
47
|
-
<style lang="scss">
|
|
48
|
-
@use '../styles/base.scss';
|
|
49
|
-
|
|
50
|
-
fieldset {
|
|
51
|
-
border: 0;
|
|
52
|
-
font-family: var(--swr-sans);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ul {
|
|
56
|
-
width: 100%;
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
padding: 0;
|
|
61
|
-
margin: 0;
|
|
62
|
-
border: 1px solid currentColor;
|
|
63
|
-
background: white;
|
|
64
|
-
border-radius: var(--br-small);
|
|
65
|
-
|
|
66
|
-
@media (min-width: base.$bp-s) {
|
|
67
|
-
flex-flow: row;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&:focus-within,
|
|
71
|
-
&:active {
|
|
72
|
-
outline: 2px solid var(--blue-light-2);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
li {
|
|
76
|
-
display: contents;
|
|
77
|
-
&:last-child label {
|
|
78
|
-
border-right: 0;
|
|
79
|
-
border-bottom: 0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
input {
|
|
83
|
-
position: absolute;
|
|
84
|
-
left: -999px;
|
|
85
|
-
}
|
|
86
|
-
.small label {
|
|
87
|
-
font-size: var(--fs-small-1);
|
|
88
|
-
height: 2.25em;
|
|
89
|
-
padding: 0 0.65em;
|
|
90
|
-
}
|
|
91
|
-
label {
|
|
92
|
-
font-size: var(--fs-base);
|
|
93
|
-
line-height: 1;
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
padding: 0 1em;
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
margin: 0;
|
|
98
|
-
align-items: center;
|
|
99
|
-
display: flex;
|
|
100
|
-
color: currentColor;
|
|
101
|
-
position: relative;
|
|
102
|
-
transition: var(--fast);
|
|
103
|
-
text-underline-offset: 0.2em;
|
|
104
|
-
border-bottom: 1px solid currentColor;
|
|
105
|
-
height: 2.25em;
|
|
106
|
-
@media (min-width: base.$bp-s) {
|
|
107
|
-
justify-content: center;
|
|
108
|
-
padding: 0 1em;
|
|
109
|
-
flex-basis: 0;
|
|
110
|
-
flex-grow: 1;
|
|
111
|
-
border-right: 1px solid currentColor;
|
|
112
|
-
border-bottom: 0;
|
|
113
|
-
}
|
|
114
|
-
@media (min-width: base.$bp-s) {
|
|
115
|
-
height: 2.5em;
|
|
116
|
-
}
|
|
117
|
-
&:hover,
|
|
118
|
-
&:focus-visible {
|
|
119
|
-
text-decoration: underline;
|
|
120
|
-
}
|
|
121
|
-
.is-selected & {
|
|
122
|
-
background: rgb(247, 247, 247);
|
|
123
|
-
font-weight: 600;
|
|
124
|
-
box-shadow: inset 5px 0px 0 0 var(--violet-dark-5);
|
|
125
|
-
@media (min-width: base.$bp-s) {
|
|
126
|
-
box-shadow: inset 0 -3px 0 0 var(--violet-dark-5);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script context="module" lang="ts">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import AttributionControl from './AttributionControl.svelte';
|
|
4
|
-
import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
|
|
5
|
-
import Map from '../Map/Map.svelte';
|
|
6
|
-
import { SWRDataLabLight } from '../MapStyle';
|
|
7
|
-
|
|
8
|
-
const { Story } = defineMeta({
|
|
9
|
-
title: 'Maplibre/Control/AttributionControl',
|
|
10
|
-
component: AttributionControl
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Story asChild name="Default">
|
|
15
|
-
<DesignTokens>
|
|
16
|
-
<div class="container">
|
|
17
|
-
<Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
|
|
18
|
-
<AttributionControl customAttribution="SWR Data Lab" position="bottom-left" />
|
|
19
|
-
</Map>
|
|
20
|
-
</div>
|
|
21
|
-
</DesignTokens>
|
|
22
|
-
</Story>
|
|
23
|
-
|
|
24
|
-
<style>
|
|
25
|
-
.container {
|
|
26
|
-
width: 500px;
|
|
27
|
-
height: 300px;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import maplibre, { type ControlPosition } from 'maplibre-gl';
|
|
3
|
-
import MapControl from '../MapControl/MapControl.svelte';
|
|
4
|
-
|
|
5
|
-
interface AttributionControlProps {
|
|
6
|
-
position?: ControlPosition;
|
|
7
|
-
customAttribution?: string;
|
|
8
|
-
}
|
|
9
|
-
const { position = 'bottom-right', customAttribution }: AttributionControlProps = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<MapControl
|
|
13
|
-
{position}
|
|
14
|
-
control={new maplibre.AttributionControl({
|
|
15
|
-
customAttribution,
|
|
16
|
-
compact: false
|
|
17
|
-
})}
|
|
18
|
-
/>
|
|
19
|
-
|
|
20
|
-
<style>
|
|
21
|
-
:global {
|
|
22
|
-
.maplibregl-ctrl.maplibregl-ctrl-attrib {
|
|
23
|
-
font-size: var(--fs-small-3);
|
|
24
|
-
letter-spacing: 0.005em;
|
|
25
|
-
word-spacing: 0.005em;
|
|
26
|
-
font-family: var(--swr-sans);
|
|
27
|
-
}
|
|
28
|
-
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
|
|
29
|
-
display: block;
|
|
30
|
-
}
|
|
31
|
-
.maplibregl-ctrl-attrib-button {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.maplibregl-ctrl-attrib a {
|
|
36
|
-
color: inherit;
|
|
37
|
-
text-decoration: none;
|
|
38
|
-
text-underline-offset: 0.2em;
|
|
39
|
-
}
|
|
40
|
-
.maplibregl-ctrl-attrib a:hover {
|
|
41
|
-
color: inherit;
|
|
42
|
-
text-decoration: underline;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
</style>
|