@worldresources/wri-design-systems 2.131.0 → 2.133.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;
@@ -540,6 +588,7 @@ type NavbarNavigationItemsProps = {
540
588
  type NavbarProps = {
541
589
  logo?: React.ReactNode;
542
590
  linkRouter: any;
591
+ pathname: string;
543
592
  navigationSection?: NavbarNavigationItemsProps[];
544
593
  utilitySection?: React.ReactNode[];
545
594
  actionsSection?: {
@@ -551,7 +600,7 @@ type NavbarProps = {
551
600
  onNavbarHeightChange?: (height: number) => void;
552
601
  };
553
602
 
554
- declare const Navbar: ({ logo, linkRouter, navigationSection, utilitySection, actionsSection, maxWidth, fixed, onNavbarHeightChange, }: NavbarProps) => _emotion_react_jsx_runtime.JSX.Element;
603
+ declare const Navbar: ({ logo, linkRouter, pathname, navigationSection, utilitySection, actionsSection, maxWidth, fixed, onNavbarHeightChange, }: NavbarProps) => _emotion_react_jsx_runtime.JSX.Element;
555
604
 
556
605
  type NavigationRailTabProps = Omit<Tabs.TriggerProps, 'asChild'> & {
557
606
  label: string;
@@ -571,15 +620,15 @@ type NavigationRailProps = {
571
620
 
572
621
  declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpenChange, navbarHeight, footerHeight, }: NavigationRailProps) => _emotion_react_jsx_runtime.JSX.Element;
573
622
 
574
- type StepBarProps = {
575
- steps: {
576
- label?: string;
577
- onClick?: () => void;
578
- }[];
579
- currentStep: number;
623
+ type PaginationProps = {
624
+ currentPage: number;
625
+ totalItems: number;
626
+ pageSize: number;
627
+ variant?: 'default' | 'compact' | 'compact-with-buttons';
628
+ onPageChange?: (page: number) => void;
580
629
  };
581
630
 
582
- declare const StepBar: ({ steps, currentStep }: StepBarProps) => _emotion_react_jsx_runtime.JSX.Element;
631
+ declare const Pagination: ({ totalItems, pageSize, currentPage, variant, onPageChange, }: PaginationProps) => _emotion_react_jsx_runtime.JSX.Element;
583
632
 
584
633
  type TabBarItemProps = Omit<Tabs.TriggerProps, 'asChild'> & {
585
634
  label: string;
@@ -596,25 +645,6 @@ type TabBarProps = {
596
645
 
597
646
  declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
598
647
 
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
648
  type BadgeProps = {
619
649
  hasNotification?: boolean;
620
650
  notificationCount?: number;
@@ -642,6 +672,16 @@ type ProgressBarProps = {
642
672
 
643
673
  declare const ProgressBar: ({ progress }: ProgressBarProps) => _emotion_react_jsx_runtime.JSX.Element;
644
674
 
675
+ type StepProgressIndicatorProps = {
676
+ steps: {
677
+ label?: string;
678
+ onClick?: () => void;
679
+ }[];
680
+ currentStep: number;
681
+ };
682
+
683
+ declare const StepProgressIndicator: ({ steps, currentStep, }: StepProgressIndicatorProps) => _emotion_react_jsx_runtime.JSX.Element;
684
+
645
685
  /** @jsxImportSource @emotion/react */
646
686
 
647
687
  declare const Toast: React$1.FC;
@@ -663,43 +703,4 @@ type ToastProps = {
663
703
 
664
704
  declare const showToast: (props: ToastProps) => void;
665
705
 
666
- type ZoomProps = {
667
- onZoomInClick: () => void;
668
- onZoomOutClick: () => void;
669
- vertical?: boolean;
670
- };
671
- type GenericMapControlProps = {
672
- onClick: () => void;
673
- };
674
- declare const MapControls: {
675
- Zoom: ({ onZoomInClick, onZoomOutClick, vertical }: ZoomProps) => react_jsx_runtime.JSX.Element;
676
- Expand: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
677
- Share: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
678
- Print: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
679
- Settings: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
680
- Question: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
681
- };
682
-
683
- type GenericIconMarkersProps = {
684
- ariaLabel?: string;
685
- onClick?: () => void;
686
- };
687
- declare const IconMarkers: {
688
- Paper: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
689
- Drop: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
690
- Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
691
- };
692
-
693
- type GenericSSOButtonsProps = {
694
- ariaLabel?: string;
695
- size?: 'default' | 'small';
696
- onClick?: () => void;
697
- };
698
- declare const SSOButtons: {
699
- Google: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
700
- Facebook: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
701
- X: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
702
- Microsoft: ({ ariaLabel, size, onClick, }: GenericSSOButtonsProps) => react_jsx_runtime.JSX.Element;
703
- };
704
-
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, StepBar, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };
706
+ 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 };