@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
package/dist/index.d.ts
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
import type { FormKitBaseSlots, FormKitInputs } from
|
|
2
|
-
import type { AutoCompleteSlots, CascadeSelectSlots, CheckboxSlots, ColorPickerSlots, DatePickerSlots, InputMaskSlots, InputNumberSlots, InputOtpSlots, InputTextSlots, KnobSlots, ListboxSlots, MultiSelectSlots, PasswordSlots, RadioButtonSlots, RatingSlots, SelectButtonSlots, SelectSlots, SliderSlots, TextareaSlots, ToggleButtonSlots, ToggleSwitchSlots, TreeSelectSlots } from
|
|
3
|
-
import type { CascadeSelectProps } from
|
|
4
|
-
import type { ListboxProps } from
|
|
5
|
-
import type { MultiSelectProps } from
|
|
6
|
-
import type { SelectProps } from
|
|
7
|
-
import type { SelectButtonProps } from
|
|
8
|
-
import type { TreeSelectProps } from
|
|
9
|
-
import { FormKitDataEdit, FormKitDataView } from
|
|
10
|
-
import { useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs } from
|
|
11
|
-
import { primeInputs, primeOutputs } from
|
|
1
|
+
import type { FormKitBaseSlots, FormKitInputs } from "@formkit/inputs";
|
|
2
|
+
import type { AutoCompleteSlots, CascadeSelectSlots, CheckboxSlots, ColorPickerSlots, DatePickerSlots, InputMaskSlots, InputNumberSlots, InputOtpSlots, InputTextSlots, KnobSlots, ListboxSlots, MultiSelectSlots, PasswordSlots, RadioButtonSlots, RatingSlots, SelectButtonSlots, SelectSlots, SliderSlots, TextareaSlots, ToggleButtonSlots, ToggleSwitchSlots, TreeSelectSlots } from "primevue";
|
|
3
|
+
import type { CascadeSelectProps } from "primevue/cascadeselect";
|
|
4
|
+
import type { ListboxProps } from "primevue/listbox";
|
|
5
|
+
import type { MultiSelectProps } from "primevue/multiselect";
|
|
6
|
+
import type { SelectProps } from "primevue/select";
|
|
7
|
+
import type { SelectButtonProps } from "primevue/selectbutton";
|
|
8
|
+
import type { TreeSelectProps } from "primevue/treeselect";
|
|
9
|
+
import { FormKitDataEdit, FormKitDataView } from "./components/index.ts";
|
|
10
|
+
import { useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs } from "./composables/index.ts";
|
|
11
|
+
import { primeInputs, primeOutputs } from "./definitions/index.ts";
|
|
12
12
|
export { FormKitDataEdit, FormKitDataView, primeInputs, primeOutputs, useFormKitRepeater, useFormKitSchema, useInputEditor, useInputEditorSchema, usePrimeInputs, };
|
|
13
13
|
/**
|
|
14
14
|
* Keeps all slots from 1st argument, add any slots from 2nd type which do not collide with the 1st's names.
|
|
15
15
|
*/
|
|
16
16
|
type MergeSlots<A, B> = A & Omit<B, keyof A>;
|
|
17
|
-
declare module
|
|
17
|
+
declare module "@formkit/inputs" {
|
|
18
18
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
|
19
19
|
primeAutoComplete: {
|
|
20
|
-
type:
|
|
20
|
+
type: "primeAutoComplete";
|
|
21
21
|
};
|
|
22
22
|
primeInputText: {
|
|
23
|
-
type:
|
|
23
|
+
type: "primeInputText";
|
|
24
24
|
};
|
|
25
25
|
primeInputNumber: {
|
|
26
|
-
type:
|
|
26
|
+
type: "primeInputNumber";
|
|
27
27
|
};
|
|
28
28
|
primeInputMask: {
|
|
29
|
-
type:
|
|
29
|
+
type: "primeInputMask";
|
|
30
30
|
};
|
|
31
31
|
primePassword: {
|
|
32
|
-
type:
|
|
32
|
+
type: "primePassword";
|
|
33
33
|
};
|
|
34
34
|
primeCheckbox: {
|
|
35
|
-
type:
|
|
35
|
+
type: "primeCheckbox";
|
|
36
36
|
};
|
|
37
37
|
primeToggleSwitch: {
|
|
38
|
-
type:
|
|
38
|
+
type: "primeToggleSwitch";
|
|
39
39
|
};
|
|
40
40
|
primeTextarea: {
|
|
41
|
-
type:
|
|
41
|
+
type: "primeTextarea";
|
|
42
42
|
};
|
|
43
43
|
primeSelect: {
|
|
44
|
-
type:
|
|
45
|
-
options?: SelectProps[
|
|
44
|
+
type: "primeSelect";
|
|
45
|
+
options?: SelectProps["options"];
|
|
46
46
|
};
|
|
47
47
|
primeMultiSelect: {
|
|
48
|
-
type:
|
|
49
|
-
options?: MultiSelectProps[
|
|
48
|
+
type: "primeMultiSelect";
|
|
49
|
+
options?: MultiSelectProps["options"];
|
|
50
50
|
};
|
|
51
51
|
primeDatePicker: {
|
|
52
|
-
type:
|
|
52
|
+
type: "primeDatePicker";
|
|
53
53
|
};
|
|
54
54
|
primeSlider: {
|
|
55
|
-
type:
|
|
55
|
+
type: "primeSlider";
|
|
56
56
|
};
|
|
57
57
|
primeKnob: {
|
|
58
|
-
type:
|
|
58
|
+
type: "primeKnob";
|
|
59
59
|
};
|
|
60
60
|
primeRating: {
|
|
61
|
-
type:
|
|
61
|
+
type: "primeRating";
|
|
62
62
|
};
|
|
63
63
|
primeRadioButton: {
|
|
64
|
-
type:
|
|
64
|
+
type: "primeRadioButton";
|
|
65
65
|
};
|
|
66
66
|
primeColorPicker: {
|
|
67
|
-
type:
|
|
67
|
+
type: "primeColorPicker";
|
|
68
68
|
};
|
|
69
69
|
primeToggleButton: {
|
|
70
|
-
type:
|
|
70
|
+
type: "primeToggleButton";
|
|
71
71
|
};
|
|
72
72
|
primeListbox: {
|
|
73
|
-
type:
|
|
74
|
-
options?: ListboxProps[
|
|
73
|
+
type: "primeListbox";
|
|
74
|
+
options?: ListboxProps["options"];
|
|
75
75
|
};
|
|
76
76
|
primeSelectButton: {
|
|
77
|
-
type:
|
|
78
|
-
options?: SelectButtonProps[
|
|
77
|
+
type: "primeSelectButton";
|
|
78
|
+
options?: SelectButtonProps["options"];
|
|
79
79
|
};
|
|
80
80
|
primeCascadeSelect: {
|
|
81
|
-
type:
|
|
82
|
-
options?: CascadeSelectProps[
|
|
81
|
+
type: "primeCascadeSelect";
|
|
82
|
+
options?: CascadeSelectProps["options"];
|
|
83
83
|
};
|
|
84
84
|
primeTreeSelect: {
|
|
85
|
-
type:
|
|
86
|
-
options?: TreeSelectProps[
|
|
85
|
+
type: "primeTreeSelect";
|
|
86
|
+
options?: TreeSelectProps["options"];
|
|
87
87
|
};
|
|
88
88
|
primeInputOtp: {
|
|
89
|
-
type:
|
|
89
|
+
type: "primeInputOtp";
|
|
90
90
|
};
|
|
91
91
|
primeOutputText: {
|
|
92
|
-
type:
|
|
92
|
+
type: "primeOutputText";
|
|
93
93
|
};
|
|
94
94
|
primeOutputLink: {
|
|
95
|
-
type:
|
|
95
|
+
type: "primeOutputLink";
|
|
96
96
|
};
|
|
97
97
|
primeOutputReference: {
|
|
98
|
-
type:
|
|
98
|
+
type: "primeOutputReference";
|
|
99
99
|
};
|
|
100
100
|
primeOutputNumber: {
|
|
101
|
-
type:
|
|
101
|
+
type: "primeOutputNumber";
|
|
102
102
|
};
|
|
103
103
|
primeOutputDate: {
|
|
104
|
-
type:
|
|
104
|
+
type: "primeOutputDate";
|
|
105
105
|
};
|
|
106
106
|
primeOutputBoolean: {
|
|
107
|
-
type:
|
|
107
|
+
type: "primeOutputBoolean";
|
|
108
108
|
};
|
|
109
109
|
primeOutputDuration: {
|
|
110
|
-
type:
|
|
110
|
+
type: "primeOutputDuration";
|
|
111
111
|
};
|
|
112
112
|
primeOutputList: {
|
|
113
|
-
type:
|
|
113
|
+
type: "primeOutputList";
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
interface FormKitInputSlots<Props extends FormKitInputs<Props>> {
|
package/dist/index.js
CHANGED
|
@@ -6,57 +6,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "FormKitDataEdit", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _index.FormKitDataEdit;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "FormKitDataView", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _index.FormKitDataView;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "primeInputs", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _index3.primeInputs;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "primeOutputs", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _index3.primeOutputs;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useFormKitRepeater", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
33
|
-
return
|
|
33
|
+
return _index2.useFormKitRepeater;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "useFormKitSchema", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function () {
|
|
39
|
-
return
|
|
39
|
+
return _index2.useFormKitSchema;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "useInputEditor", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function () {
|
|
45
|
-
return
|
|
45
|
+
return _index2.useInputEditor;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "useInputEditorSchema", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function () {
|
|
51
|
-
return
|
|
51
|
+
return _index2.useInputEditorSchema;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "usePrimeInputs", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return
|
|
57
|
+
return _index2.usePrimeInputs;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
60
|
+
var _index = require("./components/index.ts");
|
|
61
|
+
var _index2 = require("./composables/index.ts");
|
|
62
|
+
var _index3 = require("./definitions/index.ts");
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { FormKitDataEdit, FormKitDataView } from "./components/index.
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { FormKitDataEdit, FormKitDataView } from "./components/index.ts";
|
|
2
|
+
import {
|
|
3
|
+
useFormKitRepeater,
|
|
4
|
+
useFormKitSchema,
|
|
5
|
+
useInputEditor,
|
|
6
|
+
useInputEditorSchema,
|
|
7
|
+
usePrimeInputs
|
|
8
|
+
} from "./composables/index.ts";
|
|
9
|
+
import { primeInputs, primeOutputs } from "./definitions/index.ts";
|
|
4
10
|
export {
|
|
5
11
|
FormKitDataEdit,
|
|
6
12
|
FormKitDataView,
|
package/dist/plugins/index.d.ts
CHANGED
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
export function addPrimeAsteriskPlugin(node) {
|
|
2
|
-
if (!node.props.type.startsWith("prime") || node.props.type.startsWith("primeOutput"))
|
|
3
|
-
return;
|
|
2
|
+
if (!node.props.type.startsWith("prime") || node.props.type.startsWith("primeOutput")) return;
|
|
4
3
|
node.on("created", () => {
|
|
5
4
|
if (node.props.definition?.schema) {
|
|
6
5
|
const schemaFn = node.props.definition?.schema;
|
|
7
6
|
node.props.definition.schema = (sectionsSchema = {}) => {
|
|
8
7
|
sectionsSchema.label = {
|
|
9
|
-
children: [
|
|
10
|
-
$
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
children: [
|
|
9
|
+
"$label",
|
|
10
|
+
{
|
|
11
|
+
$el: "span",
|
|
12
|
+
if: "$state.required",
|
|
13
|
+
attrs: {
|
|
14
|
+
class: "p-formkit-asterisk"
|
|
15
|
+
},
|
|
16
|
+
children: ["*"]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
17
19
|
};
|
|
18
20
|
return schemaFn(sectionsSchema);
|
|
19
21
|
};
|
|
@@ -21,29 +23,31 @@ export function addPrimeAsteriskPlugin(node) {
|
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
25
|
export function addLabelPlugin(node) {
|
|
24
|
-
if (!node.props.type.startsWith("prime"))
|
|
25
|
-
return;
|
|
26
|
+
if (!node.props.type.startsWith("prime")) return;
|
|
26
27
|
node.on("created", () => {
|
|
27
28
|
if (node.props.definition?.schema) {
|
|
28
29
|
const schemaFn = node.props.definition?.schema;
|
|
29
30
|
node.props.definition.schema = (sectionsSchema = {}) => {
|
|
30
31
|
sectionsSchema.label = {
|
|
31
|
-
children: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
$el: "span",
|
|
40
|
-
if: "$state.required",
|
|
41
|
-
attrs: {
|
|
42
|
-
class: "p-formkit-required",
|
|
43
|
-
title: "$help"
|
|
32
|
+
children: [
|
|
33
|
+
{
|
|
34
|
+
$el: "span",
|
|
35
|
+
attrs: {
|
|
36
|
+
title: "$help",
|
|
37
|
+
class: "p-formkit-label"
|
|
38
|
+
},
|
|
39
|
+
children: ["$label"]
|
|
44
40
|
},
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
{
|
|
42
|
+
$el: "span",
|
|
43
|
+
if: "$state.required",
|
|
44
|
+
attrs: {
|
|
45
|
+
class: "p-formkit-required",
|
|
46
|
+
title: "$help"
|
|
47
|
+
},
|
|
48
|
+
children: ["*"]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
47
51
|
};
|
|
48
52
|
sectionsSchema.help = {
|
|
49
53
|
children: []
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:map";
|
|
3
3
|
|
|
4
4
|
$gutter-width: 0.5rem;
|
|
5
5
|
|
|
6
6
|
// Breakpoints e.g. https://tailwindcss.com/docs/responsive-design
|
|
7
7
|
$grid-breakpoints: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
sm: 640px,
|
|
9
|
+
md: 768px,
|
|
10
|
+
lg: 1024px,
|
|
11
|
+
xl: 1280px,
|
|
12
|
+
xxl: 1536px,
|
|
13
13
|
) !default;
|
|
14
14
|
|
|
15
15
|
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
|
@@ -69,7 +69,12 @@ $grid-breakpoints: (
|
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.p-inputtext,
|
|
72
|
+
.p-inputtext,
|
|
73
|
+
.p-textarea,
|
|
74
|
+
.p-password,
|
|
75
|
+
.p-multiselect,
|
|
76
|
+
.p-select,
|
|
77
|
+
.p-editor {
|
|
73
78
|
box-sizing: border-box;
|
|
74
79
|
width: 100%;
|
|
75
80
|
|
|
@@ -77,7 +82,6 @@ $grid-breakpoints: (
|
|
|
77
82
|
width: 2rem;
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
|
-
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
|
|
@@ -86,7 +90,6 @@ $grid-breakpoints: (
|
|
|
86
90
|
font-size: 0.8rem;
|
|
87
91
|
color: var(--text-color-secondary);
|
|
88
92
|
}
|
|
89
|
-
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
// Label for single form element
|
|
@@ -103,7 +106,8 @@ $grid-breakpoints: (
|
|
|
103
106
|
> * {
|
|
104
107
|
margin-right: 0.5rem;
|
|
105
108
|
|
|
106
|
-
&:last-child,
|
|
109
|
+
&:last-child,
|
|
110
|
+
&:only-child {
|
|
107
111
|
margin-right: 0;
|
|
108
112
|
}
|
|
109
113
|
}
|
|
@@ -115,7 +119,7 @@ $grid-breakpoints: (
|
|
|
115
119
|
flex-wrap: wrap;
|
|
116
120
|
gap: 0.5rem;
|
|
117
121
|
|
|
118
|
-
.p-formkit-option
|
|
122
|
+
.p-formkit-option {
|
|
119
123
|
display: flex;
|
|
120
124
|
align-items: center;
|
|
121
125
|
label {
|
|
@@ -155,10 +159,9 @@ $grid-breakpoints: (
|
|
|
155
159
|
button {
|
|
156
160
|
margin-right: 0.5rem;
|
|
157
161
|
}
|
|
158
|
-
|
|
159
162
|
}
|
|
160
163
|
|
|
161
|
-
.p-action-buttons
|
|
164
|
+
.p-action-buttons {
|
|
162
165
|
margin-top: 0.25rem;
|
|
163
166
|
.p-button {
|
|
164
167
|
margin-right: 0.5rem;
|
|
@@ -181,117 +184,117 @@ $grid-breakpoints: (
|
|
|
181
184
|
|
|
182
185
|
// data view only
|
|
183
186
|
.p-formkit-data-view {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
.formkit-outer {
|
|
188
|
+
padding-bottom: 0.5rem;
|
|
189
|
+
}
|
|
187
190
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
&.form-horizontal {
|
|
192
|
+
padding-bottom: 0.8rem;
|
|
193
|
+
}
|
|
191
194
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
.formkit-help {
|
|
196
|
+
padding-top: 0.25rem;
|
|
197
|
+
margin: 0;
|
|
198
|
+
}
|
|
196
199
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
ul,
|
|
201
|
+
ol {
|
|
202
|
+
padding-inline-start: 1rem;
|
|
203
|
+
margin-block-start: 0;
|
|
204
|
+
margin-block-end: 0;
|
|
205
|
+
}
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
// data edit only
|
|
205
209
|
.p-formkit-data-edit {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
// specific checkbox stylings
|
|
211
|
-
.formkit-outer[data-type="primeCheckbox"] {
|
|
212
|
-
//padding-left: 0;
|
|
213
|
-
|
|
214
|
-
.formkit-wrapper {
|
|
215
|
-
display: flex;
|
|
216
|
-
flex-wrap: wrap;
|
|
210
|
+
.formkit-label {
|
|
211
|
+
//font-weight: normal;
|
|
212
|
+
}
|
|
217
213
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
// specific checkbox stylings
|
|
215
|
+
.formkit-outer[data-type="primeCheckbox"] {
|
|
216
|
+
//padding-left: 0;
|
|
221
217
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
padding: 0.125rem 0;
|
|
218
|
+
.formkit-wrapper {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-wrap: wrap;
|
|
226
221
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
.formkit-inner {
|
|
223
|
+
width: auto !important;
|
|
224
|
+
}
|
|
230
225
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
flex-basis: 2rem;
|
|
236
|
-
flex-grow: 0;
|
|
237
|
-
flex-shrink: 0;
|
|
238
|
-
overflow: hidden;
|
|
239
|
-
// styling of suffix when suffix is used in addition to label
|
|
240
|
-
&:has( label) {
|
|
241
|
-
flex-grow: 1;
|
|
242
|
-
flex-basis: 100%;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
226
|
+
label {
|
|
227
|
+
width: auto;
|
|
228
|
+
order: 2;
|
|
229
|
+
padding: 0.125rem 0;
|
|
246
230
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
width: auto;
|
|
231
|
+
&:after {
|
|
232
|
+
content: "";
|
|
250
233
|
}
|
|
251
234
|
|
|
252
|
-
label
|
|
235
|
+
// styling of output when label is used in schema
|
|
236
|
+
+ .formkit-inner {
|
|
237
|
+
margin-left: 0 !important;
|
|
253
238
|
order: 1;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
239
|
+
flex-basis: 2rem;
|
|
240
|
+
flex-grow: 0;
|
|
241
|
+
flex-shrink: 0;
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
// styling of suffix when suffix is used in addition to label
|
|
244
|
+
&:has(label) {
|
|
245
|
+
flex-grow: 1;
|
|
246
|
+
flex-basis: 100%;
|
|
258
247
|
}
|
|
259
248
|
}
|
|
249
|
+
}
|
|
260
250
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
251
|
+
// styling when both prefix and suffix are used in schema
|
|
252
|
+
label:first-child:nth-last-child(3),
|
|
253
|
+
label:first-child:nth-last-child(3) ~ label {
|
|
254
|
+
width: auto;
|
|
255
|
+
}
|
|
264
256
|
|
|
265
|
-
|
|
257
|
+
label:first-child:nth-last-child(3) {
|
|
258
|
+
order: 1;
|
|
266
259
|
|
|
260
|
+
+ div.p-checkbox {
|
|
261
|
+
order: 2;
|
|
262
|
+
width: auto;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
267
265
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
266
|
+
label:first-child:nth-last-child(3) ~ label {
|
|
267
|
+
order: 3;
|
|
268
|
+
}
|
|
271
269
|
|
|
272
|
-
|
|
273
|
-
display: flex;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
270
|
+
// end styling when both prefix and suffix are used in schema
|
|
276
271
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
// styling of output when only suffix is used in schema
|
|
273
|
+
.formkit-inner:first-child {
|
|
274
|
+
margin-left: 0 !important;
|
|
275
|
+
|
|
276
|
+
.p-formkit {
|
|
277
|
+
display: flex;
|
|
280
278
|
}
|
|
281
279
|
}
|
|
282
280
|
|
|
283
|
-
.
|
|
284
|
-
width:
|
|
285
|
-
|
|
281
|
+
.p-checkbox:not(:only-child) {
|
|
282
|
+
width: 2rem;
|
|
283
|
+
overflow: hidden;
|
|
286
284
|
}
|
|
287
285
|
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
286
|
|
|
287
|
+
.formkit-help {
|
|
288
|
+
width: auto !important;
|
|
289
|
+
//padding-left: 2rem;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
291
293
|
|
|
292
294
|
// Debug
|
|
293
295
|
.p-formkit-data-debug {
|
|
294
|
-
pre,
|
|
296
|
+
pre,
|
|
297
|
+
span {
|
|
295
298
|
font-size: 0.75rem;
|
|
296
299
|
line-height: 1rem;
|
|
297
300
|
}
|
|
@@ -322,9 +325,7 @@ $grid-breakpoints: (
|
|
|
322
325
|
|
|
323
326
|
@include media-breakpoint-up(md) {
|
|
324
327
|
.formkit-form {
|
|
325
|
-
|
|
326
328
|
&.form-horizontal {
|
|
327
|
-
|
|
328
329
|
.formkit-wrapper {
|
|
329
330
|
display: flex;
|
|
330
331
|
|
|
@@ -346,7 +347,6 @@ $grid-breakpoints: (
|
|
|
346
347
|
}
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
|
-
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
.p-formkit-data-view & {
|
|
@@ -358,9 +358,7 @@ $grid-breakpoints: (
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.p-formkit-data-edit & {
|
|
361
|
-
|
|
362
361
|
&.form-horizontal {
|
|
363
|
-
|
|
364
362
|
.formkit-outer {
|
|
365
363
|
width: 100%;
|
|
366
364
|
|
|
@@ -380,7 +378,7 @@ $grid-breakpoints: (
|
|
|
380
378
|
margin-left: auto;
|
|
381
379
|
|
|
382
380
|
.p-formkit {
|
|
383
|
-
display: flex
|
|
381
|
+
display: flex;
|
|
384
382
|
}
|
|
385
383
|
|
|
386
384
|
label {
|
|
@@ -390,7 +388,8 @@ $grid-breakpoints: (
|
|
|
390
388
|
}
|
|
391
389
|
}
|
|
392
390
|
|
|
393
|
-
.formkit-help,
|
|
391
|
+
.formkit-help,
|
|
392
|
+
.formkit-messages {
|
|
394
393
|
width: calc((8 / 12) * 100%);
|
|
395
394
|
margin-left: auto;
|
|
396
395
|
}
|
|
@@ -398,4 +397,3 @@ $grid-breakpoints: (
|
|
|
398
397
|
}
|
|
399
398
|
}
|
|
400
399
|
}
|
|
401
|
-
|