flexdesk 0.18.1 → 0.18.2

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.2 (2026-11-07)
4
+
5
+ A patch release with one addition.
6
+
7
+ ### Added
8
+
9
+ - [A flat settings panel: `variant: 'sheet'` on `createSettingsPanel`](docs/components/flow-editors.md#a-flat-panel-variant-sheet-0182): no fill, the title and description in a margin at the left, the fields beside them, a rule between two sheets. For a settings page made of several panels.
10
+
11
+ ### Changed behaviour
12
+
13
+ None. A panel created without `variant` is the card it was.
14
+
15
+ ### Fixed
16
+
17
+ - A settings panel's checkbox (a `boolean` setting) sits at the start of its field, under the label's line; it was drawn in the middle of the field's width.
18
+
19
+ ### Removed or renamed exports
20
+
21
+ None. New: the `variant` option. Classes: `.twm-flow-panel--sheet`, `.twm-flow-panel__sheet`, `.twm-flow-panel__margin`, `.twm-flow-panel__body`.
22
+
3
23
  ## 0.18.1 (2026-11-06)
4
24
 
5
25
  A patch release: what four applications asked for when they adopted 0.18.0. The
package/css/flexdesk.css CHANGED
@@ -13642,6 +13642,55 @@ button.twm-alerts__ref:hover { text-decoration: underline; }
13642
13642
  color: var(--twm-flow-warning-text);
13643
13643
  }
13644
13644
 
13645
+ /* ── the settings panel as a sheet (variant: 'sheet', 0.18.2) ──────────
13646
+ * Flat: no fill and no chip. The title and the description sit in a margin at
13647
+ * the left, the fields beside them; two sheets in a row are split by a rule, so
13648
+ * a page of them reads as one form in sections. Narrower than 560px, the margin
13649
+ * goes above the fields. */
13650
+ .twm-flow-panel--sheet {
13651
+ container-type: inline-size;
13652
+ gap: 0;
13653
+ padding: 14px 0;
13654
+ background: transparent;
13655
+ }
13656
+ .twm-flow-panel--sheet + .twm-flow-panel--sheet {
13657
+ border-top: 1px solid var(--border-subtle);
13658
+ }
13659
+ .twm-flow-panel__sheet {
13660
+ display: grid;
13661
+ grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
13662
+ gap: 10px 28px;
13663
+ align-items: start;
13664
+ }
13665
+ .twm-flow-panel__margin {
13666
+ display: flex;
13667
+ flex-direction: column;
13668
+ gap: 4px;
13669
+ min-width: 0;
13670
+ padding-top: 5px;
13671
+ }
13672
+ .twm-flow-panel__body {
13673
+ display: flex;
13674
+ flex-direction: column;
13675
+ gap: 12px;
13676
+ min-width: 0;
13677
+ }
13678
+ .twm-flow-panel--sheet .twm-flow-panel__icon { display: none; }
13679
+ .twm-flow-panel--sheet .twm-flow-panel__titles { flex-basis: auto; }
13680
+ .twm-flow-panel--sheet .twm-flow-panel__title,
13681
+ .twm-flow-panel--sheet .twm-flow-panel__title-input {
13682
+ font-size: var(--font-size-md);
13683
+ }
13684
+ .twm-flow-panel--sheet .twm-flow-panel__description {
13685
+ font-size: var(--font-size-xs);
13686
+ color: var(--twm-flow-muted);
13687
+ }
13688
+ .twm-flow-panel--sheet .twm-flow-panel__fields { gap: 10px; }
13689
+ .twm-flow-panel--sheet .twm-flow-field__label { flex-basis: 110px; }
13690
+ @container (max-width: 560px) {
13691
+ .twm-flow-panel__sheet { grid-template-columns: minmax(0, 1fr); }
13692
+ }
13693
+
13645
13694
  /* ── a field: its label, its control, its finding, its help ─────────── */
13646
13695
  .twm-flow-field {
13647
13696
  display: flex;
@@ -13787,6 +13836,7 @@ button.twm-alerts__ref:hover { text-decoration: underline; }
13787
13836
  resize: vertical;
13788
13837
  }
13789
13838
  .twm-flow-checkbox {
13839
+ align-self: flex-start;
13790
13840
  margin: 6px 0 0;
13791
13841
  accent-color: var(--twm-flow-focus);
13792
13842
  }
package/dist/flexdesk.css CHANGED
@@ -13642,6 +13642,55 @@ button.twm-alerts__ref:hover { text-decoration: underline; }
13642
13642
  color: var(--twm-flow-warning-text);
13643
13643
  }
13644
13644
 
13645
+ /* ── the settings panel as a sheet (variant: 'sheet', 0.18.2) ──────────
13646
+ * Flat: no fill and no chip. The title and the description sit in a margin at
13647
+ * the left, the fields beside them; two sheets in a row are split by a rule, so
13648
+ * a page of them reads as one form in sections. Narrower than 560px, the margin
13649
+ * goes above the fields. */
13650
+ .twm-flow-panel--sheet {
13651
+ container-type: inline-size;
13652
+ gap: 0;
13653
+ padding: 14px 0;
13654
+ background: transparent;
13655
+ }
13656
+ .twm-flow-panel--sheet + .twm-flow-panel--sheet {
13657
+ border-top: 1px solid var(--border-subtle);
13658
+ }
13659
+ .twm-flow-panel__sheet {
13660
+ display: grid;
13661
+ grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
13662
+ gap: 10px 28px;
13663
+ align-items: start;
13664
+ }
13665
+ .twm-flow-panel__margin {
13666
+ display: flex;
13667
+ flex-direction: column;
13668
+ gap: 4px;
13669
+ min-width: 0;
13670
+ padding-top: 5px;
13671
+ }
13672
+ .twm-flow-panel__body {
13673
+ display: flex;
13674
+ flex-direction: column;
13675
+ gap: 12px;
13676
+ min-width: 0;
13677
+ }
13678
+ .twm-flow-panel--sheet .twm-flow-panel__icon { display: none; }
13679
+ .twm-flow-panel--sheet .twm-flow-panel__titles { flex-basis: auto; }
13680
+ .twm-flow-panel--sheet .twm-flow-panel__title,
13681
+ .twm-flow-panel--sheet .twm-flow-panel__title-input {
13682
+ font-size: var(--font-size-md);
13683
+ }
13684
+ .twm-flow-panel--sheet .twm-flow-panel__description {
13685
+ font-size: var(--font-size-xs);
13686
+ color: var(--twm-flow-muted);
13687
+ }
13688
+ .twm-flow-panel--sheet .twm-flow-panel__fields { gap: 10px; }
13689
+ .twm-flow-panel--sheet .twm-flow-field__label { flex-basis: 110px; }
13690
+ @container (max-width: 560px) {
13691
+ .twm-flow-panel__sheet { grid-template-columns: minmax(0, 1fr); }
13692
+ }
13693
+
13645
13694
  /* ── a field: its label, its control, its finding, its help ─────────── */
13646
13695
  .twm-flow-field {
13647
13696
  display: flex;
@@ -13787,6 +13836,7 @@ button.twm-alerts__ref:hover { text-decoration: underline; }
13787
13836
  resize: vertical;
13788
13837
  }
13789
13838
  .twm-flow-checkbox {
13839
+ align-self: flex-start;
13790
13840
  margin: 6px 0 0;
13791
13841
  accent-color: var(--twm-flow-focus);
13792
13842
  }
package/dist/flow.js CHANGED
@@ -2197,11 +2197,16 @@ function createSettingsPanel({
2197
2197
  values = null,
2198
2198
  valuesNote = null,
2199
2199
  columns = null,
2200
- host = null
2200
+ host = null,
2201
+ variant = "card"
2201
2202
  } = {}) {
2202
2203
  if (!widgets?.get) throw new Error("createSettingsPanel needs a widget registry (createWidgetRegistry()).");
2204
+ if (variant !== "card" && variant !== "sheet") {
2205
+ throw new Error(`createSettingsPanel's variant is 'card' or 'sheet', not ${JSON.stringify(variant)}.`);
2206
+ }
2207
+ const sheet = variant === "sheet";
2203
2208
  const S = createStrings(strings);
2204
- const root = el("section", "twm-flow-panel");
2209
+ const root = el("section", sheet ? "twm-flow-panel twm-flow-panel--sheet" : "twm-flow-panel");
2205
2210
  root.setAttribute("role", "region");
2206
2211
  root.setAttribute("aria-label", say(S, "settings"));
2207
2212
  if (host) host.appendChild(root);
@@ -2316,15 +2321,22 @@ function createSettingsPanel({
2316
2321
  root.replaceChildren();
2317
2322
  if (!spec) return;
2318
2323
  if (isReadOnly() && readOnlyReason()) root.appendChild(el("p", "twm-flow-panel__readonly", readOnlyReason()));
2319
- root.appendChild(paintHeader());
2320
- if (spec.description) root.appendChild(el("p", "twm-flow-panel__description", spec.description));
2321
- if (spec.idLine) root.appendChild(el("div", "twm-flow-panel__id", spec.idLine));
2324
+ const margin = sheet ? el("div", "twm-flow-panel__margin") : root;
2325
+ const body = sheet ? el("div", "twm-flow-panel__body") : root;
2326
+ if (sheet) {
2327
+ const grid = el("div", "twm-flow-panel__sheet");
2328
+ grid.append(margin, body);
2329
+ root.appendChild(grid);
2330
+ }
2331
+ margin.appendChild(paintHeader());
2332
+ if (spec.description) margin.appendChild(el("p", "twm-flow-panel__description", spec.description));
2333
+ if (spec.idLine) body.appendChild(el("div", "twm-flow-panel__id", spec.idLine));
2322
2334
  findingsBox = el("ul", "twm-flow-panel__findings");
2323
2335
  findingsBox.hidden = true;
2324
- root.appendChild(findingsBox);
2336
+ body.appendChild(findingsBox);
2325
2337
  slotBefore = el("div", "twm-flow-panel__slot");
2326
2338
  slotBefore.dataset.slot = "before";
2327
- root.appendChild(slotBefore);
2339
+ body.appendChild(slotBefore);
2328
2340
  const list = el("div", "twm-flow-panel__fields");
2329
2341
  allFields = Array.isArray(spec.fields) ? spec.fields : fieldsFromSchema(spec.type?.config_schema);
2330
2342
  const drawn = visibleFields(allFields, current);
@@ -2361,10 +2373,10 @@ function createSettingsPanel({
2361
2373
  const anchor = placed(e);
2362
2374
  if (anchor === null || !keys.has(anchor)) drawExtra(e);
2363
2375
  }
2364
- root.appendChild(list);
2376
+ body.appendChild(list);
2365
2377
  slotAfter = el("div", "twm-flow-panel__slot");
2366
2378
  slotAfter.dataset.slot = "after";
2367
- root.appendChild(slotAfter);
2379
+ body.appendChild(slotAfter);
2368
2380
  paintSlots();
2369
2381
  applyFindings();
2370
2382
  }