@budibase/bbui 1.0.76-alpha.5 → 1.0.76-alpha.6
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/bbui.es.js +41 -41
- package/dist/bbui.es.js.map +1 -1
- package/package.json +2 -2
- package/src/Modal/Modal.svelte +33 -24
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": "1.0.76-alpha.
|
|
4
|
+
"version": "1.0.76-alpha.6",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"svelte-flatpickr": "^3.2.3",
|
|
85
85
|
"svelte-portal": "^1.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "93eb042c4e107db9f1f035780a7fb3ff7791dcff"
|
|
88
88
|
}
|
package/src/Modal/Modal.svelte
CHANGED
|
@@ -54,34 +54,43 @@
|
|
|
54
54
|
|
|
55
55
|
<svelte:window on:keydown={handleKey} />
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{:else
|
|
57
|
+
{#if inline}
|
|
58
|
+
{#if visible}
|
|
59
|
+
<div use:focusFirstInput class="spectrum-Modal inline is-open">
|
|
60
|
+
<slot />
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
{:else}
|
|
64
|
+
<!--
|
|
65
|
+
We cannot conditionally render the portal as this leads to a missing
|
|
66
|
+
insertion point when using nested modals. Therefore we just conditionally
|
|
67
|
+
render the content of the portal.
|
|
68
|
+
It still breaks the modal animation, but its better than soft bricking the
|
|
69
|
+
screen.
|
|
70
|
+
-->
|
|
64
71
|
<Portal target=".modal-container">
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<div class="modal-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
{#if visible}
|
|
73
|
+
<div
|
|
74
|
+
class="spectrum-Underlay is-open"
|
|
75
|
+
in:fade={{ duration: 200 }}
|
|
76
|
+
out:fade|local={{ duration: 200 }}
|
|
77
|
+
on:mousedown|self={cancel}
|
|
78
|
+
>
|
|
79
|
+
<div class="modal-wrapper" on:mousedown|self={cancel}>
|
|
80
|
+
<div class="modal-inner-wrapper" on:mousedown|self={cancel}>
|
|
81
|
+
<slot name="outside" />
|
|
82
|
+
<div
|
|
83
|
+
use:focusFirstInput
|
|
84
|
+
class="spectrum-Modal is-open"
|
|
85
|
+
in:fly={{ y: 30, duration: 200 }}
|
|
86
|
+
out:fly|local={{ y: 30, duration: 200 }}
|
|
87
|
+
>
|
|
88
|
+
<slot />
|
|
89
|
+
</div>
|
|
81
90
|
</div>
|
|
82
91
|
</div>
|
|
83
92
|
</div>
|
|
84
|
-
|
|
93
|
+
{/if}
|
|
85
94
|
</Portal>
|
|
86
95
|
{/if}
|
|
87
96
|
|