@foris/avocado-suite 1.8.25 → 1.9.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/dist/avocado-suite.es.js +8911 -8716
- package/dist/avocado-suite.umd.js +217 -136
- package/dist/components/header-navigation/HeaderNavigation.d.ts +40 -0
- package/dist/components/header-navigation/HeaderNavigation.test.d.ts +0 -0
- package/dist/components/header-navigation/index.d.ts +2 -0
- package/dist/components/menu/Menu.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes } from 'react';
|
|
2
|
+
import type { Color, IconTypes } from '../../../../avocado-icons';
|
|
3
|
+
import { type BreadcrumbItem } from '../breadcrumbs/Breadcrumbs';
|
|
4
|
+
import type { MenuItem } from '../../types/menu.types';
|
|
5
|
+
/** A decorative icon or an image, both contained in a 56 × 56 px area. */
|
|
6
|
+
export type HeaderNavigationVisual = {
|
|
7
|
+
type: 'icon';
|
|
8
|
+
name: IconTypes;
|
|
9
|
+
filled?: boolean;
|
|
10
|
+
gradient?: boolean;
|
|
11
|
+
color?: `${Color}`;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'image';
|
|
14
|
+
src: string;
|
|
15
|
+
alt: string;
|
|
16
|
+
};
|
|
17
|
+
/** Reusable page navigation, with content and actions supplied by its host. */
|
|
18
|
+
export interface HeaderNavigationProps extends HTMLAttributes<HTMLElement> {
|
|
19
|
+
/** Page title, rendered as the primary heading. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Optional explanation of the page's purpose. */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Navigation hierarchy; mobile shows the parent page. */
|
|
24
|
+
breadcrumbsItems?: BreadcrumbItem[];
|
|
25
|
+
/** Optional overflow actions, without product-specific routing. */
|
|
26
|
+
menuItems?: MenuItem[];
|
|
27
|
+
/** Accessible name for the overflow trigger; defaults to the page title. */
|
|
28
|
+
menuLabel?: string;
|
|
29
|
+
/** Disables the overflow trigger. */
|
|
30
|
+
menuDisabled?: boolean;
|
|
31
|
+
/** Gray by default; brand selects the Figma blue in either theme. */
|
|
32
|
+
background?: 'default' | 'brand';
|
|
33
|
+
/** Optional leading icon or image. */
|
|
34
|
+
leadingVisual?: HeaderNavigationVisual;
|
|
35
|
+
/** Displays the packaged pattern when true, or a caller-provided pattern URL. */
|
|
36
|
+
pattern?: boolean | string;
|
|
37
|
+
}
|
|
38
|
+
/** Page banner extracted from suite-front's HeroBanner presentation. */
|
|
39
|
+
declare const HeaderNavigation: FC<HeaderNavigationProps>;
|
|
40
|
+
export default HeaderNavigation;
|
|
File without changes
|
|
@@ -2,6 +2,8 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ButtonVariant } from '../button/Button.tsx';
|
|
3
3
|
import { MenuItem } from '../../types/menu.types';
|
|
4
4
|
interface MenuProps {
|
|
5
|
+
/** Accessible name for the icon-only menu trigger. */
|
|
6
|
+
triggerLabel?: string;
|
|
5
7
|
/** Overwrite className */
|
|
6
8
|
className?: string;
|
|
7
9
|
/** Control if you want to close the list after clicking one of the options or not */
|
package/dist/index.d.ts
CHANGED
|
@@ -57,13 +57,14 @@ import SidebarMenu from './components/sidebar-menu/SidebarMenu';
|
|
|
57
57
|
import AccessPanel from './components/access-panel/AccessPanel';
|
|
58
58
|
import AccountMenu from './components/account-menu/AccountMenu';
|
|
59
59
|
import Header from './components/header/Header';
|
|
60
|
+
import HeaderNavigation from './components/header-navigation';
|
|
60
61
|
import NavList from './components/nav-list';
|
|
61
62
|
import { toast } from 'react-toastify';
|
|
62
63
|
/**
|
|
63
64
|
* Hooks
|
|
64
65
|
*/
|
|
65
66
|
export { useFloatingPortal } from './hooks/useFloatingPortal';
|
|
66
|
-
export { Banner, Beacon, Header, Hotspot, NavList, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
|
|
67
|
+
export { Banner, Beacon, Header, HeaderNavigation, Hotspot, NavList, Drawer, AccessPanel, AccountMenu, SidebarMenu, Weekly, WeeklyGroup, Accordion, Box, Breadcrumbs, Button, Card, CardAccordion, CardNotification, Checkbox, DataCard, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Modal, Pager, Pill, PreviewerMarkdown, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, Textarea, ThemeProvider, ThemeStore, LocaleStore, Timer, Toaster, Tooltip, Table, toast, };
|
|
67
68
|
/**
|
|
68
69
|
* Types
|
|
69
70
|
*/
|
|
@@ -76,6 +77,7 @@ export type { CardNotificationProps } from './components/card-notification/CardN
|
|
|
76
77
|
export type { DataCardProps, DataCardV1Props, DataCardV1Variant, DataCardV2Props, DataCardV2HeaderStyle, DataCardV2Status, DataCardPaletteIndex, HeaderStatusColor, } from './components/data-card/DataCard';
|
|
77
78
|
export type { DividerProps } from './components/divider/Divider';
|
|
78
79
|
export type { HeadingProps } from './components/heading/Heading';
|
|
80
|
+
export type { HeaderNavigationProps, HeaderNavigationVisual, } from './components/header-navigation';
|
|
79
81
|
export type { LinkProps } from './components/link/Link';
|
|
80
82
|
export type { MenuItem } from './types/menu.types';
|
|
81
83
|
export type { RoundButtonProps } from './components/round-button/RoundButton';
|