@nxgt/material 3.24.0 → 3.24.1
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 +6 -0
- package/dist/{components-D2XNfS3c.js → components-CbuWrY21.js} +389 -387
- package/dist/components.js +1 -1
- package/dist/lib/components/ui/selection/native-select/native-select.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/material.css +1 -1
- package/docs/components/selection-and-choice.md +3 -1
- package/docs/troubleshooting.md +21 -1
- package/package.json +1 -1
|
@@ -97,7 +97,9 @@ phone, no portal). Parts: `NativeSelect`, `NativeSelectOption`,
|
|
|
97
97
|
and every other attribute go to the `<select>`. It is 44px high like the
|
|
98
98
|
other fields; `size="sm"` makes it 36px for a compact toolbar and
|
|
99
99
|
`size="lg"` 52px, and a number
|
|
100
|
-
is still the `<select>`'s own `size` (rows shown). It
|
|
100
|
+
is still the `<select>`'s own `size` (rows shown). It fills its container
|
|
101
|
+
like the other fields; a width class on it (`className="w-24"`, or `w-fit` for
|
|
102
|
+
the width of its widest option) keeps it compact, and its chevron follows. It is tinted while the
|
|
101
103
|
chosen option has a value, and an option with `value=""` reads as a
|
|
102
104
|
placeholder.
|
|
103
105
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -320,6 +320,7 @@ words in your error.
|
|
|
320
320
|
- [My inputs look rounder or tinted, or lost the hover ring, after upgrading](#my-inputs-look-rounder-or-tinted-or-lost-the-hover-ring-after-upgrading)
|
|
321
321
|
- [An input inside an `InputGroup` lost a class or a style of `Input`](#an-input-inside-an-inputgroup-lost-a-class-or-a-style-of-input)
|
|
322
322
|
- [A `NativeSelect` is taller, or a `Select` trigger or list measures differently](#a-nativeselect-is-taller-or-a-select-trigger-or-list-measures-differently)
|
|
323
|
+
- [A `NativeSelect` is now as wide as its container, where it was as wide as its selected option](#a-nativeselect-is-now-as-wide-as-its-container-where-it-was-as-wide-as-its-selected-option)
|
|
323
324
|
- [A `Combobox` clear button is not found, its list sits 3px from the field, or `ComboboxInput` rejects `size={n}`](#a-combobox-clear-button-is-not-found-its-list-sits-3px-from-the-field-or-comboboxinput-rejects-sizen)
|
|
324
325
|
- [An `Autocomplete` list covers its helper text, or a chip test no longer finds its markup](#an-autocomplete-list-covers-its-helper-text-or-a-chip-test-no-longer-finds-its-markup)
|
|
325
326
|
- [A `CountryField` lost its chip, or its `renderOption` or `filter` does nothing](#a-countryfield-lost-its-chip-or-its-renderoption-or-filter-does-nothing)
|
|
@@ -5835,11 +5836,30 @@ tint with `data-placeholder` (absent once a value is chosen) and the open
|
|
|
5835
5836
|
state with `data-open`:
|
|
5836
5837
|
|
|
5837
5838
|
```tsx
|
|
5838
|
-
<NativeSelect size="sm" aria-label="Rows per page">…</NativeSelect>
|
|
5839
|
+
<NativeSelect size="sm" aria-label="Rows per page" className="w-fit">…</NativeSelect>
|
|
5839
5840
|
|
|
5840
5841
|
expect(screen.getByRole('combobox', { name: 'Fruit' })).not.toHaveAttribute('data-placeholder');
|
|
5841
5842
|
```
|
|
5842
5843
|
|
|
5844
|
+
### A `NativeSelect` is now as wide as its container, where it was as wide as its selected option
|
|
5845
|
+
|
|
5846
|
+
**When:** after upgrading, a `NativeSelect` in a toolbar, a filter bar or a
|
|
5847
|
+
row of buttons stretches across the row, where it used to be as wide as its
|
|
5848
|
+
widest option.
|
|
5849
|
+
**Why:** it shrank to its content while `SelectField`, `TextField` and the
|
|
5850
|
+
other fields fill their column, so in a form it sat narrower than the
|
|
5851
|
+
fields around it. It fills its container now, like them.
|
|
5852
|
+
**Fix:** give it the width you want. A width class on the `<select>` keeps the
|
|
5853
|
+
whole control, chevron included, at that width:
|
|
5854
|
+
|
|
5855
|
+
```tsx
|
|
5856
|
+
<NativeSelect size="sm" aria-label="Rows per page" className="w-fit">…</NativeSelect>
|
|
5857
|
+
<NativeSelect aria-label="Sort" className="w-40">…</NativeSelect>
|
|
5858
|
+
```
|
|
5859
|
+
|
|
5860
|
+
`SelectField`, `Select` and the other fields never shrank to the selected option; a long
|
|
5861
|
+
selected label ends in an ellipsis and does not widen its column.
|
|
5862
|
+
|
|
5843
5863
|
### A `Combobox` clear button is not found, its list sits 3px from the field, or `ComboboxInput` rejects `size={n}`
|
|
5844
5864
|
|
|
5845
5865
|
**When:** after upgrading, `[data-slot="combobox-clear"]` finds nothing, a
|