@dxc-technology/halstack-react 0.0.0-b1729d7 → 0.0.0-b3de035

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 (111) hide show
  1. package/dist/ThemeContext.js +40 -38
  2. package/dist/V3Select/V3Select.js +549 -0
  3. package/dist/V3Select/index.d.ts +27 -0
  4. package/dist/V3Textarea/index.d.ts +27 -0
  5. package/dist/accordion/index.d.ts +28 -0
  6. package/dist/accordion-group/index.d.ts +16 -0
  7. package/dist/alert/Alert.js +1 -1
  8. package/dist/box/index.d.ts +25 -0
  9. package/dist/button/Button.js +2 -2
  10. package/dist/button/index.d.ts +24 -0
  11. package/dist/card/index.d.ts +22 -0
  12. package/dist/checkbox/Checkbox.js +4 -5
  13. package/dist/checkbox/index.d.ts +24 -0
  14. package/dist/chip/index.d.ts +22 -0
  15. package/dist/common/variables.js +128 -123
  16. package/dist/date/Date.js +6 -6
  17. package/dist/date/index.d.ts +27 -0
  18. package/dist/dialog/index.d.ts +18 -0
  19. package/dist/dropdown/index.d.ts +26 -0
  20. package/dist/file-input/FileItem.js +8 -1
  21. package/dist/file-input/index.d.ts +1 -1
  22. package/dist/footer/index.d.ts +25 -0
  23. package/dist/header/Header.js +61 -25
  24. package/dist/header/index.d.ts +25 -0
  25. package/dist/heading/Heading.js +12 -0
  26. package/dist/heading/index.d.ts +17 -0
  27. package/dist/input-text/index.d.ts +36 -0
  28. package/dist/link/index.d.ts +23 -0
  29. package/dist/main.d.ts +36 -4
  30. package/dist/main.js +8 -16
  31. package/dist/paginator/Paginator.js +3 -3
  32. package/dist/paginator/index.d.ts +20 -0
  33. package/dist/password-input/PasswordInput.js +6 -1
  34. package/dist/progress-bar/index.d.ts +18 -0
  35. package/dist/radio/index.d.ts +23 -0
  36. package/dist/resultsetTable/index.d.ts +19 -0
  37. package/dist/select/Select.js +822 -302
  38. package/dist/{new-select → select}/index.d.ts +1 -1
  39. package/dist/sidenav/index.d.ts +13 -0
  40. package/dist/slider/index.d.ts +29 -0
  41. package/dist/spinner/index.d.ts +17 -0
  42. package/dist/switch/index.d.ts +24 -0
  43. package/dist/table/index.d.ts +13 -0
  44. package/dist/tabs/index.d.ts +19 -0
  45. package/dist/tag/index.d.ts +24 -0
  46. package/dist/text-input/TextInput.js +8 -5
  47. package/dist/toggle/index.d.ts +21 -0
  48. package/dist/toggle-group/index.d.ts +21 -0
  49. package/dist/upload/Upload.js +3 -3
  50. package/dist/upload/buttons-upload/ButtonsUpload.js +7 -11
  51. package/dist/upload/buttons-upload/Icons.js +40 -0
  52. package/dist/upload/dragAndDropArea/DragAndDropArea.js +14 -14
  53. package/dist/upload/dragAndDropArea/Icons.js +39 -0
  54. package/dist/upload/file-upload/FileToUpload.js +26 -21
  55. package/dist/upload/file-upload/Icons.js +66 -0
  56. package/dist/upload/index.d.ts +15 -0
  57. package/dist/upload/transaction/Icons.js +160 -0
  58. package/dist/upload/transaction/Transaction.js +11 -38
  59. package/dist/wizard/Icons.js +65 -0
  60. package/dist/wizard/Wizard.js +3 -9
  61. package/dist/wizard/index.d.ts +18 -0
  62. package/package.json +5 -9
  63. package/test/Date.test.js +34 -36
  64. package/test/Heading.test.js +60 -12
  65. package/test/Upload.test.js +4 -4
  66. package/test/{Select.test.js → V3Select.test.js} +12 -12
  67. package/dist/checkbox/Checkbox.stories.js +0 -144
  68. package/dist/checkbox/readme.md +0 -116
  69. package/dist/date/Date.stories.js +0 -205
  70. package/dist/date/readme.md +0 -73
  71. package/dist/link/readme.md +0 -51
  72. package/dist/new-select/NewSelect.js +0 -836
  73. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  74. package/dist/progress-bar/readme.md +0 -63
  75. package/dist/radio/Radio.stories.js +0 -166
  76. package/dist/radio/readme.md +0 -70
  77. package/dist/slider/readme.md +0 -64
  78. package/dist/spinner/Spinner.stories.js +0 -183
  79. package/dist/spinner/readme.md +0 -65
  80. package/dist/switch/Switch.stories.js +0 -134
  81. package/dist/switch/readme.md +0 -133
  82. package/dist/tabs/Tabs.stories.js +0 -130
  83. package/dist/tabs/readme.md +0 -78
  84. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  85. package/dist/tabs-for-sections/readme.md +0 -78
  86. package/dist/toggle/Toggle.stories.js +0 -297
  87. package/dist/toggle/readme.md +0 -80
  88. package/dist/upload/Upload.stories.js +0 -72
  89. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  90. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  91. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  92. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  93. package/dist/upload/file-upload/audio-icon.svg +0 -4
  94. package/dist/upload/file-upload/close.svg +0 -4
  95. package/dist/upload/file-upload/file-icon.svg +0 -4
  96. package/dist/upload/file-upload/video-icon.svg +0 -4
  97. package/dist/upload/readme.md +0 -37
  98. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  99. package/dist/upload/transaction/audio-icon.svg +0 -4
  100. package/dist/upload/transaction/error-icon.svg +0 -4
  101. package/dist/upload/transaction/file-icon-err.svg +0 -4
  102. package/dist/upload/transaction/file-icon.svg +0 -4
  103. package/dist/upload/transaction/image-icon-err.svg +0 -4
  104. package/dist/upload/transaction/image-icon.svg +0 -4
  105. package/dist/upload/transaction/success-icon.svg +0 -4
  106. package/dist/upload/transaction/video-icon-err.svg +0 -4
  107. package/dist/upload/transaction/video-icon.svg +0 -4
  108. package/dist/wizard/invalid_icon.svg +0 -5
  109. package/dist/wizard/valid_icon.svg +0 -5
  110. package/dist/wizard/validation-wrong.svg +0 -6
  111. package/test/TabsForSections.test.js +0 -34
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#666666">
2
- <path fill="none" d="M0 0h24v24H0V0z"/>
3
- <path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"/>
4
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="74.5" height="74.5" viewBox="0 0 24 24" fill="#666666">
2
- <path fill="none" d="M0 0h24v24H0z"/>
3
- <path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="43.5" height="43.5" viewBox="0 0 24 24">
2
- <path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
- <path fill="none" d="M0 0h24v24H0V0z"/>
3
- <path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24">
2
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
- <path fill="none" d="M0 0h24v24H0V0z"/>
3
- <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
- <path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,37 +0,0 @@
1
- # DXC Upload Component
2
-
3
- ## Usage
4
-
5
- ```js
6
- import { V3DxcUpload } from "@dxc-technology/halstack-react";
7
- ```
8
-
9
- ## Props
10
-
11
- <table>
12
- <tr style="background-color: grey">
13
- <td>Name</td>
14
- <td>Default</td>
15
- <td>Description</td>
16
- </tr>
17
- <tr>
18
- <td>onUpload: function</td>
19
- <td></td>
20
- <td>This function will be called when the user clicks the 'Upload' button for every file to be uploaded, we will send as a parameter the File object; apart from that this function should return one promise on which we should make 'then'(here we should show a Success alert) or 'catch' (in this case we would receive the error message as a string)</td>
21
- </tr>
22
-
23
- </table>
24
-
25
- ## Examples
26
-
27
- ```js
28
- import React from "react";
29
-
30
- import { V3DxcUpload } from "@dxc-technology/halstack-react";
31
-
32
- function App() {
33
- return <Upload callbackUpload={callbackFunc} />;
34
- }
35
-
36
- export default App;
37
- ```
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D0011B">
2
- <path fill="none" d="M0 0h24v24H0V0z"/>
3
- <path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D9D9D9">
2
- <path fill="none" d="M0 0h24v24H0V0z"/>
3
- <path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D0011B">
2
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D0011B">
2
- <path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D9D9D9">
2
- <path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D0011B">
2
- <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D9D9D9">
2
- <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#50B50F">
2
- <path fill="none" d="M0 0h24v24H0z"/>
3
- <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D0011B">
2
- <path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#D9D9D9">
2
- <path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
3
- <path d="M0 0h24v24H0z" fill="none"/>
4
- </svg>
@@ -1,5 +0,0 @@
1
- <svg id="highlight_off_black_18dp" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
- <path id="Path_2943" data-name="Path 2943" d="M0,0H18V18H0Z" fill="none"/>
3
- <path id="Path_2944" data-name="Path 2944" d="M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z" transform="translate(-1.002 -1.002)" fill="#ffe6e9"/>
4
- <path id="Path_2945" data-name="Path 2945" d="M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z" transform="translate(-0.501 -0.501)" fill="#d0011b"/>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg id="check_circle_black_18dp" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
- <path id="Path_2946" data-name="Path 2946" d="M0,0H18V18H0Z" fill="none"/>
3
- <path id="Path_2947" data-name="Path 2947" d="M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z" transform="translate(-0.986 -0.986)" fill="#eafaef" opacity="0.999"/>
4
- <path id="Path_2948" data-name="Path 2948" d="M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z" transform="translate(-0.493 -0.493)" fill="#24a148"/>
5
- </svg>
@@ -1,6 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="496" height="496" viewBox="0 0 496 496">
2
- <g id="Group_2913" data-name="Group 2913" transform="translate(5286 3925)">
3
- <path id="Path_2821" data-name="Path 2821" d="M240,0C372.548,0,480,107.452,480,240S372.548,480,240,480,0,372.548,0,240,107.452,0,240,0Z" transform="translate(-5278 -3917)" fill="#f9cfcf"/>
4
- <path id="times-circle-regular" d="M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm0,448A200,200,0,1,1,456,256,199.945,199.945,0,0,1,256,456ZM357.8,193.8,295.6,256l62.2,62.2a12.011,12.011,0,0,1,0,17l-22.6,22.6a12.011,12.011,0,0,1-17,0L256,295.6l-62.2,62.2a12.011,12.011,0,0,1-17,0l-22.6-22.6a12.011,12.011,0,0,1,0-17L216.4,256l-62.2-62.2a12.011,12.011,0,0,1,0-17l22.6-22.6a12.011,12.011,0,0,1,17,0L256,216.4l62.2-62.2a12.011,12.011,0,0,1,17,0l22.6,22.6a12.011,12.011,0,0,1,0,17Z" transform="translate(-5294 -3933)" fill="#e22"/>
5
- </g>
6
- </svg>
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import { render } from "@testing-library/react";
3
- import DxcTabsForSections from "../src/tabs-for-sections/TabsForSections";
4
-
5
- const sections = [
6
- {
7
- tabLabel: "S1",
8
- section: () => <div>test-section-1</div>,
9
- },
10
- {
11
- tabLabel: "S2",
12
- section: () => <div>test-section-2</div>,
13
- },
14
- {
15
- tabLabel: "S3",
16
- section: () => <div>test-section-3</div>,
17
- },
18
- ];
19
-
20
- describe("TabsForSections component tests", () => {
21
- test("TabsForSections renders with correct sections label", () => {
22
- const { getByText } = render(<DxcTabsForSections sections={sections}></DxcTabsForSections>);
23
- expect(getByText("S1")).toBeTruthy();
24
- expect(getByText("S2")).toBeTruthy();
25
- expect(getByText("S3")).toBeTruthy();
26
- });
27
-
28
- test("TabsForSections renders with correct sections content", () => {
29
- const { getByText } = render(<DxcTabsForSections sections={sections}></DxcTabsForSections>);
30
- expect(getByText("test-section-1")).toBeTruthy();
31
- expect(getByText("test-section-2")).toBeTruthy();
32
- expect(getByText("test-section-3")).toBeTruthy();
33
- });
34
- });