@budibase/bbui 2.21.4 → 2.21.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/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.21.4",
4
+ "version": "2.21.6",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -35,8 +35,8 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@adobe/spectrum-css-workflow-icons": "1.2.1",
38
- "@budibase/shared-core": "2.21.4",
39
- "@budibase/string-templates": "2.21.4",
38
+ "@budibase/shared-core": "2.21.6",
39
+ "@budibase/string-templates": "2.21.6",
40
40
  "@spectrum-css/accordion": "3.0.24",
41
41
  "@spectrum-css/actionbutton": "1.0.1",
42
42
  "@spectrum-css/actiongroup": "1.0.1",
@@ -103,5 +103,5 @@
103
103
  }
104
104
  }
105
105
  },
106
- "gitHead": "d2d0f85a7981f8813929a100066ffe49beff00fd"
106
+ "gitHead": "f09a2943cffdd7ed7888512248813e7c5b950bb7"
107
107
  }
@@ -1,22 +1,41 @@
1
1
  <script>
2
2
  import Icon from "./Icon.svelte"
3
3
 
4
+ import Tooltip from "../Tooltip/Tooltip.svelte"
5
+ import { fade } from "svelte/transition"
6
+
4
7
  export let icon
5
8
  export let background
6
9
  export let color
7
10
  export let size = "M"
11
+ export let tooltip
12
+
13
+ let showTooltip = false
8
14
  </script>
9
15
 
16
+ <!-- svelte-ignore a11y-no-static-element-interactions -->
17
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
10
18
  <div
11
19
  class="icon size--{size}"
12
20
  style="background: {background || `transparent`};"
13
21
  class:filled={!!background}
22
+ on:mouseover={() => (showTooltip = true)}
23
+ on:mouseleave={() => (showTooltip = false)}
24
+ on:focus={() => (showTooltip = true)}
25
+ on:blur={() => (showTooltip = false)}
26
+ on:click={() => (showTooltip = false)}
14
27
  >
15
28
  <Icon name={icon} color={background ? "white" : color} />
29
+ {#if tooltip && showTooltip}
30
+ <div class="tooltip" in:fade={{ duration: 130, delay: 250 }}>
31
+ <Tooltip textWrapping direction="right" text={tooltip} />
32
+ </div>
33
+ {/if}
16
34
  </div>
17
35
 
18
36
  <style>
19
37
  .icon {
38
+ position: relative;
20
39
  width: 28px;
21
40
  height: 28px;
22
41
  flex: 0 0 28px;
@@ -32,6 +51,15 @@
32
51
  width: 16px;
33
52
  height: 16px;
34
53
  }
54
+ .icon.size--XS {
55
+ width: 18px;
56
+ height: 18px;
57
+ flex: 0 0 18px;
58
+ }
59
+ .icon.size--XS :global(.spectrum-Icon) {
60
+ width: 10px;
61
+ height: 10px;
62
+ }
35
63
  .icon.size--S {
36
64
  width: 22px;
37
65
  height: 22px;
@@ -58,4 +86,14 @@
58
86
  width: 22px;
59
87
  height: 22px;
60
88
  }
89
+
90
+ .tooltip {
91
+ position: absolute;
92
+ pointer-events: none;
93
+ left: calc(50% + 8px);
94
+ bottom: calc(-50% + 6px);
95
+ /* transform: translateY(-50%); */
96
+ text-align: center;
97
+ z-index: 1;
98
+ }
61
99
  </style>
@@ -470,6 +470,7 @@
470
470
  --table-border: 1px solid var(--spectrum-alias-border-color-mid);
471
471
  --cell-padding: var(--spectrum-global-dimension-size-250);
472
472
  overflow: auto;
473
+ display: contents;
473
474
  }
474
475
  .wrapper--quiet {
475
476
  --table-bg: var(--spectrum-alias-background-color-transparent);