@momoi-labs/kiso 0.8.0 → 0.9.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.
|
@@ -42,7 +42,7 @@ behavioral reference where one exists.
|
|
|
42
42
|
|
|
43
43
|
## Navigation and structure
|
|
44
44
|
|
|
45
|
-
- [AppShell / ApplicationShell](app-shell.md): Provides low-level columns or the complete shared application frame.
|
|
45
|
+
- [AppShell / ApplicationShell](app-shell.md): Provides low-level columns or the complete shared application frame (sidebar console or top-bar surface).
|
|
46
46
|
- [BrandMark](brand-mark.md): Decorative letter or icon beside a product name.
|
|
47
47
|
- [Breadcrumb](breadcrumb.md): Shows the current location within a hierarchy.
|
|
48
48
|
- [Header](header.md): Composes persistent application navigation and global actions.
|
|
@@ -64,7 +64,7 @@ behavioral reference where one exists.
|
|
|
64
64
|
## Required compositions
|
|
65
65
|
|
|
66
66
|
- [FormField](form-field.md) composes [Label](label.md) + [Input](input.md) (or another form control) + [HelperText](helper-text.md) + [ValidationMessage](validation-message.md).
|
|
67
|
-
- [ApplicationShell](app-shell.md) composes [Sidebar](sidebar.md) + [Navigation](navigation.md) + [Header](header.md) + page content.
|
|
67
|
+
- [ApplicationShell](app-shell.md) composes [Sidebar](sidebar.md) + [Navigation](navigation.md) + [Header](header.md) + page content, or a top-bar-only frame with brand in [Header](header.md).
|
|
68
68
|
- [Header](header.md) composes [Link](link.md) + [IconButton](icon-button.md) + optional [DropdownMenu](dropdown-menu.md).
|
|
69
69
|
- [Table / DataTable](table.md) composes [EmptyState](empty-state.md), [Skeleton](skeleton.md), and [Pagination](pagination.md) for empty, loading, and paged states.
|
|
70
70
|
- [PageHeader](page-header.md) composes a title + optional subtitle + [Buttons](button.md).
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
AppShell places persistent [Sidebar](sidebar.md) navigation beside the main
|
|
6
6
|
application content. It owns the page columns, not navigation state.
|
|
7
|
-
ApplicationShell composes the standard
|
|
8
|
-
|
|
7
|
+
ApplicationShell composes the standard frame when a product wants the complete
|
|
8
|
+
shared chrome — either a console with a rail, or a single-surface top bar.
|
|
9
9
|
|
|
10
10
|
## Anatomy
|
|
11
11
|
|
|
12
|
+
Console with rail (default):
|
|
13
|
+
|
|
12
14
|
```
|
|
13
15
|
AppShell
|
|
14
16
|
├── Sidebar
|
|
@@ -17,15 +19,25 @@ AppShell
|
|
|
17
19
|
└── page content
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Single-surface top bar (`layout="topbar"`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
AppShell[data-layout="topbar"]
|
|
26
|
+
└── AppShellMain
|
|
27
|
+
├── Header (brand, primaryAction, header)
|
|
28
|
+
└── page content
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The console slots are direct children. AppShell is a `div`; AppShellMain is a
|
|
21
32
|
`main` with `min-width: 0`, so wide tables and log lines cannot push the
|
|
22
33
|
Sidebar off screen. Sidebar owns its header, body, and footer.
|
|
23
34
|
|
|
24
|
-
ApplicationShell takes `brand`, optional `primaryAction`,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
ApplicationShell takes `brand`, optional `primaryAction`, optional `header`,
|
|
36
|
+
and page content. The default `layout="sidebar"` also takes navigation groups
|
|
37
|
+
and optional `footer`. A destination contains `href`, `label`, optional
|
|
38
|
+
`active`, optional `onClick`, and optional leading or trailing content. The
|
|
39
|
+
caller still decides the current destination and whether a destination follows
|
|
40
|
+
its link or changes a view in place.
|
|
29
41
|
|
|
30
42
|
```tsx
|
|
31
43
|
<ApplicationShell
|
|
@@ -46,6 +58,17 @@ a destination follows its link or changes a view in place.
|
|
|
46
58
|
</ApplicationShell>
|
|
47
59
|
```
|
|
48
60
|
|
|
61
|
+
```tsx
|
|
62
|
+
<ApplicationShell
|
|
63
|
+
layout="topbar"
|
|
64
|
+
brand={<ProductBrand />}
|
|
65
|
+
primaryAction={<CreateProject />}
|
|
66
|
+
header={<BoardChrome />}
|
|
67
|
+
>
|
|
68
|
+
{page}
|
|
69
|
+
</ApplicationShell>
|
|
70
|
+
```
|
|
71
|
+
|
|
49
72
|
When `onClick` is present, ApplicationShell prevents link navigation and calls
|
|
50
73
|
it. Without `onClick`, the destination remains a normal link. Use
|
|
51
74
|
`navigationLabel` to distinguish this navigation landmark when the default
|
|
@@ -53,17 +76,28 @@ it. Without `onClick`, the destination remains a normal link. Use
|
|
|
53
76
|
|
|
54
77
|
## Variants
|
|
55
78
|
|
|
56
|
-
|
|
57
|
-
|
|
79
|
+
`layout="sidebar"` (default) mounts Sidebar with brand and primary action in
|
|
80
|
+
SidebarHeader, navigation in SidebarBody, and optional footer. The optional
|
|
81
|
+
`header` slot stays in the main column.
|
|
82
|
+
|
|
83
|
+
`layout="topbar"` omits Sidebar entirely. Brand, optional primary action, and
|
|
84
|
+
the optional `header` slot render together in Header. Do not pass `navigation`
|
|
85
|
+
or `footer` in this mode — there is no rail to host them.
|
|
86
|
+
|
|
87
|
+
Compose [Header](header.md) and [PageHeader](page-header.md) inside the main
|
|
88
|
+
slot as the page requires when using AppShell directly.
|
|
58
89
|
|
|
59
90
|
## Sizes
|
|
60
91
|
|
|
61
92
|
The Sidebar column uses `--size-sidebar`; the main column takes the remaining
|
|
62
93
|
width with a zero minimum. The shell has a minimum height of one viewport.
|
|
63
|
-
At widths of 1023px or less,
|
|
94
|
+
At widths of 1023px or less, a sidebar layout becomes one column and Sidebar is
|
|
64
95
|
hidden. The product must provide access to navigation at that width, for
|
|
65
96
|
example through a [Drawer](drawer.md).
|
|
66
97
|
|
|
98
|
+
`layout="topbar"` is a single main column at every width. It does not rely on
|
|
99
|
+
the 1023px media query to collapse a sidebar track.
|
|
100
|
+
|
|
67
101
|
## States
|
|
68
102
|
|
|
69
103
|
The shell stays in place while page content loads, fails, or becomes empty.
|
|
@@ -77,6 +111,8 @@ Those states belong inside AppShellMain. There is no disabled or active shell.
|
|
|
77
111
|
the main content.
|
|
78
112
|
- Keep navigation available when the Sidebar is hidden. AppShell does not
|
|
79
113
|
create a mobile menu or manage its focus.
|
|
114
|
+
- A top-bar layout has no Sidebar navigation landmark; put destinations in the
|
|
115
|
+
Header or elsewhere in the product chrome.
|
|
80
116
|
|
|
81
117
|
### Keyboard
|
|
82
118
|
|
|
@@ -87,13 +123,16 @@ retain their own keyboard behavior.
|
|
|
87
123
|
|
|
88
124
|
- An application with persistent navigation beside a changing page.
|
|
89
125
|
- A console containing tables, detail panes, and logs in its main column.
|
|
90
|
-
-
|
|
126
|
+
- A single-surface product whose chrome is one top bar (`layout="topbar"`).
|
|
127
|
+
- Use ApplicationShell when the product follows one of the two standard frames.
|
|
91
128
|
- Use AppShell directly when its Sidebar or Header composition differs.
|
|
92
129
|
|
|
93
130
|
## When NOT to use
|
|
94
131
|
|
|
95
132
|
- A standalone login or centered form. Use [Card](card.md) within the page.
|
|
96
133
|
- Two resizable content panes. Use [Split](split.md) inside the main content.
|
|
134
|
+
- Hiding a required rail with CSS. Prefer `layout="topbar"` or AppShell
|
|
135
|
+
composed without Sidebar.
|
|
97
136
|
|
|
98
137
|
## Radix/shadcn mapping
|
|
99
138
|
|
package/kiso/ui.css
CHANGED
|
@@ -842,6 +842,7 @@ table.table { width: 100%; border-collapse: collapse; font-size: var(--type-size
|
|
|
842
842
|
.pagination .btn[aria-current="page"] { background: var(--color-secondary); }
|
|
843
843
|
|
|
844
844
|
.app-shell { display: grid; grid-template-columns: var(--size-sidebar) minmax(0, 1fr); min-height: 100vh; }
|
|
845
|
+
.app-shell[data-layout="topbar"] { grid-template-columns: minmax(0, 1fr); }
|
|
845
846
|
.sidebar {
|
|
846
847
|
display: flex; flex-direction: column;
|
|
847
848
|
min-width: 0;
|