@iyulab/modern-app 0.47.1 → 0.48.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 +22 -0
- package/README.md +3 -4
- package/dist/components/ActionBar.styles.js +19 -19
- package/dist/components/EmptyState.styles.js +8 -8
- package/dist/components/GroupBox.styles.js +31 -31
- package/dist/components/InfoField.styles.js +16 -16
- package/dist/components/InfoSection.styles.js +3 -3
- package/dist/components/MasterDetailLayout.styles.js +28 -28
- package/dist/components/PageHeader.styles.js +23 -23
- package/dist/components/SidebarButton.styles.js +8 -8
- package/dist/components/SidebarGroup.styles.js +16 -16
- package/dist/components/SidebarLink.styles.js +21 -21
- package/dist/components/SidebarSection.styles.js +8 -8
- package/dist/components/TimelineItem.styles.js +7 -7
- package/dist/components/Wizard.styles.js +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/internals/locale.d.ts +1 -13
- package/dist/internals/locale.js +12 -27
- package/dist/layouts/SidebarLayout.styles.js +128 -128
- package/package.json +1 -1
- package/skills/modern-app/SKILL.md +3 -4
|
@@ -2,10 +2,10 @@ import { css as e } from "lit";
|
|
|
2
2
|
//#region src/components/SidebarLink.styles.ts
|
|
3
3
|
var t = e`
|
|
4
4
|
:host {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
9
|
--link-active-bg: var(--app-sidebar-active-bg, var(--u-primary-color, #1976D2));
|
|
10
10
|
|
|
11
11
|
display: block;
|
|
@@ -38,7 +38,7 @@ var t = e`
|
|
|
38
38
|
justify-content: flex-start;
|
|
39
39
|
gap: var(--app-sidebar-item-gap, 12px);
|
|
40
40
|
padding: var(--app-sidebar-item-padding, 8px 12px);
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
box-sizing: border-box;
|
|
43
43
|
min-height: var(--u-target-size, 0px);
|
|
44
44
|
}
|
|
@@ -53,14 +53,14 @@ var t = e`
|
|
|
53
53
|
color: var(--link-icon-color, inherit);
|
|
54
54
|
font-size: var(--app-sidebar-icon-size, 20px);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
58
|
:host([selected]) u-icon {
|
|
59
59
|
color: var(--app-sidebar-active-icon-color, var(--app-sidebar-active-fg, var(--u-txt-color-inverse, #FFFFFF)));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
|
|
63
|
+
|
|
64
64
|
:host([selected]) .container::before {
|
|
65
65
|
content: '';
|
|
66
66
|
position: absolute;
|
|
@@ -71,11 +71,11 @@ var t = e`
|
|
|
71
71
|
background: var(--app-sidebar-active-indicator-color, var(--app-sidebar-active-bg, var(--u-primary-color, #1976D2)));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
79
|
span {
|
|
80
80
|
flex: 1;
|
|
81
81
|
font-size: var(--u-text-label-size, 13px);
|
|
@@ -86,11 +86,11 @@ var t = e`
|
|
|
86
86
|
text-overflow: ellipsis;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
94
|
.new-tab-hint,
|
|
95
95
|
[part~='label'][compact] {
|
|
96
96
|
position: absolute;
|
|
@@ -104,8 +104,8 @@ var t = e`
|
|
|
104
104
|
border: 0;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
|
|
108
|
+
|
|
109
109
|
.count {
|
|
110
110
|
flex: none;
|
|
111
111
|
margin-inline-start: auto;
|
|
@@ -14,14 +14,14 @@ var t = e`
|
|
|
14
14
|
padding: 8px 12px 4px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
25
|
.title {
|
|
26
26
|
color: var(--u-txt-color-weak, #616161);
|
|
27
27
|
font-size: var(--u-text-overline-size, 11px);
|
|
@@ -7,7 +7,7 @@ var t = e`
|
|
|
7
7
|
column-gap: var(--u-space-md, 12px);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
.rail {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
@@ -22,11 +22,11 @@ var t = e`
|
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
width: var(--app-timeline-marker-size, 12px);
|
|
24
24
|
height: var(--app-timeline-marker-size, 12px);
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
margin-top: calc((var(--u-text-label-size, 13px) * var(--u-text-label-leading, 1.5) - var(--app-timeline-marker-size, 12px)) / 2);
|
|
27
27
|
border-radius: 50%;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
30
|
background-color: var(--_marker, var(--u-border-color-strong, #BDBDBD));
|
|
31
31
|
color: var(--_on-marker, var(--u-txt-color, #212121));
|
|
32
32
|
border: 1px solid var(--_edge, var(--u-border-color-strong, #BDBDBD));
|
|
@@ -68,10 +68,10 @@ var t = e`
|
|
|
68
68
|
flex: 1 1 auto;
|
|
69
69
|
min-height: var(--u-space-md, 12px);
|
|
70
70
|
margin-top: var(--u-space-2xs, 4px);
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
border-left: 1px solid var(--u-border-color-strong, #BDBDBD);
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
:host(:last-child) .line {
|
|
76
76
|
display: none;
|
|
77
77
|
}
|
|
@@ -113,7 +113,7 @@ var t = e`
|
|
|
113
113
|
color: var(--u-txt-color-weak, #616161);
|
|
114
114
|
overflow-wrap: anywhere;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
.body.empty {
|
|
118
118
|
display: none;
|
|
119
119
|
}
|
|
@@ -3,8 +3,8 @@ import { css as e } from "lit";
|
|
|
3
3
|
var t = e`
|
|
4
4
|
:host {
|
|
5
5
|
display: flex;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
8
|
position: relative;
|
|
9
9
|
flex-direction: row;
|
|
10
10
|
gap: var(--u-space-xl, 20px);
|
|
@@ -42,7 +42,7 @@ var t = e`
|
|
|
42
42
|
background: none;
|
|
43
43
|
border: none;
|
|
44
44
|
padding: var(--u-space-2xs, 4px) 0;
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
min-height: var(--u-target-size, 0px);
|
|
47
47
|
font: inherit;
|
|
48
48
|
color: var(--u-txt-color-weak, #616161);
|
|
@@ -53,9 +53,9 @@ var t = e`
|
|
|
53
53
|
color: var(--u-txt-color-disabled, #BDBDBD);
|
|
54
54
|
cursor: not-allowed;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
59
|
.step[aria-disabled="true"]:not([disabled]) {
|
|
60
60
|
cursor: default;
|
|
61
61
|
opacity: 0.6;
|
|
@@ -100,9 +100,9 @@ var t = e`
|
|
|
100
100
|
gap: var(--u-space-sm, 8px);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
106
|
.announcement {
|
|
107
107
|
position: absolute;
|
|
108
108
|
overflow: hidden;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { MasterDetailLayoutEventMap } from './components/MasterDetailLayout
|
|
|
22
22
|
export { Wizard } from './components/Wizard.js';
|
|
23
23
|
export type { WizardStep, WizardStepState, WizardStepChangeDetail, WizardEventMap } from './components/Wizard.js';
|
|
24
24
|
export { translate } from './translate.js';
|
|
25
|
-
export { modernAppLocale,
|
|
25
|
+
export { modernAppLocale, getLocaleStrings, getDefaultLocale, } from './internals/locale.js';
|
|
26
26
|
export type { ModernAppLocaleStrings, ModernAppMessageKey } from './internals/locale.js';
|
|
27
27
|
export { ScreenObserver } from './internals/ScreenObserver.js';
|
|
28
28
|
export type { ScreenSize, ScreenObserverConfig, ScreenResizeEvent } from './internals/ScreenObserver.js';
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ScreenObserver as e } from "./internals/ScreenObserver.js";
|
|
2
|
-
import { getDefaultLocale as t, getLocaleStrings as n, modernAppLocale as r
|
|
3
|
-
import { EmptyState as
|
|
4
|
-
import { app as
|
|
5
|
-
import { filterSidebarItems as
|
|
6
|
-
import { PageHeader as
|
|
7
|
-
import { GroupBox as
|
|
8
|
-
import { InfoSection as
|
|
9
|
-
import { InfoField as
|
|
10
|
-
import { TimelineItem as
|
|
11
|
-
import { Timeline as
|
|
12
|
-
import { ActionBar as
|
|
13
|
-
import { MasterDetailLayout as
|
|
14
|
-
import { Wizard as
|
|
15
|
-
import { translate as
|
|
16
|
-
import { AccessDeniedError as
|
|
2
|
+
import { getDefaultLocale as t, getLocaleStrings as n, modernAppLocale as r } from "./internals/locale.js";
|
|
3
|
+
import { EmptyState as i } from "./components/EmptyState.js";
|
|
4
|
+
import { app as a } from "./App.js";
|
|
5
|
+
import { filterSidebarItems as o } from "./layouts/filterSidebarItems.js";
|
|
6
|
+
import { PageHeader as s } from "./components/PageHeader.js";
|
|
7
|
+
import { GroupBox as c } from "./components/GroupBox.js";
|
|
8
|
+
import { InfoSection as l } from "./components/InfoSection.js";
|
|
9
|
+
import { InfoField as u, isBlank as d } from "./components/InfoField.js";
|
|
10
|
+
import { TimelineItem as f } from "./components/TimelineItem.js";
|
|
11
|
+
import { Timeline as p } from "./components/Timeline.js";
|
|
12
|
+
import { ActionBar as m } from "./components/ActionBar.js";
|
|
13
|
+
import { MasterDetailLayout as h } from "./components/MasterDetailLayout.js";
|
|
14
|
+
import { Wizard as g } from "./components/Wizard.js";
|
|
15
|
+
import { translate as _ } from "./translate.js";
|
|
16
|
+
import { AccessDeniedError as v, ContentLoadError as y, ContentRenderError as b, NotFoundError as x, OutletMissingError as S, RouteError as C } from "@iyulab/router";
|
|
17
17
|
//#region src/index.ts
|
|
18
|
-
var
|
|
18
|
+
var w = a;
|
|
19
19
|
//#endregion
|
|
20
|
-
export {
|
|
20
|
+
export { v as AccessDeniedError, m as ActionBar, y as ContentLoadError, b as ContentRenderError, i as EmptyState, c as GroupBox, u as InfoField, l as InfoSection, h as MasterDetailLayout, x as NotFoundError, S as OutletMissingError, s as PageHeader, C as RouteError, e as ScreenObserver, p as Timeline, f as TimelineItem, g as Wizard, a as app, w as default, o as filterSidebarItems, t as getDefaultLocale, n as getLocaleStrings, d as isBlank, r as modernAppLocale, _ as translate };
|
|
@@ -46,19 +46,7 @@ export type ModernAppMessageKey = keyof ModernAppLocaleStrings;
|
|
|
46
46
|
/** The `modern-app` chrome-string namespace. Register translations here; pick the language with `Locale.set()`. */
|
|
47
47
|
export declare const modernAppLocale: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<keyof ModernAppLocaleStrings>;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
* `Locale.set()`. This forwards to the namespace; a function-valued `wizardStepAnnouncement` keeps
|
|
51
|
-
* working (the namespace form is a `{index}`/`{total}`/`{label}` template).
|
|
52
|
-
*/
|
|
53
|
-
export declare function registerLocale(lang: string, strings: Partial<ModernAppLocaleStrings>): void;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated Choose the language with `Locale.set()` of `@iyulab/components` — this package now
|
|
56
|
-
* follows it. When called, this still takes precedence over `Locale` for elements without their
|
|
57
|
-
* own `locale`; `setDefaultLocale(undefined)` hands the choice back to `Locale`.
|
|
58
|
-
*/
|
|
59
|
-
export declare function setDefaultLocale(lang: string | undefined): void;
|
|
60
|
-
/**
|
|
61
|
-
* Resolve every chrome string for a language tag (empty → `setDefaultLocale` → active `Locale`).
|
|
49
|
+
* Resolve every chrome string for a language tag (empty → the active `Locale`).
|
|
62
50
|
*/
|
|
63
51
|
export declare function getLocaleStrings(lang?: string): ModernAppLocaleStrings;
|
|
64
52
|
/** The English defaults — for tests and reference. */
|
package/dist/internals/locale.js
CHANGED
|
@@ -46,24 +46,12 @@ n.register("en", t), n.register("ko", {
|
|
|
46
46
|
wizardNext: "다음",
|
|
47
47
|
wizardStepAnnouncement: "{total}단계 중 {index}단계: {label}"
|
|
48
48
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (r) {
|
|
53
|
-
let t = e.toLowerCase();
|
|
54
|
-
i.set(t, r), s.wizardStepAnnouncement = a + t;
|
|
55
|
-
}
|
|
56
|
-
n.register(e, s);
|
|
49
|
+
function r(e, t, r) {
|
|
50
|
+
let i = n.textIn(e || void 0, t, r);
|
|
51
|
+
return i === t ? "" : i;
|
|
57
52
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
function c(e, t, i) {
|
|
62
|
-
let a = n.textIn(e || r, t, i);
|
|
63
|
-
return a === t ? "" : a;
|
|
64
|
-
}
|
|
65
|
-
function l(e) {
|
|
66
|
-
let t = (t) => c(e, t);
|
|
53
|
+
function i(e) {
|
|
54
|
+
let t = (t) => r(e, t);
|
|
67
55
|
return {
|
|
68
56
|
back: t("back"),
|
|
69
57
|
noDataTitle: t("noDataTitle"),
|
|
@@ -85,21 +73,18 @@ function l(e) {
|
|
|
85
73
|
pageLoading: t("pageLoading"),
|
|
86
74
|
wizardBack: t("wizardBack"),
|
|
87
75
|
wizardNext: t("wizardNext"),
|
|
88
|
-
wizardStepAnnouncement: (t, n,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
94
|
-
return o.startsWith(a) ? i.get(o.slice(22))(t, n, r) : o;
|
|
95
|
-
}
|
|
76
|
+
wizardStepAnnouncement: (t, n, i) => r(e, "wizardStepAnnouncement", {
|
|
77
|
+
index: t,
|
|
78
|
+
total: n,
|
|
79
|
+
label: i
|
|
80
|
+
})
|
|
96
81
|
};
|
|
97
82
|
}
|
|
98
|
-
function
|
|
83
|
+
function a() {
|
|
99
84
|
return {
|
|
100
85
|
...t,
|
|
101
86
|
wizardStepAnnouncement: (e, t, n) => `Step ${e} of ${t}: ${n}`
|
|
102
87
|
};
|
|
103
88
|
}
|
|
104
89
|
//#endregion
|
|
105
|
-
export {
|
|
90
|
+
export { a as getDefaultLocale, i as getLocaleStrings, n as modernAppLocale };
|