@bcgov/design-system-react-components 0.0.1
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 +73 -0
- package/dist/cjs/index.cjs +8074 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +11 -0
- package/dist/cjs/types/components/Tag/index.d.ts +2 -0
- package/dist/cjs/types/components/TagGroup/TagGroup.d.ts +8 -0
- package/dist/cjs/types/components/TagGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/TagList/TagList.d.ts +8 -0
- package/dist/cjs/types/components/TagList/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +3 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +8070 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +11 -0
- package/dist/esm/types/components/Tag/index.d.ts +2 -0
- package/dist/esm/types/components/TagGroup/TagGroup.d.ts +8 -0
- package/dist/esm/types/components/TagGroup/index.d.ts +2 -0
- package/dist/esm/types/components/TagList/TagList.d.ts +8 -0
- package/dist/esm/types/components/TagList/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +3 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +25 -0
- package/package.json +67 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Key } from "react";
|
|
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
|
+
import "./Tag.css";
|
|
6
|
+
export interface TagProps extends ReactAriaTagProps {
|
|
7
|
+
id: Key;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
10
|
+
}
|
|
11
|
+
export default function Tag({ className, color, icon, id, textValue, }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TagGroupProps as ReactAriaTagGroupProps } from "react-aria-components";
|
|
2
|
+
import "./TagGroup.css";
|
|
3
|
+
export interface TagGroupProps extends ReactAriaTagGroupProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
}
|
|
8
|
+
export default function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TagListProps as ReactAriaTagListProps } from "react-aria-components";
|
|
2
|
+
import { TagProps } from "../Tag";
|
|
3
|
+
import "./TagList.css";
|
|
4
|
+
export interface TagListProps<T> extends Pick<ReactAriaTagListProps<T>, "children" | "renderEmptyState"> {
|
|
5
|
+
items: TagProps[];
|
|
6
|
+
orientation?: "horizontal" | "vertical";
|
|
7
|
+
}
|
|
8
|
+
export default function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Key } from 'react';
|
|
3
|
+
import { TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1 } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
interface TagProps extends TagProps$1 {
|
|
6
|
+
id: Key;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
9
|
+
}
|
|
10
|
+
declare function Tag({ className, color, icon, id, textValue, }: TagProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
interface TagGroupProps extends TagGroupProps$1 {
|
|
13
|
+
label?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
}
|
|
17
|
+
declare function TagGroup({ children, label, description, errorMessage, ...props }: TagGroupProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEmptyState"> {
|
|
20
|
+
items: TagProps[];
|
|
21
|
+
orientation?: "horizontal" | "vertical";
|
|
22
|
+
}
|
|
23
|
+
declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { Tag, TagGroup, TagList };
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bcgov/design-system-react-components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"vite": "vite",
|
|
7
|
+
"build-vite": "tsc && vite build",
|
|
8
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build",
|
|
12
|
+
"rollup": "rollup -c --bundleConfigAsCjs"
|
|
13
|
+
},
|
|
14
|
+
"main": "dist/cjs/index.cjs",
|
|
15
|
+
"module": "dist/esm/index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@bcgov/bc-sans": "^2.1.0",
|
|
22
|
+
"@bcgov/design-tokens": "^1.0.0",
|
|
23
|
+
"react-aria-components": "^1.0.0-rc.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0",
|
|
27
|
+
"react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@react-stately/data": "^3.10.3",
|
|
31
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
32
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
33
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
34
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
35
|
+
"@storybook/addon-essentials": "^7.5.3",
|
|
36
|
+
"@storybook/addon-interactions": "^7.5.3",
|
|
37
|
+
"@storybook/addon-links": "^7.5.3",
|
|
38
|
+
"@storybook/blocks": "^7.5.3",
|
|
39
|
+
"@storybook/react": "^7.5.3",
|
|
40
|
+
"@storybook/react-vite": "^7.5.3",
|
|
41
|
+
"@storybook/testing-library": "^0.2.2",
|
|
42
|
+
"@types/react": "^18.2.15",
|
|
43
|
+
"@types/react-dom": "^18.2.7",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
46
|
+
"@vitejs/plugin-react": "^4.0.3",
|
|
47
|
+
"eslint": "^8.45.0",
|
|
48
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
50
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
51
|
+
"rollup": "^4.3.0",
|
|
52
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
53
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
54
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
55
|
+
"storybook": "^7.5.3",
|
|
56
|
+
"tslib": "^2.6.2",
|
|
57
|
+
"typescript": "^5.2.2",
|
|
58
|
+
"vite": "^4.4.5"
|
|
59
|
+
},
|
|
60
|
+
"author": "Tyler Krys <Tyler.Krys@gov.bc.ca>",
|
|
61
|
+
"license": "Apache-2.0",
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/bcgov/design-system/issues"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/bcgov/design-system#readme",
|
|
66
|
+
"private": false
|
|
67
|
+
}
|