@bcgov/design-system-react-components 0.1.1-pr437 → 0.1.1-pr446
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 +233 -24
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/ButtonGroup/ButtonGroup.d.ts +7 -0
- package/dist/cjs/types/components/ButtonGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/InlineAlert/InlineAlert.d.ts +2 -1
- package/dist/cjs/types/components/Switch/Switch.d.ts +7 -0
- package/dist/cjs/types/components/Switch/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/esm/index.js +232 -25
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ButtonGroup/ButtonGroup.d.ts +7 -0
- package/dist/esm/types/components/ButtonGroup/index.d.ts +2 -0
- package/dist/esm/types/components/InlineAlert/InlineAlert.d.ts +2 -1
- package/dist/esm/types/components/Switch/Switch.d.ts +7 -0
- package/dist/esm/types/components/Switch/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/index.d.ts +17 -3
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./ButtonGroup.css";
|
|
2
|
+
export interface ButtonGroupProps extends React.PropsWithChildren {
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
alignment?: "start" | "center" | "end";
|
|
5
|
+
ariaLabel?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export default function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,9 +4,10 @@ export interface InlineAlertProps extends React.PropsWithChildren {
|
|
|
4
4
|
variant?: "info" | "success" | "warning" | "danger";
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
|
+
buttons?: React.ReactNode;
|
|
7
8
|
isCloseable?: boolean;
|
|
8
9
|
isIconHidden?: boolean;
|
|
9
10
|
role?: React.AriaRole | undefined;
|
|
10
11
|
onClose?: () => void;
|
|
11
12
|
}
|
|
12
|
-
export default function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, children, onClose, ...props }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "@bcgov/design-tokens/css/variables.css";
|
|
2
2
|
export { default as InlineAlert } from "./InlineAlert";
|
|
3
3
|
export { default as Button } from "./Button";
|
|
4
|
+
export { default as ButtonGroup } from "./ButtonGroup";
|
|
4
5
|
export { default as Header } from "./Header";
|
|
5
6
|
export { default as Footer, FooterLinks } from "./Footer";
|
|
6
7
|
export { default as Form } from "./Form";
|
|
@@ -16,4 +17,5 @@ export { default as TagGroup } from "./TagGroup";
|
|
|
16
17
|
export { default as TagList } from "./TagList";
|
|
17
18
|
export { default as TextArea } from "./TextArea";
|
|
18
19
|
export { default as TextField } from "./TextField";
|
|
20
|
+
export { default as Switch } from "./Switch";
|
|
19
21
|
export { default as Tooltip, TooltipTrigger } from "./Tooltip";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
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 {
|
|
7
7
|
variant?: "info" | "success" | "warning" | "danger";
|
|
8
8
|
title?: string;
|
|
9
9
|
description?: string;
|
|
10
|
+
buttons?: React$1.ReactNode;
|
|
10
11
|
isCloseable?: boolean;
|
|
11
12
|
isIconHidden?: boolean;
|
|
12
13
|
role?: React$1.AriaRole | undefined;
|
|
13
14
|
onClose?: () => void;
|
|
14
15
|
}
|
|
15
|
-
declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
|
|
16
17
|
|
|
17
18
|
interface ButtonProps extends ButtonProps$1 {
|
|
18
19
|
/**
|
|
@@ -34,6 +35,13 @@ interface ButtonProps extends ButtonProps$1 {
|
|
|
34
35
|
}
|
|
35
36
|
declare function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
36
37
|
|
|
38
|
+
interface ButtonGroupProps extends React.PropsWithChildren {
|
|
39
|
+
orientation?: "horizontal" | "vertical";
|
|
40
|
+
alignment?: "start" | "center" | "end";
|
|
41
|
+
ariaLabel?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
declare function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
37
45
|
interface HeaderProps {
|
|
38
46
|
/**
|
|
39
47
|
* Link element that surrounds the logo. Use what's appropriate for your
|
|
@@ -244,6 +252,12 @@ interface TextFieldProps extends TextFieldProps$1 {
|
|
|
244
252
|
}
|
|
245
253
|
declare function TextField({ size, label, description, errorMessage, iconLeft, iconRight, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
246
254
|
|
|
255
|
+
interface SwitchProps extends SwitchProps$1 {
|
|
256
|
+
children?: React.ReactNode;
|
|
257
|
+
labelPosition?: "left" | "right";
|
|
258
|
+
}
|
|
259
|
+
declare function Switch({ labelPosition, children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
260
|
+
|
|
247
261
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
248
262
|
|
|
249
|
-
export { Button, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
|
|
263
|
+
export { Button, ButtonGroup, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
|