@iyulab/modern-app 0.35.0 → 0.35.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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.35.1] - 2026-10-06
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`u-wizard`'s `step-change`, `u-master-detail-layout`'s `detail-close` and `u-sidebar-layout`'s
|
|
8
|
+
`overlay-close` are typed for TypeScript listeners** (`WizardEventMap`, `MasterDetailLayoutEventMap`,
|
|
9
|
+
`SidebarLayoutEventMap`, exported). `wizard.addEventListener('step-change', (e) => e.detail.to)` no
|
|
10
|
+
longer needs a cast; the React `onStepChange`/`onOverlayClose` props use the same types.
|
|
11
|
+
|
|
3
12
|
## [0.35.0] - 2026-10-06
|
|
4
13
|
|
|
5
14
|
### Changed
|
|
@@ -86,6 +86,20 @@ export declare class MasterDetailLayout extends StyledElement<ElementParts> {
|
|
|
86
86
|
private handleDetailSlotChange;
|
|
87
87
|
render(): import('lit-html').TemplateResult<1>;
|
|
88
88
|
}
|
|
89
|
+
/** Events `<u-master-detail-layout>` dispatches — bubbling and composed. */
|
|
90
|
+
export interface MasterDetailLayoutEventMap {
|
|
91
|
+
/** The detail pane's close button was pressed (narrow width, overlay mode). Clearing the `detail` slot is yours. */
|
|
92
|
+
'detail-close': CustomEvent<null>;
|
|
93
|
+
}
|
|
94
|
+
/** Typed listeners for {@link MasterDetailLayoutEventMap} — element-scoped, the DOM's own pattern (`HTMLMediaElementEventMap`). */
|
|
95
|
+
export interface MasterDetailLayout {
|
|
96
|
+
addEventListener<K extends keyof MasterDetailLayoutEventMap>(type: K, listener: (this: MasterDetailLayout, ev: MasterDetailLayoutEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
97
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MasterDetailLayout, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
98
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
99
|
+
removeEventListener<K extends keyof MasterDetailLayoutEventMap>(type: K, listener: (this: MasterDetailLayout, ev: MasterDetailLayoutEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
100
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: MasterDetailLayout, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
101
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
102
|
+
}
|
|
89
103
|
declare global {
|
|
90
104
|
interface HTMLElementTagNameMap {
|
|
91
105
|
'u-master-detail-layout': MasterDetailLayout;
|
|
@@ -89,6 +89,20 @@ export declare class Wizard extends StyledElement<ElementParts> {
|
|
|
89
89
|
private renderStep;
|
|
90
90
|
render(): import('lit-html').TemplateResult<1>;
|
|
91
91
|
}
|
|
92
|
+
/** Events `<u-wizard>` dispatches — bubbling and composed. */
|
|
93
|
+
export interface WizardEventMap {
|
|
94
|
+
/** Cancelable: `preventDefault()` keeps the wizard on `from` (validation, unsaved work). */
|
|
95
|
+
'step-change': CustomEvent<WizardStepChangeDetail>;
|
|
96
|
+
}
|
|
97
|
+
/** Typed listeners for {@link WizardEventMap} — element-scoped, the DOM's own pattern (`HTMLMediaElementEventMap`). */
|
|
98
|
+
export interface Wizard {
|
|
99
|
+
addEventListener<K extends keyof WizardEventMap>(type: K, listener: (this: Wizard, ev: WizardEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
100
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: Wizard, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
101
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
102
|
+
removeEventListener<K extends keyof WizardEventMap>(type: K, listener: (this: Wizard, ev: WizardEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
103
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: Wizard, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
104
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
105
|
+
}
|
|
92
106
|
declare global {
|
|
93
107
|
interface HTMLElementTagNameMap {
|
|
94
108
|
'u-wizard': Wizard;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type * from './types/AppOptions';
|
|
|
4
4
|
export type * from './types/AuthConfig';
|
|
5
5
|
export type { SidebarPermissionGuard } from './layouts/SidebarPermission';
|
|
6
6
|
export type { SidebarIconsConfig } from './layouts/SidebarLayout.types';
|
|
7
|
+
export type { SidebarLayoutEventMap } from './layouts/SidebarLayout.js';
|
|
7
8
|
export { filterSidebarItems } from './layouts/filterSidebarItems.js';
|
|
8
9
|
export { PageHeader } from './components/PageHeader.js';
|
|
9
10
|
export { GroupBox } from './components/GroupBox.js';
|
|
@@ -12,8 +13,9 @@ export { InfoField, isBlank } from './components/InfoField.js';
|
|
|
12
13
|
export { EmptyState } from './components/EmptyState.js';
|
|
13
14
|
export { ActionBar } from './components/ActionBar.js';
|
|
14
15
|
export { MasterDetailLayout } from './components/MasterDetailLayout.js';
|
|
16
|
+
export type { MasterDetailLayoutEventMap } from './components/MasterDetailLayout.js';
|
|
15
17
|
export { Wizard } from './components/Wizard.js';
|
|
16
|
-
export type { WizardStep, WizardStepState, WizardStepChangeDetail } from './components/Wizard.js';
|
|
18
|
+
export type { WizardStep, WizardStepState, WizardStepChangeDetail, WizardEventMap } from './components/Wizard.js';
|
|
17
19
|
export { translate } from './translate.js';
|
|
18
20
|
export { modernAppLocale, registerLocale, setDefaultLocale, getLocaleStrings, getDefaultLocale, } from './internals/locale.js';
|
|
19
21
|
export type { ModernAppLocaleStrings, ModernAppMessageKey } from './internals/locale.js';
|
|
@@ -156,6 +156,20 @@ export declare class SidebarLayout extends StyledElement<SidebarParts> {
|
|
|
156
156
|
/** 화면 크기 변경에 따른 사이드바 상태 업데이트 */
|
|
157
157
|
private handleScreenResize;
|
|
158
158
|
}
|
|
159
|
+
/** Events `<u-sidebar-layout>` dispatches — bubbling and composed. */
|
|
160
|
+
export interface SidebarLayoutEventMap {
|
|
161
|
+
/** The overlay's close button was pressed, or Escape with focus inside the panel. Emptying the `overlay` slot is yours. */
|
|
162
|
+
'overlay-close': CustomEvent<null>;
|
|
163
|
+
}
|
|
164
|
+
/** Typed listeners for {@link SidebarLayoutEventMap} — element-scoped, the DOM's own pattern (`HTMLMediaElementEventMap`). */
|
|
165
|
+
export interface SidebarLayout {
|
|
166
|
+
addEventListener<K extends keyof SidebarLayoutEventMap>(type: K, listener: (this: SidebarLayout, ev: SidebarLayoutEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
167
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: SidebarLayout, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
168
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
169
|
+
removeEventListener<K extends keyof SidebarLayoutEventMap>(type: K, listener: (this: SidebarLayout, ev: SidebarLayoutEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
170
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: SidebarLayout, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
171
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
172
|
+
}
|
|
159
173
|
declare global {
|
|
160
174
|
interface HTMLElementTagNameMap {
|
|
161
175
|
'u-sidebar-layout': SidebarLayout;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { EventName } from '@lit/react';
|
|
3
|
-
import { SidebarLayout as SidebarLayoutElement } from './layouts/SidebarLayout.js';
|
|
4
|
-
import { Wizard as WizardElement,
|
|
3
|
+
import { SidebarLayout as SidebarLayoutElement, SidebarLayoutEventMap } from './layouts/SidebarLayout.js';
|
|
4
|
+
import { Wizard as WizardElement, WizardEventMap } from './components/Wizard.js';
|
|
5
5
|
import { GroupBoxLevel } from './components/GroupBox.js';
|
|
6
6
|
import { InfoFieldFormat, InfoFieldSize, InfoFieldTrend, InfoFieldTone } from './components/InfoField.js';
|
|
7
7
|
export { ScreenObserver } from './internals/ScreenObserver.js';
|
|
@@ -12,7 +12,7 @@ export type { ScreenSize, ScreenObserverConfig, ScreenResizeEvent } from './inte
|
|
|
12
12
|
* React 18 (JSX attributes stringify), so this wrapper keeps `config` working on both.
|
|
13
13
|
*/
|
|
14
14
|
export declare const SidebarLayout: import('@lit/react').ReactWebComponent<SidebarLayoutElement, {
|
|
15
|
-
onOverlayClose: EventName<
|
|
15
|
+
onOverlayClose: EventName<SidebarLayoutEventMap["overlay-close"]>;
|
|
16
16
|
}>;
|
|
17
17
|
export type SidebarLayoutProps = React.ComponentProps<typeof SidebarLayout>;
|
|
18
18
|
/**
|
|
@@ -23,7 +23,7 @@ export type SidebarLayoutProps = React.ComponentProps<typeof SidebarLayout>;
|
|
|
23
23
|
* wrapper keeps working on React 18 the same way it does for `SidebarLayout`'s `config`.
|
|
24
24
|
*/
|
|
25
25
|
export declare const Wizard: import('@lit/react').ReactWebComponent<WizardElement, {
|
|
26
|
-
onStepChange: EventName<
|
|
26
|
+
onStepChange: EventName<WizardEventMap["step-change"]>;
|
|
27
27
|
}>;
|
|
28
28
|
export type WizardProps = React.ComponentProps<typeof Wizard>;
|
|
29
29
|
export type { SidebarLayoutElement, WizardElement };
|