not-bulma 1.0.47 → 1.0.49
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 +1 -1
- package/src/elements/form/ui.switch.svelte +7 -4
- package/src/elements/layout/ui.column.svelte +4 -4
- package/src/elements/layout/ui.columns.svelte +3 -3
- package/src/elements/layout/ui.container.svelte +17 -16
- package/src/elements/layout/ui.section.svelte +5 -6
- package/src/frame/components/form/field.svelte +85 -76
- package/src/frame/components/form/index.js +6 -10
- package/src/frame/components/index.js +20 -19
- package/src/frame/index.js +1 -0
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export let inputStarted = false;
|
|
11
11
|
export let value = false;
|
|
12
12
|
export let label = "";
|
|
13
|
+
export let hideLabel = false;
|
|
13
14
|
export let placeholder = "input some text here, please";
|
|
14
15
|
export let fieldname = "textfield";
|
|
15
16
|
export let icon = false;
|
|
@@ -90,10 +91,12 @@
|
|
|
90
91
|
aria-describedby="input-field-helper-{fieldname}"
|
|
91
92
|
/>
|
|
92
93
|
<label class="label" for="form-field-switch-{fieldname}">
|
|
93
|
-
{#if
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
{#if !hideLabel}
|
|
95
|
+
{#if label}
|
|
96
|
+
{$LOCALE[label]}
|
|
97
|
+
{:else}
|
|
98
|
+
<UIBooleans values={[{ value: true }]} />
|
|
99
|
+
{/if}
|
|
97
100
|
{/if}
|
|
98
101
|
</label>
|
|
99
102
|
{/if}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export let id = "";
|
|
3
|
+
export let classes = "";
|
|
4
|
+
export let widescreen = false;
|
|
5
|
+
export let fullhd = false;
|
|
6
|
+
export let maxDesktop = false;
|
|
7
|
+
export let maxWidescreen = false;
|
|
8
|
+
export let fluid = false;
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
{id}
|
|
13
|
+
class="container {classes}"
|
|
14
|
+
class:is-widescreen={widescreen}
|
|
15
|
+
class:is-fullhd={fullhd}
|
|
16
|
+
class:is-max-desktop={maxDesktop}
|
|
17
|
+
class:is-max-widescreen={maxWidescreen}
|
|
18
|
+
class:is-fluid={fluid}
|
|
19
|
+
on:click
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
21
22
|
</div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export let id = "";
|
|
3
|
+
export let size; //medium, large
|
|
4
|
+
export let classes = "";
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
|
-
<section {id} class="section {size?
|
|
9
|
-
|
|
7
|
+
<section {id} class="section {size ? 'is-' + size : ''} {classes}" on:click>
|
|
8
|
+
<slot />
|
|
10
9
|
</section>
|
|
@@ -1,90 +1,99 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
2
|
+
import UILabel from "../../../elements/form/ui.label.svelte";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
COMPONENTS
|
|
6
|
-
} from '../../LIB.js';
|
|
4
|
+
import { COMPONENTS } from "../../LIB.js";
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
createEventDispatcher
|
|
10
|
-
onMount
|
|
11
|
-
} from 'svelte';
|
|
12
|
-
let dispatch = createEventDispatcher();
|
|
6
|
+
import { createEventDispatcher, onMount } from "svelte";
|
|
7
|
+
let dispatch = createEventDispatcher();
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
export let label = "";
|
|
10
|
+
export let name = "generic field";
|
|
11
|
+
export let readonly = false;
|
|
12
|
+
export let horizontal = false;
|
|
13
|
+
export let controls = [];
|
|
14
|
+
//field style modification
|
|
15
|
+
export let classes = "";
|
|
16
|
+
////addons
|
|
17
|
+
export let addons = false;
|
|
18
|
+
export let addonsCentered = false;
|
|
19
|
+
export let addonsRight = false;
|
|
20
|
+
////gorup
|
|
21
|
+
export let grouped = false;
|
|
22
|
+
export let groupedMultiline = false;
|
|
23
|
+
export let groupedRight = false;
|
|
24
|
+
export let groupedCentered = false;
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
let fieldClasses = "";
|
|
27
|
+
let hidden = false;
|
|
28
|
+
let fieldId;
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
onMount(() => {
|
|
31
|
+
fieldClasses += " " + classes;
|
|
32
|
+
fieldClasses += addons ? " has-addons " : "";
|
|
33
|
+
fieldClasses += addonsCentered ? " has-addons-centered " : "";
|
|
34
|
+
fieldClasses += addonsRight ? " has-addons-right " : "";
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
fieldClasses += grouped ? " is-grouped " : "";
|
|
37
|
+
fieldClasses += groupedMultiline ? " is-grouped-multiline " : "";
|
|
38
|
+
fieldClasses += groupedRight ? " is-grouped-right " : "";
|
|
39
|
+
fieldClasses += groupedCentered ? " is-grouped-centered " : "";
|
|
40
|
+
if (readonly) {
|
|
41
|
+
controls.forEach((control) => {
|
|
42
|
+
control.readonly = true;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let notHidden = controls.filter(
|
|
46
|
+
(control) => control.component !== "UIHidden"
|
|
47
|
+
);
|
|
48
|
+
hidden = notHidden.length === 0;
|
|
49
|
+
let tmp = controls.map((itm) => itm.component).join("_");
|
|
50
|
+
fieldId = `form-field-${tmp}-${name}`;
|
|
51
|
+
});
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
function onControlChange(ev) {
|
|
54
|
+
let data = ev.detail;
|
|
55
|
+
dispatch("change", data);
|
|
56
|
+
}
|
|
60
57
|
</script>
|
|
61
58
|
|
|
62
|
-
{#if hidden
|
|
63
|
-
|
|
64
|
-
{#each controls as control}
|
|
65
|
-
<svelte:component this={COMPONENTS.get(control.component)} {...control} on:change={onControlChange} fieldname={name} />
|
|
66
|
-
{/each}
|
|
67
|
-
|
|
68
|
-
{:else }
|
|
69
|
-
|
|
70
|
-
{#if horizontal}
|
|
71
|
-
<div class="field is-horizontal {fieldClasses} {fieldId}">
|
|
72
|
-
<div class="field-label is-normal">
|
|
73
|
-
<UILabel id={fieldId} label={label || controls[0].label} />
|
|
74
|
-
</div>
|
|
75
|
-
<div class="field-body" id={fieldId}>
|
|
59
|
+
{#if hidden}
|
|
76
60
|
{#each controls as control}
|
|
77
|
-
|
|
61
|
+
<svelte:component
|
|
62
|
+
this={COMPONENTS.get(control.component)}
|
|
63
|
+
{...control}
|
|
64
|
+
on:change={onControlChange}
|
|
65
|
+
fieldname={name}
|
|
66
|
+
/>
|
|
78
67
|
{/each}
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
{:else if horizontal}
|
|
69
|
+
<div class="field is-horizontal {fieldClasses} {fieldId}">
|
|
70
|
+
<div class="field-label is-normal">
|
|
71
|
+
<UILabel id={fieldId} label={label || controls[0].label} />
|
|
72
|
+
</div>
|
|
73
|
+
<div class="field-body" id={fieldId}>
|
|
74
|
+
{#each controls as control}
|
|
75
|
+
<svelte:component
|
|
76
|
+
this={COMPONENTS.get(control.component)}
|
|
77
|
+
{...control}
|
|
78
|
+
on:change={onControlChange}
|
|
79
|
+
fieldname={name}
|
|
80
|
+
/>
|
|
81
|
+
{/each}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
81
84
|
{:else}
|
|
82
|
-
<div class="field {fieldClasses} {fieldId}">
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
<div class="field {fieldClasses} {fieldId}">
|
|
86
|
+
{#each controls as control}
|
|
87
|
+
<UILabel
|
|
88
|
+
id="form-field-{control.component}-{name}"
|
|
89
|
+
label={control.label}
|
|
90
|
+
/>
|
|
91
|
+
<svelte:component
|
|
92
|
+
this={COMPONENTS.get(control.component)}
|
|
93
|
+
{...control}
|
|
94
|
+
on:change={onControlChange}
|
|
95
|
+
fieldname={name}
|
|
96
|
+
/>
|
|
97
|
+
{/each}
|
|
98
|
+
</div>
|
|
90
99
|
{/if}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import notFormUtils from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import notFormUtils from "./utils";
|
|
2
|
+
import notFormHelpers from "./form.helpers";
|
|
3
|
+
import notForm from "./form";
|
|
4
|
+
import notFormSet from "./form.set";
|
|
5
|
+
import UIForm from "./form.svelte";
|
|
5
6
|
|
|
6
|
-
export {
|
|
7
|
-
UIForm,
|
|
8
|
-
notForm,
|
|
9
|
-
notFormSet,
|
|
10
|
-
notFormUtils
|
|
11
|
-
};
|
|
7
|
+
export { UIForm, notForm, notFormSet, notFormUtils, notFormHelpers };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {notTable} from
|
|
1
|
+
import { notTable } from "./table";
|
|
2
2
|
|
|
3
|
-
import notActionUI from
|
|
3
|
+
import notActionUI from "./action/action.ui.js";
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
notForm,
|
|
7
|
+
notFormSet,
|
|
8
|
+
notFormUtils,
|
|
9
|
+
notFormHelpers,
|
|
10
|
+
UIForm,
|
|
11
|
+
} from "./form";
|
|
11
12
|
|
|
12
|
-
import notBreadcrumbs from
|
|
13
|
-
|
|
14
|
-
import {notTopMenu, notSideMenu} from './navigation';
|
|
13
|
+
import notBreadcrumbs from "./breadcrumbs";
|
|
15
14
|
|
|
15
|
+
import { notTopMenu, notSideMenu } from "./navigation";
|
|
16
16
|
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
notActionUI,
|
|
19
|
+
notTable,
|
|
20
|
+
UIForm,
|
|
21
|
+
notForm,
|
|
22
|
+
notFormSet,
|
|
23
|
+
notFormUtils,
|
|
24
|
+
notFormHelpers,
|
|
25
|
+
notBreadcrumbs,
|
|
26
|
+
notTopMenu,
|
|
27
|
+
notSideMenu,
|
|
27
28
|
};
|