@transcodes/ui-components 0.4.5 → 0.4.6
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
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.6] - 2026-01-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **tc-text**: `for` 속성 지원 추가 (label 접근성 개선)
|
|
13
|
+
- `tag="label"`일 때 `for` 속성으로 form control과 연결 가능
|
|
14
|
+
- 스크린 리더 및 키보드 네비게이션 접근성 향상
|
|
15
|
+
- Storybook `LabelWithFor` 스토리 추가
|
|
16
|
+
|
|
8
17
|
## [0.4.5] - 2025-12-23
|
|
9
18
|
|
|
10
19
|
### Fixed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tc-text.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"tc-text.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAW,MAAM,KAAK,CAAC;AAK/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,OAAO,GACR,GAAG,GACH,MAAM,GACN,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,CAAC;AAEZ,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACpD,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAChD,KAAK,SAAS,GACV,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX;;;;;;;GAOG;AACH,qBACa,MAAO,SAAQ,UAAU;IACR,GAAG,EAAE,OAAO,CAAO;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAO,CAAM;IACjB,GAAG,SAAM;IAErC,OAAgB,MAAM,4BA2EpB;IAEF,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,aAAa;IAgBZ,MAAM;CA6BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as a, customElement as
|
|
3
|
-
import { styleMap as
|
|
4
|
-
import { unsafeStatic as
|
|
5
|
-
import { sharedStyles as
|
|
6
|
-
var
|
|
7
|
-
for (var e =
|
|
8
|
-
(l =
|
|
9
|
-
return
|
|
1
|
+
import { css as h, LitElement as x, nothing as p } from "lit";
|
|
2
|
+
import { property as a, customElement as f } from "lit/decorators.js";
|
|
3
|
+
import { styleMap as g } from "lit/directives/style-map.js";
|
|
4
|
+
import { unsafeStatic as m, html as y } from "lit/static-html.js";
|
|
5
|
+
import { sharedStyles as v } from "../styles/shared.js";
|
|
6
|
+
var u = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (o, s, i, n) => {
|
|
7
|
+
for (var e = n > 1 ? void 0 : n ? d(s, i) : s, c = o.length - 1, l; c >= 0; c--)
|
|
8
|
+
(l = o[c]) && (e = (n ? l(s, i, e) : l(e)) || e);
|
|
9
|
+
return n && e && u(s, i, e), e;
|
|
10
10
|
};
|
|
11
|
-
let t = class extends
|
|
11
|
+
let t = class extends x {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.tag = "p", this.sx = {};
|
|
13
|
+
super(...arguments), this.tag = "p", this.sx = {}, this.for = "";
|
|
14
14
|
}
|
|
15
15
|
getColorClass() {
|
|
16
16
|
return this.color && {
|
|
@@ -30,25 +30,30 @@ let t = class extends p {
|
|
|
30
30
|
return this.color;
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
const
|
|
33
|
+
const o = m(this.tag), s = [
|
|
34
34
|
"text",
|
|
35
35
|
this.size ? `text--${this.size}` : "",
|
|
36
36
|
this.weight ? `text--w${this.weight}` : "",
|
|
37
37
|
this.getColorClass()
|
|
38
|
-
].filter(Boolean).join(" "),
|
|
39
|
-
...
|
|
38
|
+
].filter(Boolean).join(" "), i = this.getColorStyle(), n = {
|
|
39
|
+
...i ? { color: i } : {},
|
|
40
40
|
...this.sx
|
|
41
41
|
};
|
|
42
|
-
return
|
|
43
|
-
<${
|
|
42
|
+
return y`
|
|
43
|
+
<${o}
|
|
44
|
+
part="text"
|
|
45
|
+
class=${s}
|
|
46
|
+
style=${g(n)}
|
|
47
|
+
for=${this.tag === "label" && this.for ? this.for : p}
|
|
48
|
+
>
|
|
44
49
|
<slot></slot>
|
|
45
|
-
</${
|
|
50
|
+
</${o}>
|
|
46
51
|
`;
|
|
47
52
|
}
|
|
48
53
|
};
|
|
49
54
|
t.styles = [
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
v,
|
|
56
|
+
h`
|
|
52
57
|
:host {
|
|
53
58
|
display: contents;
|
|
54
59
|
}
|
|
@@ -122,23 +127,26 @@ t.styles = [
|
|
|
122
127
|
}
|
|
123
128
|
`
|
|
124
129
|
];
|
|
125
|
-
|
|
130
|
+
r([
|
|
126
131
|
a({ type: String })
|
|
127
132
|
], t.prototype, "tag", 2);
|
|
128
|
-
|
|
133
|
+
r([
|
|
129
134
|
a({ type: String })
|
|
130
135
|
], t.prototype, "size", 2);
|
|
131
|
-
|
|
136
|
+
r([
|
|
132
137
|
a({ type: String })
|
|
133
138
|
], t.prototype, "weight", 2);
|
|
134
|
-
|
|
139
|
+
r([
|
|
135
140
|
a({ type: String })
|
|
136
141
|
], t.prototype, "color", 2);
|
|
137
|
-
|
|
142
|
+
r([
|
|
138
143
|
a({ type: Object })
|
|
139
144
|
], t.prototype, "sx", 2);
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
r([
|
|
146
|
+
a({ type: String })
|
|
147
|
+
], t.prototype, "for", 2);
|
|
148
|
+
t = r([
|
|
149
|
+
f("tc-text")
|
|
142
150
|
], t);
|
|
143
151
|
export {
|
|
144
152
|
t as TcText
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transcodes/ui-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Lit 3.x component library with Reactive Controllers",
|
|
6
6
|
"keywords": [
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"lit": "^3.0.0"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@transcodes/design-tokens": "^0.4.
|
|
78
|
+
"@transcodes/design-tokens": "^0.4.6"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@storybook/addon-a11y": "^10.1.9",
|