@communitiesuk/svelte-component-library 0.1.19-beta.26 → 0.1.19-beta.27
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.
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
let { text, color } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<strong class="govuk-tag trend-tag {color ? `govuk-tag--${color}` : ''}"
|
|
6
|
+
>{text}</strong
|
|
7
|
+
>
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
.govuk-tag.trend-tag {
|
|
11
|
+
padding: 0.25rem 0.625rem;
|
|
12
|
+
border-bottom: 2px solid #b1b4b6;
|
|
13
|
+
font-size: 1rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.govuk-tag.trend-tag.govuk-tag--red {
|
|
17
|
+
border-bottom-color: #ff5e5e;
|
|
18
|
+
}
|
|
19
|
+
.govuk-tag.trend-tag.govuk-tag--orange {
|
|
20
|
+
border-bottom-color: #ffaf4a;
|
|
21
|
+
}
|
|
22
|
+
.govuk-tag.trend-tag.govuk-tag--green {
|
|
23
|
+
border-bottom-color: #0fbd54;
|
|
24
|
+
}
|
|
25
|
+
.govuk-tag.trend-tag.govuk-tag--grey {
|
|
26
|
+
border-bottom-color: #b1b4b6;
|
|
27
|
+
}
|
|
28
|
+
.govuk-tag.trend-tag.govuk-tag--white {
|
|
29
|
+
background-color: #fbfbfb;
|
|
30
|
+
border-bottom-color: #cdcdcd;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default Tag;
|
|
2
|
+
type Tag = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Tag: import("svelte").Component<{
|
|
7
|
+
text: any;
|
|
8
|
+
color: any;
|
|
9
|
+
}, {}, "">;
|
|
10
|
+
type $$ComponentProps = {
|
|
11
|
+
text: any;
|
|
12
|
+
color: any;
|
|
13
|
+
};
|
|
@@ -421,6 +421,18 @@
|
|
|
421
421
|
2})"
|
|
422
422
|
>
|
|
423
423
|
{#if rowValue.shape === "line"}
|
|
424
|
+
<line
|
|
425
|
+
x1={0}
|
|
426
|
+
x2={0}
|
|
427
|
+
y1={chartHeight / 1.5}
|
|
428
|
+
y2={-chartHeight / 1.5}
|
|
429
|
+
stroke={rowValue.color === "inherit"
|
|
430
|
+
? colorScale[segmentIndex(rowValue.value)]
|
|
431
|
+
: rowValue.color}
|
|
432
|
+
stroke-width={rowValue.markerRadius * 5}
|
|
433
|
+
opacity={0}
|
|
434
|
+
pointer-events={rowValue.pointerEvents}
|
|
435
|
+
></line>
|
|
424
436
|
<line
|
|
425
437
|
x1={0}
|
|
426
438
|
x2={0}
|
|
@@ -431,7 +443,7 @@
|
|
|
431
443
|
: rowValue.color}
|
|
432
444
|
stroke-width={rowValue.markerRadius}
|
|
433
445
|
opacity={rowValue.opacity}
|
|
434
|
-
pointer-events=
|
|
446
|
+
pointer-events="none"
|
|
435
447
|
></line>
|
|
436
448
|
{:else}
|
|
437
449
|
<circle
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
export { default as InsetText } from './components/content/InsetText.svelte';
|
|
3
|
+
export { default as Tag } from './components/content/Tag.svelte';
|
|
3
4
|
export { default as WarningText } from './components/content/WarningText.svelte';
|
|
4
5
|
export { default as Histogram } from './components/data-vis/Histogram.svelte';
|
|
5
6
|
export { default as Axis } from './components/data-vis/axis/Axis.svelte';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// this file is auto-generated — do not edit by hand
|
|
2
2
|
import "./main.css";
|
|
3
3
|
export { default as InsetText } from './components/content/InsetText.svelte';
|
|
4
|
+
export { default as Tag } from './components/content/Tag.svelte';
|
|
4
5
|
export { default as WarningText } from './components/content/WarningText.svelte';
|
|
5
6
|
export { default as Histogram } from './components/data-vis/Histogram.svelte';
|
|
6
7
|
export { default as Axis } from './components/data-vis/axis/Axis.svelte';
|