fis-component 0.0.77 → 0.0.78

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.
@@ -7,7 +7,7 @@ type Option<T> = {
7
7
  };
8
8
  type CheckboxGroupProps<T extends Value> = {
9
9
  className?: string;
10
- groupLabel: string;
10
+ groupLabel?: string;
11
11
  options: Option<T>[] | readonly Option<T>[];
12
12
  value: T[];
13
13
  direction?: "row" | "column";
@@ -3,3 +3,7 @@ import { InputDateProps } from ".";
3
3
  declare const _default: Meta;
4
4
  export default _default;
5
5
  export declare const Default: (args: InputDateProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const YearPicker: (args: InputDateProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const MonthPicker: (args: InputDateProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const QuarterPicker: (args: InputDateProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const AllModes: (args: InputDateProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { InputFieldProps } from "../InputField";
2
2
  import dayjs from "dayjs";
3
3
  import { InputLabelProps } from "../InputLabel";
4
+ export type DatePickerMode = "date" | "month" | "year" | "quarter";
4
5
  export interface InputDateProps extends Omit<InputFieldProps, "value" | "onChange">, Partial<InputLabelProps> {
5
6
  className?: string | undefined;
6
7
  /**Date value*/
@@ -22,6 +23,26 @@ export interface InputDateProps extends Omit<InputFieldProps, "value" | "onChang
22
23
  minDate?: dayjs.Dayjs | undefined;
23
24
  /**The maximum selectable date. Dates after this value will be disabled.*/
24
25
  maxDate?: dayjs.Dayjs | undefined;
26
+ /**
27
+ * Picker mode - determines what user can select
28
+ * - "date": Full date picker (default)
29
+ * - "month": Month picker only
30
+ * - "year": Year picker only
31
+ * - "quarter": Quarter picker only
32
+ */
33
+ picker?: DatePickerMode;
34
+ /**Allow clear functionality*/
35
+ allowClear?: boolean;
36
+ /**Show today button*/
37
+ showToday?: boolean;
38
+ /**Show time selection*/
39
+ showTime?: boolean;
40
+ /**Auto focus when component mounted*/
41
+ autoFocus?: boolean;
42
+ /**Disabled date function*/
43
+ disabledDate?: (current: dayjs.Dayjs) => boolean;
44
+ /**Custom input format*/
45
+ inputReadOnly?: boolean;
25
46
  }
26
47
  declare const FISInputDate: import("react").ForwardRefExoticComponent<InputDateProps & import("react").RefAttributes<HTMLInputElement>>;
27
48
  export default FISInputDate;
package/dist/index.d.ts CHANGED
@@ -3678,7 +3678,7 @@ type Option<T> = {
3678
3678
  };
3679
3679
  type CheckboxGroupProps<T extends Value> = {
3680
3680
  className?: string;
3681
- groupLabel: string;
3681
+ groupLabel?: string;
3682
3682
  options: Option<T>[] | readonly Option<T>[];
3683
3683
  value: T[];
3684
3684
  direction?: "row" | "column";
@@ -4057,6 +4057,7 @@ interface InputTimeProps extends Omit<InputFieldProps, "onChange">, Partial<Inpu
4057
4057
  }
4058
4058
  declare const FISInputTime: React__default.ForwardRefExoticComponent<InputTimeProps & React__default.RefAttributes<HTMLInputElement>>;
4059
4059
 
4060
+ type DatePickerMode = "date" | "month" | "year" | "quarter";
4060
4061
  interface InputDateProps extends Omit<InputFieldProps, "value" | "onChange">, Partial<InputLabelProps> {
4061
4062
  className?: string | undefined;
4062
4063
  /**Date value*/
@@ -4078,6 +4079,26 @@ interface InputDateProps extends Omit<InputFieldProps, "value" | "onChange">, Pa
4078
4079
  minDate?: dayjs__default.Dayjs | undefined;
4079
4080
  /**The maximum selectable date. Dates after this value will be disabled.*/
4080
4081
  maxDate?: dayjs__default.Dayjs | undefined;
4082
+ /**
4083
+ * Picker mode - determines what user can select
4084
+ * - "date": Full date picker (default)
4085
+ * - "month": Month picker only
4086
+ * - "year": Year picker only
4087
+ * - "quarter": Quarter picker only
4088
+ */
4089
+ picker?: DatePickerMode;
4090
+ /**Allow clear functionality*/
4091
+ allowClear?: boolean;
4092
+ /**Show today button*/
4093
+ showToday?: boolean;
4094
+ /**Show time selection*/
4095
+ showTime?: boolean;
4096
+ /**Auto focus when component mounted*/
4097
+ autoFocus?: boolean;
4098
+ /**Disabled date function*/
4099
+ disabledDate?: (current: dayjs__default.Dayjs) => boolean;
4100
+ /**Custom input format*/
4101
+ inputReadOnly?: boolean;
4081
4102
  }
4082
4103
  declare const FISInputDate: React$1.ForwardRefExoticComponent<InputDateProps & React$1.RefAttributes<HTMLInputElement>>;
4083
4104
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "https://vietdiemtran.github.io/fis-component/",
3
3
  "name": "fis-component",
4
- "version": "0.0.77",
4
+ "version": "0.0.78",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",