@dxc-technology/halstack-react 0.0.0-dfcca07 → 0.0.0-e003970

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 (222) hide show
  1. package/README.md +46 -0
  2. package/dist/index.d.mts +3861 -0
  3. package/dist/index.d.ts +3861 -0
  4. package/dist/index.js +13819 -0
  5. package/dist/index.mjs +13732 -0
  6. package/package.json +87 -69
  7. package/BackgroundColorContext.js +0 -50
  8. package/ThemeContext.js +0 -246
  9. package/V3Select/V3Select.js +0 -455
  10. package/V3Select/index.d.ts +0 -27
  11. package/V3Textarea/V3Textarea.js +0 -260
  12. package/V3Textarea/index.d.ts +0 -27
  13. package/accordion/Accordion.d.ts +0 -4
  14. package/accordion/Accordion.js +0 -258
  15. package/accordion/types.d.ts +0 -68
  16. package/accordion/types.js +0 -5
  17. package/accordion-group/AccordionGroup.d.ts +0 -7
  18. package/accordion-group/AccordionGroup.js +0 -170
  19. package/accordion-group/AccordionGroup.stories.tsx +0 -225
  20. package/accordion-group/types.d.ts +0 -72
  21. package/accordion-group/types.js +0 -5
  22. package/alert/Alert.d.ts +0 -4
  23. package/alert/Alert.js +0 -290
  24. package/alert/Alert.stories.tsx +0 -170
  25. package/alert/types.d.ts +0 -49
  26. package/alert/types.js +0 -5
  27. package/badge/Badge.js +0 -59
  28. package/box/Box.d.ts +0 -4
  29. package/box/Box.js +0 -126
  30. package/box/Box.stories.tsx +0 -132
  31. package/box/types.d.ts +0 -43
  32. package/box/types.js +0 -5
  33. package/button/Button.d.ts +0 -4
  34. package/button/Button.js +0 -179
  35. package/button/Button.stories.tsx +0 -276
  36. package/button/types.d.ts +0 -57
  37. package/button/types.js +0 -5
  38. package/card/Card.d.ts +0 -4
  39. package/card/Card.js +0 -164
  40. package/card/Card.stories.tsx +0 -201
  41. package/card/ice-cream.jpg +0 -0
  42. package/card/types.d.ts +0 -67
  43. package/card/types.js +0 -5
  44. package/checkbox/Checkbox.d.ts +0 -4
  45. package/checkbox/Checkbox.js +0 -253
  46. package/checkbox/Checkbox.stories.tsx +0 -192
  47. package/checkbox/types.d.ts +0 -60
  48. package/checkbox/types.js +0 -5
  49. package/chip/Chip.js +0 -221
  50. package/chip/Chip.stories.tsx +0 -121
  51. package/chip/index.d.ts +0 -22
  52. package/common/OpenSans.css +0 -81
  53. package/common/RequiredComponent.js +0 -32
  54. package/common/fonts/OpenSans-Bold.ttf +0 -0
  55. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  56. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  57. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  58. package/common/fonts/OpenSans-Italic.ttf +0 -0
  59. package/common/fonts/OpenSans-Light.ttf +0 -0
  60. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  61. package/common/fonts/OpenSans-Regular.ttf +0 -0
  62. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  63. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  64. package/common/utils.js +0 -22
  65. package/common/variables.js +0 -1578
  66. package/date/Date.js +0 -373
  67. package/date/index.d.ts +0 -27
  68. package/date-input/DateInput.d.ts +0 -4
  69. package/date-input/DateInput.js +0 -361
  70. package/date-input/DateInput.stories.tsx +0 -138
  71. package/date-input/types.d.ts +0 -100
  72. package/date-input/types.js +0 -5
  73. package/dialog/Dialog.d.ts +0 -4
  74. package/dialog/Dialog.js +0 -165
  75. package/dialog/Dialog.stories.tsx +0 -212
  76. package/dialog/types.d.ts +0 -43
  77. package/dialog/types.js +0 -5
  78. package/dropdown/Dropdown.d.ts +0 -4
  79. package/dropdown/Dropdown.js +0 -417
  80. package/dropdown/types.d.ts +0 -89
  81. package/dropdown/types.js +0 -5
  82. package/file-input/FileInput.d.ts +0 -4
  83. package/file-input/FileInput.js +0 -511
  84. package/file-input/FileItem.d.ts +0 -14
  85. package/file-input/FileItem.js +0 -184
  86. package/file-input/types.d.ts +0 -87
  87. package/file-input/types.js +0 -5
  88. package/footer/Footer.d.ts +0 -4
  89. package/footer/Footer.js +0 -266
  90. package/footer/Footer.stories.jsx +0 -151
  91. package/footer/Icons.js +0 -77
  92. package/footer/types.d.ts +0 -69
  93. package/footer/types.js +0 -5
  94. package/header/Header.d.ts +0 -7
  95. package/header/Header.js +0 -324
  96. package/header/Header.stories.tsx +0 -162
  97. package/header/Icons.js +0 -34
  98. package/header/types.d.ts +0 -47
  99. package/header/types.js +0 -5
  100. package/heading/Heading.d.ts +0 -4
  101. package/heading/Heading.js +0 -159
  102. package/heading/Heading.stories.tsx +0 -53
  103. package/heading/types.d.ts +0 -33
  104. package/heading/types.js +0 -5
  105. package/input-text/Icons.js +0 -22
  106. package/input-text/InputText.js +0 -611
  107. package/input-text/index.d.ts +0 -36
  108. package/layout/ApplicationLayout.js +0 -235
  109. package/layout/Icons.js +0 -55
  110. package/link/Link.d.ts +0 -3
  111. package/link/Link.js +0 -161
  112. package/link/Link.stories.tsx +0 -146
  113. package/link/types.d.ts +0 -74
  114. package/link/types.js +0 -5
  115. package/main.d.ts +0 -44
  116. package/main.js +0 -363
  117. package/number-input/NumberInput.d.ts +0 -4
  118. package/number-input/NumberInput.js +0 -86
  119. package/number-input/NumberInput.stories.tsx +0 -115
  120. package/number-input/NumberInputContext.d.ts +0 -4
  121. package/number-input/NumberInputContext.js +0 -19
  122. package/number-input/numberInputContextTypes.d.ts +0 -19
  123. package/number-input/numberInputContextTypes.js +0 -5
  124. package/number-input/types.d.ts +0 -117
  125. package/number-input/types.js +0 -5
  126. package/paginator/Icons.js +0 -66
  127. package/paginator/Paginator.d.ts +0 -4
  128. package/paginator/Paginator.js +0 -198
  129. package/paginator/Paginator.stories.tsx +0 -63
  130. package/paginator/types.d.ts +0 -38
  131. package/paginator/types.js +0 -5
  132. package/password-input/PasswordInput.d.ts +0 -4
  133. package/password-input/PasswordInput.js +0 -164
  134. package/password-input/PasswordInput.stories.tsx +0 -131
  135. package/password-input/types.d.ts +0 -107
  136. package/password-input/types.js +0 -5
  137. package/progress-bar/ProgressBar.d.ts +0 -4
  138. package/progress-bar/ProgressBar.js +0 -170
  139. package/progress-bar/ProgressBar.stories.jsx +0 -58
  140. package/progress-bar/types.d.ts +0 -37
  141. package/progress-bar/types.js +0 -5
  142. package/radio/Radio.d.ts +0 -4
  143. package/radio/Radio.js +0 -174
  144. package/radio/Radio.stories.tsx +0 -192
  145. package/radio/types.d.ts +0 -54
  146. package/radio/types.js +0 -5
  147. package/resultsetTable/ResultsetTable.d.ts +0 -4
  148. package/resultsetTable/ResultsetTable.js +0 -251
  149. package/resultsetTable/types.d.ts +0 -67
  150. package/resultsetTable/types.js +0 -5
  151. package/select/Select.js +0 -865
  152. package/select/Select.stories.tsx +0 -572
  153. package/select/index.d.ts +0 -131
  154. package/sidenav/Sidenav.d.ts +0 -9
  155. package/sidenav/Sidenav.js +0 -136
  156. package/sidenav/Sidenav.stories.tsx +0 -165
  157. package/sidenav/types.d.ts +0 -50
  158. package/sidenav/types.js +0 -5
  159. package/slider/Slider.d.ts +0 -4
  160. package/slider/Slider.js +0 -317
  161. package/slider/Slider.stories.tsx +0 -177
  162. package/slider/types.d.ts +0 -78
  163. package/slider/types.js +0 -5
  164. package/spinner/Spinner.d.ts +0 -4
  165. package/spinner/Spinner.js +0 -250
  166. package/spinner/Spinner.stories.jsx +0 -102
  167. package/spinner/types.d.ts +0 -32
  168. package/spinner/types.js +0 -5
  169. package/switch/Switch.d.ts +0 -4
  170. package/switch/Switch.js +0 -179
  171. package/switch/Switch.stories.tsx +0 -160
  172. package/switch/types.d.ts +0 -58
  173. package/switch/types.js +0 -5
  174. package/table/Table.d.ts +0 -4
  175. package/table/Table.js +0 -118
  176. package/table/Table.stories.jsx +0 -276
  177. package/table/types.d.ts +0 -21
  178. package/table/types.js +0 -5
  179. package/tabs/Tabs.d.ts +0 -4
  180. package/tabs/Tabs.js +0 -213
  181. package/tabs/Tabs.stories.tsx +0 -121
  182. package/tabs/types.d.ts +0 -70
  183. package/tabs/types.js +0 -5
  184. package/tag/Tag.d.ts +0 -4
  185. package/tag/Tag.js +0 -193
  186. package/tag/Tag.stories.tsx +0 -145
  187. package/tag/types.d.ts +0 -60
  188. package/tag/types.js +0 -5
  189. package/text-input/TextInput.d.ts +0 -4
  190. package/text-input/TextInput.js +0 -786
  191. package/text-input/TextInput.stories.tsx +0 -456
  192. package/text-input/types.d.ts +0 -159
  193. package/text-input/types.js +0 -5
  194. package/textarea/Textarea.js +0 -316
  195. package/textarea/Textarea.stories.jsx +0 -135
  196. package/textarea/index.d.ts +0 -127
  197. package/toggle/Toggle.js +0 -186
  198. package/toggle/index.d.ts +0 -21
  199. package/toggle-group/ToggleGroup.d.ts +0 -4
  200. package/toggle-group/ToggleGroup.js +0 -217
  201. package/toggle-group/ToggleGroup.stories.tsx +0 -178
  202. package/toggle-group/types.d.ts +0 -84
  203. package/toggle-group/types.js +0 -5
  204. package/upload/Upload.js +0 -201
  205. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  206. package/upload/buttons-upload/Icons.js +0 -40
  207. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  208. package/upload/dragAndDropArea/Icons.js +0 -39
  209. package/upload/file-upload/FileToUpload.js +0 -115
  210. package/upload/file-upload/Icons.js +0 -66
  211. package/upload/files-upload/FilesToUpload.js +0 -109
  212. package/upload/index.d.ts +0 -15
  213. package/upload/transaction/Icons.js +0 -160
  214. package/upload/transaction/Transaction.js +0 -104
  215. package/upload/transactions/Transactions.js +0 -94
  216. package/useTheme.js +0 -22
  217. package/wizard/Icons.js +0 -65
  218. package/wizard/Wizard.d.ts +0 -4
  219. package/wizard/Wizard.js +0 -231
  220. package/wizard/Wizard.stories.jsx +0 -224
  221. package/wizard/types.d.ts +0 -64
  222. package/wizard/types.js +0 -5
@@ -1,235 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
-
16
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
-
18
- var _react = _interopRequireWildcard(require("react"));
19
-
20
- var _main = require("../main");
21
-
22
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
-
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
25
-
26
- var _variables = require("../common/variables.js");
27
-
28
- var _Icons = require("./Icons");
29
-
30
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
31
-
32
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
33
-
34
- var _excluded = ["displayArrow", "mode"];
35
-
36
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
40
- var year = new Date().getFullYear();
41
-
42
- var Header = function Header(_ref) {
43
- var children = _ref.children;
44
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
45
- };
46
-
47
- var Main = function Main(_ref2) {
48
- var children = _ref2.children;
49
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
50
- };
51
-
52
- var Footer = function Footer(_ref3) {
53
- var children = _ref3.children;
54
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
55
- };
56
-
57
- var SideNav = function SideNav(props) {
58
- var displayArrow = props.displayArrow,
59
- mode = props.mode,
60
- childProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
61
- return /*#__PURE__*/_react["default"].createElement(_main.DxcSidenav, childProps, childProps.children);
62
- };
63
-
64
- SideNav.propTypes = {
65
- mode: _propTypes["default"].oneOf(["overlay", "push", ""]),
66
- displayArrow: _propTypes["default"].bool,
67
- padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
68
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
69
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
70
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
71
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
72
- })])
73
- };
74
-
75
- var defaultFooter = function defaultFooter() {
76
- return /*#__PURE__*/_react["default"].createElement(_main.DxcFooter, {
77
- copyright: "\xA9 DXC Technology ".concat(year, "\u200B\u200B\u200B\u200B. All rights reserved."),
78
- bottomLinks: [{
79
- href: "https://www.linkedin.com/company/dxctechnology",
80
- text: "Linkedin"
81
- }, {
82
- href: "https://twitter.com/dxctechnology",
83
- text: "Twitter"
84
- }, {
85
- href: "https://www.facebook.com/DXCTechnology/",
86
- text: "Facebook"
87
- }],
88
- socialLinks: [{
89
- href: "https://www.linkedin.com/company/dxctechnology",
90
- logo: _Icons.linkedinLogo
91
- }, {
92
- href: "https://twitter.com/dxctechnology",
93
- logo: _Icons.twitterLogo
94
- }, {
95
- href: "https://www.facebook.com/DXCTechnology/",
96
- logo: _Icons.facebookLogo
97
- }]
98
- });
99
- };
100
-
101
- var defaultHeader = function defaultHeader() {
102
- return /*#__PURE__*/_react["default"].createElement(_main.DxcHeader, {
103
- underlined: true
104
- });
105
- };
106
-
107
- var childTypeExists = function childTypeExists(children, childType) {
108
- return children.find(function (child) {
109
- return child && child.type && child.type === childType;
110
- });
111
- };
112
-
113
- var DxcApplicationLayout = function DxcApplicationLayout(_ref4) {
114
- var children = _ref4.children;
115
- var ref = (0, _react.useRef)(null);
116
- var colorsTheme = (0, _useTheme["default"])();
117
-
118
- var _useState = (0, _react.useState)(true),
119
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
120
- isSideNavVisible = _useState2[0],
121
- setIsSideNavVisible = _useState2[1];
122
-
123
- var _useState3 = (0, _react.useState)(),
124
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
125
- isResponsive = _useState4[0],
126
- setIsResponsive = _useState4[1];
127
-
128
- var childrenArray = _react["default"].Children.toArray(children);
129
-
130
- var header = childTypeExists(childrenArray, _main.DxcHeader) || childTypeExists(childrenArray, Header) || defaultHeader();
131
- var footer = childTypeExists(childrenArray, _main.DxcFooter) || childTypeExists(childrenArray, Footer) || defaultFooter();
132
- var sideNav = childTypeExists(childrenArray, SideNav);
133
- var main = childTypeExists(childrenArray, Main);
134
- var displayArrow = sideNav && sideNav.props && sideNav.props.displayArrow;
135
- var sideNavMode = sideNav && sideNav.props && sideNav.props.mode;
136
-
137
- var ArrowIcon = function ArrowIcon() {
138
- return /*#__PURE__*/_react["default"].createElement("svg", {
139
- xmlns: "http://www.w3.org/2000/svg",
140
- width: "15.995",
141
- height: "10.01",
142
- viewBox: "0 0 15.995 10.01"
143
- }, /*#__PURE__*/_react["default"].createElement("path", {
144
- "data-testid": "arrow-to-right",
145
- d: "M17.71,11.29l-4-4a1,1,0,0,0-1.42,1.42L14.59,11H3a1,1,0,0,0,0,2H14.59l-2.3,2.29a1,1,0,1,0,1.42,1.42l4-4a1.034,1.034,0,0,0,0-1.42Z",
146
- transform: "translate(-2 -6.996)"
147
- }));
148
- };
149
-
150
- var handleResize = function handleResize(width) {
151
- if (width) {
152
- if (width <= _variables.responsiveSizes.tablet ? setIsResponsive(true) : setIsResponsive(false)) ;
153
- setIsSideNavVisible(true);
154
- }
155
- };
156
-
157
- var handleEventListener = function handleEventListener() {
158
- handleResize(ref.current.offsetWidth);
159
- };
160
-
161
- (0, _react.useEffect)(function () {
162
- if (ref.current) {
163
- window.addEventListener("resize", handleEventListener);
164
- handleResize(ref.current.offsetWidth);
165
- }
166
-
167
- return function () {
168
- window.removeEventListener("resize", handleEventListener);
169
- };
170
- }, []);
171
-
172
- var handleSidenav = function handleSidenav() {
173
- setIsSideNavVisible(!isSideNavVisible);
174
- };
175
-
176
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
177
- theme: colorsTheme.sidenav
178
- }, /*#__PURE__*/_react["default"].createElement(ApplicationLayoutContainer, {
179
- ref: ref
180
- }, /*#__PURE__*/_react["default"].createElement(HeaderContainer, null, header), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(SideNavArrowContainer, {
181
- isSideNavVisible: isSideNavVisible
182
- }, sideNav, /*#__PURE__*/_react["default"].createElement(ArrowContainer, null, sideNav && (displayArrow || isResponsive) && /*#__PURE__*/_react["default"].createElement(ArrowTrigger, {
183
- tabIndex: 0,
184
- onClick: handleSidenav,
185
- isSideNavVisible: isSideNavVisible
186
- }, /*#__PURE__*/_react["default"].createElement(ArrowIcon, null)))), /*#__PURE__*/_react["default"].createElement(MainBodyContainer, null, /*#__PURE__*/_react["default"].createElement(MainContent, {
187
- sideNav: sideNav,
188
- mode: isResponsive ? "overlay" : sideNavMode,
189
- isSideNavVisible: isSideNavVisible
190
- }, main), /*#__PURE__*/_react["default"].createElement(FooterContainer, {
191
- sideNav: sideNav,
192
- mode: isResponsive ? "overlay" : sideNavMode,
193
- isSideNavVisible: isSideNavVisible
194
- }, footer))))));
195
- };
196
-
197
- DxcApplicationLayout.Header = Header;
198
- DxcApplicationLayout.Main = Main;
199
- DxcApplicationLayout.Footer = Footer;
200
- DxcApplicationLayout.SideNav = SideNav;
201
-
202
- var ApplicationLayoutContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n"])));
203
-
204
- var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 1250;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n"])));
205
-
206
- var BodyContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n display: flex;\n flex-direction: column;\n"])));
207
-
208
- var ContentContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex: 1 1 auto;\n align-items: flex-start;\n"])));
209
-
210
- var MainBodyContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n min-width: 0;\n display: flex;\n flex-direction: column;\n"])));
211
-
212
- var FooterContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: ", ";\n transition: margin 0.4s ease-in-out;\n"])), function (props) {
213
- return props.sideNav ? props.mode === "push" && !props.isSideNavVisible || props.mode === "overlay" ? "-300px" : "" : "";
214
- });
215
-
216
- var MainContent = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n flex-grow: 1;\n position: relative;\n min-height: calc(100vh - 184px);\n margin-left: ", ";\n transition: margin 0.4s ease-in-out;\n"])), function (props) {
217
- return props.sideNav ? props.mode === "push" && props.isSideNavVisible ? "" : "-297px" : "";
218
- });
219
-
220
- var SideNavArrowContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n z-index: 1200;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n height: calc(100vh - 64px);\n position: sticky;\n top: 64px;\n"])), function (props) {
221
- return props.isSideNavVisible ? "translateX(0)" : !props.isSideNavVisible ? "translateX(-100%)" : "";
222
- });
223
-
224
- var ArrowContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n height: calc(100vh - 64px);\n left: 279px;\n"])));
225
-
226
- var ArrowTrigger = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: sticky;\n top: 45vh;\n width: 42px;\n min-height: 42px;\n background-color: ", ";\n border-radius: 50%;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n z-index: 1250;\n cursor: pointer;\n & > svg {\n fill: ", ";\n }\n"])), function (props) {
227
- return "".concat(props.theme.arrowContainerColor);
228
- }, function (props) {
229
- return props.isSideNavVisible ? "rotate(-180deg)" : "rotate(0deg)";
230
- }, function (props) {
231
- return props.theme.arrowColor;
232
- });
233
-
234
- var _default = DxcApplicationLayout;
235
- exports["default"] = _default;
package/layout/Icons.js DELETED
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.twitterLogo = exports.linkedinLogo = exports.facebookLogo = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var facebookLogo = /*#__PURE__*/_react["default"].createElement("svg", {
13
- version: "1.1",
14
- id: "Capa_1",
15
- x: "0px",
16
- y: "0px",
17
- width: "438.536px",
18
- height: "438.536px",
19
- viewBox: "0 0 438.536 438.536",
20
- fill: "#FFFFFF"
21
- }, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
22
- 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 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 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402 c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401 c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
23
- })));
24
-
25
- exports.facebookLogo = facebookLogo;
26
-
27
- var twitterLogo = /*#__PURE__*/_react["default"].createElement("svg", {
28
- version: "1.1",
29
- id: "Capa_1",
30
- x: "0px",
31
- y: "0px",
32
- width: "438.536px",
33
- height: "438.536px",
34
- viewBox: "0 0 438.536 438.536",
35
- fill: "#FFFFFF"
36
- }, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
37
- 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 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 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 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 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 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 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 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 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 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 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 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 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 C357.458,149.793,347.462,160.166,335.471,168.735z"
38
- })));
39
-
40
- exports.twitterLogo = twitterLogo;
41
-
42
- var linkedinLogo = /*#__PURE__*/_react["default"].createElement("svg", {
43
- version: "1.1",
44
- id: "Capa_1",
45
- x: "0px",
46
- y: "0px",
47
- width: "438.536px",
48
- height: "438.536px",
49
- viewBox: "0 0 438.536 438.536",
50
- fill: "#FFFFFF"
51
- }, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
52
- 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 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 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332 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 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 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 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 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 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 H370.873z"
53
- })));
54
-
55
- exports.linkedinLogo = linkedinLogo;
package/link/Link.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import Overload from "./types";
2
- declare const DxcLink: Overload;
3
- export default DxcLink;
package/link/Link.js DELETED
@@ -1,161 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
- var _react = _interopRequireDefault(require("react"));
17
-
18
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
19
-
20
- var _variables = require("../common/variables.js");
21
-
22
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
23
-
24
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
25
-
26
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
30
- var DxcLink = function DxcLink(_ref) {
31
- var _ref$inheritColor = _ref.inheritColor,
32
- inheritColor = _ref$inheritColor === void 0 ? false : _ref$inheritColor,
33
- _ref$disabled = _ref.disabled,
34
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
35
- iconSrc = _ref.iconSrc,
36
- icon = _ref.icon,
37
- _ref$iconPosition = _ref.iconPosition,
38
- iconPosition = _ref$iconPosition === void 0 ? "before" : _ref$iconPosition,
39
- _ref$href = _ref.href,
40
- href = _ref$href === void 0 ? "" : _ref$href,
41
- _ref$newWindow = _ref.newWindow,
42
- newWindow = _ref$newWindow === void 0 ? false : _ref$newWindow,
43
- onClick = _ref.onClick,
44
- _ref$text = _ref.text,
45
- text = _ref$text === void 0 ? "" : _ref$text,
46
- margin = _ref.margin,
47
- _ref$tabIndex = _ref.tabIndex,
48
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
49
- var colorsTheme = (0, _useTheme["default"])();
50
-
51
- var linkContent = /*#__PURE__*/_react["default"].createElement(LinkText, {
52
- iconPosition: iconPosition
53
- }, text, icon ? /*#__PURE__*/_react["default"].createElement(LinkIconContainer, {
54
- iconPosition: iconPosition
55
- }, (0, _typeof2["default"])(icon) === "object" ? icon : /*#__PURE__*/_react["default"].createElement(icon)) : iconSrc && /*#__PURE__*/_react["default"].createElement(LinkIcon, {
56
- src: iconSrc,
57
- iconPosition: iconPosition
58
- }));
59
-
60
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
61
- theme: colorsTheme.link
62
- }, /*#__PURE__*/_react["default"].createElement(DxcLinkContainer, {
63
- margin: margin
64
- }, onClick ? /*#__PURE__*/_react["default"].createElement(StyledButton, {
65
- type: "button",
66
- onClick: !disabled && onClick,
67
- margin: margin,
68
- disabled: disabled,
69
- inheritColor: inheritColor
70
- }, linkContent) : /*#__PURE__*/_react["default"].createElement(StyledLink, {
71
- tabIndex: tabIndex,
72
- href: !disabled && href,
73
- target: newWindow ? "_blank" : "_self",
74
- margin: margin,
75
- disabled: disabled,
76
- inheritColor: inheritColor
77
- }, linkContent)));
78
- };
79
-
80
- var DxcLinkContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
81
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
82
- }, function (props) {
83
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
84
- }, function (props) {
85
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
86
- }, function (props) {
87
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
88
- }, function (props) {
89
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
90
- });
91
-
92
- var StyledLink = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (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 border-radius: 2px;\n outline: 2px solid ", ";\n ", "\n }\n &:active {\n ", "\n }\n"])), function (props) {
93
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
94
- }, function (props) {
95
- return props.disabled ? "pointer-events: none;" : "";
96
- }, function (props) {
97
- return "padding-bottom: ".concat(props.theme.underlineSpacing, ";\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " transparent;");
98
- }, function (props) {
99
- return !props.inheritColor ? props.theme.visitedFontColor : "";
100
- }, function (props) {
101
- return "color: ".concat(props.theme.visitedFontColor, ";\n border-bottom-color: ").concat(props.theme.visitedUnderlineColor, ";");
102
- }, function (props) {
103
- return "color: ".concat(props.theme.hoverFontColor, ";\n border-bottom-color: ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
104
- }, function (props) {
105
- return props.theme.focusColor;
106
- }, function (props) {
107
- return props.disabled && "outline: none";
108
- }, function (props) {
109
- return "color: ".concat(props.theme.activeFontColor, " !important;\n border-bottom-color: ").concat(props.theme.activeUnderlineColor, " !important;");
110
- });
111
-
112
- var StyledButton = _styledComponents["default"].button(_templateObject3 || (_templateObject3 = (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 border-radius: 2px;\n outline: 2px solid ", ";\n ", "\n }\n &:active {\n ", "\n }\n"])), function (props) {
113
- return "padding-bottom: ".concat(props.theme.underlineSpacing, ";\n border-bottom: ").concat(props.theme.underlineThickness, " ").concat(props.theme.underlineStyle, " transparent;");
114
- }, function (props) {
115
- return props.disabled && "cursor: default;";
116
- }, function (props) {
117
- return props.inheritColor ? "inherit" : !props.disabled ? props.theme.fontColor : props.theme.disabledColor;
118
- }, function (props) {
119
- return props.disabled ? "pointer-events: none;" : "";
120
- }, function (props) {
121
- return "color: ".concat(props.theme.hoverFontColor, ";\n border-bottom-color: ").concat(props.theme.hoverUnderlineColor, ";\n cursor: pointer;");
122
- }, function (props) {
123
- return props.theme.focusColor;
124
- }, function (props) {
125
- return props.disabled && "outline: none";
126
- }, function (props) {
127
- return "color: ".concat(props.theme.activeFontColor, " !important;\n border-bottom-color: ").concat(props.theme.activeUnderlineColor, " !important;");
128
- });
129
-
130
- var LinkText = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (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"])), function (props) {
131
- return props.theme.fontSize;
132
- }, function (props) {
133
- return props.theme.fontWeight;
134
- }, function (props) {
135
- return props.theme.fontStyle;
136
- }, function (props) {
137
- return props.theme.fontFamily;
138
- }, function (props) {
139
- return props.iconPosition === "after" ? "row" : "row-reverse";
140
- }, function (props) {
141
- return props.iconPosition === "after" ? "flex-start" : "flex-end";
142
- });
143
-
144
- var LinkIcon = _styledComponents["default"].img(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ";\n"])), function (props) {
145
- return props.theme.iconSize;
146
- }, function (props) {
147
- return props.theme.iconSize;
148
- }, function (props) {
149
- return "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
150
- });
151
-
152
- var LinkIconContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
153
- return props.theme.iconSize;
154
- }, function (props) {
155
- return props.theme.iconSize;
156
- }, function (props) {
157
- return "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
158
- });
159
-
160
- var _default = DxcLink;
161
- exports["default"] = _default;
@@ -1,146 +0,0 @@
1
- import React from "react";
2
- import DxcLink from "./Link";
3
- import Title from "../../.storybook/components/Title";
4
- import ExampleContainer from "../../.storybook/components/ExampleContainer";
5
-
6
- export default {
7
- title: "Link",
8
- component: DxcLink,
9
- };
10
-
11
- const icon = (
12
- <svg viewBox="0 0 24 24" enable-background="new 0 0 24 24" fill="currentColor">
13
- <g id="Bounding_Box">
14
- <rect fill="none" width="24" height="24" />
15
- </g>
16
- <g id="Master">
17
- <path d="M19,9.3V4h-3v2.6L12,3L2,12h3v8h5v-6h4v6h5v-8h3L19,9.3z M10,10c0-1.1,0.9-2,2-2s2,0.9,2,2H10z" />
18
- </g>
19
- </svg>
20
- );
21
-
22
- export const Chromatic = () => (
23
- <>
24
- <Title title="With anchor" theme="light" level={2} />
25
- <ExampleContainer>
26
- <Title title="Disabled" theme="light" level={4} />
27
- <DxcLink text="Test" disabled></DxcLink>
28
- <Title title="Icon before" theme="light" level={4} />
29
- <DxcLink text="Test" href="https://www.google.com" icon={icon} iconPosition="before"></DxcLink>
30
- <Title title="Icon after" theme="light" level={4} />
31
- <DxcLink text="Test" href="https://www.youtube.com/" icon={icon} iconPosition="after"></DxcLink>
32
- </ExampleContainer>
33
- <ExampleContainer pseudoState="pseudo-hover">
34
- <Title title="With link hovered" theme="light" level={4} />
35
- <DxcLink text="Test" href="https://www.dxc.com"></DxcLink>
36
- </ExampleContainer>
37
- <ExampleContainer pseudoState="pseudo-focus">
38
- <Title title="With link focused" theme="light" level={4} />
39
- <DxcLink text="Test" href="https://www.dxc.com"></DxcLink>
40
- </ExampleContainer>
41
- <ExampleContainer pseudoState="pseudo-active">
42
- <Title title="With link active" theme="light" level={4} />
43
- <DxcLink text="Test" href="https://www.dxc.com"></DxcLink>
44
- </ExampleContainer>
45
- <ExampleContainer pseudoState="pseudo-visited">
46
- <Title title="With link visited" theme="light" level={4} />
47
- <DxcLink text="Test" href="https://www.amazon.com"></DxcLink>
48
- </ExampleContainer>
49
- <ExampleContainer>
50
- <Title title="Inherit color" theme="light" level={4} />
51
- This is a <DxcLink text="Test" inheritColor={true}></DxcLink>.
52
- </ExampleContainer>
53
- <ExampleContainer pseudoState="pseudo-focus">
54
- <Title title="With brackets and focus" theme="light" level={4} />
55
- This is a (<DxcLink text="Test" inheritColor={true}></DxcLink>).
56
- </ExampleContainer>
57
- <ExampleContainer pseudoState="pseudo-hover">
58
- <Title title="Long text with hover" theme="light" level={4} />
59
- Lorem <DxcLink text="Test" href="https://www.google.com"></DxcLink> ipsum dolor sit amet, consectetur adipiscing
60
- elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
61
- exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
62
- voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
63
- in culpa qui officia deserunt mollit anim id est laborum.
64
- </ExampleContainer>
65
- <ExampleContainer pseudoState="pseudo-focus">
66
- <Title title="Long text with focus" theme="light" level={4} />
67
- Lorem <DxcLink text="Test" href="https://www.google.com"></DxcLink> ipsum dolor sit amet, consectetur adipiscing
68
- elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
69
- exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
70
- voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
71
- in culpa qui officia deserunt mollit anim id est laborum.
72
- </ExampleContainer>
73
- <Title title="With button" theme="light" level={2} />
74
- <ExampleContainer>
75
- <Title title="Disabled" theme="light" level={4} />
76
- <DxcLink text="Test" onClick={() => {}} disabled></DxcLink>
77
- <Title title="Icon before" theme="light" level={4} />
78
- <DxcLink text="Test" onClick={() => {}} href="https://www.google.com" icon={icon} iconPosition="before"></DxcLink>
79
- <Title title="Icon after" theme="light" level={4} />
80
- <DxcLink
81
- text="Test"
82
- onClick={() => {}}
83
- href="https://www.youtube.com/"
84
- icon={icon}
85
- iconPosition="after"
86
- ></DxcLink>
87
- </ExampleContainer>
88
- <ExampleContainer pseudoState="pseudo-hover">
89
- <Title title="With link hovered" theme="light" level={4} />
90
- <DxcLink text="Test" onClick={() => {}} href="https://www.dxc.com"></DxcLink>
91
- </ExampleContainer>
92
- <ExampleContainer pseudoState="pseudo-focus">
93
- <Title title="With link focused" theme="light" level={4} />
94
- <DxcLink text="Test" onClick={() => {}} href="https://www.dxc.com"></DxcLink>
95
- </ExampleContainer>
96
- <ExampleContainer pseudoState="pseudo-active">
97
- <Title title="With link active" theme="light" level={4} />
98
- <DxcLink text="Test" onClick={() => {}} href="https://www.dxc.com"></DxcLink>
99
- </ExampleContainer>
100
- <ExampleContainer pseudoState="pseudo-visited">
101
- <Title title="With link visited" theme="light" level={4} />
102
- <DxcLink text="Test" onClick={() => {}} href="https://www.amazon.com"></DxcLink>
103
- </ExampleContainer>
104
- <ExampleContainer>
105
- <Title title="Inherit color" theme="light" level={4} />
106
- This is a <DxcLink text="Test" onClick={() => {}} inheritColor={true}></DxcLink>.
107
- </ExampleContainer>
108
- <ExampleContainer pseudoState="pseudo-focus">
109
- <Title title="With brackets and focus" theme="light" level={4} />
110
- This is a (<DxcLink text="Test" onClick={() => {}} inheritColor={true}></DxcLink>).
111
- </ExampleContainer>
112
- <ExampleContainer pseudoState="pseudo-hover">
113
- <Title title="Long text with hover" theme="light" level={4} />
114
- Lorem <DxcLink text="Test" onClick={() => {}} href="https://www.google.com"></DxcLink> ipsum dolor sit amet,
115
- consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
116
- veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
117
- in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
118
- non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
119
- </ExampleContainer>
120
- <ExampleContainer pseudoState="pseudo-focus">
121
- <Title title="Long text with focus" theme="light" level={4} />
122
- Lorem <DxcLink text="Test" onClick={() => {}} href="https://www.google.com"></DxcLink> ipsum dolor sit amet,
123
- consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
124
- veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
125
- in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
126
- non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
127
- </ExampleContainer>
128
- <Title title="Margins" theme="light" level={2} />
129
- <ExampleContainer>
130
- <Title title="Xxsmall margin" theme="light" level={4} />
131
- <DxcLink text="Test" margin="xxsmall" href="https://www.facebook.com/"></DxcLink>
132
- <Title title="Xsmall margin" theme="light" level={4} />
133
- <DxcLink text="Test" margin="xsmall" href="https://www.linkedin.com/"></DxcLink>
134
- <Title title="Small margin" theme="light" level={4} />
135
- <DxcLink text="Test" margin="small" href="https://www.linkedin.com/"></DxcLink>
136
- <Title title="Medium margin" theme="light" level={4} />
137
- <DxcLink text="Test" margin="medium" href="https://www.linkedin.com/"></DxcLink>
138
- <Title title="Large margin" theme="light" level={4} />
139
- <DxcLink text="Test" margin="large" href="https://www.linkedin.com/"></DxcLink>
140
- <Title title="Xlarge margin" theme="light" level={4} />
141
- <DxcLink text="Test" margin="xlarge" href="https://www.linkedin.com/"></DxcLink>
142
- <Title title="Xxlarge margin" theme="light" level={4} />
143
- <DxcLink text="Test" margin="xxlarge" href="https://www.linkedin.com/"></DxcLink>
144
- </ExampleContainer>
145
- </>
146
- );