@bexis2/bexis2-core-ui 0.4.85 → 0.4.86

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,11 @@
1
1
  # bexis-core-ui
2
+ ## 0.4.86
3
+ - Menu
4
+ - set size to local storage
5
+ - input
6
+ - expose show description
7
+
8
+
2
9
  ## 0.4.85
3
10
  - Menu
4
11
  - add increase / decrease font size
@@ -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>;
@@ -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.86",
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": [
@@ -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) {
@@ -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