@vonage/vivid-react 2.10.47 → 2.10.56

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 (286) hide show
  1. package/.storybook/main.js +11 -0
  2. package/.storybook/preview.js +3 -0
  3. package/README.md +59 -59
  4. package/babel.config.js +38 -0
  5. package/package.json +58 -58
  6. package/rollup.config.js +30 -0
  7. package/scripts/cli.js +28 -0
  8. package/scripts/generateWrappers/consts.js +226 -0
  9. package/scripts/generateWrappers/generator.js +130 -0
  10. package/scripts/generateWrappers/helpers/generator.js +18 -0
  11. package/scripts/generateWrappers/helpers/generator.test.js +56 -0
  12. package/scripts/generateWrappers/index.js +0 -0
  13. package/scripts/generateWrappers/prop.types.js +86 -0
  14. package/scripts/generateWrappers/templates/js/index.tmpl +2 -0
  15. package/scripts/generateWrappers/templates/js/react-component.tmpl +30 -0
  16. package/scripts/generateWrappers/templates/js/stories.tmpl +18 -0
  17. package/scripts/generateWrappers/templates/templates.js +36 -0
  18. package/scripts/generateWrappers/templates/ts/index.tmpl +2 -0
  19. package/scripts/generateWrappers/templates/ts/react-component.tmpl +28 -0
  20. package/scripts/generateWrappers/utils.js +226 -0
  21. package/scripts/generateWrappers/utils.test.js +71 -0
  22. package/scripts/updateDocs.js +42 -0
  23. package/scripts/updateVividPackages.js +81 -0
  24. package/src/dataGrid/index.js +15 -0
  25. package/src/index.js +3 -0
  26. package/src/initialization/initVivid.js +24 -0
  27. package/src/patches/VwcCard/index.js +2 -0
  28. package/src/patches/VwcCard/vwcCardHeadingCrop.js +28 -0
  29. package/src/patches/VwcCard/vwcCardWithMenu.js +14 -0
  30. package/src/patches/index.js +6 -0
  31. package/src/patches/vwcDataGrid.js +26 -0
  32. package/src/patches/vwcNoteContentOverflow.js +20 -0
  33. package/src/patches/vwcSetAttributeValue.js +12 -0
  34. package/src/patches/vwcSnackBarHtmlMessage.js +21 -0
  35. package/src/patches/vwcTooltip.js +46 -0
  36. package/stories/VwcAccordion/VwcAccordion.stories.jsx +18 -0
  37. package/stories/VwcActionGroup/VwcActionGroup.stories.jsx +18 -0
  38. package/stories/VwcBadge/VwcBadge.stories.jsx +18 -0
  39. package/stories/VwcBanner/VwcBanner.stories.jsx +18 -0
  40. package/stories/VwcButton/VwcButton.stories.jsx +18 -0
  41. package/stories/VwcButtonToggleGroup/VwcButtonToggleGroup.stories.jsx +47 -0
  42. package/stories/VwcCalendar/VwcCalendar.stories.jsx +18 -0
  43. package/stories/VwcCalendarEvent/VwcCalendarEvent.stories.jsx +18 -0
  44. package/stories/VwcCard/VwcCard.stories.jsx +90 -0
  45. package/stories/VwcCarousel/VwcCarousel.stories.jsx +18 -0
  46. package/stories/VwcCarouselItem/VwcCarouselItem.stories.jsx +18 -0
  47. package/stories/VwcCheckListItem/VwcCheckListItem.stories.jsx +18 -0
  48. package/stories/VwcCheckbox/VwcCheckbox.stories.jsx +18 -0
  49. package/stories/VwcChip/VwcChip.stories.jsx +18 -0
  50. package/stories/VwcChipSet/VwcChipSet.stories.jsx +38 -0
  51. package/stories/VwcCircularProgress/VwcCircularProgress.stories.jsx +18 -0
  52. package/stories/VwcDataGrid/VwcDataGrid.stories.jsx +109 -0
  53. package/stories/VwcDataGridColumn/VwcDataGridColumn.stories.jsx +18 -0
  54. package/stories/VwcDatepicker/VwcDatepicker.stories.jsx +18 -0
  55. package/stories/VwcDialog/VwcDialog.stories.jsx +18 -0
  56. package/stories/VwcDrawer/VwcDrawer.stories.jsx +18 -0
  57. package/stories/VwcDropdown/VwcDropdown.stories.jsx +18 -0
  58. package/stories/VwcElevation/VwcElevation.stories.jsx +18 -0
  59. package/stories/VwcEmptyState/VwcEmptyState.stories.jsx +18 -0
  60. package/stories/VwcExpansionPanel/VwcExpansionPanel.stories.jsx +18 -0
  61. package/stories/VwcFab/VwcFab.stories.jsx +18 -0
  62. package/stories/VwcFilePicker/VwcFilePicker.stories.jsx +18 -0
  63. package/stories/VwcFormfield/VwcFormfield.stories.jsx +18 -0
  64. package/stories/VwcHelperMessage/VwcHelperMessage.stories.jsx +18 -0
  65. package/stories/VwcIcon/VwcIcon.stories.jsx +18 -0
  66. package/stories/VwcIconButton/VwcIconButton.stories.jsx +18 -0
  67. package/stories/VwcIconButtonToggle/VwcIconButtonToggle.stories.jsx +18 -0
  68. package/stories/VwcKeypad/VwcKeypad.stories.jsx +18 -0
  69. package/stories/VwcLayout/VwcLayout.stories.jsx +63 -0
  70. package/stories/VwcLinearProgress/VwcLinearProgress.stories.jsx +18 -0
  71. package/stories/VwcList/VwcList.stories.jsx +25 -0
  72. package/stories/VwcListExpansionPanel/VwcListExpansionPanel.stories.jsx +18 -0
  73. package/stories/VwcListItem/VwcListItem.stories.jsx +18 -0
  74. package/stories/VwcMenu/VwcMenu.stories.jsx +41 -0
  75. package/stories/VwcNotchedOutline/VwcNotchedOutline.stories.jsx +18 -0
  76. package/stories/VwcNote/VwcNote.stories.jsx +18 -0
  77. package/stories/VwcPagination/VwcPagination.stories.jsx +18 -0
  78. package/stories/VwcPopup/VwcPopup.stories.jsx +18 -0
  79. package/stories/VwcRadio/VwcRadio.stories.jsx +18 -0
  80. package/stories/VwcRadioListItem/VwcRadioListItem.stories.jsx +18 -0
  81. package/stories/VwcSchemeSelect/VwcSchemeSelect.stories.jsx +18 -0
  82. package/stories/VwcSelect/VwcSelect.stories.jsx +18 -0
  83. package/stories/VwcSideDrawer/VwcSideDrawer.stories.jsx +18 -0
  84. package/stories/VwcSlider/VwcSlider.stories.jsx +18 -0
  85. package/stories/VwcSnackbar/VwcSnackbar.stories.jsx +18 -0
  86. package/stories/VwcSurface/VwcSurface.stories.jsx +18 -0
  87. package/stories/VwcSwitch/VwcSwitch.stories.jsx +18 -0
  88. package/stories/VwcTab/VwcTab.stories.jsx +18 -0
  89. package/stories/VwcTabBar/VwcTabBar.stories.jsx +63 -0
  90. package/stories/VwcTag/VwcTag.stories.jsx +18 -0
  91. package/stories/VwcText/VwcText.stories.jsx +18 -0
  92. package/stories/VwcTextarea/VwcTextarea.stories.jsx +24 -0
  93. package/stories/VwcTextfield/VwcTextfield.stories.jsx +47 -0
  94. package/stories/VwcThemeSwitch/VwcThemeSwitch.stories.jsx +18 -0
  95. package/stories/VwcTooltip/VwcTooltip.stories.jsx +41 -0
  96. package/stories/VwcTopAppBar/VwcTopAppBar.stories.jsx +18 -0
  97. package/stories/VwcTopAppBarFixed/VwcTopAppBarFixed.stories.jsx +18 -0
  98. package/stories/patches/patches.stories.jsx +94 -0
  99. package/tsconfig.json +70 -0
  100. package/VwcAccordion/index.d.ts +0 -14
  101. package/VwcAccordion/index.js +0 -59
  102. package/VwcAccordion/package.json +0 -11
  103. package/VwcActionGroup/index.d.ts +0 -18
  104. package/VwcActionGroup/index.js +0 -90
  105. package/VwcActionGroup/package.json +0 -11
  106. package/VwcBadge/index.d.ts +0 -29
  107. package/VwcBadge/index.js +0 -154
  108. package/VwcBadge/package.json +0 -11
  109. package/VwcBanner/index.d.ts +0 -26
  110. package/VwcBanner/index.js +0 -91
  111. package/VwcBanner/package.json +0 -11
  112. package/VwcButton/index.d.ts +0 -55
  113. package/VwcButton/index.js +0 -240
  114. package/VwcButton/package.json +0 -11
  115. package/VwcButtonToggleGroup/index.d.ts +0 -25
  116. package/VwcButtonToggleGroup/index.js +0 -91
  117. package/VwcButtonToggleGroup/package.json +0 -11
  118. package/VwcCalendar/index.d.ts +0 -20
  119. package/VwcCalendar/index.js +0 -70
  120. package/VwcCalendar/package.json +0 -11
  121. package/VwcCalendarEvent/index.d.ts +0 -25
  122. package/VwcCalendarEvent/index.js +0 -81
  123. package/VwcCalendarEvent/package.json +0 -11
  124. package/VwcCard/index.d.ts +0 -23
  125. package/VwcCard/index.js +0 -76
  126. package/VwcCard/package.json +0 -11
  127. package/VwcCarousel/index.d.ts +0 -14
  128. package/VwcCarousel/index.js +0 -45
  129. package/VwcCarousel/package.json +0 -11
  130. package/VwcCarouselItem/index.d.ts +0 -14
  131. package/VwcCarouselItem/index.js +0 -49
  132. package/VwcCarouselItem/package.json +0 -11
  133. package/VwcCheckListItem/index.d.ts +0 -41
  134. package/VwcCheckListItem/index.js +0 -153
  135. package/VwcCheckListItem/package.json +0 -11
  136. package/VwcCheckbox/index.d.ts +0 -34
  137. package/VwcCheckbox/index.js +0 -126
  138. package/VwcCheckbox/package.json +0 -11
  139. package/VwcChip/index.d.ts +0 -31
  140. package/VwcChip/index.js +0 -106
  141. package/VwcChip/package.json +0 -11
  142. package/VwcChipSet/index.d.ts +0 -16
  143. package/VwcChipSet/index.js +0 -60
  144. package/VwcChipSet/package.json +0 -11
  145. package/VwcCircularProgress/index.d.ts +0 -24
  146. package/VwcCircularProgress/index.js +0 -84
  147. package/VwcCircularProgress/package.json +0 -11
  148. package/VwcDataGrid/index.d.ts +0 -33
  149. package/VwcDataGrid/index.js +0 -122
  150. package/VwcDataGrid/package.json +0 -11
  151. package/VwcDataGridColumn/index.d.ts +0 -43
  152. package/VwcDataGridColumn/index.js +0 -144
  153. package/VwcDataGridColumn/package.json +0 -11
  154. package/VwcDatepicker/index.d.ts +0 -120
  155. package/VwcDatepicker/index.js +0 -422
  156. package/VwcDatepicker/package.json +0 -11
  157. package/VwcDialog/index.d.ts +0 -40
  158. package/VwcDialog/index.js +0 -135
  159. package/VwcDialog/package.json +0 -11
  160. package/VwcDrawer/index.d.ts +0 -20
  161. package/VwcDrawer/index.js +0 -80
  162. package/VwcDrawer/package.json +0 -11
  163. package/VwcDropdown/index.d.ts +0 -61
  164. package/VwcDropdown/index.js +0 -221
  165. package/VwcDropdown/package.json +0 -11
  166. package/VwcElevation/index.d.ts +0 -14
  167. package/VwcElevation/index.js +0 -45
  168. package/VwcElevation/package.json +0 -11
  169. package/VwcEmptyState/index.d.ts +0 -18
  170. package/VwcEmptyState/index.js +0 -59
  171. package/VwcEmptyState/package.json +0 -11
  172. package/VwcExpansionPanel/index.d.ts +0 -34
  173. package/VwcExpansionPanel/index.js +0 -199
  174. package/VwcExpansionPanel/package.json +0 -11
  175. package/VwcFab/index.d.ts +0 -32
  176. package/VwcFab/index.js +0 -124
  177. package/VwcFab/package.json +0 -11
  178. package/VwcFilePicker/index.d.ts +0 -24
  179. package/VwcFilePicker/index.js +0 -88
  180. package/VwcFilePicker/package.json +0 -11
  181. package/VwcFormfield/index.d.ts +0 -20
  182. package/VwcFormfield/index.js +0 -70
  183. package/VwcFormfield/package.json +0 -11
  184. package/VwcHelperMessage/index.d.ts +0 -14
  185. package/VwcHelperMessage/index.js +0 -49
  186. package/VwcHelperMessage/package.json +0 -11
  187. package/VwcIcon/index.d.ts +0 -22
  188. package/VwcIcon/index.js +0 -102
  189. package/VwcIcon/package.json +0 -11
  190. package/VwcIconButton/index.d.ts +0 -31
  191. package/VwcIconButton/index.js +0 -111
  192. package/VwcIconButton/package.json +0 -11
  193. package/VwcIconButtonToggle/index.d.ts +0 -37
  194. package/VwcIconButtonToggle/index.js +0 -136
  195. package/VwcIconButtonToggle/package.json +0 -11
  196. package/VwcKeypad/index.d.ts +0 -31
  197. package/VwcKeypad/index.js +0 -176
  198. package/VwcKeypad/package.json +0 -11
  199. package/VwcLayout/index.d.ts +0 -20
  200. package/VwcLayout/index.js +0 -105
  201. package/VwcLayout/package.json +0 -11
  202. package/VwcLinearProgress/index.d.ts +0 -26
  203. package/VwcLinearProgress/index.js +0 -98
  204. package/VwcLinearProgress/package.json +0 -11
  205. package/VwcList/index.d.ts +0 -35
  206. package/VwcList/index.js +0 -146
  207. package/VwcList/package.json +0 -11
  208. package/VwcListExpansionPanel/index.d.ts +0 -19
  209. package/VwcListExpansionPanel/index.js +0 -68
  210. package/VwcListExpansionPanel/package.json +0 -11
  211. package/VwcListItem/index.d.ts +0 -42
  212. package/VwcListItem/index.js +0 -171
  213. package/VwcListItem/package.json +0 -11
  214. package/VwcMenu/index.d.ts +0 -53
  215. package/VwcMenu/index.js +0 -210
  216. package/VwcMenu/package.json +0 -11
  217. package/VwcNotchedOutline/index.d.ts +0 -17
  218. package/VwcNotchedOutline/index.js +0 -58
  219. package/VwcNotchedOutline/package.json +0 -11
  220. package/VwcNote/index.d.ts +0 -18
  221. package/VwcNote/index.js +0 -59
  222. package/VwcNote/package.json +0 -11
  223. package/VwcPagination/index.d.ts +0 -16
  224. package/VwcPagination/index.js +0 -52
  225. package/VwcPagination/package.json +0 -11
  226. package/VwcPopup/index.d.ts +0 -30
  227. package/VwcPopup/index.js +0 -147
  228. package/VwcPopup/package.json +0 -11
  229. package/VwcRadio/index.d.ts +0 -52
  230. package/VwcRadio/index.js +0 -149
  231. package/VwcRadio/package.json +0 -11
  232. package/VwcRadioListItem/index.d.ts +0 -41
  233. package/VwcRadioListItem/index.js +0 -148
  234. package/VwcRadioListItem/package.json +0 -11
  235. package/VwcSchemeSelect/index.d.ts +0 -14
  236. package/VwcSchemeSelect/index.js +0 -46
  237. package/VwcSchemeSelect/package.json +0 -11
  238. package/VwcSelect/index.d.ts +0 -60
  239. package/VwcSelect/index.js +0 -253
  240. package/VwcSelect/package.json +0 -11
  241. package/VwcSideDrawer/index.d.ts +0 -22
  242. package/VwcSideDrawer/index.js +0 -73
  243. package/VwcSideDrawer/package.json +0 -11
  244. package/VwcSlider/index.d.ts +0 -34
  245. package/VwcSlider/index.js +0 -129
  246. package/VwcSlider/package.json +0 -11
  247. package/VwcSnackbar/index.d.ts +0 -42
  248. package/VwcSnackbar/index.js +0 -138
  249. package/VwcSnackbar/package.json +0 -11
  250. package/VwcSurface/index.d.ts +0 -42
  251. package/VwcSurface/index.js +0 -145
  252. package/VwcSurface/package.json +0 -11
  253. package/VwcSwitch/index.d.ts +0 -27
  254. package/VwcSwitch/index.js +0 -114
  255. package/VwcSwitch/package.json +0 -11
  256. package/VwcTab/index.d.ts +0 -40
  257. package/VwcTab/index.js +0 -151
  258. package/VwcTab/package.json +0 -11
  259. package/VwcTabBar/index.d.ts +0 -15
  260. package/VwcTabBar/index.js +0 -55
  261. package/VwcTabBar/package.json +0 -11
  262. package/VwcTag/index.d.ts +0 -34
  263. package/VwcTag/index.js +0 -115
  264. package/VwcTag/package.json +0 -11
  265. package/VwcText/index.d.ts +0 -18
  266. package/VwcText/index.js +0 -83
  267. package/VwcText/package.json +0 -11
  268. package/VwcTextarea/index.d.ts +0 -93
  269. package/VwcTextarea/index.js +0 -331
  270. package/VwcTextarea/package.json +0 -11
  271. package/VwcTextfield/index.d.ts +0 -89
  272. package/VwcTextfield/index.js +0 -329
  273. package/VwcTextfield/package.json +0 -11
  274. package/VwcThemeSwitch/index.d.ts +0 -14
  275. package/VwcThemeSwitch/index.js +0 -57
  276. package/VwcThemeSwitch/package.json +0 -11
  277. package/VwcTooltip/index.d.ts +0 -22
  278. package/VwcTooltip/index.js +0 -105
  279. package/VwcTooltip/package.json +0 -11
  280. package/VwcTopAppBar/index.d.ts +0 -22
  281. package/VwcTopAppBar/index.js +0 -77
  282. package/VwcTopAppBar/package.json +0 -11
  283. package/VwcTopAppBarFixed/index.d.ts +0 -22
  284. package/VwcTopAppBarFixed/index.js +0 -88
  285. package/VwcTopAppBarFixed/package.json +0 -11
  286. package/index.js +0 -281
@@ -0,0 +1,41 @@
1
+ import React from 'react'
2
+ import VwcTooltip from '../../dist/VwcTooltip'
3
+ import VwcButton from '../../dist/VwcButton'
4
+ import { vwcTooltipShowOnHoverDecorator } from '../../src/patches/vwcTooltip'
5
+
6
+ export const Default = () => {
7
+ return (
8
+ <>
9
+ <VwcTooltip anchor='btn' id='tooltip' text='Tooltip text' open />
10
+ <VwcButton
11
+ label='Button'
12
+ disabled={true}
13
+ aria-describedby='tooltip'
14
+ id='btn'
15
+ />
16
+ </>
17
+ )
18
+ }
19
+
20
+ export const ShowHideOnADisabledControl = () => {
21
+ return (
22
+ <>
23
+ <VwcTooltip
24
+ ref={vwcTooltipShowOnHoverDecorator()}
25
+ anchor='btn'
26
+ id='tooltip'
27
+ text='Tooltip text'
28
+ />
29
+ <VwcButton
30
+ label='Button'
31
+ disabled={true}
32
+ aria-describedby='tooltip'
33
+ id='btn'
34
+ />
35
+ </>
36
+ )
37
+ }
38
+
39
+ export default {
40
+ title: 'VwcTooltip'
41
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import VwcTopAppBar from '../../dist/VwcTopAppBar'
3
+
4
+ export const Default = () => <VwcTopAppBar />
5
+ export default {
6
+ title: 'VwcTopAppBar',
7
+ argTypes: {
8
+ //
9
+ // Example values
10
+ // numberValue: { control: 'number', defaultValue: 123 },
11
+ // booleanValue: { control: 'boolean', defaultValue: true },
12
+ // objectValue: { control: 'object', defaultValue: {} },
13
+ // stringValue: { control: 'string', defaultValue: 'string' },
14
+ // colorValue: { control: 'color' },
15
+ // dateValue: { control: 'date' }
16
+ //
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import VwcTopAppBarFixed from '../../dist/VwcTopAppBarFixed'
3
+
4
+ export const Default = () => <VwcTopAppBarFixed />
5
+ export default {
6
+ title: 'VwcTopAppBarFixed',
7
+ argTypes: {
8
+ //
9
+ // Example values
10
+ // numberValue: { control: 'number', defaultValue: 123 },
11
+ // booleanValue: { control: 'boolean', defaultValue: true },
12
+ // objectValue: { control: 'object', defaultValue: {} },
13
+ // stringValue: { control: 'string', defaultValue: 'string' },
14
+ // colorValue: { control: 'color' },
15
+ // dateValue: { control: 'date' }
16
+ //
17
+ }
18
+ }
@@ -0,0 +1,94 @@
1
+ import React from 'react'
2
+ import VwcDataGrid from '../../dist/VwcDataGrid'
3
+ import VwcSlider from '../../dist/VwcSlider'
4
+ import VwcDataGridColumn from '../../dist/VwcDataGridColumn'
5
+ import VwcTooltip from '../../dist/VwcTooltip'
6
+ import VwcButton from '../../dist/VwcButton'
7
+ import VwcNote from '../../dist/VwcNote'
8
+ import VwcSelect from '../../dist/VwcSelect'
9
+ import VwcListItem from '../../dist/VwcListItem'
10
+ import VwcSnackbar from '../../dist/VwcSnackbar'
11
+ import VwcIconButton from '../../dist/VwcIconButton'
12
+
13
+ import {
14
+ cellRendererFactory,
15
+ vwcDataGridElementCellOverflowDecorator,
16
+ vwcTooltipShowOnHoverDecorator
17
+ } from '../../src'
18
+ import { vwcNoteContentOverflowDecorator } from '../../src/patches/vwcNoteContentOverflow'
19
+ import { vwcSnackBarHtmlMessageDecorator } from '../../src/patches/vwcSnackBarHtmlMessage'
20
+ import { vwcSetAttributeValue } from '../../src/patches/vwcSetAttributeValue'
21
+
22
+ export const VwcTooltipShowOnHover = () => (
23
+ <>
24
+ <VwcTooltip
25
+ ref={vwcTooltipShowOnHoverDecorator()}
26
+ anchor='btn'
27
+ id='tooltip'
28
+ text='Tooltip text'
29
+ />
30
+ <VwcButton label='Button' aria-describedby='tooltip' id='btn' />
31
+ </>
32
+ )
33
+
34
+ const sliderCellRenderer = (container, { grid }, { item }) =>
35
+ cellRendererFactory(
36
+ <VwcSlider pin step={1} value={5} min={1} max={10} />,
37
+ container
38
+ )
39
+
40
+ const dataProvider = ({ page, pageSize }, callback) => {
41
+ callback([{}], 1)
42
+ }
43
+
44
+ export const DataGridCellOverflow = () => (
45
+ <VwcDataGrid
46
+ ref={vwcDataGridElementCellOverflowDecorator}
47
+ dataProvider={dataProvider}
48
+ >
49
+ <VwcDataGridColumn
50
+ header='Level'
51
+ resizable
52
+ cellRenderer={sliderCellRenderer}
53
+ footer=''
54
+ />
55
+ </VwcDataGrid>
56
+ )
57
+
58
+ export const AllowContentOverflow = () => (
59
+ <VwcNote
60
+ ref={vwcNoteContentOverflowDecorator}
61
+ header='Allow dropdown content overflow the Note card boundaries'
62
+ >
63
+ <VwcSelect>
64
+ <VwcListItem>Item 1</VwcListItem>
65
+ <VwcListItem>Item 1</VwcListItem>
66
+ <VwcListItem>Item 1</VwcListItem>
67
+ <VwcListItem>Item 1</VwcListItem>
68
+ <VwcListItem>Item 1</VwcListItem>
69
+ </VwcSelect>
70
+ </VwcNote>
71
+ )
72
+
73
+ export const SnackBarWithHTMLContent = () => (
74
+ <VwcSnackbar
75
+ ref={vwcSnackBarHtmlMessageDecorator(
76
+ 'This is <i>truly</i> html <b>message</b>'
77
+ )}
78
+ onClosed={e => (e.target.open = true)}
79
+ legacy
80
+ header='html message demo'
81
+ dismissible
82
+ icon='info'
83
+ open
84
+ timeoutMs={9000}
85
+ ></VwcSnackbar>
86
+ )
87
+
88
+ export const VwcIconButtonValue = () => (
89
+ <VwcIconButton ref={vwcSetAttributeValue('value', 'v')}></VwcIconButton>
90
+ )
91
+
92
+ export default {
93
+ title: 'Patches'
94
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+
5
+ /* Basic Options */
6
+ // "incremental": true, /* Enable incremental compilation */
7
+ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
+ "module": "ESNext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
+ // "lib": ["ES2015"], /* Specify library files to be included in the compilation. */
10
+ // "allowJs": true, /* Allow javascript files to be compiled. */
11
+ // "checkJs": true, /* Report errors in .js files. */
12
+ "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
13
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
14
+ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
+ // "sourceMap": true, /* Generates corresponding '.map' file. */
16
+ // "outFile": "./", /* Concatenate and emit output to single file. */
17
+ "outDir": "./dist", /* Redirect output structure to the directory. */
18
+ "rootDir": "./dist.ts", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19
+ // "composite": true, /* Enable project compilation */
20
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
+ // "removeComments": true, /* Do not emit comments to output. */
22
+ // "noEmit": true, /* Do not emit outputs. */
23
+ "emitDeclarationOnly": true,
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ "strict": true, /* Enable all strict type-checking options. */
30
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
+ // "strictNullChecks": true, /* Enable strict null checks. */
32
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
36
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
+
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+
44
+ /* Module Resolution Options */
45
+ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ "typeRoots": ["types"], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
+
66
+ /* Advanced Options */
67
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
68
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
69
+ }
70
+ }
@@ -1,14 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import '@vonage/vwc-accordion';
3
- /**
4
- * @param {boolean} multi attribute: &lt;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;
@@ -1,59 +0,0 @@
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: &lt;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
@@ -1,11 +0,0 @@
1
- {
2
- "name": "@vonage/vivid-react-vwc-accordion",
3
- "version": "2.10.47",
4
- "main": "index.js",
5
- "types": "index.d.ts",
6
- "private": true,
7
- "license": "MIT",
8
- "dependencies": {
9
- "@vonage/vwc-accordion": "2.37.0"
10
- }
11
- }
@@ -1,18 +0,0 @@
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: &lt;VwcActionGroup shape />
5
- * @param {ActionGroupLayout | undefined} layout attribute: &lt;VwcActionGroup layout />
6
- * @param {boolean} tight attribute: &lt;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;
@@ -1,90 +0,0 @@
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: &lt;VwcActionGroup shape />
67
- * @param {ActionGroupLayout | undefined} layout attribute: &lt;VwcActionGroup layout />
68
- * @param {boolean} tight attribute: &lt;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
@@ -1,11 +0,0 @@
1
- {
2
- "name": "@vonage/vivid-react-vwc-action-group",
3
- "version": "2.10.47",
4
- "main": "index.js",
5
- "types": "index.d.ts",
6
- "private": true,
7
- "license": "MIT",
8
- "dependencies": {
9
- "@vonage/vwc-action-group": "2.37.0"
10
- }
11
- }
@@ -1,29 +0,0 @@
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: &lt;VwcBadge connotation />
6
- * @param {BadgeShape | undefined} shape attribute: &lt;VwcBadge shape />
7
- * @param {BadgeLayout | undefined} layout attribute: &lt;VwcBadge layout />
8
- * @param {boolean} dense attribute: &lt;VwcBadge dense />
9
- * @param {boolean} enlarged attribute: &lt;VwcBadge enlarged />
10
- * @param {string | undefined} text attribute: &lt;VwcBadge text />
11
- * @param {string | undefined} icon attribute: &lt;VwcBadge icon />
12
- * @param {string | undefined} iconTrailing attribute: &lt;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;
package/VwcBadge/index.js DELETED
@@ -1,154 +0,0 @@
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: &lt;VwcBadge connotation />
120
- * @param {BadgeShape | undefined} shape attribute: &lt;VwcBadge shape />
121
- * @param {BadgeLayout | undefined} layout attribute: &lt;VwcBadge layout />
122
- * @param {boolean} dense attribute: &lt;VwcBadge dense />
123
- * @param {boolean} enlarged attribute: &lt;VwcBadge enlarged />
124
- * @param {string | undefined} text attribute: &lt;VwcBadge text />
125
- * @param {string | undefined} icon attribute: &lt;VwcBadge icon />
126
- * @param {string | undefined} iconTrailing attribute: &lt;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
@@ -1,11 +0,0 @@
1
- {
2
- "name": "@vonage/vivid-react-vwc-badge",
3
- "version": "2.10.47",
4
- "main": "index.js",
5
- "types": "index.d.ts",
6
- "private": true,
7
- "license": "MIT",
8
- "dependencies": {
9
- "@vonage/vwc-badge": "2.37.0"
10
- }
11
- }