linear-react-components-ui 1.1.13 → 1.1.14-beta.0

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 (368) hide show
  1. package/.eslintrc.json +77 -45
  2. package/.gitlab-ci.yml +5 -13
  3. package/.tool-versions +1 -0
  4. package/.vscode/settings.json +3 -12
  5. package/babel.config.json +4 -4
  6. package/lib/@types/SizePixels.d.ts +1 -1
  7. package/lib/alerts/AlertContainer.js +56 -47
  8. package/lib/alerts/AlertProvider.js +51 -33
  9. package/lib/alerts/BaseAlert.js +18 -11
  10. package/lib/alerts/Message.d.ts +1 -1
  11. package/lib/alerts/Message.js +44 -77
  12. package/lib/alerts/helpers.js +3 -2
  13. package/lib/alerts/index.js +3 -2
  14. package/lib/alerts/types.d.ts +0 -1
  15. package/lib/alerts/withAlert.js +9 -8
  16. package/lib/assets/styles/alerts.scss +7 -4
  17. package/lib/assets/styles/button.scss +9 -11
  18. package/lib/assets/styles/checkbox.scss +38 -45
  19. package/lib/assets/styles/colors.scss +1 -3
  20. package/lib/assets/styles/commons.scss +0 -1
  21. package/lib/assets/styles/dialog.scss +20 -37
  22. package/lib/assets/styles/drawers.scss +6 -9
  23. package/lib/assets/styles/fieldset.scss +0 -3
  24. package/lib/assets/styles/gridlayout.scss +2 -0
  25. package/lib/assets/styles/hint.scss +0 -21
  26. package/lib/assets/styles/icon.scss +4 -31
  27. package/lib/assets/styles/input.scss +7 -7
  28. package/lib/assets/styles/multiSelect.scss +1 -6
  29. package/lib/assets/styles/radio.scss +35 -37
  30. package/lib/assets/styles/select.scss +7 -13
  31. package/lib/assets/styles/table.scss +1 -9
  32. package/lib/assets/styles/tabs.scss +18 -28
  33. package/lib/avatar/index.js +39 -39
  34. package/lib/badge/index.js +13 -11
  35. package/lib/buttons/ActivateButton.js +7 -4
  36. package/lib/buttons/AddButton.js +10 -7
  37. package/lib/buttons/Button.js +9 -8
  38. package/lib/buttons/ButtonGroups.js +4 -5
  39. package/lib/buttons/CancelButton.js +5 -6
  40. package/lib/buttons/DangerButton.js +5 -6
  41. package/lib/buttons/DefaultButton.js +85 -85
  42. package/lib/buttons/DestroyButton.js +5 -6
  43. package/lib/buttons/EditButton.js +7 -4
  44. package/lib/buttons/InactivateButton.js +7 -4
  45. package/lib/buttons/InfoButton.js +5 -6
  46. package/lib/buttons/PrimaryButton.js +5 -6
  47. package/lib/buttons/RestoreButton.js +7 -4
  48. package/lib/buttons/SaveButton.js +5 -6
  49. package/lib/buttons/SuccessButton.js +5 -6
  50. package/lib/buttons/WarningButton.js +5 -6
  51. package/lib/buttons/button_container/index.js +19 -15
  52. package/lib/buttons/index.js +16 -15
  53. package/lib/buttons/split_button/index.js +23 -20
  54. package/lib/buttons/types.d.ts +0 -1
  55. package/lib/calendar/DangerCalendar.js +5 -6
  56. package/lib/calendar/InfoCalendar.js +5 -6
  57. package/lib/calendar/PrimaryCalendar.js +5 -6
  58. package/lib/calendar/SuccessCalendar.js +5 -6
  59. package/lib/calendar/WarningCalendar.js +5 -6
  60. package/lib/calendar/base/Day.js +11 -12
  61. package/lib/calendar/base/Month.js +17 -12
  62. package/lib/calendar/base/Week.js +17 -12
  63. package/lib/calendar/base/helpers.js +11 -11
  64. package/lib/calendar/base/index.js +43 -29
  65. package/lib/calendar/index.js +7 -6
  66. package/lib/checkbox/Label.js +9 -19
  67. package/lib/checkbox/index.d.ts +2 -2
  68. package/lib/checkbox/index.js +95 -81
  69. package/lib/checkbox/types.d.ts +1 -2
  70. package/lib/dialog/Alert.js +4 -3
  71. package/lib/dialog/Custom.js +16 -14
  72. package/lib/dialog/Error.js +4 -3
  73. package/lib/dialog/Information.js +4 -3
  74. package/lib/dialog/Question.js +12 -11
  75. package/lib/dialog/Warning.js +5 -5
  76. package/lib/dialog/base/Content.js +5 -7
  77. package/lib/dialog/base/Footer.js +7 -4
  78. package/lib/dialog/base/Header.js +28 -28
  79. package/lib/dialog/base/index.d.ts +2 -8
  80. package/lib/dialog/base/index.js +104 -108
  81. package/lib/dialog/base/style.js +10 -7
  82. package/lib/dialog/form/index.js +35 -36
  83. package/lib/dialog/index.js +8 -7
  84. package/lib/dialog/types.d.ts +13 -8
  85. package/lib/drawer/Content.js +10 -11
  86. package/lib/drawer/Drawer.js +83 -69
  87. package/lib/drawer/Header.js +36 -33
  88. package/lib/drawer/helpers.js +3 -2
  89. package/lib/drawer/index.js +4 -3
  90. package/lib/dropdown/Popup.d.ts +1 -1
  91. package/lib/dropdown/Popup.js +39 -38
  92. package/lib/dropdown/helper.js +5 -3
  93. package/lib/dropdown/types.d.ts +0 -1
  94. package/lib/dropdown/withDropdown.js +58 -37
  95. package/lib/fieldset/index.js +56 -50
  96. package/lib/fieldset/types.d.ts +0 -2
  97. package/lib/form/Field.d.ts +0 -2
  98. package/lib/form/Field.js +74 -68
  99. package/lib/form/FieldArray.d.ts +0 -2
  100. package/lib/form/FieldArray.js +90 -66
  101. package/lib/form/FieldNumber.d.ts +0 -2
  102. package/lib/form/FieldNumber.js +53 -33
  103. package/lib/form/FieldPeriod.d.ts +0 -2
  104. package/lib/form/FieldPeriod.js +52 -46
  105. package/lib/form/helpers.d.ts +0 -2
  106. package/lib/form/helpers.js +26 -21
  107. package/lib/form/index.d.ts +0 -2
  108. package/lib/form/index.js +143 -111
  109. package/lib/form/types.d.ts +4 -7
  110. package/lib/form/withFieldHOC.d.ts +0 -2
  111. package/lib/form/withFieldHOC.js +38 -31
  112. package/lib/form/withFormSecurity.d.ts +0 -2
  113. package/lib/form/withFormSecurity.js +34 -26
  114. package/lib/gridlayout/GridCol.js +13 -13
  115. package/lib/gridlayout/GridRow.js +11 -17
  116. package/lib/gridlayout/index.js +3 -2
  117. package/lib/gridlayout/types.d.ts +1 -1
  118. package/lib/hint/index.d.ts +1 -2
  119. package/lib/hint/index.js +28 -17
  120. package/lib/hint/types.d.ts +0 -3
  121. package/lib/icons/helper.d.ts +0 -4
  122. package/lib/icons/helper.js +4 -7
  123. package/lib/icons/index.d.ts +2 -3
  124. package/lib/icons/index.js +47 -42
  125. package/lib/icons/types.d.ts +9 -22
  126. package/lib/index.d.ts +1 -2
  127. package/lib/index.js +9 -9
  128. package/lib/inputs/base/InputTextBase.d.ts +0 -2
  129. package/lib/inputs/base/InputTextBase.js +111 -143
  130. package/lib/inputs/base/helpers.d.ts +2 -3
  131. package/lib/inputs/base/helpers.js +25 -20
  132. package/lib/inputs/base/types.d.ts +3 -17
  133. package/lib/inputs/color/index.js +38 -27
  134. package/lib/inputs/date/Dialog.d.ts +0 -2
  135. package/lib/inputs/date/Dialog.js +9 -8
  136. package/lib/inputs/date/Dropdown.d.ts +0 -2
  137. package/lib/inputs/date/Dropdown.js +10 -11
  138. package/lib/inputs/date/helpers.d.ts +0 -2
  139. package/lib/inputs/date/helpers.js +13 -13
  140. package/lib/inputs/date/index.d.ts +0 -2
  141. package/lib/inputs/date/index.js +150 -125
  142. package/lib/inputs/date/types.d.ts +1 -4
  143. package/lib/inputs/file/DefaultFile.d.ts +0 -2
  144. package/lib/inputs/file/DefaultFile.js +72 -45
  145. package/lib/inputs/file/DragDropFile.d.ts +0 -2
  146. package/lib/inputs/file/DragDropFile.js +147 -95
  147. package/lib/inputs/file/File.d.ts +1 -3
  148. package/lib/inputs/file/File.js +28 -22
  149. package/lib/inputs/file/FileButtonSettings.d.ts +0 -2
  150. package/lib/inputs/file/FileButtonSettings.js +12 -12
  151. package/lib/inputs/file/helpers.d.ts +0 -2
  152. package/lib/inputs/file/helpers.js +6 -4
  153. package/lib/inputs/file/index.d.ts +0 -2
  154. package/lib/inputs/file/index.js +4 -3
  155. package/lib/inputs/file/types.d.ts +0 -2
  156. package/lib/inputs/inputHOC.d.ts +1 -2
  157. package/lib/inputs/inputHOC.js +32 -19
  158. package/lib/inputs/mask/BaseMask.d.ts +5 -4
  159. package/lib/inputs/mask/BaseMask.js +34 -121
  160. package/lib/inputs/mask/Cnpj.d.ts +0 -2
  161. package/lib/inputs/mask/Cnpj.js +29 -16
  162. package/lib/inputs/mask/Cpf.d.ts +0 -2
  163. package/lib/inputs/mask/Cpf.js +35 -18
  164. package/lib/inputs/mask/Phone.d.ts +0 -2
  165. package/lib/inputs/mask/Phone.js +4 -5
  166. package/lib/inputs/mask/ZipCode.d.ts +0 -2
  167. package/lib/inputs/mask/ZipCode.js +7 -4
  168. package/lib/inputs/mask/helpers.d.ts +12 -53
  169. package/lib/inputs/mask/helpers.js +36 -90
  170. package/lib/inputs/{errorMessage/index.d.ts → mask/imaskHOC.d.ts} +7 -5
  171. package/lib/inputs/mask/imaskHOC.js +224 -0
  172. package/lib/inputs/mask/index.d.ts +2 -4
  173. package/lib/inputs/mask/index.js +6 -5
  174. package/lib/inputs/mask/types.d.ts +18 -22
  175. package/lib/inputs/multiSelect/ActionButtons.d.ts +0 -2
  176. package/lib/inputs/multiSelect/ActionButtons.js +21 -22
  177. package/lib/inputs/multiSelect/Dropdown.d.ts +0 -2
  178. package/lib/inputs/multiSelect/Dropdown.js +65 -48
  179. package/lib/inputs/multiSelect/helper.d.ts +0 -2
  180. package/lib/inputs/multiSelect/helper.js +7 -8
  181. package/lib/inputs/multiSelect/index.d.ts +0 -2
  182. package/lib/inputs/multiSelect/index.js +132 -80
  183. package/lib/inputs/multiSelect/types.d.ts +0 -2
  184. package/lib/inputs/number/BaseNumber.d.ts +2 -3
  185. package/lib/inputs/number/BaseNumber.js +21 -22
  186. package/lib/inputs/number/Currency.d.ts +2 -3
  187. package/lib/inputs/number/Currency.js +6 -6
  188. package/lib/inputs/number/Decimal.d.ts +2 -3
  189. package/lib/inputs/number/Decimal.js +5 -2
  190. package/lib/inputs/number/format_number.js +5 -5
  191. package/lib/inputs/number/index.d.ts +2 -3
  192. package/lib/inputs/number/index.js +49 -18
  193. package/lib/inputs/number/types.d.ts +14 -15
  194. package/lib/inputs/period/Dialog.d.ts +1 -3
  195. package/lib/inputs/period/Dialog.js +9 -8
  196. package/lib/inputs/period/Dropdown.d.ts +0 -2
  197. package/lib/inputs/period/Dropdown.js +8 -7
  198. package/lib/inputs/period/PeriodList.d.ts +0 -2
  199. package/lib/inputs/period/PeriodList.js +12 -13
  200. package/lib/inputs/period/helper.d.ts +0 -2
  201. package/lib/inputs/period/helper.js +36 -33
  202. package/lib/inputs/period/index.d.ts +0 -2
  203. package/lib/inputs/period/index.js +194 -160
  204. package/lib/inputs/period/types.d.ts +1 -3
  205. package/lib/inputs/search/index.d.ts +1 -2
  206. package/lib/inputs/search/index.js +63 -40
  207. package/lib/inputs/select/ActionButtons.d.ts +1 -2
  208. package/lib/inputs/select/ActionButtons.js +34 -24
  209. package/lib/inputs/select/Dropdown.d.ts +1 -2
  210. package/lib/inputs/select/Dropdown.js +58 -39
  211. package/lib/inputs/select/helper.d.ts +1 -2
  212. package/lib/inputs/select/helper.js +43 -49
  213. package/lib/inputs/select/index.d.ts +0 -2
  214. package/lib/inputs/select/index.js +8 -9
  215. package/lib/inputs/select/multiple/Selecteds.d.ts +1 -3
  216. package/lib/inputs/select/multiple/Selecteds.js +21 -16
  217. package/lib/inputs/select/multiple/index.d.ts +0 -2
  218. package/lib/inputs/select/multiple/index.js +176 -128
  219. package/lib/inputs/select/simple/index.d.ts +0 -2
  220. package/lib/inputs/select/simple/index.js +179 -151
  221. package/lib/inputs/select/types.d.ts +2 -5
  222. package/lib/inputs/text/index.js +5 -2
  223. package/lib/inputs/textarea/index.d.ts +0 -2
  224. package/lib/inputs/textarea/index.js +9 -9
  225. package/lib/inputs/textarea/types.d.ts +0 -2
  226. package/lib/inputs/types.d.ts +7 -12
  227. package/lib/internals/colorStyles.js +3 -2
  228. package/lib/internals/constants.js +4 -2
  229. package/lib/internals/types.d.ts +2 -5
  230. package/lib/internals/withTooltip.d.ts +2 -3
  231. package/lib/internals/withTooltip.js +74 -74
  232. package/lib/labelMessages/index.js +41 -21
  233. package/lib/labels/DangerLabel.js +5 -6
  234. package/lib/labels/DefaultLabel.js +39 -25
  235. package/lib/labels/InfoLabel.js +5 -6
  236. package/lib/labels/PrimaryLabel.js +5 -6
  237. package/lib/labels/SuccessLabel.js +5 -6
  238. package/lib/labels/WarningLabel.js +5 -6
  239. package/lib/labels/index.js +8 -7
  240. package/lib/labels/label_container/index.js +7 -7
  241. package/lib/list/Header.js +7 -8
  242. package/lib/list/Item.js +68 -72
  243. package/lib/list/Separator.js +7 -4
  244. package/lib/list/helpers.js +5 -3
  245. package/lib/list/index.js +100 -73
  246. package/lib/menus/float/MenuItem.js +19 -18
  247. package/lib/menus/float/SubMenuContainer.js +32 -26
  248. package/lib/menus/float/helpers.js +3 -2
  249. package/lib/menus/float/index.js +17 -16
  250. package/lib/menus/float/types.d.ts +1 -1
  251. package/lib/menus/index.js +2 -1
  252. package/lib/menus/sidenav/ExpandMenu.js +7 -8
  253. package/lib/menus/sidenav/MenuLink.js +8 -9
  254. package/lib/menus/sidenav/NavMenuGroup.js +11 -12
  255. package/lib/menus/sidenav/NavMenuItem.js +60 -46
  256. package/lib/menus/sidenav/NavSubMenuItem.js +24 -19
  257. package/lib/menus/sidenav/helpers.js +8 -5
  258. package/lib/menus/sidenav/index.js +111 -83
  259. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +6 -6
  260. package/lib/menus/sidenav/popup_menu_search/index.js +83 -63
  261. package/lib/menus/sidenav/types.d.ts +1 -1
  262. package/lib/noPermission/index.js +16 -13
  263. package/lib/panel/Content.d.ts +1 -1
  264. package/lib/panel/Content.js +56 -43
  265. package/lib/panel/DangerPanel.d.ts +1 -1
  266. package/lib/panel/DangerPanel.js +7 -4
  267. package/lib/panel/Default.d.ts +1 -1
  268. package/lib/panel/Default.js +56 -41
  269. package/lib/panel/Header.d.ts +1 -1
  270. package/lib/panel/Header.js +26 -28
  271. package/lib/panel/InfoPanel.d.ts +1 -1
  272. package/lib/panel/InfoPanel.js +7 -4
  273. package/lib/panel/PrimaryPanel.d.ts +1 -1
  274. package/lib/panel/PrimaryPanel.js +7 -4
  275. package/lib/panel/SuccessPanel.d.ts +1 -1
  276. package/lib/panel/SuccessPanel.js +7 -4
  277. package/lib/panel/ToolBar.d.ts +1 -1
  278. package/lib/panel/ToolBar.js +4 -5
  279. package/lib/panel/WarningPanel.d.ts +1 -1
  280. package/lib/panel/WarningPanel.js +7 -4
  281. package/lib/panel/helpers.d.ts +2 -7
  282. package/lib/panel/helpers.js +23 -11
  283. package/lib/panel/index.d.ts +1 -1
  284. package/lib/panel/index.js +9 -8
  285. package/lib/panel/types.d.ts +5 -46
  286. package/lib/permissionValidations.js +29 -24
  287. package/lib/popover/PopoverText.js +4 -5
  288. package/lib/popover/PopoverTitle.js +4 -5
  289. package/lib/popover/index.js +18 -14
  290. package/lib/progress/Bar.js +36 -30
  291. package/lib/progress/index.js +18 -16
  292. package/lib/radio/index.js +55 -34
  293. package/lib/shortcuts/index.js +8 -9
  294. package/lib/skeleton/SkeletonContainer.js +10 -9
  295. package/lib/skeleton/index.js +32 -25
  296. package/lib/spinner/SpinnerLoading.js +7 -6
  297. package/lib/spinner/index.js +36 -22
  298. package/lib/split/Split.js +110 -93
  299. package/lib/split/SplitSide.js +18 -19
  300. package/lib/split/helpers.js +3 -2
  301. package/lib/split/index.js +3 -2
  302. package/lib/table/Body.js +44 -41
  303. package/lib/table/Header.js +31 -28
  304. package/lib/table/HeaderColumn.d.ts +1 -1
  305. package/lib/table/HeaderColumn.js +21 -34
  306. package/lib/table/Row.js +47 -44
  307. package/lib/table/RowColumn.js +37 -36
  308. package/lib/table/helpers.js +12 -6
  309. package/lib/table/index.js +98 -78
  310. package/lib/table/types.d.ts +0 -3
  311. package/lib/tabs/{MenuTabs.d.ts → DropdownItems.d.ts} +3 -3
  312. package/lib/tabs/DropdownItems.js +65 -0
  313. package/lib/tabs/Menu.d.ts +1 -1
  314. package/lib/tabs/Menu.js +20 -32
  315. package/lib/tabs/MenuItems.d.ts +11 -0
  316. package/lib/tabs/MenuItems.js +76 -0
  317. package/lib/tabs/Panel.d.ts +1 -1
  318. package/lib/tabs/Panel.js +65 -69
  319. package/lib/tabs/index.d.ts +1 -1
  320. package/lib/tabs/index.js +221 -42
  321. package/lib/tabs/tabHelpers.d.ts +15 -4
  322. package/lib/tabs/tabHelpers.js +41 -36
  323. package/lib/tabs/types.d.ts +15 -48
  324. package/lib/toolbar/ButtonBar.js +39 -35
  325. package/lib/toolbar/LabelBar.js +36 -32
  326. package/lib/toolbar/Separator.js +7 -4
  327. package/lib/toolbar/ToolBarGroup.js +6 -6
  328. package/lib/toolbar/helpers.js +3 -2
  329. package/lib/toolbar/index.js +21 -19
  330. package/lib/toolbar/types.d.ts +0 -1
  331. package/lib/tooltip/index.js +32 -27
  332. package/lib/treetable/Body.js +32 -20
  333. package/lib/treetable/Header.js +14 -11
  334. package/lib/treetable/Row.js +137 -85
  335. package/lib/treetable/helpers.js +24 -15
  336. package/lib/treetable/index.js +10 -8
  337. package/lib/treeview/Header.js +6 -7
  338. package/lib/treeview/Node.js +132 -92
  339. package/lib/treeview/constants.js +2 -1
  340. package/lib/treeview/index.js +214 -148
  341. package/lib/treeview_old/Header.js +28 -0
  342. package/lib/treeview_old/Node.js +88 -0
  343. package/lib/treeview_old/index.js +42 -0
  344. package/lib/types-c2a0f035.d.ts +50 -0
  345. package/lib/uitour/helpers.js +7 -4
  346. package/lib/uitour/index.d.ts +1 -2
  347. package/lib/uitour/index.js +99 -112
  348. package/lib/uitour/types.d.ts +1 -9
  349. package/package.json +82 -77
  350. package/tsconfig.json +0 -1
  351. package/.eslintcache +0 -1
  352. package/.nvmrc +0 -1
  353. package/lib/assets/styles/error.scss +0 -9
  354. package/lib/assets/styles/textContent.scss +0 -9
  355. package/lib/hint/helpers.d.ts +0 -3
  356. package/lib/hint/helpers.js +0 -21
  357. package/lib/inputs/base/Label.d.ts +0 -14
  358. package/lib/inputs/base/Label.js +0 -35
  359. package/lib/inputs/errorMessage/index.js +0 -26
  360. package/lib/tabs/DropdownTabs.d.ts +0 -11
  361. package/lib/tabs/DropdownTabs.js +0 -71
  362. package/lib/tabs/MenuTabs.js +0 -82
  363. package/lib/tabs/context.d.ts +0 -12
  364. package/lib/tabs/context.js +0 -130
  365. package/lib/tabs/useTabs.d.ts +0 -11
  366. package/lib/tabs/useTabs.js +0 -11
  367. package/lib/textContent/index.d.ts +0 -8
  368. package/lib/textContent/index.js +0 -30
@@ -1,47 +1,54 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = exports.FormSecurityContext = void 0;
7
8
  var _react = _interopRequireWildcard(require("react"));
8
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
9
+ 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); }
10
+ 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; }
10
11
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
- const FormSecurityContext = exports.FormSecurityContext = /*#__PURE__*/_react.default.createContext({});
12
- const withFormSecurity = WrappedComponent => {
13
- const EnhancedComponent = props => {
14
- const {
15
- onOpenChange,
16
- handlerClose
17
- } = props;
18
- const changedData = (0, _react.useRef)(false);
19
- const securityBeforeUnload = (0, _react.useRef)(false);
20
- const [showQuestion, setShowQuestion] = (0, _react.useState)(false);
21
- const newHandlerClose = () => {
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+ var FormSecurityContext = /*#__PURE__*/_react.default.createContext({});
19
+ exports.FormSecurityContext = FormSecurityContext;
20
+ var withFormSecurity = function withFormSecurity(WrappedComponent) {
21
+ var EnhancedComponent = function EnhancedComponent(props) {
22
+ var handlerClose = props.handlerClose;
23
+ var changedData = (0, _react.useRef)(false);
24
+ var securityBeforeUnload = (0, _react.useRef)(false);
25
+ var _useState = (0, _react.useState)(false),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ showQuestion = _useState2[0],
28
+ setShowQuestion = _useState2[1];
29
+ var newHandlerClose = function newHandlerClose() {
22
30
  if (changedData.current && securityBeforeUnload.current) {
23
31
  setShowQuestion(true);
24
- } else if (onOpenChange) onOpenChange(false);else if (handlerClose) handlerClose();
32
+ } else if (handlerClose) handlerClose();
25
33
  };
26
- const onConfirmClick = () => {
27
- if (onOpenChange) onOpenChange(false);
34
+ var onConfirmClick = function onConfirmClick() {
28
35
  if (handlerClose) handlerClose();
29
36
  };
30
- const onUnconfirmClick = () => {
37
+ var onUnconfirmClick = function onUnconfirmClick() {
31
38
  setShowQuestion(false);
32
39
  };
33
- const onChangedData = value => {
40
+ var onChangedData = function onChangedData(value) {
34
41
  changedData.current = value;
35
42
  };
36
- const setSecurityBeforeUnload = value => {
43
+ var setSecurityBeforeUnload = function setSecurityBeforeUnload(value) {
37
44
  securityBeforeUnload.current = value;
38
45
  };
39
- const contextValues = {
40
- onChangedData,
41
- showQuestion,
42
- onConfirmClick,
43
- onUnconfirmClick,
44
- setSecurityBeforeUnload,
46
+ var contextValues = {
47
+ onChangedData: onChangedData,
48
+ showQuestion: showQuestion,
49
+ onConfirmClick: onConfirmClick,
50
+ onUnconfirmClick: onUnconfirmClick,
51
+ setSecurityBeforeUnload: setSecurityBeforeUnload,
45
52
  securityBeforeUnload: securityBeforeUnload.current
46
53
  };
47
54
  return /*#__PURE__*/_react.default.createElement(FormSecurityContext.Provider, {
@@ -52,4 +59,5 @@ const withFormSecurity = WrappedComponent => {
52
59
  };
53
60
  return EnhancedComponent;
54
61
  };
55
- var _default = exports.default = withFormSecurity;
62
+ var _default = withFormSecurity;
63
+ exports.default = _default;
@@ -7,28 +7,28 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  require("../assets/styles/gridlayout.scss");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const getClass = col => {
11
- const cols = col ? col.split(' ') : [];
12
- let classes = 'grid-container ';
10
+ var getClass = function getClass(col) {
11
+ var cols = col ? col.split(' ') : [];
12
+ var classes = 'grid-container ';
13
13
  if (cols[0]) classes += "col-xs-".concat(cols[0]);
14
14
  if (cols[1]) classes += " col-sm-".concat(cols[1]);
15
15
  if (cols[2]) classes += " col-md-".concat(cols[2]);
16
16
  if (cols[3]) classes += " col-lg-".concat(cols[3]);
17
17
  return classes;
18
18
  };
19
- const GridCol = props => {
20
- const {
21
- cols,
22
- customClass,
23
- children,
24
- style,
25
- visible = true
26
- } = props;
27
- const gridClasses = getClass(cols || '');
19
+ var GridCol = function GridCol(props) {
20
+ var cols = props.cols,
21
+ customClass = props.customClass,
22
+ children = props.children,
23
+ style = props.style,
24
+ _props$visible = props.visible,
25
+ visible = _props$visible === void 0 ? true : _props$visible;
26
+ var gridClasses = getClass(cols || '');
28
27
  if (!visible) return null;
29
28
  return /*#__PURE__*/_react.default.createElement("div", {
30
29
  className: "".concat(customClass, " ").concat(gridClasses),
31
30
  style: style
32
31
  }, children);
33
32
  };
34
- var _default = exports.default = GridCol;
33
+ var _default = GridCol;
34
+ exports.default = _default;
@@ -7,25 +7,19 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  require("../assets/styles/gridlayout.scss");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
- const getClass = props => "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-items-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
16
- const GridRow = props => {
17
- const {
18
- style,
19
- children,
20
- verticalAlign = 'start',
21
- visible = true
22
- } = props;
10
+ var getClass = function getClass(props) {
11
+ return "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
12
+ };
13
+ var GridRow = function GridRow(props) {
14
+ var style = props.style,
15
+ children = props.children,
16
+ _props$visible = props.visible,
17
+ visible = _props$visible === void 0 ? true : _props$visible;
23
18
  if (!visible) return null;
24
19
  return /*#__PURE__*/_react.default.createElement("div", {
25
20
  style: style,
26
- className: getClass(_objectSpread(_objectSpread({}, props), {}, {
27
- verticalAlign
28
- }))
21
+ className: getClass(props)
29
22
  }, children);
30
23
  };
31
- var _default = exports.default = GridRow;
24
+ var _default = GridRow;
25
+ exports.default = _default;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "GridRow", {
7
7
  enumerable: true,
8
- get: function () {
8
+ get: function get() {
9
9
  return _GridRow.default;
10
10
  }
11
11
  });
@@ -13,4 +13,5 @@ exports.default = void 0;
13
13
  var _GridRow = _interopRequireDefault(require("./GridRow"));
14
14
  var _GridCol = _interopRequireDefault(require("./GridCol"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- var _default = exports.default = _GridCol.default;
16
+ var _default = _GridCol.default;
17
+ exports.default = _default;
@@ -9,7 +9,7 @@ interface IGridCol {
9
9
  }
10
10
  interface IGridRow {
11
11
  children: ReactNode | ReactNode[];
12
- verticalAlign?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
12
+ verticalAlign?: string;
13
13
  horizontalAlign?: string;
14
14
  style?: CSSProperties;
15
15
  withTrim?: boolean;
@@ -1,7 +1,6 @@
1
1
  import { HintProps } from './types.js';
2
2
  import 'react';
3
- import '../@types/ColorStyles.js';
4
3
 
5
- declare const Hint: ({ visible, description, customClass, skeletonize, style, disabled, color, }: HintProps) => JSX.Element | null;
4
+ declare const Hint: ({ visible, description, customClass, skeletonize, style, }: HintProps) => JSX.Element | null;
6
5
 
7
6
  export { Hint as default };
package/lib/hint/index.js CHANGED
@@ -5,26 +5,37 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- var _helpers = require("./helpers");
9
8
  require("../assets/styles/hint.scss");
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- const Hint = _ref => {
12
- let {
13
- visible = true,
14
- description,
15
- customClass,
16
- skeletonize = false,
17
- style,
18
- disabled = false,
19
- color
20
- } = _ref;
10
+ var Hint = function Hint(_ref) {
11
+ var _ref$visible = _ref.visible,
12
+ visible = _ref$visible === void 0 ? true : _ref$visible,
13
+ description = _ref.description,
14
+ customClass = _ref.customClass,
15
+ _ref$skeletonize = _ref.skeletonize,
16
+ skeletonize = _ref$skeletonize === void 0 ? false : _ref$skeletonize,
17
+ style = _ref.style;
21
18
  if (!visible || !description) return null;
19
+ var showHintList = function showHintList(arrayHint) {
20
+ return /*#__PURE__*/_react.default.createElement("div", {
21
+ className: "rules-list",
22
+ style: {
23
+ padding: '15px 0px'
24
+ }
25
+ }, /*#__PURE__*/_react.default.createElement("ul", {
26
+ style: {
27
+ listStyleType: 'none'
28
+ }
29
+ }, arrayHint.map(function (hint, index) {
30
+ return /*#__PURE__*/_react.default.createElement("li", {
31
+ key: index.toString()
32
+ }, "- ", hint);
33
+ })));
34
+ };
22
35
  return /*#__PURE__*/_react.default.createElement("div", {
23
- "aria-disabled": disabled,
24
36
  style: style,
25
- className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n -").concat(color, "\n ")
26
- }, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", {
27
- "aria-disabled": disabled
28
- }, description));
37
+ className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ")
38
+ }, Array.isArray(description) ? showHintList(description) : /*#__PURE__*/_react.default.createElement("span", null, description));
29
39
  };
30
- var _default = exports.default = Hint;
40
+ var _default = Hint;
41
+ exports.default = _default;
@@ -1,14 +1,11 @@
1
1
  import { CSSProperties } from 'react';
2
- import { ColorStyles } from '../@types/ColorStyles.js';
3
2
 
4
3
  interface HintProps {
5
4
  description?: string | string[];
6
5
  visible?: boolean;
7
6
  customClass?: string;
8
7
  skeletonize?: boolean;
9
- disabled?: boolean;
10
8
  style?: CSSProperties;
11
- color?: ColorStyles;
12
9
  }
13
10
 
14
11
  export { HintProps };
@@ -603,10 +603,6 @@ declare const _default: {
603
603
  viewbox: string;
604
604
  paths: string[];
605
605
  };
606
- user_block: {
607
- viewbox: string;
608
- paths: string[];
609
- };
610
606
  };
611
607
 
612
608
  export { _default as default };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {
7
+ var _default = {
8
8
  paperplane: {
9
9
  viewbox: '0 0 16 16',
10
10
  paths: ['M7 11l6.151 2.195 2.849-12.459zM5 10.311l11-9.575-16 7.913zM7 12.062v3.938l2.902-2.902z']
@@ -575,7 +575,7 @@ var _default = exports.default = {
575
575
  },
576
576
  cash3: {
577
577
  viewbox: '0 0 17 16',
578
- paths: ['M7 9h1v1h-1v-1z', 'M0 6v9h17v-9h-17zM3 14h-2v-2h1v1h1v1zM3 8h-1v1h-1v-2h2v1zM10.5 10c0.276 0 0.5 0.224 0.5 0.5v2c0 0.276-0.224 0.5-0.5 0.5h-1.5v0.5c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-0.5h-1.5c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h1.5v-1h-1.5c-0.276 0-0.5-0.224-0.5-0.5v-2c0-0.276 0.224-0.5 0.5-0.5h1.5v-0.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v0.5h1.5c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5h-1.5v1h1.5zM16 14h-2v-1h1v-1h1v2zM16 9h-1v-1h-1v-1h2v2z', 'M9 11h1v1h-1v-1z', 'M1 4h15v1.5h-15v-1.5z', 'M2 2h13v1.5h-13v-1.5z']
578
+ paths: ['9h1v1h-1v-1z', 'M0 6v9h17v-9h-17zM3 14h-2v-2h1v1h1v1zM3 8h-1v1h-1v-2h2v1zM10.5 10c0.276 0 0.5 0.224 0.5 0.5v2c0 0.276-0.224 0.5-0.5 0.5h-1.5v0.5c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-0.5h-1.5c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h1.5v-1h-1.5c-0.276 0-0.5-0.224-0.5-0.5v-2c0-0.276 0.224-0.5 0.5-0.5h1.5v-0.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v0.5h1.5c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5h-1.5v1h1.5zM16 14h-2v-1h1v-1h1v2zM16 9h-1v-1h-1v-1h2v2z', 'M9 11h1v1h-1v-1z', 'M1 4h15v1.5h-15v-1.5z', 'M2 2h13v1.5h-13v-1.5z']
579
579
  },
580
580
  wallet: {
581
581
  viewbox: '0 0 17 16',
@@ -608,9 +608,6 @@ var _default = exports.default = {
608
608
  videoCamOutline: {
609
609
  viewbox: '0 0 16 16',
610
610
  paths: ['M15.294 4.004c-0.165 0-0.335 0.058-0.491 0.168l-2.803 1.978v-1.651c0-0.825-0.675-1.5-1.5-1.5h-9c-0.825 0-1.5 0.675-1.5 1.5v7c0 0.825 0.675 1.5 1.5 1.5h9c0.825 0 1.5-0.675 1.5-1.5v-1.65l2.803 1.978c0.156 0.11 0.326 0.168 0.491 0.168 0 0 0 0 0 0 0.22 0 0.421-0.101 0.551-0.278 0.101-0.137 0.154-0.313 0.154-0.51v-6.415c-0-0.518-0.355-0.788-0.706-0.788zM15 10.743l-2.469-1.743h-1.531v2.5c0 0.271-0.229 0.5-0.5 0.5h-9c-0.271 0-0.5-0.229-0.5-0.5v-7c0-0.271 0.229-0.5 0.5-0.5h9c0.271 0 0.5 0.229 0.5 0.5v2.5h1.531l2.469-1.743v5.486z', 'M4 5l5 3-5 3z']
611
- },
612
- user_block: {
613
- viewbox: '0 0 16 16',
614
- paths: ['M7.5 16h-6.977c-0.14 0-0.274-0.059-0.369-0.163s-0.141-0.242-0.129-0.382c0.11-1.22 0.585-2.363 1.373-3.305 0.697-0.832 1.59-1.452 2.602-1.809l0-0.475c-0.562-0.385-1.037-0.926-1.385-1.582-0.402-0.758-0.615-1.634-0.615-2.535 0-1.251 0.405-2.431 1.139-3.323 0.758-0.92 1.774-1.427 2.861-1.427 2.119 0 3.874 1.966 3.993 4.476 0.013 0.276-0.2 0.51-0.476 0.523s-0.51-0.2-0.523-0.476c-0.094-1.976-1.41-3.524-2.995-3.524-1.654 0-3 1.682-3 3.75 0 1.457 0.687 2.795 1.75 3.408 0.155 0.089 0.25 0.254 0.25 0.433l-0 1.116c0 0.224-0.149 0.42-0.364 0.481-0.967 0.274-1.822 0.828-2.471 1.604-0.538 0.643-0.901 1.397-1.064 2.208h6.4c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5z', 'M11.5 7c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5zM8 11.5c0-1.93 1.57-3.5 3.5-3.5 0.785 0 1.511 0.26 2.095 0.698l-4.897 4.897c-0.438-0.584-0.698-1.31-0.698-2.095zM11.5 15c-0.785 0-1.511-0.26-2.095-0.698l4.897-4.897c0.438 0.584 0.698 1.31 0.698 2.095 0 1.93-1.57 3.5-3.5 3.5z']
615
611
  }
616
- };
612
+ };
613
+ exports.default = _default;
@@ -1,14 +1,13 @@
1
- import { IconProps } from './types.js';
1
+ import { IIconProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/PointerEvents.js';
4
4
  import '../@types/SizePixels.js';
5
5
  import '../@types/Icon.js';
6
6
  import './helper.js';
7
7
  import '../@types/Position.js';
8
- import '../@types/ColorStyles.js';
9
8
 
10
9
  declare const _default: {
11
- (props: IconProps): JSX.Element;
10
+ (props: IIconProps): JSX.Element;
12
11
  displayName: string;
13
12
  };
14
13
 
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,66 +10,70 @@ var _helper = _interopRequireDefault(require("./helper"));
9
10
  var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
10
11
  require("../assets/styles/icon.scss");
11
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- const listIcon = _helper.default;
15
- const disabledIconColor = 'rgb(193, 193, 193)';
16
- const Icon = _ref => {
17
- let {
18
- name,
19
- onClick,
20
- svgStruct,
21
- size = 16,
22
- style = {},
23
- visible = true,
24
- disabled = false,
25
- customClass = '',
26
- customClassForContainer = '',
27
- colorStyle = 'default',
28
- color,
29
- viewBox,
30
- pointerEvents = 'none',
31
- targetRef,
32
- tooltip
33
- } = _ref;
34
- const isUsingColorStyle = colorStyle !== 'default';
35
- const colorFromProp = isUsingColorStyle || !color ? undefined : color;
36
- const refSvg = (0, _react.useRef)(null);
37
- const viewBoxFromIconOrSvgStrcut = name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox;
38
- const getPaths = () => name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
39
- const getSvg = () => {
13
+ 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); }
14
+ 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; }
15
+ var listIcon = _helper.default;
16
+ var disabledIconColor = 'rgb(193, 193, 193)';
17
+ var Icon = function Icon(_ref) {
18
+ var name = _ref.name,
19
+ _onClick = _ref.onClick,
20
+ svgStruct = _ref.svgStruct,
21
+ _ref$size = _ref.size,
22
+ size = _ref$size === void 0 ? 16 : _ref$size,
23
+ _ref$style = _ref.style,
24
+ style = _ref$style === void 0 ? {} : _ref$style,
25
+ _ref$visible = _ref.visible,
26
+ visible = _ref$visible === void 0 ? true : _ref$visible,
27
+ _ref$disabled = _ref.disabled,
28
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
29
+ _ref$customClass = _ref.customClass,
30
+ customClass = _ref$customClass === void 0 ? '' : _ref$customClass,
31
+ _ref$customClassForCo = _ref.customClassForContainer,
32
+ customClassForContainer = _ref$customClassForCo === void 0 ? '' : _ref$customClassForCo,
33
+ _ref$color = _ref.color,
34
+ color = _ref$color === void 0 ? '#676464' : _ref$color,
35
+ _ref$pointerEvents = _ref.pointerEvents,
36
+ pointerEvents = _ref$pointerEvents === void 0 ? 'none' : _ref$pointerEvents,
37
+ targetRef = _ref.targetRef,
38
+ tooltip = _ref.tooltip;
39
+ var refSvg = (0, _react.useRef)(null);
40
+ var getPaths = function getPaths() {
41
+ return name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
42
+ };
43
+ var getSvg = function getSvg() {
40
44
  var _getPaths;
41
45
  return /*#__PURE__*/_react.default.createElement("svg", {
42
46
  "data-testid": "icon",
43
- "data-color-style": colorStyle,
44
- onClick: () => {
45
- if (onClick && !disabled) onClick();
47
+ onClick: function onClick() {
48
+ if (_onClick && !disabled) _onClick();
46
49
  },
47
- ref: r => {
50
+ ref: function ref(r) {
48
51
  refSvg.current = r;
49
52
  },
50
53
  width: "".concat(size, "px"),
51
54
  height: "".concat(size, "px"),
52
- fill: disabled ? disabledIconColor : colorFromProp,
53
- viewBox: viewBox || viewBoxFromIconOrSvgStrcut,
55
+ fill: disabled ? disabledIconColor : color,
56
+ viewBox: name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox,
54
57
  className: "icon-component ".concat(customClass),
55
58
  pointerEvents: pointerEvents,
56
59
  style: style
57
- }, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(value => /*#__PURE__*/_react.default.createElement("path", {
58
- "data-testid": "icon-path",
59
- d: value,
60
- key: value
61
- })));
60
+ }, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(function (value) {
61
+ return /*#__PURE__*/_react.default.createElement("path", {
62
+ "data-testid": "icon-path",
63
+ d: value,
64
+ key: value
65
+ });
66
+ }));
62
67
  };
63
- if (color && colorStyle !== 'default') throw new Error('Expected only one of the two properties: colorStyle or color');
64
68
  if (!name && !svgStruct) throw new Error('One of the "name" and "svgStruct" props must be filled');
65
69
  if (!visible) return null;
66
70
  if (!tooltip) return getSvg();
67
71
  return /*#__PURE__*/_react.default.createElement("div", {
68
72
  className: "icon-component-container ".concat(customClassForContainer),
69
- ref: r => {
73
+ ref: function ref(r) {
70
74
  if (targetRef && r) targetRef(r);
71
75
  }
72
76
  }, getSvg());
73
77
  };
74
- var _default = exports.default = (0, _withTooltip.default)(Icon);
78
+ var _default = (0, _withTooltip.default)(Icon);
79
+ exports.default = _default;
@@ -3,7 +3,6 @@ import { PointerEvents } from '../@types/PointerEvents.js';
3
3
  import { SizePixels } from '../@types/SizePixels.js';
4
4
  import { IconNames } from '../@types/Icon.js';
5
5
  import { Position } from '../@types/Position.js';
6
- import { ColorStyles } from '../@types/ColorStyles.js';
7
6
  import './helper.js';
8
7
 
9
8
  type ListIconType = {
@@ -12,38 +11,26 @@ type ListIconType = {
12
11
  paths: Array<string>;
13
12
  };
14
13
  };
15
- type SvgStruct = {
16
- viewbox: string;
17
- paths: Array<string>;
18
- };
19
- type BaseIconProps = {
14
+ interface IIconProps {
20
15
  size?: SizePixels;
16
+ color?: string;
21
17
  customClass?: string;
22
18
  customClassForContainer?: string;
23
19
  style?: CSSProperties;
24
20
  visible?: boolean;
25
21
  disabled?: boolean;
26
22
  pointerEvents?: PointerEvents;
23
+ name?: IconNames;
27
24
  viewBox?: string;
25
+ svgStruct?: {
26
+ viewbox: string;
27
+ paths: Array<string>;
28
+ };
28
29
  onClick?: () => void;
29
30
  tooltipPosition?: Exclude<Position, 'center'>;
30
31
  tooltipWidth?: string | number;
31
32
  tooltip?: string;
32
33
  targetRef?: (ref: HTMLDivElement) => void;
33
- };
34
- type ColorProps = ({
35
- colorStyle?: ColorStyles | 'default';
36
- color?: null;
37
- } | {
38
- color?: string;
39
- colorStyle?: undefined;
40
- });
41
- type IconProps = BaseIconProps & ColorProps & ({
42
- name: IconNames;
43
- svgStruct?: null;
44
- } | {
45
- svgStruct: SvgStruct;
46
- name?: null;
47
- });
34
+ }
48
35
 
49
- export { IconProps, ListIconType };
36
+ export { IIconProps, ListIconType };
package/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { default as List } from './list/index.js';
7
7
  export { default as Radio } from './radio/index.js';
8
8
  export { default as Tab } from './tabs/index.js';
9
9
  export { default as Dialog } from './dialog/base/index.js';
10
- import './panel/types.js';
10
+ import './types-c2a0f035.js';
11
11
  import 'react';
12
12
  import './@types/PermissionAttr.js';
13
13
  import './internals/colorStyles.js';
@@ -27,7 +27,6 @@ import './labels/types.js';
27
27
  import './icons/types.js';
28
28
  import './@types/PointerEvents.js';
29
29
  import './@types/SizePixels.js';
30
- import './@types/ColorStyles.js';
31
30
  import './list/Header.js';
32
31
  import './list/types.js';
33
32
  import './list/Item.js';
package/lib/index.js CHANGED
@@ -5,55 +5,55 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Button", {
7
7
  enumerable: true,
8
- get: function () {
8
+ get: function get() {
9
9
  return _buttons.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "Dialog", {
13
13
  enumerable: true,
14
- get: function () {
14
+ get: function get() {
15
15
  return _base.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "Icon", {
19
19
  enumerable: true,
20
- get: function () {
20
+ get: function get() {
21
21
  return _icons.default;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "Label", {
25
25
  enumerable: true,
26
- get: function () {
26
+ get: function get() {
27
27
  return _labels.default;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "List", {
31
31
  enumerable: true,
32
- get: function () {
32
+ get: function get() {
33
33
  return _list.default;
34
34
  }
35
35
  });
36
36
  Object.defineProperty(exports, "Panel", {
37
37
  enumerable: true,
38
- get: function () {
38
+ get: function get() {
39
39
  return _panel.default;
40
40
  }
41
41
  });
42
42
  Object.defineProperty(exports, "Radio", {
43
43
  enumerable: true,
44
- get: function () {
44
+ get: function get() {
45
45
  return _radio.default;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "Tab", {
49
49
  enumerable: true,
50
- get: function () {
50
+ get: function get() {
51
51
  return _tabs.default;
52
52
  }
53
53
  });
54
54
  Object.defineProperty(exports, "Toolbar", {
55
55
  enumerable: true,
56
- get: function () {
56
+ get: function get() {
57
57
  return _toolbar.default;
58
58
  }
59
59
  });
@@ -3,8 +3,6 @@ import 'react';
3
3
  import '../../@types/Align.js';
4
4
  import '../../@types/Period.js';
5
5
  import '../../@types/PermissionAttr.js';
6
- import '../../internals/types.js';
7
- import '../../@types/Position.js';
8
6
 
9
7
  declare const _default: (props: IBaseProps) => JSX.Element;
10
8