@worldresources/wri-design-systems 2.202.1 → 2.202.3
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 +681 -770
- package/dist/index.d.ts +51 -6
- package/dist/index.esm.js +647 -736
- 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';
|
|
@@ -874,7 +874,7 @@ type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalet
|
|
|
874
874
|
}) => void;
|
|
875
875
|
};
|
|
876
876
|
|
|
877
|
-
declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, ...rest }: CheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
877
|
+
declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, tabIndex, ...rest }: CheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
878
878
|
|
|
879
879
|
type CheckboxOptionCardItemProps = {
|
|
880
880
|
label: string;
|
|
@@ -993,6 +993,51 @@ type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette'
|
|
|
993
993
|
|
|
994
994
|
declare const Switch: ({ name, defaultChecked, onChange, disabled, isLabelOnLeft, children, labels, ...rest }: SwitchProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
995
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
|
+
|
|
996
1041
|
type CheckboxListLabel = string | {
|
|
997
1042
|
type: 'checkbox';
|
|
998
1043
|
label: string;
|
|
@@ -1105,7 +1150,7 @@ type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette'
|
|
|
1105
1150
|
labels?: Partial<SelectLabels>;
|
|
1106
1151
|
};
|
|
1107
1152
|
|
|
1108
|
-
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;
|
|
1109
1154
|
|
|
1110
1155
|
type SliderInputProps = {
|
|
1111
1156
|
label: string;
|
|
@@ -1135,7 +1180,7 @@ type TextareaProps = Omit<TextareaProps$1, 'size' | 'variant' | 'colorPalette' |
|
|
|
1135
1180
|
labels?: Partial<TextareaLabels>;
|
|
1136
1181
|
};
|
|
1137
1182
|
|
|
1138
|
-
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, onFocus, onBlur, minLength, maxLength, labels, value: controlledValue, ...rest }: TextareaProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1139
1184
|
|
|
1140
1185
|
type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'defaultChecked'> & {
|
|
1141
1186
|
label?: string;
|
|
@@ -1153,7 +1198,7 @@ type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'de
|
|
|
1153
1198
|
labels?: Partial<TextInputLabels>;
|
|
1154
1199
|
};
|
|
1155
1200
|
|
|
1156
|
-
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, onFocus, onBlur, labels, value: controlledValue, ...rest }: TextInputProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1157
1202
|
|
|
1158
1203
|
type ComboboxProps = {
|
|
1159
1204
|
initialItems?: {
|
|
@@ -1793,4 +1838,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1793
1838
|
declare const showToast: (props: ToastProps) => void;
|
|
1794
1839
|
declare const closeToast: (id?: string) => void;
|
|
1795
1840
|
|
|
1796
|
-
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 };
|