@bcgov/design-system-react-components 0.2.4-rc3 → 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 +16 -16
- 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.test.d.ts +1 -0
- package/dist/esm/index.js +16 -16
- 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.test.d.ts +1 -0
- package/dist/index.d.ts +3 -4
- package/package.json +1 -1
- package/dist/cjs/types/components/ModalOverlay/ModalOverlay.d.ts +0 -3
- package/dist/cjs/types/components/ModalOverlay/index.d.ts +0 -2
- package/dist/esm/types/components/ModalOverlay/ModalOverlay.d.ts +0 -3
- package/dist/esm/types/components/ModalOverlay/index.d.ts +0 -2
|
@@ -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";
|
|
@@ -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
|
/**
|
package/package.json
CHANGED