@dxc-technology/halstack-react 0.0.0-2d619b4 → 0.0.0-2e14697

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 (190) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +3861 -0
  3. package/dist/index.d.ts +3861 -0
  4. package/dist/index.js +13814 -0
  5. package/dist/index.mjs +13727 -0
  6. package/package.json +93 -68
  7. package/babel.config.js +0 -8
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -240
  10. package/dist/accordion/Accordion.js +0 -353
  11. package/dist/accordion-group/AccordionGroup.js +0 -186
  12. package/dist/alert/Alert.js +0 -403
  13. package/dist/alert/index.d.ts +0 -51
  14. package/dist/badge/Badge.js +0 -63
  15. package/dist/box/Box.js +0 -156
  16. package/dist/button/Button.js +0 -238
  17. package/dist/card/Card.js +0 -254
  18. package/dist/checkbox/Checkbox.js +0 -300
  19. package/dist/checkbox/Checkbox.stories.js +0 -144
  20. package/dist/checkbox/readme.md +0 -116
  21. package/dist/chip/Chip.js +0 -265
  22. package/dist/common/OpenSans.css +0 -81
  23. package/dist/common/RequiredComponent.js +0 -40
  24. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  25. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  26. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  27. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  28. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  29. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  30. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  31. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  32. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  33. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  34. package/dist/common/utils.js +0 -22
  35. package/dist/common/variables.js +0 -1434
  36. package/dist/date/Date.js +0 -379
  37. package/dist/date/Date.stories.js +0 -205
  38. package/dist/date/readme.md +0 -73
  39. package/dist/dialog/Dialog.js +0 -218
  40. package/dist/dropdown/Dropdown.js +0 -544
  41. package/dist/file-input/FileInput.js +0 -641
  42. package/dist/file-input/FileItem.js +0 -263
  43. package/dist/footer/Footer.js +0 -395
  44. package/dist/footer/Footer.stories.js +0 -94
  45. package/dist/footer/dxc_logo.svg +0 -15
  46. package/dist/footer/readme.md +0 -41
  47. package/dist/header/Header.js +0 -403
  48. package/dist/header/Header.stories.js +0 -176
  49. package/dist/header/close_icon.svg +0 -1
  50. package/dist/header/dxc_logo_black.svg +0 -8
  51. package/dist/header/hamb_menu_black.svg +0 -1
  52. package/dist/header/hamb_menu_white.svg +0 -1
  53. package/dist/header/readme.md +0 -33
  54. package/dist/heading/Heading.js +0 -218
  55. package/dist/input-text/InputText.js +0 -707
  56. package/dist/input-text/InputText.stories.js +0 -209
  57. package/dist/input-text/error.svg +0 -1
  58. package/dist/input-text/readme.md +0 -91
  59. package/dist/layout/ApplicationLayout.js +0 -331
  60. package/dist/layout/facebook.svg +0 -45
  61. package/dist/layout/linkedin.svg +0 -50
  62. package/dist/layout/twitter.svg +0 -53
  63. package/dist/link/Link.js +0 -237
  64. package/dist/link/readme.md +0 -51
  65. package/dist/main.d.ts +0 -6
  66. package/dist/main.js +0 -359
  67. package/dist/new-date/NewDate.js +0 -400
  68. package/dist/new-date/index.d.ts +0 -86
  69. package/dist/new-input-text/NewInputText.js +0 -977
  70. package/dist/new-input-text/index.d.ts +0 -120
  71. package/dist/new-textarea/NewTextarea.js +0 -365
  72. package/dist/new-textarea/index.d.ts +0 -101
  73. package/dist/number/Number.js +0 -138
  74. package/dist/number/NumberContext.js +0 -16
  75. package/dist/number/index.d.ts +0 -95
  76. package/dist/paginator/Paginator.js +0 -289
  77. package/dist/paginator/images/next.svg +0 -3
  78. package/dist/paginator/images/nextPage.svg +0 -3
  79. package/dist/paginator/images/previous.svg +0 -3
  80. package/dist/paginator/images/previousPage.svg +0 -3
  81. package/dist/paginator/readme.md +0 -50
  82. package/dist/password/Password.js +0 -200
  83. package/dist/password/index.d.ts +0 -80
  84. package/dist/password/styles.css +0 -3
  85. package/dist/progress-bar/ProgressBar.js +0 -242
  86. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  87. package/dist/progress-bar/readme.md +0 -63
  88. package/dist/radio/Radio.js +0 -209
  89. package/dist/radio/Radio.stories.js +0 -166
  90. package/dist/radio/readme.md +0 -70
  91. package/dist/resultsetTable/ResultsetTable.js +0 -358
  92. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  93. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  94. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  95. package/dist/select/Select.js +0 -549
  96. package/dist/sidenav/Sidenav.js +0 -179
  97. package/dist/slider/Slider.js +0 -319
  98. package/dist/slider/Slider.stories.js +0 -241
  99. package/dist/slider/readme.md +0 -64
  100. package/dist/spinner/Spinner.js +0 -381
  101. package/dist/spinner/Spinner.stories.js +0 -183
  102. package/dist/spinner/readme.md +0 -65
  103. package/dist/switch/Switch.js +0 -222
  104. package/dist/switch/Switch.stories.js +0 -134
  105. package/dist/switch/readme.md +0 -133
  106. package/dist/table/Table.js +0 -132
  107. package/dist/tabs/Tabs.js +0 -343
  108. package/dist/tabs/Tabs.stories.js +0 -130
  109. package/dist/tabs/readme.md +0 -78
  110. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  111. package/dist/tabs-for-sections/readme.md +0 -78
  112. package/dist/tag/Tag.js +0 -282
  113. package/dist/textarea/Textarea.js +0 -264
  114. package/dist/toggle/Toggle.js +0 -220
  115. package/dist/toggle/Toggle.stories.js +0 -297
  116. package/dist/toggle/readme.md +0 -80
  117. package/dist/toggle-group/ToggleGroup.js +0 -223
  118. package/dist/upload/Upload.js +0 -205
  119. package/dist/upload/Upload.stories.js +0 -72
  120. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  121. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  122. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  123. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  124. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  125. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  126. package/dist/upload/file-upload/FileToUpload.js +0 -184
  127. package/dist/upload/file-upload/audio-icon.svg +0 -4
  128. package/dist/upload/file-upload/close.svg +0 -4
  129. package/dist/upload/file-upload/file-icon.svg +0 -4
  130. package/dist/upload/file-upload/video-icon.svg +0 -4
  131. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  132. package/dist/upload/readme.md +0 -37
  133. package/dist/upload/transaction/Transaction.js +0 -175
  134. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  135. package/dist/upload/transaction/audio-icon.svg +0 -4
  136. package/dist/upload/transaction/error-icon.svg +0 -4
  137. package/dist/upload/transaction/file-icon-err.svg +0 -4
  138. package/dist/upload/transaction/file-icon.svg +0 -4
  139. package/dist/upload/transaction/image-icon-err.svg +0 -4
  140. package/dist/upload/transaction/image-icon.svg +0 -4
  141. package/dist/upload/transaction/success-icon.svg +0 -4
  142. package/dist/upload/transaction/video-icon-err.svg +0 -4
  143. package/dist/upload/transaction/video-icon.svg +0 -4
  144. package/dist/upload/transactions/Transactions.js +0 -138
  145. package/dist/useTheme.js +0 -22
  146. package/dist/wizard/Wizard.js +0 -411
  147. package/dist/wizard/invalid_icon.svg +0 -5
  148. package/dist/wizard/valid_icon.svg +0 -5
  149. package/dist/wizard/validation-wrong.svg +0 -6
  150. package/test/Accordion.test.js +0 -33
  151. package/test/AccordionGroup.test.js +0 -125
  152. package/test/Alert.test.js +0 -53
  153. package/test/Box.test.js +0 -10
  154. package/test/Button.test.js +0 -18
  155. package/test/Card.test.js +0 -30
  156. package/test/Checkbox.test.js +0 -45
  157. package/test/Chip.test.js +0 -25
  158. package/test/Date.test.js +0 -393
  159. package/test/Dialog.test.js +0 -23
  160. package/test/Dropdown.test.js +0 -145
  161. package/test/FileInput.test.js +0 -39
  162. package/test/Footer.test.js +0 -99
  163. package/test/Header.test.js +0 -39
  164. package/test/Heading.test.js +0 -35
  165. package/test/InputText.test.js +0 -240
  166. package/test/Link.test.js +0 -43
  167. package/test/NewDate.test.js +0 -203
  168. package/test/NewInputText.test.js +0 -866
  169. package/test/NewTextarea.test.js +0 -252
  170. package/test/Number.test.js +0 -241
  171. package/test/Paginator.test.js +0 -177
  172. package/test/Password.test.js +0 -76
  173. package/test/ProgressBar.test.js +0 -35
  174. package/test/Radio.test.js +0 -37
  175. package/test/ResultsetTable.test.js +0 -329
  176. package/test/Select.test.js +0 -212
  177. package/test/Sidenav.test.js +0 -45
  178. package/test/Slider.test.js +0 -82
  179. package/test/Spinner.test.js +0 -32
  180. package/test/Switch.test.js +0 -45
  181. package/test/Table.test.js +0 -36
  182. package/test/Tabs.test.js +0 -109
  183. package/test/TabsForSections.test.js +0 -34
  184. package/test/Tag.test.js +0 -32
  185. package/test/TextArea.test.js +0 -52
  186. package/test/ToggleGroup.test.js +0 -81
  187. package/test/Upload.test.js +0 -60
  188. package/test/Wizard.test.js +0 -130
  189. package/test/mocks/pngMock.js +0 -1
  190. 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,237 +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 \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 "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
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 "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
216
- });
217
-
218
- DxcLink.propTypes = {
219
- inheritColor: _propTypes["default"].bool,
220
- disabled: _propTypes["default"].bool,
221
- icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
222
- iconSrc: _propTypes["default"].string,
223
- iconPosition: _propTypes["default"].oneOf(["after", "before"]),
224
- href: _propTypes["default"].string,
225
- onClick: _propTypes["default"].func,
226
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
227
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
228
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
229
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
230
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
231
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
232
- newWindow: _propTypes["default"].bool,
233
- text: _propTypes["default"].string,
234
- tabIndex: _propTypes["default"].number
235
- };
236
- var _default = DxcLink;
237
- 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>
package/dist/main.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { default as DxcAlert } from "./alert/index";
2
- export { default as DxcNewInputText } from "./new-input-text/index";
3
- export { default as DxcNewDate } from "./new-date/index";
4
- export { default as DxcNewTextarea } from "./new-textarea/index";
5
- export { default as DxcNumber } from "./number/index";
6
- export { default as DxcPassword } from "./password/index";