@motifx-community/ui 0.1.0-beta.18 → 0.1.0-beta.20

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 (228) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/components/form/MxForm.d.ts +3 -0
  3. package/dist/components/form/form-props.d.ts +7 -0
  4. package/dist/components/formlayout/FormLayout.d.ts +21 -6
  5. package/dist/components/formlayout/form-item.d.ts +4 -3
  6. package/dist/components/formlayout/form-layout-props.d.ts +9 -5
  7. package/dist/components/formlayout/form-tab.d.ts +2 -1
  8. package/dist/components/layout/DockPanel.d.ts +16 -6
  9. package/dist/components/layout/Grid.d.ts +35 -25
  10. package/dist/components/layout/GroupBox.d.ts +14 -4
  11. package/dist/components/layout/Panel.d.ts +12 -2
  12. package/dist/components/layout/SplitContainer.d.ts +18 -6
  13. package/dist/components/layout/Stack.d.ts +29 -17
  14. package/dist/components/layout/dock-child-props.d.ts +7 -6
  15. package/dist/components/layout/dock-panel-props.d.ts +3 -2
  16. package/dist/components/layout/grid-cell.d.ts +7 -5
  17. package/dist/components/layout/grid-props.d.ts +17 -12
  18. package/dist/components/layout/group-box-props.d.ts +3 -2
  19. package/dist/components/layout/panel-props.d.ts +2 -1
  20. package/dist/components/layout/split-container-props.d.ts +9 -5
  21. package/dist/components/layout/stack-child-props.d.ts +3 -2
  22. package/dist/components/layout/stack-props.d.ts +8 -7
  23. package/dist/components/tabs/Tab.d.ts +6 -0
  24. package/dist/components/tabs/Tabs.d.ts +5 -0
  25. package/dist/components/tabs/tab-props.d.ts +7 -1
  26. package/dist/components/tabs/tabs-props.d.ts +6 -0
  27. package/dist/core/responsive.d.ts +52 -0
  28. package/dist/generated/tokens.d.ts +20 -0
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +487 -110
  31. package/dist/index.js.map +1 -1
  32. package/dist/styles.css +114 -5
  33. package/dist/tokens/index.d.ts +40 -0
  34. package/dist/tokens/index.js +20 -0
  35. package/dist/tokens/index.js.map +1 -1
  36. package/docs/accordion.md +1 -1
  37. package/docs/actionsheet.md +1 -1
  38. package/docs/appbar.md +1 -1
  39. package/docs/appmenu-api.md +1 -1
  40. package/docs/appmenu-programmatic.md +1 -1
  41. package/docs/appmenu-search.md +1 -1
  42. package/docs/appmenu.md +1 -1
  43. package/docs/avatar.md +1 -1
  44. package/docs/badge.md +1 -1
  45. package/docs/bar-gauge-angles.md +1 -1
  46. package/docs/bar-gauge-data.md +1 -1
  47. package/docs/bar-gauge-labels.md +1 -1
  48. package/docs/bar-gauge.md +1 -1
  49. package/docs/barcode.md +1 -1
  50. package/docs/bottomnavigation.md +1 -1
  51. package/docs/bottomsheet.md +1 -1
  52. package/docs/breadcrumb.md +1 -1
  53. package/docs/button.md +1 -1
  54. package/docs/buttongroup.md +1 -1
  55. package/docs/buttons.md +1 -1
  56. package/docs/calendar.md +1 -1
  57. package/docs/card.md +33 -2
  58. package/docs/chart-bars.md +1 -1
  59. package/docs/chart-candles.md +1 -1
  60. package/docs/chart-funnel.md +1 -1
  61. package/docs/chart-heatmap.md +1 -1
  62. package/docs/chart-lines.md +1 -1
  63. package/docs/chart-live.md +1 -1
  64. package/docs/chart-pie.md +1 -1
  65. package/docs/chart-radar.md +1 -1
  66. package/docs/chart-ranges.md +1 -1
  67. package/docs/chart-references.md +1 -1
  68. package/docs/chart-scatter.md +1 -1
  69. package/docs/chart-waterfall.md +1 -1
  70. package/docs/chart-zoom.md +1 -1
  71. package/docs/chart.md +1 -1
  72. package/docs/chat.md +1 -1
  73. package/docs/checkbox.md +1 -1
  74. package/docs/chip.md +1 -1
  75. package/docs/choice.md +1 -1
  76. package/docs/colorbox.md +1 -1
  77. package/docs/combobox.md +1 -1
  78. package/docs/commands.md +1 -1
  79. package/docs/control.md +1 -1
  80. package/docs/data.md +1 -1
  81. package/docs/datagrid-api.md +1 -1
  82. package/docs/datagrid-bands.md +1 -1
  83. package/docs/datagrid-drag-select.md +1 -1
  84. package/docs/datagrid-drag.md +1 -1
  85. package/docs/datagrid-editing.md +1 -1
  86. package/docs/datagrid-filtering.md +1 -1
  87. package/docs/datagrid-forms.md +1 -1
  88. package/docs/datagrid-grouping.md +1 -1
  89. package/docs/datagrid-layout.md +1 -1
  90. package/docs/datagrid-lookups.md +1 -1
  91. package/docs/datagrid-master-detail.md +1 -1
  92. package/docs/datagrid-scrolling.md +1 -1
  93. package/docs/datagrid-selection.md +1 -1
  94. package/docs/datagrid.md +1 -1
  95. package/docs/datebox.md +1 -1
  96. package/docs/daterangebox.md +1 -1
  97. package/docs/diagram-api.md +1 -1
  98. package/docs/diagram-commands.md +1 -1
  99. package/docs/diagram-connections.md +1 -1
  100. package/docs/diagram-custom-nodes.md +1 -1
  101. package/docs/diagram-designer.md +1 -1
  102. package/docs/diagram-editing.md +1 -1
  103. package/docs/diagram-flow.md +1 -1
  104. package/docs/diagram-keyboard.md +1 -1
  105. package/docs/diagram-layout.md +1 -1
  106. package/docs/diagram-nodes.md +1 -1
  107. package/docs/diagram-tables.md +1 -1
  108. package/docs/diagram.md +1 -1
  109. package/docs/display.md +1 -1
  110. package/docs/draggable.md +1 -1
  111. package/docs/drawer.md +1 -1
  112. package/docs/dropdown.md +1 -1
  113. package/docs/editors.md +1 -1
  114. package/docs/expressioneditor.md +1 -1
  115. package/docs/expressions.md +1 -1
  116. package/docs/feedback.md +1 -1
  117. package/docs/fileuploader.md +1 -1
  118. package/docs/filterbuilder.md +1 -1
  119. package/docs/formlayout-schema.md +1 -1
  120. package/docs/formlayout.md +52 -6
  121. package/docs/foundations.md +1 -1
  122. package/docs/gallery.md +1 -1
  123. package/docs/gauge-base.md +1 -1
  124. package/docs/gauge-circular.md +1 -1
  125. package/docs/gauge-dashboards.md +1 -1
  126. package/docs/gauge-linear.md +1 -1
  127. package/docs/gauge-markers.md +1 -1
  128. package/docs/gauge-marks.md +1 -1
  129. package/docs/gauge-ranges.md +1 -1
  130. package/docs/gauge-scales.md +1 -1
  131. package/docs/gauge.md +1 -1
  132. package/docs/home.md +1 -1
  133. package/docs/keyboard.md +1 -1
  134. package/docs/language.md +1 -1
  135. package/docs/layout.md +102 -29
  136. package/docs/listbox.md +1 -1
  137. package/docs/loadpanel.md +1 -1
  138. package/docs/lookup.md +1 -1
  139. package/docs/markdown.md +1 -1
  140. package/docs/menus-api.md +1 -1
  141. package/docs/menus-context.md +1 -1
  142. package/docs/menus-customization.md +1 -1
  143. package/docs/menus-merging.md +1 -1
  144. package/docs/menus-programmatic.md +1 -1
  145. package/docs/menus.md +1 -1
  146. package/docs/multiview.md +1 -1
  147. package/docs/navigation.md +1 -1
  148. package/docs/numberbox.md +1 -1
  149. package/docs/otpinput.md +1 -1
  150. package/docs/pagination.md +1 -1
  151. package/docs/pivotgrid-api.md +1 -1
  152. package/docs/pivotgrid-chart.md +1 -1
  153. package/docs/pivotgrid-drilldown.md +1 -1
  154. package/docs/pivotgrid-export.md +1 -1
  155. package/docs/pivotgrid-fields.md +1 -1
  156. package/docs/pivotgrid-keyboard.md +1 -1
  157. package/docs/pivotgrid-layout.md +1 -1
  158. package/docs/pivotgrid-panel.md +1 -1
  159. package/docs/pivotgrid-remote.md +1 -1
  160. package/docs/pivotgrid-sorting.md +1 -1
  161. package/docs/pivotgrid-state.md +1 -1
  162. package/docs/pivotgrid-summaries.md +1 -1
  163. package/docs/pivotgrid.md +1 -1
  164. package/docs/popover.md +1 -1
  165. package/docs/progress.md +1 -1
  166. package/docs/qrcode.md +1 -1
  167. package/docs/radiogroup.md +1 -1
  168. package/docs/rating.md +1 -1
  169. package/docs/resizable.md +1 -1
  170. package/docs/ribbonmenu-api.md +1 -1
  171. package/docs/ribbonmenu-commands.md +1 -1
  172. package/docs/ribbonmenu-customization.md +1 -1
  173. package/docs/ribbonmenu-display.md +1 -1
  174. package/docs/ribbonmenu-layouts.md +1 -1
  175. package/docs/ribbonmenu-programmatic.md +1 -1
  176. package/docs/ribbonmenu.md +1 -1
  177. package/docs/scheduler-agenda.md +1 -1
  178. package/docs/scheduler-big-data.md +1 -1
  179. package/docs/scheduler-editing.md +1 -1
  180. package/docs/scheduler-form.md +1 -1
  181. package/docs/scheduler-icalendar.md +1 -1
  182. package/docs/scheduler-mobile.md +1 -1
  183. package/docs/scheduler-recurrence.md +1 -1
  184. package/docs/scheduler-resources.md +1 -1
  185. package/docs/scheduler-timeline.md +1 -1
  186. package/docs/scheduler.md +1 -1
  187. package/docs/scrollview.md +1 -1
  188. package/docs/shortcuteditor.md +1 -1
  189. package/docs/showcase-flowstudio.md +1 -1
  190. package/docs/showcase-home.md +1 -1
  191. package/docs/showcase-mail.md +1 -1
  192. package/docs/showcase.md +1 -1
  193. package/docs/signature.md +1 -1
  194. package/docs/skeleton.md +1 -1
  195. package/docs/slider.md +1 -1
  196. package/docs/sortable.md +1 -1
  197. package/docs/sparkline.md +1 -1
  198. package/docs/speeddial.md +1 -1
  199. package/docs/splitter.md +1 -1
  200. package/docs/stepper.md +1 -1
  201. package/docs/switch.md +1 -1
  202. package/docs/tabdocs-dock.md +1 -1
  203. package/docs/tabdocs-drag.md +1 -1
  204. package/docs/tabdocs-menus.md +1 -1
  205. package/docs/tabdocs-mobile.md +1 -1
  206. package/docs/tabdocs-tabs.md +1 -1
  207. package/docs/tabdocs-windows.md +1 -1
  208. package/docs/tabdocs-workspace.md +1 -1
  209. package/docs/tabdocs.md +1 -1
  210. package/docs/tabs.md +58 -1
  211. package/docs/tagbox.md +1 -1
  212. package/docs/textarea.md +1 -1
  213. package/docs/textbox.md +1 -1
  214. package/docs/tileview.md +1 -1
  215. package/docs/timeline.md +1 -1
  216. package/docs/toast.md +1 -1
  217. package/docs/tokens.md +9 -1
  218. package/docs/toolbar-api.md +1 -1
  219. package/docs/toolbar-customization.md +1 -1
  220. package/docs/toolbar.md +1 -1
  221. package/docs/tooltip.md +1 -1
  222. package/docs/treeview.md +2 -2
  223. package/docs/validationsummary.md +1 -1
  224. package/docs/window.md +45 -1
  225. package/docs/wizard.md +1 -1
  226. package/llms-full.txt +485 -226
  227. package/llms.txt +1 -1
  228. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,61 @@ 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.20] - 2026-11-30
10
+
11
+ Needs `@motifx/core` 1.2.0-rc.31, `@motifx-community/data` 0.1.0-beta.3 and `@motifx-community/design-system`
12
+ 0.1.0-beta.4.
13
+
14
+ ### Added
15
+
16
+ - `firstMinSize` and `secondMinSize` of `SplitContainer` also take values per breakpoint (`{ xs: 120, md: 320 }`), so a
17
+ split that stacks its panes in a narrow room can ask less of them there (#10).
18
+
19
+ ### Changed
20
+
21
+ - `SplitContainer`: when the room cannot hold both minimum sizes, the panes share it in their proportion, instead of
22
+ the second pane keeping its minimum and the first going to almost nothing (#10).
23
+
24
+ ### Fixed
25
+
26
+ - `Card`: a `Toolbar` as the `action` no longer squeezes the title a few letters a line. The title and the toolbar
27
+ share the header evenly until either has all it needs, the title takes what is left, and the toolbar moves the items
28
+ that do not fit into its "more" menu (#11).
29
+
30
+ ## [0.1.0-beta.19] - 2026-11-30
31
+
32
+ Needs `@motifx/core` 1.2.0-rc.31, `@motifx-community/data` 0.1.0-beta.3 and `@motifx-community/design-system`
33
+ 0.1.0-beta.4, for its `breakpoint` scale.
34
+
35
+ ### Added
36
+
37
+ - Responsive layouts. Every layout prop of `Stack`, `Grid`, `DockPanel`, `Panel` and `GroupBox`, the `orientation` of
38
+ `SplitContainer`, the children's `grow`, cells, `dock` and anchors, and `columns`, `minColumnWidth`, `labelMode`, an
39
+ item's `colSpan` and a group's or a tab's `columns` of `FormLayout` also take values per breakpoint:
40
+ `columns={{ xs: 1, md: 2, xl: 4 }}`. A value holds from its breakpoint up to the next one given. The breakpoint is
41
+ that of the room the container is laid out in, its parent's content box, not the window, so a layout in a narrow
42
+ pane, a split or a window changes on a wide screen too. The widths are the design system's `breakpoint` scale (sm 560,
43
+ md 768, lg 1024, xl 1440 px) through the new `layout.breakpoint` tokens, which a theme can change. Only a container
44
+ given a value per breakpoint follows its room, with the size observer, and its first frame is already laid out by
45
+ it; `breakpoint` on each container tells the one it is at, and reactively. `Responsive`, `Breakpoint`,
46
+ `isPerBreakpoint`, `valueAt` and `breakpointOf` are exported.
47
+ - `padding` on `Tabs`, `Tab` (inherited from the tabs) and `MxForm`: the space inside a panel's or the content area's
48
+ edges, one to four values as in CSS.
49
+
50
+ ### Changed
51
+
52
+ - In tabs given a height, the shown panel fills the room under the strip and what is longer scrolls in the panel, with
53
+ the scroll bar at its edge. A panel or a form's content area that holds only a part that scrolls by itself
54
+ (`DataGrid`, `PivotGrid`, `TreeView`, `ScrollView`, `Scheduler`, `Chat`, `Diagram`, `TabDocumentManager`,
55
+ `SplitContainer`, `DockPanel`, `TileView` or a scrolling `Panel`) has no padding around it: the part fills it and its
56
+ scroll bar stands at the edge, no longer 16 or 20 px inside. A `padding` given takes precedence.
57
+
58
+ ### Fixed
59
+
60
+ - `FormLayout` with `minColumnWidth` keeps `columns` as the most columns, as documented; it laid out as many as fit.
61
+ - The boxes to write in of `Chat` take the width of their place: the composer's, the one that edits a question, and
62
+ those of the questions and the choices. They kept the field's default width of 16rem.
63
+
9
64
  ## [0.1.0-beta.18] - 2026-11-29
10
65
 
11
66
  Needs `@motifx/core` 1.2.0-rc.31 and `@motifx-community/data` 0.1.0-beta.3.
@@ -2,6 +2,7 @@ import { Component, type Bind, type ComponentBase, type Event as MotifEvent, typ
2
2
  import { FocusContainer } from '../../core/container';
3
3
  import type { Control } from '../../core/control';
4
4
  import type { IconSource } from '../../core/icon-source';
5
+ import type { LayoutSpace } from '../layout/layout-space';
5
6
  import type { FormClosedEventArgs } from './form-closed-event-args';
6
7
  import type { FormClosingEventArgs } from './form-closing-event-args';
7
8
  import type { FormEventArgs } from './form-event-args';
@@ -51,6 +52,8 @@ export declare class MxForm extends FocusContainer<HTMLDialogElement, FormProps>
51
52
  set showMinimize(value: Bind<boolean>);
52
53
  get showMaximize(): boolean;
53
54
  set showMaximize(value: Bind<boolean>);
55
+ get padding(): LayoutSpace | undefined;
56
+ set padding(value: Bind<LayoutSpace | undefined>);
54
57
  get resizable(): boolean;
55
58
  set resizable(value: Bind<boolean>);
56
59
  get movable(): boolean;
@@ -1,6 +1,7 @@
1
1
  import type { Bind, ComponentBase } from '@motifx/core';
2
2
  import type { Control, ControlProps } from '../../core/control';
3
3
  import type { IconSource } from '../../core/icon-source';
4
+ import type { LayoutSpace } from '../layout/layout-space';
4
5
  import type { FormClosedEventArgs } from './form-closed-event-args';
5
6
  import type { FormClosingEventArgs } from './form-closing-event-args';
6
7
  import type { FormEventArgs } from './form-event-args';
@@ -18,6 +19,12 @@ export interface FormProps extends ControlProps {
18
19
  content?: Bind<ComponentBase | null>;
19
20
  /** A non-scrolling row below the content, for the form's buttons. */
20
21
  footer?: Bind<ComponentBase | null>;
22
+ /**
23
+ * The space inside the content area's edges, one to four values as in CSS. When omitted, the look's; a content area
24
+ * that holds only a part that scrolls by itself (a grid, a tree, a scroll view …) has none, so its scroll bar stands
25
+ * at the edge.
26
+ */
27
+ padding?: Bind<LayoutSpace | undefined>;
21
28
  /** An icon at the start of the title bar. */
22
29
  icon?: Bind<IconSource | null>;
23
30
  /** Shows the close button in the title bar. The default is `true`. */
@@ -1,5 +1,6 @@
1
1
  import { ComponentBase, type Bind, type IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { FieldLabelMode } from '../../parts/field/field-label-mode';
4
5
  import { ValidationGroup } from '../../parts/validation/ValidationGroup';
5
6
  import type { ValidationResult } from '../../parts/validation/validation-result';
@@ -28,12 +29,16 @@ export declare class FormLayout<T extends object = Record<string, unknown>> exte
28
29
  set data(value: Bind<T | null>);
29
30
  get items(): readonly FormItem[];
30
31
  set items(value: Bind<readonly FormItem[]>);
31
- get columns(): number;
32
- set columns(value: Bind<number>);
33
- get minColumnWidth(): string;
34
- set minColumnWidth(value: Bind<string>);
35
- get labelMode(): FieldLabelMode;
36
- set labelMode(value: Bind<FieldLabelMode>);
32
+ get columns(): Responsive<number>;
33
+ set columns(value: Bind<Responsive<number>>);
34
+ get minColumnWidth(): Responsive<string>;
35
+ set minColumnWidth(value: Bind<Responsive<string>>);
36
+ get labelMode(): Responsive<FieldLabelMode>;
37
+ set labelMode(value: Bind<Responsive<FieldLabelMode>>);
38
+ /**
39
+ * The breakpoint of the room the form is laid out in, by which its values per breakpoint are picked. Reactive.
40
+ */
41
+ get breakpoint(): Breakpoint;
37
42
  get readOnly(): boolean;
38
43
  set readOnly(value: Bind<boolean>);
39
44
  /** The validation group of the form's fields. */
@@ -65,6 +70,16 @@ export declare class FormLayout<T extends object = Record<string, unknown>> exte
65
70
  private isHidden;
66
71
  /** Whether `part` is in one of this form's items that are not shown. */
67
72
  private hides;
73
+ private drawColumns;
74
+ private drawMinWidth;
75
+ /**
76
+ * A value at the form's breakpoint now: one per breakpoint starts following its width. Read in a binding, it is read
77
+ * again when the breakpoint changes.
78
+ */
79
+ private at;
80
+ private get breakpoints();
81
+ /** The breakpoint changed: the form's columns again (the bindings that picked a value per breakpoint follow it). */
82
+ private redraw;
68
83
  private get formParts();
69
84
  /** The form's own fields: those of its data object. */
70
85
  private get scope();
@@ -1,4 +1,5 @@
1
1
  import type { Bind, ComponentBase } from '@motifx/core';
2
+ import type { Responsive } from '../../core/responsive';
2
3
  import type { ButtonProps } from '../button/button-props';
3
4
  import type { ValidationRule } from '../../parts/validation/validation-rule';
4
5
  import type { FormEditorFactory } from './form-editor-factory';
@@ -27,15 +28,15 @@ export interface FormItem {
27
28
  required?: Bind<boolean>;
28
29
  rules?: Bind<readonly ValidationRule[]>;
29
30
  helpText?: Bind<string>;
30
- /** The number of columns it spans. Use `'all'` for the whole row. */
31
- colSpan?: number | 'all';
31
+ /** The number of columns it spans. Use `'all'` for the whole row. Also per breakpoint of the room the form is laid out in. */
32
+ colSpan?: Responsive<number | 'all'>;
32
33
  visible?: Bind<boolean>;
33
34
  enabled?: Bind<boolean>;
34
35
  readOnly?: Bind<boolean>;
35
36
  /** A caption over `items`, which are laid out on their own `columns`. */
36
37
  group?: Bind<string>;
37
38
  items?: readonly FormItem[];
38
- columns?: number;
39
+ columns?: Responsive<number>;
39
40
  /** Tabs, each with its own items, all of which are validated with the form. */
40
41
  tabs?: readonly FormTab[];
41
42
  /** A button. `submit` submits the form once it passes validation. */
@@ -1,5 +1,6 @@
1
1
  import type { Bind } from '@motifx/core';
2
2
  import type { ControlProps } from '../../core/control';
3
+ import type { Responsive } from '../../core/responsive';
3
4
  import type { FieldLabelMode } from '../../parts/field/field-label-mode';
4
5
  import type { ValidationResult } from '../../parts/validation/validation-result';
5
6
  import type { FormItem } from './form-item';
@@ -8,12 +9,15 @@ export interface FormLayoutProps<T extends object> extends ControlProps {
8
9
  /** The object the editors display and change, usually a reactive one. */
9
10
  data?: Bind<T | null>;
10
11
  items?: Bind<readonly FormItem[]>;
11
- /** The number of grid columns. The default is `1`. */
12
- columns?: Bind<number>;
13
- /** As many columns as fit, each at least this wide (a CSS length). `columns` sets the maximum. */
14
- minColumnWidth?: Bind<string>;
12
+ /** The number of grid columns. The default is `1`. Also per breakpoint of the room the form is laid out in. */
13
+ columns?: Bind<Responsive<number>>;
14
+ /**
15
+ * As many columns as fit, each at least this wide (a CSS length), and no more than `columns` when it is given. Also
16
+ * per breakpoint.
17
+ */
18
+ minColumnWidth?: Bind<Responsive<string>>;
15
19
  /** Passed to every editor. The default is `'top'`. */
16
- labelMode?: Bind<FieldLabelMode>;
20
+ labelMode?: Bind<Responsive<FieldLabelMode>>;
17
21
  readOnly?: Bind<boolean>;
18
22
  /** Occurs when the form is submitted and every field is valid. */
19
23
  onValidSubmit?: (e: {
@@ -1,9 +1,10 @@
1
1
  import type { Bind } from '@motifx/core';
2
+ import type { Responsive } from '../../core/responsive';
2
3
  import type { FormItem } from './form-item';
3
4
  /** A tab of a form item's `tabs`: its caption and its own items, laid out on its own `columns`. */
4
5
  export interface FormTab {
5
6
  title: Bind<string>;
6
7
  items: readonly FormItem[];
7
- columns?: number;
8
+ columns?: Responsive<number>;
8
9
  visible?: Bind<boolean>;
9
10
  }
@@ -1,5 +1,6 @@
1
1
  import type { Bind, ComponentBase, IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { Dock } from './dock';
4
5
  import type { DockChildProps } from './dock-child-props';
5
6
  import type { DockPanelProps } from './dock-panel-props';
@@ -24,14 +25,18 @@ import type { LayoutSpace } from './layout-space';
24
25
  */
25
26
  export declare class DockPanel extends Control<HTMLDivElement, DockPanelProps> {
26
27
  constructor(props?: IBaseProp<DockPanelProps>);
27
- get gap(): LayoutSpace | undefined;
28
- set gap(value: Bind<LayoutSpace | undefined>);
29
- get padding(): LayoutSpace | undefined;
30
- set padding(value: Bind<LayoutSpace | undefined>);
31
- /** The dock position of a child, from its props or as set with {@link setDock}. */
28
+ get gap(): Responsive<LayoutSpace> | undefined;
29
+ set gap(value: Bind<Responsive<LayoutSpace> | undefined>);
30
+ get padding(): Responsive<LayoutSpace> | undefined;
31
+ set padding(value: Bind<Responsive<LayoutSpace> | undefined>);
32
+ /**
33
+ * The breakpoint of the room the panel is laid out in, by which its values per breakpoint are picked. Reactive.
34
+ */
35
+ get breakpoint(): Breakpoint;
36
+ /** The dock position of a child at the panel's breakpoint now, from its props or as set with {@link setDock}. */
32
37
  dockOf(child: ComponentBase): Dock;
33
38
  /** Docks a child programmatically: a value, or a tracked function. */
34
- setDock(child: ComponentBase, dock: Bind<Dock>): void;
39
+ setDock(child: ComponentBase, dock: Bind<Responsive<Dock>>): void;
35
40
  /** Sets the anchors of a `float` child programmatically. Each is a value or a function, and omitted fields do not change. */
36
41
  setAnchors(child: ComponentBase, anchors: Omit<DockChildProps, 'dock'>): void;
37
42
  private get settings();
@@ -39,4 +44,9 @@ export declare class DockPanel extends Control<HTMLDivElement, DockPanelProps> {
39
44
  private arrange;
40
45
  private clear;
41
46
  private write;
47
+ /** A value at the panel's breakpoint now: one per breakpoint starts following its width. */
48
+ private at;
49
+ private get breakpoints();
50
+ /** The breakpoint changed: every value given per breakpoint again. */
51
+ private redraw;
42
52
  }
@@ -1,5 +1,6 @@
1
1
  import type { Bind, ComponentBase, IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { GridCell } from './grid-cell';
4
5
  import type { GridFlow } from './grid-flow';
5
6
  import type { GridJustify } from './grid-justify';
@@ -10,7 +11,8 @@ import type { LayoutSpace } from './layout-space';
10
11
  /**
11
12
  * Rows and columns defined up front, in a CSS-like form (`columns="auto 1fr 2fr 120"`). Children fill
12
13
  * the cells in order, or declare their position in their own props: `row`, `column`, `rowSpan` and
13
- * `columnSpan`, counted from 1.
14
+ * `columnSpan`, counted from 1. Every prop but `inline`, and every cell, also takes values per breakpoint of the
15
+ * room the grid is laid out in (`columns={{ xs: 1, md: '240 1fr' }}`).
14
16
  *
15
17
  * @example
16
18
  * <Grid columns="auto 1fr" gap="sm">
@@ -23,35 +25,43 @@ import type { LayoutSpace } from './layout-space';
23
25
  */
24
26
  export declare class Grid extends Control<HTMLDivElement, GridProps> {
25
27
  constructor(props?: IBaseProp<GridProps>);
26
- get rows(): GridTracks | undefined;
27
- set rows(value: Bind<GridTracks | undefined>);
28
- get columns(): GridTracks | undefined;
29
- set columns(value: Bind<GridTracks | undefined>);
30
- get gap(): LayoutSpace | undefined;
31
- set gap(value: Bind<LayoutSpace | undefined>);
32
- get rowGap(): LayoutSpace | undefined;
33
- set rowGap(value: Bind<LayoutSpace | undefined>);
34
- get columnGap(): LayoutSpace | undefined;
35
- set columnGap(value: Bind<LayoutSpace | undefined>);
36
- get padding(): LayoutSpace | undefined;
37
- set padding(value: Bind<LayoutSpace | undefined>);
38
- get autoRows(): number | string | undefined;
39
- set autoRows(value: Bind<number | string | undefined>);
40
- get autoColumns(): number | string | undefined;
41
- set autoColumns(value: Bind<number | string | undefined>);
42
- get flow(): GridFlow;
43
- set flow(value: Bind<GridFlow>);
44
- get align(): LayoutAlign;
45
- set align(value: Bind<LayoutAlign>);
46
- get justify(): GridJustify;
47
- set justify(value: Bind<GridJustify>);
28
+ get rows(): Responsive<GridTracks> | undefined;
29
+ set rows(value: Bind<Responsive<GridTracks> | undefined>);
30
+ get columns(): Responsive<GridTracks> | undefined;
31
+ set columns(value: Bind<Responsive<GridTracks> | undefined>);
32
+ get gap(): Responsive<LayoutSpace> | undefined;
33
+ set gap(value: Bind<Responsive<LayoutSpace> | undefined>);
34
+ get rowGap(): Responsive<LayoutSpace> | undefined;
35
+ set rowGap(value: Bind<Responsive<LayoutSpace> | undefined>);
36
+ get columnGap(): Responsive<LayoutSpace> | undefined;
37
+ set columnGap(value: Bind<Responsive<LayoutSpace> | undefined>);
38
+ get padding(): Responsive<LayoutSpace> | undefined;
39
+ set padding(value: Bind<Responsive<LayoutSpace> | undefined>);
40
+ get autoRows(): Responsive<number | string> | undefined;
41
+ set autoRows(value: Bind<Responsive<number | string> | undefined>);
42
+ get autoColumns(): Responsive<number | string> | undefined;
43
+ set autoColumns(value: Bind<Responsive<number | string> | undefined>);
44
+ get flow(): Responsive<GridFlow>;
45
+ set flow(value: Bind<Responsive<GridFlow>>);
46
+ get align(): Responsive<LayoutAlign>;
47
+ set align(value: Bind<Responsive<LayoutAlign>>);
48
+ get justify(): Responsive<GridJustify>;
49
+ set justify(value: Bind<Responsive<GridJustify>>);
48
50
  get inline(): boolean;
49
51
  set inline(value: Bind<boolean>);
52
+ /**
53
+ * The breakpoint of the room the grid is laid out in, by which its values per breakpoint are picked. Reactive.
54
+ */
55
+ get breakpoint(): Breakpoint;
50
56
  /** The cell of a child, from its props or as set with {@link setCell}. */
51
57
  cellOf(child: ComponentBase): GridCell;
52
58
  /** Places a child programmatically. Each field is a value or a tracked function, and omitted fields do not change. */
53
59
  setCell(child: ComponentBase, cell: GridCell): void;
54
60
  private get settings();
55
- private place;
56
- private writeStyle;
61
+ private placeChild;
62
+ /** A value at the grid's breakpoint now: one per breakpoint starts following its width. */
63
+ private at;
64
+ private get breakpoints();
65
+ /** The breakpoint changed: every value given per breakpoint again. */
66
+ private redraw;
57
67
  }
@@ -1,5 +1,6 @@
1
1
  import { type Bind, type Component, type Event as MotifEvent, type IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { GroupBoxProps } from './group-box-props';
4
5
  import type { GroupBoxToggledEventArgs } from './group-box-toggled-event-args';
5
6
  import type { GroupBoxVariant } from './group-box-variant';
@@ -28,10 +29,14 @@ export declare class GroupBox extends Control<HTMLFieldSetElement, GroupBoxProps
28
29
  set collapsible(value: Bind<boolean>);
29
30
  get collapsed(): boolean;
30
31
  set collapsed(value: Bind<boolean>);
31
- get padding(): LayoutSpace | undefined;
32
- set padding(value: Bind<LayoutSpace | undefined>);
33
- get gap(): LayoutSpace | undefined;
34
- set gap(value: Bind<LayoutSpace | undefined>);
32
+ get padding(): Responsive<LayoutSpace> | undefined;
33
+ set padding(value: Bind<Responsive<LayoutSpace> | undefined>);
34
+ get gap(): Responsive<LayoutSpace> | undefined;
35
+ set gap(value: Bind<Responsive<LayoutSpace> | undefined>);
36
+ /**
37
+ * The breakpoint of the room the group box is laid out in, by which its values per breakpoint are picked. Reactive.
38
+ */
39
+ get breakpoint(): Breakpoint;
35
40
  get variant(): GroupBoxVariant;
36
41
  set variant(value: Bind<GroupBoxVariant>);
37
42
  /** Occurs when the content is shown or hidden, by the user or by code (`e.byUser`). */
@@ -50,6 +55,11 @@ export declare class GroupBox extends Control<HTMLFieldSetElement, GroupBoxProps
50
55
  /** Moves focus to `item` when it takes focus itself, else to the first Tab stop inside it. */
51
56
  private focusStop;
52
57
  private change;
58
+ /** A value at the group box's breakpoint now: one per breakpoint starts following its width. */
59
+ private at;
60
+ private get breakpoints();
61
+ /** The breakpoint changed: every value given per breakpoint again. */
62
+ private redraw;
53
63
  private renderTitle;
54
64
  private renderToggle;
55
65
  private renderCollapsed;
@@ -1,5 +1,6 @@
1
1
  import type { Bind, IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { LayoutSpace } from './layout-space';
4
5
  import type { PanelProps } from './panel-props';
5
6
  import type { PanelScroll } from './panel-scroll';
@@ -18,12 +19,21 @@ export declare class Panel extends Control<HTMLDivElement, PanelProps> {
18
19
  constructor(props?: IBaseProp<PanelProps>);
19
20
  get scrollable(): PanelScroll;
20
21
  set scrollable(value: Bind<PanelScroll>);
21
- get padding(): LayoutSpace | undefined;
22
- set padding(value: Bind<LayoutSpace | undefined>);
22
+ get padding(): Responsive<LayoutSpace> | undefined;
23
+ set padding(value: Bind<Responsive<LayoutSpace> | undefined>);
24
+ /**
25
+ * The breakpoint of the room the panel is laid out in, by which its values per breakpoint are picked. Reactive.
26
+ */
27
+ get breakpoint(): Breakpoint;
23
28
  get variant(): PanelVariant;
24
29
  set variant(value: Bind<PanelVariant>);
25
30
  get focusPart(): Control | null;
26
31
  protected applyProperty(name: string, value: unknown): void;
32
+ /** A value at the panel's breakpoint now: one per breakpoint starts following its width. */
33
+ private at;
34
+ private get breakpoints();
35
+ /** The breakpoint changed: every value given per breakpoint again. */
36
+ private redraw;
27
37
  private renderName;
28
38
  private renderScroll;
29
39
  }
@@ -1,5 +1,6 @@
1
1
  import { Component, type Bind, type ComponentBase, type Event as MotifEvent, type IBaseProp } from '@motifx/core';
2
2
  import { FocusContainer } from '../../core/container';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { LayoutOrientation } from './layout-orientation';
4
5
  import { Panel } from './Panel';
5
6
  import type { SplitContainerProps } from './split-container-props';
@@ -30,10 +31,14 @@ export declare class SplitContainer extends FocusContainer<HTMLDivElement, Split
30
31
  get first(): Panel;
31
32
  /** The second pane (end or bottom), as a `Panel`. */
32
33
  get second(): Panel;
34
+ /**
35
+ * The breakpoint of the room the container is laid out in, by which its values per breakpoint are picked. Reactive.
36
+ */
37
+ get breakpoint(): Breakpoint;
33
38
  /** The splitter part (`role="separator"`). */
34
39
  get splitterPart(): Component<HTMLDivElement>;
35
- get orientation(): LayoutOrientation;
36
- set orientation(value: Bind<LayoutOrientation>);
40
+ get orientation(): Responsive<LayoutOrientation>;
41
+ set orientation(value: Bind<Responsive<LayoutOrientation>>);
37
42
  get position(): SplitPosition;
38
43
  set position(value: Bind<SplitPosition>);
39
44
  /** Maps to `position` for `x-model`. */
@@ -41,10 +46,10 @@ export declare class SplitContainer extends FocusContainer<HTMLDivElement, Split
41
46
  set value(value: SplitPosition);
42
47
  get fixedPanel(): SplitPanel;
43
48
  set fixedPanel(value: Bind<SplitPanel>);
44
- get firstMinSize(): number;
45
- set firstMinSize(value: Bind<number>);
46
- get secondMinSize(): number;
47
- set secondMinSize(value: Bind<number>);
49
+ get firstMinSize(): Responsive<number>;
50
+ set firstMinSize(value: Bind<Responsive<number>>);
51
+ get secondMinSize(): Responsive<number>;
52
+ set secondMinSize(value: Bind<Responsive<number>>);
48
53
  get collapsed(): SplitPanel;
49
54
  set collapsed(value: Bind<SplitPanel>);
50
55
  get resizable(): boolean;
@@ -66,6 +71,13 @@ export declare class SplitContainer extends FocusContainer<HTMLDivElement, Split
66
71
  private get parts();
67
72
  private createParts;
68
73
  private get horizontal();
74
+ /** The minimum sizes of the panes at the container's breakpoint now, in pixels. */
75
+ private get minSizes();
76
+ /** A value at the container's breakpoint now: one per breakpoint starts following its width. */
77
+ private at;
78
+ private get breakpoints();
79
+ /** The breakpoint changed: every value given per breakpoint again. */
80
+ private redraw;
69
81
  private route;
70
82
  private renderLayout;
71
83
  private tracks;
@@ -1,5 +1,6 @@
1
1
  import type { Bind, ComponentBase, IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
+ import { type Breakpoint, type Responsive } from '../../core/responsive';
3
4
  import type { LayoutAlign } from './layout-align';
4
5
  import type { LayoutOrientation } from './layout-orientation';
5
6
  import type { LayoutSpace } from './layout-space';
@@ -7,7 +8,8 @@ import type { StackJustify } from './stack-justify';
7
8
  import type { StackProps } from './stack-props';
8
9
  /**
9
10
  * Children in a row or a column with a gap between them, aligned across the direction and spread
10
- * along it, with optional wrapping. A child that sets `grow` takes the free space.
11
+ * along it, with optional wrapping. A child that sets `grow` takes the free space. Every prop but `inline`, and `grow`,
12
+ * also takes values per breakpoint of the room the stack is laid out in (`orientation={{ xs: 'vertical', md: 'horizontal' }}`).
11
13
  *
12
14
  * @example
13
15
  * <Stack orientation="horizontal" gap="sm" align="center">
@@ -20,26 +22,36 @@ import type { StackProps } from './stack-props';
20
22
  */
21
23
  export declare class Stack extends Control<HTMLDivElement, StackProps> {
22
24
  constructor(props?: IBaseProp<StackProps>);
23
- get orientation(): LayoutOrientation;
24
- set orientation(value: Bind<LayoutOrientation>);
25
- get gap(): LayoutSpace | undefined;
26
- set gap(value: Bind<LayoutSpace | undefined>);
27
- get padding(): LayoutSpace | undefined;
28
- set padding(value: Bind<LayoutSpace | undefined>);
29
- get align(): LayoutAlign;
30
- set align(value: Bind<LayoutAlign>);
31
- get justify(): StackJustify;
32
- set justify(value: Bind<StackJustify>);
33
- get wrap(): boolean;
34
- set wrap(value: Bind<boolean>);
35
- get reverse(): boolean;
36
- set reverse(value: Bind<boolean>);
25
+ get orientation(): Responsive<LayoutOrientation>;
26
+ set orientation(value: Bind<Responsive<LayoutOrientation>>);
27
+ get gap(): Responsive<LayoutSpace> | undefined;
28
+ set gap(value: Bind<Responsive<LayoutSpace> | undefined>);
29
+ get padding(): Responsive<LayoutSpace> | undefined;
30
+ set padding(value: Bind<Responsive<LayoutSpace> | undefined>);
31
+ get align(): Responsive<LayoutAlign>;
32
+ set align(value: Bind<Responsive<LayoutAlign>>);
33
+ get justify(): Responsive<StackJustify>;
34
+ set justify(value: Bind<Responsive<StackJustify>>);
35
+ get wrap(): Responsive<boolean>;
36
+ set wrap(value: Bind<Responsive<boolean>>);
37
+ get reverse(): Responsive<boolean>;
38
+ set reverse(value: Bind<Responsive<boolean>>);
37
39
  get inline(): boolean;
38
40
  set inline(value: Bind<boolean>);
41
+ /**
42
+ * The breakpoint of the room the stack is laid out in, by which its values per breakpoint are picked. Reactive.
43
+ */
44
+ get breakpoint(): Breakpoint;
39
45
  /** The `grow` of a child, from its props or as set with {@link setGrow}. */
40
- growOf(child: ComponentBase): boolean | number;
46
+ growOf(child: ComponentBase): Responsive<boolean | number>;
41
47
  /** Sets a child's `grow` programmatically: a value, or a tracked function. */
42
- setGrow(child: ComponentBase, grow: Bind<boolean | number>): void;
48
+ setGrow(child: ComponentBase, grow: Bind<Responsive<boolean | number>>): void;
43
49
  private get settings();
50
+ private placeChild;
44
51
  private renderLook;
52
+ /** A value at the stack's breakpoint now: one per breakpoint starts following its width. */
53
+ private at;
54
+ private get breakpoints();
55
+ /** The breakpoint changed: every value given per breakpoint again. */
56
+ private redraw;
45
57
  }
@@ -1,16 +1,17 @@
1
1
  import type { Bind } from '@motifx/core';
2
+ import type { Responsive } from '../../core/responsive';
2
3
  import type { Dock } from './dock';
3
4
  /**
4
5
  * The props a child of a `DockPanel` sets for its position:
5
6
  * `<Panel dock="start" />`, `<Button dock="float" right={16} bottom={16} />`.
6
7
  * The edges set on a `float` child are its anchors (a number is in pixels), and `left` and `right`
7
- * together stretch it.
8
+ * together stretch it. Each also takes values per breakpoint of the room the panel is laid out in: `dock={{ xs: 'top', md: 'start' }}`.
8
9
  */
9
10
  export interface DockChildProps {
10
11
  /** The dock position. The default is `'fill'`. */
11
- dock?: Bind<Dock>;
12
- left?: Bind<number | string>;
13
- top?: Bind<number | string>;
14
- right?: Bind<number | string>;
15
- bottom?: Bind<number | string>;
12
+ dock?: Bind<Responsive<Dock>>;
13
+ left?: Bind<Responsive<number | string>>;
14
+ top?: Bind<Responsive<number | string>>;
15
+ right?: Bind<Responsive<number | string>>;
16
+ bottom?: Bind<Responsive<number | string>>;
16
17
  }
@@ -1,10 +1,11 @@
1
1
  import type { Bind } from '@motifx/core';
2
2
  import type { ControlProps } from '../../core/control';
3
+ import type { Responsive } from '../../core/responsive';
3
4
  import type { LayoutSpace } from './layout-space';
4
5
  /** Props of `DockPanel`: the shared `ControlProps` plus its own. Each prop is also a settable, reactive property. */
5
6
  export interface DockPanelProps extends ControlProps {
6
7
  /** The space between docked children and what they dock against. There is none by default. */
7
- gap?: Bind<LayoutSpace>;
8
+ gap?: Bind<Responsive<LayoutSpace>>;
8
9
  /** The space inside the edges, one to four values as in CSS. There is none by default. */
9
- padding?: Bind<LayoutSpace>;
10
+ padding?: Bind<Responsive<LayoutSpace>>;
10
11
  }
@@ -1,11 +1,13 @@
1
1
  import type { Bind } from '@motifx/core';
2
+ import type { Responsive } from '../../core/responsive';
2
3
  /**
3
4
  * The position of a child of a `Grid`, in its own props: `<TextBox row={2} column={1} columnSpan={2} />`.
4
- * Lines are counted from 1, as in CSS, and a string is passed to CSS as is (`'-1'`, `'span 2'`).
5
+ * Lines are counted from 1, as in CSS, and a string is passed to CSS as is (`'-1'`, `'span 2'`). Each also takes values
6
+ * per breakpoint of the room the grid is laid out in: `columnSpan={{ xs: 2, md: 1 }}`.
5
7
  */
6
8
  export interface GridCell {
7
- row?: Bind<number | string>;
8
- column?: Bind<number | string>;
9
- rowSpan?: Bind<number>;
10
- columnSpan?: Bind<number>;
9
+ row?: Bind<Responsive<number | string>>;
10
+ column?: Bind<Responsive<number | string>>;
11
+ rowSpan?: Bind<Responsive<number>>;
12
+ columnSpan?: Bind<Responsive<number>>;
11
13
  }