tandd-ui 0.2.2 → 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,18 @@
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
+
10
+ ## 0.2.3 (2026-11-14)
11
+
12
+ ### Fixed
13
+
14
+ - **DTTable and DTDataTable scrolling:** a table with a scroll height (`max-height`, `height`, `virtual`, `body-scroll`) no longer traps the page. Once the table reaches its top or bottom, the wheel or a touch swipe scrolls the page, as any scroll box does. Only sideways scrolling stays inside the table, so a swipe on a wide table does not trigger the browser's back gesture.
15
+
3
16
  ## 0.2.2 (2026-11-12)
4
17
 
5
18
  ### Changed
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);
@@ -10361,7 +10371,7 @@ button.dt-stepper__header[aria-disabled=true] {
10361
10371
  width: 100%;
10362
10372
  max-height: var(--dt-table-max-height, none);
10363
10373
  overflow: auto;
10364
- overscroll-behavior: contain;
10374
+ overscroll-behavior-x: contain;
10365
10375
  border: 1px solid var(--dt-color-border);
10366
10376
  border-radius: var(--dt-radius-md);
10367
10377
  background: var(--dt-color-surface);
@@ -10690,7 +10700,7 @@ span.dt-border-beam {
10690
10700
 
10691
10701
  .dt-data-table__wrap {
10692
10702
  max-width: 100%;
10693
- overscroll-behavior: contain;
10703
+ overscroll-behavior-x: contain;
10694
10704
  }
10695
10705
 
10696
10706
  .dt-data-table__caption,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tandd-ui",
3
- "version": "0.2.2",
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)",
@@ -19,7 +19,8 @@
19
19
  // The scroll box: wide tables scroll inside it, never the page.
20
20
  .dt-data-table__wrap {
21
21
  max-width: 100%;
22
- overscroll-behavior: contain;
22
+ // As DTTable: vertical scroll chains to the page at the table's edges; only sideways is contained.
23
+ overscroll-behavior-x: contain;
23
24
  }
24
25
 
25
26
  .dt-data-table__caption,
@@ -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);
@@ -4,7 +4,12 @@
4
4
  width: 100%;
5
5
  max-height: var(--dt-table-max-height, none);
6
6
  overflow: auto;
7
- overscroll-behavior: contain;
7
+ // Vertical scroll chains to the page once the table reaches its top or bottom, as any scroll box
8
+ // does: a table taller than the screen must never trap the wheel or a touch swipe (user report
9
+ // 2026-11-14, "khi dài thì chặn scroll"). `contain` was set here and stopped the page. Only the
10
+ // horizontal axis is contained, so a sideways swipe on a wide table does not trigger the browser's
11
+ // back/forward gesture.
12
+ overscroll-behavior-x: contain;
8
13
  border: 1px solid var(--dt-color-border);
9
14
  border-radius: var(--dt-radius-md);
10
15
  background: var(--dt-color-surface);
@@ -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
+ }