@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.8",
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": "^2.2.8",
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": "ff40a71342755eb260b6ee5a3d397f2c19e404e5"
91
+ "gitHead": "c66524253459a149aefa42831d63a7806696f036"
92
92
  }
@@ -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
- <svg
243
- class="spectrum-IllustratedMessage-illustration"
244
- width="125"
245
- height="60"
246
- viewBox="0 0 199 97.7"
247
- >
248
- <defs>
249
- <style>
250
- .cls-1,
251
- .cls-2 {
252
- fill: none;
253
- stroke-linecap: round;
254
- stroke-linejoin: round;
255
- }
256
- .cls-1 {
257
- stroke-width: 3px;
258
- }
259
- .cls-2 {
260
- stroke-width: 2px;
261
- }
262
- </style>
263
- </defs>
264
- <path
265
- class="cls-1"
266
- d="M110.53,85.66,100.26,95.89a1.09,1.09,0,0,1-1.52,0L88.47,85.66"
267
- />
268
- <line class="cls-1" x1="99.5" y1="95.5" x2="99.5" y2="58.5" />
269
- <path class="cls-1" d="M105.5,73.5h19a2,2,0,0,0,2-2v-43" />
270
- <path
271
- class="cls-1"
272
- 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"
273
- />
274
- <line class="cls-1" x1="105.5" y1="1.5" x2="126.5" y2="22.5" />
275
- <path
276
- class="cls-2"
277
- d="M47.93,50.49a5,5,0,1,0-4.83-5A4.93,4.93,0,0,0,47.93,50.49Z"
278
- />
279
- <path
280
- class="cls-2"
281
- d="M36.6,65.93,42.05,60A2.06,2.06,0,0,1,45,60l12.68,13.2"
282
- />
283
- <path
284
- class="cls-2"
285
- d="M3.14,73.23,22.42,53.76a1.65,1.65,0,0,1,2.38,0l19.05,19.7"
286
- />
287
- <path
288
- class="cls-1"
289
- 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"
290
- />
291
- <rect
292
- class="cls-1"
293
- x="1.5"
294
- y="34.5"
295
- width="58"
296
- height="39"
297
- rx="2"
298
- ry="2"
299
- />
300
- </svg>
301
- <h2
302
- class="spectrum-Heading spectrum-Heading--sizeL spectrum-Heading--light spectrum-IllustratedMessage-heading"
303
- >
304
- Drag and drop your file
305
- </h2>
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
- <br />
314
- from your computer
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
- <span class="spectrum-Label spectrum-Label--grey" on:click={onClick}>
28
+ <Badge hoverable grey on:click={onClick}>
28
29
  {relationship.primaryDisplay}
29
- </span>
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>