@budibase/bbui 1.0.61 → 1.0.65
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 +1 -1
- package/dist/bbui.es.js.map +1 -1
- package/package.json +2 -2
- package/src/Button/Button.svelte +40 -50
- package/src/Drawer/Drawer.svelte +5 -0
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.
|
|
4
|
+
"version": "1.0.65",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"svelte-flatpickr": "^3.2.3",
|
|
84
84
|
"svelte-portal": "^1.0.0"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "c8da7b9cf0f7a8e66fac13df03723044ff010840"
|
|
87
87
|
}
|
package/src/Button/Button.svelte
CHANGED
|
@@ -17,61 +17,55 @@
|
|
|
17
17
|
let showTooltip = false
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
<button
|
|
21
|
+
class:spectrum-Button--cta={cta}
|
|
22
|
+
class:spectrum-Button--primary={primary}
|
|
23
|
+
class:spectrum-Button--secondary={secondary}
|
|
24
|
+
class:spectrum-Button--warning={warning}
|
|
25
|
+
class:spectrum-Button--overBackground={overBackground}
|
|
26
|
+
class:spectrum-Button--quiet={quiet}
|
|
27
|
+
class:active
|
|
28
|
+
class="spectrum-Button spectrum-Button--size{size.toUpperCase()}"
|
|
29
|
+
{disabled}
|
|
30
|
+
on:click|preventDefault
|
|
31
|
+
on:mouseover={() => (showTooltip = true)}
|
|
32
|
+
on:mouseleave={() => (showTooltip = false)}
|
|
33
|
+
>
|
|
34
|
+
{#if icon}
|
|
35
|
+
<svg
|
|
36
|
+
class="spectrum-Icon spectrum-Icon--size{size.toUpperCase()}"
|
|
37
|
+
focusable="false"
|
|
38
|
+
aria-hidden="true"
|
|
39
|
+
aria-label={icon}
|
|
40
|
+
>
|
|
41
|
+
<use xlink:href="#spectrum-icon-18-{icon}" />
|
|
42
|
+
</svg>
|
|
43
|
+
{/if}
|
|
44
|
+
{#if $$slots}
|
|
45
|
+
<span class="spectrum-Button-label"><slot /></span>
|
|
46
|
+
{/if}
|
|
47
|
+
{#if !disabled && tooltip}
|
|
48
|
+
<div class="tooltip-icon">
|
|
36
49
|
<svg
|
|
37
50
|
class="spectrum-Icon spectrum-Icon--size{size.toUpperCase()}"
|
|
38
51
|
focusable="false"
|
|
39
52
|
aria-hidden="true"
|
|
40
|
-
aria-label=
|
|
53
|
+
aria-label="Info"
|
|
41
54
|
>
|
|
42
|
-
<use xlink:href="#spectrum-icon-18-
|
|
55
|
+
<use xlink:href="#spectrum-icon-18-InfoOutline" />
|
|
43
56
|
</svg>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<span class="spectrum-Button-label"><slot /></span>
|
|
47
|
-
{/if}
|
|
48
|
-
{#if !disabled && tooltip}
|
|
49
|
-
<div class="tooltip-icon">
|
|
50
|
-
<svg
|
|
51
|
-
class="spectrum-Icon spectrum-Icon--size{size.toUpperCase()}"
|
|
52
|
-
focusable="false"
|
|
53
|
-
aria-hidden="true"
|
|
54
|
-
aria-label="Info"
|
|
55
|
-
>
|
|
56
|
-
<use xlink:href="#spectrum-icon-18-InfoOutline" />
|
|
57
|
-
</svg>
|
|
58
|
-
</div>
|
|
59
|
-
{/if}
|
|
60
|
-
</button>
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
61
59
|
{#if showTooltip && tooltip}
|
|
62
|
-
<div class="
|
|
63
|
-
<
|
|
64
|
-
<Tooltip textWrapping={true} direction={"bottom"} text={tooltip} />
|
|
65
|
-
</div>
|
|
60
|
+
<div class="tooltip">
|
|
61
|
+
<Tooltip textWrapping={true} direction={"bottom"} text={tooltip} />
|
|
66
62
|
</div>
|
|
67
63
|
{/if}
|
|
68
|
-
</
|
|
64
|
+
</button>
|
|
69
65
|
|
|
70
66
|
<style>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
align-items: center;
|
|
74
|
-
flex-direction: column;
|
|
67
|
+
button {
|
|
68
|
+
position: relative;
|
|
75
69
|
}
|
|
76
70
|
.spectrum-Button-label {
|
|
77
71
|
white-space: nowrap;
|
|
@@ -89,12 +83,8 @@
|
|
|
89
83
|
width: 160px;
|
|
90
84
|
text-align: center;
|
|
91
85
|
transform: translateX(-50%);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.position {
|
|
95
|
-
position: relative;
|
|
96
|
-
width: 0;
|
|
97
|
-
height: 0;
|
|
86
|
+
left: 50%;
|
|
87
|
+
top: calc(100% - 3px);
|
|
98
88
|
}
|
|
99
89
|
.tooltip-icon {
|
|
100
90
|
padding-left: var(--spacing-m);
|