@nxgt/material 3.50.0 → 3.52.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 (95) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{async-slice-3loEtzUY.js → async-slice-BGtmF3K5.js} +2 -2
  3. package/dist/{button-BRUaHD8z.js → button-Ct0KRBsN.js} +1 -1
  4. package/dist/charts.js +3 -3
  5. package/dist/{chip-DneTrtNj.js → chip-Ca1SEd70.js} +2 -2
  6. package/dist/{code-editor-R_nPN_-d.js → code-editor-DtwRhK8B.js} +6 -6
  7. package/dist/code-editor.js +5 -5
  8. package/dist/{code-language-items-BKEUhQlF.js → code-language-items-CEclGxhA.js} +2 -2
  9. package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
  10. package/dist/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
  11. package/dist/{components-D6xFLcoE.js → components-CzELzsOi.js} +6006 -5824
  12. package/dist/components.js +19 -19
  13. package/dist/{dialog-S7dLsYRZ.js → dialog-BIy04Hpd.js} +4 -4
  14. package/dist/dnd.js +1 -1
  15. package/dist/{dropdown-menu-XLlxfDgq.js → dropdown-menu-B0Kd8x3G.js} +1 -1
  16. package/dist/editor.js +9 -9
  17. package/dist/{empty-state-Dsf6R-Zo.js → empty-state-CKxORwFE.js} +2 -2
  18. package/dist/{escape-owner-B9eCwjLw.js → escape-owner-BGKjiglh.js} +1 -1
  19. package/dist/{field-blur-5uRDFHvB.js → field-blur-Dz1zPaYK.js} +1 -1
  20. package/dist/{field-blur-context-Cwt4TuBq.js → field-blur-context-1T6GkSNc.js} +1 -1
  21. package/dist/hooks.js +2 -2
  22. package/dist/{hover-card-PHUgRSjJ.js → hover-card-BwQ9IRxa.js} +2 -2
  23. package/dist/{i18n-provider-DPM_ALQ4.js → i18n-provider-BFNrM0Qu.js} +14 -12
  24. package/dist/i18n.js +5 -5
  25. package/dist/{icon-badge-Dh6-FNOF.js → icon-badge-D5Ns7ndZ.js} +3 -3
  26. package/dist/{icon-button-DSC2-IAG.js → icon-button-VzdqY_Tv.js} +1 -1
  27. package/dist/lib/components/ui/collections/data-table/data-table-selection-host.d.ts +7 -0
  28. package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
  29. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +2 -1
  30. package/dist/lib/components/ui/collections/server-table/partials/filtered-server-table.d.ts +9 -0
  31. package/dist/lib/components/ui/collections/server-table/partials/server-table-band-view.d.ts +18 -0
  32. package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +10 -1
  33. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +3 -2
  34. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts +4 -2
  35. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk.d.ts +2 -1
  36. package/dist/lib/components/ui/collections/server-table/partials/server-table-controls.d.ts +16 -0
  37. package/dist/lib/components/ui/collections/server-table/partials/server-table-grid.d.ts +3 -1
  38. package/dist/lib/components/ui/collections/server-table/partials/server-table-selection-bar.d.ts +17 -0
  39. package/dist/lib/components/ui/collections/server-table/partials/server-table-view.d.ts +15 -0
  40. package/dist/lib/components/ui/collections/server-table/partials/use-server-table-list-root.d.ts +10 -0
  41. package/dist/lib/components/ui/collections/server-table/partials/use-server-table-phone-row.d.ts +15 -0
  42. package/dist/lib/components/ui/collections/server-table/partials/use-server-table-selection-slots.d.ts +24 -0
  43. package/dist/lib/components/ui/collections/server-table/use-selection-band.d.ts +14 -0
  44. package/dist/lib/components/ui/display/change-history/types.d.ts +2 -1
  45. package/dist/lib/components/ui/display/description/description.d.ts +2 -2
  46. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  47. package/dist/lib/components/ui/fields/verification-code/use-resend-focus.d.ts +4 -1
  48. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +12 -1
  49. package/dist/lib/components/ui/primitives/tabs/tabs-overflow-classes.d.ts +8 -5
  50. package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -3
  51. package/dist/lib/i18n/i18n-provider.d.ts +14 -3
  52. package/dist/lib/i18n/resources/en/en.d.ts +3 -0
  53. package/dist/lib/i18n/resources/en/material.json.d.ts +4 -1
  54. package/dist/lib/i18n/resources/fr/fr.d.ts +3 -0
  55. package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -1
  56. package/dist/lib/i18n/resources/resources.d.ts +6 -0
  57. package/dist/lib/i18n/translate-material.d.ts +7 -1
  58. package/dist/lib/i18n/translator.d.ts +1 -1
  59. package/dist/lib/i18n/types.d.ts +6 -0
  60. package/dist/lib/i18n/use-material-translation.d.ts +4 -0
  61. package/dist/lib.js +1 -1
  62. package/dist/main.js +25 -25
  63. package/dist/map.js +8 -8
  64. package/dist/material.css +1 -1
  65. package/dist/pdf-reader.js +1 -1
  66. package/dist/print.js +5 -4
  67. package/dist/{public-vxiijIJF.js → public-D-J3nZFm.js} +9 -9
  68. package/dist/{rich-code-block-BwvCXPqq.js → rich-code-block-Ig0ERAa2.js} +5 -5
  69. package/dist/{sortable-provider-D2pAFWQB.js → sortable-provider-DfPkSN90.js} +2 -2
  70. package/dist/{spinner-BpVwI1ps.js → spinner-KQb3YuR_.js} +1 -1
  71. package/dist/{stored-language-Beyj2ult.js → stored-language-Cb9FMEwk.js} +8 -2
  72. package/dist/theme-picker.js +2 -2
  73. package/dist/{theme-toggle-BTYRPkP4.js → theme-toggle-BY-SpsFV.js} +1 -1
  74. package/dist/{toolbar-items-CIMo4F9q.js → toolbar-items-30w9rG5h.js} +4 -4
  75. package/dist/translate-material-BPl8TQLg.js +20 -0
  76. package/dist/{translator-CBgIb3zP.js → translator-BnQXtpSZ.js} +1 -1
  77. package/dist/{use-chat-composer-D8UAsX0f.js → use-chat-composer-BSKJRYMB.js} +1678 -1656
  78. package/dist/{use-heading-spy-C5LXtA8Z.js → use-heading-spy-BgXA8uz6.js} +1 -1
  79. package/dist/use-material-translation-ByM3gD9R.js +14 -0
  80. package/docs/components/data-display.md +3 -3
  81. package/docs/components/data-table-filter-and-lists.md +38 -5
  82. package/docs/components/primitives.md +1 -1
  83. package/docs/guides/backgrounds.md +3 -1
  84. package/docs/guides/cards-and-tiles.md +3 -0
  85. package/docs/guides/helpers.md +1 -1
  86. package/docs/guides/i18n.md +30 -8
  87. package/docs/guides/two-factor.md +2 -1
  88. package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
  89. package/docs/previews/guides-i18n-translated-components.webp +0 -0
  90. package/docs/troubleshooting.md +3 -2
  91. package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
  92. package/lib/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
  93. package/package.json +1 -1
  94. package/dist/translate-material-DEUlaL_1.js +0 -12
  95. package/dist/use-material-translation-DWWeeg-B.js +0 -14
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { ResourceBundle } from './merge-resources.js';
2
3
  import { I18nContextValue, Language } from './types.js';
3
4
  export type I18nProviderProps = {
4
5
  children: ReactNode;
@@ -18,6 +19,14 @@ export type I18nProviderProps = {
18
19
  * agree and no hydration guard is needed downstream.
19
20
  */
20
21
  initialLanguage?: Language;
22
+ /**
23
+ * The app's resources, `mergeResources(materialResources, appResources)`.
24
+ * The components translate their `material.*` words through them, so an app
25
+ * override reaches them; leave it out and they read the base bundle. Pass a
26
+ * stable object (module scope): a new object on each render rebuilds the
27
+ * translators.
28
+ */
29
+ resources?: ResourceBundle;
21
30
  };
22
31
  /**
23
32
  * I18nProvider - Shares the current language across the whole React tree.
@@ -27,8 +36,10 @@ export type I18nProviderProps = {
27
36
  * `useState`/`useLocalStorage`, so no `window.location.reload()` is needed
28
37
  * after `changeLanguage`.
29
38
  *
30
- * Only language state is shared — resource bundles stay static module imports
31
- * inside each app, and are passed to `createTranslator` once.
39
+ * Language state is shared, and so are the app's resources when given through
40
+ * `resources`: the components then read their `material.*` words from them.
41
+ * Resource bundles otherwise stay static module imports inside each app, and
42
+ * are passed to `createTranslator` once.
32
43
  *
33
44
  * In a pure SPA (no `initialLanguage`), the initial language is read from
34
45
  * `localStorage` lazily inside `useState`. In SSR, pass `initialLanguage`
@@ -42,7 +53,7 @@ export type I18nProviderProps = {
42
53
  * </I18nProvider>
43
54
  * ```
44
55
  */
45
- export declare function I18nProvider({ children, defaultLanguage, storageKey, supportedLanguages, onLanguageChange, initialLanguage, }: I18nProviderProps): import("react").JSX.Element;
56
+ export declare function I18nProvider({ children, defaultLanguage, storageKey, supportedLanguages, onLanguageChange, initialLanguage, resources, }: I18nProviderProps): import("react").JSX.Element;
46
57
  /**
47
58
  * useI18nContext - Access the shared language state.
48
59
  *
@@ -2141,6 +2141,9 @@ export declare const en: {
2141
2141
  "bulk-action-name": string;
2142
2142
  "bulk-max-notice": string;
2143
2143
  "bulk-more": string;
2144
+ "bulk-bar": string;
2145
+ "bulk-selected": string;
2146
+ "bulk-cancel": string;
2144
2147
  };
2145
2148
  "list-empty": {
2146
2149
  clear: string;
@@ -2130,7 +2130,10 @@ declare const _default: {
2130
2130
  "bulk-action": "{label} ({count})",
2131
2131
  "bulk-action-name": "{label} {count, plural, one {# row} other {# rows}}",
2132
2132
  "bulk-max-notice": "Select {max, plural, one {# row} other {# rows}} or fewer to {label}",
2133
- "bulk-more": "More"
2133
+ "bulk-more": "More",
2134
+ "bulk-bar": "Selected rows",
2135
+ "bulk-selected": "{count} selected",
2136
+ "bulk-cancel": "Cancel"
2134
2137
  },
2135
2138
  "list-empty": {
2136
2139
  "clear": "Clear search and filters"
@@ -2141,6 +2141,9 @@ export declare const fr: {
2141
2141
  "bulk-action-name": string;
2142
2142
  "bulk-max-notice": string;
2143
2143
  "bulk-more": string;
2144
+ "bulk-bar": string;
2145
+ "bulk-selected": string;
2146
+ "bulk-cancel": string;
2144
2147
  };
2145
2148
  "list-empty": {
2146
2149
  clear: string;
@@ -2130,7 +2130,10 @@ declare const _default: {
2130
2130
  "bulk-action": "{label} ({count})",
2131
2131
  "bulk-action-name": "{label} : {count, plural, one {# ligne} other {# lignes}}",
2132
2132
  "bulk-max-notice": "Sélectionnez {max, plural, one {# ligne} other {# lignes}} ou moins pour {label}",
2133
- "bulk-more": "Plus"
2133
+ "bulk-more": "Plus",
2134
+ "bulk-bar": "Lignes sélectionnées",
2135
+ "bulk-selected": "{count, plural, one {# sélectionnée} other {# sélectionnées}}",
2136
+ "bulk-cancel": "Annuler"
2134
2137
  },
2135
2138
  "list-empty": {
2136
2139
  "clear": "Effacer la recherche et les filtres"
@@ -2139,6 +2139,9 @@ export declare const resources: {
2139
2139
  "bulk-action-name": string;
2140
2140
  "bulk-max-notice": string;
2141
2141
  "bulk-more": string;
2142
+ "bulk-bar": string;
2143
+ "bulk-selected": string;
2144
+ "bulk-cancel": string;
2142
2145
  };
2143
2146
  "list-empty": {
2144
2147
  clear: string;
@@ -5040,6 +5043,9 @@ export declare const resources: {
5040
5043
  "bulk-action-name": string;
5041
5044
  "bulk-max-notice": string;
5042
5045
  "bulk-more": string;
5046
+ "bulk-bar": string;
5047
+ "bulk-selected": string;
5048
+ "bulk-cancel": string;
5043
5049
  };
5044
5050
  "list-empty": {
5045
5051
  clear: string;
@@ -1,3 +1,4 @@
1
+ import { ResourceBundle } from './merge-resources.js';
1
2
  import { MaterialLocaleKey, TranslationContext } from './types.js';
2
3
  /**
3
4
  * Translates one of this package's own strings (`material.*`) for a language
@@ -10,6 +11,11 @@ import { MaterialLocaleKey, TranslationContext } from './types.js';
10
11
  * have, or no language, gives `fallback`, formatted with that language's
11
12
  * `Intl` rules.
12
13
  *
14
+ * `resources` is the app's merged bundle. For each candidate language it is
15
+ * read first, then the base bundle, before the next candidate, so a bundle
16
+ * that was not merged with the base one keeps the built-in strings. Pass a
17
+ * stable object (module scope): the translator is cached per object.
18
+ *
13
19
  * @example translateMaterial('fr', 'material.print.page-of', 'Page {page} of {pages}', { page: 2, pages: 5 }) // 'Page 2 sur 5'
14
20
  */
15
- export declare function translateMaterial(language: string | null | undefined, key: MaterialLocaleKey, fallback: string, options?: TranslationContext): string;
21
+ export declare function translateMaterial(language: string | null | undefined, key: MaterialLocaleKey, fallback: string, options?: TranslationContext, resources?: ResourceBundle): string;