@vonage/vivid-react 0.0.1 → 2.10.47
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 +183 -0
- package/VwcAccordion/index.d.ts +14 -0
- package/VwcAccordion/index.js +59 -0
- package/VwcAccordion/package.json +11 -0
- package/VwcActionGroup/index.d.ts +18 -0
- package/VwcActionGroup/index.js +90 -0
- package/VwcActionGroup/package.json +11 -0
- package/VwcBadge/index.d.ts +29 -0
- package/VwcBadge/index.js +154 -0
- package/VwcBadge/package.json +11 -0
- package/VwcBanner/index.d.ts +26 -0
- package/VwcBanner/index.js +91 -0
- package/VwcBanner/package.json +11 -0
- package/VwcButton/index.d.ts +55 -0
- package/VwcButton/index.js +240 -0
- package/VwcButton/package.json +11 -0
- package/VwcButtonToggleGroup/index.d.ts +25 -0
- package/VwcButtonToggleGroup/index.js +91 -0
- package/VwcButtonToggleGroup/package.json +11 -0
- package/VwcCalendar/index.d.ts +20 -0
- package/VwcCalendar/index.js +70 -0
- package/VwcCalendar/package.json +11 -0
- package/VwcCalendarEvent/index.d.ts +25 -0
- package/VwcCalendarEvent/index.js +81 -0
- package/VwcCalendarEvent/package.json +11 -0
- package/VwcCard/index.d.ts +23 -0
- package/VwcCard/index.js +76 -0
- package/VwcCard/package.json +11 -0
- package/VwcCarousel/index.d.ts +14 -0
- package/VwcCarousel/index.js +45 -0
- package/VwcCarousel/package.json +11 -0
- package/VwcCarouselItem/index.d.ts +14 -0
- package/VwcCarouselItem/index.js +49 -0
- package/VwcCarouselItem/package.json +11 -0
- package/VwcCheckListItem/index.d.ts +41 -0
- package/VwcCheckListItem/index.js +153 -0
- package/VwcCheckListItem/package.json +11 -0
- package/VwcCheckbox/index.d.ts +34 -0
- package/VwcCheckbox/index.js +126 -0
- package/VwcCheckbox/package.json +11 -0
- package/VwcChip/index.d.ts +31 -0
- package/VwcChip/index.js +106 -0
- package/VwcChip/package.json +11 -0
- package/VwcChipSet/index.d.ts +16 -0
- package/VwcChipSet/index.js +60 -0
- package/VwcChipSet/package.json +11 -0
- package/VwcCircularProgress/index.d.ts +24 -0
- package/VwcCircularProgress/index.js +84 -0
- package/VwcCircularProgress/package.json +11 -0
- package/VwcDataGrid/index.d.ts +33 -0
- package/VwcDataGrid/index.js +122 -0
- package/VwcDataGrid/package.json +11 -0
- package/VwcDataGridColumn/index.d.ts +43 -0
- package/VwcDataGridColumn/index.js +144 -0
- package/VwcDataGridColumn/package.json +11 -0
- package/VwcDatepicker/index.d.ts +120 -0
- package/VwcDatepicker/index.js +422 -0
- package/VwcDatepicker/package.json +11 -0
- package/VwcDialog/index.d.ts +40 -0
- package/VwcDialog/index.js +135 -0
- package/VwcDialog/package.json +11 -0
- package/VwcDrawer/index.d.ts +20 -0
- package/VwcDrawer/index.js +80 -0
- package/VwcDrawer/package.json +11 -0
- package/VwcDropdown/index.d.ts +61 -0
- package/VwcDropdown/index.js +221 -0
- package/VwcDropdown/package.json +11 -0
- package/VwcElevation/index.d.ts +14 -0
- package/VwcElevation/index.js +45 -0
- package/VwcElevation/package.json +11 -0
- package/VwcEmptyState/index.d.ts +18 -0
- package/VwcEmptyState/index.js +59 -0
- package/VwcEmptyState/package.json +11 -0
- package/VwcExpansionPanel/index.d.ts +34 -0
- package/VwcExpansionPanel/index.js +199 -0
- package/VwcExpansionPanel/package.json +11 -0
- package/VwcFab/index.d.ts +32 -0
- package/VwcFab/index.js +124 -0
- package/VwcFab/package.json +11 -0
- package/VwcFilePicker/index.d.ts +24 -0
- package/VwcFilePicker/index.js +88 -0
- package/VwcFilePicker/package.json +11 -0
- package/VwcFormfield/index.d.ts +20 -0
- package/VwcFormfield/index.js +70 -0
- package/VwcFormfield/package.json +11 -0
- package/VwcHelperMessage/index.d.ts +14 -0
- package/VwcHelperMessage/index.js +49 -0
- package/VwcHelperMessage/package.json +11 -0
- package/VwcIcon/index.d.ts +22 -0
- package/VwcIcon/index.js +102 -0
- package/VwcIcon/package.json +11 -0
- package/VwcIconButton/index.d.ts +31 -0
- package/VwcIconButton/index.js +111 -0
- package/VwcIconButton/package.json +11 -0
- package/VwcIconButtonToggle/index.d.ts +37 -0
- package/VwcIconButtonToggle/index.js +136 -0
- package/VwcIconButtonToggle/package.json +11 -0
- package/VwcKeypad/index.d.ts +31 -0
- package/VwcKeypad/index.js +176 -0
- package/VwcKeypad/package.json +11 -0
- package/VwcLayout/index.d.ts +20 -0
- package/VwcLayout/index.js +105 -0
- package/VwcLayout/package.json +11 -0
- package/VwcLinearProgress/index.d.ts +26 -0
- package/VwcLinearProgress/index.js +98 -0
- package/VwcLinearProgress/package.json +11 -0
- package/VwcList/index.d.ts +35 -0
- package/VwcList/index.js +146 -0
- package/VwcList/package.json +11 -0
- package/VwcListExpansionPanel/index.d.ts +19 -0
- package/VwcListExpansionPanel/index.js +68 -0
- package/VwcListExpansionPanel/package.json +11 -0
- package/VwcListItem/index.d.ts +42 -0
- package/VwcListItem/index.js +171 -0
- package/VwcListItem/package.json +11 -0
- package/VwcMenu/index.d.ts +53 -0
- package/VwcMenu/index.js +210 -0
- package/VwcMenu/package.json +11 -0
- package/VwcNotchedOutline/index.d.ts +17 -0
- package/VwcNotchedOutline/index.js +58 -0
- package/VwcNotchedOutline/package.json +11 -0
- package/VwcNote/index.d.ts +18 -0
- package/VwcNote/index.js +59 -0
- package/VwcNote/package.json +11 -0
- package/VwcPagination/index.d.ts +16 -0
- package/VwcPagination/index.js +52 -0
- package/VwcPagination/package.json +11 -0
- package/VwcPopup/index.d.ts +30 -0
- package/VwcPopup/index.js +147 -0
- package/VwcPopup/package.json +11 -0
- package/VwcRadio/index.d.ts +52 -0
- package/VwcRadio/index.js +149 -0
- package/VwcRadio/package.json +11 -0
- package/VwcRadioListItem/index.d.ts +41 -0
- package/VwcRadioListItem/index.js +148 -0
- package/VwcRadioListItem/package.json +11 -0
- package/VwcSchemeSelect/index.d.ts +14 -0
- package/VwcSchemeSelect/index.js +46 -0
- package/VwcSchemeSelect/package.json +11 -0
- package/VwcSelect/index.d.ts +60 -0
- package/VwcSelect/index.js +253 -0
- package/VwcSelect/package.json +11 -0
- package/VwcSideDrawer/index.d.ts +22 -0
- package/VwcSideDrawer/index.js +73 -0
- package/VwcSideDrawer/package.json +11 -0
- package/VwcSlider/index.d.ts +34 -0
- package/VwcSlider/index.js +129 -0
- package/VwcSlider/package.json +11 -0
- package/VwcSnackbar/index.d.ts +42 -0
- package/VwcSnackbar/index.js +138 -0
- package/VwcSnackbar/package.json +11 -0
- package/VwcSurface/index.d.ts +42 -0
- package/VwcSurface/index.js +145 -0
- package/VwcSurface/package.json +11 -0
- package/VwcSwitch/index.d.ts +27 -0
- package/VwcSwitch/index.js +114 -0
- package/VwcSwitch/package.json +11 -0
- package/VwcTab/index.d.ts +40 -0
- package/VwcTab/index.js +151 -0
- package/VwcTab/package.json +11 -0
- package/VwcTabBar/index.d.ts +15 -0
- package/VwcTabBar/index.js +55 -0
- package/VwcTabBar/package.json +11 -0
- package/VwcTag/index.d.ts +34 -0
- package/VwcTag/index.js +115 -0
- package/VwcTag/package.json +11 -0
- package/VwcText/index.d.ts +18 -0
- package/VwcText/index.js +83 -0
- package/VwcText/package.json +11 -0
- package/VwcTextarea/index.d.ts +93 -0
- package/VwcTextarea/index.js +331 -0
- package/VwcTextarea/package.json +11 -0
- package/VwcTextfield/index.d.ts +89 -0
- package/VwcTextfield/index.js +329 -0
- package/VwcTextfield/package.json +11 -0
- package/VwcThemeSwitch/index.d.ts +14 -0
- package/VwcThemeSwitch/index.js +57 -0
- package/VwcThemeSwitch/package.json +11 -0
- package/VwcTooltip/index.d.ts +22 -0
- package/VwcTooltip/index.js +105 -0
- package/VwcTooltip/package.json +11 -0
- package/VwcTopAppBar/index.d.ts +22 -0
- package/VwcTopAppBar/index.js +77 -0
- package/VwcTopAppBar/package.json +11 -0
- package/VwcTopAppBarFixed/index.d.ts +22 -0
- package/VwcTopAppBarFixed/index.js +88 -0
- package/VwcTopAppBarFixed/package.json +11 -0
- package/index.js +281 -0
- package/package.json +135 -7
- package/testing/component.mock.js +3 -0
- package/types/index.d.ts +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# @vonage/vivid-react
|
|
2
|
+
|
|
3
|
+
Vivid-react is a script allowing you to generate `Vivid-React` components for the newest version of `Vivid` components stored as a package with all necessary dependencies and available through Artifactory npm registry.
|
|
4
|
+
|
|
5
|
+
The main goal of output package is to provide a better developer experience when using `Vivid` inside of `React` typescript applications. We still use regular `Vivid` web components, so be sure to target a recent browser.
|
|
6
|
+
|
|
7
|
+
Goals:
|
|
8
|
+
* wrap adding handlers for events like `change` which natively doesn't work in the environment
|
|
9
|
+
* mocks for Jest
|
|
10
|
+
* typing support (prop-types or typescript)
|
|
11
|
+
* a handy interface for initialisation (eg. fonts)
|
|
12
|
+
* getting advantages of JSX/TSX (eg. composed components*)
|
|
13
|
+
* all components within one package**
|
|
14
|
+
* storybook acting as developer sandbox for presenting quick examples
|
|
15
|
+
* one place for all future vivid-related code to use with React
|
|
16
|
+
|
|
17
|
+
*may provide a cut off at props inherited from MWC source.
|
|
18
|
+
|
|
19
|
+
**now also implemented in _raw_ Vivid.
|
|
20
|
+
|
|
21
|
+
# Similar strongly typed wrappers for other frameworks?
|
|
22
|
+
* https://github.com/Vonage/vivid-vue
|
|
23
|
+
|
|
24
|
+
# Why is this repository exists?
|
|
25
|
+
|
|
26
|
+
[](https://www.youtube.com/watch?v=o1dMXrIv3Q8)
|
|
27
|
+
|
|
28
|
+
## Supported components
|
|
29
|
+
Here's the list of all available wrappers, with the `Vivid` package name and version used to generate each one.
|
|
30
|
+
If you need to use a different version of a `Vivid` component, simply add it to your application's `package.json`.
|
|
31
|
+
Adding the `resolutions` field when using `yarn` might help get the correct version installed.
|
|
32
|
+
|
|
33
|
+
| Component Name | Package Name | Package Version |
|
|
34
|
+
|----------------|--------------|-----------------|
|
|
35
|
+
| VwcAccordion | @vonage/vwc-accordion | 2.37.0 |
|
|
36
|
+
| VwcActionGroup | @vonage/vwc-action-group | 2.37.0 |
|
|
37
|
+
| VwcBadge | @vonage/vwc-badge | 2.37.0 |
|
|
38
|
+
| VwcBanner | @vonage/vwc-banner | 2.37.0 |
|
|
39
|
+
| VwcButton | @vonage/vwc-button | 2.37.0 |
|
|
40
|
+
| VwcButtonToggleGroup | @vonage/vwc-button-toggle-group | 2.37.0 |
|
|
41
|
+
| VwcCalendar | @vonage/vwc-calendar | 2.37.0 |
|
|
42
|
+
| VwcCard | @vonage/vwc-card | 2.37.0 |
|
|
43
|
+
| VwcCarousel | @vonage/vwc-carousel | 2.37.0 |
|
|
44
|
+
| VwcCheckbox | @vonage/vwc-checkbox | 2.37.0 |
|
|
45
|
+
| VwcChips | @vonage/vwc-chips | 2.37.0 |
|
|
46
|
+
| VwcCircularProgress | @vonage/vwc-circular-progress | 2.37.0 |
|
|
47
|
+
| VwcDataGrid | @vonage/vwc-data-grid | 2.37.0 |
|
|
48
|
+
| VwcDatepicker | @vonage/vwc-datepicker | 2.37.0 |
|
|
49
|
+
| VwcDialog | @vonage/vwc-dialog | 2.37.0 |
|
|
50
|
+
| VwcDrawer | @vonage/vwc-drawer | 2.37.0 |
|
|
51
|
+
| VwcDropdown | @vonage/vwc-dropdown | 2.37.0 |
|
|
52
|
+
| VwcElevation | @vonage/vwc-elevation | 2.37.0 |
|
|
53
|
+
| VwcEmptyState | @vonage/vwc-empty-state | 2.37.0 |
|
|
54
|
+
| VwcExpansionPanel | @vonage/vwc-expansion-panel | 2.37.0 |
|
|
55
|
+
| VwcFab | @vonage/vwc-fab | 2.37.0 |
|
|
56
|
+
| VwcFilePicker | @vonage/vwc-file-picker | 2.37.0 |
|
|
57
|
+
| VwcFormfield | @vonage/vwc-formfield | 2.37.0 |
|
|
58
|
+
| VwcHelperMessage | @vonage/vwc-helper-message | 2.37.0 |
|
|
59
|
+
| VwcIcon | @vonage/vwc-icon | 2.37.0 |
|
|
60
|
+
| VwcIconButton | @vonage/vwc-icon-button | 2.37.0 |
|
|
61
|
+
| VwcIconButtonToggle | @vonage/vwc-icon-button-toggle | 2.37.0 |
|
|
62
|
+
| VwcKeypad | @vonage/vwc-keypad | 2.37.0 |
|
|
63
|
+
| VwcLayout | @vonage/vwc-layout | 2.37.0 |
|
|
64
|
+
| VwcLinearProgress | @vonage/vwc-linear-progress | 2.37.0 |
|
|
65
|
+
| VwcList | @vonage/vwc-list | 2.37.0 |
|
|
66
|
+
| VwcMenu | @vonage/vwc-menu | 2.37.0 |
|
|
67
|
+
| VwcNotchedOutline | @vonage/vwc-notched-outline | 2.37.0 |
|
|
68
|
+
| VwcNote | @vonage/vwc-note | 2.37.0 |
|
|
69
|
+
| VwcPagination | @vonage/vwc-pagination | 2.37.0 |
|
|
70
|
+
| VwcPopup | @vonage/vwc-popup | 2.37.0 |
|
|
71
|
+
| VwcRadio | @vonage/vwc-radio | 2.37.0 |
|
|
72
|
+
| VwcSchemeSelect | @vonage/vwc-scheme-select | 2.37.0 |
|
|
73
|
+
| VwcSelect | @vonage/vwc-select | 2.37.0 |
|
|
74
|
+
| VwcSideDrawer | @vonage/vwc-side-drawer | 2.37.0 |
|
|
75
|
+
| VwcSlider | @vonage/vwc-slider | 2.37.0 |
|
|
76
|
+
| VwcSnackbar | @vonage/vwc-snackbar | 2.37.0 |
|
|
77
|
+
| VwcSurface | @vonage/vwc-surface | 2.37.0 |
|
|
78
|
+
| VwcSwitch | @vonage/vwc-switch | 2.37.0 |
|
|
79
|
+
| VwcTabBar | @vonage/vwc-tab-bar | 2.37.0 |
|
|
80
|
+
| VwcTags | @vonage/vwc-tags | 2.37.0 |
|
|
81
|
+
| VwcText | @vonage/vwc-text | 2.37.0 |
|
|
82
|
+
| VwcTextarea | @vonage/vwc-textarea | 2.37.0 |
|
|
83
|
+
| VwcTextfield | @vonage/vwc-textfield | 2.37.0 |
|
|
84
|
+
| VwcThemeSwitch | @vonage/vwc-theme-switch | 2.37.0 |
|
|
85
|
+
| VwcTooltip | @vonage/vwc-tooltip | 2.37.0 |
|
|
86
|
+
| VwcTopAppBar | @vonage/vwc-top-app-bar | 2.37.0 |
|
|
87
|
+
| VwcTopAppBarFixed | @vonage/vwc-top-app-bar-fixed | 2.37.0 |
|
|
88
|
+
|
|
89
|
+
If the one you're looking for is missing, just [add a new one](#adding-a-component), so everyone can access them.
|
|
90
|
+
|
|
91
|
+
# Usage
|
|
92
|
+
|
|
93
|
+
## Artifactory
|
|
94
|
+
To use this package, you need to have Artifactory setup for your project. See how to do it [here](https://confluence.vonage.com/pages/viewpage.action?pageId=123601806) and [here](https://github.com/newvoicemedia/vonage-cli/blob/master/pipeline-guide/how-to/NODEJS-NPM-DEVELOPMENT.md).
|
|
95
|
+
|
|
96
|
+
## Installation
|
|
97
|
+
Once you have Artifactory configured, just run:
|
|
98
|
+
```shell
|
|
99
|
+
$ yarn add @vonage/vivid-react
|
|
100
|
+
```
|
|
101
|
+
No need for importing `vivid` directly. The dependencies will be installed for you.
|
|
102
|
+
|
|
103
|
+
## Initialization
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
// Function
|
|
107
|
+
import ReactDOM from 'react-dom'
|
|
108
|
+
import { initVivid } from '@vonage/vivid-react'
|
|
109
|
+
const rootElement = document.getElementById('react-root')
|
|
110
|
+
const renderApp = () => {
|
|
111
|
+
// do some more initialization before rendering the main App
|
|
112
|
+
ReactDOM.render(
|
|
113
|
+
<App />,
|
|
114
|
+
rootElement
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
initVivid(rootElement).then(renderApp)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Importing
|
|
122
|
+
Instead of importing each `vivid` component from `@vonage/vwc-*`, import them from `@vonage/vivid-react` instead.
|
|
123
|
+
```javascript
|
|
124
|
+
import VwcCheckbox from '@vonage/vivid-react/VwcCheckbox'
|
|
125
|
+
import VwcSlider from '@vonage/vivid-react/VwcSlider'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Bundling
|
|
129
|
+
This package is an ES module, so you might need to add some configuration to your bundling process.
|
|
130
|
+
|
|
131
|
+
## Testing
|
|
132
|
+
If you have problems rendering `vivid` when using Jest/Enzyme combo, you can add this to your `package.json` to replace all `Vivid` wrapped components with an empty React component.
|
|
133
|
+
It'll work also for _raw_ `vivid` components used in project, since js-dom doesn't support shadow DOM.
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"jest": {
|
|
138
|
+
"moduleNameMapper": {
|
|
139
|
+
"@vonage\/vwc": "@vonage/vivid-react/testing/component.mock.js"
|
|
140
|
+
},
|
|
141
|
+
"transformIgnorePatterns": [
|
|
142
|
+
"node_modules/(?!(@cct|@vonage|@lit|lit-html|lit-element)/)"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
# Development
|
|
149
|
+
|
|
150
|
+
## Adding a component
|
|
151
|
+
Follow the steps:
|
|
152
|
+
* clone this repo
|
|
153
|
+
* create a branch
|
|
154
|
+
* add the missing vivid component as a `dependency` in `package.json`
|
|
155
|
+
* create a new PR and get it merged to `master`
|
|
156
|
+
* [publish](#publishing-a-new-version) new version
|
|
157
|
+
* install the new package in your application
|
|
158
|
+
|
|
159
|
+
## Publishing a new version
|
|
160
|
+
When you want to release the latest changes, checkout the latest `master` branch and run:
|
|
161
|
+
|
|
162
|
+
```shell
|
|
163
|
+
$ yarn version --new-version {minor/major/patch}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Selecting new version number:
|
|
167
|
+
- `patch` - fixing some small issue, without new functionality
|
|
168
|
+
- `minor` - after adding support for a new component, or adding a new awesome feature
|
|
169
|
+
- `major` - after breaking or major package changes
|
|
170
|
+
|
|
171
|
+
## Storybook
|
|
172
|
+
|
|
173
|
+
For test/development storybook is in game. Stories are generated automatically per component
|
|
174
|
+
with no arguments/properties, fill them before using component.
|
|
175
|
+
|
|
176
|
+
## Compound Components
|
|
177
|
+
|
|
178
|
+
In the `scripts/generateWrappers/consts.js` you can define sets of compound components. All they do is filling default props. They are accessible after a dot:
|
|
179
|
+
```javascript
|
|
180
|
+
<VwcButton.Alert />
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
*This is the end*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import '@vonage/vwc-accordion';
|
|
3
|
+
/**
|
|
4
|
+
* @param {boolean} multi attribute: <VwcAccordion multi />
|
|
5
|
+
*/
|
|
6
|
+
declare const VwcAccordion: (props: {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
slot?: string | undefined;
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
style?: React.CSSProperties | undefined;
|
|
11
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
12
|
+
multi?: boolean | undefined;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export default VwcAccordion;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DO NOT EDIT THIS FILE. IT IS GENERATED
|
|
3
|
+
*/
|
|
4
|
+
/*
|
|
5
|
+
Code in this file were generated using following JSON:
|
|
6
|
+
{
|
|
7
|
+
"name": "vwc-accordion",
|
|
8
|
+
"path": "./../node_modules/@vonage/vwc-accordion/src/vwc-accordion.ts",
|
|
9
|
+
"attributes": [
|
|
10
|
+
{
|
|
11
|
+
"name": "multi",
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"default": "false"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"properties": [
|
|
17
|
+
{
|
|
18
|
+
"name": "styles",
|
|
19
|
+
"type": "CSSResult",
|
|
20
|
+
"default": "\"style\""
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "multi",
|
|
24
|
+
"attribute": "multi",
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"default": "false",
|
|
27
|
+
"bindable": false
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"events": []
|
|
31
|
+
}
|
|
32
|
+
*/
|
|
33
|
+
import PropTypes from 'prop-types'
|
|
34
|
+
import wrapper from '@vonage/vivid-react-wrapper'
|
|
35
|
+
import '@vonage/vwc-accordion'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param {boolean} multi attribute: <VwcAccordion multi />
|
|
40
|
+
*/
|
|
41
|
+
const VwcAccordion = wrapper('vwc-accordion', {
|
|
42
|
+
events: [],
|
|
43
|
+
attributes: [],
|
|
44
|
+
properties: []
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
VwcAccordion.propTypes = {
|
|
48
|
+
multi: PropTypes.bool/* default: false *//* attribute: multi */
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
VwcAccordion.defaultProps = {
|
|
52
|
+
multi: false
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
VwcAccordion.displayName = 'VwcAccordion'
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export default VwcAccordion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import '@vonage/vwc-action-group';
|
|
3
|
+
/** Represents an action-group custom element.
|
|
4
|
+
* @param {ActionGroupShape | undefined} shape attribute: <VwcActionGroup shape />
|
|
5
|
+
* @param {ActionGroupLayout | undefined} layout attribute: <VwcActionGroup layout />
|
|
6
|
+
* @param {boolean} tight attribute: <VwcActionGroup tight />
|
|
7
|
+
*/
|
|
8
|
+
declare const VwcActionGroup: (props: {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
slot?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
style?: React.CSSProperties | undefined;
|
|
13
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
14
|
+
shape?: any;
|
|
15
|
+
layout?: any;
|
|
16
|
+
tight?: boolean | undefined;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
export default VwcActionGroup;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DO NOT EDIT THIS FILE. IT IS GENERATED
|
|
3
|
+
*/
|
|
4
|
+
/*
|
|
5
|
+
Code in this file were generated using following JSON:
|
|
6
|
+
{
|
|
7
|
+
"name": "vwc-action-group",
|
|
8
|
+
"path": "./../node_modules/@vonage/vwc-action-group/src/vwc-action-group.ts",
|
|
9
|
+
"description": "Represents an action-group custom element.",
|
|
10
|
+
"attributes": [
|
|
11
|
+
{
|
|
12
|
+
"name": "shape",
|
|
13
|
+
"type": "ActionGroupShape | undefined"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "layout",
|
|
17
|
+
"type": "ActionGroupLayout | undefined"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "tight",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": "false"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"properties": [
|
|
26
|
+
{
|
|
27
|
+
"name": "styles",
|
|
28
|
+
"type": "CSSResult",
|
|
29
|
+
"default": "\"style\""
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "shape",
|
|
33
|
+
"attribute": "shape",
|
|
34
|
+
"type": "ActionGroupShape | undefined",
|
|
35
|
+
"bindable": false
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "layout",
|
|
39
|
+
"attribute": "layout",
|
|
40
|
+
"type": "ActionGroupLayout | undefined",
|
|
41
|
+
"bindable": false
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "tight",
|
|
45
|
+
"attribute": "tight",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": "false",
|
|
48
|
+
"bindable": false
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"slots": [
|
|
52
|
+
{
|
|
53
|
+
"name": "",
|
|
54
|
+
"description": "This is a default/unnamed slot to assign text content. *deprecated* please use _text_ property instead"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"events": []
|
|
58
|
+
}
|
|
59
|
+
*/
|
|
60
|
+
import PropTypes from 'prop-types'
|
|
61
|
+
import wrapper from '@vonage/vivid-react-wrapper'
|
|
62
|
+
import '@vonage/vwc-action-group'
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/** Represents an action-group custom element.
|
|
66
|
+
* @param {ActionGroupShape | undefined} shape attribute: <VwcActionGroup shape />
|
|
67
|
+
* @param {ActionGroupLayout | undefined} layout attribute: <VwcActionGroup layout />
|
|
68
|
+
* @param {boolean} tight attribute: <VwcActionGroup tight />
|
|
69
|
+
*/
|
|
70
|
+
const VwcActionGroup = wrapper('vwc-action-group', {
|
|
71
|
+
events: [],
|
|
72
|
+
attributes: [],
|
|
73
|
+
properties: []
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
VwcActionGroup.propTypes = {
|
|
77
|
+
shape: PropTypes.any /* ActionGroupShape | undefined *//* attribute: shape */,
|
|
78
|
+
layout: PropTypes.any /* ActionGroupLayout | undefined *//* attribute: layout */,
|
|
79
|
+
tight: PropTypes.bool/* default: false *//* attribute: tight */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
VwcActionGroup.defaultProps = {
|
|
83
|
+
tight: false
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
VwcActionGroup.displayName = 'VwcActionGroup'
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
export default VwcActionGroup
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import '@vonage/vwc-badge';
|
|
3
|
+
/** Represents a badge custom element.
|
|
4
|
+
badge is a label that holds small amounts of information. A badge can be used to display unread notifications, or to label a block of text. Badges don’t work for navigation because they can't include a hyperlink.
|
|
5
|
+
* @param {BadgeConnotation | undefined} connotation attribute: <VwcBadge connotation />
|
|
6
|
+
* @param {BadgeShape | undefined} shape attribute: <VwcBadge shape />
|
|
7
|
+
* @param {BadgeLayout | undefined} layout attribute: <VwcBadge layout />
|
|
8
|
+
* @param {boolean} dense attribute: <VwcBadge dense />
|
|
9
|
+
* @param {boolean} enlarged attribute: <VwcBadge enlarged />
|
|
10
|
+
* @param {string | undefined} text attribute: <VwcBadge text />
|
|
11
|
+
* @param {string | undefined} icon attribute: <VwcBadge icon />
|
|
12
|
+
* @param {string | undefined} iconTrailing attribute: <VwcBadge iconTrailing />
|
|
13
|
+
*/
|
|
14
|
+
declare const VwcBadge: (props: {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
slot?: string | undefined;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
style?: React.CSSProperties | undefined;
|
|
19
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
+
connotation?: any;
|
|
21
|
+
shape?: any;
|
|
22
|
+
layout?: any;
|
|
23
|
+
dense?: boolean | undefined;
|
|
24
|
+
enlarged?: boolean | undefined;
|
|
25
|
+
text?: string | undefined;
|
|
26
|
+
icon?: string | undefined;
|
|
27
|
+
iconTrailing?: string | undefined;
|
|
28
|
+
}) => JSX.Element;
|
|
29
|
+
export default VwcBadge;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DO NOT EDIT THIS FILE. IT IS GENERATED
|
|
3
|
+
*/
|
|
4
|
+
/*
|
|
5
|
+
Code in this file were generated using following JSON:
|
|
6
|
+
{
|
|
7
|
+
"name": "vwc-badge",
|
|
8
|
+
"path": "./../node_modules/@vonage/vwc-badge/src/vwc-badge.ts",
|
|
9
|
+
"description": "Represents a badge custom element.\nbadge is a label that holds small amounts of information. A badge can be used to display unread notifications, or to label a block of text. Badges don’t work for navigation because they can't include a hyperlink.",
|
|
10
|
+
"attributes": [
|
|
11
|
+
{
|
|
12
|
+
"name": "connotation",
|
|
13
|
+
"type": "BadgeConnotation | undefined"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "shape",
|
|
17
|
+
"type": "BadgeShape | undefined"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "layout",
|
|
21
|
+
"type": "BadgeLayout | undefined"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "dense",
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"default": "false"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "enlarged",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": "false"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "text",
|
|
35
|
+
"type": "string | undefined"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "icon",
|
|
39
|
+
"type": "string | undefined"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "iconTrailing",
|
|
43
|
+
"type": "string | undefined"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"properties": [
|
|
47
|
+
{
|
|
48
|
+
"name": "styles",
|
|
49
|
+
"type": "CSSResult",
|
|
50
|
+
"default": "\"style\""
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "connotation",
|
|
54
|
+
"attribute": "connotation",
|
|
55
|
+
"type": "BadgeConnotation | undefined",
|
|
56
|
+
"bindable": false
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "shape",
|
|
60
|
+
"attribute": "shape",
|
|
61
|
+
"type": "BadgeShape | undefined",
|
|
62
|
+
"bindable": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "layout",
|
|
66
|
+
"attribute": "layout",
|
|
67
|
+
"type": "BadgeLayout | undefined",
|
|
68
|
+
"bindable": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "dense",
|
|
72
|
+
"attribute": "dense",
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": "false",
|
|
75
|
+
"bindable": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "enlarged",
|
|
79
|
+
"attribute": "enlarged",
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"default": "false",
|
|
82
|
+
"bindable": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "text",
|
|
86
|
+
"attribute": "text",
|
|
87
|
+
"type": "string | undefined",
|
|
88
|
+
"bindable": false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "icon",
|
|
92
|
+
"attribute": "icon",
|
|
93
|
+
"type": "string | undefined",
|
|
94
|
+
"bindable": false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "iconTrailing",
|
|
98
|
+
"attribute": "iconTrailing",
|
|
99
|
+
"type": "string | undefined",
|
|
100
|
+
"bindable": false
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"slots": [
|
|
104
|
+
{
|
|
105
|
+
"name": "",
|
|
106
|
+
"description": "This is a default/unnamed slot to assign text content. *deprecated* please use _text_ property instead"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"events": []
|
|
110
|
+
}
|
|
111
|
+
*/
|
|
112
|
+
import PropTypes from 'prop-types'
|
|
113
|
+
import wrapper from '@vonage/vivid-react-wrapper'
|
|
114
|
+
import '@vonage/vwc-badge'
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/** Represents a badge custom element.
|
|
118
|
+
badge is a label that holds small amounts of information. A badge can be used to display unread notifications, or to label a block of text. Badges don’t work for navigation because they can't include a hyperlink.
|
|
119
|
+
* @param {BadgeConnotation | undefined} connotation attribute: <VwcBadge connotation />
|
|
120
|
+
* @param {BadgeShape | undefined} shape attribute: <VwcBadge shape />
|
|
121
|
+
* @param {BadgeLayout | undefined} layout attribute: <VwcBadge layout />
|
|
122
|
+
* @param {boolean} dense attribute: <VwcBadge dense />
|
|
123
|
+
* @param {boolean} enlarged attribute: <VwcBadge enlarged />
|
|
124
|
+
* @param {string | undefined} text attribute: <VwcBadge text />
|
|
125
|
+
* @param {string | undefined} icon attribute: <VwcBadge icon />
|
|
126
|
+
* @param {string | undefined} iconTrailing attribute: <VwcBadge iconTrailing />
|
|
127
|
+
*/
|
|
128
|
+
const VwcBadge = wrapper('vwc-badge', {
|
|
129
|
+
events: [],
|
|
130
|
+
attributes: [],
|
|
131
|
+
properties: []
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
VwcBadge.propTypes = {
|
|
135
|
+
connotation: PropTypes.any /* BadgeConnotation | undefined *//* attribute: connotation */,
|
|
136
|
+
shape: PropTypes.any /* BadgeShape | undefined *//* attribute: shape */,
|
|
137
|
+
layout: PropTypes.any /* BadgeLayout | undefined *//* attribute: layout */,
|
|
138
|
+
dense: PropTypes.bool/* default: false *//* attribute: dense */,
|
|
139
|
+
enlarged: PropTypes.bool/* default: false *//* attribute: enlarged */,
|
|
140
|
+
text: PropTypes.string/* attribute: text */,
|
|
141
|
+
icon: PropTypes.string/* attribute: icon */,
|
|
142
|
+
iconTrailing: PropTypes.string/* attribute: iconTrailing */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
VwcBadge.defaultProps = {
|
|
146
|
+
dense: false,
|
|
147
|
+
enlarged: false
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
VwcBadge.displayName = 'VwcBadge'
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
export default VwcBadge
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import '@vonage/vwc-banner';
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} message
|
|
5
|
+
* @param {boolean} dismissible
|
|
6
|
+
* @param {BannerConnotation | undefined} connotation
|
|
7
|
+
* @param {string | undefined} icon
|
|
8
|
+
* @param {boolean} open
|
|
9
|
+
* @param {BannerRole} role
|
|
10
|
+
* @param {BannerAriaLive} ariaLive
|
|
11
|
+
*/
|
|
12
|
+
declare const VwcBanner: (props: {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
slot?: string | undefined;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
style?: React.CSSProperties | undefined;
|
|
17
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
dismissible?: boolean | undefined;
|
|
20
|
+
connotation?: any;
|
|
21
|
+
icon?: string | undefined;
|
|
22
|
+
open?: boolean | undefined;
|
|
23
|
+
role?: any;
|
|
24
|
+
ariaLive?: any;
|
|
25
|
+
}) => JSX.Element;
|
|
26
|
+
export default VwcBanner;
|