@dxc-technology/halstack-react 0.0.0-2b5b4b0 → 0.0.0-2bca710

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 (362) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +2 -5
  3. package/HalstackContext.d.ts +1348 -0
  4. package/HalstackContext.js +335 -0
  5. package/README.md +47 -0
  6. package/accordion/Accordion.d.ts +1 -1
  7. package/accordion/Accordion.js +110 -146
  8. package/accordion/Accordion.stories.tsx +297 -0
  9. package/accordion/Accordion.test.js +71 -0
  10. package/accordion/types.d.ts +8 -19
  11. package/accordion-group/AccordionGroup.d.ts +5 -4
  12. package/accordion-group/AccordionGroup.js +34 -76
  13. package/accordion-group/AccordionGroup.stories.tsx +252 -0
  14. package/accordion-group/AccordionGroup.test.js +116 -0
  15. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  16. package/accordion-group/AccordionGroupAccordion.js +43 -0
  17. package/accordion-group/types.d.ts +14 -19
  18. package/alert/Alert.js +11 -12
  19. package/alert/Alert.stories.tsx +198 -0
  20. package/alert/Alert.test.js +92 -0
  21. package/alert/types.d.ts +1 -1
  22. package/badge/Badge.d.ts +4 -0
  23. package/badge/Badge.js +6 -4
  24. package/badge/types.d.ts +5 -0
  25. package/bleed/Bleed.d.ts +3 -0
  26. package/bleed/Bleed.js +51 -0
  27. package/bleed/Bleed.stories.tsx +342 -0
  28. package/bleed/types.d.ts +37 -0
  29. package/bleed/types.js +5 -0
  30. package/box/Box.d.ts +4 -0
  31. package/box/Box.js +24 -79
  32. package/box/{Box.stories.jsx → Box.stories.tsx} +38 -51
  33. package/box/Box.test.js +18 -0
  34. package/box/types.d.ts +32 -0
  35. package/box/types.js +5 -0
  36. package/bulleted-list/BulletedList.d.ts +7 -0
  37. package/bulleted-list/BulletedList.js +125 -0
  38. package/bulleted-list/BulletedList.stories.tsx +206 -0
  39. package/bulleted-list/types.d.ts +38 -0
  40. package/bulleted-list/types.js +5 -0
  41. package/button/Button.d.ts +1 -1
  42. package/button/Button.js +49 -87
  43. package/button/Button.stories.tsx +376 -244
  44. package/button/Button.test.js +46 -0
  45. package/button/types.d.ts +15 -15
  46. package/card/Card.d.ts +1 -1
  47. package/card/Card.js +39 -61
  48. package/card/Card.stories.tsx +171 -0
  49. package/card/Card.test.js +50 -0
  50. package/card/types.d.ts +3 -10
  51. package/checkbox/Checkbox.d.ts +2 -2
  52. package/checkbox/Checkbox.js +108 -111
  53. package/checkbox/Checkbox.stories.tsx +260 -0
  54. package/checkbox/Checkbox.test.js +155 -0
  55. package/checkbox/types.d.ts +13 -5
  56. package/chip/Chip.d.ts +4 -0
  57. package/chip/Chip.js +37 -118
  58. package/chip/Chip.stories.tsx +214 -0
  59. package/chip/Chip.test.js +54 -0
  60. package/chip/types.d.ts +45 -0
  61. package/chip/types.js +5 -0
  62. package/common/OpenSans.css +68 -80
  63. package/common/coreTokens.d.ts +146 -0
  64. package/common/coreTokens.js +167 -0
  65. package/common/utils.d.ts +1 -0
  66. package/common/utils.js +4 -4
  67. package/common/variables.d.ts +1494 -0
  68. package/common/variables.js +1111 -1307
  69. package/date-input/Calendar.d.ts +4 -0
  70. package/date-input/Calendar.js +258 -0
  71. package/date-input/DateInput.js +178 -268
  72. package/date-input/DateInput.stories.tsx +314 -0
  73. package/date-input/DateInput.test.js +849 -0
  74. package/date-input/DatePicker.d.ts +4 -0
  75. package/date-input/DatePicker.js +146 -0
  76. package/date-input/Icons.d.ts +6 -0
  77. package/date-input/Icons.js +75 -0
  78. package/date-input/YearPicker.d.ts +4 -0
  79. package/date-input/YearPicker.js +126 -0
  80. package/date-input/types.d.ts +71 -9
  81. package/dialog/Dialog.d.ts +1 -1
  82. package/dialog/Dialog.js +69 -103
  83. package/dialog/Dialog.stories.tsx +195 -0
  84. package/dialog/Dialog.test.js +369 -0
  85. package/dialog/types.d.ts +0 -12
  86. package/dropdown/Dropdown.d.ts +1 -1
  87. package/dropdown/Dropdown.js +248 -277
  88. package/dropdown/Dropdown.stories.tsx +438 -0
  89. package/dropdown/Dropdown.test.js +586 -0
  90. package/dropdown/DropdownMenu.d.ts +4 -0
  91. package/dropdown/DropdownMenu.js +74 -0
  92. package/dropdown/DropdownMenuItem.d.ts +4 -0
  93. package/dropdown/DropdownMenuItem.js +79 -0
  94. package/dropdown/types.d.ts +28 -17
  95. package/file-input/FileInput.d.ts +4 -0
  96. package/file-input/FileInput.js +183 -168
  97. package/file-input/FileInput.stories.tsx +618 -0
  98. package/file-input/FileInput.test.js +457 -0
  99. package/file-input/FileItem.d.ts +4 -0
  100. package/file-input/FileItem.js +50 -81
  101. package/file-input/types.d.ts +129 -0
  102. package/file-input/types.js +5 -0
  103. package/flex/Flex.d.ts +4 -0
  104. package/flex/Flex.js +71 -0
  105. package/flex/Flex.stories.tsx +112 -0
  106. package/flex/types.d.ts +97 -0
  107. package/flex/types.js +5 -0
  108. package/footer/Footer.d.ts +1 -1
  109. package/footer/Footer.js +56 -157
  110. package/footer/{Footer.stories.jsx → Footer.stories.tsx} +38 -37
  111. package/footer/Footer.test.js +99 -0
  112. package/footer/Icons.d.ts +2 -0
  113. package/footer/Icons.js +4 -4
  114. package/footer/types.d.ts +26 -23
  115. package/grid/Grid.d.ts +7 -0
  116. package/grid/Grid.js +91 -0
  117. package/grid/Grid.stories.tsx +219 -0
  118. package/grid/types.d.ts +115 -0
  119. package/grid/types.js +5 -0
  120. package/header/Header.d.ts +8 -0
  121. package/header/Header.js +121 -171
  122. package/header/Header.stories.tsx +251 -0
  123. package/header/Header.test.js +79 -0
  124. package/header/Icons.d.ts +2 -0
  125. package/header/Icons.js +4 -29
  126. package/header/types.d.ts +34 -0
  127. package/header/types.js +5 -0
  128. package/heading/Heading.d.ts +4 -0
  129. package/heading/Heading.js +8 -25
  130. package/heading/Heading.stories.tsx +54 -0
  131. package/heading/Heading.test.js +186 -0
  132. package/heading/types.d.ts +33 -0
  133. package/heading/types.js +5 -0
  134. package/image/Image.d.ts +4 -0
  135. package/image/Image.js +85 -0
  136. package/image/Image.stories.tsx +127 -0
  137. package/image/types.d.ts +72 -0
  138. package/image/types.js +5 -0
  139. package/inset/Inset.d.ts +3 -0
  140. package/inset/Inset.js +51 -0
  141. package/inset/Inset.stories.tsx +230 -0
  142. package/inset/types.d.ts +37 -0
  143. package/inset/types.js +5 -0
  144. package/layout/ApplicationLayout.d.ts +20 -0
  145. package/layout/ApplicationLayout.js +81 -142
  146. package/layout/ApplicationLayout.stories.tsx +162 -0
  147. package/layout/Icons.d.ts +8 -0
  148. package/layout/Icons.js +52 -45
  149. package/layout/SidenavContext.d.ts +5 -0
  150. package/layout/SidenavContext.js +19 -0
  151. package/layout/types.d.ts +41 -0
  152. package/layout/types.js +5 -0
  153. package/link/Link.d.ts +4 -0
  154. package/link/Link.js +62 -109
  155. package/link/Link.stories.tsx +253 -0
  156. package/link/Link.test.js +81 -0
  157. package/link/types.d.ts +54 -0
  158. package/link/types.js +5 -0
  159. package/main.d.ts +14 -12
  160. package/main.js +76 -54
  161. package/nav-tabs/NavTabs.d.ts +8 -0
  162. package/nav-tabs/NavTabs.js +122 -0
  163. package/nav-tabs/NavTabs.stories.tsx +274 -0
  164. package/nav-tabs/NavTabs.test.js +82 -0
  165. package/nav-tabs/Tab.d.ts +4 -0
  166. package/nav-tabs/Tab.js +146 -0
  167. package/nav-tabs/types.d.ts +52 -0
  168. package/nav-tabs/types.js +5 -0
  169. package/number-input/NumberInput.d.ts +11 -0
  170. package/number-input/NumberInput.js +21 -71
  171. package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +5 -5
  172. package/number-input/NumberInput.test.js +725 -0
  173. package/number-input/types.d.ts +124 -0
  174. package/number-input/types.js +5 -0
  175. package/package.json +23 -24
  176. package/paginator/Icons.d.ts +5 -0
  177. package/paginator/Icons.js +16 -28
  178. package/paginator/Paginator.js +22 -57
  179. package/paginator/Paginator.stories.tsx +24 -0
  180. package/paginator/Paginator.test.js +318 -0
  181. package/paragraph/Paragraph.d.ts +5 -0
  182. package/paragraph/Paragraph.js +38 -0
  183. package/paragraph/Paragraph.stories.tsx +44 -0
  184. package/password-input/Icons.d.ts +6 -0
  185. package/password-input/Icons.js +39 -0
  186. package/password-input/PasswordInput.d.ts +4 -0
  187. package/password-input/PasswordInput.js +42 -122
  188. package/password-input/{PasswordInput.stories.jsx → PasswordInput.stories.tsx} +5 -4
  189. package/password-input/PasswordInput.test.js +174 -0
  190. package/password-input/types.d.ts +110 -0
  191. package/password-input/types.js +5 -0
  192. package/progress-bar/ProgressBar.js +63 -57
  193. package/progress-bar/ProgressBar.stories.jsx +93 -0
  194. package/progress-bar/ProgressBar.test.js +110 -0
  195. package/quick-nav/QuickNav.d.ts +4 -0
  196. package/quick-nav/QuickNav.js +117 -0
  197. package/quick-nav/QuickNav.stories.tsx +356 -0
  198. package/quick-nav/types.d.ts +21 -0
  199. package/quick-nav/types.js +5 -0
  200. package/radio-group/Radio.d.ts +4 -0
  201. package/radio-group/Radio.js +156 -0
  202. package/radio-group/RadioGroup.d.ts +4 -0
  203. package/radio-group/RadioGroup.js +281 -0
  204. package/radio-group/RadioGroup.stories.tsx +214 -0
  205. package/radio-group/RadioGroup.test.js +722 -0
  206. package/radio-group/types.d.ts +114 -0
  207. package/radio-group/types.js +5 -0
  208. package/resultsetTable/Icons.d.ts +7 -0
  209. package/resultsetTable/Icons.js +51 -0
  210. package/resultsetTable/ResultsetTable.d.ts +4 -0
  211. package/resultsetTable/ResultsetTable.js +54 -133
  212. package/resultsetTable/ResultsetTable.stories.tsx +300 -0
  213. package/resultsetTable/ResultsetTable.test.js +325 -0
  214. package/resultsetTable/types.d.ts +67 -0
  215. package/resultsetTable/types.js +5 -0
  216. package/select/Icons.d.ts +10 -0
  217. package/select/Icons.js +93 -0
  218. package/select/Listbox.d.ts +4 -0
  219. package/select/Listbox.js +169 -0
  220. package/select/Option.d.ts +4 -0
  221. package/select/Option.js +97 -0
  222. package/select/Select.d.ts +4 -0
  223. package/select/Select.js +202 -401
  224. package/select/Select.stories.tsx +971 -0
  225. package/select/Select.test.js +2228 -0
  226. package/select/types.d.ts +210 -0
  227. package/select/types.js +5 -0
  228. package/sidenav/Icons.d.ts +7 -0
  229. package/sidenav/Icons.js +51 -0
  230. package/sidenav/Sidenav.d.ts +10 -0
  231. package/sidenav/Sidenav.js +147 -54
  232. package/sidenav/Sidenav.stories.tsx +282 -0
  233. package/sidenav/Sidenav.test.js +44 -0
  234. package/sidenav/types.d.ts +76 -0
  235. package/sidenav/types.js +5 -0
  236. package/slider/Slider.d.ts +2 -2
  237. package/slider/Slider.js +150 -114
  238. package/slider/Slider.stories.tsx +240 -0
  239. package/slider/Slider.test.js +250 -0
  240. package/slider/types.d.ts +10 -7
  241. package/spinner/Spinner.d.ts +4 -0
  242. package/spinner/Spinner.js +20 -43
  243. package/spinner/Spinner.stories.jsx +53 -26
  244. package/spinner/Spinner.test.js +64 -0
  245. package/spinner/types.d.ts +32 -0
  246. package/spinner/types.js +5 -0
  247. package/switch/Switch.d.ts +2 -2
  248. package/switch/Switch.js +153 -70
  249. package/switch/Switch.stories.tsx +171 -0
  250. package/switch/Switch.test.js +225 -0
  251. package/switch/types.d.ts +10 -2
  252. package/table/Table.d.ts +4 -0
  253. package/table/Table.js +6 -6
  254. package/table/Table.stories.jsx +81 -1
  255. package/table/Table.test.js +26 -0
  256. package/table/types.d.ts +21 -0
  257. package/table/types.js +5 -0
  258. package/tabs/Tab.d.ts +4 -0
  259. package/tabs/Tab.js +132 -0
  260. package/tabs/Tabs.d.ts +1 -1
  261. package/tabs/Tabs.js +362 -112
  262. package/tabs/Tabs.stories.tsx +226 -0
  263. package/tabs/Tabs.test.js +350 -0
  264. package/tabs/types.d.ts +39 -18
  265. package/tag/Tag.d.ts +4 -0
  266. package/tag/Tag.js +38 -65
  267. package/tag/Tag.stories.tsx +155 -0
  268. package/tag/Tag.test.js +60 -0
  269. package/tag/types.d.ts +69 -0
  270. package/tag/types.js +5 -0
  271. package/text-input/Icons.d.ts +8 -0
  272. package/text-input/Icons.js +60 -0
  273. package/text-input/Suggestion.d.ts +4 -0
  274. package/text-input/Suggestion.js +84 -0
  275. package/text-input/Suggestions.d.ts +4 -0
  276. package/text-input/Suggestions.js +134 -0
  277. package/text-input/TextInput.d.ts +4 -0
  278. package/text-input/TextInput.js +272 -438
  279. package/text-input/TextInput.stories.tsx +608 -0
  280. package/text-input/TextInput.test.js +1812 -0
  281. package/text-input/types.d.ts +201 -0
  282. package/text-input/types.js +5 -0
  283. package/textarea/Textarea.d.ts +4 -0
  284. package/textarea/Textarea.js +64 -103
  285. package/textarea/Textarea.stories.jsx +104 -15
  286. package/textarea/Textarea.test.js +479 -0
  287. package/textarea/types.d.ts +141 -0
  288. package/textarea/types.js +5 -0
  289. package/toggle-group/ToggleGroup.d.ts +4 -0
  290. package/toggle-group/ToggleGroup.js +94 -96
  291. package/toggle-group/ToggleGroup.stories.tsx +218 -0
  292. package/toggle-group/ToggleGroup.test.js +170 -0
  293. package/toggle-group/types.d.ts +114 -0
  294. package/toggle-group/types.js +5 -0
  295. package/typography/Typography.d.ts +4 -0
  296. package/typography/Typography.js +32 -0
  297. package/typography/Typography.stories.tsx +198 -0
  298. package/typography/types.d.ts +18 -0
  299. package/typography/types.js +5 -0
  300. package/useTheme.d.ts +1247 -0
  301. package/useTheme.js +3 -3
  302. package/useTranslatedLabels.d.ts +85 -0
  303. package/useTranslatedLabels.js +20 -0
  304. package/utils/BaseTypography.d.ts +21 -0
  305. package/utils/BaseTypography.js +108 -0
  306. package/utils/FocusLock.d.ts +13 -0
  307. package/utils/FocusLock.js +138 -0
  308. package/wizard/Wizard.d.ts +4 -0
  309. package/wizard/Wizard.js +119 -105
  310. package/wizard/Wizard.stories.tsx +253 -0
  311. package/wizard/Wizard.test.js +141 -0
  312. package/wizard/types.d.ts +64 -0
  313. package/wizard/types.js +5 -0
  314. package/ThemeContext.js +0 -246
  315. package/V3Select/V3Select.js +0 -455
  316. package/V3Select/index.d.ts +0 -27
  317. package/V3Textarea/V3Textarea.js +0 -260
  318. package/V3Textarea/index.d.ts +0 -27
  319. package/box/index.d.ts +0 -25
  320. package/chip/index.d.ts +0 -22
  321. package/common/RequiredComponent.js +0 -32
  322. package/date/Date.js +0 -373
  323. package/date/index.d.ts +0 -27
  324. package/file-input/index.d.ts +0 -81
  325. package/header/index.d.ts +0 -25
  326. package/heading/index.d.ts +0 -17
  327. package/input-text/Icons.js +0 -22
  328. package/input-text/InputText.js +0 -611
  329. package/input-text/index.d.ts +0 -36
  330. package/link/index.d.ts +0 -23
  331. package/number-input/NumberInputContext.js +0 -16
  332. package/number-input/index.d.ts +0 -113
  333. package/password-input/index.d.ts +0 -94
  334. package/radio/Radio.d.ts +0 -4
  335. package/radio/Radio.js +0 -174
  336. package/radio/types.d.ts +0 -54
  337. package/resultsetTable/index.d.ts +0 -19
  338. package/select/index.d.ts +0 -131
  339. package/sidenav/index.d.ts +0 -13
  340. package/spinner/index.d.ts +0 -17
  341. package/table/index.d.ts +0 -13
  342. package/tag/index.d.ts +0 -24
  343. package/text-input/index.d.ts +0 -135
  344. package/textarea/index.d.ts +0 -117
  345. package/toggle/Toggle.js +0 -186
  346. package/toggle/index.d.ts +0 -21
  347. package/toggle-group/index.d.ts +0 -21
  348. package/upload/Upload.js +0 -201
  349. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  350. package/upload/buttons-upload/Icons.js +0 -40
  351. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  352. package/upload/dragAndDropArea/Icons.js +0 -39
  353. package/upload/file-upload/FileToUpload.js +0 -115
  354. package/upload/file-upload/Icons.js +0 -66
  355. package/upload/files-upload/FilesToUpload.js +0 -109
  356. package/upload/index.d.ts +0 -15
  357. package/upload/transaction/Icons.js +0 -160
  358. package/upload/transaction/Transaction.js +0 -104
  359. package/upload/transactions/Transactions.js +0 -94
  360. package/wizard/Icons.js +0 -65
  361. package/wizard/index.d.ts +0 -18
  362. /package/{radio → badge}/types.js +0 -0
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports["default"] = void 0;
11
11
 
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
13
 
16
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -19,11 +17,11 @@ var _react = _interopRequireWildcard(require("react"));
19
17
 
20
18
  var _styledComponents = _interopRequireDefault(require("styled-components"));
21
19
 
22
- var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
20
  var _TextInput = _interopRequireDefault(require("../text-input/TextInput"));
25
21
 
26
- var _variables = require("../common/variables.js");
22
+ var _useTranslatedLabels2 = _interopRequireDefault(require("../useTranslatedLabels"));
23
+
24
+ var _Icons = _interopRequireDefault(require("./Icons"));
27
25
 
28
26
  var _templateObject;
29
27
 
@@ -31,22 +29,30 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
31
29
 
32
30
  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; }
33
31
 
32
+ var setInputType = function setInputType(type, element) {
33
+ element === null || element === void 0 ? void 0 : element.getElementsByTagName("input")[0].setAttribute("type", type);
34
+ };
35
+
36
+ var setAriaAttributes = function setAriaAttributes(ariaExpanded, ariaLabel, element) {
37
+ var inputElement = element === null || element === void 0 ? void 0 : element.getElementsByTagName("input")[0];
38
+ inputElement === null || inputElement === void 0 ? void 0 : inputElement.setAttribute("aria-expanded", ariaExpanded);
39
+ inputElement === null || inputElement === void 0 ? void 0 : inputElement.setAttribute("aria-label", ariaLabel);
40
+ };
41
+
34
42
  var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
35
- var _ref$label = _ref.label,
36
- label = _ref$label === void 0 ? "" : _ref$label,
43
+ var label = _ref.label,
37
44
  _ref$name = _ref.name,
38
45
  name = _ref$name === void 0 ? "" : _ref$name,
39
46
  value = _ref.value,
40
- _ref$helperText = _ref.helperText,
41
- helperText = _ref$helperText === void 0 ? "" : _ref$helperText,
47
+ helperText = _ref.helperText,
42
48
  _ref$clearable = _ref.clearable,
43
49
  clearable = _ref$clearable === void 0 ? false : _ref$clearable,
44
50
  onChange = _ref.onChange,
45
51
  onBlur = _ref.onBlur,
46
- _ref$error = _ref.error,
47
- error = _ref$error === void 0 ? "" : _ref$error,
52
+ error = _ref.error,
48
53
  pattern = _ref.pattern,
49
- length = _ref.length,
54
+ minLength = _ref.minLength,
55
+ maxLength = _ref.maxLength,
50
56
  _ref$autocomplete = _ref.autocomplete,
51
57
  autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
52
58
  margin = _ref.margin,
@@ -62,93 +68,36 @@ var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
62
68
 
63
69
  var inputRef = (0, _react.useRef)(null);
64
70
 
65
- var setInputType = function setInputType(type) {
66
- var _inputRef$current, _inputRef$current$chi;
67
-
68
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$chi = _inputRef$current.children[2]) === null || _inputRef$current$chi === void 0 ? void 0 : _inputRef$current$chi.children[0].setAttribute("type", type);
69
- };
70
-
71
- var setAriaAttributes = function setAriaAttributes(ariaExpanded, ariaLabel) {
72
- if (error && clearable && value) {
73
- var _inputRef$current2, _inputRef$current2$ch, _inputRef$current2$ch2, _inputRef$current3, _inputRef$current3$ch, _inputRef$current3$ch2;
74
-
75
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : (_inputRef$current2$ch = _inputRef$current2.children[2]) === null || _inputRef$current2$ch === void 0 ? void 0 : (_inputRef$current2$ch2 = _inputRef$current2$ch.children[3]) === null || _inputRef$current2$ch2 === void 0 ? void 0 : _inputRef$current2$ch2.setAttribute("aria-expanded", ariaExpanded);
76
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : (_inputRef$current3$ch = _inputRef$current3.children[2]) === null || _inputRef$current3$ch === void 0 ? void 0 : (_inputRef$current3$ch2 = _inputRef$current3$ch.children[3]) === null || _inputRef$current3$ch2 === void 0 ? void 0 : _inputRef$current3$ch2.setAttribute("aria-label", ariaLabel);
77
- } else if (error || clearable && !value) {
78
- var _inputRef$current4, _inputRef$current4$ch, _inputRef$current4$ch2, _inputRef$current5, _inputRef$current5$ch, _inputRef$current5$ch2;
79
-
80
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : (_inputRef$current4$ch = _inputRef$current4.children[2]) === null || _inputRef$current4$ch === void 0 ? void 0 : (_inputRef$current4$ch2 = _inputRef$current4$ch.children[2]) === null || _inputRef$current4$ch2 === void 0 ? void 0 : _inputRef$current4$ch2.setAttribute("aria-expanded", ariaExpanded);
81
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : (_inputRef$current5$ch = _inputRef$current5.children[2]) === null || _inputRef$current5$ch === void 0 ? void 0 : (_inputRef$current5$ch2 = _inputRef$current5$ch.children[2]) === null || _inputRef$current5$ch2 === void 0 ? void 0 : _inputRef$current5$ch2.setAttribute("aria-label", ariaLabel);
82
- } else {
83
- var _inputRef$current6, _inputRef$current6$ch, _inputRef$current6$ch2, _inputRef$current7, _inputRef$current7$ch, _inputRef$current7$ch2;
84
-
85
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : (_inputRef$current6$ch = _inputRef$current6.children[2]) === null || _inputRef$current6$ch === void 0 ? void 0 : (_inputRef$current6$ch2 = _inputRef$current6$ch.children[1]) === null || _inputRef$current6$ch2 === void 0 ? void 0 : _inputRef$current6$ch2.setAttribute("aria-expanded", ariaExpanded);
86
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : (_inputRef$current7$ch = _inputRef$current7.children[2]) === null || _inputRef$current7$ch === void 0 ? void 0 : (_inputRef$current7$ch2 = _inputRef$current7$ch.children[1]) === null || _inputRef$current7$ch2 === void 0 ? void 0 : _inputRef$current7$ch2.setAttribute("aria-label", ariaLabel);
87
- }
88
- };
89
-
90
- var getIconTitle = function getIconTitle() {
91
- return isPasswordVisible ? "Hide password" : "Show password";
92
- };
71
+ var _useTranslatedLabels = (0, _useTranslatedLabels2["default"])(),
72
+ passwordInput = _useTranslatedLabels.passwordInput;
93
73
 
94
74
  (0, _react.useEffect)(function () {
95
- setAriaAttributes(false, "Show");
96
-
97
- if (isPasswordVisible) {
98
- setInputType("text");
99
- setAriaAttributes(true, "Hide");
100
- } else {
101
- setInputType("password");
102
- setAriaAttributes(false, "Show");
103
- }
104
- }, [isPasswordVisible]);
105
-
106
- var viewPassword = function viewPassword() {
107
- setInputType("text");
108
- setIsPasswordVisible(true);
109
- };
110
-
111
- var hidePassword = function hidePassword() {
112
- setInputType("password");
113
- setIsPasswordVisible(false);
114
- };
115
-
116
- var action = {
117
- onClick: isPasswordVisible ? hidePassword : viewPassword,
118
- icon: isPasswordVisible ? /*#__PURE__*/_react["default"].createElement("svg", {
119
- xmlns: "http://www.w3.org/2000/svg",
120
- height: "24px",
121
- viewBox: "0 0 24 24",
122
- width: "24px",
123
- fill: "currentColor"
124
- }, /*#__PURE__*/_react["default"].createElement("path", {
125
- d: "M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z",
126
- fill: "none"
127
- }), /*#__PURE__*/_react["default"].createElement("path", {
128
- d: "M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5l2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13zm-3.4-3.4l1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.77-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53z"
129
- })) : /*#__PURE__*/_react["default"].createElement("svg", {
130
- xmlns: "http://www.w3.org/2000/svg",
131
- height: "24px",
132
- viewBox: "0 0 24 24",
133
- width: "24px",
134
- fill: "currentColor"
135
- }, /*#__PURE__*/_react["default"].createElement("path", {
136
- d: "M0 0h24v24H0V0z",
137
- fill: "none"
138
- }), /*#__PURE__*/_react["default"].createElement("path", {
139
- d: "M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"
140
- })),
141
- title: getIconTitle()
142
- };
75
+ (function () {
76
+ if (isPasswordVisible) {
77
+ setInputType("text", inputRef.current);
78
+ setAriaAttributes("true", passwordInput.inputHidePasswordTitle, inputRef.current);
79
+ } else {
80
+ setInputType("password", inputRef.current);
81
+ setAriaAttributes("false", passwordInput.inputShowPasswordTitle, inputRef.current);
82
+ }
83
+ })();
84
+ }, [isPasswordVisible, passwordInput]);
143
85
  return /*#__PURE__*/_react["default"].createElement(PasswordInput, {
144
86
  ref: ref
145
87
  }, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
146
- ref: inputRef,
147
88
  label: label,
148
89
  name: name,
149
90
  value: value,
150
91
  helperText: helperText,
151
- action: action,
92
+ action: {
93
+ onClick: function onClick() {
94
+ setIsPasswordVisible(function (isPasswordVisible) {
95
+ return !isPasswordVisible;
96
+ });
97
+ },
98
+ icon: isPasswordVisible ? _Icons["default"].hidePassword : _Icons["default"].showPassword,
99
+ title: isPasswordVisible ? passwordInput.inputHidePasswordTitle : passwordInput.inputShowPasswordTitle
100
+ },
152
101
  error: error,
153
102
  clearable: clearable,
154
103
  onChange: onChange,
@@ -156,44 +105,15 @@ var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
156
105
  margin: margin,
157
106
  size: size,
158
107
  pattern: pattern,
159
- length: length,
108
+ minLength: minLength,
109
+ maxLength: maxLength,
160
110
  autocomplete: autocomplete,
111
+ ref: inputRef,
161
112
  tabIndex: tabIndex
162
113
  }));
163
114
  });
164
115
 
165
- var sizes = {
166
- small: "240px",
167
- medium: "360px",
168
- large: "480px",
169
- fillParent: "100%"
170
- };
171
-
172
116
  var PasswordInput = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n & ::-ms-reveal {\n display: none;\n }\n"])));
173
117
 
174
- DxcPasswordInput.propTypes = {
175
- label: _propTypes["default"].string,
176
- name: _propTypes["default"].string,
177
- value: _propTypes["default"].string,
178
- helperText: _propTypes["default"].string,
179
- error: _propTypes["default"].string,
180
- clearable: _propTypes["default"].bool,
181
- onChange: _propTypes["default"].func,
182
- onBlur: _propTypes["default"].func,
183
- autocomplete: _propTypes["default"].string,
184
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
185
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
186
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
187
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
188
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
189
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
190
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
191
- pattern: _propTypes["default"].string,
192
- length: _propTypes["default"].shape({
193
- min: _propTypes["default"].number,
194
- max: _propTypes["default"].number
195
- }),
196
- tabIndex: _propTypes["default"].number
197
- };
198
118
  var _default = DxcPasswordInput;
199
119
  exports["default"] = _default;
@@ -7,7 +7,7 @@ import ExampleContainer from "../../.storybook/components/ExampleContainer";
7
7
  import DarkContainer from "../../.storybook/components/DarkSection";
8
8
 
9
9
  export default {
10
- title: "Password input ",
10
+ title: "Password input",
11
11
  component: DxcPasswordInput,
12
12
  };
13
13
 
@@ -53,7 +53,7 @@ export const Chromatic = () => (
53
53
  <Title title="Margins" theme="light" level={2} />
54
54
  <ExampleContainer>
55
55
  <Title title="Xxsmall margin" theme="light" level={4} />
56
- <DxcPasswordInput label="Xxsmmall" margin="xxsmall" />
56
+ <DxcPasswordInput label="Xxsmall" margin="xxsmall" />
57
57
  </ExampleContainer>
58
58
  <ExampleContainer>
59
59
  <Title title="Xsmall margin" theme="light" level={4} />
@@ -100,15 +100,16 @@ export const Chromatic = () => (
100
100
  );
101
101
 
102
102
  const Password = () => (
103
- <ExampleContainer>
103
+ <ExampleContainer expanded>
104
104
  <Title title="Show password" theme="light" level={4} />
105
105
  <DxcPasswordInput label="Password input" value="Password" />
106
106
  </ExampleContainer>
107
107
  );
108
+
108
109
  const PasswordDark = () => (
109
110
  <BackgroundColorProvider color="#333333">
110
111
  <DarkContainer>
111
- <ExampleContainer>
112
+ <ExampleContainer expanded>
112
113
  <Title title="Show password" theme="dark" level={4} />
113
114
  <DxcPasswordInput label="Password input" value="Password" />
114
115
  </ExampleContainer>
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
6
+
7
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
+
9
+ var _react = _interopRequireDefault(require("react"));
10
+
11
+ var _react2 = require("@testing-library/react");
12
+
13
+ var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
14
+
15
+ var _PasswordInput = _interopRequireDefault(require("./PasswordInput.tsx"));
16
+
17
+ describe("Password input component tests", function () {
18
+ test("Password input renders with label and helper text", function () {
19
+ var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
20
+ label: "Password input label",
21
+ helperText: "Helper text"
22
+ })),
23
+ getByText = _render.getByText;
24
+
25
+ expect(getByText("Password input label")).toBeTruthy();
26
+ expect(getByText("Helper text")).toBeTruthy();
27
+ });
28
+ test("Password input renders error", function () {
29
+ var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
30
+ error: "Error message."
31
+ })),
32
+ getByText = _render2.getByText;
33
+
34
+ expect(getByText("Error message.")).toBeTruthy();
35
+ });
36
+ test("onChange function is called correctly", function () {
37
+ var onChange = jest.fn();
38
+
39
+ var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
40
+ label: "Password input",
41
+ onChange: onChange
42
+ })),
43
+ getByLabelText = _render3.getByLabelText;
44
+
45
+ var passwordInput = getByLabelText("Password input");
46
+
47
+ _userEvent["default"].type(passwordInput, "Pa$$w0rd");
48
+
49
+ expect(onChange).toHaveBeenCalledWith({
50
+ value: "P"
51
+ });
52
+ expect(passwordInput.value).toBe("Pa$$w0rd");
53
+ });
54
+ test("onBlur function is called correctly", function () {
55
+ var onBlur = jest.fn();
56
+
57
+ var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
58
+ label: "Password input",
59
+ onBlur: onBlur
60
+ })),
61
+ getByLabelText = _render4.getByLabelText;
62
+
63
+ var passwordInput = getByLabelText("Password input");
64
+
65
+ _userEvent["default"].type(passwordInput, "Pa$$w0rd");
66
+
67
+ _react2.fireEvent.blur(passwordInput);
68
+
69
+ expect(onBlur).toHaveBeenCalledWith({
70
+ value: "Pa$$w0rd"
71
+ });
72
+ expect(passwordInput.value).toBe("Pa$$w0rd");
73
+ });
74
+ test("Clear password input value", function () {
75
+ var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
76
+ label: "Password input",
77
+ clearable: true
78
+ })),
79
+ getAllByRole = _render5.getAllByRole,
80
+ getByLabelText = _render5.getByLabelText;
81
+
82
+ var passwordInput = getByLabelText("Password input");
83
+
84
+ _userEvent["default"].type(passwordInput, "Pa$$w0rd");
85
+
86
+ expect(passwordInput.value).toBe("Pa$$w0rd");
87
+ var clearButton = getAllByRole("button")[0];
88
+
89
+ _userEvent["default"].click(clearButton);
90
+
91
+ expect(passwordInput.value).toBe("");
92
+ });
93
+ test("Non clearable password input has no clear icon", function () {
94
+ var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
95
+ label: "Password input"
96
+ })),
97
+ getAllByRole = _render6.getAllByRole,
98
+ getByLabelText = _render6.getByLabelText;
99
+
100
+ var passwordInput = getByLabelText("Password input");
101
+
102
+ _userEvent["default"].type(passwordInput, "Pa$$w0rd");
103
+
104
+ expect(passwordInput.value).toBe("Pa$$w0rd");
105
+ var buttons = getAllByRole("button");
106
+ expect(buttons.length).toBe(1);
107
+ });
108
+ test("Show/hide password input button works correctly", function () {
109
+ var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
110
+ label: "Password input",
111
+ clearable: true
112
+ })),
113
+ getAllByRole = _render7.getAllByRole,
114
+ getByLabelText = _render7.getByLabelText;
115
+
116
+ var passwordInput = getByLabelText("Password input");
117
+
118
+ _userEvent["default"].type(passwordInput, "Pa$$w0rd");
119
+
120
+ expect(passwordInput.value).toBe("Pa$$w0rd");
121
+ expect(passwordInput.type).toBe("password");
122
+ var showButton = getAllByRole("button")[1];
123
+
124
+ _userEvent["default"].click(showButton);
125
+
126
+ expect(passwordInput.type).toBe("text");
127
+ });
128
+ test("Password tooltip is correct", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
129
+ var _render8, getAllByRole, getByTitle, queryByTitle, showButton;
130
+
131
+ return _regenerator["default"].wrap(function _callee$(_context) {
132
+ while (1) {
133
+ switch (_context.prev = _context.next) {
134
+ case 0:
135
+ _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
136
+ label: "Password input",
137
+ clearable: true,
138
+ value: "Password"
139
+ })), getAllByRole = _render8.getAllByRole, getByTitle = _render8.getByTitle, queryByTitle = _render8.queryByTitle;
140
+ showButton = getAllByRole("button")[1];
141
+
142
+ _userEvent["default"].hover(showButton);
143
+
144
+ expect(getByTitle("Show password")).toBeTruthy();
145
+
146
+ _userEvent["default"].unhover(showButton);
147
+
148
+ expect(queryByTitle("Hide password")).toBeFalsy();
149
+
150
+ case 6:
151
+ case "end":
152
+ return _context.stop();
153
+ }
154
+ }
155
+ }, _callee);
156
+ })));
157
+ test("Password input has correct accessibility attributes", function () {
158
+ var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_PasswordInput["default"], {
159
+ label: "Password input"
160
+ })),
161
+ getByRole = _render9.getByRole,
162
+ getByLabelText = _render9.getByLabelText;
163
+
164
+ var passwordInput = getByLabelText("Password input");
165
+ var showButton = getByRole("button");
166
+ expect(passwordInput.getAttribute("aria-expanded")).toBe("false");
167
+ expect(showButton.getAttribute("aria-label")).toBe("Show password");
168
+
169
+ _userEvent["default"].click(showButton);
170
+
171
+ expect(passwordInput.getAttribute("aria-expanded")).toBe("true");
172
+ expect(showButton.getAttribute("aria-label")).toBe("Hide password");
173
+ });
174
+ });
@@ -0,0 +1,110 @@
1
+ declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
2
+ declare type Margin = {
3
+ top?: Space;
4
+ bottom?: Space;
5
+ left?: Space;
6
+ right?: Space;
7
+ };
8
+ declare type Props = {
9
+ /**
10
+ * Text to be placed above the password.
11
+ */
12
+ label?: string;
13
+ /**
14
+ * Name attribute of the input element.
15
+ */
16
+ name?: string;
17
+ /**
18
+ * Value of the input element. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
19
+ */
20
+ value?: string;
21
+ /**
22
+ * Helper text to be placed above the password.
23
+ */
24
+ helperText?: string;
25
+ /**
26
+ * If true, the password input will have an action to clear the entered value.
27
+ */
28
+ clearable?: boolean;
29
+ /**
30
+ * This function will be called when the user types within the input
31
+ * element of the component. An object including the current value and
32
+ * the error (if the value entered is not valid) will be passed to this
33
+ * function. If there is no error, error will not be defined.
34
+ * */
35
+ onChange?: (val: {
36
+ value: string;
37
+ error?: string;
38
+ }) => void;
39
+ /**
40
+ * This function will be called when the input element loses the focus.
41
+ * An object including the input value and the error (if the value entered is
42
+ * not valid) will be passed to this function. If there is no error, error will not be defined.
43
+ */
44
+ onBlur?: (val: {
45
+ value: string;
46
+ error?: string;
47
+ }) => void;
48
+ /**
49
+ * If it is a defined value and also a truthy string, the component will
50
+ * change its appearance, showing the error below the password input
51
+ * component. If the defined value is an empty string, it will reserve a
52
+ * space below the component for a future error, but it would not change
53
+ * its look. In case of being undefined or null, both the appearance and
54
+ * the space for the error message would not be modified.
55
+ */
56
+ error?: string;
57
+ /**
58
+ * Regular expression that defines the valid format allowed by the
59
+ * password input. This will be checked both when the input element loses the
60
+ * focus and while typing within it. If the string entered does not match
61
+ * the pattern, the onBlur and onChange functions will be called with the
62
+ * current value and an internal error informing that this value does not
63
+ * match the pattern. If the pattern is met, the error parameter of both
64
+ * events will not be defined.
65
+ */
66
+ pattern?: string;
67
+ /**
68
+ * Specifies the minimun length allowed by the password input.
69
+ * This will be checked both when the input element loses the
70
+ * focus and while typing within it. If the string entered does not
71
+ * comply the minimum length, the onBlur and onChange functions will be called
72
+ * with the current value and an internal error informing that the value
73
+ * length does not comply the specified range. If a valid length is
74
+ * reached, the error parameter of both events will not be defined.
75
+ */
76
+ minLength?: number;
77
+ /**
78
+ * Specifies the maximum length allowed by the password input.
79
+ * This will be checked both when the input element loses the
80
+ * focus and while typing within it. If the string entered does not
81
+ * comply the maximum length, the onBlur and onChange functions will be called
82
+ * with the current value and an internal error informing that the value
83
+ * length does not comply the specified range. If a valid length is
84
+ * reached, the error parameter of both events will not be defined.
85
+ */
86
+ maxLength?: number;
87
+ /**
88
+ * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
89
+ * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
90
+ */
91
+ autocomplete?: string;
92
+ /**
93
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
94
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
95
+ */
96
+ margin?: Space | Margin;
97
+ /**
98
+ * Size of the component.
99
+ */
100
+ size?: "small" | "medium" | "large" | "fillParent";
101
+ /**
102
+ * Value of the tabindex attribute.
103
+ */
104
+ tabIndex?: number;
105
+ };
106
+ /**
107
+ * Reference to the component.
108
+ */
109
+ export declare type RefType = HTMLDivElement;
110
+ export default Props;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });