@iyulab/components 2.23.2 → 2.25.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 (47) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +1 -1
  3. package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -1
  4. package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +1 -1
  5. package/dist/components/alert/UAlert.d.ts +8 -0
  6. package/dist/components/alert/UAlert.js +16 -7
  7. package/dist/components/alert/UAlert.styles.js +21 -1
  8. package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +5 -1
  9. package/dist/components/card/UCard.d.ts +15 -2
  10. package/dist/components/card/UCard.js +23 -2
  11. package/dist/components/card/UCard.styles.js +18 -0
  12. package/dist/components/checkbox/UCheckbox.styles.js +4 -2
  13. package/dist/components/expander/UExpander.styles.js +3 -1
  14. package/dist/components/menu-item/UMenuItem.styles.js +4 -1
  15. package/dist/components/radio/URadio.d.ts +1 -1
  16. package/dist/components/radio/URadio.styles.js +1 -1
  17. package/dist/components/switch/USwitch.d.ts +1 -1
  18. package/dist/components/switch/USwitch.styles.js +1 -1
  19. package/dist/components/tab/UTab.d.ts +24 -4
  20. package/dist/components/tab/UTab.js +51 -8
  21. package/dist/components/tab/UTab.styles.js +33 -1
  22. package/dist/components/tab-nav/UTabNav.d.ts +34 -0
  23. package/dist/components/tab-nav/UTabNav.js +44 -0
  24. package/dist/components/tab-nav/UTabNav.styles.d.ts +1 -0
  25. package/dist/components/tab-nav/UTabNav.styles.js +38 -0
  26. package/dist/components/tag/UTag.d.ts +4 -0
  27. package/dist/components/tag/UTag.js +5 -0
  28. package/dist/components/tag/UTag.styles.js +12 -0
  29. package/dist/components/tree-item/UTreeItem.styles.js +4 -1
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +2 -1
  32. package/dist/react/UTabNav.d.ts +14 -0
  33. package/dist/react/UTabNav.js +10 -0
  34. package/dist/react/index.d.ts +1 -0
  35. package/dist/react/index.js +1 -0
  36. package/dist/styles/dark.css +6 -0
  37. package/dist/styles/light.css +6 -0
  38. package/package.json +1 -1
  39. package/skills/iyulab-components/SKILL.md +2 -1
  40. package/skills/iyulab-components/references/components/alert.md +18 -0
  41. package/skills/iyulab-components/references/components/card.md +16 -1
  42. package/skills/iyulab-components/references/components/checkbox.md +1 -1
  43. package/skills/iyulab-components/references/components/radio.md +1 -1
  44. package/skills/iyulab-components/references/components/switch.md +1 -1
  45. package/skills/iyulab-components/references/components/tab-nav.md +63 -0
  46. package/skills/iyulab-components/references/components/tab-panel.md +15 -1
  47. package/skills/iyulab-components/references/components/tag.md +9 -1
@@ -23,7 +23,10 @@ var styles = css`
23
23
  flex-direction: row;
24
24
  align-items: center;
25
25
  padding: 0.25em 0.5em;
26
- padding-left: calc(var(--menu-indent-size) * var(--menu-item-depth) + 0.5em);\n \n box-sizing: border-box;\n min-height: var(--u-target-size, 0px);
26
+ padding-left: calc(var(--menu-indent-size) * var(--menu-item-depth) + 0.5em);
27
+
28
+ box-sizing: border-box;
29
+ min-height: var(--u-target-size, 0px);
27
30
  background-color: transparent;
28
31
  transition: background-color var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)), color var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
29
32
  user-select: none;
@@ -12,7 +12,7 @@ export type RadioOrientation = "vertical" | "horizontal";
12
12
  * @csspart field - u-field 요소
13
13
  * @csspart container - 옵션들을 감싸는 컨테이너
14
14
  *
15
- * @cssprop --radio-color - 선택 상태의 기준색 (기본: --u-primary-color)
15
+ * @cssprop --radio-color - 선택 상태의 기준색 (기본: --u-selection-color — 테마가 가르지 않으면 --u-primary-color)
16
16
  * @cssprop --radio-color-active - 선택 상태 active 톤 (기본: --radio-color 85% + black)
17
17
  *
18
18
  * @event change - 사용자 상호작용(옵션 클릭·키보드)으로 선택 값이 변경될 때 발생.
@@ -2,7 +2,7 @@ import { css } from "lit";
2
2
  //#region src/components/radio/URadio.styles.ts
3
3
  var styles = css`
4
4
  :host {
5
- --radio-color: var(--u-primary-color, #1976D2);
5
+ --radio-color: var(--u-selection-color, #1976D2);
6
6
  --radio-color-active: color-mix(in srgb, var(--radio-color) 85%, black);
7
7
  }
8
8
 
@@ -18,7 +18,7 @@ import { UFormControlElement } from '../UFormControlElement.js';
18
18
  * @cssprop --switch-track-width - 트랙 너비 (2.4em)
19
19
  * @cssprop --switch-track-height - 트랙 높이 (1.4em)
20
20
  * @cssprop --switch-track-color - 비활성 트랙 배경색
21
- * @cssprop --switch-track-color-checked - 활성 트랙 배경색
21
+ * @cssprop --switch-track-color-checked - 활성 트랙 배경색 (기본: --u-selection-color — 테마가 가르지 않으면 --u-primary-color)
22
22
  * @cssprop --switch-thumb-size - thumb 크기 (1.1em)
23
23
  * @cssprop --switch-thumb-offset - thumb 간격 (0.15em)
24
24
  * @cssprop --switch-thumb-color - thumb 색상 (#fff)
@@ -5,7 +5,7 @@ var styles = css`
5
5
  --switch-track-width: 2.4em;
6
6
  --switch-track-height: 1.4em;
7
7
  --switch-track-color: var(--u-neutral-300, #E0E0E0);
8
- --switch-track-color-checked: var(--u-primary-color, #1976D2);
8
+ --switch-track-color-checked: var(--u-selection-color, #1976D2);
9
9
  --switch-thumb-size: 1.1em;
10
10
  --switch-thumb-offset: 0.15em;
11
11
  --switch-thumb-color: #fff;
@@ -1,13 +1,16 @@
1
- import { PropertyValues } from 'lit';
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
2
  import { UElement } from '../UElement.js';
3
3
  /**
4
- * 탭 패널에서 사용하는 탭 아이템(탭 버튼) 컴포넌트입니다.
4
+ * 탭 아이템 — `u-tab-panel` 안에서는 패널을 고르는 탭(`role="tab"`), `href` 를 주면 `u-tab-nav` 안의
5
+ * 이동 링크(저장된 보기 = URL)다. 링크 탭은 탭 역할을 갖지 않는다 — 다른 쪽으로 이동하는 것은 탭이 아니라
6
+ * 링크이고, 현재 쪽은 `aria-current="page"` 로 알린다(WAI-ARIA APG 는 탭 패턴을 «같은 쪽의 패널 전환» 에만 쓴다).
5
7
  *
6
8
  * @slot - 탭 레이블 콘텐츠
7
9
  * @slot prefix - 탭 레이블 앞에 표시되는 콘텐츠
8
10
  * @slot suffix - 탭 레이블 뒤에 표시되는 콘텐츠
9
11
  *
10
- * @csspart base - 탭 바깥 상자
12
+ * @csspart base - 탭 바깥 상자(`href` 를 주면 이 상자가 링크 `<a>` 다)
13
+ * @csspart count - 개수 (`count` 를 줄 때만 렌더된다)
11
14
  * @csspart remove-btn - 탭 닫기 버튼
12
15
  *
13
16
  * @event remove - 탭이 닫힐 때 발생. 이벤트 리스너에서 preventDefault()를 호출하면 탭이 닫히지 않습니다.
@@ -24,9 +27,26 @@ export declare class UTab extends UElement {
24
27
  value: string;
25
28
  /** 탭 드래그 여부 */
26
29
  draggable: boolean;
30
+ /**
31
+ * 선택된 탭 — 담는 쪽(`u-tab-panel` · `u-tab-nav` 의 `value`)이 정한다. `u-tab-nav` 에 `value` 가 없으면
32
+ * 작성자가 현재 보기의 링크 탭에 직접 둔다.
33
+ */
34
+ active: boolean;
35
+ /** 이동할 URL — 주면 탭이 링크가 된다(`u-tab-nav` 안에 둔다). 링크 탭은 닫기 버튼을 그리지 않는다. */
36
+ href?: string;
37
+ /** 링크 타겟 (`href` 와 함께) */
38
+ target?: string;
39
+ /** 링크 관계 (`href` 와 함께) */
40
+ rel?: string;
41
+ /** 레이블 뒤의 조용한 개수(그 보기의 항목 수) — 현재 로캘의 숫자 표기로 그린다. 없으면 그리지 않는다. */
42
+ count?: number;
27
43
  connectedCallback(): void;
44
+ protected willUpdate(changedProperties: PropertyValues): void;
28
45
  protected updated(changedProperties: PropertyValues): void;
29
- render(): import('lit-html').TemplateResult<1>;
46
+ /** 탭이면 호스트가 `role="tab"` 이고 포커스를 받는다 · 링크면 둘 다 안쪽 `<a>` 의 것이다. */
47
+ private applyRole;
48
+ render(): TemplateResult<1>;
49
+ private renderLabel;
30
50
  private handleRemoveClick;
31
51
  }
32
52
  declare global {
@@ -4,9 +4,11 @@ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.153.0/hel
4
4
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.js";
5
5
  import "../button/UButton.js";
6
6
  import "../icon/UIcon.js";
7
+ import { formatNumber } from "../../utilities/format.js";
7
8
  import { styles } from "./UTab.styles.js";
8
- import { html } from "lit";
9
+ import { html, nothing } from "lit";
9
10
  import { customElement, property } from "lit/decorators.js";
11
+ import { ifDefined } from "lit/directives/if-defined.js";
10
12
  //#region src/components/tab/UTab.ts
11
13
  var UTab = class UTab extends UElement {
12
14
  constructor(..._args) {
@@ -15,6 +17,7 @@ var UTab = class UTab extends UElement {
15
17
  this.removable = false;
16
18
  this.value = "";
17
19
  this.draggable = false;
20
+ this.active = false;
18
21
  this.handleRemoveClick = (e) => {
19
22
  e.stopPropagation();
20
23
  if (this.disabled) return;
@@ -29,23 +32,44 @@ var UTab = class UTab extends UElement {
29
32
  }
30
33
  connectedCallback() {
31
34
  super.connectedCallback();
32
- this.setAttribute("role", "tab");
33
- if (!this.hasAttribute("tabindex")) this.setAttribute("tabindex", "0");
35
+ this.applyRole();
34
36
  if (!this.hasAttribute("slot")) this.setAttribute("slot", "tab");
35
37
  }
38
+ willUpdate(changedProperties) {
39
+ super.willUpdate(changedProperties);
40
+ if (changedProperties.has("href")) this.applyRole();
41
+ }
36
42
  updated(changedProperties) {
37
43
  super.updated(changedProperties);
38
- if (changedProperties.has("disabled")) {
39
- if (this.disabled) this.setAttribute("aria-disabled", "true");
44
+ if (changedProperties.has("disabled") || changedProperties.has("href")) {
45
+ if (this.disabled && !this.href) this.setAttribute("aria-disabled", "true");
40
46
  else this.removeAttribute("aria-disabled");
41
47
  }
42
48
  }
49
+ /** 탭이면 호스트가 `role="tab"` 이고 포커스를 받는다 · 링크면 둘 다 안쪽 `<a>` 의 것이다. */
50
+ applyRole() {
51
+ if (this.href) {
52
+ if (this.getAttribute("role") === "tab") this.removeAttribute("role");
53
+ this.removeAttribute("tabindex");
54
+ this.removeAttribute("aria-selected");
55
+ return;
56
+ }
57
+ this.setAttribute("role", "tab");
58
+ if (!this.hasAttribute("tabindex")) this.setAttribute("tabindex", "0");
59
+ }
43
60
  render() {
61
+ if (this.href) return html`
62
+ <a class="base" part="base"
63
+ href=${ifDefined(this.disabled ? void 0 : this.href)}
64
+ aria-current=${this.active ? "page" : nothing}
65
+ aria-disabled=${this.disabled ? "true" : nothing}
66
+ target=${ifDefined(this.target)}
67
+ rel=${ifDefined(this.rel)}
68
+ >${this.renderLabel()}</a>
69
+ `;
44
70
  return html`
45
71
  <div class="base" part="base">
46
- <slot name="prefix"></slot>
47
- <slot></slot>
48
- <slot name="suffix"></slot>
72
+ ${this.renderLabel()}
49
73
 
50
74
  <u-button class="remove-btn" part="remove-btn"
51
75
  ?hidden=${!this.removable}
@@ -58,6 +82,14 @@ var UTab = class UTab extends UElement {
58
82
  </div>
59
83
  `;
60
84
  }
85
+ renderLabel() {
86
+ return html`
87
+ <slot name="prefix"></slot>
88
+ <slot></slot>
89
+ ${this.count == null || Number.isNaN(this.count) ? nothing : html`<span class="count" part="count">${formatNumber(this.count)}</span>`}
90
+ <slot name="suffix"></slot>
91
+ `;
92
+ }
61
93
  };
62
94
  __decorate([property({
63
95
  type: Boolean,
@@ -75,6 +107,17 @@ __decorate([property({
75
107
  type: Boolean,
76
108
  reflect: true
77
109
  }), __decorateMetadata("design:type", Object)], UTab.prototype, "draggable", void 0);
110
+ __decorate([property({
111
+ type: Boolean,
112
+ reflect: true
113
+ }), __decorateMetadata("design:type", Object)], UTab.prototype, "active", void 0);
114
+ __decorate([property({
115
+ type: String,
116
+ reflect: true
117
+ }), __decorateMetadata("design:type", String)], UTab.prototype, "href", void 0);
118
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UTab.prototype, "target", void 0);
119
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UTab.prototype, "rel", void 0);
120
+ __decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UTab.prototype, "count", void 0);
78
121
  UTab = __decorate([customElement("u-tab")], UTab);
79
122
  //#endregion
80
123
  export { UTab };
@@ -23,7 +23,9 @@ var styles = css`
23
23
  display: inline-flex;
24
24
  flex-direction: row;
25
25
  align-items: center;
26
- padding: var(--tab-padding-block) var(--tab-padding-inline);\n \n min-height: var(--u-target-size, 0px);
26
+ padding: var(--tab-padding-block) var(--tab-padding-inline);
27
+
28
+ min-height: var(--u-target-size, 0px);
27
29
  border-radius: inherit;
28
30
  }
29
31
 
@@ -42,6 +44,36 @@ var styles = css`
42
44
  margin-left: 0.2em;
43
45
  }
44
46
 
47
+
48
+ a.base {
49
+ color: inherit;
50
+ text-decoration: none;
51
+ cursor: inherit;
52
+ }
53
+ a.base:focus-visible {
54
+ outline-offset: -2px;
55
+ }
56
+ a.base:not([href]) {
57
+ cursor: not-allowed;
58
+ }
59
+
60
+
61
+ .count {
62
+ flex-shrink: 0;
63
+ margin-left: 0.45em;
64
+ min-width: 1.8em;
65
+ padding: 0 0.5em;
66
+ box-sizing: border-box;
67
+ border-radius: var(--u-radius-pill, 9999px);
68
+ background-color: var(--u-bg-color-raised, #FAFAFA);
69
+ color: var(--u-txt-color-weak, #616161);
70
+ font-size: var(--u-text-overline-size, 11px);
71
+ line-height: calc(var(--u-text-overline-leading, 1.45) * 1em);
72
+ font-weight: 500;
73
+ font-variant-numeric: tabular-nums;
74
+ text-align: center;
75
+ }
76
+
45
77
  .remove-btn {
46
78
  flex-shrink: 0;
47
79
  margin-left: 0.2em;
@@ -0,0 +1,34 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { UElement } from '../UElement.js';
3
+ /**
4
+ * 이동 링크의 탭 띠 — 저장된 보기(«열림 · 내 것 · 이번 주») 처럼 탭마다 URL 이 있는 자리.
5
+ *
6
+ * `u-tab-panel` 과 다른 일이다: 그것은 같은 쪽 안의 패널을 고르는 탭(`tablist`)이고, 이것은 다른 URL 로 가는
7
+ * 링크의 `<nav>` 랜드마크다. 그래서 탭은 링크(`<u-tab href>`)로 그려지고, 현재 보기는 `aria-current="page"`
8
+ * 로 알리며, 각 링크가 Tab 정지점이다(탭 목록의 화살표 이동은 링크 묶음에 쓰지 않는다 — WAI-ARIA APG).
9
+ *
10
+ * @slot - `u-tab href` 요소들(탭은 붙을 때 스스로 `slot="tab"` 을 단다 — 두 슬롯이 같은 자리에 그린다)
11
+ *
12
+ * @csspart base - `<nav>` 띠
13
+ *
14
+ * @cssprop --tab-nav-color - 현재 탭의 글자·밑줄 색 (기본: --u-primary-color)
15
+ */
16
+ export declare class UTabNav extends UElement {
17
+ static styles: import('lit').CSSResultGroup[];
18
+ /**
19
+ * 현재 보기 — 같은 `value` 의 탭이 `active` 가 된다. 비워 두면 담긴 탭의 `active` 를 건드리지 않는다
20
+ * (작성자가 현재 탭에 `active` 를 직접 둔다).
21
+ */
22
+ value: string;
23
+ /** 띠의 접근 가능한 이름 — 랜드마크가 여럿인 쪽에서 «무엇의 보기인가» 를 가른다(예: `Saved views`). */
24
+ label: string;
25
+ private tabs;
26
+ protected willUpdate(changedProperties: PropertyValues): void;
27
+ render(): import('lit-html').TemplateResult<1>;
28
+ private handleSlotChange;
29
+ }
30
+ declare global {
31
+ interface HTMLElementTagNameMap {
32
+ 'u-tab-nav': UTabNav;
33
+ }
34
+ }
@@ -0,0 +1,44 @@
1
+ import { UElement } from "../UElement.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.js";
4
+ import { UTab } from "../tab/UTab.js";
5
+ import { styles } from "./UTabNav.styles.js";
6
+ import { html, nothing } from "lit";
7
+ import { customElement, property, state } from "lit/decorators.js";
8
+ //#region src/components/tab-nav/UTabNav.ts
9
+ var UTabNav = class UTabNav extends UElement {
10
+ constructor(..._args) {
11
+ super(..._args);
12
+ this.value = "";
13
+ this.label = "";
14
+ this.tabs = [];
15
+ this.handleSlotChange = () => {
16
+ const slots = [...this.renderRoot.querySelectorAll("slot")];
17
+ this.tabs = slots.flatMap((s) => s.assignedElements({ flatten: true })).filter((el) => el instanceof UTab);
18
+ };
19
+ }
20
+ static {
21
+ this.styles = [super.styles, styles];
22
+ }
23
+ willUpdate(changedProperties) {
24
+ super.willUpdate(changedProperties);
25
+ if ((changedProperties.has("value") || changedProperties.has("tabs")) && this.value) for (const tab of this.tabs) tab.active = tab.value === this.value;
26
+ }
27
+ render() {
28
+ return html`
29
+ <nav class="base" part="base" aria-label=${this.label || nothing}>
30
+ <slot name="tab" @slotchange=${this.handleSlotChange}></slot>
31
+ <slot @slotchange=${this.handleSlotChange}></slot>
32
+ </nav>
33
+ `;
34
+ }
35
+ };
36
+ __decorate([property({
37
+ type: String,
38
+ reflect: true
39
+ }), __decorateMetadata("design:type", Object)], UTabNav.prototype, "value", void 0);
40
+ __decorate([property({ type: String }), __decorateMetadata("design:type", Object)], UTabNav.prototype, "label", void 0);
41
+ __decorate([state(), __decorateMetadata("design:type", Array)], UTabNav.prototype, "tabs", void 0);
42
+ UTabNav = __decorate([customElement("u-tab-nav")], UTabNav);
43
+ //#endregion
44
+ export { UTabNav };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,38 @@
1
+ import { css } from "lit";
2
+ //#region src/components/tab-nav/UTabNav.styles.ts
3
+ var styles = css`
4
+ :host {
5
+ --tab-nav-color: var(--u-primary-color, #1976D2);
6
+
7
+ display: block;
8
+ min-width: 0;
9
+ color: var(--u-txt-color, #212121);
10
+ }
11
+
12
+
13
+
14
+ .base {
15
+ display: flex;
16
+ align-items: stretch;
17
+ gap: var(--u-space-2xs, 4px);
18
+ box-shadow: inset 0 -1px 0 var(--u-border-color, #E0E0E0);
19
+ overflow-x: auto;
20
+ overflow-y: hidden;
21
+ scrollbar-width: thin;
22
+ }
23
+
24
+ ::slotted(u-tab[active]) {
25
+ color: var(--tab-nav-color);
26
+ }
27
+ ::slotted(u-tab[active])::after {
28
+ content: '';
29
+ position: absolute;
30
+ left: 0;
31
+ right: 0;
32
+ bottom: 0;
33
+ height: 2px;
34
+ background-color: var(--tab-nav-color);
35
+ }
36
+ `;
37
+ //#endregion
38
+ export { styles };
@@ -7,6 +7,8 @@ export type TagAppearance = "solid" | "soft" | "outlined" | "plain";
7
7
  * *색 자체*를 말하고 리브랜딩에 의도적으로 면역이다. `neutral`(기본)은 **무채색**이다.
8
8
  */
9
9
  export type TagColor = "neutral" | "primary" | "info" | "success" | "warning" | "danger" | "blue" | "green" | "yellow" | "red" | "orange" | "teal" | "cyan" | "purple" | "pink";
10
+ /** 크기 — `md`(기본: 캡션 글자) · `sm`(오버라인 글자 · 세로 여백 없음 — 표 칸의 식별자 옆 속성처럼 글줄 안에 앉는 작은 표식). */
11
+ export type TagSize = "sm" | "md";
10
12
  /**
11
13
  * 레이블, 카테고리, 상태 등을 표시하는 태그 컴포넌트입니다.
12
14
  *
@@ -33,6 +35,8 @@ export declare class UTag extends UElement {
33
35
  appearance: TagAppearance;
34
36
  /** 태그의 색상을 설정합니다. */
35
37
  color: TagColor;
38
+ /** 크기 */
39
+ size: TagSize;
36
40
  /** 태그를 둥글게 표시합니다. */
37
41
  rounded: boolean;
38
42
  /**
@@ -12,6 +12,7 @@ var UTag = class UTag extends UElement {
12
12
  super(..._args);
13
13
  this.appearance = "soft";
14
14
  this.color = "neutral";
15
+ this.size = "md";
15
16
  this.rounded = false;
16
17
  this.icon = false;
17
18
  this.dot = false;
@@ -41,6 +42,10 @@ __decorate([property({
41
42
  type: String,
42
43
  reflect: true
43
44
  }), __decorateMetadata("design:type", Object)], UTag.prototype, "color", void 0);
45
+ __decorate([property({
46
+ type: String,
47
+ reflect: true
48
+ }), __decorateMetadata("design:type", Object)], UTag.prototype, "size", void 0);
44
49
  __decorate([property({
45
50
  type: Boolean,
46
51
  reflect: true
@@ -187,6 +187,18 @@ var styles = css`
187
187
  }
188
188
 
189
189
 
190
+
191
+
192
+ :host([size="sm"]) {
193
+ font-size: var(--u-text-overline-size, 11px);
194
+ line-height: calc(var(--u-text-overline-leading, 1.45) * 1em);
195
+ --tag-padding-block: 0;
196
+ --tag-padding-inline: 0.45em;
197
+ --tag-gap: 0.35em;
198
+ --tag-dot-size: 5px;
199
+ }
200
+
201
+
190
202
  .base {
191
203
  box-sizing: border-box;
192
204
  width: 100%;
@@ -26,7 +26,10 @@ var styles = css`
26
26
  padding-left: calc(
27
27
  var(--tree-indent-size) * var(--tree-item-depth)
28
28
  + var(--tree-indent-guide-offset)
29
- );\n \n box-sizing: border-box;\n min-height: var(--u-target-size, 0px);
29
+ );
30
+
31
+ box-sizing: border-box;
32
+ min-height: var(--u-target-size, 0px);
30
33
  transition: background-color var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)), color var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
31
34
  user-select: none;
32
35
  cursor: pointer;
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from './components/steps/USteps.js';
45
45
  export * from './components/switch/USwitch.js';
46
46
  export * from './components/tab/UTab.js';
47
47
  export * from './components/tab-panel/UTabPanel.js';
48
+ export * from './components/tab-nav/UTabNav.js';
48
49
  export * from './components/tag/UTag.js';
49
50
  export * from './components/text/UText.js';
50
51
  export * from './components/textarea/UTextarea.js';
package/dist/index.js CHANGED
@@ -58,6 +58,7 @@ import { USteps } from "./components/steps/USteps.js";
58
58
  import { USwitch } from "./components/switch/USwitch.js";
59
59
  import { UTab } from "./components/tab/UTab.js";
60
60
  import { UTabPanel } from "./components/tab-panel/UTabPanel.js";
61
+ import { UTabNav } from "./components/tab-nav/UTabNav.js";
61
62
  import { UText } from "./components/text/UText.js";
62
63
  import { UTextarea } from "./components/textarea/UTextarea.js";
63
64
  import { UTreeItem } from "./components/tree-item/UTreeItem.js";
@@ -68,4 +69,4 @@ import { Dialog } from "./utilities/Dialog.js";
68
69
  import { Theme } from "./utilities/Theme.js";
69
70
  import { Toast } from "./utilities/Toast.js";
70
71
  import { decodeDelimited, decodeTsv, encodeTsv } from "./utilities/tsv.js";
71
- export { ALERT_STATUSES, BrowserStorage, CompositionTracker, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDateRangePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFileInput, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPagination, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USteps, USwitch, UTab, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, copyFromKey, createDevWarner, dateAttrConverter, dateTextPattern, decodeDelimited, decodeTsv, defaultSearchMatch, devWarnOnce, encodeTsv, foldForSearch, formatCurrency, formatDate, formatDateRange, formatDateRangeText, formatDateText, formatDateTimeRangeText, formatDateTimeText, formatNumber, getDefaultBaseUrl, getParentElement, hangulKeystrokes, initialsOf, isCoarsePointer, isFocusCandidate, isFromControl, isHangul, isImeComposing, isTextEntry, jsonAttrConverter, localOffset, parseDate, parseDateRange, parseDateTime, parseDateTimeRange, parseNumber, pasteFromKey, querySelectorAllWithin, querySelectorDeep, querySelectorWithin, readDateValue, replayInput, resetDevWarnings, setDefaultBaseUrl, urlAttrConverter, writeInstant, writePlainDate, writePlainDateTime };
72
+ export { ALERT_STATUSES, BrowserStorage, CompositionTracker, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDateRangePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFileInput, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPagination, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USteps, USwitch, UTab, UTabNav, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, copyFromKey, createDevWarner, dateAttrConverter, dateTextPattern, decodeDelimited, decodeTsv, defaultSearchMatch, devWarnOnce, encodeTsv, foldForSearch, formatCurrency, formatDate, formatDateRange, formatDateRangeText, formatDateText, formatDateTimeRangeText, formatDateTimeText, formatNumber, getDefaultBaseUrl, getParentElement, hangulKeystrokes, initialsOf, isCoarsePointer, isFocusCandidate, isFromControl, isHangul, isImeComposing, isTextEntry, jsonAttrConverter, localOffset, parseDate, parseDateRange, parseDateTime, parseDateTimeRange, parseNumber, pasteFromKey, querySelectorAllWithin, querySelectorDeep, querySelectorWithin, readDateValue, replayInput, resetDevWarnings, setDefaultBaseUrl, urlAttrConverter, writeInstant, writePlainDate, writePlainDateTime };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { UTabNav as UTabNavElement } from '@iyulab/components/dist/components/tab-nav/UTabNav.js';
3
+
4
+ type UTabNavOwnProps = Omit<UTabNavElement, keyof HTMLElement>;
5
+
6
+ export declare const UTabNav: React.ForwardRefExoticComponent<
7
+ Partial<Omit<UTabNavElement, Exclude<keyof React.HTMLAttributes<UTabNavElement>, keyof UTabNavOwnProps>>>
8
+ & Omit<React.HTMLAttributes<UTabNavElement>, keyof UTabNavOwnProps | never>
9
+ & React.RefAttributes<UTabNavElement>
10
+ & {
11
+ }
12
+ >;
13
+
14
+ export type UTabNavProps = React.ComponentProps<typeof UTabNav>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UTabNav as UTabNavElement } from '@iyulab/components/dist/components/tab-nav/UTabNav.js';
4
+
5
+ export const UTabNav = createComponent({
6
+ react: React,
7
+ tagName: 'u-tab-nav',
8
+ elementClass: UTabNavElement,
9
+ events: {},
10
+ });
@@ -5,6 +5,7 @@ export { UTextarea, UTextareaProps } from './UTextarea';
5
5
  export { UText, UTextProps } from './UText';
6
6
  export { UTag, UTagProps } from './UTag';
7
7
  export { UTabPanel, UTabPanelProps } from './UTabPanel';
8
+ export { UTabNav, UTabNavProps } from './UTabNav';
8
9
  export { UTab, UTabProps } from './UTab';
9
10
  export { USwitch, USwitchProps } from './USwitch';
10
11
  export { USteps, UStepsProps } from './USteps';
@@ -5,6 +5,7 @@ export { UTextarea } from './UTextarea.js';
5
5
  export { UText } from './UText.js';
6
6
  export { UTag } from './UTag.js';
7
7
  export { UTabPanel } from './UTabPanel.js';
8
+ export { UTabNav } from './UTabNav.js';
8
9
  export { UTab } from './UTab.js';
9
10
  export { USwitch } from './USwitch.js';
10
11
  export { USteps } from './USteps.js';
@@ -264,6 +264,12 @@
264
264
  ink can point it at an interaction hue instead. */
265
265
  --u-focus-ring-color: var(--u-primary-color-strong);
266
266
 
267
+ /* Selection — the mark of a chosen option (a checked checkbox, a selected radio, a switch that is on, a
268
+ selected row's checkbox) and the check drawn on it. Defaults to the primary pair; a theme whose primary
269
+ is a neutral ink can point the selection at an interaction hue, the way it does the focus ring. */
270
+ --u-selection-color: var(--u-primary-color);
271
+ --u-selection-txt-color: var(--u-primary-txt-color);
272
+
267
273
  /* Background Colors */
268
274
  --u-bg-color: var(--u-neutral-100);
269
275
  --u-bg-color-inverse: var(--u-neutral-0);
@@ -333,6 +333,12 @@
333
333
  ink can point it at an interaction hue instead. */
334
334
  --u-focus-ring-color: var(--u-primary-color-strong);
335
335
 
336
+ /* Selection — the mark of a chosen option (a checked checkbox, a selected radio, a switch that is on, a
337
+ selected row's checkbox) and the check drawn on it. Defaults to the primary pair; a theme whose primary
338
+ is a neutral ink can point the selection at an interaction hue, the way it does the focus ring. */
339
+ --u-selection-color: var(--u-primary-color);
340
+ --u-selection-txt-color: var(--u-primary-txt-color);
341
+
336
342
  /* Background Colors */
337
343
  --u-bg-color: var(--u-neutral-0);
338
344
  --u-bg-color-inverse: var(--u-neutral-900);
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": "2.23.2",
4
+ "version": "2.25.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -109,7 +109,8 @@ set on the host yourself always wins and is never overwritten.
109
109
  - [`u-menu`](./references/components/menu.md) — Menu container with keyboard navigation and selection modes
110
110
  - [`u-menu-item`](./references/components/menu.md) — Menu entry with optional sub-menu
111
111
  - [`u-tab-panel`](./references/components/tab-panel.md) — Tab-based content switcher
112
- - [`u-tab`](./references/components/tab-panel.md) — Individual tab button used inside `u-tab-panel`
112
+ - [`u-tab`](./references/components/tab-panel.md) — Individual tab button used inside `u-tab-panel`; with `href`, a link tab for `u-tab-nav`
113
+ - [`u-tab-nav`](./references/components/tab-nav.md) — Tab strip of links (saved views): a `<nav>` with `aria-current`, not a tablist
113
114
  - [`u-tree`](./references/components/tree.md) — Hierarchical tree with select, check, and drag-and-drop
114
115
  - [`u-tree-item`](./references/components/tree.md) — Individual node inside `u-tree`
115
116
 
@@ -17,8 +17,24 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
17
17
  Failed to load data.
18
18
  <u-button slot="footer" appearance="solid">Retry</u-button>
19
19
  </u-alert>
20
+
21
+ <!-- In the page flow (a callout, an error summary): fills its place, no floating shadow -->
22
+ <u-alert inline open status="info" title="Totals follow the filters above">
23
+ Clear a filter chip to widen them.
24
+ </u-alert>
25
+
26
+ <!-- A static note is not a live region: set the role, and swap the icon -->
27
+ <u-alert inline open status="notice" role="note" title="Note">
28
+ <u-icon slot="icon" lib="bootstrap" name="pencil"></u-icon>
29
+ Customer asked for the same cover as last year.
30
+ </u-alert>
20
31
  ```
21
32
 
33
+ Without `inline` the alert has the floating look a toast uses (content width, large shadow, scale transition) and
34
+ keeps its place while closed. `inline` is for an alert that sits in the page: it fills its container, drops the
35
+ shadow and the transition, and takes no space while closed. The role follows `status` (`error`/`warning` →
36
+ `alert`, otherwise `status`) unless you set one — a role you set is kept.
37
+
22
38
  ---
23
39
 
24
40
  ## Slots
@@ -27,6 +43,7 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
27
43
  |------|-------------|
28
44
  | *(default)* | Alert body content |
29
45
  | `footer` | Bottom area (e.g. action buttons) |
46
+ | `icon` | Replaces the status icon (e.g. a pencil on a note); left empty, the status icon shows |
30
47
 
31
48
  ## Properties
32
49
 
@@ -38,6 +55,7 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
38
55
  | `status` | `'error'\|'warning'\|'success'\|'info'\|'notice'` | — | ✓ | Status type; controls icon, color and role (`error`/`warning` are `role="alert"`). An outcome word, not a palette word — buttons and badges say `color="danger"`, an alert says `status="error"`; an unknown value renders as a neutral notice and warns in development, naming the likely word |
39
56
  | `title` | `string` | `''` | — | Title label. Left empty, the status name in the current locale is shown (`Locale.set('ko')` → 「오류」), not the raw status value |
40
57
  | `duration` | `number` | `0` | — | Auto-dismiss delay in ms; `0` disables |
58
+ | `inline` | `boolean` | `false` | ✓ | In the page flow: fills its container, no floating shadow or scale transition, no space while closed |
41
59
 
42
60
  ## Events
43
61
 
@@ -20,8 +20,19 @@ Content card with optional media, header, body, and footer sections.
20
20
  <img slot="media" src="/thumb.jpg" />
21
21
  <p>Horizontal layout card.</p>
22
22
  </u-card>
23
+
24
+ <!-- The whole card is a link -->
25
+ <u-card href="/orders/42" aria-label="Order 42">
26
+ <span slot="header">Order 42</span>
27
+ <p>Due Oct 20 · 3 items</p>
28
+ </u-card>
23
29
  ```
24
30
 
31
+ **A card that is a link (`href`).** The outer box renders as an `<a>`: the text stays ink with no underline, the
32
+ border carries hover, and the card does not lift (a lifting card shakes a grid row). Keep other interactive elements
33
+ — buttons, links — out of a link card; an `<a>` cannot contain them. The link's accessible name is all of the card's
34
+ text unless the host has an `aria-label`, which moves to the link.
35
+
25
36
  ---
26
37
 
27
38
  ## Slots
@@ -41,12 +52,16 @@ Content card with optional media, header, body, and footer sections.
41
52
  | `shadowless` | `boolean` | `false` | ✓ | Remove drop shadow |
42
53
  | `appearance` | `'outlined'\|'plain'` | `'outlined'` | ✓ | `outlined` border and drop shadow · `plain` no border and no shadow (layout only) |
43
54
  | `hoverable` | `boolean` | `false` | ✓ | Lift effect on hover |
55
+ | `href` | `string` | — | ✓ | Makes the whole card a link to this URL |
56
+ | `target` | `string` | — | | Link target (with `href`) |
57
+ | `rel` | `string` | — | | Link relationship (with `href`) |
58
+ | `download` | `string` | — | | Download file name (with `href`) |
44
59
 
45
60
  ## CSS Parts
46
61
 
47
62
  | Part | Description |
48
63
  |------|-------------|
49
- | `base` | Outer card box |
64
+ | `base` | Outer card box — the `<a>` when `href` is set |
50
65
  | `media` | Media area wrapper |
51
66
  | `content` | Full content wrapper (header + body + footer) |
52
67
  | `header` | Header slot wrapper |