@onsvisual/svelte-components 0.1.92-component.toolbar → 0.1.93-component.toolbar
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/dist/@types/inputs/Toolbar/ToolbarButton.svelte.d.ts +1 -0
- package/dist/inputs/Toolbar/ToolControl.svelte +1 -1
- package/dist/inputs/Toolbar/Toolbar.svelte +8 -4
- package/dist/inputs/Toolbar/ToolbarButton.svelte +3 -2
- package/dist/inputs/Toolbar/ToolbarsContainer.svelte +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { setContext } from "svelte";
|
|
2
|
+
import { getContext, setContext } from "svelte";
|
|
3
3
|
import { writable } from "svelte/store";
|
|
4
4
|
// import { TOOLBAR_CONTEXT_KEY } from "./toolbar-context.js";
|
|
5
5
|
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
// Set context for child components
|
|
23
23
|
const orientationStore = writable(orientation);
|
|
24
24
|
$: setContext("orientation", orientationStore);
|
|
25
|
+
|
|
26
|
+
// Get the showHelpModals state from context
|
|
27
|
+
const showHelpModals = getContext("showHelpModals");
|
|
25
28
|
</script>
|
|
26
29
|
|
|
27
30
|
<!-- Toolbar container -->
|
|
@@ -35,8 +38,9 @@
|
|
|
35
38
|
<slot />
|
|
36
39
|
</div>
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
{#if !$showHelpModals}
|
|
42
|
+
<slot name="controls" />
|
|
43
|
+
{/if}
|
|
40
44
|
</div>
|
|
41
45
|
|
|
42
46
|
<style>
|
|
@@ -60,7 +64,7 @@
|
|
|
60
64
|
height: 100%;
|
|
61
65
|
margin: 8px;
|
|
62
66
|
background: white;
|
|
63
|
-
|
|
67
|
+
pointer-events: all;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
.flex-col {
|
|
@@ -14,6 +14,7 @@ export let custom = false;
|
|
|
14
14
|
export let hasAriaControls = false;
|
|
15
15
|
export let sticky = false;
|
|
16
16
|
export let transient = false;
|
|
17
|
+
export let disableHelp = false;
|
|
17
18
|
const dispatch = createEventDispatcher();
|
|
18
19
|
let buttonElement;
|
|
19
20
|
// Get activeModalId store from context
|
|
@@ -79,11 +80,11 @@ function handleClick() {
|
|
|
79
80
|
{/if}
|
|
80
81
|
|
|
81
82
|
{#if isActive}
|
|
82
|
-
{#if helpText}
|
|
83
|
+
{#if helpText && !disableHelp}
|
|
83
84
|
<HelpModal triggerElement="{buttonElement}" onClose="{() => activeModalId.set(null)}">
|
|
84
85
|
<p>{helpText}</p>
|
|
85
86
|
</HelpModal>
|
|
86
|
-
{:else if !helpText}
|
|
87
|
+
{:else if !helpText && !disableHelp}
|
|
87
88
|
<HelpModal triggerElement="{buttonElement}" onClose="{() => activeModalId.set(null)}">
|
|
88
89
|
<slot />
|
|
89
90
|
</HelpModal>
|