@budibase/bbui 2.0.30-alpha.11 → 2.0.30-alpha.13
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": "2.0.30-alpha.
|
|
4
|
+
"version": "2.0.30-alpha.13",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
|
41
|
-
"@budibase/string-templates": "2.0.30-alpha.
|
|
41
|
+
"@budibase/string-templates": "2.0.30-alpha.13",
|
|
42
42
|
"@spectrum-css/actionbutton": "^1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "^1.0.1",
|
|
44
44
|
"@spectrum-css/avatar": "^3.0.2",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"svelte-flatpickr": "^3.2.3",
|
|
86
86
|
"svelte-portal": "^1.0.0"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "e8486a69c86fcdfa34ce6db319d005e665ff8649"
|
|
89
89
|
}
|
|
@@ -119,6 +119,13 @@
|
|
|
119
119
|
|
|
120
120
|
return "var(--spectrum-global-color-static-gray-900)"
|
|
121
121
|
}
|
|
122
|
+
|
|
123
|
+
const handleOutsideClick = event => {
|
|
124
|
+
if (open) {
|
|
125
|
+
event.stopPropagation()
|
|
126
|
+
open = false
|
|
127
|
+
}
|
|
128
|
+
}
|
|
122
129
|
</script>
|
|
123
130
|
|
|
124
131
|
<div class="container">
|
|
@@ -131,7 +138,7 @@
|
|
|
131
138
|
</div>
|
|
132
139
|
{#if open}
|
|
133
140
|
<div
|
|
134
|
-
use:clickOutside={
|
|
141
|
+
use:clickOutside={handleOutsideClick}
|
|
135
142
|
transition:fly={{ y: -20, duration: 200 }}
|
|
136
143
|
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
|
|
137
144
|
class:spectrum-Popover--align-right={alignRight}
|
|
@@ -87,6 +87,20 @@
|
|
|
87
87
|
updateValue(event.target.value)
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
|
|
91
|
+
const handlePrimaryOutsideClick = event => {
|
|
92
|
+
if (primaryOpen) {
|
|
93
|
+
event.stopPropagation()
|
|
94
|
+
primaryOpen = false
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const handleSecondaryOutsideClick = event => {
|
|
99
|
+
if (secondaryOpen) {
|
|
100
|
+
event.stopPropagation()
|
|
101
|
+
secondaryOpen = false
|
|
102
|
+
}
|
|
103
|
+
}
|
|
90
104
|
</script>
|
|
91
105
|
|
|
92
106
|
<div
|
|
@@ -148,7 +162,7 @@
|
|
|
148
162
|
</div>
|
|
149
163
|
{#if primaryOpen}
|
|
150
164
|
<div
|
|
151
|
-
use:clickOutside={
|
|
165
|
+
use:clickOutside={handlePrimaryOutsideClick}
|
|
152
166
|
transition:fly|local={{ y: -20, duration: 200 }}
|
|
153
167
|
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
|
|
154
168
|
class:auto-width={autoWidth}
|
|
@@ -256,7 +270,7 @@
|
|
|
256
270
|
{disabled}
|
|
257
271
|
class:is-open={secondaryOpen}
|
|
258
272
|
aria-haspopup="listbox"
|
|
259
|
-
on:
|
|
273
|
+
on:click={onClickSecondary}
|
|
260
274
|
>
|
|
261
275
|
{#if secondaryFieldIcon}
|
|
262
276
|
<span class="option-left">
|
|
@@ -281,7 +295,7 @@
|
|
|
281
295
|
</button>
|
|
282
296
|
{#if secondaryOpen}
|
|
283
297
|
<div
|
|
284
|
-
use:clickOutside={
|
|
298
|
+
use:clickOutside={handleSecondaryOutsideClick}
|
|
285
299
|
transition:fly|local={{ y: -20, duration: 200 }}
|
|
286
300
|
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
|
|
287
301
|
style="width: 30%"
|
|
@@ -50,6 +50,13 @@
|
|
|
50
50
|
dispatch("change", value)
|
|
51
51
|
open = false
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
const handleOutsideClick = event => {
|
|
55
|
+
if (open) {
|
|
56
|
+
event.stopPropagation()
|
|
57
|
+
open = false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
53
60
|
</script>
|
|
54
61
|
|
|
55
62
|
<div class="container">
|
|
@@ -64,7 +71,7 @@
|
|
|
64
71
|
</div>
|
|
65
72
|
{#if open}
|
|
66
73
|
<div
|
|
67
|
-
use:clickOutside={
|
|
74
|
+
use:clickOutside={handleOutsideClick}
|
|
68
75
|
transition:fly={{ y: -20, duration: 200 }}
|
|
69
76
|
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
|
|
70
77
|
class:spectrum-Popover--align-right={alignRight}
|