@motifx-community/ui 0.1.0-beta.10 → 0.1.0-beta.11

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.
Files changed (163) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/toolbar/Toolbar.d.ts +2 -2
  3. package/dist/index.js +22 -7
  4. package/dist/index.js.map +1 -1
  5. package/docs/accordion.md +1 -1
  6. package/docs/actionsheet.md +1 -1
  7. package/docs/appbar.md +1 -1
  8. package/docs/appmenu-api.md +1 -1
  9. package/docs/appmenu-programmatic.md +1 -1
  10. package/docs/appmenu-search.md +1 -1
  11. package/docs/appmenu.md +1 -1
  12. package/docs/avatar.md +1 -1
  13. package/docs/badge.md +1 -1
  14. package/docs/bar-gauge-angles.md +1 -1
  15. package/docs/bar-gauge-data.md +1 -1
  16. package/docs/bar-gauge-labels.md +1 -1
  17. package/docs/bar-gauge.md +1 -1
  18. package/docs/barcode.md +1 -1
  19. package/docs/bottomnavigation.md +1 -1
  20. package/docs/bottomsheet.md +1 -1
  21. package/docs/breadcrumb.md +1 -1
  22. package/docs/button.md +2 -2
  23. package/docs/buttongroup.md +1 -1
  24. package/docs/buttons.md +3 -5
  25. package/docs/calendar.md +1 -1
  26. package/docs/card.md +1 -1
  27. package/docs/chart-bars.md +1 -1
  28. package/docs/chart-candles.md +1 -1
  29. package/docs/chart-funnel.md +1 -1
  30. package/docs/chart-heatmap.md +1 -1
  31. package/docs/chart-lines.md +1 -1
  32. package/docs/chart-live.md +1 -1
  33. package/docs/chart-pie.md +1 -1
  34. package/docs/chart-radar.md +1 -1
  35. package/docs/chart-ranges.md +1 -1
  36. package/docs/chart-references.md +1 -1
  37. package/docs/chart-scatter.md +1 -1
  38. package/docs/chart-waterfall.md +1 -1
  39. package/docs/chart-zoom.md +1 -1
  40. package/docs/chart.md +1 -1
  41. package/docs/checkbox.md +1 -1
  42. package/docs/chip.md +1 -1
  43. package/docs/choice.md +1 -1
  44. package/docs/colorbox.md +1 -1
  45. package/docs/combobox.md +1 -1
  46. package/docs/commands.md +126 -0
  47. package/docs/control.md +1 -1
  48. package/docs/data.md +1 -1
  49. package/docs/datagrid-api.md +3 -3
  50. package/docs/datagrid-bands.md +1 -1
  51. package/docs/datagrid-drag-select.md +1 -1
  52. package/docs/datagrid-drag.md +1 -1
  53. package/docs/datagrid-editing.md +107 -1
  54. package/docs/datagrid-filtering.md +11 -3
  55. package/docs/datagrid-forms.md +1 -1
  56. package/docs/datagrid-grouping.md +1 -1
  57. package/docs/datagrid-layout.md +2 -2
  58. package/docs/datagrid-lookups.md +1 -1
  59. package/docs/datagrid-master-detail.md +1 -1
  60. package/docs/datagrid-scrolling.md +1 -1
  61. package/docs/datagrid-selection.md +1 -1
  62. package/docs/datagrid.md +1 -1
  63. package/docs/datebox.md +1 -1
  64. package/docs/daterangebox.md +1 -1
  65. package/docs/display.md +1 -1
  66. package/docs/draggable.md +1 -1
  67. package/docs/drawer.md +1 -1
  68. package/docs/dropdown.md +1 -1
  69. package/docs/editors.md +3 -1
  70. package/docs/feedback.md +1 -1
  71. package/docs/fileuploader.md +1 -1
  72. package/docs/filterbuilder.md +1 -1
  73. package/docs/formlayout.md +1 -1
  74. package/docs/foundations.md +1 -1
  75. package/docs/gallery.md +1 -1
  76. package/docs/gauge-base.md +1 -1
  77. package/docs/gauge-circular.md +1 -1
  78. package/docs/gauge-dashboards.md +1 -1
  79. package/docs/gauge-linear.md +1 -1
  80. package/docs/gauge-markers.md +1 -1
  81. package/docs/gauge-marks.md +1 -1
  82. package/docs/gauge-ranges.md +1 -1
  83. package/docs/gauge-scales.md +1 -1
  84. package/docs/gauge.md +1 -1
  85. package/docs/home.md +2 -2
  86. package/docs/keyboard.md +5 -3
  87. package/docs/language.md +2 -2
  88. package/docs/layout.md +1 -1
  89. package/docs/listbox.md +1 -1
  90. package/docs/loadpanel.md +2 -2
  91. package/docs/lookup.md +1 -1
  92. package/docs/menus-api.md +142 -0
  93. package/docs/menus-context.md +126 -0
  94. package/docs/menus-customization.md +138 -0
  95. package/docs/menus-merging.md +208 -0
  96. package/docs/menus-programmatic.md +74 -0
  97. package/docs/menus.md +22 -179
  98. package/docs/multiview.md +1 -1
  99. package/docs/navigation.md +7 -2
  100. package/docs/numberbox.md +3 -3
  101. package/docs/otpinput.md +1 -1
  102. package/docs/pagination.md +1 -1
  103. package/docs/popover.md +1 -1
  104. package/docs/progress.md +3 -3
  105. package/docs/qrcode.md +1 -1
  106. package/docs/radiogroup.md +1 -1
  107. package/docs/rating.md +1 -1
  108. package/docs/resizable.md +1 -1
  109. package/docs/ribbonmenu-api.md +1 -1
  110. package/docs/ribbonmenu-commands.md +1 -1
  111. package/docs/ribbonmenu-customization.md +1 -1
  112. package/docs/ribbonmenu-display.md +1 -1
  113. package/docs/ribbonmenu-layouts.md +1 -1
  114. package/docs/ribbonmenu-programmatic.md +1 -1
  115. package/docs/ribbonmenu.md +1 -1
  116. package/docs/scheduler-agenda.md +1 -1
  117. package/docs/scheduler-big-data.md +1 -1
  118. package/docs/scheduler-editing.md +1 -1
  119. package/docs/scheduler-form.md +1 -1
  120. package/docs/scheduler-icalendar.md +1 -1
  121. package/docs/scheduler-mobile.md +1 -1
  122. package/docs/scheduler-recurrence.md +1 -1
  123. package/docs/scheduler-resources.md +1 -1
  124. package/docs/scheduler-timeline.md +1 -1
  125. package/docs/scheduler.md +1 -1
  126. package/docs/scrollview.md +1 -1
  127. package/docs/shortcuteditor.md +248 -0
  128. package/docs/showcase-home.md +1 -1
  129. package/docs/showcase.md +1 -1
  130. package/docs/signature.md +1 -1
  131. package/docs/skeleton.md +1 -1
  132. package/docs/slider.md +3 -3
  133. package/docs/sortable.md +1 -1
  134. package/docs/sparkline.md +1 -1
  135. package/docs/speeddial.md +1 -1
  136. package/docs/splitter.md +1 -1
  137. package/docs/stepper.md +1 -1
  138. package/docs/switch.md +1 -1
  139. package/docs/tabdocs-dock.md +1 -1
  140. package/docs/tabdocs-drag.md +1 -1
  141. package/docs/tabdocs-menus.md +1 -1
  142. package/docs/tabdocs-mobile.md +1 -1
  143. package/docs/tabdocs-tabs.md +1 -1
  144. package/docs/tabdocs-windows.md +1 -1
  145. package/docs/tabdocs-workspace.md +1 -1
  146. package/docs/tabdocs.md +1 -1
  147. package/docs/tabs.md +1 -1
  148. package/docs/tagbox.md +1 -1
  149. package/docs/textarea.md +1 -1
  150. package/docs/textbox.md +1 -1
  151. package/docs/tileview.md +1 -1
  152. package/docs/timeline.md +1 -1
  153. package/docs/toast.md +1 -1
  154. package/docs/tokens.md +13 -1
  155. package/docs/toolbar.md +1 -1
  156. package/docs/tooltip.md +1 -1
  157. package/docs/treeview.md +1 -1
  158. package/docs/validationsummary.md +1 -1
  159. package/docs/window.md +1 -1
  160. package/docs/wizard.md +1 -1
  161. package/llms-full.txt +3774 -2692
  162. package/llms.txt +16 -6
  163. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.0-beta.11] - 2026-11-14
10
+
11
+ ### Fixed
12
+
13
+ - `Toolbar` sized by its items (a `Card`'s `action` beside a title that takes the rest of the header) no longer stays
14
+ narrow after items hide and show again, with the others moved into the "more" menu and fewer each time (0.1.0-beta.10).
15
+ A part that comes, goes or changes size puts every part back and measures them again, as before beta.10; a bar sized
16
+ by its parts is measured again when its size changes too. Only a bar that had room to spare (its size comes from what
17
+ holds it, such as a grid's toolbar) is fitted from the sizes its observers told.
18
+
9
19
  ## [0.1.0-beta.10] - 2026-11-14
10
20
 
11
21
  Needs `@motifx/core` 1.2.0-rc.29 and `@motifx-community/data` 0.1.0-beta.1.
@@ -93,8 +93,8 @@ export declare class Toolbar extends Control<HTMLDivElement, ToolbarProps> {
93
93
  */
94
94
  private layout;
95
95
  /**
96
- * Fits the parts into the room again from their sizes as last laid out, which the size observers keep: a change of the
97
- * bar's room or of a part's size lays nothing out to read. Without them yet, it puts every part back and reads.
96
+ * Fits the parts into the room again from their sizes as last laid out, which the size observers keep, when only the
97
+ * room of a stretched bar changed: nothing is laid out to read. Without them yet, it puts every part back and reads.
98
98
  */
99
99
  private refit;
100
100
  /** Each part of the bar tells its size as the browser lays it out; a part that leaves the bar stops. */
package/dist/index.js CHANGED
@@ -24593,6 +24593,7 @@ var Toolbar = class extends Control {
24593
24593
  }
24594
24594
  );
24595
24595
  _defineProperty(this, "fitKnown", (bar) => {
24596
+ this.parts.stopRefit = null;
24596
24597
  if (bar) this.fit(bar);
24597
24598
  else this.layout();
24598
24599
  });
@@ -24626,6 +24627,8 @@ var Toolbar = class extends Control {
24626
24627
  const gap = length(vertical ? "row-gap" : "column-gap");
24627
24628
  this.parts.gap = gap;
24628
24629
  this.parts.room = room;
24630
+ const needed = [...sizes.values()].reduce((sum, size) => sum + size, 0) + gap * Math.max(0, sizes.size - 1);
24631
+ this.parts.stretched = room > needed + 1;
24629
24632
  return {
24630
24633
  kids,
24631
24634
  room,
@@ -24640,6 +24643,7 @@ var Toolbar = class extends Control {
24640
24643
  /** Moves into the "more" menu what does not fit (and what always goes there). */
24641
24644
  "fit",
24642
24645
  (bar) => {
24646
+ this.parts.measuring = false;
24643
24647
  this.parts.laidOut = bar.length;
24644
24648
  if (!this.menuMode()) return;
24645
24649
  untracked(() => {
@@ -24769,6 +24773,9 @@ var Toolbar = class extends Control {
24769
24773
  sizes: /* @__PURE__ */ new Map(),
24770
24774
  watched: /* @__PURE__ */ new Map(),
24771
24775
  out: /* @__PURE__ */ new Set(),
24776
+ stretched: false,
24777
+ measuring: false,
24778
+ stopRefit: null,
24772
24779
  moreLength: null,
24773
24780
  itemClick: new Emitter()
24774
24781
  };
@@ -24978,16 +24985,22 @@ var Toolbar = class extends Control {
24978
24985
  parts.out.clear();
24979
24986
  for (const kid of parts.laying) mark(kid.part, "data-overflowed", false);
24980
24987
  if (parts.more) mark(parts.more, "data-idle", true);
24981
- if (this.menuMode()) measure(this, this.readBar, this.fit);
24982
- else this.showOverflow([]);
24988
+ parts.stopRefit?.();
24989
+ parts.stopRefit = null;
24990
+ if (this.menuMode()) {
24991
+ parts.measuring = true;
24992
+ measure(this, this.readBar, this.fit);
24993
+ } else this.showOverflow([]);
24983
24994
  });
24984
24995
  }
24985
24996
  /**
24986
- * Fits the parts into the room again from their sizes as last laid out, which the size observers keep: a change of the
24987
- * bar's room or of a part's size lays nothing out to read. Without them yet, it puts every part back and reads.
24997
+ * Fits the parts into the room again from their sizes as last laid out, which the size observers keep, when only the
24998
+ * room of a stretched bar changed: nothing is laid out to read. Without them yet, it puts every part back and reads.
24988
24999
  */
24989
25000
  refit() {
24990
- if (this.menuMode()) measure(this, this.readKnown, this.fitKnown);
25001
+ const parts = this.parts;
25002
+ if (!this.menuMode() || parts.measuring) return;
25003
+ parts.stopRefit = measure(this, this.readKnown, this.fitKnown);
24991
25004
  }
24992
25005
  /** Each part of the bar tells its size as the browser lays it out; a part that leaves the bar stops. */
24993
25006
  watchKids(kids) {
@@ -25013,7 +25026,7 @@ var Toolbar = class extends Control {
25013
25026
  const known = parts.sizes.get(part);
25014
25027
  if (known !== void 0 && Math.abs(known - along) < .5) return;
25015
25028
  parts.sizes.set(part, along);
25016
- if (known !== void 0) this.refit();
25029
+ if (known !== void 0) this.layout();
25017
25030
  }
25018
25031
  menuMode() {
25019
25032
  return (this.peekProperty("overflow") ?? "menu") === "menu";
@@ -25124,7 +25137,9 @@ var Toolbar = class extends Control {
25124
25137
  this.motif.setDisposable(onLayout(this, "size", (size) => {
25125
25138
  const vertical = this.peekProperty("orientation") === "vertical";
25126
25139
  parts.room = vertical ? size.height : size.width;
25127
- if (Math.abs(parts.room - parts.laidOut) >= .5) this.refit();
25140
+ if (Math.abs(parts.room - parts.laidOut) < .5) return;
25141
+ if (parts.stretched) this.refit();
25142
+ else this.layout();
25128
25143
  }, { box: "content" }));
25129
25144
  }
25130
25145
  onKeyDown(e) {