@nxgt/material 3.71.0 → 3.72.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 (82) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -1
  3. package/dist/{alert-dialog-y2pbowVh.js → alert-dialog-A8K8zai1.js} +1 -1
  4. package/dist/{async-slice-CGfWBOaV.js → async-slice-B8933IHY.js} +1 -1
  5. package/dist/{button-D54Hrjo0.js → button-C8moFnIT.js} +1 -1
  6. package/dist/charts.js +3 -3
  7. package/dist/{chip-B5MhXBfm.js → chip-B6AY1E91.js} +2 -2
  8. package/dist/{code-editor-mULs4SL8.js → code-editor-DQZIKL54.js} +5 -5
  9. package/dist/code-editor.js +5 -5
  10. package/dist/{code-language-items-BWDnqUqn.js → code-language-items-8VL0aMKG.js} +2 -2
  11. package/dist/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
  12. package/dist/{components-B_taYVcd.js → components-EHdmrvV4.js} +16877 -16727
  13. package/dist/components.js +28 -28
  14. package/dist/{dialog-AjCYZ2Vz.js → dialog-WuLTwxkr.js} +5 -5
  15. package/dist/dnd.js +1 -1
  16. package/dist/{dropdown-menu-LN60hu_3.js → dropdown-menu-tadySeGH.js} +1 -1
  17. package/dist/editor.js +10 -10
  18. package/dist/{empty-state-Bo8G8W8G.js → empty-state-ZYiFSSBQ.js} +2 -2
  19. package/dist/{field-blur-Cnd6FfCH.js → field-blur-BYR0yE5L.js} +1 -1
  20. package/dist/{field-blur-context-bUFZj8iN.js → field-blur-context-bEhByoK-.js} +1 -1
  21. package/dist/{hooks-Dt4PkQiZ.js → hooks-GpwD8iDu.js} +2 -2
  22. package/dist/hooks.js +2 -2
  23. package/dist/{hover-card-QtGnvsnc.js → hover-card-BowaI_ra.js} +1 -1
  24. package/dist/i18n.js +3 -3
  25. package/dist/{icon-badge-DLbpCQIm.js → icon-badge-B1B0Lg02.js} +3 -3
  26. package/dist/{icon-button-C59DqL7L.js → icon-button-BbGU17cb.js} +1 -1
  27. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +3 -0
  28. package/dist/lib/components/ui/fields/attributes/attribute-values-form-field-set/attribute-values-form-field-set.d.ts +5 -1
  29. package/dist/lib/components/ui/fields/contacts/contact-dialog.d.ts +8 -2
  30. package/dist/lib/components/ui/fields/contacts/contacts-dialog-form-field.d.ts +4 -1
  31. package/dist/lib/components/ui/fields/contacts/contacts-editor.d.ts +15 -2
  32. package/dist/lib/components/ui/fields/contacts/contacts-form-field.d.ts +6 -1
  33. package/dist/lib/components/ui/fields/contacts/logic/offered-types.d.ts +3 -0
  34. package/dist/lib/components/ui/fields/contacts/models.d.ts +2 -0
  35. package/dist/lib/components/ui/fields/contacts/partials/contact-fields.d.ts +4 -2
  36. package/dist/lib/components/ui/fields/contacts/partials/contact-groups.d.ts +4 -2
  37. package/dist/lib/components/ui/fields/contacts/partials/contact-row.d.ts +4 -2
  38. package/dist/lib/components/ui/fields/contacts/partials/phone-sheet.d.ts +4 -2
  39. package/dist/lib/components/ui/fields/contacts/partials/quick-add.d.ts +4 -2
  40. package/dist/lib/components/ui/fields/contacts/partials/row-actions.d.ts +3 -1
  41. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  42. package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-field.d.ts +5 -0
  43. package/dist/lib/components/ui/media/upload/network-upload-field/partials/network-upload-field-items.d.ts +2 -1
  44. package/dist/lib/components/ui/media/upload/network-upload-field/upload-constraints.d.ts +10 -2
  45. package/dist/lib/components/ui/overlays/dialog/dialog-body-overflow.d.ts +7 -0
  46. package/dist/lib/components/ui/overlays/dialog/dialog-body.d.ts +10 -0
  47. package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +4 -0
  48. package/dist/lib/components/ui/overlays/dialog/dialog.d.ts +1 -0
  49. package/dist/lib/i18n/resources/en/en.d.ts +7 -0
  50. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -0
  51. package/dist/lib/i18n/resources/fr/fr.d.ts +7 -0
  52. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -0
  53. package/dist/lib/i18n/resources/resources.d.ts +14 -0
  54. package/dist/lib/i18n/translator.d.ts +1 -1
  55. package/dist/lib.js +1 -1
  56. package/dist/main.js +42 -42
  57. package/dist/map.js +8 -8
  58. package/dist/material.css +1 -1
  59. package/dist/pdf-reader.js +1 -1
  60. package/dist/print.js +1 -1
  61. package/dist/{public-BSaSCwy7.js → public-CFj2qn7l.js} +9 -9
  62. package/dist/{rich-code-block-BFVj1GWz.js → rich-code-block-B7Teg7-e.js} +5 -5
  63. package/dist/{sortable-provider-REwyjiOZ.js → sortable-provider-y5sFhRDj.js} +2 -2
  64. package/dist/{spinner-BFZxqdWC.js → spinner-C5Kb6MWu.js} +1 -1
  65. package/dist/theme-picker.js +2 -2
  66. package/dist/{theme-toggle-BHi6miz-.js → theme-toggle-B1JZg7mU.js} +1 -1
  67. package/dist/{toolbar-items-BTtoKVlx.js → toolbar-items-m_1FTFPQ.js} +3 -3
  68. package/dist/{translate-material-R-uLthBy.js → translate-material-D1ndrd7a.js} +1 -1
  69. package/dist/{translator-ClbXOGQO.js → translator-CtEC_AQa.js} +14 -0
  70. package/dist/{typography-v-PJ4Zco.js → typography-prQHb3gI.js} +1 -1
  71. package/dist/{use-chat-composer-Rhan4Xv0.js → use-chat-composer-DBiyNXvL.js} +16 -16
  72. package/dist/{use-heading-spy-CJnBkCY0.js → use-heading-spy-Bzj5mIUZ.js} +4 -4
  73. package/dist/{use-material-translation-CCWUeiEn.js → use-material-translation-C6H0B4kE.js} +1 -1
  74. package/dist/{use-return-focus-Duk40DZI.js → use-return-focus-CkUX1HFl.js} +1 -1
  75. package/docs/components/form-fields.md +63 -3
  76. package/docs/components/media-and-files.md +4 -1
  77. package/docs/components/overlays-and-menus.md +20 -1
  78. package/docs/guides/forms.md +8 -3
  79. package/docs/guides/i18n.md +1 -1
  80. package/docs/troubleshooting.md +79 -1
  81. package/lib/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
  82. package/package.json +3 -2
@@ -5,6 +5,7 @@ export type NetworkUploadFieldItemsProps = {
5
5
  inputId: string;
6
6
  multiple: boolean;
7
7
  accept?: string;
8
+ acceptLabel?: string;
8
9
  disabled?: boolean;
9
10
  error?: boolean;
10
11
  /** The drop zone's own error description, when it carries the error. */
@@ -13,4 +14,4 @@ export type NetworkUploadFieldItemsProps = {
13
14
  maxFiles?: number;
14
15
  };
15
16
  /** The field's files, then the drop zone while there is room for one more. */
16
- export declare function NetworkUploadFieldItems({ field, inputId, multiple, accept, disabled, error, errorId, maxSize, maxFiles, }: NetworkUploadFieldItemsProps): import("react").JSX.Element;
17
+ export declare function NetworkUploadFieldItems({ field, inputId, multiple, accept, acceptLabel, disabled, error, errorId, maxSize, maxFiles, }: NetworkUploadFieldItemsProps): import("react").JSX.Element;
@@ -1,11 +1,19 @@
1
1
  import { UploadMessageTranslate } from './network-upload-field.utils.js';
2
2
  export type UploadConstraintOptions = {
3
3
  accept?: string;
4
+ /** Replaces the names derived from `accept` in the limits line. */
5
+ acceptLabel?: string;
4
6
  maxSize?: number;
5
7
  maxFiles?: number;
6
8
  };
7
9
  /**
8
- * The drop zone's limits line, e.g. `image/* · Max 2 MB · Up to 3 files`,
10
+ * The `accept` list as short names: `image/jpeg,image/png` becomes
11
+ * `JPEG, PNG`, `image/*` becomes `Images`. Entries it does not know stay as
12
+ * given; repeats are shown once.
13
+ */
14
+ export declare function formatAcceptNames(accept: string, t: UploadMessageTranslate): string;
15
+ /**
16
+ * The drop zone's limits line, e.g. `Images · Max 2 MB · Up to 3 files`,
9
17
  * in the language `t` translates to. Empty when there is no limit.
10
18
  */
11
- export declare function formatUploadConstraints({ accept, maxSize, maxFiles }: UploadConstraintOptions, t: UploadMessageTranslate): string;
19
+ export declare function formatUploadConstraints({ accept, acceptLabel, maxSize, maxFiles }: UploadConstraintOptions, t: UploadMessageTranslate): string;
@@ -0,0 +1,7 @@
1
+ /** Sets `data-overflow-start` / `data-overflow-end` on a scroll box: content is hidden above / below. */
2
+ export declare function measureOverflow(el: HTMLElement): void;
3
+ /**
4
+ * Keeps the flags current while the box resizes, a child resizes, or a child
5
+ * is added or removed. Returns the cleanup that disconnects both observers.
6
+ */
7
+ export declare function watchOverflow(el: HTMLElement): () => void;
@@ -0,0 +1,10 @@
1
+ import { ComponentProps } from 'react';
2
+ /**
3
+ * The part of a long dialog that scrolls on its own: `DialogContent` becomes a
4
+ * clipped flex column around it, so the header and the `DialogFooter` stay in
5
+ * view. A hairline shows on the edge where content is hidden beneath the
6
+ * header or the footer, and not otherwise. Give it an `aria-label` or `aria-labelledby` and it is
7
+ * a named region.
8
+ */
9
+ declare function DialogBody({ className, children, onScroll, ref, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
10
+ export { DialogBody };
@@ -3,6 +3,10 @@ import { VariantProps } from 'class-variance-authority';
3
3
  * DialogContent's layout: centred, at most the viewport less a margin.
4
4
  * Its look and motion are `nxgt-dialog` (dialog.css), in the `components`
5
5
  * layer, so a utility in `className` still wins (`rounded-lg`, `bg-background`).
6
+ * With a `DialogBody` as a direct child it becomes a clipped flex column, so
7
+ * only the body scrolls; without one nothing changes. `--dialog-px` (1.5rem,
8
+ * the `p-6` side padding) is what the body bleeds by: set it with a `p-*` of
9
+ * your own (`p-4 [--dialog-px:1rem]`).
6
10
  */
7
11
  export declare const dialogContentVariants: (props?: ({
8
12
  size?: "lg" | "md" | "sm" | "xl" | "full" | null | undefined;
@@ -16,6 +16,7 @@ type DialogContentProps = ComponentProps<typeof DialogPrimitive.Content> & Dialo
16
16
  container?: HTMLElement | null;
17
17
  };
18
18
  declare function DialogContent({ className, children, onInteractOutside, onPointerDownOutside, onFocusOutside, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, size, mobilePresentation, scrim, container, ref, ...props }: DialogContentProps): import("react").JSX.Element;
19
+ export { DialogBody } from './dialog-body.js';
19
20
  export { DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from './dialog-parts.js';
20
21
  export type { DialogScrim } from './dialog-variants.js';
21
22
  export type { DialogContentProps };
@@ -119,6 +119,13 @@ export declare const en: {
119
119
  "on-this-page": string;
120
120
  };
121
121
  upload: {
122
+ accept: {
123
+ images: string;
124
+ audio: string;
125
+ video: string;
126
+ text: string;
127
+ application: string;
128
+ };
122
129
  dropzone: {
123
130
  idle: string;
124
131
  "at-capacity": string;
@@ -109,6 +109,13 @@ declare const _default: {
109
109
  "on-this-page": "On this page"
110
110
  },
111
111
  "upload": {
112
+ "accept": {
113
+ "images": "Images",
114
+ "audio": "Audio",
115
+ "video": "Videos",
116
+ "text": "Text files",
117
+ "application": "Documents"
118
+ },
112
119
  "dropzone": {
113
120
  "idle": "Drag & drop files here, or click to browse",
114
121
  "at-capacity": "Maximum number of files reached",
@@ -119,6 +119,13 @@ export declare const fr: {
119
119
  "on-this-page": string;
120
120
  };
121
121
  upload: {
122
+ accept: {
123
+ images: string;
124
+ audio: string;
125
+ video: string;
126
+ text: string;
127
+ application: string;
128
+ };
122
129
  dropzone: {
123
130
  idle: string;
124
131
  "at-capacity": string;
@@ -109,6 +109,13 @@ declare const _default: {
109
109
  "on-this-page": "Sur cette page"
110
110
  },
111
111
  "upload": {
112
+ "accept": {
113
+ "images": "Images",
114
+ "audio": "Audio",
115
+ "video": "Vidéos",
116
+ "text": "Fichiers texte",
117
+ "application": "Documents"
118
+ },
112
119
  "dropzone": {
113
120
  "idle": "Glissez-déposez des fichiers ici, ou cliquez pour parcourir",
114
121
  "at-capacity": "Nombre maximum de fichiers atteint",
@@ -117,6 +117,13 @@ export declare const resources: {
117
117
  "on-this-page": string;
118
118
  };
119
119
  upload: {
120
+ accept: {
121
+ images: string;
122
+ audio: string;
123
+ video: string;
124
+ text: string;
125
+ application: string;
126
+ };
120
127
  dropzone: {
121
128
  idle: string;
122
129
  "at-capacity": string;
@@ -3158,6 +3165,13 @@ export declare const resources: {
3158
3165
  "on-this-page": string;
3159
3166
  };
3160
3167
  upload: {
3168
+ accept: {
3169
+ images: string;
3170
+ audio: string;
3171
+ video: string;
3172
+ text: string;
3173
+ application: string;
3174
+ };
3161
3175
  dropzone: {
3162
3176
  idle: string;
3163
3177
  "at-capacity": string;