@bcgov/design-system-react-components 0.0.4 → 0.0.6
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 +10 -6
- package/dist/cjs/index.cjs +559 -18
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +12 -0
- package/dist/cjs/types/components/Footer/Footer.d.ts +63 -0
- package/dist/cjs/types/components/Footer/index.d.ts +2 -0
- package/dist/cjs/types/components/Header/Header.d.ts +19 -1
- package/dist/cjs/types/components/Header/index.d.ts +1 -1
- package/dist/cjs/types/components/SvgBcLogo/SvgBcLogo.d.ts +3 -0
- package/dist/cjs/types/components/SvgBcLogo/index.d.ts +1 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +6 -0
- package/dist/cjs/types/components/TagGroup/TagGroup.d.ts +9 -0
- package/dist/cjs/types/components/TagList/TagList.d.ts +3 -0
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +5 -0
- package/dist/cjs/types/components/Tooltip/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +4 -1
- package/dist/esm/index.js +556 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +12 -0
- package/dist/esm/types/components/Footer/Footer.d.ts +63 -0
- package/dist/esm/types/components/Footer/index.d.ts +2 -0
- package/dist/esm/types/components/Header/Header.d.ts +19 -1
- package/dist/esm/types/components/Header/index.d.ts +1 -1
- package/dist/esm/types/components/SvgBcLogo/SvgBcLogo.d.ts +3 -0
- package/dist/esm/types/components/SvgBcLogo/index.d.ts +1 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +6 -0
- package/dist/esm/types/components/TagGroup/TagGroup.d.ts +9 -0
- package/dist/esm/types/components/TagList/TagList.d.ts +3 -0
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +5 -0
- package/dist/esm/types/components/Tooltip/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +4 -1
- package/dist/index.d.ts +120 -3
- package/package.json +18 -17
- package/dist/assets/BCSans-Bold-ZqE3sZik.woff +0 -0
- package/dist/assets/BCSans-Bold-onJZunl0.woff2 +0 -0
- package/dist/assets/BCSans-BoldItalic-4P_OlA2s.woff +0 -0
- package/dist/assets/BCSans-BoldItalic-GxGpSOWy.woff2 +0 -0
- package/dist/assets/BCSans-Italic-Pz_cGW4F.woff2 +0 -0
- package/dist/assets/BCSans-Italic-UhTyhoET.woff +0 -0
- package/dist/assets/BCSans-Light-A03rbYd1.woff2 +0 -0
- package/dist/assets/BCSans-Light-playkmYo.woff +0 -0
- package/dist/assets/BCSans-LightItalic-HTeW1g69.woff2 +0 -0
- package/dist/assets/BCSans-LightItalic-tgMWPWlK.woff +0 -0
- package/dist/assets/BCSans-Regular-jMf6NRx3.woff +0 -0
- package/dist/assets/BCSans-Regular-ysGfRp0T.woff2 +0 -0
- package/dist/assets/index-t1vEzjyT.css +0 -1
- package/dist/assets/index-yaBoZILt.js +0 -48
- package/dist/cjs/types/components/SelectItem/SelectItem.d.ts +0 -16
- package/dist/cjs/types/components/SelectItem/index.d.ts +0 -2
- package/dist/esm/types/components/SelectItem/SelectItem.d.ts +0 -16
- package/dist/esm/types/components/SelectItem/index.d.ts +0 -2
- package/dist/index.html +0 -14
- package/dist/vite.svg +0 -1
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { ButtonProps as ReactAriaButtonProps } from "react-aria-components";
|
|
2
2
|
import "./Button.css";
|
|
3
3
|
export interface ButtonProps extends ReactAriaButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Defaults to `medium`. `small` is shorter vertically.
|
|
6
|
+
*/
|
|
4
7
|
size?: "small" | "medium";
|
|
8
|
+
/**
|
|
9
|
+
* Defaults to `primary`.
|
|
10
|
+
*/
|
|
5
11
|
variant?: "primary" | "secondary" | "tertiary" | "link";
|
|
12
|
+
/**
|
|
13
|
+
* For destructive/deletion actions.
|
|
14
|
+
*/
|
|
6
15
|
danger?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If true, renders a square button intended for a single icon.
|
|
18
|
+
*/
|
|
7
19
|
isIconButton?: boolean;
|
|
8
20
|
}
|
|
9
21
|
export default function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Footer.css";
|
|
3
|
+
export interface FooterLinksProps {
|
|
4
|
+
/**
|
|
5
|
+
* Title for the list of links - associated to the list of links as a `<figcaption>`
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* Array of link elements (`<a>` or `<Link>`)
|
|
10
|
+
*/
|
|
11
|
+
links: React.ReactElement[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A titled list of links for use in the Footer. Rendered inside a `<figure>`
|
|
15
|
+
* with the `title` prop inside of the `<figcaption>`.
|
|
16
|
+
* @param {FooterLinksProps} props
|
|
17
|
+
* @returns {React.ReactElement}
|
|
18
|
+
*/
|
|
19
|
+
export declare function FooterLinks({ title, links }: FooterLinksProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export interface FooterProps {
|
|
21
|
+
/**
|
|
22
|
+
* Land acknowledgement block (defaults to Gov.bc.ca land acknowledgement)
|
|
23
|
+
*/
|
|
24
|
+
acknowledgement?: React.ReactElement;
|
|
25
|
+
/**
|
|
26
|
+
* Logo slot (defaults to BC Gov horizontal logo)
|
|
27
|
+
*/
|
|
28
|
+
logo?: React.ReactElement;
|
|
29
|
+
/**
|
|
30
|
+
* Contact information block (defaults to Gov.bc.ca contact information)
|
|
31
|
+
*/
|
|
32
|
+
contact?: React.ReactElement;
|
|
33
|
+
/**
|
|
34
|
+
* Link list block (defaults to Gov.bc.ca link list).
|
|
35
|
+
*
|
|
36
|
+
* Pass the `<FooterLinks>` component for a styles-included list.
|
|
37
|
+
*/
|
|
38
|
+
links?: React.ReactElement;
|
|
39
|
+
/**
|
|
40
|
+
* Copyright string (defaults to current year)
|
|
41
|
+
*/
|
|
42
|
+
copyright?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Hide the acknowledgement section
|
|
45
|
+
*/
|
|
46
|
+
hideAcknowledgement?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Hide the logo, contact information, and links section
|
|
49
|
+
*/
|
|
50
|
+
hideLogoAndLinks?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Hide the copyright string
|
|
53
|
+
*/
|
|
54
|
+
hideCopyright?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A `<footer>` element with default content included.
|
|
58
|
+
*
|
|
59
|
+
* Passing `children` replaces `logo`, `contact`, and `links`.
|
|
60
|
+
* @param {FooterProps} props
|
|
61
|
+
* @returns {React.ReactElement}
|
|
62
|
+
*/
|
|
63
|
+
export default function Footer({ children, acknowledgement, logo, contact, links, copyright, hideAcknowledgement, hideLogoAndLinks, hideCopyright, }: React.PropsWithChildren<FooterProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./Header.css";
|
|
3
|
-
export declare function SvgBcLogo(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export interface HeaderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Link element that surrounds the logo. Use what's appropriate for your
|
|
6
|
+
* router, like a `<Link>`. Defaults to a generic HTML link element like
|
|
7
|
+
* `<a href="/" title="Government of British Columbia">`.
|
|
8
|
+
*/
|
|
5
9
|
logoLinkElement?: React.ReactElement;
|
|
10
|
+
/**
|
|
11
|
+
* Image used for the logo. Defaults to an SVG of the Government of B.C. logo.
|
|
12
|
+
*/
|
|
6
13
|
logoImage?: JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Array of link elements that are not visible until they are focused. Used
|
|
16
|
+
* for accessibility for keyboard users, to let them easily skip to main
|
|
17
|
+
* content, navigation, etc.
|
|
18
|
+
*/
|
|
7
19
|
skipLinks?: React.ReactElement[];
|
|
20
|
+
/**
|
|
21
|
+
* Header title text that appears to the right of the logo.
|
|
22
|
+
*/
|
|
8
23
|
title?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Desired element that renders the `title` string. Defaults to `<span>`.
|
|
26
|
+
*/
|
|
9
27
|
titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
|
|
10
28
|
}
|
|
11
29
|
export default function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: React.PropsWithChildren<HeaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from "./Header";
|
|
2
2
|
export type { HeaderProps } from "./Header";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgBcLogo";
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { TagProps as ReactAriaTagProps } from "react-aria-components";
|
|
3
3
|
import "./Tag.css";
|
|
4
4
|
export interface TagProps extends ReactAriaTagProps {
|
|
5
|
+
/**
|
|
6
|
+
* Icon that appears to the left of the `textValue` field
|
|
7
|
+
*/
|
|
5
8
|
icon?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Background color
|
|
11
|
+
*/
|
|
6
12
|
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
7
13
|
}
|
|
8
14
|
export default function Tag({ color, icon, id, textValue }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { TagGroupProps as ReactAriaTagGroupProps } from "react-aria-components";
|
|
2
2
|
import "./TagGroup.css";
|
|
3
3
|
export interface TagGroupProps extends ReactAriaTagGroupProps {
|
|
4
|
+
/**
|
|
5
|
+
* Labels the TagGroup, appears above the tags.
|
|
6
|
+
*/
|
|
4
7
|
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Extended description of the TagGroup, appears below the tags.
|
|
10
|
+
*/
|
|
5
11
|
description?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Error message, appears below the tags and below the optional description.
|
|
14
|
+
*/
|
|
6
15
|
errorMessage?: string;
|
|
7
16
|
}
|
|
8
17
|
export default function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,9 @@ import { TagProps } from "../Tag";
|
|
|
3
3
|
import "./TagList.css";
|
|
4
4
|
export interface TagListProps<T> extends Pick<ReactAriaTagListProps<T>, "children" | "renderEmptyState"> {
|
|
5
5
|
items: TagProps[];
|
|
6
|
+
/**
|
|
7
|
+
* Used to set the `flex-direction` on the TagList.
|
|
8
|
+
*/
|
|
6
9
|
orientation?: "horizontal" | "vertical";
|
|
7
10
|
}
|
|
8
11
|
export default function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipProps, TooltipTrigger } from "react-aria-components";
|
|
3
|
+
import "./Tooltip.css";
|
|
4
|
+
export default function Tooltip({ children, placement, }: React.PropsWithChildren<TooltipProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { TooltipTrigger };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import "@bcgov/design-tokens/css/variables.css";
|
|
2
2
|
export { default as Button } from "./Button";
|
|
3
|
-
export { default as Header
|
|
3
|
+
export { default as Header } from "./Header";
|
|
4
|
+
export { default as Footer, FooterLinks } from "./Footer";
|
|
4
5
|
export { default as Select } from "./Select";
|
|
6
|
+
export { default as SvgBcLogo } from "./SvgBcLogo";
|
|
5
7
|
export { default as Tag } from "./Tag";
|
|
6
8
|
export { default as TagGroup } from "./TagGroup";
|
|
7
9
|
export { default as TagList } from "./TagList";
|
|
10
|
+
export { default as Tooltip, TooltipTrigger } from "./Tooltip";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,119 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { ButtonProps as ButtonProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1 } from 'react-aria-components';
|
|
3
|
+
import { ButtonProps as ButtonProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TooltipProps } from 'react-aria-components';
|
|
4
|
+
export { TooltipTrigger } from 'react-aria-components';
|
|
4
5
|
import React$1 from 'react';
|
|
5
6
|
|
|
6
7
|
interface ButtonProps extends ButtonProps$1 {
|
|
8
|
+
/**
|
|
9
|
+
* Defaults to `medium`. `small` is shorter vertically.
|
|
10
|
+
*/
|
|
7
11
|
size?: "small" | "medium";
|
|
12
|
+
/**
|
|
13
|
+
* Defaults to `primary`.
|
|
14
|
+
*/
|
|
8
15
|
variant?: "primary" | "secondary" | "tertiary" | "link";
|
|
16
|
+
/**
|
|
17
|
+
* For destructive/deletion actions.
|
|
18
|
+
*/
|
|
9
19
|
danger?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If true, renders a square button intended for a single icon.
|
|
22
|
+
*/
|
|
10
23
|
isIconButton?: boolean;
|
|
11
24
|
}
|
|
12
25
|
declare function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
13
26
|
|
|
14
|
-
declare function SvgBcLogo(): react_jsx_runtime.JSX.Element;
|
|
15
27
|
interface HeaderProps {
|
|
28
|
+
/**
|
|
29
|
+
* Link element that surrounds the logo. Use what's appropriate for your
|
|
30
|
+
* router, like a `<Link>`. Defaults to a generic HTML link element like
|
|
31
|
+
* `<a href="/" title="Government of British Columbia">`.
|
|
32
|
+
*/
|
|
16
33
|
logoLinkElement?: React$1.ReactElement;
|
|
34
|
+
/**
|
|
35
|
+
* Image used for the logo. Defaults to an SVG of the Government of B.C. logo.
|
|
36
|
+
*/
|
|
17
37
|
logoImage?: JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Array of link elements that are not visible until they are focused. Used
|
|
40
|
+
* for accessibility for keyboard users, to let them easily skip to main
|
|
41
|
+
* content, navigation, etc.
|
|
42
|
+
*/
|
|
18
43
|
skipLinks?: React$1.ReactElement[];
|
|
44
|
+
/**
|
|
45
|
+
* Header title text that appears to the right of the logo.
|
|
46
|
+
*/
|
|
19
47
|
title?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Desired element that renders the `title` string. Defaults to `<span>`.
|
|
50
|
+
*/
|
|
20
51
|
titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
|
|
21
52
|
}
|
|
22
53
|
declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: React$1.PropsWithChildren<HeaderProps>): react_jsx_runtime.JSX.Element;
|
|
23
54
|
|
|
55
|
+
interface FooterLinksProps {
|
|
56
|
+
/**
|
|
57
|
+
* Title for the list of links - associated to the list of links as a `<figcaption>`
|
|
58
|
+
*/
|
|
59
|
+
title: string;
|
|
60
|
+
/**
|
|
61
|
+
* Array of link elements (`<a>` or `<Link>`)
|
|
62
|
+
*/
|
|
63
|
+
links: React$1.ReactElement[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A titled list of links for use in the Footer. Rendered inside a `<figure>`
|
|
67
|
+
* with the `title` prop inside of the `<figcaption>`.
|
|
68
|
+
* @param {FooterLinksProps} props
|
|
69
|
+
* @returns {React.ReactElement}
|
|
70
|
+
*/
|
|
71
|
+
declare function FooterLinks({ title, links }: FooterLinksProps): react_jsx_runtime.JSX.Element;
|
|
72
|
+
interface FooterProps {
|
|
73
|
+
/**
|
|
74
|
+
* Land acknowledgement block (defaults to Gov.bc.ca land acknowledgement)
|
|
75
|
+
*/
|
|
76
|
+
acknowledgement?: React$1.ReactElement;
|
|
77
|
+
/**
|
|
78
|
+
* Logo slot (defaults to BC Gov horizontal logo)
|
|
79
|
+
*/
|
|
80
|
+
logo?: React$1.ReactElement;
|
|
81
|
+
/**
|
|
82
|
+
* Contact information block (defaults to Gov.bc.ca contact information)
|
|
83
|
+
*/
|
|
84
|
+
contact?: React$1.ReactElement;
|
|
85
|
+
/**
|
|
86
|
+
* Link list block (defaults to Gov.bc.ca link list).
|
|
87
|
+
*
|
|
88
|
+
* Pass the `<FooterLinks>` component for a styles-included list.
|
|
89
|
+
*/
|
|
90
|
+
links?: React$1.ReactElement;
|
|
91
|
+
/**
|
|
92
|
+
* Copyright string (defaults to current year)
|
|
93
|
+
*/
|
|
94
|
+
copyright?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Hide the acknowledgement section
|
|
97
|
+
*/
|
|
98
|
+
hideAcknowledgement?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Hide the logo, contact information, and links section
|
|
101
|
+
*/
|
|
102
|
+
hideLogoAndLinks?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Hide the copyright string
|
|
105
|
+
*/
|
|
106
|
+
hideCopyright?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* A `<footer>` element with default content included.
|
|
110
|
+
*
|
|
111
|
+
* Passing `children` replaces `logo`, `contact`, and `links`.
|
|
112
|
+
* @param {FooterProps} props
|
|
113
|
+
* @returns {React.ReactElement}
|
|
114
|
+
*/
|
|
115
|
+
declare function Footer({ children, acknowledgement, logo, contact, links, copyright, hideAcknowledgement, hideLogoAndLinks, hideCopyright, }: React$1.PropsWithChildren<FooterProps>): react_jsx_runtime.JSX.Element;
|
|
116
|
+
|
|
24
117
|
interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
25
118
|
/** Text label for the option. Provide an `id` if this is not unique. */
|
|
26
119
|
label: string;
|
|
@@ -55,23 +148,47 @@ interface SelectProps<T extends object> extends SelectProps$1<T> {
|
|
|
55
148
|
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
56
149
|
declare function Select<T extends object>({ items, sections, label, placeholder, size, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
57
150
|
|
|
151
|
+
declare function SvgBcLogo({ id }: {
|
|
152
|
+
id?: string | undefined;
|
|
153
|
+
}): react_jsx_runtime.JSX.Element;
|
|
154
|
+
|
|
58
155
|
interface TagProps extends TagProps$1 {
|
|
156
|
+
/**
|
|
157
|
+
* Icon that appears to the left of the `textValue` field
|
|
158
|
+
*/
|
|
59
159
|
icon?: React.ReactNode;
|
|
160
|
+
/**
|
|
161
|
+
* Background color
|
|
162
|
+
*/
|
|
60
163
|
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
61
164
|
}
|
|
62
165
|
declare function Tag({ color, icon, id, textValue }: TagProps): react_jsx_runtime.JSX.Element;
|
|
63
166
|
|
|
64
167
|
interface TagGroupProps extends TagGroupProps$1 {
|
|
168
|
+
/**
|
|
169
|
+
* Labels the TagGroup, appears above the tags.
|
|
170
|
+
*/
|
|
65
171
|
label?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Extended description of the TagGroup, appears below the tags.
|
|
174
|
+
*/
|
|
66
175
|
description?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Error message, appears below the tags and below the optional description.
|
|
178
|
+
*/
|
|
67
179
|
errorMessage?: string;
|
|
68
180
|
}
|
|
69
181
|
declare function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps): react_jsx_runtime.JSX.Element;
|
|
70
182
|
|
|
71
183
|
interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEmptyState"> {
|
|
72
184
|
items: TagProps[];
|
|
185
|
+
/**
|
|
186
|
+
* Used to set the `flex-direction` on the TagList.
|
|
187
|
+
*/
|
|
73
188
|
orientation?: "horizontal" | "vertical";
|
|
74
189
|
}
|
|
75
190
|
declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
|
|
76
191
|
|
|
77
|
-
|
|
192
|
+
declare function Tooltip({ children, placement, }: React$1.PropsWithChildren<TooltipProps>): react_jsx_runtime.JSX.Element;
|
|
193
|
+
|
|
194
|
+
export { Button, Footer, FooterLinks, Header, Select, SvgBcLogo, Tag, TagGroup, TagList, Tooltip };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcgov/design-system-react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"rollup": "rollup -c --bundleConfigAsCjs",
|
|
6
|
+
"rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
7
7
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
8
8
|
"storybook-dev": "storybook dev -p 6006",
|
|
9
9
|
"storybook-build": "storybook build",
|
|
@@ -32,30 +32,31 @@
|
|
|
32
32
|
"@rollup/plugin-json": "^6.1.0",
|
|
33
33
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
34
34
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
35
|
-
"@storybook/addon-
|
|
36
|
-
"@storybook/addon-
|
|
37
|
-
"@storybook/addon-
|
|
38
|
-
"@storybook/
|
|
39
|
-
"@storybook/
|
|
40
|
-
"@storybook/react
|
|
35
|
+
"@storybook/addon-a11y": "^8.0.2",
|
|
36
|
+
"@storybook/addon-essentials": "^8.0.2",
|
|
37
|
+
"@storybook/addon-interactions": "^8.0.2",
|
|
38
|
+
"@storybook/addon-links": "^8.0.2",
|
|
39
|
+
"@storybook/blocks": "^8.0.2",
|
|
40
|
+
"@storybook/react": "^8.0.2",
|
|
41
|
+
"@storybook/react-vite": "^8.0.2",
|
|
41
42
|
"@storybook/testing-library": "^0.2.2",
|
|
42
|
-
"@types/react": "^18.2.
|
|
43
|
-
"@types/react-dom": "^18.2.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
45
|
-
"@typescript-eslint/parser": "^7.
|
|
43
|
+
"@types/react": "^18.2.67",
|
|
44
|
+
"@types/react-dom": "^18.2.22",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
46
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
46
47
|
"@vitejs/plugin-react": "^4.2.1",
|
|
47
48
|
"eslint": "^8.57.0",
|
|
48
49
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
50
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
51
|
"eslint-plugin-storybook": "^0.8.0",
|
|
51
|
-
"rollup": "^4.
|
|
52
|
+
"rollup": "^4.13.0",
|
|
52
53
|
"rollup-plugin-dts": "^6.1.0",
|
|
53
54
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
54
55
|
"rollup-plugin-postcss": "^4.0.2",
|
|
55
|
-
"storybook": "^8.0.
|
|
56
|
+
"storybook": "^8.0.2",
|
|
56
57
|
"tslib": "^2.6.2",
|
|
57
|
-
"typescript": "^5.4.
|
|
58
|
-
"vite": "^5.
|
|
58
|
+
"typescript": "^5.4.3",
|
|
59
|
+
"vite": "^5.2.2"
|
|
59
60
|
},
|
|
60
61
|
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
61
62
|
"license": "Apache-2.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#root{max-width:1280px;margin:0 auto;padding:2rem}h1,h2,h3,h4,h5,h6{font-family:var(--typography-font-families-bc-sans)}:root{--surface-opacity-0: 0;--surface-opacity-10: .1;--surface-opacity-20: .2;--surface-opacity-30: .3;--surface-opacity-40: .4;--surface-opacity-50: .5;--surface-opacity-60: .6;--surface-opacity-70: .7;--surface-opacity-80: .8;--surface-opacity-90: .9;--surface-opacity-100: 1;--surface-primary-default: #013366;--surface-primary-hover: #1E5189;--surface-primary-disabled: #edebe9;--surface-primary-active: #2E5DD7;--surface-secondary-default: #ffffff;--surface-secondary-hover: #edebe9;--surface-secondary-disabled: #edebe9;--surface-secondary-active: #2E5DD7;--surface-tertiary-default: #ffffff00;--surface-tertiary-hover: #eceae8;--surface-tertiary-disabled: #edebe9;--surface-tertiary-active: #2E5DD7;--surface-danger-default: #ce3e39;--surface-danger-hover: #a2312d;--surface-danger-active: #2E5DD7;--surface-danger-disabled: #edebe9;--surface-background-white: #ffffff;--surface-background-light: #faf9f8;--surface-border-light: #d8d8d8;--surface-border-medium: #898785;--surface-border-dark: #353433;--surface-overlay-default: #00000073;--surface-brand-gold-10: #fff8e9;--surface-brand-gold-20: #feebc2;--surface-brand-gold-30: #fddf9d;--surface-brand-gold-40: #fdd47b;--surface-brand-gold-50: #fcc85d;--surface-brand-gold-60: #f8ba47;--surface-brand-gold-70: #ce9737;--surface-brand-gold-80: #a5792b;--surface-brand-gold-90: #7e5d21;--surface-brand-gold-100: #584215;--surface-brand-blue-10: #f1f8fe;--surface-brand-blue-20: #d8eafd;--surface-brand-blue-30: #c1ddfc;--surface-brand-blue-40: #a8d0fb;--surface-brand-blue-50: #91c4fa;--surface-brand-blue-60: #7ab8f9;--surface-brand-blue-70: #5595d9;--surface-brand-blue-80: #3470b1;--surface-brand-blue-90: #1e5189;--surface-brand-blue-100: #053662;--surface-brand-gray-10: #faf9f8;--surface-brand-gray-20: #f3f2f1;--surface-brand-gray-30: #eceae8;--surface-brand-gray-40: #e0dedc;--surface-brand-gray-50: #d1cfcd;--surface-brand-gray-60: #c6c5c3;--surface-brand-gray-70: #9f9d9c;--surface-brand-gray-80: #605e5c;--surface-brand-gray-90: #3d3c3b;--surface-brand-gray-100: #353433;--surface-brand-gray-110: #252423;--surface-brand-gray-white: #ffffff;--surface-icons-primary: #2d2d2d;--surface-icons-secondary: #474543;--surface-icons-disabled: #9f9d9c;--surface-icons-link: #255a90;--surface-icons-info: #053662;--surface-icons-danger: #ce3e39;--surface-icons-success: #42814a;--surface-icons-warning: #f8bb47;--surface-support-surface-color-info: #f7f9fc;--surface-support-surface-color-danger: #f4e1e2;--surface-support-surface-color-success: #f6fff8;--surface-support-surface-color-warning: #fef1d8;--surface-support-border-color-info: #053662;--surface-support-border-color-danger: #ce3e39;--surface-support-border-color-success: #42814a;--surface-support-border-color-warning: #f8bb47;--surface-shadow-none: 0 .30000001192092896px .8999999761581421px 0 #0000001a, 0 1.600000023841858px 3.5999999046325684px 0 #00000021;--surface-shadow-small: 0 .6000000238418579px 1.7999999523162842px 0 #0000001a, 0 3.200000047683716px 7.199999809265137px 0 #00000021;--surface-shadow-medium: 0 1.2000000476837158px 3.5999999046325684px 0 #0000001a, 0 6.400000095367432px 14.399999618530273px 0 #00000021;--surface-shadow-large: 0 4.800000190734863px 14.399999618530273px 0 #0000002e, 0 25.600000381469727px 57.599998474121094px 0 #00000038;--surface-border-radius-none: 0;--surface-border-radius-small: 2px;--surface-border-radius-medium: 4px;--surface-border-radius-large: 6px;--surface-border-width-none: 0;--surface-border-width-small: 1px;--surface-border-width-medium: 2px;--surface-border-width-large: 4px;--surface-size-small: 0px 8px;--surface-size-medium: 6px 16px;--support-support-surface-color-info: #f7f9fc;--support-support-surface-color-danger: #f4e1e2;--support-support-surface-color-success: #f6fff8;--support-support-surface-color-warning: #fef1d8;--support-support-border-color-info: #053662;--support-support-border-color-danger: #ce3e39;--support-support-border-color-success: #42814a;--support-support-border-color-warning: #f8bb47;--icons-icons-primary: #2d2d2d;--icons-icons-secondary: #474543;--icons-icons-disabled: #9f9d9c;--icons-icons-link: #255a90;--icons-icons-info: #053662;--icons-icons-danger: #ce3e39;--icons-icons-success: #42814a;--icons-icons-warning: #f8bb47;--icons-icons-primary-invert: #ffffff;--icons-size-xsmall: 14px;--icons-size-small: 16px;--icons-size-medium: 20px;--icons-size-large: 24px;--icons-size-xlarge: 32px;--layout-border-width-none: 0;--layout-border-width-small: 1px;--layout-border-width-medium: 2px;--layout-border-width-large: 4px;--layout-padding-none: 0;--layout-padding-xsmall: 4px;--layout-padding-small: 8px;--layout-padding-medium: 16px;--layout-padding-large: 24px;--layout-padding-xlarge: 32px;--layout-margin-none: 0;--layout-margin-hair: 2px;--layout-margin-xsmall: 4px;--layout-margin-small: 8px;--layout-margin-medium: 16px;--layout-margin-large: 24px;--layout-margin-xlarge: 32px;--layout-margin-xxlarge: 40px;--layout-margin-xxxlarge: 48px;--layout-margin-huge: 56px;--typography-font-families-bc-sans: "BC Sans";--typography-line-heights-xxdense: 1.313rem;--typography-line-heights-xdense: 1.688rem;--typography-line-heights-dense: 1.913rem;--typography-line-heights-regular: 2.125rem;--typography-line-heights-sparse: 2.25rem;--typography-line-heights-xsparse: 3rem;--typography-line-heights-xxsparse: 3.375rem;--typography-line-heights-auto: AUTO;--typography-font-weights-regular: 400;--typography-font-weights-bold: 700;--typography-font-weights-italic: Italic;--typography-font-size-label: .875rem;--typography-font-size-body: 1rem;--typography-font-size-large-body: 1.125rem;--typography-font-size-h5: 1.25rem;--typography-font-size-h4: 1.5rem;--typography-font-size-h3: 1.75rem;--typography-font-size-h2: 2rem;--typography-font-size-h1: 2.25rem;--typography-font-size-display: 3rem;--typography-letter-spacing-0: 0em;--typography-paragraph-spacing-0: 0;--typography-regular-label: 400 .875rem/1.313rem "BC Sans";--typography-regular-body: 400 1rem/1.688rem "BC Sans";--typography-regular-large-body: 400 1.125rem/1.913rem "BC Sans";--typography-regular-h5: 400 1.25rem/2.125rem "BC Sans";--typography-regular-h4: 400 1.5rem/2.25rem "BC Sans";--typography-regular-h3: 400 1.75rem/3rem "BC Sans";--typography-regular-h2: 400 2rem/3.375rem "BC Sans";--typography-regular-h1: 400 2.25rem/3rem "BC Sans";--typography-regular-display: 400 3rem/AUTO "BC Sans";--typography-bold-label: 700 .875rem/1.313rem "BC Sans";--typography-bold-body: 700 1rem/1.688rem "BC Sans";--typography-bold-large-body: 700 1.125rem/1.913rem "BC Sans";--typography-bold-h5: 700 1.25rem/2.125rem "BC Sans";--typography-bold-h4: 700 1.5rem/2.25rem "BC Sans";--typography-bold-h3: 700 1.75rem/3.375rem "BC Sans";--typography-bold-h2: 700 2rem/3rem "BC Sans";--typography-bold-h1: 700 2.25rem/AUTO "BC Sans";--typography-bold-display: 700 3rem/AUTO "BC Sans";--typography-italic-label: 400 italic .875rem/1.313rem "BC Sans";--typography-italic-body: 400 italic 1rem/1.688rem "BC Sans";--typography-italic-large-body: 400 italic 1.125rem/1.913rem "BC Sans";--typography-italic-h5: 400 italic 1.25rem/2.125rem "BC Sans";--typography-italic-h4: 400 italic 1.5rem/2.25rem "BC Sans";--typography-italic-h3: 400 italic 1.75rem/3.375rem "BC Sans";--typography-italic-h2: 400 italic 2rem/3.375rem "BC Sans";--typography-italic-h1: 400 italic 2.25rem/3rem "BC Sans";--typography-italic-display: 400 italic 3rem/AUTO "BC Sans";--typography-text-case-none: none;--typography-text-decoration-none: none;--typography-paragraph-indent-0: 0px;--typography-color-primary: #2D2D2D;--typography-color-secondary: #474543;--typography-color-disabled: #9F9D9C;--typography-color-link: #255A90;--typography-color-primary-invert: #FFFFFF;--typography-color-secondary-invert: #ECEAE8}@font-face{font-family:BC Sans;font-style:normal;font-weight:400;src:url(/assets/BCSans-Regular-ysGfRp0T.woff2) format("woff2"),url(/assets/BCSans-Regular-jMf6NRx3.woff) format("woff")}@font-face{font-family:BC Sans;font-style:italic;font-weight:400;src:url(/assets/BCSans-Italic-Pz_cGW4F.woff2) format("woff2"),url(/assets/BCSans-Italic-UhTyhoET.woff) format("woff")}@font-face{font-family:BC Sans;font-style:normal;font-weight:700;src:url(/assets/BCSans-Bold-onJZunl0.woff2) format("woff2"),url(/assets/BCSans-Bold-ZqE3sZik.woff) format("woff")}@font-face{font-family:BC Sans;font-style:italic;font-weight:700;src:url(/assets/BCSans-BoldItalic-GxGpSOWy.woff2) format("woff2"),url(/assets/BCSans-BoldItalic-4P_OlA2s.woff) format("woff")}@font-face{font-family:BC Sans;font-style:normal;font-weight:300;src:url(/assets/BCSans-Light-A03rbYd1.woff2) format("woff2"),url(/assets/BCSans-Light-playkmYo.woff) format("woff")}@font-face{font-family:BC Sans;font-style:italic;font-weight:300;src:url(/assets/BCSans-LightItalic-HTeW1g69.woff2) format("woff2"),url(/assets/BCSans-LightItalic-tgMWPWlK.woff) format("woff")}.react-aria-Button{border:none;border-radius:var(--layout-border-radius-medium, 4px);cursor:pointer;display:inline-flex;align-items:center;gap:var(--layout-padding-small);font:var(--typography-regular-body);padding-left:16px;padding-right:16px}.react-aria-Button[data-disabled]{cursor:not-allowed}.react-aria-Button[data-focused]{outline:2px solid var(--surface-primary-active)}.react-aria-Button.icon{align-items:center;justify-content:space-around}.react-aria-Button.small{min-height:32px}.react-aria-Button.small.icon{padding:unset;height:32px;width:32px}.react-aria-Button.medium{min-height:40px}.react-aria-Button.medium.icon{padding:unset;height:40px;width:40px}.react-aria-Button.primary{background:var(--surface-primary-default);color:var(--typography-color-primary-invert)}.react-aria-Button.primary.danger{background-color:var(--surface-danger-default)}.react-aria-Button.primary[data-disabled]{background-color:var(--surface-primary-disabled);color:var(--typography-color-disabled)}.react-aria-Button.primary[data-hovered]{background-color:var(--surface-primary-hover)}.react-aria-Button.primary.danger[data-hovered]{background-color:var(--surface-danger-hover)}.react-aria-Button.secondary{background-color:var(--surface-secondary-default);border:1px solid var(--surface-border-dark);color:var(--typography-color-primary)}.react-aria-Button.secondary.danger{border-color:var(--surface-support-border-color-danger);color:var(--surface-danger-default)}.react-aria-Button.secondary[data-disabled]{background-color:var(--surface-primary-disabled);border-color:var(--surface-border-light);color:var(--typography-color-disabled)}.react-aria-Button.secondary[data-hovered]{background-color:var(--surface-secondary-hover)}.react-aria-Button.secondary.danger[data-hovered]{background-color:var(--surface-support-surface-color-danger)}.react-aria-Button.tertiary{background-color:var(--surface-tertiary-default);color:var(--typography-color-primary)}.react-aria-Button.tertiary.danger{color:var(--surface-danger-default)}.react-aria-Button.tertiary[data-disabled]{background-color:var(--surface-tertiary-default);color:var(--typography-color-disabled)}.react-aria-Button.tertiary[data-hovered]{background-color:var(--surface-tertiary-hover)}.react-aria-Button.tertiary.danger[data-hovered]{background-color:var(--surface-support-surface-color-danger)}.react-aria-Button.link{background-color:var(--surface-tertiary-default);color:var(--typography-color-link);text-decoration:underline;text-underline-offset:.3em}.react-aria-Button.link.danger{color:var(--surface-danger-default)}.react-aria-Button.link[data-disabled]{color:var(--typography-color-disabled)}.react-aria-TagGroup{color:var(--typography-color-primary, #2d2d2d);font:var(--typography-regular-label, 400 .875rem/1.313rem "BC Sans")}.react-aria-Label,.react-aria-Text{display:block;margin:var(--layout-margin-small) var(--layout-margin-none)}.react-aria-Text.error{color:var(--surface-danger-default, #ce3e39)}.react-aria-Tag{color:var(--typography-color-primary, #2d2d2d);cursor:pointer;border-radius:var(--layout-margin-hair, 2px);border:1px solid;box-sizing:content-box;font:var(--typography-regular-label, 400 .875rem/1.313rem "BC Sans");padding:2px 8px;width:fit-content}.react-aria-Tag__contents{display:flex;align-items:center;gap:8px}.react-aria-Tag__contents .react-aria-Button{background:none;border:none;color:var(--typography-color-primary, #2d2d2d);cursor:pointer;display:flex;margin:0;padding:0}.react-aria-Tag.bc-blue{background-color:var(--surface-color-primary-default, #013366);border-color:var(--surface-color-primary-hover, #1e5189);color:var(--typography-color-primary-invert, #ffffff)}.react-aria-Tag.bc-blue .react-aria-Tag__contents>.react-aria-Button{color:var(--typography-color-primary-invert, #ffffff)}.react-aria-Tag.bc-gold{background-color:var(--surface-color-brand-gold-60, #f8ba47);border-color:var(--surface-color-primary-hover, #1e5189)}.react-aria-Tag.blue{background-color:var(--surface-support-surface-color-info, #f7f9fc);border-color:var(--surface-support-border-color-info, #053662)}.react-aria-Tag.dark{border-color:var(--surface-primary-hover, #1e5189);background:var(--surface-brand-gray-110, #252423);color:var(--typography-color-primary-invert, #ffffff)}.react-aria-Tag.dark .react-aria-Tag__contents>.react-aria-Button{color:var(--typography-color-primary-invert, #ffffff)}.react-aria-Tag.gray,.react-aria-Tag.grey{background-color:var(--surface-brand-gray-20, #f3f2f1);border-color:var(--surface-border-dark, #353433)}.react-aria-Tag.green{background-color:var(--surface-support-surface-color-success, #f6fff8);border-color:var(--surface-support-border-color-success, #42814a)}.react-aria-Tag.red{background-color:var(--surface-support-surface-color-danger, #f4e1e2);border-color:var(--surface-support-border-color-danger, #ce3e39)}.react-aria-Tag.yellow{background-color:var(--surface-support-surface-color-warning, #fef1d8);border-color:var(--surface-support-border-color-warning, #f8bb47)}.react-aria-Tag[data-selected]{border:2px solid var(--surface-primary-active, #2e5dd7);padding:1px 7px}.react-aria-Tag[data-focused]{outline:4px solid #3b99fc;outline-offset:1px}.react-aria-Tag[data-disabled]{background-color:var(--surface-primary-disabled, #edebe9);border-color:var(--surface-border-light, #d8d8d8);color:var(--typography-color-disabled, #9f9d9c);cursor:not-allowed}.react-aria-TagList{display:flex;flex-wrap:wrap;gap:var(--layout-padding-small);width:fit-content}.horizontal{flex-direction:row}.vertical{flex-direction:column}
|