@nanahoshi/mona-ui 0.24.5 → 0.24.7

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.
Files changed (78) hide show
  1. package/README.md +2 -0
  2. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +196 -137
  3. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +14 -4
  4. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +164 -3
  5. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +124 -140
  6. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +205 -202
  7. package/fesm2022/nanahoshi-mona-ui-filter.mjs +233 -231
  8. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-BMCM0W8s.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-vXXNWmEN.mjs} +24 -12
  9. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DDgNmgE0.mjs +208 -0
  10. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-Dzf6Vbs_.mjs +1100 -0
  11. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-C2kf5MwO.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DAPNqnWV.mjs} +34 -21
  12. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Dh42tUui.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-B9rmDLq8.mjs} +2564 -927
  13. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  14. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -8
  15. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +1 -1
  16. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +3 -6
  17. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -8
  18. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -8
  19. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -8
  20. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -8
  21. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -8
  22. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -8
  23. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -8
  24. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -8
  25. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -8
  26. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -8
  27. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -8
  28. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -8
  29. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -8
  30. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +195 -122
  31. package/fesm2022/nanahoshi-mona-ui-pager.mjs +367 -463
  32. package/fesm2022/nanahoshi-mona-ui-query.mjs +317 -122
  33. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +149 -167
  34. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +182 -137
  35. package/i18n/catalogs/en-US.messages.json +36 -11
  36. package/locales/ar-sa/ar-sa.messages.json +33 -8
  37. package/locales/de-de/de-de.messages.json +33 -8
  38. package/locales/es-es/es-es.messages.json +33 -8
  39. package/locales/fr-fr/fr-fr.messages.json +33 -8
  40. package/locales/id-id/id-id.messages.json +33 -8
  41. package/locales/it-it/it-it.messages.json +33 -8
  42. package/locales/ja-jp/ja-jp.messages.json +33 -8
  43. package/locales/ko-kr/ko-kr.messages.json +33 -8
  44. package/locales/pt-br/pt-br.messages.json +33 -8
  45. package/locales/ru-ru/ru-ru.messages.json +33 -8
  46. package/locales/tr-tr/tr-tr.messages.json +33 -8
  47. package/locales/zh-cn/zh-cn.messages.json +33 -8
  48. package/locales/zh-tw/zh-tw.messages.json +33 -8
  49. package/package.json +2 -2
  50. package/types/nanahoshi-mona-ui-calendar.d.ts +30 -11
  51. package/types/nanahoshi-mona-ui-check-box.d.ts +11 -1
  52. package/types/nanahoshi-mona-ui-date-input.d.ts +74 -3
  53. package/types/nanahoshi-mona-ui-date-picker.d.ts +61 -33
  54. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +79 -38
  55. package/types/nanahoshi-mona-ui-filter.d.ts +54 -32
  56. package/types/nanahoshi-mona-ui-grid.d.ts +359 -110
  57. package/types/nanahoshi-mona-ui-i18n.d.ts +47 -6
  58. package/types/nanahoshi-mona-ui-list-view.d.ts +1 -2
  59. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +31 -6
  60. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +31 -6
  61. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +31 -6
  62. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +31 -6
  63. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +31 -6
  64. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +31 -6
  65. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +31 -6
  66. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +31 -6
  67. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +31 -6
  68. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +31 -6
  69. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +31 -6
  70. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +31 -6
  71. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +31 -6
  72. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +57 -16
  73. package/types/nanahoshi-mona-ui-pager.d.ts +159 -76
  74. package/types/nanahoshi-mona-ui-query.d.ts +45 -14
  75. package/types/nanahoshi-mona-ui-time-picker.d.ts +72 -42
  76. package/types/nanahoshi-mona-ui-time-selector.d.ts +78 -46
  77. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-BSlV8Sua.mjs +0 -176
  78. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-CTOdnH29.mjs +0 -946
@@ -189,34 +189,51 @@
189
189
  "isNull": "为 Null",
190
190
  "isNullOrEmpty": "为 Null 或为空",
191
191
  "isTrue": "为真",
192
+ "logic": "组合条件",
193
+ "operator": "运算符",
192
194
  "or": "或",
193
- "startsWith": "开头为"
195
+ "secondOperator": "第二个运算符",
196
+ "secondValue": "第二个值",
197
+ "startsWith": "开头为",
198
+ "value": "值"
194
199
  },
195
200
  "grid": {
196
201
  "all": "(全部)",
197
202
  "apply": "应用",
198
203
  "cancel": "取消",
199
- "cancelRowEdit": "取消编辑行",
204
+ "cancelNewRow": "取消新行",
205
+ "cancelRowEdit": "取消编辑第 {rowNumber} 行",
206
+ "clearFilter": "清除 {column} 的筛选",
207
+ "collapseDetail": "收起第 {rowNumber} 行的详细信息",
208
+ "columnGrouped": "已按 {column} 分组",
209
+ "columnMoved": "{column} 已移至第 {position} 位",
200
210
  "columns": "列",
201
211
  "columnsSelected": "已选择 {count} 列",
212
+ "commandColumnTitle": "命令",
202
213
  "delete": "删除",
203
- "deleteRowConfirmation": "确定要删除此项吗?",
214
+ "deleteRowConfirmation": "确定要删除第 {rowNumber} 行吗?",
204
215
  "deleteRowTitle": "删除行?",
216
+ "details": "详细信息",
205
217
  "dragColumnHeaderToGroup": "拖动列标题到此处进行分组",
206
218
  "edit": "编辑",
207
- "editRow": "编辑行",
219
+ "editRow": "编辑第 {rowNumber} 行",
220
+ "expandDetail": "展开第 {rowNumber} 行的详细信息",
208
221
  "fieldValidationError": "无效值。",
209
222
  "filterByColumn": "按 {column} 筛选",
223
+ "filterByColumnFiltered": "按 {column} 筛选(已筛选)",
224
+ "filterOperator": "{column} 的筛选运算符:{operator}",
210
225
  "filterPlaceholder": "筛选…",
226
+ "group": "分组",
227
+ "loading": "正在加载",
211
228
  "modified": "已修改",
212
229
  "moveAsNext": "移至下一项",
213
230
  "moveAsPrevious": "移至上一项",
214
231
  "moveRow": "移动行",
215
232
  "noData": "没有数据",
216
233
  "remove": "移除",
217
- "removeRow": "移除行",
234
+ "removeRow": "移除第 {rowNumber} 行",
218
235
  "reorderRow": "重新排列第 {rowNumber} 行",
219
- "resizeColumn": "调整列宽",
236
+ "resizeColumn": "调整 {column} 列宽",
220
237
  "rowReorder": "行重新排序",
221
238
  "rowReorderDisabled": "行重新排序已禁用。",
222
239
  "rowReorderDisabledEditing": "请完成编辑后再重新排列行。",
@@ -231,9 +248,12 @@
231
248
  "rowReorderMoved": "已将第 {fromRowNumber} 行移动到位置 {toPosition}。",
232
249
  "rowValidationError": "此行存在验证错误。",
233
250
  "save": "保存",
234
- "saveRow": "保存行",
251
+ "saveNewRow": "保存新行",
252
+ "saveRow": "保存第 {rowNumber} 行",
235
253
  "selectAllRows": "选择所有行",
236
- "selectRow": "选择第 {rowNumber} 行"
254
+ "selectRow": "选择第 {rowNumber} 行",
255
+ "sortOrder": "排序顺序 {position}",
256
+ "toolbar": "表格工具栏"
237
257
  },
238
258
  "list": {
239
259
  "filterList": "筛选列表",
@@ -270,15 +290,20 @@
270
290
  },
271
291
  "pager": {
272
292
  "firstPageLabel": "第一页",
293
+ "itemsPerPageLabel": "每页条数",
273
294
  "jumpBackwardLabel": "后退 {pages} 页",
274
295
  "jumpForwardLabel": "前进 {pages} 页",
275
296
  "lastPageLabel": "最后一页",
276
297
  "nextPageLabel": "下一页",
277
298
  "ofText": "/",
299
+ "pageInputPrefix": "第",
300
+ "pageInputSuffix": "页,共 {totalPages} 页",
278
301
  "pageLabel": "第 {page} 页",
302
+ "pageSelectLabel": "页",
279
303
  "pageSizeLabel": "每页 {pageSize} 条",
280
304
  "pageStatus": "第 {page} 页,共 {totalPages} 页",
281
305
  "pageText": "页",
306
+ "pagerLabel": "分页",
282
307
  "previousPageLabel": "上一页",
283
308
  "rangeStatus": "第 {start} - {end} 项,共 {total} 项"
284
309
  },
@@ -189,34 +189,51 @@
189
189
  "isNull": "為 Null",
190
190
  "isNullOrEmpty": "為 Null 或為空",
191
191
  "isTrue": "為真",
192
+ "logic": "組合條件",
193
+ "operator": "運算子",
192
194
  "or": "或",
193
- "startsWith": "開頭為"
195
+ "secondOperator": "第二個運算子",
196
+ "secondValue": "第二個值",
197
+ "startsWith": "開頭為",
198
+ "value": "值"
194
199
  },
195
200
  "grid": {
196
201
  "all": "(全部)",
197
202
  "apply": "套用",
198
203
  "cancel": "取消",
199
- "cancelRowEdit": "取消編輯資料列",
204
+ "cancelNewRow": "取消新資料列",
205
+ "cancelRowEdit": "取消編輯第 {rowNumber} 個資料列",
206
+ "clearFilter": "清除 {column} 的篩選",
207
+ "collapseDetail": "收合第 {rowNumber} 列的詳細資料",
208
+ "columnGrouped": "已依 {column} 分組",
209
+ "columnMoved": "{column} 已移至第 {position} 位",
200
210
  "columns": "欄",
201
211
  "columnsSelected": "已選取 {count} 欄",
212
+ "commandColumnTitle": "命令",
202
213
  "delete": "刪除",
203
- "deleteRowConfirmation": "確定要刪除此項目嗎?",
214
+ "deleteRowConfirmation": "確定要刪除第 {rowNumber} 個資料列嗎?",
204
215
  "deleteRowTitle": "刪除資料列?",
216
+ "details": "詳細資料",
205
217
  "dragColumnHeaderToGroup": "拖曳欄位標題至此進行群組",
206
218
  "edit": "編輯",
207
- "editRow": "編輯資料列",
219
+ "editRow": "編輯第 {rowNumber} 個資料列",
220
+ "expandDetail": "展開第 {rowNumber} 列的詳細資料",
208
221
  "fieldValidationError": "無效值。",
209
222
  "filterByColumn": "依 {column} 篩選",
223
+ "filterByColumnFiltered": "依 {column} 篩選(已篩選)",
224
+ "filterOperator": "{column} 的篩選運算子:{operator}",
210
225
  "filterPlaceholder": "篩選…",
226
+ "group": "群組",
227
+ "loading": "載入中",
211
228
  "modified": "已修改",
212
229
  "moveAsNext": "移至下一項",
213
230
  "moveAsPrevious": "移至上一項",
214
231
  "moveRow": "移動資料列",
215
232
  "noData": "沒有資料",
216
233
  "remove": "移除",
217
- "removeRow": "移除資料列",
234
+ "removeRow": "移除第 {rowNumber} 個資料列",
218
235
  "reorderRow": "重新排列第 {rowNumber} 個資料列",
219
- "resizeColumn": "調整欄寬",
236
+ "resizeColumn": "調整 {column} 欄寬",
220
237
  "rowReorder": "資料列重新排序",
221
238
  "rowReorderDisabled": "資料列重新排序已停用。",
222
239
  "rowReorderDisabledEditing": "請完成編輯後再重新排列資料列。",
@@ -231,9 +248,12 @@
231
248
  "rowReorderMoved": "已將第 {fromRowNumber} 個資料列移至位置 {toPosition}。",
232
249
  "rowValidationError": "此資料列存在驗證錯誤。",
233
250
  "save": "儲存",
234
- "saveRow": "儲存資料列",
251
+ "saveNewRow": "儲存新資料列",
252
+ "saveRow": "儲存第 {rowNumber} 個資料列",
235
253
  "selectAllRows": "選取所有資料列",
236
- "selectRow": "選取第 {rowNumber} 個資料列"
254
+ "selectRow": "選取第 {rowNumber} 個資料列",
255
+ "sortOrder": "排序順序 {position}",
256
+ "toolbar": "表格工具列"
237
257
  },
238
258
  "list": {
239
259
  "filterList": "篩選清單",
@@ -270,15 +290,20 @@
270
290
  },
271
291
  "pager": {
272
292
  "firstPageLabel": "第一頁",
293
+ "itemsPerPageLabel": "每頁筆數",
273
294
  "jumpBackwardLabel": "後退 {pages} 頁",
274
295
  "jumpForwardLabel": "前進 {pages} 頁",
275
296
  "lastPageLabel": "最後一頁",
276
297
  "nextPageLabel": "下一頁",
277
298
  "ofText": "/",
299
+ "pageInputPrefix": "第",
300
+ "pageInputSuffix": "頁,共 {totalPages} 頁",
278
301
  "pageLabel": "第 {page} 頁",
302
+ "pageSelectLabel": "頁",
279
303
  "pageSizeLabel": "每頁 {pageSize} 筆",
280
304
  "pageStatus": "第 {page} 頁,共 {totalPages} 頁",
281
305
  "pageText": "頁",
306
+ "pagerLabel": "分頁",
282
307
  "previousPageLabel": "上一頁",
283
308
  "rangeStatus": "第 {start} - {end} 項,共 {total} 項"
284
309
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.24.5",
3
+ "version": "0.24.7",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -409,7 +409,7 @@
409
409
  },
410
410
  "dependencies": {
411
411
  "@lucide/angular": "^1.21.0",
412
- "@mirei/ts-collections": "^17.5.6",
412
+ "@mirei/ts-collections": "^18.0.0",
413
413
  "class-variance-authority": "^0.7.1",
414
414
  "culori": "^4.0.2",
415
415
  "d3-hierarchy": "^3.1.2",
@@ -122,6 +122,11 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
122
122
  protected readonly headerMonthYear: _angular_core.Signal<string>;
123
123
  protected readonly headerYear: _angular_core.Signal<string>;
124
124
  protected readonly invalidState: _angular_core.Signal<boolean>;
125
+ /**
126
+ * Whether a day can't be picked: outside `minDate`/`maxDate` or in `disabledDates`. An iterable of disabled
127
+ * dates is turned into a set of day keys once, so each of the 42 cells answers in constant time.
128
+ */
129
+ protected readonly isDayUnavailable: _angular_core.Signal<(date: Date) => boolean>;
125
130
  protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
126
131
  protected readonly monthBounds: _angular_core.Signal<{
127
132
  start: Date;
@@ -138,9 +143,13 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
138
143
  protected readonly prevButtonLabel: _angular_core.Signal<string>;
139
144
  protected readonly rangePreviewDate: _angular_core.WritableSignal<Date | null>;
140
145
  protected readonly rangePreviewDates: _angular_core.Signal<Date[]>;
146
+ protected readonly rangePreviewKeys: _angular_core.Signal<ReadonlySet<string>>;
141
147
  protected readonly selectedDates: _angular_core.WritableSignal<Date[]>;
142
- protected readonly timezone: string;
148
+ protected readonly selectedKeys: _angular_core.Signal<ReadonlySet<string>>;
149
+ /** Today at midnight. Refreshed when focus enters the calendar, so a page left open overnight moves on. */
150
+ protected readonly today: _angular_core.WritableSignal<Date>;
143
151
  protected readonly todayButtonLabel: _angular_core.Signal<string>;
152
+ protected readonly todayUnavailable: _angular_core.Signal<boolean>;
144
153
  protected readonly viewSwitchButtonLabel: _angular_core.Signal<string>;
145
154
  protected readonly weekdays: _angular_core.Signal<{
146
155
  display: string;
@@ -153,7 +162,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
153
162
  /**
154
163
  * @description Sets the disabled state of the calendar.
155
164
  */
156
- readonly disabled: _angular_core.ModelSignal<boolean>;
165
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
157
166
  /**
158
167
  * @description Sets the disabled dates of the calendar.
159
168
  * Accepts either an iterable of Date objects or a predicate function.
@@ -164,12 +173,18 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
164
173
  * @default null
165
174
  */
166
175
  readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek | null>;
176
+ /**
177
+ * @description Moves focus to the active day when the calendar first renders. An inline calendar on a page
178
+ * should leave focus where it is; a calendar that opens in a popup sets this so focus moves into it.
179
+ * @default false
180
+ */
181
+ readonly focusOnMount: _angular_core.InputSignalWithTransform<boolean, unknown>;
167
182
  /**
168
183
  * @description Marks the calendar as invalid. When bound to a signal form field via `[formField]`,
169
184
  * this is written by the `FormField` directive.
170
185
  * @default false
171
186
  */
172
- readonly invalid: _angular_core.InputSignal<boolean>;
187
+ readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
173
188
  /**
174
189
  * @description Sets the maximum date that can be selected.
175
190
  */
@@ -182,13 +197,13 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
182
197
  * @description Sets the readonly state of the calendar.
183
198
  * @default false
184
199
  */
185
- readonly readonly: _angular_core.InputSignal<boolean>;
200
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
186
201
  /**
187
202
  * @description Sets whether the calendar is required. When bound to a signal form field via `[formField]`,
188
203
  * this is written by the `FormField` directive.
189
204
  * @default false
190
205
  */
191
- readonly required: _angular_core.InputSignal<boolean>;
206
+ readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
192
207
  /**
193
208
  * @description Sets the border radius of the calendar.
194
209
  * @default "medium"
@@ -200,8 +215,8 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
200
215
  */
201
216
  readonly selection: _angular_core.InputSignal<CalendarSelection>;
202
217
  /**
203
- * @description Emitted when the calendar value is changed by user interaction.
204
- * The `FormField` directive listens to this to mark the field as touched.
218
+ * @description Emitted when focus leaves the calendar, as a native input is touched on blur. Moving between
219
+ * its buttons and days doesn't count. The `FormField` directive listens to this to mark the field as touched.
205
220
  */
206
221
  readonly touch: _angular_core.OutputEmitterRef<void>;
207
222
  /**
@@ -209,13 +224,14 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
209
224
  * this is written by the `FormField` directive.
210
225
  * @default false
211
226
  */
212
- readonly touched: _angular_core.InputSignal<boolean>;
227
+ readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
213
228
  /**
214
229
  * @description Adds custom CSS classes to the calendar host element.
215
230
  */
216
231
  readonly userClass: _angular_core.InputSignal<string>;
217
232
  /**
218
- * @description The current value of the calendar.
233
+ * @description The current value of the calendar: a `Date` in single selection, the selected dates in multiple
234
+ * selection, and `[start, end]` in range selection. A range is written once both ends are picked.
219
235
  * @default null
220
236
  */
221
237
  readonly value: _angular_core.ModelSignal<Date | Date[] | null>;
@@ -223,18 +239,20 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
223
239
  * @description Enables the display of week numbers in the calendar.
224
240
  * @default false
225
241
  */
226
- readonly weekNumber: _angular_core.InputSignal<boolean>;
242
+ readonly weekNumber: _angular_core.InputSignalWithTransform<boolean, unknown>;
227
243
  constructor();
228
244
  protected formatInteger(value: number): string;
229
245
  protected getWeekNumber(date: Date): number;
230
246
  protected onDayClick(date: Date, event: MouseEvent): void;
231
247
  protected onDayPointerEnter(date: Date): void;
248
+ protected onFocusOut(event: FocusEvent): void;
232
249
  protected onMonthClick(month: number): void;
233
250
  protected onMonthGridPointerLeave(): void;
234
251
  protected onNavigationClick(direction: "prev" | "next"): void;
235
252
  protected onTodayButtonClick(): void;
236
253
  protected onViewChangeClick(view: CalendarView): void;
237
254
  protected onYearClick(year: number): void;
255
+ protected refreshToday(): void;
238
256
  private clearPendingRange;
239
257
  private commitUserSelection;
240
258
  private extendSelection;
@@ -251,6 +269,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
251
269
  private horizontalPeriodDirection;
252
270
  private isDateDisabled;
253
271
  private isEmptyValue;
272
+ private isOutOfRange;
254
273
  private navigateByDaysOrCells;
255
274
  private navigateByPeriod;
256
275
  private navigateByWeeksOrRows;
@@ -266,7 +285,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
266
285
  private switchToUpperView;
267
286
  private toggleFocusedDateInSelection;
268
287
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalendarComponent, never>;
269
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
288
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "focusOnMount": { "alias": "focusOnMount"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
270
289
  }
271
290
 
272
291
  declare const CALENDAR_DEFAULT_MESSAGES: MonaCalendarMessages;
@@ -25,6 +25,16 @@ declare class CheckBoxComponent implements CheckboxVariantInput, CheckmarkVarian
25
25
  protected readonly checkMarkClasses: _angular_core.Signal<string>;
26
26
  protected readonly containerLabelClasses: _angular_core.Signal<string>;
27
27
  protected readonly invalidState: _angular_core.Signal<boolean>;
28
+ /**
29
+ * @description Id of an element that describes the check box, such as an error message.
30
+ * @default ""
31
+ */
32
+ readonly ariaDescribedBy: _angular_core.InputSignal<string>;
33
+ /**
34
+ * @description Accessible name of the check box when it has no visible label.
35
+ * @default ""
36
+ */
37
+ readonly ariaLabel: _angular_core.InputSignal<string>;
28
38
  /**
29
39
  * @description Whether the control is checked.
30
40
  * @default false
@@ -106,7 +116,7 @@ declare class CheckBoxComponent implements CheckboxVariantInput, CheckmarkVarian
106
116
  protected onInputBlur(event: FocusEvent): void;
107
117
  protected onInputChange(event: Event): void;
108
118
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckBoxComponent, never>;
109
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckBoxComponent, "mona-check-box", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelSize": { "alias": "labelSize"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "inputBlur": "inputBlur"; "inputChange": "inputChange"; "inputFocus": "inputFocus"; "touch": "touch"; }, never, ["*"], true, never>;
119
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckBoxComponent, "mona-check-box", never, { "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelSize": { "alias": "labelSize"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "inputBlur": "inputBlur"; "inputChange": "inputChange"; "inputFocus": "inputFocus"; "touch": "touch"; }, never, ["*"], true, never>;
110
120
  }
111
121
 
112
122
  declare class CheckboxDirective implements CheckboxDirectiveVariantInput {
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { PipeTransform } from '@angular/core';
2
+ import { PipeTransform, Signal, WritableSignal, ModelSignal } from '@angular/core';
3
3
  import { Predicate, ImmutableSet } from '@mirei/ts-collections';
4
4
  import { DateTime } from 'luxon';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -7,6 +7,7 @@ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import { Subject } from 'rxjs';
9
9
  import { PreventableEvent } from '@nanahoshi/mona-ui/common';
10
+ import { ValidationError } from '@angular/forms/signals';
10
11
 
11
12
  declare class DateInputPrefixTemplateDirective {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DateInputPrefixTemplateDirective, never>;
@@ -55,5 +56,75 @@ declare const generateHourSet: (hourFormat: HourFormat, meridiem: Meridiem, step
55
56
  declare const generateMinuteSet: (step?: number) => ImmutableSet<TimeUnit>;
56
57
  declare const generateSecondSet: (step?: number) => ImmutableSet<TimeUnit>;
57
58
 
58
- export { CalendarService, DateInputPrefixTemplateDirective, TimeLimiterPipe, TimeSelectorService, datePopupThemeVariants, generateHourSet, generateMinuteSet, generateSecondSet };
59
- export type { CalendarView, DateDisabledType, DatePopupVariantInput, DatePopupVariantProps, HourFormat, Meridiem, TimeUnit };
59
+ /**
60
+ * The clock a locale uses by default: "12" for en-US, ja-JP and ko-KR, "24" for de-DE, fr-FR and tr-TR. Locales that
61
+ * mark the hour cycle explicitly (`en-US-u-hc-h23`) are honoured.
62
+ */
63
+ declare function getLocaleHourFormat(localeId: string): HourFormat;
64
+
65
+ /** Which part of the typed value min, max and `disabledDates` apply to. */
66
+ type TypedDateUnit = "date" | "datetime" | "time";
67
+ interface TypedDateConstraints {
68
+ readonly disabledDates?: DateDisabledType;
69
+ readonly max?: Date | null;
70
+ readonly min?: Date | null;
71
+ readonly unit: TypedDateUnit;
72
+ }
73
+ /** The error a picker reports when the typed text isn't a date in the input format. */
74
+ interface TypedDateParseError extends ValidationError.WithoutFieldTree {
75
+ readonly kind: "parse";
76
+ }
77
+ /** The error a picker reports when the typed date is one of its `disabledDates`. */
78
+ interface DisabledDateError extends ValidationError.WithoutFieldTree {
79
+ readonly date: Date;
80
+ readonly kind: "disabledDate";
81
+ }
82
+ /**
83
+ * Parses text typed into a picker. The input format is tried first, then the same format with one-digit months, days,
84
+ * hours, minutes and seconds ("1/5/2025", "9:05"), then with a two-digit year ("1/5/25"). Two-digit years up to 60
85
+ * read as 20xx, later ones as 19xx.
86
+ * @returns The parsed date, or null when the text isn't a date in any of these forms.
87
+ */
88
+ declare function parseTypedDate(text: string, format: string, localeId: string): DateTime | null;
89
+ /** Whether a date is one of `disabledDates`, compared by day. */
90
+ declare function isDateDisabled(date: Date, disabledDates: DateDisabledType): boolean;
91
+ /**
92
+ * Checks a typed date against a picker's min, max and `disabledDates`, the same limits its popup applies.
93
+ * @returns The error to report, or null when the date is allowed. Range errors are Angular's `minDate` and `maxDate`
94
+ * errors, so they read like the signal-forms validators.
95
+ */
96
+ declare function checkTypedDate(date: Date, constraints: TypedDateConstraints): ValidationError.WithoutFieldTree | null;
97
+ /** The error reported for text that doesn't parse. */
98
+ declare function typedDateParseError(): TypedDateParseError;
99
+ interface TypedDateInputOptions {
100
+ /** The limits the typed date is checked against. */
101
+ readonly constraints: () => TypedDateConstraints;
102
+ /** The format the value is shown in and typed text is parsed with. */
103
+ readonly format: () => string;
104
+ readonly localeId: () => string;
105
+ /** Turns the parsed text into the value, such as putting a typed time on the current value's day. */
106
+ readonly resolve?: (parsed: DateTime, current: Date | null) => Date;
107
+ readonly value: ModelSignal<Date | null>;
108
+ }
109
+ interface TypedDateInput {
110
+ /**
111
+ * Writes the typed text to the value. Text that doesn't parse, or a date outside the limits, leaves the value as
112
+ * it was and is reported through {@link errors}, and to the form field the picker is bound to. Empty text clears
113
+ * the value.
114
+ */
115
+ commit(): void;
116
+ /** Takes text typed into the input. Clearing the input commits at once, so the clear button empties the value. */
117
+ edit(text: string): void;
118
+ /** Parse and limit errors of the last commit. They clear when the value changes. */
119
+ readonly errors: Signal<readonly ValidationError.WithoutFieldTree[]>;
120
+ /** The text in the input: the formatted value, or what the user is typing. */
121
+ readonly text: WritableSignal<string>;
122
+ }
123
+ /**
124
+ * The typed-input pipeline of the date, time and date-time pickers. Call it in an injection context: the errors are
125
+ * reported to the form field (signal forms, `ngModel` or a reactive form control) bound to the picker.
126
+ */
127
+ declare function createTypedDateInput(options: TypedDateInputOptions): TypedDateInput;
128
+
129
+ export { CalendarService, DateInputPrefixTemplateDirective, TimeLimiterPipe, TimeSelectorService, checkTypedDate, createTypedDateInput, datePopupThemeVariants, generateHourSet, generateMinuteSet, generateSecondSet, getLocaleHourFormat, isDateDisabled, parseTypedDate, typedDateParseError };
130
+ export type { CalendarView, DateDisabledType, DatePopupVariantInput, DatePopupVariantProps, DisabledDateError, HourFormat, Meridiem, TimeUnit, TypedDateConstraints, TypedDateInput, TypedDateInputOptions, TypedDateParseError, TypedDateUnit };