@worldresources/wri-design-systems 2.122.0 → 2.124.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
@@ -73,7 +73,7 @@ type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalet
73
73
 
74
74
  declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, ...rest }: CheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
75
75
 
76
- type OptionCardProps = {
76
+ type CheckboxOptionCardItemProps = {
77
77
  label: string;
78
78
  caption?: string;
79
79
  icon?: React.ReactNode;
@@ -82,16 +82,32 @@ type OptionCardProps = {
82
82
  children?: React.ReactNode;
83
83
  value: string;
84
84
  };
85
- type OptionCardGroupProps = Omit<RadioCardRootProps, 'colorPalette' | 'size' | 'variant' | 'as' | 'asChild' | 'unstyled' | 'defaultChecked'> & {
85
+ type CheckboxOptionCardProps = {
86
+ defaultValue?: string[];
87
+ items: CheckboxOptionCardItemProps[];
88
+ onValueChange?: (value: string[]) => void;
89
+ };
90
+
91
+ declare const CheckboxOptionCard: ({ defaultValue, items, onValueChange, }: CheckboxOptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
92
+
93
+ type OptionCardItemProps = {
94
+ label: string;
95
+ caption?: string;
96
+ icon?: React.ReactNode;
97
+ variant?: 'default' | 'centered' | 'expanded';
98
+ disabled?: boolean;
99
+ children?: React.ReactNode;
100
+ value: string;
101
+ };
102
+ type OptionCardProps = Omit<RadioCardRootProps, 'colorPalette' | 'size' | 'variant' | 'as' | 'asChild' | 'unstyled' | 'defaultChecked'> & {
86
103
  defaultValue?: string;
104
+ items: OptionCardItemProps[];
87
105
  onValueChange?: ({ value }: {
88
106
  value: string;
89
107
  }) => void;
90
108
  };
91
109
 
92
- declare const OptionCard: ({ label, caption, icon, variant, disabled, children, value, }: OptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
93
-
94
- declare const OptionCardGroup: ({ children, ...rest }: OptionCardGroupProps) => react_jsx_runtime.JSX.Element;
110
+ declare const OptionCard: ({ defaultValue, items, onValueChange, }: OptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
95
111
 
96
112
  type RadioProps = Omit<RadioGroup$1.ItemProps, 'size' | 'variant' | 'colorPalette' | 'name' | 'defaultChecked' | 'onChange'> & {
97
113
  value: string;
@@ -209,9 +225,10 @@ type RadioListProps = {
209
225
  errorMessage?: string;
210
226
  horizontal?: boolean;
211
227
  required?: boolean;
228
+ variant?: 'default' | 'card';
212
229
  };
213
230
 
214
- declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: RadioListProps) => _emotion_react_jsx_runtime.JSX.Element;
231
+ declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, variant, required, }: RadioListProps) => _emotion_react_jsx_runtime.JSX.Element;
215
232
 
216
233
  type SelectItemProps = {
217
234
  label: string;
@@ -516,6 +533,46 @@ declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpe
516
533
 
517
534
  declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
518
535
 
536
+ type MenuItemProps = {
537
+ label?: string;
538
+ caption?: string;
539
+ startIcon?: React.ReactNode;
540
+ endIcon?: React.ReactNode;
541
+ command?: string;
542
+ children?: React.ReactNode;
543
+ value: string;
544
+ disabled?: boolean;
545
+ submenu?: MenuItemProps[];
546
+ };
547
+ type MenuProps = {
548
+ label: string;
549
+ items?: MenuItemProps[];
550
+ groups?: {
551
+ title: string;
552
+ items: MenuItemProps[];
553
+ }[];
554
+ onSelect?: (value: string) => void;
555
+ };
556
+
557
+ declare const Menu: ({ label, items, groups, onSelect }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
558
+
559
+ type ModalProps = {
560
+ title: string;
561
+ content: React.ReactNode;
562
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
563
+ draggable?: boolean;
564
+ blocking?: boolean;
565
+ open: boolean;
566
+ onClose?: () => void;
567
+ showCancelButton?: boolean;
568
+ cancelLabel?: string;
569
+ showActionButton?: boolean;
570
+ actionLabel?: string;
571
+ onActionClick?: VoidFunction;
572
+ };
573
+
574
+ declare const Modal: ({ title, content, size, draggable, blocking, open, onClose, showCancelButton, cancelLabel, showActionButton, actionLabel, onActionClick, }: ModalProps) => _emotion_react_jsx_runtime.JSX.Element | null;
575
+
519
576
  type BadgeProps = {
520
577
  hasNotification?: boolean;
521
578
  notificationCount?: number;
@@ -584,4 +641,4 @@ declare const IconMarkers: {
584
641
  Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
585
642
  };
586
643
 
587
- export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MapControl, MapControls, MultiActionButton, NavigationRail, OptionCard, OptionCardGroup, Pagination, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };
644
+ export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MapControl, MapControls, Menu, Modal, MultiActionButton, NavigationRail, OptionCard, Pagination, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };