@covalent/components-react 0.0.0-COVALENT
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/.eslintrc.json +23 -0
- package/README.md +168 -0
- package/package.json +10 -0
- package/project.json +48 -0
- package/src/ActionRibbon/CovalentActionRibbon.spec.ts +7 -0
- package/src/ActionRibbon/CovalentActionRibbon.tsx +8 -0
- package/src/Alert/CovalentAlert.spec.ts +7 -0
- package/src/Alert/CovalentAlert.tsx +8 -0
- package/src/AppShell/CovalentAppShell.spec.ts +7 -0
- package/src/AppShell/CovalentAppShell.tsx +11 -0
- package/src/Badge/CovalentBadge.spec.ts +7 -0
- package/src/Badge/CovalentBadge.tsx +8 -0
- package/src/Button/CovalentButton.spec.ts +7 -0
- package/src/Button/CovalentButton.tsx +8 -0
- package/src/Card/CovalentCard.spec.ts +7 -0
- package/src/Card/CovalentCard.tsx +8 -0
- package/src/Checkbox/CovalentCheckbox.spec.ts +7 -0
- package/src/Checkbox/CovalentCheckbox.tsx +11 -0
- package/src/Chips/CovalentChip.spec.ts +7 -0
- package/src/Chips/CovalentChip.tsx +8 -0
- package/src/Chips/CovalentChipSet.spec.ts +7 -0
- package/src/Chips/CovalentChipSet.tsx +8 -0
- package/src/CircularProgress/CovalentCircularProgress.spec.ts +7 -0
- package/src/CircularProgress/CovalentCircularProgress.tsx +8 -0
- package/src/CodeEditor/CovalentCodeEditor.spec.ts +7 -0
- package/src/CodeEditor/CovalentCodeEditor.tsx +14 -0
- package/src/CodeSnippet/CovalentCodeSnippet.spec.ts +7 -0
- package/src/CodeSnippet/CovalentCodeSnippet.tsx +8 -0
- package/src/Dialog/CovalentDialog.spec.ts +7 -0
- package/src/Dialog/CovalentDialog.tsx +14 -0
- package/src/Drawer/CovalentDrawer.spec.ts +7 -0
- package/src/Drawer/CovalentDrawer.tsx +12 -0
- package/src/EmptyState/CovalentEmptyState.spec.ts +7 -0
- package/src/EmptyState/CovalentEmptyState.tsx +8 -0
- package/src/ExpansionPanel/CovalentExpansionPanel.spec.ts +7 -0
- package/src/ExpansionPanel/CovalentExpansionPanel.tsx +8 -0
- package/src/ExpansionPanel/CovalentExpansionPanelItem.spec.ts +7 -0
- package/src/ExpansionPanel/CovalentExpansionPanelItem.tsx +11 -0
- package/src/FocusedPage/CovalentFocusedPage.spec.ts +7 -0
- package/src/FocusedPage/CovalentFocusedPage.tsx +8 -0
- package/src/Formfield/CovalentFormfield.spec.ts +7 -0
- package/src/Formfield/CovalentFormfield.tsx +8 -0
- package/src/FullScreenDialog/CovalentFullscreenDialog.spec.ts +7 -0
- package/src/FullScreenDialog/CovalentFullscreenDialog.tsx +14 -0
- package/src/Icon/CovalentIcon.spec.ts +7 -0
- package/src/Icon/CovalentIcon.tsx +8 -0
- package/src/IconButton/CovalentIconButton.spec.ts +7 -0
- package/src/IconButton/CovalentIconButton.tsx +8 -0
- package/src/IconButtonToggle/CovalentIconButtonToggle.spec.ts +7 -0
- package/src/IconButtonToggle/CovalentIconButtonToggle.tsx +11 -0
- package/src/IconCheckbox/CovalentIconCheckToggle.spec.ts +7 -0
- package/src/IconCheckbox/CovalentIconCheckToggle.tsx +11 -0
- package/src/IconLockup/CovalentIconLockup.spec.ts +7 -0
- package/src/IconLockup/CovalentIconLockup.tsx +8 -0
- package/src/IconRadio/CovalentIconRadioToggle.spec.ts +7 -0
- package/src/IconRadio/CovalentIconRadioToggle.tsx +11 -0
- package/src/LinearProgress/CovalentLinearProgress.spec.ts +7 -0
- package/src/LinearProgress/CovalentLinearProgress.tsx +8 -0
- package/src/List/CovalentCheckListItem.spec.ts +7 -0
- package/src/List/CovalentCheckListItem.tsx +11 -0
- package/src/List/CovalentList.spec.ts +7 -0
- package/src/List/CovalentList.tsx +12 -0
- package/src/List/CovalentListItem.spec.ts +7 -0
- package/src/List/CovalentListItem.tsx +11 -0
- package/src/List/CovalentNavRailListItem.spec.ts +7 -0
- package/src/List/CovalentNavRailListItem.tsx +11 -0
- package/src/List/CovalentRadioListItem.spec.ts +7 -0
- package/src/List/CovalentRadioListItem.tsx +11 -0
- package/src/Menu/CovalentMenu.spec.ts +7 -0
- package/src/Menu/CovalentMenu.tsx +15 -0
- package/src/NotebookCell/CovalentNotebookCell.spec.ts +7 -0
- package/src/NotebookCell/CovalentNotebookCell.tsx +8 -0
- package/src/Radio/CovalentRadio.spec.ts +7 -0
- package/src/Radio/CovalentRadio.tsx +11 -0
- package/src/Select/CovalentSelect.spec.ts +7 -0
- package/src/Select/CovalentSelect.tsx +13 -0
- package/src/SideSheet/CovalentSideSheet.spec.ts +7 -0
- package/src/SideSheet/CovalentSideSheet.tsx +14 -0
- package/src/Slider/CovalentSlider.spec.ts +7 -0
- package/src/Slider/CovalentSlider.tsx +12 -0
- package/src/Slider/CovalentSliderRange.spec.ts +7 -0
- package/src/Slider/CovalentSliderRange.tsx +12 -0
- package/src/Snackbar/CovalentSnackbar.spec.ts +7 -0
- package/src/Snackbar/CovalentSnackbar.tsx +14 -0
- package/src/StatusDialog/CovalentStatusDialog.spec.ts +7 -0
- package/src/StatusDialog/CovalentStatusDialog.tsx +14 -0
- package/src/StatusHeader/CovalentStatusHeader.spec.ts +7 -0
- package/src/StatusHeader/CovalentStatusHeader.tsx +8 -0
- package/src/StatusHeader/CovalentStatusHeaderItem.spec.ts +7 -0
- package/src/StatusHeader/CovalentStatusHeaderItem.tsx +8 -0
- package/src/Switch/CovalentSwitch.spec.ts +7 -0
- package/src/Switch/CovalentSwitch.tsx +8 -0
- package/src/Tab/CovalentTab.spec.ts +7 -0
- package/src/Tab/CovalentTab.tsx +11 -0
- package/src/Tab/CovalentTabBar.spec.ts +7 -0
- package/src/Tab/CovalentTabBar.tsx +11 -0
- package/src/TextLockup/CovalentTextLockup.spec.ts +7 -0
- package/src/TextLockup/CovalentTextLockup.tsx +8 -0
- package/src/Textarea/CovalentTextArea.spec.ts +7 -0
- package/src/Textarea/CovalentTextArea.tsx +8 -0
- package/src/Textfield/CovalentTextField.spec.ts +7 -0
- package/src/Textfield/CovalentTextField.tsx +8 -0
- package/src/Toolbar/CovalentToolbar.spec.ts +7 -0
- package/src/Toolbar/CovalentToolbar.tsx +11 -0
- package/src/Tooltip/CovalentTooltip.spec.ts +7 -0
- package/src/Tooltip/CovalentTooltip.tsx +8 -0
- package/src/TopAppBar/CovalentTopAppBar.spec.ts +7 -0
- package/src/TopAppBar/CovalentTopAppBar.tsx +11 -0
- package/src/TopAppBar/CovalentTopAppBarFixed.spec.ts +7 -0
- package/src/TopAppBar/CovalentTopAppBarFixed.tsx +11 -0
- package/src/TreeList/CovalentTreeList.spec.ts +7 -0
- package/src/TreeList/CovalentTreeList.tsx +11 -0
- package/src/TreeList/CovalentTreeListItem.spec.ts +7 -0
- package/src/TreeList/CovalentTreeListItem.tsx +11 -0
- package/src/Typography/CovalentTypography.spec.ts +7 -0
- package/src/Typography/CovalentTypography.tsx +11 -0
- package/src/index.ts +56 -0
- package/tsconfig.json +24 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +21 -0
- package/types.d.ts +14 -0
- package/vite.config.ts +66 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
+
"rules": {}
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"files": ["*.ts", "*.tsx"],
|
|
11
|
+
"rules": {}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"files": ["*.js", "*.jsx"],
|
|
15
|
+
"rules": {}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"files": ["*.json"],
|
|
19
|
+
"parser": "jsonc-eslint-parser",
|
|
20
|
+
"rules": {}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Covalent Components React
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://badge.fury.io/js/@covalent%2Fcomponents-react)
|
|
5
|
+
|
|
6
|
+
**Covalent Components React** is a **React wrapper library** built on top of the [Covalent Web Components](https://github.com/Teradata/covalent/tree/main/libs/components) library. It provides a seamless, React-friendly interface for using Covalent's design system and UI components in React applications. This library bridges the gap between web components and React, enabling developers to leverage Covalent's robust component library while adhering to React's declarative syntax and patterns.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
1. [Overview](#overview)
|
|
12
|
+
2. [Key Features](#key-features)
|
|
13
|
+
3. [Installation](#installation)
|
|
14
|
+
4. [Usage](#usage)
|
|
15
|
+
- [Quick Start](#quick-start)
|
|
16
|
+
- [Handling Props and Events](#handling-props-and-events)
|
|
17
|
+
5. [Why Use This Wrapper?](#why-use-this-wrapper)
|
|
18
|
+
- [Comparison: Core Web Components vs. React Wrapper](#comparison-core-web-components-vs-react-wrapper)
|
|
19
|
+
6. [Documentation](#documentation)
|
|
20
|
+
7. [Contributing](#contributing)
|
|
21
|
+
8. [License](#license)
|
|
22
|
+
9. [Links](#links)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
The `@covalent/components-react` package wraps the [Covalent Web Components](https://github.com/Teradata/covalent/tree/main/libs/components) into reusable React components. It abstracts the complexity of directly interfacing with web components in React, such as:
|
|
28
|
+
- **Prop passing**: Automatically converts React props to web component properties/attributes.
|
|
29
|
+
- **Event handling**: Maps native DOM events to React-style event handlers (e.g., `onChange`).
|
|
30
|
+
- **Type Safety**: Provides TypeScript support for props and events.
|
|
31
|
+
|
|
32
|
+
This library is ideal for teams building React applications that want to use Covalent's design system without manual workarounds for web component integration.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Key Features
|
|
37
|
+
- **React Compatibility**: Full integration with React’s lifecycle and state management.
|
|
38
|
+
- **Declarative Syntax**: Use Covalent components as native React components.
|
|
39
|
+
- **TypeScript Support**: Auto-generated types for props and events.
|
|
40
|
+
- **Automatic Prop Conversion**: Handles both attributes (strings) and properties (objects, arrays, etc.).
|
|
41
|
+
- **Event Normalization**: Listen to web component events via React `onEvent` handlers.
|
|
42
|
+
- **Custom Element Registration**: No need to manually register components in the DOM.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
```bash
|
|
48
|
+
npm install @covalent/components-react @covalent/components
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
### Quick Start
|
|
56
|
+
1. Import the React-wrapped component:
|
|
57
|
+
```tsx
|
|
58
|
+
import { cvButton } from '@covalent/components-react';
|
|
59
|
+
```
|
|
60
|
+
2. Use it in your JSX:
|
|
61
|
+
```tsx
|
|
62
|
+
function App() {
|
|
63
|
+
return (
|
|
64
|
+
<cvButton
|
|
65
|
+
variant="filled"
|
|
66
|
+
onClick={() => console.log('Button clicked!')}
|
|
67
|
+
>
|
|
68
|
+
Click Me
|
|
69
|
+
</cvButton>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Handling Props and Events
|
|
75
|
+
- **Props**: Pass props as you would with any React component. Non-primitive values (e.g., objects, arrays) are set as properties on the underlying web component.
|
|
76
|
+
- **Events**: Use `on`-prefixed event names (e.g., `onClick` for `click` events).
|
|
77
|
+
|
|
78
|
+
Example with a complex component:
|
|
79
|
+
```tsx
|
|
80
|
+
import { cvDataTable } from '@covalent/components-react';
|
|
81
|
+
|
|
82
|
+
function TableDemo() {
|
|
83
|
+
const columns = [{ label: 'Name', key: 'name' }];
|
|
84
|
+
const data = [{ name: 'Item 1' }, { name: 'Item 2' }];
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<cvDataTable
|
|
88
|
+
columns={columns}
|
|
89
|
+
data={data}
|
|
90
|
+
onRowClick={(event) => console.log('Row clicked:', event.detail)}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Why Use This Wrapper?
|
|
99
|
+
|
|
100
|
+
### Comparison: Core Web Components vs. React Wrapper
|
|
101
|
+
| Task | With Core Web Components (No Wrapper) | With React Wrapper (`@covalent/components-react`) |
|
|
102
|
+
|---------------------|-----------------------------------------------|---------------------------------------------------|
|
|
103
|
+
| **Passing Data** | Manually distinguish between attributes (strings) and properties (objects). | Pass props naturally; the wrapper handles conversion. |
|
|
104
|
+
| **Event Handling** | Use `ref` to add event listeners. | Use React-style `onEvent` props. |
|
|
105
|
+
| **Type Support** | No built-in TypeScript types. | Full TypeScript support. |
|
|
106
|
+
| **Code Readability** | More boilerplate. | Clean, declarative JSX. |
|
|
107
|
+
|
|
108
|
+
**Example: Button Implementation**
|
|
109
|
+
|
|
110
|
+
Without Wrapper:
|
|
111
|
+
```tsx
|
|
112
|
+
import { cvButton } from '@covalent/components';
|
|
113
|
+
import { useRef, useEffect } from 'react';
|
|
114
|
+
|
|
115
|
+
export default function Button() {
|
|
116
|
+
const buttonRef = useRef(null);
|
|
117
|
+
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
buttonRef.current.addEventListener('click', () => {
|
|
120
|
+
console.log('Button clicked!');
|
|
121
|
+
});
|
|
122
|
+
}, []);
|
|
123
|
+
|
|
124
|
+
return <cv-button ref={buttonRef}>Click Me</cv-button>;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
With Wrapper:
|
|
129
|
+
```tsx
|
|
130
|
+
import { cvButton } from '@covalent/components-react';
|
|
131
|
+
|
|
132
|
+
export default function Button() {
|
|
133
|
+
return (
|
|
134
|
+
<cvButton onClick={() => console.log('Button clicked!')}>
|
|
135
|
+
Click Me
|
|
136
|
+
</cvButton>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Documentation
|
|
144
|
+
- **Covalent Components (Web)**: Full documentation for the underlying web components is available [here](https://github.com/Teradata/covalent/tree/main/libs/components).
|
|
145
|
+
- **React-Specific Guidance**: See the [Design system docs](h[ttps://teradata.github.io/covalent/](https://design.teradata.com/)) for interactive examples.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Contributing
|
|
150
|
+
We welcome contributions! Please follow these steps:
|
|
151
|
+
1. Fork the repository.
|
|
152
|
+
2. Install dependencies: `npm install`.
|
|
153
|
+
3. Make changes and test using the provided Storybook.
|
|
154
|
+
4. Submit a pull request with a clear description of changes.
|
|
155
|
+
|
|
156
|
+
Report bugs or request features via [GitHub Issues](https://github.com/Teradata/covalent/issues).
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
MIT © [Teradata](https://www.teradata.com/)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Links
|
|
166
|
+
- [Covalent Main Repo](https://github.com/Teradata/covalent)
|
|
167
|
+
- [Covalent Web Components](https://github.com/Teradata/covalent/tree/main/libs/components)
|
|
168
|
+
- [Teradata Design System](https://design.teradata.com/)
|
package/package.json
ADDED
package/project.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "components-react",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "libs/components-react/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"release": {
|
|
7
|
+
"version": {
|
|
8
|
+
"generatorOptions": {
|
|
9
|
+
"packageRoot": "dist/{projectRoot}",
|
|
10
|
+
"currentVersionResolver": "git-tag"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"tags": [],
|
|
15
|
+
"targets": {
|
|
16
|
+
"build-files": {
|
|
17
|
+
"executor": "@nx/vite:build",
|
|
18
|
+
"outputs": ["{options.outputPath}"],
|
|
19
|
+
"options": {
|
|
20
|
+
"outputPath": "dist/libs/components-react"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"dependsOn": ["build-files"],
|
|
25
|
+
"executor": "nx:run-commands",
|
|
26
|
+
"options": {
|
|
27
|
+
"command": "cp dist/libs/components/style.css dist/libs/components-react/"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"test": {
|
|
31
|
+
"executor": "@nx/vite:test",
|
|
32
|
+
"outputs": ["{options.reportsDirectory}"],
|
|
33
|
+
"options": {
|
|
34
|
+
"reportsDirectory": "../../coverage/libs/components-react"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"lint": {
|
|
38
|
+
"executor": "@nx/eslint:lint"
|
|
39
|
+
},
|
|
40
|
+
"generate-react-wrappers": {
|
|
41
|
+
"executor": "nx:run-commands",
|
|
42
|
+
"options": {
|
|
43
|
+
"commands": ["node ./scripts/react-wrappers"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"implicitDependencies": ["components"]
|
|
48
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentActionRibbon as CovalentActionRibbonWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentActionRibbon = createComponent({
|
|
5
|
+
tagName: 'cv-action-ribbon',
|
|
6
|
+
elementClass: CovalentActionRibbonWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentAlert as CovalentAlertWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentAlert = createComponent({
|
|
5
|
+
tagName: 'cv-alert',
|
|
6
|
+
elementClass: CovalentAlertWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentAppShell as CovalentAppShellWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentAppShell = createComponent({
|
|
5
|
+
tagName: 'cv-app-shell',
|
|
6
|
+
elementClass: CovalentAppShellWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
ontoggle: 'toggle',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentBadge as CovalentBadgeWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentBadge = createComponent({
|
|
5
|
+
tagName: 'cv-badge',
|
|
6
|
+
elementClass: CovalentBadgeWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentButton as CovalentButtonWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentButton = createComponent({
|
|
5
|
+
tagName: 'cv-button',
|
|
6
|
+
elementClass: CovalentButtonWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentCard as CovalentCardWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentCard = createComponent({
|
|
5
|
+
tagName: 'cv-card',
|
|
6
|
+
elementClass: CovalentCardWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentCheckbox as CovalentCheckboxWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentCheckbox = createComponent({
|
|
5
|
+
tagName: 'cv-checkbox',
|
|
6
|
+
elementClass: CovalentCheckboxWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
onchange: 'change',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentChip as CovalentChipWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentChip = createComponent({
|
|
5
|
+
tagName: 'cv-chip',
|
|
6
|
+
elementClass: CovalentChipWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentChipSet as CovalentChipSetWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentChipSet = createComponent({
|
|
5
|
+
tagName: 'cv-chip-set',
|
|
6
|
+
elementClass: CovalentChipSetWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentCircularProgress as CovalentCircularProgressWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentCircularProgress = createComponent({
|
|
5
|
+
tagName: 'cv-circular-progress',
|
|
6
|
+
elementClass: CovalentCircularProgressWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentCodeEditor as CovalentCodeEditorWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentCodeEditor = createComponent({
|
|
5
|
+
tagName: 'cv-code-editor',
|
|
6
|
+
elementClass: CovalentCodeEditorWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
oneditorReady: 'editor-ready',
|
|
10
|
+
oneditorFocus: 'editor-focus',
|
|
11
|
+
oneditorBlur: 'editor-blur',
|
|
12
|
+
oncodeChange: 'code-change',
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentCodeSnippet as CovalentCodeSnippetWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentCodeSnippet = createComponent({
|
|
5
|
+
tagName: 'cv-code-snippet',
|
|
6
|
+
elementClass: CovalentCodeSnippetWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentDialog as CovalentDialogWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentDialog = createComponent({
|
|
5
|
+
tagName: 'cv-dialog',
|
|
6
|
+
elementClass: CovalentDialogWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
onopening: 'opening',
|
|
10
|
+
onopened: 'opened',
|
|
11
|
+
onclosing: 'closing',
|
|
12
|
+
onclosed: 'closed',
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentDrawer as CovalentDrawerWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentDrawer = createComponent({
|
|
5
|
+
tagName: 'cv-drawer',
|
|
6
|
+
elementClass: CovalentDrawerWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
onopened: 'opened',
|
|
10
|
+
onclosed: 'closed',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentEmptyState as CovalentEmptyStateWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentEmptyState = createComponent({
|
|
5
|
+
tagName: 'cv-empty-state',
|
|
6
|
+
elementClass: CovalentEmptyStateWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentExpansionPanel as CovalentExpansionPanelWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentExpansionPanel = createComponent({
|
|
5
|
+
tagName: 'cv-expansion-panel',
|
|
6
|
+
elementClass: CovalentExpansionPanelWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentExpansionPanelItem as CovalentExpansionPanelItemWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentExpansionPanelItem = createComponent({
|
|
5
|
+
tagName: 'cv-expansion-panel-item',
|
|
6
|
+
elementClass: CovalentExpansionPanelItemWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
oncvExpansionPanelTogglePanel: 'cv-expansionPanel-togglePanel',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentFocusedPage as CovalentFocusedPageWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentFocusedPage = createComponent({
|
|
5
|
+
tagName: 'cv-focused-page',
|
|
6
|
+
elementClass: CovalentFocusedPageWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentFormfield as CovalentFormfieldWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentFormfield = createComponent({
|
|
5
|
+
tagName: 'cv-formfield',
|
|
6
|
+
elementClass: CovalentFormfieldWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { CovalentFullscreenDialog as CovalentFullscreenDialogWeb } from '@covalent/components';
|
|
4
|
+
export const CovalentFullscreenDialog = createComponent({
|
|
5
|
+
tagName: 'cv-full-screen-dialog',
|
|
6
|
+
elementClass: CovalentFullscreenDialogWeb,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
onopening: 'opening',
|
|
10
|
+
onopened: 'opened',
|
|
11
|
+
onclosing: 'closing',
|
|
12
|
+
onclosed: 'closed',
|
|
13
|
+
},
|
|
14
|
+
});
|