tandd-ui 0.2.3 → 0.2.4

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.4 (2026-11-17)
4
+
5
+ ### Changed
6
+
7
+ - **Field focus:** plain `input`, `select`, and `textarea` elements focus like DTInput: the border turns primary and there is no outline ring. Checkbox, radio, range, colour, file, and button inputs keep the ring. Under forced colors the border uses `Highlight`.
8
+ - **DTSelect focus:** the trigger no longer shows a 3px focus halo; focus recolours the border only, like DTInput. Forced colors still draw a `Highlight` outline.
9
+
3
10
  ## 0.2.3 (2026-11-14)
4
11
 
5
12
  ### Fixed
package/dist/tandd-ui.css CHANGED
@@ -306,6 +306,13 @@ select {
306
306
  outline-offset: var(--dt-focus-ring-offset);
307
307
  }
308
308
 
309
+ :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=button], [type=submit], [type=reset], [type=image]),
310
+ textarea,
311
+ select):focus {
312
+ outline: none;
313
+ border-color: var(--dt-color-primary);
314
+ }
315
+
309
316
  @media (prefers-reduced-motion: reduce) {
310
317
  *,
311
318
  *::before,
@@ -352,6 +359,13 @@ select {
352
359
  outline-color: Highlight;
353
360
  }
354
361
  }
362
+ @media (forced-colors: active) {
363
+ :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=button], [type=submit], [type=reset], [type=image]),
364
+ textarea,
365
+ select):focus {
366
+ border-color: Highlight;
367
+ }
368
+ }
355
369
  .dt-container {
356
370
  width: 100%;
357
371
  max-width: var(--dt-container-max-width, var(--dt-container-xl));
@@ -4861,10 +4875,6 @@ select {
4861
4875
  border-color: var(--dt-color-primary);
4862
4876
  }
4863
4877
 
4864
- .dt-select__trigger:focus-visible {
4865
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--dt-color-focus) 23%, transparent);
4866
- }
4867
-
4868
4878
  .dt-select__trigger:disabled {
4869
4879
  border-color: var(--dt-color-border);
4870
4880
  color: var(--dt-color-text-disabled);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tandd-ui",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Vue 3 component library from the TanDD UI design reference: light and dark themes, localization, and accessible components.",
5
5
  "license": "MIT",
6
6
  "author": "TanDD (https://tandd.dev)",
@@ -44,16 +44,13 @@
44
44
  background: var(--dt-color-surface-hover);
45
45
  }
46
46
 
47
+ // Focus recolours the border only (no ring), like DTInput.
47
48
  .dt-select__trigger:focus-visible,
48
49
  .dt-select.is-open .dt-select__trigger {
49
50
  outline: none;
50
51
  border-color: var(--dt-color-primary);
51
52
  }
52
53
 
53
- .dt-select__trigger:focus-visible {
54
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--dt-color-focus) 23%, transparent);
55
- }
56
-
57
54
  // Disabled text uses the lighter disabled colour, as DTInput does (round 9, T9-1).
58
55
  .dt-select__trigger:disabled {
59
56
  border-color: var(--dt-color-border);
@@ -10,3 +10,15 @@
10
10
  outline: var(--dt-focus-ring-width) solid var(--dt-focus-ring-color);
11
11
  outline-offset: var(--dt-focus-ring-offset);
12
12
  }
13
+
14
+ // Plain text inputs, selects, and textareas focus like DTInput: the border turns primary, no ring.
15
+ // :where() keeps the selector at :focus specificity so component rules still win. Checkbox, radio,
16
+ // range, colour, file, and button inputs keep the ring: they have no border to recolour.
17
+ :where(
18
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]),
19
+ textarea,
20
+ select
21
+ ):focus {
22
+ outline: none;
23
+ border-color: var(--dt-color-primary);
24
+ }
@@ -7,3 +7,14 @@
7
7
  outline-color: Highlight;
8
8
  }
9
9
  }
10
+
11
+ // Plain fields drop the focus ring (foundation/focus); the border carries focus instead.
12
+ @media (forced-colors: active) {
13
+ :where(
14
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]),
15
+ textarea,
16
+ select
17
+ ):focus {
18
+ border-color: Highlight;
19
+ }
20
+ }