@bcgov/design-system-react-components 0.1.4 → 0.2.0-pr477
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.map +1 -1
- package/dist/cjs/types/components/Footer/Footer.d.ts +0 -1
- package/dist/cjs/types/components/Form/Form.test.d.ts +1 -0
- package/dist/cjs/types/components/Header/Header.d.ts +2 -2
- package/dist/cjs/types/components/Header/Header.test.d.ts +1 -0
- package/dist/cjs/types/components/InlineAlert/InlineAlert.d.ts +0 -1
- package/dist/cjs/types/components/InlineAlert/InlineAlert.test.d.ts +1 -0
- package/dist/cjs/types/components/Select/Select.d.ts +0 -1
- package/dist/cjs/types/components/Switch/Switch.test.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Footer/Footer.d.ts +0 -1
- package/dist/esm/types/components/Form/Form.test.d.ts +1 -0
- package/dist/esm/types/components/Header/Header.d.ts +2 -2
- package/dist/esm/types/components/Header/Header.test.d.ts +1 -0
- package/dist/esm/types/components/InlineAlert/InlineAlert.d.ts +0 -1
- package/dist/esm/types/components/InlineAlert/InlineAlert.test.d.ts +1 -0
- package/dist/esm/types/components/Select/Select.d.ts +0 -1
- package/dist/esm/types/components/Switch/Switch.test.d.ts +1 -0
- package/dist/index.d.ts +15 -15
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
2
|
import "./Header.css";
|
|
3
3
|
export interface HeaderProps {
|
|
4
4
|
/**
|
|
@@ -26,4 +26,4 @@ export interface HeaderProps {
|
|
|
26
26
|
*/
|
|
27
27
|
titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
|
|
28
28
|
}
|
|
29
|
-
export default function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }:
|
|
29
|
+
export default function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: PropsWithChildren<HeaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -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,16 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React$1 from 'react';
|
|
3
2
|
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
3
|
export { TooltipTrigger } from 'react-aria-components';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
5
|
|
|
6
|
-
interface InlineAlertProps extends React
|
|
6
|
+
interface InlineAlertProps extends React.PropsWithChildren {
|
|
7
7
|
variant?: "info" | "success" | "warning" | "danger";
|
|
8
8
|
title?: string;
|
|
9
9
|
description?: string;
|
|
10
|
-
buttons?: React
|
|
10
|
+
buttons?: React.ReactNode;
|
|
11
11
|
isCloseable?: boolean;
|
|
12
12
|
isIconHidden?: boolean;
|
|
13
|
-
role?: React
|
|
13
|
+
role?: React.AriaRole | undefined;
|
|
14
14
|
onClose?: () => void;
|
|
15
15
|
}
|
|
16
16
|
declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
|
|
@@ -48,7 +48,7 @@ interface HeaderProps {
|
|
|
48
48
|
* router, like a `<Link>`. Defaults to a generic HTML link element like
|
|
49
49
|
* `<a href="/" title="Government of British Columbia">`
|
|
50
50
|
*/
|
|
51
|
-
logoLinkElement?: React
|
|
51
|
+
logoLinkElement?: React.ReactElement;
|
|
52
52
|
/**
|
|
53
53
|
* Image used for the logo. Defaults to an SVG of the Government of B.C. logo.
|
|
54
54
|
*/
|
|
@@ -58,7 +58,7 @@ interface HeaderProps {
|
|
|
58
58
|
* for accessibility for keyboard users, to let them easily skip to main
|
|
59
59
|
* content, navigation, etc.
|
|
60
60
|
*/
|
|
61
|
-
skipLinks?: React
|
|
61
|
+
skipLinks?: React.ReactElement[];
|
|
62
62
|
/**
|
|
63
63
|
* Header title text that appears to the right of the logo.
|
|
64
64
|
*/
|
|
@@ -68,7 +68,7 @@ interface HeaderProps {
|
|
|
68
68
|
*/
|
|
69
69
|
titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
|
|
70
70
|
}
|
|
71
|
-
declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }:
|
|
71
|
+
declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: PropsWithChildren<HeaderProps>): react_jsx_runtime.JSX.Element;
|
|
72
72
|
|
|
73
73
|
interface FooterLinksProps {
|
|
74
74
|
/**
|
|
@@ -78,7 +78,7 @@ interface FooterLinksProps {
|
|
|
78
78
|
/**
|
|
79
79
|
* Array of link elements (`<a>` or `<Link>`)
|
|
80
80
|
*/
|
|
81
|
-
links: React
|
|
81
|
+
links: React.ReactElement[];
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* A titled list of links for use in the Footer. Rendered inside a `<figure>`
|
|
@@ -91,21 +91,21 @@ interface FooterProps {
|
|
|
91
91
|
/**
|
|
92
92
|
* Land acknowledgement block (defaults to Gov.bc.ca land acknowledgement)
|
|
93
93
|
*/
|
|
94
|
-
acknowledgement?: React
|
|
94
|
+
acknowledgement?: React.ReactElement;
|
|
95
95
|
/**
|
|
96
96
|
* Logo slot (defaults to BC Gov horizontal logo)
|
|
97
97
|
*/
|
|
98
|
-
logo?: React
|
|
98
|
+
logo?: React.ReactElement;
|
|
99
99
|
/**
|
|
100
100
|
* Contact information block (defaults to Gov.bc.ca contact information)
|
|
101
101
|
*/
|
|
102
|
-
contact?: React
|
|
102
|
+
contact?: React.ReactElement;
|
|
103
103
|
/**
|
|
104
104
|
* Link list block (defaults to Gov.bc.ca link list).
|
|
105
105
|
*
|
|
106
106
|
* Pass the `<FooterLinks>` component for a styles-included list.
|
|
107
107
|
*/
|
|
108
|
-
links?: React
|
|
108
|
+
links?: React.ReactElement;
|
|
109
109
|
/**
|
|
110
110
|
* Copyright string (defaults to current year)
|
|
111
111
|
*/
|
|
@@ -130,7 +130,7 @@ interface FooterProps {
|
|
|
130
130
|
* @param {FooterProps} props
|
|
131
131
|
* @returns {React.ReactElement}
|
|
132
132
|
*/
|
|
133
|
-
declare function Footer({ children, acknowledgement, logo, contact, links, copyright, hideAcknowledgement, hideLogoAndLinks, hideCopyright, }: React
|
|
133
|
+
declare function Footer({ children, acknowledgement, logo, contact, links, copyright, hideAcknowledgement, hideLogoAndLinks, hideCopyright, }: React.PropsWithChildren<FooterProps>): react_jsx_runtime.JSX.Element;
|
|
134
134
|
|
|
135
135
|
type FormProps = FormProps$1;
|
|
136
136
|
declare function Form({ ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
@@ -143,9 +143,9 @@ interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
|
143
143
|
/** Marks an option visually with red text to indicate a destructive/dangerous option */
|
|
144
144
|
isDestructive?: boolean;
|
|
145
145
|
/** Left icon slot */
|
|
146
|
-
iconLeft?: React
|
|
146
|
+
iconLeft?: React.ReactElement;
|
|
147
147
|
/** Right icon slot */
|
|
148
|
-
iconRight?: React
|
|
148
|
+
iconRight?: React.ReactElement;
|
|
149
149
|
}
|
|
150
150
|
interface SelectionSectionProps {
|
|
151
151
|
id: Key;
|