srcdev-nuxt-forms 2.4.23 → 3.0.0
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/nuxt.config.ts +3 -0
- package/package.json +2 -2
- package/assets/styles/ally/_utils.css +0 -20
- package/assets/styles/ally/_variables.css +0 -8
- package/assets/styles/ally/index.css +0 -2
- package/assets/styles/forms/index.css +0 -2
- package/assets/styles/forms/themes/_error.css +0 -85
- package/assets/styles/forms/themes/_ghost.css +0 -85
- package/assets/styles/forms/themes/_input-action-underlined.css +0 -20
- package/assets/styles/forms/themes/_input-action.css +0 -20
- package/assets/styles/forms/themes/_primary.css +0 -90
- package/assets/styles/forms/themes/_secondary.css +0 -85
- package/assets/styles/forms/themes/_success.css +0 -85
- package/assets/styles/forms/themes/_tertiary.css +0 -85
- package/assets/styles/forms/themes/_warning.css +0 -85
- package/assets/styles/forms/themes/index.css +0 -9
- package/assets/styles/forms/variables/_sizes.css +0 -71
- package/assets/styles/forms/variables/_theme.css +0 -11
- package/assets/styles/forms/variables/index.css +0 -2
- package/assets/styles/main.css +0 -5
- package/assets/styles/typography/index.css +0 -2
- package/assets/styles/typography/utils/_font-classes.css +0 -190
- package/assets/styles/typography/utils/_weights.css +0 -69
- package/assets/styles/typography/utils/index.css +0 -2
- package/assets/styles/typography/variables/_colors.css +0 -14
- package/assets/styles/typography/variables/_reponsive-font-size.css +0 -10
- package/assets/styles/typography/variables/index.css +0 -2
- package/assets/styles/utils/_margin-helpers.css +0 -334
- package/assets/styles/utils/_padding-helpers.css +0 -308
- package/assets/styles/utils/_page.css +0 -36
- package/assets/styles/utils/index.css +0 -3
- package/assets/styles/variables/colors/_blue.css +0 -15
- package/assets/styles/variables/colors/_gray.css +0 -16
- package/assets/styles/variables/colors/_green.css +0 -15
- package/assets/styles/variables/colors/_orange.css +0 -15
- package/assets/styles/variables/colors/_red.css +0 -15
- package/assets/styles/variables/colors/_yellow.css +0 -15
- package/assets/styles/variables/colors/colors.css +0 -6
- package/assets/styles/variables/index.css +0 -1
- package/components/forms/c12/prop-validators/index.ts +0 -38
- package/components/forms/c12/utils.ts +0 -14
- package/components/forms/form-errors/InputError.vue +0 -172
- package/components/forms/form-errors/tests/InputError.spec.ts +0 -67
- package/components/forms/input-button/InputButtonCore.vue +0 -191
- package/components/forms/input-button/variants/InputButtonConfirm.vue +0 -66
- package/components/forms/input-button/variants/InputButtonSubmit.vue +0 -62
- package/components/forms/input-checkbox/MultipleCheckboxes.vue +0 -203
- package/components/forms/input-checkbox/SingleCheckbox.vue +0 -169
- package/components/forms/input-checkbox/tests/MultipleCheckboxes.spec.ts +0 -98
- package/components/forms/input-checkbox/tests/data/tags.json +0 -67
- package/components/forms/input-checkbox-radio/InputCheckboxRadioButton.vue +0 -214
- package/components/forms/input-checkbox-radio/InputCheckboxRadioCore.vue +0 -191
- package/components/forms/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +0 -111
- package/components/forms/input-number/InputNumberCore.vue +0 -203
- package/components/forms/input-number/variants/InputNumberDefault.vue +0 -154
- package/components/forms/input-radio/MultipleRadiobuttons.vue +0 -201
- package/components/forms/input-radio/tests/MultipleRadioButtons.spec.ts +0 -89
- package/components/forms/input-radio/tests/data/tags.json +0 -67
- package/components/forms/input-range/InputRangeCore.vue +0 -274
- package/components/forms/input-range/variants/InputRangeDefault.vue +0 -156
- package/components/forms/input-range-fancy/InputRangeFancyCore.vue +0 -450
- package/components/forms/input-range-fancy/InputRangeFancyWithLabel.vue +0 -124
- package/components/forms/input-text/InputTextCore.vue +0 -331
- package/components/forms/input-text/variants/InputPasswordWithLabel.vue +0 -130
- package/components/forms/input-text/variants/InputTextAsNumberWithLabel.vue +0 -187
- package/components/forms/input-text/variants/InputTextWithLabel.vue +0 -298
- package/components/forms/input-textarea/InputTextareaCore.vue +0 -234
- package/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +0 -267
- package/components/forms/toggle-switch/ToggleSwitchCore.vue +0 -216
- package/components/forms/toggle-switch/variants/ToggleSwitchWithLabel.vue +0 -105
- package/components/forms/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +0 -102
- package/components/forms/ui/FormField.vue +0 -78
- package/components/forms/ui/FormWrapper.vue +0 -35
- package/components/utils/colour-scheme-select/ColourSchemeSelect.vue +0 -270
- package/components/utils/colour-scheme-select/ColourSchemeSelectOld.vue +0 -225
- package/components/utils/dark-mode-switcher/DarkModeSwitcher.vue +0 -47
- package/composables/useApiRequest.ts +0 -25
- package/composables/useColourScheme.ts +0 -25
- package/composables/useErrorMessages.ts +0 -59
- package/composables/useFormControl.ts +0 -248
- package/composables/useSleep.ts +0 -5
- package/composables/useStyleClassPassthrough.ts +0 -30
- package/composables/useZodValidation.ts +0 -148
- package/types/types.forms.ts +0 -216
- package/types/types.zodFormControl.ts +0 -21
package/types/types.forms.ts
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
export interface IValidationPatterns {
|
|
2
|
-
pattern: string;
|
|
3
|
-
minlength: string;
|
|
4
|
-
maxlength: string;
|
|
5
|
-
hint: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface IOptionsConfig {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface IFormMultipleOptions {
|
|
16
|
-
data: IOptionsConfig[];
|
|
17
|
-
total: number;
|
|
18
|
-
skip: number;
|
|
19
|
-
limit: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IOptionsValueArr {
|
|
23
|
-
[key: string]: string | boolean | number | URL | object;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface IFieldsInitialState {
|
|
27
|
-
[key: string]: null | string | boolean | number | URL | object | IOptionsValueArr[];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type TFieldsInitialState = {
|
|
31
|
-
[key: string]: null | string | boolean | number | URL | object | IOptionsValueArr[];
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export interface IValidityState {
|
|
35
|
-
badInput: boolean;
|
|
36
|
-
customError: boolean;
|
|
37
|
-
patternMismatch: boolean;
|
|
38
|
-
rangeOverflow: boolean;
|
|
39
|
-
rangeUnderflow: boolean;
|
|
40
|
-
stepMismatch: boolean;
|
|
41
|
-
tooLong: boolean;
|
|
42
|
-
tooShort: boolean;
|
|
43
|
-
typeMismatch: boolean;
|
|
44
|
-
valid: boolean;
|
|
45
|
-
valueMissing: boolean;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface IValidityStateArr {
|
|
49
|
-
[key: string]: {
|
|
50
|
-
badInput: boolean;
|
|
51
|
-
customError: boolean;
|
|
52
|
-
patternMismatch: boolean;
|
|
53
|
-
rangeOverflow: boolean;
|
|
54
|
-
rangeUnderflow: boolean;
|
|
55
|
-
stepMismatch: boolean;
|
|
56
|
-
tooLong: boolean;
|
|
57
|
-
tooShort: boolean;
|
|
58
|
-
typeMismatch: boolean;
|
|
59
|
-
valid: boolean;
|
|
60
|
-
valueMissing: boolean;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IFormFieldsState {
|
|
65
|
-
[key: string]: boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface ICustomErrorMessage {
|
|
69
|
-
useCustomError: boolean;
|
|
70
|
-
message: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface InpuTextC12 {
|
|
74
|
-
label: string;
|
|
75
|
-
placeholder: string;
|
|
76
|
-
errorMessage: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface IErrorMessagesArr {
|
|
80
|
-
[x: string]: ICustomErrorMessage;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface IFormFieldC12 {
|
|
84
|
-
label: string;
|
|
85
|
-
placeholder: string;
|
|
86
|
-
errorMessage: string;
|
|
87
|
-
useCustomError: boolean;
|
|
88
|
-
customErrors: null | string | string[];
|
|
89
|
-
isValid: boolean;
|
|
90
|
-
isDirty: boolean;
|
|
91
|
-
type: string;
|
|
92
|
-
previousValue: null | string | boolean | number | URL | object;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface IFormFieldsC12 {
|
|
96
|
-
[x: string]: IFormFieldC12;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface IFormFieldState {
|
|
100
|
-
isValid: boolean;
|
|
101
|
-
isDirty: boolean;
|
|
102
|
-
previousValue: null | string | boolean | number | URL | object;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface IFormFieldStateObj {
|
|
106
|
-
[x: string]: IFormFieldState;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface IFormData {
|
|
110
|
-
[x: string]: string | boolean | number | URL | object;
|
|
111
|
-
data: IFieldsInitialState;
|
|
112
|
-
validityState: IFormFieldsState;
|
|
113
|
-
dirtyFields: IFormFieldsState;
|
|
114
|
-
focusedField: string;
|
|
115
|
-
isPending: boolean;
|
|
116
|
-
errorCount: number;
|
|
117
|
-
errorMessages: IErrorMessagesArr;
|
|
118
|
-
formFieldsC12: IFormFieldsC12;
|
|
119
|
-
formIsValid: boolean;
|
|
120
|
-
submitAttempted: boolean;
|
|
121
|
-
submitDisabled: boolean;
|
|
122
|
-
submitSuccess: boolean;
|
|
123
|
-
displayErrorMessages: boolean;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface IApiErrorMessages {
|
|
127
|
-
[x: string]: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// New types
|
|
131
|
-
|
|
132
|
-
export interface C12nInputText {
|
|
133
|
-
type: string;
|
|
134
|
-
id: string;
|
|
135
|
-
name: string;
|
|
136
|
-
label: string;
|
|
137
|
-
placeholder: string;
|
|
138
|
-
errorMessage: string;
|
|
139
|
-
fieldHasError: boolean;
|
|
140
|
-
required: boolean;
|
|
141
|
-
styleClassPassthrough: string[];
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface C12nMultipleCheckboxes {
|
|
145
|
-
id: string;
|
|
146
|
-
name: string;
|
|
147
|
-
label: string;
|
|
148
|
-
legend: string;
|
|
149
|
-
placeholder: string;
|
|
150
|
-
errorMessage: string;
|
|
151
|
-
fieldHasError: boolean;
|
|
152
|
-
required: boolean;
|
|
153
|
-
styleClassPassthrough: string[];
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface C12nInputCheckboxWithLabel {
|
|
157
|
-
id: string;
|
|
158
|
-
name: string;
|
|
159
|
-
required: string;
|
|
160
|
-
label: string;
|
|
161
|
-
placeholder: string;
|
|
162
|
-
errorMessage: string | string[];
|
|
163
|
-
fieldHasError: boolean;
|
|
164
|
-
styleClassPassthrough: string[];
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface C12nInputRange {
|
|
168
|
-
id: string;
|
|
169
|
-
name: string;
|
|
170
|
-
label: string;
|
|
171
|
-
min: number;
|
|
172
|
-
max: number;
|
|
173
|
-
step: number;
|
|
174
|
-
placeholder: string;
|
|
175
|
-
errorMessage: string;
|
|
176
|
-
fieldHasError: boolean;
|
|
177
|
-
required: boolean;
|
|
178
|
-
styleClassPassthrough: string[];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export interface C12nInputTextCore {
|
|
182
|
-
type: string;
|
|
183
|
-
id: string;
|
|
184
|
-
name: string;
|
|
185
|
-
label: string;
|
|
186
|
-
placeholder: string;
|
|
187
|
-
errorMessage: string;
|
|
188
|
-
fieldHasError: boolean;
|
|
189
|
-
required: boolean;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface InputTextWithLabel {
|
|
193
|
-
type: string;
|
|
194
|
-
id: string;
|
|
195
|
-
name: string;
|
|
196
|
-
label: string;
|
|
197
|
-
placeholder: string;
|
|
198
|
-
errorMessage: string;
|
|
199
|
-
fieldHasError: boolean;
|
|
200
|
-
required: boolean;
|
|
201
|
-
styleClassPassthrough: string[];
|
|
202
|
-
deepCssClassPassthrough: string[];
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface ApiErrorResponse {
|
|
206
|
-
url: string;
|
|
207
|
-
statusCode: number;
|
|
208
|
-
statusMessage: string;
|
|
209
|
-
message: string;
|
|
210
|
-
stack: string;
|
|
211
|
-
data: {
|
|
212
|
-
errors: {
|
|
213
|
-
[key: string]: string | string[]; // Index signature for dynamic keys
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { IFieldsInitialState, IFormFieldsState, IFormFieldsC12, IFormFieldC12, IApiErrorMessages, ICustomErrorMessage, IErrorMessagesArr } from '@/types/types.forms';
|
|
2
|
-
|
|
3
|
-
export interface IZodeFormControl {
|
|
4
|
-
[x: string]: string | boolean | number | URL | object;
|
|
5
|
-
data: IFieldsInitialState;
|
|
6
|
-
validityState: IFormFieldsState;
|
|
7
|
-
dirtyFields: IFormFieldsState;
|
|
8
|
-
focusedField: string;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
isPending: boolean;
|
|
11
|
-
errorCount: number;
|
|
12
|
-
errorMessages: IErrorMessagesArr;
|
|
13
|
-
formFieldsC12: IFormFieldsC12;
|
|
14
|
-
formIsValid: boolean;
|
|
15
|
-
submitAttempted: boolean;
|
|
16
|
-
submitDisabled: boolean;
|
|
17
|
-
submitSuccess: boolean;
|
|
18
|
-
displayErrorMessages: boolean;
|
|
19
|
-
displayLoader: boolean;
|
|
20
|
-
submitSuccessful: boolean;
|
|
21
|
-
}
|