@swr-data-lab/components 1.13.13 → 1.15.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.
@@ -1,9 +1,9 @@
1
1
  <script lang="ts">import Logotype from '../Logotype/Logotype.svelte';
2
2
  import Note from '../Note/Note.svelte';
3
- let { layout = 'one-up', children } = $props();
3
+ let { layout = 'one-up', align = 'left', children } = $props();
4
4
  </script>
5
5
 
6
- <footer class={`container ${layout}`}>
6
+ <footer class={`container ${layout} align-${align}`}>
7
7
  {#if children}
8
8
  <Note>
9
9
  {@render children()}
@@ -24,6 +24,11 @@ let { layout = 'one-up', children } = $props();
24
24
  flex-flow: column;
25
25
  align-items: flex-start;
26
26
  }
27
+ .one-up.align-center {
28
+ align-items: center;
29
+ text-align: center;
30
+ text-wrap: balance;
31
+ }
27
32
 
28
33
  .two-up {
29
34
  display: grid;
@@ -1,6 +1,7 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  interface ChartFooterProps {
3
- layout: 'one-up' | 'two-up';
3
+ layout?: 'one-up' | 'two-up';
4
+ align?: 'left' | 'center';
4
5
  children?: Snippet;
5
6
  }
6
7
  declare const ChartFooter: import("svelte").Component<ChartFooterProps, {}, "">;
@@ -1,10 +1,10 @@
1
1
  <script lang="ts">import Headline from '../Headline/Headline.svelte';
2
2
  import Copy from '../Copy/Copy.svelte';
3
3
  import slugify from '../utils/slugify';
4
- let { title, subtitle, children } = $props();
4
+ let { title, subtitle, align = 'left', children } = $props();
5
5
  </script>
6
6
 
7
- <header class="container" id={slugify(title)}>
7
+ <header class={`container align-${align}`} id={slugify(title)}>
8
8
  <Headline>{title}</Headline>
9
9
  {#if subtitle}
10
10
  <Copy><p class="subtitle">{subtitle}</p></Copy>
@@ -20,6 +20,12 @@ let { title, subtitle, children } = $props();
20
20
  .container {
21
21
  color: var(--violet-blue);
22
22
  font-family: var(--swr-sans);
23
+ display: flex;
24
+ flex-flow: column;
25
+ gap: 0.125rem;
26
+ }
27
+ .align-center {
28
+ text-align: center;
23
29
  }
24
30
  .subtitle {
25
31
  text-wrap: balance;
@@ -2,6 +2,7 @@ import type { Snippet } from 'svelte';
2
2
  interface ChartHeaderProps {
3
3
  title: string;
4
4
  subtitle?: string;
5
+ align?: 'left' | 'center';
5
6
  children?: Snippet;
6
7
  }
7
8
  declare const ChartHeader: import("svelte").Component<ChartHeaderProps, {}, "">;
@@ -132,6 +132,7 @@ const shades = {
132
132
  gray: {
133
133
  light5: 'hsl(225, 2%, 95%)',
134
134
  light3: 'hsl(225, 2%, 77%)',
135
+ light1: 'hsl(225, 2%, 62%)',
135
136
  base: 'hsl(227, 2%, 50%)',
136
137
  dark2: 'hsl(236, 2%, 38%)',
137
138
  dark3: 'hsl(236, 2%, 32%)',
@@ -39,9 +39,9 @@
39
39
  svg {
40
40
  display: block;
41
41
  width: auto;
42
- height: calc(var(--fs-small-2) * 0.9);
42
+ height: calc(var(--fs-small-2) * 0.8);
43
43
  }
44
44
  path {
45
- fill: var(--violet-dark-5);
45
+ fill: var(--gray-light-1);
46
46
  }
47
47
  </style>
@@ -21,6 +21,10 @@ export {};
21
21
  .container :global(p) {
22
22
  margin-bottom: 0.5em;
23
23
  }
24
+ .container :global(a),
25
+ .container :global(summary) {
26
+ text-underline-offset: 0.15em;
27
+ }
24
28
  .container :global(a):hover, .container :global(a):focus-visible,
25
29
  .container :global(summary):hover,
26
30
  .container :global(summary):focus-visible {
@@ -18,6 +18,6 @@ interface MapProps {
18
18
  options?: any;
19
19
  children?: Snippet;
20
20
  }
21
- declare const Map: import("svelte").Component<MapProps, {}, "zoom" | "pitch" | "center" | "bearing" | "loading">;
21
+ declare const Map: import("svelte").Component<MapProps, {}, "center" | "zoom" | "pitch" | "bearing" | "loading">;
22
22
  type Map = ReturnType<typeof Map>;
23
23
  export default Map;
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.13",
4
+ "version": "1.15.0",
5
5
  "author": "SWR Data Lab",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",