@iyulab/modern-app 0.19.7 → 0.20.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 +49 -0
- package/README.md +35 -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/components/ActionBar.js +2 -2
- package/dist/components/EmptyState.js +2 -2
- package/dist/components/GroupBox.js +2 -2
- package/dist/components/InfoField.js +2 -2
- package/dist/components/InfoSection.js +2 -2
- package/dist/components/MasterDetailLayout.d.ts +10 -0
- package/dist/components/MasterDetailLayout.js +4 -4
- package/dist/components/MasterDetailLayout.styles.js +25 -0
- package/dist/components/PageHeader.js +2 -2
- package/dist/components/SidebarButton.js +2 -2
- package/dist/components/SidebarGroup.js +2 -2
- package/dist/components/SidebarLink.js +2 -2
- package/dist/components/SidebarSection.js +2 -2
- package/dist/components/Wizard.js +2 -2
- package/dist/internals/StyledElement.js +2 -2
- package/dist/layouts/SidebarLayout.js +2 -2
- package/dist/react/ActionBar.d.ts +12 -0
- package/dist/react/ActionBar.js +10 -0
- package/dist/react/EmptyState.d.ts +12 -0
- package/dist/react/EmptyState.js +10 -0
- package/dist/react/GroupBox.d.ts +12 -0
- package/dist/react/GroupBox.js +10 -0
- package/dist/react/InfoField.d.ts +12 -0
- package/dist/react/InfoField.js +10 -0
- package/dist/react/InfoSection.d.ts +12 -0
- package/dist/react/InfoSection.js +10 -0
- package/dist/react/MasterDetailLayout.d.ts +13 -0
- package/dist/react/MasterDetailLayout.js +12 -0
- package/dist/react/PageHeader.d.ts +12 -0
- package/dist/react/PageHeader.js +10 -0
- package/dist/react/SidebarButton.d.ts +12 -0
- package/dist/react/SidebarButton.js +10 -0
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.js +9 -0
- package/package.json +10 -10
- package/skills/modern-app/references/components/master-detail-layout.md +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.1] - 2026-09-17
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`u-master-detail-layout` no longer adds a trailing blank page when a single pane is printed.**
|
|
8
|
+
The layout is a flex row with scrolling panes, and both keep the bottom margin of a pane's last
|
|
9
|
+
block inside the layout, so the layout grew by that margin; content ending just short of a page
|
|
10
|
+
boundary then spilled onto a page holding only the margin. When a single pane is showing
|
|
11
|
+
(overlay mode, or no detail) the layout now prints as block flow, which lets the margin collapse
|
|
12
|
+
past it and be truncated at the page break. Side-by-side printing is unchanged: two columns are
|
|
13
|
+
flex items and each keeps its own margin.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `u-master-detail-layout` exposes a `:state(detail)` custom state while its `detail` slot has
|
|
18
|
+
content.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Requires `@iyulab/router` `^0.15.1`, which prints the route outlet as a block box. The shell's
|
|
23
|
+
guarantee that a screen's trailing margin collapses out of the page in print depends on it.
|
|
24
|
+
|
|
25
|
+
## [0.20.0] - 2026-09-16
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **React wrappers for the LOB content primitives**, published at `@iyulab/modern-app/react/<Name>.js`:
|
|
30
|
+
`PageHeader`, `InfoSection`, `InfoField`, `GroupBox`, `EmptyState`, `ActionBar`,
|
|
31
|
+
`MasterDetailLayout` and `SidebarButton`. Until now only `SidebarLayout` and `Wizard` were
|
|
32
|
+
wrapped, so a React consumer reaching for any of the others had no typed path to it and had to
|
|
33
|
+
declare the custom element in JSX by hand, once per element. The wrappers are generated by the
|
|
34
|
+
same generator `@iyulab/components` uses for its own components rather than a second copy of it,
|
|
35
|
+
so events and properties stay in step with the elements automatically, and a typed consumption
|
|
36
|
+
smoke test now runs as part of the build.
|
|
37
|
+
- `u-info-field`'s `value` stays `unknown` through the wrapper, so `null`, numbers and strings are
|
|
38
|
+
all accepted, matching the element and its documentation.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **`@iyulab/modern-app/react` is now a superset of the per-component subpaths.** The barrel used to
|
|
43
|
+
be hand-curated and carried only `SidebarLayout`, `Wizard`, `ScreenObserver` and the sidebar
|
|
44
|
+
configuration types, so what a consumer got depended on which specifier they reached for: the
|
|
45
|
+
generated wrappers existed only under `@iyulab/modern-app/react/<Name>.js` and could not be
|
|
46
|
+
imported from the barrel at all. The barrel is now generated and re-exports the hand-written
|
|
47
|
+
wrappers alongside the generated ones, so every React export is reachable from one specifier.
|
|
48
|
+
Nothing was removed and no name changed: existing barrel imports keep working, and the
|
|
49
|
+
per-component subpaths are still published for importing one wrapper at a time. This matches how
|
|
50
|
+
`@iyulab/components` has always exposed its own React surface.
|
|
51
|
+
|
|
3
52
|
## [0.19.7] - 2026-09-16
|
|
4
53
|
|
|
5
54
|
### Changed
|
package/README.md
CHANGED
|
@@ -205,6 +205,41 @@ export function App() {
|
|
|
205
205
|
}
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
+
### The content primitives
|
|
209
|
+
|
|
210
|
+
The LOB content primitives are wrapped too. Everything React lives in the one barrel above —
|
|
211
|
+
the shell, the sidebar configuration types and every content primitive — so a single specifier is
|
|
212
|
+
enough:
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
import { PageHeader, InfoSection, InfoField } from '@iyulab/modern-app/react';
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Each wrapper is also published on its own subpath, for importing one at a time:
|
|
219
|
+
|
|
220
|
+
```tsx
|
|
221
|
+
import { PageHeader } from '@iyulab/modern-app/react/PageHeader.js';
|
|
222
|
+
import { InfoSection } from '@iyulab/modern-app/react/InfoSection.js';
|
|
223
|
+
import { InfoField } from '@iyulab/modern-app/react/InfoField.js';
|
|
224
|
+
|
|
225
|
+
export function OrderSummary({ order }: { order: Order }) {
|
|
226
|
+
return (
|
|
227
|
+
<>
|
|
228
|
+
<PageHeader title="Order" subtitle={order.no} />
|
|
229
|
+
<InfoSection min={200}>
|
|
230
|
+
<InfoField label="Total" format="currency" currency="KRW" value={order.total} />
|
|
231
|
+
<InfoField label="Ordered at" format="date" value={order.orderedAt} />
|
|
232
|
+
</InfoSection>
|
|
233
|
+
</>
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Available: `PageHeader`, `InfoSection`, `InfoField`, `GroupBox`, `EmptyState`, `ActionBar`,
|
|
239
|
+
`MasterDetailLayout`, `SidebarButton`. They are generated from the elements themselves, so their
|
|
240
|
+
props and events follow the element rather than a second hand-written description of it. `InfoField`
|
|
241
|
+
keeps `value` as `unknown`, so `null`, numbers and strings all type-check.
|
|
242
|
+
|
|
208
243
|
## Accessibility
|
|
209
244
|
|
|
210
245
|
The baseline is **WCAG 2.2**. The table lists what this package **measures in tests** — it is not a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.150.0/helpers/esm/decorate.js
|
|
2
2
|
function e(e, t, n, r) {
|
|
3
3
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
4
4
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.150.0/helpers/esm/decorateMetadata.js
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { slotHasContent as r } from "../internals/slotted.js";
|
|
5
5
|
import { styles as i } from "./ActionBar.styles.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { getLocaleStrings as r } from "../internals/locale.js";
|
|
5
5
|
import { slotHasContent as i } from "../internals/slotted.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { slotHasContent as r } from "../internals/slotted.js";
|
|
5
5
|
import { styles as i } from "./GroupBox.styles.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./InfoField.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./InfoSection.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -32,6 +32,9 @@ type ElementParts = 'host' | 'master' | 'divider' | 'detail' | 'detail-close';
|
|
|
32
32
|
* `PageHeader`/`GroupBox`/`ActionBar` 의 고정 중단점 관행을 벗어나려는 것이 아니다.
|
|
33
33
|
*
|
|
34
34
|
* 오버라이드: `part`(host·master·divider·detail·detail-close) + slot 치환.
|
|
35
|
+
*
|
|
36
|
+
* detail 슬롯이 채워져 있는 동안 `:state(detail)` 커스텀 상태를 노출한다
|
|
37
|
+
* (`ElementInternals.states`) — 속성으로 반사하지 않는다(`u-select:state(open)` 과 같은 관례).
|
|
35
38
|
*/
|
|
36
39
|
export declare class MasterDetailLayout extends StyledElement<ElementParts> {
|
|
37
40
|
static styles: import('lit').CSSResultGroup[];
|
|
@@ -50,6 +53,13 @@ export declare class MasterDetailLayout extends StyledElement<ElementParts> {
|
|
|
50
53
|
locale: string;
|
|
51
54
|
/** detail 슬롯 배정 상태 — CSS `:has()` 로는 알 수 없다(`internals/slotted.ts` 참조). */
|
|
52
55
|
private hasDetail;
|
|
56
|
+
/**
|
|
57
|
+
* `:state(detail)` 을 싣는 자리. 인쇄 규칙이 «한 판만 보이는가» 를 호스트에서 갈라야 해서
|
|
58
|
+
* 생겼다(styles 의 인쇄 절 참조).
|
|
59
|
+
* ⚠생성자에서 한 번만 붙인다 — `attachInternals()` 는 같은 인스턴스에 두 번 부르면
|
|
60
|
+
* `NotSupportedError` 이고, `connectedCallback` 은 재연결마다 다시 돈다.
|
|
61
|
+
*/
|
|
62
|
+
private readonly internals;
|
|
53
63
|
private resizeObserver?;
|
|
54
64
|
connectedCallback(): void;
|
|
55
65
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { getLocaleStrings as r } from "../internals/locale.js";
|
|
5
5
|
import { slotHasContent as i } from "../internals/slotted.js";
|
|
@@ -11,7 +11,7 @@ import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
|
11
11
|
//#region src/components/MasterDetailLayout.ts
|
|
12
12
|
var u = class extends n {
|
|
13
13
|
constructor(...e) {
|
|
14
|
-
super(...e), this.masterSize = "22rem", this.overlayBreakpoint = 760, this.locale = "", this.hasDetail = !1, this.handleDetailClose = () => {
|
|
14
|
+
super(...e), this.masterSize = "22rem", this.overlayBreakpoint = 760, this.locale = "", this.hasDetail = !1, this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : void 0, this.handleDetailClose = () => {
|
|
15
15
|
this.fire("detail-close", { cancelable: !1 });
|
|
16
16
|
}, this.handleDetailSlotChange = (e) => {
|
|
17
17
|
this.hasDetail = i(e.target);
|
|
@@ -32,7 +32,7 @@ var u = class extends n {
|
|
|
32
32
|
super.disconnectedCallback(), this.resizeObserver?.disconnect();
|
|
33
33
|
}
|
|
34
34
|
updated(e) {
|
|
35
|
-
super.updated(e), e.has("masterSize") && this.style.setProperty("--_master-size", this.masterSize), e.has("overlayBreakpoint") && this.applyOverlay(this.getBoundingClientRect().width);
|
|
35
|
+
super.updated(e), e.has("masterSize") && this.style.setProperty("--_master-size", this.masterSize), e.has("hasDetail") && this.internals?.states?.[this.hasDetail ? "add" : "delete"]("detail"), e.has("overlayBreakpoint") && this.applyOverlay(this.getBoundingClientRect().width);
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
return o`
|
|
@@ -74,8 +74,33 @@ var t = e`
|
|
|
74
74
|
* 되돌려 전부 인쇄한다 — 덮여 있던 master 는 찍지 않는다. detail 이 비어 있으면 master 가
|
|
75
75
|
* 화면 그대로 인쇄된다(covered 는 detail 이 채워졌을 때만 붙는다).
|
|
76
76
|
* 나란히 배치 모드는 바꾸지 않는다 — 두 판이 부모 높이를 따라 풀린다.
|
|
77
|
+
*
|
|
78
|
+
* 🔴**한 판만 보일 때는 flex 뼈대를 걷는다**(오버레이 모드 · detail 없음). flex 호스트와
|
|
79
|
+
* overflow: auto 판은 둘 다 독립 서식 문맥이라, 화면 마지막 블록의 아래 여백이 레이아웃
|
|
80
|
+
* «안» 에 갇혀 그만큼 높이가 는다 — 내용 끝이 쪽 경계에서 그 여백 이내에 있으면 여백만 담긴
|
|
81
|
+
* 빈 꼬리 쪽이 찍힌다(router 아웃렛의 인쇄 수정과 같은 기전). 한 판뿐이면 flex 가 인쇄에서
|
|
82
|
+
* 할 일이 없으므로 블록 흐름으로 돌려 여백이 문서 끝까지 접히게 한다(쪽 경계에서 잘린다).
|
|
83
|
+
* ⚠**나란히 배치(detail 있음 · 오버레이 아님)는 원리적으로 가둔다** — 두 열은 flex 항목이고
|
|
84
|
+
* flex 항목은 항상 독립 서식 문맥이다. 화면에 보인 두 열을 그대로 찍는 것이 계약이다.
|
|
85
|
+
* ⚠:state() 를 모르는 엔진에서는 그 선택자만 무효가 되도록 **규칙을 나눴다** — 선택자 목록에
|
|
86
|
+
* 섞으면 목록 전체가 버려져 오버레이 규칙까지 사라진다.
|
|
77
87
|
*/
|
|
78
88
|
@media print {
|
|
89
|
+
:host([overlay]) {
|
|
90
|
+
display: block;
|
|
91
|
+
height: auto;
|
|
92
|
+
}
|
|
93
|
+
:host(:not(:state(detail))) {
|
|
94
|
+
display: block;
|
|
95
|
+
height: auto;
|
|
96
|
+
}
|
|
97
|
+
:host([overlay]) .master,
|
|
98
|
+
:host([overlay]) .detail {
|
|
99
|
+
overflow: visible;
|
|
100
|
+
}
|
|
101
|
+
:host(:not(:state(detail))) .master {
|
|
102
|
+
overflow: visible;
|
|
103
|
+
}
|
|
79
104
|
.detail-close,
|
|
80
105
|
:host([overlay]) .detail-close,
|
|
81
106
|
:host([overlay]) .master.covered {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { getLocaleStrings as r } from "../internals/locale.js";
|
|
5
5
|
import { slotHasContent as i } from "../internals/slotted.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
5
|
import { styles as i } from "./SidebarButton.styles.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
5
|
import { SidebarLink as i } from "./SidebarLink.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
5
|
import { styles as i } from "./SidebarLink.styles.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./SidebarSection.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { getLocaleStrings as r } from "../internals/locale.js";
|
|
5
5
|
import { styles as i } from "./Wizard.styles.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
3
3
|
import { property as n } from "lit/decorators.js";
|
|
4
4
|
import { UElement as r } from "@iyulab/components/dist/components/UElement.js";
|
|
5
5
|
//#region src/internals/StyledElement.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { app as e } from "../App.js";
|
|
2
2
|
import { filterSidebarItems as t } from "./filterSidebarItems.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import r from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorateMetadata.js";
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
|
|
5
5
|
import { StyledElement as i } from "../internals/StyledElement.js";
|
|
6
6
|
import { getLocaleStrings as a } from "../internals/locale.js";
|
|
7
7
|
import "../components/SidebarSection.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionBar as ActionBarElement } from '@iyulab/modern-app/dist/components/ActionBar.js';
|
|
3
|
+
|
|
4
|
+
export declare const ActionBar: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<ActionBarElement>, keyof React.HTMLAttributes<ActionBarElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<ActionBarElement>, never>
|
|
7
|
+
& React.RefAttributes<ActionBarElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type ActionBarProps = React.ComponentProps<typeof ActionBar>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { ActionBar as ActionBarElement } from '@iyulab/modern-app/dist/components/ActionBar.js';
|
|
4
|
+
|
|
5
|
+
export const ActionBar = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-action-bar',
|
|
8
|
+
elementClass: ActionBarElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmptyState as EmptyStateElement } from '@iyulab/modern-app/dist/components/EmptyState.js';
|
|
3
|
+
|
|
4
|
+
export declare const EmptyState: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<EmptyStateElement>, keyof React.HTMLAttributes<EmptyStateElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<EmptyStateElement>, never>
|
|
7
|
+
& React.RefAttributes<EmptyStateElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type EmptyStateProps = React.ComponentProps<typeof EmptyState>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { EmptyState as EmptyStateElement } from '@iyulab/modern-app/dist/components/EmptyState.js';
|
|
4
|
+
|
|
5
|
+
export const EmptyState = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-empty-state',
|
|
8
|
+
elementClass: EmptyStateElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GroupBox as GroupBoxElement } from '@iyulab/modern-app/dist/components/GroupBox.js';
|
|
3
|
+
|
|
4
|
+
export declare const GroupBox: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<GroupBoxElement>, keyof React.HTMLAttributes<GroupBoxElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<GroupBoxElement>, never>
|
|
7
|
+
& React.RefAttributes<GroupBoxElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type GroupBoxProps = React.ComponentProps<typeof GroupBox>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { GroupBox as GroupBoxElement } from '@iyulab/modern-app/dist/components/GroupBox.js';
|
|
4
|
+
|
|
5
|
+
export const GroupBox = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-group-box',
|
|
8
|
+
elementClass: GroupBoxElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InfoField as InfoFieldElement } from '@iyulab/modern-app/dist/components/InfoField.js';
|
|
3
|
+
|
|
4
|
+
export declare const InfoField: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<InfoFieldElement>, keyof React.HTMLAttributes<InfoFieldElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<InfoFieldElement>, never>
|
|
7
|
+
& React.RefAttributes<InfoFieldElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type InfoFieldProps = React.ComponentProps<typeof InfoField>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { InfoField as InfoFieldElement } from '@iyulab/modern-app/dist/components/InfoField.js';
|
|
4
|
+
|
|
5
|
+
export const InfoField = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-info-field',
|
|
8
|
+
elementClass: InfoFieldElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InfoSection as InfoSectionElement } from '@iyulab/modern-app/dist/components/InfoSection.js';
|
|
3
|
+
|
|
4
|
+
export declare const InfoSection: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<InfoSectionElement>, keyof React.HTMLAttributes<InfoSectionElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<InfoSectionElement>, never>
|
|
7
|
+
& React.RefAttributes<InfoSectionElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type InfoSectionProps = React.ComponentProps<typeof InfoSection>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { InfoSection as InfoSectionElement } from '@iyulab/modern-app/dist/components/InfoSection.js';
|
|
4
|
+
|
|
5
|
+
export const InfoSection = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-info-section',
|
|
8
|
+
elementClass: InfoSectionElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MasterDetailLayout as MasterDetailLayoutElement } from '@iyulab/modern-app/dist/components/MasterDetailLayout.js';
|
|
3
|
+
|
|
4
|
+
export declare const MasterDetailLayout: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<MasterDetailLayoutElement>, keyof React.HTMLAttributes<MasterDetailLayoutElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<MasterDetailLayoutElement>, 'onDetailClose'>
|
|
7
|
+
& React.RefAttributes<MasterDetailLayoutElement>
|
|
8
|
+
& {
|
|
9
|
+
onDetailClose?: (event: CustomEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export type MasterDetailLayoutProps = React.ComponentProps<typeof MasterDetailLayout>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { MasterDetailLayout as MasterDetailLayoutElement } from '@iyulab/modern-app/dist/components/MasterDetailLayout.js';
|
|
4
|
+
|
|
5
|
+
export const MasterDetailLayout = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-master-detail-layout',
|
|
8
|
+
elementClass: MasterDetailLayoutElement,
|
|
9
|
+
events: {
|
|
10
|
+
onDetailClose: 'detail-close',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageHeader as PageHeaderElement } from '@iyulab/modern-app/dist/components/PageHeader.js';
|
|
3
|
+
|
|
4
|
+
export declare const PageHeader: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<PageHeaderElement>, keyof React.HTMLAttributes<PageHeaderElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<PageHeaderElement>, never>
|
|
7
|
+
& React.RefAttributes<PageHeaderElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type PageHeaderProps = React.ComponentProps<typeof PageHeader>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { PageHeader as PageHeaderElement } from '@iyulab/modern-app/dist/components/PageHeader.js';
|
|
4
|
+
|
|
5
|
+
export const PageHeader = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-page-header',
|
|
8
|
+
elementClass: PageHeaderElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SidebarButton as SidebarButtonElement } from '@iyulab/modern-app/dist/components/SidebarButton.js';
|
|
3
|
+
|
|
4
|
+
export declare const SidebarButton: React.ForwardRefExoticComponent<
|
|
5
|
+
Omit<Partial<SidebarButtonElement>, keyof React.HTMLAttributes<SidebarButtonElement>>
|
|
6
|
+
& Omit<React.HTMLAttributes<SidebarButtonElement>, never>
|
|
7
|
+
& React.RefAttributes<SidebarButtonElement>
|
|
8
|
+
& {
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type SidebarButtonProps = React.ComponentProps<typeof SidebarButton>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { SidebarButton as SidebarButtonElement } from '@iyulab/modern-app/dist/components/SidebarButton.js';
|
|
4
|
+
|
|
5
|
+
export const SidebarButton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-sidebar-button',
|
|
8
|
+
elementClass: SidebarButtonElement,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '@iyulab/modern-app/dist/react.js';
|
|
2
|
+
export { SidebarButton, SidebarButtonProps } from './SidebarButton';
|
|
3
|
+
export { PageHeader, PageHeaderProps } from './PageHeader';
|
|
4
|
+
export { MasterDetailLayout, MasterDetailLayoutProps } from './MasterDetailLayout';
|
|
5
|
+
export { InfoSection, InfoSectionProps } from './InfoSection';
|
|
6
|
+
export { InfoField, InfoFieldProps } from './InfoField';
|
|
7
|
+
export { GroupBox, GroupBoxProps } from './GroupBox';
|
|
8
|
+
export { EmptyState, EmptyStateProps } from './EmptyState';
|
|
9
|
+
export { ActionBar, ActionBarProps } from './ActionBar';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '@iyulab/modern-app/dist/react.js';
|
|
2
|
+
export { SidebarButton } from './SidebarButton.js';
|
|
3
|
+
export { PageHeader } from './PageHeader.js';
|
|
4
|
+
export { MasterDetailLayout } from './MasterDetailLayout.js';
|
|
5
|
+
export { InfoSection } from './InfoSection.js';
|
|
6
|
+
export { InfoField } from './InfoField.js';
|
|
7
|
+
export { GroupBox } from './GroupBox.js';
|
|
8
|
+
export { EmptyState } from './EmptyState.js';
|
|
9
|
+
export { ActionBar } from './ActionBar.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/modern-app",
|
|
3
3
|
"description": "web-framework by iyulab based on lit-element",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.20.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
@@ -41,10 +41,8 @@
|
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
42
|
"import": "./dist/index.js"
|
|
43
43
|
},
|
|
44
|
-
"./react":
|
|
45
|
-
|
|
46
|
-
"import": "./dist/react.js"
|
|
47
|
-
},
|
|
44
|
+
"./react": "./dist/react/index.js",
|
|
45
|
+
"./react/*": "./dist/react/*",
|
|
48
46
|
"./dist/*": {
|
|
49
47
|
"types": "./dist/*.d.ts",
|
|
50
48
|
"import": "./dist/*"
|
|
@@ -55,17 +53,18 @@
|
|
|
55
53
|
"test": "vitest run",
|
|
56
54
|
"test:watch": "vitest",
|
|
57
55
|
"start": "vite",
|
|
58
|
-
"build": "npm run typecheck && vite build",
|
|
56
|
+
"build": "npm run typecheck && vite build && npm run test:react-types",
|
|
59
57
|
"test:browser": "vitest run --project=browser",
|
|
60
|
-
"typecheck": "tsc --noEmit"
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"test:react-types": "tsc -p tsconfig.react-smoke.json"
|
|
61
60
|
},
|
|
62
61
|
"dependencies": {
|
|
63
|
-
"@iyulab/router": "^0.
|
|
62
|
+
"@iyulab/router": "^0.15.1",
|
|
64
63
|
"i18next": "^26.3.6",
|
|
65
64
|
"lit": "^3.3.3"
|
|
66
65
|
},
|
|
67
66
|
"peerDependencies": {
|
|
68
|
-
"@iyulab/components": ">=1.
|
|
67
|
+
"@iyulab/components": ">=1.42.0",
|
|
69
68
|
"@lit/react": ">=1.0.8",
|
|
70
69
|
"react": ">=18.0.0"
|
|
71
70
|
},
|
|
@@ -89,6 +88,7 @@
|
|
|
89
88
|
"typescript": "^6.0.2",
|
|
90
89
|
"vite": "^8.1.4",
|
|
91
90
|
"vite-plugin-dts": "^5.0.3",
|
|
92
|
-
"vitest": "^5.0.0"
|
|
91
|
+
"vitest": "^5.0.0",
|
|
92
|
+
"@iyulab/components": ">=1.42.0"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -59,6 +59,14 @@ In overlay mode, a filled detail prints in full, in flow, instead of the covered
|
|
|
59
59
|
close button is not printed; with the detail empty, the master prints. The overlay state is the
|
|
60
60
|
one measured on screen when printing starts.
|
|
61
61
|
|
|
62
|
+
When a single pane is showing (overlay mode, or no detail), the layout prints as ordinary block
|
|
63
|
+
flow rather than a flex row with scrolling panes. Both of those create an independent formatting
|
|
64
|
+
context, which would keep the bottom margin of the pane's last block inside the layout and make
|
|
65
|
+
the layout that much taller — enough, when content ends just short of a page boundary, to print
|
|
66
|
+
a trailing page holding nothing but the margin. In block flow the margin collapses past the layout
|
|
67
|
+
and is truncated at the page break. Side by side, the two panes are flex items and each keeps its
|
|
68
|
+
own margin; that is inherent to printing two columns.
|
|
69
|
+
|
|
62
70
|
## Slots
|
|
63
71
|
|
|
64
72
|
| Name | Description |
|
|
@@ -80,6 +88,16 @@ one measured on screen when printing starts.
|
|
|
80
88
|
|-------|--------|------------|--------------|
|
|
81
89
|
| `detail-close` | — | No | Overlay-mode close button clicked. Clear the `detail` slot's content in response — the component does not do this for you |
|
|
82
90
|
|
|
91
|
+
## Custom States
|
|
92
|
+
|
|
93
|
+
| State | Description |
|
|
94
|
+
|-------|-------------|
|
|
95
|
+
| `:state(detail)` | Present while the `detail` slot has content |
|
|
96
|
+
|
|
97
|
+
```css
|
|
98
|
+
u-master-detail-layout:state(detail)::part(master) { border-inline-end: 0; }
|
|
99
|
+
```
|
|
100
|
+
|
|
83
101
|
## CSS Parts
|
|
84
102
|
|
|
85
103
|
| Part | Description |
|