@nxgt/material 3.37.0 → 3.39.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 (114) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +1 -1
  3. package/dist/{async-slice-BNI_F0jz.js → async-slice-BtUexP2l.js} +2 -2
  4. package/dist/{button-CB4nSAMd.js → button-CCAYSsgh.js} +1 -1
  5. package/dist/charts.js +3 -3
  6. package/dist/{chip-B6m3yagf.js → chip-Corr637n.js} +1 -1
  7. package/dist/{code-editor-BdiufnpC.js → code-editor-B8_ny_jT.js} +4 -4
  8. package/dist/code-editor.js +4 -4
  9. package/dist/{code-language-items-v5Rnq425.js → code-language-items-1E5Qmfzb.js} +2 -2
  10. package/dist/components/components.css +2 -0
  11. package/dist/components/ui/collections/server-table/server-table-phone-row.css +189 -0
  12. package/dist/{components-mqgqmfvj.js → components-CTKlqX8g.js} +20201 -19716
  13. package/dist/components.js +15 -15
  14. package/dist/{dialog-DR9rACzY.js → dialog-DGlnqBbX.js} +1 -1
  15. package/dist/dnd.js +1 -1
  16. package/dist/{dropdown-menu-CpSnRXd-.js → dropdown-menu-B-buMTGc.js} +1 -1
  17. package/dist/editor.js +7 -7
  18. package/dist/{empty-state-DMr94lsF.js → empty-state-DKgPt475.js} +1 -1
  19. package/dist/hooks.js +2 -2
  20. package/dist/{i18n-provider-A4mI4vc1.js → i18n-provider-Bc7bdIRW.js} +1 -1
  21. package/dist/i18n.js +5 -5
  22. package/dist/{icon-badge-DXEBeS1y.js → icon-badge-BzLsPW3c.js} +1 -1
  23. package/dist/lib/components/ui/collections/data-table/data-table-list-slots.d.ts +12 -0
  24. package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
  25. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +11 -1
  26. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +9 -1
  27. package/dist/lib/components/ui/collections/filter/internal.d.ts +1 -0
  28. package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +10 -0
  29. package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +13 -2
  30. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +6 -2
  31. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk.d.ts +10 -0
  32. package/dist/lib/components/ui/collections/server-table/partials/server-table-phone-row.d.ts +17 -0
  33. package/dist/lib/components/ui/dates/date-field/date-field-content.d.ts +1 -1
  34. package/dist/lib/components/ui/dates/date-field/date-field-popover.d.ts +3 -1
  35. package/dist/lib/components/ui/dates/date-field/date-field-sheet-entry.d.ts +3 -2
  36. package/dist/lib/components/ui/dates/date-field/date-field-surface.d.ts +1 -1
  37. package/dist/lib/components/ui/dates/date-field/date-field-typed.d.ts +3 -3
  38. package/dist/lib/components/ui/dates/date-field/date-field.d.ts +23 -2
  39. package/dist/lib/components/ui/dates/date-field/use-typed-date.d.ts +3 -1
  40. package/dist/lib/components/ui/dates/date-field/use-zoned-content.d.ts +36 -0
  41. package/dist/lib/components/ui/dates/date-range-field/date-range-field.types.d.ts +1 -1
  42. package/dist/lib/components/ui/dates/picker-popover/hero-text.d.ts +1 -0
  43. package/dist/lib/components/ui/dates/picker-trigger/floating-clock.d.ts +7 -0
  44. package/dist/lib/components/ui/dates/picker-trigger/typed-day.d.ts +8 -0
  45. package/dist/lib/components/ui/dates/picker-trigger/use-zoned-date-props.d.ts +38 -0
  46. package/dist/lib/components/ui/dates/picker-trigger/use-zoned-value.d.ts +20 -0
  47. package/dist/lib/components/ui/dates/picker-trigger/zoned-bounds.d.ts +16 -0
  48. package/dist/lib/components/ui/dates/picker-trigger/zoned-matchers.d.ts +8 -0
  49. package/dist/lib/components/ui/dates/time-field/time-field.d.ts +14 -1
  50. package/dist/lib/components/ui/dates/time-field/time-form-field.d.ts +5 -1
  51. package/dist/lib/components/ui/dates/time-field/time-string-field.d.ts +3 -2
  52. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  53. package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +2 -2
  54. package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +1 -1
  55. package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +18 -1
  56. package/dist/lib/components/ui/layout/app-shell/app-breadcrumb.d.ts +20 -4
  57. package/dist/lib/components/ui/layout/app-shell/header-context.d.ts +10 -0
  58. package/dist/lib/components/ui/layout/app-shell/header-title.d.ts +5 -1
  59. package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +21 -2
  60. package/dist/lib/components/ui/primitives/segmented-input/segment-date-time.d.ts +13 -0
  61. package/dist/lib/components/ui/primitives/segmented-input/segment-defs.d.ts +6 -0
  62. package/dist/lib/components/ui/primitives/segmented-input/segment-floating.d.ts +11 -0
  63. package/dist/lib/components/ui/primitives/segmented-input/segment-part.d.ts +19 -0
  64. package/dist/lib/components/ui/selection/chip-group-field/chip-group-columns.d.ts +3 -0
  65. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +28 -5
  66. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.types.d.ts +17 -0
  67. package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-option.d.ts +7 -3
  68. package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-sections.d.ts +13 -0
  69. package/dist/lib/components/ui/selection/choice-group/choice-key-target.d.ts +1 -1
  70. package/dist/lib/components/ui/selection/choice-group/choice-press.d.ts +2 -0
  71. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +3 -1
  72. package/dist/lib/components/ui/selection/choice-group/use-choice-group.d.ts +2 -0
  73. package/dist/lib/components/ui/widgets/event-calendar/event-calendar-events.utils.d.ts +11 -1
  74. package/dist/lib/i18n/resources/en/en.d.ts +2 -0
  75. package/dist/lib/i18n/resources/en/material.json.d.ts +3 -1
  76. package/dist/lib/i18n/resources/fr/fr.d.ts +2 -0
  77. package/dist/lib/i18n/resources/fr/material.json.d.ts +3 -1
  78. package/dist/lib/i18n/resources/resources.d.ts +4 -0
  79. package/dist/lib/i18n/translator.d.ts +1 -1
  80. package/dist/lib/lib/zoned-floating.d.ts +30 -0
  81. package/dist/lib/lib/zoned-instant.d.ts +16 -0
  82. package/dist/lib/lib/zoned.d.ts +11 -4
  83. package/dist/lib.js +1 -1
  84. package/dist/main.js +21 -21
  85. package/dist/map.js +4 -4
  86. package/dist/material.css +1 -1
  87. package/dist/pdf-reader.js +1 -1
  88. package/dist/print.js +2 -2
  89. package/dist/{public-BdJCVnGS.js → public-CNlIuQOj.js} +6 -6
  90. package/dist/{rich-code-block-Bwhfhu7J.js → rich-code-block-Jo0OLy0J.js} +4 -4
  91. package/dist/{sortable-provider-BshacF8v.js → sortable-provider-DgIo378H.js} +3 -2
  92. package/dist/{spinner-CKlDba5I.js → spinner-BTR8rVN9.js} +1 -1
  93. package/dist/{stored-language-CfQGHLq9.js → stored-language-Bbwcy-Pv.js} +6 -2
  94. package/dist/theme-picker.js +2 -2
  95. package/dist/{theme-toggle--Zcf5AM8.js → theme-toggle-DMZ_3HiG.js} +1 -1
  96. package/dist/{toolbar-items-B1W-uVHS.js → toolbar-items-D3SPTgXE.js} +2 -2
  97. package/dist/{translate-material-xDh10aWZ.js → translate-material-CRF13PON.js} +2 -2
  98. package/dist/{translator-BbOZntEF.js → translator-D7AVZCfQ.js} +1 -1
  99. package/dist/{use-chat-composer-C82hvxm4.js → use-chat-composer-D3kvp8Fw.js} +2310 -2184
  100. package/dist/{use-heading-spy-DXYCeegh.js → use-heading-spy-uyhOQV2O.js} +1 -1
  101. package/dist/{use-material-translation-BK2YYCY3.js → use-material-translation-kISeB-fY.js} +2 -2
  102. package/docs/components/data-table-filter-and-lists.md +55 -2
  103. package/docs/components/date-and-time.md +77 -3
  104. package/docs/components/navigation-and-layout.md +4 -2
  105. package/docs/components/selection-and-choice.md +67 -3
  106. package/docs/guides/app-shell.md +91 -2
  107. package/docs/guides/cards-and-tiles.md +5 -0
  108. package/docs/guides/forms.md +2 -2
  109. package/docs/guides/i18n.md +3 -2
  110. package/docs/roadmap.md +5 -1
  111. package/docs/troubleshooting.md +9 -1
  112. package/lib/components/components.css +2 -0
  113. package/lib/components/ui/collections/server-table/server-table-phone-row.css +189 -0
  114. package/package.json +2 -2
@@ -16,8 +16,12 @@ export declare function HeaderTitle({ children, shrinks, }: {
16
16
  * The app bar's titles: the leading `headerTitle`, then the page's title (a
17
17
  * route's `handle.title`, the page's `h1`) after a thin rule when both are set.
18
18
  */
19
- export declare function AppBarTitles({ headerTitle, pageTitle, titleId, }: {
19
+ export declare function AppBarTitles({ headerTitle, pageTitle, pageTitleAfter, headerContext, titleId, }: {
20
20
  headerTitle?: ReactNode;
21
21
  pageTitle?: ReactNode;
22
+ /** The slot right after the page's title, outside its `h1`. */
23
+ pageTitleAfter?: ReactNode;
24
+ /** The small muted context line after the title, from `md` up. */
25
+ headerContext?: ReactNode;
22
26
  titleId?: string;
23
27
  }): import("react").JSX.Element;
@@ -13,6 +13,14 @@ export type PageTitle<Data = unknown> = ReactNode | ((match: UIMatch<Data>) => R
13
13
  export type AppShellHandle<Data = unknown> = {
14
14
  breadcrumb?: (match: UIMatch<Data>) => ReactNode;
15
15
  title?: PageTitle<Data>;
16
+ /**
17
+ * A node rendered right after the page's title in the app bar, outside its
18
+ * `h1` (a record's `Switcher`). A node, or a function of the matched route
19
+ * returning one, as `title` is. The deepest route declaring one wins; the
20
+ * `ActivityLayout` `titleAfter` prop wins over it. Ignored while the bar
21
+ * shows no page title.
22
+ */
23
+ titleAfter?: PageTitle<Data>;
16
24
  };
17
25
  /**
18
26
  * The title of the deepest matched route that declares a `handle.title`, or
@@ -20,6 +28,11 @@ export type AppShellHandle<Data = unknown> = {
20
28
  * anything: the title is in the server HTML, with no client-side effect.
21
29
  */
22
30
  export declare function resolvePageTitle(matches: UIMatch[]): ReactNode;
31
+ /**
32
+ * The `handle.titleAfter` of the deepest matched route that declares one, or
33
+ * `undefined`: resolved like {@link resolvePageTitle}, from the matches.
34
+ */
35
+ export declare function resolvePageTitleAfter(matches: UIMatch[]): ReactNode;
23
36
  /**
24
37
  * The `id` of the page's title in the app bar, or `undefined` when the bar
25
38
  * shows none. `ActivityContent` leaves its own large title out while it does
@@ -28,9 +41,11 @@ export declare function resolvePageTitle(matches: UIMatch[]): ReactNode;
28
41
  */
29
42
  export declare const PageTitleContext: import('react').Context<string | undefined>;
30
43
  /** The layout's page title and the `id` its `h1` and `<main>`'s label share. */
31
- export declare function usePageTitleScope(): {
44
+ export declare function usePageTitleScope(titleAfter?: ReactNode, headerContext?: ReactNode): {
32
45
  pageTitle: ReactNode;
33
46
  titleId: string | undefined;
47
+ pageTitleAfter: ReactNode;
48
+ headerContext: ReactNode;
34
49
  };
35
50
  /** The part of `document` {@link pageStartTarget} reads. */
36
51
  type FocusRoot = Pick<Document, 'getElementById' | 'querySelector'>;
@@ -71,8 +86,12 @@ export declare function usePageTitle(): ReactNode;
71
86
  * leading title does, #629); the accessible name is the content itself.
72
87
  * The display face is `--font-display`, the body face without it.
73
88
  */
74
- export declare function PageHeading({ children, id, }: {
89
+ export declare function PageHeading({ children, id, after, context, }: {
75
90
  children?: ReactNode;
76
91
  id?: string;
92
+ /** The slot right after the title, outside the `h1`: it never truncates, the title does. */
93
+ after?: ReactNode;
94
+ /** The small muted context line (the tenant), last in the row, from `md` up. */
95
+ context?: ReactNode;
77
96
  }): import("react").JSX.Element | null;
78
97
  export {};
@@ -0,0 +1,13 @@
1
+ import { SegmentDef, SegmentValues } from './segment-defs.js';
2
+ /**
3
+ * The segments of a date and a time typed side by side: the locale's date
4
+ * order, then the hours and minutes (and AM / PM on a 12-hour clock).
5
+ */
6
+ export declare function dateTimeSegments(locale: string, cycle: 12 | 24): SegmentDef[];
7
+ /** The date's and the time's segments of `date` on `cycle` (none when there is none). */
8
+ export declare function dateTimeValuesOf(date: Date | undefined, cycle: 12 | 24): SegmentValues;
9
+ /**
10
+ * The date and time the segments make, or `undefined` while any of them is
11
+ * missing or out of its range. The seconds and milliseconds are `base`'s.
12
+ */
13
+ export declare function dateTimeOf(values: SegmentValues, cycle: 12 | 24, base?: Date): Date | undefined;
@@ -19,6 +19,12 @@ export type SegmentDef = {
19
19
  pad?: boolean;
20
20
  /** `false`: ↑ and ↓ stop at the range's ends instead of wrapping. */
21
21
  wrap?: boolean;
22
+ /**
23
+ * The part of the value a segment belongs to (a date and a time typed
24
+ * side by side). On a narrow field the parts wrap whole: the time goes
25
+ * under the date, never half of it.
26
+ */
27
+ part?: 'date' | 'time';
22
28
  };
23
29
  export type SegmentValues = Partial<Record<SegmentKey, number>>;
24
30
  /** The date segments of `locale`, in its order, with its separators. */
@@ -0,0 +1,11 @@
1
+ import { SegmentValues } from './segment-defs.js';
2
+ /** The day, month and year segments of a floating `date`. */
3
+ export declare function floatingDateValuesOf(date: Date | undefined): SegmentValues;
4
+ /** The hour, minute and AM / PM segments of a floating `date` on `cycle`. */
5
+ export declare function floatingTimeValuesOf(date: Date | undefined, cycle: 12 | 24): SegmentValues;
6
+ /** `dateOf` for floating dates: the day the segments make on `base`'s time. */
7
+ export declare function floatingDateOf(values: SegmentValues, base?: Date): Date | undefined;
8
+ /** `timeOf` for floating dates: the time the segments make on `base`'s day. */
9
+ export declare function floatingTimeOf(values: SegmentValues, cycle: 12 | 24, base: Date): Date | undefined;
10
+ /** The date and time the segments make, or `undefined` while one is missing. */
11
+ export declare function floatingDateTimeOf(values: SegmentValues, cycle: 12 | 24, base?: Date): Date | undefined;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { SegmentDef } from './segment-defs.js';
3
+ type Indexed = {
4
+ def: SegmentDef;
5
+ index: number;
6
+ };
7
+ /**
8
+ * The segments in runs of one `part` (a date, then a time), each with its
9
+ * index; segments with no part are runs of one, so they render flat.
10
+ */
11
+ export declare function partsOf(segments: SegmentDef[]): Indexed[][];
12
+ /** Whether the segments are in parts, which wrap whole onto a second row. */
13
+ export declare const hasParts: (segments: SegmentDef[]) => boolean;
14
+ /** A run of segments that stays on one row: a date, a time. A run with no part renders flat. */
15
+ export declare function SegmentPart({ part, children, }: {
16
+ part: Indexed[];
17
+ children: ReactNode;
18
+ }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
19
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ChipGroupColumns } from './chip-group-field.types.js';
2
+ /** The grid classes of `columns`: a number is the same at every width. */
3
+ export declare function chipGroupColumnClasses(columns: ChipGroupColumns): string;
@@ -1,10 +1,31 @@
1
1
  import { ChipSize } from '../../display/chip/chip.variants.js';
2
2
  import { ChoiceGroupBase, ChoiceSelection } from '../choice-group/choice-group.types.js';
3
- import { ChipGroupOption } from './chip-group-field.types.js';
4
- export type { ChipGroupOption };
5
- export type ChipGroupFieldProps = ChoiceGroupBase & ChoiceSelection & {
6
- options: ChipGroupOption[];
3
+ import { ChipGroupColumns, ChipGroupOption, ChipGroupSection } from './chip-group-field.types.js';
4
+ export type { ChipGroupColumns, ChipGroupOption, ChipGroupSection };
5
+ type ChipGroupFieldBase = ChoiceGroupBase & ChoiceSelection & {
7
6
  size?: ChipSize;
7
+ /**
8
+ * Lays the chips out in equal-width columns (`4`, or one count per
9
+ * breakpoint: `{ base: 2, md: 4 }`). Up and Down then move by row. Left
10
+ * unset, the chips flow and wrap.
11
+ */
12
+ columns?: ChipGroupColumns;
13
+ /**
14
+ * Prints a disabled option's `disabledReason` under its chip, so a touch
15
+ * user sees it too. Default `true`; `false` leaves it to the tooltip and
16
+ * the accessible description.
17
+ */
18
+ showDisabledReason?: boolean;
19
+ };
20
+ export type ChipGroupFieldProps = ChipGroupFieldBase & {
21
+ /** The chips, in one flow. Give `options` or `groups`. */
22
+ options?: ChipGroupOption[];
23
+ /**
24
+ * Titled runs of options in one group: each is a `group` named by its
25
+ * heading, and the arrow keys run through all of them in order. Wins over
26
+ * `options` when both are given.
27
+ */
28
+ groups?: ChipGroupSection[];
8
29
  };
9
30
  /**
10
31
  * Chips that choose: one (`type="single"`, the default; a `radiogroup` of
@@ -12,6 +33,8 @@ export type ChipGroupFieldProps = ChoiceGroupBase & ChoiceSelection & {
12
33
  * (`type="multiple"`; a `group` of `checkbox` chips, arrows move the focus,
13
34
  * Space toggles). Enter does nothing, so it never submits a form. A disabled
14
35
  * option, or any unchosen one once `max` is reached, stays focusable and
15
- * says why. The `ref` reaches the chip that holds the tab stop.
36
+ * says why: a disabled option's `disabledReason` is printed under the chip
37
+ * and tied to it by `aria-describedby`. `columns` draws an even grid and
38
+ * `groups` titled sections. The `ref` reaches the chip that holds the tab stop.
16
39
  */
17
40
  export declare function ChipGroupField(props: ChipGroupFieldProps): import("react").JSX.Element;
@@ -6,3 +6,20 @@ export type ChipGroupOption = ChoiceOption & {
6
6
  /** Shown after the label and added to its accessible name. */
7
7
  count?: number;
8
8
  };
9
+ /** A titled run of options, such as "Morning" or "Afternoon". */
10
+ export type ChipGroupSection = {
11
+ /** The heading, and the accessible name of the section's `group`. */
12
+ label: string;
13
+ options: ChipGroupOption[];
14
+ };
15
+ /**
16
+ * Equal-width columns: one number for every width, or one per breakpoint
17
+ * (`sm` 40rem, `md` 48rem, `lg` 64rem), each holding until the next. Counts
18
+ * run from 1 to 12.
19
+ */
20
+ export type ChipGroupColumns = number | {
21
+ base?: number;
22
+ sm?: number;
23
+ md?: number;
24
+ lg?: number;
25
+ };
@@ -10,13 +10,17 @@ export type ChipGroupChipProps = {
10
10
  dataPw: string;
11
11
  /** The field's `name`, on every chip: a lookup by name finds the group. */
12
12
  name?: string;
13
+ /** The chips sit in grid cells: each fills its cell and centres its text. */
14
+ columns?: boolean;
15
+ /** Print a disabled option's reason under the chip. */
16
+ showReason?: boolean;
13
17
  };
14
18
  /**
15
19
  * One chip of a `ChipGroupField`: a `Chip` with the group's role (`radio` or
16
20
  * `checkbox`), `aria-checked`, and the tab stop. A chosen chip swaps its icon
17
21
  * for the chip's own check, so the choice never relies on colour alone. The
18
- * disabled reason (or the description) is its tooltip, and both are read out
19
- * through `aria-describedby`.
22
+ * disabled reason is printed under it (`showReason`, else it is the tooltip),
23
+ * and the reason and the description are read out through `aria-describedby`.
20
24
  */
21
- export declare function ChipGroupChip({ group, option, index, size, dataPw, name, }: ChipGroupChipProps): import("react").JSX.Element;
25
+ export declare function ChipGroupChip({ group, option, index, size, dataPw, name, columns, showReason, }: ChipGroupChipProps): import("react").JSX.Element;
22
26
  export {};
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { ChipGroupOption, ChipGroupSection } from '../chip-group-field.types.js';
3
+ /**
4
+ * The titled sections of a `ChipGroupField`: each a `group` named by its
5
+ * heading, its chips in a wrapping row or the field's grid. The chips keep
6
+ * the field-wide index, so one arrow-key sequence runs through all of them.
7
+ */
8
+ export declare function ChipGroupSections({ groupId, sections, gridClasses, renderChip, }: {
9
+ groupId: string;
10
+ sections: ChipGroupSection[];
11
+ gridClasses?: string;
12
+ renderChip: (option: ChipGroupOption, index: number) => ReactNode;
13
+ }): import("react").JSX.Element[];
@@ -7,4 +7,4 @@ import { ChoiceOption } from './choice-group.types.js';
7
7
  * items wrap, as RadioGroup's do. Answers the index the focus moved to,
8
8
  * or `null` when it did not move.
9
9
  */
10
- export declare function choiceKeyTarget(event: KeyboardEvent<HTMLElement>, items: (HTMLElement | null)[], options: ChoiceOption[], disabled?: boolean): number | null;
10
+ export declare function choiceKeyTarget(event: KeyboardEvent<HTMLElement>, items: (HTMLElement | null)[], options: ChoiceOption[], disabled?: boolean, grid?: boolean): number | null;
@@ -6,6 +6,8 @@ export type ChoiceContext = {
6
6
  selection: ChoiceSelection;
7
7
  disabled?: boolean;
8
8
  max?: number;
9
+ /** Up and Down move by row, the options being laid out in a grid. */
10
+ grid?: boolean;
9
11
  };
10
12
  /**
11
13
  * Presses option `index`: a no-op when the group is disabled, or the option
@@ -5,7 +5,9 @@ import { ChoiceGroupBase, ChoiceOption, ChoiceSelection } from './choice-group.t
5
5
  * left for the root element. The field takes its own props (`options`,
6
6
  * `size`, `columns`...) out first and passes the common rest.
7
7
  */
8
- export declare function useChoiceGroupField(props: ChoiceGroupBase<HTMLButtonElement> & ChoiceSelection, options: ChoiceOption[]): {
8
+ export declare function useChoiceGroupField(props: ChoiceGroupBase<HTMLButtonElement> & ChoiceSelection, options: ChoiceOption[], layout?: {
9
+ grid?: boolean;
10
+ }): {
9
11
  group: {
10
12
  groupId: string;
11
13
  ids: {
@@ -8,6 +8,8 @@ type CallerAria = {
8
8
  export type UseChoiceGroupOptions<E extends HTMLElement = HTMLElement> = Pick<ChoiceGroupBase<E>, 'label' | 'helperText' | 'error' | 'required' | 'disabled' | 'id' | 'max' | 'min' | 'orientation' | 'ref'> & {
9
9
  options: ChoiceOption[];
10
10
  selection: ChoiceSelection;
11
+ /** The items sit in rows and columns: Up and Down move by row. */
12
+ grid?: boolean;
11
13
  /** The caller's own aria props, which win over the generated ones. */
12
14
  aria?: CallerAria;
13
15
  };
@@ -10,5 +10,15 @@ export declare function toAllDayEvent(event: CalendarEvent, day: Date): Calendar
10
10
  export declare function moveEventToDay(event: CalendarEvent, day: Date): CalendarEvent;
11
11
  export declare function moveEventToDateTime(event: CalendarEvent, dateTime: Date): CalendarEvent;
12
12
  export declare function resizeEventEnd(event: CalendarEvent, end: Date): CalendarEvent;
13
- export declare function layoutTimedEvents(events: CalendarEvent[], day: Date, startHour: number, endHour: number): LaidOutEvent[];
13
+ /** The shortest an event is drawn, in px: WCAG 2.5.8's 24px target. */
14
+ export declare const MIN_EVENT_HEIGHT = 24;
15
+ /** The minutes an event draws over at least, at `hourHeight` px an hour. */
16
+ export declare function minEventMinutes(hourHeight: number): number;
17
+ /**
18
+ * Lays the day's timed events out in columns. A short event is drawn at least
19
+ * `MIN_EVENT_HEIGHT` tall, so it takes the room of `minMinutes` (default: its
20
+ * real duration): one that would then run into the next in its column gets a
21
+ * column of its own, and two targets never overlap.
22
+ */
23
+ export declare function layoutTimedEvents(events: CalendarEvent[], day: Date, startHour: number, endHour: number, minMinutes?: number): LaidOutEvent[];
14
24
  export declare function isToday(day: Date, now?: Date): boolean;
@@ -2076,6 +2076,7 @@ export declare const en: {
2076
2076
  "error-hint": string;
2077
2077
  "bulk-action": string;
2078
2078
  "bulk-action-name": string;
2079
+ "bulk-more": string;
2079
2080
  };
2080
2081
  "list-empty": {
2081
2082
  clear: string;
@@ -2289,6 +2290,7 @@ export declare const en: {
2289
2290
  apply: string;
2290
2291
  "no-range": string;
2291
2292
  "type-date": string;
2293
+ "type-date-time": string;
2292
2294
  "type-range": string;
2293
2295
  "select-date": string;
2294
2296
  "select-dates": string;
@@ -2065,7 +2065,8 @@ declare const _default: {
2065
2065
  "error": "Could not load the list",
2066
2066
  "error-hint": "Check your connection, then try again.",
2067
2067
  "bulk-action": "{label} ({count})",
2068
- "bulk-action-name": "{label} {count, plural, one {# row} other {# rows}}"
2068
+ "bulk-action-name": "{label} {count, plural, one {# row} other {# rows}}",
2069
+ "bulk-more": "More"
2069
2070
  },
2070
2071
  "list-empty": {
2071
2072
  "clear": "Clear search and filters"
@@ -2279,6 +2280,7 @@ declare const _default: {
2279
2280
  "apply": "Apply",
2280
2281
  "no-range": "No dates yet",
2281
2282
  "type-date": "Type the date",
2283
+ "type-date-time": "Type the date and time",
2282
2284
  "type-range": "Type the dates",
2283
2285
  "select-date": "Select date",
2284
2286
  "select-dates": "Select dates",
@@ -2076,6 +2076,7 @@ export declare const fr: {
2076
2076
  "error-hint": string;
2077
2077
  "bulk-action": string;
2078
2078
  "bulk-action-name": string;
2079
+ "bulk-more": string;
2079
2080
  };
2080
2081
  "list-empty": {
2081
2082
  clear: string;
@@ -2289,6 +2290,7 @@ export declare const fr: {
2289
2290
  apply: string;
2290
2291
  "no-range": string;
2291
2292
  "type-date": string;
2293
+ "type-date-time": string;
2292
2294
  "type-range": string;
2293
2295
  "select-date": string;
2294
2296
  "select-dates": string;
@@ -2065,7 +2065,8 @@ declare const _default: {
2065
2065
  "error": "Impossible de charger la liste",
2066
2066
  "error-hint": "Vérifiez votre connexion, puis réessayez.",
2067
2067
  "bulk-action": "{label} ({count})",
2068
- "bulk-action-name": "{label} : {count, plural, one {# ligne} other {# lignes}}"
2068
+ "bulk-action-name": "{label} : {count, plural, one {# ligne} other {# lignes}}",
2069
+ "bulk-more": "Plus"
2069
2070
  },
2070
2071
  "list-empty": {
2071
2072
  "clear": "Effacer la recherche et les filtres"
@@ -2279,6 +2280,7 @@ declare const _default: {
2279
2280
  "apply": "Appliquer",
2280
2281
  "no-range": "Aucune date",
2281
2282
  "type-date": "Saisir la date",
2283
+ "type-date-time": "Saisir la date et l’heure",
2282
2284
  "type-range": "Saisir les dates",
2283
2285
  "select-date": "Choisir la date",
2284
2286
  "select-dates": "Choisir les dates",
@@ -2074,6 +2074,7 @@ export declare const resources: {
2074
2074
  "error-hint": string;
2075
2075
  "bulk-action": string;
2076
2076
  "bulk-action-name": string;
2077
+ "bulk-more": string;
2077
2078
  };
2078
2079
  "list-empty": {
2079
2080
  clear: string;
@@ -2287,6 +2288,7 @@ export declare const resources: {
2287
2288
  apply: string;
2288
2289
  "no-range": string;
2289
2290
  "type-date": string;
2291
+ "type-date-time": string;
2290
2292
  "type-range": string;
2291
2293
  "select-date": string;
2292
2294
  "select-dates": string;
@@ -4888,6 +4890,7 @@ export declare const resources: {
4888
4890
  "error-hint": string;
4889
4891
  "bulk-action": string;
4890
4892
  "bulk-action-name": string;
4893
+ "bulk-more": string;
4891
4894
  };
4892
4895
  "list-empty": {
4893
4896
  clear: string;
@@ -5101,6 +5104,7 @@ export declare const resources: {
5101
5104
  apply: string;
5102
5105
  "no-range": string;
5103
5106
  "type-date": string;
5107
+ "type-date-time": string;
5104
5108
  "type-range": string;
5105
5109
  "select-date": string;
5106
5110
  "select-dates": string;