@budibase/bbui 3.18.1 → 3.18.3
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 +32912 -45417
- package/package.json +2 -2
- package/src/Form/Core/DatePicker/DatePicker.svelte +12 -8
- package/src/Form/Core/Picker.svelte +6 -2
- package/src/Form/DatePicker.svelte +9 -8
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": "3.18.
|
|
4
|
+
"version": "3.18.3",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.ts",
|
|
7
7
|
"module": "dist/bbui.mjs",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "572306dc0decede5567d7b3644f0afa890797638"
|
|
110
110
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts" generics="V">
|
|
2
2
|
import "@spectrum-css/calendar/dist/index-vars.css"
|
|
3
3
|
import "@spectrum-css/inputgroup/dist/index-vars.css"
|
|
4
4
|
import "@spectrum-css/textfield/dist/index-vars.css"
|
|
@@ -7,26 +7,30 @@
|
|
|
7
7
|
import DateInput from "./DateInput.svelte"
|
|
8
8
|
import { parseDate } from "../../../helpers"
|
|
9
9
|
import DatePickerPopoverContents from "./DatePickerPopoverContents.svelte"
|
|
10
|
+
import { PopoverAlignment } from "../../../constants"
|
|
11
|
+
import type dayjs from "dayjs"
|
|
10
12
|
|
|
11
13
|
export let id = null
|
|
12
14
|
export let disabled = false
|
|
13
15
|
export let readonly = false
|
|
14
16
|
export let error = null
|
|
15
17
|
export let enableTime = true
|
|
16
|
-
export let value =
|
|
17
|
-
export let placeholder = null
|
|
18
|
+
export let value: V | null = null
|
|
19
|
+
export let placeholder: string | null = null
|
|
18
20
|
export let timeOnly = false
|
|
19
21
|
export let ignoreTimezones = false
|
|
20
22
|
export let useKeyboardShortcuts = true
|
|
21
|
-
export let appendTo =
|
|
23
|
+
export let appendTo = undefined
|
|
22
24
|
export let api = null
|
|
23
|
-
export let align =
|
|
25
|
+
export let align: PopoverAlignment = PopoverAlignment.Left
|
|
24
26
|
|
|
25
27
|
let isOpen = false
|
|
26
|
-
let anchor
|
|
27
|
-
let popover
|
|
28
|
+
let anchor: HTMLElement
|
|
29
|
+
let popover: Popover
|
|
28
30
|
|
|
29
|
-
$: parsedValue = parseDate(value
|
|
31
|
+
$: parsedValue = parseDate(value as string | dayjs.Dayjs | null, {
|
|
32
|
+
enableTime,
|
|
33
|
+
})
|
|
30
34
|
|
|
31
35
|
const onOpen = () => {
|
|
32
36
|
isOpen = true
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
</span>
|
|
153
153
|
{:else}
|
|
154
154
|
<span class="option-extra icon field-icon">
|
|
155
|
-
<img src={fieldIcon} alt="icon"
|
|
155
|
+
<img class="icon-dims" src={fieldIcon} alt="icon" />
|
|
156
156
|
</span>
|
|
157
157
|
{/if}
|
|
158
158
|
{/if}
|
|
@@ -235,9 +235,9 @@
|
|
|
235
235
|
<span class="option-extra icon">
|
|
236
236
|
{#if useOptionIconImage}
|
|
237
237
|
<img
|
|
238
|
+
class="icon-dims"
|
|
238
239
|
src={getOptionIcon(option, idx)}
|
|
239
240
|
alt="icon"
|
|
240
|
-
style="height: 15px; width: auto;"
|
|
241
241
|
/>
|
|
242
242
|
{:else}
|
|
243
243
|
<Icon
|
|
@@ -301,6 +301,10 @@
|
|
|
301
301
|
</Popover>
|
|
302
302
|
|
|
303
303
|
<style>
|
|
304
|
+
.icon-dims {
|
|
305
|
+
height: 15px;
|
|
306
|
+
width: auto;
|
|
307
|
+
}
|
|
304
308
|
.spectrum-Picker {
|
|
305
309
|
width: 100%;
|
|
306
310
|
box-shadow: none;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts" generics="V">
|
|
2
2
|
import Field from "./Field.svelte"
|
|
3
3
|
import DatePicker from "./Core/DatePicker/DatePicker.svelte"
|
|
4
4
|
import { createEventDispatcher } from "svelte"
|
|
5
|
+
import type { LabelPosition } from "../types"
|
|
5
6
|
|
|
6
|
-
export let value =
|
|
7
|
-
export let label =
|
|
8
|
-
export let labelPosition = "above"
|
|
7
|
+
export let value: V | null = null
|
|
8
|
+
export let label = undefined
|
|
9
|
+
export let labelPosition: LabelPosition = "above"
|
|
9
10
|
export let disabled = false
|
|
10
11
|
export let readonly = false
|
|
11
|
-
export let error =
|
|
12
|
+
export let error = undefined
|
|
12
13
|
export let enableTime = true
|
|
13
14
|
export let timeOnly = false
|
|
14
|
-
export let placeholder = null
|
|
15
|
+
export let placeholder: string | null = null
|
|
15
16
|
export let appendTo = undefined
|
|
16
17
|
export let ignoreTimezones = false
|
|
17
|
-
export let helpText =
|
|
18
|
+
export let helpText = undefined
|
|
18
19
|
|
|
19
20
|
const dispatch = createEventDispatcher()
|
|
20
21
|
|
|
21
|
-
const onChange = e => {
|
|
22
|
+
const onChange = (e: CustomEvent) => {
|
|
22
23
|
value = e.detail
|
|
23
24
|
dispatch("change", e.detail)
|
|
24
25
|
}
|