@zvoove/unity-ui 2.36.0 → 2.37.1

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.
@@ -1019,7 +1019,9 @@ export declare interface DatePickerProps extends Omit<TextFieldProps, 'onChange'
1019
1019
  */
1020
1020
  label: string;
1021
1021
  /**
1022
- * The value of the date picker.
1022
+ * The value of the date picker. <br />
1023
+ * For `mode="month"`, this must be ISO format: `YYYY-MM` or
1024
+ * `YYYY-MM-DD` (e.g. `"2022-05"`) — the day, if present, is ignored.
1023
1025
  */
1024
1026
  value?: string;
1025
1027
  /**
@@ -1077,15 +1079,31 @@ export declare interface DatePickerProps extends Omit<TextFieldProps, 'onChange'
1077
1079
  * - `week` — a whole ISO 8601 calendar week. The input becomes read-only (the
1078
1080
  * week can only be chosen from the popup), clicking any day selects its week,
1079
1081
  * and the selected week is highlighted as a full row.
1082
+ * - `month` — a single month/year pair. The input becomes read-only, and the
1083
+ * popup shows only a month picker (list or card, per `monthView`) with its
1084
+ * own year navigation.
1080
1085
  *
1081
1086
  * @default 'date'
1082
1087
  */
1083
- mode?: 'date' | 'week';
1088
+ mode?: 'date' | 'week' | 'month';
1084
1089
  /**
1085
1090
  * The placeholder shown when `mode="week"` and no week is selected. <br/>
1086
1091
  * If not provided, a locale-aware default is used (e.g. 'KW auswählen' for 'de-DE').
1087
1092
  */
1088
1093
  weekPlaceholder?: string;
1094
+ /**
1095
+ * The placeholder shown when `mode="month"` and no month is selected. <br/>
1096
+ * If not provided, a locale-aware default is used (e.g. 'Monat auswählen' for 'de-DE').
1097
+ */
1098
+ monthPlaceholder?: string;
1099
+ /**
1100
+ * When provided, selecting a month in `mode="month"` calls this callback
1101
+ * with the chosen month/year, as `{ month, year }` where `month` is
1102
+ * 0-indexed (0 = January, 11 = December), matching `Date#getMonth()`.
1103
+ * The dialog closes after selection.
1104
+ * Called with `null` when the selection is cleared via Backspace/Delete.
1105
+ */
1106
+ onMonthChange?: (value: MonthYear | null) => void;
1089
1107
  /**
1090
1108
  * When true, a "KW" column is prepended to the calendar grid showing ISO 8601
1091
1109
  * week numbers. The grid switches from 7 to 8 columns.
@@ -1095,8 +1113,9 @@ export declare interface DatePickerProps extends Omit<TextFieldProps, 'onChange'
1095
1113
  * When provided, clicking any day in a calendar row (or the KW cell) calls this
1096
1114
  * callback with the ISO 8601 week of that row instead of the normal day selection.
1097
1115
  * The dialog closes after selection.
1116
+ * Called with `null` when the selection is cleared via Backspace/Delete.
1098
1117
  */
1099
- onWeekChange?: (week: IsoWeek) => void;
1118
+ onWeekChange?: (week: IsoWeek | null) => void;
1100
1119
  /**
1101
1120
  * Forces the calendar dialog to open above or below the input.
1102
1121
  * When not set, the dialog auto-detects based on available viewport space.
@@ -1112,6 +1131,15 @@ export declare interface DatePickerProps extends Omit<TextFieldProps, 'onChange'
1112
1131
  * @default 'calendar'
1113
1132
  */
1114
1133
  weekView?: 'calendar' | 'list' | 'strip';
1134
+ /**
1135
+ * Controls how the month picker is presented
1136
+ *
1137
+ * - `list` — scrollable list of month names (default).
1138
+ * - `card` — grid of clickable month options.
1139
+ *
1140
+ * @default 'list'
1141
+ */
1142
+ monthView?: 'list' | 'card';
1115
1143
  }
1116
1144
 
1117
1145
  export declare const DEFAULT_ANNOUNCEMENTS: {
@@ -2574,6 +2602,11 @@ export declare type MidSectionMenusProps<T extends ElementType = 'a'> = {
2574
2602
  onItemClick?: (item: ListMenuItem<T>) => void;
2575
2603
  };
2576
2604
 
2605
+ export declare type MonthYear = {
2606
+ month: number;
2607
+ year: number;
2608
+ };
2609
+
2577
2610
  declare type NonNullable_2<T> = Exclude<T, null | undefined>;
2578
2611
  export { NonNullable_2 as NonNullable }
2579
2612