@iyulab/components 1.45.1 → 1.45.2

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.45.2] - 2026-09-24
4
+
5
+ ### Fixed
6
+
7
+ - **`u-button.focus()` now focuses the button.** The host itself is not focusable, so calling
8
+ `focus()` on a `u-button` did nothing — no error, no focus. Anything that moves focus to a
9
+ button (initial focus when a panel opens, returning focus when it closes) failed silently. The
10
+ host now delegates focus to the inner native `<button>` (or `<a>` when `href` is set), and the
11
+ host matches `:focus` while it holds it. A disabled button still cannot take focus.
12
+
3
13
  ## [1.45.1] - 2026-09-24
4
14
 
5
15
  ### Fixed
@@ -57,6 +57,12 @@ export type ButtonSize = "sm" | "md" | "lg";
57
57
  export declare class UButton extends UElement {
58
58
  static styles: import('lit').CSSResultGroup[];
59
59
  static formAssociated: boolean;
60
+ /**
61
+ * 호스트의 `.focus()` 를 섀도 안의 네이티브 `<button>`/`<a>` 로 위임한다. 호스트는 포커스
62
+ * 가능하지 않으므로 위임이 없으면 `el.focus()` 가 오류 없이 아무 일도 하지 않는다 —
63
+ * 네이티브 버튼을 대체하는 요소가 잃으면 안 되는 계약이다.
64
+ */
65
+ static shadowRootOptions: ShadowRootInit;
60
66
  /** 버튼 스타일 변형 */
61
67
  variant: ButtonVariant;
62
68
  /**
@@ -37,6 +37,12 @@ var UButton = class UButton extends UElement {
37
37
  static {
38
38
  this.formAssociated = true;
39
39
  }
40
+ static {
41
+ this.shadowRootOptions = {
42
+ ...UElement.shadowRootOptions,
43
+ delegatesFocus: true
44
+ };
45
+ }
40
46
  set form(val) {
41
47
  if (val) this.setAttribute("form", val);
42
48
  else this.removeAttribute("form");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/components",
3
3
  "description": "web-components library based on lit-element made by iyulab",
4
- "version": "1.45.1",
4
+ "version": "1.45.2",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",