@bcgov/design-system-react-components 0.2.4-rc2 → 0.3.0-pr481
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 +18 -18
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/AlertDialog/AlertDialog.d.ts +1 -3
- package/dist/cjs/types/components/AlertDialog/AlertDialog.test.d.ts +1 -0
- package/dist/cjs/types/components/Dialog/Dialog.d.ts +4 -0
- package/dist/cjs/types/components/Dialog/Dialog.test.d.ts +1 -0
- package/dist/cjs/types/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/types/components/Modal/Modal.test.d.ts +1 -0
- package/dist/esm/index.js +18 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AlertDialog/AlertDialog.d.ts +1 -3
- package/dist/esm/types/components/AlertDialog/AlertDialog.test.d.ts +1 -0
- package/dist/esm/types/components/Dialog/Dialog.d.ts +4 -0
- package/dist/esm/types/components/Dialog/Dialog.test.d.ts +1 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +1 -1
- package/dist/esm/types/components/Modal/Modal.test.d.ts +1 -0
- package/dist/index.d.ts +4 -5
- package/package.json +1 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { DialogTrigger, DialogProps as ReactAriaDialogProps } from "react-aria-components";
|
|
2
2
|
import "./AlertDialog.css";
|
|
3
|
-
import React from "react";
|
|
4
3
|
export interface AlertDialogProps extends ReactAriaDialogProps {
|
|
5
4
|
variant?: "info" | "confirmation" | "warning" | "error" | "destructive";
|
|
6
5
|
title?: string;
|
|
7
|
-
description?: string;
|
|
8
6
|
isIconHidden?: boolean;
|
|
9
7
|
isCloseable?: boolean;
|
|
10
8
|
buttons?: React.ReactNode;
|
|
11
9
|
}
|
|
12
|
-
export default function AlertDialog({ variant, role, title, isCloseable, isIconHidden,
|
|
10
|
+
export default function AlertDialog({ children, variant, role, title, isCloseable, isIconHidden, buttons, ...props }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
export { DialogTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -3,5 +3,9 @@ import "./Dialog.css";
|
|
|
3
3
|
export interface DialogProps extends ReactAriaDialogProps {
|
|
4
4
|
isCloseable?: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface DialogRenderProps {
|
|
7
|
+
/** Handler function to close the Dialog */
|
|
8
|
+
close: () => void;
|
|
9
|
+
}
|
|
6
10
|
export default function Dialog({ isCloseable, role, children, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
export { DialogTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ModalOverlayProps } from "react-aria-components";
|
|
2
2
|
import "./Modal.css";
|
|
3
|
-
export default function Modal({ children,
|
|
3
|
+
export default function Modal({ children, ...props }: ModalOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, ModalOverlayProps, 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 { DialogTrigger, TooltipTrigger } from 'react-aria-components';
|
|
4
|
-
import
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
5
|
|
|
6
6
|
interface AlertDialogProps extends DialogProps$1 {
|
|
7
7
|
variant?: "info" | "confirmation" | "warning" | "error" | "destructive";
|
|
8
8
|
title?: string;
|
|
9
|
-
description?: string;
|
|
10
9
|
isIconHidden?: boolean;
|
|
11
10
|
isCloseable?: boolean;
|
|
12
|
-
buttons?: React
|
|
11
|
+
buttons?: React.ReactNode;
|
|
13
12
|
}
|
|
14
|
-
declare function AlertDialog({ variant, role, title, isCloseable, isIconHidden,
|
|
13
|
+
declare function AlertDialog({ children, variant, role, title, isCloseable, isIconHidden, buttons, ...props }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
15
14
|
|
|
16
15
|
interface ButtonProps extends ButtonProps$1 {
|
|
17
16
|
/**
|
|
@@ -161,7 +160,7 @@ interface InlineAlertProps extends React.PropsWithChildren {
|
|
|
161
160
|
}
|
|
162
161
|
declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
|
|
163
162
|
|
|
164
|
-
declare function Modal({ children,
|
|
163
|
+
declare function Modal({ children, ...props }: ModalOverlayProps): react_jsx_runtime.JSX.Element;
|
|
165
164
|
|
|
166
165
|
declare function Radio({ value, children, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
167
166
|
|