react-input-material 0.0.488 → 0.0.490

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/dist/type.d.ts CHANGED
@@ -16,7 +16,7 @@ import { ThemeProviderProps } from '@rmwc/theme';
16
16
  import { TooltipProps } from '@rmwc/tooltip';
17
17
  import { IconOptions, RipplePropT } from '@rmwc/types';
18
18
  import { Editor as RichTextEditorComponent, IAllProps as RichTextEditorProps } from '@tinymce/tinymce-react';
19
- export declare type GenericAnimateProps = Partial<TransitionProps<HTMLElement | undefined>>;
19
+ export type GenericAnimateProps = Partial<TransitionProps<HTMLElement | undefined>>;
20
20
  export interface GenericAnimateComponent<Type> extends Omit<ForwardRefExoticComponent<GenericAnimateProps>, 'propTypes'>, StaticBaseWebComponent<Type> {
21
21
  (props: (GenericAnimateProps & RefAttributes<HTMLDivElement | HTMLSpanElement>)): ReactElement;
22
22
  }
@@ -71,7 +71,7 @@ export interface CursorState {
71
71
  end: number;
72
72
  start: number;
73
73
  }
74
- export declare type Renderable = Array<ReactElement | string> | ReactElement | string;
74
+ export type Renderable = Array<ReactElement | string> | ReactElement | string;
75
75
  export interface CommonBaseModel {
76
76
  declaration: string;
77
77
  default: unknown;
@@ -134,10 +134,10 @@ export interface BaseProperties extends CommonBaseModel, ModelState {
134
134
  themeConfiguration: ThemeProviderProps['options'];
135
135
  tooltip: string | TooltipProps;
136
136
  }
137
- export declare type BaseProps = Partial<Omit<BaseProperties, 'model'>> & {
137
+ export type BaseProps = Partial<Omit<BaseProperties, 'model'>> & {
138
138
  model?: Partial<BaseModel>;
139
139
  };
140
- export declare type DefaultBaseProperties = Omit<BaseProps, 'model'> & {
140
+ export type DefaultBaseProperties = Omit<BaseProps, 'model'> & {
141
141
  model: BaseModel;
142
142
  };
143
143
  export interface TypedProperties<T = unknown> extends BaseProperties {
@@ -152,11 +152,11 @@ export interface TypedProperties<T = unknown> extends BaseProperties {
152
152
  onFocus: (event: FocusEvent, properties: this) => void;
153
153
  onTouch: (event: GenericEvent, properties: this) => void;
154
154
  }
155
- export declare type Properties<T = unknown> = TypedProperties<T> & CommonModel<T>;
156
- export declare type Props<T = unknown> = Partial<Omit<Properties<T>, 'model'>> & {
155
+ export type Properties<T = unknown> = TypedProperties<T> & CommonModel<T>;
156
+ export type Props<T = unknown> = Partial<Omit<Properties<T>, 'model'>> & {
157
157
  model?: Partial<Model<T>>;
158
158
  };
159
- export declare type DefaultProperties<T = unknown> = Omit<Props<T>, 'model'> & {
159
+ export type DefaultProperties<T = unknown> = Omit<Props<T>, 'model'> & {
160
160
  model: Model<T>;
161
161
  };
162
162
  export interface State<T = unknown> {
@@ -176,8 +176,8 @@ export interface StaticWebComponent<Type, MS = ModelState, DP = DefaultPropertie
176
176
  defaultProperties: DP;
177
177
  strict: boolean;
178
178
  }
179
- export declare type StaticComponent<Type, P = Props, MS = ModelState, DP = DefaultProperties> = Omit<ComponentClass<P>, 'propTypes'> & StaticWebComponent<Type, MS, DP>;
180
- export declare type StaticFunctionComponent<Type, P = Props, MS = ModelState, DP = DefaultProperties> = Omit<FunctionComponent<P>, 'propTypes'> & StaticComponent<Type, P, MS, DP>;
179
+ export type StaticComponent<Type, P = Props, MS = ModelState, DP = DefaultProperties> = Omit<ComponentClass<P>, 'propTypes'> & StaticWebComponent<Type, MS, DP>;
180
+ export type StaticFunctionComponent<Type, P = Props, MS = ModelState, DP = DefaultProperties> = Omit<FunctionComponent<P>, 'propTypes'> & StaticComponent<Type, P, MS, DP>;
181
181
  export interface InputComponent<Type, P = Props, MS = ModelState, DP = DefaultProperties, A = ComponentAdapter<P>> extends Omit<ForwardRefExoticComponent<P>, 'propTypes'>, StaticWebComponent<Type, MS, DP> {
182
182
  (props: P & RefAttributes<A>): ReactElement;
183
183
  }
@@ -194,22 +194,22 @@ export interface CheckboxProperties extends Properties<boolean> {
194
194
  checked: boolean;
195
195
  id: string;
196
196
  }
197
- export declare type CheckboxModel = Model<boolean>;
198
- export declare type CheckboxModelState = ModelState;
199
- export declare type CheckboxValueState = ValueState<boolean, CheckboxModelState>;
200
- export declare type CheckboxProps = Partial<Omit<CheckboxProperties, 'model'>> & {
197
+ export type CheckboxModel = Model<boolean>;
198
+ export type CheckboxModelState = ModelState;
199
+ export type CheckboxValueState = ValueState<boolean, CheckboxModelState>;
200
+ export type CheckboxProps = Partial<Omit<CheckboxProperties, 'model'>> & {
201
201
  model?: Partial<CheckboxModel>;
202
202
  };
203
- export declare type DefaultCheckboxProperties = Omit<CheckboxProps, 'model'> & {
203
+ export type DefaultCheckboxProperties = Omit<CheckboxProps, 'model'> & {
204
204
  model: CheckboxModel;
205
205
  };
206
- export declare type CheckboxState = State<boolean>;
207
- export declare type CheckboxAdapter = ComponentAdapter<CheckboxProperties, Omit<CheckboxState, 'value'>>;
208
- export declare type CheckboxComponent<Type> = InputComponent<Type, CheckboxProps, CheckboxModelState, DefaultCheckboxProperties, CheckboxAdapter>;
206
+ export type CheckboxState = State<boolean>;
207
+ export type CheckboxAdapter = ComponentAdapter<CheckboxProperties, Omit<CheckboxState, 'value'>>;
208
+ export type CheckboxComponent<Type> = InputComponent<Type, CheckboxProps, CheckboxModelState, DefaultCheckboxProperties, CheckboxAdapter>;
209
209
  export declare const checkboxPropertyTypes: PropertiesValidationMap;
210
210
  export declare const defaultCheckboxModel: CheckboxModel;
211
211
  export declare const defaultCheckboxProperties: DefaultCheckboxProperties;
212
- export declare type Transformer<T = unknown> = (value: T, configuration: DefaultInputProperties<T>, transformer: InputDataTransformation) => string;
212
+ export type Transformer<T = unknown> = (value: T, configuration: DefaultInputProperties<T>, transformer: InputDataTransformation) => string;
213
213
  export interface FormatSpecification<T = unknown> {
214
214
  options?: PlainObject;
215
215
  transform?: Transformer<T>;
@@ -223,7 +223,7 @@ export interface DataTransformSpecification<T = unknown, InputType = number | st
223
223
  parse?: (value: InputType, configuration: DefaultInputProperties<T>, transformer: InputDataTransformation) => T;
224
224
  type?: NativeInputType;
225
225
  }
226
- export declare type InputDataTransformation = {
226
+ export type InputDataTransformation = {
227
227
  boolean: DataTransformSpecification<boolean, number | string>;
228
228
  currency: DataTransformSpecification<number, string>;
229
229
  date: DataTransformSpecification<number, Date | number | string>;
@@ -237,7 +237,7 @@ export declare type InputDataTransformation = {
237
237
  } & {
238
238
  [key in Exclude<NativeInputType, 'date' | 'datetime-local' | 'time' | 'number'>]?: DataTransformSpecification<unknown>;
239
239
  };
240
- export declare type NormalizedSelection = Array<Omit<FormattedSelectionOption, 'value'> & {
240
+ export type NormalizedSelection = Array<Omit<FormattedSelectionOption, 'value'> & {
241
241
  value: unknown;
242
242
  }>;
243
243
  export interface InputTablePosition {
@@ -258,8 +258,8 @@ export interface InputModel<T = unknown> extends Model<T> {
258
258
  export interface InputValueState<T = unknown, MS = ModelState> extends ValueState<T, MS> {
259
259
  representation?: ReactNode | string;
260
260
  }
261
- export declare type NativeInputType = ('date' | 'datetime-local' | 'month' | 'number' | 'range' | 'text' | 'time' | 'week');
262
- export declare type GenericInputType = ('boolean' | 'currency' | 'float' | 'integer' | 'string' | 'time-local' | NativeInputType);
261
+ export type NativeInputType = ('date' | 'datetime-local' | 'month' | 'number' | 'range' | 'text' | 'time' | 'week');
262
+ export type GenericInputType = ('boolean' | 'currency' | 'float' | 'integer' | 'string' | 'time-local' | NativeInputType);
263
263
  export interface InputChildrenOptions<P, T> {
264
264
  index: number;
265
265
  normalizedSelection: NormalizedSelection;
@@ -314,13 +314,13 @@ export interface InputProperties<T = unknown> extends InputModelState, Propertie
314
314
  });
315
315
  transformer: RecursivePartial<DataTransformSpecification<T, Date | number | string>>;
316
316
  }
317
- export declare type InputProps<T = unknown> = Partial<Omit<InputProperties<T>, 'model'>> & {
317
+ export type InputProps<T = unknown> = Partial<Omit<InputProperties<T>, 'model'>> & {
318
318
  model?: Partial<InputModel<T>>;
319
319
  };
320
- export declare type DefaultInputProperties<T = string> = Omit<InputProps<T>, 'model'> & {
320
+ export type DefaultInputProperties<T = string> = Omit<InputProps<T>, 'model'> & {
321
321
  model: InputModel<T>;
322
322
  };
323
- export declare type InputPropertyTypes<T = unknown> = {
323
+ export type InputPropertyTypes<T = unknown> = {
324
324
  [key in keyof InputProperties<T>]: ValueOf<typeof PropertyTypes>;
325
325
  };
326
326
  export interface InputState<T = unknown> extends State<T> {
@@ -332,7 +332,7 @@ export interface InputState<T = unknown> extends State<T> {
332
332
  selectionIsUnstable: boolean;
333
333
  showDeclaration: boolean;
334
334
  }
335
- export declare type InputAdapter<T = unknown> = ComponentAdapter<InputProperties<T>, Omit<InputState<T>, 'representation' | 'selectionIsUnstable' | 'value'> & {
335
+ export type InputAdapter<T = unknown> = ComponentAdapter<InputProperties<T>, Omit<InputState<T>, 'representation' | 'selectionIsUnstable' | 'value'> & {
336
336
  representation?: ReactNode | string;
337
337
  value?: null | T;
338
338
  }>;
@@ -367,7 +367,7 @@ export declare const inputRenderProperties: Array<string>;
367
367
  export declare const defaultInputModelState: InputModelState;
368
368
  export declare const defaultInputModel: InputModel<string>;
369
369
  export declare const defaultInputProperties: DefaultInputProperties;
370
- export declare type FileRepresentationType = 'binary' | 'image' | 'renderableText' | 'text' | 'video';
370
+ export type FileRepresentationType = 'binary' | 'image' | 'renderableText' | 'text' | 'video';
371
371
  export interface FileValue {
372
372
  blob?: Partial<Blob> | null;
373
373
  hash?: null | string;
@@ -424,19 +424,19 @@ export interface FileInputProperties extends Properties<FileValue>, FileInputMod
424
424
  type?: string;
425
425
  };
426
426
  }
427
- export declare type FileInputProps = Partial<Omit<FileInputProperties, 'model'>> & {
427
+ export type FileInputProps = Partial<Omit<FileInputProperties, 'model'>> & {
428
428
  model?: Partial<FileInputModel>;
429
429
  };
430
- export declare type DefaultFileInputProperties = Omit<FileInputProps, 'model'> & {
430
+ export type DefaultFileInputProperties = Omit<FileInputProps, 'model'> & {
431
431
  model: FileInputModel;
432
432
  };
433
- export declare type FileInputPropertyTypes = {
433
+ export type FileInputPropertyTypes = {
434
434
  [key in keyof FileInputProperties]: ValueOf<typeof PropertyTypes>;
435
435
  };
436
436
  export interface FileInputState extends State<FileValue> {
437
437
  modelState: FileInputModelState;
438
438
  }
439
- export declare type FileInputAdapter = ComponentAdapter<FileInputProperties, Omit<FileInputState, 'value'> & {
439
+ export type FileInputAdapter = ComponentAdapter<FileInputProperties, Omit<FileInputState, 'value'> & {
440
440
  value?: FileValue | null;
441
441
  }>;
442
442
  export interface FileInputAdapterWithReferences extends FileInputAdapter {
@@ -448,7 +448,7 @@ export interface FileInputAdapterWithReferences extends FileInputAdapter {
448
448
  uploadButtonReference: MutableRefObject<HTMLButtonElement | null>;
449
449
  };
450
450
  }
451
- export declare type FileInputComponent<Type> = InputComponent<Type, FileInputProps, FileInputModelState, DefaultFileInputProperties, FileInputAdapter>;
451
+ export type FileInputComponent<Type> = InputComponent<Type, FileInputProps, FileInputModelState, DefaultFileInputProperties, FileInputAdapter>;
452
452
  export declare const fileInputModelStatePropertyTypes: {
453
453
  [key in keyof FileInputModelState]: Requireable<boolean | symbol>;
454
454
  };
@@ -503,19 +503,19 @@ export interface InputsProperties<T = unknown, P extends InputsPropertiesItem<T>
503
503
  value: Array<P> | null;
504
504
  writable: boolean;
505
505
  }
506
- export declare type InputsProps<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = Partial<Omit<InputsProperties<T, P>, 'model' | 'value'>> & {
506
+ export type InputsProps<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = Partial<Omit<InputsProperties<T, P>, 'model' | 'value'>> & {
507
507
  model?: Partial<InputsModel<T, P>>;
508
508
  value?: Array<Partial<P>> | Array<null | T | undefined> | null;
509
509
  };
510
- export declare type DefaultInputsProperties<T = string, P extends InputsPropertiesItem<T> = InputProps<T>> = Partial<Omit<InputsProperties<T, P>, 'default' | 'model' | 'value'>> & {
510
+ export type DefaultInputsProperties<T = string, P extends InputsPropertiesItem<T> = InputProps<T>> = Partial<Omit<InputsProperties<T, P>, 'default' | 'model' | 'value'>> & {
511
511
  model: InputsModel<T, P>;
512
512
  };
513
- export declare type InputsPropertyTypes<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = {
513
+ export type InputsPropertyTypes<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = {
514
514
  [key in keyof InputsProperties<P>]: ValueOf<typeof PropertyTypes>;
515
515
  };
516
- export declare type InputsState<T = unknown> = State<Array<null | T | undefined>>;
517
- export declare type InputsAdapter<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = ComponentAdapter<InputsProperties<T, P>, InputsState<T>>;
518
- export declare type InputsAdapterWithReferences<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>, RefType = unknown> = InputsAdapter<T, P> & {
516
+ export type InputsState<T = unknown> = State<Array<null | T | undefined>>;
517
+ export type InputsAdapter<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = ComponentAdapter<InputsProperties<T, P>, InputsState<T>>;
518
+ export type InputsAdapterWithReferences<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>, RefType = unknown> = InputsAdapter<T, P> & {
519
519
  references: Array<MutableRefObject<RefType>>;
520
520
  };
521
521
  export interface InputsComponent<Type> extends Omit<ForwardRefExoticComponent<InputsProps>, 'propTypes'>, StaticWebComponent<Type, InputsModelState, DefaultInputsProperties> {
@@ -533,7 +533,7 @@ export interface IntervalConfiguration {
533
533
  end: InputProps<number>;
534
534
  start: InputProps<number>;
535
535
  }
536
- export declare type IntervalModelState = ModelState;
536
+ export type IntervalModelState = ModelState;
537
537
  export interface IntervalModel {
538
538
  name: string;
539
539
  state: IntervalModelState;
@@ -549,7 +549,7 @@ export interface IntervalProperties extends Omit<InputProperties<number>, 'icon'
549
549
  onChangeValue: (value: null | IntervalValue, event?: GenericEvent) => void;
550
550
  value: IntervalConfiguration;
551
551
  }
552
- export declare type IntervalProps = Omit<InputProps<number>, 'icon' | 'model' | 'onChange' | 'onChangeValue' | 'value'> & Partial<{
552
+ export type IntervalProps = Omit<InputProps<number>, 'icon' | 'model' | 'onChange' | 'onChangeValue' | 'value'> & Partial<{
553
553
  end: InputProps<number>;
554
554
  start: InputProps<number>;
555
555
  icon: IntervalProperties['icon'];
@@ -558,13 +558,13 @@ export declare type IntervalProps = Omit<InputProps<number>, 'icon' | 'model' |
558
558
  onChangeValue: IntervalProperties['onChangeValue'];
559
559
  value: IntervalConfiguration | IntervalValue | null;
560
560
  }>;
561
- export declare type DefaultIntervalProperties = Omit<IntervalProps, 'model'> & {
561
+ export type DefaultIntervalProperties = Omit<IntervalProps, 'model'> & {
562
562
  model: IntervalModel;
563
563
  };
564
- export declare type IntervalPropertyTypes = {
564
+ export type IntervalPropertyTypes = {
565
565
  [key in keyof IntervalProperties]: ValueOf<typeof PropertyTypes>;
566
566
  };
567
- export declare type IntervalAdapter = ComponentAdapter<IntervalProperties, {
567
+ export type IntervalAdapter = ComponentAdapter<IntervalProperties, {
568
568
  value?: IntervalValue | null;
569
569
  }>;
570
570
  export interface IntervalAdapterWithReferences extends IntervalAdapter {
@@ -573,7 +573,7 @@ export interface IntervalAdapterWithReferences extends IntervalAdapter {
573
573
  start: MutableRefObject<InputAdapterWithReferences<number> | null>;
574
574
  };
575
575
  }
576
- export declare type IntervalComponent<Type> = InputComponent<Type, IntervalProps, IntervalModelState, DefaultIntervalProperties, IntervalAdapter>;
576
+ export type IntervalComponent<Type> = InputComponent<Type, IntervalProps, IntervalModelState, DefaultIntervalProperties, IntervalAdapter>;
577
577
  export declare const intervalPropertyTypes: PropertiesValidationMap;
578
578
  export declare const defaultIntervalProperties: DefaultIntervalProperties;
579
579
  export interface ConfigurationProperties {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-input-material",
3
- "version": "0.0.488",
3
+ "version": "0.0.490",
4
4
  "description": "Reusable material design based input field with support for (richt-)text, code, selections, numbers, dates and so on.",
5
5
  "keywords": [
6
6
  "form-field",
@@ -232,8 +232,8 @@
232
232
  }
233
233
  },
234
234
  "engines": {
235
- "node": ">=17",
236
- "npm": ">=7"
235
+ "node": ">=19",
236
+ "npm": ">=8"
237
237
  },
238
238
  "resolutions": {
239
239
  "@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz",