@iyulab/modern-app 0.56.2 → 0.58.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 +46 -0
- package/dist/App.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorate.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorateMetadata.js +1 -2
- package/dist/components/ActionBar.js +3 -4
- package/dist/components/ActionBar.styles.js +1 -2
- package/dist/components/EmptyState.js +3 -4
- package/dist/components/EmptyState.styles.js +1 -2
- package/dist/components/GroupBox.js +3 -4
- package/dist/components/GroupBox.styles.js +1 -2
- package/dist/components/InfoField.d.ts +5 -0
- package/dist/components/InfoField.js +25 -19
- package/dist/components/InfoField.styles.js +20 -2
- package/dist/components/InfoSection.js +3 -4
- package/dist/components/InfoSection.styles.js +1 -2
- package/dist/components/MasterDetailLayout.js +3 -4
- package/dist/components/MasterDetailLayout.styles.js +1 -2
- package/dist/components/PageHeader.js +3 -4
- package/dist/components/PageHeader.styles.js +1 -2
- package/dist/components/SidebarButton.js +3 -4
- package/dist/components/SidebarButton.styles.js +1 -2
- package/dist/components/SidebarGroup.d.ts +9 -0
- package/dist/components/SidebarGroup.js +17 -14
- package/dist/components/SidebarGroup.styles.js +1 -2
- package/dist/components/SidebarLink.d.ts +6 -0
- package/dist/components/SidebarLink.js +16 -14
- package/dist/components/SidebarLink.styles.js +2 -3
- package/dist/components/SidebarSection.js +3 -4
- package/dist/components/SidebarSection.styles.js +1 -2
- package/dist/components/Timeline.js +2 -3
- package/dist/components/Timeline.styles.js +1 -2
- package/dist/components/TimelineItem.js +3 -4
- package/dist/components/TimelineItem.styles.js +1 -2
- package/dist/components/Wizard.js +3 -4
- package/dist/components/Wizard.styles.js +1 -2
- package/dist/defaultFallback.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/internals/ScreenObserver.js +1 -2
- package/dist/internals/StyledElement.js +3 -4
- package/dist/internals/locale.js +1 -2
- package/dist/internals/nav-icon.js +1 -2
- package/dist/internals/slotted.js +1 -2
- package/dist/layouts/SidebarLayout.d.ts +18 -0
- package/dist/layouts/SidebarLayout.js +100 -76
- package/dist/layouts/SidebarLayout.styles.js +41 -7
- package/dist/layouts/SidebarLayout.types.d.ts +16 -2
- package/dist/layouts/filterSidebarItems.js +1 -2
- package/dist/react.js +1 -2
- package/dist/translate.js +0 -1
- package/dist/unsaved.js +1 -2
- package/package.json +3 -3
- package/skills/modern-app/references/components/info-field.md +22 -0
- package/skills/modern-app/references/layout.md +29 -2
|
@@ -105,6 +105,27 @@ the `trend-icon` slot:
|
|
|
105
105
|
</u-info-section>
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
A small picture beside the figure — a trend sparkline, a progress ring — goes in the `visual` slot. It sits at the end
|
|
109
|
+
of the value line, aligned to the figure's baseline edge, and takes no room when empty. The field does not draw the
|
|
110
|
+
picture: it gives it a place. Mark a decorative picture `aria-hidden="true"`; give one that carries information its own
|
|
111
|
+
name (`role="img"` and `aria-label`) (`0.57.0~`):
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<u-info-field appearance="tile" size="xl" label="Received today" .value=${48} trend="up" .trendLabel=${'+6 vs yesterday'}>
|
|
115
|
+
<svg slot="visual" aria-hidden="true" width="96" height="32" viewBox="0 0 96 32">
|
|
116
|
+
<polyline points="0,24 19,20 38,22 57,14 76,16 95,8" fill="none" stroke="currentColor" stroke-width="2" />
|
|
117
|
+
</svg>
|
|
118
|
+
</u-info-field>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Slots
|
|
122
|
+
|
|
123
|
+
| Slot | Description |
|
|
124
|
+
|------|-------------|
|
|
125
|
+
| (default) | The value, in place of the string `value` (the slot wins) |
|
|
126
|
+
| `trend-icon` | A status mark at the start of the trend line, drawn when there is a trend line |
|
|
127
|
+
| `visual` | A small picture at the end of the value line (sparkline, ring) — empty takes no room |
|
|
128
|
+
|
|
108
129
|
## CSS Parts
|
|
109
130
|
|
|
110
131
|
| Part | Description |
|
|
@@ -112,6 +133,7 @@ the `trend-icon` slot:
|
|
|
112
133
|
| `label` · `value` · `trend` | The label, the value, and the (optional) trend indicator |
|
|
113
134
|
| `unit` | The unit, inside `value` (only when `unit` is set and the value is not blank) |
|
|
114
135
|
| `description` | The supporting line (when `description` is set, or the value is blank and `blankReason` is set) |
|
|
136
|
+
| `visual` | The box holding the `visual` slot (not drawn when the slot is empty) |
|
|
115
137
|
|
|
116
138
|
## CSS Custom Properties
|
|
117
139
|
|
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
interface SidebarLayoutConfig {
|
|
7
7
|
type: 'sidebar';
|
|
8
8
|
|
|
9
|
-
/** Icon name (string) | image ({ src, alt?, href? }) | custom render function. Click navigates to `/` by default, or `href` if given (image variant). */
|
|
10
|
-
logo?: string | { src: string; alt?: string; href?: string } | ((state: SidebarState) => TemplateResult<1> | HTMLElement | string);
|
|
9
|
+
/** Icon name (string) | icon from a registered library ({ icon, lib? }) | image ({ src, alt?, href? }) | custom render function. Click navigates to `/` by default, or `href` if given (image variant). */
|
|
10
|
+
logo?: string | { icon: string; lib?: string } | { src: string; alt?: string; href?: string } | ((state: SidebarState) => TemplateResult<1> | HTMLElement | string);
|
|
11
11
|
|
|
12
12
|
/** Application title displayed beside the logo. */
|
|
13
13
|
title?: string;
|
|
14
14
|
|
|
15
|
+
/** One line under the title — what the app is. Shown in the expanded sidebar header only (hidden with the title when slim; the mobile header keeps one line). */
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
|
|
15
18
|
/** Main (top) navigation items. */
|
|
16
19
|
main?: SidebarItem[];
|
|
17
20
|
|
|
@@ -445,6 +448,30 @@ on a component such as `UInput`) — `@iyulab/router` 0.16.1 and later report `r
|
|
|
445
448
|
React has committed the screen. While the overlay is open the shell does none of this: the route
|
|
446
449
|
underneath is inert and focus stays in the panel.
|
|
447
450
|
|
|
451
|
+
## A screen without the shell
|
|
452
|
+
|
|
453
|
+
A screen that owns the whole viewport — a wall display on the production floor, a kiosk, a full-screen viewer —
|
|
454
|
+
asks for it in its route. While that screen is current the shell draws no sidebar, no mobile header and no page
|
|
455
|
+
padding; the next screen that does not ask gets them back.
|
|
456
|
+
|
|
457
|
+
```ts
|
|
458
|
+
routes: [
|
|
459
|
+
{ path: 'board', metadata: { shell: 'hidden' }, render: () => html`<floor-board></floor-board>` },
|
|
460
|
+
]
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
The screen gives the way back itself (a link to the menu) — the shell has nothing on screen to return with. The
|
|
464
|
+
state is the reflected `immersive` attribute on `u-sidebar-layout` (`0.58.0~`).
|
|
465
|
+
|
|
466
|
+
A screen can also own its background: `metadata: { theme: 'dark' }` (or `'light'`) applies that theme while the screen
|
|
467
|
+
is current, without changing or storing the user's choice (`Theme.override` from `@iyulab/components`), and the next
|
|
468
|
+
screen that does not ask returns to it. A floor board stays dark on the TV and in a browser where the user picked
|
|
469
|
+
light.
|
|
470
|
+
|
|
471
|
+
```ts
|
|
472
|
+
{ path: 'board', metadata: { shell: 'hidden', theme: 'dark' }, render: () => html`<floor-board></floor-board>` }
|
|
473
|
+
```
|
|
474
|
+
|
|
448
475
|
## Printing
|
|
449
476
|
|
|
450
477
|
On print media the shell drops its app chrome and lets the content flow across pages: the
|