@budibase/bbui 2.12.12 → 2.13.2
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 +3 -3
- package/dist/bbui.es.js.map +1 -1
- package/package.json +4 -4
- package/src/Form/Core/Checkbox.svelte +5 -0
- package/src/Form/Core/CheckboxGroup.svelte +5 -0
- package/src/Form/Core/DatePicker.svelte +3 -1
- package/src/Form/Core/Dropzone.svelte +7 -6
- package/src/Form/Core/RadioGroup.svelte +5 -0
- package/src/Form/Core/RichTextField.svelte +2 -0
- package/src/Form/Core/TextArea.svelte +2 -0
- package/src/Form/DatePicker.svelte +2 -0
- package/src/Markdown/MarkdownEditor.svelte +5 -0
- package/src/bbui.css +9 -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": "2.
|
|
4
|
+
"version": "2.13.2",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
|
39
|
-
"@budibase/shared-core": "2.
|
|
40
|
-
"@budibase/string-templates": "2.
|
|
39
|
+
"@budibase/shared-core": "2.13.2",
|
|
40
|
+
"@budibase/string-templates": "2.13.2",
|
|
41
41
|
"@spectrum-css/accordion": "3.0.24",
|
|
42
42
|
"@spectrum-css/actionbutton": "1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "1.0.1",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "06a7f67e1f9d52ae3e4cf981468d45d107e3c6de"
|
|
108
108
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export let id = null
|
|
9
9
|
export let text = null
|
|
10
10
|
export let disabled = false
|
|
11
|
+
export let readonly = false
|
|
11
12
|
export let size
|
|
12
13
|
export let indeterminate = false
|
|
13
14
|
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
class:is-invalid={!!error}
|
|
25
26
|
class:checked={value}
|
|
26
27
|
class:is-indeterminate={indeterminate}
|
|
28
|
+
class:readonly
|
|
27
29
|
>
|
|
28
30
|
<input
|
|
29
31
|
checked={value}
|
|
@@ -68,4 +70,7 @@
|
|
|
68
70
|
.spectrum-Checkbox-input {
|
|
69
71
|
opacity: 0;
|
|
70
72
|
}
|
|
73
|
+
.readonly {
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
}
|
|
71
76
|
</style>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export let options = []
|
|
9
9
|
export let error = null
|
|
10
10
|
export let disabled = false
|
|
11
|
+
export let readonly = false
|
|
11
12
|
export let getOptionLabel = option => option
|
|
12
13
|
export let getOptionValue = option => option
|
|
13
14
|
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
title={getOptionLabel(option)}
|
|
35
36
|
class="spectrum-Checkbox spectrum-FieldGroup-item"
|
|
36
37
|
class:is-invalid={!!error}
|
|
38
|
+
class:readonly
|
|
37
39
|
>
|
|
38
40
|
<label
|
|
39
41
|
class="spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item"
|
|
@@ -66,4 +68,7 @@
|
|
|
66
68
|
.spectrum-Checkbox-input {
|
|
67
69
|
opacity: 0;
|
|
68
70
|
}
|
|
71
|
+
.readonly {
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
69
74
|
</style>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
export let id = null
|
|
11
11
|
export let disabled = false
|
|
12
|
+
export let readonly = false
|
|
12
13
|
export let error = null
|
|
13
14
|
export let enableTime = true
|
|
14
15
|
export let value = null
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
>
|
|
187
188
|
<div
|
|
188
189
|
id={flatpickrId}
|
|
189
|
-
class:is-disabled={disabled}
|
|
190
|
+
class:is-disabled={disabled || readonly}
|
|
190
191
|
class:is-invalid={!!error}
|
|
191
192
|
class="flatpickr spectrum-InputGroup spectrum-Datepicker"
|
|
192
193
|
class:is-focused={open}
|
|
@@ -211,6 +212,7 @@
|
|
|
211
212
|
{/if}
|
|
212
213
|
<input
|
|
213
214
|
{disabled}
|
|
215
|
+
{readonly}
|
|
214
216
|
data-input
|
|
215
217
|
type="text"
|
|
216
218
|
class="spectrum-Textfield-input spectrum-InputGroup-input"
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
}
|
|
387
387
|
.compact .placeholder,
|
|
388
388
|
.compact img {
|
|
389
|
-
margin:
|
|
389
|
+
margin: 8px 16px;
|
|
390
390
|
}
|
|
391
391
|
.compact img {
|
|
392
392
|
height: 90px;
|
|
@@ -456,6 +456,12 @@
|
|
|
456
456
|
color: var(--red);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
+
.spectrum-Dropzone {
|
|
460
|
+
height: 220px;
|
|
461
|
+
}
|
|
462
|
+
.compact .spectrum-Dropzone {
|
|
463
|
+
height: 40px;
|
|
464
|
+
}
|
|
459
465
|
.spectrum-Dropzone.disabled {
|
|
460
466
|
pointer-events: none;
|
|
461
467
|
background-color: var(--spectrum-global-color-gray-200);
|
|
@@ -463,10 +469,6 @@
|
|
|
463
469
|
.disabled .spectrum-Heading--sizeL {
|
|
464
470
|
color: var(--spectrum-alias-text-color-disabled);
|
|
465
471
|
}
|
|
466
|
-
.compact .spectrum-Dropzone {
|
|
467
|
-
padding-top: 8px;
|
|
468
|
-
padding-bottom: 8px;
|
|
469
|
-
}
|
|
470
472
|
.compact .spectrum-IllustratedMessage-description {
|
|
471
473
|
margin: 0;
|
|
472
474
|
}
|
|
@@ -477,7 +479,6 @@
|
|
|
477
479
|
flex-wrap: wrap;
|
|
478
480
|
justify-content: center;
|
|
479
481
|
}
|
|
480
|
-
|
|
481
482
|
.tag {
|
|
482
483
|
margin-top: 8px;
|
|
483
484
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export let options = []
|
|
9
9
|
export let error = null
|
|
10
10
|
export let disabled = false
|
|
11
|
+
export let readonly = false
|
|
11
12
|
export let getOptionLabel = option => option
|
|
12
13
|
export let getOptionValue = option => option
|
|
13
14
|
export let getOptionTitle = option => option
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
title={getOptionTitle(option)}
|
|
41
42
|
class="spectrum-Radio spectrum-FieldGroup-item spectrum-Radio--emphasized"
|
|
42
43
|
class:is-invalid={!!error}
|
|
44
|
+
class:readonly
|
|
43
45
|
>
|
|
44
46
|
<input
|
|
45
47
|
on:change={onChange}
|
|
@@ -62,4 +64,7 @@
|
|
|
62
64
|
.spectrum-Radio-input {
|
|
63
65
|
opacity: 0;
|
|
64
66
|
}
|
|
67
|
+
.readonly {
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
65
70
|
</style>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export let value = ""
|
|
5
5
|
export let placeholder = null
|
|
6
6
|
export let disabled = false
|
|
7
|
+
export let readonly = false
|
|
7
8
|
export let error = null
|
|
8
9
|
export let height = null
|
|
9
10
|
export let id = null
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
{fullScreenOffset}
|
|
21
22
|
{disabled}
|
|
22
23
|
{easyMDEOptions}
|
|
24
|
+
{readonly}
|
|
23
25
|
on:change
|
|
24
26
|
/>
|
|
25
27
|
</div>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export let value = ""
|
|
6
6
|
export let placeholder = null
|
|
7
7
|
export let disabled = false
|
|
8
|
+
export let readonly = false
|
|
8
9
|
export let error = null
|
|
9
10
|
export let id = null
|
|
10
11
|
export let height = null
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
class="spectrum-Textfield-input"
|
|
62
63
|
style={align ? `text-align: ${align}` : ""}
|
|
63
64
|
{disabled}
|
|
65
|
+
{readonly}
|
|
64
66
|
{id}
|
|
65
67
|
on:focus={() => (focus = true)}
|
|
66
68
|
on:blur={onChange}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export let label = null
|
|
8
8
|
export let labelPosition = "above"
|
|
9
9
|
export let disabled = false
|
|
10
|
+
export let readonly = false
|
|
10
11
|
export let error = null
|
|
11
12
|
export let enableTime = true
|
|
12
13
|
export let timeOnly = false
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
<DatePicker
|
|
34
35
|
{error}
|
|
35
36
|
{disabled}
|
|
37
|
+
{readonly}
|
|
36
38
|
{value}
|
|
37
39
|
{placeholder}
|
|
38
40
|
{enableTime}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export let id = null
|
|
9
9
|
export let fullScreenOffset = 0
|
|
10
10
|
export let disabled = false
|
|
11
|
+
export let readonly = false
|
|
11
12
|
export let easyMDEOptions
|
|
12
13
|
|
|
13
14
|
const dispatch = createEventDispatcher()
|
|
@@ -19,6 +20,9 @@
|
|
|
19
20
|
// control
|
|
20
21
|
$: checkValue(value)
|
|
21
22
|
$: mde?.codemirror.on("change", debouncedUpdate)
|
|
23
|
+
$: if (readonly || disabled) {
|
|
24
|
+
mde?.togglePreview()
|
|
25
|
+
}
|
|
22
26
|
|
|
23
27
|
const checkValue = val => {
|
|
24
28
|
if (mde && val !== latestValue) {
|
|
@@ -54,6 +58,7 @@
|
|
|
54
58
|
easyMDEOptions={{
|
|
55
59
|
initialValue: value,
|
|
56
60
|
placeholder,
|
|
61
|
+
toolbar: disabled || readonly ? false : undefined,
|
|
57
62
|
...easyMDEOptions,
|
|
58
63
|
}}
|
|
59
64
|
/>
|
package/src/bbui.css
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
--background: #ffffff;
|
|
3
3
|
--ink: #000000;
|
|
4
4
|
|
|
5
|
+
/* Brand colours */
|
|
6
|
+
--bb-coral: #FF4E4E;
|
|
7
|
+
--bb-coral-light: #F97777;
|
|
8
|
+
--bb-indigo: #6E56FF;
|
|
9
|
+
--bb-indigo-light: #9F8FFF;
|
|
10
|
+
--bb-lime: #ECFFB5;
|
|
11
|
+
--bb-forest-green: #053835;
|
|
12
|
+
--bb-beige: #F6EFEA;
|
|
13
|
+
|
|
5
14
|
--grey-1: #fafafa;
|
|
6
15
|
--grey-2: #f5f5f5;
|
|
7
16
|
--grey-3: #eeeeee;
|