@worldresources/wri-design-systems 2.142.2 → 2.143.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/index.d.ts CHANGED
@@ -45,34 +45,40 @@ type IconButtonProps = Omit<ButtonProps, 'size' | 'variant' | 'colorPalette' | '
45
45
 
46
46
  declare const IconButton: ({ icon, disabled, ...rest }: IconButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
47
47
 
48
- type MapControlProps = {
49
- items: {
50
- icon: React.ReactNode;
51
- onClick?: () => void;
52
- disabled?: boolean;
53
- ariaLabel: string;
54
- }[];
48
+ interface ToolbarItem {
49
+ icon: React.ReactElement;
50
+ ariaLabel: string;
51
+ label?: string;
52
+ disabled?: boolean;
53
+ onClick?: () => void;
54
+ gap?: boolean;
55
+ }
56
+ interface ToolbarProps {
57
+ items: ToolbarItem[];
55
58
  vertical?: boolean;
56
- };
59
+ expanded?: boolean;
60
+ showExpandedToggle?: boolean;
61
+ ariaLabel?: string;
62
+ defaultGaps?: boolean;
63
+ breakpoint?: number;
64
+ }
57
65
 
58
- declare const MapControl: ({ items, vertical }: MapControlProps) => _emotion_react_jsx_runtime.JSX.Element;
66
+ declare const Toolbar: ({ items, vertical, expanded, showExpandedToggle, ariaLabel, defaultGaps, breakpoint, }: ToolbarProps) => _emotion_react_jsx_runtime.JSX.Element;
59
67
 
60
- type ZoomProps = {
61
- onZoomInClick: () => void;
62
- onZoomOutClick: () => void;
68
+ type MapControlsToolbarProps = {
69
+ onZoomInClick?: () => void;
70
+ onZoomOutClick?: () => void;
71
+ onExpandClick?: () => void;
72
+ onShareClick?: () => void;
73
+ onPrintClick?: () => void;
74
+ onSettingsClick?: () => void;
75
+ onQuestionClick?: () => void;
63
76
  vertical?: boolean;
77
+ expanded?: boolean;
78
+ showExpandedToggle?: boolean;
79
+ ariaLabel?: string;
64
80
  };
65
- type GenericMapControlProps = {
66
- onClick: () => void;
67
- };
68
- declare const MapControls: {
69
- Zoom: ({ onZoomInClick, onZoomOutClick, vertical }: ZoomProps) => react_jsx_runtime.JSX.Element;
70
- Expand: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
71
- Share: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
72
- Print: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
73
- Settings: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
74
- Question: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
75
- };
81
+ declare const MapControlsToolbar: ({ onZoomInClick, onZoomOutClick, onExpandClick, onShareClick, onPrintClick, onSettingsClick, onQuestionClick, vertical, expanded, showExpandedToggle, ariaLabel, }: MapControlsToolbarProps) => react_jsx_runtime.JSX.Element;
76
82
 
77
83
  type MenuItemProps = {
78
84
  label?: string;
@@ -659,9 +665,10 @@ type MobileTabBarProps = {
659
665
  tabs: MobileTabBarItemProps[];
660
666
  onTabClick?: (tabValue: string) => void;
661
667
  hideLabels?: boolean;
668
+ activationMode?: 'automatic' | 'manual';
662
669
  };
663
670
 
664
- declare const MobileTabBar: ({ defaultValue, tabs, onTabClick, hideLabels, }: MobileTabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
671
+ declare const MobileTabBar: ({ defaultValue, tabs, onTabClick, hideLabels, activationMode, }: MobileTabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
665
672
 
666
673
  type NavbarNavigationItemsProps = {
667
674
  label: string;
@@ -726,9 +733,10 @@ type TabBarProps = {
726
733
  defaultValue?: string;
727
734
  tabs: TabBarItemProps[];
728
735
  onTabClick?: (tabValue: string) => void;
736
+ activationMode?: 'automatic' | 'manual';
729
737
  };
730
738
 
731
- declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
739
+ declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, activationMode, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
732
740
 
733
741
  type BadgeProps = {
734
742
  hasNotification?: boolean;
@@ -788,4 +796,4 @@ type ToastProps = {
788
796
 
789
797
  declare const showToast: (props: ToastProps) => void;
790
798
 
791
- export { Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ExtendableCard, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControl, MapControls, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, ProgressBar, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, Slider, SliderInput, StepProgressIndicator, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, Tooltip, designSystemStyles, getThemedColor, showToast };
799
+ export { Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ExtendableCard, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControlsToolbar, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, ProgressBar, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, Slider, SliderInput, StepProgressIndicator, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, Toolbar, Tooltip, designSystemStyles, getThemedColor, showToast };