@worldresources/wri-design-systems 2.191.4 → 2.191.7

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';
@@ -531,6 +531,8 @@ type IconButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' |
531
531
 
532
532
  declare const IconButton: ({ icon, disabled, ...rest }: IconButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
533
533
 
534
+ type SizeValue = number | string;
535
+
534
536
  interface ToolbarItem {
535
537
  icon: React.ReactElement;
536
538
  ariaLabel: string;
@@ -551,6 +553,17 @@ interface ToolbarProps {
551
553
  /** Override internal UI labels for internationalization support. */
552
554
  labels?: Partial<ToolbarLabels>;
553
555
  }
556
+ interface ToolbarButtonProps {
557
+ isExpanded: boolean;
558
+ ariaLabel: string;
559
+ icon?: React.ReactNode;
560
+ label?: React.ReactNode;
561
+ tooltip?: string;
562
+ disabled?: boolean;
563
+ onClick?: () => void;
564
+ showGap?: boolean;
565
+ vertical?: boolean;
566
+ }
554
567
 
555
568
  declare const Toolbar: ({ items, vertical, expanded, showExpandedToggle, autoCollapse, ariaLabel, defaultGaps, labels, }: ToolbarProps) => _emotion_react_jsx_runtime.JSX.Element;
556
569
 
@@ -725,6 +738,32 @@ declare const Slider: React__default.ForwardRefExoticComponent<Omit<Slider$1.Roo
725
738
  isCentred?: boolean;
726
739
  } & React__default.RefAttributes<HTMLDivElement>>;
727
740
 
741
+ type SliderMarksProps = {
742
+ marks?: Array<number | {
743
+ value: number;
744
+ label: React.ReactNode;
745
+ }>;
746
+ isCentred?: boolean;
747
+ };
748
+ type ValueChangeDetails = {
749
+ value: number[];
750
+ };
751
+ type SliderProps = Omit<SliderRootProps, 'size' | 'variant' | 'colorPalette' | 'thumbAlignment' | 'thumbSize' | 'label' | 'defaultChecked' | 'origin' | 'defaultValue'> & {
752
+ width?: string;
753
+ min?: number;
754
+ max?: number;
755
+ value?: number[];
756
+ marks?: Array<number | {
757
+ value: number;
758
+ label: React.ReactNode;
759
+ }>;
760
+ step?: number;
761
+ disabled?: boolean;
762
+ onValueChange?: (details: ValueChangeDetails) => void;
763
+ onValueChangeEnd?: (details: ValueChangeDetails) => void;
764
+ isCentred?: boolean;
765
+ };
766
+
728
767
  type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'invalid' | 'onCheckedChange' | 'onChange'> & {
729
768
  name: string;
730
769
  onChange?: (name: string, checked: boolean) => void;
@@ -777,6 +816,11 @@ type InputWithUnitsProps = {
777
816
 
778
817
  declare const InputWithUnits: ({ label, caption, errorMessage, units, unitsPosition, defaultUnit, defaultValue, onChange, required, disabled, }: InputWithUnitsProps) => _emotion_react_jsx_runtime.JSX.Element;
779
818
 
819
+ /**
820
+ * Internal strength key — used for styling logic.
821
+ * Decoupled from display labels so that translations do not break styles.
822
+ */
823
+ type StrengthLevel = 'very-weak' | 'weak' | 'medium' | 'strong' | 'very-strong';
780
824
  type PasswordProps = {
781
825
  label: string;
782
826
  caption?: string;
@@ -844,25 +888,6 @@ type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette'
844
888
 
845
889
  declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, labels, ...rest }: SelectProps) => _emotion_react_jsx_runtime.JSX.Element;
846
890
 
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
891
  type SliderInputProps = {
867
892
  label: string;
868
893
  caption?: string;
@@ -1205,8 +1230,6 @@ interface AnalysisWidgetActionsProps {
1205
1230
 
1206
1231
  declare const AnalysisWidget: ({ children, header, footer, expanded, collapsible, actions, showFooterOnCollapsed, labels, }: AnalysisWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1207
1232
 
1208
- type SizeValue = number | string;
1209
-
1210
1233
  type ModalProps = {
1211
1234
  header: React.ReactNode;
1212
1235
  content: React.ReactNode;
@@ -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 };