@worldresources/wri-design-systems 2.191.3 → 2.191.6

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
@@ -1,5 +1,5 @@
1
1
  import * as _chakra_ui_react from '@chakra-ui/react';
2
- import { ButtonProps as ButtonProps$1, Checkbox as Checkbox$1, RadioCardRootProps, RadioGroup as RadioGroup$1, Slider as Slider$1, Switch as Switch$1, SelectRootProps, SliderRootProps, TextareaProps as TextareaProps$1, InputProps, Tag as Tag$1, Accordion, Table as Table$1, Tabs, Alert } from '@chakra-ui/react';
2
+ import { ButtonProps as ButtonProps$1, Checkbox as Checkbox$1, RadioCardRootProps, RadioGroup as RadioGroup$1, Slider as Slider$1, SliderRootProps, Switch as Switch$1, SelectRootProps, TextareaProps as TextareaProps$1, InputProps, Tag as Tag$1, Accordion, Table as Table$1, Tabs, Alert } from '@chakra-ui/react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { ReactNode, ReactElement, Ref } from 'react';
@@ -551,6 +551,17 @@ interface ToolbarProps {
551
551
  /** Override internal UI labels for internationalization support. */
552
552
  labels?: Partial<ToolbarLabels>;
553
553
  }
554
+ interface ToolbarButtonProps {
555
+ isExpanded: boolean;
556
+ ariaLabel: string;
557
+ icon?: React.ReactNode;
558
+ label?: React.ReactNode;
559
+ tooltip?: string;
560
+ disabled?: boolean;
561
+ onClick?: () => void;
562
+ showGap?: boolean;
563
+ vertical?: boolean;
564
+ }
554
565
 
555
566
  declare const Toolbar: ({ items, vertical, expanded, showExpandedToggle, autoCollapse, ariaLabel, defaultGaps, labels, }: ToolbarProps) => _emotion_react_jsx_runtime.JSX.Element;
556
567
 
@@ -725,6 +736,32 @@ declare const Slider: React__default.ForwardRefExoticComponent<Omit<Slider$1.Roo
725
736
  isCentred?: boolean;
726
737
  } & React__default.RefAttributes<HTMLDivElement>>;
727
738
 
739
+ type SliderMarksProps = {
740
+ marks?: Array<number | {
741
+ value: number;
742
+ label: React.ReactNode;
743
+ }>;
744
+ isCentred?: boolean;
745
+ };
746
+ type ValueChangeDetails = {
747
+ value: number[];
748
+ };
749
+ type SliderProps = Omit<SliderRootProps, 'size' | 'variant' | 'colorPalette' | 'thumbAlignment' | 'thumbSize' | 'label' | 'defaultChecked' | 'origin' | 'defaultValue'> & {
750
+ width?: string;
751
+ min?: number;
752
+ max?: number;
753
+ value?: number[];
754
+ marks?: Array<number | {
755
+ value: number;
756
+ label: React.ReactNode;
757
+ }>;
758
+ step?: number;
759
+ disabled?: boolean;
760
+ onValueChange?: (details: ValueChangeDetails) => void;
761
+ onValueChangeEnd?: (details: ValueChangeDetails) => void;
762
+ isCentred?: boolean;
763
+ };
764
+
728
765
  type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'invalid' | 'onCheckedChange' | 'onChange'> & {
729
766
  name: string;
730
767
  onChange?: (name: string, checked: boolean) => void;
@@ -777,6 +814,11 @@ type InputWithUnitsProps = {
777
814
 
778
815
  declare const InputWithUnits: ({ label, caption, errorMessage, units, unitsPosition, defaultUnit, defaultValue, onChange, required, disabled, }: InputWithUnitsProps) => _emotion_react_jsx_runtime.JSX.Element;
779
816
 
817
+ /**
818
+ * Internal strength key — used for styling logic.
819
+ * Decoupled from display labels so that translations do not break styles.
820
+ */
821
+ type StrengthLevel = 'very-weak' | 'weak' | 'medium' | 'strong' | 'very-strong';
780
822
  type PasswordProps = {
781
823
  label: string;
782
824
  caption?: string;
@@ -844,25 +886,6 @@ type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette'
844
886
 
845
887
  declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, labels, ...rest }: SelectProps) => _emotion_react_jsx_runtime.JSX.Element;
846
888
 
847
- type ValueChangeDetails = {
848
- value: number[];
849
- };
850
- type SliderProps = Omit<SliderRootProps, 'size' | 'variant' | 'colorPalette' | 'thumbAlignment' | 'thumbSize' | 'label' | 'defaultChecked' | 'origin' | 'defaultValue'> & {
851
- width?: string;
852
- min?: number;
853
- max?: number;
854
- value?: number[];
855
- marks?: Array<number | {
856
- value: number;
857
- label: React.ReactNode;
858
- }>;
859
- step?: number;
860
- disabled?: boolean;
861
- onValueChange?: (details: ValueChangeDetails) => void;
862
- onValueChangeEnd?: (details: ValueChangeDetails) => void;
863
- isCentred?: boolean;
864
- };
865
-
866
889
  type SliderInputProps = {
867
890
  label: string;
868
891
  caption?: string;
@@ -1400,7 +1423,7 @@ type AvatarProps = {
1400
1423
  name: string;
1401
1424
  ariaLabel?: string;
1402
1425
  size?: 'small' | 'medium' | 'large';
1403
- customSize?: string;
1426
+ customSize?: SizeValue;
1404
1427
  src?: string;
1405
1428
  srcSet?: string;
1406
1429
  onClick?: () => void;
@@ -1490,4 +1513,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
1490
1513
 
1491
1514
  declare const showToast: (props: ToastProps) => void;
1492
1515
 
1493
- export { AlertBanner, AnalysisWidget, type AnalysisWidgetLabels, Avatar, Badge, BaseMap, type BaseMapLabels, Breadcrumb, Button, type ButtonLabels, Checkbox, CheckboxList, type CheckboxListLabels, CheckboxOptionCard, CloseButton, type CloseButtonLabels, ClusterPoint, Combobox, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, Footer, FormContainer, IconButton, InlineMessage, type InlineMessageLabels, InputWithUnits, ItemCount, type ItemCountLabels, LayerGroup, LayerGroupContainer, type LayerGroupLabels, LayerItem, LayerParameters, LegendItem, type LegendItemLabels, List, MapControlsToolbar, type MapControlsToolbarLabels, MapMarker, MapMarkers, MapPopUp, type MapPopUpLabels, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, type NavbarLabels, NavigationRail, type NavigationRailLabels, type OpacityControlLabels, OptionCard, Pagination, type PaginationLabels, Panel, Password, type PasswordLabels, ProgressBar, QualitativeAttribute, type QualitativeAttributeLabels, Radio, RadioGroup, RadioList, type RadioListLabels, SSOButtons, ScaleBar, Search, type SearchLabels, Select, type SelectLabels, Sheet, SimpleMapPin, Slider, SliderInput, StepProgressIndicator, type StepProgressIndicatorLabels, Switch, TabBar, Table, TableCell, type TableLabels, TableRow, Tag, TextInput, type TextInputLabels, Textarea, type TextareaLabels, Toast, type ToastLabels, Toolbar, type ToolbarLabels, Tooltip, designSystemStyles, designSystemStylesForTailwind, getThemedColor, showToast };
1516
+ export { AlertBanner, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarProps, Badge, type BadgeProps, BaseMap, type BaseMapLabels, type BaseMapOptionProps, type BaseMapProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonLabels, type ButtonProps, Checkbox, CheckboxList, type CheckboxListLabel, type CheckboxListLabels, type CheckboxListProps, CheckboxOptionCard, type CheckboxOptionCardItemProps, type CheckboxOptionCardProps, type CheckboxProps, CloseButton, type CloseButtonLabels, type CloseButtonProps, ClusterPoint, Combobox, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, Footer, type FooterProps, FormContainer, type FormContainerProps, IconButton, type IconButtonProps, InlineMessage, type InlineMessageLabels, type InlineMessageProps, InputWithUnits, type InputWithUnitsProps, ItemCount, type ItemCountLabels, type ItemCountProps, LayerGroup, LayerGroupContainer, type LayerGroupContainerProps, type LayerGroupLabels, type LayerGroupProps, LayerItem, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarProps, Modal, type ModalProps, MultiActionButton, type MultiActionButtonProps, Navbar, type NavbarLabels, type NavbarNavigationItemsProps, type NavbarProps, NavigationRail, type NavigationRailLabels, type NavigationRailProps, type NavigationRailTabProps, type OpacityControlLabels, OptionCard, type OptionCardItemProps, type OptionCardProps, Pagination, type PaginationLabels, type PaginationProps, Panel, type PanelProps, Password, type PasswordLabels, type PasswordProps, ProgressBar, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagProps, TextInput, type TextInputLabels, type TextInputProps, Textarea, type TextareaLabels, type TextareaProps, Toast, type ToastComponentProps, type ToastLabels, type ToastProps, Toolbar, type ToolbarButtonProps, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, designSystemStyles, designSystemStylesForTailwind, getThemedColor, showToast };