@bcgov/design-system-react-components 0.1.2 → 0.1.3-pr449
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 +1 -0
- package/dist/cjs/index.cjs +16 -8
- 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/index.d.ts +1 -0
- package/dist/esm/index.js +16 -9
- 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/index.d.ts +1 -0
- package/dist/index.d.ts +10 -2
- package/package.json +1 -1
- package/dist/cjs/types/components/Select/ListBoxItem.d.ts +0 -15
- package/dist/esm/types/components/Select/ListBoxItem.d.ts +0 -15
|
@@ -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;
|
|
@@ -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";
|
package/dist/index.d.ts
CHANGED
|
@@ -7,12 +7,13 @@ 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
|
|
@@ -252,4 +260,4 @@ declare function Switch({ labelPosition, children, ...props }: SwitchProps): rea
|
|
|
252
260
|
|
|
253
261
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
254
262
|
|
|
255
|
-
export { Button, Footer, FooterLinks, Form, Header, InlineAlert, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCloseIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, Switch, 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 };
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ListBoxItemProps as ReactAriaListBoxItemProps } from "react-aria-components";
|
|
2
|
-
import "./ListBoxItem.css";
|
|
3
|
-
export interface ListBoxItemProps extends ReactAriaListBoxItemProps {
|
|
4
|
-
/** Text label for the option. Provide an `id` if this is not unique. */
|
|
5
|
-
label: string;
|
|
6
|
-
/** Descriptive text that appears below the option's label */
|
|
7
|
-
description?: string;
|
|
8
|
-
/** Marks an option visually with red text to indicate a destructive/dangerous option */
|
|
9
|
-
isDestructive?: boolean;
|
|
10
|
-
/** Left icon slot */
|
|
11
|
-
iconLeft?: React.ReactElement;
|
|
12
|
-
/** Right icon slot */
|
|
13
|
-
iconRight?: React.ReactElement;
|
|
14
|
-
}
|
|
15
|
-
export default function ListBoxItem({ id, description, href, label, iconLeft, iconRight, isDestructive, }: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ListBoxItemProps as ReactAriaListBoxItemProps } from "react-aria-components";
|
|
2
|
-
import "./ListBoxItem.css";
|
|
3
|
-
export interface ListBoxItemProps extends ReactAriaListBoxItemProps {
|
|
4
|
-
/** Text label for the option. Provide an `id` if this is not unique. */
|
|
5
|
-
label: string;
|
|
6
|
-
/** Descriptive text that appears below the option's label */
|
|
7
|
-
description?: string;
|
|
8
|
-
/** Marks an option visually with red text to indicate a destructive/dangerous option */
|
|
9
|
-
isDestructive?: boolean;
|
|
10
|
-
/** Left icon slot */
|
|
11
|
-
iconLeft?: React.ReactElement;
|
|
12
|
-
/** Right icon slot */
|
|
13
|
-
iconRight?: React.ReactElement;
|
|
14
|
-
}
|
|
15
|
-
export default function ListBoxItem({ id, description, href, label, iconLeft, iconRight, isDestructive, }: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
|