not-bulma 1.2.14 → 1.2.15
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export let title = "";
|
|
4
4
|
export let url = "";
|
|
5
5
|
export let download;
|
|
6
|
-
export let target = "
|
|
6
|
+
export let target = "_blank";
|
|
7
7
|
export let light = false;
|
|
8
8
|
export let loading = false;
|
|
9
9
|
export let raised = false;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
export let classes = "button ";
|
|
18
18
|
export let icon = false;
|
|
19
19
|
export let iconSide = "right";
|
|
20
|
+
|
|
20
21
|
export let action = () => {
|
|
21
22
|
return true;
|
|
22
23
|
};
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
<a
|
|
34
35
|
on:click={action}
|
|
35
|
-
|
|
36
|
+
{target}
|
|
36
37
|
href={url}
|
|
37
38
|
{download}
|
|
38
39
|
class="{classes} {state ? `is-${state}` : ''} {inverted
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import UILink from "./ui.link.svelte";
|
|
3
|
+
export let values = [];
|
|
4
|
+
export let classes = "";
|
|
5
|
+
export let centered = false;
|
|
6
|
+
export let right = false;
|
|
4
7
|
</script>
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
<div
|
|
10
|
+
class="field has-addons {centered ? 'is-centered' : ''} {right
|
|
11
|
+
? 'is-right'
|
|
12
|
+
: ''} {classes}"
|
|
13
|
+
>
|
|
14
|
+
<p class="control">
|
|
15
|
+
{#each values as item (item.id)}
|
|
16
|
+
<UILink {...item} />
|
|
17
|
+
{/each}
|
|
18
|
+
</p>
|
|
13
19
|
</div>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export let idFieldName = "id";
|
|
5
5
|
export let items = [];
|
|
6
6
|
export let actions = [];
|
|
7
|
+
export let links = [];
|
|
7
8
|
|
|
8
9
|
export let itemClasses = "";
|
|
9
10
|
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
{imageComponentProps}
|
|
31
32
|
{...item}
|
|
32
33
|
listActions={actions}
|
|
34
|
+
listLinks={links}
|
|
33
35
|
commonClasses={itemClasses}
|
|
34
36
|
bind:value={item}
|
|
35
37
|
{index}
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import UITitle from "../various/ui.title.svelte";
|
|
6
6
|
import UIButtons from "../button/ui.buttons.svelte";
|
|
7
|
+
import UILinks from "../link/ui.links.svelte";
|
|
7
8
|
|
|
8
9
|
export let title;
|
|
9
10
|
export let description;
|
|
10
11
|
export let actions = [];
|
|
12
|
+
export let links = [];
|
|
11
13
|
export let listActions = [];
|
|
14
|
+
export let listLinks = [];
|
|
12
15
|
export let classes = "";
|
|
13
16
|
export let commonClasses = "";
|
|
14
17
|
export let image = "";
|
|
@@ -33,10 +36,14 @@
|
|
|
33
36
|
function onClick() {
|
|
34
37
|
dispatch("click", value);
|
|
35
38
|
}
|
|
39
|
+
|
|
36
40
|
let allActions = [];
|
|
37
41
|
$: allActions = [...actions, ...listActions].map((btn) => {
|
|
38
42
|
return { ...btn, action: () => btn.action(value) };
|
|
39
43
|
});
|
|
44
|
+
|
|
45
|
+
let allLinks = [];
|
|
46
|
+
$: allLinks = [...links, ...listLinks];
|
|
40
47
|
</script>
|
|
41
48
|
|
|
42
49
|
<div
|
|
@@ -184,9 +191,14 @@
|
|
|
184
191
|
</div>
|
|
185
192
|
{/if}
|
|
186
193
|
</div>
|
|
194
|
+
|
|
187
195
|
{#if allActions && allActions.length}
|
|
188
196
|
<div class="list-item-controls">
|
|
189
197
|
<UIButtons values={allActions} right={true} />
|
|
190
198
|
</div>
|
|
191
199
|
{/if}
|
|
200
|
+
|
|
201
|
+
{#if allLinks && allLinks.length}
|
|
202
|
+
<UILinks values={allLinks} right={true} />
|
|
203
|
+
{/if}
|
|
192
204
|
</div>
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
export let classes = "";
|
|
8
8
|
export let items = [];
|
|
9
|
+
|
|
9
10
|
export let actions = [];
|
|
11
|
+
export let links = [];
|
|
10
12
|
|
|
11
13
|
export let actionsVisible = false;
|
|
12
14
|
export let itemsHoverable = false;
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
{imageComponent}
|
|
57
59
|
{imageComponentProps}
|
|
58
60
|
{actions}
|
|
61
|
+
{links}
|
|
59
62
|
on:change
|
|
60
63
|
on:click
|
|
61
64
|
on:clickContent
|