@apliteni/apliteni-ui 0.197.0 → 0.198.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.
@@ -209,7 +209,8 @@ holds each line of text that the button shows, and the menu takes the same name.
209
209
  rail layout, it holds only the menu button and the mark. The menu button opens the full section
210
210
  list in a drawer. The drawer opens from the side of the menu button: the right in the topbar
211
211
  layout and the left in the rail layout. `drawerSide` chooses the side in either layout. The
212
- drawer keeps two or more group labels, and leaves out the label of one group. A press
212
+ drawer keeps two or more group labels, and leaves out the label of one group. The account stays
213
+ at the foot of the drawer, as on the rail. A press
213
214
  on a section, Escape or a wider window closes the drawer, and the focus goes back to the menu
214
215
  button.
215
216
  - Below 560px each band control is a 40px glyph with no border. The search trigger shows only its
@@ -1174,6 +1175,11 @@ at the end of a value, such as a copy button, stays on the value's line. Nothing
1174
1175
  card, a row rule or an `<hr>`. The actions stay outside the scrolling body. Under reduced motion
1175
1176
  the panel does not slide.
1176
1177
 
1178
+ **Save next to the form.** The body takes only the height of its content. In a short drawer the
1179
+ footer stands directly under the last group, so put the form in the last group and its Save in
1180
+ `footer`. A long body fills the panel and scrolls, and the footer stays at the panel's end. The
1181
+ space below the footer of a short drawer is the panel's surface.
1182
+
1177
1183
  **A key figure.** Put a `<dl class="ui-drawer__figure">` in a first group with no heading. Its
1178
1184
  `<dd>` holds a `.ui-drawer__figure-value` at 22px, with a status badge beside it.
1179
1185
 
@@ -28,6 +28,18 @@
28
28
 
29
29
  **Except:** Change one field inline, without a panel. A drawer may show groups a reader only reads.
30
30
 
31
+ ## Save under the form
32
+
33
+ <!-- rule: save-under-form -->
34
+
35
+ **Rule:** Put the form in the last group, so Save stands under it.
36
+
37
+ **Why:** Save in a far corner makes the reader search.
38
+
39
+ **Do:** Show the record first and the form last.
40
+
41
+ **Don't:** Put the form first.
42
+
31
43
  ## Grouped content
32
44
 
33
45
  <!-- rule: no-cards -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.197.0",
3
+ "version": "0.198.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -1349,6 +1349,9 @@
1349
1349
  --ui-nav-strip: 41px;
1350
1350
  --ui-app-av: 30px;
1351
1351
  }
1352
+ .ui-drawer__panel:has(> .ui-drawer__footer > .ui-app__drawer) > .ui-drawer__body {
1353
+ flex-grow: 1;
1354
+ }
1352
1355
  .ui-app__drawer .ui-app__user-trigger {
1353
1356
  width: 100%;
1354
1357
  gap: var(--space-2);
@@ -171,8 +171,12 @@
171
171
  .ui-drawer__close:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
172
172
  .ui-drawer__close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.1; }
173
173
 
174
+ /* The body takes only its content height, so a short form's footer stands directly
175
+ under the last group, next to the fields its Save saves. A long body shrinks to the
176
+ space left and scrolls, and the footer stays outside it at the panel's end.
177
+ why: docs/components.md#drawer */
174
178
  .ui-drawer__body {
175
- flex: 1 1 auto;
179
+ flex: 0 1 auto;
176
180
  min-height: 0;
177
181
  overflow-y: auto;
178
182
  padding: 20px;