@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.
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Button";
2
+ export type { ButtonProps } from "./Button";
@@ -1,10 +1,7 @@
1
- import { Key } from "react";
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
  }
@@ -1,3 +1,5 @@
1
+ import "@bcgov/design-tokens/css/variables.css";
2
+ export { default as Button } from "./Button";
1
3
  export { default as Tag } from "./Tag";
2
4
  export { default as TagGroup } from "./TagGroup";
3
5
  export { default as TagList } from "./TagList";
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 { Key } from 'react';
3
- import { TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1 } from 'react-aria-components';
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.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "vite": "vite",
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
- "preview": "vite preview",
10
- "storybook": "storybook dev -p 6006",
11
- "build-storybook": "storybook build",
12
- "rollup": "rollup -c --bundleConfigAsCjs"
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/bc-sans": "^2.1.0",
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.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",
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.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",
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.3.0",
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.5.3",
55
+ "storybook": "^7.6.1",
56
56
  "tslib": "^2.6.2",
57
- "typescript": "^5.2.2",
58
- "vite": "^4.4.5"
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",