@bcgov/design-system-react-components 0.0.1 → 0.0.2
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 +25 -7
- package/dist/cjs/index.cjs +1325 -905
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +9 -0
- package/dist/cjs/types/components/Button/index.d.ts +2 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +1 -4
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/esm/index.js +1326 -907
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +9 -0
- package/dist/esm/types/components/Button/index.d.ts +2 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +1 -4
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/index.d.ts +11 -4
- package/package.json +25 -25
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonProps as ReactAriaButtonProps } from "react-aria-components";
|
|
2
|
+
import "./Button.css";
|
|
3
|
+
export interface ButtonProps extends ReactAriaButtonProps {
|
|
4
|
+
size?: "small" | "medium";
|
|
5
|
+
variant?: "primary" | "secondary" | "tertiary" | "link";
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
isIconButton?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { TagProps as ReactAriaTagProps } from "react-aria-components";
|
|
3
|
-
import "@bcgov/design-tokens/css/variables.css";
|
|
4
|
-
import "@bcgov/bc-sans/css/BC_Sans.css";
|
|
5
3
|
import "./Tag.css";
|
|
6
4
|
export interface TagProps extends ReactAriaTagProps {
|
|
7
|
-
id: Key;
|
|
8
5
|
icon?: React.ReactNode;
|
|
9
6
|
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
10
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
|
|
3
|
+
import { ButtonProps as ButtonProps$1, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1 } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
interface ButtonProps extends ButtonProps$1 {
|
|
6
|
+
size?: "small" | "medium";
|
|
7
|
+
variant?: "primary" | "secondary" | "tertiary" | "link";
|
|
8
|
+
danger?: boolean;
|
|
9
|
+
isIconButton?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function Button({ size, variant, danger, isIconButton, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
4
12
|
|
|
5
13
|
interface TagProps extends TagProps$1 {
|
|
6
|
-
id: Key;
|
|
7
14
|
icon?: React.ReactNode;
|
|
8
15
|
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
9
16
|
}
|
|
@@ -22,4 +29,4 @@ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEm
|
|
|
22
29
|
}
|
|
23
30
|
declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
|
|
24
31
|
|
|
25
|
-
export { Tag, TagGroup, TagList };
|
|
32
|
+
export { Button, Tag, TagGroup, TagList };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcgov/design-system-react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"build-vite": "tsc && vite build",
|
|
6
|
+
"rollup": "rollup -c --bundleConfigAsCjs",
|
|
8
7
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
9
|
-
"
|
|
10
|
-
"storybook": "storybook
|
|
11
|
-
"
|
|
12
|
-
"
|
|
8
|
+
"storybook-dev": "storybook dev -p 6006",
|
|
9
|
+
"storybook-build": "storybook build",
|
|
10
|
+
"vite-dev": "vite",
|
|
11
|
+
"vite-build": "tsc && vite build",
|
|
12
|
+
"vite-preview": "vite preview"
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/cjs/index.cjs",
|
|
15
15
|
"module": "dist/esm/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"types": "dist/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@bcgov/
|
|
22
|
-
"@bcgov/design-tokens": "^1.0.0",
|
|
21
|
+
"@bcgov/design-tokens": "^2.0.0",
|
|
23
22
|
"react-aria-components": "^1.0.0-rc.0"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
25
|
+
"@bcgov/bc-sans": "^2.1.0",
|
|
26
26
|
"react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0",
|
|
27
27
|
"react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
28
28
|
},
|
|
@@ -32,30 +32,30 @@
|
|
|
32
32
|
"@rollup/plugin-json": "^6.0.1",
|
|
33
33
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
34
34
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
35
|
-
"@storybook/addon-essentials": "^7.
|
|
36
|
-
"@storybook/addon-interactions": "^7.
|
|
37
|
-
"@storybook/addon-links": "^7.
|
|
38
|
-
"@storybook/blocks": "^7.
|
|
39
|
-
"@storybook/react": "^7.
|
|
40
|
-
"@storybook/react-vite": "^7.
|
|
35
|
+
"@storybook/addon-essentials": "^7.6.1",
|
|
36
|
+
"@storybook/addon-interactions": "^7.6.1",
|
|
37
|
+
"@storybook/addon-links": "^7.6.1",
|
|
38
|
+
"@storybook/blocks": "^7.6.1",
|
|
39
|
+
"@storybook/react": "^7.6.1",
|
|
40
|
+
"@storybook/react-vite": "^7.6.1",
|
|
41
41
|
"@storybook/testing-library": "^0.2.2",
|
|
42
|
-
"@types/react": "^18.2.
|
|
43
|
-
"@types/react-dom": "^18.2.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
45
|
-
"@typescript-eslint/parser": "^6.
|
|
46
|
-
"@vitejs/plugin-react": "^4.0
|
|
47
|
-
"eslint": "^8.
|
|
42
|
+
"@types/react": "^18.2.39",
|
|
43
|
+
"@types/react-dom": "^18.2.17",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
45
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
46
|
+
"@vitejs/plugin-react": "^4.2.0",
|
|
47
|
+
"eslint": "^8.54.0",
|
|
48
48
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
49
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
50
50
|
"eslint-plugin-storybook": "^0.6.15",
|
|
51
|
-
"rollup": "^4.
|
|
51
|
+
"rollup": "^4.6.0",
|
|
52
52
|
"rollup-plugin-dts": "^6.1.0",
|
|
53
53
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
54
54
|
"rollup-plugin-postcss": "^4.0.2",
|
|
55
|
-
"storybook": "^7.
|
|
55
|
+
"storybook": "^7.6.1",
|
|
56
56
|
"tslib": "^2.6.2",
|
|
57
|
-
"typescript": "^5.
|
|
58
|
-
"vite": "^
|
|
57
|
+
"typescript": "^5.3.2",
|
|
58
|
+
"vite": "^5.0.4"
|
|
59
59
|
},
|
|
60
60
|
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
61
61
|
"license": "Apache-2.0",
|