fis-component 0.2.2 → 0.2.3
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/cjs/index.js +92 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Input/InputDate/index.d.ts +13 -1
- package/dist/cjs/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +5 -0
- package/dist/esm/index.js +92 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Input/InputDate/index.d.ts +13 -1
- package/dist/esm/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +5 -0
- package/dist/index.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputFieldProps } from "../InputField";
|
|
2
|
-
import dayjs from "dayjs";
|
|
2
|
+
import dayjs, { Dayjs } from "dayjs";
|
|
3
3
|
import { InputLabelProps } from "../InputLabel";
|
|
4
4
|
export type DatePickerMode = "date" | "month" | "year" | "quarter";
|
|
5
5
|
export interface InputDateProps extends Omit<InputFieldProps, "value" | "onChange">, Partial<InputLabelProps> {
|
|
@@ -49,6 +49,18 @@ export interface InputDateProps extends Omit<InputFieldProps, "value" | "onChang
|
|
|
49
49
|
};
|
|
50
50
|
/**Custom input format*/
|
|
51
51
|
inputReadOnly?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Formats accepted when the user types into the input (strict parsing).
|
|
54
|
+
* Defaults to `format` plus lenient variants: single-digit day/month
|
|
55
|
+
* (e.g. `M/YYYY`) and `/`, `-`, `.` as separators.
|
|
56
|
+
*/
|
|
57
|
+
parseFormats?: string | string[];
|
|
58
|
+
/**
|
|
59
|
+
* Custom parser for typed text. Return a Date for a valid value,
|
|
60
|
+
* `null` for invalid text. Overrides `parseFormats` when provided.
|
|
61
|
+
*/
|
|
62
|
+
parseInput?: (text: string) => Date | null | undefined;
|
|
52
63
|
}
|
|
64
|
+
export declare const parseDateText: (text: string, formats: string | string[]) => Dayjs | null;
|
|
53
65
|
declare const FISInputDate: import("react").ForwardRefExoticComponent<InputDateProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
54
66
|
export default FISInputDate;
|
|
@@ -391,6 +391,10 @@ declare const meta: {
|
|
|
391
391
|
control: "text";
|
|
392
392
|
description: string;
|
|
393
393
|
};
|
|
394
|
+
className: {
|
|
395
|
+
control: "text";
|
|
396
|
+
description: string;
|
|
397
|
+
};
|
|
394
398
|
};
|
|
395
399
|
};
|
|
396
400
|
export default meta;
|
|
@@ -402,3 +406,4 @@ export declare const WithNegative: Story;
|
|
|
402
406
|
export declare const ReadOnly: Story;
|
|
403
407
|
export declare const WithPositive: Story;
|
|
404
408
|
export declare const CustomIcons: Story;
|
|
409
|
+
export declare const CustomClassName: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -4342,6 +4342,17 @@ interface InputDateProps extends Omit<InputFieldProps, "value" | "onChange">, Pa
|
|
|
4342
4342
|
};
|
|
4343
4343
|
/**Custom input format*/
|
|
4344
4344
|
inputReadOnly?: boolean;
|
|
4345
|
+
/**
|
|
4346
|
+
* Formats accepted when the user types into the input (strict parsing).
|
|
4347
|
+
* Defaults to `format` plus lenient variants: single-digit day/month
|
|
4348
|
+
* (e.g. `M/YYYY`) and `/`, `-`, `.` as separators.
|
|
4349
|
+
*/
|
|
4350
|
+
parseFormats?: string | string[];
|
|
4351
|
+
/**
|
|
4352
|
+
* Custom parser for typed text. Return a Date for a valid value,
|
|
4353
|
+
* `null` for invalid text. Overrides `parseFormats` when provided.
|
|
4354
|
+
*/
|
|
4355
|
+
parseInput?: (text: string) => Date | null | undefined;
|
|
4345
4356
|
}
|
|
4346
4357
|
declare const FISInputDate$1: React$1.ForwardRefExoticComponent<InputDateProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
4347
4358
|
|