@dloizides/ui-layout 1.54.0 → 1.55.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/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { SvgIcon } from '@dloizides/ui-icons';
8
8
  import { useEnterExit, Collapse } from '@dloizides/ui-motion';
9
9
  import { MIN_TOUCH_TARGET_PX, useA11y } from '@dloizides/a11y';
10
10
  import { createPortal } from 'react-dom';
11
- import { useReducedMotion } from '@dloizides/rn-web-hooks';
11
+ import { useReducedMotion, useInitialFocus, INITIAL_FOCUS_PROPS } from '@dloizides/rn-web-hooks';
12
12
 
13
13
  // src/Section/Section.tsx
14
14
 
@@ -3556,6 +3556,7 @@ var styles34 = StyleSheet.create({
3556
3556
  });
3557
3557
  var StickyActionBar = ({
3558
3558
  accessibilityLabel,
3559
+ accessibilityHint,
3559
3560
  children,
3560
3561
  breakpoint = LAYOUT_COLLAPSE_BREAKPOINT,
3561
3562
  bottomInset = 0,
@@ -3563,9 +3564,9 @@ var StickyActionBar = ({
3563
3564
  }) => {
3564
3565
  const wide = useIsWideViewport(breakpoint);
3565
3566
  const { colors } = useUi().theme;
3566
- if (wide) return /* @__PURE__ */ jsx(View, { accessibilityLabel, role: "toolbar", style: styles34.inline, testID, children });
3567
+ if (wide) return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: styles34.inline, testID, children });
3567
3568
  const surface = { backgroundColor: colors.surface, borderTopColor: colors.border };
3568
- return /* @__PURE__ */ jsx(View, { accessibilityLabel, role: "toolbar", style: [styles34.bar, surface, stickyEdgeStyle(Platform.OS, bottomInset)], testID, children });
3569
+ return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: [styles34.bar, surface, stickyEdgeStyle(Platform.OS, bottomInset)], testID, children });
3569
3570
  };
3570
3571
  var TITLE_BASIS = 280;
3571
3572
  var styles35 = StyleSheet.create({
@@ -3577,11 +3578,13 @@ var styles35 = StyleSheet.create({
3577
3578
  function hasContent(node) {
3578
3579
  return node !== void 0 && node !== null && node !== false;
3579
3580
  }
3580
- var PageHead = ({ title, subtitle, actions, testID = LAYOUT_TEST_IDS.pageHead }) => {
3581
+ var PageHead = ({ title, subtitle, actions, initialFocus = false, testID = LAYOUT_TEST_IDS.pageHead }) => {
3581
3582
  const { colors } = useUi().theme;
3583
+ const titleRef = useInitialFocus();
3584
+ const focusProps = initialFocus ? { ref: titleRef, ...INITIAL_FOCUS_PROPS } : {};
3582
3585
  return /* @__PURE__ */ jsxs(View, { style: styles35.row, testID, children: [
3583
3586
  /* @__PURE__ */ jsxs(View, { style: styles35.text, children: [
3584
- /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles35.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
3587
+ /* @__PURE__ */ jsx(Text, { ...focusProps, accessibilityRole: "header", style: [styles35.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
3585
3588
  subtitle
3586
3589
  ] }),
3587
3590
  hasContent(actions) ? /* @__PURE__ */ jsx(View, { style: styles35.actions, testID: `${testID}-actions`, children: actions }) : null