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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -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 label}
94
- {$LOCALE[label]}
95
- {:else}
96
- <UIBooleans values={[{ value: true }]} />
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,8 +1,8 @@
1
1
  <script>
2
- export let classes = "";
3
- export let title = "";
2
+ export let classes = "";
3
+ export let title = "";
4
4
  </script>
5
5
 
6
- <div {title} class="column {classes}">
7
- <slot></slot>
6
+ <div {title} class="column {classes}" on:click>
7
+ <slot />
8
8
  </div>
@@ -1,7 +1,7 @@
1
1
  <script>
2
- export let classes = "";
2
+ export let classes = "";
3
3
  </script>
4
4
 
5
- <div class="columns {classes}">
6
- <slot></slot>
5
+ <div class="columns {classes}" on:click>
6
+ <slot />
7
7
  </div>
@@ -1,21 +1,22 @@
1
1
  <script>
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;
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
- {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
- >
20
- <slot></slot>
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
- export let id='';
3
- export let size; //medium, large
4
- export let classes = '';
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?('is-'+size):''} {classes}">
9
- <slot></slot>
7
+ <section {id} class="section {size ? 'is-' + size : ''} {classes}" on:click>
8
+ <slot />
10
9
  </section>
@@ -1,90 +1,99 @@
1
1
  <script>
2
- import UILabel from '../../../elements/form/ui.label.svelte';
2
+ import UILabel from "../../../elements/form/ui.label.svelte";
3
3
 
4
- import {
5
- COMPONENTS
6
- } from '../../LIB.js';
4
+ import { COMPONENTS } from "../../LIB.js";
7
5
 
8
- import {
9
- createEventDispatcher,
10
- onMount
11
- } from 'svelte';
12
- let dispatch = createEventDispatcher();
6
+ import { createEventDispatcher, onMount } from "svelte";
7
+ let dispatch = createEventDispatcher();
13
8
 
14
- export let label = '';
15
- export let name = 'generic field';
16
- export let readonly = false;
17
- export let horizontal = false;
18
- export let controls = [];
19
- //field style modification
20
- export let classes = '';
21
- ////addons
22
- export let addons = false;
23
- export let addonsCentered = false;
24
- export let addonsRight = false;
25
- ////gorup
26
- export let grouped = false;
27
- export let groupedMultiline = false;
28
- export let groupedRight = false;
29
- export let groupedCentered = false;
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
- let fieldClasses = '';
32
- let hidden = false;
33
- let fieldId;
26
+ let fieldClasses = "";
27
+ let hidden = false;
28
+ let fieldId;
34
29
 
35
- onMount(() => {
36
- fieldClasses += (' ' + classes);
37
- fieldClasses += (addons ? ' has-addons ' : '');
38
- fieldClasses += (addonsCentered ? ' has-addons-centered ' : '');
39
- fieldClasses += (addonsRight ? ' has-addons-right ' : '');
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
- fieldClasses += (grouped ? ' is-grouped ' : '');
42
- fieldClasses += (groupedMultiline ? ' is-grouped-multiline ' : '');
43
- fieldClasses += (groupedRight ? ' is-grouped-right ' : '');
44
- fieldClasses += (groupedCentered ? ' is-grouped-centered ' : '');
45
- if (readonly) {
46
- controls.forEach((control) => {
47
- control.readonly = true;
48
- });
49
- }
50
- let notHidden = controls.filter(control => control.component !== 'UIHidden');
51
- hidden = (notHidden.length === 0);
52
- let tmp = controls.map(itm => itm.component).join('_');
53
- fieldId = `form-field-${tmp}-${name}`;
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
- function onControlChange(ev) {
57
- let data = ev.detail;
58
- dispatch('change', data);
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
- <svelte:component this={COMPONENTS.get(control.component)} {...control} on:change={onControlChange} fieldname={name} />
61
+ <svelte:component
62
+ this={COMPONENTS.get(control.component)}
63
+ {...control}
64
+ on:change={onControlChange}
65
+ fieldname={name}
66
+ />
78
67
  {/each}
79
- </div>
80
- </div>
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
- {#each controls as control}
84
- <UILabel id="form-field-{control.component}-{name}" label={control.label} />
85
- <svelte:component this={COMPONENTS.get(control.component)} {...control} on:change={onControlChange} fieldname={name} />
86
- {/each}
87
- </div>
88
- {/if}
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 './utils';
2
- import notForm from './form';
3
- import notFormSet from './form.set';
4
- import UIForm from './form.svelte';
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 './table';
1
+ import { notTable } from "./table";
2
2
 
3
- import notActionUI from './action/action.ui.js';
3
+ import notActionUI from "./action/action.ui.js";
4
4
 
5
5
  import {
6
- notForm,
7
- notFormSet,
8
- notFormUtils,
9
- UIForm
10
- } from './form';
6
+ notForm,
7
+ notFormSet,
8
+ notFormUtils,
9
+ notFormHelpers,
10
+ UIForm,
11
+ } from "./form";
11
12
 
12
- import notBreadcrumbs from './breadcrumbs';
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
- notActionUI,
19
- notTable,
20
- UIForm,
21
- notForm,
22
- notFormSet,
23
- notFormUtils,
24
- notBreadcrumbs,
25
- notTopMenu,
26
- notSideMenu
18
+ notActionUI,
19
+ notTable,
20
+ UIForm,
21
+ notForm,
22
+ notFormSet,
23
+ notFormUtils,
24
+ notFormHelpers,
25
+ notBreadcrumbs,
26
+ notTopMenu,
27
+ notSideMenu,
27
28
  };
@@ -62,6 +62,7 @@ export {
62
62
  notForm,
63
63
  notFormSet,
64
64
  notFormUtils,
65
+ notFormHelpers,
65
66
  notInterface,
66
67
  notPath,
67
68
  notRecord,