@bcgov/design-system-react-components 0.2.2 → 0.2.3-rc2
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/cjs/index.cjs +438 -17
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Radio/Radio.d.ts +3 -0
- package/dist/cjs/types/components/Radio/Radio.test.d.ts +1 -0
- package/dist/cjs/types/components/Radio/index.d.ts +2 -0
- package/dist/cjs/types/components/RadioGroup/RadioGroup.d.ts +12 -0
- package/dist/cjs/types/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/dist/cjs/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/esm/index.js +437 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Radio/Radio.d.ts +3 -0
- package/dist/esm/types/components/Radio/Radio.test.d.ts +1 -0
- package/dist/esm/types/components/Radio/index.d.ts +2 -0
- package/dist/esm/types/components/RadioGroup/RadioGroup.d.ts +12 -0
- package/dist/esm/types/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/dist/esm/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/index.d.ts +15 -2
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RadioGroupProps as ReactAriaRadioGroupProps, ValidationResult } from "react-aria-components";
|
|
2
|
+
import "./RadioGroup.css";
|
|
3
|
+
export interface RadioGroupProps extends ReactAriaRadioGroupProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
orientation?: "vertical" | "horizontal";
|
|
6
|
+
label?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
9
|
+
/** `flex-wrap` style property, defaults to `nowrap` */
|
|
10
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
11
|
+
}
|
|
12
|
+
export default function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -7,6 +7,8 @@ export { default as CheckboxGroup } from "./CheckboxGroup";
|
|
|
7
7
|
export { default as Header } from "./Header";
|
|
8
8
|
export { default as Footer, FooterLinks } from "./Footer";
|
|
9
9
|
export { default as Form } from "./Form";
|
|
10
|
+
export { default as Radio } from "./Radio";
|
|
11
|
+
export { default as RadioGroup } from "./RadioGroup";
|
|
10
12
|
export { default as Select } from "./Select";
|
|
11
13
|
export { default as SvgBcLogo } from "./Icons/SvgBcLogo";
|
|
12
14
|
export { default as SvgCheckIcon } from "./Icons/SvgCheckIcon";
|
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, 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';
|
|
2
|
+
import { ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, 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, 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
|
|
|
@@ -146,6 +146,19 @@ declare function Footer({ children, acknowledgement, logo, contact, links, copyr
|
|
|
146
146
|
|
|
147
147
|
declare function Form({ ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
148
148
|
|
|
149
|
+
declare function Radio({ value, children, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
150
|
+
|
|
151
|
+
interface RadioGroupProps extends RadioGroupProps$1 {
|
|
152
|
+
children?: React.ReactNode;
|
|
153
|
+
orientation?: "vertical" | "horizontal";
|
|
154
|
+
label?: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
157
|
+
/** `flex-wrap` style property, defaults to `nowrap` */
|
|
158
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
159
|
+
}
|
|
160
|
+
declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
|
|
149
162
|
interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
150
163
|
/** Text label for the option. Provide an `id` if this is not unique. */
|
|
151
164
|
label: string;
|
|
@@ -289,4 +302,4 @@ declare function Switch({ labelPosition, children, ...props }: SwitchProps): rea
|
|
|
289
302
|
|
|
290
303
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
291
304
|
|
|
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 };
|
|
305
|
+
export { Button, ButtonGroup, Checkbox, CheckboxGroup, Footer, FooterLinks, Form, Header, InlineAlert, Radio, RadioGroup, 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.3-rc2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@storybook/test-runner": "0.19.1",
|
|
49
49
|
"@testing-library/jest-dom": "6.5.0",
|
|
50
50
|
"@testing-library/react": "16.0.1",
|
|
51
|
-
"@types/jest": "29.5.
|
|
51
|
+
"@types/jest": "29.5.13",
|
|
52
52
|
"@types/react": "18.3.5",
|
|
53
53
|
"@types/react-dom": "18.3.0",
|
|
54
54
|
"@typescript-eslint/eslint-plugin": "8.5.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
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.3",
|
|
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",
|
|
@@ -73,6 +73,9 @@
|
|
|
73
73
|
"typescript": "5.5.4",
|
|
74
74
|
"vite": "5.4.4"
|
|
75
75
|
},
|
|
76
|
+
"optionalDependencies": {
|
|
77
|
+
"@rollup/rollup-linux-x64-gnu": "*"
|
|
78
|
+
},
|
|
76
79
|
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
77
80
|
"license": "Apache-2.0",
|
|
78
81
|
"bugs": {
|