@bcgov/design-system-react-components 0.8.1-pr908 → 0.8.1-pr910

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,7 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { PropsWithChildren } from 'react';
3
- import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CalendarProps, DateValue, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, DatePickerProps as DatePickerProps$1, FormProps, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, MenuItemProps as MenuItemProps$1, MenuItemRenderProps, MenuProps as MenuProps$1, Key, PopoverProps, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, TagProps as TagProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, SeparatorProps as SeparatorProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextProps as TextProps$1, TextFieldProps as TextFieldProps$1, TimeValue, TimeFieldProps as TimeFieldProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, SwitchProps as SwitchProps$1, TooltipProps, NumberFieldProps as NumberFieldProps$1 } from 'react-aria-components';
3
+ import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CalendarProps, DateValue, CheckboxFieldProps, ValidationResult, CheckboxGroupProps as CheckboxGroupProps$1, DatePickerProps as DatePickerProps$1, FormProps, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, MenuItemProps as MenuItemProps$1, MenuItemRenderProps, MenuProps as MenuProps$1, Key, PopoverProps, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioFieldProps, RadioGroupProps as RadioGroupProps$1, TagProps as TagProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, SeparatorProps as SeparatorProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextProps as TextProps$1, TextFieldProps as TextFieldProps$1, TimeValue, TimeFieldProps as TimeFieldProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, SwitchFieldProps, TooltipProps, NumberFieldProps as NumberFieldProps$1 } from 'react-aria-components';
4
4
  export { DialogTrigger, MenuSection, Header as MenuSectionHeader, MenuTrigger, SubmenuTrigger, TooltipTrigger } from 'react-aria-components';
5
+ import { CalendarSelectionMode } from 'react-aria-components/Calendar';
6
+ export { CalendarSelectionMode } from 'react-aria-components/Calendar';
5
7
 
6
8
  interface AccordionProps extends DisclosureProps {
7
9
  label?: string;
@@ -62,7 +64,7 @@ interface ButtonGroupProps extends React.PropsWithChildren {
62
64
  }
63
65
  declare function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): react.JSX.Element;
64
66
 
65
- declare function Calendar({ visibleDuration, ...props }: CalendarProps<DateValue>): react.JSX.Element;
67
+ declare function Calendar<M extends CalendarSelectionMode = "single">({ visibleDuration, ...props }: CalendarProps<DateValue, M>): react.JSX.Element;
66
68
 
67
69
  interface CalloutProps extends React.PropsWithChildren {
68
70
  variant?: "lightGrey" | "lightBlue" | "lightGold" | "Blue" | "Grey" | "Black";
@@ -74,7 +76,11 @@ interface CalloutProps extends React.PropsWithChildren {
74
76
  }
75
77
  declare function Callout({ variant, title, description, buttons, role, isLeftBorderDisabled, children, ...props }: CalloutProps): react.JSX.Element;
76
78
 
77
- declare function Checkbox({ value, children, ...props }: CheckboxProps): react.JSX.Element;
79
+ interface CheckboxProps extends CheckboxFieldProps {
80
+ description?: string;
81
+ errorMessage?: string | ((validation: ValidationResult) => string);
82
+ }
83
+ declare function Checkbox({ value, children, description, errorMessage, ...props }: CheckboxProps): react.JSX.Element;
78
84
 
79
85
  interface CheckboxGroupProps extends CheckboxGroupProps$1 {
80
86
  orientation?: "horizontal" | "vertical";
@@ -269,7 +275,10 @@ interface ProgressCircleProps extends ProgressBarProps$1 {
269
275
  }
270
276
  declare function ProgressCircle({ size, valueLabel, ...props }: ProgressCircleProps): react.JSX.Element;
271
277
 
272
- declare function Radio({ value, children, ...props }: RadioProps): react.JSX.Element;
278
+ interface RadioProps extends RadioFieldProps {
279
+ description?: string;
280
+ }
281
+ declare function Radio({ value, children, description, ...props }: RadioProps): react.JSX.Element;
273
282
 
274
283
  interface RadioGroupProps extends RadioGroupProps$1 {
275
284
  children?: React.ReactNode;
@@ -565,10 +574,12 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
565
574
  }
566
575
  declare function ToggleButtonGroup({ label, size, children, ...props }: ToggleButtonGroupProps): react.JSX.Element;
567
576
 
568
- interface SwitchProps extends SwitchProps$1 {
577
+ interface SwitchProps extends SwitchFieldProps {
569
578
  labelPosition?: "left" | "right";
579
+ description?: string;
580
+ errorMessage?: string | ((validation: ValidationResult) => string);
570
581
  }
571
- declare function Switch({ labelPosition, children, ...props }: SwitchProps): react.JSX.Element;
582
+ declare function Switch({ labelPosition, description, errorMessage, children, ...props }: SwitchProps): react.JSX.Element;
572
583
 
573
584
  declare function Tooltip(props: TooltipProps): react.JSX.Element;
574
585
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.8.1-pr908",
3
+ "version": "0.8.1-pr910",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bcgov/design-system.git",
@@ -48,7 +48,7 @@
48
48
  "@bcgov/design-tokens": "5.0.0",
49
49
  "@react-aria/datepicker": "3.17.1",
50
50
  "@react-aria/i18n": "3.13.1",
51
- "react-aria-components": "1.17.0"
51
+ "react-aria-components": "1.21.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@bcgov/bc-sans": "^2.1.0",