@bcgov/design-system-react-components 0.1.1-pr437 → 0.1.1-pr440

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,7 @@
1
+ import { SwitchProps as ReactAriaSwitchProps } from "react-aria-components";
2
+ import "./Switch.css";
3
+ export interface SwitchProps extends ReactAriaSwitchProps {
4
+ children?: React.ReactNode;
5
+ labelPosition?: "left" | "right";
6
+ }
7
+ export default function Switch({ labelPosition, children, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Switch";
2
+ export type { SwitchProps } from "./Switch";
@@ -16,4 +16,5 @@ export { default as TagGroup } from "./TagGroup";
16
16
  export { default as TagList } from "./TagList";
17
17
  export { default as TextArea } from "./TextArea";
18
18
  export { default as TextField } from "./TextField";
19
+ export { default as Switch } from "./Switch";
19
20
  export { default as Tooltip, TooltipTrigger } from "./Tooltip";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1 from 'react';
3
- 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';
3
+ 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, SwitchProps as SwitchProps$1, TooltipProps } from 'react-aria-components';
4
4
  export { TooltipTrigger } from 'react-aria-components';
5
5
 
6
6
  interface InlineAlertProps extends React$1.PropsWithChildren {
@@ -244,6 +244,12 @@ interface TextFieldProps extends TextFieldProps$1 {
244
244
  }
245
245
  declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
246
246
 
247
+ interface SwitchProps extends SwitchProps$1 {
248
+ children?: React.ReactNode;
249
+ labelPosition?: "left" | "right";
250
+ }
251
+ declare function Switch({ labelPosition, children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
252
+
247
253
  declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
248
254
 
249
- export { Button, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
255
+ export { Button, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, 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.1.1-pr437",
3
+ "version": "0.1.1-pr440",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",