@semcore/core 16.5.1 → 17.0.0-prerelease.17

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 (427) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/README.md +4 -4
  3. package/lib/LastInteractionType.js +22 -36
  4. package/lib/LastInteractionType.js.map +1 -1
  5. package/lib/LastInteractionType.mjs +19 -33
  6. package/lib/LastInteractionType.mjs.map +1 -1
  7. package/lib/core-types/Component.d.ts +26 -79
  8. package/lib/core-types/Component.js +24 -72
  9. package/lib/core-types/Component.js.map +1 -1
  10. package/lib/core-types/Component.mjs +18 -34
  11. package/lib/core-types/Component.mjs.map +1 -1
  12. package/lib/core-types/symbols.js +9 -9
  13. package/lib/core-types/symbols.js.map +1 -1
  14. package/lib/core-types/symbols.mjs +9 -9
  15. package/lib/core-types/symbols.mjs.map +1 -1
  16. package/lib/coreFactory.d.ts +6 -23
  17. package/lib/coreFactory.js +150 -217
  18. package/lib/coreFactory.js.map +1 -1
  19. package/lib/coreFactory.mjs +139 -194
  20. package/lib/coreFactory.mjs.map +1 -1
  21. package/lib/decorators/propsObserver.d.ts +11 -0
  22. package/lib/decorators/reactive.d.ts +11 -0
  23. package/lib/enhancement/Children.js +51 -59
  24. package/lib/enhancement/Children.js.map +1 -1
  25. package/lib/enhancement/Children.mjs +47 -41
  26. package/lib/enhancement/Children.mjs.map +1 -1
  27. package/lib/enhancement/Root.js +36 -37
  28. package/lib/enhancement/Root.js.map +1 -1
  29. package/lib/enhancement/Root.mjs +28 -18
  30. package/lib/enhancement/Root.mjs.map +1 -1
  31. package/lib/enhancement/dataName.js +7 -8
  32. package/lib/enhancement/dataName.js.map +1 -1
  33. package/lib/enhancement/dataName.mjs +5 -5
  34. package/lib/enhancement/dataName.mjs.map +1 -1
  35. package/lib/enhancement/enhance.js +6 -9
  36. package/lib/enhancement/enhance.js.map +1 -1
  37. package/lib/enhancement/enhance.mjs +5 -7
  38. package/lib/enhancement/enhance.mjs.map +1 -1
  39. package/lib/enhancement/functionDefaultProps.js +6 -6
  40. package/lib/enhancement/functionDefaultProps.js.map +1 -1
  41. package/lib/enhancement/functionDefaultProps.mjs +4 -4
  42. package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
  43. package/lib/enhancement/i18n.js +13 -13
  44. package/lib/enhancement/i18n.js.map +1 -1
  45. package/lib/enhancement/i18n.mjs +10 -9
  46. package/lib/enhancement/i18n.mjs.map +1 -1
  47. package/lib/enhancement/inheritedName.js +7 -8
  48. package/lib/enhancement/inheritedName.js.map +1 -1
  49. package/lib/enhancement/inheritedName.mjs +5 -5
  50. package/lib/enhancement/inheritedName.mjs.map +1 -1
  51. package/lib/enhancement/staticChildren.js +47 -56
  52. package/lib/enhancement/staticChildren.js.map +1 -1
  53. package/lib/enhancement/staticChildren.mjs +43 -48
  54. package/lib/enhancement/staticChildren.mjs.map +1 -1
  55. package/lib/enhancement/style.js +29 -27
  56. package/lib/enhancement/style.js.map +1 -1
  57. package/lib/enhancement/style.mjs +26 -20
  58. package/lib/enhancement/style.mjs.map +1 -1
  59. package/lib/enhancement/uncontrolledProps.js +46 -64
  60. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  61. package/lib/enhancement/uncontrolledProps.mjs +43 -51
  62. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  63. package/lib/esm/LastInteractionType.mjs +19 -33
  64. package/lib/esm/core-types/Component.mjs +18 -34
  65. package/lib/esm/core-types/symbols.mjs +9 -9
  66. package/lib/esm/coreFactory.mjs +139 -194
  67. package/lib/esm/enhancement/Children.mjs +47 -41
  68. package/lib/esm/enhancement/Root.mjs +28 -18
  69. package/lib/esm/enhancement/dataName.mjs +5 -5
  70. package/lib/esm/enhancement/enhance.mjs +5 -7
  71. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  72. package/lib/esm/enhancement/i18n.mjs +10 -9
  73. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  74. package/lib/esm/enhancement/staticChildren.mjs +43 -48
  75. package/lib/esm/enhancement/style.mjs +26 -20
  76. package/lib/esm/enhancement/uncontrolledProps.mjs +43 -51
  77. package/lib/esm/register.mjs +12 -20
  78. package/lib/esm/styled/reshadow-core.mjs +98 -111
  79. package/lib/esm/styled/sstyled.mjs +31 -41
  80. package/lib/esm/utils/assignProps.mjs +32 -36
  81. package/lib/esm/utils/enhances/WithI18n.mjs +16 -63
  82. package/lib/esm/utils/enhances/i18nEnhance.mjs +47 -61
  83. package/lib/esm/utils/logger.mjs +13 -21
  84. package/lib/esm/utils/pick.mjs +4 -4
  85. package/lib/esm/utils/ref.mjs +27 -57
  86. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  87. package/lib/index.d.ts +3 -3
  88. package/lib/index.js +17 -17
  89. package/lib/index.js.map +1 -1
  90. package/lib/index.mjs.map +1 -1
  91. package/lib/register.js +17 -24
  92. package/lib/register.js.map +1 -1
  93. package/lib/register.mjs +12 -20
  94. package/lib/register.mjs.map +1 -1
  95. package/lib/styled/index.d.ts +1 -5
  96. package/lib/styled/index.js +4 -4
  97. package/lib/styled/index.js.map +1 -1
  98. package/lib/styled/index.mjs.map +1 -1
  99. package/lib/styled/reshadow-core.js +102 -104
  100. package/lib/styled/reshadow-core.js.map +1 -1
  101. package/lib/styled/reshadow-core.mjs +98 -111
  102. package/lib/styled/reshadow-core.mjs.map +1 -1
  103. package/lib/styled/sstyled.js +31 -53
  104. package/lib/styled/sstyled.js.map +1 -1
  105. package/lib/styled/sstyled.mjs +31 -41
  106. package/lib/styled/sstyled.mjs.map +1 -1
  107. package/lib/theme/processor.js +150 -222
  108. package/lib/theme/processor.js.map +1 -1
  109. package/lib/theme/processor.mjs +148 -221
  110. package/lib/theme/processor.mjs.map +1 -1
  111. package/lib/theme/themes/dark.js +2 -2
  112. package/lib/theme/themes/dark.js.map +1 -1
  113. package/lib/theme/themes/default.js +2 -2
  114. package/lib/theme/themes/default.js.map +1 -1
  115. package/lib/theme/themes/highlights-dark.js +2 -2
  116. package/lib/theme/themes/highlights-dark.js.map +1 -1
  117. package/lib/theme/themes/highlights-light.js +2 -2
  118. package/lib/theme/themes/highlights-light.js.map +1 -1
  119. package/lib/theme/themes/light.js +2 -2
  120. package/lib/theme/themes/light.js.map +1 -1
  121. package/lib/theme/utils.js +140 -215
  122. package/lib/theme/utils.js.map +1 -1
  123. package/lib/theme/utils.mjs +135 -214
  124. package/lib/theme/utils.mjs.map +1 -1
  125. package/lib/utils/CSSinJS.js +8 -10
  126. package/lib/utils/CSSinJS.js.map +1 -1
  127. package/lib/utils/CSSinJS.mjs +6 -7
  128. package/lib/utils/CSSinJS.mjs.map +1 -1
  129. package/lib/utils/ThemeProvider.js +44 -51
  130. package/lib/utils/ThemeProvider.js.map +1 -1
  131. package/lib/utils/ThemeProvider.mjs +36 -47
  132. package/lib/utils/ThemeProvider.mjs.map +1 -1
  133. package/lib/utils/addonText.js +4 -7
  134. package/lib/utils/addonText.js.map +1 -1
  135. package/lib/utils/addonText.mjs +2 -5
  136. package/lib/utils/addonText.mjs.map +1 -1
  137. package/lib/utils/addonTextChildren.js +15 -21
  138. package/lib/utils/addonTextChildren.js.map +1 -1
  139. package/lib/utils/addonTextChildren.mjs +7 -13
  140. package/lib/utils/addonTextChildren.mjs.map +1 -1
  141. package/lib/utils/ariaProps.js +7 -5
  142. package/lib/utils/ariaProps.js.map +1 -1
  143. package/lib/utils/ariaProps.mjs +7 -5
  144. package/lib/utils/ariaProps.mjs.map +1 -1
  145. package/lib/utils/assignProps.js +33 -37
  146. package/lib/utils/assignProps.js.map +1 -1
  147. package/lib/utils/assignProps.mjs +32 -36
  148. package/lib/utils/assignProps.mjs.map +1 -1
  149. package/lib/utils/canUseDOM.js +1 -1
  150. package/lib/utils/capitalizeFirstLetter.js +1 -1
  151. package/lib/utils/color.js +72 -95
  152. package/lib/utils/color.js.map +1 -1
  153. package/lib/utils/color.mjs +71 -94
  154. package/lib/utils/color.mjs.map +1 -1
  155. package/lib/utils/compose.js +3 -12
  156. package/lib/utils/compose.js.map +1 -1
  157. package/lib/utils/compose.mjs +2 -11
  158. package/lib/utils/compose.mjs.map +1 -1
  159. package/lib/utils/createUUID.js +5 -5
  160. package/lib/utils/createUUID.js.map +1 -1
  161. package/lib/utils/createUUID.mjs +4 -4
  162. package/lib/utils/createUUID.mjs.map +1 -1
  163. package/lib/utils/cssToIntDefault.js +3 -4
  164. package/lib/utils/cssToIntDefault.js.map +1 -1
  165. package/lib/utils/cssToIntDefault.mjs +2 -3
  166. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  167. package/lib/utils/enhances/WithCSS.d.ts +2 -30
  168. package/lib/utils/enhances/WithCSS.js +13 -64
  169. package/lib/utils/enhances/WithCSS.js.map +1 -1
  170. package/lib/utils/enhances/WithCSS.mjs +9 -59
  171. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  172. package/lib/utils/enhances/WithI18n.d.ts +1 -30
  173. package/lib/utils/enhances/WithI18n.js +20 -76
  174. package/lib/utils/enhances/WithI18n.js.map +1 -1
  175. package/lib/utils/enhances/WithI18n.mjs +16 -63
  176. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  177. package/lib/utils/enhances/a11yEnhance.js +34 -39
  178. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  179. package/lib/utils/enhances/a11yEnhance.mjs +32 -36
  180. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  181. package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -4
  182. package/lib/utils/enhances/animatedSizeEnhance.js +55 -65
  183. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  184. package/lib/utils/enhances/animatedSizeEnhance.mjs +50 -61
  185. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  186. package/lib/utils/enhances/contextEnhance.js +12 -11
  187. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  188. package/lib/utils/enhances/contextEnhance.mjs +9 -8
  189. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  190. package/lib/utils/enhances/i18nEnhance.d.ts +0 -4
  191. package/lib/utils/enhances/i18nEnhance.js +51 -69
  192. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  193. package/lib/utils/enhances/i18nEnhance.mjs +47 -61
  194. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  195. package/lib/utils/enhances/resolveColorEnhance.js +12 -10
  196. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  197. package/lib/utils/enhances/resolveColorEnhance.mjs +8 -6
  198. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  199. package/lib/utils/eventEmitter.d.ts +10 -6
  200. package/lib/utils/eventEmitter.js +33 -32
  201. package/lib/utils/eventEmitter.js.map +1 -1
  202. package/lib/utils/eventEmitter.mjs +30 -31
  203. package/lib/utils/eventEmitter.mjs.map +1 -1
  204. package/lib/utils/findComponent.js +35 -42
  205. package/lib/utils/findComponent.js.map +1 -1
  206. package/lib/utils/findComponent.mjs +26 -33
  207. package/lib/utils/findComponent.mjs.map +1 -1
  208. package/lib/utils/fire.js +7 -13
  209. package/lib/utils/fire.js.map +1 -1
  210. package/lib/utils/fire.mjs +5 -11
  211. package/lib/utils/fire.mjs.map +1 -1
  212. package/lib/utils/focus-lock/focusBorders.js +28 -32
  213. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  214. package/lib/utils/focus-lock/focusBorders.mjs +26 -32
  215. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  216. package/lib/utils/focus-lock/getFocusableIn.js +4 -6
  217. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  218. package/lib/utils/focus-lock/getFocusableIn.mjs +3 -6
  219. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  220. package/lib/utils/focus-lock/isFocusInside.js +5 -6
  221. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  222. package/lib/utils/focus-lock/isFocusInside.mjs +4 -6
  223. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  224. package/lib/utils/focus-lock/isFocusable.js +9 -12
  225. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  226. package/lib/utils/focus-lock/isFocusable.mjs +8 -11
  227. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  228. package/lib/utils/focus-lock/setFocus.js +21 -27
  229. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  230. package/lib/utils/focus-lock/setFocus.mjs +19 -25
  231. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  232. package/lib/utils/getAccessibleName.js +10 -22
  233. package/lib/utils/getAccessibleName.js.map +1 -1
  234. package/lib/utils/getAccessibleName.mjs +10 -21
  235. package/lib/utils/getAccessibleName.mjs.map +1 -1
  236. package/lib/utils/getDisplayName.js +1 -1
  237. package/lib/utils/getDisplayName.mjs +3 -5
  238. package/lib/utils/getEventTarget.js +13 -32
  239. package/lib/utils/getEventTarget.js.map +1 -1
  240. package/lib/utils/getEventTarget.mjs +12 -31
  241. package/lib/utils/getEventTarget.mjs.map +1 -1
  242. package/lib/utils/getOriginChildren.js +4 -4
  243. package/lib/utils/getOriginChildren.js.map +1 -1
  244. package/lib/utils/getRandomInt.js +1 -1
  245. package/lib/utils/getValue.js +4 -6
  246. package/lib/utils/getValue.js.map +1 -1
  247. package/lib/utils/getValue.mjs +3 -5
  248. package/lib/utils/getValue.mjs.map +1 -1
  249. package/lib/utils/hasLabels.js +16 -27
  250. package/lib/utils/hasLabels.js.map +1 -1
  251. package/lib/utils/hasLabels.mjs +14 -24
  252. package/lib/utils/hasLabels.mjs.map +1 -1
  253. package/lib/utils/hasParent.js +3 -2
  254. package/lib/utils/hasParent.js.map +1 -1
  255. package/lib/utils/hasParent.mjs +2 -3
  256. package/lib/utils/hasParent.mjs.map +1 -1
  257. package/lib/utils/ifChildren.js +6 -4
  258. package/lib/utils/ifChildren.js.map +1 -1
  259. package/lib/utils/ifChildren.mjs +4 -2
  260. package/lib/utils/ifChildren.mjs.map +1 -1
  261. package/lib/utils/injectStyle.js +11 -13
  262. package/lib/utils/injectStyle.js.map +1 -1
  263. package/lib/utils/injectStyle.mjs +9 -10
  264. package/lib/utils/injectStyle.mjs.map +1 -1
  265. package/lib/utils/inputProps.js +5 -5
  266. package/lib/utils/inputProps.js.map +1 -1
  267. package/lib/utils/inputProps.mjs +4 -4
  268. package/lib/utils/inputProps.mjs.map +1 -1
  269. package/lib/utils/isInteractiveElement.js +7 -9
  270. package/lib/utils/isInteractiveElement.js.map +1 -1
  271. package/lib/utils/isInteractiveElement.mjs +7 -9
  272. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  273. package/lib/utils/isNode.js +4 -5
  274. package/lib/utils/isNode.js.map +1 -1
  275. package/lib/utils/isNode.mjs +1 -2
  276. package/lib/utils/isNode.mjs.map +1 -1
  277. package/lib/utils/isPromise.js +1 -1
  278. package/lib/utils/isRetina.js +7 -2
  279. package/lib/utils/isRetina.js.map +1 -1
  280. package/lib/utils/isRetina.mjs +6 -1
  281. package/lib/utils/isRetina.mjs.map +1 -1
  282. package/lib/utils/logger.js +18 -25
  283. package/lib/utils/logger.js.map +1 -1
  284. package/lib/utils/logger.mjs +13 -21
  285. package/lib/utils/logger.mjs.map +1 -1
  286. package/lib/utils/numericChecker.js +11 -18
  287. package/lib/utils/numericChecker.js.map +1 -1
  288. package/lib/utils/numericChecker.mjs +10 -17
  289. package/lib/utils/numericChecker.mjs.map +1 -1
  290. package/lib/utils/ownerDocument.js +2 -2
  291. package/lib/utils/ownerDocument.js.map +1 -1
  292. package/lib/utils/ownerDocument.mjs +1 -1
  293. package/lib/utils/ownerDocument.mjs.map +1 -1
  294. package/lib/utils/pick.js +5 -5
  295. package/lib/utils/pick.js.map +1 -1
  296. package/lib/utils/pick.mjs +4 -4
  297. package/lib/utils/pick.mjs.map +1 -1
  298. package/lib/utils/propsForElement.js +10 -12
  299. package/lib/utils/propsForElement.js.map +1 -1
  300. package/lib/utils/propsForElement.mjs +8 -10
  301. package/lib/utils/propsForElement.mjs.map +1 -1
  302. package/lib/utils/rafTrottle.js +9 -14
  303. package/lib/utils/rafTrottle.js.map +1 -1
  304. package/lib/utils/rafTrottle.mjs +7 -12
  305. package/lib/utils/rafTrottle.mjs.map +1 -1
  306. package/lib/utils/reactToText.js +5 -8
  307. package/lib/utils/reactToText.js.map +1 -1
  308. package/lib/utils/reactToText.mjs +3 -6
  309. package/lib/utils/reactToText.mjs.map +1 -1
  310. package/lib/utils/ref.d.ts +1 -3
  311. package/lib/utils/ref.js +29 -61
  312. package/lib/utils/ref.js.map +1 -1
  313. package/lib/utils/ref.mjs +27 -57
  314. package/lib/utils/ref.mjs.map +1 -1
  315. package/lib/utils/setRef.js +2 -2
  316. package/lib/utils/setRef.js.map +1 -1
  317. package/lib/utils/syncScroll.js +24 -24
  318. package/lib/utils/syncScroll.js.map +1 -1
  319. package/lib/utils/syncScroll.mjs +21 -21
  320. package/lib/utils/syncScroll.mjs.map +1 -1
  321. package/lib/utils/uncontroll.js +8 -18
  322. package/lib/utils/uncontroll.js.map +1 -1
  323. package/lib/utils/uncontroll.mjs +8 -17
  324. package/lib/utils/uncontroll.mjs.map +1 -1
  325. package/lib/utils/uniqueID.d.ts +0 -4
  326. package/lib/utils/uniqueID.js +23 -30
  327. package/lib/utils/uniqueID.js.map +1 -1
  328. package/lib/utils/uniqueID.mjs +19 -29
  329. package/lib/utils/uniqueID.mjs.map +1 -1
  330. package/lib/utils/use/useColorResolver.js +20 -21
  331. package/lib/utils/use/useColorResolver.js.map +1 -1
  332. package/lib/utils/use/useColorResolver.mjs +16 -18
  333. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  334. package/lib/utils/use/useEnhancedEffect.d.ts +1 -1
  335. package/lib/utils/use/useEnhancedEffect.js +4 -4
  336. package/lib/utils/use/useEnhancedEffect.js.map +1 -1
  337. package/lib/utils/use/useEnhancedEffect.mjs +1 -1
  338. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
  339. package/lib/utils/use/useEventCallback.js +5 -10
  340. package/lib/utils/use/useEventCallback.js.map +1 -1
  341. package/lib/utils/use/useEventCallback.mjs +3 -8
  342. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  343. package/lib/utils/use/useEventListener.js +11 -15
  344. package/lib/utils/use/useEventListener.js.map +1 -1
  345. package/lib/utils/use/useEventListener.mjs +7 -11
  346. package/lib/utils/use/useEventListener.mjs.map +1 -1
  347. package/lib/utils/use/useFocusLock.js +80 -94
  348. package/lib/utils/use/useFocusLock.js.map +1 -1
  349. package/lib/utils/use/useFocusLock.mjs +71 -88
  350. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  351. package/lib/utils/use/usePreventScroll.js +26 -28
  352. package/lib/utils/use/usePreventScroll.js.map +1 -1
  353. package/lib/utils/use/usePreventScroll.mjs +21 -23
  354. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  355. package/lib/utils/use/useScrollBarWidth.js +8 -14
  356. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  357. package/lib/utils/use/useScrollBarWidth.mjs +8 -13
  358. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  359. package/lib/utils/useCssVariable.js +32 -37
  360. package/lib/utils/useCssVariable.js.map +1 -1
  361. package/lib/utils/useCssVariable.mjs +27 -34
  362. package/lib/utils/useCssVariable.mjs.map +1 -1
  363. package/lib/utils/zIndexStacking.d.ts +3 -1
  364. package/lib/utils/zIndexStacking.js +28 -24
  365. package/lib/utils/zIndexStacking.js.map +1 -1
  366. package/lib/utils/zIndexStacking.mjs +23 -22
  367. package/lib/utils/zIndexStacking.mjs.map +1 -1
  368. package/package.json +129 -129
  369. package/lib/enhancement/bindHandler.d.ts +0 -5
  370. package/lib/enhancement/bindHandler.js +0 -53
  371. package/lib/enhancement/bindHandler.js.map +0 -1
  372. package/lib/enhancement/bindHandler.mjs +0 -48
  373. package/lib/enhancement/bindHandler.mjs.map +0 -1
  374. package/lib/enhancement/hoistProps.d.ts +0 -10
  375. package/lib/enhancement/hoistProps.js +0 -95
  376. package/lib/enhancement/hoistProps.js.map +0 -1
  377. package/lib/enhancement/hoistProps.mjs +0 -78
  378. package/lib/enhancement/hoistProps.mjs.map +0 -1
  379. package/lib/esm/enhancement/bindHandler.mjs +0 -48
  380. package/lib/esm/enhancement/hoistProps.mjs +0 -78
  381. package/lib/esm/utils/createHoc.mjs +0 -42
  382. package/lib/esm/utils/getDisplayName.mjs +0 -6
  383. package/lib/utils/ScreenReaderOnly.d.ts +0 -8
  384. package/lib/utils/ScreenReaderOnly.js +0 -30
  385. package/lib/utils/ScreenReaderOnly.js.map +0 -1
  386. package/lib/utils/ScreenReaderOnly.mjs +0 -24
  387. package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
  388. package/lib/utils/createHoc.d.ts +0 -3
  389. package/lib/utils/createHoc.js +0 -52
  390. package/lib/utils/createHoc.js.map +0 -1
  391. package/lib/utils/createHoc.mjs +0 -42
  392. package/lib/utils/createHoc.mjs.map +0 -1
  393. package/lib/utils/enhances/WithAutoFocus.d.ts +0 -14
  394. package/lib/utils/enhances/WithAutoFocus.js +0 -72
  395. package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
  396. package/lib/utils/enhances/WithAutoFocus.mjs +0 -66
  397. package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
  398. package/lib/utils/enhances/WithKeyboardFocus.d.ts +0 -46
  399. package/lib/utils/enhances/WithKeyboardFocus.js +0 -94
  400. package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
  401. package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -88
  402. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
  403. package/lib/utils/enhances/WithRef.d.ts +0 -3
  404. package/lib/utils/enhances/WithRef.js +0 -25
  405. package/lib/utils/enhances/WithRef.js.map +0 -1
  406. package/lib/utils/enhances/WithRef.mjs +0 -18
  407. package/lib/utils/enhances/WithRef.mjs.map +0 -1
  408. package/lib/utils/enhances/autoFocusEnhance.d.ts +0 -10
  409. package/lib/utils/enhances/autoFocusEnhance.js +0 -45
  410. package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
  411. package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
  412. package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
  413. package/lib/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
  414. package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
  415. package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  416. package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
  417. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
  418. package/lib/utils/if.d.ts +0 -11
  419. package/lib/utils/if.js +0 -15
  420. package/lib/utils/if.js.map +0 -1
  421. package/lib/utils/if.mjs +0 -9
  422. package/lib/utils/if.mjs.map +0 -1
  423. package/lib/utils/use/useCss.d.ts +0 -4
  424. package/lib/utils/use/useCss.js +0 -19
  425. package/lib/utils/use/useCss.js.map +0 -1
  426. package/lib/utils/use/useCss.mjs +0 -12
  427. package/lib/utils/use/useCss.mjs.map +0 -1
@@ -1,40 +1,24 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
- import _inherits from "@babel/runtime/helpers/esm/inherits";
5
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
2
  import { PureComponent } from "react";
7
- var Root = void 0;
8
- var RootComponent = /* @__PURE__ */ (function(_PureComponent) {
9
- function RootComponent2() {
10
- var _this;
11
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
- args[_key] = arguments[_key];
13
- }
14
- _classCallCheck(this, RootComponent2);
15
- _this = _callSuper(this, RootComponent2, [].concat(args));
16
- _defineProperty(_this, "Root", void 0);
17
- _defineProperty(_this, "isControlled", false);
18
- return _this;
3
+ const Root = void 0;
4
+ class Component extends PureComponent {
5
+ constructor(...args) {
6
+ super(...args);
7
+ _defineProperty(this, "Root", void 0);
8
+ _defineProperty(this, "isControlled", false);
19
9
  }
20
- _inherits(RootComponent2, _PureComponent);
21
- return _createClass(RootComponent2, [{
22
- key: "handlers",
23
- get: function get() {
24
- return {};
25
- }
26
- }, {
27
- key: "asProps",
28
- get: function get() {
29
- return {};
30
- }
31
- }]);
32
- })(PureComponent);
33
- var Component = RootComponent;
34
- var Intergalactic;
35
- var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
36
- return wrapper;
37
- };
10
+ uncontrolledProps() {
11
+ return {};
12
+ }
13
+ get handlers() {
14
+ return {};
15
+ }
16
+ get asProps() {
17
+ return {};
18
+ }
19
+ }
20
+ let Intergalactic;
21
+ const wrapIntergalacticComponent = (wrapper) => wrapper;
38
22
  export {
39
23
  Component,
40
24
  Intergalactic,
@@ -1,12 +1,12 @@
1
- var CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
- var CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
- var CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
- var CORE_INIT = Symbol("CORE_INIT");
5
- var CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
- var CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
- var PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
- var CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
- var INHERITED_NAME = Symbol("INHERITED_NAME");
1
+ const CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
+ const CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
+ const CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
+ const CORE_INIT = Symbol("CORE_INIT");
5
+ const CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
+ const CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
+ const PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
+ const CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
+ const INHERITED_NAME = Symbol("INHERITED_NAME");
10
10
  export {
11
11
  CHILDREN_COMPONENT,
12
12
  CONTEXT_COMPONENT,
@@ -1,45 +1,34 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
4
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
- import _createClass from "@babel/runtime/helpers/esm/createClass";
6
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
7
- import _inherits from "@babel/runtime/helpers/esm/inherits";
8
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
2
  import _extends from "@babel/runtime/helpers/esm/extends";
10
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
11
3
  import hoistNonReactStatics from "hoist-non-react-statics";
12
4
  import React from "react";
13
5
  import { Component } from "./core-types/Component.mjs";
14
6
  import { CORE_AS_PROPS, CORE_INSTANCE, CORE_INIT, CORE_COMPONENT, PARENT_COMPONENTS, CONTEXT_COMPONENT, CREATE_COMPONENT } from "./core-types/symbols.mjs";
15
- import Enhancement from "./enhancement/bindHandler.mjs";
16
- import Enhancement$1 from "./enhancement/Children.mjs";
17
- import Enhancement$7 from "./enhancement/dataName.mjs";
18
- import Enhancement$8 from "./enhancement/enhance.mjs";
19
- import Enhancement$5 from "./enhancement/functionDefaultProps.mjs";
20
- import Enhancement$a from "./enhancement/hoistProps.mjs";
7
+ import Enhancement from "./enhancement/Children.mjs";
8
+ import Enhancement$6 from "./enhancement/dataName.mjs";
9
+ import Enhancement$7 from "./enhancement/enhance.mjs";
10
+ import Enhancement$4 from "./enhancement/functionDefaultProps.mjs";
21
11
  import i18nAppLocaleEnhance from "./enhancement/i18n.mjs";
22
- import Enhancement$6 from "./enhancement/inheritedName.mjs";
23
- import Enhancement$2 from "./enhancement/Root.mjs";
24
- import Enhancement$4, { ROOT_COMPONENT, getterMethodNameByDisplayName, STATIC_COMPONENT } from "./enhancement/staticChildren.mjs";
25
- import Enhancement$9 from "./enhancement/style.mjs";
26
- import Enhancement$3 from "./enhancement/uncontrolledProps.mjs";
12
+ import Enhancement$5 from "./enhancement/inheritedName.mjs";
13
+ import Enhancement$1 from "./enhancement/Root.mjs";
14
+ import Enhancement$3, { ROOT_COMPONENT, getterMethodNameByDisplayName, STATIC_COMPONENT } from "./enhancement/staticChildren.mjs";
15
+ import Enhancement$8 from "./enhancement/style.mjs";
16
+ import Enhancement$2 from "./enhancement/uncontrolledProps.mjs";
27
17
  import assignProps$1 from "./utils/assignProps.mjs";
28
18
  import { useForkRef } from "./utils/ref.mjs";
29
19
  import useEnhancedEffect from "./utils/use/useEnhancedEffect.mjs";
30
- var _excluded = ["forwardRef"], _excluded2 = ["forwardRef", "__WRAPPER_PROPS_BIND__"], _excluded3 = ["ref"];
31
20
  function isEmptyObject(obj) {
32
21
  return Object.getOwnPropertyNames(obj).length === 0 && Object.getOwnPropertySymbols && // For IE 11
33
22
  Object.getOwnPropertySymbols(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
34
23
  }
35
24
  function createGetField(enhancements, Component2, isFunction) {
36
25
  return function getField(key) {
37
- return enhancements.filter(function(enhancement) {
26
+ return enhancements.filter((enhancement) => {
38
27
  if (!enhancement.condition) {
39
28
  return true;
40
29
  }
41
30
  return enhancement.condition(Component2, isFunction);
42
- }).reduce(function(acc, item) {
31
+ }).reduce((acc, item) => {
43
32
  if (item[key]) {
44
33
  acc.push(item[key]);
45
34
  }
@@ -48,174 +37,142 @@ function createGetField(enhancements, Component2, isFunction) {
48
37
  };
49
38
  }
50
39
  function createForwardWrapper(Component2, wrapperProps, statics, isFunction) {
51
- var RootComponent = Component2[ROOT_COMPONENT];
52
- var getterMethodName = getterMethodNameByDisplayName(Component2 === null || Component2 === void 0 ? void 0 : Component2.displayName);
53
- var getterMethod = RootComponent !== null && RootComponent !== void 0 && RootComponent.prototype ? RootComponent.prototype[getterMethodName] : void 0;
54
- var useGetterIndex = (getterMethod === null || getterMethod === void 0 ? void 0 : getterMethod.length) >= 2;
55
- function WrapperForwardRefWithBind(_ref, ref) {
56
- var _ref$forwardRef = _ref.forwardRef, forwardRef = _ref$forwardRef === void 0 ? null : _ref$forwardRef, other = _objectWithoutProperties(_ref, _excluded);
40
+ const RootComponent = Component2[ROOT_COMPONENT];
41
+ const getterMethodName = getterMethodNameByDisplayName(Component2 == null ? void 0 : Component2.displayName);
42
+ const getterMethod = (RootComponent == null ? void 0 : RootComponent.prototype) ? RootComponent.prototype[getterMethodName] : void 0;
43
+ const useGetterIndex = (getterMethod == null ? void 0 : getterMethod.length) >= 2;
44
+ function WrapperForwardRefWithBind({
45
+ forwardRef = null,
46
+ ...other
47
+ }, ref) {
57
48
  return /* @__PURE__ */ React.createElement(BindingWrapper, _extends({}, other, {
58
49
  forwardRef: useForkRef(ref, forwardRef)
59
50
  }));
60
51
  }
61
- function WrapperForwardRef(_ref2, ref) {
62
- var _ref2$forwardRef = _ref2.forwardRef, forwardRef = _ref2$forwardRef === void 0 ? null : _ref2$forwardRef, __WRAPPER_PROPS_BIND__ = _ref2.__WRAPPER_PROPS_BIND__, other = _objectWithoutProperties(_ref2, _excluded2);
63
- var _reduce = (__WRAPPER_PROPS_BIND__ || wrapperProps).reduce(function(acc, enhancement) {
64
- return enhancement(acc, WrapperComponent, isFunction);
65
- }, other), _reduce$ref = _reduce.ref, enhancementRef = _reduce$ref === void 0 ? null : _reduce$ref, props = _objectWithoutProperties(_reduce, _excluded3);
52
+ function WrapperForwardRef({
53
+ forwardRef = null,
54
+ __WRAPPER_PROPS_BIND__,
55
+ ...other
56
+ }, ref) {
57
+ const {
58
+ ref: enhancementRef = null,
59
+ ...props
60
+ } = (__WRAPPER_PROPS_BIND__ || wrapperProps).reduce((acc, enhancement) => enhancement(acc, WrapperComponent, isFunction), other);
66
61
  return /* @__PURE__ */ React.createElement(Component2, _extends({}, props, {
67
62
  forwardRef: useForkRef(enhancementRef, ref, forwardRef)
68
63
  }));
69
64
  }
70
- var BindingWrapper = /* @__PURE__ */ (function(_React$Component) {
71
- function BindingWrapper2() {
72
- var _this;
73
- _classCallCheck(this, BindingWrapper2);
74
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
75
- args[_key] = arguments[_key];
76
- }
77
- _this = _callSuper(this, BindingWrapper2, [].concat(args));
78
- _defineProperty(_this, "index", -1);
79
- return _this;
65
+ class BindingWrapper extends React.Component {
66
+ constructor(...args) {
67
+ super(...args);
68
+ _defineProperty(this, "index", -1);
80
69
  }
81
- _inherits(BindingWrapper2, _React$Component);
82
- return _createClass(BindingWrapper2, [{
83
- key: "render",
84
- value: function render() {
85
- var _this2 = this;
86
- return /* @__PURE__ */ React.createElement(WrapperForwardRef, _extends({}, this.props, {
87
- __WRAPPER_PROPS_BIND__: wrapperProps.map(function(fn) {
88
- return fn.bind(_this2);
89
- })
90
- }));
91
- }
92
- }]);
93
- })(React.Component);
94
- var WrapperComponent = /* @__PURE__ */ React.forwardRef(useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef);
70
+ render() {
71
+ return /* @__PURE__ */ React.createElement(WrapperForwardRef, _extends({}, this.props, {
72
+ __WRAPPER_PROPS_BIND__: wrapperProps.map((fn) => fn.bind(this))
73
+ }));
74
+ }
75
+ }
76
+ const WrapperComponent = /* @__PURE__ */ React.forwardRef(useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef);
95
77
  hoistNonReactStatics(WrapperComponent, Component2);
96
78
  WrapperComponent.displayName = Component2.displayName;
97
79
  WrapperComponent.defaultProps = Component2.defaultProps;
98
- statics.forEach(function(enhancement) {
99
- return Object.assign(WrapperComponent, enhancement(WrapperComponent, Component2, isFunction));
100
- });
80
+ statics.forEach((enhancement) => Object.assign(WrapperComponent, enhancement(WrapperComponent, Component2, isFunction)));
101
81
  return WrapperComponent;
102
82
  }
103
83
  function wrapClass(OriginComponent, enhancements, Context) {
104
- var getField = createGetField(enhancements, OriginComponent, false);
105
- var inits = getField("init");
106
- var props = getField("asProps");
107
- var renders = getField("render");
108
- var statics = getField("static");
109
- var wrapperProps = getField("wrapperProps");
110
- var contexts = getField("context");
111
- var Component2 = /* @__PURE__ */ (function(_OriginComponent2) {
112
- function Component3(props2, context) {
113
- var _this3;
114
- _classCallCheck(this, Component3);
115
- _this3 = _callSuper(this, Component3, [props2, context]);
116
- _defineProperty(_this3, CORE_AS_PROPS, null);
117
- _defineProperty(_this3, CORE_INSTANCE, WrapperComponent);
118
- _defineProperty(_this3, CORE_INIT, false);
119
- inits.forEach(function(enhancement) {
120
- return enhancement.call(_this3, props2, WrapperComponent, false);
121
- });
122
- _this3[CORE_INIT] = true;
123
- return _this3;
84
+ const getField = createGetField(enhancements, OriginComponent, false);
85
+ const inits = getField("init");
86
+ const props = getField("asProps");
87
+ const renders = getField("render");
88
+ const statics = getField("static");
89
+ const wrapperProps = getField("wrapperProps");
90
+ const contexts = getField("context");
91
+ class Component2 extends OriginComponent {
92
+ constructor(props2, context) {
93
+ super(props2, context);
94
+ _defineProperty(this, CORE_AS_PROPS, null);
95
+ _defineProperty(this, CORE_INSTANCE, WrapperComponent);
96
+ _defineProperty(this, CORE_INIT, false);
97
+ inits.forEach((enhancement) => enhancement.call(this, props2, WrapperComponent, false));
98
+ this[CORE_INIT] = true;
124
99
  }
125
- _inherits(Component3, _OriginComponent2);
126
- return _createClass(Component3, [{
127
- key: "asProps",
128
- get: function get() {
129
- var _this4 = this;
130
- if (!this[CORE_INIT]) {
131
- throw new Error("Can not call asProps in constructor");
132
- }
133
- if (!this[CORE_AS_PROPS]) {
134
- this[CORE_AS_PROPS] = props.reduce(function(acc, enhancement) {
135
- return enhancement.call(_this4, acc, WrapperComponent, false);
136
- }, this.props);
137
- }
138
- return this[CORE_AS_PROPS];
100
+ get asProps() {
101
+ if (!this[CORE_INIT]) {
102
+ throw new Error("Can not call asProps in constructor");
139
103
  }
140
- }, {
141
- key: "setContext",
142
- value: function setContext() {
143
- var _this5 = this;
144
- var contextProps = _superPropGet(Component3, "setContext", this, 1) ? _superPropGet(Component3, "setContext", this, 3)([]) : {};
145
- return contexts.reduce(function(acc, enhancement) {
146
- return enhancement.call(_this5, acc, WrapperComponent, false);
147
- }, contextProps);
104
+ if (!this[CORE_AS_PROPS]) {
105
+ this[CORE_AS_PROPS] = props.reduce((acc, enhancement) => enhancement.call(this, acc, WrapperComponent, false), this.props);
148
106
  }
149
- }, {
150
- key: "render",
151
- value: function render() {
152
- var _this6 = this;
153
- this[CORE_AS_PROPS] = null;
154
- if (!_superPropGet(Component3, "render", this, 1)) {
155
- throw new Error("Component `render` method is not defined");
156
- }
157
- var asProps = this.asProps;
158
- var ctx = this.setContext();
159
- var render2 = renders.reduce(function(acc, enhancement) {
160
- return enhancement.call(_this6, acc, asProps, WrapperComponent, false);
161
- }, _superPropGet(Component3, "render", this, 3)([]));
162
- if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {
163
- return /* @__PURE__ */ React.createElement(Context.Provider, {
164
- value: _objectSpread(_objectSpread({}, asProps), ctx)
165
- }, render2);
166
- } else {
167
- return render2;
168
- }
107
+ return this[CORE_AS_PROPS];
108
+ }
109
+ setContext() {
110
+ const contextProps = super.setContext ? super.setContext() : {};
111
+ return contexts.reduce((acc, enhancement) => enhancement.call(this, acc, WrapperComponent, false), contextProps);
112
+ }
113
+ render() {
114
+ this[CORE_AS_PROPS] = null;
115
+ if (!super.render) {
116
+ throw new Error("Component `render` method is not defined");
117
+ }
118
+ const asProps = this.asProps;
119
+ const ctx = this.setContext();
120
+ const render = renders.reduce((acc, enhancement) => enhancement.call(this, acc, asProps, WrapperComponent, false), super.render());
121
+ if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {
122
+ return /* @__PURE__ */ React.createElement(Context.Provider, {
123
+ value: {
124
+ ...asProps,
125
+ ...ctx
126
+ }
127
+ }, render);
128
+ } else {
129
+ return render;
169
130
  }
170
- }]);
171
- })(OriginComponent);
172
- var WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, false);
131
+ }
132
+ }
133
+ const WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, false);
173
134
  return WrapperComponent;
174
135
  }
175
136
  function wrapFunction(OriginComponent, enhancements, Context) {
176
- var getField = createGetField(enhancements, OriginComponent, true);
177
- var inits = getField("init");
178
- var props = getField("asProps");
179
- var renders = getField("render");
180
- var statics = getField("static");
181
- var wrapperProps = getField("wrapperProps");
182
- var contexts = getField("context");
183
- var Component2 = /* @__PURE__ */ React.memo(function FunctionMemoComponent(other) {
184
- var selfRef = React.useRef({});
185
- var firstRender = React.useRef(true);
186
- useEnhancedEffect(function() {
137
+ const getField = createGetField(enhancements, OriginComponent, true);
138
+ const inits = getField("init");
139
+ const props = getField("asProps");
140
+ const renders = getField("render");
141
+ const statics = getField("static");
142
+ const wrapperProps = getField("wrapperProps");
143
+ const contexts = getField("context");
144
+ const Component2 = /* @__PURE__ */ React.memo(function FunctionMemoComponent(other) {
145
+ const selfRef = React.useRef({});
146
+ const firstRender = React.useRef(true);
147
+ useEnhancedEffect(() => {
187
148
  firstRender.current = false;
188
149
  }, []);
189
150
  if (firstRender.current) {
190
- inits.forEach(function(enhancement) {
191
- return enhancement.call(selfRef.current, other, WrapperComponent, true);
192
- });
151
+ inits.forEach((enhancement) => enhancement.call(selfRef.current, other, WrapperComponent, true));
193
152
  }
194
- var asProps = props.reduce(function(acc, enhancement) {
195
- return enhancement.call(selfRef.current, acc, WrapperComponent, true);
196
- }, other);
197
- var ctx = contexts.reduce(function(acc, enhancement) {
198
- return enhancement.call(selfRef.current, acc, WrapperComponent, true);
199
- }, {});
200
- var render = renders.reduce(function(acc, enhancement) {
201
- return enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true);
202
- }, /* @__PURE__ */ React.createElement(OriginComponent, asProps));
153
+ const asProps = props.reduce((acc, enhancement) => enhancement.call(selfRef.current, acc, WrapperComponent, true), other);
154
+ const ctx = contexts.reduce((acc, enhancement) => enhancement.call(selfRef.current, acc, WrapperComponent, true), {});
155
+ const render = renders.reduce((acc, enhancement) => enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true), /* @__PURE__ */ React.createElement(OriginComponent, asProps));
203
156
  if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {
204
157
  return /* @__PURE__ */ React.createElement(Context.Provider, {
205
- value: _objectSpread(_objectSpread({}, asProps), ctx)
158
+ value: {
159
+ ...asProps,
160
+ ...ctx
161
+ }
206
162
  }, render);
207
163
  } else {
208
164
  return render;
209
165
  }
210
166
  });
211
167
  Object.assign(Component2, OriginComponent);
212
- var WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, true);
168
+ const WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, true);
213
169
  return WrapperComponent;
214
170
  }
215
171
  function wrapCore(OriginComponent, enhancements, Context) {
216
- var Component2 = function Component3(_ref3) {
217
- var Root = _ref3.Root;
218
- var defaultProps = OriginComponent.defaultProps || {};
172
+ const Component2 = function({
173
+ Root
174
+ }) {
175
+ const defaultProps = OriginComponent.defaultProps || {};
219
176
  return /* @__PURE__ */ React.createElement(Root, _extends({}, defaultProps, {
220
177
  render: OriginComponent
221
178
  }));
@@ -242,15 +199,17 @@ function createComposeComponent(OriginComponent, Context, enhancements) {
242
199
  function assignProps(p1, p2) {
243
200
  return assignProps$1(p2, p1);
244
201
  }
245
- function createComponent(OriginComponent) {
246
- var childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
247
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
248
- var _options$context = options.context, context = _options$context === void 0 ? /* @__PURE__ */ React.createContext({}) : _options$context, _options$parent = options.parent, parent = _options$parent === void 0 ? [] : _options$parent, _options$enhancements = options.enhancements, enhancements = _options$enhancements === void 0 ? [] : _options$enhancements;
249
- var parents = Array.isArray(parent) ? parent : [parent];
202
+ function createComponent(OriginComponent, childComponents = {}, options = {}) {
203
+ const {
204
+ context = /* @__PURE__ */ React.createContext({}),
205
+ parent = [],
206
+ enhancements = []
207
+ } = options;
208
+ let parents = Array.isArray(parent) ? parent : [parent];
250
209
  if (parents.length) {
251
- var wholeFamily = parents.reduce(function(acc, parent2) {
210
+ const wholeFamily = parents.reduce((acc, parent2) => {
252
211
  if (parent2[PARENT_COMPONENTS]) {
253
- acc = [].concat(_toConsumableArray(parent2[PARENT_COMPONENTS]), _toConsumableArray(acc));
212
+ acc = [...parent2[PARENT_COMPONENTS], ...acc];
254
213
  }
255
214
  return acc;
256
215
  }, parents);
@@ -260,61 +219,47 @@ function createComponent(OriginComponent) {
260
219
  if (OriginComponent[CORE_COMPONENT]) {
261
220
  parents.push(OriginComponent);
262
221
  }
263
- var Component2 = createComposeComponent(OriginComponent, context, [].concat(_toConsumableArray(enhancements.map(function(f) {
264
- return f(context, parents, createComponent, childComponents);
265
- })), [
222
+ const Component2 = createComposeComponent(OriginComponent, context, [
223
+ // @ts-ignore
224
+ ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),
266
225
  i18nAppLocaleEnhance(),
267
- Enhancement(),
268
- Enhancement$1(context, parents),
226
+ Enhancement(context, parents),
269
227
  // root must be under the children
228
+ Enhancement$1(),
270
229
  Enhancement$2(),
271
- Enhancement$3(),
272
- Enhancement$4(childComponents, createComponent, {
230
+ Enhancement$3(childComponents, createComponent, {
273
231
  context,
274
232
  parent,
275
233
  enhancements
276
234
  }),
277
235
  // functionDefaultProps must be under the staticChild
278
- Enhancement$5(),
236
+ Enhancement$4(),
279
237
  // inheritedName must be under the staticChild
280
- Enhancement$6(),
238
+ Enhancement$5(),
281
239
  // dataName must be under the staticChild
282
- Enhancement$7(),
240
+ Enhancement$6(),
283
241
  // enhanceEnhancement must be under the functionDefaultPropsEnhancement
284
- Enhancement$8(),
285
- Enhancement$9(childComponents, context),
286
- // must be the last one so any properties can be raised
287
- Enhancement$a(childComponents, context)
288
- ]));
242
+ Enhancement$7(),
243
+ Enhancement$8(childComponents, context)
244
+ ]);
289
245
  Component2[CONTEXT_COMPONENT] = context;
290
246
  Component2._______childrenComponents = childComponents;
291
- Component2[CREATE_COMPONENT] = function() {
292
- var _OriginComponent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : OriginComponent;
293
- var _childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : childComponents;
294
- var _options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : options;
247
+ Component2[CREATE_COMPONENT] = function(_OriginComponent = OriginComponent, _childComponents = childComponents, _options = options) {
295
248
  return createComponent(_OriginComponent, _childComponents, _options);
296
249
  };
297
- Component2.newInstance = function() {
298
- var _OriginComponent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : OriginComponent;
299
- var _childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : childComponents;
300
- var _options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : options;
250
+ Component2.newInstance = function(_OriginComponent = OriginComponent, _childComponents = childComponents, _options = options) {
301
251
  return createComponent(_OriginComponent, _childComponents, _options);
302
252
  };
303
253
  Component2[CORE_COMPONENT] = true;
304
254
  return Component2;
305
255
  }
306
256
  function createBaseComponent(OriginComponent) {
307
- var Component2 = null;
308
- if (!React.PureComponent.isPrototypeOf(OriginComponent) && !React.Component.isPrototypeOf(OriginComponent) && typeof OriginComponent === "function") {
309
- Component2 = /* @__PURE__ */ React.forwardRef(OriginComponent);
310
- Component2.displayName = OriginComponent.displayName;
311
- Component2.defaultProps = _objectSpread({
312
- "data-ui-name": OriginComponent.displayName
313
- }, OriginComponent.defaultProps);
314
- Component2[CORE_COMPONENT] = true;
315
- } else {
316
- throw new Error("createBaseComponent accepts only functional component");
317
- }
257
+ const Component2 = /* @__PURE__ */ React.forwardRef(OriginComponent);
258
+ Component2.displayName = OriginComponent.displayName ?? "";
259
+ Component2.defaultProps = {
260
+ "data-ui-name": OriginComponent.displayName
261
+ };
262
+ Component2[CORE_COMPONENT] = true;
318
263
  return Component2;
319
264
  }
320
265
  export {