@nxgt/material-vue 0.37.0 → 0.38.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 +88 -0
- package/README.md +1 -0
- package/dist/{Button-CurFF4Zt.js → Button-5UyKA-x_.js} +1 -1
- package/dist/{HoverCardTrigger-jCXl6TrX.js → HoverCardTrigger-CmCDiTn8.js} +2 -2
- package/dist/{camera-DDnR8aYK.js → camera-BWzF8sOW.js} +4 -4
- package/dist/components/base.css +3 -1
- package/dist/{components-CCzdGGAe.js → components-B_s5oxUp.js} +11821 -11303
- package/dist/components.js +8 -8
- package/dist/composables.js +2 -2
- package/dist/dnd.js +1 -1
- package/dist/{form-scope-Csf9H-Pg.js → form-scope-UzoU38db.js} +1 -1
- package/dist/{i18n-provider-B2q6vp6H.js → i18n-provider-BEvjls8b.js} +1 -1
- package/dist/i18n.js +4 -4
- package/dist/{icon-button-CIUc1bEp.js → icon-button-DhqJE6Ej.js} +1 -1
- package/dist/lib/components/ui/feedback/banner/banner.vue.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/repeatable-group/index.d.ts +4 -0
- package/dist/lib/components/ui/fields/repeatable-group/partials/repeatable-group-footer.vue.d.ts +14 -0
- package/dist/lib/components/ui/fields/repeatable-group/partials/repeatable-group-row.vue.d.ts +33 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-classes.d.ts +33 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-form-field.vue.d.ts +44 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-names.d.ts +16 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group.vue.d.ts +69 -0
- package/dist/lib/components/ui/fields/repeatable-group/use-repeatable-group.d.ts +39 -0
- package/dist/lib/components/ui/fields/search-field/search-field.vue.d.ts +10 -1
- package/dist/lib/components/ui/media/stx-player/stx-player-extras.vue.d.ts +1 -1
- package/dist/lib/components/ui/overlays/command/CommandItem.vue.d.ts +10 -3
- package/dist/lib/components/ui/overlays/command/CommandList.vue.d.ts +4 -2
- package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +1 -0
- package/dist/lib/components/ui/primitives/typography/typography.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/checkbox-group/checkbox-group.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/option-count/option-count.vue.d.ts +25 -0
- package/dist/lib/components/ui/selection/option-count/use-option-count-text.d.ts +10 -0
- package/dist/lib/components/ui/selection/radio-group/radio-group-field.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/select-chip-field/select-chip-field.vue.d.ts +11 -0
- package/dist/lib/components/ui/selection/sortable-list/sortable-list.vue.d.ts +1 -1
- package/dist/lib/components/ui/selection/transfer-list/transfer-list.vue.d.ts +1 -1
- package/dist/lib/i18n/resources/en/en.d.ts +14 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +14 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +14 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -0
- package/dist/lib/i18n/resources/resources.d.ts +28 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +17 -17
- package/dist/map.js +4 -4
- package/dist/material-vue.css +1 -1
- package/dist/{pdf-outline-sidebar-DTb_hLjX.js → pdf-outline-sidebar-BsePJlTi.js} +2 -2
- package/dist/{pdf-page-CCZtaTRB.js → pdf-page-Ct313mNF.js} +1 -1
- package/dist/{pdf-page-list-D7ImAK7v.js → pdf-page-list-JrRo2BeU.js} +2 -2
- package/dist/{pdf-reader-CsLVHCV6.js → pdf-reader-tABBZMbZ.js} +8 -8
- package/dist/{pdf-sidebar-DlU0RgZL.js → pdf-sidebar-Caw9rzU-.js} +3 -3
- package/dist/{pdf-thumbnail-sidebar-CNB7q0Mq.js → pdf-thumbnail-sidebar-ZybLeUG7.js} +3 -3
- package/dist/{pdf-toolbar-BtXcyEpd.js → pdf-toolbar-BM8Sz_JN.js} +4 -4
- package/dist/pdf.js +2 -2
- package/dist/{print-format.utils-keJqahvw.js → print-format.utils-CQFIVeUA.js} +2 -2
- package/dist/{sortable-provider-DMu8DL2z.js → sortable-provider-CKkWYijj.js} +2 -2
- package/dist/{stored-language-dtksFoGO.js → stored-language-CvOHC8AD.js} +24 -0
- package/dist/{stx-player-CqsfQlLp.js → stx-player-CsVKbwFk.js} +5 -5
- package/dist/{translator-DqiGrSH_.js → translator-k1rKIgC7.js} +1 -1
- package/dist/{use-heading-spy-BZ7ctGZ5.js → use-heading-spy-D-ipoQwl.js} +1 -1
- package/dist/{use-material-translation-DRB6oPdF.js → use-material-translation-1FdRx9I7.js} +3 -3
- package/docs/components/README.md +1 -1
- package/docs/components/form-fields.md +146 -0
- package/docs/components/overlays-and-menus.md +2 -0
- package/docs/components/primitives.md +3 -1
- package/docs/components/selection-and-choice.md +30 -6
- package/docs/guides/forms.md +34 -0
- package/docs/previews/form-fields-repeatablegroup.webp +0 -0
- package/docs/roadmap.md +7 -0
- package/docs/troubleshooting.md +58 -0
- package/lib/components/base.css +3 -1
- package/lib/nuxt/component-names.ts +2 -0
- package/package.json +2 -2
package/docs/troubleshooting.md
CHANGED
|
@@ -40,6 +40,7 @@ words in your error.
|
|
|
40
40
|
- [A test no longer finds `aria-invalid` on a `Switch` row or an `Autocomplete` box](#a-test-no-longer-finds-aria-invalid-on-a-switch-row-or-an-autocomplete-box)
|
|
41
41
|
- [An `Autocomplete` lists more options than before, or "ecole" finds "École"](#an-autocomplete-lists-more-options-than-before-or-ecole-finds-école)
|
|
42
42
|
- [`@query-change` runs more often after upgrading](#query-change-runs-more-often-after-upgrading)
|
|
43
|
+
- [A click on the next field right after an `Autocomplete` pick is lost](#a-click-on-the-next-field-right-after-an-autocomplete-pick-is-lost)
|
|
43
44
|
- [An older search's results replace the newer ones in an `Autocomplete`](#an-older-searchs-results-replace-the-newer-ones-in-an-autocomplete)
|
|
44
45
|
- [An `Autocomplete` option does nothing on click or Enter](#an-autocomplete-option-does-nothing-on-click-or-enter)
|
|
45
46
|
- ["The search failed. Try again." no longer shows in an `Autocomplete`](#the-search-failed-try-again-no-longer-shows-in-an-autocomplete)
|
|
@@ -50,6 +51,7 @@ words in your error.
|
|
|
50
51
|
- [The app shell's page scrolls instead of its content, or a full-height screen collapses](#the-app-shells-page-scrolls-instead-of-its-content-or-a-full-height-screen-collapses)
|
|
51
52
|
- [A test finds a new heading or a second `main`, or no longer finds a title in a `div`](#a-test-finds-a-new-heading-or-a-second-main-or-no-longer-finds-a-title-in-a-div)
|
|
52
53
|
- [`[data-test="typogaphy"]` finds nothing](#data-testtypogaphy-finds-nothing)
|
|
54
|
+
- [Long text in `Typography` no longer scrolls](#long-text-in-typography-no-longer-scrolls)
|
|
53
55
|
- [A `class` on `ActivityLayout` now styles the whole shell](#a-class-on-activitylayout-now-styles-the-whole-shell)
|
|
54
56
|
- [A test no longer finds a calendar day by its number](#a-test-no-longer-finds-a-calendar-day-by-its-number)
|
|
55
57
|
- [A `QRCode`'s `aria-label` is no longer on its wrapper](#a-qrcodes-aria-label-is-no-longer-on-its-wrapper)
|
|
@@ -96,6 +98,7 @@ words in your error.
|
|
|
96
98
|
- [A failed submit does not focus the first invalid field](#a-failed-submit-does-not-focus-the-first-invalid-field)
|
|
97
99
|
- [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)
|
|
98
100
|
- [The `ref` of a `SelectChipField` focuses nothing](#the-ref-of-a-selectchipfield-focuses-nothing)
|
|
101
|
+
- [The focus does not move to a new row of a `RepeatableGroupFormField`](#the-focus-does-not-move-to-a-new-row-of-a-repeatablegroupformfield)
|
|
99
102
|
- [A multi-step form reopens at a later step](#a-multi-step-form-reopens-at-a-later-step)
|
|
100
103
|
- [The form could not be loaded.](#the-form-could-not-be-loaded)
|
|
101
104
|
|
|
@@ -645,6 +648,20 @@ was a fixed 300 ms.
|
|
|
645
648
|
**Fix:** set the pause you had, `:debounce-ms="300"`, or move the fetch to `on-search`, which
|
|
646
649
|
also aborts the previous request and drops a stale response.
|
|
647
650
|
|
|
651
|
+
### A click on the next field right after an `Autocomplete` pick is lost
|
|
652
|
+
|
|
653
|
+
**When:** before 0.37.1, in a dialog, a `Select` (or any field) right below an
|
|
654
|
+
`Autocomplete` whose `@query-change` shows or hides something (a line naming
|
|
655
|
+
who is already linked, a result count): a click on that field's option just
|
|
656
|
+
after a pick does nothing, now and then (more often in Firefox and on a slow
|
|
657
|
+
machine; an end-to-end test flakes).
|
|
658
|
+
**Why:** a pick empties the query, and `@query-change` with `''` came only
|
|
659
|
+
after `debounceMs`. The line it removed then shrank the centred dialog, which
|
|
660
|
+
moved the open list by half that height between the pointer's press and its
|
|
661
|
+
release: the release landed on another option, and nothing was chosen.
|
|
662
|
+
**Fix:** upgrade: an emptied query is reported at once, with the pick, before
|
|
663
|
+
the next click. Waiting in a test until no `listbox` is left only hid it.
|
|
664
|
+
|
|
648
665
|
### An older search's results replace the newer ones in an `Autocomplete`
|
|
649
666
|
|
|
650
667
|
**When:** you fetch `options` yourself from `@query-change`, and a slow response
|
|
@@ -821,6 +838,26 @@ with its own `<main>` passes `content-as="div"`.
|
|
|
821
838
|
**Fix:** select `[data-test="typography"]` — or better, the text or the role
|
|
822
839
|
the user sees.
|
|
823
840
|
|
|
841
|
+
### Long text in `Typography` no longer scrolls
|
|
842
|
+
|
|
843
|
+
**When:** after upgrading, a `Typography` with a fixed height or width used to
|
|
844
|
+
scroll its overflowing text; it now overflows its box (or `truncate` and
|
|
845
|
+
`line-clamp-*` are the only things that clip it).
|
|
846
|
+
**Why:** `Typography` always carried `overflow-auto`, which made every block
|
|
847
|
+
`Typography` a scroll region: Firefox counted a subpixel overflow, and axe
|
|
848
|
+
reported `scrollable-region-focusable`. It sets no `overflow` now, so it is no
|
|
849
|
+
longer a block formatting context (its margins can collapse with its
|
|
850
|
+
neighbours'), and a text flex or grid item no longer has the zero minimum width a scroll container has.
|
|
851
|
+
**Fix:** where you want scrolling, wrap the text in an element that owns it,
|
|
852
|
+
focusable and named so keyboard users can scroll it; where you want a flex
|
|
853
|
+
item to shrink, give it `min-w-0`:
|
|
854
|
+
|
|
855
|
+
```vue
|
|
856
|
+
<div class="max-h-40 overflow-auto" tabindex="0" aria-label="Release notes">
|
|
857
|
+
<Typography>{{ longText }}</Typography>
|
|
858
|
+
</div>
|
|
859
|
+
```
|
|
860
|
+
|
|
824
861
|
### A `class` on `ActivityLayout` now styles the whole shell
|
|
825
862
|
|
|
826
863
|
**When:** after upgrading, the classes passed to `<ActivityLayout class="…">`
|
|
@@ -1959,6 +1996,27 @@ yourself.
|
|
|
1959
1996
|
field.value?.$el.querySelector<HTMLElement>('[aria-pressed="true"], button')?.focus();
|
|
1960
1997
|
```
|
|
1961
1998
|
|
|
1999
|
+
### The focus does not move to a new row of a `RepeatableGroupFormField`
|
|
2000
|
+
|
|
2001
|
+
**When:** a row is added to a `RepeatableGroupFormField` by your own code (a
|
|
2002
|
+
second "Add" button, a "Duplicate" action) through vee-validate's
|
|
2003
|
+
`useFieldArray` `push`, `prepend` or `insert` on the same `name`, and the focus
|
|
2004
|
+
stays where it was, with nothing announced.
|
|
2005
|
+
**Why:** the group moves the focus and announces the change only after its
|
|
2006
|
+
own buttons (the new row's first field, a removed row's neighbour, a move
|
|
2007
|
+
button). A row added from outside is a value change it renders, not an action
|
|
2008
|
+
it took.
|
|
2009
|
+
**Fix:** let the group's Add button add rows (`new-row` is what it pushes).
|
|
2010
|
+
When your own code must add one, move the focus yourself once the row has
|
|
2011
|
+
rendered:
|
|
2012
|
+
|
|
2013
|
+
```ts
|
|
2014
|
+
const { push } = useFieldArray('periods');
|
|
2015
|
+
push({ name: '' });
|
|
2016
|
+
await nextTick();
|
|
2017
|
+
document.querySelector<HTMLElement>('[data-slot="repeatable-group-row"]:last-child input')?.focus();
|
|
2018
|
+
```
|
|
2019
|
+
|
|
1962
2020
|
### A multi-step form reopens at a later step
|
|
1963
2021
|
|
|
1964
2022
|
**When:** a wizard built on `defineStepFormStore` opens at the step (and with
|
package/lib/components/base.css
CHANGED
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
font-size: var(--text-xs);
|
|
56
56
|
font-weight: var(--font-weight-medium);
|
|
57
57
|
}
|
|
58
|
-
a:
|
|
58
|
+
/* A sidebar entry is a link styled as a menu entry: the prose link style
|
|
59
|
+
(underline, info tint on hover and focus) must not reach it (#566). */
|
|
60
|
+
a:not(:has(> button)):not([data-slot="sidebar-menu-item"]) {
|
|
59
61
|
@apply focus:underline underline-offset-4 hover:underline cursor-pointer;
|
|
60
62
|
@apply text-info [&_svg]:data-[slot=icon]:text-info hover:bg-info/10 active:bg-info/5 focus:bg-info/15;
|
|
61
63
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"docs:previews": "vitest run --project previews"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
|
-
"@nxgt/material-core": "^0.
|
|
127
|
+
"@nxgt/material-core": "^0.11.0",
|
|
128
128
|
"@floating-ui/dom": "^1.8.0",
|
|
129
129
|
"@fortawesome/fontawesome-common-types": "7.3.1",
|
|
130
130
|
"@lucide/vue": "^1.45.0",
|