@onsvisual/svelte-components 0.1.102-component.toolbar → 0.1.103

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 (33) hide show
  1. package/dist/@types/index.d.ts +1 -10
  2. package/dist/@types/inputs/AccessibleSelect/AccessibleSelect.svelte.d.ts +58 -0
  3. package/dist/@types/inputs/AccessibleSelect/options.d.ts +6 -0
  4. package/dist/@types/inputs/Button/Button.svelte.d.ts +2 -2
  5. package/dist/@types/inputs/Select/Select.svelte.d.ts +10 -10
  6. package/dist/@types/layout/Titleblock/Titleblock.svelte.d.ts +0 -2
  7. package/dist/css/main.css +1 -1
  8. package/dist/index.js +1 -10
  9. package/dist/inputs/AccessibleSelect/AccessibleSelect.svelte +280 -0
  10. package/dist/inputs/AccessibleSelect/options.js +263 -0
  11. package/dist/layout/AnalyticsBanner/AnalyticsBanner.svelte +41 -9
  12. package/dist/layout/Titleblock/Titleblock.svelte +0 -6
  13. package/package.json +4 -15
  14. package/dist/@types/inputs/ButtonGroup/ButtonGroup.svelte.d.ts +0 -33
  15. package/dist/@types/inputs/ButtonGroup/ButtonGroupItem.svelte.d.ts +0 -25
  16. package/dist/@types/inputs/Toolbar/HelpModal.svelte.d.ts +0 -19
  17. package/dist/@types/inputs/Toolbar/Icon.svelte.d.ts +0 -31
  18. package/dist/@types/inputs/Toolbar/ToolControl.svelte.d.ts +0 -27
  19. package/dist/@types/inputs/Toolbar/ToolControls.svelte.d.ts +0 -27
  20. package/dist/@types/inputs/Toolbar/Toolbar.svelte.d.ts +0 -33
  21. package/dist/@types/inputs/Toolbar/ToolbarButton.svelte.d.ts +0 -32
  22. package/dist/@types/inputs/Toolbar/ToolbarDivider.svelte.d.ts +0 -16
  23. package/dist/@types/inputs/Toolbar/ToolbarsContainer.svelte.d.ts +0 -19
  24. package/dist/inputs/ButtonGroup/ButtonGroup.svelte +0 -55
  25. package/dist/inputs/ButtonGroup/ButtonGroupItem.svelte +0 -103
  26. package/dist/inputs/Toolbar/HelpModal.svelte +0 -220
  27. package/dist/inputs/Toolbar/Icon.svelte +0 -142
  28. package/dist/inputs/Toolbar/ToolControl.svelte +0 -19
  29. package/dist/inputs/Toolbar/ToolControls.svelte +0 -8
  30. package/dist/inputs/Toolbar/Toolbar.svelte +0 -72
  31. package/dist/inputs/Toolbar/ToolbarButton.svelte +0 -162
  32. package/dist/inputs/Toolbar/ToolbarDivider.svelte +0 -27
  33. package/dist/inputs/Toolbar/ToolbarsContainer.svelte +0 -61
@@ -1,27 +0,0 @@
1
- <script>import { getContext } from "svelte";
2
- export let classes = "";
3
- // Get the orientation store from context
4
- const orientationStore = getContext("orientation");
5
- // Subscribe to the store to get its value
6
- let orientation;
7
- orientationStore.subscribe((value) => {
8
- orientation = value;
9
- });
10
- </script>
11
-
12
- <div class="{`toolbar-divider ${orientation} ${classes}`}" aria-hidden="true"></div>
13
-
14
- <style>
15
- .toolbar-divider {
16
- background-color: #ccc;
17
- }
18
-
19
- .toolbar-divider.horizontal {
20
- width: 1px;
21
- }
22
-
23
- .toolbar-divider.vertical {
24
- width: 100%;
25
- height: 1px;
26
- margin: 0.5rem 0;
27
- }</style>
@@ -1,61 +0,0 @@
1
- <script>import { setContext, onMount } from "svelte";
2
- import { writable } from "svelte/store";
3
- // Initialize a store for button IDs
4
- const buttonIds = writable([]);
5
- setContext("buttonIds", {
6
- register: (id) => {
7
- buttonIds.update((ids) => [...ids, id]);
8
- },
9
- unregister: (id) => {
10
- buttonIds.update((ids) => ids.filter((btnId) => btnId !== id));
11
- },
12
- buttonIds,
13
- });
14
- // Initial state: true unless explicitly set to 'false' in either localStorage or sessionStorage
15
- $: showHelpState =
16
- sessionStorage.getItem("showHelpModals") === "false"
17
- ? false
18
- : localStorage.getItem("showHelpModals") === "false"
19
- ? false
20
- : true;
21
- const showHelpModals = writable(showHelpState ?? true);
22
- // Subscribe to store changes to persist in localStorage
23
- // showHelpModals.subscribe((value) => {
24
- // localStorage.setItem("showHelpModals", value);
25
- // });
26
- // Reactively update the initial state
27
- $: showHelpModals.set(showHelpState);
28
- // Set context for showHelpModals
29
- setContext("showHelpModals", showHelpModals);
30
- const activeModalStore = writable(null); // Tracks the ID of the active modal
31
- setContext("activeModalId", activeModalStore);
32
- onMount(() => {
33
- window.addEventListener("beforeunload", () => {
34
- sessionStorage.removeItem("showHelpModals");
35
- });
36
- let unsubscribe = buttonIds.subscribe((ids) => {
37
- if (ids.length > 0) {
38
- activeModalStore.set(ids[0]); // Set first button as active
39
- }
40
- });
41
- return unsubscribe;
42
- });
43
- export function resetHelp() {
44
- sessionStorage.setItem("showHelpModals", "true");
45
- showHelpModals.set(true);
46
- }
47
- </script>
48
-
49
- <div class="multi-toolbar-container">
50
- <slot />
51
- </div>
52
-
53
- <style>
54
- .multi-toolbar-container {
55
- display: flex;
56
- flex-direction: row;
57
- gap: 1rem;
58
- justify-content: space-between;
59
- pointer-events: none;
60
- flex-wrap: wrap;
61
- }</style>