@nxgt/material 2.14.0 → 2.16.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 (75) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/{_Uint8Array-QCcRMhXd.js → _Uint8Array-CjLUgWgf.js} +1 -1
  3. package/dist/{_overRest-C21ZmKyH.js → _overRest-HfSwfmH1.js} +1 -1
  4. package/dist/{async-slice-TBZ6Taw2.js → async-slice-CsE3hkCD.js} +2 -2
  5. package/dist/{blockDiagram-BEXU5L5S-Cn9cG3vt.js → blockDiagram-BEXU5L5S-DSNWJcbS.js} +2 -2
  6. package/dist/{chunk-3FUC2YCW-XrT5pZo5.js → chunk-3FUC2YCW-CcZvlyvW.js} +2 -2
  7. package/dist/{chunk-7M6MHVWA-Uf-8NCRF.js → chunk-7M6MHVWA-21OdxoBq.js} +1 -1
  8. package/dist/{chunk-GNY47TPC-CGgBmY0O.js → chunk-GNY47TPC-BZdgq2LF.js} +4 -4
  9. package/dist/{chunk-NETBCI7D-g-jPsM9q.js → chunk-NETBCI7D-CAgvlb0w.js} +1 -1
  10. package/dist/{chunk-Z7XXMR3K-BzO1efzA.js → chunk-Z7XXMR3K-BSXPgLtN.js} +1 -1
  11. package/dist/{classDiagram-v2-NBCMYWYE-7WgpfVcn.js → classDiagram-v2-NBCMYWYE-D_BHO1iT.js} +2 -2
  12. package/dist/{components-qTUjhFuo.js → components-Bkdm6jn6.js} +23187 -23162
  13. package/dist/components.js +4 -4
  14. package/dist/{dagre-6A5THRUB-BOuRxJdA.js → dagre-6A5THRUB-CsnftAPx.js} +11 -11
  15. package/dist/{diagram-22UHCM2B-CF0vLJbn.js → diagram-22UHCM2B-D0yPa8vo.js} +2 -2
  16. package/dist/{diagram-3UASUU5V-RLo-MTfV.js → diagram-3UASUU5V-f8LIX2sj.js} +1 -1
  17. package/dist/dnd.js +1 -1
  18. package/dist/{elk-276RUBZZ-Dr2yBM7k.js → elk-276RUBZZ-DI8bDQAL.js} +3 -3
  19. package/dist/{erDiagram-OPXOYQCR-l7kPZ4FO.js → erDiagram-OPXOYQCR-BGHFtxmB.js} +2 -2
  20. package/dist/{field-blur-BKGVq9_k.js → field-blur-C-5K6U1F.js} +4 -4
  21. package/dist/{flowDiagram-KWPJA3E3-BQEK3XTl.js → flowDiagram-KWPJA3E3-CnFLTW-3.js} +3 -3
  22. package/dist/{ganttDiagram-FUAMR5RP-WYm8XV7U.js → ganttDiagram-FUAMR5RP-B5uyVKE4.js} +1 -1
  23. package/dist/{graphlib-CbcZi5bx.js → graphlib-BqO9Go2u.js} +6 -6
  24. package/dist/hooks.js +2 -2
  25. package/dist/{i18n-provider-D5hkauu6.js → i18n-provider-C3SlA4J0.js} +1 -1
  26. package/dist/i18n.js +6 -6
  27. package/dist/{isArrayLikeObject-COiPdhFP.js → isArrayLikeObject-83P1fvEs.js} +3 -3
  28. package/dist/{isEmpty-B7UlCLih.js → isEmpty-C2z3Hypl.js} +3 -3
  29. package/dist/{journeyDiagram-ZHPQQLJL-p90NnenY.js → journeyDiagram-ZHPQQLJL-CKtbGcVT.js} +1 -1
  30. package/dist/lib/components/ui/dates/calendar/use-stable-component.d.ts +10 -0
  31. package/dist/lib/components/ui/dates/date-field/date-field-trigger.d.ts +1 -1
  32. package/dist/lib/components/ui/dates/date-range-field/date-range-field-trigger.d.ts +1 -1
  33. package/dist/lib/components/ui/dates/picker-trigger/use-trigger-locale.d.ts +10 -0
  34. package/dist/lib/components/ui/display/chip/chip.d.ts +18 -3
  35. package/dist/lib/components/ui/display/chip/chip.variants.d.ts +10 -0
  36. package/dist/lib/components/ui/display/chip/index.d.ts +1 -0
  37. package/dist/lib/components/ui/display/chip/partials/chip-dismiss-button.d.ts +3 -1
  38. package/dist/lib/components/ui/primitives/typography/typography.d.ts +7 -2
  39. package/dist/lib/components/ui/selection/select-field/select-field.d.ts +5 -2
  40. package/dist/lib/i18n/resources/en/material.json.d.ts +1 -1
  41. package/dist/lib/i18n/resources/fr/material.json.d.ts +1 -1
  42. package/dist/lib.js +3 -3
  43. package/dist/main.js +10 -10
  44. package/dist/map.js +2 -2
  45. package/dist/material.css +1 -1
  46. package/dist/{merge-KEf_u3Zy.js → merge-CZIEHTTe.js} +4 -4
  47. package/dist/{mermaid.core-CW8DO1T1.js → mermaid.core-Cp75fWA9.js} +21 -21
  48. package/dist/{mindmap-definition-NLK3R4M7-DJcCg9PL.js → mindmap-definition-NLK3R4M7-CFYIlEfW.js} +2 -2
  49. package/dist/{pieDiagram-5QR66LMP-b_dHXzkV.js → pieDiagram-5QR66LMP-CjvtBYDr.js} +1 -1
  50. package/dist/print.js +2 -2
  51. package/dist/{quadrantDiagram-O4NWA36T-BSqAcBs7.js → quadrantDiagram-O4NWA36T-DPj8ndqA.js} +1 -1
  52. package/dist/{requirementDiagram-PLB6GJNP-BcxkmIFp.js → requirementDiagram-PLB6GJNP-DjVFwRJg.js} +2 -2
  53. package/dist/{sankeyDiagram-IPEJSGJF-aD5r_n1q.js → sankeyDiagram-IPEJSGJF-63wsgHUY.js} +1 -1
  54. package/dist/{sortable-provider-C8mr3XP2.js → sortable-provider-Chbn1x1i.js} +1 -1
  55. package/dist/{stateDiagram-v2-GCMORJYK-Ct9ylaoP.js → stateDiagram-v2-GCMORJYK-DNc8m371.js} +2 -2
  56. package/dist/{stored-language-g121Yv0w.js → stored-language-DPqzxRmf.js} +2 -2
  57. package/dist/{swimlanes-2SLR337P-BwCqwEoR.js → swimlanes-2SLR337P-B7_gOJxx.js} +3 -3
  58. package/dist/{swimlanesDiagram-TC7HE7FX-WxBGUt0w.js → swimlanesDiagram-TC7HE7FX-tqlBrGuu.js} +3 -3
  59. package/dist/{timeline-definition-EJHVYXUP-5Q8GU13Q.js → timeline-definition-EJHVYXUP-DIA9CBZK.js} +1 -1
  60. package/dist/{translate-material-D3Hp_AI5.js → translate-material-CqB-j9WD.js} +2 -2
  61. package/dist/{translator-BMFC0lBV.js → translator-DTl9h__E.js} +1 -1
  62. package/dist/{use-heading-spy-wlOv87q3.js → use-heading-spy-C1KA3PrF.js} +2 -2
  63. package/dist/{use-material-translation-BGFp1yXp.js → use-material-translation-DMa4Xrnd.js} +2 -2
  64. package/dist/{usecaseDiagram-POWQR4AR-CzGOd4ic.js → usecaseDiagram-POWQR4AR-FMjCkoxs.js} +2 -2
  65. package/dist/{xychartDiagram-PMCCYNJV-Bh_1zZoW.js → xychartDiagram-PMCCYNJV-B76HOkCh.js} +1 -1
  66. package/docs/components/data-display.md +10 -2
  67. package/docs/components/data-table-filter-and-lists.md +5 -2
  68. package/docs/components/date-and-time.md +6 -0
  69. package/docs/components/feedback-and-status.md +3 -1
  70. package/docs/components/primitives.md +10 -2
  71. package/docs/components/selection-and-choice.md +2 -1
  72. package/docs/guides/i18n.md +2 -0
  73. package/docs/roadmap.md +33 -15
  74. package/docs/troubleshooting.md +81 -0
  75. package/package.json +2 -2
@@ -123,6 +123,7 @@ words in your error.
123
123
  - [A test that finds a chip by `aria-selected` or `getByRole('option')` no longer finds it](#a-test-that-finds-a-chip-by-aria-selected-or-getbyroleoption-no-longer-finds-it)
124
124
  - [The `ref` of a `SelectChipField` focuses nothing](#the-ref-of-a-selectchipfield-focuses-nothing)
125
125
  - [`touchedFields` stays empty after leaving a field, or `mode: 'onBlur'` never validates](#touchedfields-stays-empty-after-leaving-a-field-or-mode-onblur-never-validates)
126
+ - ["Required" shows as soon as the calendar opens, or while a date is being picked](#required-shows-as-soon-as-the-calendar-opens-or-while-a-date-is-being-picked)
126
127
  - [`TypeError: values.map is not a function` (a `SliderFormField`)](#typeerror-valuesmap-is-not-a-function)
127
128
  - [An end-to-end test no longer finds `aria-expanded` on a `ResponsiveButton`](#an-end-to-end-test-no-longer-finds-aria-expanded-on-a-responsivebutton)
128
129
  - [A multi-step form reopens at a later step](#a-multi-step-form-reopens-at-a-later-step)
@@ -131,10 +132,13 @@ words in your error.
131
132
  - [An end-to-end test no longer finds a required field by a name ending in `*`](#an-end-to-end-test-no-longer-finds-a-required-field-by-a-name-ending-in-)
132
133
  - [A test no longer finds a chip's remove button by the exact name `Remove`](#a-test-no-longer-finds-a-chips-remove-button-by-the-exact-name-remove)
133
134
  - [A test no longer finds a pagination, breadcrumb or other built-in label by its English name](#a-test-no-longer-finds-a-pagination-breadcrumb-or-other-built-in-label-by-its-english-name)
135
+ - [The selection count reads in the wrong order after overriding `material.table.pagination.rows-selected`](#the-selection-count-reads-in-the-wrong-order-after-overriding-materialtablepaginationrows-selected)
136
+ - [A test clicks a `FilterChips` chip to remove a filter and nothing happens](#a-test-clicks-a-filterchips-chip-to-remove-a-filter-and-nothing-happens)
134
137
  - [A test no longer finds an icon badge by role `button`, or an `Icon` named "Icon {name}" inside a button](#a-test-no-longer-finds-an-icon-badge-by-role-button-or-an-icon-named-icon-name-inside-a-button)
135
138
  - [A button named "Icon plus Add" is now named "Add"](#a-button-named-icon-plus-add-is-now-named-add)
136
139
  - [`An invalid form control with name='…' is not focusable` (an `UploadField`)](#an-invalid-form-control-with-name-is-not-focusable)
137
140
  - [A `DateField` or `DateRangeField` with `disabled` still opens](#a-datefield-or-daterangefield-with-disabled-still-opens)
141
+ - [The date field shows MM/DD/YYYY on a French page](#the-date-field-shows-mmddyyyy-on-a-french-page)
138
142
  - [An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is not on the trigger](#an-id-aria-describedby-or-data-testid-on-a-datefield-daterangefield-or-timefield-is-not-on-the-trigger)
139
143
  - [A test no longer finds the label or helper text inside a date or time picker's trigger](#a-test-no-longer-finds-the-label-or-helper-text-inside-a-date-or-time-pickers-trigger)
140
144
  - [A test no longer finds a `DurationField` input by the field's label, or a `Slider`'s `aria-label` on its root](#a-test-no-longer-finds-a-durationfield-input-by-the-fields-label-or-a-sliders-aria-label-on-its-root)
@@ -2261,6 +2265,24 @@ For a field of your own, pass `field.onBlur` to the control that loses focus:
2261
2265
  What counts as leaving, per kind of field:
2262
2266
  [forms](guides/forms.md#touched-on-blur).
2263
2267
 
2268
+ ### "Required" shows as soon as the calendar opens, or while a date is being picked
2269
+
2270
+ **When:** a `DateFormField` or `DateRangeFormField` that is empty and required,
2271
+ in a form with `mode: 'onTouched'` or `'onBlur'`, shows its error (and
2272
+ `touchedFields` flips) after the user changes the month, opens the year view
2273
+ or goes to today, before any date is chosen. 2.14.0 and earlier.
2274
+
2275
+ **Why:** `Calendar` gave `react-day-picker` new `Nav`, `CaptionLabel` and
2276
+ `MonthGrid` components each time the month or the view changed. The button that
2277
+ had focus was unmounted, focus fell to the page, and the field, which is
2278
+ touched when focus leaves it and its popover, took that for leaving.
2279
+
2280
+ **Fix:** upgrade to 2.15.0 or later. Until then, validate on
2281
+ submit (`mode: 'onSubmit'`) or hide the message until the popover is closed.
2282
+ From that version, opening, moving in the calendar, Escape and picking leave
2283
+ the field untouched; it is touched when the popover closes without a value by a
2284
+ click outside, or when the trigger loses focus with the popover closed.
2285
+
2264
2286
  ### `TypeError: values.map is not a function`
2265
2287
 
2266
2288
  **When:** a `SliderFormField` with one thumb crashes (in `SliderReadout`) as
@@ -2469,6 +2491,44 @@ await expect(page.getByRole('navigation', { name: /^(pagination|Pagination)$/ })
2469
2491
  <Pagination aria-label="Results pages">…</Pagination>
2470
2492
  ```
2471
2493
 
2494
+ ### The selection count reads in the wrong order after overriding `material.table.pagination.rows-selected`
2495
+
2496
+ **When:** after upgrading, the data table's footer reads "of 128 3 rows
2497
+ selected" (or the French "sur 128 3 lignes sélectionnées") because your
2498
+ `I18nProvider` overrides `material.table.pagination.rows-selected` with the old
2499
+ text.
2500
+ **Why:** the message now leads with the count and ends with the total, so
2501
+ "3 rows selected of 128" and "No rows selected of 128" read as a sentence, and
2502
+ the plural covers zero. The old form, `{count} of {total} {count, plural, …}`,
2503
+ put the count and the total first. An override keeps its own text, so it keeps
2504
+ the old order. The same release hides "Page n of m" when the table has no rows.
2505
+ **Fix:** adopt the new ICU form in your override, or delete the override:
2506
+
2507
+ ```json
2508
+ {
2509
+ "material": {
2510
+ "table": {
2511
+ "pagination": {
2512
+ "rows-selected": "{count, plural, =0 {No rows selected} one {# row selected} other {# rows selected}} of {total}"
2513
+ }
2514
+ }
2515
+ }
2516
+ }
2517
+ ```
2518
+
2519
+ ### A test clicks a `FilterChips` chip to remove a filter and nothing happens
2520
+
2521
+ **When:** after upgrading, `getByText('Paris').click()` (or a click on the
2522
+ chip's body) no longer removes the filter.
2523
+ **Why:** the chip was a clickable surface with no role. It is now a label with
2524
+ a real × button, named "Remove <label>" ("Retirer <label>" in French, from
2525
+ `material.chip.dismiss-label`), so a keyboard and a screen reader reach it.
2526
+ **Fix:** click the button:
2527
+
2528
+ ```ts
2529
+ await page.getByRole('button', { name: 'Remove Paris' }).click();
2530
+ ```
2531
+
2472
2532
  ### A test no longer finds an icon badge by role `button`, or an `Icon` named "Icon {name}" inside a button
2473
2533
 
2474
2534
  **When:** after upgrading to 2.2.0, one of these finds nothing:
@@ -2565,6 +2625,27 @@ react-day-picker's day rule, so `true` meant "every day".
2565
2625
  The same release moves `id`, `aria-describedby` and `data-*` to the trigger:
2566
2626
  see the next entry.
2567
2627
 
2628
+ ### The date field shows MM/DD/YYYY on a French page
2629
+
2630
+ **When:** a `DateField`, `DateFormField`, `DateRangeField` or `DateRangeFormField` (and a `TimeField`, which shows `2:30 PM` instead of `14:30`) under a French
2631
+ `I18nProvider` shows 1 September 2028 as `09/01/2028` in its trigger, while the
2632
+ calendar inside it is in French. No error is printed.
2633
+ **Why:** the trigger formatted the date without a locale, so it was always
2634
+ English (`MM/DD/YYYY`), whatever the language of the page.
2635
+ **Fix:** upgrade: the trigger now writes the date (and the time, for a
2636
+ `TimeField` or a `DateRangeField` with `withTime`) in the language of the
2637
+ calendar: the field's own `locale`, else the `I18nProvider` language, else
2638
+ English. Mount the provider above the field:
2639
+
2640
+ ```tsx
2641
+ <I18nProvider initialLanguage="fr">
2642
+ <DateField label="Livraison" value={value} onValueChange={setValue} />
2643
+ </I18nProvider>
2644
+ ```
2645
+
2646
+ With no provider, or in English, the output is unchanged (`09/01/2028`). The
2647
+ document's `<html lang>` and the browser's language are not read.
2648
+
2568
2649
  ### An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is not on the trigger
2569
2650
 
2570
2651
  **When:** before 2.2.0: `getByTestId` finds the calendar (and only while the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -119,7 +119,7 @@
119
119
  "docs:previews": "vitest run --project previews"
120
120
  },
121
121
  "dependencies": {
122
- "@nxgt/material-core": "^0.9.0",
122
+ "@nxgt/material-core": "^0.9.1",
123
123
  "@base-ui/react": "^1.6.0",
124
124
  "@dnd-kit/core": "^6.3.1",
125
125
  "@dnd-kit/sortable": "^10.0.0",