@sfxcode/formkit-primevue 3.3.1 → 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/dist/components/FormKitDataDebug.vue +19 -0
- package/dist/components/FormKitDataEdit.vue +133 -0
- package/dist/components/FormKitDataView.vue +51 -0
- package/dist/components/FormKitIcon.vue +18 -0
- package/dist/components/FormKitPrefix.vue +11 -0
- package/dist/components/FormKitSuffix.vue +11 -0
- package/dist/components/PrimeAutoComplete.vue +95 -0
- package/dist/components/PrimeCascadeSelect.vue +43 -0
- package/dist/components/PrimeCheckbox.vue +51 -0
- package/dist/components/PrimeColorPicker.vue +33 -0
- package/dist/components/PrimeDatePicker.vue +97 -0
- package/dist/components/PrimeInputMask.vue +69 -0
- package/dist/components/PrimeInputNumber.vue +75 -0
- package/dist/components/PrimeInputOtp.vue +42 -0
- package/dist/components/PrimeInputText.vue +65 -0
- package/dist/components/PrimeKnob.vue +50 -0
- package/dist/components/PrimeListbox.vue +54 -0
- package/dist/components/PrimeMultiSelect.vue +70 -0
- package/dist/components/PrimeOutputBoolean.vue +42 -0
- package/dist/components/PrimeOutputDate.vue +51 -0
- package/dist/components/PrimeOutputDuration.vue +36 -0
- package/dist/components/PrimeOutputLink.vue +52 -0
- package/dist/components/PrimeOutputList.vue +106 -0
- package/dist/components/PrimeOutputNumber.vue +56 -0
- package/dist/components/PrimeOutputReference.vue +64 -0
- package/dist/components/PrimeOutputText.vue +72 -0
- package/dist/components/PrimePassword.vue +52 -0
- package/dist/components/PrimeRadioButton.vue +48 -0
- package/dist/components/PrimeRating.vue +40 -0
- package/dist/components/PrimeSelect.vue +71 -0
- package/dist/components/PrimeSelectButton.vue +44 -0
- package/dist/components/PrimeSlider.vue +42 -0
- package/dist/components/PrimeTextarea.vue +37 -0
- package/dist/components/PrimeToggleButton.vue +42 -0
- package/dist/components/PrimeToggleSwitch.vue +42 -0
- package/dist/components/PrimeTreeSelect.vue +48 -0
- package/dist/components/index.d.ts +24 -2
- package/dist/components/index.js +167 -4
- package/dist/components/index.mjs +48 -0
- package/dist/composables/index.d.ts +9 -2
- package/dist/composables/index.js +61 -2
- package/dist/composables/index.mjs +18 -0
- package/dist/composables/useFormKitInput.d.ts +11 -0
- package/dist/composables/useFormKitInput.js +62 -0
- package/dist/composables/useFormKitInput.mjs +57 -0
- package/dist/composables/useFormKitRepeater.d.ts +15 -0
- package/dist/composables/useFormKitRepeater.js +74 -0
- package/dist/composables/useFormKitRepeater.mjs +82 -0
- package/dist/composables/useFormKitSchema.d.ts +36 -0
- package/dist/composables/useFormKitSchema.js +83 -0
- package/dist/composables/useFormKitSchema.mjs +66 -0
- package/dist/composables/useFormKitSection.d.ts +7 -0
- package/dist/composables/useFormKitSection.js +31 -0
- package/dist/composables/useFormKitSection.mjs +19 -0
- package/dist/composables/useInputEditor.d.ts +8 -0
- package/dist/composables/useInputEditor.js +148 -0
- package/dist/composables/useInputEditor.mjs +171 -0
- package/dist/composables/useInputEditorSchema.d.ts +163 -0
- package/dist/composables/useInputEditorSchema.js +313 -0
- package/dist/composables/useInputEditorSchema.mjs +323 -0
- package/dist/composables/useOutputDuration.d.ts +4 -0
- package/dist/composables/useOutputDuration.js +40 -0
- package/dist/composables/useOutputDuration.mjs +32 -0
- package/dist/composables/usePrimeInputs.d.ts +3 -0
- package/dist/composables/usePrimeInputs.js +62 -0
- package/dist/composables/usePrimeInputs.mjs +53 -0
- package/dist/definitions/index.d.ts +32 -37
- package/dist/definitions/index.js +42 -4
- package/dist/definitions/index.mjs +68 -0
- package/dist/definitions/input.d.ts +47 -0
- package/dist/definitions/input.js +142 -0
- package/dist/definitions/input.mjs +421 -0
- package/dist/definitions/output.d.ts +9 -0
- package/dist/definitions/output.js +46 -0
- package/dist/definitions/output.mjs +120 -0
- package/dist/index.d.ts +142 -145
- package/dist/index.js +62 -5
- package/dist/index.mjs +20 -0
- package/dist/plugins/index.d.ts +3 -7
- package/dist/plugins/index.js +57 -45
- package/dist/plugins/index.mjs +59 -0
- package/dist/vue.d.ts +5 -0
- package/package.json +88 -40
- package/dist/PrimeTreeSelect-Dksx7tL-.js +0 -1881
- package/dist/components-HJnJ39cU.js +0 -255
- package/dist/composables-CZ6f1QYe.js +0 -820
- package/dist/definitions-BHwWaom7.js +0 -1196
- package/dist/index-Ch3MtT1C.d.ts +0 -266
- package/dist/index-EJ8M51RO.d.ts +0 -917
|
@@ -0,0 +1,56 @@
|
|
|
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";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
context: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
15
|
+
const { n } = useI18n();
|
|
16
|
+
const converted = computed(() => {
|
|
17
|
+
const value = props?.context?._value;
|
|
18
|
+
if (value) {
|
|
19
|
+
let result = "";
|
|
20
|
+
const format = props?.context?.attrs?.format ? props?.context?.attrs?.format : "short";
|
|
21
|
+
try {
|
|
22
|
+
result = n(value, format);
|
|
23
|
+
} catch (e) {
|
|
24
|
+
try {
|
|
25
|
+
result = n(+value, format);
|
|
26
|
+
} catch (e2) {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
} else {
|
|
31
|
+
return "";
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div class="p-formkit p-output-number">
|
|
38
|
+
<FormKitIcon
|
|
39
|
+
v-if="hasPrefixIcon"
|
|
40
|
+
:icon-class="context?.iconPrefix as string"
|
|
41
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
42
|
+
position="prefix"
|
|
43
|
+
/>
|
|
44
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
45
|
+
<span :id="context?.id" :style="context?.attrs?.style" :class="context?.attrs?.class">
|
|
46
|
+
{{ converted }}
|
|
47
|
+
</span>
|
|
48
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
49
|
+
<FormKitIcon
|
|
50
|
+
v-if="hasSuffixIcon"
|
|
51
|
+
:icon-class="context?.iconSuffix as string"
|
|
52
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
53
|
+
position="suffix"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitSection } from "../composables/index.ts";
|
|
4
|
+
import FormKitIcon from "./FormKitIcon.vue";
|
|
5
|
+
import FormKitPrefix from "./FormKitPrefix.vue";
|
|
6
|
+
import FormKitSuffix from "./FormKitSuffix.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
context: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
14
|
+
const reference = computed(() => {
|
|
15
|
+
const value = props.context?._value ?? "";
|
|
16
|
+
let result = props.context?.reference ? `${props.context?.reference}` : "reference-must-be-set";
|
|
17
|
+
if (!props.context?.internal && !result.includes("http")) result = `https://${result}`;
|
|
18
|
+
return result.replace(/\{\{.*\}\}/, value);
|
|
19
|
+
});
|
|
20
|
+
const title = computed(() => {
|
|
21
|
+
const value = props.context?._value ?? "";
|
|
22
|
+
const result = props.context?.title ?? value;
|
|
23
|
+
return `${result}`.replace(/\{\{.*\}\}/, value);
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div class="p-formkit p-output-reference">
|
|
29
|
+
<FormKitIcon
|
|
30
|
+
v-if="hasPrefixIcon"
|
|
31
|
+
:icon-class="context?.iconPrefix as string"
|
|
32
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
33
|
+
position="prefix"
|
|
34
|
+
/>
|
|
35
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
36
|
+
<component
|
|
37
|
+
:is="context?.linkComponentName ? context?.linkComponentName : 'RouterLink'"
|
|
38
|
+
v-if="context?.internal"
|
|
39
|
+
:style="context?.attrs?.style"
|
|
40
|
+
:class="context?.attrs?.class"
|
|
41
|
+
:to="reference"
|
|
42
|
+
v-bind="context?.attrs"
|
|
43
|
+
>
|
|
44
|
+
{{ title }}
|
|
45
|
+
</component>
|
|
46
|
+
<a
|
|
47
|
+
v-else
|
|
48
|
+
:id="context?.id"
|
|
49
|
+
:style="context?.attrs?.style"
|
|
50
|
+
:class="context?.attrs?.class"
|
|
51
|
+
:href="reference"
|
|
52
|
+
:target="context?.attrs?.target ?? '_new'"
|
|
53
|
+
>
|
|
54
|
+
{{ title }}
|
|
55
|
+
</a>
|
|
56
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
57
|
+
<FormKitIcon
|
|
58
|
+
v-if="hasSuffixIcon"
|
|
59
|
+
:icon-class="context?.iconSuffix as string"
|
|
60
|
+
:on-click="context?.onIconSuffixClicked as () => void"
|
|
61
|
+
position="suffix"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
@@ -0,0 +1,72 @@
|
|
|
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";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
context: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const textValue = computed(() => {
|
|
15
|
+
const value = props.context?._value;
|
|
16
|
+
const { t } = useI18n();
|
|
17
|
+
let result = "";
|
|
18
|
+
if (value) {
|
|
19
|
+
if (props.context?.isTranslationKey) {
|
|
20
|
+
result = t(value);
|
|
21
|
+
} else if (typeof props.context?.convertValue === "function") {
|
|
22
|
+
result = props.context?.convertValue(value);
|
|
23
|
+
} else {
|
|
24
|
+
result = value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const maxLength = props.context?.maxLength;
|
|
28
|
+
if (result && maxLength && !props.context?.html && result.length > maxLength) {
|
|
29
|
+
let truncated = result.substring(0, maxLength);
|
|
30
|
+
const lastSpaceIndex = truncated.lastIndexOf(" ");
|
|
31
|
+
if (lastSpaceIndex > maxLength * 0.8) {
|
|
32
|
+
truncated = truncated.substring(0, lastSpaceIndex);
|
|
33
|
+
}
|
|
34
|
+
result = `${truncated}...`;
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
});
|
|
38
|
+
const { hasPrefix, hasPrefixIcon, hasSuffix, hasSuffixIcon } = useFormKitSection(props.context);
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div class="p-formkit p-output-text">
|
|
43
|
+
<FormKitIcon
|
|
44
|
+
v-if="hasPrefixIcon"
|
|
45
|
+
:icon-class="context?.iconPrefix as string"
|
|
46
|
+
:on-click="context?.onIconPrefixClicked as () => void"
|
|
47
|
+
position="prefix"
|
|
48
|
+
/>
|
|
49
|
+
<FormKitPrefix v-if="hasPrefix" :prefix="context?.prefix as string" />
|
|
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
|
+
/>
|
|
64
|
+
<FormKitSuffix v-if="hasSuffix" :suffix="context?.suffix as string" />
|
|
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
|
+
</div>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<Password
|
|
15
|
+
v-model="modelValue"
|
|
16
|
+
v-bind="context?.attrs"
|
|
17
|
+
:input-id="context.id"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:input-style="context?.attrs.style"
|
|
21
|
+
:input-class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:size="context?.size ?? undefined"
|
|
27
|
+
:placeholder="context.placeholder"
|
|
28
|
+
:medium-regex="
|
|
29
|
+
context.mediumRegex ??
|
|
30
|
+
'^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'
|
|
31
|
+
"
|
|
32
|
+
:strong-regex="context.strongRegex ?? '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})'"
|
|
33
|
+
:prompt-label="context.promptLabel"
|
|
34
|
+
:weak-label="context.weakLabel"
|
|
35
|
+
:medium-label="context.mediumLabel"
|
|
36
|
+
:strong-label="context.strongLabel"
|
|
37
|
+
:mask-icon="context.maskIcon"
|
|
38
|
+
:unmask-icon="context.unmaskIcon"
|
|
39
|
+
:feedback="context.feedback ?? false"
|
|
40
|
+
:toggle-mask="context.toggleMask ?? false"
|
|
41
|
+
:pt="context.pt"
|
|
42
|
+
:pt-options="context.ptOptions"
|
|
43
|
+
:unstyled="unstyled"
|
|
44
|
+
@input="handleInput"
|
|
45
|
+
@blur="handleBlur"
|
|
46
|
+
>
|
|
47
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
48
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
49
|
+
</template>
|
|
50
|
+
</Password>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
context: {
|
|
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 ?? "");
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="p-formkit p-formkit-options" :class="optionsClass">
|
|
20
|
+
<div
|
|
21
|
+
v-for="option in context.options"
|
|
22
|
+
:key="option.value"
|
|
23
|
+
class="p-formkit-option"
|
|
24
|
+
:class="optionClass"
|
|
25
|
+
>
|
|
26
|
+
<RadioButton
|
|
27
|
+
:id="context.id"
|
|
28
|
+
v-model="modelValue"
|
|
29
|
+
v-bind="context?.attrs"
|
|
30
|
+
:disabled="!!context?.disabled"
|
|
31
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
32
|
+
:name="context?.attrs.name"
|
|
33
|
+
:value="option.value"
|
|
34
|
+
:input-style="context?.attrs.style"
|
|
35
|
+
:input-class="context?.attrs?.class"
|
|
36
|
+
:invalid="isInvalid"
|
|
37
|
+
:size="context?.size ?? undefined"
|
|
38
|
+
:pt="context.pt"
|
|
39
|
+
:pt-options="context.ptOptions"
|
|
40
|
+
:unstyled="unstyled"
|
|
41
|
+
@click="handleChange"
|
|
42
|
+
@change="handleChange"
|
|
43
|
+
@blur="handleBlur"
|
|
44
|
+
/>
|
|
45
|
+
<label :for="option.value" :class="labelClass">{{ option.label }}</label>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<Rating
|
|
15
|
+
:id="context.id"
|
|
16
|
+
v-model="modelValue"
|
|
17
|
+
v-bind="context?.attrs"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:style="context?.attrs.style"
|
|
21
|
+
:class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:stars="context.stars ?? 5"
|
|
27
|
+
:on-icon="context.onIcon"
|
|
28
|
+
:off-icon="context.offIcon"
|
|
29
|
+
:pt="context.pt"
|
|
30
|
+
:pt-options="context.ptOptions"
|
|
31
|
+
:unstyled="unstyled"
|
|
32
|
+
@change="handleInput"
|
|
33
|
+
@blur="handleBlur"
|
|
34
|
+
>
|
|
35
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
36
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
37
|
+
</template>
|
|
38
|
+
</Rating>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<Select
|
|
15
|
+
v-model="modelValue"
|
|
16
|
+
v-bind="context?.attrs"
|
|
17
|
+
:input-id="context.id"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:style="context?.attrs.style"
|
|
21
|
+
:class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:input-style="context?.attrs.style"
|
|
24
|
+
:input-class="context?.attrs?.class"
|
|
25
|
+
:input-props="context?.attrs.inputProps"
|
|
26
|
+
:tabindex="context?.attrs.tabindex"
|
|
27
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
28
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
29
|
+
:size="context?.size ?? undefined"
|
|
30
|
+
:options="context.options"
|
|
31
|
+
:option-label="context.optionLabel"
|
|
32
|
+
:option-value="context.optionValue"
|
|
33
|
+
:option-disabled="context.optionDisabled"
|
|
34
|
+
:option-group-label="context.optionGroupLabel"
|
|
35
|
+
:option-group-children="context.optionGroupChildren"
|
|
36
|
+
:scroll-height="context.scrollHeight"
|
|
37
|
+
:filter="context.filter ?? false"
|
|
38
|
+
:filter-placeholder="context.filterPlaceholder"
|
|
39
|
+
:filter-locale="context.filterLocale"
|
|
40
|
+
:filter-match-mode="context.filterMatchMode"
|
|
41
|
+
:fitler-fields="context.filterFields"
|
|
42
|
+
:filter-input-props="context.filterInputProps"
|
|
43
|
+
:editable="context.editable"
|
|
44
|
+
:placeholder="context.placeholder"
|
|
45
|
+
:data-key="context.dataKey"
|
|
46
|
+
:show-clear="context.showClear ?? false"
|
|
47
|
+
:overlay-style="context.overlayStyle"
|
|
48
|
+
:overlay-class="context.overlayClass"
|
|
49
|
+
:panel-props="context.panelProps"
|
|
50
|
+
:append-to="context.appendTo"
|
|
51
|
+
:reset-filter-on-hide="context.resetFilterOnHide"
|
|
52
|
+
:virtual-scroller-options="context.virtualScrollerOptions"
|
|
53
|
+
:auto-option-focus="context.autoOptionFocus"
|
|
54
|
+
:select-on-focus="context.selectOnFocus"
|
|
55
|
+
:filter-message="context.filterMessage"
|
|
56
|
+
:selection-message="context.selectionMessage"
|
|
57
|
+
:empty-selection-message="context.emptySelectionMessage"
|
|
58
|
+
:empty-filter-message="context.emptyFilterMessage"
|
|
59
|
+
:empty-message="context.emptyMessage"
|
|
60
|
+
:pt="context.pt"
|
|
61
|
+
:pt-options="context.ptOptions"
|
|
62
|
+
:unstyled="unstyled"
|
|
63
|
+
@change="handleInput"
|
|
64
|
+
@blur="handleBlur"
|
|
65
|
+
>
|
|
66
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
67
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
68
|
+
</template>
|
|
69
|
+
</Select>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<SelectButton
|
|
15
|
+
:id="context.id"
|
|
16
|
+
v-model="modelValue"
|
|
17
|
+
v-bind="context?.attrs"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:style="context?.attrs.style"
|
|
21
|
+
:class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:size="context?.size ?? undefined"
|
|
27
|
+
:options="context.options"
|
|
28
|
+
:option-label="context.optionLabel"
|
|
29
|
+
:option-value="context.optionValue"
|
|
30
|
+
:option-disabled="context.optionDisabled"
|
|
31
|
+
:multiple="context.multiple ?? false"
|
|
32
|
+
:data-key="context.dataKey"
|
|
33
|
+
:pt="context.pt"
|
|
34
|
+
:pt-options="context.ptOptions"
|
|
35
|
+
:unstyled="unstyled"
|
|
36
|
+
@change="handleChange"
|
|
37
|
+
@blur="handleBlur"
|
|
38
|
+
>
|
|
39
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
40
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
41
|
+
</template>
|
|
42
|
+
</SelectButton>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
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);
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="p-formkit">
|
|
18
|
+
<Slider
|
|
19
|
+
:id="context.id"
|
|
20
|
+
v-model="modelValue"
|
|
21
|
+
v-bind="context?.attrs"
|
|
22
|
+
:disabled="!!context?.disabled"
|
|
23
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
24
|
+
:style="context?.attrs.style"
|
|
25
|
+
:class="context?.attrs?.class"
|
|
26
|
+
:invalid="isInvalid"
|
|
27
|
+
:tabindex="context?.attrs.tabindex"
|
|
28
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
29
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
30
|
+
:min="context.min ?? 0"
|
|
31
|
+
:max="context.max ?? 100"
|
|
32
|
+
:step="context.step ?? undefined"
|
|
33
|
+
:range="context.range ?? false"
|
|
34
|
+
:orientation="context.orientation ?? 'horizontal'"
|
|
35
|
+
:pt="context.pt"
|
|
36
|
+
:pt-options="context.ptOptions"
|
|
37
|
+
:unstyled="unstyled"
|
|
38
|
+
@change="handleInput"
|
|
39
|
+
@blur="handleBlur"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<Textarea
|
|
15
|
+
:id="context.id"
|
|
16
|
+
v-model="modelValue"
|
|
17
|
+
v-bind="context?.attrs"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:style="context?.attrs.style"
|
|
21
|
+
:class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:size="context?.size ?? undefined"
|
|
27
|
+
:placeholder="context.placeholder"
|
|
28
|
+
:rows="context.rows ?? 3"
|
|
29
|
+
:auto-resize="context.autoResize ?? false"
|
|
30
|
+
:pt="context.pt"
|
|
31
|
+
:pt-options="context.ptOptions"
|
|
32
|
+
:unstyled="unstyled"
|
|
33
|
+
@input="handleInput"
|
|
34
|
+
@blur="handleBlur"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<ToggleButton
|
|
15
|
+
v-model="modelValue"
|
|
16
|
+
v-bind="context?.attrs"
|
|
17
|
+
:input-id="context.id"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:input-style="context?.attrs.style"
|
|
21
|
+
:input-class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:size="context?.size ?? undefined"
|
|
27
|
+
:on-label="context.onLabel ?? 'Yes'"
|
|
28
|
+
:off-label="context.offLabel ?? 'No'"
|
|
29
|
+
:on-icon="context.onIcon"
|
|
30
|
+
:off-icon="context.offIcon"
|
|
31
|
+
:pt="context.pt"
|
|
32
|
+
:pt-options="context.ptOptions"
|
|
33
|
+
:unstyled="unstyled"
|
|
34
|
+
@change="handleChange"
|
|
35
|
+
@blur="handleBlur"
|
|
36
|
+
>
|
|
37
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
38
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
39
|
+
</template>
|
|
40
|
+
</ToggleButton>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput, useFormKitSection } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
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);
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="p-formkit">
|
|
15
|
+
<span v-if="hasPrefix" class="formkit-prefix">
|
|
16
|
+
{{ context?.prefix }}
|
|
17
|
+
</span>
|
|
18
|
+
<ToggleSwitch
|
|
19
|
+
v-model="modelValue"
|
|
20
|
+
v-bind="context?.attrs"
|
|
21
|
+
:input-id="context.id"
|
|
22
|
+
:disabled="!!context?.disabled"
|
|
23
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
24
|
+
:input-style="context?.attrs.style"
|
|
25
|
+
:input-class="context?.attrs?.class"
|
|
26
|
+
:invalid="isInvalid"
|
|
27
|
+
:tabindex="context?.attrs.tabindex"
|
|
28
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
29
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
30
|
+
:true-value="context.trueValue ?? undefined"
|
|
31
|
+
:false-value="context.falseValue ?? undefined"
|
|
32
|
+
:pt="context.pt"
|
|
33
|
+
:pt-options="context.ptOptions"
|
|
34
|
+
:unstyled="unstyled"
|
|
35
|
+
@change="handleInput"
|
|
36
|
+
@blur="handleBlur"
|
|
37
|
+
/>
|
|
38
|
+
<span v-if="hasSuffix" class="formkit-suffix">
|
|
39
|
+
{{ context?.suffix }}
|
|
40
|
+
</span>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFormKitInput } from "../composables/index.ts";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
context: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur, modelValue } = useFormKitInput(props.context);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="p-formkit">
|
|
14
|
+
<TreeSelect
|
|
15
|
+
v-model="modelValue"
|
|
16
|
+
v-bind="context?.attrs"
|
|
17
|
+
:input-id="context.id"
|
|
18
|
+
:disabled="!!context?.disabled"
|
|
19
|
+
:readonly="context?.attrs.readonly ?? false"
|
|
20
|
+
:input-style="context?.attrs.style"
|
|
21
|
+
:input-class="context?.attrs?.class"
|
|
22
|
+
:invalid="isInvalid"
|
|
23
|
+
:tabindex="context?.attrs.tabindex"
|
|
24
|
+
:aria-label="context?.attrs.ariaLabel"
|
|
25
|
+
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
26
|
+
:size="context?.size ?? undefined"
|
|
27
|
+
:options="context?.options"
|
|
28
|
+
:placeholder="context.placeholder"
|
|
29
|
+
:selection-mode="context.selectionMode"
|
|
30
|
+
:pt="context.pt"
|
|
31
|
+
:empty-message="context.emptyMessage"
|
|
32
|
+
:display="context.display"
|
|
33
|
+
:meta-key-selection="context.metaKeySelection"
|
|
34
|
+
:append-to="context.appendTo"
|
|
35
|
+
:scroll-height="context.scrollHeight"
|
|
36
|
+
:panel-class="context.panelClass"
|
|
37
|
+
:variant="context.variant"
|
|
38
|
+
:pt-options="context.ptOptions"
|
|
39
|
+
:unstyled="unstyled"
|
|
40
|
+
@change="handleInput"
|
|
41
|
+
@blur="handleBlur"
|
|
42
|
+
>
|
|
43
|
+
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
44
|
+
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
45
|
+
</template>
|
|
46
|
+
</TreeSelect>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|