@budibase/bbui 3.23.48 → 3.24.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/dist/bbui.mjs +8 -8
- package/dist/easymde-BZCUdDp3.mjs +10820 -0
- package/dist/{index-7af4cf13.mjs → index-BaHAAxDX.mjs} +20038 -42207
- package/package.json +5 -5
- package/src/ActionMenu/ActionMenu.svelte +11 -3
- package/src/ColorPicker/ColorPicker.svelte +1 -1
- package/src/Drawer/Drawer.svelte +2 -2
- package/src/Form/Core/Checkbox.svelte +1 -1
- package/src/Form/Core/CheckboxGroup.svelte +1 -1
- package/src/Form/Core/EnvDropdown.svelte +1 -1
- package/src/Form/Core/Picker.svelte +5 -5
- package/src/Form/Core/RadioGroup.svelte +1 -1
- package/src/Form/Core/Signature.svelte +1 -1
- package/src/Form/Core/Switch.svelte +1 -1
- package/src/Form/Core/TextField.svelte +7 -2
- package/src/Form/Input.svelte +2 -1
- package/src/Icon/InnerIcon.svelte +1 -1
- package/src/Layout/Page.svelte +1 -1
- package/src/Markdown/MarkdownViewer.svelte +1 -1
- package/src/Markdown/SpectrumMDE.svelte +1 -1
- package/src/Menu/Separator.svelte +1 -1
- package/src/Modal/Modal.svelte +1 -1
- package/src/PhosphorIconPicker/PhosphorIconPicker.svelte +3 -1
- package/src/ProgressBar/ProgressBar.svelte +2 -2
- package/src/ProgressCircle/ProgressCircle.svelte +3 -3
- package/src/Switcher/Switcher.svelte +2 -1
- package/src/Tabs/Tabs.svelte +2 -2
- package/src/Tooltip/AbsTooltip.svelte +1 -1
- package/src/Tooltip/Tooltip.svelte +2 -2
- package/dist/easymde-ee925fe5.mjs +0 -10933
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.24.0",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"svelte": "src/index.ts",
|
|
7
6
|
"module": "dist/bbui.mjs",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
|
-
"import": "./dist/bbui.mjs"
|
|
9
|
+
"import": "./dist/bbui.mjs",
|
|
10
|
+
"svelte": "./src/index.ts"
|
|
11
11
|
},
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dev": "vite build --watch --mode=dev"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@sveltejs/vite-plugin-svelte": "1.
|
|
19
|
+
"@sveltejs/vite-plugin-svelte": "^6.1.3",
|
|
20
20
|
"vite-plugin-css-injected-by-js": "3.5.2"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "7cfa950d39730aa88a1c26c60f8094d6f0b0606d"
|
|
111
111
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// This is needed because display: contents is considered "invisible".
|
|
24
24
|
// It should only ever be an action button, so should be fine.
|
|
25
25
|
function getAnchor(node: HTMLDivElement) {
|
|
26
|
-
anchor = (node.
|
|
26
|
+
anchor = (node.firstElementChild as HTMLElement) ?? undefined
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export const show = () => {
|
|
@@ -81,8 +81,16 @@
|
|
|
81
81
|
borderRadius={roundedPopover ? "12px" : undefined}
|
|
82
82
|
on:open
|
|
83
83
|
on:close
|
|
84
|
-
on:mouseenter={
|
|
85
|
-
|
|
84
|
+
on:mouseenter={() => {
|
|
85
|
+
if (openOnHover) {
|
|
86
|
+
cancelHide()
|
|
87
|
+
}
|
|
88
|
+
}}
|
|
89
|
+
on:mouseleave={() => {
|
|
90
|
+
if (openOnHover) {
|
|
91
|
+
queueHide()
|
|
92
|
+
}
|
|
93
|
+
}}
|
|
86
94
|
bind:open
|
|
87
95
|
>
|
|
88
96
|
<Menu>
|
package/src/Drawer/Drawer.svelte
CHANGED
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
class="underlay"
|
|
179
179
|
class:hidden={!$modal}
|
|
180
180
|
transition:drawerFade|local
|
|
181
|
-
|
|
181
|
+
></div>
|
|
182
182
|
<div
|
|
183
183
|
class="drawer"
|
|
184
184
|
class:stacked={depth > 0}
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
</div>
|
|
212
212
|
</header>
|
|
213
213
|
<slot name="body" />
|
|
214
|
-
<div class="overlay" class:hidden={$modal || depth === 0}
|
|
214
|
+
<div class="overlay" class:hidden={$modal || depth === 0}></div>
|
|
215
215
|
</div>
|
|
216
216
|
</div>
|
|
217
217
|
</Portal>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Icon } from "@budibase/bbui"
|
|
3
2
|
import "@spectrum-css/checkbox/dist/index-vars.css"
|
|
4
3
|
import "@spectrum-css/fieldgroup/dist/index-vars.css"
|
|
5
4
|
import { createEventDispatcher } from "svelte"
|
|
6
5
|
import type { ChangeEventHandler } from "svelte/elements"
|
|
6
|
+
import Icon from "../../Icon/Icon.svelte"
|
|
7
7
|
|
|
8
8
|
export let value = false
|
|
9
9
|
export let id: string | undefined = undefined
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import "@spectrum-css/fieldgroup/dist/index-vars.css"
|
|
8
8
|
import "@spectrum-css/radio/dist/index-vars.css"
|
|
9
9
|
import { createEventDispatcher } from "svelte"
|
|
10
|
-
import
|
|
10
|
+
import Icon from "../../Icon/Icon.svelte"
|
|
11
11
|
|
|
12
12
|
export let direction: "horizontal" | "vertical" = "vertical"
|
|
13
13
|
export let value: V[] = []
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
|
|
84
84
|
let button: HTMLButtonElement | null = null
|
|
85
85
|
let component: HTMLUListElement | null = null
|
|
86
|
-
let optionIconDescriptor: ResolvedIcon | null = null
|
|
87
86
|
let virtualizedOptions: Array<{ option: O; idx: number }> = []
|
|
88
87
|
let virtualPaddingTop = 0
|
|
89
88
|
let virtualPaddingBottom = 0
|
|
@@ -337,9 +336,10 @@
|
|
|
337
336
|
class="virtual-spacer"
|
|
338
337
|
aria-hidden="true"
|
|
339
338
|
style={`height:${virtualPaddingTop}px`}
|
|
340
|
-
|
|
339
|
+
></li>
|
|
341
340
|
{/if}
|
|
342
341
|
{#each virtualizedOptions as { option, idx } (getOptionValue(option, idx) ?? idx)}
|
|
342
|
+
{@const optionIcon = resolveIcon(getOptionIcon(option, idx))}
|
|
343
343
|
<li
|
|
344
344
|
class="spectrum-Menu-item"
|
|
345
345
|
class:is-selected={isOptionSelected(getOptionValue(option, idx))}
|
|
@@ -351,9 +351,9 @@
|
|
|
351
351
|
on:mouseleave={e => onOptionMouseleave(e, option)}
|
|
352
352
|
class:is-disabled={!isOptionEnabled(option)}
|
|
353
353
|
>
|
|
354
|
-
{#if
|
|
354
|
+
{#if optionIcon}
|
|
355
355
|
<span class="option-extra icon">
|
|
356
|
-
<PickerIcon icon={
|
|
356
|
+
<PickerIcon icon={optionIcon} {useOptionIconImage} />
|
|
357
357
|
</span>
|
|
358
358
|
{/if}
|
|
359
359
|
{#if getOptionColour(option, idx)}
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
class="virtual-spacer"
|
|
397
397
|
aria-hidden="true"
|
|
398
398
|
style={`height:${virtualPaddingBottom}px`}
|
|
399
|
-
|
|
399
|
+
></li>
|
|
400
400
|
{/if}
|
|
401
401
|
{/if}
|
|
402
402
|
</ul>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import "@spectrum-css/textfield/dist/index-vars.css"
|
|
3
3
|
import { createEventDispatcher, onMount, tick } from "svelte"
|
|
4
|
+
import type { FullAutoFill } from "svelte/elements"
|
|
4
5
|
import type { UIEvent } from "@budibase/types"
|
|
5
6
|
|
|
6
7
|
export let value: string | null = null
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
export let quiet = false
|
|
14
15
|
export let align: "left" | "right" | "center" | undefined = undefined
|
|
15
16
|
export let autofocus: boolean | null = false
|
|
16
|
-
export let autocomplete: boolean |
|
|
17
|
+
export let autocomplete: FullAutoFill | boolean | null | undefined = undefined
|
|
17
18
|
|
|
18
19
|
const dispatch = createEventDispatcher()
|
|
19
20
|
|
|
@@ -69,12 +70,16 @@
|
|
|
69
70
|
return type === "number" ? "decimal" : "text"
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
let autocompleteValue: FullAutoFill | null | undefined
|
|
74
|
+
|
|
72
75
|
$: autocompleteValue =
|
|
73
76
|
typeof autocomplete === "boolean"
|
|
74
77
|
? autocomplete
|
|
75
78
|
? "on"
|
|
76
79
|
: "off"
|
|
77
|
-
:
|
|
80
|
+
: autocomplete === null
|
|
81
|
+
? null
|
|
82
|
+
: autocomplete
|
|
78
83
|
|
|
79
84
|
onMount(async () => {
|
|
80
85
|
if (disabled) return
|
package/src/Form/Input.svelte
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import Field from "./Field.svelte"
|
|
3
3
|
import TextField from "./Core/TextField.svelte"
|
|
4
4
|
import { createEventDispatcher } from "svelte"
|
|
5
|
+
import type { FullAutoFill } from "svelte/elements"
|
|
5
6
|
|
|
6
7
|
export let value: any = undefined
|
|
7
8
|
export let label: string | undefined = undefined
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
export let updateOnChange = true
|
|
15
16
|
export let quiet = false
|
|
16
17
|
export let autofocus: boolean | undefined = undefined
|
|
17
|
-
export let autocomplete: boolean |
|
|
18
|
+
export let autocomplete: FullAutoFill | boolean | null | undefined = undefined
|
|
18
19
|
export let helpText: string | undefined = undefined
|
|
19
20
|
|
|
20
21
|
const dispatch = createEventDispatcher<{
|
package/src/Layout/Page.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<li class="spectrum-Menu-divider" role="separator"
|
|
1
|
+
<li class="spectrum-Menu-divider" role="separator"></li>
|
package/src/Modal/Modal.svelte
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
import { createEventDispatcher } from "svelte"
|
|
5
5
|
import { PhosphorIcons } from "./icons"
|
|
6
6
|
import TextField from "../Form/Core/TextField.svelte"
|
|
7
|
-
import
|
|
7
|
+
import ActionButton from "../ActionButton/ActionButton.svelte"
|
|
8
|
+
import Body from "../Typography/Body.svelte"
|
|
8
9
|
import Popover from "../Popover/Popover.svelte"
|
|
10
|
+
import { PopoverAlignment } from "../constants"
|
|
9
11
|
|
|
10
12
|
export let value: string | undefined
|
|
11
13
|
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
style="width: {typeof value === 'number'
|
|
43
43
|
? value
|
|
44
44
|
: 0}%; --duration: {duration}ms;"
|
|
45
|
-
|
|
45
|
+
></div>
|
|
46
46
|
</div>
|
|
47
|
-
<div class="spectrum-ProgressBar-label" hidden={false}
|
|
47
|
+
<div class="spectrum-ProgressBar-label" hidden={false}></div>
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<style>
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
class:spectrum-ProgressCircle--overBackground={overBackground}
|
|
49
49
|
class="spectrum-ProgressCircle spectrum-ProgressCircle--{convertSize(size)}"
|
|
50
50
|
>
|
|
51
|
-
<div class="spectrum-ProgressCircle-track"
|
|
51
|
+
<div class="spectrum-ProgressCircle-track"></div>
|
|
52
52
|
<div class="spectrum-ProgressCircle-fills">
|
|
53
53
|
<div class="spectrum-ProgressCircle-fillMask1">
|
|
54
54
|
<div class="spectrum-ProgressCircle-fillSubMask1" style={subMask1Style}>
|
|
55
|
-
<div class="spectrum-ProgressCircle-fill"
|
|
55
|
+
<div class="spectrum-ProgressCircle-fill"></div>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="spectrum-ProgressCircle-fillMask2">
|
|
59
59
|
<div class="spectrum-ProgressCircle-fillSubMask2" style={subMask2Style}>
|
|
60
|
-
<div class="spectrum-ProgressCircle-fill"
|
|
60
|
+
<div class="spectrum-ProgressCircle-fill"></div>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { createEventDispatcher } from "svelte"
|
|
3
|
-
import
|
|
3
|
+
import AbsTooltip from "../Tooltip/AbsTooltip.svelte"
|
|
4
|
+
import ActionButton from "../ActionButton/ActionButton.svelte"
|
|
4
5
|
|
|
5
6
|
export let leftIcon: string
|
|
6
7
|
export let leftNotificationTooltip: string | undefined = undefined
|
package/src/Tabs/Tabs.svelte
CHANGED
|
@@ -123,14 +123,14 @@
|
|
|
123
123
|
class="spectrum-Tabs-selectionIndicator"
|
|
124
124
|
class:emphasized
|
|
125
125
|
style="width: {width}; height: {height}; left: {left}; top: {top};"
|
|
126
|
-
|
|
126
|
+
></div>
|
|
127
127
|
{/if}
|
|
128
128
|
</div>
|
|
129
129
|
|
|
130
130
|
<div
|
|
131
131
|
class="spectrum-Tabs-content spectrum-Tabs-content-{_id}"
|
|
132
132
|
class:noPadding
|
|
133
|
-
|
|
133
|
+
></div>
|
|
134
134
|
|
|
135
135
|
<style>
|
|
136
136
|
.spectrum-Tabs--quiet {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
transition:fade|local={{ duration: 130 }}
|
|
98
98
|
>
|
|
99
99
|
<span class="spectrum-Tooltip-label">{text}</span>
|
|
100
|
-
<span class="spectrum-Tooltip-tip" style={tipStyle}
|
|
100
|
+
<span class="spectrum-Tooltip-tip" style={tipStyle}></span>
|
|
101
101
|
</span>
|
|
102
102
|
</Portal>
|
|
103
103
|
{/if}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{#if textWrapping}
|
|
11
11
|
<span class="spectrum-Tooltip spectrum-Tooltip--{direction} is-open tooltip">
|
|
12
12
|
<span class="spectrum-Tooltip-label">{text}</span>
|
|
13
|
-
<span class="spectrum-Tooltip-tip"
|
|
13
|
+
<span class="spectrum-Tooltip-tip"></span>
|
|
14
14
|
</span>
|
|
15
15
|
{:else}
|
|
16
16
|
<!-- The default show on hover tooltip does not support text wrapping -->
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<slot />
|
|
19
19
|
<div class={`spectrum-Tooltip spectrum-Tooltip--${direction}`}>
|
|
20
20
|
<span class="spectrum-Tooltip-label">{text}</span>
|
|
21
|
-
<span class="spectrum-Tooltip-tip"
|
|
21
|
+
<span class="spectrum-Tooltip-tip"></span>
|
|
22
22
|
</div>
|
|
23
23
|
</span>
|
|
24
24
|
{/if}
|