@sfxcode/formkit-primevue 3.2.4 → 3.2.5
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/components/FormKitDataEdit.vue +57 -72
- package/dist/components/FormKitDataView.vue +27 -35
- package/dist/components/FormKitDebug.vue +7 -12
- package/dist/components/FormKitIcon.vue +6 -13
- package/dist/components/FormKitPrefix.vue +3 -3
- package/dist/components/FormKitSuffix.vue +3 -3
- package/dist/components/PrimeAutoComplete.vue +47 -98
- package/dist/components/PrimeCascadeSelect.vue +7 -26
- package/dist/components/PrimeCheckbox.vue +9 -29
- package/dist/components/PrimeColorPicker.vue +7 -22
- package/dist/components/PrimeDatePicker.vue +15 -73
- package/dist/components/PrimeInputMask.vue +10 -29
- package/dist/components/PrimeInputNumber.vue +22 -56
- package/dist/components/PrimeInputOtp.vue +7 -24
- package/dist/components/PrimeInputText.vue +10 -25
- package/dist/components/PrimeKnob.vue +12 -37
- package/dist/components/PrimeListbox.vue +7 -39
- package/dist/components/PrimeMultiSelect.vue +7 -52
- package/dist/components/PrimeOutputBoolean.vue +16 -23
- package/dist/components/PrimeOutputDate.vue +21 -31
- package/dist/components/PrimeOutputDuration.vue +11 -17
- package/dist/components/PrimeOutputLink.vue +17 -24
- package/dist/components/PrimeOutputList.vue +18 -29
- package/dist/components/PrimeOutputNumber.vue +24 -37
- package/dist/components/PrimeOutputReference.vue +21 -28
- package/dist/components/PrimeOutputText.vue +22 -37
- package/dist/components/PrimePassword.vue +7 -31
- package/dist/components/PrimeRadioButton.vue +7 -23
- package/dist/components/PrimeRating.vue +7 -22
- package/dist/components/PrimeSelect.vue +7 -49
- package/dist/components/PrimeSelectButton.vue +7 -27
- package/dist/components/PrimeSlider.vue +10 -28
- package/dist/components/PrimeTextarea.vue +7 -23
- package/dist/components/PrimeToggleButton.vue +7 -25
- package/dist/components/PrimeToggleSwitch.vue +8 -23
- package/dist/components/PrimeTreeSelect.vue +7 -30
- package/dist/sass/formkit-primevue.scss +0 -5
- package/dist/style.css +1 -1
- package/package.json +13 -11
- package/dist/components/FormKitDataEdit.d.vue.ts +0 -180
- package/dist/components/FormKitDataEdit.vue.d.ts +0 -180
- package/dist/components/FormKitDataView.d.vue.ts +0 -73
- package/dist/components/FormKitDataView.vue.d.ts +0 -73
- package/dist/components/FormKitDebug.d.vue.ts +0 -34
- package/dist/components/FormKitDebug.vue.d.ts +0 -34
- package/dist/components/FormKitIcon.d.vue.ts +0 -39
- package/dist/components/FormKitIcon.vue.d.ts +0 -39
- package/dist/components/FormKitPrefix.d.vue.ts +0 -7
- package/dist/components/FormKitPrefix.vue.d.ts +0 -7
- package/dist/components/FormKitSuffix.d.vue.ts +0 -7
- package/dist/components/FormKitSuffix.vue.d.ts +0 -7
- package/dist/components/PrimeAutoComplete.d.vue.ts +0 -31
- package/dist/components/PrimeAutoComplete.vue.d.ts +0 -31
- package/dist/components/PrimeCascadeSelect.d.vue.ts +0 -28
- package/dist/components/PrimeCascadeSelect.vue.d.ts +0 -28
- package/dist/components/PrimeCheckbox.d.vue.ts +0 -27
- package/dist/components/PrimeCheckbox.vue.d.ts +0 -27
- package/dist/components/PrimeColorPicker.d.vue.ts +0 -24
- package/dist/components/PrimeColorPicker.vue.d.ts +0 -24
- package/dist/components/PrimeDatePicker.d.vue.ts +0 -63
- package/dist/components/PrimeDatePicker.vue.d.ts +0 -63
- package/dist/components/PrimeInputMask.d.vue.ts +0 -28
- package/dist/components/PrimeInputMask.vue.d.ts +0 -28
- package/dist/components/PrimeInputNumber.d.vue.ts +0 -36
- package/dist/components/PrimeInputNumber.vue.d.ts +0 -36
- package/dist/components/PrimeInputOtp.d.vue.ts +0 -26
- package/dist/components/PrimeInputOtp.vue.d.ts +0 -26
- package/dist/components/PrimeInputText.d.vue.ts +0 -24
- package/dist/components/PrimeInputText.vue.d.ts +0 -24
- package/dist/components/PrimeKnob.d.vue.ts +0 -31
- package/dist/components/PrimeKnob.vue.d.ts +0 -31
- package/dist/components/PrimeListbox.d.vue.ts +0 -42
- package/dist/components/PrimeListbox.vue.d.ts +0 -42
- package/dist/components/PrimeMultiSelect.d.vue.ts +0 -53
- package/dist/components/PrimeMultiSelect.vue.d.ts +0 -53
- package/dist/components/PrimeOutputBoolean.d.vue.ts +0 -16
- package/dist/components/PrimeOutputBoolean.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDate.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDate.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDuration.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDuration.vue.d.ts +0 -16
- package/dist/components/PrimeOutputLink.d.vue.ts +0 -16
- package/dist/components/PrimeOutputLink.vue.d.ts +0 -16
- package/dist/components/PrimeOutputList.d.vue.ts +0 -19
- package/dist/components/PrimeOutputList.vue.d.ts +0 -19
- package/dist/components/PrimeOutputNumber.d.vue.ts +0 -16
- package/dist/components/PrimeOutputNumber.vue.d.ts +0 -16
- package/dist/components/PrimeOutputReference.d.vue.ts +0 -16
- package/dist/components/PrimeOutputReference.vue.d.ts +0 -16
- package/dist/components/PrimeOutputText.d.vue.ts +0 -21
- package/dist/components/PrimeOutputText.vue.d.ts +0 -21
- package/dist/components/PrimePassword.d.vue.ts +0 -33
- package/dist/components/PrimePassword.vue.d.ts +0 -33
- package/dist/components/PrimeRadioButton.d.vue.ts +0 -28
- package/dist/components/PrimeRadioButton.vue.d.ts +0 -28
- package/dist/components/PrimeRating.d.vue.ts +0 -24
- package/dist/components/PrimeRating.vue.d.ts +0 -24
- package/dist/components/PrimeSelect.d.vue.ts +0 -50
- package/dist/components/PrimeSelect.vue.d.ts +0 -50
- package/dist/components/PrimeSelectButton.d.vue.ts +0 -28
- package/dist/components/PrimeSelectButton.vue.d.ts +0 -28
- package/dist/components/PrimeSlider.d.vue.ts +0 -26
- package/dist/components/PrimeSlider.vue.d.ts +0 -26
- package/dist/components/PrimeTextarea.d.vue.ts +0 -25
- package/dist/components/PrimeTextarea.vue.d.ts +0 -25
- package/dist/components/PrimeToggleButton.d.vue.ts +0 -26
- package/dist/components/PrimeToggleButton.vue.d.ts +0 -26
- package/dist/components/PrimeToggleSwitch.d.vue.ts +0 -23
- package/dist/components/PrimeToggleSwitch.vue.d.ts +0 -23
- package/dist/components/PrimeTreeSelect.d.vue.ts +0 -32
- package/dist/components/PrimeTreeSelect.vue.d.ts +0 -32
|
@@ -1,81 +1,23 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { DatePickerBlurEvent, DatePickerProps } from 'primevue/datepicker'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeDatePickerProps {
|
|
9
|
-
dateFormat?: DatePickerProps['dateFormat']
|
|
10
|
-
placeholder?: DatePickerProps['placeholder']
|
|
11
|
-
selectionMode?: DatePickerProps['selectionMode']
|
|
12
|
-
inline?: DatePickerProps['inline']
|
|
13
|
-
icon?: DatePickerProps['icon']
|
|
14
|
-
showOtherMonths?: DatePickerProps['showOtherMonths']
|
|
15
|
-
selectOtherMonths?: DatePickerProps['selectOtherMonths']
|
|
16
|
-
showIcon?: DatePickerProps['showIcon']
|
|
17
|
-
prevIcon?: DatePickerProps['prevIcon']
|
|
18
|
-
nextIcon?: DatePickerProps['nextIcon']
|
|
19
|
-
incrementIcon?: DatePickerProps['incrementIcon']
|
|
20
|
-
decrementIcon?: DatePickerProps['decrementIcon']
|
|
21
|
-
numberOfMonths?: DatePickerProps['numberOfMonths']
|
|
22
|
-
responsiveOptions?: DatePickerProps['responsiveOptions']
|
|
23
|
-
view?: DatePickerProps['view']
|
|
24
|
-
minDate?: DatePickerProps['minDate']
|
|
25
|
-
maxDate?: DatePickerProps['maxDate']
|
|
26
|
-
disabledDates?: DatePickerProps['disabledDates']
|
|
27
|
-
disabledDays?: DatePickerProps['disabledDays']
|
|
28
|
-
maxDateCount?: DatePickerProps['maxDateCount']
|
|
29
|
-
showOnFocus?: DatePickerProps['showOnFocus']
|
|
30
|
-
autoZIndex?: DatePickerProps['autoZIndex']
|
|
31
|
-
baseZIndex?: DatePickerProps['baseZIndex']
|
|
32
|
-
showButtonBar?: DatePickerProps['showButtonBar']
|
|
33
|
-
showTime?: DatePickerProps['showTime']
|
|
34
|
-
timeOnly?: DatePickerProps['timeOnly']
|
|
35
|
-
shortYearCutoff?: DatePickerProps['shortYearCutoff']
|
|
36
|
-
hourFormat?: DatePickerProps['hourFormat']
|
|
37
|
-
stepHour?: DatePickerProps['stepHour']
|
|
38
|
-
stepMinute?: DatePickerProps['stepMinute']
|
|
39
|
-
stepSecond?: DatePickerProps['stepSecond']
|
|
40
|
-
showSeconds?: DatePickerProps['showSeconds']
|
|
41
|
-
hideOnDateTimeSelect?: DatePickerProps['hideOnDateTimeSelect']
|
|
42
|
-
hideOnRangeSelection?: DatePickerProps['hideOnRangeSelection']
|
|
43
|
-
timeSeparator?: DatePickerProps['timeSeparator']
|
|
44
|
-
showWeek?: DatePickerProps['showWeek']
|
|
45
|
-
manualInput?: DatePickerProps['manualInput']
|
|
46
|
-
appendTo?: DatePickerProps['appendTo']
|
|
47
|
-
panelStyle?: DatePickerProps['panelStyle']
|
|
48
|
-
panelClass?: DatePickerProps['panelClass']
|
|
49
|
-
pt?: DatePickerProps['pt']
|
|
50
|
-
ptOptions?: DatePickerProps['ptOptions']
|
|
51
|
-
unstyled?: DatePickerProps['unstyled']
|
|
52
|
-
size?: DatePickerProps['size']
|
|
53
|
-
updateModelType?: DatePickerProps['updateModelType']
|
|
54
|
-
}
|
|
55
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables";
|
|
56
3
|
const props = defineProps({
|
|
57
4
|
context: {
|
|
58
|
-
type: Object
|
|
59
|
-
required: true
|
|
60
|
-
}
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
function handleBlur(e: DatePickerBlurEvent) {
|
|
66
|
-
props.context?.handlers.blur(e.originalEvent as FocusEvent)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput } = useFormKitInput(props.context);
|
|
10
|
+
function handleBlur(e) {
|
|
11
|
+
props.context?.handlers.blur(e.originalEvent);
|
|
67
12
|
}
|
|
68
|
-
|
|
69
13
|
function handleClearClick() {
|
|
70
|
-
props.context?.node.input(null)
|
|
14
|
+
props.context?.node.input(null);
|
|
71
15
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
else {
|
|
78
|
-
props.context?.node.input(e)
|
|
16
|
+
function handleSelect(e) {
|
|
17
|
+
if (props.context?.selectionMode === "range" || props.context?.selectionMode === "multiple") {
|
|
18
|
+
props.context?.node.input(props.context._value);
|
|
19
|
+
} else {
|
|
20
|
+
props.context?.node.input(e);
|
|
79
21
|
}
|
|
80
22
|
}
|
|
81
23
|
</script>
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import IconField from 'primevue/iconfield'
|
|
7
|
-
import InputIcon from 'primevue/inputicon'
|
|
8
|
-
import { useFormKitInput, useFormKitSection } from '../composables'
|
|
9
|
-
|
|
10
|
-
export interface FormKitPrimeInputMaskProps {
|
|
11
|
-
mask?: InputMaskProps['mask']
|
|
12
|
-
slotChar?: InputMaskProps['slotChar']
|
|
13
|
-
autoClear?: InputMaskProps['autoClear']
|
|
14
|
-
unmask?: InputMaskProps['unmask']
|
|
15
|
-
pt?: InputMaskProps['pt']
|
|
16
|
-
ptOptions?: InputMaskProps['ptOptions']
|
|
17
|
-
unstyled?: InputMaskProps['unstyled']
|
|
18
|
-
invalid?: InputMaskProps['invalid']
|
|
19
|
-
variant?: InputMaskProps['variant']
|
|
20
|
-
size?: InputMaskProps['size']
|
|
21
|
-
}
|
|
22
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import IconField from "primevue/iconfield";
|
|
3
|
+
import InputIcon from "primevue/inputicon";
|
|
4
|
+
import { useFormKitInput, useFormKitSection } from "../composables";
|
|
23
5
|
const props = defineProps({
|
|
24
6
|
context: {
|
|
25
|
-
type: Object
|
|
26
|
-
required: true
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const {
|
|
31
|
-
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context);
|
|
12
|
+
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context);
|
|
32
13
|
</script>
|
|
33
14
|
|
|
34
15
|
<template>
|
|
@@ -1,70 +1,36 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { watch } from 'vue'
|
|
7
|
-
import { useFormKitInput } from '../composables'
|
|
8
|
-
|
|
9
|
-
export interface FormKitPrimeInputNumberProps {
|
|
10
|
-
useGrouping?: InputNumberProps['useGrouping']
|
|
11
|
-
min?: InputNumberProps['min']
|
|
12
|
-
max?: InputNumberProps['max']
|
|
13
|
-
minFractionDigits?: InputNumberProps['minFractionDigits']
|
|
14
|
-
maxFractionDigits?: InputNumberProps['maxFractionDigits']
|
|
15
|
-
locale?: InputNumberProps['locale']
|
|
16
|
-
mode?: InputNumberProps['mode']
|
|
17
|
-
currency?: InputNumberProps['currency']
|
|
18
|
-
prefix?: InputNumberProps['prefix']
|
|
19
|
-
suffix?: InputNumberProps['suffix']
|
|
20
|
-
showButtons?: InputNumberProps['showButtons']
|
|
21
|
-
buttonLayout?: InputNumberProps['buttonLayout']
|
|
22
|
-
step?: InputNumberProps['step']
|
|
23
|
-
pt?: InputNumberProps['pt']
|
|
24
|
-
ptOptions?: InputNumberProps['ptOptions']
|
|
25
|
-
unstyled?: InputNumberProps['unstyled']
|
|
26
|
-
placeholder?: InputNumberProps['placeholder']
|
|
27
|
-
size?: InputNumberProps['size']
|
|
28
|
-
}
|
|
29
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { watch } from "vue";
|
|
3
|
+
import { useFormKitInput } from "../composables";
|
|
30
4
|
const props = defineProps({
|
|
31
5
|
context: {
|
|
32
|
-
type: Object
|
|
33
|
-
required: true
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
function handleBlur(e: InputNumberBlurEvent) {
|
|
40
|
-
props.context?.handlers.blur(e.originalEvent as FocusEvent)
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const { validSlotNames, unstyled, isInvalid } = useFormKitInput(props.context);
|
|
11
|
+
function handleBlur(e) {
|
|
12
|
+
props.context?.handlers.blur(e.originalEvent);
|
|
41
13
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
props.context?.node.input(_.value)
|
|
14
|
+
function handleInput(_) {
|
|
15
|
+
if (typeof _.value === "number" || _.value === null)
|
|
16
|
+
props.context?.node.input(_.value);
|
|
46
17
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return Math.round(value * factor) / factor
|
|
18
|
+
function roundToDecimals(value, decimals) {
|
|
19
|
+
const factor = 10 ** decimals;
|
|
20
|
+
return Math.round(value * factor) / factor;
|
|
51
21
|
}
|
|
52
|
-
|
|
53
22
|
watch(
|
|
54
23
|
() => props.context._value,
|
|
55
24
|
(newValue) => {
|
|
56
|
-
|
|
57
|
-
if (newValue !== props.context.node.value && typeof newValue === 'number') {
|
|
25
|
+
if (newValue !== props.context.node.value && typeof newValue === "number") {
|
|
58
26
|
if (props.context.maxFractionDigits && props.context.maxFractionDigits > 0) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
else {
|
|
63
|
-
props.context?.node.input(newValue)
|
|
27
|
+
props.context?.node.input(roundToDecimals(newValue, props.context.maxFractionDigits));
|
|
28
|
+
} else {
|
|
29
|
+
props.context?.node.input(newValue);
|
|
64
30
|
}
|
|
65
31
|
}
|
|
66
|
-
}
|
|
67
|
-
)
|
|
32
|
+
}
|
|
33
|
+
);
|
|
68
34
|
</script>
|
|
69
35
|
|
|
70
36
|
<template>
|
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { InputOtpProps } from 'primevue/inputotp'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeInputOtpProps {
|
|
9
|
-
unstyled?: InputOtpProps['unstyled']
|
|
10
|
-
ptOptions?: InputOtpProps['ptOptions']
|
|
11
|
-
pt?: InputOtpProps['pt']
|
|
12
|
-
length?: InputOtpProps['length']
|
|
13
|
-
variant?: InputOtpProps['variant']
|
|
14
|
-
mask?: InputOtpProps['mask']
|
|
15
|
-
integerOnly?: InputOtpProps['integerOnly']
|
|
16
|
-
size?: InputOtpProps['size']
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables";
|
|
19
3
|
const props = defineProps({
|
|
20
4
|
context: {
|
|
21
|
-
type: Object
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const { validSlotNames, unstyled, isInvalid, handleBlur, handleInput } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleBlur, handleInput } = useFormKitInput(props.context);
|
|
27
10
|
</script>
|
|
28
11
|
|
|
29
12
|
<template>
|
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import IconField from 'primevue/iconfield'
|
|
7
|
-
import InputIcon from 'primevue/inputicon'
|
|
8
|
-
import { useFormKitInput, useFormKitSection } from '../composables'
|
|
9
|
-
|
|
10
|
-
export interface FormKitPrimeInputTextProps {
|
|
11
|
-
pt?: InputTextProps['pt']
|
|
12
|
-
ptOptions?: InputTextProps['ptOptions']
|
|
13
|
-
unstyled?: InputTextProps['unstyled']
|
|
14
|
-
size?: InputTextProps['size']
|
|
15
|
-
inputType?: string | undefined
|
|
16
|
-
placeholder?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import IconField from "primevue/iconfield";
|
|
3
|
+
import InputIcon from "primevue/inputicon";
|
|
4
|
+
import { useFormKitInput, useFormKitSection } from "../composables";
|
|
19
5
|
const props = defineProps({
|
|
20
6
|
context: {
|
|
21
|
-
type: Object
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const {
|
|
27
|
-
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context)
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context);
|
|
12
|
+
const { hasPrefixIcon, hasSuffixIcon } = useFormKitSection(props.context);
|
|
28
13
|
</script>
|
|
29
14
|
|
|
30
15
|
<template>
|
|
@@ -1,43 +1,18 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { KnobProps } from 'primevue/knob'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeKnobProps {
|
|
9
|
-
pt?: KnobProps['pt']
|
|
10
|
-
ptOptions?: KnobProps['ptOptions']
|
|
11
|
-
unstyled?: KnobProps['unstyled']
|
|
12
|
-
min?: KnobProps['min']
|
|
13
|
-
max?: KnobProps['max']
|
|
14
|
-
step?: KnobProps['step']
|
|
15
|
-
size?: KnobProps['size']
|
|
16
|
-
strokeWidth?: KnobProps['strokeWidth']
|
|
17
|
-
showValue?: KnobProps['showValue']
|
|
18
|
-
valueColor?: KnobProps['valueColor']
|
|
19
|
-
rangeColor?: KnobProps['rangeColor']
|
|
20
|
-
textColor?: KnobProps['textColor']
|
|
21
|
-
valueTemplate?: KnobProps['valueTemplate']
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables";
|
|
25
3
|
const props = defineProps({
|
|
26
4
|
context: {
|
|
27
|
-
type: Object
|
|
28
|
-
required: true
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
props.context?.node.input(e)
|
|
36
|
-
props.context?.handlers.blur(e)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { unstyled, isInvalid } = useFormKitInput(props.context);
|
|
10
|
+
function handleInput(e) {
|
|
11
|
+
props.context?.node.input(e);
|
|
12
|
+
props.context?.handlers.blur(e);
|
|
37
13
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
props.context?.node.input(n)
|
|
14
|
+
function updateValue(n) {
|
|
15
|
+
props.context?.node.input(n);
|
|
41
16
|
}
|
|
42
17
|
</script>
|
|
43
18
|
|
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { ListboxProps } from 'primevue/listbox'
|
|
4
|
-
import type { PropType } from 'vue'
|
|
5
|
-
import { useFormKitInput } from '../composables'
|
|
6
|
-
|
|
7
|
-
export interface FormKitPrimeListboxProps {
|
|
8
|
-
pt?: ListboxProps['pt']
|
|
9
|
-
ptOptions?: ListboxProps['ptOptions']
|
|
10
|
-
unstyled?: ListboxProps['unstyled']
|
|
11
|
-
options?: ListboxProps['options']
|
|
12
|
-
optionLabel?: ListboxProps['optionLabel']
|
|
13
|
-
optionValue?: ListboxProps['optionValue']
|
|
14
|
-
multiple?: ListboxProps['multiple']
|
|
15
|
-
filter?: ListboxProps['filter']
|
|
16
|
-
filterIcon?: ListboxProps['filterIcon']
|
|
17
|
-
filterPlaceholder?: ListboxProps['filterPlaceholder']
|
|
18
|
-
filterLocale?: ListboxProps['filterLocale']
|
|
19
|
-
filterMatchMode?: ListboxProps['filterMatchMode']
|
|
20
|
-
autoOptionFocus?: ListboxProps['autoOptionFocus']
|
|
21
|
-
selectOnFocus?: ListboxProps['selectOnFocus']
|
|
22
|
-
optionDisabled?: ListboxProps['optionDisabled']
|
|
23
|
-
optionGroupLabel?: ListboxProps['optionGroupLabel']
|
|
24
|
-
optionGroupChildren?: ListboxProps['optionGroupChildren']
|
|
25
|
-
listStyle?: ListboxProps['listStyle']
|
|
26
|
-
dataKey?: ListboxProps['dataKey']
|
|
27
|
-
metaKeySelection?: ListboxProps['metaKeySelection']
|
|
28
|
-
virtualScrollerOptions?: ListboxProps['virtualScrollerOptions']
|
|
29
|
-
tabindex?: ListboxProps['tabindex']
|
|
30
|
-
ariaLabel?: ListboxProps['ariaLabel']
|
|
31
|
-
ariaLabelledby?: ListboxProps['ariaLabelledby']
|
|
32
|
-
}
|
|
33
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables";
|
|
34
3
|
const props = defineProps({
|
|
35
4
|
context: {
|
|
36
|
-
type: Object
|
|
37
|
-
required: true
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context);
|
|
42
10
|
</script>
|
|
43
11
|
|
|
44
12
|
<template>
|
|
@@ -1,57 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { MultiSelectProps } from 'primevue/multiselect'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeMultiSelectProps {
|
|
9
|
-
options?: MultiSelectProps['options']
|
|
10
|
-
optionLabel?: MultiSelectProps['optionLabel']
|
|
11
|
-
optionValue?: MultiSelectProps['optionValue']
|
|
12
|
-
optionDisabled?: MultiSelectProps['optionDisabled']
|
|
13
|
-
optionGroupLabel?: MultiSelectProps['optionGroupLabel']
|
|
14
|
-
optionGroupChildren?: MultiSelectProps['optionGroupChildren']
|
|
15
|
-
scrollHeight?: MultiSelectProps['scrollHeight']
|
|
16
|
-
dataKey?: MultiSelectProps['dataKey']
|
|
17
|
-
filter?: MultiSelectProps['filter']
|
|
18
|
-
filterPlaceholder?: MultiSelectProps['filterPlaceholder']
|
|
19
|
-
filterLocale?: MultiSelectProps['filterLocale']
|
|
20
|
-
filterMatchMode?: MultiSelectProps['filterMatchMode']
|
|
21
|
-
filterFields?: MultiSelectProps['filterFields']
|
|
22
|
-
appendTo?: MultiSelectProps['appendTo']
|
|
23
|
-
display?: MultiSelectProps['display']
|
|
24
|
-
maxSelectedLabels?: MultiSelectProps['maxSelectedLabels']
|
|
25
|
-
selectedItemsLabel?: MultiSelectProps['selectedItemsLabel']
|
|
26
|
-
selectionLimit?: MultiSelectProps['selectionLimit']
|
|
27
|
-
showToggleAll?: MultiSelectProps['showToggleAll']
|
|
28
|
-
loading?: MultiSelectProps['loading']
|
|
29
|
-
selectAll?: MultiSelectProps['selectAll']
|
|
30
|
-
resetFilterOnHide?: MultiSelectProps['resetFilterOnHide']
|
|
31
|
-
virtualScrollerOptions?: MultiSelectProps['virtualScrollerOptions']
|
|
32
|
-
autoOptionFocus?: MultiSelectProps['autoOptionFocus']
|
|
33
|
-
autoFilterFocus?: MultiSelectProps['autoFilterFocus']
|
|
34
|
-
filterMessage?: MultiSelectProps['filterMessage']
|
|
35
|
-
selectionMessage?: MultiSelectProps['selectionMessage']
|
|
36
|
-
emptySelectionMessage?: MultiSelectProps['emptySelectionMessage']
|
|
37
|
-
emptyFilterMessage?: MultiSelectProps['emptyFilterMessage']
|
|
38
|
-
emptyMessage?: MultiSelectProps['emptyMessage']
|
|
39
|
-
pt?: MultiSelectProps['pt']
|
|
40
|
-
placeholder?: MultiSelectProps['placeholder']
|
|
41
|
-
ptOptions?: MultiSelectProps['ptOptions']
|
|
42
|
-
unstyled?: MultiSelectProps['unstyled']
|
|
43
|
-
size?: MultiSelectProps['size']
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables";
|
|
47
3
|
const props = defineProps({
|
|
48
4
|
context: {
|
|
49
|
-
type: Object
|
|
50
|
-
required: true
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const { validSlotNames, unstyled, isInvalid, handleBlur, handleChange } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleBlur, handleChange } = useFormKitInput(props.context);
|
|
55
10
|
</script>
|
|
56
11
|
|
|
57
12
|
<template>
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
9
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
10
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
11
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useFormKitSection } from "../composables";
|
|
5
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
6
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
7
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
12
8
|
const props = defineProps({
|
|
13
9
|
context: {
|
|
14
|
-
type: Object
|
|
15
|
-
required: true
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
const { t } = useI18n()
|
|
22
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
15
|
+
const { t } = useI18n();
|
|
23
16
|
const translated = computed(() => {
|
|
24
17
|
if (props.context?._value)
|
|
25
|
-
return props.context?.trueValue ?? t(
|
|
18
|
+
return props.context?.trueValue ?? t("formkit.prime.true", "true");
|
|
26
19
|
else
|
|
27
|
-
return props.context?.falseValue ?? t(
|
|
28
|
-
})
|
|
20
|
+
return props.context?.falseValue ?? t("formkit.prime.false", "false");
|
|
21
|
+
});
|
|
29
22
|
</script>
|
|
30
23
|
|
|
31
24
|
<template>
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
9
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
10
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
11
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useFormKitSection } from "../composables";
|
|
5
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
6
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
7
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
12
8
|
const props = defineProps({
|
|
13
9
|
context: {
|
|
14
|
-
type: Object
|
|
15
|
-
required: true
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
const { d } = useI18n()
|
|
22
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
15
|
+
const { d } = useI18n();
|
|
23
16
|
const converted = computed(() => {
|
|
24
17
|
if (props?.context?._value) {
|
|
25
|
-
let result =
|
|
26
|
-
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format :
|
|
18
|
+
let result = "";
|
|
19
|
+
const format = props?.context?.attrs?.value?.format ? props?.context?.attrs.value.format : "short";
|
|
27
20
|
try {
|
|
28
|
-
result = d(props?.context?._value, format)
|
|
29
|
-
}
|
|
30
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
31
|
-
catch (e) {
|
|
21
|
+
result = d(props?.context?._value, format);
|
|
22
|
+
} catch (e) {
|
|
32
23
|
}
|
|
33
|
-
return result
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return ''
|
|
24
|
+
return result;
|
|
25
|
+
} else {
|
|
26
|
+
return "";
|
|
37
27
|
}
|
|
38
|
-
})
|
|
28
|
+
});
|
|
39
29
|
</script>
|
|
40
30
|
|
|
41
31
|
<template>
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import FormKitIcon from './FormKitIcon.vue'
|
|
7
|
-
import FormKitPrefix from './FormKitPrefix.vue'
|
|
8
|
-
import FormKitSuffix from './FormKitSuffix.vue'
|
|
9
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitSection, useOutputDuration } from "../composables";
|
|
3
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
4
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
5
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
10
6
|
const props = defineProps({
|
|
11
7
|
context: {
|
|
12
|
-
type: Object
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
const { formattedDuration } = useOutputDuration()
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
13
|
+
const { formattedDuration } = useOutputDuration();
|
|
20
14
|
</script>
|
|
21
15
|
|
|
22
16
|
<template>
|