@bcgov/design-system-react-components 0.1.0 → 0.1.1-pr431
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/README.md +28 -0
- package/dist/cjs/index.cjs +9999 -9640
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Select/Select.d.ts +4 -1
- package/dist/cjs/types/components/SvgExclamationIcon/SvgExclamationIcon.d.ts +3 -0
- package/dist/cjs/types/components/SvgExclamationIcon/index.d.ts +1 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +0 -1
- package/dist/cjs/types/components/TextArea/TextArea.d.ts +8 -0
- package/dist/cjs/types/components/TextArea/index.d.ts +2 -0
- package/dist/cjs/types/components/TextField/TextField.d.ts +0 -1
- package/dist/cjs/types/components/index.d.ts +1 -0
- package/dist/esm/index.js +10001 -9643
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Select/Select.d.ts +4 -1
- package/dist/esm/types/components/SvgExclamationIcon/SvgExclamationIcon.d.ts +3 -0
- package/dist/esm/types/components/SvgExclamationIcon/index.d.ts +1 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +0 -1
- package/dist/esm/types/components/TextArea/TextArea.d.ts +8 -0
- package/dist/esm/types/components/TextArea/index.d.ts +2 -0
- package/dist/esm/types/components/TextField/TextField.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/index.d.ts +12 -3
- package/package.json +23 -23
|
@@ -31,7 +31,10 @@ export interface SelectProps<T extends object> extends ReactAriaSelectProps<T> {
|
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
/** Defaults to `medium` */
|
|
33
33
|
size?: "small" | "medium";
|
|
34
|
+
/** Description or helper text that renders below the select input */
|
|
35
|
+
description?: string;
|
|
36
|
+
/** Used for data validation and error handling */
|
|
34
37
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
35
38
|
}
|
|
36
39
|
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
37
|
-
export default function Select<T extends object>({ items, sections, label, placeholder, size, errorMessage, ...props }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgExclamationIcon";
|
|
@@ -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;
|
|
@@ -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';
|
|
@@ -148,10 +147,13 @@ interface SelectProps<T extends object> extends SelectProps$1<T> {
|
|
|
148
147
|
placeholder?: string;
|
|
149
148
|
/** Defaults to `medium` */
|
|
150
149
|
size?: "small" | "medium";
|
|
150
|
+
/** Description or helper text that renders below the select input */
|
|
151
|
+
description?: string;
|
|
152
|
+
/** Used for data validation and error handling */
|
|
151
153
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
152
154
|
}
|
|
153
155
|
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
154
|
-
declare function Select<T extends object>({ items, sections, label, placeholder, size, errorMessage, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
156
|
+
declare function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
155
157
|
|
|
156
158
|
declare function SvgBcLogo({ id }: {
|
|
157
159
|
id?: string | undefined;
|
|
@@ -194,6 +196,13 @@ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEm
|
|
|
194
196
|
}
|
|
195
197
|
declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
|
|
196
198
|
|
|
199
|
+
interface TextAreaProps extends TextFieldProps$1 {
|
|
200
|
+
label?: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
203
|
+
}
|
|
204
|
+
declare function TextArea({ label, description, errorMessage, maxLength, onChange, value, ...props }: TextAreaProps): react_jsx_runtime.JSX.Element;
|
|
205
|
+
|
|
197
206
|
interface TextFieldProps extends TextFieldProps$1 {
|
|
198
207
|
size?: "medium" | "small";
|
|
199
208
|
label?: string;
|
|
@@ -206,4 +215,4 @@ declare function TextField({ size, label, description, errorMessage, iconLeft, i
|
|
|
206
215
|
|
|
207
216
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
208
217
|
|
|
209
|
-
export { Button, Footer, FooterLinks, Form, Header, Select, SvgBcLogo, Tag, TagGroup, TagList, TextField, Tooltip };
|
|
218
|
+
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.
|
|
3
|
+
"version": "0.1.1-pr431",
|
|
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.
|
|
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.
|
|
36
|
-
"@rollup/plugin-commonjs": "
|
|
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.
|
|
41
|
-
"@storybook/addon-essentials": "8.2.
|
|
42
|
-
"@storybook/addon-interactions": "8.2.
|
|
43
|
-
"@storybook/addon-links": "8.2.
|
|
44
|
-
"@storybook/blocks": "8.2.
|
|
45
|
-
"@storybook/react": "8.2.
|
|
46
|
-
"@storybook/react-vite": "8.2.
|
|
47
|
-
"@storybook/test": "8.2.
|
|
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.
|
|
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.
|
|
55
|
-
"@typescript-eslint/parser": "7.
|
|
56
|
-
"@vitejs/plugin-react": "4.3.
|
|
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.
|
|
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.
|
|
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.
|
|
70
|
-
"ts-jest": "29.
|
|
69
|
+
"storybook": "8.2.6",
|
|
70
|
+
"ts-jest": "29.2.3",
|
|
71
71
|
"ts-node": "10.9.2",
|
|
72
|
-
"tslib": "2.6.
|
|
73
|
-
"typescript": "5.4
|
|
74
|
-
"vite": "5.
|
|
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",
|