@bexis2/bexis2-core-ui 0.4.89 → 0.4.91

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.
Files changed (34) hide show
  1. package/README.md +6 -0
  2. package/dist/components/form/DateInput.svelte +3 -1
  3. package/dist/components/form/DateInput.svelte.d.ts +4 -0
  4. package/dist/components/form/DatePickerInput.svelte +2 -1
  5. package/dist/components/form/DatePickerInput.svelte.d.ts +4 -0
  6. package/dist/components/form/Dropdown.svelte +2 -2
  7. package/dist/components/form/Dropdown.svelte.d.ts +8 -2
  8. package/dist/components/form/DropdownKvP.svelte +2 -2
  9. package/dist/components/form/DropdownKvP.svelte.d.ts +8 -2
  10. package/dist/components/form/InputContainer.svelte +14 -2
  11. package/dist/components/form/InputContainer.svelte.d.ts +4 -0
  12. package/dist/components/form/MultiSelect.svelte +2 -1
  13. package/dist/components/form/MultiSelect.svelte.d.ts +12 -6
  14. package/dist/components/form/NumberInput.svelte +2 -1
  15. package/dist/components/form/NumberInput.svelte.d.ts +3 -0
  16. package/dist/components/form/TextArea.svelte +2 -1
  17. package/dist/components/form/TextArea.svelte.d.ts +3 -0
  18. package/dist/components/form/TextInput.svelte +2 -1
  19. package/dist/components/form/TextInput.svelte.d.ts +3 -0
  20. package/dist/components/page/menu/Menu.svelte +3 -2
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.js +2 -1
  23. package/package.json +1 -1
  24. package/src/lib/components/form/DateInput.svelte +3 -1
  25. package/src/lib/components/form/DatePickerInput.svelte +2 -1
  26. package/src/lib/components/form/Dropdown.svelte +2 -2
  27. package/src/lib/components/form/DropdownKvP.svelte +2 -2
  28. package/src/lib/components/form/InputContainer.svelte +19 -2
  29. package/src/lib/components/form/MultiSelect.svelte +2 -1
  30. package/src/lib/components/form/NumberInput.svelte +2 -1
  31. package/src/lib/components/form/TextArea.svelte +2 -1
  32. package/src/lib/components/form/TextInput.svelte +2 -1
  33. package/src/lib/components/page/menu/Menu.svelte +3 -2
  34. package/src/lib/index.ts +3 -0
package/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # bexis-core-ui
2
2
 
3
3
 
4
+ ## 0.4.91
5
+ - Input
6
+ - Add DataPickerInput based on Svelty Picker
7
+ - reorder font size in menu (less layout shift with old header)
8
+ - trigger description event on mouse over / out
9
+
4
10
  ## 0.4.87
5
11
  - Input
6
12
  - add show description to all form components
@@ -9,9 +9,11 @@ export let feedback = [""];
9
9
  export let help = false;
10
10
  export let disabled = false;
11
11
  export let description = "";
12
+ export let showDescription = false;
13
+ export let showIcon = false;
12
14
  </script>
13
15
 
14
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
16
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
15
17
  <input
16
18
  {id}
17
19
  class="input variant-form-material bg-zinc-50 dark:bg-zinc-700 placeholder:text-gray-400"
@@ -11,8 +11,12 @@ declare const __propDef: {
11
11
  help?: boolean;
12
12
  disabled?: boolean;
13
13
  description?: string;
14
+ showDescription?: boolean;
15
+ showIcon?: boolean;
14
16
  };
15
17
  events: {
18
+ showDescription: CustomEvent<any>;
19
+ hideDescription: CustomEvent<any>;
16
20
  input: Event;
17
21
  change: Event;
18
22
  } & {
@@ -12,6 +12,7 @@ export let help = false;
12
12
  export let disabled = false;
13
13
  export let description = "";
14
14
  export let showDescription = false;
15
+ export let showIcon = false;
15
16
  export let mode = "date";
16
17
  export let initialDate = "";
17
18
  export let format = "yyyy-mm-dd";
@@ -32,7 +33,7 @@ if (mode === "datetime") {
32
33
  }
33
34
  </script>
34
35
 
35
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
36
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
36
37
  <SveltyPicker
37
38
  {mode}
38
39
  name={label}
@@ -13,6 +13,7 @@ declare const __propDef: {
13
13
  disabled?: boolean;
14
14
  description?: string;
15
15
  showDescription?: boolean;
16
+ showIcon?: boolean;
16
17
  mode?: "date" | "time" | "datetime";
17
18
  initialDate?: string;
18
19
  format?: string;
@@ -20,6 +21,9 @@ declare const __propDef: {
20
21
  onChangeHandler?: (event: CustomEvent) => void;
21
22
  };
22
23
  events: {
24
+ showDescription: CustomEvent<any>;
25
+ hideDescription: CustomEvent<any>;
26
+ } & {
23
27
  [evt: string]: CustomEvent<any>;
24
28
  };
25
29
  slots: {};
@@ -12,7 +12,7 @@
12
12
  export let help = false;
13
13
  export let description = '';
14
14
  export let showDescription = false;
15
-
15
+ export let showIcon = false;
16
16
  $: selected = null;
17
17
 
18
18
  $: updatedSelectedValue(target);
@@ -29,7 +29,7 @@
29
29
  }
30
30
  </script>
31
31
 
32
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
32
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
33
33
  <select
34
34
  {id}
35
35
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -7,13 +7,16 @@ export default class Dropdown extends SvelteComponent<{
7
7
  title: any;
8
8
  source: any;
9
9
  description?: string | undefined;
10
+ showDescription?: boolean | undefined;
10
11
  invalid?: boolean | undefined;
11
12
  feedback?: string[] | undefined;
12
13
  required?: boolean | undefined;
13
14
  help?: boolean | undefined;
15
+ showIcon?: boolean | undefined;
14
16
  valid?: boolean | undefined;
15
- showDescription?: boolean | undefined;
16
17
  }, {
18
+ showDescription: CustomEvent<any>;
19
+ hideDescription: CustomEvent<any>;
17
20
  change: Event;
18
21
  select: Event;
19
22
  } & {
@@ -31,14 +34,17 @@ declare const __propDef: {
31
34
  title: any;
32
35
  source: any;
33
36
  description?: string | undefined;
37
+ showDescription?: boolean | undefined;
34
38
  invalid?: boolean | undefined;
35
39
  feedback?: string[] | undefined;
36
40
  required?: boolean | undefined;
37
41
  help?: boolean | undefined;
42
+ showIcon?: boolean | undefined;
38
43
  valid?: boolean | undefined;
39
- showDescription?: boolean | undefined;
40
44
  };
41
45
  events: {
46
+ showDescription: CustomEvent<any>;
47
+ hideDescription: CustomEvent<any>;
42
48
  change: Event;
43
49
  select: Event;
44
50
  } & {
@@ -13,7 +13,7 @@
13
13
  export let help = false;
14
14
  export let description = '';
15
15
  export let showDescription = false;
16
-
16
+ export let showIcon = false;
17
17
  $: selected = null;
18
18
 
19
19
  $: updatedSelectedValue(target);
@@ -38,7 +38,7 @@
38
38
  }
39
39
  </script>
40
40
 
41
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
41
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
42
42
  <select
43
43
  {id}
44
44
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -7,14 +7,17 @@ export default class DropdownKvP extends SvelteComponent<{
7
7
  title: any;
8
8
  source: any;
9
9
  description?: string | undefined;
10
+ showDescription?: boolean | undefined;
10
11
  invalid?: boolean | undefined;
11
12
  feedback?: string[] | undefined;
12
13
  required?: boolean | undefined;
13
14
  help?: boolean | undefined;
15
+ showIcon?: boolean | undefined;
14
16
  valid?: boolean | undefined;
15
17
  complexTarget?: boolean | undefined;
16
- showDescription?: boolean | undefined;
17
18
  }, {
19
+ showDescription: CustomEvent<any>;
20
+ hideDescription: CustomEvent<any>;
18
21
  change: Event;
19
22
  select: Event;
20
23
  } & {
@@ -32,15 +35,18 @@ declare const __propDef: {
32
35
  title: any;
33
36
  source: any;
34
37
  description?: string | undefined;
38
+ showDescription?: boolean | undefined;
35
39
  invalid?: boolean | undefined;
36
40
  feedback?: string[] | undefined;
37
41
  required?: boolean | undefined;
38
42
  help?: boolean | undefined;
43
+ showIcon?: boolean | undefined;
39
44
  valid?: boolean | undefined;
40
45
  complexTarget?: boolean | undefined;
41
- showDescription?: boolean | undefined;
42
46
  };
43
47
  events: {
48
+ showDescription: CustomEvent<any>;
49
+ hideDescription: CustomEvent<any>;
44
50
  change: Event;
45
51
  select: Event;
46
52
  } & {
@@ -1,4 +1,5 @@
1
- <script>import { helpStore } from "../../stores/pageStores";
1
+ <script>import { createEventDispatcher } from "svelte";
2
+ import { helpStore } from "../../stores/pageStores";
2
3
  import Fa from "svelte-fa";
3
4
  import { faQuestion } from "@fortawesome/free-solid-svg-icons";
4
5
  export let id = "";
@@ -8,12 +9,23 @@ export let feedback;
8
9
  export let help = false;
9
10
  export let description = "";
10
11
  export let showDescription = false;
12
+ export let showIcon = false;
13
+ const dispatch = createEventDispatcher();
11
14
  function onMouseOver() {
12
15
  if (help) {
13
16
  helpStore.show(id);
14
17
  }
18
+ if (description.length > 0) {
19
+ dispatch("showDescription", { id, description });
20
+ }
15
21
  }
16
22
  function onMouseOut() {
23
+ if (help) {
24
+ helpStore.hide(id);
25
+ }
26
+ if (description.length > 0) {
27
+ dispatch("hideDescription", { id });
28
+ }
17
29
  }
18
30
  </script>
19
31
 
@@ -30,7 +42,7 @@ function onMouseOut() {
30
42
  >{label}
31
43
  {#if required} <span class="text-xs text-red-600">*</span> {/if}
32
44
  </span>
33
- {#if description}
45
+ {#if description && showIcon}
34
46
  <button class="badge " on:click={()=>showDescription = !showDescription}><Fa icon={faQuestion} /></button>
35
47
  {/if}
36
48
  </label>
@@ -8,8 +8,12 @@ declare const __propDef: {
8
8
  help?: boolean;
9
9
  description?: string;
10
10
  showDescription?: boolean;
11
+ showIcon?: boolean;
11
12
  };
12
13
  events: {
14
+ showDescription: CustomEvent<any>;
15
+ hideDescription: CustomEvent<any>;
16
+ } & {
13
17
  [evt: string]: CustomEvent<any>;
14
18
  };
15
19
  slots: {
@@ -26,6 +26,7 @@
26
26
  export let searchable = true;
27
27
  export let description = '';
28
28
  export let showDescription = false;
29
+ export let showIcon = false;
29
30
 
30
31
  let isLoaded = false;
31
32
 
@@ -309,7 +310,7 @@
309
310
 
310
311
  </script>
311
312
 
312
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
313
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
313
314
  <Select
314
315
  {id}
315
316
  items={source}
@@ -7,23 +7,26 @@ export default class MultiSelect extends SvelteComponent<{
7
7
  title: any;
8
8
  source: any;
9
9
  description?: string | undefined;
10
+ showDescription?: boolean | undefined;
10
11
  invalid?: boolean | undefined;
11
12
  feedback?: string[] | undefined;
12
13
  required?: boolean | undefined;
13
14
  help?: boolean | undefined;
15
+ showIcon?: boolean | undefined;
16
+ disabled?: boolean | undefined;
17
+ placeholder?: string | undefined;
14
18
  complexTarget?: boolean | undefined;
15
- showDescription?: boolean | undefined;
16
19
  itemId?: string | undefined;
17
20
  itemLabel?: string | undefined;
18
21
  itemGroup?: string | undefined;
19
22
  isMulti?: boolean | undefined;
20
23
  complexSource?: boolean | undefined;
21
- placeholder?: string | undefined;
22
24
  loading?: boolean | undefined;
23
25
  clearable?: boolean | undefined;
24
- disabled?: boolean | undefined;
25
26
  searchable?: boolean | undefined;
26
27
  }, {
28
+ showDescription: CustomEvent<any>;
29
+ hideDescription: CustomEvent<any>;
27
30
  change: CustomEvent<any>;
28
31
  input: CustomEvent<any>;
29
32
  focus: CustomEvent<any>;
@@ -48,24 +51,27 @@ declare const __propDef: {
48
51
  title: any;
49
52
  source: any;
50
53
  description?: string | undefined;
54
+ showDescription?: boolean | undefined;
51
55
  invalid?: boolean | undefined;
52
56
  feedback?: string[] | undefined;
53
57
  required?: boolean | undefined;
54
58
  help?: boolean | undefined;
59
+ showIcon?: boolean | undefined;
60
+ disabled?: boolean | undefined;
61
+ placeholder?: string | undefined;
55
62
  complexTarget?: boolean | undefined;
56
- showDescription?: boolean | undefined;
57
63
  itemId?: string | undefined;
58
64
  itemLabel?: string | undefined;
59
65
  itemGroup?: string | undefined;
60
66
  isMulti?: boolean | undefined;
61
67
  complexSource?: boolean | undefined;
62
- placeholder?: string | undefined;
63
68
  loading?: boolean | undefined;
64
69
  clearable?: boolean | undefined;
65
- disabled?: boolean | undefined;
66
70
  searchable?: boolean | undefined;
67
71
  };
68
72
  events: {
73
+ showDescription: CustomEvent<any>;
74
+ hideDescription: CustomEvent<any>;
69
75
  change: CustomEvent<any>;
70
76
  input: CustomEvent<any>;
71
77
  focus: CustomEvent<any>;
@@ -13,6 +13,7 @@ export let help = false;
13
13
  export let disabled = false;
14
14
  export let description = "";
15
15
  export let showDescription = false;
16
+ export let showIcon = false;
16
17
  export let min = void 0;
17
18
  export let max = void 0;
18
19
  $: if (max != void 0 && parseInt(value) > max) {
@@ -23,7 +24,7 @@ $: if (min != void 0 && parseInt(value) < min) {
23
24
  }
24
25
  </script>
25
26
 
26
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
27
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
27
28
  <input
28
29
  {id}
29
30
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,10 +13,13 @@ declare const __propDef: {
13
13
  disabled?: boolean;
14
14
  description?: string;
15
15
  showDescription?: boolean;
16
+ showIcon?: boolean;
16
17
  min?: number | undefined;
17
18
  max?: number | undefined;
18
19
  };
19
20
  events: {
21
+ showDescription: CustomEvent<any>;
22
+ hideDescription: CustomEvent<any>;
20
23
  input: Event;
21
24
  change: Event;
22
25
  } & {
@@ -11,9 +11,10 @@ export let help = false;
11
11
  export let disabled = false;
12
12
  export let description = "";
13
13
  export let showDescription = false;
14
+ export let showIcon = false;
14
15
  </script>
15
16
 
16
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
17
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
17
18
  <textarea
18
19
  {id}
19
20
  class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,8 +13,11 @@ declare const __propDef: {
13
13
  disabled?: boolean;
14
14
  description?: string;
15
15
  showDescription?: boolean;
16
+ showIcon?: boolean;
16
17
  };
17
18
  events: {
19
+ showDescription: CustomEvent<any>;
20
+ hideDescription: CustomEvent<any>;
18
21
  input: Event;
19
22
  change: Event;
20
23
  } & {
@@ -11,9 +11,10 @@ export let help = false;
11
11
  export let disabled = false;
12
12
  export let description = "";
13
13
  export let showDescription = false;
14
+ export let showIcon = false;
14
15
  </script>
15
16
 
16
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
17
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
17
18
  <input
18
19
  {id}
19
20
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,8 +13,11 @@ declare const __propDef: {
13
13
  disabled?: boolean;
14
14
  description?: string;
15
15
  showDescription?: boolean;
16
+ showIcon?: boolean;
16
17
  };
17
18
  events: {
19
+ showDescription: CustomEvent<any>;
20
+ hideDescription: CustomEvent<any>;
18
21
  input: Event;
19
22
  change: Event;
20
23
  } & {
@@ -74,8 +74,7 @@ if (import.meta.env.DEV) {
74
74
  <Accordion>
75
75
  <div class="sm:flex w-full justify-between">
76
76
  <!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-start gap-2 py-0"> -->
77
- <MenuBar menuBar={$menuStore.MenuBar} />
78
- <MenuBar menuBar={$menuStore.Extended} />
77
+
79
78
  <!-- </div> -->
80
79
  <!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-end gap-2"> -->
81
80
  <div class="grid w-full sm:flex gap-2 justify-auto sm:justify-end">
@@ -146,6 +145,8 @@ if (import.meta.env.DEV) {
146
145
  {/if}
147
146
  {/if}
148
147
  </button>
148
+ <MenuBar menuBar={$menuStore.MenuBar} />
149
+ <MenuBar menuBar={$menuStore.Extended} />
149
150
  <SettingsBar menuBar={$menuStore.Settings} />
150
151
  <!-- </div> -->
151
152
 
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import Checkbox from './components/form/Checkbox.svelte';
10
10
  import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
11
11
  import CheckboxList from './components/form/CheckboxList.svelte';
12
12
  import DateInput from './components/form/DateInput.svelte';
13
+ import DatePickerInput from './components/form/DatePickerInput.svelte';
13
14
  import DropdownKVP from './components/form/DropdownKvP.svelte';
14
15
  import Dropdown from './components/form/Dropdown.svelte';
15
16
  import MultiSelect from './components/form/MultiSelect.svelte';
@@ -26,7 +27,7 @@ import CodeEditor from './components/CodeEditor/CodeEditor.svelte';
26
27
  import Notification from './components/page/Notification.svelte';
27
28
  import TablePlaceholder from './components/page/TablePlaceholder.svelte';
28
29
  import { bexis2theme } from './themes/theme-bexis2';
29
- export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DropdownKVP, Dropdown, MultiSelect, NumberInput, TextArea, TextInput };
30
+ export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DatePickerInput, DropdownKVP, Dropdown, MultiSelect, NumberInput, TextArea, TextInput };
30
31
  export { FileInfo, FileIcon, FileUploader };
31
32
  export { Spinner, Page, Alert, Menu, ErrorMessage };
32
33
  export { Api } from './services/Api.js';
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ import Checkbox from './components/form/Checkbox.svelte';
15
15
  import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
16
16
  import CheckboxList from './components/form/CheckboxList.svelte';
17
17
  import DateInput from './components/form/DateInput.svelte';
18
+ import DatePickerInput from './components/form/DatePickerInput.svelte';
18
19
  import DropdownKVP from './components/form/DropdownKvP.svelte';
19
20
  import Dropdown from './components/form/Dropdown.svelte';
20
21
  import MultiSelect from './components/form/MultiSelect.svelte';
@@ -36,7 +37,7 @@ import TablePlaceholder from './components/page/TablePlaceholder.svelte';
36
37
  // theme
37
38
  import { bexis2theme } from './themes/theme-bexis2';
38
39
  //Form
39
- export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DropdownKVP, Dropdown, MultiSelect, NumberInput, TextArea, TextInput };
40
+ export { Checkbox, CheckboxKVPList, CheckboxList, DateInput, DatePickerInput, DropdownKVP, Dropdown, MultiSelect, NumberInput, TextArea, TextInput };
40
41
  //File
41
42
  export { FileInfo, FileIcon, FileUploader };
42
43
  //others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.89",
3
+ "version": "0.4.91",
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": [
@@ -11,9 +11,11 @@
11
11
  export let help = false;
12
12
  export let disabled: boolean = false;
13
13
  export let description : string = '';
14
+ export let showDescription: boolean = false;
15
+ export let showIcon: boolean = false;
14
16
  </script>
15
17
 
16
- <InputContainer {id} {label} {feedback} {required} {help} {description}>
18
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
17
19
  <input
18
20
  {id}
19
21
  class="input variant-form-material bg-zinc-50 dark:bg-zinc-700 placeholder:text-gray-400"
@@ -14,6 +14,7 @@
14
14
  export let disabled: boolean = false;
15
15
  export let description: string = '';
16
16
  export let showDescription: boolean = false;
17
+ export let showIcon: boolean = false;
17
18
  export let mode: 'date' | 'time' | 'datetime' = 'date';
18
19
  export let initialDate: string = '';
19
20
  export let format: string = 'yyyy-mm-dd';
@@ -37,7 +38,7 @@
37
38
  }
38
39
  </script>
39
40
 
40
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
41
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
41
42
  <SveltyPicker
42
43
  {mode}
43
44
  name={label}
@@ -12,7 +12,7 @@
12
12
  export let help = false;
13
13
  export let description = '';
14
14
  export let showDescription = false;
15
-
15
+ export let showIcon = false;
16
16
  $: selected = null;
17
17
 
18
18
  $: updatedSelectedValue(target);
@@ -29,7 +29,7 @@
29
29
  }
30
30
  </script>
31
31
 
32
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
32
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
33
33
  <select
34
34
  {id}
35
35
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,7 +13,7 @@
13
13
  export let help = false;
14
14
  export let description = '';
15
15
  export let showDescription = false;
16
-
16
+ export let showIcon = false;
17
17
  $: selected = null;
18
18
 
19
19
  $: updatedSelectedValue(target);
@@ -38,7 +38,7 @@
38
38
  }
39
39
  </script>
40
40
 
41
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
41
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
42
42
  <select
43
43
  {id}
44
44
  class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { createEventDispatcher } from 'svelte';
2
3
  import { helpStore } from '$store/pageStores';
3
4
  import Fa from 'svelte-fa';
4
5
  import { faQuestion } from '@fortawesome/free-solid-svg-icons';
@@ -10,14 +11,30 @@
10
11
  export let help: boolean = false;
11
12
  export let description : string = '';
12
13
  export let showDescription: boolean = false;
14
+ export let showIcon: boolean = false;
15
+
16
+ const dispatch = createEventDispatcher();
13
17
 
14
18
  function onMouseOver() {
15
19
  if (help) {
16
20
  helpStore.show(id);
17
21
  }
22
+ if (description.length > 0) {
23
+ // dispatch an event to show the description
24
+ dispatch('showDescription', { id, description });
25
+ }
26
+
18
27
  }
19
28
 
20
- function onMouseOut() {}
29
+ function onMouseOut() {
30
+ if (help) {
31
+ helpStore.hide(id);
32
+ }
33
+ if (description.length > 0) {
34
+ // dispatch an event to hide the description
35
+ dispatch('hideDescription', { id });
36
+ }
37
+ }
21
38
  </script>
22
39
 
23
40
  <div
@@ -33,7 +50,7 @@
33
50
  >{label}
34
51
  {#if required} <span class="text-xs text-red-600">*</span> {/if}
35
52
  </span>
36
- {#if description}
53
+ {#if description && showIcon}
37
54
  <button class="badge " on:click={()=>showDescription = !showDescription}><Fa icon={faQuestion} /></button>
38
55
  {/if}
39
56
  </label>
@@ -26,6 +26,7 @@
26
26
  export let searchable = true;
27
27
  export let description = '';
28
28
  export let showDescription = false;
29
+ export let showIcon = false;
29
30
 
30
31
  let isLoaded = false;
31
32
 
@@ -309,7 +310,7 @@
309
310
 
310
311
  </script>
311
312
 
312
- <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription}>
313
+ <InputContainer {id} label={title} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
313
314
  <Select
314
315
  {id}
315
316
  items={source}
@@ -16,6 +16,7 @@
16
16
  export let disabled: boolean = false;
17
17
  export let description : string = '';
18
18
  export let showDescription: boolean = false;
19
+ export let showIcon: boolean = false;
19
20
  export let min : number | undefined = undefined;
20
21
  export let max : number | undefined = undefined;
21
22
 
@@ -31,7 +32,7 @@
31
32
 
32
33
  </script>
33
34
 
34
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
35
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
35
36
  <input
36
37
  {id}
37
38
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -14,9 +14,10 @@
14
14
  export let disabled: boolean = false;
15
15
  export let description : string = '';
16
16
  export let showDescription: boolean = false;
17
+ export let showIcon: boolean = false;
17
18
  </script>
18
19
 
19
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
20
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
20
21
  <textarea
21
22
  {id}
22
23
  class="textarea variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -13,9 +13,10 @@
13
13
  export let disabled: boolean = false;
14
14
  export let description : string = '';
15
15
  export let showDescription: boolean = false;
16
+ export let showIcon: boolean = false;
16
17
  </script>
17
18
 
18
- <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription}>
19
+ <InputContainer {id} {label} {feedback} {required} {help} {description} {showDescription} {showIcon} on:showDescription on:hideDescription>
19
20
  <input
20
21
  {id}
21
22
  class="input variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
@@ -90,8 +90,7 @@
90
90
  <Accordion>
91
91
  <div class="sm:flex w-full justify-between">
92
92
  <!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-start gap-2 py-0"> -->
93
- <MenuBar menuBar={$menuStore.MenuBar} />
94
- <MenuBar menuBar={$menuStore.Extended} />
93
+
95
94
  <!-- </div> -->
96
95
  <!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-end gap-2"> -->
97
96
  <div class="grid w-full sm:flex gap-2 justify-auto sm:justify-end">
@@ -162,6 +161,8 @@
162
161
  {/if}
163
162
  {/if}
164
163
  </button>
164
+ <MenuBar menuBar={$menuStore.MenuBar} />
165
+ <MenuBar menuBar={$menuStore.Extended} />
165
166
  <SettingsBar menuBar={$menuStore.Settings} />
166
167
  <!-- </div> -->
167
168
 
package/src/lib/index.ts CHANGED
@@ -18,6 +18,7 @@ import Checkbox from './components/form/Checkbox.svelte';
18
18
  import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
19
19
  import CheckboxList from './components/form/CheckboxList.svelte';
20
20
  import DateInput from './components/form/DateInput.svelte';
21
+ import DatePickerInput from './components/form/DatePickerInput.svelte';
21
22
  import DropdownKVP from './components/form/DropdownKvP.svelte';
22
23
  import Dropdown from './components/form/Dropdown.svelte';
23
24
  import MultiSelect from './components/form/MultiSelect.svelte';
@@ -25,6 +26,7 @@ import NumberInput from './components/form/NumberInput.svelte';
25
26
  import TextInput from './components/form/TextInput.svelte';
26
27
  import TextArea from './components/form/TextArea.svelte';
27
28
 
29
+
28
30
  //table
29
31
  import Table from './components/Table/Table.svelte';
30
32
  import TableFilter from './components/Table/TableFilter.svelte';
@@ -53,6 +55,7 @@ export {
53
55
  CheckboxKVPList,
54
56
  CheckboxList,
55
57
  DateInput,
58
+ DatePickerInput,
56
59
  DropdownKVP,
57
60
  Dropdown,
58
61
  MultiSelect,