@budibase/bbui 3.23.27 → 3.23.29
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "3.23.
|
|
4
|
+
"version": "3.23.29",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.ts",
|
|
7
7
|
"module": "dist/bbui.mjs",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "e9bb53161a551bda13ab996da6cba563f6be5400"
|
|
111
111
|
}
|
package/src/Button/Button.svelte
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
export let overBackground = false
|
|
15
15
|
export let quiet = false
|
|
16
16
|
export let icon = undefined
|
|
17
|
+
export let iconColor = undefined
|
|
17
18
|
export let active = false
|
|
18
19
|
export let tooltip = undefined
|
|
19
20
|
export let newStyles = true
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
{/if}
|
|
51
52
|
{#if icon}
|
|
52
53
|
<span class="icon">
|
|
53
|
-
<Icon name={icon} size={size.toUpperCase()} />
|
|
54
|
+
<Icon name={icon} size={size.toUpperCase()} color={iconColor} />
|
|
54
55
|
</span>
|
|
55
56
|
{/if}
|
|
56
57
|
{#if $$slots && !reverse}
|
package/src/Modal/Modal.svelte
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
export let fixed: boolean = false
|
|
21
21
|
export let inline: boolean = false
|
|
22
22
|
export let disableCancel: boolean = false
|
|
23
|
+
export let closeOnOutsideClick: boolean = true
|
|
23
24
|
export let autoFocus: boolean = true
|
|
24
25
|
export let zIndex: number = 1001
|
|
25
26
|
|
|
@@ -74,6 +75,12 @@
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
function handleOutsideClick(): void {
|
|
79
|
+
if (closeOnOutsideClick) {
|
|
80
|
+
cancel(ModalCancelFrom.OUTSIDE_CLICK)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
function focusModal(node: HTMLElement): void {
|
|
78
85
|
if (!autoFocus) return
|
|
79
86
|
tick().then(() => {
|
|
@@ -133,7 +140,7 @@
|
|
|
133
140
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
134
141
|
<div
|
|
135
142
|
class="spectrum-Underlay is-open"
|
|
136
|
-
on:mousedown|self={
|
|
143
|
+
on:mousedown|self={handleOutsideClick}
|
|
137
144
|
style="z-index:{zIndex || 999}"
|
|
138
145
|
>
|
|
139
146
|
<div
|
|
@@ -141,13 +148,10 @@
|
|
|
141
148
|
in:fade={{ duration: 200 }}
|
|
142
149
|
out:fade|local={{ duration: 200 }}
|
|
143
150
|
/>
|
|
144
|
-
<div
|
|
145
|
-
class="modal-wrapper"
|
|
146
|
-
on:mousedown|self={() => cancel(ModalCancelFrom.OUTSIDE_CLICK)}
|
|
147
|
-
>
|
|
151
|
+
<div class="modal-wrapper" on:mousedown|self={handleOutsideClick}>
|
|
148
152
|
<div
|
|
149
153
|
class="modal-inner-wrapper"
|
|
150
|
-
on:mousedown|self={
|
|
154
|
+
on:mousedown|self={handleOutsideClick}
|
|
151
155
|
>
|
|
152
156
|
<slot name="outside" />
|
|
153
157
|
<div
|