@budibase/bbui 2.2.12-alpha.52 → 2.2.12-alpha.54
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.2.12-alpha.
|
|
4
|
+
"version": "2.2.12-alpha.54",
|
|
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.2.12-alpha.
|
|
41
|
+
"@budibase/string-templates": "2.2.12-alpha.54",
|
|
42
42
|
"@spectrum-css/accordion": "3.0.24",
|
|
43
43
|
"@spectrum-css/actionbutton": "1.0.1",
|
|
44
44
|
"@spectrum-css/actiongroup": "1.0.1",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"resolutions": {
|
|
90
90
|
"loader-utils": "1.4.1"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "c5384b7e15ad4ebdc2c2db2261cb2c0cd254d3bd"
|
|
93
93
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
margin-left: 0;
|
|
87
87
|
transition: color ease-out 130ms;
|
|
88
88
|
}
|
|
89
|
-
.is-selected:not(.spectrum-ActionButton--emphasized) {
|
|
89
|
+
.is-selected:not(.spectrum-ActionButton--emphasized):not(.spectrum-ActionButton--quiet) {
|
|
90
90
|
background: var(--spectrum-global-color-gray-300);
|
|
91
91
|
border-color: var(--spectrum-global-color-gray-700);
|
|
92
92
|
}
|
|
@@ -16,10 +16,10 @@ export default function positionDropdown(
|
|
|
16
16
|
top: null,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
let popoverLeftPad = 20
|
|
20
|
-
|
|
21
19
|
// Determine vertical styles
|
|
22
|
-
if (
|
|
20
|
+
if (align === "right-outside") {
|
|
21
|
+
styles.top = anchorBounds.top
|
|
22
|
+
} else if (window.innerHeight - anchorBounds.bottom < 100) {
|
|
23
23
|
styles.top = anchorBounds.top - elementBounds.height - 5
|
|
24
24
|
} else {
|
|
25
25
|
styles.top = anchorBounds.bottom + 5
|
|
@@ -34,15 +34,9 @@ export default function positionDropdown(
|
|
|
34
34
|
styles.minWidth = anchorBounds.width
|
|
35
35
|
}
|
|
36
36
|
if (align === "right") {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (left + elementBounds.width + popoverLeftPad > window.innerWidth) {
|
|
41
|
-
left -= 20
|
|
42
|
-
}
|
|
43
|
-
styles.left = left
|
|
44
|
-
} else if (align === "right-side") {
|
|
45
|
-
styles.left = anchorBounds.left + anchorBounds.width
|
|
37
|
+
styles.left = anchorBounds.left + anchorBounds.width - elementBounds.width
|
|
38
|
+
} else if (align === "right-outside") {
|
|
39
|
+
styles.left = anchorBounds.right + 10
|
|
46
40
|
} else {
|
|
47
41
|
styles.left = anchorBounds.left
|
|
48
42
|
}
|
|
@@ -15,15 +15,10 @@
|
|
|
15
15
|
export let portalTarget
|
|
16
16
|
export let dataCy
|
|
17
17
|
export let maxWidth
|
|
18
|
-
export let direction = "bottom"
|
|
19
|
-
export let showTip = false
|
|
20
18
|
export let open = false
|
|
21
19
|
export let useAnchorWidth = false
|
|
22
20
|
export let dismissible = true
|
|
23
21
|
|
|
24
|
-
$: tooltipClasses = showTip
|
|
25
|
-
? `spectrum-Popover--withTip spectrum-Popover--${direction}`
|
|
26
|
-
: ""
|
|
27
22
|
$: target = portalTarget || getContext(Context.PopoverRoot) || ".spectrum"
|
|
28
23
|
|
|
29
24
|
export const show = () => {
|
|
@@ -62,29 +57,31 @@
|
|
|
62
57
|
</script>
|
|
63
58
|
|
|
64
59
|
{#if open}
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
60
|
+
{#key anchor}
|
|
61
|
+
<Portal {target}>
|
|
62
|
+
<div
|
|
63
|
+
tabindex="0"
|
|
64
|
+
use:positionDropdown={{
|
|
65
|
+
anchor,
|
|
66
|
+
align,
|
|
67
|
+
maxWidth,
|
|
68
|
+
useAnchorWidth,
|
|
69
|
+
showTip: false,
|
|
70
|
+
}}
|
|
71
|
+
use:clickOutside={{
|
|
72
|
+
callback: dismissible ? handleOutsideClick : () => {},
|
|
73
|
+
anchor,
|
|
74
|
+
}}
|
|
75
|
+
on:keydown={handleEscape}
|
|
76
|
+
class="spectrum-Popover is-open"
|
|
77
|
+
role="presentation"
|
|
78
|
+
data-cy={dataCy}
|
|
79
|
+
transition:fly|local={{ y: -20, duration: 200 }}
|
|
80
|
+
>
|
|
81
|
+
<slot />
|
|
82
|
+
</div>
|
|
83
|
+
</Portal>
|
|
84
|
+
{/key}
|
|
88
85
|
{/if}
|
|
89
86
|
|
|
90
87
|
<style>
|
|
@@ -93,13 +90,4 @@
|
|
|
93
90
|
border-color: var(--spectrum-global-color-gray-300);
|
|
94
91
|
overflow: auto;
|
|
95
92
|
}
|
|
96
|
-
.spectrum-Popover.is-open.spectrum-Popover--withTip {
|
|
97
|
-
margin-top: var(--spacing-xs);
|
|
98
|
-
margin-left: var(--spacing-xl);
|
|
99
|
-
}
|
|
100
|
-
:global(.spectrum-Popover--bottom .spectrum-Popover-tip),
|
|
101
|
-
:global(.spectrum-Popover--top .spectrum-Popover-tip) {
|
|
102
|
-
left: 90%;
|
|
103
|
-
margin-left: calc(var(--spectrum-global-dimension-size-150) * -1);
|
|
104
|
-
}
|
|
105
93
|
</style>
|