@worldresources/wri-design-systems 2.0.0 → 2.117.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/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ 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, Switch as Switch$1, SelectRootProps, SliderRootProps, TextareaProps as TextareaProps$1, InputProps, Tag as Tag$1, Accordion, Tabs } from '@chakra-ui/react';
3
+ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
3
4
  import React$1 from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+
7
+ declare const designSystemStyles: _chakra_ui_react.SystemContext;
4
8
 
5
9
  type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
6
10
  label?: string;
@@ -12,20 +16,20 @@ type ButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'ch
12
16
  rightIcon?: React$1.ReactNode;
13
17
  };
14
18
 
15
- declare const Button: ({ label, loading, variant, size, disabled, leftIcon, rightIcon, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
19
+ declare const Button: ({ label, loading, variant, size, disabled, leftIcon, rightIcon, ...rest }: ButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
16
20
 
17
21
  type CloseButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children' | '_loading'> & {
18
22
  disabled?: boolean;
19
23
  };
20
24
 
21
- declare const CloseButton: ({ disabled, ...rest }: CloseButtonProps) => react_jsx_runtime.JSX.Element;
25
+ declare const CloseButton: ({ disabled, ...rest }: CloseButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
22
26
 
23
27
  type IconButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children' | '_loading'> & {
24
28
  icon: React$1.ReactNode;
25
29
  disabled?: boolean;
26
30
  };
27
31
 
28
- declare const IconButton: ({ icon, disabled, ...rest }: IconButtonProps) => react_jsx_runtime.JSX.Element;
32
+ declare const IconButton: ({ icon, disabled, ...rest }: IconButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
29
33
 
30
34
  type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPalette' | 'children'> & {
31
35
  variant?: 'primary' | 'secondary';
@@ -40,7 +44,7 @@ type MultiActionButtonProps = Omit<ButtonProps$1, 'size' | 'variant' | 'colorPal
40
44
  disabled?: boolean;
41
45
  };
42
46
 
43
- declare const MultiActionButton: ({ variant, size, mainActionLabel, mainActionOnClick, otherActions, ...rest }: MultiActionButtonProps) => react_jsx_runtime.JSX.Element;
47
+ declare const MultiActionButton: ({ variant, size, mainActionLabel, mainActionOnClick, otherActions, ...rest }: MultiActionButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
44
48
 
45
49
  type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'icon' | 'iconColor' | 'iconSize' | 'spacing' | 'invalid'> & {
46
50
  name?: string;
@@ -54,7 +58,7 @@ type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalet
54
58
  }) => void;
55
59
  };
56
60
 
57
- declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
61
+ declare const Checkbox: ({ name, value, checked, defaultChecked, disabled, indeterminate, onCheckedChange, children, ...rest }: CheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
58
62
 
59
63
  type OptionCardProps = {
60
64
  label: string;
@@ -72,7 +76,7 @@ type OptionCardGroupProps = Omit<RadioCardRootProps, 'colorPalette' | 'size' | '
72
76
  }) => void;
73
77
  };
74
78
 
75
- declare const OptionCard: ({ label, caption, icon, variant, disabled, children, value, }: OptionCardProps) => react_jsx_runtime.JSX.Element;
79
+ declare const OptionCard: ({ label, caption, icon, variant, disabled, children, value, }: OptionCardProps) => _emotion_react_jsx_runtime.JSX.Element;
76
80
 
77
81
  declare const OptionCardGroup: ({ children, ...rest }: OptionCardGroupProps) => react_jsx_runtime.JSX.Element;
78
82
 
@@ -80,18 +84,21 @@ type RadioProps = Omit<RadioGroup$1.ItemProps, 'size' | 'variant' | 'colorPalett
80
84
  value: string;
81
85
  disabled?: boolean;
82
86
  };
83
- type RadioGroupProps = Omit<RadioGroup$1.ItemProps, 'size' | 'variant' | 'colorPalette' | 'value' | 'onChange'> & {
87
+ type RadioGroupProps = Omit<RadioGroup$1.ItemProps, 'size' | 'variant' | 'colorPalette' | 'value' | 'onChange' | 'children'> & {
84
88
  name: string;
85
89
  defaultValue?: string;
86
90
  horizontal?: boolean;
87
91
  onChange?: (name: string, selectedValue: string) => void;
88
92
  customGap?: string;
93
+ children?: React.ReactNode;
89
94
  };
90
95
 
91
- declare const Radio: ({ children, value, disabled, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
96
+ declare const Radio: ({ children, value, disabled, ...rest }: RadioProps) => _emotion_react_jsx_runtime.JSX.Element;
92
97
 
93
98
  declare const RadioGroup: ({ children, horizontal, name, defaultValue, onChange, customGap, ...rest }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
94
99
 
100
+ /** @jsxImportSource @emotion/react */
101
+
95
102
  declare const Slider: React$1.ForwardRefExoticComponent<Omit<Slider$1.RootProps, "size" | "variant" | "colorPalette" | "label" | "defaultChecked" | "defaultValue" | "origin" | "thumbAlignment" | "thumbSize"> & {
96
103
  width?: string;
97
104
  min?: number;
@@ -120,7 +127,7 @@ type SwitchProps = Omit<Switch$1.RootProps, 'size' | 'variant' | 'colorPalette'
120
127
  isLabelOnLeft?: boolean;
121
128
  };
122
129
 
123
- declare const Switch: ({ name, defaultChecked, onChange, disabled, isLabelOnLeft, children, ...rest }: SwitchProps) => react_jsx_runtime.JSX.Element;
130
+ declare const Switch: ({ name, defaultChecked, onChange, disabled, isLabelOnLeft, children, ...rest }: SwitchProps) => _emotion_react_jsx_runtime.JSX.Element;
124
131
 
125
132
  type CheckboxListProps = {
126
133
  label: string;
@@ -135,7 +142,49 @@ type CheckboxListProps = {
135
142
  required?: boolean;
136
143
  };
137
144
 
138
- declare const CheckboxList: ({ label, caption, checkboxes, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: CheckboxListProps) => react_jsx_runtime.JSX.Element;
145
+ declare const CheckboxList: ({ label, caption, checkboxes, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: CheckboxListProps) => _emotion_react_jsx_runtime.JSX.Element;
146
+
147
+ type InputWithUnitsProps = {
148
+ label: string;
149
+ caption?: string;
150
+ errorMessage?: string;
151
+ units: {
152
+ label: string;
153
+ value: string;
154
+ }[];
155
+ unitsPosition?: 'start' | 'end';
156
+ defaultValue?: string;
157
+ defaultUnit?: string;
158
+ onChange?: (value: string) => void;
159
+ required?: boolean;
160
+ disabled?: boolean;
161
+ };
162
+
163
+ declare const InputWithUnits: ({ label, caption, errorMessage, units, unitsPosition, defaultUnit, defaultValue, onChange, required, disabled, }: InputWithUnitsProps) => _emotion_react_jsx_runtime.JSX.Element;
164
+
165
+ type PasswordProps = {
166
+ label: string;
167
+ caption?: string;
168
+ required?: boolean;
169
+ onChange?: ({ strength, length, uppercase, lowercase, numbers, specialCharacters, }: {
170
+ strength: string;
171
+ length: boolean;
172
+ uppercase: boolean;
173
+ lowercase: boolean;
174
+ numbers: boolean;
175
+ specialCharacters: boolean;
176
+ }) => void;
177
+ disabledRules?: {
178
+ uppercase?: boolean;
179
+ lowercase?: boolean;
180
+ numbers?: boolean;
181
+ specialCharacters?: boolean;
182
+ };
183
+ minLength?: number;
184
+ hideValidations?: boolean;
185
+ };
186
+
187
+ declare const Password: ({ label, caption, required, disabledRules, onChange, minLength, hideValidations, }: PasswordProps) => _emotion_react_jsx_runtime.JSX.Element;
139
188
 
140
189
  type RadioListProps = {
141
190
  label: string;
@@ -149,7 +198,7 @@ type RadioListProps = {
149
198
  required?: boolean;
150
199
  };
151
200
 
152
- declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: RadioListProps) => react_jsx_runtime.JSX.Element;
201
+ declare const RadioList: ({ label, caption, name, radios, defaultValue, onCheckedChange, errorMessage, horizontal, required, }: RadioListProps) => _emotion_react_jsx_runtime.JSX.Element;
153
202
 
154
203
  type SelectItemProps = {
155
204
  label: string;
@@ -170,7 +219,7 @@ type SelectProps = Omit<SelectRootProps, 'collection' | 'size' | 'colorPalette'
170
219
  multiple?: boolean;
171
220
  };
172
221
 
173
- declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, ...rest }: SelectProps) => react_jsx_runtime.JSX.Element;
222
+ declare const Select: ({ label, caption, placeholder, items, size, required, disabled, onChange, errorMessage, multiple, ...rest }: SelectProps) => _emotion_react_jsx_runtime.JSX.Element;
174
223
 
175
224
  type ValueChangeDetails = {
176
225
  value: number[];
@@ -200,7 +249,7 @@ type SliderInputProps = {
200
249
  onChange?: (value: number[]) => void;
201
250
  };
202
251
 
203
- declare const SliderInput: ({ label, caption, size, sliderItem, required, onChange, }: SliderInputProps) => react_jsx_runtime.JSX.Element;
252
+ declare const SliderInput: ({ label, caption, size, sliderItem, required, onChange, }: SliderInputProps) => _emotion_react_jsx_runtime.JSX.Element;
204
253
 
205
254
  type TextareaProps = Omit<TextareaProps$1, 'size' | 'variant' | 'colorPalette' | 'defaultChecked'> & {
206
255
  label: string;
@@ -216,7 +265,7 @@ type TextareaProps = Omit<TextareaProps$1, 'size' | 'variant' | 'colorPalette' |
216
265
  maxLength?: number;
217
266
  };
218
267
 
219
- declare const Textarea: ({ label, caption, placeholder, errorMessage, required, disabled, size, defaultValue, onChange, minLength, maxLength, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
268
+ declare const Textarea: ({ label, caption, placeholder, errorMessage, required, disabled, size, defaultValue, onChange, minLength, maxLength, ...rest }: TextareaProps) => _emotion_react_jsx_runtime.JSX.Element;
220
269
 
221
270
  type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'defaultChecked'> & {
222
271
  label?: string;
@@ -230,7 +279,7 @@ type TextInputProps = Omit<InputProps, 'size' | 'variant' | 'colorPalette' | 'de
230
279
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
231
280
  };
232
281
 
233
- declare const TextInput: ({ label, caption, placeholder, errorMessage, required, disabled, size, defaultValue, onChange, ...rest }: TextInputProps) => react_jsx_runtime.JSX.Element;
282
+ declare const TextInput: ({ label, caption, placeholder, errorMessage, required, disabled, size, defaultValue, onChange, ...rest }: TextInputProps) => _emotion_react_jsx_runtime.JSX.Element;
234
283
 
235
284
  type TagProps = Omit<Tag$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'children'> & {
236
285
  label: string;
@@ -242,7 +291,7 @@ type TagProps = Omit<Tag$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'chi
242
291
  closable?: boolean;
243
292
  };
244
293
 
245
- declare const Tag: ({ label, size, variant, disabled, icon, onClose, closable, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
294
+ declare const Tag: ({ label, size, variant, disabled, icon, onClose, closable, ...rest }: TagProps) => _emotion_react_jsx_runtime.JSX.Element;
246
295
 
247
296
  type LayerItemProps = {
248
297
  name: string;
@@ -268,11 +317,11 @@ type LayerGroupProps = {
268
317
  onChangeForRadioVariant?: (name: string, checked: boolean, selectedValue?: string) => void;
269
318
  };
270
319
 
271
- declare const LayerGroup: ({ label, caption, value, layerItems, onChangeForRadioVariant, }: LayerGroupProps) => react_jsx_runtime.JSX.Element;
320
+ declare const LayerGroup: ({ label, caption, value, layerItems, onChangeForRadioVariant, }: LayerGroupProps) => _emotion_react_jsx_runtime.JSX.Element;
272
321
 
273
- declare const LayerGroupContainer: ({ children, defaultValue, ...rest }: LayerGroupContainerProps) => react_jsx_runtime.JSX.Element;
322
+ declare const LayerGroupContainer: ({ children, defaultValue, ...rest }: LayerGroupContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
274
323
 
275
- declare const LayerItem: ({ name, label, caption, showInfoButton, infoButtonLabel, variant, disabled, onInfoClick, isDefaultSelected, onChange, }: LayerItemProps) => react_jsx_runtime.JSX.Element;
324
+ declare const LayerItem: ({ name, label, caption, showInfoButton, infoButtonLabel, variant, disabled, onInfoClick, isDefaultSelected, onChange, }: LayerItemProps) => _emotion_react_jsx_runtime.JSX.Element;
276
325
 
277
326
  type TabBarItemProps = Omit<Tabs.TriggerProps, 'asChild'> & {
278
327
  label: string;
@@ -297,7 +346,7 @@ type LayerPanelProps = {
297
346
  children: React.ReactNode;
298
347
  };
299
348
 
300
- declare const LayerPanel: ({ title, description, tabBarVariant, buttonTabs, defaultValue, onTabClick, children, }: LayerPanelProps) => react_jsx_runtime.JSX.Element;
349
+ declare const LayerPanel: ({ title, description, tabBarVariant, buttonTabs, defaultValue, onTabClick, children, }: LayerPanelProps) => _emotion_react_jsx_runtime.JSX.Element;
301
350
 
302
351
  type LayerParametersProps = {
303
352
  label: string;
@@ -305,7 +354,7 @@ type LayerParametersProps = {
305
354
  openedByDefault?: boolean;
306
355
  };
307
356
 
308
- declare const LayerParameters: ({ label, children, openedByDefault, }: LayerParametersProps) => react_jsx_runtime.JSX.Element;
357
+ declare const LayerParameters: ({ label, children, openedByDefault, }: LayerParametersProps) => _emotion_react_jsx_runtime.JSX.Element;
309
358
 
310
359
  type LegendItemProps = {
311
360
  layerName: string;
@@ -319,7 +368,7 @@ type LegendItemProps = {
319
368
  onOpacityChanged: (value: number) => void;
320
369
  };
321
370
 
322
- declare const LegendItem: ({ layerName, dataUnit, onDrag, onUpClick, onDownClick, onRemoveClick, children, onInfoClick, onOpacityChanged, }: LegendItemProps) => react_jsx_runtime.JSX.Element;
371
+ declare const LegendItem: ({ layerName, dataUnit, onDrag, onUpClick, onDownClick, onRemoveClick, children, onInfoClick, onOpacityChanged, }: LegendItemProps) => _emotion_react_jsx_runtime.JSX.Element;
323
372
 
324
373
  type LegendPanelProps = {
325
374
  legendContent: React$1.ReactElement[];
@@ -327,7 +376,7 @@ type LegendPanelProps = {
327
376
  onTabClick?: (tabValue: string) => void;
328
377
  };
329
378
 
330
- declare const LegendPanel: ({ legendContent, analysisContent, onTabClick, }: LegendPanelProps) => react_jsx_runtime.JSX.Element;
379
+ declare const LegendPanel: ({ legendContent, analysisContent, onTabClick, }: LegendPanelProps) => _emotion_react_jsx_runtime.JSX.Element;
331
380
 
332
381
  type QualitativeAttributeProps = {
333
382
  type: 'raster' | 'line' | 'point';
@@ -339,7 +388,7 @@ type QualitativeAttributeProps = {
339
388
  pointIcon?: React.ReactNode;
340
389
  };
341
390
 
342
- declare const QualitativeAttribute: ({ type, label, caption, color, onActionClick, showActionButton, pointIcon, }: QualitativeAttributeProps) => react_jsx_runtime.JSX.Element;
391
+ declare const QualitativeAttribute: ({ type, label, caption, color, onActionClick, showActionButton, pointIcon, }: QualitativeAttributeProps) => _emotion_react_jsx_runtime.JSX.Element;
343
392
 
344
393
  type ScaleBarProps = {
345
394
  colors: string[];
@@ -348,7 +397,30 @@ type ScaleBarProps = {
348
397
  isGradient?: boolean;
349
398
  };
350
399
 
351
- declare const ScaleBar: ({ colors, values, subLabels, isGradient }: ScaleBarProps) => react_jsx_runtime.JSX.Element;
400
+ declare const ScaleBar: ({ colors, values, subLabels, isGradient }: ScaleBarProps) => _emotion_react_jsx_runtime.JSX.Element;
401
+
402
+ type BreadcrumbProps = {
403
+ links: {
404
+ label: string;
405
+ link: string;
406
+ icon?: React.ReactNode;
407
+ }[];
408
+ separator?: React.ReactNode;
409
+ maxItems?: number;
410
+ linkRouter: any;
411
+ };
412
+
413
+ declare const Breadcrumb: ({ links, separator, maxItems, linkRouter, }: BreadcrumbProps) => _emotion_react_jsx_runtime.JSX.Element;
414
+
415
+ type FooterProps = {
416
+ children: React.ReactNode;
417
+ label?: string;
418
+ fixed?: boolean;
419
+ filled?: boolean;
420
+ maxWidth?: number;
421
+ };
422
+
423
+ declare const Footer: ({ children, label, fixed, filled, maxWidth, }: FooterProps) => _emotion_react_jsx_runtime.JSX.Element;
352
424
 
353
425
  type NavigationRailTabProps = Omit<Tabs.TriggerProps, 'asChild'> & {
354
426
  label: string;
@@ -362,11 +434,19 @@ type NavigationRailProps = {
362
434
  onTabClick?: (selectedValue: string) => void;
363
435
  children?: React.ReactNode;
364
436
  onOpenChange?: (open: boolean) => void;
437
+ customHeight?: string;
365
438
  };
366
439
 
367
- declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpenChange, }: NavigationRailProps) => react_jsx_runtime.JSX.Element;
440
+ declare const NavigationRail: ({ tabs, defaultValue, onTabClick, children, onOpenChange, customHeight, }: NavigationRailProps) => _emotion_react_jsx_runtime.JSX.Element;
368
441
 
369
- declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => react_jsx_runtime.JSX.Element;
442
+ declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
443
+
444
+ type BadgeProps = {
445
+ hasNotification?: boolean;
446
+ notificationCount?: number;
447
+ };
448
+
449
+ declare const Badge: ({ hasNotification, notificationCount }: BadgeProps) => _emotion_react_jsx_runtime.JSX.Element;
370
450
 
371
451
  type InlineMessageProps = {
372
452
  label: string;
@@ -379,7 +459,11 @@ type InlineMessageProps = {
379
459
  isButtonRight?: boolean;
380
460
  };
381
461
 
382
- declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, isButtonRight, }: InlineMessageProps) => react_jsx_runtime.JSX.Element;
462
+ declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, isButtonRight, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
463
+
464
+ /** @jsxImportSource @emotion/react */
465
+
466
+ declare const Toast: React$1.FC;
383
467
 
384
468
  type ToastProps = {
385
469
  label: string;
@@ -397,6 +481,5 @@ type ToastProps = {
397
481
  };
398
482
 
399
483
  declare const showToast: (props: ToastProps) => void;
400
- declare const Toast: () => react_jsx_runtime.JSX.Element[];
401
484
 
402
- export { Button, Checkbox, CheckboxList, CloseButton, IconButton, InlineMessage, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MultiActionButton, NavigationRail, OptionCard, OptionCardGroup, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Tag, TextInput, Textarea, Toast, showToast };
485
+ export { Badge, Breadcrumb, Button, Checkbox, CheckboxList, CloseButton, Footer, IconButton, InlineMessage, InputWithUnits, LayerGroup, LayerGroupContainer, LayerItem, LayerPanel, LayerParameters, LegendItem, LegendPanel, MultiActionButton, NavigationRail, OptionCard, OptionCardGroup, Password, QualitativeAttribute, Radio, RadioGroup, RadioList, ScaleBar, Select, Slider, SliderInput, Switch, TabBar, Tag, TextInput, Textarea, Toast, designSystemStyles, showToast };