@iyulab/components 1.41.0 → 1.42.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 +56 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.149.0 → _@oxc-project_runtime@0.150.0}/helpers/esm/decorateMetadata.js +1 -1
- 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/UFloatingElement.js +2 -2
- package/dist/components/UFormControlElement.js +2 -2
- package/dist/components/UOverlayElement.js +2 -2
- package/dist/components/alert/UAlert.d.ts +25 -2
- package/dist/components/alert/UAlert.js +48 -4
- package/dist/components/avatar/UAvatar.js +2 -2
- package/dist/components/badge/UBadge.js +2 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/button/UButton.js +2 -2
- package/dist/components/button-group/UButtonGroup.js +2 -2
- package/dist/components/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/checkbox/UCheckbox.js +2 -2
- package/dist/components/chip/UChip.js +4 -3
- package/dist/components/copy-button/UCopyButton.js +2 -2
- package/dist/components/date-picker/UDatePicker.js +2 -2
- package/dist/components/dialog/UDialog.js +2 -2
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/drawer/UDrawer.js +2 -2
- package/dist/components/expander/UExpander.js +2 -2
- package/dist/components/field/UField.d.ts +28 -0
- package/dist/components/field/UField.js +58 -4
- package/dist/components/file-input/UFileInput.js +2 -2
- package/dist/components/form/UForm.js +2 -2
- package/dist/components/icon/UIcon.js +2 -2
- package/dist/components/icon-button/UIconButton.js +2 -2
- package/dist/components/input/UInput.js +2 -2
- package/dist/components/menu/UMenu.js +2 -2
- package/dist/components/menu-item/UMenuItem.js +2 -2
- package/dist/components/option/UOption.js +2 -2
- package/dist/components/panel/UPanel.js +2 -2
- package/dist/components/popover/UPopover.js +2 -2
- package/dist/components/progress-bar/UProgressBar.js +2 -2
- package/dist/components/progress-ring/UProgressRing.js +2 -2
- package/dist/components/radio/URadio.js +2 -2
- package/dist/components/rating/URating.js +2 -2
- package/dist/components/select/USelect.js +2 -2
- package/dist/components/skeleton/USkeleton.js +2 -2
- package/dist/components/slider/USlider.js +2 -2
- package/dist/components/spinner/USpinner.js +2 -2
- package/dist/components/split-panel/USplitPanel.js +2 -2
- package/dist/components/switch/USwitch.js +2 -2
- package/dist/components/tab/UTab.js +4 -3
- package/dist/components/tab-panel/UTabPanel.js +2 -2
- package/dist/components/tag/UTag.js +2 -2
- package/dist/components/text/UText.js +2 -2
- package/dist/components/textarea/UTextarea.js +2 -2
- package/dist/components/tooltip/UTooltip.js +2 -2
- package/dist/components/tree/UTree.js +2 -2
- package/dist/components/tree-item/UTreeItem.js +2 -2
- 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/field.md +7 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UPanel } from "../panel/UPanel.js";
|
|
5
5
|
import { UTab } from "../tab/UTab.js";
|
|
6
6
|
import { styles } from "./UTabPanel.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../icon/UIcon.js";
|
|
5
5
|
import { statusIcon } from "../../utilities/statusIcon.js";
|
|
6
6
|
import { styles } from "./UTag.styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { styles } from "./UText.styles.js";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
6
6
|
import { html, literal } from "lit/static-html.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFormControlElement } from "../UFormControlElement.js";
|
|
4
4
|
import { Locale } from "../../utilities/Locale.js";
|
|
5
5
|
import "../field/UField.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { UFloatingElement } from "../UFloatingElement.js";
|
|
4
4
|
import { styles } from "./UTooltip.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import { UTreeItem } from "../tree-item/UTreeItem.js";
|
|
5
5
|
import { styles } from "./UTree.styles.js";
|
|
6
6
|
import { html } from "lit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UElement } from "../UElement.js";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
4
4
|
import "../spinner/USpinner.js";
|
|
5
5
|
import "../icon/UIcon.js";
|
|
6
6
|
import { styles } from "./UTreeItem.styles.js";
|
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
|
|
@@ -46,8 +46,13 @@ renders the label twice; a development-mode console warning points at that spot.
|
|
|
46
46
|
<u-field label="Notes"><textarea name="notes"></textarea></u-field>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
A `u-field` that has a `label` but
|
|
50
|
-
|
|
49
|
+
A `u-field` that has a `label` but no form control in its default slot also warns: that label names
|
|
50
|
+
nothing. "Form control" here is a question about **structure**, not about what is on screen — a
|
|
51
|
+
form-associated custom element, a native form or focusable tag, `tabindex`, or `contenteditable`.
|
|
52
|
+
A field that is `disabled`, or rendered inside a container that is currently hidden (a closed
|
|
53
|
+
drawer, an inactive tab panel, a wizard step that is not current), is still correctly built and does
|
|
54
|
+
not warn. The control may sit inside a wrapper element; it does not have to be the slot's direct
|
|
55
|
+
child.
|
|
51
56
|
|
|
52
57
|
All ten form controls take the field's label this way. Three of them get it slightly differently,
|
|
53
58
|
because their name normally comes from their own content:
|