@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.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1308,22 +1308,25 @@ declare const ToggleSection: ({ wide, title, toggleLabel, toggleHint, forceOpen,
|
|
|
1308
1308
|
|
|
1309
1309
|
interface StickyActionBarProps {
|
|
1310
1310
|
accessibilityLabel: string;
|
|
1311
|
+
accessibilityHint?: string;
|
|
1311
1312
|
children: React.ReactNode;
|
|
1312
1313
|
breakpoint?: number;
|
|
1313
1314
|
bottomInset?: number;
|
|
1314
1315
|
testID?: string;
|
|
1315
1316
|
}
|
|
1316
1317
|
/** Page actions: pinned to the bottom edge above the safe area when narrow, an inline end-aligned row when wide. */
|
|
1317
|
-
declare const StickyActionBar: ({ accessibilityLabel, children, breakpoint, bottomInset, testID, }: StickyActionBarProps) => React.ReactElement;
|
|
1318
|
+
declare const StickyActionBar: ({ accessibilityLabel, accessibilityHint, children, breakpoint, bottomInset, testID, }: StickyActionBarProps) => React.ReactElement;
|
|
1318
1319
|
|
|
1319
1320
|
interface PageHeadProps {
|
|
1320
1321
|
title: string;
|
|
1321
1322
|
subtitle?: React.ReactNode;
|
|
1322
1323
|
actions?: React.ReactNode;
|
|
1324
|
+
/** Focus the title when the page opens (FOCUS-1); default false. */
|
|
1325
|
+
initialFocus?: boolean;
|
|
1323
1326
|
testID?: string;
|
|
1324
1327
|
}
|
|
1325
1328
|
/** Page title row: heading and subtitle on the left, page actions on the right; actions wrap below on narrow screens. */
|
|
1326
|
-
declare const PageHead: ({ title, subtitle, actions, testID }: PageHeadProps) => React.ReactElement;
|
|
1329
|
+
declare const PageHead: ({ title, subtitle, actions, initialFocus, testID }: PageHeadProps) => React.ReactElement;
|
|
1327
1330
|
|
|
1328
1331
|
interface TimelineEntry {
|
|
1329
1332
|
key: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1308,22 +1308,25 @@ declare const ToggleSection: ({ wide, title, toggleLabel, toggleHint, forceOpen,
|
|
|
1308
1308
|
|
|
1309
1309
|
interface StickyActionBarProps {
|
|
1310
1310
|
accessibilityLabel: string;
|
|
1311
|
+
accessibilityHint?: string;
|
|
1311
1312
|
children: React.ReactNode;
|
|
1312
1313
|
breakpoint?: number;
|
|
1313
1314
|
bottomInset?: number;
|
|
1314
1315
|
testID?: string;
|
|
1315
1316
|
}
|
|
1316
1317
|
/** Page actions: pinned to the bottom edge above the safe area when narrow, an inline end-aligned row when wide. */
|
|
1317
|
-
declare const StickyActionBar: ({ accessibilityLabel, children, breakpoint, bottomInset, testID, }: StickyActionBarProps) => React.ReactElement;
|
|
1318
|
+
declare const StickyActionBar: ({ accessibilityLabel, accessibilityHint, children, breakpoint, bottomInset, testID, }: StickyActionBarProps) => React.ReactElement;
|
|
1318
1319
|
|
|
1319
1320
|
interface PageHeadProps {
|
|
1320
1321
|
title: string;
|
|
1321
1322
|
subtitle?: React.ReactNode;
|
|
1322
1323
|
actions?: React.ReactNode;
|
|
1324
|
+
/** Focus the title when the page opens (FOCUS-1); default false. */
|
|
1325
|
+
initialFocus?: boolean;
|
|
1323
1326
|
testID?: string;
|
|
1324
1327
|
}
|
|
1325
1328
|
/** Page title row: heading and subtitle on the left, page actions on the right; actions wrap below on narrow screens. */
|
|
1326
|
-
declare const PageHead: ({ title, subtitle, actions, testID }: PageHeadProps) => React.ReactElement;
|
|
1329
|
+
declare const PageHead: ({ title, subtitle, actions, initialFocus, testID }: PageHeadProps) => React.ReactElement;
|
|
1327
1330
|
|
|
1328
1331
|
interface TimelineEntry {
|
|
1329
1332
|
key: string;
|
package/dist/index.js
CHANGED
|
@@ -3562,6 +3562,7 @@ var styles34 = reactNative.StyleSheet.create({
|
|
|
3562
3562
|
});
|
|
3563
3563
|
var StickyActionBar = ({
|
|
3564
3564
|
accessibilityLabel,
|
|
3565
|
+
accessibilityHint,
|
|
3565
3566
|
children,
|
|
3566
3567
|
breakpoint = LAYOUT_COLLAPSE_BREAKPOINT,
|
|
3567
3568
|
bottomInset = 0,
|
|
@@ -3569,9 +3570,9 @@ var StickyActionBar = ({
|
|
|
3569
3570
|
}) => {
|
|
3570
3571
|
const wide = useIsWideViewport(breakpoint);
|
|
3571
3572
|
const { colors } = uiFeedback.useUi().theme;
|
|
3572
|
-
if (wide) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityLabel, role: "toolbar", style: styles34.inline, testID, children });
|
|
3573
|
+
if (wide) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: styles34.inline, testID, children });
|
|
3573
3574
|
const surface = { backgroundColor: colors.surface, borderTopColor: colors.border };
|
|
3574
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityLabel, role: "toolbar", style: [styles34.bar, surface, stickyEdgeStyle(reactNative.Platform.OS, bottomInset)], testID, children });
|
|
3575
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityLabel, role: "toolbar", style: [styles34.bar, surface, stickyEdgeStyle(reactNative.Platform.OS, bottomInset)], testID, children });
|
|
3575
3576
|
};
|
|
3576
3577
|
var TITLE_BASIS = 280;
|
|
3577
3578
|
var styles35 = reactNative.StyleSheet.create({
|
|
@@ -3583,11 +3584,13 @@ var styles35 = reactNative.StyleSheet.create({
|
|
|
3583
3584
|
function hasContent(node) {
|
|
3584
3585
|
return node !== void 0 && node !== null && node !== false;
|
|
3585
3586
|
}
|
|
3586
|
-
var PageHead = ({ title, subtitle, actions, testID = LAYOUT_TEST_IDS.pageHead }) => {
|
|
3587
|
+
var PageHead = ({ title, subtitle, actions, initialFocus = false, testID = LAYOUT_TEST_IDS.pageHead }) => {
|
|
3587
3588
|
const { colors } = uiFeedback.useUi().theme;
|
|
3589
|
+
const titleRef = rnWebHooks.useInitialFocus();
|
|
3590
|
+
const focusProps = initialFocus ? { ref: titleRef, ...rnWebHooks.INITIAL_FOCUS_PROPS } : {};
|
|
3588
3591
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.row, testID, children: [
|
|
3589
3592
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.text, children: [
|
|
3590
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles35.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
|
|
3593
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { ...focusProps, accessibilityRole: "header", style: [styles35.title, { color: colors.text }], testID: `${testID}-title`, children: title }),
|
|
3591
3594
|
subtitle
|
|
3592
3595
|
] }),
|
|
3593
3596
|
hasContent(actions) ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles35.actions, testID: `${testID}-actions`, children: actions }) : null
|