@semcore/core 16.0.0-prerelease.4 → 16.0.0-prerelease.7

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 (1114) hide show
  1. package/lib/LastInteractionType.cjs +57 -0
  2. package/lib/LastInteractionType.cjs.map +1 -0
  3. package/lib/LastInteractionType.d.ts +1 -1
  4. package/lib/LastInteractionType.mjs +51 -0
  5. package/lib/core-types/Component.cjs +59 -0
  6. package/lib/core-types/Component.cjs.map +1 -0
  7. package/lib/core-types/Component.mjs +28 -31
  8. package/lib/core-types/UnknownProperties.cjs +2 -0
  9. package/lib/core-types/UnknownProperties.cjs.map +1 -0
  10. package/lib/core-types/reshadow.d.cjs +2 -0
  11. package/lib/core-types/reshadow.d.cjs.map +1 -0
  12. package/lib/core-types/symbols.cjs +25 -0
  13. package/lib/core-types/symbols.cjs.map +1 -0
  14. package/lib/core-types/symbols.mjs +20 -10
  15. package/lib/coreFactory.cjs +352 -0
  16. package/lib/coreFactory.cjs.map +1 -0
  17. package/lib/coreFactory.mjs +324 -0
  18. package/lib/enhancement/Children.cjs +119 -0
  19. package/lib/enhancement/Children.cjs.map +1 -0
  20. package/lib/enhancement/Children.mjs +34 -49
  21. package/lib/enhancement/Root.cjs +78 -0
  22. package/lib/enhancement/Root.cjs.map +1 -0
  23. package/lib/enhancement/Root.mjs +25 -35
  24. package/lib/enhancement/bindHandler.cjs +54 -0
  25. package/lib/enhancement/bindHandler.cjs.map +1 -0
  26. package/lib/enhancement/bindHandler.mjs +10 -9
  27. package/lib/enhancement/dataName.cjs +20 -0
  28. package/lib/enhancement/dataName.cjs.map +1 -0
  29. package/lib/enhancement/dataName.mjs +5 -4
  30. package/lib/enhancement/enhance.cjs +22 -0
  31. package/lib/enhancement/enhance.cjs.map +1 -0
  32. package/lib/enhancement/enhance.mjs +4 -3
  33. package/lib/enhancement/functionDefaultProps.cjs +36 -0
  34. package/lib/enhancement/functionDefaultProps.cjs.map +1 -0
  35. package/lib/enhancement/functionDefaultProps.mjs +5 -5
  36. package/lib/enhancement/hoistProps.cjs +97 -0
  37. package/lib/enhancement/hoistProps.cjs.map +1 -0
  38. package/lib/enhancement/hoistProps.mjs +22 -32
  39. package/lib/enhancement/i18n.cjs +28 -0
  40. package/lib/enhancement/i18n.cjs.map +1 -0
  41. package/lib/enhancement/i18n.mjs +8 -8
  42. package/lib/enhancement/inheritedName.cjs +23 -0
  43. package/lib/enhancement/inheritedName.cjs.map +1 -0
  44. package/lib/enhancement/inheritedName.mjs +5 -4
  45. package/lib/enhancement/staticChildren.cjs +135 -0
  46. package/lib/enhancement/staticChildren.cjs.map +1 -0
  47. package/lib/enhancement/staticChildren.mjs +35 -38
  48. package/lib/enhancement/style.cjs +60 -0
  49. package/lib/enhancement/style.cjs.map +1 -0
  50. package/lib/enhancement/style.mjs +16 -17
  51. package/lib/enhancement/uncontrolledProps.cjs +131 -0
  52. package/lib/enhancement/uncontrolledProps.cjs.map +1 -0
  53. package/lib/enhancement/uncontrolledProps.mjs +28 -44
  54. package/lib/esm/LastInteractionType.mjs +29 -20
  55. package/lib/esm/core-types/Component.mjs +40 -29
  56. package/lib/esm/core-types/symbols.mjs +18 -10
  57. package/lib/esm/coreFactory.mjs +273 -184
  58. package/lib/esm/enhancement/Children.mjs +72 -48
  59. package/lib/esm/enhancement/Root.mjs +49 -32
  60. package/lib/esm/enhancement/bindHandler.mjs +34 -30
  61. package/lib/esm/enhancement/dataName.mjs +7 -7
  62. package/lib/esm/enhancement/enhance.mjs +9 -9
  63. package/lib/esm/enhancement/functionDefaultProps.mjs +19 -9
  64. package/lib/esm/enhancement/hoistProps.mjs +62 -42
  65. package/lib/esm/enhancement/i18n.mjs +13 -11
  66. package/lib/esm/enhancement/inheritedName.mjs +9 -9
  67. package/lib/esm/enhancement/staticChildren.mjs +100 -58
  68. package/lib/esm/enhancement/style.mjs +38 -26
  69. package/lib/esm/enhancement/uncontrolledProps.mjs +81 -62
  70. package/lib/esm/index.mjs +21 -21
  71. package/lib/esm/register.mjs +22 -15
  72. package/lib/esm/styled/reshadow-core.mjs +9 -7
  73. package/lib/esm/styled/sstyled.mjs +98 -55
  74. package/lib/esm/utils/assignProps.mjs +65 -31
  75. package/lib/esm/utils/canUseDOM.mjs +3 -3
  76. package/lib/esm/utils/capitalizeFirstLetter.mjs +3 -3
  77. package/lib/esm/utils/enhances/WithI18n.mjs +44 -38
  78. package/lib/esm/utils/logger.mjs +24 -16
  79. package/lib/esm/utils/pick.mjs +11 -6
  80. package/lib/esm/utils/ref.mjs +33 -24
  81. package/lib/esm/utils/use/useEnhancedEffect.mjs +4 -4
  82. package/lib/index.cjs +103 -0
  83. package/lib/index.cjs.map +1 -0
  84. package/lib/index.mjs +23 -0
  85. package/lib/register.cjs +37 -0
  86. package/lib/register.cjs.map +1 -0
  87. package/lib/register.mjs +13 -11
  88. package/lib/styled/index.cjs +32 -0
  89. package/lib/styled/index.cjs.map +1 -0
  90. package/lib/styled/reshadow-core.cjs +256 -0
  91. package/lib/styled/reshadow-core.cjs.map +1 -0
  92. package/lib/styled/reshadow-core.mjs +8 -233
  93. package/lib/styled/sstyled.cjs +149 -0
  94. package/lib/styled/sstyled.cjs.map +1 -0
  95. package/lib/styled/sstyled.mjs +40 -61
  96. package/lib/theme/processor.cjs +315 -0
  97. package/lib/theme/processor.cjs.map +1 -0
  98. package/lib/theme/themes/dark.cjs +385 -0
  99. package/lib/theme/themes/dark.cjs.map +1 -0
  100. package/lib/theme/themes/default.cjs +394 -0
  101. package/lib/theme/themes/default.cjs.map +1 -0
  102. package/lib/theme/themes/light.cjs +394 -0
  103. package/lib/theme/themes/light.cjs.map +1 -0
  104. package/lib/theme/utils.cjs +297 -0
  105. package/lib/theme/utils.cjs.map +1 -0
  106. package/lib/utils/CSSinJS.cjs +36 -0
  107. package/lib/utils/CSSinJS.cjs.map +1 -0
  108. package/lib/utils/ScreenReaderOnly.cjs +31 -0
  109. package/lib/utils/ScreenReaderOnly.cjs.map +1 -0
  110. package/lib/utils/ThemeProvider.cjs +82 -0
  111. package/lib/utils/ThemeProvider.cjs.map +1 -0
  112. package/lib/utils/addonText.cjs +18 -0
  113. package/lib/utils/addonText.cjs.map +1 -0
  114. package/lib/utils/addonText.d.ts +1 -1
  115. package/lib/utils/addonTextChildren.cjs +45 -0
  116. package/lib/utils/addonTextChildren.cjs.map +1 -0
  117. package/lib/utils/ariaProps.cjs +22 -0
  118. package/lib/utils/ariaProps.cjs.map +1 -0
  119. package/lib/utils/assignProps.cjs +93 -0
  120. package/lib/utils/assignProps.cjs.map +1 -0
  121. package/lib/utils/assignProps.mjs +30 -38
  122. package/lib/utils/canUseDOM.cjs +10 -0
  123. package/lib/utils/canUseDOM.cjs.map +1 -0
  124. package/lib/utils/canUseDOM.mjs +5 -3
  125. package/lib/utils/capitalizeFirstLetter.cjs +10 -0
  126. package/lib/utils/capitalizeFirstLetter.cjs.map +1 -0
  127. package/lib/utils/capitalizeFirstLetter.mjs +4 -2
  128. package/lib/utils/color.cjs +208 -0
  129. package/lib/utils/color.cjs.map +1 -0
  130. package/lib/utils/compose.cjs +21 -0
  131. package/lib/utils/compose.cjs.map +1 -0
  132. package/lib/utils/createHoc.cjs +55 -0
  133. package/lib/utils/createHoc.cjs.map +1 -0
  134. package/lib/utils/createUUID.cjs +15 -0
  135. package/lib/utils/createUUID.cjs.map +1 -0
  136. package/lib/utils/cssToIntDefault.cjs +22 -0
  137. package/lib/utils/cssToIntDefault.cjs.map +1 -0
  138. package/lib/utils/enhances/WithAutoFocus.cjs +75 -0
  139. package/lib/utils/enhances/WithAutoFocus.cjs.map +1 -0
  140. package/lib/utils/enhances/WithCSS.cjs +93 -0
  141. package/lib/utils/enhances/WithCSS.cjs.map +1 -0
  142. package/lib/utils/enhances/WithI18n.cjs +95 -0
  143. package/lib/utils/enhances/WithI18n.cjs.map +1 -0
  144. package/lib/utils/enhances/WithI18n.mjs +28 -57
  145. package/lib/utils/enhances/WithKeyboardFocus.cjs +93 -0
  146. package/lib/utils/enhances/WithKeyboardFocus.cjs.map +1 -0
  147. package/lib/utils/enhances/WithRef.cjs +26 -0
  148. package/lib/utils/enhances/WithRef.cjs.map +1 -0
  149. package/lib/utils/enhances/a11yEnhance.cjs +74 -0
  150. package/lib/utils/enhances/a11yEnhance.cjs.map +1 -0
  151. package/lib/utils/enhances/animatedSizeEnhance.cjs +98 -0
  152. package/lib/utils/enhances/animatedSizeEnhance.cjs.map +1 -0
  153. package/lib/utils/enhances/autoFocusEnhance.cjs +46 -0
  154. package/lib/utils/enhances/autoFocusEnhance.cjs.map +1 -0
  155. package/lib/utils/enhances/contextEnhance.cjs +22 -0
  156. package/lib/utils/enhances/contextEnhance.cjs.map +1 -0
  157. package/lib/utils/enhances/i18nEnhance.cjs +101 -0
  158. package/lib/utils/enhances/i18nEnhance.cjs.map +1 -0
  159. package/lib/utils/enhances/keyboardFocusEnhance.cjs +63 -0
  160. package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +1 -0
  161. package/lib/utils/enhances/resolveColorEnhance.cjs +25 -0
  162. package/lib/utils/enhances/resolveColorEnhance.cjs.map +1 -0
  163. package/lib/utils/eventEmitter.cjs +41 -0
  164. package/lib/utils/eventEmitter.cjs.map +1 -0
  165. package/lib/utils/findComponent.cjs +106 -0
  166. package/lib/utils/findComponent.cjs.map +1 -0
  167. package/lib/utils/fire.cjs +23 -0
  168. package/lib/utils/fire.cjs.map +1 -0
  169. package/lib/utils/focus-lock/focusBorders.cjs +72 -0
  170. package/lib/utils/focus-lock/focusBorders.cjs.map +1 -0
  171. package/lib/utils/focus-lock/getFocusableIn.cjs +26 -0
  172. package/lib/utils/focus-lock/getFocusableIn.cjs.map +1 -0
  173. package/lib/utils/focus-lock/isFocusInside.cjs +16 -0
  174. package/lib/utils/focus-lock/isFocusInside.cjs.map +1 -0
  175. package/lib/utils/focus-lock/isFocusable.cjs +51 -0
  176. package/lib/utils/focus-lock/isFocusable.cjs.map +1 -0
  177. package/lib/utils/focus-lock/setFocus.cjs +63 -0
  178. package/lib/utils/focus-lock/setFocus.cjs.map +1 -0
  179. package/lib/utils/getAccessibleName.cjs +56 -0
  180. package/lib/utils/getAccessibleName.cjs.map +1 -0
  181. package/lib/utils/getDisplayName.cjs +10 -0
  182. package/lib/utils/getDisplayName.cjs.map +1 -0
  183. package/lib/utils/getEventTarget.cjs +53 -0
  184. package/lib/utils/getEventTarget.cjs.map +1 -0
  185. package/lib/utils/getOriginChildren.cjs +18 -0
  186. package/lib/utils/getOriginChildren.cjs.map +1 -0
  187. package/lib/utils/getRandomInt.cjs +11 -0
  188. package/lib/utils/getRandomInt.cjs.map +1 -0
  189. package/lib/utils/getValue.cjs +16 -0
  190. package/lib/utils/getValue.cjs.map +1 -0
  191. package/lib/utils/hasLabels.cjs +47 -0
  192. package/lib/utils/hasLabels.cjs.map +1 -0
  193. package/lib/utils/hasParent.cjs +14 -0
  194. package/lib/utils/hasParent.cjs.map +1 -0
  195. package/lib/utils/if.cjs +16 -0
  196. package/lib/utils/if.cjs.map +1 -0
  197. package/lib/utils/ifChildren.cjs +17 -0
  198. package/lib/utils/ifChildren.cjs.map +1 -0
  199. package/lib/utils/injectStyle.cjs +49 -0
  200. package/lib/utils/injectStyle.cjs.map +1 -0
  201. package/lib/utils/inputProps.cjs +22 -0
  202. package/lib/utils/inputProps.cjs.map +1 -0
  203. package/lib/utils/isNode.cjs +28 -0
  204. package/lib/utils/isNode.cjs.map +1 -0
  205. package/lib/utils/isPromise.cjs +10 -0
  206. package/lib/utils/isPromise.cjs.map +1 -0
  207. package/lib/utils/isRetina.cjs +15 -0
  208. package/lib/utils/isRetina.cjs.map +1 -0
  209. package/lib/utils/logger.cjs +40 -0
  210. package/lib/utils/logger.cjs.map +1 -0
  211. package/lib/utils/logger.mjs +19 -16
  212. package/lib/utils/numericChecker.cjs +33 -0
  213. package/lib/utils/numericChecker.cjs.map +1 -0
  214. package/lib/utils/ownerDocument.cjs +10 -0
  215. package/lib/utils/ownerDocument.cjs.map +1 -0
  216. package/lib/utils/pick.cjs +19 -0
  217. package/lib/utils/pick.cjs.map +1 -0
  218. package/lib/utils/pick.mjs +4 -2
  219. package/lib/utils/propsForElement.cjs +59 -0
  220. package/lib/utils/propsForElement.cjs.map +1 -0
  221. package/lib/utils/rafTrottle.cjs +33 -0
  222. package/lib/utils/rafTrottle.cjs.map +1 -0
  223. package/lib/utils/reactToText.cjs +33 -0
  224. package/lib/utils/reactToText.cjs.map +1 -0
  225. package/lib/utils/ref.cjs +95 -0
  226. package/lib/utils/ref.cjs.map +1 -0
  227. package/lib/utils/ref.mjs +20 -60
  228. package/lib/utils/setRef.cjs +10 -0
  229. package/lib/utils/setRef.cjs.map +1 -0
  230. package/lib/utils/syncScroll.cjs +61 -0
  231. package/lib/utils/syncScroll.cjs.map +1 -0
  232. package/lib/utils/uncontroll.cjs +47 -0
  233. package/lib/utils/uncontroll.cjs.map +1 -0
  234. package/lib/utils/uniqueID.cjs +42 -0
  235. package/lib/utils/uniqueID.cjs.map +1 -0
  236. package/lib/utils/use/useColorResolver.cjs +208 -0
  237. package/lib/utils/use/useColorResolver.cjs.map +1 -0
  238. package/lib/utils/use/useCss.cjs +20 -0
  239. package/lib/utils/use/useCss.cjs.map +1 -0
  240. package/lib/utils/use/useEnhancedEffect.cjs +13 -0
  241. package/lib/utils/use/useEnhancedEffect.cjs.map +1 -0
  242. package/lib/utils/use/useEnhancedEffect.mjs +4 -3
  243. package/lib/utils/use/useEventCallback.cjs +25 -0
  244. package/lib/utils/use/useEventCallback.cjs.map +1 -0
  245. package/lib/utils/use/useEventListener.cjs +33 -0
  246. package/lib/utils/use/useEventListener.cjs.map +1 -0
  247. package/lib/utils/use/useFocusLock.cjs +289 -0
  248. package/lib/utils/use/useFocusLock.cjs.map +1 -0
  249. package/lib/utils/use/usePreventScroll.cjs +78 -0
  250. package/lib/utils/use/usePreventScroll.cjs.map +1 -0
  251. package/lib/utils/useCssVariable.cjs +55 -0
  252. package/lib/utils/useCssVariable.cjs.map +1 -0
  253. package/lib/utils/zIndexStacking.cjs +48 -0
  254. package/lib/utils/zIndexStacking.cjs.map +1 -0
  255. package/package.json +7 -7
  256. package/vite.config.ts +8 -0
  257. package/lib/cjs/LastInteractionType.js +0 -57
  258. package/lib/cjs/LastInteractionType.js.map +0 -1
  259. package/lib/cjs/core-types/Component.js +0 -59
  260. package/lib/cjs/core-types/Component.js.map +0 -1
  261. package/lib/cjs/core-types/UnknownProperties.js +0 -2
  262. package/lib/cjs/core-types/UnknownProperties.js.map +0 -1
  263. package/lib/cjs/core-types/reshadow.d.js +0 -2
  264. package/lib/cjs/core-types/reshadow.d.js.map +0 -1
  265. package/lib/cjs/core-types/symbols.js +0 -25
  266. package/lib/cjs/core-types/symbols.js.map +0 -1
  267. package/lib/cjs/coreFactory.js +0 -352
  268. package/lib/cjs/coreFactory.js.map +0 -1
  269. package/lib/cjs/enhancement/Children.js +0 -119
  270. package/lib/cjs/enhancement/Children.js.map +0 -1
  271. package/lib/cjs/enhancement/Root.js +0 -78
  272. package/lib/cjs/enhancement/Root.js.map +0 -1
  273. package/lib/cjs/enhancement/bindHandler.js +0 -54
  274. package/lib/cjs/enhancement/bindHandler.js.map +0 -1
  275. package/lib/cjs/enhancement/dataName.js +0 -20
  276. package/lib/cjs/enhancement/dataName.js.map +0 -1
  277. package/lib/cjs/enhancement/enhance.js +0 -22
  278. package/lib/cjs/enhancement/enhance.js.map +0 -1
  279. package/lib/cjs/enhancement/functionDefaultProps.js +0 -36
  280. package/lib/cjs/enhancement/functionDefaultProps.js.map +0 -1
  281. package/lib/cjs/enhancement/hoistProps.js +0 -97
  282. package/lib/cjs/enhancement/hoistProps.js.map +0 -1
  283. package/lib/cjs/enhancement/i18n.js +0 -28
  284. package/lib/cjs/enhancement/i18n.js.map +0 -1
  285. package/lib/cjs/enhancement/inheritedName.js +0 -23
  286. package/lib/cjs/enhancement/inheritedName.js.map +0 -1
  287. package/lib/cjs/enhancement/staticChildren.js +0 -135
  288. package/lib/cjs/enhancement/staticChildren.js.map +0 -1
  289. package/lib/cjs/enhancement/style.js +0 -60
  290. package/lib/cjs/enhancement/style.js.map +0 -1
  291. package/lib/cjs/enhancement/uncontrolledProps.js +0 -131
  292. package/lib/cjs/enhancement/uncontrolledProps.js.map +0 -1
  293. package/lib/cjs/index.js +0 -103
  294. package/lib/cjs/index.js.map +0 -1
  295. package/lib/cjs/register.js +0 -37
  296. package/lib/cjs/register.js.map +0 -1
  297. package/lib/cjs/styled/index.js +0 -32
  298. package/lib/cjs/styled/index.js.map +0 -1
  299. package/lib/cjs/styled/reshadow-core.js +0 -256
  300. package/lib/cjs/styled/reshadow-core.js.map +0 -1
  301. package/lib/cjs/styled/sstyled.js +0 -149
  302. package/lib/cjs/styled/sstyled.js.map +0 -1
  303. package/lib/cjs/theme/dark.json +0 -2506
  304. package/lib/cjs/theme/exclude-tokens.json +0 -10
  305. package/lib/cjs/theme/light.json +0 -2584
  306. package/lib/cjs/theme/processor.js +0 -315
  307. package/lib/cjs/theme/processor.js.map +0 -1
  308. package/lib/cjs/theme/themes/auto.css +0 -1465
  309. package/lib/cjs/theme/themes/dark.css +0 -723
  310. package/lib/cjs/theme/themes/dark.js +0 -385
  311. package/lib/cjs/theme/themes/dark.js.map +0 -1
  312. package/lib/cjs/theme/themes/default.css +0 -742
  313. package/lib/cjs/theme/themes/default.js +0 -394
  314. package/lib/cjs/theme/themes/default.js.map +0 -1
  315. package/lib/cjs/theme/themes/light.css +0 -742
  316. package/lib/cjs/theme/themes/light.js +0 -394
  317. package/lib/cjs/theme/themes/light.js.map +0 -1
  318. package/lib/cjs/theme/utils.js +0 -297
  319. package/lib/cjs/theme/utils.js.map +0 -1
  320. package/lib/cjs/utils/CSSinJS.js +0 -36
  321. package/lib/cjs/utils/CSSinJS.js.map +0 -1
  322. package/lib/cjs/utils/ScreenReaderOnly.js +0 -31
  323. package/lib/cjs/utils/ScreenReaderOnly.js.map +0 -1
  324. package/lib/cjs/utils/ThemeProvider.js +0 -82
  325. package/lib/cjs/utils/ThemeProvider.js.map +0 -1
  326. package/lib/cjs/utils/addonText.js +0 -18
  327. package/lib/cjs/utils/addonText.js.map +0 -1
  328. package/lib/cjs/utils/addonTextChildren.js +0 -45
  329. package/lib/cjs/utils/addonTextChildren.js.map +0 -1
  330. package/lib/cjs/utils/ariaProps.js +0 -22
  331. package/lib/cjs/utils/ariaProps.js.map +0 -1
  332. package/lib/cjs/utils/assignProps.js +0 -93
  333. package/lib/cjs/utils/assignProps.js.map +0 -1
  334. package/lib/cjs/utils/canUseDOM.js +0 -10
  335. package/lib/cjs/utils/canUseDOM.js.map +0 -1
  336. package/lib/cjs/utils/capitalizeFirstLetter.js +0 -10
  337. package/lib/cjs/utils/capitalizeFirstLetter.js.map +0 -1
  338. package/lib/cjs/utils/color.js +0 -208
  339. package/lib/cjs/utils/color.js.map +0 -1
  340. package/lib/cjs/utils/compose.js +0 -21
  341. package/lib/cjs/utils/compose.js.map +0 -1
  342. package/lib/cjs/utils/createHoc.js +0 -55
  343. package/lib/cjs/utils/createHoc.js.map +0 -1
  344. package/lib/cjs/utils/createUUID.js +0 -15
  345. package/lib/cjs/utils/createUUID.js.map +0 -1
  346. package/lib/cjs/utils/cssToIntDefault.js +0 -22
  347. package/lib/cjs/utils/cssToIntDefault.js.map +0 -1
  348. package/lib/cjs/utils/enhances/WithAutoFocus.js +0 -75
  349. package/lib/cjs/utils/enhances/WithAutoFocus.js.map +0 -1
  350. package/lib/cjs/utils/enhances/WithCSS.js +0 -93
  351. package/lib/cjs/utils/enhances/WithCSS.js.map +0 -1
  352. package/lib/cjs/utils/enhances/WithI18n.js +0 -95
  353. package/lib/cjs/utils/enhances/WithI18n.js.map +0 -1
  354. package/lib/cjs/utils/enhances/WithKeyboardFocus.js +0 -93
  355. package/lib/cjs/utils/enhances/WithKeyboardFocus.js.map +0 -1
  356. package/lib/cjs/utils/enhances/WithRef.js +0 -26
  357. package/lib/cjs/utils/enhances/WithRef.js.map +0 -1
  358. package/lib/cjs/utils/enhances/a11yEnhance.js +0 -74
  359. package/lib/cjs/utils/enhances/a11yEnhance.js.map +0 -1
  360. package/lib/cjs/utils/enhances/animatedSizeEnhance.js +0 -98
  361. package/lib/cjs/utils/enhances/animatedSizeEnhance.js.map +0 -1
  362. package/lib/cjs/utils/enhances/autoFocusEnhance.js +0 -46
  363. package/lib/cjs/utils/enhances/autoFocusEnhance.js.map +0 -1
  364. package/lib/cjs/utils/enhances/contextEnhance.js +0 -22
  365. package/lib/cjs/utils/enhances/contextEnhance.js.map +0 -1
  366. package/lib/cjs/utils/enhances/i18nEnhance.js +0 -101
  367. package/lib/cjs/utils/enhances/i18nEnhance.js.map +0 -1
  368. package/lib/cjs/utils/enhances/keyboardFocusEnhance.js +0 -63
  369. package/lib/cjs/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  370. package/lib/cjs/utils/enhances/resolveColorEnhance.js +0 -25
  371. package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +0 -1
  372. package/lib/cjs/utils/eventEmitter.js +0 -41
  373. package/lib/cjs/utils/eventEmitter.js.map +0 -1
  374. package/lib/cjs/utils/findComponent.js +0 -106
  375. package/lib/cjs/utils/findComponent.js.map +0 -1
  376. package/lib/cjs/utils/fire.js +0 -23
  377. package/lib/cjs/utils/fire.js.map +0 -1
  378. package/lib/cjs/utils/focus-lock/focusBorders.js +0 -72
  379. package/lib/cjs/utils/focus-lock/focusBorders.js.map +0 -1
  380. package/lib/cjs/utils/focus-lock/getFocusableIn.js +0 -26
  381. package/lib/cjs/utils/focus-lock/getFocusableIn.js.map +0 -1
  382. package/lib/cjs/utils/focus-lock/isFocusInside.js +0 -16
  383. package/lib/cjs/utils/focus-lock/isFocusInside.js.map +0 -1
  384. package/lib/cjs/utils/focus-lock/isFocusable.js +0 -51
  385. package/lib/cjs/utils/focus-lock/isFocusable.js.map +0 -1
  386. package/lib/cjs/utils/focus-lock/setFocus.js +0 -63
  387. package/lib/cjs/utils/focus-lock/setFocus.js.map +0 -1
  388. package/lib/cjs/utils/getAccessibleName.js +0 -56
  389. package/lib/cjs/utils/getAccessibleName.js.map +0 -1
  390. package/lib/cjs/utils/getDisplayName.js +0 -10
  391. package/lib/cjs/utils/getDisplayName.js.map +0 -1
  392. package/lib/cjs/utils/getEventTarget.js +0 -53
  393. package/lib/cjs/utils/getEventTarget.js.map +0 -1
  394. package/lib/cjs/utils/getOriginChildren.js +0 -18
  395. package/lib/cjs/utils/getOriginChildren.js.map +0 -1
  396. package/lib/cjs/utils/getRandomInt.js +0 -11
  397. package/lib/cjs/utils/getRandomInt.js.map +0 -1
  398. package/lib/cjs/utils/getValue.js +0 -16
  399. package/lib/cjs/utils/getValue.js.map +0 -1
  400. package/lib/cjs/utils/hasLabels.js +0 -47
  401. package/lib/cjs/utils/hasLabels.js.map +0 -1
  402. package/lib/cjs/utils/hasParent.js +0 -14
  403. package/lib/cjs/utils/hasParent.js.map +0 -1
  404. package/lib/cjs/utils/if.js +0 -16
  405. package/lib/cjs/utils/if.js.map +0 -1
  406. package/lib/cjs/utils/ifChildren.js +0 -17
  407. package/lib/cjs/utils/ifChildren.js.map +0 -1
  408. package/lib/cjs/utils/injectStyle.js +0 -49
  409. package/lib/cjs/utils/injectStyle.js.map +0 -1
  410. package/lib/cjs/utils/inputProps.js +0 -22
  411. package/lib/cjs/utils/inputProps.js.map +0 -1
  412. package/lib/cjs/utils/isNode.js +0 -28
  413. package/lib/cjs/utils/isNode.js.map +0 -1
  414. package/lib/cjs/utils/isPromise.js +0 -10
  415. package/lib/cjs/utils/isPromise.js.map +0 -1
  416. package/lib/cjs/utils/isRetina.js +0 -15
  417. package/lib/cjs/utils/isRetina.js.map +0 -1
  418. package/lib/cjs/utils/logger.js +0 -40
  419. package/lib/cjs/utils/logger.js.map +0 -1
  420. package/lib/cjs/utils/numericChecker.js +0 -33
  421. package/lib/cjs/utils/numericChecker.js.map +0 -1
  422. package/lib/cjs/utils/ownerDocument.js +0 -10
  423. package/lib/cjs/utils/ownerDocument.js.map +0 -1
  424. package/lib/cjs/utils/pick.js +0 -19
  425. package/lib/cjs/utils/pick.js.map +0 -1
  426. package/lib/cjs/utils/propsForElement.js +0 -59
  427. package/lib/cjs/utils/propsForElement.js.map +0 -1
  428. package/lib/cjs/utils/rafTrottle.js +0 -33
  429. package/lib/cjs/utils/rafTrottle.js.map +0 -1
  430. package/lib/cjs/utils/reactToText.js +0 -33
  431. package/lib/cjs/utils/reactToText.js.map +0 -1
  432. package/lib/cjs/utils/ref.js +0 -95
  433. package/lib/cjs/utils/ref.js.map +0 -1
  434. package/lib/cjs/utils/setRef.js +0 -10
  435. package/lib/cjs/utils/setRef.js.map +0 -1
  436. package/lib/cjs/utils/syncScroll.js +0 -61
  437. package/lib/cjs/utils/syncScroll.js.map +0 -1
  438. package/lib/cjs/utils/uncontroll.js +0 -47
  439. package/lib/cjs/utils/uncontroll.js.map +0 -1
  440. package/lib/cjs/utils/uniqueID.js +0 -42
  441. package/lib/cjs/utils/uniqueID.js.map +0 -1
  442. package/lib/cjs/utils/use/useColorResolver.js +0 -208
  443. package/lib/cjs/utils/use/useColorResolver.js.map +0 -1
  444. package/lib/cjs/utils/use/useCss.js +0 -20
  445. package/lib/cjs/utils/use/useCss.js.map +0 -1
  446. package/lib/cjs/utils/use/useEnhancedEffect.js +0 -13
  447. package/lib/cjs/utils/use/useEnhancedEffect.js.map +0 -1
  448. package/lib/cjs/utils/use/useEventCallback.js +0 -25
  449. package/lib/cjs/utils/use/useEventCallback.js.map +0 -1
  450. package/lib/cjs/utils/use/useEventListener.js +0 -33
  451. package/lib/cjs/utils/use/useEventListener.js.map +0 -1
  452. package/lib/cjs/utils/use/useFocusLock.js +0 -289
  453. package/lib/cjs/utils/use/useFocusLock.js.map +0 -1
  454. package/lib/cjs/utils/use/usePreventScroll.js +0 -78
  455. package/lib/cjs/utils/use/usePreventScroll.js.map +0 -1
  456. package/lib/cjs/utils/useCssVariable.js +0 -55
  457. package/lib/cjs/utils/useCssVariable.js.map +0 -1
  458. package/lib/cjs/utils/zIndexStacking.js +0 -48
  459. package/lib/cjs/utils/zIndexStacking.js.map +0 -1
  460. package/lib/core-types/Component.js +0 -59
  461. package/lib/core-types/Component.js.map +0 -1
  462. package/lib/core-types/Component.mjs.map +0 -1
  463. package/lib/core-types/UnknownProperties.js +0 -2
  464. package/lib/core-types/UnknownProperties.js.map +0 -1
  465. package/lib/core-types/UnknownProperties.mjs +0 -3
  466. package/lib/core-types/UnknownProperties.mjs.map +0 -1
  467. package/lib/core-types/reshadow.d.js +0 -2
  468. package/lib/core-types/reshadow.d.js.map +0 -1
  469. package/lib/core-types/reshadow.d.mjs +0 -2
  470. package/lib/core-types/reshadow.d.mjs.map +0 -1
  471. package/lib/core-types/symbols.js +0 -25
  472. package/lib/core-types/symbols.js.map +0 -1
  473. package/lib/core-types/symbols.mjs.map +0 -1
  474. package/lib/enhancement/Children.js +0 -119
  475. package/lib/enhancement/Children.js.map +0 -1
  476. package/lib/enhancement/Children.mjs.map +0 -1
  477. package/lib/enhancement/Root.js +0 -78
  478. package/lib/enhancement/Root.js.map +0 -1
  479. package/lib/enhancement/Root.mjs.map +0 -1
  480. package/lib/enhancement/bindHandler.js +0 -54
  481. package/lib/enhancement/bindHandler.js.map +0 -1
  482. package/lib/enhancement/bindHandler.mjs.map +0 -1
  483. package/lib/enhancement/dataName.js +0 -20
  484. package/lib/enhancement/dataName.js.map +0 -1
  485. package/lib/enhancement/dataName.mjs.map +0 -1
  486. package/lib/enhancement/enhance.js +0 -22
  487. package/lib/enhancement/enhance.js.map +0 -1
  488. package/lib/enhancement/enhance.mjs.map +0 -1
  489. package/lib/enhancement/functionDefaultProps.js +0 -36
  490. package/lib/enhancement/functionDefaultProps.js.map +0 -1
  491. package/lib/enhancement/functionDefaultProps.mjs.map +0 -1
  492. package/lib/enhancement/hoistProps.js +0 -97
  493. package/lib/enhancement/hoistProps.js.map +0 -1
  494. package/lib/enhancement/hoistProps.mjs.map +0 -1
  495. package/lib/enhancement/i18n.js +0 -28
  496. package/lib/enhancement/i18n.js.map +0 -1
  497. package/lib/enhancement/i18n.mjs.map +0 -1
  498. package/lib/enhancement/inheritedName.js +0 -23
  499. package/lib/enhancement/inheritedName.js.map +0 -1
  500. package/lib/enhancement/inheritedName.mjs.map +0 -1
  501. package/lib/enhancement/staticChildren.js +0 -135
  502. package/lib/enhancement/staticChildren.js.map +0 -1
  503. package/lib/enhancement/staticChildren.mjs.map +0 -1
  504. package/lib/enhancement/style.js +0 -60
  505. package/lib/enhancement/style.js.map +0 -1
  506. package/lib/enhancement/style.mjs.map +0 -1
  507. package/lib/enhancement/uncontrolledProps.js +0 -131
  508. package/lib/enhancement/uncontrolledProps.js.map +0 -1
  509. package/lib/enhancement/uncontrolledProps.mjs.map +0 -1
  510. package/lib/es6/LastInteractionType.js +0 -49
  511. package/lib/es6/LastInteractionType.js.map +0 -1
  512. package/lib/es6/core-types/Component.js +0 -54
  513. package/lib/es6/core-types/Component.js.map +0 -1
  514. package/lib/es6/core-types/UnknownProperties.js +0 -2
  515. package/lib/es6/core-types/UnknownProperties.js.map +0 -1
  516. package/lib/es6/core-types/reshadow.d.js +0 -2
  517. package/lib/es6/core-types/reshadow.d.js.map +0 -1
  518. package/lib/es6/core-types/symbols.js +0 -10
  519. package/lib/es6/core-types/symbols.js.map +0 -1
  520. package/lib/es6/coreFactory.js +0 -343
  521. package/lib/es6/coreFactory.js.map +0 -1
  522. package/lib/es6/enhancement/Children.js +0 -111
  523. package/lib/es6/enhancement/Children.js.map +0 -1
  524. package/lib/es6/enhancement/Root.js +0 -70
  525. package/lib/es6/enhancement/Root.js.map +0 -1
  526. package/lib/es6/enhancement/bindHandler.js +0 -47
  527. package/lib/es6/enhancement/bindHandler.js.map +0 -1
  528. package/lib/es6/enhancement/dataName.js +0 -12
  529. package/lib/es6/enhancement/dataName.js.map +0 -1
  530. package/lib/es6/enhancement/enhance.js +0 -15
  531. package/lib/es6/enhancement/enhance.js.map +0 -1
  532. package/lib/es6/enhancement/functionDefaultProps.js +0 -29
  533. package/lib/es6/enhancement/functionDefaultProps.js.map +0 -1
  534. package/lib/es6/enhancement/hoistProps.js +0 -88
  535. package/lib/es6/enhancement/hoistProps.js.map +0 -1
  536. package/lib/es6/enhancement/i18n.js +0 -20
  537. package/lib/es6/enhancement/i18n.js.map +0 -1
  538. package/lib/es6/enhancement/inheritedName.js +0 -15
  539. package/lib/es6/enhancement/inheritedName.js.map +0 -1
  540. package/lib/es6/enhancement/staticChildren.js +0 -123
  541. package/lib/es6/enhancement/staticChildren.js.map +0 -1
  542. package/lib/es6/enhancement/style.js +0 -51
  543. package/lib/es6/enhancement/style.js.map +0 -1
  544. package/lib/es6/enhancement/uncontrolledProps.js +0 -123
  545. package/lib/es6/enhancement/uncontrolledProps.js.map +0 -1
  546. package/lib/es6/index.js +0 -9
  547. package/lib/es6/index.js.map +0 -1
  548. package/lib/es6/register.js +0 -29
  549. package/lib/es6/register.js.map +0 -1
  550. package/lib/es6/styled/index.js +0 -6
  551. package/lib/es6/styled/index.js.map +0 -1
  552. package/lib/es6/styled/reshadow-core.js +0 -243
  553. package/lib/es6/styled/reshadow-core.js.map +0 -1
  554. package/lib/es6/styled/sstyled.js +0 -142
  555. package/lib/es6/styled/sstyled.js.map +0 -1
  556. package/lib/es6/theme/dark.json +0 -2506
  557. package/lib/es6/theme/exclude-tokens.json +0 -10
  558. package/lib/es6/theme/light.json +0 -2584
  559. package/lib/es6/theme/processor.js +0 -307
  560. package/lib/es6/theme/processor.js.map +0 -1
  561. package/lib/es6/theme/themes/auto.css +0 -1465
  562. package/lib/es6/theme/themes/dark.css +0 -723
  563. package/lib/es6/theme/themes/dark.js +0 -378
  564. package/lib/es6/theme/themes/dark.js.map +0 -1
  565. package/lib/es6/theme/themes/default.css +0 -742
  566. package/lib/es6/theme/themes/default.js +0 -387
  567. package/lib/es6/theme/themes/default.js.map +0 -1
  568. package/lib/es6/theme/themes/light.css +0 -742
  569. package/lib/es6/theme/themes/light.js +0 -387
  570. package/lib/es6/theme/themes/light.js.map +0 -1
  571. package/lib/es6/theme/utils.js +0 -286
  572. package/lib/es6/theme/utils.js.map +0 -1
  573. package/lib/es6/utils/CSSinJS.js +0 -28
  574. package/lib/es6/utils/CSSinJS.js.map +0 -1
  575. package/lib/es6/utils/ScreenReaderOnly.js +0 -24
  576. package/lib/es6/utils/ScreenReaderOnly.js.map +0 -1
  577. package/lib/es6/utils/ThemeProvider.js +0 -71
  578. package/lib/es6/utils/ThemeProvider.js.map +0 -1
  579. package/lib/es6/utils/addonText.js +0 -11
  580. package/lib/es6/utils/addonText.js.map +0 -1
  581. package/lib/es6/utils/addonTextChildren.js +0 -37
  582. package/lib/es6/utils/addonTextChildren.js.map +0 -1
  583. package/lib/es6/utils/ariaProps.js +0 -16
  584. package/lib/es6/utils/ariaProps.js.map +0 -1
  585. package/lib/es6/utils/assignProps.js +0 -84
  586. package/lib/es6/utils/assignProps.js.map +0 -1
  587. package/lib/es6/utils/canUseDOM.js +0 -4
  588. package/lib/es6/utils/canUseDOM.js.map +0 -1
  589. package/lib/es6/utils/capitalizeFirstLetter.js +0 -4
  590. package/lib/es6/utils/capitalizeFirstLetter.js.map +0 -1
  591. package/lib/es6/utils/color.js +0 -196
  592. package/lib/es6/utils/color.js.map +0 -1
  593. package/lib/es6/utils/compose.js +0 -15
  594. package/lib/es6/utils/compose.js.map +0 -1
  595. package/lib/es6/utils/createHoc.js +0 -46
  596. package/lib/es6/utils/createHoc.js.map +0 -1
  597. package/lib/es6/utils/createUUID.js +0 -9
  598. package/lib/es6/utils/createUUID.js.map +0 -1
  599. package/lib/es6/utils/cssToIntDefault.js +0 -16
  600. package/lib/es6/utils/cssToIntDefault.js.map +0 -1
  601. package/lib/es6/utils/enhances/WithAutoFocus.js +0 -67
  602. package/lib/es6/utils/enhances/WithAutoFocus.js.map +0 -1
  603. package/lib/es6/utils/enhances/WithCSS.js +0 -79
  604. package/lib/es6/utils/enhances/WithCSS.js.map +0 -1
  605. package/lib/es6/utils/enhances/WithI18n.js +0 -83
  606. package/lib/es6/utils/enhances/WithI18n.js.map +0 -1
  607. package/lib/es6/utils/enhances/WithKeyboardFocus.js +0 -84
  608. package/lib/es6/utils/enhances/WithKeyboardFocus.js.map +0 -1
  609. package/lib/es6/utils/enhances/WithRef.js +0 -18
  610. package/lib/es6/utils/enhances/WithRef.js.map +0 -1
  611. package/lib/es6/utils/enhances/a11yEnhance.js +0 -66
  612. package/lib/es6/utils/enhances/a11yEnhance.js.map +0 -1
  613. package/lib/es6/utils/enhances/animatedSizeEnhance.js +0 -90
  614. package/lib/es6/utils/enhances/animatedSizeEnhance.js.map +0 -1
  615. package/lib/es6/utils/enhances/autoFocusEnhance.js +0 -38
  616. package/lib/es6/utils/enhances/autoFocusEnhance.js.map +0 -1
  617. package/lib/es6/utils/enhances/contextEnhance.js +0 -14
  618. package/lib/es6/utils/enhances/contextEnhance.js.map +0 -1
  619. package/lib/es6/utils/enhances/i18nEnhance.js +0 -92
  620. package/lib/es6/utils/enhances/i18nEnhance.js.map +0 -1
  621. package/lib/es6/utils/enhances/keyboardFocusEnhance.js +0 -57
  622. package/lib/es6/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  623. package/lib/es6/utils/enhances/resolveColorEnhance.js +0 -17
  624. package/lib/es6/utils/enhances/resolveColorEnhance.js.map +0 -1
  625. package/lib/es6/utils/eventEmitter.js +0 -34
  626. package/lib/es6/utils/eventEmitter.js.map +0 -1
  627. package/lib/es6/utils/findComponent.js +0 -95
  628. package/lib/es6/utils/findComponent.js.map +0 -1
  629. package/lib/es6/utils/fire.js +0 -15
  630. package/lib/es6/utils/fire.js.map +0 -1
  631. package/lib/es6/utils/focus-lock/focusBorders.js +0 -62
  632. package/lib/es6/utils/focus-lock/focusBorders.js.map +0 -1
  633. package/lib/es6/utils/focus-lock/getFocusableIn.js +0 -19
  634. package/lib/es6/utils/focus-lock/getFocusableIn.js.map +0 -1
  635. package/lib/es6/utils/focus-lock/isFocusInside.js +0 -9
  636. package/lib/es6/utils/focus-lock/isFocusInside.js.map +0 -1
  637. package/lib/es6/utils/focus-lock/isFocusable.js +0 -43
  638. package/lib/es6/utils/focus-lock/isFocusable.js.map +0 -1
  639. package/lib/es6/utils/focus-lock/setFocus.js +0 -55
  640. package/lib/es6/utils/focus-lock/setFocus.js.map +0 -1
  641. package/lib/es6/utils/getAccessibleName.js +0 -49
  642. package/lib/es6/utils/getAccessibleName.js.map +0 -1
  643. package/lib/es6/utils/getDisplayName.js +0 -4
  644. package/lib/es6/utils/getDisplayName.js.map +0 -1
  645. package/lib/es6/utils/getEventTarget.js +0 -45
  646. package/lib/es6/utils/getEventTarget.js.map +0 -1
  647. package/lib/es6/utils/getOriginChildren.js +0 -10
  648. package/lib/es6/utils/getOriginChildren.js.map +0 -1
  649. package/lib/es6/utils/getRandomInt.js +0 -5
  650. package/lib/es6/utils/getRandomInt.js.map +0 -1
  651. package/lib/es6/utils/getValue.js +0 -10
  652. package/lib/es6/utils/getValue.js.map +0 -1
  653. package/lib/es6/utils/hasLabels.js +0 -39
  654. package/lib/es6/utils/hasLabels.js.map +0 -1
  655. package/lib/es6/utils/hasParent.js +0 -7
  656. package/lib/es6/utils/hasParent.js.map +0 -1
  657. package/lib/es6/utils/if.js +0 -9
  658. package/lib/es6/utils/if.js.map +0 -1
  659. package/lib/es6/utils/ifChildren.js +0 -10
  660. package/lib/es6/utils/ifChildren.js.map +0 -1
  661. package/lib/es6/utils/injectStyle.js +0 -41
  662. package/lib/es6/utils/injectStyle.js.map +0 -1
  663. package/lib/es6/utils/inputProps.js +0 -14
  664. package/lib/es6/utils/inputProps.js.map +0 -1
  665. package/lib/es6/utils/isNode.js +0 -21
  666. package/lib/es6/utils/isNode.js.map +0 -1
  667. package/lib/es6/utils/isPromise.js +0 -4
  668. package/lib/es6/utils/isPromise.js.map +0 -1
  669. package/lib/es6/utils/isRetina.js +0 -9
  670. package/lib/es6/utils/isRetina.js.map +0 -1
  671. package/lib/es6/utils/logger.js +0 -32
  672. package/lib/es6/utils/logger.js.map +0 -1
  673. package/lib/es6/utils/numericChecker.js +0 -27
  674. package/lib/es6/utils/numericChecker.js.map +0 -1
  675. package/lib/es6/utils/ownerDocument.js +0 -4
  676. package/lib/es6/utils/ownerDocument.js.map +0 -1
  677. package/lib/es6/utils/pick.js +0 -13
  678. package/lib/es6/utils/pick.js.map +0 -1
  679. package/lib/es6/utils/propsForElement.js +0 -50
  680. package/lib/es6/utils/propsForElement.js.map +0 -1
  681. package/lib/es6/utils/rafTrottle.js +0 -26
  682. package/lib/es6/utils/rafTrottle.js.map +0 -1
  683. package/lib/es6/utils/reactToText.js +0 -26
  684. package/lib/es6/utils/reactToText.js.map +0 -1
  685. package/lib/es6/utils/ref.js +0 -83
  686. package/lib/es6/utils/ref.js.map +0 -1
  687. package/lib/es6/utils/setRef.js +0 -3
  688. package/lib/es6/utils/setRef.js.map +0 -1
  689. package/lib/es6/utils/syncScroll.js +0 -54
  690. package/lib/es6/utils/syncScroll.js.map +0 -1
  691. package/lib/es6/utils/uncontroll.js +0 -38
  692. package/lib/es6/utils/uncontroll.js.map +0 -1
  693. package/lib/es6/utils/uniqueID.js +0 -33
  694. package/lib/es6/utils/uniqueID.js.map +0 -1
  695. package/lib/es6/utils/use/useColorResolver.js +0 -200
  696. package/lib/es6/utils/use/useColorResolver.js.map +0 -1
  697. package/lib/es6/utils/use/useCss.js +0 -12
  698. package/lib/es6/utils/use/useCss.js.map +0 -1
  699. package/lib/es6/utils/use/useEnhancedEffect.js +0 -5
  700. package/lib/es6/utils/use/useEnhancedEffect.js.map +0 -1
  701. package/lib/es6/utils/use/useEventCallback.js +0 -19
  702. package/lib/es6/utils/use/useEventCallback.js.map +0 -1
  703. package/lib/es6/utils/use/useEventListener.js +0 -25
  704. package/lib/es6/utils/use/useEventListener.js.map +0 -1
  705. package/lib/es6/utils/use/useFocusLock.js +0 -266
  706. package/lib/es6/utils/use/useFocusLock.js.map +0 -1
  707. package/lib/es6/utils/use/usePreventScroll.js +0 -70
  708. package/lib/es6/utils/use/usePreventScroll.js.map +0 -1
  709. package/lib/es6/utils/useCssVariable.js +0 -46
  710. package/lib/es6/utils/useCssVariable.js.map +0 -1
  711. package/lib/es6/utils/zIndexStacking.js +0 -38
  712. package/lib/es6/utils/zIndexStacking.js.map +0 -1
  713. package/lib/register.js +0 -37
  714. package/lib/register.js.map +0 -1
  715. package/lib/register.mjs.map +0 -1
  716. package/lib/styled/index.js +0 -32
  717. package/lib/styled/index.js.map +0 -1
  718. package/lib/styled/index.mjs +0 -6
  719. package/lib/styled/index.mjs.map +0 -1
  720. package/lib/styled/reshadow-core.js +0 -256
  721. package/lib/styled/reshadow-core.js.map +0 -1
  722. package/lib/styled/reshadow-core.mjs.map +0 -1
  723. package/lib/styled/sstyled.js +0 -149
  724. package/lib/styled/sstyled.js.map +0 -1
  725. package/lib/styled/sstyled.mjs.map +0 -1
  726. package/lib/theme/processor.js +0 -315
  727. package/lib/theme/processor.js.map +0 -1
  728. package/lib/theme/processor.mjs +0 -307
  729. package/lib/theme/processor.mjs.map +0 -1
  730. package/lib/theme/themes/dark.js +0 -385
  731. package/lib/theme/themes/dark.js.map +0 -1
  732. package/lib/theme/themes/dark.mjs +0 -378
  733. package/lib/theme/themes/dark.mjs.map +0 -1
  734. package/lib/theme/themes/default.js +0 -394
  735. package/lib/theme/themes/default.js.map +0 -1
  736. package/lib/theme/themes/default.mjs +0 -387
  737. package/lib/theme/themes/default.mjs.map +0 -1
  738. package/lib/theme/themes/light.js +0 -394
  739. package/lib/theme/themes/light.js.map +0 -1
  740. package/lib/theme/themes/light.mjs +0 -387
  741. package/lib/theme/themes/light.mjs.map +0 -1
  742. package/lib/theme/utils.js +0 -297
  743. package/lib/theme/utils.js.map +0 -1
  744. package/lib/theme/utils.mjs +0 -286
  745. package/lib/theme/utils.mjs.map +0 -1
  746. package/lib/types/LastInteractionType.d.ts +0 -11
  747. package/lib/types/core-types/UnknownProperties.d.ts +0 -3
  748. package/lib/types/core-types/symbols.d.ts +0 -9
  749. package/lib/types/register.d.ts +0 -8
  750. package/lib/types/styled/index.d.ts +0 -11
  751. package/lib/types/styled/reshadow-core.d.ts +0 -37
  752. package/lib/types/styled/sstyled.d.ts +0 -17
  753. package/lib/types/theme/themes/default.d.ts +0 -387
  754. package/lib/types/utils/CSSinJS.d.ts +0 -5
  755. package/lib/types/utils/ScreenReaderOnly.d.ts +0 -8
  756. package/lib/types/utils/ThemeProvider.d.ts +0 -15
  757. package/lib/types/utils/addonText.d.ts +0 -2
  758. package/lib/types/utils/addonTextChildren.d.ts +0 -3
  759. package/lib/types/utils/ariaProps.d.ts +0 -12
  760. package/lib/types/utils/assignProps.d.ts +0 -11
  761. package/lib/types/utils/canUseDOM.d.ts +0 -1
  762. package/lib/types/utils/capitalizeFirstLetter.d.ts +0 -1
  763. package/lib/types/utils/color.d.ts +0 -5
  764. package/lib/types/utils/compose.d.ts +0 -1
  765. package/lib/types/utils/createHoc.d.ts +0 -3
  766. package/lib/types/utils/createUUID.d.ts +0 -1
  767. package/lib/types/utils/cssToIntDefault.d.ts +0 -8
  768. package/lib/types/utils/enhances/WithAutoFocus.d.ts +0 -14
  769. package/lib/types/utils/enhances/WithCSS.d.ts +0 -41
  770. package/lib/types/utils/enhances/WithI18n.d.ts +0 -43
  771. package/lib/types/utils/enhances/WithKeyboardFocus.d.ts +0 -45
  772. package/lib/types/utils/enhances/WithRef.d.ts +0 -3
  773. package/lib/types/utils/enhances/a11yEnhance.d.ts +0 -10
  774. package/lib/types/utils/enhances/animatedSizeEnhance.d.ts +0 -12
  775. package/lib/types/utils/enhances/autoFocusEnhance.d.ts +0 -10
  776. package/lib/types/utils/enhances/contextEnhance.d.ts +0 -3
  777. package/lib/types/utils/enhances/i18nEnhance.d.ts +0 -25
  778. package/lib/types/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
  779. package/lib/types/utils/enhances/resolveColorEnhance.d.ts +0 -2
  780. package/lib/types/utils/eventEmitter.d.ts +0 -9
  781. package/lib/types/utils/findComponent.d.ts +0 -12
  782. package/lib/types/utils/fire.d.ts +0 -2
  783. package/lib/types/utils/focus-lock/focusBorders.d.ts +0 -4
  784. package/lib/types/utils/focus-lock/getFocusableIn.d.ts +0 -1
  785. package/lib/types/utils/focus-lock/isFocusInside.d.ts +0 -1
  786. package/lib/types/utils/focus-lock/isFocusable.d.ts +0 -1
  787. package/lib/types/utils/focus-lock/setFocus.d.ts +0 -1
  788. package/lib/types/utils/getAccessibleName.d.ts +0 -1
  789. package/lib/types/utils/getDisplayName.d.ts +0 -2
  790. package/lib/types/utils/getEventTarget.d.ts +0 -1
  791. package/lib/types/utils/getOriginChildren.d.ts +0 -2
  792. package/lib/types/utils/getRandomInt.d.ts +0 -1
  793. package/lib/types/utils/getValue.d.ts +0 -1
  794. package/lib/types/utils/hasLabels.d.ts +0 -7
  795. package/lib/types/utils/hasParent.d.ts +0 -1
  796. package/lib/types/utils/if.d.ts +0 -11
  797. package/lib/types/utils/ifChildren.d.ts +0 -8
  798. package/lib/types/utils/injectStyle.d.ts +0 -2
  799. package/lib/types/utils/inputProps.d.ts +0 -2
  800. package/lib/types/utils/isNode.d.ts +0 -1
  801. package/lib/types/utils/isPromise.d.ts +0 -1
  802. package/lib/types/utils/isRetina.d.ts +0 -1
  803. package/lib/types/utils/logger.d.ts +0 -9
  804. package/lib/types/utils/numericChecker.d.ts +0 -5
  805. package/lib/types/utils/ownerDocument.d.ts +0 -1
  806. package/lib/types/utils/pick.d.ts +0 -1
  807. package/lib/types/utils/propsForElement.d.ts +0 -3
  808. package/lib/types/utils/rafTrottle.d.ts +0 -2
  809. package/lib/types/utils/reactToText.d.ts +0 -3
  810. package/lib/types/utils/ref.d.ts +0 -8
  811. package/lib/types/utils/setRef.d.ts +0 -2
  812. package/lib/types/utils/syncScroll.d.ts +0 -1
  813. package/lib/types/utils/uncontroll.d.ts +0 -4
  814. package/lib/types/utils/uniqueID.d.ts +0 -12
  815. package/lib/types/utils/use/useColorResolver.d.ts +0 -1
  816. package/lib/types/utils/use/useCss.d.ts +0 -4
  817. package/lib/types/utils/use/useEnhancedEffect.d.ts +0 -3
  818. package/lib/types/utils/use/useEventCallback.d.ts +0 -4
  819. package/lib/types/utils/use/useEventListener.d.ts +0 -2
  820. package/lib/types/utils/use/useFocusLock.d.ts +0 -10
  821. package/lib/types/utils/use/usePreventScroll.d.ts +0 -2
  822. package/lib/types/utils/useCssVariable.d.ts +0 -8
  823. package/lib/types/utils/zIndexStacking.d.ts +0 -8
  824. package/lib/utils/CSSinJS.js +0 -36
  825. package/lib/utils/CSSinJS.js.map +0 -1
  826. package/lib/utils/CSSinJS.mjs +0 -28
  827. package/lib/utils/CSSinJS.mjs.map +0 -1
  828. package/lib/utils/ScreenReaderOnly.js +0 -31
  829. package/lib/utils/ScreenReaderOnly.js.map +0 -1
  830. package/lib/utils/ScreenReaderOnly.mjs +0 -24
  831. package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
  832. package/lib/utils/ThemeProvider.js +0 -82
  833. package/lib/utils/ThemeProvider.js.map +0 -1
  834. package/lib/utils/ThemeProvider.mjs +0 -71
  835. package/lib/utils/ThemeProvider.mjs.map +0 -1
  836. package/lib/utils/addonText.js +0 -18
  837. package/lib/utils/addonText.js.map +0 -1
  838. package/lib/utils/addonText.mjs +0 -11
  839. package/lib/utils/addonText.mjs.map +0 -1
  840. package/lib/utils/addonTextChildren.js +0 -45
  841. package/lib/utils/addonTextChildren.js.map +0 -1
  842. package/lib/utils/addonTextChildren.mjs +0 -37
  843. package/lib/utils/addonTextChildren.mjs.map +0 -1
  844. package/lib/utils/ariaProps.js +0 -22
  845. package/lib/utils/ariaProps.js.map +0 -1
  846. package/lib/utils/ariaProps.mjs +0 -16
  847. package/lib/utils/ariaProps.mjs.map +0 -1
  848. package/lib/utils/assignProps.js +0 -93
  849. package/lib/utils/assignProps.js.map +0 -1
  850. package/lib/utils/assignProps.mjs.map +0 -1
  851. package/lib/utils/canUseDOM.js +0 -10
  852. package/lib/utils/canUseDOM.js.map +0 -1
  853. package/lib/utils/canUseDOM.mjs.map +0 -1
  854. package/lib/utils/capitalizeFirstLetter.js +0 -10
  855. package/lib/utils/capitalizeFirstLetter.js.map +0 -1
  856. package/lib/utils/capitalizeFirstLetter.mjs.map +0 -1
  857. package/lib/utils/color.js +0 -208
  858. package/lib/utils/color.js.map +0 -1
  859. package/lib/utils/color.mjs +0 -196
  860. package/lib/utils/color.mjs.map +0 -1
  861. package/lib/utils/compose.js +0 -21
  862. package/lib/utils/compose.js.map +0 -1
  863. package/lib/utils/compose.mjs +0 -15
  864. package/lib/utils/compose.mjs.map +0 -1
  865. package/lib/utils/createHoc.js +0 -55
  866. package/lib/utils/createHoc.js.map +0 -1
  867. package/lib/utils/createHoc.mjs +0 -46
  868. package/lib/utils/createHoc.mjs.map +0 -1
  869. package/lib/utils/createUUID.js +0 -15
  870. package/lib/utils/createUUID.js.map +0 -1
  871. package/lib/utils/createUUID.mjs +0 -9
  872. package/lib/utils/createUUID.mjs.map +0 -1
  873. package/lib/utils/cssToIntDefault.js +0 -22
  874. package/lib/utils/cssToIntDefault.js.map +0 -1
  875. package/lib/utils/cssToIntDefault.mjs +0 -16
  876. package/lib/utils/cssToIntDefault.mjs.map +0 -1
  877. package/lib/utils/enhances/WithAutoFocus.js +0 -75
  878. package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
  879. package/lib/utils/enhances/WithAutoFocus.mjs +0 -67
  880. package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
  881. package/lib/utils/enhances/WithCSS.js +0 -93
  882. package/lib/utils/enhances/WithCSS.js.map +0 -1
  883. package/lib/utils/enhances/WithCSS.mjs +0 -79
  884. package/lib/utils/enhances/WithCSS.mjs.map +0 -1
  885. package/lib/utils/enhances/WithI18n.js +0 -95
  886. package/lib/utils/enhances/WithI18n.js.map +0 -1
  887. package/lib/utils/enhances/WithI18n.mjs.map +0 -1
  888. package/lib/utils/enhances/WithKeyboardFocus.js +0 -93
  889. package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
  890. package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -84
  891. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
  892. package/lib/utils/enhances/WithRef.js +0 -26
  893. package/lib/utils/enhances/WithRef.js.map +0 -1
  894. package/lib/utils/enhances/WithRef.mjs +0 -18
  895. package/lib/utils/enhances/WithRef.mjs.map +0 -1
  896. package/lib/utils/enhances/a11yEnhance.js +0 -74
  897. package/lib/utils/enhances/a11yEnhance.js.map +0 -1
  898. package/lib/utils/enhances/a11yEnhance.mjs +0 -66
  899. package/lib/utils/enhances/a11yEnhance.mjs.map +0 -1
  900. package/lib/utils/enhances/animatedSizeEnhance.js +0 -98
  901. package/lib/utils/enhances/animatedSizeEnhance.js.map +0 -1
  902. package/lib/utils/enhances/animatedSizeEnhance.mjs +0 -90
  903. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +0 -1
  904. package/lib/utils/enhances/autoFocusEnhance.js +0 -46
  905. package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
  906. package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
  907. package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
  908. package/lib/utils/enhances/contextEnhance.js +0 -22
  909. package/lib/utils/enhances/contextEnhance.js.map +0 -1
  910. package/lib/utils/enhances/contextEnhance.mjs +0 -14
  911. package/lib/utils/enhances/contextEnhance.mjs.map +0 -1
  912. package/lib/utils/enhances/i18nEnhance.js +0 -101
  913. package/lib/utils/enhances/i18nEnhance.js.map +0 -1
  914. package/lib/utils/enhances/i18nEnhance.mjs +0 -92
  915. package/lib/utils/enhances/i18nEnhance.mjs.map +0 -1
  916. package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
  917. package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  918. package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
  919. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
  920. package/lib/utils/enhances/resolveColorEnhance.js +0 -25
  921. package/lib/utils/enhances/resolveColorEnhance.js.map +0 -1
  922. package/lib/utils/enhances/resolveColorEnhance.mjs +0 -17
  923. package/lib/utils/enhances/resolveColorEnhance.mjs.map +0 -1
  924. package/lib/utils/eventEmitter.js +0 -41
  925. package/lib/utils/eventEmitter.js.map +0 -1
  926. package/lib/utils/eventEmitter.mjs +0 -34
  927. package/lib/utils/eventEmitter.mjs.map +0 -1
  928. package/lib/utils/findComponent.js +0 -106
  929. package/lib/utils/findComponent.js.map +0 -1
  930. package/lib/utils/findComponent.mjs +0 -95
  931. package/lib/utils/findComponent.mjs.map +0 -1
  932. package/lib/utils/fire.js +0 -23
  933. package/lib/utils/fire.js.map +0 -1
  934. package/lib/utils/fire.mjs +0 -15
  935. package/lib/utils/fire.mjs.map +0 -1
  936. package/lib/utils/focus-lock/focusBorders.js +0 -72
  937. package/lib/utils/focus-lock/focusBorders.js.map +0 -1
  938. package/lib/utils/focus-lock/focusBorders.mjs +0 -62
  939. package/lib/utils/focus-lock/focusBorders.mjs.map +0 -1
  940. package/lib/utils/focus-lock/getFocusableIn.js +0 -26
  941. package/lib/utils/focus-lock/getFocusableIn.js.map +0 -1
  942. package/lib/utils/focus-lock/getFocusableIn.mjs +0 -19
  943. package/lib/utils/focus-lock/getFocusableIn.mjs.map +0 -1
  944. package/lib/utils/focus-lock/isFocusInside.js +0 -16
  945. package/lib/utils/focus-lock/isFocusInside.js.map +0 -1
  946. package/lib/utils/focus-lock/isFocusInside.mjs +0 -9
  947. package/lib/utils/focus-lock/isFocusInside.mjs.map +0 -1
  948. package/lib/utils/focus-lock/isFocusable.js +0 -51
  949. package/lib/utils/focus-lock/isFocusable.js.map +0 -1
  950. package/lib/utils/focus-lock/isFocusable.mjs +0 -43
  951. package/lib/utils/focus-lock/isFocusable.mjs.map +0 -1
  952. package/lib/utils/focus-lock/setFocus.js +0 -63
  953. package/lib/utils/focus-lock/setFocus.js.map +0 -1
  954. package/lib/utils/focus-lock/setFocus.mjs +0 -55
  955. package/lib/utils/focus-lock/setFocus.mjs.map +0 -1
  956. package/lib/utils/getAccessibleName.js +0 -56
  957. package/lib/utils/getAccessibleName.js.map +0 -1
  958. package/lib/utils/getAccessibleName.mjs +0 -49
  959. package/lib/utils/getAccessibleName.mjs.map +0 -1
  960. package/lib/utils/getDisplayName.js +0 -10
  961. package/lib/utils/getDisplayName.js.map +0 -1
  962. package/lib/utils/getDisplayName.mjs +0 -4
  963. package/lib/utils/getDisplayName.mjs.map +0 -1
  964. package/lib/utils/getEventTarget.js +0 -53
  965. package/lib/utils/getEventTarget.js.map +0 -1
  966. package/lib/utils/getEventTarget.mjs +0 -45
  967. package/lib/utils/getEventTarget.mjs.map +0 -1
  968. package/lib/utils/getOriginChildren.js +0 -18
  969. package/lib/utils/getOriginChildren.js.map +0 -1
  970. package/lib/utils/getOriginChildren.mjs +0 -10
  971. package/lib/utils/getOriginChildren.mjs.map +0 -1
  972. package/lib/utils/getRandomInt.js +0 -11
  973. package/lib/utils/getRandomInt.js.map +0 -1
  974. package/lib/utils/getRandomInt.mjs +0 -5
  975. package/lib/utils/getRandomInt.mjs.map +0 -1
  976. package/lib/utils/getValue.js +0 -16
  977. package/lib/utils/getValue.js.map +0 -1
  978. package/lib/utils/getValue.mjs +0 -10
  979. package/lib/utils/getValue.mjs.map +0 -1
  980. package/lib/utils/hasLabels.js +0 -47
  981. package/lib/utils/hasLabels.js.map +0 -1
  982. package/lib/utils/hasLabels.mjs +0 -39
  983. package/lib/utils/hasLabels.mjs.map +0 -1
  984. package/lib/utils/hasParent.js +0 -14
  985. package/lib/utils/hasParent.js.map +0 -1
  986. package/lib/utils/hasParent.mjs +0 -7
  987. package/lib/utils/hasParent.mjs.map +0 -1
  988. package/lib/utils/if.js +0 -16
  989. package/lib/utils/if.js.map +0 -1
  990. package/lib/utils/if.mjs +0 -9
  991. package/lib/utils/if.mjs.map +0 -1
  992. package/lib/utils/ifChildren.js +0 -17
  993. package/lib/utils/ifChildren.js.map +0 -1
  994. package/lib/utils/ifChildren.mjs +0 -10
  995. package/lib/utils/ifChildren.mjs.map +0 -1
  996. package/lib/utils/injectStyle.js +0 -49
  997. package/lib/utils/injectStyle.js.map +0 -1
  998. package/lib/utils/injectStyle.mjs +0 -41
  999. package/lib/utils/injectStyle.mjs.map +0 -1
  1000. package/lib/utils/inputProps.js +0 -22
  1001. package/lib/utils/inputProps.js.map +0 -1
  1002. package/lib/utils/inputProps.mjs +0 -14
  1003. package/lib/utils/inputProps.mjs.map +0 -1
  1004. package/lib/utils/isNode.js +0 -28
  1005. package/lib/utils/isNode.js.map +0 -1
  1006. package/lib/utils/isNode.mjs +0 -21
  1007. package/lib/utils/isNode.mjs.map +0 -1
  1008. package/lib/utils/isPromise.js +0 -10
  1009. package/lib/utils/isPromise.js.map +0 -1
  1010. package/lib/utils/isPromise.mjs +0 -4
  1011. package/lib/utils/isPromise.mjs.map +0 -1
  1012. package/lib/utils/isRetina.js +0 -15
  1013. package/lib/utils/isRetina.js.map +0 -1
  1014. package/lib/utils/isRetina.mjs +0 -9
  1015. package/lib/utils/isRetina.mjs.map +0 -1
  1016. package/lib/utils/logger.js +0 -40
  1017. package/lib/utils/logger.js.map +0 -1
  1018. package/lib/utils/logger.mjs.map +0 -1
  1019. package/lib/utils/numericChecker.js +0 -33
  1020. package/lib/utils/numericChecker.js.map +0 -1
  1021. package/lib/utils/numericChecker.mjs +0 -27
  1022. package/lib/utils/numericChecker.mjs.map +0 -1
  1023. package/lib/utils/ownerDocument.js +0 -10
  1024. package/lib/utils/ownerDocument.js.map +0 -1
  1025. package/lib/utils/ownerDocument.mjs +0 -4
  1026. package/lib/utils/ownerDocument.mjs.map +0 -1
  1027. package/lib/utils/pick.js +0 -19
  1028. package/lib/utils/pick.js.map +0 -1
  1029. package/lib/utils/pick.mjs.map +0 -1
  1030. package/lib/utils/propsForElement.js +0 -59
  1031. package/lib/utils/propsForElement.js.map +0 -1
  1032. package/lib/utils/propsForElement.mjs +0 -50
  1033. package/lib/utils/propsForElement.mjs.map +0 -1
  1034. package/lib/utils/rafTrottle.js +0 -33
  1035. package/lib/utils/rafTrottle.js.map +0 -1
  1036. package/lib/utils/rafTrottle.mjs +0 -26
  1037. package/lib/utils/rafTrottle.mjs.map +0 -1
  1038. package/lib/utils/reactToText.js +0 -33
  1039. package/lib/utils/reactToText.js.map +0 -1
  1040. package/lib/utils/reactToText.mjs +0 -26
  1041. package/lib/utils/reactToText.mjs.map +0 -1
  1042. package/lib/utils/ref.js +0 -95
  1043. package/lib/utils/ref.js.map +0 -1
  1044. package/lib/utils/ref.mjs.map +0 -1
  1045. package/lib/utils/setRef.js +0 -10
  1046. package/lib/utils/setRef.js.map +0 -1
  1047. package/lib/utils/setRef.mjs +0 -3
  1048. package/lib/utils/setRef.mjs.map +0 -1
  1049. package/lib/utils/syncScroll.js +0 -61
  1050. package/lib/utils/syncScroll.js.map +0 -1
  1051. package/lib/utils/syncScroll.mjs +0 -54
  1052. package/lib/utils/syncScroll.mjs.map +0 -1
  1053. package/lib/utils/uncontroll.js +0 -47
  1054. package/lib/utils/uncontroll.js.map +0 -1
  1055. package/lib/utils/uncontroll.mjs +0 -38
  1056. package/lib/utils/uncontroll.mjs.map +0 -1
  1057. package/lib/utils/uniqueID.js +0 -42
  1058. package/lib/utils/uniqueID.js.map +0 -1
  1059. package/lib/utils/uniqueID.mjs +0 -33
  1060. package/lib/utils/uniqueID.mjs.map +0 -1
  1061. package/lib/utils/use/useColorResolver.js +0 -208
  1062. package/lib/utils/use/useColorResolver.js.map +0 -1
  1063. package/lib/utils/use/useColorResolver.mjs +0 -200
  1064. package/lib/utils/use/useColorResolver.mjs.map +0 -1
  1065. package/lib/utils/use/useCss.js +0 -20
  1066. package/lib/utils/use/useCss.js.map +0 -1
  1067. package/lib/utils/use/useCss.mjs +0 -12
  1068. package/lib/utils/use/useCss.mjs.map +0 -1
  1069. package/lib/utils/use/useEnhancedEffect.js +0 -13
  1070. package/lib/utils/use/useEnhancedEffect.js.map +0 -1
  1071. package/lib/utils/use/useEnhancedEffect.mjs.map +0 -1
  1072. package/lib/utils/use/useEventCallback.js +0 -25
  1073. package/lib/utils/use/useEventCallback.js.map +0 -1
  1074. package/lib/utils/use/useEventCallback.mjs +0 -19
  1075. package/lib/utils/use/useEventCallback.mjs.map +0 -1
  1076. package/lib/utils/use/useEventListener.js +0 -33
  1077. package/lib/utils/use/useEventListener.js.map +0 -1
  1078. package/lib/utils/use/useEventListener.mjs +0 -25
  1079. package/lib/utils/use/useEventListener.mjs.map +0 -1
  1080. package/lib/utils/use/useFocusLock.js +0 -289
  1081. package/lib/utils/use/useFocusLock.js.map +0 -1
  1082. package/lib/utils/use/useFocusLock.mjs +0 -266
  1083. package/lib/utils/use/useFocusLock.mjs.map +0 -1
  1084. package/lib/utils/use/usePreventScroll.js +0 -78
  1085. package/lib/utils/use/usePreventScroll.js.map +0 -1
  1086. package/lib/utils/use/usePreventScroll.mjs +0 -70
  1087. package/lib/utils/use/usePreventScroll.mjs.map +0 -1
  1088. package/lib/utils/useCssVariable.js +0 -55
  1089. package/lib/utils/useCssVariable.js.map +0 -1
  1090. package/lib/utils/useCssVariable.mjs +0 -46
  1091. package/lib/utils/useCssVariable.mjs.map +0 -1
  1092. package/lib/utils/zIndexStacking.js +0 -48
  1093. package/lib/utils/zIndexStacking.js.map +0 -1
  1094. package/lib/utils/zIndexStacking.mjs +0 -38
  1095. package/lib/utils/zIndexStacking.mjs.map +0 -1
  1096. /package/lib/{types/core-types → core-types}/Component.d.ts +0 -0
  1097. /package/lib/{types/coreFactory.d.ts → coreFactory.d.ts} +0 -0
  1098. /package/lib/{types/enhancement → enhancement}/Children.d.ts +0 -0
  1099. /package/lib/{types/enhancement → enhancement}/Root.d.ts +0 -0
  1100. /package/lib/{types/enhancement → enhancement}/bindHandler.d.ts +0 -0
  1101. /package/lib/{types/enhancement → enhancement}/dataName.d.ts +0 -0
  1102. /package/lib/{types/enhancement → enhancement}/enhance.d.ts +0 -0
  1103. /package/lib/{types/enhancement → enhancement}/functionDefaultProps.d.ts +0 -0
  1104. /package/lib/{types/enhancement → enhancement}/hoistProps.d.ts +0 -0
  1105. /package/lib/{types/enhancement → enhancement}/i18n.d.ts +0 -0
  1106. /package/lib/{types/enhancement → enhancement}/inheritedName.d.ts +0 -0
  1107. /package/lib/{types/enhancement → enhancement}/staticChildren.d.ts +0 -0
  1108. /package/lib/{types/enhancement → enhancement}/style.d.ts +0 -0
  1109. /package/lib/{types/enhancement → enhancement}/uncontrolledProps.d.ts +0 -0
  1110. /package/lib/{types/index.d.ts → index.d.ts} +0 -0
  1111. /package/lib/{types/theme → theme}/processor.d.ts +0 -0
  1112. /package/lib/{types/theme → theme}/themes/dark.d.ts +0 -0
  1113. /package/lib/{types/theme → theme}/themes/light.d.ts +0 -0
  1114. /package/lib/{types/theme → theme}/utils.d.ts +0 -0
@@ -1,16 +1,16 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
4
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
+ import React from "react";
6
6
  import assignProps from "../utils/assignProps.mjs";
7
7
  import useEnhancedEffect from "../utils/use/useEnhancedEffect.mjs";
8
8
  import pick from "../utils/pick.mjs";
9
- export var HOIST_CONTEXT = Symbol('HOIST_CONTEXT');
10
- var HOIST_SELF = Symbol('HOIST_SELF');
11
- var HOIST_SET = Symbol('HOIST_SET');
9
+ var HOIST_CONTEXT = Symbol("HOIST_CONTEXT");
10
+ var HOIST_SELF = Symbol("HOIST_SELF");
11
+ var HOIST_SET = Symbol("HOIST_SET");
12
12
  function flatChildComponent(childComponents) {
13
- return Object.values(childComponents).reduce(function (acc, Component) {
13
+ return Object.values(childComponents).reduce(function(acc, Component) {
14
14
  if (Array.isArray(Component)) {
15
15
  acc.push(Component[0]);
16
16
  acc.push.apply(acc, _toConsumableArray(flatChildComponent(Component[1])));
@@ -20,61 +20,49 @@ function flatChildComponent(childComponents) {
20
20
  return acc;
21
21
  }, []);
22
22
  }
23
-
24
- /** @deprecated Doesn't work in ssr and sometimes breakes rulles of hooks. We should never use it. */
25
23
  function Enhancement(childComponents, Context) {
26
24
  return {
27
25
  condition: function condition(Component) {
28
- return [Component].concat(_toConsumableArray(flatChildComponent(childComponents))).some(function (Component) {
26
+ return [Component].concat(_toConsumableArray(flatChildComponent(childComponents))).some(function(Component2) {
29
27
  var _Component$hoistProps;
30
- return Boolean((_Component$hoistProps = Component.hoistProps) === null || _Component$hoistProps === void 0 ? void 0 : _Component$hoistProps.length);
28
+ return Boolean((_Component$hoistProps = Component2.hoistProps) === null || _Component$hoistProps === void 0 ? void 0 : _Component$hoistProps.length);
31
29
  });
32
30
  },
33
31
  init: function init(props, WrapperComponent, isFunction) {
34
32
  var _this = this;
35
33
  if (isFunction) {
36
- // TODO: might breake rules of hooks (by lsroman)
37
34
  this[HOIST_SELF] = React.useState({});
38
35
  } else {
39
- this[HOIST_SELF] = [{}, function (obj) {
36
+ this[HOIST_SELF] = [{}, function(obj) {
40
37
  _this[HOIST_SELF][0] = obj;
41
38
  _this.forceUpdate();
42
39
  }];
43
40
  }
44
- // For optimization render
45
- this[HOIST_SET] = function (obj) {
41
+ this[HOIST_SET] = function(obj) {
46
42
  _this[HOIST_SELF][1](obj);
47
43
  };
48
44
  },
49
45
  context: function context(_context) {
50
- // TODO: need to optimizte container initialization (by lsroman)
51
- // WrapperComponent.hoistProps
52
46
  return _objectSpread(_objectSpread({}, _context), {}, _defineProperty({}, HOIST_CONTEXT, this[HOIST_SET]));
53
47
  },
54
48
  asProps: function asProps(props) {
55
- // TODO: need to check for no props overwriting (by lsroman)
56
49
  return assignProps(this[HOIST_SELF][0], props);
57
50
  },
58
51
  wrapperProps: function wrapperProps(props, WrapperComponent) {
59
52
  var _WrapperComponent$hoi;
60
53
  if ((_WrapperComponent$hoi = WrapperComponent.hoistProps) !== null && _WrapperComponent$hoi !== void 0 && _WrapperComponent$hoi.length) {
61
54
  var context = React.useContext(Context);
62
- var renameProps = WrapperComponent.hoistProps.reduce(function (acc, propName) {
63
- var _propName$split = propName.split(':'),
64
- _propName$split2 = _slicedToArray(_propName$split, 2),
65
- name = _propName$split2[0],
66
- rename = _propName$split2[1];
55
+ var renameProps = WrapperComponent.hoistProps.reduce(function(acc, propName) {
56
+ var _propName$split = propName.split(":"), _propName$split2 = _slicedToArray(_propName$split, 2), name = _propName$split2[0], rename = _propName$split2[1];
67
57
  acc[name] = rename || name;
68
58
  return acc;
69
59
  }, {});
70
- var hoistProps = Object.entries(pick(props, Object.keys(renameProps))).reduce(function (acc, _ref) {
71
- var _ref2 = _slicedToArray(_ref, 2),
72
- name = _ref2[0],
73
- value = _ref2[1];
60
+ var hoistProps = Object.entries(pick(props, Object.keys(renameProps))).reduce(function(acc, _ref) {
61
+ var _ref2 = _slicedToArray(_ref, 2), name = _ref2[0], value = _ref2[1];
74
62
  acc[renameProps[name]] = value;
75
63
  return acc;
76
64
  }, {});
77
- useEnhancedEffect(function () {
65
+ useEnhancedEffect(function() {
78
66
  if (context[HOIST_CONTEXT]) {
79
67
  context[HOIST_CONTEXT](hoistProps);
80
68
  }
@@ -84,5 +72,7 @@ function Enhancement(childComponents, Context) {
84
72
  }
85
73
  };
86
74
  }
87
- export default Enhancement;
88
- //# sourceMappingURL=hoistProps.mjs.map
75
+ export {
76
+ HOIST_CONTEXT,
77
+ Enhancement as default
78
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _WithI18n = require("../utils/enhances/WithI18n");
12
+ var _excluded = ["locale"];
13
+ function i18nAppLocaleEnhance() {
14
+ return {
15
+ wrapperProps: function wrapperProps(props) {
16
+ var locale = props.locale,
17
+ other = (0, _objectWithoutProperties2["default"])(props, _excluded);
18
+ var contextLocale = _react["default"].useContext(_WithI18n.Context);
19
+ if (!locale && !contextLocale) return props;
20
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, {
21
+ locale: locale !== null && locale !== void 0 ? locale : contextLocale
22
+ });
23
+ }
24
+ };
25
+ }
26
+ var _default = i18nAppLocaleEnhance;
27
+ exports["default"] = _default;
28
+ //# sourceMappingURL=i18n.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.cjs","names":["_react","_interopRequireDefault","require","_WithI18n","_excluded","i18nAppLocaleEnhance","wrapperProps","props","locale","other","_objectWithoutProperties2","contextLocale","React","useContext","Context","_objectSpread2","_default","exports"],"sources":["../../src/enhancement/i18n.tsx"],"sourcesContent":["import React from 'react';\nimport { Context } from '../utils/enhances/WithI18n';\n\nfunction i18nAppLocaleEnhance() {\n return {\n wrapperProps: (props: any) => {\n const { locale, ...other } = props;\n const contextLocale = React.useContext(Context);\n if (!locale && !contextLocale) return props;\n return {\n ...other,\n locale: locale ?? contextLocale,\n };\n },\n };\n}\n\nexport default i18nAppLocaleEnhance;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAAqD,IAAAE,SAAA;AAErD,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,OAAO;IACLC,YAAY,EAAE,SAAAA,aAACC,KAAU,EAAK;MAC5B,IAAQC,MAAM,GAAeD,KAAK,CAA1BC,MAAM;QAAKC,KAAK,OAAAC,yBAAA,aAAKH,KAAK,EAAAH,SAAA;MAClC,IAAMO,aAAa,GAAGC,iBAAK,CAACC,UAAU,CAACC,iBAAO,CAAC;MAC/C,IAAI,CAACN,MAAM,IAAI,CAACG,aAAa,EAAE,OAAOJ,KAAK;MAC3C,WAAAQ,cAAA,iBAAAA,cAAA,iBACKN,KAAK;QACRD,MAAM,EAAEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIG;MAAa;IAEnC;EACF,CAAC;AACH;AAAC,IAAAK,QAAA,GAEcX,oBAAoB;AAAAY,OAAA,cAAAD,QAAA"}
@@ -1,13 +1,12 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["locale"];
4
- import React from 'react';
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import React from "react";
5
4
  import { Context } from "../utils/enhances/WithI18n.mjs";
5
+ var _excluded = ["locale"];
6
6
  function i18nAppLocaleEnhance() {
7
7
  return {
8
8
  wrapperProps: function wrapperProps(props) {
9
- var locale = props.locale,
10
- other = _objectWithoutProperties(props, _excluded);
9
+ var locale = props.locale, other = _objectWithoutProperties(props, _excluded);
11
10
  var contextLocale = React.useContext(Context);
12
11
  if (!locale && !contextLocale) return props;
13
12
  return _objectSpread(_objectSpread({}, other), {}, {
@@ -16,5 +15,6 @@ function i18nAppLocaleEnhance() {
16
15
  }
17
16
  };
18
17
  }
19
- export default i18nAppLocaleEnhance;
20
- //# sourceMappingURL=i18n.mjs.map
18
+ export {
19
+ i18nAppLocaleEnhance as default
20
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
+ var _symbols = require("../core-types/symbols");
11
+ function Enhancement() {
12
+ return {
13
+ condition: function condition(Component) {
14
+ return Boolean(Component.displayName);
15
+ },
16
+ "static": function _static(WrapperComponent) {
17
+ return (0, _defineProperty2["default"])({}, _symbols.INHERITED_NAME, (0, _toConsumableArray2["default"])(new Set([].concat((0, _toConsumableArray2["default"])(WrapperComponent[_symbols.INHERITED_NAME] || []), [WrapperComponent.displayName]))));
18
+ }
19
+ };
20
+ }
21
+ var _default = Enhancement;
22
+ exports["default"] = _default;
23
+ //# sourceMappingURL=inheritedName.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inheritedName.cjs","names":["_symbols","require","Enhancement","condition","Component","Boolean","displayName","_static","WrapperComponent","_defineProperty2","INHERITED_NAME","_toConsumableArray2","Set","concat","_default","exports"],"sources":["../../src/enhancement/inheritedName.tsx"],"sourcesContent":["import { INHERITED_NAME } from '../core-types/symbols';\n\nfunction Enhancement() {\n return {\n condition: function (Component: any) {\n return Boolean(Component.displayName);\n },\n static: function (WrapperComponent: any) {\n return {\n [INHERITED_NAME]: [\n ...new Set([...(WrapperComponent[INHERITED_NAME] || []), WrapperComponent.displayName]),\n ],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,SAASC,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MACnC,OAAOC,OAAO,CAACD,SAAS,CAACE,WAAW,CAAC;IACvC,CAAC;IACD,UAAQ,SAAAC,QAAUC,gBAAqB,EAAE;MACvC,WAAAC,gBAAA,iBACGC,uBAAc,MAAAC,mBAAA,aACV,IAAIC,GAAG,IAAAC,MAAA,KAAAF,mBAAA,aAAMH,gBAAgB,CAACE,uBAAc,CAAC,IAAI,EAAE,IAAGF,gBAAgB,CAACF,WAAW,GAAE;IAG7F;EACF,CAAC;AACH;AAAC,IAAAQ,QAAA,GAEcZ,WAAW;AAAAa,OAAA,cAAAD,QAAA"}
@@ -1,5 +1,5 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import { INHERITED_NAME } from "../core-types/symbols.mjs";
4
4
  function Enhancement() {
5
5
  return {
@@ -11,5 +11,6 @@ function Enhancement() {
11
11
  }
12
12
  };
13
13
  }
14
- export default Enhancement;
15
- //# sourceMappingURL=inheritedName.mjs.map
14
+ export {
15
+ Enhancement as default
16
+ };
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = exports.STATIC_COMPONENT = exports.ROOT_COMPONENT = void 0;
8
+ exports.getterMethodName = getterMethodName;
9
+ exports.getterMethodNameByDisplayName = getterMethodNameByDisplayName;
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _react = _interopRequireDefault(require("react"));
14
+ var _assignProps = _interopRequireDefault(require("../utils/assignProps"));
15
+ var _pick = _interopRequireDefault(require("../utils/pick"));
16
+ var _logger = _interopRequireDefault(require("../utils/logger"));
17
+ function assign(target, source) {
18
+ return Object.defineProperties(target, Object.keys(source).reduce(function (descriptors, key) {
19
+ descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
20
+ return descriptors;
21
+ }, {}));
22
+ }
23
+ function getterMethodName(name) {
24
+ return "get".concat(name, "Props");
25
+ }
26
+ function getterMethodNameByDisplayName() {
27
+ var displayName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
28
+ var displayNames = displayName.split('.');
29
+ var name = displayNames.slice(-(displayNames.length - 1)).join('');
30
+ return getterMethodName(name);
31
+ }
32
+ function flatGetterMethodNames(childComponents, parentName) {
33
+ return Object.entries(childComponents).reduce(function (acc, _ref) {
34
+ var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
35
+ name = _ref2[0],
36
+ value = _ref2[1];
37
+ if (Array.isArray(value)) {
38
+ acc.push.apply(acc, (0, _toConsumableArray2["default"])(flatGetterMethodNames(value[1], name)));
39
+ }
40
+ name = parentName ? "".concat(parentName).concat(name) : name;
41
+ acc.push(getterMethodName(name));
42
+ return acc;
43
+ }, []);
44
+ }
45
+ var STATIC_COMPONENT = Symbol('STATIC_COMPONENT');
46
+ exports.STATIC_COMPONENT = STATIC_COMPONENT;
47
+ var ROOT_COMPONENT = Symbol('ROOT_COMPONENT');
48
+ exports.ROOT_COMPONENT = ROOT_COMPONENT;
49
+ var SELF_GETTER_METHOD = Symbol('SELF_GETTER_METHOD');
50
+ function Enhancement(childComponents, createComponent, options) {
51
+ var getterMethodNames = flatGetterMethodNames(childComponents);
52
+ return {
53
+ condition: function condition(Component) {
54
+ return Boolean(Component[STATIC_COMPONENT] || Object.keys(childComponents).length);
55
+ },
56
+ init: function init(props, WrapperComponent) {
57
+ var _this = this;
58
+ var getterMethods = (0, _pick["default"])(this, getterMethodNames);
59
+ this[SELF_GETTER_METHOD] = function () {
60
+ var selfGetterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
61
+ _logger["default"].warn(true, "Getter `".concat(selfGetterMethod, "` can't be fired as it is a getter of static component"), props['data-ui-name'] || WrapperComponent.displayName);
62
+ };
63
+ assign(this, getterMethodNames.reduce(function (acc, name) {
64
+ var getterMethod = getterMethods[name];
65
+ if (!getterMethod) return acc;
66
+ acc[name] = function () {
67
+ var childrenProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
68
+ var getterProps = getterMethod.call(_this, childrenProps, acc[name].index);
69
+ return (0, _assignProps["default"])(childrenProps, getterProps);
70
+ };
71
+ acc[name].index = -1;
72
+ acc[name].cache = new Set();
73
+ return acc;
74
+ }, {}));
75
+ },
76
+ "static": function _static(WrapperComponent, Component) {
77
+ if (Object.keys(childComponents).length && !WrapperComponent.displayName) {
78
+ throw new Error('"displayName" is not defined');
79
+ }
80
+ return Object.entries(childComponents).reduce(function (acc, _ref3) {
81
+ var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2),
82
+ name = _ref4[0],
83
+ value = _ref4[1];
84
+ var childComponents = {};
85
+ if (Array.isArray(value)) {
86
+ childComponents = value[1];
87
+ value = value[0];
88
+ }
89
+ var prevStaticComponent = value[STATIC_COMPONENT];
90
+ // @ts-ignore
91
+ var prevDisplayName = value.displayName;
92
+ // @ts-ignore
93
+ value.displayName = "".concat(WrapperComponent.displayName, ".").concat(name);
94
+ value[STATIC_COMPONENT] = true;
95
+ value[ROOT_COMPONENT] = Component[ROOT_COMPONENT] || Component;
96
+ acc[name] = createComponent(value, childComponents, options);
97
+ // @ts-ignore
98
+ value.displayName = prevDisplayName;
99
+ value[STATIC_COMPONENT] = prevStaticComponent;
100
+ return acc;
101
+ }, {});
102
+ },
103
+ context: function context(_context) {
104
+ // const getterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
105
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _context), (0, _pick["default"])(this, getterMethodNames));
106
+ },
107
+ wrapperProps: function wrapperProps(props, WrapperComponent) {
108
+ if (!WrapperComponent[STATIC_COMPONENT]) return props;
109
+ var context = _react["default"].useContext(options.context);
110
+ var getterMethod = context[getterMethodNameByDisplayName(WrapperComponent.displayName)];
111
+ if (getterMethod) {
112
+ if (!getterMethod.cache.has(this)) {
113
+ getterMethod.cache.add(this);
114
+ getterMethod.index++;
115
+ if (this) this.index = getterMethod.index;
116
+ }
117
+ if (this) getterMethod.index = this.index;
118
+ return getterMethod(props);
119
+ }
120
+ return props;
121
+ },
122
+ render: function render(_render) {
123
+ var _this2 = this;
124
+ getterMethodNames.forEach(function (name) {
125
+ if (_this2[name] === undefined) return;
126
+ _this2[name].index = -1;
127
+ _this2[name].cache.clear();
128
+ });
129
+ return _render;
130
+ }
131
+ };
132
+ }
133
+ var _default = Enhancement;
134
+ exports["default"] = _default;
135
+ //# sourceMappingURL=staticChildren.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staticChildren.cjs","names":["_react","_interopRequireDefault","require","_assignProps","_pick","_logger","assign","target","source","Object","defineProperties","keys","reduce","descriptors","key","getOwnPropertyDescriptor","getterMethodName","name","concat","getterMethodNameByDisplayName","displayName","arguments","length","undefined","displayNames","split","slice","join","flatGetterMethodNames","childComponents","parentName","entries","acc","_ref","_ref2","_slicedToArray2","value","Array","isArray","push","apply","_toConsumableArray2","STATIC_COMPONENT","Symbol","exports","ROOT_COMPONENT","SELF_GETTER_METHOD","Enhancement","createComponent","options","getterMethodNames","condition","Component","Boolean","init","props","WrapperComponent","_this","getterMethods","pick","selfGetterMethod","logger","warn","getterMethod","childrenProps","getterProps","call","index","assignProps","cache","Set","_static","Error","_ref3","_ref4","prevStaticComponent","prevDisplayName","context","_objectSpread2","wrapperProps","React","useContext","has","add","render","_this2","forEach","clear","_default"],"sources":["../../src/enhancement/staticChildren.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../utils/assignProps';\nimport pick from '../utils/pick';\nimport logger from '../utils/logger';\n\nfunction assign(target: any, source: any) {\n return Object.defineProperties(\n target,\n Object.keys(source).reduce((descriptors: any, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, {}),\n );\n}\n\nexport function getterMethodName(name: string) {\n return `get${name}Props`;\n}\n\nexport function getterMethodNameByDisplayName(displayName = '') {\n const displayNames = displayName.split('.');\n const name = displayNames.slice(-(displayNames.length - 1)).join('');\n return getterMethodName(name);\n}\n\nfunction flatGetterMethodNames(childComponents: any, parentName?: string) {\n return Object.entries(childComponents).reduce<string[]>((acc, [name, value]) => {\n if (Array.isArray(value)) {\n acc.push(...flatGetterMethodNames(value[1], name));\n }\n name = parentName ? `${parentName}${name}` : name;\n acc.push(getterMethodName(name));\n return acc;\n }, []);\n}\n\nexport const STATIC_COMPONENT = Symbol('STATIC_COMPONENT');\nexport const ROOT_COMPONENT = Symbol('ROOT_COMPONENT');\nconst SELF_GETTER_METHOD = Symbol('SELF_GETTER_METHOD');\n\nfunction Enhancement(childComponents: any, createComponent: any, options: any) {\n const getterMethodNames = flatGetterMethodNames(childComponents);\n return {\n condition: function (Component: any) {\n return Boolean(Component[STATIC_COMPONENT] || Object.keys(childComponents).length);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n const getterMethods: any = pick(this, getterMethodNames);\n this[SELF_GETTER_METHOD] = () => {\n const selfGetterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);\n logger.warn(\n true,\n `Getter \\`${selfGetterMethod}\\` can't be fired as it is a getter of static component`,\n props['data-ui-name'] || WrapperComponent.displayName,\n );\n };\n assign(\n this,\n getterMethodNames.reduce((acc: any, name) => {\n const getterMethod = getterMethods[name];\n if (!getterMethod) return acc;\n acc[name] = (childrenProps = {}) => {\n const getterProps = getterMethod.call(this, childrenProps, acc[name].index);\n return assignProps(childrenProps, getterProps);\n };\n acc[name].index = -1;\n acc[name].cache = new Set();\n return acc;\n }, {}),\n );\n },\n static: function (WrapperComponent: any, Component: any) {\n if (Object.keys(childComponents).length && !WrapperComponent.displayName) {\n throw new Error('\"displayName\" is not defined');\n }\n return Object.entries(childComponents).reduce((acc: any, [name, value]: any) => {\n let childComponents = {};\n\n if (Array.isArray(value)) {\n childComponents = value[1];\n value = value[0];\n }\n\n const prevStaticComponent = value[STATIC_COMPONENT];\n // @ts-ignore\n const prevDisplayName = value.displayName;\n // @ts-ignore\n value.displayName = `${WrapperComponent.displayName}.${name}`;\n value[STATIC_COMPONENT] = true;\n value[ROOT_COMPONENT] = Component[ROOT_COMPONENT] || Component;\n acc[name] = createComponent(value, childComponents, options);\n // @ts-ignore\n value.displayName = prevDisplayName;\n value[STATIC_COMPONENT] = prevStaticComponent;\n return acc;\n }, {});\n },\n context: function (context: any /*, WrapperComponent*/) {\n // const getterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);\n return {\n ...context,\n // [getterMethod]: this[SELF_GETTER_METHOD],\n ...pick(this, getterMethodNames as any),\n };\n },\n wrapperProps: function (this: any, props: any, WrapperComponent: any) {\n if (!WrapperComponent[STATIC_COMPONENT]) return props;\n const context: any = React.useContext(options.context);\n const getterMethod = context[getterMethodNameByDisplayName(WrapperComponent.displayName)];\n if (getterMethod) {\n if (!getterMethod.cache.has(this)) {\n getterMethod.cache.add(this);\n getterMethod.index++;\n if (this) this.index = getterMethod.index;\n }\n if (this) getterMethod.index = this.index;\n return getterMethod(props);\n }\n return props;\n },\n render: function (this: any, render: any) {\n getterMethodNames.forEach((name) => {\n if (this[name] === undefined) return;\n this[name].index = -1;\n this[name].cache.clear();\n });\n return render;\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":"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"}
@@ -1,30 +1,28 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import React from 'react';
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import React from "react";
5
5
  import assignProps from "../utils/assignProps.mjs";
6
6
  import pick from "../utils/pick.mjs";
7
7
  import logger from "../utils/logger.mjs";
8
8
  function assign(target, source) {
9
- return Object.defineProperties(target, Object.keys(source).reduce(function (descriptors, key) {
9
+ return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
10
10
  descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
11
11
  return descriptors;
12
12
  }, {}));
13
13
  }
14
- export function getterMethodName(name) {
14
+ function getterMethodName(name) {
15
15
  return "get".concat(name, "Props");
16
16
  }
17
- export function getterMethodNameByDisplayName() {
18
- var displayName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
19
- var displayNames = displayName.split('.');
20
- var name = displayNames.slice(-(displayNames.length - 1)).join('');
17
+ function getterMethodNameByDisplayName() {
18
+ var displayName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
19
+ var displayNames = displayName.split(".");
20
+ var name = displayNames.slice(-(displayNames.length - 1)).join("");
21
21
  return getterMethodName(name);
22
22
  }
23
23
  function flatGetterMethodNames(childComponents, parentName) {
24
- return Object.entries(childComponents).reduce(function (acc, _ref) {
25
- var _ref2 = _slicedToArray(_ref, 2),
26
- name = _ref2[0],
27
- value = _ref2[1];
24
+ return Object.entries(childComponents).reduce(function(acc, _ref) {
25
+ var _ref2 = _slicedToArray(_ref, 2), name = _ref2[0], value = _ref2[1];
28
26
  if (Array.isArray(value)) {
29
27
  acc.push.apply(acc, _toConsumableArray(flatGetterMethodNames(value[1], name)));
30
28
  }
@@ -33,9 +31,9 @@ function flatGetterMethodNames(childComponents, parentName) {
33
31
  return acc;
34
32
  }, []);
35
33
  }
36
- export var STATIC_COMPONENT = Symbol('STATIC_COMPONENT');
37
- export var ROOT_COMPONENT = Symbol('ROOT_COMPONENT');
38
- var SELF_GETTER_METHOD = Symbol('SELF_GETTER_METHOD');
34
+ var STATIC_COMPONENT = Symbol("STATIC_COMPONENT");
35
+ var ROOT_COMPONENT = Symbol("ROOT_COMPONENT");
36
+ var SELF_GETTER_METHOD = Symbol("SELF_GETTER_METHOD");
39
37
  function Enhancement(childComponents, createComponent, options) {
40
38
  var getterMethodNames = flatGetterMethodNames(childComponents);
41
39
  return {
@@ -45,20 +43,20 @@ function Enhancement(childComponents, createComponent, options) {
45
43
  init: function init(props, WrapperComponent) {
46
44
  var _this = this;
47
45
  var getterMethods = pick(this, getterMethodNames);
48
- this[SELF_GETTER_METHOD] = function () {
46
+ this[SELF_GETTER_METHOD] = function() {
49
47
  var selfGetterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
50
- logger.warn(true, "Getter `".concat(selfGetterMethod, "` can't be fired as it is a getter of static component"), props['data-ui-name'] || WrapperComponent.displayName);
48
+ logger.warn(true, "Getter `".concat(selfGetterMethod, "` can't be fired as it is a getter of static component"), props["data-ui-name"] || WrapperComponent.displayName);
51
49
  };
52
- assign(this, getterMethodNames.reduce(function (acc, name) {
50
+ assign(this, getterMethodNames.reduce(function(acc, name) {
53
51
  var getterMethod = getterMethods[name];
54
52
  if (!getterMethod) return acc;
55
- acc[name] = function () {
56
- var childrenProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
53
+ acc[name] = function() {
54
+ var childrenProps = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
57
55
  var getterProps = getterMethod.call(_this, childrenProps, acc[name].index);
58
56
  return assignProps(childrenProps, getterProps);
59
57
  };
60
58
  acc[name].index = -1;
61
- acc[name].cache = new Set();
59
+ acc[name].cache = /* @__PURE__ */ new Set();
62
60
  return acc;
63
61
  }, {}));
64
62
  },
@@ -66,31 +64,25 @@ function Enhancement(childComponents, createComponent, options) {
66
64
  if (Object.keys(childComponents).length && !WrapperComponent.displayName) {
67
65
  throw new Error('"displayName" is not defined');
68
66
  }
69
- return Object.entries(childComponents).reduce(function (acc, _ref3) {
70
- var _ref4 = _slicedToArray(_ref3, 2),
71
- name = _ref4[0],
72
- value = _ref4[1];
73
- var childComponents = {};
67
+ return Object.entries(childComponents).reduce(function(acc, _ref3) {
68
+ var _ref4 = _slicedToArray(_ref3, 2), name = _ref4[0], value = _ref4[1];
69
+ var childComponents2 = {};
74
70
  if (Array.isArray(value)) {
75
- childComponents = value[1];
71
+ childComponents2 = value[1];
76
72
  value = value[0];
77
73
  }
78
74
  var prevStaticComponent = value[STATIC_COMPONENT];
79
- // @ts-ignore
80
75
  var prevDisplayName = value.displayName;
81
- // @ts-ignore
82
76
  value.displayName = "".concat(WrapperComponent.displayName, ".").concat(name);
83
77
  value[STATIC_COMPONENT] = true;
84
78
  value[ROOT_COMPONENT] = Component[ROOT_COMPONENT] || Component;
85
- acc[name] = createComponent(value, childComponents, options);
86
- // @ts-ignore
79
+ acc[name] = createComponent(value, childComponents2, options);
87
80
  value.displayName = prevDisplayName;
88
81
  value[STATIC_COMPONENT] = prevStaticComponent;
89
82
  return acc;
90
83
  }, {});
91
84
  },
92
85
  context: function context(_context) {
93
- // const getterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
94
86
  return _objectSpread(_objectSpread({}, _context), pick(this, getterMethodNames));
95
87
  },
96
88
  wrapperProps: function wrapperProps(props, WrapperComponent) {
@@ -110,8 +102,8 @@ function Enhancement(childComponents, createComponent, options) {
110
102
  },
111
103
  render: function render(_render) {
112
104
  var _this2 = this;
113
- getterMethodNames.forEach(function (name) {
114
- if (_this2[name] === undefined) return;
105
+ getterMethodNames.forEach(function(name) {
106
+ if (_this2[name] === void 0) return;
115
107
  _this2[name].index = -1;
116
108
  _this2[name].cache.clear();
117
109
  });
@@ -119,5 +111,10 @@ function Enhancement(childComponents, createComponent, options) {
119
111
  }
120
112
  };
121
113
  }
122
- export default Enhancement;
123
- //# sourceMappingURL=staticChildren.mjs.map
114
+ export {
115
+ ROOT_COMPONENT,
116
+ STATIC_COMPONENT,
117
+ Enhancement as default,
118
+ getterMethodName,
119
+ getterMethodNameByDisplayName
120
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = exports.STYLES_CONTEXT = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _index = require("../styled/index");
13
+ var _staticChildren = require("./staticChildren");
14
+ var _excluded = ["_styles", "styles"],
15
+ _excluded2 = ["styles"];
16
+ var STYLES_CONTEXT = Symbol('STYLES_CONTEXT');
17
+ exports.STYLES_CONTEXT = STYLES_CONTEXT;
18
+ var STYLES_SELF = Symbol('STYLES_SELF');
19
+ function Enhancement(childComponents, Context) {
20
+ return {
21
+ condition: function condition(Component) {
22
+ return Boolean(Component.style || Component[_staticChildren.STATIC_COMPONENT]);
23
+ },
24
+ init: function init(props, WrapperComponent) {
25
+ if (props.styles) {
26
+ this[STYLES_SELF] = props.styles;
27
+ }
28
+ if (WrapperComponent.style) {
29
+ this[STYLES_SELF] = _index.sstyled.merge(WrapperComponent.style, props._styles);
30
+ }
31
+ },
32
+ context: function context(_context) {
33
+ // Optimization: if has no children there is no need to create new context (by lsroman)
34
+ if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {
35
+ return _context;
36
+ }
37
+ return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, _context), {}, (0, _defineProperty2["default"])({}, STYLES_CONTEXT, this[STYLES_SELF]));
38
+ },
39
+ asProps: function asProps(_ref) {
40
+ var _styles = _ref._styles,
41
+ styles = _ref.styles,
42
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
43
+ return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, props), {}, {
44
+ styles: this[STYLES_SELF]
45
+ });
46
+ },
47
+ wrapperProps: function wrapperProps(_ref2) {
48
+ var styles = _ref2.styles,
49
+ props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
50
+ var context = _react["default"].useContext(Context);
51
+ return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, props), {}, {
52
+ _styles: styles,
53
+ styles: context[STYLES_CONTEXT]
54
+ });
55
+ }
56
+ };
57
+ }
58
+ var _default = Enhancement;
59
+ exports["default"] = _default;
60
+ //# sourceMappingURL=style.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.cjs","names":["_react","_interopRequireDefault","require","_index","_staticChildren","_excluded","_excluded2","STYLES_CONTEXT","Symbol","exports","STYLES_SELF","Enhancement","childComponents","Context","condition","Component","Boolean","style","STATIC_COMPONENT","init","props","WrapperComponent","styles","sstyled","merge","_styles","context","Object","keys","length","_objectSpread3","_defineProperty2","asProps","_ref","_objectWithoutProperties2","wrapperProps","_ref2","React","useContext","_default"],"sources":["../../src/enhancement/style.tsx"],"sourcesContent":["import React from 'react';\nimport { sstyled } from '../styled/index';\nimport { STATIC_COMPONENT } from './staticChildren';\n\nexport const STYLES_CONTEXT = Symbol('STYLES_CONTEXT');\nconst STYLES_SELF = Symbol('STYLES_SELF');\n\nfunction Enhancement(childComponents: any, Context: any) {\n return {\n condition: function (Component: any) {\n return Boolean(Component.style || Component[STATIC_COMPONENT]);\n },\n init: function (this: any, props: any, WrapperComponent: any) {\n if (props.styles) {\n this[STYLES_SELF] = props.styles;\n }\n if (WrapperComponent.style) {\n this[STYLES_SELF] = sstyled.merge(WrapperComponent.style, props._styles);\n }\n },\n context: function (this: any, context: any): any {\n // Optimization: if has no children there is no need to create new context (by lsroman)\n if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {\n return context;\n }\n return {\n ...context,\n [STYLES_CONTEXT]: this[STYLES_SELF],\n };\n },\n\n asProps: function (this: any, { _styles, styles, ...props }: any) {\n return {\n ...props,\n styles: this[STYLES_SELF],\n };\n },\n wrapperProps: function (this: any, { styles, ...props }: any) {\n const context: any = React.useContext(Context);\n return {\n ...props,\n _styles: styles,\n styles: context[STYLES_CONTEXT],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAoD,IAAAG,SAAA;EAAAC,UAAA;AAE7C,IAAMC,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AAACC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AACvD,IAAMG,WAAW,GAAGF,MAAM,CAAC,aAAa,CAAC;AAEzC,SAASG,WAAWA,CAACC,eAAoB,EAAEC,OAAY,EAAE;EACvD,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MACnC,OAAOC,OAAO,CAACD,SAAS,CAACE,KAAK,IAAIF,SAAS,CAACG,gCAAgB,CAAC,CAAC;IAChE,CAAC;IACDC,IAAI,EAAE,SAAAA,KAAqBC,KAAU,EAAEC,gBAAqB,EAAE;MAC5D,IAAID,KAAK,CAACE,MAAM,EAAE;QAChB,IAAI,CAACZ,WAAW,CAAC,GAAGU,KAAK,CAACE,MAAM;MAClC;MACA,IAAID,gBAAgB,CAACJ,KAAK,EAAE;QAC1B,IAAI,CAACP,WAAW,CAAC,GAAGa,cAAO,CAACC,KAAK,CAACH,gBAAgB,CAACJ,KAAK,EAAEG,KAAK,CAACK,OAAO,CAAC;MAC1E;IACF,CAAC;IACDC,OAAO,EAAE,SAAAA,QAAqBA,QAAY,EAAO;MAC/C;MACA,IAAI,CAAC,IAAI,CAAChB,WAAW,CAAC,IAAI,CAACiB,MAAM,CAACC,IAAI,CAAChB,eAAe,CAAC,CAACiB,MAAM,EAAE;QAC9D,OAAOH,QAAO;MAChB;MACA,WAAAI,cAAA,iBAAAA,cAAA,iBACKJ,QAAO,WAAAK,gBAAA,iBACTxB,cAAc,EAAG,IAAI,CAACG,WAAW,CAAC;IAEvC,CAAC;IAEDsB,OAAO,EAAE,SAAAA,QAAAC,IAAA,EAAyD;MAAA,IAAlCR,OAAO,GAAAQ,IAAA,CAAPR,OAAO;QAAEH,MAAM,GAAAW,IAAA,CAANX,MAAM;QAAKF,KAAK,OAAAc,yBAAA,aAAAD,IAAA,EAAA5B,SAAA;MACvD,WAAAyB,cAAA,iBAAAA,cAAA,iBACKV,KAAK;QACRE,MAAM,EAAE,IAAI,CAACZ,WAAW;MAAC;IAE7B,CAAC;IACDyB,YAAY,EAAE,SAAAA,aAAAC,KAAA,EAAgD;MAAA,IAAzBd,MAAM,GAAAc,KAAA,CAANd,MAAM;QAAKF,KAAK,OAAAc,yBAAA,aAAAE,KAAA,EAAA9B,UAAA;MACnD,IAAMoB,OAAY,GAAGW,iBAAK,CAACC,UAAU,CAACzB,OAAO,CAAC;MAC9C,WAAAiB,cAAA,iBAAAA,cAAA,iBACKV,KAAK;QACRK,OAAO,EAAEH,MAAM;QACfA,MAAM,EAAEI,OAAO,CAACnB,cAAc;MAAC;IAEnC;EACF,CAAC;AACH;AAAC,IAAAgC,QAAA,GAEc5B,WAAW;AAAAF,OAAA,cAAA8B,QAAA"}