@iyulab/components 2.8.0 → 2.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.9.0] - 2026-10-07
4
+
5
+ ### Added
6
+
7
+ - **`u-input` `chars`** — the number of characters the field holds. An unsized field (the default `inline-block`) draws
8
+ at N characters plus its suffix icons and padding, so "a 12-digit number box" no longer needs a `calc()` that copies
9
+ the field's icon boxes and padding (and drifts when the host target floor changes). In a sized field it is the text
10
+ floor. Native `<input size>` / CSS `field-sizing` axis — `size` is already this component's sm/md/lg scale.
11
+ - `AlertDialogOptions.confirmLabel` and the locale key `ok` (en `OK`, ko `확인`, es `Aceptar` …).
12
+
13
+ ### Fixed
14
+
15
+ - **`Dialog.alert` has an OK button**, focused when it opens — like a native `alert()`. It opened with no button at
16
+ all, so it closed only by Esc or a backdrop click (neither visible), and the `alertdialog` had nowhere for focus to
17
+ go (WAI-ARIA APG Alert Dialog).
18
+
3
19
  ## [2.8.0] - 2026-10-07
4
20
 
5
21
  ### Added
@@ -57,6 +57,7 @@ var closeTab = "إغلاق علامة التبويب";
57
57
  var breadcrumb = "مسار التنقل";
58
58
  var confirm = "تأكيد";
59
59
  var cancel = "إلغاء";
60
+ var ok = "حسنًا";
60
61
  var stepComplete = "مكتمل";
61
62
  var stepOnHold = "معلّق";
62
63
  var apply = "تطبيق";
@@ -122,6 +123,7 @@ var ar_default = {
122
123
  breadcrumb,
123
124
  confirm,
124
125
  cancel,
126
+ ok,
125
127
  stepComplete,
126
128
  stepOnHold,
127
129
  apply,
@@ -132,4 +134,4 @@ var ar_default = {
132
134
  timePm: "م"
133
135
  };
134
136
  //#endregion
135
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ar_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
137
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ar_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -122,6 +122,7 @@ var de_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -122,6 +122,7 @@ var en_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -56,6 +56,7 @@ var closeTab = "Cerrar pestaña";
56
56
  var breadcrumb = "Ruta de navegación";
57
57
  var confirm = "Confirmar";
58
58
  var cancel = "Cancelar";
59
+ var ok = "Aceptar";
59
60
  var stepComplete = "Completado";
60
61
  var stepOnHold = "En espera";
61
62
  var apply = "Aplicar";
@@ -123,6 +124,7 @@ var es_default = {
123
124
  breadcrumb,
124
125
  confirm,
125
126
  cancel,
127
+ ok,
126
128
  stepComplete,
127
129
  stepOnHold,
128
130
  apply,
@@ -133,4 +135,4 @@ var es_default = {
133
135
  timePm
134
136
  };
135
137
  //#endregion
136
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, es_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
138
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, es_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -122,6 +122,7 @@ var fr_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -122,6 +122,7 @@ var id_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -123,6 +123,7 @@ var ja_default = {
123
123
  breadcrumb,
124
124
  confirm: "OK",
125
125
  cancel,
126
+ ok: "OK",
126
127
  stepComplete,
127
128
  stepOnHold,
128
129
  apply,
@@ -57,6 +57,7 @@ var closeTab = "탭 닫기";
57
57
  var breadcrumb = "탐색 경로";
58
58
  var confirm = "확인";
59
59
  var cancel = "취소";
60
+ var ok = "확인";
60
61
  var stepComplete = "완료";
61
62
  var stepOnHold = "보류";
62
63
  var apply = "적용";
@@ -124,6 +125,7 @@ var ko_default = {
124
125
  breadcrumb,
125
126
  confirm,
126
127
  cancel,
128
+ ok,
127
129
  stepComplete,
128
130
  stepOnHold,
129
131
  apply,
@@ -134,4 +136,4 @@ var ko_default = {
134
136
  timePm
135
137
  };
136
138
  //#endregion
137
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ko_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
139
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ko_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -122,6 +122,7 @@ var pt_BR_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -57,6 +57,7 @@ var closeTab = "Закрыть вкладку";
57
57
  var breadcrumb = "Навигационная цепочка";
58
58
  var confirm = "Подтвердить";
59
59
  var cancel = "Отмена";
60
+ var ok = "ОК";
60
61
  var stepComplete = "Завершено";
61
62
  var stepOnHold = "Приостановлено";
62
63
  var apply = "Применить";
@@ -122,6 +123,7 @@ var ru_default = {
122
123
  breadcrumb,
123
124
  confirm,
124
125
  cancel,
126
+ ok,
125
127
  stepComplete,
126
128
  stepOnHold,
127
129
  apply,
@@ -132,4 +134,4 @@ var ru_default = {
132
134
  timePm: "PM"
133
135
  };
134
136
  //#endregion
135
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ru_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
137
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, ru_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -57,6 +57,7 @@ var closeTab = "ปิดแท็บ";
57
57
  var breadcrumb = "เส้นทางการนำทาง";
58
58
  var confirm = "ยืนยัน";
59
59
  var cancel = "ยกเลิก";
60
+ var ok = "ตกลง";
60
61
  var stepComplete = "เสร็จสิ้น";
61
62
  var stepOnHold = "พักไว้";
62
63
  var apply = "นำไปใช้";
@@ -124,6 +125,7 @@ var th_default = {
124
125
  breadcrumb,
125
126
  confirm,
126
127
  cancel,
128
+ ok,
127
129
  stepComplete,
128
130
  stepOnHold,
129
131
  apply,
@@ -134,4 +136,4 @@ var th_default = {
134
136
  timePm
135
137
  };
136
138
  //#endregion
137
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, th_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
139
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, th_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -122,6 +122,7 @@ var vi_default = {
122
122
  breadcrumb,
123
123
  confirm,
124
124
  cancel,
125
+ ok: "OK",
125
126
  stepComplete,
126
127
  stepOnHold,
127
128
  apply,
@@ -57,6 +57,7 @@ var closeTab = "关闭标签页";
57
57
  var breadcrumb = "面包屑导航";
58
58
  var confirm = "确定";
59
59
  var cancel = "取消";
60
+ var ok = "确定";
60
61
  var stepComplete = "已完成";
61
62
  var stepOnHold = "已暂停";
62
63
  var apply = "应用";
@@ -124,6 +125,7 @@ var zh_CN_default = {
124
125
  breadcrumb,
125
126
  confirm,
126
127
  cancel,
128
+ ok,
127
129
  stepComplete,
128
130
  stepOnHold,
129
131
  apply,
@@ -134,4 +136,4 @@ var zh_CN_default = {
134
136
  timePm
135
137
  };
136
138
  //#endregion
137
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, zh_CN_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
139
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, zh_CN_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -57,6 +57,7 @@ var closeTab = "關閉分頁";
57
57
  var breadcrumb = "麵包屑導覽";
58
58
  var confirm = "確定";
59
59
  var cancel = "取消";
60
+ var ok = "確定";
60
61
  var stepComplete = "已完成";
61
62
  var stepOnHold = "已暫停";
62
63
  var apply = "套用";
@@ -124,6 +125,7 @@ var zh_TW_default = {
124
125
  breadcrumb,
125
126
  confirm,
126
127
  cancel,
128
+ ok,
127
129
  stepComplete,
128
130
  stepOnHold,
129
131
  apply,
@@ -134,4 +136,4 @@ var zh_TW_default = {
134
136
  timePm
135
137
  };
136
138
  //#endregion
137
- export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, zh_TW_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
139
+ export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, apply, badInput, breadcrumb, cancel, carousel, chooseDate, chooseDateRange, chooseFile, clear, close, closeTab, confirm, copied, copy, dateUnavailable, decrement, zh_TW_default as default, endTime, filesSelected, goToSlide, hidePassword, increment, last30Days, last7Days, lastMonth, lastWeek, loading, nextMonth, nextSlide, noFileChosen, ok, patternMismatch, previousMonth, previousSlide, quickRanges, rangeOverflow, rangeStartChosen, rangeUnderflow, remove, resizePanels, search, showPassword, slide, slideOf, startSlideRotation, startTime, stepComplete, stepMismatch, stepOnHold, stopSlideRotation, thisMonth, thisWeek, thisYear, time, timeAm, timePm, today, tooLong, tooShort, typeMismatch, valueMissing, yesterday };
@@ -90,6 +90,12 @@ export declare class UInput extends UFormControlElement<string> {
90
90
  */
91
91
  size: FieldSize;
92
92
  /** placeholder 텍스트 */
93
+ /**
94
+ * 칸이 담을 글자 수 — 지정하면 폭을 정하지 않은 칸(기본 `inline-block`)이 «N자 + 접미 아이콘 + 패딩» 폭으로 그려지고,
95
+ * 그보다 좁게 주면 넘친다(글자 영역 하한이 N자가 된다). 네이티브 `<input size>`·CSS `field-sizing` 과 같은 축이다 —
96
+ * `size` 는 이 컴포넌트에서 크기 단(sm·md·lg)이라 이름이 다르다. 폭을 준 칸(`width`·`block`)에서는 하한으로만 쓴다.
97
+ */
98
+ chars?: number;
93
99
  placeholder?: string;
94
100
  /** 유효성 검사 패턴 (정규식) */
95
101
  pattern?: string;
@@ -115,6 +121,8 @@ export declare class UInput extends UFormControlElement<string> {
115
121
  * `string`이라 `valueAsString` 같은 변환 없이 그대로 넘긴다. */
116
122
  protected willUpdate(changedProperties: PropertyValues): void;
117
123
  protected updated(changedProperties: PropertyValues): void;
124
+ /** `chars` 를 CSS 길이로 — 양의 정수일 때만(그 밖은 지정 없음과 같다). */
125
+ private get charsWidth();
118
126
  /** The shown number uses the locale's decimal separator — re-show it in the new locale (unless the user is typing in it). */
119
127
  protected localeChanged(): void;
120
128
  /** Canonical `value` → the text shown: the locale's decimal separator, no grouping inserted. */
@@ -194,11 +194,12 @@ var UInput = class UInput extends UFormControlElement {
194
194
  .validationMessage=${this.validationMessage}
195
195
  >
196
196
  <div class="container" part="container"
197
- style=${`--_icons: ${(showStepper ? 2 : 0) + (showClear ? 1 : 0) + (showToggle ? 1 : 0)}`}>
197
+ style=${`--_icons: ${(showStepper ? 2 : 0) + (showClear ? 1 : 0) + (showToggle ? 1 : 0)}${this.charsWidth ? `; --input-min-text: ${this.charsWidth}` : ""}`}>
198
198
 
199
199
  <slot name="prefix"></slot>
200
200
 
201
201
  <input part="input"
202
+ style=${ifDefined(this.charsWidth ? `inline-size: ${this.charsWidth}` : void 0)}
202
203
  type=${isNumber || this.type === "password" && this.showPassword ? "text" : this.type}
203
204
  aria-label=${ifDefined(this.resolvedAriaLabel)}
204
205
  aria-description=${ifDefined(this.resolvedAriaDescription)}
@@ -305,6 +306,11 @@ var UInput = class UInput extends UFormControlElement {
305
306
  super.updated(changedProperties);
306
307
  if (changedProperties.has("value")) this.internals?.setFormValue(this.value ?? "");
307
308
  }
309
+ /** `chars` 를 CSS 길이로 — 양의 정수일 때만(그 밖은 지정 없음과 같다). */
310
+ get charsWidth() {
311
+ const n = this.chars;
312
+ return n != null && Number.isFinite(n) && n > 0 ? `${Math.ceil(n)}ch` : void 0;
313
+ }
308
314
  /** The shown number uses the locale's decimal separator — re-show it in the new locale (unless the user is typing in it). */
309
315
  localeChanged() {
310
316
  if (this.type === "number" && this.shadowRoot?.activeElement !== this.inputEl) this.numberText = this.displayNumber(this.value ?? "");
@@ -515,6 +521,10 @@ __decorate([property({
515
521
  type: String,
516
522
  reflect: true
517
523
  }), __decorateMetadata("design:type", Object)], UInput.prototype, "size", void 0);
524
+ __decorate([property({
525
+ type: Number,
526
+ reflect: true
527
+ }), __decorateMetadata("design:type", Number)], UInput.prototype, "chars", void 0);
518
528
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UInput.prototype, "placeholder", void 0);
519
529
  __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UInput.prototype, "pattern", void 0);
520
530
  __decorate([query(".container", true), __decorateMetadata("design:type", typeof HTMLDivElement === "undefined" ? Object : HTMLDivElement)], UInput.prototype, "containerEl", void 0);
@@ -21,6 +21,10 @@ export interface DialogOptions {
21
21
  backdropClose?: boolean;
22
22
  }
23
23
  /** Confirm Dialog 옵션 */
24
+ export interface AlertDialogOptions extends DialogOptions {
25
+ /** 닫는 버튼의 글자 (기본값: 로케일의 «확인»/`OK`) */
26
+ confirmLabel?: string;
27
+ }
24
28
  export interface ConfirmDialogOptions extends DialogOptions {
25
29
  /** 확인 버튼 텍스트 (기본: 현재 로케일의 `confirm` — 영어는 'Confirm') */
26
30
  confirmLabel?: string;
@@ -71,7 +75,7 @@ export declare class Dialog {
71
75
  * @param message 본문 — **문자열은 글자로** 그린다(사용자 입력을 넣어도 마크업이 되지 않는다). 서식이 필요하면
72
76
  * `TemplateResult`(`html\`…\``)를 넘긴다. HTML 문자열은 그것을 명시한 `show({ content })` 로만.
73
77
  */
74
- static alert(message: string | TemplateResult, options?: DialogOptions): Promise<void>;
78
+ static alert(message: string | TemplateResult, options?: AlertDialogOptions): Promise<void>;
75
79
  /**
76
80
  * 확인 다이얼로그를 표시합니다. (확인/취소 버튼)
77
81
  * @param message 본문 — **문자열은 글자로** 그린다(`alert` 와 같다). 서식은 `TemplateResult` 로.
@@ -44,7 +44,11 @@ var Dialog = class {
44
44
  const messageId = nextMessageId();
45
45
  await this.present({
46
46
  ...options,
47
- content: asText(message, messageId)
47
+ content: asText(message, messageId),
48
+ actions: [{
49
+ label: options?.confirmLabel || Locale.getValue("ok"),
50
+ value: "ok"
51
+ }]
48
52
  }, (dialog) => describe(dialog, messageId, "alertdialog"));
49
53
  }
50
54
  /**
@@ -12,7 +12,7 @@ export type SupportedLocale = 'en' | 'ko' | 'ja' | 'zh-CN' | 'zh-TW' | 'es' | 'f
12
12
  /** 내장 로케일은 자동완성되지만, 임의의 BCP47 태그도 그대로 받는다. */
13
13
  export type LocaleTag = SupportedLocale | (string & {});
14
14
  /** 라이브러리가 제공하는 chrome 문자열 키. 지금은 검증 메시지뿐이지만 이후 다른 UI 문구도 추가될 수 있다. */
15
- export type LocaleMessageKey = 'valueMissing' | 'badInput' | 'typeMismatch' | 'patternMismatch' | 'rangeUnderflow' | 'rangeOverflow' | 'stepMismatch' | 'tooShort' | 'tooLong' | 'increment' | 'decrement' | 'clear' | 'today' | 'time' | 'showPassword' | 'hidePassword' | 'previousSlide' | 'nextSlide' | 'goToSlide' | 'carousel' | 'slide' | 'slideOf' | 'stopSlideRotation' | 'startSlideRotation' | 'chooseDate' | 'chooseDateRange' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'thisYear' | 'quickRanges' | 'rangeStartChosen' | 'previousMonth' | 'nextMonth' | 'close' | 'copy' | 'copied' | 'chooseFile' | 'noFileChosen' | 'filesSelected' | 'resizePanels' | 'loading' | 'breadcrumb' | 'search' | 'alertError' | 'alertWarning' | 'alertSuccess' | 'alertInfo' | 'alertNotice' | 'alertMessage' | 'remove' | 'closeTab' | 'confirm' | 'cancel' | 'stepComplete' | 'stepOnHold' | 'apply' | 'dateUnavailable' | 'startTime' | 'endTime' | 'timeAm' | 'timePm';
15
+ export type LocaleMessageKey = 'valueMissing' | 'badInput' | 'typeMismatch' | 'patternMismatch' | 'rangeUnderflow' | 'rangeOverflow' | 'stepMismatch' | 'tooShort' | 'tooLong' | 'increment' | 'decrement' | 'clear' | 'today' | 'time' | 'showPassword' | 'hidePassword' | 'previousSlide' | 'nextSlide' | 'goToSlide' | 'carousel' | 'slide' | 'slideOf' | 'stopSlideRotation' | 'startSlideRotation' | 'chooseDate' | 'chooseDateRange' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'thisYear' | 'quickRanges' | 'rangeStartChosen' | 'previousMonth' | 'nextMonth' | 'close' | 'copy' | 'copied' | 'chooseFile' | 'noFileChosen' | 'filesSelected' | 'resizePanels' | 'loading' | 'breadcrumb' | 'search' | 'alertError' | 'alertWarning' | 'alertSuccess' | 'alertInfo' | 'alertNotice' | 'alertMessage' | 'remove' | 'closeTab' | 'confirm' | 'cancel' | 'ok' | 'stepComplete' | 'stepOnHold' | 'apply' | 'dateUnavailable' | 'startTime' | 'endTime' | 'timeAm' | 'timePm';
16
16
  type LocaleTable = Record<LocaleMessageKey, string>;
17
17
  /**
18
18
  * 한 패키지(또는 앱 영역)의 문자열 묶음.
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.8.0",
4
+ "version": "2.9.0",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -57,6 +57,7 @@ the library does not infer one from field meaning.
57
57
  | `appearance` | `'outlined'\|'soft'\|'underlined'\|'plain'` | `'outlined'` | ✓ | How much chrome: `outlined` · `soft` tinted face · `underlined` bottom line only · `plain` no chrome |
58
58
  | `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Field size, like a button's: 12px · `--u-density` (14px) · 16px. A field and a button of the same size share a height |
59
59
  | `type` | `'text'\|'password'\|'email'\|'tel'\|'url'\|'search'\|'number'\|'date'\|'time'`… | `'text'` | — | Input type |
60
+ | `chars` | `number` | — | ✓ | Characters the field holds. An unsized field draws at N characters + its suffix icons + padding; a sized one (`width`, `block`) uses it as the text floor, so a narrower box overflows. Not `size` — that is the sm/md/lg scale |
60
61
  | `placeholder` | `string` | — | — | Placeholder text |
61
62
  | `clearable` | `boolean` | `false` | ✓ | Show clear button |
62
63
  | `minlength` | `number` | — | — | Minimum character count |
@@ -40,7 +40,7 @@ const result = await Dialog.show({
40
40
 
41
41
  | Method | Returns | Description |
42
42
  |--------|---------|-------------|
43
- | `Dialog.alert(message, options?)` | `Promise<void>` | Informational alert |
43
+ | `Dialog.alert(message, options?)` | `Promise<void>` | Informational alert with one OK button (focused on open) |
44
44
  | `Dialog.confirm(message, options?)` | `Promise<boolean>` | Confirm / Cancel dialog |
45
45
  | `Dialog.prompt(message, options?)` | `Promise<string \| null>` | Text input dialog |
46
46
  | `Dialog.show(options)` | `Promise<string \| null>` | Custom dialog; resolves with clicked action `value` |
@@ -70,6 +70,10 @@ interface DialogOptions {
70
70
  backdropClose?: boolean; // close on backdrop click — default: true
71
71
  }
72
72
 
73
+ interface AlertDialogOptions extends DialogOptions {
74
+ confirmLabel?: string; // the OK button — default: the active locale's `ok` (en: 'OK', ko: '확인')
75
+ }
76
+
73
77
  interface ConfirmDialogOptions extends DialogOptions {
74
78
  confirmLabel?: string; // default: the active locale's `confirm` (en: 'Confirm')
75
79
  cancelLabel?: string; // default: the active locale's `cancel` (en: 'Cancel')