@foris/avocado-suite 1.8.23 → 1.8.24

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.
@@ -0,0 +1,7 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ export interface BeaconProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type' | 'aria-label'> {
3
+ /** Accessible name. Required — the beacon has no text content. */
4
+ label: string;
5
+ }
6
+ declare const Beacon: import("react").ForwardRefExoticComponent<BeaconProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export default Beacon;
File without changes
@@ -0,0 +1,2 @@
1
+ export { default } from './Beacon';
2
+ export type { BeaconProps } from './Beacon';
@@ -0,0 +1,33 @@
1
+ import { FC, ReactNode } from 'react';
2
+ /** Declared here on purpose: `react-joyride` must not leak into the public API. */
3
+ export type HotspotPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right' | 'center' | 'auto';
4
+ interface HotspotBaseProps {
5
+ /** CSS selector of the element the card anchors to and the spotlight cuts out. */
6
+ target: string;
7
+ content: ReactNode;
8
+ title?: string;
9
+ /** Controls visibility. The consumer owns "already seen" persistence. */
10
+ isOpen: boolean;
11
+ onClose: () => void;
12
+ /** Fires when the card becomes visible. Analytics hook. */
13
+ onOpen?: () => void;
14
+ /** Label of the confirm button. Required — avocado-suite ships no copy. */
15
+ closeLabel: string;
16
+ placement?: HotspotPlacement;
17
+ /** Spotlight inset around the target, in px. Default 8. */
18
+ spotlightPadding?: number;
19
+ /** Default 1000. Escape hatch for shells that stack differently. */
20
+ zIndex?: number;
21
+ className?: string;
22
+ }
23
+ export type HotspotProps = HotspotBaseProps & ({
24
+ showBeacon?: false;
25
+ beaconLabel?: never;
26
+ beaconClassName?: never;
27
+ } | {
28
+ showBeacon: true;
29
+ beaconLabel: string;
30
+ beaconClassName?: string;
31
+ });
32
+ declare const Hotspot: FC<HotspotProps>;
33
+ export default Hotspot;
File without changes
@@ -0,0 +1,2 @@
1
+ export { default } from './Hotspot';
2
+ export type { HotspotPlacement, HotspotProps } from './Hotspot';
package/dist/index.d.ts CHANGED
@@ -51,6 +51,8 @@ import Weekly from './components/weekly';
51
51
  import WeeklyGroup from './components/weekly-group';
52
52
  import Drawer from './components/drawer/Drawer';
53
53
  import Banner from './components/banner';
54
+ import Beacon from './components/beacon';
55
+ import Hotspot from './components/hotspot';
54
56
  import SidebarMenu from './components/sidebar-menu/SidebarMenu';
55
57
  import AccessPanel from './components/access-panel/AccessPanel';
56
58
  import AccountMenu from './components/account-menu/AccountMenu';
@@ -61,11 +63,13 @@ import { toast } from 'react-toastify';
61
63
  * Hooks
62
64
  */
63
65
  export { useFloatingPortal } from './hooks/useFloatingPortal';
64
- export { Banner, Header, 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, };
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, };
65
67
  /**
66
68
  * Types
67
69
  */
68
70
  export type { ButtonProps } from './components/button/Button';
71
+ export type { BeaconProps } from './components/beacon';
72
+ export type { HotspotPlacement, HotspotProps } from './components/hotspot';
69
73
  export type { BreadcrumbItem } from './components/breadcrumbs/Breadcrumbs';
70
74
  export type { CardAccordionProps } from './components/card-accordion/CardAccordion';
71
75
  export type { CardNotificationProps } from './components/card-notification/CardNotification';