@bexis2/bexis2-core-ui 0.4.85 → 0.4.87

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/README.md CHANGED
@@ -1,4 +1,15 @@
1
1
  # bexis-core-ui
2
+ ## 0.4.87
3
+ - Input
4
+ - add show description to all form components
5
+
6
+ ## 0.4.86
7
+ - Menu
8
+ - set size to local storage
9
+ - Input
10
+ - expose show description
11
+
12
+
2
13
  ## 0.4.85
3
14
  - Menu
4
15
  - add increase / decrease font size
@@ -10,7 +10,8 @@
10
10
  export let feedback = [''];
11
11
  export let required = false;
12
12
  export let help = false;
13
- export let description = '';
13
+ export let description = '';
14
+ export let showDescription = false;
14
15
 
15
16
  $: selected = null;
16
17
 
@@ -28,7 +29,7 @@
28
29
  }
29
30
  </script>
30
31
 
31
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
32
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
32
33
  <select
33
34
  {id}
34
35
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -12,6 +12,7 @@ export default class Dropdown extends SvelteComponent<{
12
12
  required?: boolean | undefined;
13
13
  help?: boolean | undefined;
14
14
  valid?: boolean | undefined;
15
+ showDescription?: boolean | undefined;
15
16
  }, {
16
17
  change: Event;
17
18
  select: Event;
@@ -35,6 +36,7 @@ declare const __propDef: {
35
36
  required?: boolean | undefined;
36
37
  help?: boolean | undefined;
37
38
  valid?: boolean | undefined;
39
+ showDescription?: boolean | undefined;
38
40
  };
39
41
  events: {
40
42
  change: Event;
@@ -12,6 +12,7 @@
12
12
  export let complexTarget = false;
13
13
  export let help = false;
14
14
  export let description = '';
15
+ export let showDescription = false;
15
16
 
16
17
  $: selected = null;
17
18
 
@@ -37,7 +38,7 @@
37
38
  }
38
39
  </script>
39
40
 
40
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
41
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
41
42
  <select
42
43
  {id}
43
44
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,6 +13,7 @@ export default class DropdownKvP extends SvelteComponent<{
13
13
  help?: boolean | undefined;
14
14
  valid?: boolean | undefined;
15
15
  complexTarget?: boolean | undefined;
16
+ showDescription?: boolean | undefined;
16
17
  }, {
17
18
  change: Event;
18
19
  select: Event;
@@ -37,6 +38,7 @@ declare const __propDef: {
37
38
  help?: boolean | undefined;
38
39
  valid?: boolean | undefined;
39
40
  complexTarget?: boolean | undefined;
41
+ showDescription?: boolean | undefined;
40
42
  };
41
43
  events: {
42
44
  change: Event;
@@ -7,7 +7,7 @@ export let required;
7
7
  export let feedback;
8
8
  export let help = false;
9
9
  export let description = "";
10
- let showDescription = false;
10
+ export let showDescription = false;
11
11
  function onMouseOver() {
12
12
  if (help) {
13
13
  helpStore.show(id);
@@ -7,6 +7,7 @@ declare const __propDef: {
7
7
  feedback: string[];
8
8
  help?: boolean;
9
9
  description?: string;
10
+ showDescription?: boolean;
10
11
  };
11
12
  events: {
12
13
  [evt: string]: CustomEvent<any>;
@@ -25,6 +25,7 @@
25
25
  export let disabled = false;
26
26
  export let searchable = true;
27
27
  export let description = '';
28
+ export let showDescription = false;
28
29
 
29
30
  let isLoaded = false;
30
31
 
@@ -308,7 +309,7 @@
308
309
 
309
310
  </script>
310
311
 
311
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
312
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
312
313
  <Select
313
314
  {id}
314
315
  items={source}
@@ -12,6 +12,7 @@ export default class MultiSelect extends SvelteComponent<{
12
12
  required?: boolean | undefined;
13
13
  help?: boolean | undefined;
14
14
  complexTarget?: boolean | undefined;
15
+ showDescription?: boolean | undefined;
15
16
  itemId?: string | undefined;
16
17
  itemLabel?: string | undefined;
17
18
  itemGroup?: string | undefined;
@@ -52,6 +53,7 @@ declare const __propDef: {
52
53
  required?: boolean | undefined;
53
54
  help?: boolean | undefined;
54
55
  complexTarget?: boolean | undefined;
56
+ showDescription?: boolean | undefined;
55
57
  itemId?: string | undefined;
56
58
  itemLabel?: string | undefined;
57
59
  itemGroup?: string | undefined;
@@ -12,6 +12,7 @@ export let placeholder = "";
12
12
  export let help = false;
13
13
  export let disabled = false;
14
14
  export let description = "";
15
+ export let showDescription = false;
15
16
  export let min = void 0;
16
17
  export let max = void 0;
17
18
  $: if (max != void 0 && parseInt(value) > max) {
@@ -22,7 +23,7 @@ $: if (min != void 0 && parseInt(value) < min) {
22
23
  }
23
24
  </script>
24
25
 
25
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
26
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
26
27
  <input
27
28
  {id}
28
29
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -36,6 +37,5 @@ $: if (min != void 0 && parseInt(value) < min) {
36
37
  on:change
37
38
  {placeholder}
38
39
  {disabled}
39
-
40
40
  />
41
41
  </InputContainer>
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  help?: boolean;
13
13
  disabled?: boolean;
14
14
  description?: string;
15
+ showDescription?: boolean;
15
16
  min?: number | undefined;
16
17
  max?: number | undefined;
17
18
  };
@@ -10,9 +10,10 @@ export let placeholder = "";
10
10
  export let help = false;
11
11
  export let disabled = false;
12
12
  export let description = "";
13
+ export let showDescription = false;
13
14
  </script>
14
15
 
15
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
16
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
16
17
  <textarea
17
18
  {id}
18
19
  class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  help?: boolean;
13
13
  disabled?: boolean;
14
14
  description?: string;
15
+ showDescription?: boolean;
15
16
  };
16
17
  events: {
17
18
  input: Event;
@@ -10,9 +10,10 @@ export let placeholder = "";
10
10
  export let help = false;
11
11
  export let disabled = false;
12
12
  export let description = "";
13
+ export let showDescription = false;
13
14
  </script>
14
15
 
15
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
16
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
16
17
  <input
17
18
  {id}
18
19
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  help?: boolean;
13
13
  disabled?: boolean;
14
14
  description?: string;
15
+ showDescription?: boolean;
15
16
  };
16
17
  events: {
17
18
  input: Event;
@@ -12,16 +12,22 @@ onMount(async () => {
12
12
  let m = await getMenuItems();
13
13
  menuStore.set(m);
14
14
  console.log("\u{1F680} ~ onMount ~ menuStore:", $menuStore);
15
+ const storedFontSize = localStorage.getItem("fontSize");
16
+ if (storedFontSize) {
17
+ document.documentElement.style.fontSize = storedFontSize;
18
+ }
15
19
  });
16
20
  let hamburger = true;
17
21
  const theme = writable("light");
18
22
  function increaseFontSize() {
19
23
  const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
20
24
  document.documentElement.style.fontSize = currentFontSize + 1 + "px";
25
+ localStorage.setItem("fontSize", document.documentElement.style.fontSize);
21
26
  }
22
27
  function decreaseFontSize() {
23
28
  const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
24
29
  document.documentElement.style.fontSize = currentFontSize - 1 + "px";
30
+ localStorage.setItem("fontSize", document.documentElement.style.fontSize);
25
31
  }
26
32
  function toggleDarkMode() {
27
33
  if ($theme === "dark") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.85",
3
+ "version": "0.4.87",
4
4
  "private": false,
5
5
  "description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
6
6
  "keywords": [
@@ -10,7 +10,8 @@
10
10
  export let feedback = [''];
11
11
  export let required = false;
12
12
  export let help = false;
13
- export let description = '';
13
+ export let description = '';
14
+ export let showDescription = false;
14
15
 
15
16
  $: selected = null;
16
17
 
@@ -28,7 +29,7 @@
28
29
  }
29
30
  </script>
30
31
 
31
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
32
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
32
33
  <select
33
34
  {id}
34
35
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -12,6 +12,7 @@
12
12
  export let complexTarget = false;
13
13
  export let help = false;
14
14
  export let description = '';
15
+ export let showDescription = false;
15
16
 
16
17
  $: selected = null;
17
18
 
@@ -37,7 +38,7 @@
37
38
  }
38
39
  </script>
39
40
 
40
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
41
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
41
42
  <select
42
43
  {id}
43
44
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -9,8 +9,7 @@
9
9
  export let feedback: string[];
10
10
  export let help: boolean = false;
11
11
  export let description : string = '';
12
-
13
- let showDescription: boolean = false;
12
+ export let showDescription: boolean = false;
14
13
 
15
14
  function onMouseOver() {
16
15
  if (help) {
@@ -25,6 +25,7 @@
25
25
  export let disabled = false;
26
26
  export let searchable = true;
27
27
  export let description = '';
28
+ export let showDescription = false;
28
29
 
29
30
  let isLoaded = false;
30
31
 
@@ -308,7 +309,7 @@
308
309
 
309
310
  </script>
310
311
 
311
- <InputContainer {id} label={title} {feedback} {required} {help} {description}>
312
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
312
313
  <Select
313
314
  {id}
314
315
  items={source}
@@ -15,8 +15,9 @@
15
15
  export let help: boolean = false;
16
16
  export let disabled: boolean = false;
17
17
  export let description : string = '';
18
+ export let showDescription: boolean = false;
18
19
  export let min : number | undefined = undefined;
19
- export let max : number | undefined = undefined;
20
+ export let max : number | undefined = undefined;
20
21
 
21
22
  // Diese Zeile wird jedes Mal ausgeführt, wenn sich "menge" ändert
22
23
  $: if (max!=undefined && (parseInt(value) > max)) {
@@ -30,7 +31,7 @@
30
31
 
31
32
  </script>
32
33
 
33
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
34
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
34
35
  <input
35
36
  {id}
36
37
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -44,6 +45,5 @@
44
45
  on:change
45
46
  {placeholder}
46
47
  {disabled}
47
-
48
48
  />
49
49
  </InputContainer>
@@ -13,9 +13,10 @@
13
13
  export let help: boolean = false;
14
14
  export let disabled: boolean = false;
15
15
  export let description : string = '';
16
+ export let showDescription: boolean = false;
16
17
  </script>
17
18
 
18
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
19
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
19
20
  <textarea
20
21
  {id}
21
22
  class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -12,9 +12,10 @@
12
12
  export let help: boolean = false;
13
13
  export let disabled: boolean = false;
14
14
  export let description : string = '';
15
+ export let showDescription: boolean = false;
15
16
  </script>
16
17
 
17
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
18
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
18
19
  <input
19
20
  {id}
20
21
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -16,20 +16,27 @@
16
16
  menuStore.set(m);
17
17
 
18
18
  console.log('🚀 ~ onMount ~ menuStore:', $menuStore);
19
+ // set the font size to the value stored in local storage
20
+ const storedFontSize = localStorage.getItem('fontSize');
21
+ if (storedFontSize) {
22
+ document.documentElement.style.fontSize = storedFontSize;
23
+ }
19
24
  });
20
25
 
21
26
  let hamburger = true;
22
27
  const theme = writable('light');
23
28
 
24
- // function to increase the current font size by 1 step
29
+ // function to increase the current font size by 1 step; set in local storage so it is remembered on page reload
25
30
  function increaseFontSize() {
26
31
  const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
27
32
  document.documentElement.style.fontSize = currentFontSize + 1 + 'px';
33
+ localStorage.setItem('fontSize', document.documentElement.style.fontSize);
28
34
  }
29
35
  // function to decrease the current font size by 1 step
30
36
  function decreaseFontSize() {
31
37
  const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
32
38
  document.documentElement.style.fontSize = currentFontSize - 1 + 'px';
39
+ localStorage.setItem('fontSize', document.documentElement.style.fontSize);
33
40
  }
34
41
 
35
42
  // function to toggle dark mode