sveltacular 0.0.31 → 0.0.33
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/generic/card/card-container.svelte +18 -0
- package/dist/generic/card/card-container.svelte.d.ts +27 -0
- package/dist/generic/card/card.svelte +1 -1
- package/dist/generic/scorecard/scorecard.svelte +72 -10
- package/dist/generic/scorecard/scorecard.svelte.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<ul>
|
|
2
|
+
<slot />
|
|
3
|
+
</ul>
|
|
4
|
+
|
|
5
|
+
<style>
|
|
6
|
+
ul {
|
|
7
|
+
list-style: none;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
justify-content: space-around;
|
|
15
|
+
align-content: stretch;
|
|
16
|
+
row-gap: 1rem;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} CardContainerProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} CardContainerEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} CardContainerSlots */
|
|
4
|
+
export default class CardContainer extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type CardContainerProps = typeof __propDef.props;
|
|
13
|
+
export type CardContainerEvents = typeof __propDef.events;
|
|
14
|
+
export type CardContainerSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponent } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
[x: string]: never;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {
|
|
24
|
+
default: {};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -20,6 +20,7 @@ const onClick = () => {
|
|
|
20
20
|
|
|
21
21
|
<style>li {
|
|
22
22
|
display: inline-block;
|
|
23
|
+
vertical-align: top;
|
|
23
24
|
position: relative;
|
|
24
25
|
width: 100%;
|
|
25
26
|
margin-right: 1rem;
|
|
@@ -39,7 +40,6 @@ li[role=link] {
|
|
|
39
40
|
}
|
|
40
41
|
li[role=link]:hover {
|
|
41
42
|
transform: translateY(-0.25rem);
|
|
42
|
-
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
|
|
43
43
|
}
|
|
44
44
|
li.sm {
|
|
45
45
|
max-width: 15rem;
|
|
@@ -1,29 +1,91 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import { navigateTo } from "../../index.js";
|
|
2
|
+
export let value;
|
|
3
|
+
export let caption = "below";
|
|
4
|
+
export let href = void 0;
|
|
5
|
+
const onClick = () => {
|
|
6
|
+
if (!href)
|
|
7
|
+
return;
|
|
8
|
+
navigateTo(href);
|
|
9
|
+
};
|
|
10
|
+
$:
|
|
11
|
+
formattedValue = typeof value === "number" ? value.toLocaleString() : value;
|
|
12
|
+
$:
|
|
13
|
+
isLink = !!href;
|
|
2
14
|
</script>
|
|
3
15
|
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
16
|
+
<button on:click={onClick} class:isLink>
|
|
17
|
+
<figure class={caption}>
|
|
18
|
+
<span class="value">{formattedValue}</span>
|
|
19
|
+
<figcaption><slot /></figcaption>
|
|
20
|
+
</figure>
|
|
21
|
+
</button>
|
|
8
22
|
|
|
9
|
-
<style>
|
|
23
|
+
<style>button {
|
|
10
24
|
display: inline-block;
|
|
11
|
-
|
|
25
|
+
margin-right: 1rem;
|
|
26
|
+
padding: 0;
|
|
27
|
+
border: none;
|
|
28
|
+
background: none;
|
|
29
|
+
font-family: var(--base-font-family, sans-serif);
|
|
30
|
+
appearance: none;
|
|
31
|
+
transition: transform 0.2s ease-in-out;
|
|
32
|
+
user-select: text;
|
|
33
|
+
}
|
|
34
|
+
button.isLink {
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
button.isLink:hover {
|
|
38
|
+
transform: translateY(-0.25rem);
|
|
39
|
+
}
|
|
40
|
+
button figure {
|
|
41
|
+
min-width: 6rem;
|
|
42
|
+
margin: 0;
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 0.5rem;
|
|
12
45
|
background: #fff;
|
|
13
46
|
border-radius: 0.25rem;
|
|
14
47
|
padding: 1rem;
|
|
15
48
|
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
|
|
16
49
|
font-family: sans-serif;
|
|
17
|
-
min-width: 6rem;
|
|
18
50
|
font-family: var(--base-font-family, sans-serif);
|
|
51
|
+
text-align: center;
|
|
19
52
|
}
|
|
20
|
-
figure
|
|
53
|
+
button figure .value {
|
|
21
54
|
font-size: 2.5rem;
|
|
22
55
|
font-weight: 500;
|
|
23
56
|
color: #000;
|
|
57
|
+
flex-grow: 1;
|
|
24
58
|
}
|
|
25
|
-
figure figcaption {
|
|
59
|
+
button figure figcaption {
|
|
26
60
|
font-size: 0.875rem;
|
|
27
61
|
font-weight: 300;
|
|
28
62
|
color: #4a5568;
|
|
63
|
+
}
|
|
64
|
+
button figure.above {
|
|
65
|
+
flex-direction: column-reverse;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
text-align: center;
|
|
69
|
+
gap: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
button figure.below {
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
text-align: center;
|
|
76
|
+
gap: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
button figure.left {
|
|
79
|
+
flex-direction: row-reverse;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
text-align: left;
|
|
83
|
+
gap: 0.5rem;
|
|
84
|
+
}
|
|
85
|
+
button figure.right {
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
text-align: right;
|
|
90
|
+
gap: 0.5rem;
|
|
29
91
|
}</style>
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { default as FormSection } from './forms/form-section.svelte';
|
|
|
20
20
|
export { default as InfoBox } from './forms/info-box/info-box.svelte';
|
|
21
21
|
export { default as UrlBox } from './forms/url-box/url-box.svelte';
|
|
22
22
|
export { default as Card } from './generic/card/card.svelte';
|
|
23
|
+
export { default as CardContainer } from './generic/card/card-container.svelte';
|
|
23
24
|
export { default as Divider } from './generic/divider/divider.svelte';
|
|
24
25
|
export { default as Link } from './generic/link/link.svelte';
|
|
25
26
|
export { default as Pill } from './generic/pill/pill.svelte';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export { default as InfoBox } from './forms/info-box/info-box.svelte';
|
|
|
22
22
|
export { default as UrlBox } from './forms/url-box/url-box.svelte';
|
|
23
23
|
// Generic
|
|
24
24
|
export { default as Card } from './generic/card/card.svelte';
|
|
25
|
+
export { default as CardContainer } from './generic/card/card-container.svelte';
|
|
25
26
|
export { default as Divider } from './generic/divider/divider.svelte';
|
|
26
27
|
export { default as Link } from './generic/link/link.svelte';
|
|
27
28
|
export { default as Pill } from './generic/pill/pill.svelte';
|