@sfxcode/formkit-primevue 3.3.3 → 3.3.4
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/README.md +13 -138
- package/dist/components/FormKitDataDebug.vue +5 -9
- package/dist/components/FormKitDataEdit.vue +53 -46
- package/dist/components/FormKitDataView.vue +20 -27
- 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 +41 -86
- 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 +17 -73
- package/dist/components/PrimeInputMask.vue +10 -29
- package/dist/components/PrimeInputNumber.vue +21 -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 +28 -27
- package/dist/components/PrimeOutputDate.vue +33 -33
- package/dist/components/PrimeOutputDuration.vue +23 -19
- package/dist/components/PrimeOutputLink.vue +29 -27
- package/dist/components/PrimeOutputList.vue +71 -40
- package/dist/components/PrimeOutputNumber.vue +36 -39
- package/dist/components/PrimeOutputReference.vue +32 -30
- package/dist/components/PrimeOutputText.vue +53 -53
- package/dist/components/PrimePassword.vue +11 -32
- package/dist/components/PrimeRadioButton.vue +19 -29
- 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/components/index.d.ts +23 -23
- package/dist/composables/index.d.ts +8 -8
- package/dist/composables/index.js +8 -8
- package/dist/composables/index.mjs +8 -8
- package/dist/composables/useFormKitInput.js +5 -1
- package/dist/composables/useFormKitInput.mjs +13 -1
- package/dist/composables/useFormKitRepeater.js +1 -1
- package/dist/composables/useFormKitRepeater.mjs +45 -17
- package/dist/composables/useFormKitSchema.mjs +10 -2
- package/dist/composables/useInputEditor.js +4 -4
- package/dist/composables/useInputEditor.mjs +52 -24
- package/dist/composables/useInputEditorSchema.js +3 -3
- package/dist/composables/useInputEditorSchema.mjs +25 -17
- package/dist/composables/useOutputDuration.mjs +3 -6
- package/dist/definitions/index.js +2 -2
- package/dist/definitions/index.mjs +2 -2
- package/dist/definitions/input.d.ts +1 -1
- package/dist/definitions/input.mjs +301 -15
- package/dist/definitions/output.d.ts +1 -1
- package/dist/definitions/output.js +1 -1
- package/dist/definitions/output.mjs +95 -14
- package/dist/index.d.ts +48 -48
- package/dist/index.js +12 -12
- package/dist/index.mjs +9 -3
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +31 -27
- package/dist/sass/formkit-primevue.scss +99 -101
- package/dist/vue.d.ts +5 -0
- package/package.json +51 -88
- package/LICENSE +0 -21
- package/components.d.ts +0 -1
- package/dist/components/FormKitDataDebug.d.vue.ts +0 -24
- package/dist/components/FormKitDataDebug.vue.d.ts +0 -24
- 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/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 -22
- package/dist/components/PrimeOutputText.vue.d.ts +0 -22
- 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,72 +1,72 @@
|
|
|
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
|
-
|
|
12
|
-
export interface FormKitOutputTextProps {
|
|
13
|
-
html?: boolean
|
|
14
|
-
isTranslationKey?: boolean
|
|
15
|
-
convertValue?: (value: string) => string
|
|
16
|
-
maxLength?: number
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
5
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
6
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
7
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
19
8
|
const props = defineProps({
|
|
20
9
|
context: {
|
|
21
|
-
type: Object
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
26
14
|
const textValue = computed(() => {
|
|
27
|
-
const value = props.context?._value
|
|
28
|
-
const { t } = useI18n()
|
|
29
|
-
let result =
|
|
15
|
+
const value = props.context?._value;
|
|
16
|
+
const { t } = useI18n();
|
|
17
|
+
let result = "";
|
|
30
18
|
if (value) {
|
|
31
19
|
if (props.context?.isTranslationKey) {
|
|
32
|
-
result = t(value)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
else {
|
|
38
|
-
result = value
|
|
20
|
+
result = t(value);
|
|
21
|
+
} else if (typeof props.context?.convertValue === "function") {
|
|
22
|
+
result = props.context?.convertValue(value);
|
|
23
|
+
} else {
|
|
24
|
+
result = value;
|
|
39
25
|
}
|
|
40
26
|
}
|
|
41
|
-
|
|
42
|
-
// Apply maxLength truncation if specified
|
|
43
|
-
const maxLength = props.context?.maxLength as number | undefined
|
|
27
|
+
const maxLength = props.context?.maxLength;
|
|
44
28
|
if (result && maxLength && !props.context?.html && result.length > maxLength) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const lastSpaceIndex = truncated.lastIndexOf(' ')
|
|
48
|
-
|
|
49
|
-
// Only truncate at word boundary if there's a space, and it's not too far back
|
|
50
|
-
// (at least 80% of maxLength to avoid cutting too much)
|
|
29
|
+
let truncated = result.substring(0, maxLength);
|
|
30
|
+
const lastSpaceIndex = truncated.lastIndexOf(" ");
|
|
51
31
|
if (lastSpaceIndex > maxLength * 0.8) {
|
|
52
|
-
truncated = truncated.substring(0, lastSpaceIndex)
|
|
32
|
+
truncated = truncated.substring(0, lastSpaceIndex);
|
|
53
33
|
}
|
|
54
|
-
result = `${truncated}
|
|
34
|
+
result = `${truncated}...`;
|
|
55
35
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context)
|
|
36
|
+
return result;
|
|
37
|
+
});
|
|
38
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
61
39
|
</script>
|
|
62
40
|
|
|
63
41
|
<template>
|
|
64
42
|
<div class="p-formkit p-output-text">
|
|
65
|
-
<FormKitIcon
|
|
43
|
+
<FormKitIcon
|
|
44
|
+
v-if="hasPrefixIcon"
|
|
45
|
+
:icon-class="context?.iconPrefix as string"
|
|
46
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
47
|
+
position="prefix"
|
|
48
|
+
/>
|
|
66
49
|
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
67
|
-
<span
|
|
68
|
-
|
|
50
|
+
<span
|
|
51
|
+
v-if="context?.html"
|
|
52
|
+
:id="context?.id"
|
|
53
|
+
:class="context?.attrs?.class"
|
|
54
|
+
:style="context?.attrs?.style"
|
|
55
|
+
v-html="textValue"
|
|
56
|
+
/>
|
|
57
|
+
<span
|
|
58
|
+
v-else
|
|
59
|
+
:id="context?.id"
|
|
60
|
+
:class="context?.attrs?.class"
|
|
61
|
+
:style="context?.attrs?.style"
|
|
62
|
+
v-text="textValue"
|
|
63
|
+
/>
|
|
69
64
|
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
70
|
-
<FormKitIcon
|
|
65
|
+
<FormKitIcon
|
|
66
|
+
v-if="hasSuffixIcon"
|
|
67
|
+
:icon-class="context?.iconSuffix as string"
|
|
68
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
69
|
+
position="suffix"
|
|
70
|
+
/>
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { PasswordProps } from 'primevue/password'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimePasswordProps {
|
|
9
|
-
mediumRegex?: PasswordProps['mediumRegex']
|
|
10
|
-
strongRegex?: PasswordProps['strongRegex']
|
|
11
|
-
promptLabel?: PasswordProps['promptLabel']
|
|
12
|
-
weakLabel?: PasswordProps['weakLabel']
|
|
13
|
-
mediumLabel?: PasswordProps['mediumLabel']
|
|
14
|
-
strongLabel?: PasswordProps['strongLabel']
|
|
15
|
-
maskIcon?: PasswordProps['maskIcon']
|
|
16
|
-
unmaskIcon?: PasswordProps['unmaskIcon']
|
|
17
|
-
pt?: PasswordProps['pt']
|
|
18
|
-
ptOptions?: PasswordProps['ptOptions']
|
|
19
|
-
unstyled?: PasswordProps['unstyled']
|
|
20
|
-
placeholder?: PasswordProps['placeholder']
|
|
21
|
-
feedback?: PasswordProps['feedback']
|
|
22
|
-
toggleMask?: PasswordProps['toggleMask']
|
|
23
|
-
size?: PasswordProps['size']
|
|
24
|
-
}
|
|
25
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
26
3
|
const props = defineProps({
|
|
27
4
|
context: {
|
|
28
|
-
type: Object
|
|
29
|
-
required: true
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
34
10
|
</script>
|
|
35
11
|
|
|
36
12
|
<template>
|
|
@@ -49,7 +25,10 @@ const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue
|
|
|
49
25
|
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
50
26
|
:size="context?.size ?? undefined"
|
|
51
27
|
:placeholder="context.placeholder"
|
|
52
|
-
:medium-regex="
|
|
28
|
+
:medium-regex="
|
|
29
|
+
context.mediumRegex ??
|
|
30
|
+
'^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'
|
|
31
|
+
"
|
|
53
32
|
:strong-regex="context.strongRegex ?? '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})'"
|
|
54
33
|
:prompt-label="context.promptLabel"
|
|
55
34
|
:weak-label="context.weakLabel"
|
|
@@ -1,38 +1,28 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { computed } from 'vue'
|
|
7
|
-
import { useFormKitInput } from '../composables'
|
|
8
|
-
|
|
9
|
-
export interface FormKitPrimeRadioButtonProps {
|
|
10
|
-
pt?: RadioButtonProps['pt']
|
|
11
|
-
ptOptions?: RadioButtonProps['ptOptions']
|
|
12
|
-
unstyled?: RadioButtonProps['unstyled']
|
|
13
|
-
size?: RadioButtonProps['size']
|
|
14
|
-
options?: { label: string, value: any }[]
|
|
15
|
-
optionsClass?: string
|
|
16
|
-
optionClass?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
19
4
|
const props = defineProps({
|
|
20
5
|
context: {
|
|
21
|
-
type: Object
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const optionsClass = computed(() => props.context?.optionsClass ??
|
|
29
|
-
const optionClass = computed(() => props.context?.optionClass ??
|
|
30
|
-
const labelClass = computed(() => props.context?.labelClass ??
|
|
6
|
+
type: Object,
|
|
7
|
+
required: true
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const { unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(
|
|
11
|
+
props.context
|
|
12
|
+
);
|
|
13
|
+
const optionsClass = computed(() => props.context?.optionsClass ?? "");
|
|
14
|
+
const optionClass = computed(() => props.context?.optionClass ?? "");
|
|
15
|
+
const labelClass = computed(() => props.context?.labelClass ?? "");
|
|
31
16
|
</script>
|
|
32
17
|
|
|
33
18
|
<template>
|
|
34
19
|
<div class="p-formkit p-formkit-options" :class="optionsClass">
|
|
35
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
v-for="option in context.options"
|
|
22
|
+
:key="option.value"
|
|
23
|
+
class="p-formkit-option"
|
|
24
|
+
:class="optionClass"
|
|
25
|
+
>
|
|
36
26
|
<RadioButton
|
|
37
27
|
:id="context.id"
|
|
38
28
|
v-model="modelValue"
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { RatingProps } from 'primevue/rating'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeRatingProps {
|
|
9
|
-
unstyled?: RatingProps['unstyled']
|
|
10
|
-
stars?: RatingProps['stars']
|
|
11
|
-
onIcon?: RatingProps['onIcon']
|
|
12
|
-
offIcon?: RatingProps['offIcon']
|
|
13
|
-
ptOptions?: RatingProps['ptOptions']
|
|
14
|
-
pt?: RatingProps['pt']
|
|
15
|
-
}
|
|
16
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
17
3
|
const props = defineProps({
|
|
18
4
|
context: {
|
|
19
|
-
type: Object
|
|
20
|
-
required: true
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
25
10
|
</script>
|
|
26
11
|
|
|
27
12
|
<template>
|
|
@@ -1,54 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { SelectProps } from 'primevue/select'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeSelectProps {
|
|
9
|
-
options?: SelectProps['options']
|
|
10
|
-
optionLabel?: SelectProps['optionLabel']
|
|
11
|
-
optionValue?: SelectProps['optionValue']
|
|
12
|
-
optionDisabled?: SelectProps['optionDisabled']
|
|
13
|
-
optionGroupLabel?: SelectProps['optionGroupLabel']
|
|
14
|
-
optionGroupChildren?: SelectProps['optionGroupChildren']
|
|
15
|
-
scrollHeight?: SelectProps['scrollHeight']
|
|
16
|
-
filter?: SelectProps['filter']
|
|
17
|
-
filterPlaceholder?: SelectProps['filterPlaceholder']
|
|
18
|
-
filterLocale?: SelectProps['filterLocale']
|
|
19
|
-
filterMatchMode?: SelectProps['filterMatchMode']
|
|
20
|
-
filterFields?: SelectProps['filterFields']
|
|
21
|
-
editable?: SelectProps['editable']
|
|
22
|
-
placeholder?: SelectProps['placeholder']
|
|
23
|
-
dataKey?: SelectProps['dataKey']
|
|
24
|
-
showClear?: SelectProps['showClear']
|
|
25
|
-
overlayStyle?: SelectProps['overlayStyle']
|
|
26
|
-
overlayClass?: SelectProps['overlayClass']
|
|
27
|
-
appendTo?: SelectProps['appendTo']
|
|
28
|
-
resetFilterOnHide?: SelectProps['resetFilterOnHide']
|
|
29
|
-
virtualScrollerOptions?: SelectProps['virtualScrollerOptions']
|
|
30
|
-
autoOptionFocus?: SelectProps['autoOptionFocus']
|
|
31
|
-
selectOnFocus?: SelectProps['selectOnFocus']
|
|
32
|
-
filterMessage?: SelectProps['filterMessage']
|
|
33
|
-
selectionMessage?: SelectProps['selectionMessage']
|
|
34
|
-
emptySelectionMessage?: SelectProps['emptySelectionMessage']
|
|
35
|
-
emptyFilterMessage?: SelectProps['emptyFilterMessage']
|
|
36
|
-
emptyMessage?: SelectProps['emptyMessage']
|
|
37
|
-
pt?: SelectProps['pt']
|
|
38
|
-
ptOptions?: SelectProps['ptOptions']
|
|
39
|
-
unstyled?: SelectProps['unstyled']
|
|
40
|
-
size?: SelectProps['size']
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
44
3
|
const props = defineProps({
|
|
45
4
|
context: {
|
|
46
|
-
type: Object
|
|
47
|
-
required: true
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
52
10
|
</script>
|
|
53
11
|
|
|
54
12
|
<template>
|
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { SelectButtonProps } from 'primevue/selectbutton'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeSelectButtonProps {
|
|
9
|
-
pt?: SelectButtonProps['pt']
|
|
10
|
-
ptOptions?: SelectButtonProps['ptOptions']
|
|
11
|
-
unstyled?: SelectButtonProps['unstyled']
|
|
12
|
-
optionLabel?: SelectButtonProps['optionLabel']
|
|
13
|
-
optionValue?: SelectButtonProps['optionValue']
|
|
14
|
-
optionDisabled?: SelectButtonProps['optionDisabled']
|
|
15
|
-
multiple?: SelectButtonProps['multiple']
|
|
16
|
-
dataKey?: SelectButtonProps['dataKey']
|
|
17
|
-
options?: SelectButtonProps['options']
|
|
18
|
-
size?: SelectButtonProps['size']
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
22
3
|
const props = defineProps({
|
|
23
4
|
context: {
|
|
24
|
-
type: Object
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
30
10
|
</script>
|
|
31
11
|
|
|
32
12
|
<template>
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { SliderProps } from 'primevue/slider'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeSliderProps {
|
|
9
|
-
pt?: SliderProps['pt']
|
|
10
|
-
ptOptions?: SliderProps['ptOptions']
|
|
11
|
-
unstyled?: SliderProps['unstyled']
|
|
12
|
-
min?: SliderProps['min']
|
|
13
|
-
max?: SliderProps['max']
|
|
14
|
-
step?: SliderProps['step']
|
|
15
|
-
range?: SliderProps['range']
|
|
16
|
-
orientation?: SliderProps['orientation']
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
19
3
|
const props = defineProps({
|
|
20
4
|
context: {
|
|
21
|
-
type: Object
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
props.context?.node.input(e)
|
|
30
|
-
props.context?.handlers.blur(e)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { unstyled, isInvalid, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
function handleInput(e) {
|
|
11
|
+
props.context?.node.input(e);
|
|
12
|
+
props.context?.handlers.blur(e);
|
|
31
13
|
}
|
|
32
14
|
</script>
|
|
33
15
|
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { TextareaProps } from 'primevue/textarea'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeTextareaProps {
|
|
9
|
-
pt?: TextareaProps['pt']
|
|
10
|
-
ptOptions?: TextareaProps['ptOptions']
|
|
11
|
-
unstyled?: TextareaProps['unstyled']
|
|
12
|
-
autoResize?: TextareaProps['autoResize']
|
|
13
|
-
size?: TextareaProps['size']
|
|
14
|
-
placeholder?: string
|
|
15
|
-
rows?: number
|
|
16
|
-
}
|
|
17
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
18
3
|
const props = defineProps({
|
|
19
4
|
context: {
|
|
20
|
-
type: Object
|
|
21
|
-
required: true
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const { unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
26
10
|
</script>
|
|
27
11
|
|
|
28
12
|
<template>
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { ToggleButtonProps } from 'primevue/togglebutton'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeToggleButtonProps {
|
|
9
|
-
pt?: ToggleButtonProps['pt']
|
|
10
|
-
ptOptions?: ToggleButtonProps['ptOptions']
|
|
11
|
-
unstyled?: ToggleButtonProps['unstyled']
|
|
12
|
-
onLabel?: ToggleButtonProps['onLabel']
|
|
13
|
-
offLabel?: ToggleButtonProps['offLabel']
|
|
14
|
-
onIcon?: ToggleButtonProps['onIcon']
|
|
15
|
-
offIcon?: ToggleButtonProps['offIcon']
|
|
16
|
-
size?: ToggleButtonProps['size']
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
20
3
|
const props = defineProps({
|
|
21
4
|
context: {
|
|
22
|
-
type: Object
|
|
23
|
-
required: true
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
28
10
|
</script>
|
|
29
11
|
|
|
30
12
|
<template>
|
|
@@ -1,28 +1,13 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { ToggleSwitchProps } from 'primevue/toggleswitch'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput, useFormKitSection } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeToggleSwitchProps {
|
|
9
|
-
trueValue?: ToggleSwitchProps['trueValue']
|
|
10
|
-
falseValue?: ToggleSwitchProps['falseValue']
|
|
11
|
-
pt?: ToggleSwitchProps['pt']
|
|
12
|
-
ptOptions?: ToggleSwitchProps['ptOptions']
|
|
13
|
-
unstyled?: ToggleSwitchProps['unstyled']
|
|
14
|
-
}
|
|
15
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput, useFormKitSection } from "../composables/index.ts";
|
|
16
3
|
const props = defineProps({
|
|
17
4
|
context: {
|
|
18
|
-
type: Object
|
|
19
|
-
required: true
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const { unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { hasPrefix, hasSuffix } = useFormKitSection(props.context);
|
|
10
|
+
const { unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
26
11
|
</script>
|
|
27
12
|
|
|
28
13
|
<template>
|
|
@@ -1,35 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { TreeSelectProps } from 'primevue/treeselect'
|
|
4
|
-
|
|
5
|
-
import type { PropType } from 'vue'
|
|
6
|
-
import { useFormKitInput } from '../composables'
|
|
7
|
-
|
|
8
|
-
export interface FormKitPrimeTreeSelectProps {
|
|
9
|
-
options?: TreeSelectProps['options']
|
|
10
|
-
placeholder?: TreeSelectProps['placeholder']
|
|
11
|
-
selectionMode?: TreeSelectProps['selectionMode']
|
|
12
|
-
pt?: TreeSelectProps['pt']
|
|
13
|
-
ptOptions?: TreeSelectProps['ptOptions']
|
|
14
|
-
unstyled?: TreeSelectProps['unstyled']
|
|
15
|
-
emptyMessage?: TreeSelectProps['emptyMessage']
|
|
16
|
-
display?: TreeSelectProps['display']
|
|
17
|
-
metaKeySelection?: TreeSelectProps['metaKeySelection']
|
|
18
|
-
appendTo?: TreeSelectProps['appendTo']
|
|
19
|
-
scrollHeight?: TreeSelectProps['scrollHeight']
|
|
20
|
-
panelClass?: TreeSelectProps['panelClass']
|
|
21
|
-
variant?: TreeSelectProps['variant']
|
|
22
|
-
size?: TreeSelectProps['size']
|
|
23
|
-
}
|
|
24
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
25
3
|
const props = defineProps({
|
|
26
4
|
context: {
|
|
27
|
-
type: Object
|
|
28
|
-
required: true
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context)
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
33
10
|
</script>
|
|
34
11
|
|
|
35
12
|
<template>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import FormKitDataEdit from
|
|
2
|
-
import FormKitDataView from
|
|
3
|
-
import PrimeAutoComplete from
|
|
4
|
-
import PrimeCascadeSelect from
|
|
5
|
-
import PrimeCheckbox from
|
|
6
|
-
import PrimeColorPicker from
|
|
7
|
-
import PrimeDatePicker from
|
|
8
|
-
import PrimeInputMask from
|
|
9
|
-
import PrimeInputNumber from
|
|
10
|
-
import PrimeInputText from
|
|
11
|
-
import PrimeKnob from
|
|
12
|
-
import PrimeListbox from
|
|
13
|
-
import PrimeMultiSelect from
|
|
14
|
-
import PrimePassword from
|
|
15
|
-
import PrimeRadioButton from
|
|
16
|
-
import PrimeRating from
|
|
17
|
-
import PrimeSelect from
|
|
18
|
-
import PrimeSelectButton from
|
|
19
|
-
import PrimeSlider from
|
|
20
|
-
import PrimeTextarea from
|
|
21
|
-
import PrimeToggleButton from
|
|
22
|
-
import PrimeInputSwitch from
|
|
23
|
-
import PrimeTreeSelect from
|
|
1
|
+
import FormKitDataEdit from "./FormKitDataEdit.vue";
|
|
2
|
+
import FormKitDataView from "./FormKitDataView.vue";
|
|
3
|
+
import PrimeAutoComplete from "./PrimeAutoComplete.vue";
|
|
4
|
+
import PrimeCascadeSelect from "./PrimeCascadeSelect.vue";
|
|
5
|
+
import PrimeCheckbox from "./PrimeCheckbox.vue";
|
|
6
|
+
import PrimeColorPicker from "./PrimeColorPicker.vue";
|
|
7
|
+
import PrimeDatePicker from "./PrimeDatePicker.vue";
|
|
8
|
+
import PrimeInputMask from "./PrimeInputMask.vue";
|
|
9
|
+
import PrimeInputNumber from "./PrimeInputNumber.vue";
|
|
10
|
+
import PrimeInputText from "./PrimeInputText.vue";
|
|
11
|
+
import PrimeKnob from "./PrimeKnob.vue";
|
|
12
|
+
import PrimeListbox from "./PrimeListbox.vue";
|
|
13
|
+
import PrimeMultiSelect from "./PrimeMultiSelect.vue";
|
|
14
|
+
import PrimePassword from "./PrimePassword.vue";
|
|
15
|
+
import PrimeRadioButton from "./PrimeRadioButton.vue";
|
|
16
|
+
import PrimeRating from "./PrimeRating.vue";
|
|
17
|
+
import PrimeSelect from "./PrimeSelect.vue";
|
|
18
|
+
import PrimeSelectButton from "./PrimeSelectButton.vue";
|
|
19
|
+
import PrimeSlider from "./PrimeSlider.vue";
|
|
20
|
+
import PrimeTextarea from "./PrimeTextarea.vue";
|
|
21
|
+
import PrimeToggleButton from "./PrimeToggleButton.vue";
|
|
22
|
+
import PrimeInputSwitch from "./PrimeToggleSwitch.vue";
|
|
23
|
+
import PrimeTreeSelect from "./PrimeTreeSelect.vue";
|
|
24
24
|
export { FormKitDataEdit, FormKitDataView, PrimeAutoComplete, PrimeCascadeSelect, PrimeCheckbox, PrimeColorPicker, PrimeDatePicker, PrimeInputMask, PrimeInputNumber, PrimeInputSwitch, PrimeInputText, PrimeKnob, PrimeListbox, PrimeMultiSelect, PrimePassword, PrimeRadioButton, PrimeRating, PrimeSelect, PrimeSelectButton, PrimeSlider, PrimeTextarea, PrimeToggleButton, PrimeTreeSelect, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useFormKitInput } from
|
|
2
|
-
import { useFormKitRepeater } from
|
|
3
|
-
import { useFormKitSchema } from
|
|
4
|
-
import { useFormKitSection } from
|
|
5
|
-
import { useInputEditor } from
|
|
6
|
-
import { useInputEditorSchema } from
|
|
7
|
-
import { useOutputDuration } from
|
|
8
|
-
import { usePrimeInputs } from
|
|
1
|
+
import { useFormKitInput } from "./useFormKitInput.ts";
|
|
2
|
+
import { useFormKitRepeater } from "./useFormKitRepeater.ts";
|
|
3
|
+
import { useFormKitSchema } from "./useFormKitSchema.ts";
|
|
4
|
+
import { useFormKitSection } from "./useFormKitSection.ts";
|
|
5
|
+
import { useInputEditor } from "./useInputEditor.ts";
|
|
6
|
+
import { useInputEditorSchema } from "./useInputEditorSchema.ts";
|
|
7
|
+
import { useOutputDuration } from "./useOutputDuration.ts";
|
|
8
|
+
import { usePrimeInputs } from "./usePrimeInputs.ts";
|
|
9
9
|
export { useFormKitInput, useFormKitRepeater, useFormKitSchema, useFormKitSection, useInputEditor, useInputEditorSchema, useOutputDuration, usePrimeInputs, };
|