@motifx-community/ui 0.1.0-beta.17 → 0.1.0-beta.19

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 (242) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/components/datagrid/DataGrid.d.ts +2 -1
  3. package/dist/components/datagrid/grid-column.d.ts +6 -0
  4. package/dist/components/datagrid/model/ColumnModel.d.ts +2 -0
  5. package/dist/components/datagrid/model/GridModel.d.ts +4 -0
  6. package/dist/components/datagrid/view/ColumnStyles.d.ts +7 -3
  7. package/dist/components/datagrid/view/GridBody.d.ts +56 -4
  8. package/dist/components/form/MxForm.d.ts +3 -0
  9. package/dist/components/form/form-props.d.ts +7 -0
  10. package/dist/components/formlayout/FormLayout.d.ts +21 -6
  11. package/dist/components/formlayout/form-item.d.ts +4 -3
  12. package/dist/components/formlayout/form-layout-props.d.ts +9 -5
  13. package/dist/components/formlayout/form-tab.d.ts +2 -1
  14. package/dist/components/layout/DockPanel.d.ts +16 -6
  15. package/dist/components/layout/Grid.d.ts +35 -25
  16. package/dist/components/layout/GroupBox.d.ts +14 -4
  17. package/dist/components/layout/Panel.d.ts +12 -2
  18. package/dist/components/layout/SplitContainer.d.ts +12 -2
  19. package/dist/components/layout/Stack.d.ts +29 -17
  20. package/dist/components/layout/dock-child-props.d.ts +7 -6
  21. package/dist/components/layout/dock-panel-props.d.ts +3 -2
  22. package/dist/components/layout/grid-cell.d.ts +7 -5
  23. package/dist/components/layout/grid-props.d.ts +17 -12
  24. package/dist/components/layout/group-box-props.d.ts +3 -2
  25. package/dist/components/layout/panel-props.d.ts +2 -1
  26. package/dist/components/layout/split-container-props.d.ts +2 -1
  27. package/dist/components/layout/stack-child-props.d.ts +3 -2
  28. package/dist/components/layout/stack-props.d.ts +8 -7
  29. package/dist/components/tabs/Tab.d.ts +6 -0
  30. package/dist/components/tabs/Tabs.d.ts +5 -0
  31. package/dist/components/tabs/tab-props.d.ts +7 -1
  32. package/dist/components/tabs/tabs-props.d.ts +6 -0
  33. package/dist/core/responsive.d.ts +52 -0
  34. package/dist/excel/index.js +1 -1
  35. package/dist/excel/index.js.map +1 -1
  36. package/dist/generated/tokens.d.ts +20 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +836 -126
  39. package/dist/index.js.map +1 -1
  40. package/dist/parts/table/RowHeights.d.ts +23 -0
  41. package/dist/parts/table/ScrollGeometry.d.ts +6 -1
  42. package/dist/parts/table/table-sheet-column.d.ts +2 -0
  43. package/dist/pdf/index.js +1 -1
  44. package/dist/pdf/index.js.map +1 -1
  45. package/dist/pdf/pdf-export-options.d.ts +4 -1
  46. package/dist/styles.css +93 -5
  47. package/dist/tokens/index.d.ts +40 -0
  48. package/dist/tokens/index.js +20 -0
  49. package/dist/tokens/index.js.map +1 -1
  50. package/docs/accordion.md +1 -1
  51. package/docs/actionsheet.md +1 -1
  52. package/docs/appbar.md +1 -1
  53. package/docs/appmenu-api.md +1 -1
  54. package/docs/appmenu-programmatic.md +1 -1
  55. package/docs/appmenu-search.md +1 -1
  56. package/docs/appmenu.md +1 -1
  57. package/docs/avatar.md +1 -1
  58. package/docs/badge.md +1 -1
  59. package/docs/bar-gauge-angles.md +1 -1
  60. package/docs/bar-gauge-data.md +1 -1
  61. package/docs/bar-gauge-labels.md +1 -1
  62. package/docs/bar-gauge.md +1 -1
  63. package/docs/barcode.md +1 -1
  64. package/docs/bottomnavigation.md +1 -1
  65. package/docs/bottomsheet.md +1 -1
  66. package/docs/breadcrumb.md +1 -1
  67. package/docs/button.md +1 -1
  68. package/docs/buttongroup.md +1 -1
  69. package/docs/buttons.md +1 -1
  70. package/docs/calendar.md +1 -1
  71. package/docs/card.md +1 -1
  72. package/docs/chart-bars.md +1 -1
  73. package/docs/chart-candles.md +1 -1
  74. package/docs/chart-funnel.md +1 -1
  75. package/docs/chart-heatmap.md +1 -1
  76. package/docs/chart-lines.md +1 -1
  77. package/docs/chart-live.md +1 -1
  78. package/docs/chart-pie.md +1 -1
  79. package/docs/chart-radar.md +1 -1
  80. package/docs/chart-ranges.md +1 -1
  81. package/docs/chart-references.md +1 -1
  82. package/docs/chart-scatter.md +1 -1
  83. package/docs/chart-waterfall.md +1 -1
  84. package/docs/chart-zoom.md +1 -1
  85. package/docs/chart.md +1 -1
  86. package/docs/chat.md +1 -1
  87. package/docs/checkbox.md +1 -1
  88. package/docs/chip.md +1 -1
  89. package/docs/choice.md +1 -1
  90. package/docs/colorbox.md +1 -1
  91. package/docs/combobox.md +1 -1
  92. package/docs/commands.md +1 -1
  93. package/docs/control.md +1 -1
  94. package/docs/data.md +1 -1
  95. package/docs/datagrid-api.md +3 -2
  96. package/docs/datagrid-bands.md +1 -1
  97. package/docs/datagrid-drag-select.md +1 -1
  98. package/docs/datagrid-drag.md +1 -1
  99. package/docs/datagrid-editing.md +1 -1
  100. package/docs/datagrid-filtering.md +1 -1
  101. package/docs/datagrid-forms.md +1 -1
  102. package/docs/datagrid-grouping.md +1 -1
  103. package/docs/datagrid-layout.md +1 -1
  104. package/docs/datagrid-lookups.md +1 -1
  105. package/docs/datagrid-master-detail.md +1 -1
  106. package/docs/datagrid-scrolling.md +77 -1
  107. package/docs/datagrid-selection.md +1 -1
  108. package/docs/datagrid.md +1 -1
  109. package/docs/datebox.md +1 -1
  110. package/docs/daterangebox.md +1 -1
  111. package/docs/diagram-api.md +1 -1
  112. package/docs/diagram-commands.md +1 -1
  113. package/docs/diagram-connections.md +1 -1
  114. package/docs/diagram-custom-nodes.md +1 -1
  115. package/docs/diagram-designer.md +1 -1
  116. package/docs/diagram-editing.md +1 -1
  117. package/docs/diagram-flow.md +1 -1
  118. package/docs/diagram-keyboard.md +1 -1
  119. package/docs/diagram-layout.md +1 -1
  120. package/docs/diagram-nodes.md +1 -1
  121. package/docs/diagram-tables.md +1 -1
  122. package/docs/diagram.md +1 -1
  123. package/docs/display.md +1 -1
  124. package/docs/draggable.md +1 -1
  125. package/docs/drawer.md +1 -1
  126. package/docs/dropdown.md +1 -1
  127. package/docs/editors.md +1 -1
  128. package/docs/expressioneditor.md +1 -1
  129. package/docs/expressions.md +1 -1
  130. package/docs/feedback.md +1 -1
  131. package/docs/fileuploader.md +1 -1
  132. package/docs/filterbuilder.md +1 -1
  133. package/docs/formlayout-schema.md +1 -1
  134. package/docs/formlayout.md +52 -6
  135. package/docs/foundations.md +1 -1
  136. package/docs/gallery.md +1 -1
  137. package/docs/gauge-base.md +1 -1
  138. package/docs/gauge-circular.md +1 -1
  139. package/docs/gauge-dashboards.md +1 -1
  140. package/docs/gauge-linear.md +1 -1
  141. package/docs/gauge-markers.md +1 -1
  142. package/docs/gauge-marks.md +1 -1
  143. package/docs/gauge-ranges.md +1 -1
  144. package/docs/gauge-scales.md +1 -1
  145. package/docs/gauge.md +1 -1
  146. package/docs/home.md +1 -1
  147. package/docs/keyboard.md +1 -1
  148. package/docs/language.md +1 -1
  149. package/docs/layout.md +101 -28
  150. package/docs/listbox.md +1 -1
  151. package/docs/loadpanel.md +1 -1
  152. package/docs/lookup.md +1 -1
  153. package/docs/markdown.md +1 -1
  154. package/docs/menus-api.md +1 -1
  155. package/docs/menus-context.md +1 -1
  156. package/docs/menus-customization.md +1 -1
  157. package/docs/menus-merging.md +1 -1
  158. package/docs/menus-programmatic.md +1 -1
  159. package/docs/menus.md +1 -1
  160. package/docs/multiview.md +1 -1
  161. package/docs/navigation.md +1 -1
  162. package/docs/numberbox.md +1 -1
  163. package/docs/otpinput.md +1 -1
  164. package/docs/pagination.md +1 -1
  165. package/docs/pivotgrid-api.md +1 -1
  166. package/docs/pivotgrid-chart.md +1 -1
  167. package/docs/pivotgrid-drilldown.md +1 -1
  168. package/docs/pivotgrid-export.md +1 -1
  169. package/docs/pivotgrid-fields.md +1 -1
  170. package/docs/pivotgrid-keyboard.md +1 -1
  171. package/docs/pivotgrid-layout.md +1 -1
  172. package/docs/pivotgrid-panel.md +1 -1
  173. package/docs/pivotgrid-remote.md +1 -1
  174. package/docs/pivotgrid-sorting.md +1 -1
  175. package/docs/pivotgrid-state.md +1 -1
  176. package/docs/pivotgrid-summaries.md +1 -1
  177. package/docs/pivotgrid.md +1 -1
  178. package/docs/popover.md +1 -1
  179. package/docs/progress.md +1 -1
  180. package/docs/qrcode.md +1 -1
  181. package/docs/radiogroup.md +1 -1
  182. package/docs/rating.md +1 -1
  183. package/docs/resizable.md +1 -1
  184. package/docs/ribbonmenu-api.md +1 -1
  185. package/docs/ribbonmenu-commands.md +1 -1
  186. package/docs/ribbonmenu-customization.md +1 -1
  187. package/docs/ribbonmenu-display.md +1 -1
  188. package/docs/ribbonmenu-layouts.md +1 -1
  189. package/docs/ribbonmenu-programmatic.md +1 -1
  190. package/docs/ribbonmenu.md +1 -1
  191. package/docs/scheduler-agenda.md +1 -1
  192. package/docs/scheduler-big-data.md +1 -1
  193. package/docs/scheduler-editing.md +1 -1
  194. package/docs/scheduler-form.md +1 -1
  195. package/docs/scheduler-icalendar.md +1 -1
  196. package/docs/scheduler-mobile.md +1 -1
  197. package/docs/scheduler-recurrence.md +1 -1
  198. package/docs/scheduler-resources.md +1 -1
  199. package/docs/scheduler-timeline.md +1 -1
  200. package/docs/scheduler.md +1 -1
  201. package/docs/scrollview.md +1 -1
  202. package/docs/shortcuteditor.md +1 -1
  203. package/docs/showcase-flowstudio.md +1 -1
  204. package/docs/showcase-home.md +1 -1
  205. package/docs/showcase-mail.md +1 -1
  206. package/docs/showcase.md +1 -1
  207. package/docs/signature.md +1 -1
  208. package/docs/skeleton.md +1 -1
  209. package/docs/slider.md +1 -1
  210. package/docs/sortable.md +1 -1
  211. package/docs/sparkline.md +1 -1
  212. package/docs/speeddial.md +1 -1
  213. package/docs/splitter.md +1 -1
  214. package/docs/stepper.md +1 -1
  215. package/docs/switch.md +1 -1
  216. package/docs/tabdocs-dock.md +1 -1
  217. package/docs/tabdocs-drag.md +1 -1
  218. package/docs/tabdocs-menus.md +1 -1
  219. package/docs/tabdocs-mobile.md +1 -1
  220. package/docs/tabdocs-tabs.md +1 -1
  221. package/docs/tabdocs-windows.md +1 -1
  222. package/docs/tabdocs-workspace.md +1 -1
  223. package/docs/tabdocs.md +1 -1
  224. package/docs/tabs.md +58 -1
  225. package/docs/tagbox.md +1 -1
  226. package/docs/textarea.md +1 -1
  227. package/docs/textbox.md +1 -1
  228. package/docs/tileview.md +1 -1
  229. package/docs/timeline.md +1 -1
  230. package/docs/toast.md +1 -1
  231. package/docs/tokens.md +9 -1
  232. package/docs/toolbar-api.md +1 -1
  233. package/docs/toolbar-customization.md +1 -1
  234. package/docs/toolbar.md +1 -1
  235. package/docs/tooltip.md +1 -1
  236. package/docs/treeview.md +2 -2
  237. package/docs/validationsummary.md +1 -1
  238. package/docs/window.md +45 -1
  239. package/docs/wizard.md +1 -1
  240. package/llms-full.txt +530 -225
  241. package/llms.txt +1 -1
  242. package/package.json +2 -2
@@ -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
  }
@@ -1,37 +1,42 @@
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 { GridFlow } from './grid-flow';
4
5
  import type { GridJustify } from './grid-justify';
5
6
  import type { GridTracks } from './grid-tracks';
6
7
  import type { LayoutAlign } from './layout-align';
7
8
  import type { LayoutSpace } from './layout-space';
8
- /** Props of `Grid`: the shared `ControlProps` plus its own. Each prop is also a settable, reactive property. */
9
+ /**
10
+ * Props of `Grid`: the shared `ControlProps` plus its own. Each prop is also a settable, reactive property. Every one but
11
+ * `inline` also takes values per breakpoint of the room it is laid out in: `columns={{ xs: 1, md: 2, xl: 4 }}`, each value
12
+ * holding from its breakpoint up to the next one given.
13
+ */
9
14
  export interface GridProps extends ControlProps {
10
15
  /**
11
16
  * The rows: `'auto 1fr 120'` (a bare number is in pixels, and `*` is `1fr`), a list, or a count. By default,
12
17
  * rows are created as needed.
13
18
  */
14
- rows?: Bind<GridTracks>;
19
+ rows?: Bind<Responsive<GridTracks>>;
15
20
  /** The columns, in the same form as `rows`. The default is one column. */
16
- columns?: Bind<GridTracks>;
21
+ columns?: Bind<Responsive<GridTracks>>;
17
22
  /** The space between rows and columns. The default is the `layout.gap` token. */
18
- gap?: Bind<LayoutSpace>;
23
+ gap?: Bind<Responsive<LayoutSpace>>;
19
24
  /** The space between rows. It takes precedence over `gap`. */
20
- rowGap?: Bind<LayoutSpace>;
25
+ rowGap?: Bind<Responsive<LayoutSpace>>;
21
26
  /** The space between columns. It takes precedence over `gap`. */
22
- columnGap?: Bind<LayoutSpace>;
27
+ columnGap?: Bind<Responsive<LayoutSpace>>;
23
28
  /** The space inside the edges, one to four values as in CSS. There is none by default. */
24
- padding?: Bind<LayoutSpace>;
29
+ padding?: Bind<Responsive<LayoutSpace>>;
25
30
  /** The size of rows created as needed. A number is in pixels. The default is `'auto'`. */
26
- autoRows?: Bind<number | string>;
31
+ autoRows?: Bind<Responsive<number | string>>;
27
32
  /** The size of columns created as needed. A number is in pixels. The default is `'auto'`. */
28
- autoColumns?: Bind<number | string>;
33
+ autoColumns?: Bind<Responsive<number | string>>;
29
34
  /** How children without a position fill the grid. The default is `'row'`. */
30
- flow?: Bind<GridFlow>;
35
+ flow?: Bind<Responsive<GridFlow>>;
31
36
  /** The vertical alignment of children in their cells. The default is `'stretch'`. */
32
- align?: Bind<LayoutAlign>;
37
+ align?: Bind<Responsive<LayoutAlign>>;
33
38
  /** The horizontal alignment of children in their cells. The default is `'stretch'`. */
34
- justify?: Bind<GridJustify>;
39
+ justify?: Bind<Responsive<GridJustify>>;
35
40
  /** Flows within a line of text, as wide as its content. The default is `false`. */
36
41
  inline?: Bind<boolean>;
37
42
  }
@@ -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 { GroupBoxToggledEventArgs } from './group-box-toggled-event-args';
4
5
  import type { GroupBoxVariant } from './group-box-variant';
5
6
  import type { LayoutSpace } from './layout-space';
@@ -12,9 +13,9 @@ export interface GroupBoxProps extends ControlProps {
12
13
  /** Hides the content (with `collapsible`). The default is `false`. */
13
14
  collapsed?: Bind<boolean>;
14
15
  /** The space inside the frame, one to four values as in CSS. The default is the `layout.group-box.padding` token. */
15
- padding?: Bind<LayoutSpace>;
16
+ padding?: Bind<Responsive<LayoutSpace>>;
16
17
  /** The space between the children. The default is the `layout.group-box.gap` token. */
17
- gap?: Bind<LayoutSpace>;
18
+ gap?: Bind<Responsive<LayoutSpace>>;
18
19
  /** The appearance of the box. The default is `'outline'`. */
19
20
  variant?: Bind<GroupBoxVariant>;
20
21
  /** Occurs when the content is shown or hidden, by the user or by code. */
@@ -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 { LayoutSpace } from './layout-space';
4
5
  import type { PanelScroll } from './panel-scroll';
5
6
  import type { PanelVariant } from './panel-variant';
@@ -11,7 +12,7 @@ export interface PanelProps extends ControlProps {
11
12
  /** Scrolls its content. A scrolling panel is a Tab stop, so the keyboard can scroll it. The default is `false`. */
12
13
  scrollable?: Bind<PanelScroll>;
13
14
  /** The space inside the edges, one to four values as in CSS. There is none by default. */
14
- padding?: Bind<LayoutSpace>;
15
+ padding?: Bind<Responsive<LayoutSpace>>;
15
16
  /** The appearance of the panel. The default is `'plain'`. */
16
17
  variant?: Bind<PanelVariant>;
17
18
  }
@@ -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 { LayoutOrientation } from './layout-orientation';
4
5
  import type { SplitPanel } from './split-panel';
5
6
  import type { SplitPosition } from './split-position';
@@ -7,7 +8,7 @@ import type { SplitterMovedEventArgs } from './splitter-moved-event-args';
7
8
  /** Props of `SplitContainer`: the shared `ControlProps` plus its own. Each prop is also a settable, reactive property. */
8
9
  export interface SplitContainerProps extends ControlProps {
9
10
  /** `'horizontal'` places the panes side by side (the default), and `'vertical'` stacks them. */
10
- orientation?: Bind<LayoutOrientation>;
11
+ orientation?: Bind<Responsive<LayoutOrientation>>;
11
12
  /**
12
13
  * The size of the pane that keeps its size (`fixedPanel`, or the first pane with `'none'`), in pixels,
13
14
  * as a share (`'30%'`) or as a CSS length. The default is `'50%'`. `x-model` provides two-way binding.
@@ -1,6 +1,7 @@
1
1
  import type { Bind } from '@motifx/core';
2
+ import type { Responsive } from '../../core/responsive';
2
3
  /** The prop a child of a `Stack` sets for its position: `<TextBox grow />`. */
3
4
  export interface StackChildProps {
4
- /** Takes the free space along the direction. Numbers share it proportionally. */
5
- grow?: Bind<boolean | number>;
5
+ /** Takes the free space along the direction. Numbers share it proportionally. Also per breakpoint of the room the stack is laid out in. */
6
+ grow?: Bind<Responsive<boolean | number>>;
6
7
  }
@@ -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 { LayoutAlign } from './layout-align';
4
5
  import type { LayoutOrientation } from './layout-orientation';
5
6
  import type { LayoutSpace } from './layout-space';
@@ -7,19 +8,19 @@ import type { StackJustify } from './stack-justify';
7
8
  /** Props of `Stack`: the shared `ControlProps` plus its own. Each prop is also a settable, reactive property. */
8
9
  export interface StackProps extends ControlProps {
9
10
  /** The direction of the children. The default is `'vertical'`. */
10
- orientation?: Bind<LayoutOrientation>;
11
+ orientation?: Bind<Responsive<LayoutOrientation>>;
11
12
  /** The space between the children. The default is the `layout.gap` token. */
12
- gap?: Bind<LayoutSpace>;
13
+ gap?: Bind<Responsive<LayoutSpace>>;
13
14
  /** The space inside the edges, one to four values as in CSS. There is none by default. */
14
- padding?: Bind<LayoutSpace>;
15
+ padding?: Bind<Responsive<LayoutSpace>>;
15
16
  /** The alignment across the direction. The default is `'stretch'`. */
16
- align?: Bind<LayoutAlign>;
17
+ align?: Bind<Responsive<LayoutAlign>>;
17
18
  /** The alignment along the direction. The default is `'start'`. */
18
- justify?: Bind<StackJustify>;
19
+ justify?: Bind<Responsive<StackJustify>>;
19
20
  /** Moves children that do not fit to a new line. The default is `false`. */
20
- wrap?: Bind<boolean>;
21
+ wrap?: Bind<Responsive<boolean>>;
21
22
  /** Lays out the children from the opposite end. The default is `false`. */
22
- reverse?: Bind<boolean>;
23
+ reverse?: Bind<Responsive<boolean>>;
23
24
  /** Flows within a line of text, as wide as its children. The default is `false`. */
24
25
  inline?: Bind<boolean>;
25
26
  }
@@ -1,6 +1,7 @@
1
1
  import { type Bind, type Component, type ComponentBase, type IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
3
  import type { IconSource } from '../../core/icon-source';
4
+ import type { LayoutSpace } from '../layout/layout-space';
4
5
  import type { TabProps } from './tab-props';
5
6
  import type { Tabs } from './Tabs';
6
7
  /**
@@ -35,6 +36,9 @@ export declare class Tab extends Control<HTMLDivElement, TabProps> {
35
36
  set lazy(value: Bind<boolean | undefined>);
36
37
  get keepAlive(): boolean | undefined;
37
38
  set keepAlive(value: Bind<boolean | undefined>);
39
+ /** This tab's own setting. `undefined` inherits from the `Tabs`. */
40
+ get padding(): LayoutSpace | undefined;
41
+ set padding(value: Bind<LayoutSpace | undefined>);
38
42
  /** Indicates whether the tab shows a close button: its own `closable`, otherwise that of the `Tabs`. Reactive. */
39
43
  get isClosable(): boolean;
40
44
  /** The `Tabs` that owns the tab. */
@@ -61,6 +65,8 @@ export declare class Tab extends Control<HTMLDivElement, TabProps> {
61
65
  buildContent(): void;
62
66
  /** @internal A panel with nothing focusable in it takes focus itself, so Tab reaches it; read from the markup, which lays nothing out. */
63
67
  updatePanelFocus(): void;
68
+ /** @internal The panel's padding: its own `padding`, otherwise that of the `Tabs`, otherwise the look's. */
69
+ renderPadding(): void;
64
70
  /** @internal The `Tabs` closable setting changed. */
65
71
  renderClose(): void;
66
72
  private get parts();
@@ -1,6 +1,7 @@
1
1
  import { type Bind, type ComponentBase, type Event as MotifEvent, type IBaseProp } from '@motifx/core';
2
2
  import { Control } from '../../core/control';
3
3
  import type { ControlSize } from '../../core/control-size';
4
+ import type { LayoutSpace } from '../layout/layout-space';
4
5
  import { Tab } from './Tab';
5
6
  import type { TabCloseEventArgs } from './tab-close-event-args';
6
7
  import type { TabSelectingEventArgs } from './tab-selecting-event-args';
@@ -56,6 +57,8 @@ export declare class Tabs extends Control<HTMLDivElement, TabsProps> {
56
57
  set lazy(value: Bind<boolean>);
57
58
  get keepAlive(): boolean;
58
59
  set keepAlive(value: Bind<boolean>);
60
+ get padding(): LayoutSpace | undefined;
61
+ set padding(value: Bind<LayoutSpace | undefined>);
59
62
  /** Occurs before the user selects a tab. Set `e.cancel = true` to keep the current tab. */
60
63
  get onSelecting(): MotifEvent<TabSelectingEventArgs>;
61
64
  /** Occurs after the selected tab changes, either by the user or programmatically (`e.byUser`). */
@@ -77,6 +80,8 @@ export declare class Tabs extends Control<HTMLDivElement, TabsProps> {
77
80
  /** Focuses the selected tab (the one Tab reaches). */
78
81
  get focusPart(): ComponentBase;
79
82
  protected applyProperty(name: string, value: unknown): void;
83
+ /** @internal `padding` without tracking it. */
84
+ peekPadding(): LayoutSpace | undefined;
80
85
  /** @internal `closable` without tracking it. */
81
86
  peekClosable(): boolean;
82
87
  /** @internal The access key of a tab: select it as the user would, and focus it. */
@@ -1,10 +1,11 @@
1
1
  import type { Bind } from '@motifx/core';
2
2
  import type { 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 { ContentFactory } from './PanelContent';
5
6
  /**
6
7
  * Props of `Tab`, one tab of `Tabs`, with the JSX children as the panel. Each prop is also a
7
- * settable, reactive property. `closable`, `lazy` and `keepAlive` inherit from the `Tabs` when they are omitted.
8
+ * settable, reactive property. `closable`, `lazy`, `keepAlive` and `padding` inherit from the `Tabs` when they are omitted.
8
9
  */
9
10
  export interface TabProps extends ControlProps {
10
11
  /** The caption. `&General` makes Alt+G select the tab. This is the same property as `text`. */
@@ -22,6 +23,11 @@ export interface TabProps extends ControlProps {
22
23
  lazy?: Bind<boolean | undefined>;
23
24
  /** With `false`, what `content` created is disposed while the tab is hidden and recreated when it is shown. */
24
25
  keepAlive?: Bind<boolean | undefined>;
26
+ /**
27
+ * The space inside the panel's edges, one to four values as in CSS. When omitted, the `Tabs`' `padding`, else the
28
+ * look's; a panel that holds only a part that scrolls by itself (a grid, a tree, a scroll view …) has none.
29
+ */
30
+ padding?: Bind<LayoutSpace | undefined>;
25
31
  /** Creates the panel content, either instead of or after the JSX children. */
26
32
  content?: ContentFactory;
27
33
  }
@@ -1,6 +1,7 @@
1
1
  import type { Bind } from '@motifx/core';
2
2
  import type { ControlProps } from '../../core/control';
3
3
  import type { ControlSize } from '../../core/control-size';
4
+ import type { LayoutSpace } from '../layout/layout-space';
4
5
  import type { TabCloseEventArgs } from './tab-close-event-args';
5
6
  import type { TabSelectingEventArgs } from './tab-selecting-event-args';
6
7
  import type { TabSelectionChangedEventArgs } from './tab-selection-changed-event-args';
@@ -39,6 +40,11 @@ export interface TabsProps extends ControlProps {
39
40
  * precedence. The default is `true`.
40
41
  */
41
42
  keepAlive?: Bind<boolean>;
43
+ /**
44
+ * The space inside every panel's edges, one to four values as in CSS. A tab's own `padding` takes precedence. When
45
+ * omitted, the look's; a panel that holds only a part that scrolls by itself (a grid, a tree, a scroll view …) has none.
46
+ */
47
+ padding?: Bind<LayoutSpace | undefined>;
42
48
  /** Occurs before the user selects a tab. This event is cancelable. */
43
49
  onSelecting?: (e: TabSelectingEventArgs) => void;
44
50
  onSelectionChanged?: (e: TabSelectionChangedEventArgs) => void;
@@ -0,0 +1,52 @@
1
+ import { type ComponentBase } from '@motifx/core';
2
+ /** The widths a layout changes at, narrowest first: `xs` is narrower than the design system's `breakpoint.sm`. */
3
+ export declare const BREAKPOINTS: readonly ['xs', 'sm', 'md', 'lg', 'xl'];
4
+ export type Breakpoint = (typeof BREAKPOINTS)[number];
5
+ /** Values per breakpoint: each holds from its width up to the next one given (`{ xs: 1, md: 2 }`). */
6
+ export type PerBreakpoint<T> = {
7
+ readonly [B in Breakpoint]?: T;
8
+ };
9
+ /** One value at every width, or values per breakpoint of the room the container is laid out in. */
10
+ export type Responsive<T> = T | PerBreakpoint<T>;
11
+ /** Whether `value` gives values per breakpoint: a plain object whose keys are all breakpoints. */
12
+ export declare function isPerBreakpoint<T>(value: Responsive<T> | null | undefined): value is PerBreakpoint<T>;
13
+ /** The value at `breakpoint`: its own, else that of the widest narrower breakpoint given, else `undefined`. */
14
+ export declare function valueAt<T>(value: Responsive<T> | undefined, breakpoint: Breakpoint): T | undefined;
15
+ /** The breakpoint of `width` on a scale: the lengths of sm, md, lg and xl. */
16
+ export declare function breakpointOf(width: number, scale?: readonly number[]): Breakpoint;
17
+ /**
18
+ * The breakpoint of the room a layout container is laid out in, for the props and child settings it takes per
19
+ * breakpoint: the content box of its parent (past parents with no element of their own), its own without one. The
20
+ * room, not the container itself: a sidebar docked at the side of a wide page is narrow but sits in a wide page, and a
21
+ * container sized by its content would otherwise change its own breakpoint by changing its layout. Nothing is followed
22
+ * until a value per breakpoint is picked; from then on the room's size and the look are watched, and `changed` runs each
23
+ * time the breakpoint changes, to apply those values again. Until it is first measured, the breakpoint is the
24
+ * window's: a container usually spans most of it, so the first frame is mostly right already. The widths are this
25
+ * kit's `layout.breakpoint` tokens, read again when the look changes; a room out of sight keeps its breakpoint until it
26
+ * is laid out again.
27
+ */
28
+ export declare class BreakpointFollow {
29
+ private readonly owner;
30
+ private readonly changed;
31
+ /** Measured; read in a binding, it is read again when it changes. */
32
+ private readonly current;
33
+ private guessed;
34
+ private width;
35
+ private scale;
36
+ private following;
37
+ private room;
38
+ private stopRoom;
39
+ constructor(owner: ComponentBase, changed: () => void);
40
+ /** The breakpoint now. Reactive: read in a binding, it is read again when it changes. */
41
+ get breakpoint(): Breakpoint;
42
+ /** `value` at the breakpoint now. A value per breakpoint starts the following. */
43
+ pick<T>(value: Responsive<T> | undefined): T | undefined;
44
+ private follow;
45
+ /** The room it is laid out in now: its parent's content box, past parents with no element of their own. */
46
+ private roomNow;
47
+ private watchRoom;
48
+ private readonly read;
49
+ private readonly took;
50
+ private decide;
51
+ private windowBreakpoint;
52
+ }
@@ -195,7 +195,7 @@ function writeCell(excelCell, cell, rowType, index, col, writer, rtl, options) {
195
195
  horizontal: align === "center" ? "center" : align === "end" !== rtl ? "right" : "left",
196
196
  vertical: "top"
197
197
  };
198
- if (typeof value === "string" && value.includes("\n")) alignment.wrapText = true;
198
+ if (typeof value === "string" && (value.includes("\n") || rowType === "data" && col.wrap)) alignment.wrapText = true;
199
199
  excelCell.alignment = alignment;
200
200
  if (rowType !== "data") return;
201
201
  if (typeof value === "number" && writer.number) {