@nanahoshi/mona-ui 0.46.0 → 0.48.0

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 (59) hide show
  1. package/docs/api/button.json +1 -1
  2. package/docs/api/button.md +1 -0
  3. package/docs/api/check-box.json +1 -1
  4. package/docs/api/check-box.md +1 -0
  5. package/docs/api/chip.json +1 -1
  6. package/docs/api/chip.md +1 -0
  7. package/docs/api/common.json +1 -1
  8. package/docs/api/common.md +1 -1
  9. package/docs/api/grid.json +1 -1
  10. package/docs/api/grid.md +18 -0
  11. package/docs/api/index.json +1 -1
  12. package/docs/api/radio-button.json +1 -1
  13. package/docs/api/radio-button.md +1 -0
  14. package/docs/api/ripple.json +1 -0
  15. package/docs/api/ripple.md +75 -0
  16. package/docs/api/sidebar.json +1 -1
  17. package/docs/api/sidebar.md +1 -0
  18. package/docs/api/switch.json +1 -1
  19. package/docs/api/switch.md +1 -0
  20. package/docs/grid-rows.md +36 -0
  21. package/docs/grid-server.md +6 -0
  22. package/docs/grid.md +3 -2
  23. package/docs/manifest.json +1 -1
  24. package/docs/ripple.md +360 -0
  25. package/docs/sidebar-menus.md +8 -0
  26. package/fesm2022/{grid-colgroup.component-B4jx10Yi.mjs → grid-colgroup.component-BFbiAvkG.mjs} +2 -2
  27. package/fesm2022/{grid-footer-row.component-CVUltI39.mjs → grid-footer-row.component-DpSu7jvG.mjs} +3 -2
  28. package/fesm2022/{grid-list.component-Cv1KB5VQ.mjs → grid-list.component-B-F4bvFL.mjs} +5 -5
  29. package/fesm2022/{grid-row.component-BauMmps5.mjs → grid-row.component-CuCQ_Z5F.mjs} +37 -9
  30. package/fesm2022/{grid-virtual-list.component-DNjoZfHq.mjs → grid-virtual-list.component-rIz5AUOU.mjs} +31 -12
  31. package/fesm2022/{grid.styles-BJHVTT_v.mjs → grid.styles-D6jP3vwD.mjs} +110 -35
  32. package/fesm2022/nanahoshi-mona-ui-button.mjs +20 -2
  33. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +11 -3
  34. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +30 -5
  35. package/fesm2022/nanahoshi-mona-ui-chip.mjs +13 -0
  36. package/fesm2022/nanahoshi-mona-ui-grid.mjs +16 -20
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +9 -1
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +9 -3
  39. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +12 -4
  40. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +11 -3
  41. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +27 -3
  42. package/fesm2022/nanahoshi-mona-ui-ripple.mjs +196 -0
  43. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +9 -3
  44. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +21 -1
  45. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +5 -1
  46. package/fesm2022/nanahoshi-mona-ui-switch.mjs +28 -3
  47. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +7 -1
  48. package/llms.txt +3 -1
  49. package/package.json +5 -1
  50. package/ripple/package.json +5 -0
  51. package/types/nanahoshi-mona-ui-button.d.ts +8 -1
  52. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  53. package/types/nanahoshi-mona-ui-check-box.d.ts +10 -1
  54. package/types/nanahoshi-mona-ui-chip.d.ts +8 -1
  55. package/types/nanahoshi-mona-ui-grid.d.ts +35 -4
  56. package/types/nanahoshi-mona-ui-radio-button.d.ts +9 -1
  57. package/types/nanahoshi-mona-ui-ripple.d.ts +72 -0
  58. package/types/nanahoshi-mona-ui-sidebar.d.ts +12 -0
  59. package/types/nanahoshi-mona-ui-switch.d.ts +10 -2
@@ -10,6 +10,8 @@ import { cva } from "class-variance-authority";
10
10
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
11
11
  import { createElementControlId } from "@nanahoshi/mona-ui/internal";
12
12
  import { EMPTY, Subject, asapScheduler, interval, switchMap, tap, timer } from "rxjs";
13
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
14
+ import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
13
15
  import { firstOrDefault, select } from "@mirei/ts-collections";
14
16
  import { SortableDirective, SortableItemDirective } from "@nanahoshi/mona-ui/sortable";
15
17
  var TabCloseEvent = class extends PreventableEvent {
@@ -247,6 +249,7 @@ var TabListItemDirective = class TabListItemDirective {
247
249
  this.disabled = input.required(...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
248
250
  this.position = input.required(...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
249
251
  this.size = input.required(...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
252
+ inject(RippleDirective, { self: true }).setHostDisabled(this.disabled);
250
253
  }
251
254
  static {
252
255
  this.ɵfac = i0.ɵɵngDeclareFactory({
@@ -296,6 +299,7 @@ var TabListItemDirective = class TabListItemDirective {
296
299
  }
297
300
  },
298
301
  host: { properties: { "class": "listItemClass()" } },
302
+ hostDirectives: [{ directive: i1.RippleDirective }],
299
303
  ngImport: i0
300
304
  });
301
305
  }
@@ -309,9 +313,11 @@ i0.ɵɵngDeclareClassMetadata({
309
313
  type: Directive,
310
314
  args: [{
311
315
  selector: "li[monaTabListItem]",
312
- host: { "[class]": "listItemClass()" }
316
+ host: { "[class]": "listItemClass()" },
317
+ hostDirectives: [RippleDirective]
313
318
  }]
314
319
  }],
320
+ ctorParameters: () => [],
315
321
  propDecorators: {
316
322
  active: [{
317
323
  type: i0.Input,
package/llms.txt CHANGED
@@ -29,6 +29,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
29
29
  - [Built-in Themes](docs/theming-built-in-themes.md): Mona, Luna, Anna and Rena side by side, and when to use each one.
30
30
  - [Custom Colors](docs/theming-custom-colors.md): Generate a palette from brand colors, override tokens, or let users choose a color.
31
31
  - [Custom Themes](docs/theming-custom-themes.md): Register a theme of your own, from scratch or based on a built-in theme.
32
+ - [Ripple](docs/ripple.md): Turn on a ripple that spreads from where a button is pressed, and add it to your own elements.
32
33
  - [Forms](docs/forms.md): Connect Mona UI controls to Angular signal forms.
33
34
 
34
35
  ## Actions
@@ -208,7 +209,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
208
209
  - [`@nanahoshi/mona-ui/file-upload`](docs/api/file-upload.md): 8 exports, in full.
209
210
  - [`@nanahoshi/mona-ui/filter`](docs/api/filter.md): 7 exports, in full.
210
211
  - [`@nanahoshi/mona-ui/form-field`](docs/api/form-field.md): 6 exports, in full.
211
- - [`@nanahoshi/mona-ui/grid`](docs/api/grid.md): 97 exports, in full.
212
+ - [`@nanahoshi/mona-ui/grid`](docs/api/grid.md): 98 exports, in full.
212
213
  - [`@nanahoshi/mona-ui/i18n`](docs/api/i18n.md): 122 exports, in full.
213
214
  - [`@nanahoshi/mona-ui/kanban`](docs/api/kanban.md): 10 exports, in full.
214
215
  - [`@nanahoshi/mona-ui/label`](docs/api/label.md): 4 exports, in full.
@@ -233,6 +234,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
233
234
  - [`@nanahoshi/mona-ui/query`](docs/api/query.md): 33 exports, in full.
234
235
  - [`@nanahoshi/mona-ui/radio-button`](docs/api/radio-button.md): 4 exports, in full.
235
236
  - [`@nanahoshi/mona-ui/rating`](docs/api/rating.md): 10 exports, in full.
237
+ - [`@nanahoshi/mona-ui/ripple`](docs/api/ripple.md): 5 exports, in full.
236
238
  - [`@nanahoshi/mona-ui/scroll-view`](docs/api/scroll-view.md): 5 exports, in full.
237
239
  - [`@nanahoshi/mona-ui/segmented`](docs/api/segmented.md): 5 exports, in full.
238
240
  - [`@nanahoshi/mona-ui/separator`](docs/api/separator.md): 1 export, in full.
package/package.json CHANGED
@@ -360,6 +360,10 @@
360
360
  "types": "./types/nanahoshi-mona-ui-rating.d.ts",
361
361
  "default": "./fesm2022/nanahoshi-mona-ui-rating.mjs"
362
362
  },
363
+ "./ripple": {
364
+ "types": "./types/nanahoshi-mona-ui-ripple.d.ts",
365
+ "default": "./fesm2022/nanahoshi-mona-ui-ripple.mjs"
366
+ },
363
367
  "./scroll-view": {
364
368
  "types": "./types/nanahoshi-mona-ui-scroll-view.d.ts",
365
369
  "default": "./fesm2022/nanahoshi-mona-ui-scroll-view.mjs"
@@ -548,5 +552,5 @@
548
552
  "default": "./package.json"
549
553
  }
550
554
  },
551
- "version": "0.46.0"
555
+ "version": "0.48.0"
552
556
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-ripple.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-ripple.d.ts",
4
+ "types": "../types/nanahoshi-mona-ui-ripple.d.ts"
5
+ }
@@ -3,6 +3,7 @@ import { InjectionToken, Signal } from "@angular/core";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Subject } from "rxjs";
5
5
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
6
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
6
7
  /**
7
8
  * Values accepted by the `aria-haspopup` input of `ButtonDirective`. `"false"` (the default) omits the attribute.
8
9
  */
@@ -191,7 +192,13 @@ export declare class ButtonDirective implements ButtonVariantsInput {
191
192
  }, {
192
193
  "look": "lookChange";
193
194
  "selected": "selectedChange";
194
- }, never, never, true, never>;
195
+ }, never, never, true, [{
196
+ directive: typeof i1.RippleDirective;
197
+ inputs: {
198
+ "monaRippleDisabled": "monaRippleDisabled";
199
+ };
200
+ outputs: {};
201
+ }]>;
195
202
  }
196
203
  /**
197
204
  * A component whose own buttons join the `mona-button-group` it is placed in, such as a dropdown or split button.
@@ -4,6 +4,7 @@ import { TemplateRef } from "@angular/core";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import { FormValueControl } from "@angular/forms/signals";
6
6
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
7
+ import "@nanahoshi/mona-ui/ripple";
7
8
  import { CalendarView, DateDisabledType } from "@nanahoshi/mona-ui/date-input";
8
9
  interface DecadeCellTemplateContext {
9
10
  /**
@@ -3,6 +3,7 @@ import { ElementRef } from "@angular/core";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { FormCheckboxControl } from "@angular/forms/signals";
5
5
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
6
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
6
7
  declare const checkmarkThemeVariants: (props?: ({
7
8
  rounded?: "small" | "none" | "full" | "large" | "medium" | null | undefined;
8
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -22,6 +23,7 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
22
23
  #private;
23
24
  protected readonly checkBoxClasses: import("@angular/core").Signal<string>;
24
25
  protected readonly checkMarkClasses: import("@angular/core").Signal<string>;
26
+ protected readonly checkMarkRef: import("@angular/core").Signal<ElementRef<HTMLSpanElement> | undefined>;
25
27
  protected readonly containerLabelClasses: import("@angular/core").Signal<string>;
26
28
  protected readonly describedBy: import("@angular/core").Signal<string | null>;
27
29
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
@@ -146,6 +148,7 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
146
148
  * @default ""
147
149
  */
148
150
  readonly userClass: import("@angular/core").InputSignal<string>;
151
+ constructor();
149
152
  /**
150
153
  * @description Moves focus to the native checkbox input.
151
154
  * @param options Options passed to the native `focus()` call, such as `preventScroll`.
@@ -253,7 +256,13 @@ export declare class CheckBoxComponent implements CheckboxVariantInput, Checkmar
253
256
  "inputChange": "inputChange";
254
257
  "inputFocus": "inputFocus";
255
258
  "touch": "touch";
256
- }, never, ["*"], true, never>;
259
+ }, never, ["*"], true, [{
260
+ directive: typeof i1.RippleDirective;
261
+ inputs: {
262
+ "monaRippleDisabled": "monaRippleDisabled";
263
+ };
264
+ outputs: {};
265
+ }]>;
257
266
  }
258
267
  /**
259
268
  * Applies Mona UI styling to a native `<input type="checkbox">`. All native checkbox behaviors — keyboard interaction,
@@ -2,6 +2,7 @@ import * as i0 from "@angular/core";
2
2
  import { ElementRef, TemplateRef } from "@angular/core";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
5
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
5
6
  export declare const CHIP_DEFAULT_MESSAGES: {
6
7
  removeLabel: (label?: string) => string;
7
8
  };
@@ -205,7 +206,13 @@ export declare class ChipComponent implements ChipVariantInputs {
205
206
  "contentClick": "contentClick";
206
207
  "remove": "remove";
207
208
  "selected": "selectedChange";
208
- }, ["prefixTemplate"], ["*"], true, never>;
209
+ }, ["prefixTemplate"], ["*"], true, [{
210
+ directive: typeof i1.RippleDirective;
211
+ inputs: {
212
+ "monaRippleDisabled": "monaRippleDisabled";
213
+ };
214
+ outputs: {};
215
+ }]>;
209
216
  }
210
217
  /**
211
218
  * @description Apply to an `<ng-template>` directly inside `<mona-chip>` to render prefix content
@@ -411,6 +411,16 @@ export interface FilterableOptions {
411
411
  enabled: boolean;
412
412
  type: "menu" | "row" | "menu, row";
413
413
  }
414
+ /** Emitted when the user activates a data row, the way a file list opens an item. */
415
+ interface GridRowActivateEvent<T = Record<PropertyKey, unknown>> {
416
+ /**
417
+ * The double-click or the `Enter` key press, to tell apart a modified one such as `Ctrl+Enter` or
418
+ * `Alt+Enter`, or to find the cell it happened in through its `target`.
419
+ */
420
+ readonly originalEvent: KeyboardEvent | MouseEvent;
421
+ /** The row's item from `data`, the same object. */
422
+ readonly rowData: T;
423
+ }
414
424
  /** The classes a {@link GridRowClass} function adds to a data row. Nullish values add nothing. */
415
425
  type GridRowClassValue = string | readonly string[] | null | undefined;
416
426
  /** Returns the classes to add to the data row that shows the given item. */
@@ -1827,6 +1837,7 @@ declare class GridService {
1827
1837
  readonly renderedBodyRowCount: import("@angular/core").WritableSignal<number>;
1828
1838
  readonly reorderableOptions: import("@angular/core").Signal<ReorderableOptions>;
1829
1839
  readonly resizableOptions: import("@angular/core").Signal<ResizableOptions>;
1840
+ readonly rowActivate$: Subject<GridRowActivateEvent<Record<PropertyKey, unknown>>>;
1830
1841
  readonly rowClass: import("@angular/core").WritableSignal<GridRowClass<unknown> | null>;
1831
1842
  readonly rowDragInProgress: import("@angular/core").Signal<boolean>;
1832
1843
  readonly rowEdit$: Subject<RowEditEvent>;
@@ -1877,12 +1888,12 @@ declare class GridService {
1877
1888
  readonly viewPageRows: import("@angular/core").Signal<ImmutableList<Row>>;
1878
1889
  readonly viewRowCount: import("@angular/core").Signal<number>;
1879
1890
  readonly viewRows: import("@angular/core").Signal<ImmutableList<Row>>;
1880
- readonly virtualGridMaxBuffer: import("@angular/core").Signal<number>;
1881
- readonly virtualGridMinBuffer: import("@angular/core").WritableSignal<number>;
1882
1891
  readonly virtualScrollOptions: import("@angular/core").WritableSignal<VirtualScrollOptions>;
1883
1892
  readonly visibleColumns: import("@angular/core").Signal<ImmutableList<Column>>;
1884
1893
  readonly visibleStructuralColumns: import("@angular/core").Signal<StructuralColumnDescriptor[]>;
1885
1894
  constructor();
1895
+ /** Reports that the user activated a data row. Not while an edit is open, whose keys and clicks are its own. */
1896
+ activateRow(row: Row, originalEvent: KeyboardEvent | MouseEvent): void;
1886
1897
  addGroupColumn(column: Column): void;
1887
1898
  applyState(state: GridState | null, options?: GridStatePersistenceOptions): GridStateLoadResult;
1888
1899
  canReorderRow(row: Row): boolean;
@@ -2055,6 +2066,10 @@ declare class GridService {
2055
2066
  setRowKey(rowKey: GridKeySelector<unknown> | null): void;
2056
2067
  setRowReorderableOptions(options: RowReorderableOptions): void;
2057
2068
  setRowSelected(row: Row, selected: boolean): void;
2069
+ /**
2070
+ * Wraps the data items in rows. Flat data that keeps the items read last time and adds more at the end, as a
2071
+ * list that loads in pages does, keeps its rows: only the new items are read.
2072
+ */
2058
2073
  setRows(value: Iterable<Record<PropertyKey, unknown>>, rowKey?: GridKeySelector<unknown> | null): void;
2059
2074
  setScrollEndThreshold(threshold: number): void;
2060
2075
  /** Replaces the selection options; the feature is on unless `enabled` is `false`. */
@@ -2079,6 +2094,12 @@ declare class GridService {
2079
2094
  updateColumn(columnId: string, patch: Partial<Omit<Column, "id">>): void;
2080
2095
  /** Tells assistive technology why a commit didn't go through. */
2081
2096
  private announceInvalid;
2097
+ /**
2098
+ * Reads only the new items when `items` start with the items read last time, each with the same `rowKey` value,
2099
+ * and add more. Returns false otherwise, for the caller to read them all: the same items given again are read
2100
+ * again, so a field changed in place shows.
2101
+ */
2102
+ private appendRows;
2082
2103
  private applyColumnIndexes;
2083
2104
  private buildGroupAggregates;
2084
2105
  private clearEditSession;
@@ -2107,6 +2128,8 @@ declare class GridService {
2107
2128
  private measureFallbackScrollbarGutter;
2108
2129
  /** Keeps each group's columns together, then moves left-locked columns to the start and right-locked ones to the end. */
2109
2130
  private orderColumnsByLockBucket;
2131
+ /** Wraps an item in a row; a repeated item or key still gets its own identity, so rows never collide. */
2132
+ private readRow;
2110
2133
  private reconcileColumn;
2111
2134
  /** The column's `editable`, with the default (every column but the `rowKey` field) resolved. */
2112
2135
  private resolveEditable;
@@ -2127,6 +2150,7 @@ declare class GridService {
2127
2150
  private updateColumns;
2128
2151
  private validateServerInteger;
2129
2152
  private validateSessionForSave;
2153
+ private warnDuplicateKeys;
2130
2154
  private withColumnIndices;
2131
2155
  static ɵfac: i0.ɵɵFactoryDeclaration<GridService, never>;
2132
2156
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -2282,6 +2306,13 @@ export declare class GridComponent<T> implements GridVariantInput {
2282
2306
  * @default "medium"
2283
2307
  */
2284
2308
  readonly rounded: import("@angular/core").InputSignal<"small" | "none" | "large" | "medium" | null | undefined>;
2309
+ /**
2310
+ * @description Emitted when the user activates a data row, the way a file list opens an item: by
2311
+ * double-clicking it, or by pressing `Enter` on one of its cells where the key has no other use. Editing,
2312
+ * moving into a cell's controls and opening a detail row keep `Enter`. Not emitted for header, group, group
2313
+ * footer, detail or add rows, for a double-click on a control inside a cell, or while an edit is open.
2314
+ */
2315
+ readonly rowActivate: import("@angular/core").OutputEmitterRef<GridRowActivateEvent<T>>;
2285
2316
  /**
2286
2317
  * @description Returns extra CSS classes for the data row that shows an item, merged onto the row's own
2287
2318
  * classes via `tailwind-merge`. It runs again whenever the item's row is rebound.
@@ -2360,7 +2391,6 @@ export declare class GridComponent<T> implements GridVariantInput {
2360
2391
  private setInitialCalculatedWidthOfColumns;
2361
2392
  private setPageSizeEffect;
2362
2393
  private setPagingEffects;
2363
- private setResizeObserver;
2364
2394
  private syncToolbarFocusTargets;
2365
2395
  static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent<any>, never>;
2366
2396
  static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent<any>, "mona-grid", never, {
@@ -2433,6 +2463,7 @@ export declare class GridComponent<T> implements GridVariantInput {
2433
2463
  "expandedKeys": "expandedKeysChange";
2434
2464
  "pageChange": "pageChange";
2435
2465
  "pageSize": "pageSizeChange";
2466
+ "rowActivate": "rowActivate";
2436
2467
  "skip": "skipChange";
2437
2468
  }, ["columnDefinitions", "gridDetailTemplate", "noDataTemplate", "toolbarTemplate"], never, true, never>;
2438
2469
  }
@@ -2497,4 +2528,4 @@ export declare const GRID_DEFAULT_MESSAGES: {
2497
2528
  sortOrder: (position: number) => string;
2498
2529
  toolbar: string;
2499
2530
  };
2500
- export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnFormatFunction, ColumnGroup, ColumnKind, ColumnReorderEvent, ColumnResizeEvent, ColumnSortComparator, ColumnSortEvent, EditableOptions, GridCancelReason, GridCellRange, GridColumnLockedPosition, GridDataState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridKeySelector, GridPdfExportOptions, GridPdfFont, GridPdfFontSource, GridPdfPaperSize, GridRangePasteChange, GridRangePasteEvent, GridRowClass, GridRowClassValue, GridRowCommand, GridSaveOperation, GridToolbarContext, GridToolbarTemplateContext, GridTreeChildren, ReorderableOptions, ResizableOptions, ResizeMethod, Row, RowReorderableOptions };
2531
+ export type { AggregateFunction, Column, ColumnConfig, ColumnFormat, ColumnFormatFunction, ColumnGroup, ColumnKind, ColumnReorderEvent, ColumnResizeEvent, ColumnSortComparator, ColumnSortEvent, EditableOptions, GridCancelReason, GridCellRange, GridColumnLockedPosition, GridDataState, GridEditFormContext, GridEditOperation, GridEditSchemaFactory, GridEditSession, GridEditTemplateContext, GridKeySelector, GridPdfExportOptions, GridPdfFont, GridPdfFontSource, GridPdfPaperSize, GridRangePasteChange, GridRangePasteEvent, GridRowActivateEvent, GridRowClass, GridRowClassValue, GridRowCommand, GridSaveOperation, GridToolbarContext, GridToolbarTemplateContext, GridTreeChildren, ReorderableOptions, ResizableOptions, ResizeMethod, Row, RowReorderableOptions };
@@ -3,6 +3,7 @@ import { ElementRef } from "@angular/core";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { FormValueControl } from "@angular/forms/signals";
5
5
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
6
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
6
7
  declare const radioGroupThemeVariants: (props?: ({
7
8
  orientation?: "horizontal" | "vertical" | null | undefined;
8
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -31,6 +32,7 @@ type RadioButtonDirectiveProps = VariantProps<typeof radioButtonDirectiveThemeVa
31
32
  type RadioButtonDirectiveInput = VariantInputs<RadioButtonDirectiveProps>;
32
33
  export declare class RadioButtonComponent<T = unknown> implements RadioButtonVariantInput, FormValueControl<T> {
33
34
  #private;
35
+ protected readonly circleRef: import("@angular/core").Signal<ElementRef<HTMLSpanElement> | undefined>;
34
36
  protected readonly containerLabelClasses: import("@angular/core").Signal<string>;
35
37
  protected readonly describedBy: import("@angular/core").Signal<string | null>;
36
38
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
@@ -262,7 +264,13 @@ export declare class RadioButtonComponent<T = unknown> implements RadioButtonVar
262
264
  "inputFocus": "inputFocus";
263
265
  "touch": "touch";
264
266
  "value": "valueChange";
265
- }, never, ["*"], true, never>;
267
+ }, never, ["*"], true, [{
268
+ directive: typeof i1.RippleDirective;
269
+ inputs: {
270
+ "monaRippleDisabled": "monaRippleDisabled";
271
+ };
272
+ outputs: {};
273
+ }]>;
266
274
  }
267
275
  export declare class RadioGroupComponent<T = unknown> implements FormValueControl<T> {
268
276
  #private;
@@ -0,0 +1,72 @@
1
+ import * as i0 from "@angular/core";
2
+ import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
3
+ /**
4
+ * @description
5
+ * Draws a ripple when the element is pressed: a wave in its text color that spreads from the pointer, stays while the
6
+ * element is held and fades once it is let go. Mona UI's buttons and other pressable components apply it themselves.
7
+ * It draws nothing until ripples are turned on with `provideRipple()`.
8
+ *
9
+ * The wave covers the element's padding box, over its background and under its content. For that, the first press
10
+ * gives the element `isolation: isolate`, and makes it `relative` if its position is `static`. The wave spreads over
11
+ * `--mona-ripple-duration`, 450ms unless set, fades over `--mona-ripple-fade-duration`, 300ms unless set, and its
12
+ * opacity is `--mona-ripple-opacity`, 12% unless set.
13
+ *
14
+ * There is no ripple on a disabled or `aria-disabled` element, with the system's reduced motion setting, or in forced
15
+ * colors. Keyboard presses have none either: the focus indicator already shows where they act. Nor does a press on a
16
+ * control inside the element, such as a button or a link, which belongs to that control, unless the element is the
17
+ * `<label>` of that control.
18
+ */
19
+ export declare class RippleDirective {
20
+ #private;
21
+ /**
22
+ * @description Turns the ripple off for this element while ripples are on.
23
+ * @default false
24
+ */
25
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
26
+ constructor();
27
+ /**
28
+ * Draws the ripple as a halo around a control inside the element, such as a check box's box, which is too small to
29
+ * show a wave inside it. The halo spreads from the control's centre, reaches past its edges and is drawn under it,
30
+ * in the control itself, so it moves with the control, such as a switch's handle. The control must not clip what
31
+ * overflows it, and its position is made `relative` if it is `static`.
32
+ * @hidden Used by Mona UI's own components.
33
+ */
34
+ setHalo(target: () => HTMLElement | null | undefined): void;
35
+ /**
36
+ * Lets a component that applies this directive as a host directive turn the ripple off, such as a button whose look
37
+ * has no surface to draw it on.
38
+ * @hidden Used by Mona UI's own components.
39
+ */
40
+ setHostDisabled(disabled: Signal<boolean>): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<RippleDirective, never>;
42
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RippleDirective, "[monaRipple]", never, {
43
+ "disabled": {
44
+ "alias": "monaRippleDisabled";
45
+ "required": false;
46
+ "isSignal": true;
47
+ };
48
+ }, {}, never, never, true, never>;
49
+ }
50
+ /**
51
+ * @description Ripple settings. Set them for the application with `provideRipple()`.
52
+ */
53
+ interface RippleOptions {
54
+ /**
55
+ * @description Whether pressing a button, or another element with the `monaRipple` directive, draws a ripple.
56
+ * Ripples are off until `provideRipple()` turns them on.
57
+ */
58
+ readonly enabled: boolean;
59
+ }
60
+ /**
61
+ * Turns on the ripple Mona UI's buttons, and elements with the `monaRipple` directive, draw when pressed. Pass
62
+ * `{ enabled: false }` to keep them off, for example behind a setting.
63
+ */
64
+ export declare function provideRipple(options?: Partial<RippleOptions>): EnvironmentProviders;
65
+ /** The settings used when nothing is provided with `provideRipple()`: no ripples. */
66
+ export declare const DEFAULT_RIPPLE_OPTIONS: RippleOptions;
67
+ /**
68
+ * @description Ripple settings. Set them for the application with `provideRipple()`, or provide this token on a
69
+ * component to turn ripples on or off for everything inside it.
70
+ */
71
+ export declare const RIPPLE_OPTIONS: InjectionToken<RippleOptions>;
72
+ export type { RippleOptions };
@@ -326,6 +326,13 @@ export declare class SidebarMenuSkeletonComponent {
326
326
  * @default true
327
327
  */
328
328
  readonly showIcon: import("@angular/core").InputSignal<boolean>;
329
+ /**
330
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`. Give it the
331
+ * same height and padding as the menu buttons it stands in for when those are restyled, such as
332
+ * `h-7 px-2` for a denser menu, so the rows don't jump when the real ones arrive.
333
+ * @default ""
334
+ */
335
+ readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
329
336
  static ɵfac: i0.ɵɵFactoryDeclaration<SidebarMenuSkeletonComponent, never>;
330
337
  static ɵcmp: i0.ɵɵComponentDeclaration<SidebarMenuSkeletonComponent, "mona-sidebar-menu-skeleton", never, {
331
338
  "labelWidth": {
@@ -338,6 +345,11 @@ export declare class SidebarMenuSkeletonComponent {
338
345
  "required": false;
339
346
  "isSignal": true;
340
347
  };
348
+ "userClass": {
349
+ "alias": "class";
350
+ "required": false;
351
+ "isSignal": true;
352
+ };
341
353
  }, {}, never, never, true, never>;
342
354
  }
343
355
  export declare class SidebarContentDirective {
@@ -1,8 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
- import { TemplateRef } from "@angular/core";
2
+ import { ElementRef, TemplateRef } from "@angular/core";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { FormCheckboxControl } from "@angular/forms/signals";
5
5
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
6
+ import * as i1 from "@nanahoshi/mona-ui/ripple";
6
7
  declare const switchThemeVariants: (props?: ({
7
8
  rounded?: "small" | "none" | "full" | "large" | "medium" | null | undefined;
8
9
  size?: "small" | "large" | "medium" | null | undefined;
@@ -27,6 +28,7 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
27
28
  protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
28
29
  protected readonly handleClasses: import("@angular/core").Signal<string>;
29
30
  protected readonly handleContentTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
31
+ protected readonly handleRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
30
32
  protected readonly invalidState: import("@angular/core").Signal<boolean>;
31
33
  protected readonly labelClasses: import("@angular/core").Signal<string>;
32
34
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
@@ -202,7 +204,13 @@ export declare class SwitchComponent implements SwitchVariantInputs, FormCheckbo
202
204
  }, {
203
205
  "checked": "checkedChange";
204
206
  "touch": "touch";
205
- }, ["handleContentTemplate", "offLabelTemplate", "onLabelTemplate"], never, true, never>;
207
+ }, ["handleContentTemplate", "offLabelTemplate", "onLabelTemplate"], never, true, [{
208
+ directive: typeof i1.RippleDirective;
209
+ inputs: {
210
+ "monaRippleDisabled": "monaRippleDisabled";
211
+ };
212
+ outputs: {};
213
+ }]>;
206
214
  }
207
215
  export interface SwitchHandleContentTemplateContext {
208
216
  readonly $implicit: boolean;