Skip to content

Commit 046e420

Browse files
committed
chore: update changelog for version 1.0.1 with bug fixes and dependency changes
1 parent 2904048 commit 046e420

10 files changed

Lines changed: 50 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 1.0.1 (2026-04-01)
4+
5+
### Bug Fixes
6+
7+
- **`UIcon`**: Auto-apply `fill="currentColor"` only for fill-based icons; skip when `stroke="currentColor"` is set. Removed global `fill: currentColor` CSS rule.
8+
- **`URadio`** / **`USelect`**: `options` field is now a `@state()` so UI re-renders when options change. `onChangeValue()` is now triggered on both `value` and `options` changes.
9+
- **`UTextarea`**: Replaced `all: unset` with explicit CSS reset for better cross-browser compatibility. Height recalculation moved inside `requestAnimationFrame` to stabilize auto-resize.
10+
- **`Dialog`**: Fixed `prompt()` input not capturing user text — switched to property binding (`.value`) and native `@input` event.
11+
12+
### Dependencies
13+
14+
- **`@lit/react`**: Moved from `dependencies` to optional `peerDependencies`.
15+
16+
---
17+
318
## 1.0.0 (2026-04-01)
419

520
### Breaking Changes

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@iyulab/components",
33
"description": "web-components library based on lit-element made by iyulab",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"keywords": [
66
"iyulab",
77
"components",
@@ -45,17 +45,16 @@
4545
},
4646
"dependencies": {
4747
"@floating-ui/dom": "^1.7.6",
48-
"@lit/react": "^1.0.8",
4948
"focus-trap": "^8.0.1",
5049
"lit": "^3.3.2"
5150
},
5251
"peerDependencies": {
52+
"@lit/react": ">=1.0.8",
5353
"react": ">=18.0.0"
5454
},
5555
"peerDependenciesMeta": {
56-
"react": {
57-
"optional": true
58-
}
56+
"@lit/react": { "optional": true },
57+
"react": { "optional": true }
5958
},
6059
"devDependencies": {
6160
"@eslint/js": "^9.39.4",

skills/iyulab-components/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Web component library built on Lit. Covers all u-* custom elements
44
license: MIT
55
metadata:
66
author: iyulab
7-
version: "1.0.0"
7+
version: "1.0.1"
88
---
99

1010
# @iyulab/components

src/components/icon/UIcon.styles.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ export const styles = css`
1010
svg {
1111
width: 1em;
1212
height: 1em;
13-
fill: currentColor;
1413
}
1514
`;

src/components/icon/UIcon.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ export class UIcon extends UElement {
7272
if (svg?.tagName.toLowerCase() !== "svg") return undefined;
7373

7474
svg.setAttribute("part", "svg");
75+
76+
// stroke 기반 아이콘이 아니면 fill 적용
77+
if (svg.getAttribute("stroke") !== "currentColor") {
78+
svg.setAttribute("fill", "currentColor");
79+
}
80+
7581
return svg.outerHTML;
7682
} catch {
7783
return undefined;

src/components/radio/URadio.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { html, PropertyValues } from "lit";
2-
import { customElement, property } from "lit/decorators.js";
2+
import { customElement, property, state } from "lit/decorators.js";
33
import '../field/UField.js';
44

55
import { UFormControlElement } from "../UFormControlElement.js";
@@ -31,7 +31,7 @@ export class URadio extends UFormControlElement<string> {
3131
/** 배치 방향 */
3232
@property({ type: String, reflect: true }) orientation: RadioOrientation = "vertical";
3333

34-
private options: UOption[] = [];
34+
@state() private options: UOption[] = [];
3535

3636
disconnectedCallback(): void {
3737
this.cleanup(this.options);
@@ -48,7 +48,7 @@ export class URadio extends UFormControlElement<string> {
4848
if (this.readonly) option.disabled = true;
4949
});
5050
}
51-
if (changedProperties.has('value')) {
51+
if (['value','options'].some(k => changedProperties.has(k))) {
5252
this.onChangeValue();
5353
}
5454
}

src/components/select/USelect.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { html, PropertyValues } from "lit";
2-
import { customElement, property, query } from "lit/decorators.js";
2+
import { customElement, property, query, state } from "lit/decorators.js";
33
import '../field/UField.js';
44
import '../icon/UIcon.js';
55
import '../spinner/USpinner.js';
@@ -54,7 +54,7 @@ export class USelect extends UFormControlElement<string | string[]> {
5454
@query('.container', true) containerEl?: HTMLElement;
5555
@query('u-popover', true) popoverEl?: UPopover;
5656

57-
private options: UOption[] = [];
57+
@state() private options: UOption[] = [];
5858

5959
private get valueAsString(): string {
6060
return Array.isArray(this.value) ? this.value.join(',') : this.value ?? '';
@@ -76,7 +76,7 @@ export class USelect extends UFormControlElement<string | string[]> {
7676
protected updated(changedProperties: PropertyValues): void {
7777
super.updated(changedProperties);
7878

79-
if (changedProperties.has('value')) {
79+
if (['value','options'].some(k => changedProperties.has(k))) {
8080
this.onChangeValue();
8181
}
8282
}

src/components/textarea/UTextarea.styles.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@ export const styles = css`
101101
102102
/* ===== Textarea 요소 ===== */
103103
textarea {
104-
all: unset;
104+
display: block;
105+
border: none;
106+
background: none;
107+
outline: none;
108+
padding: 0;
109+
margin: 0;
110+
color: inherit;
111+
font: inherit;
105112
flex: 1;
106113
min-width: 0;
107114
font-size: 1em;

src/components/textarea/UTextarea.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ export class UTextarea extends UFormControlElement<string> {
6161

6262
@query('textarea', true) textareaEl?: HTMLTextAreaElement;
6363

64-
protected updated(changedProperties: PropertyValues): void {
64+
protected async updated(changedProperties: PropertyValues): Promise<void> {
6565
super.updated(changedProperties);
66+
await this.updateComplete;
6667

6768
if (this.resize === 'auto' && (['value','minRows','maxRows','resize']
6869
.some(k => changedProperties.has(k))
@@ -145,11 +146,13 @@ export class UTextarea extends UFormControlElement<string> {
145146
: Infinity;
146147

147148
textarea.style.height = 'auto';
148-
const scrollHeight = textarea.scrollHeight;
149-
const newHeight = Math.min(Math.max(scrollHeight, minHeight), maxHeight);
149+
requestAnimationFrame(() => {
150+
const scrollHeight = textarea.scrollHeight;
151+
const newHeight = Math.min(Math.max(scrollHeight, minHeight), maxHeight);
150152

151-
textarea.style.height = `${newHeight}px`;
152-
textarea.style.overflowY = scrollHeight > maxHeight ? 'auto' : 'hidden';
153+
textarea.style.height = `${newHeight}px`;
154+
textarea.style.overflowY = scrollHeight > maxHeight ? 'auto' : 'hidden';
155+
});
153156
}
154157

155158
private handleTextareaInput = (e: InputEvent) => {

src/utilities/Dialog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export class Dialog {
112112
<u-input
113113
type=${(options?.type || 'text') as any}
114114
placeholder=${options?.placeholder || ''}
115-
value=${inputValue}
116-
@u-input=${(e: CustomEvent) => {
115+
.value=${inputValue as any}
116+
@input=${(e: InputEvent) => {
117117
const input = e.target as any;
118118
inputValue = input.value || '';
119119
}}

0 commit comments

Comments
 (0)