nuance-ui 0.1.39 → 0.1.40
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/module.json
CHANGED
|
@@ -30,6 +30,7 @@ export * from './table/index.js';
|
|
|
30
30
|
export * from './tabs/index.js';
|
|
31
31
|
export * from './text.vue.js';
|
|
32
32
|
export * from './textarea.vue.js';
|
|
33
|
+
export * from './time-picker/index.js';
|
|
33
34
|
export * from './title.vue.js';
|
|
34
35
|
export * from './transition/index.js';
|
|
35
36
|
export * from './tree/index.js';
|
|
@@ -28,6 +28,7 @@ export * from "./table/index.js";
|
|
|
28
28
|
export * from "./tabs/index.js";
|
|
29
29
|
export * from "./text.vue";
|
|
30
30
|
export * from "./textarea.vue";
|
|
31
|
+
export * from "./time-picker/index.js";
|
|
31
32
|
export * from "./title.vue";
|
|
32
33
|
export * from "./transition/index.js";
|
|
33
34
|
export * from "./tree/index.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iso8601, format as lFormat } from "@formkit/tempo";
|
|
1
2
|
import { unrefElement } from "@vueuse/core";
|
|
2
3
|
import { computed, ref, shallowRef, watch } from "vue";
|
|
3
4
|
import { clampTime } from "./clamp-time.js";
|
|
@@ -18,7 +19,10 @@ export function useTimePicker({
|
|
|
18
19
|
seconds: null,
|
|
19
20
|
amPm: null
|
|
20
21
|
});
|
|
21
|
-
const parsed = computed(() =>
|
|
22
|
+
const parsed = computed(() => {
|
|
23
|
+
const time = iso8601(model.value) ? lFormat(model.value, "HH:mm:ss") : model.value ?? "";
|
|
24
|
+
return getParsedTime({ time, format, amPmLabels });
|
|
25
|
+
});
|
|
22
26
|
watch(parsed, (v) => intermediate.value = v, { immediate: true });
|
|
23
27
|
const updateModel = (field, value) => {
|
|
24
28
|
intermediate.value = { ...intermediate.value, [field]: value };
|