@worldresources/wri-design-systems 2.143.1 → 2.144.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
@@ -4,6 +4,7 @@ import * as React$1 from 'react';
4
4
  import React__default, { ReactElement, Ref } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
7
+ import { Placement } from '@floating-ui/react';
7
8
 
8
9
  declare const designSystemStyles: _chakra_ui_react.SystemContext;
9
10
  declare const getThemedColor: (variant: "neutral" | "primary" | "secondary" | "success" | "warning" | "error" | "accessible", index: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "text-on-primary-mids" | "text-on-secondary-mids" | "controls-on-neutral-lights" | "controls-on-neutral-darks") => string;
@@ -429,23 +430,44 @@ declare const BaseMap: ({ title, caption, additionalSettings, options, onOptionS
429
430
 
430
431
  type IconMarkerProps = {
431
432
  ariaLabel: string;
432
- icon: React.ReactNode;
433
+ icon?: React.ReactNode;
433
434
  backgroundColor?: string;
434
435
  onClick?: () => void;
436
+ showFocusState?: boolean;
435
437
  };
436
438
 
437
- declare const IconMarker: ({ ariaLabel, icon, backgroundColor, onClick, }: IconMarkerProps) => _emotion_react_jsx_runtime.JSX.Element;
439
+ declare const IconMarker: React$1.ForwardRefExoticComponent<IconMarkerProps & React$1.RefAttributes<HTMLButtonElement>>;
438
440
 
439
441
  type GenericIconMarkersProps = {
440
442
  ariaLabel?: string;
441
443
  onClick?: () => void;
444
+ triggerRef?: React__default.Ref<HTMLButtonElement>;
445
+ showFocusState?: boolean;
442
446
  };
443
447
  declare const IconMarkers: {
444
- Paper: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
445
- Drop: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
446
- Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
448
+ Paper: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
449
+ Drop: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
450
+ Plant: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
451
+ Point: ({ ariaLabel, onClick, triggerRef, showFocusState, }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
447
452
  };
448
453
 
454
+ type MapPopUpProps = {
455
+ open: boolean;
456
+ onOpenChange: (open: boolean) => void;
457
+ /** The element that the modal/connector should point to */
458
+ anchorRef: React.RefObject<HTMLElement>;
459
+ header: React.ReactNode;
460
+ content: React.ReactNode;
461
+ footer?: React.ReactNode;
462
+ placement?: Placement;
463
+ /** Gap between anchor and modal. Also affects connector length */
464
+ offset?: number;
465
+ closeOnEscape?: boolean;
466
+ closeOnOutsideClick?: boolean;
467
+ };
468
+
469
+ declare const MapPopUp: ({ open, onOpenChange, anchorRef, header, content, footer, placement, offset, closeOnEscape, closeOnOutsideClick, }: MapPopUpProps) => _emotion_react_jsx_runtime.JSX.Element | null;
470
+
449
471
  type LayerItemProps = {
450
472
  name: string;
451
473
  label: string;
@@ -544,9 +566,10 @@ interface ListItemProps {
544
566
  }
545
567
  interface ListProps {
546
568
  items: ListItemProps[];
569
+ noBorder?: boolean;
547
570
  }
548
571
 
549
- declare const List: ({ items }: ListProps) => _emotion_react_jsx_runtime.JSX.Element;
572
+ declare const List: ({ items, noBorder }: ListProps) => _emotion_react_jsx_runtime.JSX.Element;
550
573
 
551
574
  type TableProps = {
552
575
  columns: {
@@ -796,4 +819,4 @@ type ToastProps = {
796
819
 
797
820
  declare const showToast: (props: ToastProps) => void;
798
821
 
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 };
822
+ export { Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ExtendableCard, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControlsToolbar, MapPopUp, 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 };