@nxgt/material-vue 0.41.0 → 0.43.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 (161) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +20 -6
  3. package/dist/{Button-BG3oDkrl.js → Button-C3K6dhqd.js} +4 -4
  4. package/dist/{HoverCardTrigger-Dh1ar_W4.js → HoverCardTrigger-Bga4YjEr.js} +69 -62
  5. package/dist/backgrounds/backgrounds.css +8 -0
  6. package/dist/backgrounds/css/base.css +169 -0
  7. package/dist/backgrounds/css/gradient.css +53 -0
  8. package/dist/backgrounds/css/grain.css +19 -0
  9. package/dist/backgrounds/css/motion.css +30 -0
  10. package/dist/backgrounds.js +111 -0
  11. package/dist/{camera-DV9jcl_3.js → camera-BbF9_-ys.js} +4 -4
  12. package/dist/components/base.css +5 -2
  13. package/dist/components/components.css +5 -0
  14. package/dist/components/theme-tokens.css +21 -0
  15. package/dist/{components-C1JYYoQ4.js → components-yCdbry6Q.js} +13880 -13101
  16. package/dist/components.js +8 -8
  17. package/dist/composables.js +3 -3
  18. package/dist/dnd.js +1 -1
  19. package/dist/{form-scope-CeD0v_mw.js → form-scope-CkWJrBCu.js} +1 -1
  20. package/dist/{i18n-provider-D5XyLQ3P.js → i18n-provider-tL27-a8y.js} +1 -1
  21. package/dist/i18n.js +4 -4
  22. package/dist/{icon-button-DXrmfs6e.js → icon-button-MyFFJpXA.js} +4 -4
  23. package/dist/lib/backgrounds/background/background.vue.d.ts +22 -0
  24. package/dist/lib/backgrounds/background/index.d.ts +2 -0
  25. package/dist/lib/backgrounds/background/partials/background-layers.vue.d.ts +9 -0
  26. package/dist/lib/backgrounds/background/partials/scene-svg.d.ts +10 -0
  27. package/dist/lib/backgrounds/background/types.d.ts +24 -0
  28. package/dist/lib/backgrounds/index.d.ts +13 -0
  29. package/dist/lib/components/ui/actions/button/button-tones.d.ts +3 -3
  30. package/dist/lib/components/ui/actions/responsive-button/responsive-button.vue.d.ts +3 -3
  31. package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +4 -0
  32. package/dist/lib/components/ui/collections/data-table/data-table.vue.d.ts +8 -0
  33. package/dist/lib/components/ui/collections/data-table/partials/data-table-body.vue.d.ts +8 -0
  34. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty.vue.d.ts +5 -1
  35. package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +16 -3
  36. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +36 -0
  37. package/dist/lib/components/ui/collections/data-table/types.d.ts +15 -0
  38. package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +2 -0
  39. package/dist/lib/components/ui/feedback/circular-progress/circular-progress.vue.d.ts +1 -1
  40. package/dist/lib/components/ui/feedback/empty-state/empty-state.vue.d.ts +21 -8
  41. package/dist/lib/components/ui/feedback/empty-state/index.d.ts +1 -1
  42. package/dist/lib/components/ui/feedback/error-state/error-state.vue.d.ts +54 -0
  43. package/dist/lib/components/ui/feedback/error-state/index.d.ts +3 -0
  44. package/dist/lib/components/ui/feedback/error-state/partials/error-state-details.vue.d.ts +7 -0
  45. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  46. package/dist/lib/components/ui/feedback/state-frame/state-frame.vue.d.ts +36 -0
  47. package/dist/lib/components/ui/feedback/state-frame/state-icon.vue.d.ts +7 -0
  48. package/dist/lib/components/ui/feedback/state-frame/state-illustration.vue.d.ts +8 -0
  49. package/dist/lib/components/ui/feedback/state-frame/state-tones.d.ts +11 -0
  50. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  51. package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.vue.d.ts +9 -0
  52. package/dist/lib/components/ui/layout/account-menu/account-menu.vue.d.ts +38 -0
  53. package/dist/lib/components/ui/layout/account-menu/index.d.ts +3 -0
  54. package/dist/lib/components/ui/layout/account-menu/types.d.ts +10 -0
  55. package/dist/lib/components/ui/layout/app-shell/activity-layout.vue.d.ts +21 -5
  56. package/dist/lib/components/ui/layout/app-shell/app-brand-logo.vue.d.ts +20 -0
  57. package/dist/lib/components/ui/layout/app-shell/app-brand.vue.d.ts +30 -0
  58. package/dist/lib/components/ui/layout/app-shell/app-header.vue.d.ts +13 -5
  59. package/dist/lib/components/ui/layout/app-shell/app-sidebar.vue.d.ts +12 -2
  60. package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
  61. package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
  62. package/dist/lib/components/ui/layout/app-shell/use-truncated-title.d.ts +10 -0
  63. package/dist/lib/components/ui/layout/background/background.vue.d.ts +18 -3
  64. package/dist/lib/components/ui/layout/doc/partials/doc-empty.vue.d.ts +7 -4
  65. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  66. package/dist/lib/components/ui/media/stx-player/stx-player-viewport.vue.d.ts +2 -2
  67. package/dist/lib/components/ui/overlays/command/CommandSeparator.vue.d.ts +3 -1
  68. package/dist/lib/components/ui/overlays/dialog/in-dialog.d.ts +1 -1
  69. package/dist/lib/components/ui/overlays/dialog/use-escape-forward.d.ts +13 -0
  70. package/dist/lib/components/ui/overlays/dialog/use-modal-content.d.ts +2 -0
  71. package/dist/lib/components/ui/primitives/nonce-provider/nonce-provider.vue.d.ts +4 -1
  72. package/dist/lib/components/ui/selection/autocomplete/autocomplete-keyboard.d.ts +22 -4
  73. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-box.vue.d.ts +6 -2
  74. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-list.vue.d.ts +7 -0
  75. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-active.d.ts +17 -0
  76. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-keydown.d.ts +21 -0
  77. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-open.d.ts +3 -3
  78. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +2 -1
  79. package/dist/lib/components/ui/selection/autocomplete/use-drawer-room.d.ts +11 -0
  80. package/dist/lib/components/ui/selection/autocomplete/use-query-change.d.ts +8 -0
  81. package/dist/lib/components/ui/widgets/charts/chart-container.vue.d.ts +2 -2
  82. package/dist/lib/components/ui/widgets/kanban/partials/kanban-empty.vue.d.ts +1 -0
  83. package/dist/lib/composables/use-background-activity.d.ts +8 -0
  84. package/dist/lib/i18n/resources/en/en.d.ts +28 -0
  85. package/dist/lib/i18n/resources/en/material.json.d.ts +29 -1
  86. package/dist/lib/i18n/resources/fr/fr.d.ts +28 -0
  87. package/dist/lib/i18n/resources/fr/material.json.d.ts +29 -1
  88. package/dist/lib/i18n/resources/resources.d.ts +56 -0
  89. package/dist/lib/i18n/translator.d.ts +1 -1
  90. package/dist/lib/lib/index.d.ts +1 -0
  91. package/dist/lib/nuxt/component-names.d.ts +1 -1
  92. package/dist/lib/nuxt/module.d.ts +2 -11
  93. package/dist/lib/nuxt/pdf-fonts.d.ts +1 -1
  94. package/dist/lib/nuxt/plugin-options.d.ts +58 -0
  95. package/dist/lib/vite/index.d.ts +4 -8
  96. package/dist/lib.js +52 -51
  97. package/dist/main.js +17 -17
  98. package/dist/map.js +4 -4
  99. package/dist/material-vue.css +1 -1
  100. package/dist/{pdf-outline-sidebar-CgmJjhUz.js → pdf-outline-sidebar-Kqsfd_cO.js} +2 -2
  101. package/dist/{pdf-page-BjQNWV72.js → pdf-page-Dx3jwxu6.js} +1 -1
  102. package/dist/{pdf-page-list-nG0l4SjH.js → pdf-page-list-BsQmEHaY.js} +2 -2
  103. package/dist/{pdf-reader-Dekd4Ymw.js → pdf-reader-CJo8SQVl.js} +15 -15
  104. package/dist/{pdf-sidebar-gDj63dRH.js → pdf-sidebar-CcCUATl-.js} +3 -3
  105. package/dist/{pdf-thumbnail-sidebar-C5ikii1Z.js → pdf-thumbnail-sidebar-BRxNRGfG.js} +4 -4
  106. package/dist/{pdf-toolbar-DmmrSlCq.js → pdf-toolbar-B0ckYBJ2.js} +4 -4
  107. package/dist/pdf.js +2 -2
  108. package/dist/{print-format.utils-CiUiQE-i.js → print-format.utils-51joHpFb.js} +2 -2
  109. package/dist/{sortable-provider-lK0srHJF.js → sortable-provider-BEx1B0Ky.js} +2 -2
  110. package/dist/{stored-language-dM2e5qaS.js → stored-language-DVP9KzRu.js} +58 -2
  111. package/dist/{stx-player-C2VQCXFc.js → stx-player-KPp9c7vS.js} +5 -5
  112. package/dist/styles.css +4 -0
  113. package/dist/{translator-DXL5RDRg.js → translator-Bm7i7dv-.js} +1 -1
  114. package/dist/use-background-activity-DdTBbNpX.js +17 -0
  115. package/dist/{use-heading-spy-Btwc0yad.js → use-heading-spy-jn8f2ioE.js} +13 -13
  116. package/dist/{use-material-translation-Du3Wvsk1.js → use-material-translation-CfFZPSe0.js} +3 -3
  117. package/dist/vite.js +7 -2
  118. package/docs/README.md +3 -0
  119. package/docs/components/README.md +2 -1
  120. package/docs/components/buttons-and-actions.md +2 -0
  121. package/docs/components/data-table-filter-and-lists.md +59 -8
  122. package/docs/components/feedback-and-status.md +79 -8
  123. package/docs/components/media-and-files.md +2 -0
  124. package/docs/components/navigation-and-layout.md +68 -5
  125. package/docs/components/overlays-and-menus.md +20 -3
  126. package/docs/components/primitives.md +5 -3
  127. package/docs/components/rich-widgets.md +1 -1
  128. package/docs/components/selection-and-choice.md +14 -4
  129. package/docs/getting-started.md +22 -3
  130. package/docs/guides/app-shell.md +99 -19
  131. package/docs/guides/backgrounds.md +143 -0
  132. package/docs/guides/csp.md +48 -6
  133. package/docs/guides/helpers.md +1 -0
  134. package/docs/guides/i18n.md +52 -2
  135. package/docs/guides/migrate-to-vite-plugin.md +259 -0
  136. package/docs/guides/pdf.md +11 -4
  137. package/docs/guides/ssr.md +1 -1
  138. package/docs/guides/theming.md +52 -4
  139. package/docs/guides/vite-plugin.md +194 -0
  140. package/docs/previews/backgrounds-matrix.webp +0 -0
  141. package/docs/previews/feedback-status-emptystate.webp +0 -0
  142. package/docs/previews/feedback-status-errorstate.webp +0 -0
  143. package/docs/previews/navigation-layout-accountmenu.webp +0 -0
  144. package/docs/roadmap.md +69 -32
  145. package/docs/troubleshooting.md +251 -7
  146. package/lib/backgrounds/backgrounds.css +8 -0
  147. package/lib/backgrounds/css/base.css +169 -0
  148. package/lib/backgrounds/css/gradient.css +53 -0
  149. package/lib/backgrounds/css/grain.css +19 -0
  150. package/lib/backgrounds/css/motion.css +30 -0
  151. package/lib/components/base.css +5 -2
  152. package/lib/components/components.css +5 -0
  153. package/lib/components/theme-tokens.css +21 -0
  154. package/lib/nuxt/component-names.ts +2 -0
  155. package/lib/nuxt/module.ts +29 -15
  156. package/lib/nuxt/pdf-fonts.ts +1 -1
  157. package/lib/nuxt/plugin-options.ts +92 -0
  158. package/lib/nuxt/runtime/inter.css +6 -0
  159. package/lib/styles.css +4 -0
  160. package/lib/vite/index.ts +19 -2
  161. package/package.json +24 -2
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'vue';
2
- import { AppShellLinkComponent, MenuItem } from './types';
2
+ import { AppLogo, AppShellLinkComponent, MenuItem } from './types';
3
3
  export type AppSidebarProps = {
4
4
  items?: MenuItem[];
5
5
  expanded?: boolean;
@@ -7,11 +7,21 @@ export type AppSidebarProps = {
7
7
  /** The link each entry renders, given `href`. Default: `RouterLink`
8
8
  * (client-side navigation). */
9
9
  linkComponent?: AppShellLinkComponent;
10
+ /** The app's logo: an image URL or `{ src, alt }` (`#logo` for a node,
11
+ * which wins over this prop when both are given).
12
+ * Shown alone in the collapsed rail, beside `name` when expanded. The
13
+ * `#brand` slot replaces both. */
14
+ logo?: AppLogo;
15
+ /** The app's name, already translated: the logo's accessible name and
16
+ * tooltip in the collapsed rail, shown beside it when expanded. */
17
+ name?: string;
10
18
  class?: HTMLAttributes['class'];
11
19
  };
12
- declare var __VLS_16: {};
20
+ declare var __VLS_16: {}, __VLS_25: {};
13
21
  type __VLS_Slots = {} & {
14
22
  brand?: (props: typeof __VLS_16) => any;
23
+ } & {
24
+ logo?: (props: typeof __VLS_25) => any;
15
25
  };
16
26
  declare const __VLS_base: import('vue').DefineComponent<AppSidebarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
27
  "update:expanded": (value: boolean) => any;
@@ -9,4 +9,4 @@ export { default as AppHeader } from './app-header.vue';
9
9
  export { findActiveMenuItem, isMenuItemActive, partitionMenu, } from './app-shell.utils';
10
10
  export type { AppSidebarProps } from './app-sidebar.vue';
11
11
  export { default as AppSidebar } from './app-sidebar.vue';
12
- export type { AppShellLinkComponent, MenuItem } from './types';
12
+ export type { AppLogo, AppLogoImage, AppShellLinkComponent, MenuItem, } from './types';
@@ -30,3 +30,13 @@ export type MenuItem = {
30
30
  * way. A link that forwards only a table's link props is not enough here.
31
31
  * `RouterLink` takes `to`, so wrap it, as the default does. */
32
32
  export type AppShellLinkComponent = Component;
33
+ /** An image logo: its URL, and the text it stands for when no `name` is given. */
34
+ export type AppLogoImage = {
35
+ src: string;
36
+ alt?: string;
37
+ };
38
+ /**
39
+ * The app's logo in the sidebar header: an image URL or `{ src, alt }`. A
40
+ * whole node (an inline SVG) goes in the `#logo` slot instead.
41
+ */
42
+ export type AppLogo = string | AppLogoImage;
@@ -0,0 +1,10 @@
1
+ import { Ref } from 'vue';
2
+ /** Whether the box, or a child that truncates itself, is cut off. */
3
+ export declare function isTruncated(box: HTMLElement): boolean;
4
+ /**
5
+ * The full text of a title that is actually cut off by an ellipsis, else
6
+ * `undefined` (#629). Measured after mount, on every resize and when the slot
7
+ * changes, so the server markup is unchanged and a wide viewport carries no
8
+ * `title`.
9
+ */
10
+ export declare function useTruncatedTitle(box: Ref<HTMLElement | null | undefined>): Ref<string | undefined, string | undefined>;
@@ -1,12 +1,27 @@
1
- import { HTMLAttributes } from 'vue';
1
+ import { BackgroundIntensity, BackgroundTone } from '@nxgt/material-core/backgrounds';
2
2
  type __VLS_Props = {
3
- class?: HTMLAttributes['class'];
3
+ /** Only the gradient lives here; the others are in
4
+ * `@nxgt/material-vue/backgrounds`. */
5
+ preset?: 'gradient';
6
+ /** The colours it draws from. */
7
+ tone?: BackgroundTone;
8
+ /** How strong the tint and the blobs are. */
9
+ intensity?: BackgroundIntensity;
10
+ /** Drifts the blobs (`data-animated`). Off by default; it pauses while
11
+ * the page is hidden or the background is off screen, and never moves
12
+ * under `prefers-reduced-motion`. */
13
+ animated?: boolean;
4
14
  };
5
15
  declare var __VLS_1: {};
6
16
  type __VLS_Slots = {} & {
7
17
  default?: (props: typeof __VLS_1) => any;
8
18
  };
9
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ preset: "gradient";
21
+ tone: BackgroundTone;
22
+ intensity: BackgroundIntensity;
23
+ animated: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
26
  declare const _default: typeof __VLS_export;
12
27
  export default _default;
@@ -1,7 +1,12 @@
1
1
  import { HTMLAttributes } from 'vue';
2
- import { EmptyStateVariant } from '../../../feedback/empty-state/empty-state.vue';
2
+ import { EmptyStateKind, EmptyStateVariant } from '../../../feedback/empty-state/empty-state.vue';
3
+ import { StateFrameSize } from '../../../feedback/state-frame/state-frame.vue';
3
4
  export type DocEmptyProps = {
5
+ /** What is absent; the default is `not-found`. */
6
+ kind?: EmptyStateKind;
7
+ /** @deprecated Use `kind`. Removed in 1.0. */
4
8
  variant?: EmptyStateVariant;
9
+ size?: StateFrameSize;
5
10
  title?: string;
6
11
  description?: string;
7
12
  class?: HTMLAttributes['class'];
@@ -12,9 +17,7 @@ type __VLS_Slots = {} & {
12
17
  } & {
13
18
  action?: (props: typeof __VLS_12) => any;
14
19
  };
15
- declare const __VLS_base: import('vue').DefineComponent<DocEmptyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DocEmptyProps> & Readonly<{}>, {
16
- variant: EmptyStateVariant;
17
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_base: import('vue').DefineComponent<DocEmptyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DocEmptyProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
22
  declare const _default: typeof __VLS_export;
20
23
  export default _default;
@@ -1,3 +1,4 @@
1
+ export * from './account-menu';
1
2
  export * from './app-bar';
2
3
  export * from './app-shell';
3
4
  export * from './auth-card';
@@ -2,9 +2,9 @@ import { HTMLAttributes } from 'vue';
2
2
  export type StxPlayerViewportProps = {
3
3
  class?: HTMLAttributes['class'];
4
4
  };
5
- declare var __VLS_41: {};
5
+ declare var __VLS_36: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_41) => any;
7
+ default?: (props: typeof __VLS_36) => any;
8
8
  };
9
9
  declare const __VLS_base: import('vue').DefineComponent<StxPlayerViewportProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StxPlayerViewportProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -7,7 +7,9 @@ declare var __VLS_8: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_8) => any;
9
9
  };
10
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ decorative: boolean;
12
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
13
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
14
  declare const _default: typeof __VLS_export;
13
15
  export default _default;
@@ -3,7 +3,7 @@
3
3
  * and `SheetContent`: a field inside opens its list in the layer's flow,
4
4
  * pushing what follows (the footer) down instead of floating over the
5
5
  * title or the Save button. `false` from `PopoverContent`,
6
- * `HoverCardContent` and the menus' contents: a floating layer opened from
6
+ * `DrawerContent`, `HoverCardContent` and the menus' contents: a floating layer opened from
7
7
  * a dialog keeps a floating list. Not exported: the layers provide it, the
8
8
  * fields inject it. `InDialogContext` in `@nxgt/material`.
9
9
  */
@@ -1,4 +1,17 @@
1
1
  import { ContentRef } from './use-inert-others';
2
+ /**
3
+ * `props` (the content's `$attrs` and forwarded props) with `keepList` as the
4
+ * first `@escape-key-down` listener: `v-bind="withListEscape({ ...$attrs,
5
+ * ...forwarded })"`. Vue appends the listeners of `mergeProps` in order, and
6
+ * a second `@escape-key-down` beside `v-bind` would be a duplicate key.
7
+ *
8
+ * Escape pressed in a field whose list is open belongs to the list
9
+ * (`keepListEscape`), so your `@escape-key-down` sees `defaultPrevented` true
10
+ * for an Escape that only closes a list.
11
+ */
12
+ export declare function withListEscape(props: Record<string, unknown>): {
13
+ [x: string]: unknown;
14
+ };
2
15
  /**
3
16
  * The `@escape-key-down` listener of `DialogContent`, `AlertDialogContent`,
4
17
  * `SheetContent` and `DrawerContent`, on the reka content whose template ref
@@ -1,3 +1,4 @@
1
+ import { withListEscape } from './use-escape-forward';
1
2
  /**
2
3
  * What the content of every modal layer — `DialogContent`,
3
4
  * `DialogScrollContent`, `AlertDialogContent`, `SheetContent` and
@@ -21,6 +22,7 @@
21
22
  * The same wiring as `useModalContent` in `@nxgt/material`.
22
23
  */
23
24
  export declare function useModalContent(active?: () => boolean): {
25
+ withListEscape: typeof withListEscape;
24
26
  onEscapeKeyDown: (event: KeyboardEvent) => void;
25
27
  keepToaster: typeof keepToaster;
26
28
  };
@@ -1,7 +1,10 @@
1
1
  export type NonceProviderProps = {
2
2
  /**
3
3
  * This request's Content Security Policy nonce: the one in the
4
- * `style-src-elem 'nonce-…'` directive (`useNonce()` with nuxt-security).
4
+ * `style-src-elem 'nonce-…'` directive (`useNonce()` with nuxt-security). Without one, the parent
5
+ * `ConfigProvider`'s carries on, then (on the client, from the first
6
+ * render) the page's own: `<meta property="csp-nonce">`. A server has no
7
+ * page to read: it passes the prop.
5
8
  */
6
9
  nonce?: string;
7
10
  };
@@ -1,13 +1,31 @@
1
+ type Navigable = {
2
+ value: string;
3
+ disabled?: boolean;
4
+ };
5
+ /** The key that moves the highlight over the options. */
6
+ export type ActiveKey = 'ArrowDown' | 'ArrowUp' | 'Home' | 'End';
7
+ /**
8
+ * The index the highlight moves to: the next (`ArrowDown`) or previous
9
+ * (`ArrowUp`) enabled option, wrapping at either end, or the first (`Home`)
10
+ * or last (`End`). `current` is -1 when nothing is highlighted. With
11
+ * `allowNone` (the free-solo "Add" button shows), the arrows pass through -1
12
+ * on their way round, so the button can be reached again. -1 when no option
13
+ * is enabled.
14
+ */
15
+ export declare function nextActiveIndex(items: Navigable[], current: number, key: ActiveKey, allowNone?: boolean): number;
1
16
  export declare function handleAutocompleteKeydown(event: KeyboardEvent, ctx: {
2
17
  query: string;
3
18
  selected: string[];
4
- filtered: {
5
- value: string;
6
- disabled?: boolean;
7
- }[];
19
+ filtered: Navigable[];
8
20
  canAdd: boolean;
21
+ open: boolean;
22
+ /** The highlighted option's index, -1 for none. */
23
+ active: number;
24
+ onOpen: () => void;
25
+ onActive: (index: number) => void;
9
26
  onEscape: () => void;
10
27
  onAdd: () => void;
11
28
  onPick: (value: string) => void;
12
29
  onRemoveLast: () => void;
13
30
  }): void;
31
+ export {};
@@ -8,6 +8,12 @@ type __VLS_Props = {
8
8
  describedBy?: string;
9
9
  placeholder?: string;
10
10
  query: string;
11
+ /** The list is open: `aria-expanded`, and `data-list-open` so Escape in a dialog closes it first (`keepListEscape`). */
12
+ open?: boolean;
13
+ /** The id of the list the input controls, when it is in the page. */
14
+ controls?: string;
15
+ /** The id of the option Enter would pick. */
16
+ activeId?: string;
11
17
  selected: {
12
18
  value: string;
13
19
  label: string;
@@ -25,13 +31,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
25
31
  input: (event: Event) => any;
26
32
  dismiss: (value: string) => any;
27
33
  click: () => any;
28
- focus: () => any;
29
34
  keydown: (event: KeyboardEvent) => any;
30
35
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
31
36
  onInput?: ((event: Event) => any) | undefined;
32
37
  onDismiss?: ((value: string) => any) | undefined;
33
38
  onClick?: (() => any) | undefined;
34
- onFocus?: (() => any) | undefined;
35
39
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
36
40
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
37
41
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,6 +1,8 @@
1
1
  import { AutocompleteItem } from '../autocomplete-items';
2
2
  type __VLS_Props = {
3
3
  name?: string;
4
+ /** The listbox's id; each option's is `<listId>-<index>`. */
5
+ listId: string;
4
6
  query: string;
5
7
  filtered: AutocompleteItem<unknown>[];
6
8
  selected: string[];
@@ -14,6 +16,9 @@ type __VLS_Props = {
14
16
  /** The minimum query length `onSearch` waits for, as a sentence. */
15
17
  hint: string | null;
16
18
  addLabel: string;
19
+ multiple?: boolean;
20
+ /** The index of the option Enter picks (`aria-activedescendant`), or -1. */
21
+ active: number;
17
22
  };
18
23
  type __VLS_Slots = {
19
24
  option?: (props: {
@@ -26,9 +31,11 @@ type __VLS_Slots = {
26
31
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
27
32
  pick: (value: string) => any;
28
33
  add: () => any;
34
+ highlight: (index: number) => any;
29
35
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
30
36
  onPick?: ((value: string) => any) | undefined;
31
37
  onAdd?: (() => any) | undefined;
38
+ onHighlight?: ((index: number) => any) | undefined;
32
39
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
34
41
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ type Item = {
3
+ value: string;
4
+ disabled?: boolean;
5
+ };
6
+ /**
7
+ * The highlighted option (`aria-activedescendant`, and what Enter picks).
8
+ * -1 while the list is closed, or once the arrow keys passed through "none".
9
+ * Until the arrow keys move it, it is the first enabled option, or none when
10
+ * the free-solo "Add" button stands for Enter. A new query, or the list
11
+ * closing, hands it back to that default.
12
+ */
13
+ export declare function useAutocompleteActive(filtered: Readonly<Ref<Item[]>>, canAdd: Readonly<Ref<boolean>>, query: Readonly<Ref<string>>, open: Readonly<Ref<boolean>>): {
14
+ active: import('vue').ComputedRef<number>;
15
+ setActive(index: number): void;
16
+ };
17
+ export {};
@@ -0,0 +1,21 @@
1
+ import { Ref } from 'vue';
2
+ type Keys = {
3
+ query: Readonly<Ref<string>>;
4
+ selectedValues: Readonly<Ref<string[]>>;
5
+ filtered: Readonly<Ref<{
6
+ value: string;
7
+ disabled?: boolean;
8
+ }[]>>;
9
+ canAdd: Readonly<Ref<boolean>>;
10
+ open: Ref<boolean>;
11
+ active: Readonly<Ref<number>>;
12
+ setActive: (index: number) => void;
13
+ pick: (value: string) => void;
14
+ remove: (value: string) => void;
15
+ addFreeSolo: () => void;
16
+ };
17
+ /** The input's `keydown` handler, over the field's state. */
18
+ export declare function useAutocompleteKeydown(props: {
19
+ disabled?: boolean;
20
+ }, k: Keys): (event: KeyboardEvent) => void;
21
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { Ref } from 'vue';
2
2
  /**
3
- * Whether the list is open, and the handlers that open it: focus, a click
4
- * on the box, typing. A click outside closes it; a disabled field never opens.
3
+ * Whether the list is open, and the handlers that open it: click
4
+ * on the box, typing (not focus: a dialog that focuses its first field
5
+ * opens with the list shut, as in React). A click outside closes it; a disabled field never opens.
5
6
  */
6
7
  export declare function useAutocompleteOpen(props: {
7
8
  disabled?: boolean;
@@ -9,7 +10,6 @@ export declare function useAutocompleteOpen(props: {
9
10
  focus: () => void;
10
11
  } | null>>): {
11
12
  open: Ref<boolean, boolean>;
12
- onFocus(): void;
13
13
  focusInput(): void;
14
14
  onInput(event: Event): void;
15
15
  };
@@ -25,14 +25,15 @@ export declare function useAutocomplete<T extends AutocompleteOption>(props: Opt
25
25
  remove: (value: string) => void;
26
26
  addFreeSolo: () => void;
27
27
  onKeydown: (event: KeyboardEvent) => void;
28
+ setActive: (index: number) => void;
28
29
  canAddFreeSolo: import('vue').ComputedRef<boolean>;
29
30
  addLabel: import('vue').ComputedRef<string>;
30
31
  query: Ref<string, string>;
32
+ active: import('vue').ComputedRef<number>;
31
33
  selectedValues: import('vue').ComputedRef<string[]>;
32
34
  selectedItems: import('vue').ComputedRef<import('./autocomplete-items').AutocompleteItem<T>[]>;
33
35
  filtered: import('vue').ComputedRef<import('./autocomplete-items').AutocompleteItem<T>[]>;
34
36
  open: Ref<boolean, boolean>;
35
- onFocus(): void;
36
37
  focusInput(): void;
37
38
  onInput(event: Event): void;
38
39
  };
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * In a Drawer, the height the open floating list may take under its own top
4
+ * (#582), `null` elsewhere; and `keepDrawer`, which keeps a drag that starts
5
+ * on the list from reaching the Drawer's swipe. Measured again after every
6
+ * update, when the Drawer resizes or scrolls and when the window resizes.
7
+ */
8
+ export declare function useDrawerRoom(list: Readonly<Ref<HTMLElement | null>>): {
9
+ room: Ref<number | null, number | null>;
10
+ keepDrawer(event: Event): void;
11
+ };
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Reports the query: typing once it pauses (`debounceMs`), an emptied query
4
+ * (a pick, a clear) at once. What the page derives from the query then
5
+ * changes with the pick, not `debounceMs` later, under the click on the next
6
+ * field (#557).
7
+ */
8
+ export declare function useQueryChange(query: Readonly<Ref<string>>, debounceMs: () => number, report: (query: string) => void): void;
@@ -5,11 +5,11 @@ export type ChartContainerProps = {
5
5
  loading?: boolean;
6
6
  empty?: boolean;
7
7
  };
8
- declare var __VLS_6: {}, __VLS_8: {};
8
+ declare var __VLS_6: {}, __VLS_13: {};
9
9
  type __VLS_Slots = {} & {
10
10
  emptyState?: (props: typeof __VLS_6) => any;
11
11
  } & {
12
- default?: (props: typeof __VLS_8) => any;
12
+ default?: (props: typeof __VLS_13) => any;
13
13
  };
14
14
  declare const __VLS_base: import('vue').DefineComponent<ChartContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartContainerProps> & Readonly<{}>, {
15
15
  height: string | number;
@@ -1,5 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  title: string;
3
+ search?: boolean;
3
4
  };
4
5
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
6
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Whether an `animated` background should be paused: the page is hidden, the
4
+ * element is off screen or the user prefers reduced motion. It starts `false`
5
+ * (what the server renders), observes only once mounted and only while
6
+ * `enabled`, and removes every listener on unmount.
7
+ */
8
+ export declare function useBackgroundActivity(el: Ref<Element | null>, enabled: () => boolean): Ref<boolean>;
@@ -39,9 +39,30 @@ export declare const en: {
39
39
  description: string;
40
40
  };
41
41
  };
42
+ "error-state": {
43
+ generic: {
44
+ title: string;
45
+ description: string;
46
+ };
47
+ offline: {
48
+ title: string;
49
+ description: string;
50
+ };
51
+ maintenance: {
52
+ title: string;
53
+ description: string;
54
+ };
55
+ retry: string;
56
+ details: string;
57
+ "details-name": string;
58
+ "details-message": string;
59
+ "details-cause": string;
60
+ };
42
61
  command: {
43
62
  title: string;
44
63
  description: string;
64
+ empty: string;
65
+ list: string;
45
66
  };
46
67
  "confirm-dialog": {
47
68
  confirm: string;
@@ -354,6 +375,8 @@ export declare const en: {
354
375
  "delete-selected-rows": string;
355
376
  "toggle-columns": string;
356
377
  "no-data": string;
378
+ "no-results": string;
379
+ "no-results-description": string;
357
380
  "select-all": string;
358
381
  "select-row": string;
359
382
  "toggle-row": string;
@@ -617,6 +640,7 @@ export declare const en: {
617
640
  empty: string;
618
641
  loading: string;
619
642
  error: string;
643
+ retry: string;
620
644
  password: string;
621
645
  "password-placeholder": string;
622
646
  "password-label": string;
@@ -840,6 +864,10 @@ export declare const en: {
840
864
  "open-menu": string;
841
865
  navigation: string;
842
866
  };
867
+ "account-menu": {
868
+ trigger: string;
869
+ "sign-out": string;
870
+ };
843
871
  filter: {
844
872
  title: string;
845
873
  trigger: string;
@@ -29,9 +29,30 @@ declare const _default: {
29
29
  "description": "The service is down for a short update."
30
30
  }
31
31
  },
32
+ "error-state": {
33
+ "generic": {
34
+ "title": "Something Went Wrong",
35
+ "description": "An unexpected error occurred. Please try again later."
36
+ },
37
+ "offline": {
38
+ "title": "You are offline",
39
+ "description": "Check your connection and try again."
40
+ },
41
+ "maintenance": {
42
+ "title": "We'll be right back",
43
+ "description": "The service is down for a short update."
44
+ },
45
+ "retry": "Retry",
46
+ "details": "Technical details",
47
+ "details-name": "Name",
48
+ "details-message": "Message",
49
+ "details-cause": "Cause"
50
+ },
32
51
  "command": {
33
52
  "title": "Command Palette",
34
- "description": "Search for a command to run..."
53
+ "description": "Search for a command to run...",
54
+ "empty": "No results",
55
+ "list": "Suggestions"
35
56
  },
36
57
  "confirm-dialog": {
37
58
  "confirm": "Confirm",
@@ -344,6 +365,8 @@ declare const _default: {
344
365
  "delete-selected-rows": "Delete {count} rows",
345
366
  "toggle-columns": "Toggle columns",
346
367
  "no-data": "No data available",
368
+ "no-results": "No results",
369
+ "no-results-description": "Try a different search or clear the filters.",
347
370
  "select-all": "Select all",
348
371
  "select-row": "Select row",
349
372
  "toggle-row": "Toggle row details",
@@ -607,6 +630,7 @@ declare const _default: {
607
630
  "empty": "No document selected",
608
631
  "loading": "Loading document…",
609
632
  "error": "Failed to load document",
633
+ "retry": "Retry",
610
634
  "password": "Password protected",
611
635
  "password-placeholder": "Enter password",
612
636
  "password-label": "Password",
@@ -830,6 +854,10 @@ declare const _default: {
830
854
  "open-menu": "Open menu",
831
855
  "navigation": "Navigation"
832
856
  },
857
+ "account-menu": {
858
+ "trigger": "Account menu, {name}",
859
+ "sign-out": "Sign out"
860
+ },
833
861
  "filter": {
834
862
  "title": "Filters",
835
863
  "trigger": "Filters",
@@ -39,9 +39,30 @@ export declare const fr: {
39
39
  description: string;
40
40
  };
41
41
  };
42
+ "error-state": {
43
+ generic: {
44
+ title: string;
45
+ description: string;
46
+ };
47
+ offline: {
48
+ title: string;
49
+ description: string;
50
+ };
51
+ maintenance: {
52
+ title: string;
53
+ description: string;
54
+ };
55
+ retry: string;
56
+ details: string;
57
+ "details-name": string;
58
+ "details-message": string;
59
+ "details-cause": string;
60
+ };
42
61
  command: {
43
62
  title: string;
44
63
  description: string;
64
+ empty: string;
65
+ list: string;
45
66
  };
46
67
  "confirm-dialog": {
47
68
  confirm: string;
@@ -354,6 +375,8 @@ export declare const fr: {
354
375
  "delete-selected-rows": string;
355
376
  "toggle-columns": string;
356
377
  "no-data": string;
378
+ "no-results": string;
379
+ "no-results-description": string;
357
380
  "select-all": string;
358
381
  "select-row": string;
359
382
  "toggle-row": string;
@@ -617,6 +640,7 @@ export declare const fr: {
617
640
  empty: string;
618
641
  loading: string;
619
642
  error: string;
643
+ retry: string;
620
644
  password: string;
621
645
  "password-placeholder": string;
622
646
  "password-label": string;
@@ -840,6 +864,10 @@ export declare const fr: {
840
864
  "open-menu": string;
841
865
  navigation: string;
842
866
  };
867
+ "account-menu": {
868
+ trigger: string;
869
+ "sign-out": string;
870
+ };
843
871
  filter: {
844
872
  title: string;
845
873
  trigger: string;