tcce-design-system-test 0.3.4 → 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.
Binary file
Binary file
@@ -15,6 +15,7 @@ import { RemixiconComponentType } from '@remixicon/react';
15
15
  import { RuleSet } from 'styled-components';
16
16
  import { Substitute } from 'styled-components/dist/types';
17
17
  import { toast } from 'sonner';
18
+ import { ToasterProps } from 'sonner';
18
19
 
19
20
  /**
20
21
  * Valid input types supported by the FormField component
@@ -139,40 +140,21 @@ export declare interface CheckboxSpecificProps {
139
140
 
140
141
  declare type ColorKey = 'primary' | 'orange' | 'white' | 'gray';
141
142
 
143
+ declare type ColorKey_2 = 'primary' | 'orange' | 'white' | 'gray';
144
+
142
145
  /**
143
146
  * Helper to create field configurations for common patterns
144
147
  */
145
148
  export declare const createFieldConfig: {
146
- /**
147
- * Creates a text input field configuration
148
- */
149
149
  text: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
150
- /**
151
- * Creates an email input field configuration
152
- */
153
150
  email: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
154
- /**
155
- * Creates a password input field configuration
156
- */
157
151
  password: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
158
- /**
159
- * Creates a select input field configuration
160
- */
161
- select: (name: string, label: string, options: SelectOption[], config?: Partial<FieldConfig>) => FieldConfig;
162
- /**
163
- * Creates a checkbox input field configuration
164
- */
152
+ select: (name: string, label: string, optionsArr: SelectOption[], config?: Partial<FieldConfig>) => FieldConfig;
165
153
  checkbox: (name: string, label: string, options?: Partial<FieldConfig>) => FieldConfig;
166
- /**
167
- * Creates a radio group field configuration
168
- */
169
- radio: (name: string, label: string, options: Array<{
154
+ radio: (name: string, label: string, optionsArr: Array<{
170
155
  value: string | number;
171
156
  label: string;
172
157
  }>, config?: Partial<FieldConfig>) => FieldConfig;
173
- /**
174
- * Creates a PIN input field configuration
175
- */
176
158
  pin: (name: string, label: string, length?: number, options?: Partial<FieldConfig>) => FieldConfig;
177
159
  };
178
160
 
@@ -265,6 +247,13 @@ export declare interface FieldConfig {
265
247
  rows?: number;
266
248
  }
267
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
+
268
257
  export declare const flushedStyles: RuleSet<object>;
269
258
 
270
259
  export declare const FormField: default_2.FC<FormFieldComponentProps>;
@@ -516,7 +505,7 @@ declare interface IconProps {
516
505
  iconProps?: Record<string, unknown>;
517
506
  }
518
507
 
519
- declare type IconSizes = 'tn' | 'sm' | 'md' | 'lg';
508
+ export declare type IconSizes = 'tn' | 'sm' | 'md' | 'lg';
520
509
 
521
510
  export declare const IconWrapperStyles: RuleSet<object>;
522
511
 
@@ -564,6 +553,11 @@ export declare interface InputWithIconsProps extends WithIconsProps {
564
553
  hasRightIcon?: boolean;
565
554
  }
566
555
 
556
+ /**
557
+ * Type guard to check if a string is a valid AllowedInputType
558
+ */
559
+ export declare const isAllowedInputType: (t: string) => t is AllowedInputType;
560
+
567
561
  export declare const Label: default_2.FC<BaseLabelProps>;
568
562
 
569
563
  export declare type LabelSize = 'sm' | 'md' | 'lg';
@@ -668,7 +662,9 @@ export declare interface NavigationItem {
668
662
  * @param fields - Array of field configurations
669
663
  * @returns Normalized field configurations with valid types
670
664
  */
671
- export declare const normalizeFieldTypes: (fields: Partial<FieldConfig>[]) => FieldConfig[];
665
+ export declare const normalizeFieldTypes: (fields: Array<Partial<FieldConfigInput> & {
666
+ type?: string;
667
+ }>) => FieldConfig[];
672
668
 
673
669
  /**
674
670
  * Transforms select options to the expected format
@@ -1033,7 +1029,11 @@ export { toast }
1033
1029
  *
1034
1030
  * @returns The rendered ToastProvider component.
1035
1031
  */
1036
- export declare const ToastProvider: () => JSX.Element;
1032
+ export declare const ToastProvider: ({ spinnerColor, ...props }: ToastProviderProps) => JSX.Element;
1033
+
1034
+ declare type ToastProviderProps = ToasterProps & {
1035
+ spinnerColor?: ColorKey_2;
1036
+ };
1037
1037
 
1038
1038
  /**
1039
1039
  * Validates if a complete code meets certain criteria