use-wc 1.0.0-pre.77 → 1.0.0-pre.78

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.
@@ -2440,6 +2440,18 @@
2440
2440
  "type": {
2441
2441
  "text": "string[] | string | null"
2442
2442
  }
2443
+ },
2444
+ {
2445
+ "kind": "method",
2446
+ "name": "claimRovingTabStop",
2447
+ "parameters": [
2448
+ {
2449
+ "name": "cell",
2450
+ "type": {
2451
+ "text": "HTMLElement"
2452
+ }
2453
+ }
2454
+ ]
2443
2455
  }
2444
2456
  ],
2445
2457
  "attributes": [
@@ -322,7 +322,7 @@
322
322
  --usewc-local-link-decoration-line: var(--usewc-effect-link-chrome-text-decoration);
323
323
  }
324
324
 
325
- :is(a:not([class*="appearance-"]), .appearance-a) {
325
+ :where(a:not([class*="appearance-"]), .appearance-a) {
326
326
  &:where(:not(a)) {
327
327
  all: unset;
328
328
  }
@@ -1429,8 +1429,10 @@
1429
1429
  blue-600/700/800 — `currentColor` alone can't step down like that, so each state is the
1430
1430
  cell's own color with its lightness nudged instead. `link.css`'s own decoration-color rule
1431
1431
  already derives from `--usewc-local-link-text`, so the underline follows every step here for
1432
- free, staying a lighter tint of whichever shade the text itself is in. */
1433
- use-gridcell :is(a:not([class*="appearance-"]), .appearance-a) {
1432
+ free, staying a lighter tint of whichever shade the text itself is in. `.control` is excluded
1433
+ the same as `appearance-*` — it's header chrome with its own complete treatment below, not
1434
+ content that should read as a link. */
1435
+ use-gridcell :is(a:not([class*="appearance-"], .control), .appearance-a) {
1434
1436
  --usewc-color-link-text-static: currentColor;
1435
1437
  --usewc-color-link-text-hover: oklch(
1436
1438
  from currentColor calc(l + var(--usewc-color-grid-cell-link-hover-lightness-shift)) c h
@@ -40,6 +40,7 @@ generated id. Lazily created so single-select grids without a `name` still group
40
40
  | Name | Signature | Description |
41
41
  | --- | --- | --- |
42
42
  | isRowDisabled | `(row: Element \| null \| undefined)` | - |
43
+ | claimRovingTabStop | `(cell: HTMLElement)` | - |
43
44
 
44
45
  ## Slots
45
46
 
package/dist/use-wc.d.mts CHANGED
@@ -1654,6 +1654,7 @@ export declare class UseGrid extends LitElement {
1654
1654
  updated(changedProps: Map<string, unknown>): void;
1655
1655
  connectedCallback(): void;
1656
1656
  disconnectedCallback(): void;
1657
+ claimRovingTabStop(cell: HTMLElement): void;
1657
1658
  firstUpdated(): void;
1658
1659
  render(): TemplateResult$1<1>;
1659
1660
  static styles: import("lit").CSSResult;
package/dist/use-wc.mjs CHANGED
@@ -4892,11 +4892,13 @@ let UseGrid = class UseGrid extends LitElement {
4892
4892
  this.#unwatchMutations();
4893
4893
  super.disconnectedCallback();
4894
4894
  }
4895
- #focusGridCell(cell) {
4895
+ claimRovingTabStop(cell) {
4896
4896
  this.#getCellCache().cells.forEach((candidate) => {
4897
- candidate.tabIndex = -1;
4897
+ candidate.tabIndex = candidate === cell ? 0 : -1;
4898
4898
  });
4899
- cell.tabIndex = 0;
4899
+ }
4900
+ #focusGridCell(cell) {
4901
+ this.claimRovingTabStop(cell);
4900
4902
  cell.focus();
4901
4903
  }
4902
4904
  firstUpdated() {
@@ -5225,6 +5227,7 @@ let UseGridCell = class UseGridCell extends UseWidget {
5225
5227
  this.#handleFocusIn = () => {
5226
5228
  this.#initializeAction();
5227
5229
  if (this.#action) {
5230
+ this.closest("use-grid")?.claimRovingTabStop(this);
5228
5231
  this.#action.focus();
5229
5232
  this.tabIndex = -1;
5230
5233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-wc",
3
- "version": "1.0.0-pre.77",
3
+ "version": "1.0.0-pre.78",
4
4
  "private": false,
5
5
  "homepage": "https://usewc.com",
6
6
  "bugs": "https://github.com/dang-rabbits/use-wc/issues",