@worldresources/wri-design-systems 2.117.0 → 2.119.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 +15 -2
- package/dist/index.cjs.js +690 -507
- package/dist/index.d.ts +105 -6
- package/dist/index.esm.js +692 -509
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
2
|
-
import { ButtonProps as ButtonProps$1, Checkbox as Checkbox$1, RadioCardRootProps, RadioGroup as RadioGroup$1, Slider as Slider$1, Switch as Switch$1, SelectRootProps, SliderRootProps, TextareaProps as TextareaProps$1, InputProps, Tag as Tag$1, Accordion, Tabs } from '@chakra-ui/react';
|
1
|
+
import { SystemContext, ButtonProps as ButtonProps$1, Checkbox as Checkbox$1, RadioCardRootProps, RadioGroup as RadioGroup$1, Slider as Slider$1, Switch as Switch$1, SelectRootProps, SliderRootProps, TextareaProps as TextareaProps$1, InputProps, Tag as Tag$1, Accordion, Tabs, Table as Table$1 } from '@chakra-ui/react';
|
3
2
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
4
3
|
import React$1 from 'react';
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
6
5
|
|
7
|
-
declare const designSystemStyles:
|
6
|
+
declare const designSystemStyles: SystemContext;
|
7
|
+
declare const getThemedColor: (variant: "neutral" | "primary" | "secondary" | "success" | "warning" | "error", index: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900, stylesSystem?: SystemContext) => string;
|
8
8
|
|
9
9
|
type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
10
10
|
label?: string;
|
@@ -31,6 +31,18 @@ type IconButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' |
|
|
31
31
|
|
32
32
|
declare const IconButton: ({ icon, disabled, ...rest }: IconButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
33
33
|
|
34
|
+
type MapControlProps = {
|
35
|
+
items: {
|
36
|
+
icon: React.ReactNode;
|
37
|
+
onClick?: () => void;
|
38
|
+
disabled?: boolean;
|
39
|
+
ariaLabel: string;
|
40
|
+
}[];
|
41
|
+
vertical?: boolean;
|
42
|
+
};
|
43
|
+
|
44
|
+
declare const MapControl: ({ items, vertical }: MapControlProps) => _emotion_react_jsx_runtime.JSX.Element;
|
45
|
+
|
34
46
|
type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
|
35
47
|
variant?: 'primary' | 'secondary';
|
36
48
|
size?: 'default' | 'small';
|
@@ -208,7 +220,7 @@ type SelectItemProps = {
|
|
208
220
|
type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette' | 'variant' | 'onValueChange' | 'onChange' | 'defaultChecked' | 'invalid'> & {
|
209
221
|
label?: string;
|
210
222
|
caption?: string;
|
211
|
-
placeholder
|
223
|
+
placeholder?: string;
|
212
224
|
defaultValue?: string[];
|
213
225
|
items: SelectItemProps[];
|
214
226
|
size?: 'default' | 'small';
|
@@ -252,7 +264,7 @@ type SliderInputProps = {
|
|
252
264
|
declare const SliderInput: ({ label, caption, size, sliderItem, required, onChange, }: SliderInputProps) => _emotion_react_jsx_runtime.JSX.Element;
|
253
265
|
|
254
266
|
type TextareaProps = Omit<TextareaProps$1, 'size' | 'variant' | 'colorPalette' | 'defaultChecked'> & {
|
255
|
-
label
|
267
|
+
label?: string;
|
256
268
|
caption?: string;
|
257
269
|
placeholder?: string;
|
258
270
|
errorMessage?: string;
|
@@ -293,6 +305,15 @@ type TagProps = Omit<Tag$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'chi
|
|
293
305
|
|
294
306
|
declare const Tag: ({ label, size, variant, disabled, icon, onClose, closable, ...rest }: TagProps) => _emotion_react_jsx_runtime.JSX.Element;
|
295
307
|
|
308
|
+
type IconMarkerProps = {
|
309
|
+
ariaLabel: string;
|
310
|
+
icon: React.ReactNode;
|
311
|
+
backgroundColor?: string;
|
312
|
+
onClick?: () => void;
|
313
|
+
};
|
314
|
+
|
315
|
+
declare const IconMarker: ({ ariaLabel, icon, backgroundColor, onClick, }: IconMarkerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
316
|
+
|
296
317
|
type LayerItemProps = {
|
297
318
|
name: string;
|
298
319
|
label: string;
|
@@ -399,6 +420,57 @@ type ScaleBarProps = {
|
|
399
420
|
|
400
421
|
declare const ScaleBar: ({ colors, values, subLabels, isGradient }: ScaleBarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
401
422
|
|
423
|
+
type ItemCountProps = {
|
424
|
+
pageSize: number;
|
425
|
+
currentPage: number;
|
426
|
+
totalItems: number;
|
427
|
+
onPageSizeChange?: (pageSize: number) => void;
|
428
|
+
};
|
429
|
+
|
430
|
+
declare const ItemCount: ({ pageSize, currentPage, totalItems, onPageSizeChange, }: ItemCountProps) => _emotion_react_jsx_runtime.JSX.Element;
|
431
|
+
|
432
|
+
type PaginationProps = {
|
433
|
+
currentPage: number;
|
434
|
+
totalItems: number;
|
435
|
+
pageSize: number;
|
436
|
+
compact?: boolean;
|
437
|
+
onPageChange?: (page: number) => void;
|
438
|
+
};
|
439
|
+
|
440
|
+
declare const Pagination: ({ totalItems, pageSize, currentPage, compact, onPageChange, }: PaginationProps) => _emotion_react_jsx_runtime.JSX.Element;
|
441
|
+
|
442
|
+
type TableProps = {
|
443
|
+
columns: {
|
444
|
+
key: string;
|
445
|
+
label: string;
|
446
|
+
sortable?: boolean;
|
447
|
+
}[];
|
448
|
+
data: any;
|
449
|
+
renderRow: any;
|
450
|
+
striped?: boolean;
|
451
|
+
stickyHeader?: boolean;
|
452
|
+
selectable?: boolean;
|
453
|
+
selectedRows?: any;
|
454
|
+
pagination?: {
|
455
|
+
totalItems: number;
|
456
|
+
currentPage: number;
|
457
|
+
pageSize: number;
|
458
|
+
showItemCount?: boolean;
|
459
|
+
};
|
460
|
+
onSortColumn: (sortColumn: {
|
461
|
+
key: string;
|
462
|
+
order: string;
|
463
|
+
}) => void;
|
464
|
+
onPageSizeChange: (pageSize: number) => void;
|
465
|
+
onPageChange: (page: number) => void;
|
466
|
+
onAllItemsSelected?: (checked: boolean) => void;
|
467
|
+
};
|
468
|
+
|
469
|
+
declare const Table: ({ columns, data, renderRow, striped, stickyHeader, pagination, selectable, selectedRows, onSortColumn, onPageSizeChange, onPageChange, onAllItemsSelected, }: TableProps) => _emotion_react_jsx_runtime.JSX.Element;
|
470
|
+
|
471
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<Table$1.RowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
472
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<Table$1.CellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
473
|
+
|
402
474
|
type BreadcrumbProps = {
|
403
475
|
links: {
|
404
476
|
label: string;
|
@@ -482,4 +554,31 @@ type ToastProps = {
|
|
482
554
|
|
483
555
|
declare const showToast: (props: ToastProps) => void;
|
484
556
|
|
485
|
-
|
557
|
+
type ZoomProps = {
|
558
|
+
onZoomInClick: () => void;
|
559
|
+
onZoomOutClick: () => void;
|
560
|
+
vertical?: boolean;
|
561
|
+
};
|
562
|
+
type GenericMapControlProps = {
|
563
|
+
onClick: () => void;
|
564
|
+
};
|
565
|
+
declare const MapControls: {
|
566
|
+
Zoom: ({ onZoomInClick, onZoomOutClick, vertical }: ZoomProps) => react_jsx_runtime.JSX.Element;
|
567
|
+
Expand: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
|
568
|
+
Share: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
|
569
|
+
Print: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
|
570
|
+
Settings: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
|
571
|
+
Question: ({ onClick }: GenericMapControlProps) => react_jsx_runtime.JSX.Element;
|
572
|
+
};
|
573
|
+
|
574
|
+
type GenericIconMarkersProps = {
|
575
|
+
ariaLabel?: string;
|
576
|
+
onClick?: () => void;
|
577
|
+
};
|
578
|
+
declare const IconMarkers: {
|
579
|
+
Paper: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
|
580
|
+
Drop: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
|
581
|
+
Plant: ({ ariaLabel, onClick }: GenericIconMarkersProps) => react_jsx_runtime.JSX.Element;
|
582
|
+
};
|
583
|
+
|
584
|
+
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, OptionCardGroup, Pagination, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, designSystemStyles, getThemedColor, showToast };
|