@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/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.61",
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": "39373656808f1a34ab5445cb5c2a91baf7667f77"
86
+ "gitHead": "c8da7b9cf0f7a8e66fac13df03723044ff010840"
87
87
  }
@@ -17,61 +17,55 @@
17
17
  let showTooltip = false
18
18
  </script>
19
19
 
20
- <div class:container={!!tooltip}>
21
- <button
22
- class:spectrum-Button--cta={cta}
23
- class:spectrum-Button--primary={primary}
24
- class:spectrum-Button--secondary={secondary}
25
- class:spectrum-Button--warning={warning}
26
- class:spectrum-Button--overBackground={overBackground}
27
- class:spectrum-Button--quiet={quiet}
28
- class:active
29
- class="spectrum-Button spectrum-Button--size{size.toUpperCase()}"
30
- {disabled}
31
- on:click|preventDefault
32
- on:mouseover={() => (showTooltip = true)}
33
- on:mouseleave={() => (showTooltip = false)}
34
- >
35
- {#if icon}
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={icon}
53
+ aria-label="Info"
41
54
  >
42
- <use xlink:href="#spectrum-icon-18-{icon}" />
55
+ <use xlink:href="#spectrum-icon-18-InfoOutline" />
43
56
  </svg>
44
- {/if}
45
- {#if $$slots}
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="position">
63
- <div class="tooltip">
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
- </div>
64
+ </button>
69
65
 
70
66
  <style>
71
- .container {
72
- display: flex;
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
- top: -5px;
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);
@@ -44,6 +44,11 @@
44
44
  {/if}
45
45
 
46
46
  <style>
47
+ .buttons {
48
+ display: flex;
49
+ gap: var(--spacing-m);
50
+ }
51
+
47
52
  .drawer {
48
53
  position: absolute;
49
54
  bottom: 0;