@iyulab/components 1.3.4 → 1.4.0

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -1
  3. package/dist/assets/locales/ar.json.js +23 -0
  4. package/dist/assets/locales/de.json.js +23 -0
  5. package/dist/assets/locales/en.json.js +23 -0
  6. package/dist/assets/locales/es.json.js +23 -0
  7. package/dist/assets/locales/fr.json.js +23 -0
  8. package/dist/assets/locales/id.json.js +23 -0
  9. package/dist/assets/locales/ja.json.js +23 -0
  10. package/dist/assets/locales/ko.json.js +23 -0
  11. package/dist/assets/locales/pt-BR.json.js +23 -0
  12. package/dist/assets/locales/ru.json.js +23 -0
  13. package/dist/assets/locales/th.json.js +23 -0
  14. package/dist/assets/locales/vi.json.js +23 -0
  15. package/dist/assets/locales/zh-CN.json.js +23 -0
  16. package/dist/assets/locales/zh-TW.json.js +23 -0
  17. package/dist/components/UFloatingElement.js +13 -4
  18. package/dist/components/UFormControlElement.d.ts +38 -8
  19. package/dist/components/UFormControlElement.js +61 -6
  20. package/dist/components/UOverlayElement.d.ts +4 -0
  21. package/dist/components/UOverlayElement.js +14 -4
  22. package/dist/components/alert/UAlert.js +10 -4
  23. package/dist/components/alert/UAlert.styles.js +0 -6
  24. package/dist/components/avatar/UAvatar.js +1 -1
  25. package/dist/components/badge/UBadge.d.ts +1 -1
  26. package/dist/components/badge/UBadge.js +2 -2
  27. package/dist/components/badge/UBadge.styles.js +1 -1
  28. package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
  29. package/dist/components/breadcrumb-item/UBreadcrumbItem.js +1 -1
  30. package/dist/components/button/UButton.d.ts +6 -11
  31. package/dist/components/button/UButton.js +1 -1
  32. package/dist/components/button/UButton.styles.js +50 -51
  33. package/dist/components/button-group/UButtonGroup.js +1 -1
  34. package/dist/components/card/UCard.js +1 -1
  35. package/dist/components/carousel/UCarousel.js +2 -2
  36. package/dist/components/checkbox/UCheckbox.d.ts +4 -1
  37. package/dist/components/checkbox/UCheckbox.js +11 -8
  38. package/dist/components/checkbox/UCheckbox.styles.js +12 -7
  39. package/dist/components/chip/UChip.js +6 -3
  40. package/dist/components/dialog/UDialog.js +2 -2
  41. package/dist/components/divider/UDivider.js +1 -1
  42. package/dist/components/drawer/UDrawer.js +2 -2
  43. package/dist/components/drawer/UDrawer.styles.js +0 -6
  44. package/dist/components/field/UField.js +1 -1
  45. package/dist/components/form/UForm.js +1 -1
  46. package/dist/components/icon/UIcon.js +1 -1
  47. package/dist/components/icon-button/UIconButton.d.ts +0 -1
  48. package/dist/components/icon-button/UIconButton.js +2 -7
  49. package/dist/components/input/UInput.d.ts +2 -3
  50. package/dist/components/input/UInput.js +37 -9
  51. package/dist/components/input/UInput.styles.js +1 -4
  52. package/dist/components/menu/UMenu.js +1 -1
  53. package/dist/components/menu-item/UMenuItem.js +1 -1
  54. package/dist/components/menu-item/UMenuItem.styles.js +4 -3
  55. package/dist/components/option/UOption.d.ts +4 -1
  56. package/dist/components/option/UOption.js +10 -4
  57. package/dist/components/option/UOption.styles.js +5 -4
  58. package/dist/components/panel/UPanel.js +1 -1
  59. package/dist/components/popover/UPopover.js +1 -1
  60. package/dist/components/progress-bar/UProgressBar.js +1 -1
  61. package/dist/components/progress-bar/UProgressBar.styles.js +2 -2
  62. package/dist/components/progress-ring/UProgressRing.js +1 -1
  63. package/dist/components/progress-ring/UProgressRing.styles.js +2 -2
  64. package/dist/components/radio/URadio.d.ts +1 -1
  65. package/dist/components/radio/URadio.js +5 -6
  66. package/dist/components/radio/URadio.styles.js +21 -16
  67. package/dist/components/rating/URating.d.ts +3 -2
  68. package/dist/components/rating/URating.js +30 -37
  69. package/dist/components/select/USelect.d.ts +8 -5
  70. package/dist/components/select/USelect.js +29 -41
  71. package/dist/components/select/USelect.styles.js +5 -5
  72. package/dist/components/skeleton/USkeleton.js +1 -1
  73. package/dist/components/slider/USlider.d.ts +3 -2
  74. package/dist/components/slider/USlider.js +20 -30
  75. package/dist/components/slider/USlider.styles.js +2 -2
  76. package/dist/components/spinner/USpinner.js +1 -1
  77. package/dist/components/spinner/USpinner.styles.js +1 -1
  78. package/dist/components/split-panel/USplitPanel.js +25 -13
  79. package/dist/components/switch/USwitch.d.ts +4 -1
  80. package/dist/components/switch/USwitch.js +11 -8
  81. package/dist/components/switch/USwitch.styles.js +5 -1
  82. package/dist/components/tab/UTab.js +6 -3
  83. package/dist/components/tab-panel/UTabPanel.d.ts +5 -0
  84. package/dist/components/tab-panel/UTabPanel.js +12 -4
  85. package/dist/components/tab-panel/UTabPanel.styles.js +7 -3
  86. package/dist/components/tag/UTag.js +1 -1
  87. package/dist/components/tag/UTag.styles.js +14 -13
  88. package/dist/components/textarea/UTextarea.d.ts +1 -1
  89. package/dist/components/textarea/UTextarea.js +17 -6
  90. package/dist/components/tooltip/UTooltip.js +1 -1
  91. package/dist/components/tree/UTree.js +1 -1
  92. package/dist/components/tree-item/UTreeItem.js +10 -4
  93. package/dist/components/tree-item/UTreeItem.styles.js +5 -4
  94. package/dist/index.d.ts +2 -4
  95. package/dist/index.js +6 -8
  96. package/dist/react/UTabPanel.d.ts +1 -0
  97. package/dist/react/UTabPanel.js +3 -1
  98. package/dist/styles/dark.css +99 -99
  99. package/dist/utilities/Locale.d.ts +38 -0
  100. package/dist/utilities/Locale.js +93 -0
  101. package/dist/utilities/Toast.d.ts +9 -0
  102. package/dist/utilities/Toast.js +15 -7
  103. package/dist/utilities/elements.d.ts +0 -23
  104. package/dist/utilities/elements.js +1 -34
  105. package/package.json +2 -3
  106. package/skills/iyulab-components/SKILL.md +2 -3
  107. package/skills/iyulab-components/references/components/input.md +1 -2
  108. package/skills/iyulab-components/references/components/option.md +1 -0
  109. package/skills/iyulab-components/references/components/select.md +1 -2
  110. package/skills/iyulab-components/references/components/tab-panel.md +6 -0
  111. package/skills/iyulab-components/references/extensions/form-control.md +22 -6
  112. package/skills/iyulab-components/references/usage.md +11 -0
  113. package/skills/iyulab-components/references/utilities/elements.md +1 -17
  114. package/skills/iyulab-components/references/utilities/locale.md +36 -0
  115. package/skills/iyulab-components/references/utilities/theme.md +12 -0
  116. package/skills/iyulab-components/references/utilities/toast.md +6 -0
  117. package/dist/components/UDataElement.d.ts +0 -44
  118. package/dist/components/UDataElement.js +0 -101
  119. package/dist/components/UDataElement.styles.d.ts +0 -1
  120. package/dist/components/UDataElement.styles.js +0 -95
  121. package/dist/core/locale.d.ts +0 -69
  122. package/dist/core/locale.js +0 -85
  123. package/dist/utilities/sanitizers.d.ts +0 -35
  124. package/dist/utilities/sanitizers.js +0 -75
  125. package/skills/iyulab-components/references/extensions/data.md +0 -60
  126. package/skills/iyulab-components/references/utilities/sanitizers.md +0 -32
@@ -50,12 +50,15 @@ var UOverlayElement = class extends UElement {
50
50
  super.updated(changedProperties);
51
51
  if (changedProperties.has("open")) this.open ? this.setup() : this.cleanup();
52
52
  }
53
- /**
54
- * 오버레이를 표시합니다. u-show 이벤트가 취소되면 열리지 않습니다.
53
+ /**
54
+ * 오버레이를 표시합니다. u-show 이벤트가 취소되면 열리지 않습니다.
55
55
  */
56
56
  show() {
57
57
  if (this.open) return true;
58
- if (this.fire("show")) {
58
+ if (this.fire("show", {
59
+ bubbles: false,
60
+ composed: false
61
+ })) {
59
62
  this.open = true;
60
63
  return true;
61
64
  }
@@ -64,10 +67,17 @@ var UOverlayElement = class extends UElement {
64
67
  /**
65
68
  * 오버레이를 숨깁니다. `hide` 이벤트가 취소되면 닫히지 않습니다.
66
69
  * (이벤트 이름은 `hide`, prefix 없음 — `addEventListener('hide', ...)`로 수신)
70
+ *
71
+ * bubbles:false — 중첩된 다이얼로그/드로어/팝오버 조합에서 자식의 hide가
72
+ * 조상 오버레이까지 버블링되어 조상이 자신의 hide로 오인해 닫히는 사고를 방지한다.
73
+ * 이 이벤트는 항상 자기 자신(target)에 리스너를 붙이는 패턴으로만 소비된다.
67
74
  */
68
75
  hide() {
69
76
  if (!this.open) return true;
70
- if (this.fire("hide")) {
77
+ if (this.fire("hide", {
78
+ bubbles: false,
79
+ composed: false
80
+ })) {
71
81
  this.open = false;
72
82
  return true;
73
83
  }
@@ -1,11 +1,11 @@
1
1
  import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
- import "../icon/UIcon.js";
5
4
  import "../button/UButton.js";
5
+ import "../icon/UIcon.js";
6
6
  import { styles } from "./UAlert.styles.js";
7
- import { customElement, property } from "lit/decorators.js";
8
7
  import { html } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
9
  //#region src/components/alert/UAlert.ts
10
10
  var UAlert = class UAlert extends UElement {
11
11
  constructor(..._args) {
@@ -56,7 +56,10 @@ var UAlert = class UAlert extends UElement {
56
56
  */
57
57
  show() {
58
58
  if (this.open) return true;
59
- if (this.fire("show")) {
59
+ if (this.fire("show", {
60
+ bubbles: false,
61
+ composed: false
62
+ })) {
60
63
  this.open = true;
61
64
  return true;
62
65
  }
@@ -67,7 +70,10 @@ var UAlert = class UAlert extends UElement {
67
70
  */
68
71
  hide() {
69
72
  if (!this.open) return true;
70
- if (this.fire("hide")) {
73
+ if (this.fire("hide", {
74
+ bubbles: false,
75
+ composed: false
76
+ })) {
71
77
  this.open = false;
72
78
  return true;
73
79
  }
@@ -39,12 +39,6 @@ var styles = css`
39
39
  min-width: 200px;
40
40
  max-width: 100%;
41
41
  max-height: 50vh;
42
- /*
43
- * 내부 여백은 .container 에 둔다(:host 아님).
44
- * 소비앱의 light-DOM 리셋(예: Tailwind preflight 의 *{padding:0})은
45
- * 호스트 엘리먼트의 :host padding 을 덮어버리므로, Shadow DOM 내부
46
- * 엘리먼트(.container)에 패딩을 두어 외부 리셋으로부터 보호한다.
47
- */
48
42
  border-radius: 8px;
49
43
  box-shadow: 0 4px 12px var(--u-shadow-color-normal);
50
44
 
@@ -2,8 +2,8 @@ import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import { styles } from "./UAvatar.styles.js";
5
- import { customElement, property } from "lit/decorators.js";
6
5
  import { html } from "lit";
6
+ import { customElement, property } from "lit/decorators.js";
7
7
  //#region src/components/avatar/UAvatar.ts
8
8
  var UAvatar = class UAvatar extends UElement {
9
9
  constructor(..._args) {
@@ -19,7 +19,7 @@ export declare class UBadge extends UElement {
19
19
  color: BadgeColor;
20
20
  /** 부모 요소 기준 배치 위치 (설정 시 position: absolute) */
21
21
  anchor?: BadgeAnchor;
22
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
22
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
23
23
  }
24
24
  declare global {
25
25
  interface HTMLElementTagNameMap {
@@ -2,14 +2,14 @@ import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import { styles } from "./UBadge.styles.js";
5
- import { customElement, property } from "lit/decorators.js";
6
5
  import { html, nothing } from "lit";
6
+ import { customElement, property } from "lit/decorators.js";
7
7
  //#region src/components/badge/UBadge.ts
8
8
  var UBadge = class UBadge extends UElement {
9
9
  constructor(..._args) {
10
10
  super(..._args);
11
11
  this.variant = "pill";
12
- this.color = "neutral";
12
+ this.color = "blue";
13
13
  }
14
14
  static {
15
15
  this.styles = [super.styles, styles];
@@ -40,7 +40,7 @@ var styles = css`
40
40
  }
41
41
  :host([color="blue"]) {
42
42
  color: var(--u-neutral-0);
43
- background-color: var(--u-blue-500);
43
+ background-color: var(--u-primary-color, var(--u-blue-500));
44
44
  }
45
45
  :host([color="green"]) {
46
46
  color: var(--u-neutral-0);
@@ -2,8 +2,8 @@ import { UElement } from "../UElement.js";
2
2
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
3
3
  import "../icon/UIcon.js";
4
4
  import { styles } from "./UBreadcrumb.styles.js";
5
- import { customElement } from "lit/decorators.js";
6
5
  import { html } from "lit";
6
+ import { customElement } from "lit/decorators.js";
7
7
  //#region src/components/breadcrumb/UBreadcrumb.ts
8
8
  var UBreadcrumb = class UBreadcrumb extends UElement {
9
9
  constructor(..._args) {
@@ -2,8 +2,8 @@ import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import { styles } from "./UBreadcrumbItem.styles.js";
5
- import { customElement, property } from "lit/decorators.js";
6
5
  import { html } from "lit";
6
+ import { customElement, property } from "lit/decorators.js";
7
7
  import { ifDefined } from "lit/directives/if-defined.js";
8
8
  //#region src/components/breadcrumb-item/UBreadcrumbItem.ts
9
9
  var UBreadcrumbItem = class UBreadcrumbItem extends UElement {
@@ -16,6 +16,8 @@ export type ButtonSize = "sm" | "md" | "lg";
16
16
  * @csspart button - 내부 버튼 요소
17
17
  * @csspart content - 콘텐츠 영역
18
18
  * @csspart mask - 로딩 마스크 영역
19
+ *
20
+ * @cssprop --u-primary-color - color="neutral"일 때 버튼 기준색. 지정 시 hover/active/surface 톤이 color-mix()로 자동 파생.
19
21
  */
20
22
  export declare class UButton extends UElement {
21
23
  static styles: import('lit').CSSResultGroup[];
@@ -23,16 +25,11 @@ export declare class UButton extends UElement {
23
25
  /** 버튼 스타일 변형 */
24
26
  variant: ButtonVariant;
25
27
  /**
26
- * Semantic 색상. 기본값 `"neutral"`은 기존(v1.1.x 이전) 렌더링과 동일 하위 호환.
27
- * `variant`가 사용하는 색상 스케일을 값으로 교체한다(예: `color="red"` + `variant="solid"` 파괴적 액션 버튼).
28
- * `variant="link"`는 `color="neutral"`(기본값)일 때 기존 동작(파랑)을 유지하고, 다른 색을 명시하면 그 색으로 재정의된다.
29
- * `variant="ghost"`는 hover/active 배경이 중립 팔레트에 묶여 있지 않아 이 속성의 영향을 받지 않는다.
28
+ * Semantic 색상. 기본값 `neutral`은 --u-primary-color 미지정 blue로 렌더링(회색에서 변경됨).
29
+ * `link`는 neutral일 기존 파랑 유지, 다른 지정 재정의. `ghost`는 영향받지 않음.
30
30
  */
31
31
  color: ButtonColor;
32
- /**
33
- * 버튼 크기. 기본값 `"md"`는 기존(v1.2.0 이전) 렌더링과 동일 — 하위 호환.
34
- * `font-size`만 변경하며, padding/spinner/prefix·suffix 여백은 이미 `em` 단위라 함께 비례 축소·확대된다.
35
- */
32
+ /** 버튼 크기. `font-size`만 변경하며 나머지는 `em` 단위라 비례 조정됨. */
36
33
  size: ButtonSize;
37
34
  /** 경계선 둥글게 여부 */
38
35
  rounded: boolean;
@@ -54,9 +51,7 @@ export declare class UButton extends UElement {
54
51
  name?: string;
55
52
  /** form data에 포함될 value */
56
53
  value?: string;
57
- /**
58
- * ElementInternals는 폼과의 연동, 유효성 검사 상태 관리 등을 지원하는 네이티브 API입니다.
59
- */
54
+ /** 폼 연동을 위한 ElementInternals. */
60
55
  internals?: ElementInternals;
61
56
  set form(val: string);
62
57
  get form(): HTMLFormElement | null;
@@ -3,8 +3,8 @@ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/hel
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import "../spinner/USpinner.js";
5
5
  import { styles } from "./UButton.styles.js";
6
- import { customElement, property } from "lit/decorators.js";
7
6
  import { html } from "lit";
7
+ import { customElement, property } from "lit/decorators.js";
8
8
  import { ifDefined } from "lit/directives/if-defined.js";
9
9
  //#region src/components/button/UButton.ts
10
10
  var UButton = class UButton extends UElement {
@@ -1,6 +1,21 @@
1
1
  import { css } from "lit";
2
2
  //#region src/components/button/UButton.styles.ts
3
3
  var styles = css`
4
+ :host {
5
+ /* --btn-color 하나만 정해지면 hover/active/surface/outline 톤이 전부 자동 파생 */
6
+ --btn-color: var(--u-primary-color, var(--u-blue-600));
7
+ --btn-color-hover: color-mix(in srgb, var(--btn-color) 85%, black);
8
+ --btn-color-active: color-mix(in srgb, var(--btn-color) 70%, black);
9
+ --btn-color-surface: color-mix(in srgb, var(--btn-color) 12%, var(--u-bg-color));
10
+ --btn-color-surface-hover: color-mix(in srgb, var(--btn-color) 22%, var(--u-bg-color));
11
+ --btn-color-surface-active: color-mix(in srgb, var(--btn-color) 32%, var(--u-bg-color));
12
+ --btn-color-border: color-mix(in srgb, var(--btn-color) 45%, var(--u-bg-color));
13
+ --btn-color-border-hover: color-mix(in srgb, var(--btn-color) 60%, var(--u-bg-color));
14
+ --btn-color-border-active: color-mix(in srgb, var(--btn-color) 75%, var(--u-bg-color));
15
+ --btn-color-outline-hover: color-mix(in srgb, var(--btn-color) 6%, var(--u-bg-color));
16
+ --btn-color-outline-active: color-mix(in srgb, var(--btn-color) 12%, var(--u-bg-color));
17
+ }
18
+
4
19
  :host {
5
20
  position: relative;
6
21
  display: inline-flex;
@@ -17,35 +32,19 @@ var styles = css`
17
32
  overflow: hidden;
18
33
  user-select: none;
19
34
  cursor: pointer;
35
+ }
36
+
37
+ /* === Color tokens === */
38
+ :host([color="blue"]) { --btn-color: var(--u-blue-600); }
39
+ :host([color="green"]) { --btn-color: var(--u-green-600); }
40
+ :host([color="red"]) { --btn-color: var(--u-red-600); }
41
+ :host([color="orange"]) { --btn-color: var(--u-orange-600); }
42
+ :host([color="teal"]) { --btn-color: var(--u-teal-600); }
43
+ :host([color="cyan"]) { --btn-color: var(--u-cyan-600); }
44
+ :host([color="purple"]) { --btn-color: var(--u-purple-600); }
45
+ :host([color="pink"]) { --btn-color: var(--u-pink-600); }
20
46
 
21
- /* Semantic color tokens consumed by variant rules below. Default (color="neutral")
22
- maps 1:1 onto the neutral scale — zero visual change for existing consumers. */
23
- --btn-c-50: var(--u-neutral-50);
24
- --btn-c-100: var(--u-neutral-100);
25
- --btn-c-200: var(--u-neutral-200);
26
- --btn-c-300: var(--u-neutral-300);
27
- --btn-c-400: var(--u-neutral-400);
28
- --btn-c-500: var(--u-neutral-500);
29
- --btn-c-600: var(--u-neutral-600);
30
- --btn-c-700: var(--u-neutral-700);
31
- --btn-c-800: var(--u-neutral-800);
32
- }
33
-
34
- /* === Color tokens ===
35
- Non-neutral colors have no "50" tier in the design system (see assets/styles/light.css) —
36
- tier "0" (the palest stop) is used in that slot instead of inventing a non-existent token. */
37
- :host([color="blue"]) { --btn-c-50: var(--u-blue-0); --btn-c-100: var(--u-blue-100); --btn-c-200: var(--u-blue-200); --btn-c-300: var(--u-blue-300); --btn-c-400: var(--u-blue-400); --btn-c-500: var(--u-blue-500); --btn-c-600: var(--u-blue-600); --btn-c-700: var(--u-blue-700); --btn-c-800: var(--u-blue-800); }
38
- :host([color="green"]) { --btn-c-50: var(--u-green-0); --btn-c-100: var(--u-green-100); --btn-c-200: var(--u-green-200); --btn-c-300: var(--u-green-300); --btn-c-400: var(--u-green-400); --btn-c-500: var(--u-green-500); --btn-c-600: var(--u-green-600); --btn-c-700: var(--u-green-700); --btn-c-800: var(--u-green-800); }
39
- :host([color="red"]) { --btn-c-50: var(--u-red-0); --btn-c-100: var(--u-red-100); --btn-c-200: var(--u-red-200); --btn-c-300: var(--u-red-300); --btn-c-400: var(--u-red-400); --btn-c-500: var(--u-red-500); --btn-c-600: var(--u-red-600); --btn-c-700: var(--u-red-700); --btn-c-800: var(--u-red-800); }
40
- :host([color="orange"]) { --btn-c-50: var(--u-orange-0); --btn-c-100: var(--u-orange-100); --btn-c-200: var(--u-orange-200); --btn-c-300: var(--u-orange-300); --btn-c-400: var(--u-orange-400); --btn-c-500: var(--u-orange-500); --btn-c-600: var(--u-orange-600); --btn-c-700: var(--u-orange-700); --btn-c-800: var(--u-orange-800); }
41
- :host([color="teal"]) { --btn-c-50: var(--u-teal-0); --btn-c-100: var(--u-teal-100); --btn-c-200: var(--u-teal-200); --btn-c-300: var(--u-teal-300); --btn-c-400: var(--u-teal-400); --btn-c-500: var(--u-teal-500); --btn-c-600: var(--u-teal-600); --btn-c-700: var(--u-teal-700); --btn-c-800: var(--u-teal-800); }
42
- :host([color="cyan"]) { --btn-c-50: var(--u-cyan-0); --btn-c-100: var(--u-cyan-100); --btn-c-200: var(--u-cyan-200); --btn-c-300: var(--u-cyan-300); --btn-c-400: var(--u-cyan-400); --btn-c-500: var(--u-cyan-500); --btn-c-600: var(--u-cyan-600); --btn-c-700: var(--u-cyan-700); --btn-c-800: var(--u-cyan-800); }
43
- :host([color="purple"]) { --btn-c-50: var(--u-purple-0); --btn-c-100: var(--u-purple-100); --btn-c-200: var(--u-purple-200); --btn-c-300: var(--u-purple-300); --btn-c-400: var(--u-purple-400); --btn-c-500: var(--u-purple-500); --btn-c-600: var(--u-purple-600); --btn-c-700: var(--u-purple-700); --btn-c-800: var(--u-purple-800); }
44
- :host([color="pink"]) { --btn-c-50: var(--u-pink-0); --btn-c-100: var(--u-pink-100); --btn-c-200: var(--u-pink-200); --btn-c-300: var(--u-pink-300); --btn-c-400: var(--u-pink-400); --btn-c-500: var(--u-pink-500); --btn-c-600: var(--u-pink-600); --btn-c-700: var(--u-pink-700); --btn-c-800: var(--u-pink-800); }
45
-
46
- /* === Size ===
47
- padding (0.5em), the spinner (1em/0.5em), and prefix/suffix margins (0.5em) are all
48
- em-relative already, so changing font-size alone scales the whole button proportionally. */
47
+ /* === Size === */
49
48
  :host([size="sm"]) {
50
49
  font-size: 12px;
51
50
  }
@@ -83,59 +82,59 @@ var styles = css`
83
82
  /* solid: 강한 채움 (기본 color="neutral") */
84
83
  :host([variant="solid"]) {
85
84
  color: #fff;
86
- background-color: var(--btn-c-600);
87
- border-color: var(--btn-c-600);
85
+ background-color: var(--btn-color);
86
+ border-color: var(--btn-color);
88
87
  }
89
88
  :host([variant="solid"]:hover) {
90
- background-color: var(--btn-c-700);
91
- border-color: var(--btn-c-700);
89
+ background-color: var(--btn-color-hover);
90
+ border-color: var(--btn-color-hover);
92
91
  }
93
92
  :host([variant="solid"]:active) {
94
- background-color: var(--btn-c-800);
95
- border-color: var(--btn-c-800);
93
+ background-color: var(--btn-color-active);
94
+ border-color: var(--btn-color-active);
96
95
  }
97
96
 
98
97
  /* surface: 채우기 + 경계 */
99
98
  :host([variant="surface"]) {
100
99
  color: var(--u-txt-color);
101
- background-color: var(--btn-c-100);
102
- border-color: var(--btn-c-300);
100
+ background-color: var(--btn-color-surface);
101
+ border-color: var(--btn-color-border);
103
102
  }
104
103
  :host([variant="surface"]:hover) {
105
- background-color: var(--btn-c-200);
106
- border-color: var(--btn-c-400);
104
+ background-color: var(--btn-color-surface-hover);
105
+ border-color: var(--btn-color-border-hover);
107
106
  }
108
107
  :host([variant="surface"]:active) {
109
- background-color: var(--btn-c-300);
110
- border-color: var(--btn-c-500);
108
+ background-color: var(--btn-color-surface-active);
109
+ border-color: var(--btn-color-border-active);
111
110
  }
112
111
 
113
112
  /* filled: 채우기만 */
114
113
  :host([variant="filled"]) {
115
114
  color: var(--u-txt-color);
116
- background-color: var(--btn-c-100);
115
+ background-color: var(--btn-color-surface);
117
116
  border-color: transparent;
118
117
  }
119
118
  :host([variant="filled"]:hover) {
120
- background-color: var(--btn-c-200);
119
+ background-color: var(--btn-color-surface-hover);
121
120
  }
122
121
  :host([variant="filled"]:active) {
123
- background-color: var(--btn-c-300);
122
+ background-color: var(--btn-color-surface-active);
124
123
  }
125
124
 
126
125
  /* outlined: 경계만 */
127
126
  :host([variant="outlined"]) {
128
127
  color: var(--u-txt-color);
129
- border-color: var(--btn-c-300);
128
+ border-color: var(--btn-color-border);
130
129
  background-color: transparent;
131
130
  }
132
131
  :host([variant="outlined"]:hover) {
133
- border-color: var(--btn-c-400);
134
- background-color: var(--btn-c-50);
132
+ border-color: var(--btn-color-border-hover);
133
+ background-color: var(--btn-color-outline-hover);
135
134
  }
136
135
  :host([variant="outlined"]:active) {
137
- border-color: var(--btn-c-500);
138
- background-color: var(--btn-c-100);
136
+ border-color: var(--btn-color-border-active);
137
+ background-color: var(--btn-color-outline-active);
139
138
  }
140
139
 
141
140
  /* ghost: transparent */
@@ -168,13 +167,13 @@ var styles = css`
168
167
  }
169
168
  /* link + 명시적 non-neutral color: 링크 자체 색상을 재정의 (예: 파괴적 액션 링크) */
170
169
  :host([variant="link"][color]:not([color="neutral"])) {
171
- color: var(--btn-c-500);
170
+ color: var(--btn-color);
172
171
  }
173
172
  :host([variant="link"][color]:not([color="neutral"]):hover) {
174
- color: var(--btn-c-600);
173
+ color: var(--btn-color-hover);
175
174
  }
176
175
  :host([variant="link"][color]:not([color="neutral"]):active) {
177
- color: var(--btn-c-700);
176
+ color: var(--btn-color-active);
178
177
  }
179
178
 
180
179
  /* === Inner === */
@@ -4,8 +4,8 @@ import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm
4
4
  import { UButton } from "../button/UButton.js";
5
5
  import { UIconButton } from "../icon-button/UIconButton.js";
6
6
  import { styles } from "./UButtonGroup.styles.js";
7
- import { customElement, property } from "lit/decorators.js";
8
7
  import { html } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
9
  //#region src/components/button-group/UButtonGroup.ts
10
10
  var UButtonGroup = class UButtonGroup extends UElement {
11
11
  constructor(..._args) {
@@ -2,8 +2,8 @@ import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import { styles } from "./UCard.styles.js";
5
- import { customElement, property } from "lit/decorators.js";
6
5
  import { html } from "lit";
6
+ import { customElement, property } from "lit/decorators.js";
7
7
  //#region src/components/card/UCard.ts
8
8
  var UCard = class UCard extends UElement {
9
9
  constructor(..._args) {
@@ -1,11 +1,11 @@
1
1
  import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
- import "../icon/UIcon.js";
5
4
  import "../button/UButton.js";
5
+ import "../icon/UIcon.js";
6
6
  import { styles } from "./UCarousel.styles.js";
7
- import { customElement, property, state } from "lit/decorators.js";
8
7
  import { html } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
9
  //#region src/components/carousel/UCarousel.ts
10
10
  var UCarousel = class UCarousel extends UElement {
11
11
  constructor(..._args) {
@@ -1,3 +1,4 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { UFormControlElement } from '../UFormControlElement.js';
2
3
  export type CheckboxVariant = "filled" | "outline";
3
4
  export type CheckboxColor = "blue" | "green" | "red" | "orange" | "teal" | "cyan" | "purple" | "pink" | "neutral";
@@ -29,8 +30,10 @@ export declare class UCheckbox extends UFormControlElement<string> {
29
30
  indeterminate: boolean;
30
31
  /** 체크 여부 */
31
32
  checked: boolean;
33
+ inputEl?: HTMLInputElement;
34
+ protected shouldValidate(changed: PropertyValues): boolean;
32
35
  render(): import('lit-html').TemplateResult<1>;
33
- validate(): boolean;
36
+ protected setValidity(): void;
34
37
  reset(): void;
35
38
  private handleInputChange;
36
39
  }
@@ -2,9 +2,10 @@ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/hel
2
2
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
3
3
  import { UFormControlElement } from "../UFormControlElement.js";
4
4
  import "../icon/UIcon.js";
5
+ import { Locale } from "../../utilities/Locale.js";
5
6
  import { styles } from "./UCheckbox.styles.js";
6
- import { customElement, property } from "lit/decorators.js";
7
7
  import { html } from "lit";
8
+ import { customElement, property, query } from "lit/decorators.js";
8
9
  import { live } from "lit/directives/live.js";
9
10
  //#region src/components/checkbox/UCheckbox.ts
10
11
  var UCheckbox = class UCheckbox extends UFormControlElement {
@@ -21,7 +22,6 @@ var UCheckbox = class UCheckbox extends UFormControlElement {
21
22
  this.indeterminate = false;
22
23
  this.checked = input.checked;
23
24
  this.internals?.setFormValue(this.checked ? this.value || String(this.checked) : String(this.checked));
24
- this.internals?.setValidity(input.validity, this.validationMessage || input.validationMessage, this.shadowRoot?.querySelector(".checkbox") || void 0);
25
25
  if (!this.novalidate) this.validate();
26
26
  this.relay(e);
27
27
  };
@@ -29,6 +29,9 @@ var UCheckbox = class UCheckbox extends UFormControlElement {
29
29
  static {
30
30
  this.styles = [super.styles, styles];
31
31
  }
32
+ shouldValidate(changed) {
33
+ return super.shouldValidate(changed) || changed.has("checked");
34
+ }
32
35
  render() {
33
36
  return html`
34
37
  <label class="wrapper" part="wrapper">
@@ -51,15 +54,14 @@ var UCheckbox = class UCheckbox extends UFormControlElement {
51
54
  </span>
52
55
  </label>
53
56
 
54
- <div class="description" part="description" ?hidden=${!this.description}>
55
- ${this.description}
57
+ <div class="description" part="description" ?hidden=${!(this.invalid && this.validationMessage) && !this.description}>
58
+ ${this.invalid && this.validationMessage ? this.validationMessage : this.description}
56
59
  </div>
57
60
  `;
58
61
  }
59
- validate() {
60
- if (this.internals) this.invalid = !this.internals.reportValidity();
61
- else this.invalid = this.required && !this.checked;
62
- return !this.invalid;
62
+ setValidity() {
63
+ const missing = !!this.inputEl?.validity.valueMissing;
64
+ this.commit(missing ? { valueMissing: true } : {}, missing ? Locale.getValue("valueMissing") : "", this.shadowRoot?.querySelector(".checkbox") ?? void 0);
63
65
  }
64
66
  reset() {
65
67
  this.checked = false;
@@ -83,6 +85,7 @@ __decorate([property({
83
85
  type: Boolean,
84
86
  reflect: true
85
87
  }), __decorateMetadata("design:type", Boolean)], UCheckbox.prototype, "checked", void 0);
88
+ __decorate([query("input", true), __decorateMetadata("design:type", typeof HTMLInputElement === "undefined" ? Object : HTMLInputElement)], UCheckbox.prototype, "inputEl", void 0);
86
89
  UCheckbox = __decorate([customElement("u-checkbox")], UCheckbox);
87
90
  //#endregion
88
91
  export { UCheckbox };
@@ -2,6 +2,7 @@ import { css } from "lit";
2
2
  //#region src/components/checkbox/UCheckbox.styles.ts
3
3
  var styles = css`
4
4
  :host {
5
+ --checkbox-fill-color: var(--u-primary-color, var(--u-blue-600));
5
6
  --checkbox-color: inherit;
6
7
  --checkbox-border-color: var(--u-input-border-color);
7
8
  --checkbox-background-color: var(--u-input-bg-color);
@@ -43,22 +44,22 @@ var styles = css`
43
44
  :host([variant="filled"][checked]),
44
45
  :host([variant="filled"][indeterminate]) {
45
46
  --checkbox-color: var(--u-neutral-100);
46
- --checkbox-border-color: var(--u-blue-600);
47
- --checkbox-background-color: var(--u-blue-600);
47
+ --checkbox-border-color: var(--checkbox-fill-color);
48
+ --checkbox-background-color: var(--checkbox-fill-color);
48
49
  }
49
50
 
50
51
  /* === Variant: outline - 테두리만 === */
51
52
  :host([variant="outline"][checked]),
52
53
  :host([variant="outline"][indeterminate]) {
53
- --checkbox-border-color: var(--u-blue-600);
54
+ --checkbox-border-color: var(--checkbox-fill-color);
54
55
  --checkbox-background-color: transparent;
55
56
  }
56
57
 
57
58
  /* === Color variants (filled) === */
58
59
  :host([variant="filled"][color="blue"][checked]),
59
60
  :host([variant="filled"][color="blue"][indeterminate]) {
60
- --checkbox-border-color: var(--u-blue-600);
61
- --checkbox-background-color: var(--u-blue-600);
61
+ --checkbox-border-color: var(--checkbox-fill-color);
62
+ --checkbox-background-color: var(--checkbox-fill-color);
62
63
  }
63
64
  :host([variant="filled"][color="green"][checked]),
64
65
  :host([variant="filled"][color="green"][indeterminate]) {
@@ -104,8 +105,8 @@ var styles = css`
104
105
  /* === Color variants (outline) === */
105
106
  :host([variant="outline"][color="blue"][checked]),
106
107
  :host([variant="outline"][color="blue"][indeterminate]) {
107
- --checkbox-color: var(--u-blue-600);
108
- --checkbox-border-color: var(--u-blue-600);
108
+ --checkbox-color: var(--checkbox-fill-color);
109
+ --checkbox-border-color: var(--checkbox-fill-color);
109
110
  }
110
111
  :host([variant="outline"][color="green"][checked]),
111
112
  :host([variant="outline"][color="green"][indeterminate]) {
@@ -206,6 +207,10 @@ var styles = css`
206
207
  font-size: 0.75em;
207
208
  line-height: 1.2;
208
209
  }
210
+
211
+ :host([invalid]) .description {
212
+ color: var(--u-red-600);
213
+ }
209
214
  `;
210
215
  //#endregion
211
216
  export { styles };
@@ -1,13 +1,13 @@
1
1
  import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
- import "../icon/UIcon.js";
5
4
  import "../button/UButton.js";
5
+ import "../icon/UIcon.js";
6
6
  import "../tooltip/UTooltip.js";
7
7
  import "../tag/UTag.js";
8
8
  import { styles } from "./UChip.styles.js";
9
- import { customElement, property } from "lit/decorators.js";
10
9
  import { html } from "lit";
10
+ import { customElement, property } from "lit/decorators.js";
11
11
  //#region src/components/chip/UChip.ts
12
12
  var UChip = class UChip extends UElement {
13
13
  constructor(..._args) {
@@ -32,7 +32,10 @@ var UChip = class UChip extends UElement {
32
32
  };
33
33
  this.handleRemoveClick = (e) => {
34
34
  e.stopImmediatePropagation();
35
- if (this.fire("remove")) this.remove();
35
+ if (this.fire("remove", {
36
+ bubbles: false,
37
+ composed: false
38
+ })) this.remove();
36
39
  };
37
40
  }
38
41
  static {
@@ -1,11 +1,11 @@
1
1
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
2
2
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
3
- import "../icon/UIcon.js";
4
3
  import { UOverlayElement } from "../UOverlayElement.js";
5
4
  import "../button/UButton.js";
5
+ import "../icon/UIcon.js";
6
6
  import { styles } from "./UDialog.styles.js";
7
- import { customElement, property, state } from "lit/decorators.js";
8
7
  import { html } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
9
  //#region src/components/dialog/UDialog.ts
10
10
  var UDialog = class UDialog extends UOverlayElement {
11
11
  constructor(..._args) {
@@ -2,8 +2,8 @@ import { UElement } from "../UElement.js";
2
2
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
4
4
  import { styles } from "./UDivider.styles.js";
5
- import { customElement, property } from "lit/decorators.js";
6
5
  import { html } from "lit";
6
+ import { customElement, property } from "lit/decorators.js";
7
7
  //#region src/components/divider/UDivider.ts
8
8
  var UDivider = class UDivider extends UElement {
9
9
  constructor(..._args) {
@@ -1,11 +1,11 @@
1
1
  import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorateMetadata.js";
2
2
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.138.0/helpers/esm/decorate.js";
3
- import "../icon/UIcon.js";
4
3
  import { UOverlayElement } from "../UOverlayElement.js";
5
4
  import "../button/UButton.js";
5
+ import "../icon/UIcon.js";
6
6
  import { styles } from "./UDrawer.styles.js";
7
- import { customElement, property, state } from "lit/decorators.js";
8
7
  import { html } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
9
  //#region src/components/drawer/UDrawer.ts
10
10
  var UDrawer = class UDrawer extends UOverlayElement {
11
11
  constructor(..._args) {
@@ -7,12 +7,6 @@ var styles = css`
7
7
  :host([placement="top"]) { flex-direction: column; justify-content: flex-start; }
8
8
  :host([placement="bottom"]) { flex-direction: column; justify-content: flex-end; }
9
9
 
10
- /*
11
- * 패널 크기 — 슬라이드 축 방향 크기를 --drawer-size 로 제어한다.
12
- * 좌우(left/right): 너비 = --drawer-size (기본 28rem), 높이 100%
13
- * 상하(top/bottom): 높이 = --drawer-size (기본 16rem), 너비 100%
14
- * 호스트 앱이 style="--drawer-size: 600px" 로 오버라이드한다.
15
- */
16
10
  /* 좌우: 높이 100%, 너비 = --drawer-size */
17
11
  :host([placement="left"]) .panel,
18
12
  :host([placement="right"]) .panel {