@iyulab/components 1.41.1 → 1.42.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 +46 -0
- package/dist/assets/locales/ar.json.js +18 -2
- package/dist/assets/locales/de.json.js +18 -2
- package/dist/assets/locales/en.json.js +18 -2
- package/dist/assets/locales/es.json.js +18 -2
- package/dist/assets/locales/fr.json.js +18 -2
- package/dist/assets/locales/id.json.js +18 -2
- package/dist/assets/locales/ja.json.js +18 -2
- package/dist/assets/locales/ko.json.js +18 -2
- package/dist/assets/locales/pt-BR.json.js +18 -2
- package/dist/assets/locales/ru.json.js +18 -2
- package/dist/assets/locales/th.json.js +18 -2
- package/dist/assets/locales/vi.json.js +18 -2
- package/dist/assets/locales/zh-CN.json.js +18 -2
- package/dist/assets/locales/zh-TW.json.js +18 -2
- package/dist/components/alert/UAlert.d.ts +25 -2
- package/dist/components/alert/UAlert.js +46 -2
- package/dist/components/chip/UChip.js +2 -1
- package/dist/components/panel/UPanel.styles.js +12 -0
- package/dist/components/tab/UTab.js +2 -1
- package/dist/index.js +2 -2
- package/dist/plugins/vite-plugin-react-wrapper.d.ts +14 -0
- package/dist/plugins/vite-plugin-react-wrapper.js +9 -4
- package/dist/utilities/Locale.d.ts +1 -1
- package/package.json +1 -1
- package/skills/iyulab-components/references/components/alert.md +1 -1
- package/skills/iyulab-components/references/components/panel.md +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.42.1] - 2026-09-17
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`u-panel` no longer adds a trailing blank page when printed.** Its `overflow: auto` makes it a
|
|
8
|
+
scroll container, which keeps the bottom margin of its last block inside the panel, so the panel
|
|
9
|
+
grew by that margin; content ending just short of a page boundary then spilled onto a page
|
|
10
|
+
holding only the margin. In print media the panel now uses `overflow: visible`, letting the
|
|
11
|
+
margin collapse past it and be truncated at the page break. Screen behavior is unchanged.
|
|
12
|
+
|
|
13
|
+
## [1.42.0] - 2026-09-17
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **Two icon-only controls named themselves in English regardless of the locale.** `u-chip`'s remove
|
|
18
|
+
button and `u-tab`'s close button carried a hard-coded `aria-label`, so on a Korean app a
|
|
19
|
+
screen-reader user heard "Remove" and "Close tab" while everything around them was translated.
|
|
20
|
+
These controls have no visible text, so the gap could not show up in a visual review — only
|
|
21
|
+
someone using assistive technology would meet it. Both names now come from the locale table, with
|
|
22
|
+
`remove` and `closeTab` added for all fourteen built-in locales.
|
|
23
|
+
- **`u-alert` fell back to the raw status value as its title, which is not a word in any locale.**
|
|
24
|
+
An alert written without a `title` showed `ERROR` or `DANGER` in the title row regardless of the
|
|
25
|
+
locale in effect, so a Korean screen carried uppercase English — one such screen reached a
|
|
26
|
+
customer in a printed manual. The same component's close button has always gone through `Locale`,
|
|
27
|
+
so the locale layer was not missing, only unused in this one place. The default title now comes
|
|
28
|
+
from the locale table (`오류` / `Error` / `エラー` …), with entries added for all fourteen built-in
|
|
29
|
+
locales, and a consumer-supplied `title` still wins.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **`u-alert` warns once in development when `status` is not one of the five known values.** An
|
|
34
|
+
unknown value renders as a neutral notice with the bell icon and `role="status"` — so an alert
|
|
35
|
+
meant to report an error looks like an ordinary message and nothing says otherwise. Types cannot
|
|
36
|
+
catch this, because attributes set in HTML or produced by a server carry no type. `ALERT_STATUSES`
|
|
37
|
+
is now exported so the runtime check and the type read the same list.
|
|
38
|
+
|
|
39
|
+
- **`reactWrapper({ reexport })`** — the generated React barrel can now re-export additional module
|
|
40
|
+
specifiers alongside the wrappers it generates. A package that keeps a few hand-written wrappers
|
|
41
|
+
(for a generic property or a custom event mapping the generator cannot derive) previously had to
|
|
42
|
+
publish them on a separate subpath, which left consumers with a barrel that was *not* a superset
|
|
43
|
+
of the per-component subpaths: what you got depended on which specifier you reached for. Passing
|
|
44
|
+
the hand-written module here folds it into the same barrel, so one specifier carries everything.
|
|
45
|
+
Give a package specifier rather than a relative path — a relative path bypasses the `exports` map,
|
|
46
|
+
which in a workspace makes the barrel load a different copy of the elements than the rest of the
|
|
47
|
+
package and registers the same tag twice.
|
|
48
|
+
|
|
3
49
|
## [1.41.1] - 2026-09-16
|
|
4
50
|
|
|
5
51
|
### Fixed
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "لم يتم اختيار أي ملف";
|
|
|
29
29
|
var filesSelected = "تم اختيار {count} ملفات";
|
|
30
30
|
var resizePanels = "تغيير حجم اللوحات";
|
|
31
31
|
var search = "بحث";
|
|
32
|
+
var alertError = "خطأ";
|
|
33
|
+
var alertWarning = "تحذير";
|
|
34
|
+
var alertSuccess = "نجاح";
|
|
35
|
+
var alertInfo = "معلومات";
|
|
36
|
+
var alertNotice = "إشعار";
|
|
37
|
+
var alertMessage = "رسالة";
|
|
38
|
+
var remove = "إزالة";
|
|
39
|
+
var closeTab = "إغلاق علامة التبويب";
|
|
32
40
|
var ar_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var ar_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, ar_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, ar_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Keine Datei ausgewählt";
|
|
|
29
29
|
var filesSelected = "{count} Dateien ausgewählt";
|
|
30
30
|
var resizePanels = "Bereichsgröße ändern";
|
|
31
31
|
var search = "Suchen";
|
|
32
|
+
var alertError = "Fehler";
|
|
33
|
+
var alertWarning = "Warnung";
|
|
34
|
+
var alertSuccess = "Erfolg";
|
|
35
|
+
var alertInfo = "Information";
|
|
36
|
+
var alertNotice = "Hinweis";
|
|
37
|
+
var alertMessage = "Nachricht";
|
|
38
|
+
var remove = "Entfernen";
|
|
39
|
+
var closeTab = "Tab schließen";
|
|
32
40
|
var de_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var de_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, de_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, de_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "No file chosen";
|
|
|
29
29
|
var filesSelected = "{count} files selected";
|
|
30
30
|
var resizePanels = "Resize panels";
|
|
31
31
|
var search = "Search";
|
|
32
|
+
var alertError = "Error";
|
|
33
|
+
var alertWarning = "Warning";
|
|
34
|
+
var alertSuccess = "Success";
|
|
35
|
+
var alertInfo = "Information";
|
|
36
|
+
var alertNotice = "Notice";
|
|
37
|
+
var alertMessage = "Message";
|
|
38
|
+
var remove = "Remove";
|
|
39
|
+
var closeTab = "Close tab";
|
|
32
40
|
var en_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var en_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, en_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, en_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -28,6 +28,14 @@ var noFileChosen = "Ningún archivo elegido";
|
|
|
28
28
|
var filesSelected = "{count} archivos seleccionados";
|
|
29
29
|
var resizePanels = "Cambiar el tamaño de los paneles";
|
|
30
30
|
var search = "Buscar";
|
|
31
|
+
var alertError = "Error";
|
|
32
|
+
var alertWarning = "Advertencia";
|
|
33
|
+
var alertSuccess = "Éxito";
|
|
34
|
+
var alertInfo = "Información";
|
|
35
|
+
var alertNotice = "Aviso";
|
|
36
|
+
var alertMessage = "Mensaje";
|
|
37
|
+
var remove = "Quitar";
|
|
38
|
+
var closeTab = "Cerrar pestaña";
|
|
31
39
|
var es_default = {
|
|
32
40
|
valueMissing,
|
|
33
41
|
badInput,
|
|
@@ -58,7 +66,15 @@ var es_default = {
|
|
|
58
66
|
noFileChosen,
|
|
59
67
|
filesSelected,
|
|
60
68
|
resizePanels,
|
|
61
|
-
search
|
|
69
|
+
search,
|
|
70
|
+
alertError,
|
|
71
|
+
alertWarning,
|
|
72
|
+
alertSuccess,
|
|
73
|
+
alertInfo,
|
|
74
|
+
alertNotice,
|
|
75
|
+
alertMessage,
|
|
76
|
+
remove,
|
|
77
|
+
closeTab
|
|
62
78
|
};
|
|
63
79
|
//#endregion
|
|
64
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, es_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, tooLong, tooShort, typeMismatch, valueMissing };
|
|
80
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, es_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Aucun fichier choisi";
|
|
|
29
29
|
var filesSelected = "{count} fichiers sélectionnés";
|
|
30
30
|
var resizePanels = "Redimensionner les panneaux";
|
|
31
31
|
var search = "Rechercher";
|
|
32
|
+
var alertError = "Erreur";
|
|
33
|
+
var alertWarning = "Avertissement";
|
|
34
|
+
var alertSuccess = "Succès";
|
|
35
|
+
var alertInfo = "Information";
|
|
36
|
+
var alertNotice = "Avis";
|
|
37
|
+
var alertMessage = "Message";
|
|
38
|
+
var remove = "Supprimer";
|
|
39
|
+
var closeTab = "Fermer l'onglet";
|
|
32
40
|
var fr_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var fr_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, fr_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, fr_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Tidak ada berkas dipilih";
|
|
|
29
29
|
var filesSelected = "{count} berkas dipilih";
|
|
30
30
|
var resizePanels = "Ubah ukuran panel";
|
|
31
31
|
var search = "Cari";
|
|
32
|
+
var alertError = "Kesalahan";
|
|
33
|
+
var alertWarning = "Peringatan";
|
|
34
|
+
var alertSuccess = "Berhasil";
|
|
35
|
+
var alertInfo = "Informasi";
|
|
36
|
+
var alertNotice = "Pemberitahuan";
|
|
37
|
+
var alertMessage = "Pesan";
|
|
38
|
+
var remove = "Hapus";
|
|
39
|
+
var closeTab = "Tutup tab";
|
|
32
40
|
var id_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var id_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, id_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, id_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "ファイルが選択されていません";
|
|
|
29
29
|
var filesSelected = "{count}個のファイルを選択しました";
|
|
30
30
|
var resizePanels = "パネルのサイズ変更";
|
|
31
31
|
var search = "検索";
|
|
32
|
+
var alertError = "エラー";
|
|
33
|
+
var alertWarning = "警告";
|
|
34
|
+
var alertSuccess = "完了";
|
|
35
|
+
var alertInfo = "お知らせ";
|
|
36
|
+
var alertNotice = "通知";
|
|
37
|
+
var alertMessage = "メッセージ";
|
|
38
|
+
var remove = "削除";
|
|
39
|
+
var closeTab = "タブを閉じる";
|
|
32
40
|
var ja_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var ja_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, ja_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, ja_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "선택된 파일 없음";
|
|
|
29
29
|
var filesSelected = "{count}개 파일 선택됨";
|
|
30
30
|
var resizePanels = "패널 크기 조절";
|
|
31
31
|
var search = "검색";
|
|
32
|
+
var alertError = "오류";
|
|
33
|
+
var alertWarning = "경고";
|
|
34
|
+
var alertSuccess = "완료";
|
|
35
|
+
var alertInfo = "안내";
|
|
36
|
+
var alertNotice = "알림";
|
|
37
|
+
var alertMessage = "메시지";
|
|
38
|
+
var remove = "제거";
|
|
39
|
+
var closeTab = "탭 닫기";
|
|
32
40
|
var ko_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var ko_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, ko_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, ko_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Nenhum arquivo escolhido";
|
|
|
29
29
|
var filesSelected = "{count} arquivos selecionados";
|
|
30
30
|
var resizePanels = "Redimensionar painéis";
|
|
31
31
|
var search = "Pesquisar";
|
|
32
|
+
var alertError = "Erro";
|
|
33
|
+
var alertWarning = "Aviso";
|
|
34
|
+
var alertSuccess = "Sucesso";
|
|
35
|
+
var alertInfo = "Informação";
|
|
36
|
+
var alertNotice = "Nota";
|
|
37
|
+
var alertMessage = "Mensagem";
|
|
38
|
+
var remove = "Remover";
|
|
39
|
+
var closeTab = "Fechar aba";
|
|
32
40
|
var pt_BR_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var pt_BR_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, pt_BR_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, pt_BR_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Файл не выбран";
|
|
|
29
29
|
var filesSelected = "Выбрано файлов: {count}";
|
|
30
30
|
var resizePanels = "Изменить размер панелей";
|
|
31
31
|
var search = "Поиск";
|
|
32
|
+
var alertError = "Ошибка";
|
|
33
|
+
var alertWarning = "Предупреждение";
|
|
34
|
+
var alertSuccess = "Успешно";
|
|
35
|
+
var alertInfo = "Информация";
|
|
36
|
+
var alertNotice = "Уведомление";
|
|
37
|
+
var alertMessage = "Сообщение";
|
|
38
|
+
var remove = "Удалить";
|
|
39
|
+
var closeTab = "Закрыть вкладку";
|
|
32
40
|
var ru_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var ru_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, ru_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, ru_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "ยังไม่ได้เลือกไฟล์";
|
|
|
29
29
|
var filesSelected = "เลือกแล้ว {count} ไฟล์";
|
|
30
30
|
var resizePanels = "ปรับขนาดแผง";
|
|
31
31
|
var search = "ค้นหา";
|
|
32
|
+
var alertError = "ข้อผิดพลาด";
|
|
33
|
+
var alertWarning = "คำเตือน";
|
|
34
|
+
var alertSuccess = "สำเร็จ";
|
|
35
|
+
var alertInfo = "ข้อมูล";
|
|
36
|
+
var alertNotice = "ประกาศ";
|
|
37
|
+
var alertMessage = "ข้อความ";
|
|
38
|
+
var remove = "ลบ";
|
|
39
|
+
var closeTab = "ปิดแท็บ";
|
|
32
40
|
var th_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var th_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, th_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, th_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "Chưa chọn tệp nào";
|
|
|
29
29
|
var filesSelected = "Đã chọn {count} tệp";
|
|
30
30
|
var resizePanels = "Thay đổi kích thước bảng";
|
|
31
31
|
var search = "Tìm kiếm";
|
|
32
|
+
var alertError = "Lỗi";
|
|
33
|
+
var alertWarning = "Cảnh báo";
|
|
34
|
+
var alertSuccess = "Thành công";
|
|
35
|
+
var alertInfo = "Thông tin";
|
|
36
|
+
var alertNotice = "Lưu ý";
|
|
37
|
+
var alertMessage = "Thông báo";
|
|
38
|
+
var remove = "Xóa";
|
|
39
|
+
var closeTab = "Đóng tab";
|
|
32
40
|
var vi_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var vi_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, vi_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, vi_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "未选择文件";
|
|
|
29
29
|
var filesSelected = "已选择{count}个文件";
|
|
30
30
|
var resizePanels = "调整面板大小";
|
|
31
31
|
var search = "搜索";
|
|
32
|
+
var alertError = "错误";
|
|
33
|
+
var alertWarning = "警告";
|
|
34
|
+
var alertSuccess = "成功";
|
|
35
|
+
var alertInfo = "信息";
|
|
36
|
+
var alertNotice = "提示";
|
|
37
|
+
var alertMessage = "消息";
|
|
38
|
+
var remove = "移除";
|
|
39
|
+
var closeTab = "关闭标签页";
|
|
32
40
|
var zh_CN_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var zh_CN_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, zh_CN_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, zh_CN_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -29,6 +29,14 @@ var noFileChosen = "未選擇檔案";
|
|
|
29
29
|
var filesSelected = "已選擇{count}個檔案";
|
|
30
30
|
var resizePanels = "調整面板大小";
|
|
31
31
|
var search = "搜尋";
|
|
32
|
+
var alertError = "錯誤";
|
|
33
|
+
var alertWarning = "警告";
|
|
34
|
+
var alertSuccess = "成功";
|
|
35
|
+
var alertInfo = "資訊";
|
|
36
|
+
var alertNotice = "提示";
|
|
37
|
+
var alertMessage = "訊息";
|
|
38
|
+
var remove = "移除";
|
|
39
|
+
var closeTab = "關閉分頁";
|
|
32
40
|
var zh_TW_default = {
|
|
33
41
|
valueMissing,
|
|
34
42
|
badInput,
|
|
@@ -59,7 +67,15 @@ var zh_TW_default = {
|
|
|
59
67
|
noFileChosen,
|
|
60
68
|
filesSelected,
|
|
61
69
|
resizePanels,
|
|
62
|
-
search
|
|
70
|
+
search,
|
|
71
|
+
alertError,
|
|
72
|
+
alertWarning,
|
|
73
|
+
alertSuccess,
|
|
74
|
+
alertInfo,
|
|
75
|
+
alertNotice,
|
|
76
|
+
alertMessage,
|
|
77
|
+
remove,
|
|
78
|
+
closeTab
|
|
63
79
|
};
|
|
64
80
|
//#endregion
|
|
65
|
-
export { badInput, chooseDate, chooseFile, clear, close, copied, copy, decrement, zh_TW_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
81
|
+
export { alertError, alertInfo, alertMessage, alertNotice, alertSuccess, alertWarning, badInput, chooseDate, chooseFile, clear, close, closeTab, copied, copy, decrement, zh_TW_default as default, filesSelected, goToSlide, hidePassword, increment, nextMonth, nextSlide, noFileChosen, patternMismatch, previousMonth, previousSlide, rangeOverflow, rangeUnderflow, remove, resizePanels, search, showPassword, stepMismatch, time, today, tooLong, tooShort, typeMismatch, valueMissing };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
2
|
import { UElement } from '../UElement.js';
|
|
3
|
-
|
|
3
|
+
/** 유효한 `u-alert` 상태 — 런타임 검증과 타입이 **같은 목록**을 보게 둔다. */
|
|
4
|
+
export declare const ALERT_STATUSES: readonly ["error", "warning", "success", "info", "notice"];
|
|
5
|
+
export type AlertStatus = (typeof ALERT_STATUSES)[number];
|
|
4
6
|
export type AlertVariant = "solid" | "filled" | "outlined" | "glass";
|
|
5
7
|
/**
|
|
6
8
|
* 사용자에게 메시지를 표시하는 Alert 컴포넌트입니다.
|
|
@@ -13,7 +15,7 @@ export type AlertVariant = "solid" | "filled" | "outlined" | "glass";
|
|
|
13
15
|
* @csspart container - 전체 Alert 컨테이너 (flex column)
|
|
14
16
|
* @csspart header - 아이콘·타이틀·닫기 버튼을 포함하는 상단 행
|
|
15
17
|
* @csspart icon - 상태 아이콘 (status 없으면 hidden)
|
|
16
|
-
* @csspart title - 타이틀 텍스트 (title 미지정 시
|
|
18
|
+
* @csspart title - 타이틀 텍스트 (title 미지정 시 현재 로케일의 상태 이름)
|
|
17
19
|
* @csspart close-btn - 닫기 버튼 (closable=true 일 때만 표시)
|
|
18
20
|
* @csspart content - 스크롤 가능한 본문 영역
|
|
19
21
|
* @csspart footer - 하단 슬롯 영역
|
|
@@ -54,6 +56,27 @@ export declare class UAlert extends UElement {
|
|
|
54
56
|
* Alert를 숨깁니다.
|
|
55
57
|
*/
|
|
56
58
|
hide(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* `title` 을 주지 않았을 때 쓰는 제목 — **현재 로케일의 상태 이름**.
|
|
61
|
+
*
|
|
62
|
+
* 종전에는 `status` 를 대문자로 올려 썼다(`ERROR`·`WARNING` …). 그것은 **어느 로케일의
|
|
63
|
+
* 낱말도 아니어서**, 한국어 화면에 영문 대문자가 그대로 찍혔다(소비자 실측 — 이미 고객에게
|
|
64
|
+
* 전달된 매뉴얼 캡처 한 장에 그 상태로 실렸다). 같은 컴포넌트의 닫기 버튼은 처음부터
|
|
65
|
+
* `Locale` 을 탔으므로, 빠져 있던 것은 인프라가 아니라 **이 한 자리**였다.
|
|
66
|
+
*
|
|
67
|
+
* ⚠알 수 없는 `status` 는 여기서 조용히 «메시지» 로 떨어진다 — 그 사실 자체는
|
|
68
|
+
* `warnUnknownStatus` 가 개발 모드에서 알린다.
|
|
69
|
+
*/
|
|
70
|
+
private defaultTitle;
|
|
71
|
+
/**
|
|
72
|
+
* 유효하지 않은 `status` 를 개발 모드에서 한 번 알린다.
|
|
73
|
+
*
|
|
74
|
+
* ★왜 필요한가: 이 컴포넌트는 알 수 없는 값을 **에러 없이** 받아 중립 알림(종 아이콘 ·
|
|
75
|
+
* `role="status"`)으로 그린다. 즉 `status="danger"` 는 *오류처럼 보이지 않는 오류 알림*이
|
|
76
|
+
* 되고 아무 신호도 나지 않는다 — 소비자가 실제로 화면 셋을 그 상태로 내보냈다.
|
|
77
|
+
* 타입은 이것을 막지 못한다(HTML 속성·서버가 만든 마크업에는 타입이 없다).
|
|
78
|
+
*/
|
|
79
|
+
private warnUnknownStatus;
|
|
57
80
|
/** Alert 상태에 따른 아이콘 이름을 반환합니다. */
|
|
58
81
|
private mapIcon;
|
|
59
82
|
/**
|
|
@@ -2,12 +2,21 @@ import { UElement } from "../UElement.js";
|
|
|
2
2
|
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
3
|
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../button/UButton.js";
|
|
5
|
+
import { devWarnOnce } from "../../utilities/devWarning.js";
|
|
5
6
|
import "../icon/UIcon.js";
|
|
6
7
|
import { styles } from "./UAlert.styles.js";
|
|
7
8
|
import { Locale } from "../../utilities/Locale.js";
|
|
8
9
|
import { html } from "lit";
|
|
9
10
|
import { customElement, property } from "lit/decorators.js";
|
|
10
11
|
//#region src/components/alert/UAlert.ts
|
|
12
|
+
/** 유효한 `u-alert` 상태 — 런타임 검증과 타입이 **같은 목록**을 보게 둔다. */
|
|
13
|
+
var ALERT_STATUSES = [
|
|
14
|
+
"error",
|
|
15
|
+
"warning",
|
|
16
|
+
"success",
|
|
17
|
+
"info",
|
|
18
|
+
"notice"
|
|
19
|
+
];
|
|
11
20
|
var UAlert = class UAlert extends UElement {
|
|
12
21
|
constructor(..._args) {
|
|
13
22
|
super(..._args);
|
|
@@ -25,6 +34,7 @@ var UAlert = class UAlert extends UElement {
|
|
|
25
34
|
if (changedProperties.has("open")) this.setTimer(this.open);
|
|
26
35
|
this.setAttribute("role", this.mapRole(this.status));
|
|
27
36
|
this.setAttribute("aria-atomic", "true");
|
|
37
|
+
if (changedProperties.has("status")) this.warnUnknownStatus();
|
|
28
38
|
}
|
|
29
39
|
render() {
|
|
30
40
|
return html`
|
|
@@ -36,7 +46,7 @@ var UAlert = class UAlert extends UElement {
|
|
|
36
46
|
name=${this.mapIcon(this.status)}
|
|
37
47
|
></u-icon>
|
|
38
48
|
<div class="title" part="title">
|
|
39
|
-
${this.title || this.
|
|
49
|
+
${this.title || this.defaultTitle()}
|
|
40
50
|
</div>
|
|
41
51
|
<u-button class="close-btn" part="close-btn"
|
|
42
52
|
variant="ghost"
|
|
@@ -83,6 +93,40 @@ var UAlert = class UAlert extends UElement {
|
|
|
83
93
|
}
|
|
84
94
|
return false;
|
|
85
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* `title` 을 주지 않았을 때 쓰는 제목 — **현재 로케일의 상태 이름**.
|
|
98
|
+
*
|
|
99
|
+
* 종전에는 `status` 를 대문자로 올려 썼다(`ERROR`·`WARNING` …). 그것은 **어느 로케일의
|
|
100
|
+
* 낱말도 아니어서**, 한국어 화면에 영문 대문자가 그대로 찍혔다(소비자 실측 — 이미 고객에게
|
|
101
|
+
* 전달된 매뉴얼 캡처 한 장에 그 상태로 실렸다). 같은 컴포넌트의 닫기 버튼은 처음부터
|
|
102
|
+
* `Locale` 을 탔으므로, 빠져 있던 것은 인프라가 아니라 **이 한 자리**였다.
|
|
103
|
+
*
|
|
104
|
+
* ⚠알 수 없는 `status` 는 여기서 조용히 «메시지» 로 떨어진다 — 그 사실 자체는
|
|
105
|
+
* `warnUnknownStatus` 가 개발 모드에서 알린다.
|
|
106
|
+
*/
|
|
107
|
+
defaultTitle() {
|
|
108
|
+
switch (this.status) {
|
|
109
|
+
case "error": return Locale.getValue("alertError");
|
|
110
|
+
case "warning": return Locale.getValue("alertWarning");
|
|
111
|
+
case "success": return Locale.getValue("alertSuccess");
|
|
112
|
+
case "info": return Locale.getValue("alertInfo");
|
|
113
|
+
case "notice": return Locale.getValue("alertNotice");
|
|
114
|
+
default: return Locale.getValue("alertMessage");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 유효하지 않은 `status` 를 개발 모드에서 한 번 알린다.
|
|
119
|
+
*
|
|
120
|
+
* ★왜 필요한가: 이 컴포넌트는 알 수 없는 값을 **에러 없이** 받아 중립 알림(종 아이콘 ·
|
|
121
|
+
* `role="status"`)으로 그린다. 즉 `status="danger"` 는 *오류처럼 보이지 않는 오류 알림*이
|
|
122
|
+
* 되고 아무 신호도 나지 않는다 — 소비자가 실제로 화면 셋을 그 상태로 내보냈다.
|
|
123
|
+
* 타입은 이것을 막지 못한다(HTML 속성·서버가 만든 마크업에는 타입이 없다).
|
|
124
|
+
*/
|
|
125
|
+
warnUnknownStatus() {
|
|
126
|
+
const status = this.status;
|
|
127
|
+
if (!status || ALERT_STATUSES.includes(status)) return;
|
|
128
|
+
devWarnOnce(`u-alert:status:${status}`, `<u-alert status="${status}"> is not a known status, so it renders as a neutral notice. Use one of: ${ALERT_STATUSES.join(", ")}.`);
|
|
129
|
+
}
|
|
86
130
|
/** Alert 상태에 따른 아이콘 이름을 반환합니다. */
|
|
87
131
|
mapIcon(status) {
|
|
88
132
|
switch (status) {
|
|
@@ -135,4 +179,4 @@ __decorate([property({ type: String }), __decorateMetadata("design:type", String
|
|
|
135
179
|
__decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UAlert.prototype, "duration", void 0);
|
|
136
180
|
UAlert = __decorate([customElement("u-alert")], UAlert);
|
|
137
181
|
//#endregion
|
|
138
|
-
export { UAlert };
|
|
182
|
+
export { ALERT_STATUSES, UAlert };
|
|
@@ -3,6 +3,7 @@ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/hel
|
|
|
3
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
|
+
import { Locale } from "../../utilities/Locale.js";
|
|
6
7
|
import "../tooltip/UTooltip.js";
|
|
7
8
|
import "../tag/UTag.js";
|
|
8
9
|
import { styles } from "./UChip.styles.js";
|
|
@@ -63,7 +64,7 @@ var UChip = class UChip extends UElement {
|
|
|
63
64
|
?hidden=${!this.removable}
|
|
64
65
|
rounded
|
|
65
66
|
variant="ghost"
|
|
66
|
-
aria-label
|
|
67
|
+
aria-label=${Locale.getValue("remove")}
|
|
67
68
|
@click=${this.handleRemoveClick}>
|
|
68
69
|
<u-icon lib="internal" name="x"></u-icon>
|
|
69
70
|
</u-button>
|
|
@@ -9,6 +9,18 @@ var styles = css`
|
|
|
9
9
|
pointer-events: none;
|
|
10
10
|
opacity: 0.5;
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* 인쇄 - 종이에는 스크롤이 없다. overflow auto 는 독립 서식 문맥이라 패널 안 마지막 블록의
|
|
15
|
+
* 아래 여백을 패널 안에 가두고 그만큼 패널이 자란다. 내용 끝이 쪽 경계에서 그 여백 이내에
|
|
16
|
+
* 있으면 여백만 담긴 빈 꼬리 쪽이 찍힌다. 인쇄에서는 넘침을 흐름에 돌려 여백이 접히게 한다.
|
|
17
|
+
* 높이는 이 패널이 소유하지 않는다 - 소비자가 준 고정 높이는 소비자가 화면 매체로 한정한다.
|
|
18
|
+
*/
|
|
19
|
+
@media print {
|
|
20
|
+
:host {
|
|
21
|
+
overflow: visible;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
12
24
|
`;
|
|
13
25
|
//#endregion
|
|
14
26
|
export { styles };
|
|
@@ -3,6 +3,7 @@ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/hel
|
|
|
3
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
|
+
import { Locale } from "../../utilities/Locale.js";
|
|
6
7
|
import { styles } from "./UTab.styles.js";
|
|
7
8
|
import { html } from "lit";
|
|
8
9
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -42,7 +43,7 @@ var UTab = class UTab extends UElement {
|
|
|
42
43
|
<u-button class="remove-btn" part="remove-btn"
|
|
43
44
|
?hidden=${!this.removable}
|
|
44
45
|
variant="ghost"
|
|
45
|
-
aria-label
|
|
46
|
+
aria-label=${Locale.getValue("closeTab")}
|
|
46
47
|
@click=${this.handleRemoveClick}
|
|
47
48
|
>
|
|
48
49
|
<u-icon lib="internal" name="x"></u-icon>
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { IconCache, IconRegistry, getDefaultBaseUrl, setDefaultBaseUrl } from ".
|
|
|
11
11
|
import { createDevWarner, devWarnOnce, resetDevWarnings } from "./utilities/devWarning.js";
|
|
12
12
|
import { UIcon } from "./components/icon/UIcon.js";
|
|
13
13
|
import { Locale } from "./utilities/Locale.js";
|
|
14
|
-
import { UAlert } from "./components/alert/UAlert.js";
|
|
14
|
+
import { ALERT_STATUSES, UAlert } from "./components/alert/UAlert.js";
|
|
15
15
|
import { UAvatar } from "./components/avatar/UAvatar.js";
|
|
16
16
|
import { UBadge } from "./components/badge/UBadge.js";
|
|
17
17
|
import { UBreadcrumb } from "./components/breadcrumb/UBreadcrumb.js";
|
|
@@ -59,4 +59,4 @@ import { BrowserStorage } from "./utilities/BrowserStorage.js";
|
|
|
59
59
|
import { Dialog } from "./utilities/Dialog.js";
|
|
60
60
|
import { Theme } from "./utilities/Theme.js";
|
|
61
61
|
import { Toast } from "./utilities/Toast.js";
|
|
62
|
-
export { BrowserStorage, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFileInput, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USwitch, UTab, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, createDevWarner, dateAttrConverter, devWarnOnce, formatCurrency, formatDate, formatNumber, getDefaultBaseUrl, getParentElement, isCoarsePointer, jsonAttrConverter, querySelectorAllWithin, querySelectorWithin, resetDevWarnings, setDefaultBaseUrl, urlAttrConverter };
|
|
62
|
+
export { ALERT_STATUSES, BrowserStorage, Dialog, IconCache, IconRegistry, Locale, OverlayManager, Theme, Toast, UAlert, UAvatar, UBadge, UBreadcrumb, UBreadcrumbItem, UButton, UButtonGroup, UCard, UCarousel, UCheckbox, UChip, UCopyButton, UDatePicker, UDialog, UDivider, UDrawer, UElement, UExpander, UField, UFileInput, UFloatingElement, UForm, UFormControlElement, UIcon, UIconButton, UInput, UMenu, UMenuItem, UOption, UOverlayElement, UPanel, UPopover, UProgressBar, UProgressRing, URadio, URating, USelect, USkeleton, USlider, USpinner, USplitPanel, USwitch, UTab, UTabPanel, UTag, UText, UTextarea, UTooltip, UTree, UTreeItem, arrayAttrConverter, booleanAttrConverter, createDevWarner, dateAttrConverter, devWarnOnce, formatCurrency, formatDate, formatNumber, getDefaultBaseUrl, getParentElement, isCoarsePointer, jsonAttrConverter, querySelectorAllWithin, querySelectorWithin, resetDevWarnings, setDefaultBaseUrl, urlAttrConverter };
|
|
@@ -22,6 +22,20 @@ interface PluginOptions {
|
|
|
22
22
|
output?: string;
|
|
23
23
|
/** 래퍼 생성에서 제외할 glob 패턴 목록 (cwd: 프로젝트 루트) */
|
|
24
24
|
exclude?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* 생성 배럴(`<output>/index`)이 함께 재수출할 **추가 모듈 지정자** 목록.
|
|
27
|
+
*
|
|
28
|
+
* ★왜 필요한가: 어떤 패키지는 **손으로 쓴 래퍼**를 함께 갖는다(제네릭 프로퍼티·커스텀
|
|
29
|
+
* 이벤트 매핑처럼 생성기가 도출할 수 없는 것). 그것이 별도 서브패스에만 살면 소비자는
|
|
30
|
+
* «배럴에서 얻는 것»과 «딥 경로에서 얻는 것»이 달라지고, 배럴이 딥의 상위집합이라는
|
|
31
|
+
* 관례가 깨진다. ⇒ 배럴이 그 손 래퍼까지 재수출해 한 갈래로 만든다.
|
|
32
|
+
*
|
|
33
|
+
* ⚠**반드시 «패키지 지정자»를 준다 — 상대 경로를 주지 말 것.** 상대 경로는 `exports`
|
|
34
|
+
* 맵을 거치지 않으므로 워크스페이스에서 배럴만 `dist` 트리를 싣고 나머지는 `src` 를
|
|
35
|
+
* 실어 **같은 태그를 두 클래스가 등록**한다(이 리포가 `TS2717` 로 한 번 겪은 형태).
|
|
36
|
+
* 예: `'@iyulab/modern-app/dist/react.js'`.
|
|
37
|
+
*/
|
|
38
|
+
reexport?: string[];
|
|
25
39
|
}
|
|
26
40
|
/**
|
|
27
41
|
* Lit Element 컴포넌트를 React 래퍼로 자동 생성하는 Vite 플러그인
|
|
@@ -49,7 +49,7 @@ export default function reactWrapperPlugin(options) {
|
|
|
49
49
|
for (const comp of components) {
|
|
50
50
|
generated.push(...writeWrapper(comp, outDir, buildOutDir, pkgName));
|
|
51
51
|
}
|
|
52
|
-
generated.push(...writeIndex(components, outDir, buildOutDir));
|
|
52
|
+
generated.push(...writeIndex(components, outDir, buildOutDir, options.reexport ?? []));
|
|
53
53
|
// 결과 출력
|
|
54
54
|
generated.sort((a, b) => a.size - b.size);
|
|
55
55
|
for (const f of generated) {
|
|
@@ -300,11 +300,16 @@ export type ${className}Props = React.ComponentProps<typeof ${className}>;
|
|
|
300
300
|
writeFile(dtsPath, dts, buildOutDir),
|
|
301
301
|
];
|
|
302
302
|
}
|
|
303
|
-
function writeIndex(components, outDir, buildOutDir) {
|
|
304
|
-
|
|
303
|
+
function writeIndex(components, outDir, buildOutDir, reexport) {
|
|
304
|
+
// 손 래퍼 재수출을 **먼저** 둔다 — 소비자가 읽는 순서를 「손으로 쓴 것 → 생성된 것」으로
|
|
305
|
+
// 맞춘다. ⚠이름이 겹치면 `export *` 는 그 이름을 **조용히 내보내지 않으므로**, 순서가
|
|
306
|
+
// 충돌을 해소해 주지는 않는다(겹치지 않게 `exclude` 로 가르는 것이 호출부의 책임).
|
|
307
|
+
const reexports = reexport.map(spec => `export * from '${spec}';`).join('\n');
|
|
308
|
+
const prefix = reexports ? reexports + '\n' : '';
|
|
309
|
+
const jsExports = prefix + components
|
|
305
310
|
.map(c => `export { ${c.className} } from './${c.className}.js';`)
|
|
306
311
|
.join('\n');
|
|
307
|
-
const dtsExports = components
|
|
312
|
+
const dtsExports = prefix + components
|
|
308
313
|
.map(c => `export { ${c.className}, ${c.className}Props } from './${c.className}';`)
|
|
309
314
|
.join('\n');
|
|
310
315
|
return [
|
|
@@ -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' | 'chooseDate' | 'previousMonth' | 'nextMonth' | 'close' | 'copy' | 'copied' | 'chooseFile' | 'noFileChosen' | 'filesSelected' | 'resizePanels' | 'search';
|
|
15
|
+
export type LocaleMessageKey = 'valueMissing' | 'badInput' | 'typeMismatch' | 'patternMismatch' | 'rangeUnderflow' | 'rangeOverflow' | 'stepMismatch' | 'tooShort' | 'tooLong' | 'increment' | 'decrement' | 'clear' | 'today' | 'time' | 'showPassword' | 'hidePassword' | 'previousSlide' | 'nextSlide' | 'goToSlide' | 'chooseDate' | 'previousMonth' | 'nextMonth' | 'close' | 'copy' | 'copied' | 'chooseFile' | 'noFileChosen' | 'filesSelected' | 'resizePanels' | 'search' | 'alertError' | 'alertWarning' | 'alertSuccess' | 'alertInfo' | 'alertNotice' | 'alertMessage' | 'remove' | 'closeTab';
|
|
16
16
|
type LocaleTable = Record<LocaleMessageKey, string>;
|
|
17
17
|
/**
|
|
18
18
|
* 한 패키지(또는 앱 영역)의 문자열 묶음.
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ Closable message banner with status icons, auto-dismiss timer, and open/hide tra
|
|
|
36
36
|
| `closable` | `boolean` | `false` | ✓ | Show close button |
|
|
37
37
|
| `variant` | `'solid'\|'filled'\|'outlined'\|'glass'` | `'solid'` | ✓ | Visual style |
|
|
38
38
|
| `status` | `'error'\|'warning'\|'success'\|'info'\|'notice'` | — | ✓ | Status type; controls icon and color |
|
|
39
|
-
| `title` | `string` | `''` | — | Title label
|
|
39
|
+
| `title` | `string` | `''` | — | Title label. Left empty, the status name in the current locale is shown (`Locale.set('ko')` → 「오류」), not the raw status value |
|
|
40
40
|
| `duration` | `number` | `0` | — | Auto-dismiss delay in ms; `0` disables |
|
|
41
41
|
|
|
42
42
|
## Events
|
|
@@ -38,6 +38,11 @@ General-purpose content panel. Matches a tab or tree node when using `value`.
|
|
|
38
38
|
<u-panel>…</u-panel> <!-- grows with its content -->
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
In print media the panel is not a scroll container (`overflow: visible`) — paper does not
|
|
42
|
+
scroll, and a scroll container keeps the bottom margin of its last block inside itself, which
|
|
43
|
+
can push a page that holds only that margin. A height you give the panel is yours to scope to
|
|
44
|
+
screen media (`@media screen { … }`); in print, a fixed height would let content overflow it.
|
|
45
|
+
|
|
41
46
|
## Slots
|
|
42
47
|
|
|
43
48
|
| Name | Description |
|