@motifx-community/ui 0.1.0-beta.19 → 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.
- package/CHANGELOG.md +21 -0
- package/dist/components/layout/SplitContainer.d.ts +6 -4
- package/dist/components/layout/split-container-props.d.ts +7 -4
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +25 -0
- package/docs/accordion.md +1 -1
- package/docs/actionsheet.md +1 -1
- package/docs/appbar.md +1 -1
- package/docs/appmenu-api.md +1 -1
- package/docs/appmenu-programmatic.md +1 -1
- package/docs/appmenu-search.md +1 -1
- package/docs/appmenu.md +1 -1
- package/docs/avatar.md +1 -1
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +1 -1
- package/docs/bottomsheet.md +1 -1
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +1 -1
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +33 -2
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/chat.md +1 -1
- package/docs/checkbox.md +1 -1
- package/docs/chip.md +1 -1
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/commands.md +1 -1
- package/docs/control.md +1 -1
- package/docs/data.md +1 -1
- package/docs/datagrid-api.md +1 -1
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +1 -1
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +1 -1
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +1 -1
- package/docs/datagrid-layout.md +1 -1
- package/docs/datagrid-lookups.md +1 -1
- package/docs/datagrid-master-detail.md +1 -1
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datebox.md +1 -1
- package/docs/daterangebox.md +1 -1
- package/docs/diagram-api.md +1 -1
- package/docs/diagram-commands.md +1 -1
- package/docs/diagram-connections.md +1 -1
- package/docs/diagram-custom-nodes.md +1 -1
- package/docs/diagram-designer.md +1 -1
- package/docs/diagram-editing.md +1 -1
- package/docs/diagram-flow.md +1 -1
- package/docs/diagram-keyboard.md +1 -1
- package/docs/diagram-layout.md +1 -1
- package/docs/diagram-nodes.md +1 -1
- package/docs/diagram-tables.md +1 -1
- package/docs/diagram.md +1 -1
- package/docs/display.md +1 -1
- package/docs/draggable.md +1 -1
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +1 -1
- package/docs/editors.md +1 -1
- package/docs/expressioneditor.md +1 -1
- package/docs/expressions.md +1 -1
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +1 -1
- package/docs/formlayout-schema.md +1 -1
- package/docs/formlayout.md +1 -1
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +1 -1
- package/docs/language.md +1 -1
- package/docs/layout.md +3 -3
- package/docs/listbox.md +1 -1
- package/docs/loadpanel.md +1 -1
- package/docs/lookup.md +1 -1
- package/docs/markdown.md +1 -1
- package/docs/menus-api.md +1 -1
- package/docs/menus-context.md +1 -1
- package/docs/menus-customization.md +1 -1
- package/docs/menus-merging.md +1 -1
- package/docs/menus-programmatic.md +1 -1
- package/docs/menus.md +1 -1
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +1 -1
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/pivotgrid-api.md +1 -1
- package/docs/pivotgrid-chart.md +1 -1
- package/docs/pivotgrid-drilldown.md +1 -1
- package/docs/pivotgrid-export.md +1 -1
- package/docs/pivotgrid-fields.md +1 -1
- package/docs/pivotgrid-keyboard.md +1 -1
- package/docs/pivotgrid-layout.md +1 -1
- package/docs/pivotgrid-panel.md +1 -1
- package/docs/pivotgrid-remote.md +1 -1
- package/docs/pivotgrid-sorting.md +1 -1
- package/docs/pivotgrid-state.md +1 -1
- package/docs/pivotgrid-summaries.md +1 -1
- package/docs/pivotgrid.md +1 -1
- package/docs/popover.md +1 -1
- package/docs/progress.md +1 -1
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +1 -1
- package/docs/rating.md +1 -1
- package/docs/resizable.md +1 -1
- package/docs/ribbonmenu-api.md +1 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +1 -1
- package/docs/ribbonmenu-display.md +1 -1
- package/docs/ribbonmenu-layouts.md +1 -1
- package/docs/ribbonmenu-programmatic.md +1 -1
- package/docs/ribbonmenu.md +1 -1
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +1 -1
- package/docs/shortcuteditor.md +1 -1
- package/docs/showcase-flowstudio.md +1 -1
- package/docs/showcase-home.md +1 -1
- package/docs/showcase-mail.md +1 -1
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +1 -1
- package/docs/sortable.md +1 -1
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +1 -1
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +1 -1
- package/docs/switch.md +1 -1
- package/docs/tabdocs-dock.md +1 -1
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -1
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +1 -1
- package/docs/tagbox.md +1 -1
- package/docs/textarea.md +1 -1
- package/docs/textbox.md +1 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +1 -1
- package/docs/toolbar-api.md +1 -1
- package/docs/toolbar-customization.md +1 -1
- package/docs/toolbar.md +1 -1
- package/docs/tooltip.md +1 -1
- package/docs/treeview.md +1 -1
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +1 -1
- package/docs/wizard.md +1 -1
- package/llms-full.txt +225 -194
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ 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
|
+
|
|
9
30
|
## [0.1.0-beta.19] - 2026-11-30
|
|
10
31
|
|
|
11
32
|
Needs `@motifx/core` 1.2.0-rc.31, `@motifx-community/data` 0.1.0-beta.3 and `@motifx-community/design-system`
|
|
@@ -46,10 +46,10 @@ export declare class SplitContainer extends FocusContainer<HTMLDivElement, Split
|
|
|
46
46
|
set value(value: SplitPosition);
|
|
47
47
|
get fixedPanel(): SplitPanel;
|
|
48
48
|
set fixedPanel(value: Bind<SplitPanel>);
|
|
49
|
-
get firstMinSize(): number
|
|
50
|
-
set firstMinSize(value: Bind<number
|
|
51
|
-
get secondMinSize(): number
|
|
52
|
-
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>>);
|
|
53
53
|
get collapsed(): SplitPanel;
|
|
54
54
|
set collapsed(value: Bind<SplitPanel>);
|
|
55
55
|
get resizable(): boolean;
|
|
@@ -71,6 +71,8 @@ export declare class SplitContainer extends FocusContainer<HTMLDivElement, Split
|
|
|
71
71
|
private get parts();
|
|
72
72
|
private createParts;
|
|
73
73
|
private get horizontal();
|
|
74
|
+
/** The minimum sizes of the panes at the container's breakpoint now, in pixels. */
|
|
75
|
+
private get minSizes();
|
|
74
76
|
/** A value at the container's breakpoint now: one per breakpoint starts following its width. */
|
|
75
77
|
private at;
|
|
76
78
|
private get breakpoints();
|
|
@@ -19,10 +19,13 @@ export interface SplitContainerProps extends ControlProps {
|
|
|
19
19
|
* and the position is kept as a share.
|
|
20
20
|
*/
|
|
21
21
|
fixedPanel?: Bind<SplitPanel>;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The minimum size of the first pane, in pixels, also per breakpoint (`{ xs: 120, md: 320 }`). The default is 0. When
|
|
24
|
+
* the room cannot hold both minimum sizes, the panes share it in their proportion.
|
|
25
|
+
*/
|
|
26
|
+
firstMinSize?: Bind<Responsive<number>>;
|
|
27
|
+
/** The minimum size of the second pane, in pixels, also per breakpoint. The default is 0. */
|
|
28
|
+
secondMinSize?: Bind<Responsive<number>>;
|
|
26
29
|
/** The hidden pane. The other pane takes all the space. The default is `'none'`. */
|
|
27
30
|
collapsed?: Bind<SplitPanel>;
|
|
28
31
|
/** Lets the pointer and keyboard move the splitter. The default is `true`. */
|
package/dist/index.js
CHANGED
|
@@ -51349,7 +51349,7 @@ var ChartPlot = class {
|
|
|
51349
51349
|
const wide = box.left - look.tickPad;
|
|
51350
51350
|
positions.forEach((t, i) => {
|
|
51351
51351
|
if (i % every) return;
|
|
51352
|
-
this.xLabels.add(fit(t.text, rtl ? this.input.width - box.left - box.width - look.tickPad : wide, measure), beside, position.at(t.value) + baseline, besideAnchor);
|
|
51352
|
+
this.xLabels.add(fit$1(t.text, rtl ? this.input.width - box.left - box.width - look.tickPad : wide, measure), beside, position.at(t.value) + baseline, besideAnchor);
|
|
51353
51353
|
});
|
|
51354
51354
|
} else {
|
|
51355
51355
|
const widest = Math.max(...positions.map((t) => measure(t.text)));
|
|
@@ -51763,7 +51763,7 @@ function markOf(s) {
|
|
|
51763
51763
|
function overlaps$3(a, b) {
|
|
51764
51764
|
return a.left < b.left + b.width && b.left < a.left + a.width && a.top < b.top + b.height && b.top < a.top + a.height;
|
|
51765
51765
|
}
|
|
51766
|
-
function fit(text, room, measure) {
|
|
51766
|
+
function fit$1(text, room, measure) {
|
|
51767
51767
|
if (measure(text) <= room) return text;
|
|
51768
51768
|
let end = 1;
|
|
51769
51769
|
for (let at = text.length; at > 1; at--) if (measure(`${text.slice(0, at)}…`) <= room && end === 1) end = at;
|
|
@@ -131834,6 +131834,15 @@ var BREAKPOINTS$2 = Symbol("mx.split-container.breakpoints");
|
|
|
131834
131834
|
function isShare(position) {
|
|
131835
131835
|
return typeof position === "string" && position.trim().endsWith("%");
|
|
131836
131836
|
}
|
|
131837
|
+
/** A minimum size as given: a number of pixels, no less than 0. */
|
|
131838
|
+
function minOf(value) {
|
|
131839
|
+
return Math.max(0, Number(value) || 0);
|
|
131840
|
+
}
|
|
131841
|
+
/** Minimum sizes the room cannot hold together share it in their proportion, so neither pane is squeezed to nothing. */
|
|
131842
|
+
function fit(min1, min2, room) {
|
|
131843
|
+
const total = min1 + min2;
|
|
131844
|
+
return total > room && min1 && min2 ? [room * min1 / total, room * min2 / total] : [min1, min2];
|
|
131845
|
+
}
|
|
131837
131846
|
/** The CSS size of a position: pixels, a share of the room left by the splitter, or a length as written. */
|
|
131838
131847
|
function sizeOf(position) {
|
|
131839
131848
|
if (typeof position === "number") return `${position}px`;
|
|
@@ -131965,13 +131974,13 @@ var SplitContainer = class extends FocusContainer {
|
|
|
131965
131974
|
return this.getProperty("firstMinSize") ?? 0;
|
|
131966
131975
|
}
|
|
131967
131976
|
set firstMinSize(value) {
|
|
131968
|
-
this.assignProperty("firstMinSize", value, (v) =>
|
|
131977
|
+
this.assignProperty("firstMinSize", value, (v) => isPerBreakpoint(v) ? v : minOf(v));
|
|
131969
131978
|
}
|
|
131970
131979
|
get secondMinSize() {
|
|
131971
131980
|
return this.getProperty("secondMinSize") ?? 0;
|
|
131972
131981
|
}
|
|
131973
131982
|
set secondMinSize(value) {
|
|
131974
|
-
this.assignProperty("secondMinSize", value, (v) =>
|
|
131983
|
+
this.assignProperty("secondMinSize", value, (v) => isPerBreakpoint(v) ? v : minOf(v));
|
|
131975
131984
|
}
|
|
131976
131985
|
get collapsed() {
|
|
131977
131986
|
return this.getProperty("collapsed") ?? "none";
|
|
@@ -132054,6 +132063,10 @@ var SplitContainer = class extends FocusContainer {
|
|
|
132054
132063
|
get horizontal() {
|
|
132055
132064
|
return this.at(this.peekProperty("orientation")) !== "vertical";
|
|
132056
132065
|
}
|
|
132066
|
+
/** The minimum sizes of the panes at the container's breakpoint now, in pixels. */
|
|
132067
|
+
get minSizes() {
|
|
132068
|
+
return [minOf(this.at(this.peekProperty("firstMinSize"))), minOf(this.at(this.peekProperty("secondMinSize")))];
|
|
132069
|
+
}
|
|
132057
132070
|
/** A value at the container's breakpoint now: one per breakpoint starts following its width. */
|
|
132058
132071
|
at(value) {
|
|
132059
132072
|
return isPerBreakpoint(value) ? this.breakpoints.pick(value) : value;
|
|
@@ -132087,10 +132100,11 @@ var SplitContainer = class extends FocusContainer {
|
|
|
132087
132100
|
this.renderValue();
|
|
132088
132101
|
}
|
|
132089
132102
|
tracks(collapsed) {
|
|
132090
|
-
const min1 = `${this.peekProperty("firstMinSize") ?? 0}px`;
|
|
132091
|
-
const min2 = `${this.peekProperty("secondMinSize") ?? 0}px`;
|
|
132092
132103
|
if (collapsed === "first") return `0px ${SPLITTER} minmax(0, 1fr)`;
|
|
132093
132104
|
if (collapsed === "second") return `minmax(0, 1fr) ${SPLITTER} 0px`;
|
|
132105
|
+
const [one, two] = this.minSizes;
|
|
132106
|
+
const floor = (min) => one && two ? `min(${min}px, calc((100% - ${SPLITTER}) * ${Math.round(min / (one + two) * 1e4) / 1e4}))` : `${min}px`;
|
|
132107
|
+
const [min1, min2] = [floor(one), floor(two)];
|
|
132094
132108
|
const size = sizeOf(this.peekProperty("position") ?? "50%");
|
|
132095
132109
|
if (this.peekProperty("fixedPanel") === "second") return `minmax(0, 1fr) ${SPLITTER} clamp(${min2}, ${size}, calc(100% - ${min1} - ${SPLITTER}))`;
|
|
132096
132110
|
return `clamp(${min1}, ${size}, calc(100% - ${min2} - ${SPLITTER})) ${SPLITTER} minmax(0, 1fr)`;
|
|
@@ -132112,8 +132126,7 @@ var SplitContainer = class extends FocusContainer {
|
|
|
132112
132126
|
/** Puts the splitter so the first pane is `size` pixels of `room`, within the minimum sizes. */
|
|
132113
132127
|
moveTo(size, room, fire) {
|
|
132114
132128
|
if (!room) return;
|
|
132115
|
-
const min1 = this.
|
|
132116
|
-
const min2 = this.peekProperty("secondMinSize") ?? 0;
|
|
132129
|
+
const [min1, min2] = fit(...this.minSizes, room);
|
|
132117
132130
|
const first = Math.min(Math.max(size, min1), Math.max(min1, room - min2));
|
|
132118
132131
|
const fixed = this.peekProperty("fixedPanel") ?? "none";
|
|
132119
132132
|
const position = fixed === "none" ? `${Math.round(first / room * 1e4) / 100}%` : Math.round(fixed === "second" ? room - first : first);
|