@bcgov/design-system-react-components 0.7.0-pr593 → 0.7.0-pr643

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,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- 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, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, SeparatorProps as SeparatorProps$1, TagProps as TagProps$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';
2
+ 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, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, TagProps as TagProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, 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
3
  export { DialogTrigger, TooltipTrigger } from 'react-aria-components';
4
4
  import { PropsWithChildren } from 'react';
5
5
 
@@ -15,6 +15,8 @@ interface AccordionGroupProps extends DisclosureGroupProps {
15
15
  declare function AccordionGroup({ title, titleElement, children, ...props }: AccordionGroupProps): react_jsx_runtime.JSX.Element;
16
16
 
17
17
  interface AlertBannerProps extends React.PropsWithChildren {
18
+ size?: "small" | "medium";
19
+ layout?: "fixed" | "fluid";
18
20
  variant?: "info" | "success" | "warning" | "danger" | "black";
19
21
  isIconHidden?: boolean;
20
22
  isCloseable?: boolean;
@@ -22,7 +24,7 @@ interface AlertBannerProps extends React.PropsWithChildren {
22
24
  customIcon?: React.ReactNode;
23
25
  onClose?: () => void;
24
26
  }
25
- declare function AlertBanner({ variant, isIconHidden, isCloseable, role, onClose, children, customIcon, ...props }: AlertBannerProps): react_jsx_runtime.JSX.Element;
27
+ declare function AlertBanner({ variant, size, layout, isIconHidden, isCloseable, role, onClose, children, customIcon, ...props }: AlertBannerProps): react_jsx_runtime.JSX.Element;
26
28
 
27
29
  interface AlertDialogProps extends DialogProps$1 {
28
30
  variant?: "info" | "confirmation" | "warning" | "error" | "destructive";
@@ -250,6 +252,26 @@ interface RadioGroupProps extends RadioGroupProps$1 {
250
252
  }
251
253
  declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
252
254
 
255
+ interface TagProps extends TagProps$1 {
256
+ /**
257
+ * Icon that appears to the left of the `textValue` field
258
+ */
259
+ icon?: React.ReactNode;
260
+ /**
261
+ * Background color
262
+ */
263
+ color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
264
+ /**
265
+ * tagStyle
266
+ */
267
+ tagStyle?: "rectangular" | "circular";
268
+ /**
269
+ * size
270
+ */
271
+ size?: "xsmall" | "small" | "medium";
272
+ }
273
+ declare function Tag({ color, tagStyle, size, icon, id, textValue, ...props }: TagProps): react_jsx_runtime.JSX.Element;
274
+
253
275
  interface ListBoxItemProps extends ListBoxItemProps$1 {
254
276
  /** Text label for the option. Provide an `id` if this is not unique. */
255
277
  label: string;
@@ -261,6 +283,10 @@ interface ListBoxItemProps extends ListBoxItemProps$1 {
261
283
  iconLeft?: React.ReactElement;
262
284
  /** Right icon slot */
263
285
  iconRight?: React.ReactElement;
286
+ /** Optional color token forwarded to selected tags */
287
+ color?: TagProps["color"];
288
+ /** Optional style token forwarded to selected tags */
289
+ tagStyle?: TagProps["tagStyle"];
264
290
  }
265
291
  interface SelectionSectionProps {
266
292
  id: Key;
@@ -269,7 +295,7 @@ interface SelectionSectionProps {
269
295
  /** Flat list of options within the section */
270
296
  items: ListBoxItemProps[];
271
297
  }
272
- interface SelectProps<T extends object> extends SelectProps$1<T> {
298
+ interface SelectProps<T extends object, M extends "single" | "multiple" = "single"> extends SelectProps$1<T, M> {
273
299
  /** Use `items` for a flat list of options */
274
300
  items?: ListBoxItemProps[];
275
301
  /** Use `sections` for a sectioned list with `items` options in each section */
@@ -284,9 +310,11 @@ interface SelectProps<T extends object> extends SelectProps$1<T> {
284
310
  description?: string;
285
311
  /** Used for data validation and error handling */
286
312
  errorMessage?: string | ((validation: ValidationResult) => string);
313
+ /** Overflow behaviour */
314
+ overflow?: "wrap" | "scroll";
287
315
  }
288
- /** Select displays a collapsible list of options and allows a user to select one of them. */
289
- declare function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
316
+ /** Select displays a collapsible list of options and allows a user to select one or more of them. */
317
+ declare function Select<T extends object, M extends "single" | "multiple" = "single">({ items, sections, label, description, placeholder, size, errorMessage, selectionMode, overflow, ...props }: SelectProps<T, M>): react_jsx_runtime.JSX.Element;
290
318
 
291
319
  interface SeparatorProps extends SeparatorProps$1 {
292
320
  size?: "small" | "medium" | "large";
@@ -357,6 +385,12 @@ declare function SvgDashIcon({ id }: {
357
385
  id?: string | undefined;
358
386
  }): react_jsx_runtime.JSX.Element;
359
387
 
388
+ interface SvgPlaceholderIconProps {
389
+ /** Width and height of the placeholder icon, defaults to 20 */
390
+ size?: number;
391
+ }
392
+ declare function SvgPlaceholderIcon({ size, ...props }: SvgPlaceholderIconProps): react_jsx_runtime.JSX.Element;
393
+
360
394
  declare function SvgPlusIcon({ id }: {
361
395
  id?: string | undefined;
362
396
  }): react_jsx_runtime.JSX.Element;
@@ -375,26 +409,6 @@ declare function SvgReactAriaIcon({ id }: {
375
409
  id?: string | undefined;
376
410
  }): react_jsx_runtime.JSX.Element;
377
411
 
378
- interface TagProps extends TagProps$1 {
379
- /**
380
- * Icon that appears to the left of the `textValue` field
381
- */
382
- icon?: React.ReactNode;
383
- /**
384
- * Background color
385
- */
386
- color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
387
- /**
388
- * tagStyle
389
- */
390
- tagStyle?: "rectangular" | "circular";
391
- /**
392
- * size
393
- */
394
- size?: "small" | "medium";
395
- }
396
- declare function Tag({ color, tagStyle, size, icon, id, textValue, }: TagProps): react_jsx_runtime.JSX.Element;
397
-
398
412
  interface TagGroupProps extends TagGroupProps$1 {
399
413
  /**
400
414
  * Labels the TagGroup, appears above the tags.
@@ -479,4 +493,4 @@ interface NumberFieldProps extends NumberFieldProps$1 {
479
493
  }
480
494
  declare function NumberField({ size, label, description, errorMessage, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element;
481
495
 
482
- export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, NumberField, ProgressBar, ProgressCircle, Radio, RadioGroup, Select, Separator, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCalendarIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronLeftIcon, SvgChevronRightIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon$1 as SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgDashIcon as SvgMinusIcon, SvgPlusIcon, SvgReactAriaIcon, SvgTooltipArrowUp, SvgUpRightFromSquareIcon, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip };
496
+ export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, NumberField, ProgressBar, ProgressCircle, Radio, RadioGroup, Select, Separator, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCalendarIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronLeftIcon, SvgChevronRightIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon$1 as SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgDashIcon as SvgMinusIcon, SvgPlaceholderIcon, SvgPlusIcon, SvgReactAriaIcon, SvgTooltipArrowUp, SvgUpRightFromSquareIcon, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.7.0-pr593",
3
+ "version": "0.7.0-pr643",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bcgov/design-system.git",
@@ -42,7 +42,7 @@
42
42
  "dist/cjs"
43
43
  ],
44
44
  "dependencies": {
45
- "@bcgov/design-tokens": "3.2.0",
45
+ "@bcgov/design-tokens": "4.0.0",
46
46
  "@react-aria/datepicker": "3.17.0",
47
47
  "@react-aria/i18n": "3.13.0",
48
48
  "react-aria-components": "1.17.0"
@@ -54,46 +54,46 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@eslint/js": "10.0.1",
57
- "@figma/code-connect": "1.4.3",
57
+ "@figma/code-connect": "1.4.5",
58
58
  "@react-stately/data": "3.16.0",
59
59
  "@rollup/plugin-commonjs": "29.0.2",
60
60
  "@rollup/plugin-json": "6.1.0",
61
61
  "@rollup/plugin-node-resolve": "16.0.3",
62
62
  "@rollup/plugin-typescript": "12.3.0",
63
- "@storybook/addon-a11y": "10.3.5",
64
- "@storybook/addon-docs": "10.3.5",
65
- "@storybook/addon-links": "10.3.5",
66
- "@storybook/addon-vitest": "10.3.5",
67
- "@storybook/react-vite": "10.3.5",
63
+ "@storybook/addon-a11y": "10.4.0",
64
+ "@storybook/addon-docs": "10.4.0",
65
+ "@storybook/addon-links": "10.4.0",
66
+ "@storybook/addon-vitest": "10.4.0",
67
+ "@storybook/react-vite": "10.4.0",
68
68
  "@testing-library/jest-dom": "6.9.1",
69
69
  "@testing-library/react": "16.3.2",
70
- "@types/node": "^25.6.0",
71
- "@types/react": "19.2.14",
70
+ "@types/node": "25.9.1",
71
+ "@types/react": "19.2.15",
72
72
  "@types/react-dom": "19.2.3",
73
- "@typescript-eslint/eslint-plugin": "8.59.0",
74
- "@typescript-eslint/parser": "8.59.0",
75
- "@vitejs/plugin-react": "6.0.1",
76
- "@vitest/browser-playwright": "4.1.4",
77
- "@vitest/coverage-v8": "4.1.4",
73
+ "@typescript-eslint/eslint-plugin": "8.59.4",
74
+ "@typescript-eslint/parser": "8.59.4",
75
+ "@vitejs/plugin-react": "6.0.2",
76
+ "@vitest/browser-playwright": "4.1.7",
77
+ "@vitest/coverage-v8": "4.1.7",
78
78
  "axe-playwright": "2.2.2",
79
- "eslint": "10.2.1",
79
+ "eslint": "10.4.0",
80
80
  "eslint-plugin-react-hooks": "7.1.1",
81
81
  "eslint-plugin-react-refresh": "0.5.2",
82
- "eslint-plugin-storybook": "10.3.5",
82
+ "eslint-plugin-storybook": "10.4.0",
83
83
  "globals": "17.5.0",
84
- "jsdom": "29.0.2",
85
- "playwright": "1.59.1",
84
+ "jsdom": "29.1.1",
85
+ "playwright": "1.60.0",
86
86
  "prettier": "3.8.3",
87
- "rollup": "4.60.2",
87
+ "rollup": "4.60.4",
88
88
  "rollup-plugin-dts": "6.4.1",
89
89
  "rollup-plugin-peer-deps-external": "2.2.4",
90
90
  "rollup-plugin-postcss": "4.0.2",
91
- "storybook": "10.3.5",
91
+ "storybook": "10.4.0",
92
92
  "tslib": "2.8.1",
93
93
  "typescript": "6.0.3",
94
- "typescript-eslint": "8.59.0",
95
- "vite": "8.0.9",
96
- "vitest": "4.1.4"
94
+ "typescript-eslint": "8.59.4",
95
+ "vite": "8.0.13",
96
+ "vitest": "4.1.7"
97
97
  },
98
98
  "optionalDependencies": {
99
99
  "@rollup/rollup-linux-x64-gnu": "*"