@bcgov/design-system-react-components 0.9.1-pr993 → 0.9.1-pr995

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.
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  let react_jsx_runtime = require("react/jsx-runtime");
3
+ let react_aria = require("react-aria");
3
4
  let react = require("react");
4
5
  let _react_aria_datepicker = require("@react-aria/datepicker");
5
- let _react_aria_i18n = require("@react-aria/i18n");
6
6
  // src/hooks/useDateFormatLabel.tsx
7
7
  function useDateFormatLabel(props) {
8
- const formatter = (0, _react_aria_i18n.useDateFormatter)({ dateStyle: "short" });
8
+ const formatter = (0, react_aria.useDateFormatter)({ dateStyle: "short" });
9
9
  const displayNames = (0, _react_aria_datepicker.useDisplayNames)();
10
10
  return (0, react.useMemo)(() => {
11
11
  if (props.showFormatHelpText) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Format: " }), formatter.formatToParts(/* @__PURE__ */ new Date()).map((s, i) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useDateFormatLabel.cjs","names":["useDateFormatter","useDisplayNames","useMemo","_Fragment"],"sources":["../../../src/hooks/useDateFormatLabel.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDisplayNames } from \"@react-aria/datepicker\";\nimport { useDateFormatter } from \"@react-aria/i18n\";\n\n/* Generate format helper text, adapted from React Spectrum */\nexport default function useDateFormatLabel(props: {\n showFormatHelpText?: boolean;\n}): React.ReactNode {\n const formatter = useDateFormatter({ dateStyle: \"short\" });\n const displayNames = useDisplayNames();\n return useMemo(() => {\n if (props.showFormatHelpText) {\n return (\n <>\n <span>Format: </span>\n {formatter.formatToParts(new Date()).map((s, i) => {\n if (\n s.type === \"literal\" ||\n s.type === \"unknown\" ||\n (s.type as string) === \"yearName\"\n ) {\n return <span key={i}>{` ${s.value} `}</span>;\n }\n\n const type = (s.type as string) === \"relatedYear\" ? \"year\" : s.type;\n return (\n <span\n key={i}\n className=\"bcds-react-aria-DatePicker--FormatHelpText\"\n >\n {displayNames.of(type)}\n </span>\n );\n })}\n </>\n );\n }\n\n return \"\";\n }, [props.showFormatHelpText, formatter, displayNames]);\n}\n"],"mappings":";;;;;;AAKA,SAAwB,mBAAmB,OAEvB;CAClB,MAAM,aAAA,GAAYA,iBAAAA,iBAAAA,CAAiB,EAAE,WAAW,QAAQ,CAAC;CACzD,MAAM,gBAAA,GAAeC,uBAAAA,gBAAAA,CAAgB;CACrC,QAAA,GAAOC,MAAAA,QAAAA,OAAc;EACnB,IAAI,MAAM,oBACR,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAC,kBAAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAM,WAAc,CAAA,GACnB,UAAU,8BAAc,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;GACjD,IACE,EAAE,SAAS,aACX,EAAE,SAAS,aACV,EAAE,SAAoB,YAEvB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAe,IAAI,EAAE,MAAM,GAAS,GAAzB,CAAyB;GAG7C,MAAM,OAAQ,EAAE,SAAoB,gBAAgB,SAAS,EAAE;GAC/D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAEE,WAAU;IAET,UAAA,aAAa,GAAG,IAAI;GACjB,GAJC,CAID;EAEV,CAAC,CACD,EAAA,CAAA;EAIN,OAAO;CACT,GAAG;EAAC,MAAM;EAAoB;EAAW;CAAY,CAAC;AACxD"}
1
+ {"version":3,"file":"useDateFormatLabel.cjs","names":["useDateFormatter","useDisplayNames","useMemo","_Fragment"],"sources":["../../../src/hooks/useDateFormatLabel.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDisplayNames } from \"@react-aria/datepicker\";\nimport { useDateFormatter } from \"react-aria\";\n\n/* Generate format helper text, adapted from React Spectrum */\nexport default function useDateFormatLabel(props: {\n showFormatHelpText?: boolean;\n}): React.ReactNode {\n const formatter = useDateFormatter({ dateStyle: \"short\" });\n const displayNames = useDisplayNames();\n return useMemo(() => {\n if (props.showFormatHelpText) {\n return (\n <>\n <span>Format: </span>\n {formatter.formatToParts(new Date()).map((s, i) => {\n if (\n s.type === \"literal\" ||\n s.type === \"unknown\" ||\n (s.type as string) === \"yearName\"\n ) {\n return <span key={i}>{` ${s.value} `}</span>;\n }\n\n const type = (s.type as string) === \"relatedYear\" ? \"year\" : s.type;\n return (\n <span\n key={i}\n className=\"bcds-react-aria-DatePicker--FormatHelpText\"\n >\n {displayNames.of(type)}\n </span>\n );\n })}\n </>\n );\n }\n\n return \"\";\n }, [props.showFormatHelpText, formatter, displayNames]);\n}\n"],"mappings":";;;;;;AAKA,SAAwB,mBAAmB,OAEvB;CAClB,MAAM,aAAA,GAAYA,WAAAA,iBAAAA,CAAiB,EAAE,WAAW,QAAQ,CAAC;CACzD,MAAM,gBAAA,GAAeC,uBAAAA,gBAAAA,CAAgB;CACrC,QAAA,GAAOC,MAAAA,QAAAA,OAAc;EACnB,IAAI,MAAM,oBACR,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAC,kBAAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAM,WAAc,CAAA,GACnB,UAAU,8BAAc,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;GACjD,IACE,EAAE,SAAS,aACX,EAAE,SAAS,aACV,EAAE,SAAoB,YAEvB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAe,IAAI,EAAE,MAAM,GAAS,GAAzB,CAAyB;GAG7C,MAAM,OAAQ,EAAE,SAAoB,gBAAgB,SAAS,EAAE;GAC/D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAEE,WAAU;IAET,UAAA,aAAa,GAAG,IAAI;GACjB,GAJC,CAID;EAEV,CAAC,CACD,EAAA,CAAA;EAIN,OAAO;CACT,GAAG;EAAC,MAAM;EAAoB;EAAW;CAAY,CAAC;AACxD"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useDateFormatter } from "react-aria";
3
4
  import { useMemo } from "react";
4
5
  import { useDisplayNames } from "@react-aria/datepicker";
5
- import { useDateFormatter } from "@react-aria/i18n";
6
6
  // src/hooks/useDateFormatLabel.tsx
7
7
  function useDateFormatLabel(props) {
8
8
  const formatter = useDateFormatter({ dateStyle: "short" });
@@ -1 +1 @@
1
- {"version":3,"file":"useDateFormatLabel.js","names":["_Fragment"],"sources":["../../../src/hooks/useDateFormatLabel.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDisplayNames } from \"@react-aria/datepicker\";\nimport { useDateFormatter } from \"@react-aria/i18n\";\n\n/* Generate format helper text, adapted from React Spectrum */\nexport default function useDateFormatLabel(props: {\n showFormatHelpText?: boolean;\n}): React.ReactNode {\n const formatter = useDateFormatter({ dateStyle: \"short\" });\n const displayNames = useDisplayNames();\n return useMemo(() => {\n if (props.showFormatHelpText) {\n return (\n <>\n <span>Format: </span>\n {formatter.formatToParts(new Date()).map((s, i) => {\n if (\n s.type === \"literal\" ||\n s.type === \"unknown\" ||\n (s.type as string) === \"yearName\"\n ) {\n return <span key={i}>{` ${s.value} `}</span>;\n }\n\n const type = (s.type as string) === \"relatedYear\" ? \"year\" : s.type;\n return (\n <span\n key={i}\n className=\"bcds-react-aria-DatePicker--FormatHelpText\"\n >\n {displayNames.of(type)}\n </span>\n );\n })}\n </>\n );\n }\n\n return \"\";\n }, [props.showFormatHelpText, formatter, displayNames]);\n}\n"],"mappings":";;;;;;AAKA,SAAwB,mBAAmB,OAEvB;CAClB,MAAM,YAAY,iBAAiB,EAAE,WAAW,QAAQ,CAAC;CACzD,MAAM,eAAe,gBAAgB;CACrC,OAAO,cAAc;EACnB,IAAI,MAAM,oBACR,OACE,qBAAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD,EAAA,UAAM,WAAc,CAAA,GACnB,UAAU,8BAAc,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;GACjD,IACE,EAAE,SAAS,aACX,EAAE,SAAS,aACV,EAAE,SAAoB,YAEvB,OAAO,oBAAC,QAAD,EAAA,UAAe,IAAI,EAAE,MAAM,GAAS,GAAzB,CAAyB;GAG7C,MAAM,OAAQ,EAAE,SAAoB,gBAAgB,SAAS,EAAE;GAC/D,OACE,oBAAC,QAAD;IAEE,WAAU;IAET,UAAA,aAAa,GAAG,IAAI;GACjB,GAJC,CAID;EAEV,CAAC,CACD,EAAA,CAAA;EAIN,OAAO;CACT,GAAG;EAAC,MAAM;EAAoB;EAAW;CAAY,CAAC;AACxD"}
1
+ {"version":3,"file":"useDateFormatLabel.js","names":["_Fragment"],"sources":["../../../src/hooks/useDateFormatLabel.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDisplayNames } from \"@react-aria/datepicker\";\nimport { useDateFormatter } from \"react-aria\";\n\n/* Generate format helper text, adapted from React Spectrum */\nexport default function useDateFormatLabel(props: {\n showFormatHelpText?: boolean;\n}): React.ReactNode {\n const formatter = useDateFormatter({ dateStyle: \"short\" });\n const displayNames = useDisplayNames();\n return useMemo(() => {\n if (props.showFormatHelpText) {\n return (\n <>\n <span>Format: </span>\n {formatter.formatToParts(new Date()).map((s, i) => {\n if (\n s.type === \"literal\" ||\n s.type === \"unknown\" ||\n (s.type as string) === \"yearName\"\n ) {\n return <span key={i}>{` ${s.value} `}</span>;\n }\n\n const type = (s.type as string) === \"relatedYear\" ? \"year\" : s.type;\n return (\n <span\n key={i}\n className=\"bcds-react-aria-DatePicker--FormatHelpText\"\n >\n {displayNames.of(type)}\n </span>\n );\n })}\n </>\n );\n }\n\n return \"\";\n }, [props.showFormatHelpText, formatter, displayNames]);\n}\n"],"mappings":";;;;;;AAKA,SAAwB,mBAAmB,OAEvB;CAClB,MAAM,YAAY,iBAAiB,EAAE,WAAW,QAAQ,CAAC;CACzD,MAAM,eAAe,gBAAgB;CACrC,OAAO,cAAc;EACnB,IAAI,MAAM,oBACR,OACE,qBAAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD,EAAA,UAAM,WAAc,CAAA,GACnB,UAAU,8BAAc,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;GACjD,IACE,EAAE,SAAS,aACX,EAAE,SAAS,aACV,EAAE,SAAoB,YAEvB,OAAO,oBAAC,QAAD,EAAA,UAAe,IAAI,EAAE,MAAM,GAAS,GAAzB,CAAyB;GAG7C,MAAM,OAAQ,EAAE,SAAoB,gBAAgB,SAAS,EAAE;GAC/D,OACE,oBAAC,QAAD;IAEE,WAAU;IAET,UAAA,aAAa,GAAG,IAAI;GACjB,GAJC,CAID;EAEV,CAAC,CACD,EAAA,CAAA;EAIN,OAAO;CACT,GAAG;EAAC,MAAM;EAAoB;EAAW;CAAY,CAAC;AACxD"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React$1, { JSX, PropsWithChildren } from "react";
2
- import { ButtonProps, CalendarProps, CheckboxFieldProps, CheckboxGroupProps, DatePickerProps, DateValue, DateValue as DateValue$1, DialogProps, DialogTrigger, DisclosureGroupProps, DisclosureProps, FormProps, Header as MenuSectionHeader, HeadingProps, Key, LinkProps, ListBoxItemProps, MenuItemProps, MenuItemRenderProps, MenuProps, MenuSection, MenuTrigger, ModalOverlayProps, NumberFieldProps, PopoverProps, ProgressBarProps, RadioFieldProps, RadioGroupProps, SelectProps, SeparatorProps, SubmenuTrigger, SwitchFieldProps, TagGroupProps, TagListProps, TagProps, TextFieldProps, TextProps, TimeFieldProps, TimeValue, ToggleButtonGroupProps, ToggleButtonProps, TooltipProps, TooltipTrigger, ValidationResult } from "react-aria-components";
2
+ import { ButtonProps as ButtonProps$1, CalendarProps, CheckboxFieldProps, CheckboxGroupProps as CheckboxGroupProps$1, DatePickerProps as DatePickerProps$1, DateValue, DateValue as DateValue$1, DialogProps as DialogProps$1, DialogTrigger, DisclosureGroupProps, DisclosureProps, FormProps, Header as MenuSectionHeader, HeadingProps as HeadingProps$1, Key, LinkProps as LinkProps$1, ListBoxItemProps as ListBoxItemProps$1, MenuItemProps as MenuItemProps$1, MenuItemRenderProps, MenuProps as MenuProps$1, MenuSection, MenuTrigger, ModalOverlayProps, NumberFieldProps as NumberFieldProps$1, PopoverProps, ProgressBarProps as ProgressBarProps$1, RadioFieldProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, SeparatorProps as SeparatorProps$1, SubmenuTrigger, SwitchFieldProps, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TextProps as TextProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, ToggleButtonGroupProps as ToggleButtonGroupProps$1, ToggleButtonProps as ToggleButtonProps$1, TooltipProps, TooltipTrigger, ValidationResult } from "react-aria-components";
3
3
  import { CalendarSelectionMode } from "react-aria-components/Calendar";
4
4
  interface AccordionProps extends DisclosureProps {
5
5
  label?: string;
@@ -21,7 +21,7 @@ interface AlertBannerProps extends React.PropsWithChildren {
21
21
  onClose?: () => void;
22
22
  }
23
23
  declare function AlertBanner({ variant, size, layout, isIconHidden, isCloseable, role, onClose, children, customIcon, ...props }: AlertBannerProps): JSX.Element;
24
- interface AlertDialogProps extends DialogProps {
24
+ interface AlertDialogProps extends DialogProps$1 {
25
25
  variant?: "info" | "confirmation" | "warning" | "error" | "destructive";
26
26
  title?: string;
27
27
  isIconHidden?: boolean;
@@ -29,7 +29,7 @@ interface AlertDialogProps extends DialogProps {
29
29
  buttons?: React.ReactNode;
30
30
  }
31
31
  declare function AlertDialog({ children, variant, role, title, isCloseable, isIconHidden, buttons, ...props }: AlertDialogProps): JSX.Element;
32
- interface ButtonProps$1 extends ButtonProps {
32
+ interface ButtonProps extends ButtonProps$1 {
33
33
  /**
34
34
  * Defaults to `medium`. `small` is shorter vertically.
35
35
  */
@@ -47,7 +47,7 @@ interface ButtonProps$1 extends ButtonProps {
47
47
  */
48
48
  isIconButton?: boolean;
49
49
  }
50
- declare function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps$1): JSX.Element;
50
+ declare function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): JSX.Element;
51
51
  interface ButtonGroupProps extends React.PropsWithChildren {
52
52
  orientation?: "horizontal" | "vertical";
53
53
  alignment?: "start" | "center" | "end";
@@ -69,7 +69,7 @@ interface CheckboxProps extends CheckboxFieldProps {
69
69
  errorMessage?: string | ((validation: ValidationResult) => string);
70
70
  }
71
71
  declare function Checkbox({ value, children, description, errorMessage, ...props }: CheckboxProps): JSX.Element;
72
- interface CheckboxGroupProps$1 extends CheckboxGroupProps {
72
+ interface CheckboxGroupProps extends CheckboxGroupProps$1 {
73
73
  orientation?: "horizontal" | "vertical";
74
74
  label?: string;
75
75
  description?: string;
@@ -77,8 +77,8 @@ interface CheckboxGroupProps$1 extends CheckboxGroupProps {
77
77
  /** `flex-wrap` style property, defaults to `nowrap` */
78
78
  flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
79
79
  }
80
- declare function CheckboxGroup({ orientation, label, description, errorMessage, flexWrap, children, ...props }: CheckboxGroupProps$1): JSX.Element;
81
- interface DatePickerProps$1<T extends DateValue> extends DatePickerProps<T> {
80
+ declare function CheckboxGroup({ orientation, label, description, errorMessage, flexWrap, children, ...props }: CheckboxGroupProps): JSX.Element;
81
+ interface DatePickerProps<T extends DateValue> extends DatePickerProps$1<T> {
82
82
  size?: "small" | "medium";
83
83
  isCalendarDisabled?: boolean;
84
84
  label?: string;
@@ -87,11 +87,11 @@ interface DatePickerProps$1<T extends DateValue> extends DatePickerProps<T> {
87
87
  errorMessage?: string | ((validation: ValidationResult) => string);
88
88
  isBrowserLocaleUsed?: boolean;
89
89
  }
90
- declare function DatePicker<T extends DateValue>({ size, label, description, errorMessage, showFormatHelpText, isCalendarDisabled, isBrowserLocaleUsed, ...props }: DatePickerProps$1<T>): JSX.Element;
91
- interface DialogProps$1 extends DialogProps {
90
+ declare function DatePicker<T extends DateValue>({ size, label, description, errorMessage, showFormatHelpText, isCalendarDisabled, isBrowserLocaleUsed, ...props }: DatePickerProps<T>): JSX.Element;
91
+ interface DialogProps extends DialogProps$1 {
92
92
  isCloseable?: boolean;
93
93
  }
94
- declare function Dialog({ isCloseable, role, children, ...props }: DialogProps$1): JSX.Element;
94
+ declare function Dialog({ isCloseable, role, children, ...props }: DialogProps): JSX.Element;
95
95
  interface FooterLinksProps {
96
96
  /**
97
97
  * Title for the list of links - associated to the list of links as a `<figcaption>`
@@ -181,11 +181,11 @@ interface HeaderProps {
181
181
  titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
182
182
  }
183
183
  declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement }: PropsWithChildren<HeaderProps>): JSX.Element;
184
- interface HeadingProps$1 extends HeadingProps {
184
+ interface HeadingProps extends HeadingProps$1 {
185
185
  color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
186
186
  isUnstyled?: boolean;
187
187
  }
188
- declare function Heading({ color, isUnstyled, ...props }: HeadingProps$1): JSX.Element;
188
+ declare function Heading({ color, isUnstyled, ...props }: HeadingProps): JSX.Element;
189
189
  interface InlineAlertProps extends React.PropsWithChildren {
190
190
  variant?: "info" | "success" | "warning" | "danger";
191
191
  title?: string;
@@ -198,7 +198,7 @@ interface InlineAlertProps extends React.PropsWithChildren {
198
198
  onClose?: () => void;
199
199
  }
200
200
  declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, customIcon, buttons, children, onClose, ...props }: InlineAlertProps): JSX.Element;
201
- interface LinkProps$1 extends LinkProps {
201
+ interface LinkProps extends LinkProps$1 {
202
202
  children?: React.ReactNode;
203
203
  size?: "small" | "medium" | "large";
204
204
  isButton?: boolean;
@@ -209,8 +209,8 @@ interface LinkProps$1 extends LinkProps {
209
209
  iconLeft?: React.ReactElement;
210
210
  iconRight?: React.ReactElement;
211
211
  }
212
- declare function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps$1): JSX.Element;
213
- interface MenuItemProps$1 extends MenuItemProps {
212
+ declare function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): JSX.Element;
213
+ interface MenuItemProps extends MenuItemProps$1 {
214
214
  label?: string;
215
215
  description?: string;
216
216
  size?: "small" | "medium";
@@ -219,30 +219,30 @@ interface MenuItemProps$1 extends MenuItemProps {
219
219
  defaultChildren: React.ReactNode;
220
220
  }) => React.ReactNode);
221
221
  }
222
- declare function MenuItem({ size, label, description, iconLeft, ...props }: MenuItemProps$1): JSX.Element;
222
+ declare function MenuItem({ size, label, description, iconLeft, ...props }: MenuItemProps): JSX.Element;
223
223
  interface MenuSectionProps {
224
224
  id: Key;
225
225
  header?: string;
226
- items?: MenuItemProps$1[];
226
+ items?: MenuItemProps[];
227
227
  }
228
- interface MenuProps$1 extends MenuProps<MenuItemProps$1> {
228
+ interface MenuProps extends MenuProps$1<MenuItemProps> {
229
229
  itemSize?: "small" | "medium";
230
- items?: MenuItemProps$1[];
230
+ items?: MenuItemProps[];
231
231
  sections?: MenuSectionProps[];
232
232
  placement?: PopoverProps["placement"];
233
233
  }
234
- declare function Menu({ itemSize, children, items, sections, placement, ...props }: MenuProps$1): JSX.Element;
234
+ declare function Menu({ itemSize, children, items, sections, placement, ...props }: MenuProps): JSX.Element;
235
235
  declare function Modal({ children, ...props }: ModalOverlayProps): JSX.Element;
236
236
  interface SubheaderProps extends React$1.HTMLAttributes<HTMLElement> {
237
237
  size?: "small" | "medium";
238
238
  ariaLabel?: string;
239
239
  }
240
240
  declare function Subheader({ size, ariaLabel, children, ...props }: SubheaderProps): JSX.Element;
241
- interface ProgressBarProps$1 extends ProgressBarProps {
241
+ interface ProgressBarProps extends ProgressBarProps$1 {
242
242
  size?: "small" | "medium" | "large";
243
243
  }
244
- declare function ProgressBar({ size, valueLabel, ...props }: ProgressBarProps$1): JSX.Element;
245
- interface ProgressCircleProps extends ProgressBarProps {
244
+ declare function ProgressBar({ size, valueLabel, ...props }: ProgressBarProps): JSX.Element;
245
+ interface ProgressCircleProps extends ProgressBarProps$1 {
246
246
  size?: "small" | "medium" | "large";
247
247
  }
248
248
  declare function ProgressCircle({ size, valueLabel, ...props }: ProgressCircleProps): JSX.Element;
@@ -250,7 +250,7 @@ interface RadioProps extends RadioFieldProps {
250
250
  description?: string;
251
251
  }
252
252
  declare function Radio({ value, children, description, ...props }: RadioProps): JSX.Element;
253
- interface RadioGroupProps$1 extends RadioGroupProps {
253
+ interface RadioGroupProps extends RadioGroupProps$1 {
254
254
  children?: React.ReactNode;
255
255
  orientation?: "vertical" | "horizontal";
256
256
  label?: string;
@@ -259,8 +259,8 @@ interface RadioGroupProps$1 extends RadioGroupProps {
259
259
  /** `flex-wrap` style property, defaults to `nowrap` */
260
260
  flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
261
261
  }
262
- declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps$1): JSX.Element;
263
- interface TagProps$1 extends TagProps {
262
+ declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): JSX.Element;
263
+ interface TagProps extends TagProps$1 {
264
264
  /**
265
265
  * Icon that appears to the left of the `textValue` field
266
266
  */
@@ -278,8 +278,8 @@ interface TagProps$1 extends TagProps {
278
278
  */
279
279
  size?: "xsmall" | "small" | "medium";
280
280
  }
281
- declare function Tag({ color, tagStyle, size, icon, id, textValue, ...props }: TagProps$1): JSX.Element;
282
- interface ListBoxItemProps$1 extends ListBoxItemProps {
281
+ declare function Tag({ color, tagStyle, size, icon, id, textValue, ...props }: TagProps): JSX.Element;
282
+ interface ListBoxItemProps extends ListBoxItemProps$1 {
283
283
  /** Text label for the option. Provide an `id` if this is not unique. */
284
284
  label: string;
285
285
  /** Descriptive text that appears below the option's label */
@@ -291,20 +291,20 @@ interface ListBoxItemProps$1 extends ListBoxItemProps {
291
291
  /** Right icon slot */
292
292
  iconRight?: React.ReactElement;
293
293
  /** Optional color token forwarded to selected tags */
294
- color?: TagProps$1["color"];
294
+ color?: TagProps["color"];
295
295
  /** Optional style token forwarded to selected tags */
296
- tagStyle?: TagProps$1["tagStyle"];
296
+ tagStyle?: TagProps["tagStyle"];
297
297
  }
298
298
  interface SelectionSectionProps {
299
299
  id: Key;
300
300
  /** Label for the section */
301
301
  header?: string;
302
302
  /** Flat list of options within the section */
303
- items: ListBoxItemProps$1[];
303
+ items: ListBoxItemProps[];
304
304
  }
305
- interface SelectProps$1<T extends object, M extends "single" | "multiple" = "single"> extends SelectProps<T, M> {
305
+ interface SelectProps<T extends object, M extends "single" | "multiple" = "single"> extends SelectProps$1<T, M> {
306
306
  /** Use `items` for a flat list of options */
307
- items?: ListBoxItemProps$1[];
307
+ items?: ListBoxItemProps[];
308
308
  /** Use `sections` for a sectioned list with `items` options in each section */
309
309
  sections?: SelectionSectionProps[];
310
310
  /** Text label for the Select component */
@@ -321,11 +321,11 @@ interface SelectProps$1<T extends object, M extends "single" | "multiple" = "sin
321
321
  overflow?: "wrap" | "scroll";
322
322
  }
323
323
  /** Select displays a collapsible list of options and allows a user to select one or more of them. */
324
- declare function Select<T extends object, M extends "single" | "multiple" = "single">({ items, sections, label, description, placeholder, size, errorMessage, selectionMode, overflow, ...props }: SelectProps$1<T, M>): JSX.Element;
325
- interface SeparatorProps$1 extends SeparatorProps {
324
+ declare function Select<T extends object, M extends "single" | "multiple" = "single">({ items, sections, label, description, placeholder, size, errorMessage, selectionMode, overflow, ...props }: SelectProps<T, M>): JSX.Element;
325
+ interface SeparatorProps extends SeparatorProps$1 {
326
326
  size?: "small" | "medium" | "large";
327
327
  }
328
- declare function Separator({ size, ...props }: SeparatorProps$1): JSX.Element;
328
+ declare function Separator({ size, ...props }: SeparatorProps): JSX.Element;
329
329
  interface SvgBcLogoProps extends React.SVGProps<SVGSVGElement> {
330
330
  /** Accessible label for non-decorative usage. When omitted, the icon is hidden from assistive technology. */
331
331
  title?: string;
@@ -449,7 +449,7 @@ interface SvgReactAriaIconProps extends React.SVGProps<SVGSVGElement> {
449
449
  title?: string;
450
450
  }
451
451
  declare function SvgReactAriaIcon({ size, title, id, ...props }: SvgReactAriaIconProps): JSX.Element;
452
- interface TagGroupProps$1 extends TagGroupProps {
452
+ interface TagGroupProps extends TagGroupProps$1 {
453
453
  /**
454
454
  * Labels the TagGroup, appears above the tags.
455
455
  */
@@ -463,28 +463,28 @@ interface TagGroupProps$1 extends TagGroupProps {
463
463
  */
464
464
  errorMessage?: string;
465
465
  }
466
- declare function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps$1): JSX.Element;
467
- interface TagListProps$1<T> extends Pick<TagListProps<T>, "children" | "renderEmptyState"> {
468
- items: TagProps$1[];
466
+ declare function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps): JSX.Element;
467
+ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEmptyState"> {
468
+ items: TagProps[];
469
469
  /**
470
470
  * Used to set the `flex-direction` on the TagList.
471
471
  */
472
472
  orientation?: "horizontal" | "vertical";
473
473
  }
474
- declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps$1<T>): JSX.Element;
475
- interface TextProps$1 extends TextProps {
474
+ declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): JSX.Element;
475
+ interface TextProps extends TextProps$1 {
476
476
  size?: "small" | "medium" | "large";
477
477
  color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
478
478
  isUnstyled?: boolean;
479
479
  }
480
- declare function Text({ elementType, size, color, isUnstyled, ...props }: TextProps$1): JSX.Element;
481
- interface TextAreaProps extends TextFieldProps {
480
+ declare function Text({ elementType, size, color, isUnstyled, ...props }: TextProps): JSX.Element;
481
+ interface TextAreaProps extends TextFieldProps$1 {
482
482
  label?: string;
483
483
  description?: string;
484
484
  errorMessage?: string | ((validation: ValidationResult) => string);
485
485
  }
486
486
  declare function TextArea({ label, description, errorMessage, maxLength, onChange, value, ...props }: TextAreaProps): JSX.Element;
487
- interface TextFieldProps$1 extends TextFieldProps {
487
+ interface TextFieldProps extends TextFieldProps$1 {
488
488
  size?: "medium" | "small";
489
489
  label?: string;
490
490
  description?: string;
@@ -492,24 +492,24 @@ interface TextFieldProps$1 extends TextFieldProps {
492
492
  iconLeft?: React.ReactElement;
493
493
  iconRight?: React.ReactElement;
494
494
  }
495
- declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps$1): JSX.Element;
496
- interface TimeFieldProps$1<T extends TimeValue> extends TimeFieldProps<T> {
495
+ declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps): JSX.Element;
496
+ interface TimeFieldProps<T extends TimeValue> extends TimeFieldProps$1<T> {
497
497
  size?: "medium" | "small";
498
498
  label?: string;
499
499
  description?: string;
500
500
  errorMessage?: string | ((validation: ValidationResult) => string);
501
501
  }
502
- declare function TimeField<T extends TimeValue>({ size, label, description, errorMessage, ...props }: TimeFieldProps$1<T>): JSX.Element;
503
- interface ToggleButtonProps$1 extends ToggleButtonProps {
502
+ declare function TimeField<T extends TimeValue>({ size, label, description, errorMessage, ...props }: TimeFieldProps<T>): JSX.Element;
503
+ interface ToggleButtonProps extends ToggleButtonProps$1 {
504
504
  size?: "small" | "medium";
505
505
  isIconButton?: boolean;
506
506
  }
507
- declare function ToggleButton({ size, children, isIconButton, ...props }: ToggleButtonProps$1): JSX.Element;
508
- interface ToggleButtonGroupProps$1 extends ToggleButtonGroupProps {
507
+ declare function ToggleButton({ size, children, isIconButton, ...props }: ToggleButtonProps): JSX.Element;
508
+ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
509
509
  label?: string;
510
510
  size?: "small" | "medium";
511
511
  }
512
- declare function ToggleButtonGroup({ label, size, children, ...props }: ToggleButtonGroupProps$1): JSX.Element;
512
+ declare function ToggleButtonGroup({ label, size, children, ...props }: ToggleButtonGroupProps): JSX.Element;
513
513
  interface SwitchProps extends SwitchFieldProps {
514
514
  labelPosition?: "left" | "right";
515
515
  description?: string;
@@ -517,11 +517,11 @@ interface SwitchProps extends SwitchFieldProps {
517
517
  }
518
518
  declare function Switch({ labelPosition, description, errorMessage, children, ...props }: SwitchProps): JSX.Element;
519
519
  declare function Tooltip(props: TooltipProps): JSX.Element;
520
- interface NumberFieldProps$1 extends NumberFieldProps {
520
+ interface NumberFieldProps extends NumberFieldProps$1 {
521
521
  size?: "small" | "medium";
522
522
  label?: string;
523
523
  description?: string;
524
524
  errorMessage?: string | ((validation: ValidationResult) => string);
525
525
  }
526
- declare function NumberField({ size, label, description, minValue, errorMessage, ...props }: NumberFieldProps$1): JSX.Element;
526
+ declare function NumberField({ size, label, description, minValue, errorMessage, ...props }: NumberFieldProps): JSX.Element;
527
527
  export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, type CalendarSelectionMode, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, DialogTrigger, Footer, Form, Header, Heading, InlineAlert, Link, Menu, MenuItem, MenuSection, MenuSectionHeader, MenuTrigger, Modal, NumberField, ProgressBar, ProgressCircle, Radio, RadioGroup, Select, Separator, Subheader, SubmenuTrigger, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCalendarIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronLeftIcon, SvgChevronRightIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgMinusIcon, SvgPlaceholderIcon, SvgPlusIcon, SvgReactAriaIcon, SvgTooltipArrowUp, SvgUpRightFromSquareIcon, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip, TooltipTrigger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.9.1-pr993",
3
+ "version": "0.9.1-pr995",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bcgov/design-system.git",
@@ -47,7 +47,6 @@
47
47
  "dependencies": {
48
48
  "@bcgov/design-tokens": "5.1.0",
49
49
  "@react-aria/datepicker": "3.17.1",
50
- "@react-aria/i18n": "3.13.1",
51
50
  "react-aria": "3.53.1",
52
51
  "react-aria-components": "1.22.1"
53
52
  },
@@ -60,43 +59,42 @@
60
59
  "@eslint/js": "10.0.1",
61
60
  "@figma/code-connect": "2.1.0",
62
61
  "@internationalized/date": "3.12.4",
63
- "@react-stately/data": "3.16.1",
64
- "@storybook/addon-a11y": "10.6.6",
65
- "@storybook/addon-docs": "10.6.6",
66
- "@storybook/addon-links": "10.6.6",
67
- "@storybook/addon-mcp": "10.6.6",
68
- "@storybook/addon-vitest": "10.6.6",
69
- "@storybook/mcp": "10.6.6",
70
- "@storybook/react-vite": "10.6.6",
71
- "@testing-library/jest-dom": "6.9.1",
62
+ "@storybook/addon-a11y": "10.6.7",
63
+ "@storybook/addon-docs": "10.6.7",
64
+ "@storybook/addon-links": "10.6.7",
65
+ "@storybook/addon-mcp": "10.6.7",
66
+ "@storybook/addon-vitest": "10.6.7",
67
+ "@storybook/mcp": "10.6.7",
68
+ "@storybook/react-vite": "10.6.7",
69
+ "@testing-library/jest-dom": "7.0.1",
72
70
  "@testing-library/react": "16.3.3",
73
71
  "@types/jsdom": "30.0.0",
74
- "@types/node": "25.9.9",
72
+ "@types/node": "26.6.6",
75
73
  "@types/react": "19.3.0",
76
74
  "@types/react-dom": "19.3.0",
77
- "@typescript-eslint/eslint-plugin": "8.72.1",
78
- "@typescript-eslint/parser": "8.72.1",
75
+ "@typescript-eslint/eslint-plugin": "8.72.2",
76
+ "@typescript-eslint/parser": "8.72.2",
79
77
  "@vitejs/plugin-react": "6.3.0",
80
- "@vitest/browser-playwright": "5.0.5",
81
- "@vitest/coverage-v8": "5.0.5",
78
+ "@vitest/browser-playwright": "5.1.0",
79
+ "@vitest/coverage-v8": "5.1.0",
82
80
  "eslint": "10.14.0",
83
81
  "eslint-plugin-react-hooks": "7.1.1",
84
82
  "eslint-plugin-react-refresh": "0.5.7",
85
- "eslint-plugin-storybook": "10.6.6",
83
+ "eslint-plugin-storybook": "10.6.7",
86
84
  "globals": "17.14.0",
87
- "jsdom": "30.1.3",
85
+ "jsdom": "31.0.1",
88
86
  "playwright": "1.65.0",
89
- "prettier": "3.9.10",
90
- "rolldown": "1.2.15",
91
- "rolldown-plugin-dts": "0.29.0",
92
- "storybook": "10.6.6",
87
+ "prettier": "3.10.0",
88
+ "rolldown": "1.3.2",
89
+ "rolldown-plugin-dts": "0.30.2",
90
+ "storybook": "10.6.7",
93
91
  "stylelint": "18.0.0",
94
92
  "stylelint-config-standard": "41.0.0",
95
93
  "typescript": "6.0.3",
96
- "typescript-eslint": "8.72.1",
97
- "vite": "8.3.7",
94
+ "typescript-eslint": "8.72.2",
95
+ "vite": "8.3.8",
98
96
  "vite-plugin-css-injected-by-js": "5.0.3",
99
- "vitest": "5.0.5"
97
+ "vitest": "5.1.0"
100
98
  },
101
99
  "overrides": {
102
100
  "eslint-plugin-react-hooks": {
@@ -104,6 +102,10 @@
104
102
  }
105
103
  },
106
104
  "author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
105
+ "contributors": [
106
+ "Marcus Kernohan <Marcus.Kernohan@gov.bc.ca>",
107
+ "Trevor Richards <Trevor.Richards@gov.bc.ca>"
108
+ ],
107
109
  "license": "Apache-2.0",
108
110
  "bugs": {
109
111
  "url": "https://github.com/bcgov/design-system/issues"