@nxgt/material 3.107.0 → 3.107.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.
@@ -1363,6 +1363,8 @@ import { Badge, ProductTile, ResponsiveGrid } from '@nxgt/material/components';
1363
1363
  </ResponsiveGrid>
1364
1364
  ```
1365
1365
 
1366
+ A `selected` tile gets `aria-pressed`, a tint, a 2px ring and a bar at the start. The edge is `--primary-indicator`, 3:1 or more against the Card in light and dark (the bar is the cue that does not rely on hue). The look is the `nxgt-tile-selected` class (from `tile-selected.css`).
1367
+
1366
1368
  | Prop | Type | Default | Effect |
1367
1369
  | --- | --- | --- | --- |
1368
1370
  | `title` | `ReactNode` | required | The name, up to two lines |
@@ -1163,6 +1163,8 @@ import { ListTile } from '@nxgt/material/components';
1163
1163
  <ListTile title="Notifications" subtitle="Email and push" href="/settings/notifications" />
1164
1164
  ```
1165
1165
 
1166
+ `selected` draws a tint, a 2px ring and a bar at the start, from `--primary-indicator` (and `--primary-text` for the tint in dark): the edge is 3:1 or more against the surface in light and dark, and the bar tells it apart without hue. A `divided` row keeps the bar only. The look is the `nxgt-tile-selected` class (`tile-selected.css`); a `className` of your own should not repaint its `background` or `box-shadow`.
1167
+
1166
1168
  A tile with an `href` ends with a discreet chevron after `trailing`: decorative (`aria-hidden`, so the link's name stays its text) and flipped in right-to-left. `chevron={false}` opts out; `chevron` on a button tile (an `onClick` that navigates) opts in.
1167
1169
 
1168
1170
  | Prop | Type | Default | Effect |
@@ -207,7 +207,7 @@ till's quantity and cash pad beside the ticket) takes `size="compact"`:
207
207
  | `keyboard` | `'focus'` | `'focus'`, `'global'` or `false` |
208
208
  | `size` | `'comfortable'` | `'comfortable'`, `'large'` or `'compact'` (docked use) |
209
209
  | `display` | `true`, `false` with a `binding` and no `operations` | Shows the amount above the keys |
210
- | `commitLabel` | translated "Enter" ("Tender" in cash) | The commit key's name and text |
210
+ | `commitLabel` | translated "Enter" ("Tender" in cash) | The commit key's name and text. A named key shows "✓ label" and takes a full-width row under the zero key, so a till's "Charge" reads whole |
211
211
  | `disabled` | `false` | Keys do nothing and say so (`aria-disabled`) |
212
212
  | `placeholder` | none | Muted hint while the entry is empty, also with a `currency` (visual only, `aria-hidden`; not shown on an error) |
213
213
  | `label` | "Keypad" | The group's accessible name |
@@ -223,8 +223,9 @@ under 360px, wider keys from 600px, automatic) and is at most 24rem wide. The
223
223
  `size` prop is separate: `size="large"` gives
224
224
  taller keys. `size="compact"` is for a keypad docked beside other content: 36px
225
225
  keys, tighter gaps, a smaller display, and in cash a denser total and change
226
- and the quick amounts (four at most) on one row, so a 4-row pad with its display fits about
227
- 320px of height (the cash variant a little more). On a coarse pointer the keys
226
+ and the quick amounts (four at most) in two short columns, so none is cut at
227
+ 360px ("FCFA 20,000" fits). A 4-row pad with its display fits about
228
+ 320px of height (the cash variant a little more, and a named `commitLabel` key adds a fifth row). On a coarse pointer the keys
228
229
  and the quick amounts stay at 44px, so a touch till gets the tighter gaps and
229
230
  display but not shorter keys. Colours and shapes follow the theme and dark mode
230
231
  through `styles.css`; the key rules are shared with the calculator in `calculator.css`.
@@ -179,6 +179,8 @@
179
179
  @import "./ui/display/chip/chip-hairline.css";
180
180
  @import "./ui/display/chip/chip-soft.css";
181
181
  @import "./ui/display/chip/chip-tag.css";
182
+ /* Selected ProductTile and ListTile (#2925). */
183
+ @import "./ui/display/list-tile/tile-selected.css";
182
184
  /* Calendar: its look, then its motion (springs from motion.css). */
183
185
  @import "./ui/dates/calendar/calendar.css";
184
186
  @import "./ui/dates/calendar/calendar-expressive.css";
@@ -0,0 +1,34 @@
1
+ /* The selected look of ProductTile and ListTile (#2925): a tint, a 2px ring and a bar
2
+ * at the start. The ring and the bar are --primary-indicator, the theme's 3:1
3
+ * non-text primary (the lifted one in dark), so a selected tile is >=3:1 against
4
+ * the surface in light and dark; the tint is --primary-text in dark (the deep
5
+ * --primary gave ~1.1:1 over a Card). The bar is the cue that does not rely on
6
+ * hue. The label stays --foreground (>=4.5:1 on the tint). */
7
+ @layer components {
8
+ .nxgt-tile-selected {
9
+ --tile-on: color-mix(in oklab, var(--primary) 14%, var(--card));
10
+ --tile-edge: var(--primary-indicator);
11
+ --tile-bar: 3px;
12
+ box-shadow:
13
+ inset 0 0 0 2px var(--tile-edge),
14
+ inset var(--tile-bar) 0 0 0 var(--tile-edge);
15
+ background: var(--tile-on);
16
+ border-color: var(--tile-edge);
17
+ }
18
+ :is(.dark, [data-theme="dark"]) .nxgt-tile-selected {
19
+ --tile-on: color-mix(in oklab, var(--primary-text) 22%, var(--card));
20
+ }
21
+ .nxgt-tile-selected:dir(rtl) {
22
+ box-shadow:
23
+ inset 0 0 0 2px var(--tile-edge),
24
+ inset calc(var(--tile-bar) * -1) 0 0 0 var(--tile-edge);
25
+ }
26
+ /* A divided row is flat: the bar only, no ring. */
27
+ .nxgt-tile-selected.nxgt-tile-flat {
28
+ box-shadow: inset var(--tile-bar) 0 0 0 var(--tile-edge);
29
+ border-color: transparent;
30
+ }
31
+ .nxgt-tile-selected.nxgt-tile-flat:dir(rtl) {
32
+ box-shadow: inset calc(var(--tile-bar) * -1) 0 0 0 var(--tile-edge);
33
+ }
34
+ }
@@ -32,6 +32,9 @@
32
32
  .nxgt-calc-key[data-span="3"] {
33
33
  grid-column: span 3;
34
34
  }
35
+ .nxgt-calc-key[data-span="12"] {
36
+ grid-column: span 12;
37
+ }
35
38
  .nxgt-calc-key[data-span="9"] {
36
39
  grid-column: span 9;
37
40
  }
@@ -242,8 +242,11 @@
242
242
  outline-offset: 2px;
243
243
  }
244
244
 
245
- /* Keypad, compact: the cash rows and the quick amounts take less height; the
246
- * four amounts sit on one row. A coarse pointer keeps 44px chips. */
245
+ /* Keypad, compact: the cash rows and the quick amounts take less height. The
246
+ * amounts keep the two columns of the default size: four would give each a
247
+ * quarter of a 24rem keypad, less than "FCFA 20,000" needs, so they wrap to
248
+ * two short rows, and an amount too long for its half is cut with an ellipsis
249
+ * (its accessible name is the full amount). A coarse pointer keeps 44px chips. */
247
250
  .nxgt-keypad[data-size="compact"] .nxgt-keypad-cash {
248
251
  gap: 0.125rem;
249
252
  }
@@ -260,18 +263,12 @@
260
263
  .nxgt-keypad[data-size="compact"] .nxgt-keypad-cash [data-status] dd {
261
264
  font-size: 1.25rem;
262
265
  }
263
- .nxgt-keypad[data-size="compact"] .nxgt-keypad-shortcuts {
264
- grid-template-columns: repeat(4, minmax(0, 1fr));
265
- }
266
266
  .nxgt-keypad[data-size="compact"] .nxgt-keypad-shortcuts button {
267
267
  min-height: 2rem;
268
- padding-inline: 0.25rem;
268
+ padding-inline: 0.5rem;
269
269
  font-size: 0.875rem;
270
- }
271
- .nxgt-keypad[data-size="compact"]
272
- .nxgt-keypad-shortcuts
273
- button:last-child:nth-child(odd) {
274
- grid-column: auto;
270
+ overflow: hidden;
271
+ text-overflow: ellipsis;
275
272
  }
276
273
  @media (pointer: coarse) {
277
274
  .nxgt-keypad[data-size="compact"] .nxgt-keypad-shortcuts button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.107.0",
3
+ "version": "3.107.1",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"