@nxgt/material 3.73.0 → 3.75.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 (154) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +10 -7
  3. package/dist/{alert-dialog-A8K8zai1.js → alert-dialog-BfO_ri-N.js} +1 -1
  4. package/dist/{async-slice-B8933IHY.js → async-slice-roMAJVzG.js} +1 -1
  5. package/dist/{background-D1gC4m2R.js → background-Q4Ek3rNy.js} +3 -1
  6. package/dist/backgrounds/css-react/celestial-day.css +85 -0
  7. package/dist/backgrounds/css-react/celestial.css +11 -11
  8. package/dist/backgrounds.js +1 -1
  9. package/dist/{button-C8moFnIT.js → button-DgenqmpS.js} +1 -1
  10. package/dist/charts.js +3 -3
  11. package/dist/{chip-B6AY1E91.js → chip-CiDczNxO.js} +2 -2
  12. package/dist/{code-editor-DQZIKL54.js → code-editor-CohlhFsA.js} +5 -5
  13. package/dist/code-editor.js +5 -5
  14. package/dist/{code-language-items-8VL0aMKG.js → code-language-items-Cs8GLYDp.js} +2 -2
  15. package/dist/components/ui/collections/data-table/data-table-items-actions.css +37 -0
  16. package/dist/components/ui/collections/data-table/data-table-items-chevron.css +28 -0
  17. package/dist/components/ui/collections/data-table/data-table-items-tiles.css +7 -0
  18. package/dist/components/ui/collections/data-table/index.css +5 -1
  19. package/dist/components/ui/display/seat-ring/seat-ring.css +26 -0
  20. package/dist/components/ui/display/secret-card/secret-card.css +5 -1
  21. package/dist/components/ui/feedback/celebration/celebration.css +49 -0
  22. package/dist/components/ui/feedback/feedback.css +4 -0
  23. package/dist/components/ui/feedback/moment/moment.css +22 -0
  24. package/dist/{components-Cvp2F9uk.js → components-zJdfH4im.js} +16930 -16524
  25. package/dist/components.js +28 -28
  26. package/dist/{dialog-WuLTwxkr.js → dialog-AGsB3bv4.js} +4 -4
  27. package/dist/dnd.js +1 -1
  28. package/dist/{dropdown-menu-tadySeGH.js → dropdown-menu-CzR6JP31.js} +1 -1
  29. package/dist/editor.js +10 -10
  30. package/dist/{empty-state-ZYiFSSBQ.js → empty-state-DjHGMp5F.js} +2 -2
  31. package/dist/{field-blur-BYR0yE5L.js → field-blur-CdASxjL7.js} +1 -1
  32. package/dist/{field-blur-context-bEhByoK-.js → field-blur-context-kZ4SD7xu.js} +1 -1
  33. package/dist/{hooks-GpwD8iDu.js → hooks-Dqq8O3Az.js} +2 -2
  34. package/dist/hooks.js +2 -2
  35. package/dist/{hover-card-BowaI_ra.js → hover-card-BPKqte4a.js} +1 -1
  36. package/dist/i18n.js +3 -3
  37. package/dist/{icon-badge-B1B0Lg02.js → icon-badge-B9uvDoyY.js} +3 -3
  38. package/dist/{icon-button-BbGU17cb.js → icon-button-Cr-DyDGg.js} +1 -1
  39. package/dist/lib/backgrounds/background/available.d.ts +4 -4
  40. package/dist/lib/backgrounds/background/background.d.ts +1 -1
  41. package/dist/lib/backgrounds/background/types.d.ts +1 -1
  42. package/dist/lib/components/ui/collections/data-table/layout-types.d.ts +13 -0
  43. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-actions.d.ts +12 -0
  44. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-title.d.ts +2 -1
  45. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +2 -1
  46. package/dist/lib/components/ui/collections/filter/bar/filter-bar-classes.d.ts +2 -2
  47. package/dist/lib/components/ui/collections/filter/bar/filter-bar-view.d.ts +1 -1
  48. package/dist/lib/components/ui/collections/filter/facets/filter-facets.d.ts +1 -1
  49. package/dist/lib/components/ui/collections/filter/query/types.d.ts +6 -0
  50. package/dist/lib/components/ui/collections/filter/query/view-types.d.ts +1 -0
  51. package/dist/lib/components/ui/collections/filter/sections/chips/filter-chip-body.d.ts +1 -1
  52. package/dist/lib/components/ui/collections/filter/sections/filter-search.d.ts +1 -0
  53. package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +8 -0
  54. package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +3 -2
  55. package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-page.d.ts +4 -0
  56. package/dist/lib/components/ui/collections/server-table/server-table-classes.d.ts +8 -2
  57. package/dist/lib/components/ui/collections/server-table/types.d.ts +11 -1
  58. package/dist/lib/components/ui/display/change-history/partials/changes-collapse.d.ts +2 -1
  59. package/dist/lib/components/ui/display/highlighted-text/highlight-ranges.d.ts +11 -0
  60. package/dist/lib/components/ui/display/highlighted-text/highlighted-text.d.ts +16 -0
  61. package/dist/lib/components/ui/display/highlighted-text/index.d.ts +2 -0
  62. package/dist/lib/components/ui/display/index.d.ts +1 -0
  63. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +10 -1
  64. package/dist/lib/components/ui/display/list-tile/partials/list-tile-box.d.ts +16 -0
  65. package/dist/lib/components/ui/display/list-tile/partials/list-tile-classes.d.ts +3 -1
  66. package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +1 -1
  67. package/dist/lib/components/ui/display/list-tile/partials/list-tile-row.d.ts +1 -1
  68. package/dist/lib/components/ui/display/seat-ring/types.d.ts +6 -0
  69. package/dist/lib/components/ui/display/secret-card/types.d.ts +6 -0
  70. package/dist/lib/components/ui/feedback/celebration/celebration.d.ts +24 -0
  71. package/dist/lib/components/ui/feedback/celebration/index.d.ts +1 -0
  72. package/dist/lib/components/ui/feedback/countdown-timer/countdown-ring.d.ts +1 -1
  73. package/dist/lib/components/ui/feedback/countdown-timer/countdown-timer.d.ts +2 -1
  74. package/dist/lib/components/ui/feedback/index.d.ts +2 -0
  75. package/dist/lib/components/ui/feedback/moment/index.d.ts +1 -0
  76. package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +9 -0
  77. package/dist/lib/components/ui/feedback/moment/moment.d.ts +33 -0
  78. package/dist/lib/components/ui/fields/choice-list/choice-list-control.d.ts +17 -0
  79. package/dist/lib/components/ui/fields/choice-list/choice-list-focus.d.ts +7 -0
  80. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  81. package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +11 -0
  82. package/dist/lib/components/ui/fields/quantity-field/quantity-row.d.ts +8 -0
  83. package/dist/lib/components/ui/overlays/command/command-dialog.d.ts +8 -1
  84. package/dist/lib/components/ui/primitives/tabs/tabs-overflow-classes.d.ts +1 -1
  85. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +2 -2
  86. package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-option.d.ts +5 -3
  87. package/dist/lib/components/ui/selection/choice-group/choice-group-root.d.ts +3 -1
  88. package/dist/lib/components/ui/widgets/chat/chat-thread-header-parts.d.ts +17 -0
  89. package/dist/lib/components/ui/widgets/chat/chat-thread-header.d.ts +9 -3
  90. package/dist/lib/components/ui/widgets/chat/proposal/chat-tool-activity.d.ts +3 -1
  91. package/dist/lib/i18n/resources/en/en.d.ts +4 -0
  92. package/dist/lib/i18n/resources/en/material.json.d.ts +5 -1
  93. package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
  94. package/dist/lib/i18n/resources/fr/material.json.d.ts +5 -1
  95. package/dist/lib/i18n/resources/resources.d.ts +8 -0
  96. package/dist/lib/i18n/translator.d.ts +1 -1
  97. package/dist/lib/illustrations-game/index.d.ts +6 -5
  98. package/dist/lib.js +1 -1
  99. package/dist/main.js +42 -42
  100. package/dist/map.js +8 -8
  101. package/dist/material.css +1 -1
  102. package/dist/pdf-reader.js +1 -1
  103. package/dist/print.js +1 -1
  104. package/dist/{public-CFj2qn7l.js → public-DC9VQw4Z.js} +9 -9
  105. package/dist/{rich-code-block-B7Teg7-e.js → rich-code-block-DBSL9zEN.js} +5 -5
  106. package/dist/{sortable-provider-DU2zp_jn.js → sortable-provider-C4tk5esY.js} +2 -2
  107. package/dist/{spinner-C5Kb6MWu.js → spinner-B2MubVWb.js} +1 -1
  108. package/dist/theme-picker.js +2 -2
  109. package/dist/{theme-toggle-B1JZg7mU.js → theme-toggle-BInlu21G.js} +1 -1
  110. package/dist/{toolbar-items-m_1FTFPQ.js → toolbar-items-CRJSx1MU.js} +3 -3
  111. package/dist/{translate-material-D1ndrd7a.js → translate-material-pVlPJ1v4.js} +1 -1
  112. package/dist/{translator-CtEC_AQa.js → translator-BoYCward.js} +10 -2
  113. package/dist/{typography-prQHb3gI.js → typography-B6YMbCge.js} +1 -1
  114. package/dist/{use-chat-composer-BAoUsyKN.js → use-chat-composer-BvWQogJe.js} +2046 -2037
  115. package/dist/{use-heading-spy-Bzj5mIUZ.js → use-heading-spy-B_Z4ArDh.js} +4 -4
  116. package/dist/{use-material-translation-C6H0B4kE.js → use-material-translation-CIS2n3RB.js} +1 -1
  117. package/dist/{use-return-focus-CkUX1HFl.js → use-return-focus-DNQtADAR.js} +1 -1
  118. package/docs/components/data-display.md +60 -6
  119. package/docs/components/data-table-filter-and-lists.md +22 -6
  120. package/docs/components/feedback-and-status.md +69 -1
  121. package/docs/components/form-fields.md +22 -3
  122. package/docs/components/navigation-and-layout.md +1 -1
  123. package/docs/components/overlays-and-menus.md +2 -1
  124. package/docs/components/primitives.md +2 -2
  125. package/docs/components/rich-widgets.md +3 -2
  126. package/docs/components/selection-and-choice.md +3 -3
  127. package/docs/getting-started.md +1 -1
  128. package/docs/guides/app-shell.md +1 -1
  129. package/docs/guides/backgrounds.md +23 -11
  130. package/docs/guides/cards-and-tiles.md +42 -3
  131. package/docs/guides/i18n.md +4 -1
  132. package/docs/guides/icon-motifs.md +7 -7
  133. package/docs/guides/illustrations.md +6 -5
  134. package/docs/guides/theming.md +5 -1
  135. package/docs/previews/backgrounds-day-and-dawn-sky.webp +0 -0
  136. package/docs/previews/data-display-highlightedtext.webp +0 -0
  137. package/docs/previews/feedback-status-illustration-game.webp +0 -0
  138. package/docs/roadmap.md +1 -0
  139. package/docs/troubleshooting.md +44 -4
  140. package/lib/backgrounds/css-react/celestial-day.css +85 -0
  141. package/lib/backgrounds/css-react/celestial.css +11 -11
  142. package/lib/components/ui/collections/data-table/data-table-items-actions.css +37 -0
  143. package/lib/components/ui/collections/data-table/data-table-items-chevron.css +28 -0
  144. package/lib/components/ui/collections/data-table/data-table-items-tiles.css +7 -0
  145. package/lib/components/ui/collections/data-table/index.css +5 -1
  146. package/lib/components/ui/display/seat-ring/seat-ring.css +26 -0
  147. package/lib/components/ui/display/secret-card/secret-card.css +5 -1
  148. package/lib/components/ui/feedback/celebration/celebration.css +49 -0
  149. package/lib/components/ui/feedback/feedback.css +4 -0
  150. package/lib/components/ui/feedback/moment/moment.css +22 -0
  151. package/lib/theme-picker/theme-picker.css +1 -0
  152. package/lib/theme-picker/theme-tile-textures-day.css +43 -0
  153. package/lib/themes/teal.css +20 -18
  154. package/package.json +7 -3
@@ -8,3 +8,7 @@ export declare function ServerTableEmptyPage<T extends RowData>({ props, state,
8
8
  props: ServerTableProps<T>;
9
9
  state: ReturnType<typeof useServerTable<T>>;
10
10
  }): import("react").JSX.Element;
11
+ /** The table's `empty` slot: the empty page, or, without `empty`, nothing, so
12
+ * the table's own default says it (the failure and the past-end page still
13
+ * show). */
14
+ export declare function emptyPageOrDefault<T extends RowData>(props: ServerTableProps<T>, state: ReturnType<typeof useServerTable<T>>): import("react").JSX.Element | undefined;
@@ -1,5 +1,11 @@
1
- /** The list, one surface: the top band, the chips row, then the table. */
2
- export declare const SERVER_TABLE_CLASS = "grid w-full min-w-0 gap-3 bg-background/80 p-4";
1
+ /** The list, one surface: the top band, the chips row, then the table. On a
2
+ * phone it draws no surface and no padding (`max-md:`): the layout owns the
3
+ * page gutter, and a panel around the list would stack a second inset and a
4
+ * card in a card (#2292). */
5
+ export declare const SERVER_TABLE_CLASS = "grid w-full min-w-0 gap-3 bg-background/80 p-4 max-md:bg-transparent max-md:p-0";
6
+ /** `surface: 'none'`: the list sits on its container's surface (a Card, a
7
+ * page section), so it draws no surface and no padding of its own. */
8
+ export declare const SERVER_TABLE_FLUSH_CLASS = "bg-transparent p-0";
3
9
  /** The `DataTable` inside: the surface and its padding are the list's. */
4
10
  export declare const SERVER_TABLE_TABLE_CLASS = "bg-transparent p-0";
5
11
  /** The top band: the title, the search landmark (the bar, the chips row under it), the page's actions; one compact, wrapping row. */
@@ -45,7 +45,13 @@ export type ServerTableProps<T extends RowData> = PassedThrough<T> & ServerTable
45
45
  * `tableFilters(model)`, whether an empty page is "nothing matches", and
46
46
  * what "clear" removes. */
47
47
  filters?: TableFilterBinding;
48
- empty: ServerTableEmpty;
48
+ /** What the empty page says. Optional: omit it when the page answers
49
+ * "nothing yet" and "nothing matches" itself and renders the table only
50
+ * when there are rows. Without it, a table that is still empty falls
51
+ * back to the `DataTable` default ("No data available", or "No results"
52
+ * when filtered); the failure with Retry and the page past the last
53
+ * still show. */
54
+ empty?: ServerTableEmpty;
49
55
  /** The fetch failed. While set, the failure and a Retry (`onRetry`)
50
56
  * replace the rows and the empty page, the footer and the header: the
51
57
  * rows are the previous query's, never shown under an error. It is
@@ -85,5 +91,9 @@ export type ServerTableProps<T extends RowData> = PassedThrough<T> & ServerTable
85
91
  /** Without `filter`: what the live region says once a new query is
86
92
  * answered. Default "N results" (`material.server-table.results`). */
87
93
  resultsLabel?: (count: number) => string;
94
+ /** The list's own surface: `'card'` (default) a translucent background
95
+ * with 16px of padding; `'none'` neither, for a table placed in a Card,
96
+ * a section or any surface that already frames it (no frame in a frame). */
97
+ surface?: 'card' | 'none';
88
98
  className?: string;
89
99
  };
@@ -10,7 +10,8 @@ export declare function useChangesCollapse(changes: ChangeHistoryChange[], after
10
10
  };
11
11
  /**
12
12
  * "N fields changed" ("N fields set" on a creation) with a preview of the
13
- * first names, as a button that expands the list.
13
+ * first names, as a button that expands the list. The preview wraps rather
14
+ * than clips, and the names past the preview are read out after the "+N".
14
15
  */
15
16
  export declare function ChangesToggle({ names, creation, open, onToggle, controls, className, }: {
16
17
  names: ReactNode[];
@@ -0,0 +1,11 @@
1
+ /** `[start, end)` offsets into the original text. */
2
+ export type HighlightRange = readonly [number, number];
3
+ /**
4
+ * Where the words of `query` start a word of `text`, as `[start, end)`
5
+ * offsets into `text` itself, sorted and never overlapping. Case, accents
6
+ * and ligatures are folded (`œ` is `oe`, `æ` is `ae`, `ß` is `ss`), and a
7
+ * query word matches only at the start of a word: `'oeuvre ete'` marks
8
+ * "Œuvre" and "été" in "Œuvres d'été", not the "ete" inside "complete".
9
+ * A blank query has no range.
10
+ */
11
+ export declare function highlightRanges(text: string, query: string, locale?: string): HighlightRange[];
@@ -0,0 +1,16 @@
1
+ import { ComponentProps } from 'react';
2
+ export type HighlightedTextProps = Omit<ComponentProps<'span'>, 'children'> & {
3
+ /** The string to show. */
4
+ text: string;
5
+ /** Search words; each marks the words of `text` it starts. */
6
+ query: string;
7
+ /** Language for lowercasing (the runtime's when omitted). */
8
+ locale?: string;
9
+ };
10
+ /**
11
+ * `text` with the words of `query` in a themed `<mark>`. Case, accents and
12
+ * ligatures are folded (`œ` is `oe`) and a word matches at the start of a
13
+ * word. The text reads the same to a screen reader; forced colours add an
14
+ * underline where a background alone does not show.
15
+ */
16
+ export declare function HighlightedText({ text, query, locale, className, ...props }: HighlightedTextProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './highlight-ranges.js';
2
+ export * from './highlighted-text.js';
@@ -18,6 +18,7 @@ export * from './enrolment-secret/index.js';
18
18
  export * from './entity-header/index.js';
19
19
  export * from './event-chip/index.js';
20
20
  export * from './figure/index.js';
21
+ export * from './highlighted-text/index.js';
21
22
  export * from './list-tile/index.js';
22
23
  export * from './markdown/index.js';
23
24
  export * from './metrics/index.js';
@@ -39,7 +39,7 @@ export type ListTileCommonProps = {
39
39
  * tiles, `m-0 list-none p-0` for divided rows.
40
40
  */
41
41
  as?: 'li';
42
- } & Omit<HTMLAttributes<HTMLElement>, 'children' | 'title' | 'onClick'>;
42
+ } & Omit<HTMLAttributes<HTMLElement>, 'children' | 'title' | 'onClick' | 'content'>;
43
43
  export type ListTileLinkOrButtonProps = {
44
44
  /**
45
45
  * Buttons at the end of the tile, vertically centred, outside the link: a
@@ -58,6 +58,14 @@ export type ListTileLinkOrButtonProps = {
58
58
  * a block, grid or `w-full` flex child.
59
59
  */
60
60
  chips?: ReactNode;
61
+ /**
62
+ * Full-width content under the title row, inside the tile's box: a second
63
+ * line of controls such as an expected value beside an editable field. It
64
+ * sits outside the link or button, above its stretched hit area, so it may
65
+ * hold interactive controls (inputs, buttons) and its clicks never reach the
66
+ * tile's `onClick`. It follows the tile's variant and inset.
67
+ */
68
+ content?: ReactNode;
61
69
  href?: string;
62
70
  /**
63
71
  * A discreet chevron after `trailing`, flipped in right-to-left, decorative
@@ -90,6 +98,7 @@ export type ListTileSwitchProps = {
90
98
  onClick?: never;
91
99
  actions?: never;
92
100
  chips?: never;
101
+ content?: never;
93
102
  chevron?: never;
94
103
  linkComponent?: never;
95
104
  };
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ type ListTileBoxProps = {
3
+ props: HTMLAttributes<HTMLElement>;
4
+ tileAttrs: Record<string, unknown>;
5
+ className: string;
6
+ row: ReactNode;
7
+ actions?: ReactNode;
8
+ hasActions: boolean;
9
+ hasContent: boolean;
10
+ content?: ReactNode;
11
+ disabled?: boolean;
12
+ tight: boolean;
13
+ };
14
+ /** The tile's box around its row, its `actions` and its `content` slot. */
15
+ export declare function ListTileBox({ props, tileAttrs, className, row, actions, hasActions, hasContent, content, disabled, tight, }: ListTileBoxProps): import("react").JSX.Element;
16
+ export {};
@@ -12,9 +12,11 @@ type ListTileClassesOptions = {
12
12
  dense?: boolean;
13
13
  /** `divided` only: a 16px inline inset (`px-4`) in place of 4px (`px-1`). */
14
14
  inset?: boolean;
15
+ /** The tile has `content`: it wraps onto a full-width line under the row. */
16
+ stacked?: boolean;
15
17
  };
16
18
  /** The classes shared by the tile's three elements (link, button, div). */
17
- export declare function listTileClasses({ compact, selected, interactive, disabled, className, split, divided, dense, inset, }: ListTileClassesOptions): string;
19
+ export declare function listTileClasses({ compact, selected, interactive, disabled, className, split, divided, dense, inset, stacked, }: ListTileClassesOptions): string;
18
20
  /**
19
21
  * The row of a tile with `actions` (its link, button or div): it fills the
20
22
  * tile's box except for the actions, and a link or button stretches over the
@@ -1,3 +1,3 @@
1
1
  import { ListTileCommonProps, ListTileLinkOrButtonProps } from '../list-tile.js';
2
2
  /** A link, a button or a plain tile, with or without `actions` beside it. */
3
- export declare function ListTileLine({ title, subtitle, leading, trailing, chips, variant, inset, actions, className, selected, size, href, chevron, linkComponent: ownLink, disabled, onClick, ...props }: ListTileCommonProps & Omit<ListTileLinkOrButtonProps, 'toggle'>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
3
+ export declare function ListTileLine({ title, subtitle, leading, trailing, chips, content, variant, inset, actions, className, selected, size, href, chevron, linkComponent: ownLink, disabled, onClick, ...props }: ListTileCommonProps & Omit<ListTileLinkOrButtonProps, 'toggle'>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
@@ -2,7 +2,7 @@ import { MouseEventHandler, ReactNode } from 'react';
2
2
  import { LinkComponent } from '../../../primitives/link/link-component.js';
3
3
  type Attrs = Record<string, unknown>;
4
4
  /** What stays on the box of a tile with actions: `data-*` and `style` (the class is its own). */
5
- export declare function boxProps(props: Attrs): Attrs;
5
+ export declare function boxProps(props: object): Attrs;
6
6
  type RenderRowOptions = {
7
7
  props: Attrs;
8
8
  tileAttrs: Attrs;
@@ -21,6 +21,12 @@ export type Seat = {
21
21
  badge?: ReactNode;
22
22
  /** Cannot be picked: `aria-disabled`, still reachable by keyboard. */
23
23
  disabled?: boolean;
24
+ /**
25
+ * Eliminated: the seat stays visible but dimmed, its name struck through and
26
+ * its avatar greyed, with the word "Out" (`material.seat-ring.out`) shown and
27
+ * read as part of the seat's name. It stays pickable unless `disabled`.
28
+ */
29
+ out?: boolean;
24
30
  /** Nobody sits here: a dashed placeholder, never selectable. */
25
31
  empty?: boolean;
26
32
  };
@@ -43,6 +43,12 @@ export type SecretCardProps = Omit<ComponentProps<'div'>, 'children' | 'title' |
43
43
  actions?: ReactNode;
44
44
  /** Hides the secret again after this many milliseconds shown. */
45
45
  autoHideMs?: number;
46
+ /**
47
+ * `sm` is the compact card for a phone, where content below must stay in
48
+ * the first viewport: the faces drop their 6rem minimum height and the
49
+ * card's padding and gap tighten (default `default`).
50
+ */
51
+ size?: 'default' | 'sm';
46
52
  /** The card cannot be revealed. A revealed card can always be hidden. */
47
53
  disabled?: boolean;
48
54
  labels?: Partial<SecretCardLabels>;
@@ -0,0 +1,24 @@
1
+ export interface CelebrationProps {
2
+ /**
3
+ * Replays the burst when its value changes (a round number, a timestamp, a
4
+ * key). Unchanged: the burst plays once, on mount, and never again.
5
+ */
6
+ trigger?: unknown;
7
+ /** How many pieces fly out. Default 48. */
8
+ pieces?: number;
9
+ /** How long one burst lasts, in milliseconds. Default 2400. */
10
+ duration?: number;
11
+ /** Called once when a burst has ended (its pieces are gone from the DOM). */
12
+ onComplete?: () => void;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * A one-shot confetti burst for a win or a reveal. It plays once when it
17
+ * mounts and again only when `trigger` changes; it never loops, and it
18
+ * removes its pieces when the burst ends. Pieces are painted with theme
19
+ * tokens, sit in a full-screen layer that ignores the pointer, and are hidden
20
+ * from assistive technology: announce the event in text (a `Moment`, an
21
+ * alert). Under `prefers-reduced-motion` it renders nothing, and it renders
22
+ * nothing on the server.
23
+ */
24
+ export declare function Celebration({ trigger, pieces, duration, onComplete, className, }: CelebrationProps): import("react").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './celebration.js';
@@ -3,5 +3,5 @@ import { CountdownTone } from './countdown-timer.utils.js';
3
3
  export declare function CountdownRing({ tone, fraction, size, }: {
4
4
  tone: CountdownTone;
5
5
  fraction: number;
6
- size: 'sm' | 'md';
6
+ size: 'sm' | 'md' | 'lg';
7
7
  }): import("react").JSX.Element;
@@ -20,7 +20,8 @@ export type CountdownTimerProps = {
20
20
  * announcement then speaks the time only).
21
21
  */
22
22
  warningText?: string | false;
23
- size?: 'sm' | 'md';
23
+ /** 28 px (`sm`), 36 px (`md`) or 56 px (`lg`) high; `lg` is for a countdown that is the focal point of a screen. */
24
+ size?: 'sm' | 'md' | 'lg';
24
25
  } & Omit<ComponentProps<'div'>, 'children'>;
25
26
  /**
26
27
  * A countdown clock: a ring that empties and `m:ss`, amber then red as the
@@ -1,6 +1,7 @@
1
1
  export * from './alert/index.js';
2
2
  export * from './alert-dialog/index.js';
3
3
  export * from './banner/index.js';
4
+ export * from './celebration/index.js';
4
5
  export * from './circular-progress/index.js';
5
6
  export * from './confirm-dialog/index.js';
6
7
  export * from './confirmation-dialog/index.js';
@@ -11,6 +12,7 @@ export * from './empty-state/index.js';
11
12
  export * from './error-state/index.js';
12
13
  export * from './hydrate-loading/index.js';
13
14
  export * from './loading-indicator/index.js';
15
+ export * from './moment/index.js';
14
16
  export * from './notification-row/index.js';
15
17
  export * from './notifications/index.js';
16
18
  export * from './page-load-failed/index.js';
@@ -0,0 +1 @@
1
+ export * from './moment.js';
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ /** What a Moment shows: the picture, the title, the description (or the hint for assistive technology), the action and the close button. */
3
+ export declare function MomentBody({ illustration, title, description, action, closeLabel, }: {
4
+ illustration?: ReactNode;
5
+ title: ReactNode;
6
+ description?: ReactNode;
7
+ action?: ReactNode;
8
+ closeLabel?: string;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ import { Tone } from '../../tones.js';
3
+ export interface MomentProps {
4
+ /** Whether the announcement is on screen. */
5
+ open: boolean;
6
+ /** Called with `false` when it is dismissed: Escape, a tap, the close button, the action or the end of `duration`. */
7
+ onOpenChange: (open: boolean) => void;
8
+ /** Dismisses it by itself after this many milliseconds. Unset: it stays until dismissed. */
9
+ duration?: number;
10
+ /** The picture above the title: a scene, a pictogram, an icon. Decorative (hidden from assistive technology): the title says it all. */
11
+ illustration?: ReactNode;
12
+ /** What happened, and the dialog's accessible name. */
13
+ title: ReactNode;
14
+ /** The line under the title. It sits in a `<p>`: phrasing content only. */
15
+ description?: ReactNode;
16
+ /** A button or a link under the text. A click on it dismisses the Moment after its own handler, unless that handler calls `event.preventDefault()`. */
17
+ action?: ReactNode;
18
+ /** The colour of the meaning: one of the library's tones, or an app's own. Unset: `neutral`. */
19
+ tone?: Tone;
20
+ /** Accessible name of the close button (translated by default). */
21
+ closeLabel?: string;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * A transient full-screen announcement for a dramatic one-off event (a
26
+ * player is eliminated, a role is revealed). It is a modal dialog named by
27
+ * its title and described by its description, so a screen reader announces
28
+ * it as it opens; focus moves into it and goes back to the element that had
29
+ * it when it closes. Escape, a tap anywhere, the close button and the
30
+ * `action` dismiss it, and so does `duration`. It fades in and its picture
31
+ * pops in, none of it under `prefers-reduced-motion`.
32
+ */
33
+ export declare function Moment({ open, onOpenChange, duration, illustration, title, description, action, tone, closeLabel, className, }: MomentProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { useMaterialTranslation } from '../../../../i18n/use-material-translation.js';
2
+ import { ArrayError, useRefusedFocus } from './choice-list-focus.js';
3
+ import { defaultRowLabel } from './choice-list-names.js';
4
+ import { ChoiceListFieldProps, ChoiceRow } from './types.js';
5
+ export type ChoiceListControlProps = Pick<ChoiceListFieldProps, 'min' | 'rowLabel' | 'disabled' | 'onChange'> & {
6
+ selection: NonNullable<ChoiceListFieldProps['selection']>;
7
+ rows: ChoiceRow[];
8
+ error: ArrayError | undefined;
9
+ focus: ReturnType<typeof useRefusedFocus>;
10
+ /** Sets the ids without dirtying the form; absent, they go through `onChange`. */
11
+ setIds?: (next: ChoiceRow[]) => void;
12
+ t: ReturnType<typeof useMaterialTranslation>['t'];
13
+ label: ReturnType<typeof defaultRowLabel>;
14
+ props: Omit<ChoiceListFieldProps, 'value' | 'onChange' | 'onAssignIds' | 'error' | 'rowErrors' | 'onBlur'>;
15
+ };
16
+ /** The list itself, with the group and per-row errors of the field. */
17
+ export declare function ChoiceListControl({ rows, error, focus, setIds, onChange, t, label, min, selection, rowLabel, disabled, props, }: ChoiceListControlProps): import("react").JSX.Element;
@@ -37,6 +37,13 @@ export declare function refusedFocus(handle: FocusHandle, read: {
37
37
  */
38
38
  export declare function useRefusedFocus(error: () => ArrayError | undefined, blank: () => string): {
39
39
  rows: RefObject<readonly ChoiceRow[]>;
40
+ list: RefObject<Element | null>;
40
41
  listRef: (node: Element | null) => void;
41
42
  through: (fieldRef: RefCallback<unknown>) => RefCallback<unknown>;
42
43
  };
44
+ /**
45
+ * The handle React Hook Form gets as the `ref` of a row path
46
+ * (`choices.<i>.text`): `setFocus` and `setError(…, { shouldFocus })` on that
47
+ * path call its `focus()`, which goes to the row's text input.
48
+ */
49
+ export declare function rowFocus(list: RefObject<Element | null>, position: number): FocusHandle;