@worldresources/wri-design-systems 2.130.1 → 2.132.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
@@ -19,6 +19,18 @@ type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'ch
19
19
 
20
20
  declare const Button: ({ label, loading, variant, size, disabled, leftIcon, rightIcon, ...rest }: ButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
21
21
 
22
+ type GenericSSOButtonsProps = {
23
+ ariaLabel?: string;
24
+ size?: 'default' | 'small';
25
+ onClick?: () => void;
26
+ };
27
+ declare const SSOButtons: {
28
+ Google: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
29
+ Facebook: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
30
+ X: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
31
+ Microsoft: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
32
+ };
33
+
22
34
  type CloseButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children' | '_loading'> & {
23
35
  disabled?: boolean;
24
36
  };
@@ -44,6 +56,49 @@ type MapControlProps = {
44
56
 
45
57
  declare const MapControl: ({ items, vertical }: MapControlProps) => _emotion_react_jsx_runtime.JSX.Element;
46
58
 
59
+ type ZoomProps = {
60
+ onZoomInClick: () => void;
61
+ onZoomOutClick: () => void;
62
+ vertical?: boolean;
63
+ };
64
+ type GenericMapControlProps = {
65
+ onClick: () => void;
66
+ };
67
+ declare const MapControls: {
68
+ Zoom: ({ onZoomInClick, onZoomOutClick, vertical }: ZoomProps) => react_jsx_runtime.JSX.Element;
69
+ Expand: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
70
+ Share: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
71
+ Print: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
72
+ Settings: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
73
+ Question: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
74
+ };
75
+
76
+ type MenuItemProps = {
77
+ label?: string;
78
+ caption?: string;
79
+ startIcon?: React.ReactNode;
80
+ endIcon?: React.ReactNode;
81
+ command?: string;
82
+ children?: React.ReactNode;
83
+ value?: string;
84
+ disabled?: boolean;
85
+ submenu?: MenuItemProps[];
86
+ onClick?: () => void;
87
+ link?: string;
88
+ };
89
+ type MenuProps = {
90
+ label: string;
91
+ items?: MenuItemProps[];
92
+ groups?: {
93
+ title: string;
94
+ items: MenuItemProps[];
95
+ }[];
96
+ onSelect?: (value: string) => void;
97
+ customTrigger?: React.ReactNode;
98
+ };
99
+
100
+ declare const Menu: ({ label, items, groups, onSelect, customTrigger }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
101
+
47
102
  type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
48
103
  variant?: 'primary' | 'secondary';
49
104
  size?: 'default' | 'small';
@@ -332,6 +387,16 @@ type IconMarkerProps = {
332
387
 
333
388
  declare const IconMarker: ({ ariaLabel, icon, backgroundColor, onClick, }: IconMarkerProps) => _emotion_react_jsx_runtime.JSX.Element;
334
389
 
390
+ type GenericIconMarkersProps = {
391
+ ariaLabel?: string;
392
+ onClick?: () => void;
393
+ };
394
+ declare const IconMarkers: {
395
+ Paper: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
396
+ Drop: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
397
+ Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
398
+ };
399
+
335
400
  type LayerItemProps = {
336
401
  name: string;
337
402
  label: string;
@@ -415,16 +480,6 @@ type ItemCountProps = {
415
480
 
416
481
  declare const ItemCount: ({ pageSize, currentPage, totalItems, onPageSizeChange, showItemCountText, }: ItemCountProps) => _emotion_react_jsx_runtime.JSX.Element;
417
482
 
418
- type PaginationProps = {
419
- currentPage: number;
420
- totalItems: number;
421
- pageSize: number;
422
- variant?: 'default' | 'compact' | 'compact-with-buttons';
423
- onPageChange?: (page: number) => void;
424
- };
425
-
426
- declare const Pagination: ({ totalItems, pageSize, currentPage, variant, onPageChange, }: PaginationProps) => _emotion_react_jsx_runtime.JSX.Element;
427
-
428
483
  type TableProps = {
429
484
  columns: {
430
485
  key: string;
@@ -458,6 +513,23 @@ declare const Table: ({ columns, data, renderRow, striped, stickyHeader, paginat
458
513
  declare const TableRow: React$1.ForwardRefExoticComponent<Table$1.RowProps & React$1.RefAttributes<HTMLTableRowElement>>;
459
514
  declare const TableCell: React$1.ForwardRefExoticComponent<Table$1.CellProps & React$1.RefAttributes<HTMLTableCellElement>>;
460
515
 
516
+ type ModalProps = {
517
+ title: string;
518
+ content: React.ReactNode;
519
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
520
+ draggable?: boolean;
521
+ blocking?: boolean;
522
+ open: boolean;
523
+ onClose?: () => void;
524
+ showCancelButton?: boolean;
525
+ cancelLabel?: string;
526
+ showActionButton?: boolean;
527
+ actionLabel?: string;
528
+ onActionClick?: VoidFunction;
529
+ };
530
+
531
+ declare const Modal: ({ title, content, size, draggable, blocking, open, onClose, showCancelButton, cancelLabel, showActionButton, actionLabel, onActionClick, }: ModalProps) => _emotion_react_jsx_runtime.JSX.Element | null;
532
+
461
533
  type PanelProps = {
462
534
  header?: React.ReactNode;
463
535
  content: React.ReactNode;
@@ -505,30 +577,6 @@ type FooterProps = {
505
577
 
506
578
  declare const Footer: ({ children, label, fixed, filled, maxWidth, }: FooterProps) => _emotion_react_jsx_runtime.JSX.Element;
507
579
 
508
- type MenuItemProps = {
509
- label?: string;
510
- caption?: string;
511
- startIcon?: React.ReactNode;
512
- endIcon?: React.ReactNode;
513
- command?: string;
514
- children?: React.ReactNode;
515
- value?: string;
516
- disabled?: boolean;
517
- submenu?: MenuItemProps[];
518
- onClick?: () => void;
519
- link?: string;
520
- };
521
- type MenuProps = {
522
- label: string;
523
- items?: MenuItemProps[];
524
- groups?: {
525
- title: string;
526
- items: MenuItemProps[];
527
- }[];
528
- onSelect?: (value: string) => void;
529
- customTrigger?: React.ReactNode;
530
- };
531
-
532
580
  type NavbarNavigationItemsProps = {
533
581
  label: string;
534
582
  link?: string;
@@ -571,15 +619,15 @@ type NavigationRailProps = {
571
619
 
572
620
  declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpenChange, navbarHeight, footerHeight, }: NavigationRailProps) => _emotion_react_jsx_runtime.JSX.Element;
573
621
 
574
- type StepBarProps = {
575
- steps: {
576
- label?: string;
577
- onClick?: () => void;
578
- }[];
579
- currentStep: number;
622
+ type PaginationProps = {
623
+ currentPage: number;
624
+ totalItems: number;
625
+ pageSize: number;
626
+ variant?: 'default' | 'compact' | 'compact-with-buttons';
627
+ onPageChange?: (page: number) => void;
580
628
  };
581
629
 
582
- declare const StepBar: ({ steps, currentStep }: StepBarProps) => _emotion_react_jsx_runtime.JSX.Element;
630
+ declare const Pagination: ({ totalItems, pageSize, currentPage, variant, onPageChange, }: PaginationProps) => _emotion_react_jsx_runtime.JSX.Element;
583
631
 
584
632
  type TabBarItemProps = Omit<Tabs.TriggerProps, 'asChild'> & {
585
633
  label: string;
@@ -596,25 +644,6 @@ type TabBarProps = {
596
644
 
597
645
  declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
598
646
 
599
- declare const Menu: ({ label, items, groups, onSelect, customTrigger }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
600
-
601
- type ModalProps = {
602
- title: string;
603
- content: React.ReactNode;
604
- size?: 'small' | 'medium' | 'large' | 'xlarge';
605
- draggable?: boolean;
606
- blocking?: boolean;
607
- open: boolean;
608
- onClose?: () => void;
609
- showCancelButton?: boolean;
610
- cancelLabel?: string;
611
- showActionButton?: boolean;
612
- actionLabel?: string;
613
- onActionClick?: VoidFunction;
614
- };
615
-
616
- declare const Modal: ({ title, content, size, draggable, blocking, open, onClose, showCancelButton, cancelLabel, showActionButton, actionLabel, onActionClick, }: ModalProps) => _emotion_react_jsx_runtime.JSX.Element | null;
617
-
618
647
  type BadgeProps = {
619
648
  hasNotification?: boolean;
620
649
  notificationCount?: number;
@@ -636,6 +665,22 @@ type InlineMessageProps = {
636
665
 
637
666
  declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, isButtonRight, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
638
667
 
668
+ type ProgressBarProps = {
669
+ progress: number;
670
+ };
671
+
672
+ declare const ProgressBar: ({ progress }: ProgressBarProps) => _emotion_react_jsx_runtime.JSX.Element;
673
+
674
+ type StepProgressIndicatorProps = {
675
+ steps: {
676
+ label?: string;
677
+ onClick?: () => void;
678
+ }[];
679
+ currentStep: number;
680
+ };
681
+
682
+ declare const StepProgressIndicator: ({ steps, currentStep, }: StepProgressIndicatorProps) => _emotion_react_jsx_runtime.JSX.Element;
683
+
639
684
  /** @jsxImportSource @emotion/react */
640
685
 
641
686
  declare const Toast: React$1.FC;
@@ -657,43 +702,4 @@ type ToastProps = {
657
702
 
658
703
  declare const showToast: (props: ToastProps) => void;
659
704
 
660
- type ZoomProps = {
661
- onZoomInClick: () => void;
662
- onZoomOutClick: () => void;
663
- vertical?: boolean;
664
- };
665
- type GenericMapControlProps = {
666
- onClick: () => void;
667
- };
668
- declare const MapControls: {
669
- Zoom: ({ onZoomInClick, onZoomOutClick, vertical }: ZoomProps) => react_jsx_runtime.JSX.Element;
670
- Expand: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
671
- Share: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
672
- Print: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
673
- Settings: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
674
- Question: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
675
- };
676
-
677
- type GenericIconMarkersProps = {
678
- ariaLabel?: string;
679
- onClick?: () => void;
680
- };
681
- declare const IconMarkers: {
682
- Paper: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
683
- Drop: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
684
- Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
685
- };
686
-
687
- type GenericSSOButtonsProps = {
688
- ariaLabel?: string;
689
- size?: 'default' | 'small';
690
- onClick?: () => void;
691
- };
692
- declare const SSOButtons: {
693
- Google: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
694
- Facebook: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
695
- X: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
696
- Microsoft: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
697
- };
698
-
699
- export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, MapControl, MapControls, Menu, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, Slider, SliderInput, StepBar, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };
705
+ export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, MapControl, MapControls, Menu, 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, designSystemStyles, getThemedColor, showToast };