@nxgt/material 3.16.0 → 3.18.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.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/dist/{async-slice-ChtlTP8W.js → async-slice-gqif7FX9.js} +2 -2
- package/dist/{button-BrgyWw7T.js → button-Ck1Bif-Q.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-BZu-bvAJ.js → chip-B9pZFWbi.js} +1 -1
- package/dist/{code-editor-DjY7_8TH.js → code-editor-M4DcaX-P.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-D1lpNQ6J.js → code-language-items-Bnm_WDVg.js} +2 -2
- package/dist/{components-BOF9frx3.js → components-nq1rUKCK.js} +18648 -18025
- package/dist/components.js +15 -15
- package/dist/{dialog-YHZJjDrI.js → dialog-jYcWDh9G.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-BEyP-A0J.js → dropdown-menu-BEZhNnhr.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-ZtqqpX0S.js → empty-state-BBUsR0_X.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-GV4Ukoe2.js → i18n-provider-3TsMIGn1.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-C0TGvF9o.js → icon-badge-92uhu2o6.js} +1 -1
- package/dist/lib/components/ui/collections/filter/editors/text-editor.d.ts +6 -1
- package/dist/lib/components/ui/collections/filter/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +20 -1
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-value.d.ts +3 -0
- package/dist/lib/components/ui/collections/filter/query/use-filter-query.d.ts +6 -2
- package/dist/lib/components/ui/collections/filter/sections/filter-search.d.ts +7 -1
- package/dist/lib/components/ui/collections/server-table/types.d.ts +12 -1
- package/dist/lib/components/ui/collections/server-table/use-table-answer.d.ts +1 -1
- package/dist/lib/components/ui/fields/search-field/search-field.d.ts +6 -1
- package/dist/lib/components/ui/selection/switcher/partials/switcher-footer.d.ts +13 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-groups.d.ts +9 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-list.d.ts +8 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-menu.d.ts +13 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-popover.d.ts +12 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-row.d.ts +22 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-search.d.ts +14 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-sheet.d.ts +12 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-tile.d.ts +7 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-tooltip.d.ts +9 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-trigger.d.ts +17 -0
- package/dist/lib/components/ui/selection/switcher/switcher.d.ts +10 -15
- package/dist/lib/components/ui/selection/switcher/switcher.utils.d.ts +13 -0
- package/dist/lib/components/ui/selection/switcher/types.d.ts +73 -0
- package/dist/lib/components/ui/selection/switcher/use-clipped.d.ts +3 -0
- package/dist/lib/components/ui/selection/switcher/use-switcher-list.d.ts +21 -0
- package/dist/lib/i18n/resources/en/en.d.ts +11 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +11 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +11 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +11 -0
- package/dist/lib/i18n/resources/resources.d.ts +22 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +21 -21
- package/dist/map.js +4 -4
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-Bj3rGSfS.js → public-BLw13izR.js} +6 -6
- package/dist/{rich-code-block-RN-EpeTA.js → rich-code-block-DPe5USBG.js} +4 -4
- package/dist/{sortable-provider-Iej7IS4n.js → sortable-provider-CtAb1Q02.js} +1 -1
- package/dist/{spinner-BwWDXIbg.js → spinner-CcmXeIHf.js} +1 -1
- package/dist/{stored-language-BAAP7qS3.js → stored-language-CsDEJDR7.js} +24 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-8zHeXSD1.js → theme-toggle-CWovcIQY.js} +1 -1
- package/dist/{toolbar-items-CVQBYp4K.js → toolbar-items-CrATPuOX.js} +2 -2
- package/dist/{translate-material-C0aOnHpZ.js → translate-material-X1daoGxE.js} +2 -2
- package/dist/{translator-BU07gNva.js → translator-BUVKAo4l.js} +1 -1
- package/dist/{use-chat-composer-CoXmJCkr.js → use-chat-composer-UZVFm8Tw.js} +52 -52
- package/dist/{use-heading-spy-DETdqnB6.js → use-heading-spy-ByraZUf9.js} +1 -1
- package/dist/{use-material-translation-DGeVp-qP.js → use-material-translation-tD9XqIBm.js} +2 -2
- package/docs/components/data-table-filter-and-lists.md +35 -3
- package/docs/components/form-fields.md +1 -0
- package/docs/components/overlays-and-menus.md +1 -1
- package/docs/components/selection-and-choice.md +76 -6
- package/docs/guides/i18n.md +1 -1
- package/docs/guides/server-lists-url.md +12 -0
- package/docs/previews/selection-choice-switcher.webp +0 -0
- package/docs/troubleshooting.md +18 -1
- package/package.json +2 -2
package/docs/troubleshooting.md
CHANGED
|
@@ -111,6 +111,7 @@ words in your error.
|
|
|
111
111
|
|
|
112
112
|
- [A `ListTile` link shows two chevrons](#a-listtile-link-shows-two-chevrons)
|
|
113
113
|
- [A `ListTile` link reloads the whole page](#a-listtile-link-reloads-the-whole-page)
|
|
114
|
+
- [A `Switcher` in link mode reloads the page](#a-switcher-in-link-mode-reloads-the-page)
|
|
114
115
|
- [After a link in the phone menu, the focus goes to `<main>`, not to the page's title](#after-a-link-in-the-phone-menu-the-focus-goes-to-main-not-to-the-pages-title)
|
|
115
116
|
- [The phone menu needs two Escapes to close, or a tooltip shows over it](#the-phone-menu-needs-two-escapes-to-close-or-a-tooltip-shows-over-it)
|
|
116
117
|
- [The phone menu stays open after a navigation, or an app clicks its button to close it](#the-phone-menu-stays-open-after-a-navigation-or-an-app-clicks-its-button-to-close-it)
|
|
@@ -1115,7 +1116,7 @@ expect(screen.getByRole('checkbox', { name: 'Email me receipts' })).toHaveAttrib
|
|
|
1115
1116
|
|
|
1116
1117
|
### A test looked for `lucide-check` in a menu item
|
|
1117
1118
|
|
|
1118
|
-
**When:** a test or a style looks for the `lucide-check` or `lucide-circle` svg in a checked item of `DropdownMenu`, `ContextMenu`, `Menubar`, `Select`, `Combobox`, `Command`, the `PhoneField` country menu
|
|
1119
|
+
**When:** a test or a style looks for the `lucide-check` or `lucide-circle` svg in a checked item of `DropdownMenu`, `ContextMenu`, `Menubar`, `Select`, `Combobox`, `Command`, the `PhoneField` country menu or the filter presets.
|
|
1119
1120
|
**Why:** those items draw an animated mark, an `aria-hidden` element with `data-slot="option-mark"`. In `Select` and `Combobox` it is present only on the chosen option; the menu items keep it mounted while unchecked.
|
|
1120
1121
|
**Fix:** read `aria-checked` (or `aria-selected`) on the item:
|
|
1121
1122
|
|
|
@@ -2057,6 +2058,22 @@ const RouterLink: AppShellLinkComponent = ({ href, ...props }) => (
|
|
|
2057
2058
|
<ListTile title="Notifications" href="/settings/notifications" linkComponent={RouterLink} />
|
|
2058
2059
|
```
|
|
2059
2060
|
|
|
2061
|
+
### A `Switcher` in link mode reloads the page
|
|
2062
|
+
|
|
2063
|
+
**When:** a `Switcher` with `getHref` is used in a router app and choosing an option loads the document again (the page flashes, client state is lost).
|
|
2064
|
+
**Why:** link mode renders plain `<a href>` links, which need no router and so cannot navigate on the client. Without `getHref` the options are not links and `href` on an item does nothing.
|
|
2065
|
+
**Fix:** pass `linkComponent`, with the contract of the app shell's: it takes `href`, spreads every other prop (`aria-current`, `className`, handlers) and forwards `ref`. React Router's `Link` takes `to`, so wrap it:
|
|
2066
|
+
|
|
2067
|
+
```tsx
|
|
2068
|
+
import { Link } from 'react-router';
|
|
2069
|
+
import { Switcher, type AppShellLinkComponent } from '@nxgt/material/components';
|
|
2070
|
+
|
|
2071
|
+
// Hoisted, outside the render: not a new component on every render.
|
|
2072
|
+
const RouterLink: AppShellLinkComponent = ({ href, ...props }) => <Link to={href} {...props} />;
|
|
2073
|
+
|
|
2074
|
+
<Switcher label="Class" value={classId} options={classes} getHref={(item) => `/classes/${item.id}`} linkComponent={RouterLink} />
|
|
2075
|
+
```
|
|
2076
|
+
|
|
2060
2077
|
### After a link in the phone menu, the focus goes to `<main>`, not to the page's title
|
|
2061
2078
|
|
|
2062
2079
|
**When:** on a phone, a link followed in the menu sheet of `ActivityLayout` or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
"docs:previews": "rm -rf node_modules/.cache/nxgt-preview-free/missing && NXGT_PREVIEW_FREE=1 vitest run --project previews && bun .storybook/preview-free-report.ts"
|
|
358
358
|
},
|
|
359
359
|
"dependencies": {
|
|
360
|
-
"@nxgt/material-core": "^0.
|
|
360
|
+
"@nxgt/material-core": "^0.32.1",
|
|
361
361
|
"@base-ui/react": "^1.6.0",
|
|
362
362
|
"@dnd-kit/core": "^6.3.1",
|
|
363
363
|
"@dnd-kit/sortable": "^10.0.0",
|