@worldresources/wri-design-systems 2.205.2 → 2.207.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/README.md +1 -0
- package/dist/index.cjs.js +648 -550
- package/dist/index.d.ts +81 -4
- package/dist/index.esm.js +469 -371
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,21 @@ type MapPopUpLabels = {
|
|
|
175
175
|
/** aria-label on the close button. Default: "Close" */
|
|
176
176
|
closeLabel: string;
|
|
177
177
|
};
|
|
178
|
+
/** Labels for GuidedTour internal UI strings. */
|
|
179
|
+
type GuidedTourLabels = {
|
|
180
|
+
/** Builds the step counter shown in the footer. Default: (current, total) => `${current} of ${total}` */
|
|
181
|
+
stepCounterLabel: (current: number, total: number) => string;
|
|
182
|
+
/** aria-label on the previous step button. Default: "Previous step" */
|
|
183
|
+
previousStepLabel: string;
|
|
184
|
+
/** aria-label on the next step button. Default: "Next step" */
|
|
185
|
+
nextStepLabel: string;
|
|
186
|
+
/** Label on the last step button. Default: "Finish" */
|
|
187
|
+
finishLabel: string;
|
|
188
|
+
/** Label on the skip button. Default: "Skip all" */
|
|
189
|
+
skipAllLabel: string;
|
|
190
|
+
/** Label on the primary button shown on the last step. Default: "Start exploring" */
|
|
191
|
+
startExploringLabel: string;
|
|
192
|
+
};
|
|
178
193
|
/** Labels for MapMarker internal UI strings. */
|
|
179
194
|
type MapMarkerLabels = {
|
|
180
195
|
/** aria-label builder for cluster markers when count is provided. Default: (count) => `Cluster of ${count} locations` */
|
|
@@ -609,6 +624,7 @@ type DesignSystemLabels = {
|
|
|
609
624
|
ProgressBar?: Partial<ProgressBarLabels>;
|
|
610
625
|
InlineMessage?: Partial<InlineMessageLabels>;
|
|
611
626
|
MapPopUp?: Partial<MapPopUpLabels>;
|
|
627
|
+
GuidedTour?: Partial<GuidedTourLabels>;
|
|
612
628
|
MapMarker?: Partial<MapMarkerLabels>;
|
|
613
629
|
AnalysisWidget?: Partial<AnalysisWidgetLabels>;
|
|
614
630
|
Table?: Partial<TableLabels>;
|
|
@@ -687,7 +703,7 @@ type RichTextEditorProps = {
|
|
|
687
703
|
declare const RichTextEditor: ({ defaultValue, disabled, ariaLabel, placeholder, minHeight, visibleControls, onChange, labels, }: RichTextEditorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
688
704
|
|
|
689
705
|
type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
|
690
|
-
label?: string;
|
|
706
|
+
label?: string | React__default.ReactNode;
|
|
691
707
|
loading?: boolean;
|
|
692
708
|
variant?: 'primary' | 'secondary' | 'borderless' | 'outline' | 'negative';
|
|
693
709
|
size?: 'default' | 'small';
|
|
@@ -701,7 +717,7 @@ type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'ch
|
|
|
701
717
|
|
|
702
718
|
/** @jsxImportSource @emotion/react */
|
|
703
719
|
declare const Button: React$1.ForwardRefExoticComponent<Omit<_chakra_ui_react.ButtonProps, "children" | "colorPalette" | "size" | "variant"> & {
|
|
704
|
-
label?: string;
|
|
720
|
+
label?: string | React.ReactNode;
|
|
705
721
|
loading?: boolean;
|
|
706
722
|
variant?: "primary" | "secondary" | "borderless" | "outline" | "negative";
|
|
707
723
|
size?: "default" | "small";
|
|
@@ -954,6 +970,7 @@ declare const Slider: React__default.ForwardRefExoticComponent<Omit<Slider$1.Roo
|
|
|
954
970
|
value: number[];
|
|
955
971
|
}) => void;
|
|
956
972
|
isCentred?: boolean;
|
|
973
|
+
colors?: string[];
|
|
957
974
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
958
975
|
|
|
959
976
|
type SliderMarksProps = {
|
|
@@ -980,6 +997,8 @@ type SliderProps = Omit<SliderRootProps, 'size' | 'variant' | 'colorPalette' | '
|
|
|
980
997
|
onValueChange?: (details: ValueChangeDetails) => void;
|
|
981
998
|
onValueChangeEnd?: (details: ValueChangeDetails) => void;
|
|
982
999
|
isCentred?: boolean;
|
|
1000
|
+
/** Colors used to render a gradient track, e.g. for data-driven scales (low → high). */
|
|
1001
|
+
colors?: string[];
|
|
983
1002
|
};
|
|
984
1003
|
|
|
985
1004
|
type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'invalid' | 'onCheckedChange' | 'onChange' | 'labels'> & {
|
|
@@ -1236,6 +1255,58 @@ type TagProps = Omit<Tag$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'chi
|
|
|
1236
1255
|
|
|
1237
1256
|
declare const Tag: ({ label, size, variant, disabled, icon, onClose, closable, labels, ...rest }: TagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1238
1257
|
|
|
1258
|
+
type GuidedTourStep = {
|
|
1259
|
+
/** Stable identifier for the step, useful as a React key and for tracking. */
|
|
1260
|
+
id: string;
|
|
1261
|
+
/** The element the popup/connector should point to for this step. */
|
|
1262
|
+
anchorRef: React.RefObject<HTMLButtonElement | null>;
|
|
1263
|
+
/** Preferred placement. Default: "bottom" */
|
|
1264
|
+
placement?: Placement;
|
|
1265
|
+
/** Gap between anchor and popup. Also affects connector length. Default: 30 */
|
|
1266
|
+
offset?: number;
|
|
1267
|
+
/** Bold heading rendered in the popup header. */
|
|
1268
|
+
title: React.ReactNode;
|
|
1269
|
+
/** Optional secondary line under the title. */
|
|
1270
|
+
caption?: React.ReactNode;
|
|
1271
|
+
/** Optional icon rendered before the title. */
|
|
1272
|
+
icon?: React.ReactNode;
|
|
1273
|
+
/** Body of the step. */
|
|
1274
|
+
content: React.ReactNode;
|
|
1275
|
+
/** Extra content appended below the tour footer controls for this step. */
|
|
1276
|
+
footer?: React.ReactNode;
|
|
1277
|
+
/** Override internal MapPopUp labels for this step. */
|
|
1278
|
+
labels?: Partial<MapPopUpLabels>;
|
|
1279
|
+
};
|
|
1280
|
+
type GuidedTourProps = {
|
|
1281
|
+
/** Whether the tour is visible. */
|
|
1282
|
+
open: boolean;
|
|
1283
|
+
onOpenChange: (open: boolean) => void;
|
|
1284
|
+
/** The tour steps, in order. */
|
|
1285
|
+
steps: GuidedTourStep[];
|
|
1286
|
+
/** Zero-based index of the visible step. */
|
|
1287
|
+
activeStepIndex: number;
|
|
1288
|
+
/** Called with the next/previous index when navigating. */
|
|
1289
|
+
onStepChange: (index: number) => void;
|
|
1290
|
+
/** Called on Finish (last step). Defaults to closing the tour. */
|
|
1291
|
+
onFinish?: () => void;
|
|
1292
|
+
/** Called on Skip all. Defaults to closing the tour. */
|
|
1293
|
+
onSkip?: () => void;
|
|
1294
|
+
/**
|
|
1295
|
+
* Surface style of the popup. `dark` uses neutral/800 as background,
|
|
1296
|
+
* neutral/100 as text color and neutral/900 for the connector (arrow).
|
|
1297
|
+
* Default: "dark"
|
|
1298
|
+
*/
|
|
1299
|
+
variant?: 'default' | 'dark';
|
|
1300
|
+
/** Close the tour with the Escape key. Default: true */
|
|
1301
|
+
closeOnEscape?: boolean;
|
|
1302
|
+
/** Close the tour when clicking outside the popup. Default: false */
|
|
1303
|
+
closeOnOutsideClick?: boolean;
|
|
1304
|
+
/** Override internal UI labels for internationalization support. */
|
|
1305
|
+
labels?: Partial<GuidedTourLabels>;
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
declare const GuidedTour: ({ open, onOpenChange, steps, activeStepIndex, onStepChange, onFinish, onSkip, variant, closeOnEscape, closeOnOutsideClick, labels, }: GuidedTourProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
|
1309
|
+
|
|
1239
1310
|
type AdditionalSettingsProps = {
|
|
1240
1311
|
label: string;
|
|
1241
1312
|
checked?: boolean;
|
|
@@ -1314,6 +1385,12 @@ type MapPopUpProps = {
|
|
|
1314
1385
|
content: React.ReactNode;
|
|
1315
1386
|
footer?: React.ReactNode;
|
|
1316
1387
|
placement?: Placement;
|
|
1388
|
+
/**
|
|
1389
|
+
* Surface style of the popup. `dark` uses neutral/800 as background,
|
|
1390
|
+
* neutral/100 as text color and neutral/900 for the connector (arrow).
|
|
1391
|
+
* Default: "default"
|
|
1392
|
+
*/
|
|
1393
|
+
variant?: 'default' | 'dark';
|
|
1317
1394
|
/** Gap between anchor and modal. Also affects connector length */
|
|
1318
1395
|
offset?: number;
|
|
1319
1396
|
closeOnEscape?: boolean;
|
|
@@ -1322,7 +1399,7 @@ type MapPopUpProps = {
|
|
|
1322
1399
|
labels?: Partial<MapPopUpLabels>;
|
|
1323
1400
|
};
|
|
1324
1401
|
|
|
1325
|
-
declare const MapPopUp: ({ open, onOpenChange, anchorRef, header, content, footer, placement, offset, closeOnEscape, closeOnOutsideClick, labels, }: MapPopUpProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
|
1402
|
+
declare const MapPopUp: ({ open, onOpenChange, anchorRef, header, content, footer, placement, variant, offset, closeOnEscape, closeOnOutsideClick, labels, }: MapPopUpProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
|
1326
1403
|
|
|
1327
1404
|
type LayerItemProps = {
|
|
1328
1405
|
name: string;
|
|
@@ -1857,4 +1934,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1857
1934
|
declare const showToast: (props: ToastProps) => void;
|
|
1858
1935
|
declare const closeToast: (id?: string) => void;
|
|
1859
1936
|
|
|
1860
|
-
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, type BadgeProps, type BadgeSize, 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, OpacityControl, type OpacityControlLabels, type OpacityControlProps, 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 ToolbarExpandSide, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
|
1937
|
+
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, type BadgeProps, type BadgeSize, 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, GuidedTour, type GuidedTourProps, type GuidedTourStep, 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, OpacityControl, type OpacityControlLabels, type OpacityControlProps, 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 ToolbarExpandSide, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|