@iyulab/components 1.40.3 → 1.41.1
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 +68 -0
- package/README.md +31 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/components/UFloatingElement.js +2 -2
- package/dist/components/UFormControlElement.d.ts +36 -0
- package/dist/components/UFormControlElement.js +58 -3
- package/dist/components/UOverlayElement.js +2 -2
- package/dist/components/alert/UAlert.js +2 -2
- package/dist/components/avatar/UAvatar.js +2 -2
- package/dist/components/badge/UBadge.js +2 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/button/UButton.js +2 -2
- package/dist/components/button-group/UButtonGroup.js +2 -2
- package/dist/components/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/checkbox/UCheckbox.js +5 -3
- package/dist/components/chip/UChip.js +2 -2
- package/dist/components/copy-button/UCopyButton.js +2 -2
- package/dist/components/date-picker/UDatePicker.js +4 -4
- package/dist/components/dialog/UDialog.js +2 -2
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/drawer/UDrawer.js +2 -2
- package/dist/components/expander/UExpander.js +2 -2
- package/dist/components/field/UField.d.ts +74 -0
- package/dist/components/field/UField.js +138 -5
- package/dist/components/file-input/UFileInput.d.ts +11 -0
- package/dist/components/file-input/UFileInput.js +17 -2
- package/dist/components/form/UForm.js +2 -2
- package/dist/components/icon/UIcon.js +2 -2
- package/dist/components/icon-button/UIconButton.js +2 -2
- package/dist/components/input/UInput.js +4 -4
- package/dist/components/menu/UMenu.js +2 -2
- package/dist/components/menu-item/UMenuItem.js +2 -2
- package/dist/components/option/UOption.js +2 -2
- package/dist/components/panel/UPanel.js +2 -2
- package/dist/components/popover/UPopover.js +2 -2
- package/dist/components/progress-bar/UProgressBar.js +2 -2
- package/dist/components/progress-ring/UProgressRing.js +2 -2
- package/dist/components/radio/URadio.js +4 -4
- package/dist/components/rating/URating.js +4 -4
- package/dist/components/select/USelect.js +5 -5
- package/dist/components/skeleton/USkeleton.js +2 -2
- package/dist/components/slider/USlider.js +3 -3
- package/dist/components/spinner/USpinner.js +2 -2
- package/dist/components/split-panel/USplitPanel.js +2 -2
- package/dist/components/switch/USwitch.js +11 -3
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab-panel/UTabPanel.js +2 -2
- package/dist/components/tag/UTag.js +2 -2
- package/dist/components/text/UText.js +2 -2
- package/dist/components/textarea/UTextarea.js +4 -4
- package/dist/components/tooltip/UTooltip.js +2 -2
- package/dist/components/tree/UTree.js +2 -2
- package/dist/components/tree-item/UTreeItem.js +2 -2
- package/dist/utilities/accent.d.ts +1 -1
- package/dist/utilities/accent.js +1 -1
- package/package.json +3 -3
- package/skills/iyulab-components/references/components/field.md +42 -0
- package/skills/iyulab-components/references/components/switch.md +2 -1
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
|
+
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
4
5
|
import { styles } from "./UField.styles.js";
|
|
5
6
|
import { html, nothing } from "lit";
|
|
6
7
|
import { customElement, property } from "lit/decorators.js";
|
|
7
8
|
import { isFocusable } from "tabbable";
|
|
8
9
|
//#region src/components/field/UField.ts
|
|
10
|
+
/** 네이티브로 «폼 컨트롤이거나 포커스를 받도록 저작된» 태그 — 가시성과 무관한 구조 사실이다. */
|
|
11
|
+
var NATIVE_CONTROL_TAGS = /* @__PURE__ */ new Set([
|
|
12
|
+
"INPUT",
|
|
13
|
+
"SELECT",
|
|
14
|
+
"TEXTAREA",
|
|
15
|
+
"BUTTON"
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* **구조상** 폼 컨트롤인가 — `UField.hasControlInSubtree` 가 쓰는 술어.
|
|
19
|
+
* `isFocusable()`(tabbable)과 달리 **렌더 여부도 `disabled` 도 보지 않는다**: 숨겨진 폼도,
|
|
20
|
+
* 비활성 입력도 «라벨이 가리킬 대상» 이라는 사실은 같다. 근거는 `hasControlInSubtree` 주석.
|
|
21
|
+
*/
|
|
22
|
+
function isFormControlByStructure(node) {
|
|
23
|
+
if (node.constructor.formAssociated === true) return true;
|
|
24
|
+
if (NATIVE_CONTROL_TAGS.has(node.tagName)) return true;
|
|
25
|
+
if (node.tagName === "A" && node.hasAttribute("href")) return true;
|
|
26
|
+
if (node.hasAttribute("tabindex")) return true;
|
|
27
|
+
if (node.hasAttribute("contenteditable")) return true;
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
9
30
|
var UField = class UField extends UElement {
|
|
10
31
|
constructor(..._args) {
|
|
11
32
|
super(..._args);
|
|
@@ -43,11 +64,123 @@ var UField = class UField extends UElement {
|
|
|
43
64
|
* 공개 API로도 노출해, 소비자가 임의의 폼 컨트롤(자체 웹 컴포넌트가 아닌 것 포함)을
|
|
44
65
|
* 슬롯에 꽂아도 host의 `.focus()`가 `UInput.focus()`와 같은 계약으로 동작하게 한다. */
|
|
45
66
|
focus(options) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
this.focusTarget?.focus(options);
|
|
68
|
+
}
|
|
69
|
+
get assignedRoots() {
|
|
70
|
+
return (this.shadowRoot?.querySelector("slot:not([name])"))?.assignedElements({ flatten: true }) || [];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 포커스 대상은 **감싸개 안쪽까지** 본다. 이 패키지의 폼 컨트롤들은 자기 내부 `u-field` 에
|
|
74
|
+
* `<div class="container">` 를 슬롯하고 진짜 `<input>` 은 그 안에 있다 — 최상위만 보면
|
|
75
|
+
* *라이브러리 자신의 정상 사용*이 «컨트롤 없음» 이 된다(첫 판이 실제로 그렇게 오탐했다).
|
|
76
|
+
*/
|
|
77
|
+
get focusTarget() {
|
|
78
|
+
const named = this.controlToName;
|
|
79
|
+
if (named) return named;
|
|
80
|
+
for (const root of this.assignedRoots) {
|
|
81
|
+
if (isFocusable(root)) return root;
|
|
82
|
+
const inner = Array.from(root.querySelectorAll("*")).find((n) => isFocusable(n));
|
|
83
|
+
if (inner) return inner;
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 라벨이 가리키는 대상 — `focus()` 와 접근성 이름 부여가 **같은 것**을 골라야 한다.
|
|
89
|
+
*
|
|
90
|
+
* 🔴**`isFocusable()` 만으로는 이 리포의 주된 사용 형태를 통째로 놓친다.** `tabbable` 은
|
|
91
|
+
* 기본적으로 섀도우 루트를 들여다보지 않으므로 `<u-input>` 같은 커스텀 엘리먼트 호스트에
|
|
92
|
+
* `false` 를 돌려준다(실측: `isFocusable(u-input)=false` · `isFocusable(<input>)=true`).
|
|
93
|
+
* ⇒ 종전 `focus()` 는 **네이티브 엘리먼트를 슬롯한 경우에만** 동작했고, 레퍼런스 문서가
|
|
94
|
+
* 가르치는 `u-*` 컨트롤 형태에서는 라벨 클릭이 **조용히 아무 일도 하지 않았다.**
|
|
95
|
+
*
|
|
96
|
+
* ⇒ 판정을 «포커스 가능» 하나가 아니라 **«폼 컨트롤인가»** 로 넓힌다: 네이티브로 포커스
|
|
97
|
+
* 가능하거나, **form-associated 커스텀 엘리먼트**(`static formAssociated = true` — 이
|
|
98
|
+
* 패키지의 `UFormControlElement` 전부가 그렇다)이면 대상이다. 섀도우를 파고들어 안쪽
|
|
99
|
+
* 네이티브 노드를 잡지는 않는다 — 그것은 컨트롤 자신의 API 를 우회하는 것이고, 그쪽이
|
|
100
|
+
* 다시 렌더하면 우리가 얹은 속성이 지워진다.
|
|
101
|
+
*/
|
|
102
|
+
get controlToName() {
|
|
103
|
+
for (const node of this.assignedRoots) if (node.constructor.formAssociated === true || isFocusable(node)) return node;
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 🔴**«이 필드가 이름 줄 컨트롤을 가졌는가» 는 «지금 포커스 가능한가» 와 다른 질문이다 —
|
|
108
|
+
* 그 둘을 한 술어로 답한 것이 결함이었다.**
|
|
109
|
+
*
|
|
110
|
+
* 종전 경고는 `focusTarget`(위)의 부재로 판정했는데, 그 게터는 후보를 `isFocusable()` 로
|
|
111
|
+
* 고르고 **`tabbable` 의 기본 `displayCheck` 는 렌더 여부를 본다.** ⇒ 닫힌 `u-drawer`·
|
|
112
|
+
* 접힌 아코디언·비활성 탭 패널·마법사의 다음 단계처럼 **`display:none` 하위에서 처음
|
|
113
|
+
* 렌더되면 정상 컨트롤이 «없는 것» 이 된다**(실측: `<u-input label="X">` 가 숨겨져 있기만
|
|
114
|
+
* 하면 발화 · 같은 마크업이 보이면 침묵). 그 셋은 이 스택이 겨냥한 LOB 화면형 그 자체다.
|
|
115
|
+
*
|
|
116
|
+
* ⚠**그리고 오탐보다 그 다음이 나쁘다** — `devWarnOnce` 는 키당 한 번이라 오탐이 먼저 나면
|
|
117
|
+
* 뒤이은 **진짜 위반이 조용히 억제된다.** 이 리포가 반복 기록한 *«초록으로 틀린 말»* 이
|
|
118
|
+
* 여기서는 «침묵으로 틀린 말» 이 된다. (키 세분화는 아래 `nameSlottedControl` 참조.)
|
|
119
|
+
*
|
|
120
|
+
* ⇒ 판정은 **구조로만** 한다: form-associated 커스텀 엘리먼트 · 네이티브 폼/포커스 태그 ·
|
|
121
|
+
* `tabindex` · `contenteditable`. **가시성도 `disabled` 도 보지 않는다** — 비활성 입력도
|
|
122
|
+
* 라벨이 가리키는 대상이고, 숨겨진 폼도 구조는 같다.
|
|
123
|
+
* ⚠`focusTarget` 은 **그대로 `isFocusable` 을 쓴다** — `focus()` 위임에서는 «지금 포커스
|
|
124
|
+
* 가능한가» 가 맞는 질문이다. 두 게터가 같은 술어를 공유한 것이 원인이었다.
|
|
125
|
+
*/
|
|
126
|
+
get hasControlInSubtree() {
|
|
127
|
+
for (const root of this.assignedRoots) {
|
|
128
|
+
if (isFormControlByStructure(root)) return true;
|
|
129
|
+
if (Array.from(root.querySelectorAll("*")).some(isFormControlByStructure)) return true;
|
|
130
|
+
}
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
firstUpdated(changed) {
|
|
134
|
+
super.firstUpdated(changed);
|
|
135
|
+
(this.shadowRoot?.querySelector("slot:not([name])"))?.addEventListener("slotchange", () => this.nameSlottedControl());
|
|
136
|
+
}
|
|
137
|
+
updated(changed) {
|
|
138
|
+
super.updated(changed);
|
|
139
|
+
if (changed.has("label") || changed.has("description")) this.nameSlottedControl();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 🔴**이 컴포넌트의 존재 이유가 «라벨과 컨트롤을 한 칸으로 짝짓는 것»인데, 오랫동안
|
|
143
|
+
* 라벨을 «그리기만» 하고 연결하지 않았다** — 섀도의 `label` 에 `for` 가 없고 슬롯된
|
|
144
|
+
* 컨트롤의 `id`·`aria-label`·`aria-labelledby` 가 전부 빈 채였다 — 라벨을 가진 폼 한 장이
|
|
145
|
+
* 통째로 «이름 없는 입력» 이 된다. 화면은 멀쩡하고 콘솔도 조용해서 **시각 사용자에게는
|
|
146
|
+
* 아무 신호가 없다.**
|
|
147
|
+
*
|
|
148
|
+
* ⚠**`aria-labelledby` 로 잇지 않는다 — 섀도우 경계를 넘지 못한다.** 그 대신 «문자열
|
|
149
|
+
* 복사»를 슬롯 호스트의 `aria-label` 로 얹고, 폼 컨트롤 쪽이 그것을 내부 네이티브
|
|
150
|
+
* 컨트롤로 내려보낸다(`UFormControlElement.resolvedAriaLabel` — `u-button` 이 먼저 채택한
|
|
151
|
+
* 처방을 공통 기반으로 올린 것). 네이티브 엘리먼트를 슬롯한
|
|
152
|
+
* 경우에는 그 호스트가 곧 컨트롤이라 같은 한 줄이 그대로 듣는다.
|
|
153
|
+
*
|
|
154
|
+
* ⚠**자기 이름을 이미 가진 컨트롤은 건드리지 않는다** — 그쪽이 더 구체적이고,
|
|
155
|
+
* 덮으면 눈에 보이는 라벨과 접근성 이름이 어긋난다(WCAG 2.5.3 Label in Name).
|
|
156
|
+
*
|
|
157
|
+
* ⚠**경고 키에 라벨을 넣는다 — 형제 경고들이 이미 그렇게 한다.** 종전 키는 평평한
|
|
158
|
+
* `field-no-control` 하나여서 **페이지당 한 번**만 발화했고, 그래서 위반이 여럿이면
|
|
159
|
+
* 첫 하나만 보인다. `u-icon` 은 `icon:${lib}:${name}`, `u-split-panel` 은
|
|
160
|
+
* `split-panel:${id}` 로 이미 구분된 키를 쓴다 — 그리고 `u-icon` 의 경고가 태어난 계기가
|
|
161
|
+
* 정확히 *"메뉴 30개가 한꺼번에 틀렸는데 신호가 0"* 이었다. 같은 부류에 같은 처방을 한다.
|
|
162
|
+
* (메시지 문안은 그대로다 — 키는 중복 제거 단위일 뿐 공개 표면이 아니다.)
|
|
163
|
+
*/
|
|
164
|
+
nameSlottedControl() {
|
|
165
|
+
const control = this.controlToName;
|
|
166
|
+
if (!control) {
|
|
167
|
+
if (this.label && !this.hasControlInSubtree) devWarnOnce(`field-no-control:${this.label}`, `u-field label="${this.label}" has no form control in its default slot — the label names nothing. Slot a form control, or drop the label.`);
|
|
49
168
|
return;
|
|
50
169
|
}
|
|
170
|
+
if (!!control.label || control.hasAttribute("aria-labelledby") || control.hasAttribute("aria-label") && control.getAttribute("aria-label") !== this.lastAppliedLabel) {
|
|
171
|
+
if (this.label && control.label) devWarnOnce(`field-double-label:${this.label}`, `u-field label="${this.label}" wraps a control that also sets label="${control.label}" — the label renders twice. Set it on one of them.`);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (this.label) {
|
|
175
|
+
control.setAttribute("aria-label", this.label);
|
|
176
|
+
this.lastAppliedLabel = this.label;
|
|
177
|
+
} else if (this.lastAppliedLabel !== void 0) {
|
|
178
|
+
control.removeAttribute("aria-label");
|
|
179
|
+
this.lastAppliedLabel = void 0;
|
|
180
|
+
}
|
|
181
|
+
if (this.description) control.setAttribute("aria-description", this.description);
|
|
182
|
+
else if (control.getAttribute("aria-description") === this.lastAppliedDescription) control.removeAttribute("aria-description");
|
|
183
|
+
this.lastAppliedDescription = this.description;
|
|
51
184
|
}
|
|
52
185
|
};
|
|
53
186
|
__decorate([property({
|
|
@@ -37,6 +37,17 @@ export declare class UFileInput extends UFormControlElement<File[] | null> {
|
|
|
37
37
|
* 넘긴다 — 네이티브 `<input type="file" multiple>`의 제출 형태와 동일하다. */
|
|
38
38
|
protected updated(changedProperties: PropertyValues): void;
|
|
39
39
|
private syncFormValue;
|
|
40
|
+
/**
|
|
41
|
+
* 이 컨트롤의 포커스 대상은 값을 담는 입력이 아니라 **파일 선택 버튼**이다. 그래서 바깥
|
|
42
|
+
* 라벨을 그대로 `aria-label` 로 얹으면 버튼의 보이는 글자("파일 선택")가 접근성 이름에서
|
|
43
|
+
* 사라진다 — WCAG SC 2.5.3 Label in Name 위반이고, 음성 조작 사용자가 보이는 글자로
|
|
44
|
+
* 그 버튼을 부를 수 없게 된다. ⇒ **덮지 않고 합성한다**: 보이는 글자를 **앞에** 두고
|
|
45
|
+
* 라벨을 맥락으로 덧붙인다(이름이 보이는 글자를 담으므로 2.5.3 을 만족하고, 같은 화면에
|
|
46
|
+
* 파일 선택 버튼이 여럿일 때 서로 구분된다).
|
|
47
|
+
*
|
|
48
|
+
* 라벨이 없으면 아무것도 얹지 않는다 — 버튼의 보이는 글자가 곧 이름이다.
|
|
49
|
+
*/
|
|
50
|
+
private get triggerAriaLabel();
|
|
40
51
|
render(): import('lit-html').TemplateResult<1>;
|
|
41
52
|
protected setValidity(): void;
|
|
42
53
|
reset(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -65,6 +65,20 @@ var UFileInput = class UFileInput extends UFormControlElement {
|
|
|
65
65
|
this.internals?.setFormValue(fd);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* 이 컨트롤의 포커스 대상은 값을 담는 입력이 아니라 **파일 선택 버튼**이다. 그래서 바깥
|
|
70
|
+
* 라벨을 그대로 `aria-label` 로 얹으면 버튼의 보이는 글자("파일 선택")가 접근성 이름에서
|
|
71
|
+
* 사라진다 — WCAG SC 2.5.3 Label in Name 위반이고, 음성 조작 사용자가 보이는 글자로
|
|
72
|
+
* 그 버튼을 부를 수 없게 된다. ⇒ **덮지 않고 합성한다**: 보이는 글자를 **앞에** 두고
|
|
73
|
+
* 라벨을 맥락으로 덧붙인다(이름이 보이는 글자를 담으므로 2.5.3 을 만족하고, 같은 화면에
|
|
74
|
+
* 파일 선택 버튼이 여럿일 때 서로 구분된다).
|
|
75
|
+
*
|
|
76
|
+
* 라벨이 없으면 아무것도 얹지 않는다 — 버튼의 보이는 글자가 곧 이름이다.
|
|
77
|
+
*/
|
|
78
|
+
get triggerAriaLabel() {
|
|
79
|
+
const label = this.resolvedAriaLabel;
|
|
80
|
+
return label ? `${Locale.getValue("chooseFile")}, ${label}` : void 0;
|
|
81
|
+
}
|
|
68
82
|
render() {
|
|
69
83
|
const files = this.value ?? [];
|
|
70
84
|
const hasFiles = files.length > 0;
|
|
@@ -81,6 +95,7 @@ var UFileInput = class UFileInput extends UFormControlElement {
|
|
|
81
95
|
<div class="container" part="container">
|
|
82
96
|
<button class="trigger" part="trigger"
|
|
83
97
|
type="button"
|
|
98
|
+
aria-label=${ifDefined(this.triggerAriaLabel)}
|
|
84
99
|
?disabled=${this.disabled || this.readonly}
|
|
85
100
|
@click=${this.handleTriggerClick}
|
|
86
101
|
>${Locale.getValue("chooseFile")}</button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
5
|
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
6
6
|
import { styles } from "./UForm.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { IconRegistry, getDefaultBaseUrl } from "../../utilities/icons.js";
|
|
5
5
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
6
6
|
import { styles } from "./UIcon.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import "../tooltip/UTooltip.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../spinner/USpinner.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
@@ -180,8 +180,8 @@ var UInput = class UInput extends UFormControlElement {
|
|
|
180
180
|
|
|
181
181
|
<input part="input"
|
|
182
182
|
type=${this.type === "password" && this.showPassword ? "text" : this.type}
|
|
183
|
-
aria-label=${ifDefined(this.
|
|
184
|
-
aria-description=${ifDefined(this.
|
|
183
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
184
|
+
aria-description=${ifDefined(this.resolvedAriaDescription)}
|
|
185
185
|
name=${ifDefined(this.name)}
|
|
186
186
|
?required=${this.required}
|
|
187
187
|
?disabled=${this.disabled}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UMenuItem } from "../menu-item/UMenuItem.js";
|
|
5
5
|
import { styles } from "./UMenu.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import "../popover/UPopover.js";
|
|
6
6
|
import { UDivider } from "../divider/UDivider.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { styles } from "./UOption.styles.js";
|
|
6
6
|
import { html, nothing } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UPanel.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isCoarsePointer } from "../../utilities/elements.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UFloatingElement } from "../UFloatingElement.js";
|
|
5
5
|
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
6
6
|
import { styles } from "./UPopover.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UProgressBar.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UProgressRing.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import "../field/UField.js";
|
|
@@ -93,8 +93,8 @@ var URadio = class URadio extends UFormControlElement {
|
|
|
93
93
|
>
|
|
94
94
|
<div class="container" part="container"
|
|
95
95
|
role="radiogroup"
|
|
96
|
-
aria-label=${ifDefined(this.
|
|
97
|
-
aria-description=${ifDefined(this.
|
|
96
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
97
|
+
aria-description=${ifDefined(this.resolvedAriaDescription)}>
|
|
98
98
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
99
99
|
</div>
|
|
100
100
|
</u-field>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -112,8 +112,8 @@ var URating = class URating extends UFormControlElement {
|
|
|
112
112
|
.validationMessage=${this.validationMessage}
|
|
113
113
|
>
|
|
114
114
|
<div class="symbols" part="container" role="radiogroup"
|
|
115
|
-
aria-label=${ifDefined(this.
|
|
116
|
-
aria-description=${ifDefined(this.
|
|
115
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
116
|
+
aria-description=${ifDefined(this.resolvedAriaDescription)}>
|
|
117
117
|
${Array.from({ length: this.max }, (_, i) => {
|
|
118
118
|
const score = i + 1;
|
|
119
119
|
const fill = Math.max(0, Math.min(1, value - score + 1));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import "../spinner/USpinner.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
@@ -173,8 +173,8 @@ var USelect = class USelect extends UFormControlElement {
|
|
|
173
173
|
|
|
174
174
|
<div class="container" part="container" tabindex=${this.disabled ? "-1" : "0"}
|
|
175
175
|
role="combobox"
|
|
176
|
-
aria-label=${ifDefined(this.
|
|
177
|
-
aria-description=${ifDefined(this.
|
|
176
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
177
|
+
aria-description=${ifDefined(this.resolvedAriaDescription)}
|
|
178
178
|
aria-haspopup=${this.searchable ? "dialog" : "listbox"}
|
|
179
179
|
aria-expanded=${this.open}
|
|
180
180
|
aria-controls=${this.searchable ? this.popupId : this.listboxId}>
|
|
@@ -209,7 +209,7 @@ var USelect = class USelect extends UFormControlElement {
|
|
|
209
209
|
<u-popover part="popover"
|
|
210
210
|
id=${this.popupId}
|
|
211
211
|
role=${ifDefined(this.searchable ? "dialog" : void 0)}
|
|
212
|
-
aria-label=${ifDefined(this.searchable ? this.
|
|
212
|
+
aria-label=${ifDefined(this.searchable ? this.resolvedAriaLabel || Locale.getValue("search") : void 0)}
|
|
213
213
|
scrollable
|
|
214
214
|
autofocus
|
|
215
215
|
for=".container"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./USkeleton.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import "../tooltip/UTooltip.js";
|
|
@@ -230,7 +230,7 @@ var USlider = class USlider extends UFormControlElement {
|
|
|
230
230
|
return html`
|
|
231
231
|
<div class="thumb" part=${isEnd ? "thumb-end" : "thumb"}
|
|
232
232
|
role="slider"
|
|
233
|
-
aria-label=${ifDefined(this.
|
|
233
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
234
234
|
aria-valuenow=${val}
|
|
235
235
|
aria-valuemin=${this.min}
|
|
236
236
|
aria-valuemax=${this.max}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./USpinner.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
5
5
|
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
6
6
|
import { Locale } from "../../utilities/Locale.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import { styles } from "./USwitch.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
7
7
|
import { customElement, property, query } from "lit/decorators.js";
|
|
8
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
8
9
|
import { live } from "lit/directives/live.js";
|
|
9
10
|
//#region src/components/switch/USwitch.ts
|
|
10
11
|
var USwitch = class USwitch extends UFormControlElement {
|
|
@@ -38,6 +39,7 @@ var USwitch = class USwitch extends UFormControlElement {
|
|
|
38
39
|
<label class="wrapper" part="wrapper">
|
|
39
40
|
<input
|
|
40
41
|
type="checkbox"
|
|
42
|
+
aria-label=${ifDefined(this.contentAriaLabel)}
|
|
41
43
|
?disabled=${this.disabled || this.readonly}
|
|
42
44
|
?required=${this.required}
|
|
43
45
|
.checked=${live(this.checked)}
|
|
@@ -60,7 +62,13 @@ var USwitch = class USwitch extends UFormControlElement {
|
|
|
60
62
|
</span>
|
|
61
63
|
</span>
|
|
62
64
|
<span class="label" part="label">
|
|
63
|
-
|
|
65
|
+
<!-- 형제 u-checkbox 는 슬롯 폴백으로 label 을 그리는데 여기만 없었다 — 상속받은
|
|
66
|
+
공개 프로퍼티(UFormControlElement.label)를 이 컴포넌트만 한 번도 읽지 않아
|
|
67
|
+
u-switch 에 label 속성을 주면 눈에 보이는 라벨도 접근성 이름도 생기지 않았다
|
|
68
|
+
문서는 기본 슬롯만 가르쳐 왔으므로 문서 위반이
|
|
69
|
+
아니라 «선언은 있는데 동작이 없는» 자리다.
|
|
70
|
+
주의: 이 주석에 백틱을 쓰지 말 것 — html 태그드 템플릿을 그 자리에서 끝낸다. -->
|
|
71
|
+
<slot @slotchange=${this.handleLabelSlotChange}>${this.label}</slot>
|
|
64
72
|
<span class="required" ?hidden=${!this.required}>*</span>
|
|
65
73
|
</span>
|
|
66
74
|
</label>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { styles } from "./UTab.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UPanel } from "../panel/UPanel.js";
|
|
5
5
|
import { UTab } from "../tab/UTab.js";
|
|
6
6
|
import { styles } from "./UTabPanel.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { statusIcon } from "../../utilities/statusIcon.js";
|
|
6
6
|
import { styles } from "./UTag.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UText.styles.js";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
6
6
|
import { html, literal } from "lit/static-html.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import "../field/UField.js";
|
|
@@ -56,8 +56,8 @@ var UTextarea = class UTextarea extends UFormControlElement {
|
|
|
56
56
|
<div class="container" part="container">
|
|
57
57
|
<textarea part="textarea"
|
|
58
58
|
scrollable
|
|
59
|
-
aria-label=${ifDefined(this.
|
|
60
|
-
aria-description=${ifDefined(this.
|
|
59
|
+
aria-label=${ifDefined(this.resolvedAriaLabel)}
|
|
60
|
+
aria-description=${ifDefined(this.resolvedAriaDescription)}
|
|
61
61
|
?required=${this.required}
|
|
62
62
|
?disabled=${this.disabled}
|
|
63
63
|
?readonly=${this.readonly}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFloatingElement } from "../UFloatingElement.js";
|
|
4
4
|
import { styles } from "./UTooltip.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UTreeItem } from "../tree-item/UTreeItem.js";
|
|
5
5
|
import { styles } from "./UTree.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../spinner/USpinner.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { styles } from "./UTreeItem.styles.js";
|
|
@@ -41,7 +41,7 @@ export declare const MIN_STEP_SEPARATION = 1.2;
|
|
|
41
41
|
export declare function parseColor(value: string): [number, number, number] | null;
|
|
42
42
|
export declare function toHex([r, g, b]: [number, number, number]): string;
|
|
43
43
|
export declare function luminance(color: string): number;
|
|
44
|
-
/** WCAG 2.
|
|
44
|
+
/** WCAG 2.x 명암비(상대 휘도 공식 — 2.2 에서 바뀌지 않았다). */
|
|
45
45
|
export declare function contrast(a: string, b: string): number;
|
|
46
46
|
/** `color-mix(in srgb, a p%, b)` 와 같은 계산. */
|
|
47
47
|
export declare function mix(a: string, b: string, p: number): string;
|
package/dist/utilities/accent.js
CHANGED
|
@@ -39,7 +39,7 @@ function luminance(color) {
|
|
|
39
39
|
const [r, g, b] = rgb.map((v) => channelLum(v / 255));
|
|
40
40
|
return .2126 * r + .7152 * g + .0722 * b;
|
|
41
41
|
}
|
|
42
|
-
/** WCAG 2.
|
|
42
|
+
/** WCAG 2.x 명암비(상대 휘도 공식 — 2.2 에서 바뀌지 않았다). */
|
|
43
43
|
function contrast(a, b) {
|
|
44
44
|
const [x, y] = [luminance(a), luminance(b)];
|
|
45
45
|
return (Math.max(x, y) + .05) / (Math.min(x, y) + .05);
|