@worldresources/wri-design-systems 2.202.0 → 2.202.2
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.cjs.js +777 -779
- package/dist/index.d.ts +55 -12
- package/dist/index.esm.js +628 -630
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _chakra_ui_react from '@chakra-ui/react';
|
|
|
2
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
|
-
import React__default, { ReactNode, ReactElement, Ref } from 'react';
|
|
5
|
+
import React__default, { ReactNode, HTMLAttributes, ReactElement, Ref } from 'react';
|
|
6
6
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
7
7
|
import { Placement } from '@floating-ui/react';
|
|
8
8
|
import { MaybeElement } from '@zag-js/types';
|
|
@@ -15,7 +15,7 @@ type RadiusToken = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
|
15
15
|
type BorderWidthToken = 100 | 200 | 300 | 400;
|
|
16
16
|
declare const designSystemStylesForTailwind: Record<string, string>;
|
|
17
17
|
declare const designSystemStyles: _chakra_ui_react.SystemContext;
|
|
18
|
-
declare const getThemedColor: (variant: ColorVariant, 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;
|
|
18
|
+
declare const getThemedColor: (variant: ColorVariant, 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" | "text-on-negative-mids") => string;
|
|
19
19
|
declare const getThemedFontSize: (token: FontSizeToken) => string;
|
|
20
20
|
declare const getThemedSpacing: (token: SpacingToken) => string;
|
|
21
21
|
declare const getThemedLineHeight: (token: LineHeightToken) => string;
|
|
@@ -689,7 +689,7 @@ declare const RichTextEditor: ({ defaultValue, disabled, ariaLabel, placeholder,
|
|
|
689
689
|
type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
|
690
690
|
label?: string;
|
|
691
691
|
loading?: boolean;
|
|
692
|
-
variant?: 'primary' | 'secondary' | 'borderless' | 'outline';
|
|
692
|
+
variant?: 'primary' | 'secondary' | 'borderless' | 'outline' | 'negative';
|
|
693
693
|
size?: 'default' | 'small';
|
|
694
694
|
disabled?: boolean;
|
|
695
695
|
leftIcon?: React__default.ReactNode;
|
|
@@ -703,7 +703,7 @@ type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'ch
|
|
|
703
703
|
declare const Button: React$1.ForwardRefExoticComponent<Omit<_chakra_ui_react.ButtonProps, "children" | "colorPalette" | "size" | "variant"> & {
|
|
704
704
|
label?: string;
|
|
705
705
|
loading?: boolean;
|
|
706
|
-
variant?: "primary" | "secondary" | "borderless" | "outline";
|
|
706
|
+
variant?: "primary" | "secondary" | "borderless" | "outline" | "negative";
|
|
707
707
|
size?: "default" | "small";
|
|
708
708
|
disabled?: boolean;
|
|
709
709
|
leftIcon?: React.ReactNode;
|
|
@@ -825,9 +825,7 @@ type MenuProps = {
|
|
|
825
825
|
|
|
826
826
|
declare const Menu: ({ theme, label, hideArrow, fontSize, items, groups, onSelect, customTrigger, selectionMode, defaultSelectedValues, menuWidth, labels, }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
827
827
|
|
|
828
|
-
type MultiActionButtonProps = Omit<ButtonProps
|
|
829
|
-
variant?: 'primary' | 'secondary';
|
|
830
|
-
size?: 'default' | 'small';
|
|
828
|
+
type MultiActionButtonProps = Omit<ButtonProps, 'label' | 'leftIcon' | 'rightIcon' | 'onClick' | 'children' | 'css'> & {
|
|
831
829
|
mainActionLeftIcon?: React__default.ReactNode;
|
|
832
830
|
mainActionRightIcon?: React__default.ReactNode;
|
|
833
831
|
mainActionLabel: string;
|
|
@@ -836,8 +834,8 @@ type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPal
|
|
|
836
834
|
label: React__default.ReactNode;
|
|
837
835
|
value: string;
|
|
838
836
|
onClick: VoidFunction;
|
|
837
|
+
disabled?: boolean;
|
|
839
838
|
}[];
|
|
840
|
-
disabled?: boolean;
|
|
841
839
|
};
|
|
842
840
|
|
|
843
841
|
declare const MultiActionButton: ({ variant, size, mainActionLabel, mainActionOnClick, otherActions, disabled: isDisabledProp, mainActionLeftIcon, mainActionRightIcon, ...rest }: MultiActionButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -995,6 +993,51 @@ type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette'
|
|
|
995
993
|
|
|
996
994
|
declare const Switch: ({ name, defaultChecked, onChange, disabled, isLabelOnLeft, children, labels, ...rest }: SwitchProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
997
995
|
|
|
996
|
+
type FieldWrapperSize = 'small' | 'default';
|
|
997
|
+
type FieldWrapperLabels = {
|
|
998
|
+
/** Accessible label for the required (*) indicator. Default: "required" */
|
|
999
|
+
requiredSymbolLabel?: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* Suffix appended after the field label when the field is optional.
|
|
1002
|
+
* Default: " (Optional)"
|
|
1003
|
+
*/
|
|
1004
|
+
optionalSuffix?: ReactNode;
|
|
1005
|
+
};
|
|
1006
|
+
type FieldWrapperProps = {
|
|
1007
|
+
label?: ReactNode;
|
|
1008
|
+
caption?: string;
|
|
1009
|
+
errorMessage?: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* Forces the error-bar / invalid state even when `errorMessage` is empty
|
|
1012
|
+
* (e.g. Textarea min/max validation shown in the footer).
|
|
1013
|
+
*/
|
|
1014
|
+
invalid?: boolean;
|
|
1015
|
+
required?: boolean;
|
|
1016
|
+
disabled?: boolean;
|
|
1017
|
+
size?: FieldWrapperSize;
|
|
1018
|
+
showOptionalLabel?: boolean;
|
|
1019
|
+
noMarginBottom?: boolean;
|
|
1020
|
+
/** Override strings used by field-semantics labels. */
|
|
1021
|
+
labels?: FieldWrapperLabels;
|
|
1022
|
+
/** Optional slot rendered after the control (e.g. Textarea char-count / min-max errors). */
|
|
1023
|
+
footer?: ReactNode;
|
|
1024
|
+
/**
|
|
1025
|
+
* `field` — Chakra Field primitives (TextInput, Textarea, Combobox).
|
|
1026
|
+
* `group` — plain markup for composite / list inputs (Select, RadioList, etc.).
|
|
1027
|
+
*/
|
|
1028
|
+
semantics?: 'field' | 'group';
|
|
1029
|
+
className?: string;
|
|
1030
|
+
children: ReactNode;
|
|
1031
|
+
/** Optional id on the caption element (for aria-describedby). */
|
|
1032
|
+
captionId?: string;
|
|
1033
|
+
/** Optional id on the error element (for aria-describedby). */
|
|
1034
|
+
errorId?: string;
|
|
1035
|
+
/** Extra props applied to the outer container element. */
|
|
1036
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
declare const FieldWrapper: ({ label, caption, errorMessage, invalid, required, disabled, size, showOptionalLabel, noMarginBottom, labels, footer, semantics, className, children, captionId, errorId, containerProps, }: FieldWrapperProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1040
|
+
|
|
998
1041
|
type CheckboxListLabel = string | {
|
|
999
1042
|
type: 'checkbox';
|
|
1000
1043
|
label: string;
|
|
@@ -1107,7 +1150,7 @@ type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette'
|
|
|
1107
1150
|
labels?: Partial<SelectLabels>;
|
|
1108
1151
|
};
|
|
1109
1152
|
|
|
1110
|
-
declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, labels, ...rest }: SelectProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1153
|
+
declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, labels, value: controlledValue, defaultValue, ...rest }: SelectProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1111
1154
|
|
|
1112
1155
|
type SliderInputProps = {
|
|
1113
1156
|
label: string;
|
|
@@ -1137,7 +1180,7 @@ type TextareaProps = Omit<TextareaProps$1, 'size' | 'variant' | 'colorPalette' |
|
|
|
1137
1180
|
labels?: Partial<TextareaLabels>;
|
|
1138
1181
|
};
|
|
1139
1182
|
|
|
1140
|
-
declare const Textarea: ({ label, caption, placeholder, errorMessage, required, disabled, size, showOptionalLabel, defaultValue, onChange, minLength, maxLength, labels, ...rest }: TextareaProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1183
|
+
declare const Textarea: ({ label, caption, placeholder, errorMessage, required, disabled, size, showOptionalLabel, defaultValue, onChange, minLength, maxLength, labels, value: controlledValue, ...rest }: TextareaProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1141
1184
|
|
|
1142
1185
|
type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'defaultChecked'> & {
|
|
1143
1186
|
label?: string;
|
|
@@ -1155,7 +1198,7 @@ type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'de
|
|
|
1155
1198
|
labels?: Partial<TextInputLabels>;
|
|
1156
1199
|
};
|
|
1157
1200
|
|
|
1158
|
-
declare const TextInput: ({ label, caption, placeholder, errorMessage, required, disabled, size, showOptionalLabel, noMarginBottom, defaultValue, onChange, labels, ...rest }: TextInputProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1201
|
+
declare const TextInput: ({ label, caption, placeholder, errorMessage, required, disabled, size, showOptionalLabel, noMarginBottom, defaultValue, onChange, labels, value: controlledValue, ...rest }: TextInputProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1159
1202
|
|
|
1160
1203
|
type ComboboxProps = {
|
|
1161
1204
|
initialItems?: {
|
|
@@ -1795,4 +1838,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1795
1838
|
declare const showToast: (props: ToastProps) => void;
|
|
1796
1839
|
declare const closeToast: (id?: string) => void;
|
|
1797
1840
|
|
|
1798
|
-
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, 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 ComboboxLabels, 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 LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, 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 ProgressBarLabels, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, 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, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
|
1841
|
+
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, 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 ComboboxLabels, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, FieldWrapper, type FieldWrapperLabels, type FieldWrapperProps, type FieldWrapperSize, 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 LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, 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 ProgressBarLabels, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, 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, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|