tcce-design-system-test 0.3.5 → 0.3.6
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.
|
@@ -146,36 +146,15 @@ declare type ColorKey_2 = 'primary' | 'orange' | 'white' | 'gray';
|
|
|
146
146
|
* Helper to create field configurations for common patterns
|
|
147
147
|
*/
|
|
148
148
|
export declare const createFieldConfig: {
|
|
149
|
-
/**
|
|
150
|
-
* Creates a text input field configuration
|
|
151
|
-
*/
|
|
152
149
|
text: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
|
|
153
|
-
/**
|
|
154
|
-
* Creates an email input field configuration
|
|
155
|
-
*/
|
|
156
150
|
email: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
|
|
157
|
-
/**
|
|
158
|
-
* Creates a password input field configuration
|
|
159
|
-
*/
|
|
160
151
|
password: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
|
|
161
|
-
|
|
162
|
-
* Creates a select input field configuration
|
|
163
|
-
*/
|
|
164
|
-
select: (name: string, label: string, options: SelectOption[], config?: Partial<FieldConfig>) => FieldConfig;
|
|
165
|
-
/**
|
|
166
|
-
* Creates a checkbox input field configuration
|
|
167
|
-
*/
|
|
152
|
+
select: (name: string, label: string, optionsArr: SelectOption[], config?: Partial<FieldConfig>) => FieldConfig;
|
|
168
153
|
checkbox: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
|
|
169
|
-
|
|
170
|
-
* Creates a radio group field configuration
|
|
171
|
-
*/
|
|
172
|
-
radio: (name: string, label: string, options: Array<{
|
|
154
|
+
radio: (name: string, label: string, optionsArr: Array<{
|
|
173
155
|
value: string | number;
|
|
174
156
|
label: string;
|
|
175
157
|
}>, config?: Partial<FieldConfig>) => FieldConfig;
|
|
176
|
-
/**
|
|
177
|
-
* Creates a PIN input field configuration
|
|
178
|
-
*/
|
|
179
158
|
pin: (name: string, label: string, length?: number, options?: Partial<FieldConfig>) => FieldConfig;
|
|
180
159
|
};
|
|
181
160
|
|
|
@@ -268,6 +247,13 @@ export declare interface FieldConfig {
|
|
|
268
247
|
rows?: number;
|
|
269
248
|
}
|
|
270
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Tipo to allow partial field configs with optional type (string) for normalization
|
|
252
|
+
*/
|
|
253
|
+
export declare type FieldConfigInput = Omit<FieldConfig, 'type'> & {
|
|
254
|
+
type?: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
271
257
|
export declare const flushedStyles: RuleSet<object>;
|
|
272
258
|
|
|
273
259
|
export declare const FormField: default_2.FC<FormFieldComponentProps>;
|
|
@@ -676,7 +662,7 @@ export declare interface NavigationItem {
|
|
|
676
662
|
* @param fields - Array of field configurations
|
|
677
663
|
* @returns Normalized field configurations with valid types
|
|
678
664
|
*/
|
|
679
|
-
export declare const normalizeFieldTypes: (fields: Array<Partial<
|
|
665
|
+
export declare const normalizeFieldTypes: (fields: Array<Partial<FieldConfigInput> & {
|
|
680
666
|
type?: string;
|
|
681
667
|
}>) => FieldConfig[];
|
|
682
668
|
|