@bcgov/design-system-react-components 0.2.1 → 0.2.2-pr486
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 +15 -13
- package/dist/cjs/index.cjs +499 -16
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/cjs/types/components/Checkbox/index.d.ts +2 -0
- package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.d.ts +11 -0
- package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.test.d.ts +1 -0
- package/dist/cjs/types/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/Form/Form.d.ts +1 -2
- package/dist/cjs/types/components/Form/index.d.ts +1 -1
- package/dist/cjs/types/components/Icons/SvgCheckIcon/SvgCheckIcon.d.ts +3 -0
- package/dist/cjs/types/components/Icons/SvgCheckIcon/index.d.ts +1 -0
- package/dist/cjs/types/components/Icons/SvgDashIcon/SvgDashIcon.d.ts +3 -0
- package/dist/cjs/types/components/Icons/SvgDashIcon/index.d.ts +1 -0
- package/dist/cjs/types/components/Icons/SvgTooltipArrowUp/SvgTooltipArrowUp.d.ts +3 -0
- package/dist/cjs/types/components/Icons/SvgTooltipArrowUp/index.d.ts +1 -0
- package/dist/cjs/types/components/Switch/Switch.d.ts +0 -1
- package/dist/cjs/types/components/index.d.ts +5 -0
- package/dist/esm/index.js +496 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.d.ts +11 -0
- package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.test.d.ts +1 -0
- package/dist/esm/types/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/esm/types/components/Form/Form.d.ts +1 -2
- package/dist/esm/types/components/Form/index.d.ts +1 -1
- package/dist/esm/types/components/Icons/SvgCheckIcon/SvgCheckIcon.d.ts +3 -0
- package/dist/esm/types/components/Icons/SvgCheckIcon/index.d.ts +1 -0
- package/dist/esm/types/components/Icons/SvgDashIcon/SvgDashIcon.d.ts +3 -0
- package/dist/esm/types/components/Icons/SvgDashIcon/index.d.ts +1 -0
- package/dist/esm/types/components/Icons/SvgTooltipArrowUp/SvgTooltipArrowUp.d.ts +3 -0
- package/dist/esm/types/components/Icons/SvgTooltipArrowUp/index.d.ts +1 -0
- package/dist/esm/types/components/Switch/Switch.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +5 -0
- package/dist/index.d.ts +26 -4
- package/package.json +16 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CheckboxGroupProps as ReactAriaCheckboxGroupProps, ValidationResult } from "react-aria-components";
|
|
2
|
+
import "./CheckboxGroup.css";
|
|
3
|
+
export interface CheckboxGroupProps extends ReactAriaCheckboxGroupProps {
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
8
|
+
/** `flex-wrap` style property, defaults to `nowrap` */
|
|
9
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
10
|
+
}
|
|
11
|
+
export default function CheckboxGroup({ orientation, label, description, errorMessage, flexWrap, children, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { FormProps as ReactAriaFormProps } from "react-aria-components";
|
|
2
|
-
export
|
|
3
|
-
export default function Form({ ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function Form({ ...props }: ReactAriaFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from "./Form";
|
|
2
|
-
export type { FormProps } from "
|
|
2
|
+
export type { FormProps } from "react-aria-components";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgCheckIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgDashIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgTooltipArrowUp";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SwitchProps as ReactAriaSwitchProps } from "react-aria-components";
|
|
2
2
|
import "./Switch.css";
|
|
3
3
|
export interface SwitchProps extends ReactAriaSwitchProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
4
|
labelPosition?: "left" | "right";
|
|
6
5
|
}
|
|
7
6
|
export default function Switch({ labelPosition, children, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,18 +2,23 @@ import "@bcgov/design-tokens/css/variables.css";
|
|
|
2
2
|
export { default as InlineAlert } from "./InlineAlert";
|
|
3
3
|
export { default as Button } from "./Button";
|
|
4
4
|
export { default as ButtonGroup } from "./ButtonGroup";
|
|
5
|
+
export { default as Checkbox } from "./Checkbox";
|
|
6
|
+
export { default as CheckboxGroup } from "./CheckboxGroup";
|
|
5
7
|
export { default as Header } from "./Header";
|
|
6
8
|
export { default as Footer, FooterLinks } from "./Footer";
|
|
7
9
|
export { default as Form } from "./Form";
|
|
8
10
|
export { default as Select } from "./Select";
|
|
9
11
|
export { default as SvgBcLogo } from "./Icons/SvgBcLogo";
|
|
12
|
+
export { default as SvgCheckIcon } from "./Icons/SvgCheckIcon";
|
|
10
13
|
export { default as SvgCheckCircleIcon } from "./Icons/SvgCheckCircleIcon";
|
|
14
|
+
export { default as SvgDashIcon } from "./Icons/SvgDashIcon";
|
|
11
15
|
export { default as SvgExclamationIcon } from "./Icons/SvgExclamationIcon";
|
|
12
16
|
export { default as SvgExclamationCircleIcon } from "./Icons/SvgExclamationCircleIcon";
|
|
13
17
|
export { default as SvgChevronUpIcon } from "./Icons/SvgChevronUpIcon";
|
|
14
18
|
export { default as SvgChevronDownIcon } from "./Icons/SvgChevronDownIcon";
|
|
15
19
|
export { default as SvgCloseIcon } from "./Icons/SvgCloseIcon";
|
|
16
20
|
export { default as SvgInfoIcon } from "./Icons/SvgInfoIcon";
|
|
21
|
+
export { default as SvgTooltipArrowUp } from "./Icons/SvgTooltipArrowUp";
|
|
17
22
|
export { default as Tag } from "./Tag";
|
|
18
23
|
export { default as TagGroup } from "./TagGroup";
|
|
19
24
|
export { default as TagList } from "./TagList";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ButtonProps as ButtonProps$1,
|
|
2
|
+
import { ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextFieldProps as TextFieldProps$1, SwitchProps as SwitchProps$1, TooltipProps } from 'react-aria-components';
|
|
3
3
|
export { TooltipTrigger } from 'react-aria-components';
|
|
4
4
|
import { PropsWithChildren } from 'react';
|
|
5
5
|
|
|
@@ -42,6 +42,18 @@ interface ButtonGroupProps extends React.PropsWithChildren {
|
|
|
42
42
|
}
|
|
43
43
|
declare function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
44
44
|
|
|
45
|
+
declare function Checkbox({ value, children, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
47
|
+
interface CheckboxGroupProps extends CheckboxGroupProps$1 {
|
|
48
|
+
orientation?: "horizontal" | "vertical";
|
|
49
|
+
label?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
52
|
+
/** `flex-wrap` style property, defaults to `nowrap` */
|
|
53
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
54
|
+
}
|
|
55
|
+
declare function CheckboxGroup({ orientation, label, description, errorMessage, flexWrap, children, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
45
57
|
interface HeaderProps {
|
|
46
58
|
/**
|
|
47
59
|
* Link element that surrounds the logo. Use what's appropriate for your
|
|
@@ -132,7 +144,6 @@ interface FooterProps {
|
|
|
132
144
|
*/
|
|
133
145
|
declare function Footer({ children, acknowledgement, logo, contact, links, copyright, hideAcknowledgement, hideLogoAndLinks, hideCopyright, }: React.PropsWithChildren<FooterProps>): react_jsx_runtime.JSX.Element;
|
|
134
146
|
|
|
135
|
-
type FormProps = FormProps$1;
|
|
136
147
|
declare function Form({ ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
137
148
|
|
|
138
149
|
interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
@@ -177,10 +188,18 @@ declare function SvgBcLogo({ id }: {
|
|
|
177
188
|
id?: string | undefined;
|
|
178
189
|
}): react_jsx_runtime.JSX.Element;
|
|
179
190
|
|
|
191
|
+
declare function SvgCheckIcon({ id }: {
|
|
192
|
+
id?: string | undefined;
|
|
193
|
+
}): react_jsx_runtime.JSX.Element;
|
|
194
|
+
|
|
180
195
|
declare function SvgCheckCircleIcon({ id }: {
|
|
181
196
|
id?: string | undefined;
|
|
182
197
|
}): react_jsx_runtime.JSX.Element;
|
|
183
198
|
|
|
199
|
+
declare function SvgDashIcon({ id }: {
|
|
200
|
+
id?: string | undefined;
|
|
201
|
+
}): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
184
203
|
declare function SvgExclamationIcon({ id }: {
|
|
185
204
|
id?: string | undefined;
|
|
186
205
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -205,6 +224,10 @@ declare function SvgInfoIcon({ id }: {
|
|
|
205
224
|
id?: string | undefined;
|
|
206
225
|
}): react_jsx_runtime.JSX.Element;
|
|
207
226
|
|
|
227
|
+
declare function SvgTooltipArrowUp({ id }: {
|
|
228
|
+
id?: string | undefined;
|
|
229
|
+
}): react_jsx_runtime.JSX.Element;
|
|
230
|
+
|
|
208
231
|
interface TagProps extends TagProps$1 {
|
|
209
232
|
/**
|
|
210
233
|
* Icon that appears to the left of the `textValue` field
|
|
@@ -260,11 +283,10 @@ interface TextFieldProps extends TextFieldProps$1 {
|
|
|
260
283
|
declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
261
284
|
|
|
262
285
|
interface SwitchProps extends SwitchProps$1 {
|
|
263
|
-
children?: React.ReactNode;
|
|
264
286
|
labelPosition?: "left" | "right";
|
|
265
287
|
}
|
|
266
288
|
declare function Switch({ labelPosition, children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
267
289
|
|
|
268
290
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
269
291
|
|
|
270
|
-
export { Button, ButtonGroup, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
|
|
292
|
+
export { Button, ButtonGroup, Checkbox, CheckboxGroup, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, 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.2.
|
|
3
|
+
"version": "0.2.2-pr486",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
@@ -37,22 +37,22 @@
|
|
|
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.
|
|
41
|
-
"@storybook/addon-essentials": "8.
|
|
42
|
-
"@storybook/addon-interactions": "8.
|
|
43
|
-
"@storybook/addon-links": "8.
|
|
44
|
-
"@storybook/blocks": "8.
|
|
45
|
-
"@storybook/react": "8.
|
|
46
|
-
"@storybook/react-vite": "8.
|
|
47
|
-
"@storybook/test": "8.
|
|
40
|
+
"@storybook/addon-a11y": "8.3.0",
|
|
41
|
+
"@storybook/addon-essentials": "8.3.0",
|
|
42
|
+
"@storybook/addon-interactions": "8.3.0",
|
|
43
|
+
"@storybook/addon-links": "8.3.0",
|
|
44
|
+
"@storybook/blocks": "8.3.0",
|
|
45
|
+
"@storybook/react": "8.3.0",
|
|
46
|
+
"@storybook/react-vite": "8.3.0",
|
|
47
|
+
"@storybook/test": "8.3.0",
|
|
48
48
|
"@storybook/test-runner": "0.19.1",
|
|
49
49
|
"@testing-library/jest-dom": "6.5.0",
|
|
50
|
-
"@testing-library/react": "16.0.
|
|
50
|
+
"@testing-library/react": "16.0.1",
|
|
51
51
|
"@types/jest": "29.5.12",
|
|
52
|
-
"@types/react": "18.3.
|
|
52
|
+
"@types/react": "18.3.5",
|
|
53
53
|
"@types/react-dom": "18.3.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
55
|
-
"@typescript-eslint/parser": "8.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.5.0",
|
|
55
|
+
"@typescript-eslint/parser": "8.5.0",
|
|
56
56
|
"@vitejs/plugin-react": "4.3.1",
|
|
57
57
|
"axe-playwright": "2.0.2",
|
|
58
58
|
"eslint": "8.57.0",
|
|
@@ -62,16 +62,16 @@
|
|
|
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.21.
|
|
65
|
+
"rollup": "4.21.2",
|
|
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.
|
|
69
|
+
"storybook": "8.3.0",
|
|
70
70
|
"ts-jest": "29.2.5",
|
|
71
71
|
"ts-node": "10.9.2",
|
|
72
72
|
"tslib": "2.7.0",
|
|
73
73
|
"typescript": "5.5.4",
|
|
74
|
-
"vite": "5.4.
|
|
74
|
+
"vite": "5.4.4"
|
|
75
75
|
},
|
|
76
76
|
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
77
77
|
"license": "Apache-2.0",
|