@bcgov/design-system-react-components 0.5.0 → 0.5.1-pr526
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 +188 -185
- package/dist/cjs/index.cjs +2232 -1968
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Heading/Heading.d.ts +7 -0
- package/dist/cjs/types/components/Heading/index.d.ts +2 -0
- package/dist/cjs/types/components/Link/Link.d.ts +15 -0
- package/dist/cjs/types/components/Link/index.d.ts +2 -0
- package/dist/cjs/types/components/Text/Text.d.ts +8 -0
- package/dist/cjs/types/components/Text/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +3 -0
- package/dist/esm/index.js +2228 -1967
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Heading/Heading.d.ts +7 -0
- package/dist/esm/types/components/Heading/index.d.ts +2 -0
- package/dist/esm/types/components/Link/Link.d.ts +15 -0
- package/dist/esm/types/components/Link/index.d.ts +2 -0
- package/dist/esm/types/components/Text/Text.d.ts +8 -0
- package/dist/esm/types/components/Text/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +3 -0
- package/dist/index.d.ts +28 -2
- package/package.json +86 -86
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HeadingProps as ReactAriaHeadingProps } from "react-aria-components";
|
|
2
|
+
import "./Heading.css";
|
|
3
|
+
export interface HeadingProps extends ReactAriaHeadingProps {
|
|
4
|
+
color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
|
|
5
|
+
isUnstyled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default function Heading({ color, isUnstyled, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LinkProps as ReactAriaLinkProps } from "react-aria-components";
|
|
2
|
+
import "./Link.css";
|
|
3
|
+
import "../Button/Button.css";
|
|
4
|
+
export interface LinkProps extends ReactAriaLinkProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
size?: "small" | "medium" | "large";
|
|
7
|
+
isButton?: boolean;
|
|
8
|
+
buttonVariant?: "primary" | "secondary" | "tertiary";
|
|
9
|
+
ariaLabel?: string | undefined;
|
|
10
|
+
danger?: boolean;
|
|
11
|
+
isUnstyled?: boolean;
|
|
12
|
+
iconLeft?: React.ReactElement;
|
|
13
|
+
iconRight?: React.ReactElement;
|
|
14
|
+
}
|
|
15
|
+
export default function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextProps as ReactAriaTextProps } from "react-aria-components";
|
|
2
|
+
import "./Text.css";
|
|
3
|
+
export interface TextProps extends ReactAriaTextProps {
|
|
4
|
+
size?: "small" | "medium" | "large";
|
|
5
|
+
color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
|
|
6
|
+
isUnstyled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function Text({ elementType, size, color, isUnstyled, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,7 +12,9 @@ export { default as Dialog, DialogTrigger } from "./Dialog";
|
|
|
12
12
|
export { default as Footer, FooterLinks } from "./Footer";
|
|
13
13
|
export { default as Form } from "./Form";
|
|
14
14
|
export { default as Header } from "./Header";
|
|
15
|
+
export { default as Heading } from "./Heading";
|
|
15
16
|
export { default as InlineAlert } from "./InlineAlert";
|
|
17
|
+
export { default as Link } from "./Link";
|
|
16
18
|
export { default as Modal } from "./Modal";
|
|
17
19
|
export { default as Radio } from "./Radio";
|
|
18
20
|
export { default as RadioGroup } from "./RadioGroup";
|
|
@@ -33,6 +35,7 @@ export { default as SvgTooltipArrowUp } from "./Icons/SvgTooltipArrowUp";
|
|
|
33
35
|
export { default as Tag } from "./Tag";
|
|
34
36
|
export { default as TagGroup } from "./TagGroup";
|
|
35
37
|
export { default as TagList } from "./TagList";
|
|
38
|
+
export { default as Text } from "./Text";
|
|
36
39
|
export { default as TextArea } from "./TextArea";
|
|
37
40
|
export { default as TextField } from "./TextField";
|
|
38
41
|
export { default as Switch } from "./Switch";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DisclosureProps, DisclosureGroupProps, 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';
|
|
2
|
+
import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, 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, TextProps as TextProps$1, TextFieldProps as TextFieldProps$1, SwitchProps as SwitchProps$1, TooltipProps } from 'react-aria-components';
|
|
3
3
|
export { DialogTrigger, TooltipTrigger } from 'react-aria-components';
|
|
4
4
|
import { PropsWithChildren } from 'react';
|
|
5
5
|
|
|
@@ -179,6 +179,12 @@ interface HeaderProps {
|
|
|
179
179
|
}
|
|
180
180
|
declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: PropsWithChildren<HeaderProps>): react_jsx_runtime.JSX.Element;
|
|
181
181
|
|
|
182
|
+
interface HeadingProps extends HeadingProps$1 {
|
|
183
|
+
color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
|
|
184
|
+
isUnstyled?: boolean;
|
|
185
|
+
}
|
|
186
|
+
declare function Heading({ color, isUnstyled, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
187
|
+
|
|
182
188
|
interface InlineAlertProps extends React.PropsWithChildren {
|
|
183
189
|
variant?: "info" | "success" | "warning" | "danger";
|
|
184
190
|
title?: string;
|
|
@@ -191,6 +197,19 @@ interface InlineAlertProps extends React.PropsWithChildren {
|
|
|
191
197
|
}
|
|
192
198
|
declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
|
|
193
199
|
|
|
200
|
+
interface LinkProps extends LinkProps$1 {
|
|
201
|
+
children?: React.ReactNode;
|
|
202
|
+
size?: "small" | "medium" | "large";
|
|
203
|
+
isButton?: boolean;
|
|
204
|
+
buttonVariant?: "primary" | "secondary" | "tertiary";
|
|
205
|
+
ariaLabel?: string | undefined;
|
|
206
|
+
danger?: boolean;
|
|
207
|
+
isUnstyled?: boolean;
|
|
208
|
+
iconLeft?: React.ReactElement;
|
|
209
|
+
iconRight?: React.ReactElement;
|
|
210
|
+
}
|
|
211
|
+
declare function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
|
|
194
213
|
declare function Modal({ children, ...props }: ModalOverlayProps): react_jsx_runtime.JSX.Element;
|
|
195
214
|
|
|
196
215
|
declare function Radio({ value, children, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
@@ -341,6 +360,13 @@ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEm
|
|
|
341
360
|
}
|
|
342
361
|
declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
|
|
343
362
|
|
|
363
|
+
interface TextProps extends TextProps$1 {
|
|
364
|
+
size?: "small" | "medium" | "large";
|
|
365
|
+
color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
|
|
366
|
+
isUnstyled?: boolean;
|
|
367
|
+
}
|
|
368
|
+
declare function Text({ elementType, size, color, isUnstyled, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
369
|
+
|
|
344
370
|
interface TextAreaProps extends TextFieldProps$1 {
|
|
345
371
|
label?: string;
|
|
346
372
|
description?: string;
|
|
@@ -365,4 +391,4 @@ declare function Switch({ labelPosition, children, ...props }: SwitchProps): rea
|
|
|
365
391
|
|
|
366
392
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
367
393
|
|
|
368
|
-
export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, Footer, FooterLinks, Form, Header, InlineAlert, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
|
|
394
|
+
export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, Tooltip };
|
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bcgov/design-system-react-components",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
7
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
8
|
-
"storybook-dev": "storybook dev -p 6006",
|
|
9
|
-
"storybook-build": "storybook build",
|
|
10
|
-
"test": "npx jest --config=./jest.config.ts",
|
|
11
|
-
"test:ci": "npx jest --ci --config=./jest.config.ts",
|
|
12
|
-
"test:watch": "npx jest --watch --config=./jest.config.ts",
|
|
13
|
-
"test-storybook": "test-storybook",
|
|
14
|
-
"test-storybook:ci": "test-storybook --maxWorkers=2",
|
|
15
|
-
"vite-dev": "vite",
|
|
16
|
-
"vite-build": "tsc && vite build",
|
|
17
|
-
"vite-preview": "vite preview"
|
|
18
|
-
},
|
|
19
|
-
"main": "dist/cjs/index.cjs",
|
|
20
|
-
"module": "dist/esm/index.js",
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
24
|
-
"types": "dist/index.d.ts",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@bcgov/design-tokens": "3.2.0",
|
|
27
|
-
"react-aria-components": "1.
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"@bcgov/bc-sans": "^2.1.0",
|
|
31
|
-
"react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0",
|
|
32
|
-
"react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@react-stately/data": "3.11.6",
|
|
36
|
-
"@rollup/plugin-commonjs": "26.0.1",
|
|
37
|
-
"@rollup/plugin-json": "6.1.0",
|
|
38
|
-
"@rollup/plugin-node-resolve": "15.2.3",
|
|
39
|
-
"@rollup/plugin-typescript": "11.1.6",
|
|
40
|
-
"@storybook/addon-a11y": "8.
|
|
41
|
-
"@storybook/addon-essentials": "8.
|
|
42
|
-
"@storybook/addon-interactions": "8.
|
|
43
|
-
"@storybook/addon-links": "8.
|
|
44
|
-
"@storybook/blocks": "8.
|
|
45
|
-
"@storybook/react": "8.4.7",
|
|
46
|
-
"@storybook/react-vite": "8.4.7",
|
|
47
|
-
"@storybook/test": "8.4.7",
|
|
48
|
-
"@storybook/test-runner": "0.
|
|
49
|
-
"@testing-library/jest-dom": "6.5.0",
|
|
50
|
-
"@testing-library/react": "16.0.1",
|
|
51
|
-
"@types/jest": "29.5.13",
|
|
52
|
-
"@types/react": "18.3.8",
|
|
53
|
-
"@types/react-dom": "18.3.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "8.6.0",
|
|
55
|
-
"@typescript-eslint/parser": "8.6.0",
|
|
56
|
-
"@vitejs/plugin-react": "4.3.1",
|
|
57
|
-
"axe-playwright": "2.0.2",
|
|
58
|
-
"eslint": "8.57.0",
|
|
59
|
-
"eslint-plugin-react-hooks": "4.6.2",
|
|
60
|
-
"eslint-plugin-react-refresh": "0.4.12",
|
|
61
|
-
"eslint-plugin-storybook": "0.8.0",
|
|
62
|
-
"identity-obj-proxy": "3.0.0",
|
|
63
|
-
"jest": "29.7.0",
|
|
64
|
-
"jest-environment-jsdom": "29.7.0",
|
|
65
|
-
"rollup": "4.
|
|
66
|
-
"rollup-plugin-dts": "6.1.1",
|
|
67
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
-
"rollup-plugin-postcss": "4.0.2",
|
|
69
|
-
"storybook": "8.
|
|
70
|
-
"ts-jest": "29.2.5",
|
|
71
|
-
"ts-node": "10.9.2",
|
|
72
|
-
"tslib": "2.7.0",
|
|
73
|
-
"typescript": "5.6.2",
|
|
74
|
-
"vite": "5.4.
|
|
75
|
-
},
|
|
76
|
-
"optionalDependencies": {
|
|
77
|
-
"@rollup/rollup-linux-x64-gnu": "*"
|
|
78
|
-
},
|
|
79
|
-
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
80
|
-
"license": "Apache-2.0",
|
|
81
|
-
"bugs": {
|
|
82
|
-
"url": "https://github.com/bcgov/design-system/issues"
|
|
83
|
-
},
|
|
84
|
-
"homepage": "https://github.com/bcgov/design-system#readme",
|
|
85
|
-
"private": false
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bcgov/design-system-react-components",
|
|
3
|
+
"version": "0.5.1-pr526",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
7
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
8
|
+
"storybook-dev": "storybook dev -p 6006",
|
|
9
|
+
"storybook-build": "storybook build",
|
|
10
|
+
"test": "npx jest --config=./jest.config.ts",
|
|
11
|
+
"test:ci": "npx jest --ci --config=./jest.config.ts",
|
|
12
|
+
"test:watch": "npx jest --watch --config=./jest.config.ts",
|
|
13
|
+
"test-storybook": "test-storybook",
|
|
14
|
+
"test-storybook:ci": "test-storybook --maxWorkers=2",
|
|
15
|
+
"vite-dev": "vite",
|
|
16
|
+
"vite-build": "tsc && vite build",
|
|
17
|
+
"vite-preview": "vite preview"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/cjs/index.cjs",
|
|
20
|
+
"module": "dist/esm/index.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@bcgov/design-tokens": "3.2.0",
|
|
27
|
+
"react-aria-components": "1.6.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@bcgov/bc-sans": "^2.1.0",
|
|
31
|
+
"react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0",
|
|
32
|
+
"react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@react-stately/data": "3.11.6",
|
|
36
|
+
"@rollup/plugin-commonjs": "26.0.1",
|
|
37
|
+
"@rollup/plugin-json": "6.1.0",
|
|
38
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
39
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
40
|
+
"@storybook/addon-a11y": "8.5.3",
|
|
41
|
+
"@storybook/addon-essentials": "8.5.3",
|
|
42
|
+
"@storybook/addon-interactions": "8.5.3",
|
|
43
|
+
"@storybook/addon-links": "8.5.3",
|
|
44
|
+
"@storybook/blocks": "8.5.3",
|
|
45
|
+
"@storybook/react": "^8.4.7",
|
|
46
|
+
"@storybook/react-vite": "^8.4.7",
|
|
47
|
+
"@storybook/test": "^8.4.7",
|
|
48
|
+
"@storybook/test-runner": "0.21.0",
|
|
49
|
+
"@testing-library/jest-dom": "6.5.0",
|
|
50
|
+
"@testing-library/react": "16.0.1",
|
|
51
|
+
"@types/jest": "29.5.13",
|
|
52
|
+
"@types/react": "18.3.8",
|
|
53
|
+
"@types/react-dom": "18.3.0",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.6.0",
|
|
55
|
+
"@typescript-eslint/parser": "8.6.0",
|
|
56
|
+
"@vitejs/plugin-react": "4.3.1",
|
|
57
|
+
"axe-playwright": "2.0.2",
|
|
58
|
+
"eslint": "8.57.0",
|
|
59
|
+
"eslint-plugin-react-hooks": "4.6.2",
|
|
60
|
+
"eslint-plugin-react-refresh": "0.4.12",
|
|
61
|
+
"eslint-plugin-storybook": "0.8.0",
|
|
62
|
+
"identity-obj-proxy": "3.0.0",
|
|
63
|
+
"jest": "29.7.0",
|
|
64
|
+
"jest-environment-jsdom": "29.7.0",
|
|
65
|
+
"rollup": "4.32.1",
|
|
66
|
+
"rollup-plugin-dts": "6.1.1",
|
|
67
|
+
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
69
|
+
"storybook": "8.5.3",
|
|
70
|
+
"ts-jest": "29.2.5",
|
|
71
|
+
"ts-node": "10.9.2",
|
|
72
|
+
"tslib": "2.7.0",
|
|
73
|
+
"typescript": "5.6.2",
|
|
74
|
+
"vite": "5.4.14"
|
|
75
|
+
},
|
|
76
|
+
"optionalDependencies": {
|
|
77
|
+
"@rollup/rollup-linux-x64-gnu": "*"
|
|
78
|
+
},
|
|
79
|
+
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
80
|
+
"license": "Apache-2.0",
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/bcgov/design-system/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": "https://github.com/bcgov/design-system#readme",
|
|
85
|
+
"private": false
|
|
86
|
+
}
|