@bcgov/design-system-react-components 0.0.3 → 0.0.5

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.
Files changed (31) hide show
  1. package/README.md +35 -11
  2. package/dist/cjs/index.cjs +295 -326
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/types/components/Button/Button.d.ts +12 -0
  5. package/dist/cjs/types/components/Footer/Footer.d.ts +37 -0
  6. package/dist/cjs/types/components/Footer/index.d.ts +2 -0
  7. package/dist/cjs/types/components/Header/Header.d.ts +29 -0
  8. package/dist/cjs/types/components/Header/index.d.ts +2 -0
  9. package/dist/cjs/types/components/Select/Select.d.ts +9 -3
  10. package/dist/cjs/types/components/SvgBcLogo/SvgBcLogo.d.ts +3 -0
  11. package/dist/cjs/types/components/SvgBcLogo/index.d.ts +1 -0
  12. package/dist/cjs/types/components/Tag/Tag.d.ts +7 -1
  13. package/dist/cjs/types/components/TagGroup/TagGroup.d.ts +9 -0
  14. package/dist/cjs/types/components/TagList/TagList.d.ts +3 -0
  15. package/dist/cjs/types/components/index.d.ts +3 -1
  16. package/dist/esm/index.js +293 -326
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/Button/Button.d.ts +12 -0
  19. package/dist/esm/types/components/Footer/Footer.d.ts +37 -0
  20. package/dist/esm/types/components/Footer/index.d.ts +2 -0
  21. package/dist/esm/types/components/Header/Header.d.ts +29 -0
  22. package/dist/esm/types/components/Header/index.d.ts +2 -0
  23. package/dist/esm/types/components/Select/Select.d.ts +9 -3
  24. package/dist/esm/types/components/SvgBcLogo/SvgBcLogo.d.ts +3 -0
  25. package/dist/esm/types/components/SvgBcLogo/index.d.ts +1 -0
  26. package/dist/esm/types/components/Tag/Tag.d.ts +7 -1
  27. package/dist/esm/types/components/TagGroup/TagGroup.d.ts +9 -0
  28. package/dist/esm/types/components/TagList/TagList.d.ts +3 -0
  29. package/dist/esm/types/components/index.d.ts +3 -1
  30. package/dist/index.d.ts +108 -18
  31. package/package.json +19 -19
package/README.md CHANGED
@@ -14,13 +14,13 @@ To use, install this package and import the components into your application.
14
14
 
15
15
  `npm install @bcgov/design-system-react-components`
16
16
 
17
- ## BC Sans font dependency
17
+ ### BC Sans font dependency
18
18
 
19
19
  This package installs [@bcgov/bc-sans](https://www.npmjs.com/package/@bcgov/bc-sans) as a peer dependency. You must import the font-face declarations from @bcgov/bc-sans and ensure the font is reachable for your end user. The React components require that the `BC Sans` font-face is available to display correctly. The components do not ship their own copies of the font to minimize your bundle size.
20
20
 
21
21
  **Important!** If you are on a BC Government-provisioned laptop, you already have the BC Sans font installed on your machine. This package uses `BC Sans` (with a space) for its font styles. If you are using this component library but not supplying the font, it's possible that your machine will still display the font correctly for you, **but not your end user**. Make sure to check this by disabling the font on your machine or by testing with another machine.
22
22
 
23
- ### Use
23
+ ## Use
24
24
 
25
25
  ```jsx
26
26
  // App.jsx
@@ -31,18 +31,35 @@ This package installs [@bcgov/bc-sans](https://www.npmjs.com/package/@bcgov/bc-s
31
31
  import "@bcgov/bc-sans/css/BC_Sans.css";
32
32
 
33
33
  // Import the individual components you need
34
- import { TagGroup, TagList } from "@bcgov/design-system-react-components";
34
+ import {
35
+ Button,
36
+ Footer,
37
+ Header,
38
+ TagGroup,
39
+ TagList
40
+ } from "@bcgov/design-system-react-components";
35
41
 
36
42
  export default function App() {
37
43
  return (
38
- <TagGroup aria-label="Tag group with two items">
39
- <TagList
40
- items={[
41
- { id: "one", textValue: "One" },
42
- { id: "two", textValue: "Two" },
43
- ]}
44
- />
45
- </TagGroup>
44
+ <Header
45
+ title="My application"
46
+ skipLinks={[
47
+ <a href="#main-content">Skip to main content</a>
48
+ ]}
49
+ >
50
+ <Button variant="primary" size="small">Log in</Button>
51
+ </Header>
52
+ <main id="main-content">
53
+ <TagGroup aria-label="Tag group with two items">
54
+ <TagList
55
+ items={[
56
+ { id: "one", textValue: "One" },
57
+ { id: "two", textValue: "Two" },
58
+ ]}
59
+ />
60
+ </TagGroup>
61
+ </main>
62
+ <Footer/>
46
63
  );
47
64
  }
48
65
  ```
@@ -52,6 +69,9 @@ export default function App() {
52
69
  | Component | React Aria Components docs link |
53
70
  | ---------------------- | --------------------------------------------------------- |
54
71
  | Button | https://react-spectrum.adobe.com/react-aria/Button.html |
72
+ | Footer | N/A |
73
+ | Header | N/A |
74
+ | Select | https://react-spectrum.adobe.com/react-aria/Select.html |
55
75
  | TagGroup, TagList, Tag | https://react-spectrum.adobe.com/react-aria/TagGroup.html |
56
76
 
57
77
  ## Supported React versions
@@ -66,6 +86,10 @@ By targeting v16.4.0 as a minimum, we get to use [React's modern JSX transformat
66
86
 
67
87
  This means there's no need for unused `import React from "react"` statements in your JSX files.
68
88
 
89
+ ## Versions
90
+
91
+ This project follows semantic versioning. See [CHANGELOG.md](./CHANGELOG.md) for version details.
92
+
69
93
  ## Development
70
94
 
71
95
  ### Components