@worldresources/wri-design-systems 2.121.0 → 2.123.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 +60 -10
- package/dist/index.cjs.js +936 -569
- package/dist/index.d.ts +67 -9
- package/dist/index.esm.js +935 -568
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ import React$1 from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
6
6
|
|
7
7
|
declare const designSystemStyles: _chakra_ui_react.SystemContext;
|
8
|
-
declare const getThemedColor: (variant: "neutral" | "primary" | "secondary" | "success" | "warning" | "error", index: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900) => string;
|
8
|
+
declare const getThemedColor: (variant: "neutral" | "primary" | "secondary" | "success" | "warning" | "error" | "accessible", 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;
|
9
9
|
|
10
10
|
type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
11
11
|
label?: string;
|
@@ -73,7 +73,7 @@ type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalet
|
|
73
73
|
|
74
74
|
declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, ...rest }: CheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
|
75
75
|
|
76
|
-
type
|
76
|
+
type CheckboxOptionCardItemProps = {
|
77
77
|
label: string;
|
78
78
|
caption?: string;
|
79
79
|
icon?: React.ReactNode;
|
@@ -82,16 +82,32 @@ type OptionCardProps = {
|
|
82
82
|
children?: React.ReactNode;
|
83
83
|
value: string;
|
84
84
|
};
|
85
|
-
type
|
85
|
+
type CheckboxOptionCardProps = {
|
86
|
+
defaultValue?: string[];
|
87
|
+
items: CheckboxOptionCardItemProps[];
|
88
|
+
onValueChange?: (value: string[]) => void;
|
89
|
+
};
|
90
|
+
|
91
|
+
declare const CheckboxOptionCard: ({ defaultValue, items, onValueChange, }: CheckboxOptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
|
92
|
+
|
93
|
+
type OptionCardItemProps = {
|
94
|
+
label: string;
|
95
|
+
caption?: string;
|
96
|
+
icon?: React.ReactNode;
|
97
|
+
variant?: 'default' | 'centered' | 'expanded';
|
98
|
+
disabled?: boolean;
|
99
|
+
children?: React.ReactNode;
|
100
|
+
value: string;
|
101
|
+
};
|
102
|
+
type OptionCardProps = Omit<RadioCardRootProps, 'colorPalette' | 'size' | 'variant' | 'as' | 'asChild' | 'unstyled' | 'defaultChecked'> & {
|
86
103
|
defaultValue?: string;
|
104
|
+
items: OptionCardItemProps[];
|
87
105
|
onValueChange?: ({ value }: {
|
88
106
|
value: string;
|
89
107
|
}) => void;
|
90
108
|
};
|
91
109
|
|
92
|
-
declare const OptionCard: ({
|
93
|
-
|
94
|
-
declare const OptionCardGroup: ({ children, ...rest }: OptionCardGroupProps) => react_jsx_runtime.JSX.Element;
|
110
|
+
declare const OptionCard: ({ defaultValue, items, onValueChange, }: OptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
|
95
111
|
|
96
112
|
type RadioProps = Omit<RadioGroup$1.ItemProps, 'size' | 'variant' | 'colorPalette' | 'name' | 'defaultChecked' | 'onChange'> & {
|
97
113
|
value: string;
|
@@ -209,9 +225,10 @@ type RadioListProps = {
|
|
209
225
|
errorMessage?: string;
|
210
226
|
horizontal?: boolean;
|
211
227
|
required?: boolean;
|
228
|
+
variant?: 'default' | 'card';
|
212
229
|
};
|
213
230
|
|
214
|
-
declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: RadioListProps) => _emotion_react_jsx_runtime.JSX.Element;
|
231
|
+
declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, variant, required, }: RadioListProps) => _emotion_react_jsx_runtime.JSX.Element;
|
215
232
|
|
216
233
|
type SelectItemProps = {
|
217
234
|
label: string;
|
@@ -426,9 +443,10 @@ type ItemCountProps = {
|
|
426
443
|
currentPage: number;
|
427
444
|
totalItems: number;
|
428
445
|
onPageSizeChange?: (pageSize: number) => void;
|
446
|
+
showItemCountText?: boolean;
|
429
447
|
};
|
430
448
|
|
431
|
-
declare const ItemCount: ({ pageSize, currentPage, totalItems, onPageSizeChange, }: ItemCountProps) => _emotion_react_jsx_runtime.JSX.Element;
|
449
|
+
declare const ItemCount: ({ pageSize, currentPage, totalItems, onPageSizeChange, showItemCountText, }: ItemCountProps) => _emotion_react_jsx_runtime.JSX.Element;
|
432
450
|
|
433
451
|
type PaginationProps = {
|
434
452
|
currentPage: number;
|
@@ -457,6 +475,7 @@ type TableProps = {
|
|
457
475
|
currentPage: number;
|
458
476
|
pageSize: number;
|
459
477
|
showItemCount?: boolean;
|
478
|
+
showItemCountText?: boolean;
|
460
479
|
};
|
461
480
|
onSortColumn: (sortColumn: {
|
462
481
|
key: string;
|
@@ -514,6 +533,45 @@ declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpe
|
|
514
533
|
|
515
534
|
declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
516
535
|
|
536
|
+
type MenuItemProps = {
|
537
|
+
label?: string;
|
538
|
+
caption?: string;
|
539
|
+
startIcon?: React.ReactNode;
|
540
|
+
endIcon?: React.ReactNode;
|
541
|
+
command?: string;
|
542
|
+
children?: React.ReactNode;
|
543
|
+
value: string;
|
544
|
+
disabled?: boolean;
|
545
|
+
submenu?: MenuItemProps[];
|
546
|
+
};
|
547
|
+
type MenuProps = {
|
548
|
+
label: string;
|
549
|
+
items?: MenuItemProps[];
|
550
|
+
groups?: {
|
551
|
+
title: string;
|
552
|
+
items: MenuItemProps[];
|
553
|
+
}[];
|
554
|
+
onSelect?: (value: string) => void;
|
555
|
+
};
|
556
|
+
|
557
|
+
declare const Menu: ({ label, items, groups, onSelect }: MenuProps) => _emotion_react_jsx_runtime.JSX.Element;
|
558
|
+
|
559
|
+
type ModalProps = {
|
560
|
+
title: string;
|
561
|
+
content: React.ReactNode;
|
562
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
563
|
+
isDraggable?: boolean;
|
564
|
+
open: boolean;
|
565
|
+
onClose?: () => void;
|
566
|
+
showCancelButton?: boolean;
|
567
|
+
cancelLabel?: string;
|
568
|
+
showActionButton?: boolean;
|
569
|
+
actionLabel?: string;
|
570
|
+
onActionClick?: VoidFunction;
|
571
|
+
};
|
572
|
+
|
573
|
+
declare const Modal: ({ title, content, size, isDraggable, open, onClose, showCancelButton, cancelLabel, showActionButton, actionLabel, onActionClick, }: ModalProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
574
|
+
|
517
575
|
type BadgeProps = {
|
518
576
|
hasNotification?: boolean;
|
519
577
|
notificationCount?: number;
|
@@ -582,4 +640,4 @@ declare const IconMarkers: {
|
|
582
640
|
Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
|
583
641
|
};
|
584
642
|
|
585
|
-
export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MapControl, MapControls, MultiActionButton, NavigationRail, OptionCard,
|
643
|
+
export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MapControl, MapControls, Menu, Modal, MultiActionButton, NavigationRail, OptionCard, Pagination, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };
|