@bcgov/design-system-react-components 0.1.0 → 0.1.1-rc1

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.
@@ -0,0 +1,15 @@
1
+ import { ListBoxItemProps as ReactAriaListBoxItemProps } from "react-aria-components";
2
+ import "./ListBoxItem.css";
3
+ export interface ListBoxItemProps extends ReactAriaListBoxItemProps {
4
+ /** Text label for the option. Provide an `id` if this is not unique. */
5
+ label: string;
6
+ /** Descriptive text that appears below the option's label */
7
+ description?: string;
8
+ /** Marks an option visually with red text to indicate a destructive/dangerous option */
9
+ isDestructive?: boolean;
10
+ /** Left icon slot */
11
+ iconLeft?: React.ReactElement;
12
+ /** Right icon slot */
13
+ iconRight?: React.ReactElement;
14
+ }
15
+ export default function ListBoxItem({ id, description, href, label, iconLeft, iconRight, isDestructive, }: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function SvgExclamationIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgExclamationIcon";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TagProps as ReactAriaTagProps } from "react-aria-components";
3
2
  import "./Tag.css";
4
3
  export interface TagProps extends ReactAriaTagProps {
@@ -0,0 +1,8 @@
1
+ import { TextFieldProps as ReactAriaTextFieldProps, ValidationResult } from "react-aria-components";
2
+ import "./TextArea.css";
3
+ export interface TextAreaProps extends ReactAriaTextFieldProps {
4
+ label?: string;
5
+ description?: string;
6
+ errorMessage?: string | ((validation: ValidationResult) => string);
7
+ }
8
+ export default function TextArea({ label, description, errorMessage, maxLength, onChange, value, ...props }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./TextArea";
2
+ export type { TextAreaProps } from "./TextArea";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextFieldProps as ReactAriaTextFieldProps, ValidationResult } from "react-aria-components";
3
2
  import "./TextField.css";
4
3
  export interface TextFieldProps extends ReactAriaTextFieldProps {
@@ -8,5 +8,6 @@ export { default as SvgBcLogo } from "./SvgBcLogo";
8
8
  export { default as Tag } from "./Tag";
9
9
  export { default as TagGroup } from "./TagGroup";
10
10
  export { default as TagList } from "./TagList";
11
+ export { default as TextArea } from "./TextArea";
11
12
  export { default as TextField } from "./TextField";
12
13
  export { default as Tooltip, TooltipTrigger } from "./Tooltip";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { ButtonProps as ButtonProps$1, FormProps as FormProps$1, SelectProps as SelectProps$1, ValidationResult, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextFieldProps as TextFieldProps$1, TooltipProps } from 'react-aria-components';
4
3
  export { TooltipTrigger } from 'react-aria-components';
@@ -194,6 +193,13 @@ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEm
194
193
  }
195
194
  declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
196
195
 
196
+ interface TextAreaProps extends TextFieldProps$1 {
197
+ label?: string;
198
+ description?: string;
199
+ errorMessage?: string | ((validation: ValidationResult) => string);
200
+ }
201
+ declare function TextArea({ label, description, errorMessage, maxLength, onChange, value, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
202
+
197
203
  interface TextFieldProps extends TextFieldProps$1 {
198
204
  size?: "medium" | "small";
199
205
  label?: string;
@@ -206,4 +212,4 @@ declare function TextField({ size, label, description, errorMessage, iconLeft, i
206
212
 
207
213
  declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
208
214
 
209
- export { Button, Footer, FooterLinks, Form, Header, Select, SvgBcLogo, Tag, TagGroup, TagList, TextField, Tooltip };
215
+ export { Button, Footer, FooterLinks, Form, Header, Select, SvgBcLogo, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-rc1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
@@ -24,7 +24,7 @@
24
24
  "types": "dist/index.d.ts",
25
25
  "dependencies": {
26
26
  "@bcgov/design-tokens": "3.0.0",
27
- "react-aria-components": "1.2.1"
27
+ "react-aria-components": "1.3.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@bcgov/bc-sans": "^2.1.0",
@@ -32,46 +32,46 @@
32
32
  "react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@react-stately/data": "3.11.4",
36
- "@rollup/plugin-commonjs": "25.0.8",
35
+ "@react-stately/data": "3.11.6",
36
+ "@rollup/plugin-commonjs": "26.0.1",
37
37
  "@rollup/plugin-json": "6.1.0",
38
38
  "@rollup/plugin-node-resolve": "15.2.3",
39
39
  "@rollup/plugin-typescript": "11.1.6",
40
- "@storybook/addon-a11y": "8.2.5",
41
- "@storybook/addon-essentials": "8.2.5",
42
- "@storybook/addon-interactions": "8.2.5",
43
- "@storybook/addon-links": "8.2.5",
44
- "@storybook/blocks": "8.2.5",
45
- "@storybook/react": "8.2.5",
46
- "@storybook/react-vite": "8.2.5",
47
- "@storybook/test": "8.2.5",
40
+ "@storybook/addon-a11y": "8.2.6",
41
+ "@storybook/addon-essentials": "8.2.6",
42
+ "@storybook/addon-interactions": "8.2.6",
43
+ "@storybook/addon-links": "8.2.6",
44
+ "@storybook/blocks": "8.2.6",
45
+ "@storybook/react": "8.2.6",
46
+ "@storybook/react-vite": "8.2.6",
47
+ "@storybook/test": "8.2.6",
48
48
  "@storybook/test-runner": "0.19.1",
49
- "@testing-library/jest-dom": "6.4.5",
49
+ "@testing-library/jest-dom": "6.4.8",
50
50
  "@testing-library/react": "16.0.0",
51
51
  "@types/jest": "29.5.12",
52
52
  "@types/react": "18.3.3",
53
53
  "@types/react-dom": "18.3.0",
54
- "@typescript-eslint/eslint-plugin": "7.12.0",
55
- "@typescript-eslint/parser": "7.12.0",
56
- "@vitejs/plugin-react": "4.3.0",
54
+ "@typescript-eslint/eslint-plugin": "7.17.0",
55
+ "@typescript-eslint/parser": "7.17.0",
56
+ "@vitejs/plugin-react": "4.3.1",
57
57
  "axe-playwright": "2.0.1",
58
58
  "eslint": "8.57.0",
59
59
  "eslint-plugin-react-hooks": "4.6.2",
60
- "eslint-plugin-react-refresh": "0.4.7",
60
+ "eslint-plugin-react-refresh": "0.4.9",
61
61
  "eslint-plugin-storybook": "0.8.0",
62
62
  "identity-obj-proxy": "3.0.0",
63
63
  "jest": "29.7.0",
64
64
  "jest-environment-jsdom": "29.7.0",
65
- "rollup": "4.18.0",
65
+ "rollup": "4.19.0",
66
66
  "rollup-plugin-dts": "6.1.1",
67
67
  "rollup-plugin-peer-deps-external": "2.2.4",
68
68
  "rollup-plugin-postcss": "4.0.2",
69
- "storybook": "8.2.5",
70
- "ts-jest": "29.1.4",
69
+ "storybook": "8.2.6",
70
+ "ts-jest": "29.2.3",
71
71
  "ts-node": "10.9.2",
72
- "tslib": "2.6.2",
73
- "typescript": "5.4.5",
74
- "vite": "5.2.12"
72
+ "tslib": "2.6.3",
73
+ "typescript": "5.5.4",
74
+ "vite": "5.3.5"
75
75
  },
76
76
  "author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
77
77
  "license": "Apache-2.0",