@dxc-technology/halstack-react 0.0.0-fb21419 → 0.0.0-fb44418

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 (196) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +3931 -0
  3. package/dist/index.d.ts +3931 -0
  4. package/dist/index.js +14177 -0
  5. package/dist/index.mjs +14089 -0
  6. package/package.json +92 -66
  7. package/babel.config.js +0 -8
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -216
  10. package/dist/accordion/Accordion.js +0 -340
  11. package/dist/accordion/Accordion.stories.js +0 -207
  12. package/dist/accordion/readme.md +0 -96
  13. package/dist/accordion-group/AccordionGroup.js +0 -188
  14. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  15. package/dist/accordion-group/readme.md +0 -70
  16. package/dist/alert/Alert.js +0 -388
  17. package/dist/alert/Alert.stories.js +0 -158
  18. package/dist/alert/close.svg +0 -4
  19. package/dist/alert/error.svg +0 -4
  20. package/dist/alert/info.svg +0 -4
  21. package/dist/alert/readme.md +0 -43
  22. package/dist/alert/success.svg +0 -4
  23. package/dist/alert/warning.svg +0 -4
  24. package/dist/badge/Badge.js +0 -63
  25. package/dist/box/Box.js +0 -164
  26. package/dist/button/Button.js +0 -228
  27. package/dist/button/Button.stories.js +0 -224
  28. package/dist/button/readme.md +0 -93
  29. package/dist/card/Card.js +0 -256
  30. package/dist/checkbox/Checkbox.js +0 -291
  31. package/dist/checkbox/Checkbox.stories.js +0 -144
  32. package/dist/checkbox/readme.md +0 -116
  33. package/dist/chip/Chip.js +0 -263
  34. package/dist/common/OpenSans.css +0 -81
  35. package/dist/common/RequiredComponent.js +0 -40
  36. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  37. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  38. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  39. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  40. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  41. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  42. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  43. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  44. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  45. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  46. package/dist/common/utils.js +0 -22
  47. package/dist/common/variables.js +0 -1160
  48. package/dist/date/Date.js +0 -391
  49. package/dist/date/Date.stories.js +0 -205
  50. package/dist/date/calendar.svg +0 -1
  51. package/dist/date/calendar_dark.svg +0 -1
  52. package/dist/date/readme.md +0 -73
  53. package/dist/dialog/Dialog.js +0 -236
  54. package/dist/dialog/Dialog.stories.js +0 -217
  55. package/dist/dialog/readme.md +0 -32
  56. package/dist/dropdown/Dropdown.js +0 -492
  57. package/dist/dropdown/Dropdown.stories.js +0 -249
  58. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  59. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  60. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  61. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  62. package/dist/dropdown/readme.md +0 -69
  63. package/dist/footer/Footer.js +0 -405
  64. package/dist/footer/Footer.stories.js +0 -94
  65. package/dist/footer/dxc_logo_wht.png +0 -0
  66. package/dist/footer/readme.md +0 -41
  67. package/dist/header/Header.js +0 -431
  68. package/dist/header/Header.stories.js +0 -176
  69. package/dist/header/close_icon.svg +0 -1
  70. package/dist/header/dxc_logo_black.png +0 -0
  71. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  72. package/dist/header/dxc_logo_white.png +0 -0
  73. package/dist/header/hamb_menu_black.svg +0 -1
  74. package/dist/header/hamb_menu_white.svg +0 -1
  75. package/dist/header/readme.md +0 -33
  76. package/dist/heading/Heading.js +0 -222
  77. package/dist/input-text/InputText.js +0 -669
  78. package/dist/input-text/InputText.stories.js +0 -209
  79. package/dist/input-text/error.svg +0 -1
  80. package/dist/input-text/readme.md +0 -91
  81. package/dist/layout/ApplicationLayout.js +0 -331
  82. package/dist/layout/facebook.svg +0 -45
  83. package/dist/layout/linkedin.svg +0 -50
  84. package/dist/layout/twitter.svg +0 -53
  85. package/dist/link/Link.js +0 -240
  86. package/dist/link/readme.md +0 -51
  87. package/dist/main.js +0 -311
  88. package/dist/paginator/Paginator.js +0 -283
  89. package/dist/paginator/images/next.svg +0 -3
  90. package/dist/paginator/images/nextPage.svg +0 -3
  91. package/dist/paginator/images/previous.svg +0 -3
  92. package/dist/paginator/images/previousPage.svg +0 -3
  93. package/dist/paginator/readme.md +0 -50
  94. package/dist/progress-bar/ProgressBar.js +0 -206
  95. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  96. package/dist/progress-bar/readme.md +0 -63
  97. package/dist/radio/Radio.js +0 -209
  98. package/dist/radio/Radio.stories.js +0 -166
  99. package/dist/radio/readme.md +0 -70
  100. package/dist/resultsetTable/ResultsetTable.js +0 -375
  101. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  102. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  103. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  104. package/dist/select/Select.js +0 -545
  105. package/dist/select/Select.stories.js +0 -235
  106. package/dist/select/readme.md +0 -72
  107. package/dist/sidenav/Sidenav.js +0 -183
  108. package/dist/slider/Slider.js +0 -315
  109. package/dist/slider/Slider.stories.js +0 -241
  110. package/dist/slider/readme.md +0 -64
  111. package/dist/spinner/Spinner.js +0 -214
  112. package/dist/spinner/Spinner.stories.js +0 -183
  113. package/dist/spinner/readme.md +0 -65
  114. package/dist/switch/Switch.js +0 -222
  115. package/dist/switch/Switch.stories.js +0 -134
  116. package/dist/switch/readme.md +0 -133
  117. package/dist/table/Table.js +0 -128
  118. package/dist/tabs/Tabs.js +0 -343
  119. package/dist/tabs/Tabs.stories.js +0 -130
  120. package/dist/tabs/readme.md +0 -78
  121. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  122. package/dist/tabs-for-sections/readme.md +0 -78
  123. package/dist/tag/Tag.js +0 -280
  124. package/dist/textarea/Textarea.js +0 -260
  125. package/dist/toggle/Toggle.js +0 -220
  126. package/dist/toggle/Toggle.stories.js +0 -297
  127. package/dist/toggle/readme.md +0 -80
  128. package/dist/toggle-group/ToggleGroup.js +0 -241
  129. package/dist/toggle-group/readme.md +0 -82
  130. package/dist/upload/Upload.js +0 -205
  131. package/dist/upload/Upload.stories.js +0 -72
  132. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  133. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  134. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  135. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -325
  136. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  137. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  138. package/dist/upload/file-upload/FileToUpload.js +0 -184
  139. package/dist/upload/file-upload/audio-icon.svg +0 -4
  140. package/dist/upload/file-upload/close.svg +0 -4
  141. package/dist/upload/file-upload/file-icon.svg +0 -4
  142. package/dist/upload/file-upload/video-icon.svg +0 -4
  143. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  144. package/dist/upload/readme.md +0 -37
  145. package/dist/upload/transaction/Transaction.js +0 -171
  146. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  147. package/dist/upload/transaction/audio-icon.svg +0 -4
  148. package/dist/upload/transaction/error-icon.svg +0 -4
  149. package/dist/upload/transaction/file-icon-err.svg +0 -4
  150. package/dist/upload/transaction/file-icon.svg +0 -4
  151. package/dist/upload/transaction/image-icon-err.svg +0 -4
  152. package/dist/upload/transaction/image-icon.svg +0 -4
  153. package/dist/upload/transaction/success-icon.svg +0 -4
  154. package/dist/upload/transaction/video-icon-err.svg +0 -4
  155. package/dist/upload/transaction/video-icon.svg +0 -4
  156. package/dist/upload/transactions/Transactions.js +0 -138
  157. package/dist/useTheme.js +0 -22
  158. package/dist/wizard/Wizard.js +0 -383
  159. package/dist/wizard/invalid_icon.svg +0 -6
  160. package/dist/wizard/valid_icon.svg +0 -6
  161. package/dist/wizard/validation-wrong.svg +0 -6
  162. package/test/Accordion.test.js +0 -33
  163. package/test/AccordionGroup.test.js +0 -125
  164. package/test/Alert.test.js +0 -53
  165. package/test/Box.test.js +0 -10
  166. package/test/Button.test.js +0 -18
  167. package/test/Card.test.js +0 -30
  168. package/test/Checkbox.test.js +0 -45
  169. package/test/Chip.test.js +0 -25
  170. package/test/Date.test.js +0 -393
  171. package/test/Dialog.test.js +0 -23
  172. package/test/Dropdown.test.js +0 -130
  173. package/test/Footer.test.js +0 -99
  174. package/test/Header.test.js +0 -39
  175. package/test/Heading.test.js +0 -35
  176. package/test/InputText.test.js +0 -240
  177. package/test/Link.test.js +0 -43
  178. package/test/Paginator.test.js +0 -177
  179. package/test/ProgressBar.test.js +0 -35
  180. package/test/Radio.test.js +0 -37
  181. package/test/ResultsetTable.test.js +0 -330
  182. package/test/Select.test.js +0 -192
  183. package/test/Sidenav.test.js +0 -45
  184. package/test/Slider.test.js +0 -82
  185. package/test/Spinner.test.js +0 -27
  186. package/test/Switch.test.js +0 -45
  187. package/test/Table.test.js +0 -36
  188. package/test/Tabs.test.js +0 -109
  189. package/test/TabsForSections.test.js +0 -34
  190. package/test/Tag.test.js +0 -32
  191. package/test/TextArea.test.js +0 -52
  192. package/test/ToggleGroup.test.js +0 -81
  193. package/test/Upload.test.js +0 -60
  194. package/test/Wizard.test.js +0 -130
  195. package/test/mocks/pngMock.js +0 -1
  196. package/test/mocks/svgMock.js +0 -1
@@ -1,50 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="438.536px" height="438.536px" viewBox="0 0 438.536 438.536" style="enable-background:new 0 0 438.536 438.536;"
6
- xml:space="preserve" fill="#FFFFFF">
7
- <g>
8
- <path d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
9
- C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
10
- h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
11
- C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332
12
- c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41
13
- c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708
14
- c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92
15
- c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991
16
- c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974
17
- c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64
18
- H370.873z"/>
19
- </g>
20
- <g>
21
- </g>
22
- <g>
23
- </g>
24
- <g>
25
- </g>
26
- <g>
27
- </g>
28
- <g>
29
- </g>
30
- <g>
31
- </g>
32
- <g>
33
- </g>
34
- <g>
35
- </g>
36
- <g>
37
- </g>
38
- <g>
39
- </g>
40
- <g>
41
- </g>
42
- <g>
43
- </g>
44
- <g>
45
- </g>
46
- <g>
47
- </g>
48
- <g>
49
- </g>
50
- </svg>
@@ -1,53 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="438.536px" height="438.536px" viewBox="0 0 438.536 438.536" style="enable-background:new 0 0 438.536 438.536;"
6
- xml:space="preserve" fill="#FFFFFF">
7
- <g>
8
- <path d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
9
- C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
10
- h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
11
- C438.532,59.576,430.49,40.204,414.41,24.123z M335.471,168.735c0.191,1.713,0.288,4.278,0.288,7.71
12
- c0,15.989-2.334,32.025-6.995,48.104c-4.661,16.087-11.8,31.504-21.416,46.254c-9.606,14.749-21.074,27.791-34.396,39.115
13
- c-13.325,11.32-29.311,20.365-47.968,27.117c-18.648,6.762-38.637,10.143-59.953,10.143c-33.116,0-63.76-8.952-91.931-26.836
14
- c4.568,0.568,9.329,0.855,14.275,0.855c27.6,0,52.439-8.565,74.519-25.7c-12.941-0.185-24.506-4.179-34.688-11.991
15
- c-10.185-7.803-17.273-17.699-21.271-29.691c4.947,0.76,8.658,1.137,11.132,1.137c4.187,0,9.042-0.76,14.56-2.279
16
- c-13.894-2.669-25.598-9.562-35.115-20.697c-9.519-11.136-14.277-23.84-14.277-38.114v-0.571
17
- c10.085,4.755,19.602,7.229,28.549,7.422c-17.321-11.613-25.981-28.265-25.981-49.963c0-10.66,2.758-20.747,8.278-30.264
18
- c15.035,18.464,33.311,33.213,54.816,44.252c21.507,11.038,44.54,17.227,69.092,18.558c-0.95-3.616-1.427-8.186-1.427-13.704
19
- c0-16.562,5.853-30.692,17.56-42.399c11.703-11.706,25.837-17.561,42.394-17.561c17.515,0,32.079,6.283,43.688,18.846
20
- c13.134-2.474,25.892-7.33,38.26-14.56c-4.757,14.652-13.613,25.788-26.55,33.402c12.368-1.716,23.88-4.95,34.537-9.708
21
- C357.458,149.793,347.462,160.166,335.471,168.735z"/>
22
- </g>
23
- <g>
24
- </g>
25
- <g>
26
- </g>
27
- <g>
28
- </g>
29
- <g>
30
- </g>
31
- <g>
32
- </g>
33
- <g>
34
- </g>
35
- <g>
36
- </g>
37
- <g>
38
- </g>
39
- <g>
40
- </g>
41
- <g>
42
- </g>
43
- <g>
44
- </g>
45
- <g>
46
- </g>
47
- <g>
48
- </g>
49
- <g>
50
- </g>
51
- <g>
52
- </g>
53
- </svg>
package/dist/link/Link.js DELETED
@@ -1,240 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
-
18
- var _react = _interopRequireDefault(require("react"));
19
-
20
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
- var _variables = require("../common/variables.js");
25
-
26
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
27
-
28
- function _templateObject6() {
29
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ": ", ";\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
30
-
31
- _templateObject6 = function _templateObject6() {
32
- return data;
33
- };
34
-
35
- return data;
36
- }
37
-
38
- function _templateObject5() {
39
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ": ", ";\n"]);
40
-
41
- _templateObject5 = function _templateObject5() {
42
- return data;
43
- };
44
-
45
- return data;
46
- }
47
-
48
- function _templateObject4() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n font-family: ", ";\n display: inline-flex;\n flex-direction: ", ";\n justify-content: ", ";\n align-items: center;\n max-width: 100%;\n"]);
50
-
51
- _templateObject4 = function _templateObject4() {
52
- return data;
53
- };
54
-
55
- return data;
56
- }
57
-
58
- function _templateObject3() {
59
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n text-decoration: none;\n ", "\n color: ", ";\n\n ", "\n ", "\n ", "\n\n &:hover {\n ", "\n }\n &:focus {\n outline-color: ", ";\n outline-offset: 1px;\n }\n"]);
60
-
61
- _templateObject3 = function _templateObject3() {
62
- return data;
63
- };
64
-
65
- return data;
66
- }
67
-
68
- function _templateObject2() {
69
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n color: ", ";\n\n ", "\n ", "\n ", "\n\n &:visited {\n ", "\n }\n &:hover {\n ", "\n }\n &:focus {\n outline-color: ", ";\n }\n"]);
70
-
71
- _templateObject2 = function _templateObject2() {
72
- return data;
73
- };
74
-
75
- return data;
76
- }
77
-
78
- function _templateObject() {
79
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
80
-
81
- _templateObject = function _templateObject() {
82
- return data;
83
- };
84
-
85
- return data;
86
- }
87
-
88
- var DxcLink = function DxcLink(_ref) {
89
- var _ref$underlined = _ref.underlined,
90
- underlined = _ref$underlined === void 0 ? true : _ref$underlined,
91
- _ref$inheritColor = _ref.inheritColor,
92
- inheritColor = _ref$inheritColor === void 0 ? false : _ref$inheritColor,
93
- _ref$disabled = _ref.disabled,
94
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
95
- iconSrc = _ref.iconSrc,
96
- icon = _ref.icon,
97
- _ref$iconPosition = _ref.iconPosition,
98
- iconPosition = _ref$iconPosition === void 0 ? "before" : _ref$iconPosition,
99
- _ref$href = _ref.href,
100
- href = _ref$href === void 0 ? "" : _ref$href,
101
- _ref$newWindow = _ref.newWindow,
102
- newWindow = _ref$newWindow === void 0 ? false : _ref$newWindow,
103
- onClick = _ref.onClick,
104
- _ref$text = _ref.text,
105
- text = _ref$text === void 0 ? "" : _ref$text,
106
- margin = _ref.margin,
107
- _ref$tabIndex = _ref.tabIndex,
108
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
109
- var colorsTheme = (0, _useTheme["default"])();
110
-
111
- var linkContent = _react["default"].createElement(LinkText, {
112
- iconPosition: iconPosition
113
- }, text, icon ? _react["default"].createElement(LinkIconContainer, {
114
- iconPosition: iconPosition
115
- }, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : iconSrc && _react["default"].createElement(LinkIcon, {
116
- src: iconSrc,
117
- iconPosition: iconPosition
118
- }));
119
-
120
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
121
- theme: colorsTheme.link
122
- }, _react["default"].createElement(DxcLinkContainer, {
123
- margin: margin
124
- }, onClick ? _react["default"].createElement(StyledButton, {
125
- type: "button",
126
- onClick: !disabled && onClick,
127
- margin: margin,
128
- disabled: disabled,
129
- underlined: underlined,
130
- inheritColor: inheritColor
131
- }, linkContent) : _react["default"].createElement(StyledLink, {
132
- tabIndex: tabIndex,
133
- href: !disabled && href,
134
- target: newWindow ? "_blank" : "_self",
135
- margin: margin,
136
- disabled: disabled,
137
- underlined: underlined,
138
- inheritColor: inheritColor
139
- }, linkContent)));
140
- };
141
-
142
- var DxcLinkContainer = _styledComponents["default"].div(_templateObject(), function (props) {
143
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
144
- }, function (props) {
145
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
146
- }, function (props) {
147
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
148
- }, function (props) {
149
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
150
- }, function (props) {
151
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
152
- });
153
-
154
- var StyledLink = _styledComponents["default"].a(_templateObject2(), function (props) {
155
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
156
- }, function (props) {
157
- return props.underlined && "padding-bottom: ".concat(props.theme.underlineSpacing, " !important; \n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " ").concat(!props.inheritColor ? !props.disabled ? props.theme.underlineColor : props.theme.disabledUnderlineColor : "", ";");
158
- }, function (props) {
159
- return !props.underlined ? "text-decoration-color: transparent;" : "";
160
- }, function (props) {
161
- return props.disabled ? "pointer-events: none;" : "";
162
- }, function (props) {
163
- return props.underlined && !props.disabled ? "color: ".concat(props.theme.visitedFontColor, " !important;\n border-bottom-color: ").concat(props.theme.visitedUnderlineColor, ";") : "";
164
- }, function (props) {
165
- return !props.disabled && "color: ".concat(props.theme.hoverFontColor, " !important;\n padding-bottom: ").concat(props.theme.underlineSpacing, " !important;\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
166
- }, function (props) {
167
- return props.theme.focusColor;
168
- });
169
-
170
- var StyledButton = _styledComponents["default"].button(_templateObject3(), function (props) {
171
- return props.disabled && "cursor: default;";
172
- }, function (props) {
173
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
174
- }, function (props) {
175
- return props.underlined && "padding-bottom: ".concat(props.theme.underlineSpacing, " !important; \n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " ").concat(!props.inheritColor ? !props.disabled ? props.theme.underlineColor : props.theme.disabledUnderlineColor : "", ";");
176
- }, function (props) {
177
- return !props.underlined ? "text-decoration-color: transparent;" : "";
178
- }, function (props) {
179
- return props.disabled ? "pointer-events: none;" : "";
180
- }, function (props) {
181
- return !props.disabled && "color: ".concat(props.theme.hoverFontColor, " !important;\n padding-bottom: ").concat(props.theme.underlineSpacing, " !important;\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
182
- }, function (props) {
183
- return props.theme.focusColor;
184
- });
185
-
186
- var LinkText = _styledComponents["default"].div(_templateObject4(), function (props) {
187
- return props.theme.fontSize;
188
- }, function (props) {
189
- return props.theme.fontWeight;
190
- }, function (props) {
191
- return props.theme.fontStyle;
192
- }, function (props) {
193
- return props.theme.fontFamily;
194
- }, function (props) {
195
- return props.iconPosition === "after" ? "row" : "row-reverse";
196
- }, function (props) {
197
- return props.iconPosition === "after" ? "flex-start" : "flex-end";
198
- });
199
-
200
- var LinkIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
201
- return props.theme.iconSize;
202
- }, function (props) {
203
- return props.theme.iconSize;
204
- }, function (props) {
205
- return props.iconPosition === "before" ? "margin-right" : "margin-left";
206
- }, function (props) {
207
- return props.theme.iconGutter;
208
- });
209
-
210
- var LinkIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
211
- return props.theme.iconSize;
212
- }, function (props) {
213
- return props.theme.iconSize;
214
- }, function (props) {
215
- return props.iconPosition === "before" ? "margin-right" : "margin-left";
216
- }, function (props) {
217
- return props.theme.iconGutter;
218
- });
219
-
220
- DxcLink.propTypes = {
221
- underlined: _propTypes["default"].bool,
222
- inheritColor: _propTypes["default"].bool,
223
- disabled: _propTypes["default"].bool,
224
- icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
225
- iconSrc: _propTypes["default"].string,
226
- iconPosition: _propTypes["default"].oneOf(["after", "before"]),
227
- href: _propTypes["default"].string,
228
- onClick: _propTypes["default"].func,
229
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
230
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
231
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
232
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
233
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
234
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
235
- newWindow: _propTypes["default"].bool,
236
- text: _propTypes["default"].string,
237
- tabIndex: _propTypes["default"].number
238
- };
239
- var _default = DxcLink;
240
- exports["default"] = _default;
@@ -1,51 +0,0 @@
1
- # DXC Input Text Component
2
-
3
- ## Props
4
-
5
- <table>
6
- <tr style="background-color: grey">
7
- <td>Name</td>
8
- <td>Default</td>
9
- <td>Description</td>
10
- </tr>
11
- <tr>
12
- <td>underlined: 'boolean'</td>
13
- <td><code>false</code></td>
14
- <td>If true, the text is underlined.</td>
15
- </tr>
16
- <tr>
17
- <td>color: boolean</td>
18
- <td><code>false</code></td>
19
- <td>If true, the link have the default colors.</td>
20
- </tr>
21
- <tr>
22
- <td>text: string</td>
23
- <td></td>
24
- <td>Link text.</td>
25
- </tr>
26
- <tr>
27
- <td>iconSrc: string</td>
28
- <td></td>
29
- <td>Source of the icon.</td>
30
- </tr>
31
- <tr>
32
- <td>iconPosition: 'before' | 'after'</td>
33
- <td><code>before</code></td>
34
- <td>Indicates the position of the icon in the component.</td>
35
- </tr>
36
- <tr>
37
- <td>href: string</td>
38
- <td></td>
39
- <td>Page to be opened when the user clicks on the link.</td>
40
- </tr>
41
- <tr>
42
- <td>theme: 'light' | 'dark'</td>
43
- <td><code>light</code></td>
44
- <td>Theme of the component.</td>
45
- </tr>
46
- <tr>
47
- <td>newWindow: boolean</td>
48
- <td><code>false</code></td>
49
- <td>If true, the page is opened in a new browser tab.</td>
50
- </tr>
51
- </table>