@budibase/bbui 2.2.8 → 2.2.10-alpha.0
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.
|
|
4
|
+
"version": "2.2.10-alpha.0",
|
|
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": "
|
|
41
|
+
"@budibase/string-templates": "2.2.10-alpha.0",
|
|
42
42
|
"@spectrum-css/actionbutton": "1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "1.0.1",
|
|
44
44
|
"@spectrum-css/avatar": "3.0.2",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"resolutions": {
|
|
89
89
|
"loader-utils": "1.4.1"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "c66524253459a149aefa42831d63a7806696f036"
|
|
92
92
|
}
|
package/src/Badge/Badge.svelte
CHANGED
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
export let green = false
|
|
11
11
|
export let active = false
|
|
12
12
|
export let inactive = false
|
|
13
|
+
export let hoverable = false
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<span
|
|
17
|
+
on:click
|
|
16
18
|
class="spectrum-Label"
|
|
19
|
+
class:hoverable
|
|
17
20
|
class:spectrum-Label--small={size === "S"}
|
|
18
21
|
class:spectrum-Label--large={size === "L"}
|
|
19
22
|
class:spectrum-Label--grey={grey}
|
|
@@ -27,3 +30,13 @@
|
|
|
27
30
|
>
|
|
28
31
|
<slot />
|
|
29
32
|
</span>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
.spectrum-Label--grey {
|
|
36
|
+
background-color: var(--spectrum-global-color-gray-500);
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
}
|
|
39
|
+
.hoverable:hover {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
export let value = []
|
|
16
16
|
export let id = null
|
|
17
17
|
export let disabled = false
|
|
18
|
+
export let compact = false
|
|
18
19
|
export let fileSizeLimit = BYTES_IN_MB * 20
|
|
19
20
|
export let processFiles = null
|
|
20
21
|
export let deleteAttachments = null
|
|
@@ -239,70 +240,72 @@
|
|
|
239
240
|
bind:this={fileInput}
|
|
240
241
|
on:change={handleFile}
|
|
241
242
|
/>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
243
|
+
{#if !compact}
|
|
244
|
+
<svg
|
|
245
|
+
class="spectrum-IllustratedMessage-illustration"
|
|
246
|
+
width="125"
|
|
247
|
+
height="60"
|
|
248
|
+
viewBox="0 0 199 97.7"
|
|
249
|
+
>
|
|
250
|
+
<defs>
|
|
251
|
+
<style>
|
|
252
|
+
.cls-1,
|
|
253
|
+
.cls-2 {
|
|
254
|
+
fill: none;
|
|
255
|
+
stroke-linecap: round;
|
|
256
|
+
stroke-linejoin: round;
|
|
257
|
+
}
|
|
258
|
+
.cls-1 {
|
|
259
|
+
stroke-width: 3px;
|
|
260
|
+
}
|
|
261
|
+
.cls-2 {
|
|
262
|
+
stroke-width: 2px;
|
|
263
|
+
}
|
|
264
|
+
</style>
|
|
265
|
+
</defs>
|
|
266
|
+
<path
|
|
267
|
+
class="cls-1"
|
|
268
|
+
d="M110.53,85.66,100.26,95.89a1.09,1.09,0,0,1-1.52,0L88.47,85.66"
|
|
269
|
+
/>
|
|
270
|
+
<line class="cls-1" x1="99.5" y1="95.5" x2="99.5" y2="58.5" />
|
|
271
|
+
<path class="cls-1" d="M105.5,73.5h19a2,2,0,0,0,2-2v-43" />
|
|
272
|
+
<path
|
|
273
|
+
class="cls-1"
|
|
274
|
+
d="M126.5,22.5h-19a2,2,0,0,1-2-2V1.5h-31a2,2,0,0,0-2,2v68a2,2,0,0,0,2,2h19"
|
|
275
|
+
/>
|
|
276
|
+
<line class="cls-1" x1="105.5" y1="1.5" x2="126.5" y2="22.5" />
|
|
277
|
+
<path
|
|
278
|
+
class="cls-2"
|
|
279
|
+
d="M47.93,50.49a5,5,0,1,0-4.83-5A4.93,4.93,0,0,0,47.93,50.49Z"
|
|
280
|
+
/>
|
|
281
|
+
<path
|
|
282
|
+
class="cls-2"
|
|
283
|
+
d="M36.6,65.93,42.05,60A2.06,2.06,0,0,1,45,60l12.68,13.2"
|
|
284
|
+
/>
|
|
285
|
+
<path
|
|
286
|
+
class="cls-2"
|
|
287
|
+
d="M3.14,73.23,22.42,53.76a1.65,1.65,0,0,1,2.38,0l19.05,19.7"
|
|
288
|
+
/>
|
|
289
|
+
<path
|
|
290
|
+
class="cls-1"
|
|
291
|
+
d="M139.5,36.5H196A1.49,1.49,0,0,1,197.5,38V72A1.49,1.49,0,0,1,196,73.5H141A1.49,1.49,0,0,1,139.5,72V32A1.49,1.49,0,0,1,141,30.5H154a2.43,2.43,0,0,1,1.67.66l6,5.66"
|
|
292
|
+
/>
|
|
293
|
+
<rect
|
|
294
|
+
class="cls-1"
|
|
295
|
+
x="1.5"
|
|
296
|
+
y="34.5"
|
|
297
|
+
width="58"
|
|
298
|
+
height="39"
|
|
299
|
+
rx="2"
|
|
300
|
+
ry="2"
|
|
301
|
+
/>
|
|
302
|
+
</svg>
|
|
303
|
+
<h2
|
|
304
|
+
class="spectrum-Heading spectrum-Heading--sizeL spectrum-Heading--light spectrum-IllustratedMessage-heading"
|
|
305
|
+
>
|
|
306
|
+
Drag and drop your file
|
|
307
|
+
</h2>
|
|
308
|
+
{/if}
|
|
306
309
|
{#if !disabled}
|
|
307
310
|
<p
|
|
308
311
|
class="spectrum-Body spectrum-Body--sizeS spectrum-IllustratedMessage-description"
|
|
@@ -310,8 +313,10 @@
|
|
|
310
313
|
<label for={fieldId} class="spectrum-Link">
|
|
311
314
|
Select a file to upload
|
|
312
315
|
</label>
|
|
313
|
-
|
|
314
|
-
|
|
316
|
+
{#if !compact}
|
|
317
|
+
<br />
|
|
318
|
+
from your computer
|
|
319
|
+
{/if}
|
|
315
320
|
</p>
|
|
316
321
|
{#if fileTags.length}
|
|
317
322
|
<Tags>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import "@spectrum-css/label/dist/index-vars.css"
|
|
3
3
|
import { createEventDispatcher } from "svelte"
|
|
4
|
+
import Badge from "../Badge/Badge.svelte"
|
|
4
5
|
|
|
5
6
|
export let row
|
|
6
7
|
export let value
|
|
@@ -24,17 +25,11 @@
|
|
|
24
25
|
|
|
25
26
|
{#each relationships as relationship}
|
|
26
27
|
{#if relationship?.primaryDisplay}
|
|
27
|
-
<
|
|
28
|
+
<Badge hoverable grey on:click={onClick}>
|
|
28
29
|
{relationship.primaryDisplay}
|
|
29
|
-
</
|
|
30
|
+
</Badge>
|
|
30
31
|
{/if}
|
|
31
32
|
{/each}
|
|
32
33
|
{#if leftover}
|
|
33
34
|
<div>+{leftover} more</div>
|
|
34
35
|
{/if}
|
|
35
|
-
|
|
36
|
-
<style>
|
|
37
|
-
span:hover {
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
</style>
|