@bcgov/design-system-react-components 0.6.1 → 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, RadioProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextProps as TextProps$1, TextFieldProps as TextFieldProps$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";
@@ -60,7 +62,7 @@ interface ButtonGroupProps extends React.PropsWithChildren {
60
62
  }
61
63
  declare function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
62
64
 
63
- declare function Calendar({ ...props }: CalendarProps<DateValue>): react_jsx_runtime.JSX.Element;
65
+ declare function Calendar({ visibleDuration, ...props }: CalendarProps<DateValue>): react_jsx_runtime.JSX.Element;
64
66
 
65
67
  interface CalloutProps extends React.PropsWithChildren {
66
68
  variant?: "lightGrey" | "lightBlue" | "lightGold" | "Blue" | "Grey" | "Black";
@@ -227,6 +229,16 @@ declare function Link({ children, size, danger, isButton, buttonVariant, isUnsty
227
229
 
228
230
  declare function Modal({ children, ...props }: ModalOverlayProps): react_jsx_runtime.JSX.Element;
229
231
 
232
+ interface ProgressBarProps extends ProgressBarProps$1 {
233
+ size?: "small" | "medium" | "large";
234
+ }
235
+ declare function ProgressBar({ size, valueLabel, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element;
236
+
237
+ interface ProgressCircleProps extends ProgressBarProps$1 {
238
+ size?: "small" | "medium" | "large";
239
+ }
240
+ declare function ProgressCircle({ size, valueLabel, ...props }: ProgressCircleProps): react_jsx_runtime.JSX.Element;
241
+
230
242
  declare function Radio({ value, children, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
231
243
 
232
244
  interface RadioGroupProps extends RadioGroupProps$1 {
@@ -240,6 +252,26 @@ interface RadioGroupProps extends RadioGroupProps$1 {
240
252
  }
241
253
  declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
242
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
+
243
275
  interface ListBoxItemProps extends ListBoxItemProps$1 {
244
276
  /** Text label for the option. Provide an `id` if this is not unique. */
245
277
  label: string;
@@ -251,6 +283,10 @@ interface ListBoxItemProps extends ListBoxItemProps$1 {
251
283
  iconLeft?: React.ReactElement;
252
284
  /** Right icon slot */
253
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"];
254
290
  }
255
291
  interface SelectionSectionProps {
256
292
  id: Key;
@@ -259,7 +295,7 @@ interface SelectionSectionProps {
259
295
  /** Flat list of options within the section */
260
296
  items: ListBoxItemProps[];
261
297
  }
262
- 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> {
263
299
  /** Use `items` for a flat list of options */
264
300
  items?: ListBoxItemProps[];
265
301
  /** Use `sections` for a sectioned list with `items` options in each section */
@@ -274,9 +310,16 @@ interface SelectProps<T extends object> extends SelectProps$1<T> {
274
310
  description?: string;
275
311
  /** Used for data validation and error handling */
276
312
  errorMessage?: string | ((validation: ValidationResult) => string);
313
+ /** Overflow behaviour */
314
+ overflow?: "wrap" | "scroll";
315
+ }
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;
318
+
319
+ interface SeparatorProps extends SeparatorProps$1 {
320
+ size?: "small" | "medium" | "large";
277
321
  }
278
- /** Select displays a collapsible list of options and allows a user to select one of them. */
279
- declare function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
322
+ declare function Separator({ size, ...props }: SeparatorProps): react_jsx_runtime.JSX.Element;
280
323
 
281
324
  declare function SvgBcLogo({ id }: {
282
325
  id?: string | undefined;
@@ -342,6 +385,12 @@ declare function SvgDashIcon({ id }: {
342
385
  id?: string | undefined;
343
386
  }): react_jsx_runtime.JSX.Element;
344
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
+
345
394
  declare function SvgPlusIcon({ id }: {
346
395
  id?: string | undefined;
347
396
  }): react_jsx_runtime.JSX.Element;
@@ -360,26 +409,6 @@ declare function SvgReactAriaIcon({ id }: {
360
409
  id?: string | undefined;
361
410
  }): react_jsx_runtime.JSX.Element;
362
411
 
363
- interface TagProps extends TagProps$1 {
364
- /**
365
- * Icon that appears to the left of the `textValue` field
366
- */
367
- icon?: React.ReactNode;
368
- /**
369
- * Background color
370
- */
371
- color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
372
- /**
373
- * tagStyle
374
- */
375
- tagStyle?: "rectangular" | "circular";
376
- /**
377
- * size
378
- */
379
- size?: "small" | "medium";
380
- }
381
- declare function Tag({ color, tagStyle, size, icon, id, textValue, }: TagProps): react_jsx_runtime.JSX.Element;
382
-
383
412
  interface TagGroupProps extends TagGroupProps$1 {
384
413
  /**
385
414
  * Labels the TagGroup, appears above the tags.
@@ -429,6 +458,14 @@ interface TextFieldProps extends TextFieldProps$1 {
429
458
  }
430
459
  declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
431
460
 
461
+ interface TimeFieldProps<T extends TimeValue> extends TimeFieldProps$1<T> {
462
+ size?: "medium" | "small";
463
+ label?: string;
464
+ description?: string;
465
+ errorMessage?: string | ((validation: ValidationResult) => string);
466
+ }
467
+ declare function TimeField<T extends TimeValue>({ size, label, description, errorMessage, isRequired, ...props }: TimeFieldProps<T>): react_jsx_runtime.JSX.Element;
468
+
432
469
  interface ToggleButtonProps extends ToggleButtonProps$1 {
433
470
  size?: "small" | "medium";
434
471
  isIconButton?: boolean;
@@ -456,4 +493,4 @@ interface NumberFieldProps extends NumberFieldProps$1 {
456
493
  }
457
494
  declare function NumberField({ size, label, description, errorMessage, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element;
458
495
 
459
- export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, NumberField, Radio, RadioGroup, Select, 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, 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.6.1",
3
+ "version": "0.7.0-pr643",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bcgov/design-system.git",
@@ -13,6 +13,8 @@
13
13
  "build:types": "tsc -p tsconfig.types.json",
14
14
  "build:dts": "rollup -c rollup.dts.config.js",
15
15
  "build": "npm run clean && npm run build:js && npm run build:types && npm run build:dts",
16
+ "format:check": "npx prettier . --check",
17
+ "format": "npx prettier . --write",
16
18
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
17
19
  "storybook-dev": "storybook dev -p 6006",
18
20
  "storybook-build": "storybook build",
@@ -40,8 +42,10 @@
40
42
  "dist/cjs"
41
43
  ],
42
44
  "dependencies": {
43
- "@bcgov/design-tokens": "3.2.0",
44
- "react-aria-components": "1.14.0"
45
+ "@bcgov/design-tokens": "4.0.0",
46
+ "@react-aria/datepicker": "3.17.0",
47
+ "@react-aria/i18n": "3.13.0",
48
+ "react-aria-components": "1.17.0"
45
49
  },
46
50
  "peerDependencies": {
47
51
  "@bcgov/bc-sans": "^2.1.0",
@@ -49,47 +53,56 @@
49
53
  "react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
50
54
  },
51
55
  "devDependencies": {
52
- "@react-stately/data": "3.15.0",
53
- "@rollup/plugin-commonjs": "29.0.0",
56
+ "@eslint/js": "10.0.1",
57
+ "@figma/code-connect": "1.4.5",
58
+ "@react-stately/data": "3.16.0",
59
+ "@rollup/plugin-commonjs": "29.0.2",
54
60
  "@rollup/plugin-json": "6.1.0",
55
61
  "@rollup/plugin-node-resolve": "16.0.3",
56
62
  "@rollup/plugin-typescript": "12.3.0",
57
- "@storybook/addon-a11y": "10.1.10",
58
- "@storybook/addon-docs": "10.1.10",
59
- "@storybook/addon-links": "10.1.10",
60
- "@storybook/addon-vitest": "10.1.10",
61
- "@storybook/react-vite": "10.1.10",
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",
62
68
  "@testing-library/jest-dom": "6.9.1",
63
- "@testing-library/react": "16.3.1",
64
- "@types/react": "19.2.7",
69
+ "@testing-library/react": "16.3.2",
70
+ "@types/node": "25.9.1",
71
+ "@types/react": "19.2.15",
65
72
  "@types/react-dom": "19.2.3",
66
- "@typescript-eslint/eslint-plugin": "8.50.1",
67
- "@typescript-eslint/parser": "8.50.1",
68
- "@vitejs/plugin-react": "5.1.2",
69
- "@vitest/browser-playwright": "4.0.14",
70
- "@vitest/coverage-v8": "4.0.14",
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",
71
78
  "axe-playwright": "2.2.2",
72
- "eslint": "9.39.2",
73
- "eslint-plugin-react-hooks": "7.0.1",
74
- "eslint-plugin-react-refresh": "0.4.26",
75
- "eslint-plugin-storybook": "10.1.10",
76
- "globals": "16.5.0",
77
- "jsdom": "27.4.0",
78
- "playwright": "1.57.0",
79
- "rollup": "4.54.0",
80
- "rollup-plugin-dts": "6.3.0",
79
+ "eslint": "10.4.0",
80
+ "eslint-plugin-react-hooks": "7.1.1",
81
+ "eslint-plugin-react-refresh": "0.5.2",
82
+ "eslint-plugin-storybook": "10.4.0",
83
+ "globals": "17.5.0",
84
+ "jsdom": "29.1.1",
85
+ "playwright": "1.60.0",
86
+ "prettier": "3.8.3",
87
+ "rollup": "4.60.4",
88
+ "rollup-plugin-dts": "6.4.1",
81
89
  "rollup-plugin-peer-deps-external": "2.2.4",
82
90
  "rollup-plugin-postcss": "4.0.2",
83
- "storybook": "10.1.10",
91
+ "storybook": "10.4.0",
84
92
  "tslib": "2.8.1",
85
- "typescript": "5.9.3",
86
- "typescript-eslint": "8.50.1",
87
- "vite": "7.3.0",
88
- "vitest": "4.0.14"
93
+ "typescript": "6.0.3",
94
+ "typescript-eslint": "8.59.4",
95
+ "vite": "8.0.13",
96
+ "vitest": "4.1.7"
89
97
  },
90
98
  "optionalDependencies": {
91
99
  "@rollup/rollup-linux-x64-gnu": "*"
92
100
  },
101
+ "overrides": {
102
+ "eslint-plugin-react-hooks": {
103
+ "zod-validation-error": "^4.0.0"
104
+ }
105
+ },
93
106
  "author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
94
107
  "license": "Apache-2.0",
95
108
  "bugs": {