@nxgt/material 3.70.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 (151) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +9 -6
  3. package/dist/{alert-dialog-CBkWG32g.js → alert-dialog-A8K8zai1.js} +1 -1
  4. package/dist/{async-slice-CNZ3N55P.js → async-slice-B8933IHY.js} +1 -1
  5. package/dist/{button-D3qzqDY_.js → button-C8moFnIT.js} +1 -1
  6. package/dist/charts.js +3 -3
  7. package/dist/{chip-CMTe4sQd.js → chip-B6AY1E91.js} +2 -2
  8. package/dist/{code-editor-Cs7mz1J-.js → code-editor-DQZIKL54.js} +5 -5
  9. package/dist/code-editor.js +5 -5
  10. package/dist/{code-language-items-D_QMgjVy.js → code-language-items-8VL0aMKG.js} +2 -2
  11. package/dist/components/ui/collections/server-table/server-table-phone-row.css +6 -0
  12. package/dist/components/ui/display/code/code-moonlight.css +37 -0
  13. package/dist/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
  14. package/dist/{components-BbWcozcj.js → components-EHdmrvV4.js} +20862 -19924
  15. package/dist/components.js +28 -28
  16. package/dist/{dialog-B3BSdRci.js → dialog-WuLTwxkr.js} +5 -5
  17. package/dist/dnd.js +1 -1
  18. package/dist/{dropdown-menu-BaupOWgS.js → dropdown-menu-tadySeGH.js} +1 -1
  19. package/dist/editor.js +35 -35
  20. package/dist/{empty-state-B2Um5UpI.js → empty-state-ZYiFSSBQ.js} +2 -2
  21. package/dist/{field-blur-1XLyxRPr.js → field-blur-BYR0yE5L.js} +1 -1
  22. package/dist/{field-blur-context-XNvCDnMT.js → field-blur-context-bEhByoK-.js} +1 -1
  23. package/dist/{hooks-BU21Jpaa.js → hooks-GpwD8iDu.js} +2 -2
  24. package/dist/hooks.js +3 -3
  25. package/dist/{hover-card-Bvm3svX9.js → hover-card-BowaI_ra.js} +1 -1
  26. package/dist/i18n.js +3 -3
  27. package/dist/{icon-badge-wip9bfa2.js → icon-badge-B1B0Lg02.js} +3 -3
  28. package/dist/{icon-button-QwIeBTdw.js → icon-button-BbGU17cb.js} +1 -1
  29. package/dist/lib/components/ui/actions/fab/fab-dock-inset.d.ts +29 -0
  30. package/dist/lib/components/ui/actions/fab/fab-dock.d.ts +6 -1
  31. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +3 -2
  32. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +3 -0
  33. package/dist/lib/components/ui/collections/index.d.ts +1 -0
  34. package/dist/lib/components/ui/collections/record-actions-menu/index.d.ts +2 -0
  35. package/dist/lib/components/ui/collections/record-actions-menu/record-actions-dialogs.d.ts +15 -0
  36. package/dist/lib/components/ui/collections/record-actions-menu/record-actions-menu.d.ts +72 -0
  37. package/dist/lib/components/ui/collections/record-actions-menu/record-actions-rules.d.ts +68 -0
  38. package/dist/lib/components/ui/collections/record-actions-menu/record-actions-words.d.ts +52 -0
  39. package/dist/lib/components/ui/collections/record-actions-menu/use-record-actions.d.ts +51 -0
  40. package/dist/lib/components/ui/collections/record-actions-menu/use-record-flight.d.ts +16 -0
  41. package/dist/lib/components/ui/collections/row-menu/row-menu-column.d.ts +4 -0
  42. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
  43. package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +7 -5
  44. package/dist/lib/components/ui/collections/server-table/partials/server-table-column-sorting.d.ts +7 -0
  45. package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -1
  46. package/dist/lib/components/ui/display/markdown/markdown.d.ts +12 -1
  47. package/dist/lib/components/ui/display/markdown/markdown.utils.d.ts +2 -0
  48. package/dist/lib/components/ui/display/markdown/mermaid-csp-scope.d.ts +8 -0
  49. package/dist/lib/components/ui/display/markdown/mermaid-markup.d.ts +20 -0
  50. package/dist/lib/components/ui/display/markdown/partials/markdown-code.d.ts +5 -1
  51. package/dist/lib/components/ui/feedback/confirm-dialog/action-refusal.d.ts +24 -0
  52. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-alert.d.ts +17 -0
  53. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-description.d.ts +10 -0
  54. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +24 -2
  55. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-refusal.d.ts +7 -0
  56. package/dist/lib/components/ui/feedback/confirm-dialog/index.d.ts +1 -0
  57. package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +6 -0
  58. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  59. package/dist/lib/components/ui/feedback/stale-notice/index.d.ts +1 -0
  60. package/dist/lib/components/ui/feedback/stale-notice/stale-notice.d.ts +15 -0
  61. package/dist/lib/components/ui/fields/attributes/attribute-values-form-field-set/attribute-values-form-field-set.d.ts +5 -1
  62. package/dist/lib/components/ui/fields/contacts/contact-dialog.d.ts +8 -2
  63. package/dist/lib/components/ui/fields/contacts/contacts-dialog-form-field.d.ts +4 -1
  64. package/dist/lib/components/ui/fields/contacts/contacts-editor.d.ts +15 -2
  65. package/dist/lib/components/ui/fields/contacts/contacts-form-field.d.ts +6 -1
  66. package/dist/lib/components/ui/fields/contacts/logic/offered-types.d.ts +3 -0
  67. package/dist/lib/components/ui/fields/contacts/models.d.ts +2 -0
  68. package/dist/lib/components/ui/fields/contacts/partials/contact-fields.d.ts +4 -2
  69. package/dist/lib/components/ui/fields/contacts/partials/contact-groups.d.ts +4 -2
  70. package/dist/lib/components/ui/fields/contacts/partials/contact-row.d.ts +4 -2
  71. package/dist/lib/components/ui/fields/contacts/partials/phone-sheet.d.ts +4 -2
  72. package/dist/lib/components/ui/fields/contacts/partials/quick-add.d.ts +4 -2
  73. package/dist/lib/components/ui/fields/contacts/partials/row-actions.d.ts +3 -1
  74. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  75. package/dist/lib/components/ui/forms/index.d.ts +1 -0
  76. package/dist/lib/components/ui/forms/use-server-field-errors.d.ts +21 -0
  77. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  78. package/dist/lib/components/ui/layout/record-page/index.d.ts +2 -0
  79. package/dist/lib/components/ui/layout/record-page/record-details.d.ts +40 -0
  80. package/dist/lib/components/ui/layout/record-page/record-page.d.ts +27 -0
  81. package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-field.d.ts +5 -0
  82. package/dist/lib/components/ui/media/upload/network-upload-field/partials/network-upload-field-items.d.ts +2 -1
  83. package/dist/lib/components/ui/media/upload/network-upload-field/upload-constraints.d.ts +10 -2
  84. package/dist/lib/components/ui/overlays/dialog/dialog-body-overflow.d.ts +7 -0
  85. package/dist/lib/components/ui/overlays/dialog/dialog-body.d.ts +10 -0
  86. package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +4 -0
  87. package/dist/lib/components/ui/overlays/dialog/dialog.d.ts +1 -0
  88. package/dist/lib/components/ui/widgets/chat/chat-conversation-item.d.ts +8 -2
  89. package/dist/lib/components/ui/widgets/chat/chat-markdown.d.ts +4 -0
  90. package/dist/lib/components/ui/widgets/chat/chat-message-list.d.ts +8 -1
  91. package/dist/lib/components/ui/widgets/chat/index.d.ts +2 -0
  92. package/dist/lib/components/ui/widgets/chat/partials/chat-conversation-item-text.d.ts +2 -1
  93. package/dist/lib/components/ui/widgets/chat/partials/chat-empty-thread.d.ts +2 -0
  94. package/dist/lib/components/ui/widgets/chat/proposal/chat-action-proposal-parts.d.ts +24 -0
  95. package/dist/lib/components/ui/widgets/chat/proposal/chat-action-proposal.d.ts +39 -0
  96. package/dist/lib/components/ui/widgets/chat/proposal/chat-action-proposal.rules.d.ts +17 -0
  97. package/dist/lib/components/ui/widgets/chat/proposal/chat-tool-activity.d.ts +16 -0
  98. package/dist/lib/i18n/resources/en/en.d.ts +47 -0
  99. package/dist/lib/i18n/resources/en/material.json.d.ts +47 -0
  100. package/dist/lib/i18n/resources/fr/fr.d.ts +47 -0
  101. package/dist/lib/i18n/resources/fr/material.json.d.ts +47 -0
  102. package/dist/lib/i18n/resources/resources.d.ts +94 -0
  103. package/dist/lib/i18n/translator.d.ts +1 -1
  104. package/dist/lib/print/output/to-pdf-element.d.ts +6 -0
  105. package/dist/lib.js +1 -1
  106. package/dist/main.js +42 -42
  107. package/dist/map.js +8 -8
  108. package/dist/material.css +1 -1
  109. package/dist/pdf-reader.js +1 -1
  110. package/dist/print.js +135 -131
  111. package/dist/{public-BuGgOtAl.js → public-CFj2qn7l.js} +9 -9
  112. package/dist/{rich-code-block-DdHqzzek.js → rich-code-block-B7Teg7-e.js} +5 -5
  113. package/dist/{sortable-provider-DMyaSfZZ.js → sortable-provider-y5sFhRDj.js} +2 -2
  114. package/dist/{spinner-ByYdcukU.js → spinner-C5Kb6MWu.js} +1 -1
  115. package/dist/theme-picker.js +2 -2
  116. package/dist/{theme-toggle-DB3aZZnO.js → theme-toggle-B1JZg7mU.js} +1 -1
  117. package/dist/{toolbar-items-DbzIKjo7.js → toolbar-items-m_1FTFPQ.js} +3 -3
  118. package/dist/{translate-material-Dh7MYkHT.js → translate-material-D1ndrd7a.js} +1 -1
  119. package/dist/{translator-Byhohi1S.js → translator-CtEC_AQa.js} +94 -0
  120. package/dist/{typography-rUf0mE5a.js → typography-prQHb3gI.js} +1 -1
  121. package/dist/{use-chat-composer-uUUTRB3Z.js → use-chat-composer-DBiyNXvL.js} +107 -107
  122. package/dist/{use-heading-spy-CVzW2NM3.js → use-heading-spy-Bzj5mIUZ.js} +179 -87
  123. package/dist/{use-material-translation-BAYyZOcH.js → use-material-translation-C6H0B4kE.js} +1 -1
  124. package/dist/{use-return-focus-CQAuk9kh.js → use-return-focus-CkUX1HFl.js} +1 -1
  125. package/docs/components/buttons-and-actions.md +24 -0
  126. package/docs/components/data-display.md +33 -0
  127. package/docs/components/data-table-filter-and-lists.md +117 -5
  128. package/docs/components/feedback-and-status.md +58 -2
  129. package/docs/components/form-fields.md +63 -3
  130. package/docs/components/media-and-files.md +4 -1
  131. package/docs/components/navigation-and-layout.md +58 -0
  132. package/docs/components/overlays-and-menus.md +20 -1
  133. package/docs/components/rich-widgets.md +35 -2
  134. package/docs/guides/cards-and-tiles.md +4 -2
  135. package/docs/guides/csp.md +44 -6
  136. package/docs/guides/forms.md +59 -7
  137. package/docs/guides/i18n.md +7 -6
  138. package/docs/guides/printing.md +17 -7
  139. package/docs/previews/data-table-filter-lists-recordactionsmenu.webp +0 -0
  140. package/docs/previews/feedback-status-stalenotice.webp +0 -0
  141. package/docs/previews/media-files-networkuploadfield.webp +0 -0
  142. package/docs/previews/media-files-s3uploadfield.webp +0 -0
  143. package/docs/previews/media-files-uploadfield.webp +0 -0
  144. package/docs/previews/navigation-layout-recordpage.webp +0 -0
  145. package/docs/previews/rich-widgets-chat-action-proposal.webp +0 -0
  146. package/docs/roadmap.md +11 -1
  147. package/docs/troubleshooting.md +126 -8
  148. package/lib/components/ui/collections/server-table/server-table-phone-row.css +6 -0
  149. package/lib/components/ui/display/code/code-moonlight.css +37 -0
  150. package/lib/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
  151. package/package.json +3 -2
@@ -3,10 +3,14 @@ import { Control, Path } from 'react-hook-form';
3
3
  import { Attribute } from '../models/attribute.js';
4
4
  export interface AttributeValuesFormFieldSetProps<T extends Record<string, any>> {
5
5
  attributes: Attribute[];
6
+ /** Used only while the form value at `name` is empty (undefined, null or `{}`). */
6
7
  defaultValues?: Record<string, any>;
7
8
  control: Control<T>;
8
9
  name: Path<T>;
9
10
  className?: string;
11
+ /** The set's accessible name; drawn as a heading unless `hideLabel`. */
10
12
  label: ReactNode;
13
+ /** Keep `label` as the group's accessible name but draw nothing, e.g. under a `FormSection` that already titles it. */
14
+ hideLabel?: boolean;
11
15
  }
12
- export declare function AttributeValuesFormFieldSet<T extends Record<string, Attribute>>({ attributes, defaultValues, name, control, label, className, }: AttributeValuesFormFieldSetProps<T>): import("react").JSX.Element;
16
+ export declare function AttributeValuesFormFieldSet<T extends Record<string, Attribute>>({ attributes, defaultValues, name, control, label, hideLabel, className, }: AttributeValuesFormFieldSetProps<T>): import("react").JSX.Element;
@@ -1,13 +1,19 @@
1
1
  import { ButtonVariant } from '../../actions/button/button.js';
2
- import { Contact } from './models.js';
2
+ import { Contact, ContactTypeName } from './models.js';
3
3
  export type ContactDialogProps = {
4
4
  open: boolean;
5
5
  onOpenChange: (open: boolean) => void;
6
6
  contact?: Contact | null;
7
7
  onSave: (contact: Contact) => void;
8
8
  onDelete?: () => void;
9
+ /**
10
+ * The contact types offered by the type select, in the order given; every
11
+ * type by default. A new contact starts with the first one, and an edited
12
+ * contact keeps its own type in the list.
13
+ */
14
+ types?: readonly ContactTypeName[];
9
15
  disabled?: boolean;
10
16
  /** The Cancel button's variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
11
17
  cancelVariant?: ButtonVariant;
12
18
  };
13
- export declare function ContactDialog({ open, onOpenChange, contact, onSave, onDelete, disabled, cancelVariant, }: ContactDialogProps): import("react").JSX.Element;
19
+ export declare function ContactDialog({ open, onOpenChange, contact, onSave, onDelete, types, disabled, cancelVariant, }: ContactDialogProps): import("react").JSX.Element;
@@ -1,12 +1,15 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { UseControllerProps } from 'react-hook-form';
3
3
  import { ButtonVariant } from '../../actions/button/button.js';
4
+ import { ContactTypeName } from './models.js';
4
5
  export type ContactsDialogFieldProps<T extends Record<string, any>> = Pick<UseControllerProps<T>, 'control' | 'name'> & {
5
6
  className?: string;
6
7
  disabled?: boolean;
7
8
  label?: string;
9
+ /** The contact types the dialog offers; every type by default. */
10
+ types?: readonly ContactTypeName[];
8
11
  /** The dialog's Cancel button variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
9
12
  cancelVariant?: ButtonVariant;
10
13
  } & Omit<ComponentProps<'div'>, 'name'>;
11
14
  /** `ContactsFormField` with `editing="dialog"`: a list, and a dialog per contact. */
12
- export declare function ContactsDialogField<T extends Record<string, any>>({ control, name, className, disabled, label, cancelVariant, ...props }: ContactsDialogFieldProps<T>): import("react").JSX.Element;
15
+ export declare function ContactsDialogField<T extends Record<string, any>>({ control, name, className, disabled, label, types, cancelVariant, ...props }: ContactsDialogFieldProps<T>): import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { HeadingLevel } from '../inline-editor/editor-header.js';
3
- import { Contact } from './models.js';
3
+ import { Contact, ContactTypeName } from './models.js';
4
4
  export type ContactsEditorProps = {
5
5
  value?: Contact[];
6
6
  onValueChange?: (value: Contact[]) => void;
@@ -14,6 +14,19 @@ export type ContactsEditorProps = {
14
14
  * the primary one. The fields keep the library's field radius in both.
15
15
  */
16
16
  variant?: 'list' | 'cards';
17
+ /**
18
+ * The contact types offered by the "Add" chips and the type menu, in the
19
+ * order given for the menu; every type by default. A contact already in
20
+ * the value with another type is kept and shown, and its type stays in
21
+ * its own menu so nothing is changed silently.
22
+ */
23
+ types?: readonly ContactTypeName[];
24
+ /**
25
+ * Whether contacts can be marked primary (the star); `true` by default.
26
+ * `false` hides the star and the primary marks; a `primary` flag already
27
+ * in the value is left untouched.
28
+ */
29
+ primary?: boolean;
17
30
  disabled?: boolean;
18
31
  className?: string;
19
32
  };
@@ -26,4 +39,4 @@ export type ContactsEditorProps = {
26
39
  * row that opens a bottom sheet with the same fields. It holds the value model
27
40
  * of `Contacts` (`primary` is an optional addition).
28
41
  */
29
- export declare function ContactsEditor({ value, onValueChange, label, headingLevel, variant, disabled, className, }: ContactsEditorProps): import("react").JSX.Element;
42
+ export declare function ContactsEditor({ value, onValueChange, label, headingLevel, variant, types, primary, disabled, className, }: ContactsEditorProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { UseControllerProps } from 'react-hook-form';
3
3
  import { ButtonVariant } from '../../actions/button/button.js';
4
+ import { ContactTypeName } from './models.js';
4
5
  export type ContactsFormFieldProps<T extends Record<string, any>> = Pick<UseControllerProps<T>, 'control' | 'name'> & {
5
6
  className?: string;
6
7
  disabled?: boolean;
@@ -13,6 +14,10 @@ export type ContactsFormFieldProps<T extends Record<string, any>> = Pick<UseCont
13
14
  editing?: 'inline' | 'dialog';
14
15
  /** `editing="inline"` only: `'list'` (default) or `'cards'`. */
15
16
  variant?: 'list' | 'cards';
17
+ /** The contact types offered, e.g. `['EMAIL', 'PHONE']`; every type by default. */
18
+ types?: readonly ContactTypeName[];
19
+ /** `editing="inline"` only (the dialog has no star): `false` hides the primary star and marks; `true` by default. */
20
+ primary?: boolean;
16
21
  /** `editing="dialog"` only: the dialog's Cancel button variant. Default `'tonal'`. */
17
22
  cancelVariant?: ButtonVariant;
18
23
  } & Omit<ComponentProps<'div'>, 'name'>;
@@ -21,4 +26,4 @@ export type ContactsFormFieldProps<T extends Record<string, any>> = Pick<UseCont
21
26
  * primary? }`). Inline by default; `editing="dialog"` is today's list and
22
27
  * dialog.
23
28
  */
24
- export declare function ContactsFormField<T extends Record<string, any>>({ editing, variant, cancelVariant, ...props }: ContactsFormFieldProps<T>): import("react").JSX.Element;
29
+ export declare function ContactsFormField<T extends Record<string, any>>({ editing, variant, types, primary, cancelVariant, ...props }: ContactsFormFieldProps<T>): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ContactType, ContactTypeName } from '../models.js';
2
+ /** The menu's types: those offered, plus the contact's own when it is another. */
3
+ export declare function offeredTypes(types: readonly ContactTypeName[] | undefined, current?: ContactType): ContactType[];
@@ -30,3 +30,5 @@ export type ContactFieldValue = {
30
30
  label?: string;
31
31
  primary?: boolean;
32
32
  };
33
+ /** A contact type as the enum or its string value: `ContactType.Email` or `'EMAIL'`. */
34
+ export type ContactTypeName = `${ContactType}`;
@@ -1,4 +1,4 @@
1
- import { Contact } from '../models.js';
1
+ import { Contact, ContactTypeName } from '../models.js';
2
2
  import { ContactText } from '../use-contact-text.js';
3
3
  type ContactFieldsProps = {
4
4
  text: ContactText;
@@ -15,6 +15,8 @@ type ContactFieldsProps = {
15
15
  focusKey: (name: string) => string;
16
16
  /** Each contact's place in its type's group, 1-based: the accessible names. */
17
17
  positions: ReadonlyMap<number, number>;
18
+ /** The types offered by the menu; every type by default. */
19
+ types?: readonly ContactTypeName[];
18
20
  disabled?: boolean;
19
21
  /** One column: the sheet's layout. */
20
22
  stacked?: boolean;
@@ -25,5 +27,5 @@ type ContactFieldsProps = {
25
27
  * belong to the value: a wrong format, a duplicate or, once left, an empty
26
28
  * value. Each message is a `role="alert"` linked to the value field.
27
29
  */
28
- export declare function ContactFields({ text, contact, index, items, rowId, left, onLeave, focusKey, positions, disabled, stacked, onChange, }: ContactFieldsProps): import("react").JSX.Element;
30
+ export declare function ContactFields({ text, contact, index, items, rowId, left, onLeave, focusKey, positions, types, disabled, stacked, onChange, }: ContactFieldsProps): import("react").JSX.Element;
29
31
  export {};
@@ -1,6 +1,6 @@
1
1
  import { HeadingLevel } from '../../inline-editor/editor-header.js';
2
2
  import { groupContacts } from '../logic/primary.js';
3
- import { Contact } from '../models.js';
3
+ import { Contact, ContactTypeName } from '../models.js';
4
4
  import { ContactText } from '../use-contact-text.js';
5
5
  import { ContactsEditorState } from '../use-contacts-editor.js';
6
6
  type ContactGroupsProps = {
@@ -13,8 +13,10 @@ type ContactGroupsProps = {
13
13
  headingLevel?: HeadingLevel;
14
14
  /** A phone shows summary rows that open the sheet. */
15
15
  phone: boolean;
16
+ types?: readonly ContactTypeName[];
17
+ primary?: boolean;
16
18
  disabled?: boolean;
17
19
  };
18
20
  /** The contacts of each type: full rows, or on a phone summary rows. */
19
- export declare function ContactGroups({ text, editor, items, groups, positions, variant, headingLevel, phone, disabled, }: ContactGroupsProps): import("react").JSX.Element[];
21
+ export declare function ContactGroups({ text, editor, items, groups, positions, variant, headingLevel, phone, types, primary, disabled, }: ContactGroupsProps): import("react").JSX.Element[];
20
22
  export {};
@@ -1,4 +1,4 @@
1
- import { Contact } from '../models.js';
1
+ import { Contact, ContactTypeName } from '../models.js';
2
2
  import { ContactText } from '../use-contact-text.js';
3
3
  import { ContactsEditorState } from '../use-contacts-editor.js';
4
4
  export type ContactRowProps = {
@@ -8,7 +8,9 @@ export type ContactRowProps = {
8
8
  index: number;
9
9
  positions: ReadonlyMap<number, number>;
10
10
  variant: 'list' | 'cards';
11
+ types?: readonly ContactTypeName[];
12
+ primary?: boolean;
11
13
  disabled?: boolean;
12
14
  };
13
15
  /** One contact on a tablet or a desktop: its icon, its fields and its actions. */
14
- export declare function ContactRow({ text, editor, items, index, positions, variant, disabled, }: ContactRowProps): import("react").JSX.Element;
16
+ export declare function ContactRow({ text, editor, items, index, positions, variant, types, primary: withPrimary, disabled, }: ContactRowProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Contact } from '../models.js';
1
+ import { Contact, ContactTypeName } from '../models.js';
2
2
  import { ContactText } from '../use-contact-text.js';
3
3
  import { ContactsEditorState } from '../use-contacts-editor.js';
4
4
  type PhoneSheetProps = {
@@ -7,8 +7,10 @@ type PhoneSheetProps = {
7
7
  items: Contact[];
8
8
  positions: ReadonlyMap<number, number>;
9
9
  variant: 'list' | 'cards';
10
+ types?: readonly ContactTypeName[];
11
+ primary?: boolean;
10
12
  disabled?: boolean;
11
13
  };
12
14
  /** A phone's editor for one contact: the same fields and actions, in a bottom sheet. */
13
- export declare function PhoneSheet({ text, editor, items, positions, variant, disabled, }: PhoneSheetProps): import("react").JSX.Element;
15
+ export declare function PhoneSheet({ text, editor, items, positions, variant, types, primary, disabled, }: PhoneSheetProps): import("react").JSX.Element;
14
16
  export {};
@@ -1,12 +1,14 @@
1
- import { ContactType } from '../models.js';
1
+ import { ContactType, ContactTypeName } from '../models.js';
2
2
  import { ContactText } from '../use-contact-text.js';
3
3
  type QuickAddProps = {
4
4
  text: ContactText;
5
+ /** The types offered; every type by default. */
6
+ types?: readonly ContactTypeName[];
5
7
  disabled?: boolean;
6
8
  /** The scoped focus key of a control, so a remove can return to the chip. */
7
9
  focusKey: (name: string) => string;
8
10
  onAdd: (type: ContactType) => void;
9
11
  };
10
12
  /** "Add Contact" and one chip per type: adds an empty contact of that type. */
11
- export declare function QuickAdd({ text: { t, typeName }, disabled, focusKey, onAdd, }: QuickAddProps): import("react").JSX.Element;
13
+ export declare function QuickAdd({ text: { t, typeName }, types, disabled, focusKey, onAdd, }: QuickAddProps): import("react").JSX.Element;
12
14
  export {};
@@ -7,10 +7,12 @@ type RowActionsProps = {
7
7
  position: number;
8
8
  /** The star's scoped focus key, so focus can return to it after the row moves. */
9
9
  starFocusKey?: string;
10
+ /** Hides the star (primary marks are off). */
11
+ hidePrimary?: boolean;
10
12
  disabled?: boolean;
11
13
  onPrimary: () => void;
12
14
  onRemove: () => void;
13
15
  };
14
16
  /** The star that makes a contact the primary one of its type, and the trash. */
15
- export declare function RowActions({ text: { t }, primary, typeName, position, starFocusKey, disabled, onPrimary, onRemove, }: RowActionsProps): import("react").JSX.Element;
17
+ export declare function RowActions({ text: { t }, primary, typeName, position, starFocusKey, hidePrimary, disabled, onPrimary, onRemove, }: RowActionsProps): import("react").JSX.Element;
16
18
  export {};