@dloizides/ui-layout 1.66.0 → 1.66.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.66.1
4
+
5
+ - `RecordHeader`: beside the title the actions row takes at most 60% of the width and wraps, so the title and id chips keep the rest (they were squeezed to the space the unwrapped actions left). `actionsStyleOf(compact)` exported.
6
+
3
7
  ## 1.65.0
4
8
 
5
9
  - MODC-1 "Module C unified console" scroll-0 fix. With the scroll spy on, the scroller at its top marks the first section current, even when `initialKey` names a later one or a short first section lets the second cross the activation line (`ScrollViewport` gains `atStart`). The collapsed (chips) layout opens on `collapsedKey` only, else the first chip; `initialKey` no longer applies below the index breakpoint.
package/dist/index.d.mts CHANGED
@@ -1430,7 +1430,7 @@ interface RecordHeaderProps {
1430
1430
  collapseBelow?: number;
1431
1431
  testID?: string;
1432
1432
  }
1433
- /** A record page header: breadcrumb, title and id meta left, record actions top right; stacked on a phone. */
1433
+ /** A record page header: breadcrumb, title and id meta left, record actions top right (at most 60%, wrapping); stacked on a phone. */
1434
1434
  declare const RecordHeader: ({ breadcrumb, title, meta, actions, collapseBelow, testID }: RecordHeaderProps) => React.ReactElement;
1435
1435
 
1436
1436
  interface BreadcrumbItem {
package/dist/index.d.ts CHANGED
@@ -1430,7 +1430,7 @@ interface RecordHeaderProps {
1430
1430
  collapseBelow?: number;
1431
1431
  testID?: string;
1432
1432
  }
1433
- /** A record page header: breadcrumb, title and id meta left, record actions top right; stacked on a phone. */
1433
+ /** A record page header: breadcrumb, title and id meta left, record actions top right (at most 60%, wrapping); stacked on a phone. */
1434
1434
  declare const RecordHeader: ({ breadcrumb, title, meta, actions, collapseBelow, testID }: RecordHeaderProps) => React.ReactElement;
1435
1435
 
1436
1436
  interface BreadcrumbItem {
package/dist/index.js CHANGED
@@ -3907,16 +3907,20 @@ function isRecordHeaderCompact(width, breakpoint = LAYOUT_COLLAPSE_BREAKPOINT) {
3907
3907
  }
3908
3908
  var GAP2 = 8;
3909
3909
  var WIDE_GAP = 16;
3910
+ var ACTIONS_MAX_SHARE = "60%";
3910
3911
  var styles38 = reactNative.StyleSheet.create({
3911
- actions: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP2, justifyContent: "flex-end" },
3912
+ actions: { alignItems: "center", flexDirection: "row", flexShrink: 1, flexWrap: "wrap", gap: GAP2, justifyContent: "flex-end", maxWidth: ACTIONS_MAX_SHARE },
3912
3913
  compactActions: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP2 },
3913
3914
  identity: { flex: 1, gap: GAP2, minWidth: 0 },
3914
3915
  root: { gap: GAP2 },
3915
3916
  top: { alignItems: "flex-start", flexDirection: "row", gap: WIDE_GAP }
3916
3917
  });
3918
+ function actionsStyleOf(compact) {
3919
+ return compact ? styles38.compactActions : styles38.actions;
3920
+ }
3917
3921
  var RecordHeader = ({ breadcrumb, title, meta, actions, collapseBelow, testID }) => {
3918
3922
  const compact = isRecordHeaderCompact(reactNative.useWindowDimensions().width, collapseBelow);
3919
- const actionRow = actions === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: compact ? styles38.compactActions : styles38.actions, children: actions });
3923
+ const actionRow = actions === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: actionsStyleOf(compact), children: actions });
3920
3924
  return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles38.root, testID, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: compact ? styles38.root : styles38.top, children: [
3921
3925
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles38.identity, children: [
3922
3926
  breadcrumb,