@nxgt/material 3.19.0 → 3.21.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 +14 -0
- package/README.md +2 -2
- package/dist/components/ui/display/chip/chip-parts.css +17 -30
- package/dist/{components-CjC1GISf.js → components-CbD5WNVO.js} +8831 -8790
- package/dist/components.js +1 -1
- package/dist/lib/components/ui/dates/date-field/use-typed-date.d.ts +2 -2
- package/dist/lib/components/ui/dates/picker-trigger/typed-day.d.ts +7 -2
- package/dist/lib/components/ui/display/chip/partials/chip-dismiss-button.d.ts +1 -1
- package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +12 -1
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-leading.d.ts +10 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-footer.d.ts +1 -1
- package/dist/lib/components/ui/selection/switcher/partials/switcher-popover.d.ts +3 -1
- package/dist/lib/components/ui/selection/switcher/partials/switcher-sheet.d.ts +3 -1
- package/dist/lib/components/ui/selection/switcher/partials/switcher-subtitle.d.ts +9 -0
- package/dist/lib/components/ui/selection/switcher/partials/switcher-trigger.d.ts +4 -1
- package/dist/lib/components/ui/selection/switcher/switcher.d.ts +1 -1
- package/dist/lib/components/ui/selection/switcher/types.d.ts +6 -2
- package/dist/main.js +1 -1
- package/dist/material.css +1 -1
- package/docs/components/data-display.md +17 -3
- package/docs/components/date-and-time.md +8 -4
- package/docs/components/selection-and-choice.md +13 -1
- package/docs/previews/date-time-datefield.webp +0 -0
- package/docs/previews/date-time-daterangefield.webp +0 -0
- package/docs/troubleshooting.md +65 -1
- package/lib/components/ui/display/chip/chip-parts.css +17 -30
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1602](https://github.com/softistx/nxgt-material/pull/1602) [`800051d`](https://github.com/softistx/nxgt-material/commit/800051ddb782564801354793fe59c3a2bf9589c3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DateField` / `DateFormField` / `DateRangeField` keep a value outside `minDate`, `maxDate`, `disablePast` or `disableFuture` (one set from the form or typed) instead of moving it onto the bound's day with its time of day, which turned a moment after midnight into one 24 hours earlier and let a form rule pass; the form refuses it and the calendar still keeps the day unpickable. The `Chip` dismiss ✕ has its own 24x24 box (44x44 on a coarse pointer), so axe `target-size` passes; the glyph and the chip height are unchanged. Fixes [#1583](https://github.com/softistx/nxgt-material/issues/1583). Fixes [#1584](https://github.com/softistx/nxgt-material/issues/1584).
|
|
8
|
+
|
|
9
|
+
Migration: a typed date outside `minDate`/`maxDate`/`disablePast`/`disableFuture` is no longer moved to the nearest allowed day on blur. It is kept, and the form refuses it. If your schema has no min/max rule, add one (see date-and-time.md).
|
|
10
|
+
|
|
11
|
+
## 3.20.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#1600](https://github.com/softistx/nxgt-material/pull/1600) [`edc806b`](https://github.com/softistx/nxgt-material/commit/edc806b3c0966c973d4c50d5cdc5696aab79a599) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `EntityHeader` takes `leading`, a slot for an interactive control at the band's start (a `Switcher`, either variant): drawn at its natural size beside the title, with no badge and no `aria-hidden`, so axe no longer reports `aria-hidden-focus`; on a phone it takes the band's width above the title. It replaces `icon` when both are given, with a development warning. `Switcher`'s option subtitle, cut by an ellipsis in the trigger, the menu or the panel, now carries its full text like the title does (`aria-label`, plus `title` in the options and the trigger's tooltip). `Switcher` in link mode now closes its panel (popover or phone sheet) when a link option is activated and no longer hands focus back to the trigger, so the new page's own focus runs; it also takes controlled `open` and `onOpenChange`. Fixes [#1590](https://github.com/softistx/nxgt-material/issues/1590), Fixes [#1591](https://github.com/softistx/nxgt-material/issues/1591) and Fixes [#1594](https://github.com/softistx/nxgt-material/issues/1594).
|
|
16
|
+
|
|
3
17
|
## 3.19.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -586,7 +586,7 @@ Not components: what the stylesheet gives any element.
|
|
|
586
586
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/selection-choice-transferlist.webp" width="120" alt="TransferList"> | [`TransferList`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/selection-and-choice.md#transferlist) · `TransferListFormField` | Two-pane picker with search, counts, select-all, Shift-range checks, drag-and-drop between panes, reordering and a `max`; avatar and badge slots, a `compact` density, and panes that stack in a narrow container. | `TransferList`, `TransferListFormField` |
|
|
587
587
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/selection-choice-sortablelist.webp" width="120" alt="SortableList"> | [`SortableList`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/selection-and-choice.md#sortablelist) · `SortableListFormField` | Searchable list you reorder by dragging (row or grip) or with the keyboard (Space to pick up, arrows, Space to drop, Escape to cancel), each step announced; `numbered`, `removable`, locked rows, `cards` or `plain`, `compact`. | `SortableList`, `SortableListFormField` |
|
|
588
588
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/selection-choice-treeselectfield.webp" width="120" alt="TreeSelectField"> | [`TreeSelectField`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/selection-and-choice.md#treeselectfield) · `TreeSelectFormField` | A field that opens a `Tree` in a popover: pick one node, or several as chips, with an optional filter. | `TreeSelectField`, `TreeSelectFormField` |
|
|
589
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/selection-choice-switcher.webp" width="120" alt="Switcher"> | [`Switcher`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/selection-and-choice.md#switcher) | Switches the active workspace, establishment or class: a menu, or a searchable panel with groups and links; an expressive variant. | `Switcher` |
|
|
589
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/selection-choice-switcher.webp" width="120" alt="Switcher"> | [`Switcher`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/selection-and-choice.md#switcher) | Switches the active workspace, establishment or class: a menu, or a searchable panel with groups and links; an expressive variant; a clipped subtitle keeps its full text; `open`/`onOpenChange`, and a link pick closes it. | `Switcher` |
|
|
590
590
|
|
|
591
591
|
### Data display
|
|
592
592
|
|
|
@@ -606,7 +606,7 @@ Not components: what the stylesheet gives any element.
|
|
|
606
606
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-statusindicator.webp" width="120" alt="StatusIndicator"> | [`StatusIndicator`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#statusindicator) | Coloured status dot with an optional pulse and label. | `StatusIndicator` |
|
|
607
607
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-summarydata.webp" width="120" alt="SummaryData"> | [`SummaryData`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#summarydata) | Label / value pairs as a grid or inline; hides empty values. | `SummaryData` |
|
|
608
608
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-description.webp" width="120" alt="Description"> | [`Description`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#description) | Read-only label / value pair that renders nothing when empty. | `Description` |
|
|
609
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-entityheader.webp" width="120" alt="EntityHeader"> | [`EntityHeader`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#entityheader) | Page header with icon, title (`headingLevel` 1 to 3), status, metadata, `stats` (figures as compact `size="sm"` StatCard tiles, 2×2 on a phone) and actions. | `EntityHeader` |
|
|
609
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-entityheader.webp" width="120" alt="EntityHeader"> | [`EntityHeader`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#entityheader) | Page header with icon, a `leading` control slot (a Switcher at the band's start), title (`headingLevel` 1 to 3), status, metadata, `stats` (figures as compact `size="sm"` StatCard tiles, 2×2 on a phone) and actions. | `EntityHeader` |
|
|
610
610
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-listtile.webp" width="120" alt="ListTile"> | [`ListTile`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#listtile) | Row with leading / trailing slots, title and subtitle; becomes a link (with a decorative chevron; `selected` sets `aria-current="page"`), a button, or with `toggle` a switch row where the whole row toggles. `size="sm"` is the dense row. | `ListTile` |
|
|
611
611
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-accordioncard.webp" width="120" alt="AccordionCard"> | [`AccordionCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#accordioncard) | Renders `items` (title, content) as a styled accordion. | `AccordionCard` |
|
|
612
612
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-timeline.webp" width="120" alt="Timeline"> | [`Timeline`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#timeline), `TimelineItem`, `RelativeTime` | Vertical event timeline with toned icons and relative times. | `Timeline`, `TimelineItem`, `RelativeTime` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Chip: focus, the dismiss button (drawn
|
|
2
|
-
* small
|
|
2
|
+
* small in a 24x24 box, 44x44 on a coarse pointer, its own ring), disabled, the dashed
|
|
3
3
|
* "add" chip and the tones. */
|
|
4
4
|
@layer components {
|
|
5
5
|
/* Focus: the chip's ring (2px primary-text, 2px away); the ✕ its own. */
|
|
@@ -8,54 +8,41 @@
|
|
|
8
8
|
outline-color: var(--primary-text);
|
|
9
9
|
outline-width: 2px;
|
|
10
10
|
}
|
|
11
|
+
/* The ✕ is drawn small (--chip-x), but its own box is the target (#1584):
|
|
12
|
+
* axe's `target-size` reads the bounding box, never a pseudo-element. The
|
|
13
|
+
* box is 24x24 (44x44 on a coarse pointer, #1067, #1102); the padding with
|
|
14
|
+
* `background-clip: content-box` keeps the hover disc and the focus ring at
|
|
15
|
+
* the drawn size, and the negative margin takes the extra back, so the chip
|
|
16
|
+
* and the glyph are unchanged. */
|
|
11
17
|
.nxgt-chip > [data-slot="chip-dismiss"] {
|
|
18
|
+
--chip-hit: 24px;
|
|
19
|
+
--chip-pad: calc((var(--chip-hit) - var(--chip-x)) / 2);
|
|
12
20
|
position: relative;
|
|
13
21
|
display: inline-grid;
|
|
14
22
|
place-items: center;
|
|
15
23
|
flex: none;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
width: var(--chip-hit);
|
|
26
|
+
height: var(--chip-hit);
|
|
27
|
+
margin: calc(-1 * var(--chip-pad));
|
|
28
|
+
padding: var(--chip-pad);
|
|
19
29
|
border: 0;
|
|
20
30
|
border-radius: 9999px;
|
|
21
31
|
background: transparent;
|
|
32
|
+
background-clip: content-box;
|
|
22
33
|
color: color-mix(in oklab, var(--foreground) 62%, transparent);
|
|
23
34
|
cursor: pointer;
|
|
24
35
|
/* Width 0 at rest: forced colours would paint a transparent outline. */
|
|
25
36
|
outline: 0 solid transparent;
|
|
26
|
-
outline-offset: 1px;
|
|
37
|
+
outline-offset: calc(1px - var(--chip-pad));
|
|
27
38
|
transition:
|
|
28
39
|
background-color 120ms ease-out,
|
|
29
40
|
color 120ms ease-out,
|
|
30
41
|
outline-color 120ms ease-out;
|
|
31
42
|
}
|
|
32
|
-
.nxgt-chip > [data-slot="chip-dismiss"]::after {
|
|
33
|
-
content: "";
|
|
34
|
-
position: absolute;
|
|
35
|
-
inset: calc((var(--chip-x) - 24px) / 2);
|
|
36
|
-
border-radius: 9999px;
|
|
37
|
-
}
|
|
38
|
-
/* Touch (#1067, #1102): on a coarse pointer the ✕ is a real 44x44 box,
|
|
39
|
-
* not a pseudo-element, which a tap-target check and axe do not measure.
|
|
40
|
-
* The negative margin takes the extra back, so the chip is unchanged, and
|
|
41
|
-
* the padding with `background-clip: content-box` keeps the hover disc
|
|
42
|
-
* and the focus ring at the drawn size (the outline is pulled in by the
|
|
43
|
-
* padding). */
|
|
44
43
|
@media (pointer: coarse) {
|
|
45
44
|
.nxgt-chip > [data-slot="chip-dismiss"] {
|
|
46
|
-
--chip-
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
width: 44px;
|
|
49
|
-
height: 44px;
|
|
50
|
-
margin: calc(-1 * var(--chip-pad));
|
|
51
|
-
padding: var(--chip-pad);
|
|
52
|
-
background-clip: content-box;
|
|
53
|
-
outline-offset: calc(1px - var(--chip-pad));
|
|
54
|
-
}
|
|
55
|
-
/* The box is the target now: the 24px pseudo-element would reach
|
|
56
|
-
* past it. */
|
|
57
|
-
.nxgt-chip > [data-slot="chip-dismiss"]::after {
|
|
58
|
-
inset: 0;
|
|
45
|
+
--chip-hit: 44px;
|
|
59
46
|
}
|
|
60
47
|
}
|
|
61
48
|
.nxgt-chip > [data-slot="chip-dismiss"] > svg {
|