@worldresources/wri-design-systems 2.191.10 → 2.191.14
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 +120 -7
- package/agents/AGENTS.md +48 -13
- package/agents/border-width.md +13 -0
- package/agents/radius.md +14 -0
- package/agents/setup-ai.sh +0 -0
- package/agents/spacing.md +14 -0
- package/agents/typography.md +27 -0
- package/dist/index.cjs.js +1524 -1458
- package/dist/index.d.ts +20 -5
- package/dist/index.esm.js +1531 -1465
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,20 @@ import React__default, { ReactNode, 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
|
|
|
9
|
+
type ColorVariant = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'accessible';
|
|
10
|
+
type FontSizeToken = 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100;
|
|
11
|
+
type LineHeightToken = 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 1200;
|
|
12
|
+
type SpacingToken = 0 | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 1200 | 1400 | 1600 | 2000 | 2400 | 2800;
|
|
13
|
+
type RadiusToken = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
14
|
+
type BorderWidthToken = 100 | 200 | 300 | 400;
|
|
9
15
|
declare const designSystemStylesForTailwind: Record<string, string>;
|
|
10
16
|
declare const designSystemStyles: _chakra_ui_react.SystemContext;
|
|
11
|
-
declare const getThemedColor: (variant:
|
|
17
|
+
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 getThemedFontSize: (token: FontSizeToken) => string;
|
|
19
|
+
declare const getThemedSpacing: (token: SpacingToken) => string;
|
|
20
|
+
declare const getThemedLineHeight: (token: LineHeightToken) => string;
|
|
21
|
+
declare const getThemedRadius: (token: RadiusToken) => string;
|
|
22
|
+
declare const getThemedBorderWidth: (token: BorderWidthToken) => string;
|
|
12
23
|
|
|
13
24
|
/**
|
|
14
25
|
* Use for label keys that are rendered as visible JSX text (children of elements).
|
|
@@ -615,6 +626,8 @@ declare const Menu: ({ theme, label, fontSize, items, groups, onSelect, customTr
|
|
|
615
626
|
type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
|
616
627
|
variant?: 'primary' | 'secondary';
|
|
617
628
|
size?: 'default' | 'small';
|
|
629
|
+
mainActionLeftIcon?: React__default.ReactNode;
|
|
630
|
+
mainActionRightIcon?: React__default.ReactNode;
|
|
618
631
|
mainActionLabel: string;
|
|
619
632
|
mainActionOnClick: VoidFunction;
|
|
620
633
|
otherActions: {
|
|
@@ -625,7 +638,7 @@ type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPal
|
|
|
625
638
|
disabled?: boolean;
|
|
626
639
|
};
|
|
627
640
|
|
|
628
|
-
declare const MultiActionButton: ({ variant, size, mainActionLabel, mainActionOnClick, otherActions, disabled: isDisabledProp, ...rest }: MultiActionButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
641
|
+
declare const MultiActionButton: ({ variant, size, mainActionLabel, mainActionOnClick, otherActions, disabled: isDisabledProp, mainActionLeftIcon, mainActionRightIcon, ...rest }: MultiActionButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
629
642
|
|
|
630
643
|
type TooltipProps = {
|
|
631
644
|
children: React.ReactNode;
|
|
@@ -1150,7 +1163,7 @@ interface ListItemProps {
|
|
|
1150
1163
|
label: string;
|
|
1151
1164
|
caption?: string;
|
|
1152
1165
|
icon?: ReactElement;
|
|
1153
|
-
value?:
|
|
1166
|
+
value?: React__default.ReactNode;
|
|
1154
1167
|
variant?: ListItemVariant;
|
|
1155
1168
|
isExpanded?: boolean;
|
|
1156
1169
|
onItemClick?: () => void;
|
|
@@ -1194,11 +1207,13 @@ type TableProps = {
|
|
|
1194
1207
|
onPageChange?: (page: number) => void;
|
|
1195
1208
|
onAllItemsSelected?: (checked: boolean) => void;
|
|
1196
1209
|
loading?: boolean;
|
|
1210
|
+
/** When set, the table scrolls vertically within this height and horizontally when it overflows its container (e.g. '400px', '60vh'). */
|
|
1211
|
+
height?: string;
|
|
1197
1212
|
/** Override internal UI labels for internationalization support. */
|
|
1198
1213
|
labels?: Partial<TableLabels>;
|
|
1199
1214
|
};
|
|
1200
1215
|
|
|
1201
|
-
declare const Table: ({ columns, data, renderRow, striped, stickyHeader, pagination, selectable, selectedRows, variant, onSortColumn, onPageSizeChange, onPageChange, onAllItemsSelected, loading, labels, }: TableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1216
|
+
declare const Table: ({ columns, data, renderRow, striped, stickyHeader, pagination, selectable, selectedRows, variant, onSortColumn, onPageSizeChange, onPageChange, onAllItemsSelected, loading, height, labels, }: TableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1202
1217
|
|
|
1203
1218
|
declare const TableRow: React__default.ForwardRefExoticComponent<Table$1.RowProps & React__default.RefAttributes<HTMLTableRowElement>>;
|
|
1204
1219
|
declare const TableCell: React__default.ForwardRefExoticComponent<Table$1.CellProps & React__default.RefAttributes<HTMLTableCellElement>>;
|
|
@@ -1513,4 +1528,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1513
1528
|
|
|
1514
1529
|
declare const showToast: (props: ToastProps) => void;
|
|
1515
1530
|
|
|
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 };
|
|
1531
|
+
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, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|