@dxc-technology/halstack-react 0.0.0-cfb6e92 → 0.0.0-d016030

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 (192) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6645 -0
  3. package/dist/index.d.ts +6645 -0
  4. package/dist/index.js +14507 -0
  5. package/dist/index.mjs +14449 -0
  6. package/package.json +76 -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 -346
  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 -232
  27. package/dist/button/Button.stories.js +0 -224
  28. package/dist/button/readme.md +0 -93
  29. package/dist/card/Card.js +0 -254
  30. package/dist/checkbox/Checkbox.js +0 -294
  31. package/dist/checkbox/Checkbox.stories.js +0 -144
  32. package/dist/checkbox/readme.md +0 -116
  33. package/dist/chip/Chip.js +0 -269
  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 -1159
  48. package/dist/date/Date.js +0 -381
  49. package/dist/date/Date.stories.js +0 -205
  50. package/dist/date/readme.md +0 -73
  51. package/dist/dialog/Dialog.js +0 -235
  52. package/dist/dialog/Dialog.stories.js +0 -217
  53. package/dist/dialog/readme.md +0 -32
  54. package/dist/dropdown/Dropdown.js +0 -493
  55. package/dist/dropdown/Dropdown.stories.js +0 -249
  56. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  57. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  58. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  59. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  60. package/dist/dropdown/readme.md +0 -69
  61. package/dist/footer/Footer.js +0 -405
  62. package/dist/footer/Footer.stories.js +0 -94
  63. package/dist/footer/dxc_logo_wht.png +0 -0
  64. package/dist/footer/readme.md +0 -41
  65. package/dist/header/Header.js +0 -431
  66. package/dist/header/Header.stories.js +0 -176
  67. package/dist/header/close_icon.svg +0 -1
  68. package/dist/header/dxc_logo_black.svg +0 -8
  69. package/dist/header/hamb_menu_black.svg +0 -1
  70. package/dist/header/hamb_menu_white.svg +0 -1
  71. package/dist/header/readme.md +0 -33
  72. package/dist/heading/Heading.js +0 -222
  73. package/dist/input-text/InputText.js +0 -672
  74. package/dist/input-text/InputText.stories.js +0 -209
  75. package/dist/input-text/error.svg +0 -1
  76. package/dist/input-text/readme.md +0 -91
  77. package/dist/layout/ApplicationLayout.js +0 -331
  78. package/dist/layout/facebook.svg +0 -45
  79. package/dist/layout/linkedin.svg +0 -50
  80. package/dist/layout/twitter.svg +0 -53
  81. package/dist/link/Link.js +0 -241
  82. package/dist/link/readme.md +0 -51
  83. package/dist/main.js +0 -311
  84. package/dist/paginator/Paginator.js +0 -283
  85. package/dist/paginator/images/next.svg +0 -3
  86. package/dist/paginator/images/nextPage.svg +0 -3
  87. package/dist/paginator/images/previous.svg +0 -3
  88. package/dist/paginator/images/previousPage.svg +0 -3
  89. package/dist/paginator/readme.md +0 -50
  90. package/dist/progress-bar/ProgressBar.js +0 -206
  91. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  92. package/dist/progress-bar/readme.md +0 -63
  93. package/dist/radio/Radio.js +0 -209
  94. package/dist/radio/Radio.stories.js +0 -166
  95. package/dist/radio/readme.md +0 -70
  96. package/dist/resultsetTable/ResultsetTable.js +0 -358
  97. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  98. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  99. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  100. package/dist/select/Select.js +0 -563
  101. package/dist/select/Select.stories.js +0 -235
  102. package/dist/select/readme.md +0 -72
  103. package/dist/sidenav/Sidenav.js +0 -183
  104. package/dist/slider/Slider.js +0 -315
  105. package/dist/slider/Slider.stories.js +0 -241
  106. package/dist/slider/readme.md +0 -64
  107. package/dist/spinner/Spinner.js +0 -214
  108. package/dist/spinner/Spinner.stories.js +0 -183
  109. package/dist/spinner/readme.md +0 -65
  110. package/dist/switch/Switch.js +0 -222
  111. package/dist/switch/Switch.stories.js +0 -134
  112. package/dist/switch/readme.md +0 -133
  113. package/dist/table/Table.js +0 -128
  114. package/dist/tabs/Tabs.js +0 -343
  115. package/dist/tabs/Tabs.stories.js +0 -130
  116. package/dist/tabs/readme.md +0 -78
  117. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  118. package/dist/tabs-for-sections/readme.md +0 -78
  119. package/dist/tag/Tag.js +0 -280
  120. package/dist/textarea/Textarea.js +0 -260
  121. package/dist/toggle/Toggle.js +0 -220
  122. package/dist/toggle/Toggle.stories.js +0 -297
  123. package/dist/toggle/readme.md +0 -80
  124. package/dist/toggle-group/ToggleGroup.js +0 -241
  125. package/dist/toggle-group/readme.md +0 -82
  126. package/dist/upload/Upload.js +0 -205
  127. package/dist/upload/Upload.stories.js +0 -72
  128. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  129. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  130. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  131. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -325
  132. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  133. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  134. package/dist/upload/file-upload/FileToUpload.js +0 -184
  135. package/dist/upload/file-upload/audio-icon.svg +0 -4
  136. package/dist/upload/file-upload/close.svg +0 -4
  137. package/dist/upload/file-upload/file-icon.svg +0 -4
  138. package/dist/upload/file-upload/video-icon.svg +0 -4
  139. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  140. package/dist/upload/readme.md +0 -37
  141. package/dist/upload/transaction/Transaction.js +0 -171
  142. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  143. package/dist/upload/transaction/audio-icon.svg +0 -4
  144. package/dist/upload/transaction/error-icon.svg +0 -4
  145. package/dist/upload/transaction/file-icon-err.svg +0 -4
  146. package/dist/upload/transaction/file-icon.svg +0 -4
  147. package/dist/upload/transaction/image-icon-err.svg +0 -4
  148. package/dist/upload/transaction/image-icon.svg +0 -4
  149. package/dist/upload/transaction/success-icon.svg +0 -4
  150. package/dist/upload/transaction/video-icon-err.svg +0 -4
  151. package/dist/upload/transaction/video-icon.svg +0 -4
  152. package/dist/upload/transactions/Transactions.js +0 -138
  153. package/dist/useTheme.js +0 -22
  154. package/dist/wizard/Wizard.js +0 -411
  155. package/dist/wizard/invalid_icon.svg +0 -5
  156. package/dist/wizard/valid_icon.svg +0 -5
  157. package/dist/wizard/validation-wrong.svg +0 -6
  158. package/test/Accordion.test.js +0 -33
  159. package/test/AccordionGroup.test.js +0 -125
  160. package/test/Alert.test.js +0 -53
  161. package/test/Box.test.js +0 -10
  162. package/test/Button.test.js +0 -18
  163. package/test/Card.test.js +0 -30
  164. package/test/Checkbox.test.js +0 -45
  165. package/test/Chip.test.js +0 -25
  166. package/test/Date.test.js +0 -393
  167. package/test/Dialog.test.js +0 -23
  168. package/test/Dropdown.test.js +0 -130
  169. package/test/Footer.test.js +0 -99
  170. package/test/Header.test.js +0 -39
  171. package/test/Heading.test.js +0 -35
  172. package/test/InputText.test.js +0 -240
  173. package/test/Link.test.js +0 -43
  174. package/test/Paginator.test.js +0 -177
  175. package/test/ProgressBar.test.js +0 -35
  176. package/test/Radio.test.js +0 -37
  177. package/test/ResultsetTable.test.js +0 -330
  178. package/test/Select.test.js +0 -192
  179. package/test/Sidenav.test.js +0 -45
  180. package/test/Slider.test.js +0 -82
  181. package/test/Spinner.test.js +0 -27
  182. package/test/Switch.test.js +0 -45
  183. package/test/Table.test.js +0 -36
  184. package/test/Tabs.test.js +0 -109
  185. package/test/TabsForSections.test.js +0 -34
  186. package/test/Tag.test.js +0 -32
  187. package/test/TextArea.test.js +0 -52
  188. package/test/ToggleGroup.test.js +0 -81
  189. package/test/Upload.test.js +0 -60
  190. package/test/Wizard.test.js +0 -130
  191. package/test/mocks/pngMock.js +0 -1
  192. 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,241 +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-color: transparent;\n\n ", "\n ", "\n color: ", ";\n ", "\n\n &:hover {\n ", "\n }\n &:focus {\n outline-color: ", ";\n outline-width: 2px;\n outline-offset: 1px;\n ", "\n }\n &:active {\n ", "\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 color: ", ";\n ", "\n\n text-decoration-color: transparent;\n ", "\n\n &:visited {\n color: ", ";\n &:hover {\n ", "\n }\n }\n &:hover {\n ", "\n }\n &:focus {\n outline-color: ", ";\n outline-width: 2px;\n ", "\n }\n &:active {\n ", "\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$inheritColor = _ref.inheritColor,
90
- inheritColor = _ref$inheritColor === void 0 ? false : _ref$inheritColor,
91
- _ref$disabled = _ref.disabled,
92
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
93
- iconSrc = _ref.iconSrc,
94
- icon = _ref.icon,
95
- _ref$iconPosition = _ref.iconPosition,
96
- iconPosition = _ref$iconPosition === void 0 ? "before" : _ref$iconPosition,
97
- _ref$href = _ref.href,
98
- href = _ref$href === void 0 ? "" : _ref$href,
99
- _ref$newWindow = _ref.newWindow,
100
- newWindow = _ref$newWindow === void 0 ? false : _ref$newWindow,
101
- onClick = _ref.onClick,
102
- _ref$text = _ref.text,
103
- text = _ref$text === void 0 ? "" : _ref$text,
104
- margin = _ref.margin,
105
- _ref$tabIndex = _ref.tabIndex,
106
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
107
- var colorsTheme = (0, _useTheme["default"])();
108
-
109
- var linkContent = _react["default"].createElement(LinkText, {
110
- iconPosition: iconPosition
111
- }, text, icon ? _react["default"].createElement(LinkIconContainer, {
112
- iconPosition: iconPosition
113
- }, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : iconSrc && _react["default"].createElement(LinkIcon, {
114
- src: iconSrc,
115
- iconPosition: iconPosition
116
- }));
117
-
118
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
119
- theme: colorsTheme.link
120
- }, _react["default"].createElement(DxcLinkContainer, {
121
- margin: margin
122
- }, onClick ? _react["default"].createElement(StyledButton, {
123
- type: "button",
124
- onClick: !disabled && onClick,
125
- margin: margin,
126
- disabled: disabled,
127
- inheritColor: inheritColor
128
- }, linkContent) : _react["default"].createElement(StyledLink, {
129
- tabIndex: tabIndex,
130
- href: !disabled && href,
131
- target: newWindow ? "_blank" : "_self",
132
- margin: margin,
133
- disabled: disabled,
134
- inheritColor: inheritColor
135
- }, linkContent)));
136
- };
137
-
138
- var DxcLinkContainer = _styledComponents["default"].div(_templateObject(), function (props) {
139
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
140
- }, function (props) {
141
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
142
- }, function (props) {
143
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
144
- }, function (props) {
145
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
146
- }, function (props) {
147
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
148
- });
149
-
150
- var StyledLink = _styledComponents["default"].a(_templateObject2(), function (props) {
151
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
152
- }, function (props) {
153
- return props.disabled ? "pointer-events: none;" : "";
154
- }, function (props) {
155
- return "padding-bottom: ".concat(props.theme.underlineSpacing, ";\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " transparent;");
156
- }, function (props) {
157
- return !props.inheritColor ? props.theme.visitedFontColor : "";
158
- }, function (props) {
159
- return "color: ".concat(props.theme.visitedFontColor, ";\n border-bottom-color: ").concat(props.theme.visitedUnderlineColor, ";");
160
- }, function (props) {
161
- return "color: ".concat(props.theme.hoverFontColor, ";\n border-bottom-color: ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
162
- }, function (props) {
163
- return props.theme.focusColor;
164
- }, function (props) {
165
- return props.disabled && "outline: none";
166
- }, function (props) {
167
- return "color: ".concat(props.theme.activeFontColor, " !important;\n border-bottom-color: ").concat(props.theme.activeUnderlineColor, " !important;");
168
- });
169
-
170
- var StyledButton = _styledComponents["default"].button(_templateObject3(), function (props) {
171
- return "padding-bottom: ".concat(props.theme.underlineSpacing, ";\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " transparent;");
172
- }, function (props) {
173
- return props.disabled && "cursor: default;";
174
- }, function (props) {
175
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
176
- }, function (props) {
177
- return props.disabled ? "pointer-events: none;" : "";
178
- }, function (props) {
179
- return "color: ".concat(props.theme.hoverFontColor, ";\n border-bottom-color: ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
180
- }, function (props) {
181
- return props.theme.focusColor;
182
- }, function (props) {
183
- return props.disabled && "outline: none";
184
- }, function (props) {
185
- return "color: ".concat(props.theme.activeFontColor, " !important;\n border-bottom-color: ").concat(props.theme.activeUnderlineColor, " !important;");
186
- });
187
-
188
- var LinkText = _styledComponents["default"].div(_templateObject4(), function (props) {
189
- return props.theme.fontSize;
190
- }, function (props) {
191
- return props.theme.fontWeight;
192
- }, function (props) {
193
- return props.theme.fontStyle;
194
- }, function (props) {
195
- return props.theme.fontFamily;
196
- }, function (props) {
197
- return props.iconPosition === "after" ? "row" : "row-reverse";
198
- }, function (props) {
199
- return props.iconPosition === "after" ? "flex-start" : "flex-end";
200
- });
201
-
202
- var LinkIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
203
- return props.theme.iconSize;
204
- }, function (props) {
205
- return props.theme.iconSize;
206
- }, function (props) {
207
- return props.iconPosition === "before" ? "margin-right" : "margin-left";
208
- }, function (props) {
209
- return props.theme.iconGutter;
210
- });
211
-
212
- var LinkIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
213
- return props.theme.iconSize;
214
- }, function (props) {
215
- return props.theme.iconSize;
216
- }, function (props) {
217
- return props.iconPosition === "before" ? "margin-right" : "margin-left";
218
- }, function (props) {
219
- return props.theme.iconGutter;
220
- });
221
-
222
- DxcLink.propTypes = {
223
- inheritColor: _propTypes["default"].bool,
224
- disabled: _propTypes["default"].bool,
225
- icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
226
- iconSrc: _propTypes["default"].string,
227
- iconPosition: _propTypes["default"].oneOf(["after", "before"]),
228
- href: _propTypes["default"].string,
229
- onClick: _propTypes["default"].func,
230
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
231
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
232
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
233
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
234
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
235
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
236
- newWindow: _propTypes["default"].bool,
237
- text: _propTypes["default"].string,
238
- tabIndex: _propTypes["default"].number
239
- };
240
- var _default = DxcLink;
241
- 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>