@sfxcode/formkit-primevue 3.2.10 → 3.3.1
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/PrimeTreeSelect-Dksx7tL-.js +1881 -0
- package/dist/components/index.d.ts +2 -24
- package/dist/components/index.js +4 -167
- package/dist/components-HJnJ39cU.js +255 -0
- package/dist/composables/index.d.ts +2 -9
- package/dist/composables/index.js +2 -61
- package/dist/composables-CZ6f1QYe.js +820 -0
- package/dist/definitions/index.d.ts +37 -32
- package/dist/definitions/index.js +4 -42
- package/dist/definitions-BHwWaom7.js +1196 -0
- package/dist/index-Ch3MtT1C.d.ts +266 -0
- package/dist/index-EJ8M51RO.d.ts +917 -0
- package/dist/index.d.ts +146 -143
- package/dist/index.js +5 -62
- package/dist/plugins/index.d.ts +7 -3
- package/dist/plugins/index.js +45 -57
- package/dist/sass/formkit-primevue.scss +99 -101
- package/package.json +32 -117
- package/LICENSE +0 -21
- package/components.d.ts +0 -1
- package/dist/components/FormKitDataDebug.d.vue.ts +0 -24
- package/dist/components/FormKitDataDebug.vue +0 -23
- package/dist/components/FormKitDataDebug.vue.d.ts +0 -24
- package/dist/components/FormKitDataEdit.d.vue.ts +0 -180
- package/dist/components/FormKitDataEdit.vue +0 -126
- package/dist/components/FormKitDataEdit.vue.d.ts +0 -180
- package/dist/components/FormKitDataView.d.vue.ts +0 -73
- package/dist/components/FormKitDataView.vue +0 -58
- package/dist/components/FormKitDataView.vue.d.ts +0 -73
- package/dist/components/FormKitIcon.d.vue.ts +0 -39
- package/dist/components/FormKitIcon.vue +0 -25
- package/dist/components/FormKitIcon.vue.d.ts +0 -39
- package/dist/components/FormKitPrefix.d.vue.ts +0 -7
- package/dist/components/FormKitPrefix.vue +0 -11
- package/dist/components/FormKitPrefix.vue.d.ts +0 -7
- package/dist/components/FormKitSuffix.d.vue.ts +0 -7
- package/dist/components/FormKitSuffix.vue +0 -11
- package/dist/components/FormKitSuffix.vue.d.ts +0 -7
- package/dist/components/PrimeAutoComplete.d.vue.ts +0 -31
- package/dist/components/PrimeAutoComplete.vue +0 -162
- package/dist/components/PrimeAutoComplete.vue.d.ts +0 -31
- package/dist/components/PrimeCascadeSelect.d.vue.ts +0 -28
- package/dist/components/PrimeCascadeSelect.vue +0 -62
- package/dist/components/PrimeCascadeSelect.vue.d.ts +0 -28
- package/dist/components/PrimeCheckbox.d.vue.ts +0 -27
- package/dist/components/PrimeCheckbox.vue +0 -71
- package/dist/components/PrimeCheckbox.vue.d.ts +0 -27
- package/dist/components/PrimeColorPicker.d.vue.ts +0 -24
- package/dist/components/PrimeColorPicker.vue +0 -48
- package/dist/components/PrimeColorPicker.vue.d.ts +0 -24
- package/dist/components/PrimeDatePicker.d.vue.ts +0 -63
- package/dist/components/PrimeDatePicker.vue +0 -153
- package/dist/components/PrimeDatePicker.vue.d.ts +0 -63
- package/dist/components/PrimeInputMask.d.vue.ts +0 -28
- package/dist/components/PrimeInputMask.vue +0 -88
- package/dist/components/PrimeInputMask.vue.d.ts +0 -28
- package/dist/components/PrimeInputNumber.d.vue.ts +0 -36
- package/dist/components/PrimeInputNumber.vue +0 -110
- package/dist/components/PrimeInputNumber.vue.d.ts +0 -36
- package/dist/components/PrimeInputOtp.d.vue.ts +0 -26
- package/dist/components/PrimeInputOtp.vue +0 -59
- package/dist/components/PrimeInputOtp.vue.d.ts +0 -26
- package/dist/components/PrimeInputText.d.vue.ts +0 -24
- package/dist/components/PrimeInputText.vue +0 -80
- package/dist/components/PrimeInputText.vue.d.ts +0 -24
- package/dist/components/PrimeKnob.d.vue.ts +0 -31
- package/dist/components/PrimeKnob.vue +0 -75
- package/dist/components/PrimeKnob.vue.d.ts +0 -31
- package/dist/components/PrimeListbox.d.vue.ts +0 -42
- package/dist/components/PrimeListbox.vue +0 -86
- package/dist/components/PrimeListbox.vue.d.ts +0 -42
- package/dist/components/PrimeMultiSelect.d.vue.ts +0 -53
- package/dist/components/PrimeMultiSelect.vue +0 -115
- package/dist/components/PrimeMultiSelect.vue.d.ts +0 -53
- package/dist/components/PrimeOutputBoolean.d.vue.ts +0 -16
- package/dist/components/PrimeOutputBoolean.vue +0 -41
- package/dist/components/PrimeOutputBoolean.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDate.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDate.vue +0 -51
- package/dist/components/PrimeOutputDate.vue.d.ts +0 -16
- package/dist/components/PrimeOutputDuration.d.vue.ts +0 -16
- package/dist/components/PrimeOutputDuration.vue +0 -32
- package/dist/components/PrimeOutputDuration.vue.d.ts +0 -16
- package/dist/components/PrimeOutputLink.d.vue.ts +0 -16
- package/dist/components/PrimeOutputLink.vue +0 -50
- package/dist/components/PrimeOutputLink.vue.d.ts +0 -16
- package/dist/components/PrimeOutputList.d.vue.ts +0 -19
- package/dist/components/PrimeOutputList.vue +0 -71
- package/dist/components/PrimeOutputList.vue.d.ts +0 -19
- package/dist/components/PrimeOutputNumber.d.vue.ts +0 -16
- package/dist/components/PrimeOutputNumber.vue +0 -59
- package/dist/components/PrimeOutputNumber.vue.d.ts +0 -16
- package/dist/components/PrimeOutputReference.d.vue.ts +0 -16
- package/dist/components/PrimeOutputReference.vue +0 -62
- package/dist/components/PrimeOutputReference.vue.d.ts +0 -16
- package/dist/components/PrimeOutputText.d.vue.ts +0 -22
- package/dist/components/PrimeOutputText.vue +0 -72
- package/dist/components/PrimeOutputText.vue.d.ts +0 -22
- package/dist/components/PrimePassword.d.vue.ts +0 -33
- package/dist/components/PrimePassword.vue +0 -73
- package/dist/components/PrimePassword.vue.d.ts +0 -33
- package/dist/components/PrimeRadioButton.d.vue.ts +0 -28
- package/dist/components/PrimeRadioButton.vue +0 -53
- package/dist/components/PrimeRadioButton.vue.d.ts +0 -28
- package/dist/components/PrimeRating.d.vue.ts +0 -24
- package/dist/components/PrimeRating.vue +0 -55
- package/dist/components/PrimeRating.vue.d.ts +0 -24
- package/dist/components/PrimeSelect.d.vue.ts +0 -50
- package/dist/components/PrimeSelect.vue +0 -113
- package/dist/components/PrimeSelect.vue.d.ts +0 -50
- package/dist/components/PrimeSelectButton.d.vue.ts +0 -28
- package/dist/components/PrimeSelectButton.vue +0 -64
- package/dist/components/PrimeSelectButton.vue.d.ts +0 -28
- package/dist/components/PrimeSlider.d.vue.ts +0 -26
- package/dist/components/PrimeSlider.vue +0 -60
- package/dist/components/PrimeSlider.vue.d.ts +0 -26
- package/dist/components/PrimeTextarea.d.vue.ts +0 -25
- package/dist/components/PrimeTextarea.vue +0 -53
- package/dist/components/PrimeTextarea.vue.d.ts +0 -25
- package/dist/components/PrimeToggleButton.d.vue.ts +0 -26
- package/dist/components/PrimeToggleButton.vue +0 -60
- package/dist/components/PrimeToggleButton.vue.d.ts +0 -26
- package/dist/components/PrimeToggleSwitch.d.vue.ts +0 -23
- package/dist/components/PrimeToggleSwitch.vue +0 -57
- package/dist/components/PrimeToggleSwitch.vue.d.ts +0 -23
- package/dist/components/PrimeTreeSelect.d.vue.ts +0 -32
- package/dist/components/PrimeTreeSelect.vue +0 -71
- package/dist/components/PrimeTreeSelect.vue.d.ts +0 -32
- package/dist/components/index.mjs +0 -48
- package/dist/composables/index.mjs +0 -18
- package/dist/composables/useFormKitInput.d.ts +0 -10
- package/dist/composables/useFormKitInput.js +0 -51
- package/dist/composables/useFormKitInput.mjs +0 -39
- package/dist/composables/useFormKitRepeater.d.ts +0 -15
- package/dist/composables/useFormKitRepeater.js +0 -74
- package/dist/composables/useFormKitRepeater.mjs +0 -54
- package/dist/composables/useFormKitSchema.d.ts +0 -36
- package/dist/composables/useFormKitSchema.js +0 -83
- package/dist/composables/useFormKitSchema.mjs +0 -58
- package/dist/composables/useFormKitSection.d.ts +0 -7
- package/dist/composables/useFormKitSection.js +0 -31
- package/dist/composables/useFormKitSection.mjs +0 -19
- package/dist/composables/useInputEditor.d.ts +0 -8
- package/dist/composables/useInputEditor.js +0 -148
- package/dist/composables/useInputEditor.mjs +0 -143
- package/dist/composables/useInputEditorSchema.d.ts +0 -163
- package/dist/composables/useInputEditorSchema.js +0 -313
- package/dist/composables/useInputEditorSchema.mjs +0 -315
- package/dist/composables/useOutputDuration.d.ts +0 -4
- package/dist/composables/useOutputDuration.js +0 -40
- package/dist/composables/useOutputDuration.mjs +0 -35
- package/dist/composables/usePrimeInputs.d.ts +0 -3
- package/dist/composables/usePrimeInputs.js +0 -62
- package/dist/composables/usePrimeInputs.mjs +0 -53
- package/dist/definitions/index.mjs +0 -68
- package/dist/definitions/input.d.ts +0 -47
- package/dist/definitions/input.js +0 -142
- package/dist/definitions/input.mjs +0 -135
- package/dist/definitions/output.d.ts +0 -9
- package/dist/definitions/output.js +0 -46
- package/dist/definitions/output.mjs +0 -39
- package/dist/index.mjs +0 -14
- package/dist/plugins/index.mjs +0 -55
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SelectProps } from 'primevue/select';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSelectProps {
|
|
5
|
-
options?: SelectProps['options'];
|
|
6
|
-
optionLabel?: SelectProps['optionLabel'];
|
|
7
|
-
optionValue?: SelectProps['optionValue'];
|
|
8
|
-
optionDisabled?: SelectProps['optionDisabled'];
|
|
9
|
-
optionGroupLabel?: SelectProps['optionGroupLabel'];
|
|
10
|
-
optionGroupChildren?: SelectProps['optionGroupChildren'];
|
|
11
|
-
scrollHeight?: SelectProps['scrollHeight'];
|
|
12
|
-
filter?: SelectProps['filter'];
|
|
13
|
-
filterPlaceholder?: SelectProps['filterPlaceholder'];
|
|
14
|
-
filterLocale?: SelectProps['filterLocale'];
|
|
15
|
-
filterMatchMode?: SelectProps['filterMatchMode'];
|
|
16
|
-
filterFields?: SelectProps['filterFields'];
|
|
17
|
-
editable?: SelectProps['editable'];
|
|
18
|
-
placeholder?: SelectProps['placeholder'];
|
|
19
|
-
dataKey?: SelectProps['dataKey'];
|
|
20
|
-
showClear?: SelectProps['showClear'];
|
|
21
|
-
overlayStyle?: SelectProps['overlayStyle'];
|
|
22
|
-
overlayClass?: SelectProps['overlayClass'];
|
|
23
|
-
appendTo?: SelectProps['appendTo'];
|
|
24
|
-
resetFilterOnHide?: SelectProps['resetFilterOnHide'];
|
|
25
|
-
virtualScrollerOptions?: SelectProps['virtualScrollerOptions'];
|
|
26
|
-
autoOptionFocus?: SelectProps['autoOptionFocus'];
|
|
27
|
-
selectOnFocus?: SelectProps['selectOnFocus'];
|
|
28
|
-
filterMessage?: SelectProps['filterMessage'];
|
|
29
|
-
selectionMessage?: SelectProps['selectionMessage'];
|
|
30
|
-
emptySelectionMessage?: SelectProps['emptySelectionMessage'];
|
|
31
|
-
emptyFilterMessage?: SelectProps['emptyFilterMessage'];
|
|
32
|
-
emptyMessage?: SelectProps['emptyMessage'];
|
|
33
|
-
pt?: SelectProps['pt'];
|
|
34
|
-
ptOptions?: SelectProps['ptOptions'];
|
|
35
|
-
unstyled?: SelectProps['unstyled'];
|
|
36
|
-
size?: SelectProps['size'];
|
|
37
|
-
}
|
|
38
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
39
|
-
context: {
|
|
40
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
|
|
41
|
-
required: true;
|
|
42
|
-
};
|
|
43
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
context: {
|
|
45
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
|
|
46
|
-
required: true;
|
|
47
|
-
};
|
|
48
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
-
declare const _default: typeof __VLS_export;
|
|
50
|
-
export default _default;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
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
|
-
|
|
44
|
-
const props = defineProps({
|
|
45
|
-
context: {
|
|
46
|
-
type: Object as PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>,
|
|
47
|
-
required: true,
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const { validSlotNames, unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<div class="p-formkit">
|
|
56
|
-
<Select
|
|
57
|
-
v-model="context._value"
|
|
58
|
-
v-bind="context?.attrs"
|
|
59
|
-
:input-id="context.id"
|
|
60
|
-
:disabled="!!context?.disabled"
|
|
61
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
62
|
-
:style="context?.attrs.style"
|
|
63
|
-
:class="context?.attrs?.class"
|
|
64
|
-
:invalid="isInvalid"
|
|
65
|
-
:input-style="context?.attrs.style"
|
|
66
|
-
:input-class="context?.attrs?.class"
|
|
67
|
-
:input-props="context?.attrs.inputProps"
|
|
68
|
-
:tabindex="context?.attrs.tabindex"
|
|
69
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
70
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
71
|
-
:size="context?.size ?? undefined"
|
|
72
|
-
:options="context.options"
|
|
73
|
-
:option-label="context.optionLabel"
|
|
74
|
-
:option-value="context.optionValue"
|
|
75
|
-
:option-disabled="context.optionDisabled"
|
|
76
|
-
:option-group-label="context.optionGroupLabel"
|
|
77
|
-
:option-group-children="context.optionGroupChildren"
|
|
78
|
-
:scroll-height="context.scrollHeight"
|
|
79
|
-
:filter="context.filter ?? false"
|
|
80
|
-
:filter-placeholder="context.filterPlaceholder"
|
|
81
|
-
:filter-locale="context.filterLocale"
|
|
82
|
-
:filter-match-mode="context.filterMatchMode"
|
|
83
|
-
:fitler-fields="context.filterFields"
|
|
84
|
-
:filter-input-props="context.filterInputProps"
|
|
85
|
-
:editable="context.editable"
|
|
86
|
-
:placeholder="context.placeholder"
|
|
87
|
-
:data-key="context.dataKey"
|
|
88
|
-
:show-clear="context.showClear ?? false"
|
|
89
|
-
:overlay-style="context.overlayStyle"
|
|
90
|
-
:overlay-class="context.overlayClass"
|
|
91
|
-
:panel-props="context.panelProps"
|
|
92
|
-
:append-to="context.appendTo"
|
|
93
|
-
:reset-filter-on-hide="context.resetFilterOnHide"
|
|
94
|
-
:virtual-scroller-options="context.virtualScrollerOptions"
|
|
95
|
-
:auto-option-focus="context.autoOptionFocus"
|
|
96
|
-
:select-on-focus="context.selectOnFocus"
|
|
97
|
-
:filter-message="context.filterMessage"
|
|
98
|
-
:selection-message="context.selectionMessage"
|
|
99
|
-
:empty-selection-message="context.emptySelectionMessage"
|
|
100
|
-
:empty-filter-message="context.emptyFilterMessage"
|
|
101
|
-
:empty-message="context.emptyMessage"
|
|
102
|
-
:pt="context.pt"
|
|
103
|
-
:pt-options="context.ptOptions"
|
|
104
|
-
:unstyled="unstyled"
|
|
105
|
-
@change="handleInput"
|
|
106
|
-
@blur="handleBlur"
|
|
107
|
-
>
|
|
108
|
-
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
109
|
-
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
110
|
-
</template>
|
|
111
|
-
</Select>
|
|
112
|
-
</div>
|
|
113
|
-
</template>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SelectProps } from 'primevue/select';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSelectProps {
|
|
5
|
-
options?: SelectProps['options'];
|
|
6
|
-
optionLabel?: SelectProps['optionLabel'];
|
|
7
|
-
optionValue?: SelectProps['optionValue'];
|
|
8
|
-
optionDisabled?: SelectProps['optionDisabled'];
|
|
9
|
-
optionGroupLabel?: SelectProps['optionGroupLabel'];
|
|
10
|
-
optionGroupChildren?: SelectProps['optionGroupChildren'];
|
|
11
|
-
scrollHeight?: SelectProps['scrollHeight'];
|
|
12
|
-
filter?: SelectProps['filter'];
|
|
13
|
-
filterPlaceholder?: SelectProps['filterPlaceholder'];
|
|
14
|
-
filterLocale?: SelectProps['filterLocale'];
|
|
15
|
-
filterMatchMode?: SelectProps['filterMatchMode'];
|
|
16
|
-
filterFields?: SelectProps['filterFields'];
|
|
17
|
-
editable?: SelectProps['editable'];
|
|
18
|
-
placeholder?: SelectProps['placeholder'];
|
|
19
|
-
dataKey?: SelectProps['dataKey'];
|
|
20
|
-
showClear?: SelectProps['showClear'];
|
|
21
|
-
overlayStyle?: SelectProps['overlayStyle'];
|
|
22
|
-
overlayClass?: SelectProps['overlayClass'];
|
|
23
|
-
appendTo?: SelectProps['appendTo'];
|
|
24
|
-
resetFilterOnHide?: SelectProps['resetFilterOnHide'];
|
|
25
|
-
virtualScrollerOptions?: SelectProps['virtualScrollerOptions'];
|
|
26
|
-
autoOptionFocus?: SelectProps['autoOptionFocus'];
|
|
27
|
-
selectOnFocus?: SelectProps['selectOnFocus'];
|
|
28
|
-
filterMessage?: SelectProps['filterMessage'];
|
|
29
|
-
selectionMessage?: SelectProps['selectionMessage'];
|
|
30
|
-
emptySelectionMessage?: SelectProps['emptySelectionMessage'];
|
|
31
|
-
emptyFilterMessage?: SelectProps['emptyFilterMessage'];
|
|
32
|
-
emptyMessage?: SelectProps['emptyMessage'];
|
|
33
|
-
pt?: SelectProps['pt'];
|
|
34
|
-
ptOptions?: SelectProps['ptOptions'];
|
|
35
|
-
unstyled?: SelectProps['unstyled'];
|
|
36
|
-
size?: SelectProps['size'];
|
|
37
|
-
}
|
|
38
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
39
|
-
context: {
|
|
40
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
|
|
41
|
-
required: true;
|
|
42
|
-
};
|
|
43
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
context: {
|
|
45
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectProps>;
|
|
46
|
-
required: true;
|
|
47
|
-
};
|
|
48
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
-
declare const _default: typeof __VLS_export;
|
|
50
|
-
export default _default;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SelectButtonProps } from 'primevue/selectbutton';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSelectButtonProps {
|
|
5
|
-
pt?: SelectButtonProps['pt'];
|
|
6
|
-
ptOptions?: SelectButtonProps['ptOptions'];
|
|
7
|
-
unstyled?: SelectButtonProps['unstyled'];
|
|
8
|
-
optionLabel?: SelectButtonProps['optionLabel'];
|
|
9
|
-
optionValue?: SelectButtonProps['optionValue'];
|
|
10
|
-
optionDisabled?: SelectButtonProps['optionDisabled'];
|
|
11
|
-
multiple?: SelectButtonProps['multiple'];
|
|
12
|
-
dataKey?: SelectButtonProps['dataKey'];
|
|
13
|
-
options?: SelectButtonProps['options'];
|
|
14
|
-
size?: SelectButtonProps['size'];
|
|
15
|
-
}
|
|
16
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
-
context: {
|
|
18
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectButtonProps>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
context: {
|
|
23
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectButtonProps>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
|
-
declare const _default: typeof __VLS_export;
|
|
28
|
-
export default _default;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
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
|
-
|
|
22
|
-
const props = defineProps({
|
|
23
|
-
context: {
|
|
24
|
-
type: Object as PropType<FormKitFrameworkContext & FormKitPrimeSelectButtonProps>,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<div class="p-formkit">
|
|
34
|
-
<SelectButton
|
|
35
|
-
:id="context.id"
|
|
36
|
-
v-model="context._value"
|
|
37
|
-
v-bind="context?.attrs"
|
|
38
|
-
:disabled="!!context?.disabled"
|
|
39
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
40
|
-
:style="context?.attrs.style"
|
|
41
|
-
:class="context?.attrs?.class"
|
|
42
|
-
:invalid="isInvalid"
|
|
43
|
-
:tabindex="context?.attrs.tabindex"
|
|
44
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
45
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
46
|
-
:size="context?.size ?? undefined"
|
|
47
|
-
:options="context.options"
|
|
48
|
-
:option-label="context.optionLabel"
|
|
49
|
-
:option-value="context.optionValue"
|
|
50
|
-
:option-disabled="context.optionDisabled"
|
|
51
|
-
:multiple="context.multiple ?? false"
|
|
52
|
-
:data-key="context.dataKey"
|
|
53
|
-
:pt="context.pt"
|
|
54
|
-
:pt-options="context.ptOptions"
|
|
55
|
-
:unstyled="unstyled"
|
|
56
|
-
@change="handleChange"
|
|
57
|
-
@blur="handleBlur"
|
|
58
|
-
>
|
|
59
|
-
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
60
|
-
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
61
|
-
</template>
|
|
62
|
-
</SelectButton>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SelectButtonProps } from 'primevue/selectbutton';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSelectButtonProps {
|
|
5
|
-
pt?: SelectButtonProps['pt'];
|
|
6
|
-
ptOptions?: SelectButtonProps['ptOptions'];
|
|
7
|
-
unstyled?: SelectButtonProps['unstyled'];
|
|
8
|
-
optionLabel?: SelectButtonProps['optionLabel'];
|
|
9
|
-
optionValue?: SelectButtonProps['optionValue'];
|
|
10
|
-
optionDisabled?: SelectButtonProps['optionDisabled'];
|
|
11
|
-
multiple?: SelectButtonProps['multiple'];
|
|
12
|
-
dataKey?: SelectButtonProps['dataKey'];
|
|
13
|
-
options?: SelectButtonProps['options'];
|
|
14
|
-
size?: SelectButtonProps['size'];
|
|
15
|
-
}
|
|
16
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
-
context: {
|
|
18
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectButtonProps>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
context: {
|
|
23
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSelectButtonProps>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
|
-
declare const _default: typeof __VLS_export;
|
|
28
|
-
export default _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SliderProps } from 'primevue/slider';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSliderProps {
|
|
5
|
-
pt?: SliderProps['pt'];
|
|
6
|
-
ptOptions?: SliderProps['ptOptions'];
|
|
7
|
-
unstyled?: SliderProps['unstyled'];
|
|
8
|
-
min?: SliderProps['min'];
|
|
9
|
-
max?: SliderProps['max'];
|
|
10
|
-
step?: SliderProps['step'];
|
|
11
|
-
range?: SliderProps['range'];
|
|
12
|
-
orientation?: SliderProps['orientation'];
|
|
13
|
-
}
|
|
14
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
-
context: {
|
|
16
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSliderProps>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
context: {
|
|
21
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSliderProps>;
|
|
22
|
-
required: true;
|
|
23
|
-
};
|
|
24
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
-
declare const _default: typeof __VLS_export;
|
|
26
|
-
export default _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
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
|
-
|
|
19
|
-
const props = defineProps({
|
|
20
|
-
context: {
|
|
21
|
-
type: Object as PropType<FormKitFrameworkContext & FormKitPrimeSliderProps>,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const { unstyled, isInvalid, handleBlur } = useFormKitInput(props.context)
|
|
27
|
-
|
|
28
|
-
function handleInput(e: any) {
|
|
29
|
-
props.context?.node.input(e)
|
|
30
|
-
props.context?.handlers.blur(e)
|
|
31
|
-
}
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<div class="p-formkit">
|
|
36
|
-
<Slider
|
|
37
|
-
:id="context.id"
|
|
38
|
-
v-model="context._value"
|
|
39
|
-
v-bind="context?.attrs"
|
|
40
|
-
:disabled="!!context?.disabled"
|
|
41
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
42
|
-
:style="context?.attrs.style"
|
|
43
|
-
:class="context?.attrs?.class"
|
|
44
|
-
:invalid="isInvalid"
|
|
45
|
-
:tabindex="context?.attrs.tabindex"
|
|
46
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
47
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
48
|
-
:min="context.min ?? 0"
|
|
49
|
-
:max="context.max ?? 100"
|
|
50
|
-
:step="context.step ?? undefined"
|
|
51
|
-
:range="context.range ?? false"
|
|
52
|
-
:orientation="context.orientation ?? 'horizontal'"
|
|
53
|
-
:pt="context.pt"
|
|
54
|
-
:pt-options="context.ptOptions"
|
|
55
|
-
:unstyled="unstyled"
|
|
56
|
-
@change="handleInput"
|
|
57
|
-
@blur="handleBlur"
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { SliderProps } from 'primevue/slider';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeSliderProps {
|
|
5
|
-
pt?: SliderProps['pt'];
|
|
6
|
-
ptOptions?: SliderProps['ptOptions'];
|
|
7
|
-
unstyled?: SliderProps['unstyled'];
|
|
8
|
-
min?: SliderProps['min'];
|
|
9
|
-
max?: SliderProps['max'];
|
|
10
|
-
step?: SliderProps['step'];
|
|
11
|
-
range?: SliderProps['range'];
|
|
12
|
-
orientation?: SliderProps['orientation'];
|
|
13
|
-
}
|
|
14
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
-
context: {
|
|
16
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSliderProps>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
context: {
|
|
21
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeSliderProps>;
|
|
22
|
-
required: true;
|
|
23
|
-
};
|
|
24
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
-
declare const _default: typeof __VLS_export;
|
|
26
|
-
export default _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { TextareaProps } from 'primevue/textarea';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeTextareaProps {
|
|
5
|
-
pt?: TextareaProps['pt'];
|
|
6
|
-
ptOptions?: TextareaProps['ptOptions'];
|
|
7
|
-
unstyled?: TextareaProps['unstyled'];
|
|
8
|
-
autoResize?: TextareaProps['autoResize'];
|
|
9
|
-
size?: TextareaProps['size'];
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
rows?: number;
|
|
12
|
-
}
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
-
context: {
|
|
15
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeTextareaProps>;
|
|
16
|
-
required: true;
|
|
17
|
-
};
|
|
18
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
-
context: {
|
|
20
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeTextareaProps>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
declare const _default: typeof __VLS_export;
|
|
25
|
-
export default _default;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
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
|
-
|
|
18
|
-
const props = defineProps({
|
|
19
|
-
context: {
|
|
20
|
-
type: Object as PropType<FormKitFrameworkContext & FormKitPrimeTextareaProps>,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const { unstyled, isInvalid, handleInput, handleBlur } = useFormKitInput(props.context)
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<template>
|
|
29
|
-
<div class="p-formkit">
|
|
30
|
-
<Textarea
|
|
31
|
-
:id="context.id"
|
|
32
|
-
v-model="context._value"
|
|
33
|
-
v-bind="context?.attrs"
|
|
34
|
-
:disabled="!!context?.disabled"
|
|
35
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
36
|
-
:style="context?.attrs.style"
|
|
37
|
-
:class="context?.attrs?.class"
|
|
38
|
-
:invalid="isInvalid"
|
|
39
|
-
:tabindex="context?.attrs.tabindex"
|
|
40
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
41
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
42
|
-
:size="context?.size ?? undefined"
|
|
43
|
-
:placeholder="context.placeholder"
|
|
44
|
-
:rows="context.rows ?? 3"
|
|
45
|
-
:auto-resize="context.autoResize ?? false"
|
|
46
|
-
:pt="context.pt"
|
|
47
|
-
:pt-options="context.ptOptions"
|
|
48
|
-
:unstyled="unstyled"
|
|
49
|
-
@input="handleInput"
|
|
50
|
-
@blur="handleBlur"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { TextareaProps } from 'primevue/textarea';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeTextareaProps {
|
|
5
|
-
pt?: TextareaProps['pt'];
|
|
6
|
-
ptOptions?: TextareaProps['ptOptions'];
|
|
7
|
-
unstyled?: TextareaProps['unstyled'];
|
|
8
|
-
autoResize?: TextareaProps['autoResize'];
|
|
9
|
-
size?: TextareaProps['size'];
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
rows?: number;
|
|
12
|
-
}
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
-
context: {
|
|
15
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeTextareaProps>;
|
|
16
|
-
required: true;
|
|
17
|
-
};
|
|
18
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
-
context: {
|
|
20
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeTextareaProps>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
declare const _default: typeof __VLS_export;
|
|
25
|
-
export default _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { FormKitFrameworkContext } from '@formkit/core';
|
|
2
|
-
import type { ToggleButtonProps } from 'primevue/togglebutton';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
export interface FormKitPrimeToggleButtonProps {
|
|
5
|
-
pt?: ToggleButtonProps['pt'];
|
|
6
|
-
ptOptions?: ToggleButtonProps['ptOptions'];
|
|
7
|
-
unstyled?: ToggleButtonProps['unstyled'];
|
|
8
|
-
onLabel?: ToggleButtonProps['onLabel'];
|
|
9
|
-
offLabel?: ToggleButtonProps['offLabel'];
|
|
10
|
-
onIcon?: ToggleButtonProps['onIcon'];
|
|
11
|
-
offIcon?: ToggleButtonProps['offIcon'];
|
|
12
|
-
size?: ToggleButtonProps['size'];
|
|
13
|
-
}
|
|
14
|
-
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
-
context: {
|
|
16
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeToggleButtonProps>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
context: {
|
|
21
|
-
type: PropType<FormKitFrameworkContext & FormKitPrimeToggleButtonProps>;
|
|
22
|
-
required: true;
|
|
23
|
-
};
|
|
24
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
-
declare const _default: typeof __VLS_export;
|
|
26
|
-
export default _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script setup lang='ts'>
|
|
2
|
-
import type { FormKitFrameworkContext } from '@formkit/core'
|
|
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
|
-
|
|
20
|
-
const props = defineProps({
|
|
21
|
-
context: {
|
|
22
|
-
type: Object as PropType<FormKitFrameworkContext & FormKitPrimeToggleButtonProps>,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const { validSlotNames, unstyled, isInvalid, handleChange, handleBlur } = useFormKitInput(props.context)
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<div class="p-formkit">
|
|
32
|
-
<ToggleButton
|
|
33
|
-
v-model="context._value"
|
|
34
|
-
v-bind="context?.attrs"
|
|
35
|
-
:input-id="context.id"
|
|
36
|
-
:disabled="!!context?.disabled"
|
|
37
|
-
:readonly="context?.attrs.readonly ?? false"
|
|
38
|
-
:input-style="context?.attrs.style"
|
|
39
|
-
:input-class="context?.attrs?.class"
|
|
40
|
-
:invalid="isInvalid"
|
|
41
|
-
:tabindex="context?.attrs.tabindex"
|
|
42
|
-
:aria-label="context?.attrs.ariaLabel"
|
|
43
|
-
:aria-labelledby="context?.attrs.ariaLabelledby"
|
|
44
|
-
:size="context?.size ?? undefined"
|
|
45
|
-
:on-label="context.onLabel ?? 'Yes'"
|
|
46
|
-
:off-label="context.offLabel ?? 'No'"
|
|
47
|
-
:on-icon="context.onIcon"
|
|
48
|
-
:off-icon="context.offIcon"
|
|
49
|
-
:pt="context.pt"
|
|
50
|
-
:pt-options="context.ptOptions"
|
|
51
|
-
:unstyled="unstyled"
|
|
52
|
-
@change="handleChange"
|
|
53
|
-
@blur="handleBlur"
|
|
54
|
-
>
|
|
55
|
-
<template v-for="slotName in validSlotNames" :key="slotName" #[slotName]="slotProps">
|
|
56
|
-
<component :is="context?.slots[slotName]" v-bind="{ ...context, ...slotProps }" />
|
|
57
|
-
</template>
|
|
58
|
-
</ToggleButton>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|