@dloizides/ui-nav 1.24.0 → 1.25.0
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 +4 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.25.0
|
|
4
|
+
|
|
5
|
+
- `PillNav` / `PillNavMenu` get an optional `menuHeading`: a visible, non-focusable heading at the top of the open `Menu` that also names it (needs `@dloizides/ui-layout` >= 1.30.0) (KEFI-EDITOR-HEADER-1 "Compact the landing editor header").
|
|
6
|
+
|
|
3
7
|
## 1.24.0
|
|
4
8
|
|
|
5
9
|
- `Topbar` gets an optional `center` slot between `left` and the actions (testID `topbar-center`); callers that do not pass it render as before (KEFI-EDITOR-HEADER-1 "Compact the landing editor header").
|
package/dist/index.d.mts
CHANGED
|
@@ -941,6 +941,8 @@ interface PillNavProps {
|
|
|
941
941
|
variant?: PillNavVariant;
|
|
942
942
|
/** a11y hint for the `Menu` trigger. Defaults to `regionLabel`. */
|
|
943
943
|
menuHint?: string;
|
|
944
|
+
/** Visible heading at the top of the open `Menu` (e.g. "Your dashboards"); also names the menu. */
|
|
945
|
+
menuHeading?: string;
|
|
944
946
|
/** testID for the `Menu` trigger. Defaults to `NAV_TEST_IDS.pillNavMenu`. */
|
|
945
947
|
menuTestID?: string;
|
|
946
948
|
/** Forces the `Menu` dropdown variant (default: responsive). */
|
|
@@ -948,7 +950,7 @@ interface PillNavProps {
|
|
|
948
950
|
/** Extra container style overrides. */
|
|
949
951
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
950
952
|
}
|
|
951
|
-
declare const PillNav: ({ items, pathname, onNavigate, regionLabel, navigateHint, minItems, variant, menuHint, menuTestID, dropdownVariant, containerStyle, }: PillNavProps) => React.ReactElement | null;
|
|
953
|
+
declare const PillNav: ({ items, pathname, onNavigate, regionLabel, navigateHint, minItems, variant, menuHint, menuHeading, menuTestID, dropdownVariant, containerStyle, }: PillNavProps) => React.ReactElement | null;
|
|
952
954
|
|
|
953
955
|
/** The label the compact menu trigger shows: the active item's label, else `fallback`. */
|
|
954
956
|
declare function resolvePillMenuLabel(items: NavItem[], pathname: string, fallback: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -941,6 +941,8 @@ interface PillNavProps {
|
|
|
941
941
|
variant?: PillNavVariant;
|
|
942
942
|
/** a11y hint for the `Menu` trigger. Defaults to `regionLabel`. */
|
|
943
943
|
menuHint?: string;
|
|
944
|
+
/** Visible heading at the top of the open `Menu` (e.g. "Your dashboards"); also names the menu. */
|
|
945
|
+
menuHeading?: string;
|
|
944
946
|
/** testID for the `Menu` trigger. Defaults to `NAV_TEST_IDS.pillNavMenu`. */
|
|
945
947
|
menuTestID?: string;
|
|
946
948
|
/** Forces the `Menu` dropdown variant (default: responsive). */
|
|
@@ -948,7 +950,7 @@ interface PillNavProps {
|
|
|
948
950
|
/** Extra container style overrides. */
|
|
949
951
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
950
952
|
}
|
|
951
|
-
declare const PillNav: ({ items, pathname, onNavigate, regionLabel, navigateHint, minItems, variant, menuHint, menuTestID, dropdownVariant, containerStyle, }: PillNavProps) => React.ReactElement | null;
|
|
953
|
+
declare const PillNav: ({ items, pathname, onNavigate, regionLabel, navigateHint, minItems, variant, menuHint, menuHeading, menuTestID, dropdownVariant, containerStyle, }: PillNavProps) => React.ReactElement | null;
|
|
952
954
|
|
|
953
955
|
/** The label the compact menu trigger shows: the active item's label, else `fallback`. */
|
|
954
956
|
declare function resolvePillMenuLabel(items: NavItem[], pathname: string, fallback: string): string;
|
package/dist/index.js
CHANGED
|
@@ -1884,7 +1884,8 @@ var PillNavMenu = ({
|
|
|
1884
1884
|
regionLabel,
|
|
1885
1885
|
hint,
|
|
1886
1886
|
testID = NAV_TEST_IDS.pillNavMenu,
|
|
1887
|
-
dropdownVariant
|
|
1887
|
+
dropdownVariant,
|
|
1888
|
+
menuHeading
|
|
1888
1889
|
}) => {
|
|
1889
1890
|
const { theme } = uiFeedback.useUi();
|
|
1890
1891
|
const primaryColor = theme.palette.primary["500"];
|
|
@@ -1900,6 +1901,7 @@ var PillNavMenu = ({
|
|
|
1900
1901
|
{
|
|
1901
1902
|
accessibilityHint: hint,
|
|
1902
1903
|
accessibilityLabel: label,
|
|
1904
|
+
menuHeading,
|
|
1903
1905
|
menuMinWidth: PILL_MENU_MIN_WIDTH,
|
|
1904
1906
|
optionTestID,
|
|
1905
1907
|
options,
|
|
@@ -1932,6 +1934,7 @@ var PillNav = ({
|
|
|
1932
1934
|
minItems = DEFAULT_MIN_ITEMS,
|
|
1933
1935
|
variant = "pills" /* Pills */,
|
|
1934
1936
|
menuHint,
|
|
1937
|
+
menuHeading,
|
|
1935
1938
|
menuTestID,
|
|
1936
1939
|
dropdownVariant,
|
|
1937
1940
|
containerStyle
|
|
@@ -1947,6 +1950,7 @@ var PillNav = ({
|
|
|
1947
1950
|
dropdownVariant,
|
|
1948
1951
|
hint: menuHint ?? regionLabel,
|
|
1949
1952
|
items,
|
|
1953
|
+
menuHeading,
|
|
1950
1954
|
pathname,
|
|
1951
1955
|
regionLabel,
|
|
1952
1956
|
testID: menuTestID,
|