@abgov/react-components 7.2.0-dev.3 → 7.2.0-dev.31
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 +60 -0
- package/index.d.ts +4 -0
- package/index.js +345 -32
- package/index.js.map +1 -1
- package/index.mjs +347 -34
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +7 -2
- package/lib/app-header/app-header.d.ts +12 -4
- package/lib/app-header-menu/app-header-menu.d.ts +1 -1
- package/lib/badge/badge.d.ts +4 -4
- package/lib/block/block.d.ts +4 -1
- package/lib/checkbox/checkbox.d.ts +6 -2
- package/lib/checkbox-list/checkbox-list.d.ts +6 -2
- package/lib/date-picker/date-picker.d.ts +6 -2
- package/lib/dropdown/dropdown-item.d.ts +5 -2
- package/lib/dropdown/dropdown.d.ts +9 -2
- package/lib/dropdown-multiselect/dropdown-multiselect.d.ts +66 -0
- package/lib/filter-chip/filter-chip.d.ts +8 -4
- package/lib/icon/icon.d.ts +4 -1
- package/lib/icon-button/icon-button.d.ts +5 -2
- package/lib/radio-group/radio-group.d.ts +6 -2
- package/lib/scroll-panel/scroll-panel.d.ts +39 -0
- package/lib/table/table-sort-header.d.ts +1 -0
- package/lib/text/text.d.ts +1 -1
- package/lib/textarea/textarea.d.ts +4 -2
- package/lib/theme/theme-context.d.ts +14 -0
- package/lib/work-side-menu-item/work-side-menu-item.d.ts +4 -2
- package/lib/workspace-layout/workspace-layout-scroll-state.d.ts +22 -0
- package/lib/workspace-layout/workspace-layout.d.ts +42 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# React UI Components
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@abgov/react-components)
|
|
4
|
+
|
|
5
|
+
React wrappers for the Government of Alberta Design System web components.
|
|
6
|
+
|
|
7
|
+
Supported React versions: 17, 18, and 19.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @abgov/react-components @abgov/web-components @abgov/ui-components-common @abgov/design-tokens
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Register the web components
|
|
16
|
+
|
|
17
|
+
Import the underlying web components once in your application entry point, such as
|
|
18
|
+
`src/main.tsx`:
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import "@abgov/web-components";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Add styles
|
|
25
|
+
|
|
26
|
+
Import the component styles and design tokens in your main stylesheet, such as
|
|
27
|
+
`src/index.css`:
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
@import "@abgov/web-components/index.css";
|
|
31
|
+
@import "@abgov/design-tokens/dist/tokens.css";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Add icons
|
|
35
|
+
|
|
36
|
+
Add Ionicons to the `<head>` of `index.html`:
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<script
|
|
40
|
+
type="module"
|
|
41
|
+
src="https://cdn.jsdelivr.net/npm/ionicons@latest/dist/ionicons/ionicons.esm.js"
|
|
42
|
+
></script>
|
|
43
|
+
<script
|
|
44
|
+
nomodule
|
|
45
|
+
src="https://cdn.jsdelivr.net/npm/ionicons@latest/dist/ionicons/ionicons.js"
|
|
46
|
+
></script>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Use a component
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { GoabButton } from "@abgov/react-components";
|
|
53
|
+
|
|
54
|
+
export function App() {
|
|
55
|
+
return <GoabButton type="primary">Continue</GoabButton>;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
See the [developer setup guide](https://design.alberta.ca/get-started/developers/setup/) and
|
|
60
|
+
[Government of Alberta Design System](https://design.alberta.ca) for more information.
|
package/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './lib/divider/divider';
|
|
|
19
19
|
export * from './lib/drawer/drawer';
|
|
20
20
|
export * from './lib/dropdown/dropdown';
|
|
21
21
|
export * from './lib/dropdown/dropdown-item';
|
|
22
|
+
export * from './lib/dropdown-multiselect/dropdown-multiselect';
|
|
22
23
|
export * from './lib/file-upload-card/file-upload-card';
|
|
23
24
|
export * from './lib/file-upload-input/file-upload-input';
|
|
24
25
|
export * from './lib/footer/footer';
|
|
@@ -62,6 +63,7 @@ export * from './lib/side-menu/side-menu';
|
|
|
62
63
|
export * from './lib/skeleton/skeleton';
|
|
63
64
|
export * from './lib/spacer/spacer';
|
|
64
65
|
export * from './lib/spinner/spinner';
|
|
66
|
+
export * from './lib/scroll-panel/scroll-panel';
|
|
65
67
|
export * from './lib/table/table';
|
|
66
68
|
export * from './lib/table/table-sort-header';
|
|
67
69
|
export * from './lib/tabs/tabs';
|
|
@@ -79,3 +81,5 @@ export * from './lib/work-side-menu-group/work-side-menu-group';
|
|
|
79
81
|
export * from './lib/work-side-menu-item/work-side-menu-item';
|
|
80
82
|
export * from './lib/work-side-notification-item/work-side-notification-item';
|
|
81
83
|
export * from './lib/work-side-notification-panel/work-side-notification-panel';
|
|
84
|
+
export * from './lib/theme/theme-context';
|
|
85
|
+
export * from './lib/workspace-layout/workspace-layout';
|